@liip/liipgpt 3.4.2 → 3.4.4

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.
Files changed (54) hide show
  1. package/button/liipgpt-button.iife.js +85 -85
  2. package/chat/liipgpt-chat.iife.js +103 -103
  3. package/config/index.cjs +95 -85
  4. package/config/index.js +82 -78
  5. package/configurator/_app/env.js +1 -1
  6. package/configurator/_app/immutable/chunks/B3eztMjm.js +1 -0
  7. package/configurator/_app/immutable/chunks/B5LAyE-f.js +1 -0
  8. package/configurator/_app/immutable/chunks/BUm3woLX.js +1 -0
  9. package/configurator/_app/immutable/chunks/BdP-K7KO.js +3 -0
  10. package/configurator/_app/immutable/chunks/C8mohMXa.js +1 -0
  11. package/configurator/_app/immutable/chunks/CNhGYG1q.js +0 -0
  12. package/configurator/_app/immutable/chunks/CaZV0epm.js +1 -0
  13. package/configurator/_app/immutable/chunks/D1hYfEew.js +1 -0
  14. package/configurator/_app/immutable/chunks/D7iAOzgH.js +1 -0
  15. package/configurator/_app/immutable/chunks/DC7iQzPK.js +16 -0
  16. package/configurator/_app/immutable/chunks/DEv5Ueqk.js +324 -0
  17. package/configurator/_app/immutable/chunks/DJ-KAQCp.js +143 -0
  18. package/configurator/_app/immutable/chunks/DUJlwB59.js +15 -0
  19. package/configurator/_app/immutable/chunks/DevUxHro.js +89 -0
  20. package/configurator/_app/immutable/chunks/DopJiv6A.js +1 -0
  21. package/configurator/_app/immutable/chunks/DpTUJVdo.js +1 -0
  22. package/configurator/_app/immutable/chunks/az2UTMiX.js +1 -0
  23. package/configurator/_app/immutable/entry/app.Bl6ijR0o.js +2 -0
  24. package/configurator/_app/immutable/entry/start.ByoY54BX.js +1 -0
  25. package/configurator/_app/immutable/nodes/{0.Bgy3i8FQ.js → 0.DQUsz_zn.js} +3 -3
  26. package/configurator/_app/immutable/nodes/1.DRz2V13W.js +1 -0
  27. package/configurator/_app/immutable/nodes/2.DJcyAYWL.js +31 -0
  28. package/configurator/_app/immutable/nodes/3.B_llVVii.js +954 -0
  29. package/configurator/_app/version.json +1 -1
  30. package/configurator/index.html +10 -11
  31. package/configurator/sidebar.html +10 -11
  32. package/index.cjs +866 -1838
  33. package/index.js +830 -1832
  34. package/package.json +36 -36
  35. package/configurator/_app/immutable/chunks/6gGOJNBB.js +0 -1
  36. package/configurator/_app/immutable/chunks/BVWYCVQL.js +0 -113
  37. package/configurator/_app/immutable/chunks/BXQ0Z8wW.js +0 -1
  38. package/configurator/_app/immutable/chunks/Bg7q39r6.js +0 -1
  39. package/configurator/_app/immutable/chunks/CR5-hwU3.js +0 -1
  40. package/configurator/_app/immutable/chunks/CfJtR48A.js +0 -2
  41. package/configurator/_app/immutable/chunks/CqmBCC3F.js +0 -1
  42. package/configurator/_app/immutable/chunks/D0zq2rZV.js +0 -143
  43. package/configurator/_app/immutable/chunks/DGC7CooX.js +0 -1
  44. package/configurator/_app/immutable/chunks/DGqm4WKo.js +0 -15
  45. package/configurator/_app/immutable/chunks/Do2M-_FB.js +0 -324
  46. package/configurator/_app/immutable/chunks/DsnmJJEf.js +0 -1
  47. package/configurator/_app/immutable/chunks/g9pTgyF6.js +0 -1
  48. package/configurator/_app/immutable/chunks/hrZ0qwUL.js +0 -1
  49. package/configurator/_app/immutable/chunks/w7MLzsSQ.js +0 -1
  50. package/configurator/_app/immutable/entry/app.ConDGFGi.js +0 -2
  51. package/configurator/_app/immutable/entry/start.k8RQt7wE.js +0 -1
  52. package/configurator/_app/immutable/nodes/1.WSWj9VWy.js +0 -1
  53. package/configurator/_app/immutable/nodes/2.DRCudqRI.js +0 -31
  54. package/configurator/_app/immutable/nodes/3.CMaEAJPV.js +0 -954
@@ -0,0 +1,324 @@
1
+ import{Gt as e,Kt as t,Wt as n}from"./BdP-K7KO.js";var r=n(((e,t)=>{var n=function(e){return r(e)&&!i(e)};function r(e){return!!e&&typeof e==`object`}function i(e){var t=Object.prototype.toString.call(e);return t===`[object RegExp]`||t===`[object Date]`||o(e)}var a=typeof Symbol==`function`&&Symbol.for?Symbol.for(`react.element`):60103;function o(e){return e.$$typeof===a}function s(e){return Array.isArray(e)?[]:{}}function c(e,t){return t.clone!==!1&&t.isMergeableObject(e)?h(s(e),e,t):e}function l(e,t,n){return e.concat(t).map(function(e){return c(e,n)})}function u(e,t){if(!t.customMerge)return h;var n=t.customMerge(e);return typeof n==`function`?n:h}function d(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function f(e){return Object.keys(e).concat(d(e))}function p(e,t){try{return t in e}catch{return!1}}function ee(e,t){return p(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function m(e,t,n){var r={};return n.isMergeableObject(e)&&f(e).forEach(function(t){r[t]=c(e[t],n)}),f(t).forEach(function(i){ee(e,i)||(p(e,i)&&n.isMergeableObject(t[i])?r[i]=u(i,n)(e[i],t[i],n):r[i]=c(t[i],n))}),r}function h(e,t,r){r||={},r.arrayMerge=r.arrayMerge||l,r.isMergeableObject=r.isMergeableObject||n,r.cloneUnlessOtherwiseSpecified=c;var i=Array.isArray(t);return i===Array.isArray(e)?i?r.arrayMerge(e,t,r):m(e,t,r):c(t,r)}h.all=function(e,t){if(!Array.isArray(e))throw Error(`first argument should be an array`);return e.reduce(function(e,n){return h(e,n,t)},{})},t.exports=h})),i=t(r(),1),a=e=>typeof e!=`object`||!e,o=e=>{if(a(e))return e;if(Array.isArray(e))return e.map(o);let t=Object.entries(e).filter(([e,t])=>t!==void 0).map(([e,t])=>[e,o(t)]);return Object.fromEntries(t)},s=(e,t)=>(0,i.default)(e,o(t)),c=e({theme:()=>u}),l={tokens:{font:{family:`-apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif`},colors:{brand:{50:`#f9fafb`,100:`#f3f4f6`,200:`#e5e7eb`,300:`#d1d5db`,400:`#9ca3af`,500:`#6b7280`,600:`#4b5563`,700:`#374151`,800:`#2d3748`,900:`#1a202c`,950:`#171923`},highlight:{50:`#f9fafb`,100:`#f3f4f6`,200:`#e5e7eb`,300:`#d1d5db`,400:`#9ca3af`,500:`#6b7280`,600:`#4b5563`,700:`#374151`,800:`#2d3748`,900:`#1a202c`,950:`#171923`},grey:{0:`#ffffff`,50:`#f9fafb`,100:`#f3f4f6`,200:`#e5e7eb`,300:`#d1d5db`,400:`#9ca3af`,500:`#6b7280`,600:`#4b5563`,700:`#374151`,800:`#2d3748`,900:`#1a202c`,950:`#171923`,1e3:`#000000`}},base:{fontSizeXs:{minRem:.75,maxRem:.875},fontSizeSm:{minRem:1,maxRem:1},fontSizeBody:{minRem:1,maxRem:1.25},fontSizeH3:{minRem:1.125,maxRem:1.5},fontSizeH2:{minRem:1.25,maxRem:1.75},fontSizeH1:{minRem:1.5,maxRem:2},fontWeightNormal:`400`,fontWeightBold:`700`,fontWeightTitle:`700`,lineHeightDefault:`1.5`,lineHeightSnug:`1.375`,lineHeightTight:`1.25`,borderRadius:{minRem:.5,maxRem:.75},lineColor:`color-mix(in srgb, var(--color-brand-950) 20%, transparent)`,boxShadow:`0px 0px 2px rgba(0, 0, 0, 0.15), 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1)`},components:{body:{background:`var(--color-grey-0)`,color:`var(--color-grey-900)`,focus:{color:`var(--color-highlight-500)`},custom:{selectionColor:`var(--color-grey-0)`,selectionBackground:`var(--color-brand-700)`,focusWidth:`var(--spacer-3)`,focusOffset:`var(--spacer-2)`,focusStyle:`solid`}},container:{custom:{maxWidth:`1024px`}},avatar:{color:`var(--color-brand-400)`,background:`var(--color-grey-100)`},anchor:{color:`var(--color-brand-700)`,hover:{color:`var(--color-brand-950)`}},btnPrimary:{color:`var(--color-grey-0)`,background:`var(--color-brand-700)`,borderRadius:`var(--base-border-radius)`,hover:{background:`var(--color-brand-900)`}},btnSecondary:{color:`var(--color-brand-700)`,background:`var(--color-brand-100)`,borderRadius:`var(--base-border-radius)`,hover:{color:`var(--color-grey-1000)`,background:`var(--color-brand-200)`}},btnTertiary:{color:`var(--anchor-color)`,background:`transparent`,borderRadius:`var(--base-border-radius)`,hover:{color:`var(--anchor-hover-color)`}},card:{color:`var(--color-grey-900)`,background:`var(--color-grey-100)`,borderRadius:`var(--base-border-radius)`,boxShadow:`none`,hover:{color:`var(--color-grey-1000)`,background:`var(--color-brand-100)`},custom:{iconColor:`var(--anchor-color)`,iconHoverColor:`var(--anchor-hover-color)`}},input:{background:`var(--color-grey-0)`,borderColor:`var(--color-grey-300)`,borderWidth:`1px`,borderRadius:`var(--base-border-radius)`,custom:{padding:`var(--spacer-r-16) var(--spacer-r-20)`,placeholderColor:`var(--color-grey-500)`,placeholderOpacity:`1`}},label:{color:`var(--color-grey-600)`},hr:{color:`var(--base-line-color)`},checkbox:{color:`transparent`,background:`var(--color-grey-0)`,borderColor:`var(--color-grey-300)`,borderWidth:`1px`,borderRadius:`0.2em`,custom:{checkedColor:`var(--btn-primary-color)`,checkedBorderColor:`var(--color-brand-700)`,checkedBackground:`var(--color-brand-700)`}},radio:{color:`transparent`,background:`var(--color-grey-0)`,borderColor:`var(--color-grey-300)`,borderWidth:`1px`,custom:{checkedColor:`var(--btn-primary-color)`,checkedBorderColor:`var(--color-brand-700)`,checkedBackground:`var(--color-brand-700)`}},contextBox:{color:`var(--card-color)`,background:`var(--card-background)`,borderColor:`var(--card-border-color)`,borderWidth:`var(--card-border-width)`,borderRadius:`var(--card-border-radius)`,boxShadow:`var(--base-box-shadow)`,custom:{transitionDuration:200,transitionDelay:200,transitionY:8,titleColor:`var(--color-grey-1000)`,titleFontWeight:`var(--base-font-weight-bold)`,separatorColor:`var(--base-line-color)`,errorColor:`var(--message-error-color)`}},contextBoxMenuItem:{background:`transparent`,color:`var(--body-color)`,borderRadius:`calc(var(--base-border-radius) / 2)`,hover:{color:`var(--btn-secondary-hover-color)`,background:`var(--btn-secondary-hover-background)`},custom:{activeColor:`var(--btn-secondary-hover-color)`,activeBackground:`var(--btn-secondary-hover-background)`}},chatFooter:{color:`var(--color-grey-400)`,background:`var(--body-background)`,borderRadius:`var(--base-border-radius)`,boxShadow:`0px -10px 20px 5px color-mix(in srgb, var(--body-background) 90%, transparent)`},chatInput:{color:`var(--color-grey-700)`,background:`var(--card-background)`,borderRadius:`var(--base-border-radius)`,borderColor:`transparent`,borderWidth:`3px`,hover:{background:`var(--card-hover-background)`},focus:{borderColor:`var(--body-focus-color)`}},chatInputSubmit:{color:`var(--btn-primary-color)`,background:`var(--btn-primary-background)`,borderRadius:`calc(var(--base-border-radius) / 1.25)`,hover:{color:`var(--btn-primary-hover-color)`,background:`var(--btn-primary-hover-background)`},custom:{strokeWidth:`2`,deactivatedBackground:`var(--color-grey-500)`,deactivatedOpacity:`0.25`,deactivatedScale:`0.8`,deactivatedBorderColor:`var(--color-grey-500)`}},chatInputNotification:{background:`#DD135A`,color:`var(--color-grey-0)`,borderColor:`#DD135A`,borderWidth:`1px`,borderRadius:`var(--chat-input-border-radius)`},dialog:{background:`var(--card-background)`,color:`var(--body-color)`,borderColor:`var(--card-border-color)`,borderWidth:`var(--card-border-width)`,borderRadius:`var(--card-border-radius)`,boxShadow:`var(--base-box-shadow)`,custom:{transitionDuration:200,transitionDelay:0,transitionY:30,backgroundOverlay:`rgba(0, 0, 0, 0.25)`,headerBorderBottomColor:`var(--base-line-color)`}},aside:{background:`var(--card-background)`,custom:{width:`400px`,containerWidthForMobileLayout:1024,backgroundOverlay:`rgba(0, 0, 0, 0.4)`,headerColor:`var(--card-color)`,headerBorderColor:`var(--base-line-color)`,headerBorderWidth:`1px`}},message:{color:`var(--body-color)`,custom:{errorColor:`#C91658`,transitionDuration:300,transitionDelay:0,transitionY:30,transitionBotLoadingDelay:300}},messageOptions:{borderColor:`var(--base-line-color)`,borderWidth:`1px`,custom:{transitionDuration:300,transitionDelay:0,transitionY:30}},messageUser:{color:`var(--body-color)`,background:`var(--card-background)`,boxShadow:`var(--card-box-shadow)`,borderRadius:`var(--card-border-radius)`},openButton:{color:`var(--card-color)`,background:`var(--card-background)`,borderColor:`var(--card-background)`,borderWidth:`0`,borderRadius:`calc(var(--base-border-radius) / 2)`,hover:{color:`var(--card-hover-color)`,background:`var(--card-hover-background)`},custom:{hideTitleWhenCollapsed:0,autoExpandScrollThreshold:0,autoCollapseDelay:0,autoExpandOnce:0}},referencesToggle:{color:`var(--color-brand-700)`,hover:{color:`var(--anchor-hover-color)`}},referenceNumberTrigger:{color:`var(--btn-secondary-color)`,background:`var(--btn-secondary-background)`,borderRadius:`calc(var(--base-border-radius) / 2)`,hover:{color:`var(--btn-secondary-hover-color)`,background:`var(--btn-secondary-hover-background)`},custom:{padding:`0.25em`}},referenceDomain:{color:`var(--color-brand-700)`,hover:{color:`var(--color-brand-800)`},custom:{padding:`0px`}},referenceNumberContent:{color:`var(--card-color)`,background:`var(--card-background)`,borderColor:`var(--card-border-color)`,borderWidth:`var(--card-border-width)`,borderRadius:`var(--card-border-radius)`,hover:{color:`var(--card-hover-color)`,background:`var(--card-hover-background)`,borderColor:`var(--card-hover-border-color)`,borderWidth:`var(--card-hover-border-width)`},boxShadow:`var(--base-box-shadow)`,custom:{width:`95cqi`,maxWidth:`450px`,transitionDuration:200,transitionDelay:200,transitionY:8}},reference:{color:`var(--card-color)`,background:`var(--card-background)`,borderColor:`var(--card-border-color)`,borderWidth:`var(--card-border-width)`,borderRadius:`var(--card-border-radius)`,hover:{color:`var(--card-hover-color)`,background:`var(--body-background)`,borderColor:`var(--card-hover-border-color)`,borderWidth:`var(--card-hover-border-width)`}},referenceDescription:{color:`var(--reference-color)`,hover:{color:`var(--reference-hover-color)`}},referenceNumber:{color:`var(--reference-number-trigger-color)`,background:`var(--body-background)`,borderColor:`var(--reference-number-trigger-border-color)`,borderWidth:`var(--reference-number-trigger-border-width)`,borderRadius:`var(--reference-number-trigger-border-radius)`,hover:{color:`var(--reference-number-trigger-color)`,background:`var(--reference-number-trigger-background)`,borderColor:`var(--reference-number-trigger-border-color)`,borderWidth:`var(--reference-number-trigger-border-width)`},custom:{padding:`var(--reference-number-trigger-padding)`}},toast:{background:`var(--card-background)`,color:`var(--body-color)`,boxShadow:`var(--base-box-shadow)`,borderRadius:`var(--card-border-radius)`,custom:{iconSuccessColor:`#22c55e`,iconErrorColor:`#ef4444`,iconWarningColor:`#f97316`,iconInfoColor:`#3b82f6`}},tooltip:{background:`var(--color-grey-200)`,color:`var(--body-color)`,borderRadius:`calc(var(--base-border-radius) / 2)`},flyout:{custom:{backdropColor:`var(--color-brand-800)`,backdropOpacity:`0.4`,backdropDelayIn:`0`,backdropDurationIn:`200`,backdropDelayOut:`0`,backdropDurationOut:`150`,backdropBaseScaleIn:`1`,backdropBaseScaleOut:`1`,backdropTransformOrigin:`center`,backdropScaleDirection:`scale`}}},svgs:{predefinedQuestion:`
2
+ <svg viewBox="0 0 24 24" >
3
+ <path d="M11 3.5A10.5 10.5 0 0 0 0.5 14v1.5" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
4
+ <path d="M0.5 15.498a5 5 0 1 0 10 0 5 5 0 1 0 -10 0" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
5
+ <path d="M23.5 3.5A10.5 10.5 0 0 0 13 14v1.5" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
6
+ <path d="M13 15.498a5 5 0 1 0 10 0 5 5 0 1 0 -10 0" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
7
+ </svg>
8
+ `,edit:`<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"><path d="m15.9 4.7 3.5 3.5-10.8 10.8-3.5-3.5z"/><path d="m5.1 15.4-1.7 5.3 5.3-1.7-3.5-3.5z"/><path d="m19.3 8.1-3.5-3.5.6-.6c1-1 2.6-.9 3.5 0 .9 1 .9 2.5 0 3.5z"/></g></svg>`,newConversation:`<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"><path d="m12.6 15.3-4.7 1.6 1.5-4.8 7.6-7.6c.6-.6 1.5-.6 2.1 0l1.1 1.1c.6.6.6 1.5 0 2.1l-7.7 7.7z"/><path d="m12.8 15.1-3.3-3.3"/><path d="m20.2 12.1v7.4c0 .8-.7 1.5-1.5 1.5h-13.8c-.8 0-1.5-.7-1.5-1.5v-14.5c0-.8.7-1.5 1.5-1.5h8.4"/></g></svg>`,voteUp:`<svg viewBox="0 0 24 24"><path d="M0.5 8.372h2a1 1 0 0 1 1 1v12a1 1 0 0 1 -1 1h-2" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M3.5 19.372c7.339 3.726 6.981 3.235 13.265 3.235 2.632 0 3.958 -1.715 4.732 -4.228l0 -0.016 1.907 -6.4 0 -0.012A2 2 0 0 0 21.5 9.372h-4.9a2 2 0 0 1 -1.934 -2.51l0.882 -3.344a1.713 1.713 0 0 0 -3.06 -1.418L7.6 9.025a2 2 0 0 1 -1.634 0.847H3.5" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></svg>`,voteDown:`<svg viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m.5 2.5h2c.6 0 1 .4 1 1v12c0 .6-.4 1-1 1h-2"/><path d="m3.5 15h2.5c.6 0 1.3.3 1.6.8l4.9 6.9c.4.6 1.1.9 1.8.7.9-.2 1.5-1.2 1.2-2.1l-.9-3.3c0-.2 0-.3 0-.5 0-1.1.9-2 2-2h4.9.6c1.1-.3 1.7-1.4 1.3-2.5s-1.9-6.4-1.9-6.4c-.8-2.5-2.1-4.2-4.7-4.2-6.3 0-5.9-.5-13.3 3.2"/></g></svg>`,retry:`
9
+ <svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
10
+ <g stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
11
+ <path d="M19.701 5.488a10.063 10.063 0 0 0-7.7-3.573C6.43 1.915 1.914 6.43 1.914 12c0 1.17.2 2.293.565 3.338m1.84 3.199A10.063 10.063 0 0 0 12 22.085c5.57 0 10.085-4.515 10.085-10.085 0-1.224-.218-2.397-.617-3.482" stroke-miterlimit="10"/>
12
+ <path d="M16.802 5.784h3.16v-3.16M7.198 18.216h-3.16v3.16"/>
13
+ </g>
14
+ </svg>
15
+ `,message:`<svg viewBox="0 0 24 24"><path d="m12 1.6c-6 0-10.9 4-10.9 9 0 2.5 1.2 4.8 3.2 6.4l-2.3 5.4 6-3.4c1.3.4 2.6.6 3.9.6 6 0 10.9-4 10.9-9s-4.8-9-10.8-9z" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>`,messageLoading:`<svg viewBox="0 0 24 24" width="24" height="24">
16
+ <circle cx="6" cy="23" r="1.75" fill="currentColor">
17
+ <animate attributeName="opacity" dur="1s" values="0.2;0.8;0.2" repeatCount="indefinite" begin="0s"/>
18
+ </circle>
19
+ <circle cx="12" cy="23" r="1.75" fill="currentColor">
20
+ <animate attributeName="opacity" dur="1s" values="0.2;0.8;0.2" repeatCount="indefinite" begin="0.3s"/>
21
+ </circle>
22
+ <circle cx="18" cy="23" r="1.75" fill="currentColor">
23
+ <animate attributeName="opacity" dur="1s" values="0.2;0.8;0.2" repeatCount="indefinite" begin="0.6s"/>
24
+ </circle>
25
+ </svg>`,thread:`<svg viewBox="0 0 24 24"><path d="M9.5 16.5c0 4.288 5 7.5 9.5 5.5l4 1.5 -1.5 -3a4.994 4.994 0 0 0 2 -4c0 -3.154 -3.134 -6 -7 -6s-7 2.846 -7 6Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M17.4 8.5a5.822 5.822 0 0 0 0.1 -1c0 -3.866 -3.8 -7 -8.5 -7S0.5 3.634 0.5 7.5a6.434 6.434 0 0 0 2.517 4.97L1 16l4.939 -1.976a9.993 9.993 0 0 0 1.561 0.361" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></svg>`,submit:`<svg viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="m12 1v22"/><path d="m4 9 8-8 8 8"/></g></svg>`,abort:`<svg viewBox="0 0 24 24"><g fill="currentColor" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M5 5h14v14H5z"/></g></svg>`,expand:`<svg viewBox="0 0 24 24"><path d="m22 7-10 10-10-10" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></svg>`,help:`<svg fill="none" viewBox="0 0 12 12"><path d="M5.04 7.955v-.161c.004-.555.053-.998.148-1.328.099-.33.241-.596.429-.799.187-.203.412-.387.675-.552.197-.127.373-.258.528-.395a1.71 1.71 0 0 0 .371-.452 1.15 1.15 0 0 0 .138-.561c0-.219-.052-.41-.157-.576a1.045 1.045 0 0 0-.423-.38 1.26 1.26 0 0 0-.58-.133c-.207 0-.402.046-.586.138a1.117 1.117 0 0 0-.452.4c-.117.174-.18.39-.19.65H3c.016-.633.168-1.157.457-1.569.288-.416.67-.725 1.146-.928.476-.206 1-.309 1.575-.309.631 0 1.19.105 1.675.314.485.206.865.506 1.141.9.276.392.414.867.414 1.422 0 .37-.062.7-.185.99-.12.285-.29.538-.51.76a3.943 3.943 0 0 1-.775.595c-.25.15-.457.304-.618.466a1.584 1.584 0 0 0-.357.562 2.42 2.42 0 0 0-.119.785v.161H5.041ZM5.984 11c-.317 0-.588-.111-.814-.333a1.095 1.095 0 0 1-.328-.809c-.003-.31.106-.577.328-.799.226-.222.497-.333.814-.333.301 0 .566.111.794.333a1.092 1.092 0 0 1 .181 1.375 1.23 1.23 0 0 1-.414.414 1.081 1.081 0 0 1-.561.152Z" fill="currentColor"/></svg>`,attach:`<svg viewBox="0 0 24 24"><path d="m7.618 15.345 8.666 -8.666a2.039 2.039 0 1 1 2.883 2.883L7.461 21.305a4.078 4.078 0 0 1 -5.767 -5.768L13.928 3.305a5.606 5.606 0 0 1 7.929 7.928L13.192 19.9" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></svg>`,record:`<svg viewBox="0 0 24 24"><path d="M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z" fill="currentColor"/><path d="M19 10v2a7 7 0 0 1-14 0v-2" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M12 19v4" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M8 23h8" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>`,reward:`<svg viewBox="0 0 24 24"><path d="M23.5 10.5a1 1 0 0 1 -1 1h-21a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1h21a1 1 0 0 1 1 1Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M21.5 22.5a1 1 0 0 1 -1 1h-17a1 1 0 0 1 -1 -1v-11h19Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="m8.5 7.5 0 16" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="m15.5 23.5 0 -16" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M17.427 3.84C16.663 4.605 13 5.5 13 5.5s0.9 -3.663 1.66 -4.427a1.957 1.957 0 1 1 2.767 2.767Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M6.573 3.84C7.337 4.605 11 5.5 11 5.5s-0.9 -3.663 -1.66 -4.427A1.957 1.957 0 0 0 6.573 3.84Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></svg>`,share:`<svg viewBox="0 0 24 24"><g><path d="M14.8 12.56a2.25 2.25 0 0 0 3.27 0.1l4.45 -4.45a3.37 3.37 0 0 0 0 -4.76l-2 -2a3.37 3.37 0 0 0 -4.76 0l-4.42 4.48a2.24 2.24 0 0 0 0.1 3.26" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M9.2 11.44a2.26 2.26 0 0 0 -3.27 -0.1l-4.45 4.45a3.37 3.37 0 0 0 0 4.76l2 2a3.37 3.37 0 0 0 4.76 0l4.45 -4.45a2.25 2.25 0 0 0 -0.1 -3.27" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="m7.64 16.36 8.72 -8.72" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></g></svg>`,audio:`<svg viewBox="0 0 24 24"><path d="M5.5 9H2a1.5 1.5 0 0 0 -1.5 1.5v3A1.5 1.5 0 0 0 2 15h3.5l6.147 6.146a0.5 0.5 0 0 0 0.853 -0.353V3.207a0.5 0.5 0 0 0 -0.853 -0.353Z" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M20 4a10.893 10.893 0 0 1 0 16" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M17.5 6a7.535 7.535 0 0 1 0 12" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M15.5 8.5c2.677 1.947 2.669 5.06 0 7" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></svg>`,copy:`<svg viewBox="0 0 24 24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M16.4999 5.5V1.50049c0 -0.552286 -0.4477 -1.000002 -1 -1.000002H1.49988C0.947593 0.500488 0.499878 0.948203 0.499878 1.50049V15.5005c0 0.5523 0.447715 1 1.000002 1H5.5" stroke-width="1.5"></path><path stroke="currentColor" stroke-linejoin="round" d="M7.4999 8.49951c0 -0.55228 0.44772 -1 1 -1h14c0.5523 0 1 0.44772 1 1V22.4995c0 0.5523 -0.4477 1 -1 1h-14c-0.55228 0 -1 -0.4477 -1 -1V8.49951Z" stroke-width="1.5"></path></svg>`,dismiss:`<svg viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.5"><path d="m5.743 5.742 12.514 12.514"/><path d="m18.257 5.742-12.514 12.514"/></g></svg>`,menu:`<svg viewBox="0 0 24 24"><g stroke="currentColor" stroke-linecap="round" stroke-width="1.5"><path d="m4 6h16"/><path d="m4 12h16"/><path d="m4 18h16"/></g></svg>`,menuClose:`<svg viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.5"><path d="m5.743 5.742 12.514 12.514"/><path d="m18.257 5.742-12.514 12.514"/></g></svg>`,externalLink:`<svg viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="2"><path d="m18 6-12 12"/><path d="m18 17v-11h-11"/></g></svg>`,internalLink:`<svg viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="2"><path d="m20 12h-17"/><path d="m13 19 7-7-7-7"/></g></svg>`,chevronDown:`<svg viewBox="0 0 24 24"><path d="m20 8-8 8-8-8" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/></svg>`,chevronUp:`<svg viewBox="0 0 24 24"><path d="m20 16-8-8-8 8" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/></svg>`,chevronTopDown:`<svg viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"><path d="m19 9-7-7-7 7"/><path d="m19 15-7 7-7-7"/></g></svg>`,chevronDownSmall:`<svg viewBox="0 0 10 10" fill="none"><path d="M8.75 3.75C7.25 5.25 5 7.5 5 7.50L1.25 3.75" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>`,liip:`<svg viewBox="0 0 199 72"><path d="m125.352941.70588235 14.588235 7.05882353-32.705882 63.29411762-14.5882352-7.0588235zm-37.6470586 0 14.3529416 7.05882353-32.7058828 63.29411762-14.5882353-7.0588235zm78.8235296 45.17647055v23.0588236h-16.235294v-64.9411765h26.117647c14.588235 0 22.588235 10.3529412 22.588235 20.9411765 0 10.8235294-7.764706 20.9411764-22.588235 20.9411764zm0-27.5294117v13.1764706h9.17647c4.470589 0 7.058824-3.2941177 7.058824-6.5882353 0-3.2941177-2.588235-6.5882353-7.058824-6.5882353zm-166.11764729-14.3529412h16.23529409v50.8235294h27.7647059v14.1176471h-43.99999999z" fill="currentColor" fill-rule="evenodd"/></svg>`,avatar:`
26
+ <div style="border-radius: 9999px; overflow: hidden;">
27
+ <svg viewBox="0 0 100 100" width="100" height="100" shape-rendering="geometricPrecision" text-rendering="geometricPrecision">
28
+ <style>
29
+ .svg--avatar {
30
+ --logo-color1: var(--color-brand-500);
31
+ --logo-color1-transparent: var(--color-brand-400);
32
+
33
+ --logo-color2: var(--color-highlight-400);
34
+ --logo-color2-transparent: var(--color-highlight-500);
35
+
36
+ --logo-color3: var(--color-brand-400);
37
+ --logo-color3-transparent: var(--color-highlight-500);
38
+
39
+ --logo-color4: var(--color-highlight-400);
40
+ --logo-color4-transparent: var(--color-brand-500);
41
+
42
+ --logo-glass-color: oklch(1 0 0 / 0.2); /* Soft white glass effect */
43
+ }
44
+
45
+ #group1 {
46
+ animation: group1_anim 8000ms ease-in-out infinite normal forwards;
47
+ /* Delay animation after fly-in animation */
48
+ transform: translate(30px, 30px);
49
+ animation-delay: 0.8s;
50
+ }
51
+
52
+ @keyframes group1_anim {
53
+ 0% { transform: translate(30px, 30px); }
54
+ 25% { transform: translate(50px, 100px); }
55
+ 50% { transform: translate(90px, 30px); }
56
+ 75% { transform: translate(50px, 50px); }
57
+ 100% { transform: translate(30px, 30px); }
58
+ }
59
+
60
+ #group2 {
61
+ animation: group2_anim 8000ms ease-in-out infinite normal forwards;
62
+ /* Delay animation after fly-in animation */
63
+ transform: translate(-35px, -35px);
64
+ animation-delay: 0.8s;
65
+ }
66
+
67
+ @keyframes group2_anim {
68
+ 0% { transform: translate(-35px, -35px); }
69
+ 25% { transform: translate(25px, 40px); }
70
+ 50% { transform: translate(100px, 35px); }
71
+ 75% { transform: translate(25px, 25px); }
72
+ 100% { transform: translate(-35px, -35px); }
73
+ }
74
+
75
+ #group3 {
76
+ overflow: visible;
77
+ animation: group3_anim 8000ms ease-in-out infinite normal forwards;
78
+ /* Delay animation after fly-in animation */
79
+ transform: translate(120px, 20px);
80
+ animation-delay: 0.8s;
81
+ }
82
+
83
+ @keyframes group3_anim {
84
+ 0% { transform: translate(120px, 20px); }
85
+ 25% { transform: translate(30px, 17px); }
86
+ 50% { transform: translate(35px, 20px); }
87
+ 75% { transform: translate(30px, 120px); }
88
+ 100% { transform: translate(120px, 20px); }
89
+ }
90
+
91
+ #group4 {
92
+ animation: group4_anim 12000ms ease-in-out infinite normal forwards;
93
+ /* Delay animation after fly-in animation */
94
+ transform: translate(40px, -40px);
95
+ animation-delay: 0.8s;
96
+ }
97
+
98
+ @keyframes group4_anim {
99
+ 0% { transform: translate(40px, -40px); }
100
+ 25% { transform: translate(25px, 45px); }
101
+ 50% { transform: translate(-20px, 120px); }
102
+ 75% { transform: translate(50px, 0px); }
103
+ 100% { transform: translate(40px, -40px); }
104
+ }
105
+ </style>
106
+ <defs>
107
+ <!-- Define the circular masks -->
108
+ <mask id="circleMask1">
109
+ <rect width="100" height="100" fill="black" />
110
+ <circle cx="50" cy="50" r="50" fill="white" />
111
+ </mask>
112
+ <mask id="circleMask2">
113
+ <rect width="100" height="100" fill="black" />
114
+ <circle cx="50" cy="50" r="46" fill="white" />
115
+ </mask>
116
+
117
+ <!-- Radial Gradients for Animations -->
118
+ <radialGradient id="gradient1" cx="0.5" cy="0.5" r="1" spreadMethod="pad">
119
+ <stop offset="0%" stop-color="var(--logo-color1)" />
120
+ <stop offset="80%" stop-color="var(--logo-color1-transparent)" />
121
+ </radialGradient>
122
+ <radialGradient id="gradient2" cx="0.5" cy="0.5" r="1" spreadMethod="pad">
123
+ <stop offset="0%" stop-color="var(--logo-color2)" />
124
+ <stop offset="80%" stop-color="var(--logo-color2-transparent)" />
125
+ </radialGradient>
126
+ <radialGradient id="gradient3" cx="0.5" cy="0.5" r="1" spreadMethod="pad">
127
+ <stop offset="0%" stop-color="var(--logo-color3)" />
128
+ <stop offset="50%" stop-color="var(--logo-color3-transparent)" />
129
+ </radialGradient>
130
+ <radialGradient id="gradient4" cx="0.5" cy="0.5" r="1" spreadMethod="pad">
131
+ <stop offset="0%" stop-color="var(--logo-color4)" />
132
+ <stop offset="80%" stop-color="var(--logo-color4-transparent)" />
133
+ </radialGradient>
134
+
135
+ <!-- Radial Gradient for Centered Disc -->
136
+ <radialGradient id="centerGradient" cx="0.5" cy="0.5" r="0.5" spreadMethod="pad">
137
+ <stop offset="0%" stop-color="rgba(255, 255, 255, 0)" />
138
+ <stop offset="75%" stop-color="rgba(255, 255, 255, 0)" />
139
+ <stop offset="100%" stop-color="var(--logo-glass-color)" />
140
+ </radialGradient>
141
+
142
+ <!-- Gaussian blur filter -->
143
+ <filter id="blurFilter" x="-150%" y="-150%" width="400%" height="400%">
144
+ <feGaussianBlur stdDeviation="8" />
145
+ </filter>
146
+
147
+ </defs>
148
+
149
+ <!-- Larger Disc (border) -->
150
+ <g mask="url(#circleMask1)">
151
+ <circle cx="50" cy="50" r="50" fill="var(--logo-color2)" />
152
+ <g id="group1">
153
+ <ellipse x="50" rx="500" ry="80" fill="url(#gradient3)" filter="url(#blurFilter)" />
154
+ </g>
155
+ <g id="group2">
156
+ <ellipse rx="100" ry="100" fill="url(#gradient2)" filter="url(#blurFilter)" />
157
+ </g>
158
+ <g id="group3">
159
+ <ellipse rx="100" ry="100" fill="url(#gradient1)" filter="url(#blurFilter)" />
160
+ </g>
161
+ </g>
162
+
163
+ <!-- Smaller Disc -->
164
+ <g mask="url(#circleMask2)">
165
+ <circle cx="50" cy="50" r="46" fill="var(--logo-color1)" />
166
+ <g id="group1">
167
+ <ellipse x="50" rx="100" ry="80" fill="url(#gradient1)" filter="url(#blurFilter)" />
168
+ </g>
169
+ <g id="group2">
170
+ <ellipse rx="80" ry="50" fill="url(#gradient2)" filter="url(#blurFilter)" />
171
+ </g>
172
+ <g id="group3">
173
+ <ellipse rx="60" ry="40" fill="url(#gradient3)" filter="url(#blurFilter)" />
174
+ </g>
175
+ <g id="group4">
176
+ <ellipse rx="30" ry="40" fill="url(#gradient4)" filter="url(#blurFilter)" />
177
+ </g>
178
+
179
+ <!-- Grain -->
180
+ <circle cx="50" cy="50" r="46" fill="url(#centerGradient)" filter='url(#grainFilter)' style="mix-blend-mode: soft-light;" />
181
+ </g>
182
+
183
+ <!-- Grain -->
184
+ <circle cx="50" cy="50" r="46" fill="url(#centerGradient)" />
185
+ </svg>
186
+ </div>
187
+ `,avatarLarge:``,info:`<svg viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.5"><path d="m6.7 8.5c-.1-4.2 5.1-6.6 8.2-4 3.3 2.5 2 8.1-2.1 8.9-.6.1-1.1.7-1.1 1.3v2.2" stroke-linecap="round" stroke-linejoin="round"/><circle cx="11.8" cy="20.6" r=".4"/></g></svg>`,openChat:`<svg viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="2"><path d="m12 4v17"/><path d="m19 11-7-7-7 7"/></g></svg>`,speechInput:`
188
+ <svg width="0" height="0">
189
+ <defs>
190
+ <mask id="microphone-mask" maskUnits="objectBoundingBox" maskContentUnits="objectBoundingBox">
191
+ <rect width="1" height="1" fill="black" />
192
+ <g
193
+ fill="none"
194
+ stroke="white"
195
+ stroke-width="2"
196
+ stroke-linecap="round"
197
+ stroke-linejoin="round"
198
+ transform="translate(0.1, 0.05) scale(0.035, 0.035)"
199
+ >
200
+ <path d="M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"></path>
201
+ <path d="M19 10v2a7 7 0 0 1-14 0v-2"></path>
202
+ <path d="M12 19v4"></path>
203
+ <path d="M8 23h8"></path>
204
+ </g>
205
+ </mask>
206
+ </defs>
207
+ </svg>
208
+ `,listUnordered:`
209
+ <svg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'>
210
+ <path d='M8 6H21' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/>
211
+ <path d='M8 12H21' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/>
212
+ <path d='M8 18H21' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/>
213
+ <path d='M3 6H3.01' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/>
214
+ <path d='M3 12H3.01' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/>
215
+ <path d='M3 18H3.01' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/>
216
+ </svg>
217
+ `,lightMode:`
218
+ <svg viewBox="0 0 24 24" fill="none">
219
+ <path d="M18.5625 12C18.5625 10.2595 17.8711 8.59032 16.6404 7.35961C15.4097 6.1289 13.7405 5.4375 12 5.4375C10.2595 5.4375 8.59032 6.1289 7.35961 7.35961C6.1289 8.59032 5.4375 10.2595 5.4375 12C5.4375 13.7405 6.1289 15.4097 7.35961 16.6404C8.59032 17.8711 10.2595 18.5625 12 18.5625C13.7405 18.5625 15.4097 17.8711 16.6404 16.6404C17.8711 15.4097 18.5625 13.7405 18.5625 12Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
220
+ <path d="M12 20.4375V22.3125" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
221
+ <path d="M20.4375 12H22.3125" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
222
+ <path d="M12 3.5625V1.6875" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
223
+ <path d="M3.5625 12H1.6875" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
224
+ <path d="M6.03469 17.9663L4.70813 19.2929" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
225
+ <path d="M17.9662 17.9663L19.2919 19.2919" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
226
+ <path d="M17.9672 6.03461L19.2928 4.70898" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
227
+ <path d="M6.03375 6.03461L4.70813 4.70898" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
228
+ </svg>
229
+
230
+ `,darkMode:`
231
+ <svg viewBox="0 0 24 24" fill="none">
232
+ <path d="M17.4546 19.3866C19.2134 18.1336 20.4574 16.2846 20.9554 14.1833C20.27 14.9892 19.4098 15.6282 18.4403 16.0517C17.4708 16.4753 16.4176 16.6723 15.3605 16.6277C14.3035 16.5831 13.2706 16.2981 12.3402 15.7944C11.4098 15.2908 10.6065 14.5816 9.99136 13.7209C9.37618 12.8601 8.96532 11.8705 8.78999 10.8272C8.61467 9.78384 8.67951 8.71426 8.97957 7.69974C9.27963 6.68522 9.80703 5.75246 10.5217 4.97235C11.2363 4.19223 12.1194 3.5853 13.1038 3.19768C11.6649 3.0599 10.2141 3.2727 8.87542 3.81787C7.53673 4.36304 6.35002 5.22437 5.41679 6.32817C4.48357 7.43197 3.83159 8.7454 3.51665 10.1561C3.2017 11.5668 3.23314 13.0328 3.6083 14.4287C3.98345 15.8246 4.69115 17.1089 5.67085 18.1717C6.65055 19.2344 7.87311 20.0441 9.23394 20.5313C10.5948 21.0186 12.0534 21.169 13.485 20.9696C14.9166 20.7703 16.2787 20.2271 17.4546 19.3866Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
233
+ </svg>
234
+ `,settings:`
235
+ <svg fill="none" viewBox="0 0 24 24">
236
+ <g fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
237
+ <path d="M5.08008 12H1.26074"></path>
238
+ <path d="M22.7383 12H10.0059"></path>
239
+ <path d="M13.9941 20.1172H1.26074"></path>
240
+ <path d="M22.7383 20.1172h-3.8184"></path>
241
+ <path d="m13.9941 4.02344 -12.73336 0"></path>
242
+ <path d="M22.7383 4.02344h-3.8184"></path>
243
+ <path d="M5.08 12.002a2.463 2.463 0 1 0 4.926 0 2.463 2.463 0 1 0 -4.926 0"></path>
244
+ <path d="M13.994 20.119a2.463 2.463 0 1 0 4.926 0 2.463 2.463 0 1 0 -4.926 0"></path>
245
+ <path d="M13.994 3.885a2.463 2.463 0 1 0 4.926 0 2.463 2.463 0 1 0 -4.926 0"></path>
246
+ </g>
247
+ </svg>
248
+ `,settingsClose:`
249
+ <svg fill="none" viewBox="0 0 24 24">
250
+ <g fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
251
+ <path d="m6 18 12-12"/>
252
+ <path d="m18 18-12-12"/>
253
+ </g>
254
+ </svg>
255
+ `,sources:`
256
+ <svg fill="none" viewBox="0 0 24 24" width="24">
257
+ <g fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round">
258
+ <path d="m20.3713 11.9655c.0006 1.0543-.2065 2.0983-.6093 3.0726-.4029.9742-.9936 1.8595-1.7386 2.6054-.7449.7458-1.6294 1.3376-2.603 1.7416s-2.0172.6122-3.0712.6127c-2.1389-.0355-4.17716-.9146-5.67123-2.4459-1.49408-1.5313-2.32301-3.5908-2.30639-5.7304.00172-2.04515.80385-4.00834 2.23469-5.46928s3.37664-2.30352 5.42083-2.34734c.1155-.00487.231-.00696.3478-.00696 1.0491-.00569 2.089.19629 3.0598.5943.9707.39801 1.8531.9842 2.5964 1.72479s1.3327 1.62095 1.7343 2.59038c.4017.96942.6076 2.00871.6059 3.05811z"/>
259
+ <path d="m12.3713 3.9978c-3.99996 4.52568-3.99996 10.4299 0 16"/>
260
+ <path d="m12.3713 3.9978c4 4.52627 4 10.4292 0 16"/>
261
+ <path d="m4.37134 11.9978h15.99996"/>
262
+ </g>
263
+ </svg>
264
+ `,model:`
265
+ <svg fill="none" viewBox="0 0 24 24">
266
+ <g fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
267
+ <path d="m2.63867 10.0059c3.35563-.67463 6.05732-3.40917 6.73292-6.8516.67571 3.44243 3.37671 6.17697 6.73231 6.8516m0 .0039c-3.3556.6746-6.0573 3.4091-6.73291 6.8516-.6756-3.4425-3.37669-6.177-6.73232-6.8516"/>
268
+ <path d="m13.6367 17.3983c2.0766-.4174 3.7486-2.1097 4.1668-4.2401.4181 2.1304 2.0896 3.8227 4.1663 4.2401m0 .0024c-2.0767.4176-3.7487 2.1098-4.1667 4.2402-.4181-2.1304-2.0898-3.8226-4.1664-4.2402"/>
269
+ </g>
270
+ </svg>
271
+ `,checkbox:`
272
+ <svg viewBox="0 0 24 24" fill="none">
273
+ <path d="M18 6L10 16L5 11" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
274
+ </svg>
275
+ `,warning:`
276
+ <svg fill="none" viewBox="0 0 24 24">
277
+ <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M20 11.8499c0.0058 2.1364 -0.8308 4.1889 -2.3284 5.7125C16.174 19.086 14.1362 19.9579 12 19.9889c-1.0431 0.0158 -2.07902 -0.1757 -3.04759 -0.5634 -0.96857 -0.3877 -1.85052 -0.9638 -2.59471 -1.695 -0.74419 -0.7312 -1.3358 -1.6028 -1.74052 -2.5644 -0.40472 -0.9616 -0.61449 -1.9939 -0.61715 -3.0372 -0.00576 -2.13645 0.83084 -4.18908 2.32839 -5.71284C7.82597 4.8923 9.86379 4.02023 12 3.98892c1.0432 -0.01562 2.0792 0.17602 3.0477 0.56381 0.9686 0.38779 1.8505 0.96402 2.5947 1.69526 0.7442 0.73125 1.3358 1.60296 1.7405 2.56458 0.4047 0.96163 0.6145 1.99403 0.6171 3.03733v0Z" stroke-width="2"></path>
278
+ <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M12 12.989V7.98804" stroke-width="2"></path>
279
+ <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M12 15.512h-0.004" stroke-width="2"></path>
280
+ <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M12.001 15.512H12" stroke-width="2"></path>
281
+ <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M4.50003 20.0341c-1.10018 -1.0257 -1.97829 -2.2662 -2.58007 -3.6447 -0.60179 -1.3786 -0.91445 -2.8659 -0.91867 -4.37 -0.004213 -1.5042 0.3001 -2.99325 0.89415 -4.37514 0.59404 -1.38189 1.46518 -2.62726 2.55959 -3.65915" stroke-width="2"></path>
282
+ <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M19.523 3.96411c1.0995 1.03065 1.9754 2.27621 2.5736 3.65943 0.5981 1.38321 0.9056 2.87456 0.9034 4.38156 -0.0021 1.507 -0.3139 2.9975 -0.916 4.379 -0.6021 1.3815 -1.4816 2.6245 -2.584 3.652" stroke-width="2"></path>
283
+ <path stroke="currentColor" d="M11.998 16.0161c-0.138 0 -0.25 -0.1119 -0.25 -0.25s0.112 -0.25 0.25 -0.25" stroke-width="2"></path>
284
+ <path stroke="currentColor" d="M11.998 16.0161c0.1381 0 0.25 -0.1119 0.25 -0.25s-0.1119 -0.25 -0.25 -0.25" stroke-width="2"></path>
285
+ </svg>
286
+ `,embedAvatar:``}}},u={fineGrained:{light:l,dark:s(l,{tokens:{base:{lineColor:`color-mix(in srgb, var(--color-brand-100) 20%, transparent)`},components:{body:{background:`var(--color-grey-900)`,color:`var(--color-grey-100)`,focus:{color:`var(--color-highlight-400)`},custom:{selectionColor:`var(--color-grey-1000)`,selectionBackground:`var(--color-brand-400)`}},avatar:{color:`var(--color-brand-200)`,background:`var(--color-grey-800)`},anchor:{color:`var(--color-brand-300)`,hover:{color:`var(--color-brand-50)`}},btnPrimary:{color:`var(--color-grey-1000)`,background:`var(--color-brand-300)`,hover:{background:`var(--color-brand-100)`}},btnSecondary:{color:`var(--color-brand-100)`,background:`var(--color-brand-900)`,hover:{color:`var(--color-grey-0)`,background:`var(--color-brand-800)`}},btnTertiary:{color:`var(--anchor-color)`,background:`transparent`,borderRadius:`var(--base-border-radius)`,hover:{color:`var(--anchor-hover-color)`}},card:{color:`var(--body-color)`,background:`var(--color-grey-800)`,hover:{color:`var(--color-grey-0)`,background:`var(--color-brand-900)`}},input:{background:`var(--color-grey-900)`,borderColor:`var(--color-grey-700)`,custom:{placeholderColor:`var(--color-grey-400)`}},label:{color:`var(--color-grey-50)`},checkbox:{background:`var(--color-grey-700)`,borderColor:`var(--color-grey-500)`,custom:{checkedColor:`var(--color-grey-900)`,checkedBorderColor:`var(--color-brand-300)`,checkedBackground:`var(--color-brand-300)`}},radio:{background:`var(--color-grey-700)`,borderColor:`var(--color-grey-500)`,custom:{checkedColor:`var(--color-grey-900)`,checkedBorderColor:`var(--color-brand-300)`,checkedBackground:`var(--color-brand-300)`}},contextBox:{custom:{titleColor:`var(--color-grey-50)`}},referenceDescription:{color:`var(--color-grey-300)`,hover:{color:`var(--color-grey-300)`}},chatFooter:{color:`var(--color-grey-500)`},chatInput:{color:`var(--color-grey-100)`},chatInputSubmit:{custom:{deactivatedBackground:`var(--color-grey-400)`,deactivatedBorderColor:`var(--color-grey-400)`}},dialog:{custom:{backgroundOverlay:`rgba(0, 0, 0, 0.5)`}},tooltip:{background:`var(--color-grey-1000)`}}}})}},d=e({theme:()=>ee}),f=structuredClone(u.fineGrained.light);f.tokens.colors={brand:{50:`#f0f9ff`,100:`#e0f2fe`,200:`#bae6fd`,300:`#7dd3fc`,400:`#38bdf8`,500:`#0ea5e9`,600:`#037ABA`,700:`#0369a1`,800:`#075985`,900:`#0c4a6e`,950:`#082f49`},highlight:{50:`#f5f3ff`,100:`#ede9fe`,200:`#ddd6fe`,300:`#c4b5fd`,400:`#a78bfa`,500:`#8b5cf6`,600:`#7c3aed`,700:`#6d28d9`,800:`#5b21b6`,900:`#4c1d95`,950:`#2e1065`},grey:{0:`#ffffff`,50:`#f9fafb`,100:`#f3f4f6`,200:`#e5e7eb`,300:`#d1d5db`,400:`#9ca3af`,500:`#6b7280`,600:`#4b5563`,700:`#374151`,800:`#2d3748`,900:`#1a202c`,950:`#171923`,1e3:`#000000`}};var p=structuredClone(u.fineGrained.dark);p.tokens.colors=f.tokens.colors;var ee={fineGrained:{light:f,dark:p}};Object.freeze({status:`aborted`});function m(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,`_zod`,{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,`name`,{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,`init`,{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,`name`,{value:e}),o}var h=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},te=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},ne={};function g(e){return e&&Object.assign(ne,e),ne}function re(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function ie(e,t){return typeof t==`bigint`?t.toString():t}function _(e){return{get value(){{let t=e();return Object.defineProperty(this,`value`,{value:t}),t}throw Error(`cached value already set`)}}}function ae(e){return e==null}function oe(e){let t=e.startsWith(`^`)?1:0,n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function se(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=t.toString(),i=(r.split(`.`)[1]||``).length;if(i===0&&/\d?e-\d?/.test(r)){let e=r.match(/\d?e-(\d?)/);e?.[1]&&(i=Number.parseInt(e[1]))}let a=n>i?n:i;return Number.parseInt(e.toFixed(a).replace(`.`,``))%Number.parseInt(t.toFixed(a).replace(`.`,``))/10**a}var ce=Symbol(`evaluating`);function v(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==ce)return r===void 0&&(r=ce,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function y(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function b(...e){let t={};for(let n of e)Object.assign(t,Object.getOwnPropertyDescriptors(n));return Object.defineProperties({},t)}function le(e){return JSON.stringify(e)}function ue(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var de=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function x(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var fe=_(()=>{if(typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function S(e){if(x(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(x(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function pe(e){return S(e)?{...e}:Array.isArray(e)?[...e]:e}var me=new Set([`string`,`number`,`symbol`]);function C(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function w(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function T(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function he(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}var ge={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function _e(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return w(e,b(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return y(this,`shape`,e),e},checks:[]}))}function ve(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return w(e,b(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return y(this,`shape`,r),r},checks:[]}))}function ye(e,t){if(!S(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return w(e,b(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return y(this,`shape`,n),n}}))}function be(e,t){if(!S(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return w(e,b(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return y(this,`shape`,n),n}}))}function xe(e,t){return w(e,b(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return y(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:[]}))}function Se(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return w(t,b(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return y(this,`shape`,i),i},checks:[]}))}function Ce(e,t,n){return w(t,b(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return y(this,`shape`,i),i}}))}function E(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function D(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function O(e){return typeof e==`string`?e:e?.message}function k(e,t,n){let r={...e,path:e.path??[]};return e.message||(r.message=O(e.inst?._zod.def?.error?.(e))??O(t?.error?.(e))??O(n.customError?.(e))??O(n.localeError?.(e))??`Invalid input`),delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function we(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function A(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var Te=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,`_zod`,{value:e._zod,enumerable:!1}),Object.defineProperty(e,`issues`,{value:t,enumerable:!1}),e.message=JSON.stringify(t,ie,2),Object.defineProperty(e,`toString`,{value:()=>e.message,enumerable:!1})},Ee=m(`$ZodError`,Te),De=m(`$ZodError`,Te,{Parent:Error});function Oe(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function ke(e,t=e=>e.message){let n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`&&i.errors.length)i.errors.map(e=>r({issues:e}));else if(i.code===`invalid_key`)r({issues:i.issues});else if(i.code===`invalid_element`)r({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(e),n}var Ae=e=>(t,n,r,i)=>{let a=r?Object.assign(r,{async:!1}):{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new h;if(o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>k(e,a,g())));throw de(t,i?.callee),t}return o.value},je=e=>async(t,n,r,i)=>{let a=r?Object.assign(r,{async:!0}):{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>k(e,a,g())));throw de(t,i?.callee),t}return o.value},j=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new h;return a.issues.length?{success:!1,error:new(e??Ee)(a.issues.map(e=>k(e,i,g())))}:{success:!0,data:a.value}},Me=j(De),M=e=>async(t,n,r)=>{let i=r?Object.assign(r,{async:!0}):{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>k(e,i,g())))}:{success:!0,data:a.value}},Ne=M(De),Pe=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return Ae(e)(t,n,i)},Fe=e=>(t,n,r)=>Ae(e)(t,n,r),Ie=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return je(e)(t,n,i)},Le=e=>async(t,n,r)=>je(e)(t,n,r),Re=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return j(e)(t,n,i)},ze=e=>(t,n,r)=>j(e)(t,n,r),Be=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return M(e)(t,n,i)},Ve=e=>async(t,n,r)=>M(e)(t,n,r),He=/^[cC][^\s-]{8,}$/,Ue=/^[0-9a-z]+$/,We=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Ge=/^[0-9a-vA-V]{20}$/,Ke=/^[A-Za-z0-9]{27}$/,qe=/^[a-zA-Z0-9_-]{21}$/,Je=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Ye=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Xe=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Ze=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Qe=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function $e(){return new RegExp(Qe,`u`)}var et=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,tt=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,nt=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,rt=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,it=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,at=/^[A-Za-z0-9_-]*$/,ot=/^\+[1-9]\d{6,14}$/,st=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,ct=RegExp(`^${st}$`);function lt(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function ut(e){return RegExp(`^${lt(e)}$`)}function dt(e){let t=lt({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${st}T(?:${r})$`)}var ft=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},pt=/^-?\d+$/,mt=/^-?\d+(?:\.\d+)?$/,ht=/^(?:true|false)$/i,gt=/^[^A-Z]*$/,_t=/^[^a-z]*$/,N=m(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),vt={number:`number`,bigint:`bigint`,object:`date`},yt=m(`$ZodCheckLessThan`,(e,t)=>{N.init(e,t);let n=vt[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),bt=m(`$ZodCheckGreaterThan`,(e,t)=>{N.init(e,t);let n=vt[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),xt=m(`$ZodCheckMultipleOf`,(e,t)=>{N.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):se(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),St=m(`$ZodCheckNumberFormat`,(e,t)=>{N.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=ge[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=pt)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),Ct=m(`$ZodCheckMaxLength`,(e,t)=>{var n;N.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!ae(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=we(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),wt=m(`$ZodCheckMinLength`,(e,t)=>{var n;N.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!ae(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=we(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Tt=m(`$ZodCheckLengthEquals`,(e,t)=>{var n;N.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!ae(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=we(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),P=m(`$ZodCheckStringFormat`,(e,t)=>{var n,r;N.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Et=m(`$ZodCheckRegex`,(e,t)=>{P.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Dt=m(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=gt,P.init(e,t)}),Ot=m(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=_t,P.init(e,t)}),kt=m(`$ZodCheckIncludes`,(e,t)=>{N.init(e,t);let n=C(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),At=m(`$ZodCheckStartsWith`,(e,t)=>{N.init(e,t);let n=RegExp(`^${C(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),jt=m(`$ZodCheckEndsWith`,(e,t)=>{N.init(e,t);let n=RegExp(`.*${C(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),Mt=m(`$ZodCheckOverwrite`,(e,t)=>{N.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),Nt=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
287
+ `).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(`
288
+ `))}},Pt={major:4,minor:3,patch:6},F=m(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Pt;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=E(e),i;for(let a of t){if(a._zod.def.when){if(!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new h;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=E(e,t))});else{if(e.issues.length===t)continue;r||=E(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(E(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new h;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new h;return o.then(e=>t(e,r,a))}return t(o,r,a)}}v(e,`~standard`,()=>({validate:t=>{try{let n=Me(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return Ne(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),Ft=m(`$ZodString`,(e,t)=>{F.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??ft(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),I=m(`$ZodStringFormat`,(e,t)=>{P.init(e,t),Ft.init(e,t)}),It=m(`$ZodGUID`,(e,t)=>{t.pattern??=Ye,I.init(e,t)}),Lt=m(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=Xe(e)}else t.pattern??=Xe();I.init(e,t)}),Rt=m(`$ZodEmail`,(e,t)=>{t.pattern??=Ze,I.init(e,t)}),zt=m(`$ZodURL`,(e,t)=>{I.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Bt=m(`$ZodEmoji`,(e,t)=>{t.pattern??=$e(),I.init(e,t)}),Vt=m(`$ZodNanoID`,(e,t)=>{t.pattern??=qe,I.init(e,t)}),Ht=m(`$ZodCUID`,(e,t)=>{t.pattern??=He,I.init(e,t)}),Ut=m(`$ZodCUID2`,(e,t)=>{t.pattern??=Ue,I.init(e,t)}),Wt=m(`$ZodULID`,(e,t)=>{t.pattern??=We,I.init(e,t)}),Gt=m(`$ZodXID`,(e,t)=>{t.pattern??=Ge,I.init(e,t)}),Kt=m(`$ZodKSUID`,(e,t)=>{t.pattern??=Ke,I.init(e,t)}),qt=m(`$ZodISODateTime`,(e,t)=>{t.pattern??=dt(t),I.init(e,t)}),Jt=m(`$ZodISODate`,(e,t)=>{t.pattern??=ct,I.init(e,t)}),Yt=m(`$ZodISOTime`,(e,t)=>{t.pattern??=ut(t),I.init(e,t)}),Xt=m(`$ZodISODuration`,(e,t)=>{t.pattern??=Je,I.init(e,t)}),Zt=m(`$ZodIPv4`,(e,t)=>{t.pattern??=et,I.init(e,t),e._zod.bag.format=`ipv4`}),Qt=m(`$ZodIPv6`,(e,t)=>{t.pattern??=tt,I.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),$t=m(`$ZodCIDRv4`,(e,t)=>{t.pattern??=nt,I.init(e,t)}),en=m(`$ZodCIDRv6`,(e,t)=>{t.pattern??=rt,I.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function tn(e){if(e===``)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var nn=m(`$ZodBase64`,(e,t)=>{t.pattern??=it,I.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{tn(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function rn(e){if(!at.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return tn(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var an=m(`$ZodBase64URL`,(e,t)=>{t.pattern??=at,I.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{rn(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),on=m(`$ZodE164`,(e,t)=>{t.pattern??=ot,I.init(e,t)});function sn(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var cn=m(`$ZodJWT`,(e,t)=>{I.init(e,t),e._zod.check=n=>{sn(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),ln=m(`$ZodNumber`,(e,t)=>{F.init(e,t),e._zod.pattern=e._zod.bag.pattern??mt,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:`Infinity`:void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),un=m(`$ZodNumberFormat`,(e,t)=>{St.init(e,t),ln.init(e,t)}),dn=m(`$ZodBoolean`,(e,t)=>{F.init(e,t),e._zod.pattern=ht,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),fn=m(`$ZodUnknown`,(e,t)=>{F.init(e,t),e._zod.parse=e=>e}),pn=m(`$ZodNever`,(e,t)=>{F.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function mn(e,t,n){e.issues.length&&t.issues.push(...D(n,e.issues)),t.value[n]=e.value}var hn=m(`$ZodArray`,(e,t)=>{F.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>mn(t,n,e))):mn(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function L(e,t,n,r,i){if(e.issues.length){if(i&&!(n in r))return;t.issues.push(...D(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function gn(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=he(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function _n(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optout===`optional`;for(let i in t){if(s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>L(e,n,i,t,u))):L(a,n,i,t,u)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}var vn=m(`$ZodObject`,(e,t)=>{if(F.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,`shape`,{get:()=>{let n={...e};return Object.defineProperty(t,`shape`,{value:n}),n}})}let n=_(()=>gn(t));v(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=x,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optout===`optional`,i=n._zod.run({value:s[e],issues:[]},o);i instanceof Promise?c.push(i.then(n=>L(n,t,e,s,r))):L(i,t,e,s,r)}return i?_n(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),yn=m(`$ZodObjectJIT`,(e,t)=>{vn.init(e,t);let n=e._zod.parse,r=_(()=>gn(t)),i=e=>{let t=new Nt([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=le(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){let n=a[r],o=le(r),s=e[r]?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),s?t.write(`
289
+ if (${n}.issues.length) {
290
+ if (${o} in input) {
291
+ payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
292
+ ...iss,
293
+ path: iss.path ? [${o}, ...iss.path] : [${o}]
294
+ })));
295
+ }
296
+ }
297
+
298
+ if (${n}.value === undefined) {
299
+ if (${o} in input) {
300
+ newResult[${o}] = undefined;
301
+ }
302
+ } else {
303
+ newResult[${o}] = ${n}.value;
304
+ }
305
+
306
+ `):t.write(`
307
+ if (${n}.issues.length) {
308
+ payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
309
+ ...iss,
310
+ path: iss.path ? [${o}, ...iss.path] : [${o}]
311
+ })));
312
+ }
313
+
314
+ if (${n}.value === undefined) {
315
+ if (${o} in input) {
316
+ newResult[${o}] = undefined;
317
+ }
318
+ } else {
319
+ newResult[${o}] = ${n}.value;
320
+ }
321
+
322
+ `)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=x,s=!ne.jitless,c=s&&fe.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?_n([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function bn(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!E(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>k(e,r,g())))}),t)}var xn=m(`$ZodUnion`,(e,t)=>{F.init(e,t),v(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),v(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),v(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),v(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>oe(e.source)).join(`|`)})$`)}});let n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(i,a)=>{if(n)return r(i,a);let o=!1,s=[];for(let e of t.options){let t=e._zod.run({value:i.value,issues:[]},a);if(t instanceof Promise)s.push(t),o=!0;else{if(t.issues.length===0)return t;s.push(t)}}return o?Promise.all(s).then(t=>bn(t,i,e,a)):bn(s,i,e,a)}}),Sn=m(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,xn.init(e,t);let n=e._zod.parse;v(e._zod,`propValues`,()=>{let e={};for(let n of t.options){let r=n._zod.propValues;if(!r||Object.keys(r).length===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let[t,n]of Object.entries(r)){e[t]||(e[t]=new Set);for(let r of n)e[t].add(r)}}return e});let r=_(()=>{let e=t.options,n=new Map;for(let r of e){let e=r._zod.propValues?.[t.discriminator];if(!e||e.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,a)=>{let o=i.value;if(!x(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,input:o,path:[t.discriminator],inst:e}),i)}}),Cn=m(`$ZodIntersection`,(e,t)=>{F.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>Tn(e,t,n)):Tn(e,i,a)}});function wn(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(S(e)&&S(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=wn(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=wn(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Tn(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),E(e))return e;let o=wn(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var En=m(`$ZodRecord`,(e,t)=>{F.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!S(i))return n.issues.push({expected:`record`,code:`invalid_type`,input:i,inst:e}),n;let a=[],o=t.keyType._zod.values;if(o){n.value={};let s=new Set;for(let e of o)if(typeof e==`string`||typeof e==`number`||typeof e==`symbol`){s.add(typeof e==`number`?e.toString():e);let o=t.valueType._zod.run({value:i[e],issues:[]},r);o instanceof Promise?a.push(o.then(t=>{t.issues.length&&n.issues.push(...D(e,t.issues)),n.value[e]=t.value})):(o.issues.length&&n.issues.push(...D(e,o.issues)),n.value[e]=o.value)}let c;for(let e in i)s.has(e)||(c??=[],c.push(e));c&&c.length>0&&n.issues.push({code:`unrecognized_keys`,input:i,inst:e,keys:c})}else{n.value={};for(let o of Reflect.ownKeys(i)){if(o===`__proto__`)continue;let s=t.keyType._zod.run({value:o,issues:[]},r);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof o==`string`&&mt.test(o)&&s.issues.length){let e=t.keyType._zod.run({value:Number(o),issues:[]},r);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(s=e)}if(s.issues.length){t.mode===`loose`?n.value[o]=i[o]:n.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>k(e,r,g())),input:o,path:[o],inst:e});continue}let c=t.valueType._zod.run({value:i[o],issues:[]},r);c instanceof Promise?a.push(c.then(e=>{e.issues.length&&n.issues.push(...D(o,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...D(o,c.issues)),n.value[s.value]=c.value)}}return a.length?Promise.all(a).then(()=>n):n}}),Dn=m(`$ZodEnum`,(e,t)=>{F.init(e,t);let n=re(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>me.has(typeof e)).map(e=>typeof e==`string`?C(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),On=m(`$ZodLiteral`,(e,t)=>{if(F.init(e,t),t.values.length===0)throw Error(`Cannot create literal schema with no valid values`);let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(`^(${t.values.map(e=>typeof e==`string`?C(e):e?C(e.toString()):String(e)).join(`|`)})$`),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),kn=m(`$ZodTransform`,(e,t)=>{F.init(e,t),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new te(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new h;return n.value=i,n}});function An(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}var jn=m(`$ZodOptional`,(e,t)=>{F.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,v(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),v(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${oe(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>An(t,e.value)):An(r,e.value)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),Mn=m(`$ZodExactOptional`,(e,t)=>{jn.init(e,t),v(e._zod,`values`,()=>t.innerType._zod.values),v(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Nn=m(`$ZodNullable`,(e,t)=>{F.init(e,t),v(e._zod,`optin`,()=>t.innerType._zod.optin),v(e._zod,`optout`,()=>t.innerType._zod.optout),v(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${oe(e.source)}|null)$`):void 0}),v(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),Pn=m(`$ZodDefault`,(e,t)=>{F.init(e,t),e._zod.optin=`optional`,v(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>Fn(e,t)):Fn(r,t)}});function Fn(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var In=m(`$ZodPrefault`,(e,t)=>{F.init(e,t),e._zod.optin=`optional`,v(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Ln=m(`$ZodNonOptional`,(e,t)=>{F.init(e,t),v(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>Rn(t,e)):Rn(i,e)}});function Rn(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}var zn=m(`$ZodCatch`,(e,t)=>{F.init(e,t),v(e._zod,`optin`,()=>t.innerType._zod.optin),v(e._zod,`optout`,()=>t.innerType._zod.optout),v(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>k(e,n,g()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>k(e,n,g()))},input:e.value}),e.issues=[]),e)}}),Bn=m(`$ZodPipe`,(e,t)=>{F.init(e,t),v(e._zod,`values`,()=>t.in._zod.values),v(e._zod,`optin`,()=>t.in._zod.optin),v(e._zod,`optout`,()=>t.out._zod.optout),v(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>R(e,t.in,n)):R(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>R(e,t.out,n)):R(r,t.out,n)}});function R(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var Vn=m(`$ZodReadonly`,(e,t)=>{F.init(e,t),v(e._zod,`propValues`,()=>t.innerType._zod.propValues),v(e._zod,`values`,()=>t.innerType._zod.values),v(e._zod,`optin`,()=>t.innerType?._zod?.optin),v(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(Hn):Hn(r)}});function Hn(e){return e.value=Object.freeze(e.value),e}var Un=m(`$ZodCustom`,(e,t)=>{N.init(e,t),F.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>Wn(t,n,r,e));Wn(i,n,r,e)}});function Wn(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(A(e))}}var Gn,Kn=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function qn(){return new Kn}(Gn=globalThis).__zod_globalRegistry??(Gn.__zod_globalRegistry=qn());var z=globalThis.__zod_globalRegistry;function Jn(e,t){return new e({type:`string`,...T(t)})}function Yn(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...T(t)})}function Xn(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...T(t)})}function Zn(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...T(t)})}function Qn(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...T(t)})}function $n(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...T(t)})}function er(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...T(t)})}function tr(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...T(t)})}function nr(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...T(t)})}function rr(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...T(t)})}function ir(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...T(t)})}function ar(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...T(t)})}function or(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...T(t)})}function sr(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...T(t)})}function cr(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...T(t)})}function lr(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...T(t)})}function ur(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...T(t)})}function dr(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...T(t)})}function fr(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...T(t)})}function pr(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...T(t)})}function mr(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...T(t)})}function hr(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...T(t)})}function gr(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...T(t)})}function _r(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...T(t)})}function vr(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...T(t)})}function yr(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...T(t)})}function br(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...T(t)})}function xr(e,t){return new e({type:`number`,checks:[],...T(t)})}function Sr(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...T(t)})}function Cr(e,t){return new e({type:`boolean`,...T(t)})}function wr(e){return new e({type:`unknown`})}function Tr(e,t){return new e({type:`never`,...T(t)})}function Er(e,t){return new yt({check:`less_than`,...T(t),value:e,inclusive:!1})}function Dr(e,t){return new yt({check:`less_than`,...T(t),value:e,inclusive:!0})}function Or(e,t){return new bt({check:`greater_than`,...T(t),value:e,inclusive:!1})}function kr(e,t){return new bt({check:`greater_than`,...T(t),value:e,inclusive:!0})}function Ar(e,t){return new xt({check:`multiple_of`,...T(t),value:e})}function jr(e,t){return new Ct({check:`max_length`,...T(t),maximum:e})}function B(e,t){return new wt({check:`min_length`,...T(t),minimum:e})}function Mr(e,t){return new Tt({check:`length_equals`,...T(t),length:e})}function Nr(e,t){return new Et({check:`string_format`,format:`regex`,...T(t),pattern:e})}function Pr(e){return new Dt({check:`string_format`,format:`lowercase`,...T(e)})}function Fr(e){return new Ot({check:`string_format`,format:`uppercase`,...T(e)})}function Ir(e,t){return new kt({check:`string_format`,format:`includes`,...T(t),includes:e})}function Lr(e,t){return new At({check:`string_format`,format:`starts_with`,...T(t),prefix:e})}function Rr(e,t){return new jt({check:`string_format`,format:`ends_with`,...T(t),suffix:e})}function V(e){return new Mt({check:`overwrite`,tx:e})}function zr(e){return V(t=>t.normalize(e))}function Br(){return V(e=>e.trim())}function Vr(){return V(e=>e.toLowerCase())}function Hr(){return V(e=>e.toUpperCase())}function Ur(){return V(e=>ue(e))}function Wr(e,t,n){return new e({type:`array`,element:t,...T(n)})}function Gr(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...T(n)})}function Kr(e){let t=qr(n=>(n.addIssue=e=>{if(typeof e==`string`)n.issues.push(A(e,n.value,t._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=n.value,r.inst??=t,r.continue??=!t._zod.def.abort,n.issues.push(A(r))}},e(n.value,n)));return t}function qr(e,t){let n=new N({check:`custom`,...T(t)});return n._zod.check=e,n}function Jr(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??z,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,external:e?.external??void 0}}function H(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,H(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&U(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&o.schema._prefault&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function Yr(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
323
+
324
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function Xr(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(a[e.defId]=e.def)}e.external||Object.keys(a).length>0&&(e.target===`draft-2020-12`?i.$defs=a:i.definitions=a);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,`~standard`,{value:{...t[`~standard`],jsonSchema:{input:W(t,`input`,e.processors),output:W(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function U(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return U(r.element,n);if(r.type===`set`)return U(r.valueType,n);if(r.type===`lazy`)return U(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type===`default`||r.type===`prefault`)return U(r.innerType,n);if(r.type===`intersection`)return U(r.left,n)||U(r.right,n);if(r.type===`record`||r.type===`map`)return U(r.keyType,n)||U(r.valueType,n);if(r.type===`pipe`)return U(r.in,n)||U(r.out,n);if(r.type===`object`){for(let e in r.shape)if(U(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(U(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(U(e,n))return!0;return!!(r.rest&&U(r.rest,n))}return!1}var Zr=(e,t={})=>n=>{let r=Jr({...n,processors:t});return H(e,r),Yr(r,e),Xr(r,e)},W=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=Jr({...i??{},target:a,io:t,processors:n});return H(e,o),Yr(o,e),Xr(o,e)},Qr={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},$r=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=Qr[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},ei=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;typeof s==`string`&&s.includes(`int`)?i.type=`integer`:i.type=`number`,typeof u==`number`&&(t.target===`draft-04`||t.target===`openapi-3.0`?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u),typeof a==`number`&&(i.minimum=a,typeof u==`number`&&t.target!==`draft-04`&&(u>=a?delete i.minimum:delete i.exclusiveMinimum)),typeof l==`number`&&(t.target===`draft-04`||t.target===`openapi-3.0`?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l),typeof o==`number`&&(i.maximum=o,typeof l==`number`&&t.target!==`draft-04`&&(l<=o?delete i.maximum:delete i.exclusiveMaximum)),typeof c==`number`&&(i.multipleOf=c)},ti=(e,t,n,r)=>{n.type=`boolean`},ni=(e,t,n,r)=>{n.not={}},ri=(e,t,n,r)=>{let i=e._zod.def,a=re(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},ii=(e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(e===void 0){if(t.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(t.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);a.push(Number(e))}else a.push(e);if(a.length!==0)if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a},ai=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},oi=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},si=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=H(a.element,t,{...r,path:[...r.path,`items`]})},ci=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=H(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=H(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},li=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>H(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},ui=(e,t,n,r)=>{let i=e._zod.def,a=H(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=H(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},di=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=H(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)i.patternProperties[t.source]=e}else (t.target===`draft-07`||t.target===`draft-2020-12`)&&(i.propertyNames=H(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=H(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]});let c=o._zod.values;if(c){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e)}},fi=(e,t,n,r)=>{let i=e._zod.def,a=H(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},pi=(e,t,n,r)=>{let i=e._zod.def;H(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},mi=(e,t,n,r)=>{let i=e._zod.def;H(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},hi=(e,t,n,r)=>{let i=e._zod.def;H(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},gi=(e,t,n,r)=>{let i=e._zod.def;H(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},_i=(e,t,n,r)=>{let i=e._zod.def,a=t.io===`input`?i.in._zod.def.type===`transform`?i.out:i.in:i.out;H(a,t,r);let o=t.seen.get(e);o.ref=a},vi=(e,t,n,r)=>{let i=e._zod.def;H(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},yi=(e,t,n,r)=>{let i=e._zod.def;H(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},bi=m(`ZodISODateTime`,(e,t)=>{qt.init(e,t),J.init(e,t)});function xi(e){return _r(bi,e)}var Si=m(`ZodISODate`,(e,t)=>{Jt.init(e,t),J.init(e,t)});function Ci(e){return vr(Si,e)}var wi=m(`ZodISOTime`,(e,t)=>{Yt.init(e,t),J.init(e,t)});function Ti(e){return yr(wi,e)}var Ei=m(`ZodISODuration`,(e,t)=>{Xt.init(e,t),J.init(e,t)});function Di(e){return br(Ei,e)}var Oi=(e,t)=>{Ee.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>ke(e,t)},flatten:{value:t=>Oe(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,ie,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,ie,2)}},isEmpty:{get(){return e.issues.length===0}}})};m(`ZodError`,Oi);var G=m(`ZodError`,Oi,{Parent:Error}),ki=Ae(G),Ai=je(G),ji=j(G),Mi=M(G),Ni=Pe(G),Pi=Fe(G),Fi=Ie(G),Ii=Le(G),Li=Re(G),Ri=ze(G),zi=Be(G),Bi=Ve(G),K=m(`ZodType`,(e,t)=>(F.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:W(e,`input`),output:W(e,`output`)}}),e.toJSONSchema=Zr(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,`_def`,{value:t}),e.check=(...n)=>e.clone(b(t,{checks:[...t.checks??[],...n.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0}),e.with=e.check,e.clone=(t,n)=>w(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.parse=(t,n)=>ki(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>ji(e,t,n),e.parseAsync=async(t,n)=>Ai(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>Mi(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>Ni(e,t,n),e.decode=(t,n)=>Pi(e,t,n),e.encodeAsync=async(t,n)=>Fi(e,t,n),e.decodeAsync=async(t,n)=>Ii(e,t,n),e.safeEncode=(t,n)=>Li(e,t,n),e.safeDecode=(t,n)=>Ri(e,t,n),e.safeEncodeAsync=async(t,n)=>zi(e,t,n),e.safeDecodeAsync=async(t,n)=>Bi(e,t,n),e.refine=(t,n)=>e.check($a(t,n)),e.superRefine=t=>e.check(eo(t)),e.overwrite=t=>e.check(V(t)),e.optional=()=>Fa(e),e.exactOptional=()=>La(e),e.nullable=()=>za(e),e.nullish=()=>Fa(za(e)),e.nonoptional=t=>Ga(e,t),e.array=()=>ya(e),e.or=t=>X([e,t]),e.and=t=>Ta(e,t),e.transform=t=>Ya(e,Na(t)),e.default=t=>Va(e,t),e.prefault=t=>Ua(e,t),e.catch=t=>qa(e,t),e.pipe=t=>Ya(e,t),e.readonly=()=>Za(e),e.describe=t=>{let n=e.clone();return z.add(n,{description:t}),n},Object.defineProperty(e,`description`,{get(){return z.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return z.get(e);let n=e.clone();return z.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=t=>t(e),e)),Vi=m(`_ZodString`,(e,t)=>{Ft.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$r(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(Nr(...t)),e.includes=(...t)=>e.check(Ir(...t)),e.startsWith=(...t)=>e.check(Lr(...t)),e.endsWith=(...t)=>e.check(Rr(...t)),e.min=(...t)=>e.check(B(...t)),e.max=(...t)=>e.check(jr(...t)),e.length=(...t)=>e.check(Mr(...t)),e.nonempty=(...t)=>e.check(B(1,...t)),e.lowercase=t=>e.check(Pr(t)),e.uppercase=t=>e.check(Fr(t)),e.trim=()=>e.check(Br()),e.normalize=(...t)=>e.check(zr(...t)),e.toLowerCase=()=>e.check(Vr()),e.toUpperCase=()=>e.check(Hr()),e.slugify=()=>e.check(Ur())}),Hi=m(`ZodString`,(e,t)=>{Ft.init(e,t),Vi.init(e,t),e.email=t=>e.check(Yn(Ui,t)),e.url=t=>e.check(tr(Ki,t)),e.jwt=t=>e.check(gr(sa,t)),e.emoji=t=>e.check(nr(qi,t)),e.guid=t=>e.check(Xn(Wi,t)),e.uuid=t=>e.check(Zn(Gi,t)),e.uuidv4=t=>e.check(Qn(Gi,t)),e.uuidv6=t=>e.check($n(Gi,t)),e.uuidv7=t=>e.check(er(Gi,t)),e.nanoid=t=>e.check(rr(Ji,t)),e.guid=t=>e.check(Xn(Wi,t)),e.cuid=t=>e.check(ir(Yi,t)),e.cuid2=t=>e.check(ar(Xi,t)),e.ulid=t=>e.check(or(Zi,t)),e.base64=t=>e.check(pr(ia,t)),e.base64url=t=>e.check(mr(aa,t)),e.xid=t=>e.check(sr(Qi,t)),e.ksuid=t=>e.check(cr($i,t)),e.ipv4=t=>e.check(lr(ea,t)),e.ipv6=t=>e.check(ur(ta,t)),e.cidrv4=t=>e.check(dr(na,t)),e.cidrv6=t=>e.check(fr(ra,t)),e.e164=t=>e.check(hr(oa,t)),e.datetime=t=>e.check(xi(t)),e.date=t=>e.check(Ci(t)),e.time=t=>e.check(Ti(t)),e.duration=t=>e.check(Di(t))});function q(e){return Jn(Hi,e)}var J=m(`ZodStringFormat`,(e,t)=>{I.init(e,t),Vi.init(e,t)}),Ui=m(`ZodEmail`,(e,t)=>{Rt.init(e,t),J.init(e,t)}),Wi=m(`ZodGUID`,(e,t)=>{It.init(e,t),J.init(e,t)}),Gi=m(`ZodUUID`,(e,t)=>{Lt.init(e,t),J.init(e,t)}),Ki=m(`ZodURL`,(e,t)=>{zt.init(e,t),J.init(e,t)}),qi=m(`ZodEmoji`,(e,t)=>{Bt.init(e,t),J.init(e,t)}),Ji=m(`ZodNanoID`,(e,t)=>{Vt.init(e,t),J.init(e,t)}),Yi=m(`ZodCUID`,(e,t)=>{Ht.init(e,t),J.init(e,t)}),Xi=m(`ZodCUID2`,(e,t)=>{Ut.init(e,t),J.init(e,t)}),Zi=m(`ZodULID`,(e,t)=>{Wt.init(e,t),J.init(e,t)}),Qi=m(`ZodXID`,(e,t)=>{Gt.init(e,t),J.init(e,t)}),$i=m(`ZodKSUID`,(e,t)=>{Kt.init(e,t),J.init(e,t)}),ea=m(`ZodIPv4`,(e,t)=>{Zt.init(e,t),J.init(e,t)}),ta=m(`ZodIPv6`,(e,t)=>{Qt.init(e,t),J.init(e,t)}),na=m(`ZodCIDRv4`,(e,t)=>{$t.init(e,t),J.init(e,t)}),ra=m(`ZodCIDRv6`,(e,t)=>{en.init(e,t),J.init(e,t)}),ia=m(`ZodBase64`,(e,t)=>{nn.init(e,t),J.init(e,t)}),aa=m(`ZodBase64URL`,(e,t)=>{an.init(e,t),J.init(e,t)}),oa=m(`ZodE164`,(e,t)=>{on.init(e,t),J.init(e,t)}),sa=m(`ZodJWT`,(e,t)=>{cn.init(e,t),J.init(e,t)}),ca=m(`ZodNumber`,(e,t)=>{ln.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ei(e,t,n,r),e.gt=(t,n)=>e.check(Or(t,n)),e.gte=(t,n)=>e.check(kr(t,n)),e.min=(t,n)=>e.check(kr(t,n)),e.lt=(t,n)=>e.check(Er(t,n)),e.lte=(t,n)=>e.check(Dr(t,n)),e.max=(t,n)=>e.check(Dr(t,n)),e.int=t=>e.check(da(t)),e.safe=t=>e.check(da(t)),e.positive=t=>e.check(Or(0,t)),e.nonnegative=t=>e.check(kr(0,t)),e.negative=t=>e.check(Er(0,t)),e.nonpositive=t=>e.check(Dr(0,t)),e.multipleOf=(t,n)=>e.check(Ar(t,n)),e.step=(t,n)=>e.check(Ar(t,n)),e.finite=()=>e;let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function la(e){return xr(ca,e)}var ua=m(`ZodNumberFormat`,(e,t)=>{un.init(e,t),ca.init(e,t)});function da(e){return Sr(ua,e)}var fa=m(`ZodBoolean`,(e,t)=>{dn.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ti(e,t,n,r)});function pa(e){return Cr(fa,e)}var ma=m(`ZodUnknown`,(e,t)=>{fn.init(e,t),K.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function ha(){return wr(ma)}var ga=m(`ZodNever`,(e,t)=>{pn.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ni(e,t,n,r)});function _a(e){return Tr(ga,e)}var va=m(`ZodArray`,(e,t)=>{hn.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>si(e,t,n,r),e.element=t.element,e.min=(t,n)=>e.check(B(t,n)),e.nonempty=t=>e.check(B(1,t)),e.max=(t,n)=>e.check(jr(t,n)),e.length=(t,n)=>e.check(Mr(t,n)),e.unwrap=()=>e.element});function ya(e,t){return Wr(va,e,t)}var ba=m(`ZodObject`,(e,t)=>{yn.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ci(e,t,n,r),v(e,`shape`,()=>t.shape),e.keyof=()=>Z(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:ha()}),e.loose=()=>e.clone({...e._zod.def,catchall:ha()}),e.strict=()=>e.clone({...e._zod.def,catchall:_a()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>ye(e,t),e.safeExtend=t=>be(e,t),e.merge=t=>xe(e,t),e.pick=t=>_e(e,t),e.omit=t=>ve(e,t),e.partial=(...t)=>Se(Pa,e,t[0]),e.required=(...t)=>Ce(Wa,e,t[0])});function Y(e,t){return new ba({type:`object`,shape:e??{},...T(t)})}var xa=m(`ZodUnion`,(e,t)=>{xn.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>li(e,t,n,r),e.options=t.options});function X(e,t){return new xa({type:`union`,options:e,...T(t)})}var Sa=m(`ZodDiscriminatedUnion`,(e,t)=>{xa.init(e,t),Sn.init(e,t)});function Ca(e,t,n){return new Sa({type:`union`,options:t,discriminator:e,...T(n)})}var wa=m(`ZodIntersection`,(e,t)=>{Cn.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ui(e,t,n,r)});function Ta(e,t){return new wa({type:`intersection`,left:e,right:t})}var Ea=m(`ZodRecord`,(e,t)=>{En.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>di(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function Da(e,t,n){return new Ea({type:`record`,keyType:e,valueType:t,...T(n)})}function Oa(e,t,n){let r=w(e);return r._zod.values=void 0,new Ea({type:`record`,keyType:r,valueType:t,...T(n)})}var ka=m(`ZodEnum`,(e,t)=>{Dn.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ri(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new ka({...t,checks:[],...T(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new ka({...t,checks:[],...T(r),entries:i})}});function Z(e,t){return new ka({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...T(t)})}var Aa=m(`ZodLiteral`,(e,t)=>{On.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ii(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,`value`,{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function ja(e,t){return new Aa({type:`literal`,values:Array.isArray(e)?e:[e],...T(t)})}var Ma=m(`ZodTransform`,(e,t)=>{kn.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>oi(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new te(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(A(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(A(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function Na(e){return new Ma({type:`transform`,transform:e})}var Pa=m(`ZodOptional`,(e,t)=>{jn.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Fa(e){return new Pa({type:`optional`,innerType:e})}var Ia=m(`ZodExactOptional`,(e,t)=>{Mn.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function La(e){return new Ia({type:`optional`,innerType:e})}var Ra=m(`ZodNullable`,(e,t)=>{Nn.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function za(e){return new Ra({type:`nullable`,innerType:e})}var Ba=m(`ZodDefault`,(e,t)=>{Pn.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>mi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Va(e,t){return new Ba({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():pe(t)}})}var Ha=m(`ZodPrefault`,(e,t)=>{In.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ua(e,t){return new Ha({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():pe(t)}})}var Wa=m(`ZodNonOptional`,(e,t)=>{Ln.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>pi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ga(e,t){return new Wa({type:`nonoptional`,innerType:e,...T(t)})}var Ka=m(`ZodCatch`,(e,t)=>{zn.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function qa(e,t){return new Ka({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var Ja=m(`ZodPipe`,(e,t)=>{Bn.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_i(e,t,n,r),e.in=t.in,e.out=t.out});function Ya(e,t){return new Ja({type:`pipe`,in:e,out:t})}var Xa=m(`ZodReadonly`,(e,t)=>{Vn.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Za(e){return new Xa({type:`readonly`,innerType:e})}var Qa=m(`ZodCustom`,(e,t)=>{Un.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ai(e,t,n,r)});function $a(e,t={}){return Gr(Qa,e,t)}function eo(e){return Kr(e)}var Q=Y({minRem:la(),maxRem:la()}).or(q()),$=Y({0:q().optional(),50:q(),100:q(),200:q(),300:q(),400:q(),500:q(),600:q(),700:q(),800:q(),900:q(),950:q(),1e3:q().optional()}),to=Y({color:q().optional(),background:q().optional(),borderWidth:q().optional(),borderColor:q().optional(),boxShadow:q().optional()}),no=Ta(Y({borderRadius:Q.optional(),custom:Da(q(),X([q(),la()])).optional(),hover:to.optional(),focus:to.optional()}),to),ro=Y({family:q().optional()}),io=Oa(Z(`predefinedQuestion.edit.newConversation.voteUp.voteDown.retry.message.messageLoading.thread.submit.abort.expand.help.attach.record.reward.share.audio.copy.dismiss.menu.info.menuClose.chevronDown.chevronUp.chevronTopDown.chevronDownSmall.internalLink.externalLink.liip.avatar.avatarLarge.openChat.speechInput.listUnordered.lightMode.darkMode.avatarLarge.settings.settingsClose.sources.model.checkbox.warning.headerLogo.embedAvatar`.split(`.`)),q()),ao=Y({font:ro.optional(),colors:Y({brand:$,accent:$.optional(),highlight:$,grey:$}),base:Y({fontSizeXs:Q.optional(),fontSizeSm:Q.optional(),fontSizeBody:Q.optional(),fontSizeH3:Q.optional(),fontSizeH2:Q.optional(),fontSizeH1:Q.optional(),fontWeightNormal:q().optional(),fontWeightBold:q().optional(),fontWeightTitle:q().optional(),lineHeightDefault:q().optional(),lineHeightSnug:q().optional(),lineHeightTight:q().optional(),borderRadius:Q.optional(),lineColor:q().optional(),boxShadow:q().optional()}),components:Da(q(),no),svgs:io}),oo=Y({customCSS:q().optional(),fontCSS:q().optional(),fontURLs:q().array().optional(),tokens:ao});Y({light:oo,dark:oo});var so=Y({font:ro.optional(),colors:Y({brand:$.partial().optional(),accent:$.partial().optional(),highlight:$.partial().optional(),grey:$.partial().optional()}).optional(),base:Y({fontSizeXs:Q.optional(),fontSizeSm:Q.optional(),fontSizeBody:Q.optional(),fontSizeH3:Q.optional(),fontSizeH2:Q.optional(),fontSizeH1:Q.optional(),fontWeightNormal:q().optional(),fontWeightBold:q().optional(),fontWeightTitle:q().optional(),lineHeightDefault:q().optional(),lineHeightSnug:q().optional(),lineHeightTight:q().optional(),borderRadius:Q.optional(),lineColor:q().optional(),boxShadow:q().optional()}).optional(),components:Da(q(),no).optional(),svgs:io.optional()}),co=Y({customCSS:q().optional(),fontCSS:q().optional(),fontURLs:q().array().optional(),tokens:so.optional()}),lo=Y({light:co.optional(),dark:co.optional()}),uo=Y({50:q(),100:q(),200:q(),300:q(),400:q(),500:q(),600:q(),700:q(),800:q(),900:q(),950:q()}),fo=Z([`slate`,`gray`,`zinc`,`neutral`,`stone`,`red`,`orange`,`amber`,`yellow`,`lime`,`green`,`emerald`,`teal`,`cyan`,`sky`,`blue`,`indigo`,`violet`,`purple`,`fuchsia`,`pink`,`rose`]),po=X([uo,fo]),mo=X([Ta(uo,Y({0:q(),1e3:q()})),fo]),ho=Y({avatarImageUrl:q().optional(),colors:Y({brand:po.optional(),highlight:po.optional(),grey:mo.optional(),background:q().optional(),text:q().optional(),anchor:Y({default:q().optional(),hover:q().optional()}).optional()}).optional(),font:Y({family:q().optional(),urls:ya(q()).optional(),sizeXs:Q.optional(),sizeSm:Q.optional(),sizeBody:Q.optional(),sizeH3:Q.optional(),sizeH2:Q.optional(),sizeH1:Q.optional(),weightNormal:q().optional(),weightBold:q().optional(),weightTitle:q().optional()}).optional(),borderRadius:Q.optional(),fineGrained:lo.optional()}),go=e=>e.split(`/`).pop().split(`.`)[0],_o=Object.assign({"./default/fallback-dev.theme.ts":d,"./default/fallback.theme.ts":c}),vo=new Map;Object.entries(_o).forEach(([e,t])=>{let{error:n,data:r}=ho.safeParse(t?.theme);if(n){console.error(`Invalid theme in ${e}:`,n);return}vo.set(go(e),r)}),Array.from(vo.keys());export{r as _,pa as a,ja as c,Oa as d,Da as f,s as g,u as h,ya as i,la as l,X as m,ho as n,Ca as o,q as p,Z as r,Ta as s,go as t,Y as u};