@univerjs/design 0.17.0 → 0.18.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 (140) hide show
  1. package/lib/cjs/index.js +322 -88
  2. package/lib/cjs/locale/ca-ES.js +1 -1
  3. package/lib/cjs/locale/en-US.js +1 -1
  4. package/lib/cjs/locale/es-ES.js +1 -1
  5. package/lib/cjs/locale/fa-IR.js +1 -1
  6. package/lib/cjs/locale/fr-FR.js +1 -1
  7. package/lib/cjs/locale/ja-JP.js +1 -1
  8. package/lib/cjs/locale/ko-KR.js +1 -1
  9. package/lib/cjs/locale/ru-RU.js +1 -1
  10. package/lib/cjs/locale/sk-SK.js +1 -1
  11. package/lib/cjs/locale/vi-VN.js +1 -1
  12. package/lib/cjs/locale/zh-CN.js +1 -1
  13. package/lib/cjs/locale/zh-TW.js +1 -1
  14. package/lib/es/index.js +329 -15659
  15. package/lib/es/locale/ca-ES.js +1 -50
  16. package/lib/es/locale/en-US.js +1 -50
  17. package/lib/es/locale/es-ES.js +1 -50
  18. package/lib/es/locale/fa-IR.js +1 -50
  19. package/lib/es/locale/fr-FR.js +1 -50
  20. package/lib/es/locale/ja-JP.js +1 -50
  21. package/lib/es/locale/ko-KR.js +1 -50
  22. package/lib/es/locale/ru-RU.js +1 -50
  23. package/lib/es/locale/sk-SK.js +1 -50
  24. package/lib/es/locale/vi-VN.js +1 -50
  25. package/lib/es/locale/zh-CN.js +1 -50
  26. package/lib/es/locale/zh-TW.js +1 -50
  27. package/lib/index.css +2580 -1
  28. package/lib/index.js +329 -15659
  29. package/lib/locale/ca-ES.js +1 -50
  30. package/lib/locale/en-US.js +1 -50
  31. package/lib/locale/es-ES.js +1 -50
  32. package/lib/locale/fa-IR.js +1 -50
  33. package/lib/locale/fr-FR.js +1 -50
  34. package/lib/locale/ja-JP.js +1 -50
  35. package/lib/locale/ko-KR.js +1 -50
  36. package/lib/locale/ru-RU.js +1 -50
  37. package/lib/locale/sk-SK.js +1 -50
  38. package/lib/locale/vi-VN.js +1 -50
  39. package/lib/locale/zh-CN.js +1 -50
  40. package/lib/locale/zh-TW.js +1 -50
  41. package/lib/types/components/accordion/Accordion.d.ts +16 -1
  42. package/lib/types/components/accordion/Accordion.stories.d.ts +16 -1
  43. package/lib/types/components/avatar/Avatar.d.ts +18 -3
  44. package/lib/types/components/avatar/Avatar.stories.d.ts +16 -1
  45. package/lib/types/components/badge/Badge.d.ts +16 -1
  46. package/lib/types/components/badge/Badge.stories.d.ts +16 -1
  47. package/lib/types/components/button/Button.d.ts +19 -4
  48. package/lib/types/components/button/Button.stories.d.ts +16 -1
  49. package/lib/types/components/button/ButtonGroup.d.ts +17 -2
  50. package/lib/types/components/button/ButtonGroup.stories.d.ts +16 -1
  51. package/lib/types/components/calendar/Calendar.stories.d.ts +16 -1
  52. package/lib/types/components/cascader-list/CascaderList.stories.d.ts +16 -1
  53. package/lib/types/components/checkbox/Checkbox.d.ts +16 -1
  54. package/lib/types/components/checkbox/Checkbox.stories.d.ts +16 -1
  55. package/lib/types/components/checkbox-group/CheckboxGroup.d.ts +16 -1
  56. package/lib/types/components/checkbox-group/CheckboxGroup.stories.d.ts +16 -1
  57. package/lib/types/components/color-picker/ColorPicker.stories.d.ts +16 -1
  58. package/lib/types/components/config-provider/ConfigProvider.d.ts +17 -2
  59. package/lib/types/components/config-provider/ConfigProvider.stories.d.ts +16 -1
  60. package/lib/types/components/confirm/Confirm.d.ts +16 -1
  61. package/lib/types/components/confirm/Confirm.stories.d.ts +16 -1
  62. package/lib/types/components/date-picker/DatePicker.stories.d.ts +16 -1
  63. package/lib/types/components/date-range-picker/DateRangePicker.stories.d.ts +16 -1
  64. package/lib/types/components/dialog/Dialog.d.ts +16 -1
  65. package/lib/types/components/dialog/Dialog.stories.d.ts +16 -1
  66. package/lib/types/components/dialog/DialogPrimitive.d.ts +24 -9
  67. package/lib/types/components/draggable-list/DraggableList.d.ts +16 -1
  68. package/lib/types/components/draggable-list/DraggableList.stories.d.ts +16 -1
  69. package/lib/types/components/dropdown/Dropdown.d.ts +16 -1
  70. package/lib/types/components/dropdown/Dropdown.stories.d.ts +16 -1
  71. package/lib/types/components/dropdown/PopoverPrimitive.d.ts +16 -1
  72. package/lib/types/components/dropdown-menu/DropdownMenu.d.ts +16 -1
  73. package/lib/types/components/dropdown-menu/DropdownMenuPrimitive.d.ts +16 -1
  74. package/lib/types/components/form-layout/FormLayout.d.ts +16 -1
  75. package/lib/types/components/form-layout/FormLayout.stories.d.ts +16 -1
  76. package/lib/types/components/gallery/Gallery.d.ts +1 -1
  77. package/lib/types/components/gallery/Gallery.stories.d.ts +16 -1
  78. package/lib/types/components/gradient-color-picker/GradientColorPicker.stories.d.ts +16 -1
  79. package/lib/types/components/hover-card/HoverCard.d.ts +16 -1
  80. package/lib/types/components/hover-card/HoverCard.stories.d.ts +16 -1
  81. package/lib/types/components/hover-card/HoverCardPrimitive.d.ts +4 -4
  82. package/lib/types/components/input/Input.d.ts +19 -4
  83. package/lib/types/components/input/Input.stories.d.ts +16 -1
  84. package/lib/types/components/input-number/InputNumber.d.ts +17 -2
  85. package/lib/types/components/input-number/InputNumber.stories.d.ts +16 -1
  86. package/lib/types/components/kbd/Kbd.stories.d.ts +16 -1
  87. package/lib/types/components/message/Message.d.ts +16 -1
  88. package/lib/types/components/message/Message.stories.d.ts +16 -1
  89. package/lib/types/components/pager/Pager.stories.d.ts +16 -1
  90. package/lib/types/components/popup/Popup.d.ts +17 -2
  91. package/lib/types/components/popup/Popup.stories.d.ts +16 -1
  92. package/lib/types/components/radio/Radio.d.ts +16 -1
  93. package/lib/types/components/radio/Radio.stories.d.ts +16 -1
  94. package/lib/types/components/radio-group/RadioGroup.d.ts +16 -1
  95. package/lib/types/components/radio-group/RadioGroup.stories.d.ts +16 -1
  96. package/lib/types/components/segmented/Segmented.stories.d.ts +16 -1
  97. package/lib/types/components/select/MultipleSelect.d.ts +16 -1
  98. package/lib/types/components/select/Select.d.ts +16 -1
  99. package/lib/types/components/select/Select.stories.d.ts +16 -1
  100. package/lib/types/components/select-list/SelectList.stories.d.ts +16 -1
  101. package/lib/types/components/separator/Separator.d.ts +16 -1
  102. package/lib/types/components/textarea/Textarea.d.ts +17 -2
  103. package/lib/types/components/toaster/Toaster.d.ts +16 -1
  104. package/lib/types/components/tooltip/Tooltip.d.ts +16 -1
  105. package/lib/types/components/tooltip/Tooltip.stories.d.ts +16 -1
  106. package/lib/types/components/tree/Tree.d.ts +16 -1
  107. package/lib/types/components/tree/Tree.stories.d.ts +16 -1
  108. package/lib/types/components/tree/util.d.ts +16 -1
  109. package/lib/types/components/virtual-list/VirtualList.d.ts +16 -1
  110. package/lib/types/helper/clsx.d.ts +16 -1
  111. package/lib/types/index.d.ts +0 -1
  112. package/lib/types/locale/ca-ES.d.ts +16 -1
  113. package/lib/types/locale/es-ES.d.ts +16 -1
  114. package/lib/types/locale/fa-IR.d.ts +16 -1
  115. package/lib/types/locale/fr-FR.d.ts +16 -1
  116. package/lib/types/locale/ja-JP.d.ts +16 -1
  117. package/lib/types/locale/ko-KR.d.ts +16 -1
  118. package/lib/types/locale/ru-RU.d.ts +16 -1
  119. package/lib/types/locale/sk-SK.d.ts +16 -1
  120. package/lib/types/locale/vi-VN.d.ts +16 -1
  121. package/lib/types/locale/zh-CN.d.ts +16 -1
  122. package/lib/types/locale/zh-TW.d.ts +16 -1
  123. package/lib/umd/index.js +349 -71
  124. package/lib/umd/locale/ca-ES.js +1 -1
  125. package/lib/umd/locale/en-US.js +1 -1
  126. package/lib/umd/locale/es-ES.js +1 -1
  127. package/lib/umd/locale/fa-IR.js +1 -1
  128. package/lib/umd/locale/fr-FR.js +1 -1
  129. package/lib/umd/locale/ja-JP.js +1 -1
  130. package/lib/umd/locale/ko-KR.js +1 -1
  131. package/lib/umd/locale/ru-RU.js +1 -1
  132. package/lib/umd/locale/sk-SK.js +1 -1
  133. package/lib/umd/locale/vi-VN.js +1 -1
  134. package/lib/umd/locale/zh-CN.js +1 -1
  135. package/lib/umd/locale/zh-TW.js +1 -1
  136. package/package.json +7 -9
  137. package/lib/types/components/menu/Menu.d.ts +0 -27
  138. package/lib/types/components/menu/index.d.ts +0 -17
  139. package/lib/types/components/menu/menu.stories.d.ts +0 -27
  140. package/lib/types/type.d.ts +0 -18
package/lib/cjs/index.js CHANGED
@@ -1,12 +1,30 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("react/jsx-runtime"),y=require("react"),ut=require("react-dom"),uv=require("react-dom/client");function Xu(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const d=Xu(y),Qu=Xu(ut);function Ge({ref:e,...t}){const{icon:n,id:r,className:o,extend:i,...a}=t,s=`univerjs-icon univerjs-icon-${r} ${o||""}`.trim(),c=y.useRef(`_${dv()}`);return Ju(n,`${r}`,{defIds:n.defIds,idSuffix:c.current},{ref:e,className:s,...a},i)}function Ju(e,t,n,r,o){return y.createElement(e.tag,{key:t,...lv(e,n,o),...r},(cv(e,n).children||[]).map((i,a)=>Ju(i,`${t}-${e.tag}-${a}`,n,void 0,o)))}function lv(e,t,n){const r={...e.attrs};n!=null&&n.colorChannel1&&r.fill==="colorChannel1"&&(r.fill=n.colorChannel1),e.tag==="mask"&&r.id&&(r.id=r.id+t.idSuffix),Object.entries(r).forEach(([i,a])=>{i==="mask"&&typeof a=="string"&&(r[i]=a.replace(/url\(#(.*)\)/,`url(#$1${t.idSuffix})`))});const{defIds:o}=t;return!o||o.length===0||(e.tag==="use"&&r["xlink:href"]&&(r["xlink:href"]=r["xlink:href"]+t.idSuffix),Object.entries(r).forEach(([i,a])=>{typeof a=="string"&&(r[i]=a.replace(/url\(#(.*)\)/,`url(#$1${t.idSuffix})`))})),r}function cv(e,t){var r;const{defIds:n}=t;return!n||n.length===0?e:e.tag==="defs"&&((r=e.children)!=null&&r.length)?{...e,children:e.children.map(o=>typeof o.attrs.id=="string"&&n&&n.includes(o.attrs.id)?{...o,attrs:{...o.attrs,id:o.attrs.id+t.idSuffix}}:o)}:e}function dv(){return Math.random().toString(36).substring(2,8)}Ge.displayName="UniverIcon";const fv={tag:"svg",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 17 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M8.87598 11.8327C8.87598 11.5013 9.14461 11.2327 9.47598 11.2327H11.476C11.8073 11.2327 12.076 11.5013 12.076 11.8327C12.076 12.164 11.8073 12.4327 11.476 12.4327H9.47598C9.14461 12.4327 8.87598 12.164 8.87598 11.8327Z"}},{tag:"path",attrs:{fill:"currentColor",d:"M4.80898 11.2327C4.47761 11.2327 4.20898 11.5013 4.20898 11.8327C4.20898 12.164 4.47761 12.4327 4.80898 12.4327H6.80898C7.14036 12.4327 7.40898 12.164 7.40898 11.8327C7.40898 11.5013 7.14036 11.2327 6.80898 11.2327H4.80898Z"}},{tag:"path",attrs:{fill:"currentColor",d:"M8.87598 9.16592C8.87598 8.83455 9.14461 8.56592 9.47598 8.56592H11.476C11.8073 8.56592 12.076 8.83455 12.076 9.16592C12.076 9.49729 11.8073 9.76592 11.476 9.76592H9.47598C9.14461 9.76592 8.87598 9.49729 8.87598 9.16592Z"}},{tag:"path",attrs:{fill:"currentColor",d:"M4.80898 8.56592C4.47761 8.56592 4.20898 8.83455 4.20898 9.16592C4.20898 9.49729 4.47761 9.76592 4.80898 9.76592H6.80898C7.14036 9.76592 7.40898 9.49729 7.40898 9.16592C7.40898 8.83455 7.14036 8.56592 6.80898 8.56592H4.80898Z"}},{tag:"path",attrs:{fill:"currentColor",d:"M6.00615 1.69985C6.00615 1.36848 5.73752 1.09985 5.40615 1.09985C5.07478 1.09985 4.80615 1.36848 4.80615 1.69985V2.34009H3.64248C2.20654 2.34009 1.04248 3.50415 1.04248 4.94009V12.3C1.04248 13.7359 2.20654 14.9 3.64248 14.9H12.6425C14.0784 14.9 15.2425 13.7359 15.2425 12.3V4.94009C15.2425 3.50415 14.0784 2.34009 12.6425 2.34009H11.4798V1.69985C11.4798 1.36848 11.2112 1.09985 10.8798 1.09985C10.5484 1.09985 10.2798 1.36848 10.2798 1.69985V2.34009H6.00615V1.69985ZM14.0425 5.97021V4.94009C14.0425 4.16689 13.4157 3.54009 12.6425 3.54009H11.4798V4.09985C11.4798 4.43122 11.2112 4.69985 10.8798 4.69985C10.5484 4.69985 10.2798 4.43122 10.2798 4.09985V3.54009H6.00615V4.09985C6.00615 4.43122 5.73752 4.69985 5.40615 4.69985C5.07478 4.69985 4.80615 4.43122 4.80615 4.09985V3.54009H3.64248C2.86928 3.54009 2.24248 4.16689 2.24248 4.94009V5.97021H14.0425ZM2.24248 7.17021H14.0425V12.3C14.0425 13.0731 13.4157 13.7 12.6425 13.7H3.64248C2.86928 13.7 2.24248 13.0732 2.24248 12.3V7.17021Z",fillRule:"evenodd",clipRule:"evenodd"}}]},La=y.forwardRef(function(t,n){return y.createElement(Ge,Object.assign({},t,{id:"calendar-icon",ref:n,icon:fv}))});La.displayName="CalendarIcon";const vv={tag:"svg",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M14.1544 3.75557C14.3887 3.98988 14.3887 4.36978 14.1544 4.6041L6.51409 12.2444C6.40157 12.3569 6.24896 12.4201 6.08983 12.4201C5.9307 12.4201 5.77808 12.3569 5.66556 12.2444L1.84541 8.42425C1.6111 8.18993 1.6111 7.81003 1.84541 7.57572C2.07973 7.34141 2.45963 7.34141 2.69394 7.57572L6.08983 10.9716L13.3059 3.75557C13.5402 3.52126 13.9201 3.52126 14.1544 3.75557Z",fillRule:"evenodd",clipRule:"evenodd"}}]},br=y.forwardRef(function(t,n){return y.createElement(Ge,Object.assign({},t,{id:"check-mark-icon",ref:n,icon:vv}))});br.displayName="CheckMarkIcon";const mv={tag:"svg",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 17 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M8.24483 4.80026C8.24487 4.46889 7.97627 4.20023 7.6449 4.2002C7.31353 4.20016 7.04487 4.46876 7.04483 4.80013L7.04443 8.40306C7.04442 8.56222 7.10763 8.71486 7.22017 8.82739L9.64664 11.2539C9.88095 11.4882 10.2608 11.4882 10.4952 11.2539C10.7295 11.0195 10.7295 10.6396 10.4952 10.4053L8.24446 8.15463L8.24483 4.80026Z"}},{tag:"path",attrs:{fill:"currentColor",d:"M8.14248 0.899902C4.22126 0.899902 1.04248 4.07868 1.04248 7.9999C1.04248 11.9211 4.22126 15.0999 8.14248 15.0999C12.0637 15.0999 15.2425 11.9211 15.2425 7.9999C15.2425 4.07868 12.0637 0.899902 8.14248 0.899902ZM2.24248 7.9999C2.24248 4.74142 4.884 2.0999 8.14248 2.0999C11.401 2.0999 14.0425 4.74142 14.0425 7.9999C14.0425 11.2584 11.401 13.8999 8.14248 13.8999C4.884 13.8999 2.24248 11.2584 2.24248 7.9999Z",fillRule:"evenodd",clipRule:"evenodd"}}]},el=y.forwardRef(function(t,n){return y.createElement(Ge,Object.assign({},t,{id:"clock-icon",ref:n,icon:mv}))});el.displayName="ClockIcon";const pv={tag:"svg",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M3.71274 2.86421C3.47843 2.6299 3.09853 2.6299 2.86421 2.86421C2.6299 3.09853 2.6299 3.47843 2.86421 3.71274L7.15154 8.00007L2.86421 12.2874C2.6299 12.5217 2.6299 12.9016 2.86421 13.1359C3.09853 13.3702 3.47843 13.3702 3.71274 13.1359L8.00007 8.84859L12.2874 13.1359C12.5217 13.3702 12.9016 13.3702 13.1359 13.1359C13.3702 12.9016 13.3702 12.5217 13.1359 12.2874L8.84859 8.00007L13.1359 3.71274C13.3702 3.47843 13.3702 3.09853 13.1359 2.86421C12.9016 2.6299 12.5217 2.6299 12.2874 2.86421L8.00007 7.15154L3.71274 2.86421Z"}}]},ii=y.forwardRef(function(t,n){return y.createElement(Ge,Object.assign({},t,{id:"close-icon",ref:n,icon:pv}))});ii.displayName="CloseIcon";const hv={tag:"svg",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M5.3313 1.4667C5.3313 1.13533 5.59993 0.866699 5.9313 0.866699H10.069C10.4004 0.866699 10.669 1.13533 10.669 1.4667C10.669 1.79807 10.4004 2.0667 10.069 2.0667H5.9313C5.59993 2.0667 5.3313 1.79807 5.3313 1.4667Z"}},{tag:"path",attrs:{fill:"currentColor",d:"M1.09985 3.64443C1.09985 3.31306 1.36848 3.04443 1.69985 3.04443H14.2999C14.6312 3.04443 14.8999 3.31306 14.8999 3.64443C14.8999 3.9758 14.6312 4.24443 14.2999 4.24443H1.69985C1.36848 4.24443 1.09985 3.9758 1.09985 3.64443Z"}},{tag:"path",attrs:{fill:"currentColor",d:"M6.12398 8.30171C6.35829 8.0674 6.73819 8.0674 6.97251 8.30171L8.00007 9.32928L9.02764 8.30171C9.26195 8.0674 9.64185 8.0674 9.87617 8.30171C10.1105 8.53603 10.1105 8.91593 9.87617 9.15024L8.8486 10.1778L9.87617 11.2054C10.1105 11.4397 10.1105 11.8196 9.87617 12.0539C9.64185 12.2882 9.26195 12.2882 9.02764 12.0539L8.00007 11.0263L6.97251 12.0539C6.73819 12.2882 6.35829 12.2882 6.12398 12.0539C5.88966 11.8196 5.88966 11.4397 6.12398 11.2054L7.15154 10.1778L6.12398 9.15024C5.88966 8.91593 5.88966 8.53603 6.12398 8.30171Z"}},{tag:"path",attrs:{fill:"currentColor",d:"M4.75332 5.22217C3.86966 5.22217 3.15332 5.93851 3.15332 6.82217V12.5331C3.15332 13.9691 4.31738 15.1332 5.75332 15.1332H10.2465C11.6825 15.1332 12.8465 13.9691 12.8465 12.5331V6.82217C12.8465 5.93851 12.1302 5.22217 11.2465 5.22217H4.75332ZM4.35332 6.82217C4.35332 6.60125 4.53241 6.42217 4.75332 6.42217H11.2465C11.4674 6.42217 11.6465 6.60125 11.6465 6.82217V12.5331C11.6465 13.3063 11.0197 13.9332 10.2465 13.9332H5.75332C4.98012 13.9332 4.35332 13.3063 4.35332 12.5331V6.82217Z",fillRule:"evenodd",clipRule:"evenodd"}}]},tl=y.forwardRef(function(t,n){return y.createElement(Ge,Object.assign({},t,{id:"delete-icon",ref:n,icon:hv}))});tl.displayName="DeleteIcon";const gv={tag:"svg",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M10.5547 14.1884C10.2599 14.5214 9.74019 14.5214 9.4454 14.1884L3.71321 7.71335C3.29002 7.23532 3.6294 6.48161 4.26784 6.48161L15.7322 6.48161C16.3707 6.48161 16.7101 7.23532 16.2869 7.71335L10.5547 14.1884Z"}}]},nl=y.forwardRef(function(t,n){return y.createElement(Ge,Object.assign({},t,{id:"down-icon",ref:n,icon:gv}))});nl.displayName="DownIcon";const bv={tag:"svg",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M8.85869 12.9216C8.38445 13.4708 7.61555 13.4708 7.14131 12.9216L0.358114 5.06726C-0.406895 4.18144 0.134916 2.66683 1.2168 2.66683L14.7832 2.66683C15.8651 2.66683 16.4069 4.18144 15.6419 5.06726L8.85869 12.9216Z"}}]},rl=y.forwardRef(function(t,n){return y.createElement(Ge,Object.assign({},t,{id:"dropdown-icon",ref:n,icon:bv}))});rl.displayName="DropdownIcon";const yv={tag:"svg",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M15 8C15 11.866 11.866 15 8 15C4.13401 15 1 11.866 1 8C1 4.13401 4.13401 1 8 1C11.866 1 15 4.13401 15 8ZM10.3097 5.69014C10.544 5.92445 10.544 6.30435 10.3097 6.53867L8.84843 7.9999L10.3099 9.46137C10.5442 9.69569 10.5442 10.0756 10.3099 10.3099C10.0756 10.5442 9.69569 10.5442 9.46137 10.3099L7.9999 8.84843L6.53842 10.3099C6.30411 10.5442 5.92421 10.5442 5.6899 10.3099C5.45558 10.0756 5.45558 9.69569 5.6899 9.46137L7.15137 7.9999L5.69014 6.53867C5.45583 6.30435 5.45583 5.92445 5.69014 5.69014C5.92445 5.45583 6.30435 5.45583 6.53867 5.69014L7.9999 7.15137L9.46113 5.69014C9.69544 5.45583 10.0753 5.45583 10.3097 5.69014Z",fillRule:"evenodd",clipRule:"evenodd"}}]},ol=y.forwardRef(function(t,n){return y.createElement(Ge,Object.assign({},t,{id:"error-icon",ref:n,icon:yv}))});ol.displayName="ErrorIcon";const xv={tag:"svg",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M8.00016 1.33203C6.68162 1.33203 5.39269 1.72302 4.29636 2.45557C3.20004 3.18811 2.34555 4.2293 1.84097 5.44747C1.33638 6.66565 1.20436 8.00609 1.4616 9.2993C1.71883 10.5925 2.35377 11.7804 3.28612 12.7127C4.21847 13.6451 5.40636 14.28 6.69956 14.5373C7.99277 14.7945 9.33321 14.6625 10.5514 14.1579C11.7696 13.6533 12.8108 12.7988 13.5433 11.7025C14.2758 10.6062 14.6668 9.31724 14.6668 7.9987C14.6649 6.23118 13.9619 4.53662 12.7121 3.2868C11.4622 2.03697 9.76768 1.33397 8.00016 1.33203ZM7.66683 3.9987C7.86461 3.9987 8.05795 4.05735 8.2224 4.16723C8.38685 4.27711 8.51502 4.43329 8.59071 4.61601C8.6664 4.79874 8.6862 4.99981 8.64762 5.19379C8.60903 5.38777 8.51379 5.56595 8.37394 5.7058C8.23409 5.84566 8.0559 5.9409 7.86192 5.97948C7.66794 6.01807 7.46687 5.99826 7.28415 5.92258C7.10142 5.84689 6.94524 5.71872 6.83536 5.55427C6.72548 5.38982 6.66683 5.19648 6.66683 4.9987C6.66683 4.73348 6.77219 4.47913 6.95972 4.29159C7.14726 4.10405 7.40162 3.9987 7.66683 3.9987ZM9.3335 11.332H6.66683C6.49002 11.332 6.32045 11.2618 6.19543 11.1368C6.0704 11.0117 6.00016 10.8422 6.00016 10.6654C6.00016 10.4886 6.0704 10.319 6.19543 10.194C6.32045 10.0689 6.49002 9.9987 6.66683 9.9987H7.3335V7.9987H6.66683C6.49002 7.9987 6.32045 7.92846 6.19543 7.80343C6.0704 7.67841 6.00016 7.50884 6.00016 7.33203C6.00016 7.15522 6.0704 6.98565 6.19543 6.86063C6.32045 6.7356 6.49002 6.66536 6.66683 6.66536H8.00016C8.17698 6.66536 8.34655 6.7356 8.47157 6.86063C8.59659 6.98565 8.66683 7.15522 8.66683 7.33203V9.9987H9.3335C9.51031 9.9987 9.67988 10.0689 9.8049 10.194C9.92993 10.319 10.0002 10.4886 10.0002 10.6654C10.0002 10.8422 9.92993 11.0117 9.8049 11.1368C9.67988 11.2618 9.51031 11.332 9.3335 11.332Z"}}]},il=y.forwardRef(function(t,n){return y.createElement(Ge,Object.assign({},t,{id:"info-icon",ref:n,icon:xv}))});il.displayName="InfoIcon";const wv={tag:"svg",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M11.3536 6.14645C11.5488 6.34171 11.5488 6.65829 11.3536 6.85355L8.35355 9.85355C8.15829 10.0488 7.84171 10.0488 7.64645 9.85355L4.64645 6.85355C4.45118 6.65829 4.45118 6.34171 4.64645 6.14645C4.84171 5.95118 5.15829 5.95118 5.35355 6.14645L8 8.79289L10.6464 6.14645C10.8417 5.95118 11.1583 5.95118 11.3536 6.14645Z",fillRule:"evenodd",clipRule:"evenodd"}}]},$a=y.forwardRef(function(t,n){return y.createElement(Ge,Object.assign({},t,{id:"more-down-icon",ref:n,icon:wv}))});$a.displayName="MoreDownIcon";const Cv={tag:"svg",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 17 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M10.3536 12.3536C10.1583 12.5488 9.84171 12.5488 9.64645 12.3536L6.64645 9.35355C6.45118 9.15829 6.45118 8.84171 6.64645 8.64645L9.64645 5.64645C9.84171 5.45118 10.1583 5.45118 10.3536 5.64645C10.5488 5.84171 10.5488 6.15829 10.3536 6.35355L7.70711 9L10.3536 11.6464C10.5488 11.8417 10.5488 12.1583 10.3536 12.3536Z",fillRule:"evenodd",clipRule:"evenodd"}}]},al=y.forwardRef(function(t,n){return y.createElement(Ge,Object.assign({},t,{id:"more-left-icon",ref:n,icon:Cv}))});al.displayName="MoreLeftIcon";const Ev={tag:"svg",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M6.14645 4.64645C6.34171 4.45118 6.65829 4.45118 6.85355 4.64645L9.85355 7.64645C10.0488 7.84171 10.0488 8.15829 9.85355 8.35355L6.85355 11.3536C6.65829 11.5488 6.34171 11.5488 6.14645 11.3536C5.95118 11.1583 5.95118 10.8417 6.14645 10.6464L8.79289 8L6.14645 5.35355C5.95118 5.15829 5.95118 4.84171 6.14645 4.64645Z",fillRule:"evenodd",clipRule:"evenodd"}}]},Vr=y.forwardRef(function(t,n){return y.createElement(Ge,Object.assign({},t,{id:"more-right-icon",ref:n,icon:Ev}))});Vr.displayName="MoreRightIcon";const Sv={tag:"svg",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M4.64645 9.85355C4.45118 9.65829 4.45118 9.34171 4.64645 9.14645L7.64645 6.14645C7.84171 5.95118 8.15829 5.95118 8.35355 6.14645L11.3536 9.14645C11.5488 9.34171 11.5488 9.65829 11.3536 9.85355C11.1583 10.0488 10.8417 10.0488 10.6464 9.85355L8 7.20711L5.35355 9.85355C5.15829 10.0488 4.84171 10.0488 4.64645 9.85355Z",fillRule:"evenodd",clipRule:"evenodd"}}]},sl=y.forwardRef(function(t,n){return y.createElement(Ge,Object.assign({},t,{id:"more-up-icon",ref:n,icon:Sv}))});sl.displayName="MoreUpIcon";const Rv={tag:"svg",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M5.65252 5.41446C5.86681 5.53124 6.00016 5.75579 6.00016 5.99984V9.99984C6.00016 10.368 5.70168 10.6665 5.3335 10.6665C4.96531 10.6665 4.66683 10.368 4.66683 9.99984V7.22312L4.36151 7.42005C4.05209 7.61961 3.63948 7.53056 3.43992 7.22115C3.24035 6.91173 3.3294 6.49912 3.63882 6.29956L4.97215 5.43959C5.17724 5.30731 5.43822 5.29767 5.65252 5.41446Z"}},{tag:"path",attrs:{fill:"currentColor",d:"M12.3335 5.99984C12.3335 5.75579 12.2001 5.53124 11.9858 5.41446C11.7716 5.29767 11.5106 5.30731 11.3055 5.43959L9.97215 6.29956C9.66274 6.49912 9.57368 6.91173 9.77325 7.22115C9.97281 7.53056 10.3854 7.61961 10.6948 7.42005L11.0002 7.22312V9.99984C11.0002 10.368 11.2986 10.6665 11.6668 10.6665C12.035 10.6665 12.3335 10.368 12.3335 9.99984V5.99984Z"}},{tag:"path",attrs:{fill:"currentColor",d:"M8.00008 5.99984C8.36827 5.99984 8.66675 6.29831 8.66675 6.6665V6.99984C8.66675 7.36803 8.36827 7.6665 8.00008 7.6665C7.63189 7.6665 7.33341 7.36803 7.33341 6.99984V6.6665C7.33341 6.29831 7.63189 5.99984 8.00008 5.99984Z"}},{tag:"path",attrs:{fill:"currentColor",d:"M8.66675 8.99984C8.66675 8.63165 8.36827 8.33317 8.00008 8.33317C7.63189 8.33317 7.33341 8.63165 7.33341 8.99984V9.33317C7.33341 9.70136 7.63189 9.99984 8.00008 9.99984C8.36827 9.99984 8.66675 9.70136 8.66675 9.33317V8.99984Z"}},{tag:"path",attrs:{fill:"currentColor",d:"M0.666748 2.99984C0.666748 2.26346 1.2637 1.6665 2.00008 1.6665H14.0001C14.7365 1.6665 15.3334 2.26346 15.3334 2.99984V12.9998C15.3334 13.7362 14.7365 14.3332 14.0001 14.3332H2.00008C1.26371 14.3332 0.666748 13.7362 0.666748 12.9998V2.99984ZM14.0001 2.99984H2.00008V12.9998H14.0001V2.99984Z",fillRule:"evenodd",clipRule:"evenodd"}}]},ul=y.forwardRef(function(t,n){return y.createElement(Ge,Object.assign({},t,{id:"one-to-one-icon",ref:n,icon:Rv}))});ul.displayName="OneToOneIcon";const Mv={tag:"svg",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M8 15C11.866 15 15 11.866 15 8C15 4.13401 11.866 1 8 1C4.13401 1 1 4.13401 1 8C1 11.866 4.13401 15 8 15ZM11.7245 6.42417C11.9588 6.18985 11.9588 5.80995 11.7245 5.57564C11.4901 5.34132 11.1102 5.34132 10.8759 5.57564L7.3002 9.15137L5.72446 7.57564C5.49014 7.34132 5.11025 7.34132 4.87593 7.57564C4.64162 7.80995 4.64162 8.18985 4.87593 8.42417L6.87593 10.4242C7.11025 10.6585 7.49014 10.6585 7.72446 10.4242L11.7245 6.42417Z",fillRule:"evenodd",clipRule:"evenodd"}}]},ll=y.forwardRef(function(t,n){return y.createElement(Ge,Object.assign({},t,{id:"success-icon",ref:n,icon:Mv}))});ll.displayName="SuccessIcon";const Nv={tag:"svg",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M15 8C15 11.866 11.866 15 8 15C4.13401 15 1 11.866 1 8C1 4.13401 4.13401 1 8 1C11.866 1 15 4.13401 15 8ZM8.00008 12.3671C8.46031 12.3671 8.83342 11.994 8.83342 11.5338C8.83342 11.0735 8.46031 10.7004 8.00008 10.7004C7.53985 10.7004 7.16675 11.0735 7.16675 11.5338C7.16675 11.994 7.53985 12.3671 8.00008 12.3671ZM8.5999 4.4335C8.5999 4.10213 8.33127 3.8335 7.9999 3.8335C7.66853 3.8335 7.3999 4.10213 7.3999 4.4335V9.36683C7.3999 9.6982 7.66853 9.96683 7.9999 9.96683C8.33127 9.96683 8.5999 9.6982 8.5999 9.36683V4.4335Z",fillRule:"evenodd",clipRule:"evenodd"}}]},cl=y.forwardRef(function(t,n){return y.createElement(Ge,Object.assign({},t,{id:"warning-icon",ref:n,icon:Nv}))});cl.displayName="WarningIcon";const Pv={tag:"svg",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M8.04883 5.38216C8.04883 5.01397 7.75035 4.71549 7.38216 4.71549C7.01397 4.71549 6.71549 5.01397 6.71549 5.38216V6.71897L5.3865 6.7207C5.01831 6.72117 4.72022 7.02004 4.7207 7.38823C4.72118 7.75642 5.02005 8.05451 5.38824 8.05403L6.71549 8.0523V9.38216C6.71549 9.75035 7.01397 10.0488 7.38216 10.0488C7.75035 10.0488 8.04883 9.75035 8.04883 9.38216V8.05056L9.38304 8.04883C9.75123 8.04835 10.0493 7.74948 10.0488 7.38129C10.0484 7.0131 9.74949 6.71502 9.3813 6.7155L8.04883 6.71723V5.38216Z"}},{tag:"path",attrs:{fill:"currentColor",d:"M7.38216 1.04883C3.88437 1.04883 1.04883 3.88437 1.04883 7.38216C1.04883 10.88 3.88437 13.7155 7.38216 13.7155C8.89089 13.7155 10.2764 13.1879 11.3643 12.3072L13.813 14.7559C14.0733 15.0162 14.4954 15.0162 14.7558 14.7559C15.0161 14.4955 15.0161 14.0734 14.7558 13.8131L12.3071 11.3644C13.1879 10.2765 13.7155 8.89095 13.7155 7.38216C13.7155 3.88437 10.88 1.04883 7.38216 1.04883ZM2.38216 7.38216C2.38216 4.62075 4.62075 2.38216 7.38216 2.38216C10.1436 2.38216 12.3822 4.62075 12.3822 7.38216C12.3822 10.1436 10.1436 12.3822 7.38216 12.3822C4.62075 12.3822 2.38216 10.1436 2.38216 7.38216Z",fillRule:"evenodd",clipRule:"evenodd"}}]},dl=y.forwardRef(function(t,n){return y.createElement(Ge,Object.assign({},t,{id:"zoom-in-icon",ref:n,icon:Pv}))});dl.displayName="ZoomInIcon";const kv={tag:"svg",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M4.71549 7.38216C4.71549 7.01397 5.01397 6.71549 5.38216 6.71549H9.38216C9.75035 6.71549 10.0488 7.01397 10.0488 7.38216C10.0488 7.75035 9.75035 8.04883 9.38216 8.04883H5.38216C5.01397 8.04883 4.71549 7.75035 4.71549 7.38216Z"}},{tag:"path",attrs:{fill:"currentColor",d:"M1.04883 7.38216C1.04883 3.88437 3.88437 1.04883 7.38216 1.04883C10.88 1.04883 13.7155 3.88437 13.7155 7.38216C13.7155 8.89095 13.1879 10.2765 12.3071 11.3644L14.7558 13.8131C15.0161 14.0734 15.0161 14.4955 14.7558 14.7559C14.4954 15.0162 14.0733 15.0162 13.813 14.7559L11.3643 12.3072C10.2764 13.1879 8.89089 13.7155 7.38216 13.7155C3.88437 13.7155 1.04883 10.88 1.04883 7.38216ZM7.38216 2.38216C4.62075 2.38216 2.38216 4.62075 2.38216 7.38216C2.38216 10.1436 4.62075 12.3822 7.38216 12.3822C10.1436 12.3822 12.3822 10.1436 12.3822 7.38216C12.3822 4.62075 10.1436 2.38216 7.38216 2.38216Z",fillRule:"evenodd",clipRule:"evenodd"}}]},fl=y.forwardRef(function(t,n){return y.createElement(Ge,Object.assign({},t,{id:"zoom-out-icon",ref:n,icon:kv}))});fl.displayName="ZoomOutIcon";const _v={tag:"svg",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"#0B9EFB",d:"M8.79993 14.0166C8.79993 14.4585 8.44176 14.8166 7.99993 14.8166C4.23529 14.8166 1.18345 11.7648 1.18345 8.00017C1.18345 4.23554 4.23529 1.18369 7.99993 1.1837C11.7646 1.1837 14.8164 4.23554 14.8164 8.00017C14.8164 8.442 14.4582 8.80017 14.0164 8.80017C13.5746 8.80017 13.2164 8.442 13.2164 8.00017C13.2164 5.11919 10.8809 2.7837 7.99993 2.7837C5.11895 2.7837 2.78345 5.11919 2.78345 8.00017C2.78345 10.8812 5.11895 13.2166 7.99993 13.2166C8.44176 13.2166 8.79993 13.5748 8.79993 14.0166Z",fillOpacity:.2,fillRule:"evenodd",clipRule:"evenodd"}},{tag:"path",attrs:{fill:"#0B9EFB",d:"M7.20007 1.98384C7.20007 1.54201 7.55824 1.18384 8.00007 1.18384C11.7647 1.18384 14.8165 4.23568 14.8165 8.00032C14.8165 11.765 11.7647 14.8168 8.00007 14.8168C4.23543 14.8168 1.18359 11.765 1.18359 8.00032C1.18359 7.55849 1.54177 7.20031 1.98359 7.20031C2.42542 7.20031 2.78359 7.55849 2.78359 8.00032C2.78359 10.8813 5.11909 13.2168 8.00007 13.2168C10.8811 13.2168 13.2165 10.8813 13.2165 8.00032C13.2165 5.11933 10.8811 2.78384 8.00007 2.78384C7.55824 2.78384 7.20007 2.42567 7.20007 1.98384Z",fillRule:"evenodd",clipRule:"evenodd"}}]},vl=y.forwardRef(function(t,n){return y.createElement(Ge,Object.assign({},t,{id:"loading-multi-icon",ref:n,icon:_v}))});vl.displayName="LoadingMultiIcon";function ml(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=ml(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function pl(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=ml(e))&&(r&&(r+=" "),r+=t);return r}const Fa="-",Iv=e=>{const t=Av(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const s=a.split(Fa);return s[0]===""&&s.length!==1&&s.shift(),hl(s,t)||Dv(a)},getConflictingClassGroupIds:(a,s)=>{const c=n[a]||[];return s&&r[a]?[...c,...r[a]]:c}}},hl=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?hl(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(Fa);return(a=t.validators.find(({validator:s})=>s(i)))==null?void 0:a.classGroupId},As=/^\[(.+)\]$/,Dv=e=>{if(As.test(e)){const t=As.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Av=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Ov(Object.entries(e.classGroups),n).forEach(([i,a])=>{sa(a,r,i,t)}),r},sa=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:Ts(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(Tv(o)){sa(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,a])=>{sa(a,Ts(t,i),n,r)})})},Ts=(e,t)=>{let n=e;return t.split(Fa).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Tv=e=>e.isThemeGetter,Ov=(e,t)=>t?e.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([a,s])=>[t+a,s])):i);return[n,o]}):e,jv=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(i,a)=>{n.set(i,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let a=n.get(i);if(a!==void 0)return a;if((a=r.get(i))!==void 0)return o(i,a),a},set(i,a){n.has(i)?n.set(i,a):o(i,a)}}},gl="!",Lv=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],i=t.length,a=s=>{const c=[];let l=0,f=0,u;for(let h=0;h<s.length;h++){let x=s[h];if(l===0){if(x===o&&(r||s.slice(h,h+i)===t)){c.push(s.slice(f,h)),f=h+i;continue}if(x==="/"){u=h;continue}}x==="["?l++:x==="]"&&l--}const m=c.length===0?s:s.substring(f),p=m.startsWith(gl),g=p?m.substring(1):m,b=u&&u>f?u-f:void 0;return{modifiers:c,hasImportantModifier:p,baseClassName:g,maybePostfixModifierPosition:b}};return n?s=>n({className:s,parseClassName:a}):a},$v=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},Fv=e=>({cache:jv(e.cacheSize),parseClassName:Lv(e),...Iv(e)}),zv=/\s+/,Bv=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=[],a=e.trim().split(zv);let s="";for(let c=a.length-1;c>=0;c-=1){const l=a[c],{modifiers:f,hasImportantModifier:u,baseClassName:m,maybePostfixModifierPosition:p}=n(l);let g=!!p,b=r(g?m.substring(0,p):m);if(!b){if(!g){s=l+(s.length>0?" "+s:s);continue}if(b=r(m),!b){s=l+(s.length>0?" "+s:s);continue}g=!1}const h=$v(f).join(":"),x=u?h+gl:h,E=x+b;if(i.includes(E))continue;i.push(E);const w=o(b,g);for(let C=0;C<w.length;++C){const S=w[C];i.push(x+S)}s=l+(s.length>0?" "+s:s)}return s};function Hv(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=bl(t))&&(r&&(r+=" "),r+=n);return r}const bl=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=bl(e[r]))&&(n&&(n+=" "),n+=t);return n};function Vv(e,...t){let n,r,o,i=a;function a(c){const l=t.reduce((f,u)=>u(f),e());return n=Fv(l),r=n.cache.get,o=n.cache.set,i=s,s(c)}function s(c){const l=r(c);if(l)return l;const f=Bv(c,n);return o(c,f),f}return function(){return i(Hv.apply(null,arguments))}}const Te=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},yl=/^\[(?:([a-z-]+):)?(.+)\]$/i,Wv=/^\d+\/\d+$/,Kv=new Set(["px","full","screen"]),Uv=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Gv=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Yv=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Zv=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,qv=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,rn=e=>cr(e)||Kv.has(e)||Wv.test(e),Cn=e=>yr(e,"length",om),cr=e=>!!e&&!Number.isNaN(Number(e)),zi=e=>yr(e,"number",cr),Ir=e=>!!e&&Number.isInteger(Number(e)),Xv=e=>e.endsWith("%")&&cr(e.slice(0,-1)),de=e=>yl.test(e),En=e=>Uv.test(e),Qv=new Set(["length","size","percentage"]),Jv=e=>yr(e,Qv,xl),em=e=>yr(e,"position",xl),tm=new Set(["image","url"]),nm=e=>yr(e,tm,am),rm=e=>yr(e,"",im),Dr=()=>!0,yr=(e,t,n)=>{const r=yl.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},om=e=>Gv.test(e)&&!Yv.test(e),xl=()=>!1,im=e=>Zv.test(e),am=e=>qv.test(e),sm=()=>{const e=Te("colors"),t=Te("spacing"),n=Te("blur"),r=Te("brightness"),o=Te("borderColor"),i=Te("borderRadius"),a=Te("borderSpacing"),s=Te("borderWidth"),c=Te("contrast"),l=Te("grayscale"),f=Te("hueRotate"),u=Te("invert"),m=Te("gap"),p=Te("gradientColorStops"),g=Te("gradientColorStopPositions"),b=Te("inset"),h=Te("margin"),x=Te("opacity"),E=Te("padding"),w=Te("saturate"),C=Te("scale"),S=Te("sepia"),R=Te("skew"),L=Te("space"),D=Te("translate"),H=()=>["auto","contain","none"],k=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto",de,t],F=()=>[de,t],z=()=>["",rn,Cn],A=()=>["auto",cr,de],_=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],M=()=>["solid","dashed","dotted","double","none"],I=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],N=()=>["start","end","center","between","around","evenly","stretch"],P=()=>["","0",de],j=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>[cr,de];return{cacheSize:500,separator:":",theme:{colors:[Dr],spacing:[rn,Cn],blur:["none","",En,de],brightness:B(),borderColor:[e],borderRadius:["none","","full",En,de],borderSpacing:F(),borderWidth:z(),contrast:B(),grayscale:P(),hueRotate:B(),invert:P(),gap:F(),gradientColorStops:[e],gradientColorStopPositions:[Xv,Cn],inset:T(),margin:T(),opacity:B(),padding:F(),saturate:B(),scale:B(),sepia:P(),skew:B(),space:F(),translate:F()},classGroups:{aspect:[{aspect:["auto","square","video",de]}],container:["container"],columns:[{columns:[En]}],"break-after":[{"break-after":j()}],"break-before":[{"break-before":j()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[..._(),de]}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:H()}],"overscroll-x":[{"overscroll-x":H()}],"overscroll-y":[{"overscroll-y":H()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[b]}],"inset-x":[{"inset-x":[b]}],"inset-y":[{"inset-y":[b]}],start:[{start:[b]}],end:[{end:[b]}],top:[{top:[b]}],right:[{right:[b]}],bottom:[{bottom:[b]}],left:[{left:[b]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ir,de]}],basis:[{basis:T()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",de]}],grow:[{grow:P()}],shrink:[{shrink:P()}],order:[{order:["first","last","none",Ir,de]}],"grid-cols":[{"grid-cols":[Dr]}],"col-start-end":[{col:["auto",{span:["full",Ir,de]},de]}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":[Dr]}],"row-start-end":[{row:["auto",{span:[Ir,de]},de]}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",de]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",de]}],gap:[{gap:[m]}],"gap-x":[{"gap-x":[m]}],"gap-y":[{"gap-y":[m]}],"justify-content":[{justify:["normal",...N()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...N(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...N(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[E]}],px:[{px:[E]}],py:[{py:[E]}],ps:[{ps:[E]}],pe:[{pe:[E]}],pt:[{pt:[E]}],pr:[{pr:[E]}],pb:[{pb:[E]}],pl:[{pl:[E]}],m:[{m:[h]}],mx:[{mx:[h]}],my:[{my:[h]}],ms:[{ms:[h]}],me:[{me:[h]}],mt:[{mt:[h]}],mr:[{mr:[h]}],mb:[{mb:[h]}],ml:[{ml:[h]}],"space-x":[{"space-x":[L]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[L]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",de,t]}],"min-w":[{"min-w":[de,t,"min","max","fit"]}],"max-w":[{"max-w":[de,t,"none","full","min","max","fit","prose",{screen:[En]},En]}],h:[{h:[de,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[de,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[de,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[de,t,"auto","min","max","fit"]}],"font-size":[{text:["base",En,Cn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",zi]}],"font-family":[{font:[Dr]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",de]}],"line-clamp":[{"line-clamp":["none",cr,zi]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",rn,de]}],"list-image":[{"list-image":["none",de]}],"list-style-type":[{list:["none","disc","decimal",de]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[x]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[x]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...M(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",rn,Cn]}],"underline-offset":[{"underline-offset":["auto",rn,de]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:F()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",de]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",de]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[x]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[..._(),em]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Jv]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},nm]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[x]}],"border-style":[{border:[...M(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[x]}],"divide-style":[{divide:M()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...M()]}],"outline-offset":[{"outline-offset":[rn,de]}],"outline-w":[{outline:[rn,Cn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[x]}],"ring-offset-w":[{"ring-offset":[rn,Cn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",En,rm]}],"shadow-color":[{shadow:[Dr]}],opacity:[{opacity:[x]}],"mix-blend":[{"mix-blend":[...I(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":I()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",En,de]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[u]}],saturate:[{saturate:[w]}],sepia:[{sepia:[S]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[u]}],"backdrop-opacity":[{"backdrop-opacity":[x]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",de]}],duration:[{duration:B()}],ease:[{ease:["linear","in","out","in-out",de]}],delay:[{delay:B()}],animate:[{animate:["none","spin","ping","pulse","bounce",de]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[C]}],"scale-x":[{"scale-x":[C]}],"scale-y":[{"scale-y":[C]}],rotate:[{rotate:[Ir,de]}],"translate-x":[{"translate-x":[D]}],"translate-y":[{"translate-y":[D]}],"skew-x":[{"skew-x":[R]}],"skew-y":[{"skew-y":[R]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",de]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",de]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":F()}],"scroll-mx":[{"scroll-mx":F()}],"scroll-my":[{"scroll-my":F()}],"scroll-ms":[{"scroll-ms":F()}],"scroll-me":[{"scroll-me":F()}],"scroll-mt":[{"scroll-mt":F()}],"scroll-mr":[{"scroll-mr":F()}],"scroll-mb":[{"scroll-mb":F()}],"scroll-ml":[{"scroll-ml":F()}],"scroll-p":[{"scroll-p":F()}],"scroll-px":[{"scroll-px":F()}],"scroll-py":[{"scroll-py":F()}],"scroll-ps":[{"scroll-ps":F()}],"scroll-pe":[{"scroll-pe":F()}],"scroll-pt":[{"scroll-pt":F()}],"scroll-pr":[{"scroll-pr":F()}],"scroll-pb":[{"scroll-pb":F()}],"scroll-pl":[{"scroll-pl":F()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",de]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[rn,Cn,zi]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},um=Vv(sm);function W(...e){return um(pl(e))}function lm(e){const{className:t,items:n}=e,[r,o]=y.useState(null),i=a=>{o(r===a?null:a)};return v.jsx("div",{"data-u-comp":"accordion",className:W("univer-divide-x-0 univer-divide-y univer-divide-solid univer-divide-gray-200 dark:!univer-divide-gray-600",t),children:n.map((a,s)=>v.jsxs("div",{children:[v.jsxs("button",{className:"univer-box-border univer-flex univer-w-full univer-cursor-pointer univer-items-center univer-gap-1.5 univer-border-none univer-bg-transparent univer-p-4 univer-text-left univer-text-gray-700 hover:univer-text-gray-900 focus:univer-outline-none dark:!univer-text-gray-200 dark:hover:!univer-text-white",type:"button",onClick:()=>i(s),children:[v.jsx(nl,{className:W("univer-size-2.5 univer-flex-shrink-0 univer-transition-transform",{"-univer-rotate-90":r!==s,"univer-rotate-0":r===s})}),v.jsx("span",{className:"univer-font-medium",children:a.label})]}),v.jsx("div",{className:W("univer-overflow-hidden univer-transition-[max-height,opacity] univer-duration-500 univer-ease-in-out",{"univer-max-h-screen":r===s,"univer-max-h-0":r!==s}),children:v.jsx("div",{className:"univer-box-border univer-px-4 univer-py-1.5",children:a.children})})]},s))})}const Os=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,js=pl,za=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return js(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(l=>{const f=n==null?void 0:n[l],u=i==null?void 0:i[l];if(f===null)return null;const m=Os(f)||Os(u);return o[l][m]}),s=n&&Object.entries(n).reduce((l,f)=>{let[u,m]=f;return m===void 0||(l[u]=m),l},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((l,f)=>{let{class:u,className:m,...p}=f;return Object.entries(p).every(g=>{let[b,h]=g;return Array.isArray(h)?h.includes({...i,...s}[b]):{...i,...s}[b]===h})?[...l,u,m]:l},[]);return js(e,a,c,n==null?void 0:n.class,n==null?void 0:n.className)},cm=za(`
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let c=require(`@univerjs/icons`),l=require(`react`),u=require(`clsx`),d=require(`tailwind-merge`),f=require(`react/jsx-runtime`),p=require(`class-variance-authority`),m=require(`@radix-ui/react-slot`),h=require(`dayjs`);h=s(h);let g=require(`@radix-ui/react-dialog`),_=require(`@radix-ui/react-popover`),v=require(`react-dom`),y=require(`@radix-ui/react-dropdown-menu`),b=require(`@radix-ui/react-hover-card`),x=require(`sonner`),S=require(`react-transition-group`),C=require(`@radix-ui/react-separator`),w=require(`react-dom/client`);function T(...e){return(0,d.twMerge)((0,u.clsx)(e))}function E(e){let{className:t,items:n}=e,[r,i]=(0,l.useState)(null),a=e=>{i(r===e?null:e)};return(0,f.jsx)(`div`,{"data-u-comp":`accordion`,className:T(`
2
+ univer-divide-x-0 univer-divide-y univer-divide-solid univer-divide-gray-200
3
+ dark:!univer-divide-gray-600
4
+ `,t),children:n.map((e,t)=>(0,f.jsxs)(`div`,{children:[(0,f.jsxs)(`button`,{className:`
5
+ univer-box-border univer-flex univer-w-full univer-cursor-pointer univer-items-center
6
+ univer-gap-1.5 univer-border-none univer-bg-transparent univer-p-4 univer-text-left
7
+ univer-text-gray-700
8
+ hover:univer-text-gray-900
9
+ focus:univer-outline-none
10
+ dark:!univer-text-gray-200
11
+ dark:hover:!univer-text-white
12
+ `,type:`button`,onClick:()=>a(t),children:[(0,f.jsx)(c.DownIcon,{className:T(`univer-size-2.5 univer-flex-shrink-0 univer-transition-transform`,{"-univer-rotate-90":r!==t,"univer-rotate-0":r===t})}),(0,f.jsx)(`span`,{className:`univer-font-medium`,children:e.label})]}),(0,f.jsx)(`div`,{className:T(`
13
+ univer-overflow-hidden univer-transition-[max-height,opacity] univer-duration-500
14
+ univer-ease-in-out
15
+ `,{"univer-max-h-screen":r===t,"univer-max-h-0":r!==t}),children:(0,f.jsx)(`div`,{className:`univer-box-border univer-px-4 univer-py-1.5`,children:e.children})})]},t))})}const D=(0,p.cva)(`
2
16
  univer-relative univer-inline-block univer-overflow-hidden univer-whitespace-nowrap univer-bg-gray-200
3
17
  univer-text-center univer-align-middle univer-text-white
4
- `,{variants:{shape:{circle:"univer-rounded-full",square:"univer-rounded"},size:{middle:"univer-size-9 univer-leading-9",small:"univer-size-7 univer-leading-7"}},defaultVariants:{shape:"circle",size:"middle"}});function dm(e){const{children:t,className:n,style:r,title:o,alt:i,shape:a="circle",size:s="middle",src:c,fit:l="fill",onError:f,onLoad:u}=e,m=typeof s=="number"?{width:`${s}px`,height:`${s}px`,lineHeight:`${s}px`}:{},p={objectFit:l};return v.jsxs("span",{className:W(cm({shape:a,size:typeof s=="number"?"middle":s}),{"univer-bg-transparent":c},n),style:{...m,...r,...c&&p},children:[c&&v.jsx("img",{className:"univer-block univer-size-full",src:c,title:o,alt:i,onError:f,onLoad:u}),t]})}function wl(e){const{className:t,children:n,closable:r=!1,onClose:o}=e;return v.jsxs("span",{"data-u-comp":"badge",className:W(`
18
+ `,{variants:{shape:{circle:`univer-rounded-full`,square:`univer-rounded`},size:{middle:`univer-size-9 univer-leading-9`,small:`univer-size-7 univer-leading-7`}},defaultVariants:{shape:`circle`,size:`middle`}});function O(e){let{children:t,className:n,style:r,title:i,alt:a,shape:o=`circle`,size:s=`middle`,src:c,fit:l=`fill`,onError:u,onLoad:d}=e,p=typeof s==`number`?{width:`${s}px`,height:`${s}px`,lineHeight:`${s}px`}:{},m={objectFit:l};return(0,f.jsxs)(`span`,{className:T(D({shape:o,size:typeof s==`number`?`middle`:s}),{"univer-bg-transparent":c},n),style:{...p,...r,...c&&m},children:[c&&(0,f.jsx)(`img`,{className:`univer-block univer-size-full`,src:c,title:i,alt:a,onError:u,onLoad:d}),t]})}function k(e){let{className:t,children:n,closable:r=!1,onClose:i}=e;return(0,f.jsxs)(`span`,{"data-u-comp":`badge`,className:T(`
5
19
  univer-box-border univer-inline-flex univer-items-center univer-gap-1 univer-truncate
6
20
  univer-rounded-md univer-border univer-border-solid univer-border-gray-100 univer-bg-gray-100
7
21
  univer-px-2.5 univer-py-0.5 univer-text-xs univer-font-medium univer-text-gray-900
8
22
  dark:!univer-border-gray-500 dark:!univer-bg-gray-700 dark:!univer-text-gray-300
9
- `,t),children:[v.jsx("span",{className:"univer-flex-1 univer-truncate",children:n}),r&&v.jsx("button",{className:"univer-flex univer-cursor-pointer univer-items-center univer-justify-center univer-border-none univer-p-0 univer-outline-none univer-transition-opacity hover:univer-opacity-70",type:"button","aria-label":"Close badge",onClick:o,children:v.jsx(ii,{className:"univer-text-current"})})]})}function Ls(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Qr(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Ls(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():Ls(e[o],null)}}}}function Ue(...e){return d.useCallback(Qr(...e),e)}var fm=Symbol.for("react.lazy"),Lo=d[" use ".trim().toString()];function vm(e){return typeof e=="object"&&e!==null&&"then"in e}function Cl(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===fm&&"_payload"in e&&vm(e._payload)}function El(e){const t=pm(e),n=d.forwardRef((r,o)=>{let{children:i,...a}=r;Cl(i)&&typeof Lo=="function"&&(i=Lo(i._payload));const s=d.Children.toArray(i),c=s.find(gm);if(c){const l=c.props.children,f=s.map(u=>u===c?d.Children.count(l)>1?d.Children.only(null):d.isValidElement(l)?l.props.children:null:u);return v.jsx(t,{...a,ref:o,children:d.isValidElement(l)?d.cloneElement(l,void 0,f):null})}return v.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}var mm=El("Slot");function pm(e){const t=d.forwardRef((n,r)=>{let{children:o,...i}=n;if(Cl(o)&&typeof Lo=="function"&&(o=Lo(o._payload)),d.isValidElement(o)){const a=ym(o),s=bm(i,o.props);return o.type!==d.Fragment&&(s.ref=r?Qr(r,a):a),d.cloneElement(o,s)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var hm=Symbol("radix.slottable");function gm(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===hm}function bm(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{const c=i(...s);return o(...s),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function ym(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const xm=za(`
23
+ `,t),children:[(0,f.jsx)(`span`,{className:`univer-flex-1 univer-truncate`,children:n}),r&&(0,f.jsx)(`button`,{className:`
24
+ univer-flex univer-cursor-pointer univer-items-center univer-justify-center univer-border-none
25
+ univer-p-0 univer-outline-none univer-transition-opacity
26
+ hover:univer-opacity-70
27
+ `,type:`button`,"aria-label":`Close badge`,onClick:i,children:(0,f.jsx)(c.CloseIcon,{className:`univer-text-current`})})]})}const A=(0,p.cva)(`
10
28
  univer-box-border univer-inline-flex univer-cursor-pointer univer-select-none univer-items-center
11
29
  univer-justify-center univer-gap-2 univer-whitespace-nowrap univer-rounded-md univer-border univer-border-solid
12
30
  univer-text-sm univer-font-medium univer-transition-colors
@@ -46,55 +64,68 @@
46
64
  dark:!univer-text-white
47
65
  dark:hover:!univer-bg-gray-700
48
66
  dark:active:!univer-bg-gray-600
49
- `},size:{small:"univer-h-6 univer-rounded-md univer-px-1.5 univer-text-xs",middle:"univer-h-8 univer-rounded-lg univer-px-2 univer-text-sm",large:"univer-h-10 univer-rounded-lg univer-px-3 univer-text-sm"}},defaultVariants:{variant:"default",size:"middle"}}),un=y.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},i)=>{const a=r?mm:"button";return v.jsx(a,{className:W(xm({variant:t,size:n,className:e})),ref:i,"data-u-comp":"button",...o})});un.displayName="Button";const wm=({className:e,orientation:t="horizontal",children:n})=>{const r=y.Children.count(n),o=t==="horizontal",i=t==="vertical";return v.jsx("div",{className:W("univer-grid",{"univer-grid-flow-row":i,"univer-w-fit":i},e),children:y.Children.map(n,(a,s)=>{const c=s===0,l=s===r-1;return y.cloneElement(a,{className:W({"!univer-rounded-l-none":o&&!c,"!univer-rounded-r-none":o&&!l,"!univer-border-l-0":o&&!c,"!univer-rounded-t-none":i&&!c,"!univer-rounded-b-none":i&&!l,"!univer-border-t-0":i&&!c},a.props.className)})})})};function Ba(){return typeof window<"u"&&typeof document<"u"}const Zt=y.createContext({mountContainer:Ba()?document.body:null});function Cm(e){const{children:t,locale:n,mountContainer:r}=e,o=y.useMemo(()=>({locale:n,mountContainer:r}),[n,r]);return v.jsx(Zt.Provider,{value:o,children:t})}function Sl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ko={exports:{}},Em=ko.exports,$s;function Sm(){return $s||($s=1,(function(e,t){(function(n,r){e.exports=r()})(Em,(function(){var n=1e3,r=6e4,o=36e5,i="millisecond",a="second",s="minute",c="hour",l="day",f="week",u="month",m="quarter",p="year",g="date",b="Invalid Date",h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,E={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(A){var _=["th","st","nd","rd"],M=A%100;return"["+A+(_[(M-20)%10]||_[M]||_[0])+"]"}},w=function(A,_,M){var I=String(A);return!I||I.length>=_?A:""+Array(_+1-I.length).join(M)+A},C={s:w,z:function(A){var _=-A.utcOffset(),M=Math.abs(_),I=Math.floor(M/60),N=M%60;return(_<=0?"+":"-")+w(I,2,"0")+":"+w(N,2,"0")},m:function A(_,M){if(_.date()<M.date())return-A(M,_);var I=12*(M.year()-_.year())+(M.month()-_.month()),N=_.clone().add(I,u),P=M-N<0,j=_.clone().add(I+(P?-1:1),u);return+(-(I+(M-N)/(P?N-j:j-N))||0)},a:function(A){return A<0?Math.ceil(A)||0:Math.floor(A)},p:function(A){return{M:u,y:p,w:f,d:l,D:g,h:c,m:s,s:a,ms:i,Q:m}[A]||String(A||"").toLowerCase().replace(/s$/,"")},u:function(A){return A===void 0}},S="en",R={};R[S]=E;var L="$isDayjsObject",D=function(A){return A instanceof F||!(!A||!A[L])},H=function A(_,M,I){var N;if(!_)return S;if(typeof _=="string"){var P=_.toLowerCase();R[P]&&(N=P),M&&(R[P]=M,N=P);var j=_.split("-");if(!N&&j.length>1)return A(j[0])}else{var B=_.name;R[B]=_,N=B}return!I&&N&&(S=N),N||!I&&S},k=function(A,_){if(D(A))return A.clone();var M=typeof _=="object"?_:{};return M.date=A,M.args=arguments,new F(M)},T=C;T.l=H,T.i=D,T.w=function(A,_){return k(A,{locale:_.$L,utc:_.$u,x:_.$x,$offset:_.$offset})};var F=(function(){function A(M){this.$L=H(M.locale,null,!0),this.parse(M),this.$x=this.$x||M.x||{},this[L]=!0}var _=A.prototype;return _.parse=function(M){this.$d=(function(I){var N=I.date,P=I.utc;if(N===null)return new Date(NaN);if(T.u(N))return new Date;if(N instanceof Date)return new Date(N);if(typeof N=="string"&&!/Z$/i.test(N)){var j=N.match(h);if(j){var B=j[2]-1||0,K=(j[7]||"0").substring(0,3);return P?new Date(Date.UTC(j[1],B,j[3]||1,j[4]||0,j[5]||0,j[6]||0,K)):new Date(j[1],B,j[3]||1,j[4]||0,j[5]||0,j[6]||0,K)}}return new Date(N)})(M),this.init()},_.init=function(){var M=this.$d;this.$y=M.getFullYear(),this.$M=M.getMonth(),this.$D=M.getDate(),this.$W=M.getDay(),this.$H=M.getHours(),this.$m=M.getMinutes(),this.$s=M.getSeconds(),this.$ms=M.getMilliseconds()},_.$utils=function(){return T},_.isValid=function(){return this.$d.toString()!==b},_.isSame=function(M,I){var N=k(M);return this.startOf(I)<=N&&N<=this.endOf(I)},_.isAfter=function(M,I){return k(M)<this.startOf(I)},_.isBefore=function(M,I){return this.endOf(I)<k(M)},_.$g=function(M,I,N){return T.u(M)?this[I]:this.set(N,M)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(M,I){var N=this,P=!!T.u(I)||I,j=T.p(M),B=function(q,ne){var ae=T.w(N.$u?Date.UTC(N.$y,ne,q):new Date(N.$y,ne,q),N);return P?ae:ae.endOf(l)},K=function(q,ne){return T.w(N.toDate()[q].apply(N.toDate("s"),(P?[0,0,0,0]:[23,59,59,999]).slice(ne)),N)},$=this.$W,O=this.$M,V=this.$D,U="set"+(this.$u?"UTC":"");switch(j){case p:return P?B(1,0):B(31,11);case u:return P?B(1,O):B(0,O+1);case f:var oe=this.$locale().weekStart||0,G=($<oe?$+7:$)-oe;return B(P?V-G:V+(6-G),O);case l:case g:return K(U+"Hours",0);case c:return K(U+"Minutes",1);case s:return K(U+"Seconds",2);case a:return K(U+"Milliseconds",3);default:return this.clone()}},_.endOf=function(M){return this.startOf(M,!1)},_.$set=function(M,I){var N,P=T.p(M),j="set"+(this.$u?"UTC":""),B=(N={},N[l]=j+"Date",N[g]=j+"Date",N[u]=j+"Month",N[p]=j+"FullYear",N[c]=j+"Hours",N[s]=j+"Minutes",N[a]=j+"Seconds",N[i]=j+"Milliseconds",N)[P],K=P===l?this.$D+(I-this.$W):I;if(P===u||P===p){var $=this.clone().set(g,1);$.$d[B](K),$.init(),this.$d=$.set(g,Math.min(this.$D,$.daysInMonth())).$d}else B&&this.$d[B](K);return this.init(),this},_.set=function(M,I){return this.clone().$set(M,I)},_.get=function(M){return this[T.p(M)]()},_.add=function(M,I){var N,P=this;M=Number(M);var j=T.p(I),B=function(O){var V=k(P);return T.w(V.date(V.date()+Math.round(O*M)),P)};if(j===u)return this.set(u,this.$M+M);if(j===p)return this.set(p,this.$y+M);if(j===l)return B(1);if(j===f)return B(7);var K=(N={},N[s]=r,N[c]=o,N[a]=n,N)[j]||1,$=this.$d.getTime()+M*K;return T.w($,this)},_.subtract=function(M,I){return this.add(-1*M,I)},_.format=function(M){var I=this,N=this.$locale();if(!this.isValid())return N.invalidDate||b;var P=M||"YYYY-MM-DDTHH:mm:ssZ",j=T.z(this),B=this.$H,K=this.$m,$=this.$M,O=N.weekdays,V=N.months,U=N.meridiem,oe=function(ne,ae,ue,he){return ne&&(ne[ae]||ne(I,P))||ue[ae].slice(0,he)},G=function(ne){return T.s(B%12||12,ne,"0")},q=U||function(ne,ae,ue){var he=ne<12?"AM":"PM";return ue?he.toLowerCase():he};return P.replace(x,(function(ne,ae){return ae||(function(ue){switch(ue){case"YY":return String(I.$y).slice(-2);case"YYYY":return T.s(I.$y,4,"0");case"M":return $+1;case"MM":return T.s($+1,2,"0");case"MMM":return oe(N.monthsShort,$,V,3);case"MMMM":return oe(V,$);case"D":return I.$D;case"DD":return T.s(I.$D,2,"0");case"d":return String(I.$W);case"dd":return oe(N.weekdaysMin,I.$W,O,2);case"ddd":return oe(N.weekdaysShort,I.$W,O,3);case"dddd":return O[I.$W];case"H":return String(B);case"HH":return T.s(B,2,"0");case"h":return G(1);case"hh":return G(2);case"a":return q(B,K,!0);case"A":return q(B,K,!1);case"m":return String(K);case"mm":return T.s(K,2,"0");case"s":return String(I.$s);case"ss":return T.s(I.$s,2,"0");case"SSS":return T.s(I.$ms,3,"0");case"Z":return j}return null})(ne)||j.replace(":","")}))},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(M,I,N){var P,j=this,B=T.p(I),K=k(M),$=(K.utcOffset()-this.utcOffset())*r,O=this-K,V=function(){return T.m(j,K)};switch(B){case p:P=V()/12;break;case u:P=V();break;case m:P=V()/3;break;case f:P=(O-$)/6048e5;break;case l:P=(O-$)/864e5;break;case c:P=O/o;break;case s:P=O/r;break;case a:P=O/n;break;default:P=O}return N?P:T.a(P)},_.daysInMonth=function(){return this.endOf(u).$D},_.$locale=function(){return R[this.$L]},_.locale=function(M,I){if(!M)return this.$L;var N=this.clone(),P=H(M,I,!0);return P&&(N.$L=P),N},_.clone=function(){return T.w(this.$d,this)},_.toDate=function(){return new Date(this.valueOf())},_.toJSON=function(){return this.isValid()?this.toISOString():null},_.toISOString=function(){return this.$d.toISOString()},_.toString=function(){return this.$d.toUTCString()},A})(),z=F.prototype;return k.prototype=z,[["$ms",i],["$s",a],["$m",s],["$H",c],["$W",l],["$M",u],["$y",p],["$D",g]].forEach((function(A){z[A[1]]=function(_){return this.$g(_,A[0],A[1])}})),k.extend=function(A,_){return A.$i||(A(_,F,k),A.$i=!0),k},k.locale=H,k.isDayjs=D,k.unix=function(A){return k(1e3*A)},k.en=R[S],k.Ls=R,k.p={},k}))})(ko)),ko.exports}var Rm=Sm();const $o=Sl(Rm),kn="univer-scrollbar-thin univer-scrollbar-track-gray-50 univer-scrollbar-thumb-gray-300 dark:!univer-scrollbar-track-gray-900 dark:!univer-scrollbar-thumb-gray-700",xr="univer-border-gray-200 dark:!univer-border-gray-600 univer-border-solid",ct=W(xr,"univer-border"),Mm=W(xr,"univer-border-l univer-border-b univer-border-t-0 univer-border-r-0"),Rl=W(xr,"univer-border-l univer-border-b-0 univer-border-t-0 univer-border-r-0"),Nm=W(xr,"univer-border-l-0 univer-border-b-0 univer-border-t univer-border-r-0"),Pm=W(xr,"univer-border-l-0 univer-border-b univer-border-t-0 univer-border-r-0"),km=W(xr,"univer-border-l-0 univer-border-b-0 univer-border-t-0 univer-border-r"),_m="univer-divide-gray-200 dark:!univer-divide-gray-600 univer-divide-y univer-divide-x-0 univer-divide-solid",Im="univer-divide-gray-200 dark:!univer-divide-gray-600 univer-divide-x univer-divide-y-0 univer-divide-solid";function Ml(e){const{className:t,value:n,onValueChange:r}=e;function o(i){const a=i.target.value,[s,c,l]=a.split(":").map(Number),f=new Date(n!=null?n:Date.now());f.setHours(s,c,l,0),r==null||r(f)}return v.jsxs("div",{"data-u-comp":"time-input",className:"univer-relative univer-mx-auto univer-mt-1 univer-w-fit",children:[v.jsx(el,{className:"univer-absolute univer-left-2 univer-top-1/2 -univer-translate-y-1/2 univer-text-gray-600 dark:!univer-text-gray-400"}),v.jsx("input",{className:W("univer-block univer-h-7 univer-w-fit univer-appearance-none univer-rounded-md univer-bg-transparent univer-pl-6 univer-pr-2 univer-text-center univer-text-gray-800 univer-shadow univer-outline-none univer-transition-all univer-duration-200 focus:univer-border-primary-600 dark:!univer-text-white dark:focus:!univer-border-primary-500 [&::-webkit-calendar-picker-indicator]:univer-hidden [&::-webkit-calendar-picker-indicator]:univer-appearance-none",ct,t),type:"time",step:"1",value:$o(n).format("HH:mm:ss"),onChange:o})]})}function Dm(e,t){return new Date(e,t+1,0).getDate()}function Am(e,t){return new Date(e,t,1).getDay()}function Bi(e){const{className:t,...n}=e;return v.jsx("button",{className:W("univer-size-7 univer-rounded-md univer-border-none univer-bg-transparent univer-p-1 univer-transition-all hover:univer-bg-gray-200 dark:hover:!univer-bg-gray-600",t),type:"button",...n})}function Fo(e){const{className:t,max:n,min:r,showTime:o=!1,value:i,onValueChange:a}=e,{locale:s}=y.useContext(Zt),{year:c,weekDays:l,months:f}=s==null?void 0:s.Calendar,u=new Date,[m,p]=y.useState((i!=null?i:u).getFullYear()),[g,b]=y.useState((i!=null?i:u).getMonth());function h(){b(k=>k===0?(p(T=>T-1),11):k-1)}function x(){b(k=>k===11?(p(T=>T+1),0):k+1)}const E=Dm(m,g),w=Am(m,g),C=y.useMemo(()=>{const k=[];for(let T=0;T<w;T++)k.push(null);for(let T=1;T<=E;T++)k.push(T);return k},[E,w]);function S(k){return k&&m===(i==null?void 0:i.getFullYear())&&g===(i==null?void 0:i.getMonth())&&k===(i==null?void 0:i.getDate())}function R(k){return k&&m===u.getFullYear()&&g===u.getMonth()&&k===u.getDate()}function L(k){var _,M,I;if(!k)return!1;const T=(_=i==null?void 0:i.getHours())!=null?_:u.getHours(),F=(M=i==null?void 0:i.getMinutes())!=null?M:u.getMinutes(),z=(I=i==null?void 0:i.getSeconds())!=null?I:u.getSeconds(),A=new Date(m,g,k,T,F,z);return!!(r&&A<r||n&&A>n)}function D(k){var _,M,I;if(L(k))return;const T=(_=i==null?void 0:i.getHours())!=null?_:u.getHours(),F=(M=i==null?void 0:i.getMinutes())!=null?M:u.getMinutes(),z=(I=i==null?void 0:i.getSeconds())!=null?I:u.getSeconds(),A=new Date(m,g,k,T,F,z);a==null||a(A)}function H(k){var _;const T=k.getHours(),F=k.getMinutes(),z=k.getSeconds(),A=new Date(m,g,(_=i==null?void 0:i.getDate())!=null?_:u.getDate(),T,F,z);a==null||a(A)}return v.jsxs("div",{"data-u-comp":"calendar",className:W("univer-mx-auto univer-max-w-xs univer-select-none univer-rounded univer-bg-white univer-text-gray-900 dark:!univer-bg-gray-900 dark:!univer-text-white",t),children:[v.jsxs("nav",{className:"univer-mb-4 univer-flex univer-items-center univer-justify-between",children:[v.jsx(Bi,{className:"univer-text-lg univer-text-gray-500 dark:!univer-text-gray-200","aria-label":"Previous Month",onClick:h,children:v.jsx(Vr,{className:"univer-rotate-180"})}),v.jsxs("span",{className:"univer-flex univer-gap-0.5 univer-text-sm univer-font-medium",children:[v.jsx("span",{children:m}),v.jsx("span",{children:c}),v.jsx("span",{children:f[g]})]}),v.jsx(Bi,{className:"univer-text-lg univer-text-gray-500 dark:!univer-text-gray-200","aria-label":"Next Month",onClick:x,children:v.jsx(Vr,{})})]}),v.jsx("div",{className:"univer-mb-1 univer-grid univer-grid-cols-7 univer-gap-1 univer-text-center univer-text-sm univer-text-gray-500 dark:!univer-text-gray-200",children:l.map(k=>v.jsx("div",{children:k},k))}),v.jsx("div",{className:"univer-grid univer-grid-cols-7 univer-gap-1 univer-text-center",children:C.map((k,T)=>k?v.jsx(Bi,{className:W({"!univer-bg-primary-600 univer-font-bold univer-text-white":!R(k)&&S(k),"dark:!univer-text-white":!R(k)&&!S(k),"!univer-bg-primary-600 univer-text-white":R(k)&&S(k),"univer-font-semibold univer-text-primary-600 dark:!univer-text-primary-500":R(k)&&!S(k),"univer-cursor-not-allowed univer-opacity-40":L(k),"univer-hover:bg-primary-100 univer-cursor-pointer univer-text-gray-800":!S(k)&&!L(k)}),onClick:()=>D(k),disabled:L(k),children:k},T):v.jsx("div",{},T))}),o&&v.jsx(Ml,{value:i,onValueChange:H})]})}function Fs({emptyText:e}){return v.jsx("section",{className:"univer-h-8 univer-px-2 univer-pr-32 univer-text-sm/8 univer-text-gray-600 dark:!univer-text-gray-200",children:e})}function Tm(e){const{value:t,options:n=[],onChange:r,contentClassName:o,wrapperClassName:i}=e,{locale:a}=y.useContext(Zt),s=y.useMemo(()=>{const l=[n];return t.forEach((f,u)=>{const m=l[u].find(p=>p.value===f);m!=null&&m.children&&l.push(m.children)}),l},[t]);function c(l,f){if(f===t[l])return;if(t[l+1]){const m=t.slice(0,l+1);m[l]=f,r(m);return}const u=[...t];u[l]=f,r(u)}return v.jsxs("section",{"data-u-comp":"cascader-list",className:W("univer-overflow-auto-y univer-grid univer-h-full univer-max-h-80 univer-grid-flow-col univer-rounded univer-py-2 univer-text-gray-900 dark:!univer-text-white [&>ul:not(:last-child)]:univer-border-0 [&>ul:not(:last-child)]:univer-border-r [&>ul:not(:last-child)]:univer-border-solid [&>ul:not(:last-child)]:univer-border-r-gray-200",ct,kn,i),children:[s.map((l,f)=>l.length?v.jsx("ul",{className:W("univer-m-0 univer-h-full univer-max-h-full univer-list-none univer-overflow-auto univer-px-2",kn,o),children:l.map(u=>v.jsx("li",{children:v.jsxs("a",{className:W("univer-relative univer-block univer-h-8 univer-cursor-pointer univer-rounded univer-text-sm/8",{"univer-px-7":f>0,"univer-px-1.5":f===0,"univer-bg-gray-200 dark:!univer-bg-gray-600":u.value===t[f]}),onClick:()=>c(f,u.value),children:[f>0&&v.jsx("span",{className:"univer-absolute univer-left-2 univer-flex univer-h-full univer-items-center",children:u.value===t[f]&&v.jsx(br,{className:"univer-text-primary-600"})}),v.jsx("span",{children:u.label})]})},u.value))},f):v.jsx(Fs,{emptyText:a==null?void 0:a.CascaderList.empty},f)),t.length<=0&&v.jsx(Fs,{emptyText:a==null?void 0:a.CascaderList.empty})]})}function Om(e){const{children:t,className:n,style:r,value:o,disabled:i,direction:a="horizontal",onChange:s}=e,c=l=>{o.includes(l)?s(o.filter(f=>f!==l)):s([...o,l])};return v.jsx("div",{className:W("univer-flex univer-gap-2",{"univer-flex-col":a==="vertical"},n),style:r,children:y.Children.map(t,(l,f)=>y.isValidElement(l)?y.cloneElement(l,{key:f,children:l.props.children,checked:l.props.value?o.includes(l.props.value):!1,disabled:i!=null?i:l.props.disabled,onChange:c}):l)})}function Nl(e){const{children:t,className:n,style:r,checked:o=!1,indeterminate:i=!1,value:a,disabled:s=!1,onChange:c,contentClassName:l}=e,f=y.useRef(null);function u(m){var p,g;if(m.stopPropagation(),!(!c||s))if(typeof a<"u")c==null||c(a);else{const b=(g=(p=f==null?void 0:f.current)==null?void 0:p.checked)!=null?g:!1;c==null||c(b)}}return v.jsxs("label",{"data-u-comp":"checkbox",className:W("univer-box-border univer-inline-flex univer-items-center univer-gap-2 univer-text-sm",{"univer-cursor-pointer univer-text-gray-900 dark:!univer-text-white":!s,"univer-text-gray-400":s},n),style:r,children:[v.jsxs("span",{className:"univer-relative univer-block",children:[v.jsx("input",{ref:f,className:"univer-absolute univer-size-0 univer-opacity-0",type:"checkbox",checked:o,disabled:s,onChange:u}),v.jsxs("span",{className:W("univer-relative univer-box-border univer-flex univer-size-4 univer-items-center univer-justify-center univer-overflow-hidden univer-rounded univer-border univer-border-solid univer-transition-colors",{"univer-opacity-50":s,"univer-border-primary-600 univer-bg-primary-600":o||i,"univer-border-gray-300 univer-bg-gray-50 dark:!univer-border-gray-500 dark:!univer-bg-gray-600":!o&&!i}),children:[o&&v.jsx(br,{className:"univer-absolute univer-left-1/2 univer-top-1/2 univer-block univer-size-3 -univer-translate-x-1/2 -univer-translate-y-1/2 univer-text-white"}),i&&!o&&v.jsx("span",{className:"univer-absolute univer-left-1/2 univer-top-1/2 univer-block univer-h-0.5 univer-w-2.5 -univer-translate-x-1/2 -univer-translate-y-1/2 univer-rounded univer-bg-white"})]})]}),v.jsx("span",{className:W("univer-select-none",l),children:t})]})}function ie(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function jm(e,t){const n=d.createContext(t),r=i=>{const{children:a,...s}=i,c=d.useMemo(()=>s,Object.values(s));return v.jsx(n.Provider,{value:c,children:a})};r.displayName=e+"Provider";function o(i){const a=d.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function An(e,t=[]){let n=[];function r(i,a){const s=d.createContext(a),c=n.length;n=[...n,a];const l=u=>{var x;const{scope:m,children:p,...g}=u,b=((x=m==null?void 0:m[e])==null?void 0:x[c])||s,h=d.useMemo(()=>g,Object.values(g));return v.jsx(b.Provider,{value:h,children:p})};l.displayName=i+"Provider";function f(u,m){var b;const p=((b=m==null?void 0:m[e])==null?void 0:b[c])||s,g=d.useContext(p);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${u}\` must be used within \`${i}\``)}return[l,f]}const o=()=>{const i=n.map(a=>d.createContext(a));return function(s){const c=(s==null?void 0:s[e])||i;return d.useMemo(()=>({[`__scope${e}`]:{...s,[e]:c}}),[s,c])}};return o.scopeName=e,[r,Lm(o,...t)]}function Lm(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:c,scopeName:l})=>{const u=c(i)[`__scope${l}`];return{...s,...u}},{});return d.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var _n=globalThis!=null&&globalThis.document?d.useLayoutEffect:()=>{},$m=d[" useId ".trim().toString()]||(()=>{}),Fm=0;function on(e){const[t,n]=d.useState($m());return _n(()=>{n(r=>r!=null?r:String(Fm++))},[e]),e||(t?`radix-${t}`:"")}var zm=d[" useInsertionEffect ".trim().toString()]||_n;function wr({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,a]=Bm({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:o;{const f=d.useRef(e!==void 0);d.useEffect(()=>{const u=f.current;u!==s&&console.warn(`${r} is changing from ${u?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=s},[s,r])}const l=d.useCallback(f=>{var u;if(s){const m=Hm(f)?f(e):f;m!==e&&((u=a.current)==null||u.call(a,m))}else i(f)},[s,e,i,a]);return[c,l]}function Bm({defaultProp:e,onChange:t}){const[n,r]=d.useState(e),o=d.useRef(n),i=d.useRef(t);return zm(()=>{i.current=t},[t]),d.useEffect(()=>{var a;o.current!==n&&((a=i.current)==null||a.call(i,n),o.current=n)},[n,o]),[n,r,i]}function Hm(e){return typeof e=="function"}function vr(e){const t=Vm(e),n=d.forwardRef((r,o)=>{const{children:i,...a}=r,s=d.Children.toArray(i),c=s.find(Km);if(c){const l=c.props.children,f=s.map(u=>u===c?d.Children.count(l)>1?d.Children.only(null):d.isValidElement(l)?l.props.children:null:u);return v.jsx(t,{...a,ref:o,children:d.isValidElement(l)?d.cloneElement(l,void 0,f):null})}return v.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function Vm(e){const t=d.forwardRef((n,r)=>{const{children:o,...i}=n;if(d.isValidElement(o)){const a=Gm(o),s=Um(i,o.props);return o.type!==d.Fragment&&(s.ref=r?Qr(r,a):a),d.cloneElement(o,s)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Wm=Symbol("radix.slottable");function Km(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Wm}function Um(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{const c=i(...s);return o(...s),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Gm(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Ym=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],$e=Ym.reduce((e,t)=>{const n=vr(`Primitive.${t}`),r=d.forwardRef((o,i)=>{const{asChild:a,...s}=o,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(c,{...s,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Pl(e,t){e&&Qu.flushSync(()=>e.dispatchEvent(t))}function Ut(e){const t=d.useRef(e);return d.useEffect(()=>{t.current=e}),d.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Zm(e,t=globalThis==null?void 0:globalThis.document){const n=Ut(e);d.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var qm="DismissableLayer",ua="dismissableLayer.update",Xm="dismissableLayer.pointerDownOutside",Qm="dismissableLayer.focusOutside",zs,kl=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Jr=d.forwardRef((e,t)=>{var L;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...c}=e,l=d.useContext(kl),[f,u]=d.useState(null),m=(L=f==null?void 0:f.ownerDocument)!=null?L:globalThis==null?void 0:globalThis.document,[,p]=d.useState({}),g=Ue(t,D=>u(D)),b=Array.from(l.layers),[h]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),x=b.indexOf(h),E=f?b.indexOf(f):-1,w=l.layersWithOutsidePointerEventsDisabled.size>0,C=E>=x,S=tp(D=>{const H=D.target,k=[...l.branches].some(T=>T.contains(H));!C||k||(o==null||o(D),a==null||a(D),D.defaultPrevented||s==null||s())},m),R=np(D=>{const H=D.target;[...l.branches].some(T=>T.contains(H))||(i==null||i(D),a==null||a(D),D.defaultPrevented||s==null||s())},m);return Zm(D=>{E===l.layers.size-1&&(r==null||r(D),!D.defaultPrevented&&s&&(D.preventDefault(),s()))},m),d.useEffect(()=>{if(f)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(zs=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(f)),l.layers.add(f),Bs(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=zs)}},[f,m,n,l]),d.useEffect(()=>()=>{f&&(l.layers.delete(f),l.layersWithOutsidePointerEventsDisabled.delete(f),Bs())},[f,l]),d.useEffect(()=>{const D=()=>p({});return document.addEventListener(ua,D),()=>document.removeEventListener(ua,D)},[]),v.jsx($e.div,{...c,ref:g,style:{pointerEvents:w?C?"auto":"none":void 0,...e.style},onFocusCapture:ie(e.onFocusCapture,R.onFocusCapture),onBlurCapture:ie(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:ie(e.onPointerDownCapture,S.onPointerDownCapture)})});Jr.displayName=qm;var Jm="DismissableLayerBranch",ep=d.forwardRef((e,t)=>{const n=d.useContext(kl),r=d.useRef(null),o=Ue(t,r);return d.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),v.jsx($e.div,{...e,ref:o})});ep.displayName=Jm;function tp(e,t=globalThis==null?void 0:globalThis.document){const n=Ut(e),r=d.useRef(!1),o=d.useRef(()=>{});return d.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let c=function(){_l(Xm,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function np(e,t=globalThis==null?void 0:globalThis.document){const n=Ut(e),r=d.useRef(!1);return d.useEffect(()=>{const o=i=>{i.target&&!r.current&&_l(Qm,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Bs(){const e=new CustomEvent(ua);document.dispatchEvent(e)}function _l(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Pl(o,i):o.dispatchEvent(i)}var Hi="focusScope.autoFocusOnMount",Vi="focusScope.autoFocusOnUnmount",Hs={bubbles:!1,cancelable:!0},rp="FocusScope",ai=d.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,c]=d.useState(null),l=Ut(o),f=Ut(i),u=d.useRef(null),m=Ue(t,b=>c(b)),p=d.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;d.useEffect(()=>{if(r){let b=function(w){if(p.paused||!s)return;const C=w.target;s.contains(C)?u.current=C:Rn(u.current,{select:!0})},h=function(w){if(p.paused||!s)return;const C=w.relatedTarget;C!==null&&(s.contains(C)||Rn(u.current,{select:!0}))},x=function(w){if(document.activeElement===document.body)for(const S of w)S.removedNodes.length>0&&Rn(s)};document.addEventListener("focusin",b),document.addEventListener("focusout",h);const E=new MutationObserver(x);return s&&E.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",b),document.removeEventListener("focusout",h),E.disconnect()}}},[r,s,p.paused]),d.useEffect(()=>{if(s){Ws.add(p);const b=document.activeElement;if(!s.contains(b)){const x=new CustomEvent(Hi,Hs);s.addEventListener(Hi,l),s.dispatchEvent(x),x.defaultPrevented||(op(lp(Il(s)),{select:!0}),document.activeElement===b&&Rn(s))}return()=>{s.removeEventListener(Hi,l),setTimeout(()=>{const x=new CustomEvent(Vi,Hs);s.addEventListener(Vi,f),s.dispatchEvent(x),x.defaultPrevented||Rn(b!=null?b:document.body,{select:!0}),s.removeEventListener(Vi,f),Ws.remove(p)},0)}}},[s,l,f,p]);const g=d.useCallback(b=>{if(!n&&!r||p.paused)return;const h=b.key==="Tab"&&!b.altKey&&!b.ctrlKey&&!b.metaKey,x=document.activeElement;if(h&&x){const E=b.currentTarget,[w,C]=ip(E);w&&C?!b.shiftKey&&x===C?(b.preventDefault(),n&&Rn(w,{select:!0})):b.shiftKey&&x===w&&(b.preventDefault(),n&&Rn(C,{select:!0})):x===E&&b.preventDefault()}},[n,r,p.paused]);return v.jsx($e.div,{tabIndex:-1,...a,ref:m,onKeyDown:g})});ai.displayName=rp;function op(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Rn(r,{select:t}),document.activeElement!==n)return}function ip(e){const t=Il(e),n=Vs(t,e),r=Vs(t.reverse(),e);return[n,r]}function Il(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Vs(e,t){for(const n of e)if(!ap(n,{upTo:t}))return n}function ap(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function sp(e){return e instanceof HTMLInputElement&&"select"in e}function Rn(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&sp(e)&&t&&e.select()}}var Ws=up();function up(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Ks(e,t),e.unshift(t)},remove(t){var n;e=Ks(e,t),(n=e[0])==null||n.resume()}}}function Ks(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function lp(e){return e.filter(t=>t.tagName!=="A")}var cp="Portal",eo=d.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[o,i]=d.useState(!1);_n(()=>i(!0),[]);const a=n||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return a?ut.createPortal(v.jsx($e.div,{...r,ref:t}),a):null});eo.displayName=cp;function dp(e,t){return d.useReducer((n,r)=>{const o=t[n][r];return o!=null?o:n},e)}var Nt=e=>{const{present:t,children:n}=e,r=fp(t),o=typeof n=="function"?n({present:r.isPresent}):d.Children.only(n),i=Ue(r.ref,vp(o));return typeof n=="function"||r.isPresent?d.cloneElement(o,{ref:i}):null};Nt.displayName="Presence";function fp(e){const[t,n]=d.useState(),r=d.useRef(null),o=d.useRef(e),i=d.useRef("none"),a=e?"mounted":"unmounted",[s,c]=dp(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return d.useEffect(()=>{const l=ho(r.current);i.current=s==="mounted"?l:"none"},[s]),_n(()=>{const l=r.current,f=o.current;if(f!==e){const m=i.current,p=ho(l);e?c("MOUNT"):p==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(f&&m!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),_n(()=>{var l;if(t){let f;const u=(l=t.ownerDocument.defaultView)!=null?l:window,m=g=>{const h=ho(r.current).includes(CSS.escape(g.animationName));if(g.target===t&&h&&(c("ANIMATION_END"),!o.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",f=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},p=g=>{g.target===t&&(i.current=ho(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{u.clearTimeout(f),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:d.useCallback(l=>{r.current=l?getComputedStyle(l):null,n(l)},[])}}function ho(e){return(e==null?void 0:e.animationName)||"none"}function vp(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Wi=0;function Ha(){d.useEffect(()=>{var t,n;const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(t=e[0])!=null?t:Us()),document.body.insertAdjacentElement("beforeend",(n=e[1])!=null?n:Us()),Wi++,()=>{Wi===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),Wi--}},[])}function Us(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Vt=function(){return Vt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Vt.apply(this,arguments)};function Dl(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function mp(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var _o="right-scroll-bar-position",Io="width-before-scroll-bar",pp="with-scroll-bars-hidden",hp="--removed-body-scroll-bar-size";function Ki(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function gp(e,t){var n=y.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var bp=typeof window<"u"?d.useLayoutEffect:d.useEffect,Gs=new WeakMap;function yp(e,t){var n=gp(null,function(r){return e.forEach(function(o){return Ki(o,r)})});return bp(function(){var r=Gs.get(n);if(r){var o=new Set(r),i=new Set(e),a=n.current;o.forEach(function(s){i.has(s)||Ki(s,null)}),i.forEach(function(s){o.has(s)||Ki(s,a)})}Gs.set(n,e)},[e]),n}function xp(e){return e}function wp(e,t){t===void 0&&(t=xp);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var a=t(i,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(i){for(r=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(s){return i(s)},filter:function(){return n}}},assignMedium:function(i){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(i),a=n}var c=function(){var f=a;a=[],f.forEach(i)},l=function(){return Promise.resolve().then(c)};l(),n={push:function(f){a.push(f),l()},filter:function(f){return a=a.filter(f),n}}}};return o}function Cp(e){e===void 0&&(e={});var t=wp(null);return t.options=Vt({async:!0,ssr:!1},e),t}var Al=function(e){var t=e.sideCar,n=Dl(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return d.createElement(r,Vt({},n))};Al.isSideCarExport=!0;function Ep(e,t){return e.useMedium(t),Al}var Tl=Cp(),Ui=function(){},si=d.forwardRef(function(e,t){var n=d.useRef(null),r=d.useState({onScrollCapture:Ui,onWheelCapture:Ui,onTouchMoveCapture:Ui}),o=r[0],i=r[1],a=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,f=e.enabled,u=e.shards,m=e.sideCar,p=e.noRelative,g=e.noIsolation,b=e.inert,h=e.allowPinchZoom,x=e.as,E=x===void 0?"div":x,w=e.gapMode,C=Dl(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=m,R=yp([n,t]),L=Vt(Vt({},C),o);return d.createElement(d.Fragment,null,f&&d.createElement(S,{sideCar:Tl,removeScrollBar:l,shards:u,noRelative:p,noIsolation:g,inert:b,setCallbacks:i,allowPinchZoom:!!h,lockRef:n,gapMode:w}),a?d.cloneElement(d.Children.only(s),Vt(Vt({},L),{ref:R})):d.createElement(E,Vt({},L,{className:c,ref:R}),s))});si.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};si.classNames={fullWidth:Io,zeroRight:_o};var Sp=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Rp(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Sp();return t&&e.setAttribute("nonce",t),e}function Mp(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Np(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Pp=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Rp())&&(Mp(t,n),Np(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},kp=function(){var e=Pp();return function(t,n){d.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Ol=function(){var e=kp(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},_p={left:0,top:0,right:0,gap:0},Gi=function(e){return parseInt(e||"",10)||0},Ip=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Gi(n),Gi(r),Gi(o)]},Dp=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return _p;var t=Ip(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Ap=Ol(),dr="data-scroll-locked",Tp=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),`
50
- .`.concat(pp,` {
51
- overflow: hidden `).concat(r,`;
52
- padding-right: `).concat(s,"px ").concat(r,`;
53
- }
54
- body[`).concat(dr,`] {
55
- overflow: hidden `).concat(r,`;
56
- overscroll-behavior: contain;
57
- `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
58
- padding-left: `.concat(o,`px;
59
- padding-top: `).concat(i,`px;
60
- padding-right: `).concat(a,`px;
61
- margin-left:0;
62
- margin-top:0;
63
- margin-right: `).concat(s,"px ").concat(r,`;
64
- `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),`
65
- }
66
-
67
- .`).concat(_o,` {
68
- right: `).concat(s,"px ").concat(r,`;
69
- }
70
-
71
- .`).concat(Io,` {
72
- margin-right: `).concat(s,"px ").concat(r,`;
73
- }
74
-
75
- .`).concat(_o," .").concat(_o,` {
76
- right: 0 `).concat(r,`;
77
- }
78
-
79
- .`).concat(Io," .").concat(Io,` {
80
- margin-right: 0 `).concat(r,`;
81
- }
82
-
83
- body[`).concat(dr,`] {
84
- `).concat(hp,": ").concat(s,`px;
85
- }
86
- `)},Ys=function(){var e=parseInt(document.body.getAttribute(dr)||"0",10);return isFinite(e)?e:0},Op=function(){d.useEffect(function(){return document.body.setAttribute(dr,(Ys()+1).toString()),function(){var e=Ys()-1;e<=0?document.body.removeAttribute(dr):document.body.setAttribute(dr,e.toString())}},[])},jp=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Op();var i=d.useMemo(function(){return Dp(o)},[o]);return d.createElement(Ap,{styles:Tp(i,!t,o,n?"":"!important")})},la=!1;if(typeof window<"u")try{var go=Object.defineProperty({},"passive",{get:function(){return la=!0,!0}});window.addEventListener("test",go,go),window.removeEventListener("test",go,go)}catch{la=!1}var tr=la?{passive:!1}:!1,Lp=function(e){return e.tagName==="TEXTAREA"},jl=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Lp(e)&&n[t]==="visible")},$p=function(e){return jl(e,"overflowY")},Fp=function(e){return jl(e,"overflowX")},Zs=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Ll(e,r);if(o){var i=$l(e,r),a=i[1],s=i[2];if(a>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},zp=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Bp=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Ll=function(e,t){return e==="v"?$p(t):Fp(t)},$l=function(e,t){return e==="v"?zp(t):Bp(t)},Hp=function(e,t){return e==="h"&&t==="rtl"?-1:1},Vp=function(e,t,n,r,o){var i=Hp(e,window.getComputedStyle(t).direction),a=i*r,s=n.target,c=t.contains(s),l=!1,f=a>0,u=0,m=0;do{if(!s)break;var p=$l(e,s),g=p[0],b=p[1],h=p[2],x=b-h-i*g;(g||x)&&Ll(e,s)&&(u+=x,m+=g);var E=s.parentNode;s=E&&E.nodeType===Node.DOCUMENT_FRAGMENT_NODE?E.host:E}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(f&&Math.abs(u)<1||!f&&Math.abs(m)<1)&&(l=!0),l},bo=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},qs=function(e){return[e.deltaX,e.deltaY]},Xs=function(e){return e&&"current"in e?e.current:e},Wp=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Kp=function(e){return`
87
- .block-interactivity-`.concat(e,` {pointer-events: none;}
88
- .allow-interactivity-`).concat(e,` {pointer-events: all;}
89
- `)},Up=0,nr=[];function Gp(e){var t=d.useRef([]),n=d.useRef([0,0]),r=d.useRef(),o=d.useState(Up++)[0],i=d.useState(Ol)[0],a=d.useRef(e);d.useEffect(function(){a.current=e},[e]),d.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var b=mp([e.lockRef.current],(e.shards||[]).map(Xs),!0).filter(Boolean);return b.forEach(function(h){return h.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),b.forEach(function(h){return h.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=d.useCallback(function(b,h){if("touches"in b&&b.touches.length===2||b.type==="wheel"&&b.ctrlKey)return!a.current.allowPinchZoom;var x=bo(b),E=n.current,w="deltaX"in b?b.deltaX:E[0]-x[0],C="deltaY"in b?b.deltaY:E[1]-x[1],S,R=b.target,L=Math.abs(w)>Math.abs(C)?"h":"v";if("touches"in b&&L==="h"&&R.type==="range")return!1;var D=Zs(L,R);if(!D)return!0;if(D?S=L:(S=L==="v"?"h":"v",D=Zs(L,R)),!D)return!1;if(!r.current&&"changedTouches"in b&&(w||C)&&(r.current=S),!S)return!0;var H=r.current||S;return Vp(H,h,b,H==="h"?w:C)},[]),c=d.useCallback(function(b){var h=b;if(!(!nr.length||nr[nr.length-1]!==i)){var x="deltaY"in h?qs(h):bo(h),E=t.current.filter(function(S){return S.name===h.type&&(S.target===h.target||h.target===S.shadowParent)&&Wp(S.delta,x)})[0];if(E&&E.should){h.cancelable&&h.preventDefault();return}if(!E){var w=(a.current.shards||[]).map(Xs).filter(Boolean).filter(function(S){return S.contains(h.target)}),C=w.length>0?s(h,w[0]):!a.current.noIsolation;C&&h.cancelable&&h.preventDefault()}}},[]),l=d.useCallback(function(b,h,x,E){var w={name:b,delta:h,target:x,should:E,shadowParent:Yp(x)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(C){return C!==w})},1)},[]),f=d.useCallback(function(b){n.current=bo(b),r.current=void 0},[]),u=d.useCallback(function(b){l(b.type,qs(b),b.target,s(b,e.lockRef.current))},[]),m=d.useCallback(function(b){l(b.type,bo(b),b.target,s(b,e.lockRef.current))},[]);d.useEffect(function(){return nr.push(i),e.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:m}),document.addEventListener("wheel",c,tr),document.addEventListener("touchmove",c,tr),document.addEventListener("touchstart",f,tr),function(){nr=nr.filter(function(b){return b!==i}),document.removeEventListener("wheel",c,tr),document.removeEventListener("touchmove",c,tr),document.removeEventListener("touchstart",f,tr)}},[]);var p=e.removeScrollBar,g=e.inert;return d.createElement(d.Fragment,null,g?d.createElement(i,{styles:Kp(o)}):null,p?d.createElement(jp,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Yp(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Zp=Ep(Tl,Gp);var ui=d.forwardRef(function(e,t){return d.createElement(si,Vt({},e,{ref:t,sideCar:Zp}))});ui.classNames=si.classNames;var qp=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},rr=new WeakMap,yo=new WeakMap,xo={},Yi=0,Fl=function(e){return e&&(e.host||Fl(e.parentNode))},Xp=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Fl(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Qp=function(e,t,n,r){var o=Xp(t,Array.isArray(e)?e:[e]);xo[n]||(xo[n]=new WeakMap);var i=xo[n],a=[],s=new Set,c=new Set(o),l=function(u){!u||s.has(u)||(s.add(u),l(u.parentNode))};o.forEach(l);var f=function(u){!u||c.has(u)||Array.prototype.forEach.call(u.children,function(m){if(s.has(m))f(m);else try{var p=m.getAttribute(r),g=p!==null&&p!=="false",b=(rr.get(m)||0)+1,h=(i.get(m)||0)+1;rr.set(m,b),i.set(m,h),a.push(m),b===1&&g&&yo.set(m,!0),h===1&&m.setAttribute(n,"true"),g||m.setAttribute(r,"true")}catch(x){console.error("aria-hidden: cannot operate on ",m,x)}})};return f(t),s.clear(),Yi++,function(){a.forEach(function(u){var m=rr.get(u)-1,p=i.get(u)-1;rr.set(u,m),i.set(u,p),m||(yo.has(u)||u.removeAttribute(r),yo.delete(u)),p||u.removeAttribute(n)}),Yi--,Yi||(rr=new WeakMap,rr=new WeakMap,yo=new WeakMap,xo={})}},Va=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=qp(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Qp(r,o,n,"aria-hidden")):function(){return null}},li="Dialog",[zl]=An(li),[Jp,Ot]=zl(li),Bl=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=d.useRef(null),c=d.useRef(null),[l,f]=wr({prop:r,defaultProp:o!=null?o:!1,onChange:i,caller:li});return v.jsx(Jp,{scope:t,triggerRef:s,contentRef:c,contentId:on(),titleId:on(),descriptionId:on(),open:l,onOpenChange:f,onOpenToggle:d.useCallback(()=>f(u=>!u),[f]),modal:a,children:n})};Bl.displayName=li;var Hl="DialogTrigger",eh=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ot(Hl,n),i=Ue(t,o.triggerRef);return v.jsx($e.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Ua(o.open),...r,ref:i,onClick:ie(e.onClick,o.onOpenToggle)})});eh.displayName=Hl;var Wa="DialogPortal",[th,Vl]=zl(Wa,{forceMount:void 0}),Wl=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=Ot(Wa,t);return v.jsx(th,{scope:t,forceMount:n,children:d.Children.map(r,a=>v.jsx(Nt,{present:n||i.open,children:v.jsx(eo,{asChild:!0,container:o,children:a})}))})};Wl.displayName=Wa;var zo="DialogOverlay",Kl=d.forwardRef((e,t)=>{const n=Vl(zo,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Ot(zo,e.__scopeDialog);return i.modal?v.jsx(Nt,{present:r||i.open,children:v.jsx(rh,{...o,ref:t})}):null});Kl.displayName=zo;var nh=vr("DialogOverlay.RemoveScroll"),rh=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ot(zo,n);return v.jsx(ui,{as:nh,allowPinchZoom:!0,shards:[o.contentRef],children:v.jsx($e.div,{"data-state":Ua(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Wn="DialogContent",Ul=d.forwardRef((e,t)=>{const n=Vl(Wn,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Ot(Wn,e.__scopeDialog);return v.jsx(Nt,{present:r||i.open,children:i.modal?v.jsx(oh,{...o,ref:t}):v.jsx(ih,{...o,ref:t})})});Ul.displayName=Wn;var oh=d.forwardRef((e,t)=>{const n=Ot(Wn,e.__scopeDialog),r=d.useRef(null),o=Ue(t,n.contentRef,r);return d.useEffect(()=>{const i=r.current;if(i)return Va(i)},[]),v.jsx(Gl,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ie(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:ie(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&i.preventDefault()}),onFocusOutside:ie(e.onFocusOutside,i=>i.preventDefault())})}),ih=d.forwardRef((e,t)=>{const n=Ot(Wn,e.__scopeDialog),r=d.useRef(!1),o=d.useRef(!1);return v.jsx(Gl,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a,s;(a=e.onCloseAutoFocus)==null||a.call(e,i),i.defaultPrevented||(r.current||(s=n.triggerRef.current)==null||s.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{var c,l;(c=e.onInteractOutside)==null||c.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=i.target;(l=n.triggerRef.current)!=null&&l.contains(a)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),Gl=d.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=Ot(Wn,n),c=d.useRef(null),l=Ue(t,c);return Ha(),v.jsxs(v.Fragment,{children:[v.jsx(ai,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:v.jsx(Jr,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Ua(s.open),...a,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),v.jsxs(v.Fragment,{children:[v.jsx(ah,{titleId:s.titleId}),v.jsx(uh,{contentRef:c,descriptionId:s.descriptionId})]})]})}),Ka="DialogTitle",Yl=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ot(Ka,n);return v.jsx($e.h2,{id:o.titleId,...r,ref:t})});Yl.displayName=Ka;var Zl="DialogDescription",ql=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ot(Zl,n);return v.jsx($e.p,{id:o.descriptionId,...r,ref:t})});ql.displayName=Zl;var Xl="DialogClose",Ql=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ot(Xl,n);return v.jsx($e.button,{type:"button",...r,ref:t,onClick:ie(e.onClick,()=>o.onOpenChange(!1))})});Ql.displayName=Xl;function Ua(e){return e?"open":"closed"}var Jl="DialogTitleWarning",[EC,ec]=jm(Jl,{contentName:Wn,titleName:Ka,docsSlug:"dialog"}),ah=({titleId:e})=>{const t=ec(Jl),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
90
-
91
- If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
92
-
93
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return d.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},sh="DialogDescriptionWarning",uh=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ec(sh).contentName}}.`;return d.useEffect(()=>{var i;const o=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},lh=Bl,ch=Wl,tc=Kl,nc=Ul,rc=Yl,oc=ql,dh=Ql;const fh=lh,vh=ch,ic=y.forwardRef(({className:e,...t},n)=>v.jsx(tc,{ref:n,className:W(`
67
+ `},size:{small:`univer-h-6 univer-rounded-md univer-px-1.5 univer-text-xs`,middle:`univer-h-8 univer-rounded-lg univer-px-2 univer-text-sm`,large:`univer-h-10 univer-rounded-lg univer-px-3 univer-text-sm`}},defaultVariants:{variant:`default`,size:`middle`}}),j=(0,l.forwardRef)(({className:e,variant:t,size:n,asChild:r=!1,...i},a)=>(0,f.jsx)(r?m.Slot:`button`,{className:T(A({variant:t,size:n,className:e})),ref:a,"data-u-comp":`button`,...i}));j.displayName=`Button`;const M=({className:e,orientation:t=`horizontal`,children:n})=>{let r=l.Children.count(n),i=t===`horizontal`,a=t===`vertical`;return(0,f.jsx)(`div`,{className:T(`univer-grid`,{"univer-grid-flow-row":a,"univer-w-fit":a},e),children:l.Children.map(n,(e,t)=>{let n=t===0,o=t===r-1;return(0,l.cloneElement)(e,{className:T({"!univer-rounded-l-none":i&&!n,"!univer-rounded-r-none":i&&!o,"!univer-border-l-0":i&&!n,"!univer-rounded-t-none":a&&!n,"!univer-rounded-b-none":a&&!o,"!univer-border-t-0":a&&!n},e.props.className)})})})};function N(){return typeof window<`u`&&typeof document<`u`}const P=(0,l.createContext)({mountContainer:N()?document.body:null});function F(e){let{children:t,locale:n,mountContainer:r}=e,i=(0,l.useMemo)(()=>({locale:n,mountContainer:r}),[n,r]);return(0,f.jsx)(P.Provider,{value:i,children:t})}const I=`univer-scrollbar-thin univer-scrollbar-track-gray-50 univer-scrollbar-thumb-gray-300 dark:!univer-scrollbar-track-gray-900 dark:!univer-scrollbar-thumb-gray-700`,L=`univer-border-gray-200 dark:!univer-border-gray-600 univer-border-solid`,R=T(L,`univer-border`),ee=T(L,`univer-border-l univer-border-b univer-border-t-0 univer-border-r-0`),te=T(L,`univer-border-l univer-border-b-0 univer-border-t-0 univer-border-r-0`),z=T(L,`univer-border-l-0 univer-border-b-0 univer-border-t univer-border-r-0`),B=T(L,`univer-border-l-0 univer-border-b univer-border-t-0 univer-border-r-0`),ne=T(L,`univer-border-l-0 univer-border-b-0 univer-border-t-0 univer-border-r`);function re(e){let{className:t,value:n,onValueChange:r}=e;function i(e){let[t,i,a]=e.target.value.split(`:`).map(Number),o=new Date(n==null?Date.now():n);o.setHours(t,i,a,0),r==null||r(o)}return(0,f.jsxs)(`div`,{"data-u-comp":`time-input`,className:`univer-relative univer-mx-auto univer-mt-1 univer-w-fit`,children:[(0,f.jsx)(c.ClockIcon,{className:`
68
+ univer-absolute univer-left-2 univer-top-1/2 -univer-translate-y-1/2 univer-text-gray-600
69
+ dark:!univer-text-gray-400
70
+ `}),(0,f.jsx)(`input`,{className:T(`
71
+ univer-block univer-h-7 univer-w-fit univer-appearance-none univer-rounded-md univer-bg-transparent
72
+ univer-pl-6 univer-pr-2 univer-text-center univer-text-gray-800 univer-shadow univer-outline-none
73
+ univer-transition-all univer-duration-200
74
+ focus:univer-border-primary-600
75
+ dark:!univer-text-white
76
+ dark:focus:!univer-border-primary-500
77
+ [&::-webkit-calendar-picker-indicator]:univer-hidden
78
+ [&::-webkit-calendar-picker-indicator]:univer-appearance-none
79
+ `,R,t),type:`time`,step:`1`,value:(0,h.default)(n).format(`HH:mm:ss`),onChange:i})]})}function ie(e,t){return new Date(e,t+1,0).getDate()}function ae(e,t){return new Date(e,t,1).getDay()}function oe(e){let{className:t,...n}=e;return(0,f.jsx)(`button`,{className:T(`
80
+ univer-size-7 univer-rounded-md univer-border-none univer-bg-transparent univer-p-1 univer-transition-all
81
+ hover:univer-bg-gray-200
82
+ dark:hover:!univer-bg-gray-600
83
+ `,t),type:`button`,...n})}function V(e){let{className:t,max:n,min:r,showTime:i=!1,value:a,onValueChange:o}=e,{locale:s}=(0,l.useContext)(P),{year:u,weekDays:d,months:p}=s==null?void 0:s.Calendar,m=new Date,[h,g]=(0,l.useState)((a==null?m:a).getFullYear()),[_,v]=(0,l.useState)((a==null?m:a).getMonth());function y(){v(e=>e===0?(g(e=>e-1),11):e-1)}function b(){v(e=>e===11?(g(e=>e+1),0):e+1)}let x=ie(h,_),S=ae(h,_),C=(0,l.useMemo)(()=>{let e=[];for(let t=0;t<S;t++)e.push(null);for(let t=1;t<=x;t++)e.push(t);return e},[x,S]);function w(e){return e&&h===(a==null?void 0:a.getFullYear())&&_===(a==null?void 0:a.getMonth())&&e===(a==null?void 0:a.getDate())}function E(e){return e&&h===m.getFullYear()&&_===m.getMonth()&&e===m.getDate()}function D(e){var t,i,o;if(!e)return!1;let s=(t=a==null?void 0:a.getHours())==null?m.getHours():t,c=(i=a==null?void 0:a.getMinutes())==null?m.getMinutes():i,l=(o=a==null?void 0:a.getSeconds())==null?m.getSeconds():o,u=new Date(h,_,e,s,c,l);return!!(r&&u<r||n&&u>n)}function O(e){var t,n,r;if(D(e))return;let i=(t=a==null?void 0:a.getHours())==null?m.getHours():t,s=(n=a==null?void 0:a.getMinutes())==null?m.getMinutes():n,c=(r=a==null?void 0:a.getSeconds())==null?m.getSeconds():r;o==null||o(new Date(h,_,e,i,s,c))}function k(e){var t;let n=e.getHours(),r=e.getMinutes(),i=e.getSeconds(),s=new Date(h,_,(t=a==null?void 0:a.getDate())==null?m.getDate():t,n,r,i);o==null||o(s)}return(0,f.jsxs)(`div`,{"data-u-comp":`calendar`,className:T(`
84
+ univer-mx-auto univer-max-w-xs univer-select-none univer-rounded univer-bg-white univer-text-gray-900
85
+ dark:!univer-bg-gray-900 dark:!univer-text-white
86
+ `,t),children:[(0,f.jsxs)(`nav`,{className:`univer-mb-4 univer-flex univer-items-center univer-justify-between`,children:[(0,f.jsx)(oe,{className:`
87
+ univer-text-lg univer-text-gray-500
88
+ dark:!univer-text-gray-200
89
+ `,"aria-label":`Previous Month`,onClick:y,children:(0,f.jsx)(c.MoreRightIcon,{className:`univer-rotate-180`})}),(0,f.jsxs)(`span`,{className:`univer-flex univer-gap-0.5 univer-text-sm univer-font-medium`,children:[(0,f.jsx)(`span`,{children:h}),(0,f.jsx)(`span`,{children:u}),(0,f.jsx)(`span`,{children:p[_]})]}),(0,f.jsx)(oe,{className:`
90
+ univer-text-lg univer-text-gray-500
91
+ dark:!univer-text-gray-200
92
+ `,"aria-label":`Next Month`,onClick:b,children:(0,f.jsx)(c.MoreRightIcon,{})})]}),(0,f.jsx)(`div`,{className:`
93
+ univer-mb-1 univer-grid univer-grid-cols-7 univer-gap-1 univer-text-center univer-text-sm
94
+ univer-text-gray-500
95
+ dark:!univer-text-gray-200
96
+ `,children:d.map(e=>(0,f.jsx)(`div`,{children:e},e))}),(0,f.jsx)(`div`,{className:`univer-grid univer-grid-cols-7 univer-gap-1 univer-text-center`,children:C.map((e,t)=>e?(0,f.jsx)(oe,{className:T({"!univer-bg-primary-600 univer-font-bold univer-text-white":!E(e)&&w(e),"dark:!univer-text-white":!E(e)&&!w(e),"!univer-bg-primary-600 univer-text-white":E(e)&&w(e),"univer-font-semibold univer-text-primary-600 dark:!univer-text-primary-500":E(e)&&!w(e),"univer-cursor-not-allowed univer-opacity-40":D(e),"univer-hover:bg-primary-100 univer-cursor-pointer univer-text-gray-800":!w(e)&&!D(e)}),onClick:()=>O(e),disabled:D(e),children:e},t):(0,f.jsx)(`div`,{},t))}),i&&(0,f.jsx)(re,{value:a,onValueChange:k})]})}function se({emptyText:e}){return(0,f.jsx)(`section`,{className:`
97
+ univer-h-8 univer-px-2 univer-pr-32 univer-text-sm/8 univer-text-gray-600
98
+ dark:!univer-text-gray-200
99
+ `,children:e})}function ce(e){let{value:t,options:n=[],onChange:r,contentClassName:i,wrapperClassName:a}=e,{locale:o}=(0,l.useContext)(P),s=(0,l.useMemo)(()=>{let e=[n];return t.forEach((t,n)=>{let r=e[n].find(e=>e.value===t);r!=null&&r.children&&e.push(r.children)}),e},[t]);function u(e,n){if(n===t[e])return;if(t[e+1]){let i=t.slice(0,e+1);i[e]=n,r(i);return}let i=[...t];i[e]=n,r(i)}return(0,f.jsxs)(`section`,{"data-u-comp":`cascader-list`,className:T(`
100
+ univer-overflow-auto-y univer-grid univer-h-full univer-max-h-80 univer-grid-flow-col univer-rounded
101
+ univer-py-2 univer-text-gray-900
102
+ dark:!univer-text-white
103
+ [&>ul:not(:last-child)]:univer-border-0 [&>ul:not(:last-child)]:univer-border-r
104
+ [&>ul:not(:last-child)]:univer-border-solid [&>ul:not(:last-child)]:univer-border-r-gray-200
105
+ `,R,I,a),children:[s.map((e,n)=>e.length?(0,f.jsx)(`ul`,{className:T(`
106
+ univer-m-0 univer-h-full univer-max-h-full univer-list-none univer-overflow-auto
107
+ univer-px-2
108
+ `,I,i),children:e.map(e=>(0,f.jsx)(`li`,{children:(0,f.jsxs)(`a`,{className:T(`
109
+ univer-relative univer-block univer-h-8 univer-cursor-pointer univer-rounded
110
+ univer-text-sm/8
111
+ `,{"univer-px-7":n>0,"univer-px-1.5":n===0,"univer-bg-gray-200 dark:!univer-bg-gray-600":e.value===t[n]}),onClick:()=>u(n,e.value),children:[n>0&&(0,f.jsx)(`span`,{className:`
112
+ univer-absolute univer-left-2 univer-flex univer-h-full
113
+ univer-items-center
114
+ `,children:e.value===t[n]&&(0,f.jsx)(c.CheckMarkIcon,{className:`univer-text-primary-600`})}),(0,f.jsx)(`span`,{children:e.label})]})},e.value))},n):(0,f.jsx)(se,{emptyText:o==null?void 0:o.CascaderList.empty},n)),t.length<=0&&(0,f.jsx)(se,{emptyText:o==null?void 0:o.CascaderList.empty})]})}function le(e){let{children:t,className:n,style:r,value:i,disabled:a,direction:o=`horizontal`,onChange:s}=e,c=e=>{i.includes(e)?s(i.filter(t=>t!==e)):s([...i,e])};return(0,f.jsx)(`div`,{className:T(`univer-flex univer-gap-2`,{"univer-flex-col":o===`vertical`},n),style:r,children:l.Children.map(t,(e,t)=>(0,l.isValidElement)(e)?(0,l.cloneElement)(e,{key:t,children:e.props.children,checked:e.props.value?i.includes(e.props.value):!1,disabled:a==null?e.props.disabled:a,onChange:c}):e)})}function ue(e){let{children:t,className:n,style:r,checked:i=!1,indeterminate:a=!1,value:o,disabled:s=!1,onChange:u,contentClassName:d}=e,p=(0,l.useRef)(null);function m(e){if(e.stopPropagation(),!(!u||s))if(o!==void 0)u==null||u(o);else{var t,n;let e=(t=p==null||(n=p.current)==null?void 0:n.checked)==null?!1:t;u==null||u(e)}}return(0,f.jsxs)(`label`,{"data-u-comp":`checkbox`,className:T(`univer-box-border univer-inline-flex univer-items-center univer-gap-2 univer-text-sm`,{"univer-cursor-pointer univer-text-gray-900 dark:!univer-text-white":!s,"univer-text-gray-400":s},n),style:r,children:[(0,f.jsxs)(`span`,{className:`univer-relative univer-block`,children:[(0,f.jsx)(`input`,{ref:p,className:`univer-absolute univer-size-0 univer-opacity-0`,type:`checkbox`,checked:i,disabled:s,onChange:m}),(0,f.jsxs)(`span`,{className:T(`
115
+ univer-relative univer-box-border univer-flex univer-size-4 univer-items-center
116
+ univer-justify-center univer-overflow-hidden univer-rounded univer-border univer-border-solid
117
+ univer-transition-colors
118
+ `,{"univer-opacity-50":s,"univer-border-primary-600 univer-bg-primary-600":i||a,"univer-border-gray-300 univer-bg-gray-50 dark:!univer-border-gray-500 dark:!univer-bg-gray-600":!i&&!a}),children:[i&&(0,f.jsx)(c.CheckMarkIcon,{className:`
119
+ univer-absolute univer-left-1/2 univer-top-1/2 univer-block univer-size-3
120
+ -univer-translate-x-1/2 -univer-translate-y-1/2 univer-text-white
121
+ `}),a&&!i&&(0,f.jsx)(`span`,{className:`
122
+ univer-absolute univer-left-1/2 univer-top-1/2 univer-block univer-h-0.5 univer-w-2.5
123
+ -univer-translate-x-1/2 -univer-translate-y-1/2 univer-rounded univer-bg-white
124
+ `})]})]}),(0,f.jsx)(`span`,{className:T(`univer-select-none`,d),children:t})]})}const de=g.Root,fe=g.Portal,pe=(0,l.forwardRef)(({className:e,...t},n)=>(0,f.jsx)(g.Overlay,{ref:n,className:T(`
94
125
  data-[state=open]:univer-animate-in data-[state=open]:univer-fade-in-0
95
126
  data-[state=closed]:univer-animate-out data-[state=closed]:univer-fade-out-0
96
127
  univer-fixed univer-inset-0 univer-z-[1080] univer-bg-[rgba(0,0,0,0.8)]
97
- `,e),...t}));ic.displayName=tc.displayName;const ac=y.forwardRef(({className:e,children:t,closable:n=!0,onClickClose:r,...o},i)=>v.jsxs(vh,{children:[v.jsx(ic,{}),v.jsxs(nc,{ref:i,className:W(`
128
+ `,e),...t}));pe.displayName=g.Overlay.displayName;const me=(0,l.forwardRef)(({className:e,children:t,closable:n=!0,onClickClose:r,...i},a)=>(0,f.jsxs)(fe,{children:[(0,f.jsx)(pe,{}),(0,f.jsxs)(g.Content,{ref:a,className:T(`
98
129
  data-[state=open]:univer-animate-in data-[state=open]:univer-fade-in-0
99
130
  data-[state=open]:univer-zoom-in-95 data-[state=open]:univer-slide-in-from-left-1/2
100
131
  data-[state=open]:univer-slide-in-from-top-[48%]
@@ -106,24 +137,71 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
106
137
  univer-bg-white univer-p-4 univer-text-gray-500 univer-shadow-md univer-duration-200
107
138
  sm:!univer-rounded-lg
108
139
  dark:!univer-bg-gray-700 dark:!univer-text-gray-400
109
- `,ct,e),...o,children:[t,n&&v.jsxs(dh,{className:"univer-absolute univer-right-4 univer-top-4 univer-size-6 univer-cursor-pointer univer-rounded-sm univer-border-none univer-bg-transparent univer-p-0 univer-transition-opacity hover:univer-opacity-100 disabled:univer-pointer-events-none",onClick:r,children:[v.jsx(ii,{className:"univer-size-4 univer-text-gray-400"}),v.jsx("span",{className:"univer-sr-only",children:"Close"})]})]})]}));ac.displayName=nc.displayName;const sc=({className:e,...t})=>v.jsx("div",{className:W(`
140
+ `,R,e),...i,children:[t,n&&(0,f.jsxs)(g.Close,{className:`
141
+ univer-absolute univer-right-4 univer-top-4 univer-size-6 univer-cursor-pointer univer-rounded-sm
142
+ univer-border-none univer-bg-transparent univer-p-0 univer-transition-opacity
143
+ hover:univer-opacity-100
144
+ disabled:univer-pointer-events-none
145
+ `,onClick:r,children:[(0,f.jsx)(c.CloseIcon,{className:`univer-size-4 univer-text-gray-400`}),(0,f.jsx)(`span`,{className:`univer-sr-only`,children:`Close`})]})]})]}));me.displayName=g.Content.displayName;const he=({className:e,...t})=>(0,f.jsx)(`div`,{className:T(`
110
146
  univer-flex univer-flex-col univer-space-y-1.5 univer-text-center
111
147
  sm:!univer-text-left
112
- `,e),...t});sc.displayName="DialogHeader";const uc=({className:e,...t})=>v.jsx("div",{className:W(`
148
+ `,e),...t});he.displayName=`DialogHeader`;const ge=({className:e,...t})=>(0,f.jsx)(`div`,{className:T(`
113
149
  univer-flex univer-flex-col-reverse
114
150
  sm:!univer-flex-row sm:!univer-justify-end sm:!univer-space-x-2
115
- `,e),...t});uc.displayName="DialogFooter";const lc=y.forwardRef(({className:e,...t},n)=>v.jsx(rc,{ref:n,className:W(`
151
+ `,e),...t});ge.displayName=`DialogFooter`;const _e=(0,l.forwardRef)(({className:e,...t},n)=>(0,f.jsx)(g.Title,{ref:n,className:T(`
116
152
  univer-my-0 univer-text-lg univer-font-semibold univer-leading-none univer-tracking-tight
117
153
  univer-text-gray-900
118
154
  dark:!univer-text-white
119
- `,e),...t}));lc.displayName=rc.displayName;const cc=y.forwardRef(({className:e,...t},n)=>v.jsx(oc,{ref:n,className:W("univer-text-sm univer-text-gray-500",e),...t}));cc.displayName=oc.displayName;function mh(e={}){const t=y.useCallback(()=>{const{innerWidth:h,innerHeight:x}=window;return{x:Math.max(0,(h-0)/2),y:Math.max(0,(x-0)/2)}},[]),{defaultPosition:n=t(),enabled:r=!1}=e,[o,i]=y.useState(n),[a,s]=y.useState(!1),c=y.useRef(null),l=y.useRef({x:0,y:0}),f=y.useRef({x:0,y:0}),u=y.useRef(!1);y.useEffect(()=>{if(!c.current||u.current||e.defaultPosition)return;const{width:h,height:x}=c.current.getBoundingClientRect(),{innerWidth:E,innerHeight:w}=window,C=Math.max(0,(E-h)/2),S=Math.max(0,(w-x)/2);i({x:C,y:S}),l.current={x:C,y:S},u.current=!0},[e.defaultPosition]);const m=y.useCallback((h,x)=>{if(!c.current)return{x:h,y:x};const E=c.current.getBoundingClientRect(),{clientWidth:w,clientHeight:C}=document.documentElement;let S=l.current.x+(h-f.current.x),R=l.current.y+(x-f.current.y);return S<0&&(S=0),R<0&&(R=0),S+E.width>w&&(S=w-E.width),R+E.height>C&&(R=C-E.height),{x:S,y:R}},[]),p=y.useCallback(h=>{r&&(h.preventDefault(),h.stopPropagation(),l.current={...o},f.current={x:h.clientX,y:h.clientY},s(!0),document.body.style.userSelect="none")},[r,o]),g=y.useCallback(h=>{if(!a)return;h.preventDefault(),h.stopPropagation();const x=m(h.clientX,h.clientY);i(x)},[a,m]),b=y.useCallback(()=>{s(!1),document.body.style.userSelect=""},[]);return y.useEffect(()=>{if(r)return document.addEventListener("mousemove",g),document.addEventListener("mouseup",b),()=>{document.removeEventListener("mousemove",g),document.removeEventListener("mouseup",b)}},[r,g,b]),{position:o,isDragging:a,elementRef:c,setElementRef:h=>{if(c.current=h,h&&!u.current&&!e.defaultPosition){const{width:x,height:E}=h.getBoundingClientRect(),{innerWidth:w,innerHeight:C}=window,S=Math.max(0,(w-x)/2),R=Math.max(0,(C-E)/2);i({x:S,y:R}),l.current={x:S,y:R},u.current=!0}},handleMouseDown:p}}function Ga(e){var z,A,_,M;const{className:t,children:n,style:r,open:o=!1,title:i,width:a,draggable:s=!1,defaultPosition:c,footer:l,mask:f=!0,keyboard:u=!0,closable:m=!0,maskClosable:p=!0,showOk:g,showCancel:b,onOpenChange:h,onClose:x,onOk:E,onCancel:w}=e,{locale:C}=y.useContext(Zt),{position:S,isDragging:R,setElementRef:L,handleMouseDown:D}=mh({defaultPosition:c,enabled:s}),H=l!=null?l:g||b?v.jsxs("div",{className:"univer-flex univer-justify-end univer-gap-2",children:[b&&v.jsx(un,{onClick:w,children:(A=(z=C==null?void 0:C.Confirm)==null?void 0:z.cancel)!=null?A:"Cancel"}),g&&v.jsx(un,{variant:"primary",onClick:E,children:(M=(_=C==null?void 0:C.Confirm)==null?void 0:_.confirm)!=null?M:"OK"})]}):null,k=y.useCallback(I=>{I&&s&&L(I)},[s,L]),T=y.useCallback(I=>{!f&&!I||(h==null||h(I),I||x==null||x())},[x,h]);function F(){h==null||h(!1),x==null||x()}return v.jsx(fh,{open:o,onOpenChange:T,modal:f!==!1,children:v.jsxs(ac,{ref:k,className:W(t,{"!univer-animate-none":s}),style:{...r,width:a?typeof a=="number"?`${a}px`:a:void 0,maxWidth:a?"initial":void 0,...s?{position:"absolute",margin:0,left:0,top:0,transform:`translate(${S.x}px, ${S.y}px)`,transition:R?"none":void 0,cursor:R?"grabbing":void 0}:{}},closable:m,onClickClose:F,onEscapeKeyDown:I=>{u&&F(),I.preventDefault()},onPointerDownOutside:I=>{p&&F(),I.preventDefault()},children:[v.jsxs(sc,{className:W({"!univer-hidden":!i}),"data-drag-handle":s?"true":void 0,style:{cursor:s?"grab":void 0,userSelect:s?"none":void 0,touchAction:s?"none":void 0},onMouseDown:s?D:void 0,children:[v.jsx(lc,{children:i}),v.jsx(cc,{className:"univer-hidden"})]}),n,H&&v.jsx(uc,{children:H})]})})}const mr=(e,t,n)=>{t=t/100,n=n/100;const r=n*t,o=r*(1-Math.abs(e/60%2-1)),i=n-r;let a=0,s=0,c=0;return e>=0&&e<60?(a=r,s=o,c=0):e>=60&&e<120?(a=o,s=r,c=0):e>=120&&e<180?(a=0,s=r,c=o):e>=180&&e<240?(a=0,s=o,c=r):e>=240&&e<300?(a=o,s=0,c=r):e>=300&&e<360&&(a=r,s=0,c=o),[Math.round((a+i)*255),Math.round((s+i)*255),Math.round((c+i)*255)]},dc=(e,t,n)=>{const r=o=>o.toString(16).padStart(2,"0");return`#${r(e)}${r(t)}${r(n)}`},Ya=(e,t,n)=>{e/=255,t/=255,n/=255;const r=Math.max(e,t,n),o=Math.min(e,t,n),i=r-o;let a=0,s=0;const c=r;return r!==0&&(s=i/r),i!==0&&(r===e?a=(t-n)/i+(t<n?6:0):r===t?a=(n-e)/i+2:r===n&&(a=(e-t)/i+4),a*=60),[a,s*100,c*100]},Za=e=>{e.length===4&&(e=`#${e.slice(1).split("").map(o=>o+o).join("")}`);const[t,n,r]=e.match(/\w\w/g).map(o=>Number.parseInt(o,16));return Ya(t,n,r)},Bo=(e,t,n)=>{const[r,o,i]=mr(e,t,n);return dc(r,o,i)},ph=(e,t,n,r)=>{const[o,i,a]=mr(e,t,n);return`rgba(${o}, ${i}, ${a}, ${r})`},hh=e=>{const t=e.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d*\.?\d+))?\)/);if(!t)throw new Error("Invalid RGBA string");return[Number.parseInt(t[1],10),Number.parseInt(t[2],10),Number.parseInt(t[3],10),t[4]?Number.parseFloat(t[4]):1]};function gh({hsv:e,alpha:t,onChange:n,onChanged:r}){const[o,i]=y.useState(!1),a=y.useRef(null),s=y.useRef(null),c=y.useMemo(()=>{var g,b;return(b=(g=s.current)==null?void 0:g.clientWidth)!=null?b:0},[s.current]),l=y.useCallback(g=>{const b=a.current;if(!b)return;const h=b.getBoundingClientRect(),x=h.width-c,E=Math.max(0,Math.min(g-h.left,x));n(Math.round(E/x*100)/100)},[n]),f=y.useCallback(g=>{o&&l(g.clientX)},[o,l]),u=y.useCallback(()=>{i(!1),r==null||r(t)},[t]);y.useEffect(()=>(o&&(window.addEventListener("pointermove",f),window.addEventListener("pointerup",u),window.addEventListener("mouseup",u)),()=>{window.removeEventListener("pointermove",f),window.removeEventListener("pointerup",u),window.removeEventListener("mouseup",u)}),[o,f,u]);const m=()=>{var b;return`${Math.min(Math.max(t*100,0),100)/100*(100-c/((b=a.current)==null?void 0:b.clientWidth)*100)}%`},p=mr(...e);return v.jsxs("div",{className:"univer-relative univer-w-full univer-select-none",children:[v.jsx("div",{className:"univer-absolute univer-inset-0 univer-rounded-full",style:{backgroundImage:"linear-gradient(45deg, #E3E5EA 25%, transparent 25%), linear-gradient(-45deg, #E3E5EA 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #E3E5EA 75%), linear-gradient(-45deg, transparent 75%, #E3E5EA 75%)",backgroundPosition:"0 0, 0 4px, 4px -4px, -4px 0",backgroundSize:"8px 8px"}}),v.jsx("div",{ref:a,className:"univer-relative univer-h-2 univer-w-full univer-cursor-pointer univer-rounded-full univer-shadow-inner",style:{background:`linear-gradient(to right, transparent, rgb(${p.join(",")}))`},onPointerDown:g=>{i(!0),l(g.clientX)},children:v.jsx("div",{ref:s,className:"univer-absolute univer-top-1/2 univer-box-border univer-size-2 univer-rounded-full univer-bg-transparent univer-shadow-md univer-ring-2 univer-ring-white univer-transition-transform univer-duration-75 univer-will-change-transform",style:{left:m(),transform:"translateY(-50%)",transition:o?"none":"all 0.1s ease-out"}})})]})}function bh({hsv:e,onChange:t}){const[n,r]=y.useState(""),o=y.useMemo(()=>Bo(e[0],e[1],e[2]),[e]);y.useEffect(()=>{r(o.replace(/^#/,""))},[o]);const i=c=>/^[0-9A-Fa-f]{6}$/.test(c),a=c=>{const l=c.target.value.trim();if(!(l.length>6)&&!(l!==""&&!/^[0-9A-Fa-f]*$/.test(l))&&(r(l),i(l))){const f=Za(l);f&&t&&t(...f)}},s=()=>{i(n)||r(o.replace(/^#/,""))};return v.jsxs(v.Fragment,{children:[v.jsx("input",{className:W("univer-w-full univer-px-2 !univer-pl-4 univer-uppercase focus:univer-border-primary-500 focus:univer-outline-none dark:!univer-text-white",ct),value:n,onChange:a,onBlur:s,maxLength:6,spellCheck:!1}),v.jsx("span",{className:"univer-absolute univer-left-1.5 univer-top-1/2 -univer-translate-y-1/2 univer-text-sm univer-text-gray-400",children:"#"})]})}function yh({hsv:e,alpha:t,format:n,onChange:r}){const[o,i]=y.useState({r:0,g:0,b:0,a:1});y.useEffect(()=>{const[c,l,f]=mr(e[0],e[1],e[2]);i({r:Math.round(c),g:Math.round(l),b:Math.round(f),a:t!=null?t:1})},[e,t]);const a=(c,l)=>{if(c==="a"){if(l!==""&&!/^\d*\.?\d*$/.test(l))return;const m=l===""?0:Number.parseFloat(l);if(m>1)return;const p={...o,a:m};i(p),r&&r(e[0],e[1],e[2],m);return}if(l!==""&&!/^\d*$/.test(l))return;const f=l===""?0:Number.parseInt(l,10);if(f>255)return;const u={...o,[c]:f};if(i(u),r){const m=Ya(u.r,u.g,u.b);r(...m,o.a)}},s=()=>{const[c,l,f]=mr(e[0],e[1],e[2]);i({r:Math.round(c),g:Math.round(l),b:Math.round(f),a:t!=null?t:1})};return v.jsxs("div",{className:"univer-flex univer-items-center univer-gap-2 [&>input]:univer-w-11 [&>input]:univer-border-gray-200 [&>input]:focus:univer-border-primary-500 dark:[&>input]:!univer-border-gray-600 dark:[&>input]:!univer-text-white",children:[v.jsx("input",{value:o.r,onChange:c=>a("r",c.target.value),onBlur:s,maxLength:3}),v.jsx("input",{value:o.g,onChange:c=>a("g",c.target.value),onBlur:s,maxLength:3}),v.jsx("input",{value:o.b,onChange:c=>a("b",c.target.value),onBlur:s,maxLength:3}),n==="rgba"&&v.jsx("input",{value:o.a,onChange:c=>a("a",c.target.value),onBlur:s,maxLength:4})]})}function xh({hsv:e,alpha:t,format:n,onChange:r}){return v.jsx("div",{className:"dark:![&_input]:univer-border-gray-600 dark:![&_input]:univer-text-white univer-flex univer-gap-2 [&_input]:univer-box-border [&_input]:univer-flex [&_input]:univer-h-7 [&_input]:univer-items-center [&_input]:univer-rounded [&_input]:univer-border [&_input]:univer-border-solid [&_input]:univer-border-gray-200 [&_input]:univer-bg-transparent [&_input]:univer-px-1.5 [&_input]:univer-text-sm [&_input]:univer-text-gray-700 [&_input]:univer-outline-none",children:v.jsxs("div",{className:"univer-relative univer-flex univer-flex-1 univer-gap-2",children:[v.jsx(bh,{hsv:e,onChange:r}),v.jsx(yh,{hsv:e,alpha:t,format:n,onChange:r})]})})}const wh=[["#FFFFFF","#E1EFFE","#FDE8E8","#FEECDC","#FFF4B9","#DEF7EC","#D5F5F6","#EDEBFE","#FCE8F3"],["#CDD0D8","#A4CAFE","#F8B4B4","#FDBA8C","#FAC815","#84E1BC","#7EDCE2","#CABFFD","#F8B4D9"],["#979DAC","#3F83F8","#F05252","#FF5A1F","#D49D0F","#0DA471","#0694A2","#9061F9","#E74694"],["#414657","#1A56DB","#C81E1E","#B43403","#9A6D15","#046C4E","#036672","#6C2BD9","#BF125D"],["#000000","#233876","#771D1D","#771D1D","#634312","#014737","#014451","#4A1D96","#751A3D"]];function Ch({hsv:e,onChange:t}){const n=y.useCallback(o=>{const[i,a,s]=Za(o);t(i,a,s)},[t]),r=Bo(e[0],e[1],e[2]);return v.jsx("div",{"data-u-comp":"color-picker-presets",className:"univer-grid univer-content-center univer-gap-2",children:wh.map((o,i)=>v.jsx("div",{className:"univer-grid univer-grid-flow-col univer-items-center univer-justify-between univer-gap-2",children:o.map((a,s)=>v.jsx("button",{type:"button",className:W("univer-box-border univer-size-5 univer-cursor-pointer univer-rounded-full univer-border univer-border-solid univer-border-transparent univer-bg-gray-300 univer-transition-shadow",{"univer-ring-2 univer-ring-offset-2 univer-ring-offset-white dark:!univer-ring-primary-600 dark:!univer-ring-offset-gray-600":a.toUpperCase()===r.toUpperCase(),"!univer-border-gray-200":i===0&&s===0}),style:{backgroundColor:a},onClick:()=>n(a)},s))},i))})}function Eh({hsv:e,onChange:t,onChanged:n}){const r=y.useRef(null),o=y.useRef(null),[i,a]=y.useState(!1);y.useEffect(()=>{const u=r.current;if(!u)return;const m=u.getContext("2d");if(!m)return;const p=m.createLinearGradient(0,0,u.width,0);p.addColorStop(0,`hsl(${e[0]}, 0%, 50%)`),p.addColorStop(1,`hsl(${e[0]}, 100%, 50%)`),m.fillStyle=p,m.fillRect(0,0,u.width,u.height);const g=m.createLinearGradient(0,0,0,u.height);g.addColorStop(0,"rgba(255, 255, 255, 0)"),g.addColorStop(1,"rgba(0, 0, 0, 1)"),m.fillStyle=g,m.fillRect(0,0,u.width,u.height)},[e]);const s=u=>{u.stopPropagation();const m=r.current;if(!m)return;const p=m.getBoundingClientRect(),g=Math.max(0,Math.min(u.clientX-p.left,p.width)),b=Math.max(0,Math.min(u.clientY-p.top,p.height)),h=g/p.width*100,x=100-b/p.height*100;t(e[0],h,x)},c=y.useCallback(()=>{a(!1)},[e]);function l(){n==null||n(e[0],e[1],e[2])}y.useEffect(()=>{var u;return(u=o.current)==null||u.addEventListener("mouseup",l),window.addEventListener("pointerup",c),window.addEventListener("mouseup",c),()=>{var m;(m=o.current)==null||m.removeEventListener("mouseup",l),window.removeEventListener("pointerup",c),window.removeEventListener("mouseup",c)}},[e]);const f=()=>{var x,E,w,C;const p=(E=(x=o.current)==null?void 0:x.clientWidth)!=null?E:0,g=(C=(w=o.current)==null?void 0:w.clientHeight)!=null?C:0,b=e[1]/100*p-8,h=(100-e[2])/100*g-8;return{transform:`translate(${b}px, ${h}px)`,transition:i?"none":"transform 0.1s ease-out"}};return y.useEffect(()=>{const u=()=>{a(!1)};return window.addEventListener("pointerup",u),window.addEventListener("mouseup",u),()=>{window.removeEventListener("pointerup",u),window.removeEventListener("mouseup",u)}},[]),v.jsxs("div",{"data-u-comp":"color-picker-spectrum",ref:o,className:"univer-relative univer-overflow-hidden",children:[v.jsx("canvas",{ref:r,className:"univer-size-full univer-cursor-crosshair univer-rounded",onPointerDown:u=>{a(!0),s(u)},onPointerMove:u=>i&&s(u)}),v.jsx("div",{className:"univer-pointer-events-none univer-absolute univer-left-0 univer-top-0 univer-size-4 univer-rounded-full univer-border-2 univer-border-white univer-shadow-md univer-ring-2 univer-ring-white univer-will-change-transform",style:f()})]})}function Sh({hsv:e,onChange:t,onChanged:n}){const[r,o]=y.useState(!1),i=y.useRef(null),a=y.useRef(null),s=y.useMemo(()=>{var m,p;return(p=(m=a.current)==null?void 0:m.clientWidth)!=null?p:0},[]),c=y.useCallback(m=>{const p=i.current;if(!p)return;const g=p.getBoundingClientRect(),b=g.width-s,h=Math.max(0,Math.min(m-g.left,b)),x=Math.round(h/b*360);t(x,e[1],e[2])},[e,s,t]),l=y.useCallback(m=>{m.stopPropagation(),r&&c(m.clientX)},[r,c]),f=y.useCallback(()=>{o(!1),n==null||n(e[0],e[1],e[2])},[e,n]);y.useEffect(()=>(r&&(window.addEventListener("pointermove",l),window.addEventListener("pointerup",f),window.addEventListener("mouseup",f)),()=>{window.removeEventListener("pointermove",l),window.removeEventListener("pointerup",f),window.removeEventListener("mouseup",f)}),[r,l,f]);const u=()=>{var p;return`${Math.min(Math.max(e[0],0),360)/360*(100-s/((p=i.current)==null?void 0:p.clientWidth)*100)}%`};return v.jsx("div",{"data-u-comp":"color-picker-hue-slider",className:"univer-relative univer-w-full univer-select-none",children:v.jsx("div",{ref:i,className:"univer-relative univer-h-2 univer-w-full univer-cursor-pointer univer-rounded-full univer-shadow-inner",style:{background:`linear-gradient(to right,
155
+ `,e),...t}));_e.displayName=g.Title.displayName;const ve=(0,l.forwardRef)(({className:e,...t},n)=>(0,f.jsx)(g.Description,{ref:n,className:T(`univer-text-sm univer-text-gray-500`,e),...t}));ve.displayName=g.Description.displayName;function ye(e={}){let t=(0,l.useCallback)(()=>{let{innerWidth:e,innerHeight:t}=window;return{x:Math.max(0,(e-0)/2),y:Math.max(0,(t-0)/2)}},[]),{defaultPosition:n=t(),enabled:r=!1}=e,[i,a]=(0,l.useState)(n),[o,s]=(0,l.useState)(!1),c=(0,l.useRef)(null),u=(0,l.useRef)({x:0,y:0}),d=(0,l.useRef)({x:0,y:0}),f=(0,l.useRef)(!1);(0,l.useEffect)(()=>{if(!c.current||f.current||e.defaultPosition)return;let{width:t,height:n}=c.current.getBoundingClientRect(),{innerWidth:r,innerHeight:i}=window,o=Math.max(0,(r-t)/2),s=Math.max(0,(i-n)/2);a({x:o,y:s}),u.current={x:o,y:s},f.current=!0},[e.defaultPosition]);let p=(0,l.useCallback)((e,t)=>{if(!c.current)return{x:e,y:t};let n=c.current.getBoundingClientRect(),{clientWidth:r,clientHeight:i}=document.documentElement,a=u.current.x+(e-d.current.x),o=u.current.y+(t-d.current.y);return a<0&&(a=0),o<0&&(o=0),a+n.width>r&&(a=r-n.width),o+n.height>i&&(o=i-n.height),{x:a,y:o}},[]),m=(0,l.useCallback)(e=>{r&&(e.preventDefault(),e.stopPropagation(),u.current={...i},d.current={x:e.clientX,y:e.clientY},s(!0),document.body.style.userSelect=`none`)},[r,i]),h=(0,l.useCallback)(e=>{o&&(e.preventDefault(),e.stopPropagation(),a(p(e.clientX,e.clientY)))},[o,p]),g=(0,l.useCallback)(()=>{s(!1),document.body.style.userSelect=``},[]);return(0,l.useEffect)(()=>{if(r)return document.addEventListener(`mousemove`,h),document.addEventListener(`mouseup`,g),()=>{document.removeEventListener(`mousemove`,h),document.removeEventListener(`mouseup`,g)}},[r,h,g]),{position:i,isDragging:o,elementRef:c,setElementRef:t=>{if(c.current=t,t&&!f.current&&!e.defaultPosition){let{width:e,height:n}=t.getBoundingClientRect(),{innerWidth:r,innerHeight:i}=window,o=Math.max(0,(r-e)/2),s=Math.max(0,(i-n)/2);a({x:o,y:s}),u.current={x:o,y:s},f.current=!0}},handleMouseDown:m}}function H(e){var t,n,r,i;let{className:a,children:o,style:s,open:c=!1,title:u,width:d,draggable:p=!1,defaultPosition:m,footer:h,mask:g=!0,keyboard:_=!0,closable:v=!0,maskClosable:y=!0,showOk:b,showCancel:x,onOpenChange:S,onClose:C,onOk:w,onCancel:E}=e,{locale:D}=(0,l.useContext)(P),{position:O,isDragging:k,setElementRef:A,handleMouseDown:M}=ye({defaultPosition:m,enabled:p}),N=h==null?b||x?(0,f.jsxs)(`div`,{className:`univer-flex univer-justify-end univer-gap-2`,children:[x&&(0,f.jsx)(j,{onClick:E,children:(t=D==null||(n=D.Confirm)==null?void 0:n.cancel)==null?`Cancel`:t}),b&&(0,f.jsx)(j,{variant:`primary`,onClick:w,children:(r=D==null||(i=D.Confirm)==null?void 0:i.confirm)==null?`OK`:r})]}):null:h,F=(0,l.useCallback)(e=>{e&&p&&A(e)},[p,A]),I=(0,l.useCallback)(e=>{!g&&!e||(S==null||S(e),e||C==null||C())},[C,S]);function L(){S==null||S(!1),C==null||C()}return(0,f.jsx)(de,{open:c,onOpenChange:I,modal:g!==!1,children:(0,f.jsxs)(me,{ref:F,className:T(a,{"!univer-animate-none":p}),style:{...s,width:d?typeof d==`number`?`${d}px`:d:void 0,maxWidth:d?`initial`:void 0,...p?{position:`absolute`,margin:0,left:0,top:0,transform:`translate(${O.x}px, ${O.y}px)`,transition:k?`none`:void 0,cursor:k?`grabbing`:void 0}:{}},closable:v,onClickClose:L,onEscapeKeyDown:e=>{_&&L(),e.preventDefault()},onPointerDownOutside:e=>{y&&L(),e.preventDefault()},children:[(0,f.jsxs)(he,{className:T({"!univer-hidden":!u}),"data-drag-handle":p?`true`:void 0,style:{cursor:p?`grab`:void 0,userSelect:p?`none`:void 0,touchAction:p?`none`:void 0},onMouseDown:p?M:void 0,children:[(0,f.jsx)(_e,{children:u}),(0,f.jsx)(ve,{className:`univer-hidden`})]}),o,N&&(0,f.jsx)(ge,{children:N})]})})}const U=(e,t,n)=>{t/=100,n/=100;let r=n*t,i=r*(1-Math.abs(e/60%2-1)),a=n-r,o=0,s=0,c=0;return e>=0&&e<60?(o=r,s=i,c=0):e>=60&&e<120?(o=i,s=r,c=0):e>=120&&e<180?(o=0,s=r,c=i):e>=180&&e<240?(o=0,s=i,c=r):e>=240&&e<300?(o=i,s=0,c=r):e>=300&&e<360&&(o=r,s=0,c=i),[Math.round((o+a)*255),Math.round((s+a)*255),Math.round((c+a)*255)]},be=(e,t,n)=>{let r=e=>e.toString(16).padStart(2,`0`);return`#${r(e)}${r(t)}${r(n)}`},W=(e,t,n)=>{e/=255,t/=255,n/=255;let r=Math.max(e,t,n),i=r-Math.min(e,t,n),a=0,o=0,s=r;return r!==0&&(o=i/r),i!==0&&(r===e?a=(t-n)/i+(t<n?6:0):r===t?a=(n-e)/i+2:r===n&&(a=(e-t)/i+4),a*=60),[a,o*100,s*100]},xe=e=>{e.length===4&&(e=`#${e.slice(1).split(``).map(e=>e+e).join(``)}`);let[t,n,r]=e.match(/\w\w/g).map(e=>Number.parseInt(e,16));return W(t,n,r)},G=(e,t,n)=>{let[r,i,a]=U(e,t,n);return be(r,i,a)},Se=(e,t,n,r)=>{let[i,a,o]=U(e,t,n);return`rgba(${i}, ${a}, ${o}, ${r})`},Ce=e=>{let t=e.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d*\.?\d+))?\)/);if(!t)throw Error(`Invalid RGBA string`);return[Number.parseInt(t[1],10),Number.parseInt(t[2],10),Number.parseInt(t[3],10),t[4]?Number.parseFloat(t[4]):1]};function we({hsv:e,alpha:t,onChange:n,onChanged:r}){let[i,a]=(0,l.useState)(!1),o=(0,l.useRef)(null),s=(0,l.useRef)(null),c=(0,l.useCallback)(e=>{var t,r;let i=o.current;if(!i)return;let a=(t=(r=s.current)==null?void 0:r.clientWidth)==null?0:t,c=i.getBoundingClientRect(),l=c.width-a;if(l<=0){n(0);return}let u=Math.max(0,Math.min(e-c.left,l));n(Math.round(u/l*100)/100)},[n]),u=(0,l.useCallback)(e=>{i&&c(e.clientX)},[i,c]),d=(0,l.useCallback)(()=>{a(!1),r==null||r(t)},[t]);(0,l.useEffect)(()=>(i&&(window.addEventListener(`pointermove`,u),window.addEventListener(`pointerup`,d),window.addEventListener(`mouseup`,d)),()=>{window.removeEventListener(`pointermove`,u),window.removeEventListener(`pointerup`,d),window.removeEventListener(`mouseup`,d)}),[i,u,d]);let p=()=>{var e,n,r,i;let a=Math.min(Math.max(t*100,0),100),c=(e=(n=s.current)==null?void 0:n.clientWidth)==null?0:e,l=(r=(i=o.current)==null?void 0:i.clientWidth)==null?0:r,u=l>0?c/l*100:0;return`${a/100*(100-u)}%`},m=U(...e);return(0,f.jsxs)(`div`,{className:`univer-relative univer-w-full univer-select-none`,children:[(0,f.jsx)(`div`,{className:`univer-absolute univer-inset-0 univer-rounded-full`,style:{backgroundImage:`linear-gradient(45deg, #E3E5EA 25%, transparent 25%), linear-gradient(-45deg, #E3E5EA 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #E3E5EA 75%), linear-gradient(-45deg, transparent 75%, #E3E5EA 75%)`,backgroundPosition:`0 0, 0 4px, 4px -4px, -4px 0`,backgroundSize:`8px 8px`}}),(0,f.jsx)(`div`,{ref:o,className:`
156
+ univer-relative univer-h-2 univer-w-full univer-cursor-pointer univer-rounded-full univer-shadow-inner
157
+ `,style:{background:`linear-gradient(to right, transparent, rgb(${m.join(`,`)}))`},onPointerDown:e=>{a(!0),c(e.clientX)},children:(0,f.jsx)(`div`,{ref:s,className:`
158
+ univer-absolute univer-top-1/2 univer-box-border univer-size-2 univer-rounded-full
159
+ univer-bg-transparent univer-shadow-md univer-ring-2 univer-ring-white univer-transition-transform
160
+ univer-duration-75 univer-will-change-transform
161
+ `,style:{left:p(),transform:`translateY(-50%)`,transition:i?`none`:`all 0.1s ease-out`}})})]})}function Te({hsv:e,onChange:t}){let[n,r]=(0,l.useState)(``),i=(0,l.useMemo)(()=>G(e[0],e[1],e[2]),[e]);(0,l.useEffect)(()=>{r(i.replace(/^#/,``))},[i]);let a=e=>/^[0-9A-Fa-f]{6}$/.test(e);return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`input`,{className:T(`
162
+ univer-w-full univer-px-2 !univer-pl-4 univer-uppercase
163
+ focus:univer-border-primary-500 focus:univer-outline-none
164
+ dark:!univer-text-white
165
+ `,R),value:n,onChange:e=>{let n=e.target.value.trim();if(!(n.length>6)&&!(n!==``&&!/^[0-9A-Fa-f]*$/.test(n))&&(r(n),a(n))){let e=xe(n);e&&t&&t(...e)}},onBlur:()=>{a(n)||r(i.replace(/^#/,``))},maxLength:6,spellCheck:!1}),(0,f.jsx)(`span`,{className:`
166
+ univer-absolute univer-left-1.5 univer-top-1/2 -univer-translate-y-1/2 univer-text-sm
167
+ univer-text-gray-400
168
+ `,children:`#`})]})}function Ee({hsv:e,alpha:t,format:n,onChange:r}){let[i,a]=(0,l.useState)({r:0,g:0,b:0,a:1});(0,l.useEffect)(()=>{let[n,r,i]=U(e[0],e[1],e[2]);a({r:Math.round(n),g:Math.round(r),b:Math.round(i),a:t==null?1:t})},[e,t]);let o=(t,n)=>{if(t===`a`){if(n!==``&&!/^\d*\.?\d*$/.test(n))return;let t=n===``?0:Number.parseFloat(n);if(t>1)return;a({...i,a:t}),r&&r(e[0],e[1],e[2],t);return}if(n!==``&&!/^\d*$/.test(n))return;let o=n===``?0:Number.parseInt(n,10);if(o>255)return;let s={...i,[t]:o};a(s),r&&r(...W(s.r,s.g,s.b),i.a)},s=()=>{let[n,r,i]=U(e[0],e[1],e[2]);a({r:Math.round(n),g:Math.round(r),b:Math.round(i),a:t==null?1:t})};return(0,f.jsxs)(`div`,{className:`
169
+ univer-flex univer-items-center univer-gap-2
170
+ [&>input]:univer-w-11 [&>input]:univer-border-gray-200
171
+ [&>input]:focus:univer-border-primary-500
172
+ dark:[&>input]:!univer-border-gray-600 dark:[&>input]:!univer-text-white
173
+ `,children:[(0,f.jsx)(`input`,{value:i.r,onChange:e=>o(`r`,e.target.value),onBlur:s,maxLength:3}),(0,f.jsx)(`input`,{value:i.g,onChange:e=>o(`g`,e.target.value),onBlur:s,maxLength:3}),(0,f.jsx)(`input`,{value:i.b,onChange:e=>o(`b`,e.target.value),onBlur:s,maxLength:3}),n===`rgba`&&(0,f.jsx)(`input`,{value:i.a,onChange:e=>o(`a`,e.target.value),onBlur:s,maxLength:4})]})}function De({hsv:e,alpha:t,format:n,onChange:r}){return(0,f.jsx)(`div`,{className:`
174
+ dark:![&_input]:univer-border-gray-600 dark:![&_input]:univer-text-white
175
+ univer-flex univer-gap-2
176
+ [&_input]:univer-box-border [&_input]:univer-flex [&_input]:univer-h-7 [&_input]:univer-items-center
177
+ [&_input]:univer-rounded [&_input]:univer-border [&_input]:univer-border-solid
178
+ [&_input]:univer-border-gray-200 [&_input]:univer-bg-transparent [&_input]:univer-px-1.5
179
+ [&_input]:univer-text-sm [&_input]:univer-text-gray-700 [&_input]:univer-outline-none
180
+ `,children:(0,f.jsxs)(`div`,{className:`univer-relative univer-flex univer-flex-1 univer-gap-2`,children:[(0,f.jsx)(Te,{hsv:e,onChange:r}),(0,f.jsx)(Ee,{hsv:e,alpha:t,format:n,onChange:r})]})})}const Oe=[[`#FFFFFF`,`#E1EFFE`,`#FDE8E8`,`#FEECDC`,`#FFF4B9`,`#DEF7EC`,`#D5F5F6`,`#EDEBFE`,`#FCE8F3`],[`#CDD0D8`,`#A4CAFE`,`#F8B4B4`,`#FDBA8C`,`#FAC815`,`#84E1BC`,`#7EDCE2`,`#CABFFD`,`#F8B4D9`],[`#979DAC`,`#3F83F8`,`#F05252`,`#FF5A1F`,`#D49D0F`,`#0DA471`,`#0694A2`,`#9061F9`,`#E74694`],[`#414657`,`#1A56DB`,`#C81E1E`,`#B43403`,`#9A6D15`,`#046C4E`,`#036672`,`#6C2BD9`,`#BF125D`],[`#000000`,`#233876`,`#771D1D`,`#8A2C0D`,`#634312`,`#014737`,`#014451`,`#4A1D96`,`#751A3D`]];function ke({hsv:e,onChange:t}){let n=(0,l.useCallback)(e=>{let[n,r,i]=xe(e);t(n,r,i)},[t]),r=G(e[0],e[1],e[2]);return(0,f.jsx)(`div`,{"data-u-comp":`color-picker-presets`,className:`univer-grid univer-content-center univer-gap-2`,children:Oe.map((e,t)=>(0,f.jsx)(`div`,{className:`univer-grid univer-grid-flow-col univer-items-center univer-justify-between univer-gap-2`,children:e.map((e,i)=>(0,f.jsx)(`button`,{type:`button`,className:T(`
181
+ univer-box-border univer-size-5 univer-cursor-pointer univer-rounded-full univer-border
182
+ univer-border-solid univer-border-transparent univer-bg-gray-300 univer-transition-shadow
183
+ `,{"univer-ring-2 univer-ring-offset-2 univer-ring-offset-white dark:!univer-ring-primary-600 dark:!univer-ring-offset-gray-600":e.toUpperCase()===r.toUpperCase(),"!univer-border-gray-200":t===0&&i===0}),style:{backgroundColor:e},onClick:()=>n(e)},i))},t))})}function Ae({hsv:e,onChange:t,onChanged:n}){let r=(0,l.useRef)(null),i=(0,l.useRef)(null),[a,o]=(0,l.useState)(!1);(0,l.useEffect)(()=>{let t=r.current;if(!t)return;let n=t.getContext(`2d`);if(!n)return;let i=n.createLinearGradient(0,0,t.width,0);i.addColorStop(0,`hsl(${e[0]}, 0%, 50%)`),i.addColorStop(1,`hsl(${e[0]}, 100%, 50%)`),n.fillStyle=i,n.fillRect(0,0,t.width,t.height);let a=n.createLinearGradient(0,0,0,t.height);a.addColorStop(0,`rgba(255, 255, 255, 0)`),a.addColorStop(1,`rgba(0, 0, 0, 1)`),n.fillStyle=a,n.fillRect(0,0,t.width,t.height)},[e]);let s=n=>{n.stopPropagation();let i=r.current;if(!i)return;let a=i.getBoundingClientRect(),o=Math.max(0,Math.min(n.clientX-a.left,a.width)),s=Math.max(0,Math.min(n.clientY-a.top,a.height)),c=o/a.width*100,l=100-s/a.height*100;t(e[0],c,l)},c=(0,l.useCallback)(()=>{o(!1)},[e]);function u(){n==null||n(e[0],e[1],e[2])}(0,l.useEffect)(()=>{var e;return(e=i.current)==null||e.addEventListener(`mouseup`,u),window.addEventListener(`pointerup`,c),window.addEventListener(`mouseup`,c),()=>{var e;(e=i.current)==null||e.removeEventListener(`mouseup`,u),window.removeEventListener(`pointerup`,c),window.removeEventListener(`mouseup`,c)}},[e]);let d=()=>{var t,n,r,o;let s=(t=(n=i.current)==null?void 0:n.clientWidth)==null?0:t,c=(r=(o=i.current)==null?void 0:o.clientHeight)==null?0:r;return{transform:`translate(${e[1]/100*s-8}px, ${(100-e[2])/100*c-8}px)`,transition:a?`none`:`transform 0.1s ease-out`}};return(0,l.useEffect)(()=>{let e=()=>{o(!1)};return window.addEventListener(`pointerup`,e),window.addEventListener(`mouseup`,e),()=>{window.removeEventListener(`pointerup`,e),window.removeEventListener(`mouseup`,e)}},[]),(0,f.jsxs)(`div`,{"data-u-comp":`color-picker-spectrum`,ref:i,className:`univer-relative univer-overflow-hidden`,children:[(0,f.jsx)(`canvas`,{ref:r,className:`univer-size-full univer-cursor-crosshair univer-rounded`,onPointerDown:e=>{o(!0),s(e)},onPointerMove:e=>a&&s(e)}),(0,f.jsx)(`div`,{className:`
184
+ univer-pointer-events-none univer-absolute univer-left-0 univer-top-0 univer-size-4
185
+ univer-rounded-full univer-border-2 univer-border-white univer-shadow-md univer-ring-2
186
+ univer-ring-white univer-will-change-transform
187
+ `,style:d()})]})}function je({hsv:e,onChange:t,onChanged:n}){let[r,i]=(0,l.useState)(!1),a=(0,l.useRef)(null),o=(0,l.useRef)(null),s=(0,l.useCallback)(n=>{var r,i;let s=a.current;if(!s)return;let c=(r=(i=o.current)==null?void 0:i.clientWidth)==null?0:r,l=s.getBoundingClientRect(),u=l.width-c;if(u<=0){t(0,e[1],e[2]);return}let d=Math.max(0,Math.min(n-l.left,u));t(Math.round(d/u*360),e[1],e[2])},[e,t]),c=(0,l.useCallback)(e=>{e.stopPropagation(),r&&s(e.clientX)},[r,s]),u=(0,l.useCallback)(()=>{i(!1),n==null||n(e[0],e[1],e[2])},[e,n]);(0,l.useEffect)(()=>(r&&(window.addEventListener(`pointermove`,c),window.addEventListener(`pointerup`,u),window.addEventListener(`mouseup`,u)),()=>{window.removeEventListener(`pointermove`,c),window.removeEventListener(`pointerup`,u),window.removeEventListener(`mouseup`,u)}),[r,c,u]);let d=()=>{var t,n,r,i;let s=Math.min(Math.max(e[0],0),360),c=(t=(n=o.current)==null?void 0:n.clientWidth)==null?0:t,l=(r=(i=a.current)==null?void 0:i.clientWidth)==null?0:r,u=l>0?c/l*100:0;return`${s/360*(100-u)}%`};return(0,f.jsx)(`div`,{"data-u-comp":`color-picker-hue-slider`,className:`univer-relative univer-w-full univer-select-none`,children:(0,f.jsx)(`div`,{ref:a,className:`
188
+ univer-relative univer-h-2 univer-w-full univer-cursor-pointer univer-rounded-full univer-shadow-inner
189
+ `,style:{background:`linear-gradient(to right,
120
190
  hsl(0, 100%, 50%),
121
191
  hsl(60, 100%, 50%),
122
192
  hsl(120, 100%, 50%),
123
193
  hsl(180, 100%, 50%),
124
194
  hsl(240, 100%, 50%),
125
195
  hsl(300, 100%, 50%),
126
- hsl(360, 100%, 50%))`},onPointerDown:m=>{o(!0),c(m.clientX)},children:v.jsx("div",{ref:a,className:"univer-absolute univer-top-1/2 univer-box-border univer-size-2 univer-rounded-full univer-bg-transparent univer-shadow-md univer-ring-2 univer-ring-white univer-transition-transform univer-duration-75 univer-will-change-transform",style:{left:u(),transform:"translateY(-50%)",transition:r?"none":"all 0.1s ease-out"}})})})}const Rh=y.memo(Eh),Mh=y.memo(Sh),Nh=y.memo(gh),Ph=y.memo(xh),kh=y.memo(Ch);function fc({format:e="hex",value:t,onChange:n}){if(!Ba)return null;const{locale:r}=y.useContext(Zt),[o,i]=y.useState([0,100,100]),[a,s]=y.useState(1),[c,l]=y.useState(!1),f=y.useCallback((b,h,x)=>mr(b,h,x),[]);y.useEffect(()=>{try{const b=t||(e==="hex"?"#000000":"rgba(0, 0, 0, 1)");if(e==="hex"){const[h,x,E]=Za(b);i([h,x,E]),s(1)}else if(e==="rgba"){const[h,x,E,w]=hh(b),[C,S,R]=Ya(h,x,E);i([C,S,R]),s(w)}}catch(b){console.error("Invalid value:",b)}},[t,e]);function u(b,h,x){i([b,h,x])}function m(b){s(b)}function p(b,h,x,E=a){if(e==="hex"){const[w,C,S]=f(b,h,x),R=dc(w,C,S);n==null||n(R)}else if(e==="rgba"){const[w,C,S]=f(b,h,x);n==null||n(`rgba(${w}, ${C}, ${S}, ${E})`)}}function g(){const[b,h,x]=o;if(e==="hex"){const E=Bo(b,h,x);n==null||n(E)}else if(e==="rgba"){const[E,w,C]=f(b,h,x);n==null||n(`rgba(${E}, ${w}, ${C}, ${a})`)}l(!1)}return v.jsxs("div",{"data-u-comp":"color-picker",className:"univer-cursor-default univer-space-y-2 univer-rounded-lg",onClick:b=>b.stopPropagation(),children:[v.jsx(kh,{hsv:o,onChange:(b,h,x)=>{u(b,h,x),m(1),p(b,h,x,1)}}),v.jsx("div",{className:"univer-flex univer-h-7 univer-items-center",children:v.jsx("a",{className:"univer-cursor-pointer univer-gap-2 univer-text-sm univer-text-gray-900 univer-transition-opacity hover:univer-opacity-80 dark:!univer-text-white",onClick:()=>l(!0),children:r==null?void 0:r.ColorPicker.more})}),v.jsx(Ga,{className:"!univer-w-fit !univer-p-2.5",closable:!1,maskClosable:!1,open:c,onOpenChange:l,children:v.jsxs("div",{className:"univer-grid univer-w-64 univer-gap-2",children:[v.jsx(Rh,{hsv:o,onChange:u}),v.jsxs("div",{className:"univer-flex univer-items-center univer-gap-2",children:[v.jsx("div",{className:"univer-size-6 univer-flex-shrink-0 univer-rounded-sm",style:{backgroundColor:e==="hex"?Bo(...o):ph(...o,a)}}),v.jsxs("div",{className:"univer-flex-1 univer-space-y-2",children:[v.jsx(Mh,{hsv:o,onChange:u}),e==="rgba"&&v.jsx(Nh,{hsv:o,alpha:a,onChange:m})]})]}),v.jsx(Ph,{hsv:o,alpha:a,format:e,onChange:(b,h,x,E)=>{u(b,h,x),E!==void 0&&m(E)}}),v.jsxs("footer",{className:"univer-flex univer-items-center univer-justify-end univer-gap-2",children:[v.jsx(un,{onClick:()=>l(!1),children:r==null?void 0:r.ColorPicker.cancel}),v.jsx(un,{variant:"primary",onClick:g,children:r==null?void 0:r.ColorPicker.confirm})]})]})})]})}function _h(e){const{locale:t,cancelText:n,confirmText:r,onClose:o,onConfirm:i,closable:a=!0}=e;return v.jsxs("footer",{className:"univer-flex univer-items-center univer-justify-end univer-gap-2",children:[a&&v.jsx(un,{onClick:o,children:n!=null?n:t==null?void 0:t.Confirm.cancel}),v.jsx(un,{variant:"primary",onClick:i,children:r!=null?r:t==null?void 0:t.Confirm.confirm})]})}function Ih(e){const{children:t,visible:n=!1,title:r,cancelText:o,confirmText:i,width:a,onClose:s,onConfirm:c,closable:l=!0}=e,{locale:f}=y.useContext(Zt);return v.jsx(Ga,{open:n,title:r,maskClosable:!1,footer:v.jsx(_h,{locale:f,cancelText:o,confirmText:i,onClose:s,onConfirm:c,closable:l}),onClose:s,width:a,closable:l,children:t})}const Dh=["top","right","bottom","left"],In=Math.min,yt=Math.max,Ho=Math.round,wo=Math.floor,Kt=e=>({x:e,y:e}),Ah={left:"right",right:"left",bottom:"top",top:"bottom"},Th={start:"end",end:"start"};function ca(e,t,n){return yt(e,In(t,n))}function ln(e,t){return typeof e=="function"?e(t):e}function cn(e){return e.split("-")[0]}function Cr(e){return e.split("-")[1]}function qa(e){return e==="x"?"y":"x"}function Xa(e){return e==="y"?"height":"width"}const Oh=new Set(["top","bottom"]);function Wt(e){return Oh.has(cn(e))?"y":"x"}function Qa(e){return qa(Wt(e))}function jh(e,t,n){n===void 0&&(n=!1);const r=Cr(e),o=Qa(e),i=Xa(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Vo(a)),[a,Vo(a)]}function Lh(e){const t=Vo(e);return[da(e),t,da(t)]}function da(e){return e.replace(/start|end/g,t=>Th[t])}const Qs=["left","right"],Js=["right","left"],$h=["top","bottom"],Fh=["bottom","top"];function zh(e,t,n){switch(e){case"top":case"bottom":return n?t?Js:Qs:t?Qs:Js;case"left":case"right":return t?$h:Fh;default:return[]}}function Bh(e,t,n,r){const o=Cr(e);let i=zh(cn(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(da)))),i}function Vo(e){return e.replace(/left|right|bottom|top/g,t=>Ah[t])}function Hh(e){return{top:0,right:0,bottom:0,left:0,...e}}function vc(e){return typeof e!="number"?Hh(e):{top:e,right:e,bottom:e,left:e}}function Wo(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function eu(e,t,n){let{reference:r,floating:o}=e;const i=Wt(t),a=Qa(t),s=Xa(a),c=cn(t),l=i==="y",f=r.x+r.width/2-o.width/2,u=r.y+r.height/2-o.height/2,m=r[s]/2-o[s]/2;let p;switch(c){case"top":p={x:f,y:r.y-o.height};break;case"bottom":p={x:f,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:u};break;case"left":p={x:r.x-o.width,y:u};break;default:p={x:r.x,y:r.y}}switch(Cr(t)){case"start":p[a]-=m*(n&&l?-1:1);break;case"end":p[a]+=m*(n&&l?-1:1);break}return p}const Vh=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:u}=eu(l,r,c),m=r,p={},g=0;for(let b=0;b<s.length;b++){const{name:h,fn:x}=s[b],{x:E,y:w,data:C,reset:S}=await x({x:f,y:u,initialPlacement:r,placement:m,strategy:o,middlewareData:p,rects:l,platform:a,elements:{reference:e,floating:t}});f=E!=null?E:f,u=w!=null?w:u,p={...p,[h]:{...p[h],...C}},S&&g<=50&&(g++,typeof S=="object"&&(S.placement&&(m=S.placement),S.rects&&(l=S.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):S.rects),{x:f,y:u}=eu(l,m,c)),b=-1)}return{x:f,y:u,placement:m,strategy:o,middlewareData:p}};async function Wr(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:m=!1,padding:p=0}=ln(t,e),g=vc(p),h=s[m?u==="floating"?"reference":"floating":u],x=Wo(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(h)))==null||n?h:h.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:l,rootBoundary:f,strategy:c})),E=u==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),C=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},S=Wo(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:E,offsetParent:w,strategy:c}):E);return{top:(x.top-S.top+g.top)/C.y,bottom:(S.bottom-x.bottom+g.bottom)/C.y,left:(x.left-S.left+g.left)/C.x,right:(S.right-x.right+g.right)/C.x}}const Wh=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:c}=t,{element:l,padding:f=0}=ln(e,t)||{};if(l==null)return{};const u=vc(f),m={x:n,y:r},p=Qa(o),g=Xa(p),b=await a.getDimensions(l),h=p==="y",x=h?"top":"left",E=h?"bottom":"right",w=h?"clientHeight":"clientWidth",C=i.reference[g]+i.reference[p]-m[p]-i.floating[g],S=m[p]-i.reference[p],R=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l));let L=R?R[w]:0;(!L||!await(a.isElement==null?void 0:a.isElement(R)))&&(L=s.floating[w]||i.floating[g]);const D=C/2-S/2,H=L/2-b[g]/2-1,k=In(u[x],H),T=In(u[E],H),F=k,z=L-b[g]-T,A=L/2-b[g]/2+D,_=ca(F,A,z),M=!c.arrow&&Cr(o)!=null&&A!==_&&i.reference[g]/2-(A<F?k:T)-b[g]/2<0,I=M?A<F?A-F:A-z:0;return{[p]:m[p]+I,data:{[p]:_,centerOffset:A-_-I,...M&&{alignmentOffset:I}},reset:M}}}),Kh=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:c,elements:l}=t,{mainAxis:f=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:b=!0,...h}=ln(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const x=cn(o),E=Wt(s),w=cn(s)===s,C=await(c.isRTL==null?void 0:c.isRTL(l.floating)),S=m||(w||!b?[Vo(s)]:Lh(s)),R=g!=="none";!m&&R&&S.push(...Bh(s,b,g,C));const L=[s,...S],D=await Wr(t,h),H=[];let k=((r=i.flip)==null?void 0:r.overflows)||[];if(f&&H.push(D[x]),u){const A=jh(o,a,C);H.push(D[A[0]],D[A[1]])}if(k=[...k,{placement:o,overflows:H}],!H.every(A=>A<=0)){var T,F;const A=(((T=i.flip)==null?void 0:T.index)||0)+1,_=L[A];if(_&&(!(u==="alignment"?E!==Wt(_):!1)||k.every(N=>Wt(N.placement)===E?N.overflows[0]>0:!0)))return{data:{index:A,overflows:k},reset:{placement:_}};let M=(F=k.filter(I=>I.overflows[0]<=0).sort((I,N)=>I.overflows[1]-N.overflows[1])[0])==null?void 0:F.placement;if(!M)switch(p){case"bestFit":{var z;const I=(z=k.filter(N=>{if(R){const P=Wt(N.placement);return P===E||P==="y"}return!0}).map(N=>[N.placement,N.overflows.filter(P=>P>0).reduce((P,j)=>P+j,0)]).sort((N,P)=>N[1]-P[1])[0])==null?void 0:z[0];I&&(M=I);break}case"initialPlacement":M=s;break}if(o!==M)return{reset:{placement:M}}}return{}}}};function tu(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function nu(e){return Dh.some(t=>e[t]>=0)}const Uh=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=ln(e,t);switch(r){case"referenceHidden":{const i=await Wr(t,{...o,elementContext:"reference"}),a=tu(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:nu(a)}}}case"escaped":{const i=await Wr(t,{...o,altBoundary:!0}),a=tu(i,n.floating);return{data:{escapedOffsets:a,escaped:nu(a)}}}default:return{}}}}},mc=new Set(["left","top"]);async function Gh(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=cn(n),s=Cr(n),c=Wt(n)==="y",l=mc.has(a)?-1:1,f=i&&c?-1:1,u=ln(t,e);let{mainAxis:m,crossAxis:p,alignmentAxis:g}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return s&&typeof g=="number"&&(p=s==="end"?g*-1:g),c?{x:p*f,y:m*l}:{x:m*l,y:p*f}}const Yh=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,c=await Gh(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:i+c.y,data:{...c,placement:a}}}}},Zh=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:h=>{let{x,y:E}=h;return{x,y:E}}},...c}=ln(e,t),l={x:n,y:r},f=await Wr(t,c),u=Wt(cn(o)),m=qa(u);let p=l[m],g=l[u];if(i){const h=m==="y"?"top":"left",x=m==="y"?"bottom":"right",E=p+f[h],w=p-f[x];p=ca(E,p,w)}if(a){const h=u==="y"?"top":"left",x=u==="y"?"bottom":"right",E=g+f[h],w=g-f[x];g=ca(E,g,w)}const b=s.fn({...t,[m]:p,[u]:g});return{...b,data:{x:b.x-n,y:b.y-r,enabled:{[m]:i,[u]:a}}}}}},qh=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=ln(e,t),f={x:n,y:r},u=Wt(o),m=qa(u);let p=f[m],g=f[u];const b=ln(s,t),h=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(c){const w=m==="y"?"height":"width",C=i.reference[m]-i.floating[w]+h.mainAxis,S=i.reference[m]+i.reference[w]-h.mainAxis;p<C?p=C:p>S&&(p=S)}if(l){var x,E;const w=m==="y"?"width":"height",C=mc.has(cn(o)),S=i.reference[u]-i.floating[w]+(C&&((x=a.offset)==null?void 0:x[u])||0)+(C?0:h.crossAxis),R=i.reference[u]+i.reference[w]+(C?0:((E=a.offset)==null?void 0:E[u])||0)-(C?h.crossAxis:0);g<S?g=S:g>R&&(g=R)}return{[m]:p,[u]:g}}}},Xh=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:s}=t,{apply:c=()=>{},...l}=ln(e,t),f=await Wr(t,l),u=cn(o),m=Cr(o),p=Wt(o)==="y",{width:g,height:b}=i.floating;let h,x;u==="top"||u==="bottom"?(h=u,x=m===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(x=u,h=m==="end"?"top":"bottom");const E=b-f.top-f.bottom,w=g-f.left-f.right,C=In(b-f[h],E),S=In(g-f[x],w),R=!t.middlewareData.shift;let L=C,D=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(D=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(L=E),R&&!m){const k=yt(f.left,0),T=yt(f.right,0),F=yt(f.top,0),z=yt(f.bottom,0);p?D=g-2*(k!==0||T!==0?k+T:yt(f.left,f.right)):L=b-2*(F!==0||z!==0?F+z:yt(f.top,f.bottom))}await c({...t,availableWidth:D,availableHeight:L});const H=await a.getDimensions(s.floating);return g!==H.width||b!==H.height?{reset:{rects:!0}}:{}}}};function ci(){return typeof window<"u"}function Er(e){return pc(e)?(e.nodeName||"").toLowerCase():"#document"}function wt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function qt(e){var t;return(t=(pc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function pc(e){return ci()?e instanceof Node||e instanceof wt(e).Node:!1}function Dt(e){return ci()?e instanceof Element||e instanceof wt(e).Element:!1}function Gt(e){return ci()?e instanceof HTMLElement||e instanceof wt(e).HTMLElement:!1}function ru(e){return!ci()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof wt(e).ShadowRoot}const Qh=new Set(["inline","contents"]);function to(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=At(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Qh.has(o)}const Jh=new Set(["table","td","th"]);function eg(e){return Jh.has(Er(e))}const tg=[":popover-open",":modal"];function di(e){return tg.some(t=>{try{return e.matches(t)}catch{return!1}})}const ng=["transform","translate","scale","rotate","perspective"],rg=["transform","translate","scale","rotate","perspective","filter"],og=["paint","layout","strict","content"];function Ja(e){const t=es(),n=Dt(e)?At(e):e;return ng.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||rg.some(r=>(n.willChange||"").includes(r))||og.some(r=>(n.contain||"").includes(r))}function ig(e){let t=Dn(e);for(;Gt(t)&&!pr(t);){if(Ja(t))return t;if(di(t))return null;t=Dn(t)}return null}function es(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const ag=new Set(["html","body","#document"]);function pr(e){return ag.has(Er(e))}function At(e){return wt(e).getComputedStyle(e)}function fi(e){return Dt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Dn(e){if(Er(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ru(e)&&e.host||qt(e);return ru(t)?t.host:t}function hc(e){const t=Dn(e);return pr(t)?e.ownerDocument?e.ownerDocument.body:e.body:Gt(t)&&to(t)?t:hc(t)}function Kr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=hc(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=wt(o);if(i){const s=fa(a);return t.concat(a,a.visualViewport||[],to(o)?o:[],s&&n?Kr(s):[])}return t.concat(o,Kr(o,[],n))}function fa(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function gc(e){const t=At(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Gt(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=Ho(n)!==i||Ho(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function ts(e){return Dt(e)?e:e.contextElement}function fr(e){const t=ts(e);if(!Gt(t))return Kt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=gc(t);let a=(i?Ho(n.width):n.width)/r,s=(i?Ho(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const sg=Kt(0);function bc(e){const t=wt(e);return!es()||!t.visualViewport?sg:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ug(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==wt(e)?!1:t}function Kn(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=ts(e);let a=Kt(1);t&&(r?Dt(r)&&(a=fr(r)):a=fr(e));const s=ug(i,n,r)?bc(i):Kt(0);let c=(o.left+s.x)/a.x,l=(o.top+s.y)/a.y,f=o.width/a.x,u=o.height/a.y;if(i){const m=wt(i),p=r&&Dt(r)?wt(r):r;let g=m,b=fa(g);for(;b&&r&&p!==g;){const h=fr(b),x=b.getBoundingClientRect(),E=At(b),w=x.left+(b.clientLeft+parseFloat(E.paddingLeft))*h.x,C=x.top+(b.clientTop+parseFloat(E.paddingTop))*h.y;c*=h.x,l*=h.y,f*=h.x,u*=h.y,c+=w,l+=C,g=wt(b),b=fa(g)}}return Wo({width:f,height:u,x:c,y:l})}function vi(e,t){const n=fi(e).scrollLeft;return t?t.left+n:Kn(qt(e)).left+n}function yc(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-vi(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function lg(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=qt(r),s=t?di(t.floating):!1;if(r===a||s&&i)return n;let c={scrollLeft:0,scrollTop:0},l=Kt(1);const f=Kt(0),u=Gt(r);if((u||!u&&!i)&&((Er(r)!=="body"||to(a))&&(c=fi(r)),Gt(r))){const p=Kn(r);l=fr(r),f.x=p.x+r.clientLeft,f.y=p.y+r.clientTop}const m=a&&!u&&!i?yc(a,c):Kt(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+f.x+m.x,y:n.y*l.y-c.scrollTop*l.y+f.y+m.y}}function cg(e){return Array.from(e.getClientRects())}function dg(e){const t=qt(e),n=fi(e),r=e.ownerDocument.body,o=yt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=yt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+vi(e);const s=-n.scrollTop;return At(r).direction==="rtl"&&(a+=yt(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}const ou=25;function fg(e,t){const n=wt(e),r=qt(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,c=0;if(o){i=o.width,a=o.height;const f=es();(!f||f&&t==="fixed")&&(s=o.offsetLeft,c=o.offsetTop)}const l=vi(r);if(l<=0){const f=r.ownerDocument,u=f.body,m=getComputedStyle(u),p=f.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,g=Math.abs(r.clientWidth-u.clientWidth-p);g<=ou&&(i-=g)}else l<=ou&&(i+=l);return{width:i,height:a,x:s,y:c}}const vg=new Set(["absolute","fixed"]);function mg(e,t){const n=Kn(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Gt(e)?fr(e):Kt(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,c=o*i.x,l=r*i.y;return{width:a,height:s,x:c,y:l}}function iu(e,t,n){let r;if(t==="viewport")r=fg(e,n);else if(t==="document")r=dg(qt(e));else if(Dt(t))r=mg(t,n);else{const o=bc(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Wo(r)}function xc(e,t){const n=Dn(e);return n===t||!Dt(n)||pr(n)?!1:At(n).position==="fixed"||xc(n,t)}function pg(e,t){const n=t.get(e);if(n)return n;let r=Kr(e,[],!1).filter(s=>Dt(s)&&Er(s)!=="body"),o=null;const i=At(e).position==="fixed";let a=i?Dn(e):e;for(;Dt(a)&&!pr(a);){const s=At(a),c=Ja(a);!c&&s.position==="fixed"&&(o=null),(i?!c&&!o:!c&&s.position==="static"&&!!o&&vg.has(o.position)||to(a)&&!c&&xc(e,a))?r=r.filter(f=>f!==a):o=s,a=Dn(a)}return t.set(e,r),r}function hg(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?di(t)?[]:pg(t,this._c):[].concat(n),r],s=a[0],c=a.reduce((l,f)=>{const u=iu(t,f,o);return l.top=yt(u.top,l.top),l.right=In(u.right,l.right),l.bottom=In(u.bottom,l.bottom),l.left=yt(u.left,l.left),l},iu(t,s,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function gg(e){const{width:t,height:n}=gc(e);return{width:t,height:n}}function bg(e,t,n){const r=Gt(t),o=qt(t),i=n==="fixed",a=Kn(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const c=Kt(0);function l(){c.x=vi(o)}if(r||!r&&!i)if((Er(t)!=="body"||to(o))&&(s=fi(t)),r){const p=Kn(t,!0,i,t);c.x=p.x+t.clientLeft,c.y=p.y+t.clientTop}else o&&l();i&&!r&&o&&l();const f=o&&!r&&!i?yc(o,s):Kt(0),u=a.left+s.scrollLeft-c.x-f.x,m=a.top+s.scrollTop-c.y-f.y;return{x:u,y:m,width:a.width,height:a.height}}function Zi(e){return At(e).position==="static"}function au(e,t){if(!Gt(e)||At(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return qt(e)===n&&(n=n.ownerDocument.body),n}function wc(e,t){const n=wt(e);if(di(e))return n;if(!Gt(e)){let o=Dn(e);for(;o&&!pr(o);){if(Dt(o)&&!Zi(o))return o;o=Dn(o)}return n}let r=au(e,t);for(;r&&eg(r)&&Zi(r);)r=au(r,t);return r&&pr(r)&&Zi(r)&&!Ja(r)?n:r||ig(e)||n}const yg=async function(e){const t=this.getOffsetParent||wc,n=this.getDimensions,r=await n(e.floating);return{reference:bg(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function xg(e){return At(e).direction==="rtl"}const wg={convertOffsetParentRelativeRectToViewportRelativeRect:lg,getDocumentElement:qt,getClippingRect:hg,getOffsetParent:wc,getElementRects:yg,getClientRects:cg,getDimensions:gg,getScale:fr,isElement:Dt,isRTL:xg};function Cc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Cg(e,t){let n=null,r;const o=qt(e);function i(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),i();const l=e.getBoundingClientRect(),{left:f,top:u,width:m,height:p}=l;if(s||t(),!m||!p)return;const g=wo(u),b=wo(o.clientWidth-(f+m)),h=wo(o.clientHeight-(u+p)),x=wo(f),w={rootMargin:-g+"px "+-b+"px "+-h+"px "+-x+"px",threshold:yt(0,In(1,c))||1};let C=!0;function S(R){const L=R[0].intersectionRatio;if(L!==c){if(!C)return a();L?a(!1,L):r=setTimeout(()=>{a(!1,1e-7)},1e3)}L===1&&!Cc(l,e.getBoundingClientRect())&&a(),C=!1}try{n=new IntersectionObserver(S,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,w)}n.observe(e)}return a(!0),i}function Eg(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,l=ts(e),f=o||i?[...l?Kr(l):[],...Kr(t)]:[];f.forEach(x=>{o&&x.addEventListener("scroll",n,{passive:!0}),i&&x.addEventListener("resize",n)});const u=l&&s?Cg(l,n):null;let m=-1,p=null;a&&(p=new ResizeObserver(x=>{let[E]=x;E&&E.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var w;(w=p)==null||w.observe(t)})),n()}),l&&!c&&p.observe(l),p.observe(t));let g,b=c?Kn(e):null;c&&h();function h(){const x=Kn(e);b&&!Cc(b,x)&&n(),b=x,g=requestAnimationFrame(h)}return n(),()=>{var x;f.forEach(E=>{o&&E.removeEventListener("scroll",n),i&&E.removeEventListener("resize",n)}),u==null||u(),(x=p)==null||x.disconnect(),p=null,c&&cancelAnimationFrame(g)}}const Sg=Yh,Rg=Zh,Mg=Kh,Ng=Xh,Pg=Uh,su=Wh,kg=qh,_g=(e,t,n)=>{const r=new Map,o={platform:wg,...n},i={...o.platform,_c:r};return Vh(e,t,{...o,platform:i})};var Ig=typeof document<"u",Dg=function(){},Do=Ig?y.useLayoutEffect:Dg;function Ko(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Ko(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Ko(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Ec(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function uu(e,t){const n=Ec(e);return Math.round(t*n)/n}function qi(e){const t=d.useRef(e);return Do(()=>{t.current=e}),t}function Ag(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[f,u]=d.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,p]=d.useState(r);Ko(m,r)||p(r);const[g,b]=d.useState(null),[h,x]=d.useState(null),E=d.useCallback(N=>{N!==R.current&&(R.current=N,b(N))},[]),w=d.useCallback(N=>{N!==L.current&&(L.current=N,x(N))},[]),C=i||g,S=a||h,R=d.useRef(null),L=d.useRef(null),D=d.useRef(f),H=c!=null,k=qi(c),T=qi(o),F=qi(l),z=d.useCallback(()=>{if(!R.current||!L.current)return;const N={placement:t,strategy:n,middleware:m};T.current&&(N.platform=T.current),_g(R.current,L.current,N).then(P=>{const j={...P,isPositioned:F.current!==!1};A.current&&!Ko(D.current,j)&&(D.current=j,Qu.flushSync(()=>{u(j)}))})},[m,t,n,T,F]);Do(()=>{l===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,u(N=>({...N,isPositioned:!1})))},[l]);const A=d.useRef(!1);Do(()=>(A.current=!0,()=>{A.current=!1}),[]),Do(()=>{if(C&&(R.current=C),S&&(L.current=S),C&&S){if(k.current)return k.current(C,S,z);z()}},[C,S,z,k,H]);const _=d.useMemo(()=>({reference:R,floating:L,setReference:E,setFloating:w}),[E,w]),M=d.useMemo(()=>({reference:C,floating:S}),[C,S]),I=d.useMemo(()=>{const N={position:n,left:0,top:0};if(!M.floating)return N;const P=uu(M.floating,f.x),j=uu(M.floating,f.y);return s?{...N,transform:"translate("+P+"px, "+j+"px)",...Ec(M.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:P,top:j}},[n,s,M.floating,f.x,f.y]);return d.useMemo(()=>({...f,update:z,refs:_,elements:M,floatingStyles:I}),[f,z,_,M,I])}const Tg=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?su({element:r.current,padding:o}).fn(n):{}:r?su({element:r,padding:o}).fn(n):{}}}},Og=(e,t)=>({...Sg(e),options:[e,t]}),jg=(e,t)=>({...Rg(e),options:[e,t]}),Lg=(e,t)=>({...kg(e),options:[e,t]}),$g=(e,t)=>({...Mg(e),options:[e,t]}),Fg=(e,t)=>({...Ng(e),options:[e,t]}),zg=(e,t)=>({...Pg(e),options:[e,t]}),Bg=(e,t)=>({...Tg(e),options:[e,t]});var Hg="Arrow",Sc=d.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return v.jsx($e.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:v.jsx("polygon",{points:"0,0 30,0 15,10"})})});Sc.displayName=Hg;var Vg=Sc;function Wg(e){const[t,n]=d.useState(void 0);return _n(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,s;if("borderBoxSize"in i){const c=i.borderBoxSize,l=Array.isArray(c)?c[0]:c;a=l.inlineSize,s=l.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var ns="Popper",[Rc,Sr]=An(ns),[Kg,Mc]=Rc(ns),Nc=e=>{const{__scopePopper:t,children:n}=e,[r,o]=d.useState(null);return v.jsx(Kg,{scope:t,anchor:r,onAnchorChange:o,children:n})};Nc.displayName=ns;var Pc="PopperAnchor",kc=d.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=Mc(Pc,n),a=d.useRef(null),s=Ue(t,a),c=d.useRef(null);return d.useEffect(()=>{const l=c.current;c.current=(r==null?void 0:r.current)||a.current,l!==c.current&&i.onAnchorChange(c.current)}),r?null:v.jsx($e.div,{...o,ref:s})});kc.displayName=Pc;var rs="PopperContent",[Ug,Gg]=Rc(rs),_c=d.forwardRef((e,t)=>{var oe,G,q,ne,ae,ue,he,xe;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:a=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:f=0,sticky:u="partial",hideWhenDetached:m=!1,updatePositionStrategy:p="optimized",onPlaced:g,...b}=e,h=Mc(rs,n),[x,E]=d.useState(null),w=Ue(t,ge=>E(ge)),[C,S]=d.useState(null),R=Wg(C),L=(oe=R==null?void 0:R.width)!=null?oe:0,D=(G=R==null?void 0:R.height)!=null?G:0,H=r+(i!=="center"?"-"+i:""),k=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},T=Array.isArray(l)?l:[l],F=T.length>0,z={padding:k,boundary:T.filter(Zg),altBoundary:F},{refs:A,floatingStyles:_,placement:M,isPositioned:I,middlewareData:N}=Ag({strategy:"fixed",placement:H,whileElementsMounted:(...ge)=>Eg(...ge,{animationFrame:p==="always"}),elements:{reference:h.anchor},middleware:[Og({mainAxis:o+D,alignmentAxis:a}),c&&jg({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?Lg():void 0,...z}),c&&$g({...z}),Fg({...z,apply:({elements:ge,rects:Ne,availableWidth:ke,availableHeight:be})=>{const{width:ye,height:Le}=Ne.reference,le=ge.floating.style;le.setProperty("--radix-popper-available-width",`${ke}px`),le.setProperty("--radix-popper-available-height",`${be}px`),le.setProperty("--radix-popper-anchor-width",`${ye}px`),le.setProperty("--radix-popper-anchor-height",`${Le}px`)}}),C&&Bg({element:C,padding:s}),qg({arrowWidth:L,arrowHeight:D}),m&&zg({strategy:"referenceHidden",...z})]}),[P,j]=Ac(M),B=Ut(g);_n(()=>{I&&(B==null||B())},[I,B]);const K=(q=N.arrow)==null?void 0:q.x,$=(ne=N.arrow)==null?void 0:ne.y,O=((ae=N.arrow)==null?void 0:ae.centerOffset)!==0,[V,U]=d.useState();return _n(()=>{x&&U(window.getComputedStyle(x).zIndex)},[x]),v.jsx("div",{ref:A.setFloating,"data-radix-popper-content-wrapper":"",style:{..._,transform:I?_.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:V,"--radix-popper-transform-origin":[(ue=N.transformOrigin)==null?void 0:ue.x,(he=N.transformOrigin)==null?void 0:he.y].join(" "),...((xe=N.hide)==null?void 0:xe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:v.jsx(Ug,{scope:n,placedSide:P,onArrowChange:S,arrowX:K,arrowY:$,shouldHideArrow:O,children:v.jsx($e.div,{"data-side":P,"data-align":j,...b,ref:w,style:{...b.style,animation:I?void 0:"none"}})})})});_c.displayName=rs;var Ic="PopperArrow",Yg={top:"bottom",right:"left",bottom:"top",left:"right"},Dc=d.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=Gg(Ic,r),a=Yg[i.placedSide];return v.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:v.jsx(Vg,{...o,ref:n,style:{...o.style,display:"block"}})})});Dc.displayName=Ic;function Zg(e){return e!==null}var qg=e=>({name:"transformOrigin",options:e,fn(t){var h,x,E,w,C;const{placement:n,rects:r,middlewareData:o}=t,a=((h=o.arrow)==null?void 0:h.centerOffset)!==0,s=a?0:e.arrowWidth,c=a?0:e.arrowHeight,[l,f]=Ac(n),u={start:"0%",center:"50%",end:"100%"}[f],m=((E=(x=o.arrow)==null?void 0:x.x)!=null?E:0)+s/2,p=((C=(w=o.arrow)==null?void 0:w.y)!=null?C:0)+c/2;let g="",b="";return l==="bottom"?(g=a?u:`${m}px`,b=`${-c}px`):l==="top"?(g=a?u:`${m}px`,b=`${r.floating.height+c}px`):l==="right"?(g=`${-c}px`,b=a?u:`${p}px`):l==="left"&&(g=`${r.floating.width+c}px`,b=a?u:`${p}px`),{data:{x:g,y:b}}}});function Ac(e){const[t,n="center"]=e.split("-");return[t,n]}var mi=Nc,pi=kc,os=_c,is=Dc,hi="Popover",[Tc]=An(hi,[Sr]),no=Sr(),[Xg,Tn]=Tc(hi),Oc=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!1}=e,s=no(t),c=d.useRef(null),[l,f]=d.useState(!1),[u,m]=wr({prop:r,defaultProp:o!=null?o:!1,onChange:i,caller:hi});return v.jsx(mi,{...s,children:v.jsx(Xg,{scope:t,contentId:on(),triggerRef:c,open:u,onOpenChange:m,onOpenToggle:d.useCallback(()=>m(p=>!p),[m]),hasCustomAnchor:l,onCustomAnchorAdd:d.useCallback(()=>f(!0),[]),onCustomAnchorRemove:d.useCallback(()=>f(!1),[]),modal:a,children:n})})};Oc.displayName=hi;var jc="PopoverAnchor",Qg=d.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Tn(jc,n),i=no(n),{onCustomAnchorAdd:a,onCustomAnchorRemove:s}=o;return d.useEffect(()=>(a(),()=>s()),[a,s]),v.jsx(pi,{...i,...r,ref:t})});Qg.displayName=jc;var Lc="PopoverTrigger",$c=d.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Tn(Lc,n),i=no(n),a=Ue(t,o.triggerRef),s=v.jsx($e.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Vc(o.open),...r,ref:a,onClick:ie(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?s:v.jsx(pi,{asChild:!0,...i,children:s})});$c.displayName=Lc;var as="PopoverPortal",[Jg,e0]=Tc(as,{forceMount:void 0}),Fc=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,i=Tn(as,t);return v.jsx(Jg,{scope:t,forceMount:n,children:v.jsx(Nt,{present:n||i.open,children:v.jsx(eo,{asChild:!0,container:o,children:r})})})};Fc.displayName=as;var hr="PopoverContent",zc=d.forwardRef((e,t)=>{const n=e0(hr,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,i=Tn(hr,e.__scopePopover);return v.jsx(Nt,{present:r||i.open,children:i.modal?v.jsx(n0,{...o,ref:t}):v.jsx(r0,{...o,ref:t})})});zc.displayName=hr;var t0=vr("PopoverContent.RemoveScroll"),n0=d.forwardRef((e,t)=>{const n=Tn(hr,e.__scopePopover),r=d.useRef(null),o=Ue(t,r),i=d.useRef(!1);return d.useEffect(()=>{const a=r.current;if(a)return Va(a)},[]),v.jsx(ui,{as:t0,allowPinchZoom:!0,children:v.jsx(Bc,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ie(e.onCloseAutoFocus,a=>{var s;a.preventDefault(),i.current||(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:ie(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,c=s.button===0&&s.ctrlKey===!0,l=s.button===2||c;i.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:ie(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),r0=d.forwardRef((e,t)=>{const n=Tn(hr,e.__scopePopover),r=d.useRef(!1),o=d.useRef(!1);return v.jsx(Bc,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a,s;(a=e.onCloseAutoFocus)==null||a.call(e,i),i.defaultPrevented||(r.current||(s=n.triggerRef.current)==null||s.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{var c,l;(c=e.onInteractOutside)==null||c.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=i.target;(l=n.triggerRef.current)!=null&&l.contains(a)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),Bc=d.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:f,...u}=e,m=Tn(hr,n),p=no(n);return Ha(),v.jsx(ai,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:v.jsx(Jr,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:f,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>m.onOpenChange(!1),children:v.jsx(os,{"data-state":Vc(m.open),role:"dialog",id:m.contentId,...p,...u,ref:t,style:{...u.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Hc="PopoverClose",o0=d.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Tn(Hc,n);return v.jsx($e.button,{type:"button",...r,ref:t,onClick:ie(e.onClick,()=>o.onOpenChange(!1))})});o0.displayName=Hc;var i0="PopoverArrow",a0=d.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=no(n);return v.jsx(is,{...o,...r,ref:t})});a0.displayName=i0;function Vc(e){return e?"open":"closed"}var s0=Oc,u0=$c,l0=Fc,c0=zc;function d0({...e}){return v.jsx(s0,{"data-slot":"popover",...e})}function f0({...e}){return v.jsx(u0,{"data-slot":"popover-trigger",...e})}function v0({className:e,align:t="center",sideOffset:n=4,...r}){return v.jsx(l0,{children:v.jsx(c0,{"data-slot":"popover-content",align:t,sideOffset:n,className:W(`
196
+ hsl(360, 100%, 50%))`},onPointerDown:e=>{i(!0),s(e.clientX)},children:(0,f.jsx)(`div`,{ref:o,className:`
197
+ univer-absolute univer-top-1/2 univer-box-border univer-size-2 univer-rounded-full
198
+ univer-bg-transparent univer-shadow-md univer-ring-2 univer-ring-white univer-transition-transform
199
+ univer-duration-75 univer-will-change-transform
200
+ `,style:{left:d(),transform:`translateY(-50%)`,transition:r?`none`:`all 0.1s ease-out`}})})})}const Me=(0,l.memo)(Ae),Ne=(0,l.memo)(je),Pe=(0,l.memo)(we),Fe=(0,l.memo)(De),Ie=(0,l.memo)(ke);function Le({format:e=`hex`,value:t,onChange:n}){if(!N)return null;let{locale:r}=(0,l.useContext)(P),[i,a]=(0,l.useState)([0,100,100]),[o,s]=(0,l.useState)(1),[c,u]=(0,l.useState)(!1),d=(0,l.useCallback)((e,t,n)=>U(e,t,n),[]);(0,l.useEffect)(()=>{try{let n=t||(e===`hex`?`#000000`:`rgba(0, 0, 0, 1)`);if(e===`hex`){let[e,t,r]=xe(n);a([e,t,r]),s(1)}else if(e===`rgba`){let[e,t,r,i]=Ce(n),[o,c,l]=W(e,t,r);a([o,c,l]),s(i)}}catch(e){console.error(`Invalid value:`,e)}},[t,e]);function p(e,t,n){a([e,t,n])}function m(e){s(e)}function h(t,r,i,a=o){if(e===`hex`){let[e,a,o]=d(t,r,i),s=be(e,a,o);n==null||n(s)}else if(e===`rgba`){let[e,o,s]=d(t,r,i);n==null||n(`rgba(${e}, ${o}, ${s}, ${a})`)}}function g(){let[t,r,a]=i;if(e===`hex`){let e=G(t,r,a);n==null||n(e)}else if(e===`rgba`){let[e,i,s]=d(t,r,a);n==null||n(`rgba(${e}, ${i}, ${s}, ${o})`)}u(!1)}return(0,f.jsxs)(`div`,{"data-u-comp":`color-picker`,className:`univer-cursor-default univer-space-y-2 univer-rounded-lg`,onClick:e=>e.stopPropagation(),children:[(0,f.jsx)(Ie,{hsv:i,onChange:(e,t,n)=>{p(e,t,n),m(1),h(e,t,n,1)}}),(0,f.jsx)(`div`,{className:`univer-flex univer-h-7 univer-items-center`,children:(0,f.jsx)(`a`,{className:`
201
+ univer-cursor-pointer univer-gap-2 univer-text-sm univer-text-gray-900 univer-transition-opacity
202
+ hover:univer-opacity-80
203
+ dark:!univer-text-white
204
+ `,onClick:()=>u(!0),children:r==null?void 0:r.ColorPicker.more})}),(0,f.jsx)(H,{className:`!univer-w-fit !univer-p-2.5`,closable:!1,maskClosable:!1,open:c,onOpenChange:u,children:(0,f.jsxs)(`div`,{className:`univer-grid univer-w-64 univer-gap-2`,children:[(0,f.jsx)(Me,{hsv:i,onChange:p}),(0,f.jsxs)(`div`,{className:`univer-flex univer-items-center univer-gap-2`,children:[(0,f.jsx)(`div`,{className:`univer-size-6 univer-flex-shrink-0 univer-rounded-sm`,style:{backgroundColor:e===`hex`?G(...i):Se(...i,o)}}),(0,f.jsxs)(`div`,{className:`univer-flex-1 univer-space-y-2`,children:[(0,f.jsx)(Ne,{hsv:i,onChange:p}),e===`rgba`&&(0,f.jsx)(Pe,{hsv:i,alpha:o,onChange:m})]})]}),(0,f.jsx)(Fe,{hsv:i,alpha:o,format:e,onChange:(e,t,n,r)=>{p(e,t,n),r!==void 0&&m(r)}}),(0,f.jsxs)(`footer`,{className:`univer-flex univer-items-center univer-justify-end univer-gap-2`,children:[(0,f.jsx)(j,{onClick:()=>u(!1),children:r==null?void 0:r.ColorPicker.cancel}),(0,f.jsx)(j,{variant:`primary`,onClick:g,children:r==null?void 0:r.ColorPicker.confirm})]})]})})]})}function Re(e){let{locale:t,cancelText:n,confirmText:r,onClose:i,onConfirm:a,closable:o=!0}=e;return(0,f.jsxs)(`footer`,{className:`univer-flex univer-items-center univer-justify-end univer-gap-2`,children:[o&&(0,f.jsx)(j,{onClick:i,children:n==null?t==null?void 0:t.Confirm.cancel:n}),(0,f.jsx)(j,{variant:`primary`,onClick:a,children:r==null?t==null?void 0:t.Confirm.confirm:r})]})}function ze(e){let{children:t,visible:n=!1,title:r,cancelText:i,confirmText:a,width:o,onClose:s,onConfirm:c,closable:u=!0}=e,{locale:d}=(0,l.useContext)(P);return(0,f.jsx)(H,{open:n,title:r,maskClosable:!1,footer:(0,f.jsx)(Re,{locale:d,cancelText:i,confirmText:a,onClose:s,onConfirm:c,closable:u}),onClose:s,width:o,closable:u,children:t})}function Be({...e}){return(0,f.jsx)(_.Root,{"data-slot":`popover`,...e})}function Ve({...e}){return(0,f.jsx)(_.Trigger,{"data-slot":`popover-trigger`,...e})}function He({className:e,align:t=`center`,sideOffset:n=4,...r}){return(0,f.jsx)(_.Portal,{children:(0,f.jsx)(_.Content,{"data-slot":`popover-content`,align:t,sideOffset:n,className:T(`
127
205
  univer-outline-hidden
128
206
  data-[state=open]:univer-animate-in data-[state=open]:univer-fade-in-0
129
207
  data-[state=open]:univer-zoom-in-95
@@ -137,15 +215,35 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
137
215
  univer-rounded-md univer-bg-white univer-text-gray-900 univer-shadow-md
138
216
  dark:!univer-bg-gray-900 dark:!univer-text-white
139
217
  dark:focus-visible:!univer-border-gray-600
140
- `,ct,kn,e),...r})})}function ss(e){const{children:t,overlay:n,disabled:r,open:o,onOpenChange:i,...a}=e,[s,c]=y.useState(!1),l=o!==void 0,f=l?o:s;function u(m){r||(l||c(m),i==null||i(m))}return v.jsxs(d0,{open:f,onOpenChange:u,children:[v.jsx(f0,{asChild:!0,children:t}),v.jsx(v0,{...a,children:n})]})}function m0(e){const{value:t,onValueChange:n,className:r}=e,[o,i]=y.useState(!1);function a(s){n==null||n(s),i(!1)}return v.jsx(ss,{align:"start",overlay:v.jsx("div",{className:"univer-p-2",children:v.jsx(Fo,{value:t,onValueChange:a})}),open:o,onOpenChange:i,children:v.jsxs("button",{className:W("univer-flex univer-h-8 univer-items-center univer-justify-between univer-gap-2 univer-rounded-md univer-bg-transparent univer-px-2 univer-text-sm univer-text-gray-800 univer-transition-all hover:univer-border-primary-600 dark:!univer-text-white",ct,r),type:"button",children:[$o(t).format("YYYY-MM-DD"),v.jsx(La,{className:"univer-text-gray-600 dark:!univer-text-gray-400"})]})})}function p0(e){const{value:t=[new Date,new Date],onValueChange:n,className:r}=e,[o,i]=y.useState(!1);function a(s){let[c,l]=s;c>l&&([c,l]=[l,c]),n==null||n([c,l]),i(!1)}return v.jsx(ss,{align:"start",overlay:v.jsxs("div",{className:"univer-grid univer-grid-cols-2 univer-gap-2 univer-p-2",children:[v.jsx(Fo,{value:t[0],max:t[1],onValueChange:s=>{a([s,t[1]])}}),v.jsx(Fo,{value:t[1],min:t[0],onValueChange:s=>{a([t[0],s])}})]}),open:o,onOpenChange:i,children:v.jsxs("button",{className:W("univer-flex univer-h-8 univer-items-center univer-justify-between univer-gap-2 univer-rounded-md univer-bg-transparent univer-px-2 univer-text-sm univer-text-gray-800 univer-transition-all hover:univer-border-primary-600 dark:!univer-text-white",ct,r),type:"button",children:[v.jsxs("span",{className:"univer-flex univer-gap-1",children:[v.jsx("span",{children:$o(t[0]).format("YYYY-MM-DD")}),v.jsx("span",{children:"-"}),v.jsx("span",{children:$o(t[1]).format("YYYY-MM-DD")})]}),v.jsx(La,{className:"univer-text-gray-600 dark:!univer-text-gray-400"})]})})}function h0(e,t,n){if(t===n||t<0||n<0||t>=e.length||n>=e.length)return e;const r=[...e],[o]=r.splice(t,1);return r.splice(n,0,o),r}function g0(e){const{list:t,onListChange:n,idKey:r,itemRender:o,className:i,style:a,draggableHandle:s,rowHeight:c,margin:l=[0,0],onDragStart:f,onDragStop:u,...m}=e,[p,g]=y.useState(t),b=y.useRef(t),[h,x]=y.useState(null),[E,w]=y.useState(null),[C,S]=y.useState(null),[R,L]=y.useState(null),[D,H]=y.useState(!1),k=y.useRef(null),T=y.useRef({x:0,y:0}),F=y.useRef({width:0,height:0}),z=y.useRef(null),A=y.useRef(null),_=y.useRef(-1);y.useEffect(()=>{h||(g(t),b.current=t)},[h,t]),y.useEffect(()=>{H(typeof document<"u")},[]),y.useEffect(()=>{if(!h)return;const P=B=>{const K=A.current;if(!K||k.current!==B.pointerId)return;L({x:B.clientX-T.current.x,y:B.clientY-T.current.y});const $=document.elementFromPoint(B.clientX,B.clientY),O=$==null?void 0:$.closest("[data-draggable-list-item-id]"),V=O==null?void 0:O.dataset.draggableListItemId;!V||V===K||(w(V),g(U=>{const oe=U.findIndex(ne=>I(ne)===K),G=U.findIndex(ne=>I(ne)===V);if(oe<0||G<0||oe===G)return U;const q=h0(U,oe,G);return b.current=q,q}))},j=B=>{if(k.current!==B.pointerId)return;const K=A.current,$=_.current,O=b.current;if(K){const V=O.findIndex(U=>I(U)===K);u==null||u(void 0,{y:$},{y:V}),$>=0&&n([...O])}k.current=null,z.current=null,A.current=null,_.current=-1,w(null),S(null),L(null),x(null)};return window.addEventListener("pointermove",P),window.addEventListener("pointerup",j),window.addEventListener("pointercancel",j),()=>{window.removeEventListener("pointermove",P),window.removeEventListener("pointerup",j),window.removeEventListener("pointercancel",j)}},[h,u,n]);const M=y.useMemo(()=>{const[P,j]=l;return{rowGap:`${j}px`,paddingLeft:P?`${P}px`:void 0,paddingRight:P?`${P}px`:void 0,...a}},[l,a]),I=P=>String(P[r]),N=h?p.find(P=>I(P)===h):null;return v.jsxs(v.Fragment,{children:[v.jsx("div",{...m,className:W("univer-flex univer-flex-col",h&&"univer-cursor-grabbing univer-select-none",i),style:M,children:p.map((P,j)=>{const B=I(P),K=h===B,$=E===B&&!K;return v.jsxs("div",{"data-draggable-list-item-id":B,className:W("univer-relative univer-transition-all univer-duration-150",K&&"univer-opacity-0",$&&`
218
+ `,R,I,e),...r})})}function Ue(e){let{children:t,overlay:n,disabled:r,open:i,onOpenChange:a,...o}=e,[s,c]=(0,l.useState)(!1),u=i!==void 0,d=u?i:s;function p(e){r||(u||c(e),a==null||a(e))}return(0,f.jsxs)(Be,{open:d,onOpenChange:p,children:[(0,f.jsx)(Ve,{asChild:!0,children:t}),(0,f.jsx)(He,{...o,children:n})]})}function We(e){let{value:t,onValueChange:n,className:r}=e,[i,a]=(0,l.useState)(!1);function o(e){n==null||n(e),a(!1)}return(0,f.jsx)(Ue,{align:`start`,overlay:(0,f.jsx)(`div`,{className:`univer-p-2`,children:(0,f.jsx)(V,{value:t,onValueChange:o})}),open:i,onOpenChange:a,children:(0,f.jsxs)(`button`,{className:T(`
219
+ univer-flex univer-h-8 univer-items-center univer-justify-between univer-gap-2 univer-rounded-md
220
+ univer-bg-transparent univer-px-2 univer-text-sm univer-text-gray-800 univer-transition-all
221
+ hover:univer-border-primary-600
222
+ dark:!univer-text-white
223
+ `,R,r),type:`button`,children:[(0,h.default)(t).format(`YYYY-MM-DD`),(0,f.jsx)(c.CalendarIcon,{className:`
224
+ univer-text-gray-600
225
+ dark:!univer-text-gray-400
226
+ `})]})})}function Ge(e){let{value:t=[new Date,new Date],onValueChange:n,className:r}=e,[i,a]=(0,l.useState)(!1);function o(e){let[t,r]=e;t>r&&([t,r]=[r,t]),n==null||n([t,r]),a(!1)}return(0,f.jsx)(Ue,{align:`start`,overlay:(0,f.jsxs)(`div`,{className:`univer-grid univer-grid-cols-2 univer-gap-2 univer-p-2`,children:[(0,f.jsx)(V,{value:t[0],max:t[1],onValueChange:e=>{o([e,t[1]])}}),(0,f.jsx)(V,{value:t[1],min:t[0],onValueChange:e=>{o([t[0],e])}})]}),open:i,onOpenChange:a,children:(0,f.jsxs)(`button`,{className:T(`
227
+ univer-flex univer-h-8 univer-items-center univer-justify-between univer-gap-2 univer-rounded-md
228
+ univer-bg-transparent univer-px-2 univer-text-sm univer-text-gray-800 univer-transition-all
229
+ hover:univer-border-primary-600
230
+ dark:!univer-text-white
231
+ `,R,r),type:`button`,children:[(0,f.jsxs)(`span`,{className:`univer-flex univer-gap-1`,children:[(0,f.jsx)(`span`,{children:(0,h.default)(t[0]).format(`YYYY-MM-DD`)}),(0,f.jsx)(`span`,{children:`-`}),(0,f.jsx)(`span`,{children:(0,h.default)(t[1]).format(`YYYY-MM-DD`)})]}),(0,f.jsx)(c.CalendarIcon,{className:`
232
+ univer-text-gray-600
233
+ dark:!univer-text-gray-400
234
+ `})]})})}function Ke(e,t,n){if(t===n||t<0||n<0||t>=e.length||n>=e.length)return e;let r=[...e],[i]=r.splice(t,1);return r.splice(n,0,i),r}function qe(e){let{list:t,onListChange:n,idKey:r,itemRender:i,className:a,style:o,draggableHandle:s,rowHeight:c,margin:u=[0,0],onDragStart:d,onDragStop:p,...m}=e,[h,g]=(0,l.useState)(t),_=(0,l.useRef)(t),[y,b]=(0,l.useState)(null),[x,S]=(0,l.useState)(null),[C,w]=(0,l.useState)(null),[E,D]=(0,l.useState)(null),[O,k]=(0,l.useState)(!1),A=(0,l.useRef)(null),j=(0,l.useRef)({x:0,y:0}),M=(0,l.useRef)({width:0,height:0}),N=(0,l.useRef)(null),P=(0,l.useRef)(null),F=(0,l.useRef)(-1);(0,l.useEffect)(()=>{y||(g(t),_.current=t)},[y,t]),(0,l.useEffect)(()=>{k(typeof document<`u`)},[]),(0,l.useEffect)(()=>{if(!y)return;let e=e=>{let t=P.current;if(!t||A.current!==e.pointerId)return;D({x:e.clientX-j.current.x,y:e.clientY-j.current.y});let n=document.elementFromPoint(e.clientX,e.clientY),r=n==null?void 0:n.closest(`[data-draggable-list-item-id]`),i=r==null?void 0:r.dataset.draggableListItemId;!i||i===t||(S(i),g(e=>{let n=e.findIndex(e=>L(e)===t),r=e.findIndex(e=>L(e)===i);if(n<0||r<0||n===r)return e;let a=Ke(e,n,r);return _.current=a,a}))},t=e=>{if(A.current!==e.pointerId)return;let t=P.current,r=F.current,i=_.current;if(t){let e=i.findIndex(e=>L(e)===t);p==null||p(void 0,{y:r},{y:e}),r>=0&&n([...i])}A.current=null,N.current=null,P.current=null,F.current=-1,S(null),w(null),D(null),b(null)};return window.addEventListener(`pointermove`,e),window.addEventListener(`pointerup`,t),window.addEventListener(`pointercancel`,t),()=>{window.removeEventListener(`pointermove`,e),window.removeEventListener(`pointerup`,t),window.removeEventListener(`pointercancel`,t)}},[y,p,n]);let I=(0,l.useMemo)(()=>{let[e,t]=u;return{rowGap:`${t}px`,paddingLeft:e?`${e}px`:void 0,paddingRight:e?`${e}px`:void 0,...o}},[u,o]),L=e=>String(e[r]),R=y?h.find(e=>L(e)===y):null;return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`div`,{...m,className:T(`univer-flex univer-flex-col`,y&&`univer-cursor-grabbing univer-select-none`,a),style:I,children:h.map((e,t)=>{let n=L(e),r=y===n,a=x===n&&!r;return(0,f.jsxs)(`div`,{"data-draggable-list-item-id":n,className:T(`univer-relative univer-transition-all univer-duration-150`,r&&`univer-opacity-0`,a&&`
141
235
  univer-bg-primary-50/60
142
236
  dark:!univer-bg-primary-900/20
143
237
  univer-rounded univer-border univer-border-primary-200
144
238
  dark:!univer-border-primary-700
145
- `),onPointerDownCapture:O=>{if(k.current!==null)return;if(!s)z.current=B;else{const oe=!!O.target.closest(s);z.current=oe?B:null}if(z.current!==B)return;const V=O.currentTarget.getBoundingClientRect();T.current={x:O.clientX-V.left,y:O.clientY-V.top},F.current={width:V.width,height:V.height},L({x:V.left,y:V.top}),S(O.currentTarget.innerHTML),k.current=O.pointerId,A.current=B,_.current=j,x(B),b.current=p,f==null||f(void 0,{y:j}),O.preventDefault(),O.currentTarget.setPointerCapture(O.pointerId)},style:{...c?{minHeight:`${c}px`}:void 0,cursor:h?"grabbing":void 0},children:[K&&v.jsx("div",{className:`
239
+ `),onPointerDownCapture:e=>{if(A.current!==null||(s?N.current=e.target.closest(s)?n:null:N.current=n,N.current!==n))return;let r=e.currentTarget.getBoundingClientRect();j.current={x:e.clientX-r.left,y:e.clientY-r.top},M.current={width:r.width,height:r.height},D({x:r.left,y:r.top}),w(e.currentTarget.innerHTML),A.current=e.pointerId,P.current=n,F.current=t,b(n),_.current=h,d==null||d(void 0,{y:t}),e.preventDefault(),e.currentTarget.setPointerCapture(e.pointerId)},style:{...c?{minHeight:`${c}px`}:void 0,cursor:y?`grabbing`:void 0},children:[r&&(0,f.jsx)(`div`,{className:`
146
240
  univer-bg-primary-50/50 univer-absolute univer-inset-0 univer-rounded
147
241
  univer-border univer-border-dashed univer-border-primary-300
148
- `}),o(P,j)]},B)})}),D&&N&&R&&ut.createPortal(v.jsx("div",{className:W("univer-pointer-events-none univer-fixed univer-rounded-md univer-border univer-border-gray-200 univer-bg-white univer-shadow-lg dark:!univer-border-gray-700 dark:!univer-bg-gray-800"),style:{zIndex:2147483647,left:`${R.x}px`,top:`${R.y}px`,width:`${F.current.width}px`,height:`${F.current.height}px`,opacity:.95},children:C?v.jsx("div",{dangerouslySetInnerHTML:{__html:C}}):o(N,p.findIndex(P=>I(P)===I(N)))}),document.body)]})}function Wc(e){const t=e+"CollectionProvider",[n,r]=An(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=b=>{const{scope:h,children:x}=b,E=y.useRef(null),w=y.useRef(new Map).current;return v.jsx(o,{scope:h,itemMap:w,collectionRef:E,children:x})};a.displayName=t;const s=e+"CollectionSlot",c=vr(s),l=y.forwardRef((b,h)=>{const{scope:x,children:E}=b,w=i(s,x),C=Ue(h,w.collectionRef);return v.jsx(c,{ref:C,children:E})});l.displayName=s;const f=e+"CollectionItemSlot",u="data-radix-collection-item",m=vr(f),p=y.forwardRef((b,h)=>{const{scope:x,children:E,...w}=b,C=y.useRef(null),S=Ue(h,C),R=i(f,x);return y.useEffect(()=>(R.itemMap.set(C,{ref:C,...w}),()=>{R.itemMap.delete(C)})),v.jsx(m,{[u]:"",ref:S,children:E})});p.displayName=f;function g(b){const h=i(e+"CollectionConsumer",b);return y.useCallback(()=>{const E=h.collectionRef.current;if(!E)return[];const w=Array.from(E.querySelectorAll(`[${u}]`));return Array.from(h.itemMap.values()).sort((R,L)=>w.indexOf(R.ref.current)-w.indexOf(L.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:a,Slot:l,ItemSlot:p},g,r]}var b0=d.createContext(void 0);function Kc(e){const t=d.useContext(b0);return e||t||"ltr"}var Xi="rovingFocusGroup.onEntryFocus",y0={bubbles:!1,cancelable:!0},ro="RovingFocusGroup",[va,Uc,x0]=Wc(ro),[w0,Gc]=An(ro,[x0]),[C0,E0]=w0(ro),Yc=d.forwardRef((e,t)=>v.jsx(va.Provider,{scope:e.__scopeRovingFocusGroup,children:v.jsx(va.Slot,{scope:e.__scopeRovingFocusGroup,children:v.jsx(S0,{...e,ref:t})})}));Yc.displayName=ro;var S0=d.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:f=!1,...u}=e,m=d.useRef(null),p=Ue(t,m),g=Kc(i),[b,h]=wr({prop:a,defaultProp:s!=null?s:null,onChange:c,caller:ro}),[x,E]=d.useState(!1),w=Ut(l),C=Uc(n),S=d.useRef(!1),[R,L]=d.useState(0);return d.useEffect(()=>{const D=m.current;if(D)return D.addEventListener(Xi,w),()=>D.removeEventListener(Xi,w)},[w]),v.jsx(C0,{scope:n,orientation:r,dir:g,loop:o,currentTabStopId:b,onItemFocus:d.useCallback(D=>h(D),[h]),onItemShiftTab:d.useCallback(()=>E(!0),[]),onFocusableItemAdd:d.useCallback(()=>L(D=>D+1),[]),onFocusableItemRemove:d.useCallback(()=>L(D=>D-1),[]),children:v.jsx($e.div,{tabIndex:x||R===0?-1:0,"data-orientation":r,...u,ref:p,style:{outline:"none",...e.style},onMouseDown:ie(e.onMouseDown,()=>{S.current=!0}),onFocus:ie(e.onFocus,D=>{const H=!S.current;if(D.target===D.currentTarget&&H&&!x){const k=new CustomEvent(Xi,y0);if(D.currentTarget.dispatchEvent(k),!k.defaultPrevented){const T=C().filter(M=>M.focusable),F=T.find(M=>M.active),z=T.find(M=>M.id===b),_=[F,z,...T].filter(Boolean).map(M=>M.ref.current);Xc(_,f)}}S.current=!1}),onBlur:ie(e.onBlur,()=>E(!1))})})}),Zc="RovingFocusGroupItem",qc=d.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,children:a,...s}=e,c=on(),l=i||c,f=E0(Zc,n),u=f.currentTabStopId===l,m=Uc(n),{onFocusableItemAdd:p,onFocusableItemRemove:g,currentTabStopId:b}=f;return d.useEffect(()=>{if(r)return p(),()=>g()},[r,p,g]),v.jsx(va.ItemSlot,{scope:n,id:l,focusable:r,active:o,children:v.jsx($e.span,{tabIndex:u?0:-1,"data-orientation":f.orientation,...s,ref:t,onMouseDown:ie(e.onMouseDown,h=>{r?f.onItemFocus(l):h.preventDefault()}),onFocus:ie(e.onFocus,()=>f.onItemFocus(l)),onKeyDown:ie(e.onKeyDown,h=>{if(h.key==="Tab"&&h.shiftKey){f.onItemShiftTab();return}if(h.target!==h.currentTarget)return;const x=N0(h,f.orientation,f.dir);if(x!==void 0){if(h.metaKey||h.ctrlKey||h.altKey||h.shiftKey)return;h.preventDefault();let w=m().filter(C=>C.focusable).map(C=>C.ref.current);if(x==="last")w.reverse();else if(x==="prev"||x==="next"){x==="prev"&&w.reverse();const C=w.indexOf(h.currentTarget);w=f.loop?P0(w,C+1):w.slice(C+1)}setTimeout(()=>Xc(w))}}),children:typeof a=="function"?a({isCurrentTabStop:u,hasTabStop:b!=null}):a})})});qc.displayName=Zc;var R0={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function M0(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function N0(e,t,n){const r=M0(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return R0[r]}function Xc(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function P0(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var k0=Yc,_0=qc,ma=["Enter"," "],I0=["ArrowDown","PageUp","Home"],Qc=["ArrowUp","PageDown","End"],D0=[...I0,...Qc],A0={ltr:[...ma,"ArrowRight"],rtl:[...ma,"ArrowLeft"]},T0={ltr:["ArrowLeft"],rtl:["ArrowRight"]},oo="Menu",[Ur,O0,j0]=Wc(oo),[Un,Jc]=An(oo,[j0,Sr,Gc]),io=Sr(),ed=Gc(),[td,On]=Un(oo),[L0,ao]=Un(oo),nd=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:i,modal:a=!0}=e,s=io(t),[c,l]=d.useState(null),f=d.useRef(!1),u=Ut(i),m=Kc(o);return d.useEffect(()=>{const p=()=>{f.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>f.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),v.jsx(mi,{...s,children:v.jsx(td,{scope:t,open:n,onOpenChange:u,content:c,onContentChange:l,children:v.jsx(L0,{scope:t,onClose:d.useCallback(()=>u(!1),[u]),isUsingKeyboardRef:f,dir:m,modal:a,children:r})})})};nd.displayName=oo;var $0="MenuAnchor",us=d.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=io(n);return v.jsx(pi,{...o,...r,ref:t})});us.displayName=$0;var ls="MenuPortal",[F0,rd]=Un(ls,{forceMount:void 0}),od=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,i=On(ls,t);return v.jsx(F0,{scope:t,forceMount:n,children:v.jsx(Nt,{present:n||i.open,children:v.jsx(eo,{asChild:!0,container:o,children:r})})})};od.displayName=ls;var Mt="MenuContent",[z0,cs]=Un(Mt),id=d.forwardRef((e,t)=>{const n=rd(Mt,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=On(Mt,e.__scopeMenu),a=ao(Mt,e.__scopeMenu);return v.jsx(Ur.Provider,{scope:e.__scopeMenu,children:v.jsx(Nt,{present:r||i.open,children:v.jsx(Ur.Slot,{scope:e.__scopeMenu,children:a.modal?v.jsx(B0,{...o,ref:t}):v.jsx(H0,{...o,ref:t})})})})}),B0=d.forwardRef((e,t)=>{const n=On(Mt,e.__scopeMenu),r=d.useRef(null),o=Ue(t,r);return d.useEffect(()=>{const i=r.current;if(i)return Va(i)},[]),v.jsx(ds,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:ie(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),H0=d.forwardRef((e,t)=>{const n=On(Mt,e.__scopeMenu);return v.jsx(ds,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),V0=vr("MenuContent.ScrollLock"),ds=d.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:f,onFocusOutside:u,onInteractOutside:m,onDismiss:p,disableOutsideScroll:g,...b}=e,h=On(Mt,n),x=ao(Mt,n),E=io(n),w=ed(n),C=O0(n),[S,R]=d.useState(null),L=d.useRef(null),D=Ue(t,L,h.onContentChange),H=d.useRef(0),k=d.useRef(""),T=d.useRef(0),F=d.useRef(null),z=d.useRef("right"),A=d.useRef(0),_=g?ui:d.Fragment,M=g?{as:V0,allowPinchZoom:!0}:void 0,I=P=>{var oe,G;const j=k.current+P,B=C().filter(q=>!q.disabled),K=document.activeElement,$=(oe=B.find(q=>q.ref.current===K))==null?void 0:oe.textValue,O=B.map(q=>q.textValue),V=t1(O,j,$),U=(G=B.find(q=>q.textValue===V))==null?void 0:G.ref.current;(function q(ne){k.current=ne,window.clearTimeout(H.current),ne!==""&&(H.current=window.setTimeout(()=>q(""),1e3))})(j),U&&setTimeout(()=>U.focus())};d.useEffect(()=>()=>window.clearTimeout(H.current),[]),Ha();const N=d.useCallback(P=>{var B,K;return z.current===((B=F.current)==null?void 0:B.side)&&r1(P,(K=F.current)==null?void 0:K.area)},[]);return v.jsx(z0,{scope:n,searchRef:k,onItemEnter:d.useCallback(P=>{N(P)&&P.preventDefault()},[N]),onItemLeave:d.useCallback(P=>{var j;N(P)||((j=L.current)==null||j.focus(),R(null))},[N]),onTriggerLeave:d.useCallback(P=>{N(P)&&P.preventDefault()},[N]),pointerGraceTimerRef:T,onPointerGraceIntentChange:d.useCallback(P=>{F.current=P},[]),children:v.jsx(_,{...M,children:v.jsx(ai,{asChild:!0,trapped:o,onMountAutoFocus:ie(i,P=>{var j;P.preventDefault(),(j=L.current)==null||j.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:v.jsx(Jr,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:f,onFocusOutside:u,onInteractOutside:m,onDismiss:p,children:v.jsx(k0,{asChild:!0,...w,dir:x.dir,orientation:"vertical",loop:r,currentTabStopId:S,onCurrentTabStopIdChange:R,onEntryFocus:ie(c,P=>{x.isUsingKeyboardRef.current||P.preventDefault()}),preventScrollOnEntryFocus:!0,children:v.jsx(os,{role:"menu","aria-orientation":"vertical","data-state":Cd(h.open),"data-radix-menu-content":"",dir:x.dir,...E,...b,ref:D,style:{outline:"none",...b.style},onKeyDown:ie(b.onKeyDown,P=>{const B=P.target.closest("[data-radix-menu-content]")===P.currentTarget,K=P.ctrlKey||P.altKey||P.metaKey,$=P.key.length===1;B&&(P.key==="Tab"&&P.preventDefault(),!K&&$&&I(P.key));const O=L.current;if(P.target!==O||!D0.includes(P.key))return;P.preventDefault();const U=C().filter(oe=>!oe.disabled).map(oe=>oe.ref.current);Qc.includes(P.key)&&U.reverse(),J0(U)}),onBlur:ie(e.onBlur,P=>{P.currentTarget.contains(P.target)||(window.clearTimeout(H.current),k.current="")}),onPointerMove:ie(e.onPointerMove,Gr(P=>{const j=P.target,B=A.current!==P.clientX;if(P.currentTarget.contains(j)&&B){const K=P.clientX>A.current?"right":"left";z.current=K,A.current=P.clientX}}))})})})})})})});id.displayName=Mt;var W0="MenuGroup",fs=d.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return v.jsx($e.div,{role:"group",...r,ref:t})});fs.displayName=W0;var K0="MenuLabel",ad=d.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return v.jsx($e.div,{...r,ref:t})});ad.displayName=K0;var Uo="MenuItem",lu="menu.itemSelect",gi=d.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,i=d.useRef(null),a=ao(Uo,e.__scopeMenu),s=cs(Uo,e.__scopeMenu),c=Ue(t,i),l=d.useRef(!1),f=()=>{const u=i.current;if(!n&&u){const m=new CustomEvent(lu,{bubbles:!0,cancelable:!0});u.addEventListener(lu,p=>r==null?void 0:r(p),{once:!0}),Pl(u,m),m.defaultPrevented?l.current=!1:a.onClose()}};return v.jsx(sd,{...o,ref:c,disabled:n,onClick:ie(e.onClick,f),onPointerDown:u=>{var m;(m=e.onPointerDown)==null||m.call(e,u),l.current=!0},onPointerUp:ie(e.onPointerUp,u=>{var m;l.current||(m=u.currentTarget)==null||m.click()}),onKeyDown:ie(e.onKeyDown,u=>{const m=s.searchRef.current!=="";n||m&&u.key===" "||ma.includes(u.key)&&(u.currentTarget.click(),u.preventDefault())})})});gi.displayName=Uo;var sd=d.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...i}=e,a=cs(Uo,n),s=ed(n),c=d.useRef(null),l=Ue(t,c),[f,u]=d.useState(!1),[m,p]=d.useState("");return d.useEffect(()=>{var b;const g=c.current;g&&p(((b=g.textContent)!=null?b:"").trim())},[i.children]),v.jsx(Ur.ItemSlot,{scope:n,disabled:r,textValue:o!=null?o:m,children:v.jsx(_0,{asChild:!0,...s,focusable:!r,children:v.jsx($e.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...i,ref:l,onPointerMove:ie(e.onPointerMove,Gr(g=>{r?a.onItemLeave(g):(a.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ie(e.onPointerLeave,Gr(g=>a.onItemLeave(g))),onFocus:ie(e.onFocus,()=>u(!0)),onBlur:ie(e.onBlur,()=>u(!1))})})})}),U0="MenuCheckboxItem",ud=d.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return v.jsx(vd,{scope:e.__scopeMenu,checked:n,children:v.jsx(gi,{role:"menuitemcheckbox","aria-checked":Go(n)?"mixed":n,...o,ref:t,"data-state":ps(n),onSelect:ie(o.onSelect,()=>r==null?void 0:r(Go(n)?!0:!n),{checkForDefaultPrevented:!1})})})});ud.displayName=U0;var ld="MenuRadioGroup",[G0,Y0]=Un(ld,{value:void 0,onValueChange:()=>{}}),cd=d.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,i=Ut(r);return v.jsx(G0,{scope:e.__scopeMenu,value:n,onValueChange:i,children:v.jsx(fs,{...o,ref:t})})});cd.displayName=ld;var dd="MenuRadioItem",fd=d.forwardRef((e,t)=>{const{value:n,...r}=e,o=Y0(dd,e.__scopeMenu),i=n===o.value;return v.jsx(vd,{scope:e.__scopeMenu,checked:i,children:v.jsx(gi,{role:"menuitemradio","aria-checked":i,...r,ref:t,"data-state":ps(i),onSelect:ie(r.onSelect,()=>{var a;return(a=o.onValueChange)==null?void 0:a.call(o,n)},{checkForDefaultPrevented:!1})})})});fd.displayName=dd;var vs="MenuItemIndicator",[vd,Z0]=Un(vs,{checked:!1}),md=d.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,i=Z0(vs,n);return v.jsx(Nt,{present:r||Go(i.checked)||i.checked===!0,children:v.jsx($e.span,{...o,ref:t,"data-state":ps(i.checked)})})});md.displayName=vs;var q0="MenuSeparator",pd=d.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return v.jsx($e.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});pd.displayName=q0;var X0="MenuArrow",hd=d.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=io(n);return v.jsx(is,{...o,...r,ref:t})});hd.displayName=X0;var ms="MenuSub",[Q0,gd]=Un(ms),bd=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,i=On(ms,t),a=io(t),[s,c]=d.useState(null),[l,f]=d.useState(null),u=Ut(o);return d.useEffect(()=>(i.open===!1&&u(!1),()=>u(!1)),[i.open,u]),v.jsx(mi,{...a,children:v.jsx(td,{scope:t,open:r,onOpenChange:u,content:l,onContentChange:f,children:v.jsx(Q0,{scope:t,contentId:on(),triggerId:on(),trigger:s,onTriggerChange:c,children:n})})})};bd.displayName=ms;var $r="MenuSubTrigger",yd=d.forwardRef((e,t)=>{const n=On($r,e.__scopeMenu),r=ao($r,e.__scopeMenu),o=gd($r,e.__scopeMenu),i=cs($r,e.__scopeMenu),a=d.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=i,l={__scopeMenu:e.__scopeMenu},f=d.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return d.useEffect(()=>f,[f]),d.useEffect(()=>{const u=s.current;return()=>{window.clearTimeout(u),c(null)}},[s,c]),v.jsx(us,{asChild:!0,...l,children:v.jsx(sd,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Cd(n.open),...e,ref:Qr(t,o.onTriggerChange),onClick:u=>{var m;(m=e.onClick)==null||m.call(e,u),!(e.disabled||u.defaultPrevented)&&(u.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:ie(e.onPointerMove,Gr(u=>{i.onItemEnter(u),!u.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(i.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:ie(e.onPointerLeave,Gr(u=>{var p,g;f();const m=(p=n.content)==null?void 0:p.getBoundingClientRect();if(m){const b=(g=n.content)==null?void 0:g.dataset.side,h=b==="right",x=h?-5:5,E=m[h?"left":"right"],w=m[h?"right":"left"];i.onPointerGraceIntentChange({area:[{x:u.clientX+x,y:u.clientY},{x:E,y:m.top},{x:w,y:m.top},{x:w,y:m.bottom},{x:E,y:m.bottom}],side:b}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(u),u.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:ie(e.onKeyDown,u=>{var p;const m=i.searchRef.current!=="";e.disabled||m&&u.key===" "||A0[r.dir].includes(u.key)&&(n.onOpenChange(!0),(p=n.content)==null||p.focus(),u.preventDefault())})})})});yd.displayName=$r;var xd="MenuSubContent",wd=d.forwardRef((e,t)=>{const n=rd(Mt,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=On(Mt,e.__scopeMenu),a=ao(Mt,e.__scopeMenu),s=gd(xd,e.__scopeMenu),c=d.useRef(null),l=Ue(t,c);return v.jsx(Ur.Provider,{scope:e.__scopeMenu,children:v.jsx(Nt,{present:r||i.open,children:v.jsx(Ur.Slot,{scope:e.__scopeMenu,children:v.jsx(ds,{id:s.contentId,"aria-labelledby":s.triggerId,...o,ref:l,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var u;a.isUsingKeyboardRef.current&&((u=c.current)==null||u.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:ie(e.onFocusOutside,f=>{f.target!==s.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:ie(e.onEscapeKeyDown,f=>{a.onClose(),f.preventDefault()}),onKeyDown:ie(e.onKeyDown,f=>{var p;const u=f.currentTarget.contains(f.target),m=T0[a.dir].includes(f.key);u&&m&&(i.onOpenChange(!1),(p=s.trigger)==null||p.focus(),f.preventDefault())})})})})})});wd.displayName=xd;function Cd(e){return e?"open":"closed"}function Go(e){return e==="indeterminate"}function ps(e){return Go(e)?"indeterminate":e?"checked":"unchecked"}function J0(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function e1(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function t1(e,t,n){const o=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let a=e1(e,Math.max(i,0));o.length===1&&(a=a.filter(l=>l!==n));const c=a.find(l=>l.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function n1(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const s=t[i],c=t[a],l=s.x,f=s.y,u=c.x,m=c.y;f>r!=m>r&&n<(u-l)*(r-f)/(m-f)+l&&(o=!o)}return o}function r1(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return n1(n,t)}function Gr(e){return t=>t.pointerType==="mouse"?e(t):void 0}var o1=nd,i1=us,a1=od,s1=id,u1=fs,l1=ad,c1=gi,d1=ud,f1=cd,v1=fd,m1=md,p1=pd,h1=hd,g1=bd,b1=yd,y1=wd,bi="DropdownMenu",[x1]=An(bi,[Jc]),dt=Jc(),[w1,Ed]=x1(bi),Sd=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:i,onOpenChange:a,modal:s=!0}=e,c=dt(t),l=d.useRef(null),[f,u]=wr({prop:o,defaultProp:i!=null?i:!1,onChange:a,caller:bi});return v.jsx(w1,{scope:t,triggerId:on(),triggerRef:l,contentId:on(),open:f,onOpenChange:u,onOpenToggle:d.useCallback(()=>u(m=>!m),[u]),modal:s,children:v.jsx(o1,{...c,open:f,onOpenChange:u,dir:r,modal:s,children:n})})};Sd.displayName=bi;var Rd="DropdownMenuTrigger",Md=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,i=Ed(Rd,n),a=dt(n);return v.jsx(i1,{asChild:!0,...a,children:v.jsx($e.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:Qr(t,i.triggerRef),onPointerDown:ie(e.onPointerDown,s=>{!r&&s.button===0&&s.ctrlKey===!1&&(i.onOpenToggle(),i.open||s.preventDefault())}),onKeyDown:ie(e.onKeyDown,s=>{r||(["Enter"," "].includes(s.key)&&i.onOpenToggle(),s.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})})});Md.displayName=Rd;var C1="DropdownMenuPortal",Nd=e=>{const{__scopeDropdownMenu:t,...n}=e,r=dt(t);return v.jsx(a1,{...r,...n})};Nd.displayName=C1;var Pd="DropdownMenuContent",kd=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ed(Pd,n),i=dt(n),a=d.useRef(!1);return v.jsx(s1,{id:o.contentId,"aria-labelledby":o.triggerId,...i,...r,ref:t,onCloseAutoFocus:ie(e.onCloseAutoFocus,s=>{var c;a.current||(c=o.triggerRef.current)==null||c.focus(),a.current=!1,s.preventDefault()}),onInteractOutside:ie(e.onInteractOutside,s=>{const c=s.detail.originalEvent,l=c.button===0&&c.ctrlKey===!0,f=c.button===2||l;(!o.modal||f)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});kd.displayName=Pd;var E1="DropdownMenuGroup",S1=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=dt(n);return v.jsx(u1,{...o,...r,ref:t})});S1.displayName=E1;var R1="DropdownMenuLabel",M1=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=dt(n);return v.jsx(l1,{...o,...r,ref:t})});M1.displayName=R1;var N1="DropdownMenuItem",_d=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=dt(n);return v.jsx(c1,{...o,...r,ref:t})});_d.displayName=N1;var P1="DropdownMenuCheckboxItem",Id=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=dt(n);return v.jsx(d1,{...o,...r,ref:t})});Id.displayName=P1;var k1="DropdownMenuRadioGroup",Dd=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=dt(n);return v.jsx(f1,{...o,...r,ref:t})});Dd.displayName=k1;var _1="DropdownMenuRadioItem",Ad=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=dt(n);return v.jsx(v1,{...o,...r,ref:t})});Ad.displayName=_1;var I1="DropdownMenuItemIndicator",Td=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=dt(n);return v.jsx(m1,{...o,...r,ref:t})});Td.displayName=I1;var D1="DropdownMenuSeparator",Od=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=dt(n);return v.jsx(p1,{...o,...r,ref:t})});Od.displayName=D1;var A1="DropdownMenuArrow",T1=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=dt(n);return v.jsx(h1,{...o,...r,ref:t})});T1.displayName=A1;var O1=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:i}=e,a=dt(t),[s,c]=wr({prop:r,defaultProp:i!=null?i:!1,onChange:o,caller:"DropdownMenuSub"});return v.jsx(g1,{...a,open:s,onOpenChange:c,children:n})},j1="DropdownMenuSubTrigger",jd=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=dt(n);return v.jsx(b1,{...o,...r,ref:t})});jd.displayName=j1;var L1="DropdownMenuSubContent",Ld=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=dt(n);return v.jsx(y1,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Ld.displayName=L1;var $1=Sd,F1=Md,$d=Nd,z1=kd,B1=_d,H1=Id,V1=Dd,W1=Ad,Fd=Td,K1=Od,U1=O1,G1=jd,Y1=Ld;function Z1({...e}){return v.jsx($1,{"data-slot":"dropdown-menu",...e})}function q1({...e}){return v.jsx($d,{"data-slot":"dropdown-menu-portal",...e})}function X1({...e}){return v.jsx(F1,{"data-slot":"dropdown-menu-trigger",...e})}function Q1({...e}){return v.jsx(U1,{"data-slot":"dropdown-menu-sub",...e})}function J1({...e}){return v.jsx(V1,{"data-slot":"dropdown-menu-radio-group",...e})}function eb({className:e,inset:t,children:n,...r}){return v.jsxs(G1,{"data-slot":"dropdown-menu-sub-trigger","data-inset":t,className:W(`
242
+ `}),i(e,t)]},n)})}),O&&R&&E&&(0,v.createPortal)((0,f.jsx)(`div`,{className:T(`
243
+ univer-pointer-events-none univer-fixed univer-rounded-md univer-border univer-border-gray-200
244
+ univer-bg-white univer-shadow-lg
245
+ dark:!univer-border-gray-700 dark:!univer-bg-gray-800
246
+ `),style:{zIndex:2147483647,left:`${E.x}px`,top:`${E.y}px`,width:`${M.current.width}px`,height:`${M.current.height}px`,opacity:.95},children:C?(0,f.jsx)(`div`,{dangerouslySetInnerHTML:{__html:C}}):i(R,h.findIndex(e=>L(e)===L(R)))}),document.body)]})}function Je({...e}){return(0,f.jsx)(y.Root,{"data-slot":`dropdown-menu`,...e})}function Ye({...e}){return(0,f.jsx)(y.Portal,{"data-slot":`dropdown-menu-portal`,...e})}function Xe({...e}){return(0,f.jsx)(y.Trigger,{"data-slot":`dropdown-menu-trigger`,...e})}function Ze({...e}){return(0,f.jsx)(y.Sub,{"data-slot":`dropdown-menu-sub`,...e})}function Qe({...e}){return(0,f.jsx)(y.RadioGroup,{"data-slot":`dropdown-menu-radio-group`,...e})}function $e({className:e,inset:t,children:n,...r}){return(0,f.jsxs)(y.SubTrigger,{"data-slot":`dropdown-menu-sub-trigger`,"data-inset":t,className:T(`
149
247
  univer-flex univer-cursor-default univer-select-none univer-items-center univer-justify-between
150
248
  univer-gap-2 univer-rounded univer-px-2 univer-py-1.5 univer-text-sm univer-outline-none
151
249
  data-[state=open]:univer-bg-gray-100
@@ -153,7 +251,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
153
251
  dark:data-[state=open]:!univer-bg-gray-600
154
252
  dark:focus:!univer-bg-gray-600
155
253
  [&_svg]:univer-pointer-events-none [&_svg]:univer-size-4 [&_svg]:univer-shrink-0
156
- `,e),...r,children:[n,v.jsx(Vr,{className:"ml-auto"})]})}function tb({className:e,...t}){return v.jsx(Y1,{"data-slot":"dropdown-menu-sub-content",className:W(`
254
+ `,e),...r,children:[n,(0,f.jsx)(c.MoreRightIcon,{className:`ml-auto`})]})}function et({className:e,...t}){return(0,f.jsx)(y.SubContent,{"data-slot":`dropdown-menu-sub-content`,className:T(`
157
255
  data-[state=open]:univer-animate-in data-[state=open]:univer-fade-in-0
158
256
  data-[state=open]:univer-zoom-in-95
159
257
  data-[state=closed]:univer-animate-out data-[state=closed]:univer-fade-out-0
@@ -166,7 +264,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
166
264
  univer-overflow-y-auto univer-rounded-md univer-bg-white univer-p-1.5 univer-text-gray-900
167
265
  univer-shadow-md
168
266
  dark:!univer-bg-gray-700 dark:!univer-text-white
169
- `,ct,kn,e),...t})}function nb({className:e,sideOffset:t=4,...n}){return v.jsx($d,{children:v.jsx(z1,{"data-slot":"dropdown-menu-content",sideOffset:t,className:W(`
267
+ `,R,I,e),...t})}function tt({className:e,sideOffset:t=4,...n}){return(0,f.jsx)(y.Portal,{children:(0,f.jsx)(y.Content,{"data-slot":`dropdown-menu-content`,sideOffset:t,className:T(`
170
268
  data-[state=open]:univer-animate-in data-[state=open]:univer-fade-in-0
171
269
  data-[state=open]:univer-zoom-in-95
172
270
  data-[state=closed]:univer-animate-out data-[state=closed]:univer-fade-out-0
@@ -179,67 +277,157 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
179
277
  univer-overflow-y-auto univer-rounded-md univer-bg-white univer-p-1.5 univer-text-gray-900
180
278
  univer-shadow-md
181
279
  dark:!univer-bg-gray-700 dark:!univer-text-white
182
- `,ct,kn,e),...n})})}function rb({className:e,inset:t,variant:n="default",...r}){return v.jsx(B1,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:W(`
280
+ `,R,I,e),...n})})}function nt({className:e,inset:t,variant:n=`default`,...r}){return(0,f.jsx)(y.Item,{"data-slot":`dropdown-menu-item`,"data-inset":t,"data-variant":n,className:T(`
183
281
  univer-relative univer-flex univer-cursor-default univer-select-none univer-items-center univer-gap-2
184
282
  univer-rounded univer-px-2 univer-py-1.5 univer-text-sm univer-outline-none univer-transition-colors
185
283
  data-[disabled]:univer-pointer-events-none data-[disabled]:univer-opacity-50
186
284
  focus:univer-bg-gray-100
187
285
  dark:focus:!univer-bg-gray-600
188
286
  [&>svg]:univer-size-4 [&>svg]:univer-shrink-0
189
- `,e),...r})}function ob({className:e,children:t,hideIndicator:n,checked:r,...o}){return v.jsxs(H1,{"data-slot":"dropdown-menu-checkbox-item",className:W(`
287
+ `,e),...r})}function rt({className:e,children:t,hideIndicator:n,checked:r,...i}){return(0,f.jsxs)(y.CheckboxItem,{"data-slot":`dropdown-menu-checkbox-item`,className:T(`
190
288
  univer-relative univer-flex univer-cursor-default univer-select-none univer-items-center
191
289
  univer-rounded univer-py-1.5 univer-pr-2 univer-text-sm univer-outline-none univer-transition-colors
192
290
  data-[disabled]:univer-pointer-events-none data-[disabled]:univer-opacity-50
193
291
  focus:univer-bg-gray-100
194
292
  dark:focus:!univer-bg-gray-600
195
- `,{"univer-pl-8":!n,"univer-pl-2":n},e),checked:r,...o,children:[!n&&v.jsx("span",{className:"univer-absolute univer-left-2 univer-flex univer-size-3.5 univer-items-center univer-justify-center",children:v.jsx(Fd,{children:v.jsx(br,{className:"univer-block univer-size-4 univer-fill-current univer-text-primary-600"})})}),t]})}function ib({className:e,children:t,hideIndicator:n,...r}){return v.jsxs(W1,{"data-slot":"dropdown-menu-radio-item",className:W(`
293
+ `,{"univer-pl-8":!n,"univer-pl-2":n},e),checked:r,...i,children:[!n&&(0,f.jsx)(`span`,{className:`
294
+ univer-absolute univer-left-2 univer-flex univer-size-3.5 univer-items-center
295
+ univer-justify-center
296
+ `,children:(0,f.jsx)(y.ItemIndicator,{children:(0,f.jsx)(c.CheckMarkIcon,{className:`univer-block univer-size-4 univer-fill-current univer-text-primary-600`})})}),t]})}function it({className:e,children:t,hideIndicator:n,...r}){return(0,f.jsxs)(y.RadioItem,{"data-slot":`dropdown-menu-radio-item`,className:T(`
196
297
  univer-relative univer-flex univer-cursor-default univer-select-none univer-items-center
197
298
  univer-rounded univer-py-1.5 univer-pr-2 univer-text-sm univer-outline-none univer-transition-colors
198
299
  data-[disabled]:univer-pointer-events-none data-[disabled]:univer-opacity-50
199
300
  focus:univer-bg-gray-100
200
301
  dark:focus:!univer-bg-gray-600
201
- `,{"univer-pl-8":!n,"univer-pl-2":n},e),...r,children:[!n&&v.jsx("span",{className:"univer-absolute univer-left-2 univer-flex univer-size-3.5 univer-items-center univer-justify-center",children:v.jsx(Fd,{children:v.jsx(br,{className:"univer-block univer-size-4 univer-fill-current univer-text-primary-600"})})}),t]})}function cu({className:e,...t}){return v.jsx(K1,{className:W("-univer-mx-1 univer-my-1 univer-h-px univer-bg-gray-200 dark:!univer-bg-gray-600",e),...t})}function hs(e){const{children:t,items:n,disabled:r,open:o,onOpenChange:i,...a}=e,[s,c]=y.useState(!1),l=o!==void 0,f=l?o:s;function u(p){r||(l||c(p),i==null||i(p))}function m(p,g){var x;const{className:b,type:h}=p;if(h==="separator")return v.jsx(cu,{className:b},g);if(h==="radio")return v.jsx(J1,{className:b,value:p.value,onValueChange:p.onSelect,children:p.options.map((E,w)=>{if("type"in E){if(E.type==="separator")return v.jsx(cu,{className:E.className},w)}else{if(E.value===void 0)throw new Error("[DropdownMenu]: `value` is required");return v.jsx(ib,{value:E.value,disabled:E.disabled,hideIndicator:p.hideIndicator,children:E.label},E.value)}return null})},g);if(h==="checkbox")return v.jsx(ob,{className:b,disabled:p.disabled,checked:p.checked,onSelect:()=>{var E;(E=p.onSelect)==null||E.call(p,p.value)},children:p.label},g);if(h==="item")return v.jsx(rb,{className:b,disabled:p.disabled,onSelect:()=>{var E;(E=p.onSelect)==null||E.call(p,p)},children:p.children},g);if(h==="subItem")return v.jsxs(Q1,{children:[v.jsx(eb,{children:p.children}),v.jsx(q1,{children:v.jsx(tb,{sideOffset:12,children:(x=p.options)==null?void 0:x.map((E,w)=>m(E,w))})})]},g)}return v.jsxs(Z1,{modal:!1,open:f,onOpenChange:u,children:[v.jsx(X1,{asChild:!0,children:t}),v.jsx(nb,{className:"univer-text-sm",collisionPadding:{top:12,bottom:12},onWheel:p=>p.stopPropagation(),...a,children:n.map((p,g)=>m(p,g))})]})}const ab=y.createContext(!1),sb=e=>{const{label:t,desc:n,children:r,style:o,className:i,error:a,contentStyle:s,collapsable:c=!1,defaultCollapsed:l=!1}=e,[f,u]=y.useState(l);return v.jsx(ab.Provider,{value:!0,children:v.jsxs("div",{"data-u-comp":"form-layout",className:W("univer-mb-3 univer-flex univer-flex-col",i),style:o,children:[t&&v.jsxs("div",{className:W("univer-mb-2 univer-flex univer-min-h-3.5 univer-items-center univer-text-sm univer-text-gray-900 dark:!univer-text-white",{"univer-cursor-pointer":c}),onClick:()=>u(!f),children:[t,c&&v.jsx(sl,{className:W("univer-ml-1 univer-transition-transform",{"univer-rotate-180":f})})]}),f&&c?null:v.jsxs(v.Fragment,{children:[n&&v.jsx("div",{className:"univer-mt-1 univer-text-sm univer-text-gray-600 dark:!univer-text-gray-200",children:n}),r?v.jsxs("div",{className:W("last:univer-mb-0 [&_[data-u-comp=input]]:univer-w-full [&_[data-u-comp=select]]:univer-w-full",{"[&_[data-u-comp=input]]:univer-border-red-500":a,"[&_[data-u-comp=select]]:univer-border-red-500":a}),style:s,children:[r,a?v.jsx("div",{className:"univer-mt-1 univer-text-xs univer-text-red-500",children:a}):null]}):null]})]})})},ub=e=>v.jsx("div",{className:"univer-flex univer-justify-between [&_[data-u-comp=form-layout]]:univer-max-w-[calc(50%-8px)] [&_[data-u-comp=form-layout]]:univer-shrink [&_[data-u-comp=form-layout]]:univer-grow",children:e.children});function zd(e){const{className:t,value:n=0,total:r=0,loop:o,text:i,onChange:a}=e,s=y.useMemo(()=>i!=null?i:`${n}/${r}`,[n,r,i]),c=r>0,l=()=>{n===1?o&&(a==null||a(r)):a==null||a(n-1)},f=()=>{n===r?o&&(a==null||a(1)):a==null||a(n+1)};return v.jsx("div",{"data-u-comp":"pager",className:W("univer-flex univer-flex-shrink-0 univer-items-center univer-text-sm univer-text-gray-700 dark:!univer-text-gray-400",t),children:c?v.jsxs(v.Fragment,{children:[v.jsx("button",{"data-u-comp":"pager-left-arrow",className:"univer-inline-flex univer-size-4 univer-cursor-pointer univer-items-center univer-rounded univer-border-none univer-bg-transparent univer-p-0 hover:univer-bg-gray-50 dark:hover:!univer-bg-gray-600",type:"button",role:"button",onClick:l,children:v.jsx(al,{})}),v.jsx("span",{className:"univer-mx-1",children:s}),v.jsx("button",{"data-u-comp":"pager-right-arrow",className:"univer-inline-flex univer-size-4 univer-cursor-pointer univer-items-center univer-rounded univer-border-none univer-bg-transparent univer-p-0 hover:univer-bg-gray-50 dark:hover:!univer-bg-gray-600",type:"button",role:"button",onClick:f,children:v.jsx(Vr,{})})]}):v.jsx("div",{className:"univer-mx-1",children:s})})}const Qi=`
302
+ `,{"univer-pl-8":!n,"univer-pl-2":n},e),...r,children:[!n&&(0,f.jsx)(`span`,{className:`
303
+ univer-absolute univer-left-2 univer-flex univer-size-3.5 univer-items-center
304
+ univer-justify-center
305
+ `,children:(0,f.jsx)(y.ItemIndicator,{children:(0,f.jsx)(c.CheckMarkIcon,{className:`univer-block univer-size-4 univer-fill-current univer-text-primary-600`})})}),t]})}function at({className:e,...t}){return(0,f.jsx)(y.Separator,{className:T(`
306
+ -univer-mx-1 univer-my-1 univer-h-px univer-bg-gray-200
307
+ dark:!univer-bg-gray-600
308
+ `,e),...t})}function ot(e){let{children:t,items:n,disabled:r,open:i,onOpenChange:a,...o}=e,[s,c]=(0,l.useState)(!1),u=i!==void 0,d=u?i:s;function p(e){r||(u||c(e),a==null||a(e))}function m(e,t){let{className:n,type:r}=e;if(r===`separator`)return(0,f.jsx)(at,{className:n},t);if(r===`radio`)return(0,f.jsx)(Qe,{className:n,value:e.value,onValueChange:e.onSelect,children:e.options.map((t,n)=>{if(`type`in t){if(t.type===`separator`)return(0,f.jsx)(at,{className:t.className},n)}else{if(t.value===void 0)throw Error("[DropdownMenu]: `value` is required");return(0,f.jsx)(it,{value:t.value,disabled:t.disabled,hideIndicator:e.hideIndicator,children:t.label},t.value)}return null})},t);if(r===`checkbox`)return(0,f.jsx)(rt,{className:n,disabled:e.disabled,checked:e.checked,onSelect:()=>{var t;(t=e.onSelect)==null||t.call(e,e.value)},children:e.label},t);if(r===`item`)return(0,f.jsx)(nt,{className:n,disabled:e.disabled,onSelect:()=>{var t;(t=e.onSelect)==null||t.call(e,e)},children:e.children},t);if(r===`subItem`){var i;return(0,f.jsxs)(Ze,{children:[(0,f.jsx)($e,{children:e.children}),(0,f.jsx)(Ye,{children:(0,f.jsx)(et,{sideOffset:12,children:(i=e.options)==null?void 0:i.map((e,t)=>m(e,t))})})]},t)}}return(0,f.jsxs)(Je,{modal:!1,open:d,onOpenChange:p,children:[(0,f.jsx)(Xe,{asChild:!0,children:t}),(0,f.jsx)(tt,{className:`univer-text-sm`,collisionPadding:{top:12,bottom:12},onWheel:e=>e.stopPropagation(),...o,children:n.map((e,t)=>m(e,t))})]})}const st=(0,l.createContext)(!1),ct=e=>{let{label:t,desc:n,children:r,style:i,className:a,error:o,contentStyle:s,collapsable:u=!1,defaultCollapsed:d=!1}=e,[p,m]=(0,l.useState)(d);return(0,f.jsx)(st.Provider,{value:!0,children:(0,f.jsxs)(`div`,{"data-u-comp":`form-layout`,className:T(`univer-mb-3 univer-flex univer-flex-col`,a),style:i,children:[t&&(0,f.jsxs)(`div`,{className:T(`
309
+ univer-mb-2 univer-flex univer-min-h-3.5 univer-items-center univer-text-sm
310
+ univer-text-gray-900
311
+ dark:!univer-text-white
312
+ `,{"univer-cursor-pointer":u}),onClick:()=>m(!p),children:[t,u&&(0,f.jsx)(c.MoreUpIcon,{className:T(`univer-ml-1 univer-transition-transform`,{"univer-rotate-180":p})})]}),p&&u?null:(0,f.jsxs)(f.Fragment,{children:[n&&(0,f.jsx)(`div`,{className:`
313
+ univer-mt-1 univer-text-sm univer-text-gray-600
314
+ dark:!univer-text-gray-200
315
+ `,children:n}),r?(0,f.jsxs)(`div`,{className:T(`
316
+ last:univer-mb-0
317
+ [&_[data-u-comp=input]]:univer-w-full
318
+ [&_[data-u-comp=select]]:univer-w-full
319
+ `,{"[&_[data-u-comp=input]]:univer-border-red-500":o,"[&_[data-u-comp=select]]:univer-border-red-500":o}),style:s,children:[r,o?(0,f.jsx)(`div`,{className:`univer-mt-1 univer-text-xs univer-text-red-500`,children:o}):null]}):null]})]})})},lt=e=>(0,f.jsx)(`div`,{className:`
320
+ univer-flex univer-justify-between
321
+ [&_[data-u-comp=form-layout]]:univer-max-w-[calc(50%-8px)] [&_[data-u-comp=form-layout]]:univer-shrink
322
+ [&_[data-u-comp=form-layout]]:univer-grow
323
+ `,children:e.children});function ut(e){let{className:t,value:n=0,total:r=0,loop:i,text:a,onChange:o}=e,s=(0,l.useMemo)(()=>a==null?`${n}/${r}`:a,[n,r,a]),u=r>0,d=()=>{n===1?i&&(o==null||o(r)):o==null||o(n-1)},p=()=>{n===r?i&&(o==null||o(1)):o==null||o(n+1)};return(0,f.jsx)(`div`,{"data-u-comp":`pager`,className:T(`
324
+ univer-flex univer-flex-shrink-0 univer-items-center univer-text-sm univer-text-gray-700
325
+ dark:!univer-text-gray-400
326
+ `,t),children:u?(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`button`,{"data-u-comp":`pager-left-arrow`,className:`
327
+ univer-inline-flex univer-size-4 univer-cursor-pointer univer-items-center univer-rounded
328
+ univer-border-none univer-bg-transparent univer-p-0
329
+ hover:univer-bg-gray-50
330
+ dark:hover:!univer-bg-gray-600
331
+ `,type:`button`,role:`button`,onClick:d,children:(0,f.jsx)(c.MoreLeftIcon,{})}),(0,f.jsx)(`span`,{className:`univer-mx-1`,children:s}),(0,f.jsx)(`button`,{"data-u-comp":`pager-right-arrow`,className:`
332
+ univer-inline-flex univer-size-4 univer-cursor-pointer univer-items-center univer-rounded
333
+ univer-border-none univer-bg-transparent univer-p-0
334
+ hover:univer-bg-gray-50
335
+ dark:hover:!univer-bg-gray-600
336
+ `,type:`button`,role:`button`,onClick:p,children:(0,f.jsx)(c.MoreRightIcon,{})})]}):(0,f.jsx)(`div`,{className:`univer-mx-1`,children:s})})}const K=`
202
337
  univer-flex univer-cursor-pointer univer-items-center univer-justify-center univer-border-none
203
338
  univer-bg-transparent univer-p-0 univer-text-current
204
339
  hover:univer-text-white
205
- `;function lb(e){const{className:t,images:n,open:r,onOpenChange:o}=e,[i,a]=y.useState(!1),[s,c]=y.useState(0),[l,f]=y.useState(1),u=y.useRef(null),m=y.useMemo(()=>n[s],[s,n]);if(y.useEffect(()=>{r&&u.current&&u.current.focus()},[r]),y.useEffect(()=>{if(!r)return;const g=b=>{b.key==="Escape"&&(o==null||o(!1))};return window.addEventListener("keydown",g),()=>window.removeEventListener("keydown",g)},[r,o]),y.useEffect(()=>{if(r)a(!0);else{const g=setTimeout(()=>{a(!1)},150);return()=>clearTimeout(g)}},[r]),y.useEffect(()=>{if(!r)return;const g=b=>{b.preventDefault();const h=-b.deltaY*.001;f(x=>Math.min(Math.max(.5,x+h),2))};return window.addEventListener("wheel",g,{passive:!1}),()=>{window.removeEventListener("wheel",g)}},[r]),!r&&!i)return null;function p(g){if(g==="reset"){f(1);return}const b=l+g;b<.5||b>2||f(b)}return ut.createPortal(v.jsxs("div",{"data-u-comp":"gallery",role:"dialog","aria-modal":"true","aria-label":"Image gallery",tabIndex:-1,ref:u,className:W(`
340
+ `;function dt(e){let{className:t,images:n,open:r,onOpenChange:i}=e,[a,o]=(0,l.useState)(!1),[s,u]=(0,l.useState)(0),[d,p]=(0,l.useState)(1),m=(0,l.useRef)(null),h=(0,l.useMemo)(()=>n[s],[s,n]);if((0,l.useEffect)(()=>{r&&m.current&&m.current.focus()},[r]),(0,l.useEffect)(()=>{if(!r)return;let e=e=>{e.key===`Escape`&&(i==null||i(!1))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[r,i]),(0,l.useEffect)(()=>{if(r)o(!0);else{let e=setTimeout(()=>{o(!1)},150);return()=>clearTimeout(e)}},[r]),(0,l.useEffect)(()=>{if(!r)return;let e=e=>{e.preventDefault();let t=-e.deltaY*.001;p(e=>Math.min(Math.max(.5,e+t),2))};return window.addEventListener(`wheel`,e,{passive:!1}),()=>{window.removeEventListener(`wheel`,e)}},[r]),!r&&!a)return null;function g(e){if(e===`reset`){p(1);return}let t=d+e;t<.5||t>2||p(t)}return(0,v.createPortal)((0,f.jsxs)(`div`,{"data-u-comp":`gallery`,role:`dialog`,"aria-modal":`true`,"aria-label":`Image gallery`,tabIndex:-1,ref:m,className:T(`
206
341
  univer-absolute univer-inset-0 univer-z-[1080] univer-flex univer-size-full univer-select-none
207
342
  univer-items-center univer-justify-center
208
- `,{"univer-animate-in univer-fade-in":r,"univer-animate-out univer-fade-out":!r},t),children:[v.jsx("div",{className:"univer-absolute univer-inset-0 univer-size-full univer-bg-gray-900 univer-opacity-80","aria-hidden":"true",onClick:()=>o==null?void 0:o(!1)}),v.jsx("div",{className:"univer-relative",children:m&&v.jsx("img",{className:"univer-max-h-[40vh] univer-max-w-[60vw] univer-transition-transform univer-duration-300 univer-ease-out",style:{transform:`scale(${l})`},src:m,alt:`Image ${s+1} of ${n.length}`,draggable:!1})}),v.jsxs("footer",{className:"univer-absolute univer-bottom-6 univer-left-1/2 univer-flex -univer-translate-x-1/2 univer-items-center univer-gap-3 univer-rounded-full univer-bg-gray-800 univer-px-6 univer-py-3 univer-text-gray-400",children:[v.jsx(zd,{className:"!univer-text-gray-400 [&_[data-u-comp=pager-left-arrow]:hover]:!univer-bg-gray-600 [&_[data-u-comp=pager-right-arrow]:hover]:!univer-bg-gray-600",value:s+1,total:n.length,onChange:g=>c(g-1)}),v.jsx("button",{type:"button","aria-label":"Zoom in",className:Qi,onClick:()=>p(.25),children:v.jsx(dl,{"aria-hidden":"true"})}),v.jsx("button",{type:"button","aria-label":"Zoom out",className:Qi,onClick:()=>p(-.25),children:v.jsx(fl,{"aria-hidden":"true"})}),v.jsx("button",{type:"button","aria-label":"Reset zoom",className:Qi,onClick:()=>p("reset"),children:v.jsx(ul,{"aria-hidden":"true"})})]})]}),document.body)}const cb=za(`
343
+ `,{"univer-animate-in univer-fade-in":r,"univer-animate-out univer-fade-out":!r},t),children:[(0,f.jsx)(`div`,{className:`univer-absolute univer-inset-0 univer-size-full univer-bg-gray-900 univer-opacity-80`,"aria-hidden":`true`,onClick:()=>i==null?void 0:i(!1)}),(0,f.jsx)(`div`,{className:`univer-relative`,children:h&&(0,f.jsx)(`img`,{className:`
344
+ univer-max-h-[40vh] univer-max-w-[60vw] univer-transition-transform univer-duration-300
345
+ univer-ease-out
346
+ `,style:{transform:`scale(${d})`},src:h,alt:`Image ${s+1} of ${n.length}`,draggable:!1})}),(0,f.jsxs)(`footer`,{className:`
347
+ univer-absolute univer-bottom-6 univer-left-1/2 univer-flex -univer-translate-x-1/2
348
+ univer-items-center univer-gap-3 univer-rounded-full univer-bg-gray-800 univer-px-6 univer-py-3
349
+ univer-text-gray-400
350
+ `,children:[(0,f.jsx)(ut,{className:`
351
+ !univer-text-gray-400
352
+ [&_[data-u-comp=pager-left-arrow]:hover]:!univer-bg-gray-600
353
+ [&_[data-u-comp=pager-right-arrow]:hover]:!univer-bg-gray-600
354
+ `,value:s+1,total:n.length,onChange:e=>u(e-1)}),(0,f.jsx)(`button`,{type:`button`,"aria-label":`Zoom in`,className:K,onClick:()=>g(.25),children:(0,f.jsx)(c.ZoomInIcon,{"aria-hidden":`true`})}),(0,f.jsx)(`button`,{type:`button`,"aria-label":`Zoom out`,className:K,onClick:()=>g(-.25),children:(0,f.jsx)(c.ZoomOutIcon,{"aria-hidden":`true`})}),(0,f.jsx)(`button`,{type:`button`,"aria-label":`Reset zoom`,className:K,onClick:()=>g(`reset`),children:(0,f.jsx)(c.OneToOneIcon,{"aria-hidden":`true`})})]})]}),document.body)}const ft=(0,p.cva)(`
209
355
  univer-box-border univer-w-full univer-rounded-md univer-bg-white univer-transition-colors univer-duration-200
210
356
  placeholder:univer-text-gray-400
211
357
  focus:univer-border-primary-600 focus:univer-outline-none focus:univer-ring-2 focus:univer-ring-primary-50
212
358
  dark:!univer-bg-gray-700 dark:!univer-text-white
213
359
  dark:focus:!univer-ring-primary-900
214
- `,{variants:{size:{mini:"univer-h-7 univer-px-1.5 univer-text-sm",small:"univer-h-8 univer-px-2 univer-text-sm",middle:"univer-h-10 univer-px-3 univer-text-base",large:"univer-h-12 univer-px-4 univer-text-lg"}},defaultVariants:{size:"small"}}),Bd=y.forwardRef(({autoFocus:e=!1,className:t,style:n,type:r="text",placeholder:o,value:i,size:a="small",allowClear:s=!1,disabled:c=!1,onClick:l,onKeyDown:f,onChange:u,onFocus:m,onBlur:p,slot:g,inputClass:b,inputStyle:h,...x},E)=>{const w=H=>{H.stopPropagation(),u==null||u("")},C=H=>{u==null||u(H.target.value)},S=y.useMemo(()=>s&&i&&!c||g,[s,c,g,i]),[R,L]=y.useState(0),D=y.useRef(null);return y.useEffect(()=>{let H=null;return g&&D.current&&(H=new MutationObserver(()=>{D.current&&L(D.current.offsetWidth+8)}),H.observe(D.current,{childList:!0,subtree:!0}),L(D.current.offsetWidth+8)),()=>H==null?void 0:H.disconnect()},[D.current]),y.useEffect(()=>{s&&!(g&&D.current)&&L(26)},[]),v.jsxs("div",{"data-u-comp":"input",className:W("univer-relative univer-inline-flex univer-w-full univer-items-center univer-rounded-md",c&&"univer-cursor-not-allowed",t),style:n,children:[v.jsx("input",{ref:E,type:r,className:W(cb({size:a}),ct,c&&`
360
+ `,{variants:{size:{mini:`univer-h-7 univer-px-1.5 univer-text-sm`,small:`univer-h-8 univer-px-2 univer-text-sm`,middle:`univer-h-10 univer-px-3 univer-text-base`,large:`univer-h-12 univer-px-4 univer-text-lg`}},defaultVariants:{size:`small`}}),pt=(0,l.forwardRef)(({autoFocus:e=!1,className:t,style:n,type:r=`text`,placeholder:i,value:a,size:o=`small`,allowClear:s=!1,disabled:u=!1,onClick:d,onKeyDown:p,onChange:m,onFocus:h,onBlur:g,slot:_,inputClass:v,inputStyle:y,...b},x)=>{let S=e=>{e.stopPropagation(),m==null||m(``)},C=e=>{m==null||m(e.target.value)},w=(0,l.useMemo)(()=>s&&a&&!u||_,[s,u,_,a]),[E,D]=(0,l.useState)(0),O=(0,l.useRef)(null);return(0,l.useEffect)(()=>{let e=null;return _&&O.current&&(e=new MutationObserver(()=>{O.current&&D(O.current.offsetWidth+8)}),e.observe(O.current,{childList:!0,subtree:!0}),D(O.current.offsetWidth+8)),()=>e==null?void 0:e.disconnect()},[O.current]),(0,l.useEffect)(()=>{s&&!(_&&O.current)&&D(26)},[]),(0,f.jsxs)(`div`,{"data-u-comp":`input`,className:T(`univer-relative univer-inline-flex univer-w-full univer-items-center univer-rounded-md`,u&&`univer-cursor-not-allowed`,t),style:n,children:[(0,f.jsx)(`input`,{ref:x,type:r,className:T(ft({size:o}),R,u&&`
215
361
  univer-cursor-not-allowed univer-bg-gray-50 univer-text-gray-400
216
362
  dark:!univer-text-gray-500
217
- `,s&&!g&&"univer-pr-8",b),placeholder:o,value:i,disabled:c,autoFocus:e,onClick:l,onKeyDown:f,onChange:C,onFocus:m,onBlur:p,style:{...h,paddingRight:R},...x}),S&&v.jsxs("div",{className:"univer-absolute univer-right-2 univer-flex univer-items-center univer-gap-1 univer-rounded-full",ref:D,children:[g,s&&i&&!c&&v.jsx("button",{type:"button",onClick:w,className:"univer-flex univer-size-4 univer-cursor-pointer univer-items-center univer-rounded-full univer-border-none univer-bg-transparent univer-p-1 univer-text-gray-400 univer-transition-colors univer-duration-200 hover:univer-text-gray-500 focus:univer-outline-none",children:v.jsx(ii,{className:"univer-size-3"})})]})]})}),pa=y.forwardRef(({value:e,defaultValue:t,size:n="small",min:r=Number.MIN_SAFE_INTEGER,max:o=Number.MAX_SAFE_INTEGER,step:i=1,precision:a,formatter:s,parser:c,controls:l=!0,className:f,inputClassName:u,controlsClassName:m,disabled:p,onChange:g,onKeyDown:b,onPressEnter:h,onFocus:x,onBlur:E,allowEmpty:w=!1},C)=>{const[S,R]=y.useState(e!==void 0?e:t!==void 0?t:null),L=y.useRef(S),[D,H]=y.useState(A(S)),k=y.useRef(null),T=y.useRef(null),F=y.useRef(null),z=$=>{C&&(typeof C=="function"?C($):C.current=$),k.current=$};y.useEffect(()=>{e!==void 0&&e!==S&&(R(e),L.current=e,H(A(e)))},[e]),y.useEffect(()=>{S!==null&&(L.current=S)},[S]),y.useEffect(()=>()=>{T.current&&clearTimeout(T.current),F.current&&clearInterval(F.current)},[]);function A($){if($==null)return"";let O=$;return a!==void 0&&(O=Number($).toFixed(a)),s?s(O):String(O)}function _($){if(!$)return null;let O=$;c&&(O=c($));try{const U=O.replace(/[^\d.-]/g,"").split("."),oe=U[0],G=U.length>1?U.slice(1).join(""):"",q=oe+(G?`.${G}`:""),ne=Number(q);if(Number.isNaN(ne))return null;let ae;if(a!==void 0){const ue=10**a,he=Math.round(ne*ue)/ue;he.toString().includes("e")?ae=Number.parseFloat(he.toFixed(a)):ae=he}else ne.toString().includes("e")?ae=Number.parseFloat(ne.toFixed(16).replace(/\.?0+$/,"")):ae=ne;return o!==void 0&&ae>o&&(ae=o),r!==void 0&&ae<r&&(ae=r),ae}catch{return null}}function M($){if(H($),w&&$===""){R(null),g==null||g(null);return}const O=_($);R(O),g==null||g(O)}function I($){if(S===null){if(D===""&&w)g&&g(null);else{const V=L.current;R(V),H(A(V)),g&&g(V)}E==null||E($);return}let O=S;o!==void 0&&O>o&&(O=o),r!==void 0&&O<r&&(O=r),O!==S?(R(O),H(A(O)),g==null||g(O)):H(A(S)),E==null||E($)}function N($){if(p)return;const O=$?i:-i;let V;S!==null?V=S:L.current!==null?V=L.current:V=r>0?r:0;let U=V+O;o!==void 0&&U>o&&(U=o),r!==void 0&&U<r&&(U=r),U!==V&&(R(U),L.current=U,H(A(U)),g==null||g(U))}function P($){p||(b==null||b($),$.key==="ArrowUp"?($.preventDefault(),N(!0)):$.key==="ArrowDown"?($.preventDefault(),N(!1)):$.key==="Enter"&&(h==null||h($)))}function j($){var O;p||(N($),(O=k.current)==null||O.focus())}const B=p||o!==void 0&&S!==null&&S>=o,K=p||r!==void 0&&S!==null&&S<=r;return v.jsx("div",{className:W("univer-inline-block",f),children:v.jsxs("div",{className:"univer-relative univer-w-full",children:[v.jsx(Bd,{ref:z,className:W("univer-box-border",u),size:n,value:D,disabled:p,onChange:M,onFocus:x,onBlur:I,onKeyDown:P}),l&&v.jsxs("div",{className:W(`
363
+ `,s&&!_&&`univer-pr-8`,v),placeholder:i,value:a,disabled:u,autoFocus:e,onClick:d,onKeyDown:p,onChange:C,onFocus:h,onBlur:g,style:{...y,paddingRight:E},...b}),w&&(0,f.jsxs)(`div`,{className:`
364
+ univer-absolute univer-right-2 univer-flex univer-items-center univer-gap-1
365
+ univer-rounded-full
366
+ `,ref:O,children:[_,s&&a&&!u&&(0,f.jsx)(`button`,{type:`button`,onClick:S,className:`
367
+ univer-flex univer-size-4 univer-cursor-pointer univer-items-center
368
+ univer-rounded-full univer-border-none univer-bg-transparent univer-p-1
369
+ univer-text-gray-400 univer-transition-colors univer-duration-200
370
+ hover:univer-text-gray-500
371
+ focus:univer-outline-none
372
+ `,children:(0,f.jsx)(c.CloseIcon,{className:`univer-size-3`})})]})]})}),mt=(0,l.forwardRef)(({value:e,defaultValue:t,size:n=`small`,min:r=-(2**53-1),max:i=2**53-1,step:a=1,precision:o,formatter:s,parser:c,controls:u=!0,className:d,inputClassName:p,controlsClassName:m,disabled:h,onChange:g,onKeyDown:_,onPressEnter:v,onFocus:y,onBlur:b,allowEmpty:x=!1},S)=>{let[C,w]=(0,l.useState)(e===void 0?t===void 0?null:t:e),E=(0,l.useRef)(C),[D,O]=(0,l.useState)(N(C)),k=(0,l.useRef)(null),A=(0,l.useRef)(null),j=(0,l.useRef)(null),M=e=>{S&&(typeof S==`function`?S(e):S.current=e),k.current=e};(0,l.useEffect)(()=>{e!==void 0&&e!==C&&(w(e),E.current=e,O(N(e)))},[e]),(0,l.useEffect)(()=>{C!==null&&(E.current=C)},[C]),(0,l.useEffect)(()=>()=>{A.current&&clearTimeout(A.current),j.current&&clearInterval(j.current)},[]);function N(e){if(e==null)return``;let t=e;return o!==void 0&&(t=Number(e).toFixed(o)),s?s(t):String(t)}function P(e){if(!e)return null;let t=e;c&&(t=c(e));try{let e=t.replace(/[^\d.-]/g,``).split(`.`),n=e[0],a=e.length>1?e.slice(1).join(``):``,s=n+(a?`.${a}`:``),c=Number(s);if(Number.isNaN(c))return null;let l;if(o!==void 0){let e=10**o,t=Math.round(c*e)/e;l=t.toString().includes(`e`)?Number.parseFloat(t.toFixed(o)):t}else l=c.toString().includes(`e`)?Number.parseFloat(c.toFixed(16).replace(/\.?0+$/,``)):c;return i!==void 0&&l>i&&(l=i),r!==void 0&&l<r&&(l=r),l}catch{return null}}function F(e){if(O(e),x&&e===``){w(null),g==null||g(null);return}let t=P(e);w(t),g==null||g(t)}function I(e){if(C===null){if(D===``&&x)g&&g(null);else{let e=E.current;w(e),O(N(e)),g&&g(e)}b==null||b(e);return}let t=C;i!==void 0&&t>i&&(t=i),r!==void 0&&t<r&&(t=r),t===C?O(N(C)):(w(t),O(N(t)),g==null||g(t)),b==null||b(e)}function L(e){if(h)return;let t=e?a:-a,n;n=C===null?E.current===null?r>0?r:0:E.current:C;let o=n+t;i!==void 0&&o>i&&(o=i),r!==void 0&&o<r&&(o=r),o!==n&&(w(o),E.current=o,O(N(o)),g==null||g(o))}function R(e){h||(_==null||_(e),e.key===`ArrowUp`?(e.preventDefault(),L(!0)):e.key===`ArrowDown`?(e.preventDefault(),L(!1)):e.key===`Enter`&&(v==null||v(e)))}function ee(e){var t;h||(L(e),(t=k.current)==null||t.focus())}let z=h||i!==void 0&&C!==null&&C>=i,B=h||r!==void 0&&C!==null&&C<=r;return(0,f.jsx)(`div`,{className:T(`univer-inline-block`,d),children:(0,f.jsxs)(`div`,{className:`univer-relative univer-w-full`,children:[(0,f.jsx)(pt,{ref:M,className:T(`univer-box-border`,p),size:n,value:D,disabled:h,onChange:F,onFocus:y,onBlur:I,onKeyDown:R}),u&&(0,f.jsxs)(`div`,{className:T(`
218
373
  univer-absolute univer-right-px univer-top-px univer-flex univer-h-[calc(100%-2px)]
219
374
  univer-flex-col univer-overflow-hidden univer-rounded-r-md
220
375
  before:univer-absolute before:univer-top-1/2 before:univer-block before:univer-h-px
221
376
  before:univer-w-full before:-univer-translate-y-1/2 before:univer-bg-gray-200
222
377
  before:univer-content-[""]
223
378
  dark:before:!univer-bg-gray-600
224
- `,Rl,m),children:[v.jsx("span",{className:W(`
379
+ `,te,m),children:[(0,f.jsx)(`span`,{className:T(`
225
380
  univer-box-border univer-flex univer-h-1/2 univer-w-5 univer-cursor-pointer
226
381
  univer-items-center univer-justify-center univer-border-none univer-bg-transparent
227
382
  univer-p-0 univer-transition-colors
228
383
  hover:univer-bg-gray-100
229
384
  dark:!univer-text-white
230
385
  dark:hover:!univer-bg-gray-600
231
- `,B&&"univer-cursor-not-allowed univer-opacity-60"),role:"button","aria-label":"increment","aria-disabled":B,tabIndex:-1,onMouseDown:$=>$.preventDefault(),onClick:()=>{B||j(!0)},children:"+"}),v.jsx("span",{className:W(`
386
+ `,z&&`univer-cursor-not-allowed univer-opacity-60`),role:`button`,"aria-label":`increment`,"aria-disabled":z,tabIndex:-1,onMouseDown:e=>e.preventDefault(),onClick:()=>{z||ee(!0)},children:`+`}),(0,f.jsx)(`span`,{className:T(`
232
387
  univer-box-border univer-flex univer-h-1/2 univer-w-5 univer-cursor-pointer
233
388
  univer-items-center univer-justify-center univer-border-none univer-bg-transparent
234
389
  univer-p-0 univer-transition-colors
235
390
  hover:univer-bg-gray-100
236
391
  dark:!univer-text-white
237
392
  dark:hover:!univer-bg-gray-600
238
- `,K&&"univer-cursor-not-allowed univer-opacity-60"),role:"button","aria-label":"decrement","aria-disabled":K,tabIndex:-1,onMouseDown:$=>$.preventDefault(),onClick:()=>{K||j(!1)},children:"-"})]})]})})});function Hd({items:e,value:t,defaultValue:n,onChange:r,className:o=""}){const[i,a]=y.useState(t!==void 0?t:n||e[0].value),[s,c]=y.useState({}),l=y.useRef(new Map),f=y.useRef(null);y.useEffect(()=>{t!==void 0&&t!==i&&a(t)},[t]);const u=(p,g)=>{const b=l.current.get(p),h=g?l.current.get(g):null;if(b&&f.current){const x=f.current.getBoundingClientRect(),E=b.getBoundingClientRect(),w=E.left-x.left-4;if(h){const S=h.getBoundingClientRect().left-x.left-4;c({"--slide-from":`${S}px`,"--slide-to":`${w}px`,width:`${E.width}px`,transform:`translateX(${w}px)`})}else c({width:`${E.width}px`,transform:`translateX(${w}px)`})}};y.useEffect(()=>{u(i)},[i]);const m=p=>{const g=i;a(p),r==null||r(p),u(p,g)};return v.jsxs("div",{"data-u-comp":"segmented",ref:f,className:W("univer-relative univer-box-border univer-flex univer-gap-4 univer-rounded-lg univer-bg-gray-100 univer-p-1 dark:!univer-bg-gray-800",o),children:[v.jsx("div",{className:"univer-animate-univer-slide univer-absolute univer-h-6 univer-rounded-md univer-bg-white univer-shadow-sm univer-transition-all univer-duration-200 dark:!univer-bg-gray-700 dark:!univer-text-gray-400",style:s}),e.map(p=>v.jsx("button",{ref:g=>{g&&l.current.set(p.value,g)},className:W("univer-relative univer-box-border univer-flex-1 univer-cursor-pointer univer-border-none univer-bg-transparent univer-px-3 univer-py-1 univer-text-xs univer-font-medium univer-transition-colors",{"univer-text-gray-900 dark:!univer-text-white":i===p.value,"univer-text-gray-500 hover:univer-text-gray-900 dark:hover:!univer-text-white":i!==p.value}),type:"button",onClick:()=>m(p.value),children:p.label},String(p.value)))]})}function yi(e){var k,T;const{children:t,className:n,asChild:r=!0,title:o,placement:i="bottom",showIfEllipsis:a=!1,visible:s,onVisibleChange:c}=e,[l,f]=y.useState(!1),u=s!==void 0,m=u?s:l,p=y.useRef(null),g=y.useRef(null),b=y.useRef(null),[h,x]=y.useState(null),[E,w]=y.useState(i);function C(F){return Math.abs(F.scrollWidth-F.clientWidth)>1}function S(){u?c==null||c(!0):f(!0)}function R(){u?c==null||c(!1):f(!1)}y.useLayoutEffect(()=>{if(!m)return;const F=p.current,z=g.current;if(!F||!z)return;const A=F.getBoundingClientRect(),_=z.getBoundingClientRect(),M=8,I=window.innerWidth,N=window.innerHeight,P=[i,"bottom","top","right","left"];let j=i,B=0,K=0;const $=O=>{let V=0,U=0;return O==="bottom"?(V=A.bottom+M,U=A.left+A.width/2-_.width/2):O==="top"?(V=A.top-_.height-M,U=A.left+A.width/2-_.width/2):O==="left"?(V=A.top+A.height/2-_.height/2,U=A.left-_.width-M):(V=A.top+A.height/2-_.height/2,U=A.right+M),{t:V,l:U}};for(const O of P){const{t:V,l:U}=$(O),oe=U>=0&&U+_.width<=I,G=V>=0&&V+_.height<=N;if(oe&&G){j=O,B=V,K=U;break}}if(!B&&!K){const O=$(i);B=Math.min(Math.max(0,O.t),N-_.height),K=Math.min(Math.max(0,O.l),I-_.width)}w(j),x({top:Math.round(B+window.scrollY),left:Math.round(K+window.scrollX)})},[m,i]),y.useEffect(()=>{if(!m)return;const F=()=>{if(!p.current||!g.current)return;const z=p.current.getBoundingClientRect(),A=g.current.getBoundingClientRect(),_=8;let M=0,I=0;E==="bottom"?(M=z.bottom+_,I=z.left+z.width/2-A.width/2):E==="top"?(M=z.top-A.height-_,I=z.left+z.width/2-A.width/2):E==="left"?(M=z.top+z.height/2-A.height/2,I=z.left-A.width-_):(M=z.top+z.height/2-A.height/2,I=z.right+_),x({top:Math.round(M+window.scrollY),left:Math.round(I+window.scrollX)})};return window.addEventListener("scroll",F,!0),window.addEventListener("resize",F),()=>{window.removeEventListener("scroll",F,!0),window.removeEventListener("resize",F)}},[m,E]);const L={ref:F=>p.current=F,onMouseEnter:()=>{a&&p.current&&!C(p.current)||S()},onMouseLeave:()=>R(),onFocus:()=>S(),onBlur:()=>R()},D=r?v.jsx("span",{...L,className:"univer-inline-block univer-max-w-full univer-truncate",children:t}):v.jsx("button",{type:"button",...L,children:t});let H=null;return typeof document<"u"&&m&&o&&document.body&&(H=ut.createPortal(v.jsxs("div",{ref:g,role:"tooltip",className:W("univer-animate-in univer-fade-in-0 univer-zoom-in-95 univer-pointer-events-auto univer-absolute univer-z-[1081] univer-box-border univer-w-fit univer-max-w-sm univer-text-balance univer-rounded-lg univer-bg-gray-700 univer-px-2.5 univer-py-2 univer-text-xs univer-font-medium univer-text-white univer-shadow-lg univer-drop-shadow-sm dark:!univer-bg-gray-100 dark:!univer-text-gray-900",n),style:{top:(k=h==null?void 0:h.top)!=null?k:-9999,left:(T=h==null?void 0:h.left)!=null?T:-9999},onMouseEnter:()=>S(),onMouseLeave:()=>R(),children:[v.jsx("div",{className:"univer-break-words",children:o}),v.jsx("div",{ref:b,className:"univer-absolute univer-size-2.5 univer-rotate-45 univer-rounded-sm univer-bg-gray-700 dark:!univer-bg-gray-100",style:{...E==="bottom"&&{top:-5,left:"50%",transform:"translateX(-50%) rotate(45deg)"},...E==="top"&&{bottom:-5,left:"50%",transform:"translateX(-50%) rotate(45deg)"},...E==="left"&&{right:-5,top:"50%",transform:"translateY(-50%) rotate(45deg)"},...E==="right"&&{left:-5,top:"50%",transform:"translateY(-50%) rotate(45deg)"}}})]}),document.body)),v.jsxs(v.Fragment,{children:[D,H]})}const db={type:"linear",stops:[{color:"#ffffff",offset:0},{color:"#000000",offset:100}],angle:90};function fb(e){var x,E;const{className:t,value:n=db,onChange:r}=e,{locale:o}=y.useContext(Zt),[i,a]=y.useState(0),s=y.useRef(null),c=y.useMemo(()=>[...n.stops].sort((w,C)=>w.offset-C.offset),[n.stops]),l=w=>{r==null||r({...n,type:w})},f=w=>{r==null||r({...n,angle:w!=null?w:0})},u=w=>{const C=[...n.stops];C[i]={...C[i],color:w},r==null||r({...n,stops:C})},m=w=>{if(w===null)return;const C=[...n.stops];C[i]={...C[i],offset:w},r==null||r({...n,stops:C})},p=w=>{if(!s.current)return;const C=s.current.getBoundingClientRect(),S=Math.round((w.clientX-C.left)/C.width*100),L={color:([...c].reverse().find(H=>H.offset<=S)||c[0]).color,offset:S},D=[...n.stops,L];r==null||r({...n,stops:D}),a(D.length-1)},g=()=>{if(n.stops.length<=2)return;const w=n.stops.filter((C,S)=>S!==i);r==null||r({...n,stops:w}),a(0)},b=y.useMemo(()=>`linear-gradient(to right, ${c.map(C=>`${C.color} ${C.offset}%`).join(", ")})`,[c]),h=y.useMemo(()=>{const w=c.map(C=>`${C.color} ${C.offset}%`).join(", ");switch(n.type){case"linear":return`linear-gradient(${n.angle}deg, ${w})`;case"radial":return`radial-gradient(circle, ${w})`;case"angular":return`conic-gradient(from ${n.angle}deg, ${w})`;case"diamond":return`radial-gradient(circle, ${w})`;default:return`linear-gradient(${n.angle}deg, ${w})`}},[n,c]);return v.jsxs("div",{className:W("univer-flex univer-w-64 univer-flex-col univer-gap-4 univer-rounded-lg univer-bg-white univer-p-4 univer-shadow-lg dark:!univer-bg-gray-800",t),children:[v.jsx(Hd,{items:[{label:o==null?void 0:o.GradientColorPicker.linear,value:"linear"},{label:o==null?void 0:o.GradientColorPicker.radial,value:"radial"},{label:o==null?void 0:o.GradientColorPicker.angular,value:"angular"},{label:o==null?void 0:o.GradientColorPicker.diamond,value:"diamond"}],value:n.type,onChange:w=>l(w)}),v.jsx("div",{className:"univer-h-32 univer-w-full univer-rounded-md univer-border univer-border-gray-200 dark:!univer-border-gray-600",style:{background:h}}),v.jsxs("div",{className:"univer-relative univer-mt-4 univer-h-6",children:[v.jsx("div",{ref:s,className:"univer-absolute univer-inset-x-0 univer-top-1/2 univer-h-2 -univer-translate-y-1/2 univer-cursor-crosshair univer-rounded-full",style:{background:b},onClick:p}),n.stops.map((w,C)=>v.jsx("div",{className:W(`
393
+ `,B&&`univer-cursor-not-allowed univer-opacity-60`),role:`button`,"aria-label":`decrement`,"aria-disabled":B,tabIndex:-1,onMouseDown:e=>e.preventDefault(),onClick:()=>{B||ee(!1)},children:`-`})]})]})})});function ht({items:e,value:t,defaultValue:n,onChange:r,className:i=``}){let[a,o]=(0,l.useState)(t===void 0?n||e[0].value:t),[s,c]=(0,l.useState)({}),u=(0,l.useRef)(new Map),d=(0,l.useRef)(null);(0,l.useEffect)(()=>{t!==void 0&&t!==a&&o(t)},[t]);let p=(e,t)=>{let n=u.current.get(e),r=t?u.current.get(t):null;if(n&&d.current){let e=d.current.getBoundingClientRect(),t=n.getBoundingClientRect(),i=t.left-e.left-4;if(r){let n=r.getBoundingClientRect().left-e.left-4;c({"--slide-from":`${n}px`,"--slide-to":`${i}px`,width:`${t.width}px`,transform:`translateX(${i}px)`})}else c({width:`${t.width}px`,transform:`translateX(${i}px)`})}};(0,l.useEffect)(()=>{p(a)},[a]);let m=e=>{let t=a;o(e),r==null||r(e),p(e,t)};return(0,f.jsxs)(`div`,{"data-u-comp":`segmented`,ref:d,className:T(`
394
+ univer-relative univer-box-border univer-flex univer-gap-4 univer-rounded-lg univer-bg-gray-100 univer-p-1
395
+ dark:!univer-bg-gray-800
396
+ `,i),children:[(0,f.jsx)(`div`,{className:`
397
+ univer-animate-univer-slide univer-absolute univer-h-6 univer-rounded-md univer-bg-white
398
+ univer-shadow-sm univer-transition-all univer-duration-200
399
+ dark:!univer-bg-gray-700 dark:!univer-text-gray-400
400
+ `,style:s}),e.map(e=>(0,f.jsx)(`button`,{ref:t=>{t&&u.current.set(e.value,t)},className:T(`
401
+ univer-relative univer-box-border univer-flex-1 univer-cursor-pointer univer-border-none
402
+ univer-bg-transparent univer-px-3 univer-py-1 univer-text-xs univer-font-medium
403
+ univer-transition-colors
404
+ `,{"univer-text-gray-900 dark:!univer-text-white":a===e.value,"univer-text-gray-500 hover:univer-text-gray-900 dark:hover:!univer-text-white":a!==e.value}),type:`button`,onClick:()=>m(e.value),children:e.label},String(e.value)))]})}function gt(e){let{children:t,className:n,asChild:r=!0,title:i,placement:a=`bottom`,showIfEllipsis:o=!1,visible:s,onVisibleChange:c}=e,[u,d]=(0,l.useState)(!1),p=s!==void 0,m=p?s:u,h=(0,l.useRef)(null),g=(0,l.useRef)(null),_=(0,l.useRef)(null),[y,b]=(0,l.useState)(null),[x,S]=(0,l.useState)(a);function C(e){return Math.abs(e.scrollWidth-e.clientWidth)>1}function w(){p?c==null||c(!0):d(!0)}function E(){p?c==null||c(!1):d(!1)}(0,l.useLayoutEffect)(()=>{if(!m)return;let e=h.current,t=g.current;if(!e||!t)return;let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=window.innerWidth,o=window.innerHeight,s=[a,`bottom`,`top`,`right`,`left`],c=a,l=0,u=0,d=e=>{let t=0,i=0;return e===`bottom`?(t=n.bottom+8,i=n.left+n.width/2-r.width/2):e===`top`?(t=n.top-r.height-8,i=n.left+n.width/2-r.width/2):e===`left`?(t=n.top+n.height/2-r.height/2,i=n.left-r.width-8):(t=n.top+n.height/2-r.height/2,i=n.right+8),{t,l:i}};for(let e of s){let{t,l:n}=d(e),a=n>=0&&n+r.width<=i,s=t>=0&&t+r.height<=o;if(a&&s){c=e,l=t,u=n;break}}if(!l&&!u){let e=d(a);l=Math.min(Math.max(0,e.t),o-r.height),u=Math.min(Math.max(0,e.l),i-r.width)}S(c),b({top:Math.round(l+window.scrollY),left:Math.round(u+window.scrollX)})},[m,a]),(0,l.useEffect)(()=>{if(!m)return;let e=()=>{if(!h.current||!g.current)return;let e=h.current.getBoundingClientRect(),t=g.current.getBoundingClientRect(),n=0,r=0;x===`bottom`?(n=e.bottom+8,r=e.left+e.width/2-t.width/2):x===`top`?(n=e.top-t.height-8,r=e.left+e.width/2-t.width/2):x===`left`?(n=e.top+e.height/2-t.height/2,r=e.left-t.width-8):(n=e.top+e.height/2-t.height/2,r=e.right+8),b({top:Math.round(n+window.scrollY),left:Math.round(r+window.scrollX)})};return window.addEventListener(`scroll`,e,!0),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`scroll`,e,!0),window.removeEventListener(`resize`,e)}},[m,x]);let D={ref:e=>h.current=e,onMouseEnter:()=>{o&&h.current&&!C(h.current)||w()},onMouseLeave:()=>E(),onFocus:()=>w(),onBlur:()=>E()},O=r?(0,f.jsx)(`span`,{...D,className:`univer-inline-block univer-max-w-full univer-truncate`,children:t}):(0,f.jsx)(`button`,{type:`button`,...D,children:t}),k=null;if(typeof document<`u`&&m&&i&&document.body){var A,j;k=(0,v.createPortal)((0,f.jsxs)(`div`,{ref:g,role:`tooltip`,className:T(`
405
+ univer-animate-in univer-fade-in-0 univer-zoom-in-95 univer-pointer-events-auto univer-absolute
406
+ univer-z-[1081] univer-box-border univer-w-fit univer-max-w-sm univer-text-balance univer-rounded-lg
407
+ univer-bg-gray-700 univer-px-2.5 univer-py-2 univer-text-xs univer-font-medium univer-text-white
408
+ univer-shadow-lg univer-drop-shadow-sm
409
+ dark:!univer-bg-gray-100 dark:!univer-text-gray-900
410
+ `,n),style:{top:(A=y==null?void 0:y.top)==null?-9999:A,left:(j=y==null?void 0:y.left)==null?-9999:j},onMouseEnter:()=>w(),onMouseLeave:()=>E(),children:[(0,f.jsx)(`div`,{className:`univer-break-words`,children:i}),(0,f.jsx)(`div`,{ref:_,className:`
411
+ univer-absolute univer-size-2.5 univer-rotate-45 univer-rounded-sm univer-bg-gray-700
412
+ dark:!univer-bg-gray-100
413
+ `,style:{...x===`bottom`&&{top:-5,left:`50%`,transform:`translateX(-50%) rotate(45deg)`},...x===`top`&&{bottom:-5,left:`50%`,transform:`translateX(-50%) rotate(45deg)`},...x===`left`&&{right:-5,top:`50%`,transform:`translateY(-50%) rotate(45deg)`},...x===`right`&&{left:-5,top:`50%`,transform:`translateY(-50%) rotate(45deg)`}}})]}),document.body)}return(0,f.jsxs)(f.Fragment,{children:[O,k]})}const _t={type:`linear`,stops:[{color:`#ffffff`,offset:0},{color:`#000000`,offset:100}],angle:90};function vt(e){var t,n;let{className:r,value:i=_t,onChange:a}=e,{locale:o}=(0,l.useContext)(P),[s,u]=(0,l.useState)(0),d=(0,l.useRef)(null),p=(0,l.useMemo)(()=>[...i.stops].sort((e,t)=>e.offset-t.offset),[i.stops]),m=e=>{a==null||a({...i,type:e})},h=e=>{a==null||a({...i,angle:e==null?0:e})},g=e=>{let t=[...i.stops];t[s]={...t[s],color:e},a==null||a({...i,stops:t})},_=e=>{if(e===null)return;let t=[...i.stops];t[s]={...t[s],offset:e},a==null||a({...i,stops:t})},v=e=>{if(!d.current)return;let t=d.current.getBoundingClientRect(),n=Math.round((e.clientX-t.left)/t.width*100),r={color:([...p].reverse().find(e=>e.offset<=n)||p[0]).color,offset:n},o=[...i.stops,r];a==null||a({...i,stops:o}),u(o.length-1)},y=()=>{if(i.stops.length<=2)return;let e=i.stops.filter((e,t)=>t!==s);a==null||a({...i,stops:e}),u(0)},b=(0,l.useMemo)(()=>`linear-gradient(to right, ${p.map(e=>`${e.color} ${e.offset}%`).join(`, `)})`,[p]),x=(0,l.useMemo)(()=>{let e=p.map(e=>`${e.color} ${e.offset}%`).join(`, `);switch(i.type){case`linear`:return`linear-gradient(${i.angle}deg, ${e})`;case`radial`:return`radial-gradient(circle, ${e})`;case`angular`:return`conic-gradient(from ${i.angle}deg, ${e})`;case`diamond`:return`radial-gradient(circle, ${e})`;default:return`linear-gradient(${i.angle}deg, ${e})`}},[i,p]);return(0,f.jsxs)(`div`,{className:T(`
414
+ univer-flex univer-w-64 univer-flex-col univer-gap-4 univer-rounded-lg univer-bg-white univer-p-4
415
+ univer-shadow-lg
416
+ dark:!univer-bg-gray-800
417
+ `,r),children:[(0,f.jsx)(ht,{items:[{label:o==null?void 0:o.GradientColorPicker.linear,value:`linear`},{label:o==null?void 0:o.GradientColorPicker.radial,value:`radial`},{label:o==null?void 0:o.GradientColorPicker.angular,value:`angular`},{label:o==null?void 0:o.GradientColorPicker.diamond,value:`diamond`}],value:i.type,onChange:e=>m(e)}),(0,f.jsx)(`div`,{className:`
418
+ univer-h-32 univer-w-full univer-rounded-md univer-border univer-border-gray-200
419
+ dark:!univer-border-gray-600
420
+ `,style:{background:x}}),(0,f.jsxs)(`div`,{className:`univer-relative univer-mt-4 univer-h-6`,children:[(0,f.jsx)(`div`,{ref:d,className:`
421
+ univer-absolute univer-inset-x-0 univer-top-1/2 univer-h-2 -univer-translate-y-1/2
422
+ univer-cursor-crosshair univer-rounded-full
423
+ `,style:{background:b},onClick:v}),i.stops.map((e,t)=>(0,f.jsx)(`div`,{className:T(`
239
424
  univer-absolute univer-top-1/2 univer-size-4 -univer-translate-x-1/2
240
425
  -univer-translate-y-1/2 univer-cursor-pointer univer-rounded-full univer-border-2
241
426
  univer-border-white univer-shadow-md
242
- `,i===C?"univer-z-10 univer-ring-2 univer-ring-primary-500":"univer-z-0"),style:{left:`${w.offset}%`,backgroundColor:w.color},onClick:S=>{S.stopPropagation(),a(C)},onPointerDown:S=>{const R=S.clientX,L=w.offset,D=k=>{if(!s.current)return;const T=s.current.getBoundingClientRect(),z=(k.clientX-R)/T.width*100,A=Math.max(0,Math.min(100,Math.round(L+z))),_=[...n.stops];_[C]={..._[C],offset:A},r==null||r({...n,stops:_})},H=()=>{window.removeEventListener("pointermove",D),window.removeEventListener("pointerup",H)};window.addEventListener("pointermove",D),window.addEventListener("pointerup",H)}},C))]}),v.jsxs("div",{className:"univer-flex univer-items-end univer-gap-2",children:[v.jsxs("div",{className:"univer-flex-1",children:[v.jsx("div",{className:"univer-mb-1 univer-text-xs univer-text-gray-500",children:o==null?void 0:o.GradientColorPicker.offset}),v.jsx(pa,{value:(x=n.stops[i])==null?void 0:x.offset,min:0,max:100,onChange:m})]}),(n.type==="linear"||n.type==="angular")&&v.jsxs("div",{className:"univer-flex-1",children:[v.jsx("div",{className:"univer-mb-1 univer-text-xs univer-text-gray-500",children:o==null?void 0:o.GradientColorPicker.angle}),v.jsx(pa,{value:n.angle,min:0,max:360,onChange:f})]}),v.jsx("div",{className:"univer-flex univer-gap-1",children:v.jsx(yi,{title:o==null?void 0:o.GradientColorPicker.delete,children:v.jsx(un,{variant:"danger",onClick:g,disabled:n.stops.length<=2,children:v.jsx(tl,{})})})})]}),v.jsx("div",{className:"univer-border-t univer-border-gray-100 univer-pt-4 dark:!univer-border-gray-700",children:v.jsx(fc,{value:(E=n.stops[i])==null?void 0:E.color,onChange:u})})]})}var Ji,xi="HoverCard",[Vd]=An(xi,[Sr]),wi=Sr(),[vb,Ci]=Vd(xi),Wd=e=>{const{__scopeHoverCard:t,children:n,open:r,defaultOpen:o,onOpenChange:i,openDelay:a=700,closeDelay:s=300}=e,c=wi(t),l=d.useRef(0),f=d.useRef(0),u=d.useRef(!1),m=d.useRef(!1),[p,g]=wr({prop:r,defaultProp:o!=null?o:!1,onChange:i,caller:xi}),b=d.useCallback(()=>{clearTimeout(f.current),l.current=window.setTimeout(()=>g(!0),a)},[a,g]),h=d.useCallback(()=>{clearTimeout(l.current),!u.current&&!m.current&&(f.current=window.setTimeout(()=>g(!1),s))},[s,g]),x=d.useCallback(()=>g(!1),[g]);return d.useEffect(()=>()=>{clearTimeout(l.current),clearTimeout(f.current)},[]),v.jsx(vb,{scope:t,open:p,onOpenChange:g,onOpen:b,onClose:h,onDismiss:x,hasSelectionRef:u,isPointerDownOnContentRef:m,children:v.jsx(mi,{...c,children:n})})};Wd.displayName=xi;var Kd="HoverCardTrigger",Ud=d.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,o=Ci(Kd,n),i=wi(n);return v.jsx(pi,{asChild:!0,...i,children:v.jsx($e.a,{"data-state":o.open?"open":"closed",...r,ref:t,onPointerEnter:ie(e.onPointerEnter,Zo(o.onOpen)),onPointerLeave:ie(e.onPointerLeave,Zo(o.onClose)),onFocus:ie(e.onFocus,o.onOpen),onBlur:ie(e.onBlur,o.onClose),onTouchStart:ie(e.onTouchStart,a=>a.preventDefault())})})});Ud.displayName=Kd;var gs="HoverCardPortal",[mb,pb]=Vd(gs,{forceMount:void 0}),Gd=e=>{const{__scopeHoverCard:t,forceMount:n,children:r,container:o}=e,i=Ci(gs,t);return v.jsx(mb,{scope:t,forceMount:n,children:v.jsx(Nt,{present:n||i.open,children:v.jsx(eo,{asChild:!0,container:o,children:r})})})};Gd.displayName=gs;var Yo="HoverCardContent",Yd=d.forwardRef((e,t)=>{const n=pb(Yo,e.__scopeHoverCard),{forceMount:r=n.forceMount,...o}=e,i=Ci(Yo,e.__scopeHoverCard);return v.jsx(Nt,{present:r||i.open,children:v.jsx(hb,{"data-state":i.open?"open":"closed",...o,onPointerEnter:ie(e.onPointerEnter,Zo(i.onOpen)),onPointerLeave:ie(e.onPointerLeave,Zo(i.onClose)),ref:t})})});Yd.displayName=Yo;var hb=d.forwardRef((e,t)=>{const{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,...s}=e,c=Ci(Yo,n),l=wi(n),f=d.useRef(null),u=Ue(t,f),[m,p]=d.useState(!1);return d.useEffect(()=>{if(m){const g=document.body;return Ji=g.style.userSelect||g.style.webkitUserSelect,g.style.userSelect="none",g.style.webkitUserSelect="none",()=>{g.style.userSelect=Ji,g.style.webkitUserSelect=Ji}}},[m]),d.useEffect(()=>{if(f.current){const g=()=>{p(!1),c.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var h;((h=document.getSelection())==null?void 0:h.toString())!==""&&(c.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",g),()=>{document.removeEventListener("pointerup",g),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!1}}},[c.isPointerDownOnContentRef,c.hasSelectionRef]),d.useEffect(()=>{f.current&&yb(f.current).forEach(b=>b.setAttribute("tabindex","-1"))}),v.jsx(Jr,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:a,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:ie(i,g=>{g.preventDefault()}),onDismiss:c.onDismiss,children:v.jsx(os,{...l,...s,onPointerDown:ie(s.onPointerDown,g=>{g.currentTarget.contains(g.target)&&p(!0),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!0}),ref:u,style:{...s.style,userSelect:m?"text":void 0,WebkitUserSelect:m?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),gb="HoverCardArrow",bb=d.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,o=wi(n);return v.jsx(is,{...o,...r,ref:t})});bb.displayName=gb;function Zo(e){return t=>t.pointerType==="touch"?void 0:e()}function yb(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}var xb=Wd,wb=Ud,Cb=Gd,Zd=Yd;const Eb=xb,Sb=Cb,Rb=wb,qd=y.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},o)=>v.jsx(Zd,{ref:o,align:t,sideOffset:n,className:W(`
427
+ `,s===t?`univer-z-10 univer-ring-2 univer-ring-primary-500`:`univer-z-0`),style:{left:`${e.offset}%`,backgroundColor:e.color},onClick:e=>{e.stopPropagation(),u(t)},onPointerDown:n=>{let r=n.clientX,o=e.offset,s=e=>{if(!d.current)return;let n=d.current.getBoundingClientRect(),s=(e.clientX-r)/n.width*100,c=Math.max(0,Math.min(100,Math.round(o+s))),l=[...i.stops];l[t]={...l[t],offset:c},a==null||a({...i,stops:l})},c=()=>{window.removeEventListener(`pointermove`,s),window.removeEventListener(`pointerup`,c)};window.addEventListener(`pointermove`,s),window.addEventListener(`pointerup`,c)}},t))]}),(0,f.jsxs)(`div`,{className:`univer-flex univer-items-end univer-gap-2`,children:[(0,f.jsxs)(`div`,{className:`univer-flex-1`,children:[(0,f.jsx)(`div`,{className:`univer-mb-1 univer-text-xs univer-text-gray-500`,children:o==null?void 0:o.GradientColorPicker.offset}),(0,f.jsx)(mt,{value:(t=i.stops[s])==null?void 0:t.offset,min:0,max:100,onChange:_})]}),(i.type===`linear`||i.type===`angular`)&&(0,f.jsxs)(`div`,{className:`univer-flex-1`,children:[(0,f.jsx)(`div`,{className:`univer-mb-1 univer-text-xs univer-text-gray-500`,children:o==null?void 0:o.GradientColorPicker.angle}),(0,f.jsx)(mt,{value:i.angle,min:0,max:360,onChange:h})]}),(0,f.jsx)(`div`,{className:`univer-flex univer-gap-1`,children:(0,f.jsx)(gt,{title:o==null?void 0:o.GradientColorPicker.delete,children:(0,f.jsx)(j,{variant:`danger`,onClick:y,disabled:i.stops.length<=2,children:(0,f.jsx)(c.DeleteIcon,{})})})})]}),(0,f.jsx)(`div`,{className:`
428
+ univer-border-t univer-border-gray-100 univer-pt-4
429
+ dark:!univer-border-gray-700
430
+ `,children:(0,f.jsx)(Le,{value:(n=i.stops[s])==null?void 0:n.color,onChange:g})})]})}const yt=b.Root,bt=b.Portal,xt=b.Trigger,St=(0,l.forwardRef)(({className:e,align:t=`center`,sideOffset:n=4,...r},i)=>(0,f.jsx)(b.Content,{ref:i,align:t,sideOffset:n,className:T(`
243
431
  data-[state=open]:univer-animate-in data-[state=open]:univer-fade-in-0 data-[state=open]:univer-zoom-in-95
244
432
  data-[state=closed]:univer-animate-out data-[state=closed]:univer-fade-out-0
245
433
  data-[state=closed]:univer-zoom-out-95
@@ -250,17 +438,14 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
250
438
  univer-z-[1080] univer-w-64 univer-origin-[--radix-hover-card-content-transform-origin] univer-rounded-md
251
439
  univer-bg-white univer-text-gray-900 univer-shadow-md univer-outline-none
252
440
  dark:!univer-bg-gray-900 dark:!univer-text-white
253
- `,ct,e),...r}));qd.displayName=Zd.displayName;function Mb(e){const{children:t,overlay:n,disabled:r,openDelay:o=200,open:i,onOpenChange:a,...s}=e,[c,l]=y.useState(!1),f=i!==void 0,u=f?i:c;function m(p){r||(f||l(p),a==null||a(p))}return v.jsxs(Eb,{open:u,onOpenChange:m,openDelay:o,children:[v.jsx(Rb,{asChild:!0,children:t}),v.jsx(Sb,{children:v.jsx(qd,{...s,children:n})})]})}function Nb(e){const{keyboard:t,className:n}=e,r=t.split("+");return v.jsx("span",{className:W("univer-inline-block univer-h-6 univer-select-none univer-whitespace-nowrap univer-rounded-md univer-bg-gray-50 univer-px-2 univer-font-mono univer-text-xs/6 univer-font-medium univer-text-gray-700 dark:!univer-bg-gray-700 dark:!univer-text-white",ct,n),children:r.map((o,i)=>v.jsxs(v.Fragment,{children:[v.jsx("kbd",{className:"univer-inline-block univer-h-full",children:o}),i<r.length-1&&v.jsx("span",{className:"univer-inline-block univer-h-full univer-px-1",children:"+"})]},i))})}function Me(){return Me=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Me.apply(null,arguments)}function lt(e){"@babel/helpers - typeof";return lt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lt(e)}function Pb(e,t){if(lt(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(lt(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Xd(e){var t=Pb(e,"string");return lt(t)=="symbol"?t:t+""}function me(e,t,n){return(t=Xd(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function du(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Z(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?du(Object(n),!0).forEach(function(r){me(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):du(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ha(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function kb(e){if(Array.isArray(e))return ha(e)}function _b(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Qd(e,t){if(e){if(typeof e=="string")return ha(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ha(e,t):void 0}}function Ib(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
254
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Yt(e){return kb(e)||_b(e)||Qd(e)||Ib()}function Db(e){if(Array.isArray(e))return e}function Ab(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,i,a,s=[],c=!0,l=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(f){l=!0,o=f}finally{try{if(!c&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}function Tb(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
255
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function te(e,t){return Db(e)||Ab(e,t)||Qd(e,t)||Tb()}function bs(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Qe(e,t){if(e==null)return{};var n,r,o=bs(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var ea={exports:{}};var fu;function Ob(){return fu||(fu=1,(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var i="",a=0;a<arguments.length;a++){var s=arguments[a];s&&(i=o(i,r(s)))}return i}function r(i){if(typeof i=="string"||typeof i=="number")return i;if(typeof i!="object")return"";if(Array.isArray(i))return n.apply(null,i);if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]"))return i.toString();var a="";for(var s in i)t.call(i,s)&&i[s]&&(a=o(a,s));return a}function o(i,a){return a?i?i+" "+a:i+a:i}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(ea)),ea.exports}var jb=Ob();const at=Sl(jb);var Lb=Symbol.for("react.element"),$b=Symbol.for("react.transitional.element"),Fb=Symbol.for("react.fragment");function Jd(e){return e&&lt(e)==="object"&&(e.$$typeof===Lb||e.$$typeof===$b)&&e.type===Fb}function qo(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[];return y.Children.forEach(e,function(r){r==null&&!t.keepEmpty||(Array.isArray(r)?n=n.concat(qo(r)):Jd(r)&&r.props?n=n.concat(qo(r.props.children,t)):n.push(r))}),n}var ga={},zb=function(t){};function Bb(e,t){}function Hb(e,t){}function Vb(){ga={}}function ef(e,t,n){!t&&!ga[n]&&(e(!1,n),ga[n]=!0)}function Rr(e,t){ef(Bb,e,t)}function Wb(e,t){ef(Hb,e,t)}Rr.preMessage=zb;Rr.resetWarned=Vb;Rr.noteOnce=Wb;function Yr(e){return e instanceof HTMLElement||e instanceof SVGElement}function Kb(e){return e&&lt(e)==="object"&&Yr(e.nativeElement)?e.nativeElement:Yr(e)?e:null}function Ao(e){var t=Kb(e);if(t)return t;if(e instanceof y.Component){var n;return(n=ut.findDOMNode)===null||n===void 0?void 0:n.call(ut,e)}return null}var ta={exports:{}},Se={};var vu;function Ub(){if(vu)return Se;vu=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),a=Symbol.for("react.context"),s=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),g;g=Symbol.for("react.module.reference");function b(h){if(typeof h=="object"&&h!==null){var x=h.$$typeof;switch(x){case e:switch(h=h.type,h){case n:case o:case r:case l:case f:return h;default:switch(h=h&&h.$$typeof,h){case s:case a:case c:case m:case u:case i:return h;default:return x}}case t:return x}}}return Se.ContextConsumer=a,Se.ContextProvider=i,Se.Element=e,Se.ForwardRef=c,Se.Fragment=n,Se.Lazy=m,Se.Memo=u,Se.Portal=t,Se.Profiler=o,Se.StrictMode=r,Se.Suspense=l,Se.SuspenseList=f,Se.isAsyncMode=function(){return!1},Se.isConcurrentMode=function(){return!1},Se.isContextConsumer=function(h){return b(h)===a},Se.isContextProvider=function(h){return b(h)===i},Se.isElement=function(h){return typeof h=="object"&&h!==null&&h.$$typeof===e},Se.isForwardRef=function(h){return b(h)===c},Se.isFragment=function(h){return b(h)===n},Se.isLazy=function(h){return b(h)===m},Se.isMemo=function(h){return b(h)===u},Se.isPortal=function(h){return b(h)===t},Se.isProfiler=function(h){return b(h)===o},Se.isStrictMode=function(h){return b(h)===r},Se.isSuspense=function(h){return b(h)===l},Se.isSuspenseList=function(h){return b(h)===f},Se.isValidElementType=function(h){return typeof h=="string"||typeof h=="function"||h===n||h===o||h===r||h===l||h===f||h===p||typeof h=="object"&&h!==null&&(h.$$typeof===m||h.$$typeof===u||h.$$typeof===i||h.$$typeof===a||h.$$typeof===c||h.$$typeof===g||h.getModuleId!==void 0)},Se.typeOf=b,Se}var mu;function Gb(){return mu||(mu=1,ta.exports=Ub()),ta.exports}var na=Gb();function tf(e,t,n){var r=d.useRef({});return(!("value"in r.current)||n(r.current.condition,t))&&(r.current.value=e(),r.current.condition=t),r.current.value}var Yb=Number(y.version.split(".")[0]),ys=function(t,n){typeof t=="function"?t(n):lt(t)==="object"&&t&&"current"in t&&(t.current=n)},nf=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=n.filter(Boolean);return o.length<=1?o[0]:function(i){n.forEach(function(a){ys(a,i)})}},Ei=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return tf(function(){return nf.apply(void 0,n)},n,function(o,i){return o.length!==i.length||o.every(function(a,s){return a!==i[s]})})},Si=function(t){var n,r;if(!t)return!1;if(rf(t)&&Yb>=19)return!0;var o=na.isMemo(t)?t.type.type:t.type;return!(typeof o=="function"&&!((n=o.prototype)!==null&&n!==void 0&&n.render)&&o.$$typeof!==na.ForwardRef||typeof t=="function"&&!((r=t.prototype)!==null&&r!==void 0&&r.render)&&t.$$typeof!==na.ForwardRef)};function rf(e){return y.isValidElement(e)&&!Jd(e)}var xs=function(t){if(t&&rf(t)){var n=t;return n.props.propertyIsEnumerable("ref")?n.props.ref:n.ref}return null},ba=d.createContext(null);function Zb(e){var t=e.children,n=e.onBatchResize,r=d.useRef(0),o=d.useRef([]),i=d.useContext(ba),a=d.useCallback(function(s,c,l){r.current+=1;var f=r.current;o.current.push({size:s,element:c,data:l}),Promise.resolve().then(function(){f===r.current&&(n==null||n(o.current),o.current=[])}),i==null||i(s,c,l)},[n,i]);return d.createElement(ba.Provider,{value:a},t)}var of=(function(){if(typeof Map<"u")return Map;function e(t,n){var r=-1;return t.some(function(o,i){return o[0]===n?(r=i,!0):!1}),r}return(function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(n){var r=e(this.__entries__,n),o=this.__entries__[r];return o&&o[1]},t.prototype.set=function(n,r){var o=e(this.__entries__,n);~o?this.__entries__[o][1]=r:this.__entries__.push([n,r])},t.prototype.delete=function(n){var r=this.__entries__,o=e(r,n);~o&&r.splice(o,1)},t.prototype.has=function(n){return!!~e(this.__entries__,n)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(n,r){r===void 0&&(r=null);for(var o=0,i=this.__entries__;o<i.length;o++){var a=i[o];n.call(r,a[1],a[0])}},t})()})(),ya=typeof window<"u"&&typeof document<"u"&&window.document===document,Xo=(function(){return typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")()})(),qb=(function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(Xo):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}})(),Xb=2;function Qb(e,t){var n=!1,r=!1,o=0;function i(){n&&(n=!1,e()),r&&s()}function a(){qb(i)}function s(){var c=Date.now();if(n){if(c-o<Xb)return;r=!0}else n=!0,r=!1,setTimeout(a,t);o=c}return s}var Jb=20,ey=["top","right","bottom","left","width","height","size","weight"],ty=typeof MutationObserver<"u",ny=(function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=Qb(this.refresh.bind(this),Jb)}return e.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},e.prototype.removeObserver=function(t){var n=this.observers_,r=n.indexOf(t);~r&&n.splice(r,1),!n.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){var t=this.updateObservers_();t&&this.refresh()},e.prototype.updateObservers_=function(){var t=this.observers_.filter(function(n){return n.gatherActive(),n.hasActive()});return t.forEach(function(n){return n.broadcastActive()}),t.length>0},e.prototype.connect_=function(){!ya||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),ty?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!ya||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(t){var n=t.propertyName,r=n===void 0?"":n,o=ey.some(function(i){return!!~r.indexOf(i)});o&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e})(),af=(function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var o=r[n];Object.defineProperty(e,o,{value:t[o],enumerable:!1,writable:!1,configurable:!0})}return e}),gr=(function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView;return t||Xo}),sf=Ri(0,0,0,0);function Qo(e){return parseFloat(e)||0}function pu(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce(function(r,o){var i=e["border-"+o+"-width"];return r+Qo(i)},0)}function ry(e){for(var t=["top","right","bottom","left"],n={},r=0,o=t;r<o.length;r++){var i=o[r],a=e["padding-"+i];n[i]=Qo(a)}return n}function oy(e){var t=e.getBBox();return Ri(0,0,t.width,t.height)}function iy(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return sf;var r=gr(e).getComputedStyle(e),o=ry(r),i=o.left+o.right,a=o.top+o.bottom,s=Qo(r.width),c=Qo(r.height);if(r.boxSizing==="border-box"&&(Math.round(s+i)!==t&&(s-=pu(r,"left","right")+i),Math.round(c+a)!==n&&(c-=pu(r,"top","bottom")+a)),!sy(e)){var l=Math.round(s+i)-t,f=Math.round(c+a)-n;Math.abs(l)!==1&&(s-=l),Math.abs(f)!==1&&(c-=f)}return Ri(o.left,o.top,s,c)}var ay=(function(){return typeof SVGGraphicsElement<"u"?function(e){return e instanceof gr(e).SVGGraphicsElement}:function(e){return e instanceof gr(e).SVGElement&&typeof e.getBBox=="function"}})();function sy(e){return e===gr(e).document.documentElement}function uy(e){return ya?ay(e)?oy(e):iy(e):sf}function ly(e){var t=e.x,n=e.y,r=e.width,o=e.height,i=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,a=Object.create(i.prototype);return af(a,{x:t,y:n,width:r,height:o,top:n,right:t+r,bottom:o+n,left:t}),a}function Ri(e,t,n,r){return{x:e,y:t,width:n,height:r}}var cy=(function(){function e(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Ri(0,0,0,0),this.target=t}return e.prototype.isActive=function(){var t=uy(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},e})(),dy=(function(){function e(t,n){var r=ly(n);af(this,{target:t,contentRect:r})}return e})(),fy=(function(){function e(t,n,r){if(this.activeObservations_=[],this.observations_=new of,typeof t!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=n,this.callbackCtx_=r}return e.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof gr(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)||(n.set(t,new cy(t)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof gr(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)&&(n.delete(t),n.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(n){n.isActive()&&t.activeObservations_.push(n)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,n=this.activeObservations_.map(function(r){return new dy(r.target,r.broadcastRect())});this.callback_.call(t,n,t),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e})(),uf=typeof WeakMap<"u"?new WeakMap:new of,lf=(function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=ny.getInstance(),r=new fy(t,n,this);uf.set(this,r)}return e})();["observe","unobserve","disconnect"].forEach(function(e){lf.prototype[e]=function(){var t;return(t=uf.get(this))[e].apply(t,arguments)}});var vy=(function(){return typeof Xo.ResizeObserver<"u"?Xo.ResizeObserver:lf})(),Pn=new Map;function my(e){e.forEach(function(t){var n,r=t.target;(n=Pn.get(r))===null||n===void 0||n.forEach(function(o){return o(r)})})}var cf=new vy(my);function py(e,t){Pn.has(e)||(Pn.set(e,new Set),cf.observe(e)),Pn.get(e).add(t)}function hy(e,t){Pn.has(e)&&(Pn.get(e).delete(t),Pn.get(e).size||(cf.unobserve(e),Pn.delete(e)))}function Mi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Xd(r.key),r)}}function Ni(e,t,n){return t&&hu(e.prototype,t),n&&hu(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Jo(e,t){return Jo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Jo(e,t)}function Pi(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Jo(e,t)}function ei(e){return ei=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ei(e)}function df(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(df=function(){return!!e})()}function xa(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gy(e,t){if(t&&(lt(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return xa(e)}function ki(e){var t=df();return function(){var n,r=ei(e);if(t){var o=ei(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return gy(this,n)}}var by=(function(e){Pi(n,e);var t=ki(n);function n(){return Mi(this,n),t.apply(this,arguments)}return Ni(n,[{key:"render",value:function(){return this.props.children}}]),n})(d.Component);function yy(e,t){var n=e.children,r=e.disabled,o=d.useRef(null),i=d.useRef(null),a=d.useContext(ba),s=typeof n=="function",c=s?n(o):n,l=d.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),f=!s&&d.isValidElement(c)&&Si(c),u=f?xs(c):null,m=Ei(u,o),p=function(){var x;return Ao(o.current)||(o.current&&lt(o.current)==="object"?Ao((x=o.current)===null||x===void 0?void 0:x.nativeElement):null)||Ao(i.current)};d.useImperativeHandle(t,function(){return p()});var g=d.useRef(e);g.current=e;var b=d.useCallback(function(h){var x=g.current,E=x.onResize,w=x.data,C=h.getBoundingClientRect(),S=C.width,R=C.height,L=h.offsetWidth,D=h.offsetHeight,H=Math.floor(S),k=Math.floor(R);if(l.current.width!==H||l.current.height!==k||l.current.offsetWidth!==L||l.current.offsetHeight!==D){var T={width:H,height:k,offsetWidth:L,offsetHeight:D};l.current=T;var F=L===Math.round(S)?S:L,z=D===Math.round(R)?R:D,A=Z(Z({},T),{},{offsetWidth:F,offsetHeight:z});a==null||a(A,h,w),E&&Promise.resolve().then(function(){E(A,h)})}},[]);return d.useEffect(function(){var h=p();return h&&!r&&py(h,b),function(){return hy(h,b)}},[o.current,r]),d.createElement(by,{ref:i},f?d.cloneElement(c,{ref:m}):c)}var xy=d.forwardRef(yy),wy="rc-observer-key";function Cy(e,t){var n=e.children,r=typeof n=="function"?[n]:qo(n);return r.map(function(o,i){var a=(o==null?void 0:o.key)||"".concat(wy,"-").concat(i);return d.createElement(xy,Me({},e,{key:a,ref:i===0?t:void 0}),o)})}var so=d.forwardRef(Cy);so.Collection=Zb;function dn(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var gu=dn()?d.useLayoutEffect:d.useEffect,mt=function(t,n){var r=d.useRef(!0);gu(function(){return t(r.current)},n),gu(function(){return r.current=!1,function(){r.current=!0}},[])},bu=function(t,n){mt(function(r){if(!r)return t()},n)},Ey=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],or=void 0;function Sy(e,t){var n=e.prefixCls,r=e.invalidate,o=e.item,i=e.renderItem,a=e.responsive,s=e.responsiveDisabled,c=e.registerSize,l=e.itemKey,f=e.className,u=e.style,m=e.children,p=e.display,g=e.order,b=e.component,h=b===void 0?"div":b,x=Qe(e,Ey),E=a&&!p;function w(D){c(l,D)}d.useEffect(function(){return function(){w(null)}},[]);var C=i&&o!==or?i(o,{index:g}):m,S;r||(S={opacity:E?0:1,height:E?0:or,overflowY:E?"hidden":or,order:a?g:or,pointerEvents:E?"none":or,position:E?"absolute":or});var R={};E&&(R["aria-hidden"]=!0);var L=d.createElement(h,Me({className:at(!r&&n,f),style:Z(Z({},S),u)},R,x,{ref:t}),C);return a&&(L=d.createElement(so,{onResize:function(H){var k=H.offsetWidth;w(k)},disabled:s},L)),L}var Br=d.forwardRef(Sy);Br.displayName="Item";function xt(e){var t=d.useRef();t.current=e;var n=d.useCallback(function(){for(var r,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return(r=t.current)===null||r===void 0?void 0:r.call.apply(r,[t].concat(i))},[]);return n}var ff=function(t){return+setTimeout(t,16)},vf=function(t){return clearTimeout(t)};typeof window<"u"&&"requestAnimationFrame"in window&&(ff=function(t){return window.requestAnimationFrame(t)},vf=function(t){return window.cancelAnimationFrame(t)});var yu=0,ws=new Map;function mf(e){ws.delete(e)}var an=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;yu+=1;var r=yu;function o(i){if(i===0)mf(r),t();else{var a=ff(function(){o(i-1)});ws.set(r,a)}}return o(n),r};an.cancel=function(e){var t=ws.get(e);return mf(e),vf(t)};function Ry(e){if(typeof MessageChannel>"u")an(e);else{var t=new MessageChannel;t.port1.onmessage=function(){return e()},t.port2.postMessage(void 0)}}function My(){var e=d.useRef(null),t=function(r){e.current||(e.current=[],Ry(function(){ut.unstable_batchedUpdates(function(){e.current.forEach(function(o){o()}),e.current=null})})),e.current.push(r)};return t}function Ar(e,t){var n=d.useState(t),r=te(n,2),o=r[0],i=r[1],a=xt(function(s){e(function(){i(s)})});return[o,a]}var ti=y.createContext(null),Ny=["component"],Py=["className"],ky=["className"],_y=function(t,n){var r=d.useContext(ti);if(!r){var o=t.component,i=o===void 0?"div":o,a=Qe(t,Ny);return d.createElement(i,Me({},a,{ref:n}))}var s=r.className,c=Qe(r,Py),l=t.className,f=Qe(t,ky);return d.createElement(ti.Provider,{value:null},d.createElement(Br,Me({ref:n,className:at(s,l)},c,f)))},pf=d.forwardRef(_y);pf.displayName="RawItem";var Iy=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],hf="responsive",gf="invalidate";function Dy(e){return"+ ".concat(e.length," ...")}function Ay(e,t){var n=e.prefixCls,r=n===void 0?"rc-overflow":n,o=e.data,i=o===void 0?[]:o,a=e.renderItem,s=e.renderRawItem,c=e.itemKey,l=e.itemWidth,f=l===void 0?10:l,u=e.ssr,m=e.style,p=e.className,g=e.maxCount,b=e.renderRest,h=e.renderRawRest,x=e.suffix,E=e.component,w=E===void 0?"div":E,C=e.itemComponent,S=e.onVisibleChange,R=Qe(e,Iy),L=u==="full",D=My(),H=Ar(D,null),k=te(H,2),T=k[0],F=k[1],z=T||0,A=Ar(D,new Map),_=te(A,2),M=_[0],I=_[1],N=Ar(D,0),P=te(N,2),j=P[0],B=P[1],K=Ar(D,0),$=te(K,2),O=$[0],V=$[1],U=Ar(D,0),oe=te(U,2),G=oe[0],q=oe[1],ne=y.useState(null),ae=te(ne,2),ue=ae[0],he=ae[1],xe=y.useState(null),ge=te(xe,2),Ne=ge[0],ke=ge[1],be=d.useMemo(function(){return Ne===null&&L?Number.MAX_SAFE_INTEGER:Ne||0},[Ne,T]),ye=y.useState(!1),Le=te(ye,2),le=Le[0],ce=Le[1],re="".concat(r,"-item"),Je=Math.max(j,O),Fe=g===hf,pe=i.length&&Fe,et=g===gf,tt=pe||typeof g=="number"&&i.length>g,Oe=y.useMemo(function(){var J=i;return pe?T===null&&L?J=i:J=i.slice(0,Math.min(i.length,z/f)):typeof g=="number"&&(J=i.slice(0,g)),J},[i,f,T,g,pe]),He=y.useMemo(function(){return pe?i.slice(be+1):i.slice(Oe.length)},[i,Oe,pe,be]),Ve=y.useCallback(function(J,ee){var Y;return typeof c=="function"?c(J):(Y=c&&(J==null?void 0:J[c]))!==null&&Y!==void 0?Y:ee},[c]),_e=y.useCallback(a||function(J){return J},[a]);function Ae(J,ee,Y){Ne===J&&(ee===void 0||ee===ue)||(ke(J),Y||(ce(J<i.length-1),S==null||S(J)),ee!==void 0&&he(ee))}function Re(J,ee){F(ee.clientWidth)}function Be(J,ee){I(function(Y){var ve=new Map(Y);return ee===null?ve.delete(J):ve.set(J,ee),ve})}function Ie(J,ee){V(ee),B(O)}function nt(J,ee){q(ee)}function Ye(J){return M.get(Ve(Oe[J],J))}mt(function(){if(z&&typeof Je=="number"&&Oe){var J=G,ee=Oe.length,Y=ee-1;if(!ee){Ae(0,null);return}for(var ve=0;ve<ee;ve+=1){var We=Ye(ve);if(L&&(We=We||0),We===void 0){Ae(ve-1,void 0,!0);break}if(J+=We,Y===0&&J<=z||ve===Y-1&&J+Ye(Y)<=z){Ae(Y,null);break}else if(J+Je>z){Ae(ve-1,J-We-G+O);break}}x&&Ye(0)+G>z&&he(null)}},[z,M,O,G,Ve,Oe]);var rt=le&&!!He.length,Pt={};ue!==null&&pe&&(Pt={position:"absolute",left:ue,top:0});var ft={prefixCls:re,responsive:pe,component:C,invalidate:et},jt=s?function(J,ee){var Y=Ve(J,ee);return d.createElement(ti.Provider,{key:Y,value:Z(Z({},ft),{},{order:ee,item:J,itemKey:Y,registerSize:Be,display:ee<=be})},s(J,ee))}:function(J,ee){var Y=Ve(J,ee);return d.createElement(Br,Me({},ft,{order:ee,key:Y,item:J,renderItem:_e,itemKey:Y,registerSize:Be,display:ee<=be}))},Ze={order:rt?be:Number.MAX_SAFE_INTEGER,className:"".concat(re,"-rest"),registerSize:Ie,display:rt},X=b||Dy,Ce=h?d.createElement(ti.Provider,{value:Z(Z({},ft),Ze)},h(He)):d.createElement(Br,Me({},ft,Ze),typeof X=="function"?X(He):X),fe=d.createElement(w,Me({className:at(!et&&r,p),style:m,ref:t},R),Oe.map(jt),tt?Ce:null,x&&d.createElement(Br,Me({},ft,{responsive:Fe,responsiveDisabled:!pe,order:be,className:"".concat(re,"-suffix"),registerSize:nt,display:!0,style:Pt}),x));return Fe?d.createElement(so,{onResize:Re,disabled:!pe},fe):fe}var sn=d.forwardRef(Ay);sn.displayName="Overflow";sn.Item=pf;sn.RESPONSIVE=hf;sn.INVALIDATE=gf;function Zr(e){var t=d.useRef(!1),n=d.useState(e),r=te(n,2),o=r[0],i=r[1];d.useEffect(function(){return t.current=!1,function(){t.current=!0}},[]);function a(s,c){c&&t.current||i(s)}return[o,a]}function ra(e){return e!==void 0}function To(e,t){var n=t||{},r=n.defaultValue,o=n.value,i=n.onChange,a=n.postState,s=Zr(function(){return ra(o)?o:ra(r)?typeof r=="function"?r():r:typeof e=="function"?e():e}),c=te(s,2),l=c[0],f=c[1],u=o!==void 0?o:l,m=a?a(u):u,p=xt(i),g=Zr([u]),b=te(g,2),h=b[0],x=b[1];bu(function(){var w=h[0];l!==w&&p(l,w)},[h]),bu(function(){ra(o)||f(o)},[o]);var E=xt(function(w,C){f(w,C),x([u],C)});return[m,E]}function bf(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=new Set;function o(i,a){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,c=r.has(i);if(Rr(!c,"Warning: There may be circular references"),c)return!1;if(i===a)return!0;if(n&&s>1)return!1;r.add(i);var l=s+1;if(Array.isArray(i)){if(!Array.isArray(a)||i.length!==a.length)return!1;for(var f=0;f<i.length;f++)if(!o(i[f],a[f],l))return!1;return!0}if(i&&a&&lt(i)==="object"&&lt(a)==="object"){var u=Object.keys(i);return u.length!==Object.keys(a).length?!1:u.every(function(m){return o(i[m],a[m],l)})}return!1}return o(e,t)}var yf=d.createContext(null);function xf(e,t){return e===void 0?null:"".concat(e,"-").concat(t)}function wf(e){var t=d.useContext(yf);return xf(t,e)}var Ty=["children","locked"],Tt=d.createContext(null);function Oy(e,t){var n=Z({},e);return Object.keys(t).forEach(function(r){var o=t[r];o!==void 0&&(n[r]=o)}),n}function qr(e){var t=e.children,n=e.locked,r=Qe(e,Ty),o=d.useContext(Tt),i=tf(function(){return Oy(o,r)},[o,r],function(a,s){return!n&&(a[0]!==s[0]||!bf(a[1],s[1],!0))});return d.createElement(Tt.Provider,{value:i},t)}var jy=[],Cf=d.createContext(null);function _i(){return d.useContext(Cf)}var Ef=d.createContext(jy);function uo(e){var t=d.useContext(Ef);return d.useMemo(function(){return e!==void 0?[].concat(Yt(t),[e]):t},[t,e])}var Sf=d.createContext(null),Cs=d.createContext({});const Rf=(function(e){if(!e)return!1;if(e instanceof Element){if(e.offsetParent)return!0;if(e.getBBox){var t=e.getBBox(),n=t.width,r=t.height;if(n||r)return!0}if(e.getBoundingClientRect){var o=e.getBoundingClientRect(),i=o.width,a=o.height;if(i||a)return!0}}return!1});function xu(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(Rf(e)){var n=e.nodeName.toLowerCase(),r=["input","select","textarea","button"].includes(n)||e.isContentEditable||n==="a"&&!!e.getAttribute("href"),o=e.getAttribute("tabindex"),i=Number(o),a=null;return o&&!Number.isNaN(i)?a=i:r&&a===null&&(a=0),r&&e.disabled&&(a=null),a!==null&&(a>=0||t&&a<0)}return!1}function Ly(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=Yt(e.querySelectorAll("*")).filter(function(r){return xu(r,t)});return xu(e,t)&&n.unshift(e),n}var fn={ENTER:13,ESC:27,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40},wa=fn.LEFT,Ca=fn.RIGHT,Ea=fn.UP,Oo=fn.DOWN,jo=fn.ENTER,Mf=fn.ESC,Tr=fn.HOME,Or=fn.END,wu=[Ea,Oo,wa,Ca];function $y(e,t,n,r){var o,i="prev",a="next",s="children",c="parent";if(e==="inline"&&r===jo)return{inlineTrigger:!0};var l=me(me({},Ea,i),Oo,a),f=me(me(me(me({},wa,n?a:i),Ca,n?i:a),Oo,s),jo,s),u=me(me(me(me(me(me({},Ea,i),Oo,a),jo,s),Mf,c),wa,n?s:c),Ca,n?c:s),m={inline:l,horizontal:f,vertical:u,inlineSub:l,horizontalSub:u,verticalSub:u},p=(o=m["".concat(e).concat(t?"":"Sub")])===null||o===void 0?void 0:o[r];switch(p){case i:return{offset:-1,sibling:!0};case a:return{offset:1,sibling:!0};case c:return{offset:-1,sibling:!1};case s:return{offset:1,sibling:!1};default:return null}}function Fy(e){for(var t=e;t;){if(t.getAttribute("data-menu-list"))return t;t=t.parentElement}return null}function zy(e,t){for(var n=e||document.activeElement;n;){if(t.has(n))return n;n=n.parentElement}return null}function Es(e,t){var n=Ly(e,!0);return n.filter(function(r){return t.has(r)})}function Cu(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!e)return null;var o=Es(e,t),i=o.length,a=o.findIndex(function(s){return n===s});return r<0?a===-1?a=i-1:a-=1:r>0&&(a+=1),a=(a+i)%i,o[a]}var Sa=function(t,n){var r=new Set,o=new Map,i=new Map;return t.forEach(function(a){var s=document.querySelector("[data-menu-id='".concat(xf(n,a),"']"));s&&(r.add(s),i.set(s,a),o.set(a,s))}),{elements:r,key2element:o,element2key:i}};function By(e,t,n,r,o,i,a,s,c,l){var f=d.useRef(),u=d.useRef();u.current=t;var m=function(){an.cancel(f.current)};return d.useEffect(function(){return function(){m()}},[]),function(p){var g=p.which;if([].concat(wu,[jo,Mf,Tr,Or]).includes(g)){var b=i(),h=Sa(b,r),x=h,E=x.elements,w=x.key2element,C=x.element2key,S=w.get(t),R=zy(S,E),L=C.get(R),D=$y(e,a(L,!0).length===1,n,g);if(!D&&g!==Tr&&g!==Or)return;(wu.includes(g)||[Tr,Or].includes(g))&&p.preventDefault();var H=function(I){if(I){var N=I,P=I.querySelector("a");P!=null&&P.getAttribute("href")&&(N=P);var j=C.get(I);s(j),m(),f.current=an(function(){u.current===j&&N.focus()})}};if([Tr,Or].includes(g)||D.sibling||!R){var k;!R||e==="inline"?k=o.current:k=Fy(R);var T,F=Es(k,E);g===Tr?T=F[0]:g===Or?T=F[F.length-1]:T=Cu(k,E,R,D.offset),H(T)}else if(D.inlineTrigger)c(L);else if(D.offset>0)c(L,!0),m(),f.current=an(function(){h=Sa(b,r);var M=R.getAttribute("aria-controls"),I=document.getElementById(M),N=Cu(I,h.elements);H(N)},5);else if(D.offset<0){var z=a(L,!0),A=z[z.length-2],_=w.get(A);c(A,!1),H(_)}}l==null||l(p)}}function Hy(e){Promise.resolve().then(e)}var Ss="__RC_UTIL_PATH_SPLIT__",Eu=function(t){return t.join(Ss)},Vy=function(t){return t.split(Ss)},Ra="rc-menu-more";function Wy(){var e=d.useState({}),t=te(e,2),n=t[1],r=y.useRef(new Map),o=y.useRef(new Map),i=d.useState([]),a=te(i,2),s=a[0],c=a[1],l=y.useRef(0),f=y.useRef(!1),u=function(){f.current||n({})},m=y.useCallback(function(w,C){var S=Eu(C);o.current.set(S,w),r.current.set(w,S),l.current+=1;var R=l.current;Hy(function(){R===l.current&&u()})},[]),p=y.useCallback(function(w,C){var S=Eu(C);o.current.delete(S),r.current.delete(w)},[]),g=y.useCallback(function(w){c(w)},[]),b=y.useCallback(function(w,C){var S=r.current.get(w)||"",R=Vy(S);return C&&s.includes(R[0])&&R.unshift(Ra),R},[s]),h=y.useCallback(function(w,C){return w.filter(function(S){return S!==void 0}).some(function(S){var R=b(S,!0);return R.includes(C)})},[b]),x=function(){var C=Yt(r.current.keys());return s.length&&C.push(Ra),C},E=y.useCallback(function(w){var C="".concat(r.current.get(w)).concat(Ss),S=new Set;return Yt(o.current.keys()).forEach(function(R){R.startsWith(C)&&S.add(o.current.get(R))}),S},[]);return d.useEffect(function(){return function(){f.current=!0}},[]),{registerPath:m,unregisterPath:p,refreshOverflowKeys:g,isSubPathKey:h,getKeyPath:b,getKeys:x,getSubPathKeys:E}}function Fr(e){var t=d.useRef(e);t.current=e;var n=d.useCallback(function(){for(var r,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return(r=t.current)===null||r===void 0?void 0:r.call.apply(r,[t].concat(i))},[]);return e?n:void 0}var Ky=Math.random().toFixed(5).toString().slice(2),Su=0;function Uy(e){var t=To(e,{value:e}),n=te(t,2),r=n[0],o=n[1];return d.useEffect(function(){Su+=1;var i="".concat(Ky,"-").concat(Su);o("rc-menu-uuid-".concat(i))},[]),r}function Rs(e,t){var n=Object.assign({},e);return Array.isArray(t)&&t.forEach(function(r){delete n[r]}),n}function Nf(e,t,n,r){var o=d.useContext(Tt),i=o.activeKey,a=o.onActive,s=o.onInactive,c={active:i===e};return t||(c.onMouseEnter=function(l){n==null||n({key:e,domEvent:l}),a(e)},c.onMouseLeave=function(l){r==null||r({key:e,domEvent:l}),s(e)}),c}function Pf(e){var t=d.useContext(Tt),n=t.mode,r=t.rtl,o=t.inlineIndent;if(n!=="inline")return null;var i=e;return r?{paddingRight:i*o}:{paddingLeft:i*o}}function kf(e){var t=e.icon,n=e.props,r=e.children,o;return t===null||t===!1?null:(typeof t=="function"?o=d.createElement(t,Z({},n)):typeof t!="boolean"&&(o=t),o||r||null)}var Gy=["item"];function ni(e){var t=e.item,n=Qe(e,Gy);return Object.defineProperty(n,"item",{get:function(){return Rr(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),t}}),n}var Yy=["title","attribute","elementRef"],Zy=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],qy=["active"],Xy=(function(e){Pi(n,e);var t=ki(n);function n(){return Mi(this,n),t.apply(this,arguments)}return Ni(n,[{key:"render",value:function(){var o=this.props,i=o.title,a=o.attribute,s=o.elementRef,c=Qe(o,Yy),l=Rs(c,["eventKey","popupClassName","popupOffset","onTitleClick"]);return Rr(!a,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),d.createElement(sn.Item,Me({},a,{title:typeof i=="string"?i:void 0},l,{ref:s}))}}]),n})(d.Component),Qy=d.forwardRef(function(e,t){var n=e.style,r=e.className,o=e.eventKey;e.warnKey;var i=e.disabled,a=e.itemIcon,s=e.children,c=e.role,l=e.onMouseEnter,f=e.onMouseLeave,u=e.onClick,m=e.onKeyDown,p=e.onFocus,g=Qe(e,Zy),b=wf(o),h=d.useContext(Tt),x=h.prefixCls,E=h.onItemClick,w=h.disabled,C=h.overflowDisabled,S=h.itemIcon,R=h.selectedKeys,L=h.onActive,D=d.useContext(Cs),H=D._internalRenderMenuItem,k="".concat(x,"-item"),T=d.useRef(),F=d.useRef(),z=w||i,A=Ei(t,F),_=uo(o),M=function(q){return{key:o,keyPath:Yt(_).reverse(),item:T.current,domEvent:q}},I=a||S,N=Nf(o,z,l,f),P=N.active,j=Qe(N,qy),B=R.includes(o),K=Pf(_.length),$=function(q){if(!z){var ne=M(q);u==null||u(ni(ne)),E(ne)}},O=function(q){if(m==null||m(q),q.which===fn.ENTER){var ne=M(q);u==null||u(ni(ne)),E(ne)}},V=function(q){L(o),p==null||p(q)},U={};e.role==="option"&&(U["aria-selected"]=B);var oe=d.createElement(Xy,Me({ref:T,elementRef:A,role:c===null?"none":c||"menuitem",tabIndex:i?null:-1,"data-menu-id":C&&b?null:b},Rs(g,["extra"]),j,U,{component:"li","aria-disabled":i,style:Z(Z({},K),n),className:at(k,me(me(me({},"".concat(k,"-active"),P),"".concat(k,"-selected"),B),"".concat(k,"-disabled"),z),r),onClick:$,onKeyDown:O,onFocus:V}),s,d.createElement(kf,{props:Z(Z({},e),{},{isSelected:B}),icon:I}));return H&&(oe=H(oe,e,{selected:B})),oe});function Jy(e,t){var n=e.eventKey,r=_i(),o=uo(n);return d.useEffect(function(){if(r)return r.registerPath(n,o),function(){r.unregisterPath(n,o)}},[o]),r?null:d.createElement(Qy,Me({},e,{ref:t}))}const Ii=d.forwardRef(Jy);var ex=["className","children"],tx=function(t,n){var r=t.className,o=t.children,i=Qe(t,ex),a=d.useContext(Tt),s=a.prefixCls,c=a.mode,l=a.rtl;return d.createElement("ul",Me({className:at(s,l&&"".concat(s,"-rtl"),"".concat(s,"-sub"),"".concat(s,"-").concat(c==="inline"?"inline":"vertical"),r),role:"menu"},i,{"data-menu-list":!0,ref:n}),o)},Ms=d.forwardRef(tx);Ms.displayName="SubMenuList";function Ns(e,t){return qo(e).map(function(n,r){if(d.isValidElement(n)){var o,i,a=n.key,s=(o=(i=n.props)===null||i===void 0?void 0:i.eventKey)!==null&&o!==void 0?o:a,c=s==null;c&&(s="tmp_key-".concat([].concat(Yt(t),[r]).join("-")));var l={key:s,eventKey:s};return d.cloneElement(n,l)}return n})}var _f=d.createContext(null),Ru=[];function nx(e,t){var n=d.useState(function(){if(!dn())return null;var g=document.createElement("div");return g}),r=te(n,1),o=r[0],i=d.useRef(!1),a=d.useContext(_f),s=d.useState(Ru),c=te(s,2),l=c[0],f=c[1],u=a||(i.current?void 0:function(g){f(function(b){var h=[g].concat(Yt(b));return h})});function m(){o.parentElement||document.body.appendChild(o),i.current=!0}function p(){var g;(g=o.parentElement)===null||g===void 0||g.removeChild(o),i.current=!1}return mt(function(){return e?a?a(m):m():p(),p},[e]),mt(function(){l.length&&(l.forEach(function(g){return g()}),f(Ru))},[l]),[o,u]}function rx(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var n=t;n;){if(n===e)return!0;n=n.parentNode}return!1}var Mu="data-rc-order",Nu="data-rc-priority",ox="rc-util-key",Ma=new Map;function If(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.mark;return t?t.startsWith("data-")?t:"data-".concat(t):ox}function Di(e){if(e.attachTo)return e.attachTo;var t=document.querySelector("head");return t||document.body}function ix(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function Ps(e){return Array.from((Ma.get(e)||e).children).filter(function(t){return t.tagName==="STYLE"})}function Df(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!dn())return null;var n=t.csp,r=t.prepend,o=t.priority,i=o===void 0?0:o,a=ix(r),s=a==="prependQueue",c=document.createElement("style");c.setAttribute(Mu,a),s&&i&&c.setAttribute(Nu,"".concat(i)),n!=null&&n.nonce&&(c.nonce=n==null?void 0:n.nonce),c.innerHTML=e;var l=Di(t),f=l.firstChild;if(r){if(s){var u=(t.styles||Ps(l)).filter(function(m){if(!["prepend","prependQueue"].includes(m.getAttribute(Mu)))return!1;var p=Number(m.getAttribute(Nu)||0);return i>=p});if(u.length)return l.insertBefore(c,u[u.length-1].nextSibling),c}l.insertBefore(c,f)}else l.appendChild(c);return c}function Af(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=Di(t);return(t.styles||Ps(n)).find(function(r){return r.getAttribute(If(t))===e})}function Na(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=Af(e,t);if(n){var r=Di(t);r.removeChild(n)}}function ax(e,t){var n=Ma.get(e);if(!n||!rx(document,n)){var r=Df("",t),o=r.parentNode;Ma.set(e,o),e.removeChild(r)}}function Tf(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=Di(n),o=Ps(r),i=Z(Z({},n),{},{styles:o});ax(r,i);var a=Af(t,i);if(a){var s,c;if((s=i.csp)!==null&&s!==void 0&&s.nonce&&a.nonce!==((c=i.csp)===null||c===void 0?void 0:c.nonce)){var l;a.nonce=(l=i.csp)===null||l===void 0?void 0:l.nonce}return a.innerHTML!==e&&(a.innerHTML=e),a}var f=Df(e,i);return f.setAttribute(If(i),t),f}function sx(e){var t="rc-scrollbar-measure-".concat(Math.random().toString(36).substring(7)),n=document.createElement("div");n.id=t;var r=n.style;r.position="absolute",r.left="0",r.top="0",r.width="100px",r.height="100px",r.overflow="scroll";var o,i;if(e){var a=getComputedStyle(e);r.scrollbarColor=a.scrollbarColor,r.scrollbarWidth=a.scrollbarWidth;var s=getComputedStyle(e,"::-webkit-scrollbar"),c=parseInt(s.width,10),l=parseInt(s.height,10);try{var f=c?"width: ".concat(s.width,";"):"",u=l?"height: ".concat(s.height,";"):"";Tf(`
256
- #`.concat(t,`::-webkit-scrollbar {
257
- `).concat(f,`
258
- `).concat(u,`
259
- }`),t)}catch(g){console.error(g),o=c,i=l}}document.body.appendChild(n);var m=e&&o&&!isNaN(o)?o:n.offsetWidth-n.clientWidth,p=e&&i&&!isNaN(i)?i:n.offsetHeight-n.clientHeight;return document.body.removeChild(n),Na(t),{width:m,height:p}}function ux(e){return typeof document>"u"||!e||!(e instanceof Element)?{width:0,height:0}:sx(e)}function lx(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var cx="rc-util-locker-".concat(Date.now()),Pu=0;function dx(e){var t=!!e,n=d.useState(function(){return Pu+=1,"".concat(cx,"_").concat(Pu)}),r=te(n,1),o=r[0];mt(function(){if(t){var i=ux(document.body).width,a=lx();Tf(`
260
- html body {
261
- overflow-y: hidden;
262
- `.concat(a?"width: calc(100% - ".concat(i,"px);"):"",`
263
- }`),o)}else Na(o);return function(){Na(o)}},[t,o])}var fx=!1;function vx(e){return fx}var ku=function(t){return t===!1?!1:!dn()||!t?null:typeof t=="string"?document.querySelector(t):typeof t=="function"?t():t},Of=d.forwardRef(function(e,t){var n=e.open,r=e.autoLock,o=e.getContainer;e.debug;var i=e.autoDestroy,a=i===void 0?!0:i,s=e.children,c=d.useState(n),l=te(c,2),f=l[0],u=l[1],m=f||n;d.useEffect(function(){(a||n)&&u(n)},[n,a]);var p=d.useState(function(){return ku(o)}),g=te(p,2),b=g[0],h=g[1];d.useEffect(function(){var T=ku(o);h(T!=null?T:null)});var x=nx(m&&!b),E=te(x,2),w=E[0],C=E[1],S=b!=null?b:w;dx(r&&n&&dn()&&(S===w||S===document.body));var R=null;if(s&&Si(s)&&t){var L=s;R=L.ref}var D=Ei(R,t);if(!m||!dn()||b===void 0)return null;var H=S===!1||vx(),k=s;return t&&(k=d.cloneElement(s,{ref:D})),d.createElement(_f.Provider,{value:C},H?k:ut.createPortal(k,S))});function jf(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}function mx(e){return jf(e)instanceof ShadowRoot}function Pa(e){return mx(e)?jf(e):null}function px(){var e=Z({},d);return e.useId}var _u=0,Iu=px();const hx=Iu?(function(t){var n=Iu();return t||n}):(function(t){var n=d.useState("ssr-id"),r=te(n,2),o=r[0],i=r[1];return d.useEffect(function(){var a=_u;_u+=1,i("rc_unique_".concat(a))},[]),t||o}),gx=(function(){if(typeof navigator>"u"||typeof window>"u")return!1;var e=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(e==null?void 0:e.substr(0,4))});var bx=d.createContext({}),yx=(function(e){Pi(n,e);var t=ki(n);function n(){return Mi(this,n),t.apply(this,arguments)}return Ni(n,[{key:"render",value:function(){return this.props.children}}]),n})(d.Component);function xx(e){var t=d.useReducer(function(s){return s+1},0),n=te(t,2),r=n[1],o=d.useRef(e),i=xt(function(){return o.current}),a=xt(function(s){o.current=typeof s=="function"?s(o.current):s,r()});return[i,a]}var Mn="none",Co="appear",Eo="enter",So="leave",Du="none",It="prepare",ur="start",lr="active",ks="end",Lf="prepared";function Au(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit".concat(e)]="webkit".concat(t),n["Moz".concat(e)]="moz".concat(t),n["ms".concat(e)]="MS".concat(t),n["O".concat(e)]="o".concat(t.toLowerCase()),n}function wx(e,t){var n={animationend:Au("Animation","AnimationEnd"),transitionend:Au("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete n.animationend.animation,"TransitionEvent"in t||delete n.transitionend.transition),n}var Cx=wx(dn(),typeof window<"u"?window:{}),$f={};if(dn()){var Ex=document.createElement("div");$f=Ex.style}var Ro={};function Ff(e){if(Ro[e])return Ro[e];var t=Cx[e];if(t)for(var n=Object.keys(t),r=n.length,o=0;o<r;o+=1){var i=n[o];if(Object.prototype.hasOwnProperty.call(t,i)&&i in $f)return Ro[e]=t[i],Ro[e]}return""}var zf=Ff("animationend"),Bf=Ff("transitionend"),Hf=!!(zf&&Bf),Tu=zf||"animationend",Ou=Bf||"transitionend";function ju(e,t){if(!e)return null;if(lt(e)==="object"){var n=t.replace(/-\w/g,function(r){return r[1].toUpperCase()});return e[n]}return"".concat(e,"-").concat(t)}const Sx=(function(e){var t=y.useRef();function n(o){o&&(o.removeEventListener(Ou,e),o.removeEventListener(Tu,e))}function r(o){t.current&&t.current!==o&&n(t.current),o&&o!==t.current&&(o.addEventListener(Ou,e),o.addEventListener(Tu,e),t.current=o)}return d.useEffect(function(){return function(){n(t.current)}},[]),[r,n]});var Vf=dn()?y.useLayoutEffect:y.useEffect;const Rx=(function(){var e=d.useRef(null);function t(){an.cancel(e.current)}function n(r){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;t();var i=an(function(){o<=1?r({isCanceled:function(){return i!==e.current}}):n(r,o-1)});e.current=i}return d.useEffect(function(){return function(){t()}},[]),[n,t]});var Mx=[It,ur,lr,ks],Nx=[It,Lf],Wf=!1,Px=!0;function Kf(e){return e===lr||e===ks}const kx=(function(e,t,n){var r=Zr(Du),o=te(r,2),i=o[0],a=o[1],s=Rx(),c=te(s,2),l=c[0],f=c[1];function u(){a(It,!0)}var m=t?Nx:Mx;return Vf(function(){if(i!==Du&&i!==ks){var p=m.indexOf(i),g=m[p+1],b=n(i);b===Wf?a(g,!0):g&&l(function(h){function x(){h.isCanceled()||a(g,!0)}b===!0?x():Promise.resolve(b).then(x)})}},[e,i]),d.useEffect(function(){return function(){f()}},[]),[u,i]});function _x(e,t,n,r){var o=r.motionEnter,i=o===void 0?!0:o,a=r.motionAppear,s=a===void 0?!0:a,c=r.motionLeave,l=c===void 0?!0:c,f=r.motionDeadline,u=r.motionLeaveImmediately,m=r.onAppearPrepare,p=r.onEnterPrepare,g=r.onLeavePrepare,b=r.onAppearStart,h=r.onEnterStart,x=r.onLeaveStart,E=r.onAppearActive,w=r.onEnterActive,C=r.onLeaveActive,S=r.onAppearEnd,R=r.onEnterEnd,L=r.onLeaveEnd,D=r.onVisibleChanged,H=Zr(),k=te(H,2),T=k[0],F=k[1],z=xx(Mn),A=te(z,2),_=A[0],M=A[1],I=Zr(null),N=te(I,2),P=N[0],j=N[1],B=_(),K=y.useRef(!1),$=y.useRef(null);function O(){return n()}var V=y.useRef(!1);function U(){M(Mn),j(null,!0)}var oe=xt(function(le){var ce=_();if(ce!==Mn){var re=O();if(!(le&&!le.deadline&&le.target!==re)){var Je=V.current,Fe;ce===Co&&Je?Fe=S==null?void 0:S(re,le):ce===Eo&&Je?Fe=R==null?void 0:R(re,le):ce===So&&Je&&(Fe=L==null?void 0:L(re,le)),Je&&Fe!==!1&&U()}}}),G=Sx(oe),q=te(G,1),ne=q[0],ae=function(ce){switch(ce){case Co:return me(me(me({},It,m),ur,b),lr,E);case Eo:return me(me(me({},It,p),ur,h),lr,w);case So:return me(me(me({},It,g),ur,x),lr,C);default:return{}}},ue=d.useMemo(function(){return ae(B)},[B]),he=kx(B,!e,function(le){if(le===It){var ce=ue[It];return ce?ce(O()):Wf}if(Ne in ue){var re;j(((re=ue[Ne])===null||re===void 0?void 0:re.call(ue,O(),null))||null)}return Ne===lr&&B!==Mn&&(ne(O()),f>0&&(clearTimeout($.current),$.current=setTimeout(function(){oe({deadline:!0})},f))),Ne===Lf&&U(),Px}),xe=te(he,2),ge=xe[0],Ne=xe[1],ke=Kf(Ne);V.current=ke;var be=y.useRef(null);Vf(function(){if(!(K.current&&be.current===t)){F(t);var le=K.current;K.current=!0;var ce;!le&&t&&s&&(ce=Co),le&&t&&i&&(ce=Eo),(le&&!t&&l||!le&&u&&!t&&l)&&(ce=So);var re=ae(ce);ce&&(e||re[It])?(M(ce),ge()):M(Mn),be.current=t}},[t]),y.useEffect(function(){(B===Co&&!s||B===Eo&&!i||B===So&&!l)&&M(Mn)},[s,i,l]),y.useEffect(function(){return function(){K.current=!1,clearTimeout($.current)}},[]);var ye=d.useRef(!1);y.useEffect(function(){T&&(ye.current=!0),T!==void 0&&B===Mn&&((ye.current||T)&&(D==null||D(T)),ye.current=!0)},[T,B]);var Le=P;return ue[It]&&Ne===ur&&(Le=Z({transition:"none"},Le)),[B,Ne,Le,T!=null?T:t]}function Ix(e){var t=e;lt(e)==="object"&&(t=e.transitionSupport);function n(o,i){return!!(o.motionName&&t&&i!==!1)}var r=d.forwardRef(function(o,i){var a=o.visible,s=a===void 0?!0:a,c=o.removeOnLeave,l=c===void 0?!0:c,f=o.forceRender,u=o.children,m=o.motionName,p=o.leavedClassName,g=o.eventProps,b=d.useContext(bx),h=b.motion,x=n(o,h),E=y.useRef(),w=y.useRef();function C(){try{return E.current instanceof HTMLElement?E.current:Ao(w.current)}catch{return null}}var S=_x(x,s,C,o),R=te(S,4),L=R[0],D=R[1],H=R[2],k=R[3],T=d.useRef(k);k&&(T.current=!0);var F=d.useCallback(function(N){E.current=N,ys(i,N)},[i]),z,A=Z(Z({},g),{},{visible:s});if(!u)z=null;else if(L===Mn)k?z=u(Z({},A),F):!l&&T.current&&p?z=u(Z(Z({},A),{},{className:p}),F):f||!l&&!p?z=u(Z(Z({},A),{},{style:{display:"none"}}),F):z=null;else{var _;D===It?_="prepare":Kf(D)?_="active":D===ur&&(_="start");var M=ju(m,"".concat(L,"-").concat(_));z=u(Z(Z({},A),{},{className:at(ju(m,L),me(me({},M,M&&_),m,typeof m=="string")),style:H}),F)}if(d.isValidElement(z)&&Si(z)){var I=xs(z);I||(z=d.cloneElement(z,{ref:F}))}return d.createElement(yx,{ref:w},z)});return r.displayName="CSSMotion",r}const Ai=Ix(Hf);var ka="add",_a="keep",Ia="remove",oa="removed";function Dx(e){var t;return e&&lt(e)==="object"&&"key"in e?t=e:t={key:e},Z(Z({},t),{},{key:String(t.key)})}function Da(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return e.map(Dx)}function Ax(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=[],r=0,o=t.length,i=Da(e),a=Da(t);i.forEach(function(l){for(var f=!1,u=r;u<o;u+=1){var m=a[u];if(m.key===l.key){r<u&&(n=n.concat(a.slice(r,u).map(function(p){return Z(Z({},p),{},{status:ka})})),r=u),n.push(Z(Z({},m),{},{status:_a})),r+=1,f=!0;break}}f||n.push(Z(Z({},l),{},{status:Ia}))}),r<o&&(n=n.concat(a.slice(r).map(function(l){return Z(Z({},l),{},{status:ka})})));var s={};n.forEach(function(l){var f=l.key;s[f]=(s[f]||0)+1});var c=Object.keys(s).filter(function(l){return s[l]>1});return c.forEach(function(l){n=n.filter(function(f){var u=f.key,m=f.status;return u!==l||m!==Ia}),n.forEach(function(f){f.key===l&&(f.status=_a)})}),n}var Tx=["component","children","onVisibleChanged","onAllRemoved"],Ox=["status"],jx=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function Lx(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ai,n=(function(r){Pi(i,r);var o=ki(i);function i(){var a;Mi(this,i);for(var s=arguments.length,c=new Array(s),l=0;l<s;l++)c[l]=arguments[l];return a=o.call.apply(o,[this].concat(c)),me(xa(a),"state",{keyEntities:[]}),me(xa(a),"removeKey",function(f){a.setState(function(u){var m=u.keyEntities.map(function(p){return p.key!==f?p:Z(Z({},p),{},{status:oa})});return{keyEntities:m}},function(){var u=a.state.keyEntities,m=u.filter(function(p){var g=p.status;return g!==oa}).length;m===0&&a.props.onAllRemoved&&a.props.onAllRemoved()})}),a}return Ni(i,[{key:"render",value:function(){var s=this,c=this.state.keyEntities,l=this.props,f=l.component,u=l.children,m=l.onVisibleChanged;l.onAllRemoved;var p=Qe(l,Tx),g=f||d.Fragment,b={};return jx.forEach(function(h){b[h]=p[h],delete p[h]}),delete p.keys,d.createElement(g,p,c.map(function(h,x){var E=h.status,w=Qe(h,Ox),C=E===ka||E===_a;return d.createElement(t,Me({},b,{key:w.key,visible:C,eventProps:w,onVisibleChanged:function(R){m==null||m(R,{key:w.key}),R||s.removeKey(w.key)}}),function(S,R){return u(Z(Z({},S),{},{index:x}),R)})}))}}],[{key:"getDerivedStateFromProps",value:function(s,c){var l=s.keys,f=c.keyEntities,u=Da(l),m=Ax(f,u);return{keyEntities:m.filter(function(p){var g=f.find(function(b){var h=b.key;return p.key===h});return!(g&&g.status===oa&&p.status===Ia)})}}}]),i})(d.Component);return me(n,"defaultProps",{component:"div"}),n}Lx(Hf);function $x(e){var t=e.prefixCls,n=e.align,r=e.arrow,o=e.arrowPos,i=r||{},a=i.className,s=i.content,c=o.x,l=c===void 0?0:c,f=o.y,u=f===void 0?0:f,m=d.useRef();if(!n||!n.points)return null;var p={position:"absolute"};if(n.autoArrow!==!1){var g=n.points[0],b=n.points[1],h=g[0],x=g[1],E=b[0],w=b[1];h===E||!["t","b"].includes(h)?p.top=u:h==="t"?p.top=0:p.bottom=0,x===w||!["l","r"].includes(x)?p.left=l:x==="l"?p.left=0:p.right=0}return d.createElement("div",{ref:m,className:at("".concat(t,"-arrow"),a),style:p},s)}function Fx(e){var t=e.prefixCls,n=e.open,r=e.zIndex,o=e.mask,i=e.motion;return o?d.createElement(Ai,Me({},i,{motionAppear:!0,visible:n,removeOnLeave:!0}),function(a){var s=a.className;return d.createElement("div",{style:{zIndex:r},className:at("".concat(t,"-mask"),s)})}):null}var zx=d.memo(function(e){var t=e.children;return t},function(e,t){return t.cache}),Bx=d.forwardRef(function(e,t){var n=e.popup,r=e.className,o=e.prefixCls,i=e.style,a=e.target,s=e.onVisibleChanged,c=e.open,l=e.keepDom,f=e.fresh,u=e.onClick,m=e.mask,p=e.arrow,g=e.arrowPos,b=e.align,h=e.motion,x=e.maskMotion,E=e.forceRender,w=e.getPopupContainer,C=e.autoDestroy,S=e.portal,R=e.zIndex,L=e.onMouseEnter,D=e.onMouseLeave,H=e.onPointerEnter,k=e.onPointerDownCapture,T=e.ready,F=e.offsetX,z=e.offsetY,A=e.offsetR,_=e.offsetB,M=e.onAlign,I=e.onPrepare,N=e.stretch,P=e.targetWidth,j=e.targetHeight,B=typeof n=="function"?n():n,K=c||l,$=(w==null?void 0:w.length)>0,O=d.useState(!w||!$),V=te(O,2),U=V[0],oe=V[1];if(mt(function(){!U&&$&&a&&oe(!0)},[U,$,a]),!U)return null;var G="auto",q={left:"-1000vw",top:"-1000vh",right:G,bottom:G};if(T||!c){var ne,ae=b.points,ue=b.dynamicInset||((ne=b._experimental)===null||ne===void 0?void 0:ne.dynamicInset),he=ue&&ae[0][1]==="r",xe=ue&&ae[0][0]==="b";he?(q.right=A,q.left=G):(q.left=F,q.right=G),xe?(q.bottom=_,q.top=G):(q.top=z,q.bottom=G)}var ge={};return N&&(N.includes("height")&&j?ge.height=j:N.includes("minHeight")&&j&&(ge.minHeight=j),N.includes("width")&&P?ge.width=P:N.includes("minWidth")&&P&&(ge.minWidth=P)),c||(ge.pointerEvents="none"),d.createElement(S,{open:E||K,getContainer:w&&function(){return w(a)},autoDestroy:C},d.createElement(Fx,{prefixCls:o,open:c,zIndex:R,mask:m,motion:x}),d.createElement(so,{onResize:M,disabled:!c},function(Ne){return d.createElement(Ai,Me({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:E,leavedClassName:"".concat(o,"-hidden")},h,{onAppearPrepare:I,onEnterPrepare:I,visible:c,onVisibleChanged:function(be){var ye;h==null||(ye=h.onVisibleChanged)===null||ye===void 0||ye.call(h,be),s(be)}}),function(ke,be){var ye=ke.className,Le=ke.style,le=at(o,ye,r);return d.createElement("div",{ref:nf(Ne,t,be),className:le,style:Z(Z(Z(Z({"--arrow-x":"".concat(g.x||0,"px"),"--arrow-y":"".concat(g.y||0,"px")},q),ge),Le),{},{boxSizing:"border-box",zIndex:R},i),onMouseEnter:L,onMouseLeave:D,onPointerEnter:H,onClick:u,onPointerDownCapture:k},p&&d.createElement($x,{prefixCls:o,arrow:p,arrowPos:g,align:b}),d.createElement(zx,{cache:!c&&!f},B))})}))}),Hx=d.forwardRef(function(e,t){var n=e.children,r=e.getTriggerDOMNode,o=Si(n),i=d.useCallback(function(s){ys(t,r?r(s):s)},[r]),a=Ei(i,xs(n));return o?d.cloneElement(n,{ref:a}):n}),Lu=d.createContext(null);function $u(e){return e?Array.isArray(e)?e:[e]:[]}function Vx(e,t,n,r){return d.useMemo(function(){var o=$u(n!=null?n:t),i=$u(r!=null?r:t),a=new Set(o),s=new Set(i);return e&&(a.has("hover")&&(a.delete("hover"),a.add("click")),s.has("hover")&&(s.delete("hover"),s.add("click"))),[a,s]},[e,t,n,r])}function Wx(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0;return n?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}function Kx(e,t,n,r){for(var o=n.points,i=Object.keys(e),a=0;a<i.length;a+=1){var s,c=i[a];if(Wx((s=e[c])===null||s===void 0?void 0:s.points,o,r))return"".concat(t,"-placement-").concat(c)}return""}function Fu(e,t,n,r){return t||(n?{motionName:"".concat(e,"-").concat(n)}:r?{motionName:r}:null)}function lo(e){return e.ownerDocument.defaultView}function Aa(e){for(var t=[],n=e==null?void 0:e.parentElement,r=["hidden","scroll","clip","auto"];n;){var o=lo(n).getComputedStyle(n),i=o.overflowX,a=o.overflowY,s=o.overflow;[i,a,s].some(function(c){return r.includes(c)})&&t.push(n),n=n.parentElement}return t}function Xr(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(e)?t:e}function jr(e){return Xr(parseFloat(e),0)}function zu(e,t){var n=Z({},e);return(t||[]).forEach(function(r){if(!(r instanceof HTMLBodyElement||r instanceof HTMLHtmlElement)){var o=lo(r).getComputedStyle(r),i=o.overflow,a=o.overflowClipMargin,s=o.borderTopWidth,c=o.borderBottomWidth,l=o.borderLeftWidth,f=o.borderRightWidth,u=r.getBoundingClientRect(),m=r.offsetHeight,p=r.clientHeight,g=r.offsetWidth,b=r.clientWidth,h=jr(s),x=jr(c),E=jr(l),w=jr(f),C=Xr(Math.round(u.width/g*1e3)/1e3),S=Xr(Math.round(u.height/m*1e3)/1e3),R=(g-b-E-w)*C,L=(m-p-h-x)*S,D=h*S,H=x*S,k=E*C,T=w*C,F=0,z=0;if(i==="clip"){var A=jr(a);F=A*C,z=A*S}var _=u.x+k-F,M=u.y+D-z,I=_+u.width+2*F-k-T-R,N=M+u.height+2*z-D-H-L;n.left=Math.max(n.left,_),n.top=Math.max(n.top,M),n.right=Math.min(n.right,I),n.bottom=Math.min(n.bottom,N)}}),n}function Bu(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n="".concat(t),r=n.match(/^(.*)\%$/);return r?e*(parseFloat(r[1])/100):parseFloat(n)}function Hu(e,t){var n=t||[],r=te(n,2),o=r[0],i=r[1];return[Bu(e.width,o),Bu(e.height,i)]}function Vu(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[e[0],e[1]]}function ir(e,t){var n=t[0],r=t[1],o,i;return n==="t"?i=e.y:n==="b"?i=e.y+e.height:i=e.y+e.height/2,r==="l"?o=e.x:r==="r"?o=e.x+e.width:o=e.x+e.width/2,{x:o,y:i}}function Sn(e,t){var n={t:"b",b:"t",l:"r",r:"l"};return e.map(function(r,o){return o===t?n[r]||"c":r}).join("")}function Ux(e,t,n,r,o,i,a){var s=d.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:o[r]||{}}),c=te(s,2),l=c[0],f=c[1],u=d.useRef(0),m=d.useMemo(function(){return t?Aa(t):[]},[t]),p=d.useRef({}),g=function(){p.current={}};e||g();var b=xt(function(){if(t&&n&&e){let Rt=function(er,xn){var wn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Je,_r=O.x+er,vo=O.y+xn,ji=_r+he,Li=vo+ue,$i=Math.max(_r,wn.left),Q=Math.max(vo,wn.top),se=Math.min(ji,wn.right),je=Math.min(Li,wn.bottom);return Math.max(0,(se-$i)*(je-Q))},fo=function(){Lt=O.y+Y,en=Lt+ue,Et=O.x+ee,pn=Et+he};var E,w,C,S,R=t,L=R.ownerDocument,D=lo(R),H=D.getComputedStyle(R),k=H.width,T=H.height,F=H.position,z=R.style.left,A=R.style.top,_=R.style.right,M=R.style.bottom,I=R.style.overflow,N=Z(Z({},o[r]),i),P=L.createElement("div");(E=R.parentElement)===null||E===void 0||E.appendChild(P),P.style.left="".concat(R.offsetLeft,"px"),P.style.top="".concat(R.offsetTop,"px"),P.style.position=F,P.style.height="".concat(R.offsetHeight,"px"),P.style.width="".concat(R.offsetWidth,"px"),R.style.left="0",R.style.top="0",R.style.right="auto",R.style.bottom="auto",R.style.overflow="hidden";var j;if(Array.isArray(n))j={x:n[0],y:n[1],width:0,height:0};else{var B,K,$=n.getBoundingClientRect();$.x=(B=$.x)!==null&&B!==void 0?B:$.left,$.y=(K=$.y)!==null&&K!==void 0?K:$.top,j={x:$.x,y:$.y,width:$.width,height:$.height}}var O=R.getBoundingClientRect();O.x=(w=O.x)!==null&&w!==void 0?w:O.left,O.y=(C=O.y)!==null&&C!==void 0?C:O.top;var V=L.documentElement,U=V.clientWidth,oe=V.clientHeight,G=V.scrollWidth,q=V.scrollHeight,ne=V.scrollTop,ae=V.scrollLeft,ue=O.height,he=O.width,xe=j.height,ge=j.width,Ne={left:0,top:0,right:U,bottom:oe},ke={left:-ae,top:-ne,right:G-ae,bottom:q-ne},be=N.htmlRegion,ye="visible",Le="visibleFirst";be!=="scroll"&&be!==Le&&(be=ye);var le=be===Le,ce=zu(ke,m),re=zu(Ne,m),Je=be===ye?re:ce,Fe=le?re:Je;R.style.left="auto",R.style.top="auto",R.style.right="0",R.style.bottom="0";var pe=R.getBoundingClientRect();R.style.left=z,R.style.top=A,R.style.right=_,R.style.bottom=M,R.style.overflow=I,(S=R.parentElement)===null||S===void 0||S.removeChild(P);var et=Xr(Math.round(he/parseFloat(k)*1e3)/1e3),tt=Xr(Math.round(ue/parseFloat(T)*1e3)/1e3);if(et===0||tt===0||Yr(n)&&!Rf(n))return;var Oe=N.offset,He=N.targetOffset,Ve=Hu(O,Oe),_e=te(Ve,2),Ae=_e[0],Re=_e[1],Be=Hu(j,He),Ie=te(Be,2),nt=Ie[0],Ye=Ie[1];j.x-=nt,j.y-=Ye;var rt=N.points||[],Pt=te(rt,2),ft=Pt[0],jt=Pt[1],Ze=Vu(jt),X=Vu(ft),Ce=ir(j,Ze),fe=ir(O,X),J=Z({},N),ee=Ce.x-fe.x+Ae,Y=Ce.y-fe.y+Re,ve=Rt(ee,Y),We=Rt(ee,Y,re),Ke=ir(j,["t","l"]),De=ir(O,["t","l"]),Xt=ir(j,["b","r"]),vt=ir(O,["b","r"]),Ct=N.overflow||{},Qt=Ct.adjustX,Mr=Ct.adjustY,Jt=Ct.shiftX,pt=Ct.shiftY,mn=function(xn){return typeof xn=="boolean"?xn:xn>=0},Lt,en,Et,pn;fo();var $t=mn(Mr),Gn=X[0]===Ze[0];if($t&&X[0]==="t"&&(en>Fe.bottom||p.current.bt)){var qe=Y;Gn?qe-=ue-xe:qe=Ke.y-vt.y-Re;var Yn=Rt(ee,qe),Nr=Rt(ee,qe,re);Yn>ve||Yn===ve&&(!le||Nr>=We)?(p.current.bt=!0,Y=qe,Re=-Re,J.points=[Sn(X,0),Sn(Ze,0)]):p.current.bt=!1}if($t&&X[0]==="b"&&(Lt<Fe.top||p.current.tb)){var Ft=Y;Gn?Ft+=ue-xe:Ft=Xt.y-De.y-Re;var zt=Rt(ee,Ft),jn=Rt(ee,Ft,re);zt>ve||zt===ve&&(!le||jn>=We)?(p.current.tb=!0,Y=Ft,Re=-Re,J.points=[Sn(X,0),Sn(Ze,0)]):p.current.tb=!1}var Zn=mn(Qt),qn=X[1]===Ze[1];if(Zn&&X[1]==="l"&&(pn>Fe.right||p.current.rl)){var tn=ee;qn?tn-=he-ge:tn=Ke.x-vt.x-Ae;var Ln=Rt(tn,Y),kt=Rt(tn,Y,re);Ln>ve||Ln===ve&&(!le||kt>=We)?(p.current.rl=!0,ee=tn,Ae=-Ae,J.points=[Sn(X,1),Sn(Ze,1)]):p.current.rl=!1}if(Zn&&X[1]==="r"&&(Et<Fe.left||p.current.lr)){var _t=ee;qn?_t+=he-ge:_t=Xt.x-De.x-Ae;var Xn=Rt(_t,Y),Qn=Rt(_t,Y,re);Xn>ve||Xn===ve&&(!le||Qn>=We)?(p.current.lr=!0,ee=_t,Ae=-Ae,J.points=[Sn(X,1),Sn(Ze,1)]):p.current.lr=!1}fo();var gt=Jt===!0?0:Jt;typeof gt=="number"&&(Et<re.left&&(ee-=Et-re.left-Ae,j.x+ge<re.left+gt&&(ee+=j.x-re.left+ge-gt)),pn>re.right&&(ee-=pn-re.right-Ae,j.x>re.right-gt&&(ee+=j.x-re.right+gt)));var bt=pt===!0?0:pt;typeof bt=="number"&&(Lt<re.top&&(Y-=Lt-re.top-Re,j.y+xe<re.top+bt&&(Y+=j.y-re.top+xe-bt)),en>re.bottom&&(Y-=en-re.bottom-Re,j.y>re.bottom-bt&&(Y+=j.y-re.bottom+bt)));var hn=O.x+ee,gn=hn+he,St=O.y+Y,Pr=St+ue,Pe=j.x,we=Pe+ge,Ee=j.y,ot=Ee+xe,it=Math.max(hn,Pe),bn=Math.min(gn,we),yn=(it+bn)/2,kr=yn-hn,Jn=Math.max(St,Ee),$n=Math.min(Pr,ot),nn=(Jn+$n)/2,Fn=nn-St;a==null||a(t,J);var zn=pe.right-O.x-(ee+O.width),Bt=pe.bottom-O.y-(Y+O.height);et===1&&(ee=Math.round(ee),zn=Math.round(zn)),tt===1&&(Y=Math.round(Y),Bt=Math.round(Bt));var Oi={ready:!0,offsetX:ee/et,offsetY:Y/tt,offsetR:zn/et,offsetB:Bt/tt,arrowX:kr/et,arrowY:Fn/tt,scaleX:et,scaleY:tt,align:J};f(Oi)}}),h=function(){u.current+=1;var w=u.current;Promise.resolve().then(function(){u.current===w&&b()})},x=function(){f(function(w){return Z(Z({},w),{},{ready:!1})})};return mt(x,[r]),mt(function(){e||x()},[e]),[l.ready,l.offsetX,l.offsetY,l.offsetR,l.offsetB,l.arrowX,l.arrowY,l.scaleX,l.scaleY,l.align,h]}function Gx(e,t,n,r,o){mt(function(){if(e&&t&&n){let u=function(){r(),o()};var i=t,a=n,s=Aa(i),c=Aa(a),l=lo(a),f=new Set([l].concat(Yt(s),Yt(c)));return f.forEach(function(m){m.addEventListener("scroll",u,{passive:!0})}),l.addEventListener("resize",u,{passive:!0}),r(),function(){f.forEach(function(m){m.removeEventListener("scroll",u),l.removeEventListener("resize",u)})}}},[e,t,n])}function Yx(e,t,n,r,o,i,a,s){var c=d.useRef(e);c.current=e;var l=d.useRef(!1);d.useEffect(function(){if(t&&r&&(!o||i)){var u=function(){l.current=!1},m=function(h){var x;c.current&&!a(((x=h.composedPath)===null||x===void 0||(x=x.call(h))===null||x===void 0?void 0:x[0])||h.target)&&!l.current&&s(!1)},p=lo(r);p.addEventListener("pointerdown",u,!0),p.addEventListener("mousedown",m,!0),p.addEventListener("contextmenu",m,!0);var g=Pa(n);return g&&(g.addEventListener("mousedown",m,!0),g.addEventListener("contextmenu",m,!0)),function(){p.removeEventListener("pointerdown",u,!0),p.removeEventListener("mousedown",m,!0),p.removeEventListener("contextmenu",m,!0),g&&(g.removeEventListener("mousedown",m,!0),g.removeEventListener("contextmenu",m,!0))}}},[t,n,r,o,i]);function f(){l.current=!0}return f}var Zx=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"];function qx(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Of,t=d.forwardRef(function(n,r){var o=n.prefixCls,i=o===void 0?"rc-trigger-popup":o,a=n.children,s=n.action,c=s===void 0?"hover":s,l=n.showAction,f=n.hideAction,u=n.popupVisible,m=n.defaultPopupVisible,p=n.onPopupVisibleChange,g=n.afterPopupVisibleChange,b=n.mouseEnterDelay,h=n.mouseLeaveDelay,x=h===void 0?.1:h,E=n.focusDelay,w=n.blurDelay,C=n.mask,S=n.maskClosable,R=S===void 0?!0:S,L=n.getPopupContainer,D=n.forceRender,H=n.autoDestroy,k=n.destroyPopupOnHide,T=n.popup,F=n.popupClassName,z=n.popupStyle,A=n.popupPlacement,_=n.builtinPlacements,M=_===void 0?{}:_,I=n.popupAlign,N=n.zIndex,P=n.stretch,j=n.getPopupClassNameFromAlign,B=n.fresh,K=n.alignPoint,$=n.onPopupClick,O=n.onPopupAlign,V=n.arrow,U=n.popupMotion,oe=n.maskMotion,G=n.popupTransitionName,q=n.popupAnimation,ne=n.maskTransitionName,ae=n.maskAnimation,ue=n.className,he=n.getTriggerDOMNode,xe=Qe(n,Zx),ge=H||k||!1,Ne=d.useState(!1),ke=te(Ne,2),be=ke[0],ye=ke[1];mt(function(){ye(gx())},[]);var Le=d.useRef({}),le=d.useContext(Lu),ce=d.useMemo(function(){return{registerSubPopup:function(se,je){Le.current[se]=je,le==null||le.registerSubPopup(se,je)}}},[le]),re=hx(),Je=d.useState(null),Fe=te(Je,2),pe=Fe[0],et=Fe[1],tt=d.useRef(null),Oe=xt(function(Q){tt.current=Q,Yr(Q)&&pe!==Q&&et(Q),le==null||le.registerSubPopup(re,Q)}),He=d.useState(null),Ve=te(He,2),_e=Ve[0],Ae=Ve[1],Re=d.useRef(null),Be=xt(function(Q){Yr(Q)&&_e!==Q&&(Ae(Q),Re.current=Q)}),Ie=d.Children.only(a),nt=(Ie==null?void 0:Ie.props)||{},Ye={},rt=xt(function(Q){var se,je,Xe=_e;return(Xe==null?void 0:Xe.contains(Q))||((se=Pa(Xe))===null||se===void 0?void 0:se.host)===Q||Q===Xe||(pe==null?void 0:pe.contains(Q))||((je=Pa(pe))===null||je===void 0?void 0:je.host)===Q||Q===pe||Object.values(Le.current).some(function(ze){return(ze==null?void 0:ze.contains(Q))||Q===ze})}),Pt=Fu(i,U,q,G),ft=Fu(i,oe,ae,ne),jt=d.useState(m||!1),Ze=te(jt,2),X=Ze[0],Ce=Ze[1],fe=u!=null?u:X,J=xt(function(Q){u===void 0&&Ce(Q)});mt(function(){Ce(u||!1)},[u]);var ee=d.useRef(fe);ee.current=fe;var Y=d.useRef([]);Y.current=[];var ve=xt(function(Q){var se;J(Q),((se=Y.current[Y.current.length-1])!==null&&se!==void 0?se:fe)!==Q&&(Y.current.push(Q),p==null||p(Q))}),We=d.useRef(),Ke=function(){clearTimeout(We.current)},De=function(se){var je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;Ke(),je===0?ve(se):We.current=setTimeout(function(){ve(se)},je*1e3)};d.useEffect(function(){return Ke},[]);var Xt=d.useState(!1),vt=te(Xt,2),Ct=vt[0],Qt=vt[1];mt(function(Q){(!Q||fe)&&Qt(!0)},[fe]);var Mr=d.useState(null),Jt=te(Mr,2),pt=Jt[0],mn=Jt[1],Lt=d.useState(null),en=te(Lt,2),Et=en[0],pn=en[1],$t=function(se){pn([se.clientX,se.clientY])},Gn=Ux(fe,pe,K&&Et!==null?Et:_e,A,M,I,O),qe=te(Gn,11),Yn=qe[0],Nr=qe[1],Ft=qe[2],zt=qe[3],jn=qe[4],Zn=qe[5],qn=qe[6],tn=qe[7],Ln=qe[8],kt=qe[9],_t=qe[10],Xn=Vx(be,c,l,f),Qn=te(Xn,2),gt=Qn[0],bt=Qn[1],hn=gt.has("click"),gn=bt.has("click")||bt.has("contextMenu"),St=xt(function(){Ct||_t()}),Pr=function(){ee.current&&K&&gn&&De(!1)};Gx(fe,_e,pe,St,Pr),mt(function(){St()},[Et,A]),mt(function(){fe&&!(M!=null&&M[A])&&St()},[JSON.stringify(I)]);var Pe=d.useMemo(function(){var Q=Kx(M,i,kt,K);return at(Q,j==null?void 0:j(kt))},[kt,j,M,i,K]);d.useImperativeHandle(r,function(){return{nativeElement:Re.current,popupElement:tt.current,forceAlign:St}});var we=d.useState(0),Ee=te(we,2),ot=Ee[0],it=Ee[1],bn=d.useState(0),yn=te(bn,2),kr=yn[0],Jn=yn[1],$n=function(){if(P&&_e){var se=_e.getBoundingClientRect();it(se.width),Jn(se.height)}},nn=function(){$n(),St()},Fn=function(se){Qt(!1),_t(),g==null||g(se)},zn=function(){return new Promise(function(se){$n(),mn(function(){return se})})};mt(function(){pt&&(_t(),pt(),mn(null))},[pt]);function Bt(Q,se,je,Xe){Ye[Q]=function(ze){var mo;Xe==null||Xe(ze),De(se,je);for(var Fi=arguments.length,Ds=new Array(Fi>1?Fi-1:0),po=1;po<Fi;po++)Ds[po-1]=arguments[po];(mo=nt[Q])===null||mo===void 0||mo.call.apply(mo,[nt,ze].concat(Ds))}}(hn||gn)&&(Ye.onClick=function(Q){var se;ee.current&&gn?De(!1):!ee.current&&hn&&($t(Q),De(!0));for(var je=arguments.length,Xe=new Array(je>1?je-1:0),ze=1;ze<je;ze++)Xe[ze-1]=arguments[ze];(se=nt.onClick)===null||se===void 0||se.call.apply(se,[nt,Q].concat(Xe))});var Oi=Yx(fe,gn,_e,pe,C,R,rt,De),Rt=gt.has("hover"),fo=bt.has("hover"),er,xn;Rt&&(Bt("onMouseEnter",!0,b,function(Q){$t(Q)}),Bt("onPointerEnter",!0,b,function(Q){$t(Q)}),er=function(se){(fe||Ct)&&pe!==null&&pe!==void 0&&pe.contains(se.target)&&De(!0,b)},K&&(Ye.onMouseMove=function(Q){var se;(se=nt.onMouseMove)===null||se===void 0||se.call(nt,Q)})),fo&&(Bt("onMouseLeave",!1,x),Bt("onPointerLeave",!1,x),xn=function(){De(!1,x)}),gt.has("focus")&&Bt("onFocus",!0,E),bt.has("focus")&&Bt("onBlur",!1,w),gt.has("contextMenu")&&(Ye.onContextMenu=function(Q){var se;ee.current&&bt.has("contextMenu")?De(!1):($t(Q),De(!0)),Q.preventDefault();for(var je=arguments.length,Xe=new Array(je>1?je-1:0),ze=1;ze<je;ze++)Xe[ze-1]=arguments[ze];(se=nt.onContextMenu)===null||se===void 0||se.call.apply(se,[nt,Q].concat(Xe))}),ue&&(Ye.className=at(nt.className,ue));var wn=Z(Z({},nt),Ye),_r={},vo=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];vo.forEach(function(Q){xe[Q]&&(_r[Q]=function(){for(var se,je=arguments.length,Xe=new Array(je),ze=0;ze<je;ze++)Xe[ze]=arguments[ze];(se=wn[Q])===null||se===void 0||se.call.apply(se,[wn].concat(Xe)),xe[Q].apply(xe,Xe)})});var ji=d.cloneElement(Ie,Z(Z({},wn),_r)),Li={x:Zn,y:qn},$i=V?Z({},V!==!0?V:{}):null;return d.createElement(d.Fragment,null,d.createElement(so,{disabled:!fe,ref:Be,onResize:nn},d.createElement(Hx,{getTriggerDOMNode:he},ji)),d.createElement(Lu.Provider,{value:ce},d.createElement(Bx,{portal:e,ref:Oe,prefixCls:i,popup:T,className:at(F,Pe),style:z,target:_e,onMouseEnter:er,onMouseLeave:xn,onPointerEnter:er,zIndex:N,open:fe,keepDom:Ct,fresh:B,onClick:$,onPointerDownCapture:Oi,mask:C,motion:Pt,maskMotion:ft,onVisibleChanged:Fn,onPrepare:zn,forceRender:D,autoDestroy:ge,getPopupContainer:L,align:kt,arrow:$i,arrowPos:Li,ready:Yn,offsetX:Nr,offsetY:Ft,offsetR:zt,offsetB:jn,onAlign:St,stretch:P,targetWidth:ot/tn,targetHeight:kr/Ln})))});return t}const Xx=qx(Of);var st={adjustX:1,adjustY:1},Qx={topLeft:{points:["bl","tl"],overflow:st},topRight:{points:["br","tr"],overflow:st},bottomLeft:{points:["tl","bl"],overflow:st},bottomRight:{points:["tr","br"],overflow:st},leftTop:{points:["tr","tl"],overflow:st},leftBottom:{points:["br","bl"],overflow:st},rightTop:{points:["tl","tr"],overflow:st},rightBottom:{points:["bl","br"],overflow:st}},Jx={topLeft:{points:["bl","tl"],overflow:st},topRight:{points:["br","tr"],overflow:st},bottomLeft:{points:["tl","bl"],overflow:st},bottomRight:{points:["tr","br"],overflow:st},rightTop:{points:["tr","tl"],overflow:st},rightBottom:{points:["br","bl"],overflow:st},leftTop:{points:["tl","tr"],overflow:st},leftBottom:{points:["bl","br"],overflow:st}};function Uf(e,t,n){if(t)return t;if(n)return n[e]||n.other}var ew={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function tw(e){var t=e.prefixCls,n=e.visible,r=e.children,o=e.popup,i=e.popupStyle,a=e.popupClassName,s=e.popupOffset,c=e.disabled,l=e.mode,f=e.onVisibleChange,u=d.useContext(Tt),m=u.getPopupContainer,p=u.rtl,g=u.subMenuOpenDelay,b=u.subMenuCloseDelay,h=u.builtinPlacements,x=u.triggerSubMenuAction,E=u.forceSubMenuRender,w=u.rootClassName,C=u.motion,S=u.defaultMotions,R=d.useState(!1),L=te(R,2),D=L[0],H=L[1],k=Z(p?Z({},Jx):Z({},Qx),h),T=ew[l],F=Uf(l,C,S),z=d.useRef(F);l!=="inline"&&(z.current=F);var A=Z(Z({},z.current),{},{leavedClassName:"".concat(t,"-hidden"),removeOnLeave:!1,motionAppear:!0}),_=d.useRef();return d.useEffect(function(){return _.current=an(function(){H(n)}),function(){an.cancel(_.current)}},[n]),d.createElement(Xx,{prefixCls:t,popupClassName:at("".concat(t,"-popup"),me({},"".concat(t,"-rtl"),p),a,w),stretch:l==="horizontal"?"minWidth":null,getPopupContainer:m,builtinPlacements:k,popupPlacement:T,popupVisible:D,popup:o,popupStyle:i,popupAlign:s&&{offset:s},action:c?[]:[x],mouseEnterDelay:g,mouseLeaveDelay:b,onPopupVisibleChange:f,forceRender:E,popupMotion:A,fresh:!0},r)}function nw(e){var t=e.id,n=e.open,r=e.keyPath,o=e.children,i="inline",a=d.useContext(Tt),s=a.prefixCls,c=a.forceSubMenuRender,l=a.motion,f=a.defaultMotions,u=a.mode,m=d.useRef(!1);m.current=u===i;var p=d.useState(!m.current),g=te(p,2),b=g[0],h=g[1],x=m.current?n:!1;d.useEffect(function(){m.current&&h(!1)},[u]);var E=Z({},Uf(i,l,f));r.length>1&&(E.motionAppear=!1);var w=E.onVisibleChanged;return E.onVisibleChanged=function(C){return!m.current&&!C&&h(!0),w==null?void 0:w(C)},b?null:d.createElement(qr,{mode:i,locked:!m.current},d.createElement(Ai,Me({visible:x},E,{forceRender:c,removeOnLeave:!1,leavedClassName:"".concat(s,"-hidden")}),function(C){var S=C.className,R=C.style;return d.createElement(Ms,{id:t,className:S,style:R},o)}))}var rw=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],ow=["active"],iw=d.forwardRef(function(e,t){var n=e.style,r=e.className,o=e.title,i=e.eventKey;e.warnKey;var a=e.disabled,s=e.internalPopupClose,c=e.children,l=e.itemIcon,f=e.expandIcon,u=e.popupClassName,m=e.popupOffset,p=e.popupStyle,g=e.onClick,b=e.onMouseEnter,h=e.onMouseLeave,x=e.onTitleClick,E=e.onTitleMouseEnter,w=e.onTitleMouseLeave,C=Qe(e,rw),S=wf(i),R=d.useContext(Tt),L=R.prefixCls,D=R.mode,H=R.openKeys,k=R.disabled,T=R.overflowDisabled,F=R.activeKey,z=R.selectedKeys,A=R.itemIcon,_=R.expandIcon,M=R.onItemClick,I=R.onOpenChange,N=R.onActive,P=d.useContext(Cs),j=P._internalRenderSubMenuItem,B=d.useContext(Sf),K=B.isSubPathKey,$=uo(),O="".concat(L,"-submenu"),V=k||a,U=d.useRef(),oe=d.useRef(),G=l!=null?l:A,q=f!=null?f:_,ne=H.includes(i),ae=!T&&ne,ue=K(z,i),he=Nf(i,V,E,w),xe=he.active,ge=Qe(he,ow),Ne=d.useState(!1),ke=te(Ne,2),be=ke[0],ye=ke[1],Le=function(Ie){V||ye(Ie)},le=function(Ie){Le(!0),b==null||b({key:i,domEvent:Ie})},ce=function(Ie){Le(!1),h==null||h({key:i,domEvent:Ie})},re=d.useMemo(function(){return xe||(D!=="inline"?be||K([F],i):!1)},[D,xe,F,be,i,K]),Je=Pf($.length),Fe=function(Ie){V||(x==null||x({key:i,domEvent:Ie}),D==="inline"&&I(i,!ne))},pe=Fr(function(Be){g==null||g(ni(Be)),M(Be)}),et=function(Ie){D!=="inline"&&I(i,Ie)},tt=function(){N(i)},Oe=S&&"".concat(S,"-popup"),He=d.useMemo(function(){return d.createElement(kf,{icon:D!=="horizontal"?q:void 0,props:Z(Z({},e),{},{isOpen:ae,isSubMenu:!0})},d.createElement("i",{className:"".concat(O,"-arrow")}))},[D,q,e,ae,O]),Ve=d.createElement("div",Me({role:"menuitem",style:Je,className:"".concat(O,"-title"),tabIndex:V?null:-1,ref:U,title:typeof o=="string"?o:null,"data-menu-id":T&&S?null:S,"aria-expanded":ae,"aria-haspopup":!0,"aria-controls":Oe,"aria-disabled":V,onClick:Fe,onFocus:tt},ge),o,He),_e=d.useRef(D);if(D!=="inline"&&$.length>1?_e.current="vertical":_e.current=D,!T){var Ae=_e.current;Ve=d.createElement(tw,{mode:Ae,prefixCls:O,visible:!s&&ae&&D!=="inline",popupClassName:u,popupOffset:m,popupStyle:p,popup:d.createElement(qr,{mode:Ae==="horizontal"?"vertical":Ae},d.createElement(Ms,{id:Oe,ref:oe},c)),disabled:V,onVisibleChange:et},Ve)}var Re=d.createElement(sn.Item,Me({ref:t,role:"none"},C,{component:"li",style:n,className:at(O,"".concat(O,"-").concat(D),r,me(me(me(me({},"".concat(O,"-open"),ae),"".concat(O,"-active"),re),"".concat(O,"-selected"),ue),"".concat(O,"-disabled"),V)),onMouseEnter:le,onMouseLeave:ce}),Ve,!T&&d.createElement(nw,{id:Oe,open:ae,keyPath:$},c));return j&&(Re=j(Re,e,{selected:ue,active:re,open:ae,disabled:V})),d.createElement(qr,{onItemClick:pe,mode:D==="horizontal"?"vertical":D,itemIcon:G,expandIcon:q},Re)}),Ti=d.forwardRef(function(e,t){var n=e.eventKey,r=e.children,o=uo(n),i=Ns(r,o),a=_i();d.useEffect(function(){if(a)return a.registerPath(n,o),function(){a.unregisterPath(n,o)}},[o]);var s;return a?s=i:s=d.createElement(iw,Me({ref:t},e),i),d.createElement(Ef.Provider,{value:o},s)});function Gf(e){var t=e.className,n=e.style,r=d.useContext(Tt),o=r.prefixCls,i=_i();return i?null:d.createElement("li",{role:"separator",className:at("".concat(o,"-item-divider"),t),style:n})}var aw=["className","title","eventKey","children"],sw=d.forwardRef(function(e,t){var n=e.className,r=e.title;e.eventKey;var o=e.children,i=Qe(e,aw),a=d.useContext(Tt),s=a.prefixCls,c="".concat(s,"-item-group");return d.createElement("li",Me({ref:t,role:"presentation"},i,{onClick:function(f){return f.stopPropagation()},className:at(c,n)}),d.createElement("div",{role:"presentation",className:"".concat(c,"-title"),title:typeof r=="string"?r:void 0},r),d.createElement("ul",{role:"group",className:"".concat(c,"-list")},o))}),_s=d.forwardRef(function(e,t){var n=e.eventKey,r=e.children,o=uo(n),i=Ns(r,o),a=_i();return a?i:d.createElement(sw,Me({ref:t},Rs(e,["warnKey"])),i)}),uw=["label","children","key","type","extra"];function Ta(e,t,n){var r=t.item,o=t.group,i=t.submenu,a=t.divider;return(e||[]).map(function(s,c){if(s&&lt(s)==="object"){var l=s,f=l.label,u=l.children,m=l.key,p=l.type,g=l.extra,b=Qe(l,uw),h=m!=null?m:"tmp-".concat(c);return u||p==="group"?p==="group"?d.createElement(o,Me({key:h},b,{title:f}),Ta(u,t,n)):d.createElement(i,Me({key:h},b,{title:f}),Ta(u,t,n)):p==="divider"?d.createElement(a,Me({key:h},b)):d.createElement(r,Me({key:h},b,{extra:g}),f,(!!g||g===0)&&d.createElement("span",{className:"".concat(n,"-item-extra")},g))}return null}).filter(function(s){return s})}function Wu(e,t,n,r,o){var i=e,a=Z({divider:Gf,item:Ii,group:_s,submenu:Ti},r);return t&&(i=Ta(t,a,o)),Ns(i,n)}var lw=["prefixCls","rootClassName","style","className","tabIndex","items","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem","_internalComponents"],Bn=[],cw=d.forwardRef(function(e,t){var n,r=e,o=r.prefixCls,i=o===void 0?"rc-menu":o,a=r.rootClassName,s=r.style,c=r.className,l=r.tabIndex,f=l===void 0?0:l,u=r.items,m=r.children,p=r.direction,g=r.id,b=r.mode,h=b===void 0?"vertical":b,x=r.inlineCollapsed,E=r.disabled,w=r.disabledOverflow,C=r.subMenuOpenDelay,S=C===void 0?.1:C,R=r.subMenuCloseDelay,L=R===void 0?.1:R,D=r.forceSubMenuRender,H=r.defaultOpenKeys,k=r.openKeys,T=r.activeKey,F=r.defaultActiveFirst,z=r.selectable,A=z===void 0?!0:z,_=r.multiple,M=_===void 0?!1:_,I=r.defaultSelectedKeys,N=r.selectedKeys,P=r.onSelect,j=r.onDeselect,B=r.inlineIndent,K=B===void 0?24:B,$=r.motion,O=r.defaultMotions,V=r.triggerSubMenuAction,U=V===void 0?"hover":V,oe=r.builtinPlacements,G=r.itemIcon,q=r.expandIcon,ne=r.overflowedIndicator,ae=ne===void 0?"...":ne,ue=r.overflowedIndicatorPopupClassName,he=r.getPopupContainer,xe=r.onClick,ge=r.onOpenChange,Ne=r.onKeyDown;r.openAnimation,r.openTransitionName;var ke=r._internalRenderMenuItem,be=r._internalRenderSubMenuItem,ye=r._internalComponents,Le=Qe(r,lw),le=d.useMemo(function(){return[Wu(m,u,Bn,ye,i),Wu(m,u,Bn,{},i)]},[m,u,ye]),ce=te(le,2),re=ce[0],Je=ce[1],Fe=d.useState(!1),pe=te(Fe,2),et=pe[0],tt=pe[1],Oe=d.useRef(),He=Uy(g),Ve=p==="rtl",_e=To(H,{value:k,postState:function(we){return we||Bn}}),Ae=te(_e,2),Re=Ae[0],Be=Ae[1],Ie=function(we){var Ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function ot(){Be(we),ge==null||ge(we)}Ee?ut.flushSync(ot):ot()},nt=d.useState(Re),Ye=te(nt,2),rt=Ye[0],Pt=Ye[1],ft=d.useRef(!1),jt=d.useMemo(function(){return(h==="inline"||h==="vertical")&&x?["vertical",x]:[h,!1]},[h,x]),Ze=te(jt,2),X=Ze[0],Ce=Ze[1],fe=X==="inline",J=d.useState(X),ee=te(J,2),Y=ee[0],ve=ee[1],We=d.useState(Ce),Ke=te(We,2),De=Ke[0],Xt=Ke[1];d.useEffect(function(){ve(X),Xt(Ce),ft.current&&(fe?Be(rt):Ie(Bn))},[X,Ce]);var vt=d.useState(0),Ct=te(vt,2),Qt=Ct[0],Mr=Ct[1],Jt=Qt>=re.length-1||Y!=="horizontal"||w;d.useEffect(function(){fe&&Pt(Re)},[Re]),d.useEffect(function(){return ft.current=!0,function(){ft.current=!1}},[]);var pt=Wy(),mn=pt.registerPath,Lt=pt.unregisterPath,en=pt.refreshOverflowKeys,Et=pt.isSubPathKey,pn=pt.getKeyPath,$t=pt.getKeys,Gn=pt.getSubPathKeys,qe=d.useMemo(function(){return{registerPath:mn,unregisterPath:Lt}},[mn,Lt]),Yn=d.useMemo(function(){return{isSubPathKey:Et}},[Et]);d.useEffect(function(){en(Jt?Bn:re.slice(Qt+1).map(function(Pe){return Pe.key}))},[Qt,Jt]);var Nr=To(T||F&&((n=re[0])===null||n===void 0?void 0:n.key),{value:T}),Ft=te(Nr,2),zt=Ft[0],jn=Ft[1],Zn=Fr(function(Pe){jn(Pe)}),qn=Fr(function(){jn(void 0)});y.useImperativeHandle(t,function(){return{list:Oe.current,focus:function(we){var Ee,ot=$t(),it=Sa(ot,He),bn=it.elements,yn=it.key2element,kr=it.element2key,Jn=Es(Oe.current,bn),$n=zt!=null?zt:Jn[0]?kr.get(Jn[0]):(Ee=re.find(function(zn){return!zn.props.disabled}))===null||Ee===void 0?void 0:Ee.key,nn=yn.get($n);if($n&&nn){var Fn;nn==null||(Fn=nn.focus)===null||Fn===void 0||Fn.call(nn,we)}}}});var tn=To(I||[],{value:N,postState:function(we){return Array.isArray(we)?we:we==null?Bn:[we]}}),Ln=te(tn,2),kt=Ln[0],_t=Ln[1],Xn=function(we){if(A){var Ee=we.key,ot=kt.includes(Ee),it;M?ot?it=kt.filter(function(yn){return yn!==Ee}):it=[].concat(Yt(kt),[Ee]):it=[Ee],_t(it);var bn=Z(Z({},we),{},{selectedKeys:it});ot?j==null||j(bn):P==null||P(bn)}!M&&Re.length&&Y!=="inline"&&Ie(Bn)},Qn=Fr(function(Pe){xe==null||xe(ni(Pe)),Xn(Pe)}),gt=Fr(function(Pe,we){var Ee=Re.filter(function(it){return it!==Pe});if(we)Ee.push(Pe);else if(Y!=="inline"){var ot=Gn(Pe);Ee=Ee.filter(function(it){return!ot.has(it)})}bf(Re,Ee,!0)||Ie(Ee,!0)}),bt=function(we,Ee){var ot=Ee!=null?Ee:!Re.includes(we);gt(we,ot)},hn=By(Y,zt,Ve,He,Oe,$t,pn,jn,bt,Ne);d.useEffect(function(){tt(!0)},[]);var gn=d.useMemo(function(){return{_internalRenderMenuItem:ke,_internalRenderSubMenuItem:be}},[ke,be]),St=Y!=="horizontal"||w?re:re.map(function(Pe,we){return d.createElement(qr,{key:Pe.key,overflowDisabled:we>Qt},Pe)}),Pr=d.createElement(sn,Me({id:g,ref:Oe,prefixCls:"".concat(i,"-overflow"),component:"ul",itemComponent:Ii,className:at(i,"".concat(i,"-root"),"".concat(i,"-").concat(Y),c,me(me({},"".concat(i,"-inline-collapsed"),De),"".concat(i,"-rtl"),Ve),a),dir:p,style:s,role:"menu",tabIndex:f,data:St,renderRawItem:function(we){return we},renderRawRest:function(we){var Ee=we.length,ot=Ee?re.slice(-Ee):null;return d.createElement(Ti,{eventKey:Ra,title:ae,disabled:Jt,internalPopupClose:Ee===0,popupClassName:ue},ot)},maxCount:Y!=="horizontal"||w?sn.INVALIDATE:sn.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(we){Mr(we)},onKeyDown:hn},Le));return d.createElement(Cs.Provider,{value:gn},d.createElement(yf.Provider,{value:He},d.createElement(qr,{prefixCls:i,rootClassName:a,mode:Y,openKeys:Re,rtl:Ve,disabled:E,motion:et?$:null,defaultMotions:et?O:null,activeKey:zt,onActive:Zn,onInactive:qn,selectedKeys:kt,inlineIndent:K,subMenuOpenDelay:S,subMenuCloseDelay:L,forceSubMenuRender:D,builtinPlacements:oe,triggerSubMenuAction:U,getPopupContainer:he,itemIcon:G,expandIcon:q,onItemClick:Qn,onOpenChange:gt},d.createElement(Sf.Provider,{value:Yn},Pr),d.createElement("div",{style:{display:"none"},"aria-hidden":!0},d.createElement(Cf.Provider,{value:qe},Je)))))}),co=cw;co.Item=Ii;co.SubMenu=Ti;co.ItemGroup=_s;co.Divider=Gf;const dw=y.forwardRef((e,t)=>{const{mountContainer:n}=y.useContext(Zt),{wrapperClass:r,...o}=e;return n&&v.jsx(co,{ref:t,prefixCls:W("univer-menu",e.className),getPopupContainer:()=>n,...o,className:r})});function fw(e){return v.jsx(Ii,{...e})}function vw(e){return v.jsx(Ti,{...e})}function mw(e){return v.jsx(_s,{...e})}function pw({items:e}){return v.jsx("div",{className:"univer-menu-item-group univer-flex univer-flex-wrap univer-gap-2.5 univer-p-1 univer-px-0",children:e.map(t=>{const n=v.jsx("div",{className:W("univer-flex univer-size-6 univer-cursor-pointer univer-items-center univer-justify-center univer-rounded-md hover:univer-bg-gray-50 dark:hover:!univer-bg-gray-900",{"univer-bg-gray-50 dark:!univer-bg-gray-900":t.active},t.className),onClick:()=>t.onClick(),children:v.jsx(t.Icon,{className:"univer-size-4 univer-text-gray-900 dark:!univer-text-gray-200"})},t.key);return t.tooltip?v.jsx(yi,{title:t.tooltip,children:n},t.key):n})})}function hw(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const gw=e=>{switch(e){case"success":return xw;case"info":return Cw;case"warning":return ww;case"error":return Ew;default:return null}},bw=Array(12).fill(0),yw=({visible:e,className:t})=>y.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},y.createElement("div",{className:"sonner-spinner"},bw.map((n,r)=>y.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),xw=y.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},y.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),ww=y.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},y.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Cw=y.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},y.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Ew=y.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},y.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Sw=y.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},y.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),y.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Rw=()=>{const[e,t]=y.useState(document.hidden);return y.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let Oa=1;class Mw{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...o}=t,i=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:Oa++,a=this.toasts.find(c=>c.id===i),s=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),a?this.toasts=this.toasts.map(c=>c.id===i?(this.publish({...c,...t,id:i,title:r}),{...c,...t,id:i,dismissible:s,title:r}):c):this.addToast({title:r,...o,dismissible:s,id:i}),i},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const o=Promise.resolve(t instanceof Function?t():t);let i=r!==void 0,a;const s=o.then(async l=>{if(a=["resolve",l],y.isValidElement(l))i=!1,this.create({id:r,type:"default",message:l});else if(Pw(l)&&!l.ok){i=!1;const u=typeof n.error=="function"?await n.error(`HTTP error! status: ${l.status}`):n.error,m=typeof n.description=="function"?await n.description(`HTTP error! status: ${l.status}`):n.description,g=typeof u=="object"&&!y.isValidElement(u)?u:{message:u};this.create({id:r,type:"error",description:m,...g})}else if(l instanceof Error){i=!1;const u=typeof n.error=="function"?await n.error(l):n.error,m=typeof n.description=="function"?await n.description(l):n.description,g=typeof u=="object"&&!y.isValidElement(u)?u:{message:u};this.create({id:r,type:"error",description:m,...g})}else if(n.success!==void 0){i=!1;const u=typeof n.success=="function"?await n.success(l):n.success,m=typeof n.description=="function"?await n.description(l):n.description,g=typeof u=="object"&&!y.isValidElement(u)?u:{message:u};this.create({id:r,type:"success",description:m,...g})}}).catch(async l=>{if(a=["reject",l],n.error!==void 0){i=!1;const f=typeof n.error=="function"?await n.error(l):n.error,u=typeof n.description=="function"?await n.description(l):n.description,p=typeof f=="object"&&!y.isValidElement(f)?f:{message:f};this.create({id:r,type:"error",description:u,...p})}}).finally(()=>{i&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),c=()=>new Promise((l,f)=>s.then(()=>a[0]==="reject"?f(a[1]):l(a[1])).catch(f));return typeof r!="string"&&typeof r!="number"?{unwrap:c}:Object.assign(r,{unwrap:c})},this.custom=(t,n)=>{const r=(n==null?void 0:n.id)||Oa++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const ht=new Mw,Nw=(e,t)=>{const n=(t==null?void 0:t.id)||Oa++;return ht.addToast({title:e,...t,id:n}),n},Pw=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",kw=Nw,_w=()=>ht.toasts,Iw=()=>ht.getActiveToasts(),Nn=Object.assign(kw,{success:ht.success,info:ht.info,warning:ht.warning,error:ht.error,custom:ht.custom,message:ht.message,promise:ht.promise,dismiss:ht.dismiss,loading:ht.loading},{getHistory:_w,getToasts:Iw});hw("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Mo(e){return e.label!==void 0}const Dw=3,Aw="24px",Tw="16px",Ku=4e3,Ow=356,jw=14,Lw=45,$w=200;function Ht(...e){return e.filter(Boolean).join(" ")}function Fw(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const zw=e=>{var t,n,r,o,i,a,s,c,l;const{invert:f,toast:u,unstyled:m,interacting:p,setHeights:g,visibleToasts:b,heights:h,index:x,toasts:E,expanded:w,removeToast:C,defaultRichColors:S,closeButton:R,style:L,cancelButtonStyle:D,actionButtonStyle:H,className:k="",descriptionClassName:T="",duration:F,position:z,gap:A,expandByDefault:_,classNames:M,icons:I,closeButtonAriaLabel:N="Close toast"}=e,[P,j]=y.useState(null),[B,K]=y.useState(null),[$,O]=y.useState(!1),[V,U]=y.useState(!1),[oe,G]=y.useState(!1),[q,ne]=y.useState(!1),[ae,ue]=y.useState(!1),[he,xe]=y.useState(0),[ge,Ne]=y.useState(0),ke=y.useRef(u.duration||F||Ku),be=y.useRef(null),ye=y.useRef(null),Le=x===0,le=x+1<=b,ce=u.type,re=u.dismissible!==!1,Je=u.className||"",Fe=u.descriptionClassName||"",pe=y.useMemo(()=>h.findIndex(X=>X.toastId===u.id)||0,[h,u.id]),et=y.useMemo(()=>{var X;return(X=u.closeButton)!=null?X:R},[u.closeButton,R]),tt=y.useMemo(()=>u.duration||F||Ku,[u.duration,F]),Oe=y.useRef(0),He=y.useRef(0),Ve=y.useRef(0),_e=y.useRef(null),[Ae,Re]=z.split("-"),Be=y.useMemo(()=>h.reduce((X,Ce,fe)=>fe>=pe?X:X+Ce.height,0),[h,pe]),Ie=Rw(),nt=u.invert||f,Ye=ce==="loading";He.current=y.useMemo(()=>pe*A+Be,[pe,Be]),y.useEffect(()=>{ke.current=tt},[tt]),y.useEffect(()=>{O(!0)},[]),y.useEffect(()=>{const X=ye.current;if(X){const Ce=X.getBoundingClientRect().height;return Ne(Ce),g(fe=>[{toastId:u.id,height:Ce,position:u.position},...fe]),()=>g(fe=>fe.filter(J=>J.toastId!==u.id))}},[g,u.id]),y.useLayoutEffect(()=>{if(!$)return;const X=ye.current,Ce=X.style.height;X.style.height="auto";const fe=X.getBoundingClientRect().height;X.style.height=Ce,Ne(fe),g(J=>J.find(Y=>Y.toastId===u.id)?J.map(Y=>Y.toastId===u.id?{...Y,height:fe}:Y):[{toastId:u.id,height:fe,position:u.position},...J])},[$,u.title,u.description,g,u.id,u.jsx,u.action,u.cancel]);const rt=y.useCallback(()=>{U(!0),xe(He.current),g(X=>X.filter(Ce=>Ce.toastId!==u.id)),setTimeout(()=>{C(u)},$w)},[u,C,g,He]);y.useEffect(()=>{if(u.promise&&ce==="loading"||u.duration===1/0||u.type==="loading")return;let X;return w||p||Ie?(()=>{if(Ve.current<Oe.current){const J=new Date().getTime()-Oe.current;ke.current=ke.current-J}Ve.current=new Date().getTime()})():ke.current!==1/0&&(Oe.current=new Date().getTime(),X=setTimeout(()=>{u.onAutoClose==null||u.onAutoClose.call(u,u),rt()},ke.current)),()=>clearTimeout(X)},[w,p,u,ce,Ie,rt]),y.useEffect(()=>{u.delete&&(rt(),u.onDismiss==null||u.onDismiss.call(u,u))},[rt,u.delete]);function Pt(){var X;if(I!=null&&I.loading){var Ce;return y.createElement("div",{className:Ht(M==null?void 0:M.loader,u==null||(Ce=u.classNames)==null?void 0:Ce.loader,"sonner-loader"),"data-visible":ce==="loading"},I.loading)}return y.createElement(yw,{className:Ht(M==null?void 0:M.loader,u==null||(X=u.classNames)==null?void 0:X.loader),visible:ce==="loading"})}const ft=u.icon||(I==null?void 0:I[ce])||gw(ce);var jt,Ze;return y.createElement("li",{tabIndex:0,ref:ye,className:Ht(k,Je,M==null?void 0:M.toast,u==null||(t=u.classNames)==null?void 0:t.toast,M==null?void 0:M.default,M==null?void 0:M[ce],u==null||(n=u.classNames)==null?void 0:n[ce]),"data-sonner-toast":"","data-rich-colors":(jt=u.richColors)!=null?jt:S,"data-styled":!(u.jsx||u.unstyled||m),"data-mounted":$,"data-promise":!!u.promise,"data-swiped":ae,"data-removed":V,"data-visible":le,"data-y-position":Ae,"data-x-position":Re,"data-index":x,"data-front":Le,"data-swiping":oe,"data-dismissible":re,"data-type":ce,"data-invert":nt,"data-swipe-out":q,"data-swipe-direction":B,"data-expanded":!!(w||_&&$),"data-testid":u.testId,style:{"--index":x,"--toasts-before":x,"--z-index":E.length-x,"--offset":`${V?he:He.current}px`,"--initial-height":_?"auto":`${ge}px`,...L,...u.style},onDragEnd:()=>{G(!1),j(null),_e.current=null},onPointerDown:X=>{X.button!==2&&(Ye||!re||(be.current=new Date,xe(He.current),X.target.setPointerCapture(X.pointerId),X.target.tagName!=="BUTTON"&&(G(!0),_e.current={x:X.clientX,y:X.clientY})))},onPointerUp:()=>{var X,Ce,fe;if(q||!re)return;_e.current=null;const J=Number(((X=ye.current)==null?void 0:X.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),ee=Number(((Ce=ye.current)==null?void 0:Ce.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Y=new Date().getTime()-((fe=be.current)==null?void 0:fe.getTime()),ve=P==="x"?J:ee,We=Math.abs(ve)/Y;if(Math.abs(ve)>=Lw||We>.11){xe(He.current),u.onDismiss==null||u.onDismiss.call(u,u),K(P==="x"?J>0?"right":"left":ee>0?"down":"up"),rt(),ne(!0);return}else{var Ke,De;(Ke=ye.current)==null||Ke.style.setProperty("--swipe-amount-x","0px"),(De=ye.current)==null||De.style.setProperty("--swipe-amount-y","0px")}ue(!1),G(!1),j(null)},onPointerMove:X=>{var Ce,fe,J;if(!_e.current||!re||((Ce=window.getSelection())==null?void 0:Ce.toString().length)>0)return;const Y=X.clientY-_e.current.y,ve=X.clientX-_e.current.x;var We;const Ke=(We=e.swipeDirections)!=null?We:Fw(z);!P&&(Math.abs(ve)>1||Math.abs(Y)>1)&&j(Math.abs(ve)>Math.abs(Y)?"x":"y");let De={x:0,y:0};const Xt=vt=>1/(1.5+Math.abs(vt)/20);if(P==="y"){if(Ke.includes("top")||Ke.includes("bottom"))if(Ke.includes("top")&&Y<0||Ke.includes("bottom")&&Y>0)De.y=Y;else{const vt=Y*Xt(Y);De.y=Math.abs(vt)<Math.abs(Y)?vt:Y}}else if(P==="x"&&(Ke.includes("left")||Ke.includes("right")))if(Ke.includes("left")&&ve<0||Ke.includes("right")&&ve>0)De.x=ve;else{const vt=ve*Xt(ve);De.x=Math.abs(vt)<Math.abs(ve)?vt:ve}(Math.abs(De.x)>0||Math.abs(De.y)>0)&&ue(!0),(fe=ye.current)==null||fe.style.setProperty("--swipe-amount-x",`${De.x}px`),(J=ye.current)==null||J.style.setProperty("--swipe-amount-y",`${De.y}px`)}},et&&!u.jsx&&ce!=="loading"?y.createElement("button",{"aria-label":N,"data-disabled":Ye,"data-close-button":!0,onClick:Ye||!re?()=>{}:()=>{rt(),u.onDismiss==null||u.onDismiss.call(u,u)},className:Ht(M==null?void 0:M.closeButton,u==null||(r=u.classNames)==null?void 0:r.closeButton)},(Ze=I==null?void 0:I.close)!=null?Ze:Sw):null,(ce||u.icon||u.promise)&&u.icon!==null&&((I==null?void 0:I[ce])!==null||u.icon)?y.createElement("div",{"data-icon":"",className:Ht(M==null?void 0:M.icon,u==null||(o=u.classNames)==null?void 0:o.icon)},u.promise||u.type==="loading"&&!u.icon?u.icon||Pt():null,u.type!=="loading"?ft:null):null,y.createElement("div",{"data-content":"",className:Ht(M==null?void 0:M.content,u==null||(i=u.classNames)==null?void 0:i.content)},y.createElement("div",{"data-title":"",className:Ht(M==null?void 0:M.title,u==null||(a=u.classNames)==null?void 0:a.title)},u.jsx?u.jsx:typeof u.title=="function"?u.title():u.title),u.description?y.createElement("div",{"data-description":"",className:Ht(T,Fe,M==null?void 0:M.description,u==null||(s=u.classNames)==null?void 0:s.description)},typeof u.description=="function"?u.description():u.description):null),y.isValidElement(u.cancel)?u.cancel:u.cancel&&Mo(u.cancel)?y.createElement("button",{"data-button":!0,"data-cancel":!0,style:u.cancelButtonStyle||D,onClick:X=>{Mo(u.cancel)&&re&&(u.cancel.onClick==null||u.cancel.onClick.call(u.cancel,X),rt())},className:Ht(M==null?void 0:M.cancelButton,u==null||(c=u.classNames)==null?void 0:c.cancelButton)},u.cancel.label):null,y.isValidElement(u.action)?u.action:u.action&&Mo(u.action)?y.createElement("button",{"data-button":!0,"data-action":!0,style:u.actionButtonStyle||H,onClick:X=>{Mo(u.action)&&(u.action.onClick==null||u.action.onClick.call(u.action,X),!X.defaultPrevented&&rt())},className:Ht(M==null?void 0:M.actionButton,u==null||(l=u.classNames)==null?void 0:l.actionButton)},u.action.label):null)};function Uu(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function Bw(e,t){const n={};return[e,t].forEach((r,o)=>{const i=o===1,a=i?"--mobile-offset":"--offset",s=i?Tw:Aw;function c(l){["top","right","bottom","left"].forEach(f=>{n[`${a}-${f}`]=typeof l=="number"?`${l}px`:l})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(l=>{r[l]===void 0?n[`${a}-${l}`]=s:n[`${a}-${l}`]=typeof r[l]=="number"?`${r[l]}px`:r[l]}):c(s)}),n}const Yf=y.forwardRef(function(t,n){const{id:r,invert:o,position:i="bottom-right",hotkey:a=["altKey","KeyT"],expand:s,closeButton:c,className:l,offset:f,mobileOffset:u,theme:m="light",richColors:p,duration:g,style:b,visibleToasts:h=Dw,toastOptions:x,dir:E=Uu(),gap:w=jw,icons:C,containerAriaLabel:S="Notifications"}=t,[R,L]=y.useState([]),D=y.useMemo(()=>r?R.filter($=>$.toasterId===r):R.filter($=>!$.toasterId),[R,r]),H=y.useMemo(()=>Array.from(new Set([i].concat(D.filter($=>$.position).map($=>$.position)))),[D,i]),[k,T]=y.useState([]),[F,z]=y.useState(!1),[A,_]=y.useState(!1),[M,I]=y.useState(m!=="system"?m:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),N=y.useRef(null),P=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),j=y.useRef(null),B=y.useRef(!1),K=y.useCallback($=>{L(O=>{var V;return(V=O.find(U=>U.id===$.id))!=null&&V.delete||ht.dismiss($.id),O.filter(({id:U})=>U!==$.id)})},[]);return y.useEffect(()=>ht.subscribe($=>{if($.dismiss){requestAnimationFrame(()=>{L(O=>O.map(V=>V.id===$.id?{...V,delete:!0}:V))});return}setTimeout(()=>{ut.flushSync(()=>{L(O=>{const V=O.findIndex(U=>U.id===$.id);return V!==-1?[...O.slice(0,V),{...O[V],...$},...O.slice(V+1)]:[$,...O]})})})}),[R]),y.useEffect(()=>{if(m!=="system"){I(m);return}if(m==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?I("dark"):I("light")),typeof window>"u")return;const $=window.matchMedia("(prefers-color-scheme: dark)");try{$.addEventListener("change",({matches:O})=>{I(O?"dark":"light")})}catch{$.addListener(({matches:V})=>{try{I(V?"dark":"light")}catch(U){console.error(U)}})}},[m]),y.useEffect(()=>{R.length<=1&&z(!1)},[R]),y.useEffect(()=>{const $=O=>{var V;if(a.every(G=>O[G]||O.code===G)){var oe;z(!0),(oe=N.current)==null||oe.focus()}O.code==="Escape"&&(document.activeElement===N.current||(V=N.current)!=null&&V.contains(document.activeElement))&&z(!1)};return document.addEventListener("keydown",$),()=>document.removeEventListener("keydown",$)},[a]),y.useEffect(()=>{if(N.current)return()=>{j.current&&(j.current.focus({preventScroll:!0}),j.current=null,B.current=!1)}},[N.current]),y.createElement("section",{ref:n,"aria-label":`${S} ${P}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},H.map(($,O)=>{var V;const[U,oe]=$.split("-");return D.length?y.createElement("ol",{key:$,dir:E==="auto"?Uu():E,tabIndex:-1,ref:N,className:l,"data-sonner-toaster":!0,"data-sonner-theme":M,"data-y-position":U,"data-x-position":oe,style:{"--front-toast-height":`${((V=k[0])==null?void 0:V.height)||0}px`,"--width":`${Ow}px`,"--gap":`${w}px`,...b,...Bw(f,u)},onBlur:G=>{B.current&&!G.currentTarget.contains(G.relatedTarget)&&(B.current=!1,j.current&&(j.current.focus({preventScroll:!0}),j.current=null))},onFocus:G=>{G.target instanceof HTMLElement&&G.target.dataset.dismissible==="false"||B.current||(B.current=!0,j.current=G.relatedTarget)},onMouseEnter:()=>z(!0),onMouseMove:()=>z(!0),onMouseLeave:()=>{A||z(!1)},onDragEnd:()=>z(!1),onPointerDown:G=>{G.target instanceof HTMLElement&&G.target.dataset.dismissible==="false"||_(!0)},onPointerUp:()=>_(!1)},D.filter(G=>!G.position&&O===0||G.position===$).map((G,q)=>{var ne,ae;return y.createElement(zw,{key:G.id,icons:C,index:q,toast:G,defaultRichColors:p,duration:(ne=x==null?void 0:x.duration)!=null?ne:g,className:x==null?void 0:x.className,descriptionClassName:x==null?void 0:x.descriptionClassName,invert:o,visibleToasts:h,closeButton:(ae=x==null?void 0:x.closeButton)!=null?ae:c,interacting:A,position:$,style:x==null?void 0:x.style,unstyled:x==null?void 0:x.unstyled,classNames:x==null?void 0:x.classNames,cancelButtonStyle:x==null?void 0:x.cancelButtonStyle,actionButtonStyle:x==null?void 0:x.actionButtonStyle,closeButtonAriaLabel:x==null?void 0:x.closeButtonAriaLabel,removeToast:K,toasts:D.filter(ue=>ue.position==G.position),heights:k.filter(ue=>ue.position==G.position),setHeights:T,expandByDefault:s,gap:w,expanded:F,swipeDirections:t.swipeDirections})})):null}))});var Zf=(e=>(e.Success="success",e.Info="info",e.Warning="warning",e.Error="error",e.Loading="loading",e))(Zf||{});const qf="univer-message-toaster",Xf=3e3,Hr=new Set,Qf=v.jsx(vl,{className:"univer-animate-spin univer-text-violet-500"});let Gu=0;const Hw={success:v.jsx(ll,{className:"univer-text-green-500"}),info:v.jsx(il,{className:"univer-text-sky-500 dark:!univer-text-sky-400"}),warning:v.jsx(cl,{className:"univer-text-amber-500"}),error:v.jsx(ol,{className:"univer-text-red-500"}),loading:Qf},Lr={success:"[&_[data-icon]]:univer-text-green-500",info:"[&_[data-icon]]:univer-text-sky-500",warning:"[&_[data-icon]]:univer-text-amber-500",error:"[&_[data-icon]]:univer-text-red-500",loading:"[&_[data-icon]]:univer-text-violet-500"},Vw=e=>{switch(e){case"success":return Nn.success;case"warning":return Nn.warning;case"error":return Nn.error;case"loading":return Nn.loading;default:return Nn.info}},Ww=()=>{const e=`univer-message-${Gu}`;return Gu+=1,e},Kw=({className:e,...t})=>v.jsx(Yf,{id:qf,position:"top-center",visibleToasts:4,closeButton:!1,expand:!1,icons:{loading:Qf},offset:{top:16},className:W(`
441
+ `,R,e),...r}));St.displayName=b.Content.displayName;function Ct(e){let{children:t,overlay:n,disabled:r,openDelay:i=200,open:a,onOpenChange:o,...s}=e,[c,u]=(0,l.useState)(!1),d=a!==void 0,p=d?a:c;function m(e){r||(d||u(e),o==null||o(e))}return(0,f.jsxs)(yt,{open:p,onOpenChange:m,openDelay:i,children:[(0,f.jsx)(xt,{asChild:!0,children:t}),(0,f.jsx)(bt,{children:(0,f.jsx)(St,{...s,children:n})})]})}function wt(e){let{keyboard:t,className:n}=e,r=t.split(`+`);return(0,f.jsx)(`span`,{className:T(`
442
+ univer-inline-block univer-h-6 univer-select-none univer-whitespace-nowrap univer-rounded-md
443
+ univer-bg-gray-50 univer-px-2 univer-font-mono univer-text-xs/6 univer-font-medium univer-text-gray-700
444
+ dark:!univer-bg-gray-700 dark:!univer-text-white
445
+ `,R,n),children:r.map((e,t)=>(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`kbd`,{className:`univer-inline-block univer-h-full`,children:e}),t<r.length-1&&(0,f.jsx)(`span`,{className:`univer-inline-block univer-h-full univer-px-1`,children:`+`})]},t))})}let q=function(e){return e.Success=`success`,e.Info=`info`,e.Warning=`warning`,e.Error=`error`,e.Loading=`loading`,e}({});const Tt=`univer-message-toaster`,Et=3e3,J=new Set,Dt=(0,f.jsx)(c.LoadingMultiIcon,{className:`univer-animate-spin univer-text-violet-500`});let Ot=0;const kt={[q.Success]:(0,f.jsx)(c.SuccessIcon,{className:`univer-text-green-500`}),[q.Info]:(0,f.jsx)(c.InfoIcon,{className:`
446
+ univer-text-sky-500
447
+ dark:!univer-text-sky-400
448
+ `}),[q.Warning]:(0,f.jsx)(c.WarningIcon,{className:`univer-text-amber-500`}),[q.Error]:(0,f.jsx)(c.ErrorIcon,{className:`univer-text-red-500`}),[q.Loading]:Dt},Y={[q.Success]:`[&_[data-icon]]:univer-text-green-500`,[q.Info]:`[&_[data-icon]]:univer-text-sky-500`,[q.Warning]:`[&_[data-icon]]:univer-text-amber-500`,[q.Error]:`[&_[data-icon]]:univer-text-red-500`,[q.Loading]:`[&_[data-icon]]:univer-text-violet-500`},At=e=>{switch(e){case q.Success:return x.toast.success;case q.Warning:return x.toast.warning;case q.Error:return x.toast.error;case q.Loading:return x.toast.loading;case q.Info:default:return x.toast.info}},jt=()=>{let e=`univer-message-${Ot}`;return Ot+=1,e},Mt=({className:e,...t})=>(0,f.jsx)(x.Toaster,{id:Tt,position:`top-center`,visibleToasts:4,closeButton:!1,expand:!1,icons:{loading:Dt},offset:{top:16},className:T(`
264
449
  [&_[data-sonner-toast]]:univer-bg-white/95
265
450
  dark:[&_[data-sonner-toast]]:!univer-bg-gray-800/95
266
451
  [&_[data-sonner-toast]]:univer-rounded-2xl [&_[data-sonner-toast]]:univer-border
@@ -268,30 +453,79 @@ html body {
268
453
  [&_[data-sonner-toast]]:univer-shadow-[0_16px_40px_-20px_rgba(15,23,42,0.55)]
269
454
  [&_[data-sonner-toast]]:univer-backdrop-blur-sm
270
455
  dark:[&_[data-sonner-toast]]:!univer-border-gray-600
271
- `,e),toastOptions:{duration:Xf,classNames:{toast:`
456
+ `,e),toastOptions:{duration:Et,classNames:{toast:`
272
457
  univer-group univer-min-h-0 univer-min-w-[320px] univer-max-w-[520px] univer-px-3.5 univer-py-3
273
458
  univer-font-sans univer-transition-all univer-duration-300
274
459
  `,title:`
275
460
  univer-m-0 univer-font-sans univer-text-sm univer-font-medium univer-leading-5 univer-text-gray-700
276
461
  dark:!univer-text-gray-100
277
- `,content:"univer-gap-2.5",icon:"[&>svg]:univer-block [&>svg]:univer-size-4",success:Lr.success,info:Lr.info,warning:Lr.warning,error:Lr.error,loading:Lr.loading}},...t}),Uw=({content:e,duration:t,id:n,onClose:r,type:o="info"})=>{const i=n!=null?n:Ww(),a=Vw(o);let s=!1;const c=()=>{s||(s=!0,Hr.delete(i),r==null||r())};return a(e,{id:i,toasterId:qf,duration:t!=null?t:Xf,icon:o==="loading"?void 0:Hw[o],onDismiss:c,onAutoClose:c}),Hr.add(i),i},Gw=e=>{if(typeof e<"u"){Nn.dismiss(e),Hr.delete(e);return}Hr.forEach(t=>{Nn.dismiss(t)}),Hr.clear()};function Jf(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Jo(e,t)}function Yw(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function Zw(e,t){e.classList?e.classList.add(t):Yw(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function Yu(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function qw(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=Yu(e.className,t):e.setAttribute("class",Yu(e.className&&e.className.baseVal||"",t))}const Zu={disabled:!1},ev=y.createContext(null);var tv=function(t){return t.scrollTop},zr="unmounted",Hn="exited",Vn="entering",sr="entered",ja="exiting",vn=(function(e){Jf(t,e);function t(r,o){var i;i=e.call(this,r,o)||this;var a=o,s=a&&!a.isMounting?r.enter:r.appear,c;return i.appearStatus=null,r.in?s?(c=Hn,i.appearStatus=Vn):c=sr:r.unmountOnExit||r.mountOnEnter?c=zr:c=Hn,i.state={status:c},i.nextCallback=null,i}t.getDerivedStateFromProps=function(o,i){var a=o.in;return a&&i.status===zr?{status:Hn}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(o){var i=null;if(o!==this.props){var a=this.state.status;this.props.in?a!==Vn&&a!==sr&&(i=Vn):(a===Vn||a===sr)&&(i=ja)}this.updateStatus(!1,i)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var o=this.props.timeout,i,a,s;return i=a=s=o,o!=null&&typeof o!="number"&&(i=o.exit,a=o.enter,s=o.appear!==void 0?o.appear:a),{exit:i,enter:a,appear:s}},n.updateStatus=function(o,i){if(o===void 0&&(o=!1),i!==null)if(this.cancelNextCallback(),i===Vn){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:ut.findDOMNode(this);a&&tv(a)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Hn&&this.setState({status:zr})},n.performEnter=function(o){var i=this,a=this.props.enter,s=this.context?this.context.isMounting:o,c=this.props.nodeRef?[s]:[ut.findDOMNode(this),s],l=c[0],f=c[1],u=this.getTimeouts(),m=s?u.appear:u.enter;if(!o&&!a||Zu.disabled){this.safeSetState({status:sr},function(){i.props.onEntered(l)});return}this.props.onEnter(l,f),this.safeSetState({status:Vn},function(){i.props.onEntering(l,f),i.onTransitionEnd(m,function(){i.safeSetState({status:sr},function(){i.props.onEntered(l,f)})})})},n.performExit=function(){var o=this,i=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:ut.findDOMNode(this);if(!i||Zu.disabled){this.safeSetState({status:Hn},function(){o.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:ja},function(){o.props.onExiting(s),o.onTransitionEnd(a.exit,function(){o.safeSetState({status:Hn},function(){o.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(o,i){i=this.setNextCallback(i),this.setState(o,i)},n.setNextCallback=function(o){var i=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,i.nextCallback=null,o(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(o,i){this.setNextCallback(i);var a=this.props.nodeRef?this.props.nodeRef.current:ut.findDOMNode(this),s=o==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var c=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],l=c[0],f=c[1];this.props.addEndListener(l,f)}o!=null&&setTimeout(this.nextCallback,o)},n.render=function(){var o=this.state.status;if(o===zr)return null;var i=this.props,a=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var s=bs(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return y.createElement(ev.Provider,{value:null},typeof a=="function"?a(o,s):y.cloneElement(y.Children.only(a),s))},t})(y.Component);vn.contextType=ev;vn.propTypes={};function ar(){}vn.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:ar,onEntering:ar,onEntered:ar,onExit:ar,onExiting:ar,onExited:ar};vn.UNMOUNTED=zr;vn.EXITED=Hn;vn.ENTERING=Vn;vn.ENTERED=sr;vn.EXITING=ja;var Xw=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return Zw(t,r)})},ia=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return qw(t,r)})},Is=(function(e){Jf(t,e);function t(){for(var r,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return r=e.call.apply(e,[this].concat(i))||this,r.appliedClasses={appear:{},enter:{},exit:{}},r.onEnter=function(s,c){var l=r.resolveArguments(s,c),f=l[0],u=l[1];r.removeClasses(f,"exit"),r.addClass(f,u?"appear":"enter","base"),r.props.onEnter&&r.props.onEnter(s,c)},r.onEntering=function(s,c){var l=r.resolveArguments(s,c),f=l[0],u=l[1],m=u?"appear":"enter";r.addClass(f,m,"active"),r.props.onEntering&&r.props.onEntering(s,c)},r.onEntered=function(s,c){var l=r.resolveArguments(s,c),f=l[0],u=l[1],m=u?"appear":"enter";r.removeClasses(f,m),r.addClass(f,m,"done"),r.props.onEntered&&r.props.onEntered(s,c)},r.onExit=function(s){var c=r.resolveArguments(s),l=c[0];r.removeClasses(l,"appear"),r.removeClasses(l,"enter"),r.addClass(l,"exit","base"),r.props.onExit&&r.props.onExit(s)},r.onExiting=function(s){var c=r.resolveArguments(s),l=c[0];r.addClass(l,"exit","active"),r.props.onExiting&&r.props.onExiting(s)},r.onExited=function(s){var c=r.resolveArguments(s),l=c[0];r.removeClasses(l,"exit"),r.addClass(l,"exit","done"),r.props.onExited&&r.props.onExited(s)},r.resolveArguments=function(s,c){return r.props.nodeRef?[r.props.nodeRef.current,s]:[s,c]},r.getClassNames=function(s){var c=r.props.classNames,l=typeof c=="string",f=l&&c?c+"-":"",u=l?""+f+s:c[s],m=l?u+"-active":c[s+"Active"],p=l?u+"-done":c[s+"Done"];return{baseClassName:u,activeClassName:m,doneClassName:p}},r}var n=t.prototype;return n.addClass=function(o,i,a){var s=this.getClassNames(i)[a+"ClassName"],c=this.getClassNames("enter"),l=c.doneClassName;i==="appear"&&a==="done"&&l&&(s+=" "+l),a==="active"&&o&&tv(o),s&&(this.appliedClasses[i][a]=s,Xw(o,s))},n.removeClasses=function(o,i){var a=this.appliedClasses[i],s=a.base,c=a.active,l=a.done;this.appliedClasses[i]={},s&&ia(o,s),c&&ia(o,c),l&&ia(o,l)},n.render=function(){var o=this.props;o.classNames;var i=bs(o,["classNames"]);return y.createElement(vn,Me({},i,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t})(y.Component);Is.defaultProps={classNames:""};Is.propTypes={};const No=2;function Qw(e){const{children:t,visible:n=!1,offset:r=[0,0],overflowVisible:o=!1,placementY:i="below"}=e,a=y.useRef(null),[s,c]=y.useState(r),{mountContainer:l}=y.useContext(Zt),f=()=>{const m=a.current;if(!m)return null;const[p,g]=r,{clientWidth:b,clientHeight:h}=m,{innerWidth:x,innerHeight:E}=window,w=Math.max(0,x-b-No),C=Math.max(0,E-h-No),S=Math.min(Math.max(p,0),w),R=i==="above"?g-h:g,L=Math.min(Math.max(R,0),C);return[S,L]};y.useEffect(()=>{if(!n){c([-9999,-9999]);return}const m=f();m&&c(m)},[r,i,n]),y.useEffect(()=>{if(!n)return;const m=()=>{const p=f();p&&c(p)};return window.addEventListener("resize",m),()=>{window.removeEventListener("resize",m)}},[r,i,n]);function u(m){m.preventDefault()}return ut.createPortal(v.jsx(Is,{in:n,nodeRef:a,timeout:500,classNames:{enter:"univer-popup-enter",enterActive:"univer-popup-enter-active",enterDone:"univer-popup-enter-done",exitActive:"univer-popup-exit",exitDone:"univer-popup-exit-active"},children:v.jsx("section",{ref:a,className:"univer-popup",style:{left:s[0]+No,top:s[1]+No,overflow:o?"visible":void 0},onContextMenu:u,children:t})}),l)}function Jw(e){const{children:t,className:n,style:r,value:o,disabled:i=!1,direction:a="horizontal",onChange:s}=e,c=l=>{s(l)};return v.jsx("div",{className:W("univer-flex univer-gap-2",{"univer-flex-col":a==="vertical"},n),style:r,children:y.Children.map(t,(l,f)=>y.isValidElement(l)?y.cloneElement(l,{key:f,children:l.props.children,value:l.props.value,checked:o===l.props.value,disabled:i!=null?i:l.props.disabled,onChange:c}):l)})}function eC(e){const{children:t,checked:n,value:r,disabled:o=!1,onChange:i}=e,a=y.useRef(null);function s(c){var l;if(c.stopPropagation(),!(!i||o))if(typeof r<"u")i&&i(r);else{const f=(l=a==null?void 0:a.current)==null?void 0:l.checked;i&&i(f)}}return v.jsxs("label",{"data-u-comp":"radio",className:W("univer-box-border univer-inline-flex univer-items-center univer-gap-2 univer-text-sm",{"univer-cursor-pointer univer-text-gray-900 dark:!univer-text-white":!o,"univer-text-gray-400":o}),children:[v.jsxs("span",{className:"univer-relative univer-block",children:[v.jsx("input",{ref:a,className:"univer-absolute univer-size-0 univer-opacity-0",type:"radio",checked:n,disabled:o,onChange:s}),v.jsx("span",{className:W("univer-relative univer-box-border univer-flex univer-size-4 univer-items-center univer-justify-center univer-overflow-hidden univer-rounded-full univer-border univer-border-solid univer-transition-colors",{"univer-opacity-50":o,"univer-border-primary-600 univer-bg-primary-600 dark:!univer-bg-primary-600":n,"univer-border-gray-300 univer-bg-gray-50 dark:!univer-border-gray-500 dark:!univer-bg-gray-600":!n}),children:n&&v.jsx("span",{className:"univer-absolute univer-left-1/2 univer-top-1/2 univer-block univer-size-2 -univer-translate-x-1/2 -univer-translate-y-1/2 univer-rounded-full univer-bg-white"})})]}),v.jsx("span",{children:t})]})}function tC(e){const{value:t,options:n=[],hideCheckMark:r=!1,onChange:o,multiple:i,className:a,optionClassName:s}=e,c=Array.isArray(t)?t:[t];function l(f){const u=c.indexOf(f);i?u>-1?o(c.filter(m=>m===f)):o([...c,f]):u>-1?o(void 0):o(f)}return v.jsx("ul",{className:W("univer-m-0 univer-grid univer-max-h-80 univer-list-none univer-gap-1 univer-overflow-y-auto univer-rounded univer-p-1.5",ct,kn,a),children:n.map((f,u)=>{const m=c.indexOf(f.value)>-1;return v.jsx("li",{children:v.jsxs("a",{className:W("univer-relative univer-block univer-cursor-pointer univer-select-none univer-rounded univer-py-1.5 univer-pl-8 univer-pr-2 univer-text-sm univer-text-gray-900 univer-transition-colors hover:univer-bg-gray-100 dark:!univer-text-white dark:hover:!univer-bg-gray-600",s,{"univer-bg-gray-200 dark:!univer-bg-gray-500":m}),onClick:()=>l(f.value),children:[!r&&m&&v.jsx(br,{className:"univer-absolute univer-left-0 univer-top-1/2 -univer-translate-y-1/2 univer-pl-2 univer-text-primary-600"}),v.jsx("span",{style:{color:f.color},children:f.label})]})},u)})})}const nv=W("univer-box-border univer-inline-flex univer-h-8 univer-min-w-36 univer-items-center univer-justify-between univer-gap-2 univer-rounded-lg univer-bg-white univer-px-2.5 univer-transition-colors univer-duration-200 dark:!univer-bg-gray-700 dark:!univer-text-white",ct);function nC(e){const{className:t,value:n,disabled:r=!1,options:o=[],borderless:i=!1,onChange:a}=e,[s,c]=y.useState(!1);function l(m){c(m)}const f=y.useMemo(()=>{const m=[];for(const p of o)p.options?(p.options.forEach(g=>{m.push({label:g.label,value:g.value,disabled:g.disabled})}),m.push({type:"separator"})):m.push({label:p.label,value:p.value,disabled:p.disabled});return[{type:"radio",value:n,hideIndicator:!0,options:m,onSelect:p=>{a(p)}}]},[o]),u=y.useMemo(()=>{let m=null;for(const p of o)if(p.options){for(const g of p.options)if(g.value===n){m=g.label;break}}else if(p.value===n){m=p.label;break}return m||n},[o,n]);return v.jsx(hs,{className:"max-h univer-w-[--radix-popper-anchor-width] univer-min-w-36",align:"start",open:s,items:f,disabled:r,onOpenChange:l,children:v.jsxs("div",{"data-u-comp":"select",className:W(nv,{"univer-border-primary-600 univer-outline-none univer-ring-2 univer-ring-primary-50 dark:!univer-ring-primary-900":s&&!i,"univer-border-transparent univer-bg-transparent hover:univer-border-transparent":i,"univer-cursor-not-allowed":r,"hover:univer-border-primary-600":!r&&!i,"univer-cursor-pointer":!r&&!s},t),children:[v.jsx("div",{className:"univer-flex-1 univer-truncate univer-text-sm univer-text-gray-500 dark:!univer-text-white",children:u}),v.jsx($a,{className:"univer-flex-shrink-0 dark:!univer-text-white"})]})})}function rC(e){const{className:t,value:n=[],disabled:r=!1,options:o=[],borderless:i=!1,onChange:a}=e,[s,c]=y.useState(!1);function l(p){c(p)}const f=y.useMemo(()=>o.map(p=>({type:"checkbox",value:p.value,label:p.label,disabled:p.disabled,checked:n.includes(p.value),onSelect:g=>{const b=n.includes(g)?n.filter(h=>h!==g):[...n,g];a(b)}})),[o]);function u(p){const g=n.filter(b=>b!==p);a(g)}const m=y.useMemo(()=>o.filter(p=>n.includes(p.value)).map((p,g)=>v.jsx(wl,{className:"univer-max-w-32",closable:!0,onClose:()=>u(p.value),children:p.label},g)),[o,n]);return v.jsx(hs,{className:"univer-w-[--radix-popper-anchor-width] univer-min-w-36",align:"start",open:s,items:f,disabled:r,onOpenChange:l,children:v.jsxs("div",{"data-u-comp":"multiple-select",className:W(nv,{"univer-border-primary-600 univer-outline-none univer-ring-2 univer-ring-primary-50 dark:!univer-ring-primary-900":s&&!i,"univer-border-transparent univer-bg-transparent hover:univer-border-transparent":i,"univer-cursor-not-allowed":r,"hover:univer-border-primary-600":!r&&!i,"univer-cursor-pointer":!r&&!s},t),children:[v.jsx("div",{className:"univer-box-border univer-flex univer-w-[calc(100%-16px)] univer-gap-2 univer-pr-2",children:m}),v.jsx($a,{className:"univer-flex-shrink-0 dark:!univer-text-white"})]})})}var oC=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],iC=oC.reduce((e,t)=>{const n=El(`Primitive.${t}`),r=d.forwardRef((o,i)=>{const{asChild:a,...s}=o,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(c,{...s,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),aC="Separator",qu="horizontal",sC=["horizontal","vertical"],rv=d.forwardRef((e,t)=>{const{decorative:n,orientation:r=qu,...o}=e,i=uC(r)?r:qu,s=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return v.jsx(iC.div,{"data-orientation":i,...s,...o,ref:t})});rv.displayName=aC;function uC(e){return sC.includes(e)}var lC=rv;function cC({className:e,orientation:t="horizontal",decorative:n=!0,...r}){return v.jsx(lC,{"data-u-comp":"separator","data-slot":"separator-root",decorative:n,orientation:t,className:W(`
462
+ `,content:`univer-gap-2.5`,icon:`[&>svg]:univer-block [&>svg]:univer-size-4`,success:Y[q.Success],info:Y[q.Info],warning:Y[q.Warning],error:Y[q.Error],loading:Y[q.Loading]}},...t}),Nt=({content:e,duration:t,id:n,onClose:r,type:i=q.Info})=>{let a=n==null?jt():n,o=At(i),s=!1,c=()=>{s||(s=!0,J.delete(a),r==null||r())};return o(e,{id:a,toasterId:Tt,duration:t==null?Et:t,icon:i===q.Loading?void 0:kt[i],onDismiss:c,onAutoClose:c}),J.add(a),a},Pt=e=>{if(e!==void 0){x.toast.dismiss(e),J.delete(e);return}J.forEach(e=>{x.toast.dismiss(e)}),J.clear()};function Ft(e){let{children:t,visible:n=!1,offset:r=[0,0],overflowVisible:i=!1,placementY:a=`below`}=e,o=(0,l.useRef)(null),[s,c]=(0,l.useState)(r),{mountContainer:u}=(0,l.useContext)(P),d=()=>{let e=o.current;if(!e)return null;let[t,n]=r,{clientWidth:i,clientHeight:s}=e,{innerWidth:c,innerHeight:l}=window,u=Math.max(0,c-i-2),d=Math.max(0,l-s-2),f=Math.min(Math.max(t,0),u),p=a===`above`?n-s:n;return[f,Math.min(Math.max(p,0),d)]};(0,l.useEffect)(()=>{if(!n){c([-9999,-9999]);return}let e=d();e&&c(e)},[r,a,n]),(0,l.useEffect)(()=>{if(!n)return;let e=()=>{let e=d();e&&c(e)};return window.addEventListener(`resize`,e),()=>{window.removeEventListener(`resize`,e)}},[r,a,n]);function p(e){e.preventDefault()}return(0,v.createPortal)((0,f.jsx)(S.CSSTransition,{in:n,nodeRef:o,timeout:500,classNames:{enter:`univer-popup-enter`,enterActive:`univer-popup-enter-active`,enterDone:`univer-popup-enter-done`,exitActive:`univer-popup-exit`,exitDone:`univer-popup-exit-active`},children:(0,f.jsx)(`section`,{ref:o,className:`univer-popup`,style:{left:s[0]+2,top:s[1]+2,overflow:i?`visible`:void 0},onContextMenu:p,children:t})}),u)}function It(e){let{children:t,className:n,style:r,value:i,disabled:a=!1,direction:o=`horizontal`,onChange:s}=e,c=e=>{s(e)};return(0,f.jsx)(`div`,{className:T(`univer-flex univer-gap-2`,{"univer-flex-col":o===`vertical`},n),style:r,children:l.Children.map(t,(e,t)=>(0,l.isValidElement)(e)?(0,l.cloneElement)(e,{key:t,children:e.props.children,value:e.props.value,checked:i===e.props.value,disabled:a==null?e.props.disabled:a,onChange:c}):e)})}function Lt(e){let{children:t,checked:n,value:r,disabled:i=!1,onChange:a}=e,o=(0,l.useRef)(null);function s(e){if(e.stopPropagation(),!(!a||i))if(r!==void 0)a&&a(r);else{let e=o.current.checked;a&&a(e)}}return(0,f.jsxs)(`label`,{"data-u-comp":`radio`,className:T(`univer-box-border univer-inline-flex univer-items-center univer-gap-2 univer-text-sm`,{"univer-cursor-pointer univer-text-gray-900 dark:!univer-text-white":!i,"univer-text-gray-400":i}),children:[(0,f.jsxs)(`span`,{className:`univer-relative univer-block`,children:[(0,f.jsx)(`input`,{ref:o,className:`univer-absolute univer-size-0 univer-opacity-0`,type:`radio`,checked:n,disabled:i,onChange:s}),(0,f.jsx)(`span`,{className:T(`
463
+ univer-relative univer-box-border univer-flex univer-size-4 univer-items-center
464
+ univer-justify-center univer-overflow-hidden univer-rounded-full univer-border univer-border-solid
465
+ univer-transition-colors
466
+ `,{"univer-opacity-50":i,"univer-border-primary-600 univer-bg-primary-600 dark:!univer-bg-primary-600":n,"univer-border-gray-300 univer-bg-gray-50 dark:!univer-border-gray-500 dark:!univer-bg-gray-600":!n}),children:n&&(0,f.jsx)(`span`,{className:`
467
+ univer-absolute univer-left-1/2 univer-top-1/2 univer-block univer-size-2
468
+ -univer-translate-x-1/2 -univer-translate-y-1/2 univer-rounded-full univer-bg-white
469
+ `})})]}),(0,f.jsx)(`span`,{children:t})]})}function Rt(e){let{value:t,options:n=[],hideCheckMark:r=!1,onChange:i,multiple:a,className:o,optionClassName:s}=e,l=Array.isArray(t)?t:[t];function u(e){let t=l.indexOf(e);i(a?t>-1?l.filter(t=>t===e):[...l,e]:t>-1?void 0:e)}return(0,f.jsx)(`ul`,{className:T(`
470
+ univer-m-0 univer-grid univer-max-h-80 univer-list-none univer-gap-1 univer-overflow-y-auto univer-rounded
471
+ univer-p-1.5
472
+ `,R,I,o),children:n.map((e,t)=>{let n=l.indexOf(e.value)>-1;return(0,f.jsx)(`li`,{children:(0,f.jsxs)(`a`,{className:T(`
473
+ univer-relative univer-block univer-cursor-pointer univer-select-none univer-rounded
474
+ univer-py-1.5 univer-pl-8 univer-pr-2 univer-text-sm univer-text-gray-900
475
+ univer-transition-colors
476
+ hover:univer-bg-gray-100
477
+ dark:!univer-text-white
478
+ dark:hover:!univer-bg-gray-600
479
+ `,s,{"univer-bg-gray-200 dark:!univer-bg-gray-500":n}),onClick:()=>u(e.value),children:[!r&&n&&(0,f.jsx)(c.CheckMarkIcon,{className:`
480
+ univer-absolute univer-left-0 univer-top-1/2 -univer-translate-y-1/2
481
+ univer-pl-2 univer-text-primary-600
482
+ `}),(0,f.jsx)(`span`,{style:{color:e.color},children:e.label})]})},t)})})}const zt=T(`
483
+ univer-box-border univer-inline-flex univer-h-8 univer-min-w-36 univer-items-center univer-justify-between
484
+ univer-gap-2 univer-rounded-lg univer-bg-white univer-px-2.5 univer-transition-colors univer-duration-200
485
+ dark:!univer-bg-gray-700 dark:!univer-text-white
486
+ `,R);function Bt(e){let{className:t,value:n,disabled:r=!1,options:i=[],borderless:a=!1,onChange:o}=e,[s,u]=(0,l.useState)(!1);function d(e){u(e)}let p=(0,l.useMemo)(()=>{let e=[];for(let t of i)t.options?(t.options.forEach(t=>{e.push({label:t.label,value:t.value,disabled:t.disabled})}),e.push({type:`separator`})):e.push({label:t.label,value:t.value,disabled:t.disabled});return[{type:`radio`,value:n,hideIndicator:!0,options:e,onSelect:e=>{o(e)}}]},[i]),m=(0,l.useMemo)(()=>{let e=null;for(let t of i)if(t.options){for(let r of t.options)if(r.value===n){e=r.label;break}}else if(t.value===n){e=t.label;break}return e||n},[i,n]);return(0,f.jsx)(ot,{className:`max-h univer-w-[--radix-popper-anchor-width] univer-min-w-36`,align:`start`,open:s,items:p,disabled:r,onOpenChange:d,children:(0,f.jsxs)(`div`,{"data-u-comp":`select`,className:T(zt,{"univer-border-primary-600 univer-outline-none univer-ring-2 univer-ring-primary-50 dark:!univer-ring-primary-900":s&&!a,"univer-border-transparent univer-bg-transparent hover:univer-border-transparent":a,"univer-cursor-not-allowed":r,"hover:univer-border-primary-600":!r&&!a,"univer-cursor-pointer":!r&&!s},t),children:[(0,f.jsx)(`div`,{className:`
487
+ univer-flex-1 univer-truncate univer-text-sm univer-text-gray-500
488
+ dark:!univer-text-white
489
+ `,children:m}),(0,f.jsx)(c.MoreDownIcon,{className:`
490
+ univer-flex-shrink-0
491
+ dark:!univer-text-white
492
+ `})]})})}function Vt(e){let{className:t,value:n=[],disabled:r=!1,options:i=[],borderless:a=!1,onChange:o}=e,[s,u]=(0,l.useState)(!1);function d(e){u(e)}let p=(0,l.useMemo)(()=>i.map(e=>({type:`checkbox`,value:e.value,label:e.label,disabled:e.disabled,checked:n.includes(e.value),onSelect:e=>{o(n.includes(e)?n.filter(t=>t!==e):[...n,e])}})),[i]);function m(e){o(n.filter(t=>t!==e))}let h=(0,l.useMemo)(()=>i.filter(e=>n.includes(e.value)).map((e,t)=>(0,f.jsx)(k,{className:`univer-max-w-32`,closable:!0,onClose:()=>m(e.value),children:e.label},t)),[i,n]);return(0,f.jsx)(ot,{className:`univer-w-[--radix-popper-anchor-width] univer-min-w-36`,align:`start`,open:s,items:p,disabled:r,onOpenChange:d,children:(0,f.jsxs)(`div`,{"data-u-comp":`multiple-select`,className:T(zt,{"univer-border-primary-600 univer-outline-none univer-ring-2 univer-ring-primary-50 dark:!univer-ring-primary-900":s&&!a,"univer-border-transparent univer-bg-transparent hover:univer-border-transparent":a,"univer-cursor-not-allowed":r,"hover:univer-border-primary-600":!r&&!a,"univer-cursor-pointer":!r&&!s},t),children:[(0,f.jsx)(`div`,{className:`univer-box-border univer-flex univer-w-[calc(100%-16px)] univer-gap-2 univer-pr-2`,children:h}),(0,f.jsx)(c.MoreDownIcon,{className:`
493
+ univer-flex-shrink-0
494
+ dark:!univer-text-white
495
+ `})]})})}function Ht({className:e,orientation:t=`horizontal`,decorative:n=!0,...r}){return(0,f.jsx)(C.Root,{"data-u-comp":`separator`,"data-slot":`separator-root`,decorative:n,orientation:t,className:T(`
278
496
  univer-shrink-0 univer-bg-gray-200
279
497
  data-[orientation=horizontal]:univer-h-px
280
498
  data-[orientation=vertical]:univer-h-full
281
499
  data-[orientation=horizontal]:univer-w-full
282
500
  data-[orientation=vertical]:univer-w-px
283
501
  dark:!univer-bg-gray-600
284
- `,e),...r})}const dC=e=>{const{defaultChecked:t=!1,onChange:n}=e,[r,o]=y.useState(t),i=()=>{o(!r),n==null||n(!r)};return y.useEffect(()=>{o(t)},[t]),v.jsx("div",{className:"univer-h-4",children:v.jsxs("label",{className:"univer-relative univer-inline-block univer-h-4 univer-w-7",children:[v.jsx("input",{className:"univer-size-0 univer-opacity-0",type:"checkbox",checked:r,onChange:i}),v.jsx("span",{className:W("univer-absolute univer-inset-0 univer-cursor-pointer univer-rounded-2xl univer-transition-colors univer-duration-200",{"univer-bg-primary-600":r,"univer-bg-gray-200 dark:!univer-bg-gray-600":!r}),children:v.jsx("span",{className:W("univer-absolute univer-bottom-0.5 univer-left-0.5 univer-size-3 univer-rounded-full univer-bg-white univer-transition-transform univer-duration-200",{"univer-translate-x-3":r})})})]})})},fC=y.forwardRef((e,t)=>{const n=y.useRef(null),r=y.useRef({width:0,height:0}),{className:o,onResize:i,onValueChange:a,...s}=e;y.useImperativeHandle(t,()=>n.current,[]),y.useLayoutEffect(()=>{const l=n.current;if(l&&i){const f=new ResizeObserver(u=>{const{width:m,height:p}=u[0].target.getBoundingClientRect();m===0||p===0||(r.current.width!==m||r.current.height!==p)&&(r.current={width:m,height:p},i(m,p))});return f.observe(l),()=>{f.unobserve(l),f.disconnect()}}},[i]);function c(l){const f=l.target.value;a==null||a(f)}return v.jsx("textarea",{ref:n,"data-u-comp":"textarea","data-slot":"textarea",className:W(`
502
+ `,e),...r})}const Ut=e=>{let{defaultChecked:t=!1,onChange:n}=e,[r,i]=(0,l.useState)(t);return(0,l.useEffect)(()=>{i(t)},[t]),(0,f.jsx)(`div`,{className:`univer-h-4`,children:(0,f.jsxs)(`label`,{className:`univer-relative univer-inline-block univer-h-4 univer-w-7`,children:[(0,f.jsx)(`input`,{className:`univer-size-0 univer-opacity-0`,type:`checkbox`,checked:r,onChange:()=>{i(!r),n==null||n(!r)}}),(0,f.jsx)(`span`,{className:T(`
503
+ univer-absolute univer-inset-0 univer-cursor-pointer univer-rounded-2xl univer-transition-colors
504
+ univer-duration-200
505
+ `,{"univer-bg-primary-600":r,"univer-bg-gray-200 dark:!univer-bg-gray-600":!r}),children:(0,f.jsx)(`span`,{className:T(`
506
+ univer-absolute univer-bottom-0.5 univer-left-0.5 univer-size-3 univer-rounded-full
507
+ univer-bg-white univer-transition-transform univer-duration-200
508
+ `,{"univer-translate-x-3":r})})})]})})},Wt=(0,l.forwardRef)((e,t)=>{let n=(0,l.useRef)(null),r=(0,l.useRef)({width:0,height:0}),{className:i,onResize:a,onValueChange:o,...s}=e;(0,l.useImperativeHandle)(t,()=>n.current,[]),(0,l.useLayoutEffect)(()=>{let e=n.current;if(e&&a){let t=new ResizeObserver(e=>{let{width:t,height:n}=e[0].target.getBoundingClientRect();t===0||n===0||(r.current.width!==t||r.current.height!==n)&&(r.current={width:t,height:n},a(t,n))});return t.observe(e),()=>{t.unobserve(e),t.disconnect()}}},[a]);function c(e){let t=e.target.value;o==null||o(t)}return(0,f.jsx)(`textarea`,{ref:n,"data-u-comp":`textarea`,"data-slot":`textarea`,className:T(`
285
509
  univer-box-border univer-flex univer-w-full univer-resize univer-rounded-md univer-bg-transparent
286
510
  univer-p-2 univer-text-base univer-text-gray-900 univer-outline-none
287
511
  univer-transition-[color,box-shadow]
288
512
  placeholder:univer-text-gray-200
289
513
  disabled:univer-cursor-not-allowed disabled:univer-opacity-50
290
514
  dark:!univer-text-white
291
- `,ct,kn,o),onChange:c,...s})});function vC({visibleToasts:e,...t}){return v.jsx(Yf,{className:"dark:![&_[data-description]]:univer-text-gray-200 [&_[data-description]]:univer-text-sm [&_[data-description]]:univer-text-gray-600 [&_[data-icon]>svg]:univer-relative [&_[data-icon]>svg]:univer-top-1 [&_[data-icon]]:univer-self-baseline [&_[data-sonner-toast]]:univer-shadow-md [&_[data-title]]:univer-text-sm [&_[data-title]]:univer-text-gray-900",toastOptions:{classNames:{content:"univer-leading-normal",success:"[&_[data-icon]]:univer-text-green-500",info:"[&_[data-icon]]:univer-text-primary-600",error:"[&_[data-icon]]:univer-text-red-500",warning:"[&_[data-icon]]:univer-text-yellow-500"}},visibleToasts:e!=null?e:5,...t})}function mC(e){const{data:t,itemKey:n,children:r,height:o,itemHeight:i,overscan:a=2,className:s,style:c}=e,[l,f]=y.useState(0);if(!o||!i||i<=0)return v.jsx("div",{className:s,style:c,children:t.map((x,E)=>{const w=typeof n=="function"?n(x):x[n];return v.jsx("div",{children:r(x,E)},w)})});const u=Math.max(0,Math.floor(l/i)-a),m=Math.ceil(o/i)+a*2,p=Math.min(t.length,u+m),g=u*i,b=t.length*i,h=t.slice(u,p);return v.jsx("div",{className:s,style:{...c,height:o,overflowY:"auto"},onScroll:x=>f(x.currentTarget.scrollTop),children:v.jsx("div",{style:{height:b,position:"relative"},children:v.jsx("div",{style:{transform:`translateY(${g}px)`},children:h.map((x,E)=>{const w=typeof n=="function"?n(x):x[n];return v.jsx("div",{children:r(x,u+E)},w)})})})})}const ov=(e,t)=>{const n=[],r=o=>{var i;if(n.push(o.key),t===o.key||(i=o.children)!=null&&i.length&&o.children.some(r))return!0;n.pop()};return e.some(r),n},iv=(e,t)=>{const n=t!=null?t:new Map;let r=e;return{findNodePathFromTreeWithCache:o=>{const i=n.get(o);if(i)return i;const a=ov(r,o);return a.map((c,l,f)=>{const u=[];for(let m=0;m<=l;m++)u.push(f[m]);return u}).reverse().forEach(c=>{const l=c[c.length-1];n.set(l,c)}),a},reset:o=>{n.clear(),o&&(r=o)}}},ri=(e,t)=>t.length?t.reduce((n,r)=>{const o=n.find(i=>i.key===r);return(o==null?void 0:o.children)||[]},e):e,pC=(e,t)=>{const n=t.slice(0),r=n.pop();return ri(e,n).find(i=>i.key===r)},hC=(e,t,n)=>{const r=new Set(t),o=n[n.length-1],i=ri(e,n);if(r.has(o)){if(i.length){const s=c=>{r.delete(c.key),c.children&&c.children.forEach(l=>s(l))};i.forEach(s)}n.map((s,c,l)=>{const f=[];for(let u=0;u<=c;u++)f.push(l[u]);return f}).reverse().some(s=>{const c=ri(e,s),l=s[s.length-1];if(c.every(f=>!r.has(f.key)))r.delete(l);else return!0;return!1})}else{const a=s=>{r.add(s.key),s.children&&s.children.forEach(c=>a(c))};n.forEach(s=>r.add(s)),i.length&&i.forEach(a)}return[...r]},gC=(e,t)=>{const n=t.children||[],r=o=>{var i;return(i=o.children)!=null&&i.length?!!o.children.every(r):e.has(o.key)};return n.length?n.some(o=>!r(o)):!1},bC=(e,t)=>{const n=[],r=iv(e);return t.forEach(o=>{var s;const i=r.findNodePathFromTreeWithCache(o),a=pC(e,i);a&&((s=a.children)!=null&&s.length||n.push(a))}),n};var av=(e=>(e[e.ONLY_LEAF_NODE=0]="ONLY_LEAF_NODE",e[e.ALL=1]="ALL",e))(av||{});function sv(e,t,n=1){const r=[];return e.forEach(o=>{r.push({...o,level:n}),o.children&&t.has(o.key)&&r.push(...sv(o.children,t,n+1))}),r}function yC(e){const{data:t=[],defaultCache:n,style:r,defaultExpandAll:o=!1,selectionMode:i=1,valueGroup:a=[],onChange:s,onExpend:c,height:l=200,itemHeight:f=32,attachRender:u}=e,[m,p]=y.useState({}),g=y.useMemo(()=>new Set,[]),b=y.useMemo(()=>iv(t,n),[t,n]),h=y.useMemo(()=>{const C=new Set;return a.forEach(S=>{b.findNodePathFromTreeWithCache(S).forEach(L=>C.add(L))}),C},[a,b]);y.useEffect(()=>{function C(S){var R;g.add(S.key),(R=S.children)==null||R.forEach(C)}o&&t.forEach(C),p({})},[o,t]);const x=y.useMemo(()=>sv(t,g),[t,m,g]);function E(C){var S;(S=C.children)!=null&&S.length&&(g.has(C.key)?g.delete(C.key):g.add(C.key),p({})),!(i===0&&C.children)&&(c==null||c(C.key))}function w(C){const{title:S,key:R,level:L=0}=C,D=e.treeNodeClassName,H=g.has(R),k=h.has(R),T=gC(h,C);return v.jsx("div",{className:W("univer-relative univer-text-[13px]",D),style:{paddingLeft:`${L*20}px`},children:v.jsxs("div",{className:"univer-relative univer-my-1 univer-flex univer-w-full univer-items-center",children:[C.children&&C.children.length>0&&v.jsx("span",{className:W("univer-absolute univer-left-[-16px] univer-top-1/2 univer-flex univer--translate-y-1/2 univer-items-center univer-justify-center univer-text-[8px]",{"univer-rotate-[-90deg]":!H}),onClick:F=>{F.stopPropagation(),E(C)},children:v.jsx(rl,{})}),v.jsx(Nl,{checked:k&&!T,indeterminate:k&&T,onChange:()=>{s==null||s(C)}}),v.jsx("div",{className:`
515
+ `,R,I,i),onChange:c,...s})});function Gt({visibleToasts:e,...t}){return(0,f.jsx)(x.Toaster,{className:`
516
+ dark:![&_[data-description]]:univer-text-gray-200
517
+ [&_[data-description]]:univer-text-sm [&_[data-description]]:univer-text-gray-600
518
+ [&_[data-icon]>svg]:univer-relative [&_[data-icon]>svg]:univer-top-1
519
+ [&_[data-icon]]:univer-self-baseline
520
+ [&_[data-sonner-toast]]:univer-shadow-md
521
+ [&_[data-title]]:univer-text-sm [&_[data-title]]:univer-text-gray-900
522
+ `,toastOptions:{classNames:{content:`univer-leading-normal`,success:`[&_[data-icon]]:univer-text-green-500`,info:`[&_[data-icon]]:univer-text-primary-600`,error:`[&_[data-icon]]:univer-text-red-500`,warning:`[&_[data-icon]]:univer-text-yellow-500`}},visibleToasts:e==null?5:e,...t})}function Kt(e){let{data:t,itemKey:n,children:r,height:i,itemHeight:a,overscan:o=2,className:s,style:c}=e,[u,d]=(0,l.useState)(0);if(!i||!a||a<=0)return(0,f.jsx)(`div`,{className:s,style:c,children:t.map((e,t)=>{let i=typeof n==`function`?n(e):e[n];return(0,f.jsx)(`div`,{children:r(e,t)},i)})});let p=Math.max(0,Math.floor(u/a)-o),m=Math.ceil(i/a)+o*2,h=Math.min(t.length,p+m),g=p*a,_=t.length*a,v=t.slice(p,h);return(0,f.jsx)(`div`,{className:s,style:{...c,height:i,overflowY:`auto`},onScroll:e=>d(e.currentTarget.scrollTop),children:(0,f.jsx)(`div`,{style:{height:_,position:`relative`},children:(0,f.jsx)(`div`,{style:{transform:`translateY(${g}px)`},children:v.map((e,t)=>{let i=typeof n==`function`?n(e):e[n];return(0,f.jsx)(`div`,{children:r(e,p+t)},i)})})})})}const qt=(e,t)=>{let n=[],r=e=>{var i;if(n.push(e.key),t===e.key||(i=e.children)!=null&&i.length&&e.children.some(r))return!0;n.pop()};return e.some(r),n},Jt=(e,t)=>{let n=t==null?new Map:t,r=e;return{findNodePathFromTreeWithCache:e=>{let t=n.get(e);if(t)return t;let i=qt(r,e);return i.map((e,t,n)=>{let r=[];for(let e=0;e<=t;e++)r.push(n[e]);return r}).reverse().forEach(e=>{let t=e[e.length-1];n.set(t,e)}),i},reset:e=>{n.clear(),e&&(r=e)}}},X=(e,t)=>t.length?t.reduce((e,t)=>{let n=e.find(e=>e.key===t);return(n==null?void 0:n.children)||[]},e):e,Yt=(e,t)=>{let n=t.slice(0),r=n.pop();return X(e,n).find(e=>e.key===r)},Xt=(e,t,n)=>{let r=new Set(t),i=n[n.length-1],a=X(e,n);if(r.has(i)){if(a.length){let e=t=>{r.delete(t.key),t.children&&t.children.forEach(t=>e(t))};a.forEach(e)}n.map((e,t,n)=>{let r=[];for(let e=0;e<=t;e++)r.push(n[e]);return r}).reverse().some(t=>{let n=X(e,t),i=t[t.length-1];if(n.every(e=>!r.has(e.key)))r.delete(i);else return!0;return!1})}else{let e=t=>{r.add(t.key),t.children&&t.children.forEach(t=>e(t))};n.forEach(e=>r.add(e)),a.length&&a.forEach(e)}return[...r]},Zt=(e,t)=>{let n=t.children||[],r=t=>{var n;return(n=t.children)!=null&&n.length?!!t.children.every(r):e.has(t.key)};return n.length?n.some(e=>!r(e)):!1},Qt=(e,t)=>{let n=[],r=Jt(e);return t.forEach(t=>{let i=Yt(e,r.findNodePathFromTreeWithCache(t));if(i){var a;(a=i.children)!=null&&a.length||n.push(i)}}),n};let $t=function(e){return e[e.ONLY_LEAF_NODE=0]=`ONLY_LEAF_NODE`,e[e.ALL=1]=`ALL`,e}({});function en(e,t,n=1){let r=[];return e.forEach(e=>{r.push({...e,level:n}),e.children&&t.has(e.key)&&r.push(...en(e.children,t,n+1))}),r}function tn(e){let{data:t=[],defaultCache:n,style:r,defaultExpandAll:i=!1,selectionMode:a=$t.ALL,valueGroup:o=[],onChange:s,onExpend:u,height:d=200,itemHeight:p=32,attachRender:m}=e,[h,g]=(0,l.useState)({}),_=(0,l.useMemo)(()=>new Set,[]),v=(0,l.useMemo)(()=>Jt(t,n),[t,n]),y=(0,l.useMemo)(()=>{let e=new Set;return o.forEach(t=>{v.findNodePathFromTreeWithCache(t).forEach(t=>e.add(t))}),e},[o,v]);(0,l.useEffect)(()=>{function e(t){var n;_.add(t.key),(n=t.children)==null||n.forEach(e)}i&&t.forEach(e),g({})},[i,t]);let b=(0,l.useMemo)(()=>en(t,_),[t,h,_]);function x(e){var t;(t=e.children)!=null&&t.length&&(_.has(e.key)?_.delete(e.key):_.add(e.key),g({})),!(a===$t.ONLY_LEAF_NODE&&e.children)&&(u==null||u(e.key))}function S(t){let{title:n,key:r,level:i=0}=t,a=e.treeNodeClassName,o=_.has(r),l=y.has(r),u=Zt(y,t);return(0,f.jsx)(`div`,{className:T(`univer-relative univer-text-[13px]`,a),style:{paddingLeft:`${i*20}px`},children:(0,f.jsxs)(`div`,{className:`univer-relative univer-my-1 univer-flex univer-w-full univer-items-center`,children:[t.children&&t.children.length>0&&(0,f.jsx)(`span`,{className:T(`
523
+ univer-absolute univer-left-[-16px] univer-top-1/2 univer-flex univer--translate-y-1/2
524
+ univer-items-center univer-justify-center univer-text-[8px]
525
+ `,{"univer-rotate-[-90deg]":!o}),onClick:e=>{e.stopPropagation(),x(t)},children:(0,f.jsx)(c.DropdownIcon,{})}),(0,f.jsx)(ue,{checked:l&&!u,indeterminate:l&&u,onChange:()=>{s==null||s(t)}}),(0,f.jsx)(`div`,{className:`
292
526
  univer-mx-1 univer-flex univer-h-full univer-shrink univer-items-center univer-overflow-hidden
293
527
  univer-text-ellipsis univer-whitespace-nowrap
294
- `,onClick:F=>{F.stopPropagation(),E(C)},children:v.jsx(yi,{className:"univer-block",showIfEllipsis:!0,placement:"top",title:S,children:v.jsx("span",{className:"univer-block",children:S})})}),u&&u(C)]})},R)}return v.jsx("section",{className:`
528
+ `,onClick:e=>{e.stopPropagation(),x(t)},children:(0,f.jsx)(gt,{className:`univer-block`,showIfEllipsis:!0,placement:`top`,title:n,children:(0,f.jsx)(`span`,{className:`univer-block`,children:n})})}),m&&m(t)]})},r)}return(0,f.jsx)(`section`,{className:`
295
529
  univer-relative univer-select-none univer-text-gray-900
296
530
  dark:!univer-text-white
297
- `,children:v.jsx("div",{className:"univer-m-0 univer-h-full univer-list-none univer-p-0",style:r,children:v.jsx(mC,{data:x,itemKey:C=>C.key,height:l,itemHeight:f,children:C=>w(C)})})})}const oi=new WeakMap;function xC(e,t){let n=oi.get(t);n||(n=uv.createRoot(t),oi.set(t,n)),n.render(e)}function wC(e){const t=oi.get(e);t&&(t.unmount(),oi.delete(e))}const aa=new Set;let Po;function CC(e){return Po||(Po=new ResizeObserver((...t)=>{aa.forEach(n=>n(...t))})),{observe(t,n){aa.add(e),Po.observe(t,n)},unobserve(t){aa.delete(e),Po.unobserve(t)}}}exports.Accordion=lm;exports.Avatar=dm;exports.Badge=wl;exports.Button=un;exports.ButtonGroup=wm;exports.Calendar=Fo;exports.CascaderList=Tm;exports.Checkbox=Nl;exports.CheckboxGroup=Om;exports.ColorPicker=fc;exports.ConfigContext=Zt;exports.ConfigProvider=Cm;exports.Confirm=Ih;exports.DatePicker=m0;exports.DateRangePicker=p0;exports.Dialog=Ga;exports.DraggableList=g0;exports.Dropdown=ss;exports.DropdownMenu=hs;exports.FormDualColumnLayout=ub;exports.FormLayout=sb;exports.Gallery=lb;exports.GradientColorPicker=fb;exports.HoverCard=Mb;exports.Input=Bd;exports.InputNumber=pa;exports.KBD=Nb;exports.Menu=dw;exports.MenuItem=fw;exports.MenuItemGroup=mw;exports.MessageType=Zf;exports.Messager=Kw;exports.MultipleSelect=rC;exports.Pager=zd;exports.Popup=Qw;exports.Radio=eC;exports.RadioGroup=Jw;exports.Segmented=Hd;exports.Select=nC;exports.SelectList=tC;exports.Separator=cC;exports.SubMenu=vw;exports.Switch=dC;exports.Textarea=fC;exports.TimeInput=Ml;exports.TinyMenuGroup=pw;exports.Toaster=vC;exports.Tooltip=yi;exports.Tree=yC;exports.TreeSelectionMode=av;exports.borderBottomClassName=Pm;exports.borderClassName=ct;exports.borderLeftBottomClassName=Mm;exports.borderLeftClassName=Rl;exports.borderRightClassName=km;exports.borderTopClassName=Nm;exports.clsx=W;exports.divideXClassName=Im;exports.divideYClassName=_m;exports.filterLeafNode=bC;exports.findNodePathFromTree=ov;exports.findSubTreeFromPath=ri;exports.isBrowser=Ba;exports.mergeTreeSelected=hC;exports.message=Uw;exports.removeMessage=Gw;exports.render=xC;exports.resizeObserverCtor=CC;exports.scrollbarClassName=kn;exports.toast=Nn;exports.unmount=wC;
531
+ `,children:(0,f.jsx)(`div`,{className:`univer-m-0 univer-h-full univer-list-none univer-p-0`,style:r,children:(0,f.jsx)(Kt,{data:b,itemKey:e=>e.key,height:d,itemHeight:p,children:e=>S(e)})})})}const Z=new WeakMap;function nn(e,t){let n=Z.get(t);n||(n=(0,w.createRoot)(t),Z.set(t,n)),n.render(e)}function rn(e){let t=Z.get(e);t&&(t.unmount(),Z.delete(e))}const Q=new Set;let $;function an(e){return $||($=new ResizeObserver((...e)=>{Q.forEach(t=>t(...e))})),{observe(t,n){Q.add(e),$.observe(t,n)},unobserve(t){Q.delete(e),$.unobserve(t)}}}exports.Accordion=E,exports.Avatar=O,exports.Badge=k,exports.Button=j,exports.ButtonGroup=M,exports.Calendar=V,exports.CascaderList=ce,exports.Checkbox=ue,exports.CheckboxGroup=le,exports.ColorPicker=Le,exports.ConfigContext=P,exports.ConfigProvider=F,exports.Confirm=ze,exports.DatePicker=We,exports.DateRangePicker=Ge,exports.Dialog=H,exports.DraggableList=qe,exports.Dropdown=Ue,exports.DropdownMenu=ot,exports.FormDualColumnLayout=lt,exports.FormLayout=ct,exports.Gallery=dt,exports.GradientColorPicker=vt,exports.HoverCard=Ct,exports.Input=pt,exports.InputNumber=mt,exports.KBD=wt,exports.MessageType=q,exports.Messager=Mt,exports.MultipleSelect=Vt,exports.Pager=ut,exports.Popup=Ft,exports.Radio=Lt,exports.RadioGroup=It,exports.Segmented=ht,exports.Select=Bt,exports.SelectList=Rt,exports.Separator=Ht,exports.Switch=Ut,exports.Textarea=Wt,exports.TimeInput=re,exports.Toaster=Gt,exports.Tooltip=gt,exports.Tree=tn,exports.TreeSelectionMode=$t,exports.borderBottomClassName=B,exports.borderClassName=R,exports.borderLeftBottomClassName=ee,exports.borderLeftClassName=te,exports.borderRightClassName=ne,exports.borderTopClassName=z,exports.clsx=T,exports.divideXClassName=`univer-divide-gray-200 dark:!univer-divide-gray-600 univer-divide-x univer-divide-y-0 univer-divide-solid`,exports.divideYClassName=`univer-divide-gray-200 dark:!univer-divide-gray-600 univer-divide-y univer-divide-x-0 univer-divide-solid`,exports.filterLeafNode=Qt,exports.findNodePathFromTree=qt,exports.findSubTreeFromPath=X,exports.isBrowser=N,exports.mergeTreeSelected=Xt,exports.message=Nt,exports.removeMessage=Pt,exports.render=nn,exports.resizeObserverCtor=an,exports.scrollbarClassName=I,exports.toast=x.toast,exports.unmount=rn;