@liip/liipgpt 2.3.2 → 2.3.3

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 (36) hide show
  1. package/button/liipgpt-button.iife.js +7 -7
  2. package/chat/liipgpt-chat.iife.js +57 -56
  3. package/config/index.cjs +3 -0
  4. package/config/index.d.ts +52 -36
  5. package/config/index.js +3 -0
  6. package/configurator/_app/env.js +1 -1
  7. package/configurator/_app/immutable/chunks/{Csbbg4CW.js → BHYdGlfZ.js} +4 -4
  8. package/configurator/_app/immutable/chunks/BRINjubN.js +210 -0
  9. package/configurator/_app/immutable/chunks/{DvEdoyY3.js → Bu5Euvdy.js} +1 -1
  10. package/configurator/_app/immutable/chunks/{Cgm2UlUC.js → Buwjqn5O.js} +1 -1
  11. package/configurator/_app/immutable/chunks/{DtohRk_g.js → CMhjWVcv.js} +1 -1
  12. package/configurator/_app/immutable/chunks/{OV-DGiJY.js → ChzxYFTX.js} +1 -1
  13. package/configurator/_app/immutable/chunks/{TMezqz9A.js → DC-s52-u.js} +1 -1
  14. package/configurator/_app/immutable/chunks/{CTFYLkQW.js → DoMONjgj.js} +1 -1
  15. package/configurator/_app/immutable/chunks/I-jbfJxN.js +1 -0
  16. package/configurator/_app/immutable/chunks/{CfQtRUjK.js → M-YrVFI7.js} +1 -1
  17. package/configurator/_app/immutable/chunks/{DqV_Mezq.js → YALcB7vb.js} +1 -1
  18. package/configurator/_app/immutable/chunks/{CjJFpaR8.js → pgYKILma.js} +1 -1
  19. package/configurator/_app/immutable/chunks/vuCcyO86.js +1 -0
  20. package/configurator/_app/immutable/entry/{app.B0uv2h2Q.js → app.Y1bd1xIC.js} +2 -2
  21. package/configurator/_app/immutable/entry/start.D8fYJWo_.js +1 -0
  22. package/configurator/_app/immutable/nodes/{0.CmMpPZZe.js → 0.CxkD4i3a.js} +1 -1
  23. package/configurator/_app/immutable/nodes/{1.DC-kVwk3.js → 1.BaXCqRdz.js} +1 -1
  24. package/configurator/_app/immutable/nodes/{2.CiX_eT4G.js → 2.Ca9GV8Pp.js} +9 -9
  25. package/configurator/_app/immutable/nodes/{3.DWgyEs0O.js → 3.CXPj1r62.js} +12 -12
  26. package/configurator/_app/version.json +1 -1
  27. package/configurator/index.html +10 -10
  28. package/configurator/sidebar.html +10 -10
  29. package/index.cjs +3 -0
  30. package/index.d.ts +90 -60
  31. package/index.js +3 -0
  32. package/package.json +1 -1
  33. package/configurator/_app/immutable/chunks/C7QZHHMl.js +0 -209
  34. package/configurator/_app/immutable/chunks/Ei4Uj62Z.js +0 -1
  35. package/configurator/_app/immutable/chunks/VNURAuZw.js +0 -1
  36. package/configurator/_app/immutable/entry/start.8REy4jr4.js +0 -1
@@ -1,4 +1,4 @@
1
- const Wt="https://liipgpt.api.dev.genai.liip.ch/liipgpt",Ft="2.3.2";function Xe(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var se,we;function Qe(){if(we)return se;we=1;var r=function(k){return e(k)&&!t(k)};function e(v){return!!v&&typeof v=="object"}function t(v){var k=Object.prototype.toString.call(v);return k==="[object RegExp]"||k==="[object Date]"||o(v)}var a=typeof Symbol=="function"&&Symbol.for,n=a?Symbol.for("react.element"):60103;function o(v){return v.$$typeof===n}function s(v){return Array.isArray(v)?[]:{}}function i(v,k){return k.clone!==!1&&k.isMergeableObject(v)?L(s(v),v,k):v}function f(v,k,w){return v.concat(k).map(function(A){return i(A,w)})}function p(v,k){if(!k.customMerge)return L;var w=k.customMerge(v);return typeof w=="function"?w:L}function _(v){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(v).filter(function(k){return Object.propertyIsEnumerable.call(v,k)}):[]}function E(v){return Object.keys(v).concat(_(v))}function J(v,k){try{return k in v}catch{return!1}}function Ge(v,k){return J(v,k)&&!(Object.hasOwnProperty.call(v,k)&&Object.propertyIsEnumerable.call(v,k))}function qe(v,k,w){var A={};return w.isMergeableObject(v)&&E(v).forEach(function(j){A[j]=i(v[j],w)}),E(k).forEach(function(j){Ge(v,j)||(J(v,j)&&w.isMergeableObject(k[j])?A[j]=p(j,w)(v[j],k[j],w):A[j]=i(k[j],w))}),A}function L(v,k,w){w=w||{},w.arrayMerge=w.arrayMerge||f,w.isMergeableObject=w.isMergeableObject||r,w.cloneUnlessOtherwiseSpecified=i;var A=Array.isArray(k),j=Array.isArray(v),Je=A===j;return Je?A?w.arrayMerge(v,k,w):qe(v,k,w):i(k,w)}L.all=function(k,w){if(!Array.isArray(k))throw new Error("first argument should be an array");return k.reduce(function(A,j){return L(A,j,w)},{})};var Ye=L;return se=Ye,se}var Ke=Qe();const et=Xe(Ke),tt=r=>r===null||typeof r!="object",ce=r=>{if(tt(r))return r;if(Array.isArray(r))return r.map(ce);const e=Object.entries(r).filter(([t,a])=>a!==void 0).map(([t,a])=>[t,ce(a)]);return Object.fromEntries(e)},rt=(r,e)=>{const t=ce(e);return et(r,t)},De={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)"}},container:{custom:{maxWidth:"1024px"}},avatar:{color:"var(--color-brand-400)",background:"var(--color-grey-100)"},anchor:{color:"var(--color-brand-600)",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:"inherit",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)"}},label:{color:"var(--color-grey-600)"},hr:{color:"var(--base-line-color)"},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)"}},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:"#dd1313",color:"var(--color-grey-0)",borderColor:"#dd1313",borderWidth:"1px",borderRadius:"calc(var(--base-border-radius) / 2)"},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:768,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)"}},referencesToggle:{color:"var(--anchor-color)",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(--anchor-color)",hover:{color:"var(--anchor-hover-color)"},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)"}},svgs:{predefinedQuestion:`
1
+ const Wt="https://liipgpt.api.dev.genai.liip.ch/liipgpt",Ft="2.3.3";function Xe(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var se,we;function Qe(){if(we)return se;we=1;var r=function(k){return e(k)&&!t(k)};function e(v){return!!v&&typeof v=="object"}function t(v){var k=Object.prototype.toString.call(v);return k==="[object RegExp]"||k==="[object Date]"||o(v)}var a=typeof Symbol=="function"&&Symbol.for,n=a?Symbol.for("react.element"):60103;function o(v){return v.$$typeof===n}function s(v){return Array.isArray(v)?[]:{}}function i(v,k){return k.clone!==!1&&k.isMergeableObject(v)?L(s(v),v,k):v}function f(v,k,w){return v.concat(k).map(function(A){return i(A,w)})}function p(v,k){if(!k.customMerge)return L;var w=k.customMerge(v);return typeof w=="function"?w:L}function _(v){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(v).filter(function(k){return Object.propertyIsEnumerable.call(v,k)}):[]}function E(v){return Object.keys(v).concat(_(v))}function J(v,k){try{return k in v}catch{return!1}}function Ge(v,k){return J(v,k)&&!(Object.hasOwnProperty.call(v,k)&&Object.propertyIsEnumerable.call(v,k))}function qe(v,k,w){var A={};return w.isMergeableObject(v)&&E(v).forEach(function(j){A[j]=i(v[j],w)}),E(k).forEach(function(j){Ge(v,j)||(J(v,j)&&w.isMergeableObject(k[j])?A[j]=p(j,w)(v[j],k[j],w):A[j]=i(k[j],w))}),A}function L(v,k,w){w=w||{},w.arrayMerge=w.arrayMerge||f,w.isMergeableObject=w.isMergeableObject||r,w.cloneUnlessOtherwiseSpecified=i;var A=Array.isArray(k),j=Array.isArray(v),Je=A===j;return Je?A?w.arrayMerge(v,k,w):qe(v,k,w):i(k,w)}L.all=function(k,w){if(!Array.isArray(k))throw new Error("first argument should be an array");return k.reduce(function(A,j){return L(A,j,w)},{})};var Ye=L;return se=Ye,se}var Ke=Qe();const et=Xe(Ke),tt=r=>r===null||typeof r!="object",ce=r=>{if(tt(r))return r;if(Array.isArray(r))return r.map(ce);const e=Object.entries(r).filter(([t,a])=>a!==void 0).map(([t,a])=>[t,ce(a)]);return Object.fromEntries(e)},rt=(r,e)=>{const t=ce(e);return et(r,t)},De={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)"}},container:{custom:{maxWidth:"1024px"}},avatar:{color:"var(--color-brand-400)",background:"var(--color-grey-100)"},anchor:{color:"var(--color-brand-600)",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:"inherit",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)"}},label:{color:"var(--color-grey-600)"},hr:{color:"var(--base-line-color)"},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)"}},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:"#dd1313",color:"var(--color-grey-0)",borderColor:"#dd1313",borderWidth:"1px",borderRadius:"calc(var(--base-border-radius) / 2)"},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:768,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)"}},referencesToggle:{color:"var(--anchor-color)",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(--anchor-color)",hover:{color:"var(--anchor-hover-color)"},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)"}},svgs:{predefinedQuestion:`
2
2
  <svg viewBox="0 0 24 24" >
3
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
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>
@@ -15,8 +15,8 @@ const Wt="https://liipgpt.api.dev.genai.liip.ch/liipgpt",Ft="2.3.2";function Xe(
15
15
  <circle cx="18" cy="23" r="1.75" fill="currentColor">
16
16
  <animate attributeName="opacity" dur="1s" values="0.2;0.8;0.2" repeatCount="indefinite" begin="0.6s"/>
17
17
  </circle>
18
- </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" xmlns="http://www.w3.org/2000/svg" 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>',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:`
19
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 100 100" width="100" height="100" shape-rendering="geometricPrecision" text-rendering="geometricPrecision">
18
+ </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>',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:`
19
+ <svg viewBox="0 0 100 100" width="100" height="100" shape-rendering="geometricPrecision" text-rendering="geometricPrecision">
20
20
  <style>
21
21
  .svg--avatar {
22
22
  --logo-color1: var(--color-brand-500);
@@ -225,4 +225,4 @@ const Wt="https://liipgpt.api.dev.genai.liip.ch/liipgpt",Ft="2.3.2";function Xe(
225
225
  <svg viewBox="0 0 24 24" fill="none">
226
226
  <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"/>
227
227
  </svg>
228
- `}}},at=rt(De,{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)"},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)"}}}}),oe={fineGrained:{light:De,dark:at}},nt=Object.freeze(Object.defineProperty({__proto__:null,theme:oe},Symbol.toStringTag,{value:"Module"})),ye=structuredClone(oe.fineGrained.light);ye.tokens.colors={brand:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",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"}};const Le=structuredClone(oe.fineGrained.dark);Le.tokens.colors=ye.tokens.colors;const ot={fineGrained:{light:ye,dark:Le}},st=Object.freeze(Object.defineProperty({__proto__:null,theme:ot},Symbol.toStringTag,{value:"Module"}));var x;(function(r){r.assertEqual=n=>{};function e(n){}r.assertIs=e;function t(n){throw new Error}r.assertNever=t,r.arrayToEnum=n=>{const o={};for(const s of n)o[s]=s;return o},r.getValidEnumValues=n=>{const o=r.objectKeys(n).filter(i=>typeof n[n[i]]!="number"),s={};for(const i of o)s[i]=n[i];return r.objectValues(s)},r.objectValues=n=>r.objectKeys(n).map(function(o){return n[o]}),r.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{const o=[];for(const s in n)Object.prototype.hasOwnProperty.call(n,s)&&o.push(s);return o},r.find=(n,o)=>{for(const s of n)if(o(s))return s},r.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function a(n,o=" | "){return n.map(s=>typeof s=="string"?`'${s}'`:s).join(o)}r.joinValues=a,r.jsonStringifyReplacer=(n,o)=>typeof o=="bigint"?o.toString():o})(x||(x={}));var Ce;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(Ce||(Ce={}));const l=x.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),B=r=>{switch(typeof r){case"undefined":return l.undefined;case"string":return l.string;case"number":return Number.isNaN(r)?l.nan:l.number;case"boolean":return l.boolean;case"function":return l.function;case"bigint":return l.bigint;case"symbol":return l.symbol;case"object":return Array.isArray(r)?l.array:r===null?l.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?l.promise:typeof Map<"u"&&r instanceof Map?l.map:typeof Set<"u"&&r instanceof Set?l.set:typeof Date<"u"&&r instanceof Date?l.date:l.object;default:return l.unknown}},d=x.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class I extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=a=>{this.issues=[...this.issues,a]},this.addIssues=(a=[])=>{this.issues=[...this.issues,...a]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(o){return o.message},a={_errors:[]},n=o=>{for(const s of o.issues)if(s.code==="invalid_union")s.unionErrors.map(n);else if(s.code==="invalid_return_type")n(s.returnTypeError);else if(s.code==="invalid_arguments")n(s.argumentsError);else if(s.path.length===0)a._errors.push(t(s));else{let i=a,f=0;for(;f<s.path.length;){const p=s.path[f];f===s.path.length-1?(i[p]=i[p]||{_errors:[]},i[p]._errors.push(t(s))):i[p]=i[p]||{_errors:[]},i=i[p],f++}}};return n(this),a}static assert(e){if(!(e instanceof I))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,x.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){const t={},a=[];for(const n of this.issues)if(n.path.length>0){const o=n.path[0];t[o]=t[o]||[],t[o].push(e(n))}else a.push(e(n));return{formErrors:a,fieldErrors:t}}get formErrors(){return this.flatten()}}I.create=r=>new I(r);const le=(r,e)=>{let t;switch(r.code){case d.invalid_type:r.received===l.undefined?t="Required":t=`Expected ${r.expected}, received ${r.received}`;break;case d.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(r.expected,x.jsonStringifyReplacer)}`;break;case d.unrecognized_keys:t=`Unrecognized key(s) in object: ${x.joinValues(r.keys,", ")}`;break;case d.invalid_union:t="Invalid input";break;case d.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${x.joinValues(r.options)}`;break;case d.invalid_enum_value:t=`Invalid enum value. Expected ${x.joinValues(r.options)}, received '${r.received}'`;break;case d.invalid_arguments:t="Invalid function arguments";break;case d.invalid_return_type:t="Invalid function return type";break;case d.invalid_date:t="Invalid date";break;case d.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(t=`Invalid input: must include "${r.validation.includes}"`,typeof r.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${r.validation.position}`)):"startsWith"in r.validation?t=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?t=`Invalid input: must end with "${r.validation.endsWith}"`:x.assertNever(r.validation):r.validation!=="regex"?t=`Invalid ${r.validation}`:t="Invalid";break;case d.too_small:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="bigint"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(r.minimum))}`:t="Invalid input";break;case d.too_big:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="bigint"?t=`BigInt must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(r.maximum))}`:t="Invalid input";break;case d.custom:t="Invalid input";break;case d.invalid_intersection_types:t="Intersection results could not be merged";break;case d.not_multiple_of:t=`Number must be a multiple of ${r.multipleOf}`;break;case d.not_finite:t="Number must be finite";break;default:t=e.defaultError,x.assertNever(r)}return{message:t}};let it=le;function dt(){return it}const ct=r=>{const{data:e,path:t,errorMaps:a,issueData:n}=r,o=[...t,...n.path||[]],s={...n,path:o};if(n.message!==void 0)return{...n,path:o,message:n.message};let i="";const f=a.filter(p=>!!p).slice().reverse();for(const p of f)i=p(s,{data:e,defaultError:i}).message;return{...n,path:o,message:i}};function c(r,e){const t=dt(),a=ct({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t,t===le?void 0:le].filter(n=>!!n)});r.common.issues.push(a)}class O{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const a=[];for(const n of t){if(n.status==="aborted")return g;n.status==="dirty"&&e.dirty(),a.push(n.value)}return{status:e.value,value:a}}static async mergeObjectAsync(e,t){const a=[];for(const n of t){const o=await n.key,s=await n.value;a.push({key:o,value:s})}return O.mergeObjectSync(e,a)}static mergeObjectSync(e,t){const a={};for(const n of t){const{key:o,value:s}=n;if(o.status==="aborted"||s.status==="aborted")return g;o.status==="dirty"&&e.dirty(),s.status==="dirty"&&e.dirty(),o.value!=="__proto__"&&(typeof s.value<"u"||n.alwaysSet)&&(a[o.value]=s.value)}return{status:e.value,value:a}}}const g=Object.freeze({status:"aborted"}),G=r=>({status:"dirty",value:r}),R=r=>({status:"valid",value:r}),Se=r=>r.status==="aborted",je=r=>r.status==="dirty",V=r=>r.status==="valid",Q=r=>typeof Promise<"u"&&r instanceof Promise;var u;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e?.message})(u||(u={}));class N{constructor(e,t,a,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=a,this._key=n}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Te=(r,e)=>{if(V(e))return{success:!0,data:e.value};if(!r.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new I(r.common.issues);return this._error=t,this._error}}};function y(r){if(!r)return{};const{errorMap:e,invalid_type_error:t,required_error:a,description:n}=r;if(e&&(t||a))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(s,i)=>{const{message:f}=r;return s.code==="invalid_enum_value"?{message:f??i.defaultError}:typeof i.data>"u"?{message:f??a??i.defaultError}:s.code!=="invalid_type"?{message:i.defaultError}:{message:f??t??i.defaultError}},description:n}}class b{get description(){return this._def.description}_getType(e){return B(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:B(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new O,ctx:{common:e.parent.common,data:e.data,parsedType:B(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(Q(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const a=this.safeParse(e,t);if(a.success)return a.data;throw a.error}safeParse(e,t){const a={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:B(e)},n=this._parseSync({data:e,path:a.path,parent:a});return Te(a,n)}"~validate"(e){const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:B(e)};if(!this["~standard"].async)try{const a=this._parseSync({data:e,path:[],parent:t});return V(a)?{value:a.value}:{issues:t.common.issues}}catch(a){a?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(a=>V(a)?{value:a.value}:{issues:t.common.issues})}async parseAsync(e,t){const a=await this.safeParseAsync(e,t);if(a.success)return a.data;throw a.error}async safeParseAsync(e,t){const a={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:B(e)},n=this._parse({data:e,path:a.path,parent:a}),o=await(Q(n)?n:Promise.resolve(n));return Te(a,o)}refine(e,t){const a=n=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(n):t;return this._refinement((n,o)=>{const s=e(n),i=()=>o.addIssue({code:d.custom,...a(n)});return typeof Promise<"u"&&s instanceof Promise?s.then(f=>f?!0:(i(),!1)):s?!0:(i(),!1)})}refinement(e,t){return this._refinement((a,n)=>e(a)?!0:(n.addIssue(typeof t=="function"?t(a,n):t),!1))}_refinement(e){return new F({schema:this,typeName:m.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:t=>this["~validate"](t)}}optional(){return z.create(this,this._def)}nullable(){return H.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return M.create(this)}promise(){return ae.create(this,this._def)}or(e){return ee.create([this,e],this._def)}and(e){return te.create(this,e,this._def)}transform(e){return new F({...y(this._def),schema:this,typeName:m.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new pe({...y(this._def),innerType:this,defaultValue:t,typeName:m.ZodDefault})}brand(){return new Nt({typeName:m.ZodBranded,type:this,...y(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new me({...y(this._def),innerType:this,catchValue:t,typeName:m.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return ke.create(this,e)}readonly(){return ge.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const lt=/^c[^\s-]{8,}$/i,ut=/^[0-9a-z]+$/,ht=/^[0-9A-HJKMNP-TV-Z]{26}$/i,ft=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,pt=/^[a-z0-9_-]{21}$/i,mt=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,gt=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,vt=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,yt="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let ie;const kt=/^(?:(?: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])$/,bt=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,_t=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,xt=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,wt=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Ct=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Pe="((\\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])))",St=new RegExp(`^${Pe}$`);function Ve(r){let e="[0-5]\\d";r.precision?e=`${e}\\.\\d{${r.precision}}`:r.precision==null&&(e=`${e}(\\.\\d+)?`);const t=r.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function jt(r){return new RegExp(`^${Ve(r)}$`)}function Tt(r){let e=`${Pe}T${Ve(r)}`;const t=[];return t.push(r.local?"Z?":"Z"),r.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function Ot(r,e){return!!((e==="v4"||!e)&&kt.test(r)||(e==="v6"||!e)&&_t.test(r))}function Rt(r,e){if(!mt.test(r))return!1;try{const[t]=r.split(".");if(!t)return!1;const a=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),n=JSON.parse(atob(a));return!(typeof n!="object"||n===null||"typ"in n&&n?.typ!=="JWT"||!n.alg||e&&n.alg!==e)}catch{return!1}}function At(r,e){return!!((e==="v4"||!e)&&bt.test(r)||(e==="v6"||!e)&&xt.test(r))}class Z extends b{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==l.string){const o=this._getOrReturnCtx(e);return c(o,{code:d.invalid_type,expected:l.string,received:o.parsedType}),g}const a=new O;let n;for(const o of this._def.checks)if(o.kind==="min")e.data.length<o.value&&(n=this._getOrReturnCtx(e,n),c(n,{code:d.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),a.dirty());else if(o.kind==="max")e.data.length>o.value&&(n=this._getOrReturnCtx(e,n),c(n,{code:d.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),a.dirty());else if(o.kind==="length"){const s=e.data.length>o.value,i=e.data.length<o.value;(s||i)&&(n=this._getOrReturnCtx(e,n),s?c(n,{code:d.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):i&&c(n,{code:d.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),a.dirty())}else if(o.kind==="email")vt.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"email",code:d.invalid_string,message:o.message}),a.dirty());else if(o.kind==="emoji")ie||(ie=new RegExp(yt,"u")),ie.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"emoji",code:d.invalid_string,message:o.message}),a.dirty());else if(o.kind==="uuid")ft.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"uuid",code:d.invalid_string,message:o.message}),a.dirty());else if(o.kind==="nanoid")pt.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"nanoid",code:d.invalid_string,message:o.message}),a.dirty());else if(o.kind==="cuid")lt.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"cuid",code:d.invalid_string,message:o.message}),a.dirty());else if(o.kind==="cuid2")ut.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"cuid2",code:d.invalid_string,message:o.message}),a.dirty());else if(o.kind==="ulid")ht.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"ulid",code:d.invalid_string,message:o.message}),a.dirty());else if(o.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),c(n,{validation:"url",code:d.invalid_string,message:o.message}),a.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"regex",code:d.invalid_string,message:o.message}),a.dirty())):o.kind==="trim"?e.data=e.data.trim():o.kind==="includes"?e.data.includes(o.value,o.position)||(n=this._getOrReturnCtx(e,n),c(n,{code:d.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),a.dirty()):o.kind==="toLowerCase"?e.data=e.data.toLowerCase():o.kind==="toUpperCase"?e.data=e.data.toUpperCase():o.kind==="startsWith"?e.data.startsWith(o.value)||(n=this._getOrReturnCtx(e,n),c(n,{code:d.invalid_string,validation:{startsWith:o.value},message:o.message}),a.dirty()):o.kind==="endsWith"?e.data.endsWith(o.value)||(n=this._getOrReturnCtx(e,n),c(n,{code:d.invalid_string,validation:{endsWith:o.value},message:o.message}),a.dirty()):o.kind==="datetime"?Tt(o).test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{code:d.invalid_string,validation:"datetime",message:o.message}),a.dirty()):o.kind==="date"?St.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{code:d.invalid_string,validation:"date",message:o.message}),a.dirty()):o.kind==="time"?jt(o).test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{code:d.invalid_string,validation:"time",message:o.message}),a.dirty()):o.kind==="duration"?gt.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"duration",code:d.invalid_string,message:o.message}),a.dirty()):o.kind==="ip"?Ot(e.data,o.version)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"ip",code:d.invalid_string,message:o.message}),a.dirty()):o.kind==="jwt"?Rt(e.data,o.alg)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"jwt",code:d.invalid_string,message:o.message}),a.dirty()):o.kind==="cidr"?At(e.data,o.version)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"cidr",code:d.invalid_string,message:o.message}),a.dirty()):o.kind==="base64"?wt.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"base64",code:d.invalid_string,message:o.message}),a.dirty()):o.kind==="base64url"?Ct.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"base64url",code:d.invalid_string,message:o.message}),a.dirty()):x.assertNever(o);return{status:a.value,value:e.data}}_regex(e,t,a){return this.refinement(n=>e.test(n),{validation:t,code:d.invalid_string,...u.errToObj(a)})}_addCheck(e){return new Z({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...u.errToObj(e)})}url(e){return this._addCheck({kind:"url",...u.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...u.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...u.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...u.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...u.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...u.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...u.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...u.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...u.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...u.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...u.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...u.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...u.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...u.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...u.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...u.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...u.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...u.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...u.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...u.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...u.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...u.errToObj(t)})}nonempty(e){return this.min(1,u.errToObj(e))}trim(){return new Z({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Z({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Z({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}Z.create=r=>new Z({checks:[],typeName:m.ZodString,coerce:r?.coerce??!1,...y(r)});function Mt(r,e){const t=(r.toString().split(".")[1]||"").length,a=(e.toString().split(".")[1]||"").length,n=t>a?t:a,o=Number.parseInt(r.toFixed(n).replace(".","")),s=Number.parseInt(e.toFixed(n).replace(".",""));return o%s/10**n}class U extends b{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==l.number){const o=this._getOrReturnCtx(e);return c(o,{code:d.invalid_type,expected:l.number,received:o.parsedType}),g}let a;const n=new O;for(const o of this._def.checks)o.kind==="int"?x.isInteger(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{code:d.invalid_type,expected:"integer",received:"float",message:o.message}),n.dirty()):o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(a=this._getOrReturnCtx(e,a),c(a,{code:d.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),n.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(a=this._getOrReturnCtx(e,a),c(a,{code:d.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),n.dirty()):o.kind==="multipleOf"?Mt(e.data,o.value)!==0&&(a=this._getOrReturnCtx(e,a),c(a,{code:d.not_multiple_of,multipleOf:o.value,message:o.message}),n.dirty()):o.kind==="finite"?Number.isFinite(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{code:d.not_finite,message:o.message}),n.dirty()):x.assertNever(o);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,u.toString(t))}gt(e,t){return this.setLimit("min",e,!1,u.toString(t))}lte(e,t){return this.setLimit("max",e,!0,u.toString(t))}lt(e,t){return this.setLimit("max",e,!1,u.toString(t))}setLimit(e,t,a,n){return new U({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:u.toString(n)}]})}_addCheck(e){return new U({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:u.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:u.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:u.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:u.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:u.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:u.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:u.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:u.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:u.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&x.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const a of this._def.checks){if(a.kind==="finite"||a.kind==="int"||a.kind==="multipleOf")return!0;a.kind==="min"?(t===null||a.value>t)&&(t=a.value):a.kind==="max"&&(e===null||a.value<e)&&(e=a.value)}return Number.isFinite(t)&&Number.isFinite(e)}}U.create=r=>new U({checks:[],typeName:m.ZodNumber,coerce:r?.coerce||!1,...y(r)});class q extends b{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==l.bigint)return this._getInvalidInput(e);let a;const n=new O;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(a=this._getOrReturnCtx(e,a),c(a,{code:d.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),n.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(a=this._getOrReturnCtx(e,a),c(a,{code:d.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),n.dirty()):o.kind==="multipleOf"?e.data%o.value!==BigInt(0)&&(a=this._getOrReturnCtx(e,a),c(a,{code:d.not_multiple_of,multipleOf:o.value,message:o.message}),n.dirty()):x.assertNever(o);return{status:n.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return c(t,{code:d.invalid_type,expected:l.bigint,received:t.parsedType}),g}gte(e,t){return this.setLimit("min",e,!0,u.toString(t))}gt(e,t){return this.setLimit("min",e,!1,u.toString(t))}lte(e,t){return this.setLimit("max",e,!0,u.toString(t))}lt(e,t){return this.setLimit("max",e,!1,u.toString(t))}setLimit(e,t,a,n){return new q({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:u.toString(n)}]})}_addCheck(e){return new q({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:u.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:u.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:u.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:u.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:u.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}q.create=r=>new q({checks:[],typeName:m.ZodBigInt,coerce:r?.coerce??!1,...y(r)});class ue extends b{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==l.boolean){const a=this._getOrReturnCtx(e);return c(a,{code:d.invalid_type,expected:l.boolean,received:a.parsedType}),g}return R(e.data)}}ue.create=r=>new ue({typeName:m.ZodBoolean,coerce:r?.coerce||!1,...y(r)});class K extends b{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==l.date){const o=this._getOrReturnCtx(e);return c(o,{code:d.invalid_type,expected:l.date,received:o.parsedType}),g}if(Number.isNaN(e.data.getTime())){const o=this._getOrReturnCtx(e);return c(o,{code:d.invalid_date}),g}const a=new O;let n;for(const o of this._def.checks)o.kind==="min"?e.data.getTime()<o.value&&(n=this._getOrReturnCtx(e,n),c(n,{code:d.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),a.dirty()):o.kind==="max"?e.data.getTime()>o.value&&(n=this._getOrReturnCtx(e,n),c(n,{code:d.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),a.dirty()):x.assertNever(o);return{status:a.value,value:new Date(e.data.getTime())}}_addCheck(e){return new K({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:u.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:u.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}}K.create=r=>new K({checks:[],coerce:r?.coerce||!1,typeName:m.ZodDate,...y(r)});class Oe extends b{_parse(e){if(this._getType(e)!==l.symbol){const a=this._getOrReturnCtx(e);return c(a,{code:d.invalid_type,expected:l.symbol,received:a.parsedType}),g}return R(e.data)}}Oe.create=r=>new Oe({typeName:m.ZodSymbol,...y(r)});class Re extends b{_parse(e){if(this._getType(e)!==l.undefined){const a=this._getOrReturnCtx(e);return c(a,{code:d.invalid_type,expected:l.undefined,received:a.parsedType}),g}return R(e.data)}}Re.create=r=>new Re({typeName:m.ZodUndefined,...y(r)});class Ae extends b{_parse(e){if(this._getType(e)!==l.null){const a=this._getOrReturnCtx(e);return c(a,{code:d.invalid_type,expected:l.null,received:a.parsedType}),g}return R(e.data)}}Ae.create=r=>new Ae({typeName:m.ZodNull,...y(r)});class Me extends b{constructor(){super(...arguments),this._any=!0}_parse(e){return R(e.data)}}Me.create=r=>new Me({typeName:m.ZodAny,...y(r)});class Ne extends b{constructor(){super(...arguments),this._unknown=!0}_parse(e){return R(e.data)}}Ne.create=r=>new Ne({typeName:m.ZodUnknown,...y(r)});class $ extends b{_parse(e){const t=this._getOrReturnCtx(e);return c(t,{code:d.invalid_type,expected:l.never,received:t.parsedType}),g}}$.create=r=>new $({typeName:m.ZodNever,...y(r)});class Ze extends b{_parse(e){if(this._getType(e)!==l.undefined){const a=this._getOrReturnCtx(e);return c(a,{code:d.invalid_type,expected:l.void,received:a.parsedType}),g}return R(e.data)}}Ze.create=r=>new Ze({typeName:m.ZodVoid,...y(r)});class M extends b{_parse(e){const{ctx:t,status:a}=this._processInputParams(e),n=this._def;if(t.parsedType!==l.array)return c(t,{code:d.invalid_type,expected:l.array,received:t.parsedType}),g;if(n.exactLength!==null){const s=t.data.length>n.exactLength.value,i=t.data.length<n.exactLength.value;(s||i)&&(c(t,{code:s?d.too_big:d.too_small,minimum:i?n.exactLength.value:void 0,maximum:s?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),a.dirty())}if(n.minLength!==null&&t.data.length<n.minLength.value&&(c(t,{code:d.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),a.dirty()),n.maxLength!==null&&t.data.length>n.maxLength.value&&(c(t,{code:d.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),a.dirty()),t.common.async)return Promise.all([...t.data].map((s,i)=>n.type._parseAsync(new N(t,s,t.path,i)))).then(s=>O.mergeArray(a,s));const o=[...t.data].map((s,i)=>n.type._parseSync(new N(t,s,t.path,i)));return O.mergeArray(a,o)}get element(){return this._def.type}min(e,t){return new M({...this._def,minLength:{value:e,message:u.toString(t)}})}max(e,t){return new M({...this._def,maxLength:{value:e,message:u.toString(t)}})}length(e,t){return new M({...this._def,exactLength:{value:e,message:u.toString(t)}})}nonempty(e){return this.min(1,e)}}M.create=(r,e)=>new M({type:r,minLength:null,maxLength:null,exactLength:null,typeName:m.ZodArray,...y(e)});function P(r){if(r instanceof C){const e={};for(const t in r.shape){const a=r.shape[t];e[t]=z.create(P(a))}return new C({...r._def,shape:()=>e})}else return r instanceof M?new M({...r._def,type:P(r.element)}):r instanceof z?z.create(P(r.unwrap())):r instanceof H?H.create(P(r.unwrap())):r instanceof D?D.create(r.items.map(e=>P(e))):r}class C extends b{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=x.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==l.object){const p=this._getOrReturnCtx(e);return c(p,{code:d.invalid_type,expected:l.object,received:p.parsedType}),g}const{status:a,ctx:n}=this._processInputParams(e),{shape:o,keys:s}=this._getCached(),i=[];if(!(this._def.catchall instanceof $&&this._def.unknownKeys==="strip"))for(const p in n.data)s.includes(p)||i.push(p);const f=[];for(const p of s){const _=o[p],E=n.data[p];f.push({key:{status:"valid",value:p},value:_._parse(new N(n,E,n.path,p)),alwaysSet:p in n.data})}if(this._def.catchall instanceof $){const p=this._def.unknownKeys;if(p==="passthrough")for(const _ of i)f.push({key:{status:"valid",value:_},value:{status:"valid",value:n.data[_]}});else if(p==="strict")i.length>0&&(c(n,{code:d.unrecognized_keys,keys:i}),a.dirty());else if(p!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const p=this._def.catchall;for(const _ of i){const E=n.data[_];f.push({key:{status:"valid",value:_},value:p._parse(new N(n,E,n.path,_)),alwaysSet:_ in n.data})}}return n.common.async?Promise.resolve().then(async()=>{const p=[];for(const _ of f){const E=await _.key,J=await _.value;p.push({key:E,value:J,alwaysSet:_.alwaysSet})}return p}).then(p=>O.mergeObjectSync(a,p)):O.mergeObjectSync(a,f)}get shape(){return this._def.shape()}strict(e){return u.errToObj,new C({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,a)=>{const n=this._def.errorMap?.(t,a).message??a.defaultError;return t.code==="unrecognized_keys"?{message:u.errToObj(e).message??n}:{message:n}}}:{}})}strip(){return new C({...this._def,unknownKeys:"strip"})}passthrough(){return new C({...this._def,unknownKeys:"passthrough"})}extend(e){return new C({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new C({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:m.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new C({...this._def,catchall:e})}pick(e){const t={};for(const a of x.objectKeys(e))e[a]&&this.shape[a]&&(t[a]=this.shape[a]);return new C({...this._def,shape:()=>t})}omit(e){const t={};for(const a of x.objectKeys(this.shape))e[a]||(t[a]=this.shape[a]);return new C({...this._def,shape:()=>t})}deepPartial(){return P(this)}partial(e){const t={};for(const a of x.objectKeys(this.shape)){const n=this.shape[a];e&&!e[a]?t[a]=n:t[a]=n.optional()}return new C({...this._def,shape:()=>t})}required(e){const t={};for(const a of x.objectKeys(this.shape))if(e&&!e[a])t[a]=this.shape[a];else{let o=this.shape[a];for(;o instanceof z;)o=o._def.innerType;t[a]=o}return new C({...this._def,shape:()=>t})}keyof(){return Ue(x.objectKeys(this.shape))}}C.create=(r,e)=>new C({shape:()=>r,unknownKeys:"strip",catchall:$.create(),typeName:m.ZodObject,...y(e)});C.strictCreate=(r,e)=>new C({shape:()=>r,unknownKeys:"strict",catchall:$.create(),typeName:m.ZodObject,...y(e)});C.lazycreate=(r,e)=>new C({shape:r,unknownKeys:"strip",catchall:$.create(),typeName:m.ZodObject,...y(e)});class ee extends b{_parse(e){const{ctx:t}=this._processInputParams(e),a=this._def.options;function n(o){for(const i of o)if(i.result.status==="valid")return i.result;for(const i of o)if(i.result.status==="dirty")return t.common.issues.push(...i.ctx.common.issues),i.result;const s=o.map(i=>new I(i.ctx.common.issues));return c(t,{code:d.invalid_union,unionErrors:s}),g}if(t.common.async)return Promise.all(a.map(async o=>{const s={...t,common:{...t.common,issues:[]},parent:null};return{result:await o._parseAsync({data:t.data,path:t.path,parent:s}),ctx:s}})).then(n);{let o;const s=[];for(const f of a){const p={...t,common:{...t.common,issues:[]},parent:null},_=f._parseSync({data:t.data,path:t.path,parent:p});if(_.status==="valid")return _;_.status==="dirty"&&!o&&(o={result:_,ctx:p}),p.common.issues.length&&s.push(p.common.issues)}if(o)return t.common.issues.push(...o.ctx.common.issues),o.result;const i=s.map(f=>new I(f));return c(t,{code:d.invalid_union,unionErrors:i}),g}}get options(){return this._def.options}}ee.create=(r,e)=>new ee({options:r,typeName:m.ZodUnion,...y(e)});function he(r,e){const t=B(r),a=B(e);if(r===e)return{valid:!0,data:r};if(t===l.object&&a===l.object){const n=x.objectKeys(e),o=x.objectKeys(r).filter(i=>n.indexOf(i)!==-1),s={...r,...e};for(const i of o){const f=he(r[i],e[i]);if(!f.valid)return{valid:!1};s[i]=f.data}return{valid:!0,data:s}}else if(t===l.array&&a===l.array){if(r.length!==e.length)return{valid:!1};const n=[];for(let o=0;o<r.length;o++){const s=r[o],i=e[o],f=he(s,i);if(!f.valid)return{valid:!1};n.push(f.data)}return{valid:!0,data:n}}else return t===l.date&&a===l.date&&+r==+e?{valid:!0,data:r}:{valid:!1}}class te extends b{_parse(e){const{status:t,ctx:a}=this._processInputParams(e),n=(o,s)=>{if(Se(o)||Se(s))return g;const i=he(o.value,s.value);return i.valid?((je(o)||je(s))&&t.dirty(),{status:t.value,value:i.data}):(c(a,{code:d.invalid_intersection_types}),g)};return a.common.async?Promise.all([this._def.left._parseAsync({data:a.data,path:a.path,parent:a}),this._def.right._parseAsync({data:a.data,path:a.path,parent:a})]).then(([o,s])=>n(o,s)):n(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}}te.create=(r,e,t)=>new te({left:r,right:e,typeName:m.ZodIntersection,...y(t)});class D extends b{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==l.array)return c(a,{code:d.invalid_type,expected:l.array,received:a.parsedType}),g;if(a.data.length<this._def.items.length)return c(a,{code:d.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),g;!this._def.rest&&a.data.length>this._def.items.length&&(c(a,{code:d.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const o=[...a.data].map((s,i)=>{const f=this._def.items[i]||this._def.rest;return f?f._parse(new N(a,s,a.path,i)):null}).filter(s=>!!s);return a.common.async?Promise.all(o).then(s=>O.mergeArray(t,s)):O.mergeArray(t,o)}get items(){return this._def.items}rest(e){return new D({...this._def,rest:e})}}D.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new D({items:r,typeName:m.ZodTuple,rest:null,...y(e)})};class re extends b{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==l.object)return c(a,{code:d.invalid_type,expected:l.object,received:a.parsedType}),g;const n=[],o=this._def.keyType,s=this._def.valueType;for(const i in a.data)n.push({key:o._parse(new N(a,i,a.path,i)),value:s._parse(new N(a,a.data[i],a.path,i)),alwaysSet:i in a.data});return a.common.async?O.mergeObjectAsync(t,n):O.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,a){return t instanceof b?new re({keyType:e,valueType:t,typeName:m.ZodRecord,...y(a)}):new re({keyType:Z.create(),valueType:e,typeName:m.ZodRecord,...y(t)})}}class Ie extends b{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==l.map)return c(a,{code:d.invalid_type,expected:l.map,received:a.parsedType}),g;const n=this._def.keyType,o=this._def.valueType,s=[...a.data.entries()].map(([i,f],p)=>({key:n._parse(new N(a,i,a.path,[p,"key"])),value:o._parse(new N(a,f,a.path,[p,"value"]))}));if(a.common.async){const i=new Map;return Promise.resolve().then(async()=>{for(const f of s){const p=await f.key,_=await f.value;if(p.status==="aborted"||_.status==="aborted")return g;(p.status==="dirty"||_.status==="dirty")&&t.dirty(),i.set(p.value,_.value)}return{status:t.value,value:i}})}else{const i=new Map;for(const f of s){const p=f.key,_=f.value;if(p.status==="aborted"||_.status==="aborted")return g;(p.status==="dirty"||_.status==="dirty")&&t.dirty(),i.set(p.value,_.value)}return{status:t.value,value:i}}}}Ie.create=(r,e,t)=>new Ie({valueType:e,keyType:r,typeName:m.ZodMap,...y(t)});class Y extends b{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==l.set)return c(a,{code:d.invalid_type,expected:l.set,received:a.parsedType}),g;const n=this._def;n.minSize!==null&&a.data.size<n.minSize.value&&(c(a,{code:d.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),n.maxSize!==null&&a.data.size>n.maxSize.value&&(c(a,{code:d.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());const o=this._def.valueType;function s(f){const p=new Set;for(const _ of f){if(_.status==="aborted")return g;_.status==="dirty"&&t.dirty(),p.add(_.value)}return{status:t.value,value:p}}const i=[...a.data.values()].map((f,p)=>o._parse(new N(a,f,a.path,p)));return a.common.async?Promise.all(i).then(f=>s(f)):s(i)}min(e,t){return new Y({...this._def,minSize:{value:e,message:u.toString(t)}})}max(e,t){return new Y({...this._def,maxSize:{value:e,message:u.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}Y.create=(r,e)=>new Y({valueType:r,minSize:null,maxSize:null,typeName:m.ZodSet,...y(e)});class Ee extends b{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}Ee.create=(r,e)=>new Ee({getter:r,typeName:m.ZodLazy,...y(e)});class fe extends b{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return c(t,{received:t.data,code:d.invalid_literal,expected:this._def.value}),g}return{status:"valid",value:e.data}}get value(){return this._def.value}}fe.create=(r,e)=>new fe({value:r,typeName:m.ZodLiteral,...y(e)});function Ue(r,e){return new W({values:r,typeName:m.ZodEnum,...y(e)})}class W extends b{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),a=this._def.values;return c(t,{expected:x.joinValues(a),received:t.parsedType,code:d.invalid_type}),g}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),a=this._def.values;return c(t,{received:t.data,code:d.invalid_enum_value,options:a}),g}return R(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return W.create(e,{...this._def,...t})}exclude(e,t=this._def){return W.create(this.options.filter(a=>!e.includes(a)),{...this._def,...t})}}W.create=Ue;class Be extends b{_parse(e){const t=x.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(e);if(a.parsedType!==l.string&&a.parsedType!==l.number){const n=x.objectValues(t);return c(a,{expected:x.joinValues(n),received:a.parsedType,code:d.invalid_type}),g}if(this._cache||(this._cache=new Set(x.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const n=x.objectValues(t);return c(a,{received:a.data,code:d.invalid_enum_value,options:n}),g}return R(e.data)}get enum(){return this._def.values}}Be.create=(r,e)=>new Be({values:r,typeName:m.ZodNativeEnum,...y(e)});class ae extends b{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==l.promise&&t.common.async===!1)return c(t,{code:d.invalid_type,expected:l.promise,received:t.parsedType}),g;const a=t.parsedType===l.promise?t.data:Promise.resolve(t.data);return R(a.then(n=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}}ae.create=(r,e)=>new ae({type:r,typeName:m.ZodPromise,...y(e)});class F extends b{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===m.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:a}=this._processInputParams(e),n=this._def.effect||null,o={addIssue:s=>{c(a,s),s.fatal?t.abort():t.dirty()},get path(){return a.path}};if(o.addIssue=o.addIssue.bind(o),n.type==="preprocess"){const s=n.transform(a.data,o);if(a.common.async)return Promise.resolve(s).then(async i=>{if(t.value==="aborted")return g;const f=await this._def.schema._parseAsync({data:i,path:a.path,parent:a});return f.status==="aborted"?g:f.status==="dirty"||t.value==="dirty"?G(f.value):f});{if(t.value==="aborted")return g;const i=this._def.schema._parseSync({data:s,path:a.path,parent:a});return i.status==="aborted"?g:i.status==="dirty"||t.value==="dirty"?G(i.value):i}}if(n.type==="refinement"){const s=i=>{const f=n.refinement(i,o);if(a.common.async)return Promise.resolve(f);if(f instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return i};if(a.common.async===!1){const i=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});return i.status==="aborted"?g:(i.status==="dirty"&&t.dirty(),s(i.value),{status:t.value,value:i.value})}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(i=>i.status==="aborted"?g:(i.status==="dirty"&&t.dirty(),s(i.value).then(()=>({status:t.value,value:i.value}))))}if(n.type==="transform")if(a.common.async===!1){const s=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(!V(s))return g;const i=n.transform(s.value,o);if(i instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:i}}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(s=>V(s)?Promise.resolve(n.transform(s.value,o)).then(i=>({status:t.value,value:i})):g);x.assertNever(n)}}F.create=(r,e,t)=>new F({schema:r,typeName:m.ZodEffects,effect:e,...y(t)});F.createWithPreprocess=(r,e,t)=>new F({schema:e,effect:{type:"preprocess",transform:r},typeName:m.ZodEffects,...y(t)});class z extends b{_parse(e){return this._getType(e)===l.undefined?R(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}z.create=(r,e)=>new z({innerType:r,typeName:m.ZodOptional,...y(e)});class H extends b{_parse(e){return this._getType(e)===l.null?R(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}H.create=(r,e)=>new H({innerType:r,typeName:m.ZodNullable,...y(e)});class pe extends b{_parse(e){const{ctx:t}=this._processInputParams(e);let a=t.data;return t.parsedType===l.undefined&&(a=this._def.defaultValue()),this._def.innerType._parse({data:a,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}pe.create=(r,e)=>new pe({innerType:r,typeName:m.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...y(e)});class me extends b{_parse(e){const{ctx:t}=this._processInputParams(e),a={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:a.data,path:a.path,parent:{...a}});return Q(n)?n.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new I(a.common.issues)},input:a.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new I(a.common.issues)},input:a.data})}}removeCatch(){return this._def.innerType}}me.create=(r,e)=>new me({innerType:r,typeName:m.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...y(e)});class ze extends b{_parse(e){if(this._getType(e)!==l.nan){const a=this._getOrReturnCtx(e);return c(a,{code:d.invalid_type,expected:l.nan,received:a.parsedType}),g}return{status:"valid",value:e.data}}}ze.create=r=>new ze({typeName:m.ZodNaN,...y(r)});class Nt extends b{_parse(e){const{ctx:t}=this._processInputParams(e),a=t.data;return this._def.type._parse({data:a,path:t.path,parent:t})}unwrap(){return this._def.type}}class ke extends b{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});return o.status==="aborted"?g:o.status==="dirty"?(t.dirty(),G(o.value)):this._def.out._parseAsync({data:o.value,path:a.path,parent:a})})();{const n=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return n.status==="aborted"?g:n.status==="dirty"?(t.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:a.path,parent:a})}}static create(e,t){return new ke({in:e,out:t,typeName:m.ZodPipeline})}}class ge extends b{_parse(e){const t=this._def.innerType._parse(e),a=n=>(V(n)&&(n.value=Object.freeze(n.value)),n);return Q(t)?t.then(n=>a(n)):a(t)}unwrap(){return this._def.innerType}}ge.create=(r,e)=>new ge({innerType:r,typeName:m.ZodReadonly,...y(e)});var m;(function(r){r.ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodSymbol="ZodSymbol",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodCatch="ZodCatch",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded",r.ZodPipeline="ZodPipeline",r.ZodReadonly="ZodReadonly"})(m||(m={}));const h=Z.create,ve=U.create,Ht=ue.create;$.create;const Zt=M.create,S=C.create,be=ee.create;te.create;D.create;const _e=re.create,Gt=fe.create,We=W.create;ae.create;z.create;H.create;const It=S({minRem:ve(),maxRem:ve()}),T=It.or(h()),X=S({0:h().optional(),50:h(),100:h(),200:h(),300:h(),400:h(),500:h(),600:h(),700:h(),800:h(),900:h(),950:h(),1e3:h().optional()}),de=S({color:h().optional(),background:h().optional(),borderWidth:h().optional(),borderColor:h().optional(),boxShadow:h().optional()}),Et=S({borderRadius:T.optional(),custom:_e(h(),be([h(),ve()])).optional(),hover:de.optional(),focus:de.optional()}).and(de),Bt=S({family:h().optional()}),zt=_e(We(["predefinedQuestion","edit","newConversation","voteUp","voteDown","retry","message","messageLoading","thread","submit","abort","expand","help","attach","record","reward","share","audio","copy","dismiss","menu","info","menuClose","chevronDown","internalLink","externalLink","liip","avatar","openChat","speechInput","listUnordered","lightMode","darkMode"]),h()),$t=S({font:Bt.optional(),colors:S({brand:X,accent:X.optional(),highlight:X,grey:X}),base:S({fontSizeXs:T.optional(),fontSizeSm:T.optional(),fontSizeBody:T.optional(),fontSizeH3:T.optional(),fontSizeH2:T.optional(),fontSizeH1:T.optional(),fontWeightNormal:h().optional(),fontWeightBold:h().optional(),fontWeightTitle:h().optional(),lineHeightDefault:h().optional(),lineHeightSnug:h().optional(),lineHeightTight:h().optional(),borderRadius:T.optional(),lineColor:h().optional(),boxShadow:h().optional()}),components:_e(h(),Et),svgs:zt}),ne=S({customCSS:h().optional(),fontCSS:h().optional(),fontURLs:h().array().optional(),tokens:$t});S({light:ne,dark:ne});const Dt=S({light:ne,dark:ne}).deepPartial(),Fe=S({50:h(),100:h(),200:h(),300:h(),400:h(),500:h(),600:h(),700:h(),800:h(),900:h(),950:h()}),He=We(["slate","gray","zinc","neutral","stone","red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"]),$e=be([Fe,He]),Lt=be([Fe.and(S({0:h(),1e3:h()})),He]),Pt=S({avatarImageUrl:h().optional(),colors:S({brand:$e.optional(),highlight:$e.optional(),grey:Lt.optional(),background:h().optional(),text:h().optional(),anchor:S({default:h().optional(),hover:h().optional()}).optional()}).optional(),font:S({family:h().optional(),urls:Zt(h()).optional(),sizeXs:T.optional(),sizeSm:T.optional(),sizeBody:T.optional(),sizeH3:T.optional(),sizeH2:T.optional(),sizeH1:T.optional(),weightNormal:h().optional(),weightBold:h().optional(),weightTitle:h().optional()}).optional(),borderRadius:T.optional(),fineGrained:Dt.optional()}),Vt=r=>r.split("/").pop().split(".")[0],Ut=Object.assign({"./default/fallback-dev.theme.ts":st,"./default/fallback.theme.ts":nt}),xe=new Map;Object.entries(Ut).forEach(([r,e])=>{const{error:t,data:a}=Pt.safeParse(e?.theme);if(t){console.error(`Invalid theme in ${r}:`,t);return}xe.set(Vt(r),a)});const qt=r=>{const e=xe.get(r);return e||(console.error(`Theme ${r} not found`),oe)};Array.from(xe.keys());export{Wt as P,Zt as a,Ht as b,Pt as c,et as d,We as e,Vt as f,Xe as g,qt as h,Ft as i,Gt as l,rt as m,ve as n,S as o,_e as r,h as s,oe as t,be as u};
228
+ `}}},at=rt(De,{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)"},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)"}}}}),oe={fineGrained:{light:De,dark:at}},nt=Object.freeze(Object.defineProperty({__proto__:null,theme:oe},Symbol.toStringTag,{value:"Module"})),ye=structuredClone(oe.fineGrained.light);ye.tokens.colors={brand:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",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"}};const Le=structuredClone(oe.fineGrained.dark);Le.tokens.colors=ye.tokens.colors;const ot={fineGrained:{light:ye,dark:Le}},st=Object.freeze(Object.defineProperty({__proto__:null,theme:ot},Symbol.toStringTag,{value:"Module"}));var x;(function(r){r.assertEqual=n=>{};function e(n){}r.assertIs=e;function t(n){throw new Error}r.assertNever=t,r.arrayToEnum=n=>{const o={};for(const s of n)o[s]=s;return o},r.getValidEnumValues=n=>{const o=r.objectKeys(n).filter(i=>typeof n[n[i]]!="number"),s={};for(const i of o)s[i]=n[i];return r.objectValues(s)},r.objectValues=n=>r.objectKeys(n).map(function(o){return n[o]}),r.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{const o=[];for(const s in n)Object.prototype.hasOwnProperty.call(n,s)&&o.push(s);return o},r.find=(n,o)=>{for(const s of n)if(o(s))return s},r.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function a(n,o=" | "){return n.map(s=>typeof s=="string"?`'${s}'`:s).join(o)}r.joinValues=a,r.jsonStringifyReplacer=(n,o)=>typeof o=="bigint"?o.toString():o})(x||(x={}));var Ce;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(Ce||(Ce={}));const l=x.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),B=r=>{switch(typeof r){case"undefined":return l.undefined;case"string":return l.string;case"number":return Number.isNaN(r)?l.nan:l.number;case"boolean":return l.boolean;case"function":return l.function;case"bigint":return l.bigint;case"symbol":return l.symbol;case"object":return Array.isArray(r)?l.array:r===null?l.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?l.promise:typeof Map<"u"&&r instanceof Map?l.map:typeof Set<"u"&&r instanceof Set?l.set:typeof Date<"u"&&r instanceof Date?l.date:l.object;default:return l.unknown}},d=x.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class I extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=a=>{this.issues=[...this.issues,a]},this.addIssues=(a=[])=>{this.issues=[...this.issues,...a]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(o){return o.message},a={_errors:[]},n=o=>{for(const s of o.issues)if(s.code==="invalid_union")s.unionErrors.map(n);else if(s.code==="invalid_return_type")n(s.returnTypeError);else if(s.code==="invalid_arguments")n(s.argumentsError);else if(s.path.length===0)a._errors.push(t(s));else{let i=a,f=0;for(;f<s.path.length;){const p=s.path[f];f===s.path.length-1?(i[p]=i[p]||{_errors:[]},i[p]._errors.push(t(s))):i[p]=i[p]||{_errors:[]},i=i[p],f++}}};return n(this),a}static assert(e){if(!(e instanceof I))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,x.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){const t={},a=[];for(const n of this.issues)if(n.path.length>0){const o=n.path[0];t[o]=t[o]||[],t[o].push(e(n))}else a.push(e(n));return{formErrors:a,fieldErrors:t}}get formErrors(){return this.flatten()}}I.create=r=>new I(r);const le=(r,e)=>{let t;switch(r.code){case d.invalid_type:r.received===l.undefined?t="Required":t=`Expected ${r.expected}, received ${r.received}`;break;case d.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(r.expected,x.jsonStringifyReplacer)}`;break;case d.unrecognized_keys:t=`Unrecognized key(s) in object: ${x.joinValues(r.keys,", ")}`;break;case d.invalid_union:t="Invalid input";break;case d.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${x.joinValues(r.options)}`;break;case d.invalid_enum_value:t=`Invalid enum value. Expected ${x.joinValues(r.options)}, received '${r.received}'`;break;case d.invalid_arguments:t="Invalid function arguments";break;case d.invalid_return_type:t="Invalid function return type";break;case d.invalid_date:t="Invalid date";break;case d.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(t=`Invalid input: must include "${r.validation.includes}"`,typeof r.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${r.validation.position}`)):"startsWith"in r.validation?t=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?t=`Invalid input: must end with "${r.validation.endsWith}"`:x.assertNever(r.validation):r.validation!=="regex"?t=`Invalid ${r.validation}`:t="Invalid";break;case d.too_small:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="bigint"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(r.minimum))}`:t="Invalid input";break;case d.too_big:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="bigint"?t=`BigInt must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(r.maximum))}`:t="Invalid input";break;case d.custom:t="Invalid input";break;case d.invalid_intersection_types:t="Intersection results could not be merged";break;case d.not_multiple_of:t=`Number must be a multiple of ${r.multipleOf}`;break;case d.not_finite:t="Number must be finite";break;default:t=e.defaultError,x.assertNever(r)}return{message:t}};let it=le;function dt(){return it}const ct=r=>{const{data:e,path:t,errorMaps:a,issueData:n}=r,o=[...t,...n.path||[]],s={...n,path:o};if(n.message!==void 0)return{...n,path:o,message:n.message};let i="";const f=a.filter(p=>!!p).slice().reverse();for(const p of f)i=p(s,{data:e,defaultError:i}).message;return{...n,path:o,message:i}};function c(r,e){const t=dt(),a=ct({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t,t===le?void 0:le].filter(n=>!!n)});r.common.issues.push(a)}class O{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const a=[];for(const n of t){if(n.status==="aborted")return g;n.status==="dirty"&&e.dirty(),a.push(n.value)}return{status:e.value,value:a}}static async mergeObjectAsync(e,t){const a=[];for(const n of t){const o=await n.key,s=await n.value;a.push({key:o,value:s})}return O.mergeObjectSync(e,a)}static mergeObjectSync(e,t){const a={};for(const n of t){const{key:o,value:s}=n;if(o.status==="aborted"||s.status==="aborted")return g;o.status==="dirty"&&e.dirty(),s.status==="dirty"&&e.dirty(),o.value!=="__proto__"&&(typeof s.value<"u"||n.alwaysSet)&&(a[o.value]=s.value)}return{status:e.value,value:a}}}const g=Object.freeze({status:"aborted"}),G=r=>({status:"dirty",value:r}),R=r=>({status:"valid",value:r}),Se=r=>r.status==="aborted",je=r=>r.status==="dirty",V=r=>r.status==="valid",Q=r=>typeof Promise<"u"&&r instanceof Promise;var u;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e?.message})(u||(u={}));class N{constructor(e,t,a,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=a,this._key=n}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Te=(r,e)=>{if(V(e))return{success:!0,data:e.value};if(!r.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new I(r.common.issues);return this._error=t,this._error}}};function y(r){if(!r)return{};const{errorMap:e,invalid_type_error:t,required_error:a,description:n}=r;if(e&&(t||a))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(s,i)=>{const{message:f}=r;return s.code==="invalid_enum_value"?{message:f??i.defaultError}:typeof i.data>"u"?{message:f??a??i.defaultError}:s.code!=="invalid_type"?{message:i.defaultError}:{message:f??t??i.defaultError}},description:n}}class b{get description(){return this._def.description}_getType(e){return B(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:B(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new O,ctx:{common:e.parent.common,data:e.data,parsedType:B(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(Q(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const a=this.safeParse(e,t);if(a.success)return a.data;throw a.error}safeParse(e,t){const a={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:B(e)},n=this._parseSync({data:e,path:a.path,parent:a});return Te(a,n)}"~validate"(e){const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:B(e)};if(!this["~standard"].async)try{const a=this._parseSync({data:e,path:[],parent:t});return V(a)?{value:a.value}:{issues:t.common.issues}}catch(a){a?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(a=>V(a)?{value:a.value}:{issues:t.common.issues})}async parseAsync(e,t){const a=await this.safeParseAsync(e,t);if(a.success)return a.data;throw a.error}async safeParseAsync(e,t){const a={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:B(e)},n=this._parse({data:e,path:a.path,parent:a}),o=await(Q(n)?n:Promise.resolve(n));return Te(a,o)}refine(e,t){const a=n=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(n):t;return this._refinement((n,o)=>{const s=e(n),i=()=>o.addIssue({code:d.custom,...a(n)});return typeof Promise<"u"&&s instanceof Promise?s.then(f=>f?!0:(i(),!1)):s?!0:(i(),!1)})}refinement(e,t){return this._refinement((a,n)=>e(a)?!0:(n.addIssue(typeof t=="function"?t(a,n):t),!1))}_refinement(e){return new F({schema:this,typeName:m.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:t=>this["~validate"](t)}}optional(){return z.create(this,this._def)}nullable(){return H.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return M.create(this)}promise(){return ae.create(this,this._def)}or(e){return ee.create([this,e],this._def)}and(e){return te.create(this,e,this._def)}transform(e){return new F({...y(this._def),schema:this,typeName:m.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new pe({...y(this._def),innerType:this,defaultValue:t,typeName:m.ZodDefault})}brand(){return new Nt({typeName:m.ZodBranded,type:this,...y(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new me({...y(this._def),innerType:this,catchValue:t,typeName:m.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return ke.create(this,e)}readonly(){return ge.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const lt=/^c[^\s-]{8,}$/i,ut=/^[0-9a-z]+$/,ht=/^[0-9A-HJKMNP-TV-Z]{26}$/i,ft=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,pt=/^[a-z0-9_-]{21}$/i,mt=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,gt=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,vt=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,yt="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let ie;const kt=/^(?:(?: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])$/,bt=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,_t=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,xt=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,wt=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Ct=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Pe="((\\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])))",St=new RegExp(`^${Pe}$`);function Ve(r){let e="[0-5]\\d";r.precision?e=`${e}\\.\\d{${r.precision}}`:r.precision==null&&(e=`${e}(\\.\\d+)?`);const t=r.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function jt(r){return new RegExp(`^${Ve(r)}$`)}function Tt(r){let e=`${Pe}T${Ve(r)}`;const t=[];return t.push(r.local?"Z?":"Z"),r.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function Ot(r,e){return!!((e==="v4"||!e)&&kt.test(r)||(e==="v6"||!e)&&_t.test(r))}function Rt(r,e){if(!mt.test(r))return!1;try{const[t]=r.split(".");if(!t)return!1;const a=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),n=JSON.parse(atob(a));return!(typeof n!="object"||n===null||"typ"in n&&n?.typ!=="JWT"||!n.alg||e&&n.alg!==e)}catch{return!1}}function At(r,e){return!!((e==="v4"||!e)&&bt.test(r)||(e==="v6"||!e)&&xt.test(r))}class Z extends b{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==l.string){const o=this._getOrReturnCtx(e);return c(o,{code:d.invalid_type,expected:l.string,received:o.parsedType}),g}const a=new O;let n;for(const o of this._def.checks)if(o.kind==="min")e.data.length<o.value&&(n=this._getOrReturnCtx(e,n),c(n,{code:d.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),a.dirty());else if(o.kind==="max")e.data.length>o.value&&(n=this._getOrReturnCtx(e,n),c(n,{code:d.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),a.dirty());else if(o.kind==="length"){const s=e.data.length>o.value,i=e.data.length<o.value;(s||i)&&(n=this._getOrReturnCtx(e,n),s?c(n,{code:d.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):i&&c(n,{code:d.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),a.dirty())}else if(o.kind==="email")vt.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"email",code:d.invalid_string,message:o.message}),a.dirty());else if(o.kind==="emoji")ie||(ie=new RegExp(yt,"u")),ie.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"emoji",code:d.invalid_string,message:o.message}),a.dirty());else if(o.kind==="uuid")ft.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"uuid",code:d.invalid_string,message:o.message}),a.dirty());else if(o.kind==="nanoid")pt.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"nanoid",code:d.invalid_string,message:o.message}),a.dirty());else if(o.kind==="cuid")lt.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"cuid",code:d.invalid_string,message:o.message}),a.dirty());else if(o.kind==="cuid2")ut.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"cuid2",code:d.invalid_string,message:o.message}),a.dirty());else if(o.kind==="ulid")ht.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"ulid",code:d.invalid_string,message:o.message}),a.dirty());else if(o.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),c(n,{validation:"url",code:d.invalid_string,message:o.message}),a.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"regex",code:d.invalid_string,message:o.message}),a.dirty())):o.kind==="trim"?e.data=e.data.trim():o.kind==="includes"?e.data.includes(o.value,o.position)||(n=this._getOrReturnCtx(e,n),c(n,{code:d.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),a.dirty()):o.kind==="toLowerCase"?e.data=e.data.toLowerCase():o.kind==="toUpperCase"?e.data=e.data.toUpperCase():o.kind==="startsWith"?e.data.startsWith(o.value)||(n=this._getOrReturnCtx(e,n),c(n,{code:d.invalid_string,validation:{startsWith:o.value},message:o.message}),a.dirty()):o.kind==="endsWith"?e.data.endsWith(o.value)||(n=this._getOrReturnCtx(e,n),c(n,{code:d.invalid_string,validation:{endsWith:o.value},message:o.message}),a.dirty()):o.kind==="datetime"?Tt(o).test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{code:d.invalid_string,validation:"datetime",message:o.message}),a.dirty()):o.kind==="date"?St.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{code:d.invalid_string,validation:"date",message:o.message}),a.dirty()):o.kind==="time"?jt(o).test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{code:d.invalid_string,validation:"time",message:o.message}),a.dirty()):o.kind==="duration"?gt.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"duration",code:d.invalid_string,message:o.message}),a.dirty()):o.kind==="ip"?Ot(e.data,o.version)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"ip",code:d.invalid_string,message:o.message}),a.dirty()):o.kind==="jwt"?Rt(e.data,o.alg)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"jwt",code:d.invalid_string,message:o.message}),a.dirty()):o.kind==="cidr"?At(e.data,o.version)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"cidr",code:d.invalid_string,message:o.message}),a.dirty()):o.kind==="base64"?wt.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"base64",code:d.invalid_string,message:o.message}),a.dirty()):o.kind==="base64url"?Ct.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"base64url",code:d.invalid_string,message:o.message}),a.dirty()):x.assertNever(o);return{status:a.value,value:e.data}}_regex(e,t,a){return this.refinement(n=>e.test(n),{validation:t,code:d.invalid_string,...u.errToObj(a)})}_addCheck(e){return new Z({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...u.errToObj(e)})}url(e){return this._addCheck({kind:"url",...u.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...u.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...u.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...u.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...u.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...u.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...u.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...u.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...u.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...u.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...u.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...u.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...u.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...u.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...u.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...u.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...u.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...u.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...u.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...u.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...u.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...u.errToObj(t)})}nonempty(e){return this.min(1,u.errToObj(e))}trim(){return new Z({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Z({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Z({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}Z.create=r=>new Z({checks:[],typeName:m.ZodString,coerce:r?.coerce??!1,...y(r)});function Mt(r,e){const t=(r.toString().split(".")[1]||"").length,a=(e.toString().split(".")[1]||"").length,n=t>a?t:a,o=Number.parseInt(r.toFixed(n).replace(".","")),s=Number.parseInt(e.toFixed(n).replace(".",""));return o%s/10**n}class U extends b{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==l.number){const o=this._getOrReturnCtx(e);return c(o,{code:d.invalid_type,expected:l.number,received:o.parsedType}),g}let a;const n=new O;for(const o of this._def.checks)o.kind==="int"?x.isInteger(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{code:d.invalid_type,expected:"integer",received:"float",message:o.message}),n.dirty()):o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(a=this._getOrReturnCtx(e,a),c(a,{code:d.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),n.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(a=this._getOrReturnCtx(e,a),c(a,{code:d.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),n.dirty()):o.kind==="multipleOf"?Mt(e.data,o.value)!==0&&(a=this._getOrReturnCtx(e,a),c(a,{code:d.not_multiple_of,multipleOf:o.value,message:o.message}),n.dirty()):o.kind==="finite"?Number.isFinite(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{code:d.not_finite,message:o.message}),n.dirty()):x.assertNever(o);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,u.toString(t))}gt(e,t){return this.setLimit("min",e,!1,u.toString(t))}lte(e,t){return this.setLimit("max",e,!0,u.toString(t))}lt(e,t){return this.setLimit("max",e,!1,u.toString(t))}setLimit(e,t,a,n){return new U({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:u.toString(n)}]})}_addCheck(e){return new U({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:u.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:u.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:u.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:u.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:u.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:u.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:u.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:u.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:u.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&x.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const a of this._def.checks){if(a.kind==="finite"||a.kind==="int"||a.kind==="multipleOf")return!0;a.kind==="min"?(t===null||a.value>t)&&(t=a.value):a.kind==="max"&&(e===null||a.value<e)&&(e=a.value)}return Number.isFinite(t)&&Number.isFinite(e)}}U.create=r=>new U({checks:[],typeName:m.ZodNumber,coerce:r?.coerce||!1,...y(r)});class q extends b{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==l.bigint)return this._getInvalidInput(e);let a;const n=new O;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(a=this._getOrReturnCtx(e,a),c(a,{code:d.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),n.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(a=this._getOrReturnCtx(e,a),c(a,{code:d.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),n.dirty()):o.kind==="multipleOf"?e.data%o.value!==BigInt(0)&&(a=this._getOrReturnCtx(e,a),c(a,{code:d.not_multiple_of,multipleOf:o.value,message:o.message}),n.dirty()):x.assertNever(o);return{status:n.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return c(t,{code:d.invalid_type,expected:l.bigint,received:t.parsedType}),g}gte(e,t){return this.setLimit("min",e,!0,u.toString(t))}gt(e,t){return this.setLimit("min",e,!1,u.toString(t))}lte(e,t){return this.setLimit("max",e,!0,u.toString(t))}lt(e,t){return this.setLimit("max",e,!1,u.toString(t))}setLimit(e,t,a,n){return new q({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:u.toString(n)}]})}_addCheck(e){return new q({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:u.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:u.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:u.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:u.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:u.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}q.create=r=>new q({checks:[],typeName:m.ZodBigInt,coerce:r?.coerce??!1,...y(r)});class ue extends b{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==l.boolean){const a=this._getOrReturnCtx(e);return c(a,{code:d.invalid_type,expected:l.boolean,received:a.parsedType}),g}return R(e.data)}}ue.create=r=>new ue({typeName:m.ZodBoolean,coerce:r?.coerce||!1,...y(r)});class K extends b{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==l.date){const o=this._getOrReturnCtx(e);return c(o,{code:d.invalid_type,expected:l.date,received:o.parsedType}),g}if(Number.isNaN(e.data.getTime())){const o=this._getOrReturnCtx(e);return c(o,{code:d.invalid_date}),g}const a=new O;let n;for(const o of this._def.checks)o.kind==="min"?e.data.getTime()<o.value&&(n=this._getOrReturnCtx(e,n),c(n,{code:d.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),a.dirty()):o.kind==="max"?e.data.getTime()>o.value&&(n=this._getOrReturnCtx(e,n),c(n,{code:d.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),a.dirty()):x.assertNever(o);return{status:a.value,value:new Date(e.data.getTime())}}_addCheck(e){return new K({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:u.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:u.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}}K.create=r=>new K({checks:[],coerce:r?.coerce||!1,typeName:m.ZodDate,...y(r)});class Oe extends b{_parse(e){if(this._getType(e)!==l.symbol){const a=this._getOrReturnCtx(e);return c(a,{code:d.invalid_type,expected:l.symbol,received:a.parsedType}),g}return R(e.data)}}Oe.create=r=>new Oe({typeName:m.ZodSymbol,...y(r)});class Re extends b{_parse(e){if(this._getType(e)!==l.undefined){const a=this._getOrReturnCtx(e);return c(a,{code:d.invalid_type,expected:l.undefined,received:a.parsedType}),g}return R(e.data)}}Re.create=r=>new Re({typeName:m.ZodUndefined,...y(r)});class Ae extends b{_parse(e){if(this._getType(e)!==l.null){const a=this._getOrReturnCtx(e);return c(a,{code:d.invalid_type,expected:l.null,received:a.parsedType}),g}return R(e.data)}}Ae.create=r=>new Ae({typeName:m.ZodNull,...y(r)});class Me extends b{constructor(){super(...arguments),this._any=!0}_parse(e){return R(e.data)}}Me.create=r=>new Me({typeName:m.ZodAny,...y(r)});class Ne extends b{constructor(){super(...arguments),this._unknown=!0}_parse(e){return R(e.data)}}Ne.create=r=>new Ne({typeName:m.ZodUnknown,...y(r)});class $ extends b{_parse(e){const t=this._getOrReturnCtx(e);return c(t,{code:d.invalid_type,expected:l.never,received:t.parsedType}),g}}$.create=r=>new $({typeName:m.ZodNever,...y(r)});class Ze extends b{_parse(e){if(this._getType(e)!==l.undefined){const a=this._getOrReturnCtx(e);return c(a,{code:d.invalid_type,expected:l.void,received:a.parsedType}),g}return R(e.data)}}Ze.create=r=>new Ze({typeName:m.ZodVoid,...y(r)});class M extends b{_parse(e){const{ctx:t,status:a}=this._processInputParams(e),n=this._def;if(t.parsedType!==l.array)return c(t,{code:d.invalid_type,expected:l.array,received:t.parsedType}),g;if(n.exactLength!==null){const s=t.data.length>n.exactLength.value,i=t.data.length<n.exactLength.value;(s||i)&&(c(t,{code:s?d.too_big:d.too_small,minimum:i?n.exactLength.value:void 0,maximum:s?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),a.dirty())}if(n.minLength!==null&&t.data.length<n.minLength.value&&(c(t,{code:d.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),a.dirty()),n.maxLength!==null&&t.data.length>n.maxLength.value&&(c(t,{code:d.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),a.dirty()),t.common.async)return Promise.all([...t.data].map((s,i)=>n.type._parseAsync(new N(t,s,t.path,i)))).then(s=>O.mergeArray(a,s));const o=[...t.data].map((s,i)=>n.type._parseSync(new N(t,s,t.path,i)));return O.mergeArray(a,o)}get element(){return this._def.type}min(e,t){return new M({...this._def,minLength:{value:e,message:u.toString(t)}})}max(e,t){return new M({...this._def,maxLength:{value:e,message:u.toString(t)}})}length(e,t){return new M({...this._def,exactLength:{value:e,message:u.toString(t)}})}nonempty(e){return this.min(1,e)}}M.create=(r,e)=>new M({type:r,minLength:null,maxLength:null,exactLength:null,typeName:m.ZodArray,...y(e)});function P(r){if(r instanceof C){const e={};for(const t in r.shape){const a=r.shape[t];e[t]=z.create(P(a))}return new C({...r._def,shape:()=>e})}else return r instanceof M?new M({...r._def,type:P(r.element)}):r instanceof z?z.create(P(r.unwrap())):r instanceof H?H.create(P(r.unwrap())):r instanceof D?D.create(r.items.map(e=>P(e))):r}class C extends b{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=x.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==l.object){const p=this._getOrReturnCtx(e);return c(p,{code:d.invalid_type,expected:l.object,received:p.parsedType}),g}const{status:a,ctx:n}=this._processInputParams(e),{shape:o,keys:s}=this._getCached(),i=[];if(!(this._def.catchall instanceof $&&this._def.unknownKeys==="strip"))for(const p in n.data)s.includes(p)||i.push(p);const f=[];for(const p of s){const _=o[p],E=n.data[p];f.push({key:{status:"valid",value:p},value:_._parse(new N(n,E,n.path,p)),alwaysSet:p in n.data})}if(this._def.catchall instanceof $){const p=this._def.unknownKeys;if(p==="passthrough")for(const _ of i)f.push({key:{status:"valid",value:_},value:{status:"valid",value:n.data[_]}});else if(p==="strict")i.length>0&&(c(n,{code:d.unrecognized_keys,keys:i}),a.dirty());else if(p!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const p=this._def.catchall;for(const _ of i){const E=n.data[_];f.push({key:{status:"valid",value:_},value:p._parse(new N(n,E,n.path,_)),alwaysSet:_ in n.data})}}return n.common.async?Promise.resolve().then(async()=>{const p=[];for(const _ of f){const E=await _.key,J=await _.value;p.push({key:E,value:J,alwaysSet:_.alwaysSet})}return p}).then(p=>O.mergeObjectSync(a,p)):O.mergeObjectSync(a,f)}get shape(){return this._def.shape()}strict(e){return u.errToObj,new C({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,a)=>{const n=this._def.errorMap?.(t,a).message??a.defaultError;return t.code==="unrecognized_keys"?{message:u.errToObj(e).message??n}:{message:n}}}:{}})}strip(){return new C({...this._def,unknownKeys:"strip"})}passthrough(){return new C({...this._def,unknownKeys:"passthrough"})}extend(e){return new C({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new C({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:m.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new C({...this._def,catchall:e})}pick(e){const t={};for(const a of x.objectKeys(e))e[a]&&this.shape[a]&&(t[a]=this.shape[a]);return new C({...this._def,shape:()=>t})}omit(e){const t={};for(const a of x.objectKeys(this.shape))e[a]||(t[a]=this.shape[a]);return new C({...this._def,shape:()=>t})}deepPartial(){return P(this)}partial(e){const t={};for(const a of x.objectKeys(this.shape)){const n=this.shape[a];e&&!e[a]?t[a]=n:t[a]=n.optional()}return new C({...this._def,shape:()=>t})}required(e){const t={};for(const a of x.objectKeys(this.shape))if(e&&!e[a])t[a]=this.shape[a];else{let o=this.shape[a];for(;o instanceof z;)o=o._def.innerType;t[a]=o}return new C({...this._def,shape:()=>t})}keyof(){return Ue(x.objectKeys(this.shape))}}C.create=(r,e)=>new C({shape:()=>r,unknownKeys:"strip",catchall:$.create(),typeName:m.ZodObject,...y(e)});C.strictCreate=(r,e)=>new C({shape:()=>r,unknownKeys:"strict",catchall:$.create(),typeName:m.ZodObject,...y(e)});C.lazycreate=(r,e)=>new C({shape:r,unknownKeys:"strip",catchall:$.create(),typeName:m.ZodObject,...y(e)});class ee extends b{_parse(e){const{ctx:t}=this._processInputParams(e),a=this._def.options;function n(o){for(const i of o)if(i.result.status==="valid")return i.result;for(const i of o)if(i.result.status==="dirty")return t.common.issues.push(...i.ctx.common.issues),i.result;const s=o.map(i=>new I(i.ctx.common.issues));return c(t,{code:d.invalid_union,unionErrors:s}),g}if(t.common.async)return Promise.all(a.map(async o=>{const s={...t,common:{...t.common,issues:[]},parent:null};return{result:await o._parseAsync({data:t.data,path:t.path,parent:s}),ctx:s}})).then(n);{let o;const s=[];for(const f of a){const p={...t,common:{...t.common,issues:[]},parent:null},_=f._parseSync({data:t.data,path:t.path,parent:p});if(_.status==="valid")return _;_.status==="dirty"&&!o&&(o={result:_,ctx:p}),p.common.issues.length&&s.push(p.common.issues)}if(o)return t.common.issues.push(...o.ctx.common.issues),o.result;const i=s.map(f=>new I(f));return c(t,{code:d.invalid_union,unionErrors:i}),g}}get options(){return this._def.options}}ee.create=(r,e)=>new ee({options:r,typeName:m.ZodUnion,...y(e)});function he(r,e){const t=B(r),a=B(e);if(r===e)return{valid:!0,data:r};if(t===l.object&&a===l.object){const n=x.objectKeys(e),o=x.objectKeys(r).filter(i=>n.indexOf(i)!==-1),s={...r,...e};for(const i of o){const f=he(r[i],e[i]);if(!f.valid)return{valid:!1};s[i]=f.data}return{valid:!0,data:s}}else if(t===l.array&&a===l.array){if(r.length!==e.length)return{valid:!1};const n=[];for(let o=0;o<r.length;o++){const s=r[o],i=e[o],f=he(s,i);if(!f.valid)return{valid:!1};n.push(f.data)}return{valid:!0,data:n}}else return t===l.date&&a===l.date&&+r==+e?{valid:!0,data:r}:{valid:!1}}class te extends b{_parse(e){const{status:t,ctx:a}=this._processInputParams(e),n=(o,s)=>{if(Se(o)||Se(s))return g;const i=he(o.value,s.value);return i.valid?((je(o)||je(s))&&t.dirty(),{status:t.value,value:i.data}):(c(a,{code:d.invalid_intersection_types}),g)};return a.common.async?Promise.all([this._def.left._parseAsync({data:a.data,path:a.path,parent:a}),this._def.right._parseAsync({data:a.data,path:a.path,parent:a})]).then(([o,s])=>n(o,s)):n(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}}te.create=(r,e,t)=>new te({left:r,right:e,typeName:m.ZodIntersection,...y(t)});class D extends b{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==l.array)return c(a,{code:d.invalid_type,expected:l.array,received:a.parsedType}),g;if(a.data.length<this._def.items.length)return c(a,{code:d.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),g;!this._def.rest&&a.data.length>this._def.items.length&&(c(a,{code:d.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const o=[...a.data].map((s,i)=>{const f=this._def.items[i]||this._def.rest;return f?f._parse(new N(a,s,a.path,i)):null}).filter(s=>!!s);return a.common.async?Promise.all(o).then(s=>O.mergeArray(t,s)):O.mergeArray(t,o)}get items(){return this._def.items}rest(e){return new D({...this._def,rest:e})}}D.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new D({items:r,typeName:m.ZodTuple,rest:null,...y(e)})};class re extends b{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==l.object)return c(a,{code:d.invalid_type,expected:l.object,received:a.parsedType}),g;const n=[],o=this._def.keyType,s=this._def.valueType;for(const i in a.data)n.push({key:o._parse(new N(a,i,a.path,i)),value:s._parse(new N(a,a.data[i],a.path,i)),alwaysSet:i in a.data});return a.common.async?O.mergeObjectAsync(t,n):O.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,a){return t instanceof b?new re({keyType:e,valueType:t,typeName:m.ZodRecord,...y(a)}):new re({keyType:Z.create(),valueType:e,typeName:m.ZodRecord,...y(t)})}}class Ie extends b{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==l.map)return c(a,{code:d.invalid_type,expected:l.map,received:a.parsedType}),g;const n=this._def.keyType,o=this._def.valueType,s=[...a.data.entries()].map(([i,f],p)=>({key:n._parse(new N(a,i,a.path,[p,"key"])),value:o._parse(new N(a,f,a.path,[p,"value"]))}));if(a.common.async){const i=new Map;return Promise.resolve().then(async()=>{for(const f of s){const p=await f.key,_=await f.value;if(p.status==="aborted"||_.status==="aborted")return g;(p.status==="dirty"||_.status==="dirty")&&t.dirty(),i.set(p.value,_.value)}return{status:t.value,value:i}})}else{const i=new Map;for(const f of s){const p=f.key,_=f.value;if(p.status==="aborted"||_.status==="aborted")return g;(p.status==="dirty"||_.status==="dirty")&&t.dirty(),i.set(p.value,_.value)}return{status:t.value,value:i}}}}Ie.create=(r,e,t)=>new Ie({valueType:e,keyType:r,typeName:m.ZodMap,...y(t)});class Y extends b{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==l.set)return c(a,{code:d.invalid_type,expected:l.set,received:a.parsedType}),g;const n=this._def;n.minSize!==null&&a.data.size<n.minSize.value&&(c(a,{code:d.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),n.maxSize!==null&&a.data.size>n.maxSize.value&&(c(a,{code:d.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());const o=this._def.valueType;function s(f){const p=new Set;for(const _ of f){if(_.status==="aborted")return g;_.status==="dirty"&&t.dirty(),p.add(_.value)}return{status:t.value,value:p}}const i=[...a.data.values()].map((f,p)=>o._parse(new N(a,f,a.path,p)));return a.common.async?Promise.all(i).then(f=>s(f)):s(i)}min(e,t){return new Y({...this._def,minSize:{value:e,message:u.toString(t)}})}max(e,t){return new Y({...this._def,maxSize:{value:e,message:u.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}Y.create=(r,e)=>new Y({valueType:r,minSize:null,maxSize:null,typeName:m.ZodSet,...y(e)});class Ee extends b{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}Ee.create=(r,e)=>new Ee({getter:r,typeName:m.ZodLazy,...y(e)});class fe extends b{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return c(t,{received:t.data,code:d.invalid_literal,expected:this._def.value}),g}return{status:"valid",value:e.data}}get value(){return this._def.value}}fe.create=(r,e)=>new fe({value:r,typeName:m.ZodLiteral,...y(e)});function Ue(r,e){return new W({values:r,typeName:m.ZodEnum,...y(e)})}class W extends b{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),a=this._def.values;return c(t,{expected:x.joinValues(a),received:t.parsedType,code:d.invalid_type}),g}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),a=this._def.values;return c(t,{received:t.data,code:d.invalid_enum_value,options:a}),g}return R(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return W.create(e,{...this._def,...t})}exclude(e,t=this._def){return W.create(this.options.filter(a=>!e.includes(a)),{...this._def,...t})}}W.create=Ue;class Be extends b{_parse(e){const t=x.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(e);if(a.parsedType!==l.string&&a.parsedType!==l.number){const n=x.objectValues(t);return c(a,{expected:x.joinValues(n),received:a.parsedType,code:d.invalid_type}),g}if(this._cache||(this._cache=new Set(x.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const n=x.objectValues(t);return c(a,{received:a.data,code:d.invalid_enum_value,options:n}),g}return R(e.data)}get enum(){return this._def.values}}Be.create=(r,e)=>new Be({values:r,typeName:m.ZodNativeEnum,...y(e)});class ae extends b{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==l.promise&&t.common.async===!1)return c(t,{code:d.invalid_type,expected:l.promise,received:t.parsedType}),g;const a=t.parsedType===l.promise?t.data:Promise.resolve(t.data);return R(a.then(n=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}}ae.create=(r,e)=>new ae({type:r,typeName:m.ZodPromise,...y(e)});class F extends b{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===m.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:a}=this._processInputParams(e),n=this._def.effect||null,o={addIssue:s=>{c(a,s),s.fatal?t.abort():t.dirty()},get path(){return a.path}};if(o.addIssue=o.addIssue.bind(o),n.type==="preprocess"){const s=n.transform(a.data,o);if(a.common.async)return Promise.resolve(s).then(async i=>{if(t.value==="aborted")return g;const f=await this._def.schema._parseAsync({data:i,path:a.path,parent:a});return f.status==="aborted"?g:f.status==="dirty"||t.value==="dirty"?G(f.value):f});{if(t.value==="aborted")return g;const i=this._def.schema._parseSync({data:s,path:a.path,parent:a});return i.status==="aborted"?g:i.status==="dirty"||t.value==="dirty"?G(i.value):i}}if(n.type==="refinement"){const s=i=>{const f=n.refinement(i,o);if(a.common.async)return Promise.resolve(f);if(f instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return i};if(a.common.async===!1){const i=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});return i.status==="aborted"?g:(i.status==="dirty"&&t.dirty(),s(i.value),{status:t.value,value:i.value})}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(i=>i.status==="aborted"?g:(i.status==="dirty"&&t.dirty(),s(i.value).then(()=>({status:t.value,value:i.value}))))}if(n.type==="transform")if(a.common.async===!1){const s=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(!V(s))return g;const i=n.transform(s.value,o);if(i instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:i}}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(s=>V(s)?Promise.resolve(n.transform(s.value,o)).then(i=>({status:t.value,value:i})):g);x.assertNever(n)}}F.create=(r,e,t)=>new F({schema:r,typeName:m.ZodEffects,effect:e,...y(t)});F.createWithPreprocess=(r,e,t)=>new F({schema:e,effect:{type:"preprocess",transform:r},typeName:m.ZodEffects,...y(t)});class z extends b{_parse(e){return this._getType(e)===l.undefined?R(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}z.create=(r,e)=>new z({innerType:r,typeName:m.ZodOptional,...y(e)});class H extends b{_parse(e){return this._getType(e)===l.null?R(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}H.create=(r,e)=>new H({innerType:r,typeName:m.ZodNullable,...y(e)});class pe extends b{_parse(e){const{ctx:t}=this._processInputParams(e);let a=t.data;return t.parsedType===l.undefined&&(a=this._def.defaultValue()),this._def.innerType._parse({data:a,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}pe.create=(r,e)=>new pe({innerType:r,typeName:m.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...y(e)});class me extends b{_parse(e){const{ctx:t}=this._processInputParams(e),a={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:a.data,path:a.path,parent:{...a}});return Q(n)?n.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new I(a.common.issues)},input:a.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new I(a.common.issues)},input:a.data})}}removeCatch(){return this._def.innerType}}me.create=(r,e)=>new me({innerType:r,typeName:m.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...y(e)});class ze extends b{_parse(e){if(this._getType(e)!==l.nan){const a=this._getOrReturnCtx(e);return c(a,{code:d.invalid_type,expected:l.nan,received:a.parsedType}),g}return{status:"valid",value:e.data}}}ze.create=r=>new ze({typeName:m.ZodNaN,...y(r)});class Nt extends b{_parse(e){const{ctx:t}=this._processInputParams(e),a=t.data;return this._def.type._parse({data:a,path:t.path,parent:t})}unwrap(){return this._def.type}}class ke extends b{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});return o.status==="aborted"?g:o.status==="dirty"?(t.dirty(),G(o.value)):this._def.out._parseAsync({data:o.value,path:a.path,parent:a})})();{const n=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return n.status==="aborted"?g:n.status==="dirty"?(t.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:a.path,parent:a})}}static create(e,t){return new ke({in:e,out:t,typeName:m.ZodPipeline})}}class ge extends b{_parse(e){const t=this._def.innerType._parse(e),a=n=>(V(n)&&(n.value=Object.freeze(n.value)),n);return Q(t)?t.then(n=>a(n)):a(t)}unwrap(){return this._def.innerType}}ge.create=(r,e)=>new ge({innerType:r,typeName:m.ZodReadonly,...y(e)});var m;(function(r){r.ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodSymbol="ZodSymbol",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodCatch="ZodCatch",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded",r.ZodPipeline="ZodPipeline",r.ZodReadonly="ZodReadonly"})(m||(m={}));const h=Z.create,ve=U.create,Ht=ue.create;$.create;const Zt=M.create,S=C.create,be=ee.create;te.create;D.create;const _e=re.create,Gt=fe.create,We=W.create;ae.create;z.create;H.create;const It=S({minRem:ve(),maxRem:ve()}),T=It.or(h()),X=S({0:h().optional(),50:h(),100:h(),200:h(),300:h(),400:h(),500:h(),600:h(),700:h(),800:h(),900:h(),950:h(),1e3:h().optional()}),de=S({color:h().optional(),background:h().optional(),borderWidth:h().optional(),borderColor:h().optional(),boxShadow:h().optional()}),Et=S({borderRadius:T.optional(),custom:_e(h(),be([h(),ve()])).optional(),hover:de.optional(),focus:de.optional()}).and(de),Bt=S({family:h().optional()}),zt=_e(We(["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","internalLink","externalLink","liip","avatar","openChat","speechInput","listUnordered","lightMode","darkMode"]),h()),$t=S({font:Bt.optional(),colors:S({brand:X,accent:X.optional(),highlight:X,grey:X}),base:S({fontSizeXs:T.optional(),fontSizeSm:T.optional(),fontSizeBody:T.optional(),fontSizeH3:T.optional(),fontSizeH2:T.optional(),fontSizeH1:T.optional(),fontWeightNormal:h().optional(),fontWeightBold:h().optional(),fontWeightTitle:h().optional(),lineHeightDefault:h().optional(),lineHeightSnug:h().optional(),lineHeightTight:h().optional(),borderRadius:T.optional(),lineColor:h().optional(),boxShadow:h().optional()}),components:_e(h(),Et),svgs:zt}),ne=S({customCSS:h().optional(),fontCSS:h().optional(),fontURLs:h().array().optional(),tokens:$t});S({light:ne,dark:ne});const Dt=S({light:ne,dark:ne}).deepPartial(),Fe=S({50:h(),100:h(),200:h(),300:h(),400:h(),500:h(),600:h(),700:h(),800:h(),900:h(),950:h()}),He=We(["slate","gray","zinc","neutral","stone","red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"]),$e=be([Fe,He]),Lt=be([Fe.and(S({0:h(),1e3:h()})),He]),Pt=S({avatarImageUrl:h().optional(),colors:S({brand:$e.optional(),highlight:$e.optional(),grey:Lt.optional(),background:h().optional(),text:h().optional(),anchor:S({default:h().optional(),hover:h().optional()}).optional()}).optional(),font:S({family:h().optional(),urls:Zt(h()).optional(),sizeXs:T.optional(),sizeSm:T.optional(),sizeBody:T.optional(),sizeH3:T.optional(),sizeH2:T.optional(),sizeH1:T.optional(),weightNormal:h().optional(),weightBold:h().optional(),weightTitle:h().optional()}).optional(),borderRadius:T.optional(),fineGrained:Dt.optional()}),Vt=r=>r.split("/").pop().split(".")[0],Ut=Object.assign({"./default/fallback-dev.theme.ts":st,"./default/fallback.theme.ts":nt}),xe=new Map;Object.entries(Ut).forEach(([r,e])=>{const{error:t,data:a}=Pt.safeParse(e?.theme);if(t){console.error(`Invalid theme in ${r}:`,t);return}xe.set(Vt(r),a)});const qt=r=>{const e=xe.get(r);return e||(console.error(`Theme ${r} not found`),oe)};Array.from(xe.keys());export{Wt as P,Zt as a,Ht as b,Pt as c,et as d,We as e,Vt as f,Xe as g,qt as h,Ft as i,Gt as l,rt as m,ve as n,S as o,_e as r,h as s,oe as t,be as u};