@cyberskill/cyber-editor 3.9.1 → 4.0.1

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 (192) hide show
  1. package/README.md +126 -4
  2. package/dist/CyberEditor.d.ts +2 -0
  3. package/dist/CyberViewer.d.ts +2 -0
  4. package/dist/cyber-editor.cjs.js +714 -0
  5. package/dist/cyber-editor.css +1 -0
  6. package/dist/cyber-editor.es.js +52940 -0
  7. package/dist/index.d.ts +5 -20
  8. package/dist/modules/accordion/accordion-extension.d.ts +2 -1
  9. package/dist/modules/accordion/accordion-extension.type.d.ts +11 -0
  10. package/dist/modules/accordion/accordion-view.component.d.ts +2 -1
  11. package/dist/modules/accordion/accordion-view.type.d.ts +8 -2
  12. package/dist/modules/accordion/index.d.ts +4 -4
  13. package/dist/modules/color-picker/color-picker.component.d.ts +2 -1
  14. package/dist/modules/color-picker/color-picker.type.d.ts +4 -1
  15. package/dist/modules/color-picker/index.d.ts +2 -2
  16. package/dist/modules/heading/heading.component.d.ts +2 -1
  17. package/dist/modules/heading/heading.type.d.ts +4 -1
  18. package/dist/modules/heading/index.d.ts +2 -2
  19. package/dist/modules/image/enhanced-image-view.component.d.ts +2 -0
  20. package/dist/modules/image/enhanced-image.d.ts +27 -0
  21. package/dist/modules/image/image-view.type.d.ts +4 -2
  22. package/dist/modules/image/index.d.ts +2 -4
  23. package/dist/modules/index.d.ts +6 -20
  24. package/dist/modules/table/enhanced-table-cell-view.component.d.ts +2 -0
  25. package/dist/modules/table/enhanced-table-cell.d.ts +1 -0
  26. package/dist/modules/table/enhanced-table-view.component.d.ts +2 -0
  27. package/dist/modules/table/enhanced-table.d.ts +7 -0
  28. package/dist/modules/table/index.d.ts +6 -2
  29. package/dist/modules/table/table.component.d.ts +2 -1
  30. package/dist/modules/table/table.type.d.ts +6 -1
  31. package/dist/modules/toolbar/custom.d.ts +1 -0
  32. package/dist/modules/toolbar/font-family.d.ts +1 -0
  33. package/dist/modules/toolbar/font-size.d.ts +1 -0
  34. package/dist/modules/toolbar/index.d.ts +1 -2
  35. package/dist/modules/toolbar/table-controls.d.ts +1 -0
  36. package/dist/modules/video/index.d.ts +2 -0
  37. package/dist/modules/video/video-view.component.d.ts +16 -0
  38. package/dist/modules/video/video.d.ts +17 -0
  39. package/dist/playground/App.d.ts +1 -0
  40. package/dist/playground/main.d.ts +1 -0
  41. package/dist/shared/components/color-picker/color-picker.component.d.ts +2 -0
  42. package/dist/shared/components/color-picker/color-picker.type.d.ts +5 -0
  43. package/dist/shared/components/color-picker/index.d.ts +2 -0
  44. package/dist/shared/components/index.d.ts +2 -0
  45. package/dist/shared/components/modal-edit/index.d.ts +2 -0
  46. package/dist/shared/components/modal-edit/modal-edit.component.d.ts +2 -0
  47. package/dist/shared/components/modal-edit/modal-edit.type.d.ts +6 -0
  48. package/dist/shared/configs/env.d.ts +2 -0
  49. package/dist/shared/constants/alias.d.ts +4 -0
  50. package/dist/shared/constants/index.d.ts +1 -0
  51. package/dist/shared/providers/editor.d.ts +3 -0
  52. package/dist/shared/providers/index.d.ts +1 -0
  53. package/dist/shared/typescript/index.d.ts +8 -0
  54. package/dist/shared/utils/extensions.d.ts +16 -0
  55. package/dist/shared/utils/index.d.ts +1 -0
  56. package/package.json +65 -80
  57. package/dist/_tsup-dts-rollup.d.cts +0 -196
  58. package/dist/_tsup-dts-rollup.d.ts +0 -196
  59. package/dist/index.cjs +0 -1
  60. package/dist/index.d.cts +0 -20
  61. package/dist/index.js +0 -1
  62. package/dist/modules/accordion/accordion-extension.cjs +0 -1
  63. package/dist/modules/accordion/accordion-extension.d.cts +0 -1
  64. package/dist/modules/accordion/accordion-extension.js +0 -1
  65. package/dist/modules/accordion/accordion-view.component.cjs +0 -1
  66. package/dist/modules/accordion/accordion-view.component.d.cts +0 -1
  67. package/dist/modules/accordion/accordion-view.component.js +0 -1
  68. package/dist/modules/accordion/accordion-view.type.cjs +0 -1
  69. package/dist/modules/accordion/accordion-view.type.d.cts +0 -2
  70. package/dist/modules/accordion/accordion-view.type.js +0 -0
  71. package/dist/modules/accordion/index.cjs +0 -1
  72. package/dist/modules/accordion/index.d.cts +0 -4
  73. package/dist/modules/accordion/index.js +0 -1
  74. package/dist/modules/color-picker/color-picker.component.cjs +0 -1
  75. package/dist/modules/color-picker/color-picker.component.d.cts +0 -1
  76. package/dist/modules/color-picker/color-picker.component.js +0 -1
  77. package/dist/modules/color-picker/color-picker.type.cjs +0 -1
  78. package/dist/modules/color-picker/color-picker.type.d.cts +0 -1
  79. package/dist/modules/color-picker/color-picker.type.js +0 -0
  80. package/dist/modules/color-picker/index.cjs +0 -1
  81. package/dist/modules/color-picker/index.d.cts +0 -2
  82. package/dist/modules/color-picker/index.js +0 -1
  83. package/dist/modules/editor/editor.component.cjs +0 -1
  84. package/dist/modules/editor/editor.component.d.cts +0 -1
  85. package/dist/modules/editor/editor.component.d.ts +0 -1
  86. package/dist/modules/editor/editor.component.js +0 -1
  87. package/dist/modules/editor/editor.constant.cjs +0 -1
  88. package/dist/modules/editor/editor.constant.d.cts +0 -1
  89. package/dist/modules/editor/editor.constant.d.ts +0 -1
  90. package/dist/modules/editor/editor.constant.js +0 -1
  91. package/dist/modules/editor/editor.module.d.cts +0 -1
  92. package/dist/modules/editor/editor.module.d.ts +0 -1
  93. package/dist/modules/editor/editor.module.scss +0 -313
  94. package/dist/modules/editor/editor.type.cjs +0 -1
  95. package/dist/modules/editor/editor.type.d.cts +0 -1
  96. package/dist/modules/editor/editor.type.d.ts +0 -1
  97. package/dist/modules/editor/editor.type.js +0 -0
  98. package/dist/modules/editor/index.cjs +0 -1
  99. package/dist/modules/editor/index.d.cts +0 -3
  100. package/dist/modules/editor/index.d.ts +0 -3
  101. package/dist/modules/editor/index.js +0 -1
  102. package/dist/modules/heading/heading.component.cjs +0 -1
  103. package/dist/modules/heading/heading.component.d.cts +0 -1
  104. package/dist/modules/heading/heading.component.js +0 -1
  105. package/dist/modules/heading/heading.type.cjs +0 -1
  106. package/dist/modules/heading/heading.type.d.cts +0 -1
  107. package/dist/modules/heading/heading.type.js +0 -0
  108. package/dist/modules/heading/index.cjs +0 -1
  109. package/dist/modules/heading/index.d.cts +0 -2
  110. package/dist/modules/heading/index.js +0 -1
  111. package/dist/modules/home/home.page.cjs +0 -1
  112. package/dist/modules/home/home.page.d.cts +0 -1
  113. package/dist/modules/home/home.page.d.ts +0 -1
  114. package/dist/modules/home/home.page.js +0 -1
  115. package/dist/modules/home/index.cjs +0 -1
  116. package/dist/modules/home/index.d.cts +0 -1
  117. package/dist/modules/home/index.d.ts +0 -1
  118. package/dist/modules/home/index.js +0 -1
  119. package/dist/modules/image/image-view.component.cjs +0 -1
  120. package/dist/modules/image/image-view.component.d.cts +0 -1
  121. package/dist/modules/image/image-view.component.d.ts +0 -1
  122. package/dist/modules/image/image-view.component.js +0 -1
  123. package/dist/modules/image/image-view.type.cjs +0 -1
  124. package/dist/modules/image/image-view.type.d.cts +0 -2
  125. package/dist/modules/image/image-view.type.js +0 -0
  126. package/dist/modules/image/image.cjs +0 -1
  127. package/dist/modules/image/image.d.cts +0 -1
  128. package/dist/modules/image/image.d.ts +0 -1
  129. package/dist/modules/image/image.js +0 -1
  130. package/dist/modules/image/index.cjs +0 -1
  131. package/dist/modules/image/index.d.cts +0 -4
  132. package/dist/modules/image/index.js +0 -1
  133. package/dist/modules/index.cjs +0 -1
  134. package/dist/modules/index.d.cts +0 -20
  135. package/dist/modules/index.js +0 -1
  136. package/dist/modules/table/index.cjs +0 -1
  137. package/dist/modules/table/index.d.cts +0 -2
  138. package/dist/modules/table/index.js +0 -1
  139. package/dist/modules/table/table.component.cjs +0 -1
  140. package/dist/modules/table/table.component.d.cts +0 -1
  141. package/dist/modules/table/table.component.js +0 -1
  142. package/dist/modules/table/table.type.cjs +0 -1
  143. package/dist/modules/table/table.type.d.cts +0 -1
  144. package/dist/modules/table/table.type.js +0 -0
  145. package/dist/modules/toolbar/index.cjs +0 -1
  146. package/dist/modules/toolbar/index.d.cts +0 -2
  147. package/dist/modules/toolbar/index.js +0 -1
  148. package/dist/modules/toolbar/toolbar.component.cjs +0 -1
  149. package/dist/modules/toolbar/toolbar.component.d.cts +0 -1
  150. package/dist/modules/toolbar/toolbar.component.d.ts +0 -1
  151. package/dist/modules/toolbar/toolbar.component.js +0 -1
  152. package/dist/modules/toolbar/toolbar.custom.component.cjs +0 -1
  153. package/dist/modules/toolbar/toolbar.custom.component.d.cts +0 -1
  154. package/dist/modules/toolbar/toolbar.custom.component.d.ts +0 -1
  155. package/dist/modules/toolbar/toolbar.custom.component.js +0 -1
  156. package/dist/shared/component/color-picker/color-picker.component.cjs +0 -1
  157. package/dist/shared/component/color-picker/color-picker.component.d.cts +0 -1
  158. package/dist/shared/component/color-picker/color-picker.component.d.ts +0 -1
  159. package/dist/shared/component/color-picker/color-picker.component.js +0 -1
  160. package/dist/shared/component/color-picker/color-picker.type.cjs +0 -1
  161. package/dist/shared/component/color-picker/color-picker.type.d.cts +0 -1
  162. package/dist/shared/component/color-picker/color-picker.type.d.ts +0 -1
  163. package/dist/shared/component/color-picker/color-picker.type.js +0 -0
  164. package/dist/shared/component/color-picker/index.cjs +0 -1
  165. package/dist/shared/component/color-picker/index.d.cts +0 -2
  166. package/dist/shared/component/color-picker/index.d.ts +0 -2
  167. package/dist/shared/component/color-picker/index.js +0 -1
  168. package/dist/shared/component/index.cjs +0 -1
  169. package/dist/shared/component/index.d.cts +0 -4
  170. package/dist/shared/component/index.d.ts +0 -4
  171. package/dist/shared/component/index.js +0 -1
  172. package/dist/shared/component/modal-edit/index.cjs +0 -1
  173. package/dist/shared/component/modal-edit/index.d.cts +0 -2
  174. package/dist/shared/component/modal-edit/index.d.ts +0 -2
  175. package/dist/shared/component/modal-edit/index.js +0 -1
  176. package/dist/shared/component/modal-edit/modal-edit.component.cjs +0 -1
  177. package/dist/shared/component/modal-edit/modal-edit.component.d.cts +0 -1
  178. package/dist/shared/component/modal-edit/modal-edit.component.d.ts +0 -1
  179. package/dist/shared/component/modal-edit/modal-edit.component.js +0 -1
  180. package/dist/shared/component/modal-edit/modal-edit.type.cjs +0 -1
  181. package/dist/shared/component/modal-edit/modal-edit.type.d.cts +0 -1
  182. package/dist/shared/component/modal-edit/modal-edit.type.d.ts +0 -1
  183. package/dist/shared/component/modal-edit/modal-edit.type.js +0 -0
  184. package/dist/shared/style/global.css +0 -2
  185. package/dist/shared/style/global.d.cts +0 -1
  186. package/dist/shared/style/global.d.ts +0 -1
  187. package/dist/shared/typescript/style.d.cjs +0 -1
  188. package/dist/shared/typescript/style.d.d.cts +0 -1
  189. package/dist/shared/typescript/style.d.d.ts +0 -1
  190. package/dist/shared/typescript/style.d.js +0 -0
  191. /package/{public → dist}/assets/icons/index.ts +0 -0
  192. /package/{public → dist}/favicon.svg +0 -0
@@ -0,0 +1,714 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("react"),jr=require("react-dom");function ZC(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 p=ZC(O),eS=ZC(jr);var Ul=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function V$(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ql={exports:{}},ss={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var hv;function W$(){if(hv)return ss;hv=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,o,i){var a=null;if(i!==void 0&&(a=""+i),o.key!==void 0&&(a=""+o.key),"key"in o){i={};for(var s in o)s!=="key"&&(i[s]=o[s])}else i=o;return o=i.ref,{$$typeof:e,type:r,key:a,ref:o!==void 0?o:null,props:i}}return ss.Fragment=t,ss.jsx=n,ss.jsxs=n,ss}var ls={};/**
10
+ * @license React
11
+ * react-jsx-runtime.development.js
12
+ *
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var pv;function U$(){return pv||(pv=1,process.env.NODE_ENV!=="production"&&function(){function e(F){if(F==null)return null;if(typeof F=="function")return F.$$typeof===_?null:F.displayName||F.name||null;if(typeof F=="string")return F;switch(F){case w:return"Fragment";case S:return"Portal";case N:return"Profiler";case E:return"StrictMode";case k:return"Suspense";case D:return"SuspenseList"}if(typeof F=="object")switch(typeof F.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),F.$$typeof){case M:return(F.displayName||"Context")+".Provider";case $:return(F._context.displayName||"Context")+".Consumer";case R:var be=F.render;return F=F.displayName,F||(F=be.displayName||be.name||"",F=F!==""?"ForwardRef("+F+")":"ForwardRef"),F;case A:return be=F.displayName||null,be!==null?be:e(F.type)||"Memo";case L:be=F._payload,F=F._init;try{return e(F(be))}catch{}}return null}function t(F){return""+F}function n(F){try{t(F);var be=!1}catch{be=!0}if(be){be=console;var ue=be.error,me=typeof Symbol=="function"&&Symbol.toStringTag&&F[Symbol.toStringTag]||F.constructor.name||"Object";return ue.call(be,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",me),t(F)}}function r(){}function o(){if(V===0){G=console.log,Q=console.info,ce=console.warn,Z=console.error,he=console.group,ye=console.groupCollapsed,fe=console.groupEnd;var F={configurable:!0,enumerable:!0,value:r,writable:!0};Object.defineProperties(console,{info:F,log:F,warn:F,error:F,group:F,groupCollapsed:F,groupEnd:F})}V++}function i(){if(V--,V===0){var F={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:B({},F,{value:G}),info:B({},F,{value:Q}),warn:B({},F,{value:ce}),error:B({},F,{value:Z}),group:B({},F,{value:he}),groupCollapsed:B({},F,{value:ye}),groupEnd:B({},F,{value:fe})})}0>V&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function a(F){if(ae===void 0)try{throw Error()}catch(ue){var be=ue.stack.trim().match(/\n( *(at )?)/);ae=be&&be[1]||"",ve=-1<ue.stack.indexOf(`
18
+ at`)?" (<anonymous>)":-1<ue.stack.indexOf("@")?"@unknown:0:0":""}return`
19
+ `+ae+F+ve}function s(F,be){if(!F||ne)return"";var ue=se.get(F);if(ue!==void 0)return ue;ne=!0,ue=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var me=null;me=W.H,W.H=null,o();try{var Re={DetermineComponentFrameRoot:function(){try{if(be){var De=function(){throw Error()};if(Object.defineProperty(De.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(De,[])}catch(_e){var ze=_e}Reflect.construct(F,[],De)}else{try{De.call()}catch(_e){ze=_e}F.call(De.prototype)}}else{try{throw Error()}catch(_e){ze=_e}(De=F())&&typeof De.catch=="function"&&De.catch(function(){})}}catch(_e){if(_e&&ze&&typeof _e.stack=="string")return[_e.stack,ze.stack]}return[null,null]}};Re.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var Te=Object.getOwnPropertyDescriptor(Re.DetermineComponentFrameRoot,"name");Te&&Te.configurable&&Object.defineProperty(Re.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var xe=Re.DetermineComponentFrameRoot(),Ve=xe[0],qe=xe[1];if(Ve&&qe){var Pe=Ve.split(`
20
+ `),Ke=qe.split(`
21
+ `);for(xe=Te=0;Te<Pe.length&&!Pe[Te].includes("DetermineComponentFrameRoot");)Te++;for(;xe<Ke.length&&!Ke[xe].includes("DetermineComponentFrameRoot");)xe++;if(Te===Pe.length||xe===Ke.length)for(Te=Pe.length-1,xe=Ke.length-1;1<=Te&&0<=xe&&Pe[Te]!==Ke[xe];)xe--;for(;1<=Te&&0<=xe;Te--,xe--)if(Pe[Te]!==Ke[xe]){if(Te!==1||xe!==1)do if(Te--,xe--,0>xe||Pe[Te]!==Ke[xe]){var Je=`
22
+ `+Pe[Te].replace(" at new "," at ");return F.displayName&&Je.includes("<anonymous>")&&(Je=Je.replace("<anonymous>",F.displayName)),typeof F=="function"&&se.set(F,Je),Je}while(1<=Te&&0<=xe);break}}}finally{ne=!1,W.H=me,i(),Error.prepareStackTrace=ue}return Pe=(Pe=F?F.displayName||F.name:"")?a(Pe):"",typeof F=="function"&&se.set(F,Pe),Pe}function l(F){if(F==null)return"";if(typeof F=="function"){var be=F.prototype;return s(F,!(!be||!be.isReactComponent))}if(typeof F=="string")return a(F);switch(F){case k:return a("Suspense");case D:return a("SuspenseList")}if(typeof F=="object")switch(F.$$typeof){case R:return F=s(F.render,!1),F;case A:return l(F.type);case L:be=F._payload,F=F._init;try{return l(F(be))}catch{}}return""}function c(){var F=W.A;return F===null?null:F.getOwner()}function u(F){if(H.call(F,"key")){var be=Object.getOwnPropertyDescriptor(F,"key").get;if(be&&be.isReactWarning)return!1}return F.key!==void 0}function d(F,be){function ue(){Ne||(Ne=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",be))}ue.isReactWarning=!0,Object.defineProperty(F,"key",{get:ue,configurable:!0})}function f(){var F=e(this.type);return Me[F]||(Me[F]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),F=this.props.ref,F!==void 0?F:null}function h(F,be,ue,me,Re,Te){return ue=Te.ref,F={$$typeof:x,type:F,key:be,props:Te,_owner:Re},(ue!==void 0?ue:null)!==null?Object.defineProperty(F,"ref",{enumerable:!1,get:f}):Object.defineProperty(F,"ref",{enumerable:!1,value:null}),F._store={},Object.defineProperty(F._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(F,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.freeze&&(Object.freeze(F.props),Object.freeze(F)),F}function m(F,be,ue,me,Re,Te){if(typeof F=="string"||typeof F=="function"||F===w||F===N||F===E||F===k||F===D||F===T||typeof F=="object"&&F!==null&&(F.$$typeof===L||F.$$typeof===A||F.$$typeof===M||F.$$typeof===$||F.$$typeof===R||F.$$typeof===K||F.getModuleId!==void 0)){var xe=be.children;if(xe!==void 0)if(me)if(Y(xe)){for(me=0;me<xe.length;me++)v(xe[me],F);Object.freeze&&Object.freeze(xe)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else v(xe,F)}else xe="",(F===void 0||typeof F=="object"&&F!==null&&Object.keys(F).length===0)&&(xe+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),F===null?me="null":Y(F)?me="array":F!==void 0&&F.$$typeof===x?(me="<"+(e(F.type)||"Unknown")+" />",xe=" Did you accidentally export a JSX literal instead of a component?"):me=typeof F,console.error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",me,xe);if(H.call(be,"key")){xe=e(F);var Ve=Object.keys(be).filter(function(Pe){return Pe!=="key"});me=0<Ve.length?"{key: someKey, "+Ve.join(": ..., ")+": ...}":"{key: someKey}",$e[xe+me]||(Ve=0<Ve.length?"{"+Ve.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
23
+ let props = %s;
24
+ <%s {...props} />
25
+ React keys must be passed directly to JSX without using spread:
26
+ let props = %s;
27
+ <%s key={someKey} {...props} />`,me,xe,Ve,xe),$e[xe+me]=!0)}if(xe=null,ue!==void 0&&(n(ue),xe=""+ue),u(be)&&(n(be.key),xe=""+be.key),"key"in be){ue={};for(var qe in be)qe!=="key"&&(ue[qe]=be[qe])}else ue=be;return xe&&d(ue,typeof F=="function"?F.displayName||F.name||"Unknown":F),h(F,xe,Te,Re,c(),ue)}function v(F,be){if(typeof F=="object"&&F&&F.$$typeof!==pe){if(Y(F))for(var ue=0;ue<F.length;ue++){var me=F[ue];g(me)&&y(me,be)}else if(g(F))F._store&&(F._store.validated=1);else if(F===null||typeof F!="object"?ue=null:(ue=I&&F[I]||F["@@iterator"],ue=typeof ue=="function"?ue:null),typeof ue=="function"&&ue!==F.entries&&(ue=ue.call(F),ue!==F))for(;!(F=ue.next()).done;)g(F.value)&&y(F.value,be)}}function g(F){return typeof F=="object"&&F!==null&&F.$$typeof===x}function y(F,be){if(F._store&&!F._store.validated&&F.key==null&&(F._store.validated=1,be=b(be),!Be[be])){Be[be]=!0;var ue="";F&&F._owner!=null&&F._owner!==c()&&(ue=null,typeof F._owner.tag=="number"?ue=e(F._owner.type):typeof F._owner.name=="string"&&(ue=F._owner.name),ue=" It was passed a child from "+ue+".");var me=W.getCurrentStack;W.getCurrentStack=function(){var Re=l(F.type);return me&&(Re+=me()||""),Re},console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',be,ue),W.getCurrentStack=me}}function b(F){var be="",ue=c();return ue&&(ue=e(ue.type))&&(be=`
28
+
29
+ Check the render method of \``+ue+"`."),be||(F=e(F))&&(be=`
30
+
31
+ Check the top-level render call using <`+F+">."),be}var C=O,x=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),N=Symbol.for("react.profiler"),$=Symbol.for("react.consumer"),M=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),k=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),A=Symbol.for("react.memo"),L=Symbol.for("react.lazy"),T=Symbol.for("react.offscreen"),I=Symbol.iterator,_=Symbol.for("react.client.reference"),W=C.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H=Object.prototype.hasOwnProperty,B=Object.assign,K=Symbol.for("react.client.reference"),Y=Array.isArray,V=0,G,Q,ce,Z,he,ye,fe;r.__reactDisabledLog=!0;var ae,ve,ne=!1,se=new(typeof WeakMap=="function"?WeakMap:Map),pe=Symbol.for("react.client.reference"),Ne,Me={},$e={},Be={};ls.Fragment=w,ls.jsx=function(F,be,ue,me,Re){return m(F,be,ue,!1,me,Re)},ls.jsxs=function(F,be,ue,me,Re){return m(F,be,ue,!0,me,Re)}}()),ls}var mv;function q$(){return mv||(mv=1,process.env.NODE_ENV==="production"?ql.exports=W$():ql.exports=U$()),ql.exports}var j=q$(),Xd={exports:{}};/*!
32
+ Copyright (c) 2018 Jed Watson.
33
+ Licensed under the MIT License (MIT), see
34
+ http://jedwatson.github.io/classnames
35
+ */var gv;function K$(){return gv||(gv=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})()}(Xd)),Xd.exports}var G$=K$();const te=V$(G$),X$="_fullscreen_giq1a_2",Y$="_block_giq1a_3",J$="_container_giq1a_31",Q$="_ring_giq1a_39",Z$="_message_giq1a_70",Uo={fullscreen:X$,block:Y$,container:J$,ring:Q$,message:Z$};function Kl(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Yd={exports:{}};/*!
36
+ localForage -- Offline Storage, Improved
37
+ Version 1.10.0
38
+ https://localforage.github.io/localForage
39
+ (c) 2013-2017 Mozilla, Apache License 2.0
40
+ */var vv;function eN(){return vv||(vv=1,function(e,t){(function(n){e.exports=n()})(function(){return function n(r,o,i){function a(c,u){if(!o[c]){if(!r[c]){var d=typeof Kl=="function"&&Kl;if(!u&&d)return d(c,!0);if(s)return s(c,!0);var f=new Error("Cannot find module '"+c+"'");throw f.code="MODULE_NOT_FOUND",f}var h=o[c]={exports:{}};r[c][0].call(h.exports,function(m){var v=r[c][1][m];return a(v||m)},h,h.exports,n,r,o,i)}return o[c].exports}for(var s=typeof Kl=="function"&&Kl,l=0;l<i.length;l++)a(i[l]);return a}({1:[function(n,r,o){(function(i){var a=i.MutationObserver||i.WebKitMutationObserver,s;if(a){var l=0,c=new a(m),u=i.document.createTextNode("");c.observe(u,{characterData:!0}),s=function(){u.data=l=++l%2}}else if(!i.setImmediate&&typeof i.MessageChannel<"u"){var d=new i.MessageChannel;d.port1.onmessage=m,s=function(){d.port2.postMessage(0)}}else"document"in i&&"onreadystatechange"in i.document.createElement("script")?s=function(){var g=i.document.createElement("script");g.onreadystatechange=function(){m(),g.onreadystatechange=null,g.parentNode.removeChild(g),g=null},i.document.documentElement.appendChild(g)}:s=function(){setTimeout(m,0)};var f,h=[];function m(){f=!0;for(var g,y,b=h.length;b;){for(y=h,h=[],g=-1;++g<b;)y[g]();b=h.length}f=!1}r.exports=v;function v(g){h.push(g)===1&&!f&&s()}}).call(this,typeof Ul<"u"?Ul:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(n,r,o){var i=n(1);function a(){}var s={},l=["REJECTED"],c=["FULFILLED"],u=["PENDING"];r.exports=d;function d(S){if(typeof S!="function")throw new TypeError("resolver must be a function");this.state=u,this.queue=[],this.outcome=void 0,S!==a&&v(this,S)}d.prototype.catch=function(S){return this.then(null,S)},d.prototype.then=function(S,w){if(typeof S!="function"&&this.state===c||typeof w!="function"&&this.state===l)return this;var E=new this.constructor(a);if(this.state!==u){var N=this.state===c?S:w;h(E,N,this.outcome)}else this.queue.push(new f(E,S,w));return E};function f(S,w,E){this.promise=S,typeof w=="function"&&(this.onFulfilled=w,this.callFulfilled=this.otherCallFulfilled),typeof E=="function"&&(this.onRejected=E,this.callRejected=this.otherCallRejected)}f.prototype.callFulfilled=function(S){s.resolve(this.promise,S)},f.prototype.otherCallFulfilled=function(S){h(this.promise,this.onFulfilled,S)},f.prototype.callRejected=function(S){s.reject(this.promise,S)},f.prototype.otherCallRejected=function(S){h(this.promise,this.onRejected,S)};function h(S,w,E){i(function(){var N;try{N=w(E)}catch($){return s.reject(S,$)}N===S?s.reject(S,new TypeError("Cannot resolve promise with itself")):s.resolve(S,N)})}s.resolve=function(S,w){var E=g(m,w);if(E.status==="error")return s.reject(S,E.value);var N=E.value;if(N)v(S,N);else{S.state=c,S.outcome=w;for(var $=-1,M=S.queue.length;++$<M;)S.queue[$].callFulfilled(w)}return S},s.reject=function(S,w){S.state=l,S.outcome=w;for(var E=-1,N=S.queue.length;++E<N;)S.queue[E].callRejected(w);return S};function m(S){var w=S&&S.then;if(S&&(typeof S=="object"||typeof S=="function")&&typeof w=="function")return function(){w.apply(S,arguments)}}function v(S,w){var E=!1;function N(k){E||(E=!0,s.reject(S,k))}function $(k){E||(E=!0,s.resolve(S,k))}function M(){w($,N)}var R=g(M);R.status==="error"&&N(R.value)}function g(S,w){var E={};try{E.value=S(w),E.status="success"}catch(N){E.status="error",E.value=N}return E}d.resolve=y;function y(S){return S instanceof this?S:s.resolve(new this(a),S)}d.reject=b;function b(S){var w=new this(a);return s.reject(w,S)}d.all=C;function C(S){var w=this;if(Object.prototype.toString.call(S)!=="[object Array]")return this.reject(new TypeError("must be an array"));var E=S.length,N=!1;if(!E)return this.resolve([]);for(var $=new Array(E),M=0,R=-1,k=new this(a);++R<E;)D(S[R],R);return k;function D(A,L){w.resolve(A).then(T,function(I){N||(N=!0,s.reject(k,I))});function T(I){$[L]=I,++M===E&&!N&&(N=!0,s.resolve(k,$))}}}d.race=x;function x(S){var w=this;if(Object.prototype.toString.call(S)!=="[object Array]")return this.reject(new TypeError("must be an array"));var E=S.length,N=!1;if(!E)return this.resolve([]);for(var $=-1,M=new this(a);++$<E;)R(S[$]);return M;function R(k){w.resolve(k).then(function(D){N||(N=!0,s.resolve(M,D))},function(D){N||(N=!0,s.reject(M,D))})}}},{1:1}],3:[function(n,r,o){(function(i){typeof i.Promise!="function"&&(i.Promise=n(2))}).call(this,typeof Ul<"u"?Ul:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(n,r,o){var i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(P){return typeof P}:function(P){return P&&typeof Symbol=="function"&&P.constructor===Symbol&&P!==Symbol.prototype?"symbol":typeof P};function a(P,X){if(!(P instanceof X))throw new TypeError("Cannot call a class as a function")}function s(){try{if(typeof indexedDB<"u")return indexedDB;if(typeof webkitIndexedDB<"u")return webkitIndexedDB;if(typeof mozIndexedDB<"u")return mozIndexedDB;if(typeof OIndexedDB<"u")return OIndexedDB;if(typeof msIndexedDB<"u")return msIndexedDB}catch{return}}var l=s();function c(){try{if(!l||!l.open)return!1;var P=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),X=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!P||X)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function u(P,X){P=P||[],X=X||{};try{return new Blob(P,X)}catch(ee){if(ee.name!=="TypeError")throw ee;for(var z=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,re=new z,ie=0;ie<P.length;ie+=1)re.append(P[ie]);return re.getBlob(X.type)}}typeof Promise>"u"&&n(3);var d=Promise;function f(P,X){X&&P.then(function(z){X(null,z)},function(z){X(z)})}function h(P,X,z){typeof X=="function"&&P.then(X),typeof z=="function"&&P.catch(z)}function m(P){return typeof P!="string"&&(console.warn(P+" used as a key, but it is not a string."),P=String(P)),P}function v(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var g="local-forage-detect-blob-support",y=void 0,b={},C=Object.prototype.toString,x="readonly",S="readwrite";function w(P){for(var X=P.length,z=new ArrayBuffer(X),re=new Uint8Array(z),ie=0;ie<X;ie++)re[ie]=P.charCodeAt(ie);return z}function E(P){return new d(function(X){var z=P.transaction(g,S),re=u([""]);z.objectStore(g).put(re,"key"),z.onabort=function(ie){ie.preventDefault(),ie.stopPropagation(),X(!1)},z.oncomplete=function(){var ie=navigator.userAgent.match(/Chrome\/(\d+)/),ee=navigator.userAgent.match(/Edge\//);X(ee||!ie||parseInt(ie[1],10)>=43)}}).catch(function(){return!1})}function N(P){return typeof y=="boolean"?d.resolve(y):E(P).then(function(X){return y=X,y})}function $(P){var X=b[P.name],z={};z.promise=new d(function(re,ie){z.resolve=re,z.reject=ie}),X.deferredOperations.push(z),X.dbReady?X.dbReady=X.dbReady.then(function(){return z.promise}):X.dbReady=z.promise}function M(P){var X=b[P.name],z=X.deferredOperations.pop();if(z)return z.resolve(),z.promise}function R(P,X){var z=b[P.name],re=z.deferredOperations.pop();if(re)return re.reject(X),re.promise}function k(P,X){return new d(function(z,re){if(b[P.name]=b[P.name]||K(),P.db)if(X)$(P),P.db.close();else return z(P.db);var ie=[P.name];X&&ie.push(P.version);var ee=l.open.apply(l,ie);X&&(ee.onupgradeneeded=function(Ee){var Ce=ee.result;try{Ce.createObjectStore(P.storeName),Ee.oldVersion<=1&&Ce.createObjectStore(g)}catch(ge){if(ge.name==="ConstraintError")console.warn('The database "'+P.name+'" has been upgraded from version '+Ee.oldVersion+" to version "+Ee.newVersion+', but the storage "'+P.storeName+'" already exists.');else throw ge}}),ee.onerror=function(Ee){Ee.preventDefault(),re(ee.error)},ee.onsuccess=function(){var Ee=ee.result;Ee.onversionchange=function(Ce){Ce.target.close()},z(Ee),M(P)}})}function D(P){return k(P,!1)}function A(P){return k(P,!0)}function L(P,X){if(!P.db)return!0;var z=!P.db.objectStoreNames.contains(P.storeName),re=P.version<P.db.version,ie=P.version>P.db.version;if(re&&(P.version!==X&&console.warn('The database "'+P.name+`" can't be downgraded from version `+P.db.version+" to version "+P.version+"."),P.version=P.db.version),ie||z){if(z){var ee=P.db.version+1;ee>P.version&&(P.version=ee)}return!0}return!1}function T(P){return new d(function(X,z){var re=new FileReader;re.onerror=z,re.onloadend=function(ie){var ee=btoa(ie.target.result||"");X({__local_forage_encoded_blob:!0,data:ee,type:P.type})},re.readAsBinaryString(P)})}function I(P){var X=w(atob(P.data));return u([X],{type:P.type})}function _(P){return P&&P.__local_forage_encoded_blob}function W(P){var X=this,z=X._initReady().then(function(){var re=b[X._dbInfo.name];if(re&&re.dbReady)return re.dbReady});return h(z,P,P),z}function H(P){$(P);for(var X=b[P.name],z=X.forages,re=0;re<z.length;re++){var ie=z[re];ie._dbInfo.db&&(ie._dbInfo.db.close(),ie._dbInfo.db=null)}return P.db=null,D(P).then(function(ee){return P.db=ee,L(P)?A(P):ee}).then(function(ee){P.db=X.db=ee;for(var Ee=0;Ee<z.length;Ee++)z[Ee]._dbInfo.db=ee}).catch(function(ee){throw R(P,ee),ee})}function B(P,X,z,re){re===void 0&&(re=1);try{var ie=P.db.transaction(P.storeName,X);z(null,ie)}catch(ee){if(re>0&&(!P.db||ee.name==="InvalidStateError"||ee.name==="NotFoundError"))return d.resolve().then(function(){if(!P.db||ee.name==="NotFoundError"&&!P.db.objectStoreNames.contains(P.storeName)&&P.version<=P.db.version)return P.db&&(P.version=P.db.version+1),A(P)}).then(function(){return H(P).then(function(){B(P,X,z,re-1)})}).catch(z);z(ee)}}function K(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function Y(P){var X=this,z={db:null};if(P)for(var re in P)z[re]=P[re];var ie=b[z.name];ie||(ie=K(),b[z.name]=ie),ie.forages.push(X),X._initReady||(X._initReady=X.ready,X.ready=W);var ee=[];function Ee(){return d.resolve()}for(var Ce=0;Ce<ie.forages.length;Ce++){var ge=ie.forages[Ce];ge!==X&&ee.push(ge._initReady().catch(Ee))}var Se=ie.forages.slice(0);return d.all(ee).then(function(){return z.db=ie.db,D(z)}).then(function(Oe){return z.db=Oe,L(z,X._defaultConfig.version)?A(z):Oe}).then(function(Oe){z.db=ie.db=Oe,X._dbInfo=z;for(var je=0;je<Se.length;je++){var ut=Se[je];ut!==X&&(ut._dbInfo.db=z.db,ut._dbInfo.version=z.version)}})}function V(P,X){var z=this;P=m(P);var re=new d(function(ie,ee){z.ready().then(function(){B(z._dbInfo,x,function(Ee,Ce){if(Ee)return ee(Ee);try{var ge=Ce.objectStore(z._dbInfo.storeName),Se=ge.get(P);Se.onsuccess=function(){var Oe=Se.result;Oe===void 0&&(Oe=null),_(Oe)&&(Oe=I(Oe)),ie(Oe)},Se.onerror=function(){ee(Se.error)}}catch(Oe){ee(Oe)}})}).catch(ee)});return f(re,X),re}function G(P,X){var z=this,re=new d(function(ie,ee){z.ready().then(function(){B(z._dbInfo,x,function(Ee,Ce){if(Ee)return ee(Ee);try{var ge=Ce.objectStore(z._dbInfo.storeName),Se=ge.openCursor(),Oe=1;Se.onsuccess=function(){var je=Se.result;if(je){var ut=je.value;_(ut)&&(ut=I(ut));var Et=P(ut,je.key,Oe++);Et!==void 0?ie(Et):je.continue()}else ie()},Se.onerror=function(){ee(Se.error)}}catch(je){ee(je)}})}).catch(ee)});return f(re,X),re}function Q(P,X,z){var re=this;P=m(P);var ie=new d(function(ee,Ee){var Ce;re.ready().then(function(){return Ce=re._dbInfo,C.call(X)==="[object Blob]"?N(Ce.db).then(function(ge){return ge?X:T(X)}):X}).then(function(ge){B(re._dbInfo,S,function(Se,Oe){if(Se)return Ee(Se);try{var je=Oe.objectStore(re._dbInfo.storeName);ge===null&&(ge=void 0);var ut=je.put(ge,P);Oe.oncomplete=function(){ge===void 0&&(ge=null),ee(ge)},Oe.onabort=Oe.onerror=function(){var Et=ut.error?ut.error:ut.transaction.error;Ee(Et)}}catch(Et){Ee(Et)}})}).catch(Ee)});return f(ie,z),ie}function ce(P,X){var z=this;P=m(P);var re=new d(function(ie,ee){z.ready().then(function(){B(z._dbInfo,S,function(Ee,Ce){if(Ee)return ee(Ee);try{var ge=Ce.objectStore(z._dbInfo.storeName),Se=ge.delete(P);Ce.oncomplete=function(){ie()},Ce.onerror=function(){ee(Se.error)},Ce.onabort=function(){var Oe=Se.error?Se.error:Se.transaction.error;ee(Oe)}}catch(Oe){ee(Oe)}})}).catch(ee)});return f(re,X),re}function Z(P){var X=this,z=new d(function(re,ie){X.ready().then(function(){B(X._dbInfo,S,function(ee,Ee){if(ee)return ie(ee);try{var Ce=Ee.objectStore(X._dbInfo.storeName),ge=Ce.clear();Ee.oncomplete=function(){re()},Ee.onabort=Ee.onerror=function(){var Se=ge.error?ge.error:ge.transaction.error;ie(Se)}}catch(Se){ie(Se)}})}).catch(ie)});return f(z,P),z}function he(P){var X=this,z=new d(function(re,ie){X.ready().then(function(){B(X._dbInfo,x,function(ee,Ee){if(ee)return ie(ee);try{var Ce=Ee.objectStore(X._dbInfo.storeName),ge=Ce.count();ge.onsuccess=function(){re(ge.result)},ge.onerror=function(){ie(ge.error)}}catch(Se){ie(Se)}})}).catch(ie)});return f(z,P),z}function ye(P,X){var z=this,re=new d(function(ie,ee){if(P<0){ie(null);return}z.ready().then(function(){B(z._dbInfo,x,function(Ee,Ce){if(Ee)return ee(Ee);try{var ge=Ce.objectStore(z._dbInfo.storeName),Se=!1,Oe=ge.openKeyCursor();Oe.onsuccess=function(){var je=Oe.result;if(!je){ie(null);return}P===0||Se?ie(je.key):(Se=!0,je.advance(P))},Oe.onerror=function(){ee(Oe.error)}}catch(je){ee(je)}})}).catch(ee)});return f(re,X),re}function fe(P){var X=this,z=new d(function(re,ie){X.ready().then(function(){B(X._dbInfo,x,function(ee,Ee){if(ee)return ie(ee);try{var Ce=Ee.objectStore(X._dbInfo.storeName),ge=Ce.openKeyCursor(),Se=[];ge.onsuccess=function(){var Oe=ge.result;if(!Oe){re(Se);return}Se.push(Oe.key),Oe.continue()},ge.onerror=function(){ie(ge.error)}}catch(Oe){ie(Oe)}})}).catch(ie)});return f(z,P),z}function ae(P,X){X=v.apply(this,arguments);var z=this.config();P=typeof P!="function"&&P||{},P.name||(P.name=P.name||z.name,P.storeName=P.storeName||z.storeName);var re=this,ie;if(!P.name)ie=d.reject("Invalid arguments");else{var ee=P.name===z.name&&re._dbInfo.db,Ee=ee?d.resolve(re._dbInfo.db):D(P).then(function(Ce){var ge=b[P.name],Se=ge.forages;ge.db=Ce;for(var Oe=0;Oe<Se.length;Oe++)Se[Oe]._dbInfo.db=Ce;return Ce});P.storeName?ie=Ee.then(function(Ce){if(Ce.objectStoreNames.contains(P.storeName)){var ge=Ce.version+1;$(P);var Se=b[P.name],Oe=Se.forages;Ce.close();for(var je=0;je<Oe.length;je++){var ut=Oe[je];ut._dbInfo.db=null,ut._dbInfo.version=ge}var Et=new d(function($t,Kt){var Gt=l.open(P.name,ge);Gt.onerror=function(hn){var On=Gt.result;On.close(),Kt(hn)},Gt.onupgradeneeded=function(){var hn=Gt.result;hn.deleteObjectStore(P.storeName)},Gt.onsuccess=function(){var hn=Gt.result;hn.close(),$t(hn)}});return Et.then(function($t){Se.db=$t;for(var Kt=0;Kt<Oe.length;Kt++){var Gt=Oe[Kt];Gt._dbInfo.db=$t,M(Gt._dbInfo)}}).catch(function($t){throw(R(P,$t)||d.resolve()).catch(function(){}),$t})}}):ie=Ee.then(function(Ce){$(P);var ge=b[P.name],Se=ge.forages;Ce.close();for(var Oe=0;Oe<Se.length;Oe++){var je=Se[Oe];je._dbInfo.db=null}var ut=new d(function(Et,$t){var Kt=l.deleteDatabase(P.name);Kt.onerror=function(){var Gt=Kt.result;Gt&&Gt.close(),$t(Kt.error)},Kt.onblocked=function(){console.warn('dropInstance blocked for database "'+P.name+'" until all open connections are closed')},Kt.onsuccess=function(){var Gt=Kt.result;Gt&&Gt.close(),Et(Gt)}});return ut.then(function(Et){ge.db=Et;for(var $t=0;$t<Se.length;$t++){var Kt=Se[$t];M(Kt._dbInfo)}}).catch(function(Et){throw(R(P,Et)||d.resolve()).catch(function(){}),Et})})}return f(ie,X),ie}var ve={_driver:"asyncStorage",_initStorage:Y,_support:c(),iterate:G,getItem:V,setItem:Q,removeItem:ce,clear:Z,length:he,key:ye,keys:fe,dropInstance:ae};function ne(){return typeof openDatabase=="function"}var se="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",pe="~~local_forage_type~",Ne=/^~~local_forage_type~([^~]+)~/,Me="__lfsc__:",$e=Me.length,Be="arbf",F="blob",be="si08",ue="ui08",me="uic8",Re="si16",Te="si32",xe="ur16",Ve="ui32",qe="fl32",Pe="fl64",Ke=$e+Be.length,Je=Object.prototype.toString;function De(P){var X=P.length*.75,z=P.length,re,ie=0,ee,Ee,Ce,ge;P[P.length-1]==="="&&(X--,P[P.length-2]==="="&&X--);var Se=new ArrayBuffer(X),Oe=new Uint8Array(Se);for(re=0;re<z;re+=4)ee=se.indexOf(P[re]),Ee=se.indexOf(P[re+1]),Ce=se.indexOf(P[re+2]),ge=se.indexOf(P[re+3]),Oe[ie++]=ee<<2|Ee>>4,Oe[ie++]=(Ee&15)<<4|Ce>>2,Oe[ie++]=(Ce&3)<<6|ge&63;return Se}function ze(P){var X=new Uint8Array(P),z="",re;for(re=0;re<X.length;re+=3)z+=se[X[re]>>2],z+=se[(X[re]&3)<<4|X[re+1]>>4],z+=se[(X[re+1]&15)<<2|X[re+2]>>6],z+=se[X[re+2]&63];return X.length%3===2?z=z.substring(0,z.length-1)+"=":X.length%3===1&&(z=z.substring(0,z.length-2)+"=="),z}function _e(P,X){var z="";if(P&&(z=Je.call(P)),P&&(z==="[object ArrayBuffer]"||P.buffer&&Je.call(P.buffer)==="[object ArrayBuffer]")){var re,ie=Me;P instanceof ArrayBuffer?(re=P,ie+=Be):(re=P.buffer,z==="[object Int8Array]"?ie+=be:z==="[object Uint8Array]"?ie+=ue:z==="[object Uint8ClampedArray]"?ie+=me:z==="[object Int16Array]"?ie+=Re:z==="[object Uint16Array]"?ie+=xe:z==="[object Int32Array]"?ie+=Te:z==="[object Uint32Array]"?ie+=Ve:z==="[object Float32Array]"?ie+=qe:z==="[object Float64Array]"?ie+=Pe:X(new Error("Failed to get type for BinaryArray"))),X(ie+ze(re))}else if(z==="[object Blob]"){var ee=new FileReader;ee.onload=function(){var Ee=pe+P.type+"~"+ze(this.result);X(Me+F+Ee)},ee.readAsArrayBuffer(P)}else try{X(JSON.stringify(P))}catch(Ee){console.error("Couldn't convert value into a JSON string: ",P),X(null,Ee)}}function We(P){if(P.substring(0,$e)!==Me)return JSON.parse(P);var X=P.substring(Ke),z=P.substring($e,Ke),re;if(z===F&&Ne.test(X)){var ie=X.match(Ne);re=ie[1],X=X.substring(ie[0].length)}var ee=De(X);switch(z){case Be:return ee;case F:return u([ee],{type:re});case be:return new Int8Array(ee);case ue:return new Uint8Array(ee);case me:return new Uint8ClampedArray(ee);case Re:return new Int16Array(ee);case xe:return new Uint16Array(ee);case Te:return new Int32Array(ee);case Ve:return new Uint32Array(ee);case qe:return new Float32Array(ee);case Pe:return new Float64Array(ee);default:throw new Error("Unkown type: "+z)}}var rt={serialize:_e,deserialize:We,stringToBuffer:De,bufferToString:ze};function gt(P,X,z,re){P.executeSql("CREATE TABLE IF NOT EXISTS "+X.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],z,re)}function Lt(P){var X=this,z={db:null};if(P)for(var re in P)z[re]=typeof P[re]!="string"?P[re].toString():P[re];var ie=new d(function(ee,Ee){try{z.db=openDatabase(z.name,String(z.version),z.description,z.size)}catch(Ce){return Ee(Ce)}z.db.transaction(function(Ce){gt(Ce,z,function(){X._dbInfo=z,ee()},function(ge,Se){Ee(Se)})},Ee)});return z.serializer=rt,ie}function Tt(P,X,z,re,ie,ee){P.executeSql(z,re,ie,function(Ee,Ce){Ce.code===Ce.SYNTAX_ERR?Ee.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[X.storeName],function(ge,Se){Se.rows.length?ee(ge,Ce):gt(ge,X,function(){ge.executeSql(z,re,ie,ee)},ee)},ee):ee(Ee,Ce)},ee)}function Zt(P,X){var z=this;P=m(P);var re=new d(function(ie,ee){z.ready().then(function(){var Ee=z._dbInfo;Ee.db.transaction(function(Ce){Tt(Ce,Ee,"SELECT * FROM "+Ee.storeName+" WHERE key = ? LIMIT 1",[P],function(ge,Se){var Oe=Se.rows.length?Se.rows.item(0).value:null;Oe&&(Oe=Ee.serializer.deserialize(Oe)),ie(Oe)},function(ge,Se){ee(Se)})})}).catch(ee)});return f(re,X),re}function tt(P,X){var z=this,re=new d(function(ie,ee){z.ready().then(function(){var Ee=z._dbInfo;Ee.db.transaction(function(Ce){Tt(Ce,Ee,"SELECT * FROM "+Ee.storeName,[],function(ge,Se){for(var Oe=Se.rows,je=Oe.length,ut=0;ut<je;ut++){var Et=Oe.item(ut),$t=Et.value;if($t&&($t=Ee.serializer.deserialize($t)),$t=P($t,Et.key,ut+1),$t!==void 0){ie($t);return}}ie()},function(ge,Se){ee(Se)})})}).catch(ee)});return f(re,X),re}function Ue(P,X,z,re){var ie=this;P=m(P);var ee=new d(function(Ee,Ce){ie.ready().then(function(){X===void 0&&(X=null);var ge=X,Se=ie._dbInfo;Se.serializer.serialize(X,function(Oe,je){je?Ce(je):Se.db.transaction(function(ut){Tt(ut,Se,"INSERT OR REPLACE INTO "+Se.storeName+" (key, value) VALUES (?, ?)",[P,Oe],function(){Ee(ge)},function(Et,$t){Ce($t)})},function(ut){if(ut.code===ut.QUOTA_ERR){if(re>0){Ee(Ue.apply(ie,[P,ge,z,re-1]));return}Ce(ut)}})})}).catch(Ce)});return f(ee,z),ee}function ft(P,X,z){return Ue.apply(this,[P,X,z,1])}function dt(P,X){var z=this;P=m(P);var re=new d(function(ie,ee){z.ready().then(function(){var Ee=z._dbInfo;Ee.db.transaction(function(Ce){Tt(Ce,Ee,"DELETE FROM "+Ee.storeName+" WHERE key = ?",[P],function(){ie()},function(ge,Se){ee(Se)})})}).catch(ee)});return f(re,X),re}function st(P){var X=this,z=new d(function(re,ie){X.ready().then(function(){var ee=X._dbInfo;ee.db.transaction(function(Ee){Tt(Ee,ee,"DELETE FROM "+ee.storeName,[],function(){re()},function(Ce,ge){ie(ge)})})}).catch(ie)});return f(z,P),z}function Ze(P){var X=this,z=new d(function(re,ie){X.ready().then(function(){var ee=X._dbInfo;ee.db.transaction(function(Ee){Tt(Ee,ee,"SELECT COUNT(key) as c FROM "+ee.storeName,[],function(Ce,ge){var Se=ge.rows.item(0).c;re(Se)},function(Ce,ge){ie(ge)})})}).catch(ie)});return f(z,P),z}function Xe(P,X){var z=this,re=new d(function(ie,ee){z.ready().then(function(){var Ee=z._dbInfo;Ee.db.transaction(function(Ce){Tt(Ce,Ee,"SELECT key FROM "+Ee.storeName+" WHERE id = ? LIMIT 1",[P+1],function(ge,Se){var Oe=Se.rows.length?Se.rows.item(0).key:null;ie(Oe)},function(ge,Se){ee(Se)})})}).catch(ee)});return f(re,X),re}function Qe(P){var X=this,z=new d(function(re,ie){X.ready().then(function(){var ee=X._dbInfo;ee.db.transaction(function(Ee){Tt(Ee,ee,"SELECT key FROM "+ee.storeName,[],function(Ce,ge){for(var Se=[],Oe=0;Oe<ge.rows.length;Oe++)Se.push(ge.rows.item(Oe).key);re(Se)},function(Ce,ge){ie(ge)})})}).catch(ie)});return f(z,P),z}function wt(P){return new d(function(X,z){P.transaction(function(re){re.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(ie,ee){for(var Ee=[],Ce=0;Ce<ee.rows.length;Ce++)Ee.push(ee.rows.item(Ce).name);X({db:P,storeNames:Ee})},function(ie,ee){z(ee)})},function(re){z(re)})})}function At(P,X){X=v.apply(this,arguments);var z=this.config();P=typeof P!="function"&&P||{},P.name||(P.name=P.name||z.name,P.storeName=P.storeName||z.storeName);var re=this,ie;return P.name?ie=new d(function(ee){var Ee;P.name===z.name?Ee=re._dbInfo.db:Ee=openDatabase(P.name,"","",0),P.storeName?ee({db:Ee,storeNames:[P.storeName]}):ee(wt(Ee))}).then(function(ee){return new d(function(Ee,Ce){ee.db.transaction(function(ge){function Se(Et){return new d(function($t,Kt){ge.executeSql("DROP TABLE IF EXISTS "+Et,[],function(){$t()},function(Gt,hn){Kt(hn)})})}for(var Oe=[],je=0,ut=ee.storeNames.length;je<ut;je++)Oe.push(Se(ee.storeNames[je]));d.all(Oe).then(function(){Ee()}).catch(function(Et){Ce(Et)})},function(ge){Ce(ge)})})}):ie=d.reject("Invalid arguments"),f(ie,X),ie}var it={_driver:"webSQLStorage",_initStorage:Lt,_support:ne(),iterate:tt,getItem:Zt,setItem:ft,removeItem:dt,clear:st,length:Ze,key:Xe,keys:Qe,dropInstance:At};function Ge(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function et(P,X){var z=P.name+"/";return P.storeName!==X.storeName&&(z+=P.storeName+"/"),z}function lt(){var P="_localforage_support_test";try{return localStorage.setItem(P,!0),localStorage.removeItem(P),!1}catch{return!0}}function ct(){return!lt()||localStorage.length>0}function vt(P){var X=this,z={};if(P)for(var re in P)z[re]=P[re];return z.keyPrefix=et(P,X._defaultConfig),ct()?(X._dbInfo=z,z.serializer=rt,d.resolve()):d.reject()}function jt(P){var X=this,z=X.ready().then(function(){for(var re=X._dbInfo.keyPrefix,ie=localStorage.length-1;ie>=0;ie--){var ee=localStorage.key(ie);ee.indexOf(re)===0&&localStorage.removeItem(ee)}});return f(z,P),z}function It(P,X){var z=this;P=m(P);var re=z.ready().then(function(){var ie=z._dbInfo,ee=localStorage.getItem(ie.keyPrefix+P);return ee&&(ee=ie.serializer.deserialize(ee)),ee});return f(re,X),re}function zt(P,X){var z=this,re=z.ready().then(function(){for(var ie=z._dbInfo,ee=ie.keyPrefix,Ee=ee.length,Ce=localStorage.length,ge=1,Se=0;Se<Ce;Se++){var Oe=localStorage.key(Se);if(Oe.indexOf(ee)===0){var je=localStorage.getItem(Oe);if(je&&(je=ie.serializer.deserialize(je)),je=P(je,Oe.substring(Ee),ge++),je!==void 0)return je}}});return f(re,X),re}function Pt(P,X){var z=this,re=z.ready().then(function(){var ie=z._dbInfo,ee;try{ee=localStorage.key(P)}catch{ee=null}return ee&&(ee=ee.substring(ie.keyPrefix.length)),ee});return f(re,X),re}function Vt(P){var X=this,z=X.ready().then(function(){for(var re=X._dbInfo,ie=localStorage.length,ee=[],Ee=0;Ee<ie;Ee++){var Ce=localStorage.key(Ee);Ce.indexOf(re.keyPrefix)===0&&ee.push(Ce.substring(re.keyPrefix.length))}return ee});return f(z,P),z}function qt(P){var X=this,z=X.keys().then(function(re){return re.length});return f(z,P),z}function Jt(P,X){var z=this;P=m(P);var re=z.ready().then(function(){var ie=z._dbInfo;localStorage.removeItem(ie.keyPrefix+P)});return f(re,X),re}function Pn(P,X,z){var re=this;P=m(P);var ie=re.ready().then(function(){X===void 0&&(X=null);var ee=X;return new d(function(Ee,Ce){var ge=re._dbInfo;ge.serializer.serialize(X,function(Se,Oe){if(Oe)Ce(Oe);else try{localStorage.setItem(ge.keyPrefix+P,Se),Ee(ee)}catch(je){(je.name==="QuotaExceededError"||je.name==="NS_ERROR_DOM_QUOTA_REACHED")&&Ce(je),Ce(je)}})})});return f(ie,z),ie}function Ye(P,X){if(X=v.apply(this,arguments),P=typeof P!="function"&&P||{},!P.name){var z=this.config();P.name=P.name||z.name,P.storeName=P.storeName||z.storeName}var re=this,ie;return P.name?ie=new d(function(ee){P.storeName?ee(et(P,re._defaultConfig)):ee(P.name+"/")}).then(function(ee){for(var Ee=localStorage.length-1;Ee>=0;Ee--){var Ce=localStorage.key(Ee);Ce.indexOf(ee)===0&&localStorage.removeItem(Ce)}}):ie=d.reject("Invalid arguments"),f(ie,X),ie}var J={_driver:"localStorageWrapper",_initStorage:vt,_support:Ge(),iterate:zt,getItem:It,setItem:Pn,removeItem:Jt,clear:jt,length:qt,key:Pt,keys:Vt,dropInstance:Ye},le=function(X,z){return X===z||typeof X=="number"&&typeof z=="number"&&isNaN(X)&&isNaN(z)},we=function(X,z){for(var re=X.length,ie=0;ie<re;){if(le(X[ie],z))return!0;ie++}return!1},ke=Array.isArray||function(P){return Object.prototype.toString.call(P)==="[object Array]"},Ie={},ot={},bt={INDEXEDDB:ve,WEBSQL:it,LOCALSTORAGE:J},St=[bt.INDEXEDDB._driver,bt.WEBSQL._driver,bt.LOCALSTORAGE._driver],Yt=["dropInstance"],en=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Yt),kt={description:"",driver:St.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function ln(P,X){P[X]=function(){var z=arguments;return P.ready().then(function(){return P[X].apply(P,z)})}}function on(){for(var P=1;P<arguments.length;P++){var X=arguments[P];if(X)for(var z in X)X.hasOwnProperty(z)&&(ke(X[z])?arguments[0][z]=X[z].slice():arguments[0][z]=X[z])}return arguments[0]}var kn=function(){function P(X){a(this,P);for(var z in bt)if(bt.hasOwnProperty(z)){var re=bt[z],ie=re._driver;this[z]=ie,Ie[ie]||this.defineDriver(re)}this._defaultConfig=on({},kt),this._config=on({},this._defaultConfig,X),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return P.prototype.config=function(z){if((typeof z>"u"?"undefined":i(z))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var re in z){if(re==="storeName"&&(z[re]=z[re].replace(/\W/g,"_")),re==="version"&&typeof z[re]!="number")return new Error("Database version must be a number.");this._config[re]=z[re]}return"driver"in z&&z.driver?this.setDriver(this._config.driver):!0}else return typeof z=="string"?this._config[z]:this._config},P.prototype.defineDriver=function(z,re,ie){var ee=new d(function(Ee,Ce){try{var ge=z._driver,Se=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!z._driver){Ce(Se);return}for(var Oe=en.concat("_initStorage"),je=0,ut=Oe.length;je<ut;je++){var Et=Oe[je],$t=!we(Yt,Et);if(($t||z[Et])&&typeof z[Et]!="function"){Ce(Se);return}}var Kt=function(){for(var On=function(Wo){return function(){var ao=new Error("Method "+Wo+" is not implemented by the current driver"),Ur=d.reject(ao);return f(Ur,arguments[arguments.length-1]),Ur}},wn=0,$i=Yt.length;wn<$i;wn++){var er=Yt[wn];z[er]||(z[er]=On(er))}};Kt();var Gt=function(On){Ie[ge]&&console.info("Redefining LocalForage driver: "+ge),Ie[ge]=z,ot[ge]=On,Ee()};"_support"in z?z._support&&typeof z._support=="function"?z._support().then(Gt,Ce):Gt(!!z._support):Gt(!0)}catch(hn){Ce(hn)}});return h(ee,re,ie),ee},P.prototype.driver=function(){return this._driver||null},P.prototype.getDriver=function(z,re,ie){var ee=Ie[z]?d.resolve(Ie[z]):d.reject(new Error("Driver not found."));return h(ee,re,ie),ee},P.prototype.getSerializer=function(z){var re=d.resolve(rt);return h(re,z),re},P.prototype.ready=function(z){var re=this,ie=re._driverSet.then(function(){return re._ready===null&&(re._ready=re._initDriver()),re._ready});return h(ie,z,z),ie},P.prototype.setDriver=function(z,re,ie){var ee=this;ke(z)||(z=[z]);var Ee=this._getSupportedDrivers(z);function Ce(){ee._config.driver=ee.driver()}function ge(je){return ee._extend(je),Ce(),ee._ready=ee._initStorage(ee._config),ee._ready}function Se(je){return function(){var ut=0;function Et(){for(;ut<je.length;){var $t=je[ut];return ut++,ee._dbInfo=null,ee._ready=null,ee.getDriver($t).then(ge).catch(Et)}Ce();var Kt=new Error("No available storage method found.");return ee._driverSet=d.reject(Kt),ee._driverSet}return Et()}}var Oe=this._driverSet!==null?this._driverSet.catch(function(){return d.resolve()}):d.resolve();return this._driverSet=Oe.then(function(){var je=Ee[0];return ee._dbInfo=null,ee._ready=null,ee.getDriver(je).then(function(ut){ee._driver=ut._driver,Ce(),ee._wrapLibraryMethodsWithReady(),ee._initDriver=Se(Ee)})}).catch(function(){Ce();var je=new Error("No available storage method found.");return ee._driverSet=d.reject(je),ee._driverSet}),h(this._driverSet,re,ie),this._driverSet},P.prototype.supports=function(z){return!!ot[z]},P.prototype._extend=function(z){on(this,z)},P.prototype._getSupportedDrivers=function(z){for(var re=[],ie=0,ee=z.length;ie<ee;ie++){var Ee=z[ie];this.supports(Ee)&&re.push(Ee)}return re},P.prototype._wrapLibraryMethodsWithReady=function(){for(var z=0,re=en.length;z<re;z++)ln(this,en[z])},P.prototype.createInstance=function(z){return new P(z)},P}(),zn=new kn;r.exports=zn},{3:3}]},{},[4])(4)})}(Yd)),Yd.exports}eN();function tN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),r.forEach(function(o){tN(e,o,n[o])})}return e}function rN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}function oN(e,t){return t=t??{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):rN(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function iN(e,t){if(e==null)return{};var n=aN(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function aN(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}O.createContext(void 0);function sN(e){var t=e.full,n=t===void 0?!1:t,r=e.block,o=r===void 0?!1:r,i=e.className,a=i===void 0?"":i,s=e.message,l=s===void 0?"Loading":s,c=iN(e,["full","block","className","message"]);function u(){return j.jsxs("div",oN(nN({className:Uo.container},c),{children:[j.jsx("div",{className:Uo.ring}),j.jsx("div",{className:Uo.ring}),j.jsx("div",{className:Uo.ring}),j.jsx("div",{className:Uo.ring}),l&&j.jsx("div",{className:Uo.message,children:l})]}))}return n?j.jsx("div",{className:te(Uo.fullscreen,a),children:u()}):o?j.jsx("div",{className:te(Uo.block,a),children:u()}):u()}O.createContext(void 0);function Jn(e){this.content=e}Jn.prototype={constructor:Jn,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return t==-1?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,o=r.find(e),i=r.content.slice();return o==-1?i.push(n||e,t):(i[o+1]=t,n&&(i[o]=n)),new Jn(i)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new Jn(n)},addToStart:function(e,t){return new Jn([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new Jn(n)},addBefore:function(e,t,n){var r=this.remove(t),o=r.content.slice(),i=r.find(e);return o.splice(i==-1?o.length:i,0,t,n),new Jn(o)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return e=Jn.from(e),e.size?new Jn(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=Jn.from(e),e.size?new Jn(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=Jn.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}};Jn.from=function(e){if(e instanceof Jn)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new Jn(t)};function tS(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let o=e.child(r),i=t.child(r);if(o==i){n+=o.nodeSize;continue}if(!o.sameMarkup(i))return n;if(o.isText&&o.text!=i.text){for(let a=0;o.text[a]==i.text[a];a++)n++;return n}if(o.content.size||i.content.size){let a=tS(o.content,i.content,n+1);if(a!=null)return a}n+=o.nodeSize}}function nS(e,t,n,r){for(let o=e.childCount,i=t.childCount;;){if(o==0||i==0)return o==i?null:{a:n,b:r};let a=e.child(--o),s=t.child(--i),l=a.nodeSize;if(a==s){n-=l,r-=l;continue}if(!a.sameMarkup(s))return{a:n,b:r};if(a.isText&&a.text!=s.text){let c=0,u=Math.min(a.text.length,s.text.length);for(;c<u&&a.text[a.text.length-c-1]==s.text[s.text.length-c-1];)c++,n--,r--;return{a:n,b:r}}if(a.content.size||s.content.size){let c=nS(a.content,s.content,n-1,r-1);if(c)return c}n-=l,r-=l}}class Ae{constructor(t,n){if(this.content=t,this.size=n||0,n==null)for(let r=0;r<t.length;r++)this.size+=t[r].nodeSize}nodesBetween(t,n,r,o=0,i){for(let a=0,s=0;s<n;a++){let l=this.content[a],c=s+l.nodeSize;if(c>t&&r(l,o+s,i||null,a)!==!1&&l.content.size){let u=s+1;l.nodesBetween(Math.max(0,t-u),Math.min(l.content.size,n-u),r,o+u)}s=c}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,n,r,o){let i="",a=!0;return this.nodesBetween(t,n,(s,l)=>{let c=s.isText?s.text.slice(Math.max(t,l)-l,n-l):s.isLeaf?o?typeof o=="function"?o(s):o:s.type.spec.leafText?s.type.spec.leafText(s):"":"";s.isBlock&&(s.isLeaf&&c||s.isTextblock)&&r&&(a?a=!1:i+=r),i+=c},0),i}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,o=this.content.slice(),i=0;for(n.isText&&n.sameMarkup(r)&&(o[o.length-1]=n.withText(n.text+r.text),i=1);i<t.content.length;i++)o.push(t.content[i]);return new Ae(o,this.size+t.size)}cut(t,n=this.size){if(t==0&&n==this.size)return this;let r=[],o=0;if(n>t)for(let i=0,a=0;a<n;i++){let s=this.content[i],l=a+s.nodeSize;l>t&&((a<t||l>n)&&(s.isText?s=s.cut(Math.max(0,t-a),Math.min(s.text.length,n-a)):s=s.cut(Math.max(0,t-a-1),Math.min(s.content.size,n-a-1))),r.push(s),o+=s.nodeSize),a=l}return new Ae(r,o)}cutByIndex(t,n){return t==n?Ae.empty:t==0&&n==this.content.length?this:new Ae(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let o=this.content.slice(),i=this.size+n.nodeSize-r.nodeSize;return o[t]=n,new Ae(o,i)}addToStart(t){return new Ae([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new Ae(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(t.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(t){let n=this.content[t];if(!n)throw new RangeError("Index "+t+" out of range for "+this);return n}maybeChild(t){return this.content[t]||null}forEach(t){for(let n=0,r=0;n<this.content.length;n++){let o=this.content[n];t(o,r,n),r+=o.nodeSize}}findDiffStart(t,n=0){return tS(this,t,n)}findDiffEnd(t,n=this.size,r=t.size){return nS(this,t,n,r)}findIndex(t,n=-1){if(t==0)return Gl(0,t);if(t==this.size)return Gl(this.content.length,t);if(t>this.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let r=0,o=0;;r++){let i=this.child(r),a=o+i.nodeSize;if(a>=t)return a==t||n>0?Gl(r+1,a):Gl(r,o);o=a}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,n){if(!n)return Ae.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new Ae(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return Ae.empty;let n,r=0;for(let o=0;o<t.length;o++){let i=t[o];r+=i.nodeSize,o&&i.isText&&t[o-1].sameMarkup(i)?(n||(n=t.slice(0,o)),n[n.length-1]=i.withText(n[n.length-1].text+i.text)):n&&n.push(i)}return new Ae(n||t,r)}static from(t){if(!t)return Ae.empty;if(t instanceof Ae)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new Ae([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}Ae.empty=new Ae([],0);const Jd={index:0,offset:0};function Gl(e,t){return Jd.index=e,Jd.offset=t,Jd}function qc(e,t){if(e===t)return!0;if(!(e&&typeof e=="object")||!(t&&typeof t=="object"))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!qc(e[r],t[r]))return!1}else{for(let r in e)if(!(r in t)||!qc(e[r],t[r]))return!1;for(let r in t)if(!(r in e))return!1}return!0}let pn=class yh{constructor(t,n){this.type=t,this.attrs=n}addToSet(t){let n,r=!1;for(let o=0;o<t.length;o++){let i=t[o];if(this.eq(i))return t;if(this.type.excludes(i.type))n||(n=t.slice(0,o));else{if(i.type.excludes(this.type))return t;!r&&i.type.rank>this.type.rank&&(n||(n=t.slice(0,o)),n.push(this),r=!0),n&&n.push(i)}}return n||(n=t.slice()),r||n.push(this),n}removeFromSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return t.slice(0,n).concat(t.slice(n+1));return t}isInSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return!0;return!1}eq(t){return this==t||this.type==t.type&&qc(this.attrs,t.attrs)}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=t.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let o=r.create(n.attrs);return r.checkAttrs(o.attrs),o}static sameSet(t,n){if(t==n)return!0;if(t.length!=n.length)return!1;for(let r=0;r<t.length;r++)if(!t[r].eq(n[r]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&t.length==0)return yh.none;if(t instanceof yh)return[t];let n=t.slice();return n.sort((r,o)=>r.type.rank-o.type.rank),n}};pn.none=[];class Kc extends Error{}class nt{constructor(t,n,r){this.content=t,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=oS(this.content,t+this.openStart,n);return r&&new nt(r,this.openStart,this.openEnd)}removeBetween(t,n){return new nt(rS(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,n){if(!n)return nt.empty;let r=n.openStart||0,o=n.openEnd||0;if(typeof r!="number"||typeof o!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new nt(Ae.fromJSON(t,n.content),r,o)}static maxOpen(t,n=!0){let r=0,o=0;for(let i=t.firstChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=t.lastChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.lastChild)o++;return new nt(t,r,o)}}nt.empty=new nt(Ae.empty,0,0);function rS(e,t,n){let{index:r,offset:o}=e.findIndex(t),i=e.maybeChild(r),{index:a,offset:s}=e.findIndex(n);if(o==t||i.isText){if(s!=n&&!e.child(a).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=a)throw new RangeError("Removing non-flat range");return e.replaceChild(r,i.copy(rS(i.content,t-o-1,n-o-1)))}function oS(e,t,n,r){let{index:o,offset:i}=e.findIndex(t),a=e.maybeChild(o);if(i==t||a.isText)return e.cut(0,t).append(n).append(e.cut(t));let s=oS(a.content,t-i-1,n);return s&&e.replaceChild(o,a.copy(s))}function lN(e,t,n){if(n.openStart>e.depth)throw new Kc("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new Kc("Inconsistent open depths");return iS(e,t,n,0)}function iS(e,t,n,r){let o=e.index(r),i=e.node(r);if(o==t.index(r)&&r<e.depth-n.openStart){let a=iS(e,t,n,r+1);return i.copy(i.content.replaceChild(o,a))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&e.depth==r&&t.depth==r){let a=e.parent,s=a.content;return Fi(a,s.cut(0,e.parentOffset).append(n.content).append(s.cut(t.parentOffset)))}else{let{start:a,end:s}=cN(n,e);return Fi(i,sS(e,a,s,t,r))}else return Fi(i,Gc(e,t,r))}function aS(e,t){if(!t.type.compatibleContent(e.type))throw new Kc("Cannot join "+t.type.name+" onto "+e.type.name)}function Ch(e,t,n){let r=e.node(n);return aS(r,t.node(n)),r}function zi(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function Ts(e,t,n,r){let o=(t||e).node(n),i=0,a=t?t.index(n):o.childCount;e&&(i=e.index(n),e.depth>n?i++:e.textOffset&&(zi(e.nodeAfter,r),i++));for(let s=i;s<a;s++)zi(o.child(s),r);t&&t.depth==n&&t.textOffset&&zi(t.nodeBefore,r)}function Fi(e,t){return e.type.checkContent(t),e.copy(t)}function sS(e,t,n,r,o){let i=e.depth>o&&Ch(e,t,o+1),a=r.depth>o&&Ch(n,r,o+1),s=[];return Ts(null,e,o,s),i&&a&&t.index(o)==n.index(o)?(aS(i,a),zi(Fi(i,sS(e,t,n,r,o+1)),s)):(i&&zi(Fi(i,Gc(e,t,o+1)),s),Ts(t,n,o,s),a&&zi(Fi(a,Gc(n,r,o+1)),s)),Ts(r,null,o,s),new Ae(s)}function Gc(e,t,n){let r=[];if(Ts(null,e,n,r),e.depth>n){let o=Ch(e,t,n+1);zi(Fi(o,Gc(e,t,n+1)),r)}return Ts(t,null,n,r),new Ae(r)}function cN(e,t){let n=t.depth-e.openStart,o=t.node(n).copy(e.content);for(let i=n-1;i>=0;i--)o=t.node(i).copy(Ae.from(o));return{start:o.resolveNoCache(e.openStart+n),end:o.resolveNoCache(o.content.size-e.openEnd-n)}}class qs{constructor(t,n,r){this.pos=t,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[this.resolveDepth(t)*3]}index(t){return this.path[this.resolveDepth(t)*3+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)}start(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,n=this.index(this.depth);if(n==t.childCount)return null;let r=this.pos-this.path[this.path.length-1],o=t.child(n);return r?t.child(n).cut(r):o}get nodeBefore(){let t=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(t).cut(0,n):t==0?null:this.parent.child(t-1)}posAtIndex(t,n){n=this.resolveDepth(n);let r=this.path[n*3],o=n==0?0:this.path[n*3-1]+1;for(let i=0;i<t;i++)o+=r.child(i).nodeSize;return o}marks(){let t=this.parent,n=this.index();if(t.content.size==0)return pn.none;if(this.textOffset)return t.child(n).marks;let r=t.maybeChild(n-1),o=t.maybeChild(n);if(!r){let s=r;r=o,o=s}let i=r.marks;for(var a=0;a<i.length;a++)i[a].type.spec.inclusive===!1&&(!o||!i[a].isInSet(o.marks))&&(i=i[a--].removeFromSet(i));return i}marksAcross(t){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,o=t.parent.maybeChild(t.index());for(var i=0;i<r.length;i++)r[i].type.spec.inclusive===!1&&(!o||!r[i].isInSet(o.marks))&&(r=r[i--].removeFromSet(r));return r}sharedDepth(t){for(let n=this.depth;n>0;n--)if(this.start(n)<=t&&this.end(n)>=t)return n;return 0}blockRange(t=this,n){if(t.pos<this.pos)return t.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);r>=0;r--)if(t.pos<=this.end(r)&&(!n||n(this.node(r))))return new Xc(this,t,r);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos<this.pos?t:this}toString(){let t="";for(let n=1;n<=this.depth;n++)t+=(t?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return t+":"+this.parentOffset}static resolve(t,n){if(!(n>=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");let r=[],o=0,i=n;for(let a=t;;){let{index:s,offset:l}=a.content.findIndex(i),c=i-l;if(r.push(a,s,o+l),!c||(a=a.child(s),a.isText))break;i=c-1,o+=l+1}return new qs(n,r,i)}static resolveCached(t,n){let r=bv.get(t);if(r)for(let i=0;i<r.elts.length;i++){let a=r.elts[i];if(a.pos==n)return a}else bv.set(t,r=new uN);let o=r.elts[r.i]=qs.resolve(t,n);return r.i=(r.i+1)%dN,o}}class uN{constructor(){this.elts=[],this.i=0}}const dN=12,bv=new WeakMap;class Xc{constructor(t,n,r){this.$from=t,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const fN=Object.create(null);let ci=class Sh{constructor(t,n,r,o=pn.none){this.type=t,this.attrs=n,this.marks=o,this.content=r||Ae.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(t){return this.content.child(t)}maybeChild(t){return this.content.maybeChild(t)}forEach(t){this.content.forEach(t)}nodesBetween(t,n,r,o=0){this.content.nodesBetween(t,n,r,o,this)}descendants(t){this.nodesBetween(0,this.content.size,t)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(t,n,r,o){return this.content.textBetween(t,n,r,o)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(t){return this==t||this.sameMarkup(t)&&this.content.eq(t.content)}sameMarkup(t){return this.hasMarkup(t.type,t.attrs,t.marks)}hasMarkup(t,n,r){return this.type==t&&qc(this.attrs,n||t.defaultAttrs||fN)&&pn.sameSet(this.marks,r||pn.none)}copy(t=null){return t==this.content?this:new Sh(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new Sh(this.type,this.attrs,this.content,t)}cut(t,n=this.content.size){return t==0&&n==this.content.size?this:this.copy(this.content.cut(t,n))}slice(t,n=this.content.size,r=!1){if(t==n)return nt.empty;let o=this.resolve(t),i=this.resolve(n),a=r?0:o.sharedDepth(n),s=o.start(a),c=o.node(a).content.cut(o.pos-s,i.pos-s);return new nt(c,o.depth-a,i.depth-a)}replace(t,n,r){return lN(this.resolve(t),this.resolve(n),r)}nodeAt(t){for(let n=this;;){let{index:r,offset:o}=n.content.findIndex(t);if(n=n.maybeChild(r),!n)return null;if(o==t||n.isText)return n;t-=o+1}}childAfter(t){let{index:n,offset:r}=this.content.findIndex(t);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(t){if(t==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(t);if(r<t)return{node:this.content.child(n),index:n,offset:r};let o=this.content.child(n-1);return{node:o,index:n-1,offset:r-o.nodeSize}}resolve(t){return qs.resolveCached(this,t)}resolveNoCache(t){return qs.resolve(this,t)}rangeHasMark(t,n,r){let o=!1;return n>t&&this.nodesBetween(t,n,i=>(r.isInSet(i.marks)&&(o=!0),!o)),o}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),lS(this.marks,t)}contentMatchAt(t){let n=this.type.contentMatch.matchFragment(this.content,0,t);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(t,n,r=Ae.empty,o=0,i=r.childCount){let a=this.contentMatchAt(t).matchFragment(r,o,i),s=a&&a.matchFragment(this.content,n);if(!s||!s.validEnd)return!1;for(let l=o;l<i;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(t,n,r,o){if(o&&!this.type.allowsMarks(o))return!1;let i=this.contentMatchAt(t).matchType(r),a=i&&i.matchFragment(this.content,n);return a?a.validEnd:!1}canAppend(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let t=pn.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),t=r.addToSet(t)}if(!pn.sameSet(t,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(n=>n.toJSON())),t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(t.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(n.text,r)}let o=Ae.fromJSON(t,n.content),i=t.nodeType(n.type).create(n.attrs,o,r);return i.type.checkAttrs(i.attrs),i}};ci.prototype.text=void 0;class Yc extends ci{constructor(t,n,r,o){if(super(t,n,null,o),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):lS(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,n){return this.text.slice(t,n)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new Yc(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new Yc(this.type,this.attrs,t,this.marks)}cut(t=0,n=this.text.length){return t==0&&n==this.text.length?this:this.withText(this.text.slice(t,n))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function lS(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class Gi{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new hN(t,n);if(r.next==null)return Gi.empty;let o=cS(r);r.next&&r.err("Unexpected trailing text");let i=CN(yN(o));return SN(i,r),i}matchType(t){for(let n=0;n<this.next.length;n++)if(this.next[n].type==t)return this.next[n].next;return null}matchFragment(t,n=0,r=t.childCount){let o=this;for(let i=n;o&&i<r;i++)o=o.matchType(t.child(i).type);return o}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let t=0;t<this.next.length;t++){let{type:n}=this.next[t];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(t){for(let n=0;n<this.next.length;n++)for(let r=0;r<t.next.length;r++)if(this.next[n].type==t.next[r].type)return!0;return!1}fillBefore(t,n=!1,r=0){let o=[this];function i(a,s){let l=a.matchFragment(t,r);if(l&&(!n||l.validEnd))return Ae.from(s.map(c=>c.createAndFill()));for(let c=0;c<a.next.length;c++){let{type:u,next:d}=a.next[c];if(!(u.isText||u.hasRequiredAttrs())&&o.indexOf(d)==-1){o.push(d);let f=i(d,s.concat(u));if(f)return f}}return null}return i(this,[])}findWrapping(t){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==t)return this.wrapCache[r+1];let n=this.computeWrapping(t);return this.wrapCache.push(t,n),n}computeWrapping(t){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let o=r.shift(),i=o.match;if(i.matchType(t)){let a=[];for(let s=o;s.type;s=s.via)a.push(s.type);return a.reverse()}for(let a=0;a<i.next.length;a++){let{type:s,next:l}=i.next[a];!s.isLeaf&&!s.hasRequiredAttrs()&&!(s.name in n)&&(!o.type||l.validEnd)&&(r.push({match:s.contentMatch,type:s,via:o}),n[s.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(t){if(t>=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function n(r){t.push(r);for(let o=0;o<r.next.length;o++)t.indexOf(r.next[o].next)==-1&&n(r.next[o].next)}return n(this),t.map((r,o)=>{let i=o+(r.validEnd?"*":" ")+" ";for(let a=0;a<r.next.length;a++)i+=(a?", ":"")+r.next[a].type.name+"->"+t.indexOf(r.next[a].next);return i}).join(`
41
+ `)}}Gi.empty=new Gi(!0);class hN{constructor(t,n){this.string=t,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function cS(e){let t=[];do t.push(pN(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function pN(e){let t=[];do t.push(mN(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function mN(e){let t=bN(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=gN(e,t);else break;return t}function yv(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function gN(e,t){let n=yv(e),r=n;return e.eat(",")&&(e.next!="}"?r=yv(e):r=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function vN(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let o=[];for(let i in n){let a=n[i];a.isInGroup(t)&&o.push(a)}return o.length==0&&e.err("No node type or group '"+t+"' found"),o}function bN(e){if(e.eat("(")){let t=cS(e);return e.eat(")")||e.err("Missing closing paren"),t}else if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let t=vN(e,e.next).map(n=>(e.inline==null?e.inline=n.isInline:e.inline!=n.isInline&&e.err("Mixing inline and block content"),{type:"name",value:n}));return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}}function yN(e){let t=[[]];return o(i(e,0),n()),t;function n(){return t.push([])-1}function r(a,s,l){let c={term:l,to:s};return t[a].push(c),c}function o(a,s){a.forEach(l=>l.to=s)}function i(a,s){if(a.type=="choice")return a.exprs.reduce((l,c)=>l.concat(i(c,s)),[]);if(a.type=="seq")for(let l=0;;l++){let c=i(a.exprs[l],s);if(l==a.exprs.length-1)return c;o(c,s=n())}else if(a.type=="star"){let l=n();return r(s,l),o(i(a.expr,l),l),[r(l)]}else if(a.type=="plus"){let l=n();return o(i(a.expr,s),l),o(i(a.expr,l),l),[r(l)]}else{if(a.type=="opt")return[r(s)].concat(i(a.expr,s));if(a.type=="range"){let l=s;for(let c=0;c<a.min;c++){let u=n();o(i(a.expr,l),u),l=u}if(a.max==-1)o(i(a.expr,l),l);else for(let c=a.min;c<a.max;c++){let u=n();r(l,u),o(i(a.expr,l),u),l=u}return[r(l)]}else{if(a.type=="name")return[r(s,void 0,a.value)];throw new Error("Unknown expr type")}}}}function uS(e,t){return t-e}function Cv(e,t){let n=[];return r(t),n.sort(uS);function r(o){let i=e[o];if(i.length==1&&!i[0].term)return r(i[0].to);n.push(o);for(let a=0;a<i.length;a++){let{term:s,to:l}=i[a];!s&&n.indexOf(l)==-1&&r(l)}}}function CN(e){let t=Object.create(null);return n(Cv(e,0));function n(r){let o=[];r.forEach(a=>{e[a].forEach(({term:s,to:l})=>{if(!s)return;let c;for(let u=0;u<o.length;u++)o[u][0]==s&&(c=o[u][1]);Cv(e,l).forEach(u=>{c||o.push([s,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let i=t[r.join(",")]=new Gi(r.indexOf(e.length-1)>-1);for(let a=0;a<o.length;a++){let s=o[a][1].sort(uS);i.next.push({type:o[a][0],next:t[s.join(",")]||n(s)})}return i}}function SN(e,t){for(let n=0,r=[e];n<r.length;n++){let o=r[n],i=!o.validEnd,a=[];for(let s=0;s<o.next.length;s++){let{type:l,next:c}=o.next[s];a.push(l.name),i&&!(l.isText||l.hasRequiredAttrs())&&(i=!1),r.indexOf(c)==-1&&r.push(c)}i&&t.err("Only non-generatable nodes ("+a.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function dS(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function fS(e,t){let n=Object.create(null);for(let r in e){let o=t&&t[r];if(o===void 0){let i=e[r];if(i.hasDefault)o=i.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=o}return n}function hS(e,t,n,r){for(let o in t)if(!(o in e))throw new RangeError(`Unsupported attribute ${o} for ${n} of type ${o}`);for(let o in e){let i=e[o];i.validate&&i.validate(t[o])}}function pS(e,t){let n=Object.create(null);if(t)for(let r in t)n[r]=new wN(e,r,t[r]);return n}let Sv=class mS{constructor(t,n,r){this.name=t,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=pS(t,r.attrs),this.defaultAttrs=dS(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||t=="text"),this.isText=t=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Gi.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(t){return this.groups.indexOf(t)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:fS(this.attrs,t)}create(t=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new ci(this,this.computeAttrs(t),Ae.from(n),pn.setFrom(r))}createChecked(t=null,n,r){return n=Ae.from(n),this.checkContent(n),new ci(this,this.computeAttrs(t),n,pn.setFrom(r))}createAndFill(t=null,n,r){if(t=this.computeAttrs(t),n=Ae.from(n),n.size){let a=this.contentMatch.fillBefore(n);if(!a)return null;n=a.append(n)}let o=this.contentMatch.matchFragment(n),i=o&&o.fillBefore(Ae.empty,!0);return i?new ci(this,t,n.append(i),pn.setFrom(r)):null}validContent(t){let n=this.contentMatch.matchFragment(t);if(!n||!n.validEnd)return!1;for(let r=0;r<t.childCount;r++)if(!this.allowsMarks(t.child(r).marks))return!1;return!0}checkContent(t){if(!this.validContent(t))throw new RangeError(`Invalid content for node ${this.name}: ${t.toString().slice(0,50)}`)}checkAttrs(t){hS(this.attrs,t,"node",this.name)}allowsMarkType(t){return this.markSet==null||this.markSet.indexOf(t)>-1}allowsMarks(t){if(this.markSet==null)return!0;for(let n=0;n<t.length;n++)if(!this.allowsMarkType(t[n].type))return!1;return!0}allowedMarks(t){if(this.markSet==null)return t;let n;for(let r=0;r<t.length;r++)this.allowsMarkType(t[r].type)?n&&n.push(t[r]):n||(n=t.slice(0,r));return n?n.length?n:pn.none:t}static compile(t,n){let r=Object.create(null);t.forEach((i,a)=>r[i]=new mS(i,n,a));let o=n.spec.topNode||"doc";if(!r[o])throw new RangeError("Schema is missing its top node type ('"+o+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function xN(e,t,n){let r=n.split("|");return o=>{let i=o===null?"null":typeof o;if(r.indexOf(i)<0)throw new RangeError(`Expected value of type ${r} for attribute ${t} on type ${e}, got ${i}`)}}class wN{constructor(t,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?xN(t,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class Qu{constructor(t,n,r,o){this.name=t,this.rank=n,this.schema=r,this.spec=o,this.attrs=pS(t,o.attrs),this.excluded=null;let i=dS(this.attrs);this.instance=i?new pn(this,i):null}create(t=null){return!t&&this.instance?this.instance:new pn(this,fS(this.attrs,t))}static compile(t,n){let r=Object.create(null),o=0;return t.forEach((i,a)=>r[i]=new Qu(i,o++,n,a)),r}removeFromSet(t){for(var n=0;n<t.length;n++)t[n].type==this&&(t=t.slice(0,n).concat(t.slice(n+1)),n--);return t}isInSet(t){for(let n=0;n<t.length;n++)if(t[n].type==this)return t[n]}checkAttrs(t){hS(this.attrs,t,"mark",this.name)}excludes(t){return this.excluded.indexOf(t)>-1}}let gS=class{constructor(t){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let o in t)n[o]=t[o];n.nodes=Jn.from(t.nodes),n.marks=Jn.from(t.marks||{}),this.nodes=Sv.compile(this.spec.nodes,this),this.marks=Qu.compile(this.spec.marks,this);let r=Object.create(null);for(let o in this.nodes){if(o in this.marks)throw new RangeError(o+" can not be both a node and a mark");let i=this.nodes[o],a=i.spec.content||"",s=i.spec.marks;if(i.contentMatch=r[a]||(r[a]=Gi.parse(a,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!i.isInline||!i.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=i}i.markSet=s=="_"?null:s?xv(this,s.split(" ")):s==""||!i.inlineContent?[]:null}for(let o in this.marks){let i=this.marks[o],a=i.spec.excludes;i.excluded=a==null?[i]:a==""?[]:xv(this,a.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,n=null,r,o){if(typeof t=="string")t=this.nodeType(t);else if(t instanceof Sv){if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}else throw new RangeError("Invalid node type: "+t);return t.createChecked(n,r,o)}text(t,n){let r=this.nodes.text;return new Yc(r,r.defaultAttrs,t,pn.setFrom(n))}mark(t,n){return typeof t=="string"&&(t=this.marks[t]),t.create(n)}nodeFromJSON(t){return ci.fromJSON(this,t)}markFromJSON(t){return pn.fromJSON(this,t)}nodeType(t){let n=this.nodes[t];if(!n)throw new RangeError("Unknown node type: "+t);return n}};function xv(e,t){let n=[];for(let r=0;r<t.length;r++){let o=t[r],i=e.marks[o],a=i;if(i)n.push(i);else for(let s in e.marks){let l=e.marks[s];(o=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(o)>-1)&&n.push(a=l)}if(!a)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}function EN(e){return e.tag!=null}function ON(e){return e.style!=null}let As=class xh{constructor(t,n){this.schema=t,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(o=>{if(EN(o))this.tags.push(o);else if(ON(o)){let i=/[^=]*/.exec(o.style)[0];r.indexOf(i)<0&&r.push(i),this.styles.push(o)}}),this.normalizeLists=!this.tags.some(o=>{if(!/^(ul|ol)\b/.test(o.tag)||!o.node)return!1;let i=t.nodes[o.node];return i.contentMatch.matchType(i)})}parse(t,n={}){let r=new Ev(this,n,!1);return r.addAll(t,pn.none,n.from,n.to),r.finish()}parseSlice(t,n={}){let r=new Ev(this,n,!0);return r.addAll(t,pn.none,n.from,n.to),nt.maxOpen(r.finish())}matchTag(t,n,r){for(let o=r?this.tags.indexOf(r)+1:0;o<this.tags.length;o++){let i=this.tags[o];if(MN(t,i.tag)&&(i.namespace===void 0||t.namespaceURI==i.namespace)&&(!i.context||n.matchesContext(i.context))){if(i.getAttrs){let a=i.getAttrs(t);if(a===!1)continue;i.attrs=a||void 0}return i}}}matchStyle(t,n,r,o){for(let i=o?this.styles.indexOf(o)+1:0;i<this.styles.length;i++){let a=this.styles[i],s=a.style;if(!(s.indexOf(t)!=0||a.context&&!r.matchesContext(a.context)||s.length>t.length&&(s.charCodeAt(t.length)!=61||s.slice(t.length+1)!=n))){if(a.getAttrs){let l=a.getAttrs(n);if(l===!1)continue;a.attrs=l||void 0}return a}}}static schemaRules(t){let n=[];function r(o){let i=o.priority==null?50:o.priority,a=0;for(;a<n.length;a++){let s=n[a];if((s.priority==null?50:s.priority)<i)break}n.splice(a,0,o)}for(let o in t.marks){let i=t.marks[o].spec.parseDOM;i&&i.forEach(a=>{r(a=Ov(a)),a.mark||a.ignore||a.clearMark||(a.mark=o)})}for(let o in t.nodes){let i=t.nodes[o].spec.parseDOM;i&&i.forEach(a=>{r(a=Ov(a)),a.node||a.ignore||a.mark||(a.node=o)})}return n}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new xh(t,xh.schemaRules(t)))}};const vS={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},$N={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},bS={ol:!0,ul:!0},Ks=1,wh=2,xc=4;function wv(e,t,n){return t!=null?(t?Ks:0)|(t==="full"?wh:0):e&&e.whitespace=="pre"?Ks|wh:n&-5}class Xl{constructor(t,n,r,o,i,a){this.type=t,this.attrs=n,this.marks=r,this.solid=o,this.options=a,this.content=[],this.activeMarks=pn.none,this.match=i||(a&xc?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(Ae.from(t));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,o;return(o=r.findWrapping(t.type))?(this.match=r,o):null}}return this.match.findWrapping(t.type)}finish(t){if(!(this.options&Ks)){let r=this.content[this.content.length-1],o;if(r&&r.isText&&(o=/[ \t\r\n\u000c]+$/.exec(r.text))){let i=r;r.text.length==o[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-o[0].length))}}let n=Ae.from(this.content);return!t&&this.match&&(n=n.append(this.match.fillBefore(Ae.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!vS.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}}class Ev{constructor(t,n,r){this.parser=t,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let o=n.topNode,i,a=wv(null,n.preserveWhitespace,0)|(r?xc:0);o?i=new Xl(o.type,o.attrs,pn.none,!0,n.topMatch||o.type.contentMatch,a):r?i=new Xl(null,null,pn.none,!0,null,a):i=new Xl(t.schema.topNodeType,null,pn.none,!0,null,a),this.nodes=[i],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t,n){t.nodeType==3?this.addTextNode(t,n):t.nodeType==1&&this.addElement(t,n)}addTextNode(t,n){let r=t.nodeValue,o=this.top,i=o.options&wh?"full":this.localPreserveWS||(o.options&Ks)>0;if(i==="full"||o.inlineContext(t)||/[^ \t\r\n\u000c]/.test(r)){if(i)i!=="full"?r=r.replace(/\r?\n|\r/g," "):r=r.replace(/\r\n?/g,`
42
+ `);else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let a=o.content[o.content.length-1],s=t.previousSibling;(!a||s&&s.nodeName=="BR"||a.isText&&/[ \t\r\n\u000c]$/.test(a.text))&&(r=r.slice(1))}r&&this.insertNode(this.parser.schema.text(r),n),this.findInText(t)}else this.findInside(t)}addElement(t,n,r){let o=this.localPreserveWS,i=this.top;(t.tagName=="PRE"||/pre/.test(t.style&&t.style.whiteSpace))&&(this.localPreserveWS=!0);let a=t.nodeName.toLowerCase(),s;bS.hasOwnProperty(a)&&this.parser.normalizeLists&&NN(t);let l=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(s=this.parser.matchTag(t,this,r));e:if(l?l.ignore:$N.hasOwnProperty(a))this.findInside(t),this.ignoreFallback(t,n);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(t=l.skip);let c,u=this.needsBlock;if(vS.hasOwnProperty(a))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),c=!0,i.type||(this.needsBlock=!0);else if(!t.firstChild){this.leafFallback(t,n);break e}let d=l&&l.skip?n:this.readStyles(t,n);d&&this.addAll(t,d),c&&this.sync(i),this.needsBlock=u}else{let c=this.readStyles(t,n);c&&this.addElementByRule(t,l,c,l.consuming===!1?s:void 0)}this.localPreserveWS=o}leafFallback(t,n){t.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode(`
43
+ `),n)}ignoreFallback(t,n){t.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n)}readStyles(t,n){let r=t.style;if(r&&r.length)for(let o=0;o<this.parser.matchedStyles.length;o++){let i=this.parser.matchedStyles[o],a=r.getPropertyValue(i);if(a)for(let s=void 0;;){let l=this.parser.matchStyle(i,a,this,s);if(!l)break;if(l.ignore)return null;if(l.clearMark?n=n.filter(c=>!l.clearMark(c)):n=n.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)s=l;else break}}return n}addElementByRule(t,n,r,o){let i,a;if(n.node)if(a=this.parser.schema.nodes[n.node],a.isLeaf)this.insertNode(a.create(n.attrs),r)||this.leafFallback(t,r);else{let l=this.enter(a,n.attrs||null,r,n.preserveWhitespace);l&&(i=!0,r=l)}else{let l=this.parser.schema.marks[n.mark];r=r.concat(l.create(n.attrs))}let s=this.top;if(a&&a.isLeaf)this.findInside(t);else if(o)this.addElement(t,r,o);else if(n.getContent)this.findInside(t),n.getContent(t,this.parser.schema).forEach(l=>this.insertNode(l,r));else{let l=t;typeof n.contentElement=="string"?l=t.querySelector(n.contentElement):typeof n.contentElement=="function"?l=n.contentElement(t):n.contentElement&&(l=n.contentElement),this.findAround(t,l,!0),this.addAll(l,r),this.findAround(t,l,!1)}i&&this.sync(s)&&this.open--}addAll(t,n,r,o){let i=r||0;for(let a=r?t.childNodes[r]:t.firstChild,s=o==null?null:t.childNodes[o];a!=s;a=a.nextSibling,++i)this.findAtPoint(t,i),this.addDOM(a,n);this.findAtPoint(t,i)}findPlace(t,n){let r,o;for(let i=this.open;i>=0;i--){let a=this.nodes[i],s=a.findWrapping(t);if(s&&(!r||r.length>s.length)&&(r=s,o=a,!s.length)||a.solid)break}if(!r)return null;this.sync(o);for(let i=0;i<r.length;i++)n=this.enterInner(r[i],null,n,!1);return n}insertNode(t,n){if(t.isInline&&this.needsBlock&&!this.top.type){let o=this.textblockFromContext();o&&(n=this.enterInner(o,null,n))}let r=this.findPlace(t,n);if(r){this.closeExtra();let o=this.top;o.match&&(o.match=o.match.matchType(t.type));let i=pn.none;for(let a of r.concat(t.marks))(o.type?o.type.allowsMarkType(a.type):$v(a.type,t.type))&&(i=a.addToSet(i));return o.content.push(t.mark(i)),!0}return!1}enter(t,n,r,o){let i=this.findPlace(t.create(n),r);return i&&(i=this.enterInner(t,n,r,!0,o)),i}enterInner(t,n,r,o=!1,i){this.closeExtra();let a=this.top;a.match=a.match&&a.match.matchType(t);let s=wv(t,i,a.options);a.options&xc&&a.content.length==0&&(s|=xc);let l=pn.none;return r=r.filter(c=>(a.type?a.type.allowsMarkType(c.type):$v(c.type,t))?(l=c.addToSet(l),!1):!0),this.nodes.push(new Xl(t,n,l,o,null,s)),this.open++,r}closeExtra(t=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(t){for(let n=this.open;n>=0;n--){if(this.nodes[n]==t)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=Ks)}return!1}get currentPos(){this.closeExtra();let t=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let o=r.length-1;o>=0;o--)t+=r[o].nodeSize;n&&t++}return t}findAtPoint(t,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==t&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&t.nodeType==1&&t.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(t,n,r){if(t!=n&&this.find)for(let o=0;o<this.find.length;o++)this.find[o].pos==null&&t.nodeType==1&&t.contains(this.find[o].node)&&n.compareDocumentPosition(this.find[o].node)&(r?2:4)&&(this.find[o].pos=this.currentPos)}findInText(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==t&&(this.find[n].pos=this.currentPos-(t.nodeValue.length-this.find[n].offset))}matchesContext(t){if(t.indexOf("|")>-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let n=t.split("/"),r=this.options.context,o=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(o?0:1),a=(s,l)=>{for(;s>=0;s--){let c=n[s];if(c==""){if(s==n.length-1||s==0)continue;for(;l>=i;l--)if(a(s-1,l))return!0;return!1}else{let u=l>0||l==0&&o?this.nodes[l].type:r&&l>=i?r.node(l-i).type:null;if(!u||u.name!=c&&!u.isInGroup(c))return!1;l--}}return!0};return a(n.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}}function NN(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let r=t.nodeType==1?t.nodeName.toLowerCase():null;r&&bS.hasOwnProperty(r)&&n?(n.appendChild(t),t=n):r=="li"?n=t:r&&(n=null)}}function MN(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function Ov(e){let t={};for(let n in e)t[n]=e[n];return t}function $v(e,t){let n=t.schema.nodes;for(let r in n){let o=n[r];if(!o.allowsMarkType(e))continue;let i=[],a=s=>{i.push(s);for(let l=0;l<s.edgeCount;l++){let{type:c,next:u}=s.edge(l);if(c==t||i.indexOf(u)<0&&a(u))return!0}};if(a(o.contentMatch))return!0}}class na{constructor(t,n){this.nodes=t,this.marks=n}serializeFragment(t,n={},r){r||(r=Qd(n).createDocumentFragment());let o=r,i=[];return t.forEach(a=>{if(i.length||a.marks.length){let s=0,l=0;for(;s<i.length&&l<a.marks.length;){let c=a.marks[l];if(!this.marks[c.type.name]){l++;continue}if(!c.eq(i[s][0])||c.type.spec.spanning===!1)break;s++,l++}for(;s<i.length;)o=i.pop()[1];for(;l<a.marks.length;){let c=a.marks[l++],u=this.serializeMark(c,a.isInline,n);u&&(i.push([c,o]),o.appendChild(u.dom),o=u.contentDOM||u.dom)}}o.appendChild(this.serializeNodeInner(a,n))}),r}serializeNodeInner(t,n){let{dom:r,contentDOM:o}=wc(Qd(n),this.nodes[t.type.name](t),null,t.attrs);if(o){if(t.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(t.content,n,o)}return r}serializeNode(t,n={}){let r=this.serializeNodeInner(t,n);for(let o=t.marks.length-1;o>=0;o--){let i=this.serializeMark(t.marks[o],t.isInline,n);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(t,n,r={}){let o=this.marks[t.type.name];return o&&wc(Qd(r),o(t,n),null,t.attrs)}static renderSpec(t,n,r=null,o){return wc(t,n,r,o)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new na(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let n=Nv(t.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(t){return Nv(t.marks)}}function Nv(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function Qd(e){return e.document||window.document}const Mv=new WeakMap;function RN(e){let t=Mv.get(e);return t===void 0&&Mv.set(e,t=IN(e)),t}function IN(e){let t=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")t||(t=[]),t.push(r);else for(let o=0;o<r.length;o++)n(r[o]);else for(let o in r)n(r[o])}return n(e),t}function wc(e,t,n,r){if(typeof t=="string")return{dom:e.createTextNode(t)};if(t.nodeType!=null)return{dom:t};if(t.dom&&t.dom.nodeType!=null)return t;let o=t[0],i;if(typeof o!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(i=RN(r))&&i.indexOf(t)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let a=o.indexOf(" ");a>0&&(n=o.slice(0,a),o=o.slice(a+1));let s,l=n?e.createElementNS(n,o):e.createElement(o),c=t[1],u=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){u=2;for(let d in c)if(c[d]!=null){let f=d.indexOf(" ");f>0?l.setAttributeNS(d.slice(0,f),d.slice(f+1),c[d]):l.setAttribute(d,c[d])}}for(let d=u;d<t.length;d++){let f=t[d];if(f===0){if(d<t.length-1||d>u)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:h,contentDOM:m}=wc(e,f,n,r);if(l.appendChild(h),m){if(s)throw new RangeError("Multiple content holes");s=m}}}return{dom:l,contentDOM:s}}const yS=65535,CS=Math.pow(2,16);function TN(e,t){return e+t*CS}function Rv(e){return e&yS}function AN(e){return(e-(e&yS))/CS}const SS=1,xS=2,Ec=4,wS=8;class Eh{constructor(t,n,r){this.pos=t,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&wS)>0}get deletedBefore(){return(this.delInfo&(SS|Ec))>0}get deletedAfter(){return(this.delInfo&(xS|Ec))>0}get deletedAcross(){return(this.delInfo&Ec)>0}}class xr{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&xr.empty)return xr.empty}recover(t){let n=0,r=Rv(t);if(!this.inverted)for(let o=0;o<r;o++)n+=this.ranges[o*3+2]-this.ranges[o*3+1];return this.ranges[r*3]+n+AN(t)}mapResult(t,n=1){return this._map(t,n,!1)}map(t,n=1){return this._map(t,n,!0)}_map(t,n,r){let o=0,i=this.inverted?2:1,a=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let l=this.ranges[s]-(this.inverted?o:0);if(l>t)break;let c=this.ranges[s+i],u=this.ranges[s+a],d=l+c;if(t<=d){let f=c?t==l?-1:t==d?1:n:n,h=l+o+(f<0?0:u);if(r)return h;let m=t==(n<0?l:d)?null:TN(s/3,t-l),v=t==l?xS:t==d?SS:Ec;return(n<0?t!=l:t!=d)&&(v|=wS),new Eh(h,v,m)}o+=u-c}return r?t+o:new Eh(t+o,0,null)}touches(t,n){let r=0,o=Rv(n),i=this.inverted?2:1,a=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let l=this.ranges[s]-(this.inverted?r:0);if(l>t)break;let c=this.ranges[s+i],u=l+c;if(t<=u&&s==o*3)return!0;r+=this.ranges[s+a]-c}return!1}forEach(t){let n=this.inverted?2:1,r=this.inverted?1:2;for(let o=0,i=0;o<this.ranges.length;o+=3){let a=this.ranges[o],s=a-(this.inverted?i:0),l=a+(this.inverted?0:i),c=this.ranges[o+n],u=this.ranges[o+r];t(s,s+c,l,l+u),i+=u-c}}invert(){return new xr(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return t==0?xr.empty:new xr(t<0?[0,-t,0]:[0,0,t])}}xr.empty=new xr([]);class Gs{constructor(t,n,r=0,o=t?t.length:0){this.mirror=n,this.from=r,this.to=o,this._maps=t||[],this.ownData=!(t||n)}get maps(){return this._maps}slice(t=0,n=this.maps.length){return new Gs(this._maps,this.mirror,t,n)}appendMap(t,n){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(t),n!=null&&this.setMirror(this._maps.length-1,n)}appendMapping(t){for(let n=0,r=this._maps.length;n<t._maps.length;n++){let o=t.getMirror(n);this.appendMap(t._maps[n],o!=null&&o<n?r+o:void 0)}}getMirror(t){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==t)return this.mirror[n+(n%2?-1:1)]}}setMirror(t,n){this.mirror||(this.mirror=[]),this.mirror.push(t,n)}appendMappingInverted(t){for(let n=t.maps.length-1,r=this._maps.length+t._maps.length;n>=0;n--){let o=t.getMirror(n);this.appendMap(t._maps[n].invert(),o!=null&&o>n?r-o-1:void 0)}}invert(){let t=new Gs;return t.appendMappingInverted(this),t}map(t,n=1){if(this.mirror)return this._map(t,n,!0);for(let r=this.from;r<this.to;r++)t=this._maps[r].map(t,n);return t}mapResult(t,n=1){return this._map(t,n,!1)}_map(t,n,r){let o=0;for(let i=this.from;i<this.to;i++){let a=this._maps[i],s=a.mapResult(t,n);if(s.recover!=null){let l=this.getMirror(i);if(l!=null&&l>i&&l<this.to){i=l,t=this._maps[l].recover(s.recover);continue}}o|=s.delInfo,t=s.pos}return r?t:new Eh(t,o,null)}}const Zd=Object.create(null);class sr{getMap(){return xr.empty}merge(t){return null}static fromJSON(t,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=Zd[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in Zd)throw new RangeError("Duplicate use of step JSON ID "+t);return Zd[t]=n,n.prototype.jsonID=t,n}}class jn{constructor(t,n){this.doc=t,this.failed=n}static ok(t){return new jn(t,null)}static fail(t){return new jn(null,t)}static fromReplace(t,n,r,o){try{return jn.ok(t.replace(n,r,o))}catch(i){if(i instanceof Kc)return jn.fail(i.message);throw i}}}function ym(e,t,n){let r=[];for(let o=0;o<e.childCount;o++){let i=e.child(o);i.content.size&&(i=i.copy(ym(i.content,t,i))),i.isInline&&(i=t(i,n,o)),r.push(i)}return Ae.fromArray(r)}class oi extends sr{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=t.resolve(this.from),o=r.node(r.sharedDepth(this.to)),i=new nt(ym(n.content,(a,s)=>!a.isAtom||!s.type.allowsMarkType(this.mark.type)?a:a.mark(this.mark.addToSet(a.marks)),o),n.openStart,n.openEnd);return jn.fromReplace(t,this.from,this.to,i)}invert(){return new po(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new oi(n.pos,r.pos,this.mark)}merge(t){return t instanceof oi&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new oi(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new oi(n.from,n.to,t.markFromJSON(n.mark))}}sr.jsonID("addMark",oi);class po extends sr{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=new nt(ym(n.content,o=>o.mark(this.mark.removeFromSet(o.marks)),t),n.openStart,n.openEnd);return jn.fromReplace(t,this.from,this.to,r)}invert(){return new oi(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new po(n.pos,r.pos,this.mark)}merge(t){return t instanceof po&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new po(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new po(n.from,n.to,t.markFromJSON(n.mark))}}sr.jsonID("removeMark",po);class ii extends sr{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return jn.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return jn.fromReplace(t,this.pos,this.pos+1,new nt(Ae.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let o=0;o<n.marks.length;o++)if(!n.marks[o].isInSet(r))return new ii(this.pos,n.marks[o]);return new ii(this.pos,this.mark)}}return new ka(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new ii(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new ii(n.pos,t.markFromJSON(n.mark))}}sr.jsonID("addNodeMark",ii);class ka extends sr{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return jn.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return jn.fromReplace(t,this.pos,this.pos+1,new nt(Ae.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new ii(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new ka(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new ka(n.pos,t.markFromJSON(n.mark))}}sr.jsonID("removeNodeMark",ka);class qn extends sr{constructor(t,n,r,o=!1){super(),this.from=t,this.to=n,this.slice=r,this.structure=o}apply(t){return this.structure&&Oh(t,this.from,this.to)?jn.fail("Structure replace would overwrite content"):jn.fromReplace(t,this.from,this.to,this.slice)}getMap(){return new xr([this.from,this.to-this.from,this.slice.size])}invert(t){return new qn(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deletedAcross&&r.deletedAcross?null:new qn(n.pos,Math.max(n.pos,r.pos),this.slice)}merge(t){if(!(t instanceof qn)||t.structure||this.structure)return null;if(this.from+this.slice.size==t.from&&!this.slice.openEnd&&!t.slice.openStart){let n=this.slice.size+t.slice.size==0?nt.empty:new nt(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new qn(this.from,this.to+(t.to-t.from),n,this.structure)}else if(t.to==this.from&&!this.slice.openStart&&!t.slice.openEnd){let n=this.slice.size+t.slice.size==0?nt.empty:new nt(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new qn(t.from,this.to,n,this.structure)}else return null}toJSON(){let t={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new qn(n.from,n.to,nt.fromJSON(t,n.slice),!!n.structure)}}sr.jsonID("replace",qn);class Gn extends sr{constructor(t,n,r,o,i,a,s=!1){super(),this.from=t,this.to=n,this.gapFrom=r,this.gapTo=o,this.slice=i,this.insert=a,this.structure=s}apply(t){if(this.structure&&(Oh(t,this.from,this.gapFrom)||Oh(t,this.gapTo,this.to)))return jn.fail("Structure gap-replace would overwrite content");let n=t.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return jn.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?jn.fromReplace(t,this.from,this.to,r):jn.fail("Content does not fit in gap")}getMap(){return new xr([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let n=this.gapTo-this.gapFrom;return new Gn(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1),o=this.from==this.gapFrom?n.pos:t.map(this.gapFrom,-1),i=this.to==this.gapTo?r.pos:t.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||o<n.pos||i>r.pos?null:new Gn(n.pos,r.pos,o,i,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Gn(n.from,n.to,n.gapFrom,n.gapTo,nt.fromJSON(t,n.slice),n.insert,!!n.structure)}}sr.jsonID("replaceAround",Gn);function Oh(e,t,n){let r=e.resolve(t),o=n-t,i=r.depth;for(;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0){let a=r.node(i).maybeChild(r.indexAfter(i));for(;o>0;){if(!a||a.isLeaf)return!0;a=a.firstChild,o--}}return!1}function PN(e,t,n,r){let o=[],i=[],a,s;e.doc.nodesBetween(t,n,(l,c,u)=>{if(!l.isInline)return;let d=l.marks;if(!r.isInSet(d)&&u.type.allowsMarkType(r.type)){let f=Math.max(c,t),h=Math.min(c+l.nodeSize,n),m=r.addToSet(d);for(let v=0;v<d.length;v++)d[v].isInSet(m)||(a&&a.to==f&&a.mark.eq(d[v])?a.to=h:o.push(a=new po(f,h,d[v])));s&&s.to==f?s.to=h:i.push(s=new oi(f,h,r))}}),o.forEach(l=>e.step(l)),i.forEach(l=>e.step(l))}function kN(e,t,n,r){let o=[],i=0;e.doc.nodesBetween(t,n,(a,s)=>{if(!a.isInline)return;i++;let l=null;if(r instanceof Qu){let c=a.marks,u;for(;u=r.isInSet(c);)(l||(l=[])).push(u),c=u.removeFromSet(c)}else r?r.isInSet(a.marks)&&(l=[r]):l=a.marks;if(l&&l.length){let c=Math.min(s+a.nodeSize,n);for(let u=0;u<l.length;u++){let d=l[u],f;for(let h=0;h<o.length;h++){let m=o[h];m.step==i-1&&d.eq(o[h].style)&&(f=m)}f?(f.to=c,f.step=i):o.push({style:d,from:Math.max(s,t),to:c,step:i})}}}),o.forEach(a=>e.step(new po(a.from,a.to,a.style)))}function Cm(e,t,n,r=n.contentMatch,o=!0){let i=e.doc.nodeAt(t),a=[],s=t+1;for(let l=0;l<i.childCount;l++){let c=i.child(l),u=s+c.nodeSize,d=r.matchType(c.type);if(!d)a.push(new qn(s,u,nt.empty));else{r=d;for(let f=0;f<c.marks.length;f++)n.allowsMarkType(c.marks[f].type)||e.step(new po(s,u,c.marks[f]));if(o&&c.isText&&n.whitespace!="pre"){let f,h=/\r?\n|\r/g,m;for(;f=h.exec(c.text);)m||(m=new nt(Ae.from(n.schema.text(" ",n.allowedMarks(c.marks))),0,0)),a.push(new qn(s+f.index,s+f.index+f[0].length,m))}}s=u}if(!r.validEnd){let l=r.fillBefore(Ae.empty,!0);e.replace(s,s,new nt(l,0,0))}for(let l=a.length-1;l>=0;l--)e.step(a[l])}function DN(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function Ja(e){let n=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let r=e.depth;;--r){let o=e.$from.node(r),i=e.$from.index(r),a=e.$to.indexAfter(r);if(r<e.depth&&o.canReplace(i,a,n))return r;if(r==0||o.type.spec.isolating||!DN(o,i,a))break}return null}function _N(e,t,n){let{$from:r,$to:o,depth:i}=t,a=r.before(i+1),s=o.after(i+1),l=a,c=s,u=Ae.empty,d=0;for(let m=i,v=!1;m>n;m--)v||r.index(m)>0?(v=!0,u=Ae.from(r.node(m).copy(u)),d++):l--;let f=Ae.empty,h=0;for(let m=i,v=!1;m>n;m--)v||o.after(m+1)<o.end(m)?(v=!0,f=Ae.from(o.node(m).copy(f)),h++):c++;e.step(new Gn(l,c,a,s,new nt(u.append(f),d,h),u.size-d,!0))}function Sm(e,t,n=null,r=e){let o=LN(e,t),i=o&&jN(r,t);return i?o.map(Iv).concat({type:t,attrs:n}).concat(i.map(Iv)):null}function Iv(e){return{type:e,attrs:null}}function LN(e,t){let{parent:n,startIndex:r,endIndex:o}=e,i=n.contentMatchAt(r).findWrapping(t);if(!i)return null;let a=i.length?i[0]:t;return n.canReplaceWith(r,o,a)?i:null}function jN(e,t){let{parent:n,startIndex:r,endIndex:o}=e,i=n.child(r),a=t.contentMatch.findWrapping(i.type);if(!a)return null;let l=(a.length?a[a.length-1]:t).contentMatch;for(let c=r;l&&c<o;c++)l=l.matchType(n.child(c).type);return!l||!l.validEnd?null:a}function BN(e,t,n){let r=Ae.empty;for(let a=n.length-1;a>=0;a--){if(r.size){let s=n[a].type.contentMatch.matchFragment(r);if(!s||!s.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=Ae.from(n[a].type.create(n[a].attrs,r))}let o=t.start,i=t.end;e.step(new Gn(o,i,o,i,new nt(r,0,0),n.length,!0))}function zN(e,t,n,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=e.steps.length;e.doc.nodesBetween(t,n,(a,s)=>{let l=typeof o=="function"?o(a):o;if(a.isTextblock&&!a.hasMarkup(r,l)&&FN(e.doc,e.mapping.slice(i).map(s),r)){let c=null;if(r.schema.linebreakReplacement){let h=r.whitespace=="pre",m=!!r.contentMatch.matchType(r.schema.linebreakReplacement);h&&!m?c=!1:!h&&m&&(c=!0)}c===!1&&OS(e,a,s,i),Cm(e,e.mapping.slice(i).map(s,1),r,void 0,c===null);let u=e.mapping.slice(i),d=u.map(s,1),f=u.map(s+a.nodeSize,1);return e.step(new Gn(d,f,d+1,f-1,new nt(Ae.from(r.create(l,null,a.marks)),0,0),1,!0)),c===!0&&ES(e,a,s,i),!1}})}function ES(e,t,n,r){t.forEach((o,i)=>{if(o.isText){let a,s=/\r?\n|\r/g;for(;a=s.exec(o.text);){let l=e.mapping.slice(r).map(n+1+i+a.index);e.replaceWith(l,l+1,t.type.schema.linebreakReplacement.create())}}})}function OS(e,t,n,r){t.forEach((o,i)=>{if(o.type==o.type.schema.linebreakReplacement){let a=e.mapping.slice(r).map(n+1+i);e.replaceWith(a,a+1,t.type.schema.text(`
44
+ `))}})}function FN(e,t,n){let r=e.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}function HN(e,t,n,r,o){let i=e.doc.nodeAt(t);if(!i)throw new RangeError("No node at given position");n||(n=i.type);let a=n.create(r,null,o||i.marks);if(i.isLeaf)return e.replaceWith(t,t+i.nodeSize,a);if(!n.validContent(i.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new Gn(t,t+i.nodeSize,t+1,t+i.nodeSize-1,new nt(Ae.from(a),0,0),1,!0))}function ko(e,t,n=1,r){let o=e.resolve(t),i=o.depth-n,a=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!a.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let c=o.depth-1,u=n-2;c>i;c--,u--){let d=o.node(c),f=o.index(c);if(d.type.spec.isolating)return!1;let h=d.content.cutByIndex(f,d.childCount),m=r&&r[u+1];m&&(h=h.replaceChild(0,m.type.create(m.attrs)));let v=r&&r[u]||d;if(!d.canReplace(f+1,d.childCount)||!v.type.validContent(h))return!1}let s=o.indexAfter(i),l=r&&r[0];return o.node(i).canReplaceWith(s,s,l?l.type:o.node(i+1).type)}function VN(e,t,n=1,r){let o=e.doc.resolve(t),i=Ae.empty,a=Ae.empty;for(let s=o.depth,l=o.depth-n,c=n-1;s>l;s--,c--){i=Ae.from(o.node(s).copy(i));let u=r&&r[c];a=Ae.from(u?u.type.create(u.attrs,a):o.node(s).copy(a))}e.step(new qn(t,t,new nt(i.append(a),n,n),!0))}function yi(e,t){let n=e.resolve(t),r=n.index();return $S(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function WN(e,t){t.content.size||e.type.compatibleContent(t.type);let n=e.contentMatchAt(e.childCount),{linebreakReplacement:r}=e.type.schema;for(let o=0;o<t.childCount;o++){let i=t.child(o),a=i.type==r?e.type.schema.nodes.text:i.type;if(n=n.matchType(a),!n||!e.type.allowsMarks(i.marks))return!1}return n.validEnd}function $S(e,t){return!!(e&&t&&!e.isLeaf&&WN(e,t))}function Zu(e,t,n=-1){let r=e.resolve(t);for(let o=r.depth;;o--){let i,a,s=r.index(o);if(o==r.depth?(i=r.nodeBefore,a=r.nodeAfter):n>0?(i=r.node(o+1),s++,a=r.node(o).maybeChild(s)):(i=r.node(o).maybeChild(s-1),a=r.node(o+1)),i&&!i.isTextblock&&$S(i,a)&&r.node(o).canReplace(s,s+1))return t;if(o==0)break;t=n<0?r.before(o):r.after(o)}}function UN(e,t,n){let r=null,{linebreakReplacement:o}=e.doc.type.schema,i=e.doc.resolve(t-n),a=i.node().type;if(o&&a.inlineContent){let u=a.whitespace=="pre",d=!!a.contentMatch.matchType(o);u&&!d?r=!1:!u&&d&&(r=!0)}let s=e.steps.length;if(r===!1){let u=e.doc.resolve(t+n);OS(e,u.node(),u.before(),s)}a.inlineContent&&Cm(e,t+n-1,a,i.node().contentMatchAt(i.index()),r==null);let l=e.mapping.slice(s),c=l.map(t-n);if(e.step(new qn(c,l.map(t+n,-1),nt.empty,!0)),r===!0){let u=e.doc.resolve(c);ES(e,u.node(),u.before(),e.steps.length)}return e}function qN(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(r.parentOffset==0)for(let o=r.depth-1;o>=0;o--){let i=r.index(o);if(r.node(o).canReplaceWith(i,i,n))return r.before(o+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(let o=r.depth-1;o>=0;o--){let i=r.indexAfter(o);if(r.node(o).canReplaceWith(i,i,n))return r.after(o+1);if(i<r.node(o).childCount)return null}return null}function NS(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;let o=n.content;for(let i=0;i<n.openStart;i++)o=o.firstChild.content;for(let i=1;i<=(n.openStart==0&&n.size?2:1);i++)for(let a=r.depth;a>=0;a--){let s=a==r.depth?0:r.pos<=(r.start(a+1)+r.end(a+1))/2?-1:1,l=r.index(a)+(s>0?1:0),c=r.node(a),u=!1;if(i==1)u=c.canReplace(l,l,o);else{let d=c.contentMatchAt(l).findWrapping(o.firstChild.type);u=d&&c.canReplaceWith(l,l,d[0])}if(u)return s==0?r.pos:s<0?r.before(a+1):r.after(a+1)}return null}function ed(e,t,n=t,r=nt.empty){if(t==n&&!r.size)return null;let o=e.resolve(t),i=e.resolve(n);return MS(o,i,r)?new qn(t,n,r):new KN(o,i,r).fit()}function MS(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}class KN{constructor(t,n,r){this.$from=t,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=Ae.empty;for(let o=0;o<=t.depth;o++){let i=t.node(o);this.frontier.push({type:i.type,match:i.contentMatchAt(t.indexAfter(o))})}for(let o=t.depth;o>0;o--)this.placed=Ae.from(t.node(o).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(t<0?this.$to:r.doc.resolve(t));if(!o)return null;let i=this.placed,a=r.depth,s=o.depth;for(;a&&s&&i.childCount==1;)i=i.firstChild.content,a--,s--;let l=new nt(i,a,s);return t>-1?new Gn(r.pos,t,this.$to.pos,this.$to.end(),l,n):l.size||r.pos!=this.$to.pos?new qn(r.pos,o.pos,l):null}findFittable(){let t=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,o=this.unplaced.openEnd;r<t;r++){let i=n.firstChild;if(n.childCount>1&&(o=0),i.type.spec.isolating&&o<=r){t=r;break}n=i.content}for(let n=1;n<=2;n++)for(let r=n==1?t:this.unplaced.openStart;r>=0;r--){let o,i=null;r?(i=ef(this.unplaced.content,r-1).firstChild,o=i.content):o=this.unplaced.content;let a=o.firstChild;for(let s=this.depth;s>=0;s--){let{type:l,match:c}=this.frontier[s],u,d=null;if(n==1&&(a?c.matchType(a.type)||(d=c.fillBefore(Ae.from(a),!1)):i&&l.compatibleContent(i.type)))return{sliceDepth:r,frontierDepth:s,parent:i,inject:d};if(n==2&&a&&(u=c.findWrapping(a.type)))return{sliceDepth:r,frontierDepth:s,parent:i,wrap:u};if(i&&c.matchType(i.type))break}}}openMore(){let{content:t,openStart:n,openEnd:r}=this.unplaced,o=ef(t,n);return!o.childCount||o.firstChild.isLeaf?!1:(this.unplaced=new nt(t,n+1,Math.max(r,o.size+n>=t.size-r?n+1:0)),!0)}dropNode(){let{content:t,openStart:n,openEnd:r}=this.unplaced,o=ef(t,n);if(o.childCount<=1&&n>0){let i=t.size-n<=n+o.size;this.unplaced=new nt(ws(t,n-1,1),n-1,i?n-1:r)}else this.unplaced=new nt(ws(t,n,1),n,r)}placeNodes({sliceDepth:t,frontierDepth:n,parent:r,inject:o,wrap:i}){for(;this.depth>n;)this.closeFrontierNode();if(i)for(let v=0;v<i.length;v++)this.openFrontierNode(i[v]);let a=this.unplaced,s=r?r.content:a.content,l=a.openStart-t,c=0,u=[],{match:d,type:f}=this.frontier[n];if(o){for(let v=0;v<o.childCount;v++)u.push(o.child(v));d=d.matchFragment(o)}let h=s.size+t-(a.content.size-a.openEnd);for(;c<s.childCount;){let v=s.child(c),g=d.matchType(v.type);if(!g)break;c++,(c>1||l==0||v.content.size)&&(d=g,u.push(RS(v.mark(f.allowedMarks(v.marks)),c==1?l:0,c==s.childCount?h:-1)))}let m=c==s.childCount;m||(h=-1),this.placed=Es(this.placed,n,Ae.from(u)),this.frontier[n].match=d,m&&h<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let v=0,g=s;v<h;v++){let y=g.lastChild;this.frontier.push({type:y.type,match:y.contentMatchAt(y.childCount)}),g=y.content}this.unplaced=m?t==0?nt.empty:new nt(ws(a.content,t-1,1),t-1,h<0?a.openEnd:t-1):new nt(ws(a.content,t,c),a.openStart,a.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let t=this.frontier[this.depth],n;if(!t.type.isTextblock||!tf(this.$to,this.$to.depth,t.type,t.match,!1)||this.$to.depth==this.depth&&(n=this.findCloseLevel(this.$to))&&n.depth==this.depth)return-1;let{depth:r}=this.$to,o=this.$to.after(r);for(;r>1&&o==this.$to.end(--r);)++o;return o}findCloseLevel(t){e:for(let n=Math.min(this.depth,t.depth);n>=0;n--){let{match:r,type:o}=this.frontier[n],i=n<t.depth&&t.end(n+1)==t.pos+(t.depth-(n+1)),a=tf(t,n,o,r,i);if(a){for(let s=n-1;s>=0;s--){let{match:l,type:c}=this.frontier[s],u=tf(t,s,c,l,!0);if(!u||u.childCount)continue e}return{depth:n,fit:a,move:i?t.doc.resolve(t.after(n+1)):t}}}}close(t){let n=this.findCloseLevel(t);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=Es(this.placed,n.depth,n.fit)),t=n.move;for(let r=n.depth+1;r<=t.depth;r++){let o=t.node(r),i=o.type.contentMatch.fillBefore(o.content,!0,t.index(r));this.openFrontierNode(o.type,o.attrs,i)}return t}openFrontierNode(t,n=null,r){let o=this.frontier[this.depth];o.match=o.match.matchType(t),this.placed=Es(this.placed,this.depth,Ae.from(t.create(n,r))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(Ae.empty,!0);n.childCount&&(this.placed=Es(this.placed,this.frontier.length,n))}}function ws(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(ws(e.firstChild.content,t-1,n)))}function Es(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(Es(e.lastChild.content,t-1,n)))}function ef(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function RS(e,t,n){if(t<=0)return e;let r=e.content;return t>1&&(r=r.replaceChild(0,RS(r.firstChild,t-1,r.childCount==1?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(Ae.empty,!0)))),e.copy(r)}function tf(e,t,n,r,o){let i=e.node(t),a=o?e.indexAfter(t):e.index(t);if(a==i.childCount&&!n.compatibleContent(i.type))return null;let s=r.fillBefore(i.content,!0,a);return s&&!GN(n,i.content,a)?s:null}function GN(e,t,n){for(let r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}function XN(e){return e.spec.defining||e.spec.definingForContent}function YN(e,t,n,r){if(!r.size)return e.deleteRange(t,n);let o=e.doc.resolve(t),i=e.doc.resolve(n);if(MS(o,i,r))return e.step(new qn(t,n,r));let a=TS(o,e.doc.resolve(n));a[a.length-1]==0&&a.pop();let s=-(o.depth+1);a.unshift(s);for(let f=o.depth,h=o.pos-1;f>0;f--,h--){let m=o.node(f).type.spec;if(m.defining||m.definingAsContext||m.isolating)break;a.indexOf(f)>-1?s=f:o.before(f)==h&&a.splice(1,0,-f)}let l=a.indexOf(s),c=[],u=r.openStart;for(let f=r.content,h=0;;h++){let m=f.firstChild;if(c.push(m),h==r.openStart)break;f=m.content}for(let f=u-1;f>=0;f--){let h=c[f],m=XN(h.type);if(m&&!h.sameMarkup(o.node(Math.abs(s)-1)))u=f;else if(m||!h.type.isTextblock)break}for(let f=r.openStart;f>=0;f--){let h=(f+u+1)%(r.openStart+1),m=c[h];if(m)for(let v=0;v<a.length;v++){let g=a[(v+l)%a.length],y=!0;g<0&&(y=!1,g=-g);let b=o.node(g-1),C=o.index(g-1);if(b.canReplaceWith(C,C,m.type,m.marks))return e.replace(o.before(g),y?i.after(g):n,new nt(IS(r.content,0,r.openStart,h),h,r.openEnd))}}let d=e.steps.length;for(let f=a.length-1;f>=0&&(e.replace(t,n,r),!(e.steps.length>d));f--){let h=a[f];h<0||(t=o.before(h),n=i.after(h))}}function IS(e,t,n,r,o){if(t<n){let i=e.firstChild;e=e.replaceChild(0,i.copy(IS(i.content,t+1,n,r,i)))}if(t>r){let i=o.contentMatchAt(0),a=i.fillBefore(e).append(e);e=a.append(i.matchFragment(a).fillBefore(Ae.empty,!0))}return e}function JN(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let o=qN(e.doc,t,r.type);o!=null&&(t=n=o)}e.replaceRange(t,n,new nt(Ae.from(r),0,0))}function QN(e,t,n){let r=e.doc.resolve(t),o=e.doc.resolve(n),i=TS(r,o);for(let a=0;a<i.length;a++){let s=i[a],l=a==i.length-1;if(l&&s==0||r.node(s).type.contentMatch.validEnd)return e.delete(r.start(s),o.end(s));if(s>0&&(l||r.node(s-1).canReplace(r.index(s-1),o.indexAfter(s-1))))return e.delete(r.before(s),o.after(s))}for(let a=1;a<=r.depth&&a<=o.depth;a++)if(t-r.start(a)==r.depth-a&&n>r.end(a)&&o.end(a)-n!=o.depth-a&&r.start(a-1)==o.start(a-1)&&r.node(a-1).canReplace(r.index(a-1),o.index(a-1)))return e.delete(r.before(a),n);e.delete(t,n)}function TS(e,t){let n=[],r=Math.min(e.depth,t.depth);for(let o=r;o>=0;o--){let i=e.start(o);if(i<e.pos-(e.depth-o)||t.end(o)>t.pos+(t.depth-o)||e.node(o).type.spec.isolating||t.node(o).type.spec.isolating)break;(i==t.start(o)||o==e.depth&&o==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&o&&t.start(o-1)==i-1)&&n.push(o)}return n}class Ma extends sr{constructor(t,n,r){super(),this.pos=t,this.attr=n,this.value=r}apply(t){let n=t.nodeAt(this.pos);if(!n)return jn.fail("No node at attribute step's position");let r=Object.create(null);for(let i in n.attrs)r[i]=n.attrs[i];r[this.attr]=this.value;let o=n.type.create(r,null,n.marks);return jn.fromReplace(t,this.pos,this.pos+1,new nt(Ae.from(o),0,n.isLeaf?0:1))}getMap(){return xr.empty}invert(t){return new Ma(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new Ma(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new Ma(n.pos,n.attr,n.value)}}sr.jsonID("attr",Ma);class Xs extends sr{constructor(t,n){super(),this.attr=t,this.value=n}apply(t){let n=Object.create(null);for(let o in t.attrs)n[o]=t.attrs[o];n[this.attr]=this.value;let r=t.type.create(n,t.content,t.marks);return jn.ok(r)}getMap(){return xr.empty}invert(t){return new Xs(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Xs(n.attr,n.value)}}sr.jsonID("docAttr",Xs);let Da=class extends Error{};Da=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n};Da.prototype=Object.create(Error.prototype);Da.prototype.constructor=Da;Da.prototype.name="TransformError";let xm=class{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new Gs}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let n=this.maybeStep(t);if(n.failed)throw new Da(n.failed);return this}maybeStep(t){let n=t.apply(this.doc);return n.failed||this.addStep(t,n.doc),n}get docChanged(){return this.steps.length>0}addStep(t,n){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=n}replace(t,n=t,r=nt.empty){let o=ed(this.doc,t,n,r);return o&&this.step(o),this}replaceWith(t,n,r){return this.replace(t,n,new nt(Ae.from(r),0,0))}delete(t,n){return this.replace(t,n,nt.empty)}insert(t,n){return this.replaceWith(t,t,n)}replaceRange(t,n,r){return YN(this,t,n,r),this}replaceRangeWith(t,n,r){return JN(this,t,n,r),this}deleteRange(t,n){return QN(this,t,n),this}lift(t,n){return _N(this,t,n),this}join(t,n=1){return UN(this,t,n),this}wrap(t,n){return BN(this,t,n),this}setBlockType(t,n=t,r,o=null){return zN(this,t,n,r,o),this}setNodeMarkup(t,n,r=null,o){return HN(this,t,n,r,o),this}setNodeAttribute(t,n,r){return this.step(new Ma(t,n,r)),this}setDocAttribute(t,n){return this.step(new Xs(t,n)),this}addNodeMark(t,n){return this.step(new ii(t,n)),this}removeNodeMark(t,n){if(!(n instanceof pn)){let r=this.doc.nodeAt(t);if(!r)throw new RangeError("No node at position "+t);if(n=n.isInSet(r.marks),!n)return this}return this.step(new ka(t,n)),this}split(t,n=1,r){return VN(this,t,n,r),this}addMark(t,n,r){return PN(this,t,n,r),this}removeMark(t,n,r){return kN(this,t,n,r),this}clearIncompatible(t,n,r){return Cm(this,t,n,r),this}};const nf=Object.create(null);class xt{constructor(t,n,r){this.$anchor=t,this.$head=n,this.ranges=r||[new AS(t.min(n),t.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let n=0;n<t.length;n++)if(t[n].$from.pos!=t[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(t,n=nt.empty){let r=n.content.lastChild,o=null;for(let s=0;s<n.openEnd;s++)o=r,r=r.lastChild;let i=t.steps.length,a=this.ranges;for(let s=0;s<a.length;s++){let{$from:l,$to:c}=a[s],u=t.mapping.slice(i);t.replaceRange(u.map(l.pos),u.map(c.pos),s?nt.empty:n),s==0&&Pv(t,i,(r?r.isInline:o&&o.isTextblock)?-1:1)}}replaceWith(t,n){let r=t.steps.length,o=this.ranges;for(let i=0;i<o.length;i++){let{$from:a,$to:s}=o[i],l=t.mapping.slice(r),c=l.map(a.pos),u=l.map(s.pos);i?t.deleteRange(c,u):(t.replaceRangeWith(c,u,n),Pv(t,r,n.isInline?-1:1))}}static findFrom(t,n,r=!1){let o=t.parent.inlineContent?new Ct(t):ya(t.node(0),t.parent,t.pos,t.index(),n,r);if(o)return o;for(let i=t.depth-1;i>=0;i--){let a=n<0?ya(t.node(0),t.node(i),t.before(i+1),t.index(i),n,r):ya(t.node(0),t.node(i),t.after(i+1),t.index(i)+1,n,r);if(a)return a}return null}static near(t,n=1){return this.findFrom(t,n)||this.findFrom(t,-n)||new $r(t.node(0))}static atStart(t){return ya(t,t,0,0,1)||new $r(t)}static atEnd(t){return ya(t,t,t.content.size,t.childCount,-1)||new $r(t)}static fromJSON(t,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=nf[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in nf)throw new RangeError("Duplicate use of selection JSON ID "+t);return nf[t]=n,n.prototype.jsonID=t,n}getBookmark(){return Ct.between(this.$anchor,this.$head).getBookmark()}}xt.prototype.visible=!0;class AS{constructor(t,n){this.$from=t,this.$to=n}}let Tv=!1;function Av(e){!Tv&&!e.parent.inlineContent&&(Tv=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class Ct extends xt{constructor(t,n=t){Av(t),Av(n),super(t,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,n){let r=t.resolve(n.map(this.head));if(!r.parent.inlineContent)return xt.near(r);let o=t.resolve(n.map(this.anchor));return new Ct(o.parent.inlineContent?o:r,r)}replace(t,n=nt.empty){if(super.replace(t,n),n==nt.empty){let r=this.$from.marksAcross(this.$to);r&&t.ensureMarks(r)}}eq(t){return t instanceof Ct&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new td(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new Ct(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){let o=t.resolve(n);return new this(o,r==n?o:t.resolve(r))}static between(t,n,r){let o=t.pos-n.pos;if((!r||o)&&(r=o>=0?1:-1),!n.parent.inlineContent){let i=xt.findFrom(n,r,!0)||xt.findFrom(n,-r,!0);if(i)n=i.$head;else return xt.near(n,r)}return t.parent.inlineContent||(o==0?t=n:(t=(xt.findFrom(t,-r,!0)||xt.findFrom(t,r,!0)).$anchor,t.pos<n.pos!=o<0&&(t=n))),new Ct(t,n)}}xt.jsonID("text",Ct);class td{constructor(t,n){this.anchor=t,this.head=n}map(t){return new td(t.map(this.anchor),t.map(this.head))}resolve(t){return Ct.between(t.resolve(this.anchor),t.resolve(this.head))}}class yt extends xt{constructor(t){let n=t.nodeAfter,r=t.node(0).resolve(t.pos+n.nodeSize);super(t,r),this.node=n}map(t,n){let{deleted:r,pos:o}=n.mapResult(this.anchor),i=t.resolve(o);return r?xt.near(i):new yt(i)}content(){return new nt(Ae.from(this.node),0,0)}eq(t){return t instanceof yt&&t.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new wm(this.anchor)}static fromJSON(t,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new yt(t.resolve(n.anchor))}static create(t,n){return new yt(t.resolve(n))}static isSelectable(t){return!t.isText&&t.type.spec.selectable!==!1}}yt.prototype.visible=!1;xt.jsonID("node",yt);class wm{constructor(t){this.anchor=t}map(t){let{deleted:n,pos:r}=t.mapResult(this.anchor);return n?new td(r,r):new wm(r)}resolve(t){let n=t.resolve(this.anchor),r=n.nodeAfter;return r&&yt.isSelectable(r)?new yt(n):xt.near(n)}}class $r extends xt{constructor(t){super(t.resolve(0),t.resolve(t.content.size))}replace(t,n=nt.empty){if(n==nt.empty){t.delete(0,t.doc.content.size);let r=xt.atStart(t.doc);r.eq(t.selection)||t.setSelection(r)}else super.replace(t,n)}toJSON(){return{type:"all"}}static fromJSON(t){return new $r(t)}map(t){return new $r(t)}eq(t){return t instanceof $r}getBookmark(){return ZN}}xt.jsonID("all",$r);const ZN={map(){return this},resolve(e){return new $r(e)}};function ya(e,t,n,r,o,i=!1){if(t.inlineContent)return Ct.create(e,n);for(let a=r-(o>0?0:1);o>0?a<t.childCount:a>=0;a+=o){let s=t.child(a);if(s.isAtom){if(!i&&yt.isSelectable(s))return yt.create(e,n-(o<0?s.nodeSize:0))}else{let l=ya(e,s,n+o,o<0?s.childCount:0,o,i);if(l)return l}n+=s.nodeSize*o}return null}function Pv(e,t,n){let r=e.steps.length-1;if(r<t)return;let o=e.steps[r];if(!(o instanceof qn||o instanceof Gn))return;let i=e.mapping.maps[r],a;i.forEach((s,l,c,u)=>{a==null&&(a=u)}),e.setSelection(xt.near(e.doc.resolve(a),n))}const kv=1,Dv=2,_v=4;class eM extends xm{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(t){if(t.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=t,this.curSelectionFor=this.steps.length,this.updated=(this.updated|kv)&-3,this.storedMarks=null,this}get selectionSet(){return(this.updated&kv)>0}setStoredMarks(t){return this.storedMarks=t,this.updated|=Dv,this}ensureMarks(t){return pn.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&Dv)>0}addStep(t,n){super.addStep(t,n),this.updated=this.updated&-3,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,n=!0){let r=this.selection;return n&&(t=t.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||pn.none))),r.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,n,r){let o=this.doc.type.schema;if(n==null)return t?this.replaceSelectionWith(o.text(t),!0):this.deleteSelection();{if(r==null&&(r=n),r=r??n,!t)return this.deleteRange(n,r);let i=this.storedMarks;if(!i){let a=this.doc.resolve(n);i=r==n?a.marks():a.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,o.text(t,i)),this.selection.empty||this.setSelection(xt.near(this.selection.$to)),this}}setMeta(t,n){return this.meta[typeof t=="string"?t:t.key]=n,this}getMeta(t){return this.meta[typeof t=="string"?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=_v,this}get scrolledIntoView(){return(this.updated&_v)>0}}function Lv(e,t){return!t||!e?e:e.bind(t)}class Os{constructor(t,n,r){this.name=t,this.init=Lv(n.init,r),this.apply=Lv(n.apply,r)}}const tM=[new Os("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new Os("selection",{init(e,t){return e.selection||xt.atStart(t.doc)},apply(e){return e.selection}}),new Os("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new Os("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})];class rf{constructor(t,n){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=tM.slice(),n&&n.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new Os(r.key,r.spec.state,r))})}}class xa{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(t){return this.applyTransaction(t).state}filterTransaction(t,n=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=n){let o=this.config.plugins[r];if(o.spec.filterTransaction&&!o.spec.filterTransaction.call(o,t,this))return!1}return!0}applyTransaction(t){if(!this.filterTransaction(t))return{state:this,transactions:[]};let n=[t],r=this.applyInner(t),o=null;for(;;){let i=!1;for(let a=0;a<this.config.plugins.length;a++){let s=this.config.plugins[a];if(s.spec.appendTransaction){let l=o?o[a].n:0,c=o?o[a].state:this,u=l<n.length&&s.spec.appendTransaction.call(s,l?n.slice(l):n,c,r);if(u&&r.filterTransaction(u,a)){if(u.setMeta("appendedTransaction",t),!o){o=[];for(let d=0;d<this.config.plugins.length;d++)o.push(d<a?{state:r,n:n.length}:{state:this,n:0})}n.push(u),r=r.applyInner(u),i=!0}o&&(o[a]={state:r,n:n.length})}}if(!i)return{state:r,transactions:n}}}applyInner(t){if(!t.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new xa(this.config),r=this.config.fields;for(let o=0;o<r.length;o++){let i=r[o];n[i.name]=i.apply(t,this[i.name],this,n)}return n}get tr(){return new eM(this)}static create(t){let n=new rf(t.doc?t.doc.type.schema:t.schema,t.plugins),r=new xa(n);for(let o=0;o<n.fields.length;o++)r[n.fields[o].name]=n.fields[o].init(t,r);return r}reconfigure(t){let n=new rf(this.schema,t.plugins),r=n.fields,o=new xa(n);for(let i=0;i<r.length;i++){let a=r[i].name;o[a]=this.hasOwnProperty(a)?this[a]:r[i].init(t,o)}return o}toJSON(t){let n={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(n.storedMarks=this.storedMarks.map(r=>r.toJSON())),t&&typeof t=="object")for(let r in t){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let o=t[r],i=o.spec.state;i&&i.toJSON&&(n[r]=i.toJSON.call(o,this[o.key]))}return n}static fromJSON(t,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let o=new rf(t.schema,t.plugins),i=new xa(o);return o.fields.forEach(a=>{if(a.name=="doc")i.doc=ci.fromJSON(t.schema,n.doc);else if(a.name=="selection")i.selection=xt.fromJSON(i.doc,n.selection);else if(a.name=="storedMarks")n.storedMarks&&(i.storedMarks=n.storedMarks.map(t.schema.markFromJSON));else{if(r)for(let s in r){let l=r[s],c=l.spec.state;if(l.key==a.name&&c&&c.fromJSON&&Object.prototype.hasOwnProperty.call(n,s)){i[a.name]=c.fromJSON.call(l,t,n[s],i);return}}i[a.name]=a.init(t,i)}}),i}}function PS(e,t,n){for(let r in e){let o=e[r];o instanceof Function?o=o.bind(t):r=="handleDOMEvents"&&(o=PS(o,t,{})),n[r]=o}return n}class xn{constructor(t){this.spec=t,this.props={},t.props&&PS(t.props,this,this.props),this.key=t.key?t.key.key:kS("plugin")}getState(t){return t[this.key]}}const of=Object.create(null);function kS(e){return e in of?e+"$"+ ++of[e]:(of[e]=0,e+"$")}class _n{constructor(t="key"){this.key=kS(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}const Qn=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},_a=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t};let $h=null;const Io=function(e,t,n){let r=$h||($h=document.createRange());return r.setEnd(e,n??e.nodeValue.length),r.setStart(e,t||0),r},nM=function(){$h=null},Xi=function(e,t,n,r){return n&&(jv(e,t,n,r,-1)||jv(e,t,n,r,1))},rM=/^(img|br|input|textarea|hr)$/i;function jv(e,t,n,r,o){for(;;){if(e==n&&t==r)return!0;if(t==(o<0?0:_r(e))){let i=e.parentNode;if(!i||i.nodeType!=1||vl(e)||rM.test(e.nodeName)||e.contentEditable=="false")return!1;t=Qn(e)+(o<0?0:1),e=i}else if(e.nodeType==1){if(e=e.childNodes[t+(o<0?-1:0)],e.contentEditable=="false")return!1;t=o<0?_r(e):0}else return!1}}function _r(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function oM(e,t){for(;;){if(e.nodeType==3&&t)return e;if(e.nodeType==1&&t>0){if(e.contentEditable=="false")return null;e=e.childNodes[t-1],t=_r(e)}else if(e.parentNode&&!vl(e))t=Qn(e),e=e.parentNode;else return null}}function iM(e,t){for(;;){if(e.nodeType==3&&t<e.nodeValue.length)return e;if(e.nodeType==1&&t<e.childNodes.length){if(e.contentEditable=="false")return null;e=e.childNodes[t],t=0}else if(e.parentNode&&!vl(e))t=Qn(e)+1,e=e.parentNode;else return null}}function aM(e,t,n){for(let r=t==0,o=t==_r(e);r||o;){if(e==n)return!0;let i=Qn(e);if(e=e.parentNode,!e)return!1;r=r&&i==0,o=o&&i==_r(e)}}function vl(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}const nd=function(e){return e.focusNode&&Xi(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function Ri(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function sM(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}function lM(e,t,n){if(e.caretPositionFromPoint)try{let r=e.caretPositionFromPoint(t,n);if(r)return{node:r.offsetNode,offset:Math.min(_r(r.offsetNode),r.offset)}}catch{}if(e.caretRangeFromPoint){let r=e.caretRangeFromPoint(t,n);if(r)return{node:r.startContainer,offset:Math.min(_r(r.startContainer),r.startOffset)}}}const vo=typeof navigator<"u"?navigator:null,Bv=typeof document<"u"?document:null,Ci=vo&&vo.userAgent||"",Nh=/Edge\/(\d+)/.exec(Ci),DS=/MSIE \d/.exec(Ci),Mh=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ci),vr=!!(DS||Mh||Nh),ui=DS?document.documentMode:Mh?+Mh[1]:Nh?+Nh[1]:0,Zr=!vr&&/gecko\/(\d+)/i.test(Ci);Zr&&+(/Firefox\/(\d+)/.exec(Ci)||[0,0])[1];const Rh=!vr&&/Chrome\/(\d+)/.exec(Ci),rr=!!Rh,_S=Rh?+Rh[1]:0,cr=!vr&&!!vo&&/Apple Computer/.test(vo.vendor),La=cr&&(/Mobile\/\w+/.test(Ci)||!!vo&&vo.maxTouchPoints>2),Dr=La||(vo?/Mac/.test(vo.platform):!1),cM=vo?/Win/.test(vo.platform):!1,Ao=/Android \d/.test(Ci),bl=!!Bv&&"webkitFontSmoothing"in Bv.documentElement.style,uM=bl?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function dM(e){let t=e.defaultView&&e.defaultView.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function Eo(e,t){return typeof e=="number"?e:e[t]}function fM(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function zv(e,t,n){let r=e.someProp("scrollThreshold")||0,o=e.someProp("scrollMargin")||5,i=e.dom.ownerDocument;for(let a=n||e.dom;a;){if(a.nodeType!=1){a=_a(a);continue}let s=a,l=s==i.body,c=l?dM(i):fM(s),u=0,d=0;if(t.top<c.top+Eo(r,"top")?d=-(c.top-t.top+Eo(o,"top")):t.bottom>c.bottom-Eo(r,"bottom")&&(d=t.bottom-t.top>c.bottom-c.top?t.top+Eo(o,"top")-c.top:t.bottom-c.bottom+Eo(o,"bottom")),t.left<c.left+Eo(r,"left")?u=-(c.left-t.left+Eo(o,"left")):t.right>c.right-Eo(r,"right")&&(u=t.right-c.right+Eo(o,"right")),u||d)if(l)i.defaultView.scrollBy(u,d);else{let h=s.scrollLeft,m=s.scrollTop;d&&(s.scrollTop+=d),u&&(s.scrollLeft+=u);let v=s.scrollLeft-h,g=s.scrollTop-m;t={left:t.left-v,top:t.top-g,right:t.right-v,bottom:t.bottom-g}}let f=l?"fixed":getComputedStyle(a).position;if(/^(fixed|sticky)$/.test(f))break;a=f=="absolute"?a.offsetParent:_a(a)}}function hM(e){let t=e.dom.getBoundingClientRect(),n=Math.max(0,t.top),r,o;for(let i=(t.left+t.right)/2,a=n+1;a<Math.min(innerHeight,t.bottom);a+=5){let s=e.root.elementFromPoint(i,a);if(!s||s==e.dom||!e.dom.contains(s))continue;let l=s.getBoundingClientRect();if(l.top>=n-20){r=s,o=l.top;break}}return{refDOM:r,refTop:o,stack:LS(e.dom)}}function LS(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=_a(r));return t}function pM({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;jS(n,r==0?0:r-t)}function jS(e,t){for(let n=0;n<e.length;n++){let{dom:r,top:o,left:i}=e[n];r.scrollTop!=o+t&&(r.scrollTop=o+t),r.scrollLeft!=i&&(r.scrollLeft=i)}}let la=null;function mM(e){if(e.setActive)return e.setActive();if(la)return e.focus(la);let t=LS(e);e.focus(la==null?{get preventScroll(){return la={preventScroll:!0},!0}}:void 0),la||(la=!1,jS(t,0))}function BS(e,t){let n,r=2e8,o,i=0,a=t.top,s=t.top,l,c;for(let u=e.firstChild,d=0;u;u=u.nextSibling,d++){let f;if(u.nodeType==1)f=u.getClientRects();else if(u.nodeType==3)f=Io(u).getClientRects();else continue;for(let h=0;h<f.length;h++){let m=f[h];if(m.top<=a&&m.bottom>=s){a=Math.max(m.bottom,a),s=Math.min(m.top,s);let v=m.left>t.left?m.left-t.left:m.right<t.left?t.left-m.right:0;if(v<r){n=u,r=v,o=v&&n.nodeType==3?{left:m.right<t.left?m.right:m.left,top:t.top}:t,u.nodeType==1&&v&&(i=d+(t.left>=(m.left+m.right)/2?1:0));continue}}else m.top>t.top&&!l&&m.left<=t.left&&m.right>=t.left&&(l=u,c={left:Math.max(m.left,Math.min(m.right,t.left)),top:m.top});!n&&(t.left>=m.right&&t.top>=m.top||t.left>=m.left&&t.top>=m.bottom)&&(i=d+1)}}return!n&&l&&(n=l,o=c,r=0),n&&n.nodeType==3?gM(n,o):!n||r&&n.nodeType==1?{node:e,offset:i}:BS(n,o)}function gM(e,t){let n=e.nodeValue.length,r=document.createRange();for(let o=0;o<n;o++){r.setEnd(e,o+1),r.setStart(e,o);let i=Go(r,1);if(i.top!=i.bottom&&Em(t,i))return{node:e,offset:o+(t.left>=(i.left+i.right)/2?1:0)}}return{node:e,offset:0}}function Em(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function vM(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}function bM(e,t,n){let{node:r,offset:o}=BS(t,n),i=-1;if(r.nodeType==1&&!r.firstChild){let a=r.getBoundingClientRect();i=a.left!=a.right&&n.left>(a.left+a.right)/2?1:-1}return e.docView.posFromDOM(r,o,i)}function yM(e,t,n,r){let o=-1;for(let i=t,a=!1;i!=e.dom;){let s=e.docView.nearestDesc(i,!0),l;if(!s)return null;if(s.dom.nodeType==1&&(s.node.isBlock&&s.parent||!s.contentDOM)&&((l=s.dom.getBoundingClientRect()).width||l.height)&&(s.node.isBlock&&s.parent&&(!a&&l.left>r.left||l.top>r.top?o=s.posBefore:(!a&&l.right<r.left||l.bottom<r.top)&&(o=s.posAfter),a=!0),!s.contentDOM&&o<0&&!s.node.isText))return(s.node.isBlock?r.top<(l.top+l.bottom)/2:r.left<(l.left+l.right)/2)?s.posBefore:s.posAfter;i=s.dom.parentNode}return o>-1?o:e.docView.posFromDOM(t,n,-1)}function zS(e,t,n){let r=e.childNodes.length;if(r&&n.top<n.bottom)for(let o=Math.max(0,Math.min(r-1,Math.floor(r*(t.top-n.top)/(n.bottom-n.top))-2)),i=o;;){let a=e.childNodes[i];if(a.nodeType==1){let s=a.getClientRects();for(let l=0;l<s.length;l++){let c=s[l];if(Em(t,c))return zS(a,t,c)}}if((i=(i+1)%r)==o)break}return e}function CM(e,t){let n=e.dom.ownerDocument,r,o=0,i=lM(n,t.left,t.top);i&&({node:r,offset:o}=i);let a=(e.root.elementFromPoint?e.root:n).elementFromPoint(t.left,t.top),s;if(!a||!e.dom.contains(a.nodeType!=1?a.parentNode:a)){let c=e.dom.getBoundingClientRect();if(!Em(t,c)||(a=zS(e.dom,t,c),!a))return null}if(cr)for(let c=a;r&&c;c=_a(c))c.draggable&&(r=void 0);if(a=vM(a,t),r){if(Zr&&r.nodeType==1&&(o=Math.min(o,r.childNodes.length),o<r.childNodes.length)){let u=r.childNodes[o],d;u.nodeName=="IMG"&&(d=u.getBoundingClientRect()).right<=t.left&&d.bottom>t.top&&o++}let c;bl&&o&&r.nodeType==1&&(c=r.childNodes[o-1]).nodeType==1&&c.contentEditable=="false"&&c.getBoundingClientRect().top>=t.top&&o--,r==e.dom&&o==r.childNodes.length-1&&r.lastChild.nodeType==1&&t.top>r.lastChild.getBoundingClientRect().bottom?s=e.state.doc.content.size:(o==0||r.nodeType!=1||r.childNodes[o-1].nodeName!="BR")&&(s=yM(e,r,o,t))}s==null&&(s=bM(e,a,t));let l=e.docView.nearestDesc(a,!0);return{pos:s,inside:l?l.posAtStart-l.border:-1}}function Fv(e){return e.top<e.bottom||e.left<e.right}function Go(e,t){let n=e.getClientRects();if(n.length){let r=n[t<0?0:n.length-1];if(Fv(r))return r}return Array.prototype.find.call(n,Fv)||e.getBoundingClientRect()}const SM=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function FS(e,t,n){let{node:r,offset:o,atom:i}=e.docView.domFromPos(t,n<0?-1:1),a=bl||Zr;if(r.nodeType==3)if(a&&(SM.test(r.nodeValue)||(n<0?!o:o==r.nodeValue.length))){let l=Go(Io(r,o,o),n);if(Zr&&o&&/\s/.test(r.nodeValue[o-1])&&o<r.nodeValue.length){let c=Go(Io(r,o-1,o-1),-1);if(c.top==l.top){let u=Go(Io(r,o,o+1),-1);if(u.top!=l.top)return cs(u,u.left<c.left)}}return l}else{let l=o,c=o,u=n<0?1:-1;return n<0&&!o?(c++,u=-1):n>=0&&o==r.nodeValue.length?(l--,u=1):n<0?l--:c++,cs(Go(Io(r,l,c),u),u<0)}if(!e.state.doc.resolve(t-(i||0)).parent.inlineContent){if(i==null&&o&&(n<0||o==_r(r))){let l=r.childNodes[o-1];if(l.nodeType==1)return af(l.getBoundingClientRect(),!1)}if(i==null&&o<_r(r)){let l=r.childNodes[o];if(l.nodeType==1)return af(l.getBoundingClientRect(),!0)}return af(r.getBoundingClientRect(),n>=0)}if(i==null&&o&&(n<0||o==_r(r))){let l=r.childNodes[o-1],c=l.nodeType==3?Io(l,_r(l)-(a?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(c)return cs(Go(c,1),!1)}if(i==null&&o<_r(r)){let l=r.childNodes[o];for(;l.pmViewDesc&&l.pmViewDesc.ignoreForCoords;)l=l.nextSibling;let c=l?l.nodeType==3?Io(l,0,a?0:1):l.nodeType==1?l:null:null;if(c)return cs(Go(c,-1),!0)}return cs(Go(r.nodeType==3?Io(r):r,-n),n>=0)}function cs(e,t){if(e.width==0)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function af(e,t){if(e.height==0)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function HS(e,t,n){let r=e.state,o=e.root.activeElement;r!=t&&e.updateState(t),o!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),o!=e.dom&&o&&o.focus()}}function xM(e,t,n){let r=t.selection,o=n=="up"?r.$from:r.$to;return HS(e,t,()=>{let{node:i}=e.docView.domFromPos(o.pos,n=="up"?-1:1);for(;;){let s=e.docView.nearestDesc(i,!0);if(!s)break;if(s.node.isBlock){i=s.contentDOM||s.dom;break}i=s.dom.parentNode}let a=FS(e,o.pos,1);for(let s=i.firstChild;s;s=s.nextSibling){let l;if(s.nodeType==1)l=s.getClientRects();else if(s.nodeType==3)l=Io(s,0,s.nodeValue.length).getClientRects();else continue;for(let c=0;c<l.length;c++){let u=l[c];if(u.bottom>u.top+1&&(n=="up"?a.top-u.top>(u.bottom-a.top)*2:u.bottom-a.bottom>(a.bottom-u.top)*2))return!1}}return!0})}const wM=/[\u0590-\u08ac]/;function EM(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let o=r.parentOffset,i=!o,a=o==r.parent.content.size,s=e.domSelection();return s?!wM.test(r.parent.textContent)||!s.modify?n=="left"||n=="backward"?i:a:HS(e,t,()=>{let{focusNode:l,focusOffset:c,anchorNode:u,anchorOffset:d}=e.domSelectionRange(),f=s.caretBidiLevel;s.modify("move",n,"character");let h=r.depth?e.docView.domAfterPos(r.before()):e.dom,{focusNode:m,focusOffset:v}=e.domSelectionRange(),g=m&&!h.contains(m.nodeType==1?m:m.parentNode)||l==m&&c==v;try{s.collapse(u,d),l&&(l!=u||c!=d)&&s.extend&&s.extend(l,c)}catch{}return f!=null&&(s.caretBidiLevel=f),g}):r.pos==r.start()||r.pos==r.end()}let Hv=null,Vv=null,Wv=!1;function OM(e,t,n){return Hv==t&&Vv==n?Wv:(Hv=t,Vv=n,Wv=n=="up"||n=="down"?xM(e,t,n):EM(e,t,n))}const Lr=0,Uv=1,Pi=2,bo=3;class yl{constructor(t,n,r,o){this.parent=t,this.children=n,this.dom=r,this.contentDOM=o,this.dirty=Lr,r.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,n,r){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let n=0;n<this.children.length;n++)t+=this.children[n].size;return t}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let t=0;t<this.children.length;t++)this.children[t].destroy()}posBeforeChild(t){for(let n=0,r=this.posAtStart;;n++){let o=this.children[n];if(o==t)return r;r+=o.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(t,n,r){if(this.contentDOM&&this.contentDOM.contains(t.nodeType==1?t:t.parentNode))if(r<0){let i,a;if(t==this.contentDOM)i=t.childNodes[n-1];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;i=t.previousSibling}for(;i&&!((a=i.pmViewDesc)&&a.parent==this);)i=i.previousSibling;return i?this.posBeforeChild(a)+a.size:this.posAtStart}else{let i,a;if(t==this.contentDOM)i=t.childNodes[n];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;i=t.nextSibling}for(;i&&!((a=i.pmViewDesc)&&a.parent==this);)i=i.nextSibling;return i?this.posBeforeChild(a):this.posAtEnd}let o;if(t==this.dom&&this.contentDOM)o=n>Qn(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))o=t.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let i=t;;i=i.parentNode){if(i==this.dom){o=!1;break}if(i.previousSibling)break}if(o==null&&n==t.childNodes.length)for(let i=t;;i=i.parentNode){if(i==this.dom){o=!0;break}if(i.nextSibling)break}}return o??r>0?this.posAtEnd:this.posAtStart}nearestDesc(t,n=!1){for(let r=!0,o=t;o;o=o.parentNode){let i=this.getDesc(o),a;if(i&&(!n||i.node))if(r&&(a=i.nodeDOM)&&!(a.nodeType==1?a.contains(t.nodeType==1?t:t.parentNode):a==t))r=!1;else return i}}getDesc(t){let n=t.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(t,n,r){for(let o=t;o;o=o.parentNode){let i=this.getDesc(o);if(i)return i.localPosFromDOM(t,n,r)}return-1}descAt(t){for(let n=0,r=0;n<this.children.length;n++){let o=this.children[n],i=r+o.size;if(r==t&&i!=r){for(;!o.border&&o.children.length;)for(let a=0;a<o.children.length;a++){let s=o.children[a];if(s.size){o=s;break}}return o}if(t<i)return o.descAt(t-r-o.border);r=i}}domFromPos(t,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:t+1};let r=0,o=0;for(let i=0;r<this.children.length;r++){let a=this.children[r],s=i+a.size;if(s>t||a instanceof WS){o=t-i;break}i=s}if(o)return this.children[r].domFromPos(o-this.children[r].border,n);for(let i;r&&!(i=this.children[r-1]).size&&i instanceof VS&&i.side>=0;r--);if(n<=0){let i,a=!0;for(;i=r?this.children[r-1]:null,!(!i||i.dom.parentNode==this.contentDOM);r--,a=!1);return i&&n&&a&&!i.border&&!i.domAtom?i.domFromPos(i.size,n):{node:this.contentDOM,offset:i?Qn(i.dom)+1:0}}else{let i,a=!0;for(;i=r<this.children.length?this.children[r]:null,!(!i||i.dom.parentNode==this.contentDOM);r++,a=!1);return i&&a&&!i.border&&!i.domAtom?i.domFromPos(0,n):{node:this.contentDOM,offset:i?Qn(i.dom):this.contentDOM.childNodes.length}}}parseRange(t,n,r=0){if(this.children.length==0)return{node:this.contentDOM,from:t,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let o=-1,i=-1;for(let a=r,s=0;;s++){let l=this.children[s],c=a+l.size;if(o==-1&&t<=c){let u=a+l.border;if(t>=u&&n<=c-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(t,n,u);t=a;for(let d=s;d>0;d--){let f=this.children[d-1];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(1)){o=Qn(f.dom)+1;break}t-=f.size}o==-1&&(o=0)}if(o>-1&&(c>n||s==this.children.length-1)){n=c;for(let u=s+1;u<this.children.length;u++){let d=this.children[u];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(-1)){i=Qn(d.dom);break}n+=d.size}i==-1&&(i=this.contentDOM.childNodes.length);break}a=c}return{node:this.contentDOM,from:t,to:n,fromOffset:o,toOffset:i}}emptyChildAt(t){if(this.border||!this.contentDOM||!this.children.length)return!1;let n=this.children[t<0?0:this.children.length-1];return n.size==0||n.emptyChildAt(t)}domAfterPos(t){let{node:n,offset:r}=this.domFromPos(t,0);if(n.nodeType!=1||r==n.childNodes.length)throw new RangeError("No node after pos "+t);return n.childNodes[r]}setSelection(t,n,r,o=!1){let i=Math.min(t,n),a=Math.max(t,n);for(let h=0,m=0;h<this.children.length;h++){let v=this.children[h],g=m+v.size;if(i>m&&a<g)return v.setSelection(t-m-v.border,n-m-v.border,r,o);m=g}let s=this.domFromPos(t,t?-1:1),l=n==t?s:this.domFromPos(n,n?-1:1),c=r.root.getSelection(),u=r.domSelectionRange(),d=!1;if((Zr||cr)&&t==n){let{node:h,offset:m}=s;if(h.nodeType==3){if(d=!!(m&&h.nodeValue[m-1]==`
45
+ `),d&&m==h.nodeValue.length)for(let v=h,g;v;v=v.parentNode){if(g=v.nextSibling){g.nodeName=="BR"&&(s=l={node:g.parentNode,offset:Qn(g)+1});break}let y=v.pmViewDesc;if(y&&y.node&&y.node.isBlock)break}}else{let v=h.childNodes[m-1];d=v&&(v.nodeName=="BR"||v.contentEditable=="false")}}if(Zr&&u.focusNode&&u.focusNode!=l.node&&u.focusNode.nodeType==1){let h=u.focusNode.childNodes[u.focusOffset];h&&h.contentEditable=="false"&&(o=!0)}if(!(o||d&&cr)&&Xi(s.node,s.offset,u.anchorNode,u.anchorOffset)&&Xi(l.node,l.offset,u.focusNode,u.focusOffset))return;let f=!1;if((c.extend||t==n)&&!d){c.collapse(s.node,s.offset);try{t!=n&&c.extend(l.node,l.offset),f=!0}catch{}}if(!f){if(t>n){let m=s;s=l,l=m}let h=document.createRange();h.setEnd(l.node,l.offset),h.setStart(s.node,s.offset),c.removeAllRanges(),c.addRange(h)}}ignoreMutation(t){return!this.contentDOM&&t.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,n){for(let r=0,o=0;o<this.children.length;o++){let i=this.children[o],a=r+i.size;if(r==a?t<=a&&n>=r:t<a&&n>r){let s=r+i.border,l=a-i.border;if(t>=s&&n<=l){this.dirty=t==r||n==a?Pi:Uv,t==s&&n==l&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=bo:i.markDirty(t-s,n-s);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?Pi:bo}r=a}this.dirty=Pi}markParentsDirty(){let t=1;for(let n=this.parent;n;n=n.parent,t++){let r=t==1?Pi:Uv;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}isText(t){return!1}}class VS extends yl{constructor(t,n,r,o){let i,a=n.type.toDOM;if(typeof a=="function"&&(a=a(r,()=>{if(!i)return o;if(i.parent)return i.parent.posBeforeChild(i)})),!n.type.spec.raw){if(a.nodeType!=1){let s=document.createElement("span");s.appendChild(a),a=s}a.contentEditable="false",a.classList.add("ProseMirror-widget")}super(t,[],a,null),this.widget=n,this.widget=n,i=this}matchesWidget(t){return this.dirty==Lr&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let n=this.widget.spec.stopEvent;return n?n(t):!1}ignoreMutation(t){return t.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class $M extends yl{constructor(t,n,r,o){super(t,[],n,null),this.textDOM=r,this.text=o}get size(){return this.text.length}localPosFromDOM(t,n){return t!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return t.type==="characterData"&&t.target.nodeValue==t.oldValue}}class Yi extends yl{constructor(t,n,r,o,i){super(t,[],r,o),this.mark=n,this.spec=i}static create(t,n,r,o){let i=o.nodeViews[n.type.name],a=i&&i(n,o,r);return(!a||!a.dom)&&(a=na.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new Yi(t,n,a.dom,a.contentDOM||a.dom,a)}parseRule(){return this.dirty&bo||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return this.dirty!=bo&&this.mark.eq(t)}markDirty(t,n){if(super.markDirty(t,n),this.dirty!=Lr){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=Lr}}slice(t,n,r){let o=Yi.create(this.parent,this.mark,!0,r),i=this.children,a=this.size;n<a&&(i=Th(i,n,a,r)),t>0&&(i=Th(i,0,t,r));for(let s=0;s<i.length;s++)i[s].parent=o;return o.children=i,o}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class di extends yl{constructor(t,n,r,o,i,a,s,l,c){super(t,[],i,a),this.node=n,this.outerDeco=r,this.innerDeco=o,this.nodeDOM=s}static create(t,n,r,o,i,a){let s=i.nodeViews[n.type.name],l,c=s&&s(n,i,()=>{if(!l)return a;if(l.parent)return l.parent.posBeforeChild(l)},r,o),u=c&&c.dom,d=c&&c.contentDOM;if(n.isText){if(!u)u=document.createTextNode(n.text);else if(u.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else u||({dom:u,contentDOM:d}=na.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!d&&!n.isText&&u.nodeName!="BR"&&(u.hasAttribute("contenteditable")||(u.contentEditable="false"),n.type.spec.draggable&&(u.draggable=!0));let f=u;return u=KS(u,r,n),c?l=new NM(t,n,r,o,u,d||null,f,c,i,a+1):n.isText?new rd(t,n,r,o,u,f,i):new di(t,n,r,o,u,d||null,f,i,a+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(t.preserveWhitespace="full"),!this.contentDOM)t.getContent=()=>this.node.content;else if(!this.contentLost)t.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){t.contentElement=r.dom.parentNode;break}}t.contentElement||(t.getContent=()=>Ae.empty)}return t}matchesNode(t,n,r){return this.dirty==Lr&&t.eq(this.node)&&Jc(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,n){let r=this.node.inlineContent,o=n,i=t.composing?this.localCompositionInfo(t,n):null,a=i&&i.pos>-1?i:null,s=i&&i.pos<0,l=new RM(this,a&&a.node,t);AM(this.node,this.innerDeco,(c,u,d)=>{c.spec.marks?l.syncToMarks(c.spec.marks,r,t):c.type.side>=0&&!d&&l.syncToMarks(u==this.node.childCount?pn.none:this.node.child(u).marks,r,t),l.placeWidget(c,t,o)},(c,u,d,f)=>{l.syncToMarks(c.marks,r,t);let h;l.findNodeMatch(c,u,d,f)||s&&t.state.selection.from>o&&t.state.selection.to<o+c.nodeSize&&(h=l.findIndexWithChild(i.node))>-1&&l.updateNodeAt(c,u,d,h,t)||l.updateNextNode(c,u,d,t,f,o)||l.addNode(c,u,d,t,o),o+=c.nodeSize}),l.syncToMarks([],r,t),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==Pi)&&(a&&this.protectLocalComposition(t,a),US(this.contentDOM,this.children,t),La&&PM(this.dom))}localCompositionInfo(t,n){let{from:r,to:o}=t.state.selection;if(!(t.state.selection instanceof Ct)||r<n||o>n+this.node.content.size)return null;let i=t.input.compositionNode;if(!i||!this.dom.contains(i.parentNode))return null;if(this.node.inlineContent){let a=i.nodeValue,s=kM(this.node.content,a,r-n,o-n);return s<0?null:{node:i,pos:s,text:a}}else return{node:i,pos:-1,text:""}}protectLocalComposition(t,{node:n,pos:r,text:o}){if(this.getDesc(n))return;let i=n;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let a=new $M(this,i,n,o);t.input.compositionNodes.push(a),this.children=Th(this.children,r,r+o.length,t,a)}update(t,n,r,o){return this.dirty==bo||!t.sameMarkup(this.node)?!1:(this.updateInner(t,n,r,o),!0)}updateInner(t,n,r,o){this.updateOuterDeco(n),this.node=t,this.innerDeco=r,this.contentDOM&&this.updateChildren(o,this.posAtStart),this.dirty=Lr}updateOuterDeco(t){if(Jc(t,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=qS(this.dom,this.nodeDOM,Ih(this.outerDeco,this.node,n),Ih(t,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=t}selectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function qv(e,t,n,r,o){KS(r,t,e);let i=new di(void 0,e,t,n,r,r,r,o,0);return i.contentDOM&&i.updateChildren(o,0),i}class rd extends di{constructor(t,n,r,o,i,a,s){super(t,n,r,o,i,null,a,s,0)}parseRule(){let t=this.nodeDOM.parentNode;for(;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}}update(t,n,r,o){return this.dirty==bo||this.dirty!=Lr&&!this.inParent()||!t.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=Lr||t.text!=this.node.text)&&t.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=t.text,o.trackWrites==this.nodeDOM&&(o.trackWrites=null)),this.node=t,this.dirty=Lr,!0)}inParent(){let t=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==t)return!0;return!1}domFromPos(t){return{node:this.nodeDOM,offset:t}}localPosFromDOM(t,n,r){return t==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(t,n,r)}ignoreMutation(t){return t.type!="characterData"&&t.type!="selection"}slice(t,n,r){let o=this.node.cut(t,n),i=document.createTextNode(o.text);return new rd(this.parent,o,this.outerDeco,this.innerDeco,i,i,r)}markDirty(t,n){super.markDirty(t,n),this.dom!=this.nodeDOM&&(t==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=bo)}get domAtom(){return!1}isText(t){return this.node.text==t}}class WS extends yl{parseRule(){return{ignore:!0}}matchesHack(t){return this.dirty==Lr&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class NM extends di{constructor(t,n,r,o,i,a,s,l,c,u){super(t,n,r,o,i,a,s,c,u),this.spec=l}update(t,n,r,o){if(this.dirty==bo)return!1;if(this.spec.update&&(this.node.type==t.type||this.spec.multiType)){let i=this.spec.update(t,n,r);return i&&this.updateInner(t,n,r,o),i}else return!this.contentDOM&&!t.isLeaf?!1:super.update(t,n,r,o)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,n,r,o){this.spec.setSelection?this.spec.setSelection(t,n,r.root):super.setSelection(t,n,r,o)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(t){return this.spec.stopEvent?this.spec.stopEvent(t):!1}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}}function US(e,t,n){let r=e.firstChild,o=!1;for(let i=0;i<t.length;i++){let a=t[i],s=a.dom;if(s.parentNode==e){for(;s!=r;)r=Kv(r),o=!0;r=r.nextSibling}else o=!0,e.insertBefore(s,r);if(a instanceof Yi){let l=r?r.previousSibling:e.lastChild;US(a.contentDOM,a.children,n),r=l?l.nextSibling:e.firstChild}}for(;r;)r=Kv(r),o=!0;o&&n.trackWrites==e&&(n.trackWrites=null)}const Ps=function(e){e&&(this.nodeName=e)};Ps.prototype=Object.create(null);const ki=[new Ps];function Ih(e,t,n){if(e.length==0)return ki;let r=n?ki[0]:new Ps,o=[r];for(let i=0;i<e.length;i++){let a=e[i].type.attrs;if(a){a.nodeName&&o.push(r=new Ps(a.nodeName));for(let s in a){let l=a[s];l!=null&&(n&&o.length==1&&o.push(r=new Ps(t.isInline?"span":"div")),s=="class"?r.class=(r.class?r.class+" ":"")+l:s=="style"?r.style=(r.style?r.style+";":"")+l:s!="nodeName"&&(r[s]=l))}}}return o}function qS(e,t,n,r){if(n==ki&&r==ki)return t;let o=t;for(let i=0;i<r.length;i++){let a=r[i],s=n[i];if(i){let l;s&&s.nodeName==a.nodeName&&o!=e&&(l=o.parentNode)&&l.nodeName.toLowerCase()==a.nodeName||(l=document.createElement(a.nodeName),l.pmIsDeco=!0,l.appendChild(o),s=ki[0]),o=l}MM(o,s||ki[0],a)}return o}function MM(e,t,n){for(let r in t)r!="class"&&r!="style"&&r!="nodeName"&&!(r in n)&&e.removeAttribute(r);for(let r in n)r!="class"&&r!="style"&&r!="nodeName"&&n[r]!=t[r]&&e.setAttribute(r,n[r]);if(t.class!=n.class){let r=t.class?t.class.split(" ").filter(Boolean):[],o=n.class?n.class.split(" ").filter(Boolean):[];for(let i=0;i<r.length;i++)o.indexOf(r[i])==-1&&e.classList.remove(r[i]);for(let i=0;i<o.length;i++)r.indexOf(o[i])==-1&&e.classList.add(o[i]);e.classList.length==0&&e.removeAttribute("class")}if(t.style!=n.style){if(t.style){let r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,o;for(;o=r.exec(t.style);)e.style.removeProperty(o[1])}n.style&&(e.style.cssText+=n.style)}}function KS(e,t,n){return qS(e,e,ki,Ih(t,n,e.nodeType!=1))}function Jc(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function Kv(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}class RM{constructor(t,n,r){this.lock=n,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=t,this.preMatch=IM(t.node.content,t)}destroyBetween(t,n){if(t!=n){for(let r=t;r<n;r++)this.top.children[r].destroy();this.top.children.splice(t,n-t),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(t,n,r){let o=0,i=this.stack.length>>1,a=Math.min(i,t.length);for(;o<a&&(o==i-1?this.top:this.stack[o+1<<1]).matchesMark(t[o])&&t[o].type.spec.spanning!==!1;)o++;for(;o<i;)this.destroyRest(),this.top.dirty=Lr,this.index=this.stack.pop(),this.top=this.stack.pop(),i--;for(;i<t.length;){this.stack.push(this.top,this.index+1);let s=-1;for(let l=this.index;l<Math.min(this.index+3,this.top.children.length);l++){let c=this.top.children[l];if(c.matchesMark(t[i])&&!this.isLocked(c.dom)){s=l;break}}if(s>-1)s>this.index&&(this.changed=!0,this.destroyBetween(this.index,s)),this.top=this.top.children[this.index];else{let l=Yi.create(this.top,t[i],n,r);this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,i++}}findNodeMatch(t,n,r,o){let i=-1,a;if(o>=this.preMatch.index&&(a=this.preMatch.matches[o-this.preMatch.index]).parent==this.top&&a.matchesNode(t,n,r))i=this.top.children.indexOf(a,this.index);else for(let s=this.index,l=Math.min(this.top.children.length,s+5);s<l;s++){let c=this.top.children[s];if(c.matchesNode(t,n,r)&&!this.preMatch.matched.has(c)){i=s;break}}return i<0?!1:(this.destroyBetween(this.index,i),this.index++,!0)}updateNodeAt(t,n,r,o,i){let a=this.top.children[o];return a.dirty==bo&&a.dom==a.contentDOM&&(a.dirty=Pi),a.update(t,n,r,i)?(this.destroyBetween(this.index,o),this.index++,!0):!1}findIndexWithChild(t){for(;;){let n=t.parentNode;if(!n)return-1;if(n==this.top.contentDOM){let r=t.pmViewDesc;if(r){for(let o=this.index;o<this.top.children.length;o++)if(this.top.children[o]==r)return o}return-1}t=n}}updateNextNode(t,n,r,o,i,a){for(let s=this.index;s<this.top.children.length;s++){let l=this.top.children[s];if(l instanceof di){let c=this.preMatch.matched.get(l);if(c!=null&&c!=i)return!1;let u=l.dom,d,f=this.isLocked(u)&&!(t.isText&&l.node&&l.node.isText&&l.nodeDOM.nodeValue==t.text&&l.dirty!=bo&&Jc(n,l.outerDeco));if(!f&&l.update(t,n,r,o))return this.destroyBetween(this.index,s),l.dom!=u&&(this.changed=!0),this.index++,!0;if(!f&&(d=this.recreateWrapper(l,t,n,r,o,a)))return this.destroyBetween(this.index,s),this.top.children[this.index]=d,d.contentDOM&&(d.dirty=Pi,d.updateChildren(o,a+1),d.dirty=Lr),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(t,n,r,o,i,a){if(t.dirty||n.isAtom||!t.children.length||!t.node.content.eq(n.content)||!Jc(r,t.outerDeco)||!o.eq(t.innerDeco))return null;let s=di.create(this.top,n,r,o,i,a);if(s.contentDOM){s.children=t.children,t.children=[];for(let l of s.children)l.parent=s}return t.destroy(),s}addNode(t,n,r,o,i){let a=di.create(this.top,t,n,r,o,i);a.contentDOM&&a.updateChildren(o,i+1),this.top.children.splice(this.index++,0,a),this.changed=!0}placeWidget(t,n,r){let o=this.index<this.top.children.length?this.top.children[this.index]:null;if(o&&o.matchesWidget(t)&&(t==o.widget||!o.widget.type.toDOM.parentNode))this.index++;else{let i=new VS(this.top,t,n,r);this.top.children.splice(this.index++,0,i),this.changed=!0}}addTextblockHacks(){let t=this.top.children[this.index-1],n=this.top;for(;t instanceof Yi;)n=t,t=n.children[n.children.length-1];(!t||!(t instanceof rd)||/\n$/.test(t.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(t.node.text))&&((cr||rr)&&t&&t.dom.contentEditable=="false"&&this.addHackNode("IMG",n),this.addHackNode("BR",this.top))}addHackNode(t,n){if(n==this.top&&this.index<n.children.length&&n.children[this.index].matchesHack(t))this.index++;else{let r=document.createElement(t);t=="IMG"&&(r.className="ProseMirror-separator",r.alt=""),t=="BR"&&(r.className="ProseMirror-trailingBreak");let o=new WS(this.top,[],r,null);n!=this.top?n.children.push(o):n.children.splice(this.index++,0,o),this.changed=!0}}isLocked(t){return this.lock&&(t==this.lock||t.nodeType==1&&t.contains(this.lock.parentNode))}}function IM(e,t){let n=t,r=n.children.length,o=e.childCount,i=new Map,a=[];e:for(;o>0;){let s;for(;;)if(r){let c=n.children[r-1];if(c instanceof Yi)n=c,r=c.children.length;else{s=c,r--;break}}else{if(n==t)break e;r=n.parent.children.indexOf(n),n=n.parent}let l=s.node;if(l){if(l!=e.child(o-1))break;--o,i.set(s,o),a.push(s)}}return{index:o,matched:i,matches:a.reverse()}}function TM(e,t){return e.type.side-t.type.side}function AM(e,t,n,r){let o=t.locals(e),i=0;if(o.length==0){for(let c=0;c<e.childCount;c++){let u=e.child(c);r(u,o,t.forChild(i,u),c),i+=u.nodeSize}return}let a=0,s=[],l=null;for(let c=0;;){let u,d;for(;a<o.length&&o[a].to==i;){let g=o[a++];g.widget&&(u?(d||(d=[u])).push(g):u=g)}if(u)if(d){d.sort(TM);for(let g=0;g<d.length;g++)n(d[g],c,!!l)}else n(u,c,!!l);let f,h;if(l)h=-1,f=l,l=null;else if(c<e.childCount)h=c,f=e.child(c++);else break;for(let g=0;g<s.length;g++)s[g].to<=i&&s.splice(g--,1);for(;a<o.length&&o[a].from<=i&&o[a].to>i;)s.push(o[a++]);let m=i+f.nodeSize;if(f.isText){let g=m;a<o.length&&o[a].from<g&&(g=o[a].from);for(let y=0;y<s.length;y++)s[y].to<g&&(g=s[y].to);g<m&&(l=f.cut(g-i),f=f.cut(0,g-i),m=g,h=-1)}else for(;a<o.length&&o[a].to<m;)a++;let v=f.isInline&&!f.isLeaf?s.filter(g=>!g.inline):s.slice();r(f,v,t.forChild(i,f),h),i=m}}function PM(e){if(e.nodeName=="UL"||e.nodeName=="OL"){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}function kM(e,t,n,r){for(let o=0,i=0;o<e.childCount&&i<=r;){let a=e.child(o++),s=i;if(i+=a.nodeSize,!a.isText)continue;let l=a.text;for(;o<e.childCount;){let c=e.child(o++);if(i+=c.nodeSize,!c.isText)break;l+=c.text}if(i>=n){if(i>=r&&l.slice(r-t.length-s,r-s)==t)return r-t.length;let c=s<r?l.lastIndexOf(t,r-s-1):-1;if(c>=0&&c+t.length+s>=n)return s+c;if(n==r&&l.length>=r+t.length-s&&l.slice(r-s,r-s+t.length)==t)return r}}return-1}function Th(e,t,n,r,o){let i=[];for(let a=0,s=0;a<e.length;a++){let l=e[a],c=s,u=s+=l.size;c>=n||u<=t?i.push(l):(c<t&&i.push(l.slice(0,t-c,r)),o&&(i.push(o),o=void 0),u>n&&i.push(l.slice(n-c,l.size,r)))}return i}function Om(e,t=null){let n=e.domSelectionRange(),r=e.state.doc;if(!n.focusNode)return null;let o=e.docView.nearestDesc(n.focusNode),i=o&&o.size==0,a=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(a<0)return null;let s=r.resolve(a),l,c;if(nd(n)){for(l=a;o&&!o.node;)o=o.parent;let d=o.node;if(o&&d.isAtom&&yt.isSelectable(d)&&o.parent&&!(d.isInline&&aM(n.focusNode,n.focusOffset,o.dom))){let f=o.posBefore;c=new yt(a==f?s:r.resolve(f))}}else{if(n instanceof e.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let d=a,f=a;for(let h=0;h<n.rangeCount;h++){let m=n.getRangeAt(h);d=Math.min(d,e.docView.posFromDOM(m.startContainer,m.startOffset,1)),f=Math.max(f,e.docView.posFromDOM(m.endContainer,m.endOffset,-1))}if(d<0)return null;[l,a]=f==e.state.selection.anchor?[f,d]:[d,f],s=r.resolve(a)}else l=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(l<0)return null}let u=r.resolve(l);if(!c){let d=t=="pointer"||e.state.selection.head<s.pos&&!i?1:-1;c=$m(e,u,s,d)}return c}function GS(e){return e.editable?e.hasFocus():YS(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function Do(e,t=!1){let n=e.state.selection;if(XS(e,n),!!GS(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&rr){let r=e.domSelectionRange(),o=e.domObserver.currentSelection;if(r.anchorNode&&o.anchorNode&&Xi(r.anchorNode,r.anchorOffset,o.anchorNode,o.anchorOffset)){e.input.mouseDown.delayedSelectionSync=!0,e.domObserver.setCurSelection();return}}if(e.domObserver.disconnectSelection(),e.cursorWrapper)_M(e);else{let{anchor:r,head:o}=n,i,a;Gv&&!(n instanceof Ct)&&(n.$from.parent.inlineContent||(i=Xv(e,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(a=Xv(e,n.to))),e.docView.setSelection(r,o,e,t),Gv&&(i&&Yv(i),a&&Yv(a)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&DM(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}const Gv=cr||rr&&_S<63;function Xv(e,t){let{node:n,offset:r}=e.docView.domFromPos(t,0),o=r<n.childNodes.length?n.childNodes[r]:null,i=r?n.childNodes[r-1]:null;if(cr&&o&&o.contentEditable=="false")return sf(o);if((!o||o.contentEditable=="false")&&(!i||i.contentEditable=="false")){if(o)return sf(o);if(i)return sf(i)}}function sf(e){return e.contentEditable="true",cr&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function Yv(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function DM(e){let t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.input.hideSelectionGuard);let n=e.domSelectionRange(),r=n.anchorNode,o=n.anchorOffset;t.addEventListener("selectionchange",e.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=o)&&(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout(()=>{(!GS(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})}function _M(e){let t=e.domSelection(),n=document.createRange();if(!t)return;let r=e.cursorWrapper.dom,o=r.nodeName=="IMG";o?n.setStart(r.parentNode,Qn(r)+1):n.setStart(r,0),n.collapse(!0),t.removeAllRanges(),t.addRange(n),!o&&!e.state.selection.visible&&vr&&ui<=11&&(r.disabled=!0,r.disabled=!1)}function XS(e,t){if(t instanceof yt){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(Jv(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else Jv(e)}function Jv(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function $m(e,t,n,r){return e.someProp("createSelectionBetween",o=>o(e,t,n))||Ct.between(t,n,r)}function Qv(e){return e.editable&&!e.hasFocus()?!1:YS(e)}function YS(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(t.anchorNode.nodeType==3?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(t.focusNode.nodeType==3?t.focusNode.parentNode:t.focusNode))}catch{return!1}}function LM(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return Xi(t.node,t.offset,n.anchorNode,n.anchorOffset)}function Ah(e,t){let{$anchor:n,$head:r}=e.selection,o=t>0?n.max(r):n.min(r),i=o.parent.inlineContent?o.depth?e.doc.resolve(t>0?o.after():o.before()):null:o;return i&&xt.findFrom(i,t)}function Yo(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function Zv(e,t,n){let r=e.state.selection;if(r instanceof Ct)if(n.indexOf("s")>-1){let{$head:o}=r,i=o.textOffset?null:t<0?o.nodeBefore:o.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let a=e.state.doc.resolve(o.pos+i.nodeSize*(t<0?-1:1));return Yo(e,new Ct(r.$anchor,a))}else if(r.empty){if(e.endOfTextblock(t>0?"forward":"backward")){let o=Ah(e.state,t);return o&&o instanceof yt?Yo(e,o):!1}else if(!(Dr&&n.indexOf("m")>-1)){let o=r.$head,i=o.textOffset?null:t<0?o.nodeBefore:o.nodeAfter,a;if(!i||i.isText)return!1;let s=t<0?o.pos-i.nodeSize:o.pos;return i.isAtom||(a=e.docView.descAt(s))&&!a.contentDOM?yt.isSelectable(i)?Yo(e,new yt(t<0?e.state.doc.resolve(o.pos-i.nodeSize):o)):bl?Yo(e,new Ct(e.state.doc.resolve(t<0?s:s+i.nodeSize))):!1:!1}}else return!1;else{if(r instanceof yt&&r.node.isInline)return Yo(e,new Ct(t>0?r.$to:r.$from));{let o=Ah(e.state,t);return o?Yo(e,o):!1}}}function Qc(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function ks(e,t){let n=e.pmViewDesc;return n&&n.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function ca(e,t){return t<0?jM(e):BM(e)}function jM(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o,i,a=!1;for(Zr&&n.nodeType==1&&r<Qc(n)&&ks(n.childNodes[r],-1)&&(a=!0);;)if(r>0){if(n.nodeType!=1)break;{let s=n.childNodes[r-1];if(ks(s,-1))o=n,i=--r;else if(s.nodeType==3)n=s,r=n.nodeValue.length;else break}}else{if(JS(n))break;{let s=n.previousSibling;for(;s&&ks(s,-1);)o=n.parentNode,i=Qn(s),s=s.previousSibling;if(s)n=s,r=Qc(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}}a?Ph(e,n,r):o&&Ph(e,o,i)}function BM(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o=Qc(n),i,a;for(;;)if(r<o){if(n.nodeType!=1)break;let s=n.childNodes[r];if(ks(s,1))i=n,a=++r;else break}else{if(JS(n))break;{let s=n.nextSibling;for(;s&&ks(s,1);)i=s.parentNode,a=Qn(s)+1,s=s.nextSibling;if(s)n=s,r=0,o=Qc(n);else{if(n=n.parentNode,n==e.dom)break;r=o=0}}}i&&Ph(e,i,a)}function JS(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function zM(e,t){for(;e&&t==e.childNodes.length&&!vl(e);)t=Qn(e)+1,e=e.parentNode;for(;e&&t<e.childNodes.length;){let n=e.childNodes[t];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;e=n,t=0}}function FM(e,t){for(;e&&!t&&!vl(e);)t=Qn(e),e=e.parentNode;for(;e&&t;){let n=e.childNodes[t-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;e=n,t=e.childNodes.length}}function Ph(e,t,n){if(t.nodeType!=3){let i,a;(a=zM(t,n))?(t=a,n=0):(i=FM(t,n))&&(t=i,n=i.nodeValue.length)}let r=e.domSelection();if(!r)return;if(nd(r)){let i=document.createRange();i.setEnd(t,n),i.setStart(t,n),r.removeAllRanges(),r.addRange(i)}else r.extend&&r.extend(t,n);e.domObserver.setCurSelection();let{state:o}=e;setTimeout(()=>{e.state==o&&Do(e)},50)}function eb(e,t){let n=e.state.doc.resolve(t);if(!(rr||cM)&&n.parent.inlineContent){let o=e.coordsAtPos(t);if(t>n.start()){let i=e.coordsAtPos(t-1),a=(i.top+i.bottom)/2;if(a>o.top&&a<o.bottom&&Math.abs(i.left-o.left)>1)return i.left<o.left?"ltr":"rtl"}if(t<n.end()){let i=e.coordsAtPos(t+1),a=(i.top+i.bottom)/2;if(a>o.top&&a<o.bottom&&Math.abs(i.left-o.left)>1)return i.left>o.left?"ltr":"rtl"}}return getComputedStyle(e.dom).direction=="rtl"?"rtl":"ltr"}function tb(e,t,n){let r=e.state.selection;if(r instanceof Ct&&!r.empty||n.indexOf("s")>-1||Dr&&n.indexOf("m")>-1)return!1;let{$from:o,$to:i}=r;if(!o.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let a=Ah(e.state,t);if(a&&a instanceof yt)return Yo(e,a)}if(!o.parent.inlineContent){let a=t<0?o:i,s=r instanceof $r?xt.near(a,t):xt.findFrom(a,t);return s?Yo(e,s):!1}return!1}function nb(e,t){if(!(e.state.selection instanceof Ct))return!0;let{$head:n,$anchor:r,empty:o}=e.state.selection;if(!n.sameParent(r))return!0;if(!o)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let i=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(i&&!i.isText){let a=e.state.tr;return t<0?a.delete(n.pos-i.nodeSize,n.pos):a.delete(n.pos,n.pos+i.nodeSize),e.dispatch(a),!0}return!1}function rb(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function HM(e){if(!cr||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&t.nodeType==1&&n==0&&t.firstChild&&t.firstChild.contentEditable=="false"){let r=t.firstChild;rb(e,r,"true"),setTimeout(()=>rb(e,r,"false"),20)}return!1}function VM(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function WM(e,t){let n=t.keyCode,r=VM(t);if(n==8||Dr&&n==72&&r=="c")return nb(e,-1)||ca(e,-1);if(n==46&&!t.shiftKey||Dr&&n==68&&r=="c")return nb(e,1)||ca(e,1);if(n==13||n==27)return!0;if(n==37||Dr&&n==66&&r=="c"){let o=n==37?eb(e,e.state.selection.from)=="ltr"?-1:1:-1;return Zv(e,o,r)||ca(e,o)}else if(n==39||Dr&&n==70&&r=="c"){let o=n==39?eb(e,e.state.selection.from)=="ltr"?1:-1:1;return Zv(e,o,r)||ca(e,o)}else{if(n==38||Dr&&n==80&&r=="c")return tb(e,-1,r)||ca(e,-1);if(n==40||Dr&&n==78&&r=="c")return HM(e)||tb(e,1,r)||ca(e,1);if(r==(Dr?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function Nm(e,t){e.someProp("transformCopied",h=>{t=h(t,e)});let n=[],{content:r,openStart:o,openEnd:i}=t;for(;o>1&&i>1&&r.childCount==1&&r.firstChild.childCount==1;){o--,i--;let h=r.firstChild;n.push(h.type.name,h.attrs!=h.type.defaultAttrs?h.attrs:null),r=h.content}let a=e.someProp("clipboardSerializer")||na.fromSchema(e.state.schema),s=rx(),l=s.createElement("div");l.appendChild(a.serializeFragment(r,{document:s}));let c=l.firstChild,u,d=0;for(;c&&c.nodeType==1&&(u=nx[c.nodeName.toLowerCase()]);){for(let h=u.length-1;h>=0;h--){let m=s.createElement(u[h]);for(;l.firstChild;)m.appendChild(l.firstChild);l.appendChild(m),d++}c=l.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${o} ${i}${d?` -${d}`:""} ${JSON.stringify(n)}`);let f=e.someProp("clipboardTextSerializer",h=>h(t,e))||t.content.textBetween(0,t.content.size,`
46
+
47
+ `);return{dom:l,text:f,slice:t}}function QS(e,t,n,r,o){let i=o.parent.type.spec.code,a,s;if(!n&&!t)return null;let l=t&&(r||i||!n);if(l){if(e.someProp("transformPastedText",f=>{t=f(t,i||r,e)}),i)return t?new nt(Ae.from(e.state.schema.text(t.replace(/\r\n?/g,`
48
+ `))),0,0):nt.empty;let d=e.someProp("clipboardTextParser",f=>f(t,o,r,e));if(d)s=d;else{let f=o.marks(),{schema:h}=e.state,m=na.fromSchema(h);a=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(v=>{let g=a.appendChild(document.createElement("p"));v&&g.appendChild(m.serializeNode(h.text(v,f)))})}}else e.someProp("transformPastedHTML",d=>{n=d(n,e)}),a=GM(n),bl&&XM(a);let c=a&&a.querySelector("[data-pm-slice]"),u=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(u&&u[3])for(let d=+u[3];d>0;d--){let f=a.firstChild;for(;f&&f.nodeType!=1;)f=f.nextSibling;if(!f)break;a=f}if(s||(s=(e.someProp("clipboardParser")||e.someProp("domParser")||As.fromSchema(e.state.schema)).parseSlice(a,{preserveWhitespace:!!(l||u),context:o,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!UM.test(f.parentNode.nodeName)?{ignore:!0}:null}})),u)s=YM(ob(s,+u[1],+u[2]),u[4]);else if(s=nt.maxOpen(qM(s.content,o),!0),s.openStart||s.openEnd){let d=0,f=0;for(let h=s.content.firstChild;d<s.openStart&&!h.type.spec.isolating;d++,h=h.firstChild);for(let h=s.content.lastChild;f<s.openEnd&&!h.type.spec.isolating;f++,h=h.lastChild);s=ob(s,d,f)}return e.someProp("transformPasted",d=>{s=d(s,e)}),s}const UM=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function qM(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let o=t.node(n).contentMatchAt(t.index(n)),i,a=[];if(e.forEach(s=>{if(!a)return;let l=o.findWrapping(s.type),c;if(!l)return a=null;if(c=a.length&&i.length&&ex(l,i,s,a[a.length-1],0))a[a.length-1]=c;else{a.length&&(a[a.length-1]=tx(a[a.length-1],i.length));let u=ZS(s,l);a.push(u),o=o.matchType(u.type),i=l}}),a)return Ae.from(a)}return e}function ZS(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,Ae.from(e));return e}function ex(e,t,n,r,o){if(o<e.length&&o<t.length&&e[o]==t[o]){let i=ex(e,t,n,r.lastChild,o+1);if(i)return r.copy(r.content.replaceChild(r.childCount-1,i));if(r.contentMatchAt(r.childCount).matchType(o==e.length-1?n.type:e[o+1]))return r.copy(r.content.append(Ae.from(ZS(n,e,o+1))))}}function tx(e,t){if(t==0)return e;let n=e.content.replaceChild(e.childCount-1,tx(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(Ae.empty,!0);return e.copy(n.append(r))}function kh(e,t,n,r,o,i){let a=t<0?e.firstChild:e.lastChild,s=a.content;return e.childCount>1&&(i=0),o<r-1&&(s=kh(s,t,n,r,o+1,i)),o>=n&&(s=t<0?a.contentMatchAt(0).fillBefore(s,i<=o).append(s):s.append(a.contentMatchAt(a.childCount).fillBefore(Ae.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,a.copy(s))}function ob(e,t,n){return t<e.openStart&&(e=new nt(kh(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new nt(kh(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}const nx={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let ib=null;function rx(){return ib||(ib=document.implementation.createHTMLDocument("title"))}let lf=null;function KM(e){let t=window.trustedTypes;return t?(lf||(lf=t.createPolicy("ProseMirrorClipboard",{createHTML:n=>n})),lf.createHTML(e)):e}function GM(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=rx().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(e),o;if((o=r&&nx[r[1].toLowerCase()])&&(e=o.map(i=>"<"+i+">").join("")+e+o.map(i=>"</"+i+">").reverse().join("")),n.innerHTML=KM(e),o)for(let i=0;i<o.length;i++)n=n.querySelector(o[i])||n;return n}function XM(e){let t=e.querySelectorAll(rr?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<t.length;n++){let r=t[n];r.childNodes.length==1&&r.textContent==" "&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),r)}}function YM(e,t){if(!e.size)return e;let n=e.content.firstChild.type.schema,r;try{r=JSON.parse(t)}catch{return e}let{content:o,openStart:i,openEnd:a}=e;for(let s=r.length-2;s>=0;s-=2){let l=n.nodes[r[s]];if(!l||l.hasRequiredAttrs())break;o=Ae.from(l.create(r[s+1],o)),i++,a++}return new nt(o,i,a)}const ur={},dr={},JM={touchstart:!0,touchmove:!0};class QM{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function ZM(e){for(let t in ur){let n=ur[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=r=>{tR(e,r)&&!Mm(e,r)&&(e.editable||!(r.type in dr))&&n(e,r)},JM[t]?{passive:!0}:void 0)}cr&&e.dom.addEventListener("input",()=>null),Dh(e)}function ai(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function eR(e){e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}function Dh(e){e.someProp("handleDOMEvents",t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=r=>Mm(e,r))})}function Mm(e,t){return e.someProp("handleDOMEvents",n=>{let r=n[t.type];return r?r(e,t)||t.defaultPrevented:!1})}function tR(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function nR(e,t){!Mm(e,t)&&ur[t.type]&&(e.editable||!(t.type in dr))&&ur[t.type](e,t)}dr.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!ix(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!(Ao&&rr&&n.keyCode==13)))if(n.keyCode!=229&&e.domObserver.forceFlush(),La&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();e.input.lastIOSEnter=r,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==r&&(e.someProp("handleKeyDown",o=>o(e,Ri(13,"Enter"))),e.input.lastIOSEnter=0)},200)}else e.someProp("handleKeyDown",r=>r(e,n))||WM(e,n)?n.preventDefault():ai(e,"key")};dr.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)};dr.keypress=(e,t)=>{let n=t;if(ix(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||Dr&&n.metaKey)return;if(e.someProp("handleKeyPress",o=>o(e,n))){n.preventDefault();return}let r=e.state.selection;if(!(r instanceof Ct)||!r.$from.sameParent(r.$to)){let o=String.fromCharCode(n.charCode);!/[\r\n]/.test(o)&&!e.someProp("handleTextInput",i=>i(e,r.$from.pos,r.$to.pos,o))&&e.dispatch(e.state.tr.insertText(o).scrollIntoView()),n.preventDefault()}};function od(e){return{left:e.clientX,top:e.clientY}}function rR(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}function Rm(e,t,n,r,o){if(r==-1)return!1;let i=e.state.doc.resolve(r);for(let a=i.depth+1;a>0;a--)if(e.someProp(t,s=>a>i.depth?s(e,n,i.nodeAfter,i.before(a),o,!0):s(e,n,i.node(a),i.before(a),o,!1)))return!0;return!1}function Ra(e,t,n){if(e.focused||e.focus(),e.state.selection.eq(t))return;let r=e.state.tr.setSelection(t);r.setMeta("pointer",!0),e.dispatch(r)}function oR(e,t){if(t==-1)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return r&&r.isAtom&&yt.isSelectable(r)?(Ra(e,new yt(n)),!0):!1}function iR(e,t){if(t==-1)return!1;let n=e.state.selection,r,o;n instanceof yt&&(r=n.node);let i=e.state.doc.resolve(t);for(let a=i.depth+1;a>0;a--){let s=a>i.depth?i.nodeAfter:i.node(a);if(yt.isSelectable(s)){r&&n.$from.depth>0&&a>=n.$from.depth&&i.before(n.$from.depth+1)==n.$from.pos?o=i.before(n.$from.depth):o=i.before(a);break}}return o!=null?(Ra(e,yt.create(e.state.doc,o)),!0):!1}function aR(e,t,n,r,o){return Rm(e,"handleClickOn",t,n,r)||e.someProp("handleClick",i=>i(e,t,r))||(o?iR(e,n):oR(e,n))}function sR(e,t,n,r){return Rm(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",o=>o(e,t,r))}function lR(e,t,n,r){return Rm(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",o=>o(e,t,r))||cR(e,n,r)}function cR(e,t,n){if(n.button!=0)return!1;let r=e.state.doc;if(t==-1)return r.inlineContent?(Ra(e,Ct.create(r,0,r.content.size)),!0):!1;let o=r.resolve(t);for(let i=o.depth+1;i>0;i--){let a=i>o.depth?o.nodeAfter:o.node(i),s=o.before(i);if(a.inlineContent)Ra(e,Ct.create(r,s+1,s+1+a.content.size));else if(yt.isSelectable(a))Ra(e,yt.create(r,s));else continue;return!0}}function Im(e){return Zc(e)}const ox=Dr?"metaKey":"ctrlKey";ur.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=Im(e),o=Date.now(),i="singleClick";o-e.input.lastClick.time<500&&rR(n,e.input.lastClick)&&!n[ox]&&(e.input.lastClick.type=="singleClick"?i="doubleClick":e.input.lastClick.type=="doubleClick"&&(i="tripleClick")),e.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:i};let a=e.posAtCoords(od(n));a&&(i=="singleClick"?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new uR(e,a,n,!!r)):(i=="doubleClick"?sR:lR)(e,a.pos,a.inside,n)?n.preventDefault():ai(e,"pointer"))};class uR{constructor(t,n,r,o){this.view=t,this.pos=n,this.event=r,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!r[ox],this.allowDefault=r.shiftKey;let i,a;if(n.inside>-1)i=t.state.doc.nodeAt(n.inside),a=n.inside;else{let u=t.state.doc.resolve(n.pos);i=u.parent,a=u.depth?u.before():0}const s=o?null:r.target,l=s?t.docView.nearestDesc(s,!0):null;this.target=l&&l.dom.nodeType==1?l.dom:null;let{selection:c}=t.state;(r.button==0&&i.type.spec.draggable&&i.type.spec.selectable!==!1||c instanceof yt&&c.from<=a&&c.to>a)&&(this.mightDrag={node:i,pos:a,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Zr&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),ai(t,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>Do(this.view)),this.view.input.mouseDown=null}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(od(t))),this.updateAllowDefault(t),this.allowDefault||!n?ai(this.view,"pointer"):aR(this.view,n.pos,n.inside,t,this.selectNode)?t.preventDefault():t.button==0&&(this.flushed||cr&&this.mightDrag&&!this.mightDrag.node.isAtom||rr&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(Ra(this.view,xt.near(this.view.state.doc.resolve(n.pos))),t.preventDefault()):ai(this.view,"pointer")}move(t){this.updateAllowDefault(t),ai(this.view,"pointer"),t.buttons==0&&this.done()}updateAllowDefault(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0)}}ur.touchstart=e=>{e.input.lastTouch=Date.now(),Im(e),ai(e,"pointer")};ur.touchmove=e=>{e.input.lastTouch=Date.now(),ai(e,"pointer")};ur.contextmenu=e=>Im(e);function ix(e,t){return e.composing?!0:cr&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}const dR=Ao?5e3:-1;dr.compositionstart=dr.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$to;if(t.selection instanceof Ct&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)))e.markCursor=e.state.storedMarks||n.marks(),Zc(e,!0),e.markCursor=null;else if(Zc(e,!t.selection.empty),Zr&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=e.domSelectionRange();for(let o=r.focusNode,i=r.focusOffset;o&&o.nodeType==1&&i!=0;){let a=i<0?o.lastChild:o.childNodes[i-1];if(!a)break;if(a.nodeType==3){let s=e.domSelection();s&&s.collapse(a,a.nodeValue.length);break}else o=a,i=-1}}e.input.composing=!0}ax(e,dR)};dr.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionNode=null,e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,ax(e,20))};function ax(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>Zc(e),t))}function sx(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=hR());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function fR(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let n=oM(t.focusNode,t.focusOffset),r=iM(t.focusNode,t.focusOffset);if(n&&r&&n!=r){let o=r.pmViewDesc,i=e.domObserver.lastChangedTextNode;if(n==i||r==i)return i;if(!o||!o.isText(r.nodeValue))return r;if(e.input.compositionNode==r){let a=n.pmViewDesc;if(!(!a||!a.isText(n.nodeValue)))return r}}return n||r}function hR(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}function Zc(e,t=!1){if(!(Ao&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),sx(e),t||e.docView&&e.docView.dirty){let n=Om(e);return n&&!n.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(n)):(e.markCursor||t)&&!e.state.selection.empty?e.dispatch(e.state.tr.deleteSelection()):e.updateState(e.state),!0}return!1}}function pR(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()},50)}const Ys=vr&&ui<15||La&&uM<604;ur.copy=dr.cut=(e,t)=>{let n=t,r=e.state.selection,o=n.type=="cut";if(r.empty)return;let i=Ys?null:n.clipboardData,a=r.content(),{dom:s,text:l}=Nm(e,a);i?(n.preventDefault(),i.clearData(),i.setData("text/html",s.innerHTML),i.setData("text/plain",l)):pR(e,s),o&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function mR(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function gR(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let o=e.input.shiftKey&&e.input.lastKeyCode!=45;setTimeout(()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?Js(e,r.value,null,o,t):Js(e,r.textContent,r.innerHTML,o,t)},50)}function Js(e,t,n,r,o){let i=QS(e,t,n,r,e.state.selection.$from);if(e.someProp("handlePaste",l=>l(e,o,i||nt.empty)))return!0;if(!i)return!1;let a=mR(i),s=a?e.state.tr.replaceSelectionWith(a,r):e.state.tr.replaceSelection(i);return e.dispatch(s.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function lx(e){let t=e.getData("text/plain")||e.getData("Text");if(t)return t;let n=e.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}dr.paste=(e,t)=>{let n=t;if(e.composing&&!Ao)return;let r=Ys?null:n.clipboardData,o=e.input.shiftKey&&e.input.lastKeyCode!=45;r&&Js(e,lx(r),r.getData("text/html"),o,n)?n.preventDefault():gR(e,n)};class cx{constructor(t,n,r){this.slice=t,this.move=n,this.node=r}}const ux=Dr?"altKey":"ctrlKey";ur.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let o=e.state.selection,i=o.empty?null:e.posAtCoords(od(n)),a;if(!(i&&i.pos>=o.from&&i.pos<=(o instanceof yt?o.to-1:o.to))){if(r&&r.mightDrag)a=yt.create(e.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let d=e.docView.nearestDesc(n.target,!0);d&&d.node.type.spec.draggable&&d!=e.docView&&(a=yt.create(e.state.doc,d.posBefore))}}let s=(a||e.state.selection).content(),{dom:l,text:c,slice:u}=Nm(e,s);(!n.dataTransfer.files.length||!rr||_S>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(Ys?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",Ys||n.dataTransfer.setData("text/plain",c),e.dragging=new cx(u,!n[ux],a)};ur.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)};dr.dragover=dr.dragenter=(e,t)=>t.preventDefault();dr.drop=(e,t)=>{let n=t,r=e.dragging;if(e.dragging=null,!n.dataTransfer)return;let o=e.posAtCoords(od(n));if(!o)return;let i=e.state.doc.resolve(o.pos),a=r&&r.slice;a?e.someProp("transformPasted",m=>{a=m(a,e)}):a=QS(e,lx(n.dataTransfer),Ys?null:n.dataTransfer.getData("text/html"),!1,i);let s=!!(r&&!n[ux]);if(e.someProp("handleDrop",m=>m(e,n,a||nt.empty,s))){n.preventDefault();return}if(!a)return;n.preventDefault();let l=a?NS(e.state.doc,i.pos,a):i.pos;l==null&&(l=i.pos);let c=e.state.tr;if(s){let{node:m}=r;m?m.replace(c):c.deleteSelection()}let u=c.mapping.map(l),d=a.openStart==0&&a.openEnd==0&&a.content.childCount==1,f=c.doc;if(d?c.replaceRangeWith(u,u,a.content.firstChild):c.replaceRange(u,u,a),c.doc.eq(f))return;let h=c.doc.resolve(u);if(d&&yt.isSelectable(a.content.firstChild)&&h.nodeAfter&&h.nodeAfter.sameMarkup(a.content.firstChild))c.setSelection(new yt(h));else{let m=c.mapping.map(l);c.mapping.maps[c.mapping.maps.length-1].forEach((v,g,y,b)=>m=b),c.setSelection($m(e,h,c.doc.resolve(m)))}e.focus(),e.dispatch(c.setMeta("uiEvent","drop"))};ur.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&Do(e)},20))};ur.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)};ur.beforeinput=(e,t)=>{if(rr&&Ao&&t.inputType=="deleteContentBackward"){e.domObserver.flushSoon();let{domChangeCount:r}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=r||(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",i=>i(e,Ri(8,"Backspace")))))return;let{$cursor:o}=e.state.selection;o&&o.pos>0&&e.dispatch(e.state.tr.delete(o.pos-1,o.pos).scrollIntoView())},50)}};for(let e in dr)ur[e]=dr[e];function Qs(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}class eu{constructor(t,n){this.toDOM=t,this.spec=n||Hi,this.side=this.spec.side||0}map(t,n,r,o){let{pos:i,deleted:a}=t.mapResult(n.from+o,this.side<0?-1:1);return a?null:new Kn(i-r,i-r,this)}valid(){return!0}eq(t){return this==t||t instanceof eu&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&Qs(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class fi{constructor(t,n){this.attrs=t,this.spec=n||Hi}map(t,n,r,o){let i=t.map(n.from+o,this.spec.inclusiveStart?-1:1)-r,a=t.map(n.to+o,this.spec.inclusiveEnd?1:-1)-r;return i>=a?null:new Kn(i,a,this)}valid(t,n){return n.from<n.to}eq(t){return this==t||t instanceof fi&&Qs(this.attrs,t.attrs)&&Qs(this.spec,t.spec)}static is(t){return t.type instanceof fi}destroy(){}}class Tm{constructor(t,n){this.attrs=t,this.spec=n||Hi}map(t,n,r,o){let i=t.mapResult(n.from+o,1);if(i.deleted)return null;let a=t.mapResult(n.to+o,-1);return a.deleted||a.pos<=i.pos?null:new Kn(i.pos-r,a.pos-r,this)}valid(t,n){let{index:r,offset:o}=t.content.findIndex(n.from),i;return o==n.from&&!(i=t.child(r)).isText&&o+i.nodeSize==n.to}eq(t){return this==t||t instanceof Tm&&Qs(this.attrs,t.attrs)&&Qs(this.spec,t.spec)}destroy(){}}class Kn{constructor(t,n,r){this.from=t,this.to=n,this.type=r}copy(t,n){return new Kn(t,n,this.type)}eq(t,n=0){return this.type.eq(t.type)&&this.from+n==t.from&&this.to+n==t.to}map(t,n,r){return this.type.map(t,this,n,r)}static widget(t,n,r){return new Kn(t,t,new eu(n,r))}static inline(t,n,r,o){return new Kn(t,n,new fi(r,o))}static node(t,n,r,o){return new Kn(t,n,new Tm(r,o))}get spec(){return this.type.spec}get inline(){return this.type instanceof fi}get widget(){return this.type instanceof eu}}const Ca=[],Hi={};class mn{constructor(t,n){this.local=t.length?t:Ca,this.children=n.length?n:Ca}static create(t,n){return n.length?tu(n,t,0,Hi):tr}find(t,n,r){let o=[];return this.findInner(t??0,n??1e9,o,0,r),o}findInner(t,n,r,o,i){for(let a=0;a<this.local.length;a++){let s=this.local[a];s.from<=n&&s.to>=t&&(!i||i(s.spec))&&r.push(s.copy(s.from+o,s.to+o))}for(let a=0;a<this.children.length;a+=3)if(this.children[a]<n&&this.children[a+1]>t){let s=this.children[a]+1;this.children[a+2].findInner(t-s,n-s,r,o+s,i)}}map(t,n,r){return this==tr||t.maps.length==0?this:this.mapInner(t,n,0,0,r||Hi)}mapInner(t,n,r,o,i){let a;for(let s=0;s<this.local.length;s++){let l=this.local[s].map(t,r,o);l&&l.type.valid(n,l)?(a||(a=[])).push(l):i.onRemove&&i.onRemove(this.local[s].spec)}return this.children.length?vR(this.children,a||[],t,n,r,o,i):a?new mn(a.sort(Vi),Ca):tr}add(t,n){return n.length?this==tr?mn.create(t,n):this.addInner(t,n,0):this}addInner(t,n,r){let o,i=0;t.forEach((s,l)=>{let c=l+r,u;if(u=fx(n,s,c)){for(o||(o=this.children.slice());i<o.length&&o[i]<l;)i+=3;o[i]==l?o[i+2]=o[i+2].addInner(s,u,c+1):o.splice(i,0,l,l+s.nodeSize,tu(u,s,c+1,Hi)),i+=3}});let a=dx(i?hx(n):n,-r);for(let s=0;s<a.length;s++)a[s].type.valid(t,a[s])||a.splice(s--,1);return new mn(a.length?this.local.concat(a).sort(Vi):this.local,o||this.children)}remove(t){return t.length==0||this==tr?this:this.removeInner(t,0)}removeInner(t,n){let r=this.children,o=this.local;for(let i=0;i<r.length;i+=3){let a,s=r[i]+n,l=r[i+1]+n;for(let u=0,d;u<t.length;u++)(d=t[u])&&d.from>s&&d.to<l&&(t[u]=null,(a||(a=[])).push(d));if(!a)continue;r==this.children&&(r=this.children.slice());let c=r[i+2].removeInner(a,s+1);c!=tr?r[i+2]=c:(r.splice(i,3),i-=3)}if(o.length){for(let i=0,a;i<t.length;i++)if(a=t[i])for(let s=0;s<o.length;s++)o[s].eq(a,n)&&(o==this.local&&(o=this.local.slice()),o.splice(s--,1))}return r==this.children&&o==this.local?this:o.length||r.length?new mn(o,r):tr}forChild(t,n){if(this==tr)return this;if(n.isLeaf)return mn.empty;let r,o;for(let s=0;s<this.children.length;s+=3)if(this.children[s]>=t){this.children[s]==t&&(r=this.children[s+2]);break}let i=t+1,a=i+n.content.size;for(let s=0;s<this.local.length;s++){let l=this.local[s];if(l.from<a&&l.to>i&&l.type instanceof fi){let c=Math.max(i,l.from)-i,u=Math.min(a,l.to)-i;c<u&&(o||(o=[])).push(l.copy(c,u))}}if(o){let s=new mn(o.sort(Vi),Ca);return r?new Zo([s,r]):s}return r||tr}eq(t){if(this==t)return!0;if(!(t instanceof mn)||this.local.length!=t.local.length||this.children.length!=t.children.length)return!1;for(let n=0;n<this.local.length;n++)if(!this.local[n].eq(t.local[n]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=t.children[n]||this.children[n+1]!=t.children[n+1]||!this.children[n+2].eq(t.children[n+2]))return!1;return!0}locals(t){return Am(this.localsInner(t))}localsInner(t){if(this==tr)return Ca;if(t.inlineContent||!this.local.some(fi.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof fi||n.push(this.local[r]);return n}forEachSet(t){t(this)}}mn.empty=new mn([],[]);mn.removeOverlap=Am;const tr=mn.empty;class Zo{constructor(t){this.members=t}map(t,n){const r=this.members.map(o=>o.map(t,n,Hi));return Zo.from(r)}forChild(t,n){if(n.isLeaf)return mn.empty;let r=[];for(let o=0;o<this.members.length;o++){let i=this.members[o].forChild(t,n);i!=tr&&(i instanceof Zo?r=r.concat(i.members):r.push(i))}return Zo.from(r)}eq(t){if(!(t instanceof Zo)||t.members.length!=this.members.length)return!1;for(let n=0;n<this.members.length;n++)if(!this.members[n].eq(t.members[n]))return!1;return!0}locals(t){let n,r=!0;for(let o=0;o<this.members.length;o++){let i=this.members[o].localsInner(t);if(i.length)if(!n)n=i;else{r&&(n=n.slice(),r=!1);for(let a=0;a<i.length;a++)n.push(i[a])}}return n?Am(r?n:n.sort(Vi)):Ca}static from(t){switch(t.length){case 0:return tr;case 1:return t[0];default:return new Zo(t.every(n=>n instanceof mn)?t:t.reduce((n,r)=>n.concat(r instanceof mn?r:r.members),[]))}}forEachSet(t){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(t)}}function vR(e,t,n,r,o,i,a){let s=e.slice();for(let c=0,u=i;c<n.maps.length;c++){let d=0;n.maps[c].forEach((f,h,m,v)=>{let g=v-m-(h-f);for(let y=0;y<s.length;y+=3){let b=s[y+1];if(b<0||f>b+u-d)continue;let C=s[y]+u-d;h>=C?s[y+1]=f<=C?-2:-1:f>=u&&g&&(s[y]+=g,s[y+1]+=g)}d+=g}),u=n.maps[c].map(u,-1)}let l=!1;for(let c=0;c<s.length;c+=3)if(s[c+1]<0){if(s[c+1]==-2){l=!0,s[c+1]=-1;continue}let u=n.map(e[c]+i),d=u-o;if(d<0||d>=r.content.size){l=!0;continue}let f=n.map(e[c+1]+i,-1),h=f-o,{index:m,offset:v}=r.content.findIndex(d),g=r.maybeChild(m);if(g&&v==d&&v+g.nodeSize==h){let y=s[c+2].mapInner(n,g,u+1,e[c]+i+1,a);y!=tr?(s[c]=d,s[c+1]=h,s[c+2]=y):(s[c+1]=-2,l=!0)}else l=!0}if(l){let c=bR(s,e,t,n,o,i,a),u=tu(c,r,0,a);t=u.local;for(let d=0;d<s.length;d+=3)s[d+1]<0&&(s.splice(d,3),d-=3);for(let d=0,f=0;d<u.children.length;d+=3){let h=u.children[d];for(;f<s.length&&s[f]<h;)f+=3;s.splice(f,0,u.children[d],u.children[d+1],u.children[d+2])}}return new mn(t.sort(Vi),s)}function dx(e,t){if(!t||!e.length)return e;let n=[];for(let r=0;r<e.length;r++){let o=e[r];n.push(new Kn(o.from+t,o.to+t,o.type))}return n}function bR(e,t,n,r,o,i,a){function s(l,c){for(let u=0;u<l.local.length;u++){let d=l.local[u].map(r,o,c);d?n.push(d):a.onRemove&&a.onRemove(l.local[u].spec)}for(let u=0;u<l.children.length;u+=3)s(l.children[u+2],l.children[u]+c+1)}for(let l=0;l<e.length;l+=3)e[l+1]==-1&&s(e[l+2],t[l]+i+1);return n}function fx(e,t,n){if(t.isLeaf)return null;let r=n+t.nodeSize,o=null;for(let i=0,a;i<e.length;i++)(a=e[i])&&a.from>n&&a.to<r&&((o||(o=[])).push(a),e[i]=null);return o}function hx(e){let t=[];for(let n=0;n<e.length;n++)e[n]!=null&&t.push(e[n]);return t}function tu(e,t,n,r){let o=[],i=!1;t.forEach((s,l)=>{let c=fx(e,s,l+n);if(c){i=!0;let u=tu(c,s,n+l+1,r);u!=tr&&o.push(l,l+s.nodeSize,u)}});let a=dx(i?hx(e):e,-n).sort(Vi);for(let s=0;s<a.length;s++)a[s].type.valid(t,a[s])||(r.onRemove&&r.onRemove(a[s].spec),a.splice(s--,1));return a.length||o.length?new mn(a,o):tr}function Vi(e,t){return e.from-t.from||e.to-t.to}function Am(e){let t=e;for(let n=0;n<t.length-1;n++){let r=t[n];if(r.from!=r.to)for(let o=n+1;o<t.length;o++){let i=t[o];if(i.from==r.from){i.to!=r.to&&(t==e&&(t=e.slice()),t[o]=i.copy(i.from,r.to),ab(t,o+1,i.copy(r.to,i.to)));continue}else{i.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,i.from),ab(t,o,r.copy(i.from,r.to)));break}}}return t}function ab(e,t,n){for(;t<e.length&&Vi(n,e[t])>0;)t++;e.splice(t,0,n)}function cf(e){let t=[];return e.someProp("decorations",n=>{let r=n(e.state);r&&r!=tr&&t.push(r)}),e.cursorWrapper&&t.push(mn.create(e.state.doc,[e.cursorWrapper.deco])),Zo.from(t)}const yR={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},CR=vr&&ui<=11;class SR{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset}}class xR{constructor(t,n){this.view=t,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new SR,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let o=0;o<r.length;o++)this.queue.push(r[o]);vr&&ui<=11&&r.some(o=>o.type=="childList"&&o.removedNodes.length||o.type=="characterData"&&o.oldValue.length>o.target.nodeValue.length)?this.flushSoon():this.flush()}),CR&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,yR)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let t=this.observer.takeRecords();if(t.length){for(let n=0;n<t.length;n++)this.queue.push(t[n]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(Qv(this.view)){if(this.suppressingSelectionUpdates)return Do(this.view);if(vr&&ui<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&Xi(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(t){if(!t.focusNode)return!0;let n=new Set,r;for(let i=t.focusNode;i;i=_a(i))n.add(i);for(let i=t.anchorNode;i;i=_a(i))if(n.has(i)){r=i;break}let o=r&&this.view.docView.nearestDesc(r);if(o&&o.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}flush(){let{view:t}=this;if(!t.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=t.domSelectionRange(),o=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&Qv(t)&&!this.ignoreSelectionChange(r),i=-1,a=-1,s=!1,l=[];if(t.editable)for(let u=0;u<n.length;u++){let d=this.registerMutation(n[u],l);d&&(i=i<0?d.from:Math.min(d.from,i),a=a<0?d.to:Math.max(d.to,a),d.typeOver&&(s=!0))}if(Zr&&l.length){let u=l.filter(d=>d.nodeName=="BR");if(u.length==2){let[d,f]=u;d.parentNode&&d.parentNode.parentNode==f.parentNode?f.remove():d.remove()}else{let{focusNode:d}=this.currentSelection;for(let f of u){let h=f.parentNode;h&&h.nodeName=="LI"&&(!d||OR(t,d)!=h)&&f.remove()}}}let c=null;i<0&&o&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)<Date.now()-300&&nd(r)&&(c=Om(t))&&c.eq(xt.near(t.state.doc.resolve(0),1))?(t.input.lastFocus=0,Do(t),this.currentSelection.set(r),t.scrollToSelection()):(i>-1||o)&&(i>-1&&(t.docView.markDirty(i,a),wR(t)),this.handleDOMChange(i,a,s,l),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(r)||Do(t),this.currentSelection.set(r))}registerMutation(t,n){if(n.indexOf(t.target)>-1)return null;let r=this.view.docView.nearestDesc(t.target);if(t.type=="attributes"&&(r==this.view.docView||t.attributeName=="contenteditable"||t.attributeName=="style"&&!t.oldValue&&!t.target.getAttribute("style"))||!r||r.ignoreMutation(t))return null;if(t.type=="childList"){for(let u=0;u<t.addedNodes.length;u++){let d=t.addedNodes[u];n.push(d),d.nodeType==3&&(this.lastChangedTextNode=d)}if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(t.target))return{from:r.posBefore,to:r.posAfter};let o=t.previousSibling,i=t.nextSibling;if(vr&&ui<=11&&t.addedNodes.length)for(let u=0;u<t.addedNodes.length;u++){let{previousSibling:d,nextSibling:f}=t.addedNodes[u];(!d||Array.prototype.indexOf.call(t.addedNodes,d)<0)&&(o=d),(!f||Array.prototype.indexOf.call(t.addedNodes,f)<0)&&(i=f)}let a=o&&o.parentNode==t.target?Qn(o)+1:0,s=r.localPosFromDOM(t.target,a,-1),l=i&&i.parentNode==t.target?Qn(i):t.target.childNodes.length,c=r.localPosFromDOM(t.target,l,1);return{from:s,to:c}}else return t.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:(this.lastChangedTextNode=t.target,{from:r.posAtStart,to:r.posAtEnd,typeOver:t.target.nodeValue==t.oldValue})}}let sb=new WeakMap,lb=!1;function wR(e){if(!sb.has(e)&&(sb.set(e,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(e.dom).whiteSpace)!==-1)){if(e.requiresGeckoHackNode=Zr,lb)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),lb=!0}}function cb(e,t){let n=t.startContainer,r=t.startOffset,o=t.endContainer,i=t.endOffset,a=e.domAtPos(e.state.selection.anchor);return Xi(a.node,a.offset,o,i)&&([n,r,o,i]=[o,i,n,r]),{anchorNode:n,anchorOffset:r,focusNode:o,focusOffset:i}}function ER(e,t){if(t.getComposedRanges){let o=t.getComposedRanges(e.root)[0];if(o)return cb(e,o)}let n;function r(o){o.preventDefault(),o.stopImmediatePropagation(),n=o.getTargetRanges()[0]}return e.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),e.dom.removeEventListener("beforeinput",r,!0),n?cb(e,n):null}function OR(e,t){for(let n=t.parentNode;n&&n!=e.dom;n=n.parentNode){let r=e.docView.nearestDesc(n,!0);if(r&&r.node.isBlock)return n}return null}function $R(e,t,n){let{node:r,fromOffset:o,toOffset:i,from:a,to:s}=e.docView.parseRange(t,n),l=e.domSelectionRange(),c,u=l.anchorNode;if(u&&e.dom.contains(u.nodeType==1?u:u.parentNode)&&(c=[{node:u,offset:l.anchorOffset}],nd(l)||c.push({node:l.focusNode,offset:l.focusOffset})),rr&&e.input.lastKeyCode===8)for(let g=i;g>o;g--){let y=r.childNodes[g-1],b=y.pmViewDesc;if(y.nodeName=="BR"&&!b){i=g;break}if(!b||b.size)break}let d=e.state.doc,f=e.someProp("domParser")||As.fromSchema(e.state.schema),h=d.resolve(a),m=null,v=f.parse(r,{topNode:h.parent,topMatch:h.parent.contentMatchAt(h.index()),topOpen:!0,from:o,to:i,preserveWhitespace:h.parent.type.whitespace=="pre"?"full":!0,findPositions:c,ruleFromNode:NR,context:h});if(c&&c[0].pos!=null){let g=c[0].pos,y=c[1]&&c[1].pos;y==null&&(y=g),m={anchor:g+a,head:y+a}}return{doc:v,sel:m,from:a,to:s}}function NR(e){let t=e.pmViewDesc;if(t)return t.parseRule();if(e.nodeName=="BR"&&e.parentNode){if(cr&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(e.parentNode.lastChild==e||cr&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if(e.nodeName=="IMG"&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}const MR=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function RR(e,t,n,r,o){let i=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let $=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,M=Om(e,$);if(M&&!e.state.selection.eq(M)){if(rr&&Ao&&e.input.lastKeyCode===13&&Date.now()-100<e.input.lastKeyCodeTime&&e.someProp("handleKeyDown",k=>k(e,Ri(13,"Enter"))))return;let R=e.state.tr.setSelection(M);$=="pointer"?R.setMeta("pointer",!0):$=="key"&&R.scrollIntoView(),i&&R.setMeta("composition",i),e.dispatch(R)}return}let a=e.state.doc.resolve(t),s=a.sharedDepth(n);t=a.before(s+1),n=e.state.doc.resolve(n).after(s+1);let l=e.state.selection,c=$R(e,t,n),u=e.state.doc,d=u.slice(c.from,c.to),f,h;e.input.lastKeyCode===8&&Date.now()-100<e.input.lastKeyCodeTime?(f=e.state.selection.to,h="end"):(f=e.state.selection.from,h="start"),e.input.lastKeyCode=null;let m=AR(d.content,c.doc.content,c.from,f,h);if(m&&e.input.domChangeCount++,(La&&e.input.lastIOSEnter>Date.now()-225||Ao)&&o.some($=>$.nodeType==1&&!MR.test($.nodeName))&&(!m||m.endA>=m.endB)&&e.someProp("handleKeyDown",$=>$(e,Ri(13,"Enter")))){e.input.lastIOSEnter=0;return}if(!m)if(r&&l instanceof Ct&&!l.empty&&l.$head.sameParent(l.$anchor)&&!e.composing&&!(c.sel&&c.sel.anchor!=c.sel.head))m={start:l.from,endA:l.to,endB:l.to};else{if(c.sel){let $=ub(e,e.state.doc,c.sel);if($&&!$.eq(e.state.selection)){let M=e.state.tr.setSelection($);i&&M.setMeta("composition",i),e.dispatch(M)}}return}e.state.selection.from<e.state.selection.to&&m.start==m.endB&&e.state.selection instanceof Ct&&(m.start>e.state.selection.from&&m.start<=e.state.selection.from+2&&e.state.selection.from>=c.from?m.start=e.state.selection.from:m.endA<e.state.selection.to&&m.endA>=e.state.selection.to-2&&e.state.selection.to<=c.to&&(m.endB+=e.state.selection.to-m.endA,m.endA=e.state.selection.to)),vr&&ui<=11&&m.endB==m.start+1&&m.endA==m.start&&m.start>c.from&&c.doc.textBetween(m.start-c.from-1,m.start-c.from+1)=="  "&&(m.start--,m.endA--,m.endB--);let v=c.doc.resolveNoCache(m.start-c.from),g=c.doc.resolveNoCache(m.endB-c.from),y=u.resolve(m.start),b=v.sameParent(g)&&v.parent.inlineContent&&y.end()>=m.endA,C;if((La&&e.input.lastIOSEnter>Date.now()-225&&(!b||o.some($=>$.nodeName=="DIV"||$.nodeName=="P"))||!b&&v.pos<c.doc.content.size&&!v.sameParent(g)&&(C=xt.findFrom(c.doc.resolve(v.pos+1),1,!0))&&C.head==g.pos)&&e.someProp("handleKeyDown",$=>$(e,Ri(13,"Enter")))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>m.start&&TR(u,m.start,m.endA,v,g)&&e.someProp("handleKeyDown",$=>$(e,Ri(8,"Backspace")))){Ao&&rr&&e.domObserver.suppressSelectionUpdates();return}rr&&m.endB==m.start&&(e.input.lastChromeDelete=Date.now()),Ao&&!b&&v.start()!=g.start()&&g.parentOffset==0&&v.depth==g.depth&&c.sel&&c.sel.anchor==c.sel.head&&c.sel.head==m.endA&&(m.endB-=2,g=c.doc.resolveNoCache(m.endB-c.from),setTimeout(()=>{e.someProp("handleKeyDown",function($){return $(e,Ri(13,"Enter"))})},20));let x=m.start,S=m.endA,w,E,N;if(b){if(v.pos==g.pos)vr&&ui<=11&&v.parentOffset==0&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>Do(e),20)),w=e.state.tr.delete(x,S),E=u.resolve(m.start).marksAcross(u.resolve(m.endA));else if(m.endA==m.endB&&(N=IR(v.parent.content.cut(v.parentOffset,g.parentOffset),y.parent.content.cut(y.parentOffset,m.endA-y.start()))))w=e.state.tr,N.type=="add"?w.addMark(x,S,N.mark):w.removeMark(x,S,N.mark);else if(v.parent.child(v.index()).isText&&v.index()==g.index()-(g.textOffset?0:1)){let $=v.parent.textBetween(v.parentOffset,g.parentOffset);if(e.someProp("handleTextInput",M=>M(e,x,S,$)))return;w=e.state.tr.insertText($,x,S)}}if(w||(w=e.state.tr.replace(x,S,c.doc.slice(m.start-c.from,m.endB-c.from))),c.sel){let $=ub(e,w.doc,c.sel);$&&!(rr&&e.composing&&$.empty&&(m.start!=m.endB||e.input.lastChromeDelete<Date.now()-100)&&($.head==x||$.head==w.mapping.map(S)-1)||vr&&$.empty&&$.head==x)&&w.setSelection($)}E&&w.ensureMarks(E),i&&w.setMeta("composition",i),e.dispatch(w.scrollIntoView())}function ub(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:$m(e,t.resolve(n.anchor),t.resolve(n.head))}function IR(e,t){let n=e.firstChild.marks,r=t.firstChild.marks,o=n,i=r,a,s,l;for(let u=0;u<r.length;u++)o=r[u].removeFromSet(o);for(let u=0;u<n.length;u++)i=n[u].removeFromSet(i);if(o.length==1&&i.length==0)s=o[0],a="add",l=u=>u.mark(s.addToSet(u.marks));else if(o.length==0&&i.length==1)s=i[0],a="remove",l=u=>u.mark(s.removeFromSet(u.marks));else return null;let c=[];for(let u=0;u<t.childCount;u++)c.push(l(t.child(u)));if(Ae.from(c).eq(e))return{mark:s,type:a}}function TR(e,t,n,r,o){if(n-t<=o.pos-r.pos||uf(r,!0,!1)<o.pos)return!1;let i=e.resolve(t);if(!r.parent.isTextblock){let s=i.nodeAfter;return s!=null&&n==t+s.nodeSize}if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;let a=e.resolve(uf(i,!0,!0));return!a.parent.isTextblock||a.pos>n||uf(a,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(a.parent.content)}function uf(e,t,n){let r=e.depth,o=t?e.end():e.pos;for(;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,o++,t=!1;if(n){let i=e.node(r).maybeChild(e.indexAfter(r));for(;i&&!i.isLeaf;)i=i.firstChild,o++}return o}function AR(e,t,n,r,o){let i=e.findDiffStart(t,n);if(i==null)return null;let{a,b:s}=e.findDiffEnd(t,n+e.size,n+t.size);if(o=="end"){let l=Math.max(0,i-Math.min(a,s));r-=a+l-i}if(a<i&&e.size<t.size){let l=r<=i&&r>=a?i-r:0;i-=l,i&&i<t.size&&db(t.textBetween(i-1,i+1))&&(i+=l?1:-1),s=i+(s-a),a=i}else if(s<i){let l=r<=i&&r>=s?i-r:0;i-=l,i&&i<e.size&&db(e.textBetween(i-1,i+1))&&(i+=l?1:-1),a=i+(a-s),s=i}return{start:i,endA:a,endB:s}}function db(e){if(e.length!=2)return!1;let t=e.charCodeAt(0),n=e.charCodeAt(1);return t>=56320&&t<=57343&&n>=55296&&n<=56319}class PR{constructor(t,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new QM,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(gb),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):typeof t=="function"?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=pb(this),hb(this),this.nodeViews=mb(this),this.docView=qv(this.state.doc,fb(this),cf(this),this.dom,this),this.domObserver=new xR(this,(r,o,i,a)=>RR(this,r,o,i,a)),this.domObserver.start(),ZM(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let t=this._props;this._props={};for(let n in t)this._props[n]=t[n];this._props.state=this.state}return this._props}update(t){t.handleDOMEvents!=this._props.handleDOMEvents&&Dh(this);let n=this._props;this._props=t,t.plugins&&(t.plugins.forEach(gb),this.directPlugins=t.plugins),this.updateStateInner(t.state,n)}setProps(t){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in t)n[r]=t[r];this.update(n)}updateState(t){this.updateStateInner(t,this._props)}updateStateInner(t,n){var r;let o=this.state,i=!1,a=!1;t.storedMarks&&this.composing&&(sx(this),a=!0),this.state=t;let s=o.plugins!=t.plugins||this._props.plugins!=n.plugins;if(s||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let h=mb(this);DR(h,this.nodeViews)&&(this.nodeViews=h,i=!0)}(s||n.handleDOMEvents!=this._props.handleDOMEvents)&&Dh(this),this.editable=pb(this),hb(this);let l=cf(this),c=fb(this),u=o.plugins!=t.plugins&&!o.doc.eq(t.doc)?"reset":t.scrollToSelection>o.scrollToSelection?"to selection":"preserve",d=i||!this.docView.matchesNode(t.doc,c,l);(d||!t.selection.eq(o.selection))&&(a=!0);let f=u=="preserve"&&a&&this.dom.style.overflowAnchor==null&&hM(this);if(a){this.domObserver.stop();let h=d&&(vr||rr)&&!this.composing&&!o.selection.empty&&!t.selection.empty&&kR(o.selection,t.selection);if(d){let m=rr?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=fR(this)),(i||!this.docView.update(t.doc,c,l,this))&&(this.docView.updateOuterDeco(c),this.docView.destroy(),this.docView=qv(t.doc,c,l,this.dom,this)),m&&!this.trackWrites&&(h=!0)}h||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&LM(this))?Do(this,h):(XS(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(o),!((r=this.dragging)===null||r===void 0)&&r.node&&!o.doc.eq(t.doc)&&this.updateDraggedNode(this.dragging,o),u=="reset"?this.dom.scrollTop=0:u=="to selection"?this.scrollToSelection():f&&pM(f)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(!(!t||!this.dom.contains(t.nodeType==1?t:t.parentNode))){if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof yt){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&zv(this,n.getBoundingClientRect(),t)}else zv(this,this.coordsAtPos(this.state.selection.head,1),t)}}destroyPluginViews(){let t;for(;t=this.pluginViews.pop();)t.destroy&&t.destroy()}updatePluginViews(t){if(!t||t.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n<this.directPlugins.length;n++){let r=this.directPlugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}for(let n=0;n<this.state.plugins.length;n++){let r=this.state.plugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}}else for(let n=0;n<this.pluginViews.length;n++){let r=this.pluginViews[n];r.update&&r.update(this,t)}}updateDraggedNode(t,n){let r=t.node,o=-1;if(this.state.doc.nodeAt(r.from)==r.node)o=r.from;else{let i=r.from+(this.state.doc.content.size-n.doc.content.size);(i>0&&this.state.doc.nodeAt(i))==r.node&&(o=i)}this.dragging=new cx(t.slice,t.move,o<0?void 0:yt.create(this.state.doc,o))}someProp(t,n){let r=this._props&&this._props[t],o;if(r!=null&&(o=n?n(r):r))return o;for(let a=0;a<this.directPlugins.length;a++){let s=this.directPlugins[a].props[t];if(s!=null&&(o=n?n(s):s))return o}let i=this.state.plugins;if(i)for(let a=0;a<i.length;a++){let s=i[a].props[t];if(s!=null&&(o=n?n(s):s))return o}}hasFocus(){if(vr){let t=this.root.activeElement;if(t==this.dom)return!0;if(!t||!this.dom.contains(t))return!1;for(;t&&this.dom!=t&&this.dom.contains(t);){if(t.contentEditable=="false")return!1;t=t.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&mM(this.dom),Do(this),this.domObserver.start()}get root(){let t=this._root;if(t==null){for(let n=this.dom.parentNode;n;n=n.parentNode)if(n.nodeType==9||n.nodeType==11&&n.host)return n.getSelection||(Object.getPrototypeOf(n).getSelection=()=>n.ownerDocument.getSelection()),this._root=n}return t||document}updateRoot(){this._root=null}posAtCoords(t){return CM(this,t)}coordsAtPos(t,n=1){return FS(this,t,n)}domAtPos(t,n=0){return this.docView.domFromPos(t,n)}nodeDOM(t){let n=this.docView.descAt(t);return n?n.nodeDOM:null}posAtDOM(t,n,r=-1){let o=this.docView.posFromDOM(t,n,r);if(o==null)throw new RangeError("DOM position not inside the editor");return o}endOfTextblock(t,n){return OM(this,n||this.state,t)}pasteHTML(t,n){return Js(this,"",t,!1,n||new ClipboardEvent("paste"))}pasteText(t,n){return Js(this,t,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(t){return Nm(this,t)}destroy(){this.docView&&(eR(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],cf(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,nM())}get isDestroyed(){return this.docView==null}dispatchEvent(t){return nR(this,t)}dispatch(t){let n=this._props.dispatchTransaction;n?n.call(this,t):this.updateState(this.state.apply(t))}domSelectionRange(){let t=this.domSelection();return t?cr&&this.root.nodeType===11&&sM(this.dom.ownerDocument)==this.dom&&ER(this,t)||t:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function fb(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),e.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(e.state)),n)for(let r in n)r=="class"?t.class+=" "+n[r]:r=="style"?t.style=(t.style?t.style+";":"")+n[r]:!t[r]&&r!="contenteditable"&&r!="nodeName"&&(t[r]=String(n[r]))}),t.translate||(t.translate="no"),[Kn.node(0,e.state.doc.content.size,t)]}function hb(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:Kn.widget(e.state.selection.from,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function pb(e){return!e.someProp("editable",t=>t(e.state)===!1)}function kR(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}function mb(e){let t=Object.create(null);function n(r){for(let o in r)Object.prototype.hasOwnProperty.call(t,o)||(t[o]=r[o])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function DR(e,t){let n=0,r=0;for(let o in e){if(e[o]!=t[o])return!0;n++}for(let o in t)r++;return n!=r}function gb(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var pi={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},nu={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},_R=typeof navigator<"u"&&/Mac/.test(navigator.platform),LR=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Zn=0;Zn<10;Zn++)pi[48+Zn]=pi[96+Zn]=String(Zn);for(var Zn=1;Zn<=24;Zn++)pi[Zn+111]="F"+Zn;for(var Zn=65;Zn<=90;Zn++)pi[Zn]=String.fromCharCode(Zn+32),nu[Zn]=String.fromCharCode(Zn);for(var df in pi)nu.hasOwnProperty(df)||(nu[df]=pi[df]);function jR(e){var t=_R&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||LR&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",n=!t&&e.key||(e.shiftKey?nu:pi)[e.keyCode]||e.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}const BR=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function zR(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n=="Space"&&(n=" ");let r,o,i,a;for(let s=0;s<t.length-1;s++){let l=t[s];if(/^(cmd|meta|m)$/i.test(l))a=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))o=!0;else if(/^s(hift)?$/i.test(l))i=!0;else if(/^mod$/i.test(l))BR?a=!0:o=!0;else throw new Error("Unrecognized modifier name: "+l)}return r&&(n="Alt-"+n),o&&(n="Ctrl-"+n),a&&(n="Meta-"+n),i&&(n="Shift-"+n),n}function FR(e){let t=Object.create(null);for(let n in e)t[zR(n)]=e[n];return t}function ff(e,t,n=!0){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),n&&t.shiftKey&&(e="Shift-"+e),e}function HR(e){return new xn({props:{handleKeyDown:Pm(e)}})}function Pm(e){let t=FR(e);return function(n,r){let o=jR(r),i,a=t[ff(o,r)];if(a&&a(n.state,n.dispatch,n))return!0;if(o.length==1&&o!=" "){if(r.shiftKey){let s=t[ff(o,r,!1)];if(s&&s(n.state,n.dispatch,n))return!0}if((r.shiftKey||r.altKey||r.metaKey||o.charCodeAt(0)>127)&&(i=pi[r.keyCode])&&i!=o){let s=t[ff(i,r)];if(s&&s(n.state,n.dispatch,n))return!0}}return!1}}const km=(e,t)=>e.selection.empty?!1:(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function px(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("backward",e):n.parentOffset>0)?null:n}const mx=(e,t,n)=>{let r=px(e,n);if(!r)return!1;let o=Dm(r);if(!o){let a=r.blockRange(),s=a&&Ja(a);return s==null?!1:(t&&t(e.tr.lift(a,s).scrollIntoView()),!0)}let i=o.nodeBefore;if(Ex(e,o,t,-1))return!0;if(r.parent.content.size==0&&(ja(i,"end")||yt.isSelectable(i)))for(let a=r.depth;;a--){let s=ed(e.doc,r.before(a),r.after(a),nt.empty);if(s&&s.slice.size<s.to-s.from){if(t){let l=e.tr.step(s);l.setSelection(ja(i,"end")?xt.findFrom(l.doc.resolve(l.mapping.map(o.pos,-1)),-1):yt.create(l.doc,o.pos-i.nodeSize)),t(l.scrollIntoView())}return!0}if(a==1||r.node(a-1).childCount>1)break}return i.isAtom&&o.depth==r.depth-1?(t&&t(e.tr.delete(o.pos-i.nodeSize,o.pos).scrollIntoView()),!0):!1},VR=(e,t,n)=>{let r=px(e,n);if(!r)return!1;let o=Dm(r);return o?gx(e,o,t):!1},WR=(e,t,n)=>{let r=bx(e,n);if(!r)return!1;let o=_m(r);return o?gx(e,o,t):!1};function gx(e,t,n){let r=t.nodeBefore,o=r,i=t.pos-1;for(;!o.isTextblock;i--){if(o.type.spec.isolating)return!1;let u=o.lastChild;if(!u)return!1;o=u}let a=t.nodeAfter,s=a,l=t.pos+1;for(;!s.isTextblock;l++){if(s.type.spec.isolating)return!1;let u=s.firstChild;if(!u)return!1;s=u}let c=ed(e.doc,i,l,nt.empty);if(!c||c.from!=i||c instanceof qn&&c.slice.size>=l-i)return!1;if(n){let u=e.tr.step(c);u.setSelection(Ct.create(u.doc,i)),n(u.scrollIntoView())}return!0}function ja(e,t,n=!1){for(let r=e;r;r=t=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}const vx=(e,t,n)=>{let{$head:r,empty:o}=e.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;i=Dm(r)}let a=i&&i.nodeBefore;return!a||!yt.isSelectable(a)?!1:(t&&t(e.tr.setSelection(yt.create(e.doc,i.pos-a.nodeSize)).scrollIntoView()),!0)};function Dm(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function bx(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("forward",e):n.parentOffset<n.parent.content.size)?null:n}const yx=(e,t,n)=>{let r=bx(e,n);if(!r)return!1;let o=_m(r);if(!o)return!1;let i=o.nodeAfter;if(Ex(e,o,t,1))return!0;if(r.parent.content.size==0&&(ja(i,"start")||yt.isSelectable(i))){let a=ed(e.doc,r.before(),r.after(),nt.empty);if(a&&a.slice.size<a.to-a.from){if(t){let s=e.tr.step(a);s.setSelection(ja(i,"start")?xt.findFrom(s.doc.resolve(s.mapping.map(o.pos)),1):yt.create(s.doc,s.mapping.map(o.pos))),t(s.scrollIntoView())}return!0}}return i.isAtom&&o.depth==r.depth-1?(t&&t(e.tr.delete(o.pos,o.pos+i.nodeSize).scrollIntoView()),!0):!1},Cx=(e,t,n)=>{let{$head:r,empty:o}=e.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size)return!1;i=_m(r)}let a=i&&i.nodeAfter;return!a||!yt.isSelectable(a)?!1:(t&&t(e.tr.setSelection(yt.create(e.doc,i.pos)).scrollIntoView()),!0)};function _m(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}const UR=(e,t)=>{let n=e.selection,r=n instanceof yt,o;if(r){if(n.node.isTextblock||!yi(e.doc,n.from))return!1;o=n.from}else if(o=Zu(e.doc,n.from,-1),o==null)return!1;if(t){let i=e.tr.join(o);r&&i.setSelection(yt.create(i.doc,o-e.doc.resolve(o).nodeBefore.nodeSize)),t(i.scrollIntoView())}return!0},qR=(e,t)=>{let n=e.selection,r;if(n instanceof yt){if(n.node.isTextblock||!yi(e.doc,n.to))return!1;r=n.to}else if(r=Zu(e.doc,n.to,1),r==null)return!1;return t&&t(e.tr.join(r).scrollIntoView()),!0},KR=(e,t)=>{let{$from:n,$to:r}=e.selection,o=n.blockRange(r),i=o&&Ja(o);return i==null?!1:(t&&t(e.tr.lift(o,i).scrollIntoView()),!0)},Sx=(e,t)=>{let{$head:n,$anchor:r}=e.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(t&&t(e.tr.insertText(`
49
+ `).scrollIntoView()),!0)};function Lm(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const GR=(e,t)=>{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let o=n.node(-1),i=n.indexAfter(-1),a=Lm(o.contentMatchAt(i));if(!a||!o.canReplaceWith(i,i,a))return!1;if(t){let s=n.after(),l=e.tr.replaceWith(s,s,a.createAndFill());l.setSelection(xt.near(l.doc.resolve(s),1)),t(l.scrollIntoView())}return!0},xx=(e,t)=>{let n=e.selection,{$from:r,$to:o}=n;if(n instanceof $r||r.parent.inlineContent||o.parent.inlineContent)return!1;let i=Lm(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(t){let a=(!r.parentOffset&&o.index()<o.parent.childCount?r:o).pos,s=e.tr.insert(a,i.createAndFill());s.setSelection(Ct.create(s.doc,a+1)),t(s.scrollIntoView())}return!0},wx=(e,t)=>{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let i=n.before();if(ko(e.doc,i))return t&&t(e.tr.split(i).scrollIntoView()),!0}let r=n.blockRange(),o=r&&Ja(r);return o==null?!1:(t&&t(e.tr.lift(r,o).scrollIntoView()),!0)};function XR(e){return(t,n)=>{let{$from:r,$to:o}=t.selection;if(t.selection instanceof yt&&t.selection.node.isBlock)return!r.parentOffset||!ko(t.doc,r.pos)?!1:(n&&n(t.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let i=[],a,s,l=!1,c=!1;for(let h=r.depth;;h--)if(r.node(h).isBlock){l=r.end(h)==r.pos+(r.depth-h),c=r.start(h)==r.pos-(r.depth-h),s=Lm(r.node(h-1).contentMatchAt(r.indexAfter(h-1))),i.unshift(l&&s?{type:s}:null),a=h;break}else{if(h==1)return!1;i.unshift(null)}let u=t.tr;(t.selection instanceof Ct||t.selection instanceof $r)&&u.deleteSelection();let d=u.mapping.map(r.pos),f=ko(u.doc,d,i.length,i);if(f||(i[0]=s?{type:s}:null,f=ko(u.doc,d,i.length,i)),u.split(d,i.length,i),!l&&c&&r.node(a).type!=s){let h=u.mapping.map(r.before(a)),m=u.doc.resolve(h);s&&r.node(a-1).canReplaceWith(m.index(),m.index()+1,s)&&u.setNodeMarkup(u.mapping.map(r.before(a)),s)}return n&&n(u.scrollIntoView()),!0}}const YR=XR(),JR=(e,t)=>{let{$from:n,to:r}=e.selection,o,i=n.sharedDepth(r);return i==0?!1:(o=n.before(i),t&&t(e.tr.setSelection(yt.create(e.doc,o))),!0)};function QR(e,t,n){let r=t.nodeBefore,o=t.nodeAfter,i=t.index();return!r||!o||!r.type.compatibleContent(o.type)?!1:!r.content.size&&t.parent.canReplace(i-1,i)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(i,i+1)||!(o.isTextblock||yi(e.doc,t.pos))?!1:(n&&n(e.tr.join(t.pos).scrollIntoView()),!0)}function Ex(e,t,n,r){let o=t.nodeBefore,i=t.nodeAfter,a,s,l=o.type.spec.isolating||i.type.spec.isolating;if(!l&&QR(e,t,n))return!0;let c=!l&&t.parent.canReplace(t.index(),t.index()+1);if(c&&(a=(s=o.contentMatchAt(o.childCount)).findWrapping(i.type))&&s.matchType(a[0]||i.type).validEnd){if(n){let h=t.pos+i.nodeSize,m=Ae.empty;for(let y=a.length-1;y>=0;y--)m=Ae.from(a[y].create(null,m));m=Ae.from(o.copy(m));let v=e.tr.step(new Gn(t.pos-1,h,t.pos,h,new nt(m,1,0),a.length,!0)),g=v.doc.resolve(h+2*a.length);g.nodeAfter&&g.nodeAfter.type==o.type&&yi(v.doc,g.pos)&&v.join(g.pos),n(v.scrollIntoView())}return!0}let u=i.type.spec.isolating||r>0&&l?null:xt.findFrom(t,1),d=u&&u.$from.blockRange(u.$to),f=d&&Ja(d);if(f!=null&&f>=t.depth)return n&&n(e.tr.lift(d,f).scrollIntoView()),!0;if(c&&ja(i,"start",!0)&&ja(o,"end")){let h=o,m=[];for(;m.push(h),!h.isTextblock;)h=h.lastChild;let v=i,g=1;for(;!v.isTextblock;v=v.firstChild)g++;if(h.canReplace(h.childCount,h.childCount,v.content)){if(n){let y=Ae.empty;for(let C=m.length-1;C>=0;C--)y=Ae.from(m[C].copy(y));let b=e.tr.step(new Gn(t.pos-m.length,t.pos+i.nodeSize,t.pos+g,t.pos+i.nodeSize-g,new nt(y,m.length,0),0,!0));n(b.scrollIntoView())}return!0}}return!1}function Ox(e){return function(t,n){let r=t.selection,o=e<0?r.$from:r.$to,i=o.depth;for(;o.node(i).isInline;){if(!i)return!1;i--}return o.node(i).isTextblock?(n&&n(t.tr.setSelection(Ct.create(t.doc,e<0?o.start(i):o.end(i)))),!0):!1}}const ZR=Ox(-1),eI=Ox(1);function tI(e,t=null){return function(n,r){let{$from:o,$to:i}=n.selection,a=o.blockRange(i),s=a&&Sm(a,e,t);return s?(r&&r(n.tr.wrap(a,s).scrollIntoView()),!0):!1}}function vb(e,t=null){return function(n,r){let o=!1;for(let i=0;i<n.selection.ranges.length&&!o;i++){let{$from:{pos:a},$to:{pos:s}}=n.selection.ranges[i];n.doc.nodesBetween(a,s,(l,c)=>{if(o)return!1;if(!(!l.isTextblock||l.hasMarkup(e,t)))if(l.type==e)o=!0;else{let u=n.doc.resolve(c),d=u.index();o=u.parent.canReplaceWith(d,d+1,e)}})}if(!o)return!1;if(r){let i=n.tr;for(let a=0;a<n.selection.ranges.length;a++){let{$from:{pos:s},$to:{pos:l}}=n.selection.ranges[a];i.setBlockType(s,l,e,t)}r(i.scrollIntoView())}return!0}}function jm(...e){return function(t,n,r){for(let o=0;o<e.length;o++)if(e[o](t,n,r))return!0;return!1}}jm(km,mx,vx);jm(km,yx,Cx);jm(Sx,xx,wx,YR);typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function nI(e,t=null){return function(n,r){let{$from:o,$to:i}=n.selection,a=o.blockRange(i);if(!a)return!1;let s=r?n.tr:null;return rI(s,a,e,t)?(r&&r(s.scrollIntoView()),!0):!1}}function rI(e,t,n,r=null){let o=!1,i=t,a=t.$from.doc;if(t.depth>=2&&t.$from.node(t.depth-1).type.compatibleContent(n)&&t.startIndex==0){if(t.$from.index(t.depth-1)==0)return!1;let l=a.resolve(t.start-2);i=new Xc(l,l,t.depth),t.endIndex<t.parent.childCount&&(t=new Xc(t.$from,a.resolve(t.$to.end(t.depth)),t.depth)),o=!0}let s=Sm(i,n,r,t);return s?(e&&oI(e,t,s,o,n),!0):!1}function oI(e,t,n,r,o){let i=Ae.empty;for(let u=n.length-1;u>=0;u--)i=Ae.from(n[u].type.create(n[u].attrs,i));e.step(new Gn(t.start-(r?2:0),t.end,t.start,t.end,new nt(i,0,0),n.length,!0));let a=0;for(let u=0;u<n.length;u++)n[u].type==o&&(a=u+1);let s=n.length-a,l=t.start+n.length-(r?2:0),c=t.parent;for(let u=t.startIndex,d=t.endIndex,f=!0;u<d;u++,f=!1)!f&&ko(e.doc,l,s)&&(e.split(l,s),l+=2*s),l+=c.child(u).nodeSize;return e}function iI(e){return function(t,n){let{$from:r,$to:o}=t.selection,i=r.blockRange(o,a=>a.childCount>0&&a.firstChild.type==e);return i?n?r.node(i.depth-1).type==e?aI(t,n,e,i):sI(t,n,i):!0:!1}}function aI(e,t,n,r){let o=e.tr,i=r.end,a=r.$to.end(r.depth);i<a&&(o.step(new Gn(i-1,a,i,a,new nt(Ae.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new Xc(o.doc.resolve(r.$from.pos),o.doc.resolve(a),r.depth));const s=Ja(r);if(s==null)return!1;o.lift(r,s);let l=o.doc.resolve(o.mapping.map(i,-1)-1);return yi(o.doc,l.pos)&&l.nodeBefore.type==l.nodeAfter.type&&o.join(l.pos),t(o.scrollIntoView()),!0}function sI(e,t,n){let r=e.tr,o=n.parent;for(let h=n.end,m=n.endIndex-1,v=n.startIndex;m>v;m--)h-=o.child(m).nodeSize,r.delete(h-1,h+1);let i=r.doc.resolve(n.start),a=i.nodeAfter;if(r.mapping.map(n.end)!=n.start+i.nodeAfter.nodeSize)return!1;let s=n.startIndex==0,l=n.endIndex==o.childCount,c=i.node(-1),u=i.index(-1);if(!c.canReplace(u+(s?0:1),u+1,a.content.append(l?Ae.empty:Ae.from(o))))return!1;let d=i.pos,f=d+a.nodeSize;return r.step(new Gn(d-(s?1:0),f+(l?1:0),d+1,f-1,new nt((s?Ae.empty:Ae.from(o.copy(Ae.empty))).append(l?Ae.empty:Ae.from(o.copy(Ae.empty))),s?0:1,l?0:1),s?0:1)),t(r.scrollIntoView()),!0}function lI(e){return function(t,n){let{$from:r,$to:o}=t.selection,i=r.blockRange(o,c=>c.childCount>0&&c.firstChild.type==e);if(!i)return!1;let a=i.startIndex;if(a==0)return!1;let s=i.parent,l=s.child(a-1);if(l.type!=e)return!1;if(n){let c=l.lastChild&&l.lastChild.type==s.type,u=Ae.from(c?e.create():null),d=new nt(Ae.from(e.create(null,Ae.from(s.type.create(null,u)))),c?3:1,0),f=i.start,h=i.end;n(t.tr.step(new Gn(f-(c?3:1),h,f,h,d,1,!0)).scrollIntoView())}return!0}}function id(e){const{state:t,transaction:n}=e;let{selection:r}=n,{doc:o}=n,{storedMarks:i}=n;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return i},get selection(){return r},get doc(){return o},get tr(){return r=n.selection,o=n.doc,i=n.storedMarks,n}}}class ad{constructor(t){this.editor=t.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=t.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:t,editor:n,state:r}=this,{view:o}=n,{tr:i}=r,a=this.buildProps(i);return Object.fromEntries(Object.entries(t).map(([s,l])=>[s,(...u)=>{const d=l(...u)(a);return!i.getMeta("preventDispatch")&&!this.hasCustomState&&o.dispatch(i),d}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(t,n=!0){const{rawCommands:r,editor:o,state:i}=this,{view:a}=o,s=[],l=!!t,c=t||i.tr,u=()=>(!l&&n&&!c.getMeta("preventDispatch")&&!this.hasCustomState&&a.dispatch(c),s.every(f=>f===!0)),d={...Object.fromEntries(Object.entries(r).map(([f,h])=>[f,(...v)=>{const g=this.buildProps(c,n),y=h(...v)(g);return s.push(y),d}])),run:u};return d}createCan(t){const{rawCommands:n,state:r}=this,o=!1,i=t||r.tr,a=this.buildProps(i,o);return{...Object.fromEntries(Object.entries(n).map(([l,c])=>[l,(...u)=>c(...u)({...a,dispatch:void 0})])),chain:()=>this.createChain(i,o)}}buildProps(t,n=!0){const{rawCommands:r,editor:o,state:i}=this,{view:a}=o,s={tr:t,editor:o,view:a,state:id({state:i,transaction:t}),dispatch:n?()=>{}:void 0,chain:()=>this.createChain(t,n),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(r).map(([l,c])=>[l,(...u)=>c(...u)(s)]))}};return s}}class cI{constructor(){this.callbacks={}}on(t,n){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(n),this}emit(t,...n){const r=this.callbacks[t];return r&&r.forEach(o=>o.apply(this,n)),this}off(t,n){const r=this.callbacks[t];return r&&(n?this.callbacks[t]=r.filter(o=>o!==n):delete this.callbacks[t]),this}once(t,n){const r=(...o)=>{this.off(t,r),n.apply(this,o)};return this.on(t,r)}removeAllListeners(){this.callbacks={}}}function pt(e,t,n){return e.config[t]===void 0&&e.parent?pt(e.parent,t,n):typeof e.config[t]=="function"?e.config[t].bind({...n,parent:e.parent?pt(e.parent,t,n):null}):e.config[t]}function sd(e){const t=e.filter(o=>o.type==="extension"),n=e.filter(o=>o.type==="node"),r=e.filter(o=>o.type==="mark");return{baseExtensions:t,nodeExtensions:n,markExtensions:r}}function $x(e){const t=[],{nodeExtensions:n,markExtensions:r}=sd(e),o=[...n,...r],i={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return e.forEach(a=>{const s={name:a.name,options:a.options,storage:a.storage,extensions:o},l=pt(a,"addGlobalAttributes",s);if(!l)return;l().forEach(u=>{u.types.forEach(d=>{Object.entries(u.attributes).forEach(([f,h])=>{t.push({type:d,name:f,attribute:{...i,...h}})})})})}),o.forEach(a=>{const s={name:a.name,options:a.options,storage:a.storage},l=pt(a,"addAttributes",s);if(!l)return;const c=l();Object.entries(c).forEach(([u,d])=>{const f={...i,...d};typeof(f==null?void 0:f.default)=="function"&&(f.default=f.default()),f!=null&&f.isRequired&&(f==null?void 0:f.default)===void 0&&delete f.default,t.push({type:a.name,name:u,attribute:f})})}),t}function Yn(e,t){if(typeof e=="string"){if(!t.nodes[e])throw Error(`There is no node type named '${e}'. Maybe you forgot to add the extension?`);return t.nodes[e]}return e}function nn(...e){return e.filter(t=>!!t).reduce((t,n)=>{const r={...t};return Object.entries(n).forEach(([o,i])=>{if(!r[o]){r[o]=i;return}if(o==="class"){const s=i?String(i).split(" "):[],l=r[o]?r[o].split(" "):[],c=s.filter(u=>!l.includes(u));r[o]=[...l,...c].join(" ")}else if(o==="style"){const s=i?i.split(";").map(u=>u.trim()).filter(Boolean):[],l=r[o]?r[o].split(";").map(u=>u.trim()).filter(Boolean):[],c=new Map;l.forEach(u=>{const[d,f]=u.split(":").map(h=>h.trim());c.set(d,f)}),s.forEach(u=>{const[d,f]=u.split(":").map(h=>h.trim());c.set(d,f)}),r[o]=Array.from(c.entries()).map(([u,d])=>`${u}: ${d}`).join("; ")}else r[o]=i}),r},{})}function ru(e,t){return t.filter(n=>n.type===e.type.name).filter(n=>n.attribute.rendered).map(n=>n.attribute.renderHTML?n.attribute.renderHTML(e.attrs)||{}:{[n.name]:e.attrs[n.name]}).reduce((n,r)=>nn(n,r),{})}function Nx(e){return typeof e=="function"}function Dt(e,t=void 0,...n){return Nx(e)?t?e.bind(t)(...n):e(...n):e}function uI(e={}){return Object.keys(e).length===0&&e.constructor===Object}function dI(e){return typeof e!="string"?e:e.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(e):e==="true"?!0:e==="false"?!1:e}function bb(e,t){return"style"in e?e:{...e,getAttrs:n=>{const r=e.getAttrs?e.getAttrs(n):e.attrs;if(r===!1)return!1;const o=t.reduce((i,a)=>{const s=a.attribute.parseHTML?a.attribute.parseHTML(n):dI(n.getAttribute(a.name));return s==null?i:{...i,[a.name]:s}},{});return{...r,...o}}}}function yb(e){return Object.fromEntries(Object.entries(e).filter(([t,n])=>t==="attrs"&&uI(n)?!1:n!=null))}function fI(e,t){var n;const r=$x(e),{nodeExtensions:o,markExtensions:i}=sd(e),a=(n=o.find(c=>pt(c,"topNode")))===null||n===void 0?void 0:n.name,s=Object.fromEntries(o.map(c=>{const u=r.filter(y=>y.type===c.name),d={name:c.name,options:c.options,storage:c.storage,editor:t},f=e.reduce((y,b)=>{const C=pt(b,"extendNodeSchema",d);return{...y,...C?C(c):{}}},{}),h=yb({...f,content:Dt(pt(c,"content",d)),marks:Dt(pt(c,"marks",d)),group:Dt(pt(c,"group",d)),inline:Dt(pt(c,"inline",d)),atom:Dt(pt(c,"atom",d)),selectable:Dt(pt(c,"selectable",d)),draggable:Dt(pt(c,"draggable",d)),code:Dt(pt(c,"code",d)),whitespace:Dt(pt(c,"whitespace",d)),linebreakReplacement:Dt(pt(c,"linebreakReplacement",d)),defining:Dt(pt(c,"defining",d)),isolating:Dt(pt(c,"isolating",d)),attrs:Object.fromEntries(u.map(y=>{var b;return[y.name,{default:(b=y==null?void 0:y.attribute)===null||b===void 0?void 0:b.default}]}))}),m=Dt(pt(c,"parseHTML",d));m&&(h.parseDOM=m.map(y=>bb(y,u)));const v=pt(c,"renderHTML",d);v&&(h.toDOM=y=>v({node:y,HTMLAttributes:ru(y,u)}));const g=pt(c,"renderText",d);return g&&(h.toText=g),[c.name,h]})),l=Object.fromEntries(i.map(c=>{const u=r.filter(g=>g.type===c.name),d={name:c.name,options:c.options,storage:c.storage,editor:t},f=e.reduce((g,y)=>{const b=pt(y,"extendMarkSchema",d);return{...g,...b?b(c):{}}},{}),h=yb({...f,inclusive:Dt(pt(c,"inclusive",d)),excludes:Dt(pt(c,"excludes",d)),group:Dt(pt(c,"group",d)),spanning:Dt(pt(c,"spanning",d)),code:Dt(pt(c,"code",d)),attrs:Object.fromEntries(u.map(g=>{var y;return[g.name,{default:(y=g==null?void 0:g.attribute)===null||y===void 0?void 0:y.default}]}))}),m=Dt(pt(c,"parseHTML",d));m&&(h.parseDOM=m.map(g=>bb(g,u)));const v=pt(c,"renderHTML",d);return v&&(h.toDOM=g=>v({mark:g,HTMLAttributes:ru(g,u)})),[c.name,h]}));return new gS({topNode:a,nodes:s,marks:l})}function hf(e,t){return t.nodes[e]||t.marks[e]||null}function Cb(e,t){return Array.isArray(t)?t.some(n=>(typeof n=="string"?n:n.name)===e.name):t}function Bm(e,t){const n=na.fromSchema(t).serializeFragment(e),o=document.implementation.createHTMLDocument().createElement("div");return o.appendChild(n),o.innerHTML}const hI=(e,t=500)=>{let n="";const r=e.parentOffset;return e.parent.nodesBetween(Math.max(0,r-t),r,(o,i,a,s)=>{var l,c;const u=((c=(l=o.type.spec).toText)===null||c===void 0?void 0:c.call(l,{node:o,pos:i,parent:a,index:s}))||o.textContent||"%leaf%";n+=o.isAtom&&!o.isText?u:u.slice(0,Math.max(0,r-i))}),n};function zm(e){return Object.prototype.toString.call(e)==="[object RegExp]"}class Cl{constructor(t){this.find=t.find,this.handler=t.handler}}const pI=(e,t)=>{if(zm(t))return t.exec(e);const n=t(e);if(!n)return null;const r=[n.text];return r.index=n.index,r.input=e,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r};function Yl(e){var t;const{editor:n,from:r,to:o,text:i,rules:a,plugin:s}=e,{view:l}=n;if(l.composing)return!1;const c=l.state.doc.resolve(r);if(c.parent.type.spec.code||!((t=c.nodeBefore||c.nodeAfter)===null||t===void 0)&&t.marks.find(f=>f.type.spec.code))return!1;let u=!1;const d=hI(c)+i;return a.forEach(f=>{if(u)return;const h=pI(d,f.find);if(!h)return;const m=l.state.tr,v=id({state:l.state,transaction:m}),g={from:r-(h[0].length-i.length),to:o},{commands:y,chain:b,can:C}=new ad({editor:n,state:v});f.handler({state:v,range:g,match:h,commands:y,chain:b,can:C})===null||!m.steps.length||(m.setMeta(s,{transform:m,from:r,to:o,text:i}),l.dispatch(m),u=!0)}),u}function mI(e){const{editor:t,rules:n}=e,r=new xn({state:{init(){return null},apply(o,i,a){const s=o.getMeta(r);if(s)return s;const l=o.getMeta("applyInputRules");return!!l&&setTimeout(()=>{let{text:u}=l;typeof u=="string"?u=u:u=Bm(Ae.from(u),a.schema);const{from:d}=l,f=d+u.length;Yl({editor:t,from:d,to:f,text:u,rules:n,plugin:r})}),o.selectionSet||o.docChanged?null:i}},props:{handleTextInput(o,i,a,s){return Yl({editor:t,from:i,to:a,text:s,rules:n,plugin:r})},handleDOMEvents:{compositionend:o=>(setTimeout(()=>{const{$cursor:i}=o.state.selection;i&&Yl({editor:t,from:i.pos,to:i.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(o,i){if(i.key!=="Enter")return!1;const{$cursor:a}=o.state.selection;return a?Yl({editor:t,from:a.pos,to:a.pos,text:`
50
+ `,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function gI(e){return Object.prototype.toString.call(e).slice(8,-1)}function Jl(e){return gI(e)!=="Object"?!1:e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype}function ld(e,t){const n={...e};return Jl(e)&&Jl(t)&&Object.keys(t).forEach(r=>{Jl(t[r])&&Jl(e[r])?n[r]=ld(e[r],t[r]):n[r]=t[r]}),n}let ro=class _h{constructor(t={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Dt(pt(this,"addOptions",{name:this.name}))),this.storage=Dt(pt(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new _h(t)}configure(t={}){const n=this.extend({...this.config,addOptions:()=>ld(this.options,t)});return n.name=this.name,n.parent=this.parent,n}extend(t={}){const n=new _h(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=Dt(pt(n,"addOptions",{name:n.name})),n.storage=Dt(pt(n,"addStorage",{name:n.name,options:n.options})),n}static handleExit({editor:t,mark:n}){const{tr:r}=t.state,o=t.state.selection.$from;if(o.pos===o.end()){const a=o.marks();if(!!!a.find(c=>(c==null?void 0:c.type.name)===n.name))return!1;const l=a.find(c=>(c==null?void 0:c.type.name)===n.name);return l&&r.removeStoredMark(l),r.insertText(" ",o.pos),t.view.dispatch(r),!0}return!1}};function vI(e){return typeof e=="number"}class bI{constructor(t){this.find=t.find,this.handler=t.handler}}const yI=(e,t,n)=>{if(zm(t))return[...e.matchAll(t)];const r=t(e,n);return r?r.map(o=>{const i=[o.text];return i.index=o.index,i.input=e,i.data=o.data,o.replaceWith&&(o.text.includes(o.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),i.push(o.replaceWith)),i}):[]};function CI(e){const{editor:t,state:n,from:r,to:o,rule:i,pasteEvent:a,dropEvent:s}=e,{commands:l,chain:c,can:u}=new ad({editor:t,state:n}),d=[];return n.doc.nodesBetween(r,o,(h,m)=>{if(!h.isTextblock||h.type.spec.code)return;const v=Math.max(r,m),g=Math.min(o,m+h.content.size),y=h.textBetween(v-m,g-m,void 0,"");yI(y,i.find,a).forEach(C=>{if(C.index===void 0)return;const x=v+C.index+1,S=x+C[0].length,w={from:n.tr.mapping.map(x),to:n.tr.mapping.map(S)},E=i.handler({state:n,range:w,match:C,commands:l,chain:c,can:u,pasteEvent:a,dropEvent:s});d.push(E)})}),d.every(h=>h!==null)}let Ql=null;const SI=e=>{var t;const n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(t=n.clipboardData)===null||t===void 0||t.setData("text/html",e),n};function xI(e){const{editor:t,rules:n}=e;let r=null,o=!1,i=!1,a=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,s;try{s=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{s=null}const l=({state:u,from:d,to:f,rule:h,pasteEvt:m})=>{const v=u.tr,g=id({state:u,transaction:v});if(!(!CI({editor:t,state:g,from:Math.max(d-1,0),to:f.b-1,rule:h,pasteEvent:m,dropEvent:s})||!v.steps.length)){try{s=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{s=null}return a=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,v}};return n.map(u=>new xn({view(d){const f=m=>{var v;r=!((v=d.dom.parentElement)===null||v===void 0)&&v.contains(m.target)?d.dom.parentElement:null,r&&(Ql=t)},h=()=>{Ql&&(Ql=null)};return window.addEventListener("dragstart",f),window.addEventListener("dragend",h),{destroy(){window.removeEventListener("dragstart",f),window.removeEventListener("dragend",h)}}},props:{handleDOMEvents:{drop:(d,f)=>{if(i=r===d.dom.parentElement,s=f,!i){const h=Ql;h&&setTimeout(()=>{const m=h.state.selection;m&&h.commands.deleteRange({from:m.from,to:m.to})},10)}return!1},paste:(d,f)=>{var h;const m=(h=f.clipboardData)===null||h===void 0?void 0:h.getData("text/html");return a=f,o=!!(m!=null&&m.includes("data-pm-slice")),!1}}},appendTransaction:(d,f,h)=>{const m=d[0],v=m.getMeta("uiEvent")==="paste"&&!o,g=m.getMeta("uiEvent")==="drop"&&!i,y=m.getMeta("applyPasteRules"),b=!!y;if(!v&&!g&&!b)return;if(b){let{text:S}=y;typeof S=="string"?S=S:S=Bm(Ae.from(S),h.schema);const{from:w}=y,E=w+S.length,N=SI(S);return l({rule:u,state:h,from:w,to:{b:E},pasteEvt:N})}const C=f.doc.content.findDiffStart(h.doc.content),x=f.doc.content.findDiffEnd(h.doc.content);if(!(!vI(C)||!x||C===x.b))return l({rule:u,state:h,from:C,to:x,pasteEvt:a})}}))}function wI(e){const t=e.filter((n,r)=>e.indexOf(n)!==r);return Array.from(new Set(t))}class wa{constructor(t,n){this.splittableMarks=[],this.editor=n,this.extensions=wa.resolve(t),this.schema=fI(this.extensions,n),this.setupExtensions()}static resolve(t){const n=wa.sort(wa.flatten(t)),r=wI(n.map(o=>o.name));return r.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${r.map(o=>`'${o}'`).join(", ")}]. This can lead to issues.`),n}static flatten(t){return t.map(n=>{const r={name:n.name,options:n.options,storage:n.storage},o=pt(n,"addExtensions",r);return o?[n,...this.flatten(o())]:n}).flat(10)}static sort(t){return t.sort((r,o)=>{const i=pt(r,"priority")||100,a=pt(o,"priority")||100;return i>a?-1:i<a?1:0})}get commands(){return this.extensions.reduce((t,n)=>{const r={name:n.name,options:n.options,storage:n.storage,editor:this.editor,type:hf(n.name,this.schema)},o=pt(n,"addCommands",r);return o?{...t,...o()}:t},{})}get plugins(){const{editor:t}=this,n=wa.sort([...this.extensions].reverse()),r=[],o=[],i=n.map(a=>{const s={name:a.name,options:a.options,storage:a.storage,editor:t,type:hf(a.name,this.schema)},l=[],c=pt(a,"addKeyboardShortcuts",s);let u={};if(a.type==="mark"&&pt(a,"exitable",s)&&(u.ArrowRight=()=>ro.handleExit({editor:t,mark:a})),c){const v=Object.fromEntries(Object.entries(c()).map(([g,y])=>[g,()=>y({editor:t})]));u={...u,...v}}const d=HR(u);l.push(d);const f=pt(a,"addInputRules",s);Cb(a,t.options.enableInputRules)&&f&&r.push(...f());const h=pt(a,"addPasteRules",s);Cb(a,t.options.enablePasteRules)&&h&&o.push(...h());const m=pt(a,"addProseMirrorPlugins",s);if(m){const v=m();l.push(...v)}return l}).flat();return[mI({editor:t,rules:r}),...xI({editor:t,rules:o}),...i]}get attributes(){return $x(this.extensions)}get nodeViews(){const{editor:t}=this,{nodeExtensions:n}=sd(this.extensions);return Object.fromEntries(n.filter(r=>!!pt(r,"addNodeView")).map(r=>{const o=this.attributes.filter(l=>l.type===r.name),i={name:r.name,options:r.options,storage:r.storage,editor:t,type:Yn(r.name,this.schema)},a=pt(r,"addNodeView",i);if(!a)return[];const s=(l,c,u,d,f)=>{const h=ru(l,o);return a()({node:l,view:c,getPos:u,decorations:d,innerDecorations:f,editor:t,extension:r,HTMLAttributes:h})};return[r.name,s]}))}setupExtensions(){this.extensions.forEach(t=>{var n;this.editor.extensionStorage[t.name]=t.storage;const r={name:t.name,options:t.options,storage:t.storage,editor:this.editor,type:hf(t.name,this.schema)};t.type==="mark"&&(!((n=Dt(pt(t,"keepOnSplit",r)))!==null&&n!==void 0)||n)&&this.splittableMarks.push(t.name);const o=pt(t,"onBeforeCreate",r),i=pt(t,"onCreate",r),a=pt(t,"onUpdate",r),s=pt(t,"onSelectionUpdate",r),l=pt(t,"onTransaction",r),c=pt(t,"onFocus",r),u=pt(t,"onBlur",r),d=pt(t,"onDestroy",r);o&&this.editor.on("beforeCreate",o),i&&this.editor.on("create",i),a&&this.editor.on("update",a),s&&this.editor.on("selectionUpdate",s),l&&this.editor.on("transaction",l),c&&this.editor.on("focus",c),u&&this.editor.on("blur",u),d&&this.editor.on("destroy",d)})}}class dn{constructor(t={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Dt(pt(this,"addOptions",{name:this.name}))),this.storage=Dt(pt(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new dn(t)}configure(t={}){const n=this.extend({...this.config,addOptions:()=>ld(this.options,t)});return n.name=this.name,n.parent=this.parent,n}extend(t={}){const n=new dn({...this.config,...t});return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=Dt(pt(n,"addOptions",{name:n.name})),n.storage=Dt(pt(n,"addStorage",{name:n.name,options:n.options})),n}}function Mx(e,t,n){const{from:r,to:o}=t,{blockSeparator:i=`
51
+
52
+ `,textSerializers:a={}}=n||{};let s="";return e.nodesBetween(r,o,(l,c,u,d)=>{var f;l.isBlock&&c>r&&(s+=i);const h=a==null?void 0:a[l.type.name];if(h)return u&&(s+=h({node:l,pos:c,parent:u,index:d,range:t})),!1;l.isText&&(s+=(f=l==null?void 0:l.text)===null||f===void 0?void 0:f.slice(Math.max(r,c)-c,o-c))}),s}function Rx(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,t])=>t.spec.toText).map(([t,n])=>[t,n.spec.toText]))}const EI=dn.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new xn({key:new _n("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:e}=this,{state:t,schema:n}=e,{doc:r,selection:o}=t,{ranges:i}=o,a=Math.min(...i.map(u=>u.$from.pos)),s=Math.max(...i.map(u=>u.$to.pos)),l=Rx(n);return Mx(r,{from:a,to:s},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:l})}}})]}}),OI=()=>({editor:e,view:t})=>(requestAnimationFrame(()=>{var n;e.isDestroyed||(t.dom.blur(),(n=window==null?void 0:window.getSelection())===null||n===void 0||n.removeAllRanges())}),!0),$I=(e=!1)=>({commands:t})=>t.setContent("",e),NI=()=>({state:e,tr:t,dispatch:n})=>{const{selection:r}=t,{ranges:o}=r;return n&&o.forEach(({$from:i,$to:a})=>{e.doc.nodesBetween(i.pos,a.pos,(s,l)=>{if(s.type.isText)return;const{doc:c,mapping:u}=t,d=c.resolve(u.map(l)),f=c.resolve(u.map(l+s.nodeSize)),h=d.blockRange(f);if(!h)return;const m=Ja(h);if(s.type.isTextblock){const{defaultType:v}=d.parent.contentMatchAt(d.index());t.setNodeMarkup(h.start,v)}(m||m===0)&&t.lift(h,m)})}),!0},MI=e=>t=>e(t),RI=()=>({state:e,dispatch:t})=>xx(e,t),II=(e,t)=>({editor:n,tr:r})=>{const{state:o}=n,i=o.doc.slice(e.from,e.to);r.deleteRange(e.from,e.to);const a=r.mapping.map(t);return r.insert(a,i.content),r.setSelection(new Ct(r.doc.resolve(a-1))),!0},TI=()=>({tr:e,dispatch:t})=>{const{selection:n}=e,r=n.$anchor.node();if(r.content.size>0)return!1;const o=e.selection.$anchor;for(let i=o.depth;i>0;i-=1)if(o.node(i).type===r.type){if(t){const s=o.before(i),l=o.after(i);e.delete(s,l).scrollIntoView()}return!0}return!1},AI=e=>({tr:t,state:n,dispatch:r})=>{const o=Yn(e,n.schema),i=t.selection.$anchor;for(let a=i.depth;a>0;a-=1)if(i.node(a).type===o){if(r){const l=i.before(a),c=i.after(a);t.delete(l,c).scrollIntoView()}return!0}return!1},PI=e=>({tr:t,dispatch:n})=>{const{from:r,to:o}=e;return n&&t.delete(r,o),!0},kI=()=>({state:e,dispatch:t})=>km(e,t),DI=()=>({commands:e})=>e.keyboardShortcut("Enter"),_I=()=>({state:e,dispatch:t})=>GR(e,t);function ou(e,t,n={strict:!0}){const r=Object.keys(t);return r.length?r.every(o=>n.strict?t[o]===e[o]:zm(t[o])?t[o].test(e[o]):t[o]===e[o]):!0}function Ix(e,t,n={}){return e.find(r=>r.type===t&&ou(Object.fromEntries(Object.keys(n).map(o=>[o,r.attrs[o]])),n))}function Sb(e,t,n={}){return!!Ix(e,t,n)}function Fm(e,t,n){var r;if(!e||!t)return;let o=e.parent.childAfter(e.parentOffset);if((!o.node||!o.node.marks.some(u=>u.type===t))&&(o=e.parent.childBefore(e.parentOffset)),!o.node||!o.node.marks.some(u=>u.type===t)||(n=n||((r=o.node.marks[0])===null||r===void 0?void 0:r.attrs),!Ix([...o.node.marks],t,n)))return;let a=o.index,s=e.start()+o.offset,l=a+1,c=s+o.node.nodeSize;for(;a>0&&Sb([...e.parent.child(a-1).marks],t,n);)a-=1,s-=e.parent.child(a).nodeSize;for(;l<e.parent.childCount&&Sb([...e.parent.child(l).marks],t,n);)c+=e.parent.child(l).nodeSize,l+=1;return{from:s,to:c}}function Si(e,t){if(typeof e=="string"){if(!t.marks[e])throw Error(`There is no mark type named '${e}'. Maybe you forgot to add the extension?`);return t.marks[e]}return e}const LI=(e,t={})=>({tr:n,state:r,dispatch:o})=>{const i=Si(e,r.schema),{doc:a,selection:s}=n,{$from:l,from:c,to:u}=s;if(o){const d=Fm(l,i,t);if(d&&d.from<=c&&d.to>=u){const f=Ct.create(a,d.from,d.to);n.setSelection(f)}}return!0},jI=e=>t=>{const n=typeof e=="function"?e(t):e;for(let r=0;r<n.length;r+=1)if(n[r](t))return!0;return!1};function Tx(e){return e instanceof Ct}function Di(e=0,t=0,n=0){return Math.min(Math.max(e,t),n)}function Ax(e,t=null){if(!t)return null;const n=xt.atStart(e),r=xt.atEnd(e);if(t==="start"||t===!0)return n;if(t==="end")return r;const o=n.from,i=r.to;return t==="all"?Ct.create(e,Di(0,o,i),Di(e.content.size,o,i)):Ct.create(e,Di(t,o,i),Di(t,o,i))}function Px(){return navigator.platform==="Android"||/android/i.test(navigator.userAgent)}function cd(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}const BI=(e=null,t={})=>({editor:n,view:r,tr:o,dispatch:i})=>{t={scrollIntoView:!0,...t};const a=()=>{(cd()||Px())&&r.dom.focus(),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),t!=null&&t.scrollIntoView&&n.commands.scrollIntoView())})};if(r.hasFocus()&&e===null||e===!1)return!0;if(i&&e===null&&!Tx(n.state.selection))return a(),!0;const s=Ax(o.doc,e)||n.state.selection,l=n.state.selection.eq(s);return i&&(l||o.setSelection(s),l&&o.storedMarks&&o.setStoredMarks(o.storedMarks),a()),!0},zI=(e,t)=>n=>e.every((r,o)=>t(r,{...n,index:o})),FI=(e,t)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},e,t),kx=e=>{const t=e.childNodes;for(let n=t.length-1;n>=0;n-=1){const r=t[n];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?e.removeChild(r):r.nodeType===1&&kx(r)}return e};function Zl(e){const t=`<body>${e}</body>`,n=new window.DOMParser().parseFromString(t,"text/html").body;return kx(n)}function iu(e,t,n){if(e instanceof ci||e instanceof Ae)return e;n={slice:!0,parseOptions:{},...n};const r=typeof e=="object"&&e!==null,o=typeof e=="string";if(r)try{if(Array.isArray(e)&&e.length>0)return Ae.fromArray(e.map(s=>t.nodeFromJSON(s)));const a=t.nodeFromJSON(e);return n.errorOnInvalidContent&&a.check(),a}catch(i){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:i});return console.warn("[tiptap warn]: Invalid content.","Passed value:",e,"Error:",i),iu("",t,n)}if(o){if(n.errorOnInvalidContent){let a=!1,s="";const l=new gS({topNode:t.spec.topNode,marks:t.spec.marks,nodes:t.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:c=>(a=!0,s=typeof c=="string"?c:c.outerHTML,null)}]}})});if(n.slice?As.fromSchema(l).parseSlice(Zl(e),n.parseOptions):As.fromSchema(l).parse(Zl(e),n.parseOptions),n.errorOnInvalidContent&&a)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${s}`)})}const i=As.fromSchema(t);return n.slice?i.parseSlice(Zl(e),n.parseOptions).content:i.parse(Zl(e),n.parseOptions)}return iu("",t,n)}function HI(e,t,n){const r=e.steps.length-1;if(r<t)return;const o=e.steps[r];if(!(o instanceof qn||o instanceof Gn))return;const i=e.mapping.maps[r];let a=0;i.forEach((s,l,c,u)=>{a===0&&(a=u)}),e.setSelection(xt.near(e.doc.resolve(a),n))}const VI=e=>!("type"in e),WI=(e,t,n)=>({tr:r,dispatch:o,editor:i})=>{var a;if(o){n={parseOptions:i.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let s;try{s=iu(t,i.schema,{parseOptions:{preserveWhitespace:"full",...n.parseOptions},errorOnInvalidContent:(a=n.errorOnInvalidContent)!==null&&a!==void 0?a:i.options.enableContentCheck})}catch(m){return i.emit("contentError",{editor:i,error:m,disableCollaboration:()=>{i.storage.collaboration&&(i.storage.collaboration.isDisabled=!0)}}),!1}let{from:l,to:c}=typeof e=="number"?{from:e,to:e}:{from:e.from,to:e.to},u=!0,d=!0;if((VI(s)?s:[s]).forEach(m=>{m.check(),u=u?m.isText&&m.marks.length===0:!1,d=d?m.isBlock:!1}),l===c&&d){const{parent:m}=r.doc.resolve(l);m.isTextblock&&!m.type.spec.code&&!m.childCount&&(l-=1,c+=1)}let h;if(u){if(Array.isArray(t))h=t.map(m=>m.text||"").join("");else if(t instanceof Ae){let m="";t.forEach(v=>{v.text&&(m+=v.text)}),h=m}else typeof t=="object"&&t&&t.text?h=t.text:h=t;r.insertText(h,l,c)}else h=s,r.replaceWith(l,c,h);n.updateSelection&&HI(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:l,text:h}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:l,text:h})}return!0},UI=()=>({state:e,dispatch:t})=>UR(e,t),qI=()=>({state:e,dispatch:t})=>qR(e,t),KI=()=>({state:e,dispatch:t})=>mx(e,t),GI=()=>({state:e,dispatch:t})=>yx(e,t),XI=()=>({state:e,dispatch:t,tr:n})=>{try{const r=Zu(e.doc,e.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},YI=()=>({state:e,dispatch:t,tr:n})=>{try{const r=Zu(e.doc,e.selection.$from.pos,1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},JI=()=>({state:e,dispatch:t})=>VR(e,t),QI=()=>({state:e,dispatch:t})=>WR(e,t);function Dx(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function ZI(e){const t=e.split(/-(?!$)/);let n=t[t.length-1];n==="Space"&&(n=" ");let r,o,i,a;for(let s=0;s<t.length-1;s+=1){const l=t[s];if(/^(cmd|meta|m)$/i.test(l))a=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))o=!0;else if(/^s(hift)?$/i.test(l))i=!0;else if(/^mod$/i.test(l))cd()||Dx()?a=!0:o=!0;else throw new Error(`Unrecognized modifier name: ${l}`)}return r&&(n=`Alt-${n}`),o&&(n=`Ctrl-${n}`),a&&(n=`Meta-${n}`),i&&(n=`Shift-${n}`),n}const eT=e=>({editor:t,view:n,tr:r,dispatch:o})=>{const i=ZI(e).split(/-(?!$)/),a=i.find(c=>!["Alt","Ctrl","Meta","Shift"].includes(c)),s=new KeyboardEvent("keydown",{key:a==="Space"?" ":a,altKey:i.includes("Alt"),ctrlKey:i.includes("Ctrl"),metaKey:i.includes("Meta"),shiftKey:i.includes("Shift"),bubbles:!0,cancelable:!0}),l=t.captureTransaction(()=>{n.someProp("handleKeyDown",c=>c(n,s))});return l==null||l.steps.forEach(c=>{const u=c.map(r.mapping);u&&o&&r.maybeStep(u)}),!0};function Zs(e,t,n={}){const{from:r,to:o,empty:i}=e.selection,a=t?Yn(t,e.schema):null,s=[];e.doc.nodesBetween(r,o,(d,f)=>{if(d.isText)return;const h=Math.max(r,f),m=Math.min(o,f+d.nodeSize);s.push({node:d,from:h,to:m})});const l=o-r,c=s.filter(d=>a?a.name===d.node.type.name:!0).filter(d=>ou(d.node.attrs,n,{strict:!1}));return i?!!c.length:c.reduce((d,f)=>d+f.to-f.from,0)>=l}const tT=(e,t={})=>({state:n,dispatch:r})=>{const o=Yn(e,n.schema);return Zs(n,o,t)?KR(n,r):!1},nT=()=>({state:e,dispatch:t})=>wx(e,t),rT=e=>({state:t,dispatch:n})=>{const r=Yn(e,t.schema);return iI(r)(t,n)},oT=()=>({state:e,dispatch:t})=>Sx(e,t);function ud(e,t){return t.nodes[e]?"node":t.marks[e]?"mark":null}function xb(e,t){const n=typeof t=="string"?[t]:t;return Object.keys(e).reduce((r,o)=>(n.includes(o)||(r[o]=e[o]),r),{})}const iT=(e,t)=>({tr:n,state:r,dispatch:o})=>{let i=null,a=null;const s=ud(typeof e=="string"?e:e.name,r.schema);return s?(s==="node"&&(i=Yn(e,r.schema)),s==="mark"&&(a=Si(e,r.schema)),o&&n.selection.ranges.forEach(l=>{r.doc.nodesBetween(l.$from.pos,l.$to.pos,(c,u)=>{i&&i===c.type&&n.setNodeMarkup(u,void 0,xb(c.attrs,t)),a&&c.marks.length&&c.marks.forEach(d=>{a===d.type&&n.addMark(u,u+c.nodeSize,a.create(xb(d.attrs,t)))})})}),!0):!1},aT=()=>({tr:e,dispatch:t})=>(t&&e.scrollIntoView(),!0),sT=()=>({tr:e,dispatch:t})=>{if(t){const n=new $r(e.doc);e.setSelection(n)}return!0},lT=()=>({state:e,dispatch:t})=>vx(e,t),cT=()=>({state:e,dispatch:t})=>Cx(e,t),uT=()=>({state:e,dispatch:t})=>JR(e,t),dT=()=>({state:e,dispatch:t})=>eI(e,t),fT=()=>({state:e,dispatch:t})=>ZR(e,t);function Lh(e,t,n={},r={}){return iu(e,t,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}const hT=(e,t=!1,n={},r={})=>({editor:o,tr:i,dispatch:a,commands:s})=>{var l,c;const{doc:u}=i;if(n.preserveWhitespace!=="full"){const d=Lh(e,o.schema,n,{errorOnInvalidContent:(l=r.errorOnInvalidContent)!==null&&l!==void 0?l:o.options.enableContentCheck});return a&&i.replaceWith(0,u.content.size,d).setMeta("preventUpdate",!t),!0}return a&&i.setMeta("preventUpdate",!t),s.insertContentAt({from:0,to:u.content.size},e,{parseOptions:n,errorOnInvalidContent:(c=r.errorOnInvalidContent)!==null&&c!==void 0?c:o.options.enableContentCheck})};function _x(e,t){const n=Si(t,e.schema),{from:r,to:o,empty:i}=e.selection,a=[];i?(e.storedMarks&&a.push(...e.storedMarks),a.push(...e.selection.$head.marks())):e.doc.nodesBetween(r,o,l=>{a.push(...l.marks)});const s=a.find(l=>l.type.name===n.name);return s?{...s.attrs}:{}}function pT(e,t){const n=new xm(e);return t.forEach(r=>{r.steps.forEach(o=>{n.step(o)})}),n}function mT(e){for(let t=0;t<e.edgeCount;t+=1){const{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function gT(e,t,n){const r=[];return e.nodesBetween(t.from,t.to,(o,i)=>{n(o)&&r.push({node:o,pos:i})}),r}function Lx(e,t){for(let n=e.depth;n>0;n-=1){const r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}}function Hm(e){return t=>Lx(t.$from,e)}function vT(e,t){const n={from:0,to:e.content.size};return Mx(e,n,t)}function bT(e,t){const n=Yn(t,e.schema),{from:r,to:o}=e.selection,i=[];e.doc.nodesBetween(r,o,s=>{i.push(s)});const a=i.reverse().find(s=>s.type.name===n.name);return a?{...a.attrs}:{}}function jx(e,t){const n=ud(typeof t=="string"?t:t.name,e.schema);return n==="node"?bT(e,t):n==="mark"?_x(e,t):{}}function yT(e,t=JSON.stringify){const n={};return e.filter(r=>{const o=t(r);return Object.prototype.hasOwnProperty.call(n,o)?!1:n[o]=!0})}function CT(e){const t=yT(e);return t.length===1?t:t.filter((n,r)=>!t.filter((i,a)=>a!==r).some(i=>n.oldRange.from>=i.oldRange.from&&n.oldRange.to<=i.oldRange.to&&n.newRange.from>=i.newRange.from&&n.newRange.to<=i.newRange.to))}function ST(e){const{mapping:t,steps:n}=e,r=[];return t.maps.forEach((o,i)=>{const a=[];if(o.ranges.length)o.forEach((s,l)=>{a.push({from:s,to:l})});else{const{from:s,to:l}=n[i];if(s===void 0||l===void 0)return;a.push({from:s,to:l})}a.forEach(({from:s,to:l})=>{const c=t.slice(i).map(s,-1),u=t.slice(i).map(l),d=t.invert().map(c,-1),f=t.invert().map(u);r.push({oldRange:{from:d,to:f},newRange:{from:c,to:u}})})}),CT(r)}function Vm(e,t,n){const r=[];return e===t?n.resolve(e).marks().forEach(o=>{const i=n.resolve(e),a=Fm(i,o.type);a&&r.push({mark:o,...a})}):n.nodesBetween(e,t,(o,i)=>{!o||(o==null?void 0:o.nodeSize)===void 0||r.push(...o.marks.map(a=>({from:i,to:i+o.nodeSize,mark:a})))}),r}function Oc(e,t,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{const o=e.find(i=>i.type===t&&i.name===r);return o?o.attribute.keepOnSplit:!1}))}function jh(e,t,n={}){const{empty:r,ranges:o}=e.selection,i=t?Si(t,e.schema):null;if(r)return!!(e.storedMarks||e.selection.$from.marks()).filter(d=>i?i.name===d.type.name:!0).find(d=>ou(d.attrs,n,{strict:!1}));let a=0;const s=[];if(o.forEach(({$from:d,$to:f})=>{const h=d.pos,m=f.pos;e.doc.nodesBetween(h,m,(v,g)=>{if(!v.isText&&!v.marks.length)return;const y=Math.max(h,g),b=Math.min(m,g+v.nodeSize),C=b-y;a+=C,s.push(...v.marks.map(x=>({mark:x,from:y,to:b})))})}),a===0)return!1;const l=s.filter(d=>i?i.name===d.mark.type.name:!0).filter(d=>ou(d.mark.attrs,n,{strict:!1})).reduce((d,f)=>d+f.to-f.from,0),c=s.filter(d=>i?d.mark.type!==i&&d.mark.type.excludes(i):!0).reduce((d,f)=>d+f.to-f.from,0);return(l>0?l+c:l)>=a}function xT(e,t,n={}){if(!t)return Zs(e,null,n)||jh(e,null,n);const r=ud(t,e.schema);return r==="node"?Zs(e,t,n):r==="mark"?jh(e,t,n):!1}function wb(e,t){const{nodeExtensions:n}=sd(t),r=n.find(a=>a.name===e);if(!r)return!1;const o={name:r.name,options:r.options,storage:r.storage},i=Dt(pt(r,"group",o));return typeof i!="string"?!1:i.split(" ").includes("list")}function dd(e,{checkChildren:t=!0,ignoreWhitespace:n=!1}={}){var r;if(n){if(e.type.name==="hardBreak")return!0;if(e.isText)return/^\s*$/m.test((r=e.text)!==null&&r!==void 0?r:"")}if(e.isText)return!e.text;if(e.isAtom||e.isLeaf)return!1;if(e.content.childCount===0)return!0;if(t){let o=!0;return e.content.forEach(i=>{o!==!1&&(dd(i,{ignoreWhitespace:n,checkChildren:t})||(o=!1))}),o}return!1}function Bx(e){return e instanceof yt}function wT(e,t,n){var r;const{selection:o}=t;let i=null;if(Tx(o)&&(i=o.$cursor),i){const s=(r=e.storedMarks)!==null&&r!==void 0?r:i.marks();return!!n.isInSet(s)||!s.some(l=>l.type.excludes(n))}const{ranges:a}=o;return a.some(({$from:s,$to:l})=>{let c=s.depth===0?e.doc.inlineContent&&e.doc.type.allowsMarkType(n):!1;return e.doc.nodesBetween(s.pos,l.pos,(u,d,f)=>{if(c)return!1;if(u.isInline){const h=!f||f.type.allowsMarkType(n),m=!!n.isInSet(u.marks)||!u.marks.some(v=>v.type.excludes(n));c=h&&m}return!c}),c})}const ET=(e,t={})=>({tr:n,state:r,dispatch:o})=>{const{selection:i}=n,{empty:a,ranges:s}=i,l=Si(e,r.schema);if(o)if(a){const c=_x(r,l);n.addStoredMark(l.create({...c,...t}))}else s.forEach(c=>{const u=c.$from.pos,d=c.$to.pos;r.doc.nodesBetween(u,d,(f,h)=>{const m=Math.max(h,u),v=Math.min(h+f.nodeSize,d);f.marks.find(y=>y.type===l)?f.marks.forEach(y=>{l===y.type&&n.addMark(m,v,l.create({...y.attrs,...t}))}):n.addMark(m,v,l.create(t))})});return wT(r,n,l)},OT=(e,t)=>({tr:n})=>(n.setMeta(e,t),!0),$T=(e,t={})=>({state:n,dispatch:r,chain:o})=>{const i=Yn(e,n.schema);let a;return n.selection.$anchor.sameParent(n.selection.$head)&&(a=n.selection.$anchor.parent.attrs),i.isTextblock?o().command(({commands:s})=>vb(i,{...a,...t})(n)?!0:s.clearNodes()).command(({state:s})=>vb(i,{...a,...t})(s,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},NT=e=>({tr:t,dispatch:n})=>{if(n){const{doc:r}=t,o=Di(e,0,r.content.size),i=yt.create(r,o);t.setSelection(i)}return!0},MT=e=>({tr:t,dispatch:n})=>{if(n){const{doc:r}=t,{from:o,to:i}=typeof e=="number"?{from:e,to:e}:e,a=Ct.atStart(r).from,s=Ct.atEnd(r).to,l=Di(o,a,s),c=Di(i,a,s),u=Ct.create(r,l,c);t.setSelection(u)}return!0},RT=e=>({state:t,dispatch:n})=>{const r=Yn(e,t.schema);return lI(r)(t,n)};function Eb(e,t){const n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){const r=n.filter(o=>t==null?void 0:t.includes(o.type.name));e.tr.ensureMarks(r)}}const IT=({keepMarks:e=!0}={})=>({tr:t,state:n,dispatch:r,editor:o})=>{const{selection:i,doc:a}=t,{$from:s,$to:l}=i,c=o.extensionManager.attributes,u=Oc(c,s.node().type.name,s.node().attrs);if(i instanceof yt&&i.node.isBlock)return!s.parentOffset||!ko(a,s.pos)?!1:(r&&(e&&Eb(n,o.extensionManager.splittableMarks),t.split(s.pos).scrollIntoView()),!0);if(!s.parent.isBlock)return!1;const d=l.parentOffset===l.parent.content.size,f=s.depth===0?void 0:mT(s.node(-1).contentMatchAt(s.indexAfter(-1)));let h=d&&f?[{type:f,attrs:u}]:void 0,m=ko(t.doc,t.mapping.map(s.pos),1,h);if(!h&&!m&&ko(t.doc,t.mapping.map(s.pos),1,f?[{type:f}]:void 0)&&(m=!0,h=f?[{type:f,attrs:u}]:void 0),r){if(m&&(i instanceof Ct&&t.deleteSelection(),t.split(t.mapping.map(s.pos),1,h),f&&!d&&!s.parentOffset&&s.parent.type!==f)){const v=t.mapping.map(s.before()),g=t.doc.resolve(v);s.node(-1).canReplaceWith(g.index(),g.index()+1,f)&&t.setNodeMarkup(t.mapping.map(s.before()),f)}e&&Eb(n,o.extensionManager.splittableMarks),t.scrollIntoView()}return m},TT=(e,t={})=>({tr:n,state:r,dispatch:o,editor:i})=>{var a;const s=Yn(e,r.schema),{$from:l,$to:c}=r.selection,u=r.selection.node;if(u&&u.isBlock||l.depth<2||!l.sameParent(c))return!1;const d=l.node(-1);if(d.type!==s)return!1;const f=i.extensionManager.attributes;if(l.parent.content.size===0&&l.node(-1).childCount===l.indexAfter(-1)){if(l.depth===2||l.node(-3).type!==s||l.index(-2)!==l.node(-2).childCount-1)return!1;if(o){let y=Ae.empty;const b=l.index(-1)?1:l.index(-2)?2:3;for(let N=l.depth-b;N>=l.depth-3;N-=1)y=Ae.from(l.node(N).copy(y));const C=l.indexAfter(-1)<l.node(-2).childCount?1:l.indexAfter(-2)<l.node(-3).childCount?2:3,x={...Oc(f,l.node().type.name,l.node().attrs),...t},S=((a=s.contentMatch.defaultType)===null||a===void 0?void 0:a.createAndFill(x))||void 0;y=y.append(Ae.from(s.createAndFill(null,S)||void 0));const w=l.before(l.depth-(b-1));n.replace(w,l.after(-C),new nt(y,4-b,0));let E=-1;n.doc.nodesBetween(w,n.doc.content.size,(N,$)=>{if(E>-1)return!1;N.isTextblock&&N.content.size===0&&(E=$+1)}),E>-1&&n.setSelection(Ct.near(n.doc.resolve(E))),n.scrollIntoView()}return!0}const h=c.pos===l.end()?d.contentMatchAt(0).defaultType:null,m={...Oc(f,d.type.name,d.attrs),...t},v={...Oc(f,l.node().type.name,l.node().attrs),...t};n.delete(l.pos,c.pos);const g=h?[{type:s,attrs:m},{type:h,attrs:v}]:[{type:s,attrs:m}];if(!ko(n.doc,l.pos,2))return!1;if(o){const{selection:y,storedMarks:b}=r,{splittableMarks:C}=i.extensionManager,x=b||y.$to.parentOffset&&y.$from.marks();if(n.split(l.pos,2,g).scrollIntoView(),!x||!o)return!0;const S=x.filter(w=>C.includes(w.type.name));n.ensureMarks(S)}return!0},pf=(e,t)=>{const n=Hm(a=>a.type===t)(e.selection);if(!n)return!0;const r=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;const o=e.doc.nodeAt(r);return n.node.type===(o==null?void 0:o.type)&&yi(e.doc,n.pos)&&e.join(n.pos),!0},mf=(e,t)=>{const n=Hm(a=>a.type===t)(e.selection);if(!n)return!0;const r=e.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;const o=e.doc.nodeAt(r);return n.node.type===(o==null?void 0:o.type)&&yi(e.doc,r)&&e.join(r),!0},AT=(e,t,n,r={})=>({editor:o,tr:i,state:a,dispatch:s,chain:l,commands:c,can:u})=>{const{extensions:d,splittableMarks:f}=o.extensionManager,h=Yn(e,a.schema),m=Yn(t,a.schema),{selection:v,storedMarks:g}=a,{$from:y,$to:b}=v,C=y.blockRange(b),x=g||v.$to.parentOffset&&v.$from.marks();if(!C)return!1;const S=Hm(w=>wb(w.type.name,d))(v);if(C.depth>=1&&S&&C.depth-S.depth<=1){if(S.node.type===h)return c.liftListItem(m);if(wb(S.node.type.name,d)&&h.validContent(S.node.content)&&s)return l().command(()=>(i.setNodeMarkup(S.pos,h),!0)).command(()=>pf(i,h)).command(()=>mf(i,h)).run()}return!n||!x||!s?l().command(()=>u().wrapInList(h,r)?!0:c.clearNodes()).wrapInList(h,r).command(()=>pf(i,h)).command(()=>mf(i,h)).run():l().command(()=>{const w=u().wrapInList(h,r),E=x.filter(N=>f.includes(N.type.name));return i.ensureMarks(E),w?!0:c.clearNodes()}).wrapInList(h,r).command(()=>pf(i,h)).command(()=>mf(i,h)).run()},PT=(e,t={},n={})=>({state:r,commands:o})=>{const{extendEmptyMarkRange:i=!1}=n,a=Si(e,r.schema);return jh(r,a,t)?o.unsetMark(a,{extendEmptyMarkRange:i}):o.setMark(a,t)},kT=(e,t,n={})=>({state:r,commands:o})=>{const i=Yn(e,r.schema),a=Yn(t,r.schema),s=Zs(r,i,n);let l;return r.selection.$anchor.sameParent(r.selection.$head)&&(l=r.selection.$anchor.parent.attrs),s?o.setNode(a,l):o.setNode(i,{...l,...n})},DT=(e,t={})=>({state:n,commands:r})=>{const o=Yn(e,n.schema);return Zs(n,o,t)?r.lift(o):r.wrapIn(o,t)},_T=()=>({state:e,dispatch:t})=>{const n=e.plugins;for(let r=0;r<n.length;r+=1){const o=n[r];let i;if(o.spec.isInputRules&&(i=o.getState(e))){if(t){const a=e.tr,s=i.transform;for(let l=s.steps.length-1;l>=0;l-=1)a.step(s.steps[l].invert(s.docs[l]));if(i.text){const l=a.doc.resolve(i.from).marks();a.replaceWith(i.from,i.to,e.schema.text(i.text,l))}else a.delete(i.from,i.to)}return!0}}return!1},LT=()=>({tr:e,dispatch:t})=>{const{selection:n}=e,{empty:r,ranges:o}=n;return r||t&&o.forEach(i=>{e.removeMark(i.$from.pos,i.$to.pos)}),!0},jT=(e,t={})=>({tr:n,state:r,dispatch:o})=>{var i;const{extendEmptyMarkRange:a=!1}=t,{selection:s}=n,l=Si(e,r.schema),{$from:c,empty:u,ranges:d}=s;if(!o)return!0;if(u&&a){let{from:f,to:h}=s;const m=(i=c.marks().find(g=>g.type===l))===null||i===void 0?void 0:i.attrs,v=Fm(c,l,m);v&&(f=v.from,h=v.to),n.removeMark(f,h,l)}else d.forEach(f=>{n.removeMark(f.$from.pos,f.$to.pos,l)});return n.removeStoredMark(l),!0},BT=(e,t={})=>({tr:n,state:r,dispatch:o})=>{let i=null,a=null;const s=ud(typeof e=="string"?e:e.name,r.schema);return s?(s==="node"&&(i=Yn(e,r.schema)),s==="mark"&&(a=Si(e,r.schema)),o&&n.selection.ranges.forEach(l=>{const c=l.$from.pos,u=l.$to.pos;let d,f,h,m;n.selection.empty?r.doc.nodesBetween(c,u,(v,g)=>{i&&i===v.type&&(h=Math.max(g,c),m=Math.min(g+v.nodeSize,u),d=g,f=v)}):r.doc.nodesBetween(c,u,(v,g)=>{g<c&&i&&i===v.type&&(h=Math.max(g,c),m=Math.min(g+v.nodeSize,u),d=g,f=v),g>=c&&g<=u&&(i&&i===v.type&&n.setNodeMarkup(g,void 0,{...v.attrs,...t}),a&&v.marks.length&&v.marks.forEach(y=>{if(a===y.type){const b=Math.max(g,c),C=Math.min(g+v.nodeSize,u);n.addMark(b,C,a.create({...y.attrs,...t}))}}))}),f&&(d!==void 0&&n.setNodeMarkup(d,void 0,{...f.attrs,...t}),a&&f.marks.length&&f.marks.forEach(v=>{a===v.type&&n.addMark(h,m,a.create({...v.attrs,...t}))}))}),!0):!1},zT=(e,t={})=>({state:n,dispatch:r})=>{const o=Yn(e,n.schema);return tI(o,t)(n,r)},FT=(e,t={})=>({state:n,dispatch:r})=>{const o=Yn(e,n.schema);return nI(o,t)(n,r)};var HT=Object.freeze({__proto__:null,blur:OI,clearContent:$I,clearNodes:NI,command:MI,createParagraphNear:RI,cut:II,deleteCurrentNode:TI,deleteNode:AI,deleteRange:PI,deleteSelection:kI,enter:DI,exitCode:_I,extendMarkRange:LI,first:jI,focus:BI,forEach:zI,insertContent:FI,insertContentAt:WI,joinBackward:KI,joinDown:qI,joinForward:GI,joinItemBackward:XI,joinItemForward:YI,joinTextblockBackward:JI,joinTextblockForward:QI,joinUp:UI,keyboardShortcut:eT,lift:tT,liftEmptyBlock:nT,liftListItem:rT,newlineInCode:oT,resetAttributes:iT,scrollIntoView:aT,selectAll:sT,selectNodeBackward:lT,selectNodeForward:cT,selectParentNode:uT,selectTextblockEnd:dT,selectTextblockStart:fT,setContent:hT,setMark:ET,setMeta:OT,setNode:$T,setNodeSelection:NT,setTextSelection:MT,sinkListItem:RT,splitBlock:IT,splitListItem:TT,toggleList:AT,toggleMark:PT,toggleNode:kT,toggleWrap:DT,undoInputRule:_T,unsetAllMarks:LT,unsetMark:jT,updateAttributes:BT,wrapIn:zT,wrapInList:FT});const VT=dn.create({name:"commands",addCommands(){return{...HT}}}),WT=dn.create({name:"drop",addProseMirrorPlugins(){return[new xn({key:new _n("tiptapDrop"),props:{handleDrop:(e,t,n,r)=>{this.editor.emit("drop",{editor:this.editor,event:t,slice:n,moved:r})}}})]}}),UT=dn.create({name:"editable",addProseMirrorPlugins(){return[new xn({key:new _n("editable"),props:{editable:()=>this.editor.options.editable}})]}}),qT=dn.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:e}=this;return[new xn({key:new _n("focusEvents"),props:{handleDOMEvents:{focus:(t,n)=>{e.isFocused=!0;const r=e.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1},blur:(t,n)=>{e.isFocused=!1;const r=e.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1}}}})]}}),KT=dn.create({name:"keymap",addKeyboardShortcuts(){const e=()=>this.editor.commands.first(({commands:a})=>[()=>a.undoInputRule(),()=>a.command(({tr:s})=>{const{selection:l,doc:c}=s,{empty:u,$anchor:d}=l,{pos:f,parent:h}=d,m=d.parent.isTextblock&&f>0?s.doc.resolve(f-1):d,v=m.parent.type.spec.isolating,g=d.pos-d.parentOffset,y=v&&m.parent.childCount===1?g===d.pos:xt.atStart(c).from===f;return!u||!h.type.isTextblock||h.textContent.length||!y||y&&d.parent.type.name==="paragraph"?!1:a.clearNodes()}),()=>a.deleteSelection(),()=>a.joinBackward(),()=>a.selectNodeBackward()]),t=()=>this.editor.commands.first(({commands:a})=>[()=>a.deleteSelection(),()=>a.deleteCurrentNode(),()=>a.joinForward(),()=>a.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:a})=>[()=>a.newlineInCode(),()=>a.createParagraphNear(),()=>a.liftEmptyBlock(),()=>a.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:e,"Mod-Backspace":e,"Shift-Backspace":e,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},o={...r},i={...r,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return cd()||Dx()?i:o},addProseMirrorPlugins(){return[new xn({key:new _n("clearDocument"),appendTransaction:(e,t,n)=>{if(e.some(v=>v.getMeta("composition")))return;const r=e.some(v=>v.docChanged)&&!t.doc.eq(n.doc),o=e.some(v=>v.getMeta("preventClearDocument"));if(!r||o)return;const{empty:i,from:a,to:s}=t.selection,l=xt.atStart(t.doc).from,c=xt.atEnd(t.doc).to;if(i||!(a===l&&s===c)||!dd(n.doc))return;const f=n.tr,h=id({state:n,transaction:f}),{commands:m}=new ad({editor:this.editor,state:h});if(m.clearNodes(),!!f.steps.length)return f}})]}}),GT=dn.create({name:"paste",addProseMirrorPlugins(){return[new xn({key:new _n("tiptapPaste"),props:{handlePaste:(e,t,n)=>{this.editor.emit("paste",{editor:this.editor,event:t,slice:n})}}})]}}),XT=dn.create({name:"tabindex",addProseMirrorPlugins(){return[new xn({key:new _n("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}});class Ii{get name(){return this.node.type.name}constructor(t,n,r=!1,o=null){this.currentNode=null,this.actualDepth=null,this.isBlock=r,this.resolvedPos=t,this.editor=n,this.currentNode=o}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var t;return(t=this.actualDepth)!==null&&t!==void 0?t:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(t){let n=this.from,r=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}n=this.from+1,r=this.to-1}this.editor.commands.insertContentAt({from:n,to:r},t)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;const t=this.resolvedPos.start(this.resolvedPos.depth-1),n=this.resolvedPos.doc.resolve(t);return new Ii(n,this.editor)}get before(){let t=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.from-3)),new Ii(t,this.editor)}get after(){let t=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.to+3)),new Ii(t,this.editor)}get children(){const t=[];return this.node.content.forEach((n,r)=>{const o=n.isBlock&&!n.isTextblock,i=n.isAtom&&!n.isText,a=this.pos+r+(i?0:1),s=this.resolvedPos.doc.resolve(a);if(!o&&s.depth<=this.depth)return;const l=new Ii(s,this.editor,o,o?n:null);o&&(l.actualDepth=this.depth+1),t.push(new Ii(s,this.editor,o,o?n:null))}),t}get firstChild(){return this.children[0]||null}get lastChild(){const t=this.children;return t[t.length-1]||null}closest(t,n={}){let r=null,o=this.parent;for(;o&&!r;){if(o.node.type.name===t)if(Object.keys(n).length>0){const i=o.node.attrs,a=Object.keys(n);for(let s=0;s<a.length;s+=1){const l=a[s];if(i[l]!==n[l])break}}else r=o;o=o.parent}return r}querySelector(t,n={}){return this.querySelectorAll(t,n,!0)[0]||null}querySelectorAll(t,n={},r=!1){let o=[];if(!this.children||this.children.length===0)return o;const i=Object.keys(n);return this.children.forEach(a=>{r&&o.length>0||(a.node.type.name===t&&i.every(l=>n[l]===a.node.attrs[l])&&o.push(a),!(r&&o.length>0)&&(o=o.concat(a.querySelectorAll(t,n,r))))}),o}setAttribute(t){const{tr:n}=this.editor.state;n.setNodeMarkup(this.from,void 0,{...this.node.attrs,...t}),this.editor.view.dispatch(n)}}const YT=`.ProseMirror {
53
+ position: relative;
54
+ }
55
+
56
+ .ProseMirror {
57
+ word-wrap: break-word;
58
+ white-space: pre-wrap;
59
+ white-space: break-spaces;
60
+ -webkit-font-variant-ligatures: none;
61
+ font-variant-ligatures: none;
62
+ font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
63
+ }
64
+
65
+ .ProseMirror [contenteditable="false"] {
66
+ white-space: normal;
67
+ }
68
+
69
+ .ProseMirror [contenteditable="false"] [contenteditable="true"] {
70
+ white-space: pre-wrap;
71
+ }
72
+
73
+ .ProseMirror pre {
74
+ white-space: pre-wrap;
75
+ }
76
+
77
+ img.ProseMirror-separator {
78
+ display: inline !important;
79
+ border: none !important;
80
+ margin: 0 !important;
81
+ width: 0 !important;
82
+ height: 0 !important;
83
+ }
84
+
85
+ .ProseMirror-gapcursor {
86
+ display: none;
87
+ pointer-events: none;
88
+ position: absolute;
89
+ margin: 0;
90
+ }
91
+
92
+ .ProseMirror-gapcursor:after {
93
+ content: "";
94
+ display: block;
95
+ position: absolute;
96
+ top: -2px;
97
+ width: 20px;
98
+ border-top: 1px solid black;
99
+ animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
100
+ }
101
+
102
+ @keyframes ProseMirror-cursor-blink {
103
+ to {
104
+ visibility: hidden;
105
+ }
106
+ }
107
+
108
+ .ProseMirror-hideselection *::selection {
109
+ background: transparent;
110
+ }
111
+
112
+ .ProseMirror-hideselection *::-moz-selection {
113
+ background: transparent;
114
+ }
115
+
116
+ .ProseMirror-hideselection * {
117
+ caret-color: transparent;
118
+ }
119
+
120
+ .ProseMirror-focused .ProseMirror-gapcursor {
121
+ display: block;
122
+ }
123
+
124
+ .tippy-box[data-animation=fade][data-state=hidden] {
125
+ opacity: 0
126
+ }`;function JT(e,t,n){const r=document.querySelector("style[data-tiptap-style]");if(r!==null)return r;const o=document.createElement("style");return t&&o.setAttribute("nonce",t),o.setAttribute("data-tiptap-style",""),o.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(o),o}class QT extends cI{constructor(t={}){super(),this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:n})=>{throw n},onPaste:()=>null,onDrop:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(t),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("contentError",this.options.onContentError),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:n,slice:r,moved:o})=>this.options.onDrop(n,r,o)),this.on("paste",({event:n,slice:r})=>this.options.onPaste(n,r)),window.setTimeout(()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=JT(YT,this.options.injectNonce))}setOptions(t={}){this.options={...this.options,...t},!(!this.view||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(t,n=!0){this.setOptions({editable:t}),n&&this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(t,n){const r=Nx(n)?n(t,[...this.state.plugins]):[...this.state.plugins,t],o=this.state.reconfigure({plugins:r});return this.view.updateState(o),o}unregisterPlugin(t){if(this.isDestroyed)return;const n=this.state.plugins;let r=n;if([].concat(t).forEach(i=>{const a=typeof i=="string"?`${i}$`:i.key;r=n.filter(s=>!s.key.startsWith(a))}),n.length===r.length)return;const o=this.state.reconfigure({plugins:r});return this.view.updateState(o),o}createExtensionManager(){var t,n;const o=[...this.options.enableCoreExtensions?[UT,EI.configure({blockSeparator:(n=(t=this.options.coreExtensionOptions)===null||t===void 0?void 0:t.clipboardTextSerializer)===null||n===void 0?void 0:n.blockSeparator}),VT,qT,KT,XT,WT,GT].filter(i=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[i.name]!==!1:!0):[],...this.options.extensions].filter(i=>["extension","node","mark"].includes(i==null?void 0:i.type));this.extensionManager=new wa(o,this)}createCommandManager(){this.commandManager=new ad({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){var t;let n;try{n=Lh(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(a){if(!(a instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(a.message))throw a;this.emit("contentError",{editor:this,error:a,disableCollaboration:()=>{this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(s=>s.name!=="collaboration"),this.createExtensionManager()}}),n=Lh(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}const r=Ax(n,this.options.autofocus);this.view=new PR(this.options.element,{...this.options.editorProps,attributes:{role:"textbox",...(t=this.options.editorProps)===null||t===void 0?void 0:t.attributes},dispatchTransaction:this.dispatchTransaction.bind(this),state:xa.create({doc:n,selection:r||void 0})});const o=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(o),this.createNodeViews(),this.prependClass();const i=this.view.dom;i.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}captureTransaction(t){this.isCapturingTransaction=!0,t(),this.isCapturingTransaction=!1;const n=this.capturedTransaction;return this.capturedTransaction=null,n}dispatchTransaction(t){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=t;return}t.steps.forEach(a=>{var s;return(s=this.capturedTransaction)===null||s===void 0?void 0:s.step(a)});return}const n=this.state.apply(t),r=!this.state.selection.eq(n.selection);this.emit("beforeTransaction",{editor:this,transaction:t,nextState:n}),this.view.updateState(n),this.emit("transaction",{editor:this,transaction:t}),r&&this.emit("selectionUpdate",{editor:this,transaction:t});const o=t.getMeta("focus"),i=t.getMeta("blur");o&&this.emit("focus",{editor:this,event:o.event,transaction:t}),i&&this.emit("blur",{editor:this,event:i.event,transaction:t}),!(!t.docChanged||t.getMeta("preventUpdate"))&&this.emit("update",{editor:this,transaction:t})}getAttributes(t){return jx(this.state,t)}isActive(t,n){const r=typeof t=="string"?t:null,o=typeof t=="string"?n:t;return xT(this.state,r,o)}getJSON(){return this.state.doc.toJSON()}getHTML(){return Bm(this.state.doc.content,this.schema)}getText(t){const{blockSeparator:n=`
127
+
128
+ `,textSerializers:r={}}=t||{};return vT(this.state.doc,{blockSeparator:n,textSerializers:{...Rx(this.schema),...r}})}get isEmpty(){return dd(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){if(this.emit("destroy"),this.view){const t=this.view.dom;t&&t.editor&&delete t.editor,this.view.destroy()}this.removeAllListeners()}get isDestroyed(){var t;return!(!((t=this.view)===null||t===void 0)&&t.docView)}$node(t,n){var r;return((r=this.$doc)===null||r===void 0?void 0:r.querySelector(t,n))||null}$nodes(t,n){var r;return((r=this.$doc)===null||r===void 0?void 0:r.querySelectorAll(t,n))||null}$pos(t){const n=this.state.doc.resolve(t);return new Ii(n,this)}get $doc(){return this.$pos(0)}}function Ji(e){return new Cl({find:e.find,handler:({state:t,range:n,match:r})=>{const o=Dt(e.getAttributes,void 0,r);if(o===!1||o===null)return null;const{tr:i}=t,a=r[r.length-1],s=r[0];if(a){const l=s.search(/\S/),c=n.from+s.indexOf(a),u=c+a.length;if(Vm(n.from,n.to,t.doc).filter(h=>h.mark.type.excluded.find(v=>v===e.type&&v!==h.mark.type)).filter(h=>h.to>c).length)return null;u<n.to&&i.delete(u,n.to),c>n.from&&i.delete(n.from+l,c);const f=n.from+l+a.length;i.addMark(n.from+l,f,e.type.create(o||{})),i.removeStoredMark(e.type)}}})}function ZT(e){return new Cl({find:e.find,handler:({state:t,range:n,match:r})=>{const o=Dt(e.getAttributes,void 0,r)||{},{tr:i}=t,a=n.from;let s=n.to;const l=e.type.create(o);if(r[1]){const c=r[0].lastIndexOf(r[1]);let u=a+c;u>s?u=s:s=u+r[1].length;const d=r[0][r[0].length-1];i.insertText(d,a+r[0].length-1),i.replaceWith(u,s,l)}else if(r[0]){const c=e.type.isInline?a:a-1;i.insert(c,e.type.create(o)).delete(i.mapping.map(a),i.mapping.map(s))}i.scrollIntoView()}})}function Bh(e){return new Cl({find:e.find,handler:({state:t,range:n,match:r})=>{const o=t.doc.resolve(n.from),i=Dt(e.getAttributes,void 0,r)||{};if(!o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),e.type))return null;t.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,i)}})}function In(e){return new Cl({find:e.find,handler:({state:t,range:n,match:r})=>{let o=e.replace,i=n.from;const a=n.to;if(r[1]){const s=r[0].lastIndexOf(r[1]);o+=r[0].slice(s+r[1].length),i+=s;const l=i-a;l>0&&(o=r[0].slice(s-l,s)+o,i=a)}t.tr.insertText(o,i,a)}})}function Ba(e){return new Cl({find:e.find,handler:({state:t,range:n,match:r,chain:o})=>{const i=Dt(e.getAttributes,void 0,r)||{},a=t.tr.delete(n.from,n.to),l=a.doc.resolve(n.from).blockRange(),c=l&&Sm(l,e.type,i);if(!c)return null;if(a.wrap(l,c),e.keepMarks&&e.editor){const{selection:d,storedMarks:f}=t,{splittableMarks:h}=e.editor.extensionManager,m=f||d.$to.parentOffset&&d.$from.marks();if(m){const v=m.filter(g=>h.includes(g.type.name));a.ensureMarks(v)}}if(e.keepAttributes){const d=e.type.name==="bulletList"||e.type.name==="orderedList"?"listItem":"taskList";o().updateAttributes(d,i).run()}const u=a.doc.resolve(n.from-1).nodeBefore;u&&u.type===e.type&&yi(a.doc,n.from-1)&&(!e.joinPredicate||e.joinPredicate(r,u))&&a.join(n.from-1)}})}class En{constructor(t={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Dt(pt(this,"addOptions",{name:this.name}))),this.storage=Dt(pt(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new En(t)}configure(t={}){const n=this.extend({...this.config,addOptions:()=>ld(this.options,t)});return n.name=this.name,n.parent=this.parent,n}extend(t={}){const n=new En(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=Dt(pt(n,"addOptions",{name:n.name})),n.storage=Dt(pt(n,"addStorage",{name:n.name,options:n.options})),n}}class eA{constructor(t,n,r){this.isDragging=!1,this.component=t,this.editor=n.editor,this.options={stopEvent:null,ignoreMutation:null,...r},this.extension=n.extension,this.node=n.node,this.decorations=n.decorations,this.innerDecorations=n.innerDecorations,this.view=n.view,this.HTMLAttributes=n.HTMLAttributes,this.getPos=n.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(t){var n,r,o,i,a,s,l;const{view:c}=this.editor,u=t.target,d=u.nodeType===3?(n=u.parentElement)===null||n===void 0?void 0:n.closest("[data-drag-handle]"):u.closest("[data-drag-handle]");if(!this.dom||!((r=this.contentDOM)===null||r===void 0)&&r.contains(u)||!d)return;let f=0,h=0;if(this.dom!==d){const y=this.dom.getBoundingClientRect(),b=d.getBoundingClientRect(),C=(o=t.offsetX)!==null&&o!==void 0?o:(i=t.nativeEvent)===null||i===void 0?void 0:i.offsetX,x=(a=t.offsetY)!==null&&a!==void 0?a:(s=t.nativeEvent)===null||s===void 0?void 0:s.offsetY;f=b.x-y.x+C,h=b.y-y.y+x}(l=t.dataTransfer)===null||l===void 0||l.setDragImage(this.dom,f,h);const m=this.getPos();if(typeof m!="number")return;const v=yt.create(c.state.doc,m),g=c.state.tr.setSelection(v);c.dispatch(g)}stopEvent(t){var n;if(!this.dom)return!1;if(typeof this.options.stopEvent=="function")return this.options.stopEvent({event:t});const r=t.target;if(!(this.dom.contains(r)&&!(!((n=this.contentDOM)===null||n===void 0)&&n.contains(r))))return!1;const i=t.type.startsWith("drag"),a=t.type==="drop";if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(r.tagName)||r.isContentEditable)&&!a&&!i)return!0;const{isEditable:l}=this.editor,{isDragging:c}=this,u=!!this.node.type.spec.draggable,d=yt.isSelectable(this.node),f=t.type==="copy",h=t.type==="paste",m=t.type==="cut",v=t.type==="mousedown";if(!u&&d&&i&&t.target===this.dom&&t.preventDefault(),u&&i&&!c&&t.target===this.dom)return t.preventDefault(),!1;if(u&&l&&!c&&v){const g=r.closest("[data-drag-handle]");g&&(this.dom===g||this.dom.contains(g))&&(this.isDragging=!0,document.addEventListener("dragend",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("drop",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("mouseup",()=>{this.isDragging=!1},{once:!0}))}return!(c||a||f||h||m||v&&d)}ignoreMutation(t){return!this.dom||!this.contentDOM?!0:typeof this.options.ignoreMutation=="function"?this.options.ignoreMutation({mutation:t}):this.node.isLeaf||this.node.isAtom?!0:t.type==="selection"||this.dom.contains(t.target)&&t.type==="childList"&&(cd()||Px())&&this.editor.isFocused&&[...Array.from(t.addedNodes),...Array.from(t.removedNodes)].every(r=>r.isContentEditable)?!1:this.contentDOM===t.target&&t.type==="attributes"?!0:!this.contentDOM.contains(t.target)}updateAttributes(t){this.editor.commands.command(({tr:n})=>{const r=this.getPos();return typeof r!="number"?!1:(n.setNodeMarkup(r,void 0,{...this.node.attrs,...t}),!0)})}deleteNode(){const t=this.getPos();if(typeof t!="number")return;const n=t+this.node.nodeSize;this.editor.commands.deleteRange({from:t,to:n})}}function mi(e){return new bI({find:e.find,handler:({state:t,range:n,match:r,pasteEvent:o})=>{const i=Dt(e.getAttributes,void 0,r,o);if(i===!1||i===null)return null;const{tr:a}=t,s=r[r.length-1],l=r[0];let c=n.to;if(s){const u=l.search(/\S/),d=n.from+l.indexOf(s),f=d+s.length;if(Vm(n.from,n.to,t.doc).filter(m=>m.mark.type.excluded.find(g=>g===e.type&&g!==m.mark.type)).filter(m=>m.to>d).length)return null;f<n.to&&a.delete(f,n.to),d>n.from&&a.delete(n.from+u,d),c=n.from+u+s.length,a.addMark(n.from+u,c,e.type.create(i||{})),a.removeStoredMark(e.type)}}})}function tA(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var zh={exports:{}},gf={};/**
129
+ * @license React
130
+ * use-sync-external-store-shim.production.min.js
131
+ *
132
+ * Copyright (c) Facebook, Inc. and its affiliates.
133
+ *
134
+ * This source code is licensed under the MIT license found in the
135
+ * LICENSE file in the root directory of this source tree.
136
+ */var Ob;function nA(){if(Ob)return gf;Ob=1;var e=O;function t(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function s(d,f){var h=f(),m=r({inst:{value:h,getSnapshot:f}}),v=m[0].inst,g=m[1];return i(function(){v.value=h,v.getSnapshot=f,l(v)&&g({inst:v})},[d,h,f]),o(function(){return l(v)&&g({inst:v}),d(function(){l(v)&&g({inst:v})})},[d]),a(h),h}function l(d){var f=d.getSnapshot;d=d.value;try{var h=f();return!n(d,h)}catch{return!0}}function c(d,f){return f()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:s;return gf.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,gf}var vf={};/**
137
+ * @license React
138
+ * use-sync-external-store-shim.development.js
139
+ *
140
+ * Copyright (c) Facebook, Inc. and its affiliates.
141
+ *
142
+ * This source code is licensed under the MIT license found in the
143
+ * LICENSE file in the root directory of this source tree.
144
+ */var $b;function rA(){return $b||($b=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=O,t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(C){{for(var x=arguments.length,S=new Array(x>1?x-1:0),w=1;w<x;w++)S[w-1]=arguments[w];r("error",C,S)}}function r(C,x,S){{var w=t.ReactDebugCurrentFrame,E=w.getStackAddendum();E!==""&&(x+="%s",S=S.concat([E]));var N=S.map(function($){return String($)});N.unshift("Warning: "+x),Function.prototype.apply.call(console[C],console,N)}}function o(C,x){return C===x&&(C!==0||1/C===1/x)||C!==C&&x!==x}var i=typeof Object.is=="function"?Object.is:o,a=e.useState,s=e.useEffect,l=e.useLayoutEffect,c=e.useDebugValue,u=!1,d=!1;function f(C,x,S){u||e.startTransition!==void 0&&(u=!0,n("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var w=x();if(!d){var E=x();i(w,E)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}var N=a({inst:{value:w,getSnapshot:x}}),$=N[0].inst,M=N[1];return l(function(){$.value=w,$.getSnapshot=x,h($)&&M({inst:$})},[C,w,x]),s(function(){h($)&&M({inst:$});var R=function(){h($)&&M({inst:$})};return C(R)},[C]),c(w),w}function h(C){var x=C.getSnapshot,S=C.value;try{var w=x();return!i(S,w)}catch{return!0}}function m(C,x,S){return x()}var v=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",g=!v,y=g?m:f,b=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:y;vf.useSyncExternalStore=b,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),vf}process.env.NODE_ENV==="production"?zh.exports=nA():zh.exports=rA();var fd=zh.exports;const oA=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n&&(n.current=t)})},iA=({contentComponent:e})=>{const t=fd.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getServerSnapshot);return O.createElement(O.Fragment,null,Object.values(t))};function aA(){const e=new Set;let t={};return{subscribe(n){return e.add(n),()=>{e.delete(n)}},getSnapshot(){return t},getServerSnapshot(){return t},setRenderer(n,r){t={...t,[n]:jr.createPortal(r.reactElement,r.element,n)},e.forEach(o=>o())},removeRenderer(n){const r={...t};delete r[n],t=r,e.forEach(o=>o())}}}class sA extends O.Component{constructor(t){var n;super(t),this.editorContentRef=O.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:!!(!((n=t.editor)===null||n===void 0)&&n.contentComponent)}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){const t=this.props.editor;if(t&&!t.isDestroyed&&t.options.element){if(t.contentComponent)return;const n=this.editorContentRef.current;n.append(...t.options.element.childNodes),t.setOptions({element:n}),t.contentComponent=aA(),this.state.hasContentComponentInitialized||(this.unsubscribeToContentComponent=t.contentComponent.subscribe(()=>{this.setState(r=>r.hasContentComponentInitialized?r:{hasContentComponentInitialized:!0}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()})),t.createNodeViews(),this.initialized=!0}}componentWillUnmount(){const t=this.props.editor;if(!t||(this.initialized=!1,t.isDestroyed||t.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),t.contentComponent=null,!t.options.element.firstChild))return;const n=document.createElement("div");n.append(...t.options.element.childNodes),t.setOptions({element:n})}render(){const{editor:t,innerRef:n,...r}=this.props;return O.createElement(O.Fragment,null,O.createElement("div",{ref:oA(n,this.editorContentRef),...r}),(t==null?void 0:t.contentComponent)&&O.createElement(iA,{contentComponent:t.contentComponent}))}}const lA=O.forwardRef((e,t)=>{const n=O.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[e.editor]);return O.createElement(sA,{key:n,innerRef:t,...e})}),cA=O.memo(lA);var uA=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!e(t[o],n[o]))return!1;return!0}if(t instanceof Map&&n instanceof Map){if(t.size!==n.size)return!1;for(o of t.entries())if(!n.has(o[0]))return!1;for(o of t.entries())if(!e(o[1],n.get(o[0])))return!1;return!0}if(t instanceof Set&&n instanceof Set){if(t.size!==n.size)return!1;for(o of t.entries())if(!n.has(o[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(n)){if(r=t.length,r!=n.length)return!1;for(o=r;o--!==0;)if(t[o]!==n[o])return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(i=Object.keys(t),r=i.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=r;o--!==0;){var a=i[o];if(!(a==="_owner"&&t.$$typeof)&&!e(t[a],n[a]))return!1}return!0}return t!==t&&n!==n},dA=tA(uA),Fh={exports:{}},bf={};/**
145
+ * @license React
146
+ * use-sync-external-store-shim/with-selector.production.min.js
147
+ *
148
+ * Copyright (c) Facebook, Inc. and its affiliates.
149
+ *
150
+ * This source code is licensed under the MIT license found in the
151
+ * LICENSE file in the root directory of this source tree.
152
+ */var Nb;function fA(){if(Nb)return bf;Nb=1;var e=O,t=fd;function n(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,i=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;return bf.useSyncExternalStoreWithSelector=function(c,u,d,f,h){var m=i(null);if(m.current===null){var v={hasValue:!1,value:null};m.current=v}else v=m.current;m=s(function(){function y(w){if(!b){if(b=!0,C=w,w=f(w),h!==void 0&&v.hasValue){var E=v.value;if(h(E,w))return x=E}return x=w}if(E=x,r(C,w))return E;var N=f(w);return h!==void 0&&h(E,N)?E:(C=w,x=N)}var b=!1,C,x,S=d===void 0?null:d;return[function(){return y(u())},S===null?void 0:function(){return y(S())}]},[u,d,f,h]);var g=o(c,m[0],m[1]);return a(function(){v.hasValue=!0,v.value=g},[g]),l(g),g},bf}var yf={};/**
153
+ * @license React
154
+ * use-sync-external-store-shim/with-selector.development.js
155
+ *
156
+ * Copyright (c) Facebook, Inc. and its affiliates.
157
+ *
158
+ * This source code is licensed under the MIT license found in the
159
+ * LICENSE file in the root directory of this source tree.
160
+ */var Mb;function hA(){return Mb||(Mb=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=O,t=fd;function n(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,i=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;function c(u,d,f,h,m){var v=i(null),g;v.current===null?(g={hasValue:!1,value:null},v.current=g):g=v.current;var y=s(function(){var S=!1,w,E,N=function(k){if(!S){S=!0,w=k;var D=h(k);if(m!==void 0&&g.hasValue){var A=g.value;if(m(A,D))return E=A,A}return E=D,D}var L=w,T=E;if(r(L,k))return T;var I=h(k);return m!==void 0&&m(T,I)?T:(w=k,E=I,I)},$=f===void 0?null:f,M=function(){return N(d())},R=$===null?void 0:function(){return N($())};return[M,R]},[d,f,h,m]),b=y[0],C=y[1],x=o(u,b,C);return a(function(){g.hasValue=!0,g.value=x},[x]),l(x),x}yf.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),yf}process.env.NODE_ENV==="production"?Fh.exports=fA():Fh.exports=hA();var pA=Fh.exports;const mA=typeof window<"u"?O.useLayoutEffect:O.useEffect;class gA{constructor(t){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=t,this.lastSnapshot={editor:t,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber?this.lastSnapshot:(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot)}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(t){return this.subscribers.add(t),()=>{this.subscribers.delete(t)}}watch(t){if(this.editor=t,this.editor){const n=()=>{this.transactionNumber+=1,this.subscribers.forEach(o=>o())},r=this.editor;return r.on("transaction",n),()=>{r.off("transaction",n)}}}}function vA(e){var t;const[n]=O.useState(()=>new gA(e.editor)),r=pA.useSyncExternalStoreWithSelector(n.subscribe,n.getSnapshot,n.getServerSnapshot,e.selector,(t=e.equalityFn)!==null&&t!==void 0?t:dA);return mA(()=>n.watch(e.editor),[e.editor,n]),O.useDebugValue(r),r}const Rb=process.env.NODE_ENV!=="production",Hh=typeof window>"u",bA=Hh||!!(typeof window<"u"&&window.next);class Wm{constructor(t){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=t,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(t){this.editor=t,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(n=>n())}getInitialEditor(){if(this.options.current.immediatelyRender===void 0)return Hh||bA?(Rb&&console.warn("Tiptap Error: SSR has been detected, please set `immediatelyRender` explicitly to `false` to avoid hydration mismatches."),null):this.createEditor();if(this.options.current.immediatelyRender&&Hh&&Rb)throw new Error("Tiptap Error: SSR has been detected, and `immediatelyRender` has been set to `true` this is an unsupported configuration that may result in errors, explicitly set `immediatelyRender` to `false` to avoid hydration mismatches.");return this.options.current.immediatelyRender?this.createEditor():null}createEditor(){const t={...this.options.current,onBeforeCreate:(...r)=>{var o,i;return(i=(o=this.options.current).onBeforeCreate)===null||i===void 0?void 0:i.call(o,...r)},onBlur:(...r)=>{var o,i;return(i=(o=this.options.current).onBlur)===null||i===void 0?void 0:i.call(o,...r)},onCreate:(...r)=>{var o,i;return(i=(o=this.options.current).onCreate)===null||i===void 0?void 0:i.call(o,...r)},onDestroy:(...r)=>{var o,i;return(i=(o=this.options.current).onDestroy)===null||i===void 0?void 0:i.call(o,...r)},onFocus:(...r)=>{var o,i;return(i=(o=this.options.current).onFocus)===null||i===void 0?void 0:i.call(o,...r)},onSelectionUpdate:(...r)=>{var o,i;return(i=(o=this.options.current).onSelectionUpdate)===null||i===void 0?void 0:i.call(o,...r)},onTransaction:(...r)=>{var o,i;return(i=(o=this.options.current).onTransaction)===null||i===void 0?void 0:i.call(o,...r)},onUpdate:(...r)=>{var o,i;return(i=(o=this.options.current).onUpdate)===null||i===void 0?void 0:i.call(o,...r)},onContentError:(...r)=>{var o,i;return(i=(o=this.options.current).onContentError)===null||i===void 0?void 0:i.call(o,...r)},onDrop:(...r)=>{var o,i;return(i=(o=this.options.current).onDrop)===null||i===void 0?void 0:i.call(o,...r)},onPaste:(...r)=>{var o,i;return(i=(o=this.options.current).onPaste)===null||i===void 0?void 0:i.call(o,...r)}};return new QT(t)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(t){return this.subscriptions.add(t),()=>{this.subscriptions.delete(t)}}static compareOptions(t,n){return Object.keys(t).every(r=>["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(r)?!0:r==="extensions"&&t.extensions&&n.extensions?t.extensions.length!==n.extensions.length?!1:t.extensions.every((o,i)=>{var a;return o===((a=n.extensions)===null||a===void 0?void 0:a[i])}):t[r]===n[r])}onRender(t){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&t.length===0?Wm.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(t),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(t){if(this.editor&&!this.editor.isDestroyed){if(this.previousDeps===null){this.previousDeps=t;return}if(this.previousDeps.length===t.length&&this.previousDeps.every((r,o)=>r===t[o]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=t}scheduleDestroy(){const t=this.instanceId,n=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===t){n&&n.setOptions(this.options.current);return}n&&!n.isDestroyed&&(n.destroy(),this.instanceId===t&&this.setEditor(null))},1)}}function yA(e={},t=[]){const n=O.useRef(e);n.current=e;const[r]=O.useState(()=>new Wm(n)),o=fd.useSyncExternalStore(r.subscribe,r.getEditor,r.getServerSnapshot);return O.useDebugValue(o),O.useEffect(r.onRender(t)),vA({editor:o,selector:({transactionNumber:i})=>e.shouldRerenderOnTransaction===!1?null:e.immediatelyRender&&i===0?0:i+1}),o}const CA=O.createContext({editor:null});CA.Consumer;const zx=O.createContext({onDragStart:void 0}),Fx=()=>O.useContext(zx),SA=e=>{const t=e.as||"div",{nodeViewContentRef:n}=Fx();return O.createElement(t,{...e,ref:n,"data-node-view-content":"",style:{whiteSpace:"pre-wrap",...e.style}})},Um=O.forwardRef((e,t)=>{const{onDragStart:n}=Fx(),r=e.as||"div";return O.createElement(r,{...e,ref:t,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...e.style}})});function xA(e){return!!(typeof e=="function"&&e.prototype&&e.prototype.isReactComponent)}function wA(e){var t;return typeof e=="object"&&((t=e.$$typeof)===null||t===void 0?void 0:t.toString())==="Symbol(react.forward_ref)"}class EA{constructor(t,{editor:n,props:r={},as:o="div",className:i=""}){this.ref=null,this.id=Math.floor(Math.random()*4294967295).toString(),this.component=t,this.editor=n,this.props=r,this.element=document.createElement(o),this.element.classList.add("react-renderer"),i&&this.element.classList.add(...i.split(" ")),this.editor.isInitialized?jr.flushSync(()=>{this.render()}):this.render()}render(){var t;const n=this.component,r=this.props,o=this.editor;(xA(n)||wA(n))&&(r.ref=i=>{this.ref=i}),this.reactElement=O.createElement(n,{...r}),(t=o==null?void 0:o.contentComponent)===null||t===void 0||t.setRenderer(this.id,this)}updateProps(t={}){this.props={...this.props,...t},this.render()}destroy(){var t;const n=this.editor;(t=n==null?void 0:n.contentComponent)===null||t===void 0||t.removeRenderer(this.id)}updateAttributes(t){Object.keys(t).forEach(n=>{this.element.setAttribute(n,t[n])})}}class OA extends eA{mount(){const t={editor:this.editor,node:this.node,decorations:this.decorations,innerDecorations:this.innerDecorations,view:this.view,selected:!1,extension:this.extension,HTMLAttributes:this.HTMLAttributes,getPos:()=>this.getPos(),updateAttributes:(c={})=>this.updateAttributes(c),deleteNode:()=>this.deleteNode()};if(!this.component.displayName){const c=u=>u.charAt(0).toUpperCase()+u.substring(1);this.component.displayName=c(this.extension.name)}const o={onDragStart:this.onDragStart.bind(this),nodeViewContentRef:c=>{c&&this.contentDOMElement&&c.firstChild!==this.contentDOMElement&&c.appendChild(this.contentDOMElement)}},i=this.component,a=O.memo(c=>O.createElement(zx.Provider,{value:o},O.createElement(i,c)));a.displayName="ReactNodeView",this.node.isLeaf?this.contentDOMElement=null:this.options.contentDOMElementTag?this.contentDOMElement=document.createElement(this.options.contentDOMElementTag):this.contentDOMElement=document.createElement(this.node.isInline?"span":"div"),this.contentDOMElement&&(this.contentDOMElement.dataset.nodeViewContentReact="",this.contentDOMElement.style.whiteSpace="inherit");let s=this.node.isInline?"span":"div";this.options.as&&(s=this.options.as);const{className:l=""}=this.options;this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.renderer=new EA(a,{editor:this.editor,props:t,as:s,className:`node-${this.node.type.name} ${l}`.trim()}),this.editor.on("selectionUpdate",this.handleSelectionUpdate),this.updateElementAttributes()}get dom(){var t;if(this.renderer.element.firstElementChild&&!(!((t=this.renderer.element.firstElementChild)===null||t===void 0)&&t.hasAttribute("data-node-view-wrapper")))throw Error("Please use the NodeViewWrapper component for your node view.");return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.contentDOMElement}handleSelectionUpdate(){const{from:t,to:n}=this.editor.state.selection,r=this.getPos();if(typeof r=="number")if(t<=r&&n>=r+this.node.nodeSize){if(this.renderer.props.selected)return;this.selectNode()}else{if(!this.renderer.props.selected)return;this.deselectNode()}}update(t,n,r){const o=i=>{this.renderer.updateProps(i),typeof this.options.attrs=="function"&&this.updateElementAttributes()};if(t.type!==this.node.type)return!1;if(typeof this.options.update=="function"){const i=this.node,a=this.decorations,s=this.innerDecorations;return this.node=t,this.decorations=n,this.innerDecorations=r,this.options.update({oldNode:i,oldDecorations:a,newNode:t,newDecorations:n,oldInnerDecorations:s,innerDecorations:r,updateProps:()=>o({node:t,decorations:n,innerDecorations:r})})}return t===this.node&&this.decorations===n&&this.innerDecorations===r||(this.node=t,this.decorations=n,this.innerDecorations=r,o({node:t,decorations:n,innerDecorations:r})),!0}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element.classList.add("ProseMirror-selectednode")}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element.classList.remove("ProseMirror-selectednode")}destroy(){this.renderer.destroy(),this.editor.off("selectionUpdate",this.handleSelectionUpdate),this.contentDOMElement=null}updateElementAttributes(){if(this.options.attrs){let t={};if(typeof this.options.attrs=="function"){const n=this.editor.extensionManager.attributes,r=ru(this.node,n);t=this.options.attrs({node:this.node,HTMLAttributes:r})}else t=this.options.attrs;this.renderer.updateAttributes(t)}}}function qm(e,t){return n=>n.editor.contentComponent?new OA(e,n,t):{}}/*! @license DOMPurify 3.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.1/LICENSE */const{entries:Hx,setPrototypeOf:Ib,isFrozen:$A,getPrototypeOf:NA,getOwnPropertyDescriptor:MA}=Object;let{freeze:fr,seal:Br,create:Vh}=Object,{apply:Wh,construct:Uh}=typeof Reflect<"u"&&Reflect;fr||(fr=function(t){return t});Br||(Br=function(t){return t});Wh||(Wh=function(t,n){for(var r=arguments.length,o=new Array(r>2?r-2:0),i=2;i<r;i++)o[i-2]=arguments[i];return t.apply(n,o)});Uh||(Uh=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return new t(...r)});const ec=hr(Array.prototype.forEach),RA=hr(Array.prototype.lastIndexOf),Tb=hr(Array.prototype.pop),us=hr(Array.prototype.push),IA=hr(Array.prototype.splice),$c=hr(String.prototype.toLowerCase),Cf=hr(String.prototype.toString),Sf=hr(String.prototype.match),ds=hr(String.prototype.replace),TA=hr(String.prototype.indexOf),AA=hr(String.prototype.trim),qr=hr(Object.prototype.hasOwnProperty),lr=hr(RegExp.prototype.test),fs=PA(TypeError);function hr(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return Wh(e,t,r)}}function PA(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Uh(e,n)}}function Wt(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:$c;Ib&&Ib(e,null);let r=t.length;for(;r--;){let o=t[r];if(typeof o=="string"){const i=n(o);i!==o&&($A(t)||(t[r]=i),o=i)}e[o]=!0}return e}function kA(e){for(let t=0;t<e.length;t++)qr(e,t)||(e[t]=null);return e}function lo(e){const t=Vh(null);for(const[n,r]of Hx(e))qr(e,n)&&(Array.isArray(r)?t[n]=kA(r):r&&typeof r=="object"&&r.constructor===Object?t[n]=lo(r):t[n]=r);return t}function hs(e,t){for(;e!==null;){const r=MA(e,t);if(r){if(r.get)return hr(r.get);if(typeof r.value=="function")return hr(r.value)}e=NA(e)}function n(){return null}return n}const Ab=fr(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),xf=fr(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),wf=fr(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),DA=fr(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Ef=fr(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),_A=fr(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Pb=fr(["#text"]),kb=fr(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Of=fr(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Db=fr(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),tc=fr(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),LA=Br(/\{\{[\w\W]*|[\w\W]*\}\}/gm),jA=Br(/<%[\w\W]*|[\w\W]*%>/gm),BA=Br(/\$\{[\w\W]*/gm),zA=Br(/^data-[\-\w.\u00B7-\uFFFF]+$/),FA=Br(/^aria-[\-\w]+$/),Vx=Br(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),HA=Br(/^(?:\w+script|data):/i),VA=Br(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Wx=Br(/^html$/i),WA=Br(/^[a-z][.\w]*(-[.\w]+)+$/i);var _b=Object.freeze({__proto__:null,ARIA_ATTR:FA,ATTR_WHITESPACE:VA,CUSTOM_ELEMENT:WA,DATA_ATTR:zA,DOCTYPE_NAME:Wx,ERB_EXPR:jA,IS_ALLOWED_URI:Vx,IS_SCRIPT_OR_DATA:HA,MUSTACHE_EXPR:LA,TMPLIT_EXPR:BA});const ps={element:1,text:3,progressingInstruction:7,comment:8,document:9},UA=function(){return typeof window>"u"?null:window},qA=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const o="data-tt-policy-suffix";n&&n.hasAttribute(o)&&(r=n.getAttribute(o));const i="dompurify"+(r?"#"+r:"");try{return t.createPolicy(i,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}},Lb=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Ux(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:UA();const t=Ye=>Ux(Ye);if(t.version="3.3.1",t.removed=[],!e||!e.document||e.document.nodeType!==ps.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e;const r=n,o=r.currentScript,{DocumentFragment:i,HTMLTemplateElement:a,Node:s,Element:l,NodeFilter:c,NamedNodeMap:u=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:f,trustedTypes:h}=e,m=l.prototype,v=hs(m,"cloneNode"),g=hs(m,"remove"),y=hs(m,"nextSibling"),b=hs(m,"childNodes"),C=hs(m,"parentNode");if(typeof a=="function"){const Ye=n.createElement("template");Ye.content&&Ye.content.ownerDocument&&(n=Ye.content.ownerDocument)}let x,S="";const{implementation:w,createNodeIterator:E,createDocumentFragment:N,getElementsByTagName:$}=n,{importNode:M}=r;let R=Lb();t.isSupported=typeof Hx=="function"&&typeof C=="function"&&w&&w.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:k,ERB_EXPR:D,TMPLIT_EXPR:A,DATA_ATTR:L,ARIA_ATTR:T,IS_SCRIPT_OR_DATA:I,ATTR_WHITESPACE:_,CUSTOM_ELEMENT:W}=_b;let{IS_ALLOWED_URI:H}=_b,B=null;const K=Wt({},[...Ab,...xf,...wf,...Ef,...Pb]);let Y=null;const V=Wt({},[...kb,...Of,...Db,...tc]);let G=Object.seal(Vh(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Q=null,ce=null;const Z=Object.seal(Vh(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let he=!0,ye=!0,fe=!1,ae=!0,ve=!1,ne=!0,se=!1,pe=!1,Ne=!1,Me=!1,$e=!1,Be=!1,F=!0,be=!1;const ue="user-content-";let me=!0,Re=!1,Te={},xe=null;const Ve=Wt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let qe=null;const Pe=Wt({},["audio","video","img","source","image","track"]);let Ke=null;const Je=Wt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),De="http://www.w3.org/1998/Math/MathML",ze="http://www.w3.org/2000/svg",_e="http://www.w3.org/1999/xhtml";let We=_e,rt=!1,gt=null;const Lt=Wt({},[De,ze,_e],Cf);let Tt=Wt({},["mi","mo","mn","ms","mtext"]),Zt=Wt({},["annotation-xml"]);const tt=Wt({},["title","style","font","a","script"]);let Ue=null;const ft=["application/xhtml+xml","text/html"],dt="text/html";let st=null,Ze=null;const Xe=n.createElement("form"),Qe=function(J){return J instanceof RegExp||J instanceof Function},wt=function(){let J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Ze&&Ze===J)){if((!J||typeof J!="object")&&(J={}),J=lo(J),Ue=ft.indexOf(J.PARSER_MEDIA_TYPE)===-1?dt:J.PARSER_MEDIA_TYPE,st=Ue==="application/xhtml+xml"?Cf:$c,B=qr(J,"ALLOWED_TAGS")?Wt({},J.ALLOWED_TAGS,st):K,Y=qr(J,"ALLOWED_ATTR")?Wt({},J.ALLOWED_ATTR,st):V,gt=qr(J,"ALLOWED_NAMESPACES")?Wt({},J.ALLOWED_NAMESPACES,Cf):Lt,Ke=qr(J,"ADD_URI_SAFE_ATTR")?Wt(lo(Je),J.ADD_URI_SAFE_ATTR,st):Je,qe=qr(J,"ADD_DATA_URI_TAGS")?Wt(lo(Pe),J.ADD_DATA_URI_TAGS,st):Pe,xe=qr(J,"FORBID_CONTENTS")?Wt({},J.FORBID_CONTENTS,st):Ve,Q=qr(J,"FORBID_TAGS")?Wt({},J.FORBID_TAGS,st):lo({}),ce=qr(J,"FORBID_ATTR")?Wt({},J.FORBID_ATTR,st):lo({}),Te=qr(J,"USE_PROFILES")?J.USE_PROFILES:!1,he=J.ALLOW_ARIA_ATTR!==!1,ye=J.ALLOW_DATA_ATTR!==!1,fe=J.ALLOW_UNKNOWN_PROTOCOLS||!1,ae=J.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ve=J.SAFE_FOR_TEMPLATES||!1,ne=J.SAFE_FOR_XML!==!1,se=J.WHOLE_DOCUMENT||!1,Me=J.RETURN_DOM||!1,$e=J.RETURN_DOM_FRAGMENT||!1,Be=J.RETURN_TRUSTED_TYPE||!1,Ne=J.FORCE_BODY||!1,F=J.SANITIZE_DOM!==!1,be=J.SANITIZE_NAMED_PROPS||!1,me=J.KEEP_CONTENT!==!1,Re=J.IN_PLACE||!1,H=J.ALLOWED_URI_REGEXP||Vx,We=J.NAMESPACE||_e,Tt=J.MATHML_TEXT_INTEGRATION_POINTS||Tt,Zt=J.HTML_INTEGRATION_POINTS||Zt,G=J.CUSTOM_ELEMENT_HANDLING||{},J.CUSTOM_ELEMENT_HANDLING&&Qe(J.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(G.tagNameCheck=J.CUSTOM_ELEMENT_HANDLING.tagNameCheck),J.CUSTOM_ELEMENT_HANDLING&&Qe(J.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(G.attributeNameCheck=J.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),J.CUSTOM_ELEMENT_HANDLING&&typeof J.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(G.allowCustomizedBuiltInElements=J.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ve&&(ye=!1),$e&&(Me=!0),Te&&(B=Wt({},Pb),Y=[],Te.html===!0&&(Wt(B,Ab),Wt(Y,kb)),Te.svg===!0&&(Wt(B,xf),Wt(Y,Of),Wt(Y,tc)),Te.svgFilters===!0&&(Wt(B,wf),Wt(Y,Of),Wt(Y,tc)),Te.mathMl===!0&&(Wt(B,Ef),Wt(Y,Db),Wt(Y,tc))),J.ADD_TAGS&&(typeof J.ADD_TAGS=="function"?Z.tagCheck=J.ADD_TAGS:(B===K&&(B=lo(B)),Wt(B,J.ADD_TAGS,st))),J.ADD_ATTR&&(typeof J.ADD_ATTR=="function"?Z.attributeCheck=J.ADD_ATTR:(Y===V&&(Y=lo(Y)),Wt(Y,J.ADD_ATTR,st))),J.ADD_URI_SAFE_ATTR&&Wt(Ke,J.ADD_URI_SAFE_ATTR,st),J.FORBID_CONTENTS&&(xe===Ve&&(xe=lo(xe)),Wt(xe,J.FORBID_CONTENTS,st)),J.ADD_FORBID_CONTENTS&&(xe===Ve&&(xe=lo(xe)),Wt(xe,J.ADD_FORBID_CONTENTS,st)),me&&(B["#text"]=!0),se&&Wt(B,["html","head","body"]),B.table&&(Wt(B,["tbody"]),delete Q.tbody),J.TRUSTED_TYPES_POLICY){if(typeof J.TRUSTED_TYPES_POLICY.createHTML!="function")throw fs('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof J.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw fs('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');x=J.TRUSTED_TYPES_POLICY,S=x.createHTML("")}else x===void 0&&(x=qA(h,o)),x!==null&&typeof S=="string"&&(S=x.createHTML(""));fr&&fr(J),Ze=J}},At=Wt({},[...xf,...wf,...DA]),it=Wt({},[...Ef,..._A]),Ge=function(J){let le=C(J);(!le||!le.tagName)&&(le={namespaceURI:We,tagName:"template"});const we=$c(J.tagName),ke=$c(le.tagName);return gt[J.namespaceURI]?J.namespaceURI===ze?le.namespaceURI===_e?we==="svg":le.namespaceURI===De?we==="svg"&&(ke==="annotation-xml"||Tt[ke]):!!At[we]:J.namespaceURI===De?le.namespaceURI===_e?we==="math":le.namespaceURI===ze?we==="math"&&Zt[ke]:!!it[we]:J.namespaceURI===_e?le.namespaceURI===ze&&!Zt[ke]||le.namespaceURI===De&&!Tt[ke]?!1:!it[we]&&(tt[we]||!At[we]):!!(Ue==="application/xhtml+xml"&&gt[J.namespaceURI]):!1},et=function(J){us(t.removed,{element:J});try{C(J).removeChild(J)}catch{g(J)}},lt=function(J,le){try{us(t.removed,{attribute:le.getAttributeNode(J),from:le})}catch{us(t.removed,{attribute:null,from:le})}if(le.removeAttribute(J),J==="is")if(Me||$e)try{et(le)}catch{}else try{le.setAttribute(J,"")}catch{}},ct=function(J){let le=null,we=null;if(Ne)J="<remove></remove>"+J;else{const ot=Sf(J,/^[\r\n\t ]+/);we=ot&&ot[0]}Ue==="application/xhtml+xml"&&We===_e&&(J='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+J+"</body></html>");const ke=x?x.createHTML(J):J;if(We===_e)try{le=new f().parseFromString(ke,Ue)}catch{}if(!le||!le.documentElement){le=w.createDocument(We,"template",null);try{le.documentElement.innerHTML=rt?S:ke}catch{}}const Ie=le.body||le.documentElement;return J&&we&&Ie.insertBefore(n.createTextNode(we),Ie.childNodes[0]||null),We===_e?$.call(le,se?"html":"body")[0]:se?le.documentElement:Ie},vt=function(J){return E.call(J.ownerDocument||J,J,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},jt=function(J){return J instanceof d&&(typeof J.nodeName!="string"||typeof J.textContent!="string"||typeof J.removeChild!="function"||!(J.attributes instanceof u)||typeof J.removeAttribute!="function"||typeof J.setAttribute!="function"||typeof J.namespaceURI!="string"||typeof J.insertBefore!="function"||typeof J.hasChildNodes!="function")},It=function(J){return typeof s=="function"&&J instanceof s};function zt(Ye,J,le){ec(Ye,we=>{we.call(t,J,le,Ze)})}const Pt=function(J){let le=null;if(zt(R.beforeSanitizeElements,J,null),jt(J))return et(J),!0;const we=st(J.nodeName);if(zt(R.uponSanitizeElement,J,{tagName:we,allowedTags:B}),ne&&J.hasChildNodes()&&!It(J.firstElementChild)&&lr(/<[/\w!]/g,J.innerHTML)&&lr(/<[/\w!]/g,J.textContent)||J.nodeType===ps.progressingInstruction||ne&&J.nodeType===ps.comment&&lr(/<[/\w]/g,J.data))return et(J),!0;if(!(Z.tagCheck instanceof Function&&Z.tagCheck(we))&&(!B[we]||Q[we])){if(!Q[we]&&qt(we)&&(G.tagNameCheck instanceof RegExp&&lr(G.tagNameCheck,we)||G.tagNameCheck instanceof Function&&G.tagNameCheck(we)))return!1;if(me&&!xe[we]){const ke=C(J)||J.parentNode,Ie=b(J)||J.childNodes;if(Ie&&ke){const ot=Ie.length;for(let bt=ot-1;bt>=0;--bt){const St=v(Ie[bt],!0);St.__removalCount=(J.__removalCount||0)+1,ke.insertBefore(St,y(J))}}}return et(J),!0}return J instanceof l&&!Ge(J)||(we==="noscript"||we==="noembed"||we==="noframes")&&lr(/<\/no(script|embed|frames)/i,J.innerHTML)?(et(J),!0):(ve&&J.nodeType===ps.text&&(le=J.textContent,ec([k,D,A],ke=>{le=ds(le,ke," ")}),J.textContent!==le&&(us(t.removed,{element:J.cloneNode()}),J.textContent=le)),zt(R.afterSanitizeElements,J,null),!1)},Vt=function(J,le,we){if(F&&(le==="id"||le==="name")&&(we in n||we in Xe))return!1;if(!(ye&&!ce[le]&&lr(L,le))){if(!(he&&lr(T,le))){if(!(Z.attributeCheck instanceof Function&&Z.attributeCheck(le,J))){if(!Y[le]||ce[le]){if(!(qt(J)&&(G.tagNameCheck instanceof RegExp&&lr(G.tagNameCheck,J)||G.tagNameCheck instanceof Function&&G.tagNameCheck(J))&&(G.attributeNameCheck instanceof RegExp&&lr(G.attributeNameCheck,le)||G.attributeNameCheck instanceof Function&&G.attributeNameCheck(le,J))||le==="is"&&G.allowCustomizedBuiltInElements&&(G.tagNameCheck instanceof RegExp&&lr(G.tagNameCheck,we)||G.tagNameCheck instanceof Function&&G.tagNameCheck(we))))return!1}else if(!Ke[le]){if(!lr(H,ds(we,_,""))){if(!((le==="src"||le==="xlink:href"||le==="href")&&J!=="script"&&TA(we,"data:")===0&&qe[J])){if(!(fe&&!lr(I,ds(we,_,"")))){if(we)return!1}}}}}}}return!0},qt=function(J){return J!=="annotation-xml"&&Sf(J,W)},Jt=function(J){zt(R.beforeSanitizeAttributes,J,null);const{attributes:le}=J;if(!le||jt(J))return;const we={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Y,forceKeepAttr:void 0};let ke=le.length;for(;ke--;){const Ie=le[ke],{name:ot,namespaceURI:bt,value:St}=Ie,Yt=st(ot),en=St;let kt=ot==="value"?en:AA(en);if(we.attrName=Yt,we.attrValue=kt,we.keepAttr=!0,we.forceKeepAttr=void 0,zt(R.uponSanitizeAttribute,J,we),kt=we.attrValue,be&&(Yt==="id"||Yt==="name")&&(lt(ot,J),kt=ue+kt),ne&&lr(/((--!?|])>)|<\/(style|title|textarea)/i,kt)){lt(ot,J);continue}if(Yt==="attributename"&&Sf(kt,"href")){lt(ot,J);continue}if(we.forceKeepAttr)continue;if(!we.keepAttr){lt(ot,J);continue}if(!ae&&lr(/\/>/i,kt)){lt(ot,J);continue}ve&&ec([k,D,A],on=>{kt=ds(kt,on," ")});const ln=st(J.nodeName);if(!Vt(ln,Yt,kt)){lt(ot,J);continue}if(x&&typeof h=="object"&&typeof h.getAttributeType=="function"&&!bt)switch(h.getAttributeType(ln,Yt)){case"TrustedHTML":{kt=x.createHTML(kt);break}case"TrustedScriptURL":{kt=x.createScriptURL(kt);break}}if(kt!==en)try{bt?J.setAttributeNS(bt,ot,kt):J.setAttribute(ot,kt),jt(J)?et(J):Tb(t.removed)}catch{lt(ot,J)}}zt(R.afterSanitizeAttributes,J,null)},Pn=function Ye(J){let le=null;const we=vt(J);for(zt(R.beforeSanitizeShadowDOM,J,null);le=we.nextNode();)zt(R.uponSanitizeShadowNode,le,null),Pt(le),Jt(le),le.content instanceof i&&Ye(le.content);zt(R.afterSanitizeShadowDOM,J,null)};return t.sanitize=function(Ye){let J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},le=null,we=null,ke=null,Ie=null;if(rt=!Ye,rt&&(Ye="<!-->"),typeof Ye!="string"&&!It(Ye))if(typeof Ye.toString=="function"){if(Ye=Ye.toString(),typeof Ye!="string")throw fs("dirty is not a string, aborting")}else throw fs("toString is not a function");if(!t.isSupported)return Ye;if(pe||wt(J),t.removed=[],typeof Ye=="string"&&(Re=!1),Re){if(Ye.nodeName){const St=st(Ye.nodeName);if(!B[St]||Q[St])throw fs("root node is forbidden and cannot be sanitized in-place")}}else if(Ye instanceof s)le=ct("<!---->"),we=le.ownerDocument.importNode(Ye,!0),we.nodeType===ps.element&&we.nodeName==="BODY"||we.nodeName==="HTML"?le=we:le.appendChild(we);else{if(!Me&&!ve&&!se&&Ye.indexOf("<")===-1)return x&&Be?x.createHTML(Ye):Ye;if(le=ct(Ye),!le)return Me?null:Be?S:""}le&&Ne&&et(le.firstChild);const ot=vt(Re?Ye:le);for(;ke=ot.nextNode();)Pt(ke),Jt(ke),ke.content instanceof i&&Pn(ke.content);if(Re)return Ye;if(Me){if($e)for(Ie=N.call(le.ownerDocument);le.firstChild;)Ie.appendChild(le.firstChild);else Ie=le;return(Y.shadowroot||Y.shadowrootmode)&&(Ie=M.call(r,Ie,!0)),Ie}let bt=se?le.outerHTML:le.innerHTML;return se&&B["!doctype"]&&le.ownerDocument&&le.ownerDocument.doctype&&le.ownerDocument.doctype.name&&lr(Wx,le.ownerDocument.doctype.name)&&(bt="<!DOCTYPE "+le.ownerDocument.doctype.name+`>
161
+ `+bt),ve&&ec([k,D,A],St=>{bt=ds(bt,St," ")}),x&&Be?x.createHTML(bt):bt},t.setConfig=function(){let Ye=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};wt(Ye),pe=!0},t.clearConfig=function(){Ze=null,pe=!1},t.isValidAttribute=function(Ye,J,le){Ze||wt({});const we=st(Ye),ke=st(J);return Vt(we,ke,le)},t.addHook=function(Ye,J){typeof J=="function"&&us(R[Ye],J)},t.removeHook=function(Ye,J){if(J!==void 0){const le=RA(R[Ye],J);return le===-1?void 0:IA(R[Ye],le,1)[0]}return Tb(R[Ye])},t.removeHooks=function(Ye){R[Ye]=[]},t.removeAllHooks=function(){R=Lb()},t}var KA=Ux();function He(){return He=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},He.apply(null,arguments)}function ht(e){"@babel/helpers - typeof";return ht=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},ht(e)}var GA=Symbol.for("react.element"),XA=Symbol.for("react.transitional.element"),YA=Symbol.for("react.fragment");function qx(e){return e&&ht(e)==="object"&&(e.$$typeof===GA||e.$$typeof===XA)&&e.type===YA}function Nr(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[];return O.Children.forEach(e,function(r){r==null&&!t.keepEmpty||(Array.isArray(r)?n=n.concat(Nr(r)):qx(r)&&r.props?n=n.concat(Nr(r.props.children,t)):n.push(r))}),n}var qh={},Km=[],JA=function(t){Km.push(t)};function yo(e,t){if(process.env.NODE_ENV!=="production"&&!e&&console!==void 0){var n=Km.reduce(function(r,o){return o(r??"","warning")},t);n&&console.error("Warning: ".concat(n))}}function QA(e,t){if(process.env.NODE_ENV!=="production"&&!e&&console!==void 0){var n=Km.reduce(function(r,o){return o(r??"","note")},t);n&&console.warn("Note: ".concat(n))}}function Kx(){qh={}}function Gx(e,t,n){!t&&!qh[n]&&(e(!1,n),qh[n]=!0)}function Ot(e,t){Gx(yo,e,t)}function Kh(e,t){Gx(QA,e,t)}Ot.preMessage=JA;Ot.resetWarned=Kx;Ot.noteOnce=Kh;function ZA(e,t){if(ht(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ht(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Xx(e){var t=ZA(e,"string");return ht(t)=="symbol"?t:t+""}function U(e,t,n){return(t=Xx(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jb(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 q(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?jb(Object(n),!0).forEach(function(r){U(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jb(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function el(e){return e instanceof HTMLElement||e instanceof SVGElement}function eP(e){return e&&ht(e)==="object"&&el(e.nativeElement)?e.nativeElement:el(e)?e:null}function Nc(e){var t=eP(e);if(t)return t;if(e instanceof O.Component){var n;return(n=jr.findDOMNode)===null||n===void 0?void 0:n.call(jr,e)}return null}var nc={exports:{}},an={};/**
162
+ * @license React
163
+ * react-is.production.min.js
164
+ *
165
+ * Copyright (c) Facebook, Inc. and its affiliates.
166
+ *
167
+ * This source code is licensed under the MIT license found in the
168
+ * LICENSE file in the root directory of this source tree.
169
+ */var Bb;function tP(){if(Bb)return an;Bb=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"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),m;m=Symbol.for("react.module.reference");function v(g){if(typeof g=="object"&&g!==null){var y=g.$$typeof;switch(y){case e:switch(g=g.type,g){case n:case o:case r:case c:case u:return g;default:switch(g=g&&g.$$typeof,g){case s:case a:case l:case f:case d:case i:return g;default:return y}}case t:return y}}}return an.ContextConsumer=a,an.ContextProvider=i,an.Element=e,an.ForwardRef=l,an.Fragment=n,an.Lazy=f,an.Memo=d,an.Portal=t,an.Profiler=o,an.StrictMode=r,an.Suspense=c,an.SuspenseList=u,an.isAsyncMode=function(){return!1},an.isConcurrentMode=function(){return!1},an.isContextConsumer=function(g){return v(g)===a},an.isContextProvider=function(g){return v(g)===i},an.isElement=function(g){return typeof g=="object"&&g!==null&&g.$$typeof===e},an.isForwardRef=function(g){return v(g)===l},an.isFragment=function(g){return v(g)===n},an.isLazy=function(g){return v(g)===f},an.isMemo=function(g){return v(g)===d},an.isPortal=function(g){return v(g)===t},an.isProfiler=function(g){return v(g)===o},an.isStrictMode=function(g){return v(g)===r},an.isSuspense=function(g){return v(g)===c},an.isSuspenseList=function(g){return v(g)===u},an.isValidElementType=function(g){return typeof g=="string"||typeof g=="function"||g===n||g===o||g===r||g===c||g===u||g===h||typeof g=="object"&&g!==null&&(g.$$typeof===f||g.$$typeof===d||g.$$typeof===i||g.$$typeof===a||g.$$typeof===l||g.$$typeof===m||g.getModuleId!==void 0)},an.typeOf=v,an}var sn={};/**
170
+ * @license React
171
+ * react-is.development.js
172
+ *
173
+ * Copyright (c) Facebook, Inc. and its affiliates.
174
+ *
175
+ * This source code is licensed under the MIT license found in the
176
+ * LICENSE file in the root directory of this source tree.
177
+ */var zb;function nP(){return zb||(zb=1,process.env.NODE_ENV!=="production"&&function(){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"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),m=!1,v=!1,g=!1,y=!1,b=!1,C;C=Symbol.for("react.module.reference");function x(ne){return!!(typeof ne=="string"||typeof ne=="function"||ne===n||ne===o||b||ne===r||ne===c||ne===u||y||ne===h||m||v||g||typeof ne=="object"&&ne!==null&&(ne.$$typeof===f||ne.$$typeof===d||ne.$$typeof===i||ne.$$typeof===a||ne.$$typeof===l||ne.$$typeof===C||ne.getModuleId!==void 0))}function S(ne){if(typeof ne=="object"&&ne!==null){var se=ne.$$typeof;switch(se){case e:var pe=ne.type;switch(pe){case n:case o:case r:case c:case u:return pe;default:var Ne=pe&&pe.$$typeof;switch(Ne){case s:case a:case l:case f:case d:case i:return Ne;default:return se}}case t:return se}}}var w=a,E=i,N=e,$=l,M=n,R=f,k=d,D=t,A=o,L=r,T=c,I=u,_=!1,W=!1;function H(ne){return _||(_=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function B(ne){return W||(W=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function K(ne){return S(ne)===a}function Y(ne){return S(ne)===i}function V(ne){return typeof ne=="object"&&ne!==null&&ne.$$typeof===e}function G(ne){return S(ne)===l}function Q(ne){return S(ne)===n}function ce(ne){return S(ne)===f}function Z(ne){return S(ne)===d}function he(ne){return S(ne)===t}function ye(ne){return S(ne)===o}function fe(ne){return S(ne)===r}function ae(ne){return S(ne)===c}function ve(ne){return S(ne)===u}sn.ContextConsumer=w,sn.ContextProvider=E,sn.Element=N,sn.ForwardRef=$,sn.Fragment=M,sn.Lazy=R,sn.Memo=k,sn.Portal=D,sn.Profiler=A,sn.StrictMode=L,sn.Suspense=T,sn.SuspenseList=I,sn.isAsyncMode=H,sn.isConcurrentMode=B,sn.isContextConsumer=K,sn.isContextProvider=Y,sn.isElement=V,sn.isForwardRef=G,sn.isFragment=Q,sn.isLazy=ce,sn.isMemo=Z,sn.isPortal=he,sn.isProfiler=ye,sn.isStrictMode=fe,sn.isSuspense=ae,sn.isSuspenseList=ve,sn.isValidElementType=x,sn.typeOf=S}()),sn}var Fb;function rP(){return Fb||(Fb=1,process.env.NODE_ENV==="production"?nc.exports=tP():nc.exports=nP()),nc.exports}var $f=rP();function Sl(e,t,n){var r=p.useRef({});return(!("value"in r.current)||n(r.current.condition,t))&&(r.current.value=e(),r.current.condition=t),r.current.value}var oP=Number(O.version.split(".")[0]),Gm=function(t,n){typeof t=="function"?t(n):ht(t)==="object"&&t&&"current"in t&&(t.current=n)},mr=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){Gm(a,i)})}},xi=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Sl(function(){return mr.apply(void 0,n)},n,function(o,i){return o.length!==i.length||o.every(function(a,s){return a!==i[s]})})},wi=function(t){var n,r;if(!t)return!1;if(Xm(t)&&oP>=19)return!0;var o=$f.isMemo(t)?t.type.type:t.type;return!(typeof o=="function"&&!((n=o.prototype)!==null&&n!==void 0&&n.render)&&o.$$typeof!==$f.ForwardRef||typeof t=="function"&&!((r=t.prototype)!==null&&r!==void 0&&r.render)&&t.$$typeof!==$f.ForwardRef)};function Xm(e){return O.isValidElement(e)&&!qx(e)}var iP=function(t){return Xm(t)&&wi(t)},ra=function(t){if(t&&Xm(t)){var n=t;return n.props.propertyIsEnumerable("ref")?n.props.ref:n.ref}return null},Gh=p.createContext(null);function aP(e){var t=e.children,n=e.onBatchResize,r=p.useRef(0),o=p.useRef([]),i=p.useContext(Gh),a=p.useCallback(function(s,l,c){r.current+=1;var u=r.current;o.current.push({size:s,element:l,data:c}),Promise.resolve().then(function(){u===r.current&&(n==null||n(o.current),o.current=[])}),i==null||i(s,l,c)},[n,i]);return p.createElement(Gh.Provider,{value:a},t)}var Yx=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}()}(),Xh=typeof window<"u"&&typeof document<"u"&&window.document===document,au=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")()}(),sP=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(au):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}}(),lP=2;function cP(e,t){var n=!1,r=!1,o=0;function i(){n&&(n=!1,e()),r&&s()}function a(){sP(i)}function s(){var l=Date.now();if(n){if(l-o<lP)return;r=!0}else n=!0,r=!1,setTimeout(a,t);o=l}return s}var uP=20,dP=["top","right","bottom","left","width","height","size","weight"],fP=typeof MutationObserver<"u",hP=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=cP(this.refresh.bind(this),uP)}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(){!Xh||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),fP?(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(){!Xh||!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=dP.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}(),Jx=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},za=function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView;return t||au},Qx=hd(0,0,0,0);function su(e){return parseFloat(e)||0}function Hb(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+su(i)},0)}function pP(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]=su(a)}return n}function mP(e){var t=e.getBBox();return hd(0,0,t.width,t.height)}function gP(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return Qx;var r=za(e).getComputedStyle(e),o=pP(r),i=o.left+o.right,a=o.top+o.bottom,s=su(r.width),l=su(r.height);if(r.boxSizing==="border-box"&&(Math.round(s+i)!==t&&(s-=Hb(r,"left","right")+i),Math.round(l+a)!==n&&(l-=Hb(r,"top","bottom")+a)),!bP(e)){var c=Math.round(s+i)-t,u=Math.round(l+a)-n;Math.abs(c)!==1&&(s-=c),Math.abs(u)!==1&&(l-=u)}return hd(o.left,o.top,s,l)}var vP=function(){return typeof SVGGraphicsElement<"u"?function(e){return e instanceof za(e).SVGGraphicsElement}:function(e){return e instanceof za(e).SVGElement&&typeof e.getBBox=="function"}}();function bP(e){return e===za(e).document.documentElement}function yP(e){return Xh?vP(e)?mP(e):gP(e):Qx}function CP(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 Jx(a,{x:t,y:n,width:r,height:o,top:n,right:t+r,bottom:o+n,left:t}),a}function hd(e,t,n,r){return{x:e,y:t,width:n,height:r}}var SP=function(){function e(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=hd(0,0,0,0),this.target=t}return e.prototype.isActive=function(){var t=yP(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}(),xP=function(){function e(t,n){var r=CP(n);Jx(this,{target:t,contentRect:r})}return e}(),wP=function(){function e(t,n,r){if(this.activeObservations_=[],this.observations_=new Yx,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 za(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)||(n.set(t,new SP(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 za(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 xP(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}(),Zx=typeof WeakMap<"u"?new WeakMap:new Yx,e1=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=hP.getInstance(),r=new wP(t,n,this);Zx.set(this,r)}return e}();["observe","unobserve","disconnect"].forEach(function(e){e1.prototype[e]=function(){var t;return(t=Zx.get(this))[e].apply(t,arguments)}});var EP=function(){return typeof au.ResizeObserver<"u"?au.ResizeObserver:e1}(),Po=new Map;function t1(e){e.forEach(function(t){var n,r=t.target;(n=Po.get(r))===null||n===void 0||n.forEach(function(o){return o(r)})})}var n1=new EP(t1);process.env.NODE_ENV;process.env.NODE_ENV;function OP(e,t){Po.has(e)||(Po.set(e,new Set),n1.observe(e)),Po.get(e).add(t)}function $P(e,t){Po.has(e)&&(Po.get(e).delete(t),Po.get(e).size||(n1.unobserve(e),Po.delete(e)))}function Tn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Vb(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,Xx(r.key),r)}}function An(e,t,n){return t&&Vb(e.prototype,t),n&&Vb(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function tl(e,t){return tl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},tl(e,t)}function Bo(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&&tl(e,t)}function nl(e){return nl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},nl(e)}function Ym(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ym=function(){return!!e})()}function Ft(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function NP(e,t){if(t&&(ht(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ft(e)}function zo(e){var t=Ym();return function(){var n,r=nl(e);if(t){var o=nl(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return NP(this,n)}}var MP=function(e){Bo(n,e);var t=zo(n);function n(){return Tn(this,n),t.apply(this,arguments)}return An(n,[{key:"render",value:function(){return this.props.children}}]),n}(p.Component);function RP(e,t){var n=e.children,r=e.disabled,o=p.useRef(null),i=p.useRef(null),a=p.useContext(Gh),s=typeof n=="function",l=s?n(o):n,c=p.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),u=!s&&p.isValidElement(l)&&wi(l),d=u?ra(l):null,f=xi(d,o),h=function(){var y;return Nc(o.current)||(o.current&&ht(o.current)==="object"?Nc((y=o.current)===null||y===void 0?void 0:y.nativeElement):null)||Nc(i.current)};p.useImperativeHandle(t,function(){return h()});var m=p.useRef(e);m.current=e;var v=p.useCallback(function(g){var y=m.current,b=y.onResize,C=y.data,x=g.getBoundingClientRect(),S=x.width,w=x.height,E=g.offsetWidth,N=g.offsetHeight,$=Math.floor(S),M=Math.floor(w);if(c.current.width!==$||c.current.height!==M||c.current.offsetWidth!==E||c.current.offsetHeight!==N){var R={width:$,height:M,offsetWidth:E,offsetHeight:N};c.current=R;var k=E===Math.round(S)?S:E,D=N===Math.round(w)?w:N,A=q(q({},R),{},{offsetWidth:k,offsetHeight:D});a==null||a(A,g,C),b&&Promise.resolve().then(function(){b(A,g)})}},[]);return p.useEffect(function(){var g=h();return g&&!r&&OP(g,v),function(){return $P(g,v)}},[o.current,r]),p.createElement(MP,{ref:i},u?p.cloneElement(l,{ref:f}):l)}var r1=p.forwardRef(RP);process.env.NODE_ENV!=="production"&&(r1.displayName="SingleObserver");var IP="rc-observer-key";function TP(e,t){var n=e.children,r=typeof n=="function"?[n]:Nr(n);return process.env.NODE_ENV!=="production"&&(r.length>1?yo(!1,"Find more than one child node with `children` in ResizeObserver. Please use ResizeObserver.Collection instead."):r.length===0&&yo(!1,"`children` of ResizeObserver is empty. Nothing is in observe.")),r.map(function(o,i){var a=(o==null?void 0:o.key)||"".concat(IP,"-").concat(i);return p.createElement(r1,He({},e,{key:a,ref:i===0?t:void 0}),o)})}var Fo=p.forwardRef(TP);process.env.NODE_ENV!=="production"&&(Fo.displayName="ResizeObserver");Fo.Collection=aP;function Yh(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 AP(e){if(Array.isArray(e))return Yh(e)}function o1(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Jm(e,t){if(e){if(typeof e=="string")return Yh(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)?Yh(e,t):void 0}}function PP(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
178
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Le(e){return AP(e)||o1(e)||Jm(e)||PP()}var i1=function(t){return+setTimeout(t,16)},a1=function(t){return clearTimeout(t)};typeof window<"u"&&"requestAnimationFrame"in window&&(i1=function(t){return window.requestAnimationFrame(t)},a1=function(t){return window.cancelAnimationFrame(t)});var Wb=0,pd=new Map;function s1(e){pd.delete(e)}var Ht=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;Wb+=1;var r=Wb;function o(i){if(i===0)s1(r),t();else{var a=i1(function(){o(i-1)});pd.set(r,a)}}return o(n),r};Ht.cancel=function(e){var t=pd.get(e);return s1(e),a1(t)};process.env.NODE_ENV!=="production"&&(Ht.ids=function(){return pd});function l1(e){if(Array.isArray(e))return e}function kP(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(u){c=!0,o=u}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}function c1(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
179
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function de(e,t){return l1(e)||kP(e,t)||Jm(e,t)||c1()}function rl(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}function or(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Jh(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 Ub="data-rc-order",qb="data-rc-priority",DP="rc-util-key",Qh=new Map;function u1(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.mark;return t?t.startsWith("data-")?t:"data-".concat(t):DP}function md(e){if(e.attachTo)return e.attachTo;var t=document.querySelector("head");return t||document.body}function _P(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function Qm(e){return Array.from((Qh.get(e)||e).children).filter(function(t){return t.tagName==="STYLE"})}function d1(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!or())return null;var n=t.csp,r=t.prepend,o=t.priority,i=o===void 0?0:o,a=_P(r),s=a==="prependQueue",l=document.createElement("style");l.setAttribute(Ub,a),s&&i&&l.setAttribute(qb,"".concat(i)),n!=null&&n.nonce&&(l.nonce=n==null?void 0:n.nonce),l.innerHTML=e;var c=md(t),u=c.firstChild;if(r){if(s){var d=(t.styles||Qm(c)).filter(function(f){if(!["prepend","prependQueue"].includes(f.getAttribute(Ub)))return!1;var h=Number(f.getAttribute(qb)||0);return i>=h});if(d.length)return c.insertBefore(l,d[d.length-1].nextSibling),l}c.insertBefore(l,u)}else c.appendChild(l);return l}function f1(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=md(t);return(t.styles||Qm(n)).find(function(r){return r.getAttribute(u1(t))===e})}function ol(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=f1(e,t);if(n){var r=md(t);r.removeChild(n)}}function LP(e,t){var n=Qh.get(e);if(!n||!Jh(document,n)){var r=d1("",t),o=r.parentNode;Qh.set(e,o),e.removeChild(r)}}function _o(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=md(n),o=Qm(r),i=q(q({},n),{},{styles:o});LP(r,i);var a=f1(t,i);if(a){var s,l;if((s=i.csp)!==null&&s!==void 0&&s.nonce&&a.nonce!==((l=i.csp)===null||l===void 0?void 0:l.nonce)){var c;a.nonce=(c=i.csp)===null||c===void 0?void 0:c.nonce}return a.innerHTML!==e&&(a.innerHTML=e),a}var u=d1(e,i);return u.setAttribute(u1(i),t),u}function jP(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 Mt(e,t){if(e==null)return{};var n,r,o=jP(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}function Fa(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,l=r.has(i);if(Ot(!l,"Warning: There may be circular references"),l)return!1;if(i===a)return!0;if(n&&s>1)return!1;r.add(i);var c=s+1;if(Array.isArray(i)){if(!Array.isArray(a)||i.length!==a.length)return!1;for(var u=0;u<i.length;u++)if(!o(i[u],a[u],c))return!1;return!0}if(i&&a&&ht(i)==="object"&&ht(a)==="object"){var d=Object.keys(i);return d.length!==Object.keys(a).length?!1:d.every(function(f){return o(i[f],a[f],c)})}return!1}return o(e,t)}var BP="%";function Zh(e){return e.join(BP)}var zP=function(){function e(t){Tn(this,e),U(this,"instanceId",void 0),U(this,"cache",new Map),this.instanceId=t}return An(e,[{key:"get",value:function(n){return this.opGet(Zh(n))}},{key:"opGet",value:function(n){return this.cache.get(n)||null}},{key:"update",value:function(n,r){return this.opUpdate(Zh(n),r)}},{key:"opUpdate",value:function(n,r){var o=this.cache.get(n),i=r(o);i===null?this.cache.delete(n):this.cache.set(n,i)}}]),e}(),Ha="data-token-hash",Jr="data-css-hash",FP="data-cache-path",si="__cssinjs_instance__";function HP(){var e=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){var t=document.body.querySelectorAll("style[".concat(Jr,"]"))||[],n=document.head.firstChild;Array.from(t).forEach(function(o){o[si]=o[si]||e,o[si]===e&&document.head.insertBefore(o,n)});var r={};Array.from(document.querySelectorAll("style[".concat(Jr,"]"))).forEach(function(o){var i=o.getAttribute(Jr);if(r[i]){if(o[si]===e){var a;(a=o.parentNode)===null||a===void 0||a.removeChild(o)}}else r[i]=!0})}return new zP(e)}var xl=p.createContext({hashPriority:"low",cache:HP(),defaultCache:!0});function VP(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var Zm=function(){function e(){Tn(this,e),U(this,"cache",void 0),U(this,"keys",void 0),U(this,"cacheCallTimes",void 0),this.cache=new Map,this.keys=[],this.cacheCallTimes=0}return An(e,[{key:"size",value:function(){return this.keys.length}},{key:"internalGet",value:function(n){var r,o,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a={map:this.cache};return n.forEach(function(s){if(!a)a=void 0;else{var l;a=(l=a)===null||l===void 0||(l=l.map)===null||l===void 0?void 0:l.get(s)}}),(r=a)!==null&&r!==void 0&&r.value&&i&&(a.value[1]=this.cacheCallTimes++),(o=a)===null||o===void 0?void 0:o.value}},{key:"get",value:function(n){var r;return(r=this.internalGet(n,!0))===null||r===void 0?void 0:r[0]}},{key:"has",value:function(n){return!!this.internalGet(n)}},{key:"set",value:function(n,r){var o=this;if(!this.has(n)){if(this.size()+1>e.MAX_CACHE_SIZE+e.MAX_CACHE_OFFSET){var i=this.keys.reduce(function(c,u){var d=de(c,2),f=d[1];return o.internalGet(u)[1]<f?[u,o.internalGet(u)[1]]:c},[this.keys[0],this.cacheCallTimes]),a=de(i,1),s=a[0];this.delete(s)}this.keys.push(n)}var l=this.cache;n.forEach(function(c,u){if(u===n.length-1)l.set(c,{value:[r,o.cacheCallTimes++]});else{var d=l.get(c);d?d.map||(d.map=new Map):l.set(c,{map:new Map}),l=l.get(c).map}})}},{key:"deleteByPath",value:function(n,r){var o=n.get(r[0]);if(r.length===1){var i;return o.map?n.set(r[0],{map:o.map}):n.delete(r[0]),(i=o.value)===null||i===void 0?void 0:i[0]}var a=this.deleteByPath(o.map,r.slice(1));return(!o.map||o.map.size===0)&&!o.value&&n.delete(r[0]),a}},{key:"delete",value:function(n){if(this.has(n))return this.keys=this.keys.filter(function(r){return!VP(r,n)}),this.deleteByPath(this.cache,n)}}]),e}();U(Zm,"MAX_CACHE_SIZE",20);U(Zm,"MAX_CACHE_OFFSET",5);var Kb=0,h1=function(){function e(t){Tn(this,e),U(this,"derivatives",void 0),U(this,"id",void 0),this.derivatives=Array.isArray(t)?t:[t],this.id=Kb,t.length===0&&yo(t.length>0,"[Ant Design CSS-in-JS] Theme should have at least one derivative function."),Kb+=1}return An(e,[{key:"getDerivativeToken",value:function(n){return this.derivatives.reduce(function(r,o){return o(n,r)},void 0)}}]),e}(),Nf=new Zm;function ep(e){var t=Array.isArray(e)?e:[e];return Nf.has(t)||Nf.set(t,new h1(t)),Nf.get(t)}var WP=new WeakMap,Mf={};function UP(e,t){for(var n=WP,r=0;r<t.length;r+=1){var o=t[r];n.has(o)||n.set(o,new WeakMap),n=n.get(o)}return n.has(Mf)||n.set(Mf,e()),n.get(Mf)}var Gb=new WeakMap;function Ds(e){var t=Gb.get(e)||"";return t||(Object.keys(e).forEach(function(n){var r=e[n];t+=n,r instanceof h1?t+=r.id:r&&ht(r)==="object"?t+=Ds(r):t+=r}),t=rl(t),Gb.set(e,t)),t}function Xb(e,t){return rl("".concat(t,"_").concat(Ds(e)))}var tp=or();function oe(e){return typeof e=="number"?"".concat(e,"px"):e}function lu(e,t,n){var r,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(i)return e;var a=q(q({},o),{},(r={},U(r,Ha,t),U(r,Jr,n),r)),s=Object.keys(a).map(function(l){var c=a[l];return c?"".concat(l,'="').concat(c,'"'):null}).filter(function(l){return l}).join(" ");return"<style ".concat(s,">").concat(e,"</style>")}var Mc=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return"--".concat(n?"".concat(n,"-"):"").concat(t).replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z0-9]+)/g,"$1-$2").replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase()},qP=function(t,n,r){return Object.keys(t).length?".".concat(n).concat(r!=null&&r.scope?".".concat(r.scope):"","{").concat(Object.entries(t).map(function(o){var i=de(o,2),a=i[0],s=i[1];return"".concat(a,":").concat(s,";")}).join(""),"}"):""},p1=function(t,n,r){var o={},i={};return Object.entries(t).forEach(function(a){var s,l,c=de(a,2),u=c[0],d=c[1];if(r!=null&&(s=r.preserve)!==null&&s!==void 0&&s[u])i[u]=d;else if((typeof d=="string"||typeof d=="number")&&!(r!=null&&(l=r.ignore)!==null&&l!==void 0&&l[u])){var f,h=Mc(u,r==null?void 0:r.prefix);o[h]=typeof d=="number"&&!(r!=null&&(f=r.unitless)!==null&&f!==void 0&&f[u])?"".concat(d,"px"):String(d),i[u]="var(".concat(h,")")}}),[i,qP(o,n,{scope:r==null?void 0:r.scope})]},Yb=process.env.NODE_ENV!=="test"&&or()?p.useLayoutEffect:p.useEffect,cn=function(t,n){var r=p.useRef(!0);Yb(function(){return t(r.current)},n),Yb(function(){return r.current=!1,function(){r.current=!0}},[])},_s=function(t,n){cn(function(r){if(!r)return t()},n)},KP=q({},p),Jb=KP.useInsertionEffect,GP=function(t,n,r){p.useMemo(t,r),cn(function(){return n(!0)},r)},XP=Jb?function(e,t,n){return Jb(function(){return e(),t()},n)}:GP,YP=q({},p),JP=YP.useInsertionEffect,QP=function(t){var n=[],r=!1;function o(i){if(r){process.env.NODE_ENV!=="production"&&yo(!1,"[Ant Design CSS-in-JS] You are registering a cleanup function after unmount, which will not have any effect.");return}n.push(i)}return p.useEffect(function(){return r=!1,function(){r=!0,n.length&&n.forEach(function(i){return i()})}},t),o},ZP=function(){return function(t){t()}},ek=typeof JP<"u"?QP:ZP;function tk(){return!1}var np=!1;function nk(){return np}const rk=process.env.NODE_ENV==="production"?tk:nk;if(process.env.NODE_ENV!=="production"&&typeof module<"u"&&module&&module.hot&&typeof window<"u"){var rc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:null;if(rc&&typeof rc.webpackHotUpdate=="function"){var ok=rc.webpackHotUpdate;rc.webpackHotUpdate=function(){return np=!0,setTimeout(function(){np=!1},0),ok.apply(void 0,arguments)}}}function eg(e,t,n,r,o){var i=p.useContext(xl),a=i.cache,s=[e].concat(Le(t)),l=Zh(s),c=ek([l]),u=rk(),d=function(v){a.opUpdate(l,function(g){var y=g||[void 0,void 0],b=de(y,2),C=b[0],x=C===void 0?0:C,S=b[1],w=S;process.env.NODE_ENV!=="production"&&S&&u&&(r==null||r(w,u),w=null);var E=w||n(),N=[x,E];return v?v(N):N})};p.useMemo(function(){d()},[l]);var f=a.opGet(l);process.env.NODE_ENV!=="production"&&!f&&(d(),f=a.opGet(l));var h=f[1];return XP(function(){o==null||o(h)},function(m){return d(function(v){var g=de(v,2),y=g[0],b=g[1];return m&&y===0&&(o==null||o(h)),[y+1,b]}),function(){a.opUpdate(l,function(v){var g=v||[],y=de(g,2),b=y[0],C=b===void 0?0:b,x=y[1],S=C-1;return S===0?(c(function(){(m||!a.opGet(l))&&(r==null||r(x,!1))}),null):[C-1,x]})}},[l]),h}var ik={},ak=process.env.NODE_ENV!=="production"?"css-dev-only-do-not-override":"css",Ti=new Map;function sk(e){Ti.set(e,(Ti.get(e)||0)+1)}function lk(e,t){if(typeof document<"u"){var n=document.querySelectorAll("style[".concat(Ha,'="').concat(e,'"]'));n.forEach(function(r){if(r[si]===t){var o;(o=r.parentNode)===null||o===void 0||o.removeChild(r)}})}}var ck=0;function uk(e,t){Ti.set(e,(Ti.get(e)||0)-1);var n=Array.from(Ti.keys()),r=n.filter(function(o){var i=Ti.get(o)||0;return i<=0});n.length-r.length>ck&&r.forEach(function(o){lk(o,t),Ti.delete(o)})}var dk=function(t,n,r,o){var i=r.getDerivativeToken(t),a=q(q({},i),n);return o&&(a=o(a)),a},m1="token";function fk(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=O.useContext(xl),o=r.cache.instanceId,i=r.container,a=n.salt,s=a===void 0?"":a,l=n.override,c=l===void 0?ik:l,u=n.formatToken,d=n.getComputedToken,f=n.cssVar,h=UP(function(){return Object.assign.apply(Object,[{}].concat(Le(t)))},t),m=Ds(h),v=Ds(c),g=f?Ds(f):"",y=eg(m1,[s,e.id,m,v,g],function(){var b,C=d?d(h,c,e):dk(h,c,e,u),x=q({},C),S="";if(f){var w=p1(C,f.key,{prefix:f.prefix,ignore:f.ignore,unitless:f.unitless,preserve:f.preserve}),E=de(w,2);C=E[0],S=E[1]}var N=Xb(C,s);C._tokenKey=N,x._tokenKey=Xb(x,s);var $=(b=f==null?void 0:f.key)!==null&&b!==void 0?b:N;C._themeKey=$,sk($);var M="".concat(ak,"-").concat(rl(N));return C._hashId=M,[C,M,x,S,(f==null?void 0:f.key)||""]},function(b){uk(b[0]._themeKey,o)},function(b){var C=de(b,4),x=C[0],S=C[3];if(f&&S){var w=_o(S,rl("css-variables-".concat(x._themeKey)),{mark:Jr,prepend:"queue",attachTo:i,priority:-999});w[si]=o,w.setAttribute(Ha,x._themeKey)}});return y}var hk=function(t,n,r){var o=de(t,5),i=o[2],a=o[3],s=o[4],l=r||{},c=l.plain;if(!a)return null;var u=i._tokenKey,d=-999,f={"data-rc-order":"prependQueue","data-rc-priority":"".concat(d)},h=lu(a,s,u,f,c);return[d,u,h]},pk={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},g1="comm",v1="rule",b1="decl",mk="@import",gk="@namespace",vk="@keyframes",bk="@layer",y1=Math.abs,tg=String.fromCharCode;function C1(e){return e.trim()}function Rc(e,t,n){return e.replace(t,n)}function yk(e,t,n){return e.indexOf(t,n)}function Ia(e,t){return e.charCodeAt(t)|0}function Va(e,t,n){return e.slice(t,n)}function ho(e){return e.length}function Ck(e){return e.length}function oc(e,t){return t.push(e),e}var gd=1,Wa=1,S1=0,zr=0,Ln=0,Qa="";function ng(e,t,n,r,o,i,a,s){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:gd,column:Wa,length:a,return:"",siblings:s}}function Sk(){return Ln}function xk(){return Ln=zr>0?Ia(Qa,--zr):0,Wa--,Ln===10&&(Wa=1,gd--),Ln}function Qr(){return Ln=zr<S1?Ia(Qa,zr++):0,Wa++,Ln===10&&(Wa=1,gd++),Ln}function li(){return Ia(Qa,zr)}function Ic(){return zr}function vd(e,t){return Va(Qa,e,t)}function il(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function wk(e){return gd=Wa=1,S1=ho(Qa=e),zr=0,[]}function Ek(e){return Qa="",e}function Rf(e){return C1(vd(zr-1,rp(e===91?e+2:e===40?e+1:e)))}function Ok(e){for(;(Ln=li())&&Ln<33;)Qr();return il(e)>2||il(Ln)>3?"":" "}function $k(e,t){for(;--t&&Qr()&&!(Ln<48||Ln>102||Ln>57&&Ln<65||Ln>70&&Ln<97););return vd(e,Ic()+(t<6&&li()==32&&Qr()==32))}function rp(e){for(;Qr();)switch(Ln){case e:return zr;case 34:case 39:e!==34&&e!==39&&rp(Ln);break;case 40:e===41&&rp(e);break;case 92:Qr();break}return zr}function Nk(e,t){for(;Qr()&&e+Ln!==57;)if(e+Ln===84&&li()===47)break;return"/*"+vd(t,zr-1)+"*"+tg(e===47?e:Qr())}function Mk(e){for(;!il(li());)Qr();return vd(e,zr)}function Rk(e){return Ek(Tc("",null,null,null,[""],e=wk(e),0,[0],e))}function Tc(e,t,n,r,o,i,a,s,l){for(var c=0,u=0,d=a,f=0,h=0,m=0,v=1,g=1,y=1,b=0,C="",x=o,S=i,w=r,E=C;g;)switch(m=b,b=Qr()){case 40:if(m!=108&&Ia(E,d-1)==58){yk(E+=Rc(Rf(b),"&","&\f"),"&\f",y1(c?s[c-1]:0))!=-1&&(y=-1);break}case 34:case 39:case 91:E+=Rf(b);break;case 9:case 10:case 13:case 32:E+=Ok(m);break;case 92:E+=$k(Ic()-1,7);continue;case 47:switch(li()){case 42:case 47:oc(Ik(Nk(Qr(),Ic()),t,n,l),l),(il(m||1)==5||il(li()||1)==5)&&ho(E)&&Va(E,-1,void 0)!==" "&&(E+=" ");break;default:E+="/"}break;case 123*v:s[c++]=ho(E)*y;case 125*v:case 59:case 0:switch(b){case 0:case 125:g=0;case 59+u:y==-1&&(E=Rc(E,/\f/g,"")),h>0&&(ho(E)-d||v===0&&m===47)&&oc(h>32?Zb(E+";",r,n,d-1,l):Zb(Rc(E," ","")+";",r,n,d-2,l),l);break;case 59:E+=";";default:if(oc(w=Qb(E,t,n,c,u,o,s,C,x=[],S=[],d,i),i),b===123)if(u===0)Tc(E,t,w,w,x,i,d,s,S);else{switch(f){case 99:if(Ia(E,3)===110)break;case 108:if(Ia(E,2)===97)break;default:u=0;case 100:case 109:case 115:}u?Tc(e,w,w,r&&oc(Qb(e,w,w,0,0,o,s,C,o,x=[],d,S),S),o,S,d,s,r?x:S):Tc(E,w,w,w,[""],S,0,s,S)}}c=u=h=0,v=y=1,C=E="",d=a;break;case 58:d=1+ho(E),h=m;default:if(v<1){if(b==123)--v;else if(b==125&&v++==0&&xk()==125)continue}switch(E+=tg(b),b*v){case 38:y=u>0?1:(E+="\f",-1);break;case 44:s[c++]=(ho(E)-1)*y,y=1;break;case 64:li()===45&&(E+=Rf(Qr())),f=li(),u=d=ho(C=E+=Mk(Ic())),b++;break;case 45:m===45&&ho(E)==2&&(v=0)}}return i}function Qb(e,t,n,r,o,i,a,s,l,c,u,d){for(var f=o-1,h=o===0?i:[""],m=Ck(h),v=0,g=0,y=0;v<r;++v)for(var b=0,C=Va(e,f+1,f=y1(g=a[v])),x=e;b<m;++b)(x=C1(g>0?h[b]+" "+C:Rc(C,/&\f/g,h[b])))&&(l[y++]=x);return ng(e,t,n,o===0?v1:s,l,c,u,d)}function Ik(e,t,n,r){return ng(e,t,n,g1,tg(Sk()),Va(e,2,-2),0,r)}function Zb(e,t,n,r,o){return ng(e,t,n,b1,Va(e,0,r),Va(e,r+1,-1),r,o)}function op(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function Tk(e,t,n,r){switch(e.type){case bk:if(e.children.length)break;case mk:case gk:case b1:return e.return=e.return||e.value;case g1:return"";case vk:return e.return=e.value+"{"+op(e.children,r)+"}";case v1:if(!ho(e.value=e.props.join(",")))return""}return ho(n=op(e.children,r))?e.return=e.value+"{"+n+"}":""}function x1(e,t){var n=t.path,r=t.parentSelectors;Ot(!1,"[Ant Design CSS-in-JS] ".concat(n?"Error in ".concat(n,": "):"").concat(e).concat(r.length?" Selector: ".concat(r.join(" | ")):""))}var Ak=function(t,n,r){if(t==="content"){var o=/(attr|counters?|url|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/,i=["normal","none","initial","inherit","unset"];(typeof n!="string"||i.indexOf(n)===-1&&!o.test(n)&&(n.charAt(0)!==n.charAt(n.length-1)||n.charAt(0)!=='"'&&n.charAt(0)!=="'"))&&x1("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\"".concat(n,"\"'`."),r)}},Pk=function(t,n,r){t==="animation"&&r.hashId&&n!=="none"&&x1("You seem to be using hashed animation '".concat(n,"', in which case 'animationName' with Keyframe as value is recommended."),r)},e0="data-ant-cssinjs-cache-path",w1="_FILE_STYLE__",Wi,E1=!0;function kk(){if(!Wi&&(Wi={},or())){var e=document.createElement("div");e.className=e0,e.style.position="fixed",e.style.visibility="hidden",e.style.top="-9999px",document.body.appendChild(e);var t=getComputedStyle(e).content||"";t=t.replace(/^"/,"").replace(/"$/,""),t.split(";").forEach(function(o){var i=o.split(":"),a=de(i,2),s=a[0],l=a[1];Wi[s]=l});var n=document.querySelector("style[".concat(e0,"]"));if(n){var r;E1=!1,(r=n.parentNode)===null||r===void 0||r.removeChild(n)}document.body.removeChild(e)}}function Dk(e){return kk(),!!Wi[e]}function _k(e){var t=Wi[e],n=null;if(t&&or())if(E1)n=w1;else{var r=document.querySelector("style[".concat(Jr,'="').concat(Wi[e],'"]'));r?n=r.innerHTML:delete Wi[e]}return[n,t]}var O1="_skip_check_",$1="_multi_value_";function Ac(e){var t=op(Rk(e),Tk);return t.replace(/\{%%%\:[^;];}/g,";")}function Lk(e){return ht(e)==="object"&&e&&(O1 in e||$1 in e)}function t0(e,t,n){if(!t)return e;var r=".".concat(t),o=n==="low"?":where(".concat(r,")"):r,i=e.split(",").map(function(a){var s,l=a.trim().split(/\s+/),c=l[0]||"",u=((s=c.match(/^\w+/))===null||s===void 0?void 0:s[0])||"";return c="".concat(u).concat(o).concat(c.slice(u.length)),[c].concat(Le(l.slice(1))).join(" ")});return i.join(",")}var jk=function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{root:!0,parentSelectors:[]},o=r.root,i=r.injectHash,a=r.parentSelectors,s=n.hashId,l=n.layer,c=n.path,u=n.hashPriority,d=n.transformers,f=d===void 0?[]:d,h=n.linters,m=h===void 0?[]:h,v="",g={};function y(x){var S=x.getName(s);if(!g[S]){var w=e(x.style,n,{root:!1,parentSelectors:a}),E=de(w,1),N=E[0];g[S]="@keyframes ".concat(x.getName(s)).concat(N)}}function b(x){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return x.forEach(function(w){Array.isArray(w)?b(w,S):w&&S.push(w)}),S}var C=b(Array.isArray(t)?t:[t]);return C.forEach(function(x){var S=typeof x=="string"&&!o?{}:x;if(typeof S=="string")v+="".concat(S,`
180
+ `);else if(S._keyframe)y(S);else{var w=f.reduce(function(E,N){var $;return(N==null||($=N.visit)===null||$===void 0?void 0:$.call(N,E))||E},S);Object.keys(w).forEach(function(E){var N=w[E];if(ht(N)==="object"&&N&&(E!=="animationName"||!N._keyframe)&&!Lk(N)){var $=!1,M=E.trim(),R=!1;(o||i)&&s?M.startsWith("@")?$=!0:M==="&"?M=t0("",s,u):M=t0(E,s,u):o&&!s&&(M==="&"||M==="")&&(M="",R=!0);var k=e(N,n,{root:R,injectHash:$,parentSelectors:[].concat(Le(a),[M])}),D=de(k,2),A=D[0],L=D[1];g=q(q({},g),L),v+="".concat(M).concat(A)}else{let _=function(W,H){process.env.NODE_ENV!=="production"&&(ht(N)!=="object"||!(N!=null&&N[O1]))&&[Ak,Pk].concat(Le(m)).forEach(function(Y){return Y(W,H,{path:c,hashId:s,parentSelectors:a})});var B=W.replace(/[A-Z]/g,function(Y){return"-".concat(Y.toLowerCase())}),K=H;!pk[W]&&typeof K=="number"&&K!==0&&(K="".concat(K,"px")),W==="animationName"&&H!==null&&H!==void 0&&H._keyframe&&(y(H),K=H.getName(s)),v+="".concat(B,":").concat(K,";")};var T,I=(T=N==null?void 0:N.value)!==null&&T!==void 0?T:N;ht(N)==="object"&&N!==null&&N!==void 0&&N[$1]&&Array.isArray(I)?I.forEach(function(W){_(E,W)}):_(E,I)}})}}),o?l&&(v&&(v="@layer ".concat(l.name," {").concat(v,"}")),l.dependencies&&(g["@layer ".concat(l.name)]=l.dependencies.map(function(x){return"@layer ".concat(x,", ").concat(l.name,";")}).join(`
181
+ `))):v="{".concat(v,"}"),[v,g]};function N1(e,t){return rl("".concat(e.join("%")).concat(t))}function Bk(){return null}var M1="style";function ip(e,t){var n=e.token,r=e.path,o=e.hashId,i=e.layer,a=e.nonce,s=e.clientOnly,l=e.order,c=l===void 0?0:l,u=p.useContext(xl),d=u.autoClear,f=u.mock,h=u.defaultCache,m=u.hashPriority,v=u.container,g=u.ssrInline,y=u.transformers,b=u.linters,C=u.cache,x=u.layer,S=n._tokenKey,w=[S];x&&w.push("layer"),w.push.apply(w,Le(r));var E=tp;process.env.NODE_ENV!=="production"&&f!==void 0&&(E=f==="client");var N=eg(M1,w,function(){var D=w.join("|");if(Dk(D)){var A=_k(D),L=de(A,2),T=L[0],I=L[1];if(T)return[T,S,I,{},s,c]}var _=t(),W=jk(_,{hashId:o,hashPriority:m,layer:x?i:void 0,path:r.join("-"),transformers:y,linters:b}),H=de(W,2),B=H[0],K=H[1],Y=Ac(B),V=N1(w,Y);return[Y,S,V,K,s,c]},function(D,A){var L=de(D,3),T=L[2];(A||d)&&tp&&ol(T,{mark:Jr})},function(D){var A=de(D,4),L=A[0];A[1];var T=A[2],I=A[3];if(E&&L!==w1){var _={mark:Jr,prepend:x?!1:"queue",attachTo:v,priority:c},W=typeof a=="function"?a():a;W&&(_.csp={nonce:W});var H=[],B=[];Object.keys(I).forEach(function(Y){Y.startsWith("@layer")?H.push(Y):B.push(Y)}),H.forEach(function(Y){_o(Ac(I[Y]),"_layer-".concat(Y),q(q({},_),{},{prepend:!0}))});var K=_o(L,T,_);K[si]=C.instanceId,K.setAttribute(Ha,S),process.env.NODE_ENV!=="production"&&K.setAttribute(FP,w.join("|")),B.forEach(function(Y){_o(Ac(I[Y]),"_effect-".concat(Y),_)})}}),$=de(N,3),M=$[0],R=$[1],k=$[2];return function(D){var A;if(!g||E||!h)A=p.createElement(Bk,null);else{var L;A=p.createElement("style",He({},(L={},U(L,Ha,R),U(L,Jr,k),L),{dangerouslySetInnerHTML:{__html:M}}))}return p.createElement(p.Fragment,null,A,D)}}var zk=function(t,n,r){var o=de(t,6),i=o[0],a=o[1],s=o[2],l=o[3],c=o[4],u=o[5],d=r||{},f=d.plain;if(c)return null;var h=i,m={"data-rc-order":"prependQueue","data-rc-priority":"".concat(u)};return h=lu(i,a,s,m,f),l&&Object.keys(l).forEach(function(v){if(!n[v]){n[v]=!0;var g=Ac(l[v]),y=lu(g,a,"_effect-".concat(v),m,f);v.startsWith("@layer")?h=y+h:h+=y}}),[u,s,h]},R1="cssVar",Fk=function(t,n){var r=t.key,o=t.prefix,i=t.unitless,a=t.ignore,s=t.token,l=t.scope,c=l===void 0?"":l,u=O.useContext(xl),d=u.cache.instanceId,f=u.container,h=s._tokenKey,m=[].concat(Le(t.path),[r,c,h]),v=eg(R1,m,function(){var g=n(),y=p1(g,r,{prefix:o,unitless:i,ignore:a,scope:c}),b=de(y,2),C=b[0],x=b[1],S=N1(m,x);return[C,x,S,r]},function(g){var y=de(g,3),b=y[2];tp&&ol(b,{mark:Jr})},function(g){var y=de(g,3),b=y[1],C=y[2];if(b){var x=_o(b,C,{mark:Jr,prepend:"queue",attachTo:f,priority:-999});x[si]=d,x.setAttribute(Ha,r)}});return v},Hk=function(t,n,r){var o=de(t,4),i=o[1],a=o[2],s=o[3],l=r||{},c=l.plain;if(!i)return null;var u=-999,d={"data-rc-order":"prependQueue","data-rc-priority":"".concat(u)},f=lu(i,s,a,d,c);return[u,a,f]},ms;ms={},U(ms,M1,zk),U(ms,m1,hk),U(ms,R1,Hk);var rn=function(){function e(t,n){Tn(this,e),U(this,"name",void 0),U(this,"style",void 0),U(this,"_keyframe",!0),this.name=t,this.style=n}return An(e,[{key:"getName",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return n?"".concat(n,"-").concat(this.name):this.name}}]),e}();function ua(e){return e.notSplit=!0,e}ua(["borderTop","borderBottom"]),ua(["borderTop"]),ua(["borderBottom"]),ua(["borderLeft","borderRight"]),ua(["borderLeft"]),ua(["borderRight"]);var rg=O.createContext({});function I1(e){return l1(e)||o1(e)||Jm(e)||c1()}function mo(e,t){for(var n=e,r=0;r<t.length;r+=1){if(n==null)return;n=n[t[r]]}return n}function T1(e,t,n,r){if(!t.length)return n;var o=I1(t),i=o[0],a=o.slice(1),s;return!e&&typeof i=="number"?s=[]:Array.isArray(e)?s=Le(e):s=q({},e),r&&n===void 0&&a.length===1?delete s[i][a[0]]:s[i]=T1(s[i],a,n,r),s}function Gr(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return t.length&&r&&n===void 0&&!mo(e,t.slice(0,-1))?e:T1(e,t,n,r)}function Vk(e){return ht(e)==="object"&&e!==null&&Object.getPrototypeOf(e)===Object.prototype}function n0(e){return Array.isArray(e)?[]:{}}var Wk=typeof Reflect>"u"?Object.keys:Reflect.ownKeys;function Ea(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=n0(t[0]);return t.forEach(function(o){function i(a,s){var l=new Set(s),c=mo(o,a),u=Array.isArray(c);if(u||Vk(c)){if(!l.has(c)){l.add(c);var d=mo(r,a);u?r=Gr(r,a,[]):(!d||ht(d)!=="object")&&(r=Gr(r,a,n0(c))),Wk(c).forEach(function(f){i([].concat(Le(a),[f]),l)})}}else r=Gr(r,a,c)}i([])}),r}function A1(){}let No=null;function Uk(){No=null,Kx()}let Ho=A1;process.env.NODE_ENV!=="production"&&(Ho=(e,t,n)=>{Ot(e,`[antd: ${t}] ${n}`),process.env.NODE_ENV==="test"&&Uk()});const P1=p.createContext({}),fn=process.env.NODE_ENV!=="production"?e=>{const{strict:t}=p.useContext(P1),n=(r,o,i)=>{if(!r)if(t===!1&&o==="deprecated"){const a=No;No||(No={}),No[e]=No[e]||[],No[e].includes(i||"")||No[e].push(i||""),a||console.warn("[antd] There exists deprecated usage in your code:",No)}else process.env.NODE_ENV!=="production"&&Ho(r,e,i)};return n.deprecated=(r,o,i,a)=>{n(r,"deprecated",`\`${o}\` is deprecated. Please use \`${i}\` instead.${a?` ${a}`:""}`)},n}:()=>{const e=()=>{};return e.deprecated=A1,e},qk=O.createContext(void 0);var Kk={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"},Gk={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0},Xk=q(q({},Gk),{},{locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",week:"Week",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",dateFormat:"M/D/YYYY",dateTimeFormat:"M/D/YYYY HH:mm:ss",previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"});const k1={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},r0={lang:Object.assign({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},Xk),timePickerLocale:Object.assign({},k1)},yr="${label} is not a valid ${type}",Qi={locale:"en",Pagination:Kk,DatePicker:r0,TimePicker:k1,Calendar:r0,global:{placeholder:"Please select"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckAll:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",deselectAll:"Deselect all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand",collapse:"Collapse"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:yr,method:yr,array:yr,object:yr,number:yr,date:yr,boolean:yr,integer:yr,float:yr,regexp:yr,email:yr,url:yr,hex:yr},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"},ColorPicker:{presetEmpty:"Empty",transparent:"Transparent",singleColor:"Single",gradientColor:"Gradient"}};let Pc=Object.assign({},Qi.Modal),kc=[];const o0=()=>kc.reduce((e,t)=>Object.assign(Object.assign({},e),t),Qi.Modal);function Yk(e){if(e){const t=Object.assign({},e);return kc.push(t),Pc=o0(),()=>{kc=kc.filter(n=>n!==t),Pc=o0()}}Pc=Object.assign({},Qi.Modal)}function D1(){return Pc}const og=O.createContext(void 0),Vo=(e,t)=>{const n=p.useContext(og),r=p.useMemo(()=>{var i;const a=t||Qi[e],s=(i=n==null?void 0:n[e])!==null&&i!==void 0?i:{};return Object.assign(Object.assign({},typeof a=="function"?a():a),s||{})},[e,t,n]),o=p.useMemo(()=>{const i=n==null?void 0:n.locale;return n!=null&&n.exist&&!i?Qi.locale:i},[n]);return[r,o]},_1="internalMark",L1=e=>{const{locale:t={},children:n,_ANT_MARK__:r}=e;if(process.env.NODE_ENV!=="production"){const i=fn("LocaleProvider");process.env.NODE_ENV!=="production"&&i(r===_1,"deprecated","`LocaleProvider` is deprecated. Please use `locale` with `ConfigProvider` instead: http://u.ant.design/locale")}p.useEffect(()=>Yk(t==null?void 0:t.Modal),[t]);const o=p.useMemo(()=>Object.assign(Object.assign({},t),{exist:!0}),[t]);return p.createElement(og.Provider,{value:o},n)};process.env.NODE_ENV!=="production"&&(L1.displayName="LocaleProvider");const j1={blue:"#1677FF",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#EB2F96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},al=Object.assign(Object.assign({},j1),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
182
+ 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
183
+ 'Noto Color Emoji'`,fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1,motion:!0}),Un=Math.round;function If(e,t){const n=e.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],r=n.map(o=>parseFloat(o));for(let o=0;o<3;o+=1)r[o]=t(r[o]||0,n[o]||"",o);return n[3]?r[3]=n[3].includes("%")?r[3]/100:r[3]:r[3]=1,r}const i0=(e,t,n)=>n===0?e:e/100;function gs(e,t){const n=t||255;return e>n?n:e<0?0:e}class Qt{constructor(t){U(this,"isValid",!0),U(this,"r",0),U(this,"g",0),U(this,"b",0),U(this,"a",1),U(this,"_h",void 0),U(this,"_s",void 0),U(this,"_l",void 0),U(this,"_v",void 0),U(this,"_max",void 0),U(this,"_min",void 0),U(this,"_brightness",void 0);function n(r){return r[0]in t&&r[1]in t&&r[2]in t}if(t)if(typeof t=="string"){let o=function(i){return r.startsWith(i)};const r=t.trim();/^#?[A-F\d]{3,8}$/i.test(r)?this.fromHexString(r):o("rgb")?this.fromRgbString(r):o("hsl")?this.fromHslString(r):(o("hsv")||o("hsb"))&&this.fromHsvString(r)}else if(t instanceof Qt)this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this._h=t._h,this._s=t._s,this._l=t._l,this._v=t._v;else if(n("rgb"))this.r=gs(t.r),this.g=gs(t.g),this.b=gs(t.b),this.a=typeof t.a=="number"?gs(t.a,1):1;else if(n("hsl"))this.fromHsl(t);else if(n("hsv"))this.fromHsv(t);else throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(t))}setR(t){return this._sc("r",t)}setG(t){return this._sc("g",t)}setB(t){return this._sc("b",t)}setA(t){return this._sc("a",t,1)}setHue(t){const n=this.toHsv();return n.h=t,this._c(n)}getLuminance(){function t(i){const a=i/255;return a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4)}const n=t(this.r),r=t(this.g),o=t(this.b);return .2126*n+.7152*r+.0722*o}getHue(){if(typeof this._h>"u"){const t=this.getMax()-this.getMin();t===0?this._h=0:this._h=Un(60*(this.r===this.getMax()?(this.g-this.b)/t+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/t+2:(this.r-this.g)/t+4))}return this._h}getSaturation(){if(typeof this._s>"u"){const t=this.getMax()-this.getMin();t===0?this._s=0:this._s=t/this.getMax()}return this._s}getLightness(){return typeof this._l>"u"&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return typeof this._v>"u"&&(this._v=this.getMax()/255),this._v}getBrightness(){return typeof this._brightness>"u"&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(t=10){const n=this.getHue(),r=this.getSaturation();let o=this.getLightness()-t/100;return o<0&&(o=0),this._c({h:n,s:r,l:o,a:this.a})}lighten(t=10){const n=this.getHue(),r=this.getSaturation();let o=this.getLightness()+t/100;return o>1&&(o=1),this._c({h:n,s:r,l:o,a:this.a})}mix(t,n=50){const r=this._c(t),o=n/100,i=s=>(r[s]-this[s])*o+this[s],a={r:Un(i("r")),g:Un(i("g")),b:Un(i("b")),a:Un(i("a")*100)/100};return this._c(a)}tint(t=10){return this.mix({r:255,g:255,b:255,a:1},t)}shade(t=10){return this.mix({r:0,g:0,b:0,a:1},t)}onBackground(t){const n=this._c(t),r=this.a+n.a*(1-this.a),o=i=>Un((this[i]*this.a+n[i]*n.a*(1-this.a))/r);return this._c({r:o("r"),g:o("g"),b:o("b"),a:r})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(t){return this.r===t.r&&this.g===t.g&&this.b===t.b&&this.a===t.a}clone(){return this._c(this)}toHexString(){let t="#";const n=(this.r||0).toString(16);t+=n.length===2?n:"0"+n;const r=(this.g||0).toString(16);t+=r.length===2?r:"0"+r;const o=(this.b||0).toString(16);if(t+=o.length===2?o:"0"+o,typeof this.a=="number"&&this.a>=0&&this.a<1){const i=Un(this.a*255).toString(16);t+=i.length===2?i:"0"+i}return t}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const t=this.getHue(),n=Un(this.getSaturation()*100),r=Un(this.getLightness()*100);return this.a!==1?`hsla(${t},${n}%,${r}%,${this.a})`:`hsl(${t},${n}%,${r}%)`}toHsv(){return{h:this.getHue(),s:this.getSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return this.a!==1?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(t,n,r){const o=this.clone();return o[t]=gs(n,r),o}_c(t){return new this.constructor(t)}getMax(){return typeof this._max>"u"&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return typeof this._min>"u"&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(t){const n=t.replace("#","");function r(o,i){return parseInt(n[o]+n[i||o],16)}n.length<6?(this.r=r(0),this.g=r(1),this.b=r(2),this.a=n[3]?r(3)/255:1):(this.r=r(0,1),this.g=r(2,3),this.b=r(4,5),this.a=n[6]?r(6,7)/255:1)}fromHsl({h:t,s:n,l:r,a:o}){if(this._h=t%360,this._s=n,this._l=r,this.a=typeof o=="number"?o:1,n<=0){const f=Un(r*255);this.r=f,this.g=f,this.b=f}let i=0,a=0,s=0;const l=t/60,c=(1-Math.abs(2*r-1))*n,u=c*(1-Math.abs(l%2-1));l>=0&&l<1?(i=c,a=u):l>=1&&l<2?(i=u,a=c):l>=2&&l<3?(a=c,s=u):l>=3&&l<4?(a=u,s=c):l>=4&&l<5?(i=u,s=c):l>=5&&l<6&&(i=c,s=u);const d=r-c/2;this.r=Un((i+d)*255),this.g=Un((a+d)*255),this.b=Un((s+d)*255)}fromHsv({h:t,s:n,v:r,a:o}){this._h=t%360,this._s=n,this._v=r,this.a=typeof o=="number"?o:1;const i=Un(r*255);if(this.r=i,this.g=i,this.b=i,n<=0)return;const a=t/60,s=Math.floor(a),l=a-s,c=Un(r*(1-n)*255),u=Un(r*(1-n*l)*255),d=Un(r*(1-n*(1-l))*255);switch(s){case 0:this.g=d,this.b=c;break;case 1:this.r=u,this.b=c;break;case 2:this.r=c,this.b=d;break;case 3:this.r=c,this.g=u;break;case 4:this.r=d,this.g=c;break;case 5:default:this.g=c,this.b=u;break}}fromHsvString(t){const n=If(t,i0);this.fromHsv({h:n[0],s:n[1],v:n[2],a:n[3]})}fromHslString(t){const n=If(t,i0);this.fromHsl({h:n[0],s:n[1],l:n[2],a:n[3]})}fromRgbString(t){const n=If(t,(r,o)=>o.includes("%")?Un(r/100*255):r);this.r=n[0],this.g=n[1],this.b=n[2],this.a=n[3]}}var ic=2,a0=.16,Jk=.05,Qk=.05,Zk=.15,B1=5,z1=4,e2=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function s0(e,t,n){var r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=n?Math.round(e.h)-ic*t:Math.round(e.h)+ic*t:r=n?Math.round(e.h)+ic*t:Math.round(e.h)-ic*t,r<0?r+=360:r>=360&&(r-=360),r}function l0(e,t,n){if(e.h===0&&e.s===0)return e.s;var r;return n?r=e.s-a0*t:t===z1?r=e.s+a0:r=e.s+Jk*t,r>1&&(r=1),n&&t===B1&&r>.1&&(r=.1),r<.06&&(r=.06),Math.round(r*100)/100}function c0(e,t,n){var r;return n?r=e.v+Qk*t:r=e.v-Zk*t,r=Math.max(0,Math.min(1,r)),Math.round(r*100)/100}function sl(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=new Qt(e),o=r.toHsv(),i=B1;i>0;i-=1){var a=new Qt({h:s0(o,i,!0),s:l0(o,i,!0),v:c0(o,i,!0)});n.push(a)}n.push(r);for(var s=1;s<=z1;s+=1){var l=new Qt({h:s0(o,s),s:l0(o,s),v:c0(o,s)});n.push(l)}return t.theme==="dark"?e2.map(function(c){var u=c.index,d=c.amount;return new Qt(t.backgroundColor||"#141414").mix(n[u],d).toHexString()}):n.map(function(c){return c.toHexString()})}var Tf={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},ap=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];ap.primary=ap[5];var sp=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];sp.primary=sp[5];var lp=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];lp.primary=lp[5];var cp=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];cp.primary=cp[5];var up=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];up.primary=up[5];var dp=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];dp.primary=dp[5];var fp=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];fp.primary=fp[5];var hp=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];hp.primary=hp[5];var cu=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];cu.primary=cu[5];var pp=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];pp.primary=pp[5];var mp=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];mp.primary=mp[5];var gp=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];gp.primary=gp[5];var vp=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];vp.primary=vp[5];var Af={red:ap,volcano:sp,orange:lp,gold:cp,yellow:up,lime:dp,green:fp,cyan:hp,blue:cu,geekblue:pp,purple:mp,magenta:gp,grey:vp};function t2(e,t){let{generateColorPalettes:n,generateNeutralColorPalettes:r}=t;const{colorSuccess:o,colorWarning:i,colorError:a,colorInfo:s,colorPrimary:l,colorBgBase:c,colorTextBase:u}=e,d=n(l),f=n(o),h=n(i),m=n(a),v=n(s),g=r(c,u),y=e.colorLink||e.colorInfo,b=n(y),C=new Qt(m[1]).mix(new Qt(m[3]),50).toHexString();return Object.assign(Object.assign({},g),{colorPrimaryBg:d[1],colorPrimaryBgHover:d[2],colorPrimaryBorder:d[3],colorPrimaryBorderHover:d[4],colorPrimaryHover:d[5],colorPrimary:d[6],colorPrimaryActive:d[7],colorPrimaryTextHover:d[8],colorPrimaryText:d[9],colorPrimaryTextActive:d[10],colorSuccessBg:f[1],colorSuccessBgHover:f[2],colorSuccessBorder:f[3],colorSuccessBorderHover:f[4],colorSuccessHover:f[4],colorSuccess:f[6],colorSuccessActive:f[7],colorSuccessTextHover:f[8],colorSuccessText:f[9],colorSuccessTextActive:f[10],colorErrorBg:m[1],colorErrorBgHover:m[2],colorErrorBgFilledHover:C,colorErrorBgActive:m[3],colorErrorBorder:m[3],colorErrorBorderHover:m[4],colorErrorHover:m[5],colorError:m[6],colorErrorActive:m[7],colorErrorTextHover:m[8],colorErrorText:m[9],colorErrorTextActive:m[10],colorWarningBg:h[1],colorWarningBgHover:h[2],colorWarningBorder:h[3],colorWarningBorderHover:h[4],colorWarningHover:h[4],colorWarning:h[6],colorWarningActive:h[7],colorWarningTextHover:h[8],colorWarningText:h[9],colorWarningTextActive:h[10],colorInfoBg:v[1],colorInfoBgHover:v[2],colorInfoBorder:v[3],colorInfoBorderHover:v[4],colorInfoHover:v[4],colorInfo:v[6],colorInfoActive:v[7],colorInfoTextHover:v[8],colorInfoText:v[9],colorInfoTextActive:v[10],colorLinkHover:b[4],colorLink:b[6],colorLinkActive:b[7],colorBgMask:new Qt("#000").setA(.45).toRgbString(),colorWhite:"#fff"})}const n2=e=>{let t=e,n=e,r=e,o=e;return e<6&&e>=5?t=e+1:e<16&&e>=6?t=e+2:e>=16&&(t=16),e<7&&e>=5?n=4:e<8&&e>=7?n=5:e<14&&e>=8?n=6:e<16&&e>=14?n=7:e>=16&&(n=8),e<6&&e>=2?r=1:e>=6&&(r=2),e>4&&e<8?o=4:e>=8&&(o=6),{borderRadius:e,borderRadiusXS:r,borderRadiusSM:n,borderRadiusLG:t,borderRadiusOuter:o}};function r2(e){const{motionUnit:t,motionBase:n,borderRadius:r,lineWidth:o}=e;return Object.assign({motionDurationFast:`${(n+t).toFixed(1)}s`,motionDurationMid:`${(n+t*2).toFixed(1)}s`,motionDurationSlow:`${(n+t*3).toFixed(1)}s`,lineWidthBold:o+1},n2(r))}const o2=e=>{const{controlHeight:t}=e;return{controlHeightSM:t*.75,controlHeightXS:t*.5,controlHeightLG:t*1.25}};function Dc(e){return(e+8)/e}function i2(e){const t=Array.from({length:10}).map((n,r)=>{const o=r-1,i=e*Math.pow(Math.E,o/5),a=r>1?Math.floor(i):Math.ceil(i);return Math.floor(a/2)*2});return t[1]=e,t.map(n=>({size:n,lineHeight:Dc(n)}))}const a2=e=>{const t=i2(e),n=t.map(u=>u.size),r=t.map(u=>u.lineHeight),o=n[1],i=n[0],a=n[2],s=r[1],l=r[0],c=r[2];return{fontSizeSM:i,fontSize:o,fontSizeLG:a,fontSizeXL:n[3],fontSizeHeading1:n[6],fontSizeHeading2:n[5],fontSizeHeading3:n[4],fontSizeHeading4:n[3],fontSizeHeading5:n[2],lineHeight:s,lineHeightLG:c,lineHeightSM:l,fontHeight:Math.round(s*o),fontHeightLG:Math.round(c*a),fontHeightSM:Math.round(l*i),lineHeightHeading1:r[6],lineHeightHeading2:r[5],lineHeightHeading3:r[4],lineHeightHeading4:r[3],lineHeightHeading5:r[2]}};function s2(e){const{sizeUnit:t,sizeStep:n}=e;return{sizeXXL:t*(n+8),sizeXL:t*(n+4),sizeLG:t*(n+2),sizeMD:t*(n+1),sizeMS:t*n,size:t*n,sizeSM:t*(n-1),sizeXS:t*(n-2),sizeXXS:t*(n-3)}}const Ir=(e,t)=>new Qt(e).setA(t).toRgbString(),vs=(e,t)=>new Qt(e).darken(t).toHexString(),l2=e=>{const t=sl(e);return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[4],6:t[5],7:t[6],8:t[4],9:t[5],10:t[6]}},c2=(e,t)=>{const n=e||"#fff",r=t||"#000";return{colorBgBase:n,colorTextBase:r,colorText:Ir(r,.88),colorTextSecondary:Ir(r,.65),colorTextTertiary:Ir(r,.45),colorTextQuaternary:Ir(r,.25),colorFill:Ir(r,.15),colorFillSecondary:Ir(r,.06),colorFillTertiary:Ir(r,.04),colorFillQuaternary:Ir(r,.02),colorBgSolid:Ir(r,1),colorBgSolidHover:Ir(r,.75),colorBgSolidActive:Ir(r,.95),colorBgLayout:vs(n,4),colorBgContainer:vs(n,0),colorBgElevated:vs(n,0),colorBgSpotlight:Ir(r,.85),colorBgBlur:"transparent",colorBorder:vs(n,15),colorBorderSecondary:vs(n,6)}};function u2(e){Tf.pink=Tf.magenta,Af.pink=Af.magenta;const t=Object.keys(j1).map(n=>{const r=e[n]===Tf[n]?Af[n]:sl(e[n]);return Array.from({length:10},()=>1).reduce((o,i,a)=>(o[`${n}-${a+1}`]=r[a],o[`${n}${a+1}`]=r[a],o),{})}).reduce((n,r)=>(n=Object.assign(Object.assign({},n),r),n),{});return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e),t),t2(e,{generateColorPalettes:l2,generateNeutralColorPalettes:c2})),a2(e.fontSize)),s2(e)),o2(e)),r2(e))}const F1=ep(u2),bp={token:al,override:{override:al},hashed:!0},H1=O.createContext(bp),ll="ant",bd="anticon",d2=["outlined","borderless","filled","underlined"],f2=(e,t)=>t||(e?`${ll}-${e}`:ll),_t=p.createContext({getPrefixCls:f2,iconPrefixCls:bd}),{Consumer:sU}=_t,u0={};function Rr(e){const t=p.useContext(_t),{getPrefixCls:n,direction:r,getPopupContainer:o}=t,i=t[e];return Object.assign(Object.assign({classNames:u0,styles:u0},i),{getPrefixCls:n,direction:r,getPopupContainer:o})}const h2=`-ant-${Date.now()}-${Math.random()}`;function p2(e,t){const n={},r=(a,s)=>{let l=a.clone();return l=(s==null?void 0:s(l))||l,l.toRgbString()},o=(a,s)=>{const l=new Qt(a),c=sl(l.toRgbString());n[`${s}-color`]=r(l),n[`${s}-color-disabled`]=c[1],n[`${s}-color-hover`]=c[4],n[`${s}-color-active`]=c[6],n[`${s}-color-outline`]=l.clone().setA(.2).toRgbString(),n[`${s}-color-deprecated-bg`]=c[0],n[`${s}-color-deprecated-border`]=c[2]};if(t.primaryColor){o(t.primaryColor,"primary");const a=new Qt(t.primaryColor),s=sl(a.toRgbString());s.forEach((c,u)=>{n[`primary-${u+1}`]=c}),n["primary-color-deprecated-l-35"]=r(a,c=>c.lighten(35)),n["primary-color-deprecated-l-20"]=r(a,c=>c.lighten(20)),n["primary-color-deprecated-t-20"]=r(a,c=>c.tint(20)),n["primary-color-deprecated-t-50"]=r(a,c=>c.tint(50)),n["primary-color-deprecated-f-12"]=r(a,c=>c.setA(c.a*.12));const l=new Qt(s[0]);n["primary-color-active-deprecated-f-30"]=r(l,c=>c.setA(c.a*.3)),n["primary-color-active-deprecated-d-02"]=r(l,c=>c.darken(2))}return t.successColor&&o(t.successColor,"success"),t.warningColor&&o(t.warningColor,"warning"),t.errorColor&&o(t.errorColor,"error"),t.infoColor&&o(t.infoColor,"info"),`
184
+ :root {
185
+ ${Object.keys(n).map(a=>`--${e}-${a}: ${n[a]};`).join(`
186
+ `)}
187
+ }
188
+ `.trim()}function m2(e,t){const n=p2(e,t);or()?_o(n,`${h2}-dynamic-theme`):process.env.NODE_ENV!=="production"&&Ho(!1,"ConfigProvider","SSR do not support dynamic theme with css variables.")}const Fr=p.createContext(!1),V1=e=>{let{children:t,disabled:n}=e;const r=p.useContext(Fr);return p.createElement(Fr.Provider,{value:n??r},t)},Ua=p.createContext(void 0),g2=e=>{let{children:t,size:n}=e;const r=p.useContext(Ua);return p.createElement(Ua.Provider,{value:n||r},t)};function v2(){const e=O.useContext(Fr),t=O.useContext(Ua);return{componentDisabled:e,componentSize:t}}var W1=An(function e(){Tn(this,e)}),U1="CALC_UNIT",b2=new RegExp(U1,"g");function Pf(e){return typeof e=="number"?"".concat(e).concat(U1):e}var y2=function(e){Bo(n,e);var t=zo(n);function n(r,o){var i;Tn(this,n),i=t.call(this),U(Ft(i),"result",""),U(Ft(i),"unitlessCssVar",void 0),U(Ft(i),"lowPriority",void 0);var a=ht(r);return i.unitlessCssVar=o,r instanceof n?i.result="(".concat(r.result,")"):a==="number"?i.result=Pf(r):a==="string"&&(i.result=r),i}return An(n,[{key:"add",value:function(o){return o instanceof n?this.result="".concat(this.result," + ").concat(o.getResult()):(typeof o=="number"||typeof o=="string")&&(this.result="".concat(this.result," + ").concat(Pf(o))),this.lowPriority=!0,this}},{key:"sub",value:function(o){return o instanceof n?this.result="".concat(this.result," - ").concat(o.getResult()):(typeof o=="number"||typeof o=="string")&&(this.result="".concat(this.result," - ").concat(Pf(o))),this.lowPriority=!0,this}},{key:"mul",value:function(o){return this.lowPriority&&(this.result="(".concat(this.result,")")),o instanceof n?this.result="".concat(this.result," * ").concat(o.getResult(!0)):(typeof o=="number"||typeof o=="string")&&(this.result="".concat(this.result," * ").concat(o)),this.lowPriority=!1,this}},{key:"div",value:function(o){return this.lowPriority&&(this.result="(".concat(this.result,")")),o instanceof n?this.result="".concat(this.result," / ").concat(o.getResult(!0)):(typeof o=="number"||typeof o=="string")&&(this.result="".concat(this.result," / ").concat(o)),this.lowPriority=!1,this}},{key:"getResult",value:function(o){return this.lowPriority||o?"(".concat(this.result,")"):this.result}},{key:"equal",value:function(o){var i=this,a=o||{},s=a.unit,l=!0;return typeof s=="boolean"?l=s:Array.from(this.unitlessCssVar).some(function(c){return i.result.includes(c)})&&(l=!1),this.result=this.result.replace(b2,l?"px":""),typeof this.lowPriority<"u"?"calc(".concat(this.result,")"):this.result}}]),n}(W1),C2=function(e){Bo(n,e);var t=zo(n);function n(r){var o;return Tn(this,n),o=t.call(this),U(Ft(o),"result",0),r instanceof n?o.result=r.result:typeof r=="number"&&(o.result=r),o}return An(n,[{key:"add",value:function(o){return o instanceof n?this.result+=o.result:typeof o=="number"&&(this.result+=o),this}},{key:"sub",value:function(o){return o instanceof n?this.result-=o.result:typeof o=="number"&&(this.result-=o),this}},{key:"mul",value:function(o){return o instanceof n?this.result*=o.result:typeof o=="number"&&(this.result*=o),this}},{key:"div",value:function(o){return o instanceof n?this.result/=o.result:typeof o=="number"&&(this.result/=o),this}},{key:"equal",value:function(){return this.result}}]),n}(W1),S2=function(t,n){var r=t==="css"?y2:C2;return function(o){return new r(o,n)}},d0=function(t,n){return"".concat([n,t.replace(/([A-Z]+)([A-Z][a-z]+)/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2")].filter(Boolean).join("-"))};function tn(e){var t=p.useRef();t.current=e;var n=p.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}function qa(e){var t=p.useRef(!1),n=p.useState(e),r=de(n,2),o=r[0],i=r[1];p.useEffect(function(){return t.current=!1,function(){t.current=!0}},[]);function a(s,l){l&&t.current||i(s)}return[o,a]}function kf(e){return e!==void 0}function bn(e,t){var n=t||{},r=n.defaultValue,o=n.value,i=n.onChange,a=n.postState,s=qa(function(){return kf(o)?o:kf(r)?typeof r=="function"?r():r:typeof e=="function"?e():e}),l=de(s,2),c=l[0],u=l[1],d=o!==void 0?o:c,f=a?a(d):d,h=tn(i),m=qa([d]),v=de(m,2),g=v[0],y=v[1];_s(function(){var C=g[0];c!==C&&h(c,C)},[g]),_s(function(){kf(o)||u(o)},[o]);var b=tn(function(C,x){u(C,x),y([d],x)});return[f,b]}function f0(e,t,n,r){var o=q({},t[e]);if(r!=null&&r.deprecatedTokens){var i=r.deprecatedTokens;i.forEach(function(s){var l=de(s,2),c=l[0],u=l[1];if(process.env.NODE_ENV!=="production"&&Ot(!(o!=null&&o[c]),"Component Token `".concat(String(c),"` of ").concat(String(e)," is deprecated. Please use `").concat(String(u),"` instead.")),o!=null&&o[c]||o!=null&&o[u]){var d;(d=o[u])!==null&&d!==void 0||(o[u]=o==null?void 0:o[c])}})}var a=q(q({},n),o);return Object.keys(a).forEach(function(s){a[s]===t[s]&&delete a[s]}),a}var q1=process.env.NODE_ENV!=="production"||typeof CSSINJS_STATISTIC<"u",yp=!0;function Xt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!q1)return Object.assign.apply(Object,[{}].concat(t));yp=!1;var r={};return t.forEach(function(o){if(ht(o)==="object"){var i=Object.keys(o);i.forEach(function(a){Object.defineProperty(r,a,{configurable:!0,enumerable:!0,get:function(){return o[a]}})})}}),yp=!0,r}var h0={};function x2(){}var w2=function(t){var n,r=t,o=x2;return q1&&typeof Proxy<"u"&&(n=new Set,r=new Proxy(t,{get:function(a,s){if(yp){var l;(l=n)===null||l===void 0||l.add(s)}return a[s]}}),o=function(a,s){var l;h0[a]={global:Array.from(n),component:q(q({},(l=h0[a])===null||l===void 0?void 0:l.component),s)}}),{token:r,keys:n,flush:o}};function p0(e,t,n){if(typeof n=="function"){var r;return n(Xt(t,(r=t[e])!==null&&r!==void 0?r:{}))}return n??{}}function E2(e){return e==="js"?{max:Math.max,min:Math.min}:{max:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return"max(".concat(r.map(function(i){return oe(i)}).join(","),")")},min:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return"min(".concat(r.map(function(i){return oe(i)}).join(","),")")}}}var O2=1e3*60*10,$2=function(){function e(){Tn(this,e),U(this,"map",new Map),U(this,"objectIDMap",new WeakMap),U(this,"nextID",0),U(this,"lastAccessBeat",new Map),U(this,"accessBeat",0)}return An(e,[{key:"set",value:function(n,r){this.clear();var o=this.getCompositeKey(n);this.map.set(o,r),this.lastAccessBeat.set(o,Date.now())}},{key:"get",value:function(n){var r=this.getCompositeKey(n),o=this.map.get(r);return this.lastAccessBeat.set(r,Date.now()),this.accessBeat+=1,o}},{key:"getCompositeKey",value:function(n){var r=this,o=n.map(function(i){return i&&ht(i)==="object"?"obj_".concat(r.getObjectID(i)):"".concat(ht(i),"_").concat(i)});return o.join("|")}},{key:"getObjectID",value:function(n){if(this.objectIDMap.has(n))return this.objectIDMap.get(n);var r=this.nextID;return this.objectIDMap.set(n,r),this.nextID+=1,r}},{key:"clear",value:function(){var n=this;if(this.accessBeat>1e4){var r=Date.now();this.lastAccessBeat.forEach(function(o,i){r-o>O2&&(n.map.delete(i),n.lastAccessBeat.delete(i))}),this.accessBeat=0}}}]),e}(),m0=new $2;function N2(e,t){return O.useMemo(function(){var n=m0.get(t);if(n)return n;var r=e();return m0.set(t,r),r},t)}var M2=function(){return{}};function R2(e){var t=e.useCSP,n=t===void 0?M2:t,r=e.useToken,o=e.usePrefix,i=e.getResetStyles,a=e.getCommonStyle,s=e.getCompUnitless;function l(f,h,m,v){var g=Array.isArray(f)?f[0]:f;function y(N){return"".concat(String(g)).concat(N.slice(0,1).toUpperCase()).concat(N.slice(1))}var b=(v==null?void 0:v.unitless)||{},C=typeof s=="function"?s(f):{},x=q(q({},C),{},U({},y("zIndexPopup"),!0));Object.keys(b).forEach(function(N){x[y(N)]=b[N]});var S=q(q({},v),{},{unitless:x,prefixToken:y}),w=u(f,h,m,S),E=c(g,m,S);return function(N){var $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:N,M=w(N,$),R=de(M,2),k=R[1],D=E($),A=de(D,2),L=A[0],T=A[1];return[L,k,T]}}function c(f,h,m){var v=m.unitless,g=m.injectStyle,y=g===void 0?!0:g,b=m.prefixToken,C=m.ignore,x=function(E){var N=E.rootCls,$=E.cssVar,M=$===void 0?{}:$,R=r(),k=R.realToken;return Fk({path:[f],prefix:M.prefix,key:M.key,unitless:v,ignore:C,token:k,scope:N},function(){var D=p0(f,k,h),A=f0(f,k,D,{deprecatedTokens:m==null?void 0:m.deprecatedTokens});return Object.keys(D).forEach(function(L){A[b(L)]=A[L],delete A[L]}),A}),null},S=function(E){var N=r(),$=N.cssVar;return[function(M){return y&&$?O.createElement(O.Fragment,null,O.createElement(x,{rootCls:E,cssVar:$,component:f}),M):M},$==null?void 0:$.key]};return S}function u(f,h,m){var v=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},g=Array.isArray(f)?f:[f,f],y=de(g,1),b=y[0],C=g.join("-"),x=e.layer||{name:"antd"};return function(S){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:S,E=r(),N=E.theme,$=E.realToken,M=E.hashId,R=E.token,k=E.cssVar,D=o(),A=D.rootPrefixCls,L=D.iconPrefixCls,T=n(),I=k?"css":"js",_=N2(function(){var V=new Set;return k&&Object.keys(v.unitless||{}).forEach(function(G){V.add(Mc(G,k.prefix)),V.add(Mc(G,d0(b,k.prefix)))}),S2(I,V)},[I,b,k==null?void 0:k.prefix]),W=E2(I),H=W.max,B=W.min,K={theme:N,token:R,hashId:M,nonce:function(){return T.nonce},clientOnly:v.clientOnly,layer:x,order:v.order||-999};typeof i=="function"&&ip(q(q({},K),{},{clientOnly:!1,path:["Shared",A]}),function(){return i(R,{prefix:{rootPrefixCls:A,iconPrefixCls:L},csp:T})});var Y=ip(q(q({},K),{},{path:[C,S,L]}),function(){if(v.injectStyle===!1)return[];var V=w2(R),G=V.token,Q=V.flush,ce=p0(b,$,m),Z=".".concat(S),he=f0(b,$,ce,{deprecatedTokens:v.deprecatedTokens});k&&ce&&ht(ce)==="object"&&Object.keys(ce).forEach(function(ve){ce[ve]="var(".concat(Mc(ve,d0(b,k.prefix)),")")});var ye=Xt(G,{componentCls:Z,prefixCls:S,iconCls:".".concat(L),antCls:".".concat(A),calc:_,max:H,min:B},k?ce:he),fe=h(ye,{hashId:M,prefixCls:S,rootPrefixCls:A,iconPrefixCls:L});Q(b,he);var ae=typeof a=="function"?a(ye,S,w,v.resetFont):null;return[v.resetStyle===!1?null:ae,fe]});return[Y,M]}}function d(f,h,m){var v=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},g=u(f,h,m,q({resetStyle:!1,order:-998},v)),y=function(C){var x=C.prefixCls,S=C.rootCls,w=S===void 0?x:S;return g(x,w),null};return process.env.NODE_ENV!=="production"&&(y.displayName="SubStyle_".concat(String(Array.isArray(f)?f.join("."):f))),y}return{genStyleHooks:l,genSubStyleComponent:d,genComponentStyleHook:u}}const gi=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"],I2="5.24.5";function Df(e){return e>=0&&e<=255}function $s(e,t){const{r:n,g:r,b:o,a:i}=new Qt(e).toRgb();if(i<1)return e;const{r:a,g:s,b:l}=new Qt(t).toRgb();for(let c=.01;c<=1;c+=.01){const u=Math.round((n-a*(1-c))/c),d=Math.round((r-s*(1-c))/c),f=Math.round((o-l*(1-c))/c);if(Df(u)&&Df(d)&&Df(f))return new Qt({r:u,g:d,b:f,a:Math.round(c*100)/100}).toRgbString()}return new Qt({r:n,g:r,b:o,a:1}).toRgbString()}var T2=function(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 K1(e){const{override:t}=e,n=T2(e,["override"]),r=Object.assign({},t);Object.keys(al).forEach(f=>{delete r[f]});const o=Object.assign(Object.assign({},n),r),i=480,a=576,s=768,l=992,c=1200,u=1600;if(o.motion===!1){const f="0s";o.motionDurationFast=f,o.motionDurationMid=f,o.motionDurationSlow=f}return Object.assign(Object.assign(Object.assign({},o),{colorFillContent:o.colorFillSecondary,colorFillContentHover:o.colorFill,colorFillAlter:o.colorFillQuaternary,colorBgContainerDisabled:o.colorFillTertiary,colorBorderBg:o.colorBgContainer,colorSplit:$s(o.colorBorderSecondary,o.colorBgContainer),colorTextPlaceholder:o.colorTextQuaternary,colorTextDisabled:o.colorTextQuaternary,colorTextHeading:o.colorText,colorTextLabel:o.colorTextSecondary,colorTextDescription:o.colorTextTertiary,colorTextLightSolid:o.colorWhite,colorHighlight:o.colorError,colorBgTextHover:o.colorFillSecondary,colorBgTextActive:o.colorFill,colorIcon:o.colorTextTertiary,colorIconHover:o.colorText,colorErrorOutline:$s(o.colorErrorBg,o.colorBgContainer),colorWarningOutline:$s(o.colorWarningBg,o.colorBgContainer),fontSizeIcon:o.fontSizeSM,lineWidthFocus:o.lineWidth*3,lineWidth:o.lineWidth,controlOutlineWidth:o.lineWidth*2,controlInteractiveSize:o.controlHeight/2,controlItemBgHover:o.colorFillTertiary,controlItemBgActive:o.colorPrimaryBg,controlItemBgActiveHover:o.colorPrimaryBgHover,controlItemBgActiveDisabled:o.colorFill,controlTmpOutline:o.colorFillQuaternary,controlOutline:$s(o.colorPrimaryBg,o.colorBgContainer),lineType:o.lineType,borderRadius:o.borderRadius,borderRadiusXS:o.borderRadiusXS,borderRadiusSM:o.borderRadiusSM,borderRadiusLG:o.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:o.sizeXXS,paddingXS:o.sizeXS,paddingSM:o.sizeSM,padding:o.size,paddingMD:o.sizeMD,paddingLG:o.sizeLG,paddingXL:o.sizeXL,paddingContentHorizontalLG:o.sizeLG,paddingContentVerticalLG:o.sizeMS,paddingContentHorizontal:o.sizeMS,paddingContentVertical:o.sizeSM,paddingContentHorizontalSM:o.size,paddingContentVerticalSM:o.sizeXS,marginXXS:o.sizeXXS,marginXS:o.sizeXS,marginSM:o.sizeSM,margin:o.size,marginMD:o.sizeMD,marginLG:o.sizeLG,marginXL:o.sizeXL,marginXXL:o.sizeXXL,boxShadow:`
189
+ 0 6px 16px 0 rgba(0, 0, 0, 0.08),
190
+ 0 3px 6px -4px rgba(0, 0, 0, 0.12),
191
+ 0 9px 28px 8px rgba(0, 0, 0, 0.05)
192
+ `,boxShadowSecondary:`
193
+ 0 6px 16px 0 rgba(0, 0, 0, 0.08),
194
+ 0 3px 6px -4px rgba(0, 0, 0, 0.12),
195
+ 0 9px 28px 8px rgba(0, 0, 0, 0.05)
196
+ `,boxShadowTertiary:`
197
+ 0 1px 2px 0 rgba(0, 0, 0, 0.03),
198
+ 0 1px 6px -1px rgba(0, 0, 0, 0.02),
199
+ 0 2px 4px 0 rgba(0, 0, 0, 0.02)
200
+ `,screenXS:i,screenXSMin:i,screenXSMax:a-1,screenSM:a,screenSMMin:a,screenSMMax:s-1,screenMD:s,screenMDMin:s,screenMDMax:l-1,screenLG:l,screenLGMin:l,screenLGMax:c-1,screenXL:c,screenXLMin:c,screenXLMax:u-1,screenXXL:u,screenXXLMin:u,boxShadowPopoverArrow:"2px 2px 5px rgba(0, 0, 0, 0.05)",boxShadowCard:`
201
+ 0 1px 2px -2px ${new Qt("rgba(0, 0, 0, 0.16)").toRgbString()},
202
+ 0 3px 6px 0 ${new Qt("rgba(0, 0, 0, 0.12)").toRgbString()},
203
+ 0 5px 12px 4px ${new Qt("rgba(0, 0, 0, 0.09)").toRgbString()}
204
+ `,boxShadowDrawerRight:`
205
+ -6px 0 16px 0 rgba(0, 0, 0, 0.08),
206
+ -3px 0 6px -4px rgba(0, 0, 0, 0.12),
207
+ -9px 0 28px 8px rgba(0, 0, 0, 0.05)
208
+ `,boxShadowDrawerLeft:`
209
+ 6px 0 16px 0 rgba(0, 0, 0, 0.08),
210
+ 3px 0 6px -4px rgba(0, 0, 0, 0.12),
211
+ 9px 0 28px 8px rgba(0, 0, 0, 0.05)
212
+ `,boxShadowDrawerUp:`
213
+ 0 6px 16px 0 rgba(0, 0, 0, 0.08),
214
+ 0 3px 6px -4px rgba(0, 0, 0, 0.12),
215
+ 0 9px 28px 8px rgba(0, 0, 0, 0.05)
216
+ `,boxShadowDrawerDown:`
217
+ 0 -6px 16px 0 rgba(0, 0, 0, 0.08),
218
+ 0 -3px 6px -4px rgba(0, 0, 0, 0.12),
219
+ 0 -9px 28px 8px rgba(0, 0, 0, 0.05)
220
+ `,boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"}),r)}var g0=function(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};const G1={lineHeight:!0,lineHeightSM:!0,lineHeightLG:!0,lineHeightHeading1:!0,lineHeightHeading2:!0,lineHeightHeading3:!0,lineHeightHeading4:!0,lineHeightHeading5:!0,opacityLoading:!0,fontWeightStrong:!0,zIndexPopupBase:!0,zIndexBase:!0,opacityImage:!0},A2={size:!0,sizeSM:!0,sizeLG:!0,sizeMD:!0,sizeXS:!0,sizeXXS:!0,sizeMS:!0,sizeXL:!0,sizeXXL:!0,sizeUnit:!0,sizeStep:!0,motionBase:!0,motionUnit:!0},P2={screenXS:!0,screenXSMin:!0,screenXSMax:!0,screenSM:!0,screenSMMin:!0,screenSMMax:!0,screenMD:!0,screenMDMin:!0,screenMDMax:!0,screenLG:!0,screenLGMin:!0,screenLGMax:!0,screenXL:!0,screenXLMin:!0,screenXLMax:!0,screenXXL:!0,screenXXLMin:!0},X1=(e,t,n)=>{const r=n.getDerivativeToken(e),{override:o}=t,i=g0(t,["override"]);let a=Object.assign(Object.assign({},r),{override:o});return a=K1(a),i&&Object.entries(i).forEach(s=>{let[l,c]=s;const{theme:u}=c,d=g0(c,["theme"]);let f=d;u&&(f=X1(Object.assign(Object.assign({},a),d),{override:d},u)),a[l]=f}),a};function br(){const{token:e,hashed:t,theme:n,override:r,cssVar:o}=O.useContext(H1),i=`${I2}-${t||""}`,a=n||F1,[s,l,c]=fk(a,[al,e],{salt:i,override:r,getComputedToken:X1,formatToken:K1,cssVar:o&&{prefix:o.prefix,key:o.key,unitless:G1,ignore:A2,preserve:P2}});return[a,c,t?l:"",s,o]}const cl={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},Bn=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return{boxSizing:"border-box",margin:0,padding:0,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,listStyle:"none",fontFamily:t?"inherit":e.fontFamily}},oa=()=>({display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),uu=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),k2=e=>({a:{color:e.colorLink,textDecoration:e.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${e.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive},"&:active, &:hover":{textDecoration:e.linkHoverDecoration,outline:0},"&:focus":{textDecoration:e.linkFocusDecoration,outline:0},"&[disabled]":{color:e.colorTextDisabled,cursor:"not-allowed"}}}),D2=(e,t,n,r)=>{const o=`[class^="${t}"], [class*=" ${t}"]`,i=n?`.${n}`:o,a={boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}};let s={};return r!==!1&&(s={fontFamily:e.fontFamily,fontSize:e.fontSize}),{[i]:Object.assign(Object.assign(Object.assign({},s),a),{[o]:a})}},wl=(e,t)=>({outline:`${oe(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`,outlineOffset:t??1,transition:"outline-offset 0s, outline 0s"}),Ka=(e,t)=>({"&:focus-visible":Object.assign({},wl(e,t))}),Y1=e=>({[`.${e}`]:Object.assign(Object.assign({},oa()),{[`.${e} .${e}-icon`]:{display:"block"}})}),{genStyleHooks:yn,genComponentStyleHook:_2,genSubStyleComponent:J1}=R2({usePrefix:()=>{const{getPrefixCls:e,iconPrefixCls:t}=O.useContext(_t);return{rootPrefixCls:e(),iconPrefixCls:t}},useToken:()=>{const[e,t,n,r,o]=br();return{theme:e,realToken:t,hashId:n,token:r,cssVar:o}},useCSP:()=>{const{csp:e}=O.useContext(_t);return e??{}},getResetStyles:(e,t)=>{var n;const r=k2(e);return[r,{"&":r},Y1((n=t==null?void 0:t.prefix.iconPrefixCls)!==null&&n!==void 0?n:bd)]},getCommonStyle:D2,getCompUnitless:()=>G1});function L2(e,t){return gi.reduce((n,r)=>{const o=e[`${r}1`],i=e[`${r}3`],a=e[`${r}6`],s=e[`${r}7`];return Object.assign(Object.assign({},n),t(r,{lightColor:o,lightBorderColor:i,darkColor:a,textColor:s}))},{})}const j2=(e,t)=>{const[n,r]=br();return ip({token:r,hashId:"",path:["ant-design-icons",e],nonce:()=>t==null?void 0:t.nonce,layer:{name:"antd"}},()=>[Y1(e)])},B2=Object.assign({},p),{useId:v0}=B2,z2=()=>"",F2=typeof v0>"u"?z2:v0;function H2(e,t,n){var r,o;const i=fn("ConfigProvider"),a=e||{},s=a.inherit===!1||!t?Object.assign(Object.assign({},bp),{hashed:(r=t==null?void 0:t.hashed)!==null&&r!==void 0?r:bp.hashed,cssVar:t==null?void 0:t.cssVar}):t,l=F2();if(process.env.NODE_ENV!=="production"){const c=a.cssVar||s.cssVar,u=!!(typeof a.cssVar=="object"&&(!((o=a.cssVar)===null||o===void 0)&&o.key)||l);process.env.NODE_ENV!=="production"&&i(!c||u,"breaking","Missing key in `cssVar` config. Please upgrade to React 18 or set `cssVar.key` manually in each ConfigProvider inside `cssVar` enabled ConfigProvider.")}return Sl(()=>{var c,u;if(!e)return t;const d=Object.assign({},s.components);Object.keys(e.components||{}).forEach(m=>{d[m]=Object.assign(Object.assign({},d[m]),e.components[m])});const f=`css-var-${l.replace(/:/g,"")}`,h=((c=a.cssVar)!==null&&c!==void 0?c:s.cssVar)&&Object.assign(Object.assign(Object.assign({prefix:n==null?void 0:n.prefixCls},typeof s.cssVar=="object"?s.cssVar:{}),typeof a.cssVar=="object"?a.cssVar:{}),{key:typeof a.cssVar=="object"&&((u=a.cssVar)===null||u===void 0?void 0:u.key)||f});return Object.assign(Object.assign(Object.assign({},s),a),{token:Object.assign(Object.assign({},s.token),a.token),components:d,cssVar:h})},[a,s],(c,u)=>c.some((d,f)=>{const h=u[f];return!Fa(d,h,!0)}))}var V2=["children"],Q1=p.createContext({});function W2(e){var t=e.children,n=Mt(e,V2);return p.createElement(Q1.Provider,{value:n},t)}var U2=function(e){Bo(n,e);var t=zo(n);function n(){return Tn(this,n),t.apply(this,arguments)}return An(n,[{key:"render",value:function(){return this.props.children}}]),n}(p.Component);function q2(e){var t=p.useReducer(function(s){return s+1},0),n=de(t,2),r=n[1],o=p.useRef(e),i=tn(function(){return o.current}),a=tn(function(s){o.current=typeof s=="function"?s(o.current):s,r()});return[i,a]}var Xo="none",ac="appear",sc="enter",lc="leave",b0="none",Xr="prepare",Oa="start",$a="active",ig="end",Z1="prepared";function y0(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 K2(e,t){var n={animationend:y0("Animation","AnimationEnd"),transitionend:y0("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete n.animationend.animation,"TransitionEvent"in t||delete n.transitionend.transition),n}var G2=K2(or(),typeof window<"u"?window:{}),ew={};if(or()){var X2=document.createElement("div");ew=X2.style}var cc={};function tw(e){if(cc[e])return cc[e];var t=G2[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 ew)return cc[e]=t[i],cc[e]}return""}var nw=tw("animationend"),rw=tw("transitionend"),ow=!!(nw&&rw),C0=nw||"animationend",S0=rw||"transitionend";function x0(e,t){if(!e)return null;if(ht(e)==="object"){var n=t.replace(/-\w/g,function(r){return r[1].toUpperCase()});return e[n]}return"".concat(e,"-").concat(t)}const Y2=function(e){var t=O.useRef();function n(o){o&&(o.removeEventListener(S0,e),o.removeEventListener(C0,e))}function r(o){t.current&&t.current!==o&&n(t.current),o&&o!==t.current&&(o.addEventListener(S0,e),o.addEventListener(C0,e),t.current=o)}return p.useEffect(function(){return function(){n(t.current)}},[]),[r,n]};var iw=or()?O.useLayoutEffect:O.useEffect;const J2=function(){var e=p.useRef(null);function t(){Ht.cancel(e.current)}function n(r){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;t();var i=Ht(function(){o<=1?r({isCanceled:function(){return i!==e.current}}):n(r,o-1)});e.current=i}return p.useEffect(function(){return function(){t()}},[]),[n,t]};var Q2=[Xr,Oa,$a,ig],Z2=[Xr,Z1],aw=!1,eD=!0;function sw(e){return e===$a||e===ig}const tD=function(e,t,n){var r=qa(b0),o=de(r,2),i=o[0],a=o[1],s=J2(),l=de(s,2),c=l[0],u=l[1];function d(){a(Xr,!0)}var f=t?Z2:Q2;return iw(function(){if(i!==b0&&i!==ig){var h=f.indexOf(i),m=f[h+1],v=n(i);v===aw?a(m,!0):m&&c(function(g){function y(){g.isCanceled()||a(m,!0)}v===!0?y():Promise.resolve(v).then(y)})}},[e,i]),p.useEffect(function(){return function(){u()}},[]),[d,i]};function nD(e,t,n,r){var o=r.motionEnter,i=o===void 0?!0:o,a=r.motionAppear,s=a===void 0?!0:a,l=r.motionLeave,c=l===void 0?!0:l,u=r.motionDeadline,d=r.motionLeaveImmediately,f=r.onAppearPrepare,h=r.onEnterPrepare,m=r.onLeavePrepare,v=r.onAppearStart,g=r.onEnterStart,y=r.onLeaveStart,b=r.onAppearActive,C=r.onEnterActive,x=r.onLeaveActive,S=r.onAppearEnd,w=r.onEnterEnd,E=r.onLeaveEnd,N=r.onVisibleChanged,$=qa(),M=de($,2),R=M[0],k=M[1],D=q2(Xo),A=de(D,2),L=A[0],T=A[1],I=qa(null),_=de(I,2),W=_[0],H=_[1],B=L(),K=O.useRef(!1),Y=O.useRef(null);function V(){return n()}var G=O.useRef(!1);function Q(){T(Xo),H(null,!0)}var ce=tn(function(F){var be=L();if(be!==Xo){var ue=V();if(!(F&&!F.deadline&&F.target!==ue)){var me=G.current,Re;be===ac&&me?Re=S==null?void 0:S(ue,F):be===sc&&me?Re=w==null?void 0:w(ue,F):be===lc&&me&&(Re=E==null?void 0:E(ue,F)),me&&Re!==!1&&Q()}}}),Z=Y2(ce),he=de(Z,1),ye=he[0],fe=function(be){switch(be){case ac:return U(U(U({},Xr,f),Oa,v),$a,b);case sc:return U(U(U({},Xr,h),Oa,g),$a,C);case lc:return U(U(U({},Xr,m),Oa,y),$a,x);default:return{}}},ae=p.useMemo(function(){return fe(B)},[B]),ve=tD(B,!e,function(F){if(F===Xr){var be=ae[Xr];return be?be(V()):aw}if(pe in ae){var ue;H(((ue=ae[pe])===null||ue===void 0?void 0:ue.call(ae,V(),null))||null)}return pe===$a&&B!==Xo&&(ye(V()),u>0&&(clearTimeout(Y.current),Y.current=setTimeout(function(){ce({deadline:!0})},u))),pe===Z1&&Q(),eD}),ne=de(ve,2),se=ne[0],pe=ne[1],Ne=sw(pe);G.current=Ne;var Me=O.useRef(null);iw(function(){if(!(K.current&&Me.current===t)){k(t);var F=K.current;K.current=!0;var be;!F&&t&&s&&(be=ac),F&&t&&i&&(be=sc),(F&&!t&&c||!F&&d&&!t&&c)&&(be=lc);var ue=fe(be);be&&(e||ue[Xr])?(T(be),se()):T(Xo),Me.current=t}},[t]),O.useEffect(function(){(B===ac&&!s||B===sc&&!i||B===lc&&!c)&&T(Xo)},[s,i,c]),O.useEffect(function(){return function(){K.current=!1,clearTimeout(Y.current)}},[]);var $e=p.useRef(!1);O.useEffect(function(){R&&($e.current=!0),R!==void 0&&B===Xo&&(($e.current||R)&&(N==null||N(R)),$e.current=!0)},[R,B]);var Be=W;return ae[Xr]&&pe===Oa&&(Be=q({transition:"none"},Be)),[B,pe,Be,R??t]}function rD(e){var t=e;ht(e)==="object"&&(t=e.transitionSupport);function n(o,i){return!!(o.motionName&&t&&i!==!1)}var r=p.forwardRef(function(o,i){var a=o.visible,s=a===void 0?!0:a,l=o.removeOnLeave,c=l===void 0?!0:l,u=o.forceRender,d=o.children,f=o.motionName,h=o.leavedClassName,m=o.eventProps,v=p.useContext(Q1),g=v.motion,y=n(o,g),b=O.useRef(),C=O.useRef();function x(){try{return b.current instanceof HTMLElement?b.current:Nc(C.current)}catch{return null}}var S=nD(y,s,x,o),w=de(S,4),E=w[0],N=w[1],$=w[2],M=w[3],R=p.useRef(M);M&&(R.current=!0);var k=p.useCallback(function(_){b.current=_,Gm(i,_)},[i]),D,A=q(q({},m),{},{visible:s});if(!d)D=null;else if(E===Xo)M?D=d(q({},A),k):!c&&R.current&&h?D=d(q(q({},A),{},{className:h}),k):u||!c&&!h?D=d(q(q({},A),{},{style:{display:"none"}}),k):D=null;else{var L;N===Xr?L="prepare":sw(N)?L="active":N===Oa&&(L="start");var T=x0(f,"".concat(E,"-").concat(L));D=d(q(q({},A),{},{className:te(x0(f,E),U(U({},T,T&&L),f,typeof f=="string")),style:$}),k)}if(p.isValidElement(D)&&wi(D)){var I=ra(D);I||(D=p.cloneElement(D,{ref:k}))}return p.createElement(U2,{ref:C},D)});return r.displayName="CSSMotion",r}const So=rD(ow);var Cp="add",Sp="keep",xp="remove",_f="removed";function oD(e){var t;return e&&ht(e)==="object"&&"key"in e?t=e:t={key:e},q(q({},t),{},{key:String(t.key)})}function wp(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return e.map(oD)}function iD(){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=wp(e),a=wp(t);i.forEach(function(c){for(var u=!1,d=r;d<o;d+=1){var f=a[d];if(f.key===c.key){r<d&&(n=n.concat(a.slice(r,d).map(function(h){return q(q({},h),{},{status:Cp})})),r=d),n.push(q(q({},f),{},{status:Sp})),r+=1,u=!0;break}}u||n.push(q(q({},c),{},{status:xp}))}),r<o&&(n=n.concat(a.slice(r).map(function(c){return q(q({},c),{},{status:Cp})})));var s={};n.forEach(function(c){var u=c.key;s[u]=(s[u]||0)+1});var l=Object.keys(s).filter(function(c){return s[c]>1});return l.forEach(function(c){n=n.filter(function(u){var d=u.key,f=u.status;return d!==c||f!==xp}),n.forEach(function(u){u.key===c&&(u.status=Sp)})}),n}var aD=["component","children","onVisibleChanged","onAllRemoved"],sD=["status"],lD=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function cD(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:So,n=function(r){Bo(i,r);var o=zo(i);function i(){var a;Tn(this,i);for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];return a=o.call.apply(o,[this].concat(l)),U(Ft(a),"state",{keyEntities:[]}),U(Ft(a),"removeKey",function(u){a.setState(function(d){var f=d.keyEntities.map(function(h){return h.key!==u?h:q(q({},h),{},{status:_f})});return{keyEntities:f}},function(){var d=a.state.keyEntities,f=d.filter(function(h){var m=h.status;return m!==_f}).length;f===0&&a.props.onAllRemoved&&a.props.onAllRemoved()})}),a}return An(i,[{key:"render",value:function(){var s=this,l=this.state.keyEntities,c=this.props,u=c.component,d=c.children,f=c.onVisibleChanged;c.onAllRemoved;var h=Mt(c,aD),m=u||p.Fragment,v={};return lD.forEach(function(g){v[g]=h[g],delete h[g]}),delete h.keys,p.createElement(m,h,l.map(function(g,y){var b=g.status,C=Mt(g,sD),x=b===Cp||b===Sp;return p.createElement(t,He({},v,{key:C.key,visible:x,eventProps:C,onVisibleChanged:function(w){f==null||f(w,{key:C.key}),w||s.removeKey(C.key)}}),function(S,w){return d(q(q({},S),{},{index:y}),w)})}))}}],[{key:"getDerivedStateFromProps",value:function(s,l){var c=s.keys,u=l.keyEntities,d=wp(c),f=iD(u,d);return{keyEntities:f.filter(function(h){var m=u.find(function(v){var g=v.key;return h.key===g});return!(m&&m.status===_f&&h.status===xp)})}}}]),i}(p.Component);return U(n,"defaultProps",{component:"div"}),n}cD(ow);function uD(e){const{children:t}=e,[,n]=br(),{motion:r}=n,o=p.useRef(!1);return o.current=o.current||r===!1,o.current?p.createElement(W2,{motion:r},t):t}const lw=p.memo(e=>{let{dropdownMatchSelectWidth:t}=e;return fn("ConfigProvider").deprecated(t===void 0,"dropdownMatchSelectWidth","popupMatchSelectWidth"),null});process.env.NODE_ENV!=="production"&&(lw.displayName="PropWarning");const dD=process.env.NODE_ENV!=="production"?lw:()=>null;var fD=function(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};let Ep=!1;const hD=process.env.NODE_ENV!=="production"?e=>{process.env.NODE_ENV!=="production"&&Ho(!Ep,e,"Static function can not consume context like dynamic theme. Please use 'App' component instead.")}:null,pD=["getTargetContainer","getPopupContainer","renderEmpty","input","pagination","form","select","button"];let du,cw,uw,dw;function _c(){return du||ll}function mD(){return cw||bd}function gD(e){return Object.keys(e).some(t=>t.endsWith("Color"))}const vD=e=>{const{prefixCls:t,iconPrefixCls:n,theme:r,holderRender:o}=e;t!==void 0&&(du=t),n!==void 0&&(cw=n),"holderRender"in e&&(dw=o),r&&(gD(r)?(process.env.NODE_ENV!=="production"&&Ho(!1,"ConfigProvider","`config` of css variable theme is not work in v5. Please use new `theme` config instead."),m2(_c(),r)):uw=r)},bD=()=>({getPrefixCls:(e,t)=>t||(e?`${_c()}-${e}`:_c()),getIconPrefixCls:mD,getRootPrefixCls:()=>du||_c(),getTheme:()=>uw,holderRender:dw}),yD=e=>{const{children:t,csp:n,autoInsertSpaceInButton:r,alert:o,anchor:i,form:a,locale:s,componentSize:l,direction:c,space:u,splitter:d,virtual:f,dropdownMatchSelectWidth:h,popupMatchSelectWidth:m,popupOverflow:v,legacyLocale:g,parentContext:y,iconPrefixCls:b,theme:C,componentDisabled:x,segmented:S,statistic:w,spin:E,calendar:N,carousel:$,cascader:M,collapse:R,typography:k,checkbox:D,descriptions:A,divider:L,drawer:T,skeleton:I,steps:_,image:W,layout:H,list:B,mentions:K,modal:Y,progress:V,result:G,slider:Q,breadcrumb:ce,menu:Z,pagination:he,input:ye,textArea:fe,empty:ae,badge:ve,radio:ne,rate:se,switch:pe,transfer:Ne,avatar:Me,message:$e,tag:Be,table:F,card:be,tabs:ue,timeline:me,timePicker:Re,upload:Te,notification:xe,tree:Ve,colorPicker:qe,datePicker:Pe,rangePicker:Ke,flex:Je,wave:De,dropdown:ze,warning:_e,tour:We,tooltip:rt,popover:gt,popconfirm:Lt,floatButtonGroup:Tt,variant:Zt,inputNumber:tt,treeSelect:Ue}=e,ft=p.useCallback((ct,vt)=>{const{prefixCls:jt}=e;if(vt)return vt;const It=jt||y.getPrefixCls("");return ct?`${It}-${ct}`:It},[y.getPrefixCls,e.prefixCls]),dt=b||y.iconPrefixCls||bd,st=n||y.csp;j2(dt,st);const Ze=H2(C,y.theme,{prefixCls:ft("")});process.env.NODE_ENV!=="production"&&(Ep=Ep||!!Ze);const Xe={csp:st,autoInsertSpaceInButton:r,alert:o,anchor:i,locale:s||g,direction:c,space:u,splitter:d,virtual:f,popupMatchSelectWidth:m??h,popupOverflow:v,getPrefixCls:ft,iconPrefixCls:dt,theme:Ze,segmented:S,statistic:w,spin:E,calendar:N,carousel:$,cascader:M,collapse:R,typography:k,checkbox:D,descriptions:A,divider:L,drawer:T,skeleton:I,steps:_,image:W,input:ye,textArea:fe,layout:H,list:B,mentions:K,modal:Y,progress:V,result:G,slider:Q,breadcrumb:ce,menu:Z,pagination:he,empty:ae,badge:ve,radio:ne,rate:se,switch:pe,transfer:Ne,avatar:Me,message:$e,tag:Be,table:F,card:be,tabs:ue,timeline:me,timePicker:Re,upload:Te,notification:xe,tree:Ve,colorPicker:qe,datePicker:Pe,rangePicker:Ke,flex:Je,wave:De,dropdown:ze,warning:_e,tour:We,tooltip:rt,popover:gt,popconfirm:Lt,floatButtonGroup:Tt,variant:Zt,inputNumber:tt,treeSelect:Ue};process.env.NODE_ENV!=="production"&&fn("ConfigProvider")(!("autoInsertSpaceInButton"in e),"deprecated","`autoInsertSpaceInButton` is deprecated. Please use `{ button: { autoInsertSpace: boolean }}` instead.");const Qe=Object.assign({},y);Object.keys(Xe).forEach(ct=>{Xe[ct]!==void 0&&(Qe[ct]=Xe[ct])}),pD.forEach(ct=>{const vt=e[ct];vt&&(Qe[ct]=vt)}),typeof r<"u"&&(Qe.button=Object.assign({autoInsertSpace:r},Qe.button));const wt=Sl(()=>Qe,Qe,(ct,vt)=>{const jt=Object.keys(ct),It=Object.keys(vt);return jt.length!==It.length||jt.some(zt=>ct[zt]!==vt[zt])}),{layer:At}=p.useContext(xl),it=p.useMemo(()=>({prefixCls:dt,csp:st,layer:At?"antd":void 0}),[dt,st,At]);let Ge=p.createElement(p.Fragment,null,p.createElement(dD,{dropdownMatchSelectWidth:h}),t);const et=p.useMemo(()=>{var ct,vt,jt,It;return Ea(((ct=Qi.Form)===null||ct===void 0?void 0:ct.defaultValidateMessages)||{},((jt=(vt=wt.locale)===null||vt===void 0?void 0:vt.Form)===null||jt===void 0?void 0:jt.defaultValidateMessages)||{},((It=wt.form)===null||It===void 0?void 0:It.validateMessages)||{},(a==null?void 0:a.validateMessages)||{})},[wt,a==null?void 0:a.validateMessages]);Object.keys(et).length>0&&(Ge=p.createElement(qk.Provider,{value:et},Ge)),s&&(Ge=p.createElement(L1,{locale:s,_ANT_MARK__:_1},Ge)),Ge=p.createElement(rg.Provider,{value:it},Ge),l&&(Ge=p.createElement(g2,{size:l},Ge)),Ge=p.createElement(uD,null,Ge);const lt=p.useMemo(()=>{const ct=Ze||{},{algorithm:vt,token:jt,components:It,cssVar:zt}=ct,Pt=fD(ct,["algorithm","token","components","cssVar"]),Vt=vt&&(!Array.isArray(vt)||vt.length>0)?ep(vt):F1,qt={};Object.entries(It||{}).forEach(Pn=>{let[Ye,J]=Pn;const le=Object.assign({},J);"algorithm"in le&&(le.algorithm===!0?le.theme=Vt:(Array.isArray(le.algorithm)||typeof le.algorithm=="function")&&(le.theme=ep(le.algorithm)),delete le.algorithm),qt[Ye]=le});const Jt=Object.assign(Object.assign({},al),jt);return Object.assign(Object.assign({},Pt),{theme:Vt,token:Jt,components:qt,override:Object.assign({override:Jt},qt),cssVar:zt})},[Ze]);return C&&(Ge=p.createElement(H1.Provider,{value:lt},Ge)),wt.warning&&(Ge=p.createElement(P1.Provider,{value:wt.warning},Ge)),x!==void 0&&(Ge=p.createElement(V1,{disabled:x},Ge)),p.createElement(_t.Provider,{value:wt},Ge)},xo=e=>{const t=p.useContext(_t),n=p.useContext(og);return p.createElement(yD,Object.assign({parentContext:t,legacyLocale:n},e))};xo.ConfigContext=_t;xo.SizeContext=Ua;xo.config=vD;xo.useConfig=v2;Object.defineProperty(xo,"SizeContext",{get:()=>(process.env.NODE_ENV!=="production"&&Ho(!1,"ConfigProvider","ConfigProvider.SizeContext is deprecated. Please use `ConfigProvider.useConfig().componentSize` instead."),Ua)});process.env.NODE_ENV!=="production"&&(xo.displayName="ConfigProvider");var CD={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"};function fw(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}function SD(e){return fw(e)instanceof ShadowRoot}function fu(e){return SD(e)?fw(e):null}function xD(e){return e.replace(/-(.)/g,function(t,n){return n.toUpperCase()})}function wD(e,t){Ot(e,"[@ant-design/icons] ".concat(t))}function w0(e){return ht(e)==="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(ht(e.icon)==="object"||typeof e.icon=="function")}function E0(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(e).reduce(function(t,n){var r=e[n];switch(n){case"class":t.className=r,delete t.class;break;default:delete t[n],t[xD(n)]=r}return t},{})}function Op(e,t,n){return n?O.createElement(e.tag,q(q({key:t},E0(e.attrs)),n),(e.children||[]).map(function(r,o){return Op(r,"".concat(t,"-").concat(e.tag,"-").concat(o))})):O.createElement(e.tag,q({key:t},E0(e.attrs)),(e.children||[]).map(function(r,o){return Op(r,"".concat(t,"-").concat(e.tag,"-").concat(o))}))}function hw(e){return sl(e)[0]}function pw(e){return e?Array.isArray(e)?e:[e]:[]}var ED=`
221
+ .anticon {
222
+ display: inline-flex;
223
+ align-items: center;
224
+ color: inherit;
225
+ font-style: normal;
226
+ line-height: 0;
227
+ text-align: center;
228
+ text-transform: none;
229
+ vertical-align: -0.125em;
230
+ text-rendering: optimizeLegibility;
231
+ -webkit-font-smoothing: antialiased;
232
+ -moz-osx-font-smoothing: grayscale;
233
+ }
234
+
235
+ .anticon > * {
236
+ line-height: 1;
237
+ }
238
+
239
+ .anticon svg {
240
+ display: inline-block;
241
+ }
242
+
243
+ .anticon::before {
244
+ display: none;
245
+ }
246
+
247
+ .anticon .anticon-icon {
248
+ display: block;
249
+ }
250
+
251
+ .anticon[tabindex] {
252
+ cursor: pointer;
253
+ }
254
+
255
+ .anticon-spin::before,
256
+ .anticon-spin {
257
+ display: inline-block;
258
+ -webkit-animation: loadingCircle 1s infinite linear;
259
+ animation: loadingCircle 1s infinite linear;
260
+ }
261
+
262
+ @-webkit-keyframes loadingCircle {
263
+ 100% {
264
+ -webkit-transform: rotate(360deg);
265
+ transform: rotate(360deg);
266
+ }
267
+ }
268
+
269
+ @keyframes loadingCircle {
270
+ 100% {
271
+ -webkit-transform: rotate(360deg);
272
+ transform: rotate(360deg);
273
+ }
274
+ }
275
+ `,OD=function(t){var n=O.useContext(rg),r=n.csp,o=n.prefixCls,i=n.layer,a=ED;o&&(a=a.replace(/anticon/g,o)),i&&(a="@layer ".concat(i,` {
276
+ `).concat(a,`
277
+ }`)),O.useEffect(function(){var s=t.current,l=fu(s);_o(a,"@ant-design-icons",{prepend:!i,csp:r,attachTo:l})},[])},$D=["icon","className","onClick","style","primaryColor","secondaryColor"],Ls={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function ND(e){var t=e.primaryColor,n=e.secondaryColor;Ls.primaryColor=t,Ls.secondaryColor=n||hw(t),Ls.calculated=!!n}function MD(){return q({},Ls)}var Za=function(t){var n=t.icon,r=t.className,o=t.onClick,i=t.style,a=t.primaryColor,s=t.secondaryColor,l=Mt(t,$D),c=p.useRef(),u=Ls;if(a&&(u={primaryColor:a,secondaryColor:s||hw(a)}),OD(c),wD(w0(n),"icon should be icon definiton, but got ".concat(n)),!w0(n))return null;var d=n;return d&&typeof d.icon=="function"&&(d=q(q({},d),{},{icon:d.icon(u.primaryColor,u.secondaryColor)})),Op(d.icon,"svg-".concat(d.name),q(q({className:r,onClick:o,style:i,"data-icon":d.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l),{},{ref:c}))};Za.displayName="IconReact";Za.getTwoToneColors=MD;Za.setTwoToneColors=ND;function mw(e){var t=pw(e),n=de(t,2),r=n[0],o=n[1];return Za.setTwoToneColors({primaryColor:r,secondaryColor:o})}function RD(){var e=Za.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}var ID=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];mw(cu.primary);var Wn=p.forwardRef(function(e,t){var n=e.className,r=e.icon,o=e.spin,i=e.rotate,a=e.tabIndex,s=e.onClick,l=e.twoToneColor,c=Mt(e,ID),u=p.useContext(rg),d=u.prefixCls,f=d===void 0?"anticon":d,h=u.rootClassName,m=te(h,f,U(U({},"".concat(f,"-").concat(r.name),!!r.name),"".concat(f,"-spin"),!!o||r.name==="loading"),n),v=a;v===void 0&&s&&(v=-1);var g=i?{msTransform:"rotate(".concat(i,"deg)"),transform:"rotate(".concat(i,"deg)")}:void 0,y=pw(l),b=de(y,2),C=b[0],x=b[1];return p.createElement("span",He({role:"img","aria-label":r.name},c,{ref:t,tabIndex:v,onClick:s,className:m}),p.createElement(Za,{icon:r,primaryColor:C,secondaryColor:x,style:g}))});Wn.displayName="AntdIcon";Wn.getTwoToneColor=RD;Wn.setTwoToneColor=mw;var TD=function(t,n){return p.createElement(Wn,He({},t,{ref:n,icon:CD}))},gw=p.forwardRef(TD);process.env.NODE_ENV!=="production"&&(gw.displayName="CheckCircleFilled");var AD={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"}}]},name:"close-circle",theme:"filled"},PD=function(t,n){return p.createElement(Wn,He({},t,{ref:n,icon:AD}))},yd=p.forwardRef(PD);process.env.NODE_ENV!=="production"&&(yd.displayName="CloseCircleFilled");var kD={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"},DD=function(t,n){return p.createElement(Wn,He({},t,{ref:n,icon:kD}))},El=p.forwardRef(DD);process.env.NODE_ENV!=="production"&&(El.displayName="CloseOutlined");var _D={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"exclamation-circle",theme:"filled"},LD=function(t,n){return p.createElement(Wn,He({},t,{ref:n,icon:_D}))},vw=p.forwardRef(LD);process.env.NODE_ENV!=="production"&&(vw.displayName="ExclamationCircleFilled");var jD={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"},BD=function(t,n){return p.createElement(Wn,He({},t,{ref:n,icon:jD}))},bw=p.forwardRef(BD);process.env.NODE_ENV!=="production"&&(bw.displayName="InfoCircleFilled");var zD=`accept acceptCharset accessKey action allowFullScreen allowTransparency
278
+ alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
279
+ charSet checked classID className colSpan cols content contentEditable contextMenu
280
+ controls coords crossOrigin data dateTime default defer dir disabled download draggable
281
+ encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
282
+ headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
283
+ is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
284
+ mediaGroup method min minLength multiple muted name noValidate nonce open
285
+ optimum pattern placeholder poster preload radioGroup readOnly rel required
286
+ reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
287
+ shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
288
+ summary tabIndex target title type useMap value width wmode wrap`,FD=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
289
+ onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
290
+ onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
291
+ onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
292
+ onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
293
+ onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
294
+ onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,HD="".concat(zD," ").concat(FD).split(/[\s\n]+/),VD="aria-",WD="data-";function O0(e,t){return e.indexOf(t)===0}function eo(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n;t===!1?n={aria:!0,data:!0,attr:!0}:t===!0?n={aria:!0}:n=q({},t);var r={};return Object.keys(e).forEach(function(o){(n.aria&&(o==="role"||O0(o,VD))||n.data&&O0(o,WD)||n.attr&&HD.includes(o))&&(r[o]=e[o])}),r}function yw(e){return e&&O.isValidElement(e)&&e.type===O.Fragment}const UD=(e,t,n)=>O.isValidElement(e)?O.cloneElement(e,typeof n=="function"?n(e.props||{}):n):t;function Hr(e,t){return UD(e,e,t)}const oo=e=>{const[,,,,t]=br();return t?`${e}-css-var`:""};var at={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,CAPS_LOCK:20,ESC:27,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46,N:78,P:80,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,EQUALS:187,WIN_KEY:224},qD={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"},KD=function(t,n){return p.createElement(Wn,He({},t,{ref:n,icon:qD}))},ag=p.forwardRef(KD);process.env.NODE_ENV!=="production"&&(ag.displayName="LoadingOutlined");const Ol=O.createContext(void 0);process.env.NODE_ENV!=="production"&&(Ol.displayName="zIndexContext");const To=100,GD=10,Cw=To*GD,XD=Cw+To,Sw={Modal:To,Drawer:To,Popover:To,Popconfirm:To,Tooltip:To,Tour:To,FloatButton:To},YD={SelectLike:50,Dropdown:50,DatePicker:50,Menu:50,ImagePreview:1};function JD(e){return e in Sw}const $l=(e,t)=>{const[,n]=br(),r=O.useContext(Ol),o=JD(e);let i;if(t!==void 0)i=[t,t];else{let a=r??0;o?a+=(r?0:n.zIndexPopupBase)+Sw[e]:a+=YD[e],i=[r===void 0?t:a,a]}if(process.env.NODE_ENV!=="production"){const a=fn(e),s=n.zIndexPopupBase+XD,l=i[0]||0;process.env.NODE_ENV!=="production"&&a(t!==void 0||l<=s,"usage","`zIndex` is over design token `zIndexPopupBase` too much. It may cause unexpected override.")}return i};function QD(){const[e,t]=p.useState([]),n=p.useCallback(r=>(t(o=>[].concat(Le(o),[r])),()=>{t(o=>o.filter(i=>i!==r))}),[]);return[e,n]}function pr(){pr=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(T,I,_){T[I]=_.value},i=typeof Symbol=="function"?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function c(T,I,_){return Object.defineProperty(T,I,{value:_,enumerable:!0,configurable:!0,writable:!0}),T[I]}try{c({},"")}catch{c=function(_,W,H){return _[W]=H}}function u(T,I,_,W){var H=I&&I.prototype instanceof y?I:y,B=Object.create(H.prototype),K=new A(W||[]);return o(B,"_invoke",{value:M(T,_,K)}),B}function d(T,I,_){try{return{type:"normal",arg:T.call(I,_)}}catch(W){return{type:"throw",arg:W}}}t.wrap=u;var f="suspendedStart",h="suspendedYield",m="executing",v="completed",g={};function y(){}function b(){}function C(){}var x={};c(x,a,function(){return this});var S=Object.getPrototypeOf,w=S&&S(S(L([])));w&&w!==n&&r.call(w,a)&&(x=w);var E=C.prototype=y.prototype=Object.create(x);function N(T){["next","throw","return"].forEach(function(I){c(T,I,function(_){return this._invoke(I,_)})})}function $(T,I){function _(H,B,K,Y){var V=d(T[H],T,B);if(V.type!=="throw"){var G=V.arg,Q=G.value;return Q&&ht(Q)=="object"&&r.call(Q,"__await")?I.resolve(Q.__await).then(function(ce){_("next",ce,K,Y)},function(ce){_("throw",ce,K,Y)}):I.resolve(Q).then(function(ce){G.value=ce,K(G)},function(ce){return _("throw",ce,K,Y)})}Y(V.arg)}var W;o(this,"_invoke",{value:function(B,K){function Y(){return new I(function(V,G){_(B,K,V,G)})}return W=W?W.then(Y,Y):Y()}})}function M(T,I,_){var W=f;return function(H,B){if(W===m)throw Error("Generator is already running");if(W===v){if(H==="throw")throw B;return{value:e,done:!0}}for(_.method=H,_.arg=B;;){var K=_.delegate;if(K){var Y=R(K,_);if(Y){if(Y===g)continue;return Y}}if(_.method==="next")_.sent=_._sent=_.arg;else if(_.method==="throw"){if(W===f)throw W=v,_.arg;_.dispatchException(_.arg)}else _.method==="return"&&_.abrupt("return",_.arg);W=m;var V=d(T,I,_);if(V.type==="normal"){if(W=_.done?v:h,V.arg===g)continue;return{value:V.arg,done:_.done}}V.type==="throw"&&(W=v,_.method="throw",_.arg=V.arg)}}}function R(T,I){var _=I.method,W=T.iterator[_];if(W===e)return I.delegate=null,_==="throw"&&T.iterator.return&&(I.method="return",I.arg=e,R(T,I),I.method==="throw")||_!=="return"&&(I.method="throw",I.arg=new TypeError("The iterator does not provide a '"+_+"' method")),g;var H=d(W,T.iterator,I.arg);if(H.type==="throw")return I.method="throw",I.arg=H.arg,I.delegate=null,g;var B=H.arg;return B?B.done?(I[T.resultName]=B.value,I.next=T.nextLoc,I.method!=="return"&&(I.method="next",I.arg=e),I.delegate=null,g):B:(I.method="throw",I.arg=new TypeError("iterator result is not an object"),I.delegate=null,g)}function k(T){var I={tryLoc:T[0]};1 in T&&(I.catchLoc=T[1]),2 in T&&(I.finallyLoc=T[2],I.afterLoc=T[3]),this.tryEntries.push(I)}function D(T){var I=T.completion||{};I.type="normal",delete I.arg,T.completion=I}function A(T){this.tryEntries=[{tryLoc:"root"}],T.forEach(k,this),this.reset(!0)}function L(T){if(T||T===""){var I=T[a];if(I)return I.call(T);if(typeof T.next=="function")return T;if(!isNaN(T.length)){var _=-1,W=function H(){for(;++_<T.length;)if(r.call(T,_))return H.value=T[_],H.done=!1,H;return H.value=e,H.done=!0,H};return W.next=W}}throw new TypeError(ht(T)+" is not iterable")}return b.prototype=C,o(E,"constructor",{value:C,configurable:!0}),o(C,"constructor",{value:b,configurable:!0}),b.displayName=c(C,l,"GeneratorFunction"),t.isGeneratorFunction=function(T){var I=typeof T=="function"&&T.constructor;return!!I&&(I===b||(I.displayName||I.name)==="GeneratorFunction")},t.mark=function(T){return Object.setPrototypeOf?Object.setPrototypeOf(T,C):(T.__proto__=C,c(T,l,"GeneratorFunction")),T.prototype=Object.create(E),T},t.awrap=function(T){return{__await:T}},N($.prototype),c($.prototype,s,function(){return this}),t.AsyncIterator=$,t.async=function(T,I,_,W,H){H===void 0&&(H=Promise);var B=new $(u(T,I,_,W),H);return t.isGeneratorFunction(I)?B:B.next().then(function(K){return K.done?K.value:B.next()})},N(E),c(E,l,"Generator"),c(E,a,function(){return this}),c(E,"toString",function(){return"[object Generator]"}),t.keys=function(T){var I=Object(T),_=[];for(var W in I)_.push(W);return _.reverse(),function H(){for(;_.length;){var B=_.pop();if(B in I)return H.value=B,H.done=!1,H}return H.done=!0,H}},t.values=L,A.prototype={constructor:A,reset:function(I){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(D),!I)for(var _ in this)_.charAt(0)==="t"&&r.call(this,_)&&!isNaN(+_.slice(1))&&(this[_]=e)},stop:function(){this.done=!0;var I=this.tryEntries[0].completion;if(I.type==="throw")throw I.arg;return this.rval},dispatchException:function(I){if(this.done)throw I;var _=this;function W(G,Q){return K.type="throw",K.arg=I,_.next=G,Q&&(_.method="next",_.arg=e),!!Q}for(var H=this.tryEntries.length-1;H>=0;--H){var B=this.tryEntries[H],K=B.completion;if(B.tryLoc==="root")return W("end");if(B.tryLoc<=this.prev){var Y=r.call(B,"catchLoc"),V=r.call(B,"finallyLoc");if(Y&&V){if(this.prev<B.catchLoc)return W(B.catchLoc,!0);if(this.prev<B.finallyLoc)return W(B.finallyLoc)}else if(Y){if(this.prev<B.catchLoc)return W(B.catchLoc,!0)}else{if(!V)throw Error("try statement without catch or finally");if(this.prev<B.finallyLoc)return W(B.finallyLoc)}}}},abrupt:function(I,_){for(var W=this.tryEntries.length-1;W>=0;--W){var H=this.tryEntries[W];if(H.tryLoc<=this.prev&&r.call(H,"finallyLoc")&&this.prev<H.finallyLoc){var B=H;break}}B&&(I==="break"||I==="continue")&&B.tryLoc<=_&&_<=B.finallyLoc&&(B=null);var K=B?B.completion:{};return K.type=I,K.arg=_,B?(this.method="next",this.next=B.finallyLoc,g):this.complete(K)},complete:function(I,_){if(I.type==="throw")throw I.arg;return I.type==="break"||I.type==="continue"?this.next=I.arg:I.type==="return"?(this.rval=this.arg=I.arg,this.method="return",this.next="end"):I.type==="normal"&&_&&(this.next=_),g},finish:function(I){for(var _=this.tryEntries.length-1;_>=0;--_){var W=this.tryEntries[_];if(W.finallyLoc===I)return this.complete(W.completion,W.afterLoc),D(W),g}},catch:function(I){for(var _=this.tryEntries.length-1;_>=0;--_){var W=this.tryEntries[_];if(W.tryLoc===I){var H=W.completion;if(H.type==="throw"){var B=H.arg;D(W)}return B}}throw Error("illegal catch attempt")},delegateYield:function(I,_,W){return this.delegate={iterator:L(I),resultName:_,nextLoc:W},this.method==="next"&&(this.arg=e),g}},t}function $0(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(c){return void n(c)}s.done?t(l):Promise.resolve(l).then(r,o)}function ia(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(l){$0(i,r,o,a,s,"next",l)}function s(l){$0(i,r,o,a,s,"throw",l)}a(void 0)})}}var Nl=q({},eS),ZD=Nl.version,Lf=Nl.render,e_=Nl.unmountComponentAtNode,Cd;try{var t_=Number((ZD||"").split(".")[0]);t_>=18&&(Cd=Nl.createRoot)}catch{}function N0(e){var t=Nl.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;t&&ht(t)==="object"&&(t.usingClientEntryPoint=e)}var hu="__rc_react_root__";function n_(e,t){N0(!0);var n=t[hu]||Cd(t);N0(!1),n.render(e),t[hu]=n}function r_(e,t){Lf==null||Lf(e,t)}function o_(e,t){if(Cd){n_(e,t);return}r_(e,t)}function i_(e){return $p.apply(this,arguments)}function $p(){return $p=ia(pr().mark(function e(t){return pr().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",Promise.resolve().then(function(){var o;(o=t[hu])===null||o===void 0||o.unmount(),delete t[hu]}));case 1:case"end":return r.stop()}},e)})),$p.apply(this,arguments)}function a_(e){e_(e)}function s_(e){return Np.apply(this,arguments)}function Np(){return Np=ia(pr().mark(function e(t){return pr().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(Cd===void 0){r.next=2;break}return r.abrupt("return",i_(t));case 2:a_(t);case 3:case"end":return r.stop()}},e)})),Np.apply(this,arguments)}const l_=(e,t)=>{if(process.env.NODE_ENV!=="production"){const n=parseInt(p.version.split(".")[0],10),r=Object.keys(eS);process.env.NODE_ENV!=="production"&&Ho(n<19||r.includes("createRoot"),"compatible","antd v5 support React is 16 ~ 18. see https://u.ant.design/v5-for-19 for compatible.")}return o_(e,t),()=>s_(t)};let c_=l_;function xw(){return c_}const jf=()=>({height:0,opacity:0}),M0=e=>{const{scrollHeight:t}=e;return{height:t,opacity:1}},u_=e=>({height:e?e.offsetHeight:0}),Bf=(e,t)=>(t==null?void 0:t.deadline)===!0||t.propertyName==="height",ww=function(){return{motionName:`${arguments.length>0&&arguments[0]!==void 0?arguments[0]:ll}-motion-collapse`,onAppearStart:jf,onEnterStart:jf,onAppearActive:M0,onEnterActive:M0,onLeaveStart:u_,onLeaveActive:jf,onAppearEnd:Bf,onEnterEnd:Bf,onLeaveEnd:Bf,motionDeadline:500}},Zi=(e,t,n)=>n!==void 0?n:`${e}-${t}`;function Hn(e,t){var n=Object.assign({},e);return Array.isArray(t)&&t.forEach(function(r){delete n[r]}),n}const sg=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},d_=e=>{const{componentCls:t,colorPrimary:n}=e;return{[t]:{position:"absolute",background:"transparent",pointerEvents:"none",boxSizing:"border-box",color:`var(--wave-color, ${n})`,boxShadow:"0 0 0 0 currentcolor",opacity:.2,"&.wave-motion-appear":{transition:[`box-shadow 0.4s ${e.motionEaseOutCirc}`,`opacity 2s ${e.motionEaseOutCirc}`].join(","),"&-active":{boxShadow:"0 0 0 6px currentcolor",opacity:0},"&.wave-quick":{transition:[`box-shadow ${e.motionDurationSlow} ${e.motionEaseInOut}`,`opacity ${e.motionDurationSlow} ${e.motionEaseInOut}`].join(",")}}}}},f_=_2("Wave",e=>[d_(e)]),lg=`${ll}-wave-target`;function zf(e){return e&&e!=="#fff"&&e!=="#ffffff"&&e!=="rgb(255, 255, 255)"&&e!=="rgba(255, 255, 255, 1)"&&!/rgba\((?:\d*, ){3}0\)/.test(e)&&e!=="transparent"}function h_(e){const{borderTopColor:t,borderColor:n,backgroundColor:r}=getComputedStyle(e);return zf(t)?t:zf(n)?n:zf(r)?r:null}function Ff(e){return Number.isNaN(e)?0:e}const p_=e=>{const{className:t,target:n,component:r,registerUnmount:o}=e,i=p.useRef(null),a=p.useRef(null);p.useEffect(()=>{a.current=o()},[]);const[s,l]=p.useState(null),[c,u]=p.useState([]),[d,f]=p.useState(0),[h,m]=p.useState(0),[v,g]=p.useState(0),[y,b]=p.useState(0),[C,x]=p.useState(!1),S={left:d,top:h,width:v,height:y,borderRadius:c.map(N=>`${N}px`).join(" ")};s&&(S["--wave-color"]=s);function w(){const N=getComputedStyle(n);l(h_(n));const $=N.position==="static",{borderLeftWidth:M,borderTopWidth:R}=N;f($?n.offsetLeft:Ff(-parseFloat(M))),m($?n.offsetTop:Ff(-parseFloat(R))),g(n.offsetWidth),b(n.offsetHeight);const{borderTopLeftRadius:k,borderTopRightRadius:D,borderBottomLeftRadius:A,borderBottomRightRadius:L}=N;u([k,D,L,A].map(T=>Ff(parseFloat(T))))}if(p.useEffect(()=>{if(n){const N=Ht(()=>{w(),x(!0)});let $;return typeof ResizeObserver<"u"&&($=new ResizeObserver(w),$.observe(n)),()=>{Ht.cancel(N),$==null||$.disconnect()}}},[]),!C)return null;const E=(r==="Checkbox"||r==="Radio")&&(n==null?void 0:n.classList.contains(lg));return p.createElement(So,{visible:!0,motionAppear:!0,motionName:"wave-motion",motionDeadline:5e3,onAppearEnd:(N,$)=>{var M,R;if($.deadline||$.propertyName==="opacity"){const k=(M=i.current)===null||M===void 0?void 0:M.parentElement;(R=a.current)===null||R===void 0||R.call(a).then(()=>{k==null||k.remove()})}return!1}},(N,$)=>{let{className:M}=N;return p.createElement("div",{ref:mr(i,$),className:te(t,M,{"wave-quick":E}),style:S})})},m_=(e,t)=>{var n;const{component:r}=t;if(r==="Checkbox"&&!(!((n=e.querySelector("input"))===null||n===void 0)&&n.checked))return;const o=document.createElement("div");o.style.position="absolute",o.style.left="0px",o.style.top="0px",e==null||e.insertBefore(o,e==null?void 0:e.firstChild);const i=xw();let a=null;function s(){return a}a=i(p.createElement(p_,Object.assign({},t,{target:e,registerUnmount:s})),o)},g_=(e,t,n)=>{const{wave:r}=p.useContext(_t),[,o,i]=br(),a=tn(c=>{const u=e.current;if(r!=null&&r.disabled||!u)return;const d=u.querySelector(`.${lg}`)||u,{showEffect:f}=r||{};(f||m_)(d,{className:t,token:o,component:n,event:c,hashId:i})}),s=p.useRef(null);return c=>{Ht.cancel(s.current),s.current=Ht(()=>{a(c)})}},cg=e=>{const{children:t,disabled:n,component:r}=e,{getPrefixCls:o}=O.useContext(_t),i=O.useRef(null),a=o("wave"),[,s]=f_(a),l=g_(i,te(a,s),r);if(O.useEffect(()=>{const u=i.current;if(!u||u.nodeType!==1||n)return;const d=f=>{!sg(f.target)||!u.getAttribute||u.getAttribute("disabled")||u.disabled||u.className.includes("disabled")||u.className.includes("-leave")||l(f)};return u.addEventListener("click",d,!0),()=>{u.removeEventListener("click",d,!0)}},[n]),!O.isValidElement(t))return t??null;const c=wi(t)?mr(ra(t),i):i;return Hr(t,{ref:c})};process.env.NODE_ENV!=="production"&&(cg.displayName="Wave");const Vr=e=>{const t=O.useContext(Ua);return O.useMemo(()=>e?typeof e=="string"?e??t:typeof e=="function"?e(t):t:t,[e,t])},v_=e=>{const{componentCls:t}=e;return{[t]:{"&-block":{display:"flex",width:"100%"},"&-vertical":{flexDirection:"column"}}}},b_=e=>{const{componentCls:t,antCls:n}=e;return{[t]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},[`${t}-item:empty`]:{display:"none"},[`${t}-item > ${n}-badge-not-a-wrapper:only-child`]:{display:"block"}}}},y_=e=>{const{componentCls:t}=e;return{[t]:{"&-gap-row-small":{rowGap:e.spaceGapSmallSize},"&-gap-row-middle":{rowGap:e.spaceGapMiddleSize},"&-gap-row-large":{rowGap:e.spaceGapLargeSize},"&-gap-col-small":{columnGap:e.spaceGapSmallSize},"&-gap-col-middle":{columnGap:e.spaceGapMiddleSize},"&-gap-col-large":{columnGap:e.spaceGapLargeSize}}}},Ew=yn("Space",e=>{const t=Xt(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[b_(t),y_(t),v_(t)]},()=>({}),{resetStyle:!1});var Ow=function(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};const Sd=p.createContext(null),Ei=(e,t)=>{const n=p.useContext(Sd),r=p.useMemo(()=>{if(!n)return"";const{compactDirection:o,isFirstItem:i,isLastItem:a}=n,s=o==="vertical"?"-vertical-":"-";return te(`${e}-compact${s}item`,{[`${e}-compact${s}first-item`]:i,[`${e}-compact${s}last-item`]:a,[`${e}-compact${s}item-rtl`]:t==="rtl"})},[e,t,n]);return{compactSize:n==null?void 0:n.compactSize,compactDirection:n==null?void 0:n.compactDirection,compactItemClassnames:r}},C_=e=>{const{children:t}=e;return p.createElement(Sd.Provider,{value:null},t)},S_=e=>{const{children:t}=e,n=Ow(e,["children"]);return p.createElement(Sd.Provider,{value:p.useMemo(()=>n,[n])},t)},x_=e=>{const{getPrefixCls:t,direction:n}=p.useContext(_t),{size:r,direction:o,block:i,prefixCls:a,className:s,rootClassName:l,children:c}=e,u=Ow(e,["size","direction","block","prefixCls","className","rootClassName","children"]),d=Vr(C=>r??C),f=t("space-compact",a),[h,m]=Ew(f),v=te(f,m,{[`${f}-rtl`]:n==="rtl",[`${f}-block`]:i,[`${f}-vertical`]:o==="vertical"},s,l),g=p.useContext(Sd),y=Nr(c),b=p.useMemo(()=>y.map((C,x)=>{const S=(C==null?void 0:C.key)||`${f}-item-${x}`;return p.createElement(S_,{key:S,compactSize:d,compactDirection:o,isFirstItem:x===0&&(!g||(g==null?void 0:g.isFirstItem)),isLastItem:x===y.length-1&&(!g||(g==null?void 0:g.isLastItem))},C)}),[r,y,g]);return y.length===0?null:h(p.createElement("div",Object.assign({className:v},u),b))};var w_=function(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};const $w=p.createContext(void 0),E_=e=>{const{getPrefixCls:t,direction:n}=p.useContext(_t),{prefixCls:r,size:o,className:i}=e,a=w_(e,["prefixCls","size","className"]),s=t("btn-group",r),[,,l]=br(),c=p.useMemo(()=>{switch(o){case"large":return"lg";case"small":return"sm";default:return""}},[o]);if(process.env.NODE_ENV!=="production"){const d=fn("Button.Group");d.deprecated(!1,"Button.Group","Space.Compact"),process.env.NODE_ENV!=="production"&&d(!o||["large","small","middle"].includes(o),"usage","Invalid prop `size`.")}const u=te(s,{[`${s}-${c}`]:c,[`${s}-rtl`]:n==="rtl"},i,l);return p.createElement($w.Provider,{value:o},p.createElement("div",Object.assign({},a,{className:u})))},R0=/^[\u4E00-\u9FA5]{2}$/,Mp=R0.test.bind(R0);function Nw(e){return e==="danger"?{danger:!0}:{type:e}}function I0(e){return typeof e=="string"}function uc(e){return e==="text"||e==="link"}function O_(e,t){if(e==null)return;const n=t?" ":"";return typeof e!="string"&&typeof e!="number"&&I0(e.type)&&Mp(e.props.children)?Hr(e,{children:e.props.children.split("").join(n)}):I0(e)?Mp(e)?O.createElement("span",null,e.split("").join(n)):O.createElement("span",null,e):yw(e)?O.createElement("span",null,e):e}function $_(e,t){let n=!1;const r=[];return O.Children.forEach(e,o=>{const i=typeof o,a=i==="string"||i==="number";if(n&&a){const s=r.length-1,l=r[s];r[s]=`${l}${o}`}else r.push(o);n=a}),O.Children.map(r,o=>O_(o,t))}["default","primary","danger"].concat(Le(gi));const Rp=O.forwardRef((e,t)=>{const{className:n,style:r,children:o,prefixCls:i}=e,a=te(`${i}-icon`,n);return O.createElement("span",{ref:t,className:a,style:r},o)}),T0=O.forwardRef((e,t)=>{const{prefixCls:n,className:r,style:o,iconClassName:i}=e,a=te(`${n}-loading-icon`,r);return O.createElement(Rp,{prefixCls:n,className:a,style:o,ref:t},O.createElement(ag,{className:i}))}),Hf=()=>({width:0,opacity:0,transform:"scale(0)"}),Vf=e=>({width:e.scrollWidth,opacity:1,transform:"scale(1)"}),N_=e=>{const{prefixCls:t,loading:n,existIcon:r,className:o,style:i,mount:a}=e,s=!!n;return r?O.createElement(T0,{prefixCls:t,className:o,style:i}):O.createElement(So,{visible:s,motionName:`${t}-loading-icon-motion`,motionAppear:!a,motionEnter:!a,motionLeave:!a,removeOnLeave:!0,onAppearStart:Hf,onAppearActive:Vf,onEnterStart:Hf,onEnterActive:Vf,onLeaveStart:Vf,onLeaveActive:Hf},(l,c)=>{let{className:u,style:d}=l;const f=Object.assign(Object.assign({},i),d);return O.createElement(T0,{prefixCls:t,className:te(o,u),style:f,ref:c})})},A0=(e,t)=>({[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineEndColor:t}}},"&:not(:first-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineStartColor:t}}}}}),M_=e=>{const{componentCls:t,fontSize:n,lineWidth:r,groupBorderColor:o,colorErrorHover:i}=e;return{[`${t}-group`]:[{position:"relative",display:"inline-flex",[`> span, > ${t}`]:{"&:not(:last-child)":{[`&, & > ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:e.calc(r).mul(-1).equal(),[`&, & > ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[t]:{position:"relative",zIndex:1,"&:hover, &:focus, &:active":{zIndex:2},"&[disabled]":{zIndex:0}},[`${t}-icon-only`]:{fontSize:n}},A0(`${t}-primary`,o),A0(`${t}-danger`,i)]}};var R_=["b"],I_=["v"],Wf=function(t){return Math.round(Number(t||0))},T_=function(t){if(t instanceof Qt)return t;if(t&&ht(t)==="object"&&"h"in t&&"b"in t){var n=t,r=n.b,o=Mt(n,R_);return q(q({},o),{},{v:r})}return typeof t=="string"&&/hsb/.test(t)?t.replace(/hsb/,"hsv"):t},to=function(e){Bo(n,e);var t=zo(n);function n(r){return Tn(this,n),t.call(this,T_(r))}return An(n,[{key:"toHsbString",value:function(){var o=this.toHsb(),i=Wf(o.s*100),a=Wf(o.b*100),s=Wf(o.h),l=o.a,c="hsb(".concat(s,", ").concat(i,"%, ").concat(a,"%)"),u="hsba(".concat(s,", ").concat(i,"%, ").concat(a,"%, ").concat(l.toFixed(l===0?0:2),")");return l===1?c:u}},{key:"toHsb",value:function(){var o=this.toHsv(),i=o.v,a=Mt(o,I_);return q(q({},a),{},{b:i,a:this.a})}}]),n}(Qt),A_="rc-color-picker",Ta=function(t){return t instanceof to?t:new to(t)},P_=Ta("#1677ff"),Mw=function(t){var n=t.offset,r=t.targetRef,o=t.containerRef,i=t.color,a=t.type,s=o.current.getBoundingClientRect(),l=s.width,c=s.height,u=r.current.getBoundingClientRect(),d=u.width,f=u.height,h=d/2,m=f/2,v=(n.x+h)/l,g=1-(n.y+m)/c,y=i.toHsb(),b=v,C=(n.x+h)/l*360;if(a)switch(a){case"hue":return Ta(q(q({},y),{},{h:C<=0?0:C}));case"alpha":return Ta(q(q({},y),{},{a:b<=0?0:b}))}return Ta({h:y.h,s:v<=0?0:v,b:g>=1?1:g,a:y.a})},Rw=function(t,n){var r=t.toHsb();switch(n){case"hue":return{x:r.h/360*100,y:50};case"alpha":return{x:t.a*100,y:50};default:return{x:r.s*100,y:(1-r.b)*100}}},ug=function(t){var n=t.color,r=t.prefixCls,o=t.className,i=t.style,a=t.onClick,s="".concat(r,"-color-block");return O.createElement("div",{className:te(s,o),style:i,onClick:a},O.createElement("div",{className:"".concat(s,"-inner"),style:{background:n}}))};function k_(e){var t="touches"in e?e.touches[0]:e,n=document.documentElement.scrollLeft||document.body.scrollLeft||window.pageXOffset,r=document.documentElement.scrollTop||document.body.scrollTop||window.pageYOffset;return{pageX:t.pageX-n,pageY:t.pageY-r}}function Iw(e){var t=e.targetRef,n=e.containerRef,r=e.direction,o=e.onDragChange,i=e.onDragChangeComplete,a=e.calculate,s=e.color,l=e.disabledDrag,c=O.useState({x:0,y:0}),u=de(c,2),d=u[0],f=u[1],h=O.useRef(null),m=O.useRef(null);O.useEffect(function(){f(a())},[s]),O.useEffect(function(){return function(){document.removeEventListener("mousemove",h.current),document.removeEventListener("mouseup",m.current),document.removeEventListener("touchmove",h.current),document.removeEventListener("touchend",m.current),h.current=null,m.current=null}},[]);var v=function(x){var S=k_(x),w=S.pageX,E=S.pageY,N=n.current.getBoundingClientRect(),$=N.x,M=N.y,R=N.width,k=N.height,D=t.current.getBoundingClientRect(),A=D.width,L=D.height,T=A/2,I=L/2,_=Math.max(0,Math.min(w-$,R))-T,W=Math.max(0,Math.min(E-M,k))-I,H={x:_,y:r==="x"?d.y:W};if(A===0&&L===0||A!==L)return!1;o==null||o(H)},g=function(x){x.preventDefault(),v(x)},y=function(x){x.preventDefault(),document.removeEventListener("mousemove",h.current),document.removeEventListener("mouseup",m.current),document.removeEventListener("touchmove",h.current),document.removeEventListener("touchend",m.current),h.current=null,m.current=null,i==null||i()},b=function(x){document.removeEventListener("mousemove",h.current),document.removeEventListener("mouseup",m.current),!l&&(v(x),document.addEventListener("mousemove",g),document.addEventListener("mouseup",y),document.addEventListener("touchmove",g),document.addEventListener("touchend",y),h.current=g,m.current=y)};return[d,b]}var Tw=function(t){var n=t.size,r=n===void 0?"default":n,o=t.color,i=t.prefixCls;return O.createElement("div",{className:te("".concat(i,"-handler"),U({},"".concat(i,"-handler-sm"),r==="small")),style:{backgroundColor:o}})},Aw=function(t){var n=t.children,r=t.style,o=t.prefixCls;return O.createElement("div",{className:"".concat(o,"-palette"),style:q({position:"relative"},r)},n)},Pw=O.forwardRef(function(e,t){var n=e.children,r=e.x,o=e.y;return O.createElement("div",{ref:t,style:{position:"absolute",left:"".concat(r,"%"),top:"".concat(o,"%"),zIndex:1,transform:"translate(-50%, -50%)"}},n)}),D_=function(t){var n=t.color,r=t.onChange,o=t.prefixCls,i=t.onChangeComplete,a=t.disabled,s=O.useRef(),l=O.useRef(),c=O.useRef(n),u=tn(function(v){var g=Mw({offset:v,targetRef:l,containerRef:s,color:n});c.current=g,r(g)}),d=Iw({color:n,containerRef:s,targetRef:l,calculate:function(){return Rw(n)},onDragChange:u,onDragChangeComplete:function(){return i==null?void 0:i(c.current)},disabledDrag:a}),f=de(d,2),h=f[0],m=f[1];return O.createElement("div",{ref:s,className:"".concat(o,"-select"),onMouseDown:m,onTouchStart:m},O.createElement(Aw,{prefixCls:o},O.createElement(Pw,{x:h.x,y:h.y,ref:l},O.createElement(Tw,{color:n.toRgbString(),prefixCls:o})),O.createElement("div",{className:"".concat(o,"-saturation"),style:{backgroundColor:"hsl(".concat(n.toHsb().h,",100%, 50%)"),backgroundImage:"linear-gradient(0deg, #000, transparent),linear-gradient(90deg, #fff, hsla(0, 0%, 100%, 0))"}})))},__=function(t,n){var r=bn(t,{value:n}),o=de(r,2),i=o[0],a=o[1],s=O.useMemo(function(){return Ta(i)},[i]);return[s,a]},L_=function(t){var n=t.colors,r=t.children,o=t.direction,i=o===void 0?"to right":o,a=t.type,s=t.prefixCls,l=O.useMemo(function(){return n.map(function(c,u){var d=Ta(c);return a==="alpha"&&u===n.length-1&&(d=new to(d.setA(1))),d.toRgbString()}).join(",")},[n,a]);return O.createElement("div",{className:"".concat(s,"-gradient"),style:{position:"absolute",inset:0,background:"linear-gradient(".concat(i,", ").concat(l,")")}},r)},j_=function(t){var n=t.prefixCls,r=t.colors,o=t.disabled,i=t.onChange,a=t.onChangeComplete,s=t.color,l=t.type,c=O.useRef(),u=O.useRef(),d=O.useRef(s),f=function(S){return l==="hue"?S.getHue():S.a*100},h=tn(function(x){var S=Mw({offset:x,targetRef:u,containerRef:c,color:s,type:l});d.current=S,i(f(S))}),m=Iw({color:s,targetRef:u,containerRef:c,calculate:function(){return Rw(s,l)},onDragChange:h,onDragChangeComplete:function(){a(f(d.current))},direction:"x",disabledDrag:o}),v=de(m,2),g=v[0],y=v[1],b=O.useMemo(function(){if(l==="hue"){var x=s.toHsb();x.s=1,x.b=1,x.a=1;var S=new to(x);return S}return s},[s,l]),C=O.useMemo(function(){return r.map(function(x){return"".concat(x.color," ").concat(x.percent,"%")})},[r]);return O.createElement("div",{ref:c,className:te("".concat(n,"-slider"),"".concat(n,"-slider-").concat(l)),onMouseDown:y,onTouchStart:y},O.createElement(Aw,{prefixCls:n},O.createElement(Pw,{x:g.x,y:g.y,ref:u},O.createElement(Tw,{size:"small",color:b.toHexString(),prefixCls:n})),O.createElement(L_,{colors:C,type:l,prefixCls:n})))};function B_(e){return p.useMemo(function(){var t=e||{},n=t.slider;return[n||j_]},[e])}var z_=[{color:"rgb(255, 0, 0)",percent:0},{color:"rgb(255, 255, 0)",percent:17},{color:"rgb(0, 255, 0)",percent:33},{color:"rgb(0, 255, 255)",percent:50},{color:"rgb(0, 0, 255)",percent:67},{color:"rgb(255, 0, 255)",percent:83},{color:"rgb(255, 0, 0)",percent:100}],kw=O.forwardRef(function(e,t){var n=e.value,r=e.defaultValue,o=e.prefixCls,i=o===void 0?A_:o,a=e.onChange,s=e.onChangeComplete,l=e.className,c=e.style,u=e.panelRender,d=e.disabledAlpha,f=d===void 0?!1:d,h=e.disabled,m=h===void 0?!1:h,v=e.components,g=B_(v),y=de(g,1),b=y[0],C=__(r||P_,n),x=de(C,2),S=x[0],w=x[1],E=O.useMemo(function(){return S.setA(1).toRgbString()},[S]),N=function(W,H){n||w(W),a==null||a(W,H)},$=function(W){return new to(S.setHue(W))},M=function(W){return new to(S.setA(W/100))},R=function(W){N($(W),{type:"hue",value:W})},k=function(W){N(M(W),{type:"alpha",value:W})},D=function(W){s&&s($(W))},A=function(W){s&&s(M(W))},L=te("".concat(i,"-panel"),l,U({},"".concat(i,"-panel-disabled"),m)),T={prefixCls:i,disabled:m,color:S},I=O.createElement(O.Fragment,null,O.createElement(D_,He({onChange:N},T,{onChangeComplete:s})),O.createElement("div",{className:"".concat(i,"-slider-container")},O.createElement("div",{className:te("".concat(i,"-slider-group"),U({},"".concat(i,"-slider-group-disabled-alpha"),f))},O.createElement(b,He({},T,{type:"hue",colors:z_,min:0,max:359,value:S.getHue(),onChange:R,onChangeComplete:D})),!f&&O.createElement(b,He({},T,{type:"alpha",colors:[{percent:0,color:"rgba(255, 0, 4, 0)"},{percent:100,color:E}],min:0,max:100,value:S.a*100,onChange:k,onChangeComplete:A}))),O.createElement(ug,{color:S.toRgbString(),prefixCls:i})));return O.createElement("div",{className:L,style:c,ref:t},typeof u=="function"?u(I):I)});process.env.NODE_ENV!=="production"&&(kw.displayName="ColorPicker");const Ns=(e,t)=>(e==null?void 0:e.replace(/[^\w/]/g,"").slice(0,t?8:6))||"",F_=(e,t)=>e?Ns(e,t):"";let Er=function(){function e(t){Tn(this,e);var n;if(this.cleared=!1,t instanceof e){this.metaColor=t.metaColor.clone(),this.colors=(n=t.colors)===null||n===void 0?void 0:n.map(o=>({color:new e(o.color),percent:o.percent})),this.cleared=t.cleared;return}const r=Array.isArray(t);r&&t.length?(this.colors=t.map(o=>{let{color:i,percent:a}=o;return{color:new e(i),percent:a}}),this.metaColor=new to(this.colors[0].color.metaColor)):this.metaColor=new to(r?"":t),(!t||r&&!this.colors)&&(this.metaColor=this.metaColor.setA(0),this.cleared=!0)}return An(e,[{key:"toHsb",value:function(){return this.metaColor.toHsb()}},{key:"toHsbString",value:function(){return this.metaColor.toHsbString()}},{key:"toHex",value:function(){return F_(this.toHexString(),this.metaColor.a<1)}},{key:"toHexString",value:function(){return this.metaColor.toHexString()}},{key:"toRgb",value:function(){return this.metaColor.toRgb()}},{key:"toRgbString",value:function(){return this.metaColor.toRgbString()}},{key:"isGradient",value:function(){return!!this.colors&&!this.cleared}},{key:"getColors",value:function(){return this.colors||[{color:this,percent:0}]}},{key:"toCssString",value:function(){const{colors:n}=this;return n?`linear-gradient(90deg, ${n.map(o=>`${o.color.toRgbString()} ${o.percent}%`).join(", ")})`:this.metaColor.toRgbString()}},{key:"equals",value:function(n){return!n||this.isGradient()!==n.isGradient()?!1:this.isGradient()?this.colors.length===n.colors.length&&this.colors.every((r,o)=>{const i=n.colors[o];return r.percent===i.percent&&r.color.equals(i.color)}):this.toHexString()===n.toHexString()}}])}();var H_={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"},V_=function(t,n){return p.createElement(Wn,He({},t,{ref:n,icon:H_}))},ul=p.forwardRef(V_);process.env.NODE_ENV!=="production"&&(ul.displayName="RightOutlined");var Dw=O.forwardRef(function(e,t){var n=e.prefixCls,r=e.forceRender,o=e.className,i=e.style,a=e.children,s=e.isActive,l=e.role,c=e.classNames,u=e.styles,d=O.useState(s||r),f=de(d,2),h=f[0],m=f[1];return O.useEffect(function(){(r||s)&&m(!0)},[r,s]),h?O.createElement("div",{ref:t,className:te("".concat(n,"-content"),U(U({},"".concat(n,"-content-active"),s),"".concat(n,"-content-inactive"),!s),o),style:i,role:l},O.createElement("div",{className:te("".concat(n,"-content-box"),c==null?void 0:c.body),style:u==null?void 0:u.body},a)):null});Dw.displayName="PanelContent";var W_=["showArrow","headerClass","isActive","onItemClick","forceRender","className","classNames","styles","prefixCls","collapsible","accordion","panelKey","extra","header","expandIcon","openMotion","destroyInactivePanel","children"],_w=O.forwardRef(function(e,t){var n=e.showArrow,r=n===void 0?!0:n,o=e.headerClass,i=e.isActive,a=e.onItemClick,s=e.forceRender,l=e.className,c=e.classNames,u=c===void 0?{}:c,d=e.styles,f=d===void 0?{}:d,h=e.prefixCls,m=e.collapsible,v=e.accordion,g=e.panelKey,y=e.extra,b=e.header,C=e.expandIcon,x=e.openMotion,S=e.destroyInactivePanel,w=e.children,E=Mt(e,W_),N=m==="disabled",$=y!=null&&typeof y!="boolean",M=U(U(U({onClick:function(){a==null||a(g)},onKeyDown:function(I){(I.key==="Enter"||I.keyCode===at.ENTER||I.which===at.ENTER)&&(a==null||a(g))},role:v?"tab":"button"},"aria-expanded",i),"aria-disabled",N),"tabIndex",N?-1:0),R=typeof C=="function"?C(e):O.createElement("i",{className:"arrow"}),k=R&&O.createElement("div",He({className:"".concat(h,"-expand-icon")},["header","icon"].includes(m)?M:{}),R),D=te("".concat(h,"-item"),U(U({},"".concat(h,"-item-active"),i),"".concat(h,"-item-disabled"),N),l),A=te(o,"".concat(h,"-header"),U({},"".concat(h,"-collapsible-").concat(m),!!m),u.header),L=q({className:A,style:f.header},["header","icon"].includes(m)?{}:M);return O.createElement("div",He({},E,{ref:t,className:D}),O.createElement("div",L,r&&k,O.createElement("span",He({className:"".concat(h,"-header-text")},m==="header"?M:{}),b),$&&O.createElement("div",{className:"".concat(h,"-extra")},y)),O.createElement(So,He({visible:i,leavedClassName:"".concat(h,"-content-hidden")},x,{forceRender:s,removeOnLeave:S}),function(T,I){var _=T.className,W=T.style;return O.createElement(Dw,{ref:I,prefixCls:h,className:_,classNames:u,style:W,styles:f,isActive:i,forceRender:s,role:v?"tabpanel":void 0},w)}))}),U_=["children","label","key","collapsible","onItemClick","destroyInactivePanel"],q_=function(t,n){var r=n.prefixCls,o=n.accordion,i=n.collapsible,a=n.destroyInactivePanel,s=n.onItemClick,l=n.activeKey,c=n.openMotion,u=n.expandIcon;return t.map(function(d,f){var h=d.children,m=d.label,v=d.key,g=d.collapsible,y=d.onItemClick,b=d.destroyInactivePanel,C=Mt(d,U_),x=String(v??f),S=g??i,w=b??a,E=function(M){S!=="disabled"&&(s(M),y==null||y(M))},N=!1;return o?N=l[0]===x:N=l.indexOf(x)>-1,O.createElement(_w,He({},C,{prefixCls:r,key:x,panelKey:x,isActive:N,accordion:o,openMotion:c,expandIcon:u,header:m,collapsible:S,onItemClick:E,destroyInactivePanel:w}),h)})},K_=function(t,n,r){if(!t)return null;var o=r.prefixCls,i=r.accordion,a=r.collapsible,s=r.destroyInactivePanel,l=r.onItemClick,c=r.activeKey,u=r.openMotion,d=r.expandIcon,f=t.key||String(n),h=t.props,m=h.header,v=h.headerClass,g=h.destroyInactivePanel,y=h.collapsible,b=h.onItemClick,C=!1;i?C=c[0]===f:C=c.indexOf(f)>-1;var x=y??a,S=function(N){x!=="disabled"&&(l(N),b==null||b(N))},w={key:f,panelKey:f,header:m,headerClass:v,isActive:C,prefixCls:o,destroyInactivePanel:g??s,openMotion:u,accordion:i,children:t.props.children,onItemClick:S,expandIcon:d,collapsible:x};return typeof t.type=="string"?t:(Object.keys(w).forEach(function(E){typeof w[E]>"u"&&delete w[E]}),O.cloneElement(t,w))};function G_(e,t,n){return Array.isArray(e)?q_(e,n):Nr(t).map(function(r,o){return K_(r,o,n)})}function X_(e){var t=e;if(!Array.isArray(t)){var n=ht(t);t=n==="number"||n==="string"?[t]:[]}return t.map(function(r){return String(r)})}var Y_=O.forwardRef(function(e,t){var n=e.prefixCls,r=n===void 0?"rc-collapse":n,o=e.destroyInactivePanel,i=o===void 0?!1:o,a=e.style,s=e.accordion,l=e.className,c=e.children,u=e.collapsible,d=e.openMotion,f=e.expandIcon,h=e.activeKey,m=e.defaultActiveKey,v=e.onChange,g=e.items,y=te(r,l),b=bn([],{value:h,onChange:function($){return v==null?void 0:v($)},defaultValue:m,postState:X_}),C=de(b,2),x=C[0],S=C[1],w=function($){return S(function(){if(s)return x[0]===$?[]:[$];var M=x.indexOf($),R=M>-1;return R?x.filter(function(k){return k!==$}):[].concat(Le(x),[$])})};Ot(!c,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");var E=G_(g,c,{prefixCls:r,accordion:s,openMotion:d,expandIcon:f,collapsible:u,destroyInactivePanel:i,onItemClick:w,activeKey:x});return O.createElement("div",He({ref:t,className:y,style:a,role:s?"tablist":void 0},eo(e,{aria:!0,data:!0})),E)});const dg=Object.assign(Y_,{Panel:_w});dg.Panel;const J_=p.forwardRef((e,t)=>{process.env.NODE_ENV!=="production"&&fn("Collapse.Panel").deprecated(!("disabled"in e),"disabled",'collapsible="disabled"');const{getPrefixCls:n}=p.useContext(_t),{prefixCls:r,className:o,showArrow:i=!0}=e,a=n("collapse",r),s=te({[`${a}-no-arrow`]:!i},o);return p.createElement(dg.Panel,Object.assign({ref:t},e,{prefixCls:a,className:s}))}),Lw=e=>({[e.componentCls]:{[`${e.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${e.motionDurationMid} ${e.motionEaseInOut},
295
+ opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}},[`${e.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${e.motionDurationMid} ${e.motionEaseInOut},
296
+ opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}}}),Q_=e=>({animationDuration:e,animationFillMode:"both"}),Z_=e=>({animationDuration:e,animationFillMode:"both"}),xd=function(e,t,n,r){const i=(arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1)?"&":"";return{[`
297
+ ${i}${e}-enter,
298
+ ${i}${e}-appear
299
+ `]:Object.assign(Object.assign({},Q_(r)),{animationPlayState:"paused"}),[`${i}${e}-leave`]:Object.assign(Object.assign({},Z_(r)),{animationPlayState:"paused"}),[`
300
+ ${i}${e}-enter${e}-enter-active,
301
+ ${i}${e}-appear${e}-appear-active
302
+ `]:{animationName:t,animationPlayState:"running"},[`${i}${e}-leave${e}-leave-active`]:{animationName:n,animationPlayState:"running",pointerEvents:"none"}}},eL=new rn("antFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),tL=new rn("antFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),nL=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const{antCls:n}=e,r=`${n}-fade`,o=t?"&":"";return[xd(r,eL,tL,e.motionDurationMid,t),{[`
303
+ ${o}${r}-enter,
304
+ ${o}${r}-appear
305
+ `]:{opacity:0,animationTimingFunction:"linear"},[`${o}${r}-leave`]:{animationTimingFunction:"linear"}}]},rL=new rn("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),oL=new rn("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),iL=new rn("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),aL=new rn("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),sL=new rn("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),lL=new rn("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),cL=new rn("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),uL=new rn("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),dL={"move-up":{inKeyframes:cL,outKeyframes:uL},"move-down":{inKeyframes:rL,outKeyframes:oL},"move-left":{inKeyframes:iL,outKeyframes:aL},"move-right":{inKeyframes:sL,outKeyframes:lL}},pu=(e,t)=>{const{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:o,outKeyframes:i}=dL[t];return[xd(r,o,i,e.motionDurationMid),{[`
306
+ ${r}-enter,
307
+ ${r}-appear
308
+ `]:{opacity:0,animationTimingFunction:e.motionEaseOutCirc},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},fg=new rn("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),hg=new rn("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),pg=new rn("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),mg=new rn("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),fL=new rn("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),hL=new rn("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),pL=new rn("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),mL=new rn("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),gL={"slide-up":{inKeyframes:fg,outKeyframes:hg},"slide-down":{inKeyframes:pg,outKeyframes:mg},"slide-left":{inKeyframes:fL,outKeyframes:hL},"slide-right":{inKeyframes:pL,outKeyframes:mL}},Ga=(e,t)=>{const{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:o,outKeyframes:i}=gL[t];return[xd(r,o,i,e.motionDurationMid),{[`
309
+ ${r}-enter,
310
+ ${r}-appear
311
+ `]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:e.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInQuint}}]},vL=new rn("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),bL=new rn("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),P0=new rn("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),k0=new rn("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),yL=new rn("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),CL=new rn("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),SL=new rn("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),xL=new rn("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),wL=new rn("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),EL=new rn("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),OL=new rn("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),$L=new rn("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),NL={zoom:{inKeyframes:vL,outKeyframes:bL},"zoom-big":{inKeyframes:P0,outKeyframes:k0},"zoom-big-fast":{inKeyframes:P0,outKeyframes:k0},"zoom-left":{inKeyframes:SL,outKeyframes:xL},"zoom-right":{inKeyframes:wL,outKeyframes:EL},"zoom-up":{inKeyframes:yL,outKeyframes:CL},"zoom-down":{inKeyframes:OL,outKeyframes:$L}},Ml=(e,t)=>{const{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:o,outKeyframes:i}=NL[t];return[xd(r,o,i,t==="zoom-big-fast"?e.motionDurationFast:e.motionDurationMid),{[`
312
+ ${r}-enter,
313
+ ${r}-appear
314
+ `]:{transform:"scale(0)",opacity:0,animationTimingFunction:e.motionEaseOutCirc,"&-prepare":{transform:"none"}},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},ML=e=>{const{componentCls:t,contentBg:n,padding:r,headerBg:o,headerPadding:i,collapseHeaderPaddingSM:a,collapseHeaderPaddingLG:s,collapsePanelBorderRadius:l,lineWidth:c,lineType:u,colorBorder:d,colorText:f,colorTextHeading:h,colorTextDisabled:m,fontSizeLG:v,lineHeight:g,lineHeightLG:y,marginSM:b,paddingSM:C,paddingLG:x,paddingXS:S,motionDurationSlow:w,fontSizeIcon:E,contentPadding:N,fontHeight:$,fontHeightLG:M}=e,R=`${oe(c)} ${u} ${d}`;return{[t]:Object.assign(Object.assign({},Bn(e)),{backgroundColor:o,border:R,borderRadius:l,"&-rtl":{direction:"rtl"},[`& > ${t}-item`]:{borderBottom:R,"&:first-child":{[`
315
+ &,
316
+ & > ${t}-header`]:{borderRadius:`${oe(l)} ${oe(l)} 0 0`}},"&:last-child":{[`
317
+ &,
318
+ & > ${t}-header`]:{borderRadius:`0 0 ${oe(l)} ${oe(l)}`}},[`> ${t}-header`]:Object.assign(Object.assign({position:"relative",display:"flex",flexWrap:"nowrap",alignItems:"flex-start",padding:i,color:h,lineHeight:g,cursor:"pointer",transition:`all ${w}, visibility 0s`},Ka(e)),{[`> ${t}-header-text`]:{flex:"auto"},[`${t}-expand-icon`]:{height:$,display:"flex",alignItems:"center",paddingInlineEnd:b},[`${t}-arrow`]:Object.assign(Object.assign({},oa()),{fontSize:E,transition:`transform ${w}`,svg:{transition:`transform ${w}`}}),[`${t}-header-text`]:{marginInlineEnd:"auto"}}),[`${t}-collapsible-header`]:{cursor:"default",[`${t}-header-text`]:{flex:"none",cursor:"pointer"}},[`${t}-collapsible-icon`]:{cursor:"unset",[`${t}-expand-icon`]:{cursor:"pointer"}}},[`${t}-content`]:{color:f,backgroundColor:n,borderTop:R,[`& > ${t}-content-box`]:{padding:N},"&-hidden":{display:"none"}},"&-small":{[`> ${t}-item`]:{[`> ${t}-header`]:{padding:a,paddingInlineStart:S,[`> ${t}-expand-icon`]:{marginInlineStart:e.calc(C).sub(S).equal()}},[`> ${t}-content > ${t}-content-box`]:{padding:C}}},"&-large":{[`> ${t}-item`]:{fontSize:v,lineHeight:y,[`> ${t}-header`]:{padding:s,paddingInlineStart:r,[`> ${t}-expand-icon`]:{height:M,marginInlineStart:e.calc(x).sub(r).equal()}},[`> ${t}-content > ${t}-content-box`]:{padding:x}}},[`${t}-item:last-child`]:{borderBottom:0,[`> ${t}-content`]:{borderRadius:`0 0 ${oe(l)} ${oe(l)}`}},[`& ${t}-item-disabled > ${t}-header`]:{"\n &,\n & > .arrow\n ":{color:m,cursor:"not-allowed"}},[`&${t}-icon-position-end`]:{[`& > ${t}-item`]:{[`> ${t}-header`]:{[`${t}-expand-icon`]:{order:1,paddingInlineEnd:0,paddingInlineStart:b}}}}})}},RL=e=>{const{componentCls:t}=e,n=`> ${t}-item > ${t}-header ${t}-arrow`;return{[`${t}-rtl`]:{[n]:{transform:"rotate(180deg)"}}}},IL=e=>{const{componentCls:t,headerBg:n,paddingXXS:r,colorBorder:o}=e;return{[`${t}-borderless`]:{backgroundColor:n,border:0,[`> ${t}-item`]:{borderBottom:`1px solid ${o}`},[`
319
+ > ${t}-item:last-child,
320
+ > ${t}-item:last-child ${t}-header
321
+ `]:{borderRadius:0},[`> ${t}-item:last-child`]:{borderBottom:0},[`> ${t}-item > ${t}-content`]:{backgroundColor:"transparent",borderTop:0},[`> ${t}-item > ${t}-content > ${t}-content-box`]:{paddingTop:r}}}},TL=e=>{const{componentCls:t,paddingSM:n}=e;return{[`${t}-ghost`]:{backgroundColor:"transparent",border:0,[`> ${t}-item`]:{borderBottom:0,[`> ${t}-content`]:{backgroundColor:"transparent",border:0,[`> ${t}-content-box`]:{paddingBlock:n}}}}}},AL=e=>({headerPadding:`${e.paddingSM}px ${e.padding}px`,headerBg:e.colorFillAlter,contentPadding:`${e.padding}px 16px`,contentBg:e.colorBgContainer}),PL=yn("Collapse",e=>{const t=Xt(e,{collapseHeaderPaddingSM:`${oe(e.paddingXS)} ${oe(e.paddingSM)}`,collapseHeaderPaddingLG:`${oe(e.padding)} ${oe(e.paddingLG)}`,collapsePanelBorderRadius:e.borderRadiusLG});return[ML(t),IL(t),TL(t),RL(t),Lw(t)]},AL),jw=p.forwardRef((e,t)=>{const{getPrefixCls:n,direction:r,expandIcon:o,className:i,style:a}=Rr("collapse"),{prefixCls:s,className:l,rootClassName:c,style:u,bordered:d=!0,ghost:f,size:h,expandIconPosition:m="start",children:v,expandIcon:g}=e,y=Vr(D=>{var A;return(A=h??D)!==null&&A!==void 0?A:"middle"}),b=n("collapse",s),C=n(),[x,S,w]=PL(b);if(process.env.NODE_ENV!=="production"){const D=fn("Collapse");process.env.NODE_ENV!=="production"&&D(m!=="left"&&m!=="right","deprecated","`expandIconPosition` with `left` or `right` is deprecated. Please use `start` or `end` instead.")}const E=p.useMemo(()=>m==="left"?"start":m==="right"?"end":m,[m]),N=g??o,$=p.useCallback(function(){let D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const A=typeof N=="function"?N(D):p.createElement(ul,{rotate:D.isActive?r==="rtl"?-90:90:void 0,"aria-label":D.isActive?"expanded":"collapsed"});return Hr(A,()=>{var L;return{className:te((L=A==null?void 0:A.props)===null||L===void 0?void 0:L.className,`${b}-arrow`)}})},[N,b]),M=te(`${b}-icon-position-${E}`,{[`${b}-borderless`]:!d,[`${b}-rtl`]:r==="rtl",[`${b}-ghost`]:!!f,[`${b}-${y}`]:y!=="middle"},i,l,c,S,w),R=Object.assign(Object.assign({},ww(C)),{motionAppear:!1,leavedClassName:`${b}-content-hidden`}),k=p.useMemo(()=>v?Nr(v).map((D,A)=>{var L,T;const I=D.props;if(I!=null&&I.disabled){const _=(L=D.key)!==null&&L!==void 0?L:String(A),W=Object.assign(Object.assign({},Hn(D.props,["disabled"])),{key:_,collapsible:(T=I.collapsible)!==null&&T!==void 0?T:"disabled"});return Hr(D,W)}return D}):null,[v]);return x(p.createElement(dg,Object.assign({ref:t,openMotion:R},Hn(e,["rootClassName"]),{expandIcon:$,prefixCls:b,className:M,style:Object.assign(Object.assign({},a),u)}),k))});process.env.NODE_ENV!=="production"&&(jw.displayName="Collapse");const kL=Object.assign(jw,{Panel:J_}),ir=e=>e instanceof Er?e:new Er(e),Lc=e=>Math.round(Number(e||0)),gg=e=>Lc(e.toHsb().a*100),jc=(e,t)=>{const n=e.toRgb();if(!n.r&&!n.g&&!n.b){const r=e.toHsb();return r.a=1,ir(r)}return n.a=1,ir(n)},Bw=(e,t)=>{const n=[{percent:0,color:e[0].color}].concat(Le(e),[{percent:100,color:e[e.length-1].color}]);for(let r=0;r<n.length-1;r+=1){const o=n[r].percent,i=n[r+1].percent,a=n[r].color,s=n[r+1].color;if(o<=t&&t<=i){const l=i-o;if(l===0)return a;const c=(t-o)/l*100,u=new to(a),d=new to(s);return u.mix(d,c).toRgbString()}}return""},Uf=e=>e.map(t=>(t.colors=t.colors.map(ir),t)),zw=(e,t)=>{const{r:n,g:r,b:o,a:i}=e.toRgb(),a=new to(e.toRgbString()).onBackground(t).toHsv();return i<=.5?a.v>.5:n*.299+r*.587+o*.114>192},D0=(e,t)=>{var n;return`panel-${(n=e.key)!==null&&n!==void 0?n:t}`},DL=e=>{let{prefixCls:t,presets:n,value:r,onChange:o}=e;const[i]=Vo("ColorPicker"),[,a]=br(),[s]=bn(Uf(n),{value:Uf(n),postState:Uf}),l=`${t}-presets`,c=O.useMemo(()=>s.reduce((f,h,m)=>{const{defaultOpen:v=!0}=h;return v&&f.push(D0(h,m)),f},[]),[s]),u=f=>{o==null||o(f)},d=s.map((f,h)=>{var m;return{key:D0(f,h),label:O.createElement("div",{className:`${l}-label`},f==null?void 0:f.label),children:O.createElement("div",{className:`${l}-items`},Array.isArray(f==null?void 0:f.colors)&&((m=f.colors)===null||m===void 0?void 0:m.length)>0?f.colors.map((v,g)=>O.createElement(ug,{key:`preset-${g}-${v.toHexString()}`,color:ir(v).toRgbString(),prefixCls:t,className:te(`${l}-color`,{[`${l}-color-checked`]:v.toHexString()===(r==null?void 0:r.toHexString()),[`${l}-color-bright`]:zw(v,a.colorBgElevated)}),onClick:()=>u(v)})):O.createElement("span",{className:`${l}-empty`},i.presetEmpty))}});return O.createElement("div",{className:l},O.createElement(kL,{defaultActiveKey:c,ghost:!0,items:d}))},Fw=e=>{const{paddingInline:t,onlyIconSize:n}=e;return Xt(e,{buttonPaddingHorizontal:t,buttonPaddingVertical:0,buttonIconOnlyFontSize:n})},Hw=e=>{var t,n,r,o,i,a;const s=(t=e.contentFontSize)!==null&&t!==void 0?t:e.fontSize,l=(n=e.contentFontSizeSM)!==null&&n!==void 0?n:e.fontSize,c=(r=e.contentFontSizeLG)!==null&&r!==void 0?r:e.fontSizeLG,u=(o=e.contentLineHeight)!==null&&o!==void 0?o:Dc(s),d=(i=e.contentLineHeightSM)!==null&&i!==void 0?i:Dc(l),f=(a=e.contentLineHeightLG)!==null&&a!==void 0?a:Dc(c),h=zw(new Er(e.colorBgSolid),"#fff")?"#000":"#fff",m=gi.reduce((v,g)=>Object.assign(Object.assign({},v),{[`${g}ShadowColor`]:`0 ${oe(e.controlOutlineWidth)} 0 ${$s(e[`${g}1`],e.colorBgContainer)}`}),{});return Object.assign(Object.assign({},m),{fontWeight:400,defaultShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlTmpOutline}`,primaryShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlOutline}`,dangerShadow:`0 ${e.controlOutlineWidth}px 0 ${e.colorErrorOutline}`,primaryColor:e.colorTextLightSolid,dangerColor:e.colorTextLightSolid,borderColorDisabled:e.colorBorder,defaultGhostColor:e.colorBgContainer,ghostBg:"transparent",defaultGhostBorderColor:e.colorBgContainer,paddingInline:e.paddingContentHorizontal-e.lineWidth,paddingInlineLG:e.paddingContentHorizontal-e.lineWidth,paddingInlineSM:8-e.lineWidth,onlyIconSize:"inherit",onlyIconSizeSM:"inherit",onlyIconSizeLG:"inherit",groupBorderColor:e.colorPrimaryHover,linkHoverBg:"transparent",textTextColor:e.colorText,textTextHoverColor:e.colorText,textTextActiveColor:e.colorText,textHoverBg:e.colorFillTertiary,defaultColor:e.colorText,defaultBg:e.colorBgContainer,defaultBorderColor:e.colorBorder,defaultBorderColorDisabled:e.colorBorder,defaultHoverBg:e.colorBgContainer,defaultHoverColor:e.colorPrimaryHover,defaultHoverBorderColor:e.colorPrimaryHover,defaultActiveBg:e.colorBgContainer,defaultActiveColor:e.colorPrimaryActive,defaultActiveBorderColor:e.colorPrimaryActive,solidTextColor:h,contentFontSize:s,contentFontSizeSM:l,contentFontSizeLG:c,contentLineHeight:u,contentLineHeightSM:d,contentLineHeightLG:f,paddingBlock:Math.max((e.controlHeight-s*u)/2-e.lineWidth,0),paddingBlockSM:Math.max((e.controlHeightSM-l*d)/2-e.lineWidth,0),paddingBlockLG:Math.max((e.controlHeightLG-c*f)/2-e.lineWidth,0)})},_L=e=>{const{componentCls:t,iconCls:n,fontWeight:r,opacityLoading:o,motionDurationSlow:i,motionEaseInOut:a,marginXS:s,calc:l}=e;return{[t]:{outline:"none",position:"relative",display:"inline-flex",gap:e.marginXS,alignItems:"center",justifyContent:"center",fontWeight:r,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",background:"transparent",border:`${oe(e.lineWidth)} ${e.lineType} transparent`,cursor:"pointer",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,userSelect:"none",touchAction:"manipulation",color:e.colorText,"&:disabled > *":{pointerEvents:"none"},[`${t}-icon > svg`]:oa(),"> a":{color:"currentColor"},"&:not(:disabled)":Ka(e),[`&${t}-two-chinese-chars::first-letter`]:{letterSpacing:"0.34em"},[`&${t}-two-chinese-chars > *:not(${n})`]:{marginInlineEnd:"-0.34em",letterSpacing:"0.34em"},[`&${t}-icon-only`]:{paddingInline:0,[`&${t}-compact-item`]:{flex:"none"},[`&${t}-round`]:{width:"auto"}},[`&${t}-loading`]:{opacity:o,cursor:"default"},[`${t}-loading-icon`]:{transition:["width","opacity","margin"].map(c=>`${c} ${i} ${a}`).join(",")},[`&:not(${t}-icon-end)`]:{[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineEnd:l(s).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineEnd:0},"&-leave-start":{marginInlineEnd:0},"&-leave-active":{marginInlineEnd:l(s).mul(-1).equal()}}},"&-icon-end":{flexDirection:"row-reverse",[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineStart:l(s).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineStart:0},"&-leave-start":{marginInlineStart:0},"&-leave-active":{marginInlineStart:l(s).mul(-1).equal()}}}}}},Vw=(e,t,n)=>({[`&:not(:disabled):not(${e}-disabled)`]:{"&:hover":t,"&:active":n}}),LL=e=>({minWidth:e.controlHeight,paddingInlineStart:0,paddingInlineEnd:0,borderRadius:"50%"}),jL=e=>({borderRadius:e.controlHeight,paddingInlineStart:e.calc(e.controlHeight).div(2).equal(),paddingInlineEnd:e.calc(e.controlHeight).div(2).equal()}),BL=e=>({cursor:"not-allowed",borderColor:e.borderColorDisabled,color:e.colorTextDisabled,background:e.colorBgContainerDisabled,boxShadow:"none"}),wd=(e,t,n,r,o,i,a,s)=>({[`&${e}-background-ghost`]:Object.assign(Object.assign({color:n||void 0,background:t,borderColor:r||void 0,boxShadow:"none"},Vw(e,Object.assign({background:t},a),Object.assign({background:t},s))),{"&:disabled":{cursor:"not-allowed",color:o||void 0,borderColor:i||void 0}})}),zL=e=>({[`&:disabled, &${e.componentCls}-disabled`]:Object.assign({},BL(e))}),FL=e=>({[`&:disabled, &${e.componentCls}-disabled`]:{cursor:"not-allowed",color:e.colorTextDisabled}}),Ed=(e,t,n,r)=>{const i=r&&["link","text"].includes(r)?FL:zL;return Object.assign(Object.assign({},i(e)),Vw(e.componentCls,t,n))},Od=(e,t,n,r,o)=>({[`&${e.componentCls}-variant-solid`]:Object.assign({color:t,background:n},Ed(e,r,o))}),$d=(e,t,n,r,o)=>({[`&${e.componentCls}-variant-outlined, &${e.componentCls}-variant-dashed`]:Object.assign({borderColor:t,background:n},Ed(e,r,o))}),Nd=e=>({[`&${e.componentCls}-variant-dashed`]:{borderStyle:"dashed"}}),Md=(e,t,n,r)=>({[`&${e.componentCls}-variant-filled`]:Object.assign({boxShadow:"none",background:t},Ed(e,n,r))}),Co=(e,t,n,r,o)=>({[`&${e.componentCls}-variant-${n}`]:Object.assign({color:t,boxShadow:"none"},Ed(e,r,o,n))}),HL=e=>{const{componentCls:t}=e;return gi.reduce((n,r)=>{const o=e[`${r}6`],i=e[`${r}1`],a=e[`${r}5`],s=e[`${r}2`],l=e[`${r}3`],c=e[`${r}7`];return Object.assign(Object.assign({},n),{[`&${t}-color-${r}`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:o,boxShadow:e[`${r}ShadowColor`]},Od(e,e.colorTextLightSolid,o,{background:a},{background:c})),$d(e,o,e.colorBgContainer,{color:a,borderColor:a,background:e.colorBgContainer},{color:c,borderColor:c,background:e.colorBgContainer})),Nd(e)),Md(e,i,{background:s},{background:l})),Co(e,o,"link",{color:a},{color:c})),Co(e,o,"text",{color:a,background:i},{color:c,background:l}))})},{})},VL=e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.defaultColor,boxShadow:e.defaultShadow},Od(e,e.solidTextColor,e.colorBgSolid,{color:e.solidTextColor,background:e.colorBgSolidHover},{color:e.solidTextColor,background:e.colorBgSolidActive})),Nd(e)),Md(e,e.colorFillTertiary,{background:e.colorFillSecondary},{background:e.colorFill})),wd(e.componentCls,e.ghostBg,e.defaultGhostColor,e.defaultGhostBorderColor,e.colorTextDisabled,e.colorBorder)),Co(e,e.textTextColor,"link",{color:e.colorLinkHover,background:e.linkHoverBg},{color:e.colorLinkActive})),WL=e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.colorPrimary,boxShadow:e.primaryShadow},$d(e,e.colorPrimary,e.colorBgContainer,{color:e.colorPrimaryTextHover,borderColor:e.colorPrimaryHover,background:e.colorBgContainer},{color:e.colorPrimaryTextActive,borderColor:e.colorPrimaryActive,background:e.colorBgContainer})),Nd(e)),Md(e,e.colorPrimaryBg,{background:e.colorPrimaryBgHover},{background:e.colorPrimaryBorder})),Co(e,e.colorPrimaryText,"text",{color:e.colorPrimaryTextHover,background:e.colorPrimaryBg},{color:e.colorPrimaryTextActive,background:e.colorPrimaryBorder})),Co(e,e.colorPrimaryText,"link",{color:e.colorPrimaryTextHover,background:e.linkHoverBg},{color:e.colorPrimaryTextActive})),wd(e.componentCls,e.ghostBg,e.colorPrimary,e.colorPrimary,e.colorTextDisabled,e.colorBorder,{color:e.colorPrimaryHover,borderColor:e.colorPrimaryHover},{color:e.colorPrimaryActive,borderColor:e.colorPrimaryActive})),UL=e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.colorError,boxShadow:e.dangerShadow},Od(e,e.dangerColor,e.colorError,{background:e.colorErrorHover},{background:e.colorErrorActive})),$d(e,e.colorError,e.colorBgContainer,{color:e.colorErrorHover,borderColor:e.colorErrorBorderHover},{color:e.colorErrorActive,borderColor:e.colorErrorActive})),Nd(e)),Md(e,e.colorErrorBg,{background:e.colorErrorBgFilledHover},{background:e.colorErrorBgActive})),Co(e,e.colorError,"text",{color:e.colorErrorHover,background:e.colorErrorBg},{color:e.colorErrorHover,background:e.colorErrorBgActive})),Co(e,e.colorError,"link",{color:e.colorErrorHover},{color:e.colorErrorActive})),wd(e.componentCls,e.ghostBg,e.colorError,e.colorError,e.colorTextDisabled,e.colorBorder,{color:e.colorErrorHover,borderColor:e.colorErrorHover},{color:e.colorErrorActive,borderColor:e.colorErrorActive})),qL=e=>Object.assign(Object.assign({},Co(e,e.colorLink,"link",{color:e.colorLinkHover},{color:e.colorLinkActive})),wd(e.componentCls,e.ghostBg,e.colorInfo,e.colorInfo,e.colorTextDisabled,e.colorBorder,{color:e.colorInfoHover,borderColor:e.colorInfoHover},{color:e.colorInfoActive,borderColor:e.colorInfoActive})),KL=e=>{const{componentCls:t}=e;return Object.assign({[`${t}-color-default`]:VL(e),[`${t}-color-primary`]:WL(e),[`${t}-color-dangerous`]:UL(e),[`${t}-color-link`]:qL(e)},HL(e))},GL=e=>Object.assign(Object.assign(Object.assign(Object.assign({},$d(e,e.defaultBorderColor,e.defaultBg,{color:e.defaultHoverColor,borderColor:e.defaultHoverBorderColor,background:e.defaultHoverBg},{color:e.defaultActiveColor,borderColor:e.defaultActiveBorderColor,background:e.defaultActiveBg})),Co(e,e.textTextColor,"text",{color:e.textTextHoverColor,background:e.textHoverBg},{color:e.textTextActiveColor,background:e.colorBgTextActive})),Od(e,e.primaryColor,e.colorPrimary,{background:e.colorPrimaryHover,color:e.primaryColor},{background:e.colorPrimaryActive,color:e.primaryColor})),Co(e,e.colorLink,"link",{color:e.colorLinkHover,background:e.linkHoverBg},{color:e.colorLinkActive})),vg=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const{componentCls:n,controlHeight:r,fontSize:o,borderRadius:i,buttonPaddingHorizontal:a,iconCls:s,buttonPaddingVertical:l,buttonIconOnlyFontSize:c}=e;return[{[t]:{fontSize:o,height:r,padding:`${oe(l)} ${oe(a)}`,borderRadius:i,[`&${n}-icon-only`]:{width:r,[s]:{fontSize:c}}}},{[`${n}${n}-circle${t}`]:LL(e)},{[`${n}${n}-round${t}`]:jL(e)}]},XL=e=>{const t=Xt(e,{fontSize:e.contentFontSize});return vg(t,e.componentCls)},YL=e=>{const t=Xt(e,{controlHeight:e.controlHeightSM,fontSize:e.contentFontSizeSM,padding:e.paddingXS,buttonPaddingHorizontal:e.paddingInlineSM,buttonPaddingVertical:0,borderRadius:e.borderRadiusSM,buttonIconOnlyFontSize:e.onlyIconSizeSM});return vg(t,`${e.componentCls}-sm`)},JL=e=>{const t=Xt(e,{controlHeight:e.controlHeightLG,fontSize:e.contentFontSizeLG,buttonPaddingHorizontal:e.paddingInlineLG,buttonPaddingVertical:0,borderRadius:e.borderRadiusLG,buttonIconOnlyFontSize:e.onlyIconSizeLG});return vg(t,`${e.componentCls}-lg`)},QL=e=>{const{componentCls:t}=e;return{[t]:{[`&${t}-block`]:{width:"100%"}}}},ZL=yn("Button",e=>{const t=Fw(e);return[_L(t),XL(t),YL(t),JL(t),QL(t),KL(t),GL(t),M_(t)]},Hw,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}});function ej(e,t,n){const{focusElCls:r,focus:o,borderElCls:i}=n,a=i?"> *":"",s=["hover",o?"focus":null,"active"].filter(Boolean).map(l=>`&:${l} ${a}`).join(",");return{[`&-item:not(${t}-last-item)`]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal()},"&-item":Object.assign(Object.assign({[s]:{zIndex:2}},r?{[`&${r}`]:{zIndex:2}}:{}),{[`&[disabled] ${a}`]:{zIndex:0}})}}function tj(e,t,n){const{borderElCls:r}=n,o=r?`> ${r}`:"";return{[`&-item:not(${t}-first-item):not(${t}-last-item) ${o}`]:{borderRadius:0},[`&-item:not(${t}-last-item)${t}-first-item`]:{[`& ${o}, &${e}-sm ${o}, &${e}-lg ${o}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${t}-first-item)${t}-last-item`]:{[`& ${o}, &${e}-sm ${o}, &${e}-lg ${o}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function Rl(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{focus:!0};const{componentCls:n}=e,r=`${n}-compact`;return{[r]:Object.assign(Object.assign({},ej(e,r,t)),tj(n,r,t))}}function nj(e,t){return{[`&-item:not(${t}-last-item)`]:{marginBottom:e.calc(e.lineWidth).mul(-1).equal()},"&-item":{"&:hover,&:focus,&:active":{zIndex:2},"&[disabled]":{zIndex:0}}}}function rj(e,t){return{[`&-item:not(${t}-first-item):not(${t}-last-item)`]:{borderRadius:0},[`&-item${t}-first-item:not(${t}-last-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${t}-last-item:not(${t}-first-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}}function oj(e){const t=`${e.componentCls}-compact-vertical`;return{[t]:Object.assign(Object.assign({},nj(e,t)),rj(e.componentCls,t))}}const ij=e=>{const{componentCls:t,colorPrimaryHover:n,lineWidth:r,calc:o}=e,i=o(r).mul(-1).equal(),a=s=>{const l=`${t}-compact${s?"-vertical":""}-item${t}-primary:not([disabled])`;return{[`${l} + ${l}::before`]:{position:"absolute",top:s?i:0,insetInlineStart:s?0:i,backgroundColor:n,content:'""',width:s?"100%":r,height:s?r:"100%"}}};return Object.assign(Object.assign({},a()),a(!0))},aj=J1(["Button","compact"],e=>{const t=Fw(e);return[Rl(t),oj(t),ij(t)]},Hw);var sj=function(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 lj(e){if(typeof e=="object"&&e){let t=e==null?void 0:e.delay;return t=!Number.isNaN(t)&&typeof t=="number"?t:0,{loading:t<=0,delay:t}}return{loading:!!e,delay:0}}const cj={default:["default","outlined"],primary:["primary","solid"],dashed:["default","dashed"],link:["link","link"],text:["default","text"]},uj=O.forwardRef((e,t)=>{var n,r;const{loading:o=!1,prefixCls:i,color:a,variant:s,type:l,danger:c=!1,shape:u="default",size:d,styles:f,disabled:h,className:m,rootClassName:v,children:g,icon:y,iconPosition:b="start",ghost:C=!1,block:x=!1,htmlType:S="button",classNames:w,style:E={},autoInsertSpace:N,autoFocus:$}=e,M=sj(e,["loading","prefixCls","color","variant","type","danger","shape","size","styles","disabled","className","rootClassName","children","icon","iconPosition","ghost","block","htmlType","classNames","style","autoInsertSpace","autoFocus"]),R=l||"default",[k,D]=O.useMemo(()=>{if(a&&s)return[a,s];const _e=cj[R]||[];return c?["danger",_e[1]]:_e},[l,a,s,c]),L=k==="danger"?"dangerous":k,{getPrefixCls:T,direction:I,autoInsertSpace:_,className:W,style:H,classNames:B,styles:K}=Rr("button"),Y=(n=N??_)!==null&&n!==void 0?n:!0,V=T("btn",i),[G,Q,ce]=ZL(V),Z=O.useContext(Fr),he=h??Z,ye=O.useContext($w),fe=O.useMemo(()=>lj(o),[o]),[ae,ve]=O.useState(fe.loading),[ne,se]=O.useState(!1),pe=O.useRef(null),Ne=xi(t,pe),Me=O.Children.count(g)===1&&!y&&!uc(D),$e=O.useRef(!0);O.useEffect(()=>($e.current=!1,()=>{$e.current=!0}),[]),O.useEffect(()=>{let _e=null;fe.delay>0?_e=setTimeout(()=>{_e=null,ve(!0)},fe.delay):ve(fe.loading);function We(){_e&&(clearTimeout(_e),_e=null)}return We},[fe]),O.useEffect(()=>{if(!pe.current||!Y)return;const _e=pe.current.textContent||"";Me&&Mp(_e)?ne||se(!0):ne&&se(!1)}),O.useEffect(()=>{$&&pe.current&&pe.current.focus()},[]);const Be=O.useCallback(_e=>{var We;if(ae||he){_e.preventDefault();return}(We=e.onClick)===null||We===void 0||We.call(e,("href"in e,_e))},[e.onClick,ae,he]);if(process.env.NODE_ENV!=="production"){const _e=fn("Button");process.env.NODE_ENV!=="production"&&_e(!(typeof y=="string"&&y.length>2),"breaking",`\`icon\` is using ReactNode instead of string naming in v4. Please check \`${y}\` at https://ant.design/components/icon`),process.env.NODE_ENV!=="production"&&_e(!(C&&uc(D)),"usage","`link` or `text` button can't be a `ghost` button.")}const{compactSize:F,compactItemClassnames:be}=Ei(V,I),ue={large:"lg",small:"sm",middle:void 0},me=Vr(_e=>{var We,rt;return(rt=(We=d??F)!==null&&We!==void 0?We:ye)!==null&&rt!==void 0?rt:_e}),Re=me&&(r=ue[me])!==null&&r!==void 0?r:"",Te=ae?"loading":y,xe=Hn(M,["navigate"]),Ve=te(V,Q,ce,{[`${V}-${u}`]:u!=="default"&&u,[`${V}-${R}`]:R,[`${V}-dangerous`]:c,[`${V}-color-${L}`]:L,[`${V}-variant-${D}`]:D,[`${V}-${Re}`]:Re,[`${V}-icon-only`]:!g&&g!==0&&!!Te,[`${V}-background-ghost`]:C&&!uc(D),[`${V}-loading`]:ae,[`${V}-two-chinese-chars`]:ne&&Y&&!ae,[`${V}-block`]:x,[`${V}-rtl`]:I==="rtl",[`${V}-icon-end`]:b==="end"},be,m,v,W),qe=Object.assign(Object.assign({},H),E),Pe=te(w==null?void 0:w.icon,B.icon),Ke=Object.assign(Object.assign({},(f==null?void 0:f.icon)||{}),K.icon||{}),Je=y&&!ae?O.createElement(Rp,{prefixCls:V,className:Pe,style:Ke},y):o&&typeof o=="object"&&o.icon?O.createElement(Rp,{prefixCls:V,className:Pe,style:Ke},o.icon):O.createElement(N_,{existIcon:!!y,prefixCls:V,loading:ae,mount:$e.current}),De=g||g===0?$_(g,Me&&Y):null;if(xe.href!==void 0)return G(O.createElement("a",Object.assign({},xe,{className:te(Ve,{[`${V}-disabled`]:he}),href:he?void 0:xe.href,style:qe,onClick:Be,ref:Ne,tabIndex:he?-1:0}),Je,De));let ze=O.createElement("button",Object.assign({},M,{type:S,className:Ve,style:qe,onClick:Be,disabled:he,ref:Ne}),Je,De,be&&O.createElement(aj,{prefixCls:V}));return uc(D)||(ze=O.createElement(cg,{component:"Button",disabled:ae},ze)),G(ze)}),Lo=uj;Lo.Group=E_;Lo.__ANT_BUTTON=!0;process.env.NODE_ENV!=="production"&&(Lo.displayName="Button");function qf(e){return!!(e!=null&&e.then)}const Ww=e=>{const{type:t,children:n,prefixCls:r,buttonProps:o,close:i,autoFocus:a,emitEvent:s,isSilent:l,quitOnNullishReturnValue:c,actionFn:u}=e,d=p.useRef(!1),f=p.useRef(null),[h,m]=qa(!1),v=function(){i==null||i.apply(void 0,arguments)};p.useEffect(()=>{let b=null;return a&&(b=setTimeout(()=>{var C;(C=f.current)===null||C===void 0||C.focus({preventScroll:!0})})),()=>{b&&clearTimeout(b)}},[]);const g=b=>{qf(b)&&(m(!0),b.then(function(){m(!1,!0),v.apply(void 0,arguments),d.current=!1},C=>{if(m(!1,!0),d.current=!1,!(l!=null&&l()))return Promise.reject(C)}))},y=b=>{if(d.current)return;if(d.current=!0,!u){v();return}let C;if(s){if(C=u(b),c&&!qf(C)){d.current=!1,v(b);return}}else if(u.length)C=u(i),d.current=!1;else if(C=u(),!qf(C)){v();return}g(C)};return p.createElement(Lo,Object.assign({},Nw(t),{onClick:y,loading:h,prefixCls:r},o,{ref:f}),n)},Il=O.createContext({}),{Provider:Uw}=Il,_0=()=>{const{autoFocusButton:e,cancelButtonProps:t,cancelTextLocale:n,isSilent:r,mergedOkCancel:o,rootPrefixCls:i,close:a,onCancel:s,onConfirm:l}=O.useContext(Il);return o?O.createElement(Ww,{isSilent:r,actionFn:s,close:function(){a==null||a.apply(void 0,arguments),l==null||l(!1)},autoFocus:e==="cancel",buttonProps:t,prefixCls:`${i}-btn`},n):null},L0=()=>{const{autoFocusButton:e,close:t,isSilent:n,okButtonProps:r,rootPrefixCls:o,okTextLocale:i,okType:a,onConfirm:s,onOk:l}=O.useContext(Il);return O.createElement(Ww,{isSilent:n,type:a||"primary",actionFn:l,close:function(){t==null||t.apply(void 0,arguments),s==null||s(!0)},autoFocus:e==="ok",buttonProps:r,prefixCls:`${o}-btn`},i)};var qw=p.createContext(null),j0=[];function dj(e,t){var n=p.useState(function(){if(!or())return null;var m=document.createElement("div");return process.env.NODE_ENV!=="production"&&t&&m.setAttribute("data-debug",t),m}),r=de(n,1),o=r[0],i=p.useRef(!1),a=p.useContext(qw),s=p.useState(j0),l=de(s,2),c=l[0],u=l[1],d=a||(i.current?void 0:function(m){u(function(v){var g=[m].concat(Le(v));return g})});function f(){o.parentElement||document.body.appendChild(o),i.current=!0}function h(){var m;(m=o.parentElement)===null||m===void 0||m.removeChild(o),i.current=!1}return cn(function(){return e?a?a(f):f():h(),h},[e]),cn(function(){c.length&&(c.forEach(function(m){return m()}),u(j0))},[c]),[o,d]}function fj(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"),l=parseInt(s.width,10),c=parseInt(s.height,10);try{var u=l?"width: ".concat(s.width,";"):"",d=c?"height: ".concat(s.height,";"):"";_o(`
322
+ #`.concat(t,`::-webkit-scrollbar {
323
+ `).concat(u,`
324
+ `).concat(d,`
325
+ }`),t)}catch(m){console.error(m),o=l,i=c}}document.body.appendChild(n);var f=e&&o&&!isNaN(o)?o:n.offsetWidth-n.clientWidth,h=e&&i&&!isNaN(i)?i:n.offsetHeight-n.clientHeight;return document.body.removeChild(n),ol(t),{width:f,height:h}}function hj(e){return typeof document>"u"||!e||!(e instanceof Element)?{width:0,height:0}:fj(e)}function pj(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var mj="rc-util-locker-".concat(Date.now()),B0=0;function gj(e){var t=!!e,n=p.useState(function(){return B0+=1,"".concat(mj,"_").concat(B0)}),r=de(n,1),o=r[0];cn(function(){if(t){var i=hj(document.body).width,a=pj();_o(`
326
+ html body {
327
+ overflow-y: hidden;
328
+ `.concat(a?"width: calc(100% - ".concat(i,"px);"):"",`
329
+ }`),o)}else ol(o);return function(){ol(o)}},[t,o])}var vj=!1;function bj(e){return vj}var z0=function(t){return t===!1?!1:!or()||!t?null:typeof t=="string"?document.querySelector(t):typeof t=="function"?t():t},Rd=p.forwardRef(function(e,t){var n=e.open,r=e.autoLock,o=e.getContainer,i=e.debug,a=e.autoDestroy,s=a===void 0?!0:a,l=e.children,c=p.useState(n),u=de(c,2),d=u[0],f=u[1],h=d||n;process.env.NODE_ENV!=="production"&&Ot(or()||!n,"Portal only work in client side. Please call 'useEffect' to show Portal instead default render in SSR."),p.useEffect(function(){(s||n)&&f(n)},[n,s]);var m=p.useState(function(){return z0(o)}),v=de(m,2),g=v[0],y=v[1];p.useEffect(function(){var k=z0(o);y(k??null)});var b=dj(h&&!g,i),C=de(b,2),x=C[0],S=C[1],w=g??x;gj(r&&n&&or()&&(w===x||w===document.body));var E=null;if(l&&wi(l)&&t){var N=l;E=N.ref}var $=xi(E,t);if(!h||!or()||g===void 0)return null;var M=w===!1||bj(),R=l;return t&&(R=p.cloneElement(l,{ref:$})),p.createElement(qw.Provider,{value:S},M?R:jr.createPortal(R,w))});process.env.NODE_ENV!=="production"&&(Rd.displayName="Portal");var Kw=p.createContext({});function yj(){var e=q({},p);return e.useId}var F0=0,H0=yj();const Tl=H0?function(t){var n=H0();return t||(process.env.NODE_ENV==="test"?"test-id":n)}:function(t){var n=p.useState("ssr-id"),r=de(n,2),o=r[0],i=r[1];return p.useEffect(function(){var a=F0;F0+=1,i("rc_unique_".concat(a))},[]),t||(process.env.NODE_ENV==="test"?"test-id":o)};function V0(e,t,n){var r=t;return!r&&n&&(r="".concat(e,"-").concat(n)),r}function W0(e,t){var n=e["page".concat(t?"Y":"X","Offset")],r="scroll".concat(t?"Top":"Left");if(typeof n!="number"){var o=e.document;n=o.documentElement[r],typeof n!="number"&&(n=o.body[r])}return n}function Cj(e){var t=e.getBoundingClientRect(),n={left:t.left,top:t.top},r=e.ownerDocument,o=r.defaultView||r.parentWindow;return n.left+=W0(o),n.top+=W0(o,!0),n}const Sj=p.memo(function(e){var t=e.children;return t},function(e,t){var n=t.shouldUpdate;return!n});var xj={width:0,height:0,overflow:"hidden",outline:"none"},wj={outline:"none"},bg=O.forwardRef(function(e,t){var n=e.prefixCls,r=e.className,o=e.style,i=e.title,a=e.ariaId,s=e.footer,l=e.closable,c=e.closeIcon,u=e.onClose,d=e.children,f=e.bodyStyle,h=e.bodyProps,m=e.modalRender,v=e.onMouseDown,g=e.onMouseUp,y=e.holderRef,b=e.visible,C=e.forceRender,x=e.width,S=e.height,w=e.classNames,E=e.styles,N=O.useContext(Kw),$=N.panel,M=xi(y,$),R=O.useRef(),k=O.useRef();O.useImperativeHandle(t,function(){return{focus:function(){var K;(K=R.current)===null||K===void 0||K.focus({preventScroll:!0})},changeActive:function(K){var Y=document,V=Y.activeElement;K&&V===k.current?R.current.focus({preventScroll:!0}):!K&&V===R.current&&k.current.focus({preventScroll:!0})}}});var D={};x!==void 0&&(D.width=x),S!==void 0&&(D.height=S);var A=s?O.createElement("div",{className:te("".concat(n,"-footer"),w==null?void 0:w.footer),style:q({},E==null?void 0:E.footer)},s):null,L=i?O.createElement("div",{className:te("".concat(n,"-header"),w==null?void 0:w.header),style:q({},E==null?void 0:E.header)},O.createElement("div",{className:"".concat(n,"-title"),id:a},i)):null,T=O.useMemo(function(){return ht(l)==="object"&&l!==null?l:l?{closeIcon:c??O.createElement("span",{className:"".concat(n,"-close-x")})}:{}},[l,c,n]),I=eo(T,!0),_=ht(l)==="object"&&l.disabled,W=l?O.createElement("button",He({type:"button",onClick:u,"aria-label":"Close"},I,{className:"".concat(n,"-close"),disabled:_}),T.closeIcon):null,H=O.createElement("div",{className:te("".concat(n,"-content"),w==null?void 0:w.content),style:E==null?void 0:E.content},W,L,O.createElement("div",He({className:te("".concat(n,"-body"),w==null?void 0:w.body),style:q(q({},f),E==null?void 0:E.body)},h),d),A);return O.createElement("div",{key:"dialog-element",role:"dialog","aria-labelledby":i?a:null,"aria-modal":"true",ref:M,style:q(q({},o),D),className:te(n,r),onMouseDown:v,onMouseUp:g},O.createElement("div",{ref:R,tabIndex:0,style:wj},O.createElement(Sj,{shouldUpdate:b||C},m?m(H):H)),O.createElement("div",{tabIndex:0,ref:k,style:xj}))});process.env.NODE_ENV!=="production"&&(bg.displayName="Panel");var Gw=p.forwardRef(function(e,t){var n=e.prefixCls,r=e.title,o=e.style,i=e.className,a=e.visible,s=e.forceRender,l=e.destroyOnClose,c=e.motionName,u=e.ariaId,d=e.onVisibleChanged,f=e.mousePosition,h=O.useRef(),m=p.useState(),v=de(m,2),g=v[0],y=v[1],b={};g&&(b.transformOrigin=g);function C(){var x=Cj(h.current);y(f&&(f.x||f.y)?"".concat(f.x-x.left,"px ").concat(f.y-x.top,"px"):"")}return p.createElement(So,{visible:a,onVisibleChanged:d,onAppearPrepare:C,onEnterPrepare:C,forceRender:s,motionName:c,removeOnLeave:l,ref:h},function(x,S){var w=x.className,E=x.style;return p.createElement(bg,He({},e,{ref:t,title:r,ariaId:u,prefixCls:n,holderRef:S,style:q(q(q({},E),o),b),className:te(i,w)}))})});Gw.displayName="Content";var Ej=function(t){var n=t.prefixCls,r=t.style,o=t.visible,i=t.maskProps,a=t.motionName,s=t.className;return p.createElement(So,{key:"mask",visible:o,motionName:a,leavedClassName:"".concat(n,"-mask-hidden")},function(l,c){var u=l.className,d=l.style;return p.createElement("div",He({ref:c,style:q(q({},d),r),className:te("".concat(n,"-mask"),u,s)},i))})},Oj=function(t){var n=t.prefixCls,r=n===void 0?"rc-dialog":n,o=t.zIndex,i=t.visible,a=i===void 0?!1:i,s=t.keyboard,l=s===void 0?!0:s,c=t.focusTriggerAfterClose,u=c===void 0?!0:c,d=t.wrapStyle,f=t.wrapClassName,h=t.wrapProps,m=t.onClose,v=t.afterOpenChange,g=t.afterClose,y=t.transitionName,b=t.animation,C=t.closable,x=C===void 0?!0:C,S=t.mask,w=S===void 0?!0:S,E=t.maskTransitionName,N=t.maskAnimation,$=t.maskClosable,M=$===void 0?!0:$,R=t.maskStyle,k=t.maskProps,D=t.rootClassName,A=t.classNames,L=t.styles;process.env.NODE_ENV!=="production"&&(["wrapStyle","bodyStyle","maskStyle"].forEach(function(se){yo(!(se in t),"".concat(se," is deprecated, please use styles instead."))}),"wrapClassName"in t&&yo(!1,"wrapClassName is deprecated, please use classNames instead."));var T=O.useRef(),I=O.useRef(),_=O.useRef(),W=p.useState(a),H=de(W,2),B=H[0],K=H[1],Y=Tl();function V(){Jh(I.current,document.activeElement)||(T.current=document.activeElement)}function G(){if(!Jh(I.current,document.activeElement)){var se;(se=_.current)===null||se===void 0||se.focus()}}function Q(se){if(se)G();else{if(K(!1),w&&T.current&&u){try{T.current.focus({preventScroll:!0})}catch{}T.current=null}B&&(g==null||g())}v==null||v(se)}function ce(se){m==null||m(se)}var Z=O.useRef(!1),he=O.useRef(),ye=function(){clearTimeout(he.current),Z.current=!0},fe=function(){he.current=setTimeout(function(){Z.current=!1})},ae=null;M&&(ae=function(pe){Z.current?Z.current=!1:I.current===pe.target&&ce(pe)});function ve(se){if(l&&se.keyCode===at.ESC){se.stopPropagation(),ce(se);return}a&&se.keyCode===at.TAB&&_.current.changeActive(!se.shiftKey)}O.useEffect(function(){a&&(K(!0),V())},[a]),O.useEffect(function(){return function(){clearTimeout(he.current)}},[]);var ne=q(q(q({zIndex:o},d),L==null?void 0:L.wrapper),{},{display:B?null:"none"});return p.createElement("div",He({className:te("".concat(r,"-root"),D)},eo(t,{data:!0})),p.createElement(Ej,{prefixCls:r,visible:w&&a,motionName:V0(r,E,N),style:q(q({zIndex:o},R),L==null?void 0:L.mask),maskProps:k,className:A==null?void 0:A.mask}),p.createElement("div",He({tabIndex:-1,onKeyDown:ve,className:te("".concat(r,"-wrap"),f,A==null?void 0:A.wrapper),ref:I,onClick:ae,style:ne},h),p.createElement(Gw,He({},t,{onMouseDown:ye,onMouseUp:fe,ref:_,closable:x,ariaId:Y,prefixCls:r,visible:a&&B,onClose:ce,onVisibleChanged:Q,motionName:V0(r,y,b)}))))},Xw=function(t){var n=t.visible,r=t.getContainer,o=t.forceRender,i=t.destroyOnClose,a=i===void 0?!1:i,s=t.afterClose,l=t.panelRef,c=p.useState(n),u=de(c,2),d=u[0],f=u[1],h=p.useMemo(function(){return{panel:l}},[l]);return p.useEffect(function(){n&&f(!0)},[n]),!o&&a&&!d?null:p.createElement(Kw.Provider,{value:h},p.createElement(Rd,{open:n||o||d,autoDestroy:!1,getContainer:r,autoLock:n||d},p.createElement(Oj,He({},t,{destroyOnClose:a,afterClose:function(){s==null||s(),f(!1)}}))))};Xw.displayName="Dialog";var _i="RC_FORM_INTERNAL_HOOKS",un=function(){Ot(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},Xa=p.createContext({getFieldValue:un,getFieldsValue:un,getFieldError:un,getFieldWarning:un,getFieldsError:un,isFieldsTouched:un,isFieldTouched:un,isFieldValidating:un,isFieldsValidating:un,resetFields:un,setFields:un,setFieldValue:un,setFieldsValue:un,validateFields:un,submit:un,getInternalHooks:function(){return un(),{dispatch:un,initEntityValue:un,registerField:un,useSubscribe:un,setInitialValues:un,destroyForm:un,setCallbacks:un,registerWatch:un,getFields:un,setValidateMessages:un,setPreserve:un,getInitialValue:un}}}),mu=p.createContext(null);function Ip(e){return e==null?[]:Array.isArray(e)?e:[e]}function $j(e){return e&&!!e._init}function Tp(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var t=JSON.parse(JSON.stringify(this));return t.clone=this.clone,t}}}var Ap=Tp();function Nj(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch{return typeof e=="function"}}function Mj(e,t,n){if(Ym())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var o=new(e.bind.apply(e,r));return n&&tl(o,n.prototype),o}function Pp(e){var t=typeof Map=="function"?new Map:void 0;return Pp=function(r){if(r===null||!Nj(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(t!==void 0){if(t.has(r))return t.get(r);t.set(r,o)}function o(){return Mj(r,arguments,nl(this).constructor)}return o.prototype=Object.create(r.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),tl(o,r)},Pp(e)}var Rj=/%[sdj%]/g,Yw=function(){};typeof process<"u"&&process.env&&process.env.NODE_ENV!=="production"&&typeof window<"u"&&typeof document<"u"&&(Yw=function(t,n){typeof console<"u"&&console.warn&&typeof ASYNC_VALIDATOR_NO_WARNING>"u"&&n.every(function(r){return typeof r=="string"})&&console.warn(t,n)});function kp(e){if(!e||!e.length)return null;var t={};return e.forEach(function(n){var r=n.field;t[r]=t[r]||[],t[r].push(n)}),t}function Or(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=0,i=n.length;if(typeof e=="function")return e.apply(null,n);if(typeof e=="string"){var a=e.replace(Rj,function(s){if(s==="%%")return"%";if(o>=i)return s;switch(s){case"%s":return String(n[o++]);case"%d":return Number(n[o++]);case"%j":try{return JSON.stringify(n[o++])}catch{return"[Circular]"}break;default:return s}});return a}return e}function Ij(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function Vn(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||Ij(t)&&typeof e=="string"&&!e)}function Tj(e,t,n){var r=[],o=0,i=e.length;function a(s){r.push.apply(r,Le(s||[])),o++,o===i&&n(r)}e.forEach(function(s){t(s,a)})}function U0(e,t,n){var r=0,o=e.length;function i(a){if(a&&a.length){n(a);return}var s=r;r=r+1,s<o?t(e[s],i):n([])}i([])}function Aj(e){var t=[];return Object.keys(e).forEach(function(n){t.push.apply(t,Le(e[n]||[]))}),t}var q0=function(e){Bo(n,e);var t=zo(n);function n(r,o){var i;return Tn(this,n),i=t.call(this,"Async Validation Error"),U(Ft(i),"errors",void 0),U(Ft(i),"fields",void 0),i.errors=r,i.fields=o,i}return An(n)}(Pp(Error));function Pj(e,t,n,r,o){if(t.first){var i=new Promise(function(f,h){var m=function(y){return r(y),y.length?h(new q0(y,kp(y))):f(o)},v=Aj(e);U0(v,n,m)});return i.catch(function(f){return f}),i}var a=t.firstFields===!0?Object.keys(e):t.firstFields||[],s=Object.keys(e),l=s.length,c=0,u=[],d=new Promise(function(f,h){var m=function(g){if(u.push.apply(u,g),c++,c===l)return r(u),u.length?h(new q0(u,kp(u))):f(o)};s.length||(r(u),f(o)),s.forEach(function(v){var g=e[v];a.indexOf(v)!==-1?U0(g,n,m):Tj(g,n,m)})});return d.catch(function(f){return f}),d}function kj(e){return!!(e&&e.message!==void 0)}function Dj(e,t){for(var n=e,r=0;r<t.length;r++){if(n==null)return n;n=n[t[r]]}return n}function K0(e,t){return function(n){var r;return e.fullFields?r=Dj(t,e.fullFields):r=t[n.field||e.fullField],kj(n)?(n.field=n.field||e.fullField,n.fieldValue=r,n):{message:typeof n=="function"?n():n,fieldValue:r,field:n.field||e.fullField}}}function G0(e,t){if(t){for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];ht(r)==="object"&&ht(e[n])==="object"?e[n]=q(q({},e[n]),r):e[n]=r}}return e}var da="enum",_j=function(t,n,r,o,i){t[da]=Array.isArray(t[da])?t[da]:[],t[da].indexOf(n)===-1&&o.push(Or(i.messages[da],t.fullField,t[da].join(", ")))},Lj=function(t,n,r,o,i){if(t.pattern){if(t.pattern instanceof RegExp)t.pattern.lastIndex=0,t.pattern.test(n)||o.push(Or(i.messages.pattern.mismatch,t.fullField,n,t.pattern));else if(typeof t.pattern=="string"){var a=new RegExp(t.pattern);a.test(n)||o.push(Or(i.messages.pattern.mismatch,t.fullField,n,t.pattern))}}},jj=function(t,n,r,o,i){var a=typeof t.len=="number",s=typeof t.min=="number",l=typeof t.max=="number",c=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,u=n,d=null,f=typeof n=="number",h=typeof n=="string",m=Array.isArray(n);if(f?d="number":h?d="string":m&&(d="array"),!d)return!1;m&&(u=n.length),h&&(u=n.replace(c,"_").length),a?u!==t.len&&o.push(Or(i.messages[d].len,t.fullField,t.len)):s&&!l&&u<t.min?o.push(Or(i.messages[d].min,t.fullField,t.min)):l&&!s&&u>t.max?o.push(Or(i.messages[d].max,t.fullField,t.max)):s&&l&&(u<t.min||u>t.max)&&o.push(Or(i.messages[d].range,t.fullField,t.min,t.max))},Jw=function(t,n,r,o,i,a){t.required&&(!r.hasOwnProperty(t.field)||Vn(n,a||t.type))&&o.push(Or(i.messages.required,t.fullField))},dc;const Bj=function(){if(dc)return dc;var e="[a-fA-F\\d:]",t=function(w){return w&&w.includeBoundaries?"(?:(?<=\\s|^)(?=".concat(e,")|(?<=").concat(e,")(?=\\s|$))"):""},n="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",r="[a-fA-F\\d]{1,4}",o=["(?:".concat(r,":){7}(?:").concat(r,"|:)"),"(?:".concat(r,":){6}(?:").concat(n,"|:").concat(r,"|:)"),"(?:".concat(r,":){5}(?::").concat(n,"|(?::").concat(r,"){1,2}|:)"),"(?:".concat(r,":){4}(?:(?::").concat(r,"){0,1}:").concat(n,"|(?::").concat(r,"){1,3}|:)"),"(?:".concat(r,":){3}(?:(?::").concat(r,"){0,2}:").concat(n,"|(?::").concat(r,"){1,4}|:)"),"(?:".concat(r,":){2}(?:(?::").concat(r,"){0,3}:").concat(n,"|(?::").concat(r,"){1,5}|:)"),"(?:".concat(r,":){1}(?:(?::").concat(r,"){0,4}:").concat(n,"|(?::").concat(r,"){1,6}|:)"),"(?::(?:(?::".concat(r,"){0,5}:").concat(n,"|(?::").concat(r,"){1,7}|:))")],i="(?:%[0-9a-zA-Z]{1,})?",a="(?:".concat(o.join("|"),")").concat(i),s=new RegExp("(?:^".concat(n,"$)|(?:^").concat(a,"$)")),l=new RegExp("^".concat(n,"$")),c=new RegExp("^".concat(a,"$")),u=function(w){return w&&w.exact?s:new RegExp("(?:".concat(t(w)).concat(n).concat(t(w),")|(?:").concat(t(w)).concat(a).concat(t(w),")"),"g")};u.v4=function(S){return S&&S.exact?l:new RegExp("".concat(t(S)).concat(n).concat(t(S)),"g")},u.v6=function(S){return S&&S.exact?c:new RegExp("".concat(t(S)).concat(a).concat(t(S)),"g")};var d="(?:(?:[a-z]+:)?//)",f="(?:\\S+(?::\\S*)?@)?",h=u.v4().source,m=u.v6().source,v="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",g="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",y="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",b="(?::\\d{2,5})?",C='(?:[/?#][^\\s"]*)?',x="(?:".concat(d,"|www\\.)").concat(f,"(?:localhost|").concat(h,"|").concat(m,"|").concat(v).concat(g).concat(y,")").concat(b).concat(C);return dc=new RegExp("(?:^".concat(x,"$)"),"i"),dc};var X0={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},Ms={integer:function(t){return Ms.number(t)&&parseInt(t,10)===t},float:function(t){return Ms.number(t)&&!Ms.integer(t)},array:function(t){return Array.isArray(t)},regexp:function(t){if(t instanceof RegExp)return!0;try{return!!new RegExp(t)}catch{return!1}},date:function(t){return typeof t.getTime=="function"&&typeof t.getMonth=="function"&&typeof t.getYear=="function"&&!isNaN(t.getTime())},number:function(t){return isNaN(t)?!1:typeof t=="number"},object:function(t){return ht(t)==="object"&&!Ms.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&t.length<=320&&!!t.match(X0.email)},url:function(t){return typeof t=="string"&&t.length<=2048&&!!t.match(Bj())},hex:function(t){return typeof t=="string"&&!!t.match(X0.hex)}},zj=function(t,n,r,o,i){if(t.required&&n===void 0){Jw(t,n,r,o,i);return}var a=["integer","float","array","regexp","object","method","email","number","date","url","hex"],s=t.type;a.indexOf(s)>-1?Ms[s](n)||o.push(Or(i.messages.types[s],t.fullField,t.type)):s&&ht(n)!==t.type&&o.push(Or(i.messages.types[s],t.fullField,t.type))},Fj=function(t,n,r,o,i){(/^\s+$/.test(n)||n==="")&&o.push(Or(i.messages.whitespace,t.fullField))};const Ut={required:Jw,whitespace:Fj,type:zj,range:jj,enum:_j,pattern:Lj};var Hj=function(t,n,r,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(Vn(n)&&!t.required)return r();Ut.required(t,n,o,a,i)}r(a)},Vj=function(t,n,r,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(n==null&&!t.required)return r();Ut.required(t,n,o,a,i,"array"),n!=null&&(Ut.type(t,n,o,a,i),Ut.range(t,n,o,a,i))}r(a)},Wj=function(t,n,r,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(Vn(n)&&!t.required)return r();Ut.required(t,n,o,a,i),n!==void 0&&Ut.type(t,n,o,a,i)}r(a)},Uj=function(t,n,r,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(Vn(n,"date")&&!t.required)return r();if(Ut.required(t,n,o,a,i),!Vn(n,"date")){var l;n instanceof Date?l=n:l=new Date(n),Ut.type(t,l,o,a,i),l&&Ut.range(t,l.getTime(),o,a,i)}}r(a)},qj="enum",Kj=function(t,n,r,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(Vn(n)&&!t.required)return r();Ut.required(t,n,o,a,i),n!==void 0&&Ut[qj](t,n,o,a,i)}r(a)},Gj=function(t,n,r,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(Vn(n)&&!t.required)return r();Ut.required(t,n,o,a,i),n!==void 0&&(Ut.type(t,n,o,a,i),Ut.range(t,n,o,a,i))}r(a)},Xj=function(t,n,r,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(Vn(n)&&!t.required)return r();Ut.required(t,n,o,a,i),n!==void 0&&(Ut.type(t,n,o,a,i),Ut.range(t,n,o,a,i))}r(a)},Yj=function(t,n,r,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(Vn(n)&&!t.required)return r();Ut.required(t,n,o,a,i),n!==void 0&&Ut.type(t,n,o,a,i)}r(a)},Jj=function(t,n,r,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(n===""&&(n=void 0),Vn(n)&&!t.required)return r();Ut.required(t,n,o,a,i),n!==void 0&&(Ut.type(t,n,o,a,i),Ut.range(t,n,o,a,i))}r(a)},Qj=function(t,n,r,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(Vn(n)&&!t.required)return r();Ut.required(t,n,o,a,i),n!==void 0&&Ut.type(t,n,o,a,i)}r(a)},Zj=function(t,n,r,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(Vn(n,"string")&&!t.required)return r();Ut.required(t,n,o,a,i),Vn(n,"string")||Ut.pattern(t,n,o,a,i)}r(a)},eB=function(t,n,r,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(Vn(n)&&!t.required)return r();Ut.required(t,n,o,a,i),Vn(n)||Ut.type(t,n,o,a,i)}r(a)},tB=function(t,n,r,o,i){var a=[],s=Array.isArray(n)?"array":ht(n);Ut.required(t,n,o,a,i,s),r(a)},nB=function(t,n,r,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(Vn(n,"string")&&!t.required)return r();Ut.required(t,n,o,a,i,"string"),Vn(n,"string")||(Ut.type(t,n,o,a,i),Ut.range(t,n,o,a,i),Ut.pattern(t,n,o,a,i),t.whitespace===!0&&Ut.whitespace(t,n,o,a,i))}r(a)},Kf=function(t,n,r,o,i){var a=t.type,s=[],l=t.required||!t.required&&o.hasOwnProperty(t.field);if(l){if(Vn(n,a)&&!t.required)return r();Ut.required(t,n,o,s,i,a),Vn(n,a)||Ut.type(t,n,o,s,i)}r(s)};const js={string:nB,method:Yj,number:Jj,boolean:Wj,regexp:eB,integer:Xj,float:Gj,array:Vj,object:Qj,enum:Kj,pattern:Zj,date:Uj,url:Kf,hex:Kf,email:Kf,required:tB,any:Hj};var Al=function(){function e(t){Tn(this,e),U(this,"rules",null),U(this,"_messages",Ap),this.define(t)}return An(e,[{key:"define",value:function(n){var r=this;if(!n)throw new Error("Cannot configure a schema with no rules");if(ht(n)!=="object"||Array.isArray(n))throw new Error("Rules must be an object");this.rules={},Object.keys(n).forEach(function(o){var i=n[o];r.rules[o]=Array.isArray(i)?i:[i]})}},{key:"messages",value:function(n){return n&&(this._messages=G0(Tp(),n)),this._messages}},{key:"validate",value:function(n){var r=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},a=n,s=o,l=i;if(typeof s=="function"&&(l=s,s={}),!this.rules||Object.keys(this.rules).length===0)return l&&l(null,a),Promise.resolve(a);function c(m){var v=[],g={};function y(C){if(Array.isArray(C)){var x;v=(x=v).concat.apply(x,Le(C))}else v.push(C)}for(var b=0;b<m.length;b++)y(m[b]);v.length?(g=kp(v),l(v,g)):l(null,a)}if(s.messages){var u=this.messages();u===Ap&&(u=Tp()),G0(u,s.messages),s.messages=u}else s.messages=this.messages();var d={},f=s.keys||Object.keys(this.rules);f.forEach(function(m){var v=r.rules[m],g=a[m];v.forEach(function(y){var b=y;typeof b.transform=="function"&&(a===n&&(a=q({},a)),g=a[m]=b.transform(g),g!=null&&(b.type=b.type||(Array.isArray(g)?"array":ht(g)))),typeof b=="function"?b={validator:b}:b=q({},b),b.validator=r.getValidationMethod(b),b.validator&&(b.field=m,b.fullField=b.fullField||m,b.type=r.getType(b),d[m]=d[m]||[],d[m].push({rule:b,value:g,source:a,field:m}))})});var h={};return Pj(d,s,function(m,v){var g=m.rule,y=(g.type==="object"||g.type==="array")&&(ht(g.fields)==="object"||ht(g.defaultField)==="object");y=y&&(g.required||!g.required&&m.value),g.field=m.field;function b(E,N){return q(q({},N),{},{fullField:"".concat(g.fullField,".").concat(E),fullFields:g.fullFields?[].concat(Le(g.fullFields),[E]):[E]})}function C(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],N=Array.isArray(E)?E:[E];!s.suppressWarning&&N.length&&e.warning("async-validator:",N),N.length&&g.message!==void 0&&(N=[].concat(g.message));var $=N.map(K0(g,a));if(s.first&&$.length)return h[g.field]=1,v($);if(!y)v($);else{if(g.required&&!m.value)return g.message!==void 0?$=[].concat(g.message).map(K0(g,a)):s.error&&($=[s.error(g,Or(s.messages.required,g.field))]),v($);var M={};g.defaultField&&Object.keys(m.value).map(function(D){M[D]=g.defaultField}),M=q(q({},M),m.rule.fields);var R={};Object.keys(M).forEach(function(D){var A=M[D],L=Array.isArray(A)?A:[A];R[D]=L.map(b.bind(null,D))});var k=new e(R);k.messages(s.messages),m.rule.options&&(m.rule.options.messages=s.messages,m.rule.options.error=s.error),k.validate(m.value,m.rule.options||s,function(D){var A=[];$&&$.length&&A.push.apply(A,Le($)),D&&D.length&&A.push.apply(A,Le(D)),v(A.length?A:null)})}}var x;if(g.asyncValidator)x=g.asyncValidator(g,m.value,C,m.source,s);else if(g.validator){try{x=g.validator(g,m.value,C,m.source,s)}catch(E){var S,w;(S=(w=console).error)===null||S===void 0||S.call(w,E),s.suppressValidatorError||setTimeout(function(){throw E},0),C(E.message)}x===!0?C():x===!1?C(typeof g.message=="function"?g.message(g.fullField||g.field):g.message||"".concat(g.fullField||g.field," fails")):x instanceof Array?C(x):x instanceof Error&&C(x.message)}x&&x.then&&x.then(function(){return C()},function(E){return C(E)})},function(m){c(m)},a)}},{key:"getType",value:function(n){if(n.type===void 0&&n.pattern instanceof RegExp&&(n.type="pattern"),typeof n.validator!="function"&&n.type&&!js.hasOwnProperty(n.type))throw new Error(Or("Unknown rule type %s",n.type));return n.type||"string"}},{key:"getValidationMethod",value:function(n){if(typeof n.validator=="function")return n.validator;var r=Object.keys(n),o=r.indexOf("message");return o!==-1&&r.splice(o,1),r.length===1&&r[0]==="required"?js.required:js[this.getType(n)]||void 0}}]),e}();U(Al,"register",function(t,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");js[t]=n});U(Al,"warning",Yw);U(Al,"messages",Ap);U(Al,"validators",js);var Cr="'${name}' is not a valid ${type}",Qw={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:Cr,method:Cr,array:Cr,object:Cr,number:Cr,date:Cr,boolean:Cr,integer:Cr,float:Cr,regexp:Cr,email:Cr,url:Cr,hex:Cr},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}},Y0=Al;function rB(e,t){return e.replace(/\\?\$\{\w+\}/g,function(n){if(n.startsWith("\\"))return n.slice(1);var r=n.slice(2,-1);return t[r]})}var J0="CODE_LOGIC_ERROR";function Dp(e,t,n,r,o){return _p.apply(this,arguments)}function _p(){return _p=ia(pr().mark(function e(t,n,r,o,i){var a,s,l,c,u,d,f,h,m;return pr().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return a=q({},r),delete a.ruleIndex,Y0.warning=function(){},a.validator&&(s=a.validator,a.validator=function(){try{return s.apply(void 0,arguments)}catch(y){return console.error(y),Promise.reject(J0)}}),l=null,a&&a.type==="array"&&a.defaultField&&(l=a.defaultField,delete a.defaultField),c=new Y0(U({},t,[a])),u=Ea(Qw,o.validateMessages),c.messages(u),d=[],g.prev=10,g.next=13,Promise.resolve(c.validate(U({},t,n),q({},o)));case 13:g.next=18;break;case 15:g.prev=15,g.t0=g.catch(10),g.t0.errors&&(d=g.t0.errors.map(function(y,b){var C=y.message,x=C===J0?u.default:C;return p.isValidElement(x)?p.cloneElement(x,{key:"error_".concat(b)}):x}));case 18:if(!(!d.length&&l)){g.next=23;break}return g.next=21,Promise.all(n.map(function(y,b){return Dp("".concat(t,".").concat(b),y,l,o,i)}));case 21:return f=g.sent,g.abrupt("return",f.reduce(function(y,b){return[].concat(Le(y),Le(b))},[]));case 23:return h=q(q({},r),{},{name:t,enum:(r.enum||[]).join(", ")},i),m=d.map(function(y){return typeof y=="string"?rB(y,h):y}),g.abrupt("return",m);case 26:case"end":return g.stop()}},e,null,[[10,15]])})),_p.apply(this,arguments)}function oB(e,t,n,r,o,i){var a=e.join("."),s=n.map(function(u,d){var f=u.validator,h=q(q({},u),{},{ruleIndex:d});return f&&(h.validator=function(m,v,g){var y=!1,b=function(){for(var S=arguments.length,w=new Array(S),E=0;E<S;E++)w[E]=arguments[E];Promise.resolve().then(function(){Ot(!y,"Your validator function has already return a promise. `callback` will be ignored."),y||g.apply(void 0,w)})},C=f(m,v,b);y=C&&typeof C.then=="function"&&typeof C.catch=="function",Ot(y,"`callback` is deprecated. Please return a promise instead."),y&&C.then(function(){g()}).catch(function(x){g(x||" ")})}),h}).sort(function(u,d){var f=u.warningOnly,h=u.ruleIndex,m=d.warningOnly,v=d.ruleIndex;return!!f==!!m?h-v:f?1:-1}),l;if(o===!0)l=new Promise(function(){var u=ia(pr().mark(function d(f,h){var m,v,g;return pr().wrap(function(b){for(;;)switch(b.prev=b.next){case 0:m=0;case 1:if(!(m<s.length)){b.next=12;break}return v=s[m],b.next=5,Dp(a,t,v,r,i);case 5:if(g=b.sent,!g.length){b.next=9;break}return h([{errors:g,rule:v}]),b.abrupt("return");case 9:m+=1,b.next=1;break;case 12:f([]);case 13:case"end":return b.stop()}},d)}));return function(d,f){return u.apply(this,arguments)}}());else{var c=s.map(function(u){return Dp(a,t,u,r,i).then(function(d){return{errors:d,rule:u}})});l=(o?aB(c):iB(c)).then(function(u){return Promise.reject(u)})}return l.catch(function(u){return u}),l}function iB(e){return Lp.apply(this,arguments)}function Lp(){return Lp=ia(pr().mark(function e(t){return pr().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",Promise.all(t).then(function(o){var i,a=(i=[]).concat.apply(i,Le(o));return a}));case 1:case"end":return r.stop()}},e)})),Lp.apply(this,arguments)}function aB(e){return jp.apply(this,arguments)}function jp(){return jp=ia(pr().mark(function e(t){var n;return pr().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return n=0,o.abrupt("return",new Promise(function(i){t.forEach(function(a){a.then(function(s){s.errors.length&&i([s]),n+=1,n===t.length&&i([])})})}));case 2:case"end":return o.stop()}},e)})),jp.apply(this,arguments)}function Dn(e){return Ip(e)}function Q0(e,t){var n={};return t.forEach(function(r){var o=mo(e,r);n=Gr(n,r,o)}),n}function Aa(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return e&&e.some(function(r){return Zw(t,r,n)})}function Zw(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return!e||!t||!n&&e.length!==t.length?!1:t.every(function(r,o){return e[o]===r})}function sB(e,t){if(e===t)return!0;if(!e&&t||e&&!t||!e||!t||ht(e)!=="object"||ht(t)!=="object")return!1;var n=Object.keys(e),r=Object.keys(t),o=new Set([].concat(n,r));return Le(o).every(function(i){var a=e[i],s=t[i];return typeof a=="function"&&typeof s=="function"?!0:a===s})}function lB(e){var t=arguments.length<=1?void 0:arguments[1];return t&&t.target&&ht(t.target)==="object"&&e in t.target?t.target[e]:t}function Z0(e,t,n){var r=e.length;if(t<0||t>=r||n<0||n>=r)return e;var o=e[t],i=t-n;return i>0?[].concat(Le(e.slice(0,n)),[o],Le(e.slice(n,t)),Le(e.slice(t+1,r))):i<0?[].concat(Le(e.slice(0,t)),Le(e.slice(t+1,n+1)),[o],Le(e.slice(n+1,r))):e}var cB=["name"],Tr=[];function Gf(e,t,n,r,o,i){return typeof e=="function"?e(t,n,"source"in i?{source:i.source}:{}):r!==o}var yg=function(e){Bo(n,e);var t=zo(n);function n(r){var o;if(Tn(this,n),o=t.call(this,r),U(Ft(o),"state",{resetCount:0}),U(Ft(o),"cancelRegisterFunc",null),U(Ft(o),"mounted",!1),U(Ft(o),"touched",!1),U(Ft(o),"dirty",!1),U(Ft(o),"validatePromise",void 0),U(Ft(o),"prevValidating",void 0),U(Ft(o),"errors",Tr),U(Ft(o),"warnings",Tr),U(Ft(o),"cancelRegister",function(){var l=o.props,c=l.preserve,u=l.isListField,d=l.name;o.cancelRegisterFunc&&o.cancelRegisterFunc(u,c,Dn(d)),o.cancelRegisterFunc=null}),U(Ft(o),"getNamePath",function(){var l=o.props,c=l.name,u=l.fieldContext,d=u.prefixName,f=d===void 0?[]:d;return c!==void 0?[].concat(Le(f),Le(c)):[]}),U(Ft(o),"getRules",function(){var l=o.props,c=l.rules,u=c===void 0?[]:c,d=l.fieldContext;return u.map(function(f){return typeof f=="function"?f(d):f})}),U(Ft(o),"refresh",function(){o.mounted&&o.setState(function(l){var c=l.resetCount;return{resetCount:c+1}})}),U(Ft(o),"metaCache",null),U(Ft(o),"triggerMetaEvent",function(l){var c=o.props.onMetaChange;if(c){var u=q(q({},o.getMeta()),{},{destroy:l});Fa(o.metaCache,u)||c(u),o.metaCache=u}else o.metaCache=null}),U(Ft(o),"onStoreChange",function(l,c,u){var d=o.props,f=d.shouldUpdate,h=d.dependencies,m=h===void 0?[]:h,v=d.onReset,g=u.store,y=o.getNamePath(),b=o.getValue(l),C=o.getValue(g),x=c&&Aa(c,y);switch(u.type==="valueUpdate"&&u.source==="external"&&!Fa(b,C)&&(o.touched=!0,o.dirty=!0,o.validatePromise=null,o.errors=Tr,o.warnings=Tr,o.triggerMetaEvent()),u.type){case"reset":if(!c||x){o.touched=!1,o.dirty=!1,o.validatePromise=void 0,o.errors=Tr,o.warnings=Tr,o.triggerMetaEvent(),v==null||v(),o.refresh();return}break;case"remove":{if(f&&Gf(f,l,g,b,C,u)){o.reRender();return}break}case"setField":{var S=u.data;if(x){"touched"in S&&(o.touched=S.touched),"validating"in S&&!("originRCField"in S)&&(o.validatePromise=S.validating?Promise.resolve([]):null),"errors"in S&&(o.errors=S.errors||Tr),"warnings"in S&&(o.warnings=S.warnings||Tr),o.dirty=!0,o.triggerMetaEvent(),o.reRender();return}else if("value"in S&&Aa(c,y,!0)){o.reRender();return}if(f&&!y.length&&Gf(f,l,g,b,C,u)){o.reRender();return}break}case"dependenciesUpdate":{var w=m.map(Dn);if(w.some(function(E){return Aa(u.relatedFields,E)})){o.reRender();return}break}default:if(x||(!m.length||y.length||f)&&Gf(f,l,g,b,C,u)){o.reRender();return}break}f===!0&&o.reRender()}),U(Ft(o),"validateRules",function(l){var c=o.getNamePath(),u=o.getValue(),d=l||{},f=d.triggerName,h=d.validateOnly,m=h===void 0?!1:h,v=Promise.resolve().then(ia(pr().mark(function g(){var y,b,C,x,S,w,E;return pr().wrap(function($){for(;;)switch($.prev=$.next){case 0:if(o.mounted){$.next=2;break}return $.abrupt("return",[]);case 2:if(y=o.props,b=y.validateFirst,C=b===void 0?!1:b,x=y.messageVariables,S=y.validateDebounce,w=o.getRules(),f&&(w=w.filter(function(M){return M}).filter(function(M){var R=M.validateTrigger;if(!R)return!0;var k=Ip(R);return k.includes(f)})),!(S&&f)){$.next=10;break}return $.next=8,new Promise(function(M){setTimeout(M,S)});case 8:if(o.validatePromise===v){$.next=10;break}return $.abrupt("return",[]);case 10:return E=oB(c,u,w,l,C,x),E.catch(function(M){return M}).then(function(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Tr;if(o.validatePromise===v){var R;o.validatePromise=null;var k=[],D=[];(R=M.forEach)===null||R===void 0||R.call(M,function(A){var L=A.rule.warningOnly,T=A.errors,I=T===void 0?Tr:T;L?D.push.apply(D,Le(I)):k.push.apply(k,Le(I))}),o.errors=k,o.warnings=D,o.triggerMetaEvent(),o.reRender()}}),$.abrupt("return",E);case 13:case"end":return $.stop()}},g)})));return m||(o.validatePromise=v,o.dirty=!0,o.errors=Tr,o.warnings=Tr,o.triggerMetaEvent(),o.reRender()),v}),U(Ft(o),"isFieldValidating",function(){return!!o.validatePromise}),U(Ft(o),"isFieldTouched",function(){return o.touched}),U(Ft(o),"isFieldDirty",function(){if(o.dirty||o.props.initialValue!==void 0)return!0;var l=o.props.fieldContext,c=l.getInternalHooks(_i),u=c.getInitialValue;return u(o.getNamePath())!==void 0}),U(Ft(o),"getErrors",function(){return o.errors}),U(Ft(o),"getWarnings",function(){return o.warnings}),U(Ft(o),"isListField",function(){return o.props.isListField}),U(Ft(o),"isList",function(){return o.props.isList}),U(Ft(o),"isPreserve",function(){return o.props.preserve}),U(Ft(o),"getMeta",function(){o.prevValidating=o.isFieldValidating();var l={touched:o.isFieldTouched(),validating:o.prevValidating,errors:o.errors,warnings:o.warnings,name:o.getNamePath(),validated:o.validatePromise===null};return l}),U(Ft(o),"getOnlyChild",function(l){if(typeof l=="function"){var c=o.getMeta();return q(q({},o.getOnlyChild(l(o.getControlled(),c,o.props.fieldContext))),{},{isFunction:!0})}var u=Nr(l);return u.length!==1||!p.isValidElement(u[0])?{child:u,isFunction:!1}:{child:u[0],isFunction:!1}}),U(Ft(o),"getValue",function(l){var c=o.props.fieldContext.getFieldsValue,u=o.getNamePath();return mo(l||c(!0),u)}),U(Ft(o),"getControlled",function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},c=o.props,u=c.name,d=c.trigger,f=c.validateTrigger,h=c.getValueFromEvent,m=c.normalize,v=c.valuePropName,g=c.getValueProps,y=c.fieldContext,b=f!==void 0?f:y.validateTrigger,C=o.getNamePath(),x=y.getInternalHooks,S=y.getFieldsValue,w=x(_i),E=w.dispatch,N=o.getValue(),$=g||function(A){return U({},v,A)},M=l[d],R=u!==void 0?$(N):{};process.env.NODE_ENV!=="production"&&R&&Object.keys(R).forEach(function(A){Ot(typeof R[A]!="function","It's not recommended to generate dynamic function prop by `getValueProps`. Please pass it to child component directly (prop: ".concat(A,")"))});var k=q(q({},l),R);k[d]=function(){o.touched=!0,o.dirty=!0,o.triggerMetaEvent();for(var A,L=arguments.length,T=new Array(L),I=0;I<L;I++)T[I]=arguments[I];h?A=h.apply(void 0,T):A=lB.apply(void 0,[v].concat(T)),m&&(A=m(A,N,S(!0))),A!==N&&E({type:"updateValue",namePath:C,value:A}),M&&M.apply(void 0,T)};var D=Ip(b||[]);return D.forEach(function(A){var L=k[A];k[A]=function(){L&&L.apply(void 0,arguments);var T=o.props.rules;T&&T.length&&E({type:"validateField",namePath:C,triggerName:A})}}),k}),r.fieldContext){var i=r.fieldContext.getInternalHooks,a=i(_i),s=a.initEntityValue;s(Ft(o))}return o}return An(n,[{key:"componentDidMount",value:function(){var o=this.props,i=o.shouldUpdate,a=o.fieldContext;if(this.mounted=!0,a){var s=a.getInternalHooks,l=s(_i),c=l.registerField;this.cancelRegisterFunc=c(this)}i===!0&&this.reRender()}},{key:"componentWillUnmount",value:function(){this.cancelRegister(),this.triggerMetaEvent(!0),this.mounted=!1}},{key:"reRender",value:function(){this.mounted&&this.forceUpdate()}},{key:"render",value:function(){var o=this.state.resetCount,i=this.props.children,a=this.getOnlyChild(i),s=a.child,l=a.isFunction,c;return l?c=s:p.isValidElement(s)?c=p.cloneElement(s,this.getControlled(s.props)):(Ot(!s,"`children` of Field is not validate ReactElement."),c=s),p.createElement(p.Fragment,{key:o},c)}}]),n}(p.Component);U(yg,"contextType",Xa);U(yg,"defaultProps",{trigger:"onChange",valuePropName:"value"});function eE(e){var t,n=e.name,r=Mt(e,cB),o=p.useContext(Xa),i=p.useContext(mu),a=n!==void 0?Dn(n):void 0,s=(t=r.isListField)!==null&&t!==void 0?t:!!i,l="keep";return s||(l="_".concat((a||[]).join("_"))),process.env.NODE_ENV!=="production"&&r.preserve===!1&&s&&a.length<=1&&Ot(!1,"`preserve` should not apply on Form.List fields."),p.createElement(yg,He({key:l,name:a,isListField:s},r,{fieldContext:o}))}function uB(e){var t=e.name,n=e.initialValue,r=e.children,o=e.rules,i=e.validateTrigger,a=e.isListField,s=p.useContext(Xa),l=p.useContext(mu),c=p.useRef({keys:[],id:0}),u=c.current,d=p.useMemo(function(){var v=Dn(s.prefixName)||[];return[].concat(Le(v),Le(Dn(t)))},[s.prefixName,t]),f=p.useMemo(function(){return q(q({},s),{},{prefixName:d})},[s,d]),h=p.useMemo(function(){return{getKey:function(g){var y=d.length,b=g[y];return[u.keys[b],g.slice(y+1)]}}},[d]);if(typeof r!="function")return Ot(!1,"Form.List only accepts function as children."),null;var m=function(g,y,b){var C=b.source;return C==="internal"?!1:g!==y};return p.createElement(mu.Provider,{value:h},p.createElement(Xa.Provider,{value:f},p.createElement(eE,{name:[],shouldUpdate:m,rules:o,validateTrigger:i,initialValue:n,isList:!0,isListField:a??!!l},function(v,g){var y=v.value,b=y===void 0?[]:y,C=v.onChange,x=s.getFieldValue,S=function(){var $=x(d||[]);return $||[]},w={add:function($,M){var R=S();M>=0&&M<=R.length?(u.keys=[].concat(Le(u.keys.slice(0,M)),[u.id],Le(u.keys.slice(M))),C([].concat(Le(R.slice(0,M)),[$],Le(R.slice(M))))):(process.env.NODE_ENV!=="production"&&(M<0||M>R.length)&&Ot(!1,"The second parameter of the add function should be a valid positive number."),u.keys=[].concat(Le(u.keys),[u.id]),C([].concat(Le(R),[$]))),u.id+=1},remove:function($){var M=S(),R=new Set(Array.isArray($)?$:[$]);R.size<=0||(u.keys=u.keys.filter(function(k,D){return!R.has(D)}),C(M.filter(function(k,D){return!R.has(D)})))},move:function($,M){if($!==M){var R=S();$<0||$>=R.length||M<0||M>=R.length||(u.keys=Z0(u.keys,$,M),C(Z0(R,$,M)))}}},E=b||[];return Array.isArray(E)||(E=[],process.env.NODE_ENV!=="production"&&Ot(!1,"Current value of '".concat(d.join(" > "),"' is not an array type."))),r(E.map(function(N,$){var M=u.keys[$];return M===void 0&&(u.keys[$]=u.id,M=u.keys[$],u.id+=1),{name:$,key:M,isListField:!0}}),w,g)})))}function dB(e){var t=!1,n=e.length,r=[];return e.length?new Promise(function(o,i){e.forEach(function(a,s){a.catch(function(l){return t=!0,l}).then(function(l){n-=1,r[s]=l,!(n>0)&&(t&&i(r),o(r))})})}):Promise.resolve([])}var tE="__@field_split__";function Xf(e){return e.map(function(t){return"".concat(ht(t),":").concat(t)}).join(tE)}var fa=function(){function e(){Tn(this,e),U(this,"kvs",new Map)}return An(e,[{key:"set",value:function(n,r){this.kvs.set(Xf(n),r)}},{key:"get",value:function(n){return this.kvs.get(Xf(n))}},{key:"update",value:function(n,r){var o=this.get(n),i=r(o);i?this.set(n,i):this.delete(n)}},{key:"delete",value:function(n){this.kvs.delete(Xf(n))}},{key:"map",value:function(n){return Le(this.kvs.entries()).map(function(r){var o=de(r,2),i=o[0],a=o[1],s=i.split(tE);return n({key:s.map(function(l){var c=l.match(/^([^:]*):(.*)$/),u=de(c,3),d=u[1],f=u[2];return d==="number"?Number(f):f}),value:a})})}},{key:"toJSON",value:function(){var n={};return this.map(function(r){var o=r.key,i=r.value;return n[o.join(".")]=i,null}),n}}]),e}(),fB=["name"],hB=An(function e(t){var n=this;Tn(this,e),U(this,"formHooked",!1),U(this,"forceRootUpdate",void 0),U(this,"subscribable",!0),U(this,"store",{}),U(this,"fieldEntities",[]),U(this,"initialValues",{}),U(this,"callbacks",{}),U(this,"validateMessages",null),U(this,"preserve",null),U(this,"lastValidatePromise",null),U(this,"getForm",function(){return{getFieldValue:n.getFieldValue,getFieldsValue:n.getFieldsValue,getFieldError:n.getFieldError,getFieldWarning:n.getFieldWarning,getFieldsError:n.getFieldsError,isFieldsTouched:n.isFieldsTouched,isFieldTouched:n.isFieldTouched,isFieldValidating:n.isFieldValidating,isFieldsValidating:n.isFieldsValidating,resetFields:n.resetFields,setFields:n.setFields,setFieldValue:n.setFieldValue,setFieldsValue:n.setFieldsValue,validateFields:n.validateFields,submit:n.submit,_init:!0,getInternalHooks:n.getInternalHooks}}),U(this,"getInternalHooks",function(r){return r===_i?(n.formHooked=!0,{dispatch:n.dispatch,initEntityValue:n.initEntityValue,registerField:n.registerField,useSubscribe:n.useSubscribe,setInitialValues:n.setInitialValues,destroyForm:n.destroyForm,setCallbacks:n.setCallbacks,setValidateMessages:n.setValidateMessages,getFields:n.getFields,setPreserve:n.setPreserve,getInitialValue:n.getInitialValue,registerWatch:n.registerWatch}):(Ot(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)}),U(this,"useSubscribe",function(r){n.subscribable=r}),U(this,"prevWithoutPreserves",null),U(this,"setInitialValues",function(r,o){if(n.initialValues=r||{},o){var i,a=Ea(r,n.store);(i=n.prevWithoutPreserves)===null||i===void 0||i.map(function(s){var l=s.key;a=Gr(a,l,mo(r,l))}),n.prevWithoutPreserves=null,n.updateStore(a)}}),U(this,"destroyForm",function(r){if(r)n.updateStore({});else{var o=new fa;n.getFieldEntities(!0).forEach(function(i){n.isMergedPreserve(i.isPreserve())||o.set(i.getNamePath(),!0)}),n.prevWithoutPreserves=o}}),U(this,"getInitialValue",function(r){var o=mo(n.initialValues,r);return r.length?Ea(o):o}),U(this,"setCallbacks",function(r){n.callbacks=r}),U(this,"setValidateMessages",function(r){n.validateMessages=r}),U(this,"setPreserve",function(r){n.preserve=r}),U(this,"watchList",[]),U(this,"registerWatch",function(r){return n.watchList.push(r),function(){n.watchList=n.watchList.filter(function(o){return o!==r})}}),U(this,"notifyWatch",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];if(n.watchList.length){var o=n.getFieldsValue(),i=n.getFieldsValue(!0);n.watchList.forEach(function(a){a(o,i,r)})}}),U(this,"timeoutId",null),U(this,"warningUnhooked",function(){process.env.NODE_ENV!=="production"&&!n.timeoutId&&typeof window<"u"&&(n.timeoutId=setTimeout(function(){n.timeoutId=null,n.formHooked||Ot(!1,"Instance created by `useForm` is not connected to any Form element. Forget to pass `form` prop?")}))}),U(this,"updateStore",function(r){n.store=r}),U(this,"getFieldEntities",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return r?n.fieldEntities.filter(function(o){return o.getNamePath().length}):n.fieldEntities}),U(this,"getFieldsMap",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,o=new fa;return n.getFieldEntities(r).forEach(function(i){var a=i.getNamePath();o.set(a,i)}),o}),U(this,"getFieldEntitiesForNamePathList",function(r){if(!r)return n.getFieldEntities(!0);var o=n.getFieldsMap(!0);return r.map(function(i){var a=Dn(i);return o.get(a)||{INVALIDATE_NAME_PATH:Dn(i)}})}),U(this,"getFieldsValue",function(r,o){n.warningUnhooked();var i,a,s;if(r===!0||Array.isArray(r)?(i=r,a=o):r&&ht(r)==="object"&&(s=r.strict,a=r.filter),i===!0&&!a)return n.store;var l=n.getFieldEntitiesForNamePathList(Array.isArray(i)?i:null),c=[];return l.forEach(function(u){var d,f,h="INVALIDATE_NAME_PATH"in u?u.INVALIDATE_NAME_PATH:u.getNamePath();if(s){var m,v;if((m=(v=u).isList)!==null&&m!==void 0&&m.call(v))return}else if(!i&&(d=(f=u).isListField)!==null&&d!==void 0&&d.call(f))return;if(!a)c.push(h);else{var g="getMeta"in u?u.getMeta():null;a(g)&&c.push(h)}}),Q0(n.store,c.map(Dn))}),U(this,"getFieldValue",function(r){n.warningUnhooked();var o=Dn(r);return mo(n.store,o)}),U(this,"getFieldsError",function(r){n.warningUnhooked();var o=n.getFieldEntitiesForNamePathList(r);return o.map(function(i,a){return i&&!("INVALIDATE_NAME_PATH"in i)?{name:i.getNamePath(),errors:i.getErrors(),warnings:i.getWarnings()}:{name:Dn(r[a]),errors:[],warnings:[]}})}),U(this,"getFieldError",function(r){n.warningUnhooked();var o=Dn(r),i=n.getFieldsError([o])[0];return i.errors}),U(this,"getFieldWarning",function(r){n.warningUnhooked();var o=Dn(r),i=n.getFieldsError([o])[0];return i.warnings}),U(this,"isFieldsTouched",function(){n.warningUnhooked();for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];var a=o[0],s=o[1],l,c=!1;o.length===0?l=null:o.length===1?Array.isArray(a)?(l=a.map(Dn),c=!1):(l=null,c=a):(l=a.map(Dn),c=s);var u=n.getFieldEntities(!0),d=function(g){return g.isFieldTouched()};if(!l)return c?u.every(function(v){return d(v)||v.isList()}):u.some(d);var f=new fa;l.forEach(function(v){f.set(v,[])}),u.forEach(function(v){var g=v.getNamePath();l.forEach(function(y){y.every(function(b,C){return g[C]===b})&&f.update(y,function(b){return[].concat(Le(b),[v])})})});var h=function(g){return g.some(d)},m=f.map(function(v){var g=v.value;return g});return c?m.every(h):m.some(h)}),U(this,"isFieldTouched",function(r){return n.warningUnhooked(),n.isFieldsTouched([r])}),U(this,"isFieldsValidating",function(r){n.warningUnhooked();var o=n.getFieldEntities();if(!r)return o.some(function(a){return a.isFieldValidating()});var i=r.map(Dn);return o.some(function(a){var s=a.getNamePath();return Aa(i,s)&&a.isFieldValidating()})}),U(this,"isFieldValidating",function(r){return n.warningUnhooked(),n.isFieldsValidating([r])}),U(this,"resetWithFieldInitialValue",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=new fa,i=n.getFieldEntities(!0);i.forEach(function(l){var c=l.props.initialValue,u=l.getNamePath();if(c!==void 0){var d=o.get(u)||new Set;d.add({entity:l,value:c}),o.set(u,d)}});var a=function(c){c.forEach(function(u){var d=u.props.initialValue;if(d!==void 0){var f=u.getNamePath(),h=n.getInitialValue(f);if(h!==void 0)Ot(!1,"Form already set 'initialValues' with path '".concat(f.join("."),"'. Field can not overwrite it."));else{var m=o.get(f);if(m&&m.size>1)Ot(!1,"Multiple Field with path '".concat(f.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(m){var v=n.getFieldValue(f),g=u.isListField();!g&&(!r.skipExist||v===void 0)&&n.updateStore(Gr(n.store,f,Le(m)[0].value))}}}})},s;r.entities?s=r.entities:r.namePathList?(s=[],r.namePathList.forEach(function(l){var c=o.get(l);if(c){var u;(u=s).push.apply(u,Le(Le(c).map(function(d){return d.entity})))}})):s=i,a(s)}),U(this,"resetFields",function(r){n.warningUnhooked();var o=n.store;if(!r){n.updateStore(Ea(n.initialValues)),n.resetWithFieldInitialValue(),n.notifyObservers(o,null,{type:"reset"}),n.notifyWatch();return}var i=r.map(Dn);i.forEach(function(a){var s=n.getInitialValue(a);n.updateStore(Gr(n.store,a,s))}),n.resetWithFieldInitialValue({namePathList:i}),n.notifyObservers(o,i,{type:"reset"}),n.notifyWatch(i)}),U(this,"setFields",function(r){n.warningUnhooked();var o=n.store,i=[];r.forEach(function(a){var s=a.name,l=Mt(a,fB),c=Dn(s);i.push(c),"value"in l&&n.updateStore(Gr(n.store,c,l.value)),n.notifyObservers(o,[c],{type:"setField",data:a})}),n.notifyWatch(i)}),U(this,"getFields",function(){var r=n.getFieldEntities(!0),o=r.map(function(i){var a=i.getNamePath(),s=i.getMeta(),l=q(q({},s),{},{name:a,value:n.getFieldValue(a)});return Object.defineProperty(l,"originRCField",{value:!0}),l});return o}),U(this,"initEntityValue",function(r){var o=r.props.initialValue;if(o!==void 0){var i=r.getNamePath(),a=mo(n.store,i);a===void 0&&n.updateStore(Gr(n.store,i,o))}}),U(this,"isMergedPreserve",function(r){var o=r!==void 0?r:n.preserve;return o??!0}),U(this,"registerField",function(r){n.fieldEntities.push(r);var o=r.getNamePath();if(n.notifyWatch([o]),r.props.initialValue!==void 0){var i=n.store;n.resetWithFieldInitialValue({entities:[r],skipExist:!0}),n.notifyObservers(i,[r.getNamePath()],{type:"valueUpdate",source:"internal"})}return function(a,s){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(n.fieldEntities=n.fieldEntities.filter(function(d){return d!==r}),!n.isMergedPreserve(s)&&(!a||l.length>1)){var c=a?void 0:n.getInitialValue(o);if(o.length&&n.getFieldValue(o)!==c&&n.fieldEntities.every(function(d){return!Zw(d.getNamePath(),o)})){var u=n.store;n.updateStore(Gr(u,o,c,!0)),n.notifyObservers(u,[o],{type:"remove"}),n.triggerDependenciesUpdate(u,o)}}n.notifyWatch([o])}}),U(this,"dispatch",function(r){switch(r.type){case"updateValue":{var o=r.namePath,i=r.value;n.updateValue(o,i);break}case"validateField":{var a=r.namePath,s=r.triggerName;n.validateFields([a],{triggerName:s});break}}}),U(this,"notifyObservers",function(r,o,i){if(n.subscribable){var a=q(q({},i),{},{store:n.getFieldsValue(!0)});n.getFieldEntities().forEach(function(s){var l=s.onStoreChange;l(r,o,a)})}else n.forceRootUpdate()}),U(this,"triggerDependenciesUpdate",function(r,o){var i=n.getDependencyChildrenFields(o);return i.length&&n.validateFields(i),n.notifyObservers(r,i,{type:"dependenciesUpdate",relatedFields:[o].concat(Le(i))}),i}),U(this,"updateValue",function(r,o){var i=Dn(r),a=n.store;n.updateStore(Gr(n.store,i,o)),n.notifyObservers(a,[i],{type:"valueUpdate",source:"internal"}),n.notifyWatch([i]);var s=n.triggerDependenciesUpdate(a,i),l=n.callbacks.onValuesChange;if(l){var c=Q0(n.store,[i]);l(c,n.getFieldsValue())}n.triggerOnFieldsChange([i].concat(Le(s)))}),U(this,"setFieldsValue",function(r){n.warningUnhooked();var o=n.store;if(r){var i=Ea(n.store,r);n.updateStore(i)}n.notifyObservers(o,null,{type:"valueUpdate",source:"external"}),n.notifyWatch()}),U(this,"setFieldValue",function(r,o){n.setFields([{name:r,value:o,errors:[],warnings:[]}])}),U(this,"getDependencyChildrenFields",function(r){var o=new Set,i=[],a=new fa;n.getFieldEntities().forEach(function(l){var c=l.props.dependencies;(c||[]).forEach(function(u){var d=Dn(u);a.update(d,function(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new Set;return f.add(l),f})})});var s=function l(c){var u=a.get(c)||new Set;u.forEach(function(d){if(!o.has(d)){o.add(d);var f=d.getNamePath();d.isFieldDirty()&&f.length&&(i.push(f),l(f))}})};return s(r),i}),U(this,"triggerOnFieldsChange",function(r,o){var i=n.callbacks.onFieldsChange;if(i){var a=n.getFields();if(o){var s=new fa;o.forEach(function(c){var u=c.name,d=c.errors;s.set(u,d)}),a.forEach(function(c){c.errors=s.get(c.name)||c.errors})}var l=a.filter(function(c){var u=c.name;return Aa(r,u)});l.length&&i(l,a)}}),U(this,"validateFields",function(r,o){n.warningUnhooked();var i,a;Array.isArray(r)||typeof r=="string"||typeof o=="string"?(i=r,a=o):a=r;var s=!!i,l=s?i.map(Dn):[],c=[],u=String(Date.now()),d=new Set,f=a||{},h=f.recursive,m=f.dirty;n.getFieldEntities(!0).forEach(function(b){if(s||l.push(b.getNamePath()),!(!b.props.rules||!b.props.rules.length)&&!(m&&!b.isFieldDirty())){var C=b.getNamePath();if(d.add(C.join(u)),!s||Aa(l,C,h)){var x=b.validateRules(q({validateMessages:q(q({},Qw),n.validateMessages)},a));c.push(x.then(function(){return{name:C,errors:[],warnings:[]}}).catch(function(S){var w,E=[],N=[];return(w=S.forEach)===null||w===void 0||w.call(S,function($){var M=$.rule.warningOnly,R=$.errors;M?N.push.apply(N,Le(R)):E.push.apply(E,Le(R))}),E.length?Promise.reject({name:C,errors:E,warnings:N}):{name:C,errors:E,warnings:N}}))}}});var v=dB(c);n.lastValidatePromise=v,v.catch(function(b){return b}).then(function(b){var C=b.map(function(x){var S=x.name;return S});n.notifyObservers(n.store,C,{type:"validateFinish"}),n.triggerOnFieldsChange(C,b)});var g=v.then(function(){return n.lastValidatePromise===v?Promise.resolve(n.getFieldsValue(l)):Promise.reject([])}).catch(function(b){var C=b.filter(function(x){return x&&x.errors.length});return Promise.reject({values:n.getFieldsValue(l),errorFields:C,outOfDate:n.lastValidatePromise!==v})});g.catch(function(b){return b});var y=l.filter(function(b){return d.has(b.join(u))});return n.triggerOnFieldsChange(y),g}),U(this,"submit",function(){n.warningUnhooked(),n.validateFields().then(function(r){var o=n.callbacks.onFinish;if(o)try{o(r)}catch(i){console.error(i)}}).catch(function(r){var o=n.callbacks.onFinishFailed;o&&o(r)})}),this.forceRootUpdate=t});function nE(e){var t=p.useRef(),n=p.useState({}),r=de(n,2),o=r[1];if(!t.current)if(e)t.current=e;else{var i=function(){o({})},a=new hB(i);t.current=a.getForm()}return[t.current]}var Bp=p.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}}),pB=function(t){var n=t.validateMessages,r=t.onFormChange,o=t.onFormFinish,i=t.children,a=p.useContext(Bp),s=p.useRef({});return p.createElement(Bp.Provider,{value:q(q({},a),{},{validateMessages:q(q({},a.validateMessages),n),triggerFormChange:function(c,u){r&&r(c,{changedFields:u,forms:s.current}),a.triggerFormChange(c,u)},triggerFormFinish:function(c,u){o&&o(c,{values:u,forms:s.current}),a.triggerFormFinish(c,u)},registerForm:function(c,u){c&&(s.current=q(q({},s.current),{},U({},c,u))),a.registerForm(c,u)},unregisterForm:function(c){var u=q({},s.current);delete u[c],s.current=u,a.unregisterForm(c)}})},i)},mB=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed","clearOnDestroy"],gB=function(t,n){var r=t.name,o=t.initialValues,i=t.fields,a=t.form,s=t.preserve,l=t.children,c=t.component,u=c===void 0?"form":c,d=t.validateMessages,f=t.validateTrigger,h=f===void 0?"onChange":f,m=t.onValuesChange,v=t.onFieldsChange,g=t.onFinish,y=t.onFinishFailed,b=t.clearOnDestroy,C=Mt(t,mB),x=p.useRef(null),S=p.useContext(Bp),w=nE(a),E=de(w,1),N=E[0],$=N.getInternalHooks(_i),M=$.useSubscribe,R=$.setInitialValues,k=$.setCallbacks,D=$.setValidateMessages,A=$.setPreserve,L=$.destroyForm;p.useImperativeHandle(n,function(){return q(q({},N),{},{nativeElement:x.current})}),p.useEffect(function(){return S.registerForm(r,N),function(){S.unregisterForm(r)}},[S,N,r]),D(q(q({},S.validateMessages),d)),k({onValuesChange:m,onFieldsChange:function(V){if(S.triggerFormChange(r,V),v){for(var G=arguments.length,Q=new Array(G>1?G-1:0),ce=1;ce<G;ce++)Q[ce-1]=arguments[ce];v.apply(void 0,[V].concat(Q))}},onFinish:function(V){S.triggerFormFinish(r,V),g&&g(V)},onFinishFailed:y}),A(s);var T=p.useRef(null);R(o,!T.current),T.current||(T.current=!0),p.useEffect(function(){return function(){return L(b)}},[]);var I,_=typeof l=="function";if(_){var W=N.getFieldsValue(!0);I=l(W,N)}else I=l;M(!_);var H=p.useRef();p.useEffect(function(){sB(H.current||[],i||[])||N.setFields(i||[]),H.current=i},[i,N]);var B=p.useMemo(function(){return q(q({},N),{},{validateTrigger:h})},[N,h]),K=p.createElement(mu.Provider,{value:null},p.createElement(Xa.Provider,{value:B},I));return u===!1?K:p.createElement(u,He({},C,{ref:x,onSubmit:function(V){V.preventDefault(),V.stopPropagation(),N.submit()},onReset:function(V){var G;V.preventDefault(),N.resetFields(),(G=C.onReset)===null||G===void 0||G.call(C,V)}}),K)};function ey(e){try{return JSON.stringify(e)}catch{return Math.random()}}var vB=process.env.NODE_ENV!=="production"?function(e){var t=e.join("__RC_FIELD_FORM_SPLIT__"),n=O.useRef(t);Ot(n.current===t,"`useWatch` is not support dynamic `namePath`. Please provide static instead.")}:function(){};function bB(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0],o=t[1],i=o===void 0?{}:o,a=$j(i)?{form:i}:i,s=a.form,l=O.useState(),c=de(l,2),u=c[0],d=c[1],f=O.useMemo(function(){return ey(u)},[u]),h=O.useRef(f);h.current=f;var m=O.useContext(Xa),v=s||m,g=v&&v._init;process.env.NODE_ENV!=="production"&&Ot(t.length===2?s?g:!0:g,"useWatch requires a form instance since it can not auto detect from context.");var y=Dn(r),b=O.useRef(y);return b.current=y,vB(y),O.useEffect(function(){if(g){var C=v.getFieldsValue,x=v.getInternalHooks,S=x(_i),w=S.registerWatch,E=function(R,k){var D=a.preserve?k:R;return typeof r=="function"?r(D):mo(D,b.current)},N=w(function(M,R){var k=E(M,R),D=ey(k);h.current!==D&&(h.current=D,d(k))}),$=E(C(),C(!0));return u!==$&&d($),N}},[g]),u}var yB=p.forwardRef(gB),Pl=yB;Pl.FormProvider=pB;Pl.Field=eE;Pl.List=uB;Pl.useForm=nE;Pl.useWatch=bB;const Mr=p.createContext({});process.env.NODE_ENV!=="production"&&(Mr.displayName="FormItemInputContext");const CB=e=>{let{children:t,status:n,override:r}=e;const o=p.useContext(Mr),i=p.useMemo(()=>{const a=Object.assign({},o);return r&&delete a.isFormItemInput,n&&(delete a.status,delete a.hasFeedback,delete a.feedbackIcon),a},[n,r,o]);return p.createElement(Mr.Provider,{value:i},t)},SB=p.createContext(void 0),vi=e=>{const{space:t,form:n,children:r}=e;if(r==null)return null;let o=r;return n&&(o=O.createElement(CB,{override:!0,status:!0},o)),t&&(o=O.createElement(C_,null,o)),o};function ty(e){if(e)return{closable:e.closable,closeIcon:e.closeIcon}}function ny(e){const{closable:t,closeIcon:n}=e||{};return O.useMemo(()=>{if(!t&&(t===!1||n===!1||n===null))return!1;if(t===void 0&&n===void 0)return null;let r={closeIcon:typeof n!="boolean"&&n!==null?n:void 0};return t&&typeof t=="object"&&(r=Object.assign(Object.assign({},r),t)),r},[t,n])}function ry(){const e={};for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach(o=>{o&&Object.keys(o).forEach(i=>{o[i]!==void 0&&(e[i]=o[i])})}),e}const xB={};function wB(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:xB;const r=ny(e),o=ny(t),i=typeof r!="boolean"?!!(r!=null&&r.disabled):!1,a=O.useMemo(()=>Object.assign({closeIcon:O.createElement(El,null)},n),[n]),s=O.useMemo(()=>r===!1?!1:r?ry(a,o,r):o===!1?!1:o?ry(a,o):a.closable?a:!1,[r,o,a]);return O.useMemo(()=>{if(s===!1)return[!1,null,i];const{closeIconRender:l}=a,{closeIcon:c}=s;let u=c;if(u!=null){l&&(u=l(c));const d=eo(s,!0);Object.keys(d).length&&(u=O.isValidElement(u)?O.cloneElement(u,d):O.createElement("span",Object.assign({},d),u))}return[!0,u,i]},[s,a])}const EB=()=>or()&&window.document.documentElement,Id=e=>{const{prefixCls:t,className:n,style:r,size:o,shape:i}=e,a=te({[`${t}-lg`]:o==="large",[`${t}-sm`]:o==="small"}),s=te({[`${t}-circle`]:i==="circle",[`${t}-square`]:i==="square",[`${t}-round`]:i==="round"}),l=p.useMemo(()=>typeof o=="number"?{width:o,height:o,lineHeight:`${o}px`}:{},[o]);return p.createElement("span",{className:te(t,a,s,n),style:Object.assign(Object.assign({},l),r)})},OB=new rn("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),Td=e=>({height:e,lineHeight:oe(e)}),Pa=e=>Object.assign({width:e},Td(e)),$B=e=>({background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:OB,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),Yf=(e,t)=>Object.assign({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal()},Td(e)),NB=e=>{const{skeletonAvatarCls:t,gradientFromColor:n,controlHeight:r,controlHeightLG:o,controlHeightSM:i}=e;return{[t]:Object.assign({display:"inline-block",verticalAlign:"top",background:n},Pa(r)),[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:Object.assign({},Pa(o)),[`${t}${t}-sm`]:Object.assign({},Pa(i))}},MB=e=>{const{controlHeight:t,borderRadiusSM:n,skeletonInputCls:r,controlHeightLG:o,controlHeightSM:i,gradientFromColor:a,calc:s}=e;return{[r]:Object.assign({display:"inline-block",verticalAlign:"top",background:a,borderRadius:n},Yf(t,s)),[`${r}-lg`]:Object.assign({},Yf(o,s)),[`${r}-sm`]:Object.assign({},Yf(i,s))}},oy=e=>Object.assign({width:e},Td(e)),RB=e=>{const{skeletonImageCls:t,imageSizeBase:n,gradientFromColor:r,borderRadiusSM:o,calc:i}=e;return{[t]:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:r,borderRadius:o},oy(i(n).mul(2).equal())),{[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:Object.assign(Object.assign({},oy(n)),{maxWidth:i(n).mul(4).equal(),maxHeight:i(n).mul(4).equal()}),[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}}),[`${t}${t}-circle`]:{borderRadius:"50%"}}},Jf=(e,t,n)=>{const{skeletonButtonCls:r}=e;return{[`${n}${r}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${n}${r}-round`]:{borderRadius:t}}},Qf=(e,t)=>Object.assign({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal()},Td(e)),IB=e=>{const{borderRadiusSM:t,skeletonButtonCls:n,controlHeight:r,controlHeightLG:o,controlHeightSM:i,gradientFromColor:a,calc:s}=e;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[n]:Object.assign({display:"inline-block",verticalAlign:"top",background:a,borderRadius:t,width:s(r).mul(2).equal(),minWidth:s(r).mul(2).equal()},Qf(r,s))},Jf(e,r,n)),{[`${n}-lg`]:Object.assign({},Qf(o,s))}),Jf(e,o,`${n}-lg`)),{[`${n}-sm`]:Object.assign({},Qf(i,s))}),Jf(e,i,`${n}-sm`))},TB=e=>{const{componentCls:t,skeletonAvatarCls:n,skeletonTitleCls:r,skeletonParagraphCls:o,skeletonButtonCls:i,skeletonInputCls:a,skeletonImageCls:s,controlHeight:l,controlHeightLG:c,controlHeightSM:u,gradientFromColor:d,padding:f,marginSM:h,borderRadius:m,titleHeight:v,blockRadius:g,paragraphLiHeight:y,controlHeightXS:b,paragraphMarginTop:C}=e;return{[t]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:f,verticalAlign:"top",[n]:Object.assign({display:"inline-block",verticalAlign:"top",background:d},Pa(l)),[`${n}-circle`]:{borderRadius:"50%"},[`${n}-lg`]:Object.assign({},Pa(c)),[`${n}-sm`]:Object.assign({},Pa(u))},[`${t}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[r]:{width:"100%",height:v,background:d,borderRadius:g,[`+ ${o}`]:{marginBlockStart:u}},[o]:{padding:0,"> li":{width:"100%",height:y,listStyle:"none",background:d,borderRadius:g,"+ li":{marginBlockStart:b}}},[`${o}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-content`]:{[`${r}, ${o} > li`]:{borderRadius:m}}},[`${t}-with-avatar ${t}-content`]:{[r]:{marginBlockStart:h,[`+ ${o}`]:{marginBlockStart:C}}},[`${t}${t}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},IB(e)),NB(e)),MB(e)),RB(e)),[`${t}${t}-block`]:{width:"100%",[i]:{width:"100%"},[a]:{width:"100%"}},[`${t}${t}-active`]:{[`
330
+ ${r},
331
+ ${o} > li,
332
+ ${n},
333
+ ${i},
334
+ ${a},
335
+ ${s}
336
+ `]:Object.assign({},$B(e))}}},AB=e=>{const{colorFillContent:t,colorFill:n}=e,r=t,o=n;return{color:r,colorGradientEnd:o,gradientFromColor:r,gradientToColor:o,titleHeight:e.controlHeight/2,blockRadius:e.borderRadiusSM,paragraphMarginTop:e.marginLG+e.marginXXS,paragraphLiHeight:e.controlHeight/2}},es=yn("Skeleton",e=>{const{componentCls:t,calc:n}=e,r=Xt(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,skeletonImageCls:`${t}-image`,imageSizeBase:n(e.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${e.gradientFromColor} 25%, ${e.gradientToColor} 37%, ${e.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return[TB(r)]},AB,{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),PB=e=>{const{prefixCls:t,className:n,rootClassName:r,active:o,shape:i="circle",size:a="default"}=e,{getPrefixCls:s}=p.useContext(_t),l=s("skeleton",t),[c,u,d]=es(l),f=Hn(e,["prefixCls","className"]),h=te(l,`${l}-element`,{[`${l}-active`]:o},n,r,u,d);return c(p.createElement("div",{className:h},p.createElement(Id,Object.assign({prefixCls:`${l}-avatar`,shape:i,size:a},f))))},kB=e=>{const{prefixCls:t,className:n,rootClassName:r,active:o,block:i=!1,size:a="default"}=e,{getPrefixCls:s}=p.useContext(_t),l=s("skeleton",t),[c,u,d]=es(l),f=Hn(e,["prefixCls"]),h=te(l,`${l}-element`,{[`${l}-active`]:o,[`${l}-block`]:i},n,r,u,d);return c(p.createElement("div",{className:h},p.createElement(Id,Object.assign({prefixCls:`${l}-button`,size:a},f))))},DB="M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z",_B=e=>{const{prefixCls:t,className:n,rootClassName:r,style:o,active:i}=e,{getPrefixCls:a}=p.useContext(_t),s=a("skeleton",t),[l,c,u]=es(s),d=te(s,`${s}-element`,{[`${s}-active`]:i},n,r,c,u);return l(p.createElement("div",{className:d},p.createElement("div",{className:te(`${s}-image`,n),style:o},p.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${s}-image-svg`},p.createElement("title",null,"Image placeholder"),p.createElement("path",{d:DB,className:`${s}-image-path`})))))},LB=e=>{const{prefixCls:t,className:n,rootClassName:r,active:o,block:i,size:a="default"}=e,{getPrefixCls:s}=p.useContext(_t),l=s("skeleton",t),[c,u,d]=es(l),f=Hn(e,["prefixCls"]),h=te(l,`${l}-element`,{[`${l}-active`]:o,[`${l}-block`]:i},n,r,u,d);return c(p.createElement("div",{className:h},p.createElement(Id,Object.assign({prefixCls:`${l}-input`,size:a},f))))},jB=e=>{const{prefixCls:t,className:n,rootClassName:r,style:o,active:i,children:a}=e,{getPrefixCls:s}=p.useContext(_t),l=s("skeleton",t),[c,u,d]=es(l),f=te(l,`${l}-element`,{[`${l}-active`]:i},u,n,r,d);return c(p.createElement("div",{className:f},p.createElement("div",{className:te(`${l}-image`,n),style:o},a)))},BB=(e,t)=>{const{width:n,rows:r=2}=t;if(Array.isArray(n))return n[e];if(r-1===e)return n},zB=e=>{const{prefixCls:t,className:n,style:r,rows:o=0}=e,i=Array.from({length:o}).map((a,s)=>p.createElement("li",{key:s,style:{width:BB(s,e)}}));return p.createElement("ul",{className:te(t,n),style:r},i)},FB=e=>{let{prefixCls:t,className:n,width:r,style:o}=e;return p.createElement("h3",{className:te(t,n),style:Object.assign({width:r},o)})};function Zf(e){return e&&typeof e=="object"?e:{}}function HB(e,t){return e&&!t?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function VB(e,t){return!e&&t?{width:"38%"}:e&&t?{width:"50%"}:{}}function WB(e,t){const n={};return(!e||!t)&&(n.width="61%"),!e&&t?n.rows=3:n.rows=2,n}const aa=e=>{const{prefixCls:t,loading:n,className:r,rootClassName:o,style:i,children:a,avatar:s=!1,title:l=!0,paragraph:c=!0,active:u,round:d}=e,{getPrefixCls:f,direction:h,className:m,style:v}=Rr("skeleton"),g=f("skeleton",t),[y,b,C]=es(g);if(n||!("loading"in e)){const x=!!s,S=!!l,w=!!c;let E;if(x){const M=Object.assign(Object.assign({prefixCls:`${g}-avatar`},HB(S,w)),Zf(s));E=p.createElement("div",{className:`${g}-header`},p.createElement(Id,Object.assign({},M)))}let N;if(S||w){let M;if(S){const k=Object.assign(Object.assign({prefixCls:`${g}-title`},VB(x,w)),Zf(l));M=p.createElement(FB,Object.assign({},k))}let R;if(w){const k=Object.assign(Object.assign({prefixCls:`${g}-paragraph`},WB(x,S)),Zf(c));R=p.createElement(zB,Object.assign({},k))}N=p.createElement("div",{className:`${g}-content`},M,R)}const $=te(g,{[`${g}-with-avatar`]:x,[`${g}-active`]:u,[`${g}-rtl`]:h==="rtl",[`${g}-round`]:d},m,r,o,b,C);return y(p.createElement("div",{className:$,style:Object.assign(Object.assign({},v),i)},E,N))}return a??null};aa.Button=kB;aa.Avatar=PB;aa.Input=LB;aa.Image=_B;aa.Node=jB;process.env.NODE_ENV!=="production"&&(aa.displayName="Skeleton");function iy(){}const UB=p.createContext({add:iy,remove:iy});function qB(e){const t=p.useContext(UB),n=p.useRef(null);return tn(o=>{if(o){const i=e?o.querySelector(e):o;t.add(i),n.current=i}else t.remove(n.current)})}const ay=()=>{const{cancelButtonProps:e,cancelTextLocale:t,onCancel:n}=O.useContext(Il);return O.createElement(Lo,Object.assign({onClick:n},e),t)},sy=()=>{const{confirmLoading:e,okButtonProps:t,okType:n,okTextLocale:r,onOk:o}=O.useContext(Il);return O.createElement(Lo,Object.assign({},Nw(n),{loading:e,onClick:o},t),r)};function rE(e,t){return O.createElement("span",{className:`${e}-close-x`},t||O.createElement(El,{className:`${e}-close-icon`}))}const oE=e=>{const{okText:t,okType:n="primary",cancelText:r,confirmLoading:o,onOk:i,onCancel:a,okButtonProps:s,cancelButtonProps:l,footer:c}=e,[u]=Vo("Modal",D1()),d=t||(u==null?void 0:u.okText),f=r||(u==null?void 0:u.cancelText),h={confirmLoading:o,okButtonProps:s,cancelButtonProps:l,okTextLocale:d,cancelTextLocale:f,okType:n,onOk:i,onCancel:a},m=O.useMemo(()=>h,Le(Object.values(h)));let v;return typeof c=="function"||typeof c>"u"?(v=O.createElement(O.Fragment,null,O.createElement(ay,null),O.createElement(sy,null)),typeof c=="function"&&(v=c(v,{OkBtn:sy,CancelBtn:ay})),v=O.createElement(Uw,{value:m},v)):v=c,O.createElement(V1,{disabled:!1},v)},KB=e=>{const{componentCls:t}=e;return{[t]:{display:"flex",flexFlow:"row wrap",minWidth:0,"&::before, &::after":{display:"flex"},"&-no-wrap":{flexWrap:"nowrap"},"&-start":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"flex-end"},"&-space-between":{justifyContent:"space-between"},"&-space-around":{justifyContent:"space-around"},"&-space-evenly":{justifyContent:"space-evenly"},"&-top":{alignItems:"flex-start"},"&-middle":{alignItems:"center"},"&-bottom":{alignItems:"flex-end"}}}},GB=e=>{const{componentCls:t}=e;return{[t]:{position:"relative",maxWidth:"100%",minHeight:1}}},XB=(e,t)=>{const{prefixCls:n,componentCls:r,gridColumns:o}=e,i={};for(let a=o;a>=0;a--)a===0?(i[`${r}${t}-${a}`]={display:"none"},i[`${r}-push-${a}`]={insetInlineStart:"auto"},i[`${r}-pull-${a}`]={insetInlineEnd:"auto"},i[`${r}${t}-push-${a}`]={insetInlineStart:"auto"},i[`${r}${t}-pull-${a}`]={insetInlineEnd:"auto"},i[`${r}${t}-offset-${a}`]={marginInlineStart:0},i[`${r}${t}-order-${a}`]={order:0}):(i[`${r}${t}-${a}`]=[{"--ant-display":"block",display:"block"},{display:"var(--ant-display)",flex:`0 0 ${a/o*100}%`,maxWidth:`${a/o*100}%`}],i[`${r}${t}-push-${a}`]={insetInlineStart:`${a/o*100}%`},i[`${r}${t}-pull-${a}`]={insetInlineEnd:`${a/o*100}%`},i[`${r}${t}-offset-${a}`]={marginInlineStart:`${a/o*100}%`},i[`${r}${t}-order-${a}`]={order:a});return i[`${r}${t}-flex`]={flex:`var(--${n}${t}-flex)`},i},zp=(e,t)=>XB(e,t),YB=(e,t,n)=>({[`@media (min-width: ${oe(t)})`]:Object.assign({},zp(e,n))}),JB=()=>({}),QB=()=>({});yn("Grid",KB,JB);const iE=e=>({xs:e.screenXSMin,sm:e.screenSMMin,md:e.screenMDMin,lg:e.screenLGMin,xl:e.screenXLMin,xxl:e.screenXXLMin});yn("Grid",e=>{const t=Xt(e,{gridColumns:24}),n=iE(t);return delete n.xs,[GB(t),zp(t,""),zp(t,"-xs"),Object.keys(n).map(r=>YB(t,n[r],`-${r}`)).reduce((r,o)=>Object.assign(Object.assign({},r),o),{})]},QB);function ly(e){return{position:e,inset:0}}const ZB=e=>{const{componentCls:t,antCls:n}=e;return[{[`${t}-root`]:{[`${t}${n}-zoom-enter, ${t}${n}-zoom-appear`]:{transform:"none",opacity:0,animationDuration:e.motionDurationSlow,userSelect:"none"},[`${t}${n}-zoom-leave ${t}-content`]:{pointerEvents:"none"},[`${t}-mask`]:Object.assign(Object.assign({},ly("fixed")),{zIndex:e.zIndexPopupBase,height:"100%",backgroundColor:e.colorBgMask,pointerEvents:"none",[`${t}-hidden`]:{display:"none"}}),[`${t}-wrap`]:Object.assign(Object.assign({},ly("fixed")),{zIndex:e.zIndexPopupBase,overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"})}},{[`${t}-root`]:nL(e)}]},ez=e=>{const{componentCls:t}=e;return[{[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:"rtl"},[`${t}-centered`]:{textAlign:"center","&::before":{display:"inline-block",width:0,height:"100%",verticalAlign:"middle",content:'""'},[t]:{top:0,display:"inline-block",paddingBottom:0,textAlign:"start",verticalAlign:"middle"}},[`@media (max-width: ${e.screenSMMax}px)`]:{[t]:{maxWidth:"calc(100vw - 16px)",margin:`${oe(e.marginXS)} auto`},[`${t}-centered`]:{[t]:{flex:1}}}}},{[t]:Object.assign(Object.assign({},Bn(e)),{pointerEvents:"none",position:"relative",top:100,width:"auto",maxWidth:`calc(100vw - ${oe(e.calc(e.margin).mul(2).equal())})`,margin:"0 auto",paddingBottom:e.paddingLG,[`${t}-title`]:{margin:0,color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.titleFontSize,lineHeight:e.titleLineHeight,wordWrap:"break-word"},[`${t}-content`]:{position:"relative",backgroundColor:e.contentBg,backgroundClip:"padding-box",border:0,borderRadius:e.borderRadiusLG,boxShadow:e.boxShadow,pointerEvents:"auto",padding:e.contentPadding},[`${t}-close`]:Object.assign({position:"absolute",top:e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),insetInlineEnd:e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),zIndex:e.calc(e.zIndexPopupBase).add(10).equal(),padding:0,color:e.modalCloseIconColor,fontWeight:e.fontWeightStrong,lineHeight:1,textDecoration:"none",background:"transparent",borderRadius:e.borderRadiusSM,width:e.modalCloseBtnSize,height:e.modalCloseBtnSize,border:0,outline:0,cursor:"pointer",transition:`color ${e.motionDurationMid}, background-color ${e.motionDurationMid}`,"&-x":{display:"flex",fontSize:e.fontSizeLG,fontStyle:"normal",lineHeight:oe(e.modalCloseBtnSize),justifyContent:"center",textTransform:"none",textRendering:"auto"},"&:disabled":{pointerEvents:"none"},"&:hover":{color:e.modalCloseIconHoverColor,backgroundColor:e.colorBgTextHover,textDecoration:"none"},"&:active":{backgroundColor:e.colorBgTextActive}},Ka(e)),[`${t}-header`]:{color:e.colorText,background:e.headerBg,borderRadius:`${oe(e.borderRadiusLG)} ${oe(e.borderRadiusLG)} 0 0`,marginBottom:e.headerMarginBottom,padding:e.headerPadding,borderBottom:e.headerBorderBottom},[`${t}-body`]:{fontSize:e.fontSize,lineHeight:e.lineHeight,wordWrap:"break-word",padding:e.bodyPadding,[`${t}-body-skeleton`]:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",margin:`${oe(e.margin)} auto`}},[`${t}-footer`]:{textAlign:"end",background:e.footerBg,marginTop:e.footerMarginTop,padding:e.footerPadding,borderTop:e.footerBorderTop,borderRadius:e.footerBorderRadius,[`> ${e.antCls}-btn + ${e.antCls}-btn`]:{marginInlineStart:e.marginXS}},[`${t}-open`]:{overflow:"hidden"}})},{[`${t}-pure-panel`]:{top:"auto",padding:0,display:"flex",flexDirection:"column",[`${t}-content,
337
+ ${t}-body,
338
+ ${t}-confirm-body-wrapper`]:{display:"flex",flexDirection:"column",flex:"auto"},[`${t}-confirm-body`]:{marginBottom:"auto"}}}]},tz=e=>{const{componentCls:t}=e;return{[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:"rtl",[`${t}-confirm-body`]:{direction:"rtl"}}}}},nz=e=>{const{componentCls:t}=e,n=iE(e);delete n.xs;const r=Object.keys(n).map(o=>({[`@media (min-width: ${oe(n[o])})`]:{width:`var(--${t.replace(".","")}-${o}-width)`}}));return{[`${t}-root`]:{[t]:[{width:`var(--${t.replace(".","")}-xs-width)`}].concat(Le(r))}}},aE=e=>{const t=e.padding,n=e.fontSizeHeading5,r=e.lineHeightHeading5;return Xt(e,{modalHeaderHeight:e.calc(e.calc(r).mul(n).equal()).add(e.calc(t).mul(2).equal()).equal(),modalFooterBorderColorSplit:e.colorSplit,modalFooterBorderStyle:e.lineType,modalFooterBorderWidth:e.lineWidth,modalCloseIconColor:e.colorIcon,modalCloseIconHoverColor:e.colorIconHover,modalCloseBtnSize:e.controlHeight,modalConfirmIconSize:e.fontHeight,modalTitleHeight:e.calc(e.titleFontSize).mul(e.titleLineHeight).equal()})},sE=e=>({footerBg:"transparent",headerBg:e.colorBgElevated,titleLineHeight:e.lineHeightHeading5,titleFontSize:e.fontSizeHeading5,contentBg:e.colorBgElevated,titleColor:e.colorTextHeading,contentPadding:e.wireframe?0:`${oe(e.paddingMD)} ${oe(e.paddingContentHorizontalLG)}`,headerPadding:e.wireframe?`${oe(e.padding)} ${oe(e.paddingLG)}`:0,headerBorderBottom:e.wireframe?`${oe(e.lineWidth)} ${e.lineType} ${e.colorSplit}`:"none",headerMarginBottom:e.wireframe?0:e.marginXS,bodyPadding:e.wireframe?e.paddingLG:0,footerPadding:e.wireframe?`${oe(e.paddingXS)} ${oe(e.padding)}`:0,footerBorderTop:e.wireframe?`${oe(e.lineWidth)} ${e.lineType} ${e.colorSplit}`:"none",footerBorderRadius:e.wireframe?`0 0 ${oe(e.borderRadiusLG)} ${oe(e.borderRadiusLG)}`:0,footerMarginTop:e.wireframe?0:e.marginSM,confirmBodyPadding:e.wireframe?`${oe(e.padding*2)} ${oe(e.padding*2)} ${oe(e.paddingLG)}`:0,confirmIconMarginInlineEnd:e.wireframe?e.margin:e.marginSM,confirmBtnsMarginTop:e.wireframe?e.marginLG:e.marginSM}),lE=yn("Modal",e=>{const t=aE(e);return[ez(t),tz(t),ZB(t),Ml(t,"zoom"),nz(t)]},sE,{unitless:{titleLineHeight:!0}});var rz=function(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};let Fp;const oz=e=>{Fp={x:e.pageX,y:e.pageY},setTimeout(()=>{Fp=null},100)};EB()&&document.documentElement.addEventListener("click",oz,!0);const cE=e=>{var t;const{getPopupContainer:n,getPrefixCls:r,direction:o,modal:i}=p.useContext(_t),a=Q=>{const{onCancel:ce}=e;ce==null||ce(Q)},s=Q=>{const{onOk:ce}=e;ce==null||ce(Q)};if(process.env.NODE_ENV!=="production"){const Q=fn("Modal");[["visible","open"],["bodyStyle","styles.body"],["maskStyle","styles.mask"]].forEach(ce=>{let[Z,he]=ce;Q.deprecated(!(Z in e),Z,he)})}const{prefixCls:l,className:c,rootClassName:u,open:d,wrapClassName:f,centered:h,getContainer:m,focusTriggerAfterClose:v=!0,style:g,visible:y,width:b=520,footer:C,classNames:x,styles:S,children:w,loading:E}=e,N=rz(e,["prefixCls","className","rootClassName","open","wrapClassName","centered","getContainer","focusTriggerAfterClose","style","visible","width","footer","classNames","styles","children","loading"]),$=r("modal",l),M=r(),R=oo($),[k,D,A]=lE($,R),L=te(f,{[`${$}-centered`]:h??(i==null?void 0:i.centered),[`${$}-wrap-rtl`]:o==="rtl"}),T=C!==null&&!E?p.createElement(oE,Object.assign({},e,{onOk:s,onCancel:a})):null,[I,_,W]=wB(ty(e),ty(i),{closable:!0,closeIcon:p.createElement(El,{className:`${$}-close-icon`}),closeIconRender:Q=>rE($,Q)}),H=qB(`.${$}-content`),[B,K]=$l("Modal",N.zIndex),[Y,V]=p.useMemo(()=>b&&typeof b=="object"?[void 0,b]:[b,void 0],[b]),G=p.useMemo(()=>{const Q={};return V&&Object.keys(V).forEach(ce=>{const Z=V[ce];Z!==void 0&&(Q[`--${$}-${ce}-width`]=typeof Z=="number"?`${Z}px`:Z)}),Q},[V]);return k(p.createElement(vi,{form:!0,space:!0},p.createElement(Ol.Provider,{value:K},p.createElement(Xw,Object.assign({width:Y},N,{zIndex:B,getContainer:m===void 0?n:m,prefixCls:$,rootClassName:te(D,u,A,R),footer:T,visible:d??y,mousePosition:(t=N.mousePosition)!==null&&t!==void 0?t:Fp,onClose:a,closable:I&&{disabled:W,closeIcon:_},closeIcon:_,focusTriggerAfterClose:v,transitionName:Zi(M,"zoom",e.transitionName),maskTransitionName:Zi(M,"fade",e.maskTransitionName),className:te(D,c,i==null?void 0:i.className),style:Object.assign(Object.assign(Object.assign({},i==null?void 0:i.style),g),G),classNames:Object.assign(Object.assign(Object.assign({},i==null?void 0:i.classNames),x),{wrapper:te(L,x==null?void 0:x.wrapper)}),styles:Object.assign(Object.assign({},i==null?void 0:i.styles),S),panelRef:H}),E?p.createElement(aa,{active:!0,title:!1,paragraph:{rows:4},className:`${$}-body-skeleton`}):w))))},iz=e=>{const{componentCls:t,titleFontSize:n,titleLineHeight:r,modalConfirmIconSize:o,fontSize:i,lineHeight:a,modalTitleHeight:s,fontHeight:l,confirmBodyPadding:c}=e,u=`${t}-confirm`;return{[u]:{"&-rtl":{direction:"rtl"},[`${e.antCls}-modal-header`]:{display:"none"},[`${u}-body-wrapper`]:Object.assign({},uu()),[`&${t} ${t}-body`]:{padding:c},[`${u}-body`]:{display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${e.iconCls}`]:{flex:"none",fontSize:o,marginInlineEnd:e.confirmIconMarginInlineEnd,marginTop:e.calc(e.calc(l).sub(o).equal()).div(2).equal()},[`&-has-title > ${e.iconCls}`]:{marginTop:e.calc(e.calc(s).sub(o).equal()).div(2).equal()}},[`${u}-paragraph`]:{display:"flex",flexDirection:"column",flex:"auto",rowGap:e.marginXS,maxWidth:`calc(100% - ${oe(e.marginSM)})`},[`${e.iconCls} + ${u}-paragraph`]:{maxWidth:`calc(100% - ${oe(e.calc(e.modalConfirmIconSize).add(e.marginSM).equal())})`},[`${u}-title`]:{color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:n,lineHeight:r},[`${u}-content`]:{color:e.colorText,fontSize:i,lineHeight:a},[`${u}-btns`]:{textAlign:"end",marginTop:e.confirmBtnsMarginTop,[`${e.antCls}-btn + ${e.antCls}-btn`]:{marginBottom:0,marginInlineStart:e.marginXS}}},[`${u}-error ${u}-body > ${e.iconCls}`]:{color:e.colorError},[`${u}-warning ${u}-body > ${e.iconCls},
339
+ ${u}-confirm ${u}-body > ${e.iconCls}`]:{color:e.colorWarning},[`${u}-info ${u}-body > ${e.iconCls}`]:{color:e.colorInfo},[`${u}-success ${u}-body > ${e.iconCls}`]:{color:e.colorSuccess}}},az=J1(["Modal","confirm"],e=>{const t=aE(e);return[iz(t)]},sE,{order:-1e3});var sz=function(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 uE(e){const{prefixCls:t,icon:n,okText:r,cancelText:o,confirmPrefixCls:i,type:a,okCancel:s,footer:l,locale:c}=e,u=sz(e,["prefixCls","icon","okText","cancelText","confirmPrefixCls","type","okCancel","footer","locale"]);if(process.env.NODE_ENV!=="production"){const E=fn("Modal");process.env.NODE_ENV!=="production"&&E(!(typeof n=="string"&&n.length>2),"breaking",`\`icon\` is using ReactNode instead of string naming in v4. Please check \`${n}\` at https://ant.design/components/icon`)}let d=n;if(!n&&n!==null)switch(a){case"info":d=p.createElement(bw,null);break;case"success":d=p.createElement(gw,null);break;case"error":d=p.createElement(yd,null);break;default:d=p.createElement(vw,null)}const f=s??a==="confirm",h=e.autoFocusButton===null?!1:e.autoFocusButton||"ok",[m]=Vo("Modal"),v=c||m,g=r||(f?v==null?void 0:v.okText:v==null?void 0:v.justOkText),y=o||(v==null?void 0:v.cancelText),b=Object.assign({autoFocusButton:h,cancelTextLocale:y,okTextLocale:g,mergedOkCancel:f},u),C=p.useMemo(()=>b,Le(Object.values(b))),x=p.createElement(p.Fragment,null,p.createElement(_0,null),p.createElement(L0,null)),S=e.title!==void 0&&e.title!==null,w=`${i}-body`;return p.createElement("div",{className:`${i}-body-wrapper`},p.createElement("div",{className:te(w,{[`${w}-has-title`]:S})},d,p.createElement("div",{className:`${i}-paragraph`},S&&p.createElement("span",{className:`${i}-title`},e.title),p.createElement("div",{className:`${i}-content`},e.content))),l===void 0||typeof l=="function"?p.createElement(Uw,{value:C},p.createElement("div",{className:`${i}-btns`},typeof l=="function"?l(x,{OkBtn:L0,CancelBtn:_0}):x)):l,p.createElement(az,{prefixCls:t}))}const dE=e=>{const{close:t,zIndex:n,maskStyle:r,direction:o,prefixCls:i,wrapClassName:a,rootPrefixCls:s,bodyStyle:l,closable:c=!1,onConfirm:u,styles:d}=e;if(process.env.NODE_ENV!=="production"){const x=fn("Modal");[["visible","open"],["bodyStyle","styles.body"],["maskStyle","styles.mask"]].forEach(S=>{let[w,E]=S;x.deprecated(!(w in e),w,E)})}const f=`${i}-confirm`,h=e.width||416,m=e.style||{},v=e.mask===void 0?!0:e.mask,g=e.maskClosable===void 0?!1:e.maskClosable,y=te(f,`${f}-${e.type}`,{[`${f}-rtl`]:o==="rtl"},e.className),[,b]=br(),C=p.useMemo(()=>n!==void 0?n:b.zIndexPopupBase+Cw,[n,b]);return p.createElement(cE,Object.assign({},e,{className:y,wrapClassName:te({[`${f}-centered`]:!!e.centered},a),onCancel:()=>{t==null||t({triggerCancel:!0}),u==null||u(!1)},title:"",footer:null,transitionName:Zi(s||"","zoom",e.transitionName),maskTransitionName:Zi(s||"","fade",e.maskTransitionName),mask:v,maskClosable:g,style:m,styles:Object.assign({body:l,mask:r},d),width:h,zIndex:C,closable:c}),p.createElement(uE,Object.assign({},e,{confirmPrefixCls:f})))},Cg=e=>{const{rootPrefixCls:t,iconPrefixCls:n,direction:r,theme:o}=e;return p.createElement(xo,{prefixCls:t,iconPrefixCls:n,direction:r,theme:o},p.createElement(dE,Object.assign({},e)))};process.env.NODE_ENV!=="production"&&(dE.displayName="ConfirmDialog",Cg.displayName="ConfirmDialogWrapper");const Li=[];let fE="";function hE(){return fE}const lz=e=>{var t,n;const{prefixCls:r,getContainer:o,direction:i}=e,a=D1(),s=O.useContext(_t),l=hE()||s.getPrefixCls(),c=r||`${l}-modal`;let u=o;return u===!1&&(u=void 0,process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="production"&&Ho(!1,"Modal","Static method not support `getContainer` to be `false` since it do not have context env.")),O.createElement(Cg,Object.assign({},e,{rootPrefixCls:l,prefixCls:c,iconPrefixCls:s.iconPrefixCls,theme:s.theme,direction:i??s.direction,locale:(n=(t=s.locale)===null||t===void 0?void 0:t.Modal)!==null&&n!==void 0?n:a,getContainer:u}))};function kl(e){const t=bD();process.env.NODE_ENV!=="production"&&!t.holderRender&&hD("Modal");const n=document.createDocumentFragment();let r=Object.assign(Object.assign({},e),{close:l,open:!0}),o,i;function a(){for(var u,d=arguments.length,f=new Array(d),h=0;h<d;h++)f[h]=arguments[h];if(f.some(g=>g==null?void 0:g.triggerCancel)){var v;(u=e.onCancel)===null||u===void 0||(v=u).call.apply(v,[e,()=>{}].concat(Le(f.slice(1))))}for(let g=0;g<Li.length;g++)if(Li[g]===l){Li.splice(g,1);break}i()}function s(u){clearTimeout(o),o=setTimeout(()=>{const d=t.getPrefixCls(void 0,hE()),f=t.getIconPrefixCls(),h=t.getTheme(),m=O.createElement(lz,Object.assign({},u));i=xw()(O.createElement(xo,{prefixCls:d,iconPrefixCls:f,theme:h},t.holderRender?t.holderRender(m):m),n)})}function l(){for(var u=arguments.length,d=new Array(u),f=0;f<u;f++)d[f]=arguments[f];r=Object.assign(Object.assign({},r),{open:!1,afterClose:()=>{typeof e.afterClose=="function"&&e.afterClose(),a.apply(this,d)}}),r.visible&&delete r.visible,s(r)}function c(u){typeof u=="function"?r=u(r):r=Object.assign(Object.assign({},r),u),s(r)}return s(r),Li.push(l),{destroy:l,update:c}}function pE(e){return Object.assign(Object.assign({},e),{type:"warning"})}function mE(e){return Object.assign(Object.assign({},e),{type:"info"})}function gE(e){return Object.assign(Object.assign({},e),{type:"success"})}function vE(e){return Object.assign(Object.assign({},e),{type:"error"})}function bE(e){return Object.assign(Object.assign({},e),{type:"confirm"})}function cz(e){let{rootPrefixCls:t}=e;process.env.NODE_ENV!=="production"&&Ho(!1,"Modal","Modal.config is deprecated. Please use ConfigProvider.config instead."),fE=t}var uz=function(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};const dz=(e,t)=>{var n,{afterClose:r,config:o}=e,i=uz(e,["afterClose","config"]);const[a,s]=p.useState(!0),[l,c]=p.useState(o),{direction:u,getPrefixCls:d}=p.useContext(_t),f=d("modal"),h=d(),m=()=>{var b;r(),(b=l.afterClose)===null||b===void 0||b.call(l)},v=function(){var b;s(!1);for(var C=arguments.length,x=new Array(C),S=0;S<C;S++)x[S]=arguments[S];if(x.some(N=>N==null?void 0:N.triggerCancel)){var E;(b=l.onCancel)===null||b===void 0||(E=b).call.apply(E,[l,()=>{}].concat(Le(x.slice(1))))}};p.useImperativeHandle(t,()=>({destroy:v,update:b=>{c(C=>Object.assign(Object.assign({},C),b))}}));const g=(n=l.okCancel)!==null&&n!==void 0?n:l.type==="confirm",[y]=Vo("Modal",Qi.Modal);return p.createElement(Cg,Object.assign({prefixCls:f,rootPrefixCls:h},l,{close:v,open:a,afterClose:m,okText:l.okText||(g?y==null?void 0:y.okText:y==null?void 0:y.justOkText),direction:l.direction||u,cancelText:l.cancelText||(y==null?void 0:y.cancelText)},i))},fz=p.forwardRef(dz);let cy=0;const hz=p.memo(p.forwardRef((e,t)=>{const[n,r]=QD();return p.useImperativeHandle(t,()=>({patchElement:r}),[]),p.createElement(p.Fragment,null,n)}));function pz(){const e=p.useRef(null),[t,n]=p.useState([]);p.useEffect(()=>{t.length&&(Le(t).forEach(a=>{a()}),n([]))},[t]);const r=p.useCallback(i=>function(s){var l;cy+=1;const c=p.createRef();let u;const d=new Promise(g=>{u=g});let f=!1,h;const m=p.createElement(fz,{key:`modal-${cy}`,config:i(s),ref:c,afterClose:()=>{h==null||h()},isSilent:()=>f,onConfirm:g=>{u(g)}});return h=(l=e.current)===null||l===void 0?void 0:l.patchElement(m),h&&Li.push(h),{destroy:()=>{function g(){var y;(y=c.current)===null||y===void 0||y.destroy()}c.current?g():n(y=>[].concat(Le(y),[g]))},update:g=>{function y(){var b;(b=c.current)===null||b===void 0||b.update(g)}c.current?y():n(b=>[].concat(Le(b),[y]))},then:g=>(f=!0,d.then(g))}},[]);return[p.useMemo(()=>({info:r(mE),success:r(gE),error:r(vE),warning:r(pE),confirm:r(bE)}),[]),p.createElement(hz,{key:"modal-holder",ref:e})]}function yE(e){return t=>p.createElement(xo,{theme:{token:{motion:!1,zIndexPopupBase:0}}},p.createElement(e,Object.assign({},t)))}const Sg=(e,t,n,r,o)=>yE(a=>{const{prefixCls:s,style:l}=a,c=p.useRef(null),[u,d]=p.useState(0),[f,h]=p.useState(0),[m,v]=bn(!1,{value:a.open}),{getPrefixCls:g}=p.useContext(_t),y=g(r||"select",s);p.useEffect(()=>{if(v(!0),typeof ResizeObserver<"u"){const x=new ResizeObserver(w=>{const E=w[0].target;d(E.offsetHeight+8),h(E.offsetWidth)}),S=setInterval(()=>{var w;const E=o?`.${o(y)}`:`.${y}-dropdown`,N=(w=c.current)===null||w===void 0?void 0:w.querySelector(E);N&&(clearInterval(S),x.observe(N))},10);return()=>{clearInterval(S),x.disconnect()}}},[]);let b=Object.assign(Object.assign({},a),{style:Object.assign(Object.assign({},l),{margin:0}),open:m,visible:m,getPopupContainer:()=>c.current});n&&(b=n(b)),t&&Object.assign(b,{[t]:{overflow:{adjustX:!1,adjustY:!1}}});const C={paddingBottom:u,position:"relative",minWidth:f};return p.createElement("div",{ref:c,style:C},p.createElement(e,Object.assign({},b)))}),xg=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 Ad=function(t){var n=t.className,r=t.customizeIcon,o=t.customizeIconProps,i=t.children,a=t.onMouseDown,s=t.onClick,l=typeof r=="function"?r(o):r;return p.createElement("span",{className:n,onMouseDown:function(u){u.preventDefault(),a==null||a(u)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:s,"aria-hidden":!0},l!==void 0?l:p.createElement("span",{className:te(n.split(/\s+/).map(function(c){return"".concat(c,"-icon")}))},i))},mz=function(t,n,r,o,i){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,s=arguments.length>6?arguments[6]:void 0,l=arguments.length>7?arguments[7]:void 0,c=O.useMemo(function(){if(ht(o)==="object")return o.clearIcon;if(i)return i},[o,i]),u=O.useMemo(function(){return!!(!a&&o&&(r.length||s)&&!(l==="combobox"&&s===""))},[o,a,r.length,s,l]);return{allowClear:u,clearIcon:O.createElement(Ad,{className:"".concat(t,"-clear"),onMouseDown:n,customizeIcon:c},"×")}},CE=p.createContext(null);function gz(){return p.useContext(CE)}function vz(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,t=p.useState(!1),n=de(t,2),r=n[0],o=n[1],i=p.useRef(null),a=function(){window.clearTimeout(i.current)};p.useEffect(function(){return a},[]);var s=function(c,u){a(),i.current=window.setTimeout(function(){o(c),u&&u()},e)};return[r,s,a]}function SE(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,t=p.useRef(null),n=p.useRef(null);p.useEffect(function(){return function(){window.clearTimeout(n.current)}},[]);function r(o){(o||t.current===null)&&(t.current=o),window.clearTimeout(n.current),n.current=window.setTimeout(function(){t.current=null},e)}return[function(){return t.current},r]}function bz(e,t,n,r){var o=p.useRef(null);o.current={open:t,triggerOpen:n,customizedTrigger:r},p.useEffect(function(){function i(a){var s;if(!((s=o.current)!==null&&s!==void 0&&s.customizedTrigger)){var l=a.target;l.shadowRoot&&a.composed&&(l=a.composedPath()[0]||l),o.current.open&&e().filter(function(c){return c}).every(function(c){return!c.contains(l)&&c!==l})&&o.current.triggerOpen(!1)}}return window.addEventListener("mousedown",i),function(){return window.removeEventListener("mousedown",i)}},[])}function yz(e){return e&&![at.ESC,at.SHIFT,at.BACKSPACE,at.TAB,at.WIN_KEY,at.ALT,at.META,at.WIN_KEY_RIGHT,at.CTRL,at.SEMICOLON,at.EQUALS,at.CAPS_LOCK,at.CONTEXT_MENU,at.F1,at.F2,at.F3,at.F4,at.F5,at.F6,at.F7,at.F8,at.F9,at.F10,at.F11,at.F12].includes(e)}var Cz=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],ha=void 0;function Sz(e,t){var n=e.prefixCls,r=e.invalidate,o=e.item,i=e.renderItem,a=e.responsive,s=e.responsiveDisabled,l=e.registerSize,c=e.itemKey,u=e.className,d=e.style,f=e.children,h=e.display,m=e.order,v=e.component,g=v===void 0?"div":v,y=Mt(e,Cz),b=a&&!h;function C(N){l(c,N)}p.useEffect(function(){return function(){C(null)}},[]);var x=i&&o!==ha?i(o,{index:m}):f,S;r||(S={opacity:b?0:1,height:b?0:ha,overflowY:b?"hidden":ha,order:a?m:ha,pointerEvents:b?"none":ha,position:b?"absolute":ha});var w={};b&&(w["aria-hidden"]=!0);var E=p.createElement(g,He({className:te(!r&&n,u),style:q(q({},S),d)},w,y,{ref:t}),x);return a&&(E=p.createElement(Fo,{onResize:function($){var M=$.offsetWidth;C(M)},disabled:s},E)),E}var Bs=p.forwardRef(Sz);Bs.displayName="Item";function xz(e){if(typeof MessageChannel>"u")Ht(e);else{var t=new MessageChannel;t.port1.onmessage=function(){return e()},t.port2.postMessage(void 0)}}function wz(){var e=p.useRef(null),t=function(r){e.current||(e.current=[],xz(function(){jr.unstable_batchedUpdates(function(){e.current.forEach(function(o){o()}),e.current=null})})),e.current.push(r)};return t}function bs(e,t){var n=p.useState(t),r=de(n,2),o=r[0],i=r[1],a=tn(function(s){e(function(){i(s)})});return[o,a]}var gu=O.createContext(null),Ez=["component"],Oz=["className"],$z=["className"],Nz=function(t,n){var r=p.useContext(gu);if(!r){var o=t.component,i=o===void 0?"div":o,a=Mt(t,Ez);return p.createElement(i,He({},a,{ref:n}))}var s=r.className,l=Mt(r,Oz),c=t.className,u=Mt(t,$z);return p.createElement(gu.Provider,{value:null},p.createElement(Bs,He({ref:n,className:te(s,c)},l,u)))},xE=p.forwardRef(Nz);xE.displayName="RawItem";var Mz=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],wE="responsive",EE="invalidate";function Rz(e){return"+ ".concat(e.length," ...")}function Iz(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,l=e.itemKey,c=e.itemWidth,u=c===void 0?10:c,d=e.ssr,f=e.style,h=e.className,m=e.maxCount,v=e.renderRest,g=e.renderRawRest,y=e.suffix,b=e.component,C=b===void 0?"div":b,x=e.itemComponent,S=e.onVisibleChange,w=Mt(e,Mz),E=d==="full",N=wz(),$=bs(N,null),M=de($,2),R=M[0],k=M[1],D=R||0,A=bs(N,new Map),L=de(A,2),T=L[0],I=L[1],_=bs(N,0),W=de(_,2),H=W[0],B=W[1],K=bs(N,0),Y=de(K,2),V=Y[0],G=Y[1],Q=bs(N,0),ce=de(Q,2),Z=ce[0],he=ce[1],ye=O.useState(null),fe=de(ye,2),ae=fe[0],ve=fe[1],ne=O.useState(null),se=de(ne,2),pe=se[0],Ne=se[1],Me=p.useMemo(function(){return pe===null&&E?Number.MAX_SAFE_INTEGER:pe||0},[pe,R]),$e=O.useState(!1),Be=de($e,2),F=Be[0],be=Be[1],ue="".concat(r,"-item"),me=Math.max(H,V),Re=m===wE,Te=i.length&&Re,xe=m===EE,Ve=Te||typeof m=="number"&&i.length>m,qe=O.useMemo(function(){var Ze=i;return Te?R===null&&E?Ze=i:Ze=i.slice(0,Math.min(i.length,D/u)):typeof m=="number"&&(Ze=i.slice(0,m)),Ze},[i,u,R,m,Te]),Pe=O.useMemo(function(){return Te?i.slice(Me+1):i.slice(qe.length)},[i,qe,Te,Me]),Ke=O.useCallback(function(Ze,Xe){var Qe;return typeof l=="function"?l(Ze):(Qe=l&&(Ze==null?void 0:Ze[l]))!==null&&Qe!==void 0?Qe:Xe},[l]),Je=O.useCallback(a||function(Ze){return Ze},[a]);function De(Ze,Xe,Qe){pe===Ze&&(Xe===void 0||Xe===ae)||(Ne(Ze),Qe||(be(Ze<i.length-1),S==null||S(Ze)),Xe!==void 0&&ve(Xe))}function ze(Ze,Xe){k(Xe.clientWidth)}function _e(Ze,Xe){I(function(Qe){var wt=new Map(Qe);return Xe===null?wt.delete(Ze):wt.set(Ze,Xe),wt})}function We(Ze,Xe){G(Xe),B(V)}function rt(Ze,Xe){he(Xe)}function gt(Ze){return T.get(Ke(qe[Ze],Ze))}cn(function(){if(D&&typeof me=="number"&&qe){var Ze=Z,Xe=qe.length,Qe=Xe-1;if(!Xe){De(0,null);return}for(var wt=0;wt<Xe;wt+=1){var At=gt(wt);if(E&&(At=At||0),At===void 0){De(wt-1,void 0,!0);break}if(Ze+=At,Qe===0&&Ze<=D||wt===Qe-1&&Ze+gt(Qe)<=D){De(Qe,null);break}else if(Ze+me>D){De(wt-1,Ze-At-Z+V);break}}y&&gt(0)+Z>D&&ve(null)}},[D,T,V,Z,Ke,qe]);var Lt=F&&!!Pe.length,Tt={};ae!==null&&Te&&(Tt={position:"absolute",left:ae,top:0});var Zt={prefixCls:ue,responsive:Te,component:x,invalidate:xe},tt=s?function(Ze,Xe){var Qe=Ke(Ze,Xe);return p.createElement(gu.Provider,{key:Qe,value:q(q({},Zt),{},{order:Xe,item:Ze,itemKey:Qe,registerSize:_e,display:Xe<=Me})},s(Ze,Xe))}:function(Ze,Xe){var Qe=Ke(Ze,Xe);return p.createElement(Bs,He({},Zt,{order:Xe,key:Qe,item:Ze,renderItem:Je,itemKey:Qe,registerSize:_e,display:Xe<=Me}))},Ue={order:Lt?Me:Number.MAX_SAFE_INTEGER,className:"".concat(ue,"-rest"),registerSize:We,display:Lt},ft=v||Rz,dt=g?p.createElement(gu.Provider,{value:q(q({},Zt),Ue)},g(Pe)):p.createElement(Bs,He({},Zt,Ue),typeof ft=="function"?ft(Pe):ft),st=p.createElement(C,He({className:te(!xe&&r,h),style:f,ref:t},w),qe.map(tt),Ve?dt:null,y&&p.createElement(Bs,He({},Zt,{responsive:Re,responsiveDisabled:!Te,order:Me,className:"".concat(ue,"-suffix"),registerSize:rt,display:!0,style:Tt}),y));return Re?p.createElement(Fo,{onResize:ze,disabled:!Te},st):st}var go=p.forwardRef(Iz);go.displayName="Overflow";go.Item=xE;go.RESPONSIVE=wE;go.INVALIDATE=EE;var Tz=function(t,n){var r,o=t.prefixCls,i=t.id,a=t.inputElement,s=t.disabled,l=t.tabIndex,c=t.autoFocus,u=t.autoComplete,d=t.editable,f=t.activeDescendantId,h=t.value,m=t.maxLength,v=t.onKeyDown,g=t.onMouseDown,y=t.onChange,b=t.onPaste,C=t.onCompositionStart,x=t.onCompositionEnd,S=t.onBlur,w=t.open,E=t.attrs,N=a||p.createElement("input",null),$=N,M=$.ref,R=$.props,k=R.onKeyDown,D=R.onChange,A=R.onMouseDown,L=R.onCompositionStart,T=R.onCompositionEnd,I=R.onBlur,_=R.style;return yo(!("maxLength"in N.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),N=p.cloneElement(N,q(q(q({type:"search"},R),{},{id:i,ref:mr(n,M),disabled:s,tabIndex:l,autoComplete:u||"off",autoFocus:c,className:te("".concat(o,"-selection-search-input"),(r=N)===null||r===void 0||(r=r.props)===null||r===void 0?void 0:r.className),role:"combobox","aria-expanded":w||!1,"aria-haspopup":"listbox","aria-owns":"".concat(i,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(i,"_list"),"aria-activedescendant":w?f:void 0},E),{},{value:d?h:"",maxLength:m,readOnly:!d,unselectable:d?null:"on",style:q(q({},_),{},{opacity:d?null:0}),onKeyDown:function(H){v(H),k&&k(H)},onMouseDown:function(H){g(H),A&&A(H)},onChange:function(H){y(H),D&&D(H)},onCompositionStart:function(H){C(H),L&&L(H)},onCompositionEnd:function(H){x(H),T&&T(H)},onPaste:b,onBlur:function(H){S(H),I&&I(H)}})),N},wg=p.forwardRef(Tz);process.env.NODE_ENV!=="production"&&(wg.displayName="Input");function Eg(e){return Array.isArray(e)?e:e!==void 0?[e]:[]}var Az=typeof window<"u"&&window.document&&window.document.documentElement,Pz=process.env.NODE_ENV!=="test"&&Az;function kz(e){return e!=null}function Dz(e){return!e&&e!==0}function uy(e){return["string","number"].includes(ht(e))}function OE(e){var t=void 0;return e&&(uy(e.title)?t=e.title.toString():uy(e.label)&&(t=e.label.toString())),t}function _z(e,t){Pz?p.useLayoutEffect(e,t):p.useEffect(e,t)}function Lz(e){var t;return(t=e.key)!==null&&t!==void 0?t:e.value}var dy=function(t){t.preventDefault(),t.stopPropagation()},jz=function(t){var n=t.id,r=t.prefixCls,o=t.values,i=t.open,a=t.searchValue,s=t.autoClearSearchValue,l=t.inputRef,c=t.placeholder,u=t.disabled,d=t.mode,f=t.showSearch,h=t.autoFocus,m=t.autoComplete,v=t.activeDescendantId,g=t.tabIndex,y=t.removeIcon,b=t.maxTagCount,C=t.maxTagTextLength,x=t.maxTagPlaceholder,S=x===void 0?function(ne){return"+ ".concat(ne.length," ...")}:x,w=t.tagRender,E=t.onToggleOpen,N=t.onRemove,$=t.onInputChange,M=t.onInputPaste,R=t.onInputKeyDown,k=t.onInputMouseDown,D=t.onInputCompositionStart,A=t.onInputCompositionEnd,L=t.onInputBlur,T=p.useRef(null),I=O.useState(0),_=de(I,2),W=_[0],H=_[1],B=O.useState(!1),K=de(B,2),Y=K[0],V=K[1],G="".concat(r,"-selection"),Q=i||d==="multiple"&&s===!1||d==="tags"?a:"",ce=d==="tags"||d==="multiple"&&s===!1||f&&(i||Y);_z(function(){H(T.current.scrollWidth)},[Q]);var Z=function(se,pe,Ne,Me,$e){return p.createElement("span",{title:OE(se),className:te("".concat(G,"-item"),U({},"".concat(G,"-item-disabled"),Ne))},p.createElement("span",{className:"".concat(G,"-item-content")},pe),Me&&p.createElement(Ad,{className:"".concat(G,"-item-remove"),onMouseDown:dy,onClick:$e,customizeIcon:y},"×"))},he=function(se,pe,Ne,Me,$e,Be){var F=function(ue){dy(ue),E(!i)};return p.createElement("span",{onMouseDown:F},w({label:pe,value:se,disabled:Ne,closable:Me,onClose:$e,isMaxTag:!!Be}))},ye=function(se){var pe=se.disabled,Ne=se.label,Me=se.value,$e=!u&&!pe,Be=Ne;if(typeof C=="number"&&(typeof Ne=="string"||typeof Ne=="number")){var F=String(Be);F.length>C&&(Be="".concat(F.slice(0,C),"..."))}var be=function(me){me&&me.stopPropagation(),N(se)};return typeof w=="function"?he(Me,Be,pe,$e,be):Z(se,Be,pe,$e,be)},fe=function(se){if(!o.length)return null;var pe=typeof S=="function"?S(se):S;return typeof w=="function"?he(void 0,pe,!1,!1,void 0,!0):Z({title:pe},pe,!1)},ae=p.createElement("div",{className:"".concat(G,"-search"),style:{width:W},onFocus:function(){V(!0)},onBlur:function(){V(!1)}},p.createElement(wg,{ref:l,open:i,prefixCls:r,id:n,inputElement:null,disabled:u,autoFocus:h,autoComplete:m,editable:ce,activeDescendantId:v,value:Q,onKeyDown:R,onMouseDown:k,onChange:$,onPaste:M,onCompositionStart:D,onCompositionEnd:A,onBlur:L,tabIndex:g,attrs:eo(t,!0)}),p.createElement("span",{ref:T,className:"".concat(G,"-search-mirror"),"aria-hidden":!0},Q," ")),ve=p.createElement(go,{prefixCls:"".concat(G,"-overflow"),data:o,renderItem:ye,renderRest:fe,suffix:ae,itemKey:Lz,maxCount:b});return p.createElement("span",{className:"".concat(G,"-wrap")},ve,!o.length&&!Q&&p.createElement("span",{className:"".concat(G,"-placeholder")},c))},Bz=function(t){var n=t.inputElement,r=t.prefixCls,o=t.id,i=t.inputRef,a=t.disabled,s=t.autoFocus,l=t.autoComplete,c=t.activeDescendantId,u=t.mode,d=t.open,f=t.values,h=t.placeholder,m=t.tabIndex,v=t.showSearch,g=t.searchValue,y=t.activeValue,b=t.maxLength,C=t.onInputKeyDown,x=t.onInputMouseDown,S=t.onInputChange,w=t.onInputPaste,E=t.onInputCompositionStart,N=t.onInputCompositionEnd,$=t.onInputBlur,M=t.title,R=p.useState(!1),k=de(R,2),D=k[0],A=k[1],L=u==="combobox",T=L||v,I=f[0],_=g||"";L&&y&&!D&&(_=y),p.useEffect(function(){L&&A(!1)},[L,y]);var W=u!=="combobox"&&!d&&!v?!1:!!_,H=M===void 0?OE(I):M,B=p.useMemo(function(){return I?null:p.createElement("span",{className:"".concat(r,"-selection-placeholder"),style:W?{visibility:"hidden"}:void 0},h)},[I,W,h,r]);return p.createElement("span",{className:"".concat(r,"-selection-wrap")},p.createElement("span",{className:"".concat(r,"-selection-search")},p.createElement(wg,{ref:i,prefixCls:r,id:o,open:d,inputElement:n,disabled:a,autoFocus:s,autoComplete:l,editable:T,activeDescendantId:c,value:_,onKeyDown:C,onMouseDown:x,onChange:function(Y){A(!0),S(Y)},onPaste:w,onCompositionStart:E,onCompositionEnd:N,onBlur:$,tabIndex:m,attrs:eo(t,!0),maxLength:L?b:void 0})),!L&&I?p.createElement("span",{className:"".concat(r,"-selection-item"),title:H,style:W?{visibility:"hidden"}:void 0},I.label):null,B)},zz=function(t,n){var r=O.useRef(null),o=O.useRef(!1),i=t.prefixCls,a=t.open,s=t.mode,l=t.showSearch,c=t.tokenWithEnter,u=t.disabled,d=t.prefix,f=t.autoClearSearchValue,h=t.onSearch,m=t.onSearchSubmit,v=t.onToggleOpen,g=t.onInputKeyDown,y=t.onInputBlur,b=t.domRef;p.useImperativeHandle(n,function(){return{focus:function(H){r.current.focus(H)},blur:function(){r.current.blur()}}});var C=SE(0),x=de(C,2),S=x[0],w=x[1],E=function(H){var B=H.which,K=r.current instanceof HTMLTextAreaElement;!K&&a&&(B===at.UP||B===at.DOWN)&&H.preventDefault(),g&&g(H),B===at.ENTER&&s==="tags"&&!o.current&&!a&&(m==null||m(H.target.value)),!(K&&!a&&~[at.UP,at.DOWN,at.LEFT,at.RIGHT].indexOf(B))&&yz(B)&&v(!0)},N=function(){w(!0)},$=O.useRef(null),M=function(H){h(H,!0,o.current)!==!1&&v(!0)},R=function(){o.current=!0},k=function(H){o.current=!1,s!=="combobox"&&M(H.target.value)},D=function(H){var B=H.target.value;if(c&&$.current&&/[\r\n]/.test($.current)){var K=$.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");B=B.replace(K,$.current)}$.current=null,M(B)},A=function(H){var B=H.clipboardData,K=B==null?void 0:B.getData("text");$.current=K||""},L=function(H){var B=H.target;if(B!==r.current){var K=document.body.style.msTouchAction!==void 0;K?setTimeout(function(){r.current.focus()}):r.current.focus()}},T=function(H){var B=S();H.target!==r.current&&!B&&!(s==="combobox"&&u)&&H.preventDefault(),(s!=="combobox"&&(!l||!B)||!a)&&(a&&f!==!1&&h("",!0,!1),v())},I={inputRef:r,onInputKeyDown:E,onInputMouseDown:N,onInputChange:D,onInputPaste:A,onInputCompositionStart:R,onInputCompositionEnd:k,onInputBlur:y},_=s==="multiple"||s==="tags"?p.createElement(jz,He({},t,I)):p.createElement(Bz,He({},t,I));return p.createElement("div",{ref:b,className:"".concat(i,"-selector"),onClick:L,onMouseDown:T},d&&p.createElement("div",{className:"".concat(i,"-prefix")},d),_)},$E=p.forwardRef(zz);process.env.NODE_ENV!=="production"&&($E.displayName="Selector");function Fz(e){var t=e.prefixCls,n=e.align,r=e.arrow,o=e.arrowPos,i=r||{},a=i.className,s=i.content,l=o.x,c=l===void 0?0:l,u=o.y,d=u===void 0?0:u,f=p.useRef();if(!n||!n.points)return null;var h={position:"absolute"};if(n.autoArrow!==!1){var m=n.points[0],v=n.points[1],g=m[0],y=m[1],b=v[0],C=v[1];g===b||!["t","b"].includes(g)?h.top=d:g==="t"?h.top=0:h.bottom=0,y===C||!["l","r"].includes(y)?h.left=c:y==="l"?h.left=0:h.right=0}return p.createElement("div",{ref:f,className:te("".concat(t,"-arrow"),a),style:h},s)}function Hz(e){var t=e.prefixCls,n=e.open,r=e.zIndex,o=e.mask,i=e.motion;return o?p.createElement(So,He({},i,{motionAppear:!0,visible:n,removeOnLeave:!0}),function(a){var s=a.className;return p.createElement("div",{style:{zIndex:r},className:te("".concat(t,"-mask"),s)})}):null}var NE=p.memo(function(e){var t=e.children;return t},function(e,t){return t.cache});process.env.NODE_ENV!=="production"&&(NE.displayName="PopupContent");var ME=p.forwardRef(function(e,t){var n=e.popup,r=e.className,o=e.prefixCls,i=e.style,a=e.target,s=e.onVisibleChanged,l=e.open,c=e.keepDom,u=e.fresh,d=e.onClick,f=e.mask,h=e.arrow,m=e.arrowPos,v=e.align,g=e.motion,y=e.maskMotion,b=e.forceRender,C=e.getPopupContainer,x=e.autoDestroy,S=e.portal,w=e.zIndex,E=e.onMouseEnter,N=e.onMouseLeave,$=e.onPointerEnter,M=e.onPointerDownCapture,R=e.ready,k=e.offsetX,D=e.offsetY,A=e.offsetR,L=e.offsetB,T=e.onAlign,I=e.onPrepare,_=e.stretch,W=e.targetWidth,H=e.targetHeight,B=typeof n=="function"?n():n,K=l||c,Y=(C==null?void 0:C.length)>0,V=p.useState(!C||!Y),G=de(V,2),Q=G[0],ce=G[1];if(cn(function(){!Q&&Y&&a&&ce(!0)},[Q,Y,a]),!Q)return null;var Z="auto",he={left:"-1000vw",top:"-1000vh",right:Z,bottom:Z};if(R||!l){var ye,fe=v.points,ae=v.dynamicInset||((ye=v._experimental)===null||ye===void 0?void 0:ye.dynamicInset),ve=ae&&fe[0][1]==="r",ne=ae&&fe[0][0]==="b";ve?(he.right=A,he.left=Z):(he.left=k,he.right=Z),ne?(he.bottom=L,he.top=Z):(he.top=D,he.bottom=Z)}var se={};return _&&(_.includes("height")&&H?se.height=H:_.includes("minHeight")&&H&&(se.minHeight=H),_.includes("width")&&W?se.width=W:_.includes("minWidth")&&W&&(se.minWidth=W)),l||(se.pointerEvents="none"),p.createElement(S,{open:b||K,getContainer:C&&function(){return C(a)},autoDestroy:x},p.createElement(Hz,{prefixCls:o,open:l,zIndex:w,mask:f,motion:y}),p.createElement(Fo,{onResize:T,disabled:!l},function(pe){return p.createElement(So,He({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:b,leavedClassName:"".concat(o,"-hidden")},g,{onAppearPrepare:I,onEnterPrepare:I,visible:l,onVisibleChanged:function(Me){var $e;g==null||($e=g.onVisibleChanged)===null||$e===void 0||$e.call(g,Me),s(Me)}}),function(Ne,Me){var $e=Ne.className,Be=Ne.style,F=te(o,$e,r);return p.createElement("div",{ref:mr(pe,t,Me),className:F,style:q(q(q(q({"--arrow-x":"".concat(m.x||0,"px"),"--arrow-y":"".concat(m.y||0,"px")},he),se),Be),{},{boxSizing:"border-box",zIndex:w},i),onMouseEnter:E,onMouseLeave:N,onPointerEnter:$,onClick:d,onPointerDownCapture:M},h&&p.createElement(Fz,{prefixCls:o,arrow:h,arrowPos:m,align:v}),p.createElement(NE,{cache:!l&&!u},B))})}))});process.env.NODE_ENV!=="production"&&(ME.displayName="Popup");var RE=p.forwardRef(function(e,t){var n=e.children,r=e.getTriggerDOMNode,o=wi(n),i=p.useCallback(function(s){Gm(t,r?r(s):s)},[r]),a=xi(i,ra(n));return o?p.cloneElement(n,{ref:a}):n});process.env.NODE_ENV!=="production"&&(RE.displayName="TriggerWrapper");var fy=p.createContext(null);function hy(e){return e?Array.isArray(e)?e:[e]:[]}function Vz(e,t,n,r){return p.useMemo(function(){var o=hy(n??t),i=hy(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 Wz(){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 Uz(e,t,n,r){for(var o=n.points,i=Object.keys(e),a=0;a<i.length;a+=1){var s,l=i[a];if(Wz((s=e[l])===null||s===void 0?void 0:s.points,o,r))return"".concat(t,"-placement-").concat(l)}return""}function py(e,t,n,r){return t||(n?{motionName:"".concat(e,"-").concat(n)}:r?{motionName:r}:null)}function Dl(e){return e.ownerDocument.defaultView}function Hp(e){for(var t=[],n=e==null?void 0:e.parentElement,r=["hidden","scroll","clip","auto"];n;){var o=Dl(n).getComputedStyle(n),i=o.overflowX,a=o.overflowY,s=o.overflow;[i,a,s].some(function(l){return r.includes(l)})&&t.push(n),n=n.parentElement}return t}function dl(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(e)?t:e}function ys(e){return dl(parseFloat(e),0)}function my(e,t){var n=q({},e);return(t||[]).forEach(function(r){if(!(r instanceof HTMLBodyElement||r instanceof HTMLHtmlElement)){var o=Dl(r).getComputedStyle(r),i=o.overflow,a=o.overflowClipMargin,s=o.borderTopWidth,l=o.borderBottomWidth,c=o.borderLeftWidth,u=o.borderRightWidth,d=r.getBoundingClientRect(),f=r.offsetHeight,h=r.clientHeight,m=r.offsetWidth,v=r.clientWidth,g=ys(s),y=ys(l),b=ys(c),C=ys(u),x=dl(Math.round(d.width/m*1e3)/1e3),S=dl(Math.round(d.height/f*1e3)/1e3),w=(m-v-b-C)*x,E=(f-h-g-y)*S,N=g*S,$=y*S,M=b*x,R=C*x,k=0,D=0;if(i==="clip"){var A=ys(a);k=A*x,D=A*S}var L=d.x+M-k,T=d.y+N-D,I=L+d.width+2*k-M-R-w,_=T+d.height+2*D-N-$-E;n.left=Math.max(n.left,L),n.top=Math.max(n.top,T),n.right=Math.min(n.right,I),n.bottom=Math.min(n.bottom,_)}}),n}function gy(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 vy(e,t){var n=t||[],r=de(n,2),o=r[0],i=r[1];return[gy(e.width,o),gy(e.height,i)]}function by(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[e[0],e[1]]}function pa(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 qo(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 qz(e,t,n,r,o,i,a){var s=p.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:o[r]||{}}),l=de(s,2),c=l[0],u=l[1],d=p.useRef(0),f=p.useMemo(function(){return t?Hp(t):[]},[t]),h=p.useRef({}),m=function(){h.current={}};e||m();var v=tn(function(){if(t&&n&&e){let er=function(Wo,ao){var Ur=arguments.length>2&&arguments[2]!==void 0?arguments[2]:me,as=V.x+Wo,Hl=V.y+ao,Ud=as+ve,qd=Hl+ae,Kd=Math.max(as,Ur.left),mt=Math.max(Hl,Ur.top),Nt=Math.min(Ud,Ur.right),Cn=Math.min(qd,Ur.bottom);return Math.max(0,(Nt-Kd)*(Cn-mt))},is=function(){Vt=V.y+Qe,qt=Vt+ae,Jt=V.x+Xe,Pn=Jt+ve};var b,C,x,S,w=t,E=w.ownerDocument,N=Dl(w),$=N.getComputedStyle(w),M=$.width,R=$.height,k=$.position,D=w.style.left,A=w.style.top,L=w.style.right,T=w.style.bottom,I=w.style.overflow,_=q(q({},o[r]),i),W=E.createElement("div");(b=w.parentElement)===null||b===void 0||b.appendChild(W),W.style.left="".concat(w.offsetLeft,"px"),W.style.top="".concat(w.offsetTop,"px"),W.style.position=k,W.style.height="".concat(w.offsetHeight,"px"),W.style.width="".concat(w.offsetWidth,"px"),w.style.left="0",w.style.top="0",w.style.right="auto",w.style.bottom="auto",w.style.overflow="hidden";var H;if(Array.isArray(n))H={x:n[0],y:n[1],width:0,height:0};else{var B,K,Y=n.getBoundingClientRect();Y.x=(B=Y.x)!==null&&B!==void 0?B:Y.left,Y.y=(K=Y.y)!==null&&K!==void 0?K:Y.top,H={x:Y.x,y:Y.y,width:Y.width,height:Y.height}}var V=w.getBoundingClientRect();V.x=(C=V.x)!==null&&C!==void 0?C:V.left,V.y=(x=V.y)!==null&&x!==void 0?x:V.top;var G=E.documentElement,Q=G.clientWidth,ce=G.clientHeight,Z=G.scrollWidth,he=G.scrollHeight,ye=G.scrollTop,fe=G.scrollLeft,ae=V.height,ve=V.width,ne=H.height,se=H.width,pe={left:0,top:0,right:Q,bottom:ce},Ne={left:-fe,top:-ye,right:Z-fe,bottom:he-ye},Me=_.htmlRegion,$e="visible",Be="visibleFirst";Me!=="scroll"&&Me!==Be&&(Me=$e);var F=Me===Be,be=my(Ne,f),ue=my(pe,f),me=Me===$e?ue:be,Re=F?ue:me;w.style.left="auto",w.style.top="auto",w.style.right="0",w.style.bottom="0";var Te=w.getBoundingClientRect();w.style.left=D,w.style.top=A,w.style.right=L,w.style.bottom=T,w.style.overflow=I,(S=w.parentElement)===null||S===void 0||S.removeChild(W);var xe=dl(Math.round(ve/parseFloat(M)*1e3)/1e3),Ve=dl(Math.round(ae/parseFloat(R)*1e3)/1e3);if(xe===0||Ve===0||el(n)&&!sg(n))return;var qe=_.offset,Pe=_.targetOffset,Ke=vy(V,qe),Je=de(Ke,2),De=Je[0],ze=Je[1],_e=vy(H,Pe),We=de(_e,2),rt=We[0],gt=We[1];H.x-=rt,H.y-=gt;var Lt=_.points||[],Tt=de(Lt,2),Zt=Tt[0],tt=Tt[1],Ue=by(tt),ft=by(Zt),dt=pa(H,Ue),st=pa(V,ft),Ze=q({},_),Xe=dt.x-st.x+De,Qe=dt.y-st.y+ze,wt=er(Xe,Qe),At=er(Xe,Qe,ue),it=pa(H,["t","l"]),Ge=pa(V,["t","l"]),et=pa(H,["b","r"]),lt=pa(V,["b","r"]),ct=_.overflow||{},vt=ct.adjustX,jt=ct.adjustY,It=ct.shiftX,zt=ct.shiftY,Pt=function(ao){return typeof ao=="boolean"?ao:ao>=0},Vt,qt,Jt,Pn;is();var Ye=Pt(jt),J=ft[0]===Ue[0];if(Ye&&ft[0]==="t"&&(qt>Re.bottom||h.current.bt)){var le=Qe;J?le-=ae-ne:le=it.y-lt.y-ze;var we=er(Xe,le),ke=er(Xe,le,ue);we>wt||we===wt&&(!F||ke>=At)?(h.current.bt=!0,Qe=le,ze=-ze,Ze.points=[qo(ft,0),qo(Ue,0)]):h.current.bt=!1}if(Ye&&ft[0]==="b"&&(Vt<Re.top||h.current.tb)){var Ie=Qe;J?Ie+=ae-ne:Ie=et.y-Ge.y-ze;var ot=er(Xe,Ie),bt=er(Xe,Ie,ue);ot>wt||ot===wt&&(!F||bt>=At)?(h.current.tb=!0,Qe=Ie,ze=-ze,Ze.points=[qo(ft,0),qo(Ue,0)]):h.current.tb=!1}var St=Pt(vt),Yt=ft[1]===Ue[1];if(St&&ft[1]==="l"&&(Pn>Re.right||h.current.rl)){var en=Xe;Yt?en-=ve-se:en=it.x-lt.x-De;var kt=er(en,Qe),ln=er(en,Qe,ue);kt>wt||kt===wt&&(!F||ln>=At)?(h.current.rl=!0,Xe=en,De=-De,Ze.points=[qo(ft,1),qo(Ue,1)]):h.current.rl=!1}if(St&&ft[1]==="r"&&(Jt<Re.left||h.current.lr)){var on=Xe;Yt?on+=ve-se:on=et.x-Ge.x-De;var kn=er(on,Qe),zn=er(on,Qe,ue);kn>wt||kn===wt&&(!F||zn>=At)?(h.current.lr=!0,Xe=on,De=-De,Ze.points=[qo(ft,1),qo(Ue,1)]):h.current.lr=!1}is();var P=It===!0?0:It;typeof P=="number"&&(Jt<ue.left&&(Xe-=Jt-ue.left-De,H.x+se<ue.left+P&&(Xe+=H.x-ue.left+se-P)),Pn>ue.right&&(Xe-=Pn-ue.right-De,H.x>ue.right-P&&(Xe+=H.x-ue.right+P)));var X=zt===!0?0:zt;typeof X=="number"&&(Vt<ue.top&&(Qe-=Vt-ue.top-ze,H.y+ne<ue.top+X&&(Qe+=H.y-ue.top+ne-X)),qt>ue.bottom&&(Qe-=qt-ue.bottom-ze,H.y>ue.bottom-X&&(Qe+=H.y-ue.bottom+X)));var z=V.x+Xe,re=z+ve,ie=V.y+Qe,ee=ie+ae,Ee=H.x,Ce=Ee+se,ge=H.y,Se=ge+ne,Oe=Math.max(z,Ee),je=Math.min(re,Ce),ut=(Oe+je)/2,Et=ut-z,$t=Math.max(ie,ge),Kt=Math.min(ee,Se),Gt=($t+Kt)/2,hn=Gt-ie;a==null||a(t,Ze);var On=Te.right-V.x-(Xe+V.width),wn=Te.bottom-V.y-(Qe+V.height);xe===1&&(Xe=Math.round(Xe),On=Math.round(On)),Ve===1&&(Qe=Math.round(Qe),wn=Math.round(wn));var $i={ready:!0,offsetX:Xe/xe,offsetY:Qe/Ve,offsetR:On/xe,offsetB:wn/Ve,arrowX:Et/xe,arrowY:hn/Ve,scaleX:xe,scaleY:Ve,align:Ze};u($i)}}),g=function(){d.current+=1;var C=d.current;Promise.resolve().then(function(){d.current===C&&v()})},y=function(){u(function(C){return q(q({},C),{},{ready:!1})})};return cn(y,[r]),cn(function(){e||y()},[e]),[c.ready,c.offsetX,c.offsetY,c.offsetR,c.offsetB,c.arrowX,c.arrowY,c.scaleX,c.scaleY,c.align,g]}function Kz(e,t,n,r,o){cn(function(){if(e&&t&&n){let d=function(){r(),o()};var i=t,a=n,s=Hp(i),l=Hp(a),c=Dl(a),u=new Set([c].concat(Le(s),Le(l)));return u.forEach(function(f){f.addEventListener("scroll",d,{passive:!0})}),c.addEventListener("resize",d,{passive:!0}),r(),function(){u.forEach(function(f){f.removeEventListener("scroll",d),c.removeEventListener("resize",d)})}}},[e,t,n])}function Gz(e,t,n,r,o,i,a,s){var l=p.useRef(e);l.current=e;var c=p.useRef(!1);p.useEffect(function(){if(t&&r&&(!o||i)){var d=function(){c.current=!1},f=function(x){var S;l.current&&!a(((S=x.composedPath)===null||S===void 0||(S=S.call(x))===null||S===void 0?void 0:S[0])||x.target)&&!c.current&&s(!1)},h=Dl(r);h.addEventListener("pointerdown",d,!0),h.addEventListener("mousedown",f,!0),h.addEventListener("contextmenu",f,!0);var m=fu(n);if(m&&(m.addEventListener("mousedown",f,!0),m.addEventListener("contextmenu",f,!0)),process.env.NODE_ENV!=="production"){var v,g,y=n==null||(v=n.getRootNode)===null||v===void 0?void 0:v.call(n),b=(g=r.getRootNode)===null||g===void 0?void 0:g.call(r);yo(y===b,"trigger element and popup element should in same shadow root.")}return function(){h.removeEventListener("pointerdown",d,!0),h.removeEventListener("mousedown",f,!0),h.removeEventListener("contextmenu",f,!0),m&&(m.removeEventListener("mousedown",f,!0),m.removeEventListener("contextmenu",f,!0))}}},[t,n,r,o,i]);function u(){c.current=!0}return u}var Xz=["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 Yz(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Rd,t=p.forwardRef(function(n,r){var o=n.prefixCls,i=o===void 0?"rc-trigger-popup":o,a=n.children,s=n.action,l=s===void 0?"hover":s,c=n.showAction,u=n.hideAction,d=n.popupVisible,f=n.defaultPopupVisible,h=n.onPopupVisibleChange,m=n.afterPopupVisibleChange,v=n.mouseEnterDelay,g=n.mouseLeaveDelay,y=g===void 0?.1:g,b=n.focusDelay,C=n.blurDelay,x=n.mask,S=n.maskClosable,w=S===void 0?!0:S,E=n.getPopupContainer,N=n.forceRender,$=n.autoDestroy,M=n.destroyPopupOnHide,R=n.popup,k=n.popupClassName,D=n.popupStyle,A=n.popupPlacement,L=n.builtinPlacements,T=L===void 0?{}:L,I=n.popupAlign,_=n.zIndex,W=n.stretch,H=n.getPopupClassNameFromAlign,B=n.fresh,K=n.alignPoint,Y=n.onPopupClick,V=n.onPopupAlign,G=n.arrow,Q=n.popupMotion,ce=n.maskMotion,Z=n.popupTransitionName,he=n.popupAnimation,ye=n.maskTransitionName,fe=n.maskAnimation,ae=n.className,ve=n.getTriggerDOMNode,ne=Mt(n,Xz),se=$||M||!1,pe=p.useState(!1),Ne=de(pe,2),Me=Ne[0],$e=Ne[1];cn(function(){$e(xg())},[]);var Be=p.useRef({}),F=p.useContext(fy),be=p.useMemo(function(){return{registerSubPopup:function(Nt,Cn){Be.current[Nt]=Cn,F==null||F.registerSubPopup(Nt,Cn)}}},[F]),ue=Tl(),me=p.useState(null),Re=de(me,2),Te=Re[0],xe=Re[1],Ve=p.useRef(null),qe=tn(function(mt){Ve.current=mt,el(mt)&&Te!==mt&&xe(mt),F==null||F.registerSubPopup(ue,mt)}),Pe=p.useState(null),Ke=de(Pe,2),Je=Ke[0],De=Ke[1],ze=p.useRef(null),_e=tn(function(mt){el(mt)&&Je!==mt&&(De(mt),ze.current=mt)}),We=p.Children.only(a),rt=(We==null?void 0:We.props)||{},gt={},Lt=tn(function(mt){var Nt,Cn,Fn=Je;return(Fn==null?void 0:Fn.contains(mt))||((Nt=fu(Fn))===null||Nt===void 0?void 0:Nt.host)===mt||mt===Fn||(Te==null?void 0:Te.contains(mt))||((Cn=fu(Te))===null||Cn===void 0?void 0:Cn.host)===mt||mt===Te||Object.values(Be.current).some(function($n){return($n==null?void 0:$n.contains(mt))||mt===$n})}),Tt=py(i,Q,he,Z),Zt=py(i,ce,fe,ye),tt=p.useState(f||!1),Ue=de(tt,2),ft=Ue[0],dt=Ue[1],st=d??ft,Ze=tn(function(mt){d===void 0&&dt(mt)});cn(function(){dt(d||!1)},[d]);var Xe=p.useRef(st);Xe.current=st;var Qe=p.useRef([]);Qe.current=[];var wt=tn(function(mt){var Nt;Ze(mt),((Nt=Qe.current[Qe.current.length-1])!==null&&Nt!==void 0?Nt:st)!==mt&&(Qe.current.push(mt),h==null||h(mt))}),At=p.useRef(),it=function(){clearTimeout(At.current)},Ge=function(Nt){var Cn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;it(),Cn===0?wt(Nt):At.current=setTimeout(function(){wt(Nt)},Cn*1e3)};p.useEffect(function(){return it},[]);var et=p.useState(!1),lt=de(et,2),ct=lt[0],vt=lt[1];cn(function(mt){(!mt||st)&&vt(!0)},[st]);var jt=p.useState(null),It=de(jt,2),zt=It[0],Pt=It[1],Vt=p.useState(null),qt=de(Vt,2),Jt=qt[0],Pn=qt[1],Ye=function(Nt){Pn([Nt.clientX,Nt.clientY])},J=qz(st,Te,K&&Jt!==null?Jt:Je,A,T,I,V),le=de(J,11),we=le[0],ke=le[1],Ie=le[2],ot=le[3],bt=le[4],St=le[5],Yt=le[6],en=le[7],kt=le[8],ln=le[9],on=le[10],kn=Vz(Me,l,c,u),zn=de(kn,2),P=zn[0],X=zn[1],z=P.has("click"),re=X.has("click")||X.has("contextMenu"),ie=tn(function(){ct||on()}),ee=function(){Xe.current&&K&&re&&Ge(!1)};Kz(st,Je,Te,ie,ee),cn(function(){ie()},[Jt,A]),cn(function(){st&&!(T!=null&&T[A])&&ie()},[JSON.stringify(I)]);var Ee=p.useMemo(function(){var mt=Uz(T,i,ln,K);return te(mt,H==null?void 0:H(ln))},[ln,H,T,i,K]);p.useImperativeHandle(r,function(){return{nativeElement:ze.current,popupElement:Ve.current,forceAlign:ie}});var Ce=p.useState(0),ge=de(Ce,2),Se=ge[0],Oe=ge[1],je=p.useState(0),ut=de(je,2),Et=ut[0],$t=ut[1],Kt=function(){if(W&&Je){var Nt=Je.getBoundingClientRect();Oe(Nt.width),$t(Nt.height)}},Gt=function(){Kt(),ie()},hn=function(Nt){vt(!1),on(),m==null||m(Nt)},On=function(){return new Promise(function(Nt){Kt(),Pt(function(){return Nt})})};cn(function(){zt&&(on(),zt(),Pt(null))},[zt]);function wn(mt,Nt,Cn,Fn){gt[mt]=function($n){var Vl;Fn==null||Fn($n),Ge(Nt,Cn);for(var Gd=arguments.length,fv=new Array(Gd>1?Gd-1:0),Wl=1;Wl<Gd;Wl++)fv[Wl-1]=arguments[Wl];(Vl=rt[mt])===null||Vl===void 0||Vl.call.apply(Vl,[rt,$n].concat(fv))}}(z||re)&&(gt.onClick=function(mt){var Nt;Xe.current&&re?Ge(!1):!Xe.current&&z&&(Ye(mt),Ge(!0));for(var Cn=arguments.length,Fn=new Array(Cn>1?Cn-1:0),$n=1;$n<Cn;$n++)Fn[$n-1]=arguments[$n];(Nt=rt.onClick)===null||Nt===void 0||Nt.call.apply(Nt,[rt,mt].concat(Fn))});var $i=Gz(st,re,Je,Te,x,w,Lt,Ge),er=P.has("hover"),is=X.has("hover"),Wo,ao;er&&(wn("onMouseEnter",!0,v,function(mt){Ye(mt)}),wn("onPointerEnter",!0,v,function(mt){Ye(mt)}),Wo=function(Nt){(st||ct)&&Te!==null&&Te!==void 0&&Te.contains(Nt.target)&&Ge(!0,v)},K&&(gt.onMouseMove=function(mt){var Nt;(Nt=rt.onMouseMove)===null||Nt===void 0||Nt.call(rt,mt)})),is&&(wn("onMouseLeave",!1,y),wn("onPointerLeave",!1,y),ao=function(){Ge(!1,y)}),P.has("focus")&&wn("onFocus",!0,b),X.has("focus")&&wn("onBlur",!1,C),P.has("contextMenu")&&(gt.onContextMenu=function(mt){var Nt;Xe.current&&X.has("contextMenu")?Ge(!1):(Ye(mt),Ge(!0)),mt.preventDefault();for(var Cn=arguments.length,Fn=new Array(Cn>1?Cn-1:0),$n=1;$n<Cn;$n++)Fn[$n-1]=arguments[$n];(Nt=rt.onContextMenu)===null||Nt===void 0||Nt.call.apply(Nt,[rt,mt].concat(Fn))}),ae&&(gt.className=te(rt.className,ae));var Ur=q(q({},rt),gt),as={},Hl=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];Hl.forEach(function(mt){ne[mt]&&(as[mt]=function(){for(var Nt,Cn=arguments.length,Fn=new Array(Cn),$n=0;$n<Cn;$n++)Fn[$n]=arguments[$n];(Nt=Ur[mt])===null||Nt===void 0||Nt.call.apply(Nt,[Ur].concat(Fn)),ne[mt].apply(ne,Fn)})});var Ud=p.cloneElement(We,q(q({},Ur),as)),qd={x:St,y:Yt},Kd=G?q({},G!==!0?G:{}):null;return p.createElement(p.Fragment,null,p.createElement(Fo,{disabled:!st,ref:_e,onResize:Gt},p.createElement(RE,{getTriggerDOMNode:ve},Ud)),p.createElement(fy.Provider,{value:be},p.createElement(ME,{portal:e,ref:qe,prefixCls:i,popup:R,className:te(k,Ee),style:D,target:Je,onMouseEnter:Wo,onMouseLeave:ao,onPointerEnter:Wo,zIndex:_,open:st,keepDom:ct,fresh:B,onClick:Y,onPointerDownCapture:$i,mask:x,motion:Tt,maskMotion:Zt,onVisibleChanged:hn,onPrepare:On,forceRender:N,autoDestroy:se,getPopupContainer:E,align:ln,arrow:Kd,arrowPos:qd,ready:we,offsetX:ke,offsetY:Ie,offsetR:ot,offsetB:bt,onAlign:ie,stretch:W,targetWidth:Se/en,targetHeight:Et/kt})))});return process.env.NODE_ENV!=="production"&&(t.displayName="Trigger"),t}const Pd=Yz(Rd);var Jz=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Qz=function(t){var n=t===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:n,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:n,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:n,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:n,adjustY:1},htmlRegion:"scroll"}}},Zz=function(t,n){var r=t.prefixCls;t.disabled;var o=t.visible,i=t.children,a=t.popupElement,s=t.animation,l=t.transitionName,c=t.dropdownStyle,u=t.dropdownClassName,d=t.direction,f=d===void 0?"ltr":d,h=t.placement,m=t.builtinPlacements,v=t.dropdownMatchSelectWidth,g=t.dropdownRender,y=t.dropdownAlign,b=t.getPopupContainer,C=t.empty,x=t.getTriggerDOMNode,S=t.onPopupVisibleChange,w=t.onPopupMouseEnter,E=Mt(t,Jz),N="".concat(r,"-dropdown"),$=a;g&&($=g(a));var M=p.useMemo(function(){return m||Qz(v)},[m,v]),R=s?"".concat(N,"-").concat(s):l,k=typeof v=="number",D=p.useMemo(function(){return k?null:v===!1?"minWidth":"width"},[v,k]),A=c;k&&(A=q(q({},A),{},{width:v}));var L=p.useRef(null);return p.useImperativeHandle(n,function(){return{getPopupElement:function(){var I;return(I=L.current)===null||I===void 0?void 0:I.popupElement}}}),p.createElement(Pd,He({},E,{showAction:S?["click"]:[],hideAction:S?["click"]:[],popupPlacement:h||(f==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:M,prefixCls:N,popupTransitionName:R,popup:p.createElement("div",{onMouseEnter:w},$),ref:L,stretch:D,popupAlign:y,popupVisible:o,getPopupContainer:b,popupClassName:te(u,U({},"".concat(N,"-empty"),C)),popupStyle:A,getTriggerDOMNode:x,onPopupVisibleChange:S}),i)},IE=p.forwardRef(Zz);process.env.NODE_ENV!=="production"&&(IE.displayName="SelectTrigger");function yy(e,t){var n=e.key,r;return"value"in e&&(r=e.value),n??(r!==void 0?r:"rc-index-key-".concat(t))}function Vp(e){return typeof e<"u"&&!Number.isNaN(e)}function TE(e,t){var n=e||{},r=n.label,o=n.value,i=n.options,a=n.groupLabel,s=r||(t?"children":"label");return{label:s,value:o||"value",options:i||"options",groupLabel:a||s}}function eF(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.fieldNames,r=t.childrenAsData,o=[],i=TE(n,!1),a=i.label,s=i.value,l=i.options,c=i.groupLabel;function u(d,f){Array.isArray(d)&&d.forEach(function(h){if(f||!(l in h)){var m=h[s];o.push({key:yy(h,o.length),groupOption:f,data:h,label:h[a],value:m})}else{var v=h[c];v===void 0&&r&&(v=h.label),o.push({key:yy(h,o.length),group:!0,data:h,label:v}),u(h[l],!0)}})}return u(e,!1),o}function Wp(e){var t=q({},e);return"props"in t||Object.defineProperty(t,"props",{get:function(){return Ot(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}var tF=function(t,n,r){if(!n||!n.length)return null;var o=!1,i=function s(l,c){var u=I1(c),d=u[0],f=u.slice(1);if(!d)return[l];var h=l.split(d);return o=o||h.length>1,h.reduce(function(m,v){return[].concat(Le(m),Le(s(v,f)))},[]).filter(Boolean)},a=i(t,n);return o?typeof r<"u"?a.slice(0,r):a:null},Og=p.createContext(null);function nF(e){var t=e.visible,n=e.values;if(!t)return null;var r=50;return p.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(n.slice(0,r).map(function(o){var i=o.label,a=o.value;return["number","string"].includes(ht(i))?i:a}).join(", ")),n.length>r?", ...":null)}var rF=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","prefix","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],oF=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],vu=function(t){return t==="tags"||t==="multiple"},AE=p.forwardRef(function(e,t){var n,r=e.id,o=e.prefixCls,i=e.className,a=e.showSearch,s=e.tagRender,l=e.direction,c=e.omitDomProps,u=e.displayValues,d=e.onDisplayValuesChange,f=e.emptyOptions,h=e.notFoundContent,m=h===void 0?"Not Found":h,v=e.onClear,g=e.mode,y=e.disabled,b=e.loading,C=e.getInputElement,x=e.getRawInputElement,S=e.open,w=e.defaultOpen,E=e.onDropdownVisibleChange,N=e.activeValue,$=e.onActiveValueChange,M=e.activeDescendantId,R=e.searchValue,k=e.autoClearSearchValue,D=e.onSearch,A=e.onSearchSplit,L=e.tokenSeparators,T=e.allowClear,I=e.prefix,_=e.suffixIcon,W=e.clearIcon,H=e.OptionList,B=e.animation,K=e.transitionName,Y=e.dropdownStyle,V=e.dropdownClassName,G=e.dropdownMatchSelectWidth,Q=e.dropdownRender,ce=e.dropdownAlign,Z=e.placement,he=e.builtinPlacements,ye=e.getPopupContainer,fe=e.showAction,ae=fe===void 0?[]:fe,ve=e.onFocus,ne=e.onBlur,se=e.onKeyUp,pe=e.onKeyDown,Ne=e.onMouseDown,Me=Mt(e,rF),$e=vu(g),Be=(a!==void 0?a:$e)||g==="combobox",F=q({},Me);oF.forEach(function(Ce){delete F[Ce]}),c==null||c.forEach(function(Ce){delete F[Ce]});var be=p.useState(!1),ue=de(be,2),me=ue[0],Re=ue[1];p.useEffect(function(){Re(xg())},[]);var Te=p.useRef(null),xe=p.useRef(null),Ve=p.useRef(null),qe=p.useRef(null),Pe=p.useRef(null),Ke=p.useRef(!1),Je=vz(),De=de(Je,3),ze=De[0],_e=De[1],We=De[2];p.useImperativeHandle(t,function(){var Ce,ge;return{focus:(Ce=qe.current)===null||Ce===void 0?void 0:Ce.focus,blur:(ge=qe.current)===null||ge===void 0?void 0:ge.blur,scrollTo:function(Oe){var je;return(je=Pe.current)===null||je===void 0?void 0:je.scrollTo(Oe)},nativeElement:Te.current||xe.current}});var rt=p.useMemo(function(){var Ce;if(g!=="combobox")return R;var ge=(Ce=u[0])===null||Ce===void 0?void 0:Ce.value;return typeof ge=="string"||typeof ge=="number"?String(ge):""},[R,g,u]),gt=g==="combobox"&&typeof C=="function"&&C()||null,Lt=typeof x=="function"&&x(),Tt=xi(xe,Lt==null||(n=Lt.props)===null||n===void 0?void 0:n.ref),Zt=p.useState(!1),tt=de(Zt,2),Ue=tt[0],ft=tt[1];cn(function(){ft(!0)},[]);var dt=bn(!1,{defaultValue:w,value:S}),st=de(dt,2),Ze=st[0],Xe=st[1],Qe=Ue?Ze:!1,wt=!m&&f;(y||wt&&Qe&&g==="combobox")&&(Qe=!1);var At=wt?!1:Qe,it=p.useCallback(function(Ce){var ge=Ce!==void 0?Ce:!Qe;y||(Xe(ge),Qe!==ge&&(E==null||E(ge)))},[y,Qe,Xe,E]),Ge=p.useMemo(function(){return(L||[]).some(function(Ce){return[`
340
+ `,`\r
341
+ `].includes(Ce)})},[L]),et=p.useContext(Og)||{},lt=et.maxCount,ct=et.rawValues,vt=function(ge,Se,Oe){if(!($e&&Vp(lt)&&(ct==null?void 0:ct.size)>=lt)){var je=!0,ut=ge;$==null||$(null);var Et=tF(ge,L,Vp(lt)?lt-ct.size:void 0),$t=Oe?null:Et;return g!=="combobox"&&$t&&(ut="",A==null||A($t),it(!1),je=!1),D&&rt!==ut&&D(ut,{source:Se?"typing":"effect"}),je}},jt=function(ge){!ge||!ge.trim()||D(ge,{source:"submit"})};p.useEffect(function(){!Qe&&!$e&&g!=="combobox"&&vt("",!1,!1)},[Qe]),p.useEffect(function(){Ze&&y&&Xe(!1),y&&!Ke.current&&_e(!1)},[y]);var It=SE(),zt=de(It,2),Pt=zt[0],Vt=zt[1],qt=p.useRef(!1),Jt=function(ge){var Se=Pt(),Oe=ge.key,je=Oe==="Enter";if(je&&(g!=="combobox"&&ge.preventDefault(),Qe||it(!0)),Vt(!!rt),Oe==="Backspace"&&!Se&&$e&&!rt&&u.length){for(var ut=Le(u),Et=null,$t=ut.length-1;$t>=0;$t-=1){var Kt=ut[$t];if(!Kt.disabled){ut.splice($t,1),Et=Kt;break}}Et&&d(ut,{type:"remove",values:[Et]})}for(var Gt=arguments.length,hn=new Array(Gt>1?Gt-1:0),On=1;On<Gt;On++)hn[On-1]=arguments[On];if(Qe&&(!je||!qt.current)){var wn;je&&(qt.current=!0),(wn=Pe.current)===null||wn===void 0||wn.onKeyDown.apply(wn,[ge].concat(hn))}pe==null||pe.apply(void 0,[ge].concat(hn))},Pn=function(ge){for(var Se=arguments.length,Oe=new Array(Se>1?Se-1:0),je=1;je<Se;je++)Oe[je-1]=arguments[je];if(Qe){var ut;(ut=Pe.current)===null||ut===void 0||ut.onKeyUp.apply(ut,[ge].concat(Oe))}ge.key==="Enter"&&(qt.current=!1),se==null||se.apply(void 0,[ge].concat(Oe))},Ye=function(ge){var Se=u.filter(function(Oe){return Oe!==ge});d(Se,{type:"remove",values:[ge]})},J=function(){qt.current=!1},le=p.useRef(!1),we=function(){_e(!0),y||(ve&&!le.current&&ve.apply(void 0,arguments),ae.includes("focus")&&it(!0)),le.current=!0},ke=function(){Ke.current=!0,_e(!1,function(){le.current=!1,Ke.current=!1,it(!1)}),!y&&(rt&&(g==="tags"?D(rt,{source:"submit"}):g==="multiple"&&D("",{source:"blur"})),ne&&ne.apply(void 0,arguments))},Ie=[];p.useEffect(function(){return function(){Ie.forEach(function(Ce){return clearTimeout(Ce)}),Ie.splice(0,Ie.length)}},[]);var ot=function(ge){var Se,Oe=ge.target,je=(Se=Ve.current)===null||Se===void 0?void 0:Se.getPopupElement();if(je&&je.contains(Oe)){var ut=setTimeout(function(){var Gt=Ie.indexOf(ut);if(Gt!==-1&&Ie.splice(Gt,1),We(),!me&&!je.contains(document.activeElement)){var hn;(hn=qe.current)===null||hn===void 0||hn.focus()}});Ie.push(ut)}for(var Et=arguments.length,$t=new Array(Et>1?Et-1:0),Kt=1;Kt<Et;Kt++)$t[Kt-1]=arguments[Kt];Ne==null||Ne.apply(void 0,[ge].concat($t))},bt=p.useState({}),St=de(bt,2),Yt=St[1];function en(){Yt({})}var kt;Lt&&(kt=function(ge){it(ge)}),bz(function(){var Ce;return[Te.current,(Ce=Ve.current)===null||Ce===void 0?void 0:Ce.getPopupElement()]},At,it,!!Lt);var ln=p.useMemo(function(){return q(q({},e),{},{notFoundContent:m,open:Qe,triggerOpen:At,id:r,showSearch:Be,multiple:$e,toggleOpen:it})},[e,m,At,Qe,r,Be,$e,it]),on=!!_||b,kn;on&&(kn=p.createElement(Ad,{className:te("".concat(o,"-arrow"),U({},"".concat(o,"-arrow-loading"),b)),customizeIcon:_,customizeIconProps:{loading:b,searchValue:rt,open:Qe,focused:ze,showSearch:Be}}));var zn=function(){var ge;v==null||v(),(ge=qe.current)===null||ge===void 0||ge.focus(),d([],{type:"clear",values:u}),vt("",!1,!1)},P=mz(o,zn,u,T,W,y,rt,g),X=P.allowClear,z=P.clearIcon,re=p.createElement(H,{ref:Pe}),ie=te(o,i,U(U(U(U(U(U(U(U(U(U({},"".concat(o,"-focused"),ze),"".concat(o,"-multiple"),$e),"".concat(o,"-single"),!$e),"".concat(o,"-allow-clear"),T),"".concat(o,"-show-arrow"),on),"".concat(o,"-disabled"),y),"".concat(o,"-loading"),b),"".concat(o,"-open"),Qe),"".concat(o,"-customize-input"),gt),"".concat(o,"-show-search"),Be)),ee=p.createElement(IE,{ref:Ve,disabled:y,prefixCls:o,visible:At,popupElement:re,animation:B,transitionName:K,dropdownStyle:Y,dropdownClassName:V,direction:l,dropdownMatchSelectWidth:G,dropdownRender:Q,dropdownAlign:ce,placement:Z,builtinPlacements:he,getPopupContainer:ye,empty:f,getTriggerDOMNode:function(ge){return xe.current||ge},onPopupVisibleChange:kt,onPopupMouseEnter:en},Lt?p.cloneElement(Lt,{ref:Tt}):p.createElement($E,He({},e,{domRef:xe,prefixCls:o,inputElement:gt,ref:qe,id:r,prefix:I,showSearch:Be,autoClearSearchValue:k,mode:g,activeDescendantId:M,tagRender:s,values:u,open:Qe,onToggleOpen:it,activeValue:N,searchValue:rt,onSearch:vt,onSearchSubmit:jt,onRemove:Ye,tokenWithEnter:Ge,onInputBlur:J}))),Ee;return Lt?Ee=ee:Ee=p.createElement("div",He({className:ie},F,{ref:Te,onMouseDown:ot,onKeyDown:Jt,onKeyUp:Pn,onFocus:we,onBlur:ke}),p.createElement(nF,{visible:ze&&!Qe,values:u}),ee,kn,X&&z),p.createElement(CE.Provider,{value:ln},Ee)});process.env.NODE_ENV!=="production"&&(AE.displayName="BaseSelect");var $g=function(){return null};$g.isSelectOptGroup=!0;var Ng=function(){return null};Ng.isSelectOption=!0;var PE=p.forwardRef(function(e,t){var n=e.height,r=e.offsetY,o=e.offsetX,i=e.children,a=e.prefixCls,s=e.onInnerResize,l=e.innerProps,c=e.rtl,u=e.extra,d={},f={display:"flex",flexDirection:"column"};return r!==void 0&&(d={height:n,position:"relative",overflow:"hidden"},f=q(q({},f),{},U(U(U(U(U({transform:"translateY(".concat(r,"px)")},c?"marginRight":"marginLeft",-o),"position","absolute"),"left",0),"right",0),"top",0))),p.createElement("div",{style:d},p.createElement(Fo,{onResize:function(m){var v=m.offsetHeight;v&&s&&s()}},p.createElement("div",He({style:f,className:te(U({},"".concat(a,"-holder-inner"),a)),ref:t},l),i,u)))});PE.displayName="Filler";function iF(e){var t=e.children,n=e.setRef,r=p.useCallback(function(o){n(o)},[]);return p.cloneElement(t,{ref:r})}function aF(e,t,n,r,o,i,a,s){var l=s.getKey;return e.slice(t,n+1).map(function(c,u){var d=t+u,f=a(c,d,{style:{width:r},offsetX:o}),h=l(c);return p.createElement(iF,{key:h,setRef:function(v){return i(c,v)}},f)})}function sF(e,t,n){var r=e.length,o=t.length,i,a;if(r===0&&o===0)return null;r<o?(i=e,a=t):(i=t,a=e);var s={__EMPTY_ITEM__:!0};function l(m){return m!==void 0?n(m):s}for(var c=null,u=Math.abs(r-o)!==1,d=0;d<a.length;d+=1){var f=l(i[d]),h=l(a[d]);if(f!==h){c=d,u=u||f!==l(a[d+1]);break}}return c===null?null:{index:c,multiple:u}}function lF(e,t,n){var r=p.useState(e),o=de(r,2),i=o[0],a=o[1],s=p.useState(null),l=de(s,2),c=l[0],u=l[1];return p.useEffect(function(){var d=sF(i||[],e||[],t);(d==null?void 0:d.index)!==void 0&&u(e[d.index]),a(e)},[e]),[c]}var Cy=(typeof navigator>"u"?"undefined":ht(navigator))==="object"&&/Firefox/i.test(navigator.userAgent);const kE=function(e,t,n,r){var o=O.useRef(!1),i=O.useRef(null);function a(){clearTimeout(i.current),o.current=!0,i.current=setTimeout(function(){o.current=!1},50)}var s=O.useRef({top:e,bottom:t,left:n,right:r});return s.current.top=e,s.current.bottom=t,s.current.left=n,s.current.right=r,function(l,c){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,d=l?c<0&&s.current.left||c>0&&s.current.right:c<0&&s.current.top||c>0&&s.current.bottom;return u&&d?(clearTimeout(i.current),o.current=!1):(!d||o.current)&&a(),!o.current&&d}};function cF(e,t,n,r,o,i,a){var s=O.useRef(0),l=O.useRef(null),c=O.useRef(null),u=O.useRef(!1),d=kE(t,n,r,o);function f(b,C){if(Ht.cancel(l.current),!d(!1,C)){var x=b;if(!x._virtualHandled)x._virtualHandled=!0;else return;s.current+=C,c.current=C,Cy||x.preventDefault(),l.current=Ht(function(){var S=u.current?10:1;a(s.current*S,!1),s.current=0})}}function h(b,C){a(C,!0),Cy||b.preventDefault()}var m=O.useRef(null),v=O.useRef(null);function g(b){if(e){Ht.cancel(v.current),v.current=Ht(function(){m.current=null},2);var C=b.deltaX,x=b.deltaY,S=b.shiftKey,w=C,E=x;(m.current==="sx"||!m.current&&S&&x&&!C)&&(w=x,E=0,m.current="sx");var N=Math.abs(w),$=Math.abs(E);m.current===null&&(m.current=i&&N>$?"x":"y"),m.current==="y"?f(b,E):h(b,w)}}function y(b){e&&(u.current=b.detail===c.current)}return[g,y]}function uF(e,t,n,r){var o=p.useMemo(function(){return[new Map,[]]},[e,n.id,r]),i=de(o,2),a=i[0],s=i[1],l=function(u){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u,f=a.get(u),h=a.get(d);if(f===void 0||h===void 0)for(var m=e.length,v=s.length;v<m;v+=1){var g,y=e[v],b=t(y);a.set(b,v);var C=(g=n.get(b))!==null&&g!==void 0?g:r;if(s[v]=(s[v-1]||0)+C,b===u&&(f=v),b===d&&(h=v),f!==void 0&&h!==void 0)break}return{top:s[f-1]||0,bottom:s[h]}};return l}var dF=function(){function e(){Tn(this,e),U(this,"maps",void 0),U(this,"id",0),U(this,"diffKeys",new Set),this.maps=Object.create(null)}return An(e,[{key:"set",value:function(n,r){this.maps[n]=r,this.id+=1,this.diffKeys.add(n)}},{key:"get",value:function(n){return this.maps[n]}},{key:"resetRecord",value:function(){this.diffKeys.clear()}},{key:"getRecord",value:function(){return this.diffKeys}}]),e}();function Sy(e){var t=parseFloat(e);return isNaN(t)?0:t}function fF(e,t,n){var r=p.useState(0),o=de(r,2),i=o[0],a=o[1],s=O.useRef(new Map),l=O.useRef(new dF),c=O.useRef(0);function u(){c.current+=1}function d(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;u();var m=function(){var y=!1;s.current.forEach(function(b,C){if(b&&b.offsetParent){var x=b.offsetHeight,S=getComputedStyle(b),w=S.marginTop,E=S.marginBottom,N=Sy(w),$=Sy(E),M=x+N+$;l.current.get(C)!==M&&(l.current.set(C,M),y=!0)}}),y&&a(function(b){return b+1})};if(h)m();else{c.current+=1;var v=c.current;Promise.resolve().then(function(){v===c.current&&m()})}}function f(h,m){var v=e(h);s.current.get(v),m?(s.current.set(v,m),d()):s.current.delete(v)}return O.useEffect(function(){return u},[]),[f,d,l.current,i]}var xy=14/15;function hF(e,t,n){var r=O.useRef(!1),o=O.useRef(0),i=O.useRef(0),a=O.useRef(null),s=O.useRef(null),l,c=function(h){if(r.current){var m=Math.ceil(h.touches[0].pageX),v=Math.ceil(h.touches[0].pageY),g=o.current-m,y=i.current-v,b=Math.abs(g)>Math.abs(y);b?o.current=m:i.current=v;var C=n(b,b?g:y,!1,h);C&&h.preventDefault(),clearInterval(s.current),C&&(s.current=setInterval(function(){b?g*=xy:y*=xy;var x=Math.floor(b?g:y);(!n(b,x,!0)||Math.abs(x)<=.1)&&clearInterval(s.current)},16))}},u=function(){r.current=!1,l()},d=function(h){l(),h.touches.length===1&&!r.current&&(r.current=!0,o.current=Math.ceil(h.touches[0].pageX),i.current=Math.ceil(h.touches[0].pageY),a.current=h.target,a.current.addEventListener("touchmove",c,{passive:!1}),a.current.addEventListener("touchend",u,{passive:!0}))};l=function(){a.current&&(a.current.removeEventListener("touchmove",c),a.current.removeEventListener("touchend",u))},cn(function(){return e&&t.current.addEventListener("touchstart",d,{passive:!0}),function(){var f;(f=t.current)===null||f===void 0||f.removeEventListener("touchstart",d),l(),clearInterval(s.current)}},[e])}function wy(e){return Math.floor(Math.pow(e,.5))}function Up(e,t){var n="touches"in e?e.touches[0]:e;return n[t?"pageX":"pageY"]-window[t?"scrollX":"scrollY"]}function pF(e,t,n){p.useEffect(function(){var r=t.current;if(e&&r){var o=!1,i,a,s=function(){Ht.cancel(i)},l=function f(){s(),i=Ht(function(){n(a),f()})},c=function(h){if(!(h.target.draggable||h.button!==0)){var m=h;m._virtualHandled||(m._virtualHandled=!0,o=!0)}},u=function(){o=!1,s()},d=function(h){if(o){var m=Up(h,!1),v=r.getBoundingClientRect(),g=v.top,y=v.bottom;if(m<=g){var b=g-m;a=-wy(b),l()}else if(m>=y){var C=m-y;a=wy(C),l()}else s()}};return r.addEventListener("mousedown",c),r.ownerDocument.addEventListener("mouseup",u),r.ownerDocument.addEventListener("mousemove",d),function(){r.removeEventListener("mousedown",c),r.ownerDocument.removeEventListener("mouseup",u),r.ownerDocument.removeEventListener("mousemove",d),s()}}},[e])}var Ey=10;function mF(e,t,n,r,o,i,a,s){var l=p.useRef(),c=p.useState(null),u=de(c,2),d=u[0],f=u[1];return cn(function(){if(d&&d.times<Ey){if(!e.current){f(function(W){return q({},W)});return}i();var h=d.targetAlign,m=d.originAlign,v=d.index,g=d.offset,y=e.current.clientHeight,b=!1,C=h,x=null;if(y){for(var S=h||m,w=0,E=0,N=0,$=Math.min(t.length-1,v),M=0;M<=$;M+=1){var R=o(t[M]);E=w;var k=n.get(R);N=E+(k===void 0?r:k),w=N}for(var D=S==="top"?g:y-g,A=$;A>=0;A-=1){var L=o(t[A]),T=n.get(L);if(T===void 0){b=!0;break}if(D-=T,D<=0)break}switch(S){case"top":x=E-g;break;case"bottom":x=N-y+g;break;default:{var I=e.current.scrollTop,_=I+y;E<I?C="top":N>_&&(C="bottom")}}x!==null&&a(x),x!==d.lastTop&&(b=!0)}b&&f(q(q({},d),{},{times:d.times+1,targetAlign:C,lastTop:x}))}else process.env.NODE_ENV!=="production"&&(d==null?void 0:d.times)===Ey&&Ot(!1,"Seems `scrollTo` with `rc-virtual-list` reach the max limitation. Please fire issue for us. Thanks.")},[d,e.current]),function(h){if(h==null){s();return}if(Ht.cancel(l.current),typeof h=="number")a(h);else if(h&&ht(h)==="object"){var m,v=h.align;"index"in h?m=h.index:m=t.findIndex(function(b){return o(b)===h.key});var g=h.offset,y=g===void 0?0:g;f({times:0,index:m,offset:y,originAlign:v})}}}var qp=p.forwardRef(function(e,t){var n=e.prefixCls,r=e.rtl,o=e.scrollOffset,i=e.scrollRange,a=e.onStartMove,s=e.onStopMove,l=e.onScroll,c=e.horizontal,u=e.spinSize,d=e.containerSize,f=e.style,h=e.thumbStyle,m=e.showScrollBar,v=p.useState(!1),g=de(v,2),y=g[0],b=g[1],C=p.useState(null),x=de(C,2),S=x[0],w=x[1],E=p.useState(null),N=de(E,2),$=N[0],M=N[1],R=!r,k=p.useRef(),D=p.useRef(),A=p.useState(m),L=de(A,2),T=L[0],I=L[1],_=p.useRef(),W=function(){m===!0||m===!1||(clearTimeout(_.current),I(!0),_.current=setTimeout(function(){I(!1)},3e3))},H=i-d||0,B=d-u||0,K=p.useMemo(function(){if(o===0||H===0)return 0;var fe=o/H;return fe*B},[o,H,B]),Y=function(ae){ae.stopPropagation(),ae.preventDefault()},V=p.useRef({top:K,dragging:y,pageY:S,startTop:$});V.current={top:K,dragging:y,pageY:S,startTop:$};var G=function(ae){b(!0),w(Up(ae,c)),M(V.current.top),a(),ae.stopPropagation(),ae.preventDefault()};p.useEffect(function(){var fe=function(se){se.preventDefault()},ae=k.current,ve=D.current;return ae.addEventListener("touchstart",fe,{passive:!1}),ve.addEventListener("touchstart",G,{passive:!1}),function(){ae.removeEventListener("touchstart",fe),ve.removeEventListener("touchstart",G)}},[]);var Q=p.useRef();Q.current=H;var ce=p.useRef();ce.current=B,p.useEffect(function(){if(y){var fe,ae=function(se){var pe=V.current,Ne=pe.dragging,Me=pe.pageY,$e=pe.startTop;Ht.cancel(fe);var Be=k.current.getBoundingClientRect(),F=d/(c?Be.width:Be.height);if(Ne){var be=(Up(se,c)-Me)*F,ue=$e;!R&&c?ue-=be:ue+=be;var me=Q.current,Re=ce.current,Te=Re?ue/Re:0,xe=Math.ceil(Te*me);xe=Math.max(xe,0),xe=Math.min(xe,me),fe=Ht(function(){l(xe,c)})}},ve=function(){b(!1),s()};return window.addEventListener("mousemove",ae,{passive:!0}),window.addEventListener("touchmove",ae,{passive:!0}),window.addEventListener("mouseup",ve,{passive:!0}),window.addEventListener("touchend",ve,{passive:!0}),function(){window.removeEventListener("mousemove",ae),window.removeEventListener("touchmove",ae),window.removeEventListener("mouseup",ve),window.removeEventListener("touchend",ve),Ht.cancel(fe)}}},[y]),p.useEffect(function(){return W(),function(){clearTimeout(_.current)}},[o]),p.useImperativeHandle(t,function(){return{delayHidden:W}});var Z="".concat(n,"-scrollbar"),he={position:"absolute",visibility:T?null:"hidden"},ye={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return c?(he.height=8,he.left=0,he.right=0,he.bottom=0,ye.height="100%",ye.width=u,R?ye.left=K:ye.right=K):(he.width=8,he.top=0,he.bottom=0,R?he.right=0:he.left=0,ye.width="100%",ye.height=u,ye.top=K),p.createElement("div",{ref:k,className:te(Z,U(U(U({},"".concat(Z,"-horizontal"),c),"".concat(Z,"-vertical"),!c),"".concat(Z,"-visible"),T)),style:q(q({},he),f),onMouseDown:Y,onMouseMove:W},p.createElement("div",{ref:D,className:te("".concat(Z,"-thumb"),U({},"".concat(Z,"-thumb-moving"),y)),style:q(q({},ye),h),onMouseDown:G}))});process.env.NODE_ENV!=="production"&&(qp.displayName="ScrollBar");var gF=20;function Oy(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=e/t*e;return isNaN(n)&&(n=0),n=Math.max(n,gF),Math.floor(n)}var vF=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],bF=[],yF={overflowY:"auto",overflowAnchor:"none"};function CF(e,t){var n=e.prefixCls,r=n===void 0?"rc-virtual-list":n,o=e.className,i=e.height,a=e.itemHeight,s=e.fullHeight,l=s===void 0?!0:s,c=e.style,u=e.data,d=e.children,f=e.itemKey,h=e.virtual,m=e.direction,v=e.scrollWidth,g=e.component,y=g===void 0?"div":g,b=e.onScroll,C=e.onVirtualScroll,x=e.onVisibleChange,S=e.innerProps,w=e.extraRender,E=e.styles,N=e.showScrollBar,$=N===void 0?"optional":N,M=Mt(e,vF),R=p.useCallback(function(le){return typeof f=="function"?f(le):le==null?void 0:le[f]},[f]),k=fF(R),D=de(k,4),A=D[0],L=D[1],T=D[2],I=D[3],_=!!(h!==!1&&i&&a),W=p.useMemo(function(){return Object.values(T.maps).reduce(function(le,we){return le+we},0)},[T.id,T.maps]),H=_&&u&&(Math.max(a*u.length,W)>i||!!v),B=m==="rtl",K=te(r,U({},"".concat(r,"-rtl"),B),o),Y=u||bF,V=O.useRef(),G=O.useRef(),Q=O.useRef(),ce=O.useState(0),Z=de(ce,2),he=Z[0],ye=Z[1],fe=O.useState(0),ae=de(fe,2),ve=ae[0],ne=ae[1],se=O.useState(!1),pe=de(se,2),Ne=pe[0],Me=pe[1],$e=function(){Me(!0)},Be=function(){Me(!1)},F={getKey:R};function be(le){ye(function(we){var ke;typeof le=="function"?ke=le(we):ke=le;var Ie=ft(ke);return V.current.scrollTop=Ie,Ie})}var ue=O.useRef({start:0,end:Y.length}),me=O.useRef(),Re=lF(Y,R),Te=de(Re,1),xe=Te[0];me.current=xe;var Ve=p.useMemo(function(){if(!_)return{scrollHeight:void 0,start:0,end:Y.length-1,offset:void 0};if(!H){var le;return{scrollHeight:((le=G.current)===null||le===void 0?void 0:le.offsetHeight)||0,start:0,end:Y.length-1,offset:void 0}}for(var we=0,ke,Ie,ot,bt=Y.length,St=0;St<bt;St+=1){var Yt=Y[St],en=R(Yt),kt=T.get(en),ln=we+(kt===void 0?a:kt);ln>=he&&ke===void 0&&(ke=St,Ie=we),ln>he+i&&ot===void 0&&(ot=St),we=ln}return ke===void 0&&(ke=0,Ie=0,ot=Math.ceil(i/a)),ot===void 0&&(ot=Y.length-1),ot=Math.min(ot+1,Y.length-1),{scrollHeight:we,start:ke,end:ot,offset:Ie}},[H,_,he,Y,I,i]),qe=Ve.scrollHeight,Pe=Ve.start,Ke=Ve.end,Je=Ve.offset;ue.current.start=Pe,ue.current.end=Ke,p.useLayoutEffect(function(){var le=T.getRecord();if(le.size===1){var we=Array.from(le)[0],ke=Y[Pe];if(ke){var Ie=R(ke);if(Ie===we){var ot=T.get(we),bt=ot-a;be(function(St){return St+bt})}}}T.resetRecord()},[qe]);var De=p.useState({width:0,height:i}),ze=de(De,2),_e=ze[0],We=ze[1],rt=function(we){We({width:we.offsetWidth,height:we.offsetHeight})},gt=O.useRef(),Lt=O.useRef(),Tt=p.useMemo(function(){return Oy(_e.width,v)},[_e.width,v]),Zt=p.useMemo(function(){return Oy(_e.height,qe)},[_e.height,qe]),tt=qe-i,Ue=O.useRef(tt);Ue.current=tt;function ft(le){var we=le;return Number.isNaN(Ue.current)||(we=Math.min(we,Ue.current)),we=Math.max(we,0),we}var dt=he<=0,st=he>=tt,Ze=ve<=0,Xe=ve>=v,Qe=kE(dt,st,Ze,Xe),wt=function(){return{x:B?-ve:ve,y:he}},At=O.useRef(wt()),it=tn(function(le){if(C){var we=q(q({},wt()),le);(At.current.x!==we.x||At.current.y!==we.y)&&(C(we),At.current=we)}});function Ge(le,we){var ke=le;we?(jr.flushSync(function(){ne(ke)}),it()):be(ke)}function et(le){var we=le.currentTarget.scrollTop;we!==he&&be(we),b==null||b(le),it()}var lt=function(we){var ke=we,Ie=v?v-_e.width:0;return ke=Math.max(ke,0),ke=Math.min(ke,Ie),ke},ct=tn(function(le,we){we?(jr.flushSync(function(){ne(function(ke){var Ie=ke+(B?-le:le);return lt(Ie)})}),it()):be(function(ke){var Ie=ke+le;return Ie})}),vt=cF(_,dt,st,Ze,Xe,!!v,ct),jt=de(vt,2),It=jt[0],zt=jt[1];hF(_,V,function(le,we,ke,Ie){var ot=Ie;return Qe(le,we,ke)?!1:!ot||!ot._virtualHandled?(ot&&(ot._virtualHandled=!0),It({preventDefault:function(){},deltaX:le?we:0,deltaY:le?0:we}),!0):!1}),pF(H,V,function(le){be(function(we){return we+le})}),cn(function(){function le(ke){var Ie=dt&&ke.detail<0,ot=st&&ke.detail>0;_&&!Ie&&!ot&&ke.preventDefault()}var we=V.current;return we.addEventListener("wheel",It,{passive:!1}),we.addEventListener("DOMMouseScroll",zt,{passive:!0}),we.addEventListener("MozMousePixelScroll",le,{passive:!1}),function(){we.removeEventListener("wheel",It),we.removeEventListener("DOMMouseScroll",zt),we.removeEventListener("MozMousePixelScroll",le)}},[_,dt,st]),cn(function(){if(v){var le=lt(ve);ne(le),it({x:le})}},[_e.width,v]);var Pt=function(){var we,ke;(we=gt.current)===null||we===void 0||we.delayHidden(),(ke=Lt.current)===null||ke===void 0||ke.delayHidden()},Vt=mF(V,Y,T,a,R,function(){return L(!0)},be,Pt);p.useImperativeHandle(t,function(){return{nativeElement:Q.current,getScrollInfo:wt,scrollTo:function(we){function ke(Ie){return Ie&&ht(Ie)==="object"&&("left"in Ie||"top"in Ie)}ke(we)?(we.left!==void 0&&ne(lt(we.left)),Vt(we.top)):Vt(we)}}}),cn(function(){if(x){var le=Y.slice(Pe,Ke+1);x(le,Y)}},[Pe,Ke,Y]);var qt=uF(Y,R,T,a),Jt=w==null?void 0:w({start:Pe,end:Ke,virtual:H,offsetX:ve,offsetY:Je,rtl:B,getSize:qt}),Pn=aF(Y,Pe,Ke,v,ve,A,d,F),Ye=null;i&&(Ye=q(U({},l?"height":"maxHeight",i),yF),_&&(Ye.overflowY="hidden",v&&(Ye.overflowX="hidden"),Ne&&(Ye.pointerEvents="none")));var J={};return B&&(J.dir="rtl"),p.createElement("div",He({ref:Q,style:q(q({},c),{},{position:"relative"}),className:K},J,M),p.createElement(Fo,{onResize:rt},p.createElement(y,{className:"".concat(r,"-holder"),style:Ye,ref:V,onScroll:et,onMouseEnter:Pt},p.createElement(PE,{prefixCls:r,height:qe,offsetX:ve,offsetY:Je,scrollWidth:v,onInnerResize:L,ref:G,innerProps:S,rtl:B,extra:Jt},Pn))),H&&qe>i&&p.createElement(qp,{ref:gt,prefixCls:r,scrollOffset:he,scrollRange:qe,rtl:B,onScroll:Ge,onStartMove:$e,onStopMove:Be,spinSize:Zt,containerSize:_e.height,style:E==null?void 0:E.verticalScrollBar,thumbStyle:E==null?void 0:E.verticalScrollBarThumb,showScrollBar:$}),H&&v>_e.width&&p.createElement(qp,{ref:Lt,prefixCls:r,scrollOffset:ve,scrollRange:v,rtl:B,onScroll:Ge,onStartMove:$e,onStopMove:Be,spinSize:Tt,containerSize:_e.width,horizontal:!0,style:E==null?void 0:E.horizontalScrollBar,thumbStyle:E==null?void 0:E.horizontalScrollBarThumb,showScrollBar:$}))}var DE=p.forwardRef(CF);DE.displayName="List";function SF(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var xF=["disabled","title","children","style","className"];function $y(e){return typeof e=="string"||typeof e=="number"}var wF=function(t,n){var r=gz(),o=r.prefixCls,i=r.id,a=r.open,s=r.multiple,l=r.mode,c=r.searchValue,u=r.toggleOpen,d=r.notFoundContent,f=r.onPopupScroll,h=p.useContext(Og),m=h.maxCount,v=h.flattenOptions,g=h.onActiveValue,y=h.defaultActiveFirstOption,b=h.onSelect,C=h.menuItemSelectedIcon,x=h.rawValues,S=h.fieldNames,w=h.virtual,E=h.direction,N=h.listHeight,$=h.listItemHeight,M=h.optionRender,R="".concat(o,"-item"),k=Sl(function(){return v},[a,v],function(fe,ae){return ae[0]&&fe[1]!==ae[1]}),D=p.useRef(null),A=p.useMemo(function(){return s&&Vp(m)&&(x==null?void 0:x.size)>=m},[s,m,x==null?void 0:x.size]),L=function(ae){ae.preventDefault()},T=function(ae){var ve;(ve=D.current)===null||ve===void 0||ve.scrollTo(typeof ae=="number"?{index:ae}:ae)},I=p.useCallback(function(fe){return l==="combobox"?!1:x.has(fe)},[l,Le(x).toString(),x.size]),_=function(ae){for(var ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,ne=k.length,se=0;se<ne;se+=1){var pe=(ae+se*ve+ne)%ne,Ne=k[pe]||{},Me=Ne.group,$e=Ne.data;if(!Me&&!($e!=null&&$e.disabled)&&(I($e.value)||!A))return pe}return-1},W=p.useState(function(){return _(0)}),H=de(W,2),B=H[0],K=H[1],Y=function(ae){var ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;K(ae);var ne={source:ve?"keyboard":"mouse"},se=k[ae];if(!se){g(null,-1,ne);return}g(se.value,ae,ne)};O.useEffect(function(){Y(y!==!1?_(0):-1)},[k.length,c]);var V=p.useCallback(function(fe){return l==="combobox"?String(fe).toLowerCase()===c.toLowerCase():x.has(fe)},[l,c,Le(x).toString(),x.size]);O.useEffect(function(){var fe=setTimeout(function(){if(!s&&a&&x.size===1){var ve=Array.from(x)[0],ne=k.findIndex(function(se){var pe=se.data;return pe.value===ve});ne!==-1&&(Y(ne),T(ne))}});if(a){var ae;(ae=D.current)===null||ae===void 0||ae.scrollTo(void 0)}return function(){return clearTimeout(fe)}},[a,c]);var G=function(ae){ae!==void 0&&b(ae,{selected:!x.has(ae)}),s||u(!1)};if(p.useImperativeHandle(n,function(){return{onKeyDown:function(ae){var ve=ae.which,ne=ae.ctrlKey;switch(ve){case at.N:case at.P:case at.UP:case at.DOWN:{var se=0;if(ve===at.UP?se=-1:ve===at.DOWN?se=1:SF()&&ne&&(ve===at.N?se=1:ve===at.P&&(se=-1)),se!==0){var pe=_(B+se,se);T(pe),Y(pe,!0)}break}case at.TAB:case at.ENTER:{var Ne,Me=k[B];Me&&!(Me!=null&&(Ne=Me.data)!==null&&Ne!==void 0&&Ne.disabled)&&!A?G(Me.value):G(void 0),a&&ae.preventDefault();break}case at.ESC:u(!1),a&&ae.stopPropagation()}},onKeyUp:function(){},scrollTo:function(ae){T(ae)}}}),k.length===0)return p.createElement("div",{role:"listbox",id:"".concat(i,"_list"),className:"".concat(R,"-empty"),onMouseDown:L},d);var Q=Object.keys(S).map(function(fe){return S[fe]}),ce=function(ae){return ae.label};function Z(fe,ae){var ve=fe.group;return{role:ve?"presentation":"option",id:"".concat(i,"_list_").concat(ae)}}var he=function(ae){var ve=k[ae];if(!ve)return null;var ne=ve.data||{},se=ne.value,pe=ve.group,Ne=eo(ne,!0),Me=ce(ve);return ve?p.createElement("div",He({"aria-label":typeof Me=="string"&&!pe?Me:null},Ne,{key:ae},Z(ve,ae),{"aria-selected":V(se)}),se):null},ye={role:"listbox",id:"".concat(i,"_list")};return p.createElement(p.Fragment,null,w&&p.createElement("div",He({},ye,{style:{height:0,width:0,overflow:"hidden"}}),he(B-1),he(B),he(B+1)),p.createElement(DE,{itemKey:"key",ref:D,data:k,height:N,itemHeight:$,fullHeight:!1,onMouseDown:L,onScroll:f,virtual:w,direction:E,innerProps:w?null:ye},function(fe,ae){var ve=fe.group,ne=fe.groupOption,se=fe.data,pe=fe.label,Ne=fe.value,Me=se.key;if(ve){var $e,Be=($e=se.title)!==null&&$e!==void 0?$e:$y(pe)?pe.toString():void 0;return p.createElement("div",{className:te(R,"".concat(R,"-group"),se.className),title:Be},pe!==void 0?pe:Me)}var F=se.disabled,be=se.title;se.children;var ue=se.style,me=se.className,Re=Mt(se,xF),Te=Hn(Re,Q),xe=I(Ne),Ve=F||!xe&&A,qe="".concat(R,"-option"),Pe=te(R,qe,me,U(U(U(U({},"".concat(qe,"-grouped"),ne),"".concat(qe,"-active"),B===ae&&!Ve),"".concat(qe,"-disabled"),Ve),"".concat(qe,"-selected"),xe)),Ke=ce(fe),Je=!C||typeof C=="function"||xe,De=typeof Ke=="number"?Ke:Ke||Ne,ze=$y(De)?De.toString():void 0;return be!==void 0&&(ze=be),p.createElement("div",He({},eo(Te),w?{}:Z(fe,ae),{"aria-selected":V(Ne),className:Pe,title:ze,onMouseMove:function(){B===ae||Ve||Y(ae)},onClick:function(){Ve||G(Ne)},style:ue}),p.createElement("div",{className:"".concat(qe,"-content")},typeof M=="function"?M(fe,{index:ae}):De),p.isValidElement(C)||xe,Je&&p.createElement(Ad,{className:"".concat(R,"-option-state"),customizeIcon:C,customizeIconProps:{value:Ne,disabled:Ve,isSelected:xe}},xe?"✓":null))}))},_E=p.forwardRef(wF);process.env.NODE_ENV!=="production"&&(_E.displayName="OptionList");const EF=function(e,t){var n=p.useRef({values:new Map,options:new Map}),r=p.useMemo(function(){var i=n.current,a=i.values,s=i.options,l=e.map(function(d){if(d.label===void 0){var f;return q(q({},d),{},{label:(f=a.get(d.value))===null||f===void 0?void 0:f.label})}return d}),c=new Map,u=new Map;return l.forEach(function(d){c.set(d.value,d),u.set(d.value,t.get(d.value)||s.get(d.value))}),n.current.values=c,n.current.options=u,l},[e,t]),o=p.useCallback(function(i){return t.get(i)||n.current.options.get(i)},[t]);return[r,o]};function eh(e,t){return Eg(e).join("").toUpperCase().includes(t)}const OF=function(e,t,n,r,o){return p.useMemo(function(){if(!n||r===!1)return e;var i=t.options,a=t.label,s=t.value,l=[],c=typeof r=="function",u=n.toUpperCase(),d=c?r:function(h,m){return o?eh(m[o],u):m[i]?eh(m[a!=="children"?a:"label"],u):eh(m[s],u)},f=c?function(h){return Wp(h)}:function(h){return h};return e.forEach(function(h){if(h[i]){var m=d(n,f(h));if(m)l.push(h);else{var v=h[i].filter(function(g){return d(n,f(g))});v.length&&l.push(q(q({},h),{},U({},i,v)))}return}d(n,f(h))&&l.push(h)}),l},[e,r,o,n,t])};var Ny=0,$F=process.env.NODE_ENV!=="test"&&or();function NF(){var e;return $F?(e=Ny,Ny+=1):e="TEST_OR_SSR",e}function MF(e){var t=p.useState(),n=de(t,2),r=n[0],o=n[1];return p.useEffect(function(){o("rc_select_".concat(NF()))},[]),e||r}var RF=["children","value"],IF=["children"];function TF(e){var t=e,n=t.key,r=t.props,o=r.children,i=r.value,a=Mt(r,RF);return q({key:n,value:i!==void 0?i:n,children:o},a)}function Mg(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Nr(e).map(function(n,r){if(!p.isValidElement(n)||!n.type)return null;var o=n,i=o.type.isSelectOptGroup,a=o.key,s=o.props,l=s.children,c=Mt(s,IF);return t||!i?TF(n):q(q({key:"__RC_SELECT_GRP__".concat(a===null?r:a,"__"),label:a},c),{},{options:Mg(l)})}).filter(function(n){return n})}var AF=function(t,n,r,o,i){return p.useMemo(function(){var a=t,s=!t;s&&(a=Mg(n));var l=new Map,c=new Map,u=function(h,m,v){v&&typeof v=="string"&&h.set(m[v],m)},d=function f(h){for(var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,v=0;v<h.length;v+=1){var g=h[v];!g[r.options]||m?(l.set(g[r.value],g),u(c,g,r.label),u(c,g,o),u(c,g,i)):f(g[r.options],!0)}};return d(a),{options:a,valueOptions:l,labelOptions:c}},[t,n,r,o,i])};function My(e){var t=p.useRef();t.current=e;var n=p.useCallback(function(){return t.current.apply(t,arguments)},[]);return n}function PF(e){var t=e.mode,n=e.options,r=e.children,o=e.backfill,i=e.allowClear,a=e.placeholder,s=e.getInputElement,l=e.showSearch,c=e.onSearch,u=e.defaultOpen,d=e.autoFocus,f=e.labelInValue,h=e.value,m=e.inputValue,v=e.optionLabelProp,g=vu(t),y=l!==void 0?l:g||t==="combobox",b=n||Mg(r);if(Ot(t!=="tags"||b.every(function(w){return!w.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),t==="tags"||t==="combobox"){var C=b.some(function(w){return w.options?w.options.some(function(E){return typeof("value"in E?E.value:E.key)=="number"}):typeof("value"in w?w.value:w.key)=="number"});Ot(!C,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Ot(t!=="combobox"||!v,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Ot(t==="combobox"||!o,"`backfill` only works with `combobox` mode."),Ot(t==="combobox"||!s,"`getInputElement` only work with `combobox` mode."),Kh(t!=="combobox"||!s||!i||!a,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),c&&!y&&t!=="combobox"&&t!=="tags"&&Ot(!1,"`onSearch` should work with `showSearch` instead of use alone."),Kh(!u||d,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),h!=null){var x=Eg(h);Ot(!f||x.every(function(w){return ht(w)==="object"&&("key"in w||"value"in w)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Ot(!g||Array.isArray(h),"`value` should be array when `mode` is `multiple` or `tags`")}if(r){var S=null;Nr(r).some(function(w){if(!p.isValidElement(w)||!w.type)return!1;var E=w,N=E.type;if(N.isSelectOption)return!1;if(N.isSelectOptGroup){var $=Nr(w.props.children).every(function(M){return!p.isValidElement(M)||!w.type||M.type.isSelectOption?!0:(S=M.type,!1)});return!$}return S=N,!0}),S&&Ot(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(S.displayName||S.name||S,"`.")),Ot(m===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function kF(e,t){if(e){var n=function r(o){for(var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=0;a<o.length;a++){var s=o[a];if(s[t==null?void 0:t.value]===null)return Ot(!1,"`value` in Select options should not be `null`."),!0;if(!i&&Array.isArray(s[t==null?void 0:t.options])&&r(s[t==null?void 0:t.options],!0))break}};n(e)}}var DF=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","optionRender","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","labelRender","value","defaultValue","labelInValue","onChange","maxCount"],_F=["inputValue"];function LF(e){return!e||ht(e)!=="object"}var LE=p.forwardRef(function(e,t){var n=e.id,r=e.mode,o=e.prefixCls,i=o===void 0?"rc-select":o,a=e.backfill,s=e.fieldNames,l=e.inputValue,c=e.searchValue,u=e.onSearch,d=e.autoClearSearchValue,f=d===void 0?!0:d,h=e.onSelect,m=e.onDeselect,v=e.dropdownMatchSelectWidth,g=v===void 0?!0:v,y=e.filterOption,b=e.filterSort,C=e.optionFilterProp,x=e.optionLabelProp,S=e.options,w=e.optionRender,E=e.children,N=e.defaultActiveFirstOption,$=e.menuItemSelectedIcon,M=e.virtual,R=e.direction,k=e.listHeight,D=k===void 0?200:k,A=e.listItemHeight,L=A===void 0?20:A,T=e.labelRender,I=e.value,_=e.defaultValue,W=e.labelInValue,H=e.onChange,B=e.maxCount,K=Mt(e,DF),Y=MF(n),V=vu(r),G=!!(!S&&E),Q=p.useMemo(function(){return y===void 0&&r==="combobox"?!1:y},[y,r]),ce=p.useMemo(function(){return TE(s,G)},[JSON.stringify(s),G]),Z=bn("",{value:c!==void 0?c:l,postState:function(Ge){return Ge||""}}),he=de(Z,2),ye=he[0],fe=he[1],ae=AF(S,E,ce,C,x),ve=ae.valueOptions,ne=ae.labelOptions,se=ae.options,pe=p.useCallback(function(it){var Ge=Eg(it);return Ge.map(function(et){var lt,ct,vt,jt,It;if(LF(et))lt=et;else{var zt;vt=et.key,ct=et.label,lt=(zt=et.value)!==null&&zt!==void 0?zt:vt}var Pt=ve.get(lt);if(Pt){var Vt;if(ct===void 0&&(ct=Pt==null?void 0:Pt[x||ce.label]),vt===void 0&&(vt=(Vt=Pt==null?void 0:Pt.key)!==null&&Vt!==void 0?Vt:lt),jt=Pt==null?void 0:Pt.disabled,It=Pt==null?void 0:Pt.title,process.env.NODE_ENV!=="production"&&!x){var qt=Pt==null?void 0:Pt[ce.label];qt!==void 0&&!p.isValidElement(qt)&&!p.isValidElement(ct)&&qt!==ct&&Ot(!1,"`label` of `value` is not same as `label` in Select options.")}}return{label:ct,value:lt,key:vt,disabled:jt,title:It}})},[ce,x,ve]),Ne=bn(_,{value:I}),Me=de(Ne,2),$e=Me[0],Be=Me[1],F=p.useMemo(function(){var it,Ge=V&&$e===null?[]:$e,et=pe(Ge);return r==="combobox"&&Dz((it=et[0])===null||it===void 0?void 0:it.value)?[]:et},[$e,pe,r,V]),be=EF(F,ve),ue=de(be,2),me=ue[0],Re=ue[1],Te=p.useMemo(function(){if(!r&&me.length===1){var it=me[0];if(it.value===null&&(it.label===null||it.label===void 0))return[]}return me.map(function(Ge){var et;return q(q({},Ge),{},{label:(et=typeof T=="function"?T(Ge):Ge.label)!==null&&et!==void 0?et:Ge.value})})},[r,me,T]),xe=p.useMemo(function(){return new Set(me.map(function(it){return it.value}))},[me]);p.useEffect(function(){if(r==="combobox"){var it,Ge=(it=me[0])===null||it===void 0?void 0:it.value;fe(kz(Ge)?String(Ge):"")}},[me]);var Ve=My(function(it,Ge){var et=Ge??it;return U(U({},ce.value,it),ce.label,et)}),qe=p.useMemo(function(){if(r!=="tags")return se;var it=Le(se),Ge=function(lt){return ve.has(lt)};return Le(me).sort(function(et,lt){return et.value<lt.value?-1:1}).forEach(function(et){var lt=et.value;Ge(lt)||it.push(Ve(lt,et.label))}),it},[Ve,se,ve,me,r]),Pe=OF(qe,ce,ye,Q,C),Ke=p.useMemo(function(){return r!=="tags"||!ye||Pe.some(function(it){return it[C||"value"]===ye})||Pe.some(function(it){return it[ce.value]===ye})?Pe:[Ve(ye)].concat(Le(Pe))},[Ve,C,r,Pe,ye,ce]),Je=function it(Ge){var et=Le(Ge).sort(function(lt,ct){return b(lt,ct,{searchValue:ye})});return et.map(function(lt){return Array.isArray(lt.options)?q(q({},lt),{},{options:lt.options.length>0?it(lt.options):lt.options}):lt})},De=p.useMemo(function(){return b?Je(Ke):Ke},[Ke,b,ye]),ze=p.useMemo(function(){return eF(De,{fieldNames:ce,childrenAsData:G})},[De,ce,G]),_e=function(Ge){var et=pe(Ge);if(Be(et),H&&(et.length!==me.length||et.some(function(vt,jt){var It;return((It=me[jt])===null||It===void 0?void 0:It.value)!==(vt==null?void 0:vt.value)}))){var lt=W?et:et.map(function(vt){return vt.value}),ct=et.map(function(vt){return Wp(Re(vt.value))});H(V?lt:lt[0],V?ct:ct[0])}},We=p.useState(null),rt=de(We,2),gt=rt[0],Lt=rt[1],Tt=p.useState(0),Zt=de(Tt,2),tt=Zt[0],Ue=Zt[1],ft=N!==void 0?N:r!=="combobox",dt=p.useCallback(function(it,Ge){var et=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},lt=et.source,ct=lt===void 0?"keyboard":lt;Ue(Ge),a&&r==="combobox"&&it!==null&&ct==="keyboard"&&Lt(String(it))},[a,r]),st=function(Ge,et,lt){var ct=function(){var Ye,J=Re(Ge);return[W?{label:J==null?void 0:J[ce.label],value:Ge,key:(Ye=J==null?void 0:J.key)!==null&&Ye!==void 0?Ye:Ge}:Ge,Wp(J)]};if(et&&h){var vt=ct(),jt=de(vt,2),It=jt[0],zt=jt[1];h(It,zt)}else if(!et&&m&&lt!=="clear"){var Pt=ct(),Vt=de(Pt,2),qt=Vt[0],Jt=Vt[1];m(qt,Jt)}},Ze=My(function(it,Ge){var et,lt=V?Ge.selected:!0;lt?et=V?[].concat(Le(me),[it]):[it]:et=me.filter(function(ct){return ct.value!==it}),_e(et),st(it,lt),r==="combobox"?Lt(""):(!vu||f)&&(fe(""),Lt(""))}),Xe=function(Ge,et){_e(Ge);var lt=et.type,ct=et.values;(lt==="remove"||lt==="clear")&&ct.forEach(function(vt){st(vt.value,!1,lt)})},Qe=function(Ge,et){if(fe(Ge),Lt(null),et.source==="submit"){var lt=(Ge||"").trim();if(lt){var ct=Array.from(new Set([].concat(Le(xe),[lt])));_e(ct),st(lt,!0),fe("")}return}et.source!=="blur"&&(r==="combobox"&&_e(Ge),u==null||u(Ge))},wt=function(Ge){var et=Ge;r!=="tags"&&(et=Ge.map(function(ct){var vt=ne.get(ct);return vt==null?void 0:vt.value}).filter(function(ct){return ct!==void 0}));var lt=Array.from(new Set([].concat(Le(xe),Le(et))));_e(lt),lt.forEach(function(ct){st(ct,!0)})},At=p.useMemo(function(){var it=M!==!1&&g!==!1;return q(q({},ae),{},{flattenOptions:ze,onActiveValue:dt,defaultActiveFirstOption:ft,onSelect:Ze,menuItemSelectedIcon:$,rawValues:xe,fieldNames:ce,virtual:it,direction:R,listHeight:D,listItemHeight:L,childrenAsData:G,maxCount:B,optionRender:w})},[B,ae,ze,dt,ft,Ze,$,xe,ce,M,g,R,D,L,G,w]);return process.env.NODE_ENV!=="production"&&(PF(e),kF(se,ce)),p.createElement(Og.Provider,{value:At},p.createElement(AE,He({},K,{id:Y,prefixCls:i,ref:t,omitDomProps:_F,mode:r,displayValues:Te,onDisplayValuesChange:Xe,direction:R,searchValue:ye,onSearch:Qe,autoClearSearchValue:f,onSearchSplit:wt,dropdownMatchSelectWidth:g,OptionList:_E,emptyOptions:!ze.length,activeValue:gt,activeDescendantId:"".concat(Y,"_list_").concat(tt)})))});process.env.NODE_ENV!=="production"&&(LE.displayName="Select");var Rg=LE;Rg.Option=Ng;Rg.OptGroup=$g;function ea(e,t,n){return te({[`${e}-status-success`]:t==="success",[`${e}-status-warning`]:t==="warning",[`${e}-status-error`]:t==="error",[`${e}-status-validating`]:t==="validating",[`${e}-has-feedback`]:n})}const _l=(e,t)=>t||e,jE=()=>{const[,e]=br(),[t]=Vo("Empty"),r=new Qt(e.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return p.createElement("svg",{style:r,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},p.createElement("title",null,(t==null?void 0:t.description)||"Empty"),p.createElement("g",{fill:"none",fillRule:"evenodd"},p.createElement("g",{transform:"translate(24 31.67)"},p.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),p.createElement("path",{d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",fill:"#AEB8C2"}),p.createElement("path",{d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",fill:"url(#linearGradient-1)",transform:"translate(13.56)"}),p.createElement("path",{d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#F5F5F7"}),p.createElement("path",{d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",fill:"#DCE0E6"})),p.createElement("path",{d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",fill:"#DCE0E6"}),p.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},p.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),p.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))};process.env.NODE_ENV!=="production"&&(jE.displayName="EmptyImage");const BE=()=>{const[,e]=br(),[t]=Vo("Empty"),{colorFill:n,colorFillTertiary:r,colorFillQuaternary:o,colorBgContainer:i}=e,{borderColor:a,shadowColor:s,contentColor:l}=O.useMemo(()=>({borderColor:new Qt(n).onBackground(i).toHexString(),shadowColor:new Qt(r).onBackground(i).toHexString(),contentColor:new Qt(o).onBackground(i).toHexString()}),[n,r,o,i]);return p.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},p.createElement("title",null,(t==null?void 0:t.description)||"Empty"),p.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},p.createElement("ellipse",{fill:s,cx:"32",cy:"33",rx:"32",ry:"7"}),p.createElement("g",{fillRule:"nonzero",stroke:a},p.createElement("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),p.createElement("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:l}))))};process.env.NODE_ENV!=="production"&&(BE.displayName="SimpleImage");const jF=e=>{const{componentCls:t,margin:n,marginXS:r,marginXL:o,fontSize:i,lineHeight:a}=e;return{[t]:{marginInline:r,fontSize:i,lineHeight:a,textAlign:"center",[`${t}-image`]:{height:e.emptyImgHeight,marginBottom:r,opacity:e.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${t}-description`]:{color:e.colorTextDescription},[`${t}-footer`]:{marginTop:n},"&-normal":{marginBlock:o,color:e.colorTextDescription,[`${t}-description`]:{color:e.colorTextDescription},[`${t}-image`]:{height:e.emptyImgHeightMD}},"&-small":{marginBlock:r,color:e.colorTextDescription,[`${t}-image`]:{height:e.emptyImgHeightSM}}}}},BF=yn("Empty",e=>{const{componentCls:t,controlHeightLG:n,calc:r}=e,o=Xt(e,{emptyImgCls:`${t}-img`,emptyImgHeight:r(n).mul(2.5).equal(),emptyImgHeightMD:n,emptyImgHeightSM:r(n).mul(.875).equal()});return[jF(o)]});var zF=function(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};const zE=p.createElement(jE,null),FE=p.createElement(BE,null),ei=e=>{const{className:t,rootClassName:n,prefixCls:r,image:o=zE,description:i,children:a,imageStyle:s,style:l,classNames:c,styles:u}=e,d=zF(e,["className","rootClassName","prefixCls","image","description","children","imageStyle","style","classNames","styles"]),{getPrefixCls:f,direction:h,className:m,style:v,classNames:g,styles:y}=Rr("empty"),b=f("empty",r),[C,x,S]=BF(b),[w]=Vo("Empty"),E=typeof i<"u"?i:w==null?void 0:w.description,N=typeof E=="string"?E:"empty";let $=null;if(typeof o=="string"?$=p.createElement("img",{alt:N,src:o}):$=o,process.env.NODE_ENV!=="production"){const M=fn("Empty");[["imageStyle","styles: { image: {} }"]].forEach(R=>{let[k,D]=R;M.deprecated(!(k in e),k,D)})}return C(p.createElement("div",Object.assign({className:te(x,S,b,m,{[`${b}-normal`]:o===FE,[`${b}-rtl`]:h==="rtl"},t,n,g.root,c==null?void 0:c.root),style:Object.assign(Object.assign(Object.assign(Object.assign({},y.root),v),u==null?void 0:u.root),l)},d),p.createElement("div",{className:te(`${b}-image`,g.image,c==null?void 0:c.image),style:Object.assign(Object.assign(Object.assign({},s),y.image),u==null?void 0:u.image)},$),E&&p.createElement("div",{className:te(`${b}-description`,g.description,c==null?void 0:c.description),style:Object.assign(Object.assign({},y.description),u==null?void 0:u.description)},E),a&&p.createElement("div",{className:te(`${b}-footer`,g.footer,c==null?void 0:c.footer),style:Object.assign(Object.assign({},y.footer),u==null?void 0:u.footer)},a)))};ei.PRESENTED_IMAGE_DEFAULT=zE;ei.PRESENTED_IMAGE_SIMPLE=FE;process.env.NODE_ENV!=="production"&&(ei.displayName="Empty");const FF=e=>{const{componentName:t}=e,{getPrefixCls:n}=O.useContext(_t),r=n("empty");switch(t){case"Table":case"List":return O.createElement(ei,{image:ei.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return O.createElement(ei,{image:ei.PRESENTED_IMAGE_SIMPLE,className:`${r}-small`});case"Table.filter":return null;default:return O.createElement(ei,null)}},kd=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;var r,o;const{variant:i,[e]:a}=p.useContext(_t),s=p.useContext(SB),l=a==null?void 0:a.variant;let c;typeof t<"u"?c=t:n===!1?c="borderless":c=(o=(r=s??l)!==null&&r!==void 0?r:i)!==null&&o!==void 0?o:"outlined";const u=d2.includes(c);return[c,u]},HF=e=>{const n={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:e==="scroll"?"scroll":"visible",dynamicInset:!0};return{bottomLeft:Object.assign(Object.assign({},n),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},n),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},n),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},n),{points:["br","tr"],offset:[0,-4]})}};function VF(e,t){return e||HF(t)}const Ry=e=>{const{optionHeight:t,optionFontSize:n,optionLineHeight:r,optionPadding:o}=e;return{position:"relative",display:"block",minHeight:t,padding:o,color:e.colorText,fontWeight:"normal",fontSize:n,lineHeight:r,boxSizing:"border-box"}},WF=e=>{const{antCls:t,componentCls:n}=e,r=`${n}-item`,o=`&${t}-slide-up-enter${t}-slide-up-enter-active`,i=`&${t}-slide-up-appear${t}-slide-up-appear-active`,a=`&${t}-slide-up-leave${t}-slide-up-leave-active`,s=`${n}-dropdown-placement-`,l=`${r}-option-selected`;return[{[`${n}-dropdown`]:Object.assign(Object.assign({},Bn(e)),{position:"absolute",top:-9999,zIndex:e.zIndexPopup,boxSizing:"border-box",padding:e.paddingXXS,overflow:"hidden",fontSize:e.fontSize,fontVariant:"initial",backgroundColor:e.colorBgElevated,borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,[`
342
+ ${o}${s}bottomLeft,
343
+ ${i}${s}bottomLeft
344
+ `]:{animationName:fg},[`
345
+ ${o}${s}topLeft,
346
+ ${i}${s}topLeft,
347
+ ${o}${s}topRight,
348
+ ${i}${s}topRight
349
+ `]:{animationName:pg},[`${a}${s}bottomLeft`]:{animationName:hg},[`
350
+ ${a}${s}topLeft,
351
+ ${a}${s}topRight
352
+ `]:{animationName:mg},"&-hidden":{display:"none"},[r]:Object.assign(Object.assign({},Ry(e)),{cursor:"pointer",transition:`background ${e.motionDurationSlow} ease`,borderRadius:e.borderRadiusSM,"&-group":{color:e.colorTextDescription,fontSize:e.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},cl),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${r}-option-disabled)`]:{backgroundColor:e.optionActiveBg},[`&-selected:not(${r}-option-disabled)`]:{color:e.optionSelectedColor,fontWeight:e.optionSelectedFontWeight,backgroundColor:e.optionSelectedBg,[`${r}-option-state`]:{color:e.colorPrimary}},"&-disabled":{[`&${r}-option-selected`]:{backgroundColor:e.colorBgContainerDisabled},color:e.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:e.calc(e.controlPaddingHorizontal).mul(2).equal()}},"&-empty":Object.assign(Object.assign({},Ry(e)),{color:e.colorTextDisabled})}),[`${l}:has(+ ${l})`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${l}`]:{borderStartStartRadius:0,borderStartEndRadius:0}},"&-rtl":{direction:"rtl"}})},Ga(e,"slide-up"),Ga(e,"slide-down"),pu(e,"move-up"),pu(e,"move-down")]},UF=e=>{const{multipleSelectItemHeight:t,paddingXXS:n,lineWidth:r,INTERNAL_FIXED_ITEM_MARGIN:o}=e,i=e.max(e.calc(n).sub(r).equal(),0),a=e.max(e.calc(i).sub(o).equal(),0);return{basePadding:i,containerPadding:a,itemHeight:oe(t),itemLineHeight:oe(e.calc(t).sub(e.calc(e.lineWidth).mul(2)).equal())}},qF=e=>{const{multipleSelectItemHeight:t,selectHeight:n,lineWidth:r}=e;return e.calc(n).sub(t).div(2).sub(r).equal()},KF=e=>{const{componentCls:t,iconCls:n,borderRadiusSM:r,motionDurationSlow:o,paddingXS:i,multipleItemColorDisabled:a,multipleItemBorderColorDisabled:s,colorIcon:l,colorIconHover:c,INTERNAL_FIXED_ITEM_MARGIN:u}=e;return{[`${t}-selection-overflow`]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"},[`${t}-selection-item`]:{display:"flex",alignSelf:"center",flex:"none",boxSizing:"border-box",maxWidth:"100%",marginBlock:u,borderRadius:r,cursor:"default",transition:`font-size ${o}, line-height ${o}, height ${o}`,marginInlineEnd:e.calc(u).mul(2).equal(),paddingInlineStart:i,paddingInlineEnd:e.calc(i).div(2).equal(),[`${t}-disabled&`]:{color:a,borderColor:s,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:e.calc(i).div(2).equal(),overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},oa()),{display:"inline-flex",alignItems:"center",color:l,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${n}`]:{verticalAlign:"-0.2em"},"&:hover":{color:c}})}}}},GF=(e,t)=>{const{componentCls:n,INTERNAL_FIXED_ITEM_MARGIN:r}=e,o=`${n}-selection-overflow`,i=e.multipleSelectItemHeight,a=qF(e),s=t?`${n}-${t}`:"",l=UF(e);return{[`${n}-multiple${s}`]:Object.assign(Object.assign({},KF(e)),{[`${n}-selector`]:{display:"flex",alignItems:"center",width:"100%",height:"100%",paddingInline:l.basePadding,paddingBlock:l.containerPadding,borderRadius:e.borderRadius,[`${n}-disabled&`]:{background:e.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${oe(r)} 0`,lineHeight:oe(i),visibility:"hidden",content:'"\\a0"'}},[`${n}-selection-item`]:{height:l.itemHeight,lineHeight:oe(l.itemLineHeight)},[`${n}-selection-wrap`]:{alignSelf:"flex-start","&:after":{lineHeight:oe(i),marginBlock:r}},[`${n}-prefix`]:{marginInlineStart:e.calc(e.inputPaddingHorizontalBase).sub(l.basePadding).equal()},[`${o}-item + ${o}-item,
353
+ ${n}-prefix + ${n}-selection-wrap
354
+ `]:{[`${n}-selection-search`]:{marginInlineStart:0},[`${n}-selection-placeholder`]:{insetInlineStart:0}},[`${o}-item-suffix`]:{minHeight:l.itemHeight,marginBlock:r},[`${n}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:e.calc(e.inputPaddingHorizontalBase).sub(a).equal(),"\n &-input,\n &-mirror\n ":{height:i,fontFamily:e.fontFamily,lineHeight:oe(i),transition:`all ${e.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${n}-selection-placeholder`]:{position:"absolute",top:"50%",insetInlineStart:e.calc(e.inputPaddingHorizontalBase).sub(l.basePadding).equal(),insetInlineEnd:e.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${e.motionDurationSlow}`}})}};function th(e,t){const{componentCls:n}=e,r=t?`${n}-${t}`:"",o={[`${n}-multiple${r}`]:{fontSize:e.fontSize,[`${n}-selector`]:{[`${n}-show-search&`]:{cursor:"text"}},[`
355
+ &${n}-show-arrow ${n}-selector,
356
+ &${n}-allow-clear ${n}-selector
357
+ `]:{paddingInlineEnd:e.calc(e.fontSizeIcon).add(e.controlPaddingHorizontal).equal()}}};return[GF(e,t),o]}const XF=e=>{const{componentCls:t}=e,n=Xt(e,{selectHeight:e.controlHeightSM,multipleSelectItemHeight:e.multipleItemHeightSM,borderRadius:e.borderRadiusSM,borderRadiusSM:e.borderRadiusXS}),r=Xt(e,{fontSize:e.fontSizeLG,selectHeight:e.controlHeightLG,multipleSelectItemHeight:e.multipleItemHeightLG,borderRadius:e.borderRadiusLG,borderRadiusSM:e.borderRadius});return[th(e),th(n,"sm"),{[`${t}-multiple${t}-sm`]:{[`${t}-selection-placeholder`]:{insetInline:e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal()},[`${t}-selection-search`]:{marginInlineStart:2}}},th(r,"lg")]};function nh(e,t){const{componentCls:n,inputPaddingHorizontalBase:r,borderRadius:o}=e,i=e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),a=t?`${n}-${t}`:"";return{[`${n}-single${a}`]:{fontSize:e.fontSize,height:e.controlHeight,[`${n}-selector`]:Object.assign(Object.assign({},Bn(e,!0)),{display:"flex",borderRadius:o,flex:"1 1 auto",[`${n}-selection-wrap:after`]:{lineHeight:oe(i)},[`${n}-selection-search`]:{position:"absolute",inset:0,width:"100%","&-input":{width:"100%",WebkitAppearance:"textfield"}},[`
358
+ ${n}-selection-item,
359
+ ${n}-selection-placeholder
360
+ `]:{display:"block",padding:0,lineHeight:oe(i),transition:`all ${e.motionDurationSlow}, visibility 0s`,alignSelf:"center"},[`${n}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${n}-selection-item:empty:after`,`${n}-selection-placeholder:empty:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
361
+ &${n}-show-arrow ${n}-selection-item,
362
+ &${n}-show-arrow ${n}-selection-search,
363
+ &${n}-show-arrow ${n}-selection-placeholder
364
+ `]:{paddingInlineEnd:e.showArrowPaddingInlineEnd},[`&${n}-open ${n}-selection-item`]:{color:e.colorTextPlaceholder},[`&:not(${n}-customize-input)`]:{[`${n}-selector`]:{width:"100%",height:"100%",alignItems:"center",padding:`0 ${oe(r)}`,[`${n}-selection-search-input`]:{height:i,fontSize:e.fontSize},"&:after":{lineHeight:oe(i)}}},[`&${n}-customize-input`]:{[`${n}-selector`]:{"&:after":{display:"none"},[`${n}-selection-search`]:{position:"static",width:"100%"},[`${n}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${oe(r)}`,"&:after":{display:"none"}}}}}}}function YF(e){const{componentCls:t}=e,n=e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal();return[nh(e),nh(Xt(e,{controlHeight:e.controlHeightSM,borderRadius:e.borderRadiusSM}),"sm"),{[`${t}-single${t}-sm`]:{[`&:not(${t}-customize-input)`]:{[`${t}-selector`]:{padding:`0 ${oe(n)}`},[`&${t}-show-arrow ${t}-selection-search`]:{insetInlineEnd:e.calc(n).add(e.calc(e.fontSize).mul(1.5)).equal()},[`
365
+ &${t}-show-arrow ${t}-selection-item,
366
+ &${t}-show-arrow ${t}-selection-placeholder
367
+ `]:{paddingInlineEnd:e.calc(e.fontSize).mul(1.5).equal()}}}},nh(Xt(e,{controlHeight:e.singleItemHeightLG,fontSize:e.fontSizeLG,borderRadius:e.borderRadiusLG}),"lg")]}const JF=e=>{const{fontSize:t,lineHeight:n,lineWidth:r,controlHeight:o,controlHeightSM:i,controlHeightLG:a,paddingXXS:s,controlPaddingHorizontal:l,zIndexPopupBase:c,colorText:u,fontWeightStrong:d,controlItemBgActive:f,controlItemBgHover:h,colorBgContainer:m,colorFillSecondary:v,colorBgContainerDisabled:g,colorTextDisabled:y,colorPrimaryHover:b,colorPrimary:C,controlOutline:x}=e,S=s*2,w=r*2,E=Math.min(o-S,o-w),N=Math.min(i-S,i-w),$=Math.min(a-S,a-w);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(s/2),zIndexPopup:c+50,optionSelectedColor:u,optionSelectedFontWeight:d,optionSelectedBg:f,optionActiveBg:h,optionPadding:`${(o-t*n)/2}px ${l}px`,optionFontSize:t,optionLineHeight:n,optionHeight:o,selectorBg:m,clearBg:m,singleItemHeightLG:a,multipleItemBg:v,multipleItemBorderColor:"transparent",multipleItemHeight:E,multipleItemHeightSM:N,multipleItemHeightLG:$,multipleSelectorBgDisabled:g,multipleItemColorDisabled:y,multipleItemBorderColorDisabled:"transparent",showArrowPaddingInlineEnd:Math.ceil(e.fontSize*1.25),hoverBorderColor:b,activeBorderColor:C,activeOutlineColor:x,selectAffixPadding:s}},HE=(e,t)=>{const{componentCls:n,antCls:r,controlOutlineWidth:o}=e;return{[`&:not(${n}-customize-input) ${n}-selector`]:{border:`${oe(e.lineWidth)} ${e.lineType} ${t.borderColor}`,background:e.selectorBg},[`&:not(${n}-disabled):not(${n}-customize-input):not(${r}-pagination-size-changer)`]:{[`&:hover ${n}-selector`]:{borderColor:t.hoverBorderHover},[`${n}-focused& ${n}-selector`]:{borderColor:t.activeBorderColor,boxShadow:`0 0 0 ${oe(o)} ${t.activeOutlineColor}`,outline:0},[`${n}-prefix`]:{color:t.color}}}},Iy=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},HE(e,t))}),QF=e=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign({},HE(e,{borderColor:e.colorBorder,hoverBorderHover:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeOutlineColor:e.activeOutlineColor,color:e.colorText})),Iy(e,{status:"error",borderColor:e.colorError,hoverBorderHover:e.colorErrorHover,activeBorderColor:e.colorError,activeOutlineColor:e.colorErrorOutline,color:e.colorError})),Iy(e,{status:"warning",borderColor:e.colorWarning,hoverBorderHover:e.colorWarningHover,activeBorderColor:e.colorWarning,activeOutlineColor:e.colorWarningOutline,color:e.colorWarning})),{[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{background:e.colorBgContainerDisabled,color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.multipleItemBg,border:`${oe(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}})}),VE=(e,t)=>{const{componentCls:n,antCls:r}=e;return{[`&:not(${n}-customize-input) ${n}-selector`]:{background:t.bg,border:`${oe(e.lineWidth)} ${e.lineType} transparent`,color:t.color},[`&:not(${n}-disabled):not(${n}-customize-input):not(${r}-pagination-size-changer)`]:{[`&:hover ${n}-selector`]:{background:t.hoverBg},[`${n}-focused& ${n}-selector`]:{background:e.selectorBg,borderColor:t.activeBorderColor,outline:0}}}},Ty=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},VE(e,t))}),ZF=e=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign({},VE(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor,color:e.colorText})),Ty(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,color:e.colorError})),Ty(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,color:e.colorWarning})),{[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{borderColor:e.colorBorder,background:e.colorBgContainerDisabled,color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.colorBgContainer,border:`${oe(e.lineWidth)} ${e.lineType} ${e.colorSplit}`}})}),eH=e=>({"&-borderless":{[`${e.componentCls}-selector`]:{background:"transparent",border:`${oe(e.lineWidth)} ${e.lineType} transparent`},[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.multipleItemBg,border:`${oe(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`},[`&${e.componentCls}-status-error`]:{[`${e.componentCls}-prefix, ${e.componentCls}-selection-item`]:{color:e.colorError}},[`&${e.componentCls}-status-warning`]:{[`${e.componentCls}-prefix, ${e.componentCls}-selection-item`]:{color:e.colorWarning}}}}),WE=(e,t)=>{const{componentCls:n,antCls:r}=e;return{[`&:not(${n}-customize-input) ${n}-selector`]:{borderWidth:`0 0 ${oe(e.lineWidth)} 0`,borderStyle:`none none ${e.lineType} none`,borderColor:t.borderColor,background:e.selectorBg,borderRadius:0},[`&:not(${n}-disabled):not(${n}-customize-input):not(${r}-pagination-size-changer)`]:{[`&:hover ${n}-selector`]:{borderColor:t.hoverBorderHover},[`${n}-focused& ${n}-selector`]:{borderColor:t.activeBorderColor,outline:0},[`${n}-prefix`]:{color:t.color}}}},Ay=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},WE(e,t))}),tH=e=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign({},WE(e,{borderColor:e.colorBorder,hoverBorderHover:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeOutlineColor:e.activeOutlineColor,color:e.colorText})),Ay(e,{status:"error",borderColor:e.colorError,hoverBorderHover:e.colorErrorHover,activeBorderColor:e.colorError,activeOutlineColor:e.colorErrorOutline,color:e.colorError})),Ay(e,{status:"warning",borderColor:e.colorWarning,hoverBorderHover:e.colorWarningHover,activeBorderColor:e.colorWarning,activeOutlineColor:e.colorWarningOutline,color:e.colorWarning})),{[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.multipleItemBg,border:`${oe(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}})}),nH=e=>({[e.componentCls]:Object.assign(Object.assign(Object.assign(Object.assign({},QF(e)),ZF(e)),eH(e)),tH(e))}),rH=e=>{const{componentCls:t}=e;return{position:"relative",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,input:{cursor:"pointer"},[`${t}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit",height:"100%"}},[`${t}-disabled&`]:{cursor:"not-allowed",input:{cursor:"not-allowed"}}}},oH=e=>{const{componentCls:t}=e;return{[`${t}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none",fontFamily:"inherit","&::-webkit-search-cancel-button":{display:"none",appearance:"none"}}}},iH=e=>{const{antCls:t,componentCls:n,inputPaddingHorizontalBase:r,iconCls:o}=e;return{[n]:Object.assign(Object.assign({},Bn(e)),{position:"relative",display:"inline-flex",cursor:"pointer",[`&:not(${n}-customize-input) ${n}-selector`]:Object.assign(Object.assign({},rH(e)),oH(e)),[`${n}-selection-item`]:Object.assign(Object.assign({flex:1,fontWeight:"normal",position:"relative",userSelect:"none"},cl),{[`> ${t}-typography`]:{display:"inline"}}),[`${n}-selection-placeholder`]:Object.assign(Object.assign({},cl),{flex:1,color:e.colorTextPlaceholder,pointerEvents:"none"}),[`${n}-arrow`]:Object.assign(Object.assign({},oa()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:r,height:e.fontSizeIcon,marginTop:e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",transition:`opacity ${e.motionDurationSlow} ease`,[o]:{verticalAlign:"top",transition:`transform ${e.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${n}-suffix)`]:{pointerEvents:"auto"}},[`${n}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${n}-selection-wrap`]:{display:"flex",width:"100%",position:"relative",minWidth:0,"&:after":{content:'"\\a0"',width:0,overflow:"hidden"}},[`${n}-prefix`]:{flex:"none",marginInlineEnd:e.selectAffixPadding},[`${n}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:r,zIndex:1,display:"inline-block",width:e.fontSizeIcon,height:e.fontSizeIcon,marginTop:e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",cursor:"pointer",opacity:0,transition:`color ${e.motionDurationMid} ease, opacity ${e.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:e.colorTextTertiary}},[`&:hover ${n}-clear`]:{opacity:1,background:e.colorBgBase,borderRadius:"50%"}}),[`${n}-status`]:{"&-error, &-warning, &-success, &-validating":{[`&${n}-has-feedback`]:{[`${n}-clear`]:{insetInlineEnd:e.calc(r).add(e.fontSize).add(e.paddingXS).equal()}}}}}},aH=e=>{const{componentCls:t}=e;return[{[t]:{[`&${t}-in-form-item`]:{width:"100%"}}},iH(e),YF(e),XF(e),WF(e),{[`${t}-rtl`]:{direction:"rtl"}},Rl(e,{borderElCls:`${t}-selector`,focusElCls:`${t}-focused`})]},sH=yn("Select",(e,t)=>{let{rootPrefixCls:n}=t;const r=Xt(e,{rootPrefixCls:n,inputPaddingHorizontalBase:e.calc(e.paddingSM).sub(1).equal(),multipleSelectItemHeight:e.multipleItemHeight,selectHeight:e.controlHeight});return[aH(r),nH(r)]},JF,{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}});var lH={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},cH=function(t,n){return p.createElement(Wn,He({},t,{ref:n,icon:lH}))},UE=p.forwardRef(cH);process.env.NODE_ENV!=="production"&&(UE.displayName="CheckOutlined");var uH={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},dH=function(t,n){return p.createElement(Wn,He({},t,{ref:n,icon:uH}))},Ig=p.forwardRef(dH);process.env.NODE_ENV!=="production"&&(Ig.displayName="DownOutlined");var fH={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},hH=function(t,n){return p.createElement(Wn,He({},t,{ref:n,icon:fH}))},Tg=p.forwardRef(hH);process.env.NODE_ENV!=="production"&&(Tg.displayName="SearchOutlined");function pH(e){let{suffixIcon:t,clearIcon:n,menuItemSelectedIcon:r,removeIcon:o,loading:i,multiple:a,hasFeedback:s,prefixCls:l,showSuffixIcon:c,feedbackIcon:u,showArrow:d,componentName:f}=e;process.env.NODE_ENV!=="production"&&fn(f).deprecated(!n,"clearIcon","allowClear={{ clearIcon: React.ReactNode }}");const h=n??p.createElement(yd,null),m=b=>t===null&&!s&&!d?null:p.createElement(p.Fragment,null,c!==!1&&b,s&&u);let v=null;if(t!==void 0)v=m(t);else if(i)v=m(p.createElement(ag,{spin:!0}));else{const b=`${l}-suffix`;v=C=>{let{open:x,showSearch:S}=C;return m(x&&S?p.createElement(Tg,{className:b}):p.createElement(Ig,{className:b}))}}let g=null;r!==void 0?g=r:a?g=p.createElement(UE,null):g=null;let y=null;return o!==void 0?y=o:y=p.createElement(El,null),{clearIcon:h,suffixIcon:v,itemIcon:g,removeIcon:y}}function mH(e,t){return t!==void 0?t:e!==null}var gH=function(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};const qE="SECRET_COMBOBOX_MODE_DO_NOT_USE",KE=(e,t)=>{var n;const{prefixCls:r,bordered:o,className:i,rootClassName:a,getPopupContainer:s,popupClassName:l,dropdownClassName:c,listHeight:u=256,placement:d,listItemHeight:f,size:h,disabled:m,notFoundContent:v,status:g,builtinPlacements:y,dropdownMatchSelectWidth:b,popupMatchSelectWidth:C,direction:x,style:S,allowClear:w,variant:E,dropdownStyle:N,transitionName:$,tagRender:M,maxCount:R,prefix:k}=e,D=gH(e,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear","variant","dropdownStyle","transitionName","tagRender","maxCount","prefix"]),{getPopupContainer:A,getPrefixCls:L,renderEmpty:T,direction:I,virtual:_,popupMatchSelectWidth:W,popupOverflow:H}=p.useContext(_t),B=Rr("select"),[,K]=br(),Y=f??(K==null?void 0:K.controlHeight),V=L("select",r),G=L(),Q=x??I,{compactSize:ce,compactItemClassnames:Z}=Ei(V,Q),[he,ye]=kd("select",E,o),fe=oo(V),[ae,ve,ne]=sH(V,fe),se=p.useMemo(()=>{const{mode:gt}=e;if(gt!=="combobox")return gt===qE?"combobox":gt},[e.mode]),pe=se==="multiple"||se==="tags",Ne=mH(e.suffixIcon,e.showArrow),Me=(n=C??b)!==null&&n!==void 0?n:W,{status:$e,hasFeedback:Be,isFormItemInput:F,feedbackIcon:be}=p.useContext(Mr),ue=_l($e,g);let me;v!==void 0?me=v:se==="combobox"?me=null:me=(T==null?void 0:T("Select"))||p.createElement(FF,{componentName:"Select"});const{suffixIcon:Re,itemIcon:Te,removeIcon:xe,clearIcon:Ve}=pH(Object.assign(Object.assign({},D),{multiple:pe,hasFeedback:Be,feedbackIcon:be,showSuffixIcon:Ne,prefixCls:V,componentName:"Select"})),qe=w===!0?{clearIcon:Ve}:w,Pe=Hn(D,["suffixIcon","itemIcon"]),Ke=te(l||c,{[`${V}-dropdown-${Q}`]:Q==="rtl"},a,ne,fe,ve),Je=Vr(gt=>{var Lt;return(Lt=h??ce)!==null&&Lt!==void 0?Lt:gt}),De=p.useContext(Fr),ze=m??De,_e=te({[`${V}-lg`]:Je==="large",[`${V}-sm`]:Je==="small",[`${V}-rtl`]:Q==="rtl",[`${V}-${he}`]:ye,[`${V}-in-form-item`]:F},ea(V,ue,Be),Z,B.className,i,a,ne,fe,ve),We=p.useMemo(()=>d!==void 0?d:Q==="rtl"?"bottomRight":"bottomLeft",[d,Q]);if(process.env.NODE_ENV!=="production"){const gt=fn("Select");gt.deprecated(!c,"dropdownClassName","popupClassName"),gt.deprecated(b===void 0,"dropdownMatchSelectWidth","popupMatchSelectWidth"),process.env.NODE_ENV!=="production"&&gt(!("showArrow"in e),"deprecated","`showArrow` is deprecated which will be removed in next major version. It will be a default behavior, you can hide it by setting `suffixIcon` to null."),gt.deprecated(!("bordered"in e),"bordered","variant"),process.env.NODE_ENV!=="production"&&gt(!(typeof R<"u"&&!pe),"usage","`maxCount` only works with mode `multiple` or `tags`")}const[rt]=$l("SelectLike",N==null?void 0:N.zIndex);return ae(p.createElement(Rg,Object.assign({ref:t,virtual:_,showSearch:B.showSearch},Pe,{style:Object.assign(Object.assign({},B.style),S),dropdownMatchSelectWidth:Me,transitionName:Zi(G,"slide-up",$),builtinPlacements:VF(y,H),listHeight:u,listItemHeight:Y,mode:se,prefixCls:V,placement:We,direction:Q,prefix:k,suffixIcon:Re,menuItemSelectedIcon:Te,removeIcon:xe,allowClear:qe,notFoundContent:me,className:_e,getPopupContainer:s||A,dropdownClassName:Ke,disabled:ze,dropdownStyle:Object.assign(Object.assign({},N),{zIndex:rt}),maxCount:pe?R:void 0,tagRender:pe?M:void 0})))};process.env.NODE_ENV!=="production"&&(KE.displayName="Select");const jo=p.forwardRef(KE),vH=Sg(jo,"dropdownAlign");jo.SECRET_COMBOBOX_MODE_DO_NOT_USE=qE;jo.Option=Ng;jo.OptGroup=$g;jo._InternalPanelDoNotUseOrYouWillBeFired=vH;process.env.NODE_ENV!=="production"&&(jo.displayName="Select");const bu=e=>e?typeof e=="function"?e():e:null;function Ag(e){var t=e.children,n=e.prefixCls,r=e.id,o=e.overlayInnerStyle,i=e.bodyClassName,a=e.className,s=e.style;return p.createElement("div",{className:te("".concat(n,"-content"),a),style:s},p.createElement("div",{className:te("".concat(n,"-inner"),i),id:r,role:"tooltip",style:o},typeof t=="function"?t():t))}var ma={shiftX:64,adjustY:1},ga={adjustX:1,shiftY:!0},Ar=[0,0],bH={left:{points:["cr","cl"],overflow:ga,offset:[-4,0],targetOffset:Ar},right:{points:["cl","cr"],overflow:ga,offset:[4,0],targetOffset:Ar},top:{points:["bc","tc"],overflow:ma,offset:[0,-4],targetOffset:Ar},bottom:{points:["tc","bc"],overflow:ma,offset:[0,4],targetOffset:Ar},topLeft:{points:["bl","tl"],overflow:ma,offset:[0,-4],targetOffset:Ar},leftTop:{points:["tr","tl"],overflow:ga,offset:[-4,0],targetOffset:Ar},topRight:{points:["br","tr"],overflow:ma,offset:[0,-4],targetOffset:Ar},rightTop:{points:["tl","tr"],overflow:ga,offset:[4,0],targetOffset:Ar},bottomRight:{points:["tr","br"],overflow:ma,offset:[0,4],targetOffset:Ar},rightBottom:{points:["bl","br"],overflow:ga,offset:[4,0],targetOffset:Ar},bottomLeft:{points:["tl","bl"],overflow:ma,offset:[0,4],targetOffset:Ar},leftBottom:{points:["br","bl"],overflow:ga,offset:[-4,0],targetOffset:Ar}},yH=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],CH=function(t,n){var r=t.overlayClassName,o=t.trigger,i=o===void 0?["hover"]:o,a=t.mouseEnterDelay,s=a===void 0?0:a,l=t.mouseLeaveDelay,c=l===void 0?.1:l,u=t.overlayStyle,d=t.prefixCls,f=d===void 0?"rc-tooltip":d,h=t.children,m=t.onVisibleChange,v=t.afterVisibleChange,g=t.transitionName,y=t.animation,b=t.motion,C=t.placement,x=C===void 0?"right":C,S=t.align,w=S===void 0?{}:S,E=t.destroyTooltipOnHide,N=E===void 0?!1:E,$=t.defaultVisible,M=t.getTooltipContainer,R=t.overlayInnerStyle;t.arrowContent;var k=t.overlay,D=t.id,A=t.showArrow,L=A===void 0?!0:A,T=t.classNames,I=t.styles,_=Mt(t,yH),W=Tl(D),H=O.useRef(null);O.useImperativeHandle(n,function(){return H.current});var B=q({},_);"visible"in t&&(B.popupVisible=t.visible);var K=function(){return p.createElement(Ag,{key:"content",prefixCls:f,id:W,bodyClassName:T==null?void 0:T.body,overlayInnerStyle:q(q({},R),I==null?void 0:I.body)},k)},Y=function(){var G=p.Children.only(h),Q=(G==null?void 0:G.props)||{},ce=q(q({},Q),{},{"aria-describedby":k?W:null});return p.cloneElement(h,ce)};return p.createElement(Pd,He({popupClassName:te(r,T==null?void 0:T.root),prefixCls:f,popup:K,action:i,builtinPlacements:bH,popupPlacement:x,ref:H,popupAlign:w,getPopupContainer:M,onPopupVisibleChange:m,afterPopupVisibleChange:v,popupTransitionName:g,popupAnimation:y,popupMotion:b,defaultPopupVisible:$,autoDestroy:N,mouseLeaveDelay:c,popupStyle:q(q({},u),I==null?void 0:I.root),mouseEnterDelay:s,arrow:L},B),Y())};const SH=O.forwardRef(CH);function Pg(e){const{sizePopupArrow:t,borderRadiusXS:n,borderRadiusOuter:r}=e,o=t/2,i=0,a=o,s=r*1/Math.sqrt(2),l=o-r*(1-1/Math.sqrt(2)),c=o-n*(1/Math.sqrt(2)),u=r*(Math.sqrt(2)-1)+n*(1/Math.sqrt(2)),d=2*o-c,f=u,h=2*o-s,m=l,v=2*o-i,g=a,y=o*Math.sqrt(2)+r*(Math.sqrt(2)-2),b=r*(Math.sqrt(2)-1),C=`polygon(${b}px 100%, 50% ${b}px, ${2*o-b}px 100%, ${b}px 100%)`,x=`path('M ${i} ${a} A ${r} ${r} 0 0 0 ${s} ${l} L ${c} ${u} A ${n} ${n} 0 0 1 ${d} ${f} L ${h} ${m} A ${r} ${r} 0 0 0 ${v} ${g} Z')`;return{arrowShadowWidth:y,arrowPath:x,arrowPolygon:C}}const xH=(e,t,n)=>{const{sizePopupArrow:r,arrowPolygon:o,arrowPath:i,arrowShadowWidth:a,borderRadiusXS:s,calc:l}=e;return{pointerEvents:"none",width:r,height:r,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:r,height:l(r).div(2).equal(),background:t,clipPath:{_multi_value_:!0,value:[o,i]},content:'""'},"&::after":{content:'""',position:"absolute",width:a,height:a,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${oe(s)} 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:n,zIndex:0,background:"transparent"}}},GE=8;function Dd(e){const{contentRadius:t,limitVerticalRadius:n}=e,r=t>12?t+2:12;return{arrowOffsetHorizontal:r,arrowOffsetVertical:n?GE:r}}function fc(e,t){return e?t:{}}function kg(e,t,n){const{componentCls:r,boxShadowPopoverArrow:o,arrowOffsetVertical:i,arrowOffsetHorizontal:a}=e,{arrowDistance:s=0,arrowPlacement:l={left:!0,right:!0,top:!0,bottom:!0}}=n||{};return{[r]:Object.assign(Object.assign(Object.assign(Object.assign({[`${r}-arrow`]:[Object.assign(Object.assign({position:"absolute",zIndex:1,display:"block"},xH(e,t,o)),{"&:before":{background:t}})]},fc(!!l.top,{[[`&-placement-top > ${r}-arrow`,`&-placement-topLeft > ${r}-arrow`,`&-placement-topRight > ${r}-arrow`].join(",")]:{bottom:s,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top > ${r}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},"&-placement-topLeft":{"--arrow-offset-horizontal":a,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:a}}},"&-placement-topRight":{"--arrow-offset-horizontal":`calc(100% - ${oe(a)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:a}}}})),fc(!!l.bottom,{[[`&-placement-bottom > ${r}-arrow`,`&-placement-bottomLeft > ${r}-arrow`,`&-placement-bottomRight > ${r}-arrow`].join(",")]:{top:s,transform:"translateY(-100%)"},[`&-placement-bottom > ${r}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},"&-placement-bottomLeft":{"--arrow-offset-horizontal":a,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:a}}},"&-placement-bottomRight":{"--arrow-offset-horizontal":`calc(100% - ${oe(a)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:a}}}})),fc(!!l.left,{[[`&-placement-left > ${r}-arrow`,`&-placement-leftTop > ${r}-arrow`,`&-placement-leftBottom > ${r}-arrow`].join(",")]:{right:{_skip_check_:!0,value:s},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left > ${r}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop > ${r}-arrow`]:{top:i},[`&-placement-leftBottom > ${r}-arrow`]:{bottom:i}})),fc(!!l.right,{[[`&-placement-right > ${r}-arrow`,`&-placement-rightTop > ${r}-arrow`,`&-placement-rightBottom > ${r}-arrow`].join(",")]:{left:{_skip_check_:!0,value:s},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right > ${r}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop > ${r}-arrow`]:{top:i},[`&-placement-rightBottom > ${r}-arrow`]:{bottom:i}}))}}function wH(e,t,n,r){if(r===!1)return{adjustX:!1,adjustY:!1};const o=r&&typeof r=="object"?r:{},i={};switch(e){case"top":case"bottom":i.shiftX=t.arrowOffsetHorizontal*2+n,i.shiftY=!0,i.adjustY=!0;break;case"left":case"right":i.shiftY=t.arrowOffsetVertical*2+n,i.shiftX=!0,i.adjustX=!0;break}const a=Object.assign(Object.assign({},i),o);return a.shiftX||(a.adjustX=!0),a.shiftY||(a.adjustY=!0),a}const Py={left:{points:["cr","cl"]},right:{points:["cl","cr"]},top:{points:["bc","tc"]},bottom:{points:["tc","bc"]},topLeft:{points:["bl","tl"]},leftTop:{points:["tr","tl"]},topRight:{points:["br","tr"]},rightTop:{points:["tl","tr"]},bottomRight:{points:["tr","br"]},rightBottom:{points:["bl","br"]},bottomLeft:{points:["tl","bl"]},leftBottom:{points:["br","bl"]}},EH={topLeft:{points:["bl","tc"]},leftTop:{points:["tr","cl"]},topRight:{points:["br","tc"]},rightTop:{points:["tl","cr"]},bottomRight:{points:["tr","bc"]},rightBottom:{points:["bl","cr"]},bottomLeft:{points:["tl","bc"]},leftBottom:{points:["br","cl"]}},OH=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function XE(e){const{arrowWidth:t,autoAdjustOverflow:n,arrowPointAtCenter:r,offset:o,borderRadius:i,visibleFirst:a}=e,s=t/2,l={};return Object.keys(Py).forEach(c=>{const u=r&&EH[c]||Py[c],d=Object.assign(Object.assign({},u),{offset:[0,0],dynamicInset:!0});switch(l[c]=d,OH.has(c)&&(d.autoArrow=!1),c){case"top":case"topLeft":case"topRight":d.offset[1]=-s-o;break;case"bottom":case"bottomLeft":case"bottomRight":d.offset[1]=s+o;break;case"left":case"leftTop":case"leftBottom":d.offset[0]=-s-o;break;case"right":case"rightTop":case"rightBottom":d.offset[0]=s+o;break}const f=Dd({contentRadius:i,limitVerticalRadius:!0});if(r)switch(c){case"topLeft":case"bottomLeft":d.offset[0]=-f.arrowOffsetHorizontal-s;break;case"topRight":case"bottomRight":d.offset[0]=f.arrowOffsetHorizontal+s;break;case"leftTop":case"rightTop":d.offset[1]=-f.arrowOffsetHorizontal*2+s;break;case"leftBottom":case"rightBottom":d.offset[1]=f.arrowOffsetHorizontal*2-s;break}d.overflow=wH(c,f,t,n),a&&(d.htmlRegion="visibleFirst")}),l}const $H=e=>{const{calc:t,componentCls:n,tooltipMaxWidth:r,tooltipColor:o,tooltipBg:i,tooltipBorderRadius:a,zIndexPopup:s,controlHeight:l,boxShadowSecondary:c,paddingSM:u,paddingXS:d,arrowOffsetHorizontal:f,sizePopupArrow:h}=e,m=t(a).add(h).add(f).equal(),v=t(a).mul(2).add(h).equal();return[{[n]:Object.assign(Object.assign(Object.assign(Object.assign({},Bn(e)),{position:"absolute",zIndex:s,display:"block",width:"max-content",maxWidth:r,visibility:"visible","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:["var(--valid-offset-x, 50%)","var(--arrow-y, 50%)"].join(" "),"&-hidden":{display:"none"},"--antd-arrow-background-color":i,[`${n}-inner`]:{minWidth:v,minHeight:l,padding:`${oe(e.calc(u).div(2).equal())} ${oe(d)}`,color:o,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:i,borderRadius:a,boxShadow:c,boxSizing:"border-box"},[["&-placement-topLeft","&-placement-topRight","&-placement-bottomLeft","&-placement-bottomRight"].join(",")]:{minWidth:m},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${n}-inner`]:{borderRadius:e.min(a,GE)}},[`${n}-content`]:{position:"relative"}}),L2(e,(g,y)=>{let{darkColor:b}=y;return{[`&${n}-${g}`]:{[`${n}-inner`]:{backgroundColor:b},[`${n}-arrow`]:{"--antd-arrow-background-color":b}}}})),{"&-rtl":{direction:"rtl"}})},kg(e,"var(--antd-arrow-background-color)"),{[`${n}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow}}]},NH=e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+70},Dd({contentRadius:e.borderRadius,limitVerticalRadius:!0})),Pg(Xt(e,{borderRadiusOuter:Math.min(e.borderRadiusOuter,4)}))),YE=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return yn("Tooltip",r=>{const{borderRadius:o,colorTextLightSolid:i,colorBgSpotlight:a}=r,s=Xt(r,{tooltipMaxWidth:250,tooltipColor:i,tooltipBorderRadius:o,tooltipBg:a});return[$H(s),Ml(r,"zoom-big-fast")]},NH,{resetStyle:!1,injectStyle:t})(e)},MH=gi.map(e=>`${e}-inverse`);function RH(e){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)?[].concat(Le(MH),Le(gi)).includes(e):gi.includes(e)}function JE(e,t){const n=RH(t),r=te({[`${e}-${t}`]:t&&n}),o={},i={};return t&&!n&&(o.background=t,i["--antd-arrow-background-color"]=t),{className:r,overlayStyle:o,arrowStyle:i}}const IH=e=>{const{prefixCls:t,className:n,placement:r="top",title:o,color:i,overlayInnerStyle:a}=e,{getPrefixCls:s}=p.useContext(_t),l=s("tooltip",t),[c,u,d]=YE(l),f=JE(l,i),h=f.arrowStyle,m=Object.assign(Object.assign({},a),f.overlayStyle),v=te(u,d,l,`${l}-pure`,`${l}-placement-${r}`,n,f.className);return c(p.createElement("div",{className:v,style:h},p.createElement("div",{className:`${l}-arrow`}),p.createElement(Ag,Object.assign({},e,{className:u,prefixCls:l,overlayInnerStyle:m}),o)))};var TH=function(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};const AH=p.forwardRef((e,t)=>{var n,r;const{prefixCls:o,openClassName:i,getTooltipContainer:a,color:s,overlayInnerStyle:l,children:c,afterOpenChange:u,afterVisibleChange:d,destroyTooltipOnHide:f,arrow:h=!0,title:m,overlay:v,builtinPlacements:g,arrowPointAtCenter:y=!1,autoAdjustOverflow:b=!0,motion:C,getPopupContainer:x,placement:S="top",mouseEnterDelay:w=.1,mouseLeaveDelay:E=.1,overlayStyle:N,rootClassName:$,overlayClassName:M,styles:R,classNames:k}=e,D=TH(e,["prefixCls","openClassName","getTooltipContainer","color","overlayInnerStyle","children","afterOpenChange","afterVisibleChange","destroyTooltipOnHide","arrow","title","overlay","builtinPlacements","arrowPointAtCenter","autoAdjustOverflow","motion","getPopupContainer","placement","mouseEnterDelay","mouseLeaveDelay","overlayStyle","rootClassName","overlayClassName","styles","classNames"]),A=!!h,[,L]=br(),{getPopupContainer:T,getPrefixCls:I,direction:_,className:W,style:H,classNames:B,styles:K}=Rr("tooltip"),Y=fn("Tooltip"),V=p.useRef(null),G=()=>{var Pe;(Pe=V.current)===null||Pe===void 0||Pe.forceAlign()};p.useImperativeHandle(t,()=>{var Pe,Ke;return{forceAlign:G,forcePopupAlign:()=>{Y.deprecated(!1,"forcePopupAlign","forceAlign"),G()},nativeElement:(Pe=V.current)===null||Pe===void 0?void 0:Pe.nativeElement,popupElement:(Ke=V.current)===null||Ke===void 0?void 0:Ke.popupElement}}),process.env.NODE_ENV!=="production"&&([["visible","open"],["defaultVisible","defaultOpen"],["onVisibleChange","onOpenChange"],["afterVisibleChange","afterOpenChange"],["arrowPointAtCenter","arrow={{ pointAtCenter: true }}"],["overlayStyle","styles={{ root: {} }}"],["overlayInnerStyle","styles={{ body: {} }}"],["overlayClassName",'classNames={{ root: "" }}']].forEach(Pe=>{let[Ke,Je]=Pe;Y.deprecated(!(Ke in e),Ke,Je)}),process.env.NODE_ENV!=="production"&&Y(!f||typeof f=="boolean","usage","`destroyTooltipOnHide` no need config `keepParent` anymore. Please use `boolean` value directly."),process.env.NODE_ENV!=="production"&&Y(!h||typeof h=="boolean"||!("arrowPointAtCenter"in h),"deprecated","`arrowPointAtCenter` in `arrow` is deprecated. Please use `pointAtCenter` instead."));const[Q,ce]=bn(!1,{value:(n=e.open)!==null&&n!==void 0?n:e.visible,defaultValue:(r=e.defaultOpen)!==null&&r!==void 0?r:e.defaultVisible}),Z=!m&&!v&&m!==0,he=Pe=>{var Ke,Je;ce(Z?!1:Pe),Z||((Ke=e.onOpenChange)===null||Ke===void 0||Ke.call(e,Pe),(Je=e.onVisibleChange)===null||Je===void 0||Je.call(e,Pe))},ye=p.useMemo(()=>{var Pe,Ke;let Je=y;return typeof h=="object"&&(Je=(Ke=(Pe=h.pointAtCenter)!==null&&Pe!==void 0?Pe:h.arrowPointAtCenter)!==null&&Ke!==void 0?Ke:y),g||XE({arrowPointAtCenter:Je,autoAdjustOverflow:b,arrowWidth:A?L.sizePopupArrow:0,borderRadius:L.borderRadius,offset:L.marginXXS,visibleFirst:!0})},[y,h,g,L]),fe=p.useMemo(()=>m===0?m:v||m||"",[v,m]),ae=p.createElement(vi,{space:!0},typeof fe=="function"?fe():fe),ve=I("tooltip",o),ne=I(),se=e["data-popover-inject"];let pe=Q;!("open"in e)&&!("visible"in e)&&Z&&(pe=!1);const Ne=p.isValidElement(c)&&!yw(c)?c:p.createElement("span",null,c),Me=Ne.props,$e=!Me.className||typeof Me.className=="string"?te(Me.className,i||`${ve}-open`):Me.className,[Be,F,be]=YE(ve,!se),ue=JE(ve,s),me=ue.arrowStyle,Re=te(M,{[`${ve}-rtl`]:_==="rtl"},ue.className,$,F,be,W,B.root,k==null?void 0:k.root),Te=te(B.body,k==null?void 0:k.body),[xe,Ve]=$l("Tooltip",D.zIndex),qe=p.createElement(SH,Object.assign({},D,{zIndex:xe,showArrow:A,placement:S,mouseEnterDelay:w,mouseLeaveDelay:E,prefixCls:ve,classNames:{root:Re,body:Te},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},me),K.root),H),N),R==null?void 0:R.root),body:Object.assign(Object.assign(Object.assign(Object.assign({},K.body),l),R==null?void 0:R.body),ue.overlayStyle)},getTooltipContainer:x||a||T,ref:V,builtinPlacements:ye,overlay:ae,visible:pe,onVisibleChange:he,afterVisibleChange:u??d,arrowContent:p.createElement("span",{className:`${ve}-arrow-content`}),motion:{motionName:Zi(ne,"zoom-big-fast",e.transitionName),motionDeadline:1e3},destroyTooltipOnHide:!!f}),pe?Hr(Ne,{className:$e}):Ne);return Be(p.createElement(Ol.Provider,{value:Ve},qe))}),Sn=AH;process.env.NODE_ENV!=="production"&&(Sn.displayName="Tooltip");Sn._InternalPanelDoNotUseOrYouWillBeFired=IH;const PH=e=>{const{componentCls:t,popoverColor:n,titleMinWidth:r,fontWeightStrong:o,innerPadding:i,boxShadowSecondary:a,colorTextHeading:s,borderRadiusLG:l,zIndexPopup:c,titleMarginBottom:u,colorBgElevated:d,popoverBg:f,titleBorderBottom:h,innerContentPadding:m,titlePadding:v}=e;return[{[t]:Object.assign(Object.assign({},Bn(e)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:c,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:["var(--valid-offset-x, 50%)","var(--arrow-y, 50%)"].join(" "),"--antd-arrow-background-color":d,width:"max-content",maxWidth:"100vw","&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${t}-content`]:{position:"relative"},[`${t}-inner`]:{backgroundColor:f,backgroundClip:"padding-box",borderRadius:l,boxShadow:a,padding:i},[`${t}-title`]:{minWidth:r,marginBottom:u,color:s,fontWeight:o,borderBottom:h,padding:v},[`${t}-inner-content`]:{color:n,padding:m}})},kg(e,"var(--antd-arrow-background-color)"),{[`${t}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow,display:"inline-block",[`${t}-content`]:{display:"inline-block"}}}]},kH=e=>{const{componentCls:t}=e;return{[t]:gi.map(n=>{const r=e[`${n}6`];return{[`&${t}-${n}`]:{"--antd-arrow-background-color":r,[`${t}-inner`]:{backgroundColor:r},[`${t}-arrow`]:{background:"transparent"}}}})}},DH=e=>{const{lineWidth:t,controlHeight:n,fontHeight:r,padding:o,wireframe:i,zIndexPopupBase:a,borderRadiusLG:s,marginXS:l,lineType:c,colorSplit:u,paddingSM:d}=e,f=n-r,h=f/2,m=f/2-t,v=o;return Object.assign(Object.assign(Object.assign({titleMinWidth:177,zIndexPopup:a+30},Pg(e)),Dd({contentRadius:s,limitVerticalRadius:!0})),{innerPadding:i?0:12,titleMarginBottom:i?0:l,titlePadding:i?`${h}px ${v}px ${m}px`:0,titleBorderBottom:i?`${t}px ${c} ${u}`:"none",innerContentPadding:i?`${d}px ${v}px`:0})},QE=yn("Popover",e=>{const{colorBgElevated:t,colorText:n}=e,r=Xt(e,{popoverBg:t,popoverColor:n});return[PH(r),kH(r),Ml(r,"zoom-big")]},DH,{resetStyle:!1,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]});var _H=function(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};const ZE=e=>{let{title:t,content:n,prefixCls:r}=e;return!t&&!n?null:p.createElement(p.Fragment,null,t&&p.createElement("div",{className:`${r}-title`},t),n&&p.createElement("div",{className:`${r}-inner-content`},n))},LH=e=>{const{hashId:t,prefixCls:n,className:r,style:o,placement:i="top",title:a,content:s,children:l}=e,c=bu(a),u=bu(s),d=te(t,n,`${n}-pure`,`${n}-placement-${i}`,r);return p.createElement("div",{className:d,style:o},p.createElement("div",{className:`${n}-arrow`}),p.createElement(Ag,Object.assign({},e,{className:t,prefixCls:n}),l||p.createElement(ZE,{prefixCls:n,title:c,content:u})))},jH=e=>{const{prefixCls:t,className:n}=e,r=_H(e,["prefixCls","className"]),{getPrefixCls:o}=p.useContext(_t),i=o("popover",t),[a,s,l]=QE(i);return a(p.createElement(LH,Object.assign({},r,{prefixCls:i,hashId:s,className:te(n,l)})))};var BH=function(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};const zH=p.forwardRef((e,t)=>{var n,r;const{prefixCls:o,title:i,content:a,overlayClassName:s,placement:l="top",trigger:c="hover",children:u,mouseEnterDelay:d=.1,mouseLeaveDelay:f=.1,onOpenChange:h,overlayStyle:m={},styles:v,classNames:g}=e,y=BH(e,["prefixCls","title","content","overlayClassName","placement","trigger","children","mouseEnterDelay","mouseLeaveDelay","onOpenChange","overlayStyle","styles","classNames"]),{getPrefixCls:b,className:C,style:x,classNames:S,styles:w}=Rr("popover"),E=b("popover",o),[N,$,M]=QE(E),R=b(),k=te(s,$,M,C,S.root,g==null?void 0:g.root),D=te(S.body,g==null?void 0:g.body),[A,L]=bn(!1,{value:(n=e.open)!==null&&n!==void 0?n:e.visible,defaultValue:(r=e.defaultOpen)!==null&&r!==void 0?r:e.defaultVisible}),T=(B,K)=>{L(B,!0),h==null||h(B,K)},I=B=>{B.keyCode===at.ESC&&T(!1,B)},_=B=>{T(B)},W=bu(i),H=bu(a);return N(p.createElement(Sn,Object.assign({placement:l,trigger:c,mouseEnterDelay:d,mouseLeaveDelay:f},y,{prefixCls:E,classNames:{root:k,body:D},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},w.root),x),m),v==null?void 0:v.root),body:Object.assign(Object.assign({},w.body),v==null?void 0:v.body)},ref:t,open:A,onOpenChange:_,overlay:W||H?p.createElement(ZE,{prefixCls:E,title:W,content:H}):null,transitionName:Zi(R,"zoom-big",y.transitionName),"data-popover-inject":!0}),Hr(u,{onKeyDown:B=>{var K,Y;p.isValidElement(u)&&((Y=u==null?void 0:(K=u.props).onKeyDown)===null||Y===void 0||Y.call(K,B)),I(B)}})))}),_d=zH;_d._InternalPanelDoNotUseOrYouWillBeFired=jH;process.env.NODE_ENV!=="production"&&(_d.displayName="Popover");var FH={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},HH=function(t,n){return p.createElement(Wn,He({},t,{ref:n,icon:FH}))},yu=p.forwardRef(HH);process.env.NODE_ENV!=="production"&&(yu.displayName="LeftOutlined");var VH=at.ESC,WH=at.TAB;function UH(e){var t=e.visible,n=e.triggerRef,r=e.onVisibleChange,o=e.autoFocus,i=e.overlayRef,a=p.useRef(!1),s=function(){if(t){var d,f;(d=n.current)===null||d===void 0||(f=d.focus)===null||f===void 0||f.call(d),r==null||r(!1)}},l=function(){var d;return(d=i.current)!==null&&d!==void 0&&d.focus?(i.current.focus(),a.current=!0,!0):!1},c=function(d){switch(d.keyCode){case VH:s();break;case WH:{var f=!1;a.current||(f=l()),f?d.preventDefault():s();break}}};p.useEffect(function(){return t?(window.addEventListener("keydown",c),o&&Ht(l,3),function(){window.removeEventListener("keydown",c),a.current=!1}):function(){a.current=!1}},[t])}var qH=O.forwardRef(function(e,t){var n=e.overlay,r=e.arrow,o=e.prefixCls,i=O.useMemo(function(){var s;return typeof n=="function"?s=n():s=n,s},[n]),a=mr(t,ra(i));return O.createElement(O.Fragment,null,r&&O.createElement("div",{className:"".concat(o,"-arrow")}),O.cloneElement(i,{ref:wi(i)?a:void 0}))}),va={adjustX:1,adjustY:1},ba=[0,0],KH={topLeft:{points:["bl","tl"],overflow:va,offset:[0,-4],targetOffset:ba},top:{points:["bc","tc"],overflow:va,offset:[0,-4],targetOffset:ba},topRight:{points:["br","tr"],overflow:va,offset:[0,-4],targetOffset:ba},bottomLeft:{points:["tl","bl"],overflow:va,offset:[0,4],targetOffset:ba},bottom:{points:["tc","bc"],overflow:va,offset:[0,4],targetOffset:ba},bottomRight:{points:["tr","br"],overflow:va,offset:[0,4],targetOffset:ba}},GH=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function XH(e,t){var n,r=e.arrow,o=r===void 0?!1:r,i=e.prefixCls,a=i===void 0?"rc-dropdown":i,s=e.transitionName,l=e.animation,c=e.align,u=e.placement,d=u===void 0?"bottomLeft":u,f=e.placements,h=f===void 0?KH:f,m=e.getPopupContainer,v=e.showAction,g=e.hideAction,y=e.overlayClassName,b=e.overlayStyle,C=e.visible,x=e.trigger,S=x===void 0?["hover"]:x,w=e.autoFocus,E=e.overlay,N=e.children,$=e.onVisibleChange,M=Mt(e,GH),R=O.useState(),k=de(R,2),D=k[0],A=k[1],L="visible"in e?C:D,T=O.useRef(null),I=O.useRef(null),_=O.useRef(null);O.useImperativeHandle(t,function(){return T.current});var W=function(Z){A(Z),$==null||$(Z)};UH({visible:L,triggerRef:_,onVisibleChange:W,autoFocus:w,overlayRef:I});var H=function(Z){var he=e.onOverlayClick;A(!1),he&&he(Z)},B=function(){return O.createElement(qH,{ref:I,overlay:E,prefixCls:a,arrow:o})},K=function(){return typeof E=="function"?B:B()},Y=function(){var Z=e.minOverlayWidthMatchTrigger,he=e.alignPoint;return"minOverlayWidthMatchTrigger"in e?Z:!he},V=function(){var Z=e.openClassName;return Z!==void 0?Z:"".concat(a,"-open")},G=O.cloneElement(N,{className:te((n=N.props)===null||n===void 0?void 0:n.className,L&&V()),ref:wi(N)?mr(_,ra(N)):void 0}),Q=g;return!Q&&S.indexOf("contextMenu")!==-1&&(Q=["click"]),O.createElement(Pd,He({builtinPlacements:h},M,{prefixCls:a,ref:T,popupClassName:te(y,U({},"".concat(a,"-show-arrow"),o)),popupStyle:b,action:S,showAction:v,hideAction:Q,popupPlacement:d,popupAlign:c,popupTransitionName:s,popupAnimation:l,popupVisible:L,stretch:Y()?"minWidth":"",popup:K(),onPopupVisibleChange:W,onPopupClick:H,getPopupContainer:m}),G)}const YH=O.forwardRef(XH),JH=e=>typeof e!="object"&&typeof e!="function"||e===null;var eO=p.createContext(null);function tO(e,t){return e===void 0?null:"".concat(e,"-").concat(t)}function nO(e){var t=p.useContext(eO);return tO(t,e)}var QH=["children","locked"],no=p.createContext(null);function ZH(e,t){var n=q({},e);return Object.keys(t).forEach(function(r){var o=t[r];o!==void 0&&(n[r]=o)}),n}function fl(e){var t=e.children,n=e.locked,r=Mt(e,QH),o=p.useContext(no),i=Sl(function(){return ZH(o,r)},[o,r],function(a,s){return!n&&(a[0]!==s[0]||!Fa(a[1],s[1],!0))});return p.createElement(no.Provider,{value:i},t)}var e5=[],rO=p.createContext(null);function Ld(){return p.useContext(rO)}var oO=p.createContext(e5);function ts(e){var t=p.useContext(oO);return p.useMemo(function(){return e!==void 0?[].concat(Le(t),[e]):t},[t,e])}var iO=p.createContext(null),Dg=p.createContext({});function ky(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(sg(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 t5(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=Le(e.querySelectorAll("*")).filter(function(r){return ky(r,t)});return ky(e,t)&&n.unshift(e),n}var Kp=at.LEFT,Gp=at.RIGHT,Xp=at.UP,Bc=at.DOWN,zc=at.ENTER,aO=at.ESC,Cs=at.HOME,Ss=at.END,Dy=[Xp,Bc,Kp,Gp];function n5(e,t,n,r){var o,i="prev",a="next",s="children",l="parent";if(e==="inline"&&r===zc)return{inlineTrigger:!0};var c=U(U({},Xp,i),Bc,a),u=U(U(U(U({},Kp,n?a:i),Gp,n?i:a),Bc,s),zc,s),d=U(U(U(U(U(U({},Xp,i),Bc,a),zc,s),aO,l),Kp,n?s:l),Gp,n?l:s),f={inline:c,horizontal:u,vertical:d,inlineSub:c,horizontalSub:d,verticalSub:d},h=(o=f["".concat(e).concat(t?"":"Sub")])===null||o===void 0?void 0:o[r];switch(h){case i:return{offset:-1,sibling:!0};case a:return{offset:1,sibling:!0};case l:return{offset:-1,sibling:!1};case s:return{offset:1,sibling:!1};default:return null}}function r5(e){for(var t=e;t;){if(t.getAttribute("data-menu-list"))return t;t=t.parentElement}return null}function o5(e,t){for(var n=e||document.activeElement;n;){if(t.has(n))return n;n=n.parentElement}return null}function _g(e,t){var n=t5(e,!0);return n.filter(function(r){return t.has(r)})}function _y(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!e)return null;var o=_g(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 Yp=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(tO(n,a),"']"));s&&(r.add(s),i.set(s,a),o.set(a,s))}),{elements:r,key2element:o,element2key:i}};function i5(e,t,n,r,o,i,a,s,l,c){var u=p.useRef(),d=p.useRef();d.current=t;var f=function(){Ht.cancel(u.current)};return p.useEffect(function(){return function(){f()}},[]),function(h){var m=h.which;if([].concat(Dy,[zc,aO,Cs,Ss]).includes(m)){var v=i(),g=Yp(v,r),y=g,b=y.elements,C=y.key2element,x=y.element2key,S=C.get(t),w=o5(S,b),E=x.get(w),N=n5(e,a(E,!0).length===1,n,m);if(!N&&m!==Cs&&m!==Ss)return;(Dy.includes(m)||[Cs,Ss].includes(m))&&h.preventDefault();var $=function(I){if(I){var _=I,W=I.querySelector("a");W!=null&&W.getAttribute("href")&&(_=W);var H=x.get(I);s(H),f(),u.current=Ht(function(){d.current===H&&_.focus()})}};if([Cs,Ss].includes(m)||N.sibling||!w){var M;!w||e==="inline"?M=o.current:M=r5(w);var R,k=_g(M,b);m===Cs?R=k[0]:m===Ss?R=k[k.length-1]:R=_y(M,b,w,N.offset),$(R)}else if(N.inlineTrigger)l(E);else if(N.offset>0)l(E,!0),f(),u.current=Ht(function(){g=Yp(v,r);var T=w.getAttribute("aria-controls"),I=document.getElementById(T),_=_y(I,g.elements);$(_)},5);else if(N.offset<0){var D=a(E,!0),A=D[D.length-2],L=C.get(A);l(A,!1),$(L)}}c==null||c(h)}}function a5(e){Promise.resolve().then(e)}var Lg="__RC_UTIL_PATH_SPLIT__",Ly=function(t){return t.join(Lg)},s5=function(t){return t.split(Lg)},Jp="rc-menu-more";function l5(){var e=p.useState({}),t=de(e,2),n=t[1],r=O.useRef(new Map),o=O.useRef(new Map),i=p.useState([]),a=de(i,2),s=a[0],l=a[1],c=O.useRef(0),u=O.useRef(!1),d=function(){u.current||n({})},f=O.useCallback(function(C,x){process.env.NODE_ENV!=="production"&&Ot(!r.current.has(C),"Duplicated key '".concat(C,"' used in Menu by path [").concat(x.join(" > "),"]"));var S=Ly(x);o.current.set(S,C),r.current.set(C,S),c.current+=1;var w=c.current;a5(function(){w===c.current&&d()})},[]),h=O.useCallback(function(C,x){var S=Ly(x);o.current.delete(S),r.current.delete(C)},[]),m=O.useCallback(function(C){l(C)},[]),v=O.useCallback(function(C,x){var S=r.current.get(C)||"",w=s5(S);return x&&s.includes(w[0])&&w.unshift(Jp),w},[s]),g=O.useCallback(function(C,x){return C.filter(function(S){return S!==void 0}).some(function(S){var w=v(S,!0);return w.includes(x)})},[v]),y=function(){var x=Le(r.current.keys());return s.length&&x.push(Jp),x},b=O.useCallback(function(C){var x="".concat(r.current.get(C)).concat(Lg),S=new Set;return Le(o.current.keys()).forEach(function(w){w.startsWith(x)&&S.add(o.current.get(w))}),S},[]);return p.useEffect(function(){return function(){u.current=!0}},[]),{registerPath:f,unregisterPath:h,refreshOverflowKeys:m,isSubPathKey:g,getKeyPath:v,getKeys:y,getSubPathKeys:b}}function Rs(e){var t=p.useRef(e);t.current=e;var n=p.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 c5=Math.random().toFixed(5).toString().slice(2),jy=0;function u5(e){var t=bn(e,{value:e}),n=de(t,2),r=n[0],o=n[1];return p.useEffect(function(){jy+=1;var i=process.env.NODE_ENV==="test"?"test":"".concat(c5,"-").concat(jy);o("rc-menu-uuid-".concat(i))},[]),r}function sO(e,t,n,r){var o=p.useContext(no),i=o.activeKey,a=o.onActive,s=o.onInactive,l={active:i===e};return t||(l.onMouseEnter=function(c){n==null||n({key:e,domEvent:c}),a(e)},l.onMouseLeave=function(c){r==null||r({key:e,domEvent:c}),s(e)}),l}function lO(e){var t=p.useContext(no),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 cO(e){var t=e.icon,n=e.props,r=e.children,o;return t===null||t===!1?null:(typeof t=="function"?o=p.createElement(t,q({},n)):typeof t!="boolean"&&(o=t),o||r||null)}var d5=["item"];function Cu(e){var t=e.item,n=Mt(e,d5);return Object.defineProperty(n,"item",{get:function(){return Ot(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),t}}),n}var f5=["title","attribute","elementRef"],h5=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],p5=["active"],m5=function(e){Bo(n,e);var t=zo(n);function n(){return Tn(this,n),t.apply(this,arguments)}return An(n,[{key:"render",value:function(){var o=this.props,i=o.title,a=o.attribute,s=o.elementRef,l=Mt(o,f5),c=Hn(l,["eventKey","popupClassName","popupOffset","onTitleClick"]);return Ot(!a,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),p.createElement(go.Item,He({},a,{title:typeof i=="string"?i:void 0},c,{ref:s}))}}]),n}(p.Component),g5=p.forwardRef(function(e,t){var n=e.style,r=e.className,o=e.eventKey,i=e.warnKey,a=e.disabled,s=e.itemIcon,l=e.children,c=e.role,u=e.onMouseEnter,d=e.onMouseLeave,f=e.onClick,h=e.onKeyDown,m=e.onFocus,v=Mt(e,h5),g=nO(o),y=p.useContext(no),b=y.prefixCls,C=y.onItemClick,x=y.disabled,S=y.overflowDisabled,w=y.itemIcon,E=y.selectedKeys,N=y.onActive,$=p.useContext(Dg),M=$._internalRenderMenuItem,R="".concat(b,"-item"),k=p.useRef(),D=p.useRef(),A=x||a,L=xi(t,D),T=ts(o);process.env.NODE_ENV!=="production"&&i&&Ot(!1,"MenuItem should not leave undefined `key`.");var I=function(ye){return{key:o,keyPath:Le(T).reverse(),item:k.current,domEvent:ye}},_=s||w,W=sO(o,A,u,d),H=W.active,B=Mt(W,p5),K=E.includes(o),Y=lO(T.length),V=function(ye){if(!A){var fe=I(ye);f==null||f(Cu(fe)),C(fe)}},G=function(ye){if(h==null||h(ye),ye.which===at.ENTER){var fe=I(ye);f==null||f(Cu(fe)),C(fe)}},Q=function(ye){N(o),m==null||m(ye)},ce={};e.role==="option"&&(ce["aria-selected"]=K);var Z=p.createElement(m5,He({ref:k,elementRef:L,role:c===null?"none":c||"menuitem",tabIndex:a?null:-1,"data-menu-id":S&&g?null:g},Hn(v,["extra"]),B,ce,{component:"li","aria-disabled":a,style:q(q({},Y),n),className:te(R,U(U(U({},"".concat(R,"-active"),H),"".concat(R,"-selected"),K),"".concat(R,"-disabled"),A),r),onClick:V,onKeyDown:G,onFocus:Q}),l,p.createElement(cO,{props:q(q({},e),{},{isSelected:K}),icon:_}));return M&&(Z=M(Z,e,{selected:K})),Z});function v5(e,t){var n=e.eventKey,r=Ld(),o=ts(n);return p.useEffect(function(){if(r)return r.registerPath(n,o),function(){r.unregisterPath(n,o)}},[o]),r?null:p.createElement(g5,He({},e,{ref:t}))}const jd=p.forwardRef(v5);var b5=["className","children"],y5=function(t,n){var r=t.className,o=t.children,i=Mt(t,b5),a=p.useContext(no),s=a.prefixCls,l=a.mode,c=a.rtl;return p.createElement("ul",He({className:te(s,c&&"".concat(s,"-rtl"),"".concat(s,"-sub"),"".concat(s,"-").concat(l==="inline"?"inline":"vertical"),r),role:"menu"},i,{"data-menu-list":!0,ref:n}),o)},jg=p.forwardRef(y5);jg.displayName="SubMenuList";function Bg(e,t){return Nr(e).map(function(n,r){if(p.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,l=s==null;l&&(s="tmp_key-".concat([].concat(Le(t),[r]).join("-")));var c={key:s,eventKey:s};return process.env.NODE_ENV!=="production"&&l&&(c.warnKey=!0),p.cloneElement(n,c)}return n})}var nr={adjustX:1,adjustY:1},C5={topLeft:{points:["bl","tl"],overflow:nr},topRight:{points:["br","tr"],overflow:nr},bottomLeft:{points:["tl","bl"],overflow:nr},bottomRight:{points:["tr","br"],overflow:nr},leftTop:{points:["tr","tl"],overflow:nr},leftBottom:{points:["br","bl"],overflow:nr},rightTop:{points:["tl","tr"],overflow:nr},rightBottom:{points:["bl","br"],overflow:nr}},S5={topLeft:{points:["bl","tl"],overflow:nr},topRight:{points:["br","tr"],overflow:nr},bottomLeft:{points:["tl","bl"],overflow:nr},bottomRight:{points:["tr","br"],overflow:nr},rightTop:{points:["tr","tl"],overflow:nr},rightBottom:{points:["br","bl"],overflow:nr},leftTop:{points:["tl","tr"],overflow:nr},leftBottom:{points:["bl","br"],overflow:nr}};function uO(e,t,n){if(t)return t;if(n)return n[e]||n.other}var x5={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function w5(e){var t=e.prefixCls,n=e.visible,r=e.children,o=e.popup,i=e.popupStyle,a=e.popupClassName,s=e.popupOffset,l=e.disabled,c=e.mode,u=e.onVisibleChange,d=p.useContext(no),f=d.getPopupContainer,h=d.rtl,m=d.subMenuOpenDelay,v=d.subMenuCloseDelay,g=d.builtinPlacements,y=d.triggerSubMenuAction,b=d.forceSubMenuRender,C=d.rootClassName,x=d.motion,S=d.defaultMotions,w=p.useState(!1),E=de(w,2),N=E[0],$=E[1],M=q(h?q({},S5):q({},C5),g),R=x5[c],k=uO(c,x,S),D=p.useRef(k);c!=="inline"&&(D.current=k);var A=q(q({},D.current),{},{leavedClassName:"".concat(t,"-hidden"),removeOnLeave:!1,motionAppear:!0}),L=p.useRef();return p.useEffect(function(){return L.current=Ht(function(){$(n)}),function(){Ht.cancel(L.current)}},[n]),p.createElement(Pd,{prefixCls:t,popupClassName:te("".concat(t,"-popup"),U({},"".concat(t,"-rtl"),h),a,C),stretch:c==="horizontal"?"minWidth":null,getPopupContainer:f,builtinPlacements:M,popupPlacement:R,popupVisible:N,popup:o,popupStyle:i,popupAlign:s&&{offset:s},action:l?[]:[y],mouseEnterDelay:m,mouseLeaveDelay:v,onPopupVisibleChange:u,forceRender:b,popupMotion:A,fresh:!0},r)}function E5(e){var t=e.id,n=e.open,r=e.keyPath,o=e.children,i="inline",a=p.useContext(no),s=a.prefixCls,l=a.forceSubMenuRender,c=a.motion,u=a.defaultMotions,d=a.mode,f=p.useRef(!1);f.current=d===i;var h=p.useState(!f.current),m=de(h,2),v=m[0],g=m[1],y=f.current?n:!1;p.useEffect(function(){f.current&&g(!1)},[d]);var b=q({},uO(i,c,u));r.length>1&&(b.motionAppear=!1);var C=b.onVisibleChanged;return b.onVisibleChanged=function(x){return!f.current&&!x&&g(!0),C==null?void 0:C(x)},v?null:p.createElement(fl,{mode:i,locked:!f.current},p.createElement(So,He({visible:y},b,{forceRender:l,removeOnLeave:!1,leavedClassName:"".concat(s,"-hidden")}),function(x){var S=x.className,w=x.style;return p.createElement(jg,{id:t,className:S,style:w},o)}))}var O5=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],$5=["active"],N5=p.forwardRef(function(e,t){var n=e.style,r=e.className,o=e.title,i=e.eventKey,a=e.warnKey,s=e.disabled,l=e.internalPopupClose,c=e.children,u=e.itemIcon,d=e.expandIcon,f=e.popupClassName,h=e.popupOffset,m=e.popupStyle,v=e.onClick,g=e.onMouseEnter,y=e.onMouseLeave,b=e.onTitleClick,C=e.onTitleMouseEnter,x=e.onTitleMouseLeave,S=Mt(e,O5),w=nO(i),E=p.useContext(no),N=E.prefixCls,$=E.mode,M=E.openKeys,R=E.disabled,k=E.overflowDisabled,D=E.activeKey,A=E.selectedKeys,L=E.itemIcon,T=E.expandIcon,I=E.onItemClick,_=E.onOpenChange,W=E.onActive,H=p.useContext(Dg),B=H._internalRenderSubMenuItem,K=p.useContext(iO),Y=K.isSubPathKey,V=ts(),G="".concat(N,"-submenu"),Q=R||s,ce=p.useRef(),Z=p.useRef();process.env.NODE_ENV!=="production"&&a&&Ot(!1,"SubMenu should not leave undefined `key`.");var he=u??L,ye=d??T,fe=M.includes(i),ae=!k&&fe,ve=Y(A,i),ne=sO(i,Q,C,x),se=ne.active,pe=Mt(ne,$5),Ne=p.useState(!1),Me=de(Ne,2),$e=Me[0],Be=Me[1],F=function(rt){Q||Be(rt)},be=function(rt){F(!0),g==null||g({key:i,domEvent:rt})},ue=function(rt){F(!1),y==null||y({key:i,domEvent:rt})},me=p.useMemo(function(){return se||($!=="inline"?$e||Y([D],i):!1)},[$,se,D,$e,i,Y]),Re=lO(V.length),Te=function(rt){Q||(b==null||b({key:i,domEvent:rt}),$==="inline"&&_(i,!fe))},xe=Rs(function(We){v==null||v(Cu(We)),I(We)}),Ve=function(rt){$!=="inline"&&_(i,rt)},qe=function(){W(i)},Pe=w&&"".concat(w,"-popup"),Ke=p.useMemo(function(){return p.createElement(cO,{icon:$!=="horizontal"?ye:void 0,props:q(q({},e),{},{isOpen:ae,isSubMenu:!0})},p.createElement("i",{className:"".concat(G,"-arrow")}))},[$,ye,e,ae,G]),Je=p.createElement("div",He({role:"menuitem",style:Re,className:"".concat(G,"-title"),tabIndex:Q?null:-1,ref:ce,title:typeof o=="string"?o:null,"data-menu-id":k&&w?null:w,"aria-expanded":ae,"aria-haspopup":!0,"aria-controls":Pe,"aria-disabled":Q,onClick:Te,onFocus:qe},pe),o,Ke),De=p.useRef($);if($!=="inline"&&V.length>1?De.current="vertical":De.current=$,!k){var ze=De.current;Je=p.createElement(w5,{mode:ze,prefixCls:G,visible:!l&&ae&&$!=="inline",popupClassName:f,popupOffset:h,popupStyle:m,popup:p.createElement(fl,{mode:ze==="horizontal"?"vertical":ze},p.createElement(jg,{id:Pe,ref:Z},c)),disabled:Q,onVisibleChange:Ve},Je)}var _e=p.createElement(go.Item,He({ref:t,role:"none"},S,{component:"li",style:n,className:te(G,"".concat(G,"-").concat($),r,U(U(U(U({},"".concat(G,"-open"),ae),"".concat(G,"-active"),me),"".concat(G,"-selected"),ve),"".concat(G,"-disabled"),Q)),onMouseEnter:be,onMouseLeave:ue}),Je,!k&&p.createElement(E5,{id:Pe,open:ae,keyPath:V},c));return B&&(_e=B(_e,e,{selected:ve,active:me,open:ae,disabled:Q})),p.createElement(fl,{onItemClick:xe,mode:$==="horizontal"?"vertical":$,itemIcon:he,expandIcon:ye},_e)}),Ll=p.forwardRef(function(e,t){var n=e.eventKey,r=e.children,o=ts(n),i=Bg(r,o),a=Ld();p.useEffect(function(){if(a)return a.registerPath(n,o),function(){a.unregisterPath(n,o)}},[o]);var s;return a?s=i:s=p.createElement(N5,He({ref:t},e),i),p.createElement(oO.Provider,{value:o},s)});process.env.NODE_ENV!=="production"&&(Ll.displayName="SubMenu");function zg(e){var t=e.className,n=e.style,r=p.useContext(no),o=r.prefixCls,i=Ld();return i?null:p.createElement("li",{role:"separator",className:te("".concat(o,"-item-divider"),t),style:n})}var M5=["className","title","eventKey","children"],R5=p.forwardRef(function(e,t){var n=e.className,r=e.title;e.eventKey;var o=e.children,i=Mt(e,M5),a=p.useContext(no),s=a.prefixCls,l="".concat(s,"-item-group");return p.createElement("li",He({ref:t,role:"presentation"},i,{onClick:function(u){return u.stopPropagation()},className:te(l,n)}),p.createElement("div",{role:"presentation",className:"".concat(l,"-title"),title:typeof r=="string"?r:void 0},r),p.createElement("ul",{role:"group",className:"".concat(l,"-list")},o))}),Bd=p.forwardRef(function(e,t){var n=e.eventKey,r=e.children,o=ts(n),i=Bg(r,o),a=Ld();return a?i:p.createElement(R5,He({ref:t},Hn(e,["warnKey"])),i)});process.env.NODE_ENV!=="production"&&(Bd.displayName="MenuItemGroup");var I5=["label","children","key","type","extra"];function Qp(e,t,n){var r=t.item,o=t.group,i=t.submenu,a=t.divider;return(e||[]).map(function(s,l){if(s&&ht(s)==="object"){var c=s,u=c.label,d=c.children,f=c.key,h=c.type,m=c.extra,v=Mt(c,I5),g=f??"tmp-".concat(l);return d||h==="group"?h==="group"?p.createElement(o,He({key:g},v,{title:u}),Qp(d,t,n)):p.createElement(i,He({key:g},v,{title:u}),Qp(d,t,n)):h==="divider"?p.createElement(a,He({key:g},v)):p.createElement(r,He({key:g},v,{extra:m}),u,(!!m||m===0)&&p.createElement("span",{className:"".concat(n,"-item-extra")},m))}return null}).filter(function(s){return s})}function By(e,t,n,r,o){var i=e,a=q({divider:zg,item:jd,group:Bd,submenu:Ll},r);return t&&(i=Qp(t,a,o)),Bg(i,n)}var T5=["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"],Ni=[],A5=p.forwardRef(function(e,t){var n,r=e,o=r.prefixCls,i=o===void 0?"rc-menu":o,a=r.rootClassName,s=r.style,l=r.className,c=r.tabIndex,u=c===void 0?0:c,d=r.items,f=r.children,h=r.direction,m=r.id,v=r.mode,g=v===void 0?"vertical":v,y=r.inlineCollapsed,b=r.disabled,C=r.disabledOverflow,x=r.subMenuOpenDelay,S=x===void 0?.1:x,w=r.subMenuCloseDelay,E=w===void 0?.1:w,N=r.forceSubMenuRender,$=r.defaultOpenKeys,M=r.openKeys,R=r.activeKey,k=r.defaultActiveFirst,D=r.selectable,A=D===void 0?!0:D,L=r.multiple,T=L===void 0?!1:L,I=r.defaultSelectedKeys,_=r.selectedKeys,W=r.onSelect,H=r.onDeselect,B=r.inlineIndent,K=B===void 0?24:B,Y=r.motion,V=r.defaultMotions,G=r.triggerSubMenuAction,Q=G===void 0?"hover":G,ce=r.builtinPlacements,Z=r.itemIcon,he=r.expandIcon,ye=r.overflowedIndicator,fe=ye===void 0?"...":ye,ae=r.overflowedIndicatorPopupClassName,ve=r.getPopupContainer,ne=r.onClick,se=r.onOpenChange,pe=r.onKeyDown,Ne=r.openAnimation,Me=r.openTransitionName,$e=r._internalRenderMenuItem,Be=r._internalRenderSubMenuItem,F=r._internalComponents,be=Mt(r,T5),ue=p.useMemo(function(){return[By(f,d,Ni,F,i),By(f,d,Ni,{},i)]},[f,d,F]),me=de(ue,2),Re=me[0],Te=me[1],xe=p.useState(!1),Ve=de(xe,2),qe=Ve[0],Pe=Ve[1],Ke=p.useRef(),Je=u5(m),De=h==="rtl";process.env.NODE_ENV!=="production"&&Ot(!Ne&&!Me,"`openAnimation` and `openTransitionName` is removed. Please use `motion` or `defaultMotion` instead.");var ze=bn($,{value:M,postState:function(Se){return Se||Ni}}),_e=de(ze,2),We=_e[0],rt=_e[1],gt=function(Se){var Oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function je(){rt(Se),se==null||se(Se)}Oe?jr.flushSync(je):je()},Lt=p.useState(We),Tt=de(Lt,2),Zt=Tt[0],tt=Tt[1],Ue=p.useRef(!1),ft=p.useMemo(function(){return(g==="inline"||g==="vertical")&&y?["vertical",y]:[g,!1]},[g,y]),dt=de(ft,2),st=dt[0],Ze=dt[1],Xe=st==="inline",Qe=p.useState(st),wt=de(Qe,2),At=wt[0],it=wt[1],Ge=p.useState(Ze),et=de(Ge,2),lt=et[0],ct=et[1];p.useEffect(function(){it(st),ct(Ze),Ue.current&&(Xe?rt(Zt):gt(Ni))},[st,Ze]);var vt=p.useState(0),jt=de(vt,2),It=jt[0],zt=jt[1],Pt=It>=Re.length-1||At!=="horizontal"||C;p.useEffect(function(){Xe&&tt(We)},[We]),p.useEffect(function(){return Ue.current=!0,function(){Ue.current=!1}},[]);var Vt=l5(),qt=Vt.registerPath,Jt=Vt.unregisterPath,Pn=Vt.refreshOverflowKeys,Ye=Vt.isSubPathKey,J=Vt.getKeyPath,le=Vt.getKeys,we=Vt.getSubPathKeys,ke=p.useMemo(function(){return{registerPath:qt,unregisterPath:Jt}},[qt,Jt]),Ie=p.useMemo(function(){return{isSubPathKey:Ye}},[Ye]);p.useEffect(function(){Pn(Pt?Ni:Re.slice(It+1).map(function(ge){return ge.key}))},[It,Pt]);var ot=bn(R||k&&((n=Re[0])===null||n===void 0?void 0:n.key),{value:R}),bt=de(ot,2),St=bt[0],Yt=bt[1],en=Rs(function(ge){Yt(ge)}),kt=Rs(function(){Yt(void 0)});O.useImperativeHandle(t,function(){return{list:Ke.current,focus:function(Se){var Oe,je=le(),ut=Yp(je,Je),Et=ut.elements,$t=ut.key2element,Kt=ut.element2key,Gt=_g(Ke.current,Et),hn=St??(Gt[0]?Kt.get(Gt[0]):(Oe=Re.find(function($i){return!$i.props.disabled}))===null||Oe===void 0?void 0:Oe.key),On=$t.get(hn);if(hn&&On){var wn;On==null||(wn=On.focus)===null||wn===void 0||wn.call(On,Se)}}}});var ln=bn(I||[],{value:_,postState:function(Se){return Array.isArray(Se)?Se:Se==null?Ni:[Se]}}),on=de(ln,2),kn=on[0],zn=on[1],P=function(Se){if(A){var Oe=Se.key,je=kn.includes(Oe),ut;T?je?ut=kn.filter(function($t){return $t!==Oe}):ut=[].concat(Le(kn),[Oe]):ut=[Oe],zn(ut);var Et=q(q({},Se),{},{selectedKeys:ut});je?H==null||H(Et):W==null||W(Et)}!T&&We.length&&At!=="inline"&&gt(Ni)},X=Rs(function(ge){ne==null||ne(Cu(ge)),P(ge)}),z=Rs(function(ge,Se){var Oe=We.filter(function(ut){return ut!==ge});if(Se)Oe.push(ge);else if(At!=="inline"){var je=we(ge);Oe=Oe.filter(function(ut){return!je.has(ut)})}Fa(We,Oe,!0)||gt(Oe,!0)}),re=function(Se,Oe){var je=Oe??!We.includes(Se);z(Se,je)},ie=i5(At,St,De,Je,Ke,le,J,Yt,re,pe);p.useEffect(function(){Pe(!0)},[]);var ee=p.useMemo(function(){return{_internalRenderMenuItem:$e,_internalRenderSubMenuItem:Be}},[$e,Be]),Ee=At!=="horizontal"||C?Re:Re.map(function(ge,Se){return p.createElement(fl,{key:ge.key,overflowDisabled:Se>It},ge)}),Ce=p.createElement(go,He({id:m,ref:Ke,prefixCls:"".concat(i,"-overflow"),component:"ul",itemComponent:jd,className:te(i,"".concat(i,"-root"),"".concat(i,"-").concat(At),l,U(U({},"".concat(i,"-inline-collapsed"),lt),"".concat(i,"-rtl"),De),a),dir:h,style:s,role:"menu",tabIndex:u,data:Ee,renderRawItem:function(Se){return Se},renderRawRest:function(Se){var Oe=Se.length,je=Oe?Re.slice(-Oe):null;return p.createElement(Ll,{eventKey:Jp,title:fe,disabled:Pt,internalPopupClose:Oe===0,popupClassName:ae},je)},maxCount:At!=="horizontal"||C?go.INVALIDATE:go.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(Se){zt(Se)},onKeyDown:ie},be));return p.createElement(Dg.Provider,{value:ee},p.createElement(eO.Provider,{value:Je},p.createElement(fl,{prefixCls:i,rootClassName:a,mode:At,openKeys:We,rtl:De,disabled:b,motion:qe?Y:null,defaultMotions:qe?V:null,activeKey:St,onActive:en,onInactive:kt,selectedKeys:kn,inlineIndent:K,subMenuOpenDelay:S,subMenuCloseDelay:E,forceSubMenuRender:N,builtinPlacements:ce,triggerSubMenuAction:Q,getPopupContainer:ve,itemIcon:Z,expandIcon:he,onItemClick:X,onOpenChange:z},p.createElement(iO.Provider,{value:Ie},Ce),p.createElement("div",{style:{display:"none"},"aria-hidden":!0},p.createElement(rO.Provider,{value:ke},Te)))))}),jl=A5;jl.Item=jd;jl.SubMenu=Ll;jl.ItemGroup=Bd;jl.Divider=zg;var P5={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"bars",theme:"outlined"},k5=function(t,n){return p.createElement(Wn,He({},t,{ref:n,icon:P5}))},dO=p.forwardRef(k5);process.env.NODE_ENV!=="production"&&(dO.displayName="BarsOutlined");const D5=p.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}}),_5=e=>{const{antCls:t,componentCls:n,colorText:r,footerBg:o,headerHeight:i,headerPadding:a,headerColor:s,footerPadding:l,fontSize:c,bodyBg:u,headerBg:d}=e;return{[n]:{display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:u,"&, *":{boxSizing:"border-box"},[`&${n}-has-sider`]:{flexDirection:"row",[`> ${n}, > ${n}-content`]:{width:0}},[`${n}-header, &${n}-footer`]:{flex:"0 0 auto"},"&-rtl":{direction:"rtl"}},[`${n}-header`]:{height:i,padding:a,color:s,lineHeight:oe(i),background:d,[`${t}-menu`]:{lineHeight:"inherit"}},[`${n}-footer`]:{padding:l,color:r,fontSize:c,background:o},[`${n}-content`]:{flex:"auto",color:r,minHeight:0}}},fO=e=>{const{colorBgLayout:t,controlHeight:n,controlHeightLG:r,colorText:o,controlHeightSM:i,marginXXS:a,colorTextLightSolid:s,colorBgContainer:l}=e,c=r*1.25;return{colorBgHeader:"#001529",colorBgBody:t,colorBgTrigger:"#002140",bodyBg:t,headerBg:"#001529",headerHeight:n*2,headerPadding:`0 ${c}px`,headerColor:o,footerPadding:`${i}px ${c}px`,footerBg:t,siderBg:"#001529",triggerHeight:r+a*2,triggerBg:"#002140",triggerColor:s,zeroTriggerWidth:r,zeroTriggerHeight:r,lightSiderBg:l,lightTriggerBg:l,lightTriggerColor:o}},hO=[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]];yn("Layout",e=>[_5(e)],fO,{deprecatedTokens:hO});const L5=e=>{const{componentCls:t,siderBg:n,motionDurationMid:r,motionDurationSlow:o,antCls:i,triggerHeight:a,triggerColor:s,triggerBg:l,headerHeight:c,zeroTriggerWidth:u,zeroTriggerHeight:d,borderRadiusLG:f,lightSiderBg:h,lightTriggerColor:m,lightTriggerBg:v,bodyBg:g}=e;return{[t]:{position:"relative",minWidth:0,background:n,transition:`all ${r}, background 0s`,"&-has-trigger":{paddingBottom:a},"&-right":{order:1},[`${t}-children`]:{height:"100%",marginTop:-.1,paddingTop:.1,[`${i}-menu${i}-menu-inline-collapsed`]:{width:"auto"}},[`&-zero-width ${t}-children`]:{overflow:"hidden"},[`${t}-trigger`]:{position:"fixed",bottom:0,zIndex:1,height:a,color:s,lineHeight:oe(a),textAlign:"center",background:l,cursor:"pointer",transition:`all ${r}`},[`${t}-zero-width-trigger`]:{position:"absolute",top:c,insetInlineEnd:e.calc(u).mul(-1).equal(),zIndex:1,width:u,height:d,color:s,fontSize:e.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:n,borderRadius:`0 ${oe(f)} ${oe(f)} 0`,cursor:"pointer",transition:`background ${o} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${o}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:e.calc(u).mul(-1).equal(),borderRadius:`${oe(f)} 0 0 ${oe(f)}`}},"&-light":{background:h,[`${t}-trigger`]:{color:m,background:v},[`${t}-zero-width-trigger`]:{color:m,background:v,border:`1px solid ${g}`,borderInlineStart:0}}}}},j5=yn(["Layout","Sider"],e=>[L5(e)],fO,{deprecatedTokens:hO});var B5=function(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};const zy={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},z5=e=>!Number.isNaN(Number.parseFloat(e))&&isFinite(e),Fg=p.createContext({}),F5=(()=>{let e=0;return function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return e+=1,`${t}${e}`}})(),H5=p.forwardRef((e,t)=>{const{prefixCls:n,className:r,trigger:o,children:i,defaultCollapsed:a=!1,theme:s="dark",style:l={},collapsible:c=!1,reverseArrow:u=!1,width:d=200,collapsedWidth:f=80,zeroWidthTriggerStyle:h,breakpoint:m,onCollapse:v,onBreakpoint:g}=e,y=B5(e,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:b}=O.useContext(D5),[C,x]=O.useState("collapsed"in e?e.collapsed:a),[S,w]=O.useState(!1);O.useEffect(()=>{"collapsed"in e&&x(e.collapsed)},[e.collapsed]);const E=(Z,he)=>{"collapsed"in e||x(Z),v==null||v(Z,he)},{getPrefixCls:N,direction:$}=O.useContext(_t),M=N("layout-sider",n),[R,k,D]=j5(M),A=O.useRef(null);A.current=Z=>{w(Z.matches),g==null||g(Z.matches),C!==Z.matches&&E(Z.matches,"responsive")},O.useEffect(()=>{function Z(ye){return A.current(ye)}let he;if(typeof window<"u"){const{matchMedia:ye}=window;if(ye&&m&&m in zy){he=ye(`screen and (max-width: ${zy[m]})`);try{he.addEventListener("change",Z)}catch{he.addListener(Z)}Z(he)}}return()=>{try{he==null||he.removeEventListener("change",Z)}catch{he==null||he.removeListener(Z)}}},[m]),O.useEffect(()=>{const Z=F5("ant-sider-");return b.addSider(Z),()=>b.removeSider(Z)},[]);const L=()=>{E(!C,"clickTrigger")},T=Hn(y,["collapsed"]),I=C?f:d,_=z5(I)?`${I}px`:String(I),W=parseFloat(String(f||0))===0?p.createElement("span",{onClick:L,className:te(`${M}-zero-width-trigger`,`${M}-zero-width-trigger-${u?"right":"left"}`),style:h},o||p.createElement(dO,null)):null,H=$==="rtl"==!u,Y={expanded:H?p.createElement(ul,null):p.createElement(yu,null),collapsed:H?p.createElement(yu,null):p.createElement(ul,null)}[C?"collapsed":"expanded"],V=o!==null?W||p.createElement("div",{className:`${M}-trigger`,onClick:L,style:{width:_}},o||Y):null,G=Object.assign(Object.assign({},l),{flex:`0 0 ${_}`,maxWidth:_,minWidth:_,width:_}),Q=te(M,`${M}-${s}`,{[`${M}-collapsed`]:!!C,[`${M}-has-trigger`]:c&&o!==null&&!W,[`${M}-below`]:!!S,[`${M}-zero-width`]:parseFloat(_)===0},r,k,D),ce=p.useMemo(()=>({siderCollapsed:C}),[C]);return R(p.createElement(Fg.Provider,{value:ce},p.createElement("aside",Object.assign({className:Q},T,{style:G,ref:t}),p.createElement("div",{className:`${M}-children`},i),c||S&&W?V:null)))});process.env.NODE_ENV!=="production"&&(H5.displayName="Sider");var V5={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"},W5=function(t,n){return p.createElement(Wn,He({},t,{ref:n,icon:V5}))},Hg=p.forwardRef(W5);process.env.NODE_ENV!=="production"&&(Hg.displayName="EllipsisOutlined");const Su=O.createContext({prefixCls:"",firstLevel:!0,inlineCollapsed:!1});var U5=function(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};const pO=e=>{const{prefixCls:t,className:n,dashed:r}=e,o=U5(e,["prefixCls","className","dashed"]),{getPrefixCls:i}=p.useContext(_t),a=i("menu",t),s=te({[`${a}-item-divider-dashed`]:!!r},n);return p.createElement(zg,Object.assign({className:s},o))},mO=e=>{var t;const{className:n,children:r,icon:o,title:i,danger:a,extra:s}=e,{prefixCls:l,firstLevel:c,direction:u,disableMenuItemTitleTooltip:d,inlineCollapsed:f}=p.useContext(Su),h=C=>{const x=r==null?void 0:r[0],S=p.createElement("span",{className:te(`${l}-title-content`,{[`${l}-title-content-with-extra`]:!!s||s===0})},r);return(!o||p.isValidElement(r)&&r.type==="span")&&r&&C&&c&&typeof x=="string"?p.createElement("div",{className:`${l}-inline-collapsed-noicon`},x.charAt(0)):S},{siderCollapsed:m}=p.useContext(Fg);let v=i;typeof i>"u"?v=c?r:"":i===!1&&(v="");const g={title:v};!m&&!f&&(g.title=null,g.open=!1);const y=Nr(r).length;let b=p.createElement(jd,Object.assign({},Hn(e,["title","icon","danger"]),{className:te({[`${l}-item-danger`]:a,[`${l}-item-only-child`]:(o?y+1:y)===1},n),title:typeof i=="string"?i:void 0}),Hr(o,{className:te(p.isValidElement(o)?(t=o.props)===null||t===void 0?void 0:t.className:"",`${l}-item-icon`)}),h(f));return d||(b=p.createElement(Sn,Object.assign({},g,{placement:u==="rtl"?"left":"right",classNames:{root:`${l}-inline-collapsed-tooltip`}}),b)),b};var q5=function(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};const xu=p.createContext(null),K5=p.forwardRef((e,t)=>{const{children:n}=e,r=q5(e,["children"]),o=p.useContext(xu),i=p.useMemo(()=>Object.assign(Object.assign({},o),r),[o,r.prefixCls,r.mode,r.selectable,r.rootClassName]),a=iP(n),s=xi(t,a?ra(n):null);return p.createElement(xu.Provider,{value:i},p.createElement(vi,{space:!0},a?p.cloneElement(n,{ref:s}):n))}),G5=e=>{const{componentCls:t,motionDurationSlow:n,horizontalLineHeight:r,colorSplit:o,lineWidth:i,lineType:a,itemPaddingInline:s}=e;return{[`${t}-horizontal`]:{lineHeight:r,border:0,borderBottom:`${oe(i)} ${a} ${o}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${t}-item, ${t}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:s},[`> ${t}-item:hover,
368
+ > ${t}-item-active,
369
+ > ${t}-submenu ${t}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${t}-item, ${t}-submenu-title`]:{transition:[`border-color ${n}`,`background ${n}`].join(",")},[`${t}-submenu-arrow`]:{display:"none"}}}},X5=e=>{let{componentCls:t,menuArrowOffset:n,calc:r}=e;return{[`${t}-rtl`]:{direction:"rtl"},[`${t}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${t}-rtl${t}-vertical,
370
+ ${t}-submenu-rtl ${t}-vertical`]:{[`${t}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${oe(r(n).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${oe(n)})`}}}}},Fy=e=>Object.assign({},wl(e)),Hy=(e,t)=>{const{componentCls:n,itemColor:r,itemSelectedColor:o,subMenuItemSelectedColor:i,groupTitleColor:a,itemBg:s,subMenuItemBg:l,itemSelectedBg:c,activeBarHeight:u,activeBarWidth:d,activeBarBorderWidth:f,motionDurationSlow:h,motionEaseInOut:m,motionEaseOut:v,itemPaddingInline:g,motionDurationMid:y,itemHoverColor:b,lineType:C,colorSplit:x,itemDisabledColor:S,dangerItemColor:w,dangerItemHoverColor:E,dangerItemSelectedColor:N,dangerItemActiveBg:$,dangerItemSelectedBg:M,popupBg:R,itemHoverBg:k,itemActiveBg:D,menuSubMenuBg:A,horizontalItemSelectedColor:L,horizontalItemSelectedBg:T,horizontalItemBorderRadius:I,horizontalItemHoverBg:_}=e;return{[`${n}-${t}, ${n}-${t} > ${n}`]:{color:r,background:s,[`&${n}-root:focus-visible`]:Object.assign({},Fy(e)),[`${n}-item`]:{"&-group-title, &-extra":{color:a}},[`${n}-submenu-selected > ${n}-submenu-title`]:{color:i},[`${n}-item, ${n}-submenu-title`]:{color:r,[`&:not(${n}-item-disabled):focus-visible`]:Object.assign({},Fy(e))},[`${n}-item-disabled, ${n}-submenu-disabled`]:{color:`${S} !important`},[`${n}-item:not(${n}-item-selected):not(${n}-submenu-selected)`]:{[`&:hover, > ${n}-submenu-title:hover`]:{color:b}},[`&:not(${n}-horizontal)`]:{[`${n}-item:not(${n}-item-selected)`]:{"&:hover":{backgroundColor:k},"&:active":{backgroundColor:D}},[`${n}-submenu-title`]:{"&:hover":{backgroundColor:k},"&:active":{backgroundColor:D}}},[`${n}-item-danger`]:{color:w,[`&${n}-item:hover`]:{[`&:not(${n}-item-selected):not(${n}-submenu-selected)`]:{color:E}},[`&${n}-item:active`]:{background:$}},[`${n}-item a`]:{"&, &:hover":{color:"inherit"}},[`${n}-item-selected`]:{color:o,[`&${n}-item-danger`]:{color:N},"a, a:hover":{color:"inherit"}},[`& ${n}-item-selected`]:{backgroundColor:c,[`&${n}-item-danger`]:{backgroundColor:M}},[`&${n}-submenu > ${n}`]:{backgroundColor:A},[`&${n}-popup > ${n}`]:{backgroundColor:R},[`&${n}-submenu-popup > ${n}`]:{backgroundColor:R},[`&${n}-horizontal`]:Object.assign(Object.assign({},t==="dark"?{borderBottom:0}:{}),{[`> ${n}-item, > ${n}-submenu`]:{top:f,marginTop:e.calc(f).mul(-1).equal(),marginBottom:0,borderRadius:I,"&::after":{position:"absolute",insetInline:g,bottom:0,borderBottom:`${oe(u)} solid transparent`,transition:`border-color ${h} ${m}`,content:'""'},"&:hover, &-active, &-open":{background:_,"&::after":{borderBottomWidth:u,borderBottomColor:L}},"&-selected":{color:L,backgroundColor:T,"&:hover":{backgroundColor:T},"&::after":{borderBottomWidth:u,borderBottomColor:L}}}}),[`&${n}-root`]:{[`&${n}-inline, &${n}-vertical`]:{borderInlineEnd:`${oe(f)} ${C} ${x}`}},[`&${n}-inline`]:{[`${n}-sub${n}-inline`]:{background:l},[`${n}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${oe(d)} solid ${o}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${y} ${v}`,`opacity ${y} ${v}`].join(","),content:'""'},[`&${n}-item-danger`]:{"&::after":{borderInlineEndColor:N}}},[`${n}-selected, ${n}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${y} ${m}`,`opacity ${y} ${m}`].join(",")}}}}}},Vy=e=>{const{componentCls:t,itemHeight:n,itemMarginInline:r,padding:o,menuArrowSize:i,marginXS:a,itemMarginBlock:s,itemWidth:l,itemPaddingInline:c}=e,u=e.calc(i).add(o).add(a).equal();return{[`${t}-item`]:{position:"relative",overflow:"hidden"},[`${t}-item, ${t}-submenu-title`]:{height:n,lineHeight:oe(n),paddingInline:c,overflow:"hidden",textOverflow:"ellipsis",marginInline:r,marginBlock:s,width:l},[`> ${t}-item,
371
+ > ${t}-submenu > ${t}-submenu-title`]:{height:n,lineHeight:oe(n)},[`${t}-item-group-list ${t}-submenu-title,
372
+ ${t}-submenu-title`]:{paddingInlineEnd:u}}},Y5=e=>{const{componentCls:t,iconCls:n,itemHeight:r,colorTextLightSolid:o,dropdownWidth:i,controlHeightLG:a,motionEaseOut:s,paddingXL:l,itemMarginInline:c,fontSizeLG:u,motionDurationFast:d,motionDurationSlow:f,paddingXS:h,boxShadowSecondary:m,collapsedWidth:v,collapsedIconSize:g}=e,y={height:r,lineHeight:oe(r),listStylePosition:"inside",listStyleType:"disc"};return[{[t]:{"&-inline, &-vertical":Object.assign({[`&${t}-root`]:{boxShadow:"none"}},Vy(e))},[`${t}-submenu-popup`]:{[`${t}-vertical`]:Object.assign(Object.assign({},Vy(e)),{boxShadow:m})}},{[`${t}-submenu-popup ${t}-vertical${t}-sub`]:{minWidth:i,maxHeight:`calc(100vh - ${oe(e.calc(a).mul(2.5).equal())})`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${t}-inline`]:{width:"100%",[`&${t}-root`]:{[`${t}-item, ${t}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${f}`,`background ${f}`,`padding ${d} ${s}`].join(","),[`> ${t}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${t}-sub${t}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${t}-submenu > ${t}-submenu-title`]:y,[`& ${t}-item-group-title`]:{paddingInlineStart:l}},[`${t}-item`]:y}},{[`${t}-inline-collapsed`]:{width:v,[`&${t}-root`]:{[`${t}-item, ${t}-submenu ${t}-submenu-title`]:{[`> ${t}-inline-collapsed-noicon`]:{fontSize:u,textAlign:"center"}}},[`> ${t}-item,
373
+ > ${t}-item-group > ${t}-item-group-list > ${t}-item,
374
+ > ${t}-item-group > ${t}-item-group-list > ${t}-submenu > ${t}-submenu-title,
375
+ > ${t}-submenu > ${t}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${oe(e.calc(g).div(2).equal())} - ${oe(c)})`,textOverflow:"clip",[`
376
+ ${t}-submenu-arrow,
377
+ ${t}-submenu-expand-icon
378
+ `]:{opacity:0},[`${t}-item-icon, ${n}`]:{margin:0,fontSize:g,lineHeight:oe(r),"+ span":{display:"inline-block",opacity:0}}},[`${t}-item-icon, ${n}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${t}-item-icon, ${n}`]:{display:"none"},"a, a:hover":{color:o}},[`${t}-item-group-title`]:Object.assign(Object.assign({},cl),{paddingInline:h})}}]},Wy=e=>{const{componentCls:t,motionDurationSlow:n,motionDurationMid:r,motionEaseInOut:o,motionEaseOut:i,iconCls:a,iconSize:s,iconMarginInlineEnd:l}=e;return{[`${t}-item, ${t}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${n}`,`background ${n}`,`padding calc(${n} + 0.1s) ${o}`].join(","),[`${t}-item-icon, ${a}`]:{minWidth:s,fontSize:s,transition:[`font-size ${r} ${i}`,`margin ${n} ${o}`,`color ${n}`].join(","),"+ span":{marginInlineStart:l,opacity:1,transition:[`opacity ${n} ${o}`,`margin ${n}`,`color ${n}`].join(",")}},[`${t}-item-icon`]:Object.assign({},oa()),[`&${t}-item-only-child`]:{[`> ${a}, > ${t}-item-icon`]:{marginInlineEnd:0}}},[`${t}-item-disabled, ${t}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important",cursor:"not-allowed",pointerEvents:"none"},[`> ${t}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},Uy=e=>{const{componentCls:t,motionDurationSlow:n,motionEaseInOut:r,borderRadius:o,menuArrowSize:i,menuArrowOffset:a}=e;return{[`${t}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:e.margin,width:i,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${n} ${r}, opacity ${n}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:e.calc(i).mul(.6).equal(),height:e.calc(i).mul(.15).equal(),backgroundColor:"currentcolor",borderRadius:o,transition:[`background ${n} ${r}`,`transform ${n} ${r}`,`top ${n} ${r}`,`color ${n} ${r}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(${oe(e.calc(a).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${oe(a)})`}}}}},J5=e=>{const{antCls:t,componentCls:n,fontSize:r,motionDurationSlow:o,motionDurationMid:i,motionEaseInOut:a,paddingXS:s,padding:l,colorSplit:c,lineWidth:u,zIndexPopup:d,borderRadiusLG:f,subMenuItemBorderRadius:h,menuArrowSize:m,menuArrowOffset:v,lineType:g,groupTitleLineHeight:y,groupTitleFontSize:b}=e;return[{"":{[n]:Object.assign(Object.assign({},uu()),{"&-hidden":{display:"none"}})},[`${n}-submenu-hidden`]:{display:"none"}},{[n]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Bn(e)),uu()),{marginBottom:0,paddingInlineStart:0,fontSize:r,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${o} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${n}-item`]:{flex:"none"}},[`${n}-item, ${n}-submenu, ${n}-submenu-title`]:{borderRadius:e.itemBorderRadius},[`${n}-item-group-title`]:{padding:`${oe(s)} ${oe(l)}`,fontSize:b,lineHeight:y,transition:`all ${o}`},[`&-horizontal ${n}-submenu`]:{transition:[`border-color ${o} ${a}`,`background ${o} ${a}`].join(",")},[`${n}-submenu, ${n}-submenu-inline`]:{transition:[`border-color ${o} ${a}`,`background ${o} ${a}`,`padding ${i} ${a}`].join(",")},[`${n}-submenu ${n}-sub`]:{cursor:"initial",transition:[`background ${o} ${a}`,`padding ${o} ${a}`].join(",")},[`${n}-title-content`]:{transition:`color ${o}`,"&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},[`> ${t}-typography-ellipsis-single-line`]:{display:"inline",verticalAlign:"unset"},[`${n}-item-extra`]:{marginInlineStart:"auto",paddingInlineStart:e.padding}},[`${n}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${n}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:c,borderStyle:g,borderWidth:0,borderTopWidth:u,marginBlock:u,padding:0,"&-dashed":{borderStyle:"dashed"}}}),Wy(e)),{[`${n}-item-group`]:{[`${n}-item-group-list`]:{margin:0,padding:0,[`${n}-item, ${n}-submenu-title`]:{paddingInline:`${oe(e.calc(r).mul(2).equal())} ${oe(l)}`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:d,borderRadius:f,boxShadow:"none",transformOrigin:"0 0",[`&${n}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:0,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'},[`> ${n}`]:Object.assign(Object.assign(Object.assign({borderRadius:f},Wy(e)),Uy(e)),{[`${n}-item, ${n}-submenu > ${n}-submenu-title`]:{borderRadius:h},[`${n}-submenu-title::after`]:{transition:`transform ${o} ${a}`}})},"\n &-placement-leftTop,\n &-placement-bottomRight,\n ":{transformOrigin:"100% 0"},"\n &-placement-leftBottom,\n &-placement-topRight,\n ":{transformOrigin:"100% 100%"},"\n &-placement-rightBottom,\n &-placement-topLeft,\n ":{transformOrigin:"0 100%"},"\n &-placement-bottomLeft,\n &-placement-rightTop,\n ":{transformOrigin:"0 0"},"\n &-placement-leftTop,\n &-placement-leftBottom\n ":{paddingInlineEnd:e.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:e.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:e.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:e.paddingXS}}}),Uy(e)),{[`&-inline-collapsed ${n}-submenu-arrow,
379
+ &-inline ${n}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${oe(v)})`},"&::after":{transform:`rotate(45deg) translateX(${oe(e.calc(v).mul(-1).equal())})`}},[`${n}-submenu-open${n}-submenu-inline > ${n}-submenu-title > ${n}-submenu-arrow`]:{transform:`translateY(${oe(e.calc(m).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${oe(e.calc(v).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${oe(v)})`}}})},{[`${t}-layout-header`]:{[n]:{lineHeight:"inherit"}}}]},Q5=e=>{var t,n,r;const{colorPrimary:o,colorError:i,colorTextDisabled:a,colorErrorBg:s,colorText:l,colorTextDescription:c,colorBgContainer:u,colorFillAlter:d,colorFillContent:f,lineWidth:h,lineWidthBold:m,controlItemBgActive:v,colorBgTextHover:g,controlHeightLG:y,lineHeight:b,colorBgElevated:C,marginXXS:x,padding:S,fontSize:w,controlHeightSM:E,fontSizeLG:N,colorTextLightSolid:$,colorErrorHover:M}=e,R=(t=e.activeBarWidth)!==null&&t!==void 0?t:0,k=(n=e.activeBarBorderWidth)!==null&&n!==void 0?n:h,D=(r=e.itemMarginInline)!==null&&r!==void 0?r:e.marginXXS,A=new Qt($).setA(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:e.zIndexPopupBase+50,radiusItem:e.borderRadiusLG,itemBorderRadius:e.borderRadiusLG,radiusSubMenuItem:e.borderRadiusSM,subMenuItemBorderRadius:e.borderRadiusSM,colorItemText:l,itemColor:l,colorItemTextHover:l,itemHoverColor:l,colorItemTextHoverHorizontal:o,horizontalItemHoverColor:o,colorGroupTitle:c,groupTitleColor:c,colorItemTextSelected:o,itemSelectedColor:o,subMenuItemSelectedColor:o,colorItemTextSelectedHorizontal:o,horizontalItemSelectedColor:o,colorItemBg:u,itemBg:u,colorItemBgHover:g,itemHoverBg:g,colorItemBgActive:f,itemActiveBg:v,colorSubItemBg:d,subMenuItemBg:d,colorItemBgSelected:v,itemSelectedBg:v,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:R,colorActiveBarHeight:m,activeBarHeight:m,colorActiveBarBorderSize:h,activeBarBorderWidth:k,colorItemTextDisabled:a,itemDisabledColor:a,colorDangerItemText:i,dangerItemColor:i,colorDangerItemTextHover:i,dangerItemHoverColor:i,colorDangerItemTextSelected:i,dangerItemSelectedColor:i,colorDangerItemBgActive:s,dangerItemActiveBg:s,colorDangerItemBgSelected:s,dangerItemSelectedBg:s,itemMarginInline:D,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:y,groupTitleLineHeight:b,collapsedWidth:y*2,popupBg:C,itemMarginBlock:x,itemPaddingInline:S,horizontalLineHeight:`${y*1.15}px`,iconSize:w,iconMarginInlineEnd:E-w,collapsedIconSize:N,groupTitleFontSize:w,darkItemDisabledColor:new Qt($).setA(.25).toRgbString(),darkItemColor:A,darkDangerItemColor:i,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:$,darkItemSelectedBg:o,darkDangerItemSelectedBg:i,darkItemHoverBg:"transparent",darkGroupTitleColor:A,darkItemHoverColor:$,darkDangerItemHoverColor:M,darkDangerItemSelectedColor:$,darkDangerItemActiveBg:i,itemWidth:R?`calc(100% + ${k}px)`:`calc(100% - ${D*2}px)`}},Z5=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return yn("Menu",o=>{const{colorBgElevated:i,controlHeightLG:a,fontSize:s,darkItemColor:l,darkDangerItemColor:c,darkItemBg:u,darkSubMenuItemBg:d,darkItemSelectedColor:f,darkItemSelectedBg:h,darkDangerItemSelectedBg:m,darkItemHoverBg:v,darkGroupTitleColor:g,darkItemHoverColor:y,darkItemDisabledColor:b,darkDangerItemHoverColor:C,darkDangerItemSelectedColor:x,darkDangerItemActiveBg:S,popupBg:w,darkPopupBg:E}=o,N=o.calc(s).div(7).mul(5).equal(),$=Xt(o,{menuArrowSize:N,menuHorizontalHeight:o.calc(a).mul(1.15).equal(),menuArrowOffset:o.calc(N).mul(.25).equal(),menuSubMenuBg:i,calc:o.calc,popupBg:w}),M=Xt($,{itemColor:l,itemHoverColor:y,groupTitleColor:g,itemSelectedColor:f,subMenuItemSelectedColor:f,itemBg:u,popupBg:E,subMenuItemBg:d,itemActiveBg:"transparent",itemSelectedBg:h,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:v,itemDisabledColor:b,dangerItemColor:c,dangerItemHoverColor:C,dangerItemSelectedColor:x,dangerItemActiveBg:S,dangerItemSelectedBg:m,menuSubMenuBg:d,horizontalItemSelectedColor:f,horizontalItemSelectedBg:h});return[J5($),G5($),Y5($),Hy($,"light"),Hy(M,"dark"),X5($),Lw($),Ga($,"slide-up"),Ga($,"slide-down"),Ml($,"zoom-big")]},Q5,{deprecatedTokens:[["colorGroupTitle","groupTitleColor"],["radiusItem","itemBorderRadius"],["radiusSubMenuItem","subMenuItemBorderRadius"],["colorItemText","itemColor"],["colorItemTextHover","itemHoverColor"],["colorItemTextHoverHorizontal","horizontalItemHoverColor"],["colorItemTextSelected","itemSelectedColor"],["colorItemTextSelectedHorizontal","horizontalItemSelectedColor"],["colorItemTextDisabled","itemDisabledColor"],["colorDangerItemText","dangerItemColor"],["colorDangerItemTextHover","dangerItemHoverColor"],["colorDangerItemTextSelected","dangerItemSelectedColor"],["colorDangerItemBgActive","dangerItemActiveBg"],["colorDangerItemBgSelected","dangerItemSelectedBg"],["colorItemBg","itemBg"],["colorItemBgHover","itemHoverBg"],["colorSubItemBg","subMenuItemBg"],["colorItemBgActive","itemActiveBg"],["colorItemBgSelectedHorizontal","horizontalItemSelectedBg"],["colorActiveBarWidth","activeBarWidth"],["colorActiveBarHeight","activeBarHeight"],["colorActiveBarBorderSize","activeBarBorderWidth"],["colorItemBgSelected","itemSelectedBg"]],injectStyle:n,unitless:{groupTitleLineHeight:!0}})(e,t)},gO=e=>{var t;const{popupClassName:n,icon:r,title:o,theme:i}=e,a=p.useContext(Su),{prefixCls:s,inlineCollapsed:l,theme:c}=a,u=ts();let d;if(!r)d=l&&!u.length&&o&&typeof o=="string"?p.createElement("div",{className:`${s}-inline-collapsed-noicon`},o.charAt(0)):p.createElement("span",{className:`${s}-title-content`},o);else{const m=p.isValidElement(o)&&o.type==="span";d=p.createElement(p.Fragment,null,Hr(r,{className:te(p.isValidElement(r)?(t=r.props)===null||t===void 0?void 0:t.className:"",`${s}-item-icon`)}),m?o:p.createElement("span",{className:`${s}-title-content`},o))}const f=p.useMemo(()=>Object.assign(Object.assign({},a),{firstLevel:!1}),[a]),[h]=$l("Menu");return p.createElement(Su.Provider,{value:f},p.createElement(Ll,Object.assign({},Hn(e,["icon"]),{title:d,popupClassName:te(s,n,`${s}-${i||c}`),popupStyle:Object.assign({zIndex:h},e.popupStyle)})))};var eV=function(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 rh(e){return e===null||e===!1}const tV={item:mO,submenu:gO,divider:pO},nV=O.forwardRef((e,t)=>{var n;const r=p.useContext(xu),o=r||{},{getPrefixCls:i,getPopupContainer:a,direction:s,menu:l}=p.useContext(_t),c=i(),{prefixCls:u,className:d,style:f,theme:h="light",expandIcon:m,_internalDisableMenuItemTitleTooltip:v,inlineCollapsed:g,siderCollapsed:y,rootClassName:b,mode:C,selectable:x,onClick:S,overflowedIndicatorPopupClassName:w}=e,E=eV(e,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),N=Hn(E,["collapsedWidth"]);if(process.env.NODE_ENV!=="production"){const K=fn("Menu");process.env.NODE_ENV!=="production"&&K(!("inlineCollapsed"in e&&C!=="inline"),"usage","`inlineCollapsed` should only be used when `mode` is inline."),K.deprecated("items"in e&&!e.children,"children","items")}(n=o.validator)===null||n===void 0||n.call(o,{mode:C});const $=tn(function(){var K;S==null||S.apply(void 0,arguments),(K=o.onClick)===null||K===void 0||K.call(o)}),M=o.mode||C,R=x??o.selectable,k=g??y,D={horizontal:{motionName:`${c}-slide-up`},inline:ww(c),other:{motionName:`${c}-zoom-big`}},A=i("menu",u||o.prefixCls),L=oo(A),[T,I,_]=Z5(A,L,!r),W=te(`${A}-${h}`,l==null?void 0:l.className,d),H=p.useMemo(()=>{var K,Y;if(typeof m=="function"||rh(m))return m||null;if(typeof o.expandIcon=="function"||rh(o.expandIcon))return o.expandIcon||null;if(typeof(l==null?void 0:l.expandIcon)=="function"||rh(l==null?void 0:l.expandIcon))return(l==null?void 0:l.expandIcon)||null;const V=(K=m??(o==null?void 0:o.expandIcon))!==null&&K!==void 0?K:l==null?void 0:l.expandIcon;return Hr(V,{className:te(`${A}-submenu-expand-icon`,p.isValidElement(V)?(Y=V.props)===null||Y===void 0?void 0:Y.className:void 0)})},[m,o==null?void 0:o.expandIcon,l==null?void 0:l.expandIcon,A]),B=p.useMemo(()=>({prefixCls:A,inlineCollapsed:k||!1,direction:s,firstLevel:!0,theme:h,mode:M,disableMenuItemTitleTooltip:v}),[A,k,s,v,h]);return T(p.createElement(xu.Provider,{value:null},p.createElement(Su.Provider,{value:B},p.createElement(jl,Object.assign({getPopupContainer:a,overflowedIndicator:p.createElement(Hg,null),overflowedIndicatorPopupClassName:te(A,`${A}-${h}`,w),mode:M,selectable:R,onClick:$},N,{inlineCollapsed:k,style:Object.assign(Object.assign({},l==null?void 0:l.style),f),className:W,prefixCls:A,direction:s,defaultMotions:D,expandIcon:H,ref:t,rootClassName:te(b,I,o.rootClassName,_,L),_internalComponents:tV})))))}),bi=O.forwardRef((e,t)=>{const n=O.useRef(null),r=p.useContext(Fg);return O.useImperativeHandle(t,()=>({menu:n.current,focus:o=>{var i;(i=n.current)===null||i===void 0||i.focus(o)}})),p.createElement(nV,Object.assign({ref:n},e,r))});bi.Item=mO;bi.SubMenu=gO;bi.Divider=pO;bi.ItemGroup=Bd;process.env.NODE_ENV!=="production"&&(bi.displayName="Menu");const rV=e=>{const{componentCls:t,menuCls:n,colorError:r,colorTextLightSolid:o}=e,i=`${n}-item`;return{[`${t}, ${t}-menu-submenu`]:{[`${n} ${i}`]:{[`&${i}-danger:not(${i}-disabled)`]:{color:r,"&:hover":{color:o,backgroundColor:r}}}}}},oV=e=>{const{componentCls:t,menuCls:n,zIndexPopup:r,dropdownArrowDistance:o,sizePopupArrow:i,antCls:a,iconCls:s,motionDurationMid:l,paddingBlock:c,fontSize:u,dropdownEdgeChildPadding:d,colorTextDisabled:f,fontSizeIcon:h,controlPaddingHorizontal:m,colorBgElevated:v}=e;return[{[t]:{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:r,display:"block","&::before":{position:"absolute",insetBlock:e.calc(i).div(2).sub(o).equal(),zIndex:-9999,opacity:1e-4,content:'""'},"&-menu-vertical":{maxHeight:"100vh",overflowY:"auto"},[`&-trigger${a}-btn`]:{[`& > ${s}-down, & > ${a}-btn-icon > ${s}-down`]:{fontSize:h}},[`${t}-wrap`]:{position:"relative",[`${a}-btn > ${s}-down`]:{fontSize:h},[`${s}-down::before`]:{transition:`transform ${l}`}},[`${t}-wrap-open`]:{[`${s}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${a}-slide-down-enter${a}-slide-down-enter-active${t}-placement-bottomLeft,
380
+ &${a}-slide-down-appear${a}-slide-down-appear-active${t}-placement-bottomLeft,
381
+ &${a}-slide-down-enter${a}-slide-down-enter-active${t}-placement-bottom,
382
+ &${a}-slide-down-appear${a}-slide-down-appear-active${t}-placement-bottom,
383
+ &${a}-slide-down-enter${a}-slide-down-enter-active${t}-placement-bottomRight,
384
+ &${a}-slide-down-appear${a}-slide-down-appear-active${t}-placement-bottomRight`]:{animationName:fg},[`&${a}-slide-up-enter${a}-slide-up-enter-active${t}-placement-topLeft,
385
+ &${a}-slide-up-appear${a}-slide-up-appear-active${t}-placement-topLeft,
386
+ &${a}-slide-up-enter${a}-slide-up-enter-active${t}-placement-top,
387
+ &${a}-slide-up-appear${a}-slide-up-appear-active${t}-placement-top,
388
+ &${a}-slide-up-enter${a}-slide-up-enter-active${t}-placement-topRight,
389
+ &${a}-slide-up-appear${a}-slide-up-appear-active${t}-placement-topRight`]:{animationName:pg},[`&${a}-slide-down-leave${a}-slide-down-leave-active${t}-placement-bottomLeft,
390
+ &${a}-slide-down-leave${a}-slide-down-leave-active${t}-placement-bottom,
391
+ &${a}-slide-down-leave${a}-slide-down-leave-active${t}-placement-bottomRight`]:{animationName:hg},[`&${a}-slide-up-leave${a}-slide-up-leave-active${t}-placement-topLeft,
392
+ &${a}-slide-up-leave${a}-slide-up-leave-active${t}-placement-top,
393
+ &${a}-slide-up-leave${a}-slide-up-leave-active${t}-placement-topRight`]:{animationName:mg}}},kg(e,v,{arrowPlacement:{top:!0,bottom:!0}}),{[`${t} ${n}`]:{position:"relative",margin:0},[`${n}-submenu-popup`]:{position:"absolute",zIndex:r,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${t}, ${t}-menu-submenu`]:Object.assign(Object.assign({},Bn(e)),{[n]:Object.assign(Object.assign({padding:d,listStyleType:"none",backgroundColor:v,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary},Ka(e)),{"&:empty":{padding:0,boxShadow:"none"},[`${n}-item-group-title`]:{padding:`${oe(c)} ${oe(m)}`,color:e.colorTextDescription,transition:`all ${l}`},[`${n}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${n}-item-icon`]:{minWidth:u,marginInlineEnd:e.marginXS,fontSize:e.fontSizeSM},[`${n}-title-content`]:{flex:"auto","&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},"> a":{color:"inherit",transition:`all ${l}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}},[`${n}-item-extra`]:{paddingInlineStart:e.padding,marginInlineStart:"auto",fontSize:e.fontSizeSM,color:e.colorTextDescription}},[`${n}-item, ${n}-submenu-title`]:Object.assign(Object.assign({display:"flex",margin:0,padding:`${oe(c)} ${oe(m)}`,color:e.colorText,fontWeight:"normal",fontSize:u,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${l}`,borderRadius:e.borderRadiusSM,"&:hover, &-active":{backgroundColor:e.controlItemBgHover}},Ka(e)),{"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:f,cursor:"not-allowed","&:hover":{color:f,backgroundColor:v,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${oe(e.marginXXS)} 0`,overflow:"hidden",lineHeight:0,backgroundColor:e.colorSplit},[`${t}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:e.paddingXS,[`${t}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:e.colorTextDescription,fontSize:h,fontStyle:"normal"}}}),[`${n}-item-group-list`]:{margin:`0 ${oe(e.marginXS)}`,padding:0,listStyle:"none"},[`${n}-submenu-title`]:{paddingInlineEnd:e.calc(m).add(e.fontSizeSM).equal()},[`${n}-submenu-vertical`]:{position:"relative"},[`${n}-submenu${n}-submenu-disabled ${t}-menu-submenu-title`]:{[`&, ${t}-menu-submenu-arrow-icon`]:{color:f,backgroundColor:v,cursor:"not-allowed"}},[`${n}-submenu-selected ${t}-menu-submenu-title`]:{color:e.colorPrimary}})})},[Ga(e,"slide-up"),Ga(e,"slide-down"),pu(e,"move-up"),pu(e,"move-down"),Ml(e,"zoom-big")]]},iV=e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2},Dd({contentRadius:e.borderRadiusLG,limitVerticalRadius:!0})),Pg(e)),aV=yn("Dropdown",e=>{const{marginXXS:t,sizePopupArrow:n,paddingXXS:r,componentCls:o}=e,i=Xt(e,{menuCls:`${o}-menu`,dropdownArrowDistance:e.calc(n).div(2).add(t).equal(),dropdownEdgeChildPadding:r});return[oV(i),rV(i)]},iV,{resetStyle:!1}),Bl=e=>{var t;const{menu:n,arrow:r,prefixCls:o,children:i,trigger:a,disabled:s,dropdownRender:l,getPopupContainer:c,overlayClassName:u,rootClassName:d,overlayStyle:f,open:h,onOpenChange:m,visible:v,onVisibleChange:g,mouseEnterDelay:y=.15,mouseLeaveDelay:b=.1,autoAdjustOverflow:C=!0,placement:x="",overlay:S,transitionName:w}=e,{getPopupContainer:E,getPrefixCls:N,direction:$,dropdown:M}=p.useContext(_t),R=fn("Dropdown");process.env.NODE_ENV!=="production"&&([["visible","open"],["onVisibleChange","onOpenChange"]].forEach(ne=>{let[se,pe]=ne;R.deprecated(!(se in e),se,pe)}),R.deprecated(!("overlay"in e),"overlay","menu"));const k=p.useMemo(()=>{const ne=N();return w!==void 0?w:x.includes("top")?`${ne}-slide-down`:`${ne}-slide-up`},[N,x,w]),D=p.useMemo(()=>x?x.includes("Center")?x.slice(0,x.indexOf("Center")):x:$==="rtl"?"bottomRight":"bottomLeft",[x,$]);if(process.env.NODE_ENV!=="production"){if(x.includes("Center")){const ne=x.slice(0,x.indexOf("Center"));process.env.NODE_ENV!=="production"&&R(!x.includes("Center"),"deprecated",`You are using '${x}' placement in Dropdown, which is deprecated. Try to use '${ne}' instead.`)}[["visible","open"],["onVisibleChange","onOpenChange"]].forEach(ne=>{let[se,pe]=ne;R.deprecated(!(se in e),se,pe)})}const A=N("dropdown",o),L=oo(A),[T,I,_]=aV(A,L),[,W]=br(),H=p.Children.only(JH(i)?p.createElement("span",null,i):i),B=Hr(H,{className:te(`${A}-trigger`,{[`${A}-rtl`]:$==="rtl"},H.props.className),disabled:(t=H.props.disabled)!==null&&t!==void 0?t:s}),K=s?[]:a,Y=!!(K!=null&&K.includes("contextMenu")),[V,G]=bn(!1,{value:h??v}),Q=tn(ne=>{m==null||m(ne,{source:"trigger"}),g==null||g(ne),G(ne)}),ce=te(u,d,I,_,L,M==null?void 0:M.className,{[`${A}-rtl`]:$==="rtl"}),Z=XE({arrowPointAtCenter:typeof r=="object"&&r.pointAtCenter,autoAdjustOverflow:C,offset:W.marginXXS,arrowWidth:r?W.sizePopupArrow:0,borderRadius:W.borderRadius}),he=p.useCallback(()=>{n!=null&&n.selectable&&(n!=null&&n.multiple)||(m==null||m(!1,{source:"menu"}),G(!1))},[n==null?void 0:n.selectable,n==null?void 0:n.multiple]),ye=()=>{let ne;return n!=null&&n.items?ne=p.createElement(bi,Object.assign({},n)):typeof S=="function"?ne=S():ne=S,l&&(ne=l(ne)),ne=p.Children.only(typeof ne=="string"?p.createElement("span",null,ne):ne),p.createElement(K5,{prefixCls:`${A}-menu`,rootClassName:te(_,L),expandIcon:p.createElement("span",{className:`${A}-menu-submenu-arrow`},$==="rtl"?p.createElement(yu,{className:`${A}-menu-submenu-arrow-icon`}):p.createElement(ul,{className:`${A}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:he,validator:se=>{let{mode:pe}=se;process.env.NODE_ENV!=="production"&&R(!pe||pe==="vertical","usage",`mode="${pe}" is not supported for Dropdown's Menu.`)}},ne)},[fe,ae]=$l("Dropdown",f==null?void 0:f.zIndex);let ve=p.createElement(YH,Object.assign({alignPoint:Y},Hn(e,["rootClassName"]),{mouseEnterDelay:y,mouseLeaveDelay:b,visible:V,builtinPlacements:Z,arrow:!!r,overlayClassName:ce,prefixCls:A,getPopupContainer:c||E,transitionName:k,trigger:K,overlay:ye,placement:D,onVisibleChange:Q,overlayStyle:Object.assign(Object.assign(Object.assign({},M==null?void 0:M.style),f),{zIndex:fe})}),B);return fe&&(ve=p.createElement(Ol.Provider,{value:ae},ve)),T(ve)},sV=Sg(Bl,"align",void 0,"dropdown",e=>e),lV=e=>p.createElement(sV,Object.assign({},e),p.createElement("span",null));Bl._InternalPanelDoNotUseOrYouWillBeFired=lV;process.env.NODE_ENV!=="production"&&(Bl.displayName="Dropdown");const vO=p.createContext(null),cV=vO.Provider,bO=p.createContext(null),uV=bO.Provider;var dV=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],fV=O.forwardRef(function(e,t){var n=e.prefixCls,r=n===void 0?"rc-checkbox":n,o=e.className,i=e.style,a=e.checked,s=e.disabled,l=e.defaultChecked,c=l===void 0?!1:l,u=e.type,d=u===void 0?"checkbox":u,f=e.title,h=e.onChange,m=Mt(e,dV),v=O.useRef(null),g=O.useRef(null),y=bn(c,{value:a}),b=de(y,2),C=b[0],x=b[1];O.useImperativeHandle(t,function(){return{focus:function(N){var $;($=v.current)===null||$===void 0||$.focus(N)},blur:function(){var N;(N=v.current)===null||N===void 0||N.blur()},input:v.current,nativeElement:g.current}});var S=te(r,o,U(U({},"".concat(r,"-checked"),C),"".concat(r,"-disabled"),s)),w=function(N){s||("checked"in e||x(N.target.checked),h==null||h({target:q(q({},e),{},{type:d,checked:N.target.checked}),stopPropagation:function(){N.stopPropagation()},preventDefault:function(){N.preventDefault()},nativeEvent:N.nativeEvent}))};return p.createElement("span",{className:S,title:f,style:i,ref:g},p.createElement("input",He({},m,{className:"".concat(r,"-input"),ref:v,onChange:w,disabled:s,checked:!!C,type:d})),p.createElement("span",{className:"".concat(r,"-inner")}))});function hV(e){const t=O.useRef(null),n=()=>{Ht.cancel(t.current),t.current=null};return[()=>{n(),t.current=Ht(()=>{t.current=null})},i=>{t.current&&(i.stopPropagation(),n()),e==null||e(i)}]}const pV=e=>{const{componentCls:t,antCls:n}=e,r=`${t}-group`;return{[r]:Object.assign(Object.assign({},Bn(e)),{display:"inline-block",fontSize:0,[`&${r}-rtl`]:{direction:"rtl"},[`&${r}-block`]:{display:"flex"},[`${n}-badge ${n}-badge-count`]:{zIndex:1},[`> ${n}-badge:not(:first-child) > ${n}-button-wrapper`]:{borderInlineStart:"none"}})}},mV=e=>{const{componentCls:t,wrapperMarginInlineEnd:n,colorPrimary:r,radioSize:o,motionDurationSlow:i,motionDurationMid:a,motionEaseInOutCirc:s,colorBgContainer:l,colorBorder:c,lineWidth:u,colorBgContainerDisabled:d,colorTextDisabled:f,paddingXS:h,dotColorDisabled:m,lineType:v,radioColor:g,radioBgColor:y,calc:b}=e,C=`${t}-inner`,S=b(o).sub(b(4).mul(2)),w=b(1).mul(o).equal({unit:!0});return{[`${t}-wrapper`]:Object.assign(Object.assign({},Bn(e)),{display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:n,cursor:"pointer","&:last-child":{marginInlineEnd:0},[`&${t}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:e.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},"&-block":{flex:1,justifyContent:"center"},[`${t}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${oe(u)} ${v} ${r}`,borderRadius:"50%",visibility:"hidden",opacity:0,content:'""'},[t]:Object.assign(Object.assign({},Bn(e)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center",borderRadius:"50%"}),[`${t}-wrapper:hover &,
394
+ &:hover ${C}`]:{borderColor:r},[`${t}-input:focus-visible + ${C}`]:Object.assign({},wl(e)),[`${t}:hover::after, ${t}-wrapper:hover &::after`]:{visibility:"visible"},[`${t}-inner`]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:w,height:w,marginBlockStart:b(1).mul(o).div(-2).equal({unit:!0}),marginInlineStart:b(1).mul(o).div(-2).equal({unit:!0}),backgroundColor:g,borderBlockStart:0,borderInlineStart:0,borderRadius:w,transform:"scale(0)",opacity:0,transition:`all ${i} ${s}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:w,height:w,backgroundColor:l,borderColor:c,borderStyle:"solid",borderWidth:u,borderRadius:"50%",transition:`all ${a}`},[`${t}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0},[`${t}-checked`]:{[C]:{borderColor:r,backgroundColor:y,"&::after":{transform:`scale(${e.calc(e.dotSize).div(o).equal()})`,opacity:1,transition:`all ${i} ${s}`}}},[`${t}-disabled`]:{cursor:"not-allowed",[C]:{backgroundColor:d,borderColor:c,cursor:"not-allowed","&::after":{backgroundColor:m}},[`${t}-input`]:{cursor:"not-allowed"},[`${t}-disabled + span`]:{color:f,cursor:"not-allowed"},[`&${t}-checked`]:{[C]:{"&::after":{transform:`scale(${b(S).div(o).equal()})`}}}},[`span${t} + *`]:{paddingInlineStart:h,paddingInlineEnd:h}})}},gV=e=>{const{buttonColor:t,controlHeight:n,componentCls:r,lineWidth:o,lineType:i,colorBorder:a,motionDurationSlow:s,motionDurationMid:l,buttonPaddingInline:c,fontSize:u,buttonBg:d,fontSizeLG:f,controlHeightLG:h,controlHeightSM:m,paddingXS:v,borderRadius:g,borderRadiusSM:y,borderRadiusLG:b,buttonCheckedBg:C,buttonSolidCheckedColor:x,colorTextDisabled:S,colorBgContainerDisabled:w,buttonCheckedBgDisabled:E,buttonCheckedColorDisabled:N,colorPrimary:$,colorPrimaryHover:M,colorPrimaryActive:R,buttonSolidCheckedBg:k,buttonSolidCheckedHoverBg:D,buttonSolidCheckedActiveBg:A,calc:L}=e;return{[`${r}-button-wrapper`]:{position:"relative",display:"inline-block",height:n,margin:0,paddingInline:c,paddingBlock:0,color:t,fontSize:u,lineHeight:oe(L(n).sub(L(o).mul(2)).equal()),background:d,border:`${oe(o)} ${i} ${a}`,borderBlockStartWidth:L(o).add(.02).equal(),borderInlineStartWidth:0,borderInlineEndWidth:o,cursor:"pointer",transition:[`color ${l}`,`background ${l}`,`box-shadow ${l}`].join(","),a:{color:t},[`> ${r}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:first-child)":{"&::before":{position:"absolute",insetBlockStart:L(o).mul(-1).equal(),insetInlineStart:L(o).mul(-1).equal(),display:"block",boxSizing:"content-box",width:1,height:"100%",paddingBlock:o,paddingInline:0,backgroundColor:a,transition:`background-color ${s}`,content:'""'}},"&:first-child":{borderInlineStart:`${oe(o)} ${i} ${a}`,borderStartStartRadius:g,borderEndStartRadius:g},"&:last-child":{borderStartEndRadius:g,borderEndEndRadius:g},"&:first-child:last-child":{borderRadius:g},[`${r}-group-large &`]:{height:h,fontSize:f,lineHeight:oe(L(h).sub(L(o).mul(2)).equal()),"&:first-child":{borderStartStartRadius:b,borderEndStartRadius:b},"&:last-child":{borderStartEndRadius:b,borderEndEndRadius:b}},[`${r}-group-small &`]:{height:m,paddingInline:L(v).sub(o).equal(),paddingBlock:0,lineHeight:oe(L(m).sub(L(o).mul(2)).equal()),"&:first-child":{borderStartStartRadius:y,borderEndStartRadius:y},"&:last-child":{borderStartEndRadius:y,borderEndEndRadius:y}},"&:hover":{position:"relative",color:$},"&:has(:focus-visible)":Object.assign({},wl(e)),[`${r}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:"none"},[`&-checked:not(${r}-button-wrapper-disabled)`]:{zIndex:1,color:$,background:C,borderColor:$,"&::before":{backgroundColor:$},"&:first-child":{borderColor:$},"&:hover":{color:M,borderColor:M,"&::before":{backgroundColor:M}},"&:active":{color:R,borderColor:R,"&::before":{backgroundColor:R}}},[`${r}-group-solid &-checked:not(${r}-button-wrapper-disabled)`]:{color:x,background:k,borderColor:k,"&:hover":{color:x,background:D,borderColor:D},"&:active":{color:x,background:A,borderColor:A}},"&-disabled":{color:S,backgroundColor:w,borderColor:a,cursor:"not-allowed","&:first-child, &:hover":{color:S,backgroundColor:w,borderColor:a}},[`&-disabled${r}-button-wrapper-checked`]:{color:N,backgroundColor:E,borderColor:a,boxShadow:"none"},"&-block":{flex:1,textAlign:"center"}}}},vV=e=>{const{wireframe:t,padding:n,marginXS:r,lineWidth:o,fontSizeLG:i,colorText:a,colorBgContainer:s,colorTextDisabled:l,controlItemBgActiveDisabled:c,colorTextLightSolid:u,colorPrimary:d,colorPrimaryHover:f,colorPrimaryActive:h,colorWhite:m}=e,v=4,g=i,y=t?g-v*2:g-(v+o)*2;return{radioSize:g,dotSize:y,dotColorDisabled:l,buttonSolidCheckedColor:u,buttonSolidCheckedBg:d,buttonSolidCheckedHoverBg:f,buttonSolidCheckedActiveBg:h,buttonBg:s,buttonCheckedBg:s,buttonColor:a,buttonCheckedBgDisabled:c,buttonCheckedColorDisabled:l,buttonPaddingInline:n-o,wrapperMarginInlineEnd:r,radioColor:t?d:m,radioBgColor:t?s:d}},yO=yn("Radio",e=>{const{controlOutline:t,controlOutlineWidth:n}=e,r=`0 0 0 ${oe(n)} ${t}`,i=Xt(e,{radioFocusShadow:r,radioButtonFocusShadow:r});return[pV(i),mV(i),gV(i)]},vV,{unitless:{radioSize:!0,dotSize:!0}});var bV=function(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};const yV=(e,t)=>{var n,r;const o=p.useContext(vO),i=p.useContext(bO),{getPrefixCls:a,direction:s,radio:l}=p.useContext(_t),c=p.useRef(null),u=mr(t,c),{isFormItemInput:d}=p.useContext(Mr);if(process.env.NODE_ENV!=="production"){const T=fn("Radio");process.env.NODE_ENV!=="production"&&T(!("optionType"in e),"usage","`optionType` is only support in Radio.Group.")}const f=T=>{var I,_;(I=e.onChange)===null||I===void 0||I.call(e,T),(_=o==null?void 0:o.onChange)===null||_===void 0||_.call(o,T)},{prefixCls:h,className:m,rootClassName:v,children:g,style:y,title:b}=e,C=bV(e,["prefixCls","className","rootClassName","children","style","title"]),x=a("radio",h),S=((o==null?void 0:o.optionType)||i)==="button",w=S?`${x}-button`:x,E=oo(x),[N,$,M]=yO(x,E),R=Object.assign({},C),k=p.useContext(Fr);o&&(R.name=o.name,R.onChange=f,R.checked=e.value===o.value,R.disabled=(n=R.disabled)!==null&&n!==void 0?n:o.disabled),R.disabled=(r=R.disabled)!==null&&r!==void 0?r:k;const D=te(`${w}-wrapper`,{[`${w}-wrapper-checked`]:R.checked,[`${w}-wrapper-disabled`]:R.disabled,[`${w}-wrapper-rtl`]:s==="rtl",[`${w}-wrapper-in-form-item`]:d,[`${w}-wrapper-block`]:!!(o!=null&&o.block)},l==null?void 0:l.className,m,v,$,M,E),[A,L]=hV(R.onClick);return N(p.createElement(cg,{component:"Radio",disabled:R.disabled},p.createElement("label",{className:D,style:Object.assign(Object.assign({},l==null?void 0:l.style),y),onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,title:b,onClick:A},p.createElement(fV,Object.assign({},R,{className:te(R.className,{[lg]:!S}),type:"radio",prefixCls:w,ref:u,onClick:L})),g!==void 0?p.createElement("span",{className:`${w}-label`},g):null)))},hl=p.forwardRef(yV);process.env.NODE_ENV!=="production"&&(hl.displayName="Radio");const CV=p.forwardRef((e,t)=>{const{getPrefixCls:n,direction:r}=p.useContext(_t),o=Tl(),{prefixCls:i,className:a,rootClassName:s,options:l,buttonStyle:c="outline",disabled:u,children:d,size:f,style:h,id:m,optionType:v,name:g=o,defaultValue:y,value:b,block:C=!1,onChange:x,onMouseEnter:S,onMouseLeave:w,onFocus:E,onBlur:N}=e,[$,M]=bn(y,{value:b}),R=p.useCallback(K=>{const Y=$,V=K.target.value;"value"in e||M(V),V!==Y&&(x==null||x(K))},[$,M,x]),k=n("radio",i),D=`${k}-group`,A=oo(k),[L,T,I]=yO(k,A);let _=d;l&&l.length>0&&(_=l.map(K=>typeof K=="string"||typeof K=="number"?p.createElement(hl,{key:K.toString(),prefixCls:k,disabled:u,value:K,checked:$===K},K):p.createElement(hl,{key:`radio-group-value-options-${K.value}`,prefixCls:k,disabled:K.disabled||u,value:K.value,checked:$===K.value,title:K.title,style:K.style,id:K.id,required:K.required},K.label)));const W=Vr(f),H=te(D,`${D}-${c}`,{[`${D}-${W}`]:W,[`${D}-rtl`]:r==="rtl",[`${D}-block`]:C},a,s,T,I,A),B=p.useMemo(()=>({onChange:R,value:$,disabled:u,name:g,optionType:v,block:C}),[R,$,u,g,v,C]);return L(p.createElement("div",Object.assign({},eo(e,{aria:!0,data:!0}),{className:H,style:h,onMouseEnter:S,onMouseLeave:w,onFocus:E,onBlur:N,id:m,ref:t}),p.createElement(cV,{value:B},_)))}),SV=p.memo(CV);var xV=function(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};const wV=(e,t)=>{const{getPrefixCls:n}=p.useContext(_t),{prefixCls:r}=e,o=xV(e,["prefixCls"]),i=n("radio",r);return p.createElement(uV,{value:"button"},p.createElement(hl,Object.assign({prefixCls:i},o,{type:"radio",ref:t})))},EV=p.forwardRef(wV),ti=hl;ti.Button=EV;ti.Group=SV;ti.__ANT_RADIO=!0;function zl(e){return Xt(e,{inputAffixPadding:e.paddingXXS})}const Fl=e=>{const{controlHeight:t,fontSize:n,lineHeight:r,lineWidth:o,controlHeightSM:i,controlHeightLG:a,fontSizeLG:s,lineHeightLG:l,paddingSM:c,controlPaddingHorizontalSM:u,controlPaddingHorizontal:d,colorFillAlter:f,colorPrimaryHover:h,colorPrimary:m,controlOutlineWidth:v,controlOutline:g,colorErrorOutline:y,colorWarningOutline:b,colorBgContainer:C,inputFontSize:x,inputFontSizeLG:S,inputFontSizeSM:w}=e,E=x||n,N=w||E,$=S||s,M=Math.round((t-E*r)/2*10)/10-o,R=Math.round((i-N*r)/2*10)/10-o,k=Math.ceil((a-$*l)/2*10)/10-o;return{paddingBlock:Math.max(M,0),paddingBlockSM:Math.max(R,0),paddingBlockLG:Math.max(k,0),paddingInline:c-o,paddingInlineSM:u-o,paddingInlineLG:d-o,addonBg:f,activeBorderColor:m,hoverBorderColor:h,activeShadow:`0 0 0 ${v}px ${g}`,errorActiveShadow:`0 0 0 ${v}px ${y}`,warningActiveShadow:`0 0 0 ${v}px ${b}`,hoverBg:C,activeBg:C,inputFontSize:E,inputFontSizeLG:$,inputFontSizeSM:N}},OV=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),Vg=e=>({color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"input[disabled], textarea[disabled]":{cursor:"not-allowed"},"&:hover:not([disabled])":Object.assign({},OV(Xt(e,{hoverBorderColor:e.colorBorder,hoverBg:e.colorBgContainerDisabled})))}),CO=(e,t)=>({background:e.colorBgContainer,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:t.borderColor,"&:hover":{borderColor:t.hoverBorderColor,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:t.activeBorderColor,boxShadow:t.activeShadow,outline:0,backgroundColor:e.activeBg}}),qy=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},CO(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}),[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:t.borderColor}}),SO=(e,t)=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},CO(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow})),{[`&${e.componentCls}-disabled, &[disabled]`]:Object.assign({},Vg(e))}),qy(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError})),qy(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning})),t)}),Ky=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{borderColor:t.addonBorderColor,color:t.addonColor}}}),xO=e=>({"&-outlined":Object.assign(Object.assign(Object.assign({[`${e.componentCls}-group`]:{"&-addon":{background:e.addonBg,border:`${oe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}}},Ky(e,{status:"error",addonBorderColor:e.colorError,addonColor:e.colorErrorText})),Ky(e,{status:"warning",addonBorderColor:e.colorWarning,addonColor:e.colorWarningText})),{[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group-addon`]:Object.assign({},Vg(e))}})}),wO=(e,t)=>{const{componentCls:n}=e;return{"&-borderless":Object.assign({background:"transparent",border:"none","&:focus, &:focus-within":{outline:"none"},[`&${n}-disabled, &[disabled]`]:{color:e.colorTextDisabled,cursor:"not-allowed"},[`&${n}-status-error`]:{"&, & input, & textarea":{color:e.colorError}},[`&${n}-status-warning`]:{"&, & input, & textarea":{color:e.colorWarning}}},t)}},EO=(e,t)=>{var n;return{background:t.bg,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:(n=t==null?void 0:t.inputColor)!==null&&n!==void 0?n:"unset"},"&:hover":{background:t.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:t.activeBorderColor,backgroundColor:e.activeBg}}},Gy=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},EO(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}})}),OO=(e,t)=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},EO(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor})),{[`&${e.componentCls}-disabled, &[disabled]`]:Object.assign({},Vg(e))}),Gy(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorError})),Gy(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarning})),t)}),Xy=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{background:t.addonBg,color:t.addonColor}}}),$O=e=>({"&-filled":Object.assign(Object.assign(Object.assign({[`${e.componentCls}-group`]:{"&-addon":{background:e.colorFillTertiary},[`${e.componentCls}-filled:not(:focus):not(:focus-within)`]:{"&:not(:first-child)":{borderInlineStart:`${oe(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},"&:not(:last-child)":{borderInlineEnd:`${oe(e.lineWidth)} ${e.lineType} ${e.colorSplit}`}}}},Xy(e,{status:"error",addonBg:e.colorErrorBg,addonColor:e.colorErrorText})),Xy(e,{status:"warning",addonBg:e.colorWarningBg,addonColor:e.colorWarningText})),{[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group`]:{"&-addon":{background:e.colorFillTertiary,color:e.colorTextDisabled},"&-addon:first-child":{borderInlineStart:`${oe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${oe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${oe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${oe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${oe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${oe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`}}}})}),NO=(e,t)=>({background:e.colorBgContainer,borderWidth:`${oe(e.lineWidth)} 0`,borderStyle:`${e.lineType} none`,borderColor:`transparent transparent ${t.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${t.borderColor} transparent`,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${t.borderColor} transparent`,outline:0,backgroundColor:e.activeBg}}),Yy=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},NO(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}),[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:`transparent transparent ${t.borderColor} transparent`}}),MO=(e,t)=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},NO(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow})),{[`&${e.componentCls}-disabled, &[disabled]`]:{color:e.colorTextDisabled,boxShadow:"none",cursor:"not-allowed","&:hover":{borderColor:`transparent transparent ${e.colorBorder} transparent`}},"input[disabled], textarea[disabled]":{cursor:"not-allowed"}}),Yy(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError})),Yy(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning})),t)}),RO=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),IO=e=>{const{paddingBlockLG:t,lineHeightLG:n,borderRadiusLG:r,paddingInlineLG:o}=e;return{padding:`${oe(t)} ${oe(o)}`,fontSize:e.inputFontSizeLG,lineHeight:n,borderRadius:r}},TO=e=>({padding:`${oe(e.paddingBlockSM)} ${oe(e.paddingInlineSM)}`,fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),zd=e=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${oe(e.paddingBlock)} ${oe(e.paddingInline)}`,color:e.colorText,fontSize:e.inputFontSize,lineHeight:e.lineHeight,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`},RO(e.colorTextPlaceholder)),{"&-lg":Object.assign({},IO(e)),"&-sm":Object.assign({},TO(e)),"&-rtl, &-textarea-rtl":{direction:"rtl"}}),AO=e=>{const{componentCls:t,antCls:n}=e;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:e.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${t}, &-lg > ${t}-group-addon`]:Object.assign({},IO(e)),[`&-sm ${t}, &-sm > ${t}-group-addon`]:Object.assign({},TO(e)),[`&-lg ${n}-select-single ${n}-select-selector`]:{height:e.controlHeightLG},[`&-sm ${n}-select-single ${n}-select-selector`]:{height:e.controlHeightSM},[`> ${t}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${t}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${oe(e.paddingInline)}`,color:e.colorText,fontWeight:"normal",fontSize:e.inputFontSize,textAlign:"center",borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`,lineHeight:1,[`${n}-select`]:{margin:`${oe(e.calc(e.paddingBlock).add(1).mul(-1).equal())} ${oe(e.calc(e.paddingInline).mul(-1).equal())}`,[`&${n}-select-single:not(${n}-select-customize-input):not(${n}-pagination-size-changer)`]:{[`${n}-select-selector`]:{backgroundColor:"inherit",border:`${oe(e.lineWidth)} ${e.lineType} transparent`,boxShadow:"none"}}},[`${n}-cascader-picker`]:{margin:`-9px ${oe(e.calc(e.paddingInline).mul(-1).equal())}`,backgroundColor:"transparent",[`${n}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}}},[t]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${t}-search-with-button &`]:{zIndex:0}}},[`> ${t}:first-child, ${t}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${n}-select ${n}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}-affix-wrapper`]:{[`&:not(:first-child) ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}:last-child, ${t}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${n}-select ${n}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${t}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${t}-search &`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius}},[`&:not(:first-child), ${t}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${t}-group-compact`]:Object.assign(Object.assign({display:"block"},uu()),{[`${t}-group-addon, ${t}-group-wrap, > ${t}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:e.lineWidth,"&:hover, &:focus":{zIndex:1}}},"& > *":{display:"inline-flex",float:"none",verticalAlign:"top",borderRadius:0},[`
395
+ & > ${t}-affix-wrapper,
396
+ & > ${t}-number-affix-wrapper,
397
+ & > ${n}-picker-range
398
+ `]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal(),borderInlineEndWidth:e.lineWidth},[t]:{float:"none"},[`& > ${n}-select > ${n}-select-selector,
399
+ & > ${n}-select-auto-complete ${t},
400
+ & > ${n}-cascader-picker ${t},
401
+ & > ${t}-group-wrapper ${t}`]:{borderInlineEndWidth:e.lineWidth,borderRadius:0,"&:hover, &:focus":{zIndex:1}},[`& > ${n}-select-focused`]:{zIndex:1},[`& > ${n}-select > ${n}-select-arrow`]:{zIndex:1},[`& > *:first-child,
402
+ & > ${n}-select:first-child > ${n}-select-selector,
403
+ & > ${n}-select-auto-complete:first-child ${t},
404
+ & > ${n}-cascader-picker:first-child ${t}`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius},[`& > *:last-child,
405
+ & > ${n}-select:last-child > ${n}-select-selector,
406
+ & > ${n}-cascader-picker:last-child ${t},
407
+ & > ${n}-cascader-picker-focused:last-child ${t}`]:{borderInlineEndWidth:e.lineWidth,borderStartEndRadius:e.borderRadius,borderEndEndRadius:e.borderRadius},[`& > ${n}-select-auto-complete ${t}`]:{verticalAlign:"top"},[`${t}-group-wrapper + ${t}-group-wrapper`]:{marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),[`${t}-affix-wrapper`]:{borderRadius:0}},[`${t}-group-wrapper:not(:last-child)`]:{[`&${t}-search > ${t}-group`]:{[`& > ${t}-group-addon > ${t}-search-button`]:{borderRadius:0},[`& > ${t}`]:{borderStartStartRadius:e.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:e.borderRadius}}}})}},$V=e=>{const{componentCls:t,controlHeightSM:n,lineWidth:r,calc:o}=e,a=o(n).sub(o(r).mul(2)).sub(16).div(2).equal();return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Bn(e)),zd(e)),SO(e)),OO(e)),wO(e)),MO(e)),{'&[type="color"]':{height:e.controlHeight,[`&${t}-lg`]:{height:e.controlHeightLG},[`&${t}-sm`]:{height:n,paddingTop:a,paddingBottom:a}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:"none"}})}},NV=e=>{const{componentCls:t}=e;return{[`${t}-clear-icon`]:{margin:0,padding:0,lineHeight:0,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${e.motionDurationSlow}`,border:"none",outline:"none",backgroundColor:"transparent","&:hover":{color:e.colorTextTertiary},"&:active":{color:e.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${oe(e.inputAffixPadding)}`}}}},MV=e=>{const{componentCls:t,inputAffixPadding:n,colorTextDescription:r,motionDurationSlow:o,colorIcon:i,colorIconHover:a,iconCls:s}=e,l=`${t}-affix-wrapper`,c=`${t}-affix-wrapper-disabled`;return{[l]:Object.assign(Object.assign(Object.assign(Object.assign({},zd(e)),{display:"inline-flex",[`&:not(${t}-disabled):hover`]:{zIndex:1,[`${t}-search-with-button &`]:{zIndex:0}},"&-focused, &:focus":{zIndex:1},[`> input${t}`]:{padding:0},[`> input${t}, > textarea${t}`]:{fontSize:"inherit",border:"none",borderRadius:0,outline:"none",background:"transparent",color:"inherit","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[t]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:e.paddingXS}},"&-show-count-suffix":{color:r},"&-show-count-has-suffix":{marginInlineEnd:e.paddingXXS},"&-prefix":{marginInlineEnd:n},"&-suffix":{marginInlineStart:n}}}),NV(e)),{[`${s}${t}-password-icon`]:{color:i,cursor:"pointer",transition:`all ${o}`,"&:hover":{color:a}}}),[`${t}-underlined`]:{borderRadius:0},[c]:{[`${s}${t}-password-icon`]:{color:i,cursor:"not-allowed","&:hover":{color:i}}}}},RV=e=>{const{componentCls:t,borderRadiusLG:n,borderRadiusSM:r}=e;return{[`${t}-group`]:Object.assign(Object.assign(Object.assign({},Bn(e)),AO(e)),{"&-rtl":{direction:"rtl"},"&-wrapper":Object.assign(Object.assign(Object.assign({display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${t}-group-addon`]:{borderRadius:n,fontSize:e.inputFontSizeLG}},"&-sm":{[`${t}-group-addon`]:{borderRadius:r}}},xO(e)),$O(e)),{[`&:not(${t}-compact-first-item):not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}, ${t}-group-addon`]:{borderRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-first-item`]:{[`${t}, ${t}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-last-item`]:{[`${t}, ${t}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartStartRadius:0,borderEndStartRadius:0}}})})}},IV=e=>{const{componentCls:t,antCls:n}=e,r=`${t}-search`;return{[r]:{[t]:{"&:hover, &:focus":{[`+ ${t}-group-addon ${r}-button:not(${n}-btn-primary)`]:{borderInlineStartColor:e.colorPrimaryHover}}},[`${t}-affix-wrapper`]:{height:e.controlHeight,borderRadius:0},[`${t}-lg`]:{lineHeight:e.calc(e.lineHeightLG).sub(2e-4).equal()},[`> ${t}-group`]:{[`> ${t}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${r}-button`]:{marginInlineEnd:-1,borderStartStartRadius:0,borderEndStartRadius:0,boxShadow:"none"},[`${r}-button:not(${n}-btn-primary)`]:{color:e.colorTextDescription,"&:hover":{color:e.colorPrimaryHover},"&:active":{color:e.colorPrimaryActive},[`&${n}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${r}-button`]:{height:e.controlHeight,"&:hover, &:focus":{zIndex:1}},"&-large":{[`${t}-affix-wrapper, ${r}-button`]:{height:e.controlHeightLG}},"&-small":{[`${t}-affix-wrapper, ${r}-button`]:{height:e.controlHeightSM}},"&-rtl":{direction:"rtl"},[`&${t}-compact-item`]:{[`&:not(${t}-compact-last-item)`]:{[`${t}-group-addon`]:{[`${t}-search-button`]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal(),borderRadius:0}}},[`&:not(${t}-compact-first-item)`]:{[`${t},${t}-affix-wrapper`]:{borderRadius:0}},[`> ${t}-group-addon ${t}-search-button,
408
+ > ${t},
409
+ ${t}-affix-wrapper`]:{"&:hover, &:focus, &:active":{zIndex:2}},[`> ${t}-affix-wrapper-focused`]:{zIndex:2}}}}},TV=e=>{const{componentCls:t}=e;return{[`${t}-out-of-range`]:{[`&, & input, & textarea, ${t}-show-count-suffix, ${t}-data-count`]:{color:e.colorError}}}},PO=yn(["Input","Shared"],e=>{const t=Xt(e,zl(e));return[$V(t),MV(t)]},Fl,{resetFont:!1}),kO=yn(["Input","Component"],e=>{const t=Xt(e,zl(e));return[RV(t),IV(t),TV(t),Rl(t)]},Fl,{resetFont:!1}),AV=e=>{const{componentCls:t,sizePaddingEdgeHorizontal:n,colorSplit:r,lineWidth:o,textPaddingInline:i,orientationMargin:a,verticalMarginInline:s}=e;return{[t]:Object.assign(Object.assign({},Bn(e)),{borderBlockStart:`${oe(o)} solid ${r}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:s,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${oe(o)} solid ${r}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${oe(e.dividerHorizontalGutterMargin)} 0`},[`&-horizontal${t}-with-text`]:{display:"flex",alignItems:"center",margin:`${oe(e.dividerHorizontalWithTextGutterMargin)} 0`,color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${r}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${oe(o)} solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${t}-with-text-start`]:{"&::before":{width:`calc(${a} * 100%)`},"&::after":{width:`calc(100% - ${a} * 100%)`}},[`&-horizontal${t}-with-text-end`]:{"&::before":{width:`calc(100% - ${a} * 100%)`},"&::after":{width:`calc(${a} * 100%)`}},[`${t}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:i},"&-dashed":{background:"none",borderColor:r,borderStyle:"dashed",borderWidth:`${oe(o)} 0 0`},[`&-horizontal${t}-with-text${t}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${t}-dashed`]:{borderInlineStartWidth:o,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},"&-dotted":{background:"none",borderColor:r,borderStyle:"dotted",borderWidth:`${oe(o)} 0 0`},[`&-horizontal${t}-with-text${t}-dotted`]:{"&::before, &::after":{borderStyle:"dotted none none"}},[`&-vertical${t}-dotted`]:{borderInlineStartWidth:o,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${t}-with-text`]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize},[`&-horizontal${t}-with-text-start${t}-no-default-orientation-margin-start`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${t}-inner-text`]:{paddingInlineStart:n}},[`&-horizontal${t}-with-text-end${t}-no-default-orientation-margin-end`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${t}-inner-text`]:{paddingInlineEnd:n}}})}},PV=e=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:e.marginXS}),kV=yn("Divider",e=>{const t=Xt(e,{dividerHorizontalWithTextGutterMargin:e.margin,dividerHorizontalGutterMargin:e.marginLG,sizePaddingEdgeHorizontal:0});return[AV(t)]},PV,{unitless:{orientationMargin:!0}});var DV=function(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};const DO=e=>{const{getPrefixCls:t,direction:n,className:r,style:o}=Rr("divider"),{prefixCls:i,type:a="horizontal",orientation:s="center",orientationMargin:l,className:c,rootClassName:u,children:d,dashed:f,variant:h="solid",plain:m,style:v}=e,g=DV(e,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","variant","plain","style"]),y=t("divider",i),[b,C,x]=kV(y),S=!!d,w=p.useMemo(()=>s==="left"?n==="rtl"?"end":"start":s==="right"?n==="rtl"?"start":"end":s,[n,s]),E=w==="start"&&l!=null,N=w==="end"&&l!=null,$=te(y,r,C,x,`${y}-${a}`,{[`${y}-with-text`]:S,[`${y}-with-text-${w}`]:S,[`${y}-dashed`]:!!f,[`${y}-${h}`]:h!=="solid",[`${y}-plain`]:!!m,[`${y}-rtl`]:n==="rtl",[`${y}-no-default-orientation-margin-start`]:E,[`${y}-no-default-orientation-margin-end`]:N},c,u),M=p.useMemo(()=>typeof l=="number"?l:/^\d+$/.test(l)?Number(l):l,[l]),R={marginInlineStart:E?M:void 0,marginInlineEnd:N?M:void 0};if(process.env.NODE_ENV!=="production"){const k=fn("Divider");process.env.NODE_ENV!=="production"&&k(!d||a!=="vertical","usage","`children` not working in `vertical` mode.")}return b(p.createElement("div",Object.assign({className:$,style:Object.assign(Object.assign({},o),v)},g,{role:"separator"}),d&&a!=="vertical"&&p.createElement("span",{className:`${y}-inner-text`,style:R},d)))};process.env.NODE_ENV!=="production"&&(DO.displayName="Divider");var Jy=function(t,n){if(!t)return null;var r={left:t.offsetLeft,right:t.parentElement.clientWidth-t.clientWidth-t.offsetLeft,width:t.clientWidth,top:t.offsetTop,bottom:t.parentElement.clientHeight-t.clientHeight-t.offsetTop,height:t.clientHeight};return n?{left:0,right:0,width:0,top:r.top,bottom:r.bottom,height:r.height}:{left:r.left,right:r.right,width:r.width,top:0,bottom:0,height:0}},so=function(t){return t!==void 0?"".concat(t,"px"):void 0};function _V(e){var t=e.prefixCls,n=e.containerRef,r=e.value,o=e.getValueIndex,i=e.motionName,a=e.onMotionStart,s=e.onMotionEnd,l=e.direction,c=e.vertical,u=c===void 0?!1:c,d=p.useRef(null),f=p.useState(r),h=de(f,2),m=h[0],v=h[1],g=function(L){var T,I=o(L),_=(T=n.current)===null||T===void 0?void 0:T.querySelectorAll(".".concat(t,"-item"))[I];return(_==null?void 0:_.offsetParent)&&_},y=p.useState(null),b=de(y,2),C=b[0],x=b[1],S=p.useState(null),w=de(S,2),E=w[0],N=w[1];cn(function(){if(m!==r){var A=g(m),L=g(r),T=Jy(A,u),I=Jy(L,u);v(r),x(T),N(I),A&&L?a():s()}},[r]);var $=p.useMemo(function(){if(u){var A;return so((A=C==null?void 0:C.top)!==null&&A!==void 0?A:0)}return so(l==="rtl"?-(C==null?void 0:C.right):C==null?void 0:C.left)},[u,l,C]),M=p.useMemo(function(){if(u){var A;return so((A=E==null?void 0:E.top)!==null&&A!==void 0?A:0)}return so(l==="rtl"?-(E==null?void 0:E.right):E==null?void 0:E.left)},[u,l,E]),R=function(){return u?{transform:"translateY(var(--thumb-start-top))",height:"var(--thumb-start-height)"}:{transform:"translateX(var(--thumb-start-left))",width:"var(--thumb-start-width)"}},k=function(){return u?{transform:"translateY(var(--thumb-active-top))",height:"var(--thumb-active-height)"}:{transform:"translateX(var(--thumb-active-left))",width:"var(--thumb-active-width)"}},D=function(){x(null),N(null),s()};return!C||!E?null:p.createElement(So,{visible:!0,motionName:i,motionAppear:!0,onAppearStart:R,onAppearActive:k,onVisibleChanged:D},function(A,L){var T=A.className,I=A.style,_=q(q({},I),{},{"--thumb-start-left":$,"--thumb-start-width":so(C==null?void 0:C.width),"--thumb-active-left":M,"--thumb-active-width":so(E==null?void 0:E.width),"--thumb-start-top":$,"--thumb-start-height":so(C==null?void 0:C.height),"--thumb-active-top":M,"--thumb-active-height":so(E==null?void 0:E.height)}),W={ref:mr(d,L),style:_,className:te("".concat(t,"-thumb"),T)};return process.env.NODE_ENV==="test"&&(W["data-test-style"]=JSON.stringify(_)),p.createElement("div",W)})}var LV=["prefixCls","direction","vertical","options","disabled","defaultValue","value","name","onChange","className","motionName"];function jV(e){if(typeof e.title<"u")return e.title;if(ht(e.label)!=="object"){var t;return(t=e.label)===null||t===void 0?void 0:t.toString()}}function BV(e){return e.map(function(t){if(ht(t)==="object"&&t!==null){var n=jV(t);return q(q({},t),{},{title:n})}return{label:t==null?void 0:t.toString(),title:t==null?void 0:t.toString(),value:t}})}var zV=function(t){var n=t.prefixCls,r=t.className,o=t.disabled,i=t.checked,a=t.label,s=t.title,l=t.value,c=t.name,u=t.onChange,d=t.onFocus,f=t.onBlur,h=t.onKeyDown,m=t.onKeyUp,v=t.onMouseDown,g=function(b){o||u(b,l)};return p.createElement("label",{className:te(r,U({},"".concat(n,"-item-disabled"),o)),onMouseDown:v},p.createElement("input",{name:c,className:"".concat(n,"-item-input"),type:"radio",disabled:o,checked:i,onChange:g,onFocus:d,onBlur:f,onKeyDown:h,onKeyUp:m}),p.createElement("div",{className:"".concat(n,"-item-label"),title:s,"aria-selected":i},a))},_O=p.forwardRef(function(e,t){var n,r,o=e.prefixCls,i=o===void 0?"rc-segmented":o,a=e.direction,s=e.vertical,l=e.options,c=l===void 0?[]:l,u=e.disabled,d=e.defaultValue,f=e.value,h=e.name,m=e.onChange,v=e.className,g=v===void 0?"":v,y=e.motionName,b=y===void 0?"thumb-motion":y,C=Mt(e,LV),x=p.useRef(null),S=p.useMemo(function(){return mr(x,t)},[x,t]),w=p.useMemo(function(){return BV(c)},[c]),E=bn((n=w[0])===null||n===void 0?void 0:n.value,{value:f,defaultValue:d}),N=de(E,2),$=N[0],M=N[1],R=p.useState(!1),k=de(R,2),D=k[0],A=k[1],L=function(ae,ve){M(ve),m==null||m(ve)},T=Hn(C,["children"]),I=p.useState(!1),_=de(I,2),W=_[0],H=_[1],B=p.useState(!1),K=de(B,2),Y=K[0],V=K[1],G=function(){V(!0)},Q=function(){V(!1)},ce=function(){H(!1)},Z=function(ae){ae.key==="Tab"&&H(!0)},he=function(ae){var ve=w.findIndex(function(Ne){return Ne.value===$}),ne=w.length,se=(ve+ae+ne)%ne,pe=w[se];pe&&(M(pe.value),m==null||m(pe.value))},ye=function(ae){switch(ae.key){case"ArrowLeft":case"ArrowUp":he(-1);break;case"ArrowRight":case"ArrowDown":he(1);break}};return p.createElement("div",He({role:"radiogroup","aria-label":"segmented control",tabIndex:u?void 0:0},T,{className:te(i,(r={},U(r,"".concat(i,"-rtl"),a==="rtl"),U(r,"".concat(i,"-disabled"),u),U(r,"".concat(i,"-vertical"),s),r),g),ref:S}),p.createElement("div",{className:"".concat(i,"-group")},p.createElement(_V,{vertical:s,prefixCls:i,value:$,containerRef:x,motionName:"".concat(i,"-").concat(b),direction:a,getValueIndex:function(ae){return w.findIndex(function(ve){return ve.value===ae})},onMotionStart:function(){A(!0)},onMotionEnd:function(){A(!1)}}),w.map(function(fe){var ae;return p.createElement(zV,He({},fe,{name:h,key:fe.value,prefixCls:i,className:te(fe.className,"".concat(i,"-item"),(ae={},U(ae,"".concat(i,"-item-selected"),fe.value===$&&!D),U(ae,"".concat(i,"-item-focused"),Y&&W&&fe.value===$),ae)),checked:fe.value===$,onChange:L,onFocus:G,onBlur:Q,onKeyDown:ye,onKeyUp:Z,onMouseDown:ce,disabled:!!u||!!fe.disabled}))})))});process.env.NODE_ENV!=="production"&&(_O.displayName="Segmented");var FV=_O;function Qy(e,t){return{[`${e}, ${e}:hover, ${e}:focus`]:{color:t.colorTextDisabled,cursor:"not-allowed"}}}function Zy(e){return{backgroundColor:e.itemSelectedBg,boxShadow:e.boxShadowTertiary}}const HV=Object.assign({overflow:"hidden"},cl),VV=e=>{const{componentCls:t}=e,n=e.calc(e.controlHeight).sub(e.calc(e.trackPadding).mul(2)).equal(),r=e.calc(e.controlHeightLG).sub(e.calc(e.trackPadding).mul(2)).equal(),o=e.calc(e.controlHeightSM).sub(e.calc(e.trackPadding).mul(2)).equal();return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Bn(e)),{display:"inline-block",padding:e.trackPadding,color:e.itemColor,background:e.trackBg,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`}),Ka(e)),{[`${t}-group`]:{position:"relative",display:"flex",alignItems:"stretch",justifyItems:"flex-start",flexDirection:"row",width:"100%"},[`&${t}-rtl`]:{direction:"rtl"},[`&${t}-vertical`]:{[`${t}-group`]:{flexDirection:"column"},[`${t}-thumb`]:{width:"100%",height:0,padding:`0 ${oe(e.paddingXXS)}`}},[`&${t}-block`]:{display:"flex"},[`&${t}-block ${t}-item`]:{flex:1,minWidth:0},[`${t}-item`]:{position:"relative",textAlign:"center",cursor:"pointer",transition:`color ${e.motionDurationMid} ${e.motionEaseInOut}`,borderRadius:e.borderRadiusSM,transform:"translateZ(0)","&-selected":Object.assign(Object.assign({},Zy(e)),{color:e.itemSelectedColor}),"&-focused":Object.assign({},wl(e)),"&::after":{content:'""',position:"absolute",zIndex:-1,width:"100%",height:"100%",top:0,insetInlineStart:0,borderRadius:"inherit",opacity:0,transition:`opacity ${e.motionDurationMid}`,pointerEvents:"none"},[`&:hover:not(${t}-item-selected):not(${t}-item-disabled)`]:{color:e.itemHoverColor,"&::after":{opacity:1,backgroundColor:e.itemHoverBg}},[`&:active:not(${t}-item-selected):not(${t}-item-disabled)`]:{color:e.itemHoverColor,"&::after":{opacity:1,backgroundColor:e.itemActiveBg}},"&-label":Object.assign({minHeight:n,lineHeight:oe(n),padding:`0 ${oe(e.segmentedPaddingHorizontal)}`},HV),"&-icon + *":{marginInlineStart:e.calc(e.marginSM).div(2).equal()},"&-input":{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:0,opacity:0,pointerEvents:"none"}},[`${t}-thumb`]:Object.assign(Object.assign({},Zy(e)),{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:"100%",padding:`${oe(e.paddingXXS)} 0`,borderRadius:e.borderRadiusSM,transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOut}, height ${e.motionDurationSlow} ${e.motionEaseInOut}`,[`& ~ ${t}-item:not(${t}-item-selected):not(${t}-item-disabled)::after`]:{backgroundColor:"transparent"}}),[`&${t}-lg`]:{borderRadius:e.borderRadiusLG,[`${t}-item-label`]:{minHeight:r,lineHeight:oe(r),padding:`0 ${oe(e.segmentedPaddingHorizontal)}`,fontSize:e.fontSizeLG},[`${t}-item, ${t}-thumb`]:{borderRadius:e.borderRadius}},[`&${t}-sm`]:{borderRadius:e.borderRadiusSM,[`${t}-item-label`]:{minHeight:o,lineHeight:oe(o),padding:`0 ${oe(e.segmentedPaddingHorizontalSM)}`},[`${t}-item, ${t}-thumb`]:{borderRadius:e.borderRadiusXS}}}),Qy(`&-disabled ${t}-item`,e)),Qy(`${t}-item-disabled`,e)),{[`${t}-thumb-motion-appear-active`]:{transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOut}, width ${e.motionDurationSlow} ${e.motionEaseInOut}`,willChange:"transform, width"},[`&${t}-shape-round`]:{borderRadius:9999,[`${t}-item, ${t}-thumb`]:{borderRadius:9999}}})}},WV=e=>{const{colorTextLabel:t,colorText:n,colorFillSecondary:r,colorBgElevated:o,colorFill:i,lineWidthBold:a,colorBgLayout:s}=e;return{trackPadding:a,trackBg:s,itemColor:t,itemHoverColor:n,itemHoverBg:r,itemSelectedBg:o,itemActiveBg:i,itemSelectedColor:n}},UV=yn("Segmented",e=>{const{lineWidth:t,calc:n}=e,r=Xt(e,{segmentedPaddingHorizontal:n(e.controlPaddingHorizontal).sub(t).equal(),segmentedPaddingHorizontalSM:n(e.controlPaddingHorizontalSM).sub(t).equal()});return[VV(r)]},WV);var eC=function(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 qV(e){return typeof e=="object"&&!!(e!=null&&e.icon)}const KV=p.forwardRef((e,t)=>{const n=Tl(),{prefixCls:r,className:o,rootClassName:i,block:a,options:s=[],size:l="middle",style:c,vertical:u,shape:d="default",name:f=n}=e,h=eC(e,["prefixCls","className","rootClassName","block","options","size","style","vertical","shape","name"]),{getPrefixCls:m,direction:v,className:g,style:y}=Rr("segmented"),b=m("segmented",r),[C,x,S]=UV(b),w=Vr(l),E=p.useMemo(()=>s.map(M=>{if(qV(M)){const{icon:R,label:k}=M,D=eC(M,["icon","label"]);return Object.assign(Object.assign({},D),{label:p.createElement(p.Fragment,null,p.createElement("span",{className:`${b}-item-icon`},R),k&&p.createElement("span",null,k))})}return M}),[s,b]),N=te(o,i,g,{[`${b}-block`]:a,[`${b}-sm`]:w==="small",[`${b}-lg`]:w==="large",[`${b}-vertical`]:u,[`${b}-shape-${d}`]:d==="round"},x,S),$=Object.assign(Object.assign({},y),c);return C(p.createElement(FV,Object.assign({},h,{name:f,className:N,style:$,options:E,ref:t,prefixCls:b,direction:v,vertical:u})))}),LO=KV;process.env.NODE_ENV!=="production"&&(LO.displayName="Segmented");const jO=O.createContext({}),BO=O.createContext({}),zO=e=>{let{prefixCls:t,value:n,onChange:r}=e;const o=()=>{if(r&&n&&!n.cleared){const i=n.toHsb();i.a=0;const a=ir(i);a.cleared=!0,r(a)}};return O.createElement("div",{className:`${t}-clear`,onClick:o})},FO="hex",HO="rgb",VO="hsb";var GV={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"},XV=function(t,n){return p.createElement(Wn,He({},t,{ref:n,icon:GV}))},WO=p.forwardRef(XV);process.env.NODE_ENV!=="production"&&(WO.displayName="UpOutlined");function Zp(){return typeof BigInt=="function"}function UO(e){return!e&&e!==0&&!Number.isNaN(e)||!String(e).trim()}function Ui(e){var t=e.trim(),n=t.startsWith("-");n&&(t=t.slice(1)),t=t.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),t.startsWith(".")&&(t="0".concat(t));var r=t||"0",o=r.split("."),i=o[0]||"0",a=o[1]||"0";i==="0"&&a==="0"&&(n=!1);var s=n?"-":"";return{negative:n,negativeStr:s,trimStr:r,integerStr:i,decimalStr:a,fullStr:"".concat(s).concat(r)}}function Wg(e){var t=String(e);return!Number.isNaN(Number(t))&&t.includes("e")}function ji(e){var t=String(e);if(Wg(e)){var n=Number(t.slice(t.indexOf("e-")+2)),r=t.match(/\.(\d+)/);return r!=null&&r[1]&&(n+=r[1].length),n}return t.includes(".")&&Ug(t)?t.length-t.indexOf(".")-1:0}function Fd(e){var t=String(e);if(Wg(e)){if(e>Number.MAX_SAFE_INTEGER)return String(Zp()?BigInt(e).toString():Number.MAX_SAFE_INTEGER);if(e<Number.MIN_SAFE_INTEGER)return String(Zp()?BigInt(e).toString():Number.MIN_SAFE_INTEGER);t=e.toFixed(ji(t))}return Ui(t).fullStr}function Ug(e){return typeof e=="number"?!Number.isNaN(e):e?/^\s*-?\d+(\.\d+)?\s*$/.test(e)||/^\s*-?\d+\.\s*$/.test(e)||/^\s*-?\.\d+\s*$/.test(e):!1}var YV=function(){function e(t){if(Tn(this,e),U(this,"origin",""),U(this,"negative",void 0),U(this,"integer",void 0),U(this,"decimal",void 0),U(this,"decimalLen",void 0),U(this,"empty",void 0),U(this,"nan",void 0),UO(t)){this.empty=!0;return}if(this.origin=String(t),t==="-"||Number.isNaN(t)){this.nan=!0;return}var n=t;if(Wg(n)&&(n=Number(n)),n=typeof n=="string"?n:Fd(n),Ug(n)){var r=Ui(n);this.negative=r.negative;var o=r.trimStr.split(".");this.integer=BigInt(o[0]);var i=o[1]||"0";this.decimal=BigInt(i),this.decimalLen=i.length}else this.nan=!0}return An(e,[{key:"getMark",value:function(){return this.negative?"-":""}},{key:"getIntegerStr",value:function(){return this.integer.toString()}},{key:"getDecimalStr",value:function(){return this.decimal.toString().padStart(this.decimalLen,"0")}},{key:"alignDecimal",value:function(n){var r="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(n,"0"));return BigInt(r)}},{key:"negate",value:function(){var n=new e(this.toString());return n.negative=!n.negative,n}},{key:"cal",value:function(n,r,o){var i=Math.max(this.getDecimalStr().length,n.getDecimalStr().length),a=this.alignDecimal(i),s=n.alignDecimal(i),l=r(a,s).toString(),c=o(i),u=Ui(l),d=u.negativeStr,f=u.trimStr,h="".concat(d).concat(f.padStart(c+1,"0"));return new e("".concat(h.slice(0,-c),".").concat(h.slice(-c)))}},{key:"add",value:function(n){if(this.isInvalidate())return new e(n);var r=new e(n);return r.isInvalidate()?this:this.cal(r,function(o,i){return o+i},function(o){return o})}},{key:"multi",value:function(n){var r=new e(n);return this.isInvalidate()||r.isInvalidate()?new e(NaN):this.cal(r,function(o,i){return o*i},function(o){return o*2})}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return this.nan}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(n){return this.toString()===(n==null?void 0:n.toString())}},{key:"lessEquals",value:function(n){return this.add(n.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return n?this.isInvalidate()?"":Ui("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),e}(),JV=function(){function e(t){if(Tn(this,e),U(this,"origin",""),U(this,"number",void 0),U(this,"empty",void 0),UO(t)){this.empty=!0;return}this.origin=String(t),this.number=Number(t)}return An(e,[{key:"negate",value:function(){return new e(-this.toNumber())}},{key:"add",value:function(n){if(this.isInvalidate())return new e(n);var r=Number(n);if(Number.isNaN(r))return this;var o=this.number+r;if(o>Number.MAX_SAFE_INTEGER)return new e(Number.MAX_SAFE_INTEGER);if(o<Number.MIN_SAFE_INTEGER)return new e(Number.MIN_SAFE_INTEGER);var i=Math.max(ji(this.number),ji(r));return new e(o.toFixed(i))}},{key:"multi",value:function(n){var r=Number(n);if(this.isInvalidate()||Number.isNaN(r))return new e(NaN);var o=this.number*r;if(o>Number.MAX_SAFE_INTEGER)return new e(Number.MAX_SAFE_INTEGER);if(o<Number.MIN_SAFE_INTEGER)return new e(Number.MIN_SAFE_INTEGER);var i=Math.max(ji(this.number),ji(r));return new e(o.toFixed(i))}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return Number.isNaN(this.number)}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(n){return this.toNumber()===(n==null?void 0:n.toNumber())}},{key:"lessEquals",value:function(n){return this.add(n.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.number}},{key:"toString",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return n?this.isInvalidate()?"":Fd(this.number):this.origin}}]),e}();function Kr(e){return Zp()?new YV(e):new JV(e)}function Fc(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e==="")return"";var o=Ui(e),i=o.negativeStr,a=o.integerStr,s=o.decimalStr,l="".concat(t).concat(s),c="".concat(i).concat(a);if(n>=0){var u=Number(s[n]);if(u>=5&&!r){var d=Kr(e).add("".concat(i,"0.").concat("0".repeat(n)).concat(10-u));return Fc(d.toString(),t,n,r)}return n===0?c:"".concat(c).concat(t).concat(s.padEnd(n,"0").slice(0,n))}return l===".0"?c:"".concat(c).concat(l)}function QV(e){return!!(e.addonBefore||e.addonAfter)}function ZV(e){return!!(e.prefix||e.suffix||e.allowClear)}function tC(e,t,n){var r=t.cloneNode(!0),o=Object.create(e,{target:{value:r},currentTarget:{value:r}});return r.value=n,typeof t.selectionStart=="number"&&typeof t.selectionEnd=="number"&&(r.selectionStart=t.selectionStart,r.selectionEnd=t.selectionEnd),r.setSelectionRange=function(){t.setSelectionRange.apply(t,arguments)},o}function wu(e,t,n,r){if(n){var o=t;if(t.type==="click"){o=tC(t,e,""),n(o);return}if(e.type!=="file"&&r!==void 0){o=tC(t,e,r),n(o);return}n(o)}}function qg(e,t){if(e){e.focus(t);var n=t||{},r=n.cursor;if(r){var o=e.value.length;switch(r){case"start":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(o,o);break;default:e.setSelectionRange(0,o)}}}}var Kg=O.forwardRef(function(e,t){var n,r,o,i=e.inputElement,a=e.children,s=e.prefixCls,l=e.prefix,c=e.suffix,u=e.addonBefore,d=e.addonAfter,f=e.className,h=e.style,m=e.disabled,v=e.readOnly,g=e.focused,y=e.triggerFocus,b=e.allowClear,C=e.value,x=e.handleReset,S=e.hidden,w=e.classes,E=e.classNames,N=e.dataAttrs,$=e.styles,M=e.components,R=e.onClear,k=a??i,D=(M==null?void 0:M.affixWrapper)||"span",A=(M==null?void 0:M.groupWrapper)||"span",L=(M==null?void 0:M.wrapper)||"span",T=(M==null?void 0:M.groupAddon)||"span",I=O.useRef(null),_=function(se){var pe;(pe=I.current)!==null&&pe!==void 0&&pe.contains(se.target)&&(y==null||y())},W=ZV(e),H=O.cloneElement(k,{value:C,className:te((n=k.props)===null||n===void 0?void 0:n.className,!W&&(E==null?void 0:E.variant))||null}),B=O.useRef(null);if(O.useImperativeHandle(t,function(){return{nativeElement:B.current||I.current}}),W){var K=null;if(b){var Y=!m&&!v&&C,V="".concat(s,"-clear-icon"),G=ht(b)==="object"&&b!==null&&b!==void 0&&b.clearIcon?b.clearIcon:"✖";K=O.createElement("button",{type:"button",tabIndex:-1,onClick:function(se){x==null||x(se),R==null||R()},onMouseDown:function(se){return se.preventDefault()},className:te(V,U(U({},"".concat(V,"-hidden"),!Y),"".concat(V,"-has-suffix"),!!c))},G)}var Q="".concat(s,"-affix-wrapper"),ce=te(Q,U(U(U(U(U({},"".concat(s,"-disabled"),m),"".concat(Q,"-disabled"),m),"".concat(Q,"-focused"),g),"".concat(Q,"-readonly"),v),"".concat(Q,"-input-with-clear-btn"),c&&b&&C),w==null?void 0:w.affixWrapper,E==null?void 0:E.affixWrapper,E==null?void 0:E.variant),Z=(c||b)&&O.createElement("span",{className:te("".concat(s,"-suffix"),E==null?void 0:E.suffix),style:$==null?void 0:$.suffix},K,c);H=O.createElement(D,He({className:ce,style:$==null?void 0:$.affixWrapper,onClick:_},N==null?void 0:N.affixWrapper,{ref:I}),l&&O.createElement("span",{className:te("".concat(s,"-prefix"),E==null?void 0:E.prefix),style:$==null?void 0:$.prefix},l),H,Z)}if(QV(e)){var he="".concat(s,"-group"),ye="".concat(he,"-addon"),fe="".concat(he,"-wrapper"),ae=te("".concat(s,"-wrapper"),he,w==null?void 0:w.wrapper,E==null?void 0:E.wrapper),ve=te(fe,U({},"".concat(fe,"-disabled"),m),w==null?void 0:w.group,E==null?void 0:E.groupWrapper);H=O.createElement(A,{className:ve,ref:B},O.createElement(L,{className:ae},u&&O.createElement(T,{className:ye},u),H,d&&O.createElement(T,{className:ye},d)))}return O.cloneElement(H,{className:te((r=H.props)===null||r===void 0?void 0:r.className,f)||null,style:q(q({},(o=H.props)===null||o===void 0?void 0:o.style),h),hidden:S})}),e4=["show"];function qO(e,t){return p.useMemo(function(){var n={};t&&(n.show=ht(t)==="object"&&t.formatter?t.formatter:!!t),n=q(q({},n),e);var r=n,o=r.show,i=Mt(r,e4);return q(q({},i),{},{show:!!o,showFormatter:typeof o=="function"?o:void 0,strategy:i.strategy||function(a){return a.length}})},[e,t])}var t4=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","onKeyUp","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","count","type","classes","classNames","styles","onCompositionStart","onCompositionEnd"],n4=O.forwardRef(function(e,t){var n=e.autoComplete,r=e.onChange,o=e.onFocus,i=e.onBlur,a=e.onPressEnter,s=e.onKeyDown,l=e.onKeyUp,c=e.prefixCls,u=c===void 0?"rc-input":c,d=e.disabled,f=e.htmlSize,h=e.className,m=e.maxLength,v=e.suffix,g=e.showCount,y=e.count,b=e.type,C=b===void 0?"text":b,x=e.classes,S=e.classNames,w=e.styles,E=e.onCompositionStart,N=e.onCompositionEnd,$=Mt(e,t4),M=O.useState(!1),R=de(M,2),k=R[0],D=R[1],A=O.useRef(!1),L=O.useRef(!1),T=O.useRef(null),I=O.useRef(null),_=function(me){T.current&&qg(T.current,me)},W=bn(e.defaultValue,{value:e.value}),H=de(W,2),B=H[0],K=H[1],Y=B==null?"":String(B),V=O.useState(null),G=de(V,2),Q=G[0],ce=G[1],Z=qO(y,g),he=Z.max||m,ye=Z.strategy(Y),fe=!!he&&ye>he;O.useImperativeHandle(t,function(){var ue;return{focus:_,blur:function(){var Re;(Re=T.current)===null||Re===void 0||Re.blur()},setSelectionRange:function(Re,Te,xe){var Ve;(Ve=T.current)===null||Ve===void 0||Ve.setSelectionRange(Re,Te,xe)},select:function(){var Re;(Re=T.current)===null||Re===void 0||Re.select()},input:T.current,nativeElement:((ue=I.current)===null||ue===void 0?void 0:ue.nativeElement)||T.current}}),O.useEffect(function(){L.current&&(L.current=!1),D(function(ue){return ue&&d?!1:ue})},[d]);var ae=function(me,Re,Te){var xe=Re;if(!A.current&&Z.exceedFormatter&&Z.max&&Z.strategy(Re)>Z.max){if(xe=Z.exceedFormatter(Re,{max:Z.max}),Re!==xe){var Ve,qe;ce([((Ve=T.current)===null||Ve===void 0?void 0:Ve.selectionStart)||0,((qe=T.current)===null||qe===void 0?void 0:qe.selectionEnd)||0])}}else if(Te.source==="compositionEnd")return;K(xe),T.current&&wu(T.current,me,r,xe)};O.useEffect(function(){if(Q){var ue;(ue=T.current)===null||ue===void 0||ue.setSelectionRange.apply(ue,Le(Q))}},[Q]);var ve=function(me){ae(me,me.target.value,{source:"change"})},ne=function(me){A.current=!1,ae(me,me.currentTarget.value,{source:"compositionEnd"}),N==null||N(me)},se=function(me){a&&me.key==="Enter"&&!L.current&&(L.current=!0,a(me)),s==null||s(me)},pe=function(me){me.key==="Enter"&&(L.current=!1),l==null||l(me)},Ne=function(me){D(!0),o==null||o(me)},Me=function(me){L.current&&(L.current=!1),D(!1),i==null||i(me)},$e=function(me){K(""),_(),T.current&&wu(T.current,me,r)},Be=fe&&"".concat(u,"-out-of-range"),F=function(){var me=Hn(e,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return O.createElement("input",He({autoComplete:n},me,{onChange:ve,onFocus:Ne,onBlur:Me,onKeyDown:se,onKeyUp:pe,className:te(u,U({},"".concat(u,"-disabled"),d),S==null?void 0:S.input),style:w==null?void 0:w.input,ref:T,size:f,type:C,onCompositionStart:function(Te){A.current=!0,E==null||E(Te)},onCompositionEnd:ne}))},be=function(){var me=Number(he)>0;if(v||Z.show){var Re=Z.showFormatter?Z.showFormatter({value:Y,count:ye,maxLength:he}):"".concat(ye).concat(me?" / ".concat(he):"");return O.createElement(O.Fragment,null,Z.show&&O.createElement("span",{className:te("".concat(u,"-show-count-suffix"),U({},"".concat(u,"-show-count-has-suffix"),!!v),S==null?void 0:S.count),style:q({},w==null?void 0:w.count)},Re),v)}return null};return O.createElement(Kg,He({},$,{prefixCls:u,className:te(h,Be),handleReset:$e,value:Y,focused:k,triggerFocus:_,suffix:be(),disabled:d,classes:x,classNames:S,styles:w}),F())});function r4(e,t){return typeof Proxy<"u"&&e?new Proxy(e,{get:function(r,o){if(t[o])return t[o];var i=r[o];return typeof i=="function"?i.bind(r):i}}):e}function o4(e,t){var n=O.useRef(null);function r(){try{var i=e.selectionStart,a=e.selectionEnd,s=e.value,l=s.substring(0,i),c=s.substring(a);n.current={start:i,end:a,value:s,beforeTxt:l,afterTxt:c}}catch{}}function o(){if(e&&n.current&&t)try{var i=e.value,a=n.current,s=a.beforeTxt,l=a.afterTxt,c=a.start,u=i.length;if(i.startsWith(s))u=s.length;else if(i.endsWith(l))u=i.length-n.current.afterTxt.length;else{var d=s[c-1],f=i.indexOf(d,c-1);f!==-1&&(u=f+1)}e.setSelectionRange(u,u)}catch(h){Ot(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(h.message))}}return[r,o]}var i4=function(){var t=O.useState(!1),n=de(t,2),r=n[0],o=n[1];return cn(function(){o(xg())},[]),r},a4=200,s4=600;function l4(e){var t=e.prefixCls,n=e.upNode,r=e.downNode,o=e.upDisabled,i=e.downDisabled,a=e.onStep,s=p.useRef(),l=p.useRef([]),c=p.useRef();c.current=a;var u=function(){clearTimeout(s.current)},d=function(C,x){C.preventDefault(),u(),c.current(x);function S(){c.current(x),s.current=setTimeout(S,a4)}s.current=setTimeout(S,s4)};p.useEffect(function(){return function(){u(),l.current.forEach(function(b){return Ht.cancel(b)})}},[]);var f=i4();if(f)return null;var h="".concat(t,"-handler"),m=te(h,"".concat(h,"-up"),U({},"".concat(h,"-up-disabled"),o)),v=te(h,"".concat(h,"-down"),U({},"".concat(h,"-down-disabled"),i)),g=function(){return l.current.push(Ht(u))},y={unselectable:"on",role:"button",onMouseUp:g,onMouseLeave:g};return p.createElement("div",{className:"".concat(h,"-wrap")},p.createElement("span",He({},y,{onMouseDown:function(C){d(C,!0)},"aria-label":"Increase Value","aria-disabled":o,className:m}),n||p.createElement("span",{unselectable:"on",className:"".concat(t,"-handler-up-inner")})),p.createElement("span",He({},y,{onMouseDown:function(C){d(C,!1)},"aria-label":"Decrease Value","aria-disabled":i,className:v}),r||p.createElement("span",{unselectable:"on",className:"".concat(t,"-handler-down-inner")})))}function nC(e){var t=typeof e=="number"?Fd(e):Ui(e).fullStr,n=t.includes(".");return n?Ui(t.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:e+"0"}const c4=function(){var e=O.useRef(0),t=function(){Ht.cancel(e.current)};return O.useEffect(function(){return t},[]),function(n){t(),e.current=Ht(function(){n()})}};var u4=["prefixCls","className","style","min","max","step","defaultValue","value","disabled","readOnly","upHandler","downHandler","keyboard","changeOnWheel","controls","classNames","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep","changeOnBlur","domRef"],d4=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","className","classNames"],rC=function(t,n){return t||n.isEmpty()?n.toString():n.toNumber()},oC=function(t){var n=Kr(t);return n.isInvalidate()?null:n},f4=p.forwardRef(function(e,t){var n=e.prefixCls,r=e.className,o=e.style,i=e.min,a=e.max,s=e.step,l=s===void 0?1:s,c=e.defaultValue,u=e.value,d=e.disabled,f=e.readOnly,h=e.upHandler,m=e.downHandler,v=e.keyboard,g=e.changeOnWheel,y=g===void 0?!1:g,b=e.controls,C=b===void 0?!0:b;e.classNames;var x=e.stringMode,S=e.parser,w=e.formatter,E=e.precision,N=e.decimalSeparator,$=e.onChange,M=e.onInput,R=e.onPressEnter,k=e.onStep,D=e.changeOnBlur,A=D===void 0?!0:D,L=e.domRef,T=Mt(e,u4),I="".concat(n,"-input"),_=p.useRef(null),W=p.useState(!1),H=de(W,2),B=H[0],K=H[1],Y=p.useRef(!1),V=p.useRef(!1),G=p.useRef(!1),Q=p.useState(function(){return Kr(u??c)}),ce=de(Q,2),Z=ce[0],he=ce[1];function ye(tt){u===void 0&&he(tt)}var fe=p.useCallback(function(tt,Ue){if(!Ue)return E>=0?E:Math.max(ji(tt),ji(l))},[E,l]),ae=p.useCallback(function(tt){var Ue=String(tt);if(S)return S(Ue);var ft=Ue;return N&&(ft=ft.replace(N,".")),ft.replace(/[^\w.-]+/g,"")},[S,N]),ve=p.useRef(""),ne=p.useCallback(function(tt,Ue){if(w)return w(tt,{userTyping:Ue,input:String(ve.current)});var ft=typeof tt=="number"?Fd(tt):tt;if(!Ue){var dt=fe(ft,Ue);if(Ug(ft)&&(N||dt>=0)){var st=N||".";ft=Fc(ft,st,dt)}}return ft},[w,fe,N]),se=p.useState(function(){var tt=c??u;return Z.isInvalidate()&&["string","number"].includes(ht(tt))?Number.isNaN(tt)?"":tt:ne(Z.toString(),!1)}),pe=de(se,2),Ne=pe[0],Me=pe[1];ve.current=Ne;function $e(tt,Ue){Me(ne(tt.isInvalidate()?tt.toString(!1):tt.toString(!Ue),Ue))}var Be=p.useMemo(function(){return oC(a)},[a,E]),F=p.useMemo(function(){return oC(i)},[i,E]),be=p.useMemo(function(){return!Be||!Z||Z.isInvalidate()?!1:Be.lessEquals(Z)},[Be,Z]),ue=p.useMemo(function(){return!F||!Z||Z.isInvalidate()?!1:Z.lessEquals(F)},[F,Z]),me=o4(_.current,B),Re=de(me,2),Te=Re[0],xe=Re[1],Ve=function(Ue){return Be&&!Ue.lessEquals(Be)?Be:F&&!F.lessEquals(Ue)?F:null},qe=function(Ue){return!Ve(Ue)},Pe=function(Ue,ft){var dt=Ue,st=qe(dt)||dt.isEmpty();if(!dt.isEmpty()&&!ft&&(dt=Ve(dt)||dt,st=!0),!f&&!d&&st){var Ze=dt.toString(),Xe=fe(Ze,ft);return Xe>=0&&(dt=Kr(Fc(Ze,".",Xe)),qe(dt)||(dt=Kr(Fc(Ze,".",Xe,!0)))),dt.equals(Z)||(ye(dt),$==null||$(dt.isEmpty()?null:rC(x,dt)),u===void 0&&$e(dt,ft)),dt}return Z},Ke=c4(),Je=function tt(Ue){if(Te(),ve.current=Ue,Me(Ue),!V.current){var ft=ae(Ue),dt=Kr(ft);dt.isNaN()||Pe(dt,!0)}M==null||M(Ue),Ke(function(){var st=Ue;S||(st=Ue.replace(/。/g,".")),st!==Ue&&tt(st)})},De=function(){V.current=!0},ze=function(){V.current=!1,Je(_.current.value)},_e=function(Ue){Je(Ue.target.value)},We=function(Ue){var ft;if(!(Ue&&be||!Ue&&ue)){Y.current=!1;var dt=Kr(G.current?nC(l):l);Ue||(dt=dt.negate());var st=(Z||Kr(0)).add(dt.toString()),Ze=Pe(st,!1);k==null||k(rC(x,Ze),{offset:G.current?nC(l):l,type:Ue?"up":"down"}),(ft=_.current)===null||ft===void 0||ft.focus()}},rt=function(Ue){var ft=Kr(ae(Ne)),dt;ft.isNaN()?dt=Pe(Z,Ue):dt=Pe(ft,Ue),u!==void 0?$e(Z,!1):dt.isNaN()||$e(dt,!1)},gt=function(){Y.current=!0},Lt=function(Ue){var ft=Ue.key,dt=Ue.shiftKey;Y.current=!0,G.current=dt,ft==="Enter"&&(V.current||(Y.current=!1),rt(!1),R==null||R(Ue)),v!==!1&&!V.current&&["Up","ArrowUp","Down","ArrowDown"].includes(ft)&&(We(ft==="Up"||ft==="ArrowUp"),Ue.preventDefault())},Tt=function(){Y.current=!1,G.current=!1};p.useEffect(function(){if(y&&B){var tt=function(dt){We(dt.deltaY<0),dt.preventDefault()},Ue=_.current;if(Ue)return Ue.addEventListener("wheel",tt,{passive:!1}),function(){return Ue.removeEventListener("wheel",tt)}}});var Zt=function(){A&&rt(!1),K(!1),Y.current=!1};return _s(function(){Z.isInvalidate()||$e(Z,!1)},[E,w]),_s(function(){var tt=Kr(u);he(tt);var Ue=Kr(ae(Ne));(!tt.equals(Ue)||!Y.current||w)&&$e(tt,Y.current)},[u]),_s(function(){w&&xe()},[Ne]),p.createElement("div",{ref:L,className:te(n,r,U(U(U(U(U({},"".concat(n,"-focused"),B),"".concat(n,"-disabled"),d),"".concat(n,"-readonly"),f),"".concat(n,"-not-a-number"),Z.isNaN()),"".concat(n,"-out-of-range"),!Z.isInvalidate()&&!qe(Z))),style:o,onFocus:function(){K(!0)},onBlur:Zt,onKeyDown:Lt,onKeyUp:Tt,onCompositionStart:De,onCompositionEnd:ze,onBeforeInput:gt},C&&p.createElement(l4,{prefixCls:n,upNode:h,downNode:m,upDisabled:be,downDisabled:ue,onStep:We}),p.createElement("div",{className:"".concat(I,"-wrap")},p.createElement("input",He({autoComplete:"off",role:"spinbutton","aria-valuemin":i,"aria-valuemax":a,"aria-valuenow":Z.isInvalidate()?null:Z.toString(),step:l},T,{ref:mr(_,t),className:I,value:Ne,onChange:_e,disabled:d,readOnly:f}))))}),KO=p.forwardRef(function(e,t){var n=e.disabled,r=e.style,o=e.prefixCls,i=o===void 0?"rc-input-number":o,a=e.value,s=e.prefix,l=e.suffix,c=e.addonBefore,u=e.addonAfter,d=e.className,f=e.classNames,h=Mt(e,d4),m=p.useRef(null),v=p.useRef(null),g=p.useRef(null),y=function(C){g.current&&qg(g.current,C)};return p.useImperativeHandle(t,function(){return r4(g.current,{focus:y,nativeElement:m.current.nativeElement||v.current})}),p.createElement(Kg,{className:d,triggerFocus:y,prefixCls:i,value:a,disabled:n,style:r,prefix:s,suffix:l,addonAfter:u,addonBefore:c,classNames:f,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"},ref:m},p.createElement(f4,He({prefixCls:i,disabled:n,ref:g,domRef:v,className:f==null?void 0:f.input},h)))});process.env.NODE_ENV!=="production"&&(KO.displayName="InputNumber");const h4=e=>{var t;const n=(t=e.handleVisible)!==null&&t!==void 0?t:"auto",r=e.controlHeightSM-e.lineWidth*2;return Object.assign(Object.assign({},Fl(e)),{controlWidth:90,handleWidth:r,handleFontSize:e.fontSize/2,handleVisible:n,handleActiveBg:e.colorFillAlter,handleBg:e.colorBgContainer,filledHandleBg:new Qt(e.colorFillSecondary).onBackground(e.colorBgContainer).toHexString(),handleHoverColor:e.colorPrimary,handleBorderColor:e.colorBorder,handleOpacity:n===!0?1:0,handleVisibleWidth:n===!0?r:0})},iC=(e,t)=>{let{componentCls:n,borderRadiusSM:r,borderRadiusLG:o}=e;const i=t==="lg"?o:r;return{[`&-${t}`]:{[`${n}-handler-wrap`]:{borderStartEndRadius:i,borderEndEndRadius:i},[`${n}-handler-up`]:{borderStartEndRadius:i},[`${n}-handler-down`]:{borderEndEndRadius:i}}}},p4=e=>{const{componentCls:t,lineWidth:n,lineType:r,borderRadius:o,inputFontSizeSM:i,inputFontSizeLG:a,controlHeightLG:s,controlHeightSM:l,colorError:c,paddingInlineSM:u,paddingBlockSM:d,paddingBlockLG:f,paddingInlineLG:h,colorTextDescription:m,motionDurationMid:v,handleHoverColor:g,handleOpacity:y,paddingInline:b,paddingBlock:C,handleBg:x,handleActiveBg:S,colorTextDisabled:w,borderRadiusSM:E,borderRadiusLG:N,controlWidth:$,handleBorderColor:M,filledHandleBg:R,lineHeightLG:k,calc:D}=e;return[{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Bn(e)),zd(e)),{display:"inline-block",width:$,margin:0,padding:0,borderRadius:o}),SO(e,{[`${t}-handler-wrap`]:{background:x,[`${t}-handler-down`]:{borderBlockStart:`${oe(n)} ${r} ${M}`}}})),OO(e,{[`${t}-handler-wrap`]:{background:R,[`${t}-handler-down`]:{borderBlockStart:`${oe(n)} ${r} ${M}`}},"&:focus-within":{[`${t}-handler-wrap`]:{background:x}}})),MO(e,{[`${t}-handler-wrap`]:{background:x,[`${t}-handler-down`]:{borderBlockStart:`${oe(n)} ${r} ${M}`}}})),wO(e)),{"&-rtl":{direction:"rtl",[`${t}-input`]:{direction:"rtl"}},"&-lg":{padding:0,fontSize:a,lineHeight:k,borderRadius:N,[`input${t}-input`]:{height:D(s).sub(D(n).mul(2)).equal(),padding:`${oe(f)} ${oe(h)}`}},"&-sm":{padding:0,fontSize:i,borderRadius:E,[`input${t}-input`]:{height:D(l).sub(D(n).mul(2)).equal(),padding:`${oe(d)} ${oe(u)}`}},"&-out-of-range":{[`${t}-input-wrap`]:{input:{color:c}}},"&-group":Object.assign(Object.assign(Object.assign({},Bn(e)),AO(e)),{"&-wrapper":Object.assign(Object.assign(Object.assign({display:"inline-block",textAlign:"start",verticalAlign:"top",[`${t}-affix-wrapper`]:{width:"100%"},"&-lg":{[`${t}-group-addon`]:{borderRadius:N,fontSize:e.fontSizeLG}},"&-sm":{[`${t}-group-addon`]:{borderRadius:E}}},xO(e)),$O(e)),{[`&:not(${t}-compact-first-item):not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}, ${t}-group-addon`]:{borderRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-first-item`]:{[`${t}, ${t}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-last-item`]:{[`${t}, ${t}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}}})}),[`&-disabled ${t}-input`]:{cursor:"not-allowed"},[t]:{"&-input":Object.assign(Object.assign(Object.assign(Object.assign({},Bn(e)),{width:"100%",padding:`${oe(C)} ${oe(b)}`,textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:o,outline:0,transition:`all ${v} linear`,appearance:"textfield",fontSize:"inherit"}),RO(e.colorTextPlaceholder)),{'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,appearance:"none"}})},[`&:hover ${t}-handler-wrap, &-focused ${t}-handler-wrap`]:{width:e.handleWidth,opacity:1}})},{[t]:Object.assign(Object.assign(Object.assign({[`${t}-handler-wrap`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:e.handleVisibleWidth,opacity:y,height:"100%",borderStartStartRadius:0,borderStartEndRadius:o,borderEndEndRadius:o,borderEndStartRadius:0,display:"flex",flexDirection:"column",alignItems:"stretch",transition:`all ${v}`,overflow:"hidden",[`${t}-handler`]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",[`
410
+ ${t}-handler-up-inner,
411
+ ${t}-handler-down-inner
412
+ `]:{marginInlineEnd:0,fontSize:e.handleFontSize}}},[`${t}-handler`]:{height:"50%",overflow:"hidden",color:m,fontWeight:"bold",lineHeight:0,textAlign:"center",cursor:"pointer",borderInlineStart:`${oe(n)} ${r} ${M}`,transition:`all ${v} linear`,"&:active":{background:S},"&:hover":{height:"60%",[`
413
+ ${t}-handler-up-inner,
414
+ ${t}-handler-down-inner
415
+ `]:{color:g}},"&-up-inner, &-down-inner":Object.assign(Object.assign({},oa()),{color:m,transition:`all ${v} linear`,userSelect:"none"})},[`${t}-handler-up`]:{borderStartEndRadius:o},[`${t}-handler-down`]:{borderEndEndRadius:o}},iC(e,"lg")),iC(e,"sm")),{"&-disabled, &-readonly":{[`${t}-handler-wrap`]:{display:"none"},[`${t}-input`]:{color:"inherit"}},[`
416
+ ${t}-handler-up-disabled,
417
+ ${t}-handler-down-disabled
418
+ `]:{cursor:"not-allowed"},[`
419
+ ${t}-handler-up-disabled:hover &-handler-up-inner,
420
+ ${t}-handler-down-disabled:hover &-handler-down-inner
421
+ `]:{color:w}})}]},m4=e=>{const{componentCls:t,paddingBlock:n,paddingInline:r,inputAffixPadding:o,controlWidth:i,borderRadiusLG:a,borderRadiusSM:s,paddingInlineLG:l,paddingInlineSM:c,paddingBlockLG:u,paddingBlockSM:d,motionDurationMid:f}=e;return{[`${t}-affix-wrapper`]:Object.assign(Object.assign({[`input${t}-input`]:{padding:`${oe(n)} 0`}},zd(e)),{position:"relative",display:"inline-flex",alignItems:"center",width:i,padding:0,paddingInlineStart:r,"&-lg":{borderRadius:a,paddingInlineStart:l,[`input${t}-input`]:{padding:`${oe(u)} 0`}},"&-sm":{borderRadius:s,paddingInlineStart:c,[`input${t}-input`]:{padding:`${oe(d)} 0`}},[`&:not(${t}-disabled):hover`]:{zIndex:1},"&-focused, &:focus":{zIndex:1},[`&-disabled > ${t}-disabled`]:{background:"transparent"},[`> div${t}`]:{width:"100%",border:"none",outline:"none",[`&${t}-focused`]:{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${t}-handler-wrap`]:{zIndex:2},[t]:{position:"static",color:"inherit","&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center",pointerEvents:"none"},"&-prefix":{marginInlineEnd:o},"&-suffix":{insetBlockStart:0,insetInlineEnd:0,height:"100%",marginInlineEnd:r,marginInlineStart:o,transition:`margin ${f}`}},[`&:hover ${t}-handler-wrap, &-focused ${t}-handler-wrap`]:{width:e.handleWidth,opacity:1},[`&:not(${t}-affix-wrapper-without-controls):hover ${t}-suffix`]:{marginInlineEnd:e.calc(e.handleWidth).add(r).equal()}})}},g4=yn("InputNumber",e=>{const t=Xt(e,zl(e));return[p4(t),m4(t),Rl(t)]},h4,{unitless:{handleOpacity:!0}});var v4=function(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};const GO=p.forwardRef((e,t)=>{if(process.env.NODE_ENV!=="production"){const Z=fn("InputNumber");Z.deprecated(!("bordered"in e),"bordered","variant"),Z(!(e.type==="number"&&e.changeOnWheel),"usage","When `type=number` is used together with `changeOnWheel`, changeOnWheel may not work properly. Please delete `type=number` if it is not necessary.")}const{getPrefixCls:n,direction:r}=p.useContext(_t),o=p.useRef(null);p.useImperativeHandle(t,()=>o.current);const{className:i,rootClassName:a,size:s,disabled:l,prefixCls:c,addonBefore:u,addonAfter:d,prefix:f,suffix:h,bordered:m,readOnly:v,status:g,controls:y,variant:b}=e,C=v4(e,["className","rootClassName","size","disabled","prefixCls","addonBefore","addonAfter","prefix","suffix","bordered","readOnly","status","controls","variant"]),x=n("input-number",c),S=oo(x),[w,E,N]=g4(x,S),{compactSize:$,compactItemClassnames:M}=Ei(x,r);let R=p.createElement(WO,{className:`${x}-handler-up-inner`}),k=p.createElement(Ig,{className:`${x}-handler-down-inner`});const D=typeof y=="boolean"?y:void 0;typeof y=="object"&&(R=typeof y.upIcon>"u"?R:p.createElement("span",{className:`${x}-handler-up-inner`},y.upIcon),k=typeof y.downIcon>"u"?k:p.createElement("span",{className:`${x}-handler-down-inner`},y.downIcon));const{hasFeedback:A,status:L,isFormItemInput:T,feedbackIcon:I}=p.useContext(Mr),_=_l(L,g),W=Vr(Z=>{var he;return(he=s??$)!==null&&he!==void 0?he:Z}),H=p.useContext(Fr),B=l??H,[K,Y]=kd("inputNumber",b,m),V=A&&p.createElement(p.Fragment,null,I),G=te({[`${x}-lg`]:W==="large",[`${x}-sm`]:W==="small",[`${x}-rtl`]:r==="rtl",[`${x}-in-form-item`]:T},E),Q=`${x}-group`,ce=p.createElement(KO,Object.assign({ref:o,disabled:B,className:te(N,S,i,a,M),upHandler:R,downHandler:k,prefixCls:x,readOnly:v,controls:D,prefix:f,suffix:V||h,addonBefore:u&&p.createElement(vi,{form:!0,space:!0},u),addonAfter:d&&p.createElement(vi,{form:!0,space:!0},d),classNames:{input:G,variant:te({[`${x}-${K}`]:Y},ea(x,_,A)),affixWrapper:te({[`${x}-affix-wrapper-sm`]:W==="small",[`${x}-affix-wrapper-lg`]:W==="large",[`${x}-affix-wrapper-rtl`]:r==="rtl",[`${x}-affix-wrapper-without-controls`]:y===!1||B},E),wrapper:te({[`${Q}-rtl`]:r==="rtl"},E),groupWrapper:te({[`${x}-group-wrapper-sm`]:W==="small",[`${x}-group-wrapper-lg`]:W==="large",[`${x}-group-wrapper-rtl`]:r==="rtl",[`${x}-group-wrapper-${K}`]:Y},ea(`${x}-group-wrapper`,_,A),E)}},C));return w(ce)}),Gg=GO,b4=e=>p.createElement(xo,{theme:{components:{InputNumber:{handleVisible:!0}}}},p.createElement(GO,Object.assign({},e)));process.env.NODE_ENV!=="production"&&(Gg.displayName="InputNumber");Gg._InternalPanelDoNotUseOrYouWillBeFired=b4;const qi=e=>{let{prefixCls:t,min:n=0,max:r=100,value:o,onChange:i,className:a,formatter:s}=e;const l=`${t}-steppers`,[c,u]=O.useState(o);return O.useEffect(()=>{Number.isNaN(o)||u(o)},[o]),O.createElement(Gg,{className:te(l,a),min:n,max:r,value:c,formatter:s,size:"small",onChange:d=>{o||u(d||0),i==null||i(d)}})},y4=e=>{let{prefixCls:t,value:n,onChange:r}=e;const o=`${t}-alpha-input`,[i,a]=O.useState(ir(n||"#000"));O.useEffect(()=>{n&&a(n)},[n]);const s=l=>{const c=i.toHsb();c.a=(l||0)/100;const u=ir(c);n||a(u),r==null||r(u)};return O.createElement(qi,{value:gg(i),prefixCls:t,formatter:l=>`${l}%`,className:o,onChange:s})},XO=e=>{let t;return typeof e=="object"&&(e!=null&&e.clearIcon)?t=e:e&&(t={clearIcon:O.createElement(yd,null)}),t};function YO(e,t){const n=O.useRef([]),r=()=>{n.current.push(setTimeout(()=>{var o,i,a,s;!((o=e.current)===null||o===void 0)&&o.input&&((i=e.current)===null||i===void 0?void 0:i.input.getAttribute("type"))==="password"&&(!((a=e.current)===null||a===void 0)&&a.input.hasAttribute("value"))&&((s=e.current)===null||s===void 0||s.input.removeAttribute("value"))}))};return O.useEffect(()=>(t&&r(),()=>n.current.forEach(o=>{o&&clearTimeout(o)})),[]),r}function C4(e){return!!(e.prefix||e.suffix||e.allowClear||e.showCount)}var S4=function(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};const ns=O.forwardRef((e,t)=>{const{prefixCls:n,bordered:r=!0,status:o,size:i,disabled:a,onBlur:s,onFocus:l,suffix:c,allowClear:u,addonAfter:d,addonBefore:f,className:h,style:m,styles:v,rootClassName:g,onChange:y,classNames:b,variant:C}=e,x=S4(e,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames","variant"]);if(process.env.NODE_ENV!=="production"){const{deprecated:$e}=fn("Input");$e(!("bordered"in e),"bordered","variant")}const{getPrefixCls:S,direction:w,allowClear:E,autoComplete:N,className:$,style:M,classNames:R,styles:k}=Rr("input"),D=S("input",n),A=O.useRef(null),L=oo(D),[T,I,_]=PO(D,g),[W]=kO(D,L),{compactSize:H,compactItemClassnames:B}=Ei(D,w),K=Vr($e=>{var Be;return(Be=i??H)!==null&&Be!==void 0?Be:$e}),Y=O.useContext(Fr),V=a??Y,{status:G,hasFeedback:Q,feedbackIcon:ce}=O.useContext(Mr),Z=_l(G,o),he=C4(e)||!!Q,ye=O.useRef(he);if(process.env.NODE_ENV!=="production"){const $e=fn("Input");O.useEffect(()=>{var Be;he&&!ye.current&&process.env.NODE_ENV!=="production"&&$e(document.activeElement===((Be=A.current)===null||Be===void 0?void 0:Be.input),"usage","When Input is focused, dynamic add or remove prefix / suffix will make it lose focus caused by dom structure change. Read more: https://ant.design/components/input/#FAQ"),ye.current=he},[he])}const fe=YO(A,!0),ae=$e=>{fe(),s==null||s($e)},ve=$e=>{fe(),l==null||l($e)},ne=$e=>{fe(),y==null||y($e)},se=(Q||c)&&O.createElement(O.Fragment,null,c,Q&&ce),pe=XO(u??E),[Ne,Me]=kd("input",C,r);return T(W(O.createElement(n4,Object.assign({ref:mr(t,A),prefixCls:D,autoComplete:N},x,{disabled:V,onBlur:ae,onFocus:ve,style:Object.assign(Object.assign({},M),m),styles:Object.assign(Object.assign({},k),v),suffix:se,allowClear:pe,className:te(h,g,_,L,B,$),onChange:ne,addonBefore:f&&O.createElement(vi,{form:!0,space:!0},f),addonAfter:d&&O.createElement(vi,{form:!0,space:!0},d),classNames:Object.assign(Object.assign(Object.assign({},b),R),{input:te({[`${D}-sm`]:K==="small",[`${D}-lg`]:K==="large",[`${D}-rtl`]:w==="rtl"},b==null?void 0:b.input,R.input,I),variant:te({[`${D}-${Ne}`]:Me},ea(D,Z)),affixWrapper:te({[`${D}-affix-wrapper-sm`]:K==="small",[`${D}-affix-wrapper-lg`]:K==="large",[`${D}-affix-wrapper-rtl`]:w==="rtl"},I),wrapper:te({[`${D}-group-rtl`]:w==="rtl"},I),groupWrapper:te({[`${D}-group-wrapper-sm`]:K==="small",[`${D}-group-wrapper-lg`]:K==="large",[`${D}-group-wrapper-rtl`]:w==="rtl",[`${D}-group-wrapper-${Ne}`]:Me},ea(`${D}-group-wrapper`,Z,Q),I)})}))))});process.env.NODE_ENV!=="production"&&(ns.displayName="Input");const x4=/(^#[\da-f]{6}$)|(^#[\da-f]{8}$)/i,w4=e=>x4.test(`#${e}`),E4=e=>{let{prefixCls:t,value:n,onChange:r}=e;const o=`${t}-hex-input`,[i,a]=O.useState(()=>n?Ns(n.toHexString()):void 0);O.useEffect(()=>{n&&a(Ns(n.toHexString()))},[n]);const s=l=>{const c=l.target.value;a(Ns(c)),w4(Ns(c,!0))&&(r==null||r(ir(c)))};return O.createElement(ns,{className:o,value:i,prefix:"#",onChange:s,size:"small"})},O4=e=>{let{prefixCls:t,value:n,onChange:r}=e;const o=`${t}-hsb-input`,[i,a]=O.useState(ir(n||"#000"));O.useEffect(()=>{n&&a(n)},[n]);const s=(l,c)=>{const u=i.toHsb();u[c]=c==="h"?l:(l||0)/100;const d=ir(u);n||a(d),r==null||r(d)};return O.createElement("div",{className:o},O.createElement(qi,{max:360,min:0,value:Number(i.toHsb().h),prefixCls:t,className:o,formatter:l=>Lc(l||0).toString(),onChange:l=>s(Number(l),"h")}),O.createElement(qi,{max:100,min:0,value:Number(i.toHsb().s)*100,prefixCls:t,className:o,formatter:l=>`${Lc(l||0)}%`,onChange:l=>s(Number(l),"s")}),O.createElement(qi,{max:100,min:0,value:Number(i.toHsb().b)*100,prefixCls:t,className:o,formatter:l=>`${Lc(l||0)}%`,onChange:l=>s(Number(l),"b")}))},$4=e=>{let{prefixCls:t,value:n,onChange:r}=e;const o=`${t}-rgb-input`,[i,a]=O.useState(ir(n||"#000"));O.useEffect(()=>{n&&a(n)},[n]);const s=(l,c)=>{const u=i.toRgb();u[c]=l||0;const d=ir(u);n||a(d),r==null||r(d)};return O.createElement("div",{className:o},O.createElement(qi,{max:255,min:0,value:Number(i.toRgb().r),prefixCls:t,className:o,onChange:l=>s(Number(l),"r")}),O.createElement(qi,{max:255,min:0,value:Number(i.toRgb().g),prefixCls:t,className:o,onChange:l=>s(Number(l),"g")}),O.createElement(qi,{max:255,min:0,value:Number(i.toRgb().b),prefixCls:t,className:o,onChange:l=>s(Number(l),"b")}))},N4=[FO,VO,HO].map(e=>({value:e,label:e.toUpperCase()})),M4=e=>{const{prefixCls:t,format:n,value:r,disabledAlpha:o,onFormatChange:i,onChange:a,disabledFormat:s}=e,[l,c]=bn(FO,{value:n,onChange:i}),u=`${t}-input`,d=h=>{c(h)},f=O.useMemo(()=>{const h={value:r,prefixCls:t,onChange:a};switch(l){case VO:return O.createElement(O4,Object.assign({},h));case HO:return O.createElement($4,Object.assign({},h));default:return O.createElement(E4,Object.assign({},h))}},[l,t,r,a]);return O.createElement("div",{className:`${u}-container`},!s&&O.createElement(jo,{value:l,variant:"borderless",getPopupContainer:h=>h,popupMatchSelectWidth:68,placement:"bottomRight",onChange:d,className:`${t}-format-select`,size:"small",options:N4}),O.createElement("div",{className:u},f),!o&&O.createElement(y4,{prefixCls:t,value:r,onChange:a}))};function em(e,t,n){return(e-t)/(n-t)}function Xg(e,t,n,r){var o=em(t,n,r),i={};switch(e){case"rtl":i.right="".concat(o*100,"%"),i.transform="translateX(50%)";break;case"btt":i.bottom="".concat(o*100,"%"),i.transform="translateY(50%)";break;case"ttb":i.top="".concat(o*100,"%"),i.transform="translateY(-50%)";break;default:i.left="".concat(o*100,"%"),i.transform="translateX(-50%)";break}return i}function Ai(e,t){return Array.isArray(e)?e[t]:e}var sa=p.createContext({min:0,max:0,direction:"ltr",step:1,includedStart:0,includedEnd:0,tabIndex:0,keyboard:!0,styles:{},classNames:{}}),JO=p.createContext({}),R4=["prefixCls","value","valueIndex","onStartMove","onDelete","style","render","dragging","draggingDelete","onOffsetChange","onChangeComplete","onFocus","onMouseEnter"],tm=p.forwardRef(function(e,t){var n=e.prefixCls,r=e.value,o=e.valueIndex,i=e.onStartMove,a=e.onDelete,s=e.style,l=e.render,c=e.dragging,u=e.draggingDelete,d=e.onOffsetChange,f=e.onChangeComplete,h=e.onFocus,m=e.onMouseEnter,v=Mt(e,R4),g=p.useContext(sa),y=g.min,b=g.max,C=g.direction,x=g.disabled,S=g.keyboard,w=g.range,E=g.tabIndex,N=g.ariaLabelForHandle,$=g.ariaLabelledByForHandle,M=g.ariaRequired,R=g.ariaValueTextFormatterForHandle,k=g.styles,D=g.classNames,A="".concat(n,"-handle"),L=function(G){x||i(G,o)},T=function(G){h==null||h(G,o)},I=function(G){m(G,o)},_=function(G){if(!x&&S){var Q=null;switch(G.which||G.keyCode){case at.LEFT:Q=C==="ltr"||C==="btt"?-1:1;break;case at.RIGHT:Q=C==="ltr"||C==="btt"?1:-1;break;case at.UP:Q=C!=="ttb"?1:-1;break;case at.DOWN:Q=C!=="ttb"?-1:1;break;case at.HOME:Q="min";break;case at.END:Q="max";break;case at.PAGE_UP:Q=2;break;case at.PAGE_DOWN:Q=-2;break;case at.BACKSPACE:case at.DELETE:a(o);break}Q!==null&&(G.preventDefault(),d(Q,o))}},W=function(G){switch(G.which||G.keyCode){case at.LEFT:case at.RIGHT:case at.UP:case at.DOWN:case at.HOME:case at.END:case at.PAGE_UP:case at.PAGE_DOWN:f==null||f();break}},H=Xg(C,r,y,b),B={};if(o!==null){var K;B={tabIndex:x?null:Ai(E,o),role:"slider","aria-valuemin":y,"aria-valuemax":b,"aria-valuenow":r,"aria-disabled":x,"aria-label":Ai(N,o),"aria-labelledby":Ai($,o),"aria-required":Ai(M,o),"aria-valuetext":(K=Ai(R,o))===null||K===void 0?void 0:K(r),"aria-orientation":C==="ltr"||C==="rtl"?"horizontal":"vertical",onMouseDown:L,onTouchStart:L,onFocus:T,onMouseEnter:I,onKeyDown:_,onKeyUp:W}}var Y=p.createElement("div",He({ref:t,className:te(A,U(U(U({},"".concat(A,"-").concat(o+1),o!==null&&w),"".concat(A,"-dragging"),c),"".concat(A,"-dragging-delete"),u),D.handle),style:q(q(q({},H),s),k.handle)},B,v));return l&&(Y=l(Y,{index:o,prefixCls:n,value:r,dragging:c,draggingDelete:u})),Y});process.env.NODE_ENV!=="production"&&(tm.displayName="Handle");var I4=["prefixCls","style","onStartMove","onOffsetChange","values","handleRender","activeHandleRender","draggingIndex","draggingDelete","onFocus"],QO=p.forwardRef(function(e,t){var n=e.prefixCls,r=e.style,o=e.onStartMove,i=e.onOffsetChange,a=e.values,s=e.handleRender,l=e.activeHandleRender,c=e.draggingIndex,u=e.draggingDelete,d=e.onFocus,f=Mt(e,I4),h=p.useRef({}),m=p.useState(!1),v=de(m,2),g=v[0],y=v[1],b=p.useState(-1),C=de(b,2),x=C[0],S=C[1],w=function(R){S(R),y(!0)},E=function(R,k){w(k),d==null||d(R)},N=function(R,k){w(k)};p.useImperativeHandle(t,function(){return{focus:function(R){var k;(k=h.current[R])===null||k===void 0||k.focus()},hideHelp:function(){jr.flushSync(function(){y(!1)})}}});var $=q({prefixCls:n,onStartMove:o,onOffsetChange:i,render:s,onFocus:E,onMouseEnter:N},f);return p.createElement(p.Fragment,null,a.map(function(M,R){var k=c===R;return p.createElement(tm,He({ref:function(A){A?h.current[R]=A:delete h.current[R]},dragging:k,draggingDelete:k&&u,style:Ai(r,R),key:R,value:M,valueIndex:R},$))}),l&&g&&p.createElement(tm,He({key:"a11y"},$,{value:a[x],valueIndex:null,dragging:c!==-1,draggingDelete:u,render:l,style:{pointerEvents:"none"},tabIndex:null,"aria-hidden":!0})))});process.env.NODE_ENV!=="production"&&(QO.displayName="Handles");var T4=function(t){var n=t.prefixCls,r=t.style,o=t.children,i=t.value,a=t.onClick,s=p.useContext(sa),l=s.min,c=s.max,u=s.direction,d=s.includedStart,f=s.includedEnd,h=s.included,m="".concat(n,"-text"),v=Xg(u,i,l,c);return p.createElement("span",{className:te(m,U({},"".concat(m,"-active"),h&&d<=i&&i<=f)),style:q(q({},v),r),onMouseDown:function(y){y.stopPropagation()},onClick:function(){a(i)}},o)},A4=function(t){var n=t.prefixCls,r=t.marks,o=t.onClick,i="".concat(n,"-mark");return r.length?p.createElement("div",{className:i},r.map(function(a){var s=a.value,l=a.style,c=a.label;return p.createElement(T4,{key:s,prefixCls:i,style:l,value:s,onClick:o},c)})):null},P4=function(t){var n=t.prefixCls,r=t.value,o=t.style,i=t.activeStyle,a=p.useContext(sa),s=a.min,l=a.max,c=a.direction,u=a.included,d=a.includedStart,f=a.includedEnd,h="".concat(n,"-dot"),m=u&&d<=r&&r<=f,v=q(q({},Xg(c,r,s,l)),typeof o=="function"?o(r):o);return m&&(v=q(q({},v),typeof i=="function"?i(r):i)),p.createElement("span",{className:te(h,U({},"".concat(h,"-active"),m)),style:v})},k4=function(t){var n=t.prefixCls,r=t.marks,o=t.dots,i=t.style,a=t.activeStyle,s=p.useContext(sa),l=s.min,c=s.max,u=s.step,d=p.useMemo(function(){var f=new Set;if(r.forEach(function(m){f.add(m.value)}),o&&u!==null)for(var h=l;h<=c;)f.add(h),h+=u;return Array.from(f)},[l,c,u,o,r]);return p.createElement("div",{className:"".concat(n,"-step")},d.map(function(f){return p.createElement(P4,{prefixCls:n,key:f,value:f,style:i,activeStyle:a})}))},aC=function(t){var n=t.prefixCls,r=t.style,o=t.start,i=t.end,a=t.index,s=t.onStartMove,l=t.replaceCls,c=p.useContext(sa),u=c.direction,d=c.min,f=c.max,h=c.disabled,m=c.range,v=c.classNames,g="".concat(n,"-track"),y=em(o,d,f),b=em(i,d,f),C=function(E){!h&&s&&s(E,-1)},x={};switch(u){case"rtl":x.right="".concat(y*100,"%"),x.width="".concat(b*100-y*100,"%");break;case"btt":x.bottom="".concat(y*100,"%"),x.height="".concat(b*100-y*100,"%");break;case"ttb":x.top="".concat(y*100,"%"),x.height="".concat(b*100-y*100,"%");break;default:x.left="".concat(y*100,"%"),x.width="".concat(b*100-y*100,"%")}var S=l||te(g,U(U({},"".concat(g,"-").concat(a+1),a!==null&&m),"".concat(n,"-track-draggable"),s),v.track);return p.createElement("div",{className:S,style:q(q({},x),r),onMouseDown:C,onTouchStart:C})},D4=function(t){var n=t.prefixCls,r=t.style,o=t.values,i=t.startPoint,a=t.onStartMove,s=p.useContext(sa),l=s.included,c=s.range,u=s.min,d=s.styles,f=s.classNames,h=p.useMemo(function(){if(!c){if(o.length===0)return[];var v=i??u,g=o[0];return[{start:Math.min(v,g),end:Math.max(v,g)}]}for(var y=[],b=0;b<o.length-1;b+=1)y.push({start:o[b],end:o[b+1]});return y},[o,c,i,u]);if(!l)return null;var m=h!=null&&h.length&&(f.tracks||d.tracks)?p.createElement(aC,{index:null,prefixCls:n,start:h[0].start,end:h[h.length-1].end,replaceCls:te(f.tracks,"".concat(n,"-tracks")),style:d.tracks}):null;return p.createElement(p.Fragment,null,m,h.map(function(v,g){var y=v.start,b=v.end;return p.createElement(aC,{index:g,prefixCls:n,style:q(q({},Ai(r,g)),d.track),start:y,end:b,key:g,onStartMove:a})}))},_4=130;function sC(e){var t="targetTouches"in e?e.targetTouches[0]:e;return{pageX:t.pageX,pageY:t.pageY}}function L4(e,t,n,r,o,i,a,s,l,c,u){var d=p.useState(null),f=de(d,2),h=f[0],m=f[1],v=p.useState(-1),g=de(v,2),y=g[0],b=g[1],C=p.useState(!1),x=de(C,2),S=x[0],w=x[1],E=p.useState(n),N=de(E,2),$=N[0],M=N[1],R=p.useState(n),k=de(R,2),D=k[0],A=k[1],L=p.useRef(null),T=p.useRef(null),I=p.useRef(null),_=p.useContext(JO),W=_.onDragStart,H=_.onDragChange;cn(function(){y===-1&&M(n)},[n,y]),p.useEffect(function(){return function(){document.removeEventListener("mousemove",L.current),document.removeEventListener("mouseup",T.current),I.current&&(I.current.removeEventListener("touchmove",L.current),I.current.removeEventListener("touchend",T.current))}},[]);var B=function(Q,ce,Z){ce!==void 0&&m(ce),M(Q);var he=Q;Z&&(he=Q.filter(function(ye,fe){return fe!==y})),a(he),H&&H({rawValues:Q,deleteIndex:Z?y:-1,draggingIndex:y,draggingValue:ce})},K=tn(function(G,Q,ce){if(G===-1){var Z=D[0],he=D[D.length-1],ye=r-Z,fe=o-he,ae=Q*(o-r);ae=Math.max(ae,ye),ae=Math.min(ae,fe);var ve=i(Z+ae);ae=ve-Z;var ne=D.map(function(Me){return Me+ae});B(ne)}else{var se=(o-r)*Q,pe=Le($);pe[G]=D[G];var Ne=l(pe,se,G,"dist");B(Ne.values,Ne.value,ce)}}),Y=function(Q,ce,Z){Q.stopPropagation();var he=Z||n,ye=he[ce];b(ce),m(ye),A(he),M(he),w(!1);var fe=sC(Q),ae=fe.pageX,ve=fe.pageY,ne=!1;W&&W({rawValues:he,draggingIndex:ce,draggingValue:ye});var se=function(Me){Me.preventDefault();var $e=sC(Me),Be=$e.pageX,F=$e.pageY,be=Be-ae,ue=F-ve,me=e.current.getBoundingClientRect(),Re=me.width,Te=me.height,xe,Ve;switch(t){case"btt":xe=-ue/Te,Ve=be;break;case"ttb":xe=ue/Te,Ve=be;break;case"rtl":xe=-be/Re,Ve=ue;break;default:xe=be/Re,Ve=ue}ne=c?Math.abs(Ve)>_4&&u<$.length:!1,w(ne),K(ce,xe,ne)},pe=function Ne(Me){Me.preventDefault(),document.removeEventListener("mouseup",Ne),document.removeEventListener("mousemove",se),I.current&&(I.current.removeEventListener("touchmove",L.current),I.current.removeEventListener("touchend",T.current)),L.current=null,T.current=null,I.current=null,s(ne),b(-1),w(!1)};document.addEventListener("mouseup",pe),document.addEventListener("mousemove",se),Q.currentTarget.addEventListener("touchend",pe),Q.currentTarget.addEventListener("touchmove",se),L.current=se,T.current=pe,I.current=Q.currentTarget},V=p.useMemo(function(){var G=Le(n).sort(function(ye,fe){return ye-fe}),Q=Le($).sort(function(ye,fe){return ye-fe}),ce={};Q.forEach(function(ye){ce[ye]=(ce[ye]||0)+1}),G.forEach(function(ye){ce[ye]=(ce[ye]||0)-1});var Z=c?1:0,he=Object.values(ce).reduce(function(ye,fe){return ye+Math.abs(fe)},0);return he<=Z?$:n},[n,$,c]);return[y,h,S,V,Y]}function j4(e,t,n,r,o,i){var a=p.useCallback(function(h){return Math.max(e,Math.min(t,h))},[e,t]),s=p.useCallback(function(h){if(n!==null){var m=e+Math.round((a(h)-e)/n)*n,v=function(C){return(String(C).split(".")[1]||"").length},g=Math.max(v(n),v(t),v(e)),y=Number(m.toFixed(g));return e<=y&&y<=t?y:null}return null},[n,e,t,a]),l=p.useCallback(function(h){var m=a(h),v=r.map(function(b){return b.value});n!==null&&v.push(s(h)),v.push(e,t);var g=v[0],y=t-e;return v.forEach(function(b){var C=Math.abs(m-b);C<=y&&(g=b,y=C)}),g},[e,t,r,n,a,s]),c=function h(m,v,g){var y=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit";if(typeof v=="number"){var b,C=m[g],x=C+v,S=[];r.forEach(function(M){S.push(M.value)}),S.push(e,t),S.push(s(C));var w=v>0?1:-1;y==="unit"?S.push(s(C+w*n)):S.push(s(x)),S=S.filter(function(M){return M!==null}).filter(function(M){return v<0?M<=C:M>=C}),y==="unit"&&(S=S.filter(function(M){return M!==C}));var E=y==="unit"?C:x;b=S[0];var N=Math.abs(b-E);if(S.forEach(function(M){var R=Math.abs(M-E);R<N&&(b=M,N=R)}),b===void 0)return v<0?e:t;if(y==="dist")return b;if(Math.abs(v)>1){var $=Le(m);return $[g]=b,h($,v-w,g,y)}return b}else{if(v==="min")return e;if(v==="max")return t}},u=function(m,v,g){var y=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit",b=m[g],C=c(m,v,g,y);return{value:C,changed:C!==b}},d=function(m){return i===null&&m===0||typeof i=="number"&&m<i},f=function(m,v,g){var y=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit",b=m.map(l),C=b[g],x=c(b,v,g,y);if(b[g]=x,o===!1){var S=i||0;g>0&&b[g-1]!==C&&(b[g]=Math.max(b[g],b[g-1]+S)),g<b.length-1&&b[g+1]!==C&&(b[g]=Math.min(b[g],b[g+1]-S))}else if(typeof i=="number"||i===null){for(var w=g+1;w<b.length;w+=1)for(var E=!0;d(b[w]-b[w-1])&&E;){var N=u(b,1,w);b[w]=N.value,E=N.changed}for(var $=g;$>0;$-=1)for(var M=!0;d(b[$]-b[$-1])&&M;){var R=u(b,-1,$-1);b[$-1]=R.value,M=R.changed}for(var k=b.length-1;k>0;k-=1)for(var D=!0;d(b[k]-b[k-1])&&D;){var A=u(b,-1,k-1);b[k-1]=A.value,D=A.changed}for(var L=0;L<b.length-1;L+=1)for(var T=!0;d(b[L+1]-b[L])&&T;){var I=u(b,1,L+1);b[L+1]=I.value,T=I.changed}}return{value:b[g],values:b}};return[l,f]}function B4(e){return O.useMemo(function(){if(e===!0||!e)return[!!e,!1,!1,0];var t=e.editable,n=e.draggableTrack,r=e.minCount,o=e.maxCount;return process.env.NODE_ENV!=="production"&&yo(!t||!n,"`editable` can not work with `draggableTrack`."),[!0,t,!t&&n,r||0,o]},[e])}var ZO=p.forwardRef(function(e,t){var n=e.prefixCls,r=n===void 0?"rc-slider":n,o=e.className,i=e.style,a=e.classNames,s=e.styles,l=e.id,c=e.disabled,u=c===void 0?!1:c,d=e.keyboard,f=d===void 0?!0:d,h=e.autoFocus,m=e.onFocus,v=e.onBlur,g=e.min,y=g===void 0?0:g,b=e.max,C=b===void 0?100:b,x=e.step,S=x===void 0?1:x,w=e.value,E=e.defaultValue,N=e.range,$=e.count,M=e.onChange,R=e.onBeforeChange,k=e.onAfterChange,D=e.onChangeComplete,A=e.allowCross,L=A===void 0?!0:A,T=e.pushable,I=T===void 0?!1:T,_=e.reverse,W=e.vertical,H=e.included,B=H===void 0?!0:H,K=e.startPoint,Y=e.trackStyle,V=e.handleStyle,G=e.railStyle,Q=e.dotStyle,ce=e.activeDotStyle,Z=e.marks,he=e.dots,ye=e.handleRender,fe=e.activeHandleRender,ae=e.track,ve=e.tabIndex,ne=ve===void 0?0:ve,se=e.ariaLabelForHandle,pe=e.ariaLabelledByForHandle,Ne=e.ariaRequired,Me=e.ariaValueTextFormatterForHandle,$e=p.useRef(null),Be=p.useRef(null),F=p.useMemo(function(){return W?_?"ttb":"btt":_?"rtl":"ltr"},[_,W]),be=B4(N),ue=de(be,5),me=ue[0],Re=ue[1],Te=ue[2],xe=ue[3],Ve=ue[4],qe=p.useMemo(function(){return isFinite(y)?y:0},[y]),Pe=p.useMemo(function(){return isFinite(C)?C:100},[C]),Ke=p.useMemo(function(){return S!==null&&S<=0?1:S},[S]),Je=p.useMemo(function(){return typeof I=="boolean"?I?Ke:!1:I>=0?I:!1},[I,Ke]),De=p.useMemo(function(){return Object.keys(Z||{}).map(function(ke){var Ie=Z[ke],ot={value:Number(ke)};return Ie&&ht(Ie)==="object"&&!p.isValidElement(Ie)&&("label"in Ie||"style"in Ie)?(ot.style=Ie.style,ot.label=Ie.label):ot.label=Ie,ot}).filter(function(ke){var Ie=ke.label;return Ie||typeof Ie=="number"}).sort(function(ke,Ie){return ke.value-Ie.value})},[Z]),ze=j4(qe,Pe,Ke,De,L,Je),_e=de(ze,2),We=_e[0],rt=_e[1],gt=bn(E,{value:w}),Lt=de(gt,2),Tt=Lt[0],Zt=Lt[1],tt=p.useMemo(function(){var ke=Tt==null?[]:Array.isArray(Tt)?Tt:[Tt],Ie=de(ke,1),ot=Ie[0],bt=ot===void 0?qe:ot,St=Tt===null?[]:[bt];if(me){if(St=Le(ke),$||Tt===void 0){var Yt=$>=0?$+1:2;for(St=St.slice(0,Yt);St.length<Yt;){var en;St.push((en=St[St.length-1])!==null&&en!==void 0?en:qe)}}St.sort(function(kt,ln){return kt-ln})}return St.forEach(function(kt,ln){St[ln]=We(kt)}),St},[Tt,me,qe,$,We]),Ue=function(Ie){return me?Ie:Ie[0]},ft=tn(function(ke){var Ie=Le(ke).sort(function(ot,bt){return ot-bt});M&&!Fa(Ie,tt,!0)&&M(Ue(Ie)),Zt(Ie)}),dt=tn(function(ke){ke&&$e.current.hideHelp();var Ie=Ue(tt);k==null||k(Ie),Ot(!k,"[rc-slider] `onAfterChange` is deprecated. Please use `onChangeComplete` instead."),D==null||D(Ie)}),st=function(Ie){if(!(u||!Re||tt.length<=xe)){var ot=Le(tt);ot.splice(Ie,1),R==null||R(Ue(ot)),ft(ot);var bt=Math.max(0,Ie-1);$e.current.hideHelp(),$e.current.focus(bt)}},Ze=L4(Be,F,tt,qe,Pe,We,ft,dt,rt,Re,xe),Xe=de(Ze,5),Qe=Xe[0],wt=Xe[1],At=Xe[2],it=Xe[3],Ge=Xe[4],et=function(Ie,ot){if(!u){var bt=Le(tt),St=0,Yt=0,en=Pe-qe;tt.forEach(function(zn,P){var X=Math.abs(Ie-zn);X<=en&&(en=X,St=P),zn<Ie&&(Yt=P)});var kt=St;Re&&en!==0&&(!Ve||tt.length<Ve)?(bt.splice(Yt+1,0,Ie),kt=Yt+1):bt[St]=Ie,me&&!tt.length&&$===void 0&&bt.push(Ie);var ln=Ue(bt);if(R==null||R(ln),ft(bt),ot){var on,kn;(on=document.activeElement)===null||on===void 0||(kn=on.blur)===null||kn===void 0||kn.call(on),$e.current.focus(kt),Ge(ot,kt,bt)}else k==null||k(ln),Ot(!k,"[rc-slider] `onAfterChange` is deprecated. Please use `onChangeComplete` instead."),D==null||D(ln)}},lt=function(Ie){Ie.preventDefault();var ot=Be.current.getBoundingClientRect(),bt=ot.width,St=ot.height,Yt=ot.left,en=ot.top,kt=ot.bottom,ln=ot.right,on=Ie.clientX,kn=Ie.clientY,zn;switch(F){case"btt":zn=(kt-kn)/St;break;case"ttb":zn=(kn-en)/St;break;case"rtl":zn=(ln-on)/bt;break;default:zn=(on-Yt)/bt}var P=qe+zn*(Pe-qe);et(We(P),Ie)},ct=p.useState(null),vt=de(ct,2),jt=vt[0],It=vt[1],zt=function(Ie,ot){if(!u){var bt=rt(tt,Ie,ot);R==null||R(Ue(tt)),ft(bt.values),It(bt.value)}};p.useEffect(function(){if(jt!==null){var ke=tt.indexOf(jt);ke>=0&&$e.current.focus(ke)}It(null)},[jt]);var Pt=p.useMemo(function(){return Te&&Ke===null?(process.env.NODE_ENV!=="production"&&Ot(!1,"`draggableTrack` is not supported when `step` is `null`."),!1):Te},[Te,Ke]),Vt=tn(function(ke,Ie){Ge(ke,Ie),R==null||R(Ue(tt))}),qt=Qe!==-1;p.useEffect(function(){if(!qt){var ke=tt.lastIndexOf(wt);$e.current.focus(ke)}},[qt]);var Jt=p.useMemo(function(){return Le(it).sort(function(ke,Ie){return ke-Ie})},[it]),Pn=p.useMemo(function(){return me?[Jt[0],Jt[Jt.length-1]]:[qe,Jt[0]]},[Jt,me,qe]),Ye=de(Pn,2),J=Ye[0],le=Ye[1];p.useImperativeHandle(t,function(){return{focus:function(){$e.current.focus(0)},blur:function(){var Ie,ot=document,bt=ot.activeElement;(Ie=Be.current)!==null&&Ie!==void 0&&Ie.contains(bt)&&(bt==null||bt.blur())}}}),p.useEffect(function(){h&&$e.current.focus(0)},[]);var we=p.useMemo(function(){return{min:qe,max:Pe,direction:F,disabled:u,keyboard:f,step:Ke,included:B,includedStart:J,includedEnd:le,range:me,tabIndex:ne,ariaLabelForHandle:se,ariaLabelledByForHandle:pe,ariaRequired:Ne,ariaValueTextFormatterForHandle:Me,styles:s||{},classNames:a||{}}},[qe,Pe,F,u,f,Ke,B,J,le,me,ne,se,pe,Ne,Me,s,a]);return p.createElement(sa.Provider,{value:we},p.createElement("div",{ref:Be,className:te(r,o,U(U(U(U({},"".concat(r,"-disabled"),u),"".concat(r,"-vertical"),W),"".concat(r,"-horizontal"),!W),"".concat(r,"-with-marks"),De.length)),style:i,onMouseDown:lt,id:l},p.createElement("div",{className:te("".concat(r,"-rail"),a==null?void 0:a.rail),style:q(q({},G),s==null?void 0:s.rail)}),ae!==!1&&p.createElement(D4,{prefixCls:r,style:Y,values:tt,startPoint:K,onStartMove:Pt?Vt:void 0}),p.createElement(k4,{prefixCls:r,marks:De,dots:he,style:Q,activeStyle:ce}),p.createElement(QO,{ref:$e,prefixCls:r,style:V,values:it,draggingIndex:Qe,draggingDelete:At,onStartMove:Vt,onOffsetChange:zt,onFocus:m,onBlur:v,handleRender:ye,activeHandleRender:fe,onChangeComplete:dt,onDelete:Re?st:void 0}),p.createElement(A4,{prefixCls:r,marks:De,onClick:et})))});process.env.NODE_ENV!=="production"&&(ZO.displayName="Slider");const e$=O.createContext({}),nm=p.forwardRef((e,t)=>{const{open:n,draggingDelete:r}=e,o=O.useRef(null),i=n&&!r,a=O.useRef(null);function s(){Ht.cancel(a.current),a.current=null}function l(){a.current=Ht(()=>{var c;(c=o.current)===null||c===void 0||c.forceAlign(),a.current=null})}return p.useEffect(()=>(i?l():s(),s),[i,e.title]),p.createElement(Sn,Object.assign({ref:mr(o,t)},e,{open:i}))});process.env.NODE_ENV!=="production"&&(nm.displayName="SliderTooltip");const z4=e=>{const{componentCls:t,antCls:n,controlSize:r,dotSize:o,marginFull:i,marginPart:a,colorFillContentHover:s,handleColorDisabled:l,calc:c,handleSize:u,handleSizeHover:d,handleActiveColor:f,handleActiveOutlineColor:h,handleLineWidth:m,handleLineWidthHover:v,motionDurationMid:g}=e;return{[t]:Object.assign(Object.assign({},Bn(e)),{position:"relative",height:r,margin:`${oe(a)} ${oe(i)}`,padding:0,cursor:"pointer",touchAction:"none","&-vertical":{margin:`${oe(i)} ${oe(a)}`},[`${t}-rail`]:{position:"absolute",backgroundColor:e.railBg,borderRadius:e.borderRadiusXS,transition:`background-color ${g}`},[`${t}-track,${t}-tracks`]:{position:"absolute",transition:`background-color ${g}`},[`${t}-track`]:{backgroundColor:e.trackBg,borderRadius:e.borderRadiusXS},[`${t}-track-draggable`]:{boxSizing:"content-box",backgroundClip:"content-box",border:"solid rgba(0,0,0,0)"},"&:hover":{[`${t}-rail`]:{backgroundColor:e.railHoverBg},[`${t}-track`]:{backgroundColor:e.trackHoverBg},[`${t}-dot`]:{borderColor:s},[`${t}-handle::after`]:{boxShadow:`0 0 0 ${oe(m)} ${e.colorPrimaryBorderHover}`},[`${t}-dot-active`]:{borderColor:e.dotActiveBorderColor}},[`${t}-handle`]:{position:"absolute",width:u,height:u,outline:"none",userSelect:"none","&-dragging-delete":{opacity:0},"&::before":{content:'""',position:"absolute",insetInlineStart:c(m).mul(-1).equal(),insetBlockStart:c(m).mul(-1).equal(),width:c(u).add(c(m).mul(2)).equal(),height:c(u).add(c(m).mul(2)).equal(),backgroundColor:"transparent"},"&::after":{content:'""',position:"absolute",insetBlockStart:0,insetInlineStart:0,width:u,height:u,backgroundColor:e.colorBgElevated,boxShadow:`0 0 0 ${oe(m)} ${e.handleColor}`,outline:"0px solid transparent",borderRadius:"50%",cursor:"pointer",transition:`
422
+ inset-inline-start ${g},
423
+ inset-block-start ${g},
424
+ width ${g},
425
+ height ${g},
426
+ box-shadow ${g},
427
+ outline ${g}
428
+ `},"&:hover, &:active, &:focus":{"&::before":{insetInlineStart:c(d).sub(u).div(2).add(v).mul(-1).equal(),insetBlockStart:c(d).sub(u).div(2).add(v).mul(-1).equal(),width:c(d).add(c(v).mul(2)).equal(),height:c(d).add(c(v).mul(2)).equal()},"&::after":{boxShadow:`0 0 0 ${oe(v)} ${f}`,outline:`6px solid ${h}`,width:d,height:d,insetInlineStart:e.calc(u).sub(d).div(2).equal(),insetBlockStart:e.calc(u).sub(d).div(2).equal()}}},[`&-lock ${t}-handle`]:{"&::before, &::after":{transition:"none"}},[`${t}-mark`]:{position:"absolute",fontSize:e.fontSize},[`${t}-mark-text`]:{position:"absolute",display:"inline-block",color:e.colorTextDescription,textAlign:"center",wordBreak:"keep-all",cursor:"pointer",userSelect:"none","&-active":{color:e.colorText}},[`${t}-step`]:{position:"absolute",background:"transparent",pointerEvents:"none"},[`${t}-dot`]:{position:"absolute",width:o,height:o,backgroundColor:e.colorBgElevated,border:`${oe(m)} solid ${e.dotBorderColor}`,borderRadius:"50%",cursor:"pointer",transition:`border-color ${e.motionDurationSlow}`,pointerEvents:"auto","&-active":{borderColor:e.dotActiveBorderColor}},[`&${t}-disabled`]:{cursor:"not-allowed",[`${t}-rail`]:{backgroundColor:`${e.railBg} !important`},[`${t}-track`]:{backgroundColor:`${e.trackBgDisabled} !important`},[`
429
+ ${t}-dot
430
+ `]:{backgroundColor:e.colorBgElevated,borderColor:e.trackBgDisabled,boxShadow:"none",cursor:"not-allowed"},[`${t}-handle::after`]:{backgroundColor:e.colorBgElevated,cursor:"not-allowed",width:u,height:u,boxShadow:`0 0 0 ${oe(m)} ${l}`,insetInlineStart:0,insetBlockStart:0},[`
431
+ ${t}-mark-text,
432
+ ${t}-dot
433
+ `]:{cursor:"not-allowed !important"}},[`&-tooltip ${n}-tooltip-inner`]:{minWidth:"unset"}})}},t$=(e,t)=>{const{componentCls:n,railSize:r,handleSize:o,dotSize:i,marginFull:a,calc:s}=e,l=t?"paddingBlock":"paddingInline",c=t?"width":"height",u=t?"height":"width",d=t?"insetBlockStart":"insetInlineStart",f=t?"top":"insetInlineStart",h=s(r).mul(3).sub(o).div(2).equal(),m=s(o).sub(r).div(2).equal(),v=t?{borderWidth:`${oe(m)} 0`,transform:`translateY(${oe(s(m).mul(-1).equal())})`}:{borderWidth:`0 ${oe(m)}`,transform:`translateX(${oe(e.calc(m).mul(-1).equal())})`};return{[l]:r,[u]:s(r).mul(3).equal(),[`${n}-rail`]:{[c]:"100%",[u]:r},[`${n}-track,${n}-tracks`]:{[u]:r},[`${n}-track-draggable`]:Object.assign({},v),[`${n}-handle`]:{[d]:h},[`${n}-mark`]:{insetInlineStart:0,top:0,[f]:s(r).mul(3).add(t?0:a).equal(),[c]:"100%"},[`${n}-step`]:{insetInlineStart:0,top:0,[f]:r,[c]:"100%",[u]:r},[`${n}-dot`]:{position:"absolute",[d]:s(r).sub(i).div(2).equal()}}},F4=e=>{const{componentCls:t,marginPartWithMark:n}=e;return{[`${t}-horizontal`]:Object.assign(Object.assign({},t$(e,!0)),{[`&${t}-with-marks`]:{marginBottom:n}})}},H4=e=>{const{componentCls:t}=e;return{[`${t}-vertical`]:Object.assign(Object.assign({},t$(e,!1)),{height:"100%"})}},V4=e=>{const n=e.controlHeightLG/4,r=e.controlHeightSM/2,o=e.lineWidth+1,i=e.lineWidth+1*1.5,a=e.colorPrimary,s=new Qt(a).setA(.2).toRgbString();return{controlSize:n,railSize:4,handleSize:n,handleSizeHover:r,dotSize:8,handleLineWidth:o,handleLineWidthHover:i,railBg:e.colorFillTertiary,railHoverBg:e.colorFillSecondary,trackBg:e.colorPrimaryBorder,trackHoverBg:e.colorPrimaryBorderHover,handleColor:e.colorPrimaryBorder,handleActiveColor:a,handleActiveOutlineColor:s,handleColorDisabled:new Qt(e.colorTextDisabled).onBackground(e.colorBgContainer).toHexString(),dotBorderColor:e.colorBorderSecondary,dotActiveBorderColor:e.colorPrimaryBorder,trackBgDisabled:e.colorBgContainerDisabled}},W4=yn("Slider",e=>{const t=Xt(e,{marginPart:e.calc(e.controlHeight).sub(e.controlSize).div(2).equal(),marginFull:e.calc(e.controlSize).div(2).equal(),marginPartWithMark:e.calc(e.controlHeightLG).sub(e.controlSize).equal()});return[z4(t),F4(t),H4(t)]},V4);function oh(){const[e,t]=p.useState(!1),n=p.useRef(null),r=()=>{Ht.cancel(n.current)},o=i=>{r(),i?t(i):n.current=Ht(()=>{t(i)})};return p.useEffect(()=>r,[]),[e,o]}var U4=function(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 q4(e,t){return e||e===null?e:t||t===null?t:n=>typeof n=="number"?n.toString():""}const n$=O.forwardRef((e,t)=>{const{prefixCls:n,range:r,className:o,rootClassName:i,style:a,disabled:s,tooltipPrefixCls:l,tipFormatter:c,tooltipVisible:u,getTooltipPopupContainer:d,tooltipPlacement:f,tooltip:h={},onChangeComplete:m,classNames:v,styles:g}=e,y=U4(e,["prefixCls","range","className","rootClassName","style","disabled","tooltipPrefixCls","tipFormatter","tooltipVisible","getTooltipPopupContainer","tooltipPlacement","tooltip","onChangeComplete","classNames","styles"]),{vertical:b}=e,{getPrefixCls:C,direction:x,className:S,style:w,classNames:E,styles:N,getPopupContainer:$}=Rr("slider"),M=O.useContext(Fr),R=s??M,{handleRender:k,direction:D}=O.useContext(e$),L=(D||x)==="rtl",[T,I]=oh(),[_,W]=oh(),H=Object.assign({},h),{open:B,placement:K,getPopupContainer:Y,prefixCls:V,formatter:G}=H,Q=B??u,ce=(T||_)&&Q!==!1,Z=q4(G,c),[he,ye]=oh(),fe=me=>{m==null||m(me),ye(!1)},ae=(me,Re)=>me||(Re?L?"left":"right":"top"),ve=C("slider",n),[ne,se,pe]=W4(ve),Ne=te(o,S,E.root,v==null?void 0:v.root,i,{[`${ve}-rtl`]:L,[`${ve}-lock`]:he},se,pe);if(L&&!y.vertical&&(y.reverse=!y.reverse),process.env.NODE_ENV!=="production"){const me=fn("Slider");[["tooltipPrefixCls","prefixCls"],["getTooltipPopupContainer","getPopupContainer"],["tipFormatter","formatter"],["tooltipPlacement","placement"],["tooltipVisible","open"]].forEach(Re=>{let[Te,xe]=Re;me.deprecated(!(Te in e),Te,`tooltip.${xe}`)})}O.useEffect(()=>{const me=()=>{Ht(()=>{W(!1)},1)};return document.addEventListener("mouseup",me),()=>{document.removeEventListener("mouseup",me)}},[]);const Me=r&&!Q,$e=k||((me,Re)=>{const{index:Te}=Re,xe=me.props;function Ve(Je,De,ze){var _e,We,rt,gt;ze&&((We=(_e=y)[Je])===null||We===void 0||We.call(_e,De)),(gt=(rt=xe)[Je])===null||gt===void 0||gt.call(rt,De)}const qe=Object.assign(Object.assign({},xe),{onMouseEnter:Je=>{I(!0),Ve("onMouseEnter",Je)},onMouseLeave:Je=>{I(!1),Ve("onMouseLeave",Je)},onMouseDown:Je=>{W(!0),ye(!0),Ve("onMouseDown",Je)},onFocus:Je=>{var De;W(!0),(De=y.onFocus)===null||De===void 0||De.call(y,Je),Ve("onFocus",Je,!0)},onBlur:Je=>{var De;W(!1),(De=y.onBlur)===null||De===void 0||De.call(y,Je),Ve("onBlur",Je,!0)}}),Pe=O.cloneElement(me,qe),Ke=(!!Q||ce)&&Z!==null;return Me?Pe:O.createElement(nm,Object.assign({},H,{prefixCls:C("tooltip",V??l),title:Z?Z(Re.value):"",open:Ke,placement:ae(K??f,b),key:Te,classNames:{root:`${ve}-tooltip`},getPopupContainer:Y||d||$}),Pe)}),Be=Me?(me,Re)=>{const Te=O.cloneElement(me,{style:Object.assign(Object.assign({},me.props.style),{visibility:"hidden"})});return O.createElement(nm,Object.assign({},H,{prefixCls:C("tooltip",V??l),title:Z?Z(Re.value):"",open:Z!==null&&ce,placement:ae(K??f,b),key:"tooltip",classNames:{root:`${ve}-tooltip`},getPopupContainer:Y||d||$,draggingDelete:Re.draggingDelete}),Te)}:void 0,F=Object.assign(Object.assign(Object.assign(Object.assign({},N.root),w),g==null?void 0:g.root),a),be=Object.assign(Object.assign({},N.tracks),g==null?void 0:g.tracks),ue=te(E.tracks,v==null?void 0:v.tracks);return ne(O.createElement(ZO,Object.assign({},y,{classNames:Object.assign({handle:te(E.handle,v==null?void 0:v.handle),rail:te(E.rail,v==null?void 0:v.rail),track:te(E.track,v==null?void 0:v.track)},ue?{tracks:ue}:{}),styles:Object.assign({handle:Object.assign(Object.assign({},N.handle),g==null?void 0:g.handle),rail:Object.assign(Object.assign({},N.rail),g==null?void 0:g.rail),track:Object.assign(Object.assign({},N.track),g==null?void 0:g.track)},Object.keys(be).length?{tracks:be}:{}),step:y.step,range:r,className:Ne,style:F,disabled:R,ref:t,prefixCls:ve,handleRender:$e,activeHandleRender:Be,onChangeComplete:fe})))});process.env.NODE_ENV!=="production"&&(n$.displayName="Slider");var K4=function(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};const r$=e=>{const{prefixCls:t,colors:n,type:r,color:o,range:i=!1,className:a,activeIndex:s,onActive:l,onDragStart:c,onDragChange:u,onKeyDelete:d}=e,f=K4(e,["prefixCls","colors","type","color","range","className","activeIndex","onActive","onDragStart","onDragChange","onKeyDelete"]),h=Object.assign(Object.assign({},f),{track:!1}),m=p.useMemo(()=>`linear-gradient(90deg, ${n.map(w=>`${w.color} ${w.percent}%`).join(", ")})`,[n]),v=p.useMemo(()=>!o||!r?null:r==="alpha"?o.toRgbString():`hsl(${o.toHsb().h}, 100%, 50%)`,[o,r]),g=tn(c),y=tn(u),b=p.useMemo(()=>({onDragStart:g,onDragChange:y}),[]),C=tn((S,w)=>{const{onFocus:E,style:N,className:$,onKeyDown:M}=S.props,R=Object.assign({},N);return r==="gradient"&&(R.background=Bw(n,w.value)),p.cloneElement(S,{onFocus:k=>{l==null||l(w.index),E==null||E(k)},style:R,className:te($,{[`${t}-slider-handle-active`]:s===w.index}),onKeyDown:k=>{(k.key==="Delete"||k.key==="Backspace")&&d&&d(w.index),M==null||M(k)}})}),x=p.useMemo(()=>({direction:"ltr",handleRender:C}),[]);return p.createElement(e$.Provider,{value:x},p.createElement(JO.Provider,{value:b},p.createElement(n$,Object.assign({},h,{className:te(a,`${t}-slider`),tooltip:{open:!1},range:{editable:i,minCount:2},styles:{rail:{background:m},handle:v?{background:v}:{}},classNames:{rail:`${t}-slider-rail`,handle:`${t}-slider-handle`}}))))},G4=e=>{const{value:t,onChange:n,onChangeComplete:r}=e,o=a=>n(a[0]),i=a=>r(a[0]);return p.createElement(r$,Object.assign({},e,{value:[t],onChange:o,onChangeComplete:i}))};function lC(e){return Le(e).sort((t,n)=>t.percent-n.percent)}const X4=e=>{const{prefixCls:t,mode:n,onChange:r,onChangeComplete:o,onActive:i,activeIndex:a,onGradientDragging:s,colors:l}=e,c=n==="gradient",u=p.useMemo(()=>l.map(y=>({percent:y.percent,color:y.color.toRgbString()})),[l]),d=p.useMemo(()=>u.map(y=>y.percent),[u]),f=p.useRef(u),h=y=>{let{rawValues:b,draggingIndex:C,draggingValue:x}=y;if(b.length>u.length){const S=Bw(u,x),w=Le(u);w.splice(C,0,{percent:x,color:S}),f.current=w}else f.current=u;s(!0),r(new Er(lC(f.current)),!0)},m=y=>{let{deleteIndex:b,draggingIndex:C,draggingValue:x}=y,S=Le(f.current);b!==-1?S.splice(b,1):(S[C]=Object.assign(Object.assign({},S[C]),{percent:x}),S=lC(S)),r(new Er(S),!0)},v=y=>{const b=Le(u);b.splice(y,1);const C=new Er(b);r(C),o(C)},g=y=>{o(new Er(u)),a>=y.length&&i(y.length-1),s(!1)};return c?p.createElement(r$,{min:0,max:100,prefixCls:t,className:`${t}-gradient-slider`,colors:u,color:null,value:d,range:!0,onChangeComplete:g,disabled:!1,type:"gradient",activeIndex:a,onActive:i,onDragStart:h,onDragChange:m,onKeyDelete:v}):null},Y4=p.memo(X4);var J4=function(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};const Q4={slider:G4},cC=()=>{const e=O.useContext(jO),{mode:t,onModeChange:n,modeOptions:r,prefixCls:o,allowClear:i,value:a,disabledAlpha:s,onChange:l,onClear:c,onChangeComplete:u,activeIndex:d,gradientDragging:f}=e,h=J4(e,["mode","onModeChange","modeOptions","prefixCls","allowClear","value","disabledAlpha","onChange","onClear","onChangeComplete","activeIndex","gradientDragging"]),m=O.useMemo(()=>a.cleared?[{percent:0,color:new Er("")},{percent:100,color:new Er("")}]:a.getColors(),[a]),v=!a.isGradient(),[g,y]=O.useState(a);cn(()=>{var A;v||y((A=m[d])===null||A===void 0?void 0:A.color)},[f,d]);const b=O.useMemo(()=>{var A;return v?a:f?g:(A=m[d])===null||A===void 0?void 0:A.color},[a,d,v,g,f]),[C,x]=O.useState(b),[S,w]=O.useState(0),E=C!=null&&C.equals(b)?b:C;cn(()=>{x(b)},[S,b==null?void 0:b.toHexString()]);const N=(A,L)=>{let T=ir(A);if(a.cleared){const _=T.toRgb();if(!_.r&&!_.g&&!_.b&&L){const{type:W,value:H=0}=L;T=new Er({h:W==="hue"?H:0,s:1,b:1,a:W==="alpha"?H/100:1})}else T=jc(T)}if(t==="single")return T;const I=Le(m);return I[d]=Object.assign(Object.assign({},I[d]),{color:T}),new Er(I)},$=(A,L,T)=>{const I=N(A,T);x(I.isGradient()?I.getColors()[d].color:I),l(I,L)},M=(A,L)=>{u(N(A,L)),w(T=>T+1)},R=A=>{l(N(A))};let k=null;const D=r.length>1;return(i||D)&&(k=O.createElement("div",{className:`${o}-operation`},D&&O.createElement(LO,{size:"small",options:r,value:t,onChange:n}),O.createElement(zO,Object.assign({prefixCls:o,value:a,onChange:A=>{l(A),c==null||c()}},h)))),O.createElement(O.Fragment,null,k,O.createElement(Y4,Object.assign({},e,{colors:m})),O.createElement(kw,{prefixCls:o,value:E==null?void 0:E.toHsb(),disabledAlpha:s,onChange:(A,L)=>{$(A,!0,L)},onChangeComplete:(A,L)=>{M(A,L)},components:Q4}),O.createElement(M4,Object.assign({value:b,onChange:R,prefixCls:o,disabledAlpha:s},h)))},uC=()=>{const{prefixCls:e,value:t,presets:n,onChange:r}=O.useContext(BO);return Array.isArray(n)?O.createElement(DL,{value:t,presets:n,prefixCls:e,onChange:r}):null},o$=e=>{const{prefixCls:t,presets:n,panelRender:r,value:o,onChange:i,onClear:a,allowClear:s,disabledAlpha:l,mode:c,onModeChange:u,modeOptions:d,onChangeComplete:f,activeIndex:h,onActive:m,format:v,onFormatChange:g,gradientDragging:y,onGradientDragging:b,disabledFormat:C}=e,x=`${t}-inner`,S=O.useMemo(()=>({prefixCls:t,value:o,onChange:i,onClear:a,allowClear:s,disabledAlpha:l,mode:c,onModeChange:u,modeOptions:d,onChangeComplete:f,activeIndex:h,onActive:m,format:v,onFormatChange:g,gradientDragging:y,onGradientDragging:b,disabledFormat:C}),[t,o,i,a,s,l,c,u,d,f,h,m,v,g,y,b,C]),w=O.useMemo(()=>({prefixCls:t,value:o,presets:n,onChange:i}),[t,o,n,i]),E=O.createElement("div",{className:`${x}-content`},O.createElement(cC,null),Array.isArray(n)&&O.createElement(DO,null),O.createElement(uC,null));return O.createElement(jO.Provider,{value:S},O.createElement(BO.Provider,{value:w},O.createElement("div",{className:x},typeof r=="function"?r(E,{components:{Picker:cC,Presets:uC}}):E)))};process.env.NODE_ENV!=="production"&&(o$.displayName="ColorPickerPanel");var Z4=function(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};const e3=O.forwardRef((e,t)=>{const{color:n,prefixCls:r,open:o,disabled:i,format:a,className:s,showText:l,activeIndex:c}=e,u=Z4(e,["color","prefixCls","open","disabled","format","className","showText","activeIndex"]),d=`${r}-trigger`,f=`${d}-text`,h=`${f}-cell`,[m]=Vo("ColorPicker"),v=O.useMemo(()=>{if(!l)return"";if(typeof l=="function")return l(n);if(n.cleared)return m.transparent;if(n.isGradient())return n.getColors().map((C,x)=>{const S=c!==-1&&c!==x;return O.createElement("span",{key:x,className:te(h,S&&`${h}-inactive`)},C.color.toRgbString()," ",C.percent,"%")});const y=n.toHexString().toUpperCase(),b=gg(n);switch(a){case"rgb":return n.toRgbString();case"hsb":return n.toHsbString();default:return b<100?`${y.slice(0,7)},${b}%`:y}},[n,a,l,c]),g=O.useMemo(()=>n.cleared?O.createElement(zO,{prefixCls:r}):O.createElement(ug,{prefixCls:r,color:n.toCssString()}),[n,r]);return O.createElement("div",Object.assign({ref:t,className:te(d,s,{[`${d}-active`]:o,[`${d}-disabled`]:i})},eo(u)),g,l&&O.createElement("div",{className:f},v))});function t3(e,t,n){const[r]=Vo("ColorPicker"),[o,i]=bn(e,{value:t}),[a,s]=p.useState("single"),[l,c]=p.useMemo(()=>{const v=(Array.isArray(n)?n:[n]).filter(C=>C);v.length||v.push("single");const g=new Set(v),y=[],b=(C,x)=>{g.has(C)&&y.push({label:x,value:C})};return b("single",r.singleColor),b("gradient",r.gradientColor),[y,g]},[n]),[u,d]=p.useState(null),f=tn(v=>{d(v),i(v)}),h=p.useMemo(()=>{const v=ir(o||"");return v.equals(u)?u:v},[o,u]),m=p.useMemo(()=>{var v;return c.has(a)?a:(v=l[0])===null||v===void 0?void 0:v.value},[c,a,l]);return p.useEffect(()=>{s(h.isGradient()?"gradient":"single")},[h]),[h,f,m,s,l]}const i$=(e,t)=>({backgroundImage:`conic-gradient(${t} 25%, transparent 25% 50%, ${t} 50% 75%, transparent 75% 100%)`,backgroundSize:`${e} ${e}`}),dC=(e,t)=>{const{componentCls:n,borderRadiusSM:r,colorPickerInsetShadow:o,lineWidth:i,colorFillSecondary:a}=e;return{[`${n}-color-block`]:Object.assign(Object.assign({position:"relative",borderRadius:r,width:t,height:t,boxShadow:o,flex:"none"},i$("50%",e.colorFillSecondary)),{[`${n}-color-block-inner`]:{width:"100%",height:"100%",boxShadow:`inset 0 0 0 ${oe(i)} ${a}`,borderRadius:"inherit"}})}},n3=e=>{const{componentCls:t,antCls:n,fontSizeSM:r,lineHeightSM:o,colorPickerAlphaInputWidth:i,marginXXS:a,paddingXXS:s,controlHeightSM:l,marginXS:c,fontSizeIcon:u,paddingXS:d,colorTextPlaceholder:f,colorPickerInputNumberHandleWidth:h,lineWidth:m}=e;return{[`${t}-input-container`]:{display:"flex",[`${t}-steppers${n}-input-number`]:{fontSize:r,lineHeight:o,[`${n}-input-number-input`]:{paddingInlineStart:s,paddingInlineEnd:0},[`${n}-input-number-handler-wrap`]:{width:h}},[`${t}-steppers${t}-alpha-input`]:{flex:`0 0 ${oe(i)}`,marginInlineStart:a},[`${t}-format-select${n}-select`]:{marginInlineEnd:c,width:"auto","&-single":{[`${n}-select-selector`]:{padding:0,border:0},[`${n}-select-arrow`]:{insetInlineEnd:0},[`${n}-select-selection-item`]:{paddingInlineEnd:e.calc(u).add(a).equal(),fontSize:r,lineHeight:oe(l)},[`${n}-select-item-option-content`]:{fontSize:r,lineHeight:o},[`${n}-select-dropdown`]:{[`${n}-select-item`]:{minHeight:"auto"}}}},[`${t}-input`]:{gap:a,alignItems:"center",flex:1,width:0,[`${t}-hsb-input,${t}-rgb-input`]:{display:"flex",gap:a,alignItems:"center"},[`${t}-steppers`]:{flex:1},[`${t}-hex-input${n}-input-affix-wrapper`]:{flex:1,padding:`0 ${oe(d)}`,[`${n}-input`]:{fontSize:r,textTransform:"uppercase",lineHeight:oe(e.calc(l).sub(e.calc(m).mul(2)).equal())},[`${n}-input-prefix`]:{color:f}}}}}},r3=e=>{const{componentCls:t,controlHeightLG:n,borderRadiusSM:r,colorPickerInsetShadow:o,marginSM:i,colorBgElevated:a,colorFillSecondary:s,lineWidthBold:l,colorPickerHandlerSize:c}=e;return{userSelect:"none",[`${t}-select`]:{[`${t}-palette`]:{minHeight:e.calc(n).mul(4).equal(),overflow:"hidden",borderRadius:r},[`${t}-saturation`]:{position:"absolute",borderRadius:"inherit",boxShadow:o,inset:0},marginBottom:i},[`${t}-handler`]:{width:c,height:c,border:`${oe(l)} solid ${a}`,position:"relative",borderRadius:"50%",cursor:"pointer",boxShadow:`${o}, 0 0 0 1px ${s}`}}},o3=e=>{const{componentCls:t,antCls:n,colorTextQuaternary:r,paddingXXS:o,colorPickerPresetColorSize:i,fontSizeSM:a,colorText:s,lineHeightSM:l,lineWidth:c,borderRadius:u,colorFill:d,colorWhite:f,marginXXS:h,paddingXS:m,fontHeightSM:v}=e;return{[`${t}-presets`]:{[`${n}-collapse-item > ${n}-collapse-header`]:{padding:0,[`${n}-collapse-expand-icon`]:{height:v,color:r,paddingInlineEnd:o}},[`${n}-collapse`]:{display:"flex",flexDirection:"column",gap:h},[`${n}-collapse-item > ${n}-collapse-content > ${n}-collapse-content-box`]:{padding:`${oe(m)} 0`},"&-label":{fontSize:a,color:s,lineHeight:l},"&-items":{display:"flex",flexWrap:"wrap",gap:e.calc(h).mul(1.5).equal(),[`${t}-presets-color`]:{position:"relative",cursor:"pointer",width:i,height:i,"&::before":{content:'""',pointerEvents:"none",width:e.calc(i).add(e.calc(c).mul(4)).equal(),height:e.calc(i).add(e.calc(c).mul(4)).equal(),position:"absolute",top:e.calc(c).mul(-2).equal(),insetInlineStart:e.calc(c).mul(-2).equal(),borderRadius:u,border:`${oe(c)} solid transparent`,transition:`border-color ${e.motionDurationMid} ${e.motionEaseInBack}`},"&:hover::before":{borderColor:d},"&::after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:e.calc(i).div(13).mul(5).equal(),height:e.calc(i).div(13).mul(8).equal(),border:`${oe(e.lineWidthBold)} solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`},[`&${t}-presets-color-checked`]:{"&::after":{opacity:1,borderColor:f,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`transform ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`},[`&${t}-presets-color-bright`]:{"&::after":{borderColor:"rgba(0, 0, 0, 0.45)"}}}}},"&-empty":{fontSize:a,color:r}}}},i3=e=>{const{componentCls:t,colorPickerInsetShadow:n,colorBgElevated:r,colorFillSecondary:o,lineWidthBold:i,colorPickerHandlerSizeSM:a,colorPickerSliderHeight:s,marginSM:l,marginXS:c}=e,u=e.calc(a).sub(e.calc(i).mul(2).equal()).equal(),d=e.calc(a).add(e.calc(i).mul(2).equal()).equal(),f={"&:after":{transform:"scale(1)",boxShadow:`${n}, 0 0 0 1px ${e.colorPrimaryActive}`}};return{[`${t}-slider`]:[i$(oe(s),e.colorFillSecondary),{margin:0,padding:0,height:s,borderRadius:e.calc(s).div(2).equal(),"&-rail":{height:s,borderRadius:e.calc(s).div(2).equal(),boxShadow:n},[`& ${t}-slider-handle`]:{width:u,height:u,top:0,borderRadius:"100%","&:before":{display:"block",position:"absolute",background:"transparent",left:{_skip_check_:!0,value:"50%"},top:"50%",transform:"translate(-50%, -50%)",width:d,height:d,borderRadius:"100%"},"&:after":{width:a,height:a,border:`${oe(i)} solid ${r}`,boxShadow:`${n}, 0 0 0 1px ${o}`,outline:"none",insetInlineStart:e.calc(i).mul(-1).equal(),top:e.calc(i).mul(-1).equal(),background:"transparent",transition:"none"},"&:focus":f}}],[`${t}-slider-container`]:{display:"flex",gap:l,marginBottom:l,[`${t}-slider-group`]:{flex:1,flexDirection:"column",justifyContent:"space-between",display:"flex","&-disabled-alpha":{justifyContent:"center"}}},[`${t}-gradient-slider`]:{marginBottom:c,[`& ${t}-slider-handle`]:{"&:after":{transform:"scale(0.8)"},"&-active, &:focus":f}}}},rm=(e,t,n)=>({borderInlineEndWidth:e.lineWidth,borderColor:t,boxShadow:`0 0 0 ${oe(e.controlOutlineWidth)} ${n}`,outline:0}),a3=e=>{const{componentCls:t}=e;return{"&-rtl":{[`${t}-presets-color`]:{"&::after":{direction:"ltr"}},[`${t}-clear`]:{"&::after":{direction:"ltr"}}}}},fC=(e,t,n)=>{const{componentCls:r,borderRadiusSM:o,lineWidth:i,colorSplit:a,colorBorder:s,red6:l}=e;return{[`${r}-clear`]:Object.assign(Object.assign({width:t,height:t,borderRadius:o,border:`${oe(i)} solid ${a}`,position:"relative",overflow:"hidden",cursor:"inherit",transition:`all ${e.motionDurationFast}`},n),{"&::after":{content:'""',position:"absolute",insetInlineEnd:e.calc(i).mul(-1).equal(),top:e.calc(i).mul(-1).equal(),display:"block",width:40,height:2,transformOrigin:"calc(100% - 1px) 1px",transform:"rotate(-45deg)",backgroundColor:l},"&:hover":{borderColor:s}})}},s3=e=>{const{componentCls:t,colorError:n,colorWarning:r,colorErrorHover:o,colorWarningHover:i,colorErrorOutline:a,colorWarningOutline:s}=e;return{[`&${t}-status-error`]:{borderColor:n,"&:hover":{borderColor:o},[`&${t}-trigger-active`]:Object.assign({},rm(e,n,a))},[`&${t}-status-warning`]:{borderColor:r,"&:hover":{borderColor:i},[`&${t}-trigger-active`]:Object.assign({},rm(e,r,s))}}},l3=e=>{const{componentCls:t,controlHeightLG:n,controlHeightSM:r,controlHeight:o,controlHeightXS:i,borderRadius:a,borderRadiusSM:s,borderRadiusXS:l,borderRadiusLG:c,fontSizeLG:u}=e;return{[`&${t}-lg`]:{minWidth:n,minHeight:n,borderRadius:c,[`${t}-color-block, ${t}-clear`]:{width:o,height:o,borderRadius:a},[`${t}-trigger-text`]:{fontSize:u}},[`&${t}-sm`]:{minWidth:r,minHeight:r,borderRadius:s,[`${t}-color-block, ${t}-clear`]:{width:i,height:i,borderRadius:l},[`${t}-trigger-text`]:{lineHeight:oe(i)}}}},c3=e=>{const{antCls:t,componentCls:n,colorPickerWidth:r,colorPrimary:o,motionDurationMid:i,colorBgElevated:a,colorTextDisabled:s,colorText:l,colorBgContainerDisabled:c,borderRadius:u,marginXS:d,marginSM:f,controlHeight:h,controlHeightSM:m,colorBgTextActive:v,colorPickerPresetColorSize:g,colorPickerPreviewSize:y,lineWidth:b,colorBorder:C,paddingXXS:x,fontSize:S,colorPrimaryHover:w,controlOutline:E}=e;return[{[n]:Object.assign({[`${n}-inner`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({"&-content":{display:"flex",flexDirection:"column",width:r,[`& > ${t}-divider`]:{margin:`${oe(f)} 0 ${oe(d)}`}},[`${n}-panel`]:Object.assign({},r3(e))},i3(e)),dC(e,y)),n3(e)),o3(e)),fC(e,g,{marginInlineStart:"auto"})),{[`${n}-operation`]:{display:"flex",justifyContent:"space-between",marginBottom:d}}),"&-trigger":Object.assign(Object.assign(Object.assign(Object.assign({minWidth:h,minHeight:h,borderRadius:u,border:`${oe(b)} solid ${C}`,cursor:"pointer",display:"inline-flex",alignItems:"flex-start",justifyContent:"center",transition:`all ${i}`,background:a,padding:e.calc(x).sub(b).equal(),[`${n}-trigger-text`]:{marginInlineStart:d,marginInlineEnd:e.calc(d).sub(e.calc(x).sub(b)).equal(),fontSize:S,color:l,alignSelf:"center","&-cell":{"&:not(:last-child):after":{content:'", "'},"&-inactive":{color:s}}},"&:hover":{borderColor:w},[`&${n}-trigger-active`]:Object.assign({},rm(e,o,E)),"&-disabled":{color:s,background:c,cursor:"not-allowed","&:hover":{borderColor:v},[`${n}-trigger-text`]:{color:s}}},fC(e,m)),dC(e,m)),s3(e)),l3(e))},a3(e))},Rl(e,{focusElCls:`${n}-trigger-active`})]},u3=yn("ColorPicker",e=>{const{colorTextQuaternary:t,marginSM:n}=e,r=8,o=Xt(e,{colorPickerWidth:234,colorPickerHandlerSize:16,colorPickerHandlerSizeSM:12,colorPickerAlphaInputWidth:44,colorPickerInputNumberHandleWidth:16,colorPickerPresetColorSize:24,colorPickerInsetShadow:`inset 0 0 1px 0 ${t}`,colorPickerSliderHeight:r,colorPickerPreviewSize:e.calc(r).mul(2).add(n).equal()});return[c3(o)]});var d3=function(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};const Hd=e=>{const{mode:t,value:n,defaultValue:r,format:o,defaultFormat:i,allowClear:a=!1,presets:s,children:l,trigger:c="click",open:u,disabled:d,placement:f="bottomLeft",arrow:h=!0,panelRender:m,showText:v,style:g,className:y,size:b,rootClassName:C,prefixCls:x,styles:S,disabledAlpha:w=!1,onFormatChange:E,onChange:N,onClear:$,onOpenChange:M,onChangeComplete:R,getPopupContainer:k,autoAdjustOverflow:D=!0,destroyTooltipOnHide:A,disabledFormat:L}=e,T=d3(e,["mode","value","defaultValue","format","defaultFormat","allowClear","presets","children","trigger","open","disabled","placement","arrow","panelRender","showText","style","className","size","rootClassName","prefixCls","styles","disabledAlpha","onFormatChange","onChange","onClear","onOpenChange","onChangeComplete","getPopupContainer","autoAdjustOverflow","destroyTooltipOnHide","disabledFormat"]),{getPrefixCls:I,direction:_,colorPicker:W}=O.useContext(_t),H=O.useContext(Fr),B=d??H,[K,Y]=bn(!1,{value:u,postState:We=>!B&&We,onChange:M}),[V,G]=bn(o,{value:o,defaultValue:i,onChange:E}),Q=I("color-picker",x),[ce,Z,he,ye,fe]=t3(r,n,t),ae=O.useMemo(()=>gg(ce)<100,[ce]),[ve,ne]=O.useState(null),se=We=>{if(R){let rt=ir(We);w&&ae&&(rt=jc(We)),R(rt)}},pe=(We,rt)=>{let gt=ir(We);w&&ae&&(gt=jc(gt)),Z(gt),ne(null),N&&N(gt,gt.toCssString()),rt||se(gt)},[Ne,Me]=O.useState(0),[$e,Be]=O.useState(!1),F=We=>{if(ye(We),We==="single"&&ce.isGradient())Me(0),pe(new Er(ce.getColors()[0].color)),ne(ce);else if(We==="gradient"&&!ce.isGradient()){const rt=ae?jc(ce):ce;pe(new Er(ve||[{percent:0,color:rt},{percent:100,color:rt}]))}},{status:be}=O.useContext(Mr),{compactSize:ue,compactItemClassnames:me}=Ei(Q,_),Re=Vr(We=>{var rt;return(rt=b??ue)!==null&&rt!==void 0?rt:We}),Te=oo(Q),[xe,Ve,qe]=u3(Q,Te),Pe={[`${Q}-rtl`]:_},Ke=te(C,qe,Te,Pe),Je=te(ea(Q,be),{[`${Q}-sm`]:Re==="small",[`${Q}-lg`]:Re==="large"},me,W==null?void 0:W.className,Ke,y,Ve),De=te(Q,Ke);if(process.env.NODE_ENV!=="production"){const We=fn("ColorPicker");process.env.NODE_ENV!=="production"&&We(!(w&&ae),"usage","`disabledAlpha` will make the alpha to be 100% when use alpha color.")}const ze={open:K,trigger:c,placement:f,arrow:h,rootClassName:C,getPopupContainer:k,autoAdjustOverflow:D,destroyTooltipOnHide:A},_e=Object.assign(Object.assign({},W==null?void 0:W.style),g);return xe(O.createElement(_d,Object.assign({style:S==null?void 0:S.popup,styles:{body:S==null?void 0:S.popupOverlayInner},onOpenChange:We=>{(!We||!B)&&Y(We)},content:O.createElement(vi,{form:!0},O.createElement(o$,{mode:he,onModeChange:F,modeOptions:fe,prefixCls:Q,value:ce,allowClear:a,disabled:B,disabledAlpha:w,presets:s,panelRender:m,format:V,onFormatChange:G,onChange:pe,onChangeComplete:se,onClear:$,activeIndex:Ne,onActive:Me,gradientDragging:$e,onGradientDragging:Be,disabledFormat:L})),classNames:{root:De}},ze),l||O.createElement(e3,Object.assign({activeIndex:K?Ne:-1,open:K,className:Je,style:_e,prefixCls:Q,disabled:B,showText:v,format:V},T,{color:ce}))))};process.env.NODE_ENV!=="production"&&(Hd.displayName="ColorPicker");const f3=Sg(Hd,void 0,e=>Object.assign(Object.assign({},e),{placement:"bottom",autoAdjustOverflow:!1}),"color-picker",e=>e);Hd._InternalPanelDoNotUseOrYouWillBeFired=f3;function hC(e){return["small","middle","large"].includes(e)}function pC(e){return e?typeof e=="number"&&!Number.isNaN(e):!1}const a$=O.createContext({latestIndex:0}),h3=a$.Provider,p3=e=>{let{className:t,index:n,children:r,split:o,style:i}=e;const{latestIndex:a}=p.useContext(a$);return r==null?null:p.createElement(p.Fragment,null,p.createElement("div",{className:t,style:i},r),n<a&&o&&p.createElement("span",{className:`${t}-split`},o))};var m3=function(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};const g3=p.forwardRef((e,t)=>{var n;const{getPrefixCls:r,direction:o,size:i,className:a,style:s,classNames:l,styles:c}=Rr("space"),{size:u=i??"small",align:d,className:f,rootClassName:h,children:m,direction:v="horizontal",prefixCls:g,split:y,style:b,wrap:C=!1,classNames:x,styles:S}=e,w=m3(e,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[E,N]=Array.isArray(u)?u:[u,u],$=hC(N),M=hC(E),R=pC(N),k=pC(E),D=Nr(m,{keepEmpty:!0}),A=d===void 0&&v==="horizontal"?"center":d,L=r("space",g),[T,I,_]=Ew(L),W=te(L,a,I,`${L}-${v}`,{[`${L}-rtl`]:o==="rtl",[`${L}-align-${A}`]:A,[`${L}-gap-row-${N}`]:$,[`${L}-gap-col-${E}`]:M},f,h,_),H=te(`${L}-item`,(n=x==null?void 0:x.item)!==null&&n!==void 0?n:l.item);let B=0;const K=D.map((G,Q)=>{var ce;G!=null&&(B=Q);const Z=(G==null?void 0:G.key)||`${H}-${Q}`;return p.createElement(p3,{className:H,key:Z,index:Q,split:y,style:(ce=S==null?void 0:S.item)!==null&&ce!==void 0?ce:c.item},G)}),Y=p.useMemo(()=>({latestIndex:B}),[B]);if(D.length===0)return null;const V={};return C&&(V.flexWrap="wrap"),!M&&k&&(V.columnGap=E),!$&&R&&(V.rowGap=N),T(p.createElement("div",Object.assign({ref:t,className:W,style:Object.assign(Object.assign(Object.assign({},V),s),b)},w),p.createElement(h3,{value:Y},K)))}),Yg=g3;Yg.Compact=x_;process.env.NODE_ENV!=="production"&&(Yg.displayName="Space");var v3=function(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};const s$=e=>{const{getPopupContainer:t,getPrefixCls:n,direction:r}=p.useContext(_t),{prefixCls:o,type:i="default",danger:a,disabled:s,loading:l,onClick:c,htmlType:u,children:d,className:f,menu:h,arrow:m,autoFocus:v,overlay:g,trigger:y,align:b,open:C,onOpenChange:x,placement:S,getPopupContainer:w,href:E,icon:N=p.createElement(Hg,null),title:$,buttonsRender:M=Z=>Z,mouseEnterDelay:R,mouseLeaveDelay:k,overlayClassName:D,overlayStyle:A,destroyPopupOnHide:L,dropdownRender:T}=e,I=v3(e,["prefixCls","type","danger","disabled","loading","onClick","htmlType","children","className","menu","arrow","autoFocus","overlay","trigger","align","open","onOpenChange","placement","getPopupContainer","href","icon","title","buttonsRender","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyPopupOnHide","dropdownRender"]),_=n("dropdown",o),W=`${_}-button`,H={menu:h,arrow:m,autoFocus:v,align:b,disabled:s,trigger:s?[]:y,onOpenChange:x,getPopupContainer:w||t,mouseEnterDelay:R,mouseLeaveDelay:k,overlayClassName:D,overlayStyle:A,destroyPopupOnHide:L,dropdownRender:T},{compactSize:B,compactItemClassnames:K}=Ei(_,r),Y=te(W,K,f);"overlay"in e&&(H.overlay=g),"open"in e&&(H.open=C),"placement"in e?H.placement=S:H.placement=r==="rtl"?"bottomLeft":"bottomRight";const V=p.createElement(Lo,{type:i,danger:a,disabled:s,loading:l,onClick:c,htmlType:u,href:E,title:$},d),G=p.createElement(Lo,{type:i,danger:a,icon:N}),[Q,ce]=M([V,G]);return p.createElement(Yg.Compact,Object.assign({className:Y,size:B,block:!0},I),Q,p.createElement(Bl,Object.assign({},H),ce))};s$.__ANT_BUTTON=!0;const Oi=Bl;Oi.Button=s$;var b3={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},y3=function(t,n){return p.createElement(Wn,He({},t,{ref:n,icon:b3}))},l$=p.forwardRef(y3);process.env.NODE_ENV!=="production"&&(l$.displayName="EyeOutlined");const C3=e=>{const{getPrefixCls:t,direction:n}=O.useContext(_t),{prefixCls:r,className:o}=e,i=t("input-group",r),a=t("input"),[s,l,c]=kO(a),u=te(i,c,{[`${i}-lg`]:e.size==="large",[`${i}-sm`]:e.size==="small",[`${i}-compact`]:e.compact,[`${i}-rtl`]:n==="rtl"},l,o),d=O.useContext(Mr),f=O.useMemo(()=>Object.assign(Object.assign({},d),{isFormItemInput:!1}),[d]);return process.env.NODE_ENV!=="production"&&fn("Input.Group").deprecated(!1,"Input.Group","Space.Compact"),s(p.createElement("span",{className:u,style:e.style,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onFocus:e.onFocus,onBlur:e.onBlur},p.createElement(Mr.Provider,{value:f},e.children)))},S3=e=>{const{componentCls:t,paddingXS:n}=e;return{[t]:{display:"inline-flex",alignItems:"center",flexWrap:"nowrap",columnGap:n,"&-rtl":{direction:"rtl"},[`${t}-input`]:{textAlign:"center",paddingInline:e.paddingXXS},[`&${t}-sm ${t}-input`]:{paddingInline:e.calc(e.paddingXXS).div(2).equal()},[`&${t}-lg ${t}-input`]:{paddingInline:e.paddingXS}}}},x3=yn(["Input","OTP"],e=>{const t=Xt(e,zl(e));return[S3(t)]},Fl);var w3=function(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};const E3=p.forwardRef((e,t)=>{const{value:n,onChange:r,onActiveChange:o,index:i,mask:a}=e,s=w3(e,["value","onChange","onActiveChange","index","mask"]),l=n&&typeof a=="string"?a:n,c=m=>{r(i,m.target.value)},u=p.useRef(null);p.useImperativeHandle(t,()=>u.current);const d=()=>{Ht(()=>{var m;const v=(m=u.current)===null||m===void 0?void 0:m.input;document.activeElement===v&&v&&v.select()})},f=m=>{const{key:v,ctrlKey:g,metaKey:y}=m;v==="ArrowLeft"?o(i-1):v==="ArrowRight"?o(i+1):v==="z"&&(g||y)&&m.preventDefault(),d()},h=m=>{m.key==="Backspace"&&!n&&o(i-1),d()};return p.createElement(ns,Object.assign({type:a===!0?"password":"text"},s,{ref:u,value:l,onInput:c,onFocus:d,onKeyDown:f,onKeyUp:h,onMouseDown:d,onMouseUp:d}))});var O3=function(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 hc(e){return(e||"").split("")}const $3=e=>{const{index:t,prefixCls:n,separator:r}=e,o=typeof r=="function"?r(t):r;return o?p.createElement("span",{className:`${n}-separator`},o):null},N3=p.forwardRef((e,t)=>{const{prefixCls:n,length:r=6,size:o,defaultValue:i,value:a,onChange:s,formatter:l,separator:c,variant:u,disabled:d,status:f,autoFocus:h,mask:m,type:v,onInput:g,inputMode:y}=e,b=O3(e,["prefixCls","length","size","defaultValue","value","onChange","formatter","separator","variant","disabled","status","autoFocus","mask","type","onInput","inputMode"]);if(process.env.NODE_ENV!=="production"){const V=fn("Input.OTP");process.env.NODE_ENV!=="production"&&V(!(typeof m=="string"&&m.length>1),"usage","`mask` prop should be a single character.")}const{getPrefixCls:C,direction:x}=p.useContext(_t),S=C("otp",n),w=eo(b,{aria:!0,data:!0,attr:!0}),[E,N,$]=x3(S),M=Vr(V=>o??V),R=p.useContext(Mr),k=_l(R.status,f),D=p.useMemo(()=>Object.assign(Object.assign({},R),{status:k,hasFeedback:!1,feedbackIcon:null}),[R,k]),A=p.useRef(null),L=p.useRef({});p.useImperativeHandle(t,()=>({focus:()=>{var V;(V=L.current[0])===null||V===void 0||V.focus()},blur:()=>{var V;for(let G=0;G<r;G+=1)(V=L.current[G])===null||V===void 0||V.blur()},nativeElement:A.current}));const T=V=>l?l(V):V,[I,_]=p.useState(()=>hc(T(i||"")));p.useEffect(()=>{a!==void 0&&_(hc(a))},[a]);const W=tn(V=>{_(V),g&&g(V),s&&V.length===r&&V.every(G=>G)&&V.some((G,Q)=>I[Q]!==G)&&s(V.join(""))}),H=tn((V,G)=>{let Q=Le(I);for(let Z=0;Z<V;Z+=1)Q[Z]||(Q[Z]="");G.length<=1?Q[V]=G:Q=Q.slice(0,V).concat(hc(G)),Q=Q.slice(0,r);for(let Z=Q.length-1;Z>=0&&!Q[Z];Z-=1)Q.pop();const ce=T(Q.map(Z=>Z||" ").join(""));return Q=hc(ce).map((Z,he)=>Z===" "&&!Q[he]?Q[he]:Z),Q}),B=(V,G)=>{var Q;const ce=H(V,G),Z=Math.min(V+G.length,r-1);Z!==V&&ce[V]!==void 0&&((Q=L.current[Z])===null||Q===void 0||Q.focus()),W(ce)},K=V=>{var G;(G=L.current[V])===null||G===void 0||G.focus()},Y={variant:u,disabled:d,status:k,mask:m,type:v,inputMode:y};return E(p.createElement("div",Object.assign({},w,{ref:A,className:te(S,{[`${S}-sm`]:M==="small",[`${S}-lg`]:M==="large",[`${S}-rtl`]:x==="rtl"},$,N)}),p.createElement(Mr.Provider,{value:D},Array.from({length:r}).map((V,G)=>{const Q=`otp-${G}`,ce=I[G]||"";return p.createElement(p.Fragment,{key:Q},p.createElement(E3,Object.assign({ref:Z=>{L.current[G]=Z},index:G,size:M,htmlSize:1,className:`${S}-input`,onChange:B,value:ce,onActiveChange:K,autoFocus:G===0&&h},Y)),G<r-1&&p.createElement($3,{separator:c,index:G,prefixCls:S}))}))))});var M3={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"},R3=function(t,n){return p.createElement(Wn,He({},t,{ref:n,icon:M3}))},c$=p.forwardRef(R3);process.env.NODE_ENV!=="production"&&(c$.displayName="EyeInvisibleOutlined");var I3=function(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};const T3=e=>e?p.createElement(l$,null):p.createElement(c$,null),A3={click:"onClick",hover:"onMouseOver"},u$=p.forwardRef((e,t)=>{const{disabled:n,action:r="click",visibilityToggle:o=!0,iconRender:i=T3}=e,a=p.useContext(Fr),s=n??a,l=typeof o=="object"&&o.visible!==void 0,[c,u]=O.useState(()=>l?o.visible:!1),d=O.useRef(null);p.useEffect(()=>{l&&u(o.visible)},[l,o]);const f=YO(d),h=()=>{var M;if(s)return;c&&f();const R=!c;u(R),typeof o=="object"&&((M=o.onVisibleChange)===null||M===void 0||M.call(o,R))},m=M=>{const R=A3[r]||"",k=i(c),D={[R]:h,className:`${M}-icon`,key:"passwordIcon",onMouseDown:A=>{A.preventDefault()},onMouseUp:A=>{A.preventDefault()}};return p.cloneElement(p.isValidElement(k)?k:p.createElement("span",null,k),D)},{className:v,prefixCls:g,inputPrefixCls:y,size:b}=e,C=I3(e,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:x}=p.useContext(_t),S=x("input",y),w=x("input-password",g),E=o&&m(w),N=te(w,v,{[`${w}-${b}`]:!!b}),$=Object.assign(Object.assign({},Hn(C,["suffix","iconRender","visibilityToggle"])),{type:c?"text":"password",className:N,prefixCls:S,suffix:E});return b&&($.size=b),p.createElement(ns,Object.assign({ref:mr(t,d)},$))});process.env.NODE_ENV!=="production"&&(u$.displayName="Input.Password");var P3=function(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};const d$=p.forwardRef((e,t)=>{const{prefixCls:n,inputPrefixCls:r,className:o,size:i,suffix:a,enterButton:s=!1,addonAfter:l,loading:c,disabled:u,onSearch:d,onChange:f,onCompositionStart:h,onCompositionEnd:m}=e,v=P3(e,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:g,direction:y}=p.useContext(_t),b=p.useRef(!1),C=g("input-search",n),x=g("input",r),{compactSize:S}=Ei(C,y),w=Vr(B=>{var K;return(K=i??S)!==null&&K!==void 0?K:B}),E=p.useRef(null),N=B=>{B!=null&&B.target&&B.type==="click"&&d&&d(B.target.value,B,{source:"clear"}),f==null||f(B)},$=B=>{var K;document.activeElement===((K=E.current)===null||K===void 0?void 0:K.input)&&B.preventDefault()},M=B=>{var K,Y;d&&d((Y=(K=E.current)===null||K===void 0?void 0:K.input)===null||Y===void 0?void 0:Y.value,B,{source:"input"})},R=B=>{b.current||c||M(B)},k=typeof s=="boolean"?p.createElement(Tg,null):null,D=`${C}-button`;let A;const L=s||{},T=L.type&&L.type.__ANT_BUTTON===!0;T||L.type==="button"?A=Hr(L,Object.assign({onMouseDown:$,onClick:B=>{var K,Y;(Y=(K=L==null?void 0:L.props)===null||K===void 0?void 0:K.onClick)===null||Y===void 0||Y.call(K,B),M(B)},key:"enterButton"},T?{className:D,size:w}:{})):A=p.createElement(Lo,{className:D,type:s?"primary":void 0,size:w,disabled:u,key:"enterButton",onMouseDown:$,onClick:M,loading:c,icon:k},s),l&&(A=[A,Hr(l,{key:"addonAfter"})]);const I=te(C,{[`${C}-rtl`]:y==="rtl",[`${C}-${w}`]:!!w,[`${C}-with-button`]:!!s},o),_=Object.assign(Object.assign({},v),{className:I,prefixCls:x,type:"search"}),W=B=>{b.current=!0,h==null||h(B)},H=B=>{b.current=!1,m==null||m(B)};return p.createElement(ns,Object.assign({ref:mr(E,t),onPressEnter:R},_,{size:w,onCompositionStart:W,onCompositionEnd:H,addonAfter:A,suffix:a,onChange:N,disabled:u}))});process.env.NODE_ENV!=="production"&&(d$.displayName="Search");var k3=`
434
+ min-height:0 !important;
435
+ max-height:none !important;
436
+ height:0 !important;
437
+ visibility:hidden !important;
438
+ overflow:hidden !important;
439
+ position:absolute !important;
440
+ z-index:-1000 !important;
441
+ top:0 !important;
442
+ right:0 !important;
443
+ pointer-events: none !important;
444
+ `,D3=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],ih={},Sr;function _3(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&ih[n])return ih[n];var r=window.getComputedStyle(e),o=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),i=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),a=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),s=D3.map(function(c){return"".concat(c,":").concat(r.getPropertyValue(c))}).join(";"),l={sizingStyle:s,paddingSize:i,borderSize:a,boxSizing:o};return t&&n&&(ih[n]=l),l}function L3(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;Sr||(Sr=document.createElement("textarea"),Sr.setAttribute("tab-index","-1"),Sr.setAttribute("aria-hidden","true"),Sr.setAttribute("name","hiddenTextarea"),document.body.appendChild(Sr)),e.getAttribute("wrap")?Sr.setAttribute("wrap",e.getAttribute("wrap")):Sr.removeAttribute("wrap");var o=_3(e,t),i=o.paddingSize,a=o.borderSize,s=o.boxSizing,l=o.sizingStyle;Sr.setAttribute("style","".concat(l,";").concat(k3)),Sr.value=e.value||e.placeholder||"";var c=void 0,u=void 0,d,f=Sr.scrollHeight;if(s==="border-box"?f+=a:s==="content-box"&&(f-=i),n!==null||r!==null){Sr.value=" ";var h=Sr.scrollHeight-i;n!==null&&(c=h*n,s==="border-box"&&(c=c+i+a),f=Math.max(c,f)),r!==null&&(u=h*r,s==="border-box"&&(u=u+i+a),d=f>u?"":"hidden",f=Math.min(u,f))}var m={height:f,overflowY:d,resize:"none"};return c&&(m.minHeight=c),u&&(m.maxHeight=u),m}var j3=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],ah=0,sh=1,lh=2,B3=p.forwardRef(function(e,t){var n=e,r=n.prefixCls,o=n.defaultValue,i=n.value,a=n.autoSize,s=n.onResize,l=n.className,c=n.style,u=n.disabled,d=n.onChange,f=n.onInternalAutoSize,h=Mt(n,j3),m=bn(o,{value:i,postState:function(G){return G??""}}),v=de(m,2),g=v[0],y=v[1],b=function(G){y(G.target.value),d==null||d(G)},C=p.useRef();p.useImperativeHandle(t,function(){return{textArea:C.current}});var x=p.useMemo(function(){return a&&ht(a)==="object"?[a.minRows,a.maxRows]:[]},[a]),S=de(x,2),w=S[0],E=S[1],N=!!a,$=function(){try{if(document.activeElement===C.current){var G=C.current,Q=G.selectionStart,ce=G.selectionEnd,Z=G.scrollTop;C.current.setSelectionRange(Q,ce),C.current.scrollTop=Z}}catch{}},M=p.useState(lh),R=de(M,2),k=R[0],D=R[1],A=p.useState(),L=de(A,2),T=L[0],I=L[1],_=function(){D(ah),process.env.NODE_ENV==="test"&&(f==null||f())};cn(function(){N&&_()},[i,w,E,N]),cn(function(){if(k===ah)D(sh);else if(k===sh){var V=L3(C.current,!1,w,E);D(lh),I(V)}else $()},[k]);var W=p.useRef(),H=function(){Ht.cancel(W.current)},B=function(G){k===lh&&(s==null||s(G),a&&(H(),W.current=Ht(function(){_()})))};p.useEffect(function(){return H},[]);var K=N?T:null,Y=q(q({},c),K);return(k===ah||k===sh)&&(Y.overflowY="hidden",Y.overflowX="hidden"),p.createElement(Fo,{onResize:B,disabled:!(a||s)},p.createElement("textarea",He({},h,{ref:C,style:Y,className:te(r,l,U({},"".concat(r,"-disabled"),u)),disabled:u,value:g,onChange:b})))}),z3=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],F3=O.forwardRef(function(e,t){var n,r=e.defaultValue,o=e.value,i=e.onFocus,a=e.onBlur,s=e.onChange,l=e.allowClear,c=e.maxLength,u=e.onCompositionStart,d=e.onCompositionEnd,f=e.suffix,h=e.prefixCls,m=h===void 0?"rc-textarea":h,v=e.showCount,g=e.count,y=e.className,b=e.style,C=e.disabled,x=e.hidden,S=e.classNames,w=e.styles,E=e.onResize,N=e.onClear,$=e.onPressEnter,M=e.readOnly,R=e.autoSize,k=e.onKeyDown,D=Mt(e,z3),A=bn(r,{value:o,defaultValue:r}),L=de(A,2),T=L[0],I=L[1],_=T==null?"":String(T),W=O.useState(!1),H=de(W,2),B=H[0],K=H[1],Y=O.useRef(!1),V=O.useState(null),G=de(V,2),Q=G[0],ce=G[1],Z=O.useRef(null),he=O.useRef(null),ye=function(){var ze;return(ze=he.current)===null||ze===void 0?void 0:ze.textArea},fe=function(){ye().focus()};O.useImperativeHandle(t,function(){var De;return{resizableTextArea:he.current,focus:fe,blur:function(){ye().blur()},nativeElement:((De=Z.current)===null||De===void 0?void 0:De.nativeElement)||ye()}}),O.useEffect(function(){K(function(De){return!C&&De})},[C]);var ae=O.useState(null),ve=de(ae,2),ne=ve[0],se=ve[1];O.useEffect(function(){if(ne){var De;(De=ye()).setSelectionRange.apply(De,Le(ne))}},[ne]);var pe=qO(g,v),Ne=(n=pe.max)!==null&&n!==void 0?n:c,Me=Number(Ne)>0,$e=pe.strategy(_),Be=!!Ne&&$e>Ne,F=function(ze,_e){var We=_e;!Y.current&&pe.exceedFormatter&&pe.max&&pe.strategy(_e)>pe.max&&(We=pe.exceedFormatter(_e,{max:pe.max}),_e!==We&&se([ye().selectionStart||0,ye().selectionEnd||0])),I(We),wu(ze.currentTarget,ze,s,We)},be=function(ze){Y.current=!0,u==null||u(ze)},ue=function(ze){Y.current=!1,F(ze,ze.currentTarget.value),d==null||d(ze)},me=function(ze){F(ze,ze.target.value)},Re=function(ze){ze.key==="Enter"&&$&&$(ze),k==null||k(ze)},Te=function(ze){K(!0),i==null||i(ze)},xe=function(ze){K(!1),a==null||a(ze)},Ve=function(ze){I(""),fe(),wu(ye(),ze,s)},qe=f,Pe;pe.show&&(pe.showFormatter?Pe=pe.showFormatter({value:_,count:$e,maxLength:Ne}):Pe="".concat($e).concat(Me?" / ".concat(Ne):""),qe=O.createElement(O.Fragment,null,qe,O.createElement("span",{className:te("".concat(m,"-data-count"),S==null?void 0:S.count),style:w==null?void 0:w.count},Pe)));var Ke=function(ze){var _e;E==null||E(ze),(_e=ye())!==null&&_e!==void 0&&_e.style.height&&ce(!0)},Je=!R&&!v&&!l;return O.createElement(Kg,{ref:Z,value:_,allowClear:l,handleReset:Ve,suffix:qe,prefixCls:m,classNames:q(q({},S),{},{affixWrapper:te(S==null?void 0:S.affixWrapper,U(U({},"".concat(m,"-show-count"),v),"".concat(m,"-textarea-allow-clear"),l))}),disabled:C,focused:B,className:te(y,Be&&"".concat(m,"-out-of-range")),style:q(q({},b),Q&&!Je?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Pe=="string"?Pe:void 0}},hidden:x,readOnly:M,onClear:N},O.createElement(B3,He({},D,{autoSize:R,maxLength:c,onKeyDown:Re,onChange:me,onFocus:Te,onBlur:xe,onCompositionStart:be,onCompositionEnd:ue,className:te(S==null?void 0:S.textarea),style:q(q({},w==null?void 0:w.textarea),{},{resize:b==null?void 0:b.resize}),disabled:C,prefixCls:m,onResize:Ke,ref:he,readOnly:M})))});const H3=e=>{const{componentCls:t,paddingLG:n}=e,r=`${t}-textarea`;return{[`textarea${t}`]:{maxWidth:"100%",height:"auto",minHeight:e.controlHeight,lineHeight:e.lineHeight,verticalAlign:"bottom",transition:`all ${e.motionDurationSlow}`,resize:"vertical",[`&${t}-mouse-active`]:{transition:`all ${e.motionDurationSlow}, height 0s, width 0s`}},[`${t}-textarea-affix-wrapper-resize-dirty`]:{width:"auto"},[r]:{position:"relative","&-show-count":{[`> ${t}`]:{height:"100%"},[`${t}-data-count`]:{position:"absolute",bottom:e.calc(e.fontSize).mul(e.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:e.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},[`
445
+ &-allow-clear > ${t},
446
+ &-affix-wrapper${r}-has-feedback ${t}
447
+ `]:{paddingInlineEnd:n},[`&-affix-wrapper${t}-affix-wrapper`]:{padding:0,[`> textarea${t}`]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent",minHeight:e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:"none !important"}},[`${t}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${t}-clear-icon`]:{position:"absolute",insetInlineEnd:e.paddingInline,insetBlockStart:e.paddingXS},[`${r}-suffix`]:{position:"absolute",top:0,insetInlineEnd:e.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}},[`&-affix-wrapper${t}-affix-wrapper-sm`]:{[`${t}-suffix`]:{[`${t}-clear-icon`]:{insetInlineEnd:e.paddingInlineSM}}}}}},V3=yn(["Input","TextArea"],e=>{const t=Xt(e,zl(e));return[H3(t)]},Fl,{resetFont:!1});var W3=function(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};const U3=O.forwardRef((e,t)=>{var n;const{prefixCls:r,bordered:o=!0,size:i,disabled:a,status:s,allowClear:l,classNames:c,rootClassName:u,className:d,style:f,styles:h,variant:m,showCount:v,onMouseDown:g,onResize:y}=e,b=W3(e,["prefixCls","bordered","size","disabled","status","allowClear","classNames","rootClassName","className","style","styles","variant","showCount","onMouseDown","onResize"]);if(process.env.NODE_ENV!=="production"){const{deprecated:pe}=fn("TextArea");pe(!("bordered"in e),"bordered","variant")}const{getPrefixCls:C,direction:x,allowClear:S,autoComplete:w,className:E,style:N,classNames:$,styles:M}=Rr("textArea"),R=p.useContext(Fr),k=a??R,{status:D,hasFeedback:A,feedbackIcon:L}=p.useContext(Mr),T=_l(D,s),I=p.useRef(null);p.useImperativeHandle(t,()=>{var pe;return{resizableTextArea:(pe=I.current)===null||pe===void 0?void 0:pe.resizableTextArea,focus:Ne=>{var Me,$e;qg(($e=(Me=I.current)===null||Me===void 0?void 0:Me.resizableTextArea)===null||$e===void 0?void 0:$e.textArea,Ne)},blur:()=>{var Ne;return(Ne=I.current)===null||Ne===void 0?void 0:Ne.blur()}}});const _=C("input",r),W=oo(_),[H,B,K]=PO(_,u),[Y]=V3(_,W),{compactSize:V,compactItemClassnames:G}=Ei(_,x),Q=Vr(pe=>{var Ne;return(Ne=i??V)!==null&&Ne!==void 0?Ne:pe}),[ce,Z]=kd("textArea",m,o),he=XO(l??S),[ye,fe]=p.useState(!1),[ae,ve]=p.useState(!1),ne=pe=>{fe(!0),g==null||g(pe);const Ne=()=>{fe(!1),document.removeEventListener("mouseup",Ne)};document.addEventListener("mouseup",Ne)},se=pe=>{var Ne,Me;if(y==null||y(pe),ye&&typeof getComputedStyle=="function"){const $e=(Me=(Ne=I.current)===null||Ne===void 0?void 0:Ne.nativeElement)===null||Me===void 0?void 0:Me.querySelector("textarea");$e&&getComputedStyle($e).resize==="both"&&ve(!0)}};return H(Y(p.createElement(F3,Object.assign({autoComplete:w},b,{style:Object.assign(Object.assign({},N),f),styles:Object.assign(Object.assign({},M),h),disabled:k,allowClear:he,className:te(K,W,d,u,G,E,ae&&`${_}-textarea-affix-wrapper-resize-dirty`),classNames:Object.assign(Object.assign(Object.assign({},c),$),{textarea:te({[`${_}-sm`]:Q==="small",[`${_}-lg`]:Q==="large"},B,c==null?void 0:c.textarea,$.textarea,ye&&`${_}-mouse-active`),variant:te({[`${_}-${ce}`]:Z},ea(_,T)),affixWrapper:te(`${_}-textarea-affix-wrapper`,{[`${_}-affix-wrapper-rtl`]:x==="rtl",[`${_}-affix-wrapper-sm`]:Q==="small",[`${_}-affix-wrapper-lg`]:Q==="large",[`${_}-textarea-show-count`]:v||((n=e.count)===null||n===void 0?void 0:n.show)},B)}),prefixCls:_,suffix:A&&p.createElement("span",{className:`${_}-textarea-suffix`},L),showCount:v,ref:I,onResize:se,onMouseDown:ne}))))}),hi=ns;hi.Group=C3;hi.Search=d$;hi.TextArea=U3;hi.Password=u$;hi.OTP=N3;var q3=function(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};const K3=e=>{const{prefixCls:t,className:n,closeIcon:r,closable:o,type:i,title:a,children:s,footer:l}=e,c=q3(e,["prefixCls","className","closeIcon","closable","type","title","children","footer"]),{getPrefixCls:u}=p.useContext(_t),d=u(),f=t||u("modal"),h=oo(d),[m,v,g]=lE(f,h),y=`${f}-confirm`;let b={};return i?b={closable:o??!1,title:"",footer:"",children:p.createElement(uE,Object.assign({},e,{prefixCls:f,confirmPrefixCls:y,rootPrefixCls:d,content:s}))}:b={closable:o??!0,title:a,footer:l!==null&&p.createElement(oE,Object.assign({},e)),children:s},m(p.createElement(bg,Object.assign({prefixCls:f,className:te(v,`${f}-pure-panel`,i&&y,i&&`${y}-${i}`,n,g,h)},c,{closeIcon:rE(f,r),closable:o},b)))},G3=yE(K3);function f$(e){return kl(pE(e))}const Wr=cE;Wr.useModal=pz;Wr.info=function(t){return kl(mE(t))};Wr.success=function(t){return kl(gE(t))};Wr.error=function(t){return kl(vE(t))};Wr.warning=f$;Wr.warn=f$;Wr.confirm=function(t){return kl(bE(t))};Wr.destroyAll=function(){for(;Li.length;){const t=Li.pop();t&&t()}};Wr.config=cz;Wr._InternalPanelDoNotUseOrYouWillBeFired=G3;process.env.NODE_ENV!=="production"&&(Wr.displayName="Modal");/**
448
+ * @license lucide-react v0.484.0 - ISC
449
+ *
450
+ * This source code is licensed under the ISC license.
451
+ * See the LICENSE file in the root directory of this source tree.
452
+ */const X3=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Y3=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),mC=e=>{const t=Y3(e);return t.charAt(0).toUpperCase()+t.slice(1)},h$=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
453
+ * @license lucide-react v0.484.0 - ISC
454
+ *
455
+ * This source code is licensed under the ISC license.
456
+ * See the LICENSE file in the root directory of this source tree.
457
+ */var J3={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
458
+ * @license lucide-react v0.484.0 - ISC
459
+ *
460
+ * This source code is licensed under the ISC license.
461
+ * See the LICENSE file in the root directory of this source tree.
462
+ */const Q3=O.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...s},l)=>O.createElement("svg",{ref:l,...J3,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:h$("lucide",o),...s},[...a.map(([c,u])=>O.createElement(c,u)),...Array.isArray(i)?i:[i]]));/**
463
+ * @license lucide-react v0.484.0 - ISC
464
+ *
465
+ * This source code is licensed under the ISC license.
466
+ * See the LICENSE file in the root directory of this source tree.
467
+ */const Rt=(e,t)=>{const n=O.forwardRef(({className:r,...o},i)=>O.createElement(Q3,{ref:i,iconNode:t,className:h$(`lucide-${X3(mC(e))}`,`lucide-${e}`,r),...o}));return n.displayName=mC(e),n};/**
468
+ * @license lucide-react v0.484.0 - ISC
469
+ *
470
+ * This source code is licensed under the ISC license.
471
+ * See the LICENSE file in the root directory of this source tree.
472
+ */const Z3=[["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 18H5",key:"18s9l3"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],p$=Rt("align-center",Z3);/**
473
+ * @license lucide-react v0.484.0 - ISC
474
+ *
475
+ * This source code is licensed under the ISC license.
476
+ * See the LICENSE file in the root directory of this source tree.
477
+ */const e6=[["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 18h18",key:"1h113x"}],["path",{d:"M3 6h18",key:"d0wm0j"}]],t6=Rt("align-justify",e6);/**
478
+ * @license lucide-react v0.484.0 - ISC
479
+ *
480
+ * This source code is licensed under the ISC license.
481
+ * See the LICENSE file in the root directory of this source tree.
482
+ */const n6=[["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 18H3",key:"1amg6g"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],m$=Rt("align-left",n6);/**
483
+ * @license lucide-react v0.484.0 - ISC
484
+ *
485
+ * This source code is licensed under the ISC license.
486
+ * See the LICENSE file in the root directory of this source tree.
487
+ */const r6=[["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 18H7",key:"1ygte8"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],g$=Rt("align-right",r6);/**
488
+ * @license lucide-react v0.484.0 - ISC
489
+ *
490
+ * This source code is licensed under the ISC license.
491
+ * See the LICENSE file in the root directory of this source tree.
492
+ */const o6=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],i6=Rt("arrow-right",o6);/**
493
+ * @license lucide-react v0.484.0 - ISC
494
+ *
495
+ * This source code is licensed under the ISC license.
496
+ * See the LICENSE file in the root directory of this source tree.
497
+ */const a6=[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]],s6=Rt("bold",a6);/**
498
+ * @license lucide-react v0.484.0 - ISC
499
+ *
500
+ * This source code is licensed under the ISC license.
501
+ * See the LICENSE file in the root directory of this source tree.
502
+ */const l6=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],c6=Rt("chevron-down",l6);/**
503
+ * @license lucide-react v0.484.0 - ISC
504
+ *
505
+ * This source code is licensed under the ISC license.
506
+ * See the LICENSE file in the root directory of this source tree.
507
+ */const u6=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],gC=Rt("code-xml",u6);/**
508
+ * @license lucide-react v0.484.0 - ISC
509
+ *
510
+ * This source code is licensed under the ISC license.
511
+ * See the LICENSE file in the root directory of this source tree.
512
+ */const d6=[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]],f6=Rt("code",d6);/**
513
+ * @license lucide-react v0.484.0 - ISC
514
+ *
515
+ * This source code is licensed under the ISC license.
516
+ * See the LICENSE file in the root directory of this source tree.
517
+ */const h6=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M12 3v18",key:"108xh3"}]],p6=Rt("columns-2",h6);/**
518
+ * @license lucide-react v0.484.0 - ISC
519
+ *
520
+ * This source code is licensed under the ISC license.
521
+ * See the LICENSE file in the root directory of this source tree.
522
+ */const m6=[["polyline",{points:"15 10 20 15 15 20",key:"1q7qjw"}],["path",{d:"M4 4v7a4 4 0 0 0 4 4h12",key:"z08zvw"}]],g6=Rt("corner-down-right",m6);/**
523
+ * @license lucide-react v0.484.0 - ISC
524
+ *
525
+ * This source code is licensed under the ISC license.
526
+ * See the LICENSE file in the root directory of this source tree.
527
+ */const v6=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],v$=Rt("grip-vertical",v6);/**
528
+ * @license lucide-react v0.484.0 - ISC
529
+ *
530
+ * This source code is licensed under the ISC license.
531
+ * See the LICENSE file in the root directory of this source tree.
532
+ */const b6=[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"m17 12 3-2v8",key:"1hhhft"}]],ch=Rt("heading-1",b6);/**
533
+ * @license lucide-react v0.484.0 - ISC
534
+ *
535
+ * This source code is licensed under the ISC license.
536
+ * See the LICENSE file in the root directory of this source tree.
537
+ */const y6=[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1",key:"9jr5yi"}]],vC=Rt("heading-2",y6);/**
538
+ * @license lucide-react v0.484.0 - ISC
539
+ *
540
+ * This source code is licensed under the ISC license.
541
+ * See the LICENSE file in the root directory of this source tree.
542
+ */const C6=[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2",key:"68ncm8"}],["path",{d:"M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2",key:"1ejuhz"}]],bC=Rt("heading-3",C6);/**
543
+ * @license lucide-react v0.484.0 - ISC
544
+ *
545
+ * This source code is licensed under the ISC license.
546
+ * See the LICENSE file in the root directory of this source tree.
547
+ */const S6=[["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M17 10v3a1 1 0 0 0 1 1h3",key:"tj5zdr"}],["path",{d:"M21 10v8",key:"1kdml4"}],["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}]],yC=Rt("heading-4",S6);/**
548
+ * @license lucide-react v0.484.0 - ISC
549
+ *
550
+ * This source code is licensed under the ISC license.
551
+ * See the LICENSE file in the root directory of this source tree.
552
+ */const x6=[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M17 13v-3h4",key:"1nvgqp"}],["path",{d:"M17 17.7c.4.2.8.3 1.3.3 1.5 0 2.7-1.1 2.7-2.5S19.8 13 18.3 13H17",key:"2nebdn"}]],CC=Rt("heading-5",x6);/**
553
+ * @license lucide-react v0.484.0 - ISC
554
+ *
555
+ * This source code is licensed under the ISC license.
556
+ * See the LICENSE file in the root directory of this source tree.
557
+ */const w6=[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["circle",{cx:"19",cy:"16",r:"2",key:"15mx69"}],["path",{d:"M20 10c-2 2-3 3.5-3 6",key:"f35dl0"}]],SC=Rt("heading-6",w6);/**
558
+ * @license lucide-react v0.484.0 - ISC
559
+ *
560
+ * This source code is licensed under the ISC license.
561
+ * See the LICENSE file in the root directory of this source tree.
562
+ */const E6=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],O6=Rt("image",E6);/**
563
+ * @license lucide-react v0.484.0 - ISC
564
+ *
565
+ * This source code is licensed under the ISC license.
566
+ * See the LICENSE file in the root directory of this source tree.
567
+ */const $6=[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]],N6=Rt("italic",$6);/**
568
+ * @license lucide-react v0.484.0 - ISC
569
+ *
570
+ * This source code is licensed under the ISC license.
571
+ * See the LICENSE file in the root directory of this source tree.
572
+ */const M6=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],R6=Rt("layers",M6);/**
573
+ * @license lucide-react v0.484.0 - ISC
574
+ *
575
+ * This source code is licensed under the ISC license.
576
+ * See the LICENSE file in the root directory of this source tree.
577
+ */const I6=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],b$=Rt("link",I6);/**
578
+ * @license lucide-react v0.484.0 - ISC
579
+ *
580
+ * This source code is licensed under the ISC license.
581
+ * See the LICENSE file in the root directory of this source tree.
582
+ */const T6=[["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 18h11",key:"11hvi2"}],["path",{d:"M10 6h11",key:"c7qv1k"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]],A6=Rt("list-ordered",T6);/**
583
+ * @license lucide-react v0.484.0 - ISC
584
+ *
585
+ * This source code is licensed under the ISC license.
586
+ * See the LICENSE file in the root directory of this source tree.
587
+ */const P6=[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]],k6=Rt("list",P6);/**
588
+ * @license lucide-react v0.484.0 - ISC
589
+ *
590
+ * This source code is licensed under the ISC license.
591
+ * See the LICENSE file in the root directory of this source tree.
592
+ */const D6=[["path",{d:"M5 12h14",key:"1ays0h"}]],om=Rt("minus",D6);/**
593
+ * @license lucide-react v0.484.0 - ISC
594
+ *
595
+ * This source code is licensed under the ISC license.
596
+ * See the LICENSE file in the root directory of this source tree.
597
+ */const _6=[["path",{d:"m19 11-8-8-8.6 8.6a2 2 0 0 0 0 2.8l5.2 5.2c.8.8 2 .8 2.8 0L19 11Z",key:"irua1i"}],["path",{d:"m5 2 5 5",key:"1lls2c"}],["path",{d:"M2 13h15",key:"1hkzvu"}],["path",{d:"M22 20a2 2 0 1 1-4 0c0-1.6 1.7-2.4 2-4 .3 1.6 2 2.4 2 4Z",key:"xk76lq"}]],L6=Rt("paint-bucket",_6);/**
598
+ * @license lucide-react v0.484.0 - ISC
599
+ *
600
+ * This source code is licensed under the ISC license.
601
+ * See the LICENSE file in the root directory of this source tree.
602
+ */const j6=[["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]],B6=Rt("palette",j6);/**
603
+ * @license lucide-react v0.484.0 - ISC
604
+ *
605
+ * This source code is licensed under the ISC license.
606
+ * See the LICENSE file in the root directory of this source tree.
607
+ */const z6=[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]],F6=Rt("pen-line",z6);/**
608
+ * @license lucide-react v0.484.0 - ISC
609
+ *
610
+ * This source code is licensed under the ISC license.
611
+ * See the LICENSE file in the root directory of this source tree.
612
+ */const H6=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Na=Rt("plus",H6);/**
613
+ * @license lucide-react v0.484.0 - ISC
614
+ *
615
+ * This source code is licensed under the ISC license.
616
+ * See the LICENSE file in the root directory of this source tree.
617
+ */const V6=[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]],W6=Rt("quote",V6);/**
618
+ * @license lucide-react v0.484.0 - ISC
619
+ *
620
+ * This source code is licensed under the ISC license.
621
+ * See the LICENSE file in the root directory of this source tree.
622
+ */const U6=[["path",{d:"M21 7v6h-6",key:"3ptur4"}],["path",{d:"M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7",key:"1kgawr"}]],q6=Rt("redo",U6);/**
623
+ * @license lucide-react v0.484.0 - ISC
624
+ *
625
+ * This source code is licensed under the ISC license.
626
+ * See the LICENSE file in the root directory of this source tree.
627
+ */const K6=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 12h18",key:"1i2n21"}]],xC=Rt("rows-2",K6);/**
628
+ * @license lucide-react v0.484.0 - ISC
629
+ *
630
+ * This source code is licensed under the ISC license.
631
+ * See the LICENSE file in the root directory of this source tree.
632
+ */const G6=[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],X6=Rt("square-check-big",G6);/**
633
+ * @license lucide-react v0.484.0 - ISC
634
+ *
635
+ * This source code is licensed under the ISC license.
636
+ * See the LICENSE file in the root directory of this source tree.
637
+ */const Y6=[["path",{d:"M16 4H9a3 3 0 0 0-2.83 4",key:"43sutm"}],["path",{d:"M14 12a4 4 0 0 1 0 8H6",key:"nlfj13"}],["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}]],J6=Rt("strikethrough",Y6);/**
638
+ * @license lucide-react v0.484.0 - ISC
639
+ *
640
+ * This source code is licensed under the ISC license.
641
+ * See the LICENSE file in the root directory of this source tree.
642
+ */const Q6=[["path",{d:"m4 5 8 8",key:"1eunvl"}],["path",{d:"m12 5-8 8",key:"1ah0jp"}],["path",{d:"M20 19h-4c0-1.5.44-2 1.5-2.5S20 15.33 20 14c0-.47-.17-.93-.48-1.29a2.11 2.11 0 0 0-2.62-.44c-.42.24-.74.62-.9 1.07",key:"e8ta8j"}]],Z6=Rt("subscript",Q6);/**
643
+ * @license lucide-react v0.484.0 - ISC
644
+ *
645
+ * This source code is licensed under the ISC license.
646
+ * See the LICENSE file in the root directory of this source tree.
647
+ */const eW=[["path",{d:"m4 19 8-8",key:"hr47gm"}],["path",{d:"m12 19-8-8",key:"1dhhmo"}],["path",{d:"M20 12h-4c0-1.5.442-2 1.5-2.5S20 8.334 20 7.002c0-.472-.17-.93-.484-1.29a2.105 2.105 0 0 0-2.617-.436c-.42.239-.738.614-.899 1.06",key:"1dfcux"}]],tW=Rt("superscript",eW);/**
648
+ * @license lucide-react v0.484.0 - ISC
649
+ *
650
+ * This source code is licensed under the ISC license.
651
+ * See the LICENSE file in the root directory of this source tree.
652
+ */const nW=[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]],rW=Rt("table",nW);/**
653
+ * @license lucide-react v0.484.0 - ISC
654
+ *
655
+ * This source code is licensed under the ISC license.
656
+ * See the LICENSE file in the root directory of this source tree.
657
+ */const oW=[["path",{d:"M17 22h-1a4 4 0 0 1-4-4V6a4 4 0 0 1 4-4h1",key:"uvaxm9"}],["path",{d:"M7 22h1a4 4 0 0 0 4-4v-1",key:"11xy8d"}],["path",{d:"M7 2h1a4 4 0 0 1 4 4v1",key:"1uw06m"}]],iW=Rt("text-cursor",oW);/**
658
+ * @license lucide-react v0.484.0 - ISC
659
+ *
660
+ * This source code is licensed under the ISC license.
661
+ * See the LICENSE file in the root directory of this source tree.
662
+ */const aW=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],Jg=Rt("trash-2",aW);/**
663
+ * @license lucide-react v0.484.0 - ISC
664
+ *
665
+ * This source code is licensed under the ISC license.
666
+ * See the LICENSE file in the root directory of this source tree.
667
+ */const sW=[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]],lW=Rt("type",sW);/**
668
+ * @license lucide-react v0.484.0 - ISC
669
+ *
670
+ * This source code is licensed under the ISC license.
671
+ * See the LICENSE file in the root directory of this source tree.
672
+ */const cW=[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]],uW=Rt("underline",cW);/**
673
+ * @license lucide-react v0.484.0 - ISC
674
+ *
675
+ * This source code is licensed under the ISC license.
676
+ * See the LICENSE file in the root directory of this source tree.
677
+ */const dW=[["path",{d:"M3 7v6h6",key:"1v2h90"}],["path",{d:"M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13",key:"1r6uu6"}]],fW=Rt("undo",dW);/**
678
+ * @license lucide-react v0.484.0 - ISC
679
+ *
680
+ * This source code is licensed under the ISC license.
681
+ * See the LICENSE file in the root directory of this source tree.
682
+ */const hW=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]],pW=Rt("upload",hW);/**
683
+ * @license lucide-react v0.484.0 - ISC
684
+ *
685
+ * This source code is licensed under the ISC license.
686
+ * See the LICENSE file in the root directory of this source tree.
687
+ */const mW=[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]],gW=Rt("video",mW);/**
688
+ * @license lucide-react v0.484.0 - ISC
689
+ *
690
+ * This source code is licensed under the ISC license.
691
+ * See the LICENSE file in the root directory of this source tree.
692
+ */const vW=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],bW=Rt("x",vW);function Ya({value:e,onChange:t}){return j.jsx(Hd,{value:e,onChange:t,presets:[{label:"Recommended",colors:["#1677ff","#52c41a","#faad14","#ff4d4f","#722ed1","#13c2c2","#ffffff","#000000","transparent"]}]})}function yW({editor:e}){const[t,n]=O.useState("#1677ff"),[r,o]=O.useState("#ffffff"),i=l=>{const c=l.toHexString();n(c),e.chain().focus().setColor(c).run()},a=l=>{const c=l.toHexString();o(c),e.chain().focus().setHighlight({color:c}).run()},s=l=>{l.preventDefault()};return j.jsxs("div",{className:"flex items-center gap-4",children:[j.jsx(Sn,{title:"Text Color",children:j.jsxs("div",{className:"flex items-center gap-2",onMouseDown:s,children:[j.jsx(iW,{size:20,color:"black"}),j.jsx(Ya,{value:t,onChange:i})]})}),j.jsx(Sn,{title:"Highlight Color",children:j.jsxs("div",{className:"flex items-center gap-2",onMouseDown:s,children:[j.jsx(L6,{size:20,color:"black"}),j.jsx(Ya,{value:r,onChange:a})]})})]})}function CW({editor:e}){if(!e)return null;const t=()=>{for(let r=1;r<=6;r++)if(e.isActive("heading",{level:r}))switch(r){case 1:return j.jsx(ch,{size:16});case 2:return j.jsx(vC,{size:16});case 3:return j.jsx(bC,{size:16});case 4:return j.jsx(yC,{size:16});case 5:return j.jsx(CC,{size:16});case 6:return j.jsx(SC,{size:16})}return j.jsx(ch,{size:16})},n=[...Array.from({length:6},(r,o)=>({key:`${o+1}`,label:j.jsxs("div",{className:"flex items-center gap-2",onClick:()=>e.chain().focus().toggleHeading({level:o+1}).run(),children:[O.createElement([ch,vC,bC,yC,CC,SC][o],{size:16}),j.jsxs("span",{children:["Heading",o+1]})]}),className:e.isActive("heading",{level:o+1})?"ant-dropdown-menu-item-active":""}))];return j.jsx(Oi,{menu:{items:n},trigger:["hover"],placement:"bottomLeft",children:j.jsx("button",{className:"flex items-center gap-1 p-2 rounded-md hover:bg-blue-100 hover:text-blue-600",type:"button",children:t()})})}const SW=8,xW=8;function wW({editor:e,buttonClass:t,activeClass:n}){const[r,o]=O.useState({rows:0,cols:0}),[i,a]=O.useState(!1),s=O.useCallback((l,c)=>{e&&(e.chain().focus().insertTable({rows:l,cols:c,withHeaderRow:!0}).run(),a(!1))},[e]);return j.jsx(Oi,{open:i,onOpenChange:l=>a(l),trigger:["hover"],dropdownRender:()=>j.jsxs("div",{className:"w-56 p-4 bg-white border border-gray-300 rounded-lg shadow-xl",children:[j.jsx("div",{className:"grid grid-cols-8 gap-1",children:Array.from({length:SW}).map((l,c)=>Array.from({length:xW}).map((u,d)=>{const f=c<r.rows&&d<r.cols;return j.jsx("div",{className:`w-5 h-5 border rounded-sm cursor-pointer transition-all duration-200 ${f?"bg-blue-400 border-white scale-110":"bg-gray-200 hover:bg-gray-300"}`,onMouseEnter:()=>o({rows:c+1,cols:d+1}),onClick:h=>{h.stopPropagation(),s(c+1,d+1)}},`${c}-${d}`)}))}),j.jsx("div",{className:"mt-3 text-sm font-medium text-center text-gray-700",children:r.rows>0&&r.cols>0?`${r.rows} × ${r.cols} Table`:"Insert Table"})]}),children:j.jsx("button",{type:"button",className:`${t} ${i?n:""} transition-all`,onClick:l=>{l.preventDefault(),a(!i)},children:j.jsx(rW,{className:"w-5 h-5"})})})}var im,am;if(typeof WeakMap<"u"){let e=new WeakMap;im=t=>e.get(t),am=(t,n)=>(e.set(t,n),n)}else{const e=[];let n=0;im=r=>{for(let o=0;o<e.length;o+=2)if(e[o]==r)return e[o+1]},am=(r,o)=>(n==10&&(n=0),e[n++]=r,e[n++]=o)}var Rn=class{constructor(e,t,n,r){this.width=e,this.height=t,this.map=n,this.problems=r}findCell(e){for(let t=0;t<this.map.length;t++){const n=this.map[t];if(n!=e)continue;const r=t%this.width,o=t/this.width|0;let i=r+1,a=o+1;for(let s=1;i<this.width&&this.map[t+s]==n;s++)i++;for(let s=1;a<this.height&&this.map[t+this.width*s]==n;s++)a++;return{left:r,top:o,right:i,bottom:a}}throw new RangeError(`No cell with offset ${e} found`)}colCount(e){for(let t=0;t<this.map.length;t++)if(this.map[t]==e)return t%this.width;throw new RangeError(`No cell with offset ${e} found`)}nextCell(e,t,n){const{left:r,right:o,top:i,bottom:a}=this.findCell(e);return t=="horiz"?(n<0?r==0:o==this.width)?null:this.map[i*this.width+(n<0?r-1:o)]:(n<0?i==0:a==this.height)?null:this.map[r+this.width*(n<0?i-1:a)]}rectBetween(e,t){const{left:n,right:r,top:o,bottom:i}=this.findCell(e),{left:a,right:s,top:l,bottom:c}=this.findCell(t);return{left:Math.min(n,a),top:Math.min(o,l),right:Math.max(r,s),bottom:Math.max(i,c)}}cellsInRect(e){const t=[],n={};for(let r=e.top;r<e.bottom;r++)for(let o=e.left;o<e.right;o++){const i=r*this.width+o,a=this.map[i];n[a]||(n[a]=!0,!(o==e.left&&o&&this.map[i-1]==a||r==e.top&&r&&this.map[i-this.width]==a)&&t.push(a))}return t}positionAt(e,t,n){for(let r=0,o=0;;r++){const i=o+n.child(r).nodeSize;if(r==e){let a=t+e*this.width;const s=(e+1)*this.width;for(;a<s&&this.map[a]<o;)a++;return a==s?i-1:this.map[a]}o=i}}static get(e){return im(e)||am(e,EW(e))}};function EW(e){if(e.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+e.type.name);const t=OW(e),n=e.childCount,r=[];let o=0,i=null;const a=[];for(let c=0,u=t*n;c<u;c++)r[c]=0;for(let c=0,u=0;c<n;c++){const d=e.child(c);u++;for(let m=0;;m++){for(;o<r.length&&r[o]!=0;)o++;if(m==d.childCount)break;const v=d.child(m),{colspan:g,rowspan:y,colwidth:b}=v.attrs;for(let C=0;C<y;C++){if(C+c>=n){(i||(i=[])).push({type:"overlong_rowspan",pos:u,n:y-C});break}const x=o+C*t;for(let S=0;S<g;S++){r[x+S]==0?r[x+S]=u:(i||(i=[])).push({type:"collision",row:c,pos:u,n:g-S});const w=b&&b[S];if(w){const E=(x+S)%t*2,N=a[E];N==null||N!=w&&a[E+1]==1?(a[E]=w,a[E+1]=1):N==w&&a[E+1]++}}}o+=g,u+=v.nodeSize}const f=(c+1)*t;let h=0;for(;o<f;)r[o++]==0&&h++;h&&(i||(i=[])).push({type:"missing",row:c,n:h}),u++}(t===0||n===0)&&(i||(i=[])).push({type:"zero_sized"});const s=new Rn(t,n,r,i);let l=!1;for(let c=0;!l&&c<a.length;c+=2)a[c]!=null&&a[c+1]<n&&(l=!0);return l&&$W(s,a,e),s}function OW(e){let t=-1,n=!1;for(let r=0;r<e.childCount;r++){const o=e.child(r);let i=0;if(n)for(let a=0;a<r;a++){const s=e.child(a);for(let l=0;l<s.childCount;l++){const c=s.child(l);a+c.attrs.rowspan>r&&(i+=c.attrs.colspan)}}for(let a=0;a<o.childCount;a++){const s=o.child(a);i+=s.attrs.colspan,s.attrs.rowspan>1&&(n=!0)}t==-1?t=i:t!=i&&(t=Math.max(t,i))}return t}function $W(e,t,n){e.problems||(e.problems=[]);const r={};for(let o=0;o<e.map.length;o++){const i=e.map[o];if(r[i])continue;r[i]=!0;const a=n.nodeAt(i);if(!a)throw new RangeError(`No cell with offset ${i} found`);let s=null;const l=a.attrs;for(let c=0;c<l.colspan;c++){const u=(o+c)%e.width,d=t[u*2];d!=null&&(!l.colwidth||l.colwidth[c]!=d)&&((s||(s=NW(l)))[c]=d)}s&&e.problems.unshift({type:"colwidth mismatch",pos:i,colwidth:s})}}function NW(e){if(e.colwidth)return e.colwidth.slice();const t=[];for(let n=0;n<e.colspan;n++)t.push(0);return t}function ar(e){let t=e.cached.tableNodeTypes;if(!t){t=e.cached.tableNodeTypes={};for(const n in e.nodes){const r=e.nodes[n],o=r.spec.tableRole;o&&(t[o]=r)}}return t}var ni=new _n("selectingCells");function rs(e){for(let t=e.depth-1;t>0;t--)if(e.node(t).type.spec.tableRole=="row")return e.node(0).resolve(e.before(t+1));return null}function MW(e){for(let t=e.depth;t>0;t--){const n=e.node(t).type.spec.tableRole;if(n==="cell"||n==="header_cell")return e.node(t)}return null}function io(e){const t=e.selection.$head;for(let n=t.depth;n>0;n--)if(t.node(n).type.spec.tableRole=="row")return!0;return!1}function Vd(e){const t=e.selection;if("$anchorCell"in t&&t.$anchorCell)return t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell;if("node"in t&&t.node&&t.node.type.spec.tableRole=="cell")return t.$anchor;const n=rs(t.$head)||RW(t.$head);if(n)return n;throw new RangeError(`No cell found around position ${t.head}`)}function RW(e){for(let t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){const r=t.type.spec.tableRole;if(r=="cell"||r=="header_cell")return e.doc.resolve(n)}for(let t=e.nodeBefore,n=e.pos;t;t=t.lastChild,n--){const r=t.type.spec.tableRole;if(r=="cell"||r=="header_cell")return e.doc.resolve(n-t.nodeSize)}}function sm(e){return e.parent.type.spec.tableRole=="row"&&!!e.nodeAfter}function IW(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function Qg(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function y$(e,t,n){const r=e.node(-1),o=Rn.get(r),i=e.start(-1),a=o.nextCell(e.pos-i,t,n);return a==null?null:e.node(0).resolve(i+a)}function ta(e,t,n=1){const r={...e,colspan:e.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(t,n),r.colwidth.some(o=>o>0)||(r.colwidth=null)),r}function C$(e,t,n=1){const r={...e,colspan:e.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let o=0;o<n;o++)r.colwidth.splice(t,0,0)}return r}function TW(e,t,n){const r=ar(t.type.schema).header_cell;for(let o=0;o<e.height;o++)if(t.nodeAt(e.map[n+o*e.width]).type!=r)return!1;return!0}var gn=class Mo extends xt{constructor(t,n=t){const r=t.node(-1),o=Rn.get(r),i=t.start(-1),a=o.rectBetween(t.pos-i,n.pos-i),s=t.node(0),l=o.cellsInRect(a).filter(u=>u!=n.pos-i);l.unshift(n.pos-i);const c=l.map(u=>{const d=r.nodeAt(u);if(!d)throw RangeError(`No cell with offset ${u} found`);const f=i+u+1;return new AS(s.resolve(f),s.resolve(f+d.content.size))});super(c[0].$from,c[0].$to,c),this.$anchorCell=t,this.$headCell=n}map(t,n){const r=t.resolve(n.map(this.$anchorCell.pos)),o=t.resolve(n.map(this.$headCell.pos));if(sm(r)&&sm(o)&&Qg(r,o)){const i=this.$anchorCell.node(-1)!=r.node(-1);return i&&this.isRowSelection()?Mo.rowSelection(r,o):i&&this.isColSelection()?Mo.colSelection(r,o):new Mo(r,o)}return Ct.between(r,o)}content(){const t=this.$anchorCell.node(-1),n=Rn.get(t),r=this.$anchorCell.start(-1),o=n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r),i={},a=[];for(let l=o.top;l<o.bottom;l++){const c=[];for(let u=l*n.width+o.left,d=o.left;d<o.right;d++,u++){const f=n.map[u];if(i[f])continue;i[f]=!0;const h=n.findCell(f);let m=t.nodeAt(f);if(!m)throw RangeError(`No cell with offset ${f} found`);const v=o.left-h.left,g=h.right-o.right;if(v>0||g>0){let y=m.attrs;if(v>0&&(y=ta(y,0,v)),g>0&&(y=ta(y,y.colspan-g,g)),h.left<o.left){if(m=m.type.createAndFill(y),!m)throw RangeError(`Could not create cell with attrs ${JSON.stringify(y)}`)}else m=m.type.create(y,m.content)}if(h.top<o.top||h.bottom>o.bottom){const y={...m.attrs,rowspan:Math.min(h.bottom,o.bottom)-Math.max(h.top,o.top)};h.top<o.top?m=m.type.createAndFill(y):m=m.type.create(y,m.content)}c.push(m)}a.push(t.child(l).copy(Ae.from(c)))}const s=this.isColSelection()&&this.isRowSelection()?t:a;return new nt(Ae.from(s),1,1)}replace(t,n=nt.empty){const r=t.steps.length,o=this.ranges;for(let a=0;a<o.length;a++){const{$from:s,$to:l}=o[a],c=t.mapping.slice(r);t.replace(c.map(s.pos),c.map(l.pos),a?nt.empty:n)}const i=xt.findFrom(t.doc.resolve(t.mapping.slice(r).map(this.to)),-1);i&&t.setSelection(i)}replaceWith(t,n){this.replace(t,new nt(Ae.from(n),0,0))}forEachCell(t){const n=this.$anchorCell.node(-1),r=Rn.get(n),o=this.$anchorCell.start(-1),i=r.cellsInRect(r.rectBetween(this.$anchorCell.pos-o,this.$headCell.pos-o));for(let a=0;a<i.length;a++)t(n.nodeAt(i[a]),o+i[a])}isColSelection(){const t=this.$anchorCell.index(-1),n=this.$headCell.index(-1);if(Math.min(t,n)>0)return!1;const r=t+this.$anchorCell.nodeAfter.attrs.rowspan,o=n+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(r,o)==this.$headCell.node(-1).childCount}static colSelection(t,n=t){const r=t.node(-1),o=Rn.get(r),i=t.start(-1),a=o.findCell(t.pos-i),s=o.findCell(n.pos-i),l=t.node(0);return a.top<=s.top?(a.top>0&&(t=l.resolve(i+o.map[a.left])),s.bottom<o.height&&(n=l.resolve(i+o.map[o.width*(o.height-1)+s.right-1]))):(s.top>0&&(n=l.resolve(i+o.map[s.left])),a.bottom<o.height&&(t=l.resolve(i+o.map[o.width*(o.height-1)+a.right-1]))),new Mo(t,n)}isRowSelection(){const t=this.$anchorCell.node(-1),n=Rn.get(t),r=this.$anchorCell.start(-1),o=n.colCount(this.$anchorCell.pos-r),i=n.colCount(this.$headCell.pos-r);if(Math.min(o,i)>0)return!1;const a=o+this.$anchorCell.nodeAfter.attrs.colspan,s=i+this.$headCell.nodeAfter.attrs.colspan;return Math.max(a,s)==n.width}eq(t){return t instanceof Mo&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos}static rowSelection(t,n=t){const r=t.node(-1),o=Rn.get(r),i=t.start(-1),a=o.findCell(t.pos-i),s=o.findCell(n.pos-i),l=t.node(0);return a.left<=s.left?(a.left>0&&(t=l.resolve(i+o.map[a.top*o.width])),s.right<o.width&&(n=l.resolve(i+o.map[o.width*(s.top+1)-1]))):(s.left>0&&(n=l.resolve(i+o.map[s.top*o.width])),a.right<o.width&&(t=l.resolve(i+o.map[o.width*(a.top+1)-1]))),new Mo(t,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(t,n){return new Mo(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){return new Mo(t.resolve(n),t.resolve(r))}getBookmark(){return new AW(this.$anchorCell.pos,this.$headCell.pos)}};gn.prototype.visible=!1;xt.jsonID("cell",gn);var AW=class S${constructor(t,n){this.anchor=t,this.head=n}map(t){return new S$(t.map(this.anchor),t.map(this.head))}resolve(t){const n=t.resolve(this.anchor),r=t.resolve(this.head);return n.parent.type.spec.tableRole=="row"&&r.parent.type.spec.tableRole=="row"&&n.index()<n.parent.childCount&&r.index()<r.parent.childCount&&Qg(n,r)?new gn(n,r):xt.near(r,1)}};function PW(e){if(!(e.selection instanceof gn))return null;const t=[];return e.selection.forEachCell((n,r)=>{t.push(Kn.node(r,r+n.nodeSize,{class:"selectedCell"}))}),mn.create(e.doc,t)}function kW({$from:e,$to:t}){if(e.pos==t.pos||e.pos<t.pos-6)return!1;let n=e.pos,r=t.pos,o=e.depth;for(;o>=0&&!(e.after(o+1)<e.end(o));o--,n++);for(let i=t.depth;i>=0&&!(t.before(i+1)>t.start(i));i--,r--);return n==r&&/row|table/.test(e.node(o).type.spec.tableRole)}function DW({$from:e,$to:t}){let n,r;for(let o=e.depth;o>0;o--){const i=e.node(o);if(i.type.spec.tableRole==="cell"||i.type.spec.tableRole==="header_cell"){n=i;break}}for(let o=t.depth;o>0;o--){const i=t.node(o);if(i.type.spec.tableRole==="cell"||i.type.spec.tableRole==="header_cell"){r=i;break}}return n!==r&&t.parentOffset===0}function _W(e,t,n){const r=(t||e).selection,o=(t||e).doc;let i,a;if(r instanceof yt&&(a=r.node.type.spec.tableRole)){if(a=="cell"||a=="header_cell")i=gn.create(o,r.from);else if(a=="row"){const s=o.resolve(r.from+1);i=gn.rowSelection(s,s)}else if(!n){const s=Rn.get(r.node),l=r.from+1,c=l+s.map[s.width*s.height-1];i=gn.create(o,l+1,c)}}else r instanceof Ct&&kW(r)?i=Ct.create(o,r.from):r instanceof Ct&&DW(r)&&(i=Ct.create(o,r.$from.start(),r.$from.end()));return i&&(t||(t=e.tr)).setSelection(i),t}var LW=new _n("fix-tables");function x$(e,t,n,r){const o=e.childCount,i=t.childCount;e:for(let a=0,s=0;a<i;a++){const l=t.child(a);for(let c=s,u=Math.min(o,a+3);c<u;c++)if(e.child(c)==l){s=c+1,n+=l.nodeSize;continue e}r(l,n),s<o&&e.child(s).sameMarkup(l)?x$(e.child(s),l,n+1,r):l.nodesBetween(0,l.content.size,r,n+1),n+=l.nodeSize}}function w$(e,t){let n;const r=(o,i)=>{o.type.spec.tableRole=="table"&&(n=jW(e,o,i,n))};return t?t.doc!=e.doc&&x$(t.doc,e.doc,0,r):e.doc.descendants(r),n}function jW(e,t,n,r){const o=Rn.get(t);if(!o.problems)return r;r||(r=e.tr);const i=[];for(let l=0;l<o.height;l++)i.push(0);for(let l=0;l<o.problems.length;l++){const c=o.problems[l];if(c.type=="collision"){const u=t.nodeAt(c.pos);if(!u)continue;const d=u.attrs;for(let f=0;f<d.rowspan;f++)i[c.row+f]+=c.n;r.setNodeMarkup(r.mapping.map(n+1+c.pos),null,ta(d,d.colspan-c.n,c.n))}else if(c.type=="missing")i[c.row]+=c.n;else if(c.type=="overlong_rowspan"){const u=t.nodeAt(c.pos);if(!u)continue;r.setNodeMarkup(r.mapping.map(n+1+c.pos),null,{...u.attrs,rowspan:u.attrs.rowspan-c.n})}else if(c.type=="colwidth mismatch"){const u=t.nodeAt(c.pos);if(!u)continue;r.setNodeMarkup(r.mapping.map(n+1+c.pos),null,{...u.attrs,colwidth:c.colwidth})}else if(c.type=="zero_sized"){const u=r.mapping.map(n);r.delete(u,u+t.nodeSize)}}let a,s;for(let l=0;l<i.length;l++)i[l]&&(a==null&&(a=l),s=l);for(let l=0,c=n+1;l<o.height;l++){const u=t.child(l),d=c+u.nodeSize,f=i[l];if(f>0){let h="cell";u.firstChild&&(h=u.firstChild.type.spec.tableRole);const m=[];for(let g=0;g<f;g++){const y=ar(e.schema)[h].createAndFill();y&&m.push(y)}const v=(l==0||a==l-1)&&s==l?c+1:d-1;r.insert(r.mapping.map(v),m)}c=d}return r.setMeta(LW,{fixTables:!0})}function wo(e){const t=e.selection,n=Vd(e),r=n.node(-1),o=n.start(-1),i=Rn.get(r);return{...t instanceof gn?i.rectBetween(t.$anchorCell.pos-o,t.$headCell.pos-o):i.findCell(n.pos-o),tableStart:o,map:i,table:r}}function E$(e,{map:t,tableStart:n,table:r},o){let i=o>0?-1:0;TW(t,r,o+i)&&(i=o==0||o==t.width?null:0);for(let a=0;a<t.height;a++){const s=a*t.width+o;if(o>0&&o<t.width&&t.map[s-1]==t.map[s]){const l=t.map[s],c=r.nodeAt(l);e.setNodeMarkup(e.mapping.map(n+l),null,C$(c.attrs,o-t.colCount(l))),a+=c.attrs.rowspan-1}else{const l=i==null?ar(r.type.schema).cell:r.nodeAt(t.map[s+i]).type,c=t.positionAt(a,o,r);e.insert(e.mapping.map(n+c),l.createAndFill())}}return e}function BW(e,t){if(!io(e))return!1;if(t){const n=wo(e);t(E$(e.tr,n,n.left))}return!0}function zW(e,t){if(!io(e))return!1;if(t){const n=wo(e);t(E$(e.tr,n,n.right))}return!0}function FW(e,{map:t,table:n,tableStart:r},o){const i=e.mapping.maps.length;for(let a=0;a<t.height;){const s=a*t.width+o,l=t.map[s],c=n.nodeAt(l),u=c.attrs;if(o>0&&t.map[s-1]==l||o<t.width-1&&t.map[s+1]==l)e.setNodeMarkup(e.mapping.slice(i).map(r+l),null,ta(u,o-t.colCount(l)));else{const d=e.mapping.slice(i).map(r+l);e.delete(d,d+c.nodeSize)}a+=u.rowspan}}function HW(e,t){if(!io(e))return!1;if(t){const n=wo(e),r=e.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let o=n.right-1;FW(r,n,o),o!=n.left;o--){const i=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!i)throw RangeError("No table found");n.table=i,n.map=Rn.get(i)}t(r)}return!0}function VW(e,t,n){var r;const o=ar(t.type.schema).header_cell;for(let i=0;i<e.width;i++)if(((r=t.nodeAt(e.map[i+n*e.width]))==null?void 0:r.type)!=o)return!1;return!0}function O$(e,{map:t,tableStart:n,table:r},o){var i;let a=n;for(let c=0;c<o;c++)a+=r.child(c).nodeSize;const s=[];let l=o>0?-1:0;VW(t,r,o+l)&&(l=o==0||o==t.height?null:0);for(let c=0,u=t.width*o;c<t.width;c++,u++)if(o>0&&o<t.height&&t.map[u]==t.map[u-t.width]){const d=t.map[u],f=r.nodeAt(d).attrs;e.setNodeMarkup(n+d,null,{...f,rowspan:f.rowspan+1}),c+=f.colspan-1}else{const d=l==null?ar(r.type.schema).cell:(i=r.nodeAt(t.map[u+l*t.width]))==null?void 0:i.type,f=d==null?void 0:d.createAndFill();f&&s.push(f)}return e.insert(a,ar(r.type.schema).row.create(null,s)),e}function WW(e,t){if(!io(e))return!1;if(t){const n=wo(e);t(O$(e.tr,n,n.top))}return!0}function UW(e,t){if(!io(e))return!1;if(t){const n=wo(e);t(O$(e.tr,n,n.bottom))}return!0}function qW(e,{map:t,table:n,tableStart:r},o){let i=0;for(let c=0;c<o;c++)i+=n.child(c).nodeSize;const a=i+n.child(o).nodeSize,s=e.mapping.maps.length;e.delete(i+r,a+r);const l=new Set;for(let c=0,u=o*t.width;c<t.width;c++,u++){const d=t.map[u];if(!l.has(d)){if(l.add(d),o>0&&d==t.map[u-t.width]){const f=n.nodeAt(d).attrs;e.setNodeMarkup(e.mapping.slice(s).map(d+r),null,{...f,rowspan:f.rowspan-1}),c+=f.colspan-1}else if(o<t.height&&d==t.map[u+t.width]){const f=n.nodeAt(d),h=f.attrs,m=f.type.create({...h,rowspan:f.attrs.rowspan-1},f.content),v=t.positionAt(o+1,c,n);e.insert(e.mapping.slice(s).map(r+v),m),c+=h.colspan-1}}}}function KW(e,t){if(!io(e))return!1;if(t){const n=wo(e),r=e.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let o=n.bottom-1;qW(r,n,o),o!=n.top;o--){const i=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!i)throw RangeError("No table found");n.table=i,n.map=Rn.get(n.table)}t(r)}return!0}function wC(e){const t=e.content;return t.childCount==1&&t.child(0).isTextblock&&t.child(0).childCount==0}function GW({width:e,height:t,map:n},r){let o=r.top*e+r.left,i=o,a=(r.bottom-1)*e+r.left,s=o+(r.right-r.left-1);for(let l=r.top;l<r.bottom;l++){if(r.left>0&&n[i]==n[i-1]||r.right<e&&n[s]==n[s+1])return!0;i+=e,s+=e}for(let l=r.left;l<r.right;l++){if(r.top>0&&n[o]==n[o-e]||r.bottom<t&&n[a]==n[a+e])return!0;o++,a++}return!1}function EC(e,t){const n=e.selection;if(!(n instanceof gn)||n.$anchorCell.pos==n.$headCell.pos)return!1;const r=wo(e),{map:o}=r;if(GW(o,r))return!1;if(t){const i=e.tr,a={};let s=Ae.empty,l,c;for(let u=r.top;u<r.bottom;u++)for(let d=r.left;d<r.right;d++){const f=o.map[u*o.width+d],h=r.table.nodeAt(f);if(!(a[f]||!h))if(a[f]=!0,l==null)l=f,c=h;else{wC(h)||(s=s.append(h.content));const m=i.mapping.map(f+r.tableStart);i.delete(m,m+h.nodeSize)}}if(l==null||c==null)return!0;if(i.setNodeMarkup(l+r.tableStart,null,{...C$(c.attrs,c.attrs.colspan,r.right-r.left-c.attrs.colspan),rowspan:r.bottom-r.top}),s.size){const u=l+1+c.content.size,d=wC(c)?l+1:u;i.replaceWith(d+r.tableStart,u+r.tableStart,s)}i.setSelection(new gn(i.doc.resolve(l+r.tableStart))),t(i)}return!0}function OC(e,t){const n=ar(e.schema);return XW(({node:r})=>n[r.type.spec.tableRole])(e,t)}function XW(e){return(t,n)=>{var r;const o=t.selection;let i,a;if(o instanceof gn){if(o.$anchorCell.pos!=o.$headCell.pos)return!1;i=o.$anchorCell.nodeAfter,a=o.$anchorCell.pos}else{if(i=MW(o.$from),!i)return!1;a=(r=rs(o.$from))==null?void 0:r.pos}if(i==null||a==null||i.attrs.colspan==1&&i.attrs.rowspan==1)return!1;if(n){let s=i.attrs;const l=[],c=s.colwidth;s.rowspan>1&&(s={...s,rowspan:1}),s.colspan>1&&(s={...s,colspan:1});const u=wo(t),d=t.tr;for(let h=0;h<u.right-u.left;h++)l.push(c?{...s,colwidth:c&&c[h]?[c[h]]:null}:s);let f;for(let h=u.top;h<u.bottom;h++){let m=u.map.positionAt(h,u.left,u.table);h==u.top&&(m+=i.nodeSize);for(let v=u.left,g=0;v<u.right;v++,g++)v==u.left&&h==u.top||d.insert(f=d.mapping.map(m+u.tableStart,1),e({node:i,row:h,col:v}).createAndFill(l[g]))}d.setNodeMarkup(a,e({node:i,row:u.top,col:u.left}),l[0]),o instanceof gn&&d.setSelection(new gn(d.doc.resolve(o.$anchorCell.pos),f?d.doc.resolve(f):void 0)),n(d)}return!0}}function YW(e,t){return function(n,r){if(!io(n))return!1;const o=Vd(n);if(o.nodeAfter.attrs[e]===t)return!1;if(r){const i=n.tr;n.selection instanceof gn?n.selection.forEachCell((a,s)=>{a.attrs[e]!==t&&i.setNodeMarkup(s,null,{...a.attrs,[e]:t})}):i.setNodeMarkup(o.pos,null,{...o.nodeAfter.attrs,[e]:t}),r(i)}return!0}}function JW(e){return function(t,n){if(!io(t))return!1;if(n){const r=ar(t.schema),o=wo(t),i=t.tr,a=o.map.cellsInRect(e=="column"?{left:o.left,top:0,right:o.right,bottom:o.map.height}:e=="row"?{left:0,top:o.top,right:o.map.width,bottom:o.bottom}:o),s=a.map(l=>o.table.nodeAt(l));for(let l=0;l<a.length;l++)s[l].type==r.header_cell&&i.setNodeMarkup(o.tableStart+a[l],r.cell,s[l].attrs);if(i.steps.length==0)for(let l=0;l<a.length;l++)i.setNodeMarkup(o.tableStart+a[l],r.header_cell,s[l].attrs);n(i)}return!0}}function $C(e,t,n){const r=t.map.cellsInRect({left:0,top:0,right:e=="row"?t.map.width:1,bottom:e=="column"?t.map.height:1});for(let o=0;o<r.length;o++){const i=t.table.nodeAt(r[o]);if(i&&i.type!==n.header_cell)return!1}return!0}function pl(e,t){return t=t||{useDeprecatedLogic:!1},t.useDeprecatedLogic?JW(e):function(n,r){if(!io(n))return!1;if(r){const o=ar(n.schema),i=wo(n),a=n.tr,s=$C("row",i,o),l=$C("column",i,o),u=(e==="column"?s:e==="row"?l:!1)?1:0,d=e=="column"?{left:0,top:u,right:1,bottom:i.map.height}:e=="row"?{left:u,top:0,right:i.map.width,bottom:1}:i,f=e=="column"?l?o.cell:o.header_cell:e=="row"?s?o.cell:o.header_cell:o.cell;i.map.cellsInRect(d).forEach(h=>{const m=h+i.tableStart,v=a.doc.nodeAt(m);v&&a.setNodeMarkup(m,f,v.attrs)}),r(a)}return!0}}pl("row",{useDeprecatedLogic:!0});pl("column",{useDeprecatedLogic:!0});var QW=pl("cell",{useDeprecatedLogic:!0});function ZW(e,t){if(t<0){const n=e.nodeBefore;if(n)return e.pos-n.nodeSize;for(let r=e.index(-1)-1,o=e.before();r>=0;r--){const i=e.node(-1).child(r),a=i.lastChild;if(a)return o-1-a.nodeSize;o-=i.nodeSize}}else{if(e.index()<e.parent.childCount-1)return e.pos+e.nodeAfter.nodeSize;const n=e.node(-1);for(let r=e.indexAfter(-1),o=e.after();r<n.childCount;r++){const i=n.child(r);if(i.childCount)return o+1;o+=i.nodeSize}}return null}function NC(e){return function(t,n){if(!io(t))return!1;const r=ZW(Vd(t),e);if(r==null)return!1;if(n){const o=t.doc.resolve(r);n(t.tr.setSelection(Ct.between(o,IW(o))).scrollIntoView())}return!0}}function e8(e,t){const n=e.selection.$anchor;for(let r=n.depth;r>0;r--)if(n.node(r).type.spec.tableRole=="table")return t&&t(e.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}function pc(e,t){const n=e.selection;if(!(n instanceof gn))return!1;if(t){const r=e.tr,o=ar(e.schema).cell.createAndFill().content;n.forEachCell((i,a)=>{i.content.eq(o)||r.replace(r.mapping.map(a+1),r.mapping.map(a+i.nodeSize-1),new nt(o,0,0))}),r.docChanged&&t(r)}return!0}function t8(e){if(!e.size)return null;let{content:t,openStart:n,openEnd:r}=e;for(;t.childCount==1&&(n>0&&r>0||t.child(0).type.spec.tableRole=="table");)n--,r--,t=t.child(0).content;const o=t.child(0),i=o.type.spec.tableRole,a=o.type.schema,s=[];if(i=="row")for(let l=0;l<t.childCount;l++){let c=t.child(l).content;const u=l?0:Math.max(0,n-1),d=l<t.childCount-1?0:Math.max(0,r-1);(u||d)&&(c=lm(ar(a).row,new nt(c,u,d)).content),s.push(c)}else if(i=="cell"||i=="header_cell")s.push(n||r?lm(ar(a).row,new nt(t,n,r)).content:t);else return null;return n8(a,s)}function n8(e,t){const n=[];for(let o=0;o<t.length;o++){const i=t[o];for(let a=i.childCount-1;a>=0;a--){const{rowspan:s,colspan:l}=i.child(a).attrs;for(let c=o;c<o+s;c++)n[c]=(n[c]||0)+l}}let r=0;for(let o=0;o<n.length;o++)r=Math.max(r,n[o]);for(let o=0;o<n.length;o++)if(o>=t.length&&t.push(Ae.empty),n[o]<r){const i=ar(e).cell.createAndFill(),a=[];for(let s=n[o];s<r;s++)a.push(i);t[o]=t[o].append(Ae.from(a))}return{height:t.length,width:r,rows:t}}function lm(e,t){const n=e.createAndFill();return new xm(n).replace(0,n.content.size,t).doc}function r8({width:e,height:t,rows:n},r,o){if(e!=r){const i=[],a=[];for(let s=0;s<n.length;s++){const l=n[s],c=[];for(let u=i[s]||0,d=0;u<r;d++){let f=l.child(d%l.childCount);u+f.attrs.colspan>r&&(f=f.type.createChecked(ta(f.attrs,f.attrs.colspan,u+f.attrs.colspan-r),f.content)),c.push(f),u+=f.attrs.colspan;for(let h=1;h<f.attrs.rowspan;h++)i[s+h]=(i[s+h]||0)+f.attrs.colspan}a.push(Ae.from(c))}n=a,e=r}if(t!=o){const i=[];for(let a=0,s=0;a<o;a++,s++){const l=[],c=n[s%t];for(let u=0;u<c.childCount;u++){let d=c.child(u);a+d.attrs.rowspan>o&&(d=d.type.create({...d.attrs,rowspan:Math.max(1,o-d.attrs.rowspan)},d.content)),l.push(d)}i.push(Ae.from(l))}n=i,t=o}return{width:e,height:t,rows:n}}function o8(e,t,n,r,o,i,a){const s=e.doc.type.schema,l=ar(s);let c,u;if(o>t.width)for(let d=0,f=0;d<t.height;d++){const h=n.child(d);f+=h.nodeSize;const m=[];let v;h.lastChild==null||h.lastChild.type==l.cell?v=c||(c=l.cell.createAndFill()):v=u||(u=l.header_cell.createAndFill());for(let g=t.width;g<o;g++)m.push(v);e.insert(e.mapping.slice(a).map(f-1+r),m)}if(i>t.height){const d=[];for(let m=0,v=(t.height-1)*t.width;m<Math.max(t.width,o);m++){const g=m>=t.width?!1:n.nodeAt(t.map[v+m]).type==l.header_cell;d.push(g?u||(u=l.header_cell.createAndFill()):c||(c=l.cell.createAndFill()))}const f=l.row.create(null,Ae.from(d)),h=[];for(let m=t.height;m<i;m++)h.push(f);e.insert(e.mapping.slice(a).map(r+n.nodeSize-2),h)}return!!(c||u)}function MC(e,t,n,r,o,i,a,s){if(a==0||a==t.height)return!1;let l=!1;for(let c=o;c<i;c++){const u=a*t.width+c,d=t.map[u];if(t.map[u-t.width]==d){l=!0;const f=n.nodeAt(d),{top:h,left:m}=t.findCell(d);e.setNodeMarkup(e.mapping.slice(s).map(d+r),null,{...f.attrs,rowspan:a-h}),e.insert(e.mapping.slice(s).map(t.positionAt(a,m,n)),f.type.createAndFill({...f.attrs,rowspan:h+f.attrs.rowspan-a})),c+=f.attrs.colspan-1}}return l}function RC(e,t,n,r,o,i,a,s){if(a==0||a==t.width)return!1;let l=!1;for(let c=o;c<i;c++){const u=c*t.width+a,d=t.map[u];if(t.map[u-1]==d){l=!0;const f=n.nodeAt(d),h=t.colCount(d),m=e.mapping.slice(s).map(d+r);e.setNodeMarkup(m,null,ta(f.attrs,a-h,f.attrs.colspan-(a-h))),e.insert(m+f.nodeSize,f.type.createAndFill(ta(f.attrs,0,a-h))),c+=f.attrs.rowspan-1}}return l}function IC(e,t,n,r,o){let i=n?e.doc.nodeAt(n-1):e.doc;if(!i)throw new Error("No table found");let a=Rn.get(i);const{top:s,left:l}=r,c=l+o.width,u=s+o.height,d=e.tr;let f=0;function h(){if(i=n?d.doc.nodeAt(n-1):d.doc,!i)throw new Error("No table found");a=Rn.get(i),f=d.mapping.maps.length}o8(d,a,i,n,c,u,f)&&h(),MC(d,a,i,n,l,c,s,f)&&h(),MC(d,a,i,n,l,c,u,f)&&h(),RC(d,a,i,n,s,u,l,f)&&h(),RC(d,a,i,n,s,u,c,f)&&h();for(let m=s;m<u;m++){const v=a.positionAt(m,l,i),g=a.positionAt(m,c,i);d.replace(d.mapping.slice(f).map(v+n),d.mapping.slice(f).map(g+n),new nt(o.rows[m-s],0,0))}h(),d.setSelection(new gn(d.doc.resolve(n+a.positionAt(s,l,i)),d.doc.resolve(n+a.positionAt(u-1,c-1,i)))),t(d)}var i8=Pm({ArrowLeft:mc("horiz",-1),ArrowRight:mc("horiz",1),ArrowUp:mc("vert",-1),ArrowDown:mc("vert",1),"Shift-ArrowLeft":gc("horiz",-1),"Shift-ArrowRight":gc("horiz",1),"Shift-ArrowUp":gc("vert",-1),"Shift-ArrowDown":gc("vert",1),Backspace:pc,"Mod-Backspace":pc,Delete:pc,"Mod-Delete":pc});function Hc(e,t,n){return n.eq(e.selection)?!1:(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function mc(e,t){return(n,r,o)=>{if(!o)return!1;const i=n.selection;if(i instanceof gn)return Hc(n,r,xt.near(i.$headCell,t));if(e!="horiz"&&!i.empty)return!1;const a=$$(o,e,t);if(a==null)return!1;if(e=="horiz")return Hc(n,r,xt.near(n.doc.resolve(i.head+t),t));{const s=n.doc.resolve(a),l=y$(s,e,t);let c;return l?c=xt.near(l,1):t<0?c=xt.near(n.doc.resolve(s.before(-1)),-1):c=xt.near(n.doc.resolve(s.after(-1)),1),Hc(n,r,c)}}}function gc(e,t){return(n,r,o)=>{if(!o)return!1;const i=n.selection;let a;if(i instanceof gn)a=i;else{const l=$$(o,e,t);if(l==null)return!1;a=new gn(n.doc.resolve(l))}const s=y$(a.$headCell,e,t);return s?Hc(n,r,new gn(a.$anchorCell,s)):!1}}function a8(e,t){const n=e.state.doc,r=rs(n.resolve(t));return r?(e.dispatch(e.state.tr.setSelection(new gn(r))),!0):!1}function s8(e,t,n){if(!io(e.state))return!1;let r=t8(n);const o=e.state.selection;if(o instanceof gn){r||(r={width:1,height:1,rows:[Ae.from(lm(ar(e.state.schema).cell,n))]});const i=o.$anchorCell.node(-1),a=o.$anchorCell.start(-1),s=Rn.get(i).rectBetween(o.$anchorCell.pos-a,o.$headCell.pos-a);return r=r8(r,s.right-s.left,s.bottom-s.top),IC(e.state,e.dispatch,a,s,r),!0}else if(r){const i=Vd(e.state),a=i.start(-1);return IC(e.state,e.dispatch,a,Rn.get(i.node(-1)).findCell(i.pos-a),r),!0}else return!1}function l8(e,t){var n;if(t.ctrlKey||t.metaKey)return;const r=TC(e,t.target);let o;if(t.shiftKey&&e.state.selection instanceof gn)i(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&r&&(o=rs(e.state.selection.$anchor))!=null&&((n=uh(e,t))==null?void 0:n.pos)!=o.pos)i(o,t),t.preventDefault();else if(!r)return;function i(l,c){let u=uh(e,c);const d=ni.getState(e.state)==null;if(!u||!Qg(l,u))if(d)u=l;else return;const f=new gn(l,u);if(d||!e.state.selection.eq(f)){const h=e.state.tr.setSelection(f);d&&h.setMeta(ni,l.pos),e.dispatch(h)}}function a(){e.root.removeEventListener("mouseup",a),e.root.removeEventListener("dragstart",a),e.root.removeEventListener("mousemove",s),ni.getState(e.state)!=null&&e.dispatch(e.state.tr.setMeta(ni,-1))}function s(l){const c=l,u=ni.getState(e.state);let d;if(u!=null)d=e.state.doc.resolve(u);else if(TC(e,c.target)!=r&&(d=uh(e,t),!d))return a();d&&i(d,c)}e.root.addEventListener("mouseup",a),e.root.addEventListener("dragstart",a),e.root.addEventListener("mousemove",s)}function $$(e,t,n){if(!(e.state.selection instanceof Ct))return null;const{$head:r}=e.state.selection;for(let o=r.depth-1;o>=0;o--){const i=r.node(o);if((n<0?r.index(o):r.indexAfter(o))!=(n<0?0:i.childCount))return null;if(i.type.spec.tableRole=="cell"||i.type.spec.tableRole=="header_cell"){const s=r.before(o),l=t=="vert"?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(l)?s:null}}return null}function TC(e,t){for(;t&&t!=e.dom;t=t.parentNode)if(t.nodeName=="TD"||t.nodeName=="TH")return t;return null}function uh(e,t){const n=e.posAtCoords({left:t.clientX,top:t.clientY});return n&&n?rs(e.state.doc.resolve(n.pos)):null}var c8=class{constructor(t,n){this.node=t,this.defaultCellMinWidth=n,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${n}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),cm(t,this.colgroup,this.table,n),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(t){return t.type!=this.node.type?!1:(this.node=t,cm(t,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(t){return t.type=="attributes"&&(t.target==this.table||this.colgroup.contains(t.target))}};function cm(e,t,n,r,o,i){var a;let s=0,l=!0,c=t.firstChild;const u=e.firstChild;if(u){for(let d=0,f=0;d<u.childCount;d++){const{colspan:h,colwidth:m}=u.child(d).attrs;for(let v=0;v<h;v++,f++){const g=o==f?i:m&&m[v],y=g?g+"px":"";if(s+=g||r,g||(l=!1),c)c.style.width!=y&&(c.style.width=y),c=c.nextSibling;else{const b=document.createElement("col");b.style.width=y,t.appendChild(b)}}}for(;c;){const d=c.nextSibling;(a=c.parentNode)==null||a.removeChild(c),c=d}l?(n.style.width=s+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=s+"px")}}var wr=new _n("tableColumnResizing");function u8({handleWidth:e=5,cellMinWidth:t=25,defaultCellMinWidth:n=100,View:r=c8,lastColumnResizable:o=!0}={}){const i=new xn({key:wr,state:{init(a,s){var l,c;const u=(c=(l=i.spec)==null?void 0:l.props)==null?void 0:c.nodeViews,d=ar(s.schema).table.name;return r&&u&&(u[d]=(f,h)=>new r(f,n,h)),new d8(-1,!1)},apply(a,s){return s.apply(a)}},props:{attributes:a=>{const s=wr.getState(a);return s&&s.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(a,s)=>{f8(a,s,e,o)},mouseleave:a=>{h8(a)},mousedown:(a,s)=>{p8(a,s,t,n)}},decorations:a=>{const s=wr.getState(a);if(s&&s.activeHandle>-1)return y8(a,s.activeHandle)},nodeViews:{}}});return i}var d8=class Vc{constructor(t,n){this.activeHandle=t,this.dragging=n}apply(t){const n=this,r=t.getMeta(wr);if(r&&r.setHandle!=null)return new Vc(r.setHandle,!1);if(r&&r.setDragging!==void 0)return new Vc(n.activeHandle,r.setDragging);if(n.activeHandle>-1&&t.docChanged){let o=t.mapping.map(n.activeHandle,-1);return sm(t.doc.resolve(o))||(o=-1),new Vc(o,n.dragging)}return n}};function f8(e,t,n,r){if(!e.editable)return;const o=wr.getState(e.state);if(o&&!o.dragging){const i=g8(t.target);let a=-1;if(i){const{left:s,right:l}=i.getBoundingClientRect();t.clientX-s<=n?a=AC(e,t,"left",n):l-t.clientX<=n&&(a=AC(e,t,"right",n))}if(a!=o.activeHandle){if(!r&&a!==-1){const s=e.state.doc.resolve(a),l=s.node(-1),c=Rn.get(l),u=s.start(-1);if(c.colCount(s.pos-u)+s.nodeAfter.attrs.colspan-1==c.width-1)return}N$(e,a)}}}function h8(e){if(!e.editable)return;const t=wr.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&N$(e,-1)}function p8(e,t,n,r){var o;if(!e.editable)return!1;const i=(o=e.dom.ownerDocument.defaultView)!=null?o:window,a=wr.getState(e.state);if(!a||a.activeHandle==-1||a.dragging)return!1;const s=e.state.doc.nodeAt(a.activeHandle),l=m8(e,a.activeHandle,s.attrs);e.dispatch(e.state.tr.setMeta(wr,{setDragging:{startX:t.clientX,startWidth:l}}));function c(d){i.removeEventListener("mouseup",c),i.removeEventListener("mousemove",u);const f=wr.getState(e.state);f!=null&&f.dragging&&(v8(e,f.activeHandle,PC(f.dragging,d,n)),e.dispatch(e.state.tr.setMeta(wr,{setDragging:null})))}function u(d){if(!d.which)return c(d);const f=wr.getState(e.state);if(f&&f.dragging){const h=PC(f.dragging,d,n);kC(e,f.activeHandle,h,r)}}return kC(e,a.activeHandle,l,r),i.addEventListener("mouseup",c),i.addEventListener("mousemove",u),t.preventDefault(),!0}function m8(e,t,{colspan:n,colwidth:r}){const o=r&&r[r.length-1];if(o)return o;const i=e.domAtPos(t);let s=i.node.childNodes[i.offset].offsetWidth,l=n;if(r)for(let c=0;c<n;c++)r[c]&&(s-=r[c],l--);return s/l}function g8(e){for(;e&&e.nodeName!="TD"&&e.nodeName!="TH";)e=e.classList&&e.classList.contains("ProseMirror")?null:e.parentNode;return e}function AC(e,t,n,r){const o=n=="right"?-r:r,i=e.posAtCoords({left:t.clientX+o,top:t.clientY});if(!i)return-1;const{pos:a}=i,s=rs(e.state.doc.resolve(a));if(!s)return-1;if(n=="right")return s.pos;const l=Rn.get(s.node(-1)),c=s.start(-1),u=l.map.indexOf(s.pos-c);return u%l.width==0?-1:c+l.map[u-1]}function PC(e,t,n){const r=t.clientX-e.startX;return Math.max(n,e.startWidth+r)}function N$(e,t){e.dispatch(e.state.tr.setMeta(wr,{setHandle:t}))}function v8(e,t,n){const r=e.state.doc.resolve(t),o=r.node(-1),i=Rn.get(o),a=r.start(-1),s=i.colCount(r.pos-a)+r.nodeAfter.attrs.colspan-1,l=e.state.tr;for(let c=0;c<i.height;c++){const u=c*i.width+s;if(c&&i.map[u]==i.map[u-i.width])continue;const d=i.map[u],f=o.nodeAt(d).attrs,h=f.colspan==1?0:s-i.colCount(d);if(f.colwidth&&f.colwidth[h]==n)continue;const m=f.colwidth?f.colwidth.slice():b8(f.colspan);m[h]=n,l.setNodeMarkup(a+d,null,{...f,colwidth:m})}l.docChanged&&e.dispatch(l)}function kC(e,t,n,r){const o=e.state.doc.resolve(t),i=o.node(-1),a=o.start(-1),s=Rn.get(i).colCount(o.pos-a)+o.nodeAfter.attrs.colspan-1;let l=e.domAtPos(o.start(-1)).node;for(;l&&l.nodeName!="TABLE";)l=l.parentNode;l&&cm(i,l.firstChild,l,r,s,n)}function b8(e){return Array(e).fill(0)}function y8(e,t){var n;const r=[],o=e.doc.resolve(t),i=o.node(-1);if(!i)return mn.empty;const a=Rn.get(i),s=o.start(-1),l=a.colCount(o.pos-s)+o.nodeAfter.attrs.colspan-1;for(let c=0;c<a.height;c++){const u=l+c*a.width;if((l==a.width-1||a.map[u]!=a.map[u+1])&&(c==0||a.map[u]!=a.map[u-a.width])){const d=a.map[u],f=s+d+i.nodeAt(d).nodeSize-1,h=document.createElement("div");h.className="column-resize-handle",(n=wr.getState(e))!=null&&n.dragging&&r.push(Kn.node(s+d,s+d+i.nodeAt(d).nodeSize,{class:"column-resize-dragging"})),r.push(Kn.widget(f,h))}}return mn.create(e.doc,r)}function C8({allowTableNodeSelection:e=!1}={}){return new xn({key:ni,state:{init(){return null},apply(t,n){const r=t.getMeta(ni);if(r!=null)return r==-1?null:r;if(n==null||!t.docChanged)return n;const{deleted:o,pos:i}=t.mapping.mapResult(n);return o?null:i}},props:{decorations:PW,handleDOMEvents:{mousedown:l8},createSelectionBetween(t){return ni.getState(t.state)!=null?t.state.selection:null},handleTripleClick:a8,handleKeyDown:i8,handlePaste:s8},appendTransaction(t,n,r){return _W(r,w$(r,n),e)}})}function um(e,t){return t?["width",`${Math.max(t,e)}px`]:["min-width",`${e}px`]}function DC(e,t,n,r,o,i){var a;let s=0,l=!0,c=t.firstChild;const u=e.firstChild;if(u!==null)for(let d=0,f=0;d<u.childCount;d+=1){const{colspan:h,colwidth:m}=u.child(d).attrs;for(let v=0;v<h;v+=1,f+=1){const g=o===f?i:m&&m[v],y=g?`${g}px`:"";if(s+=g||r,g||(l=!1),c){if(c.style.width!==y){const[b,C]=um(r,g);c.style.setProperty(b,C)}c=c.nextSibling}else{const b=document.createElement("col"),[C,x]=um(r,g);b.style.setProperty(C,x),t.appendChild(b)}}}for(;c;){const d=c.nextSibling;(a=c.parentNode)===null||a===void 0||a.removeChild(c),c=d}l?(n.style.width=`${s}px`,n.style.minWidth=""):(n.style.width="",n.style.minWidth=`${s}px`)}class S8{constructor(t,n){this.node=t,this.cellMinWidth=n,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),DC(t,this.colgroup,this.table,n),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(t){return t.type!==this.node.type?!1:(this.node=t,DC(t,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(t){return t.type==="attributes"&&(t.target===this.table||this.colgroup.contains(t.target))}}function x8(e,t,n,r){let o=0,i=!0;const a=[],s=e.firstChild;if(!s)return{};for(let d=0,f=0;d<s.childCount;d+=1){const{colspan:h,colwidth:m}=s.child(d).attrs;for(let v=0;v<h;v+=1,f+=1){const g=n===f?r:m&&m[v];o+=g||t,g||(i=!1);const[y,b]=um(t,g);a.push(["col",{style:`${y}: ${b}`}])}}const l=i?`${o}px`:"",c=i?"":`${o}px`;return{colgroup:["colgroup",{},...a],tableWidth:l,tableMinWidth:c}}function _C(e,t){return e.createAndFill()}function w8(e){if(e.cached.tableNodeTypes)return e.cached.tableNodeTypes;const t={};return Object.keys(e.nodes).forEach(n=>{const r=e.nodes[n];r.spec.tableRole&&(t[r.spec.tableRole]=r)}),e.cached.tableNodeTypes=t,t}function E8(e,t,n,r,o){const i=w8(e),a=[],s=[];for(let c=0;c<n;c+=1){const u=_C(i.cell);if(u&&s.push(u),r){const d=_C(i.header_cell);d&&a.push(d)}}const l=[];for(let c=0;c<t;c+=1)l.push(i.row.createChecked(null,r&&c===0?a:s));return i.table.createChecked(null,l)}function O8(e){return e instanceof gn}const vc=({editor:e})=>{const{selection:t}=e.state;if(!O8(t))return!1;let n=0;const r=Lx(t.ranges[0].$from,i=>i.type.name==="table");return r==null||r.node.descendants(i=>{if(i.type.name==="table")return!1;["tableCell","tableHeader"].includes(i.type.name)&&(n+=1)}),n===t.ranges.length?(e.commands.deleteTable(),!0):!1},$8=En.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,handleWidth:5,cellMinWidth:25,View:S8,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML(){return[{tag:"table"}]},renderHTML({node:e,HTMLAttributes:t}){const{colgroup:n,tableWidth:r,tableMinWidth:o}=x8(e,this.options.cellMinWidth);return["table",nn(this.options.HTMLAttributes,t,{style:r?`width: ${r}`:`min-width: ${o}`}),n,["tbody",0]]},addCommands(){return{insertTable:({rows:e=3,cols:t=3,withHeaderRow:n=!0}={})=>({tr:r,dispatch:o,editor:i})=>{const a=E8(i.schema,e,t,n);if(o){const s=r.selection.from+1;r.replaceSelectionWith(a).scrollIntoView().setSelection(Ct.near(r.doc.resolve(s)))}return!0},addColumnBefore:()=>({state:e,dispatch:t})=>BW(e,t),addColumnAfter:()=>({state:e,dispatch:t})=>zW(e,t),deleteColumn:()=>({state:e,dispatch:t})=>HW(e,t),addRowBefore:()=>({state:e,dispatch:t})=>WW(e,t),addRowAfter:()=>({state:e,dispatch:t})=>UW(e,t),deleteRow:()=>({state:e,dispatch:t})=>KW(e,t),deleteTable:()=>({state:e,dispatch:t})=>e8(e,t),mergeCells:()=>({state:e,dispatch:t})=>EC(e,t),splitCell:()=>({state:e,dispatch:t})=>OC(e,t),toggleHeaderColumn:()=>({state:e,dispatch:t})=>pl("column")(e,t),toggleHeaderRow:()=>({state:e,dispatch:t})=>pl("row")(e,t),toggleHeaderCell:()=>({state:e,dispatch:t})=>QW(e,t),mergeOrSplit:()=>({state:e,dispatch:t})=>EC(e,t)?!0:OC(e,t),setCellAttribute:(e,t)=>({state:n,dispatch:r})=>YW(e,t)(n,r),goToNextCell:()=>({state:e,dispatch:t})=>NC(1)(e,t),goToPreviousCell:()=>({state:e,dispatch:t})=>NC(-1)(e,t),fixTables:()=>({state:e,dispatch:t})=>(t&&w$(e),!0),setCellSelection:e=>({tr:t,dispatch:n})=>{if(n){const r=gn.create(t.doc,e.anchorCell,e.headCell);t.setSelection(r)}return!0}}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.goToNextCell()?!0:this.editor.can().addRowAfter()?this.editor.chain().addRowAfter().goToNextCell().run():!1,"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:vc,"Mod-Backspace":vc,Delete:vc,"Mod-Delete":vc}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[u8({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],C8({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(e){const t={name:e.name,options:e.options,storage:e.storage};return{tableRole:Dt(pt(e,"tableRole",t))}}}),N8=$8.extend({name:"table",addAttributes(){var e;return{...(e=this.parent)==null?void 0:e.call(this),backgroundColor:{default:null,parseHTML:t=>t.getAttribute("data-background-color"),renderHTML:t=>t.backgroundColor?{"data-background-color":t.backgroundColor,style:`background-color: ${t.backgroundColor}`}:{}},borderColor:{default:"#e5e7eb",parseHTML:t=>t.getAttribute("data-border-color"),renderHTML:t=>t.borderColor?{"data-border-color":t.borderColor,style:`border-color: ${t.borderColor}`}:{}},borderWidth:{default:"1px",parseHTML:t=>t.getAttribute("data-border-width"),renderHTML:t=>t.borderWidth?{"data-border-width":t.borderWidth,style:`border-width: ${t.borderWidth}`}:{}}}},addCommands(){var e;return{...(e=this.parent)==null?void 0:e.call(this),setTableBackgroundColor:t=>({commands:n})=>n.updateAttributes(this.name,{backgroundColor:t}),setTableBorderColor:t=>({commands:n})=>n.updateAttributes(this.name,{borderColor:t}),setTableBorderWidth:t=>({commands:n})=>n.updateAttributes(this.name,{borderWidth:t})}}}),M8=En.create({name:"tableCell",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{const t=e.getAttribute("colwidth");return t?t.split(",").map(r=>parseInt(r,10)):null}}}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td"}]},renderHTML({HTMLAttributes:e}){return["td",nn(this.options.HTMLAttributes,e),0]}}),R8=M8.extend({name:"tableCell",addAttributes(){var e;return{...(e=this.parent)==null?void 0:e.call(this),backgroundColor:{default:null,parseHTML:t=>t.getAttribute("data-background-color"),renderHTML:t=>t.backgroundColor?{"data-background-color":t.backgroundColor,style:`background-color: ${t.backgroundColor}`}:{}},borderColor:{default:null,parseHTML:t=>t.getAttribute("data-border-color"),renderHTML:t=>t.borderColor?{"data-border-color":t.borderColor,style:`border-color: ${t.borderColor}`}:{}}}},addCommands(){var e;return{...(e=this.parent)==null?void 0:e.call(this),setCellBackgroundColor:t=>({commands:n})=>n.updateAttributes(this.name,{backgroundColor:t}),setCellBorderColor:t=>({commands:n})=>n.updateAttributes(this.name,{borderColor:t})}}});function I8({editor:e}){const[t,n]=O.useState(!1);return j.jsxs("div",{className:"relative",children:[j.jsx("button",{type:"button",className:`p-1 text-black transition-all duration-300 rounded-md shadow-lg hover:bg-blue-100 hover:text-blue-600 ${t?"bg-blue-100 text-blue-600":""}`,onClick:r=>{r.preventDefault(),r.stopPropagation(),n(!t)},children:t?j.jsx(bW,{size:24}):j.jsx(R6,{size:24})}),t&&j.jsx("div",{className:"fixed z-40 w-64 p-4 bg-white border border-gray-200 rounded-lg shadow-xl bottom-20 right-4 animate-slide-up",children:j.jsxs("div",{className:"space-y-2",children:[j.jsx("h3",{className:"mb-3 font-bold text-center text-gray-700",children:"Custom Extensions"}),j.jsxs("button",{type:"button",onClick:()=>{e.chain().focus().insertContent({type:"accordion",content:[{type:"paragraph",content:[{type:"text",text:"Accordion content"}]}]}).run()},className:"flex items-center justify-center w-full gap-2 px-3 py-1 text-blue-600 duration-300 rounded-md bg-blue-50 hover:bg-blue-100 hover:text-blue-700",children:[j.jsx(Na,{size:16})," Accordion"]})]})})]})}function T8({editor:e}){const[t,n]=O.useState(!1),[r,o]=O.useState(!1);if(!e.isActive("table"))return null;const a=h=>{const m=h.toHexString();e.chain().focus().setCellBackgroundColor(m).run()},s=h=>{const m=h.toHexString();e.chain().focus().setTableBorderColor(m).run()},l=e.can().deleteRow(),c=e.can().deleteColumn(),u=e.can().mergeCells(),d=e.can().splitCell(),f=[{key:"insert-row-before",label:j.jsxs("div",{className:"flex items-center gap-2",children:[j.jsx(Na,{size:16}),"Insert Row Above"]}),onClick:()=>{e.chain().focus().addRowBefore().run()}},{key:"insert-row-after",label:j.jsxs("div",{className:"flex items-center gap-2",children:[j.jsx(Na,{size:16}),"Insert Row Below"]}),onClick:()=>{e.chain().focus().addRowAfter().run()}},{key:"delete-row",label:j.jsxs("div",{className:`flex items-center gap-2 ${l?"text-red-600":"opacity-50"}`,children:[j.jsx(om,{size:16}),"Delete Row"]}),onClick:()=>{l&&e.chain().focus().deleteRow().run()},disabled:!l},{type:"divider"},{key:"insert-column-before",label:j.jsxs("div",{className:"flex items-center gap-2",children:[j.jsx(Na,{size:16}),"Insert Column Left"]}),onClick:()=>{e.chain().focus().addColumnBefore().run()}},{key:"insert-column-after",label:j.jsxs("div",{className:"flex items-center gap-2",children:[j.jsx(Na,{size:16}),"Insert Column Right"]}),onClick:()=>{e.chain().focus().addColumnAfter().run()}},{key:"delete-column",label:j.jsxs("div",{className:`flex items-center gap-2 ${c?"text-red-600":"opacity-50"}`,children:[j.jsx(om,{size:16}),"Delete Column"]}),onClick:()=>{c&&e.chain().focus().deleteColumn().run()},disabled:!c},{type:"divider"},{key:"merge-cells",label:j.jsxs("div",{className:`flex items-center gap-2 ${u?"":"opacity-50"}`,children:[j.jsx(p6,{size:16}),"Merge Cells"]}),onClick:()=>{u&&e.chain().focus().mergeCells().run()},disabled:!u},{key:"split-cell",label:j.jsxs("div",{className:`flex items-center gap-2 ${d?"":"opacity-50"}`,children:[j.jsx(xC,{size:16}),"Split Cell"]}),onClick:()=>{d&&e.chain().focus().splitCell().run()},disabled:!d},{type:"divider"},{key:"delete-table",label:j.jsxs("div",{className:"flex items-center gap-2 text-red-600",children:[j.jsx(Jg,{size:16}),"Delete Table"]}),onClick:()=>{window.confirm("Are you sure you want to delete this table?")&&e.chain().focus().deleteTable().run()}}];return j.jsxs("div",{className:"flex items-center gap-1",children:[j.jsx("span",{className:"text-xs font-medium text-gray-500 px-2",children:"Table"}),j.jsx(Oi,{menu:{items:f},trigger:["hover"],children:j.jsx(Sn,{title:"Table Operations",children:j.jsx("button",{type:"button",className:"p-2 rounded-md hover:bg-blue-100 hover:text-blue-600 transition-colors",children:j.jsx(xC,{size:16})})})}),j.jsxs("div",{className:"relative",children:[j.jsx(Sn,{title:"Cell Background Color",children:j.jsx("button",{type:"button",onClick:()=>n(!t),className:"p-2 rounded-md hover:bg-blue-100 hover:text-blue-600 transition-colors",children:j.jsx(B6,{size:16})})}),t&&j.jsxs("div",{className:"absolute top-full mt-2 left-0 z-50 p-3 bg-white border border-gray-300 rounded-lg shadow-xl",children:[j.jsx("div",{className:"mb-2 text-sm font-medium",children:"Cell Color"}),j.jsx(Ya,{value:"#ffffff",onChange:a}),j.jsxs("div",{className:"flex gap-2 mt-2",children:[j.jsx("button",{onClick:()=>{e.chain().focus().setCellBackgroundColor(null).run(),n(!1)},className:"flex-1 px-3 py-1 text-sm bg-red-50 text-red-600 rounded hover:bg-red-100",children:"Clear"}),j.jsx("button",{onClick:()=>n(!1),className:"flex-1 px-3 py-1 text-sm bg-gray-100 rounded hover:bg-gray-200",children:"Close"})]})]})]}),j.jsxs("div",{className:"relative",children:[j.jsx(Sn,{title:"Table Border Color",children:j.jsx("button",{type:"button",onClick:()=>o(!r),className:"p-2 rounded-md hover:bg-blue-100 hover:text-blue-600 transition-colors",children:j.jsx("span",{className:"text-xs font-semibold",children:"BD"})})}),r&&j.jsxs("div",{className:"absolute top-full mt-2 left-0 z-50 p-3 bg-white border border-gray-300 rounded-lg shadow-xl",children:[j.jsx("div",{className:"mb-2 text-sm font-medium",children:"Border Color"}),j.jsx(Ya,{value:"#e5e7eb",onChange:s}),j.jsxs("div",{className:"flex gap-2 mt-2",children:[j.jsx("button",{onClick:()=>{e.chain().focus().setTableBorderColor(null).run(),o(!1)},className:"flex-1 px-3 py-1 text-sm bg-red-50 text-red-600 rounded hover:bg-red-100",children:"Clear"}),j.jsx("button",{onClick:()=>o(!1),className:"flex-1 px-3 py-1 text-sm bg-gray-100 rounded hover:bg-gray-200",children:"Close"})]})]})]})]})}function A8({editor:e}){const t=[{label:"8px",value:"8px"},{label:"10px",value:"10px"},{label:"12px",value:"12px"},{label:"14px",value:"14px"},{label:"16px",value:"16px"},{label:"18px",value:"18px"},{label:"20px",value:"20px"},{label:"24px",value:"24px"},{label:"28px",value:"28px"},{label:"32px",value:"32px"},{label:"36px",value:"36px"},{label:"48px",value:"48px"}],n=e.getAttributes("textStyle").fontSize||"16px",r=t.map(o=>({key:o.value,label:j.jsx("div",{className:`flex items-center justify-between ${n===o.value?"bg-blue-50":""}`,children:j.jsx("span",{style:{fontSize:o.value},children:o.label})}),onClick:()=>{e.chain().focus().setFontSize(o.value).run()}}));return j.jsx(Oi,{menu:{items:r},trigger:["hover"],children:j.jsx(Sn,{title:"Font Size",children:j.jsxs("button",{type:"button",className:"px-2 py-1.5 rounded-md hover:bg-blue-100 hover:text-blue-600 transition-colors flex items-center gap-1 text-sm",children:[j.jsx(lW,{size:14}),j.jsx("span",{className:"text-xs",children:n})]})})})}function P8({editor:e}){var o;const t=[{label:"Default",value:""},{label:"Arial",value:"Arial, sans-serif"},{label:"Times New Roman",value:'"Times New Roman", serif'},{label:"Courier New",value:'"Courier New", monospace'},{label:"Georgia",value:"Georgia, serif"},{label:"Verdana",value:"Verdana, sans-serif"},{label:"Comic Sans MS",value:'"Comic Sans MS", cursive'},{label:"Impact",value:"Impact, sans-serif"},{label:"Trebuchet MS",value:'"Trebuchet MS", sans-serif'}],n=e.getAttributes("textStyle").fontFamily||"Default",r=t.map(i=>({key:i.value||"default",label:j.jsx("div",{className:`${n===i.value?"bg-blue-50":""}`,style:{fontFamily:i.value||"inherit"},children:i.label}),onClick:()=>{i.value?e.chain().focus().setFontFamily(i.value).run():e.chain().focus().unsetFontFamily().run()}}));return j.jsx(Oi,{menu:{items:r},trigger:["hover"],children:j.jsx(Sn,{title:"Font Family",children:j.jsx("button",{type:"button",className:"px-2 py-1.5 rounded-md hover:bg-blue-100 hover:text-blue-600 transition-colors text-sm min-w-[80px] text-left",children:j.jsx("span",{className:"text-xs truncate",children:((o=t.find(i=>i.value===n))==null?void 0:o.label)||"Default"})})})})}function k8({editor:e,htmlMode:t,toggleHTML:n}){if(!e)return null;const[r,o]=O.useState(!1),[i,a]=O.useState(""),s="p-2 rounded-md transition-all duration-200 hover:bg-blue-100 hover:text-blue-600",l="bg-blue-100 text-blue-600",c=(v,g,y,b,C)=>j.jsx(Sn,{title:C,children:j.jsx("button",{type:"button",onClick:g,disabled:b,className:`
693
+ ${s}
694
+ ${y?l:""}
695
+ ${b?"opacity-50 cursor-not-allowed":""}
696
+ `,children:v})}),u=v=>j.jsx("span",{className:"text-xs font-medium text-gray-500 px-2",children:v}),d=()=>{const v=document.createElement("input");v.type="file",v.accept="image/*",v.onchange=g=>{var b;const y=(b=g.target.files)==null?void 0:b[0];if(y){const C=new FileReader;C.onload=x=>{var w;const S=(w=x.target)==null?void 0:w.result;S&&e.chain().focus().setImage({src:S}).run()},C.readAsDataURL(y)}},v.click()},f=()=>{i.trim()&&(e.chain().focus().setImage({src:i.trim()}).run(),a(""),o(!1))},h=()=>{const v=prompt("Enter video URL (YouTube, Vimeo, or Dailymotion):");v&&e.chain().focus().setVideo({src:v}).run()},m=[{key:"upload",label:j.jsxs("div",{className:"flex items-center gap-2",children:[j.jsx(pW,{size:16}),"Upload Image"]}),onClick:d},{key:"url",label:j.jsxs("div",{className:"flex items-center gap-2",children:[j.jsx(b$,{size:16}),"Insert from URL"]}),onClick:()=>o(!0)}];return j.jsxs("div",{className:"border-b border-gray-200 rounded-t-lg bg-gray-50",children:[j.jsxs("div",{className:"flex flex-wrap items-center gap-2 p-2 border-b border-gray-100",children:[u("Format"),j.jsxs("div",{className:"flex items-center gap-1",children:[c(j.jsx(gC,{size:16}),n,t,!1,"HTML Source"),c(j.jsx(s6,{size:16}),()=>e.chain().focus().toggleBold().run(),e.isActive("bold"),!1,"Bold (Ctrl+B)"),c(j.jsx(N6,{size:16}),()=>e.chain().focus().toggleItalic().run(),e.isActive("italic"),!1,"Italic (Ctrl+I)"),c(j.jsx(uW,{size:16}),()=>e.chain().focus().toggleUnderline().run(),e.isActive("underline"),!1,"Underline (Ctrl+U)"),c(j.jsx(J6,{size:16}),()=>e.chain().focus().toggleStrike().run(),e.isActive("strike"),!1,"Strikethrough"),c(j.jsx(f6,{size:16}),()=>e.chain().focus().toggleCode().run(),e.isActive("code"),!1,"Inline Code")]}),j.jsx("div",{className:"h-5 w-[1px] bg-gray-300 mx-1"}),j.jsxs("div",{className:"flex items-center gap-1",children:[c(j.jsx(Z6,{size:16}),()=>e.chain().focus().toggleSubscript().run(),e.isActive("subscript"),!1,"Subscript"),c(j.jsx(tW,{size:16}),()=>e.chain().focus().toggleSuperscript().run(),e.isActive("superscript"),!1,"Superscript")]}),j.jsx("div",{className:"h-5 w-[1px] bg-gray-300 mx-1"}),u("Style"),j.jsx(CW,{editor:e}),j.jsx("div",{className:"h-5 w-[1px] bg-gray-300 mx-1"}),u("Font"),j.jsx(P8,{editor:e}),j.jsx(A8,{editor:e}),j.jsx("div",{className:"h-5 w-[1px] bg-gray-300 mx-1"}),u("Color"),j.jsx(yW,{editor:e}),j.jsx("div",{className:"h-5 w-[1px] bg-gray-300 mx-1"}),u("Align"),j.jsxs("div",{className:"flex items-center gap-1",children:[c(j.jsx(m$,{size:16}),()=>e.chain().focus().setTextAlign("left").run(),e.isActive({textAlign:"left"}),!1,"Align Left"),c(j.jsx(p$,{size:16}),()=>e.chain().focus().setTextAlign("center").run(),e.isActive({textAlign:"center"}),!1,"Align Center"),c(j.jsx(g$,{size:16}),()=>e.chain().focus().setTextAlign("right").run(),e.isActive({textAlign:"right"}),!1,"Align Right"),c(j.jsx(t6,{size:16}),()=>e.chain().focus().setTextAlign("justify").run(),e.isActive({textAlign:"justify"}),!1,"Justify")]})]}),j.jsxs("div",{className:"flex flex-wrap items-center gap-2 p-2",children:[u("Lists"),j.jsxs("div",{className:"flex items-center gap-1",children:[c(j.jsx(k6,{size:16}),()=>e.chain().focus().toggleBulletList().run(),e.isActive("bulletList"),!1,"Bullet List"),c(j.jsx(A6,{size:16}),()=>e.chain().focus().toggleOrderedList().run(),e.isActive("orderedList"),!1,"Numbered List"),c(j.jsx(X6,{size:16}),()=>e.chain().focus().toggleTaskList().run(),e.isActive("taskList"),!1,"Task List")]}),j.jsx("div",{className:"h-5 w-[1px] bg-gray-300 mx-1"}),u("Insert"),j.jsxs("div",{className:"flex items-center gap-1 relative",children:[j.jsx(Oi,{menu:{items:m},trigger:["hover"],children:j.jsx(Sn,{title:"Insert Image",children:j.jsx("button",{type:"button",className:s,children:j.jsx(O6,{size:16})})})}),r&&j.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-[10000]",children:j.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-xl max-w-md w-full",children:[j.jsx("h3",{className:"text-lg font-semibold mb-4",children:"Insert Image from URL"}),j.jsx("input",{type:"text",placeholder:"Enter image URL",value:i,onChange:v=>a(v.target.value),onKeyDown:v=>{v.key==="Enter"?f():v.key==="Escape"&&(o(!1),a(""))},className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",autoFocus:!0}),j.jsxs("div",{className:"flex gap-2 mt-4",children:[j.jsx("button",{onClick:f,className:"flex-1 px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700",children:"Insert"}),j.jsx("button",{onClick:()=>{o(!1),a("")},className:"flex-1 px-4 py-2 bg-gray-200 text-gray-700 rounded-md hover:bg-gray-300",children:"Cancel"})]})]})}),c(j.jsx(gW,{size:16}),h,!1,!1,"Insert Video"),j.jsx(wW,{editor:e,buttonClass:s,activeClass:l}),c(j.jsx(W6,{size:16}),()=>e.chain().focus().toggleBlockquote().run(),e.isActive("blockquote"),!1,"Blockquote"),c(j.jsx(om,{size:16}),()=>e.chain().focus().setHorizontalRule().run(),!1,!1,"Horizontal Line"),c(j.jsx(g6,{size:16}),()=>e.chain().focus().setHardBreak().run(),!1,!1,"Line Break")]}),j.jsx("div",{className:"h-5 w-[1px] bg-gray-300 mx-1"}),e.isActive("table")&&j.jsxs(j.Fragment,{children:[j.jsx(T8,{editor:e}),j.jsx("div",{className:"h-5 w-[1px] bg-gray-300 mx-1"})]}),u("History"),j.jsxs("div",{className:"flex items-center gap-1",children:[c(j.jsx(fW,{size:16}),()=>e.chain().focus().undo().run(),!1,!e.can().chain().focus().undo().run(),"Undo (Ctrl+Z)"),c(j.jsx(q6,{size:16}),()=>e.chain().focus().redo().run(),!1,!e.can().chain().focus().redo().run(),"Redo (Ctrl+Y)")]}),j.jsx("div",{className:"h-5 w-[1px] bg-gray-300 mx-1"}),j.jsx(I8,{editor:e}),j.jsx("div",{className:"h-5 w-[1px] bg-gray-300 mx-1"}),c(j.jsx(gC,{size:16}),n,t,!1,"HTML Source")]})]})}const D8=e=>{if(!e.children.length)return;const t=e.querySelectorAll("span");t&&t.forEach(n=>{var r,o;const i=n.getAttribute("style"),a=(o=(r=n.parentElement)===null||r===void 0?void 0:r.closest("span"))===null||o===void 0?void 0:o.getAttribute("style");n.setAttribute("style",`${a};${i}`)})},LC=ro.create({name:"textStyle",priority:101,addOptions(){return{HTMLAttributes:{},mergeNestedSpanStyles:!1}},parseHTML(){return[{tag:"span",getAttrs:e=>e.hasAttribute("style")?(this.options.mergeNestedSpanStyles&&D8(e),{}):!1}]},renderHTML({HTMLAttributes:e}){return["span",nn(this.options.HTMLAttributes,e),0]},addCommands(){return{removeEmptyTextStyle:()=>({tr:e})=>{const{selection:t}=e;return e.doc.nodesBetween(t.from,t.to,(n,r)=>{if(n.isTextblock)return!0;n.marks.filter(o=>o.type===this.type).some(o=>Object.values(o.attrs).some(i=>!!i))||e.removeMark(r,r+n.nodeSize,this.type)}),!0}}}}),_8=dn.create({name:"color",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:e=>{var t;return(t=e.style.color)===null||t===void 0?void 0:t.replace(/['"]+/g,"")},renderHTML:e=>e.color?{style:`color: ${e.color}`}:{}}}}]},addCommands(){return{setColor:e=>({chain:t})=>t().setMark("textStyle",{color:e}).run(),unsetColor:()=>({chain:e})=>e().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()}}});function M$(e={}){return new xn({view(t){return new L8(t,e)}})}class L8{constructor(t,n){var r;this.editorView=t,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=n.width)!==null&&r!==void 0?r:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(o=>{let i=a=>{this[o](a)};return t.dom.addEventListener(o,i),{name:o,handler:i}})}destroy(){this.handlers.forEach(({name:t,handler:n})=>this.editorView.dom.removeEventListener(t,n))}update(t,n){this.cursorPos!=null&&n.doc!=t.state.doc&&(this.cursorPos>t.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(t){t!=this.cursorPos&&(this.cursorPos=t,t==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let t=this.editorView.state.doc.resolve(this.cursorPos),n=!t.parent.inlineContent,r;if(n){let s=t.nodeBefore,l=t.nodeAfter;if(s||l){let c=this.editorView.nodeDOM(this.cursorPos-(s?s.nodeSize:0));if(c){let u=c.getBoundingClientRect(),d=s?u.bottom:u.top;s&&l&&(d=(d+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),r={left:u.left,right:u.right,top:d-this.width/2,bottom:d+this.width/2}}}}if(!r){let s=this.editorView.coordsAtPos(this.cursorPos);r={left:s.left-this.width/2,right:s.left+this.width/2,top:s.top,bottom:s.bottom}}let o=this.editorView.dom.offsetParent;this.element||(this.element=o.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let i,a;if(!o||o==document.body&&getComputedStyle(o).position=="static")i=-pageXOffset,a=-pageYOffset;else{let s=o.getBoundingClientRect();i=s.left-o.scrollLeft,a=s.top-o.scrollTop}this.element.style.left=r.left-i+"px",this.element.style.top=r.top-a+"px",this.element.style.width=r.right-r.left+"px",this.element.style.height=r.bottom-r.top+"px"}scheduleRemoval(t){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),t)}dragover(t){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:t.clientX,top:t.clientY}),r=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),o=r&&r.type.spec.disableDropCursor,i=typeof o=="function"?o(this.editorView,n,t):o;if(n&&!i){let a=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let s=NS(this.editorView.state.doc,a,this.editorView.dragging.slice);s!=null&&(a=s)}this.setCursor(a),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(t){(t.target==this.editorView.dom||!this.editorView.dom.contains(t.relatedTarget))&&this.setCursor(null)}}class Mn extends xt{constructor(t){super(t,t)}map(t,n){let r=t.resolve(n.map(this.head));return Mn.valid(r)?new Mn(r):xt.near(r)}content(){return nt.empty}eq(t){return t instanceof Mn&&t.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new Mn(t.resolve(n.pos))}getBookmark(){return new Zg(this.anchor)}static valid(t){let n=t.parent;if(n.isTextblock||!j8(t)||!B8(t))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let o=n.contentMatchAt(t.index()).defaultType;return o&&o.isTextblock}static findGapCursorFrom(t,n,r=!1){e:for(;;){if(!r&&Mn.valid(t))return t;let o=t.pos,i=null;for(let a=t.depth;;a--){let s=t.node(a);if(n>0?t.indexAfter(a)<s.childCount:t.index(a)>0){i=s.child(n>0?t.indexAfter(a):t.index(a)-1);break}else if(a==0)return null;o+=n;let l=t.doc.resolve(o);if(Mn.valid(l))return l}for(;;){let a=n>0?i.firstChild:i.lastChild;if(!a){if(i.isAtom&&!i.isText&&!yt.isSelectable(i)){t=t.doc.resolve(o+i.nodeSize*n),r=!1;continue e}break}i=a,o+=n;let s=t.doc.resolve(o);if(Mn.valid(s))return s}return null}}}Mn.prototype.visible=!1;Mn.findFrom=Mn.findGapCursorFrom;xt.jsonID("gapcursor",Mn);class Zg{constructor(t){this.pos=t}map(t){return new Zg(t.map(this.pos))}resolve(t){let n=t.resolve(this.pos);return Mn.valid(n)?new Mn(n):xt.near(n)}}function j8(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n-1);;o=o.lastChild){if(o.childCount==0&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}}return!0}function B8(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n);;o=o.firstChild){if(o.childCount==0&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}}return!0}function R$(){return new xn({props:{decorations:V8,createSelectionBetween(e,t,n){return t.pos==n.pos&&Mn.valid(n)?new Mn(n):null},handleClick:F8,handleKeyDown:z8,handleDOMEvents:{beforeinput:H8}}})}const z8=Pm({ArrowLeft:bc("horiz",-1),ArrowRight:bc("horiz",1),ArrowUp:bc("vert",-1),ArrowDown:bc("vert",1)});function bc(e,t){const n=e=="vert"?t>0?"down":"up":t>0?"right":"left";return function(r,o,i){let a=r.selection,s=t>0?a.$to:a.$from,l=a.empty;if(a instanceof Ct){if(!i.endOfTextblock(n)||s.depth==0)return!1;l=!1,s=r.doc.resolve(t>0?s.after():s.before())}let c=Mn.findGapCursorFrom(s,t,l);return c?(o&&o(r.tr.setSelection(new Mn(c))),!0):!1}}function F8(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!Mn.valid(r))return!1;let o=e.posAtCoords({left:n.clientX,top:n.clientY});return o&&o.inside>-1&&yt.isSelectable(e.state.doc.nodeAt(o.inside))?!1:(e.dispatch(e.state.tr.setSelection(new Mn(r))),!0)}function H8(e,t){if(t.inputType!="insertCompositionText"||!(e.state.selection instanceof Mn))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let o=Ae.empty;for(let a=r.length-1;a>=0;a--)o=Ae.from(r[a].createAndFill(null,o));let i=e.state.tr.replace(n.pos,n.pos,new nt(o,0,0));return i.setSelection(Ct.near(i.doc.resolve(n.pos+1))),e.dispatch(i),!1}function V8(e){if(!(e.selection instanceof Mn))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",mn.create(e.doc,[Kn.widget(e.selection.head,t,{key:"gapcursor"})])}var Eu=200,Xn=function(){};Xn.prototype.append=function(t){return t.length?(t=Xn.from(t),!this.length&&t||t.length<Eu&&this.leafAppend(t)||this.length<Eu&&t.leafPrepend(this)||this.appendInner(t)):this};Xn.prototype.prepend=function(t){return t.length?Xn.from(t).append(this):this};Xn.prototype.appendInner=function(t){return new W8(this,t)};Xn.prototype.slice=function(t,n){return t===void 0&&(t=0),n===void 0&&(n=this.length),t>=n?Xn.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,n))};Xn.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)};Xn.prototype.forEach=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(t,n,r,0):this.forEachInvertedInner(t,n,r,0)};Xn.prototype.map=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var o=[];return this.forEach(function(i,a){return o.push(t(i,a))},n,r),o};Xn.from=function(t){return t instanceof Xn?t:t&&t.length?new I$(t):Xn.empty};var I$=function(e){function t(r){e.call(this),this.values=r}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(o,i){return o==0&&i==this.length?this:new t(this.values.slice(o,i))},t.prototype.getInner=function(o){return this.values[o]},t.prototype.forEachInner=function(o,i,a,s){for(var l=i;l<a;l++)if(o(this.values[l],s+l)===!1)return!1},t.prototype.forEachInvertedInner=function(o,i,a,s){for(var l=i-1;l>=a;l--)if(o(this.values[l],s+l)===!1)return!1},t.prototype.leafAppend=function(o){if(this.length+o.length<=Eu)return new t(this.values.concat(o.flatten()))},t.prototype.leafPrepend=function(o){if(this.length+o.length<=Eu)return new t(o.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(Xn);Xn.empty=new I$([]);var W8=function(e){function t(n,r){e.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},t.prototype.forEachInner=function(r,o,i,a){var s=this.left.length;if(o<s&&this.left.forEachInner(r,o,Math.min(i,s),a)===!1||i>s&&this.right.forEachInner(r,Math.max(o-s,0),Math.min(this.length,i)-s,a+s)===!1)return!1},t.prototype.forEachInvertedInner=function(r,o,i,a){var s=this.left.length;if(o>s&&this.right.forEachInvertedInner(r,o-s,Math.max(i,s)-s,a+s)===!1||i<s&&this.left.forEachInvertedInner(r,Math.min(o,s),i,a)===!1)return!1},t.prototype.sliceInner=function(r,o){if(r==0&&o==this.length)return this;var i=this.left.length;return o<=i?this.left.slice(r,o):r>=i?this.right.slice(r-i,o-i):this.left.slice(r,i).append(this.right.slice(0,o-i))},t.prototype.leafAppend=function(r){var o=this.right.leafAppend(r);if(o)return new t(this.left,o)},t.prototype.leafPrepend=function(r){var o=this.left.leafPrepend(r);if(o)return new t(o,this.right)},t.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new t(this.left,new t(this.right,r)):new t(this,r)},t}(Xn);const U8=500;class Yr{constructor(t,n){this.items=t,this.eventCount=n}popEvent(t,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let o,i;n&&(o=this.remapping(r,this.items.length),i=o.maps.length);let a=t.tr,s,l,c=[],u=[];return this.items.forEach((d,f)=>{if(!d.step){o||(o=this.remapping(r,f+1),i=o.maps.length),i--,u.push(d);return}if(o){u.push(new co(d.map));let h=d.step.map(o.slice(i)),m;h&&a.maybeStep(h).doc&&(m=a.mapping.maps[a.mapping.maps.length-1],c.push(new co(m,void 0,void 0,c.length+u.length))),i--,m&&o.appendMap(m,i)}else a.maybeStep(d.step);if(d.selection)return s=o?d.selection.map(o.slice(i)):d.selection,l=new Yr(this.items.slice(0,r).append(u.reverse().concat(c)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:a,selection:s}}addTransform(t,n,r,o){let i=[],a=this.eventCount,s=this.items,l=!o&&s.length?s.get(s.length-1):null;for(let u=0;u<t.steps.length;u++){let d=t.steps[u].invert(t.docs[u]),f=new co(t.mapping.maps[u],d,n),h;(h=l&&l.merge(f))&&(f=h,u?i.pop():s=s.slice(0,s.length-1)),i.push(f),n&&(a++,n=void 0),o||(l=f)}let c=a-r.depth;return c>K8&&(s=q8(s,c),a-=c),new Yr(s.append(i),a)}remapping(t,n){let r=new Gs;return this.items.forEach((o,i)=>{let a=o.mirrorOffset!=null&&i-o.mirrorOffset>=t?r.maps.length-o.mirrorOffset:void 0;r.appendMap(o.map,a)},t,n),r}addMaps(t){return this.eventCount==0?this:new Yr(this.items.append(t.map(n=>new co(n))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;let r=[],o=Math.max(0,this.items.length-n),i=t.mapping,a=t.steps.length,s=this.eventCount;this.items.forEach(f=>{f.selection&&s--},o);let l=n;this.items.forEach(f=>{let h=i.getMirror(--l);if(h==null)return;a=Math.min(a,h);let m=i.maps[h];if(f.step){let v=t.steps[h].invert(t.docs[h]),g=f.selection&&f.selection.map(i.slice(l+1,h));g&&s++,r.push(new co(m,v,g))}else r.push(new co(m))},o);let c=[];for(let f=n;f<a;f++)c.push(new co(i.maps[f]));let u=this.items.slice(0,o).append(c).append(r),d=new Yr(u,s);return d.emptyItemCount()>U8&&(d=d.compress(this.items.length-r.length)),d}emptyItemCount(){let t=0;return this.items.forEach(n=>{n.step||t++}),t}compress(t=this.items.length){let n=this.remapping(0,t),r=n.maps.length,o=[],i=0;return this.items.forEach((a,s)=>{if(s>=t)o.push(a),a.selection&&i++;else if(a.step){let l=a.step.map(n.slice(r)),c=l&&l.getMap();if(r--,c&&n.appendMap(c,r),l){let u=a.selection&&a.selection.map(n.slice(r));u&&i++;let d=new co(c.invert(),l,u),f,h=o.length-1;(f=o.length&&o[h].merge(d))?o[h]=f:o.push(d)}}else a.map&&r--},this.items.length,0),new Yr(Xn.from(o.reverse()),i)}}Yr.empty=new Yr(Xn.empty,0);function q8(e,t){let n;return e.forEach((r,o)=>{if(r.selection&&t--==0)return n=o,!1}),e.slice(n)}class co{constructor(t,n,r,o){this.map=t,this.step=n,this.selection=r,this.mirrorOffset=o}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new co(n.getMap().invert(),n,this.selection)}}}class Jo{constructor(t,n,r,o,i){this.done=t,this.undone=n,this.prevRanges=r,this.prevTime=o,this.prevComposition=i}}const K8=20;function G8(e,t,n,r){let o=n.getMeta(Ki),i;if(o)return o.historyState;n.getMeta(J8)&&(e=new Jo(e.done,e.undone,null,0,-1));let a=n.getMeta("appendedTransaction");if(n.steps.length==0)return e;if(a&&a.getMeta(Ki))return a.getMeta(Ki).redo?new Jo(e.done.addTransform(n,void 0,r,Wc(t)),e.undone,jC(n.mapping.maps),e.prevTime,e.prevComposition):new Jo(e.done,e.undone.addTransform(n,void 0,r,Wc(t)),null,e.prevTime,e.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(a&&a.getMeta("addToHistory")===!1)){let s=n.getMeta("composition"),l=e.prevTime==0||!a&&e.prevComposition!=s&&(e.prevTime<(n.time||0)-r.newGroupDelay||!X8(n,e.prevRanges)),c=a?dh(e.prevRanges,n.mapping):jC(n.mapping.maps);return new Jo(e.done.addTransform(n,l?t.selection.getBookmark():void 0,r,Wc(t)),Yr.empty,c,n.time,s??e.prevComposition)}else return(i=n.getMeta("rebased"))?new Jo(e.done.rebased(n,i),e.undone.rebased(n,i),dh(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new Jo(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),dh(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function X8(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((r,o)=>{for(let i=0;i<t.length;i+=2)r<=t[i+1]&&o>=t[i]&&(n=!0)}),n}function jC(e){let t=[];for(let n=e.length-1;n>=0&&t.length==0;n--)e[n].forEach((r,o,i,a)=>t.push(i,a));return t}function dh(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let o=t.map(e[r],1),i=t.map(e[r+1],-1);o<=i&&n.push(o,i)}return n}function Y8(e,t,n){let r=Wc(t),o=Ki.get(t).spec.config,i=(n?e.undone:e.done).popEvent(t,r);if(!i)return null;let a=i.selection.resolve(i.transform.doc),s=(n?e.done:e.undone).addTransform(i.transform,t.selection.getBookmark(),o,r),l=new Jo(n?s:i.remaining,n?i.remaining:s,null,0,-1);return i.transform.setSelection(a).setMeta(Ki,{redo:n,historyState:l})}let fh=!1,BC=null;function Wc(e){let t=e.plugins;if(BC!=t){fh=!1,BC=t;for(let n=0;n<t.length;n++)if(t[n].spec.historyPreserveItems){fh=!0;break}}return fh}const Ki=new _n("history"),J8=new _n("closeHistory");function T$(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new xn({key:Ki,state:{init(){return new Jo(Yr.empty,Yr.empty,null,0,-1)},apply(t,n,r){return G8(n,r,t,e)}},config:e,props:{handleDOMEvents:{beforeinput(t,n){let r=n.inputType,o=r=="historyUndo"?ev:r=="historyRedo"?tv:null;return o?(n.preventDefault(),o(t.state,t.dispatch)):!1}}}})}function A$(e,t){return(n,r)=>{let o=Ki.getState(n);if(!o||(e?o.undone:o.done).eventCount==0)return!1;if(r){let i=Y8(o,n,e);i&&r(t?i.scrollIntoView():i)}return!0}}const ev=A$(!1,!0),tv=A$(!0,!0);dn.create({name:"characterCount",addOptions(){return{limit:null,mode:"textSize",textCounter:e=>e.length,wordCounter:e=>e.split(" ").filter(t=>t!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=e=>{const t=(e==null?void 0:e.node)||this.editor.state.doc;if(((e==null?void 0:e.mode)||this.options.mode)==="textSize"){const r=t.textBetween(0,t.content.size,void 0," ");return this.options.textCounter(r)}return t.nodeSize},this.storage.words=e=>{const t=(e==null?void 0:e.node)||this.editor.state.doc,n=t.textBetween(0,t.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let e=!1;return[new xn({key:new _n("characterCount"),appendTransaction:(t,n,r)=>{if(e)return;const o=this.options.limit;if(o==null||o===0){e=!0;return}const i=this.storage.characters({node:r.doc});if(i>o){const a=i-o,s=0,l=a;console.warn(`[CharacterCount] Initial content exceeded limit of ${o} characters. Content was automatically trimmed.`);const c=r.tr.deleteRange(s,l);return e=!0,c}e=!0},filterTransaction:(t,n)=>{const r=this.options.limit;if(!t.docChanged||r===0||r===null||r===void 0)return!0;const o=this.storage.characters({node:n.doc}),i=this.storage.characters({node:t.doc});if(i<=r||o>r&&i>r&&i<=o)return!0;if(o>r&&i>r&&i>o||!t.getMeta("paste"))return!1;const s=t.selection.$head.pos,l=i-r,c=s-l,u=s;return t.deleteRange(c,u),!(this.storage.characters({node:t.doc})>r)}})]}});var Q8=dn.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[M$(this.options)]}});dn.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new xn({key:new _n("focus"),props:{decorations:({doc:e,selection:t})=>{const{isEditable:n,isFocused:r}=this.editor,{anchor:o}=t,i=[];if(!n||!r)return mn.create(e,[]);let a=0;this.options.mode==="deepest"&&e.descendants((l,c)=>{if(l.isText)return;if(!(o>=c&&o<=c+l.nodeSize-1))return!1;a+=1});let s=0;return e.descendants((l,c)=>{if(l.isText||!(o>=c&&o<=c+l.nodeSize-1))return!1;if(s+=1,this.options.mode==="deepest"&&a-s>0||this.options.mode==="shallowest"&&s>1)return this.options.mode==="deepest";i.push(Kn.node(c,c+l.nodeSize,{class:this.options.className}))}),mn.create(e,i)}}})]}});var Z8=dn.create({name:"gapCursor",addProseMirrorPlugins(){return[R$()]},extendNodeSchema(e){var t;const n={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:(t=Dt(pt(e,"allowGapCursor",n)))!=null?t:null}}}),zC="placeholder";function e7(e){return e.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}dn.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:zC,placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){const e=this.options.dataAttribute?`data-${e7(this.options.dataAttribute)}`:`data-${zC}`;return[new xn({key:new _n("placeholder"),props:{decorations:({doc:t,selection:n})=>{const r=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:o}=n,i=[];if(!r)return null;const a=this.editor.isEmpty;return t.descendants((s,l)=>{const c=o>=l&&o<=l+s.nodeSize,u=!s.isLeaf&&dd(s);if((c||!this.options.showOnlyCurrent)&&u){const d=[this.options.emptyNodeClass];a&&d.push(this.options.emptyEditorClass);const f=Kn.node(l,l+s.nodeSize,{class:d.join(" "),[e]:typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:s,pos:l,hasAnchor:c}):this.options.placeholder});i.push(f)}return this.options.includeChildren}),mn.create(t,i)}}})]}});dn.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){const{editor:e,options:t}=this;return[new xn({key:new _n("selection"),props:{decorations(n){return n.selection.empty||e.isFocused||!e.isEditable||Bx(n.selection)||e.view.dragging?null:mn.create(n.doc,[Kn.inline(n.selection.from,n.selection.to,{class:t.className})])}}})]}});function FC({types:e,node:t}){return t&&Array.isArray(e)&&e.includes(t.type)||(t==null?void 0:t.type)===e}dn.create({name:"trailingNode",addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){var e;const t=new _n(this.name),n=this.options.node||((e=this.editor.schema.topNodeType.contentMatch.defaultType)==null?void 0:e.name)||"paragraph",r=Object.entries(this.editor.schema.nodes).map(([,o])=>o).filter(o=>(this.options.notAfter||[]).concat(n).includes(o.name));return[new xn({key:t,appendTransaction:(o,i,a)=>{const{doc:s,tr:l,schema:c}=a,u=t.getState(a),d=s.content.size,f=c.nodes[n];if(u)return l.insert(d,f.create())},state:{init:(o,i)=>{const a=i.tr.doc.lastChild;return!FC({node:a,types:r})},apply:(o,i)=>{if(!o.docChanged||o.getMeta("__uniqueIDTransaction"))return i;const a=o.doc.lastChild;return!FC({node:a,types:r})}}})]}});dn.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:e,dispatch:t})=>ev(e,t),redo:()=>({state:e,dispatch:t})=>tv(e,t)}},addProseMirrorPlugins(){return[T$(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}});var t7=Q8,n7=Z8;const r7=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/,o7=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g,i7=ro.create({name:"highlight",addOptions(){return{multicolor:!1,HTMLAttributes:{}}},addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:e=>e.getAttribute("data-color")||e.style.backgroundColor,renderHTML:e=>e.color?{"data-color":e.color,style:`background-color: ${e.color}; color: inherit`}:{}}}:{}},parseHTML(){return[{tag:"mark"}]},renderHTML({HTMLAttributes:e}){return["mark",nn(this.options.HTMLAttributes,e),0]},addCommands(){return{setHighlight:e=>({commands:t})=>t.setMark(this.name,e),toggleHighlight:e=>({commands:t})=>t.toggleMark(this.name,e),unsetHighlight:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[Ji({find:r7,type:this.type})]},addPasteRules(){return[mi({find:o7,type:this.type})]}}),P$=En.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",nn(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),a7=ro.create({name:"subscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sub"},{style:"vertical-align",getAttrs(e){return e!=="sub"?!1:null}}]},renderHTML({HTMLAttributes:e}){return["sub",nn(this.options.HTMLAttributes,e),0]},addCommands(){return{setSubscript:()=>({commands:e})=>e.setMark(this.name),toggleSubscript:()=>({commands:e})=>e.toggleMark(this.name),unsetSubscript:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-,":()=>this.editor.commands.toggleSubscript()}}}),s7=ro.create({name:"superscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sup"},{style:"vertical-align",getAttrs(e){return e!=="super"?!1:null}}]},renderHTML({HTMLAttributes:e}){return["sup",nn(this.options.HTMLAttributes,e),0]},addCommands(){return{setSuperscript:()=>({commands:e})=>e.setMark(this.name),toggleSuperscript:()=>({commands:e})=>e.toggleMark(this.name),unsetSuperscript:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-.":()=>this.editor.commands.toggleSuperscript()}}}),l7=En.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{const t=e.getAttribute("colwidth");return t?t.split(",").map(r=>parseInt(r,10)):null}}}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th"}]},renderHTML({HTMLAttributes:e}){return["th",nn(this.options.HTMLAttributes,e),0]}}),c7=En.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:e}){return["tr",nn(this.options.HTMLAttributes,e),0]}}),u7=/^\s*(\[([( |x])?\])\s$/,d7=En.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList"}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:e=>{const t=e.getAttribute("data-checked");return t===""||t==="true"},renderHTML:e=>({"data-checked":e.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:e,HTMLAttributes:t}){return["li",nn(this.options.HTMLAttributes,t,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:e.attrs.checked?"checked":null}],["span"]],["div",0]]},addKeyboardShortcuts(){const e={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...e,Tab:()=>this.editor.commands.sinkListItem(this.name)}:e},addNodeView(){return({node:e,HTMLAttributes:t,getPos:n,editor:r})=>{const o=document.createElement("li"),i=document.createElement("label"),a=document.createElement("span"),s=document.createElement("input"),l=document.createElement("div");return i.contentEditable="false",s.type="checkbox",s.addEventListener("mousedown",c=>c.preventDefault()),s.addEventListener("change",c=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){s.checked=!s.checked;return}const{checked:u}=c.target;r.isEditable&&typeof n=="function"&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:d})=>{const f=n();if(typeof f!="number")return!1;const h=d.doc.nodeAt(f);return d.setNodeMarkup(f,void 0,{...h==null?void 0:h.attrs,checked:u}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(e,u)||(s.checked=!s.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([c,u])=>{o.setAttribute(c,u)}),o.dataset.checked=e.attrs.checked,s.checked=e.attrs.checked,i.append(s,a),o.append(i,l),Object.entries(t).forEach(([c,u])=>{o.setAttribute(c,u)}),{dom:o,contentDOM:l,update:c=>c.type!==this.type?!1:(o.dataset.checked=c.attrs.checked,s.checked=c.attrs.checked,!0)}}},addInputRules(){return[Ba({find:u7,type:this.type,getAttributes:e=>({checked:e[e.length-1]==="x"})})]}}),f7=En.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:e}){return["ul",nn(this.options.HTMLAttributes,e,{"data-type":this.name}),0]},addCommands(){return{toggleTaskList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),h7=dn.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:null}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:e=>{const t=e.style.textAlign;return this.options.alignments.includes(t)?t:this.options.defaultAlignment},renderHTML:e=>e.textAlign?{style:`text-align: ${e.textAlign}`}:{}}}}]},addCommands(){return{setTextAlign:e=>({commands:t})=>this.options.alignments.includes(e)?this.options.types.map(n=>t.updateAttributes(n,{textAlign:e})).every(n=>n):!1,unsetTextAlign:()=>({commands:e})=>this.options.types.map(t=>e.resetAttributes(t,"textAlign")).every(t=>t)}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}});var p7=e=>In({find:/--$/,replace:e??"—"}),m7=e=>In({find:/\.\.\.$/,replace:e??"…"}),g7=e=>In({find:/(?:^|[\s{[(<'"\u2018\u201C])(")$/,replace:e??"“"}),v7=e=>In({find:/"$/,replace:e??"”"}),b7=e=>In({find:/(?:^|[\s{[(<'"\u2018\u201C])(')$/,replace:e??"‘"}),y7=e=>In({find:/'$/,replace:e??"’"}),C7=e=>In({find:/<-$/,replace:e??"←"}),S7=e=>In({find:/->$/,replace:e??"→"}),x7=e=>In({find:/\(c\)$/,replace:e??"©"}),w7=e=>In({find:/\(tm\)$/,replace:e??"™"}),E7=e=>In({find:/\(sm\)$/,replace:e??"℠"}),O7=e=>In({find:/\(r\)$/,replace:e??"®"}),$7=e=>In({find:/(?:^|\s)(1\/2)\s$/,replace:e??"½"}),N7=e=>In({find:/\+\/-$/,replace:e??"±"}),M7=e=>In({find:/!=$/,replace:e??"≠"}),R7=e=>In({find:/<<$/,replace:e??"«"}),I7=e=>In({find:/>>$/,replace:e??"»"}),T7=e=>In({find:/\d+\s?([*x])\s?\d+$/,replace:e??"×"}),A7=e=>In({find:/\^2$/,replace:e??"²"}),P7=e=>In({find:/\^3$/,replace:e??"³"}),k7=e=>In({find:/(?:^|\s)(1\/4)\s$/,replace:e??"¼"}),D7=e=>In({find:/(?:^|\s)(3\/4)\s$/,replace:e??"¾"}),_7=dn.create({name:"typography",addOptions(){return{closeDoubleQuote:"”",closeSingleQuote:"’",copyright:"©",ellipsis:"…",emDash:"—",laquo:"«",leftArrow:"←",multiplication:"×",notEqual:"≠",oneHalf:"½",oneQuarter:"¼",openDoubleQuote:"“",openSingleQuote:"‘",plusMinus:"±",raquo:"»",registeredTrademark:"®",rightArrow:"→",servicemark:"℠",superscriptThree:"³",superscriptTwo:"²",threeQuarters:"¾",trademark:"™"}},addInputRules(){const e=[];return this.options.emDash!==!1&&e.push(p7(this.options.emDash)),this.options.ellipsis!==!1&&e.push(m7(this.options.ellipsis)),this.options.openDoubleQuote!==!1&&e.push(g7(this.options.openDoubleQuote)),this.options.closeDoubleQuote!==!1&&e.push(v7(this.options.closeDoubleQuote)),this.options.openSingleQuote!==!1&&e.push(b7(this.options.openSingleQuote)),this.options.closeSingleQuote!==!1&&e.push(y7(this.options.closeSingleQuote)),this.options.leftArrow!==!1&&e.push(C7(this.options.leftArrow)),this.options.rightArrow!==!1&&e.push(S7(this.options.rightArrow)),this.options.copyright!==!1&&e.push(x7(this.options.copyright)),this.options.trademark!==!1&&e.push(w7(this.options.trademark)),this.options.servicemark!==!1&&e.push(E7(this.options.servicemark)),this.options.registeredTrademark!==!1&&e.push(O7(this.options.registeredTrademark)),this.options.oneHalf!==!1&&e.push($7(this.options.oneHalf)),this.options.plusMinus!==!1&&e.push(N7(this.options.plusMinus)),this.options.notEqual!==!1&&e.push(M7(this.options.notEqual)),this.options.laquo!==!1&&e.push(R7(this.options.laquo)),this.options.raquo!==!1&&e.push(I7(this.options.raquo)),this.options.multiplication!==!1&&e.push(T7(this.options.multiplication)),this.options.superscriptTwo!==!1&&e.push(A7(this.options.superscriptTwo)),this.options.superscriptThree!==!1&&e.push(P7(this.options.superscriptThree)),this.options.oneQuarter!==!1&&e.push(k7(this.options.oneQuarter)),this.options.threeQuarters!==!1&&e.push(D7(this.options.threeQuarters)),e}}),L7=_7;const j7=ro.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["u",nn(this.options.HTMLAttributes,e),0]},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),B7=/^\s*>\s$/,z7=En.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:e}){return["blockquote",nn(this.options.HTMLAttributes,e),0]},addCommands(){return{setBlockquote:()=>({commands:e})=>e.wrapIn(this.name),toggleBlockquote:()=>({commands:e})=>e.toggleWrap(this.name),unsetBlockquote:()=>({commands:e})=>e.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[Ba({find:B7,type:this.type})]}}),F7=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,H7=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,V7=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,W7=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,U7=ro.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:e=>e.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:e=>e.type.name===this.name},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}]},renderHTML({HTMLAttributes:e}){return["strong",nn(this.options.HTMLAttributes,e),0]},addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[Ji({find:F7,type:this.type}),Ji({find:V7,type:this.type})]},addPasteRules(){return[mi({find:H7,type:this.type}),mi({find:W7,type:this.type})]}}),q7="listItem",HC="textStyle",VC=/^\s*([-+*])\s$/,K7=En.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:e}){return["ul",nn(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleBulletList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(q7,this.editor.getAttributes(HC)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=Ba({find:VC,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(e=Ba({find:VC,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(HC),editor:this.editor})),[e]}}),G7=/(^|[^`])`([^`]+)`(?!`)/,X7=/(^|[^`])`([^`]+)`(?!`)/g,Y7=ro.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:e}){return["code",nn(this.options.HTMLAttributes,e),0]},addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[Ji({find:G7,type:this.type})]},addPasteRules(){return[mi({find:X7,type:this.type})]}}),J7=/^```([a-z]+)?[\s\n]$/,Q7=/^~~~([a-z]+)?[\s\n]$/,Z7=En.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:e=>{var t;const{languageClassPrefix:n}=this.options,i=[...((t=e.firstElementChild)===null||t===void 0?void 0:t.classList)||[]].filter(a=>a.startsWith(n)).map(a=>a.replace(n,""))[0];return i||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:e,HTMLAttributes:t}){return["pre",nn(this.options.HTMLAttributes,t),["code",{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},addCommands(){return{setCodeBlock:e=>({commands:t})=>t.setNode(this.name,e),toggleCodeBlock:e=>({commands:t})=>t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:e,$anchor:t}=this.editor.state.selection,n=t.pos===1;return!e||t.parent.type.name!==this.name?!1:n||!t.parent.textContent.length?this.editor.commands.clearNodes():!1},Enter:({editor:e})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:t}=e,{selection:n}=t,{$from:r,empty:o}=n;if(!o||r.parent.type!==this.type)return!1;const i=r.parentOffset===r.parent.nodeSize-2,a=r.parent.textContent.endsWith(`
697
+
698
+ `);return!i||!a?!1:e.chain().command(({tr:s})=>(s.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;const{state:t}=e,{selection:n,doc:r}=t,{$from:o,empty:i}=n;if(!i||o.parent.type!==this.type||!(o.parentOffset===o.parent.nodeSize-2))return!1;const s=o.after();return s===void 0?!1:r.nodeAt(s)?e.commands.command(({tr:c})=>(c.setSelection(xt.near(r.resolve(s))),!0)):e.commands.exitCode()}}},addInputRules(){return[Bh({find:J7,type:this.type,getAttributes:e=>({language:e[1]})}),Bh({find:Q7,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new xn({key:new _n("codeBlockVSCodeHandler"),props:{handlePaste:(e,t)=>{if(!t.clipboardData||this.editor.isActive(this.type.name))return!1;const n=t.clipboardData.getData("text/plain"),r=t.clipboardData.getData("vscode-editor-data"),o=r?JSON.parse(r):void 0,i=o==null?void 0:o.mode;if(!n||!i)return!1;const{tr:a,schema:s}=e.state,l=s.text(n.replace(/\r\n?/g,`
699
+ `));return a.replaceSelectionWith(this.type.create({language:i},l)),a.selection.$from.parent.type!==this.type&&a.setSelection(Ct.near(a.doc.resolve(Math.max(0,a.selection.from-2)))),a.setMeta("paste",!0),e.dispatch(a),!0}}})]}}),e9=En.create({name:"doc",topNode:!0,content:"block+"}),t9=dn.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[M$(this.options)]}}),n9=dn.create({name:"gapCursor",addProseMirrorPlugins(){return[R$()]},extendNodeSchema(e){var t;const n={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:(t=Dt(pt(e,"allowGapCursor",n)))!==null&&t!==void 0?t:null}}}),r9=En.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:e}){return["br",nn(this.options.HTMLAttributes,e)]},renderText(){return`
700
+ `},addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:r})=>e.first([()=>e.exitCode(),()=>e.command(()=>{const{selection:o,storedMarks:i}=n;if(o.$from.parent.type.spec.isolating)return!1;const{keepMarks:a}=this.options,{splittableMarks:s}=r.extensionManager,l=i||o.$to.parentOffset&&o.$from.marks();return t().insertContent({type:this.name}).command(({tr:c,dispatch:u})=>{if(u&&l&&a){const d=l.filter(f=>s.includes(f.type.name));c.ensureMarks(d)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),o9=En.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(e=>({tag:`h${e}`,attrs:{level:e}}))},renderHTML({node:e,HTMLAttributes:t}){return[`h${this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0]}`,nn(this.options.HTMLAttributes,t),0]},addCommands(){return{setHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.setNode(this.name,e):!1,toggleHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.toggleNode(this.name,"paragraph",e):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((e,t)=>({...e,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})}),{})},addInputRules(){return this.options.levels.map(e=>Bh({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${e}})\\s$`),type:this.type,getAttributes:{level:e}}))}}),i9=dn.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:e,dispatch:t})=>ev(e,t),redo:()=>({state:e,dispatch:t})=>tv(e,t)}},addProseMirrorPlugins(){return[T$(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),a9=En.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:e}){return["hr",nn(this.options.HTMLAttributes,e)]},addCommands(){return{setHorizontalRule:()=>({chain:e,state:t})=>{const{selection:n}=t,{$from:r,$to:o}=n,i=e();return r.parentOffset===0?i.insertContentAt({from:Math.max(r.pos-1,0),to:o.pos},{type:this.name}):Bx(n)?i.insertContentAt(o.pos,{type:this.name}):i.insertContent({type:this.name}),i.command(({tr:a,dispatch:s})=>{var l;if(s){const{$to:c}=a.selection,u=c.end();if(c.nodeAfter)c.nodeAfter.isTextblock?a.setSelection(Ct.create(a.doc,c.pos+1)):c.nodeAfter.isBlock?a.setSelection(yt.create(a.doc,c.pos)):a.setSelection(Ct.create(a.doc,c.pos));else{const d=(l=c.parent.type.contentMatch.defaultType)===null||l===void 0?void 0:l.create();d&&(a.insert(u,d),a.setSelection(Ct.create(a.doc,u+1)))}a.scrollIntoView()}return!0}).run()}}},addInputRules(){return[ZT({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),s9=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,l9=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,c9=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,u9=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,d9=ro.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:e=>e.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:e=>e.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:e}){return["em",nn(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Ji({find:s9,type:this.type}),Ji({find:c9,type:this.type})]},addPasteRules(){return[mi({find:l9,type:this.type}),mi({find:u9,type:this.type})]}}),f9="listItem",WC="textStyle",UC=/^(\d+)\.\s$/,h9=En.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:e=>e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1},type:{default:void 0,parseHTML:e=>e.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:e}){const{start:t,...n}=e;return t===1?["ol",nn(this.options.HTMLAttributes,n),0]:["ol",nn(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(f9,this.editor.getAttributes(WC)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let e=Ba({find:UC,type:this.type,getAttributes:t=>({start:+t[1]}),joinPredicate:(t,n)=>n.childCount+n.attrs.start===+t[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(e=Ba({find:UC,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:t=>({start:+t[1],...this.editor.getAttributes(WC)}),joinPredicate:(t,n)=>n.childCount+n.attrs.start===+t[1],editor:this.editor})),[e]}}),p9=En.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:e}){return["p",nn(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),m9=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,g9=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,v9=ro.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["s",nn(this.options.HTMLAttributes,e),0]},addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[Ji({find:m9,type:this.type})]},addPasteRules(){return[mi({find:g9,type:this.type})]}}),b9=En.create({name:"text",group:"inline"}),y9=dn.create({name:"starterKit",addExtensions(){var e,t,n,r,o,i,a,s,l,c,u,d,f,h,m,v,g,y;const b=[];return this.options.bold!==!1&&b.push(U7.configure((e=this.options)===null||e===void 0?void 0:e.bold)),this.options.blockquote!==!1&&b.push(z7.configure((t=this.options)===null||t===void 0?void 0:t.blockquote)),this.options.bulletList!==!1&&b.push(K7.configure((n=this.options)===null||n===void 0?void 0:n.bulletList)),this.options.code!==!1&&b.push(Y7.configure((r=this.options)===null||r===void 0?void 0:r.code)),this.options.codeBlock!==!1&&b.push(Z7.configure((o=this.options)===null||o===void 0?void 0:o.codeBlock)),this.options.document!==!1&&b.push(e9.configure((i=this.options)===null||i===void 0?void 0:i.document)),this.options.dropcursor!==!1&&b.push(t9.configure((a=this.options)===null||a===void 0?void 0:a.dropcursor)),this.options.gapcursor!==!1&&b.push(n9.configure((s=this.options)===null||s===void 0?void 0:s.gapcursor)),this.options.hardBreak!==!1&&b.push(r9.configure((l=this.options)===null||l===void 0?void 0:l.hardBreak)),this.options.heading!==!1&&b.push(o9.configure((c=this.options)===null||c===void 0?void 0:c.heading)),this.options.history!==!1&&b.push(i9.configure((u=this.options)===null||u===void 0?void 0:u.history)),this.options.horizontalRule!==!1&&b.push(a9.configure((d=this.options)===null||d===void 0?void 0:d.horizontalRule)),this.options.italic!==!1&&b.push(d9.configure((f=this.options)===null||f===void 0?void 0:f.italic)),this.options.listItem!==!1&&b.push(P$.configure((h=this.options)===null||h===void 0?void 0:h.listItem)),this.options.orderedList!==!1&&b.push(h9.configure((m=this.options)===null||m===void 0?void 0:m.orderedList)),this.options.paragraph!==!1&&b.push(p9.configure((v=this.options)===null||v===void 0?void 0:v.paragraph)),this.options.strike!==!1&&b.push(v9.configure((g=this.options)===null||g===void 0?void 0:g.strike)),this.options.text!==!1&&b.push(b9.configure((y=this.options)===null||y===void 0?void 0:y.text)),b}});function C9({title:e,childrenContent:t,editable:n,childrenEdit:r}){const[o,i]=O.useState(!1),a=n?j.jsx(bi,{children:j.jsx(bi.Item,{onClick:()=>i(!0),children:"Edit"},"edit")}):null;return j.jsxs("div",{children:[n&&a?j.jsx(Oi,{dropdownRender:()=>a,trigger:["contextMenu"],children:t}):t,j.jsx(Wr,{title:`Edit ${e}`,open:o,onOk:()=>i(!1),onCancel:()=>i(!1),children:r})]})}function S9({node:e,updateAttributes:t,editor:n}){const[r,o]=O.useState(!1),[i,a]=O.useState(e.attrs.bgColor||"#f3f4f6"),[s,l]=O.useState(e.attrs.titleColor||"#000000"),c=e.attrs.variant||"default",u=e.attrs.radius||"md",d=e.attrs.iconType||"chevron",f=C=>{C.preventDefault()},h=C=>{const x=typeof C=="string"?C:C.toHexString();a(x),t({bgColor:x})},m=C=>{const x=typeof C=="string"?C:C.toHexString();l(x),t({titleColor:x})},v=C=>{switch(C){case"sm":return"rounded-sm";case"lg":return"rounded-lg";case"xl":return"rounded-xl";case"none":return"rounded-none";default:return"rounded-md"}},g=()=>{const C={className:`transition-transform duration-300 ${r?"rotate-180":""}`,size:20,style:{color:s}};switch(d){case"plus":return j.jsx(Na,{...C,className:`transition-transform duration-300 ${r?"rotate-45":""}`});case"arrow":return j.jsx(i6,{...C,className:`transition-transform duration-300 ${r?"rotate-90":""}`});case"none":return null;default:return j.jsx(c6,{...C})}},y=()=>{const C=`transition-all duration-300 ${v(u)}`;switch(c){case"filled":return`${C} border-none shadow-sm overflow-hidden`;case"ghost":return`${C} border-none bg-transparent hover:bg-gray-50/50`;case"separate":return`${C} border shadow-sm my-2 overflow-hidden`;default:return`${C} border shadow-sm my-4 overflow-hidden`}},b=()=>{const C="flex items-center justify-between p-4 cursor-pointer select-none transition-colors";return c==="filled"?{className:`${C}`,style:{backgroundColor:i}}:c==="ghost"?{className:`${C} hover:bg-black/5`,style:{backgroundColor:"transparent"}}:{className:`${C} bg-gray-50 hover:bg-gray-100`,style:{backgroundColor:i}}};return j.jsx(Um,{className:"accordion-wrapper",children:j.jsx(C9,{title:"Accordion",childrenContent:j.jsxs("div",{className:y(),onContextMenu:f,style:c==="filled"?{backgroundColor:`${i}20`}:void 0,children:[j.jsxs("div",{...b(),onClick:()=>o(!r),children:[j.jsx("input",{className:"w-full text-lg font-medium bg-transparent border-none outline-none",style:{color:s},defaultValue:e.attrs.title||"Accordion Title",onChange:C=>t({title:C.target.value}),disabled:!n.isEditable,placeholder:"Accordion title"}),g()]}),j.jsx("div",{className:`overflow-hidden duration-300 ease-in-out ${r?"max-h-96 opacity-100":"max-h-0 opacity-0"} `,children:j.jsx("div",{className:"p-4 border-t",children:j.jsx(SA,{contentEditable:n.isEditable})})})]}),editable:n.isEditable,childrenEdit:j.jsxs("div",{className:"px-6 py-4 space-y-6 rounded-lg bg-gray-50",children:[j.jsxs("div",{className:"grid grid-cols-1 gap-6",children:[j.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[j.jsxs("div",{children:[j.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Variant"}),j.jsx(jo,{value:c,style:{width:"100%"},onChange:C=>t({variant:C}),options:[{value:"default",label:"Default (Bordered)"},{value:"filled",label:"Filled"},{value:"ghost",label:"Ghost"},{value:"separate",label:"Separated"}]})]}),j.jsxs("div",{children:[j.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Corner Radius"}),j.jsx(jo,{value:u,style:{width:"100%"},onChange:C=>t({radius:C}),options:[{value:"none",label:"Square"},{value:"sm",label:"Small"},{value:"md",label:"Medium"},{value:"lg",label:"Large"},{value:"xl",label:"Extra Large"}]})]})]}),j.jsxs("div",{children:[j.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Icon Style"}),j.jsxs(ti.Group,{value:d,onChange:C=>t({iconType:C.target.value}),className:"flex gap-4",children:[j.jsx(ti,{value:"chevron",children:"Chevron"}),j.jsx(ti,{value:"plus",children:"Plus"}),j.jsx(ti,{value:"arrow",children:"Arrow"}),j.jsx(ti,{value:"none",children:"None"})]})]}),j.jsxs("div",{className:"flex flex-col space-y-2",children:[j.jsx("label",{className:"font-medium text-gray-700",children:"Background Color"}),j.jsxs("div",{className:"flex items-center space-x-3",children:[j.jsx("div",{className:"w-8 h-8 border rounded shadow",style:{backgroundColor:i}}),j.jsx(Ya,{value:i,onChange:h})]})]}),j.jsxs("div",{className:"flex flex-col space-y-2",children:[j.jsx("label",{className:"font-medium text-gray-700",children:"Title Color"}),j.jsxs("div",{className:"flex items-center space-x-3",children:[j.jsx("div",{className:"w-8 h-8 border rounded shadow",style:{backgroundColor:s}}),j.jsx(Ya,{value:s,onChange:m})]})]})]}),j.jsx("div",{className:"pt-4 border-t border-gray-200",children:j.jsxs("div",{className:"p-3 bg-white border rounded-md",children:[j.jsx("div",{className:"text-sm text-gray-600",children:"Preview"}),j.jsx("div",{className:"p-2 mt-2 rounded",style:{backgroundColor:i},children:j.jsx("span",{style:{color:s,fontWeight:500},children:"Accordion Title"})})]})})]})})})}const x9=En.create({name:"accordion",group:"block",content:"block+",atom:!1,draggable:!0,selectable:!0,inline:!1,defining:!0,addAttributes(){return{title:{default:"Accordion Title"},bgColor:{default:"#f3f4f6"},titleColor:{default:"#000000"},iconType:{default:"chevron"},variant:{default:"default"},radius:{default:"md"}}},parseHTML(){return[{tag:"accordion"}]},renderHTML({HTMLAttributes:e}){return["accordion",nn(e)]},addNodeView(){return qm(S9)},addCommands(){return{setAccordion:e=>({chain:t})=>t().insertContent({type:"accordion",attrs:e,content:[{type:"paragraph",content:[{type:"text",text:"Accordion content"}]}]}).run()}}});function w9({node:e,updateAttributes:t,editor:n,selected:r,deleteNode:o}){const[i,a]=O.useState(!1),[s,l]=O.useState(!1),[c,u]=O.useState({width:e.attrs.width||"100%",height:e.attrs.height||"auto"}),[d,f]=O.useState(e.attrs.caption||""),[h,m]=O.useState(e.attrs.link||""),[v,g]=O.useState(!1),[y,b]=O.useState(!1),[C,x]=O.useState(e.attrs.src||""),S=O.useRef(null),w=O.useRef(null),E=O.useRef(null);O.useEffect(()=>{u({width:e.attrs.width||"100%",height:e.attrs.height||"auto"}),f(e.attrs.caption||""),m(e.attrs.link||""),x(e.attrs.src||"")},[e.attrs]);const N=O.useCallback((I,_)=>{if(I.preventDefault(),I.stopPropagation(),!S.current)return;const W=S.current.getBoundingClientRect();E.current={x:I.clientX,y:I.clientY,width:W.width,height:W.height},a(!0);const H=K=>{if(!E.current||!S.current)return;const Y=K.clientX-E.current.x,V=K.clientY-E.current.y;let G=E.current.width,Q=E.current.height;if(_.includes("e")&&(G=E.current.width+Y),_.includes("w")&&(G=E.current.width-Y),_.includes("s")&&(Q=E.current.height+V),_.includes("n")&&(Q=E.current.height-V),_.length===2&&S.current.naturalWidth&&S.current.naturalHeight){const ce=S.current.naturalWidth/S.current.naturalHeight;Q=G/ce}G=Math.max(50,G),Q=Math.max(50,Q),u({width:`${G}px`,height:`${Q}px`})},B=()=>{a(!1),E.current=null,t({width:c.width,height:c.height}),document.removeEventListener("mousemove",H),document.removeEventListener("mouseup",B)};document.addEventListener("mousemove",H),document.addEventListener("mouseup",B)},[c,t]),$=I=>{t({align:I,float:"none"})},M=I=>{t({float:I,align:I==="none"?"center":"left"})},R=()=>{d!==e.attrs.caption&&t({caption:d})},k=()=>{t({link:h}),g(!1)},D=()=>{t({src:C}),b(!1)},A=()=>{window.confirm("Are you sure you want to delete this image?")&&o()},L=()=>{const I={width:c.width,maxWidth:"100%",display:"block",zIndex:e.attrs.zIndex,position:"relative"};return e.attrs.float==="left"?{...I,float:"left",marginRight:"1rem",marginBottom:"0.5rem",display:"inline-block"}:e.attrs.float==="right"?{...I,float:"right",marginLeft:"1rem",marginBottom:"0.5rem",display:"inline-block"}:e.attrs.align==="center"?{...I,marginLeft:"auto",marginRight:"auto",display:"block"}:e.attrs.align==="right"?{...I,marginLeft:"auto",display:"block"}:I},T=n.isEditable;return O.useEffect(()=>{console.log("EnhancedImageView mounting:",{isEditable:n.isEditable,attrs:e.attrs})},[n.isEditable,e.attrs]),j.jsxs(Um,{className:"image-wrapper","data-drag-handle":!0,"data-float":e.attrs.float||"none",style:L(),children:[T&&j.jsx(_d,{content:j.jsxs("div",{className:"flex items-center gap-1 p-1.5 bg-gray-900 text-white rounded-lg shadow-xl",children:[j.jsx(Sn,{title:"Align Left",children:j.jsx("button",{type:"button",onClick:()=>$("left"),className:`p-1.5 rounded hover:bg-gray-700 transition-colors ${e.attrs.align==="left"&&e.attrs.float==="none"?"bg-gray-700":""}`,children:j.jsx(m$,{size:16})})}),j.jsx(Sn,{title:"Align Center",children:j.jsx("button",{type:"button",onClick:()=>$("center"),className:`p-1.5 rounded hover:bg-gray-700 transition-colors ${e.attrs.align==="center"&&e.attrs.float==="none"?"bg-gray-700":""}`,children:j.jsx(p$,{size:16})})}),j.jsx(Sn,{title:"Align Right",children:j.jsx("button",{type:"button",onClick:()=>$("right"),className:`p-1.5 rounded hover:bg-gray-700 transition-colors ${e.attrs.align==="right"&&e.attrs.float==="none"?"bg-gray-700":""}`,children:j.jsx(g$,{size:16})})}),j.jsx("div",{className:"h-4 w-px bg-gray-600 mx-1"}),j.jsx(Sn,{title:"Float Left",children:j.jsx("button",{type:"button",onClick:()=>M("left"),className:`p-1.5 rounded hover:bg-gray-700 transition-colors ${e.attrs.float==="left"?"bg-gray-700":""}`,children:j.jsx("span",{className:"text-xs font-semibold",children:"FL"})})}),j.jsx(Sn,{title:"Float Right",children:j.jsx("button",{type:"button",onClick:()=>M("right"),className:`p-1.5 rounded hover:bg-gray-700 transition-colors ${e.attrs.float==="right"?"bg-gray-700":""}`,children:j.jsx("span",{className:"text-xs font-semibold",children:"FR"})})}),j.jsx("div",{className:"h-4 w-px bg-gray-600 mx-1"}),j.jsx(Sn,{title:"Add/Edit Link",children:j.jsx("button",{type:"button",onClick:()=>g(!v),className:`p-1.5 rounded hover:bg-gray-700 transition-colors ${h?"bg-gray-700":""}`,children:j.jsx(b$,{size:16})})}),j.jsx(Sn,{title:"Edit Image URL",children:j.jsx("button",{type:"button",onClick:()=>b(!y),className:"p-1.5 rounded hover:bg-gray-700 transition-colors",children:j.jsx("span",{className:"text-xs font-semibold",children:"URL"})})}),j.jsx("div",{className:"h-4 w-px bg-gray-600 mx-1"}),j.jsx(Sn,{title:"Delete Image",children:j.jsx("button",{type:"button",onClick:A,className:"p-1.5 rounded hover:bg-red-600 transition-colors",children:j.jsx(Jg,{size:16})})})]}),open:T&&(r||s),placement:"top",arrow:!1,trigger:[],overlayInnerStyle:{padding:0,backgroundColor:"transparent",border:"none",boxShadow:"none"},children:j.jsxs("div",{ref:w,className:`relative inline-block max-w-full ${r?"ring-2 ring-blue-500 ring-offset-2 rounded":""}`,onMouseEnter:()=>T&&l(!0),onMouseLeave:()=>!i&&l(!1),children:[T&&s&&j.jsx("div",{className:"absolute -left-8 top-1/2 -translate-y-1/2 cursor-grab opacity-50 hover:opacity-100 transition-opacity","data-drag-handle":!0,children:j.jsx(v$,{size:20,className:"text-gray-600"})}),h&&!T?j.jsx("a",{href:h,target:"_blank",rel:"noopener noreferrer",children:j.jsx("img",{ref:S,src:e.attrs.src,alt:e.attrs.alt||"",title:e.attrs.title||"",style:{width:c.width,height:c.height,maxWidth:"100%",display:"block"},draggable:!1})}):j.jsx("img",{ref:S,src:e.attrs.src,alt:e.attrs.alt||"",title:e.attrs.title||"",style:{width:c.width,height:c.height,maxWidth:"100%",display:"block"},draggable:!1}),T&&(r||s)&&j.jsxs(j.Fragment,{children:[j.jsx("div",{className:"resize-handle resize-handle-nw",onMouseDown:I=>N(I,"nw")}),j.jsx("div",{className:"resize-handle resize-handle-ne",onMouseDown:I=>N(I,"ne")}),j.jsx("div",{className:"resize-handle resize-handle-sw",onMouseDown:I=>N(I,"sw")}),j.jsx("div",{className:"resize-handle resize-handle-se",onMouseDown:I=>N(I,"se")}),j.jsx("div",{className:"resize-handle resize-handle-n",onMouseDown:I=>N(I,"n")}),j.jsx("div",{className:"resize-handle resize-handle-s",onMouseDown:I=>N(I,"s")}),j.jsx("div",{className:"resize-handle resize-handle-e",onMouseDown:I=>N(I,"e")}),j.jsx("div",{className:"resize-handle resize-handle-w",onMouseDown:I=>N(I,"w")})]})]})}),!T&&j.jsx("div",{ref:w,className:"relative block max-w-full",style:L(),children:h?j.jsx("a",{href:h,target:"_blank",rel:"noopener noreferrer",children:j.jsx("img",{ref:S,src:e.attrs.src,alt:e.attrs.alt||"",title:e.attrs.title||"",style:{width:c.width,height:c.height,maxWidth:"100%",display:"block"},draggable:!1})}):j.jsx("img",{ref:S,src:e.attrs.src,alt:e.attrs.alt||"",title:e.attrs.title||"",style:{width:c.width,height:c.height,maxWidth:"100%",display:"block"},draggable:!1})}),T&&y&&jr.createPortal(j.jsx("div",{className:"fixed inset-0 bg-black/50 z-[99999] flex items-center justify-center p-4",children:j.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-xl max-w-md w-full relative z-[100000]",children:[j.jsx("h3",{className:"text-lg font-semibold mb-4",children:"Edit Image URL"}),j.jsx(hi,{placeholder:"Enter image URL",value:C,onChange:I=>x(I.target.value),onPressEnter:D,size:"large",autoFocus:!0,className:"mb-4"}),j.jsxs("div",{className:"flex gap-2 justify-end",children:[j.jsx("button",{type:"button",onClick:()=>{b(!1),x(e.attrs.src||"")},className:"px-4 py-2 bg-gray-100 text-gray-700 rounded-md hover:bg-gray-200 transition-colors",children:"Cancel"}),j.jsx("button",{type:"button",onClick:D,className:"px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors",children:"Save"})]})]})}),document.body),T&&v&&j.jsxs("div",{className:"absolute -top-24 left-1/2 -translate-x-1/2 flex items-center gap-2 p-2 bg-white border border-gray-200 rounded-lg shadow-lg z-[10000] min-w-[300px]",children:[j.jsx(hi,{placeholder:"Enter link URL",value:h,onChange:I=>m(I.target.value),onPressEnter:k,size:"small"}),j.jsx("button",{type:"button",onClick:k,className:"px-3 py-1 bg-blue-600 text-white rounded hover:bg-blue-700 text-sm",children:"Save"})]}),T?j.jsx(hi,{placeholder:"Add a caption...",value:d,onChange:I=>f(I.target.value),onBlur:R,className:"mt-2 text-sm text-center italic",bordered:!1,size:"small"}):d&&j.jsx("div",{className:"image-caption mt-2",children:d})]})}const E9=En.create({name:"image",addOptions(){return{inline:!1,allowBase64:!0,HTMLAttributes:{}}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,selectable:!0,atom:!0,addAttributes(){return{src:{default:null,parseHTML:e=>e.getAttribute("src"),renderHTML:e=>e.src?{src:e.src}:{}},alt:{default:null,parseHTML:e=>e.getAttribute("alt"),renderHTML:e=>e.alt?{alt:e.alt}:{}},title:{default:null,parseHTML:e=>e.getAttribute("title"),renderHTML:e=>e.title?{title:e.title}:{}},width:{default:"50%",parseHTML:e=>e.getAttribute("width")||"50%",renderHTML:e=>({width:e.width})},height:{default:"auto",parseHTML:e=>e.getAttribute("height")||"auto",renderHTML:e=>({height:e.height})},align:{default:"center",parseHTML:e=>e.getAttribute("data-align")||"center",renderHTML:e=>({"data-align":e.align})},float:{default:"none",parseHTML:e=>e.getAttribute("data-float")||"none",renderHTML:e=>({"data-float":e.float})},caption:{default:"",parseHTML:e=>e.getAttribute("data-caption")||"",renderHTML:e=>({"data-caption":e.caption})},link:{default:"",parseHTML:e=>e.getAttribute("data-link")||"",renderHTML:e=>({"data-link":e.link})},zIndex:{default:0,parseHTML:e=>parseInt(e.getAttribute("data-z-index")||"0",10),renderHTML:e=>({"data-z-index":e.zIndex})}}},parseHTML(){return[{tag:"img[src]",getAttrs:e=>{if(!(e instanceof HTMLElement))return null;const t=e.tagName==="IMG"?e:e.querySelector("img");return t?{src:t.getAttribute("src"),alt:t.getAttribute("alt"),title:t.getAttribute("title"),width:t.getAttribute("width")||"100%",height:t.getAttribute("height")||"auto",align:e.getAttribute("data-align")||"center",float:e.getAttribute("data-float")||"none",caption:e.getAttribute("data-caption")||"",link:e.getAttribute("data-link")||""}:null}}]},renderHTML({HTMLAttributes:e}){return["img",nn(this.options.HTMLAttributes,e)]},addNodeView(){return qm(w9)},addCommands(){return{setImage:e=>({commands:t})=>!e||!e.src?!1:t.insertContent({type:this.name,attrs:{src:e.src,alt:e.alt||"",title:e.title||"",width:e.width||"50%",height:e.height||"auto",align:e.align||"center",float:e.float||"none",caption:e.caption||"",link:e.link||"",zIndex:e.zIndex||0}}),updateImage:e=>({commands:t})=>t.updateAttributes(this.name,e),deleteImage:()=>({commands:e})=>e.deleteSelection()}}});function O9({node:e,updateAttributes:t,editor:n,selected:r,deleteNode:o}){const[i,a]=O.useState(!1),[s,l]=O.useState(!1),[c,u]=O.useState({width:e.attrs.width,height:e.attrs.height}),d=O.useRef(null),f=O.useRef(null),h=()=>{const{src:b,provider:C}=e.attrs;switch(C){case"youtube":return`https://www.youtube.com/embed/${b}`;case"vimeo":return`https://player.vimeo.com/video/${b}`;case"dailymotion":return`https://www.dailymotion.com/embed/video/${b}`;default:return b}},m=O.useCallback(b=>{if(b.preventDefault(),b.stopPropagation(),!d.current)return;const C=d.current.getBoundingClientRect();f.current={x:b.clientX,y:b.clientY,width:C.width,height:C.height},a(!0);const x=w=>{if(!f.current)return;const E=w.clientX-f.current.x,N=w.clientY-f.current.y,$=Math.max(200,f.current.width+E),M=Math.max(150,f.current.height+N);u({width:`${$}px`,height:`${M}px`})},S=()=>{a(!1),f.current=null,t({width:c.width,height:c.height}),document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",S)};document.addEventListener("mousemove",x),document.addEventListener("mouseup",S)},[c,t]),v=()=>{window.confirm("Are you sure you want to delete this video?")&&o()},g=()=>{const b=prompt("Enter new video URL:","");if(b){let C="youtube",x="";if(b.includes("youtube.com")||b.includes("youtu.be")){C="youtube";const S=/(?:youtube\.com\/(?:[^\/]+\/.+\/|(?:v|e(?:mbed)?)\/|.*[?&]v=)|youtu\.be\/)([^"&?\/\s]{11})/,w=b.match(S);x=w?w[1]:""}else if(b.includes("vimeo.com")){C="vimeo";const S=/vimeo\.com\/(\d+)/,w=b.match(S);x=w?w[1]:""}else if(b.includes("dailymotion.com")){C="dailymotion";const S=/dailymotion\.com\/video\/([^_]+)/,w=b.match(S);x=w?w[1]:""}x?t({src:x,provider:C}):alert("Invalid video URL")}},y=n.isEditable;return j.jsx(Um,{className:"video-wrapper-container","data-drag-handle":!0,children:j.jsxs("div",{ref:d,className:`relative mx-auto ${r?"ring-2 ring-blue-500 ring-offset-2 rounded":""}`,style:{width:c.width,maxWidth:"100%"},onMouseEnter:()=>y&&l(!0),onMouseLeave:()=>!i&&l(!1),children:[y&&s&&j.jsx("div",{className:"absolute -left-8 top-1/2 -translate-y-1/2 cursor-grab opacity-50 hover:opacity-100 transition-opacity","data-drag-handle":!0,children:j.jsx(v$,{size:20,className:"text-gray-600"})}),j.jsx("div",{className:"relative w-full",style:{paddingBottom:"56.25%",height:0},children:j.jsx("iframe",{src:h(),className:"absolute top-0 left-0 w-full h-full rounded",frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0})}),y&&(r||s)&&j.jsx("div",{className:"absolute -bottom-2 -right-2 w-4 h-4 bg-blue-500 rounded-full cursor-se-resize opacity-75 hover:opacity-100 transition-opacity",onMouseDown:m}),y&&(r||s)&&j.jsxs("div",{className:"absolute -top-12 left-1/2 -translate-x-1/2 flex items-center gap-1 p-1.5 bg-gray-900 text-white rounded-lg shadow-xl z-10",children:[j.jsx(Sn,{title:"Edit URL",children:j.jsx("button",{type:"button",onClick:g,className:"p-1.5 rounded hover:bg-gray-700 transition-colors",children:j.jsx(F6,{size:16})})}),j.jsx("div",{className:"h-4 w-px bg-gray-600 mx-1"}),j.jsx(Sn,{title:"Delete Video",children:j.jsx("button",{type:"button",onClick:v,className:"p-1.5 rounded hover:bg-red-600 transition-colors",children:j.jsx(Jg,{size:16})})})]})]})})}const $9=En.create({name:"video",addOptions(){return{inline:!1,HTMLAttributes:{}}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,selectable:!0,atom:!0,addAttributes(){return{src:{default:null},width:{default:"100%"},height:{default:"400px"},provider:{default:"youtube"}}},parseHTML(){return[{tag:"div[data-video-embed]",getAttrs:e=>e instanceof HTMLElement?{src:e.getAttribute("data-src"),width:e.getAttribute("data-width")||"100%",height:e.getAttribute("data-height")||"400px",provider:e.getAttribute("data-provider")||"youtube"}:null}]},renderHTML({HTMLAttributes:e}){return["div",nn(this.options.HTMLAttributes,e,{"data-video-embed":""})]},addNodeView(){return qm(O9)},addCommands(){return{setVideo:e=>({commands:t})=>{let n="youtube",r="";if(e.src.includes("youtube.com")||e.src.includes("youtu.be")){n="youtube";const o=/(?:youtube\.com\/(?:[^\/]+\/.+\/|(?:v|e(?:mbed)?)\/|.*[?&]v=)|youtu\.be\/)([^"&?\/\s]{11})/,i=e.src.match(o);r=i?i[1]:""}else if(e.src.includes("vimeo.com")){n="vimeo";const o=/vimeo\.com\/(\d+)/,i=e.src.match(o);r=i?i[1]:""}else if(e.src.includes("dailymotion.com")){n="dailymotion";const o=/dailymotion\.com\/video\/([^_]+)/,i=e.src.match(o);r=i?i[1]:""}return t.insertContent({type:this.name,attrs:{src:r,width:e.width||"100%",height:e.height||"400px",provider:n}})}}}}),N9="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",M9="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",dm="numeric",fm="ascii",hm="alpha",zs="asciinumeric",Is="alphanumeric",pm="domain",k$="emoji",R9="scheme",I9="slashscheme",hh="whitespace";function T9(e,t){return e in t||(t[e]=[]),t[e]}function Bi(e,t,n){t[dm]&&(t[zs]=!0,t[Is]=!0),t[fm]&&(t[zs]=!0,t[hm]=!0),t[zs]&&(t[Is]=!0),t[hm]&&(t[Is]=!0),t[Is]&&(t[pm]=!0),t[k$]&&(t[pm]=!0);for(const r in t){const o=T9(r,n);o.indexOf(e)<0&&o.push(e)}}function A9(e,t){const n={};for(const r in t)t[r].indexOf(e)>=0&&(n[r]=!0);return n}function gr(e=null){this.j={},this.jr=[],this.jd=null,this.t=e}gr.groups={};gr.prototype={accepts(){return!!this.t},go(e){const t=this,n=t.j[e];if(n)return n;for(let r=0;r<t.jr.length;r++){const o=t.jr[r][0],i=t.jr[r][1];if(i&&o.test(e))return i}return t.jd},has(e,t=!1){return t?e in this.j:!!this.go(e)},ta(e,t,n,r){for(let o=0;o<e.length;o++)this.tt(e[o],t,n,r)},tr(e,t,n,r){r=r||gr.groups;let o;return t&&t.j?o=t:(o=new gr(t),n&&r&&Bi(t,n,r)),this.jr.push([e,o]),o},ts(e,t,n,r){let o=this;const i=e.length;if(!i)return o;for(let a=0;a<i-1;a++)o=o.tt(e[a]);return o.tt(e[i-1],t,n,r)},tt(e,t,n,r){r=r||gr.groups;const o=this;if(t&&t.j)return o.j[e]=t,t;const i=t;let a,s=o.go(e);if(s?(a=new gr,Object.assign(a.j,s.j),a.jr.push.apply(a.jr,s.jr),a.jd=s.jd,a.t=s.t):a=new gr,i){if(r)if(a.t&&typeof a.t=="string"){const l=Object.assign(A9(a.t,r),n);Bi(i,l,r)}else n&&Bi(i,n,r);a.t=i}return o.j[e]=a,a}};const Bt=(e,t,n,r,o)=>e.ta(t,n,r,o),Nn=(e,t,n,r,o)=>e.tr(t,n,r,o),qC=(e,t,n,r,o)=>e.ts(t,n,r,o),Fe=(e,t,n,r,o)=>e.tt(t,n,r,o),Ro="WORD",mm="UWORD",D$="ASCIINUMERICAL",_$="ALPHANUMERICAL",ml="LOCALHOST",gm="TLD",vm="UTLD",Uc="SCHEME",Sa="SLASH_SCHEME",nv="NUM",bm="WS",rv="NL",Fs="OPENBRACE",Hs="CLOSEBRACE",Ou="OPENBRACKET",$u="CLOSEBRACKET",Nu="OPENPAREN",Mu="CLOSEPAREN",Ru="OPENANGLEBRACKET",Iu="CLOSEANGLEBRACKET",Tu="FULLWIDTHLEFTPAREN",Au="FULLWIDTHRIGHTPAREN",Pu="LEFTCORNERBRACKET",ku="RIGHTCORNERBRACKET",Du="LEFTWHITECORNERBRACKET",_u="RIGHTWHITECORNERBRACKET",Lu="FULLWIDTHLESSTHAN",ju="FULLWIDTHGREATERTHAN",Bu="AMPERSAND",zu="APOSTROPHE",Fu="ASTERISK",Qo="AT",Hu="BACKSLASH",Vu="BACKTICK",Wu="CARET",ri="COLON",ov="COMMA",Uu="DOLLAR",uo="DOT",qu="EQUALS",iv="EXCLAMATION",kr="HYPHEN",Vs="PERCENT",Ku="PIPE",Gu="PLUS",Xu="POUND",Ws="QUERY",av="QUOTE",L$="FULLWIDTHMIDDLEDOT",sv="SEMI",fo="SLASH",Us="TILDE",Yu="UNDERSCORE",j$="EMOJI",Ju="SYM";var B$=Object.freeze({__proto__:null,ALPHANUMERICAL:_$,AMPERSAND:Bu,APOSTROPHE:zu,ASCIINUMERICAL:D$,ASTERISK:Fu,AT:Qo,BACKSLASH:Hu,BACKTICK:Vu,CARET:Wu,CLOSEANGLEBRACKET:Iu,CLOSEBRACE:Hs,CLOSEBRACKET:$u,CLOSEPAREN:Mu,COLON:ri,COMMA:ov,DOLLAR:Uu,DOT:uo,EMOJI:j$,EQUALS:qu,EXCLAMATION:iv,FULLWIDTHGREATERTHAN:ju,FULLWIDTHLEFTPAREN:Tu,FULLWIDTHLESSTHAN:Lu,FULLWIDTHMIDDLEDOT:L$,FULLWIDTHRIGHTPAREN:Au,HYPHEN:kr,LEFTCORNERBRACKET:Pu,LEFTWHITECORNERBRACKET:Du,LOCALHOST:ml,NL:rv,NUM:nv,OPENANGLEBRACKET:Ru,OPENBRACE:Fs,OPENBRACKET:Ou,OPENPAREN:Nu,PERCENT:Vs,PIPE:Ku,PLUS:Gu,POUND:Xu,QUERY:Ws,QUOTE:av,RIGHTCORNERBRACKET:ku,RIGHTWHITECORNERBRACKET:_u,SCHEME:Uc,SEMI:sv,SLASH:fo,SLASH_SCHEME:Sa,SYM:Ju,TILDE:Us,TLD:gm,UNDERSCORE:Yu,UTLD:vm,UWORD:mm,WORD:Ro,WS:bm});const Oo=/[a-z]/,xs=new RegExp("\\p{L}","u"),ph=new RegExp("\\p{Emoji}","u"),$o=/\d/,mh=/\s/,KC="\r",gh=`
701
+ `,P9="️",k9="‍",vh="";let yc=null,Cc=null;function D9(e=[]){const t={};gr.groups=t;const n=new gr;yc==null&&(yc=GC(N9)),Cc==null&&(Cc=GC(M9)),Fe(n,"'",zu),Fe(n,"{",Fs),Fe(n,"}",Hs),Fe(n,"[",Ou),Fe(n,"]",$u),Fe(n,"(",Nu),Fe(n,")",Mu),Fe(n,"<",Ru),Fe(n,">",Iu),Fe(n,"(",Tu),Fe(n,")",Au),Fe(n,"「",Pu),Fe(n,"」",ku),Fe(n,"『",Du),Fe(n,"』",_u),Fe(n,"<",Lu),Fe(n,">",ju),Fe(n,"&",Bu),Fe(n,"*",Fu),Fe(n,"@",Qo),Fe(n,"`",Vu),Fe(n,"^",Wu),Fe(n,":",ri),Fe(n,",",ov),Fe(n,"$",Uu),Fe(n,".",uo),Fe(n,"=",qu),Fe(n,"!",iv),Fe(n,"-",kr),Fe(n,"%",Vs),Fe(n,"|",Ku),Fe(n,"+",Gu),Fe(n,"#",Xu),Fe(n,"?",Ws),Fe(n,'"',av),Fe(n,"/",fo),Fe(n,";",sv),Fe(n,"~",Us),Fe(n,"_",Yu),Fe(n,"\\",Hu),Fe(n,"・",L$);const r=Nn(n,$o,nv,{[dm]:!0});Nn(r,$o,r);const o=Nn(r,Oo,D$,{[zs]:!0}),i=Nn(r,xs,_$,{[Is]:!0}),a=Nn(n,Oo,Ro,{[fm]:!0});Nn(a,$o,o),Nn(a,Oo,a),Nn(o,$o,o),Nn(o,Oo,o);const s=Nn(n,xs,mm,{[hm]:!0});Nn(s,Oo),Nn(s,$o,i),Nn(s,xs,s),Nn(i,$o,i),Nn(i,Oo),Nn(i,xs,i);const l=Fe(n,gh,rv,{[hh]:!0}),c=Fe(n,KC,bm,{[hh]:!0}),u=Nn(n,mh,bm,{[hh]:!0});Fe(n,vh,u),Fe(c,gh,l),Fe(c,vh,u),Nn(c,mh,u),Fe(u,KC),Fe(u,gh),Nn(u,mh,u),Fe(u,vh,u);const d=Nn(n,ph,j$,{[k$]:!0});Fe(d,"#"),Nn(d,ph,d),Fe(d,P9,d);const f=Fe(d,k9);Fe(f,"#"),Nn(f,ph,d);const h=[[Oo,a],[$o,o]],m=[[Oo,null],[xs,s],[$o,i]];for(let v=0;v<yc.length;v++)Ko(n,yc[v],gm,Ro,h);for(let v=0;v<Cc.length;v++)Ko(n,Cc[v],vm,mm,m);Bi(gm,{tld:!0,ascii:!0},t),Bi(vm,{utld:!0,alpha:!0},t),Ko(n,"file",Uc,Ro,h),Ko(n,"mailto",Uc,Ro,h),Ko(n,"http",Sa,Ro,h),Ko(n,"https",Sa,Ro,h),Ko(n,"ftp",Sa,Ro,h),Ko(n,"ftps",Sa,Ro,h),Bi(Uc,{scheme:!0,ascii:!0},t),Bi(Sa,{slashscheme:!0,ascii:!0},t),e=e.sort((v,g)=>v[0]>g[0]?1:-1);for(let v=0;v<e.length;v++){const g=e[v][0],b=e[v][1]?{[R9]:!0}:{[I9]:!0};g.indexOf("-")>=0?b[pm]=!0:Oo.test(g)?$o.test(g)?b[zs]=!0:b[fm]=!0:b[dm]=!0,qC(n,g,g,b)}return qC(n,"localhost",ml,{ascii:!0}),n.jd=new gr(Ju),{start:n,tokens:Object.assign({groups:t},B$)}}function z$(e,t){const n=_9(t.replace(/[A-Z]/g,s=>s.toLowerCase())),r=n.length,o=[];let i=0,a=0;for(;a<r;){let s=e,l=null,c=0,u=null,d=-1,f=-1;for(;a<r&&(l=s.go(n[a]));)s=l,s.accepts()?(d=0,f=0,u=s):d>=0&&(d+=n[a].length,f++),c+=n[a].length,i+=n[a].length,a++;i-=d,a-=f,c-=d,o.push({t:u.t,v:t.slice(i-c,i),s:i-c,e:i})}return o}function _9(e){const t=[],n=e.length;let r=0;for(;r<n;){let o=e.charCodeAt(r),i,a=o<55296||o>56319||r+1===n||(i=e.charCodeAt(r+1))<56320||i>57343?e[r]:e.slice(r,r+2);t.push(a),r+=a.length}return t}function Ko(e,t,n,r,o){let i;const a=t.length;for(let s=0;s<a-1;s++){const l=t[s];e.j[l]?i=e.j[l]:(i=new gr(r),i.jr=o.slice(),e.j[l]=i),e=i}return i=new gr(n),i.jr=o.slice(),e.j[t[a-1]]=i,i}function GC(e){const t=[],n=[];let r=0,o="0123456789";for(;r<e.length;){let i=0;for(;o.indexOf(e[r+i])>=0;)i++;if(i>0){t.push(n.join(""));for(let a=parseInt(e.substring(r,r+i),10);a>0;a--)n.pop();r+=i}else n.push(e[r]),r++}return t}const gl={defaultProtocol:"http",events:null,format:XC,formatHref:XC,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function lv(e,t=null){let n=Object.assign({},gl);e&&(n=Object.assign(n,e instanceof lv?e.o:e));const r=n.ignoreTags,o=[];for(let i=0;i<r.length;i++)o.push(r[i].toUpperCase());this.o=n,t&&(this.defaultRender=t),this.ignoreTags=o}lv.prototype={o:gl,ignoreTags:[],defaultRender(e){return e},check(e){return this.get("validate",e.toString(),e)},get(e,t,n){const r=t!=null;let o=this.o[e];return o&&(typeof o=="object"?(o=n.t in o?o[n.t]:gl[e],typeof o=="function"&&r&&(o=o(t,n))):typeof o=="function"&&r&&(o=o(t,n.t,n)),o)},getObj(e,t,n){let r=this.o[e];return typeof r=="function"&&t!=null&&(r=r(t,n.t,n)),r},render(e){const t=e.render(this);return(this.get("render",null,e)||this.defaultRender)(t,e.t,e)}};function XC(e){return e}function F$(e,t){this.t="token",this.v=e,this.tk=t}F$.prototype={isLink:!1,toString(){return this.v},toHref(e){return this.toString()},toFormattedString(e){const t=this.toString(),n=e.get("truncate",t,this),r=e.get("format",t,this);return n&&r.length>n?r.substring(0,n)+"…":r},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e=gl.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){const t=this,n=this.toHref(e.get("defaultProtocol")),r=e.get("formatHref",n,this),o=e.get("tagName",n,t),i=this.toFormattedString(e),a={},s=e.get("className",n,t),l=e.get("target",n,t),c=e.get("rel",n,t),u=e.getObj("attributes",n,t),d=e.getObj("events",n,t);return a.href=r,s&&(a.class=s),l&&(a.target=l),c&&(a.rel=c),u&&Object.assign(a,u),{tagName:o,attributes:a,content:i,eventListeners:d}}};function Wd(e,t){class n extends F${constructor(o,i){super(o,i),this.t=e}}for(const r in t)n.prototype[r]=t[r];return n.t=e,n}const YC=Wd("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),JC=Wd("text"),L9=Wd("nl"),Sc=Wd("url",{isLink:!0,toHref(e=gl.defaultProtocol){return this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){const e=this.tk;return e.length>=2&&e[0].t!==ml&&e[1].t===ri}}),Pr=e=>new gr(e);function j9({groups:e}){const t=e.domain.concat([Bu,Fu,Qo,Hu,Vu,Wu,Uu,qu,kr,nv,Vs,Ku,Gu,Xu,fo,Ju,Us,Yu]),n=[zu,ri,ov,uo,iv,Vs,Ws,av,sv,Ru,Iu,Fs,Hs,$u,Ou,Nu,Mu,Tu,Au,Pu,ku,Du,_u,Lu,ju],r=[Bu,zu,Fu,Hu,Vu,Wu,Uu,qu,kr,Fs,Hs,Vs,Ku,Gu,Xu,Ws,fo,Ju,Us,Yu],o=Pr(),i=Fe(o,Us);Bt(i,r,i),Bt(i,e.domain,i);const a=Pr(),s=Pr(),l=Pr();Bt(o,e.domain,a),Bt(o,e.scheme,s),Bt(o,e.slashscheme,l),Bt(a,r,i),Bt(a,e.domain,a);const c=Fe(a,Qo);Fe(i,Qo,c),Fe(s,Qo,c),Fe(l,Qo,c);const u=Fe(i,uo);Bt(u,r,i),Bt(u,e.domain,i);const d=Pr();Bt(c,e.domain,d),Bt(d,e.domain,d);const f=Fe(d,uo);Bt(f,e.domain,d);const h=Pr(YC);Bt(f,e.tld,h),Bt(f,e.utld,h),Fe(c,ml,h);const m=Fe(d,kr);Fe(m,kr,m),Bt(m,e.domain,d),Bt(h,e.domain,d),Fe(h,uo,f),Fe(h,kr,m);const v=Fe(h,ri);Bt(v,e.numeric,YC);const g=Fe(a,kr),y=Fe(a,uo);Fe(g,kr,g),Bt(g,e.domain,a),Bt(y,r,i),Bt(y,e.domain,a);const b=Pr(Sc);Bt(y,e.tld,b),Bt(y,e.utld,b),Bt(b,e.domain,a),Bt(b,r,i),Fe(b,uo,y),Fe(b,kr,g),Fe(b,Qo,c);const C=Fe(b,ri),x=Pr(Sc);Bt(C,e.numeric,x);const S=Pr(Sc),w=Pr();Bt(S,t,S),Bt(S,n,w),Bt(w,t,S),Bt(w,n,w),Fe(b,fo,S),Fe(x,fo,S);const E=Fe(s,ri),N=Fe(l,ri),$=Fe(N,fo),M=Fe($,fo);Bt(s,e.domain,a),Fe(s,uo,y),Fe(s,kr,g),Bt(l,e.domain,a),Fe(l,uo,y),Fe(l,kr,g),Bt(E,e.domain,S),Fe(E,fo,S),Fe(E,Ws,S),Bt(M,e.domain,S),Bt(M,t,S),Fe(M,fo,S);const R=[[Fs,Hs],[Ou,$u],[Nu,Mu],[Ru,Iu],[Tu,Au],[Pu,ku],[Du,_u],[Lu,ju]];for(let k=0;k<R.length;k++){const[D,A]=R[k],L=Fe(S,D);Fe(w,D,L),Fe(L,A,S);const T=Pr(Sc);Bt(L,t,T);const I=Pr();Bt(L,n),Bt(T,t,T),Bt(T,n,I),Bt(I,t,T),Bt(I,n,I),Fe(T,A,S),Fe(I,A,S)}return Fe(o,ml,b),Fe(o,rv,L9),{start:o,tokens:B$}}function B9(e,t,n){let r=n.length,o=0,i=[],a=[];for(;o<r;){let s=e,l=null,c=null,u=0,d=null,f=-1;for(;o<r&&!(l=s.go(n[o].t));)a.push(n[o++]);for(;o<r&&(c=l||s.go(n[o].t));)l=null,s=c,s.accepts()?(f=0,d=s):f>=0&&f++,o++,u++;if(f<0)o-=u,o<r&&(a.push(n[o]),o++);else{a.length>0&&(i.push(bh(JC,t,a)),a=[]),o-=f,u-=f;const h=d.t,m=n.slice(o-u,o);i.push(bh(h,t,m))}}return a.length>0&&i.push(bh(JC,t,a)),i}function bh(e,t,n){const r=n[0].s,o=n[n.length-1].e,i=t.slice(r,o);return new e(i,n)}const z9=typeof console<"u"&&console&&console.warn||(()=>{}),F9="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",vn={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function H9(){return gr.groups={},vn.scanner=null,vn.parser=null,vn.tokenQueue=[],vn.pluginQueue=[],vn.customSchemes=[],vn.initialized=!1,vn}function QC(e,t=!1){if(vn.initialized&&z9(`linkifyjs: already initialized - will not register custom scheme "${e}" ${F9}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e))throw new Error(`linkifyjs: incorrect scheme format.
702
+ 1. Must only contain digits, lowercase ASCII letters or "-"
703
+ 2. Cannot start or end with "-"
704
+ 3. "-" cannot repeat`);vn.customSchemes.push([e,t])}function V9(){vn.scanner=D9(vn.customSchemes);for(let e=0;e<vn.tokenQueue.length;e++)vn.tokenQueue[e][1]({scanner:vn.scanner});vn.parser=j9(vn.scanner.tokens);for(let e=0;e<vn.pluginQueue.length;e++)vn.pluginQueue[e][1]({scanner:vn.scanner,parser:vn.parser});return vn.initialized=!0,vn}function cv(e){return vn.initialized||V9(),B9(vn.parser.start,e,z$(vn.scanner.start,e))}cv.scan=z$;function H$(e,t=null,n=null){if(t&&typeof t=="object"){if(n)throw Error(`linkifyjs: Invalid link type ${t}; must be a string`);n=t,t=null}const r=new lv(n),o=cv(e),i=[];for(let a=0;a<o.length;a++){const s=o[a];s.isLink&&(!t||s.t===t)&&r.check(s)&&i.push(s.toFormattedObject(r))}return i}var uv="[\0-   ᠎ -\u2029  ]",W9=new RegExp(uv),U9=new RegExp(`${uv}$`),q9=new RegExp(uv,"g");function K9(e){return e.length===1?e[0].isLink:e.length===3&&e[1].isLink?["()","[]"].includes(e[0].value+e[2].value):!1}function G9(e){return new xn({key:new _n("autolink"),appendTransaction:(t,n,r)=>{const o=t.some(c=>c.docChanged)&&!n.doc.eq(r.doc),i=t.some(c=>c.getMeta("preventAutolink"));if(!o||i)return;const{tr:a}=r,s=pT(n.doc,[...t]);if(ST(s).forEach(({newRange:c})=>{const u=gT(r.doc,c,h=>h.isTextblock);let d,f;if(u.length>1)d=u[0],f=r.doc.textBetween(d.pos,d.pos+d.node.nodeSize,void 0," ");else if(u.length){const h=r.doc.textBetween(c.from,c.to," "," ");if(!U9.test(h))return;d=u[0],f=r.doc.textBetween(d.pos,c.to,void 0," ")}if(d&&f){const h=f.split(W9).filter(Boolean);if(h.length<=0)return!1;const m=h[h.length-1],v=d.pos+f.lastIndexOf(m);if(!m)return!1;const g=cv(m).map(y=>y.toObject(e.defaultProtocol));if(!K9(g))return!1;g.filter(y=>y.isLink).map(y=>({...y,from:v+y.start+1,to:v+y.end+1})).filter(y=>r.schema.marks.code?!r.doc.rangeHasMark(y.from,y.to,r.schema.marks.code):!0).filter(y=>e.validate(y.value)).filter(y=>e.shouldAutoLink(y.value)).forEach(y=>{Vm(y.from,y.to,r.doc).some(b=>b.mark.type===e.type)||a.addMark(y.from,y.to,e.type.create({href:y.href}))})}}),!!a.steps.length)return a}})}function X9(e){return new xn({key:new _n("handleClickLink"),props:{handleClick:(t,n,r)=>{var o,i;if(r.button!==0||!t.editable)return!1;let a=null;if(r.target instanceof HTMLAnchorElement)a=r.target;else{const l=r.target;if(!l)return!1;const c=e.editor.view.dom;a=l.closest("a"),a&&!c.contains(a)&&(a=null)}if(!a)return!1;let s=!1;if(e.enableClickSelection&&(s=e.editor.commands.extendMarkRange(e.type.name)),e.openOnClick){const l=jx(t.state,e.type.name),c=(o=a.href)!=null?o:l.href,u=(i=a.target)!=null?i:l.target;c&&(window.open(c,u),s=!0)}return s}}})}function Y9(e){return new xn({key:new _n("handlePasteLink"),props:{handlePaste:(t,n,r)=>{const{shouldAutoLink:o}=e,{state:i}=t,{selection:a}=i,{empty:s}=a;if(s)return!1;let l="";r.content.forEach(u=>{l+=u.textContent});const c=H$(l,{defaultProtocol:e.defaultProtocol}).find(u=>u.isLink&&u.value===l);return!l||!c||o!==void 0&&!o(c.value)?!1:e.editor.commands.setMark(e.type,{href:c.href})}}})}function Mi(e,t){const n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return t&&t.forEach(r=>{const o=typeof r=="string"?r:r.scheme;o&&n.push(o)}),!e||e.replace(q9,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}var J9=ro.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(e=>{if(typeof e=="string"){QC(e);return}QC(e.scheme,e.optionalSlashes)})},onDestroy(){H9()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(e,t)=>!!Mi(e,t.protocols),validate:e=>!!e,shouldAutoLink:e=>{const t=/^[a-z][a-z0-9+.-]*:\/\//i.test(e),n=/^[a-z][a-z0-9+.-]*:/i.test(e);if(t||n&&!e.includes("@"))return!0;const o=(e.includes("@")?e.split("@").pop():e).split(/[/?#:]/)[0];return!(/^\d{1,3}(\.\d{1,3}){3}$/.test(o)||!/\./.test(o))}}},addAttributes(){return{href:{default:null,parseHTML(e){return e.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:e=>{const t=e.getAttribute("href");return!t||!this.options.isAllowedUri(t,{defaultValidate:n=>!!Mi(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:e}){return this.options.isAllowedUri(e.href,{defaultValidate:t=>!!Mi(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",nn(this.options.HTMLAttributes,e),0]:["a",nn(this.options.HTMLAttributes,{...e,href:""}),0]},markdownTokenName:"link",parseMarkdown:(e,t)=>t.applyMark("link",t.parseInline(e.tokens||[]),{href:e.href,title:e.title||null}),renderMarkdown:(e,t)=>{var n;const r=((n=e.attrs)==null?void 0:n.href)||"";return`[${t.renderChildren(e)}](${r})`},addCommands(){return{setLink:e=>({chain:t})=>{const{href:n}=e;return this.options.isAllowedUri(n,{defaultValidate:r=>!!Mi(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?t().setMark(this.name,e).setMeta("preventAutolink",!0).run():!1},toggleLink:e=>({chain:t})=>{const{href:n}=e||{};return n&&!this.options.isAllowedUri(n,{defaultValidate:r=>!!Mi(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[mi({find:e=>{const t=[];if(e){const{protocols:n,defaultProtocol:r}=this.options,o=H$(e).filter(i=>i.isLink&&this.options.isAllowedUri(i.value,{defaultValidate:a=>!!Mi(a,n),protocols:n,defaultProtocol:r}));o.length&&o.forEach(i=>{this.options.shouldAutoLink(i.value)&&t.push({text:i.value,data:{href:i.href},index:i.start})})}return t},type:this.type,getAttributes:e=>{var t;return{href:(t=e.data)==null?void 0:t.href}}})]},addProseMirrorPlugins(){const e=[],{protocols:t,defaultProtocol:n}=this.options;return this.options.autolink&&e.push(G9({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:o=>!!Mi(o,t),protocols:t,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),e.push(X9({type:this.type,editor:this.editor,openOnClick:this.options.openOnClick==="whenNotEditable"?!0:this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&e.push(Y9({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink})),e}}),Q9=J9;const Z9=dn.create({name:"fontSize",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontSize:{default:null,parseHTML:e=>{var t;return(t=e.style.fontSize)==null?void 0:t.replace(/['"]+/g,"")},renderHTML:e=>e.fontSize?{style:`font-size: ${e.fontSize}`}:{}}}}]},addCommands(){return{setFontSize:e=>({chain:t})=>t().setMark("textStyle",{fontSize:e}).run(),unsetFontSize:()=>({chain:e})=>e().setMark("textStyle",{fontSize:null}).removeEmptyTextStyle().run()}}}),eU=dn.create({name:"fontFamily",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontFamily:{default:null,parseHTML:e=>{var t;return(t=e.style.fontFamily)==null?void 0:t.replace(/['"]+/g,"")},renderHTML:e=>e.fontFamily?{style:`font-family: ${e.fontFamily}`}:{}}}}]},addCommands(){return{setFontFamily:e=>({chain:t})=>t().setMark("textStyle",{fontFamily:e}).run(),unsetFontFamily:()=>({chain:e})=>e().setMark("textStyle",{fontFamily:null}).removeEmptyTextStyle().run()}}}),tU=[y9.configure({bulletList:{keepMarks:!0,keepAttributes:!1},orderedList:{keepMarks:!0,keepAttributes:!1}}),t7.configure({color:"#3b82f6",width:2}),n7,L7,_8.configure({types:[LC.name,P$.name]}),LC,eU,Z9,i7.configure({multicolor:!0}),j7,a7,s7,h7.configure({types:["heading","paragraph","tableCell","tableHeader"]}),f7,d7.configure({nested:!0}),N8.configure({resizable:!0,lastColumnResizable:!0,allowTableNodeSelection:!0,HTMLAttributes:{class:"table-wrapper"}}),c7,l7,R8.configure({HTMLAttributes:{class:"table-cell"}}),E9.configure({inline:!1,allowBase64:!0}),$9.configure({inline:!1}),x9,Q9.extend({addAttributes(){var e;return{...(e=this.parent)==null?void 0:e.call(this),style:{default:null,parseHTML:t=>t.getAttribute("style"),renderHTML:t=>t.style?{style:t.style}:{}},class:{default:null,parseHTML:t=>t.getAttribute("class"),renderHTML:t=>t.class?{class:t.class}:{}}}}}).configure({openOnClick:!1,autolink:!0,defaultProtocol:"https"})],nU={"cyber-editor":"_cyber-editor_1isyx_1"};function dv({content:e="",slotBefore:t=!1,className:n="",editorClassName:r="",editable:o=!0,onChange:i}){const[a,s]=O.useState(""),[l,c]=O.useState(!1),[u,d]=O.useState(null),f=yA({extensions:tU,content:e,editable:o,onUpdate:({editor:g})=>{i==null||i(g.getHTML())}});if(O.useEffect(()=>{f&&e!==f.getHTML()&&f.commands.setContent(e,!1)},[f,e]),!f)return j.jsx(sN,{full:!0});O.useEffect(()=>{const g=f.getHTML();if(l){const y=h(a);if(y){d(y);return}let b=a||"";b.trim()||(b=m(g));const C=KA.sanitize(b);s(C),d(null)}else a||f.commands.setContent(g,!1)},[l]);const h=g=>{try{return new DOMParser().parseFromString(g,"text/html").querySelector("parsererror")?"Invalid HTML structure":null}catch{return"Invalid HTML format"}};function m(g){const y=document.createElement("textarea");return y.innerHTML=g,y.value.replace(/^<p>/i,"").replace(/<\/p>$/i,"").trim()}function v(){f&&(l?(f.commands.setContent(a,!1),d(null)):s(f.getHTML()),c(!l))}return j.jsx(j.Fragment,{children:j.jsxs("div",{className:te(nU["cyber-editor"],n),children:[t&&j.jsx(k8,{editor:f,htmlMode:l,toggleHTML:v}),l?j.jsx("textarea",{value:a,onChange:g=>s(g.target.value),className:"w-full min-h-[120px] resize-none overflow-hidden font-mono text-sm outline-none focus:outline-none focus:ring-0 "+r,spellCheck:!1}):a?j.jsx("iframe",{className:"w-full "+r,srcDoc:`
705
+ <html>
706
+ <head>
707
+ <meta charset="utf-8" />
708
+ <script src="https://cdn.tailwindcss.com"><\/script>
709
+ </head>
710
+ <body>
711
+ ${a}
712
+ </body>
713
+ </html>
714
+ `}):j.jsx(cA,{editor:f,className:r}),u&&j.jsx("div",{className:"mt-2 text-sm text-red-600",children:u})]})})}function rU(e){return j.jsx(dv,{...e,editable:!0,slotBefore:!0})}function oU(e){return j.jsx(dv,{...e,editable:!1,slotBefore:!1})}exports.CyberEditor=rU;exports.CyberViewer=oU;exports.EditorProvider=dv;