@chaibuilder/sdk 4.0.0-beta.7 → 4.0.0-beta.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -8
- package/dist/{2SSKDMRQ-hL7THuKW.js → 2SSKDMRQ-CdFBQR2o.js} +2 -2
- package/dist/{2SSKDMRQ-DDOgISWg.cjs → 2SSKDMRQ-CuQ42ST6.cjs} +1 -1
- package/dist/{AP7HFJJL-tcAhVllC.cjs → AP7HFJJL-DcnEb4BE.cjs} +1 -1
- package/dist/{AP7HFJJL-BsLQ13V_.js → AP7HFJJL-bDlWX5Yx.js} +1 -1
- package/dist/{IconPicker-FLSVAZxx.js → IconPicker-CNwplOGy.js} +2 -2
- package/dist/{IconPicker-J1KLNrSB.cjs → IconPicker-FpyYsxOf.cjs} +1 -1
- package/dist/STRINGS-BExFecZW.js +8 -0
- package/dist/STRINGS-FNnfjF5H.cjs +1 -0
- package/dist/{WDYDFRGG-BTj8AXV6.cjs → WDYDFRGG-BxLmjulP.cjs} +1 -1
- package/dist/{WDYDFRGG-Yi0eNS2V.js → WDYDFRGG-CWq7H6Qk.js} +2 -2
- package/dist/{actions-registery-CtQSSexG.cjs → actions-registery-BRgseJas.cjs} +16 -16
- package/dist/{actions-registery-DqrFhSMp.js → actions-registery-DRV8xywr.js} +180 -181
- package/dist/actions.cjs +1 -1
- package/dist/actions.d.ts +112 -51
- package/dist/actions.js +2 -2
- package/dist/{active-in-another-tab-Dozn833d.js → active-in-another-tab-C392ZWQc.js} +3 -3
- package/dist/{active-in-another-tab-BtAiatqq.cjs → active-in-another-tab-DEWOFgY5.cjs} +1 -1
- package/dist/{add-new-language-page-DD-CAoAQ.js → add-new-language-page-BL2F_Cu7.js} +4 -4
- package/dist/{add-new-language-page-9AMizlES.cjs → add-new-language-page-DBWd0wDY.cjs} +1 -1
- package/dist/{add-new-page-BS9vPnFG.cjs → add-new-page-DYrQeKCi.cjs} +1 -1
- package/dist/{add-new-page-uZKCk9eB.js → add-new-page-QVlyJhn9.js} +2 -2
- package/dist/{ai-panel-content-CK4XOkEh.js → ai-panel-content-CCOluPtK.js} +4 -4
- package/dist/{ai-panel-content-PovaKJaj.cjs → ai-panel-content-DCZRBa6s.cjs} +1 -1
- package/dist/{ai-panel-default-lang-B37k5ADH.cjs → ai-panel-default-lang-C3t0elrO.cjs} +2 -2
- package/dist/{ai-panel-default-lang-BtLjUl9d.js → ai-panel-default-lang-Crz7QAxl.js} +4 -4
- package/dist/{ai-panel-other-lang-CdQmASqv.cjs → ai-panel-other-lang-BRkr4Te3.cjs} +1 -1
- package/dist/{ai-panel-other-lang-Dp1MNaLi.js → ai-panel-other-lang-DIF8PYLh.js} +4 -4
- package/dist/{ai-prompt-input-BT-mEdTX.js → ai-prompt-input-D4dqy8L2.js} +2 -2
- package/dist/{ai-prompt-input-Dtym4w8J.cjs → ai-prompt-input-Ybgvrvd6.cjs} +1 -1
- package/dist/{ai-translation-prompt-B-lH7emI.cjs → ai-translation-prompt-Ck12Bfl6.cjs} +1 -1
- package/dist/{ai-translation-prompt-B17GK1QR.js → ai-translation-prompt-eZ4Sllva.js} +2 -2
- package/dist/{apply-binding-BvWfJCSZ.js → apply-binding-CLU6Xp4K.js} +77 -81
- package/dist/apply-binding-NvZX_rJe.cjs +1 -0
- package/dist/{code-display-DloSPyPr.cjs → code-display-9Onx6RCq.cjs} +1 -1
- package/dist/{code-display-Ck81Id9K.js → code-display-oa1j0ri7.js} +1 -1
- package/dist/{code-editor-EZT2pMsU.js → code-editor-D45h29W1.js} +1 -1
- package/dist/{code-editor-CUeNiMzA.cjs → code-editor-DH8eU4WL.cjs} +1 -1
- package/dist/{continue-editing-in-this-client-CS7C6h9Q.js → continue-editing-in-this-client-BRrIvSrl.js} +3 -3
- package/dist/{continue-editing-in-this-client-DMZOc36k.cjs → continue-editing-in-this-client-DgZ9Q18G.cjs} +1 -1
- package/dist/core-8lkXy4lC.cjs +1 -0
- package/dist/core-BvsZwF26.js +52 -0
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +143 -172
- package/dist/core.js +22 -34
- package/dist/{css-import-modal-s7t5gZQo.js → css-import-modal-BhLPzQH8.js} +5 -4
- package/dist/css-import-modal-C2-oVwFv.cjs +13 -0
- package/dist/{delete-design-token-C1smbx4E.js → delete-design-token-D4Q5-Xql.js} +1 -1
- package/dist/{delete-design-token-Mbw_6sYI.cjs → delete-design-token-DJSQluQ6.cjs} +1 -1
- package/dist/{delete-page-B7J3t0FN.cjs → delete-page-BxbsKhY5.cjs} +1 -1
- package/dist/{delete-page-2GfBi8Iv.js → delete-page-xHdZT-7c.js} +3 -3
- package/dist/{design-token-usage-DyO3xM-F.js → design-token-usage-7wgmVSWI.js} +2 -2
- package/dist/{design-token-usage-BoGOULG8.cjs → design-token-usage-KZ4pilLm.cjs} +1 -1
- package/dist/{digital-asset-manager-Cz3Nlrzl.js → digital-asset-manager-BmbVU7fX.js} +4 -4
- package/dist/{digital-asset-manager-DDk2ucTE.cjs → digital-asset-manager-a1fqrQVH.cjs} +1 -1
- package/dist/{duplicate-page-BwAY4Ssm.js → duplicate-page-5uIno9Yh.js} +4 -4
- package/dist/{duplicate-page-Dw3U4wTT.cjs → duplicate-page-BBTxn_o1.cjs} +1 -1
- package/dist/{dynamic-page-selector-CvBFyX2F.cjs → dynamic-page-selector-C1ef0i2I.cjs} +1 -1
- package/dist/{dynamic-page-selector-sViJuQlU.js → dynamic-page-selector-rhvhg7ol.js} +3 -3
- package/dist/{image-editor-BgGQuESa.js → image-editor-BXYZDa0s.js} +1 -1
- package/dist/{image-editor-AIsccrqC.cjs → image-editor-rqUgAO8V.cjs} +1 -1
- package/dist/{index-B7eWP_hB.js → index-Be9lAaD7.js} +421 -425
- package/dist/index-BhqugjzS.cjs +160 -0
- package/dist/index-CNEEEgTV.cjs +5 -0
- package/dist/{index-RYr8kQdI.js → index-mjuSGlPU.js} +5136 -5613
- package/dist/{json-diff-viewer-B2A78udz.cjs → json-diff-viewer-C9qmLiaq.cjs} +1 -1
- package/dist/{json-diff-viewer-Svw-kbhe.js → json-diff-viewer-aVwY7_hZ.js} +3 -3
- package/dist/{lang-panel-Bnc-9wkM.js → lang-panel-BTWk23Mw.js} +4 -4
- package/dist/{lang-panel-AmEkoWid.cjs → lang-panel-Bo1ZWYfu.cjs} +1 -1
- package/dist/{manage-design-tokens-BBkh1t4w.js → manage-design-tokens-id8bylgO.js} +4 -4
- package/dist/manage-design-tokens-lUMCgjdS.cjs +1 -0
- package/dist/{mark-as-template-CE6tRoQy.cjs → mark-as-template-BYXBDXMv.cjs} +1 -1
- package/dist/{mark-as-template-0CPzZnk-.js → mark-as-template-hv3WD852.js} +3 -3
- package/dist/{nested-path-selector-content-kGznHufl.js → nested-path-selector-content-B8z90MFF.js} +2 -2
- package/dist/{nested-path-selector-content-SmfjElr-.cjs → nested-path-selector-content-DgFFXcTD.cjs} +1 -1
- package/dist/{no-language-page-content-B4bQLc4K.cjs → no-language-page-content-6Kk8UjFX.cjs} +1 -1
- package/dist/{no-language-page-content-DXsAPDZd.js → no-language-page-content-DMACzysm.js} +3 -3
- package/dist/{no-language-page-dialog-BpPqmw9a.js → no-language-page-dialog-D4n_XYUq.js} +2 -2
- package/dist/{no-language-page-dialog-BC8NHzK2.cjs → no-language-page-dialog-mBH-fthh.cjs} +1 -1
- package/dist/{page-creator-82qTbBj4.cjs → page-creator-CGglYnYg.cjs} +1 -1
- package/dist/{page-creator-Bazn6yH4.js → page-creator-CgsOF0Eg.js} +4 -4
- package/dist/{page-lock-CRFyqKZE.js → page-lock-CUCEBnJb.js} +2 -2
- package/dist/{page-lock-D2iFZDUK.cjs → page-lock-Hsi61Mk5.cjs} +1 -1
- package/dist/{page-locked-dialog-xLqvKzax.cjs → page-locked-dialog-DSxbAMpt.cjs} +1 -1
- package/dist/{page-locked-dialog-GKfQEOmk.js → page-locked-dialog-bHvbFllT.js} +3 -3
- package/dist/{page-manager-new-Bn2QKjbf.cjs → page-manager-new-CBfFl5rL.cjs} +1 -1
- package/dist/{page-manager-new-DItY2hjd.js → page-manager-new-Cifc526h.js} +8 -8
- package/dist/{page-manager-search-and-filter-CPa8IXdd.js → page-manager-search-and-filter-CLJss6pV.js} +3 -3
- package/dist/{page-manager-search-and-filter-Dc4ky-qV.cjs → page-manager-search-and-filter-mEKl-UKh.cjs} +1 -1
- package/dist/page-revisions-content-C95dQJyx.cjs +1 -0
- package/dist/{page-revisions-content-CH-PZK0O.js → page-revisions-content-DvL4ya9g.js} +75 -67
- package/dist/pages.cjs +1 -1
- package/dist/pages.d.ts +146 -92
- package/dist/pages.js +1 -1
- package/dist/{publish-pages-content-BzJDObqr.cjs → publish-pages-content-B-6vSkql.cjs} +1 -1
- package/dist/{publish-pages-content-CSJCFElu.js → publish-pages-content-B8-IZW_U.js} +4 -4
- package/dist/{register-chai-top-bar-ESJHs5s-.js → register-chai-top-bar-CX_JkRJn.js} +78 -78
- package/dist/register-chai-top-bar-DWTuRU53.cjs +1 -0
- package/dist/render.cjs +1 -1
- package/dist/render.d.ts +14 -15
- package/dist/render.js +3 -3
- package/dist/{rte-widget-modal-5T81P_hg.js → rte-widget-modal-1SbY5bcQ.js} +7 -7
- package/dist/{rte-widget-modal-BfXcA7OP.cjs → rte-widget-modal-CyKwtbOG.cjs} +1 -1
- package/dist/runtime-client.cjs +1 -0
- package/dist/runtime-client.d.ts +158 -0
- package/dist/runtime-client.js +32 -0
- package/dist/runtime.cjs +1 -1
- package/dist/runtime.d.ts +92 -240
- package/dist/runtime.js +72 -72
- package/dist/{save-to-lib-MtWKSVeN.js → save-to-lib-BKcBfjfi.js} +3 -3
- package/dist/{save-to-lib-DGAdSa-0.cjs → save-to-lib-BmPh_Vns.cjs} +1 -1
- package/dist/{selected-block-display-CB1-hVR5.js → selected-block-display-B3hHlcLA.js} +3 -3
- package/dist/{selected-block-display-DLt_nMn9.cjs → selected-block-display-BCvTNcp2.cjs} +1 -1
- package/dist/{seo-panel-CRzzw4FW.js → seo-panel-D3EyOYij.js} +3 -3
- package/dist/{seo-panel-_kGXE9MC.cjs → seo-panel-DVClgzX9.cjs} +1 -1
- package/dist/{shared-json-ld-DoRgzDPC.cjs → shared-json-ld-BRgJTv0m.cjs} +1 -1
- package/dist/{shared-json-ld-CXukkDeS.js → shared-json-ld-DSPadwbY.js} +3 -3
- package/dist/{slug-input-Dp187Tiy.cjs → slug-input-B39SPBdP.cjs} +1 -1
- package/dist/{slug-input-CeEQ0zyv.js → slug-input-C3UrwSkt.js} +2 -2
- package/dist/supabase-actions.cjs +1 -1
- package/dist/supabase-actions.js +1 -1
- package/dist/{take-over-request-C9J3_rev.js → take-over-request-DfAlPvpE.js} +3 -3
- package/dist/{take-over-request-CXuakFBm.cjs → take-over-request-Tq9-gOCV.cjs} +1 -1
- package/dist/{theme-panel-footer-DvwsyHNQ.js → theme-panel-footer-DIy4baYU.js} +3 -3
- package/dist/{theme-panel-footer-CWZ0qs13.cjs → theme-panel-footer-DQzjVBBP.cjs} +1 -1
- package/dist/{translation-warning-modal-_aBp5ZZQ.js → translation-warning-modal-BHwLZZOw.js} +2 -2
- package/dist/{translation-warning-modal-DEt_ExQp.cjs → translation-warning-modal-Ckwt5Skc.cjs} +1 -1
- package/dist/types.cjs +1 -0
- package/dist/types.d.ts +598 -0
- package/dist/types.js +1 -0
- package/dist/{unmark-as-template-BYL5naYx.cjs → unmark-as-template-BKA-sNZr.cjs} +1 -1
- package/dist/{unmark-as-template-JN-cDUV_.js → unmark-as-template-CbgifSbI.js} +3 -3
- package/dist/{unpublish-page-B06iZEIO.cjs → unpublish-page-BqzvOD76.cjs} +1 -1
- package/dist/{unpublish-page-DqwBY2yI.js → unpublish-page-DXQpAkvc.js} +3 -3
- package/dist/utils.d.ts +5 -5
- package/dist/web-blocks.cjs +1 -1
- package/dist/web-blocks.js +214 -214
- package/dist/{web-preview-h39D3TUh.js → web-preview-DH7Yv-jg.js} +2 -2
- package/dist/{web-preview-wRgRY3Tv.cjs → web-preview-DShy13AM.cjs} +1 -1
- package/package.json +13 -7
- package/dist/apply-binding-IsUf6UWJ.cjs +0 -1
- package/dist/core-Dr7QYemB.js +0 -56
- package/dist/core-Y0lXLwkq.cjs +0 -1
- package/dist/css-import-modal-kHB0ramf.cjs +0 -13
- package/dist/index-B-rSiAp_.cjs +0 -1
- package/dist/index-BwH1mRm_.cjs +0 -5
- package/dist/index-Dxfyt4d4.js +0 -39
- package/dist/index-xYnNKovy.cjs +0 -160
- package/dist/manage-design-tokens-B2fG80bi.cjs +0 -1
- package/dist/page-revisions-content-CcLFI4YK.cjs +0 -1
- package/dist/register-chai-top-bar-BqwKw4uy.cjs +0 -1
|
@@ -2,7 +2,7 @@ var Ou = Object.defineProperty;
|
|
|
2
2
|
var Ru = (e, t, r) => t in e ? Ou(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
3
|
var Se = (e, t, r) => Ru(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
4
|
import { a as xu, d as ku, f as la, g as Pu, e as Cu, h as $u, i as Du } from "./register-partial-type-BjtdfKHE.js";
|
|
5
|
-
import { noop as Ma, omit as ua, isEmpty as Dt, isFunction as
|
|
5
|
+
import { noop as Ma, omit as ua, isEmpty as Dt, isFunction as qn, map as Fa, uniq as Hn, set as Jn, orderBy as Mu, get as Ct, has as Fu, each as zu, first as Lu, flattenDeep as Uu, pick as yn, compact as za, keys as La } from "lodash-es";
|
|
6
6
|
import { g as Zu } from "./_commonjsHelpers-C6fGbg64.js";
|
|
7
7
|
import ju from "fs";
|
|
8
8
|
import Gu from "path";
|
|
@@ -14,7 +14,7 @@ import { pgSequence as Os, pgTable as Je, timestamp as xe, text as O, numeric as
|
|
|
14
14
|
import { sql as ca, and as G, eq as T, inArray as wt, isNotNull as Za, isNull as Rs, or as xs, like as Ku, ilike as ja } from "drizzle-orm";
|
|
15
15
|
import { A as Xu } from "./models-D95ZYr_x.js";
|
|
16
16
|
import { z as y } from "zod";
|
|
17
|
-
import { e as Qu } from "./core-
|
|
17
|
+
import { e as Qu } from "./core-BvsZwF26.js";
|
|
18
18
|
import { randomUUID as ec } from "node:crypto";
|
|
19
19
|
var ks = "vercel.ai.error", tc = Symbol.for(ks), Ga, Ba, H = class Ps extends (Ba = Error, Ga = tc, Ba) {
|
|
20
20
|
/**
|
|
@@ -99,7 +99,7 @@ var Fs = "AI_InvalidArgumentError", zs = `vercel.ai.error.${Fs}`, oc = Symbol.fo
|
|
|
99
99
|
static isInstance(e) {
|
|
100
100
|
return H.hasMarker(e, Us);
|
|
101
101
|
}
|
|
102
|
-
}, Zs = "AI_JSONParseError", js = `vercel.ai.error.${Zs}`, lc = Symbol.for(js), Qa, eo,
|
|
102
|
+
}, Zs = "AI_JSONParseError", js = `vercel.ai.error.${Zs}`, lc = Symbol.for(js), Qa, eo, Xr = class extends (eo = H, Qa = lc, eo) {
|
|
103
103
|
constructor({ text: e, cause: t }) {
|
|
104
104
|
super({
|
|
105
105
|
name: Zs,
|
|
@@ -198,7 +198,7 @@ function Hs(e) {
|
|
|
198
198
|
function Wn(e, t) {
|
|
199
199
|
return typeof t == "bigint" ? t.toString() : t;
|
|
200
200
|
}
|
|
201
|
-
function
|
|
201
|
+
function vn(e) {
|
|
202
202
|
return {
|
|
203
203
|
get value() {
|
|
204
204
|
{
|
|
@@ -269,7 +269,7 @@ const Js = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
|
|
|
269
269
|
function br(e) {
|
|
270
270
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
271
271
|
}
|
|
272
|
-
const pc =
|
|
272
|
+
const pc = vn(() => {
|
|
273
273
|
var e;
|
|
274
274
|
if (typeof navigator < "u" && ((e = navigator == null ? void 0 : navigator.userAgent) != null && e.includes("Cloudflare")))
|
|
275
275
|
return !1;
|
|
@@ -549,7 +549,7 @@ const ga = (e) => (t, r, n, a) => {
|
|
|
549
549
|
throw Js(i, a == null ? void 0 : a.callee), i;
|
|
550
550
|
}
|
|
551
551
|
return s.value;
|
|
552
|
-
},
|
|
552
|
+
}, _n = (e) => (t, r, n) => {
|
|
553
553
|
const a = n ? { ...n, async: !1 } : { async: !1 }, o = t._zod.run({ value: r, issues: [] }, a);
|
|
554
554
|
if (o instanceof Promise)
|
|
555
555
|
throw new Xt();
|
|
@@ -557,14 +557,14 @@ const ga = (e) => (t, r, n, a) => {
|
|
|
557
557
|
success: !1,
|
|
558
558
|
error: new (e ?? Ks)(o.issues.map((s) => It(s, a, bt())))
|
|
559
559
|
} : { success: !0, data: o.value };
|
|
560
|
-
}, Sc = /* @__PURE__ */
|
|
560
|
+
}, Sc = /* @__PURE__ */ _n(Xs), wn = (e) => async (t, r, n) => {
|
|
561
561
|
const a = n ? Object.assign(n, { async: !0 }) : { async: !0 };
|
|
562
562
|
let o = t._zod.run({ value: r, issues: [] }, a);
|
|
563
563
|
return o instanceof Promise && (o = await o), o.issues.length ? {
|
|
564
564
|
success: !1,
|
|
565
565
|
error: new e(o.issues.map((s) => It(s, a, bt())))
|
|
566
566
|
} : { success: !0, data: o.value };
|
|
567
|
-
}, Nc = /* @__PURE__ */
|
|
567
|
+
}, Nc = /* @__PURE__ */ wn(Xs), Ac = (e) => (t, r, n) => {
|
|
568
568
|
const a = n ? Object.assign(n, { direction: "backward" }) : { direction: "backward" };
|
|
569
569
|
return ga(e)(t, r, a);
|
|
570
570
|
}, Oc = (e) => (t, r, n) => ga(e)(t, r, n), Rc = (e) => async (t, r, n) => {
|
|
@@ -572,11 +572,11 @@ const ga = (e) => (t, r, n, a) => {
|
|
|
572
572
|
return ha(e)(t, r, a);
|
|
573
573
|
}, xc = (e) => async (t, r, n) => ha(e)(t, r, n), kc = (e) => (t, r, n) => {
|
|
574
574
|
const a = n ? Object.assign(n, { direction: "backward" }) : { direction: "backward" };
|
|
575
|
-
return
|
|
576
|
-
}, Pc = (e) => (t, r, n) =>
|
|
575
|
+
return _n(e)(t, r, a);
|
|
576
|
+
}, Pc = (e) => (t, r, n) => _n(e)(t, r, n), Cc = (e) => async (t, r, n) => {
|
|
577
577
|
const a = n ? Object.assign(n, { direction: "backward" }) : { direction: "backward" };
|
|
578
|
-
return
|
|
579
|
-
}, $c = (e) => async (t, r, n) =>
|
|
578
|
+
return wn(e)(t, r, a);
|
|
579
|
+
}, $c = (e) => async (t, r, n) => wn(e)(t, r, n), Dc = /^[cC][^\s-]{8,}$/, Mc = /^[0-9a-z]+$/, Fc = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, zc = /^[0-9a-vA-V]{20}$/, Lc = /^[A-Za-z0-9]{27}$/, Uc = /^[a-zA-Z0-9_-]{21}$/, Zc = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, jc = /^([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})$/, oo = (e) => e ? new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/, Gc = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, Bc = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
580
580
|
function Vc() {
|
|
581
581
|
return new RegExp(Bc, "u");
|
|
582
582
|
}
|
|
@@ -785,7 +785,7 @@ const td = (e) => {
|
|
|
785
785
|
continue: !t.abort
|
|
786
786
|
});
|
|
787
787
|
};
|
|
788
|
-
}),
|
|
788
|
+
}), Tn = /* @__PURE__ */ _("$ZodCheckStringFormat", (e, t) => {
|
|
789
789
|
var r, n;
|
|
790
790
|
Ue.init(e, t), e._zod.onattach.push((a) => {
|
|
791
791
|
const o = a._zod.bag;
|
|
@@ -803,7 +803,7 @@ const td = (e) => {
|
|
|
803
803
|
}) : (n = e._zod).check ?? (n.check = () => {
|
|
804
804
|
});
|
|
805
805
|
}), pd = /* @__PURE__ */ _("$ZodCheckRegex", (e, t) => {
|
|
806
|
-
|
|
806
|
+
Tn.init(e, t), e._zod.check = (r) => {
|
|
807
807
|
t.pattern.lastIndex = 0, !t.pattern.test(r.value) && r.issues.push({
|
|
808
808
|
origin: "string",
|
|
809
809
|
code: "invalid_format",
|
|
@@ -815,9 +815,9 @@ const td = (e) => {
|
|
|
815
815
|
});
|
|
816
816
|
};
|
|
817
817
|
}), fd = /* @__PURE__ */ _("$ZodCheckLowerCase", (e, t) => {
|
|
818
|
-
t.pattern ?? (t.pattern = od),
|
|
818
|
+
t.pattern ?? (t.pattern = od), Tn.init(e, t);
|
|
819
819
|
}), gd = /* @__PURE__ */ _("$ZodCheckUpperCase", (e, t) => {
|
|
820
|
-
t.pattern ?? (t.pattern = sd),
|
|
820
|
+
t.pattern ?? (t.pattern = sd), Tn.init(e, t);
|
|
821
821
|
}), hd = /* @__PURE__ */ _("$ZodCheckIncludes", (e, t) => {
|
|
822
822
|
Ue.init(e, t);
|
|
823
823
|
const r = tr(t.includes), n = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${r}` : r);
|
|
@@ -996,7 +996,7 @@ const wd = {
|
|
|
996
996
|
}), n;
|
|
997
997
|
};
|
|
998
998
|
}), ye = /* @__PURE__ */ _("$ZodStringFormat", (e, t) => {
|
|
999
|
-
|
|
999
|
+
Tn.init(e, t), ma.init(e, t);
|
|
1000
1000
|
}), Td = /* @__PURE__ */ _("$ZodGUID", (e, t) => {
|
|
1001
1001
|
t.pattern ?? (t.pattern = jc), ye.init(e, t);
|
|
1002
1002
|
}), Ed = /* @__PURE__ */ _("$ZodUUID", (e, t) => {
|
|
@@ -1265,7 +1265,7 @@ const Xd = /* @__PURE__ */ _("$ZodArray", (e, t) => {
|
|
|
1265
1265
|
return o.length ? Promise.all(o).then(() => r) : r;
|
|
1266
1266
|
};
|
|
1267
1267
|
});
|
|
1268
|
-
function
|
|
1268
|
+
function Qr(e, t, r, n, a) {
|
|
1269
1269
|
if (e.issues.length) {
|
|
1270
1270
|
if (a && !(r in n))
|
|
1271
1271
|
return;
|
|
@@ -1298,7 +1298,7 @@ function ui(e, t, r, n, a, o) {
|
|
|
1298
1298
|
continue;
|
|
1299
1299
|
}
|
|
1300
1300
|
const d = l.run({ value: t[p], issues: [] }, n);
|
|
1301
|
-
d instanceof Promise ? e.push(d.then((m) =>
|
|
1301
|
+
d instanceof Promise ? e.push(d.then((m) => Qr(m, r, p, t, c))) : Qr(d, r, p, t, c);
|
|
1302
1302
|
}
|
|
1303
1303
|
return s.length && r.issues.push({
|
|
1304
1304
|
code: "unrecognized_keys",
|
|
@@ -1321,7 +1321,7 @@ const Qd = /* @__PURE__ */ _("$ZodObject", (e, t) => {
|
|
|
1321
1321
|
}
|
|
1322
1322
|
});
|
|
1323
1323
|
}
|
|
1324
|
-
const n =
|
|
1324
|
+
const n = vn(() => li(t));
|
|
1325
1325
|
W(e._zod, "propValues", () => {
|
|
1326
1326
|
const i = t.shape, l = {};
|
|
1327
1327
|
for (const u in i) {
|
|
@@ -1350,13 +1350,13 @@ const Qd = /* @__PURE__ */ _("$ZodObject", (e, t) => {
|
|
|
1350
1350
|
const c = [], p = s.shape;
|
|
1351
1351
|
for (const d of s.keys) {
|
|
1352
1352
|
const m = p[d], E = m._zod.optout === "optional", v = m._zod.run({ value: u[d], issues: [] }, l);
|
|
1353
|
-
v instanceof Promise ? c.push(v.then((b) =>
|
|
1353
|
+
v instanceof Promise ? c.push(v.then((b) => Qr(b, i, d, u, E))) : Qr(v, i, d, u, E);
|
|
1354
1354
|
}
|
|
1355
1355
|
return o ? ui(c, u, i, l, n.value, e) : c.length ? Promise.all(c).then(() => i) : i;
|
|
1356
1356
|
};
|
|
1357
1357
|
}), ep = /* @__PURE__ */ _("$ZodObjectJIT", (e, t) => {
|
|
1358
1358
|
Qd.init(e, t);
|
|
1359
|
-
const r = e._zod.parse, n =
|
|
1359
|
+
const r = e._zod.parse, n = vn(() => li(t)), a = (d) => {
|
|
1360
1360
|
var g;
|
|
1361
1361
|
const m = new _d(["shape", "payload", "ctx"]), E = n.value, v = (D) => {
|
|
1362
1362
|
const R = ao(D);
|
|
@@ -1484,7 +1484,7 @@ const ci = /* @__PURE__ */ _("$ZodUnion", (e, t) => {
|
|
|
1484
1484
|
}
|
|
1485
1485
|
return a;
|
|
1486
1486
|
});
|
|
1487
|
-
const n =
|
|
1487
|
+
const n = vn(() => {
|
|
1488
1488
|
var s;
|
|
1489
1489
|
const a = t.options, o = /* @__PURE__ */ new Map();
|
|
1490
1490
|
for (const i of a) {
|
|
@@ -2190,7 +2190,7 @@ function yo(e, t) {
|
|
|
2190
2190
|
});
|
|
2191
2191
|
}
|
|
2192
2192
|
// @__NO_SIDE_EFFECTS__
|
|
2193
|
-
function
|
|
2193
|
+
function kn(e, t) {
|
|
2194
2194
|
return new ai({
|
|
2195
2195
|
check: "less_than",
|
|
2196
2196
|
...k(t),
|
|
@@ -2208,7 +2208,7 @@ function vo(e, t) {
|
|
|
2208
2208
|
});
|
|
2209
2209
|
}
|
|
2210
2210
|
// @__NO_SIDE_EFFECTS__
|
|
2211
|
-
function
|
|
2211
|
+
function Pn(e, t) {
|
|
2212
2212
|
return new oi({
|
|
2213
2213
|
check: "greater_than",
|
|
2214
2214
|
...k(t),
|
|
@@ -2233,7 +2233,7 @@ function pi(e, t) {
|
|
|
2233
2233
|
});
|
|
2234
2234
|
}
|
|
2235
2235
|
// @__NO_SIDE_EFFECTS__
|
|
2236
|
-
function
|
|
2236
|
+
function en(e, t) {
|
|
2237
2237
|
return new cd({
|
|
2238
2238
|
check: "min_length",
|
|
2239
2239
|
...k(t),
|
|
@@ -2377,7 +2377,7 @@ function gf(e, t) {
|
|
|
2377
2377
|
});
|
|
2378
2378
|
return r._zod.check = e, r;
|
|
2379
2379
|
}
|
|
2380
|
-
function
|
|
2380
|
+
function tn(e) {
|
|
2381
2381
|
let t = (e == null ? void 0 : e.target) ?? "draft-2020-12";
|
|
2382
2382
|
return t === "draft-4" && (t = "draft-04"), t === "draft-7" && (t = "draft-07"), {
|
|
2383
2383
|
processors: e.processors ?? {},
|
|
@@ -2425,7 +2425,7 @@ function de(e, t, r = { path: [], schemaPath: [] }) {
|
|
|
2425
2425
|
const l = t.metadataRegistry.get(e);
|
|
2426
2426
|
return l && Object.assign(s.schema, l), t.io === "input" && ze(e) && (delete s.schema.examples, delete s.schema.default), t.io === "input" && s.schema._prefault && ((n = s.schema).default ?? (n.default = s.schema._prefault)), delete s.schema._prefault, t.seen.get(e).schema;
|
|
2427
2427
|
}
|
|
2428
|
-
function
|
|
2428
|
+
function rn(e, t) {
|
|
2429
2429
|
var s, i, l, u;
|
|
2430
2430
|
const r = e.seen.get(t);
|
|
2431
2431
|
if (!r)
|
|
@@ -2499,7 +2499,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
2499
2499
|
}
|
|
2500
2500
|
}
|
|
2501
2501
|
}
|
|
2502
|
-
function
|
|
2502
|
+
function nn(e, t) {
|
|
2503
2503
|
var s, i, l;
|
|
2504
2504
|
const r = e.seen.get(t);
|
|
2505
2505
|
if (!r)
|
|
@@ -2555,8 +2555,8 @@ function an(e, t) {
|
|
|
2555
2555
|
value: {
|
|
2556
2556
|
...t["~standard"],
|
|
2557
2557
|
jsonSchema: {
|
|
2558
|
-
input:
|
|
2559
|
-
output:
|
|
2558
|
+
input: an(t, "input", e.processors),
|
|
2559
|
+
output: an(t, "output", e.processors)
|
|
2560
2560
|
}
|
|
2561
2561
|
},
|
|
2562
2562
|
enumerable: !1,
|
|
@@ -2609,11 +2609,11 @@ function ze(e, t) {
|
|
|
2609
2609
|
return !1;
|
|
2610
2610
|
}
|
|
2611
2611
|
const hf = (e, t = {}) => (r) => {
|
|
2612
|
-
const n =
|
|
2613
|
-
return de(e, n),
|
|
2614
|
-
},
|
|
2615
|
-
const { libraryOptions: a, target: o } = n ?? {}, s =
|
|
2616
|
-
return de(e, s),
|
|
2612
|
+
const n = tn({ ...r, processors: t });
|
|
2613
|
+
return de(e, n), rn(n, e), nn(n, e);
|
|
2614
|
+
}, an = (e, t, r = {}) => (n) => {
|
|
2615
|
+
const { libraryOptions: a, target: o } = n ?? {}, s = tn({ ...a ?? {}, target: o, io: t, processors: r });
|
|
2616
|
+
return de(e, s), rn(s, e), nn(s, e);
|
|
2617
2617
|
}, mf = {
|
|
2618
2618
|
guid: "uuid",
|
|
2619
2619
|
url: "uri",
|
|
@@ -2889,7 +2889,7 @@ const hf = (e, t = {}) => (r) => {
|
|
|
2889
2889
|
};
|
|
2890
2890
|
function kf(e, t) {
|
|
2891
2891
|
if ("_idmap" in e) {
|
|
2892
|
-
const n = e, a =
|
|
2892
|
+
const n = e, a = tn({ ...t, processors: wo }), o = {};
|
|
2893
2893
|
for (const l of n._idmap.entries()) {
|
|
2894
2894
|
const [u, c] = l;
|
|
2895
2895
|
de(c, a);
|
|
@@ -2902,7 +2902,7 @@ function kf(e, t) {
|
|
|
2902
2902
|
a.external = i;
|
|
2903
2903
|
for (const l of n._idmap.entries()) {
|
|
2904
2904
|
const [u, c] = l;
|
|
2905
|
-
|
|
2905
|
+
rn(a, c), s[u] = nn(a, c);
|
|
2906
2906
|
}
|
|
2907
2907
|
if (Object.keys(o).length > 0) {
|
|
2908
2908
|
const l = a.target === "draft-2020-12" ? "$defs" : "definitions";
|
|
@@ -2912,8 +2912,8 @@ function kf(e, t) {
|
|
|
2912
2912
|
}
|
|
2913
2913
|
return { schemas: s };
|
|
2914
2914
|
}
|
|
2915
|
-
const r =
|
|
2916
|
-
return de(e, r),
|
|
2915
|
+
const r = tn({ ...t, processors: wo });
|
|
2916
|
+
return de(e, r), rn(r, e), nn(r, e);
|
|
2917
2917
|
}
|
|
2918
2918
|
const Pf = /* @__PURE__ */ _("ZodISODateTime", (e, t) => {
|
|
2919
2919
|
Pd.init(e, t), _e.init(e, t);
|
|
@@ -2970,10 +2970,10 @@ const Uf = (e, t) => {
|
|
|
2970
2970
|
});
|
|
2971
2971
|
}, Ye = _("ZodError", Uf, {
|
|
2972
2972
|
Parent: Error
|
|
2973
|
-
}), Zf = /* @__PURE__ */ ga(Ye), jf = /* @__PURE__ */ ha(Ye), Gf = /* @__PURE__ */
|
|
2973
|
+
}), Zf = /* @__PURE__ */ ga(Ye), jf = /* @__PURE__ */ ha(Ye), Gf = /* @__PURE__ */ _n(Ye), zi = /* @__PURE__ */ wn(Ye), Bf = /* @__PURE__ */ Ac(Ye), Vf = /* @__PURE__ */ Oc(Ye), qf = /* @__PURE__ */ Rc(Ye), Hf = /* @__PURE__ */ xc(Ye), Jf = /* @__PURE__ */ kc(Ye), Yf = /* @__PURE__ */ Pc(Ye), Wf = /* @__PURE__ */ Cc(Ye), Kf = /* @__PURE__ */ $c(Ye), fe = /* @__PURE__ */ _("ZodType", (e, t) => (pe.init(e, t), Object.assign(e["~standard"], {
|
|
2974
2974
|
jsonSchema: {
|
|
2975
|
-
input:
|
|
2976
|
-
output:
|
|
2975
|
+
input: an(e, "input"),
|
|
2976
|
+
output: an(e, "output")
|
|
2977
2977
|
}
|
|
2978
2978
|
}), e.toJSONSchema = hf(e, {}), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.check = (...r) => e.clone(At(t, {
|
|
2979
2979
|
checks: [
|
|
@@ -2999,7 +2999,7 @@ const Uf = (e, t) => {
|
|
|
2999
2999
|
}, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e.apply = (r) => r(e), e)), Li = /* @__PURE__ */ _("_ZodString", (e, t) => {
|
|
3000
3000
|
ma.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (n, a, o) => gi(e, n, a);
|
|
3001
3001
|
const r = e._zod.bag;
|
|
3002
|
-
e.format = r.format ?? null, e.minLength = r.minimum ?? null, e.maxLength = r.maximum ?? null, e.regex = (...n) => e.check(/* @__PURE__ */ Xp(...n)), e.includes = (...n) => e.check(/* @__PURE__ */ tf(...n)), e.startsWith = (...n) => e.check(/* @__PURE__ */ rf(...n)), e.endsWith = (...n) => e.check(/* @__PURE__ */ nf(...n)), e.min = (...n) => e.check(/* @__PURE__ */
|
|
3002
|
+
e.format = r.format ?? null, e.minLength = r.minimum ?? null, e.maxLength = r.maximum ?? null, e.regex = (...n) => e.check(/* @__PURE__ */ Xp(...n)), e.includes = (...n) => e.check(/* @__PURE__ */ tf(...n)), e.startsWith = (...n) => e.check(/* @__PURE__ */ rf(...n)), e.endsWith = (...n) => e.check(/* @__PURE__ */ nf(...n)), e.min = (...n) => e.check(/* @__PURE__ */ en(...n)), e.max = (...n) => e.check(/* @__PURE__ */ pi(...n)), e.length = (...n) => e.check(/* @__PURE__ */ fi(...n)), e.nonempty = (...n) => e.check(/* @__PURE__ */ en(1, ...n)), e.lowercase = (n) => e.check(/* @__PURE__ */ Qp(n)), e.uppercase = (n) => e.check(/* @__PURE__ */ ef(n)), e.trim = () => e.check(/* @__PURE__ */ of()), e.normalize = (...n) => e.check(/* @__PURE__ */ af(...n)), e.toLowerCase = () => e.check(/* @__PURE__ */ sf()), e.toUpperCase = () => e.check(/* @__PURE__ */ lf()), e.slugify = () => e.check(/* @__PURE__ */ uf());
|
|
3003
3003
|
}), Xf = /* @__PURE__ */ _("ZodString", (e, t) => {
|
|
3004
3004
|
ma.init(e, t), Li.init(e, t), e.email = (r) => e.check(/* @__PURE__ */ wp(Qf, r)), e.url = (r) => e.check(/* @__PURE__ */ Sp(eg, r)), e.jwt = (r) => e.check(/* @__PURE__ */ Up(hg, r)), e.emoji = (r) => e.check(/* @__PURE__ */ Np(tg, r)), e.guid = (r) => e.check(/* @__PURE__ */ mo(To, r)), e.uuid = (r) => e.check(/* @__PURE__ */ Tp(Jr, r)), e.uuidv4 = (r) => e.check(/* @__PURE__ */ Ep(Jr, r)), e.uuidv6 = (r) => e.check(/* @__PURE__ */ bp(Jr, r)), e.uuidv7 = (r) => e.check(/* @__PURE__ */ Ip(Jr, r)), e.nanoid = (r) => e.check(/* @__PURE__ */ Ap(rg, r)), e.guid = (r) => e.check(/* @__PURE__ */ mo(To, r)), e.cuid = (r) => e.check(/* @__PURE__ */ Op(ng, r)), e.cuid2 = (r) => e.check(/* @__PURE__ */ Rp(ag, r)), e.ulid = (r) => e.check(/* @__PURE__ */ xp(og, r)), e.base64 = (r) => e.check(/* @__PURE__ */ Fp(pg, r)), e.base64url = (r) => e.check(/* @__PURE__ */ zp(fg, r)), e.xid = (r) => e.check(/* @__PURE__ */ kp(sg, r)), e.ksuid = (r) => e.check(/* @__PURE__ */ Pp(ig, r)), e.ipv4 = (r) => e.check(/* @__PURE__ */ Cp(lg, r)), e.ipv6 = (r) => e.check(/* @__PURE__ */ $p(ug, r)), e.cidrv4 = (r) => e.check(/* @__PURE__ */ Dp(cg, r)), e.cidrv6 = (r) => e.check(/* @__PURE__ */ Mp(dg, r)), e.e164 = (r) => e.check(/* @__PURE__ */ Lp(gg, r)), e.datetime = (r) => e.check(Cf(r)), e.date = (r) => e.check(Df(r)), e.time = (r) => e.check(Ff(r)), e.duration = (r) => e.check(Lf(r));
|
|
3005
3005
|
});
|
|
@@ -3047,11 +3047,11 @@ const _e = /* @__PURE__ */ _("ZodStringFormat", (e, t) => {
|
|
|
3047
3047
|
}), hg = /* @__PURE__ */ _("ZodJWT", (e, t) => {
|
|
3048
3048
|
Vd.init(e, t), _e.init(e, t);
|
|
3049
3049
|
}), Ui = /* @__PURE__ */ _("ZodNumber", (e, t) => {
|
|
3050
|
-
ii.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (n, a, o) => hi(e, n, a), e.gt = (n, a) => e.check(/* @__PURE__ */ vo(n, a)), e.gte = (n, a) => e.check(/* @__PURE__ */
|
|
3050
|
+
ii.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (n, a, o) => hi(e, n, a), e.gt = (n, a) => e.check(/* @__PURE__ */ vo(n, a)), e.gte = (n, a) => e.check(/* @__PURE__ */ Pn(n, a)), e.min = (n, a) => e.check(/* @__PURE__ */ Pn(n, a)), e.lt = (n, a) => e.check(/* @__PURE__ */ yo(n, a)), e.lte = (n, a) => e.check(/* @__PURE__ */ kn(n, a)), e.max = (n, a) => e.check(/* @__PURE__ */ kn(n, a)), e.int = (n) => e.check(Eo(n)), e.safe = (n) => e.check(Eo(n)), e.positive = (n) => e.check(/* @__PURE__ */ vo(0, n)), e.nonnegative = (n) => e.check(/* @__PURE__ */ Pn(0, n)), e.negative = (n) => e.check(/* @__PURE__ */ yo(0, n)), e.nonpositive = (n) => e.check(/* @__PURE__ */ kn(0, n)), e.multipleOf = (n, a) => e.check(/* @__PURE__ */ _o(n, a)), e.step = (n, a) => e.check(/* @__PURE__ */ _o(n, a)), e.finite = () => e;
|
|
3051
3051
|
const r = e._zod.bag;
|
|
3052
3052
|
e.minValue = Math.max(r.minimum ?? Number.NEGATIVE_INFINITY, r.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null, e.maxValue = Math.min(r.maximum ?? Number.POSITIVE_INFINITY, r.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null, e.isInt = (r.format ?? "").includes("int") || Number.isSafeInteger(r.multipleOf ?? 0.5), e.isFinite = !0, e.format = r.format ?? null;
|
|
3053
3053
|
});
|
|
3054
|
-
function
|
|
3054
|
+
function on(e) {
|
|
3055
3055
|
return /* @__PURE__ */ Vp(Ui, e);
|
|
3056
3056
|
}
|
|
3057
3057
|
const mg = /* @__PURE__ */ _("ZodNumberFormat", (e, t) => {
|
|
@@ -3091,7 +3091,7 @@ function bg(e) {
|
|
|
3091
3091
|
return /* @__PURE__ */ Kp(Eg, e);
|
|
3092
3092
|
}
|
|
3093
3093
|
const Ig = /* @__PURE__ */ _("ZodArray", (e, t) => {
|
|
3094
|
-
Xd.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (r, n, a) => Si(e, r, n, a), e.element = t.element, e.min = (r, n) => e.check(/* @__PURE__ */
|
|
3094
|
+
Xd.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (r, n, a) => Si(e, r, n, a), e.element = t.element, e.min = (r, n) => e.check(/* @__PURE__ */ en(r, n)), e.nonempty = (r) => e.check(/* @__PURE__ */ en(1, r)), e.max = (r, n) => e.check(/* @__PURE__ */ pi(r, n)), e.length = (r, n) => e.check(/* @__PURE__ */ fi(r, n)), e.unwrap = () => e.element;
|
|
3095
3095
|
});
|
|
3096
3096
|
function Ge(e, t) {
|
|
3097
3097
|
return /* @__PURE__ */ cf(Ig, e, t);
|
|
@@ -3338,7 +3338,7 @@ function Wg(e, t = {}) {
|
|
|
3338
3338
|
function Kg(e) {
|
|
3339
3339
|
return /* @__PURE__ */ ff(e);
|
|
3340
3340
|
}
|
|
3341
|
-
function
|
|
3341
|
+
function sn(e, t = {}) {
|
|
3342
3342
|
const r = new _a({
|
|
3343
3343
|
type: "custom",
|
|
3344
3344
|
check: "custom",
|
|
@@ -3441,7 +3441,7 @@ Sr.arrayToEnum([
|
|
|
3441
3441
|
"not_multiple_of",
|
|
3442
3442
|
"not_finite"
|
|
3443
3443
|
]);
|
|
3444
|
-
class
|
|
3444
|
+
class ln extends Error {
|
|
3445
3445
|
get errors() {
|
|
3446
3446
|
return this.issues;
|
|
3447
3447
|
}
|
|
@@ -3478,7 +3478,7 @@ class un extends Error {
|
|
|
3478
3478
|
return a(this), n;
|
|
3479
3479
|
}
|
|
3480
3480
|
static assert(t) {
|
|
3481
|
-
if (!(t instanceof
|
|
3481
|
+
if (!(t instanceof ln))
|
|
3482
3482
|
throw new Error(`Not a ZodError: ${t}`);
|
|
3483
3483
|
}
|
|
3484
3484
|
toString() {
|
|
@@ -3504,7 +3504,7 @@ class un extends Error {
|
|
|
3504
3504
|
return this.flatten();
|
|
3505
3505
|
}
|
|
3506
3506
|
}
|
|
3507
|
-
|
|
3507
|
+
ln.create = (e) => new ln(e);
|
|
3508
3508
|
var Ao;
|
|
3509
3509
|
(function(e) {
|
|
3510
3510
|
e.errToObj = (t) => typeof t == "string" ? { message: t } : t || {}, e.toString = (t) => typeof t == "string" ? t : t == null ? void 0 : t.message;
|
|
@@ -3518,14 +3518,14 @@ class Oo extends Error {
|
|
|
3518
3518
|
super(t), this.name = "ParseError", this.type = r.type, this.field = r.field, this.value = r.value, this.line = r.line;
|
|
3519
3519
|
}
|
|
3520
3520
|
}
|
|
3521
|
-
function
|
|
3521
|
+
function Cn(e) {
|
|
3522
3522
|
}
|
|
3523
3523
|
function Xg(e) {
|
|
3524
3524
|
if (typeof e == "function")
|
|
3525
3525
|
throw new TypeError(
|
|
3526
3526
|
"`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?"
|
|
3527
3527
|
);
|
|
3528
|
-
const { onEvent: t =
|
|
3528
|
+
const { onEvent: t = Cn, onError: r = Cn, onRetry: n = Cn, onComment: a } = e;
|
|
3529
3529
|
let o = "", s = !0, i, l = "", u = "";
|
|
3530
3530
|
function c(v) {
|
|
3531
3531
|
const b = s ? v.replace(/^\xEF\xBB\xBF/, "") : v, [P, C] = Qg(`${o}${b}`);
|
|
@@ -3636,7 +3636,7 @@ class eh extends TransformStream {
|
|
|
3636
3636
|
});
|
|
3637
3637
|
}
|
|
3638
3638
|
}
|
|
3639
|
-
function
|
|
3639
|
+
function un(...e) {
|
|
3640
3640
|
return e.reduce(
|
|
3641
3641
|
(t, r) => ({
|
|
3642
3642
|
...t,
|
|
@@ -3702,13 +3702,13 @@ function wa(e) {
|
|
|
3702
3702
|
const t = e.replace(/-/g, "+").replace(/_/g, "/"), r = nh(t);
|
|
3703
3703
|
return Uint8Array.from(r, (n) => n.codePointAt(0));
|
|
3704
3704
|
}
|
|
3705
|
-
function
|
|
3705
|
+
function cn(e) {
|
|
3706
3706
|
let t = "";
|
|
3707
3707
|
for (let r = 0; r < e.length; r++)
|
|
3708
3708
|
t += String.fromCodePoint(e[r]);
|
|
3709
3709
|
return rh(t);
|
|
3710
3710
|
}
|
|
3711
|
-
var Vi = "AI_DownloadError", qi = `vercel.ai.error.${Vi}`, ah = Symbol.for(qi), xo, ko,
|
|
3711
|
+
var Vi = "AI_DownloadError", qi = `vercel.ai.error.${Vi}`, ah = Symbol.for(qi), xo, ko, $n = class extends (ko = H, xo = ah, ko) {
|
|
3712
3712
|
constructor({
|
|
3713
3713
|
url: e,
|
|
3714
3714
|
statusCode: t,
|
|
@@ -3866,7 +3866,7 @@ function lh({
|
|
|
3866
3866
|
return o === "*" || o === "*/*" ? { mediaTypePrefix: "", regexes: a } : { mediaTypePrefix: o.replace(/\*/, ""), regexes: a };
|
|
3867
3867
|
}).filter(({ mediaTypePrefix: n }) => e.startsWith(n)).flatMap(({ regexes: n }) => n).some((n) => n.test(t));
|
|
3868
3868
|
}
|
|
3869
|
-
function
|
|
3869
|
+
function Kr({
|
|
3870
3870
|
settingValue: e,
|
|
3871
3871
|
environmentVariableName: t
|
|
3872
3872
|
}) {
|
|
@@ -4085,7 +4085,7 @@ function Ih(e) {
|
|
|
4085
4085
|
const: e.value
|
|
4086
4086
|
};
|
|
4087
4087
|
}
|
|
4088
|
-
var
|
|
4088
|
+
var Dn = void 0, Ke = {
|
|
4089
4089
|
/**
|
|
4090
4090
|
* `c` was changed to `[cC]` to replicate /i flag
|
|
4091
4091
|
*/
|
|
@@ -4107,10 +4107,10 @@ var Mn = void 0, Ke = {
|
|
|
4107
4107
|
* Fix in Zod:
|
|
4108
4108
|
* https://github.com/colinhacks/zod/commit/9340fd51e48576a75adc919bff65dbc4a5d4c99b
|
|
4109
4109
|
*/
|
|
4110
|
-
emoji: () => (
|
|
4110
|
+
emoji: () => (Dn === void 0 && (Dn = RegExp(
|
|
4111
4111
|
"^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",
|
|
4112
4112
|
"u"
|
|
4113
|
-
)),
|
|
4113
|
+
)), Dn),
|
|
4114
4114
|
/**
|
|
4115
4115
|
* Unused
|
|
4116
4116
|
*/
|
|
@@ -4174,7 +4174,7 @@ function Qi(e, t) {
|
|
|
4174
4174
|
case "startsWith":
|
|
4175
4175
|
Fe(
|
|
4176
4176
|
r,
|
|
4177
|
-
RegExp(`^${
|
|
4177
|
+
RegExp(`^${Mn(n.value, t)}`),
|
|
4178
4178
|
n.message,
|
|
4179
4179
|
t
|
|
4180
4180
|
);
|
|
@@ -4182,7 +4182,7 @@ function Qi(e, t) {
|
|
|
4182
4182
|
case "endsWith":
|
|
4183
4183
|
Fe(
|
|
4184
4184
|
r,
|
|
4185
|
-
RegExp(`${
|
|
4185
|
+
RegExp(`${Mn(n.value, t)}$`),
|
|
4186
4186
|
n.message,
|
|
4187
4187
|
t
|
|
4188
4188
|
);
|
|
@@ -4205,7 +4205,7 @@ function Qi(e, t) {
|
|
|
4205
4205
|
case "includes": {
|
|
4206
4206
|
Fe(
|
|
4207
4207
|
r,
|
|
4208
|
-
RegExp(
|
|
4208
|
+
RegExp(Mn(n.value, t)),
|
|
4209
4209
|
n.message,
|
|
4210
4210
|
t
|
|
4211
4211
|
);
|
|
@@ -4254,7 +4254,7 @@ function Qi(e, t) {
|
|
|
4254
4254
|
}
|
|
4255
4255
|
return r;
|
|
4256
4256
|
}
|
|
4257
|
-
function
|
|
4257
|
+
function Mn(e, t) {
|
|
4258
4258
|
return t.patternStrategy === "escape" ? Nh(e) : e;
|
|
4259
4259
|
}
|
|
4260
4260
|
var Sh = new Set(
|
|
@@ -4840,7 +4840,7 @@ function sr(e) {
|
|
|
4840
4840
|
let t;
|
|
4841
4841
|
return () => (t == null && (t = e()), t);
|
|
4842
4842
|
}
|
|
4843
|
-
function
|
|
4843
|
+
function En(e, {
|
|
4844
4844
|
validate: t
|
|
4845
4845
|
} = {}) {
|
|
4846
4846
|
return {
|
|
@@ -4857,10 +4857,10 @@ function Xh(e) {
|
|
|
4857
4857
|
return typeof e == "object" && e !== null && ea in e && e[ea] === !0 && "jsonSchema" in e && "validate" in e;
|
|
4858
4858
|
}
|
|
4859
4859
|
function ir(e) {
|
|
4860
|
-
return e == null ?
|
|
4860
|
+
return e == null ? En({ properties: {}, additionalProperties: !1 }) : Xh(e) ? e : "~standard" in e ? e["~standard"].vendor === "zod" ? Ut(e) : Qh(e) : e();
|
|
4861
4861
|
}
|
|
4862
4862
|
function Qh(e) {
|
|
4863
|
-
return
|
|
4863
|
+
return En(
|
|
4864
4864
|
() => e["~standard"].jsonSchema.input({
|
|
4865
4865
|
target: "draft-07"
|
|
4866
4866
|
}),
|
|
@@ -4881,7 +4881,7 @@ function Qh(e) {
|
|
|
4881
4881
|
function em(e, t) {
|
|
4882
4882
|
var r;
|
|
4883
4883
|
const n = (r = void 0) != null ? r : !1;
|
|
4884
|
-
return
|
|
4884
|
+
return En(
|
|
4885
4885
|
// defer json schema creation to avoid unnecessary computation when only validation is needed
|
|
4886
4886
|
() => Kh(e, {
|
|
4887
4887
|
$refStrategy: n ? "root" : "none"
|
|
@@ -4897,7 +4897,7 @@ function em(e, t) {
|
|
|
4897
4897
|
function tm(e, t) {
|
|
4898
4898
|
var r;
|
|
4899
4899
|
const n = (r = void 0) != null ? r : !1;
|
|
4900
|
-
return
|
|
4900
|
+
return En(
|
|
4901
4901
|
// defer json schema creation to avoid unnecessary computation when only validation is needed
|
|
4902
4902
|
() => Wi(
|
|
4903
4903
|
kf(e, {
|
|
@@ -4959,7 +4959,7 @@ async function nm({
|
|
|
4959
4959
|
const r = Yi(e);
|
|
4960
4960
|
return t == null ? r : ta({ value: r, schema: t });
|
|
4961
4961
|
} catch (r) {
|
|
4962
|
-
throw
|
|
4962
|
+
throw Xr.isInstance(r) || Mt.isInstance(r) ? r : new Xr({ text: e, cause: r });
|
|
4963
4963
|
}
|
|
4964
4964
|
}
|
|
4965
4965
|
async function tt({
|
|
@@ -4972,7 +4972,7 @@ async function tt({
|
|
|
4972
4972
|
} catch (r) {
|
|
4973
4973
|
return {
|
|
4974
4974
|
success: !1,
|
|
4975
|
-
error:
|
|
4975
|
+
error: Xr.isInstance(r) ? r : new Xr({ text: e, cause: r }),
|
|
4976
4976
|
rawValue: void 0
|
|
4977
4977
|
};
|
|
4978
4978
|
}
|
|
@@ -4989,7 +4989,7 @@ function am({
|
|
|
4989
4989
|
})
|
|
4990
4990
|
);
|
|
4991
4991
|
}
|
|
4992
|
-
var om = () => globalThis.fetch,
|
|
4992
|
+
var om = () => globalThis.fetch, dn = async ({
|
|
4993
4993
|
url: e,
|
|
4994
4994
|
headers: t,
|
|
4995
4995
|
body: r,
|
|
@@ -5177,9 +5177,9 @@ async function* cm({
|
|
|
5177
5177
|
} else
|
|
5178
5178
|
yield { type: "final", output: await n };
|
|
5179
5179
|
}
|
|
5180
|
-
var
|
|
5180
|
+
var Fn, Mo;
|
|
5181
5181
|
function dm() {
|
|
5182
|
-
if (Mo) return
|
|
5182
|
+
if (Mo) return Fn;
|
|
5183
5183
|
Mo = 1;
|
|
5184
5184
|
var e = Object.defineProperty, t = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, n = Object.prototype.hasOwnProperty, a = (c, p) => {
|
|
5185
5185
|
for (var d in p)
|
|
@@ -5193,17 +5193,17 @@ function dm() {
|
|
|
5193
5193
|
a(i, {
|
|
5194
5194
|
SYMBOL_FOR_REQ_CONTEXT: () => l,
|
|
5195
5195
|
getContext: () => u
|
|
5196
|
-
}),
|
|
5196
|
+
}), Fn = s(i);
|
|
5197
5197
|
const l = Symbol.for("@vercel/request-context");
|
|
5198
5198
|
function u() {
|
|
5199
5199
|
var p, d;
|
|
5200
5200
|
return ((d = (p = globalThis[l]) == null ? void 0 : p.get) == null ? void 0 : d.call(p)) ?? {};
|
|
5201
5201
|
}
|
|
5202
|
-
return
|
|
5202
|
+
return Fn;
|
|
5203
5203
|
}
|
|
5204
|
-
var
|
|
5204
|
+
var zn, Fo;
|
|
5205
5205
|
function pm() {
|
|
5206
|
-
if (Fo) return
|
|
5206
|
+
if (Fo) return zn;
|
|
5207
5207
|
Fo = 1;
|
|
5208
5208
|
var e = Object.defineProperty, t = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, n = Object.prototype.hasOwnProperty, a = (p, d) => {
|
|
5209
5209
|
for (var m in d)
|
|
@@ -5218,7 +5218,7 @@ function pm() {
|
|
|
5218
5218
|
getContext: () => l.getContext,
|
|
5219
5219
|
getVercelOidcToken: () => u,
|
|
5220
5220
|
getVercelOidcTokenSync: () => c
|
|
5221
|
-
}),
|
|
5221
|
+
}), zn = s(i);
|
|
5222
5222
|
var l = dm();
|
|
5223
5223
|
async function u() {
|
|
5224
5224
|
return "";
|
|
@@ -5226,9 +5226,9 @@ function pm() {
|
|
|
5226
5226
|
function c() {
|
|
5227
5227
|
return "";
|
|
5228
5228
|
}
|
|
5229
|
-
return
|
|
5229
|
+
return zn;
|
|
5230
5230
|
}
|
|
5231
|
-
var tl = pm(), fm = "vercel.ai.gateway.error",
|
|
5231
|
+
var tl = pm(), fm = "vercel.ai.gateway.error", Ln = Symbol.for(fm), zo, Lo, Ve = class rl extends (Lo = Error, zo = Ln, Lo) {
|
|
5232
5232
|
constructor({
|
|
5233
5233
|
message: t,
|
|
5234
5234
|
statusCode: r = 500,
|
|
@@ -5245,7 +5245,7 @@ var tl = pm(), fm = "vercel.ai.gateway.error", Un = Symbol.for(fm), zo, Lo, Ve =
|
|
|
5245
5245
|
return rl.hasMarker(t);
|
|
5246
5246
|
}
|
|
5247
5247
|
static hasMarker(t) {
|
|
5248
|
-
return typeof t == "object" && t !== null &&
|
|
5248
|
+
return typeof t == "object" && t !== null && Ln in t && t[Ln] === !0;
|
|
5249
5249
|
}
|
|
5250
5250
|
}, nl = "GatewayAuthenticationError", gm = `vercel.ai.gateway.error.${nl}`, Uo = Symbol.for(gm), Zo, jo, ba = class al extends (jo = Ve, Zo = Uo, jo) {
|
|
5251
5251
|
constructor({
|
|
@@ -5412,7 +5412,7 @@ var Sm = sr(
|
|
|
5412
5412
|
message: x(),
|
|
5413
5413
|
type: x().nullish(),
|
|
5414
5414
|
param: Ft().nullish(),
|
|
5415
|
-
code: De([x(),
|
|
5415
|
+
code: De([x(), on()]).nullish()
|
|
5416
5416
|
})
|
|
5417
5417
|
})
|
|
5418
5418
|
)
|
|
@@ -5558,9 +5558,9 @@ var Am = sr(
|
|
|
5558
5558
|
responseHeaders: o,
|
|
5559
5559
|
value: s,
|
|
5560
5560
|
rawValue: i
|
|
5561
|
-
} = await
|
|
5561
|
+
} = await dn({
|
|
5562
5562
|
url: this.getUrl(),
|
|
5563
|
-
headers:
|
|
5563
|
+
headers: un(
|
|
5564
5564
|
a,
|
|
5565
5565
|
e.headers,
|
|
5566
5566
|
this.getModelConfigHeaders(this.modelId, !1),
|
|
@@ -5588,9 +5588,9 @@ var Am = sr(
|
|
|
5588
5588
|
async doStream(e) {
|
|
5589
5589
|
const { args: t, warnings: r } = await this.getArgs(e), { abortSignal: n } = e, a = await He(this.config.headers());
|
|
5590
5590
|
try {
|
|
5591
|
-
const { value: o, responseHeaders: s } = await
|
|
5591
|
+
const { value: o, responseHeaders: s } = await dn({
|
|
5592
5592
|
url: this.getUrl(),
|
|
5593
|
-
headers:
|
|
5593
|
+
headers: un(
|
|
5594
5594
|
a,
|
|
5595
5595
|
e.headers,
|
|
5596
5596
|
this.getModelConfigHeaders(this.modelId, !0),
|
|
@@ -5684,9 +5684,9 @@ var Am = sr(
|
|
|
5684
5684
|
responseHeaders: s,
|
|
5685
5685
|
value: i,
|
|
5686
5686
|
rawValue: l
|
|
5687
|
-
} = await
|
|
5687
|
+
} = await dn({
|
|
5688
5688
|
url: this.getUrl(),
|
|
5689
|
-
headers:
|
|
5689
|
+
headers: un(
|
|
5690
5690
|
o,
|
|
5691
5691
|
t ?? {},
|
|
5692
5692
|
this.getModelConfigHeaders(),
|
|
@@ -5729,8 +5729,8 @@ var Am = sr(
|
|
|
5729
5729
|
}, Pm = sr(
|
|
5730
5730
|
() => Ut(
|
|
5731
5731
|
j({
|
|
5732
|
-
embeddings: Ge(Ge(
|
|
5733
|
-
usage: j({ tokens:
|
|
5732
|
+
embeddings: Ge(Ge(on())),
|
|
5733
|
+
usage: j({ tokens: on() }).nullish(),
|
|
5734
5734
|
providerMetadata: St(x(), St(x(), Ft())).optional()
|
|
5735
5735
|
})
|
|
5736
5736
|
)
|
|
@@ -5760,9 +5760,9 @@ var Am = sr(
|
|
|
5760
5760
|
responseHeaders: d,
|
|
5761
5761
|
value: m,
|
|
5762
5762
|
rawValue: E
|
|
5763
|
-
} = await
|
|
5763
|
+
} = await dn({
|
|
5764
5764
|
url: this.getUrl(),
|
|
5765
|
-
headers:
|
|
5765
|
+
headers: un(
|
|
5766
5766
|
p,
|
|
5767
5767
|
l ?? {},
|
|
5768
5768
|
this.getModelConfigHeaders(),
|
|
@@ -5818,7 +5818,7 @@ var Am = sr(
|
|
|
5818
5818
|
function is(e) {
|
|
5819
5819
|
return e.type === "file" && e.data instanceof Uint8Array ? {
|
|
5820
5820
|
...e,
|
|
5821
|
-
data:
|
|
5821
|
+
data: cn(e.data)
|
|
5822
5822
|
} : e;
|
|
5823
5823
|
}
|
|
5824
5824
|
var $m = j({
|
|
@@ -5865,13 +5865,13 @@ function Lm(e = {}) {
|
|
|
5865
5865
|
});
|
|
5866
5866
|
}
|
|
5867
5867
|
}, u = () => {
|
|
5868
|
-
const v =
|
|
5868
|
+
const v = Kr({
|
|
5869
5869
|
settingValue: void 0,
|
|
5870
5870
|
environmentVariableName: "VERCEL_DEPLOYMENT_ID"
|
|
5871
|
-
}), b =
|
|
5871
|
+
}), b = Kr({
|
|
5872
5872
|
settingValue: void 0,
|
|
5873
5873
|
environmentVariableName: "VERCEL_ENV"
|
|
5874
|
-
}), P =
|
|
5874
|
+
}), P = Kr({
|
|
5875
5875
|
settingValue: void 0,
|
|
5876
5876
|
environmentVariableName: "VERCEL_REGION"
|
|
5877
5877
|
});
|
|
@@ -5937,7 +5937,7 @@ function Lm(e = {}) {
|
|
|
5937
5937
|
}
|
|
5938
5938
|
var Um = Lm();
|
|
5939
5939
|
async function Zm(e) {
|
|
5940
|
-
const t =
|
|
5940
|
+
const t = Kr({
|
|
5941
5941
|
settingValue: e.apiKey,
|
|
5942
5942
|
environmentVariableName: "AI_GATEWAY_API_KEY"
|
|
5943
5943
|
});
|
|
@@ -6109,7 +6109,7 @@ var Wm = function(e, t) {
|
|
|
6109
6109
|
if (r || arguments.length === 2) for (var n = 0, a = t.length, o; n < a; n++)
|
|
6110
6110
|
(o || !(n in t)) && (o || (o = Array.prototype.slice.call(t, 0, n)), o[n] = t[n]);
|
|
6111
6111
|
return e.concat(o || Array.prototype.slice.call(t));
|
|
6112
|
-
}, Xm = "diag",
|
|
6112
|
+
}, Xm = "diag", pn = (
|
|
6113
6113
|
/** @class */
|
|
6114
6114
|
(function() {
|
|
6115
6115
|
function e() {
|
|
@@ -6228,7 +6228,7 @@ var ey = (
|
|
|
6228
6228
|
if (r || arguments.length === 2) for (var n = 0, a = t.length, o; n < a; n++)
|
|
6229
6229
|
(o || !(n in t)) && (o || (o = Array.prototype.slice.call(t, 0, n)), o[n] = t[n]);
|
|
6230
6230
|
return e.concat(o || Array.prototype.slice.call(t));
|
|
6231
|
-
},
|
|
6231
|
+
}, Un = "context", iy = new ay(), dl = (
|
|
6232
6232
|
/** @class */
|
|
6233
6233
|
(function() {
|
|
6234
6234
|
function e() {
|
|
@@ -6236,7 +6236,7 @@ var ey = (
|
|
|
6236
6236
|
return e.getInstance = function() {
|
|
6237
6237
|
return this._instance || (this._instance = new e()), this._instance;
|
|
6238
6238
|
}, e.prototype.setGlobalContextManager = function(t) {
|
|
6239
|
-
return Ia(
|
|
6239
|
+
return Ia(Un, t, pn.instance());
|
|
6240
6240
|
}, e.prototype.active = function() {
|
|
6241
6241
|
return this._getContextManager().active();
|
|
6242
6242
|
}, e.prototype.with = function(t, r, n) {
|
|
@@ -6246,9 +6246,9 @@ var ey = (
|
|
|
6246
6246
|
}, e.prototype.bind = function(t, r) {
|
|
6247
6247
|
return this._getContextManager().bind(t, r);
|
|
6248
6248
|
}, e.prototype._getContextManager = function() {
|
|
6249
|
-
return Rr(
|
|
6249
|
+
return Rr(Un) || iy;
|
|
6250
6250
|
}, e.prototype.disable = function() {
|
|
6251
|
-
this._getContextManager().disable(), Sa(
|
|
6251
|
+
this._getContextManager().disable(), Sa(Un, pn.instance());
|
|
6252
6252
|
}, e;
|
|
6253
6253
|
})()
|
|
6254
6254
|
), ra;
|
|
@@ -6320,13 +6320,13 @@ function hl(e) {
|
|
|
6320
6320
|
function my(e) {
|
|
6321
6321
|
return new wr(e);
|
|
6322
6322
|
}
|
|
6323
|
-
var
|
|
6323
|
+
var Zn = dl.getInstance(), ml = (
|
|
6324
6324
|
/** @class */
|
|
6325
6325
|
(function() {
|
|
6326
6326
|
function e() {
|
|
6327
6327
|
}
|
|
6328
6328
|
return e.prototype.startSpan = function(t, r, n) {
|
|
6329
|
-
n === void 0 && (n =
|
|
6329
|
+
n === void 0 && (n = Zn.active());
|
|
6330
6330
|
var a = !!(r != null && r.root);
|
|
6331
6331
|
if (a)
|
|
6332
6332
|
return new wr();
|
|
@@ -6336,8 +6336,8 @@ var jn = dl.getInstance(), ml = (
|
|
|
6336
6336
|
var o, s, i;
|
|
6337
6337
|
if (!(arguments.length < 2)) {
|
|
6338
6338
|
arguments.length === 2 ? i = r : arguments.length === 3 ? (o = r, i = n) : (o = r, s = n, i = a);
|
|
6339
|
-
var l = s ??
|
|
6340
|
-
return
|
|
6339
|
+
var l = s ?? Zn.active(), u = this.startSpan(t, o, l), c = Oa(l, u);
|
|
6340
|
+
return Zn.with(c, i, void 0, u);
|
|
6341
6341
|
}
|
|
6342
6342
|
}, e;
|
|
6343
6343
|
})()
|
|
@@ -6390,11 +6390,11 @@ var vy = new ml(), _y = (
|
|
|
6390
6390
|
return (a = this._delegate) === null || a === void 0 ? void 0 : a.getTracer(t, r, n);
|
|
6391
6391
|
}, e;
|
|
6392
6392
|
})()
|
|
6393
|
-
),
|
|
6393
|
+
), fn;
|
|
6394
6394
|
(function(e) {
|
|
6395
6395
|
e[e.UNSET = 0] = "UNSET", e[e.OK = 1] = "OK", e[e.ERROR = 2] = "ERROR";
|
|
6396
|
-
})(
|
|
6397
|
-
var
|
|
6396
|
+
})(fn || (fn = {}));
|
|
6397
|
+
var jn = "trace", Ey = (
|
|
6398
6398
|
/** @class */
|
|
6399
6399
|
(function() {
|
|
6400
6400
|
function e() {
|
|
@@ -6403,14 +6403,14 @@ var Gn = "trace", Ey = (
|
|
|
6403
6403
|
return e.getInstance = function() {
|
|
6404
6404
|
return this._instance || (this._instance = new e()), this._instance;
|
|
6405
6405
|
}, e.prototype.setGlobalTracerProvider = function(t) {
|
|
6406
|
-
var r = Ia(
|
|
6406
|
+
var r = Ia(jn, this._proxyTracerProvider, pn.instance());
|
|
6407
6407
|
return r && this._proxyTracerProvider.setDelegate(t), r;
|
|
6408
6408
|
}, e.prototype.getTracerProvider = function() {
|
|
6409
|
-
return Rr(
|
|
6409
|
+
return Rr(jn) || this._proxyTracerProvider;
|
|
6410
6410
|
}, e.prototype.getTracer = function(t, r) {
|
|
6411
6411
|
return this.getTracerProvider().getTracer(t, r);
|
|
6412
6412
|
}, e.prototype.disable = function() {
|
|
6413
|
-
Sa(
|
|
6413
|
+
Sa(jn, pn.instance()), this._proxyTracerProvider = new us();
|
|
6414
6414
|
}, e;
|
|
6415
6415
|
})()
|
|
6416
6416
|
), by = Ey.getInstance(), Iy = Object.defineProperty, Sy = (e, t) => {
|
|
@@ -6690,7 +6690,7 @@ function Yl(e) {
|
|
|
6690
6690
|
}
|
|
6691
6691
|
};
|
|
6692
6692
|
}
|
|
6693
|
-
function
|
|
6693
|
+
function gn(e) {
|
|
6694
6694
|
if (typeof e != "string") {
|
|
6695
6695
|
if (e.specificationVersion !== "v3" && e.specificationVersion !== "v2") {
|
|
6696
6696
|
const t = e;
|
|
@@ -6824,7 +6824,7 @@ var Wl = "6.0.11", Wy = async ({ url: e }) => {
|
|
|
6824
6824
|
)
|
|
6825
6825
|
});
|
|
6826
6826
|
if (!n.ok)
|
|
6827
|
-
throw new
|
|
6827
|
+
throw new $n({
|
|
6828
6828
|
url: r,
|
|
6829
6829
|
statusCode: n.status,
|
|
6830
6830
|
statusText: n.statusText
|
|
@@ -6834,7 +6834,7 @@ var Wl = "6.0.11", Wy = async ({ url: e }) => {
|
|
|
6834
6834
|
mediaType: (t = n.headers.get("content-type")) != null ? t : void 0
|
|
6835
6835
|
};
|
|
6836
6836
|
} catch (n) {
|
|
6837
|
-
throw
|
|
6837
|
+
throw $n.isInstance(n) ? n : new $n({ url: r, cause: n });
|
|
6838
6838
|
}
|
|
6839
6839
|
}, Ky = (e = Wy) => (t) => Promise.all(
|
|
6840
6840
|
t.map(
|
|
@@ -6857,8 +6857,8 @@ function Xy(e) {
|
|
|
6857
6857
|
}
|
|
6858
6858
|
var Kl = De([
|
|
6859
6859
|
x(),
|
|
6860
|
-
|
|
6861
|
-
|
|
6860
|
+
sn(Uint8Array),
|
|
6861
|
+
sn(ArrayBuffer),
|
|
6862
6862
|
Yg(
|
|
6863
6863
|
// Buffer might not be available in some environments such as CloudFlare:
|
|
6864
6864
|
(e) => {
|
|
@@ -6892,7 +6892,7 @@ function Xl(e) {
|
|
|
6892
6892
|
return { data: e, mediaType: void 0 };
|
|
6893
6893
|
}
|
|
6894
6894
|
function Qy(e) {
|
|
6895
|
-
return typeof e == "string" ? e : e instanceof ArrayBuffer ?
|
|
6895
|
+
return typeof e == "string" ? e : e instanceof ArrayBuffer ? cn(new Uint8Array(e)) : cn(e);
|
|
6896
6896
|
}
|
|
6897
6897
|
function xr(e) {
|
|
6898
6898
|
return e === void 0 ? [] : Array.isArray(e) ? e : [e];
|
|
@@ -7276,7 +7276,7 @@ var kr = Jg(
|
|
|
7276
7276
|
() => De([
|
|
7277
7277
|
_g(),
|
|
7278
7278
|
x(),
|
|
7279
|
-
|
|
7279
|
+
on(),
|
|
7280
7280
|
va(),
|
|
7281
7281
|
St(x(), kr.optional()),
|
|
7282
7282
|
Ge(kr)
|
|
@@ -7290,12 +7290,12 @@ var kr = Jg(
|
|
|
7290
7290
|
providerOptions: ve.optional()
|
|
7291
7291
|
}), av = j({
|
|
7292
7292
|
type: re("image"),
|
|
7293
|
-
image: De([Kl,
|
|
7293
|
+
image: De([Kl, sn(URL)]),
|
|
7294
7294
|
mediaType: x().optional(),
|
|
7295
7295
|
providerOptions: ve.optional()
|
|
7296
7296
|
}), ru = j({
|
|
7297
7297
|
type: re("file"),
|
|
7298
|
-
data: De([Kl,
|
|
7298
|
+
data: De([Kl, sn(URL)]),
|
|
7299
7299
|
filename: x().optional(),
|
|
7300
7300
|
mediaType: x(),
|
|
7301
7301
|
providerOptions: ve.optional()
|
|
@@ -7639,9 +7639,9 @@ function lu(e, t) {
|
|
|
7639
7639
|
message: t.message,
|
|
7640
7640
|
stack: t.stack
|
|
7641
7641
|
}), e.setStatus({
|
|
7642
|
-
code:
|
|
7642
|
+
code: fn.ERROR,
|
|
7643
7643
|
message: t.message
|
|
7644
|
-
})) : e.setStatus({ code:
|
|
7644
|
+
})) : e.setStatus({ code: fn.ERROR });
|
|
7645
7645
|
}
|
|
7646
7646
|
async function st({
|
|
7647
7647
|
telemetry: e,
|
|
@@ -7705,7 +7705,7 @@ function cu(e) {
|
|
|
7705
7705
|
cachedInputTokens: e.inputTokens.cacheRead
|
|
7706
7706
|
};
|
|
7707
7707
|
}
|
|
7708
|
-
function
|
|
7708
|
+
function Gn() {
|
|
7709
7709
|
return {
|
|
7710
7710
|
inputTokens: void 0,
|
|
7711
7711
|
inputTokenDetails: {
|
|
@@ -7765,7 +7765,7 @@ function du(e, t) {
|
|
|
7765
7765
|
function Qe(e, t) {
|
|
7766
7766
|
return e == null && t == null ? void 0 : (e ?? 0) + (t ?? 0);
|
|
7767
7767
|
}
|
|
7768
|
-
function
|
|
7768
|
+
function bn(e, t) {
|
|
7769
7769
|
if (e === void 0 && t === void 0)
|
|
7770
7770
|
return;
|
|
7771
7771
|
if (e === void 0)
|
|
@@ -7779,7 +7779,7 @@ function In(e, t) {
|
|
|
7779
7779
|
if (a === void 0)
|
|
7780
7780
|
continue;
|
|
7781
7781
|
const o = n in e ? e[n] : void 0, s = a !== null && typeof a == "object" && !Array.isArray(a) && !(a instanceof Date) && !(a instanceof RegExp), i = o != null && typeof o == "object" && !Array.isArray(o) && !(o instanceof Date) && !(o instanceof RegExp);
|
|
7782
|
-
s && i ? r[n] =
|
|
7782
|
+
s && i ? r[n] = bn(
|
|
7783
7783
|
o,
|
|
7784
7784
|
a
|
|
7785
7785
|
) : r[n] = a;
|
|
@@ -8040,7 +8040,7 @@ var hu = class {
|
|
|
8040
8040
|
}
|
|
8041
8041
|
// lazy conversion with caching to avoid unnecessary conversion overhead:
|
|
8042
8042
|
get base64() {
|
|
8043
|
-
return this.base64Data == null && (this.base64Data =
|
|
8043
|
+
return this.base64Data == null && (this.base64Data = cn(this.uint8ArrayData)), this.base64Data;
|
|
8044
8044
|
}
|
|
8045
8045
|
// lazy conversion with caching to avoid unnecessary conversion overhead:
|
|
8046
8046
|
get uint8Array() {
|
|
@@ -8069,7 +8069,7 @@ Sy(wv, {
|
|
|
8069
8069
|
choice: () => Iv,
|
|
8070
8070
|
json: () => Sv,
|
|
8071
8071
|
object: () => Ev,
|
|
8072
|
-
text: () =>
|
|
8072
|
+
text: () => hn
|
|
8073
8073
|
});
|
|
8074
8074
|
function Tv(e) {
|
|
8075
8075
|
const t = ["ROOT"];
|
|
@@ -8325,7 +8325,7 @@ async function zr(e) {
|
|
|
8325
8325
|
let t = await tt({ text: e });
|
|
8326
8326
|
return t.success ? { value: t.value, state: "successful-parse" } : (t = await tt({ text: Tv(e) }), t.success ? { value: t.value, state: "repaired-parse" } : { value: void 0, state: "failed-parse" });
|
|
8327
8327
|
}
|
|
8328
|
-
var
|
|
8328
|
+
var hn = () => ({
|
|
8329
8329
|
responseFormat: Promise.resolve({ type: "text" }),
|
|
8330
8330
|
async parseCompleteOutput({ text: e }) {
|
|
8331
8331
|
return e;
|
|
@@ -8898,7 +8898,7 @@ async function sa({
|
|
|
8898
8898
|
onFinish: $,
|
|
8899
8899
|
...z
|
|
8900
8900
|
}) {
|
|
8901
|
-
const le =
|
|
8901
|
+
const le = gn(e), L = xr(u), { maxRetries: ee, retry: te } = fu({
|
|
8902
8902
|
maxRetries: s,
|
|
8903
8903
|
abortSignal: i
|
|
8904
8904
|
}), ce = aa(z), ke = Fr(
|
|
@@ -9016,7 +9016,7 @@ async function sa({
|
|
|
9016
9016
|
stepNumber: oe.length,
|
|
9017
9017
|
messages: U,
|
|
9018
9018
|
experimental_context: D
|
|
9019
|
-
})), X =
|
|
9019
|
+
})), X = gn(
|
|
9020
9020
|
(jt = se == null ? void 0 : se.model) != null ? jt : le
|
|
9021
9021
|
), dt = await Ql({
|
|
9022
9022
|
prompt: {
|
|
@@ -9074,7 +9074,7 @@ async function sa({
|
|
|
9074
9074
|
tracer: Ze,
|
|
9075
9075
|
fn: async (be) => {
|
|
9076
9076
|
var Vt, pt, qt, jr, Gr, cr, dr, ft;
|
|
9077
|
-
const Br =
|
|
9077
|
+
const Br = bn(
|
|
9078
9078
|
m,
|
|
9079
9079
|
se == null ? void 0 : se.providerOptions
|
|
9080
9080
|
), Pe = await X.doGenerate({
|
|
@@ -9302,7 +9302,7 @@ async function sa({
|
|
|
9302
9302
|
experimental_context: D
|
|
9303
9303
|
}));
|
|
9304
9304
|
let N;
|
|
9305
|
-
return V.finishReason === "stop" && (N = await (p ??
|
|
9305
|
+
return V.finishReason === "stop" && (N = await (p ?? hn()).parseCompleteOutput(
|
|
9306
9306
|
{ text: V.text },
|
|
9307
9307
|
{
|
|
9308
9308
|
response: V.response,
|
|
@@ -9523,7 +9523,7 @@ function Ov({
|
|
|
9523
9523
|
}
|
|
9524
9524
|
return [...o, ...r, ...n];
|
|
9525
9525
|
}
|
|
9526
|
-
function
|
|
9526
|
+
function In(e, t) {
|
|
9527
9527
|
const r = new Headers(e ?? {});
|
|
9528
9528
|
for (const [n, a] of Object.entries(t))
|
|
9529
9529
|
r.has(n) || r.set(n, a);
|
|
@@ -9538,7 +9538,7 @@ function Rv({
|
|
|
9538
9538
|
return new Response(n.pipeThrough(new TextEncoderStream()), {
|
|
9539
9539
|
status: e ?? 200,
|
|
9540
9540
|
statusText: t,
|
|
9541
|
-
headers:
|
|
9541
|
+
headers: In(r, {
|
|
9542
9542
|
"content-type": "text/plain; charset=utf-8"
|
|
9543
9543
|
})
|
|
9544
9544
|
});
|
|
@@ -9582,7 +9582,7 @@ function xv({
|
|
|
9582
9582
|
status: t,
|
|
9583
9583
|
statusText: r,
|
|
9584
9584
|
headers: Object.fromEntries(
|
|
9585
|
-
|
|
9585
|
+
In(n, {
|
|
9586
9586
|
"content-type": "text/plain; charset=utf-8"
|
|
9587
9587
|
}).entries()
|
|
9588
9588
|
),
|
|
@@ -9627,7 +9627,7 @@ function kv({
|
|
|
9627
9627
|
return new Response(o.pipeThrough(new TextEncoderStream()), {
|
|
9628
9628
|
status: e,
|
|
9629
9629
|
statusText: t,
|
|
9630
|
-
headers:
|
|
9630
|
+
headers: In(r, Iu)
|
|
9631
9631
|
});
|
|
9632
9632
|
}
|
|
9633
9633
|
function Pv({
|
|
@@ -9734,7 +9734,7 @@ function Fv({
|
|
|
9734
9734
|
}
|
|
9735
9735
|
async function C(g) {
|
|
9736
9736
|
if (g != null) {
|
|
9737
|
-
const D = u.message.metadata != null ?
|
|
9737
|
+
const D = u.message.metadata != null ? bn(u.message.metadata, g) : g;
|
|
9738
9738
|
t != null && await ta({
|
|
9739
9739
|
value: D,
|
|
9740
9740
|
schema: t
|
|
@@ -10087,7 +10087,7 @@ function Lv({
|
|
|
10087
10087
|
status: t,
|
|
10088
10088
|
statusText: r,
|
|
10089
10089
|
headers: Object.fromEntries(
|
|
10090
|
-
|
|
10090
|
+
In(n, Iu).entries()
|
|
10091
10091
|
),
|
|
10092
10092
|
stream: s.pipeThrough(new TextEncoderStream())
|
|
10093
10093
|
});
|
|
@@ -10473,7 +10473,7 @@ function Vv({
|
|
|
10473
10473
|
...ce
|
|
10474
10474
|
}) {
|
|
10475
10475
|
return new Hv({
|
|
10476
|
-
model:
|
|
10476
|
+
model: gn(e),
|
|
10477
10477
|
telemetry: d,
|
|
10478
10478
|
headers: l,
|
|
10479
10479
|
settings: ce,
|
|
@@ -10691,7 +10691,7 @@ var Hv = class {
|
|
|
10691
10691
|
Y._finishReason.reject(V), Y._rawFinishReason.reject(V), Y._totalUsage.reject(V), Y._steps.reject(V);
|
|
10692
10692
|
return;
|
|
10693
10693
|
}
|
|
10694
|
-
const he = Ee ?? "other", oe = Ze ??
|
|
10694
|
+
const he = Ee ?? "other", oe = Ze ?? Gn();
|
|
10695
10695
|
Y._finishReason.resolve(he), Y._rawFinishReason.resolve(gt), Y._totalUsage.resolve(oe), Y._steps.resolve(Me);
|
|
10696
10696
|
const q = Me[Me.length - 1];
|
|
10697
10697
|
await ($ == null ? void 0 : $({
|
|
@@ -10785,7 +10785,7 @@ var Hv = class {
|
|
|
10785
10785
|
}
|
|
10786
10786
|
})
|
|
10787
10787
|
);
|
|
10788
|
-
this.baseStream = ct.pipeThrough(qv(v ??
|
|
10788
|
+
this.baseStream = ct.pipeThrough(qv(v ?? hn())).pipeThrough(Lr);
|
|
10789
10789
|
const { maxRetries: Ur, retry: ur } = fu({
|
|
10790
10790
|
maxRetries: a,
|
|
10791
10791
|
abortSignal: o
|
|
@@ -10922,7 +10922,7 @@ var Hv = class {
|
|
|
10922
10922
|
stepNumber: Me.length,
|
|
10923
10923
|
messages: yt,
|
|
10924
10924
|
experimental_context: L
|
|
10925
|
-
})), be =
|
|
10925
|
+
})), be = gn(
|
|
10926
10926
|
(dt = M == null ? void 0 : M.model) != null ? dt : e
|
|
10927
10927
|
), Vt = await Ql({
|
|
10928
10928
|
prompt: {
|
|
@@ -10937,7 +10937,7 @@ var Hv = class {
|
|
|
10937
10937
|
activeTools: (Ae = M == null ? void 0 : M.activeTools) != null ? Ae : d
|
|
10938
10938
|
});
|
|
10939
10939
|
L = (Te = M == null ? void 0 : M.experimental_context) != null ? Te : L;
|
|
10940
|
-
const jr =
|
|
10940
|
+
const jr = bn(
|
|
10941
10941
|
b,
|
|
10942
10942
|
M == null ? void 0 : M.providerOptions
|
|
10943
10943
|
), {
|
|
@@ -11012,9 +11012,9 @@ var Hv = class {
|
|
|
11012
11012
|
experimental_context: L,
|
|
11013
11013
|
generateId: R
|
|
11014
11014
|
}), vt = dr ?? {}, _t = [], pr = [];
|
|
11015
|
-
let
|
|
11016
|
-
const
|
|
11017
|
-
let Ht = "other",
|
|
11015
|
+
let Sn;
|
|
11016
|
+
const Nn = {};
|
|
11017
|
+
let Ht = "other", An, We = Gn(), On, $a = !0, nt = {
|
|
11018
11018
|
id: R(),
|
|
11019
11019
|
timestamp: D(),
|
|
11020
11020
|
modelId: e.modelId
|
|
@@ -11025,7 +11025,7 @@ var Hv = class {
|
|
|
11025
11025
|
async transform(F, Ce) {
|
|
11026
11026
|
var fr, gr, Vr, Re, Jt;
|
|
11027
11027
|
if (F.type === "stream-start") {
|
|
11028
|
-
|
|
11028
|
+
Sn = F.warnings;
|
|
11029
11029
|
return;
|
|
11030
11030
|
}
|
|
11031
11031
|
if ($a) {
|
|
@@ -11037,11 +11037,11 @@ var Hv = class {
|
|
|
11037
11037
|
}), Ce.enqueue({
|
|
11038
11038
|
type: "start-step",
|
|
11039
11039
|
request: vt,
|
|
11040
|
-
warnings:
|
|
11040
|
+
warnings: Sn ?? []
|
|
11041
11041
|
});
|
|
11042
11042
|
}
|
|
11043
|
-
const
|
|
11044
|
-
switch (
|
|
11043
|
+
const Rn = F.type;
|
|
11044
|
+
switch (Rn) {
|
|
11045
11045
|
case "tool-approval-request":
|
|
11046
11046
|
case "text-start":
|
|
11047
11047
|
case "text-end": {
|
|
@@ -11092,7 +11092,7 @@ var Hv = class {
|
|
|
11092
11092
|
break;
|
|
11093
11093
|
}
|
|
11094
11094
|
case "finish": {
|
|
11095
|
-
We = F.usage, Ht = F.finishReason,
|
|
11095
|
+
We = F.usage, Ht = F.finishReason, An = F.rawFinishReason, On = F.providerMetadata;
|
|
11096
11096
|
const Ie = g() - Br;
|
|
11097
11097
|
ft.addEvent("ai.stream.finish"), ft.setAttributes({
|
|
11098
11098
|
"ai.response.msToFinish": Ie,
|
|
@@ -11109,7 +11109,7 @@ var Hv = class {
|
|
|
11109
11109
|
break;
|
|
11110
11110
|
}
|
|
11111
11111
|
case "tool-input-start": {
|
|
11112
|
-
|
|
11112
|
+
Nn[F.id] = F.toolName;
|
|
11113
11113
|
const Ie = u == null ? void 0 : u[F.toolName];
|
|
11114
11114
|
(Ie == null ? void 0 : Ie.onInputStart) != null && await Ie.onInputStart({
|
|
11115
11115
|
toolCallId: F.id,
|
|
@@ -11124,12 +11124,12 @@ var Hv = class {
|
|
|
11124
11124
|
break;
|
|
11125
11125
|
}
|
|
11126
11126
|
case "tool-input-end": {
|
|
11127
|
-
delete
|
|
11127
|
+
delete Nn[F.id], Ce.enqueue(F);
|
|
11128
11128
|
break;
|
|
11129
11129
|
}
|
|
11130
11130
|
case "tool-input-delta": {
|
|
11131
|
-
const Ie =
|
|
11132
|
-
(
|
|
11131
|
+
const Ie = Nn[F.id], xn = u == null ? void 0 : u[Ie];
|
|
11132
|
+
(xn == null ? void 0 : xn.onInputDelta) != null && await xn.onInputDelta({
|
|
11133
11133
|
inputTextDelta: F.delta,
|
|
11134
11134
|
toolCallId: F.id,
|
|
11135
11135
|
messages: yt,
|
|
@@ -11147,7 +11147,7 @@ var Hv = class {
|
|
|
11147
11147
|
break;
|
|
11148
11148
|
}
|
|
11149
11149
|
default: {
|
|
11150
|
-
const Ie =
|
|
11150
|
+
const Ie = Rn;
|
|
11151
11151
|
throw new Error(`Unknown chunk type: ${Ie}`);
|
|
11152
11152
|
}
|
|
11153
11153
|
}
|
|
@@ -11170,7 +11170,7 @@ var Hv = class {
|
|
|
11170
11170
|
"ai.response.id": nt.id,
|
|
11171
11171
|
"ai.response.model": nt.modelId,
|
|
11172
11172
|
"ai.response.timestamp": nt.timestamp.toISOString(),
|
|
11173
|
-
"ai.response.providerMetadata": JSON.stringify(
|
|
11173
|
+
"ai.response.providerMetadata": JSON.stringify(On),
|
|
11174
11174
|
"ai.usage.inputTokens": We.inputTokens,
|
|
11175
11175
|
"ai.usage.outputTokens": We.outputTokens,
|
|
11176
11176
|
"ai.usage.totalTokens": We.totalTokens,
|
|
@@ -11192,9 +11192,9 @@ var Hv = class {
|
|
|
11192
11192
|
F.enqueue({
|
|
11193
11193
|
type: "finish-step",
|
|
11194
11194
|
finishReason: Ht,
|
|
11195
|
-
rawFinishReason:
|
|
11195
|
+
rawFinishReason: An,
|
|
11196
11196
|
usage: We,
|
|
11197
|
-
providerMetadata:
|
|
11197
|
+
providerMetadata: On,
|
|
11198
11198
|
response: {
|
|
11199
11199
|
...nt,
|
|
11200
11200
|
headers: cr == null ? void 0 : cr.headers
|
|
@@ -11254,7 +11254,7 @@ var Hv = class {
|
|
|
11254
11254
|
F.enqueue({
|
|
11255
11255
|
type: "finish",
|
|
11256
11256
|
finishReason: Ht,
|
|
11257
|
-
rawFinishReason:
|
|
11257
|
+
rawFinishReason: An,
|
|
11258
11258
|
totalUsage: fr
|
|
11259
11259
|
}), Y.closeStream();
|
|
11260
11260
|
}
|
|
@@ -11265,7 +11265,7 @@ var Hv = class {
|
|
|
11265
11265
|
await N({
|
|
11266
11266
|
currentStep: 0,
|
|
11267
11267
|
responseMessages: q,
|
|
11268
|
-
usage:
|
|
11268
|
+
usage: Gn()
|
|
11269
11269
|
});
|
|
11270
11270
|
}
|
|
11271
11271
|
}).catch((ge) => {
|
|
@@ -11406,7 +11406,7 @@ var Hv = class {
|
|
|
11406
11406
|
get output() {
|
|
11407
11407
|
return this.finalStep.then((e) => {
|
|
11408
11408
|
var t;
|
|
11409
|
-
return ((t = this.outputSpecification) != null ? t :
|
|
11409
|
+
return ((t = this.outputSpecification) != null ? t : hn()).parseCompleteOutput(
|
|
11410
11410
|
{ text: e.text },
|
|
11411
11411
|
{
|
|
11412
11412
|
response: e.response,
|
|
@@ -13358,25 +13358,25 @@ class v_ extends B {
|
|
|
13358
13358
|
return !!n;
|
|
13359
13359
|
}
|
|
13360
13360
|
}
|
|
13361
|
-
var Es = {},
|
|
13361
|
+
var Es = {}, Bn, bs;
|
|
13362
13362
|
function __() {
|
|
13363
|
-
if (bs) return
|
|
13363
|
+
if (bs) return Bn;
|
|
13364
13364
|
bs = 1;
|
|
13365
13365
|
const e = {};
|
|
13366
|
-
return process.env.DOTENV_CONFIG_ENCODING != null && (e.encoding = process.env.DOTENV_CONFIG_ENCODING), process.env.DOTENV_CONFIG_PATH != null && (e.path = process.env.DOTENV_CONFIG_PATH), process.env.DOTENV_CONFIG_QUIET != null && (e.quiet = process.env.DOTENV_CONFIG_QUIET), process.env.DOTENV_CONFIG_DEBUG != null && (e.debug = process.env.DOTENV_CONFIG_DEBUG), process.env.DOTENV_CONFIG_OVERRIDE != null && (e.override = process.env.DOTENV_CONFIG_OVERRIDE), process.env.DOTENV_CONFIG_DOTENV_KEY != null && (e.DOTENV_KEY = process.env.DOTENV_CONFIG_DOTENV_KEY),
|
|
13366
|
+
return process.env.DOTENV_CONFIG_ENCODING != null && (e.encoding = process.env.DOTENV_CONFIG_ENCODING), process.env.DOTENV_CONFIG_PATH != null && (e.path = process.env.DOTENV_CONFIG_PATH), process.env.DOTENV_CONFIG_QUIET != null && (e.quiet = process.env.DOTENV_CONFIG_QUIET), process.env.DOTENV_CONFIG_DEBUG != null && (e.debug = process.env.DOTENV_CONFIG_DEBUG), process.env.DOTENV_CONFIG_OVERRIDE != null && (e.override = process.env.DOTENV_CONFIG_OVERRIDE), process.env.DOTENV_CONFIG_DOTENV_KEY != null && (e.DOTENV_KEY = process.env.DOTENV_CONFIG_DOTENV_KEY), Bn = e, Bn;
|
|
13367
13367
|
}
|
|
13368
|
-
var
|
|
13368
|
+
var Vn, Is;
|
|
13369
13369
|
function w_() {
|
|
13370
|
-
if (Is) return
|
|
13370
|
+
if (Is) return Vn;
|
|
13371
13371
|
Is = 1;
|
|
13372
13372
|
const e = /^dotenv_config_(encoding|path|quiet|debug|override|DOTENV_KEY)=(.+)$/;
|
|
13373
|
-
return
|
|
13373
|
+
return Vn = function(r) {
|
|
13374
13374
|
const n = r.reduce(function(a, o) {
|
|
13375
13375
|
const s = o.match(e);
|
|
13376
13376
|
return s && (a[s[1]] = s[2]), a;
|
|
13377
13377
|
}, {});
|
|
13378
13378
|
return "quiet" in n || (n.quiet = "true"), n;
|
|
13379
|
-
},
|
|
13379
|
+
}, Vn;
|
|
13380
13380
|
}
|
|
13381
13381
|
var Ss;
|
|
13382
13382
|
function T_() {
|
|
@@ -13562,7 +13562,7 @@ class S_ extends B {
|
|
|
13562
13562
|
})) ?? [] : [];
|
|
13563
13563
|
}
|
|
13564
13564
|
const i = Qu(s);
|
|
13565
|
-
return !i || !
|
|
13565
|
+
return !i || !qn(i.dataProvider) ? {} : await i.dataProvider({
|
|
13566
13566
|
block: n,
|
|
13567
13567
|
pageProps: a,
|
|
13568
13568
|
lang: o,
|
|
@@ -14140,9 +14140,8 @@ class z_ extends B {
|
|
|
14140
14140
|
dynamicSlug: r.dynamicSlug ?? "",
|
|
14141
14141
|
hasSlug: r.hasSlug ?? !0,
|
|
14142
14142
|
name: typeof r.name == "function" ? await r.name() : r.name,
|
|
14143
|
-
...
|
|
14144
|
-
...
|
|
14145
|
-
...Kr(r.defaultJSONLD) ? { defaultJSONLD: r.defaultJSONLD() } : {}
|
|
14143
|
+
...qn(r.defaultSeo) ? { defaultSeo: r.defaultSeo() } : {},
|
|
14144
|
+
...qn(r.defaultJSONLD) ? { defaultJSONLD: r.defaultJSONLD() } : {}
|
|
14146
14145
|
}))
|
|
14147
14146
|
);
|
|
14148
14147
|
} catch (t) {
|
|
@@ -14777,7 +14776,7 @@ class H_ extends B {
|
|
|
14777
14776
|
blocks: i,
|
|
14778
14777
|
type: "draft",
|
|
14779
14778
|
createdAt: "now()",
|
|
14780
|
-
...
|
|
14779
|
+
...yn(o, ["name", "slug", "pageType", "lang", "app", "currentEditor"])
|
|
14781
14780
|
};
|
|
14782
14781
|
await I.insert(Ne).values(l);
|
|
14783
14782
|
}
|
|
@@ -15131,7 +15130,7 @@ class X_ {
|
|
|
15131
15130
|
lastSaved: ca`now()`
|
|
15132
15131
|
};
|
|
15133
15132
|
if (i.id === n) {
|
|
15134
|
-
const c =
|
|
15133
|
+
const c = yn(r, [
|
|
15135
15134
|
"name",
|
|
15136
15135
|
"seo",
|
|
15137
15136
|
"blocks",
|
|
@@ -15256,7 +15255,7 @@ class Q_ extends B {
|
|
|
15256
15255
|
* Extract only the allowed fields for page updates
|
|
15257
15256
|
*/
|
|
15258
15257
|
extractAllowedPageFields(r) {
|
|
15259
|
-
return
|
|
15258
|
+
return yn(r, [
|
|
15260
15259
|
"slug",
|
|
15261
15260
|
"name",
|
|
15262
15261
|
"seo",
|
|
@@ -15392,7 +15391,7 @@ class tw extends B {
|
|
|
15392
15391
|
if (await this.verifyAccess(), !this.context)
|
|
15393
15392
|
throw ue("CONTEXT_NOT_SET", new Error("CONTEXT_NOT_SET"));
|
|
15394
15393
|
const { appId: r } = this.context, a = {
|
|
15395
|
-
...
|
|
15394
|
+
...yn(t.settings, ["theme", "designTokens"]),
|
|
15396
15395
|
changes: ["Updated"]
|
|
15397
15396
|
}, { error: o } = await S(() => I.update(Oe).set(a).where(T(Oe.id, r)));
|
|
15398
15397
|
if (o)
|
|
@@ -15527,8 +15526,8 @@ const Pt = class Pt {
|
|
|
15527
15526
|
}
|
|
15528
15527
|
};
|
|
15529
15528
|
Se(Pt, "instance");
|
|
15530
|
-
let
|
|
15531
|
-
const Au = (e) =>
|
|
15529
|
+
let mn = Pt;
|
|
15530
|
+
const Au = (e) => mn.getInstance().getAction(e), ww = mn.getInstance();
|
|
15532
15531
|
export {
|
|
15533
15532
|
w as A,
|
|
15534
15533
|
B as C,
|