@quixomatic/rpf 0.1.0 → 0.2.0

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 (194) hide show
  1. package/CHANGELOG.md +52 -0
  2. package/README.md +13 -5
  3. package/assets/dev-host/THIRD_PARTY_NOTICES.txt +2937 -0
  4. package/assets/dev-host/boot.js +250 -0
  5. package/assets/dev-host/boot.js.LEGAL.txt +48 -0
  6. package/assets/dev-host/chunks/accordion-O6VUPQ32.js +2 -0
  7. package/assets/dev-host/chunks/alert-PRAGKG5L.js +2 -0
  8. package/assets/dev-host/chunks/alert-dialog-SCBXM23J.js +2 -0
  9. package/assets/dev-host/chunks/avatar-WXPKQ3Z5.js +2 -0
  10. package/assets/dev-host/chunks/badge-KCMWGERA.js +2 -0
  11. package/assets/dev-host/chunks/breadcrumb-IJQJQ5JV.js +2 -0
  12. package/assets/dev-host/chunks/button-4JMBKYN4.js +2 -0
  13. package/assets/dev-host/chunks/calendar-XXLCAUPG.js +2 -0
  14. package/assets/dev-host/chunks/card-EY3LK2GB.js +2 -0
  15. package/assets/dev-host/chunks/chart-2PHC6UIE.js +2 -0
  16. package/assets/dev-host/chunks/chart-blocks-PZPCWCNT.js +2 -0
  17. package/assets/dev-host/chunks/chart-frame-MNUFXAPU.js +3 -0
  18. package/assets/dev-host/chunks/charts-SKK6UTYU.js +85 -0
  19. package/assets/dev-host/chunks/charts-SKK6UTYU.js.LEGAL.txt +48 -0
  20. package/assets/dev-host/chunks/chat-TTESCYES.js +2 -0
  21. package/assets/dev-host/chunks/checkbox-Y2UGSRR4.js +2 -0
  22. package/assets/dev-host/chunks/chunk-2IZ44WWI.js +2 -0
  23. package/assets/dev-host/chunks/chunk-2L7NK6SJ.js +2 -0
  24. package/assets/dev-host/chunks/chunk-33RMFA4P.js +2 -0
  25. package/assets/dev-host/chunks/chunk-3H6F4X7R.js +2 -0
  26. package/assets/dev-host/chunks/chunk-3UDEYJRG.js +2 -0
  27. package/assets/dev-host/chunks/chunk-4E74H7FZ.js +2 -0
  28. package/assets/dev-host/chunks/chunk-4UUMO65R.js +2 -0
  29. package/assets/dev-host/chunks/chunk-57M36GYM.js +2 -0
  30. package/assets/dev-host/chunks/chunk-5EK7QOB6.js +2 -0
  31. package/assets/dev-host/chunks/chunk-5YMOXSSM.js +2 -0
  32. package/assets/dev-host/chunks/chunk-5ZMYWE5S.js +2 -0
  33. package/assets/dev-host/chunks/chunk-6ARM5VDH.js +2 -0
  34. package/assets/dev-host/chunks/chunk-7OCTAHT6.js +2 -0
  35. package/assets/dev-host/chunks/chunk-7TG23VIV.js +2 -0
  36. package/assets/dev-host/chunks/chunk-AAL6V4Y3.js +2 -0
  37. package/assets/dev-host/chunks/chunk-APP2HKWR.js +8 -0
  38. package/assets/dev-host/chunks/chunk-AVSRGCSF.js +2 -0
  39. package/assets/dev-host/chunks/chunk-AZWODE64.js +2 -0
  40. package/assets/dev-host/chunks/chunk-B4MRCKT4.js +2 -0
  41. package/assets/dev-host/chunks/chunk-BB4IX5QA.js +2 -0
  42. package/assets/dev-host/chunks/chunk-BH6FGVDP.js +2 -0
  43. package/assets/dev-host/chunks/chunk-BJZOPTWR.js +2 -0
  44. package/assets/dev-host/chunks/chunk-CCXMDKVL.js +2 -0
  45. package/assets/dev-host/chunks/chunk-CJ5CECQT.js +1 -0
  46. package/assets/dev-host/chunks/chunk-CLVPTZ4G.js +2 -0
  47. package/assets/dev-host/chunks/chunk-CT4EH2K2.js +8 -0
  48. package/assets/dev-host/chunks/chunk-CT4EH2K2.js.LEGAL.txt +12 -0
  49. package/assets/dev-host/chunks/chunk-CWDPAB6V.js +2 -0
  50. package/assets/dev-host/chunks/chunk-D7BPK3AE.js +1 -0
  51. package/assets/dev-host/chunks/chunk-DG6LRRQT.js +2 -0
  52. package/assets/dev-host/chunks/chunk-DR47HKIK.js +2 -0
  53. package/assets/dev-host/chunks/chunk-E75HEEMN.js +2 -0
  54. package/assets/dev-host/chunks/chunk-EDEL6XSO.js +2 -0
  55. package/assets/dev-host/chunks/chunk-EGZKG2B2.js +2 -0
  56. package/assets/dev-host/chunks/chunk-F353PAEY.js +2 -0
  57. package/assets/dev-host/chunks/chunk-F5MKIWPQ.js +2 -0
  58. package/assets/dev-host/chunks/chunk-FJRWQRLM.js +2 -0
  59. package/assets/dev-host/chunks/chunk-FROPNHO5.js +2 -0
  60. package/assets/dev-host/chunks/chunk-FTWKUXER.js +2 -0
  61. package/assets/dev-host/chunks/chunk-FZPMZMFU.js +2 -0
  62. package/assets/dev-host/chunks/chunk-GN3SYBEC.js +2 -0
  63. package/assets/dev-host/chunks/chunk-GQYRJYJV.js +2 -0
  64. package/assets/dev-host/chunks/chunk-GWDGPUGM.js +2 -0
  65. package/assets/dev-host/chunks/chunk-GX72R347.js +2 -0
  66. package/assets/dev-host/chunks/chunk-GZJCEDUU.js +4 -0
  67. package/assets/dev-host/chunks/chunk-H6TI5TWN.js +2 -0
  68. package/assets/dev-host/chunks/chunk-HFUDOYIP.js +16 -0
  69. package/assets/dev-host/chunks/chunk-IAEAQCYR.js +2 -0
  70. package/assets/dev-host/chunks/chunk-IJQ26FTX.js +15 -0
  71. package/assets/dev-host/chunks/chunk-IJQ26FTX.js.LEGAL.txt +12 -0
  72. package/assets/dev-host/chunks/chunk-IQ2XSDFU.js +3 -0
  73. package/assets/dev-host/chunks/chunk-IQ2XSDFU.js.LEGAL.txt +146 -0
  74. package/assets/dev-host/chunks/chunk-IWEJRU22.js +2 -0
  75. package/assets/dev-host/chunks/chunk-JIAVZ3V7.js +3 -0
  76. package/assets/dev-host/chunks/chunk-K7LVVFGH.js +1 -0
  77. package/assets/dev-host/chunks/chunk-KAZVAX35.js +2 -0
  78. package/assets/dev-host/chunks/chunk-KCTKD6GV.js +2 -0
  79. package/assets/dev-host/chunks/chunk-KNOE7TZW.js +2 -0
  80. package/assets/dev-host/chunks/chunk-KOQLDUOI.js +2 -0
  81. package/assets/dev-host/chunks/chunk-KPP4HYUV.js +2 -0
  82. package/assets/dev-host/chunks/chunk-KSVOOYUA.js +2 -0
  83. package/assets/dev-host/chunks/chunk-KVMUXFPB.js +2 -0
  84. package/assets/dev-host/chunks/chunk-LTVKSGLG.js +2 -0
  85. package/assets/dev-host/chunks/chunk-LYT7LQS3.js +2 -0
  86. package/assets/dev-host/chunks/chunk-M7A47ZSM.js +2 -0
  87. package/assets/dev-host/chunks/chunk-MGLBTOXD.js +6 -0
  88. package/assets/dev-host/chunks/chunk-ML6HCGK5.js +2 -0
  89. package/assets/dev-host/chunks/chunk-MQ67DRDE.js +2 -0
  90. package/assets/dev-host/chunks/chunk-MTHCFDUE.js +2 -0
  91. package/assets/dev-host/chunks/chunk-NI6ZJ6DH.js +2 -0
  92. package/assets/dev-host/chunks/chunk-NJX7QY3Z.js +2 -0
  93. package/assets/dev-host/chunks/chunk-NZ73KS2Y.js +2 -0
  94. package/assets/dev-host/chunks/chunk-OW6AVFQA.js +2 -0
  95. package/assets/dev-host/chunks/chunk-OXJ6LWKI.js +3 -0
  96. package/assets/dev-host/chunks/chunk-OXJ6LWKI.js.LEGAL.txt +12 -0
  97. package/assets/dev-host/chunks/chunk-PHK25MY7.js +2 -0
  98. package/assets/dev-host/chunks/chunk-PQMY72VV.js +2 -0
  99. package/assets/dev-host/chunks/chunk-PWFHIE6D.js +2 -0
  100. package/assets/dev-host/chunks/chunk-PYWKHILP.js +2 -0
  101. package/assets/dev-host/chunks/chunk-QFN6XL4O.js +2 -0
  102. package/assets/dev-host/chunks/chunk-R5KQ2GRA.js +2 -0
  103. package/assets/dev-host/chunks/chunk-RCNX6LVJ.js +3 -0
  104. package/assets/dev-host/chunks/chunk-RCNX6LVJ.js.LEGAL.txt +12 -0
  105. package/assets/dev-host/chunks/chunk-SFI7YWVR.js +2 -0
  106. package/assets/dev-host/chunks/chunk-SLZI4G3N.js +2 -0
  107. package/assets/dev-host/chunks/chunk-SVQCDOZ3.js +2 -0
  108. package/assets/dev-host/chunks/chunk-T4Y5HG5P.js +4 -0
  109. package/assets/dev-host/chunks/chunk-T7JFBQSG.js +2 -0
  110. package/assets/dev-host/chunks/chunk-TIJLEKZ2.js +2 -0
  111. package/assets/dev-host/chunks/chunk-TNLYU77Y.js +2 -0
  112. package/assets/dev-host/chunks/chunk-TQPXDAVH.js +2 -0
  113. package/assets/dev-host/chunks/chunk-UH726PMV.js +7 -0
  114. package/assets/dev-host/chunks/chunk-UH726PMV.js.LEGAL.txt +12 -0
  115. package/assets/dev-host/chunks/chunk-URJZKT45.js +2 -0
  116. package/assets/dev-host/chunks/chunk-URWVHIIJ.js +2 -0
  117. package/assets/dev-host/chunks/chunk-UUJ5X322.js +2 -0
  118. package/assets/dev-host/chunks/chunk-UWANBOC6.js +2 -0
  119. package/assets/dev-host/chunks/chunk-UXUS6DNI.js +2 -0
  120. package/assets/dev-host/chunks/chunk-VKXVJGG5.js +6 -0
  121. package/assets/dev-host/chunks/chunk-VSM3ZOBU.js +2 -0
  122. package/assets/dev-host/chunks/chunk-WLBNJ4K3.js +2 -0
  123. package/assets/dev-host/chunks/chunk-WRHZYADJ.js +2 -0
  124. package/assets/dev-host/chunks/chunk-WT34MBTN.js +2 -0
  125. package/assets/dev-host/chunks/chunk-X34AFUS2.js +2 -0
  126. package/assets/dev-host/chunks/chunk-XE5RQ73V.js +2 -0
  127. package/assets/dev-host/chunks/chunk-XGLVZEGD.js +2 -0
  128. package/assets/dev-host/chunks/chunk-XIXCIQKJ.js +2 -0
  129. package/assets/dev-host/chunks/chunk-Z76KXEPD.js +2 -0
  130. package/assets/dev-host/chunks/code-block-H2ETQV3M.js +2 -0
  131. package/assets/dev-host/chunks/code-editor-2JYERJLS.js +2 -0
  132. package/assets/dev-host/chunks/collapsible-4ZOFMWLB.js +2 -0
  133. package/assets/dev-host/chunks/color-UDQWYS2D.js +2 -0
  134. package/assets/dev-host/chunks/color-picker-RRCCLR54.js +2 -0
  135. package/assets/dev-host/chunks/combobox-U4455OMJ.js +2 -0
  136. package/assets/dev-host/chunks/contrast-badge-KDF65X7J.js +2 -0
  137. package/assets/dev-host/chunks/core.esm-WYAV6XZS.js +2 -0
  138. package/assets/dev-host/chunks/date-range-picker-WJYHAHRM.js +2 -0
  139. package/assets/dev-host/chunks/dialog-I6AGHWB3.js +2 -0
  140. package/assets/dev-host/chunks/dist-T43K2TRF.js +2 -0
  141. package/assets/dev-host/chunks/dropdown-menu-LSOMXDWG.js +2 -0
  142. package/assets/dev-host/chunks/empty-NLQODUSK.js +2 -0
  143. package/assets/dev-host/chunks/esm-L33CRTOD.js +5 -0
  144. package/assets/dev-host/chunks/font-picker-3TLYYZJH.js +2 -0
  145. package/assets/dev-host/chunks/frame-HA7UIYZF.js +2 -0
  146. package/assets/dev-host/chunks/heading-7M24WKK6.js +2 -0
  147. package/assets/dev-host/chunks/hover-card-HSHOQPOI.js +2 -0
  148. package/assets/dev-host/chunks/icon-NZIMARLZ.js +2 -0
  149. package/assets/dev-host/chunks/image-R7XGYKVH.js +2 -0
  150. package/assets/dev-host/chunks/index-fn-BUQBI34R.js +5 -0
  151. package/assets/dev-host/chunks/index.esm-SPI7ZXRT.js +6 -0
  152. package/assets/dev-host/chunks/index.esm-SPI7ZXRT.js.LEGAL.txt +25 -0
  153. package/assets/dev-host/chunks/input-YECXNM53.js +2 -0
  154. package/assets/dev-host/chunks/input-group-GFKXSZM7.js +2 -0
  155. package/assets/dev-host/chunks/kbd-V25ZMVCM.js +2 -0
  156. package/assets/dev-host/chunks/label-LJT4V2CT.js +2 -0
  157. package/assets/dev-host/chunks/label-value-6Z6ATP55.js +2 -0
  158. package/assets/dev-host/chunks/legacy-4ICQWPOE.js +2 -0
  159. package/assets/dev-host/chunks/logo-AAMBHX2W.js +2 -0
  160. package/assets/dev-host/chunks/number-field-6TCQAVTR.js +2 -0
  161. package/assets/dev-host/chunks/pill-7L57ZNRJ.js +2 -0
  162. package/assets/dev-host/chunks/popover-3P6YNKH3.js +2 -0
  163. package/assets/dev-host/chunks/portal-code-Z5G6AEMM.js +25 -0
  164. package/assets/dev-host/chunks/portal-rte-7B6VXIZO.js +163 -0
  165. package/assets/dev-host/chunks/progress-RBCJRVM7.js +2 -0
  166. package/assets/dev-host/chunks/radio-group-NJWXZCX3.js +2 -0
  167. package/assets/dev-host/chunks/resizable-XF4P6OKR.js +2 -0
  168. package/assets/dev-host/chunks/rich-text-7OMYZ564.js +2 -0
  169. package/assets/dev-host/chunks/rich-text-editor-T6KWD4P3.js +2 -0
  170. package/assets/dev-host/chunks/scroll-row-LMI7JCFR.js +2 -0
  171. package/assets/dev-host/chunks/select-F3MZWTTS.js +2 -0
  172. package/assets/dev-host/chunks/separator-JRJYKM4Z.js +2 -0
  173. package/assets/dev-host/chunks/sheet-EXRT4MFB.js +2 -0
  174. package/assets/dev-host/chunks/side-panel-IBHLEANN.js +2 -0
  175. package/assets/dev-host/chunks/sidebar-VKQMQMF2.js +2 -0
  176. package/assets/dev-host/chunks/skeleton-KIRVQ4EO.js +2 -0
  177. package/assets/dev-host/chunks/slider-XKYDL5MR.js +2 -0
  178. package/assets/dev-host/chunks/sortable.esm-3VPY5PX7.js +2 -0
  179. package/assets/dev-host/chunks/split-button-WP6LALDS.js +2 -0
  180. package/assets/dev-host/chunks/stepper-KR6PXZHW.js +2 -0
  181. package/assets/dev-host/chunks/switch-P6NJELJJ.js +2 -0
  182. package/assets/dev-host/chunks/tabs-PFPRJNVZ.js +2 -0
  183. package/assets/dev-host/chunks/textarea-2JXA5XWS.js +2 -0
  184. package/assets/dev-host/chunks/toggle-group-PS7JN2JM.js +2 -0
  185. package/assets/dev-host/chunks/tooltip-S4RBC3O4.js +2 -0
  186. package/assets/dev-host/chunks/tree-NQF6ZJLH.js +2 -0
  187. package/assets/dev-host/chunks/utilities.esm-YYZNDLV4.js +2 -0
  188. package/assets/dev-host/css/shadcn-tailwind.css +637 -0
  189. package/assets/dev-host/css/tw-animate.css +1 -0
  190. package/assets/dev-host/kit-candidates.json +1 -0
  191. package/assets/dev-host/kit-manifest.json +435 -0
  192. package/dist/cli.mjs +5270 -1770
  193. package/package.json +7 -3
  194. package/skills/react-portal/SKILL.md +3 -2
@@ -0,0 +1,7 @@
1
+ import{a as S}from"./chunk-IJQ26FTX.js";import{a as h}from"./chunk-KVMUXFPB.js";var m=h(o=>{"use strict";(function(){function c(){}function y(t){return""+t}function _(t,e,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;if(n==null)n=null;else if(n===p)n=p;else{try{y(n);var u=!1}catch{u=!0}u&&(console.error("The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",typeof Symbol=="function"&&Symbol.toStringTag&&n[Symbol.toStringTag]||n.constructor.name||"Object"),y(n)),n=""+n}return{$$typeof:v,key:n,children:t,containerInfo:e,implementation:r}}function l(t,e){if(t==="font")return"";if(typeof e=="string")return e==="use-credentials"?e:""}function a(t){return t===null?"`null`":t===void 0?"`undefined`":t===""?"an empty string":'something with type "'+typeof t+'"'}function s(t){return t===null?"`null`":t===void 0?"`undefined`":t===""?"an empty string":typeof t=="string"?JSON.stringify(t):typeof t=="number"?"`"+t+"`":'something with type "'+typeof t+'"'}function g(){var t=d.H;return t===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
2
+ 1. You might have mismatching versions of React and the renderer (such as React DOM)
3
+ 2. You might be breaking the Rules of Hooks
4
+ 3. You might have more than one copy of React in the same app
5
+ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),t}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var E=S(),i={d:{f:c,r:function(){throw Error("Invalid form element. requestFormReset must be passed a form that was rendered by React.")},D:c,C:c,L:c,m:c,X:c,S:c,M:c},p:0,findDOMNode:null},v=Symbol.for("react.portal"),b=Symbol.for("react.recoverable"),p=Symbol.for("react.optimistic_key"),d=E.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;typeof Map=="function"&&Map.prototype!=null&&typeof Map.prototype.forEach=="function"&&typeof Set=="function"&&Set.prototype!=null&&typeof Set.prototype.clear=="function"&&typeof Set.prototype.forEach=="function"||console.error("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,o.browser=function(t){return{$$typeof:b,_reason:t}},o.createPortal=function(t,e){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)throw Error("Target container is not a DOM element.");return _(t,e,null,r)},o.flushSync=function(t){var e=d.T,r=i.p;try{if(d.T=null,i.p=2,t)return t()}finally{d.T=e,i.p=r,i.d.f()&&console.error("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task.")}},o.preconnect=function(t,e){typeof t=="string"&&t?e!=null&&typeof e!="object"?console.error("ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.",s(e)):e!=null&&typeof e.crossOrigin!="string"&&console.error("ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.",a(e.crossOrigin)):console.error("ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",a(t)),typeof t=="string"&&(e?(e=e.crossOrigin,e=typeof e=="string"?e==="use-credentials"?e:"":void 0):e=null,i.d.C(t,e))},o.prefetchDNS=function(t){if(typeof t!="string"||!t)console.error("ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",a(t));else if(1<arguments.length){var e=arguments[1];typeof e=="object"&&e.hasOwnProperty("crossOrigin")?console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",s(e)):console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",s(e))}typeof t=="string"&&i.d.D(t)},o.preinit=function(t,e){if(typeof t=="string"&&t?e==null||typeof e!="object"?console.error("ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.",s(e)):e.as!=="style"&&e.as!=="script"&&console.error('ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".',s(e.as)):console.error("ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",a(t)),typeof t=="string"&&e&&typeof e.as=="string"){var r=e.as,n=l(r,e.crossOrigin),u=typeof e.integrity=="string"?e.integrity:void 0,f=typeof e.fetchPriority=="string"?e.fetchPriority:void 0;r==="style"?i.d.S(t,typeof e.precedence=="string"?e.precedence:void 0,{crossOrigin:n,integrity:u,fetchPriority:f}):r==="script"&&i.d.X(t,{crossOrigin:n,integrity:u,fetchPriority:f,nonce:typeof e.nonce=="string"?e.nonce:void 0})}},o.preinitModule=function(t,e){var r="";typeof t=="string"&&t||(r+=" The `href` argument encountered was "+a(t)+"."),e!==void 0&&typeof e!="object"?r+=" The `options` argument encountered was "+a(e)+".":e&&"as"in e&&e.as!=="script"&&(r+=" The `as` option encountered was "+s(e.as)+"."),r?console.error("ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s",r):(r=e&&typeof e.as=="string"?e.as:"script",r)==="script"||(r=s(r),console.error('ReactDOM.preinitModule(): Currently the only supported "as" type for this function is "script" but received "%s" instead. This warning was generated for `href` "%s". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',r,t)),typeof t=="string"&&(typeof e=="object"&&e!==null?(e.as==null||e.as==="script")&&(r=l(e.as,e.crossOrigin),i.d.M(t,{crossOrigin:r,integrity:typeof e.integrity=="string"?e.integrity:void 0,nonce:typeof e.nonce=="string"?e.nonce:void 0,fetchPriority:typeof e.fetchPriority=="string"?e.fetchPriority:void 0})):e==null&&i.d.M(t))},o.preload=function(t,e){var r="";if(typeof t=="string"&&t||(r+=" The `href` argument encountered was "+a(t)+"."),e==null||typeof e!="object"?r+=" The `options` argument encountered was "+a(e)+".":typeof e.as=="string"&&e.as||(r+=" The `as` option encountered was "+a(e.as)+"."),r&&console.error('ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel="preload" as="..." />` tag.%s',r),typeof t=="string"&&typeof e=="object"&&e!==null&&typeof e.as=="string"){r=e.as;var n=l(r,e.crossOrigin);i.d.L(t,r,{crossOrigin:n,integrity:typeof e.integrity=="string"?e.integrity:void 0,nonce:typeof e.nonce=="string"?e.nonce:void 0,type:typeof e.type=="string"?e.type:void 0,fetchPriority:typeof e.fetchPriority=="string"?e.fetchPriority:void 0,referrerPolicy:typeof e.referrerPolicy=="string"?e.referrerPolicy:void 0,imageSrcSet:typeof e.imageSrcSet=="string"?e.imageSrcSet:void 0,imageSizes:typeof e.imageSizes=="string"?e.imageSizes:void 0,media:typeof e.media=="string"?e.media:void 0})}},o.preloadModule=function(t,e){var r="";typeof t=="string"&&t||(r+=" The `href` argument encountered was "+a(t)+"."),e!==void 0&&typeof e!="object"?r+=" The `options` argument encountered was "+a(e)+".":e&&"as"in e&&typeof e.as!="string"&&(r+=" The `as` option encountered was "+a(e.as)+"."),r&&console.error('ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel="modulepreload" as="..." />` tag.%s',r),typeof t=="string"&&(e?(r=l(e.as,e.crossOrigin),i.d.m(t,{as:typeof e.as=="string"&&e.as!=="script"?e.as:void 0,crossOrigin:r,integrity:typeof e.integrity=="string"?e.integrity:void 0,nonce:typeof e.nonce=="string"?e.nonce:void 0,fetchPriority:typeof e.fetchPriority=="string"?e.fetchPriority:void 0})):i.d.m(t))},o.requestFormReset=function(t){i.d.r(t)},o.unstable_batchedUpdates=function(t,e){return t(e)},o.useFormState=function(t,e,r){return g().useFormState(t,e,r)},o.useFormStatus=function(){return g().useHostTransitionStatus()},o.version="19.3.1",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var T=h((D,O)=>{"use strict";O.exports=m()});export{T as a};
6
+ /*! For license information please see chunk-UH726PMV.js.LEGAL.txt */
7
+ //# sourceMappingURL=chunk-UH726PMV.js.map
@@ -0,0 +1,12 @@
1
+ Bundled license information:
2
+
3
+ react-dom/cjs/react-dom.development.js:
4
+ /**
5
+ * @license React
6
+ * react-dom.development.js
7
+ *
8
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
9
+ *
10
+ * This source code is licensed under the MIT license found in the
11
+ * LICENSE file in the root directory of this source tree.
12
+ */
@@ -0,0 +1,2 @@
1
+ var i={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},e={...i,position:"fixed",margin:0,top:0,left:0},t={...i,position:"absolute"};export{e as a,t as b};
2
+ //# sourceMappingURL=chunk-URJZKT45.js.map
@@ -0,0 +1,2 @@
1
+ import{a as y}from"./chunk-IJQ26FTX.js";import{c as T}from"./chunk-KVMUXFPB.js";var r=T(y());function O(){for(var n=arguments.length,t=new Array(n),e=0;e<n;e++)t[e]=arguments[e];return(0,r.useMemo)(()=>o=>{t.forEach(u=>u(o))},t)}var p=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function f(n){let t=Object.prototype.toString.call(n);return t==="[object Window]"||t==="[object global]"}function w(n){return"nodeType"in n}function c(n){var t,e;return n?f(n)?n:w(n)&&(t=(e=n.ownerDocument)==null?void 0:e.defaultView)!=null?t:window:window}function R(n){let{Document:t}=c(n);return n instanceof t}function D(n){return f(n)?!1:n instanceof c(n).HTMLElement}function j(n){return n instanceof c(n).SVGElement}function V(n){return n?f(n)?n.document:w(n)?R(n)?n:D(n)||j(n)?n.ownerDocument:document:document:document}var h=p?r.useLayoutEffect:r.useEffect;function C(n){let t=(0,r.useRef)(n);return h(()=>{t.current=n}),(0,r.useCallback)(function(){for(var e=arguments.length,o=new Array(e),u=0;u<e;u++)o[u]=arguments[u];return t.current==null?void 0:t.current(...o)},[])}function X(){let n=(0,r.useRef)(null),t=(0,r.useCallback)((o,u)=>{n.current=setInterval(o,u)},[]),e=(0,r.useCallback)(()=>{n.current!==null&&(clearInterval(n.current),n.current=null)},[]);return[t,e]}function Y(n,t){t===void 0&&(t=[n]);let e=(0,r.useRef)(n);return h(()=>{e.current!==n&&(e.current=n)},t),e}function x(n,t){let e=(0,r.useRef)();return(0,r.useMemo)(()=>{let o=n(e.current);return e.current=o,o},[...t])}function A(n){let t=C(n),e=(0,r.useRef)(null),o=(0,r.useCallback)(u=>{u!==e.current&&t?.(u,e.current),e.current=u},[]);return[e,o]}function I(n){let t=(0,r.useRef)();return(0,r.useEffect)(()=>{t.current=n},[n]),t.current}var s={};function v(n,t){return(0,r.useMemo)(()=>{if(t)return t;let e=s[n]==null?0:s[n]+1;return s[n]=e,n+"-"+e},[n,t])}function g(n){return function(t){for(var e=arguments.length,o=new Array(e>1?e-1:0),u=1;u<e;u++)o[u-1]=arguments[u];return o.reduce((i,b)=>{let E=Object.entries(b);for(let[l,S]of E){let a=i[l];a!=null&&(i[l]=a+n*S)}return i},{...t})}}var N=g(1),F=g(-1);function L(n){return"clientX"in n&&"clientY"in n}function H(n){if(!n)return!1;let{KeyboardEvent:t}=c(n.target);return t&&n instanceof t}function M(n){if(!n)return!1;let{TouchEvent:t}=c(n.target);return t&&n instanceof t}function W(n){if(M(n)){if(n.touches&&n.touches.length){let{clientX:t,clientY:e}=n.touches[0];return{x:t,y:e}}else if(n.changedTouches&&n.changedTouches.length){let{clientX:t,clientY:e}=n.changedTouches[0];return{x:t,y:e}}}return L(n)?{x:n.clientX,y:n.clientY}:null}var d=Object.freeze({Translate:{toString(n){if(!n)return;let{x:t,y:e}=n;return"translate3d("+(t?Math.round(t):0)+"px, "+(e?Math.round(e):0)+"px, 0)"}},Scale:{toString(n){if(!n)return;let{scaleX:t,scaleY:e}=n;return"scaleX("+t+") scaleY("+e+")"}},Transform:{toString(n){if(n)return[d.Translate.toString(n),d.Scale.toString(n)].join(" ")}},Transition:{toString(n){let{property:t,duration:e,easing:o}=n;return t+" "+e+"ms "+o}}}),m="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function q(n){return n.matches(m)?n:n.querySelector(m)}export{O as a,p as b,f as c,w as d,c as e,R as f,D as g,j as h,V as i,h as j,C as k,X as l,Y as m,x as n,A as o,I as p,v as q,N as r,F as s,L as t,H as u,M as v,W as w,d as x,q as y};
2
+ //# sourceMappingURL=chunk-URWVHIIJ.js.map
@@ -0,0 +1,2 @@
1
+ import{a as me,b as be,c as ye,d as Ie,e as we}from"./chunk-Z76KXEPD.js";import{i as Te}from"./chunk-H6TI5TWN.js";import{a as oe,b as Me,d as _e}from"./chunk-IAEAQCYR.js";import{E as pe,I as le,P as ue,Q as ce,S as de,V as fe,W as ge,X as De,Y as Re,_ as Se,ba as he,ca as Ce,da as Ee,ea as Pe,fa as xe,ga as Q,ia as Oe,ka as Ne}from"./chunk-OXJ6LWKI.js";import{a as ve}from"./chunk-B4MRCKT4.js";import{c as ne,e as re,k,m as se,o as ie,p as ae}from"./chunk-7OCTAHT6.js";import{a as w,c as T}from"./chunk-FTWKUXER.js";import{c as I}from"./chunk-AAL6V4Y3.js";import{d as U}from"./chunk-CLVPTZ4G.js";import{d as te}from"./chunk-EGZKG2B2.js";import{d as ee}from"./chunk-MQ67DRDE.js";import{b as J}from"./chunk-NZ73KS2Y.js";import{a as q}from"./chunk-CT4EH2K2.js";import{l as h}from"./chunk-JIAVZ3V7.js";import{a as C}from"./chunk-IJQ26FTX.js";import{c as D}from"./chunk-KVMUXFPB.js";var Be=D(C(),1);var j=D(C(),1),H=j.createContext(void 0);H.displayName="DialogRootContext";function c(e){let t=j.useContext(H);if(!e&&t===void 0)throw new Error("Base UI: DialogRootContext is missing. Dialog parts must be placed within <Dialog.Root>.");return t}var Xe=Be.forwardRef(function(t,n){let{render:i,className:d,style:m,forceRender:r=!1,...l}=t,a=c(),o=a.useState("open"),f=a.useState("nested"),g=a.useState("mounted"),R=a.useState("transitionStatus");return h("div",t,{state:{open:o,transitionStatus:R},ref:[a.context.backdropRef,n],stateAttributesMapping:ae,props:[{role:"presentation",hidden:!g,style:{userSelect:"none",WebkitUserSelect:"none"}},l],enabled:r||!f})});Xe.displayName="DialogBackdrop";var ke=D(C(),1);var Ze=ke.forwardRef(function(t,n){let{render:i,className:d,style:m,disabled:r=!1,nativeButton:l=!0,...a}=t,o=c(),f=o.useState("open"),{getButtonProps:g,buttonRef:R}=U({disabled:r,native:l}),E={disabled:r};function p(s){f&&o.setOpen(!1,w(T.closePress,s.nativeEvent))}return h("button",t,{state:E,ref:[n,R],props:[{onClick:p},a,g]})});Ze.displayName="DialogClose";var Ve=D(C(),1);var $e=Ve.forwardRef(function(t,n){let{render:i,className:d,style:m,id:r,...l}=t,a=c(),o=I(r);return a.useSyncedValueWithCleanup("descriptionElementId",o),h("p",t,{ref:n,props:[{id:o},l]})});$e.displayName="DialogDescription";var Ae="--nested-dialogs";var xt=k.open,Ot=k.closed,Nt=k.startingStyle,bt=k.endingStyle;var Fe="data-nested-dialog-open";var Ue=D(C(),1);var W=D(C(),1),K=W.createContext(void 0);K.displayName="DialogPortalContext";function L(){let e=W.useContext(K);if(e===void 0)throw new Error("Base UI: <Dialog.Portal> is missing.");return e}var z={...ie,...ee,nestedDialogOpen(e){return e?{[Fe]:""}:null}};var je=D(q(),1),ot=Ue.forwardRef(function(t,n){let{render:i,className:d,style:m,finalFocus:r,initialFocus:l,...a}=t,o=c(),f=o.useState("descriptionElementId"),g=o.useState("disablePointerDismissal"),R=o.useState("floatingRootContext"),E=o.useState("popupProps"),p=o.useState("modal"),s=o.useState("mounted"),S=o.useState("nested"),x=o.useState("nestedOpenDialogCount"),P=o.useState("open"),N=o.useState("openMethod"),b=o.useState("titleElementId"),u=o.useState("transitionStatus"),O=o.useState("role"),v=R.useState("floatingId");L(),te({open:P,ref:o.context.popupRef,onComplete(){P&&o.context.onOpenChangeComplete?.(!0)}});let M=l===void 0?ge(o.context.popupRef):l,y=x>0,_=o.useStateSetter("popupElement"),B=h("div",t,{state:{open:P,nested:S,transitionStatus:u,nestedDialogOpen:y},props:[E,{id:v,"aria-labelledby":b,"aria-describedby":f,role:O,...fe,hidden:!s,onKeyDown($){Te.has($.key)&&$.stopPropagation()},style:{[Ae]:x}},a],ref:[n,o.context.popupRef,_],stateAttributesMapping:z});return(0,je.jsx)(ue,{context:R,openInteractionType:N,disabled:!s,closeOnFocusOut:!g,initialFocus:M,returnFocus:r,modal:p!==!1,restoreFocus:"popup",children:B})});ot.displayName="DialogPopup";var He=D(C(),1);var V=D(q(),1),nt=He.forwardRef(function(t,n){let{keepMounted:i=!1,...d}=t,m=c(),r=m.useState("mounted"),l=m.useState("modal"),a=m.useState("open");return r||i?(0,V.jsx)(K.Provider,{value:i,children:(0,V.jsxs)(le,{ref:n,...d,children:[r&&l===!0&&(0,V.jsx)(Me,{ref:m.context.internalBackdropRef,inert:ve(!a)}),t.children]})}):null});nt.displayName="DialogPortal";var We=D(C(),1);var rt=We.forwardRef(function(t,n){let{render:i,className:d,style:m,id:r,...l}=t,a=c(),o=I(r);return a.useSyncedValueWithCleanup("titleElementId",o),h("h2",t,{ref:n,props:[{id:o},l]})});rt.displayName="DialogTitle";var Ke=D(C(),1);var st=Oe(function(t,n){let{render:i,className:d,style:m,disabled:r=!1,nativeButton:l=!0,id:a,payload:o,handle:f,...g}=t,R=c(!0),p=Ie(f)??R;if(!p)throw new Error("Base UI: <Dialog.Trigger> must be used within <Dialog.Root> or provided with a handle.");let s=I(a),S=p.useState("floatingRootContext"),x=p.useState("isOpenedByTrigger",s),P=p.useState("triggerPopupId",s),N=Ke.useRef(null),{registerTrigger:b,isMountedByThisTrigger:u}=he(s,N,p,{payload:o}),{getButtonProps:O,buttonRef:v}=U({disabled:r,native:l}),M=ce(S),y=_e(()=>p.select("open"),B=>{p.set("openMethod",B)}),_={disabled:r,open:x},F=p.useState("triggerProps",u);return h("button",t,{state:_,ref:[v,n,b,N],props:[M.reference,F,y,{[pe]:"",id:s,"aria-haspopup":"dialog","aria-expanded":x,"aria-controls":P},g,O],stateAttributesMapping:se})});st.displayName="DialogTrigger";var Le=D(C(),1);var it=Le.forwardRef(function(t,n){let{render:i,className:d,style:m,children:r,...l}=t,a=L(),o=c(),f=o.useState("open"),g=o.useState("nested"),R=o.useState("transitionStatus"),E=o.useState("nestedOpenDialogCount"),p=o.useState("mounted"),s=o.useStateSetter("viewportElement"),S=E>0;return h("div",t,{enabled:a||p,state:{open:f,nested:g,transitionStatus:R,nestedDialogOpen:S},ref:[n,s],stateAttributesMapping:z,props:[{role:"presentation",hidden:!p,style:{pointerEvents:f?void 0:"none"},children:r},l]})});it.displayName="DialogViewport";var G=D(C(),1);var ze={...ye,modal:e=>e.modal,nested:e=>e.nested,nestedOpenDialogCount:e=>e.nestedOpenDialogCount,nestedOpenDrawerCount:e=>e.nestedOpenDrawerCount,disablePointerDismissal:e=>e.disablePointerDismissal,openMethod:e=>e.openMethod,descriptionElementId:e=>e.descriptionElementId,titleElementId:e=>e.titleElementId,viewportElement:e=>e.viewportElement,role:e=>e.role},Y=class extends Ne{constructor(t,n,i){let d=new Q,m=Ye(t,d,n,i);super(m,qe(d),ze)}setOpen=(t,n)=>{n.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!t&&n.trigger==null&&this.state.activeTriggerId!=null&&(n.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(t,n),!n.isCanceled&&(this.state.floatingRootContext.dispatchOpenChange(t,n),this.update(Se(this.state,t,n.trigger)))}};function Ge(){let e=new Q;return new we(Object.freeze(Ye(void 0,e)),Object.freeze(qe(e)),ze)}function Ye(e,t,n,i=!1){return{...be(t,n,i),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...e}}function qe(e){return{popupRef:G.createRef(),backdropRef:G.createRef(),internalBackdropRef:G.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:e,onOpenChange:void 0,onOpenChangeComplete:void 0}}var X=class extends me{constructor(){super(Ge(),"Dialog",!1)}open(t){this.openByTrigger(t)}openWithPayload(t){let n=this.attachedStore;if(n===null){console.warn("Base UI: DialogHandle.openWithPayload() was called while no root using this handle is mounted. The call and its payload were ignored; mount a root with this handle before opening it imperatively.");return}n.set("payload",t),n.setOpen(!0,w(T.imperativeAction))}close(){this.closePopup()}get isOpen(){return this.attachedStore?.select("open")??!1}};function Eo(){return new X}var Qe=D(C(),1);var Z=D(C(),1);function Je({store:e,parentContext:t,isDrawer:n}){let i=e.useState("open"),d=e.useState("mounted"),m=e.useState("disablePointerDismissal"),r=e.useState("modal"),l=e.useState("popupElement"),a=e.useState("floatingRootContext"),[o,f]=Z.useState(0),[g,R]=Z.useState(0),E=o===0,p=de(a,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?"intentional":{mouse:r==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(s){if(!e.context.outsidePressEnabledRef.current||"button"in s&&s.button!==0)return!1;if("touches"in s){if(s.type==="touchend"){if(s.changedTouches.length!==1||s.touches.length!==0)return!1}else if(s.touches.length!==1)return!1}let S=re(s);if(E&&!m){if(r){let x=e.context.internalBackdropRef.current,P=e.context.backdropRef.current;return x||P?x===S||P===S||ne(S,l)&&!S?.hasAttribute("data-base-ui-portal"):!0}return!0}return!1},escapeKey:E});return oe(i&&r===!0,l),e.useContextCallback("onNestedDialogOpen",(s,S)=>{!e.select("open")&&!e.select("mounted")||(f(s),R(S))}),J(()=>{!i&&!d&&(f(0),R(0))},[i,d]),J(()=>(t?.onNestedDialogOpen&&i&&t.onNestedDialogOpen(o+1,g+(n?1:0)),()=>{t?.onNestedDialogOpen&&i&&t.onNestedDialogOpen(0,0)}),[n,i,o,g,t]),Pe(e,{activeTriggerProps:p.reference,inactiveTriggerProps:p.trigger,popupProps:p.floating,nestedOpenDialogCount:o,nestedOpenDrawerCount:g}),null}var A=D(q(),1);function ko(e,t){let{children:n,open:i,defaultOpen:d=!1,onOpenChange:m,onOpenChangeComplete:r,disablePointerDismissal:l=!1,modal:a=!0,actionsRef:o,handle:f,triggerId:g,defaultTriggerId:R=null}=t,E=e==="drawer",p=e==="alert-dialog",s=p?!0:a,S=p||l,x=p?"alertdialog":"dialog",P=c(!0),N=P!=null,b={modal:s,disablePointerDismissal:S,nested:N,role:x},u=De((F,B)=>new Y({open:d,openProp:i,activeTriggerId:R,triggerIdProp:g,...b},F,B),!0);u.useControlledProp("openProp",i),u.useControlledProp("triggerIdProp",g),u.useSyncedValues(b),u.useContextCallback("onOpenChange",m),u.useContextCallback("onOpenChangeComplete",r);let O=u.useState("open"),v=u.useState("mounted"),M=u.useState("payload");xe(u,O),Ce(u);let{forceUnmount:y}=Ee(O,u);Qe.useImperativeHandle(o,()=>({unmount:y,close:()=>u.setOpen(!1,w(T.imperativeAction))}),[y,u]);let _=O||v||f!=null;return(0,A.jsxs)(H.Provider,{value:u,children:[f&&(0,A.jsx)(Re,{handle:f,store:u}),_&&(0,A.jsx)(Je,{store:u,parentContext:P?.context,isDrawer:E}),typeof n=="function"?n({payload:M}):n]})}export{ko as a,Xe as b,Ze as c,$e as d,ot as e,nt as f,rt as g,st as h,it as i,X as j,Eo as k};
2
+ //# sourceMappingURL=chunk-UUJ5X322.js.map
@@ -0,0 +1,2 @@
1
+ import{a as Ie}from"./chunk-XGLVZEGD.js";import{a as pe}from"./chunk-33RMFA4P.js";import{b as ae}from"./chunk-WLBNJ4K3.js";import{a as J,b as Q,c as X,d as Z,e as $,f as ee,i as ge,k as me,l as te,m as ne}from"./chunk-H6TI5TWN.js";import{A as ue,B as he,D as L,F as O,z as _}from"./chunk-QFN6XL4O.js";import{e as q}from"./chunk-7OCTAHT6.js";import{a as de}from"./chunk-CLVPTZ4G.js";import{a as b}from"./chunk-SFI7YWVR.js";import{b as le}from"./chunk-NZ73KS2Y.js";import{a as Me}from"./chunk-CT4EH2K2.js";import{e as k,f as se,g as ce,l as fe}from"./chunk-JIAVZ3V7.js";import{a as ie}from"./chunk-IJQ26FTX.js";import{c as U}from"./chunk-KVMUXFPB.js";var Re=U(ie(),1);var I=U(ie(),1);var oe="data-composite-item-active";function xe(d){let{loopFocus:g=!0,orientation:o="both",grid:c,onLoop:f,direction:E,highlightedIndex:y,onHighlightedIndexChange:w,rootRef:D,enableHomeAndEndKeys:A=!1,stopEventPropagation:F,disabledIndices:l,modifierKeys:Y=k}=d,[v,N]=I.useState(0),z=c!=null,p=I.useRef(null),W=ce(p,D),r=I.useRef([]),C=I.useRef(!1),x=I.useRef(null),s=y??v,u=b((e,t=!1)=>{if(x.current=r.current[e]??null,(w??N)(e),t){let i=r.current[e];ne(p.current,i,E,o)}}),B=b(e=>{if(e.size===0)return;if(C.current){let a=r.current,h=a.indexOf(x.current);if(h===-1){let K=a[s];!K||O(a,s,l)?u(be(a,l)):x.current=K}else h!==s&&u(h);return}C.current=!0;let t=Array.from(e.keys()),i=t.find(a=>a?.hasAttribute(oe))??null,m=i?e.get(i)?.index??-1:-1;if(m!==-1)u(m);else if(O(t,s,l)){let a=L(t,{disabledIndices:l});_(t,a)||u(a)}ne(p.current,i,E,o)});le(()=>{if(l==null||y!=null||!C.current)return;let e=r.current;if(O(e,s,l)){let t=L(e,{disabledIndices:l});_(e,t)||u(t)}},[l,y,s,r,u]);let V=b((e,t,i)=>f?f(e,t,i,r):i),M=b(e=>{let t=e.key===$||e.key===ee;if(!ge.has(e.key)||!A&&t||ke(e,Y)||!p.current)return;let m=E==="rtl",a=m?X:Z,h=m?Z:X,K=o==="vertical"?Q:a,Ee=o==="vertical"?J:h,R=q(e.nativeEvent);if(R!=null&&te(R)&&!Ie(R)){let T=R.selectionStart,ye=R.selectionEnd,Ce=R.value;if(T==null||e.shiftKey||T!==ye||e.key!==Ee&&T<Ce.length||e.key!==K&&T>0)return}let n=s,H=ue(r,l),P=he(r,l);c!=null&&(n=c({disabledIndices:l,elementsRef:r,event:e,highlightedIndex:s,loopFocus:g,maxIndex:P,minIndex:H,onLoop:V,orientation:o,rtl:m}));let G=o!=="vertical"&&e.key===a||o!=="horizontal"&&e.key===Q,S=o!=="vertical"&&e.key===h||o!=="horizontal"&&e.key===J;A&&(e.key===$?n=H:e.key===ee&&(n=P)),n===s&&(G||S)&&(g&&n===P&&G?(n=H,f&&(n=f(e,s,n,r))):g&&n===H&&S?(n=P,f&&(n=f(e,s,n,r))):n=L(r.current,{startingIndex:n,decrement:S,disabledIndices:l})),n!==s&&!_(r.current,n)&&(F&&e.stopPropagation(),(z||t||G||S)&&e.preventDefault(),u(n,!0),queueMicrotask(()=>{r.current[n]?.focus()}))});return{props:{ref:W,onFocus(e){let t=p.current,i=q(e.nativeEvent);!t||i==null||!te(i)||i.setSelectionRange(0,i.value.length)},onKeyDown:M},highlightedIndex:s,onHighlightedIndexChange:u,elementsRef:r,onMapChange:B,relayKeyboardEvent:M}}function be(d,g){let o=-1;for(let c=0;c<d.length;c+=1){let f=d[c];if(!(!f||O(d,c,g))){if(f.hasAttribute(oe))return c;o===-1&&(o=c)}}return Math.max(o,0)}function ke(d,g){for(let o of me)if(!g.includes(o)&&d.getModifierState(o))return!0;return!1}var re=U(Me(),1);function We(d){let{render:g,className:o,style:c,refs:f=k,props:E=k,state:y=se,stateAttributesMapping:w,highlightedIndex:D,onHighlightedIndexChange:A,orientation:F,grid:l,loopFocus:Y,onLoop:v,enableHomeAndEndKeys:N,onMapChange:z,stopEventPropagation:p=!0,rootRef:W,disabledIndices:r,modifierKeys:C,highlightItemOnHover:x=!1,tag:s="div",...u}=d,B=pe(),{props:V,highlightedIndex:M,onHighlightedIndexChange:j,elementsRef:e,onMapChange:t,relayKeyboardEvent:i}=xe({grid:l,loopFocus:Y,onLoop:v,orientation:F,highlightedIndex:D,onHighlightedIndexChange:A,rootRef:W,stopEventPropagation:p,enableHomeAndEndKeys:N,direction:B,disabledIndices:r,modifierKeys:C}),m=fe(s,d,{state:y,ref:f,props:[V,...E,u],stateAttributesMapping:w}),a=Re.useMemo(()=>({highlightedIndex:M,onHighlightedIndexChange:j,highlightItemOnHover:x,relayKeyboardEvent:i}),[M,j,x,i]);return(0,re.jsx)(de.Provider,{value:a,children:(0,re.jsx)(ae,{elementsRef:e,onMapChange:h=>{z?.(h),t(h)},children:m})})}export{oe as a,We as b};
2
+ //# sourceMappingURL=chunk-UWANBOC6.js.map
@@ -0,0 +1,2 @@
1
+ import{a as r}from"./chunk-PHK25MY7.js";import{e,f as o,l as s}from"./chunk-JIAVZ3V7.js";function P(t){let{render:d,className:E,style:R,state:m=o,props:p=e,refs:i=e,metadata:a,stateAttributesMapping:n,tag:f="div",...c}=t,{compositeProps:u,compositeRef:l}=r({metadata:a});return s(f,t,{state:m,ref:[l,...i],props:[u,...p,c],stateAttributesMapping:n})}export{P as a};
2
+ //# sourceMappingURL=chunk-UXUS6DNI.js.map
@@ -0,0 +1,6 @@
1
+ import{b as We,c as Xe,d as zt,e as X,f as ot,g as Re,h as Bt,i as ae,j as te,k as je,l as Ft,m as ye,n as me,o as Se,p as Ee,q as Ae,r as le,s as Oe,u as Ke,w as Ne,x as Ye,y as $t}from"./chunk-URWVHIIJ.js";import{a as En}from"./chunk-UH726PMV.js";import{a as Pt}from"./chunk-IJQ26FTX.js";import{c as rt}from"./chunk-KVMUXFPB.js";var a=rt(Pt()),ue=rt(En());var ce=rt(Pt()),An={display:"none"};function Wt(e){let{id:t,value:n}=e;return ce.default.createElement("div",{id:t,style:An},n)}function Xt(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e,i={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return ce.default.createElement("div",{id:t,style:i,role:"status","aria-live":r,"aria-atomic":!0},n)}function jt(){let[e,t]=(0,ce.useState)("");return{announce:(0,ce.useCallback)(r=>{r!=null&&t(r)},[]),announcement:e}}var tn=(0,a.createContext)(null);function On(e){let t=(0,a.useContext)(tn);(0,a.useEffect)(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function Nn(){let[e]=(0,a.useState)(()=>new Set),t=(0,a.useCallback)(r=>(e.add(r),()=>e.delete(r)),[e]);return[(0,a.useCallback)(r=>{let{type:i,event:o}=r;e.forEach(l=>{var s;return(s=l[i])==null?void 0:s.call(l,o)})},[e]),t]}var Mn={draggable:`
2
+ To pick up a draggable item, press the space bar.
3
+ While dragging, use the arrow keys to move the item.
4
+ Press space again to drop the item in its new position, or press escape to cancel.
5
+ `},Tn={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Ln(e){let{announcements:t=Tn,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=Mn}=e,{announce:o,announcement:l}=jt(),s=Ae("DndLiveRegion"),[c,u]=(0,a.useState)(!1);if((0,a.useEffect)(()=>{u(!0)},[]),On((0,a.useMemo)(()=>({onDragStart(d){let{active:g}=d;o(t.onDragStart({active:g}))},onDragMove(d){let{active:g,over:h}=d;t.onDragMove&&o(t.onDragMove({active:g,over:h}))},onDragOver(d){let{active:g,over:h}=d;o(t.onDragOver({active:g,over:h}))},onDragEnd(d){let{active:g,over:h}=d;o(t.onDragEnd({active:g,over:h}))},onDragCancel(d){let{active:g,over:h}=d;o(t.onDragCancel({active:g,over:h}))}}),[o,t])),!c)return null;let f=a.default.createElement(a.default.Fragment,null,a.default.createElement(Wt,{id:r,value:i.draggable}),a.default.createElement(Xt,{id:s,announcement:l}));return n?(0,ue.createPortal)(f,n):f}var O;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(O||(O={}));function He(){}function Jr(e,t){return(0,a.useMemo)(()=>({sensor:e,options:t??{}}),[e,t])}function _r(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,a.useMemo)(()=>[...t].filter(r=>r!=null),[...t])}var j=Object.freeze({x:0,y:0});function gt(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function kn(e,t){let n=Ne(e);if(!n)return"0 0";let r={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return r.x+"% "+r.y+"%"}function vt(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function In(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function lt(e){let{left:t,top:n,height:r,width:i}=e;return[{x:t,y:n},{x:t+i,y:n},{x:t,y:n+r},{x:t+i,y:n+r}]}function Pn(e,t){if(!e||e.length===0)return null;let[n]=e;return t?n[t]:n}function Kt(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}var Vr=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=Kt(t,t.left,t.top),o=[];for(let l of r){let{id:s}=l,c=n.get(s);if(c){let u=gt(Kt(c),i);o.push({id:s,data:{droppableContainer:l,value:u}})}}return o.sort(vt)},Gr=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=lt(t),o=[];for(let l of r){let{id:s}=l,c=n.get(s);if(c){let u=lt(c),f=i.reduce((g,h,D)=>g+gt(u[D],h),0),d=Number((f/4).toFixed(4));o.push({id:s,data:{droppableContainer:l,value:d}})}}return o.sort(vt)};function zn(e,t){let n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height),l=i-r,s=o-n;if(r<i&&n<o){let c=t.width*t.height,u=e.width*e.height,f=l*s,d=f/(c+u-f);return Number(d.toFixed(4))}return 0}var Bn=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=[];for(let o of r){let{id:l}=o,s=n.get(l);if(s){let c=zn(s,t);c>0&&i.push({id:l,data:{droppableContainer:o,value:c}})}}return i.sort(In)};function Fn(e,t){let{top:n,left:r,bottom:i,right:o}=t;return n<=e.y&&e.y<=i&&r<=e.x&&e.x<=o}var Qr=e=>{let{droppableContainers:t,droppableRects:n,pointerCoordinates:r}=e;if(!r)return[];let i=[];for(let o of t){let{id:l}=o,s=n.get(l);if(s&&Fn(r,s)){let u=lt(s).reduce((d,g)=>d+gt(r,g),0),f=Number((u/4).toFixed(4));i.push({id:l,data:{droppableContainer:o,value:f}})}}return i.sort(vt)};function $n(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function nn(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:j}function Wn(e){return function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return i.reduce((l,s)=>({...l,top:l.top+e*s.y,bottom:l.bottom+e*s.y,left:l.left+e*s.x,right:l.right+e*s.x}),{...n})}}var Xn=Wn(1);function rn(e){if(e.startsWith("matrix3d(")){let t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){let t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function jn(e,t,n){let r=rn(t);if(!r)return e;let{scaleX:i,scaleY:o,x:l,y:s}=r,c=e.left-l-(1-i)*parseFloat(n),u=e.top-s-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),f=i?e.width/i:e.width,d=o?e.height/o:e.height;return{width:f,height:d,top:u,right:c+f,bottom:u+d,left:c}}var Kn={ignoreTransform:!1};function Ie(e,t){t===void 0&&(t=Kn);let n=e.getBoundingClientRect();if(t.ignoreTransform){let{transform:u,transformOrigin:f}=X(e).getComputedStyle(e);u&&(n=jn(n,u,f))}let{top:r,left:i,width:o,height:l,bottom:s,right:c}=n;return{top:r,left:i,width:o,height:l,bottom:s,right:c}}function Yt(e){return Ie(e,{ignoreTransform:!0})}function Yn(e){let t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function Un(e,t){return t===void 0&&(t=X(e).getComputedStyle(e)),t.position==="fixed"}function Hn(e,t){t===void 0&&(t=X(e).getComputedStyle(e));let n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(i=>{let o=t[i];return typeof o=="string"?n.test(o):!1})}function pt(e,t){let n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(ot(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!Re(i)||Bt(i)||n.includes(i))return n;let o=X(e).getComputedStyle(i);return i!==e&&Hn(i,o)&&n.push(i),Un(i,o)?n:r(i.parentNode)}return e?r(e):n}function on(e){let[t]=pt(e,1);return t??null}function it(e){return!We||!e?null:Xe(e)?e:zt(e)?ot(e)||e===ae(e).scrollingElement?window:Re(e)?e:null:null}function sn(e){return Xe(e)?e.scrollX:e.scrollLeft}function an(e){return Xe(e)?e.scrollY:e.scrollTop}function ct(e){return{x:sn(e),y:an(e)}}var M;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(M||(M={}));function ln(e){return!We||!e?!1:e===document.scrollingElement}function cn(e){let t={x:0,y:0},n=ln(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},i=e.scrollTop<=t.y,o=e.scrollLeft<=t.x,l=e.scrollTop>=r.y,s=e.scrollLeft>=r.x;return{isTop:i,isLeft:o,isBottom:l,isRight:s,maxScroll:r,minScroll:t}}var qn={x:.2,y:.2};function Jn(e,t,n,r,i){let{top:o,left:l,right:s,bottom:c}=n;r===void 0&&(r=10),i===void 0&&(i=qn);let{isTop:u,isBottom:f,isLeft:d,isRight:g}=cn(e),h={x:0,y:0},D={x:0,y:0},v={height:t.height*i.y,width:t.width*i.x};return!u&&o<=t.top+v.height?(h.y=M.Backward,D.y=r*Math.abs((t.top+v.height-o)/v.height)):!f&&c>=t.bottom-v.height&&(h.y=M.Forward,D.y=r*Math.abs((t.bottom-v.height-c)/v.height)),!g&&s>=t.right-v.width?(h.x=M.Forward,D.x=r*Math.abs((t.right-v.width-s)/v.width)):!d&&l<=t.left+v.width&&(h.x=M.Backward,D.x=r*Math.abs((t.left+v.width-l)/v.width)),{direction:h,speed:D}}function _n(e){if(e===document.scrollingElement){let{innerWidth:o,innerHeight:l}=window;return{top:0,left:0,right:o,bottom:l,width:o,height:l}}let{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function un(e){return e.reduce((t,n)=>le(t,ct(n)),j)}function Vn(e){return e.reduce((t,n)=>t+sn(n),0)}function Gn(e){return e.reduce((t,n)=>t+an(n),0)}function dn(e,t){if(t===void 0&&(t=Ie),!e)return;let{top:n,left:r,bottom:i,right:o}=t(e);on(e)&&(i<=0||o<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}var Qn=[["x",["left","right"],Vn],["y",["top","bottom"],Gn]],Te=class{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;let r=pt(n),i=un(r);this.rect={...t},this.width=t.width,this.height=t.height;for(let[o,l,s]of Qn)for(let c of l)Object.defineProperty(this,c,{get:()=>{let u=s(r),f=i[o]-u;return this.rect[c]+f},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}},de=class{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var i;(i=this.target)==null||i.addEventListener(t,n,r),this.listeners.push([t,n,r])}};function Zn(e){let{EventTarget:t}=X(e);return e instanceof t?e:ae(e)}function st(e,t){let n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var F;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(F||(F={}));function Ut(e){e.preventDefault()}function er(e){e.stopPropagation()}var C;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(C||(C={}));var fn={start:[C.Space,C.Enter],cancel:[C.Esc],end:[C.Space,C.Enter,C.Tab]},tr=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case C.Right:return{...n,x:n.x+25};case C.Left:return{...n,x:n.x-25};case C.Down:return{...n,y:n.y+25};case C.Up:return{...n,y:n.y-25}}},qe=class{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;let{event:{target:n}}=t;this.props=t,this.listeners=new de(ae(n)),this.windowListeners=new de(X(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(F.Resize,this.handleCancel),this.windowListeners.add(F.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(F.Keydown,this.handleKeyDown))}handleStart(){let{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&dn(r),n(j)}handleKeyDown(t){if(Ke(t)){let{active:n,context:r,options:i}=this.props,{keyboardCodes:o=fn,coordinateGetter:l=tr,scrollBehavior:s="smooth"}=i,{code:c}=t;if(o.end.includes(c)){this.handleEnd(t);return}if(o.cancel.includes(c)){this.handleCancel(t);return}let{collisionRect:u}=r.current,f=u?{x:u.left,y:u.top}:j;this.referenceCoordinates||(this.referenceCoordinates=f);let d=l(t,{active:n,context:r.current,currentCoordinates:f});if(d){let g=Oe(d,f),h={x:0,y:0},{scrollableAncestors:D}=r.current;for(let v of D){let p=t.code,{isTop:m,isRight:x,isLeft:w,isBottom:N,maxScroll:R,minScroll:S}=cn(v),b=_n(v),y={x:Math.min(p===C.Right?b.right-b.width/2:b.right,Math.max(p===C.Right?b.left:b.left+b.width/2,d.x)),y:Math.min(p===C.Down?b.bottom-b.height/2:b.bottom,Math.max(p===C.Down?b.top:b.top+b.height/2,d.y))},E=p===C.Right&&!x||p===C.Left&&!w,T=p===C.Down&&!N||p===C.Up&&!m;if(E&&y.x!==d.x){let A=v.scrollLeft+g.x,U=p===C.Right&&A<=R.x||p===C.Left&&A>=S.x;if(U&&!g.y){v.scrollTo({left:A,behavior:s});return}U?h.x=v.scrollLeft-A:h.x=p===C.Right?v.scrollLeft-R.x:v.scrollLeft-S.x,h.x&&v.scrollBy({left:-h.x,behavior:s});break}else if(T&&y.y!==d.y){let A=v.scrollTop+g.y,U=p===C.Down&&A<=R.y||p===C.Up&&A>=S.y;if(U&&!g.x){v.scrollTo({top:A,behavior:s});return}U?h.y=v.scrollTop-A:h.y=p===C.Down?v.scrollTop-R.y:v.scrollTop-S.y,h.y&&v.scrollBy({top:-h.y,behavior:s});break}}this.handleMove(t,le(Oe(d,this.referenceCoordinates),h))}}}handleMove(t,n){let{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){let{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){let{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}};qe.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=fn,onActivation:i}=t,{active:o}=n,{code:l}=e.nativeEvent;if(r.start.includes(l)){let s=o.activatorNode.current;return s&&e.target!==s?!1:(e.preventDefault(),i?.({event:e.nativeEvent}),!0)}return!1}}];function Ht(e){return!!(e&&"distance"in e)}function qt(e){return!!(e&&"delay"in e)}var Le=class{constructor(t,n,r){var i;r===void 0&&(r=Zn(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;let{event:o}=t,{target:l}=o;this.props=t,this.events=n,this.document=ae(l),this.documentListeners=new de(this.document),this.listeners=new de(r),this.windowListeners=new de(X(l)),this.initialCoordinates=(i=Ne(o))!=null?i:j,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){let{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(F.Resize,this.handleCancel),this.windowListeners.add(F.DragStart,Ut),this.windowListeners.add(F.VisibilityChange,this.handleCancel),this.windowListeners.add(F.ContextMenu,Ut),this.documentListeners.add(F.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(qt(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(Ht(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,n){let{active:r,onPending:i}=this.props;i(r,t,this.initialCoordinates,n)}handleStart(){let{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(F.Click,er,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(F.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;let{activated:r,initialCoordinates:i,props:o}=this,{onMove:l,options:{activationConstraint:s}}=o;if(!i)return;let c=(n=Ne(t))!=null?n:j,u=Oe(i,c);if(!r&&s){if(Ht(s)){if(s.tolerance!=null&&st(u,s.tolerance))return this.handleCancel();if(st(u,s.distance))return this.handleStart()}if(qt(s)&&st(u,s.tolerance))return this.handleCancel();this.handlePending(s,u);return}t.cancelable&&t.preventDefault(),l(c)}handleEnd(){let{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleCancel(){let{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleKeydown(t){t.code===C.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}},nr={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}},Je=class extends Le{constructor(t){let{event:n}=t,r=ae(n.target);super(t,nr,r)}};Je.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];var rr={move:{name:"mousemove"},end:{name:"mouseup"}},ut;(function(e){e[e.RightClick=2]="RightClick"})(ut||(ut={}));var dt=class extends Le{constructor(t){super(t,rr,ae(t.event.target))}};dt.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===ut.RightClick?!1:(r?.({event:n}),!0)}}];var at={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}},ft=class extends Le{constructor(t){super(t,at)}static setup(){return window.addEventListener(at.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(at.move.name,t)};function t(){}}};ft.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t,{touches:i}=n;return i.length>1?!1:(r?.({event:n}),!0)}}];var Me;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Me||(Me={}));var _e;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(_e||(_e={}));function or(e){let{acceleration:t,activator:n=Me.Pointer,canScroll:r,draggingRect:i,enabled:o,interval:l=5,order:s=_e.TreeOrder,pointerCoordinates:c,scrollableAncestors:u,scrollableAncestorRects:f,delta:d,threshold:g}=e,h=sr({delta:d,disabled:!o}),[D,v]=Ft(),p=(0,a.useRef)({x:0,y:0}),m=(0,a.useRef)({x:0,y:0}),x=(0,a.useMemo)(()=>{switch(n){case Me.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case Me.DraggableRect:return i}},[n,i,c]),w=(0,a.useRef)(null),N=(0,a.useCallback)(()=>{let S=w.current;if(!S)return;let b=p.current.x*m.current.x,y=p.current.y*m.current.y;S.scrollBy(b,y)},[]),R=(0,a.useMemo)(()=>s===_e.TreeOrder?[...u].reverse():u,[s,u]);(0,a.useEffect)(()=>{if(!o||!u.length||!x){v();return}for(let S of R){if(r?.(S)===!1)continue;let b=u.indexOf(S),y=f[b];if(!y)continue;let{direction:E,speed:T}=Jn(S,y,x,t,g);for(let A of["x","y"])h[A][E[A]]||(T[A]=0,E[A]=0);if(T.x>0||T.y>0){v(),w.current=S,D(N,l),p.current=T,m.current=E;return}}p.current={x:0,y:0},m.current={x:0,y:0},v()},[t,N,r,v,o,l,JSON.stringify(x),JSON.stringify(h),D,u,R,f,JSON.stringify(g)])}var ir={x:{[M.Backward]:!1,[M.Forward]:!1},y:{[M.Backward]:!1,[M.Forward]:!1}};function sr(e){let{delta:t,disabled:n}=e,r=Ee(t);return me(i=>{if(n||!r||!i)return ir;let o={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[M.Backward]:i.x[M.Backward]||o.x===-1,[M.Forward]:i.x[M.Forward]||o.x===1},y:{[M.Backward]:i.y[M.Backward]||o.y===-1,[M.Forward]:i.y[M.Forward]||o.y===1}}},[n,t,r])}function ar(e,t){let n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return me(i=>{var o;return t==null?null:(o=r??i)!=null?o:null},[r,t])}function lr(e,t){return(0,a.useMemo)(()=>e.reduce((n,r)=>{let{sensor:i}=r,o=i.activators.map(l=>({eventName:l.eventName,handler:t(l.handler,r)}));return[...n,...o]},[]),[e,t])}var ke;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(ke||(ke={}));var ht;(function(e){e.Optimized="optimized"})(ht||(ht={}));var Jt=new Map;function cr(e,t){let{dragging:n,dependencies:r,config:i}=t,[o,l]=(0,a.useState)(null),{frequency:s,measure:c,strategy:u}=i,f=(0,a.useRef)(e),d=p(),g=ye(d),h=(0,a.useCallback)(function(m){m===void 0&&(m=[]),!g.current&&l(x=>x===null?m:x.concat(m.filter(w=>!x.includes(w))))},[g]),D=(0,a.useRef)(null),v=me(m=>{if(d&&!n)return Jt;if(!m||m===Jt||f.current!==e||o!=null){let x=new Map;for(let w of e){if(!w)continue;if(o&&o.length>0&&!o.includes(w.id)&&w.rect.current){x.set(w.id,w.rect.current);continue}let N=w.node.current,R=N?new Te(c(N),N):null;w.rect.current=R,R&&x.set(w.id,R)}return x}return m},[e,o,n,d,c]);return(0,a.useEffect)(()=>{f.current=e},[e]),(0,a.useEffect)(()=>{d||h()},[n,d]),(0,a.useEffect)(()=>{o&&o.length>0&&l(null)},[JSON.stringify(o)]),(0,a.useEffect)(()=>{d||typeof s!="number"||D.current!==null||(D.current=setTimeout(()=>{h(),D.current=null},s))},[s,d,h,...r]),{droppableRects:v,measureDroppableContainers:h,measuringScheduled:o!=null};function p(){switch(u){case ke.Always:return!1;case ke.BeforeDragging:return n;default:return!n}}}function bt(e,t){return me(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function ur(e,t){return bt(e,t)}function dr(e){let{callback:t,disabled:n}=e,r=je(t),i=(0,a.useMemo)(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;let{MutationObserver:o}=window;return new o(r)},[r,n]);return(0,a.useEffect)(()=>()=>i?.disconnect(),[i]),i}function Ve(e){let{callback:t,disabled:n}=e,r=je(t),i=(0,a.useMemo)(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;let{ResizeObserver:o}=window;return new o(r)},[n]);return(0,a.useEffect)(()=>()=>i?.disconnect(),[i]),i}function fr(e){return new Te(Ie(e),e)}function _t(e,t,n){t===void 0&&(t=fr);let[r,i]=(0,a.useState)(null);function o(){i(c=>{if(!e)return null;if(e.isConnected===!1){var u;return(u=c??n)!=null?u:null}let f=t(e);return JSON.stringify(c)===JSON.stringify(f)?c:f})}let l=dr({callback(c){if(e)for(let u of c){let{type:f,target:d}=u;if(f==="childList"&&d instanceof HTMLElement&&d.contains(e)){o();break}}}}),s=Ve({callback:o});return te(()=>{o(),e?(s?.observe(e),l?.observe(document.body,{childList:!0,subtree:!0})):(s?.disconnect(),l?.disconnect())},[e]),r}function hr(e){let t=bt(e);return nn(e,t)}var Vt=[];function gr(e){let t=(0,a.useRef)(e),n=me(r=>e?r&&r!==Vt&&e&&t.current&&e.parentNode===t.current.parentNode?r:pt(e):Vt,[e]);return(0,a.useEffect)(()=>{t.current=e},[e]),n}function vr(e){let[t,n]=(0,a.useState)(null),r=(0,a.useRef)(e),i=(0,a.useCallback)(o=>{let l=it(o.target);l&&n(s=>s?(s.set(l,ct(l)),new Map(s)):null)},[]);return(0,a.useEffect)(()=>{let o=r.current;if(e!==o){l(o);let s=e.map(c=>{let u=it(c);return u?(u.addEventListener("scroll",i,{passive:!0}),[u,ct(u)]):null}).filter(c=>c!=null);n(s.length?new Map(s):null),r.current=e}return()=>{l(e),l(o)};function l(s){s.forEach(c=>{let u=it(c);u?.removeEventListener("scroll",i)})}},[i,e]),(0,a.useMemo)(()=>e.length?t?Array.from(t.values()).reduce((o,l)=>le(o,l),j):un(e):j,[e,t])}function Gt(e,t){t===void 0&&(t=[]);let n=(0,a.useRef)(null);return(0,a.useEffect)(()=>{n.current=null},t),(0,a.useEffect)(()=>{let r=e!==j;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?Oe(e,n.current):j}function pr(e){(0,a.useEffect)(()=>{if(!We)return;let t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(let n of t)n?.()}},e.map(t=>{let{sensor:n}=t;return n}))}function br(e,t){return(0,a.useMemo)(()=>e.reduce((n,r)=>{let{eventName:i,handler:o}=r;return n[i]=l=>{o(l,t)},n},{}),[e,t])}function hn(e){return(0,a.useMemo)(()=>e?Yn(e):null,[e])}var Qt=[];function yr(e,t){t===void 0&&(t=Ie);let[n]=e,r=hn(n?X(n):null),[i,o]=(0,a.useState)(Qt);function l(){o(()=>e.length?e.map(c=>ln(c)?r:new Te(t(c),c)):Qt)}let s=Ve({callback:l});return te(()=>{s?.disconnect(),l(),e.forEach(c=>s?.observe(c))},[e]),i}function gn(e){if(!e)return null;if(e.children.length>1)return e;let t=e.children[0];return Re(t)?t:e}function mr(e){let{measure:t}=e,[n,r]=(0,a.useState)(null),i=(0,a.useCallback)(u=>{for(let{target:f}of u)if(Re(f)){r(d=>{let g=t(f);return d?{...d,width:g.width,height:g.height}:g});break}},[t]),o=Ve({callback:i}),l=(0,a.useCallback)(u=>{let f=gn(u);o?.disconnect(),f&&o?.observe(f),r(f?t(f):null)},[t,o]),[s,c]=Se(l);return(0,a.useMemo)(()=>({nodeRef:s,rect:n,setRef:c}),[n,s,c])}var wr=[{sensor:Je,options:{}},{sensor:qe,options:{}}],xr={current:{}},Ue={draggable:{measure:Yt},droppable:{measure:Yt,strategy:ke.WhileDragging,frequency:ht.Optimized},dragOverlay:{measure:Ie}},fe=class extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}},Dr={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new fe,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:He},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Ue,measureDroppableContainers:He,windowRect:null,measuringScheduled:!1},vn={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:He,draggableNodes:new Map,over:null,measureDroppableContainers:He},Pe=(0,a.createContext)(vn),pn=(0,a.createContext)(Dr);function Cr(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new fe}}}function Rr(e,t){switch(t.type){case O.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case O.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case O.DragEnd:case O.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case O.RegisterDroppable:{let{element:n}=t,{id:r}=n,i=new fe(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case O.SetDroppableDisabled:{let{id:n,key:r,disabled:i}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;let l=new fe(e.droppable.containers);return l.set(n,{...o,disabled:i}),{...e,droppable:{...e.droppable,containers:l}}}case O.UnregisterDroppable:{let{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;let o=new fe(e.droppable.containers);return o.delete(n),{...e,droppable:{...e.droppable,containers:o}}}default:return e}}function Sr(e){let{disabled:t}=e,{active:n,activatorEvent:r,draggableNodes:i}=(0,a.useContext)(Pe),o=Ee(r),l=Ee(n?.id);return(0,a.useEffect)(()=>{if(!t&&!r&&o&&l!=null){if(!Ke(o)||document.activeElement===o.target)return;let s=i.get(l);if(!s)return;let{activatorNode:c,node:u}=s;if(!c.current&&!u.current)return;requestAnimationFrame(()=>{for(let f of[c.current,u.current]){if(!f)continue;let d=$t(f);if(d){d.focus();break}}})}},[r,t,i,l,o]),null}function bn(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((i,o)=>o({transform:i,...r}),n):n}function Er(e){return(0,a.useMemo)(()=>({draggable:{...Ue.draggable,...e?.draggable},droppable:{...Ue.droppable,...e?.droppable},dragOverlay:{...Ue.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function Ar(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e,o=(0,a.useRef)(!1),{x:l,y:s}=typeof i=="boolean"?{x:i,y:i}:i;te(()=>{if(!l&&!s||!t){o.current=!1;return}if(o.current||!r)return;let u=t?.node.current;if(!u||u.isConnected===!1)return;let f=n(u),d=nn(f,r);if(l||(d.x=0),s||(d.y=0),o.current=!0,Math.abs(d.x)>0||Math.abs(d.y)>0){let g=on(u);g&&g.scrollBy({top:d.y,left:d.x})}},[t,l,s,r,n])}var Ge=(0,a.createContext)({...j,scaleX:1,scaleY:1}),ne;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(ne||(ne={}));var Zr=(0,a.memo)(function(t){var n,r,i,o;let{id:l,accessibility:s,autoScroll:c=!0,children:u,sensors:f=wr,collisionDetection:d=Bn,measuring:g,modifiers:h,...D}=t,v=(0,a.useReducer)(Rr,void 0,Cr),[p,m]=v,[x,w]=Nn(),[N,R]=(0,a.useState)(ne.Uninitialized),S=N===ne.Initialized,{draggable:{active:b,nodes:y,translate:E},droppable:{containers:T}}=p,A=b!=null?y.get(b):null,U=(0,a.useRef)({initial:null,translated:null}),H=(0,a.useMemo)(()=>{var k;return b!=null?{id:b,data:(k=A?.data)!=null?k:xr,rect:U}:null},[b,A]),_=(0,a.useRef)(null),[yt,mt]=(0,a.useState)(null),[q,wt]=(0,a.useState)(null),re=ye(D,Object.values(D)),Qe=Ae("DndDescribedBy",l),xt=(0,a.useMemo)(()=>T.getEnabled(),[T]),oe=Er(g),{droppableRects:he,measureDroppableContainers:ze,measuringScheduled:Dt}=cr(xt,{dragging:S,dependencies:[E.x,E.y],config:oe.droppable}),$=ar(y,b),Ct=(0,a.useMemo)(()=>q?Ne(q):null,[q]),Rt=Sn(),St=ur($,oe.draggable.measure);Ar({activeNode:b!=null?y.get(b):null,config:Rt.layoutShiftCompensation,initialRect:St,measure:oe.draggable.measure});let W=_t($,oe.draggable.measure,St),Ze=_t($?$.parentElement:null),ie=(0,a.useRef)({activatorEvent:null,active:null,activeNode:$,collisionRect:null,collisions:null,droppableRects:he,draggableNodes:y,draggingNode:null,draggingNodeRect:null,droppableContainers:T,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Et=T.getNodeFor((n=ie.current.over)==null?void 0:n.id),se=mr({measure:oe.dragOverlay.measure}),Be=(r=se.nodeRef.current)!=null?r:$,ge=S?(i=se.rect)!=null?i:W:null,At=!!(se.nodeRef.current&&se.rect),Ot=hr(At?null:W),et=hn(Be?X(Be):null),V=gr(S?Et??$:null),Fe=yr(V),$e=bn(h,{transform:{x:E.x-Ot.x,y:E.y-Ot.y,scaleX:1,scaleY:1},activatorEvent:q,active:H,activeNodeRect:W,containerNodeRect:Ze,draggingNodeRect:ge,over:ie.current.over,overlayNodeRect:se.rect,scrollableAncestors:V,scrollableAncestorRects:Fe,windowRect:et}),Nt=Ct?le(Ct,E):null,Mt=vr(V),yn=Gt(Mt),mn=Gt(Mt,[W]),ve=le($e,yn),pe=ge?Xn(ge,$e):null,we=H&&pe?d({active:H,collisionRect:pe,droppableRects:he,droppableContainers:xt,pointerCoordinates:Nt}):null,Tt=Pn(we,"id"),[G,Lt]=(0,a.useState)(null),wn=At?$e:le($e,mn),xn=$n(wn,(o=G?.rect)!=null?o:null,W),tt=(0,a.useRef)(null),kt=(0,a.useCallback)((k,I)=>{let{sensor:P,options:Q}=I;if(_.current==null)return;let B=y.get(_.current);if(!B)return;let z=k.nativeEvent,K=new P({active:_.current,activeNode:B,event:z,options:Q,context:ie,onAbort(L){if(!y.get(L))return;let{onDragAbort:Y}=re.current,J={id:L};Y?.(J),x({type:"onDragAbort",event:J})},onPending(L,Z,Y,J){if(!y.get(L))return;let{onDragPending:De}=re.current,ee={id:L,constraint:Z,initialCoordinates:Y,offset:J};De?.(ee),x({type:"onDragPending",event:ee})},onStart(L){let Z=_.current;if(Z==null)return;let Y=y.get(Z);if(!Y)return;let{onDragStart:J}=re.current,xe={activatorEvent:z,active:{id:Z,data:Y.data,rect:U}};(0,ue.unstable_batchedUpdates)(()=>{J?.(xe),R(ne.Initializing),m({type:O.DragStart,initialCoordinates:L,active:Z}),x({type:"onDragStart",event:xe}),mt(tt.current),wt(z)})},onMove(L){m({type:O.DragMove,coordinates:L})},onEnd:be(O.DragEnd),onCancel:be(O.DragCancel)});tt.current=K;function be(L){return async function(){let{active:Y,collisions:J,over:xe,scrollAdjustedTranslate:De}=ie.current,ee=null;if(Y&&De){let{cancelDrop:Ce}=re.current;ee={activatorEvent:z,active:Y,collisions:J,delta:De,over:xe},L===O.DragEnd&&typeof Ce=="function"&&await Promise.resolve(Ce(ee))&&(L=O.DragCancel)}_.current=null,(0,ue.unstable_batchedUpdates)(()=>{m({type:L}),R(ne.Uninitialized),Lt(null),mt(null),wt(null),tt.current=null;let Ce=L===O.DragEnd?"onDragEnd":"onDragCancel";if(ee){let nt=re.current[Ce];nt?.(ee),x({type:Ce,event:ee})}})}}},[y]),Dn=(0,a.useCallback)((k,I)=>(P,Q)=>{let B=P.nativeEvent,z=y.get(Q);if(_.current!==null||!z||B.dndKit||B.defaultPrevented)return;let K={active:z};k(P,I.options,K)===!0&&(B.dndKit={capturedBy:I.sensor},_.current=Q,kt(P,I))},[y,kt]),It=lr(f,Dn);pr(f),te(()=>{W&&N===ne.Initializing&&R(ne.Initialized)},[W,N]),(0,a.useEffect)(()=>{let{onDragMove:k}=re.current,{active:I,activatorEvent:P,collisions:Q,over:B}=ie.current;if(!I||!P)return;let z={active:I,activatorEvent:P,collisions:Q,delta:{x:ve.x,y:ve.y},over:B};(0,ue.unstable_batchedUpdates)(()=>{k?.(z),x({type:"onDragMove",event:z})})},[ve.x,ve.y]),(0,a.useEffect)(()=>{let{active:k,activatorEvent:I,collisions:P,droppableContainers:Q,scrollAdjustedTranslate:B}=ie.current;if(!k||_.current==null||!I||!B)return;let{onDragOver:z}=re.current,K=Q.get(Tt),be=K&&K.rect.current?{id:K.id,rect:K.rect.current,data:K.data,disabled:K.disabled}:null,L={active:k,activatorEvent:I,collisions:P,delta:{x:B.x,y:B.y},over:be};(0,ue.unstable_batchedUpdates)(()=>{Lt(be),z?.(L),x({type:"onDragOver",event:L})})},[Tt]),te(()=>{ie.current={activatorEvent:q,active:H,activeNode:$,collisionRect:pe,collisions:we,droppableRects:he,draggableNodes:y,draggingNode:Be,draggingNodeRect:ge,droppableContainers:T,over:G,scrollableAncestors:V,scrollAdjustedTranslate:ve},U.current={initial:ge,translated:pe}},[H,$,we,pe,y,Be,ge,he,T,G,V,ve]),or({...Rt,delta:E,draggingRect:pe,pointerCoordinates:Nt,scrollableAncestors:V,scrollableAncestorRects:Fe});let Cn=(0,a.useMemo)(()=>({active:H,activeNode:$,activeNodeRect:W,activatorEvent:q,collisions:we,containerNodeRect:Ze,dragOverlay:se,draggableNodes:y,droppableContainers:T,droppableRects:he,over:G,measureDroppableContainers:ze,scrollableAncestors:V,scrollableAncestorRects:Fe,measuringConfiguration:oe,measuringScheduled:Dt,windowRect:et}),[H,$,W,q,we,Ze,se,y,T,he,G,ze,V,Fe,oe,Dt,et]),Rn=(0,a.useMemo)(()=>({activatorEvent:q,activators:It,active:H,activeNodeRect:W,ariaDescribedById:{draggable:Qe},dispatch:m,draggableNodes:y,over:G,measureDroppableContainers:ze}),[q,It,H,W,m,Qe,y,G,ze]);return a.default.createElement(tn.Provider,{value:w},a.default.createElement(Pe.Provider,{value:Rn},a.default.createElement(pn.Provider,{value:Cn},a.default.createElement(Ge.Provider,{value:xn},u)),a.default.createElement(Sr,{disabled:s?.restoreFocus===!1})),a.default.createElement(Ln,{...s,hiddenTextDescribedById:Qe}));function Sn(){let k=yt?.autoScrollEnabled===!1,I=typeof c=="object"?c.enabled===!1:c===!1,P=S&&!k&&!I;return typeof c=="object"?{...c,enabled:P}:{enabled:P}}}),Or=(0,a.createContext)(null),Zt="button",Nr="Draggable";function eo(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e,o=Ae(Nr),{activators:l,activatorEvent:s,active:c,activeNodeRect:u,ariaDescribedById:f,draggableNodes:d,over:g}=(0,a.useContext)(Pe),{role:h=Zt,roleDescription:D="draggable",tabIndex:v=0}=i??{},p=c?.id===t,m=(0,a.useContext)(p?Ge:Or),[x,w]=Se(),[N,R]=Se(),S=br(l,t),b=ye(n);te(()=>(d.set(t,{id:t,key:o,node:x,activatorNode:N,data:b}),()=>{let E=d.get(t);E&&E.key===o&&d.delete(t)}),[d,t]);let y=(0,a.useMemo)(()=>({role:h,tabIndex:v,"aria-disabled":r,"aria-pressed":p&&h===Zt?!0:void 0,"aria-roledescription":D,"aria-describedby":f.draggable}),[r,h,v,p,D,f.draggable]);return{active:c,activatorEvent:s,activeNodeRect:u,attributes:y,isDragging:p,listeners:r?void 0:S,node:x,over:g,setNodeRef:w,setActivatorNodeRef:R,transform:m}}function Mr(){return(0,a.useContext)(pn)}var Tr="Droppable",Lr={timeout:25};function to(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e,o=Ae(Tr),{active:l,dispatch:s,over:c,measureDroppableContainers:u}=(0,a.useContext)(Pe),f=(0,a.useRef)({disabled:n}),d=(0,a.useRef)(!1),g=(0,a.useRef)(null),h=(0,a.useRef)(null),{disabled:D,updateMeasurementsFor:v,timeout:p}={...Lr,...i},m=ye(v??r),x=(0,a.useCallback)(()=>{if(!d.current){d.current=!0;return}h.current!=null&&clearTimeout(h.current),h.current=setTimeout(()=>{u(Array.isArray(m.current)?m.current:[m.current]),h.current=null},p)},[p]),w=Ve({callback:x,disabled:D||!l}),N=(0,a.useCallback)((y,E)=>{w&&(E&&(w.unobserve(E),d.current=!1),y&&w.observe(y))},[w]),[R,S]=Se(N),b=ye(t);return(0,a.useEffect)(()=>{!w||!R.current||(w.disconnect(),d.current=!1,w.observe(R.current))},[R,w]),(0,a.useEffect)(()=>(s({type:O.RegisterDroppable,element:{id:r,key:o,disabled:n,node:R,rect:g,data:b}}),()=>s({type:O.UnregisterDroppable,key:o,id:r})),[r]),(0,a.useEffect)(()=>{n!==f.current.disabled&&(s({type:O.SetDroppableDisabled,id:r,key:o,disabled:n}),f.current.disabled=n)},[r,o,n,s]),{active:l,rect:g,isOver:c?.id===r,node:R,over:c,setNodeRef:S}}function kr(e){let{animation:t,children:n}=e,[r,i]=(0,a.useState)(null),[o,l]=(0,a.useState)(null),s=Ee(n);return!n&&!r&&s&&i(s),te(()=>{if(!o)return;let c=r?.key,u=r?.props.id;if(c==null||u==null){i(null);return}Promise.resolve(t(u,o)).then(()=>{i(null)})},[t,r,o]),a.default.createElement(a.default.Fragment,null,n,r?(0,a.cloneElement)(r,{ref:l}):null)}var Ir={x:0,y:0,scaleX:1,scaleY:1};function Pr(e){let{children:t}=e;return a.default.createElement(Pe.Provider,{value:vn},a.default.createElement(Ge.Provider,{value:Ir},t))}var zr={position:"fixed",touchAction:"none"},Br=e=>Ke(e)?"transform 250ms ease":void 0,Fr=(0,a.forwardRef)((e,t)=>{let{as:n,activatorEvent:r,adjustScale:i,children:o,className:l,rect:s,style:c,transform:u,transition:f=Br}=e;if(!s)return null;let d=i?u:{...u,scaleX:1,scaleY:1},g={...zr,width:s.width,height:s.height,top:s.top,left:s.left,transform:Ye.Transform.toString(d),transformOrigin:i&&r?kn(r,s):void 0,transition:typeof f=="function"?f(r):f,...c};return a.default.createElement(n,{className:l,style:g,ref:t},o)}),$r=e=>t=>{let{active:n,dragOverlay:r}=t,i={},{styles:o,className:l}=e;if(o!=null&&o.active)for(let[s,c]of Object.entries(o.active))c!==void 0&&(i[s]=n.node.style.getPropertyValue(s),n.node.style.setProperty(s,c));if(o!=null&&o.dragOverlay)for(let[s,c]of Object.entries(o.dragOverlay))c!==void 0&&r.node.style.setProperty(s,c);return l!=null&&l.active&&n.node.classList.add(l.active),l!=null&&l.dragOverlay&&r.node.classList.add(l.dragOverlay),function(){for(let[c,u]of Object.entries(i))n.node.style.setProperty(c,u);l!=null&&l.active&&n.node.classList.remove(l.active)}},Wr=e=>{let{transform:{initial:t,final:n}}=e;return[{transform:Ye.Transform.toString(t)},{transform:Ye.Transform.toString(n)}]},Xr={duration:250,easing:"ease",keyframes:Wr,sideEffects:$r({styles:{active:{opacity:"0"}}})};function jr(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:i}=e;return je((o,l)=>{if(t===null)return;let s=n.get(o);if(!s)return;let c=s.node.current;if(!c)return;let u=gn(l);if(!u)return;let{transform:f}=X(l).getComputedStyle(l),d=rn(f);if(!d)return;let g=typeof t=="function"?t:Kr(t);return dn(c,i.draggable.measure),g({active:{id:o,data:s.data,node:c,rect:i.draggable.measure(c)},draggableNodes:n,dragOverlay:{node:l,rect:i.dragOverlay.measure(u)},droppableContainers:r,measuringConfiguration:i,transform:d})})}function Kr(e){let{duration:t,easing:n,sideEffects:r,keyframes:i}={...Xr,...e};return o=>{let{active:l,dragOverlay:s,transform:c,...u}=o;if(!t)return;let f={x:s.rect.left-l.rect.left,y:s.rect.top-l.rect.top},d={scaleX:c.scaleX!==1?l.rect.width*c.scaleX/s.rect.width:1,scaleY:c.scaleY!==1?l.rect.height*c.scaleY/s.rect.height:1},g={x:c.x-f.x,y:c.y-f.y,...d},h=i({...u,active:l,dragOverlay:s,transform:{initial:c,final:g}}),[D]=h,v=h[h.length-1];if(JSON.stringify(D)===JSON.stringify(v))return;let p=r?.({active:l,dragOverlay:s,...u}),m=s.node.animate(h,{duration:t,easing:n,fill:"forwards"});return new Promise(x=>{m.onfinish=()=>{p?.(),x()}})}}var en=0;function Yr(e){return(0,a.useMemo)(()=>{if(e!=null)return en++,en},[e])}var no=a.default.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:r,style:i,transition:o,modifiers:l,wrapperElement:s="div",className:c,zIndex:u=999}=e,{activatorEvent:f,active:d,activeNodeRect:g,containerNodeRect:h,draggableNodes:D,droppableContainers:v,dragOverlay:p,over:m,measuringConfiguration:x,scrollableAncestors:w,scrollableAncestorRects:N,windowRect:R}=Mr(),S=(0,a.useContext)(Ge),b=Yr(d?.id),y=bn(l,{activatorEvent:f,active:d,activeNodeRect:g,containerNodeRect:h,draggingNodeRect:p.rect,over:m,overlayNodeRect:p.rect,scrollableAncestors:w,scrollableAncestorRects:N,transform:S,windowRect:R}),E=bt(g),T=jr({config:r,draggableNodes:D,droppableContainers:v,measuringConfiguration:x}),A=E?p.setRef:void 0;return a.default.createElement(Pr,null,a.default.createElement(kr,{animation:T},d&&b?a.default.createElement(Fr,{key:b,id:d.id,ref:A,as:s,activatorEvent:f,adjustScale:t,className:c,transition:o,rect:E,style:{zIndex:u,...i},transform:y},n):null))});export{On as a,Mn as b,Tn as c,Jr as d,_r as e,j as f,Pn as g,Vr as h,Gr as i,Bn as j,Qr as k,Ie as l,pt as m,C as n,tr as o,qe as p,Je as q,dt as r,ft as s,Me as t,_e as u,ke as v,ht as w,bn as x,Zr as y,eo as z,Mr as A,to as B,$r as C,Xr as D,no as E};
6
+ //# sourceMappingURL=chunk-VKXVJGG5.js.map
@@ -0,0 +1,2 @@
1
+ import{a as Kt}from"./chunk-CT4EH2K2.js";import{a as x}from"./chunk-IJQ26FTX.js";import{c as M}from"./chunk-KVMUXFPB.js";var G=M(x(),1),jt=M(Kt(),1),Qt=G.createContext(void 0),Q=t=>{let e=G.useContext(Qt);if(t)return t;if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},me=({client:t,children:e})=>(G.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),(0,jt.jsx)(Qt.Provider,{value:t,children:e}));var ye={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},ge=class{#e=ye;#t=!1;setTimeoutProvider(t){this.#t&&t!==this.#e&&console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.",{previous:this.#e,provider:t}),this.#e=t,this.#t=!1}setTimeout(t,e){return this.#t=!0,this.#e.setTimeout(t,e)}clearTimeout(t){this.#e.clearTimeout(t)}setInterval(t,e){return this.#t=!0,this.#e.setInterval(t,e)}clearInterval(t){this.#e.clearInterval(t)}},F=new ge;function _t(t){setTimeout(t,0)}var Et=typeof window>"u"||"Deno"in globalThis;function y(){}function Bt(t,e){return typeof t=="function"?t(e):t}function nt(t){return typeof t=="number"&&t>=0&&t!==1/0}function ot(t,e){return Math.max(t+(e||0)-Date.now(),0)}function g(t,e){return typeof t=="function"?t(e):t}function at(t,e){let{type:s="all",exact:r,fetchStatus:i,predicate:n,queryKey:a,stale:o}=t;if(a){if(r){if(e.queryHash!==Y(a,e.options))return!1}else if(!A(e.queryKey,a))return!1}if(s!=="all"){let c=e.isActive();if(s==="active"&&!c||s==="inactive"&&c)return!1}return!(typeof o=="boolean"&&e.isStale()!==o||i&&i!==e.state.fetchStatus||n&&!n(e))}function ut(t,e){let{exact:s,status:r,predicate:i,mutationKey:n}=t;if(n){if(!e.options.mutationKey)return!1;if(s){if(T(e.options.mutationKey)!==T(n))return!1}else if(!A(e.options.mutationKey,n))return!1}return!(r&&e.state.status!==r||i&&!i(e))}function Y(t,e){return(e?.queryKeyHashFn||T)(t)}function T(t){return JSON.stringify(t,(e,s)=>wt(s)?Object.keys(s).sort().reduce((r,i)=>(r[i]=s[i],r),{}):s)}function A(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(Array.isArray(t)&&Array.isArray(e)){if(e.length>t.length)return!1;for(let r=0;r<e.length;r++)if(!A(t[r],e[r]))return!1;return!0}let s=Object.keys(e);for(let r of s)if(!A(t[r],e[r]))return!1;return!0}return!1}var Vt=Object.prototype.hasOwnProperty;function N(t,e,s=0){if(t===e)return t;if(s>500)return e;let r=Ht(t)&&Ht(e);if(!r&&!(wt(t)&&wt(e)))return e;let i=(r?t:Object.keys(t)).length,n=r?e:Object.keys(e),a=n.length,o=r?new Array(a):{},c=0;for(let u=0;u<a;u++){let h=r?u:n[u],l=t[h],p=e[h];if(l===p){o[h]=l,(r?u<i:Vt.call(t,h))&&c++;continue}if(l===null||p===null||typeof l!="object"||typeof p!="object"){o[h]=p;continue}let b=N(l,p,s+1);o[h]=b,b===l&&c++}return i===a&&c===i?t:o}function U(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(let s of Object.keys(t))if(!Vt.call(e,s)||t[s]!==e[s])return!1;return!0}function Ht(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function wt(t){if(!Lt(t))return!1;let e=Object.getPrototypeOf(t),s=e?.constructor;if(s===void 0)return!0;if(typeof s!="function")return!1;let r=s.prototype;return!(!Lt(r)||!r.hasOwnProperty("isPrototypeOf")||e!==Object.prototype)}function Lt(t){return Object.prototype.toString.call(t)==="[object Object]"}function zt(t){return new Promise(e=>{F.setTimeout(e,t)})}function tt(t,e,s){if(typeof s.structuralSharing=="function")return s.structuralSharing(t,e);if(s.structuralSharing!==!1){try{return N(t,e)}catch(r){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${s.queryHash}]: ${r}`),r}return N(t,e)}return e}function ve(t){return t}function ct(t,e,s=0){let r=[...t,e];return s&&r.length>s?r.slice(-s):r}function Gt(t,e,s=0){let r=[e,...t];return s&&r.length>s?r.slice(0,s):r}var P=Symbol();function ht(t,e){return t.queryFn===P&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${t.queryHash}'`),!t.queryFn&&e?.initialPromise?()=>e.initialPromise:!t.queryFn||t.queryFn===P?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function $(t,e){return typeof t=="function"?t(...e):!!t}var _=Symbol();function lt(t,e,s,r){let i=!1,n;return Object.defineProperties(t,{[_]:{value:r},signal:{enumerable:!0,get:()=>(n??=e(),i||(i=!0,n.aborted?s():n.addEventListener("abort",s,{once:!0})),n)}}),t}var $t=()=>Et,H=()=>$t(),be={isServer:H,setIsServer(t){$t=t}};var C=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}};var Oe=class extends C{#e;#t;#s;constructor(){super(),this.#s=t=>{if(typeof window<"u"&&window.addEventListener){let e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#t||this.setEventListener(this.#s)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#s=t,this.#t?.(),this.#t=t(e=>{typeof e=="boolean"?this.setFocused(e):this.onFocus()})}setFocused(t){this.#e!==t&&(this.#e=t,this.onFocus())}onFocus(){let t=this.isFocused();this.listeners.forEach(e=>{e(t)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},L=new Oe;function Se(t){let e;if(t.then(s=>(e=s,s),y)?.catch?.(y),e!==void 0)return{data:e}}function Re(t){return{mutationKey:t.options.mutationKey,state:t.state,...t.options.scope&&{scope:t.options.scope},...t.meta&&{meta:t.meta}}}function Qe(t,e,s){let r=t.promise?.then(e).catch(i=>s?.(i)===!1?Promise.reject(i):(console.error(`A query that was dehydrated as pending ended up rejecting. [${t.queryHash}]: ${i}; The error will be redacted in production builds`),Promise.reject(new Error("redacted"))));return r?.catch(y),r}function Wt(t,e,s){return{dehydratedAt:Date.now(),state:{...t.state,...t.state.data!==void 0&&{data:e?e(t.state.data):t.state.data}},queryKey:t.queryKey,queryHash:t.queryHash,...t.state.status==="pending"&&{promise:Qe(t,e,s)},...t.meta&&{meta:t.meta},...t.queryType&&{queryType:t.queryType}}}function Jt(t){return t.state.isPaused}function Zt(t){return t.state.status==="success"}function we(t,e={}){let s=e.shouldDehydrateMutation??t.getDefaultOptions().dehydrate?.shouldDehydrateMutation??Jt,r=t.getMutationCache().getAll().flatMap(o=>s(o)?[Re(o)]:[]),i=e.shouldDehydrateQuery??t.getDefaultOptions().dehydrate?.shouldDehydrateQuery??Zt,n=e.shouldRedactErrors??t.getDefaultOptions().dehydrate?.shouldRedactErrors,a=e.serializeData??t.getDefaultOptions().dehydrate?.serializeData;return{mutations:r,queries:t.getQueryCache().getAll().flatMap(o=>i(o)?[Wt(o,a,n)]:[])}}function ft(t,e,s){let r=t.getMutationCache(),i=t.getQueryCache(),n=s?.defaultOptions?.deserializeData??t.getDefaultOptions().hydrate?.deserializeData;e.mutations?.forEach(({state:a,...o})=>{r.build(t,{...t.getDefaultOptions().hydrate?.mutations,...s?.defaultOptions?.mutations,...o},a)}),e.queries?.forEach(({queryKey:a,state:o,queryHash:c,meta:u,promise:h,dehydratedAt:l,queryType:p})=>{let b=h?Se(h):void 0,O=o.data===void 0?b?.data:o.data,f=O===void 0?O:n?n(O):O,d=i.get(c),v=d?.state.status==="pending",S=d?.state.fetchStatus==="fetching";if(d){let w=b&&l>d.state.dataUpdatedAt;if(o.dataUpdatedAt>d.state.dataUpdatedAt||w){let{fetchStatus:E,...R}=o;d.setState({...R,data:f,...o.status==="pending"&&f!==void 0&&{status:"success",dataUpdatedAt:l,...!S&&{fetchStatus:"idle"}}})}}else d=i.build(t,{...t.getDefaultOptions().hydrate?.queries,...s?.defaultOptions?.queries,queryKey:a,queryHash:c,meta:u,_type:p},{...o,data:f,fetchStatus:"idle",status:o.status==="pending"&&f!==void 0?"success":o.status,...o.status==="pending"&&f!==void 0&&{dataUpdatedAt:l}});h&&!b&&!v&&!S&&l>d.state.dataUpdatedAt&&d.fetch(void 0,{initialPromise:Promise.resolve(h).then(n)}).catch(y)})}var Xt=_t;function Ee(){let t=[],e=0,s=o=>{o()},r=o=>{o()},i=Xt,n=o=>{e?t.push(o):i(()=>{s(o)})},a=()=>{let o=t;t=[],o.length&&i(()=>{r(()=>{o.forEach(c=>{s(c)})})})};return{batch:o=>{let c;e++;try{c=o()}finally{e--,e||a()}return c},batchCalls:o=>(...c)=>{n(()=>{o(...c)})},schedule:n,setNotifyFunction:o=>{s=o},setBatchNotifyFunction:o=>{r=o},setScheduler:o=>{i=o}}}var m=Ee();var Ce=class extends C{#e=!0;#t;#s;constructor(){super(),this.#s=t=>{if(typeof window<"u"&&window.addEventListener){let e=()=>t(!0),s=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",s)}}}}onSubscribe(){this.#t||this.setEventListener(this.#s)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#s=t,this.#t?.(),this.#t=t(this.setOnline.bind(this))}setOnline(t){this.#e!==t&&(this.#e=t,this.listeners.forEach(e=>{e(t)}))}isOnline(){return this.#e}},B=new Ce;function Pe(t){return Math.min(1e3*2**t,3e4)}function Ct(t){return(t??"online")==="online"?B.isOnline():!0}var W=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function Me(t){return t instanceof W}function dt(t){let e=!1,s=0,r,i="pending",n,a,o=new Promise((S,w)=>{n=S,a=w});o.catch(y);let c=()=>i!=="pending",u=S=>{if(!c()){let w=new W(S);f(w),t.onCancel?.(w)}},h=()=>{e=!0},l=()=>{e=!1},p=()=>L.isFocused()&&(t.networkMode==="always"||B.isOnline())&&t.canRun(),b=()=>Ct(t.networkMode)&&t.canRun(),O=S=>{c()||(r?.(),i="resolved",n(S))},f=S=>{c()||(r?.(),i="rejected",a(S))},d=S=>new Promise(w=>{r=E=>{(c()||S())&&w(E)},t.onPause?.()}).then(()=>{r=void 0,c()||t.onContinue?.()}),v=()=>{if(c())return;let S,w=s===0?t.initialPromise:void 0;try{S=w??t.fn()}catch(E){S=Promise.reject(E)}Promise.resolve(S).then(O).catch(E=>{if(c())return;let R=t.retry??(H()?0:3),k=t.retryDelay??Pe,z=typeof k=="function"?k(s,E):k,pe=R===!0||typeof R=="number"&&s<R||typeof R=="function"&&R(s,E);if(e||!pe){f(E);return}s++,t.onFail?.(s,E),zt(z).then(()=>c()||p()?void 0:d(p)).then(()=>{e?f(E):v()})})};return{promise:o,status:()=>i,cancel:u,continue:()=>(r?.(),o),cancelRetry:h,continueRetry:l,canStart:b,start:()=>(b()?v():d(b).then(v),o)}}function Yt(t){return{onFetch:(e,s)=>{let r=e.options,i=e.fetchOptions?.meta?.fetchMore?.direction,n=e.state.data?.pages||[],a=e.state.data?.pageParams||[],o={pages:[],pageParams:[]},c=0,u=async()=>{let h=!1,l=e,p=f=>{lt(f,()=>e.signal,()=>h=!0,l[_])},b=ht(e.options,e.fetchOptions),O=async(f,d,v)=>{if(h)return Promise.reject(e.signal.reason);if(d==null&&f.pages.length)return Promise.resolve(f);let w=(()=>{let z={client:e.client,queryKey:e.queryKey,pageParam:d,direction:v?"backward":"forward",meta:e.options.meta};return p(z),z})(),E=await b(w),{maxPages:R}=e.options,k=v?Gt:ct;return{pages:k(f.pages,E,R),pageParams:k(f.pageParams,d,R)}};if(i&&n.length){let f=i==="backward",d=f?te:Pt,v={pages:n,pageParams:a};o=await O(v,d(r,v),f)}else{let f=t??n.length;do{let d=c===0?a[0]===void 0?r.initialPageParam:a[0]:Pt(r,o);if(c>0&&d==null)break;o=await O(o,d),c++}while(c<f)}return o};e.options.persister?e.fetchFn=()=>e.options.persister?.(u,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},s):e.fetchFn=u}}}function Pt(t,{pages:e,pageParams:s}){let r=e.length-1;return e.length>0?t.getNextPageParam(e[r],e,s[r],s):void 0}function te(t,{pages:e,pageParams:s}){return e.length>0?t.getPreviousPageParam?.(e[0],e,s[0],s):void 0}function ee(t,e){return e?Pt(t,e)!=null:!1}function se(t,e){return!e||!t.getPreviousPageParam?!1:te(t,e)!=null}var pt=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),nt(this.gcTime)&&(this.#e=F.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(H()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(F.clearTimeout(this.#e),this.#e=void 0)}};var Mt=class extends pt{#e;#t;#s;#r;#i;#n;#o;#u;#c;constructor(t){super(),this.#c=!1,this.#u=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#i=t.client,this.#r=this.#i.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#t=ie(this.options),this.state=t.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#n?.promise}setOptions(t){if(this.options={...this.#u,...t},t?._type&&(this.#e=t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=ie(this.options);e.data!==void 0&&(this.setState(re(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(t,e){let s=tt(this.state.data,t,this.options);return this.#a({data:s,type:"success",dataUpdatedAt:e?.updatedAt,manual:e?.manual}),s}setState(t){this.#a({type:"setState",state:t})}cancel(t){let e=this.#n?.promise;return this.#n?.cancel(t),e?e.then(y).catch(y):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>g(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===P||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.state.data===void 0?!1:this.getObserversCount()>0?this.observers.some(t=>g(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!ot(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#n?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#n?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){let e=this.observers.indexOf(t);e!==-1&&(this.observers.splice(e,1),this.observers.length||(this.#n&&(this.#c||this.state.fetchStatus==="paused"&&this.state.status==="pending"?this.#n.cancel({revert:!0}):this.#n.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#a({type:"invalidate"})}async fetch(t,e){if(this.state.fetchStatus!=="idle"&&this.#n?.status()!=="rejected"){if(this.state.data!==void 0&&e?.cancelRefetch)this.cancel({silent:!0});else if(this.#n&&this.#o)return this.#n.continueRetry(),this.#o}if(t&&this.setOptions(t),!this.options.queryFn){let u=this.observers.find(h=>h.options.queryFn);u&&this.setOptions(u.options)}Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']");let s=new AbortController,r=u=>{Object.defineProperties(u,{[_]:{value:s.signal,enumerable:!0},signal:{enumerable:!0,get:()=>(this.#c=!0,s.signal)}})},i=()=>{let u=ht(this.options,e),l=(()=>{let p={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(p),p})();return this.#c=!1,this.options.persister?this.options.persister(u,l,this):u(l)},a=(()=>{let u={fetchOptions:e,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(u),u})();(this.#e==="infinite"?Yt(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#s=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#a({type:"fetch",meta:a.fetchOptions?.meta});let o=this.#n=dt({initialPromise:e?.initialPromise,fn:a.fetchFn,onCancel:u=>{u instanceof W&&u.revert&&this.setState({...this.#s,fetchStatus:"idle"}),s.abort()},onFail:(u,h)=>{this.#a({type:"failed",failureCount:u,error:h})},onPause:()=>{this.#a({type:"pause"})},onContinue:()=>{this.#a({type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0}),c=(async()=>{try{let u=await o.promise;if(u===void 0)throw console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),new Error(`${this.queryHash} data is undefined`);return this.setData(u),this.#r.config.onSuccess?.(u,this),this.#r.config.onSettled?.(u,this.state.error,this),u}catch(u){if(u instanceof W){if(u.silent){if(this.#n!==o&&this.#o)return this.#o;throw u}else if(u.revert){if(this.state.data===void 0)throw u;return this.state.data}}throw this.#a({type:"error",error:u}),this.#r.config.onError?.(u,this),this.#r.config.onSettled?.(this.state.data,u,this),u}finally{this.#n===o&&(this.#n=void 0,this.#o=void 0),this.scheduleGc()}})();return this.#o=c,o.start(),c}#a(t){let e=s=>{switch(t.type){case"failed":return{...s,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...Ft(s.data,this.options),fetchMeta:t.meta??null};case"success":{let r={...s,...re(t.data,t.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#s=t.manual?r:void 0,r}case"error":{let r=t.error;return{...s,error:r,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error",isInvalidated:!0}}case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...t.state}}};this.state=e(this.state),m.batch(()=>{this.observers.slice().forEach(s=>{s.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:t})})}};function Ft(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Ct(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function re(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function ie(t){let e=typeof t.initialData=="function"?t.initialData():t.initialData,s=e!==void 0,r=s?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:s?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var D=class extends C{#e;#t=void 0;#s=void 0;#r=void 0;#i;#n;#o;#u;#c;#a;#h;#l;#f;#p=new Set;constructor(t,e){super(),this.options=e,this.#e=t,this.#o=null,this.bindMethods(),this.setOptions(e)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),ne(this.#t,this.options)?this.#d():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Dt(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Dt(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#O(),this.#S(),this.#t.removeObserver(this)}setOptions(t){let e=this.options,s=this.#t;if(this.options=this.#e.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof g(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#R(),this.#t.setOptions(this.options),e._defaulted&&!U(this.options,e)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});let r=this.hasListeners();r&&oe(this.#t,s,this.options,e)&&this.#d(),this.updateResult(),r&&(this.#t!==s||g(this.options.enabled,this.#t)!==g(e.enabled,this.#t)||g(this.options.staleTime,this.#t)!==g(e.staleTime,this.#t))&&this.#y();let i=this.#g();r&&(this.#t!==s||g(this.options.enabled,this.#t)!==g(e.enabled,this.#t)||i!==this.#f)&&this.#v(i)}getOptimisticResult(t){let e=this.#e.getQueryCache().build(this.#e,t),s=this.createResult(e,t);return U(this.getCurrentResult(),s)||(this.#r=s,this.#n=this.options,this.#i=this.#t.state),s}getCurrentResult(){return this.#r}trackResult(t,e){return new Proxy(t,{get:(s,r)=>(this.trackProp(r),e?.(r),Reflect.get(s,r))})}trackProp(t){this.#p.add(t)}getCurrentQuery(){return this.#t}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){let e=this.#e.defaultQueryOptions(t),s=this.#e.getQueryCache().build(this.#e,e),r=()=>{},i,n=new Promise(a=>{i=a,r=this.#e.getQueryCache().subscribe(o=>{o.type==="updated"&&o.query.queryHash===s.queryHash&&s.state.data!==void 0&&(r(),a(this.createResult(s,e)))})});return Promise.race([s.fetch(e).then(()=>{let a=this.createResult(s,e);return i?.(a),a}).finally(()=>{r()}),n])}fetch(t){return this.#d({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#d(t){this.#R();let e=this.#t.fetch(this.options,t);return t?.throwOnError||(e=e.catch(y)),e}#m(t){return!H()&&g(this.options.enabled,this.#t)!==!1&&nt(t)}#y(){this.#O();let t=g(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#m(t))return;let e=ot(this.#r.dataUpdatedAt,t)+1;this.#h=F.setTimeout(()=>{this.#r.isStale||this.updateResult()},e)}#g(){return g(this.options.refetchInterval,this.#t)??!1}#v(t){this.#S(),this.#f=t,!(this.#f===0||!this.#m(this.#f))&&(this.#l=F.setInterval(()=>{(this.options.refetchIntervalInBackground||L.isFocused())&&this.#d()},this.#f))}#b(){this.#y(),this.#v(this.#g())}#O(){this.#h!==void 0&&(F.clearTimeout(this.#h),this.#h=void 0)}#S(){this.#l!==void 0&&(F.clearInterval(this.#l),this.#l=void 0)}createResult(t,e){let s=this.#t,r=this.options,i=this.#r,n=this.#i,a=this.#n,o=t!==s?t.state:this.#s,{state:c}=t,u={...c},h=!1,l;if(e._optimisticResults){let R=this.hasListeners(),k=!R&&ne(t,e),z=R&&oe(t,s,e,r);(k||z)&&(u={...u,...Ft(c.data,t.options)}),e._optimisticResults==="isRestoring"&&(u.fetchStatus="idle")}let{error:p,errorUpdatedAt:b,status:O}=u;l=u.data;let f=!1;if(e.placeholderData!==void 0&&l===void 0&&O==="pending"){let R;i?.isPlaceholderData&&e.placeholderData===a?.placeholderData?(R=i.data,f=!0):R=typeof e.placeholderData=="function"?e.placeholderData(this.#a?.state.data,this.#a):e.placeholderData,R!==void 0&&(O="success",l=tt(i?.data,R,e),h=!0)}if(e.select&&l!==void 0&&!f)if(i&&l===n?.data&&e.select===this.#u)l=this.#c;else try{this.#u=e.select,l=e.select(l),l=tt(i?.data,l,e),this.#c=l,this.#o=null}catch(R){this.#o=R}else l===void 0&&(this.#o=null);this.#o&&(p=this.#o,l=this.#c,b=i?.error===p?i.errorUpdatedAt:Date.now(),O="error",h=!1);let d=u.fetchStatus==="fetching",v=O==="pending",S=O==="error",w=v&&d,E=l!==void 0;return{status:O,fetchStatus:u.fetchStatus,isPending:v,isSuccess:O==="success",isError:S,isInitialLoading:w,isLoading:w,data:l,dataUpdatedAt:u.dataUpdatedAt,error:p,errorUpdatedAt:b,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:u.dataUpdateCount>o.dataUpdateCount||u.errorUpdateCount>o.errorUpdateCount,isFetching:d,isRefetching:d&&!v,isLoadingError:S&&!E,isPaused:u.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:S&&E,isStale:xt(t,e),refetch:this.refetch,isEnabled:g(e.enabled,t)!==!1}}updateResult(){let t=this.#r,e=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#n=this.options,this.#i.data!==void 0&&(this.#a=this.#t),U(e,t))return;this.#r=e;let r=(()=>{if(!t)return!0;let{notifyOnChangeProps:i}=this.options,n=typeof i=="function"?i():i;if(n==="all"||!n&&!this.#p.size||this.options.throwOnError&&this.#r.error!==t.error)return!0;for(let a of n??this.#p)if(this.#r[a]!==t[a])return!0;return!1})();m.batch(()=>{r&&this.listeners.forEach(i=>{i(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}#R(){let t=this.#e.getQueryCache().build(this.#e,this.options);if(t===this.#t)return;let e=this.#t;this.#t=t,this.#s=t.state,this.hasListeners()&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}};function Fe(t,e){return g(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&g(e.retryOnMount,t)===!1)}function ne(t,e){return Fe(t,e)||t.state.data!==void 0&&Dt(t,e,e.refetchOnMount)}function Dt(t,e,s){if(g(e.enabled,t)!==!1&&g(e.staleTime,t)!=="static"){let r=g(s,t);return r==="always"||r!==!1&&xt(t,e)}return!1}function oe(t,e,s,r){return(t!==e||g(r.enabled,t)===!1)&&(!s.suspense||t.state.status!=="error")&&xt(t,s)}function xt(t,e){return g(e.enabled,t)!==!1&&t.isStaleByTime(g(e.staleTime,t))}var et=class extends D{constructor(t,e){super(t,e)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(t){t._type="infinite",super.setOptions(t)}getOptimisticResult(t){return t._type="infinite",super.getOptimisticResult(t)}fetchNextPage(t){return this.fetch({...t,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(t){return this.fetch({...t,meta:{fetchMore:{direction:"backward"}}})}createResult(t,e){let{state:s}=t,r=super.createResult(t,e),{isFetching:i,isRefetching:n,isError:a,isRefetchError:o}=r,c=s.fetchMeta?.fetchMore?.direction,u=a&&c==="forward",h=i&&c==="forward",l=a&&c==="backward",p=i&&c==="backward";return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:ee(e,s.data),hasPreviousPage:se(e,s.data),isFetchNextPageError:u,isFetchingNextPage:h,isFetchPreviousPageError:l,isFetchingPreviousPage:p,isRefetchError:o&&!u&&!l,isRefetching:n&&!h&&!p}}};var Tt=class extends pt{#e;#t;#s;#r;constructor(t){super(),this.#e=t.client,this.mutationId=t.mutationId,this.#s=t.mutationCache,this.#t=[],this.state=t.state||qt(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#t.includes(t)||(this.#t.push(t),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#t=this.#t.filter(e=>e!==t),this.scheduleGc(),this.#s.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#s.remove(this))}continue(){return this.#r?.continue()??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(t){let e=()=>{this.#i({type:"continue"})},s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},r=this.#r=dt({fn:()=>this.options.mutationFn?this.options.mutationFn(t,s):Promise.reject(new Error("No mutationFn found")),onFail:(a,o)=>{this.#i({type:"failed",failureCount:a,error:o})},onPause:()=>{this.#i({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#s.canRun(this)}),i=this.state.status==="pending",n=!r.canStart();try{if(i)e();else{this.#i({type:"pending",variables:t,isPaused:n}),this.#s.config.onMutate&&await this.#s.config.onMutate(t,this,s);let o=await this.options.onMutate?.(t,s);o!==this.state.context&&this.#i({type:"pending",context:o,variables:t,isPaused:n})}this.state.isPaused&&r.canStart()&&e();let a=await r.start();return await this.#s.config.onSuccess?.(a,t,this.state.context,this,s),await this.options.onSuccess?.(a,t,this.state.context,s),await this.#s.config.onSettled?.(a,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(a,null,t,this.state.context,s),this.#i({type:"success",data:a}),a}catch(a){try{await this.#s.config.onError?.(a,t,this.state.context,this,s)}catch(o){Promise.reject(o)}try{await this.options.onError?.(a,t,this.state.context,s)}catch(o){Promise.reject(o)}try{await this.#s.config.onSettled?.(void 0,a,this.state.variables,this.state.context,this,s)}catch(o){Promise.reject(o)}try{await this.options.onSettled?.(void 0,a,t,this.state.context,s)}catch(o){Promise.reject(o)}throw this.#i({type:"error",error:a}),a}finally{this.#r===r&&(this.#r=void 0),this.#s.runNext(this)}}#i(t){let e=s=>{switch(t.type){case"failed":return{...s,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...s,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:t.error,failureCount:s.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=e(this.state),m.batch(()=>{this.#t.forEach(s=>{s.onMutationUpdate(t)}),this.#s.notify({mutation:this,type:"updated",action:t})})}};function qt(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var It=class extends C{#e;#t;#s;constructor(t={}){super(),this.config=t,this.#e=new Set,this.#t=new Map,this.#s=0}build(t,e,s){let r=new Tt({client:t,mutationCache:this,mutationId:++this.#s,options:t.defaultMutationOptions(e),state:s});return this.add(r),r}add(t){this.#e.add(t);let e=mt(t);if(typeof e=="string"){let s=this.#t.get(e);s?s.push(t):this.#t.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#e.delete(t)){let e=mt(t);if(typeof e=="string"){let s=this.#t.get(e);if(s)if(s.length>1){let r=s.indexOf(t);r!==-1&&s.splice(r,1)}else s[0]===t&&this.#t.delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){let e=mt(t);if(typeof e=="string"){let s=this.#t.get(e)?.find(r=>r.state.status==="pending");return!s||s===t}else return!0}runNext(t){let e=mt(t);return typeof e=="string"?this.#t.get(e)?.find(s=>s!==t&&s.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){m.batch(()=>{let t=this.getAll();this.#e.clear(),this.#t.clear(),t.forEach(e=>{this.notify({type:"removed",mutation:e})})})}getAll(){return Array.from(this.#e)}find(t){let e={exact:!0,...t};return this.getAll().find(s=>ut(e,s))}findAll(t={}){return this.getAll().filter(e=>ut(t,e))}notify(t){m.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){let t=this.getAll().filter(e=>e.state.isPaused);return m.batch(()=>Promise.all(t.map(e=>e.continue().catch(y))))}};function mt(t){return t.options.scope?.id}var kt=class extends C{#e;#t=void 0;#s;#r;constructor(t,e){super(),this.#e=t,this.setOptions(e),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){let e=this.options;this.options=this.#e.defaultMutationOptions(t),U(this.options,e)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#s,observer:this}),e?.mutationKey&&this.options.mutationKey&&T(e.mutationKey)!==T(this.options.mutationKey)?this.reset():this.#s?.state.status==="pending"&&this.#s.setOptions(this.options)}onSubscribe(){this.listeners.size===1&&this.#s&&(this.#s.addObserver(this),this.#i())}onUnsubscribe(){this.hasListeners()||this.#s?.removeObserver(this)}onMutationUpdate(t){this.#i(),this.#n(t)}getCurrentResult(){return this.#t}reset(){this.#s?.removeObserver(this),this.#s=void 0,this.#i(),this.#n()}mutate(t,e){return this.#r=e,this.#s?.removeObserver(this),this.#s=this.#e.getMutationCache().build(this.#e,this.options),this.#s.addObserver(this),this.#s.execute(t)}#i(){let t=this.#s?.state??qt();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#n(t){m.batch(()=>{let e=this.#r;if(e&&this.hasListeners()){let s=this.#t.variables,r=this.#t.context,i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{e.onSuccess?.(t.data,s,r,i)}catch(n){Promise.reject(n)}try{e.onSettled?.(t.data,null,s,r,i)}catch(n){Promise.reject(n)}}else if(t?.type==="error"){try{e.onError?.(t.error,s,r,i)}catch(n){Promise.reject(n)}try{e.onSettled?.(void 0,t.error,s,r,i)}catch(n){Promise.reject(n)}}}this.listeners.forEach(s=>{s(this.#t)})})}};function ae(t,e){let s=new Set(e);return t.filter(r=>!s.has(r))}var At=class extends C{#e;#t;#s;#r;#i;#n;#o;#u;#c;#a=[];constructor(t,e,s){super(),this.#e=t,this.#r=s,this.#s=[],this.#i=[],this.#t=[],this.setQueries(e)}onSubscribe(){this.listeners.size===1&&this.#i.forEach(t=>{t.subscribe(e=>{this.#d(t,e)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#i.forEach(t=>{t.destroy()})}setQueries(t,e){this.#s=t,this.#r=e;{let s=t.map(r=>this.#e.defaultQueryOptions(r).queryHash);new Set(s).size!==s.length&&console.warn("[QueriesObserver]: Duplicate Queries found. This might result in unexpected behavior.")}m.batch(()=>{let s=this.#i,r=this.#p(this.#s);r.forEach(h=>h.observer.setOptions(h.defaultedQueryOptions));let i=r.map(h=>h.observer),n=i.map(h=>h.getCurrentResult()),a=s.length!==i.length,o=i.some((h,l)=>h!==s[l]),c=a||o,u=c?!0:n.some((h,l)=>{let p=this.#t[l];return!p||!U(h,p)});!c&&!u||(c&&(this.#a=r,this.#i=i),this.#t=n,this.hasListeners()&&(c&&(ae(s,i).forEach(h=>{h.destroy()}),ae(i,s).forEach(h=>{h.subscribe(l=>{this.#d(h,l)})})),this.#m()))})}getCurrentResult(){return this.#t}getQueries(){return this.#i.map(t=>t.getCurrentQuery())}getObservers(){return this.#i}getOptimisticResult(t,e){let s=this.#p(t),r=s.map(n=>n.observer.getOptimisticResult(n.defaultedQueryOptions)),i=s.map(n=>n.defaultedQueryOptions.queryHash);return[r,n=>this.#l(n??r,e,i),()=>this.#h(r,s)]}#h(t,e){let s=new Set;return e.map((r,i)=>{let n=t[i];return r.defaultedQueryOptions.notifyOnChangeProps?n:r.observer.trackResult(n,a=>{s.has(a)||(s.add(a),e.forEach(o=>{o.observer.trackProp(a)}))})})}#l(t,e,s){if(e){let r=this.#c,i=s!==void 0&&r!==void 0&&(r.length!==s.length||s.some((n,a)=>n!==r[a]));return(this.#t!==this.#u||i||e!==this.#o)&&(this.#o=e,this.#u=this.#t,s!==void 0&&(this.#c=s),this.#n=N(this.#n,e(t))),this.#n}return t}#f(){return!this.#r?.combine||this.#i.some((t,e)=>t.options.suspense&&this.#t[e]?.data===void 0)}#p(t){let e=new Map;this.#i.forEach(r=>{let i=r.options.queryHash;if(!i)return;let n=e.get(i);n?n.push(r):e.set(i,[r])});let s=[];return t.forEach(r=>{let i=this.#e.defaultQueryOptions(r),n=e.get(i.queryHash)?.shift()??new D(this.#e,i);s.push({defaultedQueryOptions:i,observer:n})}),s}#d(t,e){let s=this.#i.indexOf(t);s!==-1&&(this.#t=this.#t.slice(),this.#t[s]=e,this.#m())}#m(){if(this.hasListeners()){let t=this.#f(),e=this.#n,s=t?e:this.#l(this.#h(this.#t,this.#a),this.#r?.combine);(t||e!==s)&&m.batch(()=>{this.listeners.forEach(r=>{r(this.#t)})})}}};var Nt=class extends C{#e;constructor(t={}){super(),this.config=t,this.#e=new Map}build(t,e,s){let r=e.queryKey,i=e.queryHash??Y(r,e),n=this.get(i);return n||(n=new Mt({client:t,queryKey:r,queryHash:i,options:t.defaultQueryOptions(e),state:s,defaultOptions:t.getQueryDefaults(r)}),this.add(n)),n}add(t){this.#e.has(t.queryHash)||(this.#e.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){this.#e.get(t.queryHash)===t&&(t.destroy(),this.#e.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){m.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#e.get(t)}getAll(){return[...this.#e.values()]}find(t){let e={exact:!0,...t};return this.getAll().find(s=>at(e,s))}findAll(t={}){let e=this.getAll();return Object.keys(t).length>0?e.filter(s=>at(t,s)):e}notify(t){m.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){m.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){m.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}};var De=class{#e;#t;#s;#r;#i;#n;#o;#u;constructor(t={}){this.#e=t.queryCache||new Nt,this.#t=t.mutationCache||new It,this.#s=t.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#n=0}mount(){this.#n++,this.#n===1&&(this.#o=L.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#u=B.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#n--,this.#n===0&&(this.#o?.(),this.#o=void 0,this.#u?.(),this.#u=void 0)}isFetching(t){return this.#e.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#t.findAll({...t,status:"pending"}).length}getQueryData(t){let e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state.data}ensureQueryData(t){let e=this.defaultQueryOptions(t),s=this.#e.build(this,e),r=s.state.data;return r===void 0?this.fetchQuery(t):(t.revalidateIfStale&&s.isStaleByTime(g(e.staleTime,s))&&this.prefetchQuery(e),Promise.resolve(r))}getQueriesData(t){return this.#e.findAll(t).map(({queryKey:e,state:s})=>[e,s.data])}setQueryData(t,e,s){let r=this.defaultQueryOptions({queryKey:t}),i=this.#e.get(r.queryHash)?.state.data,n=Bt(e,i);if(n!==void 0)return this.#e.build(this,r).setData(n,{...s,manual:!0})}setQueriesData(t,e,s){return m.batch(()=>this.#e.findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,e,s)]))}getQueryState(t){let e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state}removeQueries(t){let e=this.#e;m.batch(()=>{e.findAll(t).forEach(s=>{e.remove(s)})})}resetQueries(t,e){let s=this.#e;return m.batch(()=>{let r=s.findAll(t),i=new Set(r);return r.forEach(n=>{n.reset()}),this.refetchQueries({type:"active",predicate:n=>i.has(n)},e)})}cancelQueries(t,e={}){let s={revert:!0,...e},r=m.batch(()=>this.#e.findAll(t).map(i=>i.cancel(s)));return Promise.all(r).then(y).catch(y)}invalidateQueries(t,e={}){return m.batch(()=>(this.#e.findAll(t).forEach(s=>{s.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},e)))}refetchQueries(t,e={}){let s={...e,cancelRefetch:e.cancelRefetch??!0},r=m.batch(()=>this.#e.findAll(t).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let n=i.fetch(void 0,s),a=i.state.fetchStatus==="paused";return(!s.throwOnError||a)&&(n=n.catch(y)),a?Promise.resolve():n}));return Promise.all(r).then(y)}async query(t){let e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);let s=this.#e.build(this,e),r=s.isStaleByTime(g(e.staleTime,s))?await s.fetch(e):s.state.data,i=e.select;return i?i(r):r}fetchQuery(t){let e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);let s=this.#e.build(this,e);return s.isStaleByTime(g(e.staleTime,s))?s.fetch(e):Promise.resolve(s.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(y).catch(y)}infiniteQuery(t){return t._type="infinite",this.query(t)}fetchInfiniteQuery(t){return t._type="infinite",this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(y).catch(y)}ensureInfiniteQueryData(t){return t._type="infinite",this.ensureQueryData(t)}resumePausedMutations(){return B.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#s}setDefaultOptions(t){this.#s=t}setQueryDefaults(t,e){this.#r.set(T(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){let e=[...this.#r.values()],s={};return e.forEach(r=>{A(t,r.queryKey)&&Object.assign(s,r.defaultOptions)}),s}setMutationDefaults(t,e){this.#i.set(T(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){let e=[...this.#i.values()],s={};return e.forEach(r=>{A(t,r.mutationKey)&&Object.assign(s,r.defaultOptions)}),s}defaultQueryOptions(t){if(t._defaulted)return t;let e={...this.#s.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=Y(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===P&&(e.enabled=!1),e}defaultMutationOptions(t){return t?._defaulted?t:{...this.#s.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}};function xe({streamFn:t,refetchMode:e="reset",reducer:s=(i,n)=>ct(i,n),initialValue:r=[]}){return async i=>{let n=i[_];if(n?.aborted)return r;let a=i.client.getQueryCache().find({queryKey:i.queryKey,exact:!0}),o=!!a&&a.isFetched();o&&e==="reset"&&a.setState({...a.resetState,fetchStatus:"fetching"});let c=r,u=!1,h=lt({client:i.client,meta:i.meta,queryKey:i.queryKey,pageParam:i.pageParam,direction:i.direction},()=>i.signal,()=>u=!0,n),l=()=>u||n?.aborted===!0,p=await t(h),b=o&&e==="replace";for await(let f of p){if(l())break;b?c=s(c,f):i.client.setQueryData(i.queryKey,d=>s(d===void 0?r:d,f))}b&&!l()&&i.client.setQueryData(i.queryKey,c);let O=i.client.getQueryData(i.queryKey);return O===void 0?r:O}}var Te=Symbol(),qe=Symbol(),Ie=Symbol();var V=M(x(),1),ke=({children:t,options:e={},state:s,queryClient:r})=>{let i=Q(r),n=V.useRef(e);V.useEffect(()=>{n.current=e});let a=V.useMemo(()=>{if(s){if(typeof s!="object")return;let o=i.getQueryCache(),c=s.queries||[],u=[],h=[];for(let l of c){let p=o.get(l.queryHash);p?(l.state.dataUpdatedAt>p.state.dataUpdatedAt||l.promise&&p.state.status!=="pending"&&p.state.fetchStatus!=="fetching"&&l.dehydratedAt>p.state.dataUpdatedAt)&&h.push(l):u.push(l)}if(u.length>0&&ft(i,{queries:u},n.current),h.length>0)return h}},[i,s]);return V.useEffect(()=>{a&&ft(i,{queries:a},n.current)},[i,a]),t};var yt=M(x(),1),ue=yt.createContext(!1),st=()=>yt.useContext(ue),Ae=ue.Provider;var J=M(x(),1),ce=M(Kt(),1);function he(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var le=J.createContext(he()),rt=()=>J.useContext(le),Ne=({children:t})=>{let[e]=J.useState(()=>he());return(0,ce.jsx)(le.Provider,{value:e,children:typeof t=="function"?t(e):t})};var fe=M(x(),1),gt=(t,e,s)=>{let r=s?.state.status==="error"&&typeof t.throwOnError=="function"?$(t.throwOnError,[s.state.error,s]):t.throwOnError;(t.suspense||r)&&(e.isReset()||(t.retryOnMount=!1))},vt=t=>{fe.useEffect(()=>{t.clearReset()},[t])},bt=({result:t,errorResetBoundary:e,throwOnError:s,query:r,suspense:i})=>t.isError&&!e.isReset()&&!t.isFetching&&r&&(i&&t.data===void 0||$(s,[t.error,r]));var Z=(t,e)=>e.state.data===void 0,Ot=t=>{if(t.suspense){let s=i=>i==="static"?i:Math.max(i??1e3,1e3),r=t.staleTime;t.staleTime=typeof r=="function"?(...i)=>s(r(...i)):s(r),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},it=(t,e)=>t?.suspense&&e.isPending,St=(t,e,s)=>e.fetchOptimistic(t).catch(()=>{s.clearReset()});var q=M(x(),1);function Ut({queries:t,...e},s){let r=Q(s),i=st(),n=rt(),a=e.subscribed!==!1,o=q.useMemo(()=>t.map(f=>{let d=r.defaultQueryOptions(f);return d._optimisticResults=i?"isRestoring":a?"optimistic":void 0,d}),[t,r,i,a]);o.forEach(f=>{Ot(f);let d=r.getQueryCache().get(f.queryHash);gt(f,n,d)}),vt(n);let[c]=q.useState(()=>new At(r,o,e)),[u,h,l]=c.getOptimisticResult(o,e.combine);q.useEffect(()=>{c.setQueries(o,e)},[o,e,c]);let p=!i&&a;q.useSyncExternalStore(q.useCallback(f=>p?c.subscribe(m.batchCalls(f)):y,[c,p]),()=>c.getCurrentResult(),()=>c.getCurrentResult());let b=u.some((f,d)=>it(o[d],f))?u.flatMap((f,d)=>{let v=o[d];if(v&&it(v,f)){let S=new D(r,v);return St(v,S,n)}return[]}):[];if(b.length>0)throw Promise.all(b);let O=u.find((f,d)=>{let v=o[d];return v&&bt({result:f,errorResetBoundary:n,throwOnError:v.throwOnError,query:r.getQueryCache().get(v.queryHash),suspense:v.suspense})});if(O)throw O.error;return h(l())}var K=M(x(),1);function j(t,e,s){if(typeof t!="object"||Array.isArray(t))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');let r=st(),i=rt(),n=Q(s),a=n.defaultQueryOptions(t),o=n.getQueryCache().get(a.queryHash);a.queryFn||console.error(`[${a.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`);let c=t.subscribed!==!1;a._optimisticResults=r?"isRestoring":c?"optimistic":void 0,Ot(a),gt(a,i,o),vt(i);let[u]=K.useState(()=>new e(n,a)),h=u.getOptimisticResult(a);K.useEffect(()=>{u.setOptions(a)},[a,u]);let l=!r&&c;if(K.useSyncExternalStore(K.useCallback(p=>{let b=l?u.subscribe(m.batchCalls(p)):y;return u.updateResult(),b},[u,l]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),it(a,h))throw St(a,u,i);if(bt({result:h,errorResetBoundary:i,throwOnError:a.throwOnError,query:o,suspense:a.suspense}))throw h.error;return a.notifyOnChangeProps?h:u.trackResult(h)}function Ue(t,e){return j(t,D,e)}function Ke(t,e){return t.queryFn===P&&console.error("skipToken is not allowed for useSuspenseQuery"),j({...t,enabled:!0,suspense:!0,throwOnError:Z,placeholderData:void 0},D,e)}function je(t,e){return t.queryFn===P&&console.error("skipToken is not allowed for useSuspenseInfiniteQuery"),j({...t,enabled:!0,suspense:!0,throwOnError:Z,placeholderData:void 0},et,e)}function _e(t,e){return Ut({...t,queries:t.queries.map(s=>(s.queryFn===P&&console.error("skipToken is not allowed for useSuspenseQueries"),{...s,suspense:!0,throwOnError:Z,enabled:!0,placeholderData:void 0}))},e)}function He(t,e){let s=Q(e);s.getQueryState(t.queryKey)||s.query(t).catch(y)}function Le(t,e){let s=Q(e);s.getQueryState(t.queryKey)||s.infiniteQuery(t).catch(y)}function Be(t){return t}function Ve(t){return t}var Rt=M(x(),1);function ze(t,e){let s=Q(e),r=s.getQueryCache();return Rt.useSyncExternalStore(Rt.useCallback(i=>r.subscribe(m.batchCalls(i)),[r]),()=>s.isFetching(t),()=>s.isFetching(t))}var X=M(x(),1);function Ge(t,e){let s=Q(e);return de({filters:{...t,status:"pending"}},s).length}function $e(){let t;return(e,s)=>{let r=[],i;return()=>{let n=e.findAll(s.filters),a=n.flatMap(o=>[o,o.state]);return(!i||a.length!==r.length||a.some((o,c)=>!Object.is(o,r[c])))&&(r=a,i=N(t,n.map(o=>s.select?s.select(o):o.state)),t=i),i}}}function de(t={},e){let s=Q(e).getMutationCache(),[r]=X.useState(()=>$e()),i=r(s,t);return X.useSyncExternalStore(X.useCallback(n=>s.subscribe(m.batchCalls(n)),[s]),i,i)}var I=M(x(),1);function We(t,e){let s=Q(e),[r]=I.useState(()=>new kt(s,t));I.useEffect(()=>{r.setOptions(t)},[r,t]);let i=I.useSyncExternalStore(I.useCallback(a=>r.subscribe(m.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),n=I.useCallback((...a)=>{r.mutate(a[0],a[1]).catch(y)},[r]);if(i.error&&$(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:n,mutateAsync:i.mutate}}function Je(t){return t}function Ze(t,e){return j(t,et,e)}export{Qt as a,Q as b,me as c,F as d,Et as e,y as f,at as g,ut as h,T as i,A as j,N as k,ve as l,P as m,$ as n,be as o,L as p,Wt as q,Jt as r,Zt as s,we as t,ft as u,Xt as v,m as w,B as x,W as y,Me as z,Mt as A,D as B,et as C,Tt as D,It as E,kt as F,At as G,Nt as H,De as I,xe as J,Te as K,qe as L,Ie as M,ke as N,st as O,Ae as P,rt as Q,Ne as R,Ut as S,Ue as T,Ke as U,je as V,_e as W,He as X,Le as Y,Be as Z,Ve as _,ze as $,Ge as aa,de as ba,We as ca,Je as da,Ze as ea};
2
+ //# sourceMappingURL=chunk-VSM3ZOBU.js.map
@@ -0,0 +1,2 @@
1
+ import{a as h}from"./chunk-SFI7YWVR.js";import{b as L}from"./chunk-NZ73KS2Y.js";import{a as z}from"./chunk-CT4EH2K2.js";import{b as _}from"./chunk-JIAVZ3V7.js";import{a as P}from"./chunk-IJQ26FTX.js";import{c as N}from"./chunk-KVMUXFPB.js";var R=N(P(),1);var y=N(P(),1),D=y.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});D.displayName="CompositeListContext";function T(){return y.useContext(D)}var j=N(z(),1);function Z(c){let{children:r,elementsRef:e,labelsRef:s,onMapChange:p}=c,n=h(p),[,u]=R.useState(0),a=_(F).current,x=_(B).current,M=R.useRef(0),f=R.useRef(!0),v=R.useRef(null),E=R.useRef(null),O=h(()=>{f.current||(f.current=!0,u(t=>t+1))}),C=h((t,d)=>{x.set(t,d),O()}),S=h(t=>{x.delete(t),O()}),l=h(t=>{let d=new Map;return e.current.length=0,s&&(s.current.length=0),t.forEach(o=>{d.set(o.element,{...o.registration.metadata??{},index:o.index}),e.current[o.index]=o.element,s&&(s.current[o.index]=o.registration.label!==void 0?o.registration.label:o.registration.textRef?.current?.textContent??o.element.textContent)}),M.current=e.current.length,d});function I(t){if(E.current?.disconnect(),E.current=null,typeof MutationObserver!="function"||t.length<2)return;let d=new MutationObserver(i=>{if(!H(i))return;let g=null;for(let m of t)if(m.isConnected){if(g&&A(g,m)>0){d.disconnect(),O();return}g=m}});E.current=d;let o=new Set;for(let i=1;i<t.length;i+=1){let g=q(t[i-1],t[i]);g&&o.add(g)}o.forEach(i=>d.observe(i,{childList:!0}))}let U=h(()=>{let[t,d]=G(x),o=l(t),i=v.current,g=!i||i.length!==t.length||t.some((m,W)=>{let w=i[W];return m.index!==w.index||m.element!==w.element||m.registration.index!==w.registration.index||m.registration.metadata!==w.registration.metadata});I(d),v.current=t,f.current=!1,g&&(a.forEach(m=>m(o)),n(o))});L(()=>(!f.current&&v.current&&l(v.current),()=>{e.current=[],s&&(s.current=[])}),[e,s,l]),L(()=>{f.current&&U()}),L(()=>()=>{E.current?.disconnect(),f.current=!0},[]);let k=h(t=>(a.add(t),()=>{a.delete(t)})),V=R.useMemo(()=>({register:C,unregister:S,subscribeMapChange:k,nextIndexRef:M}),[C,S,k,M]);return(0,j.jsx)(D.Provider,{value:V,children:r})}function B(){return new Map}function F(){return new Set}function G(c){let r=new Set,e=[],s=[];c.forEach((n,u)=>{if(!u.isConnected)return;let a=n.index,x={index:a??-1,element:u,registration:n};a===null?s.push(x):a>=0&&(r.add(a),e.push(x))});let p=0;return s.sort((n,u)=>A(n.element,u.element)),s.forEach(n=>{for(;r.has(p);)p+=1;n.index=p,e.push(n),p+=1}),r.size>0&&e.sort((n,u)=>n.index-u.index),[e,s.map(n=>n.element)]}function q(c,r){let e=c.parentElement;for(;e&&!e.contains(r);)e=e.parentElement;return e}function H(c){for(let r of c)for(let e=0;e<r.removedNodes.length;e+=1)if(r.removedNodes[e].isConnected)return!0;return!1}function A(c,r){return c.nextElementSibling===r?-1:r.nextElementSibling===c?1:c.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}var b=N(P(),1);function ne(c={}){let{guess:r,label:e,metadata:s,textRef:p,index:n}=c,{register:u,unregister:a,subscribeMapChange:x,nextIndexRef:M}=T(),f=b.useRef(-1),[v,E]=b.useState(n==null&&r?()=>{if(f.current===-1){let l=M.current;M.current+=1,f.current=l}return f.current}:-1),O=n??v,C=b.useRef(null),S=b.useCallback(l=>{let I=C.current;I&&a(I),C.current=l,l&&u(l,{metadata:s??null,index:n??null,label:e,textRef:p})},[n,u,a,s,e,p]);return L(()=>{if(n==null)return x(l=>{let I=C.current?l.get(C.current)?.index:null;I!=null&&E(I)})},[n,x]),{ref:S,index:O}}export{T as a,Z as b,ne as c};
2
+ //# sourceMappingURL=chunk-WLBNJ4K3.js.map
@@ -0,0 +1,2 @@
1
+ import{a as I}from"./chunk-4E74H7FZ.js";import{a as R,d as y}from"./chunk-EGZKG2B2.js";import{d as x}from"./chunk-MQ67DRDE.js";import{l as a}from"./chunk-JIAVZ3V7.js";import{a as p}from"./chunk-IJQ26FTX.js";import{c}from"./chunk-KVMUXFPB.js";var S=c(p(),1);function D(r){let t=S.useRef(!0);t.current&&(t.current=!1,r())}var O=(r,t)=>Object.is(r,t);function u(r,t,n){return r==null||t==null?Object.is(r,t):n(r,t)}function _(r,t,n){return Array.isArray(r)&&Array.isArray(t)?!I(r,t,(e,o)=>u(e,o,n)):r!==t}function d(r,t,n){return r?r.some(e=>e===void 0?!1:u(t,e,n)):!1}function v(r,t,n){return r?r.findIndex(e=>e===void 0?!1:u(e,t,n)):-1}function M(r,t){if(t!==O)return e=>d(r,e,t);let n=new Set(r);return n.delete(void 0),e=>n.has(e)&&(e!==0||r.some(o=>Object.is(e,o)))}function j(r,t,n,e){let o=e&&Array.isArray(t)?r.findIndex(M(t,n)):v(r,t,n);return o===-1?null:o}function k(r,t,n,e,o,i){return d(e,t,o)?i!=null&&r>i&&d(e,n[i],o)?i:r:r===i?j(n,e,o,!0):i}function z(r,t,n){return r.filter(e=>!u(t,e,n))}var f=c(p(),1);var q=f.memo(f.forwardRef(function(t,n){let{render:e,className:o,style:i,keepMounted:E,selected:s,...m}=t,l=f.useRef(null),{transitionStatus:A,setMounted:N}=R(s),h=a("span",t,{ref:[n,l],state:{selected:s,transitionStatus:A},props:[{"aria-hidden":!0,children:"\u2714\uFE0F"},m],stateAttributesMapping:x});return y({batch:!0,enabled:!s,open:s,ref:l,onComplete(){s||N(!1)}}),h}));q.displayName="ItemIndicator";var b=c(p(),1);var w=b.forwardRef(function(t,n){let{className:e,render:o,orientation:i="horizontal",style:E,...s}=t;return a("div",t,{state:{orientation:i},ref:n,props:[{role:"presentation"},s]})});w.displayName="ListboxSeparator";export{D as a,O as b,u as c,_ as d,d as e,v as f,j as g,k as h,z as i,q as j,w as k};
2
+ //# sourceMappingURL=chunk-WRHZYADJ.js.map
@@ -0,0 +1,2 @@
1
+ import{i}from"./chunk-QFN6XL4O.js";import{f as a,o as c}from"./chunk-LYT7LQS3.js";function g(t){let f=c(t),o=parseFloat(f.width)||0,s=parseFloat(f.height)||0,e=a(t),h=e?t.offsetWidth:o,r=e?t.offsetHeight:s;return(i(o)!==h||i(s)!==r)&&(o=h,s=r),{width:o,height:s}}export{g as a};
2
+ //# sourceMappingURL=chunk-WT34MBTN.js.map
@@ -0,0 +1,2 @@
1
+ import{b as K}from"./chunk-XIXCIQKJ.js";import{a as H,d as Q}from"./chunk-EGZKG2B2.js";import{d as J}from"./chunk-MQ67DRDE.js";import{a as $}from"./chunk-SFI7YWVR.js";import{b}from"./chunk-NZ73KS2Y.js";import{a as V}from"./chunk-CT4EH2K2.js";import{d as F,l as A}from"./chunk-JIAVZ3V7.js";import{a as X}from"./chunk-7TG23VIV.js";import{a as g}from"./chunk-SVQCDOZ3.js";import{a as x}from"./chunk-IJQ26FTX.js";import{b as lt,c as m}from"./chunk-KVMUXFPB.js";var v=m(x());var h={};lt(h,{Fallback:()=>B,Image:()=>j,Root:()=>D});var z=m(x(),1);var L=m(x(),1),w=L.createContext(void 0);w.displayName="AvatarRootContext";function M(){let e=L.useContext(w);if(e===void 0)throw new Error("Base UI: AvatarRootContext is missing. Avatar parts must be placed within <Avatar.Root>.");return e}var R={imageLoadingStatus:()=>null};var Y=m(V(),1),D=z.forwardRef(function(t,a){let{className:r,render:l,style:n,...s}=t,[i,d]=z.useState("idle"),o={imageLoadingStatus:i},c=z.useMemo(()=>({imageLoadingStatus:i,setImageLoadingStatus:d}),[i,d]),f=A("span",t,{state:o,ref:a,props:s,stateAttributesMapping:R});return(0,Y.jsx)(w.Provider,{value:c,children:f})});D.displayName="AvatarRoot";var y=m(x(),1);var tt=m(x(),1);function et(e,{referrerPolicy:t,crossOrigin:a,sizes:r,srcSet:l},n){let s=tt.useState("idle"),i=s[1];return b(()=>{if(!n)return F;if(!e&&!l)return i("error"),F;let d=!0,o=new window.Image,c=f=>()=>{d&&i(f)};return i("loading"),o.onload=c("loaded"),o.onerror=c("error"),t&&(o.referrerPolicy=t),o.crossOrigin=a??null,r&&(o.sizes=r),l&&(o.srcset=l),e&&(o.src=e),o.complete&&i(o.naturalWidth>0?"loaded":"error"),()=>{d=!1}},[n,e,l,r,a,t,i]),s}var ut={...R,...J},j=y.forwardRef(function(t,a){let{className:r,render:l,onLoadingStatusChange:n,keepMounted:s=!1,style:i,sizes:d,srcSet:o,src:c,...f}=t,{setImageLoadingStatus:C}=M(),[p,S]=et(c,t,!s),E=p==="loaded",{mounted:ot,transitionStatus:G,setMounted:O}=H(E),P=y.useRef(null),T=y.useRef(!0);b(()=>{if(!s)return;let I=T.current;T.current=!1;let _=P.current;if(!_)return;if(!_.complete){S("loading");return}let Z=_.naturalWidth>0?"loaded":"error";S(Z),Z==="loaded"&&I&&O(!0)},[s,c,o,d,f.crossOrigin,f.referrerPolicy,l,S,O]);let nt=s?{"data-loading":p==="loading"?"":void 0,"data-error":p==="error"?"":void 0,"aria-hidden":p!=="loaded"||void 0,onLoad(){S("loaded")},onError(){S("error")}}:void 0,W=$(I=>{n?.(I),C(I)});b(()=>{p!=="idle"&&W(p)},[p,W]),b(()=>()=>C("idle"),[C]),Q({enabled:!E,open:E,ref:P,onComplete(){E||O(!1)}});let st={imageLoadingStatus:p,transitionStatus:s&&G==="ending"?void 0:G},q=s||ot,k={};d!==void 0&&(k.sizes=d),o!==void 0&&(k.srcSet=o),c!==void 0&&(k.src=c);let it=A("img",t,{state:st,ref:[a,P],props:[nt,f,k],stateAttributesMapping:ut,enabled:q});return q?it:null});j.displayName="AvatarImage";var N=m(x(),1);var B=N.forwardRef(function(t,a){let{className:r,render:l,delay:n=0,style:s,...i}=t,{imageLoadingStatus:d}=M(),[o,c]=N.useState(n===0),f=K();return N.useEffect(()=>(n>0?f.start(n,()=>c(!0)):c(!0),f.clear),[f,n]),A("span",t,{state:{imageLoadingStatus:d},ref:a,props:i,stateAttributesMapping:R,enabled:d!=="loaded"&&(n===0||o)})});B.displayName="AvatarFallback";var u=m(V()),at=X("group/avatar relative flex shrink-0 rounded-full select-none after:pointer-events-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken dark:after:mix-blend-lighten",{variants:{size:{xs:"size-5 text-[9px]",sm:"size-6 text-[10px]",default:"size-8 text-xs",lg:"size-10 text-sm",xl:"size-12 text-base"}},defaultVariants:{size:"default"}}),U=v.createContext(null);function dt({className:e,size:t,...a}){let r=v.useContext(U),l=t||r||"default";return(0,u.jsx)(h.Root,{"data-slot":"avatar","data-size":l,className:g(at({size:l}),e),...a})}function ct({className:e,...t}){return(0,u.jsx)(h.Image,{"data-slot":"avatar-image",className:g("aspect-square size-full rounded-full object-cover",e),...t})}function ft({className:e,...t}){return(0,u.jsx)(h.Fallback,{"data-slot":"avatar-fallback",className:g("flex size-full items-center justify-center rounded-full bg-muted font-semibold tracking-tight text-muted-foreground","[[data-slot=avatar-group]>[data-slot=avatar]:not(:last-child)_&]:pr-[calc(var(--avatar-group-overlap)+2px)] [[data-slot=avatar-group]>[data-slot=avatar]:not(:last-child)_&]:tracking-tighter",e),...t})}var rt={online:{className:"bg-emerald-500",label:"Online"},away:{className:"bg-amber-500",label:"Away"},busy:{className:"bg-destructive",label:"Busy"},offline:{className:"bg-muted-foreground/60",label:"Offline"}};function pt({className:e,status:t,label:a,children:r,...l}){let n=t?rt[t]:null,s=a!==void 0?a:n?n.label:void 0;return(0,u.jsxs)("span",{"data-slot":"avatar-badge","data-status":t,className:g("absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-primary text-primary-foreground ring-2 ring-background select-none","group-data-[size=xs]/avatar:size-1.5 group-data-[size=sm]/avatar:size-2 group-data-[size=default]/avatar:size-2.5 group-data-[size=lg]/avatar:size-3 group-data-[size=xl]/avatar:size-3.5","[&>svg]:size-[70%]",n?n.className:"",e),...l,children:[r,s?(0,u.jsx)("span",{className:"sr-only",children:s}):null]})}function mt(e,t){let a=Array.isArray(e)?e:[];if(!t||t<=0||a.length<=t)return{visible:a,hidden:[],overflow:0};let r=Math.max(1,t-1);return{visible:a.slice(0,r),hidden:a.slice(r),overflow:a.length-r}}function Jt({className:e,children:t,max:a,size:r,renderCount:l,...n}){let s=v.Children.toArray(t).filter(Boolean),{visible:i,hidden:d,overflow:o}=mt(s,a);return(0,u.jsx)(U.Provider,{value:r||null,children:(0,u.jsxs)("div",{"data-slot":"avatar-group","data-size":r||"default",className:g("group/avatar-group flex items-center -space-x-(--avatar-group-overlap) *:data-[slot=avatar]:ring-2 *:data-[slot=avatar]:ring-background","[--avatar-group-overlap:7px] data-[size=xs]:[--avatar-group-overlap:3px] data-[size=sm]:[--avatar-group-overlap:4px] data-[size=lg]:[--avatar-group-overlap:9px] data-[size=xl]:[--avatar-group-overlap:11px]","data-[size=xs]:*:text-[8px] data-[size=sm]:*:text-[9px]",e),...n,children:[i,o>0?l?l(o,d):(0,u.jsxs)(gt,{size:r,children:["+",o]}):null]})})}function gt({className:e,size:t,children:a,...r}){let l=v.useContext(U),n=t||l||"default",s=typeof a=="string"?a:"",i=/^\+(\d+)$/.exec(s);return(0,u.jsxs)("span",{"data-slot":"avatar-group-count",className:g(at({size:n}),"items-center justify-center bg-muted font-medium text-muted-foreground ring-2 ring-background after:hidden",e),...r,children:[(0,u.jsx)("span",{"aria-hidden":i?"true":void 0,children:a}),i?(0,u.jsxs)("span",{className:"sr-only",children:[i[1]," more"]}):null]})}function vt(e){let t=String(e||"").split(/[\s,()[\]{}<>"/\\|]+/).filter(a=>/^[A-Za-z0-9À-￿]/.test(a));return t.length?t.length===1?t[0].slice(0,2).toUpperCase():(t[0][0]+t[t.length-1][0]).toUpperCase():"?"}function Kt({name:e,src:t,initials:a,status:r,size:l,labelled:n=!1,className:s,title:i,...d}){let o=r?rt[r]:null,c=n?{role:"img","aria-label":[e,o?o.label:""].filter(Boolean).join(", ")}:{"aria-hidden":!0};return(0,u.jsxs)(dt,{size:l,className:s,title:i===void 0?e:i,...c,...d,children:[t?(0,u.jsx)(ct,{src:t,alt:""}):null,(0,u.jsx)(ft,{children:a||vt(e)}),r?(0,u.jsx)(pt,{status:r,label:n?"":void 0}):null]})}export{at as a,dt as b,ct as c,ft as d,rt as e,pt as f,mt as g,Jt as h,gt as i,vt as j,Kt as k};
2
+ //# sourceMappingURL=chunk-X34AFUS2.js.map
@@ -0,0 +1,2 @@
1
+ import{a as e}from"./chunk-LTVKSGLG.js";import{Ma as g}from"./chunk-OXJ6LWKI.js";import{b as d}from"./chunk-CWDPAB6V.js";import{pb as u}from"./chunk-IQ2XSDFU.js";import{a as s}from"./chunk-CT4EH2K2.js";import{a as l}from"./chunk-SVQCDOZ3.js";import{a as m}from"./chunk-IJQ26FTX.js";import{c as n}from"./chunk-KVMUXFPB.js";var p=n(m());var o=n(s());function P({...a}){return(0,o.jsx)(e.Root,{"data-slot":"dialog",...a})}function N({...a}){return(0,o.jsx)(e.Trigger,{"data-slot":"dialog-trigger",...a})}function c({...a}){return(0,o.jsx)(e.Portal,{container:g(),"data-slot":"dialog-portal",...a})}function h({...a}){return(0,o.jsx)(e.Close,{"data-slot":"dialog-close",...a})}function f({className:a,...t}){return(0,o.jsx)(e.Backdrop,{"data-slot":"dialog-overlay",className:l("fixed inset-0 isolate z-50 bg-black/20 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",a),...t})}function y({className:a,children:t,showCloseButton:r=!0,...i}){return(0,o.jsxs)(c,{children:[(0,o.jsx)(f,{}),(0,o.jsxs)(e.Popup,{"data-slot":"dialog-content",className:l("fixed top-1/2 left-1/2 z-50 grid max-h-[calc(100dvh-2rem)] w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 overflow-y-auto rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",a),...i,children:[t,r?(0,o.jsxs)(e.Close,{"data-slot":"dialog-close",render:(0,o.jsx)(d,{variant:"ghost",className:"absolute top-2 right-2",size:"icon-sm"}),children:[(0,o.jsx)(u,{}),(0,o.jsx)("span",{className:"sr-only",children:"Close"})]}):null]})]})}function w({className:a,...t}){return(0,o.jsx)("div",{"data-slot":"dialog-header",className:l("flex flex-col gap-2 pr-6",a),...t})}function z({className:a,showCloseButton:t=!1,children:r,...i}){return(0,o.jsxs)("div",{"data-slot":"dialog-footer",className:l("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end",a),...i,children:[r,t?(0,o.jsx)(e.Close,{render:(0,o.jsx)(d,{variant:"outline"}),children:"Close"}):null]})}function k({className:a,...t}){return(0,o.jsx)(e.Title,{"data-slot":"dialog-title",className:l("text-base leading-none font-medium",a),...t})}function T({className:a,...t}){return(0,o.jsx)(e.Description,{"data-slot":"dialog-description",className:l("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",a),...t})}export{P as a,N as b,c,h as d,f as e,y as f,w as g,z as h,k as i,T as j};
2
+ //# sourceMappingURL=chunk-XE5RQ73V.js.map
@@ -0,0 +1,2 @@
1
+ function i(t){return t==null||t.hasAttribute("disabled")||t.getAttribute("aria-disabled")==="true"}export{i as a};
2
+ //# sourceMappingURL=chunk-XGLVZEGD.js.map
@@ -0,0 +1,2 @@
1
+ import{a as c}from"./chunk-DR47HKIK.js";import{b as s}from"./chunk-JIAVZ3V7.js";var t=0,r=class e{static create(){return new e}currentId=t;start(i,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=t,n()},i)}isStarted(){return this.currentId!==t}clear=()=>{this.currentId!==t&&(clearTimeout(this.currentId),this.currentId=t)};disposeEffect=()=>this.clear};function a(){let e=s(r.create).current;return c(e.disposeEffect),e}export{r as a,a as b};
2
+ //# sourceMappingURL=chunk-XIXCIQKJ.js.map
@@ -0,0 +1,2 @@
1
+ import{ka as g,la as m}from"./chunk-OXJ6LWKI.js";import{a as O}from"./chunk-RCNX6LVJ.js";import{a as p,c as l}from"./chunk-FTWKUXER.js";import{a as h}from"./chunk-2L7NK6SJ.js";import{d,f as i}from"./chunk-JIAVZ3V7.js";import{a as w}from"./chunk-IJQ26FTX.js";import{c}from"./chunk-KVMUXFPB.js";var f=class{attachedStores=[];attachedStoreValue=null;storeListeners=new Set;constructor(t,o,n=!0){this.fallbackStore=t,this.componentName=o,this.throwOnMissingTrigger=n}get attachedStore(){return this.attachedStoreValue}get store(){return this.attachedStoreValue??this.fallbackStore}get serverStore(){return this.fallbackStore}subscribeStore(t){return this.storeListeners.add(t),()=>{this.storeListeners.delete(t)}}attachStore(t){if(this.attachedStores.push(t),this.setActiveStore(t),this.attachedStores.length>1){let o=this;(o.overlapWarningFrame??=h.create()).request(()=>{this.attachedStores.length>1&&console.warn("Base UI: A handle is attached to more than one mounted root at the same time. The most recently mounted root takes over and the previous one stops being controlled by the handle. A handle should be used by a single root that stays mounted for the lifetime of the handle.")})}return()=>{let o=this.attachedStores.lastIndexOf(t);o!==-1&&this.attachedStores.splice(o,1),this.setActiveStore(this.attachedStores[this.attachedStores.length-1]??null)}}setActiveStore(t){this.attachedStoreValue!==t&&(this.attachedStoreValue=t,this.storeListeners.forEach(o=>{o()}))}openByTrigger(t){let o=this.attachedStore;if(o===null){console.warn(`Base UI: ${this.componentName}Handle.open() was called while no root using this handle is mounted. The call was ignored; mount a root with this handle before opening it imperatively.`);return}let n;if(t){for(let a=this.attachedStores.length-1;a>=0&&!n;a-=1)n=this.attachedStores[a].context.triggerElements.getById(t);n??=this.fallbackStore.context.triggerElements.getById(t)}if(t&&!n){if(this.throwOnMissingTrigger)throw new Error(`Base UI: ${this.componentName}Handle.open() was called with the trigger id "${t}", but no matching trigger is registered with this handle. An anchored popup cannot open without a trigger to anchor to. Pass the id of a mounted ${this.componentName}.Trigger that has this handle set on its "handle" prop.`);console.warn(`Base UI: ${this.componentName}Handle.open: No trigger found with id "${t}". The popup will open, but the trigger will not be associated with it.`)}o.setOpen(!0,p(l.imperativeAction,void 0,n))}closePopup(){let t=this.attachedStore;if(t===null){console.warn(`Base UI: ${this.componentName}Handle.close() was called while no root using this handle is mounted. The call was ignored.`);return}t.setOpen(!1,p(l.imperativeAction))}};var u=c(w(),1),S=c(O(),1);function I(e){let t=u.useCallback(n=>e===void 0?d:e.subscribeStore(n),[e]),o=u.useCallback(()=>e===void 0?void 0:e.store,[e]);return(0,S.useSyncExternalStore)(t,o,()=>e?.serverStore)}function V(e,t,o=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new m({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:o,onOpenChange:void 0}),floatingId:t,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,openedWithoutTrigger:!1,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:i,inactiveTriggerProps:i,popupProps:i}}var r=e=>e.triggerIdProp??e.activeTriggerId,s=e=>e.openProp??e.open,v=e=>(e.popupElement?.id??e.floatingId)||void 0;function E(e,t){return t!==void 0&&s(e)&&r(e)===t}function b(e,t){return E(e,t)?!0:t!==void 0&&s(e)&&r(e)==null&&!e.openedWithoutTrigger&&e.triggerCount===1}var R={open:s,mounted:e=>e.mounted,transitionStatus:e=>s(e)&&!e.mounted?"starting":e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:r,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:v,isTriggerActive:(e,t)=>t!==void 0&&r(e)===t,isOpenedByTrigger:(e,t)=>E(e,t),isMountedByTrigger:(e,t)=>t!==void 0&&r(e)===t&&e.mounted,triggerProps:(e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,t)=>b(e,t)?v(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};var T=class extends g{setState(t){}update(t){}set(t,o){}notifyAll(){}};export{f as a,V as b,R as c,I as d,T as e};
2
+ //# sourceMappingURL=chunk-Z76KXEPD.js.map
@@ -0,0 +1,2 @@
1
+ import{e as w}from"./chunk-EDEL6XSO.js";import{b as s}from"./chunk-CWDPAB6V.js";import"./chunk-CLVPTZ4G.js";import"./chunk-5EK7QOB6.js";import"./chunk-LYT7LQS3.js";import{D as b,H as x,n as m}from"./chunk-IQ2XSDFU.js";import"./chunk-SFI7YWVR.js";import"./chunk-NZ73KS2Y.js";import{a as p}from"./chunk-CT4EH2K2.js";import"./chunk-JIAVZ3V7.js";import"./chunk-7TG23VIV.js";import{a as f}from"./chunk-SVQCDOZ3.js";import{a as j}from"./chunk-IJQ26FTX.js";import{c as l}from"./chunk-KVMUXFPB.js";var n=l(j());var e=l(p()),B={css:"text/css",json:"application/json",javascript:"text/javascript",typescript:"text/plain",html:"text/html",xml:"application/xml"};function E(){let[a,o]=n.useState(!1),c=n.useRef(0);n.useEffect(()=>()=>window.clearTimeout(c.current),[]);let r=n.useCallback(i=>{let t=()=>{o(!0),window.clearTimeout(c.current),c.current=window.setTimeout(()=>o(!1),1500)};return navigator.clipboard&&navigator.clipboard.writeText?navigator.clipboard.writeText(i).then(t):Promise.reject(new Error("Clipboard unavailable"))},[]);return{copied:a,copy:r}}function L(a,o,c){let r=new Blob([a],{type:(B[c]||"text/plain")+";charset=utf-8"}),i=URL.createObjectURL(r),t=document.createElement("a");t.href=i,t.download=o||"code.txt",document.body.appendChild(t),t.click(),t.remove(),setTimeout(()=>URL.revokeObjectURL(i),1e3)}function z({code:a="",language:o="text",title:c,filename:r,showCopy:i=!0,showDownload:t,lineNumbers:v=!0,minLines:C=3,maxHeight:h="24rem",actions:y,className:R,...g}){let{copied:u,copy:k}=E(),d=c||r,T=t===void 0?!!r:t;return(0,e.jsxs)("div",{"data-slot":"code-block",className:f("flex min-w-0 flex-col overflow-hidden rounded-md border border-border bg-card",R),...g,children:[(0,e.jsxs)("div",{className:"flex min-h-9 items-center gap-2 border-b border-border bg-muted/40 px-3 py-1",children:[(0,e.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-xs text-muted-foreground",children:d||o}),y,i?(0,e.jsx)(s,{variant:"ghost",size:"icon-xs","aria-label":u?"Copied":"Copy code",onClick:()=>k(a).catch(()=>{}),children:u?(0,e.jsx)(m,{}):(0,e.jsx)(b,{})}):null,T?(0,e.jsx)(s,{variant:"ghost",size:"icon-xs","aria-label":`Download ${r||"code"}`,onClick:()=>L(a,r,o),children:(0,e.jsx)(x,{})}):null]}),(0,e.jsx)(w,{value:a,language:o,readOnly:!0,lineNumbers:v,minLines:C,maxHeight:h,"aria-label":d?`${d} (read only)`:"Code (read only)",className:"rounded-none border-0 shadow-none dark:bg-transparent"})]})}export{z as CodeBlock,L as downloadText,E as useCopy};
2
+ //# sourceMappingURL=code-block-H2ETQV3M.js.map
@@ -0,0 +1,2 @@
1
+ import{a,b,c,d,e}from"./chunk-EDEL6XSO.js";import"./chunk-CT4EH2K2.js";import"./chunk-SVQCDOZ3.js";import"./chunk-IJQ26FTX.js";import"./chunk-KVMUXFPB.js";export{e as CodeEditor,c as codeLanguageForType,b as isCodeEngineLoaded,a as loadCodeEngine,d as useCodeEditor};
2
+ //# sourceMappingURL=code-editor-2JYERJLS.js.map
@@ -0,0 +1,2 @@
1
+ import{a as W,b as $,c as S,d as j,e as L,f as z}from"./chunk-KNOE7TZW.js";import"./chunk-T4Y5HG5P.js";import"./chunk-CJ5CECQT.js";import"./chunk-R5KQ2GRA.js";import"./chunk-FTWKUXER.js";import"./chunk-AAL6V4Y3.js";import{d as q}from"./chunk-CLVPTZ4G.js";import"./chunk-5EK7QOB6.js";import"./chunk-LYT7LQS3.js";import"./chunk-XIXCIQKJ.js";import"./chunk-EGZKG2B2.js";import"./chunk-2L7NK6SJ.js";import"./chunk-DR47HKIK.js";import{d as M}from"./chunk-MQ67DRDE.js";import"./chunk-UH726PMV.js";import{a as U}from"./chunk-SFI7YWVR.js";import{b as I}from"./chunk-NZ73KS2Y.js";import{a as O}from"./chunk-CT4EH2K2.js";import{c as B,i as H,l as p}from"./chunk-JIAVZ3V7.js";import{a as G}from"./chunk-SVQCDOZ3.js";import{a as x}from"./chunk-IJQ26FTX.js";import{b as de,c as r}from"./chunk-KVMUXFPB.js";var $e=r(x());var d={};de(d,{Panel:()=>w,Root:()=>T,Trigger:()=>A});var b=r(x(),1);var N={...L,...M};var J=r(O(),1),T=b.forwardRef(function(t,u){let{render:E,className:l,defaultOpen:a=!1,disabled:g=!1,onOpenChange:m,open:C,style:h,...R}=t,n=U(m),e=W({open:C,defaultOpen:a,onOpenChange:n,disabled:g}),s=b.useMemo(()=>({open:e.open,disabled:e.disabled,transitionStatus:e.transitionStatus}),[e.open,e.disabled,e.transitionStatus]),c=b.useMemo(()=>({...e,onOpenChange:n,state:s}),[e,n,s]),i=p("div",t,{state:s,ref:u,props:R,stateAttributesMapping:N});return(0,J.jsx)($.Provider,{value:c,children:i})});T.displayName="CollapsibleRoot";var K=r(x(),1);var ue={...j,...M},A=K.forwardRef(function(t,u){let{panelId:E,open:l,handleTrigger:a,state:g,disabled:m}=S(),{className:C,disabled:h=m,render:R,nativeButton:n=!0,style:e,...s}=t,{getButtonProps:c,buttonRef:i}=q({disabled:h,native:n});return p("button",t,{state:g,ref:[u,i],props:[{"aria-controls":l?E:void 0,"aria-expanded":l,onClick:a},s,c],stateAttributesMapping:ue})});A.displayName="CollapsibleTrigger";var v=r(x(),1);var Q="--collapsible-panel-height",X="--collapsible-panel-width";var w=v.forwardRef(function(t,u){let{className:E,hiddenUntilFound:l,keepMounted:a,render:g,id:m,style:C,...h}=t;v.useEffect(()=>{l&&a===!1&&B("The `keepMounted={false}` prop on `Collapsible.Panel` is ignored when `hiddenUntilFound` is enabled, since the panel must remain mounted while closed.")},[l,a]);let{defaultPanelId:R,mounted:n,onOpenChange:e,open:s,setMounted:c,setPanelIdState:i,setOpen:V,state:Z,transitionStatus:ee}=S(),te=l??!1,oe=a??!1,P=m||void 0,le=P??R;I(()=>(i(f=>P??(f===null?void 0:f)),()=>{i(f=>f===P?null:f)}),[P,i]);let{height:D,props:ae,ref:ne,shouldPreventOpenAnimation:se,shouldRender:ie,transitionStatus:re,width:k}=z({externalRef:u,hiddenUntilFound:te,id:le,keepMounted:oe,mounted:n,onOpenChange:e,open:s,setMounted:c,setOpen:V,transitionStatus:ee}),_={...Z,transitionStatus:re},F=H(C,_),pe=p("div",{...t,style:void 0},{state:_,ref:ne,props:[ae,{style:{[Q]:D===void 0?"auto":`${D}px`,[X]:k===void 0?"auto":`${k}px`}},h,F?{style:F}:void 0,se?{style:{animationName:"none"}}:void 0],stateAttributesMapping:N});return ie?pe:null});w.displayName="CollapsiblePanel";var y=r(O());function qe({...o}){return(0,y.jsx)(d.Root,{"data-slot":"collapsible",...o})}function ze({...o}){return(0,y.jsx)(d.Trigger,{"data-slot":"collapsible-trigger",...o})}function Ge({className:o,...t}){return(0,y.jsx)(d.Panel,{"data-slot":"collapsible-content",className:G("h-(--collapsible-panel-height) overflow-hidden transition-[height] duration-200 ease-out data-ending-style:h-0 data-starting-style:h-0",o),...t})}export{qe as Collapsible,Ge as CollapsibleContent,Ge as CollapsiblePanel,ze as CollapsibleTrigger};
2
+ //# sourceMappingURL=collapsible-4ZOFMWLB.js.map
@@ -0,0 +1,2 @@
1
+ import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v}from"./chunk-HFUDOYIP.js";import"./chunk-KVMUXFPB.js";export{a as COLOR_FORMATS,q as COLOR_TOKENS,n as CONTRAST_PAIRS,i as CONTRAST_TARGETS,p as SHARED_TOKENS,m as adjustColor,v as adjustTheme,l as bestForeground,e as canonicalColor,o as checkContrast,h as contrast,j as contrastLevel,k as fixContrast,g as formatColor,t as generateTheme,f as inGamut,c as isColor,b as parseColor,r as parseThemeCss,u as themeFromColor,s as themeToCss,d as toOklch};
2
+ //# sourceMappingURL=color-UDQWYS2D.js.map
@@ -0,0 +1,2 @@
1
+ import{a as ie,b as se,c as ce,e as ue}from"./chunk-3H6F4X7R.js";import"./chunk-57M36GYM.js";import"./chunk-GZJCEDUU.js";import"./chunk-NJX7QY3Z.js";import{a as at,b as de,c as lt}from"./chunk-FZPMZMFU.js";import{a as it}from"./chunk-PYWKHILP.js";import"./chunk-MTHCFDUE.js";import{a as et,c as tt,d as rt,l as nt,m as ot}from"./chunk-2IZ44WWI.js";import"./chunk-UXUS6DNI.js";import"./chunk-PHK25MY7.js";import"./chunk-KAZVAX35.js";import"./chunk-TNLYU77Y.js";import"./chunk-ML6HCGK5.js";import"./chunk-SLZI4G3N.js";import"./chunk-AZWODE64.js";import"./chunk-KPP4HYUV.js";import"./chunk-GQYRJYJV.js";import"./chunk-XGLVZEGD.js";import"./chunk-5ZMYWE5S.js";import"./chunk-KCTKD6GV.js";import"./chunk-DG6LRRQT.js";import"./chunk-FROPNHO5.js";import"./chunk-F5MKIWPQ.js";import"./chunk-WT34MBTN.js";import"./chunk-TIJLEKZ2.js";import"./chunk-TQPXDAVH.js";import"./chunk-33RMFA4P.js";import"./chunk-WLBNJ4K3.js";import"./chunk-T4Y5HG5P.js";import"./chunk-Z76KXEPD.js";import"./chunk-H6TI5TWN.js";import"./chunk-IAEAQCYR.js";import"./chunk-OXJ6LWKI.js";import"./chunk-B4MRCKT4.js";import"./chunk-RCNX6LVJ.js";import"./chunk-F353PAEY.js";import"./chunk-QFN6XL4O.js";import"./chunk-7OCTAHT6.js";import"./chunk-URJZKT45.js";import"./chunk-E75HEEMN.js";import"./chunk-VSM3ZOBU.js";import"./chunk-CJ5CECQT.js";import"./chunk-R5KQ2GRA.js";import"./chunk-FTWKUXER.js";import"./chunk-AAL6V4Y3.js";import{b as W}from"./chunk-CWDPAB6V.js";import"./chunk-CLVPTZ4G.js";import"./chunk-5EK7QOB6.js";import"./chunk-LYT7LQS3.js";import{Ca as Je,D as Ze,n as le,o as Qe}from"./chunk-IQ2XSDFU.js";import"./chunk-D7BPK3AE.js";import"./chunk-XIXCIQKJ.js";import"./chunk-EGZKG2B2.js";import"./chunk-2L7NK6SJ.js";import"./chunk-DR47HKIK.js";import"./chunk-MQ67DRDE.js";import{a as qt}from"./chunk-UH726PMV.js";import"./chunk-SFI7YWVR.js";import"./chunk-NZ73KS2Y.js";import{a as Ye}from"./chunk-CT4EH2K2.js";import"./chunk-JIAVZ3V7.js";import"./chunk-7TG23VIV.js";import{a as T}from"./chunk-SVQCDOZ3.js";import{a as Xe}from"./chunk-IJQ26FTX.js";import{c as j}from"./chunk-KVMUXFPB.js";var Gr=j(Xe()),g=j(Xe());var Ce=j(qt());var u=j(Ye()),ve={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","brightness"],oklch:["lightness","chroma","hue"]},jt=["hex","rgb","hsl","hsb","oklch"],fe={hex:"HEX",rgb:"RGB",hsl:"HSL",hsb:"HSB",oklch:"OKLCH"},x=(e,t,n)=>Math.min(n,Math.max(t,e)),K=e=>(e%360+360)%360,N=(e,t)=>String(Number(e.toFixed(t))+0);function st([e,t,n],o=0){let r=e/255,a=t/255,l=n/255,i=Math.max(r,a,l),s=i-Math.min(r,a,l),c=o;return s>1e-9&&(c=i===r?(a-l)/s%6:i===a?(l-r)/s+2:(r-a)/s+4,c=K(c*60)),[c,i===0?0:s/i*100,i*100]}function ct([e,t,n]){let o=t/100,r=n/100,a=l=>{let i=(l+e/60)%6;return(r-r*o*Math.max(0,Math.min(i,4-i,1)))*255};return[a(5),a(3),a(1)]}function ut([e,t,n]){let o=t/100,r=n/100,a=r*(1-o/2),l=a===0||a===1?0:(r-a)/Math.min(a,1-a);return[e,l*100,a*100]}function St([e,t,n]){let o=t/100,r=n/100,a=r+o*Math.min(r,1-r);return[e,a===0?0:2*(1-r/a)*100,a*100]}var Pt=e=>{let t=e/255;return t<=.04045?t/12.92:((t+.055)/1.055)**2.4},Wt=e=>255*(e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055);function Se([e,t,n]){let o=Math.cbrt(.4122214708*e+.5363325363*t+.0514459929*n),r=Math.cbrt(.2119034982*e+.6806995451*t+.1073969566*n),a=Math.cbrt(.0883024619*e+.2817188376*t+.6299787005*n);return[.2104542553*o+.793617785*r-.0040720468*a,1.9779984951*o-2.428592205*r+.4505937099*a,.0259040371*o+.7827717662*r-.808675766*a]}function Pe([e,t,n],o=0){let r=Math.sqrt(t*t+n*n),a=r<1e-4?o:K(Math.atan2(n,t)*180/Math.PI);return[e*100,r,a]}function Vt(e,t=0){return Pe(Se(e.map(Pt)),t)}function be([e,t,n]){let o=n*Math.PI/180,r=e/100,a=t*Math.cos(o),l=t*Math.sin(o),i=(r+.3963377774*a+.2158037573*l)**3,s=(r-.1055613458*a-.0638541728*l)**3,c=(r-.0894841775*a-1.291485548*l)**3;return[4.0767416621*i-3.3077115913*s+.2309699292*c,-1.2684380046*i+2.6097574011*s-.3413193965*c,-.0041960863*i-.7034186147*s+1.707614701*c]}var me=e=>e.every(t=>t>=-1e-4&&t<=1+1e-4),he=e=>e.map(t=>x(t,0,1));function dt(e,[t,n,o]){let[r,a,l]=Se(e),i=o*Math.PI/180;return Math.hypot(r-t/100,a-n*Math.cos(i),l-n*Math.sin(i))}function Xt([e,t,n]){let o=f=>f.map(m=>Wt(m));if(e>=100)return[255,255,255];if(e<=0)return[0,0,0];let r=[e,Math.max(0,t),n],a=be(r);if(me(a))return o(he(a));let l=he(a);if(dt(l,r)<.02)return o(l);let i=0,s=r[1],c=!0;for(;s-i>1e-4;){let f=(i+s)/2,m=[e,f,n],p=be(m);if(c&&me(p)){i=f;continue}l=he(p);let d=dt(l,m);if(d<.02){if(.02-d<1e-4)break;c=!1,i=f}else s=f}return o(l)}function Me(e){let{space:t,channels:n}=e;return t==="rgb"?n:t==="hsv"?ct(n):t==="hsl"?ct(St(n)):Xt(n)}function z(e,t){let{space:n,channels:o}=e;if(n===t)return o;if(n==="hsv"&&t==="hsl")return ut(o);if(n==="hsl"&&t==="hsv")return St(o);let r=Me(e),a=n==="rgb"?0:o[n==="oklch"?2:0];return t==="rgb"?r:t==="hsv"?st(r,a):t==="hsl"?ut(st(r,a)):Vt(r,a)}function Qr(e){return e.space!=="oklch"||me(be(e.channels))}var Yt=/^#?([\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$/,Qt=/^([a-z][a-z\d-]*)\(([\s\S]*)\)$/,Zt=/^([+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?)(%|deg|rad|grad|turn)?$/,Jt="alicebluef0f8ff antiquewhitefaebd7 aqua00ffff aquamarine7fffd4 azuref0ffff beigef5f5dc bisqueffe4c4 black000000 blanchedalmondffebcd blue0000ff blueviolet8a2be2 browna52a2a burlywooddeb887 cadetblue5f9ea0 chartreuse7fff00 chocolated2691e coralff7f50 cornflowerblue6495ed cornsilkfff8dc crimsondc143c cyan00ffff darkblue00008b darkcyan008b8b darkgoldenrodb8860b darkgraya9a9a9 darkgreen006400 darkgreya9a9a9 darkkhakibdb76b darkmagenta8b008b darkolivegreen556b2f darkorangeff8c00 darkorchid9932cc darkred8b0000 darksalmone9967a darkseagreen8fbc8f darkslateblue483d8b darkslategray2f4f4f darkslategrey2f4f4f darkturquoise00ced1 darkviolet9400d3 deeppinkff1493 deepskyblue00bfff dimgray696969 dimgrey696969 dodgerblue1e90ff firebrickb22222 floralwhitefffaf0 forestgreen228b22 fuchsiaff00ff gainsborodcdcdc ghostwhitef8f8ff goldffd700 goldenroddaa520 gray808080 green008000 greenyellowadff2f grey808080 honeydewf0fff0 hotpinkff69b4 indianredcd5c5c indigo4b0082 ivoryfffff0 khakif0e68c lavendere6e6fa lavenderblushfff0f5 lawngreen7cfc00 lemonchiffonfffacd lightblueadd8e6 lightcoralf08080 lightcyane0ffff lightgoldenrodyellowfafad2 lightgrayd3d3d3 lightgreen90ee90 lightgreyd3d3d3 lightpinkffb6c1 lightsalmonffa07a lightseagreen20b2aa lightskyblue87cefa lightslategray778899 lightslategrey778899 lightsteelblueb0c4de lightyellowffffe0 lime00ff00 limegreen32cd32 linenfaf0e6 magentaff00ff maroon800000 mediumaquamarine66cdaa mediumblue0000cd mediumorchidba55d3 mediumpurple9370db mediumseagreen3cb371 mediumslateblue7b68ee mediumspringgreen00fa9a mediumturquoise48d1cc mediumvioletredc71585 midnightblue191970 mintcreamf5fffa mistyroseffe4e1 moccasinffe4b5 navajowhiteffdead navy000080 oldlacefdf5e6 olive808000 olivedrab6b8e23 orangeffa500 orangeredff4500 orchidda70d6 palegoldenrodeee8aa palegreen98fb98 paleturquoiseafeeee palevioletreddb7093 papayawhipffefd5 peachpuffffdab9 perucd853f pinkffc0cb plumdda0dd powderblueb0e0e6 purple800080 rebeccapurple663399 redff0000 rosybrownbc8f8f royalblue4169e1 saddlebrown8b4513 salmonfa8072 sandybrownf4a460 seagreen2e8b57 seashellfff5ee siennaa0522d silverc0c0c0 skyblue87ceeb slateblue6a5acd slategray708090 slategrey708090 snowfffafa springgreen00ff7f steelblue4682b4 tand2b48c teal008080 thistled8bfd8 tomatoff6347 turquoise40e0d0 violetee82ee wheatf5deb3 whiteffffff whitesmokef5f5f5 yellowffff00 yellowgreen9acd32",ft=null;function er(e){return ft??=new Map(Jt.split(" ").map(t=>[t.slice(0,-6),t.slice(-6)])),ft.get(e)}function M(e,t,n=!1){if(e==="none")return 0;let o=Zt.exec(e);if(!o)return null;let r=Number(o[1]);if(!Number.isFinite(r))return null;let a=o[2];return a?a==="%"?n?null:r*t/100:n?a==="rad"?r*180/Math.PI:a==="grad"?r*.9:a==="turn"?r*360:r:null:r}var ht=(e,[t,n,o])=>e.map(r=>r[0]*t+r[1]*n+r[2]*o),V=(e,t)=>e.map(n=>[0,1,2].map(o=>n[0]*t[0][o]+n[1]*t[1][o]+n[2]*t[2][o])),q=[[12831/3959,-329/214,-1974/3959],[-851781/878810,1648619/878810,36519/878810],[705/12673,-2585/12673,705/667]],tr=[[.955473421488075,-.02309845494876471,.06325924320057072],[-.0283697093338637,1.0099953980813041,.021041441191917323],[.012314014864481998,-.020507649298898964,1.330365926242124]],ye=V(q,tr),pt=e=>{let t=Math.abs(e);return Math.sign(e)*(t<=.04045?t/12.92:((t+.055)/1.055)**2.4)},rr={srgb:{decode:pt,toSrgb:null},"srgb-linear":{decode:e=>e,toSrgb:null},"display-p3":{decode:pt,toSrgb:V(q,[[.4865709486482162,.26566769316909306,.1982172852343625],[.2289745640697488,.6917385218365064,.079286914093745],[0,.04511338185890264,1.043944368900976]])},"a98-rgb":{decode:e=>Math.sign(e)*Math.abs(e)**(563/256),toSrgb:V(q,[[573536/994567,263643/1420810,187206/994567],[591459/1989134,6239551/9945670,374412/4972835],[53769/1989134,351524/4972835,4929758/4972835]])},"prophoto-rgb":{decode:e=>{let t=Math.abs(e);return t<=16/512?e/16:Math.sign(e)*t**1.8},toSrgb:V(ye,[[.7977666449006423,.13518129740053308,.0313477341283922],[.2880748288194013,.711835234241873,8993693872564e-17],[0,0,.8251046025104602]])},rec2020:{decode:e=>{let t=Math.abs(e);return t<.018053968510807*4.5?e/4.5:Math.sign(e)*((t+.09929682680944)/1.09929682680944)**(1/.45)},toSrgb:V(q,[[.6369580483012914,.14461690358620832,.1688809751641721],[.2627002120112671,.6779980715188708,.05930171646986196],[0,.028072693049087428,1.060985057710791]])},xyz:{decode:e=>e,toSrgb:q},"xyz-d65":{decode:e=>e,toSrgb:q},"xyz-d50":{decode:e=>e,toSrgb:ye}};function nr([e,t,n]){let o=903.2962962962963,r=216/24389,a=(e+16)/116,l=t/500+a,i=a-n/200,s=l**3>r?l**3:(116*l-16)/o,c=e>o*r?a**3:e/o,f=i**3>r?i**3:(116*i-16)/o;return[s*(.3457/.3585),c,f*((1-.3457-.3585)/.3585)]}var gt=e=>Pe(Se(e)),or=e=>e.every(t=>t>=-1e-6&&t<=1+1e-6);function ar(e,t){if(e==="rgb"){let n=t.map(o=>M(o,255));return n.some(o=>o===null)?null:{space:"rgb",channels:n.map(o=>x(o,0,255))}}if(e==="hsl"||e==="hsv"||e==="hsb"||e==="hwb"){let n=M(t[0],1,!0),o=M(t[1],100),r=M(t[2],100);if(n===null||o===null||r===null)return null;let a=x(o,0,100),l=x(r,0,100);if(e==="hsl")return{space:"hsl",channels:[n,a,l]};if(e!=="hwb")return{space:"hsv",channels:[n,a,l]};let i=a+l;if(i>=100)return{space:"hsv",channels:[n,0,a/i*100]};let s=100-l;return{space:"hsv",channels:[n,(1-a/s)*100,s]}}if(e==="oklch"||e==="oklab"){let n=M(t[0],1),o=M(t[1],.4),r=e==="oklch"?M(t[2],1,!0):M(t[2],.4);if(n===null||o===null||r===null)return null;let a=x(n,0,1);return e==="oklch"?{space:"oklch",channels:[a*100,Math.max(0,o),r]}:{space:"oklch",channels:Pe([a,o,r])}}if(e==="lab"||e==="lch"){let n=M(t[0],100),o=M(t[1],e==="lab"?125:150),r=e==="lch"?M(t[2],1,!0):M(t[2],125);if(n===null||o===null||r===null)return null;let a=x(n,0,100),l=r*Math.PI/180,[i,s]=e==="lab"?[o,r]:[Math.max(0,o)*Math.cos(l),Math.max(0,o)*Math.sin(l)];return{space:"oklch",channels:gt(ht(ye,nr([a,i,s])))}}if(e==="color"){let n=rr[t[0]];if(!n||t.length!==4)return null;let o=t.slice(1).map(l=>M(l,1));if(o.some(l=>l===null))return null;let r=o;if(t[0]==="srgb"&&or(r))return{space:"rgb",channels:r.map(l=>x(l,0,1)*255)};let a=r.map(n.decode);return{space:"oklch",channels:gt(n.toSrgb?ht(n.toSrgb,a):a)}}return null}function I(e){if(typeof e!="string")return null;let t=e.trim().toLowerCase();if(!t)return null;if(t==="transparent")return{space:"rgb",channels:[0,0,0],alpha:0};let n=Yt.exec(er(t)??t);if(n){let b=n[1];b.length<=4&&(b=[...b].map(w=>w+w).join(""));let h=w=>parseInt(b.slice(w,w+2),16);return{space:"rgb",channels:[h(0),h(2),h(4)],alpha:b.length===8?h(6)/255:1}}let o=Qt.exec(t);if(!o)return null;let r=o[1].replace(/a$/,""),[a,l,...i]=o[2].split("/");if(i.length>0)return null;let s=a.split(/[\s,]+/).filter(Boolean),c=r==="color"?4:3,f=l?.trim()??(r==="color"?void 0:s[3]);if(s.length!==c&&!(r!=="color"&&s.length===4&&l===void 0))return null;let m=f===void 0?1:M(f,1),p=ar(r,s.slice(0,c));if(m===null||!p)return null;let d=p.channels;if(d.some(b=>!Number.isFinite(b)))return null;if(p.space!=="rgb"){let b=p.space==="oklch"?2:0;d[b]=K(d[b])}return{space:p.space,channels:d,alpha:x(m,0,1)}}var lr=/^(inherit|initial|unset|revert|revert-layer|currentcolor)$/;function ir(e){if(typeof document>"u"||lr.test(e.toLowerCase())||!CSS.supports?.("color",e))return null;let t=document.createElement("div"),n=document.createElement("div");t.style.display="none",n.style.color=e,t.append(n),document.body.append(t),t.style.color="rgb(1, 2, 3)";let o=getComputedStyle(n).color;t.style.color="rgb(4, 5, 6)";let r=getComputedStyle(n).color;return t.remove(),o===r?I(o):null}function E(e,t){let n=x(e.alpha,0,1),o=N(n,2)!=="1"?` / ${N(n,2)}`:"";if(t==="hex"||t==="rgb"){let i=Me(e).map(f=>Math.round(x(f,0,255)));if(t==="rgb")return`rgb(${i.join(" ")}${o})`;let s=Math.round(n*255);return`#${(s<255?[...i,s]:i).map(f=>f.toString(16).padStart(2,"0")).join("")}`}if(t==="oklch"){let[i,s,c]=z(e,"oklch"),f=N(K(Number(c.toFixed(3))),3);return`oklch(${N(i,2)}% ${N(Math.max(0,s),5)} ${f}${o})`}let[r,a,l]=z(e,t==="hsl"?"hsl":"hsv");return`${t}(${N(r,1)} ${N(a,1)}% ${N(l,1)}%${o})`}var Mt=e=>E(e,e.space==="oklch"?"oklch":"rgb");function ke(e){let[t,n,o]=e.map(Pt);return .2126*t+.7152*n+.0722*o}function we(e,t){return Me(e).map((o,r)=>o*e.alpha+t[r]*(1-e.alpha))}function sr(e,t){let n=typeof e=="string"?I(e):e,o=typeof t=="string"?I(t):t;if(!n||!o)return null;let r=we(o,[255,255,255]),a=ke(we(n,r)),l=ke(r);return(Math.max(a,l)+.05)/(Math.min(a,l)+.05)}var cr=.36;function ur(e,{light:t="#ffffff",dark:n="#0a0a0a"}={}){let o=typeof e=="string"?I(e):e;return o?ke(we(o,[255,255,255]))<cr&&(sr(t,o)??0)>=3?t:n:null}var dr=[[15,"pink"],[45,"red"],[80,"orange"],[120,"yellow"],[135,"lime"],[165,"green"],[205,"cyan"],[250,"sky blue"],[280,"blue"],[300,"violet"],[320,"purple"],[345,"magenta"],[360,"pink"]];function fr(e){let[t,n,o]=z(e,"oklch"),r=t/100;if(n<.025)return r<.2?"black":r<.45?"dark gray":r<.75?"gray":r<.95?"light gray":"white";let a=dr.find(([s])=>o<s)?.[1]??"pink";r<.6&&o>=40&&o<100?a="brown":r<.6&&o>=100&&o<135&&(a="olive");let l=n<.07?"grayish ":n>.2?"vibrant ":"";return`${r<.45?"dark ":r>.82?"light ":""}${l}${a}`}var pe={labels:{placeholder:"Select color",panelLabel:"Choose color",openPicker:"Open color picker",area:"Color",hue:"Hue",saturation:"Saturation",brightness:"Brightness",lightness:"Lightness",chroma:"Chroma",red:"Red",green:"Green",blue:"Blue",alpha:"Opacity",hex:"Hex",format:"Color format",eyeDropper:"Pick a color from the screen",copy:"Copy color",copied:"Copied",clear:"Clear",swatches:"Swatches"},functions:{getColorName:fr}};function hr(e){return!e?.labels&&!e?.functions?pe:{labels:{...pe.labels,...e.labels},functions:{...pe.functions,...e.functions}}}var pr={hue:"hsv",saturation:"hsv",brightness:"hsv",lightness:"hsl",chroma:"oklch",red:"rgb",green:"rgb",blue:"rgb",alpha:"rgb"},It=(e,t)=>e!=="alpha"&&t&&ve[t].includes(e)?t:pr[e];function X(e,t){return t==="alpha"?{max:1,step:.01}:t==="hue"?{max:360,step:1}:t==="chroma"?{max:.4,step:.004}:{max:e==="rgb"?255:100,step:1}}function Y(e,t,n){return n==="alpha"?e.alpha:z(e,t)[ve[t].indexOf(n)]}function H(e,t,n,o){if(n==="alpha")return{...e,alpha:x(o,0,1)};let r=[...z(e,t)];return r[ve[t].indexOf(n)]=o,{space:t,channels:r,alpha:e.alpha}}function Tt(e,t,n,o){let r=Y(e,t,n);return n==="alpha"?`${Math.round(r*100)}%`:n==="chroma"?N(r,3):n==="hue"?`${Math.round(r)}\xB0, ${o.functions.getColorName(e)}`:t==="rgb"?String(Math.round(r)):`${Math.round(r)}%`}function gr(e,t,n){let o={...e,alpha:1};if(n==="alpha")return["transparent",Mt(o)];let r=o;n==="hue"&&(r=t==="oklch"?H(o,"oklch","chroma",Math.max(Y(o,"oklch","chroma"),.12)):{space:"hsv",channels:[0,100,100],alpha:1});let a=n==="hue"||t==="oklch"?13:t==="hsl"&&n==="lightness"?3:2,{max:l}=X(t,n),i=n==="hue"&&t!=="oklch"?"hsv":t;return Array.from({length:a},(s,c)=>E(H(r,i,n,l*c/(a-1)),"rgb"))}var Et="repeating-conic-gradient(var(--muted) 0 25%, var(--background) 0 50%) 50% / 8px 8px",bt={space:"hsv",channels:[0,0,100],alpha:1},Ie=(0,g.createContext)(null),Dt=(0,g.createContext)("inline");function C(e){let t=(0,g.useContext)(Ie);if(!t)throw new Error(`${e} must be used within a ColorPicker`);return t}function Zr(){let e=C("useColorPicker");return{value:e.value,color:e.color,format:e.format,open:e.open,setOpen:e.setOpen,setValue:t=>{if(!t)return e.change(null);let n=I(t);n&&e.change(n)},clear:()=>e.change(null)}}function Z(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function Jr({value:e,defaultValue:t=null,onValueChange:n,onValueCommit:o,format:r="hex",alpha:a=!1,swatches:l,open:i,defaultOpen:s=!1,onOpenChange:c,disabled:f=!1,readOnly:m=!1,invalid:p=!1,name:d,form:b,required:h=!1,inputRef:w,id:A,"aria-label":k,"aria-labelledby":_,"aria-describedby":R,i18n:B,placeholder:v,className:D,children:$}){let J=(0,g.useId)(),Q=A??J,[ee,zt]=(0,g.useState)(t),[Bt]=(0,g.useState)(t),[Ft,Ht]=(0,g.useState)(s),Ae=i??Ft,L=(e!==void 0?e:ee)||null,[_e,Re]=(0,g.useState)(()=>({value:L,color:I(L)})),S=_e.color;_e.value!==L&&(S=I(L),Re({value:L,color:S})),S&&!a&&S.alpha!==1&&(S={...S,alpha:1});let te=S??bt,F=(0,g.useRef)({value:L,color:te});(0,g.useLayoutEffect)(()=>{F.current={value:L,color:te}});let re=(0,g.useRef)(null),ne=(0,g.useRef)(null),oe=(0,g.useRef)(null),$e=(0,g.useRef)(()=>{}),Le=hr(B),Oe=!f&&!m,ze=y=>{y&&f||(i===void 0&&Ht(y),c?.(y))},Kt=y=>{let P=I(y);return P?E(a?P:{...P,alpha:1},r):null},Be=y=>{if(!Oe)return;let P=y&&!a?{...y,alpha:1}:y,O=P?E(P,r):null,U=F.current.value,We=O===U||O===Kt(U),Ve=We?U:O;F.current={value:Ve,color:P??bt},Re({value:Ve,color:P}),!We&&(e===void 0&&zt(O),n?.(O))},Fe=()=>{re.current={from:F.current.value}},He=()=>{let y=re.current;re.current=null,y&&y.from!==F.current.value&&o?.(F.current.value)},[Gt,Ut]=(0,g.useState)(null),Ke=Gt??r,[Ge,Ue]=(0,g.useState)(null),ae=(0,g.useRef)(0);(0,g.useEffect)(()=>()=>window.clearTimeout(ae.current),[]);let qe={id:Q,value:L,text:S?r==="hex"?E(S,r).toUpperCase():E(S,r):null,color:S,display:te,format:r,alpha:a,i18n:Le,disabled:f,readOnly:m,editable:Oe,invalid:p,required:h,label:k,labelledBy:_,describedBy:R,swatches:l,open:Ae,setOpen:ze,getColor:()=>F.current.color,emit:Be,startInteraction:Fe,endInteraction:He,change:y=>{Fe(),Be(y),He()},registerFocusTarget:y=>{y&&(ne.current=y)},shownFormat:Ke,setFieldsFormat:Ut,copy:(y=Ke)=>{S&&navigator.clipboard?.writeText(E(S,y)).then(()=>{Ue(y),window.clearTimeout(ae.current),ae.current=window.setTimeout(()=>Ue(null),1500)},()=>{})},copied:Ge};(0,g.useEffect)(()=>{$e.current=()=>qe.change(I(Bt))});let je=!!d||h;return(0,g.useEffect)(()=>{let y=oe.current?.getRootNode();if(!y)return;let P=0,O=U=>{U.target===oe.current?.form&&(P=window.setTimeout(()=>{U.defaultPrevented||$e.current()}))};return y.addEventListener("reset",O,!0),()=>{y.removeEventListener("reset",O,!0),window.clearTimeout(P)}},[je]),(0,u.jsxs)(Ie.Provider,{value:qe,children:[(0,u.jsx)(at,{open:Ae,onOpenChange:y=>ze(y),children:$===void 0?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(xr,{className:D,placeholder:v}),(0,u.jsx)(vr,{})]}):$}),(0,u.jsx)("span",{role:"status",className:"sr-only",children:Ge?Le.labels.copied:""}),je&&(0,u.jsx)("input",{ref:y=>{oe.current=y,Z(w,y)},type:"text",name:d,form:b,required:h&&!m,disabled:f,value:S?E(S,r):"",onChange:()=>{},tabIndex:-1,"aria-hidden":"true","data-slot":"color-picker-field",onFocus:y=>{let P=(ne.current?.isConnected?ne.current:null)??y.currentTarget.getRootNode().getElementById(`${Q}-area`);P?P.focus():y.currentTarget.blur()},className:"pointer-events-none absolute size-px max-w-px opacity-0"})]})}var br="forced-color-adjust-none relative inline-flex size-4 shrink-0 after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] after:inset-ring after:inset-ring-foreground/10",mr="rounded-[4px]",yr="linear-gradient(to top right, transparent calc(50% - 0.75px), var(--destructive) calc(50% - 0.75px) calc(50% + 0.75px), transparent calc(50% + 0.75px))";function Nt(e){if(!e)return yr;let t=Mt(e);return e.alpha<1?`linear-gradient(${t}, ${t}), ${Et}`:t}function At({color:e,shape:t="square",className:n,style:o,...r}){let a=(0,g.useContext)(Ie),l=e!==void 0?I(e):a?.color??null,i=!!r["aria-label"]||!!r["aria-labelledby"];return(0,u.jsx)("span",{role:i?"img":void 0,"aria-hidden":i?void 0:!0,"data-slot":"color-picker-swatch","data-empty":l?void 0:"",className:T(br,t==="circle"?"rounded-full":mr,n),style:{background:Nt(l),...o},...r})}var _t=(0,u.jsx)(Qe,{"aria-hidden":"true"});function kr({placeholder:e,className:t,...n}){let o=C("ColorPickerValue");return(0,u.jsx)("span",{"data-slot":"color-picker-value","data-placeholder":o.color?void 0:"",className:T("truncate",t),...n,children:o.text??e??o.i18n.labels.placeholder})}var wr="font-normal normal-case tracking-normal tabular-nums data-placeholder:text-muted-foreground";function xr({className:e,variant:t="outline",placeholder:n,children:o,ref:r,...a}){let l=C("ColorPickerTrigger"),i=a["aria-labelledby"]??l.labelledBy,s={variant:t,disabled:l.disabled,"aria-label":l.label,"aria-describedby":l.describedBy,...l.invalid&&{"aria-invalid":!0,"data-invalid":""},...a,"aria-labelledby":i?`${i} ${l.id}`:void 0,onKeyDown:f=>{a.onKeyDown?.(f),f.defaultPrevented||G(f,l)},id:l.id,ref:f=>{l.registerFocusTarget(f),Z(r,f)},"data-slot":"color-picker-trigger","data-placeholder":l.color?void 0:"",className:T(wr,o===void 0&&"justify-start",e)},c=o===void 0?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(At,{"data-icon":"inline-start"}),(0,u.jsx)(kr,{placeholder:n,className:"flex-1 text-start"}),(0,u.jsx)("span",{"data-icon":"inline-end","aria-hidden":"true",className:"text-muted-foreground flex",children:_t})]}):o;return(0,u.jsx)(de,{id:l.id,render:(0,u.jsx)(W,{...s}),children:c})}function en({className:e,placeholder:t,onBlur:n,onKeyDown:o,onChange:r,ref:a,...l}){let i=C("ColorPickerInput"),[s,c]=(0,g.useState)(null),f=i.text??"",m=s??f,p=(0,g.useRef)(null);Rt(p,s!==null,()=>c(null));let d=()=>{if(s===null||(c(null),s===f))return;if(!s.trim())return i.change(null);let h=I(s)??ir(s.trim());h&&i.change(h)},b={size:"icon-xs",disabled:i.disabled,"aria-label":i.i18n.labels.openPicker,"data-slot":"color-picker-input-trigger"};return(0,u.jsxs)(ie,{"data-slot":"color-picker-input","data-disabled":i.disabled?"":void 0,className:e,children:[(0,u.jsx)(se,{align:"inline-start",children:(0,u.jsx)(de,{render:(0,u.jsx)(ce,{...b}),children:(0,u.jsx)(At,{})})}),(0,u.jsx)(ue,{value:m,placeholder:t??i.i18n.labels.placeholder,disabled:i.disabled,readOnly:i.readOnly,required:i.required,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:!1,"aria-keyshortcuts":"Alt+ArrowDown","aria-label":i.label,"aria-labelledby":i.labelledBy,"aria-describedby":i.describedBy,"aria-invalid":i.invalid||void 0,className:"tabular-nums",onChange:h=>{r?.(h),c(h.target.value)},onBlur:h=>{n?.(h),d()},onKeyDown:h=>{o?.(h),!(h.defaultPrevented||G(h,i))&&(h.key==="Enter"?(0,Ce.flushSync)(()=>d()):h.altKey&&h.key==="ArrowDown"&&(h.preventDefault(),d(),i.setOpen(!0)))},...l,id:i.id,ref:h=>{p.current=h,i.registerFocusTarget(h),Z(a,h)}})]})}var Cr='button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex="-1"])';function vr({className:e,align:t="start",onKeyDown:n,children:o,...r}){let a=C("ColorPickerContent");return(0,u.jsx)(lt,{align:t,"aria-labelledby":a.labelledBy,"aria-label":a.labelledBy?void 0:a.label??a.i18n.labels.panelLabel,className:T("w-(--color-picker-content-width) max-w-[calc(100vw-1rem)]",a.alpha?"[--color-picker-content-width:--spacing(96)] md:[--color-picker-content-width:--spacing(84)]":"[--color-picker-content-width:--spacing(72)]",e),onKeyDown:l=>{if(n?.(l),l.defaultPrevented||l.key!=="Tab"||l.altKey||l.ctrlKey||l.metaKey)return;let i=Array.from(l.currentTarget.querySelectorAll(Cr)),s=l.currentTarget.ownerDocument.activeElement,c=i[0],f=i[i.length-1];!l.shiftKey&&s===f?(l.preventDefault(),c?.focus()):l.shiftKey&&s===c&&(l.preventDefault(),f?.focus())},...r,children:(0,u.jsx)(Dt.Provider,{value:"popup",children:o===void 0?(0,u.jsx)(Pr,{}):o})})}var Sr="flex w-full min-w-0 flex-col gap-2.5";function Pr({className:e,children:t,...n}){let o=C("ColorPickerPanel"),r=(0,g.useContext)(Dt)==="inline";return(0,u.jsx)("div",{role:r?"group":void 0,"aria-labelledby":r?o.labelledBy:void 0,"aria-label":r&&!o.labelledBy?o.label??o.i18n.labels.panelLabel:void 0,"data-slot":"color-picker-panel","data-disabled":o.disabled?"":void 0,className:T(Sr,e),...n,children:t===void 0?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(Ir,{}),(0,u.jsxs)("div",{className:"flex items-center gap-3",children:[(0,u.jsx)(Nr,{}),(0,u.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-2.5",children:[(0,u.jsx)(mt,{channel:"hue"}),o.alpha&&(0,u.jsx)(mt,{channel:"alpha"})]}),(0,u.jsx)(Ar,{})]}),(0,u.jsx)(Or,{}),o.swatches&&o.swatches.length>0&&(0,u.jsx)(Br,{colors:o.swatches})]}):t})}function G(e,t){if(!(e.metaKey||e.ctrlKey)||e.altKey||e.shiftKey||e.key.toLowerCase()!=="c"||!t.color)return!1;let n=e.target;return(n instanceof HTMLInputElement?n.selectionStart!==n.selectionEnd:!!e.currentTarget.ownerDocument.getSelection()?.toString())?!1:(e.preventDefault(),t.copy(),!0)}function Rt(e,t,n){let o=(0,g.useRef)(n);(0,g.useLayoutEffect)(()=>{o.current=n}),(0,g.useEffect)(()=>{let r=e.current?.ownerDocument.defaultView;if(!t||!r)return;let a=l=>{l.key!=="Escape"||l.target!==e.current||(l.preventDefault(),l.stopPropagation(),o.current())};return r.addEventListener("keydown",a,!0),()=>r.removeEventListener("keydown",a,!0)},[t,e])}var Te="pointer-events-none absolute size-(--color-picker-thumb-size) -translate-x-1/2 -translate-y-1/2 border-2 border-white shadow-[0_0_0_1px_rgb(0_0_0/0.12),0_1px_3px_rgb(0_0_0/0.3)] transition-[box-shadow] rounded-full ring-ring/50 group-focus-visible/color-picker-control:ring-3 forced-colors:outline-2 forced-colors:outline-solid",$t="after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] after:inset-ring after:inset-ring-foreground/10",Ee="group/color-picker-control relative outline-none [--color-picker-thumb-size:calc(var(--spacing)*4)] select-none aria-disabled:pointer-events-none aria-disabled:opacity-50 data-dragging:cursor-grabbing";function Lt(e,t,n=0){let o=t.getBoundingClientRect(),r=(a,l)=>l>n?x((a-n/2)/(l-n),0,1):0;return{x:r(e.clientX-o.left,o.width),y:r(e.clientY-o.top,o.height)}}var ge=e=>`calc(var(--color-picker-thumb-size) / 2 + (100% - var(--color-picker-thumb-size)) * ${e})`;function De(e,t){let n=(0,g.useRef)(null),[o,r]=(0,g.useState)(!1),a=l=>{n.current===l.pointerId&&(n.current=null,r(!1),e.endInteraction())};return{dragging:o,handlers:{onPointerDown:l=>{l.button!==0||!e.editable||(n.current=l.pointerId,l.currentTarget.setPointerCapture?.(l.pointerId),r(!0),e.startInteraction(),t(l,l.currentTarget))},onPointerMove:l=>{n.current===l.pointerId&&t(l,l.currentTarget)},onPointerUp:a,onPointerCancel:a}}}function Ne(e,t){let n=e.shiftKey?t*10:t;switch(e.key){case"ArrowUp":case"ArrowRight":return n;case"ArrowDown":case"ArrowLeft":return-n;case"PageUp":return t*10;case"PageDown":return-t*10;case"Home":return-1/0;case"End":return 1/0}return null}var xe=(e,t)=>Number((Math.round(e/t)*t).toFixed(4)),Mr="forced-color-adjust-none h-40 w-full touch-none bg-[linear-gradient(to_top,#000,transparent),linear-gradient(to_right,#fff,transparent)] rounded-md";function Ir({className:e,style:t,onKeyDown:n,...o}){let r=C("ColorPickerArea"),{labels:a}=r.i18n,[l,i,s]=z(r.display,"hsv"),c=(p,d)=>{let[b]=z(r.getColor(),"hsv");r.emit({space:"hsv",channels:[b,x(p,0,100),x(d,0,100)],alpha:r.getColor().alpha})},{dragging:f,handlers:m}=De(r,(p,d)=>{let{x:b,y:h}=Lt(p,d);c(b*100,(1-h)*100)});return(0,u.jsx)("div",{id:`${r.id}-area`,role:"slider",tabIndex:r.disabled?-1:0,"aria-label":a.area,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(i),"aria-valuetext":`${a.saturation} ${Math.round(i)}%, ${a.brightness} ${Math.round(s)}%, ${r.i18n.functions.getColorName(r.display)}`,"aria-disabled":r.disabled||void 0,"aria-readonly":r.readOnly||void 0,dir:"ltr","data-slot":"color-picker-area","data-dragging":f?"":void 0,className:T(Ee,$t,Mr,e),style:{backgroundColor:`hsl(${l} 100% 50%)`,...t},onKeyDown:p=>{if(n?.(p),p.defaultPrevented||G(p,r)||!r.editable)return;let d=Ne(p,1);if(d===null)return;p.preventDefault();let b=p.key==="ArrowUp"||p.key==="ArrowDown"||p.key.startsWith("Page");r.startInteraction(),b?c(i,Math.round(s)+d):c(Math.round(i)+d,s),r.endInteraction()},...m,...o,children:(0,u.jsx)("div",{"data-slot":"color-picker-area-thumb",className:Te,style:{left:`${i}%`,top:`${100-s}%`}})})}var Tr="forced-color-adjust-none data-[orientation=horizontal]:h-3 data-[orientation=horizontal]:min-h-3 data-[orientation=horizontal]:w-full data-[orientation=horizontal]:min-w-0 data-[orientation=horizontal]:touch-pan-y data-[orientation=vertical]:h-40 data-[orientation=vertical]:shrink-0 data-[orientation=vertical]:w-3 data-[orientation=vertical]:touch-pan-x rounded-full";function mt({channel:e,colorSpace:t,orientation:n="horizontal",className:o,style:r,onKeyDown:a,...l}){let i=C("ColorPickerSlider"),s=It(e,t),{max:c,step:f}=X(s,e),m=e==="chroma"?.001:f,p=Y(i.display,s,e),d=n==="vertical",b=v=>{i.emit(H(i.getColor(),s,e,x(xe(v,m),0,c)))},{dragging:h,handlers:w}=De(i,(v,D)=>{let $=D.lastElementChild,J=(d?$?.offsetHeight:$?.offsetWidth)??0,{x:Q,y:ee}=Lt(v,D,J);b((d?1-ee:Q)*c)}),A=gr(i.display,s,e),k=A.map((v,D)=>`${v} ${ge(D/(A.length-1))}`),_=`linear-gradient(${d?"to top":"to right"}, ${k.join(", ")})`,R=x(p,0,c)/c,B=e==="alpha"?100:1;return(0,u.jsx)("div",{role:"slider",tabIndex:i.disabled?-1:0,"aria-label":i.i18n.labels[e],"aria-orientation":n,"aria-valuemin":0,"aria-valuemax":c*B,"aria-valuenow":Number((p*B).toFixed(3)),"aria-valuetext":Tt(i.display,s,e,i.i18n),"aria-disabled":i.disabled||void 0,"aria-readonly":i.readOnly||void 0,dir:"ltr","data-slot":"color-picker-slider","data-channel":e,"data-orientation":n,"data-dragging":h?"":void 0,className:T(Ee,$t,Tr,o),style:{background:e==="alpha"?`${_}, ${Et}`:_,...r},onKeyDown:v=>{if(a?.(v),v.defaultPrevented||G(v,i)||!i.editable)return;let D=Ne(v,f);D!==null&&(v.preventDefault(),i.startInteraction(),b(xe(p,f)+D),i.endInteraction())},...w,...l,children:(0,u.jsx)("div",{"data-slot":"color-picker-slider-thumb",className:Te,style:d?{left:"50%",top:ge(1-R)}:{left:ge(R),top:"50%"}})})}var Er="forced-color-adjust-none pointer-events-none absolute inset-0 rounded-full bg-[conic-gradient(#f00,#ff0,#0f0,#0ff,#00f,#f0f,#f00)] mask-[radial-gradient(farthest-side,transparent_calc(100%-var(--color-picker-wheel-thickness)),#000_calc(100%-var(--color-picker-wheel-thickness)+1px))]";function tn({className:e,children:t,onKeyDown:n,...o}){let r=C("ColorPickerWheel"),[a]=z(r.display,"hsv"),l=p=>{r.emit(H(r.getColor(),"hsv","hue",K(Math.round(p))))},{dragging:i,handlers:s}=De(r,(p,d)=>{let b=d.getBoundingClientRect(),h=p.clientX-b.left-b.width/2,w=p.clientY-b.top-b.height/2;l(Math.atan2(h,-w)*180/Math.PI)}),c=p=>{let d=p.currentTarget.getBoundingClientRect(),b=p.currentTarget.querySelector("[data-slot=color-picker-wheel-thumb]")?.getBoundingClientRect();if(b){let h=d.left+d.width/2,w=d.top+d.height/2,k=2*Math.hypot(b.left+b.width/2-h,b.top+b.height/2-w)-d.width/2;if(Math.hypot(p.clientX-h,p.clientY-w)<k-2)return}s.onPointerDown(p)},f=a*Math.PI/180,m="(50% - var(--color-picker-wheel-thickness) / 2)";return(0,u.jsxs)("div",{"data-slot":"color-picker-wheel",className:T("relative size-48 shrink-0 [--color-picker-wheel-thickness:calc(var(--spacing)*5)]",e),...o,children:[(0,u.jsxs)("div",{role:"slider",tabIndex:r.disabled?-1:0,"aria-label":r.i18n.labels.hue,"aria-valuemin":0,"aria-valuemax":360,"aria-valuenow":Math.round(a),"aria-valuetext":Tt(r.display,"hsv","hue",r.i18n),"aria-disabled":r.disabled||void 0,"aria-readonly":r.readOnly||void 0,"data-slot":"color-picker-wheel-track","data-dragging":i?"":void 0,className:T(Ee,"absolute inset-0 touch-none rounded-full"),onKeyDown:p=>{if(n?.(p),p.defaultPrevented||G(p,r)||!r.editable)return;let d=Ne(p,1);d!==null&&(p.preventDefault(),r.startInteraction(),l(Number.isFinite(d)?Math.round(a)+d:d>0?359:0),r.endInteraction())},...s,onPointerDown:c,children:[(0,u.jsx)("div",{className:Er}),(0,u.jsx)("div",{"data-slot":"color-picker-wheel-thumb",className:Te,style:{left:`calc(50% + ${m} * ${Math.sin(f)})`,top:`calc(50% - ${m} * ${Math.cos(f)})`}})]}),t!==void 0&&(0,u.jsx)("div",{className:"absolute inset-[calc(50%-(50%-var(--color-picker-wheel-thickness))*0.7071+var(--spacing)*1.5)] flex items-center justify-center",children:t})]})}var yt=()=>window.EyeDropper,Dr=()=>()=>{};function Nr({variant:e="ghost",size:t="icon-sm",onClick:n,children:o,...r}){let a=C("ColorPickerEyeDropper");return(0,g.useSyncExternalStore)(Dr,()=>!!yt(),()=>!1)?(0,u.jsx)(W,{type:"button",variant:e,size:t,disabled:!a.editable,"aria-label":a.i18n.labels.eyeDropper,"data-slot":"color-picker-eye-dropper",onClick:async i=>{n?.(i);let s=yt();if(!(i.defaultPrevented||!s))try{let{sRGBHex:c}=await new s().open(),f=I(c);f&&a.change({...f,alpha:a.getColor().alpha})}catch{}},...r,children:o===void 0?(0,u.jsx)(Je,{"aria-hidden":"true"}):o}):null}function Ar({format:e,variant:t="ghost",size:n="icon-sm",onClick:o,children:r,...a}){let l=C("ColorPickerCopy"),i=e??l.shownFormat,s=l.copied===i,{labels:c}=l.i18n;return(0,u.jsx)(W,{type:"button",variant:t,size:n,disabled:l.disabled||!l.color,"aria-label":s?c.copied:c.copy,"aria-keyshortcuts":"Control+C Meta+C","data-slot":"color-picker-copy","data-copied":s?"":void 0,onClick:f=>{o?.(f),f.defaultPrevented||l.copy(i)},...a,children:r===void 0?s?(0,u.jsx)(le,{"aria-hidden":"true"}):(0,u.jsx)(Ze,{"aria-hidden":"true"}):r})}function rn({variant:e="ghost",size:t="sm",onClick:n,children:o,...r}){let a=C("ColorPickerClear");return(0,u.jsx)(W,{type:"button",variant:e,size:t,disabled:!a.editable,"data-slot":"color-picker-clear",onClick:l=>{n?.(l),l.defaultPrevented||a.change(null)},...r,children:o===void 0?a.i18n.labels.clear:o})}var _r={hex:{space:"rgb",channels:["hex"]},rgb:{space:"rgb",channels:["red","green","blue"]},hsl:{space:"hsl",channels:["hue","saturation","lightness"]},hsb:{space:"hsv",channels:["hue","saturation","brightness"]},oklch:{space:"oklch",channels:["lightness","chroma","hue"]}};function kt(e,t,n){if(n==="hex")return E({...e,alpha:1},"hex").slice(1).toUpperCase();if(n==="alpha")return`${Math.round(e.alpha*100)}%`;let o=Y(e,t,n);return n==="chroma"?N(o,3):t==="oklch"?N(o,1):String(Math.round(o))}var Rr=/^([+-]?(?:\d+(?:[.,]\d*)?|[.,]\d+))\s*(%|°|deg|grad|rad|turn)?$/;function wt(e,t,n,o){if(o==="hex"){let c=e.trim().replace(/^#/,""),f=/^[\da-f]+$/i.test(c)?I(c):null;return f?c.length===4||c.length===8?f:{...f,alpha:t.alpha}:null}let r=Rr.exec(e.trim().toLowerCase());if(!r)return null;let a=Number(r[1].replace(",",".")),l=r[2];if(!Number.isFinite(a))return null;if(o==="hue"){if(l==="%")return null;let c=l==="rad"?a*180/Math.PI:l==="grad"?a*.9:l==="turn"?a*360:a;return H(t,n,o,K(c))}if(l&&l!=="%")return null;if(o==="alpha")return{...t,alpha:x(a/100,0,1)};let{max:i}=X(n,o),s=l==="%"?a*i/100:a;return H(t,n,o,x(s,0,i))}function xt({channel:e,colorSpace:t,className:n,onBlur:o,onKeyDown:r,onChange:a,ref:l,...i}){let s=C("ColorPickerChannelInput"),c=e==="hex"?"rgb":It(e,t),[f,m]=(0,g.useState)(null),p=kt(s.display,c,e),d=f??p,b=(0,g.useRef)(null);Rt(b,f!==null,()=>m(null));let{max:h}=X(c,e==="hex"?"red":e),w=e==="hex"?{}:{role:"spinbutton","aria-valuemin":0,"aria-valuemax":e==="alpha"?100:h,"aria-valuenow":e==="alpha"?Math.round(s.display.alpha*100):Number(kt(s.display,c,e)),"aria-valuetext":d},A=()=>{if(f===null||(m(null),f===p))return;let k=wt(f,s.display,c,e);k&&s.change(k)};return(0,u.jsx)(ue,{value:d,inputMode:e==="hex"?"text":"decimal",maxLength:e==="hex"?9:8,disabled:s.disabled,readOnly:s.readOnly,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:!1,"aria-label":s.i18n.labels[e],...w,"data-channel":e,className:T("h-auto min-w-0 self-stretch pr-1 pl-2 tabular-nums",e==="hex"?"flex-[1_1_calc(5.8ch+0.75rem)] uppercase":e==="alpha"?"flex-[1_1_calc(4.8ch+0.75rem)]":c!=="oklch"?"flex-[1_1_calc(3.25ch+0.75rem)]":e==="lightness"?"flex-[1_1_calc(3.7ch+0.75rem)]":"flex-[1_1_calc(4.7ch+0.75rem)]",n),onChange:k=>{a?.(k),m(k.target.value)},onBlur:k=>{o?.(k),A()},onKeyDown:k=>{if(r?.(k),k.defaultPrevented||G(k,s))return;let _=$r[k.key];if(k.key==="Enter")(0,Ce.flushSync)(()=>A());else if(_&&e!=="hex"&&s.editable){k.preventDefault();let R=wt(d,s.display,c,e);if(!R)return;let B=e==="alpha"?.01:e==="chroma"?.001:1,v=_*B*(k.shiftKey?10:1),{max:D}=X(c,e),$=xe(Y(R,c,e)+v,B);m(null),s.change(H(R,c,e,e==="hue"?K($):x($,0,D)))}},...i,ref:k=>{b.current=k,Z(l,k)}})}var $r={ArrowUp:1,ArrowDown:-1,PageUp:10,PageDown:-10},Ct=(0,u.jsx)(it,{orientation:"vertical","aria-hidden":"true"}),Lr="pr-[0.2rem]";function Or({format:e,defaultFormat:t,onFormatChange:n,formats:o=jt,className:r,...a}){let l=C("ColorPickerFields"),[i,s]=(0,g.useState)(t??l.format),c=e??i,f=_r[c],{setFieldsFormat:m}=l;(0,g.useLayoutEffect)(()=>(m(c),()=>m(null)),[c,m]);let p=o.length>1,d=h=>{e===void 0&&s(h),n?.(h)},b={size:"xs",disabled:l.disabled,"aria-label":`${l.i18n.labels.format}, ${fe[c]}`,"data-slot":"color-picker-format-trigger",className:"gap-1 text-xs font-medium"};return(0,u.jsxs)(ie,{dir:"ltr","data-slot":"color-picker-fields","data-disabled":l.disabled?"":void 0,className:r,...a,children:[p&&(0,u.jsx)(se,{align:"inline-start",className:Lr,children:(0,u.jsxs)(et,{children:[(0,u.jsxs)(tt,{render:(0,u.jsx)(ce,{...b}),children:[fe[c],_t]}),(0,u.jsx)(rt,{align:"start",className:"w-auto min-w-56",onClick:h=>h.stopPropagation(),children:(0,u.jsx)(nt,{value:c,onValueChange:h=>d(h),children:o.map(h=>(0,u.jsxs)(ot,{value:h,closeOnClick:!0,children:[(0,u.jsx)("span",{className:"w-12 shrink-0 font-medium",children:fe[h]}),(0,u.jsx)("span",{className:"text-muted-foreground truncate text-xs tabular-nums",children:E(l.display,h).replace(/^\w+\(|\)$/g,"")})]},h))})})]})}),(0,u.jsxs)("div",{className:"flex min-w-0 flex-1 self-stretch",children:[f.channels.map((h,w)=>(0,u.jsxs)(g.Fragment,{children:[(p||w>0)&&Ct,(0,u.jsx)(xt,{channel:h,colorSpace:f.space})]},`${c}-${h}`)),l.alpha&&(0,u.jsxs)(u.Fragment,{children:[Ct,(0,u.jsx)(xt,{channel:"alpha",className:"w-[calc(4.8ch+0.75rem)] flex-none"})]})]})]})}var Ot=(0,g.createContext)({shape:"square",activeId:null,setActiveId:()=>{}}),vt='[data-slot="color-picker-swatch-item"]:not([aria-disabled="true"])';function zr(e,t,n,o){if(n==="Home")return e[0];if(n==="End")return e[e.length-1];if(!t)return e[0];let r=n==="ArrowDown"||n===(o?"ArrowLeft":"ArrowRight");return e[e.indexOf(t)+(r?1:-1)]}function Br({colors:e,shape:t="square",className:n,children:o,onKeyDown:r,onFocus:a,...l}){let i=C("ColorPickerSwatches"),[s,c]=(0,g.useState)(null),f=(0,g.useRef)(null),m=()=>Array.from(f.current?.querySelectorAll(vt)??[]),p=d=>{d&&(c(d.id),d.scrollIntoView?.({block:"nearest"}))};return(0,u.jsx)(Ot.Provider,{value:{shape:t,activeId:s,setActiveId:c},children:(0,u.jsx)("div",{ref:f,role:"listbox",tabIndex:i.disabled?-1:0,"aria-label":i.i18n.labels.swatches,"aria-activedescendant":s??void 0,"aria-disabled":i.disabled||void 0,"aria-readonly":i.readOnly||void 0,"data-slot":"color-picker-swatches","data-empty":s?void 0:"",className:T("group/color-picker-swatches data-empty:focus-visible:outline-ring grid grid-cols-[repeat(auto-fill,var(--color-picker-swatch-size))] justify-between gap-x-1 gap-y-1.5 outline-none [--color-picker-swatch-size:calc(var(--spacing)*6)] aria-disabled:opacity-50 data-empty:focus-visible:outline-2 data-empty:focus-visible:outline-offset-2",n),onFocus:d=>{if(a?.(d),d.target!==d.currentTarget)return;if(!(s?d.currentTarget.getRootNode().getElementById(s):null)){let h=d.currentTarget.querySelector(`${vt}[aria-selected="true"]`);c(h?.id??null)}},onKeyDown:d=>{if(r?.(d),d.defaultPrevented||G(d,i)||i.disabled)return;let b=m(),h=b.find(A=>A.id===s);if(d.key==="Enter"||d.key===" "){d.preventDefault(),h?.click();return}if(!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(d.key))return;d.preventDefault();let w=getComputedStyle(d.currentTarget).direction==="rtl";p(zr(b,h,d.key,w)??h)},...l,children:o??e?.map((d,b)=>{let h=typeof d=="string"?{value:d}:d;return(0,u.jsx)(Kr,{value:h.value,label:h.label},`${b}-${h.value}`)})})})}var Fr="rounded-md",Hr="forced-color-adjust-none relative flex size-(--color-picker-swatch-size) shrink-0 cursor-default items-center justify-center outline-offset-2 transition-[scale] duration-150 after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] after:inset-ring after:inset-ring-foreground/10 not-aria-disabled:hover:scale-110 aria-disabled:opacity-40 motion-reduce:transition-none group-focus-visible/color-picker-swatches:data-active:outline-2 group-focus-visible/color-picker-swatches:data-active:outline-ring [&_svg]:size-3.5";function Kr({value:e,label:t,disabled:n=!1,className:o,style:r,onClick:a,...l}){let i=C("ColorPickerSwatchItem"),s=(0,g.useContext)(Ot),c=(0,g.useId)(),f=I(e),m=f&&!i.alpha?{...f,alpha:1}:f,p=!!m&&!!i.color&&E(m,"hex")===E(i.color,"hex"),d=(m&&ur(m,{light:"#fff",dark:"#000"}))??"#000",b=n||!m;return(0,u.jsx)("div",{id:c,role:"option","aria-selected":p,"aria-disabled":b||void 0,"aria-label":t??(m?i.i18n.functions.getColorName(m):e),"data-slot":"color-picker-swatch-item","data-active":s.activeId===c?"":void 0,"data-selected":p?"":void 0,className:T(Hr,s.shape==="circle"?"rounded-full":Fr,o),style:{background:Nt(m),color:d,...r},onClick:h=>{a?.(h),!(h.defaultPrevented||b||!i.editable)&&(s.setActiveId(c),i.change(m))},...l,children:p&&(0,u.jsx)(le,{"aria-hidden":"true"})})}export{jt as COLOR_PICKER_FORMATS,Jr as ColorPicker,Ir as ColorPickerArea,xt as ColorPickerChannelInput,rn as ColorPickerClear,vr as ColorPickerContent,Ar as ColorPickerCopy,Nr as ColorPickerEyeDropper,Or as ColorPickerFields,en as ColorPickerInput,Pr as ColorPickerPanel,mt as ColorPickerSlider,At as ColorPickerSwatch,Kr as ColorPickerSwatchItem,Br as ColorPickerSwatches,xr as ColorPickerTrigger,kr as ColorPickerValue,tn as ColorPickerWheel,pe as DEFAULT_COLOR_PICKER_I18N,E as formatColor,sr as getContrastRatio,ur as getForegroundColor,Qr as isColorInSrgb,hr as mergeColorPickerI18n,I as parseColor,Zr as useColorPicker};
2
+ //# sourceMappingURL=color-picker-RRCCLR54.js.map