gci-chatbot-ai 1.0.24 → 1.0.25

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.
@@ -1,4 +1,4 @@
1
- import { ref as ee, h as rt, defineComponent as Bn, watch as Gn, nextTick as Wn, onUnmounted as Hn, openBlock as G, createElementBlock as W, Fragment as Me, createCommentVNode as Ee, createElementVNode as z, normalizeClass as Xn, createVNode as Ce, unref as ke, toDisplayString as He, renderList as bt, withDirectives as At, vModelText as qn, Transition as zt, withCtx as wt, vShow as Kn } from "vue";
1
+ import { ref as ee, h as rt, defineComponent as Bn, watch as Gn, nextTick as Wn, onMounted as Hn, onUnmounted as Xn, openBlock as B, createElementBlock as G, Fragment as Me, createCommentVNode as _e, createElementVNode as j, createVNode as Ce, unref as ke, toDisplayString as He, renderList as bt, withDirectives as At, vModelText as qn, Transition as zt, withCtx as wt, vShow as Kn } from "vue";
2
2
  const eo = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIwIiBoZWlnaHQ9IjMwIiB2aWV3Qm94PSIwIDAgMTIwIDMwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiPg0KICA8Y2lyY2xlIGN4PSIxNSIgY3k9IjE1IiByPSI2IiBmaWxsPSIjNUI4Q0ZGIj4NCiAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJvcGFjaXR5IiB2YWx1ZXM9IjAuMzsxOzAuMyIgZHVyPSIxLjRzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgYmVnaW49IjBzIj48L2FuaW1hdGU+DQogIDwvY2lyY2xlPg0KDQogIDxjaXJjbGUgY3g9IjQ1IiBjeT0iMTUiIHI9IjYiIGZpbGw9IiM1QjhDRkYiPg0KICAgIDxhbmltYXRlIGF0dHJpYnV0ZU5hbWU9Im9wYWNpdHkiIHZhbHVlcz0iMC4zOzE7MC4zIiBkdXI9IjEuNHMiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBiZWdpbj0iMC4ycyI+PC9hbmltYXRlPg0KICA8L2NpcmNsZT4NCg0KICA8Y2lyY2xlIGN4PSI3NSIgY3k9IjE1IiByPSI2IiBmaWxsPSIjNUI4Q0ZGIj4NCiAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJvcGFjaXR5IiB2YWx1ZXM9IjAuMzsxOzAuMyIgZHVyPSIxLjRzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgYmVnaW49IjAuNHMiPjwvYW5pbWF0ZT4NCiAgPC9jaXJjbGU+DQo8L3N2Zz4NCg==", to = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTUiIHZpZXdCb3g9IjAgMCAxNyAxNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTMuMTg4NSA4LjgyNjE3TDEzLjExNDggOS4xMjQ5QzEzLjAxODEgOS41MTY2MSAxMi45Njk4IDkuNzEyNDcgMTIuODc0NiA5Ljg1NTM0QzEyLjc3OTMgOS45OTgyMSAxMi42NDg4IDEwLjA3MDcgMTIuMzg3NiAxMC4yMTU2TDEyLjE4ODUgMTAuMzI2MkwxMi4zODc2IDEwLjQzNjdDMTIuNjQ4OCAxMC41ODE3IDEyLjc3OTMgMTAuNjU0MSAxMi44NzQ2IDEwLjc5N0MxMi45Njk4IDEwLjkzOTkgMTMuMDE4MSAxMS4xMzU3IDEzLjExNDggMTEuNTI3NEwxMy4xODg1IDExLjgyNjJMMTMuMjYyMiAxMS41Mjc0QzEzLjM1ODggMTEuMTM1NyAxMy40MDcxIDEwLjkzOTkgMTMuNTAyNCAxMC43OTdDMTMuNTk3NiAxMC42NTQxIDEzLjcyODIgMTAuNTgxNyAxMy45ODkzIDEwLjQzNjdMMTQuMTg4NSAxMC4zMjYyTDEzLjk4OTMgMTAuMjE1NkMxMy43MjgyIDEwLjA3MDcgMTMuNTk3NiA5Ljk5ODIxIDEzLjUwMjQgOS44NTUzNEMxMy40MDcxIDkuNzEyNDcgMTMuMzU4OCA5LjUxNjYxIDEzLjI2MjIgOS4xMjQ5TDEzLjE4ODUgOC44MjYxN1oiIGZpbGw9IiNENUJERkYiLz4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTMuMTg4NSA4LjgyNjE3TDEzLjExNDggOS4xMjQ5QzEzLjAxODEgOS41MTY2MSAxMi45Njk4IDkuNzEyNDcgMTIuODc0NiA5Ljg1NTM0QzEyLjc3OTMgOS45OTgyMSAxMi42NDg4IDEwLjA3MDcgMTIuMzg3NiAxMC4yMTU2TDEyLjE4ODUgMTAuMzI2MkwxMi4zODc2IDEwLjQzNjdDMTIuNjQ4OCAxMC41ODE3IDEyLjc3OTMgMTAuNjU0MSAxMi44NzQ2IDEwLjc5N0MxMi45Njk4IDEwLjkzOTkgMTMuMDE4MSAxMS4xMzU3IDEzLjExNDggMTEuNTI3NEwxMy4xODg1IDExLjgyNjJMMTMuMjYyMiAxMS41Mjc0QzEzLjM1ODggMTEuMTM1NyAxMy40MDcxIDEwLjkzOTkgMTMuNTAyNCAxMC43OTdDMTMuNTk3NiAxMC42NTQxIDEzLjcyODIgMTAuNTgxNyAxMy45ODkzIDEwLjQzNjdMMTQuMTg4NSAxMC4zMjYyTDEzLjk4OTMgMTAuMjE1NkMxMy43MjgyIDEwLjA3MDcgMTMuNTk3NiA5Ljk5ODIxIDEzLjUwMjQgOS44NTUzNEMxMy40MDcxIDkuNzEyNDcgMTMuMzU4OCA5LjUxNjYxIDEzLjI2MjIgOS4xMjQ5TDEzLjE4ODUgOC44MjYxN1oiIGZpbGw9InVybCgjcGFpbnQwX2xpbmVhcl8yNzYwXzIyMDE4KSIvPgogICAgICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik00LjE4ODQ4IDIuODI2MTdMNC4wNDEwOSAzLjIyNDQ3QzMuODQ3ODMgMy43NDY3NCAzLjc1MTIgNC4wMDc4OSAzLjU2MDcgNC4xOTg0QzMuMzcwMiA0LjM4ODg5IDMuMTA5MDYgNC40ODU1MSAyLjU4Njc4IDQuNjc4OEwyLjE4ODQ4IDQuODI2MTdMMi41ODY3OCA0Ljk3MzU0QzMuMTA5MDYgNS4xNjY4MyAzLjM3MDIgNS4yNjM0NiAzLjU2MDcgNS40NTM5NEMzLjc1MTIgNS42NDQ0NiAzLjg0NzgzIDUuOTA1NiA0LjA0MTA5IDYuNDI3ODZMNC4xODg0OCA2LjgyNjE3TDQuMzM1ODUgNi40Mjc4NkM0LjUyOTEzIDUuOTA1NiA0LjYyNTc2IDUuNjQ0NDYgNC44MTYyNSA1LjQ1Mzk0QzUuMDA2NzYgNS4yNjM0NiA1LjI2NzkxIDUuMTY2ODMgNS43OTAxNiA0Ljk3MzU0TDYuMTg4NDggNC44MjYxN0w1Ljc5MDE2IDQuNjc4OEM1LjI2NzkxIDQuNDg1NTEgNS4wMDY3NiA0LjM4ODg5IDQuODE2MjUgNC4xOTg0QzQuNjI1NzYgNC4wMDc4OSA0LjUyOTEzIDMuNzQ2NzQgNC4zMzU4NSAzLjIyNDQ3TDQuMTg4NDggMi44MjYxN1oiIGZpbGw9IiNENUJERkYiLz4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNNC4xODg0OCAyLjgyNjE3TDQuMDQxMDkgMy4yMjQ0N0MzLjg0NzgzIDMuNzQ2NzQgMy43NTEyIDQuMDA3ODkgMy41NjA3IDQuMTk4NEMzLjM3MDIgNC4zODg4OSAzLjEwOTA2IDQuNDg1NTEgMi41ODY3OCA0LjY3ODhMMi4xODg0OCA0LjgyNjE3TDIuNTg2NzggNC45NzM1NEMzLjEwOTA2IDUuMTY2ODMgMy4zNzAyIDUuMjYzNDYgMy41NjA3IDUuNDUzOTRDMy43NTEyIDUuNjQ0NDYgMy44NDc4MyA1LjkwNTYgNC4wNDEwOSA2LjQyNzg2TDQuMTg4NDggNi44MjYxN0w0LjMzNTg1IDYuNDI3ODZDNC41MjkxMyA1LjkwNTYgNC42MjU3NiA1LjY0NDQ2IDQuODE2MjUgNS40NTM5NEM1LjAwNjc2IDUuMjYzNDYgNS4yNjc5MSA1LjE2NjgzIDUuNzkwMTYgNC45NzM1NEw2LjE4ODQ4IDQuODI2MTdMNS43OTAxNiA0LjY3ODhDNS4yNjc5MSA0LjQ4NTUxIDUuMDA2NzYgNC4zODg4OSA0LjgxNjI1IDQuMTk4NEM0LjYyNTc2IDQuMDA3ODkgNC41MjkxMyAzLjc0Njc0IDQuMzM1ODUgMy4yMjQ0N0w0LjE4ODQ4IDIuODI2MTdaIiBmaWxsPSJ1cmwoI3BhaW50MV9saW5lYXJfMjc2MF8yMjAxOCkiLz4KICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNOC4xODg0OCAyLjgyNjE3TDcuODIwMDEgMy44MjE5MkM3LjMzNjg2IDUuMTI3NiA3LjA5NTI4IDUuNzgwNDYgNi42MTkwMyA2LjI1Njc0QzYuMTQyNzggNi43MzI5NiA1LjQ4OTkzIDYuOTc0NTMgNC4xODQyMyA3LjQ1Nzc0TDMuMTg4NDggNy44MjYxN0w0LjE4NDIzIDguMTk0NkM1LjQ4OTkzIDguNjc3ODIgNi4xNDI3OCA4LjkxOTM5IDYuNjE5MDMgOS4zOTU2QzcuMDk1MjggOS44NzE4OSA3LjMzNjg2IDEwLjUyNDcgNy44MjAwMSAxMS44MzA0TDguMTg4NDggMTIuODI2Mkw4LjU1NjkxIDExLjgzMDRDOS4wNDAxMiAxMC41MjQ3IDkuMjgxNjkgOS44NzE4OSA5Ljc1NzkxIDkuMzk1NkMxMC4yMzQyIDguOTE5MzkgMTAuODg3IDguNjc3ODIgMTIuMTkyNyA4LjE5NDZMMTMuMTg4NSA3LjgyNjE3TDEyLjE5MjcgNy40NTc3NEMxMC44ODcgNi45NzQ1MyAxMC4yMzQyIDYuNzMyOTYgOS43NTc5MSA2LjI1Njc0QzkuMjgxNjkgNS43ODA0NiA5LjA0MDEyIDUuMTI3NiA4LjU1NjkxIDMuODIxOTJMOC4xODg0OCAyLjgyNjE3WiIgZmlsbD0iI0Q1QkRGRiIvPgogICAgICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik04LjE4ODQ4IDIuODI2MTdMNy44MjAwMSAzLjgyMTkyQzcuMzM2ODYgNS4xMjc2IDcuMDk1MjggNS43ODA0NiA2LjYxOTAzIDYuMjU2NzRDNi4xNDI3OCA2LjczMjk2IDUuNDg5OTMgNi45NzQ1MyA0LjE4NDIzIDcuNDU3NzRMMy4xODg0OCA3LjgyNjE3TDQuMTg0MjMgOC4xOTQ2QzUuNDg5OTMgOC42Nzc4MiA2LjE0Mjc4IDguOTE5MzkgNi42MTkwMyA5LjM5NTZDNy4wOTUyOCA5Ljg3MTg5IDcuMzM2ODYgMTAuNTI0NyA3LjgyMDAxIDExLjgzMDRMOC4xODg0OCAxMi44MjYyTDguNTU2OTEgMTEuODMwNEM5LjA0MDEyIDEwLjUyNDcgOS4yODE2OSA5Ljg3MTg5IDkuNzU3OTEgOS4zOTU2QzEwLjIzNDIgOC45MTkzOSAxMC44ODcgOC42Nzc4MiAxMi4xOTI3IDguMTk0NkwxMy4xODg1IDcuODI2MTdMMTIuMTkyNyA3LjQ1Nzc0QzEwLjg4NyA2Ljk3NDUzIDEwLjIzNDIgNi43MzI5NiA5Ljc1NzkxIDYuMjU2NzRDOS4yODE2OSA1Ljc4MDQ2IDkuMDQwMTIgNS4xMjc2IDguNTU2OTEgMy44MjE5Mkw4LjE4ODQ4IDIuODI2MTdaIiBmaWxsPSJ1cmwoI3BhaW50Ml9saW5lYXJfMjc2MF8yMjAxOCkiLz4KICAgICAgICAgICAgICAgICAgICA8ZGVmcz4KICAgICAgICAgICAgICAgICAgICAgIDxsaW5lYXJHcmFkaWVudCBpZD0icGFpbnQwX2xpbmVhcl8yNzYwXzIyMDE4IiB4MT0iMTMuMjEzOSIgeTE9IjguODI2MTciIHgyPSIxMy4xMzc1IiB5Mj0iMTEuODI1IiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+CiAgICAgICAgICAgICAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiNGNjZCRkUiLz4KICAgICAgICAgICAgICAgICAgICAgICAgPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjODc4M0ZGIi8+CiAgICAgICAgICAgICAgICAgICAgICA8L2xpbmVhckdyYWRpZW50PgogICAgICAgICAgICAgICAgICAgICAgPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDFfbGluZWFyXzI3NjBfMjIwMTgiIHgxPSI0LjIzOTMyIiB5MT0iMi44MjYxNyIgeDI9IjQuMTcxMzUiIHkyPSI2LjgyNjEiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KICAgICAgICAgICAgICAgICAgICAgICAgPHN0b3Agc3RvcC1jb2xvcj0iI0Y2NkJGRSIvPgogICAgICAgICAgICAgICAgICAgICAgICA8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiM4NzgzRkYiLz4KICAgICAgICAgICAgICAgICAgICAgIDwvbGluZWFyR3JhZGllbnQ+CiAgICAgICAgICAgICAgICAgICAgICA8bGluZWFyR3JhZGllbnQgaWQ9InBhaW50Ml9saW5lYXJfMjc2MF8yMjAxOCIgeDE9IjguMzE1NTgiIHkxPSIyLjgyNjE3IiB4Mj0iOC4xNDU2NiIgeTI9IjEyLjgyNiIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgogICAgICAgICAgICAgICAgICAgICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjRjY2QkZFIi8+CiAgICAgICAgICAgICAgICAgICAgICAgIDxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzg3ODNGRiIvPgogICAgICAgICAgICAgICAgICAgICAgPC9saW5lYXJHcmFkaWVudD4KICAgICAgICAgICAgICAgICAgICA8L2RlZnM+CiAgICAgICAgICAgICAgICAgIDwvc3ZnPg==", ro = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjAiIGhlaWdodD0iNjAiIHZpZXdCb3g9IjAgMCA2MCA2MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgICAgICAgICAgPHBhdGggZD0iTTQ3LjQ1MDIgMTEuODM2Mkw1MC40MTYxIDkuNTQzNDJDNTAuOTA2IDkuMTY0NjggNTEuMTkyOSA4LjU4MDM1IDUxLjE5MjkgNy45NjExVjAuOTg2MzI4IiBzdHJva2U9IiNFMEMxRUEiIHN0cm9rZS13aWR0aD0iMiIvPgogICAgICAgICAgICA8ZWxsaXBzZSBjeD0iNTAuODQyNSIgY3k9IjMuMTk0NDQiIHJ4PSIzLjE1Nzg5IiByeT0iMy4xOTQ0NCIgZmlsbD0iIzk5NzBFMiIvPgogICAgICAgICAgICA8cGF0aCBkPSJNMTIuMjIyNyAxMS44MzYyTDkuMjU2NzUgOS41NDM0MkM4Ljc2NjgyIDkuMTY0NjggOC40Nzk5NyA4LjU4MDM1IDguNDc5OTcgNy45NjExVjAuOTg2MzI4IiBzdHJva2U9IiNFMEMxRUEiIHN0cm9rZS13aWR0aD0iMiIvPgogICAgICAgICAgICA8ZWxsaXBzZSBjeD0iMy4xNTc4OSIgY3k9IjMuMTk0NDQiIHJ4PSIzLjE1Nzg5IiByeT0iMy4xOTQ0NCIgdHJhbnNmb3JtPSJtYXRyaXgoLTEgMCAwIDEgMTIuMzE2NCAwKSIgZmlsbD0iIzk5NzBFMiIvPgogICAgICAgICAgICA8cGF0aCBkPSJNNTQgMjUuNDUzM0M1NCAzOS4yNTMzIDQzLjAwODYgNDYgMjkuODQ3MyA0NkMxNi42ODYgNDYgNi4wMDY5MSAzOS44NjY3IDYuMDA2OTEgMjUuNDUzM0M1LjY4NDQ2IDEwLjQyNjcgMTYuNjg2IDAgMjkuODQ3MyAwQzQzLjAwODYgMCA1NCAxMC40MjY3IDU0IDI1LjQ1MzNaIiBmaWxsPSJ1cmwoI3BhaW50MF9saW5lYXJfMjcyMF8xMTc5OSkiLz4KICAgICAgICAgICAgPHBhdGggZD0iTTExLjA1MjcgMjIuNDAyNkMxMS4wNTI3IDE2LjM4MTIgMTUuOTM0IDExLjUgMjEuOTU1MyAxMS41SDM3Ljk5NjJDNDQuMDQ0NCAxMS41IDQ4Ljk0NzUgMTYuNDAzMSA0OC45NDc1IDIyLjQ1MTNDNDguOTQ3NSAyNy4wMSA0Ni4xMjM1IDMxLjA5MTkgNDEuODU3NiAzMi42OTkyTDM4Ljg1MDcgMzMuODMyMkMzMy4zMzE1IDM1LjkxMTkgMjcuMjQ5MyAzNS45NDI4IDIxLjcwOTIgMzMuOTE5NkwxOC4yMTUyIDMyLjY0MzZDMTMuOTE0IDMxLjA3MjcgMTEuMDUyNyAyNi45ODE2IDExLjA1MjcgMjIuNDAyNloiIGZpbGw9IndoaXRlIi8+CiAgICAgICAgICAgIDxwYXRoIGQ9Ik0yMC42MDU1IDE2LjU4NEMxOC4xMjAzIDE2LjU4NCAxNi4xMDU1IDE4LjU5ODggMTYuMTA1NSAyMS4wODRDMTYuMTA1NyAyMy41NjkgMTguMTIwNCAyNS41ODMgMjAuNjA1NSAyNS41ODNDMjMuMDkwNSAyNS41ODMgMjUuMTA1MiAyMy41NjkgMjUuMTA1NSAyMS4wODRDMjUuMTA1NSAxOC41OTg4IDIzLjA5MDcgMTYuNTg0IDIwLjYwNTUgMTYuNTg0Wk0yMi4zNDQ3IDE3LjY1NzJDMjMuMjU5NyAxNy42NTcyIDI0LjAwMiAxOC4zNzgzIDI0LjAwMiAxOS4yNjc2QzI0LjAwMTkgMjAuMTU2OCAyMy4yNTk3IDIwLjg3NzkgMjIuMzQ0NyAyMC44Nzc5QzIxLjQzIDIwLjg3NzcgMjAuNjg4NiAyMC4xNTY3IDIwLjY4ODUgMTkuMjY3NkMyMC42ODg1IDE4LjM3ODQgMjEuNDI5OSAxNy42NTc1IDIyLjM0NDcgMTcuNjU3MloiIGZpbGw9IiMwMDJCNTMiLz4KICAgICAgICAgICAgPHBhdGggZD0iTTM5LjM5MzYgMTYuNTg0QzM2LjkwODQgMTYuNTg0IDM0Ljg5MzYgMTguNTk4OCAzNC44OTM2IDIxLjA4NEMzNC44OTM4IDIzLjU2OSAzNi45MDg1IDI1LjU4MyAzOS4zOTM2IDI1LjU4M0M0MS44Nzg2IDI1LjU4MyA0My44OTMzIDIzLjU2OSA0My44OTM2IDIxLjA4NEM0My44OTM2IDE4LjU5ODggNDEuODc4OCAxNi41ODQgMzkuMzkzNiAxNi41ODRaTTQxLjEzMTggMTcuNjU3MkM0Mi4wNDY5IDE3LjY1NzIgNDIuNzg5MSAxOC4zNzgzIDQyLjc4OTEgMTkuMjY3NkM0Mi43ODg5IDIwLjE1NjggNDIuMDQ2OCAyMC44Nzc5IDQxLjEzMTggMjAuODc3OUM0MC4yMTcxIDIwLjg3NzcgMzkuNDc1NyAyMC4xNTY3IDM5LjQ3NTYgMTkuMjY3NkMzOS40NzU2IDE4LjM3ODQgNDAuMjE3IDE3LjY1NzUgNDEuMTMxOCAxNy42NTcyWiIgZmlsbD0iIzAwMkI1MyIvPgogICAgICAgICAgICA8cGF0aCBkPSJNMjYuMjEwOSAyOS4zODg3VjI5LjM4ODdDMjguNjQyNSAzMC40ODc2IDMxLjQyMSAzMC41MjgyIDMzLjg4MzcgMjkuNTAwOUwzNC4xNTI2IDI5LjM4ODciIHN0cm9rZT0iIzAwMkI1MyIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiLz4KICAgICAgICAgICAgPGVsbGlwc2UgY3g9IjE0Ljg0MjciIGN5PSIyOC4xMTAyIiByeD0iNS4wNTI2MyIgcnk9IjIuNTU1NTYiIGZpbGw9IiNGRkJFREUiLz4KICAgICAgICAgICAgPGVsbGlwc2UgY3g9IjQ1LjE1ODEiIGN5PSIyOC4xMTAyIiByeD0iNS4wNTI2MyIgcnk9IjIuNTU1NTYiIGZpbGw9IiNGRkJFREUiLz4KICAgICAgICAgICAgPHBhdGggZD0iTTMwLjQ2NzIgMzYuNDk0MUwzMC4yMjU5IDM3LjE4MTdDMjkuOTA5NSAzOC4wODMyIDI5Ljc1MTIgMzguNTMzOSAyOS40MzkzIDM4Ljg2MjhDMjkuMTI3NCAzOS4xOTE2IDI4LjY5OTggMzkuMzU4NCAyNy44NDQ2IDM5LjY5MkwyNy4xOTI0IDM5Ljk0NjRMMjcuODQ0NiA0MC4yMDA4QzI4LjY5OTggNDAuNTM0NCAyOS4xMjc0IDQwLjcwMTIgMjkuNDM5MyA0MS4wM0MyOS43NTEyIDQxLjM1ODggMjkuOTA5NSA0MS44MDk2IDMwLjIyNTkgNDIuNzExMUwzMC40NjcyIDQzLjM5ODZMMzAuNzA4NSA0Mi43MTExQzMxLjAyNSA0MS44MDk2IDMxLjE4MzMgNDEuMzU4OCAzMS40OTUyIDQxLjAzQzMxLjgwNzEgNDAuNzAxMiAzMi4yMzQ3IDQwLjUzNDQgMzMuMDg5OSA0MC4yMDA4TDMzLjc0MjEgMzkuOTQ2NEwzMy4wODk5IDM5LjY5MkMzMi4yMzQ3IDM5LjM1ODQgMzEuODA3MSAzOS4xOTE2IDMxLjQ5NTIgMzguODYyOEMzMS4xODMzIDM4LjUzMzkgMzEuMDI1IDM4LjA4MzIgMzAuNzA4NSAzNy4xODE3TDMwLjQ2NzIgMzYuNDk0MVoiIGZpbGw9IiMzNTAwOEYiLz4KICAgICAgICAgICAgPGcgZmlsdGVyPSJ1cmwoI2ZpbHRlcjBfZl8yNzIwXzExNzk5KSI+CiAgICAgICAgICAgICAgPHBhdGggZD0iTTU0IDUwLjI2OTVDNTQgNTIuMjAyNSA0My41MzA0IDUzLjc2OTUgMzAuNjE1NCA1My43Njk1QzE3LjcwMDQgNTMuNzY5NSA2IDUyLjIwMjUgNiA1MC4yNjk1QzYgNDguMzM2NSAxNy43MDA0IDQ2Ljc2OTUgMzAuNjE1NCA0Ni43Njk1QzQzLjUzMDQgNDYuNzY5NSA1NCA0OC4zMzY1IDU0IDUwLjI2OTVaIiBmaWxsPSIjQzlDOUM5IiBmaWxsLW9wYWNpdHk9IjAuNCIvPgogICAgICAgICAgICA8L2c+CiAgICAgICAgICAgIDxkZWZzPgogICAgICAgICAgICAgIDxmaWx0ZXIgaWQ9ImZpbHRlcjBfZl8yNzIwXzExNzk5IiB4PSIwIiB5PSI0MC43Njk1IiB3aWR0aD0iNjAiIGhlaWdodD0iMTkiIGZpbHRlclVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgY29sb3ItaW50ZXJwb2xhdGlvbi1maWx0ZXJzPSJzUkdCIj4KICAgICAgICAgICAgICAgIDxmZUZsb29kIGZsb29kLW9wYWNpdHk9IjAiIHJlc3VsdD0iQmFja2dyb3VuZEltYWdlRml4Ii8+CiAgICAgICAgICAgICAgICA8ZmVCbGVuZCBtb2RlPSJub3JtYWwiIGluPSJTb3VyY2VHcmFwaGljIiBpbjI9IkJhY2tncm91bmRJbWFnZUZpeCIgcmVzdWx0PSJzaGFwZSIvPgogICAgICAgICAgICAgICAgPGZlR2F1c3NpYW5CbHVyIHN0ZERldmlhdGlvbj0iMyIgcmVzdWx0PSJlZmZlY3QxX2ZvcmVncm91bmRCbHVyXzI3MjBfMTE3OTkiLz4KICAgICAgICAgICAgICA8L2ZpbHRlcj4KICAgICAgICAgICAgICA8bGluZWFyR3JhZGllbnQgaWQ9InBhaW50MF9saW5lYXJfMjcyMF8xMTc5OSIgeDE9IjMwLjYxMDEiIHkxPSIzLjE2MTc1ZS0wOCIgeDI9IjI5Ljg2MSIgeTI9IjQ2LjAwMDMiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KICAgICAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiNGREQxRkYiLz4KICAgICAgICAgICAgICAgIDxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzVFODRGRiIvPgogICAgICAgICAgICAgIDwvbGluZWFyR3JhZGllbnQ+CiAgICAgICAgICAgIDwvZGVmcz4KICAgICAgICAgIDwvc3ZnPg==";
3
3
  var yr = "vercel.ai.error", no = Symbol.for(yr), Dt, jt, K = class vr extends (jt = Error, Dt = no, jt) {
4
4
  /**
@@ -85,41 +85,41 @@ Error message: ${Mr(r)}`,
85
85
  }
86
86
  };
87
87
  function p(e, t, r) {
88
- function n(i, c) {
89
- if (i._zod || Object.defineProperty(i, "_zod", {
88
+ function n(a, c) {
89
+ if (a._zod || Object.defineProperty(a, "_zod", {
90
90
  value: {
91
91
  def: c,
92
- constr: a,
92
+ constr: i,
93
93
  traits: /* @__PURE__ */ new Set()
94
94
  },
95
95
  enumerable: !1
96
- }), i._zod.traits.has(e))
96
+ }), a._zod.traits.has(e))
97
97
  return;
98
- i._zod.traits.add(e), t(i, c);
99
- const u = a.prototype, l = Object.keys(u);
98
+ a._zod.traits.add(e), t(a, c);
99
+ const u = i.prototype, l = Object.keys(u);
100
100
  for (let d = 0; d < l.length; d++) {
101
- const I = l[d];
102
- I in i || (i[I] = u[I].bind(i));
101
+ const y = l[d];
102
+ y in a || (a[y] = u[y].bind(a));
103
103
  }
104
104
  }
105
105
  const o = (r == null ? void 0 : r.Parent) ?? Object;
106
106
  class s extends o {
107
107
  }
108
108
  Object.defineProperty(s, "name", { value: e });
109
- function a(i) {
109
+ function i(a) {
110
110
  var c;
111
111
  const u = r != null && r.Parent ? new s() : this;
112
- n(u, i), (c = u._zod).deferred ?? (c.deferred = []);
112
+ n(u, a), (c = u._zod).deferred ?? (c.deferred = []);
113
113
  for (const l of u._zod.deferred)
114
114
  l();
115
115
  return u;
116
116
  }
117
- return Object.defineProperty(a, "init", { value: n }), Object.defineProperty(a, Symbol.hasInstance, {
118
- value: (i) => {
117
+ return Object.defineProperty(i, "init", { value: n }), Object.defineProperty(i, Symbol.hasInstance, {
118
+ value: (a) => {
119
119
  var c, u;
120
- return r != null && r.Parent && i instanceof r.Parent ? !0 : (u = (c = i == null ? void 0 : i._zod) == null ? void 0 : c.traits) == null ? void 0 : u.has(e);
120
+ return r != null && r.Parent && a instanceof r.Parent ? !0 : (u = (c = a == null ? void 0 : a._zod) == null ? void 0 : c.traits) == null ? void 0 : u.has(e);
121
121
  }
122
- }), Object.defineProperty(a, "name", { value: e }), a;
122
+ }), Object.defineProperty(i, "name", { value: e }), i;
123
123
  }
124
124
  class ge extends Error {
125
125
  constructor() {
@@ -166,11 +166,11 @@ function uo(e, t) {
166
166
  const c = n.match(/\d?e-(\d?)/);
167
167
  c != null && c[1] && (o = Number.parseInt(c[1]));
168
168
  }
169
- const s = r > o ? r : o, a = Number.parseInt(e.toFixed(s).replace(".", "")), i = Number.parseInt(t.toFixed(s).replace(".", ""));
170
- return a % i / 10 ** s;
169
+ const s = r > o ? r : o, i = Number.parseInt(e.toFixed(s).replace(".", "")), a = Number.parseInt(t.toFixed(s).replace(".", ""));
170
+ return i % a / 10 ** s;
171
171
  }
172
172
  const Zt = Symbol("evaluating");
173
- function j(e, t, r) {
173
+ function O(e, t, r) {
174
174
  let n;
175
175
  Object.defineProperty(e, t, {
176
176
  get() {
@@ -210,7 +210,7 @@ function co(e) {
210
210
  }
211
211
  const Tr = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
212
212
  };
213
- function be(e) {
213
+ function Ae(e) {
214
214
  return typeof e == "object" && e !== null && !Array.isArray(e);
215
215
  }
216
216
  const lo = Fe(() => {
@@ -225,13 +225,13 @@ const lo = Fe(() => {
225
225
  }
226
226
  });
227
227
  function he(e) {
228
- if (be(e) === !1)
228
+ if (Ae(e) === !1)
229
229
  return !1;
230
230
  const t = e.constructor;
231
231
  if (t === void 0 || typeof t != "function")
232
232
  return !0;
233
233
  const r = t.prototype;
234
- return !(be(r) === !1 || Object.prototype.hasOwnProperty.call(r, "isPrototypeOf") === !1);
234
+ return !(Ae(r) === !1 || Object.prototype.hasOwnProperty.call(r, "isPrototypeOf") === !1);
235
235
  }
236
236
  function Or(e) {
237
237
  return he(e) ? { ...e } : Array.isArray(e) ? [...e] : e;
@@ -273,13 +273,13 @@ function mo(e, t) {
273
273
  throw new Error(".pick() cannot be used on object schemas containing refinements");
274
274
  const s = se(e._zod.def, {
275
275
  get shape() {
276
- const a = {};
277
- for (const i in t) {
278
- if (!(i in r.shape))
279
- throw new Error(`Unrecognized key: "${i}"`);
280
- t[i] && (a[i] = r.shape[i]);
276
+ const i = {};
277
+ for (const a in t) {
278
+ if (!(a in r.shape))
279
+ throw new Error(`Unrecognized key: "${a}"`);
280
+ t[a] && (i[a] = r.shape[a]);
281
281
  }
282
- return le(this, "shape", a), a;
282
+ return le(this, "shape", i), i;
283
283
  },
284
284
  checks: []
285
285
  });
@@ -291,13 +291,13 @@ function ho(e, t) {
291
291
  throw new Error(".omit() cannot be used on object schemas containing refinements");
292
292
  const s = se(e._zod.def, {
293
293
  get shape() {
294
- const a = { ...e._zod.def.shape };
295
- for (const i in t) {
296
- if (!(i in r.shape))
297
- throw new Error(`Unrecognized key: "${i}"`);
298
- t[i] && delete a[i];
294
+ const i = { ...e._zod.def.shape };
295
+ for (const a in t) {
296
+ if (!(a in r.shape))
297
+ throw new Error(`Unrecognized key: "${a}"`);
298
+ t[a] && delete i[a];
299
299
  }
300
- return le(this, "shape", a), a;
300
+ return le(this, "shape", i), i;
301
301
  },
302
302
  checks: []
303
303
  });
@@ -309,8 +309,8 @@ function Io(e, t) {
309
309
  const r = e._zod.def.checks;
310
310
  if (r && r.length > 0) {
311
311
  const s = e._zod.def.shape;
312
- for (const a in t)
313
- if (Object.getOwnPropertyDescriptor(s, a) !== void 0)
312
+ for (const i in t)
313
+ if (Object.getOwnPropertyDescriptor(s, i) !== void 0)
314
314
  throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.");
315
315
  }
316
316
  const o = se(e._zod.def, {
@@ -350,48 +350,48 @@ function Mo(e, t, r) {
350
350
  const o = t._zod.def.checks;
351
351
  if (o && o.length > 0)
352
352
  throw new Error(".partial() cannot be used on object schemas containing refinements");
353
- const a = se(t._zod.def, {
353
+ const i = se(t._zod.def, {
354
354
  get shape() {
355
- const i = t._zod.def.shape, c = { ...i };
355
+ const a = t._zod.def.shape, c = { ...a };
356
356
  if (r)
357
357
  for (const u in r) {
358
- if (!(u in i))
358
+ if (!(u in a))
359
359
  throw new Error(`Unrecognized key: "${u}"`);
360
360
  r[u] && (c[u] = e ? new e({
361
361
  type: "optional",
362
- innerType: i[u]
363
- }) : i[u]);
362
+ innerType: a[u]
363
+ }) : a[u]);
364
364
  }
365
365
  else
366
- for (const u in i)
366
+ for (const u in a)
367
367
  c[u] = e ? new e({
368
368
  type: "optional",
369
- innerType: i[u]
370
- }) : i[u];
369
+ innerType: a[u]
370
+ }) : a[u];
371
371
  return le(this, "shape", c), c;
372
372
  },
373
373
  checks: []
374
374
  });
375
- return ae(t, a);
375
+ return ae(t, i);
376
376
  }
377
377
  function _o(e, t, r) {
378
378
  const n = se(t._zod.def, {
379
379
  get shape() {
380
380
  const o = t._zod.def.shape, s = { ...o };
381
381
  if (r)
382
- for (const a in r) {
383
- if (!(a in s))
384
- throw new Error(`Unrecognized key: "${a}"`);
385
- r[a] && (s[a] = new e({
382
+ for (const i in r) {
383
+ if (!(i in s))
384
+ throw new Error(`Unrecognized key: "${i}"`);
385
+ r[i] && (s[i] = new e({
386
386
  type: "nonoptional",
387
- innerType: o[a]
387
+ innerType: o[i]
388
388
  }));
389
389
  }
390
390
  else
391
- for (const a in o)
392
- s[a] = new e({
391
+ for (const i in o)
392
+ s[i] = new e({
393
393
  type: "nonoptional",
394
- innerType: o[a]
394
+ innerType: o[i]
395
395
  });
396
396
  return le(this, "shape", s), s;
397
397
  }
@@ -417,10 +417,10 @@ function Se(e) {
417
417
  return typeof e == "string" ? e : e == null ? void 0 : e.message;
418
418
  }
419
419
  function oe(e, t, r) {
420
- var o, s, a, i, c, u;
420
+ var o, s, i, a, c, u;
421
421
  const n = { ...e, path: e.path ?? [] };
422
422
  if (!e.message) {
423
- const l = Se((a = (s = (o = e.inst) == null ? void 0 : o._zod.def) == null ? void 0 : s.error) == null ? void 0 : a.call(s, e)) ?? Se((i = t == null ? void 0 : t.error) == null ? void 0 : i.call(t, e)) ?? Se((c = r.customError) == null ? void 0 : c.call(r, e)) ?? Se((u = r.localeError) == null ? void 0 : u.call(r, e)) ?? "Invalid input";
423
+ const l = Se((i = (s = (o = e.inst) == null ? void 0 : o._zod.def) == null ? void 0 : s.error) == null ? void 0 : i.call(s, e)) ?? Se((a = t == null ? void 0 : t.error) == null ? void 0 : a.call(t, e)) ?? Se((c = r.customError) == null ? void 0 : c.call(r, e)) ?? Se((u = r.localeError) == null ? void 0 : u.call(r, e)) ?? "Invalid input";
424
424
  n.message = l;
425
425
  }
426
426
  return delete n.inst, delete n.continue, t != null && t.reportInput || delete n.input, n;
@@ -428,7 +428,7 @@ function oe(e, t, r) {
428
428
  function gt(e) {
429
429
  return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
430
430
  }
431
- function Ae(...e) {
431
+ function ze(...e) {
432
432
  const [t, r, n] = e;
433
433
  return typeof t == "string" ? {
434
434
  message: t,
@@ -459,7 +459,7 @@ function bo(e, t = (r) => r.message) {
459
459
  const r = { _errors: [] }, n = (o) => {
460
460
  for (const s of o.issues)
461
461
  if (s.code === "invalid_union" && s.errors.length)
462
- s.errors.map((a) => n({ issues: a }));
462
+ s.errors.map((i) => n({ issues: i }));
463
463
  else if (s.code === "invalid_key")
464
464
  n({ issues: s.issues });
465
465
  else if (s.code === "invalid_element")
@@ -467,46 +467,46 @@ function bo(e, t = (r) => r.message) {
467
467
  else if (s.path.length === 0)
468
468
  r._errors.push(t(s));
469
469
  else {
470
- let a = r, i = 0;
471
- for (; i < s.path.length; ) {
472
- const c = s.path[i];
473
- i === s.path.length - 1 ? (a[c] = a[c] || { _errors: [] }, a[c]._errors.push(t(s))) : a[c] = a[c] || { _errors: [] }, a = a[c], i++;
470
+ let i = r, a = 0;
471
+ for (; a < s.path.length; ) {
472
+ const c = s.path[a];
473
+ a === s.path.length - 1 ? (i[c] = i[c] || { _errors: [] }, i[c]._errors.push(t(s))) : i[c] = i[c] || { _errors: [] }, i = i[c], a++;
474
474
  }
475
475
  }
476
476
  };
477
477
  return n(e), r;
478
478
  }
479
479
  const mt = (e) => (t, r, n, o) => {
480
- const s = n ? Object.assign(n, { async: !1 }) : { async: !1 }, a = t._zod.run({ value: r, issues: [] }, s);
481
- if (a instanceof Promise)
480
+ const s = n ? Object.assign(n, { async: !1 }) : { async: !1 }, i = t._zod.run({ value: r, issues: [] }, s);
481
+ if (i instanceof Promise)
482
482
  throw new ge();
483
- if (a.issues.length) {
484
- const i = new ((o == null ? void 0 : o.Err) ?? e)(a.issues.map((c) => oe(c, s, ne())));
485
- throw Tr(i, o == null ? void 0 : o.callee), i;
483
+ if (i.issues.length) {
484
+ const a = new ((o == null ? void 0 : o.Err) ?? e)(i.issues.map((c) => oe(c, s, ne())));
485
+ throw Tr(a, o == null ? void 0 : o.callee), a;
486
486
  }
487
- return a.value;
487
+ return i.value;
488
488
  }, ht = (e) => async (t, r, n, o) => {
489
489
  const s = n ? Object.assign(n, { async: !0 }) : { async: !0 };
490
- let a = t._zod.run({ value: r, issues: [] }, s);
491
- if (a instanceof Promise && (a = await a), a.issues.length) {
492
- const i = new ((o == null ? void 0 : o.Err) ?? e)(a.issues.map((c) => oe(c, s, ne())));
493
- throw Tr(i, o == null ? void 0 : o.callee), i;
490
+ let i = t._zod.run({ value: r, issues: [] }, s);
491
+ if (i instanceof Promise && (i = await i), i.issues.length) {
492
+ const a = new ((o == null ? void 0 : o.Err) ?? e)(i.issues.map((c) => oe(c, s, ne())));
493
+ throw Tr(a, o == null ? void 0 : o.callee), a;
494
494
  }
495
- return a.value;
495
+ return i.value;
496
496
  }, Ve = (e) => (t, r, n) => {
497
497
  const o = n ? { ...n, async: !1 } : { async: !1 }, s = t._zod.run({ value: r, issues: [] }, o);
498
498
  if (s instanceof Promise)
499
499
  throw new ge();
500
500
  return s.issues.length ? {
501
501
  success: !1,
502
- error: new (e ?? Cr)(s.issues.map((a) => oe(a, o, ne())))
502
+ error: new (e ?? Cr)(s.issues.map((i) => oe(i, o, ne())))
503
503
  } : { success: !0, data: s.value };
504
504
  }, Ao = /* @__PURE__ */ Ve(kr), Be = (e) => async (t, r, n) => {
505
505
  const o = n ? Object.assign(n, { async: !0 }) : { async: !0 };
506
506
  let s = t._zod.run({ value: r, issues: [] }, o);
507
507
  return s instanceof Promise && (s = await s), s.issues.length ? {
508
508
  success: !1,
509
- error: new e(s.issues.map((a) => oe(a, o, ne())))
509
+ error: new e(s.issues.map((i) => oe(i, o, ne())))
510
510
  } : { success: !0, data: s.value };
511
511
  }, zo = /* @__PURE__ */ Be(kr), wo = (e) => (t, r, n) => {
512
512
  const o = n ? Object.assign(n, { direction: "backward" }) : { direction: "backward" };
@@ -599,17 +599,17 @@ const es = (e) => {
599
599
  });
600
600
  };
601
601
  }), is = /* @__PURE__ */ p("$ZodCheckNumberFormat", (e, t) => {
602
- var a;
602
+ var i;
603
603
  F.init(e, t), t.format = t.format || "float64";
604
- const r = (a = t.format) == null ? void 0 : a.includes("int"), n = r ? "int" : "number", [o, s] = go[t.format];
605
- e._zod.onattach.push((i) => {
606
- const c = i._zod.bag;
604
+ const r = (i = t.format) == null ? void 0 : i.includes("int"), n = r ? "int" : "number", [o, s] = go[t.format];
605
+ e._zod.onattach.push((a) => {
606
+ const c = a._zod.bag;
607
607
  c.format = t.format, c.minimum = o, c.maximum = s, r && (c.pattern = ts);
608
- }), e._zod.check = (i) => {
609
- const c = i.value;
608
+ }), e._zod.check = (a) => {
609
+ const c = a.value;
610
610
  if (r) {
611
611
  if (!Number.isInteger(c)) {
612
- i.issues.push({
612
+ a.issues.push({
613
613
  expected: n,
614
614
  format: t.format,
615
615
  code: "invalid_type",
@@ -620,7 +620,7 @@ const es = (e) => {
620
620
  return;
621
621
  }
622
622
  if (!Number.isSafeInteger(c)) {
623
- c > 0 ? i.issues.push({
623
+ c > 0 ? a.issues.push({
624
624
  input: c,
625
625
  code: "too_big",
626
626
  maximum: Number.MAX_SAFE_INTEGER,
@@ -629,7 +629,7 @@ const es = (e) => {
629
629
  origin: n,
630
630
  inclusive: !0,
631
631
  continue: !t.abort
632
- }) : i.issues.push({
632
+ }) : a.issues.push({
633
633
  input: c,
634
634
  code: "too_small",
635
635
  minimum: Number.MIN_SAFE_INTEGER,
@@ -642,7 +642,7 @@ const es = (e) => {
642
642
  return;
643
643
  }
644
644
  }
645
- c < o && i.issues.push({
645
+ c < o && a.issues.push({
646
646
  origin: "number",
647
647
  input: c,
648
648
  code: "too_small",
@@ -650,7 +650,7 @@ const es = (e) => {
650
650
  inclusive: !0,
651
651
  inst: e,
652
652
  continue: !t.abort
653
- }), c > s && i.issues.push({
653
+ }), c > s && a.issues.push({
654
654
  origin: "number",
655
655
  input: c,
656
656
  code: "too_big",
@@ -672,9 +672,9 @@ const es = (e) => {
672
672
  const o = n.value;
673
673
  if (o.length <= t.maximum)
674
674
  return;
675
- const a = gt(o);
675
+ const i = gt(o);
676
676
  n.issues.push({
677
- origin: a,
677
+ origin: i,
678
678
  code: "too_big",
679
679
  maximum: t.maximum,
680
680
  inclusive: !0,
@@ -695,9 +695,9 @@ const es = (e) => {
695
695
  const o = n.value;
696
696
  if (o.length >= t.minimum)
697
697
  return;
698
- const a = gt(o);
698
+ const i = gt(o);
699
699
  n.issues.push({
700
- origin: a,
700
+ origin: i,
701
701
  code: "too_small",
702
702
  minimum: t.minimum,
703
703
  inclusive: !0,
@@ -718,10 +718,10 @@ const es = (e) => {
718
718
  const o = n.value, s = o.length;
719
719
  if (s === t.length)
720
720
  return;
721
- const a = gt(o), i = s > t.length;
721
+ const i = gt(o), a = s > t.length;
722
722
  n.issues.push({
723
- origin: a,
724
- ...i ? { code: "too_big", maximum: t.length } : { code: "too_small", minimum: t.length },
723
+ origin: i,
724
+ ...a ? { code: "too_big", maximum: t.length } : { code: "too_small", minimum: t.length },
725
725
  inclusive: !0,
726
726
  exact: !0,
727
727
  input: n.value,
@@ -831,9 +831,9 @@ class ys {
831
831
  return;
832
832
  }
833
833
  const n = t.split(`
834
- `).filter((a) => a), o = Math.min(...n.map((a) => a.length - a.trimStart().length)), s = n.map((a) => a.slice(o)).map((a) => " ".repeat(this.indent * 2) + a);
835
- for (const a of s)
836
- this.content.push(a);
834
+ `).filter((i) => i), o = Math.min(...n.map((i) => i.length - i.trimStart().length)), s = n.map((i) => i.slice(o)).map((i) => " ".repeat(this.indent * 2) + i);
835
+ for (const i of s)
836
+ this.content.push(i);
837
837
  }
838
838
  compile() {
839
839
  const t = Function, r = this == null ? void 0 : this.args, o = [...((this == null ? void 0 : this.content) ?? [""]).map((s) => ` ${s}`)];
@@ -852,38 +852,38 @@ const vs = {
852
852
  const n = [...e._zod.def.checks ?? []];
853
853
  e._zod.traits.has("$ZodCheck") && n.unshift(e);
854
854
  for (const s of n)
855
- for (const a of s._zod.onattach)
856
- a(e);
855
+ for (const i of s._zod.onattach)
856
+ i(e);
857
857
  if (n.length === 0)
858
858
  (r = e._zod).deferred ?? (r.deferred = []), (o = e._zod.deferred) == null || o.push(() => {
859
859
  e._zod.run = e._zod.parse;
860
860
  });
861
861
  else {
862
- const s = (i, c, u) => {
863
- let l = pe(i), d;
864
- for (const I of c) {
865
- if (I._zod.def.when) {
866
- if (!I._zod.def.when(i))
862
+ const s = (a, c, u) => {
863
+ let l = pe(a), d;
864
+ for (const y of c) {
865
+ if (y._zod.def.when) {
866
+ if (!y._zod.def.when(a))
867
867
  continue;
868
868
  } else if (l)
869
869
  continue;
870
- const g = i.issues.length, M = I._zod.check(i);
870
+ const g = a.issues.length, M = y._zod.check(a);
871
871
  if (M instanceof Promise && (u == null ? void 0 : u.async) === !1)
872
872
  throw new ge();
873
873
  if (d || M instanceof Promise)
874
874
  d = (d ?? Promise.resolve()).then(async () => {
875
- await M, i.issues.length !== g && (l || (l = pe(i, g)));
875
+ await M, a.issues.length !== g && (l || (l = pe(a, g)));
876
876
  });
877
877
  else {
878
- if (i.issues.length === g)
878
+ if (a.issues.length === g)
879
879
  continue;
880
- l || (l = pe(i, g));
880
+ l || (l = pe(a, g));
881
881
  }
882
882
  }
883
- return d ? d.then(() => i) : i;
884
- }, a = (i, c, u) => {
885
- if (pe(i))
886
- return i.aborted = !0, i;
883
+ return d ? d.then(() => a) : a;
884
+ }, i = (a, c, u) => {
885
+ if (pe(a))
886
+ return a.aborted = !0, a;
887
887
  const l = s(c, n, u);
888
888
  if (l instanceof Promise) {
889
889
  if (u.async === !1)
@@ -892,14 +892,14 @@ const vs = {
892
892
  }
893
893
  return e._zod.parse(l, u);
894
894
  };
895
- e._zod.run = (i, c) => {
895
+ e._zod.run = (a, c) => {
896
896
  if (c.skipChecks)
897
- return e._zod.parse(i, c);
897
+ return e._zod.parse(a, c);
898
898
  if (c.direction === "backward") {
899
- const l = e._zod.parse({ value: i.value, issues: [] }, { ...c, skipChecks: !0 });
900
- return l instanceof Promise ? l.then((d) => a(d, i, c)) : a(l, i, c);
899
+ const l = e._zod.parse({ value: a.value, issues: [] }, { ...c, skipChecks: !0 });
900
+ return l instanceof Promise ? l.then((d) => i(d, a, c)) : i(l, a, c);
901
901
  }
902
- const u = e._zod.parse(i, c);
902
+ const u = e._zod.parse(a, c);
903
903
  if (u instanceof Promise) {
904
904
  if (c.async === !1)
905
905
  throw new ge();
@@ -908,12 +908,12 @@ const vs = {
908
908
  return s(u, n, c);
909
909
  };
910
910
  }
911
- j(e, "~standard", () => ({
911
+ O(e, "~standard", () => ({
912
912
  validate: (s) => {
913
- var a;
913
+ var i;
914
914
  try {
915
- const i = Ao(e, s);
916
- return i.success ? { value: i.data } : { issues: (a = i.error) == null ? void 0 : a.issues };
915
+ const a = Ao(e, s);
916
+ return a.success ? { value: a.data } : { issues: (i = a.error) == null ? void 0 : i.issues };
917
917
  } catch {
918
918
  return zo(e, s).then((c) => {
919
919
  var u;
@@ -1044,10 +1044,10 @@ const vs = {
1044
1044
  const [o, s] = n;
1045
1045
  if (!s)
1046
1046
  throw new Error();
1047
- const a = Number(s);
1048
- if (`${a}` !== s)
1047
+ const i = Number(s);
1048
+ if (`${i}` !== s)
1049
1049
  throw new Error();
1050
- if (a < 0 || a > 128)
1050
+ if (i < 0 || i > 128)
1051
1051
  throw new Error();
1052
1052
  new URL(`http://[${o}]`);
1053
1053
  } catch {
@@ -1197,12 +1197,12 @@ const Hs = /* @__PURE__ */ p("$ZodArray", (e, t) => {
1197
1197
  }), r;
1198
1198
  r.value = Array(o.length);
1199
1199
  const s = [];
1200
- for (let a = 0; a < o.length; a++) {
1201
- const i = o[a], c = t.element._zod.run({
1202
- value: i,
1200
+ for (let i = 0; i < o.length; i++) {
1201
+ const a = o[i], c = t.element._zod.run({
1202
+ value: a,
1203
1203
  issues: []
1204
1204
  }, n);
1205
- c instanceof Promise ? s.push(c.then((u) => Rt(u, r, a))) : Rt(c, r, a);
1205
+ c instanceof Promise ? s.push(c.then((u) => Rt(u, r, i))) : Rt(c, r, i);
1206
1206
  }
1207
1207
  return s.length ? Promise.all(s).then(() => r) : r;
1208
1208
  };
@@ -1216,11 +1216,11 @@ function Pe(e, t, r, n, o) {
1216
1216
  e.value === void 0 ? r in n && (t.value[r] = void 0) : t.value[r] = e.value;
1217
1217
  }
1218
1218
  function Qr(e) {
1219
- var n, o, s, a;
1219
+ var n, o, s, i;
1220
1220
  const t = Object.keys(e.shape);
1221
- for (const i of t)
1222
- if (!((a = (s = (o = (n = e.shape) == null ? void 0 : n[i]) == null ? void 0 : o._zod) == null ? void 0 : s.traits) != null && a.has("$ZodType")))
1223
- throw new Error(`Invalid element at key "${i}": expected a Zod schema`);
1221
+ for (const a of t)
1222
+ if (!((i = (s = (o = (n = e.shape) == null ? void 0 : n[a]) == null ? void 0 : o._zod) == null ? void 0 : s.traits) != null && i.has("$ZodType")))
1223
+ throw new Error(`Invalid element at key "${a}": expected a Zod schema`);
1224
1224
  const r = fo(e.shape);
1225
1225
  return {
1226
1226
  ...e,
@@ -1231,20 +1231,20 @@ function Qr(e) {
1231
1231
  };
1232
1232
  }
1233
1233
  function Jr(e, t, r, n, o, s) {
1234
- const a = [], i = o.keySet, c = o.catchall._zod, u = c.def.type, l = c.optout === "optional";
1234
+ const i = [], a = o.keySet, c = o.catchall._zod, u = c.def.type, l = c.optout === "optional";
1235
1235
  for (const d in t) {
1236
- if (i.has(d))
1236
+ if (a.has(d))
1237
1237
  continue;
1238
1238
  if (u === "never") {
1239
- a.push(d);
1239
+ i.push(d);
1240
1240
  continue;
1241
1241
  }
1242
- const I = c.run({ value: t[d], issues: [] }, n);
1243
- I instanceof Promise ? e.push(I.then((g) => Pe(g, r, d, t, l))) : Pe(I, r, d, t, l);
1242
+ const y = c.run({ value: t[d], issues: [] }, n);
1243
+ y instanceof Promise ? e.push(y.then((g) => Pe(g, r, d, t, l))) : Pe(y, r, d, t, l);
1244
1244
  }
1245
- return a.length && r.issues.push({
1245
+ return i.length && r.issues.push({
1246
1246
  code: "unrecognized_keys",
1247
- keys: a,
1247
+ keys: i,
1248
1248
  input: t,
1249
1249
  inst: s
1250
1250
  }), e.length ? Promise.all(e).then(() => r) : r;
@@ -1253,10 +1253,10 @@ const Xs = /* @__PURE__ */ p("$ZodObject", (e, t) => {
1253
1253
  Z.init(e, t);
1254
1254
  const r = Object.getOwnPropertyDescriptor(t, "shape");
1255
1255
  if (!(r != null && r.get)) {
1256
- const i = t.shape;
1256
+ const a = t.shape;
1257
1257
  Object.defineProperty(t, "shape", {
1258
1258
  get: () => {
1259
- const c = { ...i };
1259
+ const c = { ...a };
1260
1260
  return Object.defineProperty(t, "shape", {
1261
1261
  value: c
1262
1262
  }), c;
@@ -1264,10 +1264,10 @@ const Xs = /* @__PURE__ */ p("$ZodObject", (e, t) => {
1264
1264
  });
1265
1265
  }
1266
1266
  const n = Fe(() => Qr(t));
1267
- j(e._zod, "propValues", () => {
1268
- const i = t.shape, c = {};
1269
- for (const u in i) {
1270
- const l = i[u]._zod;
1267
+ O(e._zod, "propValues", () => {
1268
+ const a = t.shape, c = {};
1269
+ for (const u in a) {
1270
+ const l = a[u]._zod;
1271
1271
  if (l.values) {
1272
1272
  c[u] ?? (c[u] = /* @__PURE__ */ new Set());
1273
1273
  for (const d of l.values)
@@ -1276,94 +1276,94 @@ const Xs = /* @__PURE__ */ p("$ZodObject", (e, t) => {
1276
1276
  }
1277
1277
  return c;
1278
1278
  });
1279
- const o = be, s = t.catchall;
1280
- let a;
1281
- e._zod.parse = (i, c) => {
1282
- a ?? (a = n.value);
1283
- const u = i.value;
1279
+ const o = Ae, s = t.catchall;
1280
+ let i;
1281
+ e._zod.parse = (a, c) => {
1282
+ i ?? (i = n.value);
1283
+ const u = a.value;
1284
1284
  if (!o(u))
1285
- return i.issues.push({
1285
+ return a.issues.push({
1286
1286
  expected: "object",
1287
1287
  code: "invalid_type",
1288
1288
  input: u,
1289
1289
  inst: e
1290
- }), i;
1291
- i.value = {};
1292
- const l = [], d = a.shape;
1293
- for (const I of a.keys) {
1294
- const g = d[I], M = g._zod.optout === "optional", m = g._zod.run({ value: u[I], issues: [] }, c);
1295
- m instanceof Promise ? l.push(m.then((y) => Pe(y, i, I, u, M))) : Pe(m, i, I, u, M);
1290
+ }), a;
1291
+ a.value = {};
1292
+ const l = [], d = i.shape;
1293
+ for (const y of i.keys) {
1294
+ const g = d[y], M = g._zod.optout === "optional", h = g._zod.run({ value: u[y], issues: [] }, c);
1295
+ h instanceof Promise ? l.push(h.then((m) => Pe(m, a, y, u, M))) : Pe(h, a, y, u, M);
1296
1296
  }
1297
- return s ? Jr(l, u, i, c, n.value, e) : l.length ? Promise.all(l).then(() => i) : i;
1297
+ return s ? Jr(l, u, a, c, n.value, e) : l.length ? Promise.all(l).then(() => a) : a;
1298
1298
  };
1299
1299
  }), qs = /* @__PURE__ */ p("$ZodObjectJIT", (e, t) => {
1300
1300
  Xs.init(e, t);
1301
- const r = e._zod.parse, n = Fe(() => Qr(t)), o = (I) => {
1301
+ const r = e._zod.parse, n = Fe(() => Qr(t)), o = (y) => {
1302
1302
  var f;
1303
- const g = new ys(["shape", "payload", "ctx"]), M = n.value, m = (O) => {
1304
- const T = Pt(O);
1305
- return `shape[${T}]._zod.run({ value: input[${T}], issues: [] }, ctx)`;
1303
+ const g = new ys(["shape", "payload", "ctx"]), M = n.value, h = (z) => {
1304
+ const w = Pt(z);
1305
+ return `shape[${w}]._zod.run({ value: input[${w}], issues: [] }, ctx)`;
1306
1306
  };
1307
1307
  g.write("const input = payload.value;");
1308
- const y = /* @__PURE__ */ Object.create(null);
1309
- let _ = 0;
1310
- for (const O of M.keys)
1311
- y[O] = `key_${_++}`;
1308
+ const m = /* @__PURE__ */ Object.create(null);
1309
+ let b = 0;
1310
+ for (const z of M.keys)
1311
+ m[z] = `key_${b++}`;
1312
1312
  g.write("const newResult = {};");
1313
- for (const O of M.keys) {
1314
- const T = y[O], w = Pt(O), C = I[O], J = ((f = C == null ? void 0 : C._zod) == null ? void 0 : f.optout) === "optional";
1315
- g.write(`const ${T} = ${m(O)};`), J ? g.write(`
1316
- if (${T}.issues.length) {
1317
- if (${w} in input) {
1318
- payload.issues = payload.issues.concat(${T}.issues.map(iss => ({
1313
+ for (const z of M.keys) {
1314
+ const w = m[z], D = Pt(z), C = y[z], J = ((f = C == null ? void 0 : C._zod) == null ? void 0 : f.optout) === "optional";
1315
+ g.write(`const ${w} = ${h(z)};`), J ? g.write(`
1316
+ if (${w}.issues.length) {
1317
+ if (${D} in input) {
1318
+ payload.issues = payload.issues.concat(${w}.issues.map(iss => ({
1319
1319
  ...iss,
1320
- path: iss.path ? [${w}, ...iss.path] : [${w}]
1320
+ path: iss.path ? [${D}, ...iss.path] : [${D}]
1321
1321
  })));
1322
1322
  }
1323
1323
  }
1324
1324
 
1325
- if (${T}.value === undefined) {
1326
- if (${w} in input) {
1327
- newResult[${w}] = undefined;
1325
+ if (${w}.value === undefined) {
1326
+ if (${D} in input) {
1327
+ newResult[${D}] = undefined;
1328
1328
  }
1329
1329
  } else {
1330
- newResult[${w}] = ${T}.value;
1330
+ newResult[${D}] = ${w}.value;
1331
1331
  }
1332
1332
 
1333
1333
  `) : g.write(`
1334
- if (${T}.issues.length) {
1335
- payload.issues = payload.issues.concat(${T}.issues.map(iss => ({
1334
+ if (${w}.issues.length) {
1335
+ payload.issues = payload.issues.concat(${w}.issues.map(iss => ({
1336
1336
  ...iss,
1337
- path: iss.path ? [${w}, ...iss.path] : [${w}]
1337
+ path: iss.path ? [${D}, ...iss.path] : [${D}]
1338
1338
  })));
1339
1339
  }
1340
1340
 
1341
- if (${T}.value === undefined) {
1342
- if (${w} in input) {
1343
- newResult[${w}] = undefined;
1341
+ if (${w}.value === undefined) {
1342
+ if (${D} in input) {
1343
+ newResult[${D}] = undefined;
1344
1344
  }
1345
1345
  } else {
1346
- newResult[${w}] = ${T}.value;
1346
+ newResult[${D}] = ${w}.value;
1347
1347
  }
1348
1348
 
1349
1349
  `);
1350
1350
  }
1351
1351
  g.write("payload.value = newResult;"), g.write("return payload;");
1352
- const A = g.compile();
1353
- return (O, T) => A(I, O, T);
1352
+ const N = g.compile();
1353
+ return (z, w) => N(y, z, w);
1354
1354
  };
1355
1355
  let s;
1356
- const a = be, i = !ot.jitless, u = i && lo.value, l = t.catchall;
1356
+ const i = Ae, a = !ot.jitless, u = a && lo.value, l = t.catchall;
1357
1357
  let d;
1358
- e._zod.parse = (I, g) => {
1358
+ e._zod.parse = (y, g) => {
1359
1359
  d ?? (d = n.value);
1360
- const M = I.value;
1361
- return a(M) ? i && u && (g == null ? void 0 : g.async) === !1 && g.jitless !== !0 ? (s || (s = o(t.shape)), I = s(I, g), l ? Jr([], M, I, g, d, e) : I) : r(I, g) : (I.issues.push({
1360
+ const M = y.value;
1361
+ return i(M) ? a && u && (g == null ? void 0 : g.async) === !1 && g.jitless !== !0 ? (s || (s = o(t.shape)), y = s(y, g), l ? Jr([], M, y, g, d, e) : y) : r(y, g) : (y.issues.push({
1362
1362
  expected: "object",
1363
1363
  code: "invalid_type",
1364
1364
  input: M,
1365
1365
  inst: e
1366
- }), I);
1366
+ }), y);
1367
1367
  };
1368
1368
  });
1369
1369
  function $t(e, t, r, n) {
@@ -1375,14 +1375,14 @@ function $t(e, t, r, n) {
1375
1375
  code: "invalid_union",
1376
1376
  input: t.value,
1377
1377
  inst: r,
1378
- errors: e.map((s) => s.issues.map((a) => oe(a, n, ne())))
1378
+ errors: e.map((s) => s.issues.map((i) => oe(i, n, ne())))
1379
1379
  }), t);
1380
1380
  }
1381
1381
  const Fr = /* @__PURE__ */ p("$ZodUnion", (e, t) => {
1382
- Z.init(e, t), j(e._zod, "optin", () => t.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0), j(e._zod, "optout", () => t.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0), j(e._zod, "values", () => {
1382
+ Z.init(e, t), O(e._zod, "optin", () => t.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0), O(e._zod, "optout", () => t.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0), O(e._zod, "values", () => {
1383
1383
  if (t.options.every((o) => o._zod.values))
1384
1384
  return new Set(t.options.flatMap((o) => Array.from(o._zod.values)));
1385
- }), j(e._zod, "pattern", () => {
1385
+ }), O(e._zod, "pattern", () => {
1386
1386
  if (t.options.every((o) => o._zod.pattern)) {
1387
1387
  const o = t.options.map((s) => s._zod.pattern);
1388
1388
  return new RegExp(`^(${o.map((s) => ft(s.source)).join("|")})$`);
@@ -1392,79 +1392,79 @@ const Fr = /* @__PURE__ */ p("$ZodUnion", (e, t) => {
1392
1392
  e._zod.parse = (o, s) => {
1393
1393
  if (r)
1394
1394
  return n(o, s);
1395
- let a = !1;
1396
- const i = [];
1395
+ let i = !1;
1396
+ const a = [];
1397
1397
  for (const c of t.options) {
1398
1398
  const u = c._zod.run({
1399
1399
  value: o.value,
1400
1400
  issues: []
1401
1401
  }, s);
1402
1402
  if (u instanceof Promise)
1403
- i.push(u), a = !0;
1403
+ a.push(u), i = !0;
1404
1404
  else {
1405
1405
  if (u.issues.length === 0)
1406
1406
  return u;
1407
- i.push(u);
1407
+ a.push(u);
1408
1408
  }
1409
1409
  }
1410
- return a ? Promise.all(i).then((c) => $t(c, o, e, s)) : $t(i, o, e, s);
1410
+ return i ? Promise.all(a).then((c) => $t(c, o, e, s)) : $t(a, o, e, s);
1411
1411
  };
1412
1412
  }), Ks = /* @__PURE__ */ p("$ZodDiscriminatedUnion", (e, t) => {
1413
1413
  t.inclusive = !1, Fr.init(e, t);
1414
1414
  const r = e._zod.parse;
1415
- j(e._zod, "propValues", () => {
1415
+ O(e._zod, "propValues", () => {
1416
1416
  const o = {};
1417
1417
  for (const s of t.options) {
1418
- const a = s._zod.propValues;
1419
- if (!a || Object.keys(a).length === 0)
1418
+ const i = s._zod.propValues;
1419
+ if (!i || Object.keys(i).length === 0)
1420
1420
  throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);
1421
- for (const [i, c] of Object.entries(a)) {
1422
- o[i] || (o[i] = /* @__PURE__ */ new Set());
1421
+ for (const [a, c] of Object.entries(i)) {
1422
+ o[a] || (o[a] = /* @__PURE__ */ new Set());
1423
1423
  for (const u of c)
1424
- o[i].add(u);
1424
+ o[a].add(u);
1425
1425
  }
1426
1426
  }
1427
1427
  return o;
1428
1428
  });
1429
1429
  const n = Fe(() => {
1430
- var a;
1430
+ var i;
1431
1431
  const o = t.options, s = /* @__PURE__ */ new Map();
1432
- for (const i of o) {
1433
- const c = (a = i._zod.propValues) == null ? void 0 : a[t.discriminator];
1432
+ for (const a of o) {
1433
+ const c = (i = a._zod.propValues) == null ? void 0 : i[t.discriminator];
1434
1434
  if (!c || c.size === 0)
1435
- throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);
1435
+ throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);
1436
1436
  for (const u of c) {
1437
1437
  if (s.has(u))
1438
1438
  throw new Error(`Duplicate discriminator value "${String(u)}"`);
1439
- s.set(u, i);
1439
+ s.set(u, a);
1440
1440
  }
1441
1441
  }
1442
1442
  return s;
1443
1443
  });
1444
1444
  e._zod.parse = (o, s) => {
1445
- const a = o.value;
1446
- if (!be(a))
1445
+ const i = o.value;
1446
+ if (!Ae(i))
1447
1447
  return o.issues.push({
1448
1448
  code: "invalid_type",
1449
1449
  expected: "object",
1450
- input: a,
1450
+ input: i,
1451
1451
  inst: e
1452
1452
  }), o;
1453
- const i = n.value.get(a == null ? void 0 : a[t.discriminator]);
1454
- return i ? i._zod.run(o, s) : t.unionFallback ? r(o, s) : (o.issues.push({
1453
+ const a = n.value.get(i == null ? void 0 : i[t.discriminator]);
1454
+ return a ? a._zod.run(o, s) : t.unionFallback ? r(o, s) : (o.issues.push({
1455
1455
  code: "invalid_union",
1456
1456
  errors: [],
1457
1457
  note: "No matching discriminator",
1458
1458
  discriminator: t.discriminator,
1459
- input: a,
1459
+ input: i,
1460
1460
  path: [t.discriminator],
1461
1461
  inst: e
1462
1462
  }), o);
1463
1463
  };
1464
1464
  }), ea = /* @__PURE__ */ p("$ZodIntersection", (e, t) => {
1465
1465
  Z.init(e, t), e._zod.parse = (r, n) => {
1466
- const o = r.value, s = t.left._zod.run({ value: o, issues: [] }, n), a = t.right._zod.run({ value: o, issues: [] }, n);
1467
- return s instanceof Promise || a instanceof Promise ? Promise.all([s, a]).then(([c, u]) => Ut(r, c, u)) : Ut(r, s, a);
1466
+ const o = r.value, s = t.left._zod.run({ value: o, issues: [] }, n), i = t.right._zod.run({ value: o, issues: [] }, n);
1467
+ return s instanceof Promise || i instanceof Promise ? Promise.all([s, i]).then(([c, u]) => Ut(r, c, u)) : Ut(r, s, i);
1468
1468
  };
1469
1469
  });
1470
1470
  function at(e, t) {
@@ -1475,13 +1475,13 @@ function at(e, t) {
1475
1475
  if (he(e) && he(t)) {
1476
1476
  const r = Object.keys(t), n = Object.keys(e).filter((s) => r.indexOf(s) !== -1), o = { ...e, ...t };
1477
1477
  for (const s of n) {
1478
- const a = at(e[s], t[s]);
1479
- if (!a.valid)
1478
+ const i = at(e[s], t[s]);
1479
+ if (!i.valid)
1480
1480
  return {
1481
1481
  valid: !1,
1482
- mergeErrorPath: [s, ...a.mergeErrorPath]
1482
+ mergeErrorPath: [s, ...i.mergeErrorPath]
1483
1483
  };
1484
- o[s] = a.data;
1484
+ o[s] = i.data;
1485
1485
  }
1486
1486
  return { valid: !0, data: o };
1487
1487
  }
@@ -1490,13 +1490,13 @@ function at(e, t) {
1490
1490
  return { valid: !1, mergeErrorPath: [] };
1491
1491
  const r = [];
1492
1492
  for (let n = 0; n < e.length; n++) {
1493
- const o = e[n], s = t[n], a = at(o, s);
1494
- if (!a.valid)
1493
+ const o = e[n], s = t[n], i = at(o, s);
1494
+ if (!i.valid)
1495
1495
  return {
1496
1496
  valid: !1,
1497
- mergeErrorPath: [n, ...a.mergeErrorPath]
1497
+ mergeErrorPath: [n, ...i.mergeErrorPath]
1498
1498
  };
1499
- r.push(a.data);
1499
+ r.push(i.data);
1500
1500
  }
1501
1501
  return { valid: !0, data: r };
1502
1502
  }
@@ -1505,26 +1505,26 @@ function at(e, t) {
1505
1505
  function Ut(e, t, r) {
1506
1506
  const n = /* @__PURE__ */ new Map();
1507
1507
  let o;
1508
- for (const i of t.issues)
1509
- if (i.code === "unrecognized_keys") {
1510
- o ?? (o = i);
1511
- for (const c of i.keys)
1508
+ for (const a of t.issues)
1509
+ if (a.code === "unrecognized_keys") {
1510
+ o ?? (o = a);
1511
+ for (const c of a.keys)
1512
1512
  n.has(c) || n.set(c, {}), n.get(c).l = !0;
1513
1513
  } else
1514
- e.issues.push(i);
1515
- for (const i of r.issues)
1516
- if (i.code === "unrecognized_keys")
1517
- for (const c of i.keys)
1514
+ e.issues.push(a);
1515
+ for (const a of r.issues)
1516
+ if (a.code === "unrecognized_keys")
1517
+ for (const c of a.keys)
1518
1518
  n.has(c) || n.set(c, {}), n.get(c).r = !0;
1519
1519
  else
1520
- e.issues.push(i);
1521
- const s = [...n].filter(([, i]) => i.l && i.r).map(([i]) => i);
1520
+ e.issues.push(a);
1521
+ const s = [...n].filter(([, a]) => a.l && a.r).map(([a]) => a);
1522
1522
  if (s.length && o && e.issues.push({ ...o, keys: s }), pe(e))
1523
1523
  return e;
1524
- const a = at(t.value, r.value);
1525
- if (!a.valid)
1526
- throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);
1527
- return e.value = a.data, e;
1524
+ const i = at(t.value, r.value);
1525
+ if (!i.valid)
1526
+ throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);
1527
+ return e.value = i.data, e;
1528
1528
  }
1529
1529
  const ta = /* @__PURE__ */ p("$ZodRecord", (e, t) => {
1530
1530
  Z.init(e, t), e._zod.parse = (r, n) => {
@@ -1536,13 +1536,13 @@ const ta = /* @__PURE__ */ p("$ZodRecord", (e, t) => {
1536
1536
  input: o,
1537
1537
  inst: e
1538
1538
  }), r;
1539
- const s = [], a = t.keyType._zod.values;
1540
- if (a) {
1539
+ const s = [], i = t.keyType._zod.values;
1540
+ if (i) {
1541
1541
  r.value = {};
1542
- const i = /* @__PURE__ */ new Set();
1543
- for (const u of a)
1542
+ const a = /* @__PURE__ */ new Set();
1543
+ for (const u of i)
1544
1544
  if (typeof u == "string" || typeof u == "number" || typeof u == "symbol") {
1545
- i.add(typeof u == "number" ? u.toString() : u);
1545
+ a.add(typeof u == "number" ? u.toString() : u);
1546
1546
  const l = t.valueType._zod.run({ value: o[u], issues: [] }, n);
1547
1547
  l instanceof Promise ? s.push(l.then((d) => {
1548
1548
  d.issues.length && r.issues.push(...fe(u, d.issues)), r.value[u] = d.value;
@@ -1550,7 +1550,7 @@ const ta = /* @__PURE__ */ p("$ZodRecord", (e, t) => {
1550
1550
  }
1551
1551
  let c;
1552
1552
  for (const u in o)
1553
- i.has(u) || (c = c ?? [], c.push(u));
1553
+ a.has(u) || (c = c ?? [], c.push(u));
1554
1554
  c && c.length > 0 && r.issues.push({
1555
1555
  code: "unrecognized_keys",
1556
1556
  input: o,
@@ -1559,33 +1559,33 @@ const ta = /* @__PURE__ */ p("$ZodRecord", (e, t) => {
1559
1559
  });
1560
1560
  } else {
1561
1561
  r.value = {};
1562
- for (const i of Reflect.ownKeys(o)) {
1563
- if (i === "__proto__")
1562
+ for (const a of Reflect.ownKeys(o)) {
1563
+ if (a === "__proto__")
1564
1564
  continue;
1565
- let c = t.keyType._zod.run({ value: i, issues: [] }, n);
1565
+ let c = t.keyType._zod.run({ value: a, issues: [] }, n);
1566
1566
  if (c instanceof Promise)
1567
1567
  throw new Error("Async schemas not supported in object keys currently");
1568
- if (typeof i == "string" && Pr.test(i) && c.issues.length && c.issues.some((d) => d.code === "invalid_type" && d.expected === "number")) {
1569
- const d = t.keyType._zod.run({ value: Number(i), issues: [] }, n);
1568
+ if (typeof a == "string" && Pr.test(a) && c.issues.length && c.issues.some((d) => d.code === "invalid_type" && d.expected === "number")) {
1569
+ const d = t.keyType._zod.run({ value: Number(a), issues: [] }, n);
1570
1570
  if (d instanceof Promise)
1571
1571
  throw new Error("Async schemas not supported in object keys currently");
1572
1572
  d.issues.length === 0 && (c = d);
1573
1573
  }
1574
1574
  if (c.issues.length) {
1575
- t.mode === "loose" ? r.value[i] = o[i] : r.issues.push({
1575
+ t.mode === "loose" ? r.value[a] = o[a] : r.issues.push({
1576
1576
  code: "invalid_key",
1577
1577
  origin: "record",
1578
1578
  issues: c.issues.map((d) => oe(d, n, ne())),
1579
- input: i,
1580
- path: [i],
1579
+ input: a,
1580
+ path: [a],
1581
1581
  inst: e
1582
1582
  });
1583
1583
  continue;
1584
1584
  }
1585
- const l = t.valueType._zod.run({ value: o[i], issues: [] }, n);
1585
+ const l = t.valueType._zod.run({ value: o[a], issues: [] }, n);
1586
1586
  l instanceof Promise ? s.push(l.then((d) => {
1587
- d.issues.length && r.issues.push(...fe(i, d.issues)), r.value[c.value] = d.value;
1588
- })) : (l.issues.length && r.issues.push(...fe(i, l.issues)), r.value[c.value] = l.value);
1587
+ d.issues.length && r.issues.push(...fe(a, d.issues)), r.value[c.value] = d.value;
1588
+ })) : (l.issues.length && r.issues.push(...fe(a, l.issues)), r.value[c.value] = l.value);
1589
1589
  }
1590
1590
  }
1591
1591
  return s.length ? Promise.all(s).then(() => r) : r;
@@ -1594,11 +1594,11 @@ const ta = /* @__PURE__ */ p("$ZodRecord", (e, t) => {
1594
1594
  Z.init(e, t);
1595
1595
  const r = jr(t.entries), n = new Set(r);
1596
1596
  e._zod.values = n, e._zod.pattern = new RegExp(`^(${r.filter((o) => po.has(typeof o)).map((o) => typeof o == "string" ? Ie(o) : o.toString()).join("|")})$`), e._zod.parse = (o, s) => {
1597
- const a = o.value;
1598
- return n.has(a) || o.issues.push({
1597
+ const i = o.value;
1598
+ return n.has(i) || o.issues.push({
1599
1599
  code: "invalid_value",
1600
1600
  values: r,
1601
- input: a,
1601
+ input: i,
1602
1602
  inst: e
1603
1603
  }), o;
1604
1604
  };
@@ -1621,7 +1621,7 @@ const ta = /* @__PURE__ */ p("$ZodRecord", (e, t) => {
1621
1621
  throw new Dr(e.constructor.name);
1622
1622
  const o = t.transform(r.value, r);
1623
1623
  if (n.async)
1624
- return (o instanceof Promise ? o : Promise.resolve(o)).then((a) => (r.value = a, r));
1624
+ return (o instanceof Promise ? o : Promise.resolve(o)).then((i) => (r.value = i, r));
1625
1625
  if (o instanceof Promise)
1626
1626
  throw new ge();
1627
1627
  return r.value = o, r;
@@ -1631,7 +1631,7 @@ function Yt(e, t) {
1631
1631
  return e.issues.length && t === void 0 ? { issues: [], value: void 0 } : e;
1632
1632
  }
1633
1633
  const Vr = /* @__PURE__ */ p("$ZodOptional", (e, t) => {
1634
- Z.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", j(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), j(e._zod, "pattern", () => {
1634
+ Z.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", O(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), O(e._zod, "pattern", () => {
1635
1635
  const r = t.innerType._zod.pattern;
1636
1636
  return r ? new RegExp(`^(${ft(r.source)})?$`) : void 0;
1637
1637
  }), e._zod.parse = (r, n) => {
@@ -1642,14 +1642,14 @@ const Vr = /* @__PURE__ */ p("$ZodOptional", (e, t) => {
1642
1642
  return r.value === void 0 ? r : t.innerType._zod.run(r, n);
1643
1643
  };
1644
1644
  }), sa = /* @__PURE__ */ p("$ZodExactOptional", (e, t) => {
1645
- Vr.init(e, t), j(e._zod, "values", () => t.innerType._zod.values), j(e._zod, "pattern", () => t.innerType._zod.pattern), e._zod.parse = (r, n) => t.innerType._zod.run(r, n);
1645
+ Vr.init(e, t), O(e._zod, "values", () => t.innerType._zod.values), O(e._zod, "pattern", () => t.innerType._zod.pattern), e._zod.parse = (r, n) => t.innerType._zod.run(r, n);
1646
1646
  }), aa = /* @__PURE__ */ p("$ZodNullable", (e, t) => {
1647
- Z.init(e, t), j(e._zod, "optin", () => t.innerType._zod.optin), j(e._zod, "optout", () => t.innerType._zod.optout), j(e._zod, "pattern", () => {
1647
+ Z.init(e, t), O(e._zod, "optin", () => t.innerType._zod.optin), O(e._zod, "optout", () => t.innerType._zod.optout), O(e._zod, "pattern", () => {
1648
1648
  const r = t.innerType._zod.pattern;
1649
1649
  return r ? new RegExp(`^(${ft(r.source)}|null)$`) : void 0;
1650
- }), j(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, null]) : void 0), e._zod.parse = (r, n) => r.value === null ? r : t.innerType._zod.run(r, n);
1650
+ }), O(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, null]) : void 0), e._zod.parse = (r, n) => r.value === null ? r : t.innerType._zod.run(r, n);
1651
1651
  }), ia = /* @__PURE__ */ p("$ZodDefault", (e, t) => {
1652
- Z.init(e, t), e._zod.optin = "optional", j(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (r, n) => {
1652
+ Z.init(e, t), e._zod.optin = "optional", O(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (r, n) => {
1653
1653
  if (n.direction === "backward")
1654
1654
  return t.innerType._zod.run(r, n);
1655
1655
  if (r.value === void 0)
@@ -1662,9 +1662,9 @@ function Qt(e, t) {
1662
1662
  return e.value === void 0 && (e.value = t.defaultValue), e;
1663
1663
  }
1664
1664
  const ua = /* @__PURE__ */ p("$ZodPrefault", (e, t) => {
1665
- Z.init(e, t), e._zod.optin = "optional", j(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (r, n) => (n.direction === "backward" || r.value === void 0 && (r.value = t.defaultValue), t.innerType._zod.run(r, n));
1665
+ Z.init(e, t), e._zod.optin = "optional", O(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (r, n) => (n.direction === "backward" || r.value === void 0 && (r.value = t.defaultValue), t.innerType._zod.run(r, n));
1666
1666
  }), ca = /* @__PURE__ */ p("$ZodNonOptional", (e, t) => {
1667
- Z.init(e, t), j(e._zod, "values", () => {
1667
+ Z.init(e, t), O(e._zod, "values", () => {
1668
1668
  const r = t.innerType._zod.values;
1669
1669
  return r ? new Set([...r].filter((n) => n !== void 0)) : void 0;
1670
1670
  }), e._zod.parse = (r, n) => {
@@ -1681,14 +1681,14 @@ function Jt(e, t) {
1681
1681
  }), e;
1682
1682
  }
1683
1683
  const la = /* @__PURE__ */ p("$ZodCatch", (e, t) => {
1684
- Z.init(e, t), j(e._zod, "optin", () => t.innerType._zod.optin), j(e._zod, "optout", () => t.innerType._zod.optout), j(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (r, n) => {
1684
+ Z.init(e, t), O(e._zod, "optin", () => t.innerType._zod.optin), O(e._zod, "optout", () => t.innerType._zod.optout), O(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (r, n) => {
1685
1685
  if (n.direction === "backward")
1686
1686
  return t.innerType._zod.run(r, n);
1687
1687
  const o = t.innerType._zod.run(r, n);
1688
1688
  return o instanceof Promise ? o.then((s) => (r.value = s.value, s.issues.length && (r.value = t.catchValue({
1689
1689
  ...r,
1690
1690
  error: {
1691
- issues: s.issues.map((a) => oe(a, n, ne()))
1691
+ issues: s.issues.map((i) => oe(i, n, ne()))
1692
1692
  },
1693
1693
  input: r.value
1694
1694
  }), r.issues = []), r)) : (r.value = o.value, o.issues.length && (r.value = t.catchValue({
@@ -1700,10 +1700,10 @@ const la = /* @__PURE__ */ p("$ZodCatch", (e, t) => {
1700
1700
  }), r.issues = []), r);
1701
1701
  };
1702
1702
  }), da = /* @__PURE__ */ p("$ZodPipe", (e, t) => {
1703
- Z.init(e, t), j(e._zod, "values", () => t.in._zod.values), j(e._zod, "optin", () => t.in._zod.optin), j(e._zod, "optout", () => t.out._zod.optout), j(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (r, n) => {
1703
+ Z.init(e, t), O(e._zod, "values", () => t.in._zod.values), O(e._zod, "optin", () => t.in._zod.optin), O(e._zod, "optout", () => t.out._zod.optout), O(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (r, n) => {
1704
1704
  if (n.direction === "backward") {
1705
1705
  const s = t.out._zod.run(r, n);
1706
- return s instanceof Promise ? s.then((a) => xe(a, t.in, n)) : xe(s, t.in, n);
1706
+ return s instanceof Promise ? s.then((i) => xe(i, t.in, n)) : xe(s, t.in, n);
1707
1707
  }
1708
1708
  const o = t.in._zod.run(r, n);
1709
1709
  return o instanceof Promise ? o.then((s) => xe(s, t.out, n)) : xe(o, t.out, n);
@@ -1713,10 +1713,10 @@ function xe(e, t, r) {
1713
1713
  return e.issues.length ? (e.aborted = !0, e) : t._zod.run({ value: e.value, issues: e.issues }, r);
1714
1714
  }
1715
1715
  const pa = /* @__PURE__ */ p("$ZodReadonly", (e, t) => {
1716
- Z.init(e, t), j(e._zod, "propValues", () => t.innerType._zod.propValues), j(e._zod, "values", () => t.innerType._zod.values), j(e._zod, "optin", () => {
1716
+ Z.init(e, t), O(e._zod, "propValues", () => t.innerType._zod.propValues), O(e._zod, "values", () => t.innerType._zod.values), O(e._zod, "optin", () => {
1717
1717
  var r, n;
1718
1718
  return (n = (r = t.innerType) == null ? void 0 : r._zod) == null ? void 0 : n.optin;
1719
- }), j(e._zod, "optout", () => {
1719
+ }), O(e._zod, "optout", () => {
1720
1720
  var r, n;
1721
1721
  return (n = (r = t.innerType) == null ? void 0 : r._zod) == null ? void 0 : n.optout;
1722
1722
  }), e._zod.parse = (r, n) => {
@@ -1730,16 +1730,16 @@ function Ft(e) {
1730
1730
  return e.value = Object.freeze(e.value), e;
1731
1731
  }
1732
1732
  const fa = /* @__PURE__ */ p("$ZodLazy", (e, t) => {
1733
- Z.init(e, t), j(e._zod, "innerType", () => t.getter()), j(e._zod, "pattern", () => {
1733
+ Z.init(e, t), O(e._zod, "innerType", () => t.getter()), O(e._zod, "pattern", () => {
1734
1734
  var r, n;
1735
1735
  return (n = (r = e._zod.innerType) == null ? void 0 : r._zod) == null ? void 0 : n.pattern;
1736
- }), j(e._zod, "propValues", () => {
1736
+ }), O(e._zod, "propValues", () => {
1737
1737
  var r, n;
1738
1738
  return (n = (r = e._zod.innerType) == null ? void 0 : r._zod) == null ? void 0 : n.propValues;
1739
- }), j(e._zod, "optin", () => {
1739
+ }), O(e._zod, "optin", () => {
1740
1740
  var r, n;
1741
1741
  return ((n = (r = e._zod.innerType) == null ? void 0 : r._zod) == null ? void 0 : n.optin) ?? void 0;
1742
- }), j(e._zod, "optout", () => {
1742
+ }), O(e._zod, "optout", () => {
1743
1743
  var r, n;
1744
1744
  return ((n = (r = e._zod.innerType) == null ? void 0 : r._zod) == null ? void 0 : n.optout) ?? void 0;
1745
1745
  }), e._zod.parse = (r, n) => e._zod.innerType._zod.run(r, n);
@@ -1763,7 +1763,7 @@ function Vt(e, t, r, n) {
1763
1763
  continue: !n._zod.def.abort
1764
1764
  // params: inst._zod.def.params,
1765
1765
  };
1766
- n._zod.def.params && (o.params = n._zod.def.params), t.issues.push(Ae(o));
1766
+ n._zod.def.params && (o.params = n._zod.def.params), t.issues.push(ze(o));
1767
1767
  }
1768
1768
  }
1769
1769
  var Bt;
@@ -1800,7 +1800,7 @@ function ha() {
1800
1800
  return new ma();
1801
1801
  }
1802
1802
  (Bt = globalThis).__zod_globalRegistry ?? (Bt.__zod_globalRegistry = ha());
1803
- const Ne = globalThis.__zod_globalRegistry;
1803
+ const be = globalThis.__zod_globalRegistry;
1804
1804
  // @__NO_SIDE_EFFECTS__
1805
1805
  function Ia(e, t) {
1806
1806
  return new e({
@@ -2297,10 +2297,10 @@ function ui(e, t, r) {
2297
2297
  function ci(e) {
2298
2298
  const t = /* @__PURE__ */ li((r) => (r.addIssue = (n) => {
2299
2299
  if (typeof n == "string")
2300
- r.issues.push(Ae(n, r.value, t._zod.def));
2300
+ r.issues.push(ze(n, r.value, t._zod.def));
2301
2301
  else {
2302
2302
  const o = n;
2303
- o.fatal && (o.continue = !1), o.code ?? (o.code = "custom"), o.input ?? (o.input = r.value), o.inst ?? (o.inst = t), o.continue ?? (o.continue = !t._zod.def.abort), r.issues.push(Ae(o));
2303
+ o.fatal && (o.continue = !1), o.code ?? (o.code = "custom"), o.input ?? (o.input = r.value), o.inst ?? (o.inst = t), o.continue ?? (o.continue = !t._zod.def.abort), r.issues.push(ze(o));
2304
2304
  }
2305
2305
  }, e(r.value, r)));
2306
2306
  return t;
@@ -2317,7 +2317,7 @@ function Re(e) {
2317
2317
  let t = (e == null ? void 0 : e.target) ?? "draft-2020-12";
2318
2318
  return t === "draft-4" && (t = "draft-04"), t === "draft-7" && (t = "draft-07"), {
2319
2319
  processors: e.processors ?? {},
2320
- metadataRegistry: (e == null ? void 0 : e.metadata) ?? Ne,
2320
+ metadataRegistry: (e == null ? void 0 : e.metadata) ?? be,
2321
2321
  target: t,
2322
2322
  unrepresentable: (e == null ? void 0 : e.unrepresentable) ?? "throw",
2323
2323
  override: (e == null ? void 0 : e.override) ?? (() => {
@@ -2336,55 +2336,55 @@ function S(e, t, r = { path: [], schemaPath: [] }) {
2336
2336
  const o = e._zod.def, s = t.seen.get(e);
2337
2337
  if (s)
2338
2338
  return s.count++, r.schemaPath.includes(e) && (s.cycle = r.path), s.schema;
2339
- const a = { schema: {}, count: 1, cycle: void 0, path: r.path };
2340
- t.seen.set(e, a);
2341
- const i = (d = (l = e._zod).toJSONSchema) == null ? void 0 : d.call(l);
2342
- if (i)
2343
- a.schema = i;
2339
+ const i = { schema: {}, count: 1, cycle: void 0, path: r.path };
2340
+ t.seen.set(e, i);
2341
+ const a = (d = (l = e._zod).toJSONSchema) == null ? void 0 : d.call(l);
2342
+ if (a)
2343
+ i.schema = a;
2344
2344
  else {
2345
- const I = {
2345
+ const y = {
2346
2346
  ...r,
2347
2347
  schemaPath: [...r.schemaPath, e],
2348
2348
  path: r.path
2349
2349
  };
2350
2350
  if (e._zod.processJSONSchema)
2351
- e._zod.processJSONSchema(t, a.schema, I);
2351
+ e._zod.processJSONSchema(t, i.schema, y);
2352
2352
  else {
2353
- const M = a.schema, m = t.processors[o.type];
2354
- if (!m)
2353
+ const M = i.schema, h = t.processors[o.type];
2354
+ if (!h)
2355
2355
  throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);
2356
- m(e, t, M, I);
2356
+ h(e, t, M, y);
2357
2357
  }
2358
2358
  const g = e._zod.parent;
2359
- g && (a.ref || (a.ref = g), S(g, t, I), t.seen.get(g).isParent = !0);
2359
+ g && (i.ref || (i.ref = g), S(g, t, y), t.seen.get(g).isParent = !0);
2360
2360
  }
2361
2361
  const c = t.metadataRegistry.get(e);
2362
- return c && Object.assign(a.schema, c), t.io === "input" && U(e) && (delete a.schema.examples, delete a.schema.default), t.io === "input" && a.schema._prefault && ((n = a.schema).default ?? (n.default = a.schema._prefault)), delete a.schema._prefault, t.seen.get(e).schema;
2362
+ return c && Object.assign(i.schema, c), t.io === "input" && U(e) && (delete i.schema.examples, delete i.schema.default), t.io === "input" && i.schema._prefault && ((n = i.schema).default ?? (n.default = i.schema._prefault)), delete i.schema._prefault, t.seen.get(e).schema;
2363
2363
  }
2364
2364
  function $e(e, t) {
2365
- var a, i, c, u;
2365
+ var i, a, c, u;
2366
2366
  const r = e.seen.get(t);
2367
2367
  if (!r)
2368
2368
  throw new Error("Unprocessed schema. This is a bug in Zod.");
2369
2369
  const n = /* @__PURE__ */ new Map();
2370
2370
  for (const l of e.seen.entries()) {
2371
- const d = (a = e.metadataRegistry.get(l[0])) == null ? void 0 : a.id;
2371
+ const d = (i = e.metadataRegistry.get(l[0])) == null ? void 0 : i.id;
2372
2372
  if (d) {
2373
- const I = n.get(d);
2374
- if (I && I !== l[0])
2373
+ const y = n.get(d);
2374
+ if (y && y !== l[0])
2375
2375
  throw new Error(`Duplicate schema id "${d}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);
2376
2376
  n.set(d, l[0]);
2377
2377
  }
2378
2378
  }
2379
2379
  const o = (l) => {
2380
- var m;
2380
+ var h;
2381
2381
  const d = e.target === "draft-2020-12" ? "$defs" : "definitions";
2382
2382
  if (e.external) {
2383
- const y = (m = e.external.registry.get(l[0])) == null ? void 0 : m.id, _ = e.external.uri ?? ((f) => f);
2384
- if (y)
2385
- return { ref: _(y) };
2386
- const A = l[1].defId ?? l[1].schema.id ?? `schema${e.counter++}`;
2387
- return l[1].defId = A, { defId: A, ref: `${_("__shared")}#/${d}/${A}` };
2383
+ const m = (h = e.external.registry.get(l[0])) == null ? void 0 : h.id, b = e.external.uri ?? ((f) => f);
2384
+ if (m)
2385
+ return { ref: b(m) };
2386
+ const N = l[1].defId ?? l[1].schema.id ?? `schema${e.counter++}`;
2387
+ return l[1].defId = N, { defId: N, ref: `${b("__shared")}#/${d}/${N}` };
2388
2388
  }
2389
2389
  if (l[1] === r)
2390
2390
  return { ref: "#" };
@@ -2393,18 +2393,18 @@ function $e(e, t) {
2393
2393
  }, s = (l) => {
2394
2394
  if (l[1].schema.$ref)
2395
2395
  return;
2396
- const d = l[1], { ref: I, defId: g } = o(l);
2396
+ const d = l[1], { ref: y, defId: g } = o(l);
2397
2397
  d.def = { ...d.schema }, g && (d.defId = g);
2398
2398
  const M = d.schema;
2399
- for (const m in M)
2400
- delete M[m];
2401
- M.$ref = I;
2399
+ for (const h in M)
2400
+ delete M[h];
2401
+ M.$ref = y;
2402
2402
  };
2403
2403
  if (e.cycles === "throw")
2404
2404
  for (const l of e.seen.entries()) {
2405
2405
  const d = l[1];
2406
2406
  if (d.cycle)
2407
- throw new Error(`Cycle detected: #/${(i = d.cycle) == null ? void 0 : i.join("/")}/<root>
2407
+ throw new Error(`Cycle detected: #/${(a = d.cycle) == null ? void 0 : a.join("/")}/<root>
2408
2408
 
2409
2409
  Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`);
2410
2410
  }
@@ -2436,7 +2436,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
2436
2436
  }
2437
2437
  }
2438
2438
  function Ue(e, t) {
2439
- var a, i, c;
2439
+ var i, a, c;
2440
2440
  const r = e.seen.get(t);
2441
2441
  if (!r)
2442
2442
  throw new Error("Unprocessed schema. This is a bug in Zod.");
@@ -2444,24 +2444,24 @@ function Ue(e, t) {
2444
2444
  const l = e.seen.get(u);
2445
2445
  if (l.ref === null)
2446
2446
  return;
2447
- const d = l.def ?? l.schema, I = { ...d }, g = l.ref;
2447
+ const d = l.def ?? l.schema, y = { ...d }, g = l.ref;
2448
2448
  if (l.ref = null, g) {
2449
2449
  n(g);
2450
- const m = e.seen.get(g), y = m.schema;
2451
- if (y.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (d.allOf = d.allOf ?? [], d.allOf.push(y)) : Object.assign(d, y), Object.assign(d, I), u._zod.parent === g)
2452
- for (const A in d)
2453
- A === "$ref" || A === "allOf" || A in I || delete d[A];
2454
- if (y.$ref)
2455
- for (const A in d)
2456
- A === "$ref" || A === "allOf" || A in m.def && JSON.stringify(d[A]) === JSON.stringify(m.def[A]) && delete d[A];
2450
+ const h = e.seen.get(g), m = h.schema;
2451
+ if (m.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (d.allOf = d.allOf ?? [], d.allOf.push(m)) : Object.assign(d, m), Object.assign(d, y), u._zod.parent === g)
2452
+ for (const N in d)
2453
+ N === "$ref" || N === "allOf" || N in y || delete d[N];
2454
+ if (m.$ref)
2455
+ for (const N in d)
2456
+ N === "$ref" || N === "allOf" || N in h.def && JSON.stringify(d[N]) === JSON.stringify(h.def[N]) && delete d[N];
2457
2457
  }
2458
2458
  const M = u._zod.parent;
2459
2459
  if (M && M !== g) {
2460
2460
  n(M);
2461
- const m = e.seen.get(M);
2462
- if (m != null && m.schema.$ref && (d.$ref = m.schema.$ref, m.def))
2463
- for (const y in d)
2464
- y === "$ref" || y === "allOf" || y in m.def && JSON.stringify(d[y]) === JSON.stringify(m.def[y]) && delete d[y];
2461
+ const h = e.seen.get(M);
2462
+ if (h != null && h.schema.$ref && (d.$ref = h.schema.$ref, h.def))
2463
+ for (const m in d)
2464
+ m === "$ref" || m === "allOf" || m in h.def && JSON.stringify(d[m]) === JSON.stringify(h.def[m]) && delete d[m];
2465
2465
  }
2466
2466
  e.override({
2467
2467
  zodSchema: u,
@@ -2472,8 +2472,8 @@ function Ue(e, t) {
2472
2472
  for (const u of [...e.seen.entries()].reverse())
2473
2473
  n(u[0]);
2474
2474
  const o = {};
2475
- if (e.target === "draft-2020-12" ? o.$schema = "https://json-schema.org/draft/2020-12/schema" : e.target === "draft-07" ? o.$schema = "http://json-schema.org/draft-07/schema#" : e.target === "draft-04" ? o.$schema = "http://json-schema.org/draft-04/schema#" : e.target, (a = e.external) != null && a.uri) {
2476
- const u = (i = e.external.registry.get(t)) == null ? void 0 : i.id;
2475
+ if (e.target === "draft-2020-12" ? o.$schema = "https://json-schema.org/draft/2020-12/schema" : e.target === "draft-07" ? o.$schema = "http://json-schema.org/draft-07/schema#" : e.target === "draft-04" ? o.$schema = "http://json-schema.org/draft-04/schema#" : e.target, (i = e.external) != null && i.uri) {
2476
+ const u = (a = e.external.registry.get(t)) == null ? void 0 : a.id;
2477
2477
  if (!u)
2478
2478
  throw new Error("Schema is missing an `id` property");
2479
2479
  o.$id = e.external.uri(u);
@@ -2548,8 +2548,8 @@ const di = (e, t = {}) => (r) => {
2548
2548
  const n = Re({ ...r, processors: t });
2549
2549
  return S(e, n), $e(n, e), Ue(n, e);
2550
2550
  }, Ye = (e, t, r = {}) => (n) => {
2551
- const { libraryOptions: o, target: s } = n ?? {}, a = Re({ ...o ?? {}, target: s, io: t, processors: r });
2552
- return S(e, a), $e(a, e), Ue(a, e);
2551
+ const { libraryOptions: o, target: s } = n ?? {}, i = Re({ ...o ?? {}, target: s, io: t, processors: r });
2552
+ return S(e, i), $e(i, e), Ue(i, e);
2553
2553
  }, pi = {
2554
2554
  guid: "uuid",
2555
2555
  url: "uri",
@@ -2560,8 +2560,8 @@ const di = (e, t = {}) => (r) => {
2560
2560
  }, Wr = (e, t, r, n) => {
2561
2561
  const o = r;
2562
2562
  o.type = "string";
2563
- const { minimum: s, maximum: a, format: i, patterns: c, contentEncoding: u } = e._zod.bag;
2564
- if (typeof s == "number" && (o.minLength = s), typeof a == "number" && (o.maxLength = a), i && (o.format = pi[i] ?? i, o.format === "" && delete o.format, i === "time" && delete o.format), u && (o.contentEncoding = u), c && c.size > 0) {
2563
+ const { minimum: s, maximum: i, format: a, patterns: c, contentEncoding: u } = e._zod.bag;
2564
+ if (typeof s == "number" && (o.minLength = s), typeof i == "number" && (o.maxLength = i), a && (o.format = pi[a] ?? a, o.format === "" && delete o.format, a === "time" && delete o.format), u && (o.contentEncoding = u), c && c.size > 0) {
2565
2565
  const l = [...c];
2566
2566
  l.length === 1 ? o.pattern = l[0].source : l.length > 1 && (o.allOf = [
2567
2567
  ...l.map((d) => ({
@@ -2571,8 +2571,8 @@ const di = (e, t = {}) => (r) => {
2571
2571
  ]);
2572
2572
  }
2573
2573
  }, Hr = (e, t, r, n) => {
2574
- const o = r, { minimum: s, maximum: a, format: i, multipleOf: c, exclusiveMaximum: u, exclusiveMinimum: l } = e._zod.bag;
2575
- typeof i == "string" && i.includes("int") ? o.type = "integer" : o.type = "number", typeof l == "number" && (t.target === "draft-04" || t.target === "openapi-3.0" ? (o.minimum = l, o.exclusiveMinimum = !0) : o.exclusiveMinimum = l), typeof s == "number" && (o.minimum = s, typeof l == "number" && t.target !== "draft-04" && (l >= s ? delete o.minimum : delete o.exclusiveMinimum)), typeof u == "number" && (t.target === "draft-04" || t.target === "openapi-3.0" ? (o.maximum = u, o.exclusiveMaximum = !0) : o.exclusiveMaximum = u), typeof a == "number" && (o.maximum = a, typeof u == "number" && t.target !== "draft-04" && (u <= a ? delete o.maximum : delete o.exclusiveMaximum)), typeof c == "number" && (o.multipleOf = c);
2574
+ const o = r, { minimum: s, maximum: i, format: a, multipleOf: c, exclusiveMaximum: u, exclusiveMinimum: l } = e._zod.bag;
2575
+ typeof a == "string" && a.includes("int") ? o.type = "integer" : o.type = "number", typeof l == "number" && (t.target === "draft-04" || t.target === "openapi-3.0" ? (o.minimum = l, o.exclusiveMinimum = !0) : o.exclusiveMinimum = l), typeof s == "number" && (o.minimum = s, typeof l == "number" && t.target !== "draft-04" && (l >= s ? delete o.minimum : delete o.exclusiveMinimum)), typeof u == "number" && (t.target === "draft-04" || t.target === "openapi-3.0" ? (o.maximum = u, o.exclusiveMaximum = !0) : o.exclusiveMaximum = u), typeof i == "number" && (o.maximum = i, typeof u == "number" && t.target !== "draft-04" && (u <= i ? delete o.maximum : delete o.exclusiveMaximum)), typeof c == "number" && (o.multipleOf = c);
2576
2576
  }, Xr = (e, t, r, n) => {
2577
2577
  r.type = "boolean";
2578
2578
  }, fi = (e, t, r, n) => {
@@ -2598,25 +2598,25 @@ const di = (e, t = {}) => (r) => {
2598
2598
  throw new Error("Date cannot be represented in JSON Schema");
2599
2599
  }, tn = (e, t, r, n) => {
2600
2600
  const o = e._zod.def, s = jr(o.entries);
2601
- s.every((a) => typeof a == "number") && (r.type = "number"), s.every((a) => typeof a == "string") && (r.type = "string"), r.enum = s;
2601
+ s.every((i) => typeof i == "number") && (r.type = "number"), s.every((i) => typeof i == "string") && (r.type = "string"), r.enum = s;
2602
2602
  }, rn = (e, t, r, n) => {
2603
2603
  const o = e._zod.def, s = [];
2604
- for (const a of o.values)
2605
- if (a === void 0) {
2604
+ for (const i of o.values)
2605
+ if (i === void 0) {
2606
2606
  if (t.unrepresentable === "throw")
2607
2607
  throw new Error("Literal `undefined` cannot be represented in JSON Schema");
2608
- } else if (typeof a == "bigint") {
2608
+ } else if (typeof i == "bigint") {
2609
2609
  if (t.unrepresentable === "throw")
2610
2610
  throw new Error("BigInt literals cannot be represented in JSON Schema");
2611
- s.push(Number(a));
2611
+ s.push(Number(i));
2612
2612
  } else
2613
- s.push(a);
2613
+ s.push(i);
2614
2614
  if (s.length !== 0)
2615
2615
  if (s.length === 1) {
2616
- const a = s[0];
2617
- r.type = a === null ? "null" : typeof a, t.target === "draft-04" || t.target === "openapi-3.0" ? r.enum = [a] : r.const = a;
2616
+ const i = s[0];
2617
+ r.type = i === null ? "null" : typeof i, t.target === "draft-04" || t.target === "openapi-3.0" ? r.enum = [i] : r.const = i;
2618
2618
  } else
2619
- s.every((a) => typeof a == "number") && (r.type = "number"), s.every((a) => typeof a == "string") && (r.type = "string"), s.every((a) => typeof a == "boolean") && (r.type = "boolean"), s.every((a) => a === null) && (r.type = "null"), r.enum = s;
2619
+ s.every((i) => typeof i == "number") && (r.type = "number"), s.every((i) => typeof i == "string") && (r.type = "string"), s.every((i) => typeof i == "boolean") && (r.type = "boolean"), s.every((i) => i === null) && (r.type = "null"), r.enum = s;
2620
2620
  }, vi = (e, t, r, n) => {
2621
2621
  if (t.unrepresentable === "throw")
2622
2622
  throw new Error("NaN cannot be represented in JSON Schema");
@@ -2630,8 +2630,8 @@ const di = (e, t = {}) => (r) => {
2630
2630
  type: "string",
2631
2631
  format: "binary",
2632
2632
  contentEncoding: "binary"
2633
- }, { minimum: a, maximum: i, mime: c } = e._zod.bag;
2634
- a !== void 0 && (s.minLength = a), i !== void 0 && (s.maxLength = i), c ? c.length === 1 ? (s.contentMediaType = c[0], Object.assign(o, s)) : (Object.assign(o, s), o.anyOf = c.map((u) => ({ contentMediaType: u }))) : Object.assign(o, s);
2633
+ }, { minimum: i, maximum: a, mime: c } = e._zod.bag;
2634
+ i !== void 0 && (s.minLength = i), a !== void 0 && (s.maxLength = a), c ? c.length === 1 ? (s.contentMediaType = c[0], Object.assign(o, s)) : (Object.assign(o, s), o.anyOf = c.map((u) => ({ contentMediaType: u }))) : Object.assign(o, s);
2635
2635
  }, Ni = (e, t, r, n) => {
2636
2636
  r.type = "boolean";
2637
2637
  }, nn = (e, t, r, n) => {
@@ -2650,19 +2650,19 @@ const di = (e, t = {}) => (r) => {
2650
2650
  if (t.unrepresentable === "throw")
2651
2651
  throw new Error("Set cannot be represented in JSON Schema");
2652
2652
  }, sn = (e, t, r, n) => {
2653
- const o = r, s = e._zod.def, { minimum: a, maximum: i } = e._zod.bag;
2654
- typeof a == "number" && (o.minItems = a), typeof i == "number" && (o.maxItems = i), o.type = "array", o.items = S(s.element, t, { ...n, path: [...n.path, "items"] });
2653
+ const o = r, s = e._zod.def, { minimum: i, maximum: a } = e._zod.bag;
2654
+ typeof i == "number" && (o.minItems = i), typeof a == "number" && (o.maxItems = a), o.type = "array", o.items = S(s.element, t, { ...n, path: [...n.path, "items"] });
2655
2655
  }, an = (e, t, r, n) => {
2656
2656
  var u;
2657
2657
  const o = r, s = e._zod.def;
2658
2658
  o.type = "object", o.properties = {};
2659
- const a = s.shape;
2660
- for (const l in a)
2661
- o.properties[l] = S(a[l], t, {
2659
+ const i = s.shape;
2660
+ for (const l in i)
2661
+ o.properties[l] = S(i[l], t, {
2662
2662
  ...n,
2663
2663
  path: [...n.path, "properties", l]
2664
2664
  });
2665
- const i = new Set(Object.keys(a)), c = new Set([...i].filter((l) => {
2665
+ const a = new Set(Object.keys(i)), c = new Set([...a].filter((l) => {
2666
2666
  const d = s.shape[l]._zod;
2667
2667
  return t.io === "input" ? d.optin === void 0 : d.optout === void 0;
2668
2668
  }));
@@ -2671,32 +2671,32 @@ const di = (e, t = {}) => (r) => {
2671
2671
  path: [...n.path, "additionalProperties"]
2672
2672
  })) : t.io === "output" && (o.additionalProperties = !1);
2673
2673
  }, un = (e, t, r, n) => {
2674
- const o = e._zod.def, s = o.inclusive === !1, a = o.options.map((i, c) => S(i, t, {
2674
+ const o = e._zod.def, s = o.inclusive === !1, i = o.options.map((a, c) => S(a, t, {
2675
2675
  ...n,
2676
2676
  path: [...n.path, s ? "oneOf" : "anyOf", c]
2677
2677
  }));
2678
- s ? r.oneOf = a : r.anyOf = a;
2678
+ s ? r.oneOf = i : r.anyOf = i;
2679
2679
  }, cn = (e, t, r, n) => {
2680
2680
  const o = e._zod.def, s = S(o.left, t, {
2681
2681
  ...n,
2682
2682
  path: [...n.path, "allOf", 0]
2683
- }), a = S(o.right, t, {
2683
+ }), i = S(o.right, t, {
2684
2684
  ...n,
2685
2685
  path: [...n.path, "allOf", 1]
2686
- }), i = (u) => "allOf" in u && Object.keys(u).length === 1, c = [
2687
- ...i(s) ? s.allOf : [s],
2688
- ...i(a) ? a.allOf : [a]
2686
+ }), a = (u) => "allOf" in u && Object.keys(u).length === 1, c = [
2687
+ ...a(s) ? s.allOf : [s],
2688
+ ...a(i) ? i.allOf : [i]
2689
2689
  ];
2690
2690
  r.allOf = c;
2691
2691
  }, wi = (e, t, r, n) => {
2692
2692
  const o = r, s = e._zod.def;
2693
2693
  o.type = "array";
2694
- const a = t.target === "draft-2020-12" ? "prefixItems" : "items", i = t.target === "draft-2020-12" || t.target === "openapi-3.0" ? "items" : "additionalItems", c = s.items.map((I, g) => S(I, t, {
2694
+ const i = t.target === "draft-2020-12" ? "prefixItems" : "items", a = t.target === "draft-2020-12" || t.target === "openapi-3.0" ? "items" : "additionalItems", c = s.items.map((y, g) => S(y, t, {
2695
2695
  ...n,
2696
- path: [...n.path, a, g]
2696
+ path: [...n.path, i, g]
2697
2697
  })), u = s.rest ? S(s.rest, t, {
2698
2698
  ...n,
2699
- path: [...n.path, i, ...t.target === "openapi-3.0" ? [s.items.length] : []]
2699
+ path: [...n.path, a, ...t.target === "openapi-3.0" ? [s.items.length] : []]
2700
2700
  }) : null;
2701
2701
  t.target === "draft-2020-12" ? (o.prefixItems = c, u && (o.items = u)) : t.target === "openapi-3.0" ? (o.items = {
2702
2702
  anyOf: c
@@ -2706,7 +2706,7 @@ const di = (e, t = {}) => (r) => {
2706
2706
  }, ln = (e, t, r, n) => {
2707
2707
  const o = r, s = e._zod.def;
2708
2708
  o.type = "object";
2709
- const a = s.keyType, i = a._zod.bag, c = i == null ? void 0 : i.patterns;
2709
+ const i = s.keyType, a = i._zod.bag, c = a == null ? void 0 : a.patterns;
2710
2710
  if (s.mode === "loose" && c && c.size > 0) {
2711
2711
  const l = S(s.valueType, t, {
2712
2712
  ...n,
@@ -2723,14 +2723,14 @@ const di = (e, t = {}) => (r) => {
2723
2723
  ...n,
2724
2724
  path: [...n.path, "additionalProperties"]
2725
2725
  });
2726
- const u = a._zod.values;
2726
+ const u = i._zod.values;
2727
2727
  if (u) {
2728
2728
  const l = [...u].filter((d) => typeof d == "string" || typeof d == "number");
2729
2729
  l.length > 0 && (o.required = l);
2730
2730
  }
2731
2731
  }, dn = (e, t, r, n) => {
2732
- const o = e._zod.def, s = S(o.innerType, t, n), a = t.seen.get(e);
2733
- t.target === "openapi-3.0" ? (a.ref = o.innerType, r.nullable = !0) : r.anyOf = [s, { type: "null" }];
2732
+ const o = e._zod.def, s = S(o.innerType, t, n), i = t.seen.get(e);
2733
+ t.target === "openapi-3.0" ? (i.ref = o.innerType, r.nullable = !0) : r.anyOf = [s, { type: "null" }];
2734
2734
  }, pn = (e, t, r, n) => {
2735
2735
  const o = e._zod.def;
2736
2736
  S(o.innerType, t, n);
@@ -2751,18 +2751,18 @@ const di = (e, t = {}) => (r) => {
2751
2751
  S(o.innerType, t, n);
2752
2752
  const s = t.seen.get(e);
2753
2753
  s.ref = o.innerType;
2754
- let a;
2754
+ let i;
2755
2755
  try {
2756
- a = o.catchValue(void 0);
2756
+ i = o.catchValue(void 0);
2757
2757
  } catch {
2758
2758
  throw new Error("Dynamic catch values are not supported in JSON Schema");
2759
2759
  }
2760
- r.default = a;
2760
+ r.default = i;
2761
2761
  }, hn = (e, t, r, n) => {
2762
2762
  const o = e._zod.def, s = t.io === "input" ? o.in._zod.def.type === "transform" ? o.out : o.in : o.out;
2763
2763
  S(s, t, n);
2764
- const a = t.seen.get(e);
2765
- a.ref = s;
2764
+ const i = t.seen.get(e);
2765
+ i.ref = s;
2766
2766
  }, In = (e, t, r, n) => {
2767
2767
  const o = e._zod.def;
2768
2768
  S(o.innerType, t, n);
@@ -2831,23 +2831,23 @@ function ji(e, t) {
2831
2831
  const [u, l] = c;
2832
2832
  S(l, o);
2833
2833
  }
2834
- const a = {}, i = {
2834
+ const i = {}, a = {
2835
2835
  registry: n,
2836
2836
  uri: t == null ? void 0 : t.uri,
2837
2837
  defs: s
2838
2838
  };
2839
- o.external = i;
2839
+ o.external = a;
2840
2840
  for (const c of n._idmap.entries()) {
2841
2841
  const [u, l] = c;
2842
- $e(o, l), a[u] = Ue(o, l);
2842
+ $e(o, l), i[u] = Ue(o, l);
2843
2843
  }
2844
2844
  if (Object.keys(s).length > 0) {
2845
2845
  const c = o.target === "draft-2020-12" ? "$defs" : "definitions";
2846
- a.__shared = {
2846
+ i.__shared = {
2847
2847
  [c]: s
2848
2848
  };
2849
2849
  }
2850
- return { schemas: a };
2850
+ return { schemas: i };
2851
2851
  }
2852
2852
  const r = Re({ ...t, processors: qt });
2853
2853
  return S(e, r), $e(r, e), Ue(r, e);
@@ -2905,9 +2905,9 @@ const Pi = (e, t) => {
2905
2905
  // enumerable: false,
2906
2906
  }
2907
2907
  });
2908
- }, B = p("ZodError", Pi, {
2908
+ }, W = p("ZodError", Pi, {
2909
2909
  Parent: Error
2910
- }), Li = /* @__PURE__ */ mt(B), Ri = /* @__PURE__ */ ht(B), $i = /* @__PURE__ */ Ve(B), vn = /* @__PURE__ */ Be(B), Ui = /* @__PURE__ */ wo(B), Yi = /* @__PURE__ */ Do(B), Qi = /* @__PURE__ */ jo(B), Ji = /* @__PURE__ */ To(B), Fi = /* @__PURE__ */ Oo(B), Vi = /* @__PURE__ */ Eo(B), Bi = /* @__PURE__ */ Co(B), Gi = /* @__PURE__ */ ko(B), P = /* @__PURE__ */ p("ZodType", (e, t) => (Z.init(e, t), Object.assign(e["~standard"], {
2910
+ }), Li = /* @__PURE__ */ mt(W), Ri = /* @__PURE__ */ ht(W), $i = /* @__PURE__ */ Ve(W), vn = /* @__PURE__ */ Be(W), Ui = /* @__PURE__ */ wo(W), Yi = /* @__PURE__ */ Do(W), Qi = /* @__PURE__ */ jo(W), Ji = /* @__PURE__ */ To(W), Fi = /* @__PURE__ */ Oo(W), Vi = /* @__PURE__ */ Eo(W), Bi = /* @__PURE__ */ Co(W), Gi = /* @__PURE__ */ ko(W), P = /* @__PURE__ */ p("ZodType", (e, t) => (Z.init(e, t), Object.assign(e["~standard"], {
2911
2911
  jsonSchema: {
2912
2912
  input: Ye(e, "input"),
2913
2913
  output: Ye(e, "output")
@@ -2921,18 +2921,18 @@ const Pi = (e, t) => {
2921
2921
  parent: !0
2922
2922
  }), e.with = e.check, e.clone = (r, n) => ae(e, r, n), e.brand = () => e, e.register = (r, n) => (r.add(e, n), e), e.parse = (r, n) => Li(e, r, n, { callee: e.parse }), e.safeParse = (r, n) => $i(e, r, n), e.parseAsync = async (r, n) => Ri(e, r, n, { callee: e.parseAsync }), e.safeParseAsync = async (r, n) => vn(e, r, n), e.spa = e.safeParseAsync, e.encode = (r, n) => Ui(e, r, n), e.decode = (r, n) => Yi(e, r, n), e.encodeAsync = async (r, n) => Qi(e, r, n), e.decodeAsync = async (r, n) => Ji(e, r, n), e.safeEncode = (r, n) => Fi(e, r, n), e.safeDecode = (r, n) => Vi(e, r, n), e.safeEncodeAsync = async (r, n) => Bi(e, r, n), e.safeDecodeAsync = async (r, n) => Gi(e, r, n), e.refine = (r, n) => e.check(Ju(r, n)), e.superRefine = (r) => e.check(Fu(r)), e.overwrite = (r) => e.check(/* @__PURE__ */ ye(r)), e.optional = () => tr(e), e.exactOptional = () => Ou(e), e.nullable = () => rr(e), e.nullish = () => tr(rr(e)), e.nonoptional = (r) => Zu(e, r), e.array = () => ve(e), e.or = (r) => Q([e, r]), e.and = (r) => Au(e, r), e.transform = (r) => nr(e, ju(r)), e.default = (r) => ku(e, r), e.prefault = (r) => xu(e, r), e.catch = (r) => Lu(e, r), e.pipe = (r) => nr(e, r), e.readonly = () => Uu(e), e.describe = (r) => {
2923
2923
  const n = e.clone();
2924
- return Ne.add(n, { description: r }), n;
2924
+ return be.add(n, { description: r }), n;
2925
2925
  }, Object.defineProperty(e, "description", {
2926
2926
  get() {
2927
2927
  var r;
2928
- return (r = Ne.get(e)) == null ? void 0 : r.description;
2928
+ return (r = be.get(e)) == null ? void 0 : r.description;
2929
2929
  },
2930
2930
  configurable: !0
2931
2931
  }), e.meta = (...r) => {
2932
2932
  if (r.length === 0)
2933
- return Ne.get(e);
2933
+ return be.get(e);
2934
2934
  const n = e.clone();
2935
- return Ne.add(n, r[0]), n;
2935
+ return be.add(n, r[0]), n;
2936
2936
  }, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e.apply = (r) => r(e), e)), Mn = /* @__PURE__ */ p("_ZodString", (e, t) => {
2937
2937
  It.init(e, t), P.init(e, t), e._zod.processJSONSchema = (n, o, s) => Wr(e, n, o);
2938
2938
  const r = e._zod.bag;
@@ -2940,7 +2940,7 @@ const Pi = (e, t) => {
2940
2940
  }), Wi = /* @__PURE__ */ p("ZodString", (e, t) => {
2941
2941
  It.init(e, t), Mn.init(e, t), e.email = (r) => e.check(/* @__PURE__ */ ya(Hi, r)), e.url = (r) => e.check(/* @__PURE__ */ ba(Xi, r)), e.jwt = (r) => e.check(/* @__PURE__ */ La(pu, r)), e.emoji = (r) => e.check(/* @__PURE__ */ Aa(qi, r)), e.guid = (r) => e.check(/* @__PURE__ */ Gt(Kt, r)), e.uuid = (r) => e.check(/* @__PURE__ */ va(Ze, r)), e.uuidv4 = (r) => e.check(/* @__PURE__ */ Ma(Ze, r)), e.uuidv6 = (r) => e.check(/* @__PURE__ */ _a(Ze, r)), e.uuidv7 = (r) => e.check(/* @__PURE__ */ Na(Ze, r)), e.nanoid = (r) => e.check(/* @__PURE__ */ za(Ki, r)), e.guid = (r) => e.check(/* @__PURE__ */ Gt(Kt, r)), e.cuid = (r) => e.check(/* @__PURE__ */ wa(eu, r)), e.cuid2 = (r) => e.check(/* @__PURE__ */ Da(tu, r)), e.ulid = (r) => e.check(/* @__PURE__ */ ja(ru, r)), e.base64 = (r) => e.check(/* @__PURE__ */ xa(cu, r)), e.base64url = (r) => e.check(/* @__PURE__ */ Za(lu, r)), e.xid = (r) => e.check(/* @__PURE__ */ Ta(nu, r)), e.ksuid = (r) => e.check(/* @__PURE__ */ Oa(ou, r)), e.ipv4 = (r) => e.check(/* @__PURE__ */ Ea(su, r)), e.ipv6 = (r) => e.check(/* @__PURE__ */ Ca(au, r)), e.cidrv4 = (r) => e.check(/* @__PURE__ */ ka(iu, r)), e.cidrv6 = (r) => e.check(/* @__PURE__ */ Sa(uu, r)), e.e164 = (r) => e.check(/* @__PURE__ */ Pa(du, r)), e.datetime = (r) => e.check(Oi(r)), e.date = (r) => e.check(Ci(r)), e.time = (r) => e.check(Si(r)), e.duration = (r) => e.check(Zi(r));
2942
2942
  });
2943
- function h(e) {
2943
+ function I(e) {
2944
2944
  return /* @__PURE__ */ Ia(Wi, e);
2945
2945
  }
2946
2946
  const R = /* @__PURE__ */ p("ZodStringFormat", (e, t) => {
@@ -3028,7 +3028,7 @@ function ve(e, t) {
3028
3028
  return /* @__PURE__ */ ai(Mu, e, t);
3029
3029
  }
3030
3030
  const bn = /* @__PURE__ */ p("ZodObject", (e, t) => {
3031
- qs.init(e, t), P.init(e, t), e._zod.processJSONSchema = (r, n, o) => an(e, r, n, o), j(e, "shape", () => t.shape), e.keyof = () => zn(Object.keys(e._zod.def.shape)), e.catchall = (r) => e.clone({ ...e._zod.def, catchall: r }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: q() }), e.loose = () => e.clone({ ...e._zod.def, catchall: q() }), e.strict = () => e.clone({ ...e._zod.def, catchall: Nn() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (r) => Io(e, r), e.safeExtend = (r) => yo(e, r), e.merge = (r) => vo(e, r), e.pick = (r) => mo(e, r), e.omit = (r) => ho(e, r), e.partial = (...r) => Mo(wn, e, r[0]), e.required = (...r) => _o(Dn, e, r[0]);
3031
+ qs.init(e, t), P.init(e, t), e._zod.processJSONSchema = (r, n, o) => an(e, r, n, o), O(e, "shape", () => t.shape), e.keyof = () => zn(Object.keys(e._zod.def.shape)), e.catchall = (r) => e.clone({ ...e._zod.def, catchall: r }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: q() }), e.loose = () => e.clone({ ...e._zod.def, catchall: q() }), e.strict = () => e.clone({ ...e._zod.def, catchall: Nn() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (r) => Io(e, r), e.safeExtend = (r) => yo(e, r), e.merge = (r) => vo(e, r), e.pick = (r) => mo(e, r), e.omit = (r) => ho(e, r), e.partial = (...r) => Mo(wn, e, r[0]), e.required = (...r) => _o(Dn, e, r[0]);
3032
3032
  });
3033
3033
  function k(e, t) {
3034
3034
  const r = {
@@ -3080,7 +3080,7 @@ function Au(e, t) {
3080
3080
  const zu = /* @__PURE__ */ p("ZodRecord", (e, t) => {
3081
3081
  ta.init(e, t), P.init(e, t), e._zod.processJSONSchema = (r, n, o) => ln(e, r, n, o), e.keyType = t.keyType, e.valueType = t.valueType;
3082
3082
  });
3083
- function ze(e, t, r) {
3083
+ function we(e, t, r) {
3084
3084
  return new zu({
3085
3085
  type: "record",
3086
3086
  keyType: e,
@@ -3093,11 +3093,11 @@ const it = /* @__PURE__ */ p("ZodEnum", (e, t) => {
3093
3093
  const r = new Set(Object.keys(t.entries));
3094
3094
  e.extract = (n, o) => {
3095
3095
  const s = {};
3096
- for (const a of n)
3097
- if (r.has(a))
3098
- s[a] = t.entries[a];
3096
+ for (const i of n)
3097
+ if (r.has(i))
3098
+ s[i] = t.entries[i];
3099
3099
  else
3100
- throw new Error(`Key ${a} not found in enum`);
3100
+ throw new Error(`Key ${i} not found in enum`);
3101
3101
  return new it({
3102
3102
  ...t,
3103
3103
  checks: [],
@@ -3106,11 +3106,11 @@ const it = /* @__PURE__ */ p("ZodEnum", (e, t) => {
3106
3106
  });
3107
3107
  }, e.exclude = (n, o) => {
3108
3108
  const s = { ...t.entries };
3109
- for (const a of n)
3110
- if (r.has(a))
3111
- delete s[a];
3109
+ for (const i of n)
3110
+ if (r.has(i))
3111
+ delete s[i];
3112
3112
  else
3113
- throw new Error(`Key ${a} not found in enum`);
3113
+ throw new Error(`Key ${i} not found in enum`);
3114
3114
  return new it({
3115
3115
  ...t,
3116
3116
  checks: [],
@@ -3136,7 +3136,7 @@ const wu = /* @__PURE__ */ p("ZodLiteral", (e, t) => {
3136
3136
  }
3137
3137
  });
3138
3138
  });
3139
- function N(e, t) {
3139
+ function _(e, t) {
3140
3140
  return new wu({
3141
3141
  type: "literal",
3142
3142
  values: Array.isArray(e) ? e : [e],
@@ -3149,10 +3149,10 @@ const Du = /* @__PURE__ */ p("ZodTransform", (e, t) => {
3149
3149
  throw new Dr(e.constructor.name);
3150
3150
  r.addIssue = (s) => {
3151
3151
  if (typeof s == "string")
3152
- r.issues.push(Ae(s, r.value, t));
3152
+ r.issues.push(ze(s, r.value, t));
3153
3153
  else {
3154
- const a = s;
3155
- a.fatal && (a.continue = !1), a.code ?? (a.code = "custom"), a.input ?? (a.input = r.value), a.inst ?? (a.inst = e), r.issues.push(Ae(a));
3154
+ const i = s;
3155
+ i.fatal && (i.continue = !1), i.code ?? (i.code = "custom"), i.input ?? (i.input = r.value), i.inst ?? (i.inst = e), r.issues.push(ze(i));
3156
3156
  }
3157
3157
  };
3158
3158
  const o = t.transform(r.value, r);
@@ -3295,7 +3295,7 @@ function Qe(e, t = {}) {
3295
3295
  });
3296
3296
  }, r;
3297
3297
  }
3298
- var we;
3298
+ var De;
3299
3299
  (function(e) {
3300
3300
  e.assertEqual = (o) => {
3301
3301
  };
@@ -3307,31 +3307,31 @@ var we;
3307
3307
  }
3308
3308
  e.assertNever = r, e.arrayToEnum = (o) => {
3309
3309
  const s = {};
3310
- for (const a of o)
3311
- s[a] = a;
3310
+ for (const i of o)
3311
+ s[i] = i;
3312
3312
  return s;
3313
3313
  }, e.getValidEnumValues = (o) => {
3314
- const s = e.objectKeys(o).filter((i) => typeof o[o[i]] != "number"), a = {};
3315
- for (const i of s)
3316
- a[i] = o[i];
3317
- return e.objectValues(a);
3314
+ const s = e.objectKeys(o).filter((a) => typeof o[o[a]] != "number"), i = {};
3315
+ for (const a of s)
3316
+ i[a] = o[a];
3317
+ return e.objectValues(i);
3318
3318
  }, e.objectValues = (o) => e.objectKeys(o).map(function(s) {
3319
3319
  return o[s];
3320
3320
  }), e.objectKeys = typeof Object.keys == "function" ? (o) => Object.keys(o) : (o) => {
3321
3321
  const s = [];
3322
- for (const a in o)
3323
- Object.prototype.hasOwnProperty.call(o, a) && s.push(a);
3322
+ for (const i in o)
3323
+ Object.prototype.hasOwnProperty.call(o, i) && s.push(i);
3324
3324
  return s;
3325
3325
  }, e.find = (o, s) => {
3326
- for (const a of o)
3327
- if (s(a))
3328
- return a;
3326
+ for (const i of o)
3327
+ if (s(i))
3328
+ return i;
3329
3329
  }, e.isInteger = typeof Number.isInteger == "function" ? (o) => Number.isInteger(o) : (o) => typeof o == "number" && Number.isFinite(o) && Math.floor(o) === o;
3330
3330
  function n(o, s = " | ") {
3331
- return o.map((a) => typeof a == "string" ? `'${a}'` : a).join(s);
3331
+ return o.map((i) => typeof i == "string" ? `'${i}'` : i).join(s);
3332
3332
  }
3333
3333
  e.joinValues = n, e.jsonStringifyReplacer = (o, s) => typeof s == "bigint" ? s.toString() : s;
3334
- })(we || (we = {}));
3334
+ })(De || (De = {}));
3335
3335
  var or;
3336
3336
  (function(e) {
3337
3337
  e.mergeShapes = (t, r) => ({
@@ -3340,7 +3340,7 @@ var or;
3340
3340
  // second overwrites first
3341
3341
  });
3342
3342
  })(or || (or = {}));
3343
- we.arrayToEnum([
3343
+ De.arrayToEnum([
3344
3344
  "string",
3345
3345
  "nan",
3346
3346
  "number",
@@ -3362,7 +3362,7 @@ we.arrayToEnum([
3362
3362
  "map",
3363
3363
  "set"
3364
3364
  ]);
3365
- we.arrayToEnum([
3365
+ De.arrayToEnum([
3366
3366
  "invalid_type",
3367
3367
  "invalid_literal",
3368
3368
  "custom",
@@ -3397,20 +3397,20 @@ class Je extends Error {
3397
3397
  const r = t || function(s) {
3398
3398
  return s.message;
3399
3399
  }, n = { _errors: [] }, o = (s) => {
3400
- for (const a of s.issues)
3401
- if (a.code === "invalid_union")
3402
- a.unionErrors.map(o);
3403
- else if (a.code === "invalid_return_type")
3404
- o(a.returnTypeError);
3405
- else if (a.code === "invalid_arguments")
3406
- o(a.argumentsError);
3407
- else if (a.path.length === 0)
3408
- n._errors.push(r(a));
3400
+ for (const i of s.issues)
3401
+ if (i.code === "invalid_union")
3402
+ i.unionErrors.map(o);
3403
+ else if (i.code === "invalid_return_type")
3404
+ o(i.returnTypeError);
3405
+ else if (i.code === "invalid_arguments")
3406
+ o(i.argumentsError);
3407
+ else if (i.path.length === 0)
3408
+ n._errors.push(r(i));
3409
3409
  else {
3410
- let i = n, c = 0;
3411
- for (; c < a.path.length; ) {
3412
- const u = a.path[c];
3413
- c === a.path.length - 1 ? (i[u] = i[u] || { _errors: [] }, i[u]._errors.push(r(a))) : i[u] = i[u] || { _errors: [] }, i = i[u], c++;
3410
+ let a = n, c = 0;
3411
+ for (; c < i.path.length; ) {
3412
+ const u = i.path[c];
3413
+ c === i.path.length - 1 ? (a[u] = a[u] || { _errors: [] }, a[u]._errors.push(r(i))) : a[u] = a[u] || { _errors: [] }, a = a[u], c++;
3414
3414
  }
3415
3415
  }
3416
3416
  };
@@ -3424,7 +3424,7 @@ class Je extends Error {
3424
3424
  return this.message;
3425
3425
  }
3426
3426
  get message() {
3427
- return JSON.stringify(this.issues, we.jsonStringifyReplacer, 2);
3427
+ return JSON.stringify(this.issues, De.jsonStringifyReplacer, 2);
3428
3428
  }
3429
3429
  get isEmpty() {
3430
3430
  return this.issues.length === 0;
@@ -3448,10 +3448,10 @@ var sr;
3448
3448
  (function(e) {
3449
3449
  e.errToObj = (t) => typeof t == "string" ? { message: t } : t || {}, e.toString = (t) => typeof t == "string" ? t : t == null ? void 0 : t.message;
3450
3450
  })(sr || (sr = {}));
3451
- var b;
3451
+ var A;
3452
3452
  (function(e) {
3453
3453
  e.ZodString = "ZodString", e.ZodNumber = "ZodNumber", e.ZodNaN = "ZodNaN", e.ZodBigInt = "ZodBigInt", e.ZodBoolean = "ZodBoolean", e.ZodDate = "ZodDate", e.ZodSymbol = "ZodSymbol", e.ZodUndefined = "ZodUndefined", e.ZodNull = "ZodNull", e.ZodAny = "ZodAny", e.ZodUnknown = "ZodUnknown", e.ZodNever = "ZodNever", e.ZodVoid = "ZodVoid", e.ZodArray = "ZodArray", e.ZodObject = "ZodObject", e.ZodUnion = "ZodUnion", e.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", e.ZodIntersection = "ZodIntersection", e.ZodTuple = "ZodTuple", e.ZodRecord = "ZodRecord", e.ZodMap = "ZodMap", e.ZodSet = "ZodSet", e.ZodFunction = "ZodFunction", e.ZodLazy = "ZodLazy", e.ZodLiteral = "ZodLiteral", e.ZodEnum = "ZodEnum", e.ZodEffects = "ZodEffects", e.ZodNativeEnum = "ZodNativeEnum", e.ZodOptional = "ZodOptional", e.ZodNullable = "ZodNullable", e.ZodDefault = "ZodDefault", e.ZodCatch = "ZodCatch", e.ZodPromise = "ZodPromise", e.ZodBranded = "ZodBranded", e.ZodPipeline = "ZodPipeline", e.ZodReadonly = "ZodReadonly";
3454
- })(b || (b = {}));
3454
+ })(A || (A = {}));
3455
3455
  class ar extends Error {
3456
3456
  constructor(t, r) {
3457
3457
  super(t), this.name = "ParseError", this.type = r.type, this.field = r.field, this.value = r.value, this.line = r.line;
@@ -3465,56 +3465,56 @@ function Vu(e) {
3465
3465
  "`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?"
3466
3466
  );
3467
3467
  const { onEvent: t = Ke, onError: r = Ke, onRetry: n = Ke, onComment: o } = e;
3468
- let s = "", a = !0, i, c = "", u = "";
3469
- function l(m) {
3470
- const y = a ? m.replace(/^\xEF\xBB\xBF/, "") : m, [_, A] = Bu(`${s}${y}`);
3471
- for (const f of _)
3468
+ let s = "", i = !0, a, c = "", u = "";
3469
+ function l(h) {
3470
+ const m = i ? h.replace(/^\xEF\xBB\xBF/, "") : h, [b, N] = Bu(`${s}${m}`);
3471
+ for (const f of b)
3472
3472
  d(f);
3473
- s = A, a = !1;
3473
+ s = N, i = !1;
3474
3474
  }
3475
- function d(m) {
3476
- if (m === "") {
3475
+ function d(h) {
3476
+ if (h === "") {
3477
3477
  g();
3478
3478
  return;
3479
3479
  }
3480
- if (m.startsWith(":")) {
3481
- o && o(m.slice(m.startsWith(": ") ? 2 : 1));
3480
+ if (h.startsWith(":")) {
3481
+ o && o(h.slice(h.startsWith(": ") ? 2 : 1));
3482
3482
  return;
3483
3483
  }
3484
- const y = m.indexOf(":");
3485
- if (y !== -1) {
3486
- const _ = m.slice(0, y), A = m[y + 1] === " " ? 2 : 1, f = m.slice(y + A);
3487
- I(_, f, m);
3484
+ const m = h.indexOf(":");
3485
+ if (m !== -1) {
3486
+ const b = h.slice(0, m), N = h[m + 1] === " " ? 2 : 1, f = h.slice(m + N);
3487
+ y(b, f, h);
3488
3488
  return;
3489
3489
  }
3490
- I(m, "", m);
3490
+ y(h, "", h);
3491
3491
  }
3492
- function I(m, y, _) {
3493
- switch (m) {
3492
+ function y(h, m, b) {
3493
+ switch (h) {
3494
3494
  case "event":
3495
- u = y;
3495
+ u = m;
3496
3496
  break;
3497
3497
  case "data":
3498
- c = `${c}${y}
3498
+ c = `${c}${m}
3499
3499
  `;
3500
3500
  break;
3501
3501
  case "id":
3502
- i = y.includes("\0") ? void 0 : y;
3502
+ a = m.includes("\0") ? void 0 : m;
3503
3503
  break;
3504
3504
  case "retry":
3505
- /^\d+$/.test(y) ? n(parseInt(y, 10)) : r(
3506
- new ar(`Invalid \`retry\` value: "${y}"`, {
3505
+ /^\d+$/.test(m) ? n(parseInt(m, 10)) : r(
3506
+ new ar(`Invalid \`retry\` value: "${m}"`, {
3507
3507
  type: "invalid-retry",
3508
- value: y,
3509
- line: _
3508
+ value: m,
3509
+ line: b
3510
3510
  })
3511
3511
  );
3512
3512
  break;
3513
3513
  default:
3514
3514
  r(
3515
3515
  new ar(
3516
- `Unknown field "${m.length > 20 ? `${m.slice(0, 20)}…` : m}"`,
3517
- { type: "unknown-field", field: m, value: y, line: _ }
3516
+ `Unknown field "${h.length > 20 ? `${h.slice(0, 20)}…` : h}"`,
3517
+ { type: "unknown-field", field: h, value: m, line: b }
3518
3518
  )
3519
3519
  );
3520
3520
  break;
@@ -3522,16 +3522,16 @@ function Vu(e) {
3522
3522
  }
3523
3523
  function g() {
3524
3524
  c.length > 0 && t({
3525
- id: i,
3525
+ id: a,
3526
3526
  event: u || void 0,
3527
3527
  // If the data buffer's last character is a U+000A LINE FEED (LF) character,
3528
3528
  // then remove the last character from the data buffer.
3529
3529
  data: c.endsWith(`
3530
3530
  `) ? c.slice(0, -1) : c
3531
- }), i = void 0, c = "", u = "";
3531
+ }), a = void 0, c = "", u = "";
3532
3532
  }
3533
- function M(m = {}) {
3534
- s && m.consume && d(s), a = !0, i = void 0, c = "", u = "", s = "";
3533
+ function M(h = {}) {
3534
+ s && h.consume && d(s), i = !0, a = void 0, c = "", u = "", s = "";
3535
3535
  }
3536
3536
  return { feed: l, reset: M };
3537
3537
  }
@@ -3541,13 +3541,13 @@ function Bu(e) {
3541
3541
  for (; n < e.length; ) {
3542
3542
  const o = e.indexOf("\r", n), s = e.indexOf(`
3543
3543
  `, n);
3544
- let a = -1;
3545
- if (o !== -1 && s !== -1 ? a = Math.min(o, s) : o !== -1 ? o === e.length - 1 ? a = -1 : a = o : s !== -1 && (a = s), a === -1) {
3544
+ let i = -1;
3545
+ if (o !== -1 && s !== -1 ? i = Math.min(o, s) : o !== -1 ? o === e.length - 1 ? i = -1 : i = o : s !== -1 && (i = s), i === -1) {
3546
3546
  r = e.slice(n);
3547
3547
  break;
3548
3548
  } else {
3549
- const i = e.slice(n, a);
3550
- t.push(i), n = a + 1, e[n - 1] === "\r" && e[n] === `
3549
+ const a = e.slice(n, i);
3550
+ t.push(a), n = i + 1, e[n - 1] === "\r" && e[n] === `
3551
3551
  ` && n++;
3552
3552
  }
3553
3553
  }
@@ -3559,11 +3559,11 @@ class Gu extends TransformStream {
3559
3559
  super({
3560
3560
  start(s) {
3561
3561
  o = Vu({
3562
- onEvent: (a) => {
3563
- s.enqueue(a);
3562
+ onEvent: (i) => {
3563
+ s.enqueue(i);
3564
3564
  },
3565
- onError(a) {
3566
- t === "terminate" ? s.error(a) : typeof t == "function" && t(a);
3565
+ onError(i) {
3566
+ t === "terminate" ? s.error(i) : typeof t == "function" && t(i);
3567
3567
  },
3568
3568
  onRetry: r,
3569
3569
  onComment: n
@@ -3575,17 +3575,17 @@ class Gu extends TransformStream {
3575
3575
  });
3576
3576
  }
3577
3577
  }
3578
- var Te = ({
3578
+ var Oe = ({
3579
3579
  prefix: e,
3580
3580
  size: t = 16,
3581
3581
  alphabet: r = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",
3582
3582
  separator: n = "-"
3583
3583
  } = {}) => {
3584
3584
  const o = () => {
3585
- const s = r.length, a = new Array(t);
3586
- for (let i = 0; i < t; i++)
3587
- a[i] = r[Math.random() * s | 0];
3588
- return a.join("");
3585
+ const s = r.length, i = new Array(t);
3586
+ for (let a = 0; a < t; a++)
3587
+ i[a] = r[Math.random() * s | 0];
3588
+ return i.join("");
3589
3589
  };
3590
3590
  if (e == null)
3591
3591
  return o;
@@ -3595,7 +3595,7 @@ var Te = ({
3595
3595
  message: `The separator "${n}" must not be part of the alphabet "${r}".`
3596
3596
  });
3597
3597
  return () => `${e}${n}${o()}`;
3598
- }, Wu = Te();
3598
+ }, Wu = Oe();
3599
3599
  function ir(e = globalThis) {
3600
3600
  var t, r, n;
3601
3601
  return e.window ? "runtime/browser" : (t = e.navigator) != null && t.userAgent ? `runtime/${e.navigator.userAgent.toLowerCase()}` : (n = (r = e.process) == null ? void 0 : r.versions) != null && n.node ? `runtime/node.js/${e.process.version.substring(0)}` : e.EdgeRuntime ? "runtime/vercel-edge" : "runtime/unknown";
@@ -3713,7 +3713,7 @@ function rc(e, t) {
3713
3713
  const s = {
3714
3714
  type: "array"
3715
3715
  };
3716
- return (r = e.type) != null && r._def && ((o = (n = e.type) == null ? void 0 : n._def) == null ? void 0 : o.typeName) !== b.ZodAny && (s.items = E(e.type._def, {
3716
+ return (r = e.type) != null && r._def && ((o = (n = e.type) == null ? void 0 : n._def) == null ? void 0 : o.typeName) !== A.ZodAny && (s.items = E(e.type._def, {
3717
3717
  ...t,
3718
3718
  currentPath: [...t.currentPath, "items"]
3719
3719
  })), e.minLength && (s.minItems = e.minLength.value), e.maxLength && (s.maxItems = e.maxLength.value), e.exactLength && (s.minItems = e.exactLength.value, s.maxItems = e.exactLength.value), s;
@@ -3817,8 +3817,8 @@ function dc(e, t) {
3817
3817
  else {
3818
3818
  let s = o;
3819
3819
  if ("additionalProperties" in o && o.additionalProperties === !1) {
3820
- const { additionalProperties: a, ...i } = o;
3821
- s = i;
3820
+ const { additionalProperties: i, ...a } = o;
3821
+ s = a;
3822
3822
  }
3823
3823
  n.push(s);
3824
3824
  }
@@ -4044,14 +4044,14 @@ function dr(e, t) {
4044
4044
  s: e.flags.includes("s")
4045
4045
  // `.` matches newlines
4046
4046
  }, o = n.i ? e.source.toLowerCase() : e.source;
4047
- let s = "", a = !1, i = !1, c = !1;
4047
+ let s = "", i = !1, a = !1, c = !1;
4048
4048
  for (let u = 0; u < o.length; u++) {
4049
- if (a) {
4050
- s += o[u], a = !1;
4049
+ if (i) {
4050
+ s += o[u], i = !1;
4051
4051
  continue;
4052
4052
  }
4053
4053
  if (n.i) {
4054
- if (i) {
4054
+ if (a) {
4055
4055
  if (o[u].match(/[a-z]/)) {
4056
4056
  c ? (s += o[u], s += `${o[u - 2]}-${o[u]}`.toUpperCase(), c = !1) : o[u + 1] === "-" && ((r = o[u + 2]) != null && r.match(/[a-z]/)) ? (s += o[u], c = !0) : s += `${o[u]}${o[u].toUpperCase()}`;
4057
4057
  continue;
@@ -4073,12 +4073,12 @@ function dr(e, t) {
4073
4073
  }
4074
4074
  }
4075
4075
  if (n.s && o[u] === ".") {
4076
- s += i ? `${o[u]}\r
4076
+ s += a ? `${o[u]}\r
4077
4077
  ` : `[${o[u]}\r
4078
4078
  ]`;
4079
4079
  continue;
4080
4080
  }
4081
- s += o[u], o[u] === "\\" ? a = !0 : i && o[u] === "]" ? i = !1 : !i && o[u] === "[" && (i = !0);
4081
+ s += o[u], o[u] === "\\" ? i = !0 : a && o[u] === "]" ? a = !1 : !a && o[u] === "[" && (a = !0);
4082
4082
  }
4083
4083
  try {
4084
4084
  new RegExp(s);
@@ -4092,7 +4092,7 @@ function dr(e, t) {
4092
4092
  return s;
4093
4093
  }
4094
4094
  function Cn(e, t) {
4095
- var r, n, o, s, a, i;
4095
+ var r, n, o, s, i, a;
4096
4096
  const c = {
4097
4097
  type: "object",
4098
4098
  additionalProperties: (r = E(e.valueType._def, {
@@ -4100,21 +4100,21 @@ function Cn(e, t) {
4100
4100
  currentPath: [...t.currentPath, "additionalProperties"]
4101
4101
  })) != null ? r : t.allowedAdditionalProperties
4102
4102
  };
4103
- if (((n = e.keyType) == null ? void 0 : n._def.typeName) === b.ZodString && ((o = e.keyType._def.checks) != null && o.length)) {
4103
+ if (((n = e.keyType) == null ? void 0 : n._def.typeName) === A.ZodString && ((o = e.keyType._def.checks) != null && o.length)) {
4104
4104
  const { type: u, ...l } = En(e.keyType._def, t);
4105
4105
  return {
4106
4106
  ...c,
4107
4107
  propertyNames: l
4108
4108
  };
4109
4109
  } else {
4110
- if (((s = e.keyType) == null ? void 0 : s._def.typeName) === b.ZodEnum)
4110
+ if (((s = e.keyType) == null ? void 0 : s._def.typeName) === A.ZodEnum)
4111
4111
  return {
4112
4112
  ...c,
4113
4113
  propertyNames: {
4114
4114
  enum: e.keyType._def.values
4115
4115
  }
4116
4116
  };
4117
- if (((a = e.keyType) == null ? void 0 : a._def.typeName) === b.ZodBranded && e.keyType._def.type._def.typeName === b.ZodString && ((i = e.keyType._def.type._def.checks) != null && i.length)) {
4117
+ if (((i = e.keyType) == null ? void 0 : i._def.typeName) === A.ZodBranded && e.keyType._def.type._def.typeName === A.ZodString && ((a = e.keyType._def.type._def.checks) != null && a.length)) {
4118
4118
  const { type: u, ...l } = Tn(
4119
4119
  e.keyType._def,
4120
4120
  t
@@ -4178,8 +4178,8 @@ function vc(e, t) {
4178
4178
  (n) => n._def.typeName in ut && (!n._def.checks || !n._def.checks.length)
4179
4179
  )) {
4180
4180
  const n = r.reduce((o, s) => {
4181
- const a = ut[s._def.typeName];
4182
- return a && !o.includes(a) ? [...o, a] : o;
4181
+ const i = ut[s._def.typeName];
4182
+ return i && !o.includes(i) ? [...o, i] : o;
4183
4183
  }, []);
4184
4184
  return {
4185
4185
  type: n.length > 1 ? n : n[0]
@@ -4187,12 +4187,12 @@ function vc(e, t) {
4187
4187
  } else if (r.every((n) => n._def.typeName === "ZodLiteral" && !n.description)) {
4188
4188
  const n = r.reduce(
4189
4189
  (o, s) => {
4190
- const a = typeof s._def.value;
4191
- switch (a) {
4190
+ const i = typeof s._def.value;
4191
+ switch (i) {
4192
4192
  case "string":
4193
4193
  case "number":
4194
4194
  case "boolean":
4195
- return [...o, a];
4195
+ return [...o, i];
4196
4196
  case "bigint":
4197
4197
  return [...o, "integer"];
4198
4198
  case "object":
@@ -4208,11 +4208,11 @@ function vc(e, t) {
4208
4208
  []
4209
4209
  );
4210
4210
  if (n.length === r.length) {
4211
- const o = n.filter((s, a, i) => i.indexOf(s) === a);
4211
+ const o = n.filter((s, i, a) => a.indexOf(s) === i);
4212
4212
  return {
4213
4213
  type: o.length > 1 ? o : o[0],
4214
4214
  enum: r.reduce(
4215
- (s, a) => s.includes(a._def.value) ? s : [...s, a._def.value],
4215
+ (s, i) => s.includes(i._def.value) ? s : [...s, i._def.value],
4216
4216
  []
4217
4217
  )
4218
4218
  };
@@ -4285,16 +4285,16 @@ function bc(e, t) {
4285
4285
  type: "object",
4286
4286
  properties: {}
4287
4287
  }, n = [], o = e.shape();
4288
- for (const a in o) {
4289
- let i = o[a];
4290
- if (i === void 0 || i._def === void 0)
4288
+ for (const i in o) {
4289
+ let a = o[i];
4290
+ if (a === void 0 || a._def === void 0)
4291
4291
  continue;
4292
- const c = zc(i), u = E(i._def, {
4292
+ const c = zc(a), u = E(a._def, {
4293
4293
  ...t,
4294
- currentPath: [...t.currentPath, "properties", a],
4295
- propertyPath: [...t.currentPath, "properties", a]
4294
+ currentPath: [...t.currentPath, "properties", i],
4295
+ propertyPath: [...t.currentPath, "properties", i]
4296
4296
  });
4297
- u !== void 0 && (r.properties[a] = u, c || n.push(a));
4297
+ u !== void 0 && (r.properties[i] = u, c || n.push(i));
4298
4298
  }
4299
4299
  n.length && (r.required = n);
4300
4300
  const s = Ac(e, t);
@@ -4403,73 +4403,73 @@ function Cc() {
4403
4403
  }
4404
4404
  var kc = (e, t) => E(e.innerType._def, t), Sc = (e, t, r) => {
4405
4405
  switch (t) {
4406
- case b.ZodString:
4406
+ case A.ZodString:
4407
4407
  return En(e, r);
4408
- case b.ZodNumber:
4408
+ case A.ZodNumber:
4409
4409
  return Nc(e);
4410
- case b.ZodObject:
4410
+ case A.ZodObject:
4411
4411
  return bc(e, r);
4412
- case b.ZodBigInt:
4412
+ case A.ZodBigInt:
4413
4413
  return nc(e);
4414
- case b.ZodBoolean:
4414
+ case A.ZodBoolean:
4415
4415
  return oc();
4416
- case b.ZodDate:
4416
+ case A.ZodDate:
4417
4417
  return On(e, r);
4418
- case b.ZodUndefined:
4418
+ case A.ZodUndefined:
4419
4419
  return Ec();
4420
- case b.ZodNull:
4420
+ case A.ZodNull:
4421
4421
  return yc();
4422
- case b.ZodArray:
4422
+ case A.ZodArray:
4423
4423
  return rc(e, r);
4424
- case b.ZodUnion:
4425
- case b.ZodDiscriminatedUnion:
4424
+ case A.ZodUnion:
4425
+ case A.ZodDiscriminatedUnion:
4426
4426
  return vc(e, r);
4427
- case b.ZodIntersection:
4427
+ case A.ZodIntersection:
4428
4428
  return dc(e, r);
4429
- case b.ZodTuple:
4429
+ case A.ZodTuple:
4430
4430
  return Oc(e, r);
4431
- case b.ZodRecord:
4431
+ case A.ZodRecord:
4432
4432
  return Cn(e, r);
4433
- case b.ZodLiteral:
4433
+ case A.ZodLiteral:
4434
4434
  return pc(e);
4435
- case b.ZodEnum:
4435
+ case A.ZodEnum:
4436
4436
  return cc(e);
4437
- case b.ZodNativeEnum:
4437
+ case A.ZodNativeEnum:
4438
4438
  return hc(e);
4439
- case b.ZodNullable:
4439
+ case A.ZodNullable:
4440
4440
  return _c(e, r);
4441
- case b.ZodOptional:
4441
+ case A.ZodOptional:
4442
4442
  return wc(e, r);
4443
- case b.ZodMap:
4443
+ case A.ZodMap:
4444
4444
  return mc(e, r);
4445
- case b.ZodSet:
4445
+ case A.ZodSet:
4446
4446
  return Tc(e, r);
4447
- case b.ZodLazy:
4447
+ case A.ZodLazy:
4448
4448
  return () => e.getter()._def;
4449
- case b.ZodPromise:
4449
+ case A.ZodPromise:
4450
4450
  return jc(e, r);
4451
- case b.ZodNaN:
4452
- case b.ZodNever:
4451
+ case A.ZodNaN:
4452
+ case A.ZodNever:
4453
4453
  return Ic();
4454
- case b.ZodEffects:
4454
+ case A.ZodEffects:
4455
4455
  return uc(e, r);
4456
- case b.ZodAny:
4456
+ case A.ZodAny:
4457
4457
  return V();
4458
- case b.ZodUnknown:
4458
+ case A.ZodUnknown:
4459
4459
  return Cc();
4460
- case b.ZodDefault:
4460
+ case A.ZodDefault:
4461
4461
  return ic(e, r);
4462
- case b.ZodBranded:
4462
+ case A.ZodBranded:
4463
4463
  return Tn(e, r);
4464
- case b.ZodReadonly:
4464
+ case A.ZodReadonly:
4465
4465
  return kc(e, r);
4466
- case b.ZodCatch:
4466
+ case A.ZodCatch:
4467
4467
  return sc(e, r);
4468
- case b.ZodPipeline:
4468
+ case A.ZodPipeline:
4469
4469
  return Dc(e, r);
4470
- case b.ZodFunction:
4471
- case b.ZodVoid:
4472
- case b.ZodSymbol:
4470
+ case A.ZodFunction:
4471
+ case A.ZodVoid:
4472
+ case A.ZodSymbol:
4473
4473
  return;
4474
4474
  default:
4475
4475
  return /* @__PURE__ */ ((n) => {
@@ -4502,12 +4502,12 @@ function E(e, t, r = !1) {
4502
4502
  }
4503
4503
  const s = { def: e, path: t.currentPath, jsonSchema: void 0 };
4504
4504
  t.seen.set(e, s);
4505
- const a = Sc(e, e.typeName, t), i = typeof a == "function" ? E(a(), t) : a;
4506
- if (i && Pc(e, t, i), t.postProcess) {
4507
- const c = t.postProcess(i, e, t);
4508
- return s.jsonSchema = i, c;
4505
+ const i = Sc(e, e.typeName, t), a = typeof i == "function" ? E(i(), t) : i;
4506
+ if (a && Pc(e, t, a), t.postProcess) {
4507
+ const c = t.postProcess(a, e, t);
4508
+ return s.jsonSchema = a, c;
4509
4509
  }
4510
- return s.jsonSchema = i, i;
4510
+ return s.jsonSchema = a, a;
4511
4511
  }
4512
4512
  var Zc = (e, t) => {
4513
4513
  switch (t.$refStrategy) {
@@ -4546,34 +4546,34 @@ var Zc = (e, t) => {
4546
4546
  const n = Lc(t);
4547
4547
  let o = typeof t == "object" && t.definitions ? Object.entries(t.definitions).reduce(
4548
4548
  (u, [l, d]) => {
4549
- var I;
4549
+ var y;
4550
4550
  return {
4551
4551
  ...u,
4552
- [l]: (I = E(
4552
+ [l]: (y = E(
4553
4553
  d._def,
4554
4554
  {
4555
4555
  ...n,
4556
4556
  currentPath: [...n.basePath, n.definitionPath, l]
4557
4557
  },
4558
4558
  !0
4559
- )) != null ? I : V()
4559
+ )) != null ? y : V()
4560
4560
  };
4561
4561
  },
4562
4562
  {}
4563
4563
  ) : void 0;
4564
- const s = typeof t == "string" ? t : (t == null ? void 0 : t.nameStrategy) === "title" || t == null ? void 0 : t.name, a = (r = E(
4564
+ const s = typeof t == "string" ? t : (t == null ? void 0 : t.nameStrategy) === "title" || t == null ? void 0 : t.name, i = (r = E(
4565
4565
  e._def,
4566
4566
  s === void 0 ? n : {
4567
4567
  ...n,
4568
4568
  currentPath: [...n.basePath, n.definitionPath, s]
4569
4569
  },
4570
4570
  !1
4571
- )) != null ? r : V(), i = typeof t == "object" && t.name !== void 0 && t.nameStrategy === "title" ? t.name : void 0;
4572
- i !== void 0 && (a.title = i);
4571
+ )) != null ? r : V(), a = typeof t == "object" && t.name !== void 0 && t.nameStrategy === "title" ? t.name : void 0;
4572
+ a !== void 0 && (i.title = a);
4573
4573
  const c = s === void 0 ? o ? {
4574
- ...a,
4574
+ ...i,
4575
4575
  [n.definitionPath]: o
4576
- } : a : {
4576
+ } : i : {
4577
4577
  $ref: [
4578
4578
  ...n.$refStrategy === "relative" ? [] : n.basePath,
4579
4579
  n.definitionPath,
@@ -4581,7 +4581,7 @@ var Zc = (e, t) => {
4581
4581
  ].join("/"),
4582
4582
  [n.definitionPath]: {
4583
4583
  ...o,
4584
- [s]: a
4584
+ [s]: i
4585
4585
  }
4586
4586
  };
4587
4587
  return c.$schema = "http://json-schema.org/draft-07/schema#", c;
@@ -4676,12 +4676,12 @@ async function pr({
4676
4676
  value: e,
4677
4677
  schema: t
4678
4678
  }) {
4679
- const r = await De({ value: e, schema: t });
4679
+ const r = await je({ value: e, schema: t });
4680
4680
  if (!r.success)
4681
4681
  throw me.wrap({ value: e, cause: r.error });
4682
4682
  return r.value;
4683
4683
  }
4684
- async function De({
4684
+ async function je({
4685
4685
  value: e,
4686
4686
  schema: t
4687
4687
  }) {
@@ -4709,7 +4709,7 @@ async function ce({
4709
4709
  }) {
4710
4710
  try {
4711
4711
  const r = Ku(e);
4712
- return t == null ? { success: !0, value: r, rawValue: r } : await De({ value: r, schema: t });
4712
+ return t == null ? { success: !0, value: r, rawValue: r } : await je({ value: r, schema: t });
4713
4713
  } catch (r) {
4714
4714
  return {
4715
4715
  success: !1,
@@ -4766,7 +4766,7 @@ var Pn = "AI_UIMessageStreamError", Ln = `vercel.ai.error.${Pn}`, Hc = Symbol.fo
4766
4766
  };
4767
4767
  Rn = Hc;
4768
4768
  var fr = "6.0.42", $n = Q([
4769
- h(),
4769
+ I(),
4770
4770
  Qe(Uint8Array),
4771
4771
  Qe(ArrayBuffer),
4772
4772
  jn(
@@ -4777,159 +4777,159 @@ var fr = "6.0.42", $n = Q([
4777
4777
  },
4778
4778
  { message: "Must be a Buffer" }
4779
4779
  )
4780
- ]), je = Qu(
4780
+ ]), Te = Qu(
4781
4781
  () => Q([
4782
4782
  Iu(),
4783
- h(),
4783
+ I(),
4784
4784
  fu(),
4785
4785
  Y(),
4786
- ze(h(), je.optional()),
4787
- ve(je)
4786
+ we(I(), Te.optional()),
4787
+ ve(Te)
4788
4788
  ])
4789
- ), D = ze(
4790
- h(),
4791
- ze(h(), je.optional())
4789
+ ), T = we(
4790
+ I(),
4791
+ we(I(), Te.optional())
4792
4792
  ), Un = k({
4793
- type: N("text"),
4794
- text: h(),
4795
- providerOptions: D.optional()
4793
+ type: _("text"),
4794
+ text: I(),
4795
+ providerOptions: T.optional()
4796
4796
  }), Xc = k({
4797
- type: N("image"),
4797
+ type: _("image"),
4798
4798
  image: Q([$n, Qe(URL)]),
4799
- mediaType: h().optional(),
4800
- providerOptions: D.optional()
4799
+ mediaType: I().optional(),
4800
+ providerOptions: T.optional()
4801
4801
  }), Yn = k({
4802
- type: N("file"),
4802
+ type: _("file"),
4803
4803
  data: Q([$n, Qe(URL)]),
4804
- filename: h().optional(),
4805
- mediaType: h(),
4806
- providerOptions: D.optional()
4804
+ filename: I().optional(),
4805
+ mediaType: I(),
4806
+ providerOptions: T.optional()
4807
4807
  }), qc = k({
4808
- type: N("reasoning"),
4809
- text: h(),
4810
- providerOptions: D.optional()
4808
+ type: _("reasoning"),
4809
+ text: I(),
4810
+ providerOptions: T.optional()
4811
4811
  }), Kc = k({
4812
- type: N("tool-call"),
4813
- toolCallId: h(),
4814
- toolName: h(),
4812
+ type: _("tool-call"),
4813
+ toolCallId: I(),
4814
+ toolName: I(),
4815
4815
  input: q(),
4816
- providerOptions: D.optional(),
4816
+ providerOptions: T.optional(),
4817
4817
  providerExecuted: Y().optional()
4818
4818
  }), el = Nu(
4819
4819
  "type",
4820
4820
  [
4821
4821
  k({
4822
- type: N("text"),
4823
- value: h(),
4824
- providerOptions: D.optional()
4822
+ type: _("text"),
4823
+ value: I(),
4824
+ providerOptions: T.optional()
4825
4825
  }),
4826
4826
  k({
4827
- type: N("json"),
4828
- value: je,
4829
- providerOptions: D.optional()
4827
+ type: _("json"),
4828
+ value: Te,
4829
+ providerOptions: T.optional()
4830
4830
  }),
4831
4831
  k({
4832
- type: N("execution-denied"),
4833
- reason: h().optional(),
4834
- providerOptions: D.optional()
4832
+ type: _("execution-denied"),
4833
+ reason: I().optional(),
4834
+ providerOptions: T.optional()
4835
4835
  }),
4836
4836
  k({
4837
- type: N("error-text"),
4838
- value: h(),
4839
- providerOptions: D.optional()
4837
+ type: _("error-text"),
4838
+ value: I(),
4839
+ providerOptions: T.optional()
4840
4840
  }),
4841
4841
  k({
4842
- type: N("error-json"),
4843
- value: je,
4844
- providerOptions: D.optional()
4842
+ type: _("error-json"),
4843
+ value: Te,
4844
+ providerOptions: T.optional()
4845
4845
  }),
4846
4846
  k({
4847
- type: N("content"),
4847
+ type: _("content"),
4848
4848
  value: ve(
4849
4849
  Q([
4850
4850
  k({
4851
- type: N("text"),
4852
- text: h(),
4853
- providerOptions: D.optional()
4851
+ type: _("text"),
4852
+ text: I(),
4853
+ providerOptions: T.optional()
4854
4854
  }),
4855
4855
  k({
4856
- type: N("media"),
4857
- data: h(),
4858
- mediaType: h()
4856
+ type: _("media"),
4857
+ data: I(),
4858
+ mediaType: I()
4859
4859
  }),
4860
4860
  k({
4861
- type: N("file-data"),
4862
- data: h(),
4863
- mediaType: h(),
4864
- filename: h().optional(),
4865
- providerOptions: D.optional()
4861
+ type: _("file-data"),
4862
+ data: I(),
4863
+ mediaType: I(),
4864
+ filename: I().optional(),
4865
+ providerOptions: T.optional()
4866
4866
  }),
4867
4867
  k({
4868
- type: N("file-url"),
4869
- url: h(),
4870
- providerOptions: D.optional()
4868
+ type: _("file-url"),
4869
+ url: I(),
4870
+ providerOptions: T.optional()
4871
4871
  }),
4872
4872
  k({
4873
- type: N("file-id"),
4874
- fileId: Q([h(), ze(h(), h())]),
4875
- providerOptions: D.optional()
4873
+ type: _("file-id"),
4874
+ fileId: Q([I(), we(I(), I())]),
4875
+ providerOptions: T.optional()
4876
4876
  }),
4877
4877
  k({
4878
- type: N("image-data"),
4879
- data: h(),
4880
- mediaType: h(),
4881
- providerOptions: D.optional()
4878
+ type: _("image-data"),
4879
+ data: I(),
4880
+ mediaType: I(),
4881
+ providerOptions: T.optional()
4882
4882
  }),
4883
4883
  k({
4884
- type: N("image-url"),
4885
- url: h(),
4886
- providerOptions: D.optional()
4884
+ type: _("image-url"),
4885
+ url: I(),
4886
+ providerOptions: T.optional()
4887
4887
  }),
4888
4888
  k({
4889
- type: N("image-file-id"),
4890
- fileId: Q([h(), ze(h(), h())]),
4891
- providerOptions: D.optional()
4889
+ type: _("image-file-id"),
4890
+ fileId: Q([I(), we(I(), I())]),
4891
+ providerOptions: T.optional()
4892
4892
  }),
4893
4893
  k({
4894
- type: N("custom"),
4895
- providerOptions: D.optional()
4894
+ type: _("custom"),
4895
+ providerOptions: T.optional()
4896
4896
  })
4897
4897
  ])
4898
4898
  )
4899
4899
  })
4900
4900
  ]
4901
4901
  ), Qn = k({
4902
- type: N("tool-result"),
4903
- toolCallId: h(),
4904
- toolName: h(),
4902
+ type: _("tool-result"),
4903
+ toolCallId: I(),
4904
+ toolName: I(),
4905
4905
  output: el,
4906
- providerOptions: D.optional()
4906
+ providerOptions: T.optional()
4907
4907
  }), tl = k({
4908
- type: N("tool-approval-request"),
4909
- approvalId: h(),
4910
- toolCallId: h()
4908
+ type: _("tool-approval-request"),
4909
+ approvalId: I(),
4910
+ toolCallId: I()
4911
4911
  }), rl = k({
4912
- type: N("tool-approval-response"),
4913
- approvalId: h(),
4912
+ type: _("tool-approval-response"),
4913
+ approvalId: I(),
4914
4914
  approved: Y(),
4915
- reason: h().optional()
4915
+ reason: I().optional()
4916
4916
  }), nl = k(
4917
4917
  {
4918
- role: N("system"),
4919
- content: h(),
4920
- providerOptions: D.optional()
4918
+ role: _("system"),
4919
+ content: I(),
4920
+ providerOptions: T.optional()
4921
4921
  }
4922
4922
  ), ol = k({
4923
- role: N("user"),
4923
+ role: _("user"),
4924
4924
  content: Q([
4925
- h(),
4925
+ I(),
4926
4926
  ve(Q([Un, Xc, Yn]))
4927
4927
  ]),
4928
- providerOptions: D.optional()
4928
+ providerOptions: T.optional()
4929
4929
  }), sl = k({
4930
- role: N("assistant"),
4930
+ role: _("assistant"),
4931
4931
  content: Q([
4932
- h(),
4932
+ I(),
4933
4933
  ve(
4934
4934
  Q([
4935
4935
  Un,
@@ -4941,11 +4941,11 @@ var fr = "6.0.42", $n = Q([
4941
4941
  ])
4942
4942
  )
4943
4943
  ]),
4944
- providerOptions: D.optional()
4944
+ providerOptions: T.optional()
4945
4945
  }), al = k({
4946
- role: N("tool"),
4946
+ role: _("tool"),
4947
4947
  content: ve(Q([Qn, rl])),
4948
- providerOptions: D.optional()
4948
+ providerOptions: T.optional()
4949
4949
  });
4950
4950
  Q([
4951
4951
  nl,
@@ -4966,8 +4966,8 @@ function Jn(e, t) {
4966
4966
  const o = t[n];
4967
4967
  if (o === void 0)
4968
4968
  continue;
4969
- const s = n in e ? e[n] : void 0, a = o !== null && typeof o == "object" && !Array.isArray(o) && !(o instanceof Date) && !(o instanceof RegExp), i = s != null && typeof s == "object" && !Array.isArray(s) && !(s instanceof Date) && !(s instanceof RegExp);
4970
- a && i ? r[n] = Jn(
4969
+ const s = n in e ? e[n] : void 0, i = o !== null && typeof o == "object" && !Array.isArray(o) && !(o instanceof Date) && !(o instanceof RegExp), a = s != null && typeof s == "object" && !Array.isArray(s) && !(s instanceof Date) && !(s instanceof RegExp);
4970
+ i && a ? r[n] = Jn(
4971
4971
  s,
4972
4972
  o
4973
4973
  ) : r[n] = o;
@@ -5036,7 +5036,7 @@ function ul(e) {
5036
5036
  }
5037
5037
  }
5038
5038
  }
5039
- function a(c, u) {
5039
+ function i(c, u) {
5040
5040
  switch (c) {
5041
5041
  case ",": {
5042
5042
  t.pop(), t.push("INSIDE_ARRAY_AFTER_COMMA");
@@ -5176,7 +5176,7 @@ function ul(e) {
5176
5176
  case ".":
5177
5177
  break;
5178
5178
  case ",": {
5179
- t.pop(), t[t.length - 1] === "INSIDE_ARRAY_AFTER_VALUE" && a(u, c), t[t.length - 1] === "INSIDE_OBJECT_AFTER_VALUE" && s(u, c);
5179
+ t.pop(), t[t.length - 1] === "INSIDE_ARRAY_AFTER_VALUE" && i(u, c), t[t.length - 1] === "INSIDE_OBJECT_AFTER_VALUE" && s(u, c);
5180
5180
  break;
5181
5181
  }
5182
5182
  case "}": {
@@ -5184,7 +5184,7 @@ function ul(e) {
5184
5184
  break;
5185
5185
  }
5186
5186
  case "]": {
5187
- t.pop(), t[t.length - 1] === "INSIDE_ARRAY_AFTER_VALUE" && a(u, c);
5187
+ t.pop(), t[t.length - 1] === "INSIDE_ARRAY_AFTER_VALUE" && i(u, c);
5188
5188
  break;
5189
5189
  }
5190
5190
  default: {
@@ -5196,16 +5196,16 @@ function ul(e) {
5196
5196
  }
5197
5197
  case "INSIDE_LITERAL": {
5198
5198
  const d = e.substring(n, c + 1);
5199
- !"false".startsWith(d) && !"true".startsWith(d) && !"null".startsWith(d) ? (t.pop(), t[t.length - 1] === "INSIDE_OBJECT_AFTER_VALUE" ? s(u, c) : t[t.length - 1] === "INSIDE_ARRAY_AFTER_VALUE" && a(u, c)) : r = c;
5199
+ !"false".startsWith(d) && !"true".startsWith(d) && !"null".startsWith(d) ? (t.pop(), t[t.length - 1] === "INSIDE_OBJECT_AFTER_VALUE" ? s(u, c) : t[t.length - 1] === "INSIDE_ARRAY_AFTER_VALUE" && i(u, c)) : r = c;
5200
5200
  break;
5201
5201
  }
5202
5202
  }
5203
5203
  }
5204
- let i = e.slice(0, r + 1);
5204
+ let a = e.slice(0, r + 1);
5205
5205
  for (let c = t.length - 1; c >= 0; c--)
5206
5206
  switch (t[c]) {
5207
5207
  case "INSIDE_STRING": {
5208
- i += '"';
5208
+ a += '"';
5209
5209
  break;
5210
5210
  }
5211
5211
  case "INSIDE_OBJECT_KEY":
@@ -5214,23 +5214,23 @@ function ul(e) {
5214
5214
  case "INSIDE_OBJECT_START":
5215
5215
  case "INSIDE_OBJECT_BEFORE_VALUE":
5216
5216
  case "INSIDE_OBJECT_AFTER_VALUE": {
5217
- i += "}";
5217
+ a += "}";
5218
5218
  break;
5219
5219
  }
5220
5220
  case "INSIDE_ARRAY_START":
5221
5221
  case "INSIDE_ARRAY_AFTER_COMMA":
5222
5222
  case "INSIDE_ARRAY_AFTER_VALUE": {
5223
- i += "]";
5223
+ a += "]";
5224
5224
  break;
5225
5225
  }
5226
5226
  case "INSIDE_LITERAL": {
5227
5227
  const l = e.substring(n, e.length);
5228
- "true".startsWith(l) ? i += "true".slice(l.length) : "false".startsWith(l) ? i += "false".slice(l.length) : "null".startsWith(l) && (i += "null".slice(l.length));
5228
+ "true".startsWith(l) ? a += "true".slice(l.length) : "false".startsWith(l) ? a += "false".slice(l.length) : "null".startsWith(l) && (a += "null".slice(l.length));
5229
5229
  }
5230
5230
  }
5231
- return i;
5231
+ return a;
5232
5232
  }
5233
- async function Oe(e) {
5233
+ async function Ee(e) {
5234
5234
  if (e === void 0)
5235
5235
  return { value: void 0, state: "undefined-input" };
5236
5236
  let t = await ce({ text: e });
@@ -5262,33 +5262,33 @@ var cl = () => ({
5262
5262
  ...r != null && { description: r }
5263
5263
  })),
5264
5264
  async parseCompleteOutput({ text: o }, s) {
5265
- const a = await ce({ text: o });
5266
- if (!a.success)
5265
+ const i = await ce({ text: o });
5266
+ if (!i.success)
5267
5267
  throw new re({
5268
5268
  message: "No object generated: could not parse the response.",
5269
- cause: a.error,
5269
+ cause: i.error,
5270
5270
  text: o,
5271
5271
  response: s.response,
5272
5272
  usage: s.usage,
5273
5273
  finishReason: s.finishReason
5274
5274
  });
5275
- const i = await De({
5276
- value: a.value,
5275
+ const a = await je({
5276
+ value: i.value,
5277
5277
  schema: n
5278
5278
  });
5279
- if (!i.success)
5279
+ if (!a.success)
5280
5280
  throw new re({
5281
5281
  message: "No object generated: response did not match schema.",
5282
- cause: i.error,
5282
+ cause: a.error,
5283
5283
  text: o,
5284
5284
  response: s.response,
5285
5285
  usage: s.usage,
5286
5286
  finishReason: s.finishReason
5287
5287
  });
5288
- return i.value;
5288
+ return a.value;
5289
5289
  },
5290
5290
  async parsePartialOutput({ text: o }) {
5291
- const s = await Oe(o);
5291
+ const s = await Ee(o);
5292
5292
  switch (s.state) {
5293
5293
  case "failed-parse":
5294
5294
  case "undefined-input":
@@ -5314,14 +5314,14 @@ var cl = () => ({
5314
5314
  name: "array",
5315
5315
  // JSON schema that describes an array of elements:
5316
5316
  responseFormat: te(n.jsonSchema).then((o) => {
5317
- const { $schema: s, ...a } = o;
5317
+ const { $schema: s, ...i } = o;
5318
5318
  return {
5319
5319
  type: "json",
5320
5320
  schema: {
5321
5321
  $schema: "http://json-schema.org/draft-07/schema#",
5322
5322
  type: "object",
5323
5323
  properties: {
5324
- elements: { type: "array", items: a }
5324
+ elements: { type: "array", items: i }
5325
5325
  },
5326
5326
  required: ["elements"],
5327
5327
  additionalProperties: !1
@@ -5331,22 +5331,22 @@ var cl = () => ({
5331
5331
  };
5332
5332
  }),
5333
5333
  async parseCompleteOutput({ text: o }, s) {
5334
- const a = await ce({ text: o });
5335
- if (!a.success)
5334
+ const i = await ce({ text: o });
5335
+ if (!i.success)
5336
5336
  throw new re({
5337
5337
  message: "No object generated: could not parse the response.",
5338
- cause: a.error,
5338
+ cause: i.error,
5339
5339
  text: o,
5340
5340
  response: s.response,
5341
5341
  usage: s.usage,
5342
5342
  finishReason: s.finishReason
5343
5343
  });
5344
- const i = a.value;
5345
- if (i == null || typeof i != "object" || !("elements" in i) || !Array.isArray(i.elements))
5344
+ const a = i.value;
5345
+ if (a == null || typeof a != "object" || !("elements" in a) || !Array.isArray(a.elements))
5346
5346
  throw new re({
5347
5347
  message: "No object generated: response did not match schema.",
5348
5348
  cause: new me({
5349
- value: i,
5349
+ value: a,
5350
5350
  cause: "response must be an object with an elements array"
5351
5351
  }),
5352
5352
  text: o,
@@ -5354,8 +5354,8 @@ var cl = () => ({
5354
5354
  usage: s.usage,
5355
5355
  finishReason: s.finishReason
5356
5356
  });
5357
- for (const c of i.elements) {
5358
- const u = await De({
5357
+ for (const c of a.elements) {
5358
+ const u = await je({
5359
5359
  value: c,
5360
5360
  schema: n
5361
5361
  });
@@ -5369,22 +5369,22 @@ var cl = () => ({
5369
5369
  finishReason: s.finishReason
5370
5370
  });
5371
5371
  }
5372
- return i.elements;
5372
+ return a.elements;
5373
5373
  },
5374
5374
  async parsePartialOutput({ text: o }) {
5375
- const s = await Oe(o);
5375
+ const s = await Ee(o);
5376
5376
  switch (s.state) {
5377
5377
  case "failed-parse":
5378
5378
  case "undefined-input":
5379
5379
  return;
5380
5380
  case "repaired-parse":
5381
5381
  case "successful-parse": {
5382
- const a = s.value;
5383
- if (a == null || typeof a != "object" || !("elements" in a) || !Array.isArray(a.elements))
5382
+ const i = s.value;
5383
+ if (i == null || typeof i != "object" || !("elements" in i) || !Array.isArray(i.elements))
5384
5384
  return;
5385
- const i = s.state === "repaired-parse" && a.elements.length > 0 ? a.elements.slice(0, -1) : a.elements, c = [];
5386
- for (const u of i) {
5387
- const l = await De({
5385
+ const a = s.state === "repaired-parse" && i.elements.length > 0 ? i.elements.slice(0, -1) : i.elements, c = [];
5386
+ for (const u of a) {
5387
+ const l = await je({
5388
5388
  value: u,
5389
5389
  schema: n
5390
5390
  });
@@ -5397,10 +5397,10 @@ var cl = () => ({
5397
5397
  createElementStreamTransform() {
5398
5398
  let o = 0;
5399
5399
  return new TransformStream({
5400
- transform({ partialOutput: s }, a) {
5400
+ transform({ partialOutput: s }, i) {
5401
5401
  if (s != null)
5402
5402
  for (; o < s.length; o++)
5403
- a.enqueue(s[o]);
5403
+ i.enqueue(s[o]);
5404
5404
  }
5405
5405
  });
5406
5406
  }
@@ -5437,12 +5437,12 @@ var cl = () => ({
5437
5437
  usage: o.usage,
5438
5438
  finishReason: o.finishReason
5439
5439
  });
5440
- const a = s.value;
5441
- if (a == null || typeof a != "object" || !("result" in a) || typeof a.result != "string" || !e.includes(a.result))
5440
+ const i = s.value;
5441
+ if (i == null || typeof i != "object" || !("result" in i) || typeof i.result != "string" || !e.includes(i.result))
5442
5442
  throw new re({
5443
5443
  message: "No object generated: response did not match schema.",
5444
5444
  cause: new me({
5445
- value: a,
5445
+ value: i,
5446
5446
  cause: "response must be an object that contains a choice value."
5447
5447
  }),
5448
5448
  text: n,
@@ -5450,10 +5450,10 @@ var cl = () => ({
5450
5450
  usage: o.usage,
5451
5451
  finishReason: o.finishReason
5452
5452
  });
5453
- return a.result;
5453
+ return i.result;
5454
5454
  },
5455
5455
  async parsePartialOutput({ text: n }) {
5456
- const o = await Oe(n);
5456
+ const o = await Ee(n);
5457
5457
  switch (o.state) {
5458
5458
  case "failed-parse":
5459
5459
  case "undefined-input":
@@ -5463,10 +5463,10 @@ var cl = () => ({
5463
5463
  const s = o.value;
5464
5464
  if (s == null || typeof s != "object" || !("result" in s) || typeof s.result != "string")
5465
5465
  return;
5466
- const a = e.filter(
5467
- (i) => i.startsWith(s.result)
5466
+ const i = e.filter(
5467
+ (a) => a.startsWith(s.result)
5468
5468
  );
5469
- return o.state === "successful-parse" ? a.includes(s.result) ? { partial: s.result } : void 0 : a.length === 1 ? { partial: a[0] } : void 0;
5469
+ return o.state === "successful-parse" ? i.includes(s.result) ? { partial: s.result } : void 0 : i.length === 1 ? { partial: i[0] } : void 0;
5470
5470
  }
5471
5471
  }
5472
5472
  },
@@ -5496,7 +5496,7 @@ var cl = () => ({
5496
5496
  return o.value;
5497
5497
  },
5498
5498
  async parsePartialOutput({ text: r }) {
5499
- const n = await Oe(r);
5499
+ const n = await Ee(r);
5500
5500
  switch (n.state) {
5501
5501
  case "failed-parse":
5502
5502
  case "undefined-input":
@@ -5509,7 +5509,7 @@ var cl = () => ({
5509
5509
  createElementStreamTransform() {
5510
5510
  }
5511
5511
  });
5512
- Te({
5512
+ Oe({
5513
5513
  prefix: "aitxt",
5514
5514
  size: 24
5515
5515
  });
@@ -5533,143 +5533,143 @@ var gl = $c(
5533
5533
  () => kn(
5534
5534
  Q([
5535
5535
  x({
5536
- type: N("text-start"),
5537
- id: h(),
5538
- providerMetadata: D.optional()
5536
+ type: _("text-start"),
5537
+ id: I(),
5538
+ providerMetadata: T.optional()
5539
5539
  }),
5540
5540
  x({
5541
- type: N("text-delta"),
5542
- id: h(),
5543
- delta: h(),
5544
- providerMetadata: D.optional()
5541
+ type: _("text-delta"),
5542
+ id: I(),
5543
+ delta: I(),
5544
+ providerMetadata: T.optional()
5545
5545
  }),
5546
5546
  x({
5547
- type: N("text-end"),
5548
- id: h(),
5549
- providerMetadata: D.optional()
5547
+ type: _("text-end"),
5548
+ id: I(),
5549
+ providerMetadata: T.optional()
5550
5550
  }),
5551
5551
  x({
5552
- type: N("error"),
5553
- errorText: h()
5552
+ type: _("error"),
5553
+ errorText: I()
5554
5554
  }),
5555
5555
  x({
5556
- type: N("tool-input-start"),
5557
- toolCallId: h(),
5558
- toolName: h(),
5556
+ type: _("tool-input-start"),
5557
+ toolCallId: I(),
5558
+ toolName: I(),
5559
5559
  providerExecuted: Y().optional(),
5560
- providerMetadata: D.optional(),
5560
+ providerMetadata: T.optional(),
5561
5561
  dynamic: Y().optional(),
5562
- title: h().optional()
5562
+ title: I().optional()
5563
5563
  }),
5564
5564
  x({
5565
- type: N("tool-input-delta"),
5566
- toolCallId: h(),
5567
- inputTextDelta: h()
5565
+ type: _("tool-input-delta"),
5566
+ toolCallId: I(),
5567
+ inputTextDelta: I()
5568
5568
  }),
5569
5569
  x({
5570
- type: N("tool-input-available"),
5571
- toolCallId: h(),
5572
- toolName: h(),
5570
+ type: _("tool-input-available"),
5571
+ toolCallId: I(),
5572
+ toolName: I(),
5573
5573
  input: q(),
5574
5574
  providerExecuted: Y().optional(),
5575
- providerMetadata: D.optional(),
5575
+ providerMetadata: T.optional(),
5576
5576
  dynamic: Y().optional(),
5577
- title: h().optional()
5577
+ title: I().optional()
5578
5578
  }),
5579
5579
  x({
5580
- type: N("tool-input-error"),
5581
- toolCallId: h(),
5582
- toolName: h(),
5580
+ type: _("tool-input-error"),
5581
+ toolCallId: I(),
5582
+ toolName: I(),
5583
5583
  input: q(),
5584
5584
  providerExecuted: Y().optional(),
5585
- providerMetadata: D.optional(),
5585
+ providerMetadata: T.optional(),
5586
5586
  dynamic: Y().optional(),
5587
- errorText: h(),
5588
- title: h().optional()
5587
+ errorText: I(),
5588
+ title: I().optional()
5589
5589
  }),
5590
5590
  x({
5591
- type: N("tool-approval-request"),
5592
- approvalId: h(),
5593
- toolCallId: h()
5591
+ type: _("tool-approval-request"),
5592
+ approvalId: I(),
5593
+ toolCallId: I()
5594
5594
  }),
5595
5595
  x({
5596
- type: N("tool-output-available"),
5597
- toolCallId: h(),
5596
+ type: _("tool-output-available"),
5597
+ toolCallId: I(),
5598
5598
  output: q(),
5599
5599
  providerExecuted: Y().optional(),
5600
5600
  dynamic: Y().optional(),
5601
5601
  preliminary: Y().optional()
5602
5602
  }),
5603
5603
  x({
5604
- type: N("tool-output-error"),
5605
- toolCallId: h(),
5606
- errorText: h(),
5604
+ type: _("tool-output-error"),
5605
+ toolCallId: I(),
5606
+ errorText: I(),
5607
5607
  providerExecuted: Y().optional(),
5608
5608
  dynamic: Y().optional()
5609
5609
  }),
5610
5610
  x({
5611
- type: N("tool-output-denied"),
5612
- toolCallId: h()
5611
+ type: _("tool-output-denied"),
5612
+ toolCallId: I()
5613
5613
  }),
5614
5614
  x({
5615
- type: N("reasoning-start"),
5616
- id: h(),
5617
- providerMetadata: D.optional()
5615
+ type: _("reasoning-start"),
5616
+ id: I(),
5617
+ providerMetadata: T.optional()
5618
5618
  }),
5619
5619
  x({
5620
- type: N("reasoning-delta"),
5621
- id: h(),
5622
- delta: h(),
5623
- providerMetadata: D.optional()
5620
+ type: _("reasoning-delta"),
5621
+ id: I(),
5622
+ delta: I(),
5623
+ providerMetadata: T.optional()
5624
5624
  }),
5625
5625
  x({
5626
- type: N("reasoning-end"),
5627
- id: h(),
5628
- providerMetadata: D.optional()
5626
+ type: _("reasoning-end"),
5627
+ id: I(),
5628
+ providerMetadata: T.optional()
5629
5629
  }),
5630
5630
  x({
5631
- type: N("source-url"),
5632
- sourceId: h(),
5633
- url: h(),
5634
- title: h().optional(),
5635
- providerMetadata: D.optional()
5631
+ type: _("source-url"),
5632
+ sourceId: I(),
5633
+ url: I(),
5634
+ title: I().optional(),
5635
+ providerMetadata: T.optional()
5636
5636
  }),
5637
5637
  x({
5638
- type: N("source-document"),
5639
- sourceId: h(),
5640
- mediaType: h(),
5641
- title: h(),
5642
- filename: h().optional(),
5643
- providerMetadata: D.optional()
5638
+ type: _("source-document"),
5639
+ sourceId: I(),
5640
+ mediaType: I(),
5641
+ title: I(),
5642
+ filename: I().optional(),
5643
+ providerMetadata: T.optional()
5644
5644
  }),
5645
5645
  x({
5646
- type: N("file"),
5647
- url: h(),
5648
- mediaType: h(),
5649
- providerMetadata: D.optional()
5646
+ type: _("file"),
5647
+ url: I(),
5648
+ mediaType: I(),
5649
+ providerMetadata: T.optional()
5650
5650
  }),
5651
5651
  x({
5652
5652
  type: jn(
5653
5653
  (e) => typeof e == "string" && e.startsWith("data-"),
5654
5654
  { message: 'Type must start with "data-"' }
5655
5655
  ),
5656
- id: h().optional(),
5656
+ id: I().optional(),
5657
5657
  data: q(),
5658
5658
  transient: Y().optional()
5659
5659
  }),
5660
5660
  x({
5661
- type: N("start-step")
5661
+ type: _("start-step")
5662
5662
  }),
5663
5663
  x({
5664
- type: N("finish-step")
5664
+ type: _("finish-step")
5665
5665
  }),
5666
5666
  x({
5667
- type: N("start"),
5668
- messageId: h().optional(),
5667
+ type: _("start"),
5668
+ messageId: I().optional(),
5669
5669
  messageMetadata: q().optional()
5670
5670
  }),
5671
5671
  x({
5672
- type: N("finish"),
5672
+ type: _("finish"),
5673
5673
  finishReason: zn([
5674
5674
  "stop",
5675
5675
  "length",
@@ -5681,11 +5681,11 @@ var gl = $c(
5681
5681
  messageMetadata: q().optional()
5682
5682
  }),
5683
5683
  x({
5684
- type: N("abort"),
5685
- reason: h().optional()
5684
+ type: _("abort"),
5685
+ reason: I().optional()
5686
5686
  }),
5687
5687
  x({
5688
- type: N("message-metadata"),
5688
+ type: _("message-metadata"),
5689
5689
  messageMetadata: q()
5690
5690
  })
5691
5691
  ])
@@ -5729,50 +5729,50 @@ function yl({
5729
5729
  runUpdateMessageJob: n,
5730
5730
  onError: o,
5731
5731
  onToolCall: s,
5732
- onData: a
5732
+ onData: i
5733
5733
  }) {
5734
5734
  return e.pipeThrough(
5735
5735
  new TransformStream({
5736
- async transform(i, c) {
5736
+ async transform(a, c) {
5737
5737
  await n(async ({ state: u, write: l }) => {
5738
- var d, I, g, M;
5739
- function m(f) {
5740
- const T = u.message.parts.filter(dt).find(
5741
- (w) => w.toolCallId === f
5738
+ var d, y, g, M;
5739
+ function h(f) {
5740
+ const w = u.message.parts.filter(dt).find(
5741
+ (D) => D.toolCallId === f
5742
5742
  );
5743
- if (T == null)
5743
+ if (w == null)
5744
5744
  throw new de({
5745
5745
  chunkType: "tool-invocation",
5746
5746
  chunkId: f,
5747
5747
  message: `No tool invocation found for tool call ID "${f}".`
5748
5748
  });
5749
- return T;
5749
+ return w;
5750
5750
  }
5751
- function y(f) {
5752
- var O;
5753
- const T = u.message.parts.find(
5751
+ function m(f) {
5752
+ var z;
5753
+ const w = u.message.parts.find(
5754
5754
  (J) => lt(J) && J.toolCallId === f.toolCallId
5755
- ), w = f, C = T;
5756
- T != null ? (T.state = f.state, C.input = w.input, C.output = w.output, C.errorText = w.errorText, C.rawInput = w.rawInput, C.preliminary = w.preliminary, f.title !== void 0 && (C.title = f.title), C.providerExecuted = (O = w.providerExecuted) != null ? O : T.providerExecuted, w.providerMetadata != null && (T.callProviderMetadata = w.providerMetadata)) : u.message.parts.push({
5755
+ ), D = f, C = w;
5756
+ w != null ? (w.state = f.state, C.input = D.input, C.output = D.output, C.errorText = D.errorText, C.rawInput = D.rawInput, C.preliminary = D.preliminary, f.title !== void 0 && (C.title = f.title), C.providerExecuted = (z = D.providerExecuted) != null ? z : w.providerExecuted, D.providerMetadata != null && (w.callProviderMetadata = D.providerMetadata)) : u.message.parts.push({
5757
5757
  type: `tool-${f.toolName}`,
5758
5758
  toolCallId: f.toolCallId,
5759
5759
  state: f.state,
5760
5760
  title: f.title,
5761
- input: w.input,
5762
- output: w.output,
5763
- rawInput: w.rawInput,
5764
- errorText: w.errorText,
5765
- providerExecuted: w.providerExecuted,
5766
- preliminary: w.preliminary,
5767
- ...w.providerMetadata != null ? { callProviderMetadata: w.providerMetadata } : {}
5761
+ input: D.input,
5762
+ output: D.output,
5763
+ rawInput: D.rawInput,
5764
+ errorText: D.errorText,
5765
+ providerExecuted: D.providerExecuted,
5766
+ preliminary: D.preliminary,
5767
+ ...D.providerMetadata != null ? { callProviderMetadata: D.providerMetadata } : {}
5768
5768
  });
5769
5769
  }
5770
- function _(f) {
5771
- var O, T;
5772
- const w = u.message.parts.find(
5770
+ function b(f) {
5771
+ var z, w;
5772
+ const D = u.message.parts.find(
5773
5773
  (Nt) => Nt.type === "dynamic-tool" && Nt.toolCallId === f.toolCallId
5774
- ), C = f, J = w;
5775
- w != null ? (w.state = f.state, J.toolName = f.toolName, J.input = C.input, J.output = C.output, J.errorText = C.errorText, J.rawInput = (O = C.rawInput) != null ? O : J.rawInput, J.preliminary = C.preliminary, f.title !== void 0 && (J.title = f.title), J.providerExecuted = (T = C.providerExecuted) != null ? T : w.providerExecuted, C.providerMetadata != null && (w.callProviderMetadata = C.providerMetadata)) : u.message.parts.push({
5774
+ ), C = f, J = D;
5775
+ D != null ? (D.state = f.state, J.toolName = f.toolName, J.input = C.input, J.output = C.output, J.errorText = C.errorText, J.rawInput = (z = C.rawInput) != null ? z : J.rawInput, J.preliminary = C.preliminary, f.title !== void 0 && (J.title = f.title), J.providerExecuted = (w = C.providerExecuted) != null ? w : D.providerExecuted, C.providerMetadata != null && (D.callProviderMetadata = C.providerMetadata)) : u.message.parts.push({
5776
5776
  type: "dynamic-tool",
5777
5777
  toolName: f.toolName,
5778
5778
  toolCallId: f.toolCallId,
@@ -5786,257 +5786,257 @@ function yl({
5786
5786
  ...C.providerMetadata != null ? { callProviderMetadata: C.providerMetadata } : {}
5787
5787
  });
5788
5788
  }
5789
- async function A(f) {
5789
+ async function N(f) {
5790
5790
  if (f != null) {
5791
- const O = u.message.metadata != null ? Jn(u.message.metadata, f) : f;
5791
+ const z = u.message.metadata != null ? Jn(u.message.metadata, f) : f;
5792
5792
  t != null && await pr({
5793
- value: O,
5793
+ value: z,
5794
5794
  schema: t
5795
- }), u.message.metadata = O;
5795
+ }), u.message.metadata = z;
5796
5796
  }
5797
5797
  }
5798
- switch (i.type) {
5798
+ switch (a.type) {
5799
5799
  case "text-start": {
5800
5800
  const f = {
5801
5801
  type: "text",
5802
5802
  text: "",
5803
- providerMetadata: i.providerMetadata,
5803
+ providerMetadata: a.providerMetadata,
5804
5804
  state: "streaming"
5805
5805
  };
5806
- u.activeTextParts[i.id] = f, u.message.parts.push(f), l();
5806
+ u.activeTextParts[a.id] = f, u.message.parts.push(f), l();
5807
5807
  break;
5808
5808
  }
5809
5809
  case "text-delta": {
5810
- const f = u.activeTextParts[i.id];
5810
+ const f = u.activeTextParts[a.id];
5811
5811
  if (f == null)
5812
5812
  throw new de({
5813
5813
  chunkType: "text-delta",
5814
- chunkId: i.id,
5815
- message: `Received text-delta for missing text part with ID "${i.id}". Ensure a "text-start" chunk is sent before any "text-delta" chunks.`
5814
+ chunkId: a.id,
5815
+ message: `Received text-delta for missing text part with ID "${a.id}". Ensure a "text-start" chunk is sent before any "text-delta" chunks.`
5816
5816
  });
5817
- f.text += i.delta, f.providerMetadata = (d = i.providerMetadata) != null ? d : f.providerMetadata, l();
5817
+ f.text += a.delta, f.providerMetadata = (d = a.providerMetadata) != null ? d : f.providerMetadata, l();
5818
5818
  break;
5819
5819
  }
5820
5820
  case "text-end": {
5821
- const f = u.activeTextParts[i.id];
5821
+ const f = u.activeTextParts[a.id];
5822
5822
  if (f == null)
5823
5823
  throw new de({
5824
5824
  chunkType: "text-end",
5825
- chunkId: i.id,
5826
- message: `Received text-end for missing text part with ID "${i.id}". Ensure a "text-start" chunk is sent before any "text-end" chunks.`
5825
+ chunkId: a.id,
5826
+ message: `Received text-end for missing text part with ID "${a.id}". Ensure a "text-start" chunk is sent before any "text-end" chunks.`
5827
5827
  });
5828
- f.state = "done", f.providerMetadata = (I = i.providerMetadata) != null ? I : f.providerMetadata, delete u.activeTextParts[i.id], l();
5828
+ f.state = "done", f.providerMetadata = (y = a.providerMetadata) != null ? y : f.providerMetadata, delete u.activeTextParts[a.id], l();
5829
5829
  break;
5830
5830
  }
5831
5831
  case "reasoning-start": {
5832
5832
  const f = {
5833
5833
  type: "reasoning",
5834
5834
  text: "",
5835
- providerMetadata: i.providerMetadata,
5835
+ providerMetadata: a.providerMetadata,
5836
5836
  state: "streaming"
5837
5837
  };
5838
- u.activeReasoningParts[i.id] = f, u.message.parts.push(f), l();
5838
+ u.activeReasoningParts[a.id] = f, u.message.parts.push(f), l();
5839
5839
  break;
5840
5840
  }
5841
5841
  case "reasoning-delta": {
5842
- const f = u.activeReasoningParts[i.id];
5842
+ const f = u.activeReasoningParts[a.id];
5843
5843
  if (f == null)
5844
5844
  throw new de({
5845
5845
  chunkType: "reasoning-delta",
5846
- chunkId: i.id,
5847
- message: `Received reasoning-delta for missing reasoning part with ID "${i.id}". Ensure a "reasoning-start" chunk is sent before any "reasoning-delta" chunks.`
5846
+ chunkId: a.id,
5847
+ message: `Received reasoning-delta for missing reasoning part with ID "${a.id}". Ensure a "reasoning-start" chunk is sent before any "reasoning-delta" chunks.`
5848
5848
  });
5849
- f.text += i.delta, f.providerMetadata = (g = i.providerMetadata) != null ? g : f.providerMetadata, l();
5849
+ f.text += a.delta, f.providerMetadata = (g = a.providerMetadata) != null ? g : f.providerMetadata, l();
5850
5850
  break;
5851
5851
  }
5852
5852
  case "reasoning-end": {
5853
- const f = u.activeReasoningParts[i.id];
5853
+ const f = u.activeReasoningParts[a.id];
5854
5854
  if (f == null)
5855
5855
  throw new de({
5856
5856
  chunkType: "reasoning-end",
5857
- chunkId: i.id,
5858
- message: `Received reasoning-end for missing reasoning part with ID "${i.id}". Ensure a "reasoning-start" chunk is sent before any "reasoning-end" chunks.`
5857
+ chunkId: a.id,
5858
+ message: `Received reasoning-end for missing reasoning part with ID "${a.id}". Ensure a "reasoning-start" chunk is sent before any "reasoning-end" chunks.`
5859
5859
  });
5860
- f.providerMetadata = (M = i.providerMetadata) != null ? M : f.providerMetadata, f.state = "done", delete u.activeReasoningParts[i.id], l();
5860
+ f.providerMetadata = (M = a.providerMetadata) != null ? M : f.providerMetadata, f.state = "done", delete u.activeReasoningParts[a.id], l();
5861
5861
  break;
5862
5862
  }
5863
5863
  case "file": {
5864
5864
  u.message.parts.push({
5865
5865
  type: "file",
5866
- mediaType: i.mediaType,
5867
- url: i.url
5866
+ mediaType: a.mediaType,
5867
+ url: a.url
5868
5868
  }), l();
5869
5869
  break;
5870
5870
  }
5871
5871
  case "source-url": {
5872
5872
  u.message.parts.push({
5873
5873
  type: "source-url",
5874
- sourceId: i.sourceId,
5875
- url: i.url,
5876
- title: i.title,
5877
- providerMetadata: i.providerMetadata
5874
+ sourceId: a.sourceId,
5875
+ url: a.url,
5876
+ title: a.title,
5877
+ providerMetadata: a.providerMetadata
5878
5878
  }), l();
5879
5879
  break;
5880
5880
  }
5881
5881
  case "source-document": {
5882
5882
  u.message.parts.push({
5883
5883
  type: "source-document",
5884
- sourceId: i.sourceId,
5885
- mediaType: i.mediaType,
5886
- title: i.title,
5887
- filename: i.filename,
5888
- providerMetadata: i.providerMetadata
5884
+ sourceId: a.sourceId,
5885
+ mediaType: a.mediaType,
5886
+ title: a.title,
5887
+ filename: a.filename,
5888
+ providerMetadata: a.providerMetadata
5889
5889
  }), l();
5890
5890
  break;
5891
5891
  }
5892
5892
  case "tool-input-start": {
5893
5893
  const f = u.message.parts.filter(lt);
5894
- u.partialToolCalls[i.toolCallId] = {
5894
+ u.partialToolCalls[a.toolCallId] = {
5895
5895
  text: "",
5896
- toolName: i.toolName,
5896
+ toolName: a.toolName,
5897
5897
  index: f.length,
5898
- dynamic: i.dynamic,
5899
- title: i.title
5900
- }, i.dynamic ? _({
5901
- toolCallId: i.toolCallId,
5902
- toolName: i.toolName,
5898
+ dynamic: a.dynamic,
5899
+ title: a.title
5900
+ }, a.dynamic ? b({
5901
+ toolCallId: a.toolCallId,
5902
+ toolName: a.toolName,
5903
5903
  state: "input-streaming",
5904
5904
  input: void 0,
5905
- providerExecuted: i.providerExecuted,
5906
- title: i.title,
5907
- providerMetadata: i.providerMetadata
5908
- }) : y({
5909
- toolCallId: i.toolCallId,
5910
- toolName: i.toolName,
5905
+ providerExecuted: a.providerExecuted,
5906
+ title: a.title,
5907
+ providerMetadata: a.providerMetadata
5908
+ }) : m({
5909
+ toolCallId: a.toolCallId,
5910
+ toolName: a.toolName,
5911
5911
  state: "input-streaming",
5912
5912
  input: void 0,
5913
- providerExecuted: i.providerExecuted,
5914
- title: i.title,
5915
- providerMetadata: i.providerMetadata
5913
+ providerExecuted: a.providerExecuted,
5914
+ title: a.title,
5915
+ providerMetadata: a.providerMetadata
5916
5916
  }), l();
5917
5917
  break;
5918
5918
  }
5919
5919
  case "tool-input-delta": {
5920
- const f = u.partialToolCalls[i.toolCallId];
5920
+ const f = u.partialToolCalls[a.toolCallId];
5921
5921
  if (f == null)
5922
5922
  throw new de({
5923
5923
  chunkType: "tool-input-delta",
5924
- chunkId: i.toolCallId,
5925
- message: `Received tool-input-delta for missing tool call with ID "${i.toolCallId}". Ensure a "tool-input-start" chunk is sent before any "tool-input-delta" chunks.`
5924
+ chunkId: a.toolCallId,
5925
+ message: `Received tool-input-delta for missing tool call with ID "${a.toolCallId}". Ensure a "tool-input-start" chunk is sent before any "tool-input-delta" chunks.`
5926
5926
  });
5927
- f.text += i.inputTextDelta;
5928
- const { value: O } = await Oe(
5927
+ f.text += a.inputTextDelta;
5928
+ const { value: z } = await Ee(
5929
5929
  f.text
5930
5930
  );
5931
- f.dynamic ? _({
5932
- toolCallId: i.toolCallId,
5931
+ f.dynamic ? b({
5932
+ toolCallId: a.toolCallId,
5933
5933
  toolName: f.toolName,
5934
5934
  state: "input-streaming",
5935
- input: O,
5935
+ input: z,
5936
5936
  title: f.title
5937
- }) : y({
5938
- toolCallId: i.toolCallId,
5937
+ }) : m({
5938
+ toolCallId: a.toolCallId,
5939
5939
  toolName: f.toolName,
5940
5940
  state: "input-streaming",
5941
- input: O,
5941
+ input: z,
5942
5942
  title: f.title
5943
5943
  }), l();
5944
5944
  break;
5945
5945
  }
5946
5946
  case "tool-input-available": {
5947
- i.dynamic ? _({
5948
- toolCallId: i.toolCallId,
5949
- toolName: i.toolName,
5947
+ a.dynamic ? b({
5948
+ toolCallId: a.toolCallId,
5949
+ toolName: a.toolName,
5950
5950
  state: "input-available",
5951
- input: i.input,
5952
- providerExecuted: i.providerExecuted,
5953
- providerMetadata: i.providerMetadata,
5954
- title: i.title
5955
- }) : y({
5956
- toolCallId: i.toolCallId,
5957
- toolName: i.toolName,
5951
+ input: a.input,
5952
+ providerExecuted: a.providerExecuted,
5953
+ providerMetadata: a.providerMetadata,
5954
+ title: a.title
5955
+ }) : m({
5956
+ toolCallId: a.toolCallId,
5957
+ toolName: a.toolName,
5958
5958
  state: "input-available",
5959
- input: i.input,
5960
- providerExecuted: i.providerExecuted,
5961
- providerMetadata: i.providerMetadata,
5962
- title: i.title
5963
- }), l(), s && !i.providerExecuted && await s({
5964
- toolCall: i
5959
+ input: a.input,
5960
+ providerExecuted: a.providerExecuted,
5961
+ providerMetadata: a.providerMetadata,
5962
+ title: a.title
5963
+ }), l(), s && !a.providerExecuted && await s({
5964
+ toolCall: a
5965
5965
  });
5966
5966
  break;
5967
5967
  }
5968
5968
  case "tool-input-error": {
5969
- i.dynamic ? _({
5970
- toolCallId: i.toolCallId,
5971
- toolName: i.toolName,
5969
+ a.dynamic ? b({
5970
+ toolCallId: a.toolCallId,
5971
+ toolName: a.toolName,
5972
5972
  state: "output-error",
5973
- input: i.input,
5974
- errorText: i.errorText,
5975
- providerExecuted: i.providerExecuted,
5976
- providerMetadata: i.providerMetadata
5977
- }) : y({
5978
- toolCallId: i.toolCallId,
5979
- toolName: i.toolName,
5973
+ input: a.input,
5974
+ errorText: a.errorText,
5975
+ providerExecuted: a.providerExecuted,
5976
+ providerMetadata: a.providerMetadata
5977
+ }) : m({
5978
+ toolCallId: a.toolCallId,
5979
+ toolName: a.toolName,
5980
5980
  state: "output-error",
5981
5981
  input: void 0,
5982
- rawInput: i.input,
5983
- errorText: i.errorText,
5984
- providerExecuted: i.providerExecuted,
5985
- providerMetadata: i.providerMetadata
5982
+ rawInput: a.input,
5983
+ errorText: a.errorText,
5984
+ providerExecuted: a.providerExecuted,
5985
+ providerMetadata: a.providerMetadata
5986
5986
  }), l();
5987
5987
  break;
5988
5988
  }
5989
5989
  case "tool-approval-request": {
5990
- const f = m(i.toolCallId);
5991
- f.state = "approval-requested", f.approval = { id: i.approvalId }, l();
5990
+ const f = h(a.toolCallId);
5991
+ f.state = "approval-requested", f.approval = { id: a.approvalId }, l();
5992
5992
  break;
5993
5993
  }
5994
5994
  case "tool-output-denied": {
5995
- const f = m(i.toolCallId);
5995
+ const f = h(a.toolCallId);
5996
5996
  f.state = "output-denied", l();
5997
5997
  break;
5998
5998
  }
5999
5999
  case "tool-output-available": {
6000
- const f = m(i.toolCallId);
6001
- f.type === "dynamic-tool" ? _({
6002
- toolCallId: i.toolCallId,
6000
+ const f = h(a.toolCallId);
6001
+ f.type === "dynamic-tool" ? b({
6002
+ toolCallId: a.toolCallId,
6003
6003
  toolName: f.toolName,
6004
6004
  state: "output-available",
6005
6005
  input: f.input,
6006
- output: i.output,
6007
- preliminary: i.preliminary,
6008
- providerExecuted: i.providerExecuted,
6006
+ output: a.output,
6007
+ preliminary: a.preliminary,
6008
+ providerExecuted: a.providerExecuted,
6009
6009
  title: f.title
6010
- }) : y({
6011
- toolCallId: i.toolCallId,
6010
+ }) : m({
6011
+ toolCallId: a.toolCallId,
6012
6012
  toolName: gr(f),
6013
6013
  state: "output-available",
6014
6014
  input: f.input,
6015
- output: i.output,
6016
- providerExecuted: i.providerExecuted,
6017
- preliminary: i.preliminary,
6015
+ output: a.output,
6016
+ providerExecuted: a.providerExecuted,
6017
+ preliminary: a.preliminary,
6018
6018
  title: f.title
6019
6019
  }), l();
6020
6020
  break;
6021
6021
  }
6022
6022
  case "tool-output-error": {
6023
- const f = m(i.toolCallId);
6024
- f.type === "dynamic-tool" ? _({
6025
- toolCallId: i.toolCallId,
6023
+ const f = h(a.toolCallId);
6024
+ f.type === "dynamic-tool" ? b({
6025
+ toolCallId: a.toolCallId,
6026
6026
  toolName: f.toolName,
6027
6027
  state: "output-error",
6028
6028
  input: f.input,
6029
- errorText: i.errorText,
6030
- providerExecuted: i.providerExecuted,
6029
+ errorText: a.errorText,
6030
+ providerExecuted: a.providerExecuted,
6031
6031
  title: f.title
6032
- }) : y({
6033
- toolCallId: i.toolCallId,
6032
+ }) : m({
6033
+ toolCallId: a.toolCallId,
6034
6034
  toolName: gr(f),
6035
6035
  state: "output-error",
6036
6036
  input: f.input,
6037
6037
  rawInput: f.rawInput,
6038
- errorText: i.errorText,
6039
- providerExecuted: i.providerExecuted,
6038
+ errorText: a.errorText,
6039
+ providerExecuted: a.providerExecuted,
6040
6040
  title: f.title
6041
6041
  }), l();
6042
6042
  break;
@@ -6050,39 +6050,39 @@ function yl({
6050
6050
  break;
6051
6051
  }
6052
6052
  case "start": {
6053
- i.messageId != null && (u.message.id = i.messageId), await A(i.messageMetadata), (i.messageId != null || i.messageMetadata != null) && l();
6053
+ a.messageId != null && (u.message.id = a.messageId), await N(a.messageMetadata), (a.messageId != null || a.messageMetadata != null) && l();
6054
6054
  break;
6055
6055
  }
6056
6056
  case "finish": {
6057
- i.finishReason != null && (u.finishReason = i.finishReason), await A(i.messageMetadata), i.messageMetadata != null && l();
6057
+ a.finishReason != null && (u.finishReason = a.finishReason), await N(a.messageMetadata), a.messageMetadata != null && l();
6058
6058
  break;
6059
6059
  }
6060
6060
  case "message-metadata": {
6061
- await A(i.messageMetadata), i.messageMetadata != null && l();
6061
+ await N(a.messageMetadata), a.messageMetadata != null && l();
6062
6062
  break;
6063
6063
  }
6064
6064
  case "error": {
6065
- o == null || o(new Error(i.errorText));
6065
+ o == null || o(new Error(a.errorText));
6066
6066
  break;
6067
6067
  }
6068
6068
  default:
6069
- if (ml(i)) {
6070
- (r == null ? void 0 : r[i.type]) != null && await pr({
6071
- value: i.data,
6072
- schema: r[i.type]
6069
+ if (ml(a)) {
6070
+ (r == null ? void 0 : r[a.type]) != null && await pr({
6071
+ value: a.data,
6072
+ schema: r[a.type]
6073
6073
  });
6074
- const f = i;
6074
+ const f = a;
6075
6075
  if (f.transient) {
6076
- a == null || a(f);
6076
+ i == null || i(f);
6077
6077
  break;
6078
6078
  }
6079
- const O = f.id != null ? u.message.parts.find(
6080
- (T) => f.type === T.type && f.id === T.id
6079
+ const z = f.id != null ? u.message.parts.find(
6080
+ (w) => f.type === w.type && f.id === w.id
6081
6081
  ) : void 0;
6082
- O != null ? O.data = f.data : u.message.parts.push(f), a == null || a(f), l();
6082
+ z != null ? z.data = f.data : u.message.parts.push(f), i == null || i(f), l();
6083
6083
  }
6084
6084
  }
6085
- c.enqueue(i);
6085
+ c.enqueue(a);
6086
6086
  });
6087
6087
  }
6088
6088
  })
@@ -6105,11 +6105,11 @@ async function vl({
6105
6105
  r.releaseLock();
6106
6106
  }
6107
6107
  }
6108
- Te({
6108
+ Oe({
6109
6109
  prefix: "aitxt",
6110
6110
  size: 24
6111
6111
  });
6112
- Te({ prefix: "aiobj", size: 24 });
6112
+ Oe({ prefix: "aiobj", size: 24 });
6113
6113
  var Ml = class {
6114
6114
  constructor() {
6115
6115
  this.queue = [], this.isProcessing = !1;
@@ -6133,7 +6133,7 @@ var Ml = class {
6133
6133
  });
6134
6134
  }
6135
6135
  };
6136
- Te({ prefix: "aiobj", size: 24 });
6136
+ Oe({ prefix: "aiobj", size: 24 });
6137
6137
  async function _l(e) {
6138
6138
  if (e == null)
6139
6139
  return [];
@@ -6141,12 +6141,12 @@ async function _l(e) {
6141
6141
  throw new Error("FileList is not supported in the current environment");
6142
6142
  return Promise.all(
6143
6143
  Array.from(e).map(async (t) => {
6144
- const { name: r, type: n } = t, o = await new Promise((s, a) => {
6145
- const i = new FileReader();
6146
- i.onload = (c) => {
6144
+ const { name: r, type: n } = t, o = await new Promise((s, i) => {
6145
+ const a = new FileReader();
6146
+ a.onload = (c) => {
6147
6147
  var u;
6148
6148
  s((u = c.target) == null ? void 0 : u.result);
6149
- }, i.onerror = (c) => a(c), i.readAsDataURL(t);
6149
+ }, a.onerror = (c) => i(c), a.readAsDataURL(t);
6150
6150
  });
6151
6151
  return {
6152
6152
  type: "file",
@@ -6165,36 +6165,36 @@ var Nl = class {
6165
6165
  body: n,
6166
6166
  fetch: o,
6167
6167
  prepareSendMessagesRequest: s,
6168
- prepareReconnectToStreamRequest: a
6168
+ prepareReconnectToStreamRequest: i
6169
6169
  }) {
6170
- this.api = e, this.credentials = t, this.headers = r, this.body = n, this.fetch = o, this.prepareSendMessagesRequest = s, this.prepareReconnectToStreamRequest = a;
6170
+ this.api = e, this.credentials = t, this.headers = r, this.body = n, this.fetch = o, this.prepareSendMessagesRequest = s, this.prepareReconnectToStreamRequest = i;
6171
6171
  }
6172
6172
  async sendMessages({
6173
6173
  abortSignal: e,
6174
6174
  ...t
6175
6175
  }) {
6176
- var r, n, o, s, a;
6177
- const i = await te(this.body), c = await te(this.headers), u = await te(this.credentials), l = {
6176
+ var r, n, o, s, i;
6177
+ const a = await te(this.body), c = await te(this.headers), u = await te(this.credentials), l = {
6178
6178
  ...ue(c),
6179
6179
  ...ue(t.headers)
6180
6180
  }, d = await ((r = this.prepareSendMessagesRequest) == null ? void 0 : r.call(this, {
6181
6181
  api: this.api,
6182
6182
  id: t.chatId,
6183
6183
  messages: t.messages,
6184
- body: { ...i, ...t.body },
6184
+ body: { ...a, ...t.body },
6185
6185
  headers: l,
6186
6186
  credentials: u,
6187
6187
  requestMetadata: t.metadata,
6188
6188
  trigger: t.trigger,
6189
6189
  messageId: t.messageId
6190
- })), I = (n = d == null ? void 0 : d.api) != null ? n : this.api, g = (d == null ? void 0 : d.headers) !== void 0 ? ue(d.headers) : l, M = (d == null ? void 0 : d.body) !== void 0 ? d.body : {
6191
- ...i,
6190
+ })), y = (n = d == null ? void 0 : d.api) != null ? n : this.api, g = (d == null ? void 0 : d.headers) !== void 0 ? ue(d.headers) : l, M = (d == null ? void 0 : d.body) !== void 0 ? d.body : {
6191
+ ...a,
6192
6192
  ...t.body,
6193
6193
  id: t.chatId,
6194
6194
  messages: t.messages,
6195
6195
  trigger: t.trigger,
6196
6196
  messageId: t.messageId
6197
- }, m = (o = d == null ? void 0 : d.credentials) != null ? o : u, _ = await ((s = this.fetch) != null ? s : globalThis.fetch)(I, {
6197
+ }, h = (o = d == null ? void 0 : d.credentials) != null ? o : u, b = await ((s = this.fetch) != null ? s : globalThis.fetch)(y, {
6198
6198
  method: "POST",
6199
6199
  headers: ur(
6200
6200
  {
@@ -6205,47 +6205,47 @@ var Nl = class {
6205
6205
  ir()
6206
6206
  ),
6207
6207
  body: JSON.stringify(M),
6208
- credentials: m,
6208
+ credentials: h,
6209
6209
  signal: e
6210
6210
  });
6211
- if (!_.ok)
6211
+ if (!b.ok)
6212
6212
  throw new Error(
6213
- (a = await _.text()) != null ? a : "Failed to fetch the chat response."
6213
+ (i = await b.text()) != null ? i : "Failed to fetch the chat response."
6214
6214
  );
6215
- if (!_.body)
6215
+ if (!b.body)
6216
6216
  throw new Error("The response body is empty.");
6217
- return this.processResponseStream(_.body);
6217
+ return this.processResponseStream(b.body);
6218
6218
  }
6219
6219
  async reconnectToStream(e) {
6220
6220
  var t, r, n, o, s;
6221
- const a = await te(this.body), i = await te(this.headers), c = await te(this.credentials), u = {
6222
- ...ue(i),
6221
+ const i = await te(this.body), a = await te(this.headers), c = await te(this.credentials), u = {
6222
+ ...ue(a),
6223
6223
  ...ue(e.headers)
6224
6224
  }, l = await ((t = this.prepareReconnectToStreamRequest) == null ? void 0 : t.call(this, {
6225
6225
  api: this.api,
6226
6226
  id: e.chatId,
6227
- body: { ...a, ...e.body },
6227
+ body: { ...i, ...e.body },
6228
6228
  headers: u,
6229
6229
  credentials: c,
6230
6230
  requestMetadata: e.metadata
6231
- })), d = (r = l == null ? void 0 : l.api) != null ? r : `${this.api}/${e.chatId}/stream`, I = (l == null ? void 0 : l.headers) !== void 0 ? ue(l.headers) : u, g = (n = l == null ? void 0 : l.credentials) != null ? n : c, m = await ((o = this.fetch) != null ? o : globalThis.fetch)(d, {
6231
+ })), d = (r = l == null ? void 0 : l.api) != null ? r : `${this.api}/${e.chatId}/stream`, y = (l == null ? void 0 : l.headers) !== void 0 ? ue(l.headers) : u, g = (n = l == null ? void 0 : l.credentials) != null ? n : c, h = await ((o = this.fetch) != null ? o : globalThis.fetch)(d, {
6232
6232
  method: "GET",
6233
6233
  headers: ur(
6234
- I,
6234
+ y,
6235
6235
  `ai-sdk/${fr}`,
6236
6236
  ir()
6237
6237
  ),
6238
6238
  credentials: g
6239
6239
  });
6240
- if (m.status === 204)
6240
+ if (h.status === 204)
6241
6241
  return null;
6242
- if (!m.ok)
6242
+ if (!h.ok)
6243
6243
  throw new Error(
6244
- (s = await m.text()) != null ? s : "Failed to fetch the chat response."
6244
+ (s = await h.text()) != null ? s : "Failed to fetch the chat response."
6245
6245
  );
6246
- if (!m.body)
6246
+ if (!h.body)
6247
6247
  throw new Error("The response body is empty.");
6248
- return this.processResponseStream(m.body);
6248
+ return this.processResponseStream(h.body);
6249
6249
  }
6250
6250
  }, Fn = class extends Nl {
6251
6251
  constructor(e = {}) {
@@ -6273,59 +6273,59 @@ var Nl = class {
6273
6273
  messageMetadataSchema: n,
6274
6274
  dataPartSchemas: o,
6275
6275
  state: s,
6276
- onError: a,
6277
- onToolCall: i,
6276
+ onError: i,
6277
+ onToolCall: a,
6278
6278
  onFinish: c,
6279
6279
  onData: u,
6280
6280
  sendAutomaticallyWhen: l
6281
6281
  }) {
6282
- this.activeResponse = void 0, this.jobExecutor = new Ml(), this.sendMessage = async (d, I) => {
6283
- var g, M, m, y;
6282
+ this.activeResponse = void 0, this.jobExecutor = new Ml(), this.sendMessage = async (d, y) => {
6283
+ var g, M, h, m;
6284
6284
  if (d == null) {
6285
6285
  await this.makeRequest({
6286
6286
  trigger: "submit-message",
6287
6287
  messageId: (g = this.lastMessage) == null ? void 0 : g.id,
6288
- ...I
6288
+ ...y
6289
6289
  });
6290
6290
  return;
6291
6291
  }
6292
- let _;
6293
- if ("text" in d || "files" in d ? _ = {
6292
+ let b;
6293
+ if ("text" in d || "files" in d ? b = {
6294
6294
  parts: [
6295
6295
  ...Array.isArray(d.files) ? d.files : await _l(d.files),
6296
6296
  ..."text" in d && d.text != null ? [{ type: "text", text: d.text }] : []
6297
6297
  ]
6298
- } : _ = d, d.messageId != null) {
6299
- const A = this.state.messages.findIndex(
6298
+ } : b = d, d.messageId != null) {
6299
+ const N = this.state.messages.findIndex(
6300
6300
  (f) => f.id === d.messageId
6301
6301
  );
6302
- if (A === -1)
6302
+ if (N === -1)
6303
6303
  throw new Error(`message with id ${d.messageId} not found`);
6304
- if (this.state.messages[A].role !== "user")
6304
+ if (this.state.messages[N].role !== "user")
6305
6305
  throw new Error(
6306
6306
  `message with id ${d.messageId} is not a user message`
6307
6307
  );
6308
- this.state.messages = this.state.messages.slice(0, A + 1), this.state.replaceMessage(A, {
6309
- ..._,
6308
+ this.state.messages = this.state.messages.slice(0, N + 1), this.state.replaceMessage(N, {
6309
+ ...b,
6310
6310
  id: d.messageId,
6311
- role: (M = _.role) != null ? M : "user",
6311
+ role: (M = b.role) != null ? M : "user",
6312
6312
  metadata: d.metadata
6313
6313
  });
6314
6314
  } else
6315
6315
  this.state.pushMessage({
6316
- ..._,
6317
- id: (m = _.id) != null ? m : this.generateId(),
6318
- role: (y = _.role) != null ? y : "user",
6316
+ ...b,
6317
+ id: (h = b.id) != null ? h : this.generateId(),
6318
+ role: (m = b.role) != null ? m : "user",
6319
6319
  metadata: d.metadata
6320
6320
  });
6321
6321
  await this.makeRequest({
6322
6322
  trigger: "submit-message",
6323
6323
  messageId: d.messageId,
6324
- ...I
6324
+ ...y
6325
6325
  });
6326
6326
  }, this.regenerate = async ({
6327
6327
  messageId: d,
6328
- ...I
6328
+ ...y
6329
6329
  } = {}) => {
6330
6330
  const g = d == null ? this.state.messages.length - 1 : this.state.messages.findIndex((M) => M.id === d);
6331
6331
  if (g === -1)
@@ -6337,7 +6337,7 @@ var Nl = class {
6337
6337
  ), await this.makeRequest({
6338
6338
  trigger: "regenerate-message",
6339
6339
  messageId: d,
6340
- ...I
6340
+ ...y
6341
6341
  });
6342
6342
  }, this.resumeStream = async (d = {}) => {
6343
6343
  await this.makeRequest({ trigger: "resume-stream", ...d });
@@ -6345,42 +6345,42 @@ var Nl = class {
6345
6345
  this.status === "error" && (this.state.error = void 0, this.setStatus({ status: "ready" }));
6346
6346
  }, this.addToolApprovalResponse = async ({
6347
6347
  id: d,
6348
- approved: I,
6348
+ approved: y,
6349
6349
  reason: g
6350
6350
  }) => this.jobExecutor.run(async () => {
6351
- var M, m;
6352
- const y = this.state.messages, _ = y[y.length - 1], A = (f) => dt(f) && f.state === "approval-requested" && f.approval.id === d ? {
6351
+ var M, h;
6352
+ const m = this.state.messages, b = m[m.length - 1], N = (f) => dt(f) && f.state === "approval-requested" && f.approval.id === d ? {
6353
6353
  ...f,
6354
6354
  state: "approval-responded",
6355
- approval: { id: d, approved: I, reason: g }
6355
+ approval: { id: d, approved: y, reason: g }
6356
6356
  } : f;
6357
- this.state.replaceMessage(y.length - 1, {
6358
- ..._,
6359
- parts: _.parts.map(A)
6360
- }), this.activeResponse && (this.activeResponse.state.message.parts = this.activeResponse.state.message.parts.map(A)), this.status !== "streaming" && this.status !== "submitted" && ((M = this.sendAutomaticallyWhen) != null && M.call(this, { messages: this.state.messages })) && this.makeRequest({
6357
+ this.state.replaceMessage(m.length - 1, {
6358
+ ...b,
6359
+ parts: b.parts.map(N)
6360
+ }), this.activeResponse && (this.activeResponse.state.message.parts = this.activeResponse.state.message.parts.map(N)), this.status !== "streaming" && this.status !== "submitted" && ((M = this.sendAutomaticallyWhen) != null && M.call(this, { messages: this.state.messages })) && this.makeRequest({
6361
6361
  trigger: "submit-message",
6362
- messageId: (m = this.lastMessage) == null ? void 0 : m.id
6362
+ messageId: (h = this.lastMessage) == null ? void 0 : h.id
6363
6363
  });
6364
6364
  }), this.addToolOutput = async ({
6365
6365
  state: d = "output-available",
6366
- tool: I,
6366
+ tool: y,
6367
6367
  toolCallId: g,
6368
6368
  output: M,
6369
- errorText: m
6369
+ errorText: h
6370
6370
  }) => this.jobExecutor.run(async () => {
6371
- var y, _;
6372
- const A = this.state.messages, f = A[A.length - 1], O = (T) => dt(T) && T.toolCallId === g ? { ...T, state: d, output: M, errorText: m } : T;
6373
- this.state.replaceMessage(A.length - 1, {
6371
+ var m, b;
6372
+ const N = this.state.messages, f = N[N.length - 1], z = (w) => dt(w) && w.toolCallId === g ? { ...w, state: d, output: M, errorText: h } : w;
6373
+ this.state.replaceMessage(N.length - 1, {
6374
6374
  ...f,
6375
- parts: f.parts.map(O)
6376
- }), this.activeResponse && (this.activeResponse.state.message.parts = this.activeResponse.state.message.parts.map(O)), this.status !== "streaming" && this.status !== "submitted" && ((y = this.sendAutomaticallyWhen) != null && y.call(this, { messages: this.state.messages })) && this.makeRequest({
6375
+ parts: f.parts.map(z)
6376
+ }), this.activeResponse && (this.activeResponse.state.message.parts = this.activeResponse.state.message.parts.map(z)), this.status !== "streaming" && this.status !== "submitted" && ((m = this.sendAutomaticallyWhen) != null && m.call(this, { messages: this.state.messages })) && this.makeRequest({
6377
6377
  trigger: "submit-message",
6378
- messageId: (_ = this.lastMessage) == null ? void 0 : _.id
6378
+ messageId: (b = this.lastMessage) == null ? void 0 : b.id
6379
6379
  });
6380
6380
  }), this.addToolResult = this.addToolOutput, this.stop = async () => {
6381
6381
  var d;
6382
6382
  this.status !== "streaming" && this.status !== "submitted" || (d = this.activeResponse) != null && d.abortController && this.activeResponse.abortController.abort();
6383
- }, this.id = t, this.transport = r, this.generateId = e, this.messageMetadataSchema = n, this.dataPartSchemas = o, this.state = s, this.onError = a, this.onToolCall = i, this.onFinish = c, this.onData = u, this.sendAutomaticallyWhen = l;
6383
+ }, this.id = t, this.transport = r, this.generateId = e, this.messageMetadataSchema = n, this.dataPartSchemas = o, this.state = s, this.onError = i, this.onToolCall = a, this.onFinish = c, this.onData = u, this.sendAutomaticallyWhen = l;
6384
6384
  }
6385
6385
  /**
6386
6386
  * Hook status:
@@ -6418,10 +6418,10 @@ var Nl = class {
6418
6418
  body: n,
6419
6419
  messageId: o
6420
6420
  }) {
6421
- var s, a, i, c;
6421
+ var s, i, a, c;
6422
6422
  this.setStatus({ status: "submitted", error: void 0 });
6423
6423
  const u = this.lastMessage;
6424
- let l = !1, d = !1, I = !1;
6424
+ let l = !1, d = !1, y = !1;
6425
6425
  try {
6426
6426
  const g = {
6427
6427
  state: Il({
@@ -6435,17 +6435,17 @@ var Nl = class {
6435
6435
  }), this.activeResponse = g;
6436
6436
  let M;
6437
6437
  if (e === "resume-stream") {
6438
- const y = await this.transport.reconnectToStream({
6438
+ const m = await this.transport.reconnectToStream({
6439
6439
  chatId: this.id,
6440
6440
  metadata: t,
6441
6441
  headers: r,
6442
6442
  body: n
6443
6443
  });
6444
- if (y == null) {
6444
+ if (m == null) {
6445
6445
  this.setStatus({ status: "ready" });
6446
6446
  return;
6447
6447
  }
6448
- M = y;
6448
+ M = m;
6449
6449
  } else
6450
6450
  M = await this.transport.sendMessages({
6451
6451
  chatId: this.id,
@@ -6457,14 +6457,14 @@ var Nl = class {
6457
6457
  trigger: e,
6458
6458
  messageId: o
6459
6459
  });
6460
- const m = (y) => (
6460
+ const h = (m) => (
6461
6461
  // serialize the job execution to avoid race conditions:
6462
6462
  this.jobExecutor.run(
6463
- () => y({
6463
+ () => m({
6464
6464
  state: g.state,
6465
6465
  write: () => {
6466
- var _;
6467
- this.setStatus({ status: "streaming" }), g.state.message.id === ((_ = this.lastMessage) == null ? void 0 : _.id) ? this.state.replaceMessage(
6466
+ var b;
6467
+ this.setStatus({ status: "streaming" }), g.state.message.id === ((b = this.lastMessage) == null ? void 0 : b.id) ? this.state.replaceMessage(
6468
6468
  this.state.messages.length - 1,
6469
6469
  g.state.message
6470
6470
  ) : this.state.pushMessage(g.state.message);
@@ -6479,27 +6479,27 @@ var Nl = class {
6479
6479
  onData: this.onData,
6480
6480
  messageMetadataSchema: this.messageMetadataSchema,
6481
6481
  dataPartSchemas: this.dataPartSchemas,
6482
- runUpdateMessageJob: m,
6483
- onError: (y) => {
6484
- throw y;
6482
+ runUpdateMessageJob: h,
6483
+ onError: (m) => {
6484
+ throw m;
6485
6485
  }
6486
6486
  }),
6487
- onError: (y) => {
6488
- throw y;
6487
+ onError: (m) => {
6488
+ throw m;
6489
6489
  }
6490
6490
  }), this.setStatus({ status: "ready" });
6491
6491
  } catch (g) {
6492
6492
  if (l || g.name === "AbortError")
6493
6493
  return l = !0, this.setStatus({ status: "ready" }), null;
6494
- I = !0, g instanceof TypeError && (g.message.toLowerCase().includes("fetch") || g.message.toLowerCase().includes("network")) && (d = !0), this.onError && g instanceof Error && this.onError(g), this.setStatus({ status: "error", error: g });
6494
+ y = !0, g instanceof TypeError && (g.message.toLowerCase().includes("fetch") || g.message.toLowerCase().includes("network")) && (d = !0), this.onError && g instanceof Error && this.onError(g), this.setStatus({ status: "error", error: g });
6495
6495
  } finally {
6496
6496
  try {
6497
- (a = this.onFinish) == null || a.call(this, {
6497
+ (i = this.onFinish) == null || i.call(this, {
6498
6498
  message: this.activeResponse.state.message,
6499
6499
  messages: this.state.messages,
6500
6500
  isAbort: l,
6501
6501
  isDisconnect: d,
6502
- isError: I,
6502
+ isError: y,
6503
6503
  finishReason: (s = this.activeResponse) == null ? void 0 : s.state.finishReason
6504
6504
  });
6505
6505
  } catch (g) {
@@ -6507,7 +6507,7 @@ var Nl = class {
6507
6507
  }
6508
6508
  this.activeResponse = void 0;
6509
6509
  }
6510
- (i = this.sendAutomaticallyWhen) != null && i.call(this, { messages: this.state.messages }) && !I && await this.makeRequest({
6510
+ (a = this.sendAutomaticallyWhen) != null && a.call(this, { messages: this.state.messages }) && !y && await this.makeRequest({
6511
6511
  trigger: "submit-message",
6512
6512
  messageId: (c = this.lastMessage) == null ? void 0 : c.id,
6513
6513
  metadata: t,
@@ -6584,7 +6584,7 @@ const hr = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), wl = (
6584
6584
  * This source code is licensed under the ISC license.
6585
6585
  * See the LICENSE file in the root directory of this source tree.
6586
6586
  */
6587
- var _e = {
6587
+ var Ne = {
6588
6588
  xmlns: "http://www.w3.org/2000/svg",
6589
6589
  width: 24,
6590
6590
  height: 24,
@@ -6608,18 +6608,18 @@ const Tl = ({
6608
6608
  "absolute-stroke-width": n,
6609
6609
  strokeWidth: o,
6610
6610
  "stroke-width": s,
6611
- size: a = _e.width,
6612
- color: i = _e.stroke,
6611
+ size: i = Ne.width,
6612
+ color: a = Ne.stroke,
6613
6613
  ...c
6614
6614
  }, { slots: u }) => rt(
6615
6615
  "svg",
6616
6616
  {
6617
- ..._e,
6617
+ ...Ne,
6618
6618
  ...c,
6619
- width: a,
6620
- height: a,
6621
- stroke: i,
6622
- "stroke-width": Ir(r) || Ir(n) || r === !0 || n === !0 ? Number(o || s || _e["stroke-width"]) * 24 / Number(a) : o || s || _e["stroke-width"],
6619
+ width: i,
6620
+ height: i,
6621
+ stroke: a,
6622
+ "stroke-width": Ir(r) || Ir(n) || r === !0 || n === !0 ? Number(o || s || Ne["stroke-width"]) * 24 / Number(i) : o || s || Ne["stroke-width"],
6623
6623
  class: jl(
6624
6624
  "lucide",
6625
6625
  c.class,
@@ -6663,21 +6663,24 @@ const Ol = Vn("arrow-right", [
6663
6663
  const El = Vn("x", [
6664
6664
  ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
6665
6665
  ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
6666
- ]), Cl = { class: "z-[1000] w-fit flex flex-col items-end relative gci-chatbot" }, kl = { class: "flex items-center justify-between" }, Sl = {
6666
+ ]), Cl = { class: "z-[1000] w-fit flex flex-col items-end relative gci-chatbot" }, kl = {
6667
+ key: 0,
6668
+ class: "ai-card chat-popup transition-all duration-7"
6669
+ }, Sl = { class: "flex items-center justify-between" }, xl = {
6667
6670
  key: 0,
6668
6671
  class: "chat-empty-state"
6669
- }, xl = { class: "chat-empty-heading" }, Zl = { class: "chat-empty-greeting" }, Pl = {
6672
+ }, Zl = { class: "chat-empty-heading" }, Pl = { class: "chat-empty-greeting" }, Ll = {
6670
6673
  key: 0,
6671
6674
  class: "flex justify-end"
6672
- }, Ll = { class: "message-user" }, Rl = {
6675
+ }, Rl = { class: "message-user" }, $l = {
6673
6676
  key: 1,
6674
6677
  class: "message-assistant"
6675
- }, $l = {
6678
+ }, Ul = {
6676
6679
  key: 1,
6677
6680
  src: eo,
6678
6681
  alt: "",
6679
6682
  class: "loading-message"
6680
- }, Ul = ["disabled"], Yl = { class: "chat-actions-content" }, Jl = /* @__PURE__ */ Bn({
6683
+ }, Yl = ["disabled"], Ql = { class: "chat-actions-content" }, Fl = /* @__PURE__ */ Bn({
6681
6684
  __name: "ChatbotComponent",
6682
6685
  props: {
6683
6686
  clientId: { type: String, default: "" },
@@ -6686,9 +6689,15 @@ const El = Vn("x", [
6686
6689
  },
6687
6690
  emits: ["update:modelValue"],
6688
6691
  setup(e, { emit: t }) {
6689
- const r = e, n = ee(""), o = ee(!1), s = ee(null), a = ee(!1);
6690
- ee(0);
6691
- const i = ee(!0), c = new zl({
6692
+ const r = e;
6693
+ let n;
6694
+ const o = ee(""), s = ee(!1), i = ee(null), a = ee(!1), c = ee(0), u = ee(!0), l = [
6695
+ "Ask me anything you're curious about, and I will help you understand it clearly.",
6696
+ "Have questions? I’m here to help make things easier.",
6697
+ "Need clarity? Let me explain it in simple terms.",
6698
+ "I can assist you with anything you're unsure about.",
6699
+ "Don't hesitate—I'm just a question away!"
6700
+ ], d = new zl({
6692
6701
  transport: new Fn({
6693
6702
  api: "https://ai-chat-backend.dev02.dtsmart.dev/api/chat",
6694
6703
  body: {
@@ -6696,149 +6705,154 @@ const El = Vn("x", [
6696
6705
  mcp_token: r.token
6697
6706
  }
6698
6707
  })
6699
- }), u = async (I) => {
6708
+ }), y = async (h) => {
6700
6709
  try {
6701
- if (!n.value.trim())
6710
+ if (!o.value.trim())
6702
6711
  return;
6703
- const g = n.value.trim();
6704
- n.value = "", a.value = !0, I.preventDefault(), await c.sendMessage({ text: g });
6705
- } catch (g) {
6706
- console.error(g);
6712
+ const m = o.value.trim();
6713
+ o.value = "", a.value = !0, h.preventDefault(), await d.sendMessage({ text: m });
6714
+ } catch (m) {
6715
+ console.error(m);
6707
6716
  } finally {
6708
6717
  a.value = !1;
6709
6718
  }
6710
- }, l = () => {
6711
- o.value = !o.value;
6712
- }, d = () => {
6713
- o.value = !1, c.messages = [];
6719
+ }, g = () => {
6720
+ s.value = !s.value;
6721
+ }, M = () => {
6722
+ s.value = !1, d.messages = [];
6714
6723
  };
6715
6724
  return Gn(
6716
- () => c.messages,
6725
+ () => d.messages,
6717
6726
  async () => {
6718
- var I;
6719
- await Wn(), (I = s.value) == null || I.scrollTo({
6720
- top: s.value.scrollHeight,
6727
+ var h;
6728
+ await Wn(), (h = i.value) == null || h.scrollTo({
6729
+ top: i.value.scrollHeight,
6721
6730
  behavior: "smooth"
6722
6731
  });
6723
6732
  },
6724
6733
  { deep: !0 }
6725
6734
  ), Hn(() => {
6726
- }), (I, g) => {
6727
- var M;
6728
- return G(), W(Me, null, [
6729
- o.value ? (G(), W("div", {
6735
+ n = window.setInterval(() => {
6736
+ l.length && (u.value = !1, setTimeout(() => {
6737
+ c.value = (c.value + 1) % l.length, u.value = !0;
6738
+ }, 300));
6739
+ }, 6e3);
6740
+ }), Xn(() => {
6741
+ n && clearInterval(n);
6742
+ }), (h, m) => {
6743
+ var b;
6744
+ return B(), G(Me, null, [
6745
+ s.value ? (B(), G("div", {
6730
6746
  key: 0,
6731
6747
  class: "bg-[#ffffff00] absolute w-full h-full",
6732
- onClick: g[0] || (g[0] = (m) => o.value = !1)
6733
- })) : Ee("", !0),
6734
- z("div", Cl, [
6735
- z("div", {
6736
- class: Xn(["ai-card chat-popup transition-all duration-7", { "opacity-0": !o.value, "opacity-100": o.value }])
6737
- }, [
6738
- z("div", kl, [
6739
- g[2] || (g[2] = z("p", { class: "ai-hello" }, "Hi, I’m Boko AI", -1)),
6740
- z("button", {
6748
+ onClick: m[0] || (m[0] = (N) => s.value = !1)
6749
+ })) : _e("", !0),
6750
+ j("div", Cl, [
6751
+ s.value ? (B(), G("div", kl, [
6752
+ j("div", Sl, [
6753
+ m[2] || (m[2] = j("p", { class: "ai-hello" }, "Hi, I’m Boko AI", -1)),
6754
+ j("button", {
6741
6755
  class: "ai-close",
6742
- onClick: d
6756
+ onClick: M
6743
6757
  }, [
6744
6758
  Ce(ke(El))
6745
6759
  ])
6746
6760
  ]),
6747
- z("div", {
6761
+ j("div", {
6748
6762
  ref_key: "scrollRef",
6749
- ref: s,
6763
+ ref: i,
6750
6764
  class: "chat-popup-message"
6751
6765
  }, [
6752
- ke(c).messages.length === 0 ? (G(), W("div", Sl, [
6753
- z("div", xl, [
6754
- z("p", Zl, " Hello " + He(e.clientId), 1),
6755
- g[3] || (g[3] = z("p", { class: "chat-empty-title" }, " How Can I Help You Today ? ", -1))
6766
+ ke(d).messages.length === 0 ? (B(), G("div", xl, [
6767
+ j("div", Zl, [
6768
+ j("p", Pl, " Hello " + He(e.clientId), 1),
6769
+ m[3] || (m[3] = j("p", { class: "chat-empty-title" }, " How Can I Help You Today ? ", -1))
6756
6770
  ]),
6757
- g[4] || (g[4] = z("p", { class: "chat-empty-description" }, " I’m Boko, your friendly assistant. ", -1)),
6758
- g[5] || (g[5] = z("p", { class: "chat-empty-description" }, " Here to help — anytime you’re ready! ", -1))
6759
- ])) : Ee("", !0),
6760
- (G(!0), W(Me, null, bt(ke(c).messages, (m, y) => (G(), W("div", {
6761
- key: m.id ?? y,
6771
+ m[4] || (m[4] = j("p", { class: "chat-empty-description" }, " I’m Boko, your friendly assistant. ", -1)),
6772
+ m[5] || (m[5] = j("p", { class: "chat-empty-description" }, " Here to help — anytime you’re ready! ", -1))
6773
+ ])) : _e("", !0),
6774
+ (B(!0), G(Me, null, bt(ke(d).messages, (N, f) => (B(), G("div", {
6775
+ key: N.id ?? f,
6762
6776
  class: "mb-3"
6763
6777
  }, [
6764
- (G(!0), W(Me, null, bt(m == null ? void 0 : m.parts, (_, A) => (G(), W(Me, {
6765
- key: `${m.id}-${_.type}-${A}`
6778
+ (B(!0), G(Me, null, bt(N == null ? void 0 : N.parts, (z, w) => (B(), G(Me, {
6779
+ key: `${N.id}-${z.type}-${w}`
6766
6780
  }, [
6767
- (_ == null ? void 0 : _.type) === "text" ? (G(), W(Me, { key: 0 }, [
6768
- m.role === "user" ? (G(), W("div", Pl, [
6769
- z("div", Ll, [
6770
- z("div", null, He(_ == null ? void 0 : _.text), 1)
6781
+ (z == null ? void 0 : z.type) === "text" ? (B(), G(Me, { key: 0 }, [
6782
+ N.role === "user" ? (B(), G("div", Ll, [
6783
+ j("div", Rl, [
6784
+ j("div", null, He(z == null ? void 0 : z.text), 1)
6771
6785
  ])
6772
- ])) : (G(), W("div", Rl, [
6773
- z("div", null, He(_ == null ? void 0 : _.text), 1)
6786
+ ])) : (B(), G("div", $l, [
6787
+ j("div", null, He(z == null ? void 0 : z.text), 1)
6774
6788
  ]))
6775
- ], 64)) : Ee("", !0)
6789
+ ], 64)) : _e("", !0)
6776
6790
  ], 64))), 128))
6777
6791
  ]))), 128)),
6778
- a.value ? (G(), W("img", $l)) : Ee("", !0)
6792
+ a.value ? (B(), G("img", Ul)) : _e("", !0)
6779
6793
  ], 512),
6780
- z("form", {
6781
- onSubmit: u,
6794
+ j("form", {
6795
+ onSubmit: y,
6782
6796
  class: "ai-input-wrap"
6783
6797
  }, [
6784
- At(z("input", {
6798
+ At(j("input", {
6785
6799
  class: "ai-input",
6786
- "onUpdate:modelValue": g[1] || (g[1] = (m) => n.value = m),
6800
+ "onUpdate:modelValue": m[1] || (m[1] = (N) => o.value = N),
6787
6801
  placeholder: "Ask me anything…"
6788
6802
  }, null, 512), [
6789
- [qn, n.value]
6803
+ [qn, o.value]
6790
6804
  ]),
6791
- z("button", {
6805
+ j("button", {
6792
6806
  class: "ai-send",
6793
- disabled: !n.value || ((M = n.value) == null ? void 0 : M.length) == 0 || a.value
6807
+ disabled: !o.value || ((b = o.value) == null ? void 0 : b.length) == 0 || a.value
6794
6808
  }, [
6795
6809
  Ce(ke(Ol), { class: "w-5 h-5 text-white" })
6796
- ], 8, Ul)
6810
+ ], 8, Yl)
6797
6811
  ], 32)
6798
- ], 2),
6799
- z("div", {
6812
+ ])) : _e("", !0),
6813
+ j("div", {
6800
6814
  class: "chat-actions",
6801
- onClick: l
6815
+ onClick: g
6802
6816
  }, [
6803
6817
  Ce(zt, { name: "fade-slide" }, {
6804
6818
  default: wt(() => [
6805
- At(z("div", Yl, [...g[6] || (g[6] = [
6806
- z("div", { class: "chat-actions-tooltip bg-tooltip-chatbot" }, [
6807
- z("span", { class: "tooltip-arrow" }, [
6808
- z("svg", {
6819
+ At(j("div", Ql, [...m[6] || (m[6] = [
6820
+ j("div", { class: "chat-actions-tooltip bg-tooltip-chatbot" }, [
6821
+ j("span", { class: "tooltip-arrow" }, [
6822
+ j("svg", {
6809
6823
  width: "15",
6810
6824
  height: "23",
6811
6825
  viewBox: "0 0 15 23",
6812
6826
  fill: "none",
6813
6827
  xmlns: "http://www.w3.org/2000/svg"
6814
6828
  }, [
6815
- z("path", {
6829
+ j("path", {
6816
6830
  d: "M14.5547 22.3335V0.000163078L0 9.19624L14.5547 22.3335Z",
6817
6831
  fill: "currentColor"
6818
6832
  })
6819
6833
  ])
6820
6834
  ]),
6821
- z("div", { class: "tooltip-header" }, [
6822
- z("div", { class: "flex justify-start items-center" }, [
6823
- z("p", { class: "tooltip-label" }, "DigiAI"),
6824
- z("span", null, [
6825
- z("img", {
6835
+ j("div", { class: "tooltip-header" }, [
6836
+ j("div", { class: "flex justify-start items-center" }, [
6837
+ j("p", { class: "tooltip-label" }, "DigiAI"),
6838
+ j("span", null, [
6839
+ j("img", {
6826
6840
  src: to,
6827
6841
  alt: ""
6828
6842
  })
6829
6843
  ])
6830
6844
  ]),
6831
- z("div", { class: "flex justify-start items-center" }, [
6832
- z("p", { class: "tooltip-label" }, "Try Now"),
6833
- z("span", null, [
6834
- z("svg", {
6845
+ j("div", { class: "flex justify-start items-center" }, [
6846
+ j("p", { class: "tooltip-label" }, "Try Now"),
6847
+ j("span", null, [
6848
+ j("svg", {
6835
6849
  width: "14",
6836
6850
  height: "15",
6837
6851
  viewBox: "0 0 14 15",
6838
6852
  fill: "none",
6839
6853
  xmlns: "http://www.w3.org/2000/svg"
6840
6854
  }, [
6841
- z("path", {
6855
+ j("path", {
6842
6856
  d: "M5.25003 3.82617L8.75 7.32617L5.25 10.8262",
6843
6857
  stroke: "#9970E2",
6844
6858
  "stroke-width": "1.5",
@@ -6849,20 +6863,20 @@ const El = Vn("x", [
6849
6863
  ])
6850
6864
  ])
6851
6865
  ]),
6852
- z("div", { class: "flex-center-box" }, [
6853
- z("p", { class: "tooltip-label-bot" }, " Have questions? I’m here to help make things easier. ")
6866
+ j("div", { class: "flex-center-box" }, [
6867
+ j("p", { class: "tooltip-label-bot" }, " Have questions? I’m here to help make things easier. ")
6854
6868
  ])
6855
6869
  ], -1)
6856
6870
  ])], 512), [
6857
- [Kn, i.value && !o.value]
6871
+ [Kn, u.value && !s.value]
6858
6872
  ])
6859
6873
  ]),
6860
6874
  _: 1
6861
6875
  }),
6862
6876
  Ce(zt, { name: "fade-slide" }, {
6863
- default: wt(() => [...g[7] || (g[7] = [
6864
- z("div", { class: "chat-float" }, [
6865
- z("img", {
6877
+ default: wt(() => [...m[7] || (m[7] = [
6878
+ j("div", { class: "chat-float" }, [
6879
+ j("img", {
6866
6880
  src: ro,
6867
6881
  alt: ""
6868
6882
  })
@@ -6877,5 +6891,5 @@ const El = Vn("x", [
6877
6891
  }
6878
6892
  });
6879
6893
  export {
6880
- Jl as ChatbotComponent
6894
+ Fl as ChatbotComponent
6881
6895
  };