@auto-ai/agent 2.1.96 → 2.1.97

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 (82) hide show
  1. package/dist/404/index.html +1 -1
  2. package/dist/404.html +1 -1
  3. package/dist/_next/static/chunks/144582c34365b4a3.js +1 -0
  4. package/dist/_next/static/chunks/28e0ccfb90ce8236.js +1 -0
  5. package/dist/_next/static/chunks/32f1e2403e2f19ad.js +1 -0
  6. package/dist/_next/static/chunks/3e9de8191bf84a21.js +1 -0
  7. package/dist/_next/static/chunks/44cc31591bdf5683.js +1 -0
  8. package/dist/_next/static/chunks/52464e6ba324e8ed.js +1 -0
  9. package/dist/_next/static/chunks/52b5f438315e1669.js +1 -0
  10. package/dist/_next/static/chunks/6209b42cbfcf288a.js +1 -0
  11. package/dist/_next/static/chunks/69c7407ef6f8340c.js +1 -0
  12. package/dist/_next/static/chunks/6fa420f0e5f24320.js +1 -0
  13. package/dist/_next/static/chunks/7cdc032fa6c9ed66.js +1 -0
  14. package/dist/_next/static/chunks/{76a71d344cc15a9f.js → 84694f69e82cbdaf.js} +1 -1
  15. package/dist/_next/static/chunks/{ee0f6e98cf7f0a96.js → 8fe28f6505d26d57.js} +1 -1
  16. package/dist/_next/static/chunks/8febd4f373e343fe.js +1 -0
  17. package/dist/_next/static/chunks/a79654d570ac30eb.js +1 -0
  18. package/dist/_next/static/chunks/{206c8733a2953f46.js → b0c54f44d770ac39.js} +1 -1
  19. package/dist/_next/static/chunks/b23f3d1216dcec54.js +1 -0
  20. package/dist/_next/static/chunks/b5241f9943854a05.js +1 -0
  21. package/dist/_next/static/chunks/bb79d02feaef9576.js +1 -0
  22. package/dist/_next/static/chunks/cc5b7f377dc3de45.css +1 -0
  23. package/dist/_next/static/chunks/cd622961f697016c.js +1 -0
  24. package/dist/_next/static/chunks/da9e5c89b442680d.js +1 -0
  25. package/dist/_next/static/chunks/dfa1d01a3980836a.js +1 -0
  26. package/dist/_next/static/chunks/e3cd46a9e9e97850.js +1 -0
  27. package/dist/_next/static/chunks/{6a750155591ba201.css → ecac6101bc7f0ad9.css} +1 -1
  28. package/dist/_next/static/chunks/{turbopack-030a42d60560a927.js → turbopack-be468c2a89b10d33.js} +1 -1
  29. package/dist/index.html +1 -1
  30. package/dist/index.txt +19 -19
  31. package/dist/manage/about/index.html +2 -2
  32. package/dist/manage/about/index.txt +35 -32
  33. package/dist/manage/add-account/basic/index.html +2 -2
  34. package/dist/manage/add-account/basic/index.txt +32 -34
  35. package/dist/manage/add-account/index.html +2 -2
  36. package/dist/manage/add-account/index.txt +33 -35
  37. package/dist/manage/add-account/prompt/index.html +2 -2
  38. package/dist/manage/add-account/prompt/index.txt +33 -35
  39. package/dist/manage/agent-teams/index.html +2 -2
  40. package/dist/manage/agent-teams/index.txt +33 -35
  41. package/dist/manage/env/index.html +2 -2
  42. package/dist/manage/env/index.txt +37 -35
  43. package/dist/manage/general/index.html +2 -2
  44. package/dist/manage/general/index.txt +35 -32
  45. package/dist/manage/index.html +1 -1
  46. package/dist/manage/index.txt +31 -28
  47. package/dist/manage/mcp/index.html +2 -2
  48. package/dist/manage/mcp/index.txt +37 -35
  49. package/dist/manage/permissions/index.html +2 -2
  50. package/dist/manage/permissions/index.txt +30 -32
  51. package/dist/manage/skills/index.html +2 -2
  52. package/dist/manage/skills/index.txt +38 -35
  53. package/dist/manage/task/index.html +2 -1
  54. package/dist/manage/task/index.txt +35 -33
  55. package/dist/manage/teams/index.html +1 -1
  56. package/dist/manage/teams/index.txt +35 -32
  57. package/dist/manage/tools/index.html +2 -2
  58. package/dist/manage/tools/index.txt +38 -35
  59. package/package.json +6 -6
  60. package/dist/_next/static/chunks/0b5fd45c6d5ed376.js +0 -1
  61. package/dist/_next/static/chunks/0c059f531456fce2.js +0 -1
  62. package/dist/_next/static/chunks/15734e910215c5c7.js +0 -1
  63. package/dist/_next/static/chunks/1f4af280db551c9d.js +0 -1
  64. package/dist/_next/static/chunks/24ad0472395a5554.js +0 -1
  65. package/dist/_next/static/chunks/2b6b9fdaaa345603.js +0 -1
  66. package/dist/_next/static/chunks/34b34d02b7d6b4cb.js +0 -1
  67. package/dist/_next/static/chunks/3740042834e8f1fa.js +0 -1
  68. package/dist/_next/static/chunks/3a17a1f5303a1c2c.js +0 -1
  69. package/dist/_next/static/chunks/4247f46093e522c6.js +0 -1
  70. package/dist/_next/static/chunks/4456351ffa1be45f.js +0 -1
  71. package/dist/_next/static/chunks/620e3011cd69dfc9.js +0 -1
  72. package/dist/_next/static/chunks/67c7406790a840c1.js +0 -1
  73. package/dist/_next/static/chunks/6831f547a9403a0f.js +0 -1
  74. package/dist/_next/static/chunks/763710bf823861a8.js +0 -1
  75. package/dist/_next/static/chunks/8d0a29ce5f05a73d.js +0 -1
  76. package/dist/_next/static/chunks/8dc694eabda7878d.js +0 -1
  77. package/dist/_next/static/chunks/c889d3f6eb8ab09e.css +0 -1
  78. package/dist/_next/static/chunks/d9726d84bd7d40ff.js +0 -1
  79. package/dist/_next/static/chunks/e4675b3a8b7605e4.js +0 -1
  80. /package/dist/_next/static/{q0is0IhxOAG7ogFx9qQFk → Y0q5wZJWOYM0DHKGzws1i}/_buildManifest.js +0 -0
  81. /package/dist/_next/static/{q0is0IhxOAG7ogFx9qQFk → Y0q5wZJWOYM0DHKGzws1i}/_clientMiddlewareManifest.json +0 -0
  82. /package/dist/_next/static/{q0is0IhxOAG7ogFx9qQFk → Y0q5wZJWOYM0DHKGzws1i}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,20783,e=>{"use strict";e.s(["composeRefs",()=>r,"useComposedRefs",()=>o]);var t=e.i(71645);function n(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function r(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return e=>{let r=!1,o=t.map(t=>{let o=n(t,e);return r||"function"!=typeof o||(r=!0),o});if(r)return()=>{for(let e=0;e<o.length;e++){let r=o[e];"function"==typeof r?r():n(t[e],null)}}}}function o(){for(var e=arguments.length,n=Array(e),o=0;o<e;o++)n[o]=arguments[o];return t.useCallback(r(...n),n)}},70152,81140,39946,70292,62351,30030,e=>{"use strict";function t(e,t){let[n,r]=t;return Math.min(r,Math.max(n,e))}function n(e,t){let{checkForDefaultPrevented:n=!0}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function r(e,t,n){if(!t.has(e))throw TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function o(e,t){var n=r(e,t,"get");return n.get?n.get.call(e):n.value}function l(e,t,n){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");t.set(e,n)}function i(e,t,n){var o=r(e,t,"set");if(o.set)o.set.call(e,n);else{if(!o.writable)throw TypeError("attempted to set read only private field");o.value=n}return n}e.s(["clamp",()=>t],70152),e.s(["composeEventHandlers",()=>n],81140),"undefined"!=typeof window&&window.document&&window.document.createElement,e.s(["_",()=>o],39946),e.s(["_",()=>l],70292),e.s(["_",()=>i],62351),e.s(["createContextScope",()=>u],30030);var a=e.i(71645),s=e.i(18050);function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[],r=()=>{let t=n.map(e=>a.createContext(e));return function(n){let r=(null==n?void 0:n[e])||t;return a.useMemo(()=>({["__scope".concat(e)]:{...n,[e]:r}}),[n,r])}};return r.scopeName=e,[function(t,r){let o=a.createContext(r),l=n.length;n=[...n,r];let i=t=>{var n;let{scope:r,children:i,...u}=t,c=(null==r||null==(n=r[e])?void 0:n[l])||o,d=a.useMemo(()=>u,Object.values(u));return(0,s.jsx)(c.Provider,{value:d,children:i})};return i.displayName=t+"Provider",[i,function(n,i){var s;let u=(null==i||null==(s=i[e])?void 0:s[l])||o,c=a.useContext(u);if(c)return c;if(void 0!==r)return r;throw Error("`".concat(n,"` must be used within `").concat(t,"`"))}]},function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];let r=t[0];if(1===t.length)return r;let o=()=>{let e=t.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(t){let n=e.reduce((e,n)=>{let{useScope:r,scopeName:o}=n,l=r(t)["__scope".concat(o)];return{...e,...l}},{});return a.useMemo(()=>({["__scope".concat(r.scopeName)]:n}),[n])}};return o.scopeName=r.scopeName,o}(r,...t)]}},67489,e=>{"use strict";e.s(["Select",()=>t6,"SelectContent",()=>t8,"SelectItem",()=>t4,"SelectTrigger",()=>t9,"SelectValue",()=>t7],67489);var t,n,r,o,l,i=e.i(18050),a=e.i(71645),s=e.i(74080),u=e.i(70152),c=e.i(81140),d=e.i(39946),f=e.i(70292),p=e.i(62351),v=e.i(30030),h=e.i(20783);function m(e){let t=function(e){let t=a.forwardRef((e,t)=>{let{children:n,...r}=e;if(a.isValidElement(n)){var o,l,i;let e,s,u=(s=(e=null==(l=Object.getOwnPropertyDescriptor((o=n).props,"ref"))?void 0:l.get)&&"isReactWarning"in e&&e.isReactWarning)?o.ref:(s=(e=null==(i=Object.getOwnPropertyDescriptor(o,"ref"))?void 0:i.get)&&"isReactWarning"in e&&e.isReactWarning)?o.props.ref:o.props.ref||o.ref,c=function(e,t){let n={...t};for(let r in t){let o=e[r],l=t[r];/^on[A-Z]/.test(r)?o&&l?n[r]=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];let r=l(...t);return o(...t),r}:o&&(n[r]=o):"style"===r?n[r]={...o,...l}:"className"===r&&(n[r]=[o,l].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==a.Fragment&&(c.ref=t?(0,h.composeRefs)(t,u):u),a.cloneElement(n,c)}return a.Children.count(n)>1?a.Children.only(null):null});return t.displayName="".concat(e,".SlotClone"),t}(e),n=a.forwardRef((e,n)=>{let{children:r,...o}=e,l=a.Children.toArray(r),s=l.find(y);if(s){let e=s.props.children,r=l.map(t=>t!==s?t:a.Children.count(e)>1?a.Children.only(null):a.isValidElement(e)?e.props.children:null);return(0,i.jsx)(t,{...o,ref:n,children:a.isValidElement(e)?a.cloneElement(e,void 0,r):null})}return(0,i.jsx)(t,{...o,ref:n,children:r})});return n.displayName="".concat(e,".Slot"),n}var g=Symbol("radix.slottable");function y(e){return a.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===g}var w=new WeakMap;function b(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);let n=function(e,t){let n=e.length,r=x(t),o=r>=0?r:n+r;return o<0||o>=n?-1:o}(e,t);return -1===n?void 0:e[n]}function x(e){return e!=e||0===e?0:Math.trunc(e)}n=new WeakMap,class e extends Map{set(e,t){return w.get(this)&&(this.has(e)?(0,d._)(this,n)[(0,d._)(this,n).indexOf(e)]=e:(0,d._)(this,n).push(e)),super.set(e,t),this}insert(e,t,r){let o,l=this.has(t),i=(0,d._)(this,n).length,a=x(e),s=a>=0?a:i+a,u=s<0||s>=i?-1:s;if(u===this.size||l&&u===this.size-1||-1===u)return this.set(t,r),this;let c=this.size+ +!l;a<0&&s++;let f=[...(0,d._)(this,n)],p=!1;for(let e=s;e<c;e++)if(s===e){let n=f[e];f[e]===t&&(n=f[e+1]),l&&this.delete(t),o=this.get(n),this.set(t,r)}else{p||f[e-1]!==t||(p=!0);let n=f[p?e:e-1],r=o;o=this.get(n),this.delete(n),this.set(n,r)}return this}with(t,n,r){let o=new e(this);return o.insert(t,n,r),o}before(e){let t=(0,d._)(this,n).indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,r){let o=(0,d._)(this,n).indexOf(e);return -1===o?this:this.insert(o,t,r)}after(e){let t=(0,d._)(this,n).indexOf(e);if(-1!==(t=-1===t||t===this.size-1?-1:t+1))return this.entryAt(t)}setAfter(e,t,r){let o=(0,d._)(this,n).indexOf(e);return -1===o?this:this.insert(o+1,t,r)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return(0,p._)(this,n,[]),super.clear()}delete(e){let t=super.delete(e);return t&&(0,d._)(this,n).splice((0,d._)(this,n).indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return void 0!==t&&this.delete(t)}at(e){let t=b((0,d._)(this,n),e);if(void 0!==t)return this.get(t)}entryAt(e){let t=b((0,d._)(this,n),e);if(void 0!==t)return[t,this.get(t)]}indexOf(e){return(0,d._)(this,n).indexOf(e)}keyAt(e){return b((0,d._)(this,n),e)}from(e,t){let n=this.indexOf(e);if(-1===n)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let n=this.indexOf(e);if(-1===n)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return r;n++}}findIndex(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return n;n++}return -1}filter(t,n){let r=[],o=0;for(let e of this)Reflect.apply(t,n,[e,o,this])&&r.push(e),o++;return new e(r)}map(t,n){let r=[],o=0;for(let e of this)r.push([e[0],Reflect.apply(t,n,[e,o,this])]),o++;return new e(r)}reduce(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];let[r,o]=t,l=0,i=null!=o?o:this.at(0);for(let e of this)i=0===l&&1===t.length?e:Reflect.apply(r,this,[i,e,l,this]),l++;return i}reduceRight(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];let[r,o]=t,l=null!=o?o:this.at(-1);for(let e=this.size-1;e>=0;e--){let n=this.at(e);l=e===this.size-1&&1===t.length?n:Reflect.apply(r,this,[l,n,e,this])}return l}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let n=this.keyAt(e),r=this.get(n);t.set(n,r)}return t}toSpliced(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];let o=[...this.entries()];return o.splice(...n),new e(o)}slice(t,n){let r=new e,o=this.size-1;if(void 0===t)return r;t<0&&(t+=this.size),void 0!==n&&n>0&&(o=n-1);for(let e=t;e<=o;e++){let t=this.keyAt(e),n=this.get(t);r.set(t,n)}return r}every(e,t){let n=0;for(let r of this){if(!Reflect.apply(e,t,[r,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return!0;n++}return!1}constructor(e){super(e),(0,f._)(this,n,{writable:!0,value:void 0}),(0,p._)(this,n,[...super.keys()]),w.set(this,!0)}};var E=a.createContext(void 0),C=Symbol("radix.slottable");function S(e){return a.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===C}var R=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let n=function(e){let t=function(e){let t=a.forwardRef((e,t)=>{let{children:n,...r}=e;if(a.isValidElement(n)){var o,l,i;let e,s,u=(s=(e=null==(l=Object.getOwnPropertyDescriptor((o=n).props,"ref"))?void 0:l.get)&&"isReactWarning"in e&&e.isReactWarning)?o.ref:(s=(e=null==(i=Object.getOwnPropertyDescriptor(o,"ref"))?void 0:i.get)&&"isReactWarning"in e&&e.isReactWarning)?o.props.ref:o.props.ref||o.ref,c=function(e,t){let n={...t};for(let r in t){let o=e[r],l=t[r];/^on[A-Z]/.test(r)?o&&l?n[r]=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];let r=l(...t);return o(...t),r}:o&&(n[r]=o):"style"===r?n[r]={...o,...l}:"className"===r&&(n[r]=[o,l].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==a.Fragment&&(c.ref=t?(0,h.composeRefs)(t,u):u),a.cloneElement(n,c)}return a.Children.count(n)>1?a.Children.only(null):null});return t.displayName="".concat(e,".SlotClone"),t}(e),n=a.forwardRef((e,n)=>{let{children:r,...o}=e,l=a.Children.toArray(r),s=l.find(S);if(s){let e=s.props.children,r=l.map(t=>t!==s?t:a.Children.count(e)>1?a.Children.only(null):a.isValidElement(e)?e.props.children:null);return(0,i.jsx)(t,{...o,ref:n,children:a.isValidElement(e)?a.cloneElement(e,void 0,r):null})}return(0,i.jsx)(t,{...o,ref:n,children:r})});return n.displayName="".concat(e,".Slot"),n}("Primitive.".concat(t)),r=a.forwardRef((e,r)=>{let{asChild:o,...l}=e;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,i.jsx)(o?n:t,{...l,ref:r})});return r.displayName="Primitive.".concat(t),{...e,[t]:r}},{});function j(e){let t=a.useRef(e);return a.useEffect(()=>{t.current=e}),a.useMemo(()=>function(){for(var e,n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];return null==(e=t.current)?void 0:e.call(t,...r)},[])}var A="dismissableLayer.update",N=a.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),P=a.forwardRef((e,t)=>{var n,o;let{disableOutsidePointerEvents:l=!1,onEscapeKeyDown:s,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,...v}=e,m=a.useContext(N),[g,y]=a.useState(null),w=null!=(o=null==g?void 0:g.ownerDocument)?o:null==(n=globalThis)?void 0:n.document,[,b]=a.useState({}),x=(0,h.useComposedRefs)(t,e=>y(e)),E=Array.from(m.layers),[C]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),S=E.indexOf(C),P=g?E.indexOf(g):-1,O=m.layersWithOutsidePointerEventsDisabled.size>0,M=P>=S,L=function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null==(t=globalThis)?void 0:t.document,r=j(e),o=a.useRef(!1),l=a.useRef(()=>{});return a.useEffect(()=>{let e=e=>{if(e.target&&!o.current){let t=function(){T("dismissableLayer.pointerDownOutside",r,o,{discrete:!0})},o={originalEvent:e};"touch"===e.pointerType?(n.removeEventListener("click",l.current),l.current=t,n.addEventListener("click",l.current,{once:!0})):t()}else n.removeEventListener("click",l.current);o.current=!1},t=window.setTimeout(()=>{n.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(t),n.removeEventListener("pointerdown",e),n.removeEventListener("click",l.current)}},[n,r]),{onPointerDownCapture:()=>o.current=!0}}(e=>{let t=e.target,n=[...m.branches].some(e=>e.contains(t));M&&!n&&(null==u||u(e),null==f||f(e),e.defaultPrevented||null==p||p())},w),_=function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null==(t=globalThis)?void 0:t.document,r=j(e),o=a.useRef(!1);return a.useEffect(()=>{let e=e=>{e.target&&!o.current&&T("dismissableLayer.focusOutside",r,{originalEvent:e},{discrete:!1})};return n.addEventListener("focusin",e),()=>n.removeEventListener("focusin",e)},[n,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}(e=>{let t=e.target;![...m.branches].some(e=>e.contains(t))&&(null==d||d(e),null==f||f(e),e.defaultPrevented||null==p||p())},w);return!function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null==(t=globalThis)?void 0:t.document,r=j(e);a.useEffect(()=>{let e=e=>{"Escape"===e.key&&r(e)};return n.addEventListener("keydown",e,{capture:!0}),()=>n.removeEventListener("keydown",e,{capture:!0})},[r,n])}(e=>{P===m.layers.size-1&&(null==s||s(e),!e.defaultPrevented&&p&&(e.preventDefault(),p()))},w),a.useEffect(()=>{if(g)return l&&(0===m.layersWithOutsidePointerEventsDisabled.size&&(r=w.body.style.pointerEvents,w.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(g)),m.layers.add(g),k(),()=>{l&&1===m.layersWithOutsidePointerEventsDisabled.size&&(w.body.style.pointerEvents=r)}},[g,w,l,m]),a.useEffect(()=>()=>{g&&(m.layers.delete(g),m.layersWithOutsidePointerEventsDisabled.delete(g),k())},[g,m]),a.useEffect(()=>{let e=()=>b({});return document.addEventListener(A,e),()=>document.removeEventListener(A,e)},[]),(0,i.jsx)(R.div,{...v,ref:x,style:{pointerEvents:O?M?"auto":"none":void 0,...e.style},onFocusCapture:(0,c.composeEventHandlers)(e.onFocusCapture,_.onFocusCapture),onBlurCapture:(0,c.composeEventHandlers)(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:(0,c.composeEventHandlers)(e.onPointerDownCapture,L.onPointerDownCapture)})});function k(){let e=new CustomEvent(A);document.dispatchEvent(e)}function T(e,t,n,r){let{discrete:o}=r,l=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});if(t&&l.addEventListener(e,t,{once:!0}),o)l&&s.flushSync(()=>l.dispatchEvent(i));else l.dispatchEvent(i)}P.displayName="DismissableLayer",a.forwardRef((e,t)=>{let n=a.useContext(N),r=a.useRef(null),o=(0,h.useComposedRefs)(t,r);return a.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,i.jsx)(R.div,{...e,ref:o})}).displayName="DismissableLayerBranch";var O=0;function M(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var L="focusScope.autoFocusOnMount",_="focusScope.autoFocusOnUnmount",I={bubbles:!1,cancelable:!0},D=a.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:l,...s}=e,[u,c]=a.useState(null),d=j(o),f=j(l),p=a.useRef(null),v=(0,h.useComposedRefs)(t,e=>c(e)),m=a.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;a.useEffect(()=>{if(r){let e=function(e){if(m.paused||!u)return;let t=e.target;u.contains(t)?p.current=t:z(p.current,{select:!0})},t=function(e){if(m.paused||!u)return;let t=e.relatedTarget;null!==t&&(u.contains(t)||z(p.current,{select:!0}))};document.addEventListener("focusin",e),document.addEventListener("focusout",t);let n=new MutationObserver(function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&z(u)});return u&&n.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),n.disconnect()}}},[r,u,m.paused]),a.useEffect(()=>{if(u){B.add(m);let e=document.activeElement;if(!u.contains(e)){let t=new CustomEvent(L,I);u.addEventListener(L,d),u.dispatchEvent(t),t.defaultPrevented||(function(e){let{select:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=document.activeElement;for(let r of e)if(z(r,{select:t}),document.activeElement!==n)return}(H(u).filter(e=>"A"!==e.tagName),{select:!0}),document.activeElement===e&&z(u))}return()=>{u.removeEventListener(L,d),setTimeout(()=>{let t=new CustomEvent(_,I);u.addEventListener(_,f),u.dispatchEvent(t),t.defaultPrevented||z(null!=e?e:document.body,{select:!0}),u.removeEventListener(_,f),B.remove(m)},0)}}},[u,d,f,m]);let g=a.useCallback(e=>{if(!n&&!r||m.paused)return;let t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){let t=e.currentTarget,[r,l]=function(e){let t=H(e);return[W(t,e),W(t.reverse(),e)]}(t);r&&l?e.shiftKey||o!==l?e.shiftKey&&o===r&&(e.preventDefault(),n&&z(l,{select:!0})):(e.preventDefault(),n&&z(r,{select:!0})):o===t&&e.preventDefault()}},[n,r,m.paused]);return(0,i.jsx)(R.div,{tabIndex:-1,...s,ref:v,onKeyDown:g})});function H(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function W(e,t){for(let n of e)if(!function(e,t){let{upTo:n}=t;if("hidden"===getComputedStyle(e).visibility)return!0;for(;e&&(void 0===n||e!==n);){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}(n,{upTo:t}))return n}function z(e){let{select:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e&&e.focus){var n;let r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&(n=e)instanceof HTMLInputElement&&"select"in n&&t&&e.select()}}D.displayName="FocusScope";var B=function(){let e=[];return{add(t){let n=e[0];t!==n&&(null==n||n.pause()),(e=F(e,t)).unshift(t)},remove(t){var n;null==(n=(e=F(e,t))[0])||n.resume()}}}();function F(e,t){let n=[...e],r=n.indexOf(t);return -1!==r&&n.splice(r,1),n}var V=(null==(o=globalThis)?void 0:o.document)?a.useLayoutEffect:()=>{},K=a[" useId ".trim().toString()]||(()=>void 0),U=0;function Y(e){let[t,n]=a.useState(K());return V(()=>{e||n(e=>null!=e?e:String(U++))},[e]),e||(t?"radix-".concat(t):"")}var X=e.i(58950),Z=e.i(53760),q=a.forwardRef((e,t)=>{let{children:n,width:r=10,height:o=5,...l}=e;return(0,i.jsx)(R.svg,{...l,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:(0,i.jsx)("polygon",{points:"0,0 30,0 15,10"})})});q.displayName="Arrow";var G="Popper",[J,Q]=(0,v.createContextScope)(G),[$,ee]=J(G),et=e=>{let{__scopePopper:t,children:n}=e,[r,o]=a.useState(null);return(0,i.jsx)($,{scope:t,anchor:r,onAnchorChange:o,children:n})};et.displayName=G;var en="PopperAnchor",er=a.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...o}=e,l=ee(en,n),s=a.useRef(null),u=(0,h.useComposedRefs)(t,s),c=a.useRef(null);return a.useEffect(()=>{let e=c.current;c.current=(null==r?void 0:r.current)||s.current,e!==c.current&&l.onAnchorChange(c.current)}),r?null:(0,i.jsx)(R.div,{...o,ref:u})});er.displayName=en;var eo="PopperContent",[el,ei]=J(eo),ea=a.forwardRef((e,t)=>{var n,r,o,l,s,u,c,d;let{__scopePopper:f,side:p="bottom",sideOffset:v=0,align:m="center",alignOffset:g=0,arrowPadding:y=0,avoidCollisions:w=!0,collisionBoundary:b=[],collisionPadding:x=0,sticky:E="partial",hideWhenDetached:C=!1,updatePositionStrategy:S="optimized",onPlaced:A,...N}=e,P=ee(eo,f),[k,T]=a.useState(null),O=(0,h.useComposedRefs)(t,e=>T(e)),[M,L]=a.useState(null),_=function(e){let[t,n]=a.useState(void 0);return V(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{let r,o;if(!Array.isArray(t)||!t.length)return;let l=t[0];if("borderBoxSize"in l){let e=l.borderBoxSize,t=Array.isArray(e)?e[0]:e;r=t.inlineSize,o=t.blockSize}else r=e.offsetWidth,o=e.offsetHeight;n({width:r,height:o})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)},[e]),t}(M),I=null!=(c=null==_?void 0:_.width)?c:0,D=null!=(d=null==_?void 0:_.height)?d:0,H="number"==typeof x?x:{top:0,right:0,bottom:0,left:0,...x},W=Array.isArray(b)?b:[b],z=W.length>0,B={padding:H,boundary:W.filter(ed),altBoundary:z},{refs:F,floatingStyles:K,placement:U,isPositioned:Y,middlewareData:q}=(0,X.useFloating)({strategy:"fixed",placement:p+("center"!==m?"-"+m:""),whileElementsMounted:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,Z.autoUpdate)(...t,{animationFrame:"always"===S})},elements:{reference:P.anchor},middleware:[(0,X.offset)({mainAxis:v+D,alignmentAxis:g}),w&&(0,X.shift)({mainAxis:!0,crossAxis:!1,limiter:"partial"===E?(0,X.limitShift)():void 0,...B}),w&&(0,X.flip)({...B}),(0,X.size)({...B,apply:e=>{let{elements:t,rects:n,availableWidth:r,availableHeight:o}=e,{width:l,height:i}=n.reference,a=t.floating.style;a.setProperty("--radix-popper-available-width","".concat(r,"px")),a.setProperty("--radix-popper-available-height","".concat(o,"px")),a.setProperty("--radix-popper-anchor-width","".concat(l,"px")),a.setProperty("--radix-popper-anchor-height","".concat(i,"px"))}}),M&&(0,X.arrow)({element:M,padding:y}),ef({arrowWidth:I,arrowHeight:D}),C&&(0,X.hide)({strategy:"referenceHidden",...B})]}),[G,J]=ep(U),Q=j(A);V(()=>{Y&&(null==Q||Q())},[Y,Q]);let $=null==(n=q.arrow)?void 0:n.x,et=null==(r=q.arrow)?void 0:r.y,en=(null==(o=q.arrow)?void 0:o.centerOffset)!==0,[er,ei]=a.useState();return V(()=>{k&&ei(window.getComputedStyle(k).zIndex)},[k]),(0,i.jsx)("div",{ref:F.setFloating,"data-radix-popper-content-wrapper":"",style:{...K,transform:Y?K.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:er,"--radix-popper-transform-origin":[null==(l=q.transformOrigin)?void 0:l.x,null==(s=q.transformOrigin)?void 0:s.y].join(" "),...(null==(u=q.hide)?void 0:u.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,i.jsx)(el,{scope:f,placedSide:G,onArrowChange:L,arrowX:$,arrowY:et,shouldHideArrow:en,children:(0,i.jsx)(R.div,{"data-side":G,"data-align":J,...N,ref:O,style:{...N.style,animation:Y?void 0:"none"}})})})});ea.displayName=eo;var es="PopperArrow",eu={top:"bottom",right:"left",bottom:"top",left:"right"},ec=a.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,o=ei(es,n),l=eu[o.placedSide];return(0,i.jsx)("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:(0,i.jsx)(q,{...r,ref:t,style:{...r.style,display:"block"}})})});function ed(e){return null!==e}ec.displayName=es;var ef=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,l,i;let{placement:a,rects:s,middlewareData:u}=t,c=(null==(n=u.arrow)?void 0:n.centerOffset)!==0,d=c?0:e.arrowWidth,f=c?0:e.arrowHeight,[p,v]=ep(a),h={start:"0%",center:"50%",end:"100%"}[v],m=(null!=(l=null==(r=u.arrow)?void 0:r.x)?l:0)+d/2,g=(null!=(i=null==(o=u.arrow)?void 0:o.y)?i:0)+f/2,y="",w="";return"bottom"===p?(y=c?h:"".concat(m,"px"),w="".concat(-f,"px")):"top"===p?(y=c?h:"".concat(m,"px"),w="".concat(s.floating.height+f,"px")):"right"===p?(y="".concat(-f,"px"),w=c?h:"".concat(g,"px")):"left"===p&&(y="".concat(s.floating.width+f,"px"),w=c?h:"".concat(g,"px")),{data:{x:y,y:w}}}});function ep(e){let[t,n="center"]=e.split("-");return[t,n]}var ev=a.forwardRef((e,t)=>{var n,r;let{container:o,...l}=e,[u,c]=a.useState(!1);V(()=>c(!0),[]);let d=o||u&&(null==(r=globalThis)||null==(n=r.document)?void 0:n.body);return d?s.default.createPortal((0,i.jsx)(R.div,{...l,ref:t}),d):null});ev.displayName="Portal";var eh=Symbol("radix.slottable");function em(e){return a.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===eh}a[" useEffectEvent ".trim().toString()],a[" useInsertionEffect ".trim().toString()];var eg=a[" useInsertionEffect ".trim().toString()]||V;function ey(e){let{prop:t,defaultProp:n,onChange:r=()=>{},caller:o}=e,[l,i,s]=function(e){let{defaultProp:t,onChange:n}=e,[r,o]=a.useState(t),l=a.useRef(r),i=a.useRef(n);return eg(()=>{i.current=n},[n]),a.useEffect(()=>{if(l.current!==r){var e;null==(e=i.current)||e.call(i,r),l.current=r}},[r,l]),[r,o,i]}({defaultProp:n,onChange:r}),u=void 0!==t,c=u?t:l;{let e=a.useRef(void 0!==t);a.useEffect(()=>{let t=e.current;if(t!==u){let e=u?"controlled":"uncontrolled";console.warn("".concat(o," is changing from ").concat(t?"controlled":"uncontrolled"," to ").concat(e,". Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component."))}e.current=u},[u,o])}return[c,a.useCallback(e=>{if(u){let r="function"==typeof e?e(t):e;if(r!==t){var n;null==(n=s.current)||n.call(s,r)}}else i(e)},[u,t,i,s])]}Symbol("RADIX:SYNC_STATE");var ew=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"});a.forwardRef((e,t)=>(0,i.jsx)(R.span,{...e,ref:t,style:{...ew,...e.style}})).displayName="VisuallyHidden";var eb=new WeakMap,ex=new WeakMap,eE={},eC=0,eS=function(e){return e&&(e.host||eS(e.parentNode))},eR=function(e,t,n,r){var o=(Array.isArray(e)?e:[e]).map(function(e){if(t.contains(e))return e;var n=eS(e);return n&&t.contains(n)?n:(console.error("aria-hidden",e,"in not contained inside",t,". Doing nothing"),null)}).filter(function(e){return!!e});eE[n]||(eE[n]=new WeakMap);var l=eE[n],i=[],a=new Set,s=new Set(o),u=function(e){!e||a.has(e)||(a.add(e),u(e.parentNode))};o.forEach(u);var c=function(e){!e||s.has(e)||Array.prototype.forEach.call(e.children,function(e){if(a.has(e))c(e);else try{var t=e.getAttribute(r),o=null!==t&&"false"!==t,s=(eb.get(e)||0)+1,u=(l.get(e)||0)+1;eb.set(e,s),l.set(e,u),i.push(e),1===s&&o&&ex.set(e,!0),1===u&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return c(t),a.clear(),eC++,function(){i.forEach(function(e){var t=eb.get(e)-1,o=l.get(e)-1;eb.set(e,t),l.set(e,o),t||(ex.has(e)||e.removeAttribute(r),ex.delete(e)),o||e.removeAttribute(n)}),--eC||(eb=new WeakMap,eb=new WeakMap,ex=new WeakMap,eE={})}},ej=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||("undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),eR(r,o,n,"aria-hidden")):function(){return null}},eA=function(){return(eA=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function eN(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}Object.create;Object.create;var eP=("function"==typeof SuppressedError&&SuppressedError,"right-scroll-bar-position"),ek="width-before-scroll-bar";function eT(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var eO="undefined"!=typeof window?a.useLayoutEffect:a.useEffect,eM=new WeakMap;function eL(e){return e}var e_=function(e){void 0===e&&(e={});var t,n,r,o=(void 0===t&&(t=eL),n=[],r=!1,{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:null},useMedium:function(e){var o=t(e,r);return n.push(o),function(){n=n.filter(function(e){return e!==o})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var o=n;n=[],o.forEach(e),t=n}var l=function(){var n=t;t=[],n.forEach(e)},i=function(){return Promise.resolve().then(l)};i(),n={push:function(e){t.push(e),i()},filter:function(e){return t=t.filter(e),n}}}});return o.options=eA({async:!0,ssr:!1},e),o}(),eI=function(){},eD=a.forwardRef(function(e,t){var n,r,o,l,i=a.useRef(null),s=a.useState({onScrollCapture:eI,onWheelCapture:eI,onTouchMoveCapture:eI}),u=s[0],c=s[1],d=e.forwardProps,f=e.children,p=e.className,v=e.removeScrollBar,h=e.enabled,m=e.shards,g=e.sideCar,y=e.noRelative,w=e.noIsolation,b=e.inert,x=e.allowPinchZoom,E=e.as,C=e.gapMode,S=eN(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),R=(n=[i,t],r=function(e){return n.forEach(function(t){return eT(t,e)})},(o=(0,a.useState)(function(){return{value:null,callback:r,facade:{get current(){return o.value},set current(value){var e=o.value;e!==value&&(o.value=value,o.callback(value,e))}}}})[0]).callback=r,l=o.facade,eO(function(){var e=eM.get(l);if(e){var t=new Set(e),r=new Set(n),o=l.current;t.forEach(function(e){r.has(e)||eT(e,null)}),r.forEach(function(e){t.has(e)||eT(e,o)})}eM.set(l,n)},[n]),l),j=eA(eA({},S),u);return a.createElement(a.Fragment,null,h&&a.createElement(g,{sideCar:e_,removeScrollBar:v,shards:m,noRelative:y,noIsolation:w,inert:b,setCallbacks:c,allowPinchZoom:!!x,lockRef:i,gapMode:C}),d?a.cloneElement(a.Children.only(f),eA(eA({},j),{ref:R})):a.createElement(void 0===E?"div":E,eA({},j,{className:p,ref:R}),f))});eD.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},eD.classNames={fullWidth:ek,zeroRight:eP};var eH=function(e){var t=e.sideCar,n=eN(e,["sideCar"]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error("Sidecar medium not found");return a.createElement(r,eA({},n))};eH.isSideCarExport=!0;var eW=function(){var e=0,t=null;return{add:function(n){if(0==e&&(t=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=l||("undefined"!=typeof __webpack_nonce__?__webpack_nonce__:void 0);return t&&e.setAttribute("nonce",t),e}())){var r,o;(r=t).styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),o=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(o)}e++},remove:function(){--e||!t||(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ez=function(){var e=eW();return function(t,n){a.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},eB=function(){var e=ez();return function(t){return e(t.styles,t.dynamic),null}},eF={left:0,top:0,right:0,gap:0},eV=function(e){return parseInt(e||"",10)||0},eK=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[eV(n),eV(r),eV(o)]},eU=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return eF;var t=eK(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},eY=eB(),eX="data-scroll-locked",eZ=function(e,t,n,r){var o=e.left,l=e.top,i=e.right,a=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(a,"px ").concat(r,";\n }\n body[").concat(eX,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(l,"px;\n padding-right: ").concat(i,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(a,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(eP," {\n right: ").concat(a,"px ").concat(r,";\n }\n \n .").concat(ek," {\n margin-right: ").concat(a,"px ").concat(r,";\n }\n \n .").concat(eP," .").concat(eP," {\n right: 0 ").concat(r,";\n }\n \n .").concat(ek," .").concat(ek," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(eX,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(a,"px;\n }\n")},eq=function(){var e=parseInt(document.body.getAttribute(eX)||"0",10);return isFinite(e)?e:0},eG=function(){a.useEffect(function(){return document.body.setAttribute(eX,(eq()+1).toString()),function(){var e=eq()-1;e<=0?document.body.removeAttribute(eX):document.body.setAttribute(eX,e.toString())}},[])},eJ=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=void 0===r?"margin":r;eG();var l=a.useMemo(function(){return eU(o)},[o]);return a.createElement(eY,{styles:eZ(l,!t,o,n?"":"!important")})},eQ=!1;if("undefined"!=typeof window)try{var e$=Object.defineProperty({},"passive",{get:function(){return eQ=!0,!0}});window.addEventListener("test",e$,e$),window.removeEventListener("test",e$,e$)}catch(e){eQ=!1}var e0=!!eQ&&{passive:!1},e1=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&(n.overflowY!==n.overflowX||"TEXTAREA"===e.tagName||"visible"!==n[t])},e2=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),e5(e,r)){var o=e3(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body)return!1},e5=function(e,t){return"v"===e?e1(t,"overflowY"):e1(t,"overflowX")},e3=function(e,t){return"v"===e?[t.scrollTop,t.scrollHeight,t.clientHeight]:[t.scrollLeft,t.scrollWidth,t.clientWidth]},e6=function(e,t,n,r,o){var l,i=(l=window.getComputedStyle(t).direction,"h"===e&&"rtl"===l?-1:1),a=i*r,s=n.target,u=t.contains(s),c=!1,d=a>0,f=0,p=0;do{if(!s)break;var v=e3(e,s),h=v[0],m=v[1]-v[2]-i*h;(h||m)&&e5(e,s)&&(f+=m,p+=h);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!u&&s!==document.body||u&&(t.contains(s)||t===s))return d&&(o&&1>Math.abs(f)||!o&&a>f)?c=!0:!d&&(o&&1>Math.abs(p)||!o&&-a>p)&&(c=!0),c},e7=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},e9=function(e){return[e.deltaX,e.deltaY]},e8=function(e){return e&&"current"in e?e.current:e},e4=0,te=[];let tt=(t=function(e){var t=a.useRef([]),n=a.useRef([0,0]),r=a.useRef(),o=a.useState(e4++)[0],l=a.useState(eB)[0],i=a.useRef(e);a.useEffect(function(){i.current=e},[e]),a.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=(function(e,t,n){if(n||2==arguments.length)for(var r,o=0,l=t.length;o<l;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))})([e.lockRef.current],(e.shards||[]).map(e8),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=a.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var o,l=e7(e),a=n.current,s="deltaX"in e?e.deltaX:a[0]-l[0],u="deltaY"in e?e.deltaY:a[1]-l[1],c=e.target,d=Math.abs(s)>Math.abs(u)?"h":"v";if("touches"in e&&"h"===d&&"range"===c.type)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===c||p.contains(c)))return!1;var v=e2(d,c);if(!v)return!0;if(v?o=d:(o="v"===d?"h":"v",v=e2(d,c)),!v)return!1;if(!r.current&&"changedTouches"in e&&(s||u)&&(r.current=o),!o)return!0;var h=r.current||o;return e6(h,t,e,"h"===h?s:u,!0)},[]),u=a.useCallback(function(e){if(te.length&&te[te.length-1]===l){var n="deltaY"in e?e9(e):e7(e),r=t.current.filter(function(t){var r;return t.name===e.type&&(t.target===e.target||e.target===t.shadowParent)&&(r=t.delta,r[0]===n[0]&&r[1]===n[1])})[0];if(r&&r.should){e.cancelable&&e.preventDefault();return}if(!r){var o=(i.current.shards||[]).map(e8).filter(Boolean).filter(function(t){return t.contains(e.target)});(o.length>0?s(e,o[0]):!i.current.noIsolation)&&e.cancelable&&e.preventDefault()}}},[]),c=a.useCallback(function(e,n,r,o){var l={name:e,delta:n,target:r,should:o,shadowParent:function(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}(r)};t.current.push(l),setTimeout(function(){t.current=t.current.filter(function(e){return e!==l})},1)},[]),d=a.useCallback(function(e){n.current=e7(e),r.current=void 0},[]),f=a.useCallback(function(t){c(t.type,e9(t),t.target,s(t,e.lockRef.current))},[]),p=a.useCallback(function(t){c(t.type,e7(t),t.target,s(t,e.lockRef.current))},[]);a.useEffect(function(){return te.push(l),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",u,e0),document.addEventListener("touchmove",u,e0),document.addEventListener("touchstart",d,e0),function(){te=te.filter(function(e){return e!==l}),document.removeEventListener("wheel",u,e0),document.removeEventListener("touchmove",u,e0),document.removeEventListener("touchstart",d,e0)}},[]);var v=e.removeScrollBar,h=e.inert;return a.createElement(a.Fragment,null,h?a.createElement(l,{styles:"\n .block-interactivity-".concat(o," {pointer-events: none;}\n .allow-interactivity-").concat(o," {pointer-events: all;}\n")}):null,v?a.createElement(eJ,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},e_.useMedium(t),eH);var tn=a.forwardRef(function(e,t){return a.createElement(eD,eA({},e,{ref:t,sideCar:tt}))});tn.classNames=eD.classNames;var tr=[" ","Enter","ArrowUp","ArrowDown"],to=[" ","Enter"],tl="Select",[ti,ta,ts]=function(e){let t=e+"CollectionProvider",[n,r]=(0,v.createContextScope)(t),[o,l]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=e=>{let{scope:t,children:n}=e,r=a.default.useRef(null),l=a.default.useRef(new Map).current;return(0,i.jsx)(o,{scope:t,itemMap:l,collectionRef:r,children:n})};s.displayName=t;let u=e+"CollectionSlot",c=m(u),d=a.default.forwardRef((e,t)=>{let{scope:n,children:r}=e,o=l(u,n),a=(0,h.useComposedRefs)(t,o.collectionRef);return(0,i.jsx)(c,{ref:a,children:r})});d.displayName=u;let f=e+"CollectionItemSlot",p="data-radix-collection-item",g=m(f),y=a.default.forwardRef((e,t)=>{let{scope:n,children:r,...o}=e,s=a.default.useRef(null),u=(0,h.useComposedRefs)(t,s),c=l(f,n);return a.default.useEffect(()=>(c.itemMap.set(s,{ref:s,...o}),()=>void c.itemMap.delete(s))),(0,i.jsx)(g,{...{[p]:""},ref:u,children:r})});return y.displayName=f,[{Provider:s,Slot:d,ItemSlot:y},function(t){let n=l(e+"CollectionConsumer",t);return a.default.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll("[".concat(p,"]")));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])},r]}(tl),[tu,tc]=(0,v.createContextScope)(tl,[ts,Q]),td=Q(),[tf,tp]=tu(tl),[tv,th]=tu(tl),tm=e=>{let{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:l,value:s,defaultValue:u,onValueChange:c,dir:d,name:f,autoComplete:p,disabled:v,required:h,form:m}=e,g=td(t),[y,w]=a.useState(null),[b,x]=a.useState(null),[C,S]=a.useState(!1),R=function(e){let t=a.useContext(E);return e||t||"ltr"}(d),[j,A]=ey({prop:r,defaultProp:null!=o&&o,onChange:l,caller:tl}),[N,P]=ey({prop:s,defaultProp:u,onChange:c,caller:tl}),k=a.useRef(null),T=!y||m||!!y.closest("form"),[O,M]=a.useState(new Set),L=Array.from(O).map(e=>e.props.value).join(";");return(0,i.jsx)(et,{...g,children:(0,i.jsxs)(tf,{required:h,scope:t,trigger:y,onTriggerChange:w,valueNode:b,onValueNodeChange:x,valueNodeHasChildren:C,onValueNodeHasChildrenChange:S,contentId:Y(),value:N,onValueChange:P,open:j,onOpenChange:A,dir:R,triggerPointerDownPosRef:k,disabled:v,children:[(0,i.jsx)(ti.Provider,{scope:t,children:(0,i.jsx)(tv,{scope:e.__scopeSelect,onNativeOptionAdd:a.useCallback(e=>{M(t=>new Set(t).add(e))},[]),onNativeOptionRemove:a.useCallback(e=>{M(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:n})}),T?(0,i.jsxs)(t$,{"aria-hidden":!0,required:h,tabIndex:-1,name:f,autoComplete:p,value:N,onChange:e=>P(e.target.value),disabled:v,form:m,children:[void 0===N?(0,i.jsx)("option",{value:""}):null,Array.from(O)]},L):null]})})};tm.displayName=tl;var tg="SelectTrigger",ty=a.forwardRef((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...o}=e,l=td(n),s=tp(tg,n),u=s.disabled||r,d=(0,h.useComposedRefs)(t,s.onTriggerChange),f=ta(n),p=a.useRef("touch"),[v,m,g]=t1(e=>{let t=f().filter(e=>!e.disabled),n=t.find(e=>e.value===s.value),r=t2(t,e,n);void 0!==r&&s.onValueChange(r.value)}),y=e=>{u||(s.onOpenChange(!0),g()),e&&(s.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,i.jsx)(er,{asChild:!0,...l,children:(0,i.jsx)(R.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:u,"data-disabled":u?"":void 0,"data-placeholder":t0(s.value)?"":void 0,...o,ref:d,onClick:(0,c.composeEventHandlers)(o.onClick,e=>{e.currentTarget.focus(),"mouse"!==p.current&&y(e)}),onPointerDown:(0,c.composeEventHandlers)(o.onPointerDown,e=>{p.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(y(e),e.preventDefault())}),onKeyDown:(0,c.composeEventHandlers)(o.onKeyDown,e=>{let t=""!==v.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||m(e.key),(!t||" "!==e.key)&&tr.includes(e.key)&&(y(),e.preventDefault())})})})});ty.displayName=tg;var tw="SelectValue",tb=a.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:o,children:l,placeholder:a="",...s}=e,u=tp(tw,n),{onValueNodeHasChildrenChange:c}=u,d=void 0!==l,f=(0,h.useComposedRefs)(t,u.onValueNodeChange);return V(()=>{c(d)},[c,d]),(0,i.jsx)(R.span,{...s,ref:f,style:{pointerEvents:"none"},children:t0(u.value)?(0,i.jsx)(i.Fragment,{children:a}):l})});tb.displayName=tw;var tx=a.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...o}=e;return(0,i.jsx)(R.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});tx.displayName="SelectIcon";var tE=e=>(0,i.jsx)(ev,{asChild:!0,...e});tE.displayName="SelectPortal";var tC="SelectContent",tS=a.forwardRef((e,t)=>{let n=tp(tC,e.__scopeSelect),[r,o]=a.useState();return(V(()=>{o(new DocumentFragment)},[]),n.open)?(0,i.jsx)(tN,{...e,ref:t}):r?s.createPortal((0,i.jsx)(tR,{scope:e.__scopeSelect,children:(0,i.jsx)(ti.Slot,{scope:e.__scopeSelect,children:(0,i.jsx)("div",{children:e.children})})}),r):null});tS.displayName=tC;var[tR,tj]=tu(tC),tA=function(e){let t=function(e){let t=a.forwardRef((e,t)=>{let{children:n,...r}=e;if(a.isValidElement(n)){var o,l,i;let e,s,u=(s=(e=null==(l=Object.getOwnPropertyDescriptor((o=n).props,"ref"))?void 0:l.get)&&"isReactWarning"in e&&e.isReactWarning)?o.ref:(s=(e=null==(i=Object.getOwnPropertyDescriptor(o,"ref"))?void 0:i.get)&&"isReactWarning"in e&&e.isReactWarning)?o.props.ref:o.props.ref||o.ref,c=function(e,t){let n={...t};for(let r in t){let o=e[r],l=t[r];/^on[A-Z]/.test(r)?o&&l?n[r]=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];let r=l(...t);return o(...t),r}:o&&(n[r]=o):"style"===r?n[r]={...o,...l}:"className"===r&&(n[r]=[o,l].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==a.Fragment&&(c.ref=t?(0,h.composeRefs)(t,u):u),a.cloneElement(n,c)}return a.Children.count(n)>1?a.Children.only(null):null});return t.displayName="".concat(e,".SlotClone"),t}(e),n=a.forwardRef((e,n)=>{let{children:r,...o}=e,l=a.Children.toArray(r),s=l.find(em);if(s){let e=s.props.children,r=l.map(t=>t!==s?t:a.Children.count(e)>1?a.Children.only(null):a.isValidElement(e)?e.props.children:null);return(0,i.jsx)(t,{...o,ref:n,children:a.isValidElement(e)?a.cloneElement(e,void 0,r):null})}return(0,i.jsx)(t,{...o,ref:n,children:r})});return n.displayName="".concat(e,".Slot"),n}("SelectContent.RemoveScroll"),tN=a.forwardRef((e,t)=>{let{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:l,onPointerDownOutside:s,side:u,sideOffset:d,align:f,alignOffset:p,arrowPadding:v,collisionBoundary:m,collisionPadding:g,sticky:y,hideWhenDetached:w,avoidCollisions:b,...x}=e,E=tp(tC,n),[C,S]=a.useState(null),[R,j]=a.useState(null),A=(0,h.useComposedRefs)(t,e=>S(e)),[N,k]=a.useState(null),[T,L]=a.useState(null),_=ta(n),[I,H]=a.useState(!1),W=a.useRef(!1);a.useEffect(()=>{if(C)return ej(C)},[C]),a.useEffect(()=>{var e,t;let n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!=(e=n[0])?e:M()),document.body.insertAdjacentElement("beforeend",null!=(t=n[1])?t:M()),O++,()=>{1===O&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),O--}},[]);let z=a.useCallback(e=>{let[t,...n]=_().map(e=>e.ref.current),[r]=n.slice(-1),o=document.activeElement;for(let n of e)if(n===o||(null==n||n.scrollIntoView({block:"nearest"}),n===t&&R&&(R.scrollTop=0),n===r&&R&&(R.scrollTop=R.scrollHeight),null==n||n.focus(),document.activeElement!==o))return},[_,R]),B=a.useCallback(()=>z([N,C]),[z,N,C]);a.useEffect(()=>{I&&B()},[I,B]);let{onOpenChange:F,triggerPointerDownPosRef:V}=E;a.useEffect(()=>{if(C){let e={x:0,y:0},t=t=>{var n,r,o,l;e={x:Math.abs(Math.round(t.pageX)-(null!=(o=null==(n=V.current)?void 0:n.x)?o:0)),y:Math.abs(Math.round(t.pageY)-(null!=(l=null==(r=V.current)?void 0:r.y)?l:0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():C.contains(n.target)||F(!1),document.removeEventListener("pointermove",t),V.current=null};return null!==V.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}},[C,F,V]),a.useEffect(()=>{let e=()=>F(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[F]);let[K,U]=t1(e=>{let t=_().filter(e=>!e.disabled),n=t.find(e=>e.ref.current===document.activeElement),r=t2(t,e,n);r&&setTimeout(()=>r.ref.current.focus())}),Y=a.useCallback((e,t,n)=>{let r=!W.current&&!n;(void 0!==E.value&&E.value===t||r)&&(k(e),r&&(W.current=!0))},[E.value]),X=a.useCallback(()=>null==C?void 0:C.focus(),[C]),Z=a.useCallback((e,t,n)=>{let r=!W.current&&!n;(void 0!==E.value&&E.value===t||r)&&L(e)},[E.value]),q="popper"===r?tk:tP,G=q===tk?{side:u,sideOffset:d,align:f,alignOffset:p,arrowPadding:v,collisionBoundary:m,collisionPadding:g,sticky:y,hideWhenDetached:w,avoidCollisions:b}:{};return(0,i.jsx)(tR,{scope:n,content:C,viewport:R,onViewportChange:j,itemRefCallback:Y,selectedItem:N,onItemLeave:X,itemTextRefCallback:Z,focusSelectedItem:B,selectedItemText:T,position:r,isPositioned:I,searchRef:K,children:(0,i.jsx)(tn,{as:tA,allowPinchZoom:!0,children:(0,i.jsx)(D,{asChild:!0,trapped:E.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:(0,c.composeEventHandlers)(o,e=>{var t;null==(t=E.trigger)||t.focus({preventScroll:!0}),e.preventDefault()}),children:(0,i.jsx)(P,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>E.onOpenChange(!1),children:(0,i.jsx)(q,{role:"listbox",id:E.contentId,"data-state":E.open?"open":"closed",dir:E.dir,onContextMenu:e=>e.preventDefault(),...x,...G,onPlaced:()=>H(!0),ref:A,style:{display:"flex",flexDirection:"column",outline:"none",...x.style},onKeyDown:(0,c.composeEventHandlers)(x.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||U(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=_().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>z(t)),e.preventDefault()}})})})})})})});tN.displayName="SelectContentImpl";var tP=a.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:r,...o}=e,l=tp(tC,n),s=tj(tC,n),[c,d]=a.useState(null),[f,p]=a.useState(null),v=(0,h.useComposedRefs)(t,e=>p(e)),m=ta(n),g=a.useRef(!1),y=a.useRef(!0),{viewport:w,selectedItem:b,selectedItemText:x,focusSelectedItem:E}=s,C=a.useCallback(()=>{if(l.trigger&&l.valueNode&&c&&f&&w&&b&&x){let e=l.trigger.getBoundingClientRect(),t=f.getBoundingClientRect(),n=l.valueNode.getBoundingClientRect(),o=x.getBoundingClientRect();if("rtl"!==l.dir){let r=o.left-t.left,l=n.left-r,i=e.left-l,a=e.width+i,s=Math.max(a,t.width),d=window.innerWidth-10,f=(0,u.clamp)(l,[10,Math.max(10,d-s)]);c.style.minWidth=a+"px",c.style.left=f+"px"}else{let r=t.right-o.right,l=window.innerWidth-n.right-r,i=window.innerWidth-e.right-l,a=e.width+i,s=Math.max(a,t.width),d=window.innerWidth-10,f=(0,u.clamp)(l,[10,Math.max(10,d-s)]);c.style.minWidth=a+"px",c.style.right=f+"px"}let i=m(),a=window.innerHeight-20,s=w.scrollHeight,d=window.getComputedStyle(f),p=parseInt(d.borderTopWidth,10),v=parseInt(d.paddingTop,10),h=parseInt(d.borderBottomWidth,10),y=p+v+s+parseInt(d.paddingBottom,10)+h,E=Math.min(5*b.offsetHeight,y),C=window.getComputedStyle(w),S=parseInt(C.paddingTop,10),R=parseInt(C.paddingBottom,10),j=e.top+e.height/2-10,A=b.offsetHeight/2,N=p+v+(b.offsetTop+A);if(N<=j){let e=i.length>0&&b===i[i.length-1].ref.current;c.style.bottom="0px";let t=Math.max(a-j,A+(e?R:0)+(f.clientHeight-w.offsetTop-w.offsetHeight)+h);c.style.height=N+t+"px"}else{let e=i.length>0&&b===i[0].ref.current;c.style.top="0px";let t=Math.max(j,p+w.offsetTop+(e?S:0)+A);c.style.height=t+(y-N)+"px",w.scrollTop=N-j+w.offsetTop}c.style.margin="".concat(10,"px 0"),c.style.minHeight=E+"px",c.style.maxHeight=a+"px",null==r||r(),requestAnimationFrame(()=>g.current=!0)}},[m,l.trigger,l.valueNode,c,f,w,b,x,l.dir,r]);V(()=>C(),[C]);let[S,j]=a.useState();V(()=>{f&&j(window.getComputedStyle(f).zIndex)},[f]);let A=a.useCallback(e=>{e&&!0===y.current&&(C(),null==E||E(),y.current=!1)},[C,E]);return(0,i.jsx)(tT,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:g,onScrollButtonChange:A,children:(0,i.jsx)("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:(0,i.jsx)(R.div,{...o,ref:v,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});tP.displayName="SelectItemAlignedPosition";var tk=a.forwardRef((e,t)=>{let{__scopeSelect:n,align:r="start",collisionPadding:o=10,...l}=e,a=td(n);return(0,i.jsx)(ea,{...a,...l,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...l.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});tk.displayName="SelectPopperPosition";var[tT,tO]=tu(tC,{}),tM="SelectViewport",tL=a.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:r,...o}=e,l=tj(tM,n),s=tO(tM,n),u=(0,h.useComposedRefs)(t,l.onViewportChange),d=a.useRef(0);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),(0,i.jsx)(ti.Slot,{scope:n,children:(0,i.jsx)(R.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:(0,c.composeEventHandlers)(o.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=s;if((null==r?void 0:r.current)&&n){let e=Math.abs(d.current-t.scrollTop);if(e>0){let r=window.innerHeight-20,o=Math.max(parseFloat(n.style.minHeight),parseFloat(n.style.height));if(o<r){let l=o+e,i=Math.min(r,l),a=l-i;n.style.height=i+"px","0px"===n.style.bottom&&(t.scrollTop=a>0?a:0,n.style.justifyContent="flex-end")}}}d.current=t.scrollTop})})})]})});tL.displayName=tM;var t_="SelectGroup",[tI,tD]=tu(t_);a.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,o=Y();return(0,i.jsx)(tI,{scope:n,id:o,children:(0,i.jsx)(R.div,{role:"group","aria-labelledby":o,...r,ref:t})})}).displayName=t_;var tH="SelectLabel";a.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,o=tD(tH,n);return(0,i.jsx)(R.div,{id:o.id,...r,ref:t})}).displayName=tH;var tW="SelectItem",[tz,tB]=tu(tW),tF=a.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,disabled:o=!1,textValue:l,...s}=e,u=tp(tW,n),d=tj(tW,n),f=u.value===r,[p,v]=a.useState(null!=l?l:""),[m,g]=a.useState(!1),y=(0,h.useComposedRefs)(t,e=>{var t;return null==(t=d.itemRefCallback)?void 0:t.call(d,e,r,o)}),w=Y(),b=a.useRef("touch"),x=()=>{o||(u.onValueChange(r),u.onOpenChange(!1))};if(""===r)throw Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return(0,i.jsx)(tz,{scope:n,value:r,disabled:o,textId:w,isSelected:f,onItemTextChange:a.useCallback(e=>{v(t=>{var n;return t||(null!=(n=null==e?void 0:e.textContent)?n:"").trim()})},[]),children:(0,i.jsx)(ti.ItemSlot,{scope:n,value:r,disabled:o,textValue:p,children:(0,i.jsx)(R.div,{role:"option","aria-labelledby":w,"data-highlighted":m?"":void 0,"aria-selected":f&&m,"data-state":f?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...s,ref:y,onFocus:(0,c.composeEventHandlers)(s.onFocus,()=>g(!0)),onBlur:(0,c.composeEventHandlers)(s.onBlur,()=>g(!1)),onClick:(0,c.composeEventHandlers)(s.onClick,()=>{"mouse"!==b.current&&x()}),onPointerUp:(0,c.composeEventHandlers)(s.onPointerUp,()=>{"mouse"===b.current&&x()}),onPointerDown:(0,c.composeEventHandlers)(s.onPointerDown,e=>{b.current=e.pointerType}),onPointerMove:(0,c.composeEventHandlers)(s.onPointerMove,e=>{if(b.current=e.pointerType,o){var t;null==(t=d.onItemLeave)||t.call(d)}else"mouse"===b.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:(0,c.composeEventHandlers)(s.onPointerLeave,e=>{if(e.currentTarget===document.activeElement){var t;null==(t=d.onItemLeave)||t.call(d)}}),onKeyDown:(0,c.composeEventHandlers)(s.onKeyDown,e=>{var t;((null==(t=d.searchRef)?void 0:t.current)===""||" "!==e.key)&&(to.includes(e.key)&&x()," "===e.key&&e.preventDefault())})})})})});tF.displayName=tW;var tV="SelectItemText",tK=a.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:o,...l}=e,u=tp(tV,n),c=tj(tV,n),d=tB(tV,n),f=th(tV,n),[p,v]=a.useState(null),m=(0,h.useComposedRefs)(t,e=>v(e),d.onItemTextChange,e=>{var t;return null==(t=c.itemTextRefCallback)?void 0:t.call(c,e,d.value,d.disabled)}),g=null==p?void 0:p.textContent,y=a.useMemo(()=>(0,i.jsx)("option",{value:d.value,disabled:d.disabled,children:g},d.value),[d.disabled,d.value,g]),{onNativeOptionAdd:w,onNativeOptionRemove:b}=f;return V(()=>(w(y),()=>b(y)),[w,b,y]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(R.span,{id:d.textId,...l,ref:m}),d.isSelected&&u.valueNode&&!u.valueNodeHasChildren?s.createPortal(l.children,u.valueNode):null]})});tK.displayName=tV;var tU="SelectItemIndicator",tY=a.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return tB(tU,n).isSelected?(0,i.jsx)(R.span,{"aria-hidden":!0,...r,ref:t}):null});tY.displayName=tU;var tX="SelectScrollUpButton",tZ=a.forwardRef((e,t)=>{let n=tj(tX,e.__scopeSelect),r=tO(tX,e.__scopeSelect),[o,l]=a.useState(!1),s=(0,h.useComposedRefs)(t,r.onScrollButtonChange);return V(()=>{if(n.viewport&&n.isPositioned){let e=function(){l(t.scrollTop>0)},t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[n.viewport,n.isPositioned]),o?(0,i.jsx)(tJ,{...e,ref:s,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});tZ.displayName=tX;var tq="SelectScrollDownButton",tG=a.forwardRef((e,t)=>{let n=tj(tq,e.__scopeSelect),r=tO(tq,e.__scopeSelect),[o,l]=a.useState(!1),s=(0,h.useComposedRefs)(t,r.onScrollButtonChange);return V(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;l(Math.ceil(t.scrollTop)<e)},t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[n.viewport,n.isPositioned]),o?(0,i.jsx)(tJ,{...e,ref:s,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});tG.displayName=tq;var tJ=a.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...o}=e,l=tj("SelectScrollButton",n),s=a.useRef(null),u=ta(n),d=a.useCallback(()=>{null!==s.current&&(window.clearInterval(s.current),s.current=null)},[]);return a.useEffect(()=>()=>d(),[d]),V(()=>{var e;let t=u().find(e=>e.ref.current===document.activeElement);null==t||null==(e=t.ref.current)||e.scrollIntoView({block:"nearest"})},[u]),(0,i.jsx)(R.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:(0,c.composeEventHandlers)(o.onPointerDown,()=>{null===s.current&&(s.current=window.setInterval(r,50))}),onPointerMove:(0,c.composeEventHandlers)(o.onPointerMove,()=>{var e;null==(e=l.onItemLeave)||e.call(l),null===s.current&&(s.current=window.setInterval(r,50))}),onPointerLeave:(0,c.composeEventHandlers)(o.onPointerLeave,()=>{d()})})});a.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return(0,i.jsx)(R.div,{"aria-hidden":!0,...r,ref:t})}).displayName="SelectSeparator";var tQ="SelectArrow";a.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,o=td(n),l=tp(tQ,n),a=tj(tQ,n);return l.open&&"popper"===a.position?(0,i.jsx)(ec,{...o,...r,ref:t}):null}).displayName=tQ;var t$=a.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,...o}=e,l=a.useRef(null),s=(0,h.useComposedRefs)(t,l),u=function(e){let t=a.useRef({value:e,previous:e});return a.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}(r);return a.useEffect(()=>{let e=l.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype,"value").set;if(u!==r&&t){let n=new Event("change",{bubbles:!0});t.call(e,r),e.dispatchEvent(n)}},[u,r]),(0,i.jsx)(R.select,{...o,style:{...ew,...o.style},ref:s,defaultValue:r})});function t0(e){return""===e||void 0===e}function t1(e){let t=j(e),n=a.useRef(""),r=a.useRef(0),o=a.useCallback(e=>{let o=n.current+e;t(o),function e(t){n.current=t,window.clearTimeout(r.current),""!==t&&(r.current=window.setTimeout(()=>e(""),1e3))}(o)},[t]),l=a.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return a.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,l]}function t2(e,t,n){var r,o;let l=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=(r=e,o=Math.max(i,0),r.map((e,t)=>r[(o+t)%r.length]));1===l.length&&(a=a.filter(e=>e!==n));let s=a.find(e=>e.textValue.toLowerCase().startsWith(l.toLowerCase()));return s!==n?s:void 0}t$.displayName="SelectBubbleInput";var t5=e.i(72064),t3=e.i(75157);function t6(e){let{...t}=e;return(0,i.jsx)(tm,{"data-slot":"select",...t})}function t7(e){let{...t}=e;return(0,i.jsx)(tb,{"data-slot":"select-value",...t})}function t9(e){let{className:t,size:n="default",children:r,...o}=e;return(0,i.jsxs)(ty,{"data-slot":"select-trigger","data-size":n,className:(0,t3.cn)("flex h-8 w-fit min-w-24 items-center justify-between gap-2 whitespace-nowrap rounded-md border !border-solid border-[var(--ds-border,var(--input))] bg-transparent px-2.5 py-1 text-sm outline-none transition-[color,box-shadow,border-color] duration-150 ease-in-out placeholder:text-muted-foreground hover:border-[var(--border-hover)] hover:bg-[var(--surface-2)] focus-visible:border-[var(--border-focus)] focus-visible:[box-shadow:var(--ring-focus-sm)] disabled:cursor-not-allowed disabled:opacity-50 disabled:focus-visible:border-[var(--ds-border,var(--input))] disabled:focus-visible:[box-shadow:none] data-[size=default]:h-8 data-[size=sm]:h-7 data-[state=open]:border-[var(--border-focus)] data-[state=open]:[box-shadow:var(--ring-focus-sm)]",t),...o,children:[r,(0,i.jsx)(tx,{asChild:!0,children:(0,i.jsx)(t5.default,{name:"ChevronDown",size:16,className:"opacity-60",strokeWidth:1})})]})}function t8(e){let{className:t,children:n,position:r="popper",...o}=e;return(0,i.jsx)(tE,{children:(0,i.jsxs)(tS,{"data-slot":"select-content",className:(0,t3.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md","popper"===r&&"data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),position:r,...o,children:[(0,i.jsx)(tZ,{className:"flex cursor-default items-center justify-center py-1",children:(0,i.jsx)(t5.default,{name:"ChevronUp",size:16})}),(0,i.jsx)(tL,{className:(0,t3.cn)("p-1","popper"===r&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:n}),(0,i.jsx)(tG,{className:"flex cursor-default items-center justify-center py-1",children:(0,i.jsx)(t5.default,{name:"ChevronDown",size:16,strokeWidth:1})})]})})}function t4(e){let{className:t,children:n,...r}=e;return(0,i.jsxs)(tF,{"data-slot":"select-item",className:(0,t3.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none hover:bg-[var(--ds-item-hover)] focus:bg-[var(--ds-item-hover)] focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...r,children:[(0,i.jsx)("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,i.jsx)(tY,{children:(0,i.jsx)(t5.default,{name:"Check",size:16})})}),(0,i.jsx)(tK,{children:n})]})}}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,20783,e=>{"use strict";e.s(["composeRefs",()=>r,"useComposedRefs",()=>o]);var t=e.i(71645);function n(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function r(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return e=>{let r=!1,o=t.map(t=>{let o=n(t,e);return r||"function"!=typeof o||(r=!0),o});if(r)return()=>{for(let e=0;e<o.length;e++){let r=o[e];"function"==typeof r?r():n(t[e],null)}}}}function o(){for(var e=arguments.length,n=Array(e),o=0;o<e;o++)n[o]=arguments[o];return t.useCallback(r(...n),n)}},70152,81140,39946,70292,62351,30030,e=>{"use strict";function t(e,t){let[n,r]=t;return Math.min(r,Math.max(n,e))}function n(e,t){let{checkForDefaultPrevented:n=!0}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function r(e,t,n){if(!t.has(e))throw TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function o(e,t){var n=r(e,t,"get");return n.get?n.get.call(e):n.value}function l(e,t,n){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");t.set(e,n)}function i(e,t,n){var o=r(e,t,"set");if(o.set)o.set.call(e,n);else{if(!o.writable)throw TypeError("attempted to set read only private field");o.value=n}return n}e.s(["clamp",()=>t],70152),e.s(["composeEventHandlers",()=>n],81140),"undefined"!=typeof window&&window.document&&window.document.createElement,e.s(["_",()=>o],39946),e.s(["_",()=>l],70292),e.s(["_",()=>i],62351),e.s(["createContextScope",()=>u],30030);var a=e.i(71645),s=e.i(18050);function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[],r=()=>{let t=n.map(e=>a.createContext(e));return function(n){let r=(null==n?void 0:n[e])||t;return a.useMemo(()=>({["__scope".concat(e)]:{...n,[e]:r}}),[n,r])}};return r.scopeName=e,[function(t,r){let o=a.createContext(r),l=n.length;n=[...n,r];let i=t=>{var n;let{scope:r,children:i,...u}=t,c=(null==r||null==(n=r[e])?void 0:n[l])||o,d=a.useMemo(()=>u,Object.values(u));return(0,s.jsx)(c.Provider,{value:d,children:i})};return i.displayName=t+"Provider",[i,function(n,i){var s;let u=(null==i||null==(s=i[e])?void 0:s[l])||o,c=a.useContext(u);if(c)return c;if(void 0!==r)return r;throw Error("`".concat(n,"` must be used within `").concat(t,"`"))}]},function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];let r=t[0];if(1===t.length)return r;let o=()=>{let e=t.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(t){let n=e.reduce((e,n)=>{let{useScope:r,scopeName:o}=n,l=r(t)["__scope".concat(o)];return{...e,...l}},{});return a.useMemo(()=>({["__scope".concat(r.scopeName)]:n}),[n])}};return o.scopeName=r.scopeName,o}(r,...t)]}},67489,e=>{"use strict";e.s(["Select",()=>t6,"SelectContent",()=>t8,"SelectItem",()=>t4,"SelectTrigger",()=>t9,"SelectValue",()=>t7],67489);var t,n,r,o,l,i=e.i(18050),a=e.i(71645),s=e.i(74080),u=e.i(70152),c=e.i(81140),d=e.i(39946),f=e.i(70292),p=e.i(62351),v=e.i(30030),h=e.i(20783);function m(e){let t=function(e){let t=a.forwardRef((e,t)=>{let{children:n,...r}=e;if(a.isValidElement(n)){var o,l,i;let e,s,u=(s=(e=null==(l=Object.getOwnPropertyDescriptor((o=n).props,"ref"))?void 0:l.get)&&"isReactWarning"in e&&e.isReactWarning)?o.ref:(s=(e=null==(i=Object.getOwnPropertyDescriptor(o,"ref"))?void 0:i.get)&&"isReactWarning"in e&&e.isReactWarning)?o.props.ref:o.props.ref||o.ref,c=function(e,t){let n={...t};for(let r in t){let o=e[r],l=t[r];/^on[A-Z]/.test(r)?o&&l?n[r]=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];let r=l(...t);return o(...t),r}:o&&(n[r]=o):"style"===r?n[r]={...o,...l}:"className"===r&&(n[r]=[o,l].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==a.Fragment&&(c.ref=t?(0,h.composeRefs)(t,u):u),a.cloneElement(n,c)}return a.Children.count(n)>1?a.Children.only(null):null});return t.displayName="".concat(e,".SlotClone"),t}(e),n=a.forwardRef((e,n)=>{let{children:r,...o}=e,l=a.Children.toArray(r),s=l.find(y);if(s){let e=s.props.children,r=l.map(t=>t!==s?t:a.Children.count(e)>1?a.Children.only(null):a.isValidElement(e)?e.props.children:null);return(0,i.jsx)(t,{...o,ref:n,children:a.isValidElement(e)?a.cloneElement(e,void 0,r):null})}return(0,i.jsx)(t,{...o,ref:n,children:r})});return n.displayName="".concat(e,".Slot"),n}var g=Symbol("radix.slottable");function y(e){return a.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===g}var w=new WeakMap;function b(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);let n=function(e,t){let n=e.length,r=x(t),o=r>=0?r:n+r;return o<0||o>=n?-1:o}(e,t);return -1===n?void 0:e[n]}function x(e){return e!=e||0===e?0:Math.trunc(e)}n=new WeakMap,class e extends Map{set(e,t){return w.get(this)&&(this.has(e)?(0,d._)(this,n)[(0,d._)(this,n).indexOf(e)]=e:(0,d._)(this,n).push(e)),super.set(e,t),this}insert(e,t,r){let o,l=this.has(t),i=(0,d._)(this,n).length,a=x(e),s=a>=0?a:i+a,u=s<0||s>=i?-1:s;if(u===this.size||l&&u===this.size-1||-1===u)return this.set(t,r),this;let c=this.size+ +!l;a<0&&s++;let f=[...(0,d._)(this,n)],p=!1;for(let e=s;e<c;e++)if(s===e){let n=f[e];f[e]===t&&(n=f[e+1]),l&&this.delete(t),o=this.get(n),this.set(t,r)}else{p||f[e-1]!==t||(p=!0);let n=f[p?e:e-1],r=o;o=this.get(n),this.delete(n),this.set(n,r)}return this}with(t,n,r){let o=new e(this);return o.insert(t,n,r),o}before(e){let t=(0,d._)(this,n).indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,r){let o=(0,d._)(this,n).indexOf(e);return -1===o?this:this.insert(o,t,r)}after(e){let t=(0,d._)(this,n).indexOf(e);if(-1!==(t=-1===t||t===this.size-1?-1:t+1))return this.entryAt(t)}setAfter(e,t,r){let o=(0,d._)(this,n).indexOf(e);return -1===o?this:this.insert(o+1,t,r)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return(0,p._)(this,n,[]),super.clear()}delete(e){let t=super.delete(e);return t&&(0,d._)(this,n).splice((0,d._)(this,n).indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return void 0!==t&&this.delete(t)}at(e){let t=b((0,d._)(this,n),e);if(void 0!==t)return this.get(t)}entryAt(e){let t=b((0,d._)(this,n),e);if(void 0!==t)return[t,this.get(t)]}indexOf(e){return(0,d._)(this,n).indexOf(e)}keyAt(e){return b((0,d._)(this,n),e)}from(e,t){let n=this.indexOf(e);if(-1===n)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let n=this.indexOf(e);if(-1===n)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return r;n++}}findIndex(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return n;n++}return -1}filter(t,n){let r=[],o=0;for(let e of this)Reflect.apply(t,n,[e,o,this])&&r.push(e),o++;return new e(r)}map(t,n){let r=[],o=0;for(let e of this)r.push([e[0],Reflect.apply(t,n,[e,o,this])]),o++;return new e(r)}reduce(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];let[r,o]=t,l=0,i=null!=o?o:this.at(0);for(let e of this)i=0===l&&1===t.length?e:Reflect.apply(r,this,[i,e,l,this]),l++;return i}reduceRight(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];let[r,o]=t,l=null!=o?o:this.at(-1);for(let e=this.size-1;e>=0;e--){let n=this.at(e);l=e===this.size-1&&1===t.length?n:Reflect.apply(r,this,[l,n,e,this])}return l}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let n=this.keyAt(e),r=this.get(n);t.set(n,r)}return t}toSpliced(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];let o=[...this.entries()];return o.splice(...n),new e(o)}slice(t,n){let r=new e,o=this.size-1;if(void 0===t)return r;t<0&&(t+=this.size),void 0!==n&&n>0&&(o=n-1);for(let e=t;e<=o;e++){let t=this.keyAt(e),n=this.get(t);r.set(t,n)}return r}every(e,t){let n=0;for(let r of this){if(!Reflect.apply(e,t,[r,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return!0;n++}return!1}constructor(e){super(e),(0,f._)(this,n,{writable:!0,value:void 0}),(0,p._)(this,n,[...super.keys()]),w.set(this,!0)}};var E=a.createContext(void 0),C=Symbol("radix.slottable");function S(e){return a.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===C}var R=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let n=function(e){let t=function(e){let t=a.forwardRef((e,t)=>{let{children:n,...r}=e;if(a.isValidElement(n)){var o,l,i;let e,s,u=(s=(e=null==(l=Object.getOwnPropertyDescriptor((o=n).props,"ref"))?void 0:l.get)&&"isReactWarning"in e&&e.isReactWarning)?o.ref:(s=(e=null==(i=Object.getOwnPropertyDescriptor(o,"ref"))?void 0:i.get)&&"isReactWarning"in e&&e.isReactWarning)?o.props.ref:o.props.ref||o.ref,c=function(e,t){let n={...t};for(let r in t){let o=e[r],l=t[r];/^on[A-Z]/.test(r)?o&&l?n[r]=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];let r=l(...t);return o(...t),r}:o&&(n[r]=o):"style"===r?n[r]={...o,...l}:"className"===r&&(n[r]=[o,l].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==a.Fragment&&(c.ref=t?(0,h.composeRefs)(t,u):u),a.cloneElement(n,c)}return a.Children.count(n)>1?a.Children.only(null):null});return t.displayName="".concat(e,".SlotClone"),t}(e),n=a.forwardRef((e,n)=>{let{children:r,...o}=e,l=a.Children.toArray(r),s=l.find(S);if(s){let e=s.props.children,r=l.map(t=>t!==s?t:a.Children.count(e)>1?a.Children.only(null):a.isValidElement(e)?e.props.children:null);return(0,i.jsx)(t,{...o,ref:n,children:a.isValidElement(e)?a.cloneElement(e,void 0,r):null})}return(0,i.jsx)(t,{...o,ref:n,children:r})});return n.displayName="".concat(e,".Slot"),n}("Primitive.".concat(t)),r=a.forwardRef((e,r)=>{let{asChild:o,...l}=e;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,i.jsx)(o?n:t,{...l,ref:r})});return r.displayName="Primitive.".concat(t),{...e,[t]:r}},{});function j(e){let t=a.useRef(e);return a.useEffect(()=>{t.current=e}),a.useMemo(()=>function(){for(var e,n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];return null==(e=t.current)?void 0:e.call(t,...r)},[])}var A="dismissableLayer.update",N=a.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),P=a.forwardRef((e,t)=>{var n,o;let{disableOutsidePointerEvents:l=!1,onEscapeKeyDown:s,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,...v}=e,m=a.useContext(N),[g,y]=a.useState(null),w=null!=(o=null==g?void 0:g.ownerDocument)?o:null==(n=globalThis)?void 0:n.document,[,b]=a.useState({}),x=(0,h.useComposedRefs)(t,e=>y(e)),E=Array.from(m.layers),[C]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),S=E.indexOf(C),P=g?E.indexOf(g):-1,O=m.layersWithOutsidePointerEventsDisabled.size>0,M=P>=S,L=function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null==(t=globalThis)?void 0:t.document,r=j(e),o=a.useRef(!1),l=a.useRef(()=>{});return a.useEffect(()=>{let e=e=>{if(e.target&&!o.current){let t=function(){T("dismissableLayer.pointerDownOutside",r,o,{discrete:!0})},o={originalEvent:e};"touch"===e.pointerType?(n.removeEventListener("click",l.current),l.current=t,n.addEventListener("click",l.current,{once:!0})):t()}else n.removeEventListener("click",l.current);o.current=!1},t=window.setTimeout(()=>{n.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(t),n.removeEventListener("pointerdown",e),n.removeEventListener("click",l.current)}},[n,r]),{onPointerDownCapture:()=>o.current=!0}}(e=>{let t=e.target,n=[...m.branches].some(e=>e.contains(t));M&&!n&&(null==u||u(e),null==f||f(e),e.defaultPrevented||null==p||p())},w),_=function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null==(t=globalThis)?void 0:t.document,r=j(e),o=a.useRef(!1);return a.useEffect(()=>{let e=e=>{e.target&&!o.current&&T("dismissableLayer.focusOutside",r,{originalEvent:e},{discrete:!1})};return n.addEventListener("focusin",e),()=>n.removeEventListener("focusin",e)},[n,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}(e=>{let t=e.target;![...m.branches].some(e=>e.contains(t))&&(null==d||d(e),null==f||f(e),e.defaultPrevented||null==p||p())},w);return!function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null==(t=globalThis)?void 0:t.document,r=j(e);a.useEffect(()=>{let e=e=>{"Escape"===e.key&&r(e)};return n.addEventListener("keydown",e,{capture:!0}),()=>n.removeEventListener("keydown",e,{capture:!0})},[r,n])}(e=>{P===m.layers.size-1&&(null==s||s(e),!e.defaultPrevented&&p&&(e.preventDefault(),p()))},w),a.useEffect(()=>{if(g)return l&&(0===m.layersWithOutsidePointerEventsDisabled.size&&(r=w.body.style.pointerEvents,w.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(g)),m.layers.add(g),k(),()=>{l&&1===m.layersWithOutsidePointerEventsDisabled.size&&(w.body.style.pointerEvents=r)}},[g,w,l,m]),a.useEffect(()=>()=>{g&&(m.layers.delete(g),m.layersWithOutsidePointerEventsDisabled.delete(g),k())},[g,m]),a.useEffect(()=>{let e=()=>b({});return document.addEventListener(A,e),()=>document.removeEventListener(A,e)},[]),(0,i.jsx)(R.div,{...v,ref:x,style:{pointerEvents:O?M?"auto":"none":void 0,...e.style},onFocusCapture:(0,c.composeEventHandlers)(e.onFocusCapture,_.onFocusCapture),onBlurCapture:(0,c.composeEventHandlers)(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:(0,c.composeEventHandlers)(e.onPointerDownCapture,L.onPointerDownCapture)})});function k(){let e=new CustomEvent(A);document.dispatchEvent(e)}function T(e,t,n,r){let{discrete:o}=r,l=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});if(t&&l.addEventListener(e,t,{once:!0}),o)l&&s.flushSync(()=>l.dispatchEvent(i));else l.dispatchEvent(i)}P.displayName="DismissableLayer",a.forwardRef((e,t)=>{let n=a.useContext(N),r=a.useRef(null),o=(0,h.useComposedRefs)(t,r);return a.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,i.jsx)(R.div,{...e,ref:o})}).displayName="DismissableLayerBranch";var O=0;function M(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var L="focusScope.autoFocusOnMount",_="focusScope.autoFocusOnUnmount",I={bubbles:!1,cancelable:!0},D=a.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:l,...s}=e,[u,c]=a.useState(null),d=j(o),f=j(l),p=a.useRef(null),v=(0,h.useComposedRefs)(t,e=>c(e)),m=a.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;a.useEffect(()=>{if(r){let e=function(e){if(m.paused||!u)return;let t=e.target;u.contains(t)?p.current=t:z(p.current,{select:!0})},t=function(e){if(m.paused||!u)return;let t=e.relatedTarget;null!==t&&(u.contains(t)||z(p.current,{select:!0}))};document.addEventListener("focusin",e),document.addEventListener("focusout",t);let n=new MutationObserver(function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&z(u)});return u&&n.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),n.disconnect()}}},[r,u,m.paused]),a.useEffect(()=>{if(u){B.add(m);let e=document.activeElement;if(!u.contains(e)){let t=new CustomEvent(L,I);u.addEventListener(L,d),u.dispatchEvent(t),t.defaultPrevented||(function(e){let{select:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=document.activeElement;for(let r of e)if(z(r,{select:t}),document.activeElement!==n)return}(H(u).filter(e=>"A"!==e.tagName),{select:!0}),document.activeElement===e&&z(u))}return()=>{u.removeEventListener(L,d),setTimeout(()=>{let t=new CustomEvent(_,I);u.addEventListener(_,f),u.dispatchEvent(t),t.defaultPrevented||z(null!=e?e:document.body,{select:!0}),u.removeEventListener(_,f),B.remove(m)},0)}}},[u,d,f,m]);let g=a.useCallback(e=>{if(!n&&!r||m.paused)return;let t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){let t=e.currentTarget,[r,l]=function(e){let t=H(e);return[W(t,e),W(t.reverse(),e)]}(t);r&&l?e.shiftKey||o!==l?e.shiftKey&&o===r&&(e.preventDefault(),n&&z(l,{select:!0})):(e.preventDefault(),n&&z(r,{select:!0})):o===t&&e.preventDefault()}},[n,r,m.paused]);return(0,i.jsx)(R.div,{tabIndex:-1,...s,ref:v,onKeyDown:g})});function H(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function W(e,t){for(let n of e)if(!function(e,t){let{upTo:n}=t;if("hidden"===getComputedStyle(e).visibility)return!0;for(;e&&(void 0===n||e!==n);){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}(n,{upTo:t}))return n}function z(e){let{select:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e&&e.focus){var n;let r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&(n=e)instanceof HTMLInputElement&&"select"in n&&t&&e.select()}}D.displayName="FocusScope";var B=function(){let e=[];return{add(t){let n=e[0];t!==n&&(null==n||n.pause()),(e=F(e,t)).unshift(t)},remove(t){var n;null==(n=(e=F(e,t))[0])||n.resume()}}}();function F(e,t){let n=[...e],r=n.indexOf(t);return -1!==r&&n.splice(r,1),n}var V=(null==(o=globalThis)?void 0:o.document)?a.useLayoutEffect:()=>{},K=a[" useId ".trim().toString()]||(()=>void 0),U=0;function Y(e){let[t,n]=a.useState(K());return V(()=>{e||n(e=>null!=e?e:String(U++))},[e]),e||(t?"radix-".concat(t):"")}var X=e.i(58950),Z=e.i(53760),q=a.forwardRef((e,t)=>{let{children:n,width:r=10,height:o=5,...l}=e;return(0,i.jsx)(R.svg,{...l,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:(0,i.jsx)("polygon",{points:"0,0 30,0 15,10"})})});q.displayName="Arrow";var G="Popper",[J,Q]=(0,v.createContextScope)(G),[$,ee]=J(G),et=e=>{let{__scopePopper:t,children:n}=e,[r,o]=a.useState(null);return(0,i.jsx)($,{scope:t,anchor:r,onAnchorChange:o,children:n})};et.displayName=G;var en="PopperAnchor",er=a.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...o}=e,l=ee(en,n),s=a.useRef(null),u=(0,h.useComposedRefs)(t,s),c=a.useRef(null);return a.useEffect(()=>{let e=c.current;c.current=(null==r?void 0:r.current)||s.current,e!==c.current&&l.onAnchorChange(c.current)}),r?null:(0,i.jsx)(R.div,{...o,ref:u})});er.displayName=en;var eo="PopperContent",[el,ei]=J(eo),ea=a.forwardRef((e,t)=>{var n,r,o,l,s,u,c,d;let{__scopePopper:f,side:p="bottom",sideOffset:v=0,align:m="center",alignOffset:g=0,arrowPadding:y=0,avoidCollisions:w=!0,collisionBoundary:b=[],collisionPadding:x=0,sticky:E="partial",hideWhenDetached:C=!1,updatePositionStrategy:S="optimized",onPlaced:A,...N}=e,P=ee(eo,f),[k,T]=a.useState(null),O=(0,h.useComposedRefs)(t,e=>T(e)),[M,L]=a.useState(null),_=function(e){let[t,n]=a.useState(void 0);return V(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{let r,o;if(!Array.isArray(t)||!t.length)return;let l=t[0];if("borderBoxSize"in l){let e=l.borderBoxSize,t=Array.isArray(e)?e[0]:e;r=t.inlineSize,o=t.blockSize}else r=e.offsetWidth,o=e.offsetHeight;n({width:r,height:o})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)},[e]),t}(M),I=null!=(c=null==_?void 0:_.width)?c:0,D=null!=(d=null==_?void 0:_.height)?d:0,H="number"==typeof x?x:{top:0,right:0,bottom:0,left:0,...x},W=Array.isArray(b)?b:[b],z=W.length>0,B={padding:H,boundary:W.filter(ed),altBoundary:z},{refs:F,floatingStyles:K,placement:U,isPositioned:Y,middlewareData:q}=(0,X.useFloating)({strategy:"fixed",placement:p+("center"!==m?"-"+m:""),whileElementsMounted:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,Z.autoUpdate)(...t,{animationFrame:"always"===S})},elements:{reference:P.anchor},middleware:[(0,X.offset)({mainAxis:v+D,alignmentAxis:g}),w&&(0,X.shift)({mainAxis:!0,crossAxis:!1,limiter:"partial"===E?(0,X.limitShift)():void 0,...B}),w&&(0,X.flip)({...B}),(0,X.size)({...B,apply:e=>{let{elements:t,rects:n,availableWidth:r,availableHeight:o}=e,{width:l,height:i}=n.reference,a=t.floating.style;a.setProperty("--radix-popper-available-width","".concat(r,"px")),a.setProperty("--radix-popper-available-height","".concat(o,"px")),a.setProperty("--radix-popper-anchor-width","".concat(l,"px")),a.setProperty("--radix-popper-anchor-height","".concat(i,"px"))}}),M&&(0,X.arrow)({element:M,padding:y}),ef({arrowWidth:I,arrowHeight:D}),C&&(0,X.hide)({strategy:"referenceHidden",...B})]}),[G,J]=ep(U),Q=j(A);V(()=>{Y&&(null==Q||Q())},[Y,Q]);let $=null==(n=q.arrow)?void 0:n.x,et=null==(r=q.arrow)?void 0:r.y,en=(null==(o=q.arrow)?void 0:o.centerOffset)!==0,[er,ei]=a.useState();return V(()=>{k&&ei(window.getComputedStyle(k).zIndex)},[k]),(0,i.jsx)("div",{ref:F.setFloating,"data-radix-popper-content-wrapper":"",style:{...K,transform:Y?K.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:er,"--radix-popper-transform-origin":[null==(l=q.transformOrigin)?void 0:l.x,null==(s=q.transformOrigin)?void 0:s.y].join(" "),...(null==(u=q.hide)?void 0:u.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,i.jsx)(el,{scope:f,placedSide:G,onArrowChange:L,arrowX:$,arrowY:et,shouldHideArrow:en,children:(0,i.jsx)(R.div,{"data-side":G,"data-align":J,...N,ref:O,style:{...N.style,animation:Y?void 0:"none"}})})})});ea.displayName=eo;var es="PopperArrow",eu={top:"bottom",right:"left",bottom:"top",left:"right"},ec=a.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,o=ei(es,n),l=eu[o.placedSide];return(0,i.jsx)("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:(0,i.jsx)(q,{...r,ref:t,style:{...r.style,display:"block"}})})});function ed(e){return null!==e}ec.displayName=es;var ef=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,l,i;let{placement:a,rects:s,middlewareData:u}=t,c=(null==(n=u.arrow)?void 0:n.centerOffset)!==0,d=c?0:e.arrowWidth,f=c?0:e.arrowHeight,[p,v]=ep(a),h={start:"0%",center:"50%",end:"100%"}[v],m=(null!=(l=null==(r=u.arrow)?void 0:r.x)?l:0)+d/2,g=(null!=(i=null==(o=u.arrow)?void 0:o.y)?i:0)+f/2,y="",w="";return"bottom"===p?(y=c?h:"".concat(m,"px"),w="".concat(-f,"px")):"top"===p?(y=c?h:"".concat(m,"px"),w="".concat(s.floating.height+f,"px")):"right"===p?(y="".concat(-f,"px"),w=c?h:"".concat(g,"px")):"left"===p&&(y="".concat(s.floating.width+f,"px"),w=c?h:"".concat(g,"px")),{data:{x:y,y:w}}}});function ep(e){let[t,n="center"]=e.split("-");return[t,n]}var ev=a.forwardRef((e,t)=>{var n,r;let{container:o,...l}=e,[u,c]=a.useState(!1);V(()=>c(!0),[]);let d=o||u&&(null==(r=globalThis)||null==(n=r.document)?void 0:n.body);return d?s.default.createPortal((0,i.jsx)(R.div,{...l,ref:t}),d):null});ev.displayName="Portal";var eh=Symbol("radix.slottable");function em(e){return a.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===eh}a[" useEffectEvent ".trim().toString()],a[" useInsertionEffect ".trim().toString()];var eg=a[" useInsertionEffect ".trim().toString()]||V;function ey(e){let{prop:t,defaultProp:n,onChange:r=()=>{},caller:o}=e,[l,i,s]=function(e){let{defaultProp:t,onChange:n}=e,[r,o]=a.useState(t),l=a.useRef(r),i=a.useRef(n);return eg(()=>{i.current=n},[n]),a.useEffect(()=>{if(l.current!==r){var e;null==(e=i.current)||e.call(i,r),l.current=r}},[r,l]),[r,o,i]}({defaultProp:n,onChange:r}),u=void 0!==t,c=u?t:l;{let e=a.useRef(void 0!==t);a.useEffect(()=>{let t=e.current;if(t!==u){let e=u?"controlled":"uncontrolled";console.warn("".concat(o," is changing from ").concat(t?"controlled":"uncontrolled"," to ").concat(e,". Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component."))}e.current=u},[u,o])}return[c,a.useCallback(e=>{if(u){let r="function"==typeof e?e(t):e;if(r!==t){var n;null==(n=s.current)||n.call(s,r)}}else i(e)},[u,t,i,s])]}Symbol("RADIX:SYNC_STATE");var ew=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"});a.forwardRef((e,t)=>(0,i.jsx)(R.span,{...e,ref:t,style:{...ew,...e.style}})).displayName="VisuallyHidden";var eb=new WeakMap,ex=new WeakMap,eE={},eC=0,eS=function(e){return e&&(e.host||eS(e.parentNode))},eR=function(e,t,n,r){var o=(Array.isArray(e)?e:[e]).map(function(e){if(t.contains(e))return e;var n=eS(e);return n&&t.contains(n)?n:(console.error("aria-hidden",e,"in not contained inside",t,". Doing nothing"),null)}).filter(function(e){return!!e});eE[n]||(eE[n]=new WeakMap);var l=eE[n],i=[],a=new Set,s=new Set(o),u=function(e){!e||a.has(e)||(a.add(e),u(e.parentNode))};o.forEach(u);var c=function(e){!e||s.has(e)||Array.prototype.forEach.call(e.children,function(e){if(a.has(e))c(e);else try{var t=e.getAttribute(r),o=null!==t&&"false"!==t,s=(eb.get(e)||0)+1,u=(l.get(e)||0)+1;eb.set(e,s),l.set(e,u),i.push(e),1===s&&o&&ex.set(e,!0),1===u&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return c(t),a.clear(),eC++,function(){i.forEach(function(e){var t=eb.get(e)-1,o=l.get(e)-1;eb.set(e,t),l.set(e,o),t||(ex.has(e)||e.removeAttribute(r),ex.delete(e)),o||e.removeAttribute(n)}),--eC||(eb=new WeakMap,eb=new WeakMap,ex=new WeakMap,eE={})}},ej=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||("undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),eR(r,o,n,"aria-hidden")):function(){return null}},eA=function(){return(eA=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function eN(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}Object.create;Object.create;var eP=("function"==typeof SuppressedError&&SuppressedError,"right-scroll-bar-position"),ek="width-before-scroll-bar";function eT(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var eO="undefined"!=typeof window?a.useLayoutEffect:a.useEffect,eM=new WeakMap;function eL(e){return e}var e_=function(e){void 0===e&&(e={});var t,n,r,o=(void 0===t&&(t=eL),n=[],r=!1,{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:null},useMedium:function(e){var o=t(e,r);return n.push(o),function(){n=n.filter(function(e){return e!==o})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var o=n;n=[],o.forEach(e),t=n}var l=function(){var n=t;t=[],n.forEach(e)},i=function(){return Promise.resolve().then(l)};i(),n={push:function(e){t.push(e),i()},filter:function(e){return t=t.filter(e),n}}}});return o.options=eA({async:!0,ssr:!1},e),o}(),eI=function(){},eD=a.forwardRef(function(e,t){var n,r,o,l,i=a.useRef(null),s=a.useState({onScrollCapture:eI,onWheelCapture:eI,onTouchMoveCapture:eI}),u=s[0],c=s[1],d=e.forwardProps,f=e.children,p=e.className,v=e.removeScrollBar,h=e.enabled,m=e.shards,g=e.sideCar,y=e.noRelative,w=e.noIsolation,b=e.inert,x=e.allowPinchZoom,E=e.as,C=e.gapMode,S=eN(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),R=(n=[i,t],r=function(e){return n.forEach(function(t){return eT(t,e)})},(o=(0,a.useState)(function(){return{value:null,callback:r,facade:{get current(){return o.value},set current(value){var e=o.value;e!==value&&(o.value=value,o.callback(value,e))}}}})[0]).callback=r,l=o.facade,eO(function(){var e=eM.get(l);if(e){var t=new Set(e),r=new Set(n),o=l.current;t.forEach(function(e){r.has(e)||eT(e,null)}),r.forEach(function(e){t.has(e)||eT(e,o)})}eM.set(l,n)},[n]),l),j=eA(eA({},S),u);return a.createElement(a.Fragment,null,h&&a.createElement(g,{sideCar:e_,removeScrollBar:v,shards:m,noRelative:y,noIsolation:w,inert:b,setCallbacks:c,allowPinchZoom:!!x,lockRef:i,gapMode:C}),d?a.cloneElement(a.Children.only(f),eA(eA({},j),{ref:R})):a.createElement(void 0===E?"div":E,eA({},j,{className:p,ref:R}),f))});eD.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},eD.classNames={fullWidth:ek,zeroRight:eP};var eH=function(e){var t=e.sideCar,n=eN(e,["sideCar"]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error("Sidecar medium not found");return a.createElement(r,eA({},n))};eH.isSideCarExport=!0;var eW=function(){var e=0,t=null;return{add:function(n){if(0==e&&(t=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=l||("undefined"!=typeof __webpack_nonce__?__webpack_nonce__:void 0);return t&&e.setAttribute("nonce",t),e}())){var r,o;(r=t).styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),o=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(o)}e++},remove:function(){--e||!t||(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ez=function(){var e=eW();return function(t,n){a.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},eB=function(){var e=ez();return function(t){return e(t.styles,t.dynamic),null}},eF={left:0,top:0,right:0,gap:0},eV=function(e){return parseInt(e||"",10)||0},eK=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[eV(n),eV(r),eV(o)]},eU=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return eF;var t=eK(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},eY=eB(),eX="data-scroll-locked",eZ=function(e,t,n,r){var o=e.left,l=e.top,i=e.right,a=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(a,"px ").concat(r,";\n }\n body[").concat(eX,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(l,"px;\n padding-right: ").concat(i,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(a,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(eP," {\n right: ").concat(a,"px ").concat(r,";\n }\n \n .").concat(ek," {\n margin-right: ").concat(a,"px ").concat(r,";\n }\n \n .").concat(eP," .").concat(eP," {\n right: 0 ").concat(r,";\n }\n \n .").concat(ek," .").concat(ek," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(eX,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(a,"px;\n }\n")},eq=function(){var e=parseInt(document.body.getAttribute(eX)||"0",10);return isFinite(e)?e:0},eG=function(){a.useEffect(function(){return document.body.setAttribute(eX,(eq()+1).toString()),function(){var e=eq()-1;e<=0?document.body.removeAttribute(eX):document.body.setAttribute(eX,e.toString())}},[])},eJ=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=void 0===r?"margin":r;eG();var l=a.useMemo(function(){return eU(o)},[o]);return a.createElement(eY,{styles:eZ(l,!t,o,n?"":"!important")})},eQ=!1;if("undefined"!=typeof window)try{var e$=Object.defineProperty({},"passive",{get:function(){return eQ=!0,!0}});window.addEventListener("test",e$,e$),window.removeEventListener("test",e$,e$)}catch(e){eQ=!1}var e0=!!eQ&&{passive:!1},e1=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&(n.overflowY!==n.overflowX||"TEXTAREA"===e.tagName||"visible"!==n[t])},e2=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),e5(e,r)){var o=e3(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body)return!1},e5=function(e,t){return"v"===e?e1(t,"overflowY"):e1(t,"overflowX")},e3=function(e,t){return"v"===e?[t.scrollTop,t.scrollHeight,t.clientHeight]:[t.scrollLeft,t.scrollWidth,t.clientWidth]},e6=function(e,t,n,r,o){var l,i=(l=window.getComputedStyle(t).direction,"h"===e&&"rtl"===l?-1:1),a=i*r,s=n.target,u=t.contains(s),c=!1,d=a>0,f=0,p=0;do{if(!s)break;var v=e3(e,s),h=v[0],m=v[1]-v[2]-i*h;(h||m)&&e5(e,s)&&(f+=m,p+=h);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!u&&s!==document.body||u&&(t.contains(s)||t===s))return d&&(o&&1>Math.abs(f)||!o&&a>f)?c=!0:!d&&(o&&1>Math.abs(p)||!o&&-a>p)&&(c=!0),c},e7=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},e9=function(e){return[e.deltaX,e.deltaY]},e8=function(e){return e&&"current"in e?e.current:e},e4=0,te=[];let tt=(t=function(e){var t=a.useRef([]),n=a.useRef([0,0]),r=a.useRef(),o=a.useState(e4++)[0],l=a.useState(eB)[0],i=a.useRef(e);a.useEffect(function(){i.current=e},[e]),a.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=(function(e,t,n){if(n||2==arguments.length)for(var r,o=0,l=t.length;o<l;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))})([e.lockRef.current],(e.shards||[]).map(e8),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=a.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var o,l=e7(e),a=n.current,s="deltaX"in e?e.deltaX:a[0]-l[0],u="deltaY"in e?e.deltaY:a[1]-l[1],c=e.target,d=Math.abs(s)>Math.abs(u)?"h":"v";if("touches"in e&&"h"===d&&"range"===c.type)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===c||p.contains(c)))return!1;var v=e2(d,c);if(!v)return!0;if(v?o=d:(o="v"===d?"h":"v",v=e2(d,c)),!v)return!1;if(!r.current&&"changedTouches"in e&&(s||u)&&(r.current=o),!o)return!0;var h=r.current||o;return e6(h,t,e,"h"===h?s:u,!0)},[]),u=a.useCallback(function(e){if(te.length&&te[te.length-1]===l){var n="deltaY"in e?e9(e):e7(e),r=t.current.filter(function(t){var r;return t.name===e.type&&(t.target===e.target||e.target===t.shadowParent)&&(r=t.delta,r[0]===n[0]&&r[1]===n[1])})[0];if(r&&r.should){e.cancelable&&e.preventDefault();return}if(!r){var o=(i.current.shards||[]).map(e8).filter(Boolean).filter(function(t){return t.contains(e.target)});(o.length>0?s(e,o[0]):!i.current.noIsolation)&&e.cancelable&&e.preventDefault()}}},[]),c=a.useCallback(function(e,n,r,o){var l={name:e,delta:n,target:r,should:o,shadowParent:function(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}(r)};t.current.push(l),setTimeout(function(){t.current=t.current.filter(function(e){return e!==l})},1)},[]),d=a.useCallback(function(e){n.current=e7(e),r.current=void 0},[]),f=a.useCallback(function(t){c(t.type,e9(t),t.target,s(t,e.lockRef.current))},[]),p=a.useCallback(function(t){c(t.type,e7(t),t.target,s(t,e.lockRef.current))},[]);a.useEffect(function(){return te.push(l),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",u,e0),document.addEventListener("touchmove",u,e0),document.addEventListener("touchstart",d,e0),function(){te=te.filter(function(e){return e!==l}),document.removeEventListener("wheel",u,e0),document.removeEventListener("touchmove",u,e0),document.removeEventListener("touchstart",d,e0)}},[]);var v=e.removeScrollBar,h=e.inert;return a.createElement(a.Fragment,null,h?a.createElement(l,{styles:"\n .block-interactivity-".concat(o," {pointer-events: none;}\n .allow-interactivity-").concat(o," {pointer-events: all;}\n")}):null,v?a.createElement(eJ,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},e_.useMedium(t),eH);var tn=a.forwardRef(function(e,t){return a.createElement(eD,eA({},e,{ref:t,sideCar:tt}))});tn.classNames=eD.classNames;var tr=[" ","Enter","ArrowUp","ArrowDown"],to=[" ","Enter"],tl="Select",[ti,ta,ts]=function(e){let t=e+"CollectionProvider",[n,r]=(0,v.createContextScope)(t),[o,l]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=e=>{let{scope:t,children:n}=e,r=a.default.useRef(null),l=a.default.useRef(new Map).current;return(0,i.jsx)(o,{scope:t,itemMap:l,collectionRef:r,children:n})};s.displayName=t;let u=e+"CollectionSlot",c=m(u),d=a.default.forwardRef((e,t)=>{let{scope:n,children:r}=e,o=l(u,n),a=(0,h.useComposedRefs)(t,o.collectionRef);return(0,i.jsx)(c,{ref:a,children:r})});d.displayName=u;let f=e+"CollectionItemSlot",p="data-radix-collection-item",g=m(f),y=a.default.forwardRef((e,t)=>{let{scope:n,children:r,...o}=e,s=a.default.useRef(null),u=(0,h.useComposedRefs)(t,s),c=l(f,n);return a.default.useEffect(()=>(c.itemMap.set(s,{ref:s,...o}),()=>void c.itemMap.delete(s))),(0,i.jsx)(g,{...{[p]:""},ref:u,children:r})});return y.displayName=f,[{Provider:s,Slot:d,ItemSlot:y},function(t){let n=l(e+"CollectionConsumer",t);return a.default.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll("[".concat(p,"]")));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])},r]}(tl),[tu,tc]=(0,v.createContextScope)(tl,[ts,Q]),td=Q(),[tf,tp]=tu(tl),[tv,th]=tu(tl),tm=e=>{let{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:l,value:s,defaultValue:u,onValueChange:c,dir:d,name:f,autoComplete:p,disabled:v,required:h,form:m}=e,g=td(t),[y,w]=a.useState(null),[b,x]=a.useState(null),[C,S]=a.useState(!1),R=function(e){let t=a.useContext(E);return e||t||"ltr"}(d),[j,A]=ey({prop:r,defaultProp:null!=o&&o,onChange:l,caller:tl}),[N,P]=ey({prop:s,defaultProp:u,onChange:c,caller:tl}),k=a.useRef(null),T=!y||m||!!y.closest("form"),[O,M]=a.useState(new Set),L=Array.from(O).map(e=>e.props.value).join(";");return(0,i.jsx)(et,{...g,children:(0,i.jsxs)(tf,{required:h,scope:t,trigger:y,onTriggerChange:w,valueNode:b,onValueNodeChange:x,valueNodeHasChildren:C,onValueNodeHasChildrenChange:S,contentId:Y(),value:N,onValueChange:P,open:j,onOpenChange:A,dir:R,triggerPointerDownPosRef:k,disabled:v,children:[(0,i.jsx)(ti.Provider,{scope:t,children:(0,i.jsx)(tv,{scope:e.__scopeSelect,onNativeOptionAdd:a.useCallback(e=>{M(t=>new Set(t).add(e))},[]),onNativeOptionRemove:a.useCallback(e=>{M(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:n})}),T?(0,i.jsxs)(t$,{"aria-hidden":!0,required:h,tabIndex:-1,name:f,autoComplete:p,value:N,onChange:e=>P(e.target.value),disabled:v,form:m,children:[void 0===N?(0,i.jsx)("option",{value:""}):null,Array.from(O)]},L):null]})})};tm.displayName=tl;var tg="SelectTrigger",ty=a.forwardRef((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...o}=e,l=td(n),s=tp(tg,n),u=s.disabled||r,d=(0,h.useComposedRefs)(t,s.onTriggerChange),f=ta(n),p=a.useRef("touch"),[v,m,g]=t1(e=>{let t=f().filter(e=>!e.disabled),n=t.find(e=>e.value===s.value),r=t2(t,e,n);void 0!==r&&s.onValueChange(r.value)}),y=e=>{u||(s.onOpenChange(!0),g()),e&&(s.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,i.jsx)(er,{asChild:!0,...l,children:(0,i.jsx)(R.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:u,"data-disabled":u?"":void 0,"data-placeholder":t0(s.value)?"":void 0,...o,ref:d,onClick:(0,c.composeEventHandlers)(o.onClick,e=>{e.currentTarget.focus(),"mouse"!==p.current&&y(e)}),onPointerDown:(0,c.composeEventHandlers)(o.onPointerDown,e=>{p.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(y(e),e.preventDefault())}),onKeyDown:(0,c.composeEventHandlers)(o.onKeyDown,e=>{let t=""!==v.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||m(e.key),(!t||" "!==e.key)&&tr.includes(e.key)&&(y(),e.preventDefault())})})})});ty.displayName=tg;var tw="SelectValue",tb=a.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:o,children:l,placeholder:a="",...s}=e,u=tp(tw,n),{onValueNodeHasChildrenChange:c}=u,d=void 0!==l,f=(0,h.useComposedRefs)(t,u.onValueNodeChange);return V(()=>{c(d)},[c,d]),(0,i.jsx)(R.span,{...s,ref:f,style:{pointerEvents:"none"},children:t0(u.value)?(0,i.jsx)(i.Fragment,{children:a}):l})});tb.displayName=tw;var tx=a.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...o}=e;return(0,i.jsx)(R.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});tx.displayName="SelectIcon";var tE=e=>(0,i.jsx)(ev,{asChild:!0,...e});tE.displayName="SelectPortal";var tC="SelectContent",tS=a.forwardRef((e,t)=>{let n=tp(tC,e.__scopeSelect),[r,o]=a.useState();return(V(()=>{o(new DocumentFragment)},[]),n.open)?(0,i.jsx)(tN,{...e,ref:t}):r?s.createPortal((0,i.jsx)(tR,{scope:e.__scopeSelect,children:(0,i.jsx)(ti.Slot,{scope:e.__scopeSelect,children:(0,i.jsx)("div",{children:e.children})})}),r):null});tS.displayName=tC;var[tR,tj]=tu(tC),tA=function(e){let t=function(e){let t=a.forwardRef((e,t)=>{let{children:n,...r}=e;if(a.isValidElement(n)){var o,l,i;let e,s,u=(s=(e=null==(l=Object.getOwnPropertyDescriptor((o=n).props,"ref"))?void 0:l.get)&&"isReactWarning"in e&&e.isReactWarning)?o.ref:(s=(e=null==(i=Object.getOwnPropertyDescriptor(o,"ref"))?void 0:i.get)&&"isReactWarning"in e&&e.isReactWarning)?o.props.ref:o.props.ref||o.ref,c=function(e,t){let n={...t};for(let r in t){let o=e[r],l=t[r];/^on[A-Z]/.test(r)?o&&l?n[r]=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];let r=l(...t);return o(...t),r}:o&&(n[r]=o):"style"===r?n[r]={...o,...l}:"className"===r&&(n[r]=[o,l].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==a.Fragment&&(c.ref=t?(0,h.composeRefs)(t,u):u),a.cloneElement(n,c)}return a.Children.count(n)>1?a.Children.only(null):null});return t.displayName="".concat(e,".SlotClone"),t}(e),n=a.forwardRef((e,n)=>{let{children:r,...o}=e,l=a.Children.toArray(r),s=l.find(em);if(s){let e=s.props.children,r=l.map(t=>t!==s?t:a.Children.count(e)>1?a.Children.only(null):a.isValidElement(e)?e.props.children:null);return(0,i.jsx)(t,{...o,ref:n,children:a.isValidElement(e)?a.cloneElement(e,void 0,r):null})}return(0,i.jsx)(t,{...o,ref:n,children:r})});return n.displayName="".concat(e,".Slot"),n}("SelectContent.RemoveScroll"),tN=a.forwardRef((e,t)=>{let{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:l,onPointerDownOutside:s,side:u,sideOffset:d,align:f,alignOffset:p,arrowPadding:v,collisionBoundary:m,collisionPadding:g,sticky:y,hideWhenDetached:w,avoidCollisions:b,...x}=e,E=tp(tC,n),[C,S]=a.useState(null),[R,j]=a.useState(null),A=(0,h.useComposedRefs)(t,e=>S(e)),[N,k]=a.useState(null),[T,L]=a.useState(null),_=ta(n),[I,H]=a.useState(!1),W=a.useRef(!1);a.useEffect(()=>{if(C)return ej(C)},[C]),a.useEffect(()=>{var e,t;let n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!=(e=n[0])?e:M()),document.body.insertAdjacentElement("beforeend",null!=(t=n[1])?t:M()),O++,()=>{1===O&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),O--}},[]);let z=a.useCallback(e=>{let[t,...n]=_().map(e=>e.ref.current),[r]=n.slice(-1),o=document.activeElement;for(let n of e)if(n===o||(null==n||n.scrollIntoView({block:"nearest"}),n===t&&R&&(R.scrollTop=0),n===r&&R&&(R.scrollTop=R.scrollHeight),null==n||n.focus(),document.activeElement!==o))return},[_,R]),B=a.useCallback(()=>z([N,C]),[z,N,C]);a.useEffect(()=>{I&&B()},[I,B]);let{onOpenChange:F,triggerPointerDownPosRef:V}=E;a.useEffect(()=>{if(C){let e={x:0,y:0},t=t=>{var n,r,o,l;e={x:Math.abs(Math.round(t.pageX)-(null!=(o=null==(n=V.current)?void 0:n.x)?o:0)),y:Math.abs(Math.round(t.pageY)-(null!=(l=null==(r=V.current)?void 0:r.y)?l:0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():C.contains(n.target)||F(!1),document.removeEventListener("pointermove",t),V.current=null};return null!==V.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}},[C,F,V]),a.useEffect(()=>{let e=()=>F(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[F]);let[K,U]=t1(e=>{let t=_().filter(e=>!e.disabled),n=t.find(e=>e.ref.current===document.activeElement),r=t2(t,e,n);r&&setTimeout(()=>r.ref.current.focus())}),Y=a.useCallback((e,t,n)=>{let r=!W.current&&!n;(void 0!==E.value&&E.value===t||r)&&(k(e),r&&(W.current=!0))},[E.value]),X=a.useCallback(()=>null==C?void 0:C.focus(),[C]),Z=a.useCallback((e,t,n)=>{let r=!W.current&&!n;(void 0!==E.value&&E.value===t||r)&&L(e)},[E.value]),q="popper"===r?tk:tP,G=q===tk?{side:u,sideOffset:d,align:f,alignOffset:p,arrowPadding:v,collisionBoundary:m,collisionPadding:g,sticky:y,hideWhenDetached:w,avoidCollisions:b}:{};return(0,i.jsx)(tR,{scope:n,content:C,viewport:R,onViewportChange:j,itemRefCallback:Y,selectedItem:N,onItemLeave:X,itemTextRefCallback:Z,focusSelectedItem:B,selectedItemText:T,position:r,isPositioned:I,searchRef:K,children:(0,i.jsx)(tn,{as:tA,allowPinchZoom:!0,children:(0,i.jsx)(D,{asChild:!0,trapped:E.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:(0,c.composeEventHandlers)(o,e=>{var t;null==(t=E.trigger)||t.focus({preventScroll:!0}),e.preventDefault()}),children:(0,i.jsx)(P,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>E.onOpenChange(!1),children:(0,i.jsx)(q,{role:"listbox",id:E.contentId,"data-state":E.open?"open":"closed",dir:E.dir,onContextMenu:e=>e.preventDefault(),...x,...G,onPlaced:()=>H(!0),ref:A,style:{display:"flex",flexDirection:"column",outline:"none",...x.style},onKeyDown:(0,c.composeEventHandlers)(x.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||U(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=_().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>z(t)),e.preventDefault()}})})})})})})});tN.displayName="SelectContentImpl";var tP=a.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:r,...o}=e,l=tp(tC,n),s=tj(tC,n),[c,d]=a.useState(null),[f,p]=a.useState(null),v=(0,h.useComposedRefs)(t,e=>p(e)),m=ta(n),g=a.useRef(!1),y=a.useRef(!0),{viewport:w,selectedItem:b,selectedItemText:x,focusSelectedItem:E}=s,C=a.useCallback(()=>{if(l.trigger&&l.valueNode&&c&&f&&w&&b&&x){let e=l.trigger.getBoundingClientRect(),t=f.getBoundingClientRect(),n=l.valueNode.getBoundingClientRect(),o=x.getBoundingClientRect();if("rtl"!==l.dir){let r=o.left-t.left,l=n.left-r,i=e.left-l,a=e.width+i,s=Math.max(a,t.width),d=window.innerWidth-10,f=(0,u.clamp)(l,[10,Math.max(10,d-s)]);c.style.minWidth=a+"px",c.style.left=f+"px"}else{let r=t.right-o.right,l=window.innerWidth-n.right-r,i=window.innerWidth-e.right-l,a=e.width+i,s=Math.max(a,t.width),d=window.innerWidth-10,f=(0,u.clamp)(l,[10,Math.max(10,d-s)]);c.style.minWidth=a+"px",c.style.right=f+"px"}let i=m(),a=window.innerHeight-20,s=w.scrollHeight,d=window.getComputedStyle(f),p=parseInt(d.borderTopWidth,10),v=parseInt(d.paddingTop,10),h=parseInt(d.borderBottomWidth,10),y=p+v+s+parseInt(d.paddingBottom,10)+h,E=Math.min(5*b.offsetHeight,y),C=window.getComputedStyle(w),S=parseInt(C.paddingTop,10),R=parseInt(C.paddingBottom,10),j=e.top+e.height/2-10,A=b.offsetHeight/2,N=p+v+(b.offsetTop+A);if(N<=j){let e=i.length>0&&b===i[i.length-1].ref.current;c.style.bottom="0px";let t=Math.max(a-j,A+(e?R:0)+(f.clientHeight-w.offsetTop-w.offsetHeight)+h);c.style.height=N+t+"px"}else{let e=i.length>0&&b===i[0].ref.current;c.style.top="0px";let t=Math.max(j,p+w.offsetTop+(e?S:0)+A);c.style.height=t+(y-N)+"px",w.scrollTop=N-j+w.offsetTop}c.style.margin="".concat(10,"px 0"),c.style.minHeight=E+"px",c.style.maxHeight=a+"px",null==r||r(),requestAnimationFrame(()=>g.current=!0)}},[m,l.trigger,l.valueNode,c,f,w,b,x,l.dir,r]);V(()=>C(),[C]);let[S,j]=a.useState();V(()=>{f&&j(window.getComputedStyle(f).zIndex)},[f]);let A=a.useCallback(e=>{e&&!0===y.current&&(C(),null==E||E(),y.current=!1)},[C,E]);return(0,i.jsx)(tT,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:g,onScrollButtonChange:A,children:(0,i.jsx)("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:(0,i.jsx)(R.div,{...o,ref:v,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});tP.displayName="SelectItemAlignedPosition";var tk=a.forwardRef((e,t)=>{let{__scopeSelect:n,align:r="start",collisionPadding:o=10,...l}=e,a=td(n);return(0,i.jsx)(ea,{...a,...l,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...l.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});tk.displayName="SelectPopperPosition";var[tT,tO]=tu(tC,{}),tM="SelectViewport",tL=a.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:r,...o}=e,l=tj(tM,n),s=tO(tM,n),u=(0,h.useComposedRefs)(t,l.onViewportChange),d=a.useRef(0);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),(0,i.jsx)(ti.Slot,{scope:n,children:(0,i.jsx)(R.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:(0,c.composeEventHandlers)(o.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=s;if((null==r?void 0:r.current)&&n){let e=Math.abs(d.current-t.scrollTop);if(e>0){let r=window.innerHeight-20,o=Math.max(parseFloat(n.style.minHeight),parseFloat(n.style.height));if(o<r){let l=o+e,i=Math.min(r,l),a=l-i;n.style.height=i+"px","0px"===n.style.bottom&&(t.scrollTop=a>0?a:0,n.style.justifyContent="flex-end")}}}d.current=t.scrollTop})})})]})});tL.displayName=tM;var t_="SelectGroup",[tI,tD]=tu(t_);a.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,o=Y();return(0,i.jsx)(tI,{scope:n,id:o,children:(0,i.jsx)(R.div,{role:"group","aria-labelledby":o,...r,ref:t})})}).displayName=t_;var tH="SelectLabel";a.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,o=tD(tH,n);return(0,i.jsx)(R.div,{id:o.id,...r,ref:t})}).displayName=tH;var tW="SelectItem",[tz,tB]=tu(tW),tF=a.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,disabled:o=!1,textValue:l,...s}=e,u=tp(tW,n),d=tj(tW,n),f=u.value===r,[p,v]=a.useState(null!=l?l:""),[m,g]=a.useState(!1),y=(0,h.useComposedRefs)(t,e=>{var t;return null==(t=d.itemRefCallback)?void 0:t.call(d,e,r,o)}),w=Y(),b=a.useRef("touch"),x=()=>{o||(u.onValueChange(r),u.onOpenChange(!1))};if(""===r)throw Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return(0,i.jsx)(tz,{scope:n,value:r,disabled:o,textId:w,isSelected:f,onItemTextChange:a.useCallback(e=>{v(t=>{var n;return t||(null!=(n=null==e?void 0:e.textContent)?n:"").trim()})},[]),children:(0,i.jsx)(ti.ItemSlot,{scope:n,value:r,disabled:o,textValue:p,children:(0,i.jsx)(R.div,{role:"option","aria-labelledby":w,"data-highlighted":m?"":void 0,"aria-selected":f&&m,"data-state":f?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...s,ref:y,onFocus:(0,c.composeEventHandlers)(s.onFocus,()=>g(!0)),onBlur:(0,c.composeEventHandlers)(s.onBlur,()=>g(!1)),onClick:(0,c.composeEventHandlers)(s.onClick,()=>{"mouse"!==b.current&&x()}),onPointerUp:(0,c.composeEventHandlers)(s.onPointerUp,()=>{"mouse"===b.current&&x()}),onPointerDown:(0,c.composeEventHandlers)(s.onPointerDown,e=>{b.current=e.pointerType}),onPointerMove:(0,c.composeEventHandlers)(s.onPointerMove,e=>{if(b.current=e.pointerType,o){var t;null==(t=d.onItemLeave)||t.call(d)}else"mouse"===b.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:(0,c.composeEventHandlers)(s.onPointerLeave,e=>{if(e.currentTarget===document.activeElement){var t;null==(t=d.onItemLeave)||t.call(d)}}),onKeyDown:(0,c.composeEventHandlers)(s.onKeyDown,e=>{var t;((null==(t=d.searchRef)?void 0:t.current)===""||" "!==e.key)&&(to.includes(e.key)&&x()," "===e.key&&e.preventDefault())})})})})});tF.displayName=tW;var tV="SelectItemText",tK=a.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:o,...l}=e,u=tp(tV,n),c=tj(tV,n),d=tB(tV,n),f=th(tV,n),[p,v]=a.useState(null),m=(0,h.useComposedRefs)(t,e=>v(e),d.onItemTextChange,e=>{var t;return null==(t=c.itemTextRefCallback)?void 0:t.call(c,e,d.value,d.disabled)}),g=null==p?void 0:p.textContent,y=a.useMemo(()=>(0,i.jsx)("option",{value:d.value,disabled:d.disabled,children:g},d.value),[d.disabled,d.value,g]),{onNativeOptionAdd:w,onNativeOptionRemove:b}=f;return V(()=>(w(y),()=>b(y)),[w,b,y]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(R.span,{id:d.textId,...l,ref:m}),d.isSelected&&u.valueNode&&!u.valueNodeHasChildren?s.createPortal(l.children,u.valueNode):null]})});tK.displayName=tV;var tU="SelectItemIndicator",tY=a.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return tB(tU,n).isSelected?(0,i.jsx)(R.span,{"aria-hidden":!0,...r,ref:t}):null});tY.displayName=tU;var tX="SelectScrollUpButton",tZ=a.forwardRef((e,t)=>{let n=tj(tX,e.__scopeSelect),r=tO(tX,e.__scopeSelect),[o,l]=a.useState(!1),s=(0,h.useComposedRefs)(t,r.onScrollButtonChange);return V(()=>{if(n.viewport&&n.isPositioned){let e=function(){l(t.scrollTop>0)},t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[n.viewport,n.isPositioned]),o?(0,i.jsx)(tJ,{...e,ref:s,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});tZ.displayName=tX;var tq="SelectScrollDownButton",tG=a.forwardRef((e,t)=>{let n=tj(tq,e.__scopeSelect),r=tO(tq,e.__scopeSelect),[o,l]=a.useState(!1),s=(0,h.useComposedRefs)(t,r.onScrollButtonChange);return V(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;l(Math.ceil(t.scrollTop)<e)},t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[n.viewport,n.isPositioned]),o?(0,i.jsx)(tJ,{...e,ref:s,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});tG.displayName=tq;var tJ=a.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...o}=e,l=tj("SelectScrollButton",n),s=a.useRef(null),u=ta(n),d=a.useCallback(()=>{null!==s.current&&(window.clearInterval(s.current),s.current=null)},[]);return a.useEffect(()=>()=>d(),[d]),V(()=>{var e;let t=u().find(e=>e.ref.current===document.activeElement);null==t||null==(e=t.ref.current)||e.scrollIntoView({block:"nearest"})},[u]),(0,i.jsx)(R.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:(0,c.composeEventHandlers)(o.onPointerDown,()=>{null===s.current&&(s.current=window.setInterval(r,50))}),onPointerMove:(0,c.composeEventHandlers)(o.onPointerMove,()=>{var e;null==(e=l.onItemLeave)||e.call(l),null===s.current&&(s.current=window.setInterval(r,50))}),onPointerLeave:(0,c.composeEventHandlers)(o.onPointerLeave,()=>{d()})})});a.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return(0,i.jsx)(R.div,{"aria-hidden":!0,...r,ref:t})}).displayName="SelectSeparator";var tQ="SelectArrow";a.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,o=td(n),l=tp(tQ,n),a=tj(tQ,n);return l.open&&"popper"===a.position?(0,i.jsx)(ec,{...o,...r,ref:t}):null}).displayName=tQ;var t$=a.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,...o}=e,l=a.useRef(null),s=(0,h.useComposedRefs)(t,l),u=function(e){let t=a.useRef({value:e,previous:e});return a.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}(r);return a.useEffect(()=>{let e=l.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype,"value").set;if(u!==r&&t){let n=new Event("change",{bubbles:!0});t.call(e,r),e.dispatchEvent(n)}},[u,r]),(0,i.jsx)(R.select,{...o,style:{...ew,...o.style},ref:s,defaultValue:r})});function t0(e){return""===e||void 0===e}function t1(e){let t=j(e),n=a.useRef(""),r=a.useRef(0),o=a.useCallback(e=>{let o=n.current+e;t(o),function e(t){n.current=t,window.clearTimeout(r.current),""!==t&&(r.current=window.setTimeout(()=>e(""),1e3))}(o)},[t]),l=a.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return a.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,l]}function t2(e,t,n){var r,o;let l=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=(r=e,o=Math.max(i,0),r.map((e,t)=>r[(o+t)%r.length]));1===l.length&&(a=a.filter(e=>e!==n));let s=a.find(e=>e.textValue.toLowerCase().startsWith(l.toLowerCase()));return s!==n?s:void 0}t$.displayName="SelectBubbleInput";var t5=e.i(72064),t3=e.i(75157);function t6(e){let{...t}=e;return(0,i.jsx)(tm,{"data-slot":"select",...t})}function t7(e){let{...t}=e;return(0,i.jsx)(tb,{"data-slot":"select-value",...t})}function t9(e){let{className:t,size:n="default",children:r,...o}=e;return(0,i.jsxs)(ty,{"data-slot":"select-trigger","data-size":n,className:(0,t3.cn)("flex h-8 w-fit min-w-24 items-center justify-between gap-2 whitespace-nowrap rounded-md border !border-solid border-[var(--ds-border,var(--input))] bg-transparent px-2.5 py-1 text-sm outline-none transition-[color,box-shadow,border-color] duration-150 ease-in-out placeholder:text-muted-foreground hover:border-[var(--border-hover)] hover:bg-[var(--surface-2)] focus-visible:border-[var(--border-focus)] focus-visible:[box-shadow:var(--ring-focus-sm)] disabled:cursor-not-allowed disabled:opacity-50 disabled:focus-visible:border-[var(--ds-border,var(--input))] disabled:focus-visible:[box-shadow:none] data-[size=default]:h-8 data-[size=sm]:h-7 data-[state=open]:border-[var(--border-focus)] data-[state=open]:[box-shadow:var(--ring-focus-sm)]",t),...o,children:[r,(0,i.jsx)(tx,{asChild:!0,children:(0,i.jsx)(t5.default,{name:"ChevronDown",size:16,className:"opacity-60",strokeWidth:1})})]})}function t8(e){let{className:t,children:n,position:r="popper",...o}=e;return(0,i.jsx)(tE,{children:(0,i.jsxs)(tS,{"data-slot":"select-content",className:(0,t3.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 relative z-[10001] max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md","popper"===r&&"data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),position:r,...o,children:[(0,i.jsx)(tZ,{className:"flex cursor-default items-center justify-center py-1",children:(0,i.jsx)(t5.default,{name:"ChevronUp",size:16})}),(0,i.jsx)(tL,{className:(0,t3.cn)("p-1","popper"===r&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:n}),(0,i.jsx)(tG,{className:"flex cursor-default items-center justify-center py-1",children:(0,i.jsx)(t5.default,{name:"ChevronDown",size:16,strokeWidth:1})})]})})}function t4(e){let{className:t,children:n,...r}=e;return(0,i.jsxs)(tF,{"data-slot":"select-item",className:(0,t3.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none hover:bg-[var(--ds-item-hover)] focus:bg-[var(--ds-item-hover)] focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...r,children:[(0,i.jsx)("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,i.jsx)(tY,{children:(0,i.jsx)(t5.default,{name:"Check",size:16})})}),(0,i.jsx)(tK,{children:n})]})}}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,24687,e=>{"use strict";e.s(["Textarea",()=>o]);var a=e.i(18050),s=e.i(75157);function o(e){let{className:o,...r}=e;return(0,a.jsx)("textarea",{"data-slot":"textarea",className:(0,s.cn)("flex min-h-20 w-full rounded-md border border-solid border-border bg-transparent px-3 py-2 text-sm outline-none transition-[color,box-shadow,border-color] duration-150 ease-in-out placeholder:text-muted-foreground hover:border-[#e0e0e0] focus-visible:border-[var(--border-focus)] focus-visible:[box-shadow:var(--ring-focus-sm)] read-only:focus-visible:border-border read-only:focus-visible:[box-shadow:none] disabled:cursor-not-allowed disabled:opacity-50 disabled:focus-visible:border-border disabled:focus-visible:[box-shadow:none]",o),...r})}},98083,e=>{"use strict";e.s(["AgentManageView",()=>c],98083);var a=e.i(18050),s=e.i(71645),o=e.i(19455),r=e.i(13354),t=e.i(75157),i=e.i(24687);function n(e){let{value:s,onChange:o,loading:r=!1,className:n}=e;return(0,a.jsx)("div",{className:(0,t.cn)("flex min-h-[200px] flex-col",n),children:r?(0,a.jsx)("div",{className:"tool-files-state py-4",children:"加载 agent.md…"}):(0,a.jsx)(i.Textarea,{className:(0,t.cn)("agent-md-editor min-h-[110px] resize-y focus-visible:ring-1 focus-visible:ring-ring"),spellCheck:!1,value:s,onChange:e=>o(e.target.value),placeholder:"编辑当前 Agent 的提示词(agent.md)"})})}var l=e.i(87243),d=e.i(82136);function c(){let{agentMdText:e,setAgentMdText:t,agentLoading:i,loadAgentPrompt:c,saveAgentPrompt:u}=function(e){let{currentAgent:a}=(0,l.useSession)(),[o,t]=(0,s.useState)(!1),[i,n]=(0,s.useState)(""),c=(0,s.useCallback)(async()=>{t(!0);try{let e=await (0,d.loadAgentPrompt)(a());n(e)}catch(e){r.appToast.error("加载 agent.md 失败:".concat(e instanceof Error?e.message:String(e)))}finally{t(!1)}},[a]),u=(0,s.useCallback)(async e=>{await (0,d.saveAgentPrompt)(a(),i),(null==e?void 0:e.silent)||r.appToast.success("已保存 agent.md。")},[a,i]);return(0,s.useEffect)(()=>{c()},[c,void 0]),{agentMdText:i,setAgentMdText:n,agentLoading:o,loadAgentPrompt:c,saveAgentPrompt:u}}(),[b,f]=(0,s.useState)(!1),x=(0,s.useCallback)(async()=>{f(!0);try{await u()}catch(e){r.appToast.error("保存失败:".concat(e instanceof Error?e.message:String(e)))}finally{f(!1)}},[u]);return(0,a.jsxs)("div",{className:"manage-page-content flex min-h-0 flex-1 flex-col rounded-xl border bg-[#fff] shadow-[var(--shadow-md)]",children:[(0,a.jsx)("div",{className:"flex min-h-0 flex-1 flex-col p-4",children:(0,a.jsx)(n,{value:e,onChange:t,loading:i,className:"min-h-0 flex-1"})}),(0,a.jsxs)("div",{className:"flex shrink-0 justify-end gap-2 border-t border-[var(--ds-border)] px-4 py-3",children:[(0,a.jsx)(o.Button,{type:"button",variant:"plain-outline",size:"lg",disabled:i||b,onClick:()=>void c(),children:"取消"}),(0,a.jsx)(o.Button,{type:"button",size:"lg",disabled:i||b,onClick:()=>void x(),children:"保存"})]})]})}}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,86404,e=>{"use strict";let t;e.s(["AddAccountView",()=>tJ],86404);var r,a,n,s,i=e.i(18050),o=e.i(53145);let d=(e,t,r)=>{if(e&&"reportValidity"in e){let a=(0,o.get)(r,t);e.setCustomValidity(a&&a.message||""),e.reportValidity()}},l=(e,t)=>{for(let r in t.fields){let a=t.fields[r];a&&a.ref&&"reportValidity"in a.ref?d(a.ref,r,e):a&&a.refs&&a.refs.forEach(t=>d(t,r,e))}},u=(e,t)=>{t.shouldUseNativeValidation&&l(e,t);let r={};for(let a in e){let n=(0,o.get)(t.fields,a),s=Object.assign(e[a]||{},{ref:n&&n.ref});if(c(t.names||Object.keys(e),a)){let e=Object.assign({},(0,o.get)(r,a));(0,o.set)(e,"root",s),(0,o.set)(r,a,e)}else(0,o.set)(r,a,s)}return r},c=(e,t)=>{let r=h(t);return e.some(e=>h(e).match("^".concat(r,"\\.\\d+")))};function h(e){return e.replace(/\]|\[/g,"")}function p(e,t,r){var a;function n(r,a){var n,s;for(let i in Object.defineProperty(r,"_zod",{value:null!=(s=r._zod)?s:{},enumerable:!1}),null!=(n=r._zod).traits||(n.traits=new Set),r._zod.traits.add(e),t(r,a),o.prototype)i in r||Object.defineProperty(r,i,{value:o.prototype[i].bind(r)});r._zod.constr=o,r._zod.def=a}let s=null!=(a=null==r?void 0:r.Parent)?a:Object;class i extends s{}function o(e){var t;let a=(null==r?void 0:r.Parent)?new i:this;for(let r of(n(a,e),null!=(t=a._zod).deferred||(t.deferred=[]),a._zod.deferred))r();return a}return Object.defineProperty(i,"name",{value:e}),Object.defineProperty(o,"init",{value:n}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>{var a,n;return null!=r&&!!r.Parent&&t instanceof r.Parent||(null==t||null==(n=t._zod)||null==(a=n.traits)?void 0:a.has(e))}}),Object.defineProperty(o,"name",{value:e}),o}Object.freeze({status:"aborted"}),Symbol("zod_brand");class m extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}let f={};function g(e){return e&&Object.assign(f,e),f}function v(e,t){return"bigint"==typeof t?t.toString():t}let y=Error.captureStackTrace?Error.captureStackTrace:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r]};function _(e){return"string"==typeof e?e:null==e?void 0:e.message}function b(e,t,r){var a,n,s,i,o,d,l,u,c,h,p;let m={...e,path:null!=(a=e.path)?a:[]};return e.message||(m.message=null!=(p=null!=(h=null!=(c=null!=(u=_(null==(i=e.inst)||null==(s=i._zod.def)||null==(n=s.error)?void 0:n.call(s,e)))?u:_(null==t||null==(o=t.error)?void 0:o.call(t,e)))?c:_(null==(d=r.customError)?void 0:d.call(r,e)))?h:_(null==(l=r.localeError)?void 0:l.call(r,e)))?p:"Invalid input"),delete m.inst,delete m.continue,(null==t?void 0:t.reportInput)||delete m.input,m}Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,Number.MAX_VALUE,Number.MAX_VALUE;let x=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),Object.defineProperty(e,"message",{get:()=>JSON.stringify(t,v,2),enumerable:!0}),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},k=p("$ZodError",x),w=p("$ZodError",x,{Parent:Error}),Z=(e,t,r,a)=>{let n=r?Object.assign(r,{async:!1}):{async:!1},s=e._zod.run({value:t,issues:[]},n);if(s instanceof Promise)throw new m;if(s.issues.length){var i;let e=new(null!=(i=null==a?void 0:a.Err)?i:w)(s.issues.map(e=>b(e,n,g())));throw y(e,null==a?void 0:a.callee),e}return s.value},j=async(e,t,r,a)=>{let n=r?Object.assign(r,{async:!0}):{async:!0},s=e._zod.run({value:t,issues:[]},n);if(s instanceof Promise&&(s=await s),s.issues.length){var i;let e=new(null!=(i=null==a?void 0:a.Err)?i:w)(s.issues.map(e=>b(e,n,g())));throw y(e,null==a?void 0:a.callee),e}return s.value};function T(e,t){try{var r=e()}catch(e){return t(e)}return r&&r.then?r.then(void 0,t):r}var N=e.i(71645);e.s(["BRAND",()=>eG,"DIRTY",()=>U,"EMPTY_PATH",()=>z,"INVALID",()=>D,"NEVER",()=>tI,"OK",()=>B,"ParseStatus",()=>V,"Schema",()=>G,"ZodAny",()=>eZ,"ZodArray",()=>eS,"ZodBigInt",()=>ey,"ZodBoolean",()=>e_,"ZodBranded",()=>eX,"ZodCatch",()=>eY,"ZodDate",()=>eb,"ZodDefault",()=>eJ,"ZodDiscriminatedUnion",()=>eE,"ZodEffects",()=>e$,"ZodEnum",()=>eU,"ZodError",()=>E,"ZodFirstPartyTypeKind",()=>s,"ZodFunction",()=>ez,"ZodIntersection",()=>eI,"ZodIssueCode",()=>C,"ZodLazy",()=>eL,"ZodLiteral",()=>eV,"ZodMap",()=>eR,"ZodNaN",()=>eH,"ZodNativeEnum",()=>eB,"ZodNever",()=>eT,"ZodNull",()=>ew,"ZodNullable",()=>eq,"ZodNumber",()=>ev,"ZodObject",()=>eO,"ZodOptional",()=>eW,"ZodParsedType",()=>S,"ZodPipeline",()=>eQ,"ZodPromise",()=>eK,"ZodReadonly",()=>e0,"ZodRecord",()=>eF,"ZodSchema",()=>G,"ZodSet",()=>eM,"ZodString",()=>eg,"ZodSymbol",()=>ex,"ZodTransformer",()=>e$,"ZodTuple",()=>eP,"ZodType",()=>G,"ZodUndefined",()=>ek,"ZodUnion",()=>eC,"ZodUnknown",()=>ej,"ZodVoid",()=>eN,"addIssueToContext",()=>L,"any",()=>tn,"array",()=>td,"bigint",()=>e7,"boolean",()=>e8,"coerce",()=>tE,"custom",()=>e9,"date",()=>te,"datetimeRegex",()=>ef,"defaultErrorMap",()=>I,"discriminatedUnion",()=>th,"effect",()=>tZ,"enum",()=>tx,"function",()=>ty,"getErrorMap",()=>R,"getParsedType",()=>O,"instanceof",()=>e2,"intersection",()=>tp,"isAborted",()=>K,"isAsync",()=>q,"isDirty",()=>$,"isValid",()=>W,"late",()=>e4,"lazy",()=>t_,"literal",()=>tb,"makeIssue",()=>M,"map",()=>tg,"nan",()=>e3,"nativeEnum",()=>tk,"never",()=>ti,"null",()=>ta,"nullable",()=>tT,"number",()=>e6,"object",()=>tl,"objectUtil",()=>a,"oboolean",()=>tA,"onumber",()=>tC,"optional",()=>tj,"ostring",()=>tO,"pipeline",()=>tS,"preprocess",()=>tN,"promise",()=>tw,"quotelessJson",()=>A,"record",()=>tf,"set",()=>tv,"setErrorMap",()=>F,"strictObject",()=>tu,"string",()=>e5,"symbol",()=>tt,"transformer",()=>tZ,"tuple",()=>tm,"undefined",()=>tr,"union",()=>tc,"unknown",()=>ts,"util",()=>r,"void",()=>to],88685),e.s([],38570),e.i(38570),e.s(["defaultErrorMap",()=>I,"getErrorMap",()=>R,"setErrorMap",()=>F],77290),e.s(["getErrorMap",()=>R,"setErrorMap",()=>F],37904),e.s(["ZodError",()=>E,"ZodIssueCode",()=>C,"quotelessJson",()=>A],69790),e.s(["ZodParsedType",()=>S,"getParsedType",()=>O,"objectUtil",()=>a,"util",()=>r],4783),function(e){e.assertEqual=e=>{},e.assertIs=function(e){},e.assertNever=function(e){throw Error()},e.arrayToEnum=e=>{let t={};for(let r of e)t[r]=r;return t},e.getValidEnumValues=t=>{let r=e.objectKeys(t).filter(e=>"number"!=typeof t[t[e]]),a={};for(let e of r)a[e]=t[e];return e.objectValues(a)},e.objectValues=t=>e.objectKeys(t).map(function(e){return t[e]}),e.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{let t=[];for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t},e.find=(e,t)=>{for(let r of e)if(t(r))return r},e.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&Number.isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" | ";return e.map(e=>"string"==typeof e?"'".concat(e,"'"):e).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t}(r||(r={})),(a||(a={})).mergeShapes=(e,t)=>({...e,...t});let S=r.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),O=e=>{switch(typeof e){case"undefined":return S.undefined;case"string":return S.string;case"number":return Number.isNaN(e)?S.nan:S.number;case"boolean":return S.boolean;case"function":return S.function;case"bigint":return S.bigint;case"symbol":return S.symbol;case"object":if(Array.isArray(e))return S.array;if(null===e)return S.null;if(e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch)return S.promise;if("undefined"!=typeof Map&&e instanceof Map)return S.map;if("undefined"!=typeof Set&&e instanceof Set)return S.set;if("undefined"!=typeof Date&&e instanceof Date)return S.date;return S.object;default:return S.unknown}},C=r.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"]),A=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class E extends Error{get errors(){return this.issues}format(e){let t=e||function(e){return e.message},r={_errors:[]},a=e=>{for(let n of e.issues)if("invalid_union"===n.code)n.unionErrors.map(a);else if("invalid_return_type"===n.code)a(n.returnTypeError);else if("invalid_arguments"===n.code)a(n.argumentsError);else if(0===n.path.length)r._errors.push(t(n));else{let e=r,a=0;for(;a<n.path.length;){let r=n.path[a];a===n.path.length-1?(e[r]=e[r]||{_errors:[]},e[r]._errors.push(t(n))):e[r]=e[r]||{_errors:[]},e=e[r],a++}}};return a(this),r}static assert(e){if(!(e instanceof E))throw Error("Not a ZodError: ".concat(e))}toString(){return this.message}get message(){return JSON.stringify(this.issues,r.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e=>e.message,t={},r=[];for(let a of this.issues)if(a.path.length>0){let r=a.path[0];t[r]=t[r]||[],t[r].push(e(a))}else r.push(e(a));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}constructor(e){var t;super(),t=this,this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];t.issues=[...t.issues,...e]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}}E.create=e=>new E(e);let I=(e,t)=>{let a;switch(e.code){case C.invalid_type:a=e.received===S.undefined?"Required":"Expected ".concat(e.expected,", received ").concat(e.received);break;case C.invalid_literal:a="Invalid literal value, expected ".concat(JSON.stringify(e.expected,r.jsonStringifyReplacer));break;case C.unrecognized_keys:a="Unrecognized key(s) in object: ".concat(r.joinValues(e.keys,", "));break;case C.invalid_union:a="Invalid input";break;case C.invalid_union_discriminator:a="Invalid discriminator value. Expected ".concat(r.joinValues(e.options));break;case C.invalid_enum_value:a="Invalid enum value. Expected ".concat(r.joinValues(e.options),", received '").concat(e.received,"'");break;case C.invalid_arguments:a="Invalid function arguments";break;case C.invalid_return_type:a="Invalid function return type";break;case C.invalid_date:a="Invalid date";break;case C.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(a='Invalid input: must include "'.concat(e.validation.includes,'"'),"number"==typeof e.validation.position&&(a="".concat(a," at one or more positions greater than or equal to ").concat(e.validation.position))):"startsWith"in e.validation?a='Invalid input: must start with "'.concat(e.validation.startsWith,'"'):"endsWith"in e.validation?a='Invalid input: must end with "'.concat(e.validation.endsWith,'"'):r.assertNever(e.validation):a="regex"!==e.validation?"Invalid ".concat(e.validation):"Invalid";break;case C.too_small:a="array"===e.type?"Array must contain ".concat(e.exact?"exactly":e.inclusive?"at least":"more than"," ").concat(e.minimum," element(s)"):"string"===e.type?"String must contain ".concat(e.exact?"exactly":e.inclusive?"at least":"over"," ").concat(e.minimum," character(s)"):"number"===e.type||"bigint"===e.type?"Number must be ".concat(e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than ").concat(e.minimum):"date"===e.type?"Date must be ".concat(e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than ").concat(new Date(Number(e.minimum))):"Invalid input";break;case C.too_big:a="array"===e.type?"Array must contain ".concat(e.exact?"exactly":e.inclusive?"at most":"less than"," ").concat(e.maximum," element(s)"):"string"===e.type?"String must contain ".concat(e.exact?"exactly":e.inclusive?"at most":"under"," ").concat(e.maximum," character(s)"):"number"===e.type?"Number must be ".concat(e.exact?"exactly":e.inclusive?"less than or equal to":"less than"," ").concat(e.maximum):"bigint"===e.type?"BigInt must be ".concat(e.exact?"exactly":e.inclusive?"less than or equal to":"less than"," ").concat(e.maximum):"date"===e.type?"Date must be ".concat(e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"," ").concat(new Date(Number(e.maximum))):"Invalid input";break;case C.custom:a="Invalid input";break;case C.invalid_intersection_types:a="Intersection results could not be merged";break;case C.not_multiple_of:a="Number must be a multiple of ".concat(e.multipleOf);break;case C.not_finite:a="Number must be finite";break;default:a=t.defaultError,r.assertNever(e)}return{message:a}},P=I;function F(e){P=e}function R(){return P}e.i(37904),e.i(77290),e.s(["DIRTY",()=>U,"EMPTY_PATH",()=>z,"INVALID",()=>D,"OK",()=>B,"ParseStatus",()=>V,"addIssueToContext",()=>L,"isAborted",()=>K,"isAsync",()=>q,"isDirty",()=>$,"isValid",()=>W,"makeIssue",()=>M],65354);let M=e=>{let{data:t,path:r,errorMaps:a,issueData:n}=e,s=[...r,...n.path||[]],i={...n,path:s};if(void 0!==n.message)return{...n,path:s,message:n.message};let o="";for(let e of a.filter(e=>!!e).slice().reverse())o=e(i,{data:t,defaultError:o}).message;return{...n,path:s,message:o}},z=[];function L(e,t){let r=P,a=M({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===I?void 0:I].filter(e=>!!e)});e.common.issues.push(a)}class V{dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){let r=[];for(let a of t){if("aborted"===a.status)return D;"dirty"===a.status&&e.dirty(),r.push(a.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){let r=[];for(let e of t){let t=await e.key,a=await e.value;r.push({key:t,value:a})}return V.mergeObjectSync(e,r)}static mergeObjectSync(e,t){let r={};for(let a of t){let{key:t,value:n}=a;if("aborted"===t.status||"aborted"===n.status)return D;"dirty"===t.status&&e.dirty(),"dirty"===n.status&&e.dirty(),"__proto__"!==t.value&&(void 0!==n.value||a.alwaysSet)&&(r[t.value]=n.value)}return{status:e.value,value:r}}constructor(){this.value="valid"}}let D=Object.freeze({status:"aborted"}),U=e=>({status:"dirty",value:e}),B=e=>({status:"valid",value:e}),K=e=>"aborted"===e.status,$=e=>"dirty"===e.status,W=e=>"valid"===e.status,q=e=>"undefined"!=typeof Promise&&e instanceof Promise;e.i(65354),e.s([],27404),e.i(27404),e.i(4783),e.s(["BRAND",()=>eG,"NEVER",()=>tI,"Schema",()=>G,"ZodAny",()=>eZ,"ZodArray",()=>eS,"ZodBigInt",()=>ey,"ZodBoolean",()=>e_,"ZodBranded",()=>eX,"ZodCatch",()=>eY,"ZodDate",()=>eb,"ZodDefault",()=>eJ,"ZodDiscriminatedUnion",()=>eE,"ZodEffects",()=>e$,"ZodEnum",()=>eU,"ZodFirstPartyTypeKind",()=>s,"ZodFunction",()=>ez,"ZodIntersection",()=>eI,"ZodLazy",()=>eL,"ZodLiteral",()=>eV,"ZodMap",()=>eR,"ZodNaN",()=>eH,"ZodNativeEnum",()=>eB,"ZodNever",()=>eT,"ZodNull",()=>ew,"ZodNullable",()=>eq,"ZodNumber",()=>ev,"ZodObject",()=>eO,"ZodOptional",()=>eW,"ZodPipeline",()=>eQ,"ZodPromise",()=>eK,"ZodReadonly",()=>e0,"ZodRecord",()=>eF,"ZodSchema",()=>G,"ZodSet",()=>eM,"ZodString",()=>eg,"ZodSymbol",()=>ex,"ZodTransformer",()=>e$,"ZodTuple",()=>eP,"ZodType",()=>G,"ZodUndefined",()=>ek,"ZodUnion",()=>eC,"ZodUnknown",()=>ej,"ZodVoid",()=>eN,"any",()=>tn,"array",()=>td,"bigint",()=>e7,"boolean",()=>e8,"coerce",()=>tE,"custom",()=>e9,"date",()=>te,"datetimeRegex",()=>ef,"discriminatedUnion",()=>th,"effect",()=>tZ,"enum",()=>tx,"function",()=>ty,"instanceof",()=>e2,"intersection",()=>tp,"late",()=>e4,"lazy",()=>t_,"literal",()=>tb,"map",()=>tg,"nan",()=>e3,"nativeEnum",()=>tk,"never",()=>ti,"null",()=>ta,"nullable",()=>tT,"number",()=>e6,"object",()=>tl,"oboolean",()=>tA,"onumber",()=>tC,"optional",()=>tj,"ostring",()=>tO,"pipeline",()=>tS,"preprocess",()=>tN,"promise",()=>tw,"record",()=>tf,"set",()=>tv,"strictObject",()=>tu,"string",()=>e5,"symbol",()=>tt,"transformer",()=>tZ,"tuple",()=>tm,"undefined",()=>tr,"union",()=>tc,"unknown",()=>ts,"void",()=>to],65638),function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:null==e?void 0:e.message}(n||(n={}));class J{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}constructor(e,t,r,a){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=a}}let Y=(e,t)=>{if(W(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let t=new E(e.common.issues);return this._error=t,this._error}}};function H(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:a,description:n}=e;if(t&&(r||a))throw Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:n}:{errorMap:(t,n)=>{var s,i;let{message:o}=e;return"invalid_enum_value"===t.code?{message:null!=o?o:n.defaultError}:void 0===n.data?{message:null!=(s=null!=o?o:a)?s:n.defaultError}:"invalid_type"!==t.code?{message:n.defaultError}:{message:null!=(i=null!=o?o:r)?i:n.defaultError}},description:n}}class G{get description(){return this._def.description}_getType(e){return O(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:O(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new V,ctx:{common:e.parent.common,data:e.data,parsedType:O(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(q(t))throw Error("Synchronous parse encountered promise.");return t}_parseAsync(e){return Promise.resolve(this._parse(e))}parse(e,t){let r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){var r;let a={common:{issues:[],async:null!=(r=null==t?void 0:t.async)&&r,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:O(e)},n=this._parseSync({data:e,path:a.path,parent:a});return Y(a,n)}"~validate"(e){let t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:O(e)};if(!this["~standard"].async)try{let r=this._parseSync({data:e,path:[],parent:t});return W(r)?{value:r.value}:{issues:t.common.issues}}catch(e){var r,a;(null==e||null==(a=e.message)||null==(r=a.toLowerCase())?void 0:r.includes("encountered"))&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>W(e)?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){let r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){let r={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:O(e)},a=this._parse({data:e,path:r.path,parent:r});return Y(r,await (q(a)?a:Promise.resolve(a)))}refine(e,t){return this._refinement((r,a)=>{let n=e(r),s=()=>a.addIssue({code:C.custom,..."string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(r):t});return"undefined"!=typeof Promise&&n instanceof Promise?n.then(e=>!!e||(s(),!1)):!!n||(s(),!1)})}refinement(e,t){return this._refinement((r,a)=>!!e(r)||(a.addIssue("function"==typeof t?t(r,a):t),!1))}_refinement(e){return new e$({schema:this,typeName:s.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return eW.create(this,this._def)}nullable(){return eq.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return eS.create(this)}promise(){return eK.create(this,this._def)}or(e){return eC.create([this,e],this._def)}and(e){return eI.create(this,e,this._def)}transform(e){return new e$({...H(this._def),schema:this,typeName:s.ZodEffects,effect:{type:"transform",transform:e}})}default(e){return new eJ({...H(this._def),innerType:this,defaultValue:"function"==typeof e?e:()=>e,typeName:s.ZodDefault})}brand(){return new eX({typeName:s.ZodBranded,type:this,...H(this._def)})}catch(e){return new eY({...H(this._def),innerType:this,catchValue:"function"==typeof e?e:()=>e,typeName:s.ZodCatch})}describe(e){return new this.constructor({...this._def,description:e})}pipe(e){return eQ.create(this,e)}readonly(){return e0.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}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:e=>this["~validate"](e)}}}let X=/^c[^\s-]{8,}$/i,Q=/^[0-9a-z]+$/,ee=/^[0-9A-HJKMNP-TV-Z]{26}$/i,et=/^[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,er=/^[a-z0-9_-]{21}$/i,ea=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,en=/^[-+]?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)?)??$/,es=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,ei=/^(?:(?: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])$/,eo=/^(?:(?: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])$/,ed=/^(([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]))$/,el=/^(([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])$/,eu=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,ec=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,eh="((\\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])))",ep=new RegExp("^".concat(eh,"$"));function em(e){let t="[0-5]\\d";e.precision?t="".concat(t,"\\.\\d{").concat(e.precision,"}"):null==e.precision&&(t="".concat(t,"(\\.\\d+)?"));let r=e.precision?"+":"?";return"([01]\\d|2[0-3]):[0-5]\\d(:".concat(t,")").concat(r)}function ef(e){let t="".concat(eh,"T").concat(em(e)),r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t="".concat(t,"(").concat(r.join("|"),")"),new RegExp("^".concat(t,"$"))}class eg extends G{_parse(e){var a,n,s,i;let o;if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==S.string){let t=this._getOrReturnCtx(e);return L(t,{code:C.invalid_type,expected:S.string,received:t.parsedType}),D}let d=new V;for(let l of this._def.checks)if("min"===l.kind)e.data.length<l.value&&(L(o=this._getOrReturnCtx(e,o),{code:C.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),d.dirty());else if("max"===l.kind)e.data.length>l.value&&(L(o=this._getOrReturnCtx(e,o),{code:C.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),d.dirty());else if("length"===l.kind){let t=e.data.length>l.value,r=e.data.length<l.value;(t||r)&&(o=this._getOrReturnCtx(e,o),t?L(o,{code:C.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}):r&&L(o,{code:C.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}),d.dirty())}else if("email"===l.kind)es.test(e.data)||(L(o=this._getOrReturnCtx(e,o),{validation:"email",code:C.invalid_string,message:l.message}),d.dirty());else if("emoji"===l.kind)t||(t=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),t.test(e.data)||(L(o=this._getOrReturnCtx(e,o),{validation:"emoji",code:C.invalid_string,message:l.message}),d.dirty());else if("uuid"===l.kind)et.test(e.data)||(L(o=this._getOrReturnCtx(e,o),{validation:"uuid",code:C.invalid_string,message:l.message}),d.dirty());else if("nanoid"===l.kind)er.test(e.data)||(L(o=this._getOrReturnCtx(e,o),{validation:"nanoid",code:C.invalid_string,message:l.message}),d.dirty());else if("cuid"===l.kind)X.test(e.data)||(L(o=this._getOrReturnCtx(e,o),{validation:"cuid",code:C.invalid_string,message:l.message}),d.dirty());else if("cuid2"===l.kind)Q.test(e.data)||(L(o=this._getOrReturnCtx(e,o),{validation:"cuid2",code:C.invalid_string,message:l.message}),d.dirty());else if("ulid"===l.kind)ee.test(e.data)||(L(o=this._getOrReturnCtx(e,o),{validation:"ulid",code:C.invalid_string,message:l.message}),d.dirty());else if("url"===l.kind)try{new URL(e.data)}catch(t){L(o=this._getOrReturnCtx(e,o),{validation:"url",code:C.invalid_string,message:l.message}),d.dirty()}else"regex"===l.kind?(l.regex.lastIndex=0,l.regex.test(e.data)||(L(o=this._getOrReturnCtx(e,o),{validation:"regex",code:C.invalid_string,message:l.message}),d.dirty())):"trim"===l.kind?e.data=e.data.trim():"includes"===l.kind?e.data.includes(l.value,l.position)||(L(o=this._getOrReturnCtx(e,o),{code:C.invalid_string,validation:{includes:l.value,position:l.position},message:l.message}),d.dirty()):"toLowerCase"===l.kind?e.data=e.data.toLowerCase():"toUpperCase"===l.kind?e.data=e.data.toUpperCase():"startsWith"===l.kind?e.data.startsWith(l.value)||(L(o=this._getOrReturnCtx(e,o),{code:C.invalid_string,validation:{startsWith:l.value},message:l.message}),d.dirty()):"endsWith"===l.kind?e.data.endsWith(l.value)||(L(o=this._getOrReturnCtx(e,o),{code:C.invalid_string,validation:{endsWith:l.value},message:l.message}),d.dirty()):"datetime"===l.kind?ef(l).test(e.data)||(L(o=this._getOrReturnCtx(e,o),{code:C.invalid_string,validation:"datetime",message:l.message}),d.dirty()):"date"===l.kind?ep.test(e.data)||(L(o=this._getOrReturnCtx(e,o),{code:C.invalid_string,validation:"date",message:l.message}),d.dirty()):"time"===l.kind?new RegExp("^".concat(em(l),"$")).test(e.data)||(L(o=this._getOrReturnCtx(e,o),{code:C.invalid_string,validation:"time",message:l.message}),d.dirty()):"duration"===l.kind?en.test(e.data)||(L(o=this._getOrReturnCtx(e,o),{validation:"duration",code:C.invalid_string,message:l.message}),d.dirty()):"ip"===l.kind?(a=e.data,!(("v4"===(n=l.version)||!n)&&ei.test(a)||("v6"===n||!n)&&ed.test(a))&&1&&(L(o=this._getOrReturnCtx(e,o),{validation:"ip",code:C.invalid_string,message:l.message}),d.dirty())):"jwt"===l.kind?!function(e,t){if(!ea.test(e))return!1;try{let[r]=e.split(".");if(!r)return!1;let a=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),n=JSON.parse(atob(a));if("object"!=typeof n||null===n||"typ"in n&&(null==n?void 0:n.typ)!=="JWT"||!n.alg||t&&n.alg!==t)return!1;return!0}catch(e){return!1}}(e.data,l.alg)&&(L(o=this._getOrReturnCtx(e,o),{validation:"jwt",code:C.invalid_string,message:l.message}),d.dirty()):"cidr"===l.kind?(s=e.data,!(("v4"===(i=l.version)||!i)&&eo.test(s)||("v6"===i||!i)&&el.test(s))&&1&&(L(o=this._getOrReturnCtx(e,o),{validation:"cidr",code:C.invalid_string,message:l.message}),d.dirty())):"base64"===l.kind?eu.test(e.data)||(L(o=this._getOrReturnCtx(e,o),{validation:"base64",code:C.invalid_string,message:l.message}),d.dirty()):"base64url"===l.kind?ec.test(e.data)||(L(o=this._getOrReturnCtx(e,o),{validation:"base64url",code:C.invalid_string,message:l.message}),d.dirty()):r.assertNever(l);return{status:d.value,value:e.data}}_regex(e,t,r){return this.refinement(t=>e.test(t),{validation:t,code:C.invalid_string,...n.errToObj(r)})}_addCheck(e){return new eg({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...n.errToObj(e)})}url(e){return this._addCheck({kind:"url",...n.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...n.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...n.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...n.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...n.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...n.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...n.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...n.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...n.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...n.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...n.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...n.errToObj(e)})}datetime(e){var t,r;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,offset:null!=(t=null==e?void 0:e.offset)&&t,local:null!=(r=null==e?void 0:e.local)&&r,...n.errToObj(null==e?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,...n.errToObj(null==e?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...n.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...n.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...n.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...n.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...n.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...n.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...n.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...n.errToObj(t)})}nonempty(e){return this.min(1,n.errToObj(e))}trim(){return new eg({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new eg({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new eg({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>"datetime"===e.kind)}get isDate(){return!!this._def.checks.find(e=>"date"===e.kind)}get isTime(){return!!this._def.checks.find(e=>"time"===e.kind)}get isDuration(){return!!this._def.checks.find(e=>"duration"===e.kind)}get isEmail(){return!!this._def.checks.find(e=>"email"===e.kind)}get isURL(){return!!this._def.checks.find(e=>"url"===e.kind)}get isEmoji(){return!!this._def.checks.find(e=>"emoji"===e.kind)}get isUUID(){return!!this._def.checks.find(e=>"uuid"===e.kind)}get isNANOID(){return!!this._def.checks.find(e=>"nanoid"===e.kind)}get isCUID(){return!!this._def.checks.find(e=>"cuid"===e.kind)}get isCUID2(){return!!this._def.checks.find(e=>"cuid2"===e.kind)}get isULID(){return!!this._def.checks.find(e=>"ulid"===e.kind)}get isIP(){return!!this._def.checks.find(e=>"ip"===e.kind)}get isCIDR(){return!!this._def.checks.find(e=>"cidr"===e.kind)}get isBase64(){return!!this._def.checks.find(e=>"base64"===e.kind)}get isBase64url(){return!!this._def.checks.find(e=>"base64url"===e.kind)}get minLength(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}eg.create=e=>{var t;return new eg({checks:[],typeName:s.ZodString,coerce:null!=(t=null==e?void 0:e.coerce)&&t,...H(e)})};class ev extends G{_parse(e){let t;if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==S.number){let t=this._getOrReturnCtx(e);return L(t,{code:C.invalid_type,expected:S.number,received:t.parsedType}),D}let a=new V;for(let n of this._def.checks)"int"===n.kind?r.isInteger(e.data)||(L(t=this._getOrReturnCtx(e,t),{code:C.invalid_type,expected:"integer",received:"float",message:n.message}),a.dirty()):"min"===n.kind?(n.inclusive?e.data<n.value:e.data<=n.value)&&(L(t=this._getOrReturnCtx(e,t),{code:C.too_small,minimum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),a.dirty()):"max"===n.kind?(n.inclusive?e.data>n.value:e.data>=n.value)&&(L(t=this._getOrReturnCtx(e,t),{code:C.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),a.dirty()):"multipleOf"===n.kind?0!==function(e,t){let r=(e.toString().split(".")[1]||"").length,a=(t.toString().split(".")[1]||"").length,n=r>a?r:a;return Number.parseInt(e.toFixed(n).replace(".",""))%Number.parseInt(t.toFixed(n).replace(".",""))/10**n}(e.data,n.value)&&(L(t=this._getOrReturnCtx(e,t),{code:C.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):"finite"===n.kind?Number.isFinite(e.data)||(L(t=this._getOrReturnCtx(e,t),{code:C.not_finite,message:n.message}),a.dirty()):r.assertNever(n);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,n.toString(t))}gt(e,t){return this.setLimit("min",e,!1,n.toString(t))}lte(e,t){return this.setLimit("max",e,!0,n.toString(t))}lt(e,t){return this.setLimit("max",e,!1,n.toString(t))}setLimit(e,t,r,a){return new ev({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:n.toString(a)}]})}_addCheck(e){return new ev({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:n.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:n.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:n.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:n.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:n.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:n.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:n.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:n.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:n.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>"int"===e.kind||"multipleOf"===e.kind&&r.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let r of this._def.checks)if("finite"===r.kind||"int"===r.kind||"multipleOf"===r.kind)return!0;else"min"===r.kind?(null===t||r.value>t)&&(t=r.value):"max"===r.kind&&(null===e||r.value<e)&&(e=r.value);return Number.isFinite(t)&&Number.isFinite(e)}constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}}ev.create=e=>new ev({checks:[],typeName:s.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...H(e)});class ey extends G{_parse(e){let t;if(this._def.coerce)try{e.data=BigInt(e.data)}catch(t){return this._getInvalidInput(e)}if(this._getType(e)!==S.bigint)return this._getInvalidInput(e);let a=new V;for(let n of this._def.checks)"min"===n.kind?(n.inclusive?e.data<n.value:e.data<=n.value)&&(L(t=this._getOrReturnCtx(e,t),{code:C.too_small,type:"bigint",minimum:n.value,inclusive:n.inclusive,message:n.message}),a.dirty()):"max"===n.kind?(n.inclusive?e.data>n.value:e.data>=n.value)&&(L(t=this._getOrReturnCtx(e,t),{code:C.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),a.dirty()):"multipleOf"===n.kind?e.data%n.value!==BigInt(0)&&(L(t=this._getOrReturnCtx(e,t),{code:C.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):r.assertNever(n);return{status:a.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return L(t,{code:C.invalid_type,expected:S.bigint,received:t.parsedType}),D}gte(e,t){return this.setLimit("min",e,!0,n.toString(t))}gt(e,t){return this.setLimit("min",e,!1,n.toString(t))}lte(e,t){return this.setLimit("max",e,!0,n.toString(t))}lt(e,t){return this.setLimit("max",e,!1,n.toString(t))}setLimit(e,t,r,a){return new ey({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:n.toString(a)}]})}_addCheck(e){return new ey({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:n.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:n.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:n.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:n.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:n.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}}ey.create=e=>{var t;return new ey({checks:[],typeName:s.ZodBigInt,coerce:null!=(t=null==e?void 0:e.coerce)&&t,...H(e)})};class e_ extends G{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==S.boolean){let t=this._getOrReturnCtx(e);return L(t,{code:C.invalid_type,expected:S.boolean,received:t.parsedType}),D}return B(e.data)}}e_.create=e=>new e_({typeName:s.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...H(e)});class eb extends G{_parse(e){let t;if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==S.date){let t=this._getOrReturnCtx(e);return L(t,{code:C.invalid_type,expected:S.date,received:t.parsedType}),D}if(Number.isNaN(e.data.getTime()))return L(this._getOrReturnCtx(e),{code:C.invalid_date}),D;let a=new V;for(let n of this._def.checks)"min"===n.kind?e.data.getTime()<n.value&&(L(t=this._getOrReturnCtx(e,t),{code:C.too_small,message:n.message,inclusive:!0,exact:!1,minimum:n.value,type:"date"}),a.dirty()):"max"===n.kind?e.data.getTime()>n.value&&(L(t=this._getOrReturnCtx(e,t),{code:C.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),a.dirty()):r.assertNever(n);return{status:a.value,value:new Date(e.data.getTime())}}_addCheck(e){return new eb({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:n.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:n.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}eb.create=e=>new eb({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:s.ZodDate,...H(e)});class ex extends G{_parse(e){if(this._getType(e)!==S.symbol){let t=this._getOrReturnCtx(e);return L(t,{code:C.invalid_type,expected:S.symbol,received:t.parsedType}),D}return B(e.data)}}ex.create=e=>new ex({typeName:s.ZodSymbol,...H(e)});class ek extends G{_parse(e){if(this._getType(e)!==S.undefined){let t=this._getOrReturnCtx(e);return L(t,{code:C.invalid_type,expected:S.undefined,received:t.parsedType}),D}return B(e.data)}}ek.create=e=>new ek({typeName:s.ZodUndefined,...H(e)});class ew extends G{_parse(e){if(this._getType(e)!==S.null){let t=this._getOrReturnCtx(e);return L(t,{code:C.invalid_type,expected:S.null,received:t.parsedType}),D}return B(e.data)}}ew.create=e=>new ew({typeName:s.ZodNull,...H(e)});class eZ extends G{_parse(e){return B(e.data)}constructor(){super(...arguments),this._any=!0}}eZ.create=e=>new eZ({typeName:s.ZodAny,...H(e)});class ej extends G{_parse(e){return B(e.data)}constructor(){super(...arguments),this._unknown=!0}}ej.create=e=>new ej({typeName:s.ZodUnknown,...H(e)});class eT extends G{_parse(e){let t=this._getOrReturnCtx(e);return L(t,{code:C.invalid_type,expected:S.never,received:t.parsedType}),D}}eT.create=e=>new eT({typeName:s.ZodNever,...H(e)});class eN extends G{_parse(e){if(this._getType(e)!==S.undefined){let t=this._getOrReturnCtx(e);return L(t,{code:C.invalid_type,expected:S.void,received:t.parsedType}),D}return B(e.data)}}eN.create=e=>new eN({typeName:s.ZodVoid,...H(e)});class eS extends G{_parse(e){let{ctx:t,status:r}=this._processInputParams(e),a=this._def;if(t.parsedType!==S.array)return L(t,{code:C.invalid_type,expected:S.array,received:t.parsedType}),D;if(null!==a.exactLength){let e=t.data.length>a.exactLength.value,n=t.data.length<a.exactLength.value;(e||n)&&(L(t,{code:e?C.too_big:C.too_small,minimum:n?a.exactLength.value:void 0,maximum:e?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),r.dirty())}if(null!==a.minLength&&t.data.length<a.minLength.value&&(L(t,{code:C.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),r.dirty()),null!==a.maxLength&&t.data.length>a.maxLength.value&&(L(t,{code:C.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map((e,r)=>a.type._parseAsync(new J(t,e,t.path,r)))).then(e=>V.mergeArray(r,e));let n=[...t.data].map((e,r)=>a.type._parseSync(new J(t,e,t.path,r)));return V.mergeArray(r,n)}get element(){return this._def.type}min(e,t){return new eS({...this._def,minLength:{value:e,message:n.toString(t)}})}max(e,t){return new eS({...this._def,maxLength:{value:e,message:n.toString(t)}})}length(e,t){return new eS({...this._def,exactLength:{value:e,message:n.toString(t)}})}nonempty(e){return this.min(1,e)}}eS.create=(e,t)=>new eS({type:e,minLength:null,maxLength:null,exactLength:null,typeName:s.ZodArray,...H(t)});class eO extends G{_getCached(){if(null!==this._cached)return this._cached;let e=this._def.shape(),t=r.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==S.object){let t=this._getOrReturnCtx(e);return L(t,{code:C.invalid_type,expected:S.object,received:t.parsedType}),D}let{status:t,ctx:r}=this._processInputParams(e),{shape:a,keys:n}=this._getCached(),s=[];if(!(this._def.catchall instanceof eT&&"strip"===this._def.unknownKeys))for(let e in r.data)n.includes(e)||s.push(e);let i=[];for(let e of n){let t=a[e],n=r.data[e];i.push({key:{status:"valid",value:e},value:t._parse(new J(r,n,r.path,e)),alwaysSet:e in r.data})}if(this._def.catchall instanceof eT){let e=this._def.unknownKeys;if("passthrough"===e)for(let e of s)i.push({key:{status:"valid",value:e},value:{status:"valid",value:r.data[e]}});else if("strict"===e)s.length>0&&(L(r,{code:C.unrecognized_keys,keys:s}),t.dirty());else if("strip"===e);else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let e=this._def.catchall;for(let t of s){let a=r.data[t];i.push({key:{status:"valid",value:t},value:e._parse(new J(r,a,r.path,t)),alwaysSet:t in r.data})}}return r.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of i){let r=await t.key,a=await t.value;e.push({key:r,value:a,alwaysSet:t.alwaysSet})}return e}).then(e=>V.mergeObjectSync(t,e)):V.mergeObjectSync(t,i)}get shape(){return this._def.shape()}strict(e){return n.errToObj,new eO({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,r)=>{var a,s,i,o;let d=null!=(i=null==(a=(s=this._def).errorMap)?void 0:a.call(s,t,r).message)?i:r.defaultError;return"unrecognized_keys"===t.code?{message:null!=(o=n.errToObj(e).message)?o:d}:{message:d}}}:{}})}strip(){return new eO({...this._def,unknownKeys:"strip"})}passthrough(){return new eO({...this._def,unknownKeys:"passthrough"})}extend(e){return new eO({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new eO({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:s.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new eO({...this._def,catchall:e})}pick(e){let t={};for(let a of r.objectKeys(e))e[a]&&this.shape[a]&&(t[a]=this.shape[a]);return new eO({...this._def,shape:()=>t})}omit(e){let t={};for(let a of r.objectKeys(this.shape))e[a]||(t[a]=this.shape[a]);return new eO({...this._def,shape:()=>t})}deepPartial(){return function e(t){if(t instanceof eO){let r={};for(let a in t.shape){let n=t.shape[a];r[a]=eW.create(e(n))}return new eO({...t._def,shape:()=>r})}if(t instanceof eS)return new eS({...t._def,type:e(t.element)});if(t instanceof eW)return eW.create(e(t.unwrap()));if(t instanceof eq)return eq.create(e(t.unwrap()));if(t instanceof eP)return eP.create(t.items.map(t=>e(t)));else return t}(this)}partial(e){let t={};for(let a of r.objectKeys(this.shape)){let r=this.shape[a];e&&!e[a]?t[a]=r:t[a]=r.optional()}return new eO({...this._def,shape:()=>t})}required(e){let t={};for(let a of r.objectKeys(this.shape))if(e&&!e[a])t[a]=this.shape[a];else{let e=this.shape[a];for(;e instanceof eW;)e=e._def.innerType;t[a]=e}return new eO({...this._def,shape:()=>t})}keyof(){return eD(r.objectKeys(this.shape))}constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}}eO.create=(e,t)=>new eO({shape:()=>e,unknownKeys:"strip",catchall:eT.create(),typeName:s.ZodObject,...H(t)}),eO.strictCreate=(e,t)=>new eO({shape:()=>e,unknownKeys:"strict",catchall:eT.create(),typeName:s.ZodObject,...H(t)}),eO.lazycreate=(e,t)=>new eO({shape:e,unknownKeys:"strip",catchall:eT.create(),typeName:s.ZodObject,...H(t)});class eC extends G{_parse(e){let{ctx:t}=this._processInputParams(e),r=this._def.options;if(t.common.async)return Promise.all(r.map(async e=>{let r={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:r}),ctx:r}})).then(function(e){for(let t of e)if("valid"===t.result.status)return t.result;for(let r of e)if("dirty"===r.result.status)return t.common.issues.push(...r.ctx.common.issues),r.result;let r=e.map(e=>new E(e.ctx.common.issues));return L(t,{code:C.invalid_union,unionErrors:r}),D});{let e,a=[];for(let n of r){let r={...t,common:{...t.common,issues:[]},parent:null},s=n._parseSync({data:t.data,path:t.path,parent:r});if("valid"===s.status)return s;"dirty"!==s.status||e||(e={result:s,ctx:r}),r.common.issues.length&&a.push(r.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let n=a.map(e=>new E(e));return L(t,{code:C.invalid_union,unionErrors:n}),D}}get options(){return this._def.options}}eC.create=(e,t)=>new eC({options:e,typeName:s.ZodUnion,...H(t)});let eA=e=>{if(e instanceof eL)return eA(e.schema);if(e instanceof e$)return eA(e.innerType());if(e instanceof eV)return[e.value];if(e instanceof eU)return e.options;if(e instanceof eB)return r.objectValues(e.enum);else if(e instanceof eJ)return eA(e._def.innerType);else if(e instanceof ek)return[void 0];else if(e instanceof ew)return[null];else if(e instanceof eW)return[void 0,...eA(e.unwrap())];else if(e instanceof eq)return[null,...eA(e.unwrap())];else if(e instanceof eX)return eA(e.unwrap());else if(e instanceof e0)return eA(e.unwrap());else if(e instanceof eY)return eA(e._def.innerType);else return[]};class eE extends G{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==S.object)return L(t,{code:C.invalid_type,expected:S.object,received:t.parsedType}),D;let r=this.discriminator,a=t.data[r],n=this.optionsMap.get(a);return n?t.common.async?n._parseAsync({data:t.data,path:t.path,parent:t}):n._parseSync({data:t.data,path:t.path,parent:t}):(L(t,{code:C.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),D)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,r){let a=new Map;for(let r of t){let t=eA(r.shape[e]);if(!t.length)throw Error("A discriminator value for key `".concat(e,"` could not be extracted from all schema options"));for(let n of t){if(a.has(n))throw Error("Discriminator property ".concat(String(e)," has duplicate value ").concat(String(n)));a.set(n,r)}}return new eE({typeName:s.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:a,...H(r)})}}class eI extends G{_parse(e){let{status:t,ctx:a}=this._processInputParams(e),n=(e,n)=>{if(K(e)||K(n))return D;let s=function e(t,a){let n=O(t),s=O(a);if(t===a)return{valid:!0,data:t};if(n===S.object&&s===S.object){let n=r.objectKeys(a),s=r.objectKeys(t).filter(e=>-1!==n.indexOf(e)),i={...t,...a};for(let r of s){let n=e(t[r],a[r]);if(!n.valid)return{valid:!1};i[r]=n.data}return{valid:!0,data:i}}if(n===S.array&&s===S.array){if(t.length!==a.length)return{valid:!1};let r=[];for(let n=0;n<t.length;n++){let s=e(t[n],a[n]);if(!s.valid)return{valid:!1};r.push(s.data)}return{valid:!0,data:r}}if(n===S.date&&s===S.date&&+t==+a)return{valid:!0,data:t};return{valid:!1}}(e.value,n.value);return s.valid?(($(e)||$(n))&&t.dirty(),{status:t.value,value:s.data}):(L(a,{code:C.invalid_intersection_types}),D)};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(e=>{let[t,r]=e;return n(t,r)}):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}))}}eI.create=(e,t,r)=>new eI({left:e,right:t,typeName:s.ZodIntersection,...H(r)});class eP extends G{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==S.array)return L(r,{code:C.invalid_type,expected:S.array,received:r.parsedType}),D;if(r.data.length<this._def.items.length)return L(r,{code:C.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),D;!this._def.rest&&r.data.length>this._def.items.length&&(L(r,{code:C.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let a=[...r.data].map((e,t)=>{let a=this._def.items[t]||this._def.rest;return a?a._parse(new J(r,e,r.path,t)):null}).filter(e=>!!e);return r.common.async?Promise.all(a).then(e=>V.mergeArray(t,e)):V.mergeArray(t,a)}get items(){return this._def.items}rest(e){return new eP({...this._def,rest:e})}}eP.create=(e,t)=>{if(!Array.isArray(e))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new eP({items:e,typeName:s.ZodTuple,rest:null,...H(t)})};class eF extends G{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==S.object)return L(r,{code:C.invalid_type,expected:S.object,received:r.parsedType}),D;let a=[],n=this._def.keyType,s=this._def.valueType;for(let e in r.data)a.push({key:n._parse(new J(r,e,r.path,e)),value:s._parse(new J(r,r.data[e],r.path,e)),alwaysSet:e in r.data});return r.common.async?V.mergeObjectAsync(t,a):V.mergeObjectSync(t,a)}get element(){return this._def.valueType}static create(e,t,r){return new eF(t instanceof G?{keyType:e,valueType:t,typeName:s.ZodRecord,...H(r)}:{keyType:eg.create(),valueType:e,typeName:s.ZodRecord,...H(t)})}}class eR extends G{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==S.map)return L(r,{code:C.invalid_type,expected:S.map,received:r.parsedType}),D;let a=this._def.keyType,n=this._def.valueType,s=[...r.data.entries()].map((e,t)=>{let[s,i]=e;return{key:a._parse(new J(r,s,r.path,[t,"key"])),value:n._parse(new J(r,i,r.path,[t,"value"]))}});if(r.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let r of s){let a=await r.key,n=await r.value;if("aborted"===a.status||"aborted"===n.status)return D;("dirty"===a.status||"dirty"===n.status)&&t.dirty(),e.set(a.value,n.value)}return{status:t.value,value:e}})}{let e=new Map;for(let r of s){let a=r.key,n=r.value;if("aborted"===a.status||"aborted"===n.status)return D;("dirty"===a.status||"dirty"===n.status)&&t.dirty(),e.set(a.value,n.value)}return{status:t.value,value:e}}}}eR.create=(e,t,r)=>new eR({valueType:t,keyType:e,typeName:s.ZodMap,...H(r)});class eM extends G{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==S.set)return L(r,{code:C.invalid_type,expected:S.set,received:r.parsedType}),D;let a=this._def;null!==a.minSize&&r.data.size<a.minSize.value&&(L(r,{code:C.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),t.dirty()),null!==a.maxSize&&r.data.size>a.maxSize.value&&(L(r,{code:C.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),t.dirty());let n=this._def.valueType;function s(e){let r=new Set;for(let a of e){if("aborted"===a.status)return D;"dirty"===a.status&&t.dirty(),r.add(a.value)}return{status:t.value,value:r}}let i=[...r.data.values()].map((e,t)=>n._parse(new J(r,e,r.path,t)));return r.common.async?Promise.all(i).then(e=>s(e)):s(i)}min(e,t){return new eM({...this._def,minSize:{value:e,message:n.toString(t)}})}max(e,t){return new eM({...this._def,maxSize:{value:e,message:n.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}eM.create=(e,t)=>new eM({valueType:e,minSize:null,maxSize:null,typeName:s.ZodSet,...H(t)});class ez extends G{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==S.function)return L(t,{code:C.invalid_type,expected:S.function,received:t.parsedType}),D;function r(e,r){return M({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,P,I].filter(e=>!!e),issueData:{code:C.invalid_arguments,argumentsError:r}})}function a(e,r){return M({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,P,I].filter(e=>!!e),issueData:{code:C.invalid_return_type,returnTypeError:r}})}let n={errorMap:t.common.contextualErrorMap},s=t.data;if(this._def.returns instanceof eK){let e=this;return B(async function(){for(var t=arguments.length,i=Array(t),o=0;o<t;o++)i[o]=arguments[o];let d=new E([]),l=await e._def.args.parseAsync(i,n).catch(e=>{throw d.addIssue(r(i,e)),d}),u=await Reflect.apply(s,this,l);return await e._def.returns._def.type.parseAsync(u,n).catch(e=>{throw d.addIssue(a(u,e)),d})})}{let e=this;return B(function(){for(var t=arguments.length,i=Array(t),o=0;o<t;o++)i[o]=arguments[o];let d=e._def.args.safeParse(i,n);if(!d.success)throw new E([r(i,d.error)]);let l=Reflect.apply(s,this,d.data),u=e._def.returns.safeParse(l,n);if(!u.success)throw new E([a(l,u.error)]);return u.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return new ez({...this._def,args:eP.create(t).rest(ej.create())})}returns(e){return new ez({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,r){return new ez({args:e||eP.create([]).rest(ej.create()),returns:t||ej.create(),typeName:s.ZodFunction,...H(r)})}constructor(){super(...arguments),this.validate=this.implement}}class eL extends G{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}eL.create=(e,t)=>new eL({getter:e,typeName:s.ZodLazy,...H(t)});class eV extends G{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return L(t,{received:t.data,code:C.invalid_literal,expected:this._def.value}),D}return{status:"valid",value:e.data}}get value(){return this._def.value}}function eD(e,t){return new eU({values:e,typeName:s.ZodEnum,...H(t)})}eV.create=(e,t)=>new eV({value:e,typeName:s.ZodLiteral,...H(t)});class eU extends G{_parse(e){if("string"!=typeof e.data){let t=this._getOrReturnCtx(e),a=this._def.values;return L(t,{expected:r.joinValues(a),received:t.parsedType,code:C.invalid_type}),D}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),r=this._def.values;return L(t,{received:t.data,code:C.invalid_enum_value,options:r}),D}return B(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._def;return eU.create(e,{...this._def,...t})}exclude(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._def;return eU.create(this.options.filter(t=>!e.includes(t)),{...this._def,...t})}}eU.create=eD;class eB extends G{_parse(e){let t=r.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(e);if(a.parsedType!==S.string&&a.parsedType!==S.number){let e=r.objectValues(t);return L(a,{expected:r.joinValues(e),received:a.parsedType,code:C.invalid_type}),D}if(this._cache||(this._cache=new Set(r.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let e=r.objectValues(t);return L(a,{received:a.data,code:C.invalid_enum_value,options:e}),D}return B(e.data)}get enum(){return this._def.values}}eB.create=(e,t)=>new eB({values:e,typeName:s.ZodNativeEnum,...H(t)});class eK extends G{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==S.promise&&!1===t.common.async?(L(t,{code:C.invalid_type,expected:S.promise,received:t.parsedType}),D):B((t.parsedType===S.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}}eK.create=(e,t)=>new eK({type:e,typeName:s.ZodPromise,...H(t)});class e$ extends G{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===s.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:a}=this._processInputParams(e),n=this._def.effect||null,s={addIssue:e=>{L(a,e),e.fatal?t.abort():t.dirty()},get path(){return a.path}};if(s.addIssue=s.addIssue.bind(s),"preprocess"===n.type){let e=n.transform(a.data,s);if(a.common.async)return Promise.resolve(e).then(async e=>{if("aborted"===t.value)return D;let r=await this._def.schema._parseAsync({data:e,path:a.path,parent:a});return"aborted"===r.status?D:"dirty"===r.status||"dirty"===t.value?U(r.value):r});{if("aborted"===t.value)return D;let r=this._def.schema._parseSync({data:e,path:a.path,parent:a});return"aborted"===r.status?D:"dirty"===r.status||"dirty"===t.value?U(r.value):r}}if("refinement"===n.type){let e=e=>{let t=n.refinement(e,s);if(a.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1!==a.common.async)return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(r=>"aborted"===r.status?D:("dirty"===r.status&&t.dirty(),e(r.value).then(()=>({status:t.value,value:r.value}))));{let r=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});return"aborted"===r.status?D:("dirty"===r.status&&t.dirty(),e(r.value),{status:t.value,value:r.value})}}if("transform"===n.type)if(!1!==a.common.async)return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(e=>W(e)?Promise.resolve(n.transform(e.value,s)).then(e=>({status:t.value,value:e})):D);else{let e=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(!W(e))return D;let r=n.transform(e.value,s);if(r instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:r}}r.assertNever(n)}}e$.create=(e,t,r)=>new e$({schema:e,typeName:s.ZodEffects,effect:t,...H(r)}),e$.createWithPreprocess=(e,t,r)=>new e$({schema:t,effect:{type:"preprocess",transform:e},typeName:s.ZodEffects,...H(r)});class eW extends G{_parse(e){return this._getType(e)===S.undefined?B(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}eW.create=(e,t)=>new eW({innerType:e,typeName:s.ZodOptional,...H(t)});class eq extends G{_parse(e){return this._getType(e)===S.null?B(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}eq.create=(e,t)=>new eq({innerType:e,typeName:s.ZodNullable,...H(t)});class eJ extends G{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return t.parsedType===S.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}eJ.create=(e,t)=>new eJ({innerType:e,typeName:s.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...H(t)});class eY extends G{_parse(e){let{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},a=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return q(a)?a.then(e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new E(r.common.issues)},input:r.data})})):{status:"valid",value:"valid"===a.status?a.value:this._def.catchValue({get error(){return new E(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}eY.create=(e,t)=>new eY({innerType:e,typeName:s.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...H(t)});class eH extends G{_parse(e){if(this._getType(e)!==S.nan){let t=this._getOrReturnCtx(e);return L(t,{code:C.invalid_type,expected:S.nan,received:t.parsedType}),D}return{status:"valid",value:e.data}}}eH.create=e=>new eH({typeName:s.ZodNaN,...H(e)});let eG=Symbol("zod_brand");class eX extends G{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}}class eQ extends G{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?D:"dirty"===e.status?(t.dirty(),U(e.value)):this._def.out._parseAsync({data:e.value,path:r.path,parent:r})})();{let e=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?D:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:r.path,parent:r})}}static create(e,t){return new eQ({in:e,out:t,typeName:s.ZodPipeline})}}class e0 extends G{_parse(e){let t=this._def.innerType._parse(e),r=e=>(W(e)&&(e.value=Object.freeze(e.value)),e);return q(t)?t.then(e=>r(e)):r(t)}unwrap(){return this._def.innerType}}function e1(e,t){let r="function"==typeof e?e(t):"string"==typeof e?{message:e}:e;return"string"==typeof r?{message:r}:r}function e9(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;return e?eZ.create().superRefine((a,n)=>{let s=e(a);if(s instanceof Promise)return s.then(e=>{if(!e){var s,i;let e=e1(t,a),o=null==(i=null!=(s=e.fatal)?s:r)||i;n.addIssue({code:"custom",...e,fatal:o})}});if(!s){var i,o;let e=e1(t,a),s=null==(o=null!=(i=e.fatal)?i:r)||o;n.addIssue({code:"custom",...e,fatal:s})}}):eZ.create()}e0.create=(e,t)=>new e0({innerType:e,typeName:s.ZodReadonly,...H(t)});let e4={object:eO.lazycreate};!function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"}(s||(s={}));let e2=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{message:"Input not instance of ".concat(e.name)};return e9(t=>t instanceof e,t)},e5=eg.create,e6=ev.create,e3=eH.create,e7=ey.create,e8=e_.create,te=eb.create,tt=ex.create,tr=ek.create,ta=ew.create,tn=eZ.create,ts=ej.create,ti=eT.create,to=eN.create,td=eS.create,tl=eO.create,tu=eO.strictCreate,tc=eC.create,th=eE.create,tp=eI.create,tm=eP.create,tf=eF.create,tg=eR.create,tv=eM.create,ty=ez.create,t_=eL.create,tb=eV.create,tx=eU.create,tk=eB.create,tw=eK.create,tZ=e$.create,tj=eW.create,tT=eq.create,tN=e$.createWithPreprocess,tS=eQ.create,tO=()=>e5().optional(),tC=()=>e6().optional(),tA=()=>e8().optional(),tE={string:e=>eg.create({...e,coerce:!0}),number:e=>ev.create({...e,coerce:!0}),boolean:e=>e_.create({...e,coerce:!0}),bigint:e=>ey.create({...e,coerce:!0}),date:e=>eb.create({...e,coerce:!0})},tI=D;e.i(65638),e.i(69790);var tP=e.i(88685),tP=tP,tF=e.i(19455),tR=e.i(87676),tM=e.i(93479),tz=e.i(67489),tL=e.i(24687),tV=e.i(13354),tD=e.i(87243),tU=e.i(67327),tB=e.i(65934),tK=e.i(75157),t$=e.i(82136);let tW=["low","medium","high","max"],tq=tP.object({agentType:tP.string(),whentouse:tP.string(),toolsDisplay:tP.string(),model:tP.string(),effort:tP.enum(tW),background:tP.enum(["false","true"]),isolation:tP.enum(["","worktree","remote"])});function tJ(){let e=(0,tB.useAppStore)(e=>e.wsUrl),t=(0,tB.useAppStore)(e=>e.apiBase),{currentAgent:r,loadAgentConfig:a}=(0,tD.useSession)(),{sendReloadAgentConfig:n}=(0,tU.useWebSocketSender)(),[s,d]=(0,N.useState)(!0),[c,h]=(0,N.useState)(!1),[p,m]=(0,N.useState)(null),f=(0,o.useForm)({resolver:function(e,t,r){if(void 0===r&&(r={}),"_def"in e&&"object"==typeof e._def&&"typeName"in e._def)return function(t,a,n){try{return Promise.resolve(T(function(){return Promise.resolve(e["sync"===r.mode?"parse":"parseAsync"](t,void 0)).then(function(e){return n.shouldUseNativeValidation&&l({},n),{errors:{},values:r.raw?Object.assign({},t):e}})},function(e){if(Array.isArray(null==e?void 0:e.issues))return{values:{},errors:u(function(e,t){for(var r={};e.length;){var a=e[0],n=a.code,s=a.message,i=a.path.join(".");if(!r[i])if("unionErrors"in a){var d=a.unionErrors[0].errors[0];r[i]={message:d.message,type:d.code}}else r[i]={message:s,type:n};if("unionErrors"in a&&a.unionErrors.forEach(function(t){return t.errors.forEach(function(t){return e.push(t)})}),t){var l=r[i].types,u=l&&l[a.code];r[i]=(0,o.appendErrors)(i,t,r,n,u?[].concat(u,a.message):a.message)}e.shift()}return r}(e.errors,!n.shouldUseNativeValidation&&"all"===n.criteriaMode),n)};throw e}))}catch(e){return Promise.reject(e)}};if("_zod"in e&&"object"==typeof e._zod)return function(t,a,n){try{return Promise.resolve(T(function(){return Promise.resolve(("sync"===r.mode?Z:j)(e,t,void 0)).then(function(e){return n.shouldUseNativeValidation&&l({},n),{errors:{},values:r.raw?Object.assign({},t):e}})},function(e){if(e instanceof k)return{values:{},errors:u(function(e,t){for(var r={};e.length;){var a=e[0],n=a.code,s=a.message,i=a.path.join(".");if(!r[i])if("invalid_union"===a.code&&a.errors.length>0){var d=a.errors[0][0];r[i]={message:d.message,type:d.code}}else r[i]={message:s,type:n};if("invalid_union"===a.code&&a.errors.forEach(function(t){return t.forEach(function(t){return e.push(t)})}),t){var l=r[i].types,u=l&&l[a.code];r[i]=(0,o.appendErrors)(i,t,r,n,u?[].concat(u,a.message):a.message)}e.shift()}return r}(e.issues,!n.shouldUseNativeValidation&&"all"===n.criteriaMode),n)};throw e}))}catch(e){return Promise.reject(e)}};throw Error("Invalid input: not a Zod schema")}(tq),defaultValues:{agentType:"",whentouse:"",toolsDisplay:"",model:"",effort:"medium",background:"false",isolation:""}}),g=(0,N.useCallback)(async()=>{d(!0);try{var a,n;let s=await (0,t$.loadAgentConfig)(e,t,r()),i=s.config;m(i);let o=i.tools.length?i.tools.join(", "):"";f.reset({agentType:s.agentType||r(),whentouse:null!=(a=i.whentouse)?a:"",toolsDisplay:o,model:null!=(n=i.model)?n:"",effort:function(e){let t="string"==typeof e?e.toLowerCase().trim():"";return"low"===t||"medium"===t||"high"===t||"max"===t?t:"medium"}(i.effort),background:i.background?"true":"false",isolation:"worktree"===i.isolation||"remote"===i.isolation?i.isolation:""})}catch(e){tV.appToast.error("加载失败:".concat(e instanceof Error?e.message:String(e)))}finally{d(!1)}},[e,t,r,f]);(0,N.useEffect)(()=>{g()},[g]);let v=(0,N.useCallback)(async s=>{if(!p)return void tV.appToast.error("尚未加载配置,请稍后重试");h(!0);try{let i="worktree"===s.isolation||"remote"===s.isolation?s.isolation:"";await (0,t$.saveAgentConfig)(e,t,r(),{tools:p.tools.slice(),disallowedTools:p.disallowedTools.slice(),mcpServers:p.mcpServers.slice(),skills:p.skills.slice(),agentTeams:p.agentTeams.slice(),rules:p.rules.slice(),model:s.model.trim(),effort:s.effort,background:"true"===s.background,isolation:i,whentouse:s.whentouse,env:{...p.env}}),tV.appToast.success("已保存账户与 agent 配置"),n(),await a(),await g()}catch(e){tV.appToast.error("保存失败:".concat(e instanceof Error?e.message:String(e)))}finally{h(!1)}},[p,e,t,r,n,a,g]),y="text-[0.78rem] font-medium text-[var(--ds-text)]";return(0,i.jsx)("div",{className:"flex min-h-0 flex-1 flex-col gap-4 overflow-auto",children:(0,i.jsx)("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden rounded-xl border bg-[#fff] shadow-[var(--shadow-md)]",children:s?(0,i.jsx)("div",{className:"tool-files-state p-4",children:"加载中…"}):(0,i.jsx)(tR.Form,{...f,children:(0,i.jsxs)("form",{onSubmit:f.handleSubmit(v),className:"flex min-h-0 flex-1 flex-col",children:[(0,i.jsxs)("div",{className:"grid flex-1 grid-cols-1 gap-x-4 gap-y-4 overflow-auto p-4 sm:grid-cols-2",children:[(0,i.jsx)(tR.FormField,{control:f.control,name:"agentType",render:e=>{let{field:t}=e;return(0,i.jsxs)(tR.FormItem,{className:"min-w-0",children:[(0,i.jsx)(tR.FormLabel,{className:y,children:"代理类型(只读)"}),(0,i.jsx)(tR.FormControl,{children:(0,i.jsx)(tM.Input,{...t,readOnly:!0,className:(0,tK.cn)("bg-[var(--ds-main-tint)]")})}),(0,i.jsx)(tR.FormMessage,{})]})}}),(0,i.jsx)(tR.FormField,{control:f.control,name:"model",render:e=>{let{field:t}=e;return(0,i.jsxs)(tR.FormItem,{className:"min-w-0",children:[(0,i.jsx)(tR.FormLabel,{className:y,children:"模型"}),(0,i.jsx)(tR.FormControl,{children:(0,i.jsx)(tM.Input,{...t,spellCheck:!1,placeholder:"例如:sonnet"})}),(0,i.jsx)(tR.FormMessage,{})]})}}),(0,i.jsx)(tR.FormField,{control:f.control,name:"effort",render:e=>{let{field:t}=e;return(0,i.jsxs)(tR.FormItem,{className:"min-w-0",children:[(0,i.jsx)(tR.FormLabel,{className:y,children:"推理力度"}),(0,i.jsxs)(tz.Select,{value:t.value,onValueChange:t.onChange,children:[(0,i.jsx)(tz.SelectTrigger,{className:(0,tK.cn)("w-full max-w-none"),children:(0,i.jsx)(tz.SelectValue,{placeholder:"选择力度"})}),(0,i.jsx)(tz.SelectContent,{children:tW.map(e=>(0,i.jsx)(tz.SelectItem,{value:e,children:e},e))})]}),(0,i.jsx)(tR.FormMessage,{})]})}}),(0,i.jsx)(tR.FormField,{control:f.control,name:"background",render:e=>{let{field:t}=e;return(0,i.jsxs)(tR.FormItem,{className:"min-w-0",children:[(0,i.jsx)(tR.FormLabel,{className:y,children:"后台运行"}),(0,i.jsxs)(tz.Select,{value:t.value,onValueChange:t.onChange,children:[(0,i.jsx)(tR.FormControl,{children:(0,i.jsx)(tz.SelectTrigger,{className:(0,tK.cn)("w-full max-w-none"),children:(0,i.jsx)(tz.SelectValue,{})})}),(0,i.jsxs)(tz.SelectContent,{children:[(0,i.jsx)(tz.SelectItem,{value:"false",children:"否"}),(0,i.jsx)(tz.SelectItem,{value:"true",children:"是"})]})]}),(0,i.jsx)(tR.FormMessage,{})]})}}),(0,i.jsx)(tR.FormField,{control:f.control,name:"isolation",render:e=>{let{field:t}=e;return(0,i.jsxs)(tR.FormItem,{className:"min-w-0",children:[(0,i.jsx)(tR.FormLabel,{className:y,children:"隔离方式"}),(0,i.jsxs)(tz.Select,{value:t.value||"__empty",onValueChange:e=>t.onChange("__empty"===e?"":e),children:[(0,i.jsx)(tR.FormControl,{children:(0,i.jsx)(tz.SelectTrigger,{className:(0,tK.cn)("w-full max-w-none"),children:(0,i.jsx)(tz.SelectValue,{})})}),(0,i.jsxs)(tz.SelectContent,{children:[(0,i.jsx)(tz.SelectItem,{value:"__empty",children:"(空)"}),(0,i.jsx)(tz.SelectItem,{value:"worktree",children:"worktree"}),(0,i.jsx)(tz.SelectItem,{value:"remote",children:"remote"})]})]}),(0,i.jsx)(tR.FormMessage,{})]})}}),(0,i.jsx)(tR.FormField,{control:f.control,name:"whentouse",render:e=>{let{field:t}=e;return(0,i.jsxs)(tR.FormItem,{className:"min-w-0 sm:col-span-2",children:[(0,i.jsx)(tR.FormLabel,{className:y,children:"使用时机"}),(0,i.jsx)(tR.FormControl,{children:(0,i.jsx)(tL.Textarea,{...t,className:(0,tK.cn)("agent-md-editor min-h-[110px] resize-y focus-visible:ring-1 focus-visible:ring-ring"),spellCheck:!1,placeholder:"输入该代理的使用场景与触发说明"})}),(0,i.jsx)(tR.FormMessage,{})]})}}),(0,i.jsx)(tR.FormField,{control:f.control,name:"toolsDisplay",render:e=>{let{field:t}=e;return(0,i.jsxs)(tR.FormItem,{className:"min-w-0 sm:col-span-2",children:[(0,i.jsx)(tR.FormLabel,{className:y,children:"工具列表(只读)"}),(0,i.jsx)(tR.FormControl,{children:(0,i.jsx)(tL.Textarea,{...t,readOnly:!0,className:(0,tK.cn)("agent-md-editor min-h-[80px] resize-y bg-[var(--ds-main-tint)]"),spellCheck:!1,placeholder:"只读展示当前已绑定的工具"})}),(0,i.jsx)(tR.FormMessage,{})]})}})]}),(0,i.jsxs)("div",{className:"flex shrink-0 justify-end gap-2 border-t border-[var(--ds-border)] px-4 py-3",children:[(0,i.jsx)(tF.Button,{type:"button",variant:"plain-outline",size:"lg",disabled:s||c,onClick:()=>void g(),children:"取消"}),(0,i.jsx)(tF.Button,{type:"submit",size:"lg",disabled:s||c,children:"保存"})]})]})})})})}}]);