@simoncomputing/mui-bueno-v2 0.14.7

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 (87) hide show
  1. package/CHANGELOG.md +1206 -0
  2. package/README.md +35 -0
  3. package/dist/@types/index.d.ts +192 -0
  4. package/dist/common/Utils/index.d.ts +65 -0
  5. package/dist/common/WindowDimensions/WindowDimensions.d.ts +26 -0
  6. package/dist/components/Alerts/Alert.d.ts +30 -0
  7. package/dist/components/Alerts/ErrorAlert.d.ts +4 -0
  8. package/dist/components/Alerts/InfoAlert.d.ts +4 -0
  9. package/dist/components/Alerts/SuccessAlert.d.ts +4 -0
  10. package/dist/components/Alerts/WarningAlert.d.ts +4 -0
  11. package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +10 -0
  12. package/dist/components/Buttons/Button/Button.d.ts +24 -0
  13. package/dist/components/Buttons/ScrollToTop/ScrollToTop.d.ts +14 -0
  14. package/dist/components/Buttons/Submit/Submit.d.ts +11 -0
  15. package/dist/components/Form/Error/Error.d.ts +23 -0
  16. package/dist/components/Form/FormDebugger/FormDebugger.d.ts +8 -0
  17. package/dist/components/Form/Inputs/Autocomplete/Autocomplete.d.ts +81 -0
  18. package/dist/components/Form/Inputs/Autocomplete/DynamicAutocomplete/DynamicAutocomplete.d.ts +31 -0
  19. package/dist/components/Form/Inputs/Autocomplete/MultiAutocomplete/MultiAutocomplete.d.ts +22 -0
  20. package/dist/components/Form/Inputs/Autocomplete/utils.d.ts +2 -0
  21. package/dist/components/Form/Inputs/Checkbox/Checkbox.d.ts +58 -0
  22. package/dist/components/Form/Inputs/CheckboxGroup/CheckboxGroup.d.ts +107 -0
  23. package/dist/components/Form/Inputs/CitationField/CitationBubbleMenuHandler.d.ts +43 -0
  24. package/dist/components/Form/Inputs/CitationField/CitationField.d.ts +89 -0
  25. package/dist/components/Form/Inputs/CitationField/CitationFieldContext/CitationFieldContext.d.ts +9 -0
  26. package/dist/components/Form/Inputs/CitationField/CitationFieldContext/CitationFieldProvider.d.ts +8 -0
  27. package/dist/components/Form/Inputs/CitationField/CitationMenu/AttachmentForm.d.ts +12 -0
  28. package/dist/components/Form/Inputs/CitationField/CitationMenu/CitationBubbleMenu.d.ts +27 -0
  29. package/dist/components/Form/Inputs/CitationField/CitationMenu/CitationForm.d.ts +11 -0
  30. package/dist/components/Form/Inputs/CitationField/CitationMenu/CitationMenu.d.ts +78 -0
  31. package/dist/components/Form/Inputs/CitationField/CitationMenu/CitationTable.d.ts +21 -0
  32. package/dist/components/Form/Inputs/CitationField/CitationNode.d.ts +2 -0
  33. package/dist/components/Form/Inputs/CitationField/CitationNodeComponent.d.ts +7 -0
  34. package/dist/components/Form/Inputs/CitationField/CitationRefreshContext/CitationRefreshContext.d.ts +29 -0
  35. package/dist/components/Form/Inputs/CitationField/MenuButtonEditCitation.d.ts +3 -0
  36. package/dist/components/Form/Inputs/DateField/DateField.d.ts +73 -0
  37. package/dist/components/Form/Inputs/DateField/DateRangeField/DateRangeField.d.ts +62 -0
  38. package/dist/components/Form/Inputs/DateField/dayjs-utils.d.ts +2 -0
  39. package/dist/components/Form/Inputs/FileUpload/FileList/FileList.d.ts +13 -0
  40. package/dist/components/Form/Inputs/FileUpload/FileUpload.d.ts +62 -0
  41. package/dist/components/Form/Inputs/Location/Location.d.ts +69 -0
  42. package/dist/components/Form/Inputs/Location/Location.types.d.ts +85 -0
  43. package/dist/components/Form/Inputs/Location/LocationOption.d.ts +38 -0
  44. package/dist/components/Form/Inputs/RadioGroup/RadioGroup.d.ts +119 -0
  45. package/dist/components/Form/Inputs/RangeSlider/RangeSlider.d.ts +34 -0
  46. package/dist/components/Form/Inputs/RichTextField/RichTextControls.d.ts +6 -0
  47. package/dist/components/Form/Inputs/RichTextField/RichTextField.d.ts +56 -0
  48. package/dist/components/Form/Inputs/RichTextField/SuggestionList.d.ts +8 -0
  49. package/dist/components/Form/Inputs/RichTextField/mentionSuggestionOptions.d.ts +6 -0
  50. package/dist/components/Form/Inputs/RichTextField/useExtensions.d.ts +10 -0
  51. package/dist/components/Form/Inputs/SearchField/SearchField.d.ts +16 -0
  52. package/dist/components/Form/Inputs/Select/Select.d.ts +91 -0
  53. package/dist/components/Form/Inputs/Switch/Switch.d.ts +61 -0
  54. package/dist/components/Form/Inputs/TextField/TextField.d.ts +60 -0
  55. package/dist/components/Form/RepeatableFormGroup/RepeatableFormGroup.d.ts +89 -0
  56. package/dist/components/Form/Stepper/Stepper.d.ts +27 -0
  57. package/dist/components/LoadingIndicator/LoadingIndicator.d.ts +22 -0
  58. package/dist/components/Modals/AlertModal/AlertModal.d.ts +11 -0
  59. package/dist/components/Modals/ConfirmationModal/ConfirmationModal.d.ts +26 -0
  60. package/dist/components/Modals/DecisionModal/DecisionModal.d.ts +37 -0
  61. package/dist/components/Modals/Modal.d.ts +45 -0
  62. package/dist/components/Navigation/Footer/Footer.d.ts +31 -0
  63. package/dist/components/Navigation/Header/DarkModeToggle/DarkModeToggle.d.ts +13 -0
  64. package/dist/components/Navigation/Header/Drawer.d.ts +18 -0
  65. package/dist/components/Navigation/Header/EnvironmentBanner.d.ts +4 -0
  66. package/dist/components/Navigation/Header/Header.d.ts +63 -0
  67. package/dist/components/Navigation/Header/ProfileMenu.d.ts +8 -0
  68. package/dist/components/Navigation/MenuButton/MenuButton.d.ts +9 -0
  69. package/dist/components/Navigation/NavBar/FloatingNavBar/FloatingNavBar.d.ts +24 -0
  70. package/dist/components/Navigation/NavBar/NavBar.d.ts +24 -0
  71. package/dist/components/Navigation/Sidebar/Sidebar.d.ts +14 -0
  72. package/dist/components/Navigation/Tabs/Tabs.d.ts +19 -0
  73. package/dist/components/PageHeader/PageHeader.d.ts +27 -0
  74. package/dist/components/SingleActionCard/SingleActionCard.d.ts +26 -0
  75. package/dist/components/Snackbar/Snackbar.d.ts +28 -0
  76. package/dist/components/Table/ExpandableRow/ExpandableRow.d.ts +16 -0
  77. package/dist/components/Table/PaginatedTable.d.ts +44 -0
  78. package/dist/components/Table/Table.d.ts +129 -0
  79. package/dist/index.cjs.js +402 -0
  80. package/dist/index.css +1 -0
  81. package/dist/index.d.ts +105 -0
  82. package/dist/index.es.js +60187 -0
  83. package/dist/index.umd.js +403 -0
  84. package/dist/styles/3-theme/ThemeDemo.d.ts +3 -0
  85. package/dist/styles/3-theme/theme.d.ts +8 -0
  86. package/dist/styles/theme.d.ts +33 -0
  87. package/package.json +138 -0
@@ -0,0 +1,402 @@
1
+ require('./index.css');"use strict";var wV=Object.defineProperty;var TV=(t,e,n)=>e in t?wV(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Dl=(t,e,n)=>TV(t,typeof e!="symbol"?e+"":e,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("react/jsx-runtime"),J=require("react"),j=require("@mui/material"),Wt=require("formik"),oo=require("react-router-dom"),EV=require("@emotion/styled"),so=require("@emotion/react"),Ts=require("react-dom");function pA(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const P=pA(J),kV=pA(Ts),MV=["w","xs","sm","md","lg","xl","alignment","justify","noMP","noGrid","gridClassName","gridStyle"],aw=t=>t>47&&t<58,lw=t=>t>64&&t<123&&(t<91||t>96),OV=(t,e,n,r)=>{let o="",i=0,s=0,a=0,l=0;const u=r.selectionStart;let f=!1;if(t.length<=e.length){for(let T=0;T<t.length&&T<e.length;T++){for(;i<e.length&&e[i]!=="X"&&e[i]!=="9";)a++,s++,i++;(aw(t.charCodeAt(T))&&e[i]==="9"||lw(t.charCodeAt(T))&&e[i]==="X")&&(a>0&&(l=a,a=0),o+=t[T],i++)}const h=aw(t.charCodeAt(u-1))?"number":lw(t.charCodeAt(u-1))?"letter":"something else",m=h!=="number"&&e[u-1]==="9",g=h!=="letter"&&e[u-1]==="X";(m||g||h==="something else")&&(f=!0);let y="",S=0;Math.abs(n.length-t.length)<=1&&(s=0);let C=u+s;for(let T=0;T<o.length;T++){for(;S<e.length&&e[S]!=="X"&&e[S]!=="9";)y+=e[S],S++;y+=o[T],S++}t.length<n.length?window.requestAnimationFrame(()=>{r.selectionStart=C,r.selectionEnd=C}):e[C-1]!=="X"&&e[C-1]!=="9"?window.requestAnimationFrame(()=>{r.selectionStart=C+l,r.selectionEnd=C+l}):(f&&(C-=1),window.requestAnimationFrame(()=>{r.selectionStart=C,r.selectionEnd=C}));const E=e.slice(S);return E.indexOf("X")===-1&&E.indexOf("9")===-1&&(y+=E),y}return window.requestAnimationFrame(()=>{r.selectionStart=u-1,r.selectionEnd=u-1}),n};function Xn(t,e){const r=Object.keys(t).filter(i=>e.includes(i)),o={...t};for(const i of MV)delete o[i];for(const i of r)delete o[i];return o}const kn=t=>t.split(/(?=[A-Z])|[.\-_\s]+/).map(n=>n.charAt(0).toUpperCase()+n.slice(1).toLowerCase()).filter(Boolean).join(" ");function RV(t,e,n=!1,r=""){let o="";if(e==null||e.length==0)return r;if(n){let i="";const s=e.toString().split(",");let a=0;t.forEach(l=>{s.includes(String(l.value).toString())&&(i+=l.label,a<s.length-1&&(i+=", "),a++)}),o=i}else{const i=t.find(s=>e==s.value);i!=null&&(o=i.label)}return o}function Yc(t,e,n){return t.onClick?{onClick:()=>{t.onClick(),t.path&&e(t.path),t.externalLink&&window.open(t.externalLink,"_blank","noopener"),n&&n()}}:t.path?{component:oo.Link,to:t.path}:t.externalLink?{href:t.externalLink}:{}}function ui(t,e){return process.env.NODE_ENV==="production"?()=>null:function(...r){return t(...r)||e(...r)}}var Pi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function rr(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ld={exports:{}},Rt={};/**
2
+ * @license React
3
+ * react-is.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 cw;function AV(){if(cw)return Rt;cw=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),s=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),g=Symbol.for("react.client.reference");function b(y){if(typeof y=="object"&&y!==null){var S=y.$$typeof;switch(S){case t:switch(y=y.type,y){case n:case o:case r:case l:case u:return y;default:switch(y=y&&y.$$typeof,y){case s:case a:case h:case f:return y;case i:return y;default:return S}}case e:return S}}}return Rt.ContextConsumer=i,Rt.ContextProvider=s,Rt.Element=t,Rt.ForwardRef=a,Rt.Fragment=n,Rt.Lazy=h,Rt.Memo=f,Rt.Portal=e,Rt.Profiler=o,Rt.StrictMode=r,Rt.Suspense=l,Rt.SuspenseList=u,Rt.isContextConsumer=function(y){return b(y)===i},Rt.isContextProvider=function(y){return b(y)===s},Rt.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===t},Rt.isForwardRef=function(y){return b(y)===a},Rt.isFragment=function(y){return b(y)===n},Rt.isLazy=function(y){return b(y)===h},Rt.isMemo=function(y){return b(y)===f},Rt.isPortal=function(y){return b(y)===e},Rt.isProfiler=function(y){return b(y)===o},Rt.isStrictMode=function(y){return b(y)===r},Rt.isSuspense=function(y){return b(y)===l},Rt.isSuspenseList=function(y){return b(y)===u},Rt.isValidElementType=function(y){return typeof y=="string"||typeof y=="function"||y===n||y===o||y===r||y===l||y===u||y===m||typeof y=="object"&&y!==null&&(y.$$typeof===h||y.$$typeof===f||y.$$typeof===s||y.$$typeof===i||y.$$typeof===a||y.$$typeof===g||y.getModuleId!==void 0)},Rt.typeOf=b,Rt}var At={};/**
10
+ * @license React
11
+ * react-is.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 uw;function IV(){return uw||(uw=1,process.env.NODE_ENV!=="production"&&function(){function t(y){if(typeof y=="object"&&y!==null){var S=y.$$typeof;switch(S){case e:switch(y=y.type,y){case r:case i:case o:case u:case f:return y;default:switch(y=y&&y.$$typeof,y){case a:case l:case m:case h:return y;case s:return y;default:return S}}case n:return S}}}var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen"),b=Symbol.for("react.client.reference");At.ContextConsumer=s,At.ContextProvider=a,At.Element=e,At.ForwardRef=l,At.Fragment=r,At.Lazy=m,At.Memo=h,At.Portal=n,At.Profiler=i,At.StrictMode=o,At.Suspense=u,At.SuspenseList=f,At.isContextConsumer=function(y){return t(y)===s},At.isContextProvider=function(y){return t(y)===a},At.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===e},At.isForwardRef=function(y){return t(y)===l},At.isFragment=function(y){return t(y)===r},At.isLazy=function(y){return t(y)===m},At.isMemo=function(y){return t(y)===h},At.isPortal=function(y){return t(y)===n},At.isProfiler=function(y){return t(y)===i},At.isStrictMode=function(y){return t(y)===o},At.isSuspense=function(y){return t(y)===u},At.isSuspenseList=function(y){return t(y)===f},At.isValidElementType=function(y){return typeof y=="string"||typeof y=="function"||y===r||y===i||y===o||y===u||y===f||y===g||typeof y=="object"&&y!==null&&(y.$$typeof===m||y.$$typeof===h||y.$$typeof===a||y.$$typeof===s||y.$$typeof===l||y.$$typeof===b||y.getModuleId!==void 0)},At.typeOf=t}()),At}var dw;function DV(){return dw||(dw=1,process.env.NODE_ENV==="production"?ld.exports=AV():ld.exports=IV()),ld.exports}var $s=DV();function Eo(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function hA(t){if(P.isValidElement(t)||$s.isValidElementType(t)||!Eo(t))return t;const e={};return Object.keys(t).forEach(n=>{e[n]=hA(t[n])}),e}function Hn(t,e,n={clone:!0}){const r=n.clone?{...t}:t;return Eo(t)&&Eo(e)&&Object.keys(e).forEach(o=>{P.isValidElement(e[o])||$s.isValidElementType(e[o])?r[o]=e[o]:Eo(e[o])&&Object.prototype.hasOwnProperty.call(t,o)&&Eo(t[o])?r[o]=Hn(t[o],e[o],n):n.clone?r[o]=Eo(e[o])?hA(e[o]):e[o]:r[o]=e[o]}),r}var cd={exports:{}},ud={exports:{}},Tt={};/** @license React v16.13.1
18
+ * react-is.production.min.js
19
+ *
20
+ * Copyright (c) Facebook, Inc. and its affiliates.
21
+ *
22
+ * This source code is licensed under the MIT license found in the
23
+ * LICENSE file in the root directory of this source tree.
24
+ */var fw;function PV(){if(fw)return Tt;fw=1;var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,r=t?Symbol.for("react.fragment"):60107,o=t?Symbol.for("react.strict_mode"):60108,i=t?Symbol.for("react.profiler"):60114,s=t?Symbol.for("react.provider"):60109,a=t?Symbol.for("react.context"):60110,l=t?Symbol.for("react.async_mode"):60111,u=t?Symbol.for("react.concurrent_mode"):60111,f=t?Symbol.for("react.forward_ref"):60112,h=t?Symbol.for("react.suspense"):60113,m=t?Symbol.for("react.suspense_list"):60120,g=t?Symbol.for("react.memo"):60115,b=t?Symbol.for("react.lazy"):60116,y=t?Symbol.for("react.block"):60121,S=t?Symbol.for("react.fundamental"):60117,C=t?Symbol.for("react.responder"):60118,E=t?Symbol.for("react.scope"):60119;function T(M){if(typeof M=="object"&&M!==null){var R=M.$$typeof;switch(R){case e:switch(M=M.type,M){case l:case u:case r:case i:case o:case h:return M;default:switch(M=M&&M.$$typeof,M){case a:case f:case b:case g:case s:return M;default:return R}}case n:return R}}}function w(M){return T(M)===u}return Tt.AsyncMode=l,Tt.ConcurrentMode=u,Tt.ContextConsumer=a,Tt.ContextProvider=s,Tt.Element=e,Tt.ForwardRef=f,Tt.Fragment=r,Tt.Lazy=b,Tt.Memo=g,Tt.Portal=n,Tt.Profiler=i,Tt.StrictMode=o,Tt.Suspense=h,Tt.isAsyncMode=function(M){return w(M)||T(M)===l},Tt.isConcurrentMode=w,Tt.isContextConsumer=function(M){return T(M)===a},Tt.isContextProvider=function(M){return T(M)===s},Tt.isElement=function(M){return typeof M=="object"&&M!==null&&M.$$typeof===e},Tt.isForwardRef=function(M){return T(M)===f},Tt.isFragment=function(M){return T(M)===r},Tt.isLazy=function(M){return T(M)===b},Tt.isMemo=function(M){return T(M)===g},Tt.isPortal=function(M){return T(M)===n},Tt.isProfiler=function(M){return T(M)===i},Tt.isStrictMode=function(M){return T(M)===o},Tt.isSuspense=function(M){return T(M)===h},Tt.isValidElementType=function(M){return typeof M=="string"||typeof M=="function"||M===r||M===u||M===i||M===o||M===h||M===m||typeof M=="object"&&M!==null&&(M.$$typeof===b||M.$$typeof===g||M.$$typeof===s||M.$$typeof===a||M.$$typeof===f||M.$$typeof===S||M.$$typeof===C||M.$$typeof===E||M.$$typeof===y)},Tt.typeOf=T,Tt}var Et={};/** @license React v16.13.1
25
+ * react-is.development.js
26
+ *
27
+ * Copyright (c) Facebook, Inc. and its affiliates.
28
+ *
29
+ * This source code is licensed under the MIT license found in the
30
+ * LICENSE file in the root directory of this source tree.
31
+ */var pw;function _V(){return pw||(pw=1,process.env.NODE_ENV!=="production"&&function(){var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,r=t?Symbol.for("react.fragment"):60107,o=t?Symbol.for("react.strict_mode"):60108,i=t?Symbol.for("react.profiler"):60114,s=t?Symbol.for("react.provider"):60109,a=t?Symbol.for("react.context"):60110,l=t?Symbol.for("react.async_mode"):60111,u=t?Symbol.for("react.concurrent_mode"):60111,f=t?Symbol.for("react.forward_ref"):60112,h=t?Symbol.for("react.suspense"):60113,m=t?Symbol.for("react.suspense_list"):60120,g=t?Symbol.for("react.memo"):60115,b=t?Symbol.for("react.lazy"):60116,y=t?Symbol.for("react.block"):60121,S=t?Symbol.for("react.fundamental"):60117,C=t?Symbol.for("react.responder"):60118,E=t?Symbol.for("react.scope"):60119;function T(ee){return typeof ee=="string"||typeof ee=="function"||ee===r||ee===u||ee===i||ee===o||ee===h||ee===m||typeof ee=="object"&&ee!==null&&(ee.$$typeof===b||ee.$$typeof===g||ee.$$typeof===s||ee.$$typeof===a||ee.$$typeof===f||ee.$$typeof===S||ee.$$typeof===C||ee.$$typeof===E||ee.$$typeof===y)}function w(ee){if(typeof ee=="object"&&ee!==null){var se=ee.$$typeof;switch(se){case e:var le=ee.type;switch(le){case l:case u:case r:case i:case o:case h:return le;default:var ge=le&&le.$$typeof;switch(ge){case a:case f:case b:case g:case s:return ge;default:return se}}case n:return se}}}var M=l,R=u,_=a,I=s,N=e,O=f,A=r,L=b,z=g,V=n,$=i,F=o,W=h,U=!1;function G(ee){return U||(U=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),Y(ee)||w(ee)===l}function Y(ee){return w(ee)===u}function Z(ee){return w(ee)===a}function me(ee){return w(ee)===s}function fe(ee){return typeof ee=="object"&&ee!==null&&ee.$$typeof===e}function pe(ee){return w(ee)===f}function re(ee){return w(ee)===r}function ue(ee){return w(ee)===b}function ae(ee){return w(ee)===g}function K(ee){return w(ee)===n}function Q(ee){return w(ee)===i}function ie(ee){return w(ee)===o}function he(ee){return w(ee)===h}Et.AsyncMode=M,Et.ConcurrentMode=R,Et.ContextConsumer=_,Et.ContextProvider=I,Et.Element=N,Et.ForwardRef=O,Et.Fragment=A,Et.Lazy=L,Et.Memo=z,Et.Portal=V,Et.Profiler=$,Et.StrictMode=F,Et.Suspense=W,Et.isAsyncMode=G,Et.isConcurrentMode=Y,Et.isContextConsumer=Z,Et.isContextProvider=me,Et.isElement=fe,Et.isForwardRef=pe,Et.isFragment=re,Et.isLazy=ue,Et.isMemo=ae,Et.isPortal=K,Et.isProfiler=Q,Et.isStrictMode=ie,Et.isSuspense=he,Et.isValidElementType=T,Et.typeOf=w}()),Et}var hw;function mA(){return hw||(hw=1,process.env.NODE_ENV==="production"?ud.exports=PV():ud.exports=_V()),ud.exports}/*
32
+ object-assign
33
+ (c) Sindre Sorhus
34
+ @license MIT
35
+ */var Om,mw;function NV(){if(mw)return Om;mw=1;var t=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var s={},a=0;a<10;a++)s["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(s).map(function(f){return s[f]});if(l.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(f){u[f]=f}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Om=o()?Object.assign:function(i,s){for(var a,l=r(i),u,f=1;f<arguments.length;f++){a=Object(arguments[f]);for(var h in a)e.call(a,h)&&(l[h]=a[h]);if(t){u=t(a);for(var m=0;m<u.length;m++)n.call(a,u[m])&&(l[u[m]]=a[u[m]])}}return l},Om}var Rm,gw;function N0(){if(gw)return Rm;gw=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Rm=t,Rm}var Am,yw;function gA(){return yw||(yw=1,Am=Function.call.bind(Object.prototype.hasOwnProperty)),Am}var Im,bw;function LV(){if(bw)return Im;bw=1;var t=function(){};if(process.env.NODE_ENV!=="production"){var e=N0(),n={},r=gA();t=function(i){var s="Warning: "+i;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function o(i,s,a,l,u){if(process.env.NODE_ENV!=="production"){for(var f in i)if(r(i,f)){var h;try{if(typeof i[f]!="function"){var m=Error((l||"React class")+": "+a+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw m.name="Invariant Violation",m}h=i[f](s,f,l,a,null,e)}catch(b){h=b}if(h&&!(h instanceof Error)&&t((l||"React class")+": type specification of "+a+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof h+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),h instanceof Error&&!(h.message in n)){n[h.message]=!0;var g=u?u():"";t("Failed "+a+" type: "+h.message+(g??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Im=o,Im}var Dm,vw;function jV(){if(vw)return Dm;vw=1;var t=mA(),e=NV(),n=N0(),r=gA(),o=LV(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function s(){return null}return Dm=function(a,l){var u=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function h(Y){var Z=Y&&(u&&Y[u]||Y[f]);if(typeof Z=="function")return Z}var m="<<anonymous>>",g={array:C("array"),bigint:C("bigint"),bool:C("boolean"),func:C("function"),number:C("number"),object:C("object"),string:C("string"),symbol:C("symbol"),any:E(),arrayOf:T,element:w(),elementType:M(),instanceOf:R,node:O(),objectOf:I,oneOf:_,oneOfType:N,shape:L,exact:z};function b(Y,Z){return Y===Z?Y!==0||1/Y===1/Z:Y!==Y&&Z!==Z}function y(Y,Z){this.message=Y,this.data=Z&&typeof Z=="object"?Z:{},this.stack=""}y.prototype=Error.prototype;function S(Y){if(process.env.NODE_ENV!=="production")var Z={},me=0;function fe(re,ue,ae,K,Q,ie,he){if(K=K||m,ie=ie||ae,he!==n){if(l){var ee=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw ee.name="Invariant Violation",ee}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var se=K+":"+ae;!Z[se]&&me<3&&(i("You are manually calling a React.PropTypes validation function for the `"+ie+"` prop on `"+K+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),Z[se]=!0,me++)}}return ue[ae]==null?re?ue[ae]===null?new y("The "+Q+" `"+ie+"` is marked as required "+("in `"+K+"`, but its value is `null`.")):new y("The "+Q+" `"+ie+"` is marked as required in "+("`"+K+"`, but its value is `undefined`.")):null:Y(ue,ae,K,Q,ie)}var pe=fe.bind(null,!1);return pe.isRequired=fe.bind(null,!0),pe}function C(Y){function Z(me,fe,pe,re,ue,ae){var K=me[fe],Q=F(K);if(Q!==Y){var ie=W(K);return new y("Invalid "+re+" `"+ue+"` of type "+("`"+ie+"` supplied to `"+pe+"`, expected ")+("`"+Y+"`."),{expectedType:Y})}return null}return S(Z)}function E(){return S(s)}function T(Y){function Z(me,fe,pe,re,ue){if(typeof Y!="function")return new y("Property `"+ue+"` of component `"+pe+"` has invalid PropType notation inside arrayOf.");var ae=me[fe];if(!Array.isArray(ae)){var K=F(ae);return new y("Invalid "+re+" `"+ue+"` of type "+("`"+K+"` supplied to `"+pe+"`, expected an array."))}for(var Q=0;Q<ae.length;Q++){var ie=Y(ae,Q,pe,re,ue+"["+Q+"]",n);if(ie instanceof Error)return ie}return null}return S(Z)}function w(){function Y(Z,me,fe,pe,re){var ue=Z[me];if(!a(ue)){var ae=F(ue);return new y("Invalid "+pe+" `"+re+"` of type "+("`"+ae+"` supplied to `"+fe+"`, expected a single ReactElement."))}return null}return S(Y)}function M(){function Y(Z,me,fe,pe,re){var ue=Z[me];if(!t.isValidElementType(ue)){var ae=F(ue);return new y("Invalid "+pe+" `"+re+"` of type "+("`"+ae+"` supplied to `"+fe+"`, expected a single ReactElement type."))}return null}return S(Y)}function R(Y){function Z(me,fe,pe,re,ue){if(!(me[fe]instanceof Y)){var ae=Y.name||m,K=G(me[fe]);return new y("Invalid "+re+" `"+ue+"` of type "+("`"+K+"` supplied to `"+pe+"`, expected ")+("instance of `"+ae+"`."))}return null}return S(Z)}function _(Y){if(!Array.isArray(Y))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),s;function Z(me,fe,pe,re,ue){for(var ae=me[fe],K=0;K<Y.length;K++)if(b(ae,Y[K]))return null;var Q=JSON.stringify(Y,function(he,ee){var se=W(ee);return se==="symbol"?String(ee):ee});return new y("Invalid "+re+" `"+ue+"` of value `"+String(ae)+"` "+("supplied to `"+pe+"`, expected one of "+Q+"."))}return S(Z)}function I(Y){function Z(me,fe,pe,re,ue){if(typeof Y!="function")return new y("Property `"+ue+"` of component `"+pe+"` has invalid PropType notation inside objectOf.");var ae=me[fe],K=F(ae);if(K!=="object")return new y("Invalid "+re+" `"+ue+"` of type "+("`"+K+"` supplied to `"+pe+"`, expected an object."));for(var Q in ae)if(r(ae,Q)){var ie=Y(ae,Q,pe,re,ue+"."+Q,n);if(ie instanceof Error)return ie}return null}return S(Z)}function N(Y){if(!Array.isArray(Y))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var Z=0;Z<Y.length;Z++){var me=Y[Z];if(typeof me!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+U(me)+" at index "+Z+"."),s}function fe(pe,re,ue,ae,K){for(var Q=[],ie=0;ie<Y.length;ie++){var he=Y[ie],ee=he(pe,re,ue,ae,K,n);if(ee==null)return null;ee.data&&r(ee.data,"expectedType")&&Q.push(ee.data.expectedType)}var se=Q.length>0?", expected one of type ["+Q.join(", ")+"]":"";return new y("Invalid "+ae+" `"+K+"` supplied to "+("`"+ue+"`"+se+"."))}return S(fe)}function O(){function Y(Z,me,fe,pe,re){return V(Z[me])?null:new y("Invalid "+pe+" `"+re+"` supplied to "+("`"+fe+"`, expected a ReactNode."))}return S(Y)}function A(Y,Z,me,fe,pe){return new y((Y||"React class")+": "+Z+" type `"+me+"."+fe+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+pe+"`.")}function L(Y){function Z(me,fe,pe,re,ue){var ae=me[fe],K=F(ae);if(K!=="object")return new y("Invalid "+re+" `"+ue+"` of type `"+K+"` "+("supplied to `"+pe+"`, expected `object`."));for(var Q in Y){var ie=Y[Q];if(typeof ie!="function")return A(pe,re,ue,Q,W(ie));var he=ie(ae,Q,pe,re,ue+"."+Q,n);if(he)return he}return null}return S(Z)}function z(Y){function Z(me,fe,pe,re,ue){var ae=me[fe],K=F(ae);if(K!=="object")return new y("Invalid "+re+" `"+ue+"` of type `"+K+"` "+("supplied to `"+pe+"`, expected `object`."));var Q=e({},me[fe],Y);for(var ie in Q){var he=Y[ie];if(r(Y,ie)&&typeof he!="function")return A(pe,re,ue,ie,W(he));if(!he)return new y("Invalid "+re+" `"+ue+"` key `"+ie+"` supplied to `"+pe+"`.\nBad object: "+JSON.stringify(me[fe],null," ")+`
36
+ Valid keys: `+JSON.stringify(Object.keys(Y),null," "));var ee=he(ae,ie,pe,re,ue+"."+ie,n);if(ee)return ee}return null}return S(Z)}function V(Y){switch(typeof Y){case"number":case"string":case"undefined":return!0;case"boolean":return!Y;case"object":if(Array.isArray(Y))return Y.every(V);if(Y===null||a(Y))return!0;var Z=h(Y);if(Z){var me=Z.call(Y),fe;if(Z!==Y.entries){for(;!(fe=me.next()).done;)if(!V(fe.value))return!1}else for(;!(fe=me.next()).done;){var pe=fe.value;if(pe&&!V(pe[1]))return!1}}else return!1;return!0;default:return!1}}function $(Y,Z){return Y==="symbol"?!0:Z?Z["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&Z instanceof Symbol:!1}function F(Y){var Z=typeof Y;return Array.isArray(Y)?"array":Y instanceof RegExp?"object":$(Z,Y)?"symbol":Z}function W(Y){if(typeof Y>"u"||Y===null)return""+Y;var Z=F(Y);if(Z==="object"){if(Y instanceof Date)return"date";if(Y instanceof RegExp)return"regexp"}return Z}function U(Y){var Z=W(Y);switch(Z){case"array":case"object":return"an "+Z;case"boolean":case"date":case"regexp":return"a "+Z;default:return Z}}function G(Y){return!Y.constructor||!Y.constructor.name?m:Y.constructor.name}return g.checkPropTypes=o,g.resetWarningCache=o.resetWarningCache,g.PropTypes=g,g},Dm}var Pm,xw;function $V(){if(xw)return Pm;xw=1;var t=N0();function e(){}function n(){}return n.resetWarningCache=e,Pm=function(){function r(s,a,l,u,f,h){if(h!==t){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:e};return i.PropTypes=i,i},Pm}var Sw;function FV(){if(Sw)return cd.exports;if(Sw=1,process.env.NODE_ENV!=="production"){var t=mA(),e=!0;cd.exports=jV()(t.isElement,e)}else cd.exports=$V()();return cd.exports}var BV=FV();const c=rr(BV);function VV(t){const{prototype:e={}}=t;return!!e.isReactComponent}function yA(t,e,n,r,o){const i=t[e],s=o||e;if(i==null||typeof window>"u")return null;let a;const l=i.type;return typeof l=="function"&&!VV(l)&&(a="Did you accidentally use a plain function component for an element instead?"),a!==void 0?new Error(`Invalid ${r} \`${s}\` supplied to \`${n}\`. Expected an element that can hold a ref. ${a} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const Gc=ui(c.element,yA);Gc.isRequired=ui(c.element.isRequired,yA);function zV(t){const{prototype:e={}}=t;return!!e.isReactComponent}function HV(t,e,n,r,o){const i=t[e],s=o||e;if(i==null||typeof window>"u")return null;let a;return typeof i=="function"&&!zV(i)&&(a="Did you accidentally provide a plain function component instead?"),a!==void 0?new Error(`Invalid ${r} \`${s}\` supplied to \`${n}\`. Expected an element type that can hold a ref. ${a} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const fp=ui(c.elementType,HV),WV="exact-prop: ​";function bA(t){return process.env.NODE_ENV==="production"?t:{...t,[WV]:e=>{const n=Object.keys(e).filter(r=>!t.hasOwnProperty(r));return n.length>0?new Error(`The following props are not supported: ${n.map(r=>`\`${r}\``).join(", ")}. Please remove them.`):null}}}function Oo(t,...e){const n=new URL(`https://mui.com/production-error/?code=${t}`);return e.forEach(r=>n.searchParams.append("args[]",r)),`Minified MUI error #${t}; visit ${n} for the full message.`}function vA(t,e=""){return t.displayName||t.name||e}function Cw(t,e,n){const r=vA(e);return t.displayName||(r!==""?`${n}(${r})`:n)}function qV(t){if(t!=null){if(typeof t=="string")return t;if(typeof t=="function")return vA(t,"Component");if(typeof t=="object")switch(t.$$typeof){case $s.ForwardRef:return Cw(t,t.render,"ForwardRef");case $s.Memo:return Cw(t,t.type,"memo");default:return}}}function ii(t,e,n,r,o){if(process.env.NODE_ENV==="production")return null;const i=t[e],s=o||e;return i==null?null:i&&i.nodeType!==1?new Error(`Invalid ${r} \`${s}\` supplied to \`${n}\`. Expected an HTMLElement.`):null}const mn=c.oneOfType([c.func,c.object]);function Re(t){if(typeof t!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":Oo(7));return t.charAt(0).toUpperCase()+t.slice(1)}function ww(...t){return t.reduce((e,n)=>n==null?e:function(...o){e.apply(this,o),n.apply(this,o)},()=>{})}function xA(t,e=166){let n;function r(...o){const i=()=>{t.apply(this,o)};clearTimeout(n),n=setTimeout(i,e)}return r.clear=()=>{clearTimeout(n)},r}function oc(t,e){var n,r,o;return P.isValidElement(t)&&e.indexOf(t.type.muiName??((o=(r=(n=t.type)==null?void 0:n._payload)==null?void 0:r.value)==null?void 0:o.muiName))!==-1}function Wn(t){return t&&t.ownerDocument||document}function si(t){return Wn(t).defaultView||window}function kv(t,e){typeof t=="function"?t(e):t&&(t.current=e)}const Rn=typeof window<"u"?P.useLayoutEffect:P.useEffect;let Tw=0;function UV(t){const[e,n]=P.useState(t),r=t||e;return P.useEffect(()=>{e==null&&(Tw+=1,n(`mui-${Tw}`))},[e]),r}const KV={...P},Ew=KV.useId;function _o(t){if(Ew!==void 0){const e=Ew();return t??e}return UV(t)}function YV(t,e,n,r,o){if(process.env.NODE_ENV==="production")return null;const i=o||e;return typeof t[e]<"u"?new Error(`The prop \`${i}\` is not supported. Please remove it.`):null}function ai({controlled:t,default:e,name:n,state:r="value"}){const{current:o}=P.useRef(t!==void 0),[i,s]=P.useState(e),a=o?t:i;if(process.env.NODE_ENV!=="production"){P.useEffect(()=>{o!==(t!==void 0)&&console.error([`MUI: A component is changing the ${o?"":"un"}controlled ${r} state of ${n} to be ${o?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
37
+ `))},[r,n,t]);const{current:u}=P.useRef(e);P.useEffect(()=>{!o&&!Object.is(u,e)&&console.error([`MUI: A component is changing the default ${r} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join(`
38
+ `))},[JSON.stringify(e)])}const l=P.useCallback(u=>{o||s(u)},[]);return[a,l]}function je(t){const e=P.useRef(t);return Rn(()=>{e.current=t}),P.useRef((...n)=>(0,e.current)(...n)).current}function kt(...t){return P.useMemo(()=>t.every(e=>e==null)?null:e=>{t.forEach(n=>{kv(n,e)})},t)}const kw={};function SA(t,e){const n=P.useRef(kw);return n.current===kw&&(n.current=t(e)),n}const GV=[];function JV(t){P.useEffect(t,GV)}class L0{constructor(){Dl(this,"currentId",null);Dl(this,"clear",()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)});Dl(this,"disposeEffect",()=>this.clear)}static create(){return new L0}start(e,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},e)}}function CA(){const t=SA(L0.create).current;return JV(t.disposeEffect),t}function Mw(t){try{return t.matches(":focus-visible")}catch{process.env.NODE_ENV!=="production"&&!/jsdom/.test(window.navigator.userAgent)&&console.warn(["MUI: The `:focus-visible` pseudo class is not supported in this browser.","Some components rely on this feature to work properly."].join(`
39
+ `))}return!1}function wA(t=window){const e=t.document.documentElement.clientWidth;return t.innerWidth-e}const ZV={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function XV(t){const e=typeof t;switch(e){case"number":return Number.isNaN(t)?"NaN":Number.isFinite(t)?t!==Math.floor(t)?"float":"number":"Infinity";case"object":return t===null?"null":t.constructor.name;default:return e}}function TA(t,e,n,r){const o=t[e];if(o==null||!Number.isInteger(o)){const i=XV(o);return new RangeError(`Invalid ${r} \`${e}\` of type \`${i}\` supplied to \`${n}\`, expected \`integer\`.`)}return null}function EA(t,e,...n){return t[e]===void 0?null:TA(t,e,...n)}function Mv(){return null}EA.isRequired=TA;Mv.isRequired=Mv;const kA=process.env.NODE_ENV==="production"?Mv:EA;function Tc(t,e){const n={...e};for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)){const o=r;if(o==="components"||o==="slots")n[o]={...t[o],...n[o]};else if(o==="componentsProps"||o==="slotProps"){const i=t[o],s=e[o];if(!s)n[o]=i||{};else if(!i)n[o]=s;else{n[o]={...s};for(const a in i)if(Object.prototype.hasOwnProperty.call(i,a)){const l=a;n[o][l]=Tc(i[l],s[l])}}}else n[o]===void 0&&(n[o]=t[o])}return n}function Ue(t,e,n=void 0){const r={};for(const o in t){const i=t[o];let s="",a=!0;for(let l=0;l<i.length;l+=1){const u=i[l];u&&(s+=(a===!0?"":" ")+e(u),a=!1,n&&n[u]&&(s+=" "+n[u]))}r[o]=s}return r}const Ow=t=>t,QV=()=>{let t=Ow;return{configure(e){t=e},generate(e){return t(e)},reset(){t=Ow}}},ez=QV(),tz={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Ke(t,e,n="Mui"){const r=tz[e];return r?`${n}-${r}`:`${ez.generate(t)}-${e}`}function He(t,e,n="Mui"){const r={};return e.forEach(o=>{r[o]=Ke(t,o,n)}),r}function nz(t,e=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(e,Math.min(t,n))}function rz(t){return typeof t=="string"}function MA(t,e,n){return t===void 0||rz(t)?e:{...e,ownerState:{...e.ownerState,...n}}}function OA(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(n=OA(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function Pe(){for(var t,e,n=0,r="",o=arguments.length;n<o;n++)(t=arguments[n])&&(e=OA(t))&&(r&&(r+=" "),r+=e);return r}function RA(t,e=[]){if(t===void 0)return{};const n={};return Object.keys(t).filter(r=>r.match(/^on[A-Z]/)&&typeof t[r]=="function"&&!e.includes(r)).forEach(r=>{n[r]=t[r]}),n}function Rw(t){if(t===void 0)return{};const e={};return Object.keys(t).filter(n=>!(n.match(/^on[A-Z]/)&&typeof t[n]=="function")).forEach(n=>{e[n]=t[n]}),e}function AA(t){const{getSlotProps:e,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:i}=t;if(!e){const g=Pe(n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),b={...n==null?void 0:n.style,...o==null?void 0:o.style,...r==null?void 0:r.style},y={...n,...o,...r};return g.length>0&&(y.className=g),Object.keys(b).length>0&&(y.style=b),{props:y,internalRef:void 0}}const s=RA({...o,...r}),a=Rw(r),l=Rw(o),u=e(s),f=Pe(u==null?void 0:u.className,n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),h={...u==null?void 0:u.style,...n==null?void 0:n.style,...o==null?void 0:o.style,...r==null?void 0:r.style},m={...u,...n,...l,...a};return f.length>0&&(m.className=f),Object.keys(h).length>0&&(m.style=h),{props:m,internalRef:u.ref}}function pp(t,e,n){return typeof t=="function"?t(e,n):t}function Ct(t){var h;const{elementType:e,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:o=!1,...i}=t,s=o?{}:pp(n,r),{props:a,internalRef:l}=AA({...i,externalSlotProps:s}),u=kt(l,s==null?void 0:s.ref,(h=t.additionalProps)==null?void 0:h.ref);return MA(e,{...a,ref:u},r)}function Jc(t){var e;return parseInt(P.version,10)>=19?((e=t==null?void 0:t.props)==null?void 0:e.ref)||null:(t==null?void 0:t.ref)||null}function ic(t,e){return e?Hn(t,e,{clone:!1}):t}const Ji=process.env.NODE_ENV!=="production"?c.oneOfType([c.number,c.string,c.object,c.array]):{};function oz(t,e){if(!t.containerQueries)return e;const n=Object.keys(e).filter(r=>r.startsWith("@container")).sort((r,o)=>{var s,a;const i=/min-width:\s*([0-9.]+)/;return+(((s=r.match(i))==null?void 0:s[1])||0)-+(((a=o.match(i))==null?void 0:a[1])||0)});return n.length?n.reduce((r,o)=>{const i=e[o];return delete r[o],r[o]=i,r},{...e}):e}function iz(t,e){return e==="@"||e.startsWith("@")&&(t.some(n=>e.startsWith(`@${n}`))||!!e.match(/^@\d/))}function sz(t,e){const n=e.match(/^@([^/]+)?\/?(.+)?$/);if(!n){if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The provided shorthand ${`(${e})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
40
+ For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:Oo(18,`(${e})`));return null}const[,r,o]=n,i=Number.isNaN(+r)?r||0:+r;return t.containerQueries(o).up(i)}function az(t){const e=(i,s)=>i.replace("@media",s?`@container ${s}`:"@container");function n(i,s){i.up=(...a)=>e(t.breakpoints.up(...a),s),i.down=(...a)=>e(t.breakpoints.down(...a),s),i.between=(...a)=>e(t.breakpoints.between(...a),s),i.only=(...a)=>e(t.breakpoints.only(...a),s),i.not=(...a)=>{const l=e(t.breakpoints.not(...a),s);return l.includes("not all and")?l.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):l}}const r={},o=i=>(n(r,i),r);return n(o),{...t,containerQueries:o}}const hp={xs:0,sm:600,md:900,lg:1200,xl:1536},Aw={keys:["xs","sm","md","lg","xl"],up:t=>`@media (min-width:${hp[t]}px)`},lz={containerQueries:t=>({up:e=>{let n=typeof e=="number"?e:hp[e]||e;return typeof n=="number"&&(n=`${n}px`),t?`@container ${t} (min-width:${n})`:`@container (min-width:${n})`}})};function li(t,e,n){const r=t.theme||{};if(Array.isArray(e)){const i=r.breakpoints||Aw;return e.reduce((s,a,l)=>(s[i.up(i.keys[l])]=n(e[l]),s),{})}if(typeof e=="object"){const i=r.breakpoints||Aw;return Object.keys(e).reduce((s,a)=>{if(iz(i.keys,a)){const l=sz(r.containerQueries?r:lz,a);l&&(s[l]=n(e[a],a))}else if(Object.keys(i.values||hp).includes(a)){const l=i.up(a);s[l]=n(e[a],a)}else{const l=a;s[l]=e[l]}return s},{})}return n(e)}function cz(t={}){var n;return((n=t.keys)==null?void 0:n.reduce((r,o)=>{const i=t.up(o);return r[i]={},r},{}))||{}}function uz(t,e){return t.reduce((n,r)=>{const o=n[r];return(!o||Object.keys(o).length===0)&&delete n[r],n},e)}function mp(t,e,n=!0){if(!e||typeof e!="string")return null;if(t&&t.vars&&n){const r=`vars.${e}`.split(".").reduce((o,i)=>o&&o[i]?o[i]:null,t);if(r!=null)return r}return e.split(".").reduce((r,o)=>r&&r[o]!=null?r[o]:null,t)}function cf(t,e,n,r=n){let o;return typeof t=="function"?o=t(n):Array.isArray(t)?o=t[n]||r:o=mp(t,n)||r,e&&(o=e(o,r,t)),o}function fn(t){const{prop:e,cssProperty:n=t.prop,themeKey:r,transform:o}=t,i=s=>{if(s[e]==null)return null;const a=s[e],l=s.theme,u=mp(l,r)||{};return li(s,a,h=>{let m=cf(u,o,h);return h===m&&typeof h=="string"&&(m=cf(u,o,`${e}${h==="default"?"":Re(h)}`,h)),n===!1?m:{[n]:m}})};return i.propTypes=process.env.NODE_ENV!=="production"?{[e]:Ji}:{},i.filterProps=[e],i}function dz(t){const e={};return n=>(e[n]===void 0&&(e[n]=t(n)),e[n])}const fz={m:"margin",p:"padding"},pz={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Iw={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},hz=dz(t=>{if(t.length>2)if(Iw[t])t=Iw[t];else return[t];const[e,n]=t.split(""),r=fz[e],o=pz[n]||"";return Array.isArray(o)?o.map(i=>r+i):[r+o]}),gp=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],yp=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],mz=[...gp,...yp];function Zc(t,e,n,r){const o=mp(t,e,!0)??n;return typeof o=="number"||typeof o=="string"?i=>typeof i=="string"?i:(process.env.NODE_ENV!=="production"&&typeof i!="number"&&console.error(`MUI: Expected ${r} argument to be a number or a string, got ${i}.`),typeof o=="string"?`calc(${i} * ${o})`:o*i):Array.isArray(o)?i=>{if(typeof i=="string")return i;const s=Math.abs(i);process.env.NODE_ENV!=="production"&&(Number.isInteger(s)?s>o.length-1&&console.error([`MUI: The value provided (${s}) overflows.`,`The supported values are: ${JSON.stringify(o)}.`,`${s} > ${o.length-1}, you need to add the missing values.`].join(`
41
+ `)):console.error([`MUI: The \`theme.${e}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${e}\` as a number.`].join(`
42
+ `)));const a=o[s];return i>=0?a:typeof a=="number"?-a:`-${a}`}:typeof o=="function"?o:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${e}\` value (${o}) is invalid.`,"It should be a number, an array or a function."].join(`
43
+ `)),()=>{})}function j0(t){return Zc(t,"spacing",8,"spacing")}function Xc(t,e){return typeof e=="string"||e==null?e:t(e)}function gz(t,e){return n=>t.reduce((r,o)=>(r[o]=Xc(e,n),r),{})}function yz(t,e,n,r){if(!e.includes(n))return null;const o=hz(n),i=gz(o,r),s=t[n];return li(t,s,i)}function IA(t,e){const n=j0(t.theme);return Object.keys(t).map(r=>yz(t,e,r,n)).reduce(ic,{})}function on(t){return IA(t,gp)}on.propTypes=process.env.NODE_ENV!=="production"?gp.reduce((t,e)=>(t[e]=Ji,t),{}):{};on.filterProps=gp;function sn(t){return IA(t,yp)}sn.propTypes=process.env.NODE_ENV!=="production"?yp.reduce((t,e)=>(t[e]=Ji,t),{}):{};sn.filterProps=yp;process.env.NODE_ENV!=="production"&&mz.reduce((t,e)=>(t[e]=Ji,t),{});function bp(...t){const e=t.reduce((r,o)=>(o.filterProps.forEach(i=>{r[i]=o}),r),{}),n=r=>Object.keys(r).reduce((o,i)=>e[i]?ic(o,e[i](r)):o,{});return n.propTypes=process.env.NODE_ENV!=="production"?t.reduce((r,o)=>Object.assign(r,o.propTypes),{}):{},n.filterProps=t.reduce((r,o)=>r.concat(o.filterProps),[]),n}function Vr(t){return typeof t!="number"?t:`${t}px solid`}function Gr(t,e){return fn({prop:t,themeKey:"borders",transform:e})}const bz=Gr("border",Vr),vz=Gr("borderTop",Vr),xz=Gr("borderRight",Vr),Sz=Gr("borderBottom",Vr),Cz=Gr("borderLeft",Vr),wz=Gr("borderColor"),Tz=Gr("borderTopColor"),Ez=Gr("borderRightColor"),kz=Gr("borderBottomColor"),Mz=Gr("borderLeftColor"),Oz=Gr("outline",Vr),Rz=Gr("outlineColor"),vp=t=>{if(t.borderRadius!==void 0&&t.borderRadius!==null){const e=Zc(t.theme,"shape.borderRadius",4,"borderRadius"),n=r=>({borderRadius:Xc(e,r)});return li(t,t.borderRadius,n)}return null};vp.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:Ji}:{};vp.filterProps=["borderRadius"];bp(bz,vz,xz,Sz,Cz,wz,Tz,Ez,kz,Mz,vp,Oz,Rz);const xp=t=>{if(t.gap!==void 0&&t.gap!==null){const e=Zc(t.theme,"spacing",8,"gap"),n=r=>({gap:Xc(e,r)});return li(t,t.gap,n)}return null};xp.propTypes=process.env.NODE_ENV!=="production"?{gap:Ji}:{};xp.filterProps=["gap"];const Sp=t=>{if(t.columnGap!==void 0&&t.columnGap!==null){const e=Zc(t.theme,"spacing",8,"columnGap"),n=r=>({columnGap:Xc(e,r)});return li(t,t.columnGap,n)}return null};Sp.propTypes=process.env.NODE_ENV!=="production"?{columnGap:Ji}:{};Sp.filterProps=["columnGap"];const Cp=t=>{if(t.rowGap!==void 0&&t.rowGap!==null){const e=Zc(t.theme,"spacing",8,"rowGap"),n=r=>({rowGap:Xc(e,r)});return li(t,t.rowGap,n)}return null};Cp.propTypes=process.env.NODE_ENV!=="production"?{rowGap:Ji}:{};Cp.filterProps=["rowGap"];const Az=fn({prop:"gridColumn"}),Iz=fn({prop:"gridRow"}),Dz=fn({prop:"gridAutoFlow"}),Pz=fn({prop:"gridAutoColumns"}),_z=fn({prop:"gridAutoRows"}),Nz=fn({prop:"gridTemplateColumns"}),Lz=fn({prop:"gridTemplateRows"}),jz=fn({prop:"gridTemplateAreas"}),$z=fn({prop:"gridArea"});bp(xp,Sp,Cp,Az,Iz,Dz,Pz,_z,Nz,Lz,jz,$z);function $a(t,e){return e==="grey"?e:t}const Fz=fn({prop:"color",themeKey:"palette",transform:$a}),Bz=fn({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:$a}),Vz=fn({prop:"backgroundColor",themeKey:"palette",transform:$a});bp(Fz,Bz,Vz);function wr(t){return t<=1&&t!==0?`${t*100}%`:t}const zz=fn({prop:"width",transform:wr}),$0=t=>{if(t.maxWidth!==void 0&&t.maxWidth!==null){const e=n=>{var o,i,s,a,l;const r=((s=(i=(o=t.theme)==null?void 0:o.breakpoints)==null?void 0:i.values)==null?void 0:s[n])||hp[n];return r?((l=(a=t.theme)==null?void 0:a.breakpoints)==null?void 0:l.unit)!=="px"?{maxWidth:`${r}${t.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:wr(n)}};return li(t,t.maxWidth,e)}return null};$0.filterProps=["maxWidth"];const Hz=fn({prop:"minWidth",transform:wr}),Wz=fn({prop:"height",transform:wr}),qz=fn({prop:"maxHeight",transform:wr}),Uz=fn({prop:"minHeight",transform:wr});fn({prop:"size",cssProperty:"width",transform:wr});fn({prop:"size",cssProperty:"height",transform:wr});const Kz=fn({prop:"boxSizing"});bp(zz,$0,Hz,Wz,qz,Uz,Kz);const Qc={border:{themeKey:"borders",transform:Vr},borderTop:{themeKey:"borders",transform:Vr},borderRight:{themeKey:"borders",transform:Vr},borderBottom:{themeKey:"borders",transform:Vr},borderLeft:{themeKey:"borders",transform:Vr},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Vr},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:vp},color:{themeKey:"palette",transform:$a},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:$a},backgroundColor:{themeKey:"palette",transform:$a},p:{style:sn},pt:{style:sn},pr:{style:sn},pb:{style:sn},pl:{style:sn},px:{style:sn},py:{style:sn},padding:{style:sn},paddingTop:{style:sn},paddingRight:{style:sn},paddingBottom:{style:sn},paddingLeft:{style:sn},paddingX:{style:sn},paddingY:{style:sn},paddingInline:{style:sn},paddingInlineStart:{style:sn},paddingInlineEnd:{style:sn},paddingBlock:{style:sn},paddingBlockStart:{style:sn},paddingBlockEnd:{style:sn},m:{style:on},mt:{style:on},mr:{style:on},mb:{style:on},ml:{style:on},mx:{style:on},my:{style:on},margin:{style:on},marginTop:{style:on},marginRight:{style:on},marginBottom:{style:on},marginLeft:{style:on},marginX:{style:on},marginY:{style:on},marginInline:{style:on},marginInlineStart:{style:on},marginInlineEnd:{style:on},marginBlock:{style:on},marginBlockStart:{style:on},marginBlockEnd:{style:on},displayPrint:{cssProperty:!1,transform:t=>({"@media print":{display:t}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:xp},rowGap:{style:Cp},columnGap:{style:Sp},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:wr},maxWidth:{style:$0},minWidth:{transform:wr},height:{transform:wr},maxHeight:{transform:wr},minHeight:{transform:wr},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function Yz(...t){const e=t.reduce((r,o)=>r.concat(Object.keys(o)),[]),n=new Set(e);return t.every(r=>n.size===Object.keys(r).length)}function Gz(t,e){return typeof t=="function"?t(e):t}function Jz(){function t(n,r,o,i){const s={[n]:r,theme:o},a=i[n];if(!a)return{[n]:r};const{cssProperty:l=n,themeKey:u,transform:f,style:h}=a;if(r==null)return null;if(u==="typography"&&r==="inherit")return{[n]:r};const m=mp(o,u)||{};return h?h(s):li(s,r,b=>{let y=cf(m,f,b);return b===y&&typeof b=="string"&&(y=cf(m,f,`${n}${b==="default"?"":Re(b)}`,b)),l===!1?y:{[l]:y}})}function e(n){const{sx:r,theme:o={}}=n||{};if(!r)return null;const i=o.unstable_sxConfig??Qc;function s(a){let l=a;if(typeof a=="function")l=a(o);else if(typeof a!="object")return a;if(!l)return null;const u=cz(o.breakpoints),f=Object.keys(u);let h=u;return Object.keys(l).forEach(m=>{const g=Gz(l[m],o);if(g!=null)if(typeof g=="object")if(i[m])h=ic(h,t(m,g,o,i));else{const b=li({theme:o},g,y=>({[m]:y}));Yz(b,g)?h[m]=e({sx:g,theme:o}):h=ic(h,b)}else h=ic(h,t(m,g,o,i))}),oz(o,uz(f,h))}return Array.isArray(r)?r.map(s):s(r)}return e}const Ka=Jz();Ka.filterProps=["sx"];const Zz=t=>{var r;const e={systemProps:{},otherProps:{}},n=((r=t==null?void 0:t.theme)==null?void 0:r.unstable_sxConfig)??Qc;return Object.keys(t).forEach(o=>{n[o]?e.systemProps[o]=t[o]:e.otherProps[o]=t[o]}),e};function Xz(t){const{sx:e,...n}=t,{systemProps:r,otherProps:o}=Zz(n);let i;return Array.isArray(e)?i=[r,...e]:typeof e=="function"?i=(...s)=>{const a=e(...s);return Eo(a)?{...r,...a}:r}:i={...r,...e},{...o,sx:i}}function Qz(t){for(var e=0,n,r=0,o=t.length;o>=4;++r,o-=4)n=t.charCodeAt(r)&255|(t.charCodeAt(++r)&255)<<8|(t.charCodeAt(++r)&255)<<16|(t.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(o){case 3:e^=(t.charCodeAt(r+2)&255)<<16;case 2:e^=(t.charCodeAt(r+1)&255)<<8;case 1:e^=t.charCodeAt(r)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var e4={animationIterationCount:1,aspectRatio: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,scale: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};function t4(t){var e=Object.create(null);return function(n){return e[n]===void 0&&(e[n]=t(n)),e[n]}}var n4=/[A-Z]|^ms/g,r4=/_EMO_([^_]+?)_([^]*?)_EMO_/g,DA=function(e){return e.charCodeAt(1)===45},Dw=function(e){return e!=null&&typeof e!="boolean"},_m=t4(function(t){return DA(t)?t:t.replace(n4,"-$&").toLowerCase()}),Pw=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(r4,function(r,o,i){return _i={name:o,styles:i,next:_i},o})}return e4[e]!==1&&!DA(e)&&typeof n=="number"&&n!==0?n+"px":n};function uf(t,e,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var o=n;if(o.anim===1)return _i={name:o.name,styles:o.styles,next:_i},o.name;var i=n;if(i.styles!==void 0){var s=i.next;if(s!==void 0)for(;s!==void 0;)_i={name:s.name,styles:s.styles,next:_i},s=s.next;var a=i.styles+";";return a}return o4(t,e,n)}}var l=n;if(e==null)return l;var u=e[l];return u!==void 0?u:l}function o4(t,e,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=uf(t,e,n[o])+";";else for(var i in n){var s=n[i];if(typeof s!="object"){var a=s;e!=null&&e[a]!==void 0?r+=i+"{"+e[a]+"}":Dw(a)&&(r+=_m(i)+":"+Pw(i,a)+";")}else if(Array.isArray(s)&&typeof s[0]=="string"&&(e==null||e[s[0]]===void 0))for(var l=0;l<s.length;l++)Dw(s[l])&&(r+=_m(i)+":"+Pw(i,s[l])+";");else{var u=uf(t,e,s);switch(i){case"animation":case"animationName":{r+=_m(i)+":"+u+";";break}default:r+=i+"{"+u+"}"}}}return r}var _w=/label:\s*([^\s;{]+)\s*(;|$)/g,_i;function PA(t,e,n){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var r=!0,o="";_i=void 0;var i=t[0];if(i==null||i.raw===void 0)r=!1,o+=uf(n,e,i);else{var s=i;o+=s[0]}for(var a=1;a<t.length;a++)if(o+=uf(n,e,t[a]),r){var l=i;o+=l[a]}_w.lastIndex=0;for(var u="",f;(f=_w.exec(o))!==null;)u+="-"+f[1];var h=Qz(o)+u;return{name:h,styles:o,next:_i}}function i4(t){return t==null||Object.keys(t).length===0}function _A(t){const{styles:e,defaultTheme:n={}}=t,r=typeof e=="function"?o=>e(i4(o)?n:o):e;return v.jsx(so.Global,{styles:r})}process.env.NODE_ENV!=="production"&&(_A.propTypes={defaultTheme:c.object,styles:c.oneOfType([c.array,c.string,c.object,c.func])});/**
44
+ * @mui/styled-engine v6.4.9
45
+ *
46
+ * @license MIT
47
+ * This source code is licensed under the MIT license found in the
48
+ * LICENSE file in the root directory of this source tree.
49
+ */function s4(t,e){const n=EV(t,e);return process.env.NODE_ENV!=="production"?(...r)=>{const o=typeof t=="string"?`"${t}"`:"component";return r.length===0?console.error([`MUI: Seems like you called \`styled(${o})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
50
+ `)):r.some(i=>i===void 0)&&console.error(`MUI: the styled(${o})(...args) API requires all its args to be defined.`),n(...r)}:n}function a4(t,e){Array.isArray(t.__emotion_styles)&&(t.__emotion_styles=e(t.__emotion_styles))}const Nw=[];function Lw(t){return Nw[0]=t,PA(Nw)}const l4=t=>{const e=Object.keys(t).map(n=>({key:n,val:t[n]}))||[];return e.sort((n,r)=>n.val-r.val),e.reduce((n,r)=>({...n,[r.key]:r.val}),{})};function c4(t){const{values:e={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...o}=t,i=l4(e),s=Object.keys(i);function a(m){return`@media (min-width:${typeof e[m]=="number"?e[m]:m}${n})`}function l(m){return`@media (max-width:${(typeof e[m]=="number"?e[m]:m)-r/100}${n})`}function u(m,g){const b=s.indexOf(g);return`@media (min-width:${typeof e[m]=="number"?e[m]:m}${n}) and (max-width:${(b!==-1&&typeof e[s[b]]=="number"?e[s[b]]:g)-r/100}${n})`}function f(m){return s.indexOf(m)+1<s.length?u(m,s[s.indexOf(m)+1]):a(m)}function h(m){const g=s.indexOf(m);return g===0?a(s[1]):g===s.length-1?l(s[g]):u(m,s[s.indexOf(m)+1]).replace("@media","@media not all and")}return{keys:s,values:i,up:a,down:l,between:u,only:f,not:h,unit:n,...o}}const u4={borderRadius:4};function NA(t=8,e=j0({spacing:t})){if(t.mui)return t;const n=(...r)=>(process.env.NODE_ENV!=="production"&&(r.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${r.length}`)),(r.length===0?[1]:r).map(i=>{const s=e(i);return typeof s=="number"?`${s}px`:s}).join(" "));return n.mui=!0,n}function d4(t,e){var r;const n=this;if(n.vars){if(!((r=n.colorSchemes)!=null&&r[t])||typeof n.getColorSchemeSelector!="function")return{};let o=n.getColorSchemeSelector(t);return o==="&"?e:((o.includes("data-")||o.includes("."))&&(o=`*:where(${o.replace(/\s*&$/,"")}) &`),{[o]:e})}return n.palette.mode===t?e:{}}function F0(t={},...e){const{breakpoints:n={},palette:r={},spacing:o,shape:i={},...s}=t,a=c4(n),l=NA(o);let u=Hn({breakpoints:a,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:l,shape:{...u4,...i}},s);return u=az(u),u.applyStyles=d4,u=e.reduce((f,h)=>Hn(f,h),u),u.unstable_sxConfig={...Qc,...s==null?void 0:s.unstable_sxConfig},u.unstable_sx=function(h){return Ka({sx:h,theme:this})},u}function f4(t){return Object.keys(t).length===0}function LA(t=null){const e=P.useContext(so.ThemeContext);return!e||f4(e)?t:e}const p4=F0();function B0(t=p4){return LA(t)}function jA({styles:t,themeId:e,defaultTheme:n={}}){const r=B0(n),o=typeof t=="function"?t(e&&r[e]||r):t;return v.jsx(_A,{styles:o})}process.env.NODE_ENV!=="production"&&(jA.propTypes={defaultTheme:c.object,styles:c.oneOfType([c.array,c.func,c.number,c.object,c.string,c.bool]),themeId:c.string});function $A(t){const{variants:e,...n}=t,r={variants:e,style:Lw(n),isProcessed:!0};return r.style===n||e&&e.forEach(o=>{typeof o.style!="function"&&(o.style=Lw(o.style))}),r}const h4=F0();function Bd(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}function m4(t){return t?(e,n)=>n[t]:null}function g4(t,e,n){t.theme=x4(t.theme)?n:t.theme[e]||t.theme}function Vd(t,e){const n=typeof e=="function"?e(t):e;if(Array.isArray(n))return n.flatMap(r=>Vd(t,r));if(Array.isArray(n==null?void 0:n.variants)){let r;if(n.isProcessed)r=n.style;else{const{variants:o,...i}=n;r=i}return FA(t,n.variants,[r])}return n!=null&&n.isProcessed?n.style:n}function FA(t,e,n=[]){var o;let r;e:for(let i=0;i<e.length;i+=1){const s=e[i];if(typeof s.props=="function"){if(r??(r={...t,...t.ownerState,ownerState:t.ownerState}),!s.props(r))continue}else for(const a in s.props)if(t[a]!==s.props[a]&&((o=t.ownerState)==null?void 0:o[a])!==s.props[a])continue e;typeof s.style=="function"?(r??(r={...t,...t.ownerState,ownerState:t.ownerState}),n.push(s.style(r))):n.push(s.style)}return n}function y4(t={}){const{themeId:e,defaultTheme:n=h4,rootShouldForwardProp:r=Bd,slotShouldForwardProp:o=Bd}=t;function i(a){g4(a,e,n)}return(a,l={})=>{a4(a,M=>M.filter(R=>R!==Ka));const{name:u,slot:f,skipVariantsResolver:h,skipSx:m,overridesResolver:g=m4(BA(f)),...b}=l,y=h!==void 0?h:f&&f!=="Root"&&f!=="root"||!1,S=m||!1;let C=Bd;f==="Root"||f==="root"?C=r:f?C=o:S4(a)&&(C=void 0);const E=s4(a,{shouldForwardProp:C,label:v4(u,f),...b}),T=M=>{if(typeof M=="function"&&M.__emotion_real!==M)return function(_){return Vd(_,M)};if(Eo(M)){const R=$A(M);return R.variants?function(I){return Vd(I,R)}:R.style}return M},w=(...M)=>{const R=[],_=M.map(T),I=[];if(R.push(i),u&&g&&I.push(function(L){var F,W;const V=(W=(F=L.theme.components)==null?void 0:F[u])==null?void 0:W.styleOverrides;if(!V)return null;const $={};for(const U in V)$[U]=Vd(L,V[U]);return g(L,$)}),u&&!y&&I.push(function(L){var $,F;const z=L.theme,V=(F=($=z==null?void 0:z.components)==null?void 0:$[u])==null?void 0:F.variants;return V?FA(L,V):null}),S||I.push(Ka),Array.isArray(_[0])){const A=_.shift(),L=new Array(R.length).fill(""),z=new Array(I.length).fill("");let V;V=[...L,...A,...z],V.raw=[...L,...A.raw,...z],R.unshift(V)}const N=[...R,..._,...I],O=E(...N);return a.muiName&&(O.muiName=a.muiName),process.env.NODE_ENV!=="production"&&(O.displayName=b4(u,f,a)),O};return E.withConfig&&(w.withConfig=E.withConfig),w}}function b4(t,e,n){return t?`${t}${Re(e||"")}`:`Styled(${qV(n)})`}function v4(t,e){let n;return process.env.NODE_ENV!=="production"&&t&&(n=`${t}-${BA(e||"Root")}`),n}function x4(t){for(const e in t)return!1;return!0}function S4(t){return typeof t=="string"&&t.charCodeAt(0)>96}function BA(t){return t&&t.charAt(0).toLowerCase()+t.slice(1)}function VA(t){const{theme:e,name:n,props:r}=t;return!e||!e.components||!e.components[n]||!e.components[n].defaultProps?r:Tc(e.components[n].defaultProps,r)}function C4({props:t,name:e,defaultTheme:n,themeId:r}){let o=B0(n);return r&&(o=o[r]||o),VA({theme:o,name:e,props:t})}function w4(t,e,n,r,o){const[i,s]=P.useState(()=>o&&n?n(t).matches:r?r(t).matches:e);return Rn(()=>{if(!n)return;const a=n(t),l=()=>{s(a.matches)};return l(),a.addEventListener("change",l),()=>{a.removeEventListener("change",l)}},[t,n]),i}const T4={...P},zA=T4.useSyncExternalStore;function E4(t,e,n,r,o){const i=P.useCallback(()=>e,[e]),s=P.useMemo(()=>{if(o&&n)return()=>n(t).matches;if(r!==null){const{matches:f}=r(t);return()=>f}return i},[i,t,r,o,n]),[a,l]=P.useMemo(()=>{if(n===null)return[i,()=>()=>{}];const f=n(t);return[()=>f.matches,h=>(f.addEventListener("change",h),()=>{f.removeEventListener("change",h)})]},[i,n,t]);return zA(l,a,s)}function k4(t={}){const{themeId:e}=t;return function(r,o={}){let i=LA();i&&e&&(i=i[e]||i);const s=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:a=!1,matchMedia:l=s?window.matchMedia:null,ssrMatchMedia:u=null,noSsr:f=!1}=VA({name:"MuiUseMediaQuery",props:o,theme:i});process.env.NODE_ENV!=="production"&&typeof r=="function"&&i===null&&console.error(["MUI: The `query` argument provided is invalid.","You are providing a function without a theme in the context.","One of the parent elements needs to use a ThemeProvider."].join(`
51
+ `));let h=typeof r=="function"?r(i):r;h=h.replace(/^@media( ?)/m,"");const g=(zA!==void 0?E4:w4)(h,a,l,u,f);return process.env.NODE_ENV!=="production"&&P.useDebugValue({query:h,match:g}),g}}function V0(t,e=0,n=1){return process.env.NODE_ENV!=="production"&&(t<e||t>n)&&console.error(`MUI: The value provided ${t} is out of range [${e}, ${n}].`),nz(t,e,n)}function M4(t){t=t.slice(1);const e=new RegExp(`.{1,${t.length>=6?2:1}}`,"g");let n=t.match(e);return n&&n[0].length===1&&(n=n.map(r=>r+r)),process.env.NODE_ENV!=="production"&&t.length!==t.trim().length&&console.error(`MUI: The color: "${t}" is invalid. Make sure the color input doesn't contain leading/trailing space.`),n?`rgb${n.length===4?"a":""}(${n.map((r,o)=>o<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function Wi(t){if(t.type)return t;if(t.charAt(0)==="#")return Wi(M4(t));const e=t.indexOf("("),n=t.substring(0,e);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${t}\` color.
52
+ The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:Oo(9,t));let r=t.substring(e+1,t.length-1),o;if(n==="color"){if(r=r.split(" "),o=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(o))throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${o}\` color space.
53
+ The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:Oo(10,o))}else r=r.split(",");return r=r.map(i=>parseFloat(i)),{type:n,values:r,colorSpace:o}}const O4=t=>{const e=Wi(t);return e.values.slice(0,3).map((n,r)=>e.type.includes("hsl")&&r!==0?`${n}%`:n).join(" ")},Ul=(t,e)=>{try{return O4(t)}catch{return e&&process.env.NODE_ENV!=="production"&&console.warn(e),t}};function wp(t){const{type:e,colorSpace:n}=t;let{values:r}=t;return e.includes("rgb")?r=r.map((o,i)=>i<3?parseInt(o,10):o):e.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),e.includes("color")?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${e}(${r})`}function HA(t){t=Wi(t);const{values:e}=t,n=e[0],r=e[1]/100,o=e[2]/100,i=r*Math.min(o,1-o),s=(u,f=(u+n/30)%12)=>o-i*Math.max(Math.min(f-3,9-f,1),-1);let a="rgb";const l=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return t.type==="hsla"&&(a+="a",l.push(e[3])),wp({type:a,values:l})}function Ov(t){t=Wi(t);let e=t.type==="hsl"||t.type==="hsla"?Wi(HA(t)).values:t.values;return e=e.map(n=>(t.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*e[0]+.7152*e[1]+.0722*e[2]).toFixed(3))}function jw(t,e){const n=Ov(t),r=Ov(e);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function $t(t,e){return t=Wi(t),e=V0(e),(t.type==="rgb"||t.type==="hsl")&&(t.type+="a"),t.type==="color"?t.values[3]=`/${e}`:t.values[3]=e,wp(t)}function dd(t,e,n){try{return $t(t,e)}catch{return t}}function Ya(t,e){if(t=Wi(t),e=V0(e),t.type.includes("hsl"))t.values[2]*=1-e;else if(t.type.includes("rgb")||t.type.includes("color"))for(let n=0;n<3;n+=1)t.values[n]*=1-e;return wp(t)}function _t(t,e,n){try{return Ya(t,e)}catch{return t}}function Ec(t,e){if(t=Wi(t),e=V0(e),t.type.includes("hsl"))t.values[2]+=(100-t.values[2])*e;else if(t.type.includes("rgb"))for(let n=0;n<3;n+=1)t.values[n]+=(255-t.values[n])*e;else if(t.type.includes("color"))for(let n=0;n<3;n+=1)t.values[n]+=(1-t.values[n])*e;return wp(t)}function Nt(t,e,n){try{return Ec(t,e)}catch{return t}}function R4(t,e=.15){return Ov(t)>.5?Ya(t,e):Ec(t,e)}function fd(t,e,n){try{return R4(t,e)}catch{return t}}const A4=P.createContext();process.env.NODE_ENV!=="production"&&(c.node,c.bool);const ao=()=>P.useContext(A4)??!1,I4=P.createContext(void 0);process.env.NODE_ENV!=="production"&&(c.node,c.object);function D4(t){const{theme:e,name:n,props:r}=t;if(!e||!e.components||!e.components[n])return r;const o=e.components[n];return o.defaultProps?Tc(o.defaultProps,r):!o.styleOverrides&&!o.variants?Tc(o,r):r}function P4({props:t,name:e}){const n=P.useContext(I4);return D4({props:t,name:e,theme:{components:n}})}const $w={theme:void 0};function _4(t){let e,n;return function(o){let i=e;return(i===void 0||o.theme!==n)&&($w.theme=o.theme,i=$A(t($w)),e=i,n=o.theme),i}}function N4(t=""){function e(...r){if(!r.length)return"";const o=r[0];return typeof o=="string"&&!o.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${t?`${t}-`:""}${o}${e(...r.slice(1))})`:`, ${o}`}return(r,...o)=>`var(--${t?`${t}-`:""}${r}${e(...o)})`}const Fw=(t,e,n,r=[])=>{let o=t;e.forEach((i,s)=>{s===e.length-1?Array.isArray(o)?o[Number(i)]=n:o&&typeof o=="object"&&(o[i]=n):o&&typeof o=="object"&&(o[i]||(o[i]=r.includes(i)?[]:{}),o=o[i])})},L4=(t,e,n)=>{function r(o,i=[],s=[]){Object.entries(o).forEach(([a,l])=>{(!n||!n([...i,a]))&&l!=null&&(typeof l=="object"&&Object.keys(l).length>0?r(l,[...i,a],Array.isArray(l)?[...s,a]:s):e([...i,a],l,s))})}r(t)},j4=(t,e)=>typeof e=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(r=>t.includes(r))||t[t.length-1].toLowerCase().includes("opacity")?e:`${e}px`:e;function Nm(t,e){const{prefix:n,shouldSkipGeneratingVar:r}=e||{},o={},i={},s={};return L4(t,(a,l,u)=>{if((typeof l=="string"||typeof l=="number")&&(!r||!r(a,l))){const f=`--${n?`${n}-`:""}${a.join("-")}`,h=j4(a,l);Object.assign(o,{[f]:h}),Fw(i,a,`var(${f})`,u),Fw(s,a,`var(${f}, ${h})`,u)}},a=>a[0]==="vars"),{css:o,vars:i,varsWithDefaults:s}}function $4(t,e={}){const{getSelector:n=S,disableCssColorScheme:r,colorSchemeSelector:o}=e,{colorSchemes:i={},components:s,defaultColorScheme:a="light",...l}=t,{vars:u,css:f,varsWithDefaults:h}=Nm(l,e);let m=h;const g={},{[a]:b,...y}=i;if(Object.entries(y||{}).forEach(([T,w])=>{const{vars:M,css:R,varsWithDefaults:_}=Nm(w,e);m=Hn(m,_),g[T]={css:R,vars:M}}),b){const{css:T,vars:w,varsWithDefaults:M}=Nm(b,e);m=Hn(m,M),g[a]={css:T,vars:w}}function S(T,w){var R,_;let M=o;if(o==="class"&&(M=".%s"),o==="data"&&(M="[data-%s]"),o!=null&&o.startsWith("data-")&&!o.includes("%s")&&(M=`[${o}="%s"]`),T){if(M==="media")return t.defaultColorScheme===T?":root":{[`@media (prefers-color-scheme: ${((_=(R=i[T])==null?void 0:R.palette)==null?void 0:_.mode)||T})`]:{":root":w}};if(M)return t.defaultColorScheme===T?`:root, ${M.replace("%s",String(T))}`:M.replace("%s",String(T))}return":root"}return{vars:m,generateThemeVars:()=>{let T={...u};return Object.entries(g).forEach(([,{vars:w}])=>{T=Hn(T,w)}),T},generateStyleSheets:()=>{var I,N;const T=[],w=t.defaultColorScheme||"light";function M(O,A){Object.keys(A).length&&T.push(typeof O=="string"?{[O]:{...A}}:O)}M(n(void 0,{...f}),f);const{[w]:R,..._}=g;if(R){const{css:O}=R,A=(N=(I=i[w])==null?void 0:I.palette)==null?void 0:N.mode,L=!r&&A?{colorScheme:A,...O}:{...O};M(n(w,{...L}),L)}return Object.entries(_).forEach(([O,{css:A}])=>{var V,$;const L=($=(V=i[O])==null?void 0:V.palette)==null?void 0:$.mode,z=!r&&L?{colorScheme:L,...A}:{...A};M(n(O,{...z}),z)}),T}}}function F4(t){return function(n){return t==="media"?(process.env.NODE_ENV!=="production"&&n!=="light"&&n!=="dark"&&console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${n}'.`),`@media (prefers-color-scheme: ${n})`):t?t.startsWith("data-")&&!t.includes("%s")?`[${t}="${n}"] &`:t==="class"?`.${n} &`:t==="data"?`[data-${n}] &`:`${t.replace("%s",n)} &`:"&"}}const kc={black:"#000",white:"#fff"},B4={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},ma={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},ga={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},Pl={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},ya={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},ba={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},va={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"};function WA(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:kc.white,default:kc.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const V4=WA();function qA(){return{text:{primary:kc.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:kc.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const Bw=qA();function Vw(t,e,n,r){const o=r.light||r,i=r.dark||r*1.5;t[e]||(t.hasOwnProperty(n)?t[e]=t[n]:e==="light"?t.light=Ec(t.main,o):e==="dark"&&(t.dark=Ya(t.main,i)))}function z4(t="light"){return t==="dark"?{main:ya[200],light:ya[50],dark:ya[400]}:{main:ya[700],light:ya[400],dark:ya[800]}}function H4(t="light"){return t==="dark"?{main:ma[200],light:ma[50],dark:ma[400]}:{main:ma[500],light:ma[300],dark:ma[700]}}function W4(t="light"){return t==="dark"?{main:ga[500],light:ga[300],dark:ga[700]}:{main:ga[700],light:ga[400],dark:ga[800]}}function q4(t="light"){return t==="dark"?{main:ba[400],light:ba[300],dark:ba[700]}:{main:ba[700],light:ba[500],dark:ba[900]}}function U4(t="light"){return t==="dark"?{main:va[400],light:va[300],dark:va[700]}:{main:va[800],light:va[500],dark:va[900]}}function K4(t="light"){return t==="dark"?{main:Pl[400],light:Pl[300],dark:Pl[700]}:{main:"#ed6c02",light:Pl[500],dark:Pl[900]}}function z0(t){const{mode:e="light",contrastThreshold:n=3,tonalOffset:r=.2,...o}=t,i=t.primary||z4(e),s=t.secondary||H4(e),a=t.error||W4(e),l=t.info||q4(e),u=t.success||U4(e),f=t.warning||K4(e);function h(y){const S=jw(y,Bw.text.primary)>=n?Bw.text.primary:V4.text.primary;if(process.env.NODE_ENV!=="production"){const C=jw(y,S);C<3&&console.error([`MUI: The contrast ratio of ${C}:1 for ${S} on ${y}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(`
54
+ `))}return S}const m=({color:y,name:S,mainShade:C=500,lightShade:E=300,darkShade:T=700})=>{if(y={...y},!y.main&&y[C]&&(y.main=y[C]),!y.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${S?` (${S})`:""} provided to augmentColor(color) is invalid.
55
+ The color object needs to have a \`main\` property or a \`${C}\` property.`:Oo(11,S?` (${S})`:"",C));if(typeof y.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${S?` (${S})`:""} provided to augmentColor(color) is invalid.
56
+ \`color.main\` should be a string, but \`${JSON.stringify(y.main)}\` was provided instead.
57
+
58
+ Did you intend to use one of the following approaches?
59
+
60
+ import { green } from "@mui/material/colors";
61
+
62
+ const theme1 = createTheme({ palette: {
63
+ primary: green,
64
+ } });
65
+
66
+ const theme2 = createTheme({ palette: {
67
+ primary: { main: green[500] },
68
+ } });`:Oo(12,S?` (${S})`:"",JSON.stringify(y.main)));return Vw(y,"light",E,r),Vw(y,"dark",T,r),y.contrastText||(y.contrastText=h(y.main)),y};let g;return e==="light"?g=WA():e==="dark"&&(g=qA()),process.env.NODE_ENV!=="production"&&(g||console.error(`MUI: The palette mode \`${e}\` is not supported.`)),Hn({common:{...kc},mode:e,primary:m({color:i,name:"primary"}),secondary:m({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:m({color:a,name:"error"}),warning:m({color:f,name:"warning"}),info:m({color:l,name:"info"}),success:m({color:u,name:"success"}),grey:B4,contrastThreshold:n,getContrastText:h,augmentColor:m,tonalOffset:r,...g},o)}function Y4(t){const e={};return Object.entries(t).forEach(r=>{const[o,i]=r;typeof i=="object"&&(e[o]=`${i.fontStyle?`${i.fontStyle} `:""}${i.fontVariant?`${i.fontVariant} `:""}${i.fontWeight?`${i.fontWeight} `:""}${i.fontStretch?`${i.fontStretch} `:""}${i.fontSize||""}${i.lineHeight?`/${i.lineHeight} `:""}${i.fontFamily||""}`)}),e}function G4(t,e){return{toolbar:{minHeight:56,[t.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[t.up("sm")]:{minHeight:64}},...e}}function J4(t){return Math.round(t*1e5)/1e5}const zw={textTransform:"uppercase"},Hw='"Roboto", "Helvetica", "Arial", sans-serif';function Z4(t,e){const{fontFamily:n=Hw,fontSize:r=14,fontWeightLight:o=300,fontWeightRegular:i=400,fontWeightMedium:s=500,fontWeightBold:a=700,htmlFontSize:l=16,allVariants:u,pxToRem:f,...h}=typeof e=="function"?e(t):e;process.env.NODE_ENV!=="production"&&(typeof r!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof l!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const m=r/14,g=f||(S=>`${S/l*m}rem`),b=(S,C,E,T,w)=>({fontFamily:n,fontWeight:S,fontSize:g(C),lineHeight:E,...n===Hw?{letterSpacing:`${J4(T/C)}em`}:{},...w,...u}),y={h1:b(o,96,1.167,-1.5),h2:b(o,60,1.2,-.5),h3:b(i,48,1.167,0),h4:b(i,34,1.235,.25),h5:b(i,24,1.334,0),h6:b(s,20,1.6,.15),subtitle1:b(i,16,1.75,.15),subtitle2:b(s,14,1.57,.1),body1:b(i,16,1.5,.15),body2:b(i,14,1.43,.15),button:b(s,14,1.75,.4,zw),caption:b(i,12,1.66,.4),overline:b(i,12,2.66,1,zw),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Hn({htmlFontSize:l,pxToRem:g,fontFamily:n,fontSize:r,fontWeightLight:o,fontWeightRegular:i,fontWeightMedium:s,fontWeightBold:a,...y},h,{clone:!1})}const X4=.2,Q4=.14,eH=.12;function Jt(...t){return[`${t[0]}px ${t[1]}px ${t[2]}px ${t[3]}px rgba(0,0,0,${X4})`,`${t[4]}px ${t[5]}px ${t[6]}px ${t[7]}px rgba(0,0,0,${Q4})`,`${t[8]}px ${t[9]}px ${t[10]}px ${t[11]}px rgba(0,0,0,${eH})`].join(",")}const tH=["none",Jt(0,2,1,-1,0,1,1,0,0,1,3,0),Jt(0,3,1,-2,0,2,2,0,0,1,5,0),Jt(0,3,3,-2,0,3,4,0,0,1,8,0),Jt(0,2,4,-1,0,4,5,0,0,1,10,0),Jt(0,3,5,-1,0,5,8,0,0,1,14,0),Jt(0,3,5,-1,0,6,10,0,0,1,18,0),Jt(0,4,5,-2,0,7,10,1,0,2,16,1),Jt(0,5,5,-3,0,8,10,1,0,3,14,2),Jt(0,5,6,-3,0,9,12,1,0,3,16,2),Jt(0,6,6,-3,0,10,14,1,0,4,18,3),Jt(0,6,7,-4,0,11,15,1,0,4,20,3),Jt(0,7,8,-4,0,12,17,2,0,5,22,4),Jt(0,7,8,-4,0,13,19,2,0,5,24,4),Jt(0,7,9,-4,0,14,21,2,0,5,26,4),Jt(0,8,9,-5,0,15,22,2,0,6,28,5),Jt(0,8,10,-5,0,16,24,2,0,6,30,5),Jt(0,8,11,-5,0,17,26,2,0,6,32,5),Jt(0,9,11,-5,0,18,28,2,0,7,34,6),Jt(0,9,12,-6,0,19,29,2,0,7,36,6),Jt(0,10,13,-6,0,20,31,3,0,8,38,7),Jt(0,10,13,-6,0,21,33,3,0,8,40,7),Jt(0,10,14,-6,0,22,35,3,0,8,42,7),Jt(0,11,14,-7,0,23,36,3,0,9,44,8),Jt(0,11,15,-7,0,24,38,3,0,9,46,8)],nH={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},rH={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Ww(t){return`${Math.round(t)}ms`}function oH(t){if(!t)return 0;const e=t/36;return Math.min(Math.round((4+15*e**.25+e/5)*10),3e3)}function iH(t){const e={...nH,...t.easing},n={...rH,...t.duration};return{getAutoHeightDuration:oH,create:(o=["all"],i={})=>{const{duration:s=n.standard,easing:a=e.easeInOut,delay:l=0,...u}=i;if(process.env.NODE_ENV!=="production"){const f=m=>typeof m=="string",h=m=>!Number.isNaN(parseFloat(m));!f(o)&&!Array.isArray(o)&&console.error('MUI: Argument "props" must be a string or Array.'),!h(s)&&!f(s)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${s}.`),f(a)||console.error('MUI: Argument "easing" must be a string.'),!h(l)&&!f(l)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof i!="object"&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(`
69
+ `)),Object.keys(u).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(u).join(",")}].`)}return(Array.isArray(o)?o:[o]).map(f=>`${f} ${typeof s=="string"?s:Ww(s)} ${a} ${typeof l=="string"?l:Ww(l)}`).join(",")},...t,easing:e,duration:n}}const sH={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function aH(t){return Eo(t)||typeof t>"u"||typeof t=="string"||typeof t=="boolean"||typeof t=="number"||Array.isArray(t)}function UA(t={}){const e={...t};function n(r){const o=Object.entries(r);for(let i=0;i<o.length;i++){const[s,a]=o[i];!aH(a)||s.startsWith("unstable_")?delete r[s]:Eo(a)&&(r[s]={...a},n(r[s]))}}return n(e),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
70
+
71
+ const theme = ${JSON.stringify(e,null,2)};
72
+
73
+ theme.breakpoints = createBreakpoints(theme.breakpoints || {});
74
+ theme.transitions = createTransitions(theme.transitions || {});
75
+
76
+ export default theme;`}function Rv(t={},...e){const{breakpoints:n,mixins:r={},spacing:o,palette:i={},transitions:s={},typography:a={},shape:l,...u}=t;if(t.vars&&t.generateThemeVars===void 0)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.":Oo(20));const f=z0(i),h=F0(t);let m=Hn(h,{mixins:G4(h.breakpoints,r),palette:f,shadows:tH.slice(),typography:Z4(f,a),transitions:iH(s),zIndex:{...sH}});if(m=Hn(m,u),m=e.reduce((g,b)=>Hn(g,b),m),process.env.NODE_ENV!=="production"){const g=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],b=(y,S)=>{let C;for(C in y){const E=y[C];if(g.includes(C)&&Object.keys(E).length>0){if(process.env.NODE_ENV!=="production"){const T=Ke("",C);console.error([`MUI: The \`${S}\` component increases the CSS specificity of the \`${C}\` internal state.`,"You can not override it like this: ",JSON.stringify(y,null,2),"",`Instead, you need to use the '&.${T}' syntax:`,JSON.stringify({root:{[`&.${T}`]:E}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
77
+ `))}y[C]={}}}};Object.keys(m.components).forEach(y=>{const S=m.components[y].styleOverrides;S&&y.startsWith("Mui")&&b(S,y)})}return m.unstable_sxConfig={...Qc,...u==null?void 0:u.unstable_sxConfig},m.unstable_sx=function(b){return Ka({sx:b,theme:this})},m.toRuntimeSource=UA,m}function Av(t){let e;return t<1?e=5.11916*t**2:e=4.5*Math.log(t+1)+2,Math.round(e*10)/1e3}const lH=[...Array(25)].map((t,e)=>{if(e===0)return"none";const n=Av(e);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function KA(t){return{inputPlaceholder:t==="dark"?.5:.42,inputUnderline:t==="dark"?.7:.42,switchTrackDisabled:t==="dark"?.2:.12,switchTrack:t==="dark"?.3:.38}}function YA(t){return t==="dark"?lH:[]}function cH(t){const{palette:e={mode:"light"},opacity:n,overlays:r,...o}=t,i=z0(e);return{palette:i,opacity:{...KA(i.mode),...n},overlays:r||YA(i.mode),...o}}function uH(t){var e;return!!t[0].match(/(cssVarPrefix|colorSchemeSelector|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!t[0].match(/sxConfig$/)||t[0]==="palette"&&!!((e=t[1])!=null&&e.match(/(mode|contrastThreshold|tonalOffset)/))}const dH=t=>[...[...Array(25)].map((e,n)=>`--${t?`${t}-`:""}overlays-${n}`),`--${t?`${t}-`:""}palette-AppBar-darkBg`,`--${t?`${t}-`:""}palette-AppBar-darkColor`],fH=t=>(e,n)=>{const r=t.rootSelector||":root",o=t.colorSchemeSelector;let i=o;if(o==="class"&&(i=".%s"),o==="data"&&(i="[data-%s]"),o!=null&&o.startsWith("data-")&&!o.includes("%s")&&(i=`[${o}="%s"]`),t.defaultColorScheme===e){if(e==="dark"){const s={};return dH(t.cssVarPrefix).forEach(a=>{s[a]=n[a],delete n[a]}),i==="media"?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:s}}:i?{[i.replace("%s",e)]:s,[`${r}, ${i.replace("%s",e)}`]:n}:{[r]:{...n,...s}}}if(i&&i!=="media")return`${r}, ${i.replace("%s",String(e))}`}else if(e){if(i==="media")return{[`@media (prefers-color-scheme: ${String(e)})`]:{[r]:n}};if(i)return i.replace("%s",String(e))}return r};function pH(t,e){e.forEach(n=>{t[n]||(t[n]={})})}function be(t,e,n){!t[e]&&n&&(t[e]=n)}function Kl(t){return typeof t!="string"||!t.startsWith("hsl")?t:HA(t)}function Uo(t,e){`${e}Channel`in t||(t[`${e}Channel`]=Ul(Kl(t[e]),`MUI: Can't create \`palette.${e}Channel\` because \`palette.${e}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
78
+ To suppress this warning, you need to explicitly provide the \`palette.${e}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function hH(t){return typeof t=="number"?`${t}px`:typeof t=="string"||typeof t=="function"||Array.isArray(t)?t:"8px"}const yo=t=>{try{return t()}catch{}},mH=(t="mui")=>N4(t);function Lm(t,e,n,r){if(!e)return;e=e===!0?{}:e;const o=r==="dark"?"dark":"light";if(!n){t[r]=cH({...e,palette:{mode:o,...e==null?void 0:e.palette}});return}const{palette:i,...s}=Rv({...n,palette:{mode:o,...e==null?void 0:e.palette}});return t[r]={...e,palette:i,opacity:{...KA(o),...e==null?void 0:e.opacity},overlays:(e==null?void 0:e.overlays)||YA(o)},s}function gH(t={},...e){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:o=!1,cssVarPrefix:i="mui",shouldSkipGeneratingVar:s=uH,colorSchemeSelector:a=n.light&&n.dark?"media":void 0,rootSelector:l=":root",...u}=t,f=Object.keys(n)[0],h=r||(n.light&&f!=="light"?"light":f),m=mH(i),{[h]:g,light:b,dark:y,...S}=n,C={...S};let E=g;if((h==="dark"&&!("dark"in n)||h==="light"&&!("light"in n))&&(E=!0),!E)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${h}\` option is either missing or invalid.`:Oo(21,h));const T=Lm(C,E,u,h);b&&!C.light&&Lm(C,b,void 0,"light"),y&&!C.dark&&Lm(C,y,void 0,"dark");let w={defaultColorScheme:h,...T,cssVarPrefix:i,colorSchemeSelector:a,rootSelector:l,getCssVar:m,colorSchemes:C,font:{...Y4(T.typography),...T.font},spacing:hH(u.spacing)};Object.keys(w.colorSchemes).forEach(N=>{const O=w.colorSchemes[N].palette,A=L=>{const z=L.split("-"),V=z[1],$=z[2];return m(L,O[V][$])};if(O.mode==="light"&&(be(O.common,"background","#fff"),be(O.common,"onBackground","#000")),O.mode==="dark"&&(be(O.common,"background","#000"),be(O.common,"onBackground","#fff")),pH(O,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),O.mode==="light"){be(O.Alert,"errorColor",_t(O.error.light,.6)),be(O.Alert,"infoColor",_t(O.info.light,.6)),be(O.Alert,"successColor",_t(O.success.light,.6)),be(O.Alert,"warningColor",_t(O.warning.light,.6)),be(O.Alert,"errorFilledBg",A("palette-error-main")),be(O.Alert,"infoFilledBg",A("palette-info-main")),be(O.Alert,"successFilledBg",A("palette-success-main")),be(O.Alert,"warningFilledBg",A("palette-warning-main")),be(O.Alert,"errorFilledColor",yo(()=>O.getContrastText(O.error.main))),be(O.Alert,"infoFilledColor",yo(()=>O.getContrastText(O.info.main))),be(O.Alert,"successFilledColor",yo(()=>O.getContrastText(O.success.main))),be(O.Alert,"warningFilledColor",yo(()=>O.getContrastText(O.warning.main))),be(O.Alert,"errorStandardBg",Nt(O.error.light,.9)),be(O.Alert,"infoStandardBg",Nt(O.info.light,.9)),be(O.Alert,"successStandardBg",Nt(O.success.light,.9)),be(O.Alert,"warningStandardBg",Nt(O.warning.light,.9)),be(O.Alert,"errorIconColor",A("palette-error-main")),be(O.Alert,"infoIconColor",A("palette-info-main")),be(O.Alert,"successIconColor",A("palette-success-main")),be(O.Alert,"warningIconColor",A("palette-warning-main")),be(O.AppBar,"defaultBg",A("palette-grey-100")),be(O.Avatar,"defaultBg",A("palette-grey-400")),be(O.Button,"inheritContainedBg",A("palette-grey-300")),be(O.Button,"inheritContainedHoverBg",A("palette-grey-A100")),be(O.Chip,"defaultBorder",A("palette-grey-400")),be(O.Chip,"defaultAvatarColor",A("palette-grey-700")),be(O.Chip,"defaultIconColor",A("palette-grey-700")),be(O.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),be(O.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),be(O.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),be(O.LinearProgress,"primaryBg",Nt(O.primary.main,.62)),be(O.LinearProgress,"secondaryBg",Nt(O.secondary.main,.62)),be(O.LinearProgress,"errorBg",Nt(O.error.main,.62)),be(O.LinearProgress,"infoBg",Nt(O.info.main,.62)),be(O.LinearProgress,"successBg",Nt(O.success.main,.62)),be(O.LinearProgress,"warningBg",Nt(O.warning.main,.62)),be(O.Skeleton,"bg",`rgba(${A("palette-text-primaryChannel")} / 0.11)`),be(O.Slider,"primaryTrack",Nt(O.primary.main,.62)),be(O.Slider,"secondaryTrack",Nt(O.secondary.main,.62)),be(O.Slider,"errorTrack",Nt(O.error.main,.62)),be(O.Slider,"infoTrack",Nt(O.info.main,.62)),be(O.Slider,"successTrack",Nt(O.success.main,.62)),be(O.Slider,"warningTrack",Nt(O.warning.main,.62));const L=fd(O.background.default,.8);be(O.SnackbarContent,"bg",L),be(O.SnackbarContent,"color",yo(()=>O.getContrastText(L))),be(O.SpeedDialAction,"fabHoverBg",fd(O.background.paper,.15)),be(O.StepConnector,"border",A("palette-grey-400")),be(O.StepContent,"border",A("palette-grey-400")),be(O.Switch,"defaultColor",A("palette-common-white")),be(O.Switch,"defaultDisabledColor",A("palette-grey-100")),be(O.Switch,"primaryDisabledColor",Nt(O.primary.main,.62)),be(O.Switch,"secondaryDisabledColor",Nt(O.secondary.main,.62)),be(O.Switch,"errorDisabledColor",Nt(O.error.main,.62)),be(O.Switch,"infoDisabledColor",Nt(O.info.main,.62)),be(O.Switch,"successDisabledColor",Nt(O.success.main,.62)),be(O.Switch,"warningDisabledColor",Nt(O.warning.main,.62)),be(O.TableCell,"border",Nt(dd(O.divider,1),.88)),be(O.Tooltip,"bg",dd(O.grey[700],.92))}if(O.mode==="dark"){be(O.Alert,"errorColor",Nt(O.error.light,.6)),be(O.Alert,"infoColor",Nt(O.info.light,.6)),be(O.Alert,"successColor",Nt(O.success.light,.6)),be(O.Alert,"warningColor",Nt(O.warning.light,.6)),be(O.Alert,"errorFilledBg",A("palette-error-dark")),be(O.Alert,"infoFilledBg",A("palette-info-dark")),be(O.Alert,"successFilledBg",A("palette-success-dark")),be(O.Alert,"warningFilledBg",A("palette-warning-dark")),be(O.Alert,"errorFilledColor",yo(()=>O.getContrastText(O.error.dark))),be(O.Alert,"infoFilledColor",yo(()=>O.getContrastText(O.info.dark))),be(O.Alert,"successFilledColor",yo(()=>O.getContrastText(O.success.dark))),be(O.Alert,"warningFilledColor",yo(()=>O.getContrastText(O.warning.dark))),be(O.Alert,"errorStandardBg",_t(O.error.light,.9)),be(O.Alert,"infoStandardBg",_t(O.info.light,.9)),be(O.Alert,"successStandardBg",_t(O.success.light,.9)),be(O.Alert,"warningStandardBg",_t(O.warning.light,.9)),be(O.Alert,"errorIconColor",A("palette-error-main")),be(O.Alert,"infoIconColor",A("palette-info-main")),be(O.Alert,"successIconColor",A("palette-success-main")),be(O.Alert,"warningIconColor",A("palette-warning-main")),be(O.AppBar,"defaultBg",A("palette-grey-900")),be(O.AppBar,"darkBg",A("palette-background-paper")),be(O.AppBar,"darkColor",A("palette-text-primary")),be(O.Avatar,"defaultBg",A("palette-grey-600")),be(O.Button,"inheritContainedBg",A("palette-grey-800")),be(O.Button,"inheritContainedHoverBg",A("palette-grey-700")),be(O.Chip,"defaultBorder",A("palette-grey-700")),be(O.Chip,"defaultAvatarColor",A("palette-grey-300")),be(O.Chip,"defaultIconColor",A("palette-grey-300")),be(O.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),be(O.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),be(O.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),be(O.LinearProgress,"primaryBg",_t(O.primary.main,.5)),be(O.LinearProgress,"secondaryBg",_t(O.secondary.main,.5)),be(O.LinearProgress,"errorBg",_t(O.error.main,.5)),be(O.LinearProgress,"infoBg",_t(O.info.main,.5)),be(O.LinearProgress,"successBg",_t(O.success.main,.5)),be(O.LinearProgress,"warningBg",_t(O.warning.main,.5)),be(O.Skeleton,"bg",`rgba(${A("palette-text-primaryChannel")} / 0.13)`),be(O.Slider,"primaryTrack",_t(O.primary.main,.5)),be(O.Slider,"secondaryTrack",_t(O.secondary.main,.5)),be(O.Slider,"errorTrack",_t(O.error.main,.5)),be(O.Slider,"infoTrack",_t(O.info.main,.5)),be(O.Slider,"successTrack",_t(O.success.main,.5)),be(O.Slider,"warningTrack",_t(O.warning.main,.5));const L=fd(O.background.default,.98);be(O.SnackbarContent,"bg",L),be(O.SnackbarContent,"color",yo(()=>O.getContrastText(L))),be(O.SpeedDialAction,"fabHoverBg",fd(O.background.paper,.15)),be(O.StepConnector,"border",A("palette-grey-600")),be(O.StepContent,"border",A("palette-grey-600")),be(O.Switch,"defaultColor",A("palette-grey-300")),be(O.Switch,"defaultDisabledColor",A("palette-grey-600")),be(O.Switch,"primaryDisabledColor",_t(O.primary.main,.55)),be(O.Switch,"secondaryDisabledColor",_t(O.secondary.main,.55)),be(O.Switch,"errorDisabledColor",_t(O.error.main,.55)),be(O.Switch,"infoDisabledColor",_t(O.info.main,.55)),be(O.Switch,"successDisabledColor",_t(O.success.main,.55)),be(O.Switch,"warningDisabledColor",_t(O.warning.main,.55)),be(O.TableCell,"border",_t(dd(O.divider,1),.68)),be(O.Tooltip,"bg",dd(O.grey[700],.92))}Uo(O.background,"default"),Uo(O.background,"paper"),Uo(O.common,"background"),Uo(O.common,"onBackground"),Uo(O,"divider"),Object.keys(O).forEach(L=>{const z=O[L];L!=="tonalOffset"&&z&&typeof z=="object"&&(z.main&&be(O[L],"mainChannel",Ul(Kl(z.main))),z.light&&be(O[L],"lightChannel",Ul(Kl(z.light))),z.dark&&be(O[L],"darkChannel",Ul(Kl(z.dark))),z.contrastText&&be(O[L],"contrastTextChannel",Ul(Kl(z.contrastText))),L==="text"&&(Uo(O[L],"primary"),Uo(O[L],"secondary")),L==="action"&&(z.active&&Uo(O[L],"active"),z.selected&&Uo(O[L],"selected")))})}),w=e.reduce((N,O)=>Hn(N,O),w);const M={prefix:i,disableCssColorScheme:o,shouldSkipGeneratingVar:s,getSelector:fH(w)},{vars:R,generateThemeVars:_,generateStyleSheets:I}=$4(w,M);return w.vars=R,Object.entries(w.colorSchemes[w.defaultColorScheme]).forEach(([N,O])=>{w[N]=O}),w.generateThemeVars=_,w.generateStyleSheets=I,w.generateSpacing=function(){return NA(u.spacing,j0(this))},w.getColorSchemeSelector=F4(a),w.spacing=w.generateSpacing(),w.shouldSkipGeneratingVar=s,w.unstable_sxConfig={...Qc,...u==null?void 0:u.unstable_sxConfig},w.unstable_sx=function(O){return Ka({sx:O,theme:this})},w.toRuntimeSource=UA,w}function qw(t,e,n){t.colorSchemes&&n&&(t.colorSchemes[e]={...n!==!0&&n,palette:z0({...n===!0?{}:n.palette,mode:e})})}function yH(t={},...e){const{palette:n,cssVariables:r=!1,colorSchemes:o=n?void 0:{light:!0},defaultColorScheme:i=n==null?void 0:n.mode,...s}=t,a=i||"light",l=o==null?void 0:o[a],u={...o,...n?{[a]:{...typeof l!="boolean"&&l,palette:n}}:void 0};if(r===!1){if(!("colorSchemes"in t))return Rv(t,...e);let f=n;"palette"in t||u[a]&&(u[a]!==!0?f=u[a].palette:a==="dark"&&(f={mode:"dark"}));const h=Rv({...t,palette:f},...e);return h.defaultColorScheme=a,h.colorSchemes=u,h.palette.mode==="light"&&(h.colorSchemes.light={...u.light!==!0&&u.light,palette:h.palette},qw(h,"dark",u.dark)),h.palette.mode==="dark"&&(h.colorSchemes.dark={...u.dark!==!0&&u.dark,palette:h.palette},qw(h,"light",u.light)),h}return!n&&!("light"in u)&&a==="light"&&(u.light=!0),gH({...s,colorSchemes:u,defaultColorScheme:a,...typeof r!="boolean"&&r},...e)}const Tp=yH(),eu="$$material";function Zi(){const t=B0(Tp);return process.env.NODE_ENV!=="production"&&P.useDebugValue(t),t[eu]||t}function GA(t){return v.jsx(jA,{...t,defaultTheme:Tp,themeId:eu})}process.env.NODE_ENV!=="production"&&(GA.propTypes={styles:c.oneOfType([c.array,c.func,c.number,c.object,c.string,c.bool])});function JA(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const lo=t=>JA(t)&&t!=="classes",ye=y4({themeId:eu,defaultTheme:Tp,rootShouldForwardProp:lo});function bH(t){return function(n){return v.jsx(GA,{styles:typeof t=="function"?r=>t({theme:r,...n}):t})}}function vH(){return Xz}const It=_4;process.env.NODE_ENV!=="production"&&(c.node,c.object.isRequired);function xt(t){return P4(t)}function xH(t){return Ke("MuiSvgIcon",t)}He("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const SH=t=>{const{color:e,fontSize:n,classes:r}=t,o={root:["root",e!=="inherit"&&`color${Re(e)}`,`fontSize${Re(n)}`]};return Ue(o,xH,r)},CH=ye("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.color!=="inherit"&&e[`color${Re(n.color)}`],e[`fontSize${Re(n.fontSize)}`]]}})(It(({theme:t})=>{var e,n,r,o,i,s,a,l,u,f,h,m,g,b;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(o=(e=t.transitions)==null?void 0:e.create)==null?void 0:o.call(e,"fill",{duration:(r=(n=(t.vars??t).transitions)==null?void 0:n.duration)==null?void 0:r.shorter}),variants:[{props:y=>!y.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((s=(i=t.typography)==null?void 0:i.pxToRem)==null?void 0:s.call(i,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((l=(a=t.typography)==null?void 0:a.pxToRem)==null?void 0:l.call(a,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((f=(u=t.typography)==null?void 0:u.pxToRem)==null?void 0:f.call(u,35))||"2.1875rem"}},...Object.entries((t.vars??t).palette).filter(([,y])=>y&&y.main).map(([y])=>{var S,C;return{props:{color:y},style:{color:(C=(S=(t.vars??t).palette)==null?void 0:S[y])==null?void 0:C.main}}}),{props:{color:"action"},style:{color:(m=(h=(t.vars??t).palette)==null?void 0:h.action)==null?void 0:m.active}},{props:{color:"disabled"},style:{color:(b=(g=(t.vars??t).palette)==null?void 0:g.action)==null?void 0:b.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),df=P.forwardRef(function(e,n){const r=xt({props:e,name:"MuiSvgIcon"}),{children:o,className:i,color:s="inherit",component:a="svg",fontSize:l="medium",htmlColor:u,inheritViewBox:f=!1,titleAccess:h,viewBox:m="0 0 24 24",...g}=r,b=P.isValidElement(o)&&o.type==="svg",y={...r,color:s,component:a,fontSize:l,instanceFontSize:e.fontSize,inheritViewBox:f,viewBox:m,hasSvgAsChild:b},S={};f||(S.viewBox=m);const C=SH(y);return v.jsxs(CH,{as:a,className:Pe(C.root,i),focusable:"false",color:u,"aria-hidden":h?void 0:!0,role:h?"img":void 0,ref:n,...S,...g,...b&&o.props,ownerState:y,children:[b?o.props.children:o,h?v.jsx("title",{children:h}):null]})});process.env.NODE_ENV!=="production"&&(df.propTypes={children:c.node,classes:c.object,className:c.string,color:c.oneOfType([c.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),c.string]),component:c.elementType,fontSize:c.oneOfType([c.oneOf(["inherit","large","medium","small"]),c.string]),htmlColor:c.string,inheritViewBox:c.bool,shapeRendering:c.string,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),titleAccess:c.string,viewBox:c.string});df.muiName="SvgIcon";function Fe(t,e){function n(r,o){return v.jsx(df,{"data-testid":`${e}Icon`,ref:o,...r,children:t})}return process.env.NODE_ENV!=="production"&&(n.displayName=`${e}Icon`),n.muiName=df.muiName,P.memo(P.forwardRef(n))}function wH(t,e){if(!t)return e;if(typeof t=="function"||typeof e=="function")return o=>{const i=typeof e=="function"?e(o):e,s=typeof t=="function"?t({...o,...i}):t,a=Pe(o==null?void 0:o.className,i==null?void 0:i.className,s==null?void 0:s.className);return{...i,...s,...!!a&&{className:a},...(i==null?void 0:i.style)&&(s==null?void 0:s.style)&&{style:{...i.style,...s.style}},...(i==null?void 0:i.sx)&&(s==null?void 0:s.sx)&&{sx:[...Array.isArray(i.sx)?i.sx:[i.sx],...Array.isArray(s.sx)?s.sx:[s.sx]]}}};const n=e,r=Pe(n==null?void 0:n.className,t==null?void 0:t.className);return{...e,...t,...!!r&&{className:r},...(n==null?void 0:n.style)&&(t==null?void 0:t.style)&&{style:{...n.style,...t.style}},...(n==null?void 0:n.sx)&&(t==null?void 0:t.sx)&&{sx:[...Array.isArray(n.sx)?n.sx:[n.sx],...Array.isArray(t.sx)?t.sx:[t.sx]]}}}const ZA=Fe(v.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"}),"Error"),Qn=t=>{const{name:e,id:n,className:r}=t,[o,i,s]=Wt.useField(e),{error:a}=i;return v.jsxs(j.Typography,{id:n,variant:"caption",display:"block",color:"error",style:{visibility:a?"visible":"hidden"},className:r,fontSize:".9rem",children:[v.jsx(j.Box,{component:"span",sx:{display:"inline-flex",alignItems:"center",position:"relative",top:"3px",mr:.5},children:v.jsx(ZA,{fontSize:"inherit"})}),a]})},XA=t=>{const{name:e,label:n=kn(e),options:r=[],filterSelectedOptions:o=!0,variant:i="outlined",staticLabel:s=!1,staticLabelProps:a={fontSize:".9em",color:"#808080"},readOnly:l,margin:u="dense",fullWidth:f=!0,required:h,onChange:m,clearOnSelect:g=!1,onInputChange:b,getOptionLabel:y=L=>typeof L=="string"?L:String(L),isOptionEqualToValue:S=(L,z)=>JSON.stringify(L)===JSON.stringify(z),useFieldAsValue:C,...E}=t,[T,w,M]=Wt.useField(e),{setValue:R}=M,{error:_}=w,[I,N]=P.useState(""),O={...Xn(E,["useFieldAsValue"]),getOptionLabel:y,options:r,filterSelectedOptions:o,isOptionEqualToValue:S,renderInput:L=>v.jsx(j.TextField,{...L,variant:i,label:s?void 0:n,error:!!_,required:h}),onChange:(L,z,V,$)=>{g?(N(""),R(null)):R(C?z?z[C]:null:z),m&&m(L,z,V,$)},onInputChange:(L,z,V)=>{N(z),b&&b(L,z,V)},fullWidth:!0,inputValue:I,value:C?r.find(L=>L[C]===T.value)||null:T.value,slotProps:{paper:{elevation:8,sx:{borderRadius:2}}}},A=()=>{if(!T.value)return"";if(C){const L=r.find(z=>z[C]===T.value);return L?y(L):""}return y(T.value)};return v.jsxs(j.FormControl,{margin:u,fullWidth:f,required:h,children:[(s||l)&&v.jsx(j.Typography,{...a,children:n}),l?v.jsx(j.Typography,{children:A()}):v.jsxs(j.Box,{children:[v.jsx(j.Autocomplete,{...O}),v.jsx(Qn,{name:e,id:`${e}-err`})]})]})};var Yl={exports:{}};/**
79
+ * @license
80
+ * Lodash <https://lodash.com/>
81
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
82
+ * Released under MIT license <https://lodash.com/license>
83
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
84
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
85
+ */var TH=Yl.exports,Uw;function EH(){return Uw||(Uw=1,function(t,e){(function(){var n,r="4.17.21",o=200,i="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",s="Expected a function",a="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,f="__lodash_placeholder__",h=1,m=2,g=4,b=1,y=2,S=1,C=2,E=4,T=8,w=16,M=32,R=64,_=128,I=256,N=512,O=30,A="...",L=800,z=16,V=1,$=2,F=3,W=1/0,U=9007199254740991,G=17976931348623157e292,Y=NaN,Z=4294967295,me=Z-1,fe=Z>>>1,pe=[["ary",_],["bind",S],["bindKey",C],["curry",T],["curryRight",w],["flip",N],["partial",M],["partialRight",R],["rearg",I]],re="[object Arguments]",ue="[object Array]",ae="[object AsyncFunction]",K="[object Boolean]",Q="[object Date]",ie="[object DOMException]",he="[object Error]",ee="[object Function]",se="[object GeneratorFunction]",le="[object Map]",ge="[object Number]",we="[object Null]",xe="[object Object]",Me="[object Promise]",_e="[object Proxy]",Ve="[object RegExp]",Ye="[object Set]",Ie="[object String]",it="[object Symbol]",vt="[object Undefined]",Yt="[object WeakMap]",yn="[object WeakSet]",tn="[object ArrayBuffer]",Dt="[object DataView]",Sn="[object Float32Array]",jn="[object Float64Array]",ut="[object Int8Array]",An="[object Int16Array]",Vt="[object Int32Array]",de="[object Uint8Array]",Ne="[object Uint8ClampedArray]",Ee="[object Uint16Array]",Le="[object Uint32Array]",We=/\b__p \+= '';/g,et=/\b(__p \+=) '' \+/g,Ot=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Kn=/&(?:amp|lt|gt|quot|#39);/g,or=/[&<>"']/g,Lo=RegExp(Kn.source),ml=RegExp(or.source),Qs=/<%-([\s\S]+?)%>/g,pi=/<%([\s\S]+?)%>/g,vu=/<%=([\s\S]+?)%>/g,gl=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ea=/^\w*$/,QN=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,gh=/[\\^$.*+?()[\]{}|]/g,eL=RegExp(gh.source),yh=/^\s+/,tL=/\s/,nL=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,rL=/\{\n\/\* \[wrapped with (.+)\] \*/,oL=/,? & /,iL=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,sL=/[()=,{}\[\]\/\s]/,aL=/\\(\\)?/g,lL=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,N1=/\w*$/,cL=/^[-+]0x[0-9a-f]+$/i,uL=/^0b[01]+$/i,dL=/^\[object .+?Constructor\]$/,fL=/^0o[0-7]+$/i,pL=/^(?:0|[1-9]\d*)$/,hL=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,xu=/($^)/,mL=/['\n\r\u2028\u2029\\]/g,Su="\\ud800-\\udfff",gL="\\u0300-\\u036f",yL="\\ufe20-\\ufe2f",bL="\\u20d0-\\u20ff",L1=gL+yL+bL,j1="\\u2700-\\u27bf",$1="a-z\\xdf-\\xf6\\xf8-\\xff",vL="\\xac\\xb1\\xd7\\xf7",xL="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",SL="\\u2000-\\u206f",CL=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",F1="A-Z\\xc0-\\xd6\\xd8-\\xde",B1="\\ufe0e\\ufe0f",V1=vL+xL+SL+CL,bh="['’]",wL="["+Su+"]",z1="["+V1+"]",Cu="["+L1+"]",H1="\\d+",TL="["+j1+"]",W1="["+$1+"]",q1="[^"+Su+V1+H1+j1+$1+F1+"]",vh="\\ud83c[\\udffb-\\udfff]",EL="(?:"+Cu+"|"+vh+")",U1="[^"+Su+"]",xh="(?:\\ud83c[\\udde6-\\uddff]){2}",Sh="[\\ud800-\\udbff][\\udc00-\\udfff]",ta="["+F1+"]",K1="\\u200d",Y1="(?:"+W1+"|"+q1+")",kL="(?:"+ta+"|"+q1+")",G1="(?:"+bh+"(?:d|ll|m|re|s|t|ve))?",J1="(?:"+bh+"(?:D|LL|M|RE|S|T|VE))?",Z1=EL+"?",X1="["+B1+"]?",ML="(?:"+K1+"(?:"+[U1,xh,Sh].join("|")+")"+X1+Z1+")*",OL="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",RL="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Q1=X1+Z1+ML,AL="(?:"+[TL,xh,Sh].join("|")+")"+Q1,IL="(?:"+[U1+Cu+"?",Cu,xh,Sh,wL].join("|")+")",DL=RegExp(bh,"g"),PL=RegExp(Cu,"g"),Ch=RegExp(vh+"(?="+vh+")|"+IL+Q1,"g"),_L=RegExp([ta+"?"+W1+"+"+G1+"(?="+[z1,ta,"$"].join("|")+")",kL+"+"+J1+"(?="+[z1,ta+Y1,"$"].join("|")+")",ta+"?"+Y1+"+"+G1,ta+"+"+J1,RL,OL,H1,AL].join("|"),"g"),NL=RegExp("["+K1+Su+L1+B1+"]"),LL=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,jL=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],$L=-1,zt={};zt[Sn]=zt[jn]=zt[ut]=zt[An]=zt[Vt]=zt[de]=zt[Ne]=zt[Ee]=zt[Le]=!0,zt[re]=zt[ue]=zt[tn]=zt[K]=zt[Dt]=zt[Q]=zt[he]=zt[ee]=zt[le]=zt[ge]=zt[xe]=zt[Ve]=zt[Ye]=zt[Ie]=zt[Yt]=!1;var jt={};jt[re]=jt[ue]=jt[tn]=jt[Dt]=jt[K]=jt[Q]=jt[Sn]=jt[jn]=jt[ut]=jt[An]=jt[Vt]=jt[le]=jt[ge]=jt[xe]=jt[Ve]=jt[Ye]=jt[Ie]=jt[it]=jt[de]=jt[Ne]=jt[Ee]=jt[Le]=!0,jt[he]=jt[ee]=jt[Yt]=!1;var FL={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},BL={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},VL={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},zL={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},HL=parseFloat,WL=parseInt,eS=typeof Pi=="object"&&Pi&&Pi.Object===Object&&Pi,qL=typeof self=="object"&&self&&self.Object===Object&&self,In=eS||qL||Function("return this")(),wh=e&&!e.nodeType&&e,rs=wh&&!0&&t&&!t.nodeType&&t,tS=rs&&rs.exports===wh,Th=tS&&eS.process,Or=function(){try{var ne=rs&&rs.require&&rs.require("util").types;return ne||Th&&Th.binding&&Th.binding("util")}catch{}}(),nS=Or&&Or.isArrayBuffer,rS=Or&&Or.isDate,oS=Or&&Or.isMap,iS=Or&&Or.isRegExp,sS=Or&&Or.isSet,aS=Or&&Or.isTypedArray;function gr(ne,ve,ce){switch(ce.length){case 0:return ne.call(ve);case 1:return ne.call(ve,ce[0]);case 2:return ne.call(ve,ce[0],ce[1]);case 3:return ne.call(ve,ce[0],ce[1],ce[2])}return ne.apply(ve,ce)}function UL(ne,ve,ce,$e){for(var tt=-1,St=ne==null?0:ne.length;++tt<St;){var bn=ne[tt];ve($e,bn,ce(bn),ne)}return $e}function Rr(ne,ve){for(var ce=-1,$e=ne==null?0:ne.length;++ce<$e&&ve(ne[ce],ce,ne)!==!1;);return ne}function KL(ne,ve){for(var ce=ne==null?0:ne.length;ce--&&ve(ne[ce],ce,ne)!==!1;);return ne}function lS(ne,ve){for(var ce=-1,$e=ne==null?0:ne.length;++ce<$e;)if(!ve(ne[ce],ce,ne))return!1;return!0}function hi(ne,ve){for(var ce=-1,$e=ne==null?0:ne.length,tt=0,St=[];++ce<$e;){var bn=ne[ce];ve(bn,ce,ne)&&(St[tt++]=bn)}return St}function wu(ne,ve){var ce=ne==null?0:ne.length;return!!ce&&na(ne,ve,0)>-1}function Eh(ne,ve,ce){for(var $e=-1,tt=ne==null?0:ne.length;++$e<tt;)if(ce(ve,ne[$e]))return!0;return!1}function Gt(ne,ve){for(var ce=-1,$e=ne==null?0:ne.length,tt=Array($e);++ce<$e;)tt[ce]=ve(ne[ce],ce,ne);return tt}function mi(ne,ve){for(var ce=-1,$e=ve.length,tt=ne.length;++ce<$e;)ne[tt+ce]=ve[ce];return ne}function kh(ne,ve,ce,$e){var tt=-1,St=ne==null?0:ne.length;for($e&&St&&(ce=ne[++tt]);++tt<St;)ce=ve(ce,ne[tt],tt,ne);return ce}function YL(ne,ve,ce,$e){var tt=ne==null?0:ne.length;for($e&&tt&&(ce=ne[--tt]);tt--;)ce=ve(ce,ne[tt],tt,ne);return ce}function Mh(ne,ve){for(var ce=-1,$e=ne==null?0:ne.length;++ce<$e;)if(ve(ne[ce],ce,ne))return!0;return!1}var GL=Oh("length");function JL(ne){return ne.split("")}function ZL(ne){return ne.match(iL)||[]}function cS(ne,ve,ce){var $e;return ce(ne,function(tt,St,bn){if(ve(tt,St,bn))return $e=St,!1}),$e}function Tu(ne,ve,ce,$e){for(var tt=ne.length,St=ce+($e?1:-1);$e?St--:++St<tt;)if(ve(ne[St],St,ne))return St;return-1}function na(ne,ve,ce){return ve===ve?cj(ne,ve,ce):Tu(ne,uS,ce)}function XL(ne,ve,ce,$e){for(var tt=ce-1,St=ne.length;++tt<St;)if($e(ne[tt],ve))return tt;return-1}function uS(ne){return ne!==ne}function dS(ne,ve){var ce=ne==null?0:ne.length;return ce?Ah(ne,ve)/ce:Y}function Oh(ne){return function(ve){return ve==null?n:ve[ne]}}function Rh(ne){return function(ve){return ne==null?n:ne[ve]}}function fS(ne,ve,ce,$e,tt){return tt(ne,function(St,bn,Pt){ce=$e?($e=!1,St):ve(ce,St,bn,Pt)}),ce}function QL(ne,ve){var ce=ne.length;for(ne.sort(ve);ce--;)ne[ce]=ne[ce].value;return ne}function Ah(ne,ve){for(var ce,$e=-1,tt=ne.length;++$e<tt;){var St=ve(ne[$e]);St!==n&&(ce=ce===n?St:ce+St)}return ce}function Ih(ne,ve){for(var ce=-1,$e=Array(ne);++ce<ne;)$e[ce]=ve(ce);return $e}function ej(ne,ve){return Gt(ve,function(ce){return[ce,ne[ce]]})}function pS(ne){return ne&&ne.slice(0,yS(ne)+1).replace(yh,"")}function yr(ne){return function(ve){return ne(ve)}}function Dh(ne,ve){return Gt(ve,function(ce){return ne[ce]})}function yl(ne,ve){return ne.has(ve)}function hS(ne,ve){for(var ce=-1,$e=ne.length;++ce<$e&&na(ve,ne[ce],0)>-1;);return ce}function mS(ne,ve){for(var ce=ne.length;ce--&&na(ve,ne[ce],0)>-1;);return ce}function tj(ne,ve){for(var ce=ne.length,$e=0;ce--;)ne[ce]===ve&&++$e;return $e}var nj=Rh(FL),rj=Rh(BL);function oj(ne){return"\\"+zL[ne]}function ij(ne,ve){return ne==null?n:ne[ve]}function ra(ne){return NL.test(ne)}function sj(ne){return LL.test(ne)}function aj(ne){for(var ve,ce=[];!(ve=ne.next()).done;)ce.push(ve.value);return ce}function Ph(ne){var ve=-1,ce=Array(ne.size);return ne.forEach(function($e,tt){ce[++ve]=[tt,$e]}),ce}function gS(ne,ve){return function(ce){return ne(ve(ce))}}function gi(ne,ve){for(var ce=-1,$e=ne.length,tt=0,St=[];++ce<$e;){var bn=ne[ce];(bn===ve||bn===f)&&(ne[ce]=f,St[tt++]=ce)}return St}function Eu(ne){var ve=-1,ce=Array(ne.size);return ne.forEach(function($e){ce[++ve]=$e}),ce}function lj(ne){var ve=-1,ce=Array(ne.size);return ne.forEach(function($e){ce[++ve]=[$e,$e]}),ce}function cj(ne,ve,ce){for(var $e=ce-1,tt=ne.length;++$e<tt;)if(ne[$e]===ve)return $e;return-1}function uj(ne,ve,ce){for(var $e=ce+1;$e--;)if(ne[$e]===ve)return $e;return $e}function oa(ne){return ra(ne)?fj(ne):GL(ne)}function Zr(ne){return ra(ne)?pj(ne):JL(ne)}function yS(ne){for(var ve=ne.length;ve--&&tL.test(ne.charAt(ve)););return ve}var dj=Rh(VL);function fj(ne){for(var ve=Ch.lastIndex=0;Ch.test(ne);)++ve;return ve}function pj(ne){return ne.match(Ch)||[]}function hj(ne){return ne.match(_L)||[]}var mj=function ne(ve){ve=ve==null?In:ia.defaults(In.Object(),ve,ia.pick(In,jL));var ce=ve.Array,$e=ve.Date,tt=ve.Error,St=ve.Function,bn=ve.Math,Pt=ve.Object,_h=ve.RegExp,gj=ve.String,Ar=ve.TypeError,ku=ce.prototype,yj=St.prototype,sa=Pt.prototype,Mu=ve["__core-js_shared__"],Ou=yj.toString,Mt=sa.hasOwnProperty,bj=0,bS=function(){var d=/[^.]+$/.exec(Mu&&Mu.keys&&Mu.keys.IE_PROTO||"");return d?"Symbol(src)_1."+d:""}(),Ru=sa.toString,vj=Ou.call(Pt),xj=In._,Sj=_h("^"+Ou.call(Mt).replace(gh,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Au=tS?ve.Buffer:n,yi=ve.Symbol,Iu=ve.Uint8Array,vS=Au?Au.allocUnsafe:n,Du=gS(Pt.getPrototypeOf,Pt),xS=Pt.create,SS=sa.propertyIsEnumerable,Pu=ku.splice,CS=yi?yi.isConcatSpreadable:n,bl=yi?yi.iterator:n,is=yi?yi.toStringTag:n,_u=function(){try{var d=us(Pt,"defineProperty");return d({},"",{}),d}catch{}}(),Cj=ve.clearTimeout!==In.clearTimeout&&ve.clearTimeout,wj=$e&&$e.now!==In.Date.now&&$e.now,Tj=ve.setTimeout!==In.setTimeout&&ve.setTimeout,Nu=bn.ceil,Lu=bn.floor,Nh=Pt.getOwnPropertySymbols,Ej=Au?Au.isBuffer:n,wS=ve.isFinite,kj=ku.join,Mj=gS(Pt.keys,Pt),vn=bn.max,$n=bn.min,Oj=$e.now,Rj=ve.parseInt,TS=bn.random,Aj=ku.reverse,Lh=us(ve,"DataView"),vl=us(ve,"Map"),jh=us(ve,"Promise"),aa=us(ve,"Set"),xl=us(ve,"WeakMap"),Sl=us(Pt,"create"),ju=xl&&new xl,la={},Ij=ds(Lh),Dj=ds(vl),Pj=ds(jh),_j=ds(aa),Nj=ds(xl),$u=yi?yi.prototype:n,Cl=$u?$u.valueOf:n,ES=$u?$u.toString:n;function B(d){if(nn(d)&&!rt(d)&&!(d instanceof pt)){if(d instanceof Ir)return d;if(Mt.call(d,"__wrapped__"))return kC(d)}return new Ir(d)}var ca=function(){function d(){}return function(p){if(!Xt(p))return{};if(xS)return xS(p);d.prototype=p;var x=new d;return d.prototype=n,x}}();function Fu(){}function Ir(d,p){this.__wrapped__=d,this.__actions__=[],this.__chain__=!!p,this.__index__=0,this.__values__=n}B.templateSettings={escape:Qs,evaluate:pi,interpolate:vu,variable:"",imports:{_:B}},B.prototype=Fu.prototype,B.prototype.constructor=B,Ir.prototype=ca(Fu.prototype),Ir.prototype.constructor=Ir;function pt(d){this.__wrapped__=d,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Z,this.__views__=[]}function Lj(){var d=new pt(this.__wrapped__);return d.__actions__=ir(this.__actions__),d.__dir__=this.__dir__,d.__filtered__=this.__filtered__,d.__iteratees__=ir(this.__iteratees__),d.__takeCount__=this.__takeCount__,d.__views__=ir(this.__views__),d}function jj(){if(this.__filtered__){var d=new pt(this);d.__dir__=-1,d.__filtered__=!0}else d=this.clone(),d.__dir__*=-1;return d}function $j(){var d=this.__wrapped__.value(),p=this.__dir__,x=rt(d),k=p<0,D=x?d.length:0,H=J$(0,D,this.__views__),q=H.start,X=H.end,oe=X-q,Se=k?X:q-1,Ce=this.__iteratees__,ke=Ce.length,De=0,ze=$n(oe,this.__takeCount__);if(!x||!k&&D==oe&&ze==oe)return GS(d,this.__actions__);var Ze=[];e:for(;oe--&&De<ze;){Se+=p;for(var st=-1,Xe=d[Se];++st<ke;){var dt=Ce[st],mt=dt.iteratee,xr=dt.type,Jn=mt(Xe);if(xr==$)Xe=Jn;else if(!Jn){if(xr==V)continue e;break e}}Ze[De++]=Xe}return Ze}pt.prototype=ca(Fu.prototype),pt.prototype.constructor=pt;function ss(d){var p=-1,x=d==null?0:d.length;for(this.clear();++p<x;){var k=d[p];this.set(k[0],k[1])}}function Fj(){this.__data__=Sl?Sl(null):{},this.size=0}function Bj(d){var p=this.has(d)&&delete this.__data__[d];return this.size-=p?1:0,p}function Vj(d){var p=this.__data__;if(Sl){var x=p[d];return x===l?n:x}return Mt.call(p,d)?p[d]:n}function zj(d){var p=this.__data__;return Sl?p[d]!==n:Mt.call(p,d)}function Hj(d,p){var x=this.__data__;return this.size+=this.has(d)?0:1,x[d]=Sl&&p===n?l:p,this}ss.prototype.clear=Fj,ss.prototype.delete=Bj,ss.prototype.get=Vj,ss.prototype.has=zj,ss.prototype.set=Hj;function jo(d){var p=-1,x=d==null?0:d.length;for(this.clear();++p<x;){var k=d[p];this.set(k[0],k[1])}}function Wj(){this.__data__=[],this.size=0}function qj(d){var p=this.__data__,x=Bu(p,d);if(x<0)return!1;var k=p.length-1;return x==k?p.pop():Pu.call(p,x,1),--this.size,!0}function Uj(d){var p=this.__data__,x=Bu(p,d);return x<0?n:p[x][1]}function Kj(d){return Bu(this.__data__,d)>-1}function Yj(d,p){var x=this.__data__,k=Bu(x,d);return k<0?(++this.size,x.push([d,p])):x[k][1]=p,this}jo.prototype.clear=Wj,jo.prototype.delete=qj,jo.prototype.get=Uj,jo.prototype.has=Kj,jo.prototype.set=Yj;function $o(d){var p=-1,x=d==null?0:d.length;for(this.clear();++p<x;){var k=d[p];this.set(k[0],k[1])}}function Gj(){this.size=0,this.__data__={hash:new ss,map:new(vl||jo),string:new ss}}function Jj(d){var p=Xu(this,d).delete(d);return this.size-=p?1:0,p}function Zj(d){return Xu(this,d).get(d)}function Xj(d){return Xu(this,d).has(d)}function Qj(d,p){var x=Xu(this,d),k=x.size;return x.set(d,p),this.size+=x.size==k?0:1,this}$o.prototype.clear=Gj,$o.prototype.delete=Jj,$o.prototype.get=Zj,$o.prototype.has=Xj,$o.prototype.set=Qj;function as(d){var p=-1,x=d==null?0:d.length;for(this.__data__=new $o;++p<x;)this.add(d[p])}function e$(d){return this.__data__.set(d,l),this}function t$(d){return this.__data__.has(d)}as.prototype.add=as.prototype.push=e$,as.prototype.has=t$;function Xr(d){var p=this.__data__=new jo(d);this.size=p.size}function n$(){this.__data__=new jo,this.size=0}function r$(d){var p=this.__data__,x=p.delete(d);return this.size=p.size,x}function o$(d){return this.__data__.get(d)}function i$(d){return this.__data__.has(d)}function s$(d,p){var x=this.__data__;if(x instanceof jo){var k=x.__data__;if(!vl||k.length<o-1)return k.push([d,p]),this.size=++x.size,this;x=this.__data__=new $o(k)}return x.set(d,p),this.size=x.size,this}Xr.prototype.clear=n$,Xr.prototype.delete=r$,Xr.prototype.get=o$,Xr.prototype.has=i$,Xr.prototype.set=s$;function kS(d,p){var x=rt(d),k=!x&&fs(d),D=!x&&!k&&Ci(d),H=!x&&!k&&!D&&pa(d),q=x||k||D||H,X=q?Ih(d.length,gj):[],oe=X.length;for(var Se in d)(p||Mt.call(d,Se))&&!(q&&(Se=="length"||D&&(Se=="offset"||Se=="parent")||H&&(Se=="buffer"||Se=="byteLength"||Se=="byteOffset")||zo(Se,oe)))&&X.push(Se);return X}function MS(d){var p=d.length;return p?d[Yh(0,p-1)]:n}function a$(d,p){return Qu(ir(d),ls(p,0,d.length))}function l$(d){return Qu(ir(d))}function $h(d,p,x){(x!==n&&!Qr(d[p],x)||x===n&&!(p in d))&&Fo(d,p,x)}function wl(d,p,x){var k=d[p];(!(Mt.call(d,p)&&Qr(k,x))||x===n&&!(p in d))&&Fo(d,p,x)}function Bu(d,p){for(var x=d.length;x--;)if(Qr(d[x][0],p))return x;return-1}function c$(d,p,x,k){return bi(d,function(D,H,q){p(k,D,x(D),q)}),k}function OS(d,p){return d&&mo(p,Cn(p),d)}function u$(d,p){return d&&mo(p,ar(p),d)}function Fo(d,p,x){p=="__proto__"&&_u?_u(d,p,{configurable:!0,enumerable:!0,value:x,writable:!0}):d[p]=x}function Fh(d,p){for(var x=-1,k=p.length,D=ce(k),H=d==null;++x<k;)D[x]=H?n:vm(d,p[x]);return D}function ls(d,p,x){return d===d&&(x!==n&&(d=d<=x?d:x),p!==n&&(d=d>=p?d:p)),d}function Dr(d,p,x,k,D,H){var q,X=p&h,oe=p&m,Se=p&g;if(x&&(q=D?x(d,k,D,H):x(d)),q!==n)return q;if(!Xt(d))return d;var Ce=rt(d);if(Ce){if(q=X$(d),!X)return ir(d,q)}else{var ke=Fn(d),De=ke==ee||ke==se;if(Ci(d))return XS(d,X);if(ke==xe||ke==re||De&&!D){if(q=oe||De?{}:yC(d),!X)return oe?V$(d,u$(q,d)):B$(d,OS(q,d))}else{if(!jt[ke])return D?d:{};q=Q$(d,ke,X)}}H||(H=new Xr);var ze=H.get(d);if(ze)return ze;H.set(d,q),UC(d)?d.forEach(function(Xe){q.add(Dr(Xe,p,x,Xe,d,H))}):WC(d)&&d.forEach(function(Xe,dt){q.set(dt,Dr(Xe,p,x,dt,d,H))});var Ze=Se?oe?im:om:oe?ar:Cn,st=Ce?n:Ze(d);return Rr(st||d,function(Xe,dt){st&&(dt=Xe,Xe=d[dt]),wl(q,dt,Dr(Xe,p,x,dt,d,H))}),q}function d$(d){var p=Cn(d);return function(x){return RS(x,d,p)}}function RS(d,p,x){var k=x.length;if(d==null)return!k;for(d=Pt(d);k--;){var D=x[k],H=p[D],q=d[D];if(q===n&&!(D in d)||!H(q))return!1}return!0}function AS(d,p,x){if(typeof d!="function")throw new Ar(s);return Al(function(){d.apply(n,x)},p)}function Tl(d,p,x,k){var D=-1,H=wu,q=!0,X=d.length,oe=[],Se=p.length;if(!X)return oe;x&&(p=Gt(p,yr(x))),k?(H=Eh,q=!1):p.length>=o&&(H=yl,q=!1,p=new as(p));e:for(;++D<X;){var Ce=d[D],ke=x==null?Ce:x(Ce);if(Ce=k||Ce!==0?Ce:0,q&&ke===ke){for(var De=Se;De--;)if(p[De]===ke)continue e;oe.push(Ce)}else H(p,ke,k)||oe.push(Ce)}return oe}var bi=rC(ho),IS=rC(Vh,!0);function f$(d,p){var x=!0;return bi(d,function(k,D,H){return x=!!p(k,D,H),x}),x}function Vu(d,p,x){for(var k=-1,D=d.length;++k<D;){var H=d[k],q=p(H);if(q!=null&&(X===n?q===q&&!vr(q):x(q,X)))var X=q,oe=H}return oe}function p$(d,p,x,k){var D=d.length;for(x=ot(x),x<0&&(x=-x>D?0:D+x),k=k===n||k>D?D:ot(k),k<0&&(k+=D),k=x>k?0:YC(k);x<k;)d[x++]=p;return d}function DS(d,p){var x=[];return bi(d,function(k,D,H){p(k,D,H)&&x.push(k)}),x}function Dn(d,p,x,k,D){var H=-1,q=d.length;for(x||(x=tF),D||(D=[]);++H<q;){var X=d[H];p>0&&x(X)?p>1?Dn(X,p-1,x,k,D):mi(D,X):k||(D[D.length]=X)}return D}var Bh=oC(),PS=oC(!0);function ho(d,p){return d&&Bh(d,p,Cn)}function Vh(d,p){return d&&PS(d,p,Cn)}function zu(d,p){return hi(p,function(x){return Ho(d[x])})}function cs(d,p){p=xi(p,d);for(var x=0,k=p.length;d!=null&&x<k;)d=d[go(p[x++])];return x&&x==k?d:n}function _S(d,p,x){var k=p(d);return rt(d)?k:mi(k,x(d))}function Yn(d){return d==null?d===n?vt:we:is&&is in Pt(d)?G$(d):lF(d)}function zh(d,p){return d>p}function h$(d,p){return d!=null&&Mt.call(d,p)}function m$(d,p){return d!=null&&p in Pt(d)}function g$(d,p,x){return d>=$n(p,x)&&d<vn(p,x)}function Hh(d,p,x){for(var k=x?Eh:wu,D=d[0].length,H=d.length,q=H,X=ce(H),oe=1/0,Se=[];q--;){var Ce=d[q];q&&p&&(Ce=Gt(Ce,yr(p))),oe=$n(Ce.length,oe),X[q]=!x&&(p||D>=120&&Ce.length>=120)?new as(q&&Ce):n}Ce=d[0];var ke=-1,De=X[0];e:for(;++ke<D&&Se.length<oe;){var ze=Ce[ke],Ze=p?p(ze):ze;if(ze=x||ze!==0?ze:0,!(De?yl(De,Ze):k(Se,Ze,x))){for(q=H;--q;){var st=X[q];if(!(st?yl(st,Ze):k(d[q],Ze,x)))continue e}De&&De.push(Ze),Se.push(ze)}}return Se}function y$(d,p,x,k){return ho(d,function(D,H,q){p(k,x(D),H,q)}),k}function El(d,p,x){p=xi(p,d),d=SC(d,p);var k=d==null?d:d[go(_r(p))];return k==null?n:gr(k,d,x)}function NS(d){return nn(d)&&Yn(d)==re}function b$(d){return nn(d)&&Yn(d)==tn}function v$(d){return nn(d)&&Yn(d)==Q}function kl(d,p,x,k,D){return d===p?!0:d==null||p==null||!nn(d)&&!nn(p)?d!==d&&p!==p:x$(d,p,x,k,kl,D)}function x$(d,p,x,k,D,H){var q=rt(d),X=rt(p),oe=q?ue:Fn(d),Se=X?ue:Fn(p);oe=oe==re?xe:oe,Se=Se==re?xe:Se;var Ce=oe==xe,ke=Se==xe,De=oe==Se;if(De&&Ci(d)){if(!Ci(p))return!1;q=!0,Ce=!1}if(De&&!Ce)return H||(H=new Xr),q||pa(d)?hC(d,p,x,k,D,H):K$(d,p,oe,x,k,D,H);if(!(x&b)){var ze=Ce&&Mt.call(d,"__wrapped__"),Ze=ke&&Mt.call(p,"__wrapped__");if(ze||Ze){var st=ze?d.value():d,Xe=Ze?p.value():p;return H||(H=new Xr),D(st,Xe,x,k,H)}}return De?(H||(H=new Xr),Y$(d,p,x,k,D,H)):!1}function S$(d){return nn(d)&&Fn(d)==le}function Wh(d,p,x,k){var D=x.length,H=D,q=!k;if(d==null)return!H;for(d=Pt(d);D--;){var X=x[D];if(q&&X[2]?X[1]!==d[X[0]]:!(X[0]in d))return!1}for(;++D<H;){X=x[D];var oe=X[0],Se=d[oe],Ce=X[1];if(q&&X[2]){if(Se===n&&!(oe in d))return!1}else{var ke=new Xr;if(k)var De=k(Se,Ce,oe,d,p,ke);if(!(De===n?kl(Ce,Se,b|y,k,ke):De))return!1}}return!0}function LS(d){if(!Xt(d)||rF(d))return!1;var p=Ho(d)?Sj:dL;return p.test(ds(d))}function C$(d){return nn(d)&&Yn(d)==Ve}function w$(d){return nn(d)&&Fn(d)==Ye}function T$(d){return nn(d)&&id(d.length)&&!!zt[Yn(d)]}function jS(d){return typeof d=="function"?d:d==null?lr:typeof d=="object"?rt(d)?BS(d[0],d[1]):FS(d):iw(d)}function qh(d){if(!Rl(d))return Mj(d);var p=[];for(var x in Pt(d))Mt.call(d,x)&&x!="constructor"&&p.push(x);return p}function E$(d){if(!Xt(d))return aF(d);var p=Rl(d),x=[];for(var k in d)k=="constructor"&&(p||!Mt.call(d,k))||x.push(k);return x}function Uh(d,p){return d<p}function $S(d,p){var x=-1,k=sr(d)?ce(d.length):[];return bi(d,function(D,H,q){k[++x]=p(D,H,q)}),k}function FS(d){var p=am(d);return p.length==1&&p[0][2]?vC(p[0][0],p[0][1]):function(x){return x===d||Wh(x,d,p)}}function BS(d,p){return cm(d)&&bC(p)?vC(go(d),p):function(x){var k=vm(x,d);return k===n&&k===p?xm(x,d):kl(p,k,b|y)}}function Hu(d,p,x,k,D){d!==p&&Bh(p,function(H,q){if(D||(D=new Xr),Xt(H))k$(d,p,q,x,Hu,k,D);else{var X=k?k(dm(d,q),H,q+"",d,p,D):n;X===n&&(X=H),$h(d,q,X)}},ar)}function k$(d,p,x,k,D,H,q){var X=dm(d,x),oe=dm(p,x),Se=q.get(oe);if(Se){$h(d,x,Se);return}var Ce=H?H(X,oe,x+"",d,p,q):n,ke=Ce===n;if(ke){var De=rt(oe),ze=!De&&Ci(oe),Ze=!De&&!ze&&pa(oe);Ce=oe,De||ze||Ze?rt(X)?Ce=X:un(X)?Ce=ir(X):ze?(ke=!1,Ce=XS(oe,!0)):Ze?(ke=!1,Ce=QS(oe,!0)):Ce=[]:Il(oe)||fs(oe)?(Ce=X,fs(X)?Ce=GC(X):(!Xt(X)||Ho(X))&&(Ce=yC(oe))):ke=!1}ke&&(q.set(oe,Ce),D(Ce,oe,k,H,q),q.delete(oe)),$h(d,x,Ce)}function VS(d,p){var x=d.length;if(x)return p+=p<0?x:0,zo(p,x)?d[p]:n}function zS(d,p,x){p.length?p=Gt(p,function(H){return rt(H)?function(q){return cs(q,H.length===1?H[0]:H)}:H}):p=[lr];var k=-1;p=Gt(p,yr(Je()));var D=$S(d,function(H,q,X){var oe=Gt(p,function(Se){return Se(H)});return{criteria:oe,index:++k,value:H}});return QL(D,function(H,q){return F$(H,q,x)})}function M$(d,p){return HS(d,p,function(x,k){return xm(d,k)})}function HS(d,p,x){for(var k=-1,D=p.length,H={};++k<D;){var q=p[k],X=cs(d,q);x(X,q)&&Ml(H,xi(q,d),X)}return H}function O$(d){return function(p){return cs(p,d)}}function Kh(d,p,x,k){var D=k?XL:na,H=-1,q=p.length,X=d;for(d===p&&(p=ir(p)),x&&(X=Gt(d,yr(x)));++H<q;)for(var oe=0,Se=p[H],Ce=x?x(Se):Se;(oe=D(X,Ce,oe,k))>-1;)X!==d&&Pu.call(X,oe,1),Pu.call(d,oe,1);return d}function WS(d,p){for(var x=d?p.length:0,k=x-1;x--;){var D=p[x];if(x==k||D!==H){var H=D;zo(D)?Pu.call(d,D,1):Zh(d,D)}}return d}function Yh(d,p){return d+Lu(TS()*(p-d+1))}function R$(d,p,x,k){for(var D=-1,H=vn(Nu((p-d)/(x||1)),0),q=ce(H);H--;)q[k?H:++D]=d,d+=x;return q}function Gh(d,p){var x="";if(!d||p<1||p>U)return x;do p%2&&(x+=d),p=Lu(p/2),p&&(d+=d);while(p);return x}function ct(d,p){return fm(xC(d,p,lr),d+"")}function A$(d){return MS(ha(d))}function I$(d,p){var x=ha(d);return Qu(x,ls(p,0,x.length))}function Ml(d,p,x,k){if(!Xt(d))return d;p=xi(p,d);for(var D=-1,H=p.length,q=H-1,X=d;X!=null&&++D<H;){var oe=go(p[D]),Se=x;if(oe==="__proto__"||oe==="constructor"||oe==="prototype")return d;if(D!=q){var Ce=X[oe];Se=k?k(Ce,oe,X):n,Se===n&&(Se=Xt(Ce)?Ce:zo(p[D+1])?[]:{})}wl(X,oe,Se),X=X[oe]}return d}var qS=ju?function(d,p){return ju.set(d,p),d}:lr,D$=_u?function(d,p){return _u(d,"toString",{configurable:!0,enumerable:!1,value:Cm(p),writable:!0})}:lr;function P$(d){return Qu(ha(d))}function Pr(d,p,x){var k=-1,D=d.length;p<0&&(p=-p>D?0:D+p),x=x>D?D:x,x<0&&(x+=D),D=p>x?0:x-p>>>0,p>>>=0;for(var H=ce(D);++k<D;)H[k]=d[k+p];return H}function _$(d,p){var x;return bi(d,function(k,D,H){return x=p(k,D,H),!x}),!!x}function Wu(d,p,x){var k=0,D=d==null?k:d.length;if(typeof p=="number"&&p===p&&D<=fe){for(;k<D;){var H=k+D>>>1,q=d[H];q!==null&&!vr(q)&&(x?q<=p:q<p)?k=H+1:D=H}return D}return Jh(d,p,lr,x)}function Jh(d,p,x,k){var D=0,H=d==null?0:d.length;if(H===0)return 0;p=x(p);for(var q=p!==p,X=p===null,oe=vr(p),Se=p===n;D<H;){var Ce=Lu((D+H)/2),ke=x(d[Ce]),De=ke!==n,ze=ke===null,Ze=ke===ke,st=vr(ke);if(q)var Xe=k||Ze;else Se?Xe=Ze&&(k||De):X?Xe=Ze&&De&&(k||!ze):oe?Xe=Ze&&De&&!ze&&(k||!st):ze||st?Xe=!1:Xe=k?ke<=p:ke<p;Xe?D=Ce+1:H=Ce}return $n(H,me)}function US(d,p){for(var x=-1,k=d.length,D=0,H=[];++x<k;){var q=d[x],X=p?p(q):q;if(!x||!Qr(X,oe)){var oe=X;H[D++]=q===0?0:q}}return H}function KS(d){return typeof d=="number"?d:vr(d)?Y:+d}function br(d){if(typeof d=="string")return d;if(rt(d))return Gt(d,br)+"";if(vr(d))return ES?ES.call(d):"";var p=d+"";return p=="0"&&1/d==-W?"-0":p}function vi(d,p,x){var k=-1,D=wu,H=d.length,q=!0,X=[],oe=X;if(x)q=!1,D=Eh;else if(H>=o){var Se=p?null:q$(d);if(Se)return Eu(Se);q=!1,D=yl,oe=new as}else oe=p?[]:X;e:for(;++k<H;){var Ce=d[k],ke=p?p(Ce):Ce;if(Ce=x||Ce!==0?Ce:0,q&&ke===ke){for(var De=oe.length;De--;)if(oe[De]===ke)continue e;p&&oe.push(ke),X.push(Ce)}else D(oe,ke,x)||(oe!==X&&oe.push(ke),X.push(Ce))}return X}function Zh(d,p){return p=xi(p,d),d=SC(d,p),d==null||delete d[go(_r(p))]}function YS(d,p,x,k){return Ml(d,p,x(cs(d,p)),k)}function qu(d,p,x,k){for(var D=d.length,H=k?D:-1;(k?H--:++H<D)&&p(d[H],H,d););return x?Pr(d,k?0:H,k?H+1:D):Pr(d,k?H+1:0,k?D:H)}function GS(d,p){var x=d;return x instanceof pt&&(x=x.value()),kh(p,function(k,D){return D.func.apply(D.thisArg,mi([k],D.args))},x)}function Xh(d,p,x){var k=d.length;if(k<2)return k?vi(d[0]):[];for(var D=-1,H=ce(k);++D<k;)for(var q=d[D],X=-1;++X<k;)X!=D&&(H[D]=Tl(H[D]||q,d[X],p,x));return vi(Dn(H,1),p,x)}function JS(d,p,x){for(var k=-1,D=d.length,H=p.length,q={};++k<D;){var X=k<H?p[k]:n;x(q,d[k],X)}return q}function Qh(d){return un(d)?d:[]}function em(d){return typeof d=="function"?d:lr}function xi(d,p){return rt(d)?d:cm(d,p)?[d]:EC(wt(d))}var N$=ct;function Si(d,p,x){var k=d.length;return x=x===n?k:x,!p&&x>=k?d:Pr(d,p,x)}var ZS=Cj||function(d){return In.clearTimeout(d)};function XS(d,p){if(p)return d.slice();var x=d.length,k=vS?vS(x):new d.constructor(x);return d.copy(k),k}function tm(d){var p=new d.constructor(d.byteLength);return new Iu(p).set(new Iu(d)),p}function L$(d,p){var x=p?tm(d.buffer):d.buffer;return new d.constructor(x,d.byteOffset,d.byteLength)}function j$(d){var p=new d.constructor(d.source,N1.exec(d));return p.lastIndex=d.lastIndex,p}function $$(d){return Cl?Pt(Cl.call(d)):{}}function QS(d,p){var x=p?tm(d.buffer):d.buffer;return new d.constructor(x,d.byteOffset,d.length)}function eC(d,p){if(d!==p){var x=d!==n,k=d===null,D=d===d,H=vr(d),q=p!==n,X=p===null,oe=p===p,Se=vr(p);if(!X&&!Se&&!H&&d>p||H&&q&&oe&&!X&&!Se||k&&q&&oe||!x&&oe||!D)return 1;if(!k&&!H&&!Se&&d<p||Se&&x&&D&&!k&&!H||X&&x&&D||!q&&D||!oe)return-1}return 0}function F$(d,p,x){for(var k=-1,D=d.criteria,H=p.criteria,q=D.length,X=x.length;++k<q;){var oe=eC(D[k],H[k]);if(oe){if(k>=X)return oe;var Se=x[k];return oe*(Se=="desc"?-1:1)}}return d.index-p.index}function tC(d,p,x,k){for(var D=-1,H=d.length,q=x.length,X=-1,oe=p.length,Se=vn(H-q,0),Ce=ce(oe+Se),ke=!k;++X<oe;)Ce[X]=p[X];for(;++D<q;)(ke||D<H)&&(Ce[x[D]]=d[D]);for(;Se--;)Ce[X++]=d[D++];return Ce}function nC(d,p,x,k){for(var D=-1,H=d.length,q=-1,X=x.length,oe=-1,Se=p.length,Ce=vn(H-X,0),ke=ce(Ce+Se),De=!k;++D<Ce;)ke[D]=d[D];for(var ze=D;++oe<Se;)ke[ze+oe]=p[oe];for(;++q<X;)(De||D<H)&&(ke[ze+x[q]]=d[D++]);return ke}function ir(d,p){var x=-1,k=d.length;for(p||(p=ce(k));++x<k;)p[x]=d[x];return p}function mo(d,p,x,k){var D=!x;x||(x={});for(var H=-1,q=p.length;++H<q;){var X=p[H],oe=k?k(x[X],d[X],X,x,d):n;oe===n&&(oe=d[X]),D?Fo(x,X,oe):wl(x,X,oe)}return x}function B$(d,p){return mo(d,lm(d),p)}function V$(d,p){return mo(d,mC(d),p)}function Uu(d,p){return function(x,k){var D=rt(x)?UL:c$,H=p?p():{};return D(x,d,Je(k,2),H)}}function ua(d){return ct(function(p,x){var k=-1,D=x.length,H=D>1?x[D-1]:n,q=D>2?x[2]:n;for(H=d.length>3&&typeof H=="function"?(D--,H):n,q&&Gn(x[0],x[1],q)&&(H=D<3?n:H,D=1),p=Pt(p);++k<D;){var X=x[k];X&&d(p,X,k,H)}return p})}function rC(d,p){return function(x,k){if(x==null)return x;if(!sr(x))return d(x,k);for(var D=x.length,H=p?D:-1,q=Pt(x);(p?H--:++H<D)&&k(q[H],H,q)!==!1;);return x}}function oC(d){return function(p,x,k){for(var D=-1,H=Pt(p),q=k(p),X=q.length;X--;){var oe=q[d?X:++D];if(x(H[oe],oe,H)===!1)break}return p}}function z$(d,p,x){var k=p&S,D=Ol(d);function H(){var q=this&&this!==In&&this instanceof H?D:d;return q.apply(k?x:this,arguments)}return H}function iC(d){return function(p){p=wt(p);var x=ra(p)?Zr(p):n,k=x?x[0]:p.charAt(0),D=x?Si(x,1).join(""):p.slice(1);return k[d]()+D}}function da(d){return function(p){return kh(rw(nw(p).replace(DL,"")),d,"")}}function Ol(d){return function(){var p=arguments;switch(p.length){case 0:return new d;case 1:return new d(p[0]);case 2:return new d(p[0],p[1]);case 3:return new d(p[0],p[1],p[2]);case 4:return new d(p[0],p[1],p[2],p[3]);case 5:return new d(p[0],p[1],p[2],p[3],p[4]);case 6:return new d(p[0],p[1],p[2],p[3],p[4],p[5]);case 7:return new d(p[0],p[1],p[2],p[3],p[4],p[5],p[6])}var x=ca(d.prototype),k=d.apply(x,p);return Xt(k)?k:x}}function H$(d,p,x){var k=Ol(d);function D(){for(var H=arguments.length,q=ce(H),X=H,oe=fa(D);X--;)q[X]=arguments[X];var Se=H<3&&q[0]!==oe&&q[H-1]!==oe?[]:gi(q,oe);if(H-=Se.length,H<x)return uC(d,p,Ku,D.placeholder,n,q,Se,n,n,x-H);var Ce=this&&this!==In&&this instanceof D?k:d;return gr(Ce,this,q)}return D}function sC(d){return function(p,x,k){var D=Pt(p);if(!sr(p)){var H=Je(x,3);p=Cn(p),x=function(X){return H(D[X],X,D)}}var q=d(p,x,k);return q>-1?D[H?p[q]:q]:n}}function aC(d){return Vo(function(p){var x=p.length,k=x,D=Ir.prototype.thru;for(d&&p.reverse();k--;){var H=p[k];if(typeof H!="function")throw new Ar(s);if(D&&!q&&Zu(H)=="wrapper")var q=new Ir([],!0)}for(k=q?k:x;++k<x;){H=p[k];var X=Zu(H),oe=X=="wrapper"?sm(H):n;oe&&um(oe[0])&&oe[1]==(_|T|M|I)&&!oe[4].length&&oe[9]==1?q=q[Zu(oe[0])].apply(q,oe[3]):q=H.length==1&&um(H)?q[X]():q.thru(H)}return function(){var Se=arguments,Ce=Se[0];if(q&&Se.length==1&&rt(Ce))return q.plant(Ce).value();for(var ke=0,De=x?p[ke].apply(this,Se):Ce;++ke<x;)De=p[ke].call(this,De);return De}})}function Ku(d,p,x,k,D,H,q,X,oe,Se){var Ce=p&_,ke=p&S,De=p&C,ze=p&(T|w),Ze=p&N,st=De?n:Ol(d);function Xe(){for(var dt=arguments.length,mt=ce(dt),xr=dt;xr--;)mt[xr]=arguments[xr];if(ze)var Jn=fa(Xe),Sr=tj(mt,Jn);if(k&&(mt=tC(mt,k,D,ze)),H&&(mt=nC(mt,H,q,ze)),dt-=Sr,ze&&dt<Se){var dn=gi(mt,Jn);return uC(d,p,Ku,Xe.placeholder,x,mt,dn,X,oe,Se-dt)}var eo=ke?x:this,qo=De?eo[d]:d;return dt=mt.length,X?mt=cF(mt,X):Ze&&dt>1&&mt.reverse(),Ce&&oe<dt&&(mt.length=oe),this&&this!==In&&this instanceof Xe&&(qo=st||Ol(qo)),qo.apply(eo,mt)}return Xe}function lC(d,p){return function(x,k){return y$(x,d,p(k),{})}}function Yu(d,p){return function(x,k){var D;if(x===n&&k===n)return p;if(x!==n&&(D=x),k!==n){if(D===n)return k;typeof x=="string"||typeof k=="string"?(x=br(x),k=br(k)):(x=KS(x),k=KS(k)),D=d(x,k)}return D}}function nm(d){return Vo(function(p){return p=Gt(p,yr(Je())),ct(function(x){var k=this;return d(p,function(D){return gr(D,k,x)})})})}function Gu(d,p){p=p===n?" ":br(p);var x=p.length;if(x<2)return x?Gh(p,d):p;var k=Gh(p,Nu(d/oa(p)));return ra(p)?Si(Zr(k),0,d).join(""):k.slice(0,d)}function W$(d,p,x,k){var D=p&S,H=Ol(d);function q(){for(var X=-1,oe=arguments.length,Se=-1,Ce=k.length,ke=ce(Ce+oe),De=this&&this!==In&&this instanceof q?H:d;++Se<Ce;)ke[Se]=k[Se];for(;oe--;)ke[Se++]=arguments[++X];return gr(De,D?x:this,ke)}return q}function cC(d){return function(p,x,k){return k&&typeof k!="number"&&Gn(p,x,k)&&(x=k=n),p=Wo(p),x===n?(x=p,p=0):x=Wo(x),k=k===n?p<x?1:-1:Wo(k),R$(p,x,k,d)}}function Ju(d){return function(p,x){return typeof p=="string"&&typeof x=="string"||(p=Nr(p),x=Nr(x)),d(p,x)}}function uC(d,p,x,k,D,H,q,X,oe,Se){var Ce=p&T,ke=Ce?q:n,De=Ce?n:q,ze=Ce?H:n,Ze=Ce?n:H;p|=Ce?M:R,p&=~(Ce?R:M),p&E||(p&=~(S|C));var st=[d,p,D,ze,ke,Ze,De,X,oe,Se],Xe=x.apply(n,st);return um(d)&&CC(Xe,st),Xe.placeholder=k,wC(Xe,d,p)}function rm(d){var p=bn[d];return function(x,k){if(x=Nr(x),k=k==null?0:$n(ot(k),292),k&&wS(x)){var D=(wt(x)+"e").split("e"),H=p(D[0]+"e"+(+D[1]+k));return D=(wt(H)+"e").split("e"),+(D[0]+"e"+(+D[1]-k))}return p(x)}}var q$=aa&&1/Eu(new aa([,-0]))[1]==W?function(d){return new aa(d)}:Em;function dC(d){return function(p){var x=Fn(p);return x==le?Ph(p):x==Ye?lj(p):ej(p,d(p))}}function Bo(d,p,x,k,D,H,q,X){var oe=p&C;if(!oe&&typeof d!="function")throw new Ar(s);var Se=k?k.length:0;if(Se||(p&=~(M|R),k=D=n),q=q===n?q:vn(ot(q),0),X=X===n?X:ot(X),Se-=D?D.length:0,p&R){var Ce=k,ke=D;k=D=n}var De=oe?n:sm(d),ze=[d,p,x,k,D,Ce,ke,H,q,X];if(De&&sF(ze,De),d=ze[0],p=ze[1],x=ze[2],k=ze[3],D=ze[4],X=ze[9]=ze[9]===n?oe?0:d.length:vn(ze[9]-Se,0),!X&&p&(T|w)&&(p&=~(T|w)),!p||p==S)var Ze=z$(d,p,x);else p==T||p==w?Ze=H$(d,p,X):(p==M||p==(S|M))&&!D.length?Ze=W$(d,p,x,k):Ze=Ku.apply(n,ze);var st=De?qS:CC;return wC(st(Ze,ze),d,p)}function fC(d,p,x,k){return d===n||Qr(d,sa[x])&&!Mt.call(k,x)?p:d}function pC(d,p,x,k,D,H){return Xt(d)&&Xt(p)&&(H.set(p,d),Hu(d,p,n,pC,H),H.delete(p)),d}function U$(d){return Il(d)?n:d}function hC(d,p,x,k,D,H){var q=x&b,X=d.length,oe=p.length;if(X!=oe&&!(q&&oe>X))return!1;var Se=H.get(d),Ce=H.get(p);if(Se&&Ce)return Se==p&&Ce==d;var ke=-1,De=!0,ze=x&y?new as:n;for(H.set(d,p),H.set(p,d);++ke<X;){var Ze=d[ke],st=p[ke];if(k)var Xe=q?k(st,Ze,ke,p,d,H):k(Ze,st,ke,d,p,H);if(Xe!==n){if(Xe)continue;De=!1;break}if(ze){if(!Mh(p,function(dt,mt){if(!yl(ze,mt)&&(Ze===dt||D(Ze,dt,x,k,H)))return ze.push(mt)})){De=!1;break}}else if(!(Ze===st||D(Ze,st,x,k,H))){De=!1;break}}return H.delete(d),H.delete(p),De}function K$(d,p,x,k,D,H,q){switch(x){case Dt:if(d.byteLength!=p.byteLength||d.byteOffset!=p.byteOffset)return!1;d=d.buffer,p=p.buffer;case tn:return!(d.byteLength!=p.byteLength||!H(new Iu(d),new Iu(p)));case K:case Q:case ge:return Qr(+d,+p);case he:return d.name==p.name&&d.message==p.message;case Ve:case Ie:return d==p+"";case le:var X=Ph;case Ye:var oe=k&b;if(X||(X=Eu),d.size!=p.size&&!oe)return!1;var Se=q.get(d);if(Se)return Se==p;k|=y,q.set(d,p);var Ce=hC(X(d),X(p),k,D,H,q);return q.delete(d),Ce;case it:if(Cl)return Cl.call(d)==Cl.call(p)}return!1}function Y$(d,p,x,k,D,H){var q=x&b,X=om(d),oe=X.length,Se=om(p),Ce=Se.length;if(oe!=Ce&&!q)return!1;for(var ke=oe;ke--;){var De=X[ke];if(!(q?De in p:Mt.call(p,De)))return!1}var ze=H.get(d),Ze=H.get(p);if(ze&&Ze)return ze==p&&Ze==d;var st=!0;H.set(d,p),H.set(p,d);for(var Xe=q;++ke<oe;){De=X[ke];var dt=d[De],mt=p[De];if(k)var xr=q?k(mt,dt,De,p,d,H):k(dt,mt,De,d,p,H);if(!(xr===n?dt===mt||D(dt,mt,x,k,H):xr)){st=!1;break}Xe||(Xe=De=="constructor")}if(st&&!Xe){var Jn=d.constructor,Sr=p.constructor;Jn!=Sr&&"constructor"in d&&"constructor"in p&&!(typeof Jn=="function"&&Jn instanceof Jn&&typeof Sr=="function"&&Sr instanceof Sr)&&(st=!1)}return H.delete(d),H.delete(p),st}function Vo(d){return fm(xC(d,n,RC),d+"")}function om(d){return _S(d,Cn,lm)}function im(d){return _S(d,ar,mC)}var sm=ju?function(d){return ju.get(d)}:Em;function Zu(d){for(var p=d.name+"",x=la[p],k=Mt.call(la,p)?x.length:0;k--;){var D=x[k],H=D.func;if(H==null||H==d)return D.name}return p}function fa(d){var p=Mt.call(B,"placeholder")?B:d;return p.placeholder}function Je(){var d=B.iteratee||wm;return d=d===wm?jS:d,arguments.length?d(arguments[0],arguments[1]):d}function Xu(d,p){var x=d.__data__;return nF(p)?x[typeof p=="string"?"string":"hash"]:x.map}function am(d){for(var p=Cn(d),x=p.length;x--;){var k=p[x],D=d[k];p[x]=[k,D,bC(D)]}return p}function us(d,p){var x=ij(d,p);return LS(x)?x:n}function G$(d){var p=Mt.call(d,is),x=d[is];try{d[is]=n;var k=!0}catch{}var D=Ru.call(d);return k&&(p?d[is]=x:delete d[is]),D}var lm=Nh?function(d){return d==null?[]:(d=Pt(d),hi(Nh(d),function(p){return SS.call(d,p)}))}:km,mC=Nh?function(d){for(var p=[];d;)mi(p,lm(d)),d=Du(d);return p}:km,Fn=Yn;(Lh&&Fn(new Lh(new ArrayBuffer(1)))!=Dt||vl&&Fn(new vl)!=le||jh&&Fn(jh.resolve())!=Me||aa&&Fn(new aa)!=Ye||xl&&Fn(new xl)!=Yt)&&(Fn=function(d){var p=Yn(d),x=p==xe?d.constructor:n,k=x?ds(x):"";if(k)switch(k){case Ij:return Dt;case Dj:return le;case Pj:return Me;case _j:return Ye;case Nj:return Yt}return p});function J$(d,p,x){for(var k=-1,D=x.length;++k<D;){var H=x[k],q=H.size;switch(H.type){case"drop":d+=q;break;case"dropRight":p-=q;break;case"take":p=$n(p,d+q);break;case"takeRight":d=vn(d,p-q);break}}return{start:d,end:p}}function Z$(d){var p=d.match(rL);return p?p[1].split(oL):[]}function gC(d,p,x){p=xi(p,d);for(var k=-1,D=p.length,H=!1;++k<D;){var q=go(p[k]);if(!(H=d!=null&&x(d,q)))break;d=d[q]}return H||++k!=D?H:(D=d==null?0:d.length,!!D&&id(D)&&zo(q,D)&&(rt(d)||fs(d)))}function X$(d){var p=d.length,x=new d.constructor(p);return p&&typeof d[0]=="string"&&Mt.call(d,"index")&&(x.index=d.index,x.input=d.input),x}function yC(d){return typeof d.constructor=="function"&&!Rl(d)?ca(Du(d)):{}}function Q$(d,p,x){var k=d.constructor;switch(p){case tn:return tm(d);case K:case Q:return new k(+d);case Dt:return L$(d,x);case Sn:case jn:case ut:case An:case Vt:case de:case Ne:case Ee:case Le:return QS(d,x);case le:return new k;case ge:case Ie:return new k(d);case Ve:return j$(d);case Ye:return new k;case it:return $$(d)}}function eF(d,p){var x=p.length;if(!x)return d;var k=x-1;return p[k]=(x>1?"& ":"")+p[k],p=p.join(x>2?", ":" "),d.replace(nL,`{
86
+ /* [wrapped with `+p+`] */
87
+ `)}function tF(d){return rt(d)||fs(d)||!!(CS&&d&&d[CS])}function zo(d,p){var x=typeof d;return p=p??U,!!p&&(x=="number"||x!="symbol"&&pL.test(d))&&d>-1&&d%1==0&&d<p}function Gn(d,p,x){if(!Xt(x))return!1;var k=typeof p;return(k=="number"?sr(x)&&zo(p,x.length):k=="string"&&p in x)?Qr(x[p],d):!1}function cm(d,p){if(rt(d))return!1;var x=typeof d;return x=="number"||x=="symbol"||x=="boolean"||d==null||vr(d)?!0:ea.test(d)||!gl.test(d)||p!=null&&d in Pt(p)}function nF(d){var p=typeof d;return p=="string"||p=="number"||p=="symbol"||p=="boolean"?d!=="__proto__":d===null}function um(d){var p=Zu(d),x=B[p];if(typeof x!="function"||!(p in pt.prototype))return!1;if(d===x)return!0;var k=sm(x);return!!k&&d===k[0]}function rF(d){return!!bS&&bS in d}var oF=Mu?Ho:Mm;function Rl(d){var p=d&&d.constructor,x=typeof p=="function"&&p.prototype||sa;return d===x}function bC(d){return d===d&&!Xt(d)}function vC(d,p){return function(x){return x==null?!1:x[d]===p&&(p!==n||d in Pt(x))}}function iF(d){var p=rd(d,function(k){return x.size===u&&x.clear(),k}),x=p.cache;return p}function sF(d,p){var x=d[1],k=p[1],D=x|k,H=D<(S|C|_),q=k==_&&x==T||k==_&&x==I&&d[7].length<=p[8]||k==(_|I)&&p[7].length<=p[8]&&x==T;if(!(H||q))return d;k&S&&(d[2]=p[2],D|=x&S?0:E);var X=p[3];if(X){var oe=d[3];d[3]=oe?tC(oe,X,p[4]):X,d[4]=oe?gi(d[3],f):p[4]}return X=p[5],X&&(oe=d[5],d[5]=oe?nC(oe,X,p[6]):X,d[6]=oe?gi(d[5],f):p[6]),X=p[7],X&&(d[7]=X),k&_&&(d[8]=d[8]==null?p[8]:$n(d[8],p[8])),d[9]==null&&(d[9]=p[9]),d[0]=p[0],d[1]=D,d}function aF(d){var p=[];if(d!=null)for(var x in Pt(d))p.push(x);return p}function lF(d){return Ru.call(d)}function xC(d,p,x){return p=vn(p===n?d.length-1:p,0),function(){for(var k=arguments,D=-1,H=vn(k.length-p,0),q=ce(H);++D<H;)q[D]=k[p+D];D=-1;for(var X=ce(p+1);++D<p;)X[D]=k[D];return X[p]=x(q),gr(d,this,X)}}function SC(d,p){return p.length<2?d:cs(d,Pr(p,0,-1))}function cF(d,p){for(var x=d.length,k=$n(p.length,x),D=ir(d);k--;){var H=p[k];d[k]=zo(H,x)?D[H]:n}return d}function dm(d,p){if(!(p==="constructor"&&typeof d[p]=="function")&&p!="__proto__")return d[p]}var CC=TC(qS),Al=Tj||function(d,p){return In.setTimeout(d,p)},fm=TC(D$);function wC(d,p,x){var k=p+"";return fm(d,eF(k,uF(Z$(k),x)))}function TC(d){var p=0,x=0;return function(){var k=Oj(),D=z-(k-x);if(x=k,D>0){if(++p>=L)return arguments[0]}else p=0;return d.apply(n,arguments)}}function Qu(d,p){var x=-1,k=d.length,D=k-1;for(p=p===n?k:p;++x<p;){var H=Yh(x,D),q=d[H];d[H]=d[x],d[x]=q}return d.length=p,d}var EC=iF(function(d){var p=[];return d.charCodeAt(0)===46&&p.push(""),d.replace(QN,function(x,k,D,H){p.push(D?H.replace(aL,"$1"):k||x)}),p});function go(d){if(typeof d=="string"||vr(d))return d;var p=d+"";return p=="0"&&1/d==-W?"-0":p}function ds(d){if(d!=null){try{return Ou.call(d)}catch{}try{return d+""}catch{}}return""}function uF(d,p){return Rr(pe,function(x){var k="_."+x[0];p&x[1]&&!wu(d,k)&&d.push(k)}),d.sort()}function kC(d){if(d instanceof pt)return d.clone();var p=new Ir(d.__wrapped__,d.__chain__);return p.__actions__=ir(d.__actions__),p.__index__=d.__index__,p.__values__=d.__values__,p}function dF(d,p,x){(x?Gn(d,p,x):p===n)?p=1:p=vn(ot(p),0);var k=d==null?0:d.length;if(!k||p<1)return[];for(var D=0,H=0,q=ce(Nu(k/p));D<k;)q[H++]=Pr(d,D,D+=p);return q}function fF(d){for(var p=-1,x=d==null?0:d.length,k=0,D=[];++p<x;){var H=d[p];H&&(D[k++]=H)}return D}function pF(){var d=arguments.length;if(!d)return[];for(var p=ce(d-1),x=arguments[0],k=d;k--;)p[k-1]=arguments[k];return mi(rt(x)?ir(x):[x],Dn(p,1))}var hF=ct(function(d,p){return un(d)?Tl(d,Dn(p,1,un,!0)):[]}),mF=ct(function(d,p){var x=_r(p);return un(x)&&(x=n),un(d)?Tl(d,Dn(p,1,un,!0),Je(x,2)):[]}),gF=ct(function(d,p){var x=_r(p);return un(x)&&(x=n),un(d)?Tl(d,Dn(p,1,un,!0),n,x):[]});function yF(d,p,x){var k=d==null?0:d.length;return k?(p=x||p===n?1:ot(p),Pr(d,p<0?0:p,k)):[]}function bF(d,p,x){var k=d==null?0:d.length;return k?(p=x||p===n?1:ot(p),p=k-p,Pr(d,0,p<0?0:p)):[]}function vF(d,p){return d&&d.length?qu(d,Je(p,3),!0,!0):[]}function xF(d,p){return d&&d.length?qu(d,Je(p,3),!0):[]}function SF(d,p,x,k){var D=d==null?0:d.length;return D?(x&&typeof x!="number"&&Gn(d,p,x)&&(x=0,k=D),p$(d,p,x,k)):[]}function MC(d,p,x){var k=d==null?0:d.length;if(!k)return-1;var D=x==null?0:ot(x);return D<0&&(D=vn(k+D,0)),Tu(d,Je(p,3),D)}function OC(d,p,x){var k=d==null?0:d.length;if(!k)return-1;var D=k-1;return x!==n&&(D=ot(x),D=x<0?vn(k+D,0):$n(D,k-1)),Tu(d,Je(p,3),D,!0)}function RC(d){var p=d==null?0:d.length;return p?Dn(d,1):[]}function CF(d){var p=d==null?0:d.length;return p?Dn(d,W):[]}function wF(d,p){var x=d==null?0:d.length;return x?(p=p===n?1:ot(p),Dn(d,p)):[]}function TF(d){for(var p=-1,x=d==null?0:d.length,k={};++p<x;){var D=d[p];k[D[0]]=D[1]}return k}function AC(d){return d&&d.length?d[0]:n}function EF(d,p,x){var k=d==null?0:d.length;if(!k)return-1;var D=x==null?0:ot(x);return D<0&&(D=vn(k+D,0)),na(d,p,D)}function kF(d){var p=d==null?0:d.length;return p?Pr(d,0,-1):[]}var MF=ct(function(d){var p=Gt(d,Qh);return p.length&&p[0]===d[0]?Hh(p):[]}),OF=ct(function(d){var p=_r(d),x=Gt(d,Qh);return p===_r(x)?p=n:x.pop(),x.length&&x[0]===d[0]?Hh(x,Je(p,2)):[]}),RF=ct(function(d){var p=_r(d),x=Gt(d,Qh);return p=typeof p=="function"?p:n,p&&x.pop(),x.length&&x[0]===d[0]?Hh(x,n,p):[]});function AF(d,p){return d==null?"":kj.call(d,p)}function _r(d){var p=d==null?0:d.length;return p?d[p-1]:n}function IF(d,p,x){var k=d==null?0:d.length;if(!k)return-1;var D=k;return x!==n&&(D=ot(x),D=D<0?vn(k+D,0):$n(D,k-1)),p===p?uj(d,p,D):Tu(d,uS,D,!0)}function DF(d,p){return d&&d.length?VS(d,ot(p)):n}var PF=ct(IC);function IC(d,p){return d&&d.length&&p&&p.length?Kh(d,p):d}function _F(d,p,x){return d&&d.length&&p&&p.length?Kh(d,p,Je(x,2)):d}function NF(d,p,x){return d&&d.length&&p&&p.length?Kh(d,p,n,x):d}var LF=Vo(function(d,p){var x=d==null?0:d.length,k=Fh(d,p);return WS(d,Gt(p,function(D){return zo(D,x)?+D:D}).sort(eC)),k});function jF(d,p){var x=[];if(!(d&&d.length))return x;var k=-1,D=[],H=d.length;for(p=Je(p,3);++k<H;){var q=d[k];p(q,k,d)&&(x.push(q),D.push(k))}return WS(d,D),x}function pm(d){return d==null?d:Aj.call(d)}function $F(d,p,x){var k=d==null?0:d.length;return k?(x&&typeof x!="number"&&Gn(d,p,x)?(p=0,x=k):(p=p==null?0:ot(p),x=x===n?k:ot(x)),Pr(d,p,x)):[]}function FF(d,p){return Wu(d,p)}function BF(d,p,x){return Jh(d,p,Je(x,2))}function VF(d,p){var x=d==null?0:d.length;if(x){var k=Wu(d,p);if(k<x&&Qr(d[k],p))return k}return-1}function zF(d,p){return Wu(d,p,!0)}function HF(d,p,x){return Jh(d,p,Je(x,2),!0)}function WF(d,p){var x=d==null?0:d.length;if(x){var k=Wu(d,p,!0)-1;if(Qr(d[k],p))return k}return-1}function qF(d){return d&&d.length?US(d):[]}function UF(d,p){return d&&d.length?US(d,Je(p,2)):[]}function KF(d){var p=d==null?0:d.length;return p?Pr(d,1,p):[]}function YF(d,p,x){return d&&d.length?(p=x||p===n?1:ot(p),Pr(d,0,p<0?0:p)):[]}function GF(d,p,x){var k=d==null?0:d.length;return k?(p=x||p===n?1:ot(p),p=k-p,Pr(d,p<0?0:p,k)):[]}function JF(d,p){return d&&d.length?qu(d,Je(p,3),!1,!0):[]}function ZF(d,p){return d&&d.length?qu(d,Je(p,3)):[]}var XF=ct(function(d){return vi(Dn(d,1,un,!0))}),QF=ct(function(d){var p=_r(d);return un(p)&&(p=n),vi(Dn(d,1,un,!0),Je(p,2))}),eB=ct(function(d){var p=_r(d);return p=typeof p=="function"?p:n,vi(Dn(d,1,un,!0),n,p)});function tB(d){return d&&d.length?vi(d):[]}function nB(d,p){return d&&d.length?vi(d,Je(p,2)):[]}function rB(d,p){return p=typeof p=="function"?p:n,d&&d.length?vi(d,n,p):[]}function hm(d){if(!(d&&d.length))return[];var p=0;return d=hi(d,function(x){if(un(x))return p=vn(x.length,p),!0}),Ih(p,function(x){return Gt(d,Oh(x))})}function DC(d,p){if(!(d&&d.length))return[];var x=hm(d);return p==null?x:Gt(x,function(k){return gr(p,n,k)})}var oB=ct(function(d,p){return un(d)?Tl(d,p):[]}),iB=ct(function(d){return Xh(hi(d,un))}),sB=ct(function(d){var p=_r(d);return un(p)&&(p=n),Xh(hi(d,un),Je(p,2))}),aB=ct(function(d){var p=_r(d);return p=typeof p=="function"?p:n,Xh(hi(d,un),n,p)}),lB=ct(hm);function cB(d,p){return JS(d||[],p||[],wl)}function uB(d,p){return JS(d||[],p||[],Ml)}var dB=ct(function(d){var p=d.length,x=p>1?d[p-1]:n;return x=typeof x=="function"?(d.pop(),x):n,DC(d,x)});function PC(d){var p=B(d);return p.__chain__=!0,p}function fB(d,p){return p(d),d}function ed(d,p){return p(d)}var pB=Vo(function(d){var p=d.length,x=p?d[0]:0,k=this.__wrapped__,D=function(H){return Fh(H,d)};return p>1||this.__actions__.length||!(k instanceof pt)||!zo(x)?this.thru(D):(k=k.slice(x,+x+(p?1:0)),k.__actions__.push({func:ed,args:[D],thisArg:n}),new Ir(k,this.__chain__).thru(function(H){return p&&!H.length&&H.push(n),H}))});function hB(){return PC(this)}function mB(){return new Ir(this.value(),this.__chain__)}function gB(){this.__values__===n&&(this.__values__=KC(this.value()));var d=this.__index__>=this.__values__.length,p=d?n:this.__values__[this.__index__++];return{done:d,value:p}}function yB(){return this}function bB(d){for(var p,x=this;x instanceof Fu;){var k=kC(x);k.__index__=0,k.__values__=n,p?D.__wrapped__=k:p=k;var D=k;x=x.__wrapped__}return D.__wrapped__=d,p}function vB(){var d=this.__wrapped__;if(d instanceof pt){var p=d;return this.__actions__.length&&(p=new pt(this)),p=p.reverse(),p.__actions__.push({func:ed,args:[pm],thisArg:n}),new Ir(p,this.__chain__)}return this.thru(pm)}function xB(){return GS(this.__wrapped__,this.__actions__)}var SB=Uu(function(d,p,x){Mt.call(d,x)?++d[x]:Fo(d,x,1)});function CB(d,p,x){var k=rt(d)?lS:f$;return x&&Gn(d,p,x)&&(p=n),k(d,Je(p,3))}function wB(d,p){var x=rt(d)?hi:DS;return x(d,Je(p,3))}var TB=sC(MC),EB=sC(OC);function kB(d,p){return Dn(td(d,p),1)}function MB(d,p){return Dn(td(d,p),W)}function OB(d,p,x){return x=x===n?1:ot(x),Dn(td(d,p),x)}function _C(d,p){var x=rt(d)?Rr:bi;return x(d,Je(p,3))}function NC(d,p){var x=rt(d)?KL:IS;return x(d,Je(p,3))}var RB=Uu(function(d,p,x){Mt.call(d,x)?d[x].push(p):Fo(d,x,[p])});function AB(d,p,x,k){d=sr(d)?d:ha(d),x=x&&!k?ot(x):0;var D=d.length;return x<0&&(x=vn(D+x,0)),sd(d)?x<=D&&d.indexOf(p,x)>-1:!!D&&na(d,p,x)>-1}var IB=ct(function(d,p,x){var k=-1,D=typeof p=="function",H=sr(d)?ce(d.length):[];return bi(d,function(q){H[++k]=D?gr(p,q,x):El(q,p,x)}),H}),DB=Uu(function(d,p,x){Fo(d,x,p)});function td(d,p){var x=rt(d)?Gt:$S;return x(d,Je(p,3))}function PB(d,p,x,k){return d==null?[]:(rt(p)||(p=p==null?[]:[p]),x=k?n:x,rt(x)||(x=x==null?[]:[x]),zS(d,p,x))}var _B=Uu(function(d,p,x){d[x?0:1].push(p)},function(){return[[],[]]});function NB(d,p,x){var k=rt(d)?kh:fS,D=arguments.length<3;return k(d,Je(p,4),x,D,bi)}function LB(d,p,x){var k=rt(d)?YL:fS,D=arguments.length<3;return k(d,Je(p,4),x,D,IS)}function jB(d,p){var x=rt(d)?hi:DS;return x(d,od(Je(p,3)))}function $B(d){var p=rt(d)?MS:A$;return p(d)}function FB(d,p,x){(x?Gn(d,p,x):p===n)?p=1:p=ot(p);var k=rt(d)?a$:I$;return k(d,p)}function BB(d){var p=rt(d)?l$:P$;return p(d)}function VB(d){if(d==null)return 0;if(sr(d))return sd(d)?oa(d):d.length;var p=Fn(d);return p==le||p==Ye?d.size:qh(d).length}function zB(d,p,x){var k=rt(d)?Mh:_$;return x&&Gn(d,p,x)&&(p=n),k(d,Je(p,3))}var HB=ct(function(d,p){if(d==null)return[];var x=p.length;return x>1&&Gn(d,p[0],p[1])?p=[]:x>2&&Gn(p[0],p[1],p[2])&&(p=[p[0]]),zS(d,Dn(p,1),[])}),nd=wj||function(){return In.Date.now()};function WB(d,p){if(typeof p!="function")throw new Ar(s);return d=ot(d),function(){if(--d<1)return p.apply(this,arguments)}}function LC(d,p,x){return p=x?n:p,p=d&&p==null?d.length:p,Bo(d,_,n,n,n,n,p)}function jC(d,p){var x;if(typeof p!="function")throw new Ar(s);return d=ot(d),function(){return--d>0&&(x=p.apply(this,arguments)),d<=1&&(p=n),x}}var mm=ct(function(d,p,x){var k=S;if(x.length){var D=gi(x,fa(mm));k|=M}return Bo(d,k,p,x,D)}),$C=ct(function(d,p,x){var k=S|C;if(x.length){var D=gi(x,fa($C));k|=M}return Bo(p,k,d,x,D)});function FC(d,p,x){p=x?n:p;var k=Bo(d,T,n,n,n,n,n,p);return k.placeholder=FC.placeholder,k}function BC(d,p,x){p=x?n:p;var k=Bo(d,w,n,n,n,n,n,p);return k.placeholder=BC.placeholder,k}function VC(d,p,x){var k,D,H,q,X,oe,Se=0,Ce=!1,ke=!1,De=!0;if(typeof d!="function")throw new Ar(s);p=Nr(p)||0,Xt(x)&&(Ce=!!x.leading,ke="maxWait"in x,H=ke?vn(Nr(x.maxWait)||0,p):H,De="trailing"in x?!!x.trailing:De);function ze(dn){var eo=k,qo=D;return k=D=n,Se=dn,q=d.apply(qo,eo),q}function Ze(dn){return Se=dn,X=Al(dt,p),Ce?ze(dn):q}function st(dn){var eo=dn-oe,qo=dn-Se,sw=p-eo;return ke?$n(sw,H-qo):sw}function Xe(dn){var eo=dn-oe,qo=dn-Se;return oe===n||eo>=p||eo<0||ke&&qo>=H}function dt(){var dn=nd();if(Xe(dn))return mt(dn);X=Al(dt,st(dn))}function mt(dn){return X=n,De&&k?ze(dn):(k=D=n,q)}function xr(){X!==n&&ZS(X),Se=0,k=oe=D=X=n}function Jn(){return X===n?q:mt(nd())}function Sr(){var dn=nd(),eo=Xe(dn);if(k=arguments,D=this,oe=dn,eo){if(X===n)return Ze(oe);if(ke)return ZS(X),X=Al(dt,p),ze(oe)}return X===n&&(X=Al(dt,p)),q}return Sr.cancel=xr,Sr.flush=Jn,Sr}var qB=ct(function(d,p){return AS(d,1,p)}),UB=ct(function(d,p,x){return AS(d,Nr(p)||0,x)});function KB(d){return Bo(d,N)}function rd(d,p){if(typeof d!="function"||p!=null&&typeof p!="function")throw new Ar(s);var x=function(){var k=arguments,D=p?p.apply(this,k):k[0],H=x.cache;if(H.has(D))return H.get(D);var q=d.apply(this,k);return x.cache=H.set(D,q)||H,q};return x.cache=new(rd.Cache||$o),x}rd.Cache=$o;function od(d){if(typeof d!="function")throw new Ar(s);return function(){var p=arguments;switch(p.length){case 0:return!d.call(this);case 1:return!d.call(this,p[0]);case 2:return!d.call(this,p[0],p[1]);case 3:return!d.call(this,p[0],p[1],p[2])}return!d.apply(this,p)}}function YB(d){return jC(2,d)}var GB=N$(function(d,p){p=p.length==1&&rt(p[0])?Gt(p[0],yr(Je())):Gt(Dn(p,1),yr(Je()));var x=p.length;return ct(function(k){for(var D=-1,H=$n(k.length,x);++D<H;)k[D]=p[D].call(this,k[D]);return gr(d,this,k)})}),gm=ct(function(d,p){var x=gi(p,fa(gm));return Bo(d,M,n,p,x)}),zC=ct(function(d,p){var x=gi(p,fa(zC));return Bo(d,R,n,p,x)}),JB=Vo(function(d,p){return Bo(d,I,n,n,n,p)});function ZB(d,p){if(typeof d!="function")throw new Ar(s);return p=p===n?p:ot(p),ct(d,p)}function XB(d,p){if(typeof d!="function")throw new Ar(s);return p=p==null?0:vn(ot(p),0),ct(function(x){var k=x[p],D=Si(x,0,p);return k&&mi(D,k),gr(d,this,D)})}function QB(d,p,x){var k=!0,D=!0;if(typeof d!="function")throw new Ar(s);return Xt(x)&&(k="leading"in x?!!x.leading:k,D="trailing"in x?!!x.trailing:D),VC(d,p,{leading:k,maxWait:p,trailing:D})}function e5(d){return LC(d,1)}function t5(d,p){return gm(em(p),d)}function n5(){if(!arguments.length)return[];var d=arguments[0];return rt(d)?d:[d]}function r5(d){return Dr(d,g)}function o5(d,p){return p=typeof p=="function"?p:n,Dr(d,g,p)}function i5(d){return Dr(d,h|g)}function s5(d,p){return p=typeof p=="function"?p:n,Dr(d,h|g,p)}function a5(d,p){return p==null||RS(d,p,Cn(p))}function Qr(d,p){return d===p||d!==d&&p!==p}var l5=Ju(zh),c5=Ju(function(d,p){return d>=p}),fs=NS(function(){return arguments}())?NS:function(d){return nn(d)&&Mt.call(d,"callee")&&!SS.call(d,"callee")},rt=ce.isArray,u5=nS?yr(nS):b$;function sr(d){return d!=null&&id(d.length)&&!Ho(d)}function un(d){return nn(d)&&sr(d)}function d5(d){return d===!0||d===!1||nn(d)&&Yn(d)==K}var Ci=Ej||Mm,f5=rS?yr(rS):v$;function p5(d){return nn(d)&&d.nodeType===1&&!Il(d)}function h5(d){if(d==null)return!0;if(sr(d)&&(rt(d)||typeof d=="string"||typeof d.splice=="function"||Ci(d)||pa(d)||fs(d)))return!d.length;var p=Fn(d);if(p==le||p==Ye)return!d.size;if(Rl(d))return!qh(d).length;for(var x in d)if(Mt.call(d,x))return!1;return!0}function m5(d,p){return kl(d,p)}function g5(d,p,x){x=typeof x=="function"?x:n;var k=x?x(d,p):n;return k===n?kl(d,p,n,x):!!k}function ym(d){if(!nn(d))return!1;var p=Yn(d);return p==he||p==ie||typeof d.message=="string"&&typeof d.name=="string"&&!Il(d)}function y5(d){return typeof d=="number"&&wS(d)}function Ho(d){if(!Xt(d))return!1;var p=Yn(d);return p==ee||p==se||p==ae||p==_e}function HC(d){return typeof d=="number"&&d==ot(d)}function id(d){return typeof d=="number"&&d>-1&&d%1==0&&d<=U}function Xt(d){var p=typeof d;return d!=null&&(p=="object"||p=="function")}function nn(d){return d!=null&&typeof d=="object"}var WC=oS?yr(oS):S$;function b5(d,p){return d===p||Wh(d,p,am(p))}function v5(d,p,x){return x=typeof x=="function"?x:n,Wh(d,p,am(p),x)}function x5(d){return qC(d)&&d!=+d}function S5(d){if(oF(d))throw new tt(i);return LS(d)}function C5(d){return d===null}function w5(d){return d==null}function qC(d){return typeof d=="number"||nn(d)&&Yn(d)==ge}function Il(d){if(!nn(d)||Yn(d)!=xe)return!1;var p=Du(d);if(p===null)return!0;var x=Mt.call(p,"constructor")&&p.constructor;return typeof x=="function"&&x instanceof x&&Ou.call(x)==vj}var bm=iS?yr(iS):C$;function T5(d){return HC(d)&&d>=-U&&d<=U}var UC=sS?yr(sS):w$;function sd(d){return typeof d=="string"||!rt(d)&&nn(d)&&Yn(d)==Ie}function vr(d){return typeof d=="symbol"||nn(d)&&Yn(d)==it}var pa=aS?yr(aS):T$;function E5(d){return d===n}function k5(d){return nn(d)&&Fn(d)==Yt}function M5(d){return nn(d)&&Yn(d)==yn}var O5=Ju(Uh),R5=Ju(function(d,p){return d<=p});function KC(d){if(!d)return[];if(sr(d))return sd(d)?Zr(d):ir(d);if(bl&&d[bl])return aj(d[bl]());var p=Fn(d),x=p==le?Ph:p==Ye?Eu:ha;return x(d)}function Wo(d){if(!d)return d===0?d:0;if(d=Nr(d),d===W||d===-W){var p=d<0?-1:1;return p*G}return d===d?d:0}function ot(d){var p=Wo(d),x=p%1;return p===p?x?p-x:p:0}function YC(d){return d?ls(ot(d),0,Z):0}function Nr(d){if(typeof d=="number")return d;if(vr(d))return Y;if(Xt(d)){var p=typeof d.valueOf=="function"?d.valueOf():d;d=Xt(p)?p+"":p}if(typeof d!="string")return d===0?d:+d;d=pS(d);var x=uL.test(d);return x||fL.test(d)?WL(d.slice(2),x?2:8):cL.test(d)?Y:+d}function GC(d){return mo(d,ar(d))}function A5(d){return d?ls(ot(d),-U,U):d===0?d:0}function wt(d){return d==null?"":br(d)}var I5=ua(function(d,p){if(Rl(p)||sr(p)){mo(p,Cn(p),d);return}for(var x in p)Mt.call(p,x)&&wl(d,x,p[x])}),JC=ua(function(d,p){mo(p,ar(p),d)}),ad=ua(function(d,p,x,k){mo(p,ar(p),d,k)}),D5=ua(function(d,p,x,k){mo(p,Cn(p),d,k)}),P5=Vo(Fh);function _5(d,p){var x=ca(d);return p==null?x:OS(x,p)}var N5=ct(function(d,p){d=Pt(d);var x=-1,k=p.length,D=k>2?p[2]:n;for(D&&Gn(p[0],p[1],D)&&(k=1);++x<k;)for(var H=p[x],q=ar(H),X=-1,oe=q.length;++X<oe;){var Se=q[X],Ce=d[Se];(Ce===n||Qr(Ce,sa[Se])&&!Mt.call(d,Se))&&(d[Se]=H[Se])}return d}),L5=ct(function(d){return d.push(n,pC),gr(ZC,n,d)});function j5(d,p){return cS(d,Je(p,3),ho)}function $5(d,p){return cS(d,Je(p,3),Vh)}function F5(d,p){return d==null?d:Bh(d,Je(p,3),ar)}function B5(d,p){return d==null?d:PS(d,Je(p,3),ar)}function V5(d,p){return d&&ho(d,Je(p,3))}function z5(d,p){return d&&Vh(d,Je(p,3))}function H5(d){return d==null?[]:zu(d,Cn(d))}function W5(d){return d==null?[]:zu(d,ar(d))}function vm(d,p,x){var k=d==null?n:cs(d,p);return k===n?x:k}function q5(d,p){return d!=null&&gC(d,p,h$)}function xm(d,p){return d!=null&&gC(d,p,m$)}var U5=lC(function(d,p,x){p!=null&&typeof p.toString!="function"&&(p=Ru.call(p)),d[p]=x},Cm(lr)),K5=lC(function(d,p,x){p!=null&&typeof p.toString!="function"&&(p=Ru.call(p)),Mt.call(d,p)?d[p].push(x):d[p]=[x]},Je),Y5=ct(El);function Cn(d){return sr(d)?kS(d):qh(d)}function ar(d){return sr(d)?kS(d,!0):E$(d)}function G5(d,p){var x={};return p=Je(p,3),ho(d,function(k,D,H){Fo(x,p(k,D,H),k)}),x}function J5(d,p){var x={};return p=Je(p,3),ho(d,function(k,D,H){Fo(x,D,p(k,D,H))}),x}var Z5=ua(function(d,p,x){Hu(d,p,x)}),ZC=ua(function(d,p,x,k){Hu(d,p,x,k)}),X5=Vo(function(d,p){var x={};if(d==null)return x;var k=!1;p=Gt(p,function(H){return H=xi(H,d),k||(k=H.length>1),H}),mo(d,im(d),x),k&&(x=Dr(x,h|m|g,U$));for(var D=p.length;D--;)Zh(x,p[D]);return x});function Q5(d,p){return XC(d,od(Je(p)))}var e3=Vo(function(d,p){return d==null?{}:M$(d,p)});function XC(d,p){if(d==null)return{};var x=Gt(im(d),function(k){return[k]});return p=Je(p),HS(d,x,function(k,D){return p(k,D[0])})}function t3(d,p,x){p=xi(p,d);var k=-1,D=p.length;for(D||(D=1,d=n);++k<D;){var H=d==null?n:d[go(p[k])];H===n&&(k=D,H=x),d=Ho(H)?H.call(d):H}return d}function n3(d,p,x){return d==null?d:Ml(d,p,x)}function r3(d,p,x,k){return k=typeof k=="function"?k:n,d==null?d:Ml(d,p,x,k)}var QC=dC(Cn),ew=dC(ar);function o3(d,p,x){var k=rt(d),D=k||Ci(d)||pa(d);if(p=Je(p,4),x==null){var H=d&&d.constructor;D?x=k?new H:[]:Xt(d)?x=Ho(H)?ca(Du(d)):{}:x={}}return(D?Rr:ho)(d,function(q,X,oe){return p(x,q,X,oe)}),x}function i3(d,p){return d==null?!0:Zh(d,p)}function s3(d,p,x){return d==null?d:YS(d,p,em(x))}function a3(d,p,x,k){return k=typeof k=="function"?k:n,d==null?d:YS(d,p,em(x),k)}function ha(d){return d==null?[]:Dh(d,Cn(d))}function l3(d){return d==null?[]:Dh(d,ar(d))}function c3(d,p,x){return x===n&&(x=p,p=n),x!==n&&(x=Nr(x),x=x===x?x:0),p!==n&&(p=Nr(p),p=p===p?p:0),ls(Nr(d),p,x)}function u3(d,p,x){return p=Wo(p),x===n?(x=p,p=0):x=Wo(x),d=Nr(d),g$(d,p,x)}function d3(d,p,x){if(x&&typeof x!="boolean"&&Gn(d,p,x)&&(p=x=n),x===n&&(typeof p=="boolean"?(x=p,p=n):typeof d=="boolean"&&(x=d,d=n)),d===n&&p===n?(d=0,p=1):(d=Wo(d),p===n?(p=d,d=0):p=Wo(p)),d>p){var k=d;d=p,p=k}if(x||d%1||p%1){var D=TS();return $n(d+D*(p-d+HL("1e-"+((D+"").length-1))),p)}return Yh(d,p)}var f3=da(function(d,p,x){return p=p.toLowerCase(),d+(x?tw(p):p)});function tw(d){return Sm(wt(d).toLowerCase())}function nw(d){return d=wt(d),d&&d.replace(hL,nj).replace(PL,"")}function p3(d,p,x){d=wt(d),p=br(p);var k=d.length;x=x===n?k:ls(ot(x),0,k);var D=x;return x-=p.length,x>=0&&d.slice(x,D)==p}function h3(d){return d=wt(d),d&&ml.test(d)?d.replace(or,rj):d}function m3(d){return d=wt(d),d&&eL.test(d)?d.replace(gh,"\\$&"):d}var g3=da(function(d,p,x){return d+(x?"-":"")+p.toLowerCase()}),y3=da(function(d,p,x){return d+(x?" ":"")+p.toLowerCase()}),b3=iC("toLowerCase");function v3(d,p,x){d=wt(d),p=ot(p);var k=p?oa(d):0;if(!p||k>=p)return d;var D=(p-k)/2;return Gu(Lu(D),x)+d+Gu(Nu(D),x)}function x3(d,p,x){d=wt(d),p=ot(p);var k=p?oa(d):0;return p&&k<p?d+Gu(p-k,x):d}function S3(d,p,x){d=wt(d),p=ot(p);var k=p?oa(d):0;return p&&k<p?Gu(p-k,x)+d:d}function C3(d,p,x){return x||p==null?p=0:p&&(p=+p),Rj(wt(d).replace(yh,""),p||0)}function w3(d,p,x){return(x?Gn(d,p,x):p===n)?p=1:p=ot(p),Gh(wt(d),p)}function T3(){var d=arguments,p=wt(d[0]);return d.length<3?p:p.replace(d[1],d[2])}var E3=da(function(d,p,x){return d+(x?"_":"")+p.toLowerCase()});function k3(d,p,x){return x&&typeof x!="number"&&Gn(d,p,x)&&(p=x=n),x=x===n?Z:x>>>0,x?(d=wt(d),d&&(typeof p=="string"||p!=null&&!bm(p))&&(p=br(p),!p&&ra(d))?Si(Zr(d),0,x):d.split(p,x)):[]}var M3=da(function(d,p,x){return d+(x?" ":"")+Sm(p)});function O3(d,p,x){return d=wt(d),x=x==null?0:ls(ot(x),0,d.length),p=br(p),d.slice(x,x+p.length)==p}function R3(d,p,x){var k=B.templateSettings;x&&Gn(d,p,x)&&(p=n),d=wt(d),p=ad({},p,k,fC);var D=ad({},p.imports,k.imports,fC),H=Cn(D),q=Dh(D,H),X,oe,Se=0,Ce=p.interpolate||xu,ke="__p += '",De=_h((p.escape||xu).source+"|"+Ce.source+"|"+(Ce===vu?lL:xu).source+"|"+(p.evaluate||xu).source+"|$","g"),ze="//# sourceURL="+(Mt.call(p,"sourceURL")?(p.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++$L+"]")+`
88
+ `;d.replace(De,function(Xe,dt,mt,xr,Jn,Sr){return mt||(mt=xr),ke+=d.slice(Se,Sr).replace(mL,oj),dt&&(X=!0,ke+=`' +
89
+ __e(`+dt+`) +
90
+ '`),Jn&&(oe=!0,ke+=`';
91
+ `+Jn+`;
92
+ __p += '`),mt&&(ke+=`' +
93
+ ((__t = (`+mt+`)) == null ? '' : __t) +
94
+ '`),Se=Sr+Xe.length,Xe}),ke+=`';
95
+ `;var Ze=Mt.call(p,"variable")&&p.variable;if(!Ze)ke=`with (obj) {
96
+ `+ke+`
97
+ }
98
+ `;else if(sL.test(Ze))throw new tt(a);ke=(oe?ke.replace(We,""):ke).replace(et,"$1").replace(Ot,"$1;"),ke="function("+(Ze||"obj")+`) {
99
+ `+(Ze?"":`obj || (obj = {});
100
+ `)+"var __t, __p = ''"+(X?", __e = _.escape":"")+(oe?`, __j = Array.prototype.join;
101
+ function print() { __p += __j.call(arguments, '') }
102
+ `:`;
103
+ `)+ke+`return __p
104
+ }`;var st=ow(function(){return St(H,ze+"return "+ke).apply(n,q)});if(st.source=ke,ym(st))throw st;return st}function A3(d){return wt(d).toLowerCase()}function I3(d){return wt(d).toUpperCase()}function D3(d,p,x){if(d=wt(d),d&&(x||p===n))return pS(d);if(!d||!(p=br(p)))return d;var k=Zr(d),D=Zr(p),H=hS(k,D),q=mS(k,D)+1;return Si(k,H,q).join("")}function P3(d,p,x){if(d=wt(d),d&&(x||p===n))return d.slice(0,yS(d)+1);if(!d||!(p=br(p)))return d;var k=Zr(d),D=mS(k,Zr(p))+1;return Si(k,0,D).join("")}function _3(d,p,x){if(d=wt(d),d&&(x||p===n))return d.replace(yh,"");if(!d||!(p=br(p)))return d;var k=Zr(d),D=hS(k,Zr(p));return Si(k,D).join("")}function N3(d,p){var x=O,k=A;if(Xt(p)){var D="separator"in p?p.separator:D;x="length"in p?ot(p.length):x,k="omission"in p?br(p.omission):k}d=wt(d);var H=d.length;if(ra(d)){var q=Zr(d);H=q.length}if(x>=H)return d;var X=x-oa(k);if(X<1)return k;var oe=q?Si(q,0,X).join(""):d.slice(0,X);if(D===n)return oe+k;if(q&&(X+=oe.length-X),bm(D)){if(d.slice(X).search(D)){var Se,Ce=oe;for(D.global||(D=_h(D.source,wt(N1.exec(D))+"g")),D.lastIndex=0;Se=D.exec(Ce);)var ke=Se.index;oe=oe.slice(0,ke===n?X:ke)}}else if(d.indexOf(br(D),X)!=X){var De=oe.lastIndexOf(D);De>-1&&(oe=oe.slice(0,De))}return oe+k}function L3(d){return d=wt(d),d&&Lo.test(d)?d.replace(Kn,dj):d}var j3=da(function(d,p,x){return d+(x?" ":"")+p.toUpperCase()}),Sm=iC("toUpperCase");function rw(d,p,x){return d=wt(d),p=x?n:p,p===n?sj(d)?hj(d):ZL(d):d.match(p)||[]}var ow=ct(function(d,p){try{return gr(d,n,p)}catch(x){return ym(x)?x:new tt(x)}}),$3=Vo(function(d,p){return Rr(p,function(x){x=go(x),Fo(d,x,mm(d[x],d))}),d});function F3(d){var p=d==null?0:d.length,x=Je();return d=p?Gt(d,function(k){if(typeof k[1]!="function")throw new Ar(s);return[x(k[0]),k[1]]}):[],ct(function(k){for(var D=-1;++D<p;){var H=d[D];if(gr(H[0],this,k))return gr(H[1],this,k)}})}function B3(d){return d$(Dr(d,h))}function Cm(d){return function(){return d}}function V3(d,p){return d==null||d!==d?p:d}var z3=aC(),H3=aC(!0);function lr(d){return d}function wm(d){return jS(typeof d=="function"?d:Dr(d,h))}function W3(d){return FS(Dr(d,h))}function q3(d,p){return BS(d,Dr(p,h))}var U3=ct(function(d,p){return function(x){return El(x,d,p)}}),K3=ct(function(d,p){return function(x){return El(d,x,p)}});function Tm(d,p,x){var k=Cn(p),D=zu(p,k);x==null&&!(Xt(p)&&(D.length||!k.length))&&(x=p,p=d,d=this,D=zu(p,Cn(p)));var H=!(Xt(x)&&"chain"in x)||!!x.chain,q=Ho(d);return Rr(D,function(X){var oe=p[X];d[X]=oe,q&&(d.prototype[X]=function(){var Se=this.__chain__;if(H||Se){var Ce=d(this.__wrapped__),ke=Ce.__actions__=ir(this.__actions__);return ke.push({func:oe,args:arguments,thisArg:d}),Ce.__chain__=Se,Ce}return oe.apply(d,mi([this.value()],arguments))})}),d}function Y3(){return In._===this&&(In._=xj),this}function Em(){}function G3(d){return d=ot(d),ct(function(p){return VS(p,d)})}var J3=nm(Gt),Z3=nm(lS),X3=nm(Mh);function iw(d){return cm(d)?Oh(go(d)):O$(d)}function Q3(d){return function(p){return d==null?n:cs(d,p)}}var eV=cC(),tV=cC(!0);function km(){return[]}function Mm(){return!1}function nV(){return{}}function rV(){return""}function oV(){return!0}function iV(d,p){if(d=ot(d),d<1||d>U)return[];var x=Z,k=$n(d,Z);p=Je(p),d-=Z;for(var D=Ih(k,p);++x<d;)p(x);return D}function sV(d){return rt(d)?Gt(d,go):vr(d)?[d]:ir(EC(wt(d)))}function aV(d){var p=++bj;return wt(d)+p}var lV=Yu(function(d,p){return d+p},0),cV=rm("ceil"),uV=Yu(function(d,p){return d/p},1),dV=rm("floor");function fV(d){return d&&d.length?Vu(d,lr,zh):n}function pV(d,p){return d&&d.length?Vu(d,Je(p,2),zh):n}function hV(d){return dS(d,lr)}function mV(d,p){return dS(d,Je(p,2))}function gV(d){return d&&d.length?Vu(d,lr,Uh):n}function yV(d,p){return d&&d.length?Vu(d,Je(p,2),Uh):n}var bV=Yu(function(d,p){return d*p},1),vV=rm("round"),xV=Yu(function(d,p){return d-p},0);function SV(d){return d&&d.length?Ah(d,lr):0}function CV(d,p){return d&&d.length?Ah(d,Je(p,2)):0}return B.after=WB,B.ary=LC,B.assign=I5,B.assignIn=JC,B.assignInWith=ad,B.assignWith=D5,B.at=P5,B.before=jC,B.bind=mm,B.bindAll=$3,B.bindKey=$C,B.castArray=n5,B.chain=PC,B.chunk=dF,B.compact=fF,B.concat=pF,B.cond=F3,B.conforms=B3,B.constant=Cm,B.countBy=SB,B.create=_5,B.curry=FC,B.curryRight=BC,B.debounce=VC,B.defaults=N5,B.defaultsDeep=L5,B.defer=qB,B.delay=UB,B.difference=hF,B.differenceBy=mF,B.differenceWith=gF,B.drop=yF,B.dropRight=bF,B.dropRightWhile=vF,B.dropWhile=xF,B.fill=SF,B.filter=wB,B.flatMap=kB,B.flatMapDeep=MB,B.flatMapDepth=OB,B.flatten=RC,B.flattenDeep=CF,B.flattenDepth=wF,B.flip=KB,B.flow=z3,B.flowRight=H3,B.fromPairs=TF,B.functions=H5,B.functionsIn=W5,B.groupBy=RB,B.initial=kF,B.intersection=MF,B.intersectionBy=OF,B.intersectionWith=RF,B.invert=U5,B.invertBy=K5,B.invokeMap=IB,B.iteratee=wm,B.keyBy=DB,B.keys=Cn,B.keysIn=ar,B.map=td,B.mapKeys=G5,B.mapValues=J5,B.matches=W3,B.matchesProperty=q3,B.memoize=rd,B.merge=Z5,B.mergeWith=ZC,B.method=U3,B.methodOf=K3,B.mixin=Tm,B.negate=od,B.nthArg=G3,B.omit=X5,B.omitBy=Q5,B.once=YB,B.orderBy=PB,B.over=J3,B.overArgs=GB,B.overEvery=Z3,B.overSome=X3,B.partial=gm,B.partialRight=zC,B.partition=_B,B.pick=e3,B.pickBy=XC,B.property=iw,B.propertyOf=Q3,B.pull=PF,B.pullAll=IC,B.pullAllBy=_F,B.pullAllWith=NF,B.pullAt=LF,B.range=eV,B.rangeRight=tV,B.rearg=JB,B.reject=jB,B.remove=jF,B.rest=ZB,B.reverse=pm,B.sampleSize=FB,B.set=n3,B.setWith=r3,B.shuffle=BB,B.slice=$F,B.sortBy=HB,B.sortedUniq=qF,B.sortedUniqBy=UF,B.split=k3,B.spread=XB,B.tail=KF,B.take=YF,B.takeRight=GF,B.takeRightWhile=JF,B.takeWhile=ZF,B.tap=fB,B.throttle=QB,B.thru=ed,B.toArray=KC,B.toPairs=QC,B.toPairsIn=ew,B.toPath=sV,B.toPlainObject=GC,B.transform=o3,B.unary=e5,B.union=XF,B.unionBy=QF,B.unionWith=eB,B.uniq=tB,B.uniqBy=nB,B.uniqWith=rB,B.unset=i3,B.unzip=hm,B.unzipWith=DC,B.update=s3,B.updateWith=a3,B.values=ha,B.valuesIn=l3,B.without=oB,B.words=rw,B.wrap=t5,B.xor=iB,B.xorBy=sB,B.xorWith=aB,B.zip=lB,B.zipObject=cB,B.zipObjectDeep=uB,B.zipWith=dB,B.entries=QC,B.entriesIn=ew,B.extend=JC,B.extendWith=ad,Tm(B,B),B.add=lV,B.attempt=ow,B.camelCase=f3,B.capitalize=tw,B.ceil=cV,B.clamp=c3,B.clone=r5,B.cloneDeep=i5,B.cloneDeepWith=s5,B.cloneWith=o5,B.conformsTo=a5,B.deburr=nw,B.defaultTo=V3,B.divide=uV,B.endsWith=p3,B.eq=Qr,B.escape=h3,B.escapeRegExp=m3,B.every=CB,B.find=TB,B.findIndex=MC,B.findKey=j5,B.findLast=EB,B.findLastIndex=OC,B.findLastKey=$5,B.floor=dV,B.forEach=_C,B.forEachRight=NC,B.forIn=F5,B.forInRight=B5,B.forOwn=V5,B.forOwnRight=z5,B.get=vm,B.gt=l5,B.gte=c5,B.has=q5,B.hasIn=xm,B.head=AC,B.identity=lr,B.includes=AB,B.indexOf=EF,B.inRange=u3,B.invoke=Y5,B.isArguments=fs,B.isArray=rt,B.isArrayBuffer=u5,B.isArrayLike=sr,B.isArrayLikeObject=un,B.isBoolean=d5,B.isBuffer=Ci,B.isDate=f5,B.isElement=p5,B.isEmpty=h5,B.isEqual=m5,B.isEqualWith=g5,B.isError=ym,B.isFinite=y5,B.isFunction=Ho,B.isInteger=HC,B.isLength=id,B.isMap=WC,B.isMatch=b5,B.isMatchWith=v5,B.isNaN=x5,B.isNative=S5,B.isNil=w5,B.isNull=C5,B.isNumber=qC,B.isObject=Xt,B.isObjectLike=nn,B.isPlainObject=Il,B.isRegExp=bm,B.isSafeInteger=T5,B.isSet=UC,B.isString=sd,B.isSymbol=vr,B.isTypedArray=pa,B.isUndefined=E5,B.isWeakMap=k5,B.isWeakSet=M5,B.join=AF,B.kebabCase=g3,B.last=_r,B.lastIndexOf=IF,B.lowerCase=y3,B.lowerFirst=b3,B.lt=O5,B.lte=R5,B.max=fV,B.maxBy=pV,B.mean=hV,B.meanBy=mV,B.min=gV,B.minBy=yV,B.stubArray=km,B.stubFalse=Mm,B.stubObject=nV,B.stubString=rV,B.stubTrue=oV,B.multiply=bV,B.nth=DF,B.noConflict=Y3,B.noop=Em,B.now=nd,B.pad=v3,B.padEnd=x3,B.padStart=S3,B.parseInt=C3,B.random=d3,B.reduce=NB,B.reduceRight=LB,B.repeat=w3,B.replace=T3,B.result=t3,B.round=vV,B.runInContext=ne,B.sample=$B,B.size=VB,B.snakeCase=E3,B.some=zB,B.sortedIndex=FF,B.sortedIndexBy=BF,B.sortedIndexOf=VF,B.sortedLastIndex=zF,B.sortedLastIndexBy=HF,B.sortedLastIndexOf=WF,B.startCase=M3,B.startsWith=O3,B.subtract=xV,B.sum=SV,B.sumBy=CV,B.template=R3,B.times=iV,B.toFinite=Wo,B.toInteger=ot,B.toLength=YC,B.toLower=A3,B.toNumber=Nr,B.toSafeInteger=A5,B.toString=wt,B.toUpper=I3,B.trim=D3,B.trimEnd=P3,B.trimStart=_3,B.truncate=N3,B.unescape=L3,B.uniqueId=aV,B.upperCase=j3,B.upperFirst=Sm,B.each=_C,B.eachRight=NC,B.first=AC,Tm(B,function(){var d={};return ho(B,function(p,x){Mt.call(B.prototype,x)||(d[x]=p)}),d}(),{chain:!1}),B.VERSION=r,Rr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(d){B[d].placeholder=B}),Rr(["drop","take"],function(d,p){pt.prototype[d]=function(x){x=x===n?1:vn(ot(x),0);var k=this.__filtered__&&!p?new pt(this):this.clone();return k.__filtered__?k.__takeCount__=$n(x,k.__takeCount__):k.__views__.push({size:$n(x,Z),type:d+(k.__dir__<0?"Right":"")}),k},pt.prototype[d+"Right"]=function(x){return this.reverse()[d](x).reverse()}}),Rr(["filter","map","takeWhile"],function(d,p){var x=p+1,k=x==V||x==F;pt.prototype[d]=function(D){var H=this.clone();return H.__iteratees__.push({iteratee:Je(D,3),type:x}),H.__filtered__=H.__filtered__||k,H}}),Rr(["head","last"],function(d,p){var x="take"+(p?"Right":"");pt.prototype[d]=function(){return this[x](1).value()[0]}}),Rr(["initial","tail"],function(d,p){var x="drop"+(p?"":"Right");pt.prototype[d]=function(){return this.__filtered__?new pt(this):this[x](1)}}),pt.prototype.compact=function(){return this.filter(lr)},pt.prototype.find=function(d){return this.filter(d).head()},pt.prototype.findLast=function(d){return this.reverse().find(d)},pt.prototype.invokeMap=ct(function(d,p){return typeof d=="function"?new pt(this):this.map(function(x){return El(x,d,p)})}),pt.prototype.reject=function(d){return this.filter(od(Je(d)))},pt.prototype.slice=function(d,p){d=ot(d);var x=this;return x.__filtered__&&(d>0||p<0)?new pt(x):(d<0?x=x.takeRight(-d):d&&(x=x.drop(d)),p!==n&&(p=ot(p),x=p<0?x.dropRight(-p):x.take(p-d)),x)},pt.prototype.takeRightWhile=function(d){return this.reverse().takeWhile(d).reverse()},pt.prototype.toArray=function(){return this.take(Z)},ho(pt.prototype,function(d,p){var x=/^(?:filter|find|map|reject)|While$/.test(p),k=/^(?:head|last)$/.test(p),D=B[k?"take"+(p=="last"?"Right":""):p],H=k||/^find/.test(p);D&&(B.prototype[p]=function(){var q=this.__wrapped__,X=k?[1]:arguments,oe=q instanceof pt,Se=X[0],Ce=oe||rt(q),ke=function(dt){var mt=D.apply(B,mi([dt],X));return k&&De?mt[0]:mt};Ce&&x&&typeof Se=="function"&&Se.length!=1&&(oe=Ce=!1);var De=this.__chain__,ze=!!this.__actions__.length,Ze=H&&!De,st=oe&&!ze;if(!H&&Ce){q=st?q:new pt(this);var Xe=d.apply(q,X);return Xe.__actions__.push({func:ed,args:[ke],thisArg:n}),new Ir(Xe,De)}return Ze&&st?d.apply(this,X):(Xe=this.thru(ke),Ze?k?Xe.value()[0]:Xe.value():Xe)})}),Rr(["pop","push","shift","sort","splice","unshift"],function(d){var p=ku[d],x=/^(?:push|sort|unshift)$/.test(d)?"tap":"thru",k=/^(?:pop|shift)$/.test(d);B.prototype[d]=function(){var D=arguments;if(k&&!this.__chain__){var H=this.value();return p.apply(rt(H)?H:[],D)}return this[x](function(q){return p.apply(rt(q)?q:[],D)})}}),ho(pt.prototype,function(d,p){var x=B[p];if(x){var k=x.name+"";Mt.call(la,k)||(la[k]=[]),la[k].push({name:p,func:x})}}),la[Ku(n,C).name]=[{name:"wrapper",func:n}],pt.prototype.clone=Lj,pt.prototype.reverse=jj,pt.prototype.value=$j,B.prototype.at=pB,B.prototype.chain=hB,B.prototype.commit=mB,B.prototype.next=gB,B.prototype.plant=bB,B.prototype.reverse=vB,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=xB,B.prototype.first=B.prototype.head,bl&&(B.prototype[bl]=yB),B},ia=mj();rs?((rs.exports=ia)._=ia,wh._=ia):In._=ia}).call(TH)}(Yl,Yl.exports)),Yl.exports}var Iv=EH();const kH=t=>{const{name:e,onInputChange:n,onChange:r,onFilter:o,onFilterError:i,fetchOnCount:s=1,preFilterMessage:a=s?"Start typing to see options...":t.noOptionsText,noOptionsText:l,filterOptions:u=I=>I,includeInputInList:f=!0,autoComplete:h=!0,...m}=t,[g,b,y]=Wt.useField(e),{setValue:S}=y,[C,E]=J.useState(""),[T,w]=J.useState([]),[M,R]=J.useState(!1),_=Iv.debounce(async(I,N)=>{try{R(!0);const O=await o(I.input);N(O)}catch(O){throw O}finally{R(!1)}},400);return J.useEffect(()=>{if(C===""){w(g.value?[g.value]:[]);return}C.length>=s&&_({input:C},I=>{let N=[];I?(N=I,g.value&&(N=[g.value,...I.filter(O=>JSON.stringify(O)!==JSON.stringify(g.value))])):g.value&&(N=[g.value]),w(N)})},[g.value,C]),v.jsx(XA,{name:e,loading:M,filterOptions:u,noOptionsText:C.length<s?a:l,options:T,autoComplete:h,includeInputInList:f,onChange:(I,N,O,A)=>{w(N?[N,...T]:T),S(N),r&&r(I,N,O,A)},onInputChange:(I,N,O)=>{E(N),n&&n(I,N,O)},...m})},MH=t=>{const{name:e,label:n=kn(e),options:r=[],filterSelectedOptions:o=!0,variant:i="outlined",staticLabel:s=!1,staticLabelProps:a={fontSize:".9em",color:"#808080"},readOnly:l,margin:u="dense",fullWidth:f=!0,required:h,onChange:m,getOptionLabel:g=I=>typeof I=="string"?I:String(I),isOptionEqualToValue:b=(I,N)=>JSON.stringify(I)===JSON.stringify(N),useFieldAsValue:y,...S}=t,[C,E,T]=Wt.useField(e),{setValue:w}=T,{error:M}=E,R={...Xn(S,["useFieldAsValue"]),getOptionLabel:g,options:r,filterSelectedOptions:o,isOptionEqualToValue:b,renderInput:I=>v.jsx(j.TextField,{...I,variant:i,label:s?void 0:n,error:!!M,required:h}),onChange:(I,N,O,A)=>{w(y?N.map(L=>L[y]):N),m&&m(I,N,O,A)},fullWidth:!0,value:y?r.filter(I=>C.value.includes(I[y]))||[]:C.value,slotProps:{paper:{elevation:8,sx:{borderRadius:2}}}},_=()=>C.value.length===0?"":(y?r.filter(N=>C.value.includes(N[y]))||[]:C.value).map(N=>g(N)).join(", ");return v.jsxs(j.FormControl,{margin:u,fullWidth:f,required:h,children:[(s||l)&&v.jsx(j.Typography,{...a,children:n}),l?v.jsx(j.Typography,{children:_()}):v.jsxs(j.Box,{children:[v.jsx(j.Autocomplete,{...R,multiple:!0}),v.jsx(Qn,{name:e,id:`${e}-err`})]})]})},OH=t=>{const{name:e,label:n=kn(e),sublabel:r,required:o=!1,labelPlacement:i="end",labelAlignment:s=i==="end"||i==="start"?"top":"center",readOnly:a=!1,staticLabelProps:l={fontSize:".9em",color:"#808080"},onChange:u,...f}=t;s==="top"&&(i==="bottom"||i==="top")&&console.error(`Checkbox: Ignoring labelAlignment='top'. labelAlignment cannot be 'top' when labelPlacement=${i}`);const h=Wt.useField({name:e}),m=h[0],g=h[2],b=r?v.jsxs("div",{children:[v.jsx("p",{style:{margin:0},children:n}),v.jsx(j.Typography,{variant:"caption",style:{fontSize:"0.85rem"},children:r})]}):n,y=s==="top"&&(i==="start"||i==="end");return a?m.value&&v.jsx(j.Typography,{...l,children:b}):v.jsxs(j.Box,{children:[v.jsx(j.FormControlLabel,{sx:{alignItems:y?"flex-start":"center"},label:v.jsx("span",{"data-testid":n,style:{display:"inline-block",marginTop:y?"10px":0},children:b}),required:o,labelPlacement:i,control:v.jsx(j.Checkbox,{"data-testid":"checkbox",...f,...m,onChange:(S,C)=>{g.setValue(S.target.checked),u&&u(S,C)},checked:m.value})}),v.jsx(Qn,{name:e,id:`${e}-err`})]})},Fa=t=>{const{name:e,label:n=kn(e),format:r="",autoFormat:o=r,placeholder:i=n,staticLabel:s=!1,staticLabelProps:a={fontSize:".9em",color:"#808080"},readOnly:l=!1,startIcon:u,endIcon:f,margin:h="dense",noTrimOnBlur:m=!1}=t,[g,b,y]=Wt.useField({name:e}),{setValue:S}=y,{value:C}=g,{error:E}=b;C===void 0&&console.error(`Please set an initial value for ${e}`),!r&&o&&console.error("Can't auto format when there is no format");const T=M=>{if(o){const R=OV(M.target.value,r,C,M.target);S(R)}else S(M.target.value);t.onChange&&t.onChange(M)},w=["autoFormat","format","staticLabel","staticLabelProps","endIcon","startIcon"];return v.jsxs(j.FormControl,{margin:h,fullWidth:!0,children:[(s||l)&&v.jsx(j.Typography,{...a,children:n}),l?v.jsx(j.Typography,{children:C}):v.jsxs(j.Box,{children:[v.jsx(j.TextField,{variant:"outlined",fullWidth:!0,...g,id:`${e}-tf`,error:!!E,placeholder:i,...Xn({...t},w),onChange:T,label:s?void 0:n,slotProps:{input:{endAdornment:f,startAdornment:u}},onBlur:M=>{m||S(M.target.value.trim()),t.onBlur&&t.onBlur(M)}}),v.jsx(Qn,{name:e,id:`${e}-err`})]})]})},RH=t=>{const{name:e,checkboxes:n=[],label:r=kn(e),labelPlacement:o="end",labelAlignment:i=o==="end"||o==="start"?"top":"center",required:s=!1,disabled:a=!1,readOnly:l=!1,min:u=0,max:f=n.length,minMaxSubtitle:h="Please select between {min} and {max} options",maxSubtitle:m="Up to {max} max",minSubtitle:g="Please select {min} or more",margin:b="dense",staticLabelProps:y={fontSize:".9em",color:"#808080"}}=t,[S,C,E]=Wt.useField({name:e}),{setValue:T}=E,{value:w}=S,{error:M}=C,{setFieldValue:R}=Wt.useFormikContext();(u<0||u>=n.length)&&console.error(`CheckboxGroup: "min" cannot be ${u}. It must be a value between 0 and ${n.length-1}.`),(f<=1||f>n.length)&&console.error(`CheckboxGroup: "max" must be a value between 2 and ${n.length}.`),i==="top"&&(o==="bottom"||o==="top")&&console.error(`CheckboxGroup: Ignoring labelAlignment='top'. labelAlignment cannot be 'top' when labelPlacement=${o}`);const _=()=>t.labelPlacement=="start"?"right":t.labelPlacement=="top"||t.labelPlacement=="bottom"?"center":"left",I=L=>typeof L=="string"?L:!L.textField&&!L.sublabel?L.label:v.jsxs(j.Box,{display:"flex",flexDirection:"row",justifyContent:"center",gap:"0.5rem",alignItems:"baseline",children:[v.jsxs(j.Box,{display:"flex",flexDirection:"column",justifyContent:"center",children:[v.jsx("p",{style:{margin:0},children:L.label}),L.sublabel&&v.jsx(j.Typography,{variant:"caption",style:{fontSize:"0.85rem"},children:L.sublabel})]}),L.textField&&v.jsx(Fa,{label:"",size:"small",margin:"none",sx:{"& .MuiInputBase-input":{height:14}},...L.textField})]}),N=n.map(L=>{const z=typeof L=="string"?L:L.label,V=i==="top"&&(o==="start"||o==="end");return v.jsx(j.FormControlLabel,{sx:{alignItems:V?"flex-start":"center"},value:z,control:v.jsx(j.Checkbox,{}),label:v.jsx("div",{"data-testid":typeof L=="string"?L:L.label,style:{marginTop:V?"10px":0},children:I(L)}),labelPlacement:o,checked:w.includes(z),disabled:a||!w.includes(z)&&w.length===f,style:{textAlign:_()}},`checkbox-group-${z}`)}),O=()=>{if(f<n.length&&u>0)return v.jsx(j.Typography,{variant:"subtitle2",children:h.replace("{min}",`${u}`).replace("{max}",`${f}`)});if(f<n.length)return v.jsx(j.Typography,{variant:"subtitle2",children:m.replace("{max}",`${f}`)});if(u>0)return v.jsx(j.Typography,{variant:"subtitle2",children:g.replace("{min}",`${u}`)})};return l?v.jsxs(j.Box,{children:[v.jsx(j.Typography,{...y,children:r}),w.join(", ")]}):v.jsxs(j.FormControl,{onChange:L=>{const z=L.target.value,V=L.target.checked,$=n.find(F=>typeof F=="string"?F===z:F.label===z);V?T([...w,z]):($&&typeof $=="object"&&$.textField&&$.textField.name&&R($.textField.name,""),T(w.filter(F=>F!=z)))},fullWidth:!0,margin:b,error:!!M,children:[v.jsx(j.FormLabel,{focused:t.focused,htmlFor:e,required:s,disabled:t.disableLabel,children:r}),O(),N,v.jsx(Qn,{name:e,id:`${e}-err`})]})},Kw=Fe(v.jsx("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96M14 13v4h-4v-4H7l5-5 5 5z"}),"CloudUpload"),QA=t=>{const{name:e,multiple:n=!1,readOnly:r=!1,variant:o=n?"drag-and-drop":"button",duplicateFilesCallback:i,incorrectFileTypesCallback:s,staticLabelProps:a={fontSize:".9em",color:"#808080"}}=t,[l,u,f]=Wt.useField({name:e}),{setValue:h}=f,m=l.value,g=t.fileType?Array.isArray(t.fileType)?t.fileType:[t.fileType]:[],b=t.subtitle??(g.length>0?`Allowed file extensions: ${g.join(", ")}`:""),y=_=>{C(Array.from(_.target.files??[]))},S=_=>{_.preventDefault(),C(Array.from(_.dataTransfer.files))},C=_=>{if(_&&_.length>0){const I=m?Array.isArray(m)?m:[m]:[],N=Iv.partition(_,O=>I.find(A=>T(O,A)));if(_=N[1],i&&N[0].length>0&&i(N[0]),g.length>0){const O=Iv.partition(_,A=>g.find(L=>A.name.endsWith(L)));_=O[0],s&&O[1].length>0&&s(O[1])}n?h([...E(),..._]):!Array.isArray(m)&&_.length>0&&h(_[0])}},E=()=>m?Array.isArray(m)?m:[m]:[],T=(_,I)=>_.lastModified===I.lastModified&&_.name===I.name&&_.type===I.type&&_.size===I.size,w=()=>E().map(_=>_.name).join(", ");return r?v.jsx(j.Typography,{"data-testid":"fileupload-readonly",...a,children:w()}):o==="drag-and-drop"?v.jsxs("div",{style:{border:`4px dashed ${u.error?"red":"lightgray"}`,padding:"30px 10px",display:"flex",alignItems:"center",flexDirection:"column"},onDrop:S,onDragOver:_=>_.preventDefault(),"data-testid":"dropzone",children:[v.jsx(Kw,{color:"primary",sx:{fontSize:"40px"}}),v.jsxs("div",{style:{display:"flex",flexDirection:"row",alignItems:"baseline"},children:[v.jsx(j.Typography,{children:"Drag and drop or"}),v.jsxs(j.Button,{component:"label",role:void 0,variant:"text",tabIndex:-1,sx:{textTransform:"none",fontSize:"16px",textDecoration:"underline"},children:["browse",v.jsx("input",{"data-testid":"file-input",id:e,hidden:!0,type:"file",onChange:y,multiple:!0,accept:g==null?void 0:g.toString()})]})]}),b&&v.jsx(j.Typography,{variant:"caption",children:b}),v.jsx(Qn,{name:e,id:`${e}-err`})]}):v.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[v.jsx("div",{style:{display:"flex",alignItems:"center",marginBottom:"4px"},children:v.jsxs(j.Button,{component:"label",role:void 0,variant:"contained",tabIndex:-1,startIcon:v.jsx(Kw,{}),children:["Upload a file",v.jsx("input",{"data-testid":"file-input",id:e,hidden:!0,type:"file",onChange:y,accept:g==null?void 0:g.toString()})]})}),v.jsx(Qn,{name:e,id:`${e}-err`})]})},AH=Fe(v.jsx("path",{d:"M15 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V7zM6 20V4h8v4h4v12zm10-10v5c0 2.21-1.79 4-4 4s-4-1.79-4-4V8.5c0-1.47 1.26-2.64 2.76-2.49 1.3.13 2.24 1.32 2.24 2.63V15h-2V8.5c0-.28-.22-.5-.5-.5s-.5.22-.5.5V15c0 1.1.9 2 2 2s2-.9 2-2v-5z"}),"FilePresent"),IH=Fe(v.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete"),DH=t=>{const{name:e}=t,[n,,r]=Wt.useField({name:e}),{setValue:o}=r,i=n.value;return v.jsx("div",{style:{width:"100%"},children:i.map(s=>v.jsx(j.Card,{sx:{margin:"10px 0px"},children:v.jsxs(j.CardContent,{style:{display:"flex",alignItems:"center",padding:"8px 12px"},children:[v.jsx(AH,{sx:{color:"gray",fontSize:"20px"}}),v.jsx(j.Typography,{sx:{padding:"8px",overflowWrap:"anywhere"},children:s.name}),v.jsx(j.IconButton,{"aria-label":"remove file",onClick:()=>o(i.filter(a=>a!==s)),edge:"end",style:{marginLeft:"auto",order:"2"},children:v.jsx(IH,{})})]})},`${s.name}-${s.type}-${s.size}-${s.lastModified}`))})};var jm,Yw;function di(){if(Yw)return jm;Yw=1;function t(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}return jm=t,jm}var $m,Gw;function eI(){if(Gw)return $m;Gw=1;var t=typeof Pi=="object"&&Pi&&Pi.Object===Object&&Pi;return $m=t,$m}var Fm,Jw;function co(){if(Jw)return Fm;Jw=1;var t=eI(),e=typeof self=="object"&&self&&self.Object===Object&&self,n=t||e||Function("return this")();return Fm=n,Fm}var Bm,Zw;function PH(){if(Zw)return Bm;Zw=1;var t=co(),e=function(){return t.Date.now()};return Bm=e,Bm}var Vm,Xw;function _H(){if(Xw)return Vm;Xw=1;var t=/\s/;function e(n){for(var r=n.length;r--&&t.test(n.charAt(r)););return r}return Vm=e,Vm}var zm,Qw;function NH(){if(Qw)return zm;Qw=1;var t=_H(),e=/^\s+/;function n(r){return r&&r.slice(0,t(r)+1).replace(e,"")}return zm=n,zm}var Hm,eT;function tu(){if(eT)return Hm;eT=1;var t=co(),e=t.Symbol;return Hm=e,Hm}var Wm,tT;function LH(){if(tT)return Wm;tT=1;var t=tu(),e=Object.prototype,n=e.hasOwnProperty,r=e.toString,o=t?t.toStringTag:void 0;function i(s){var a=n.call(s,o),l=s[o];try{s[o]=void 0;var u=!0}catch{}var f=r.call(s);return u&&(a?s[o]=l:delete s[o]),f}return Wm=i,Wm}var qm,nT;function jH(){if(nT)return qm;nT=1;var t=Object.prototype,e=t.toString;function n(r){return e.call(r)}return qm=n,qm}var Um,rT;function Us(){if(rT)return Um;rT=1;var t=tu(),e=LH(),n=jH(),r="[object Null]",o="[object Undefined]",i=t?t.toStringTag:void 0;function s(a){return a==null?a===void 0?o:r:i&&i in Object(a)?e(a):n(a)}return Um=s,Um}var Km,oT;function Xi(){if(oT)return Km;oT=1;function t(e){return e!=null&&typeof e=="object"}return Km=t,Km}var Ym,iT;function Ep(){if(iT)return Ym;iT=1;var t=Us(),e=Xi(),n="[object Symbol]";function r(o){return typeof o=="symbol"||e(o)&&t(o)==n}return Ym=r,Ym}var Gm,sT;function tI(){if(sT)return Gm;sT=1;var t=NH(),e=di(),n=Ep(),r=NaN,o=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,s=/^0o[0-7]+$/i,a=parseInt;function l(u){if(typeof u=="number")return u;if(n(u))return r;if(e(u)){var f=typeof u.valueOf=="function"?u.valueOf():u;u=e(f)?f+"":f}if(typeof u!="string")return u===0?u:+u;u=t(u);var h=i.test(u);return h||s.test(u)?a(u.slice(2),h?2:8):o.test(u)?r:+u}return Gm=l,Gm}var Jm,aT;function nI(){if(aT)return Jm;aT=1;var t=di(),e=PH(),n=tI(),r="Expected a function",o=Math.max,i=Math.min;function s(a,l,u){var f,h,m,g,b,y,S=0,C=!1,E=!1,T=!0;if(typeof a!="function")throw new TypeError(r);l=n(l)||0,t(u)&&(C=!!u.leading,E="maxWait"in u,m=E?o(n(u.maxWait)||0,l):m,T="trailing"in u?!!u.trailing:T);function w(z){var V=f,$=h;return f=h=void 0,S=z,g=a.apply($,V),g}function M(z){return S=z,b=setTimeout(I,l),C?w(z):g}function R(z){var V=z-y,$=z-S,F=l-V;return E?i(F,m-$):F}function _(z){var V=z-y,$=z-S;return y===void 0||V>=l||V<0||E&&$>=m}function I(){var z=e();if(_(z))return N(z);b=setTimeout(I,R(z))}function N(z){return b=void 0,T&&f?w(z):(f=h=void 0,g)}function O(){b!==void 0&&clearTimeout(b),S=0,f=y=h=b=void 0}function A(){return b===void 0?g:N(e())}function L(){var z=e(),V=_(z);if(f=arguments,h=this,y=z,V){if(b===void 0)return M(y);if(E)return clearTimeout(b),b=setTimeout(I,l),w(y)}return b===void 0&&(b=setTimeout(I,l)),g}return L.cancel=O,L.flush=A,L}return Jm=s,Jm}var Zm,lT;function $H(){if(lT)return Zm;lT=1;var t=nI(),e=di(),n="Expected a function";function r(o,i,s){var a=!0,l=!0;if(typeof o!="function")throw new TypeError(n);return e(s)&&(a="leading"in s?!!s.leading:a,l="trailing"in s?!!s.trailing:l),t(o,i,{leading:a,maxWait:i,trailing:l})}return Zm=r,Zm}var FH=$H();const rI=rr(FH),BH=Fe(v.jsx("path",{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7m0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5"}),"LocationOn");var zd={exports:{}},VH=zd.exports,cT;function zH(){return cT||(cT=1,function(t,e){(function(n,r){t.exports=r()})(VH,()=>{return n={705:o=>{o.exports=function(i,s){const a=[];return s.length===0?a.push({text:i,highlight:!1}):s[0][0]>0&&a.push({text:i.slice(0,s[0][0]),highlight:!1}),s.forEach((l,u)=>{const f=l[0],h=l[1];a.push({text:i.slice(f,h),highlight:!0}),u===s.length-1?h<i.length&&a.push({text:i.slice(h,i.length),highlight:!1}):h<s[u+1][0]&&a.push({text:i.slice(h,s[u+1][0]),highlight:!1})}),a}}},r={},function o(i){var s=r[i];if(s!==void 0)return s.exports;var a=r[i]={exports:{}};return n[i](a,a.exports,o),a.exports}(705);var n,r})}(zd)),zd.exports}var HH=zH();const WH=rr(HH),qH=t=>{const{listItemProps:e,option:n,resultIcon:r,highlightMatches:o}=t,{main_text:i,secondary_text:s,main_text_matched_substrings:a}=n.structured_formatting,l=WH(i,a.map(u=>[u.offset,u.offset+u.length]));return v.jsx("li",{...Xn({...e},["key"]),"data-testid":`loc-${n.place_id}`,children:v.jsxs(j.Box,{display:"flex",flexDirection:"row",alignItems:"center",children:[r?P.cloneElement(r):null,v.jsxs(j.Box,{children:[l.map(u=>{const f=o&&u.highlight?700:400;return v.jsx("span",{style:{fontWeight:f},children:u.text},`${n.place_id}_${u.text}`)}),v.jsx(j.Typography,{variant:"body2",color:"textSecondary",children:s})]})]})})};function UH(t,e,n){if(!e)return;const r=document.createElement("script");r.setAttribute("async",""),r.setAttribute("id",n),r.src=t,r.onerror=()=>console.error(`Failed to load script: ${t}`),e.appendChild(r)}const _l={current:null},KH=t=>{const{name:e,label:n=kn(e),resultIcon:r=v.jsx(BH,{}),apiKey:o,highlightMatches:i=!0,types:s,variant:a="outlined",staticLabel:l=!1,staticLabelProps:u={fontSize:".9em",color:"#808080"},readOnly:f=!1,margin:h="dense"}=t,[m,g]=P.useState(null),[b,y]=P.useState(""),[S,C]=P.useState([]),E=P.useRef(!1),[,T,w]=Wt.useField(e),{setValue:M}=w,{error:R}=T;typeof window<"u"&&!E.current&&(document.querySelector("#google-maps")||UH(`https://maps.googleapis.com/maps/api/js?key=${o}&libraries=places`,document.querySelector("head"),"google-maps"),E.current=!0);const _=P.useMemo(()=>rI(($,F)=>{_l.current&&_l.current.getPlacePredictions($,F)},200),[]);P.useEffect(()=>{let $=!0;if(!_l.current&&window.google&&(_l.current=new window.google.maps.places.AutocompleteService),!_l.current)return;if(b===""){C(m?[m]:[]);return}return _({input:b,types:s?[s]:[]},U=>{if($){let G=[];m&&(G=[m]),U&&(G=[...G,...U]);const Y=G.filter((Z,me,fe)=>me===fe.findIndex(pe=>pe.place_id===Z.place_id));C(Y)}}),()=>{$=!1}},[m,b,_,s]);const I=P.useCallback($=>{const W=($?[$,...S]:S).filter((U,G,Y)=>G===Y.findIndex(Z=>Z.place_id===U.place_id));C(W),g($),M($?$.description:"")},[S,C,g,M]),N=$=>{y($)},O=["name","apiKey","resultIcon","highlightMatches","variant","staticLabel","staticLabelProps","margin"],A=$=>v.jsx(j.TextField,{margin:h,variant:a,...$,...Xn({...t},O),label:l?void 0:n,hiddenLabel:l,error:!!R}),L=$=>typeof $=="string"?$:$.description,z=($,F)=>v.jsx(qH,{listItemProps:$,option:F,resultIcon:r,highlightMatches:i},F.place_id);P.useEffect(()=>{const $=F=>{F.key==="Enter"&&S.length>0&&I(S[0])};return window.addEventListener("keydown",$),()=>{window.removeEventListener("keydown",$)}},[S,I]);const V=v.jsx(j.Autocomplete,{id:`${e}-loc`,"data-testid":"location-autocomplete",getOptionLabel:L,filterOptions:$=>$,options:S,autoComplete:!0,includeInputInList:!0,filterSelectedOptions:!0,value:m,onChange:($,F)=>I(F),onInputChange:($,F)=>N(F),disabled:t.disabled,renderOption:z,renderInput:A});return v.jsxs(j.FormControl,{margin:h,fullWidth:!0,children:[(l||f)&&v.jsx(j.Typography,{...u,children:n}),f?v.jsx(j.Typography,{children:m==null?void 0:m.description}):v.jsxs(j.Box,{children:[V,v.jsx(Qn,{name:e,id:`${e}-err`})]})]})},oI=t=>{const{name:e,radios:n=[],label:r=kn(e),labelPlacement:o="end",labelAlignment:i=o==="end"||o==="start"?"top":"center",required:s=!1,disabled:a=!1,readOnly:l=!1,margin:u="dense",onChange:f,staticLabelProps:h={fontSize:".9em",color:"#808080"}}=t;i==="top"&&(o==="bottom"||o==="top")&&console.error(`RadioGroup: Ignoring labelAlignment='top'. labelAlignment cannot be 'top' when labelPlacement=${o}`);const[m,g,b]=Wt.useField({name:e}),{setValue:y}=b,{value:S}=m,{error:C}=g,E=["radioProps","labelPlacement"],T=["disableRedLabelOnError","disableLabel","sameButtonColor","labelPlacement","focused","margin","fullWidth","labelAlignment"],w=()=>t.labelPlacement=="start"?"right":t.labelPlacement=="top"||t.labelPlacement=="bottom"?"center":"left",M=n.map((N,O)=>{const A=i==="top"&&(o==="start"||o==="end"),L=N.sublabel?v.jsxs("div",{children:[v.jsx("p",{style:{margin:0},children:N.label}),v.jsx(j.Typography,{variant:"caption",style:{fontSize:"0.85rem"},children:N.sublabel})]}):N.label;return v.jsx(j.FormControlLabel,{sx:{alignItems:A?"flex-start":"center"},value:O.toString(),control:v.jsx(j.Radio,{id:`${N.value}-rb`,color:t.sameButtonColor?t.sameButtonColor:N.color??"default",...Xn({...N},E)}),label:v.jsx("div",{style:{marginTop:A?"10px":0},children:L}),labelPlacement:o,disabled:N.disabled||a,style:{textAlign:w()}},`rb-${O}-${r}`)}),R=()=>{const N=n.find(O=>O.value===m.value);return v.jsxs(j.Box,{children:[v.jsx(j.Typography,{...h,children:r}),_(N)]})},_=N=>v.jsxs(j.Box,{children:[v.jsx(j.Typography,{children:N==null?void 0:N.label}),(N==null?void 0:N.sublabel)&&v.jsx(j.Typography,{variant:"caption",style:{fontSize:"0.85rem"},children:N.sublabel})]}),I=N=>{y(N.target.value),f&&f(N.target.value)};return l?R():v.jsxs(j.FormControl,{focused:t.focused,margin:u,fullWidth:t.fullWidth,error:!!C,children:[v.jsx(j.FormLabel,{htmlFor:e,required:s,disabled:t.disableLabel,children:r}),v.jsx(j.RadioGroup,{id:e,value:S??"",...Xn({...t},T),onChange:I,children:M}),v.jsx(Qn,{name:e,id:`${e}-err`})]})},YH=t=>{const{name:e,label:n=kn(e),min:r=0,max:o=100,step:i=1,readOnly:s,staticLabelProps:a={fontSize:".9em",color:"#808080"}}=t,l=Wt.useField(e),{value:u}=l[0],{setValue:f}=l[2],h=["label"];return s?(()=>{let g;return Array.isArray(u)?g=s==="percent"?`${100*(u[0]??0)/o}% - ${100*(u[1]??0)/o}%`:`${u[0]??0} - ${u[1]??0}`:g=s==="percent"?`${100*(u??0)/o}%`:`${u??0}`,v.jsxs(j.Box,{children:[v.jsx(j.Typography,{...a,children:n}),v.jsx(j.Typography,{children:g})]})})():v.jsxs(j.FormControl,{fullWidth:!0,children:[v.jsx(j.Typography,{gutterBottom:!0,color:"textSecondary",children:n}),v.jsx(j.Slider,{...Xn({...t},h),id:t.name,value:u??0,onChange:(g,b)=>{f(b)},min:r,max:o,step:i})]})},GH=t=>{const{name:e,options:n=[],label:r=kn(e),selectedOptionIcon:o=void 0,staticLabel:i=!1,staticLabelProps:s={fontSize:".9em",color:"#808080"},variant:a="outlined",readOnly:l=!1,margin:u="dense",required:f}=t,[h,m,g]=Wt.useField({name:e}),{setValue:b}=g,{value:y}=h,{error:S}=m,C=P.useCallback(()=>{let A="";for(let L=0;L<n.length;L++)JSON.stringify(n[L].value)===JSON.stringify(y)&&(A=L.toString());return A},[n,y]),E=P.useCallback(()=>{const A=[],L=y.toString().split(",");for(const z of L)for(let V=0;V<n.length;V++)n[V].value===z&&A.push(V);return A},[n,y]);P.useEffect(()=>{M(t.multiple?E():C())},[n,t.multiple,y,E,C]);const T=(A,L)=>t.multiple?!!y.toString().split(",").find(z=>z===JSON.stringify(A.value)):L===n.findIndex(z=>y===z.value),[w,M]=P.useState(t.multiple?E:C),R=n.map((A,L)=>{const z=o&&T(A,L)?o:void 0;return v.jsxs(j.MenuItem,{id:`select-${e}-option-${A.value}`,value:L,disabled:A.disabled,children:[o&&v.jsx(j.ListItemIcon,{children:z}),A.label]},L.toString())}),_=A=>{if(t.multiple){const L=[];A.target.value.forEach(z=>{n[z].value&&L.push(n[z].value)}),b(L.join(","))}else b(n[A.target.value].value);M(A.target.value)},I=["name","options",i?"label":"","required","selectedOptionIcon","variant","staticLabel","staticLabelProps"],N=()=>RV(n,y,t.multiple),O=t.renderValue??N;return v.jsxs(j.FormControl,{fullWidth:!0,variant:a,error:!!S,margin:u,required:f,children:[i||l?v.jsx(j.Typography,{...s,children:r}):v.jsx(j.InputLabel,{id:`${e}-select-label`,children:r}),l?v.jsx(j.Typography,{children:N()}):v.jsxs(j.Box,{children:[v.jsx(j.Select,{id:`${e}-sel`,labelId:`${e}-select-label`,label:i?void 0:r,...Xn({...t},I),name:e,value:w,fullWidth:!0,onChange:A=>_(A),displayEmpty:i,renderValue:O,children:R}),v.jsx(Qn,{name:e,id:`${e}-err`})]})]})},JH=t=>{const{name:e,label:n=kn(e),labelPlacement:r="end",readOnly:o,staticLabelProps:i={fontSize:".9em",color:"#808080"},onChange:s,color:a="primary",chipColor:l,activeValue:u=!0,inactiveValue:f=!1}=t,[h,,m]=Wt.useField({name:e}),{setValue:g}=m,{value:b}=h;b===void 0&&console.error(`Please set an initial value for ${e}`);const y=["labelPlacement","chipColor","activeValue","inactiveValue"],S=C=>{if(typeof C!="boolean")return String(C);switch(o){case"YES_NO":return C===u?"Yes":"No";case"ON_OFF":return C===u?"On":"Off";default:return C===u?"True":"False"}};return o?v.jsxs(j.Box,{children:[v.jsx(j.Typography,{...i,children:n}),v.jsx(j.Typography,{children:S(b)})]}):v.jsxs(j.Box,{bgcolor:l??"inherit",sx:l?{display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"32px",padding:"2px 0px 2px 12px"}:{},children:[v.jsx(j.FormControlLabel,{label:n,sx:{"& .MuiFormControlLabel-label":{color:a}},labelPlacement:r,control:v.jsx(j.Switch,{...Xn({...t},y),id:e,...h,onChange:C=>{if(typeof u=="string"&&typeof f=="string"){const E=C.target.checked?u:f;g(E),s&&s(E)}else g(C.target.checked),s&&s(C.target.checked)},checked:b===u})}),v.jsx(Qn,{name:e,id:`${e}-err`})]})},ZH=Fe([v.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"},"0"),v.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"},"1")],"AccessTime"),XH=Fe(v.jsx("path",{d:"M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"AddCircleOutline"),QH=Fe(v.jsx("path",{d:"M19 7v2.99s-1.99.01-2 0V7h-3s.01-1.99 0-2h3V2h2v3h3v2zm-3 4V8h-3V5H5c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-8zM5 19l3-4 2 3 3-4 4 5z"}),"AddPhotoAlternate"),e6=Fe(v.jsx("path",{d:"M2 12.5C2 9.46 4.46 7 7.5 7H18c2.21 0 4 1.79 4 4s-1.79 4-4 4H9.5C8.12 15 7 13.88 7 12.5S8.12 10 9.5 10H17v2H9.41c-.55 0-.55 1 0 1H18c1.1 0 2-.9 2-2s-.9-2-2-2H7.5C5.57 9 4 10.57 4 12.5S5.57 16 7.5 16H17v2H7.5C4.46 18 2 15.54 2 12.5"}),"Attachment"),t6=Fe(v.jsx("path",{d:"m19 18 2 1V3c0-1.1-.9-2-2-2H8.99C7.89 1 7 1.9 7 3h10c1.1 0 2 .9 2 2zM15 5H5c-1.1 0-2 .9-2 2v16l7-3 7 3V7c0-1.1-.9-2-2-2"}),"Bookmarks"),n6=Fe(v.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),r6=Fe(v.jsx("path",{d:"M22 7h-9v2h9zm0 8h-9v2h9zM5.54 11 2 7.46l1.41-1.41 2.12 2.12 4.24-4.24 1.41 1.41zm0 8L2 15.46l1.41-1.41 2.12 2.12 4.24-4.24 1.41 1.41z"}),"Checklist"),o6=Fe(v.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),i6=Fe(v.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"CloseOutlined"),s6=Fe(v.jsx("path",{d:"M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6z"}),"Code"),iI=Fe(v.jsx("path",{d:"M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9 9-4.03 9-9c0-.46-.04-.92-.1-1.36-.98 1.37-2.58 2.26-4.4 2.26-2.98 0-5.4-2.42-5.4-5.4 0-1.81.89-3.42 2.26-4.4-.44-.06-.9-.1-1.36-.1"}),"DarkMode"),a6=Fe(v.jsx("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"Edit"),l6=Fe(v.jsx("path",{d:"M7 15v2h10v-2zm-4 6h18v-2H3zm0-8h18v-2H3zm4-6v2h10V7zM3 3v2h18V3z"}),"FormatAlignCenter"),c6=Fe(v.jsx("path",{d:"M3 21h18v-2H3zm0-4h18v-2H3zm0-4h18v-2H3zm0-4h18V7H3zm0-6v2h18V3z"}),"FormatAlignJustify"),u6=Fe(v.jsx("path",{d:"M15 15H3v2h12zm0-8H3v2h12zM3 13h18v-2H3zm0 8h18v-2H3zM3 3v2h18V3z"}),"FormatAlignLeft"),d6=Fe(v.jsx("path",{d:"M3 21h18v-2H3zm6-4h12v-2H9zm-6-4h18v-2H3zm6-4h12V7H9zM3 3v2h18V3z"}),"FormatAlignRight"),f6=Fe(v.jsx("path",{d:"M15.6 10.79c.97-.67 1.65-1.77 1.65-2.79 0-2.26-1.75-4-4-4H7v14h7.04c2.09 0 3.71-1.7 3.71-3.79 0-1.52-.86-2.82-2.15-3.42M10 6.5h3c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-3zm3.5 9H10v-3h3.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5"}),"FormatBold"),p6=Fe(v.jsx("path",{d:"M3.27 5 2 6.27l6.97 6.97L6.5 19h3l1.57-3.66L16.73 21 18 19.73 3.55 5.27zM6 5v.18L8.82 8h2.4l-.72 1.68 2.1 2.1L14.21 8H20V5z"}),"FormatClear"),h6=Fe(v.jsx("path",{d:"M16.56 8.94 7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.59-.59 1.54 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.58.59-1.53 0-2.12M5.21 10 10 5.21 14.79 10zM19 11.5s-2 2.17-2 3.5c0 1.1.9 2 2 2s2-.9 2-2c0-1.33-2-3.5-2-3.5M2 20h20v4H2z"}),"FormatColorFill"),m6=Fe(v.jsx("path",{d:"M11 17h10v-2H11zm-8-5 4 4V8zm0 9h18v-2H3zM3 3v2h18V3zm8 6h10V7H11zm0 4h10v-2H11z"}),"FormatIndentDecrease"),g6=Fe(v.jsx("path",{d:"M3 21h18v-2H3zM3 8v8l4-4zm8 9h10v-2H11zM3 3v2h18V3zm8 6h10V7H11zm0 4h10v-2H11z"}),"FormatIndentIncrease"),y6=Fe(v.jsx("path",{d:"M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4z"}),"FormatItalic"),b6=Fe(v.jsx("path",{d:"M4 10.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5m0-6c-.83 0-1.5.67-1.5 1.5S3.17 7.5 4 7.5 5.5 6.83 5.5 6 4.83 4.5 4 4.5m0 12c-.83 0-1.5.68-1.5 1.5s.68 1.5 1.5 1.5 1.5-.68 1.5-1.5-.67-1.5-1.5-1.5M7 19h14v-2H7zm0-6h14v-2H7zm0-8v2h14V5z"}),"FormatListBulleted"),v6=Fe(v.jsx("path",{d:"M2 17h2v.5H3v1h1v.5H2v1h3v-4H2zm1-9h1V4H2v1h1zm-1 3h1.8L2 13.1v.9h3v-1H3.2L5 10.9V10H2zm5-6v2h14V5zm0 14h14v-2H7zm0-6h14v-2H7z"}),"FormatListNumbered"),x6=Fe(v.jsx("path",{d:"M6 17h3l2-4V7H5v6h3zm8 0h3l2-4V7h-6v6h3z"}),"FormatQuote"),S6=Fe(v.jsx("path",{d:"M9 4v3h5v12h3V7h5V4zm-6 8h3v7h3v-7h3V9H3z"}),"FormatSize"),C6=Fe(v.jsx("path",{d:"M12 17c3.31 0 6-2.69 6-6V3h-2.5v8c0 1.93-1.57 3.5-3.5 3.5S8.5 12.93 8.5 11V3H6v8c0 3.31 2.69 6 6 6m-7 2v2h14v-2z"}),"FormatUnderlined"),w6=Fe(v.jsx("path",{d:"M8 4v1.45l2 2V4h4v4h-3.45l2 2H14v1.45l2 2V10h4v4h-3.45l2 2H20v1.45l2 2V4c0-1.1-.9-2-2-2H4.55l2 2zm8 0h4v4h-4zM1.27 1.27 0 2.55l2 2V20c0 1.1.9 2 2 2h15.46l2 2 1.27-1.27zM10 12.55 11.45 14H10zm-6-6L5.45 8H4zM8 20H4v-4h4zm0-6H4v-4h3.45l.55.55zm6 6h-4v-4h3.45l.55.54zm2 0v-1.46L17.46 20z"}),"GridOff"),T6=Fe(v.jsx("path",{fillRule:"evenodd",d:"M4 11h16v2H4z"}),"HorizontalRule"),E6=Fe(v.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z"}),"Info"),k6=Fe(v.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown"),sI=Fe(v.jsx("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"}),"KeyboardArrowUp"),aI=Fe(v.jsx("path",{d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5M2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1m18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1M11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1m0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1M5.99 4.58c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41zm12.37 12.37c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0 .39-.39.39-1.03 0-1.41zm1.06-10.96c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0zM7.05 18.36c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0z"}),"LightMode"),H0=Fe(v.jsx("path",{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1M8 13h8v-2H8zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5"}),"Link"),M6=Fe(v.jsx("path",{d:"m17 7-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.58L17 17l5-5zM4 5h8V3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8v-2H4z"}),"Logout"),O6=Fe(v.jsx("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu"),R6=Fe(v.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext"),A6=Fe(v.jsx("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4"}),"Person"),I6=Fe(v.jsx("path",{d:"M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16c1.05-3.19 4.05-5.5 7.6-5.5 1.95 0 3.73.72 5.12 1.88L13 16h9V7z"}),"Redo"),D6=Fe(v.jsx("path",{d:"M19 13H5v-2h14z"}),"Remove"),P6=Fe(v.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m5 11H7v-2h10z"}),"RemoveCircle"),_6=Fe(v.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"SearchOutlined"),N6=Fe(v.jsx("path",{d:"M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z"}),"Sort"),L6=Fe(v.jsx("path",{d:"M6.85 7.08C6.85 4.37 9.45 3 12.24 3c1.64 0 3 .49 3.9 1.28.77.65 1.46 1.73 1.46 3.24h-3.01c0-.31-.05-.59-.15-.85-.29-.86-1.2-1.28-2.25-1.28-1.86 0-2.34 1.02-2.34 1.7 0 .48.25.88.74 1.21.38.25.77.48 1.41.7H7.39c-.21-.34-.54-.89-.54-1.92M21 12v-2H3v2h9.62c1.15.45 1.96.75 1.96 1.97 0 1-.81 1.67-2.28 1.67-1.54 0-2.93-.54-2.93-2.51H6.4c0 .55.08 1.13.24 1.58.81 2.29 3.29 3.3 5.67 3.3 2.27 0 5.3-.89 5.3-4.05 0-.3-.01-1.16-.48-1.94H21z"}),"StrikethroughS"),j6=Fe(v.jsx("path",{d:"M22 18h-2v1h3v1h-4v-2c0-.55.45-1 1-1h2v-1h-3v-1h3c.55 0 1 .45 1 1v1c0 .55-.45 1-1 1M5.88 18h2.66l3.4-5.42h.12l3.4 5.42h2.66l-4.65-7.27L17.81 4h-2.68l-3.07 4.99h-.12L8.85 4H6.19l4.32 6.73z"}),"Subscript"),$6=Fe(v.jsx("path",{d:"M22 7h-2v1h3v1h-4V7c0-.55.45-1 1-1h2V5h-3V4h3c.55 0 1 .45 1 1v1c0 .55-.45 1-1 1M5.88 20h2.66l3.4-5.42h.12l3.4 5.42h2.66l-4.65-7.27L17.81 6h-2.68l-3.07 4.99h-.12L8.85 6H6.19l4.32 6.73z"}),"Superscript"),F6=Fe(v.jsx("path",{d:"M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8"}),"Undo"),B6=t=>{const{onSearch:e,initialValue:n="",lazySearch:r=!1}=t,[o,i]=J.useState(n),s=f=>{i(f.target.value),r||e(f.target.value)},a=f=>{f.key==="Enter"&&l()},l=()=>{e(o)},u=()=>{i(""),e("")};return v.jsx(j.TextField,{type:"text",placeholder:"Search...",value:o,onChange:s,onKeyDown:a,className:"search-bar",size:"small",fullWidth:!0,slotProps:{input:{startAdornment:v.jsx(j.InputAdornment,{position:"start",children:v.jsx(j.IconButton,{"data-testid":"search-button",style:{marginLeft:-10},onClick:l,children:v.jsx(_6,{})})}),endAdornment:o&&v.jsx(j.IconButton,{style:{marginRight:-10},"aria-label":"clear search","data-testid":"clear-search",onClick:u,children:v.jsx(i6,{})})}}})};function te(){return te=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},te.apply(null,arguments)}function nt(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.includes(r))continue;n[r]=t[r]}return n}function qt({props:t,name:e}){return C4({props:t,name:e,defaultTheme:Tp,themeId:eu})}const V6=["localeText"],ff=P.createContext(null);process.env.NODE_ENV!=="production"&&(ff.displayName="MuiPickersAdapterContext");const W0=function(e){const{localeText:n}=e,r=nt(e,V6),{utils:o,localeText:i}=P.useContext(ff)??{utils:void 0,localeText:void 0},s=qt({props:r,name:"MuiLocalizationProvider"}),{children:a,dateAdapter:l,dateFormats:u,dateLibInstance:f,adapterLocale:h,localeText:m}=s,g=P.useMemo(()=>te({},m,i,n),[m,i,n]),b=P.useMemo(()=>{if(!l)return o||null;const C=new l({locale:h,formats:u,instance:f});if(!C.isMUIAdapter)throw new Error(["MUI X: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`","For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`","More information on the installation documentation: https://mui.com/x/react-date-pickers/getting-started/#installation"].join(`
105
+ `));return C},[l,h,u,f,o]),y=P.useMemo(()=>b?{minDate:b.date("1900-01-01T00:00:00.000"),maxDate:b.date("2099-12-31T00:00:00.000")}:null,[b]),S=P.useMemo(()=>({utils:b,defaultDates:y,localeText:g}),[y,b,g]);return v.jsx(ff.Provider,{value:S,children:a})};process.env.NODE_ENV!=="production"&&(W0.propTypes={adapterLocale:c.any,children:c.node,dateAdapter:c.func,dateFormats:c.shape({dayOfMonth:c.string,dayOfMonthFull:c.string,fullDate:c.string,fullTime:c.string,fullTime12h:c.string,fullTime24h:c.string,hours12h:c.string,hours24h:c.string,keyboardDate:c.string,keyboardDateTime:c.string,keyboardDateTime12h:c.string,keyboardDateTime24h:c.string,meridiem:c.string,minutes:c.string,month:c.string,monthShort:c.string,normalDate:c.string,normalDateWithWeekday:c.string,seconds:c.string,shortDate:c.string,weekday:c.string,weekdayShort:c.string,year:c.string}),dateLibInstance:c.any,localeText:c.object});var Hd={exports:{}},z6=Hd.exports,uT;function H6(){return uT||(uT=1,function(t,e){(function(n,r){t.exports=r()})(z6,function(){var n=1e3,r=6e4,o=36e5,i="millisecond",s="second",a="minute",l="hour",u="day",f="week",h="month",m="quarter",g="year",b="date",y="Invalid Date",S=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,E={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(V){var $=["th","st","nd","rd"],F=V%100;return"["+V+($[(F-20)%10]||$[F]||$[0])+"]"}},T=function(V,$,F){var W=String(V);return!W||W.length>=$?V:""+Array($+1-W.length).join(F)+V},w={s:T,z:function(V){var $=-V.utcOffset(),F=Math.abs($),W=Math.floor(F/60),U=F%60;return($<=0?"+":"-")+T(W,2,"0")+":"+T(U,2,"0")},m:function V($,F){if($.date()<F.date())return-V(F,$);var W=12*(F.year()-$.year())+(F.month()-$.month()),U=$.clone().add(W,h),G=F-U<0,Y=$.clone().add(W+(G?-1:1),h);return+(-(W+(F-U)/(G?U-Y:Y-U))||0)},a:function(V){return V<0?Math.ceil(V)||0:Math.floor(V)},p:function(V){return{M:h,y:g,w:f,d:u,D:b,h:l,m:a,s,ms:i,Q:m}[V]||String(V||"").toLowerCase().replace(/s$/,"")},u:function(V){return V===void 0}},M="en",R={};R[M]=E;var _="$isDayjsObject",I=function(V){return V instanceof L||!(!V||!V[_])},N=function V($,F,W){var U;if(!$)return M;if(typeof $=="string"){var G=$.toLowerCase();R[G]&&(U=G),F&&(R[G]=F,U=G);var Y=$.split("-");if(!U&&Y.length>1)return V(Y[0])}else{var Z=$.name;R[Z]=$,U=Z}return!W&&U&&(M=U),U||!W&&M},O=function(V,$){if(I(V))return V.clone();var F=typeof $=="object"?$:{};return F.date=V,F.args=arguments,new L(F)},A=w;A.l=N,A.i=I,A.w=function(V,$){return O(V,{locale:$.$L,utc:$.$u,x:$.$x,$offset:$.$offset})};var L=function(){function V(F){this.$L=N(F.locale,null,!0),this.parse(F),this.$x=this.$x||F.x||{},this[_]=!0}var $=V.prototype;return $.parse=function(F){this.$d=function(W){var U=W.date,G=W.utc;if(U===null)return new Date(NaN);if(A.u(U))return new Date;if(U instanceof Date)return new Date(U);if(typeof U=="string"&&!/Z$/i.test(U)){var Y=U.match(S);if(Y){var Z=Y[2]-1||0,me=(Y[7]||"0").substring(0,3);return G?new Date(Date.UTC(Y[1],Z,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,me)):new Date(Y[1],Z,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,me)}}return new Date(U)}(F),this.init()},$.init=function(){var F=this.$d;this.$y=F.getFullYear(),this.$M=F.getMonth(),this.$D=F.getDate(),this.$W=F.getDay(),this.$H=F.getHours(),this.$m=F.getMinutes(),this.$s=F.getSeconds(),this.$ms=F.getMilliseconds()},$.$utils=function(){return A},$.isValid=function(){return this.$d.toString()!==y},$.isSame=function(F,W){var U=O(F);return this.startOf(W)<=U&&U<=this.endOf(W)},$.isAfter=function(F,W){return O(F)<this.startOf(W)},$.isBefore=function(F,W){return this.endOf(W)<O(F)},$.$g=function(F,W,U){return A.u(F)?this[W]:this.set(U,F)},$.unix=function(){return Math.floor(this.valueOf()/1e3)},$.valueOf=function(){return this.$d.getTime()},$.startOf=function(F,W){var U=this,G=!!A.u(W)||W,Y=A.p(F),Z=function(Q,ie){var he=A.w(U.$u?Date.UTC(U.$y,ie,Q):new Date(U.$y,ie,Q),U);return G?he:he.endOf(u)},me=function(Q,ie){return A.w(U.toDate()[Q].apply(U.toDate("s"),(G?[0,0,0,0]:[23,59,59,999]).slice(ie)),U)},fe=this.$W,pe=this.$M,re=this.$D,ue="set"+(this.$u?"UTC":"");switch(Y){case g:return G?Z(1,0):Z(31,11);case h:return G?Z(1,pe):Z(0,pe+1);case f:var ae=this.$locale().weekStart||0,K=(fe<ae?fe+7:fe)-ae;return Z(G?re-K:re+(6-K),pe);case u:case b:return me(ue+"Hours",0);case l:return me(ue+"Minutes",1);case a:return me(ue+"Seconds",2);case s:return me(ue+"Milliseconds",3);default:return this.clone()}},$.endOf=function(F){return this.startOf(F,!1)},$.$set=function(F,W){var U,G=A.p(F),Y="set"+(this.$u?"UTC":""),Z=(U={},U[u]=Y+"Date",U[b]=Y+"Date",U[h]=Y+"Month",U[g]=Y+"FullYear",U[l]=Y+"Hours",U[a]=Y+"Minutes",U[s]=Y+"Seconds",U[i]=Y+"Milliseconds",U)[G],me=G===u?this.$D+(W-this.$W):W;if(G===h||G===g){var fe=this.clone().set(b,1);fe.$d[Z](me),fe.init(),this.$d=fe.set(b,Math.min(this.$D,fe.daysInMonth())).$d}else Z&&this.$d[Z](me);return this.init(),this},$.set=function(F,W){return this.clone().$set(F,W)},$.get=function(F){return this[A.p(F)]()},$.add=function(F,W){var U,G=this;F=Number(F);var Y=A.p(W),Z=function(pe){var re=O(G);return A.w(re.date(re.date()+Math.round(pe*F)),G)};if(Y===h)return this.set(h,this.$M+F);if(Y===g)return this.set(g,this.$y+F);if(Y===u)return Z(1);if(Y===f)return Z(7);var me=(U={},U[a]=r,U[l]=o,U[s]=n,U)[Y]||1,fe=this.$d.getTime()+F*me;return A.w(fe,this)},$.subtract=function(F,W){return this.add(-1*F,W)},$.format=function(F){var W=this,U=this.$locale();if(!this.isValid())return U.invalidDate||y;var G=F||"YYYY-MM-DDTHH:mm:ssZ",Y=A.z(this),Z=this.$H,me=this.$m,fe=this.$M,pe=U.weekdays,re=U.months,ue=U.meridiem,ae=function(ie,he,ee,se){return ie&&(ie[he]||ie(W,G))||ee[he].slice(0,se)},K=function(ie){return A.s(Z%12||12,ie,"0")},Q=ue||function(ie,he,ee){var se=ie<12?"AM":"PM";return ee?se.toLowerCase():se};return G.replace(C,function(ie,he){return he||function(ee){switch(ee){case"YY":return String(W.$y).slice(-2);case"YYYY":return A.s(W.$y,4,"0");case"M":return fe+1;case"MM":return A.s(fe+1,2,"0");case"MMM":return ae(U.monthsShort,fe,re,3);case"MMMM":return ae(re,fe);case"D":return W.$D;case"DD":return A.s(W.$D,2,"0");case"d":return String(W.$W);case"dd":return ae(U.weekdaysMin,W.$W,pe,2);case"ddd":return ae(U.weekdaysShort,W.$W,pe,3);case"dddd":return pe[W.$W];case"H":return String(Z);case"HH":return A.s(Z,2,"0");case"h":return K(1);case"hh":return K(2);case"a":return Q(Z,me,!0);case"A":return Q(Z,me,!1);case"m":return String(me);case"mm":return A.s(me,2,"0");case"s":return String(W.$s);case"ss":return A.s(W.$s,2,"0");case"SSS":return A.s(W.$ms,3,"0");case"Z":return Y}return null}(ie)||Y.replace(":","")})},$.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},$.diff=function(F,W,U){var G,Y=this,Z=A.p(W),me=O(F),fe=(me.utcOffset()-this.utcOffset())*r,pe=this-me,re=function(){return A.m(Y,me)};switch(Z){case g:G=re()/12;break;case h:G=re();break;case m:G=re()/3;break;case f:G=(pe-fe)/6048e5;break;case u:G=(pe-fe)/864e5;break;case l:G=pe/o;break;case a:G=pe/r;break;case s:G=pe/n;break;default:G=pe}return U?G:A.a(G)},$.daysInMonth=function(){return this.endOf(h).$D},$.$locale=function(){return R[this.$L]},$.locale=function(F,W){if(!F)return this.$L;var U=this.clone(),G=N(F,W,!0);return G&&(U.$L=G),U},$.clone=function(){return A.w(this.$d,this)},$.toDate=function(){return new Date(this.valueOf())},$.toJSON=function(){return this.isValid()?this.toISOString():null},$.toISOString=function(){return this.$d.toISOString()},$.toString=function(){return this.$d.toUTCString()},V}(),z=L.prototype;return O.prototype=z,[["$ms",i],["$s",s],["$m",a],["$H",l],["$W",u],["$M",h],["$y",g],["$D",b]].forEach(function(V){z[V[1]]=function($){return this.$g($,V[0],V[1])}}),O.extend=function(V,$){return V.$i||(V($,L,O),V.$i=!0),O},O.locale=N,O.isDayjs=I,O.unix=function(V){return O(1e3*V)},O.en=R[M],O.Ls=R,O.p={},O})}(Hd)),Hd.exports}var W6=H6();const pn=rr(W6);var Wd={exports:{}},q6=Wd.exports,dT;function U6(){return dT||(dT=1,function(t,e){(function(n,r){t.exports=r()})(q6,function(){var n="week",r="year";return function(o,i,s){var a=i.prototype;a.week=function(l){if(l===void 0&&(l=null),l!==null)return this.add(7*(l-this.week()),"day");var u=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var f=s(this).startOf(r).add(1,r).date(u),h=s(this).endOf(n);if(f.isBefore(h))return 1}var m=s(this).startOf(r).date(u).startOf(n).subtract(1,"millisecond"),g=this.diff(m,n,!0);return g<0?s(this).startOf("week").week():Math.ceil(g)},a.weeks=function(l){return l===void 0&&(l=null),this.week(l)}}})}(Wd)),Wd.exports}var K6=U6();const Y6=rr(K6);var qd={exports:{}},G6=qd.exports,fT;function J6(){return fT||(fT=1,function(t,e){(function(n,r){t.exports=r()})(G6,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,o=/\d/,i=/\d\d/,s=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,l={},u=function(S){return(S=+S)+(S>68?1900:2e3)},f=function(S){return function(C){this[S]=+C}},h=[/[+-]\d\d:?(\d\d)?|Z/,function(S){(this.zone||(this.zone={})).offset=function(C){if(!C||C==="Z")return 0;var E=C.match(/([+-]|\d\d)/g),T=60*E[1]+(+E[2]||0);return T===0?0:E[0]==="+"?-T:T}(S)}],m=function(S){var C=l[S];return C&&(C.indexOf?C:C.s.concat(C.f))},g=function(S,C){var E,T=l.meridiem;if(T){for(var w=1;w<=24;w+=1)if(S.indexOf(T(w,0,C))>-1){E=w>12;break}}else E=S===(C?"pm":"PM");return E},b={A:[a,function(S){this.afternoon=g(S,!1)}],a:[a,function(S){this.afternoon=g(S,!0)}],Q:[o,function(S){this.month=3*(S-1)+1}],S:[o,function(S){this.milliseconds=100*+S}],SS:[i,function(S){this.milliseconds=10*+S}],SSS:[/\d{3}/,function(S){this.milliseconds=+S}],s:[s,f("seconds")],ss:[s,f("seconds")],m:[s,f("minutes")],mm:[s,f("minutes")],H:[s,f("hours")],h:[s,f("hours")],HH:[s,f("hours")],hh:[s,f("hours")],D:[s,f("day")],DD:[i,f("day")],Do:[a,function(S){var C=l.ordinal,E=S.match(/\d+/);if(this.day=E[0],C)for(var T=1;T<=31;T+=1)C(T).replace(/\[|\]/g,"")===S&&(this.day=T)}],w:[s,f("week")],ww:[i,f("week")],M:[s,f("month")],MM:[i,f("month")],MMM:[a,function(S){var C=m("months"),E=(m("monthsShort")||C.map(function(T){return T.slice(0,3)})).indexOf(S)+1;if(E<1)throw new Error;this.month=E%12||E}],MMMM:[a,function(S){var C=m("months").indexOf(S)+1;if(C<1)throw new Error;this.month=C%12||C}],Y:[/[+-]?\d+/,f("year")],YY:[i,function(S){this.year=u(S)}],YYYY:[/\d{4}/,f("year")],Z:h,ZZ:h};function y(S){var C,E;C=S,E=l&&l.formats;for(var T=(S=C.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(O,A,L){var z=L&&L.toUpperCase();return A||E[L]||n[L]||E[z].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(V,$,F){return $||F.slice(1)})})).match(r),w=T.length,M=0;M<w;M+=1){var R=T[M],_=b[R],I=_&&_[0],N=_&&_[1];T[M]=N?{regex:I,parser:N}:R.replace(/^\[|\]$/g,"")}return function(O){for(var A={},L=0,z=0;L<w;L+=1){var V=T[L];if(typeof V=="string")z+=V.length;else{var $=V.regex,F=V.parser,W=O.slice(z),U=$.exec(W)[0];F.call(A,U),O=O.replace(U,"")}}return function(G){var Y=G.afternoon;if(Y!==void 0){var Z=G.hours;Y?Z<12&&(G.hours+=12):Z===12&&(G.hours=0),delete G.afternoon}}(A),A}}return function(S,C,E){E.p.customParseFormat=!0,S&&S.parseTwoDigitYear&&(u=S.parseTwoDigitYear);var T=C.prototype,w=T.parse;T.parse=function(M){var R=M.date,_=M.utc,I=M.args;this.$u=_;var N=I[1];if(typeof N=="string"){var O=I[2]===!0,A=I[3]===!0,L=O||A,z=I[2];A&&(z=I[2]),l=this.$locale(),!O&&z&&(l=E.Ls[z]),this.$d=function(W,U,G,Y){try{if(["x","X"].indexOf(U)>-1)return new Date((U==="X"?1e3:1)*W);var Z=y(U)(W),me=Z.year,fe=Z.month,pe=Z.day,re=Z.hours,ue=Z.minutes,ae=Z.seconds,K=Z.milliseconds,Q=Z.zone,ie=Z.week,he=new Date,ee=pe||(me||fe?1:he.getDate()),se=me||he.getFullYear(),le=0;me&&!fe||(le=fe>0?fe-1:he.getMonth());var ge,we=re||0,xe=ue||0,Me=ae||0,_e=K||0;return Q?new Date(Date.UTC(se,le,ee,we,xe,Me,_e+60*Q.offset*1e3)):G?new Date(Date.UTC(se,le,ee,we,xe,Me,_e)):(ge=new Date(se,le,ee,we,xe,Me,_e),ie&&(ge=Y(ge).week(ie).toDate()),ge)}catch{return new Date("")}}(R,N,_,E),this.init(),z&&z!==!0&&(this.$L=this.locale(z).$L),L&&R!=this.format(N)&&(this.$d=new Date("")),l={}}else if(N instanceof Array)for(var V=N.length,$=1;$<=V;$+=1){I[1]=N[$-1];var F=E.apply(this,I);if(F.isValid()){this.$d=F.$d,this.$L=F.$L,this.init();break}$===V&&(this.$d=new Date(""))}else w.call(this,M)}}})}(qd)),qd.exports}var Z6=J6();const X6=rr(Z6);var Ud={exports:{}},Q6=Ud.exports,pT;function eW(){return pT||(pT=1,function(t,e){(function(n,r){t.exports=r()})(Q6,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(r,o,i){var s=o.prototype,a=s.format;i.en.formats=n,s.format=function(l){l===void 0&&(l="YYYY-MM-DDTHH:mm:ssZ");var u=this.$locale().formats,f=function(h,m){return h.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(g,b,y){var S=y&&y.toUpperCase();return b||m[y]||n[y]||m[S].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(C,E,T){return E||T.slice(1)})})}(l,u===void 0?{}:u);return a.call(this,f)}}})}(Ud)),Ud.exports}var tW=eW();const nW=rr(tW);var Kd={exports:{}},rW=Kd.exports,hT;function oW(){return hT||(hT=1,function(t,e){(function(n,r){t.exports=r()})(rW,function(){return function(n,r,o){r.prototype.isBetween=function(i,s,a,l){var u=o(i),f=o(s),h=(l=l||"()")[0]==="(",m=l[1]===")";return(h?this.isAfter(u,a):!this.isBefore(u,a))&&(m?this.isBefore(f,a):!this.isAfter(f,a))||(h?this.isBefore(u,a):!this.isAfter(u,a))&&(m?this.isAfter(f,a):!this.isBefore(f,a))}}})}(Kd)),Kd.exports}var iW=oW();const sW=rr(iW);var Yd={exports:{}},aW=Yd.exports,mT;function lW(){return mT||(mT=1,function(t,e){(function(n,r){t.exports=r()})(aW,function(){return function(n,r){var o=r.prototype,i=o.format;o.format=function(s){var a=this,l=this.$locale();if(!this.isValid())return i.bind(this)(s);var u=this.$utils(),f=(s||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(h){switch(h){case"Q":return Math.ceil((a.$M+1)/3);case"Do":return l.ordinal(a.$D);case"gggg":return a.weekYear();case"GGGG":return a.isoWeekYear();case"wo":return l.ordinal(a.week(),"W");case"w":case"ww":return u.s(a.week(),h==="w"?1:2,"0");case"W":case"WW":return u.s(a.isoWeek(),h==="W"?1:2,"0");case"k":case"kk":return u.s(String(a.$H===0?24:a.$H),h==="k"?1:2,"0");case"X":return Math.floor(a.$d.getTime()/1e3);case"x":return a.$d.getTime();case"z":return"["+a.offsetName()+"]";case"zzz":return"["+a.offsetName("long")+"]";default:return h}});return i.bind(this)(f)}}})}(Yd)),Yd.exports}var cW=lW();const uW=rr(cW),gT=new Set;function lI(t,e="warning"){if(process.env.NODE_ENV==="production")return;const n=Array.isArray(t)?t.join(`
106
+ `):t;gT.has(n)||(gT.add(n),e==="error"?console.error(n):console.warn(n))}pn.extend(nW);pn.extend(Y6);pn.extend(sW);pn.extend(uW);const dW={YY:"year",YYYY:{sectionType:"year",contentType:"digit",maxLength:4},M:{sectionType:"month",contentType:"digit",maxLength:2},MM:"month",MMM:{sectionType:"month",contentType:"letter"},MMMM:{sectionType:"month",contentType:"letter"},D:{sectionType:"day",contentType:"digit",maxLength:2},DD:"day",Do:{sectionType:"day",contentType:"digit-with-letter"},d:{sectionType:"weekDay",contentType:"digit",maxLength:2},dd:{sectionType:"weekDay",contentType:"letter"},ddd:{sectionType:"weekDay",contentType:"letter"},dddd:{sectionType:"weekDay",contentType:"letter"},A:"meridiem",a:"meridiem",H:{sectionType:"hours",contentType:"digit",maxLength:2},HH:"hours",h:{sectionType:"hours",contentType:"digit",maxLength:2},hh:"hours",m:{sectionType:"minutes",contentType:"digit",maxLength:2},mm:"minutes",s:{sectionType:"seconds",contentType:"digit",maxLength:2},ss:"seconds"},fW={year:"YYYY",month:"MMMM",monthShort:"MMM",dayOfMonth:"D",dayOfMonthFull:"Do",weekday:"dddd",weekdayShort:"dd",hours24h:"HH",hours12h:"hh",meridiem:"A",minutes:"mm",seconds:"ss",fullDate:"ll",keyboardDate:"L",shortDate:"MMM D",normalDate:"D MMMM",normalDateWithWeekday:"ddd, MMM D",fullTime:"LT",fullTime12h:"hh:mm A",fullTime24h:"HH:mm",keyboardDateTime:"L LT",keyboardDateTime12h:"L hh:mm A",keyboardDateTime24h:"L HH:mm"},Xm=["Missing UTC plugin","To be able to use UTC or timezones, you have to enable the `utc` plugin","Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-utc"].join(`
107
+ `),yT=["Missing timezone plugin","To be able to use timezones, you have to enable both the `utc` and the `timezone` plugin","Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-timezone"].join(`
108
+ `),pW=(t,e)=>e?(...n)=>t(...n).locale(e):t;class hW{constructor({locale:e,formats:n}={}){this.isMUIAdapter=!0,this.isTimezoneCompatible=!0,this.lib="dayjs",this.dayjs=void 0,this.locale=void 0,this.formats=void 0,this.escapedCharacters={start:"[",end:"]"},this.formatTokenMap=dW,this.setLocaleToValue=r=>{const o=this.getCurrentLocaleCode();return o===r.locale()?r:r.locale(o)},this.hasUTCPlugin=()=>typeof pn.utc<"u",this.hasTimezonePlugin=()=>typeof pn.tz<"u",this.isSame=(r,o,i)=>{const s=this.setTimezone(o,this.getTimezone(r));return r.format(i)===s.format(i)},this.cleanTimezone=r=>{switch(r){case"default":return;case"system":return pn.tz.guess();default:return r}},this.createSystemDate=r=>{if(this.hasUTCPlugin()&&this.hasTimezonePlugin()){const o=pn.tz.guess();return o!=="UTC"?pn.tz(r,o):pn(r)}return pn(r)},this.createUTCDate=r=>{if(!this.hasUTCPlugin())throw new Error(Xm);return pn.utc(r)},this.createTZDate=(r,o)=>{if(!this.hasUTCPlugin())throw new Error(Xm);if(!this.hasTimezonePlugin())throw new Error(yT);const i=r!==void 0&&!r.endsWith("Z");return pn(r).tz(this.cleanTimezone(o),i)},this.getLocaleFormats=()=>{const r=pn.Ls,o=this.locale||"en";let i=r[o];return i===void 0&&(process.env.NODE_ENV!=="production"&&lI(["MUI X: Your locale has not been found.","Either the locale key is not a supported one. Locales supported by dayjs are available here: https://github.com/iamkun/dayjs/tree/dev/src/locale.","Or you forget to import the locale from 'dayjs/locale/{localeUsed}'","fallback on English locale."]),i=r.en),i.formats},this.adjustOffset=r=>{if(!this.hasTimezonePlugin())return r;const o=this.getTimezone(r);if(o!=="UTC"){const i=r.tz(this.cleanTimezone(o),!0);if(i.$offset===(r.$offset??0))return r;r.$offset=i.$offset}return r},this.date=(r,o="default")=>{if(r===null)return null;let i;return o==="UTC"?i=this.createUTCDate(r):o==="system"||o==="default"&&!this.hasTimezonePlugin()?i=this.createSystemDate(r):i=this.createTZDate(r,o),this.locale===void 0?i:i.locale(this.locale)},this.getInvalidDate=()=>pn(new Date("Invalid date")),this.getTimezone=r=>{var o;if(this.hasTimezonePlugin()){const i=(o=r.$x)==null?void 0:o.$timezone;if(i)return i}return this.hasUTCPlugin()&&r.isUTC()?"UTC":"system"},this.setTimezone=(r,o)=>{if(this.getTimezone(r)===o)return r;if(o==="UTC"){if(!this.hasUTCPlugin())throw new Error(Xm);return r.utc()}if(o==="system")return r.local();if(!this.hasTimezonePlugin()){if(o==="default")return r;throw new Error(yT)}return pn.tz(r,this.cleanTimezone(o))},this.toJsDate=r=>r.toDate(),this.parse=(r,o)=>r===""?null:this.dayjs(r,o,this.locale,!0),this.getCurrentLocaleCode=()=>this.locale||"en",this.is12HourCycleInCurrentLocale=()=>/A|a/.test(this.getLocaleFormats().LT||""),this.expandFormat=r=>{const o=this.getLocaleFormats(),i=s=>s.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(a,l,u)=>l||u.slice(1));return r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(s,a,l)=>{const u=l&&l.toUpperCase();return a||o[l]||i(o[u])})},this.isValid=r=>r==null?!1:r.isValid(),this.format=(r,o)=>this.formatByString(r,this.formats[o]),this.formatByString=(r,o)=>this.dayjs(r).format(o),this.formatNumber=r=>r,this.isEqual=(r,o)=>r===null&&o===null?!0:r===null||o===null?!1:r.toDate().getTime()===o.toDate().getTime(),this.isSameYear=(r,o)=>this.isSame(r,o,"YYYY"),this.isSameMonth=(r,o)=>this.isSame(r,o,"YYYY-MM"),this.isSameDay=(r,o)=>this.isSame(r,o,"YYYY-MM-DD"),this.isSameHour=(r,o)=>r.isSame(o,"hour"),this.isAfter=(r,o)=>r>o,this.isAfterYear=(r,o)=>this.hasUTCPlugin()?!this.isSameYear(r,o)&&r.utc()>o.utc():r.isAfter(o,"year"),this.isAfterDay=(r,o)=>this.hasUTCPlugin()?!this.isSameDay(r,o)&&r.utc()>o.utc():r.isAfter(o,"day"),this.isBefore=(r,o)=>r<o,this.isBeforeYear=(r,o)=>this.hasUTCPlugin()?!this.isSameYear(r,o)&&r.utc()<o.utc():r.isBefore(o,"year"),this.isBeforeDay=(r,o)=>this.hasUTCPlugin()?!this.isSameDay(r,o)&&r.utc()<o.utc():r.isBefore(o,"day"),this.isWithinRange=(r,[o,i])=>r>=o&&r<=i,this.startOfYear=r=>this.adjustOffset(r.startOf("year")),this.startOfMonth=r=>this.adjustOffset(r.startOf("month")),this.startOfWeek=r=>this.adjustOffset(this.setLocaleToValue(r).startOf("week")),this.startOfDay=r=>this.adjustOffset(r.startOf("day")),this.endOfYear=r=>this.adjustOffset(r.endOf("year")),this.endOfMonth=r=>this.adjustOffset(r.endOf("month")),this.endOfWeek=r=>this.adjustOffset(this.setLocaleToValue(r).endOf("week")),this.endOfDay=r=>this.adjustOffset(r.endOf("day")),this.addYears=(r,o)=>this.adjustOffset(o<0?r.subtract(Math.abs(o),"year"):r.add(o,"year")),this.addMonths=(r,o)=>this.adjustOffset(o<0?r.subtract(Math.abs(o),"month"):r.add(o,"month")),this.addWeeks=(r,o)=>this.adjustOffset(o<0?r.subtract(Math.abs(o),"week"):r.add(o,"week")),this.addDays=(r,o)=>this.adjustOffset(o<0?r.subtract(Math.abs(o),"day"):r.add(o,"day")),this.addHours=(r,o)=>this.adjustOffset(o<0?r.subtract(Math.abs(o),"hour"):r.add(o,"hour")),this.addMinutes=(r,o)=>this.adjustOffset(o<0?r.subtract(Math.abs(o),"minute"):r.add(o,"minute")),this.addSeconds=(r,o)=>this.adjustOffset(o<0?r.subtract(Math.abs(o),"second"):r.add(o,"second")),this.getYear=r=>r.year(),this.getMonth=r=>r.month(),this.getDate=r=>r.date(),this.getHours=r=>r.hour(),this.getMinutes=r=>r.minute(),this.getSeconds=r=>r.second(),this.getMilliseconds=r=>r.millisecond(),this.setYear=(r,o)=>this.adjustOffset(r.set("year",o)),this.setMonth=(r,o)=>this.adjustOffset(r.set("month",o)),this.setDate=(r,o)=>this.adjustOffset(r.set("date",o)),this.setHours=(r,o)=>this.adjustOffset(r.set("hour",o)),this.setMinutes=(r,o)=>this.adjustOffset(r.set("minute",o)),this.setSeconds=(r,o)=>this.adjustOffset(r.set("second",o)),this.setMilliseconds=(r,o)=>this.adjustOffset(r.set("millisecond",o)),this.getDaysInMonth=r=>r.daysInMonth(),this.getWeekArray=r=>{const o=this.startOfWeek(this.startOfMonth(r)),i=this.endOfWeek(this.endOfMonth(r));let s=0,a=o;const l=[];for(;a<i;){const u=Math.floor(s/7);l[u]=l[u]||[],l[u].push(a),a=this.addDays(a,1),s+=1}return l},this.getWeekNumber=r=>r.week(),this.getYearRange=([r,o])=>{const i=this.startOfYear(r),s=this.endOfYear(o),a=[];let l=i;for(;this.isBefore(l,s);)a.push(l),l=this.addYears(l,1);return a},this.dayjs=pW(pn,e),this.locale=e,this.formats=te({},fW,n),pn.extend(X6)}getDayOfWeek(e){return e.day()+1}}function pd(t){return parseInt(t,10)||0}const mW={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function gW(t){for(const e in t)return!1;return!0}function bT(t){return gW(t)||t.outerHeightStyle===0&&!t.overflowing}const cI=P.forwardRef(function(e,n){const{onChange:r,maxRows:o,minRows:i=1,style:s,value:a,...l}=e,{current:u}=P.useRef(a!=null),f=P.useRef(null),h=kt(n,f),m=P.useRef(null),g=P.useRef(null),b=P.useCallback(()=>{const T=f.current,w=g.current;if(!T||!w)return;const R=si(T).getComputedStyle(T);if(R.width==="0px")return{outerHeightStyle:0,overflowing:!1};w.style.width=R.width,w.value=T.value||e.placeholder||"x",w.value.slice(-1)===`
109
+ `&&(w.value+=" ");const _=R.boxSizing,I=pd(R.paddingBottom)+pd(R.paddingTop),N=pd(R.borderBottomWidth)+pd(R.borderTopWidth),O=w.scrollHeight;w.value="x";const A=w.scrollHeight;let L=O;i&&(L=Math.max(Number(i)*A,L)),o&&(L=Math.min(Number(o)*A,L)),L=Math.max(L,A);const z=L+(_==="border-box"?I+N:0),V=Math.abs(L-O)<=1;return{outerHeightStyle:z,overflowing:V}},[o,i,e.placeholder]),y=je(()=>{const T=f.current,w=b();if(!T||!w||bT(w))return!1;const M=w.outerHeightStyle;return m.current!=null&&m.current!==M}),S=P.useCallback(()=>{const T=f.current,w=b();if(!T||!w||bT(w))return;const M=w.outerHeightStyle;m.current!==M&&(m.current=M,T.style.height=`${M}px`),T.style.overflow=w.overflowing?"hidden":""},[b]),C=P.useRef(-1);Rn(()=>{const T=xA(S),w=f==null?void 0:f.current;if(!w)return;const M=si(w);M.addEventListener("resize",T);let R;return typeof ResizeObserver<"u"&&(R=new ResizeObserver(()=>{y()&&(R.unobserve(w),cancelAnimationFrame(C.current),S(),C.current=requestAnimationFrame(()=>{R.observe(w)}))}),R.observe(w)),()=>{T.clear(),cancelAnimationFrame(C.current),M.removeEventListener("resize",T),R&&R.disconnect()}},[b,S,y]),Rn(()=>{S()});const E=T=>{u||S(),r&&r(T)};return v.jsxs(P.Fragment,{children:[v.jsx("textarea",{value:a,onChange:E,ref:h,rows:i,style:s,...l}),v.jsx("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:g,tabIndex:-1,style:{...mW.shadow,...s,paddingTop:0,paddingBottom:0}})]})});process.env.NODE_ENV!=="production"&&(cI.propTypes={className:c.string,maxRows:c.oneOfType([c.number,c.string]),minRows:c.oneOfType([c.number,c.string]),onChange:c.func,placeholder:c.string,style:c.object,value:c.oneOfType([c.arrayOf(c.string),c.number,c.string])});function Mc(t){return typeof t=="string"}function cl({props:t,states:e,muiFormControl:n}){return e.reduce((r,o)=>(r[o]=t[o],n&&typeof t[o]>"u"&&(r[o]=n[o]),r),{})}const nu=P.createContext(void 0);process.env.NODE_ENV!=="production"&&(nu.displayName="FormControlContext");function uo(){return P.useContext(nu)}function vT(t){return t!=null&&!(Array.isArray(t)&&t.length===0)}function pf(t,e=!1){return t&&(vT(t.value)&&t.value!==""||e&&vT(t.defaultValue)&&t.defaultValue!=="")}function yW(t){return t.startAdornment}function bW(t){return Ke("MuiInputBase",t)}const Ga=He("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var xT;const kp=(t,e)=>{const{ownerState:n}=t;return[e.root,n.formControl&&e.formControl,n.startAdornment&&e.adornedStart,n.endAdornment&&e.adornedEnd,n.error&&e.error,n.size==="small"&&e.sizeSmall,n.multiline&&e.multiline,n.color&&e[`color${Re(n.color)}`],n.fullWidth&&e.fullWidth,n.hiddenLabel&&e.hiddenLabel]},Mp=(t,e)=>{const{ownerState:n}=t;return[e.input,n.size==="small"&&e.inputSizeSmall,n.multiline&&e.inputMultiline,n.type==="search"&&e.inputTypeSearch,n.startAdornment&&e.inputAdornedStart,n.endAdornment&&e.inputAdornedEnd,n.hiddenLabel&&e.inputHiddenLabel]},vW=t=>{const{classes:e,color:n,disabled:r,error:o,endAdornment:i,focused:s,formControl:a,fullWidth:l,hiddenLabel:u,multiline:f,readOnly:h,size:m,startAdornment:g,type:b}=t,y={root:["root",`color${Re(n)}`,r&&"disabled",o&&"error",l&&"fullWidth",s&&"focused",a&&"formControl",m&&m!=="medium"&&`size${Re(m)}`,f&&"multiline",g&&"adornedStart",i&&"adornedEnd",u&&"hiddenLabel",h&&"readOnly"],input:["input",r&&"disabled",b==="search"&&"inputTypeSearch",f&&"inputMultiline",m==="small"&&"inputSizeSmall",u&&"inputHiddenLabel",g&&"inputAdornedStart",i&&"inputAdornedEnd",h&&"readOnly"]};return Ue(y,bW,e)},Op=ye("div",{name:"MuiInputBase",slot:"Root",overridesResolver:kp})(It(({theme:t})=>({...t.typography.body1,color:(t.vars||t).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${Ga.disabled}`]:{color:(t.vars||t).palette.text.disabled,cursor:"default"},variants:[{props:({ownerState:e})=>e.multiline,style:{padding:"4px 0 5px"}},{props:({ownerState:e,size:n})=>e.multiline&&n==="small",style:{paddingTop:1}},{props:({ownerState:e})=>e.fullWidth,style:{width:"100%"}}]}))),Rp=ye("input",{name:"MuiInputBase",slot:"Input",overridesResolver:Mp})(It(({theme:t})=>{const e=t.palette.mode==="light",n={color:"currentColor",...t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:e?.42:.5},transition:t.transitions.create("opacity",{duration:t.transitions.duration.shorter})},r={opacity:"0 !important"},o=t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:e?.42:.5};return{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${Ga.formControl} &`]:{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":o,"&:focus::-moz-placeholder":o,"&:focus::-ms-input-placeholder":o},[`&.${Ga.disabled}`]:{opacity:1,WebkitTextFillColor:(t.vars||t).palette.text.disabled},variants:[{props:({ownerState:i})=>!i.disableInjectingGlobalStyles,style:{animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}}},{props:{size:"small"},style:{paddingTop:1}},{props:({ownerState:i})=>i.multiline,style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}})),ST=bH({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),Ap=P.forwardRef(function(e,n){const r=xt({props:e,name:"MuiInputBase"}),{"aria-describedby":o,autoComplete:i,autoFocus:s,className:a,color:l,components:u={},componentsProps:f={},defaultValue:h,disabled:m,disableInjectingGlobalStyles:g,endAdornment:b,error:y,fullWidth:S=!1,id:C,inputComponent:E="input",inputProps:T={},inputRef:w,margin:M,maxRows:R,minRows:_,multiline:I=!1,name:N,onBlur:O,onChange:A,onClick:L,onFocus:z,onKeyDown:V,onKeyUp:$,placeholder:F,readOnly:W,renderSuffix:U,rows:G,size:Y,slotProps:Z={},slots:me={},startAdornment:fe,type:pe="text",value:re,...ue}=r,ae=T.value!=null?T.value:re,{current:K}=P.useRef(ae!=null),Q=P.useRef(),ie=P.useCallback(ut=>{process.env.NODE_ENV!=="production"&&ut&&ut.nodeName!=="INPUT"&&!ut.focus&&console.error(["MUI: You have provided a `inputComponent` to the input component","that does not correctly handle the `ref` prop.","Make sure the `ref` prop is called with a HTMLInputElement."].join(`
110
+ `))},[]),he=kt(Q,w,T.ref,ie),[ee,se]=P.useState(!1),le=uo();process.env.NODE_ENV!=="production"&&P.useEffect(()=>{if(le)return le.registerEffect()},[le]);const ge=cl({props:r,muiFormControl:le,states:["color","disabled","error","hiddenLabel","size","required","filled"]});ge.focused=le?le.focused:ee,P.useEffect(()=>{!le&&m&&ee&&(se(!1),O&&O())},[le,m,ee,O]);const we=le&&le.onFilled,xe=le&&le.onEmpty,Me=P.useCallback(ut=>{pf(ut)?we&&we():xe&&xe()},[we,xe]);Rn(()=>{K&&Me({value:ae})},[ae,Me,K]);const _e=ut=>{z&&z(ut),T.onFocus&&T.onFocus(ut),le&&le.onFocus?le.onFocus(ut):se(!0)},Ve=ut=>{O&&O(ut),T.onBlur&&T.onBlur(ut),le&&le.onBlur?le.onBlur(ut):se(!1)},Ye=(ut,...An)=>{if(!K){const Vt=ut.target||Q.current;if(Vt==null)throw new Error(process.env.NODE_ENV!=="production"?"MUI: Expected valid input target. Did you use a custom `inputComponent` and forget to forward refs? See https://mui.com/r/input-component-ref-interface for more info.":Oo(1));Me({value:Vt.value})}T.onChange&&T.onChange(ut,...An),A&&A(ut,...An)};P.useEffect(()=>{Me(Q.current)},[]);const Ie=ut=>{Q.current&&ut.currentTarget===ut.target&&Q.current.focus(),L&&L(ut)};let it=E,vt=T;I&&it==="input"&&(G?(process.env.NODE_ENV!=="production"&&(_||R)&&console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."),vt={type:void 0,minRows:G,maxRows:G,...vt}):vt={type:void 0,maxRows:R,minRows:_,...vt},it=cI);const Yt=ut=>{Me(ut.animationName==="mui-auto-fill-cancel"?Q.current:{value:"x"})};P.useEffect(()=>{le&&le.setAdornedStart(!!fe)},[le,fe]);const yn={...r,color:ge.color||"primary",disabled:ge.disabled,endAdornment:b,error:ge.error,focused:ge.focused,formControl:le,fullWidth:S,hiddenLabel:ge.hiddenLabel,multiline:I,size:ge.size,startAdornment:fe,type:pe},tn=vW(yn),Dt=me.root||u.Root||Op,Sn=Z.root||f.root||{},jn=me.input||u.Input||Rp;return vt={...vt,...Z.input??f.input},v.jsxs(P.Fragment,{children:[!g&&typeof ST=="function"&&(xT||(xT=v.jsx(ST,{}))),v.jsxs(Dt,{...Sn,ref:n,onClick:Ie,...ue,...!Mc(Dt)&&{ownerState:{...yn,...Sn.ownerState}},className:Pe(tn.root,Sn.className,a,W&&"MuiInputBase-readOnly"),children:[fe,v.jsx(nu.Provider,{value:null,children:v.jsx(jn,{"aria-invalid":ge.error,"aria-describedby":o,autoComplete:i,autoFocus:s,defaultValue:h,disabled:ge.disabled,id:C,onAnimationStart:Yt,name:N,placeholder:F,readOnly:W,required:ge.required,rows:G,value:ae,onKeyDown:V,onKeyUp:$,type:pe,...vt,...!Mc(jn)&&{as:it,ownerState:{...yn,...vt.ownerState}},ref:he,className:Pe(tn.input,vt.className,W&&"MuiInputBase-readOnly"),onBlur:Ve,onChange:Ye,onFocus:_e})}),b,U?U({...ge,startAdornment:fe}):null]})]})});process.env.NODE_ENV!=="production"&&(Ap.propTypes={"aria-describedby":c.string,autoComplete:c.string,autoFocus:c.bool,classes:c.object,className:c.string,color:c.oneOfType([c.oneOf(["primary","secondary","error","info","success","warning"]),c.string]),components:c.shape({Input:c.elementType,Root:c.elementType}),componentsProps:c.shape({input:c.object,root:c.object}),defaultValue:c.any,disabled:c.bool,disableInjectingGlobalStyles:c.bool,endAdornment:c.node,error:c.bool,fullWidth:c.bool,id:c.string,inputComponent:fp,inputProps:c.object,inputRef:mn,margin:c.oneOf(["dense","none"]),maxRows:c.oneOfType([c.number,c.string]),minRows:c.oneOfType([c.number,c.string]),multiline:c.bool,name:c.string,onBlur:c.func,onChange:c.func,onClick:c.func,onFocus:c.func,onInvalid:c.func,onKeyDown:c.func,onKeyUp:c.func,placeholder:c.string,readOnly:c.bool,renderSuffix:c.func,required:c.bool,rows:c.oneOfType([c.number,c.string]),size:c.oneOfType([c.oneOf(["medium","small"]),c.string]),slotProps:c.shape({input:c.object,root:c.object}),slots:c.shape({input:c.elementType,root:c.elementType}),startAdornment:c.node,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),type:c.string,value:c.any});function xW(t){return typeof t.main=="string"}function SW(t,e=[]){if(!xW(t))return!1;for(const n of e)if(!t.hasOwnProperty(n)||typeof t[n]!="string")return!1;return!0}function Vn(t=[]){return([,e])=>e&&SW(e,t)}function CW(t){return Ke("MuiInput",t)}const Nl={...Ga,...He("MuiInput",["root","underline","input"])},wW=t=>{const{classes:e,disableUnderline:n}=t,o=Ue({root:["root",!n&&"underline"],input:["input"]},CW,e);return{...e,...o}},TW=ye(Op,{shouldForwardProp:t=>lo(t)||t==="classes",name:"MuiInput",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[...kp(t,e),!n.disableUnderline&&e.underline]}})(It(({theme:t})=>{let n=t.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return t.vars&&(n=`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`),{position:"relative",variants:[{props:({ownerState:r})=>r.formControl,style:{"label + &":{marginTop:16}}},{props:({ownerState:r})=>!r.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Nl.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Nl.error}`]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Nl.disabled}, .${Nl.error}):before`]:{borderBottom:`2px solid ${(t.vars||t).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${Nl.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(t.palette).filter(Vn()).map(([r])=>({props:{color:r,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(t.vars||t).palette[r].main}`}}}))]}})),EW=ye(Rp,{name:"MuiInput",slot:"Input",overridesResolver:Mp})({}),Ip=P.forwardRef(function(e,n){const r=xt({props:e,name:"MuiInput"}),{disableUnderline:o=!1,components:i={},componentsProps:s,fullWidth:a=!1,inputComponent:l="input",multiline:u=!1,slotProps:f,slots:h={},type:m="text",...g}=r,b=wW(r),S={root:{ownerState:{disableUnderline:o}}},C=f??s?Hn(f??s,S):S,E=h.root??i.Root??TW,T=h.input??i.Input??EW;return v.jsx(Ap,{slots:{root:E,input:T},slotProps:C,fullWidth:a,inputComponent:l,multiline:u,ref:n,type:m,...g,classes:b})});process.env.NODE_ENV!=="production"&&(Ip.propTypes={autoComplete:c.string,autoFocus:c.bool,classes:c.object,color:c.oneOfType([c.oneOf(["primary","secondary"]),c.string]),components:c.shape({Input:c.elementType,Root:c.elementType}),componentsProps:c.shape({input:c.object,root:c.object}),defaultValue:c.any,disabled:c.bool,disableUnderline:c.bool,endAdornment:c.node,error:c.bool,fullWidth:c.bool,id:c.string,inputComponent:c.elementType,inputProps:c.object,inputRef:mn,margin:c.oneOf(["dense","none"]),maxRows:c.oneOfType([c.number,c.string]),minRows:c.oneOfType([c.number,c.string]),multiline:c.bool,name:c.string,onChange:c.func,placeholder:c.string,readOnly:c.bool,required:c.bool,rows:c.oneOfType([c.number,c.string]),slotProps:c.shape({input:c.object,root:c.object}),slots:c.shape({input:c.elementType,root:c.elementType}),startAdornment:c.node,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),type:c.string,value:c.any});Ip.muiName="Input";function kW(t){return Ke("MuiFilledInput",t)}const ps={...Ga,...He("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])},MW=t=>{const{classes:e,disableUnderline:n,startAdornment:r,endAdornment:o,size:i,hiddenLabel:s,multiline:a}=t,l={root:["root",!n&&"underline",r&&"adornedStart",o&&"adornedEnd",i==="small"&&`size${Re(i)}`,s&&"hiddenLabel",a&&"multiline"],input:["input"]},u=Ue(l,kW,e);return{...e,...u}},OW=ye(Op,{shouldForwardProp:t=>lo(t)||t==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[...kp(t,e),!n.disableUnderline&&e.underline]}})(It(({theme:t})=>{const e=t.palette.mode==="light",n=e?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=e?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",o=e?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",i=e?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{position:"relative",backgroundColor:t.vars?t.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(t.vars||t).shape.borderRadius,borderTopRightRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),"&:hover":{backgroundColor:t.vars?t.vars.palette.FilledInput.hoverBg:o,"@media (hover: none)":{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:r}},[`&.${ps.focused}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:r},[`&.${ps.disabled}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.disabledBg:i},variants:[{props:({ownerState:s})=>!s.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${ps.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${ps.error}`]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:`1px solid ${t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`:n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${ps.disabled}, .${ps.error}):before`]:{borderBottom:`1px solid ${(t.vars||t).palette.text.primary}`},[`&.${ps.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(t.palette).filter(Vn()).map(([s])=>{var a;return{props:{disableUnderline:!1,color:s},style:{"&::after":{borderBottom:`2px solid ${(a=(t.vars||t).palette[s])==null?void 0:a.main}`}}}}),{props:({ownerState:s})=>s.startAdornment,style:{paddingLeft:12}},{props:({ownerState:s})=>s.endAdornment,style:{paddingRight:12}},{props:({ownerState:s})=>s.multiline,style:{padding:"25px 12px 8px"}},{props:({ownerState:s,size:a})=>s.multiline&&a==="small",style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:s})=>s.multiline&&s.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:s})=>s.multiline&&s.hiddenLabel&&s.size==="small",style:{paddingTop:8,paddingBottom:9}}]}})),RW=ye(Rp,{name:"MuiFilledInput",slot:"Input",overridesResolver:Mp})(It(({theme:t})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:t.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:t.palette.mode==="light"?null:"#fff",caretColor:t.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},...t.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:e})=>e.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:0}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:0}},{props:({ownerState:e})=>e.hiddenLabel&&e.size==="small",style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:e})=>e.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),Dp=P.forwardRef(function(e,n){const r=xt({props:e,name:"MuiFilledInput"}),{disableUnderline:o=!1,components:i={},componentsProps:s,fullWidth:a=!1,hiddenLabel:l,inputComponent:u="input",multiline:f=!1,slotProps:h,slots:m={},type:g="text",...b}=r,y={...r,disableUnderline:o,fullWidth:a,inputComponent:u,multiline:f,type:g},S=MW(r),C={root:{ownerState:y},input:{ownerState:y}},E=h??s?Hn(C,h??s):C,T=m.root??i.Root??OW,w=m.input??i.Input??RW;return v.jsx(Ap,{slots:{root:T,input:w},slotProps:E,fullWidth:a,inputComponent:u,multiline:f,ref:n,type:g,...b,classes:S})});process.env.NODE_ENV!=="production"&&(Dp.propTypes={autoComplete:c.string,autoFocus:c.bool,classes:c.object,color:c.oneOfType([c.oneOf(["primary","secondary"]),c.string]),components:c.shape({Input:c.elementType,Root:c.elementType}),componentsProps:c.shape({input:c.object,root:c.object}),defaultValue:c.any,disabled:c.bool,disableUnderline:c.bool,endAdornment:c.node,error:c.bool,fullWidth:c.bool,hiddenLabel:c.bool,id:c.string,inputComponent:c.elementType,inputProps:c.object,inputRef:mn,margin:c.oneOf(["dense","none"]),maxRows:c.oneOfType([c.number,c.string]),minRows:c.oneOfType([c.number,c.string]),multiline:c.bool,name:c.string,onChange:c.func,placeholder:c.string,readOnly:c.bool,required:c.bool,rows:c.oneOfType([c.number,c.string]),slotProps:c.shape({input:c.object,root:c.object}),slots:c.shape({input:c.elementType,root:c.elementType}),startAdornment:c.node,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),type:c.string,value:c.any});Dp.muiName="Input";var CT;const AW=ye("fieldset",{shouldForwardProp:lo})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),IW=ye("legend",{shouldForwardProp:lo})(It(({theme:t})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:({ownerState:e})=>!e.withLabel,style:{padding:0,lineHeight:"11px",transition:t.transitions.create("width",{duration:150,easing:t.transitions.easing.easeOut})}},{props:({ownerState:e})=>e.withLabel,style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:t.transitions.create("max-width",{duration:50,easing:t.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:({ownerState:e})=>e.withLabel&&e.notched,style:{maxWidth:"100%",transition:t.transitions.create("max-width",{duration:100,easing:t.transitions.easing.easeOut,delay:50})}}]})));function uI(t){const{children:e,classes:n,className:r,label:o,notched:i,...s}=t,a=o!=null&&o!=="",l={...t,notched:i,withLabel:a};return v.jsx(AW,{"aria-hidden":!0,className:r,ownerState:l,...s,children:v.jsx(IW,{ownerState:l,children:a?v.jsx("span",{children:o}):CT||(CT=v.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"}))})})}process.env.NODE_ENV!=="production"&&(uI.propTypes={children:c.node,classes:c.object,className:c.string,label:c.node,notched:c.bool.isRequired,style:c.object});function DW(t){return Ke("MuiOutlinedInput",t)}const bo={...Ga,...He("MuiOutlinedInput",["root","notchedOutline","input"])},PW=t=>{const{classes:e}=t,r=Ue({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},DW,e);return{...e,...r}},_W=ye(Op,{shouldForwardProp:t=>lo(t)||t==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:kp})(It(({theme:t})=>{const e=t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{position:"relative",borderRadius:(t.vars||t).shape.borderRadius,[`&:hover .${bo.notchedOutline}`]:{borderColor:(t.vars||t).palette.text.primary},"@media (hover: none)":{[`&:hover .${bo.notchedOutline}`]:{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:e}},[`&.${bo.focused} .${bo.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(t.palette).filter(Vn()).map(([n])=>({props:{color:n},style:{[`&.${bo.focused} .${bo.notchedOutline}`]:{borderColor:(t.vars||t).palette[n].main}}})),{props:{},style:{[`&.${bo.error} .${bo.notchedOutline}`]:{borderColor:(t.vars||t).palette.error.main},[`&.${bo.disabled} .${bo.notchedOutline}`]:{borderColor:(t.vars||t).palette.action.disabled}}},{props:({ownerState:n})=>n.startAdornment,style:{paddingLeft:14}},{props:({ownerState:n})=>n.endAdornment,style:{paddingRight:14}},{props:({ownerState:n})=>n.multiline,style:{padding:"16.5px 14px"}},{props:({ownerState:n,size:r})=>n.multiline&&r==="small",style:{padding:"8.5px 14px"}}]}})),NW=ye(uI,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(t,e)=>e.notchedOutline})(It(({theme:t})=>{const e=t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:e}})),LW=ye(Rp,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:Mp})(It(({theme:t})=>({padding:"16.5px 14px",...!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:t.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:t.palette.mode==="light"?null:"#fff",caretColor:t.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},...t.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{padding:"8.5px 14px"}},{props:({ownerState:e})=>e.multiline,style:{padding:0}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:0}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:0}}]}))),Pp=P.forwardRef(function(e,n){var r;const o=xt({props:e,name:"MuiOutlinedInput"}),{components:i={},fullWidth:s=!1,inputComponent:a="input",label:l,multiline:u=!1,notched:f,slots:h={},type:m="text",...g}=o,b=PW(o),y=uo(),S=cl({props:o,muiFormControl:y,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),C={...o,color:S.color||"primary",disabled:S.disabled,error:S.error,focused:S.focused,formControl:y,fullWidth:s,hiddenLabel:S.hiddenLabel,multiline:u,size:S.size,type:m},E=h.root??i.Root??_W,T=h.input??i.Input??LW;return v.jsx(Ap,{slots:{root:E,input:T},renderSuffix:w=>v.jsx(NW,{ownerState:C,className:b.notchedOutline,label:l!=null&&l!==""&&S.required?r||(r=v.jsxs(P.Fragment,{children:[l," ","*"]})):l,notched:typeof f<"u"?f:!!(w.startAdornment||w.filled||w.focused)}),fullWidth:s,inputComponent:a,multiline:u,ref:n,type:m,...g,classes:{...b,notchedOutline:null}})});process.env.NODE_ENV!=="production"&&(Pp.propTypes={autoComplete:c.string,autoFocus:c.bool,classes:c.object,color:c.oneOfType([c.oneOf(["primary","secondary"]),c.string]),components:c.shape({Input:c.elementType,Root:c.elementType}),defaultValue:c.any,disabled:c.bool,endAdornment:c.node,error:c.bool,fullWidth:c.bool,id:c.string,inputComponent:c.elementType,inputProps:c.object,inputRef:mn,label:c.node,margin:c.oneOf(["dense","none"]),maxRows:c.oneOfType([c.number,c.string]),minRows:c.oneOfType([c.number,c.string]),multiline:c.bool,name:c.string,notched:c.bool,onChange:c.func,placeholder:c.string,readOnly:c.bool,required:c.bool,rows:c.oneOfType([c.number,c.string]),slots:c.shape({input:c.elementType,root:c.elementType}),startAdornment:c.node,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),type:c.string,value:c.any});Pp.muiName="Input";function jW(t){return Ke("MuiFormLabel",t)}const sc=He("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),$W=t=>{const{classes:e,color:n,focused:r,disabled:o,error:i,filled:s,required:a}=t,l={root:["root",`color${Re(n)}`,o&&"disabled",i&&"error",s&&"filled",r&&"focused",a&&"required"],asterisk:["asterisk",i&&"error"]};return Ue(l,jW,e)},FW=ye("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.color==="secondary"&&e.colorSecondary,n.filled&&e.filled]}})(It(({theme:t})=>({color:(t.vars||t).palette.text.secondary,...t.typography.body1,lineHeight:"1.4375em",padding:0,position:"relative",variants:[...Object.entries(t.palette).filter(Vn()).map(([e])=>({props:{color:e},style:{[`&.${sc.focused}`]:{color:(t.vars||t).palette[e].main}}})),{props:{},style:{[`&.${sc.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${sc.error}`]:{color:(t.vars||t).palette.error.main}}}]}))),BW=ye("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(t,e)=>e.asterisk})(It(({theme:t})=>({[`&.${sc.error}`]:{color:(t.vars||t).palette.error.main}}))),dI=P.forwardRef(function(e,n){const r=xt({props:e,name:"MuiFormLabel"}),{children:o,className:i,color:s,component:a="label",disabled:l,error:u,filled:f,focused:h,required:m,...g}=r,b=uo(),y=cl({props:r,muiFormControl:b,states:["color","required","focused","disabled","error","filled"]}),S={...r,color:y.color||"primary",component:a,disabled:y.disabled,error:y.error,filled:y.filled,focused:y.focused,required:y.required},C=$W(S);return v.jsxs(FW,{as:a,ownerState:S,className:Pe(C.root,i),ref:n,...g,children:[o,y.required&&v.jsxs(BW,{ownerState:S,"aria-hidden":!0,className:C.asterisk,children:[" ","*"]})]})});process.env.NODE_ENV!=="production"&&(dI.propTypes={children:c.node,classes:c.object,className:c.string,color:c.oneOfType([c.oneOf(["error","info","primary","secondary","success","warning"]),c.string]),component:c.elementType,disabled:c.bool,error:c.bool,filled:c.bool,focused:c.bool,required:c.bool,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object])});function VW(t){return Ke("MuiInputLabel",t)}He("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const zW=t=>{const{classes:e,formControl:n,size:r,shrink:o,disableAnimation:i,variant:s,required:a}=t,l={root:["root",n&&"formControl",!i&&"animated",o&&"shrink",r&&r!=="normal"&&`size${Re(r)}`,s],asterisk:[a&&"asterisk"]},u=Ue(l,VW,e);return{...e,...u}},HW=ye(dI,{shouldForwardProp:t=>lo(t)||t==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${sc.asterisk}`]:e.asterisk},e.root,n.formControl&&e.formControl,n.size==="small"&&e.sizeSmall,n.shrink&&e.shrink,!n.disableAnimation&&e.animated,n.focused&&e.focused,e[n.variant]]}})(It(({theme:t})=>({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%",variants:[{props:({ownerState:e})=>e.formControl,style:{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"}},{props:{size:"small"},style:{transform:"translate(0, 17px) scale(1)"}},{props:({ownerState:e})=>e.shrink,style:{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"}},{props:({ownerState:e})=>!e.disableAnimation,style:{transition:t.transitions.create(["color","transform","max-width"],{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut})}},{props:{variant:"filled"},style:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"filled",size:"small"},style:{transform:"translate(12px, 13px) scale(1)"}},{props:({variant:e,ownerState:n})=>e==="filled"&&n.shrink,style:{userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"}},{props:({variant:e,ownerState:n,size:r})=>e==="filled"&&n.shrink&&r==="small",style:{transform:"translate(12px, 4px) scale(0.75)"}},{props:{variant:"outlined"},style:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"outlined",size:"small"},style:{transform:"translate(14px, 9px) scale(1)"}},{props:({variant:e,ownerState:n})=>e==="outlined"&&n.shrink,style:{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}}]}))),q0=P.forwardRef(function(e,n){const r=xt({name:"MuiInputLabel",props:e}),{disableAnimation:o=!1,margin:i,shrink:s,variant:a,className:l,...u}=r,f=uo();let h=s;typeof h>"u"&&f&&(h=f.filled||f.focused||f.adornedStart);const m=cl({props:r,muiFormControl:f,states:["size","variant","required","focused"]}),g={...r,disableAnimation:o,formControl:f,shrink:h,size:m.size,variant:m.variant,required:m.required,focused:m.focused},b=zW(g);return v.jsx(HW,{"data-shrink":h,ref:n,className:Pe(b.root,l),...u,ownerState:g,classes:b})});process.env.NODE_ENV!=="production"&&(q0.propTypes={children:c.node,classes:c.object,className:c.string,color:c.oneOfType([c.oneOf(["error","info","primary","secondary","success","warning"]),c.string]),disableAnimation:c.bool,disabled:c.bool,error:c.bool,focused:c.bool,margin:c.oneOf(["dense"]),required:c.bool,shrink:c.bool,size:c.oneOfType([c.oneOf(["normal","small"]),c.string]),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),variant:c.oneOf(["filled","outlined","standard"])});function WW(t){return Ke("MuiFormControl",t)}He("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const qW=t=>{const{classes:e,margin:n,fullWidth:r}=t,o={root:["root",n!=="none"&&`margin${Re(n)}`,r&&"fullWidth"]};return Ue(o,WW,e)},UW=ye("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`margin${Re(n.margin)}`],n.fullWidth&&e.fullWidth]}})({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top",variants:[{props:{margin:"normal"},style:{marginTop:16,marginBottom:8}},{props:{margin:"dense"},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:"100%"}}]}),U0=P.forwardRef(function(e,n){const r=xt({props:e,name:"MuiFormControl"}),{children:o,className:i,color:s="primary",component:a="div",disabled:l=!1,error:u=!1,focused:f,fullWidth:h=!1,hiddenLabel:m=!1,margin:g="none",required:b=!1,size:y="medium",variant:S="outlined",...C}=r,E={...r,color:s,component:a,disabled:l,error:u,fullWidth:h,hiddenLabel:m,margin:g,required:b,size:y,variant:S},T=qW(E),[w,M]=P.useState(()=>{let F=!1;return o&&P.Children.forEach(o,W=>{if(!oc(W,["Input","Select"]))return;const U=oc(W,["Select"])?W.props.input:W;U&&yW(U.props)&&(F=!0)}),F}),[R,_]=P.useState(()=>{let F=!1;return o&&P.Children.forEach(o,W=>{oc(W,["Input","Select"])&&(pf(W.props,!0)||pf(W.props.inputProps,!0))&&(F=!0)}),F}),[I,N]=P.useState(!1);l&&I&&N(!1);const O=f!==void 0&&!l?f:I;let A;const L=P.useRef(!1);process.env.NODE_ENV!=="production"&&(A=()=>(L.current&&console.error(["MUI: There are multiple `InputBase` components inside a FormControl.","This creates visual inconsistencies, only use one `InputBase`."].join(`
111
+ `)),L.current=!0,()=>{L.current=!1}));const z=P.useCallback(()=>{_(!0)},[]),V=P.useCallback(()=>{_(!1)},[]),$=P.useMemo(()=>({adornedStart:w,setAdornedStart:M,color:s,disabled:l,error:u,filled:R,focused:O,fullWidth:h,hiddenLabel:m,size:y,onBlur:()=>{N(!1)},onFocus:()=>{N(!0)},onEmpty:V,onFilled:z,registerEffect:A,required:b,variant:S}),[w,s,l,u,R,O,h,m,A,V,z,b,y,S]);return v.jsx(nu.Provider,{value:$,children:v.jsx(UW,{as:a,ownerState:E,className:Pe(T.root,i),ref:n,...C,children:o})})});process.env.NODE_ENV!=="production"&&(U0.propTypes={children:c.node,classes:c.object,className:c.string,color:c.oneOfType([c.oneOf(["primary","secondary","error","info","success","warning"]),c.string]),component:c.elementType,disabled:c.bool,error:c.bool,focused:c.bool,fullWidth:c.bool,hiddenLabel:c.bool,margin:c.oneOf(["dense","none","normal"]),required:c.bool,size:c.oneOfType([c.oneOf(["medium","small"]),c.string]),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),variant:c.oneOf(["filled","outlined","standard"])});function KW(t){return Ke("MuiFormHelperText",t)}const wT=He("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var TT;const YW=t=>{const{classes:e,contained:n,size:r,disabled:o,error:i,filled:s,focused:a,required:l}=t,u={root:["root",o&&"disabled",i&&"error",r&&`size${Re(r)}`,n&&"contained",a&&"focused",s&&"filled",l&&"required"]};return Ue(u,KW,e)},GW=ye("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.size&&e[`size${Re(n.size)}`],n.contained&&e.contained,n.filled&&e.filled]}})(It(({theme:t})=>({color:(t.vars||t).palette.text.secondary,...t.typography.caption,textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${wT.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${wT.error}`]:{color:(t.vars||t).palette.error.main},variants:[{props:{size:"small"},style:{marginTop:4}},{props:({ownerState:e})=>e.contained,style:{marginLeft:14,marginRight:14}}]}))),K0=P.forwardRef(function(e,n){const r=xt({props:e,name:"MuiFormHelperText"}),{children:o,className:i,component:s="p",disabled:a,error:l,filled:u,focused:f,margin:h,required:m,variant:g,...b}=r,y=uo(),S=cl({props:r,muiFormControl:y,states:["variant","size","disabled","error","filled","focused","required"]}),C={...r,component:s,contained:S.variant==="filled"||S.variant==="outlined",variant:S.variant,size:S.size,disabled:S.disabled,error:S.error,filled:S.filled,focused:S.focused,required:S.required};delete C.ownerState;const E=YW(C);return v.jsx(GW,{as:s,className:Pe(E.root,i),ref:n,...b,ownerState:C,children:o===" "?TT||(TT=v.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):o})});process.env.NODE_ENV!=="production"&&(K0.propTypes={children:c.node,classes:c.object,className:c.string,component:c.elementType,disabled:c.bool,error:c.bool,filled:c.bool,focused:c.bool,margin:c.oneOf(["dense"]),required:c.bool,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),variant:c.oneOfType([c.oneOf(["filled","outlined","standard"]),c.string])});const Ba=P.createContext({});process.env.NODE_ENV!=="production"&&(Ba.displayName="ListContext");function JW(t){return Ke("MuiList",t)}He("MuiList",["root","padding","dense","subheader"]);const ZW=t=>{const{classes:e,disablePadding:n,dense:r,subheader:o}=t;return Ue({root:["root",!n&&"padding",r&&"dense",o&&"subheader"]},JW,e)},XW=ye("ul",{name:"MuiList",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disablePadding&&e.padding,n.dense&&e.dense,n.subheader&&e.subheader]}})({listStyle:"none",margin:0,padding:0,position:"relative",variants:[{props:({ownerState:t})=>!t.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:t})=>t.subheader,style:{paddingTop:0}}]}),Y0=P.forwardRef(function(e,n){const r=xt({props:e,name:"MuiList"}),{children:o,className:i,component:s="ul",dense:a=!1,disablePadding:l=!1,subheader:u,...f}=r,h=P.useMemo(()=>({dense:a}),[a]),m={...r,component:s,dense:a,disablePadding:l},g=ZW(m);return v.jsx(Ba.Provider,{value:h,children:v.jsxs(XW,{as:s,className:Pe(g.root,i),ref:n,ownerState:m,...f,children:[u,o]})})});process.env.NODE_ENV!=="production"&&(Y0.propTypes={children:c.node,classes:c.object,className:c.string,component:c.elementType,dense:c.bool,disablePadding:c.bool,subheader:c.node,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object])});function Qm(t,e,n){return t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:n?null:t.firstChild}function ET(t,e,n){return t===e?n?t.firstChild:t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:n?null:t.lastChild}function fI(t,e){if(e===void 0)return!0;let n=t.innerText;return n===void 0&&(n=t.textContent),n=n.trim().toLowerCase(),n.length===0?!1:e.repeating?n[0]===e.keys[0]:n.startsWith(e.keys.join(""))}function Ll(t,e,n,r,o,i){let s=!1,a=o(t,e,e?n:!1);for(;a;){if(a===t.firstChild){if(s)return!1;s=!0}const l=r?!1:a.disabled||a.getAttribute("aria-disabled")==="true";if(!a.hasAttribute("tabindex")||!fI(a,i)||l)a=o(t,a,n);else return a.focus(),!0}return!1}const pI=P.forwardRef(function(e,n){const{actions:r,autoFocus:o=!1,autoFocusItem:i=!1,children:s,className:a,disabledItemsFocusable:l=!1,disableListWrap:u=!1,onKeyDown:f,variant:h="selectedMenu",...m}=e,g=P.useRef(null),b=P.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Rn(()=>{o&&g.current.focus()},[o]),P.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(T,{direction:w})=>{const M=!g.current.style.width;if(T.clientHeight<g.current.clientHeight&&M){const R=`${wA(si(T))}px`;g.current.style[w==="rtl"?"paddingLeft":"paddingRight"]=R,g.current.style.width=`calc(100% + ${R})`}return g.current}}),[]);const y=T=>{const w=g.current,M=T.key;if(T.ctrlKey||T.metaKey||T.altKey){f&&f(T);return}const _=Wn(w).activeElement;if(M==="ArrowDown")T.preventDefault(),Ll(w,_,u,l,Qm);else if(M==="ArrowUp")T.preventDefault(),Ll(w,_,u,l,ET);else if(M==="Home")T.preventDefault(),Ll(w,null,u,l,Qm);else if(M==="End")T.preventDefault(),Ll(w,null,u,l,ET);else if(M.length===1){const I=b.current,N=M.toLowerCase(),O=performance.now();I.keys.length>0&&(O-I.lastTime>500?(I.keys=[],I.repeating=!0,I.previousKeyMatched=!0):I.repeating&&N!==I.keys[0]&&(I.repeating=!1)),I.lastTime=O,I.keys.push(N);const A=_&&!I.repeating&&fI(_,I);I.previousKeyMatched&&(A||Ll(w,_,!1,l,Qm,I))?T.preventDefault():I.previousKeyMatched=!1}f&&f(T)},S=kt(g,n);let C=-1;P.Children.forEach(s,(T,w)=>{if(!P.isValidElement(T)){C===w&&(C+=1,C>=s.length&&(C=-1));return}process.env.NODE_ENV!=="production"&&$s.isFragment(T)&&console.error(["MUI: The Menu component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
112
+ `)),T.props.disabled||(h==="selectedMenu"&&T.props.selected||C===-1)&&(C=w),C===w&&(T.props.disabled||T.props.muiSkipListHighlight||T.type.muiSkipListHighlight)&&(C+=1,C>=s.length&&(C=-1))});const E=P.Children.map(s,(T,w)=>{if(w===C){const M={};return i&&(M.autoFocus=!0),T.props.tabIndex===void 0&&h==="selectedMenu"&&(M.tabIndex=0),P.cloneElement(T,M)}return T});return v.jsx(Y0,{role:"menu",ref:S,className:a,onKeyDown:y,tabIndex:o?0:-1,...m,children:E})});process.env.NODE_ENV!=="production"&&(pI.propTypes={autoFocus:c.bool,autoFocusItem:c.bool,children:c.node,className:c.string,disabledItemsFocusable:c.bool,disableListWrap:c.bool,onKeyDown:c.func,variant:c.oneOf(["menu","selectedMenu"])});function Dv(t,e){return Dv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Dv(t,e)}function G0(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Dv(t,e)}function QW(t,e){return t.classList?!!e&&t.classList.contains(e):(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+e+" ")!==-1}function eq(t,e){t.classList?t.classList.add(e):QW(t,e)||(typeof t.className=="string"?t.className=t.className+" "+e:t.setAttribute("class",(t.className&&t.className.baseVal||"")+" "+e))}function kT(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function tq(t,e){t.classList?t.classList.remove(e):typeof t.className=="string"?t.className=kT(t.className,e):t.setAttribute("class",kT(t.className&&t.className.baseVal||"",e))}const MT={disabled:!1};var nq=process.env.NODE_ENV!=="production"?c.oneOfType([c.number,c.shape({enter:c.number,exit:c.number,appear:c.number}).isRequired]):null,rq=process.env.NODE_ENV!=="production"?c.oneOfType([c.string,c.shape({enter:c.string,exit:c.string,active:c.string}),c.shape({enter:c.string,enterDone:c.string,enterActive:c.string,exit:c.string,exitDone:c.string,exitActive:c.string})]):null;const hf=J.createContext(null);var hI=function(e){return e.scrollTop},Gl="unmounted",vs="exited",xs="entering",Ra="entered",Pv="exiting",Jr=function(t){G0(e,t);function e(r,o){var i;i=t.call(this,r,o)||this;var s=o,a=s&&!s.isMounting?r.enter:r.appear,l;return i.appearStatus=null,r.in?a?(l=vs,i.appearStatus=xs):l=Ra:r.unmountOnExit||r.mountOnEnter?l=Gl:l=vs,i.state={status:l},i.nextCallback=null,i}e.getDerivedStateFromProps=function(o,i){var s=o.in;return s&&i.status===Gl?{status:vs}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(o){var i=null;if(o!==this.props){var s=this.state.status;this.props.in?s!==xs&&s!==Ra&&(i=xs):(s===xs||s===Ra)&&(i=Pv)}this.updateStatus(!1,i)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var o=this.props.timeout,i,s,a;return i=s=a=o,o!=null&&typeof o!="number"&&(i=o.exit,s=o.enter,a=o.appear!==void 0?o.appear:s),{exit:i,enter:s,appear:a}},n.updateStatus=function(o,i){if(o===void 0&&(o=!1),i!==null)if(this.cancelNextCallback(),i===xs){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:Ts.findDOMNode(this);s&&hI(s)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===vs&&this.setState({status:Gl})},n.performEnter=function(o){var i=this,s=this.props.enter,a=this.context?this.context.isMounting:o,l=this.props.nodeRef?[a]:[Ts.findDOMNode(this),a],u=l[0],f=l[1],h=this.getTimeouts(),m=a?h.appear:h.enter;if(!o&&!s||MT.disabled){this.safeSetState({status:Ra},function(){i.props.onEntered(u)});return}this.props.onEnter(u,f),this.safeSetState({status:xs},function(){i.props.onEntering(u,f),i.onTransitionEnd(m,function(){i.safeSetState({status:Ra},function(){i.props.onEntered(u,f)})})})},n.performExit=function(){var o=this,i=this.props.exit,s=this.getTimeouts(),a=this.props.nodeRef?void 0:Ts.findDOMNode(this);if(!i||MT.disabled){this.safeSetState({status:vs},function(){o.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:Pv},function(){o.props.onExiting(a),o.onTransitionEnd(s.exit,function(){o.safeSetState({status:vs},function(){o.props.onExited(a)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(o,i){i=this.setNextCallback(i),this.setState(o,i)},n.setNextCallback=function(o){var i=this,s=!0;return this.nextCallback=function(a){s&&(s=!1,i.nextCallback=null,o(a))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(o,i){this.setNextCallback(i);var s=this.props.nodeRef?this.props.nodeRef.current:Ts.findDOMNode(this),a=o==null&&!this.props.addEndListener;if(!s||a){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],u=l[0],f=l[1];this.props.addEndListener(u,f)}o!=null&&setTimeout(this.nextCallback,o)},n.render=function(){var o=this.state.status;if(o===Gl)return null;var i=this.props,s=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var a=nt(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return J.createElement(hf.Provider,{value:null},typeof s=="function"?s(o,a):J.cloneElement(J.Children.only(s),a))},e}(J.Component);Jr.contextType=hf;Jr.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:c.shape({current:typeof Element>"u"?c.any:function(t,e,n,r,o,i){var s=t[e];return c.instanceOf(s&&"ownerDocument"in s?s.ownerDocument.defaultView.Element:Element)(t,e,n,r,o,i)}}),children:c.oneOfType([c.func.isRequired,c.element.isRequired]).isRequired,in:c.bool,mountOnEnter:c.bool,unmountOnExit:c.bool,appear:c.bool,enter:c.bool,exit:c.bool,timeout:function(e){var n=nq;e.addEndListener||(n=n.isRequired);for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return n.apply(void 0,[e].concat(o))},addEndListener:c.func,onEnter:c.func,onEntering:c.func,onEntered:c.func,onExit:c.func,onExiting:c.func,onExited:c.func}:{};function xa(){}Jr.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:xa,onEntering:xa,onEntered:xa,onExit:xa,onExiting:xa,onExited:xa};Jr.UNMOUNTED=Gl;Jr.EXITED=vs;Jr.ENTERING=xs;Jr.ENTERED=Ra;Jr.EXITING=Pv;var oq=function(e,n){return e&&n&&n.split(" ").forEach(function(r){return eq(e,r)})},eg=function(e,n){return e&&n&&n.split(" ").forEach(function(r){return tq(e,r)})},J0=function(t){G0(e,t);function e(){for(var r,o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];return r=t.call.apply(t,[this].concat(i))||this,r.appliedClasses={appear:{},enter:{},exit:{}},r.onEnter=function(a,l){var u=r.resolveArguments(a,l),f=u[0],h=u[1];r.removeClasses(f,"exit"),r.addClass(f,h?"appear":"enter","base"),r.props.onEnter&&r.props.onEnter(a,l)},r.onEntering=function(a,l){var u=r.resolveArguments(a,l),f=u[0],h=u[1],m=h?"appear":"enter";r.addClass(f,m,"active"),r.props.onEntering&&r.props.onEntering(a,l)},r.onEntered=function(a,l){var u=r.resolveArguments(a,l),f=u[0],h=u[1],m=h?"appear":"enter";r.removeClasses(f,m),r.addClass(f,m,"done"),r.props.onEntered&&r.props.onEntered(a,l)},r.onExit=function(a){var l=r.resolveArguments(a),u=l[0];r.removeClasses(u,"appear"),r.removeClasses(u,"enter"),r.addClass(u,"exit","base"),r.props.onExit&&r.props.onExit(a)},r.onExiting=function(a){var l=r.resolveArguments(a),u=l[0];r.addClass(u,"exit","active"),r.props.onExiting&&r.props.onExiting(a)},r.onExited=function(a){var l=r.resolveArguments(a),u=l[0];r.removeClasses(u,"exit"),r.addClass(u,"exit","done"),r.props.onExited&&r.props.onExited(a)},r.resolveArguments=function(a,l){return r.props.nodeRef?[r.props.nodeRef.current,a]:[a,l]},r.getClassNames=function(a){var l=r.props.classNames,u=typeof l=="string",f=u&&l?l+"-":"",h=u?""+f+a:l[a],m=u?h+"-active":l[a+"Active"],g=u?h+"-done":l[a+"Done"];return{baseClassName:h,activeClassName:m,doneClassName:g}},r}var n=e.prototype;return n.addClass=function(o,i,s){var a=this.getClassNames(i)[s+"ClassName"],l=this.getClassNames("enter"),u=l.doneClassName;i==="appear"&&s==="done"&&u&&(a+=" "+u),s==="active"&&o&&hI(o),a&&(this.appliedClasses[i][s]=a,oq(o,a))},n.removeClasses=function(o,i){var s=this.appliedClasses[i],a=s.base,l=s.active,u=s.done;this.appliedClasses[i]={},a&&eg(o,a),l&&eg(o,l),u&&eg(o,u)},n.render=function(){var o=this.props;o.classNames;var i=nt(o,["classNames"]);return J.createElement(Jr,te({},i,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},e}(J.Component);J0.defaultProps={classNames:""};J0.propTypes=process.env.NODE_ENV!=="production"?te({},Jr.propTypes,{classNames:rq,onEnter:c.func,onEntering:c.func,onEntered:c.func,onExit:c.func,onExiting:c.func,onExited:c.func}):{};function iq(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Z0(t,e){var n=function(i){return e&&J.isValidElement(i)?e(i):i},r=Object.create(null);return t&&J.Children.map(t,function(o){return o}).forEach(function(o){r[o.key]=n(o)}),r}function sq(t,e){t=t||{},e=e||{};function n(f){return f in e?e[f]:t[f]}var r=Object.create(null),o=[];for(var i in t)i in e?o.length&&(r[i]=o,o=[]):o.push(i);var s,a={};for(var l in e){if(r[l])for(s=0;s<r[l].length;s++){var u=r[l][s];a[r[l][s]]=n(u)}a[l]=n(l)}for(s=0;s<o.length;s++)a[o[s]]=n(o[s]);return a}function Es(t,e,n){return n[e]!=null?n[e]:t.props[e]}function aq(t,e){return Z0(t.children,function(n){return J.cloneElement(n,{onExited:e.bind(null,n),in:!0,appear:Es(n,"appear",t),enter:Es(n,"enter",t),exit:Es(n,"exit",t)})})}function lq(t,e,n){var r=Z0(t.children),o=sq(e,r);return Object.keys(o).forEach(function(i){var s=o[i];if(J.isValidElement(s)){var a=i in e,l=i in r,u=e[i],f=J.isValidElement(u)&&!u.props.in;l&&(!a||f)?o[i]=J.cloneElement(s,{onExited:n.bind(null,s),in:!0,exit:Es(s,"exit",t),enter:Es(s,"enter",t)}):!l&&a&&!f?o[i]=J.cloneElement(s,{in:!1}):l&&a&&J.isValidElement(u)&&(o[i]=J.cloneElement(s,{onExited:n.bind(null,s),in:u.props.in,exit:Es(s,"exit",t),enter:Es(s,"enter",t)}))}}),o}var cq=Object.values||function(t){return Object.keys(t).map(function(e){return t[e]})},uq={component:"div",childFactory:function(e){return e}},ru=function(t){G0(e,t);function e(r,o){var i;i=t.call(this,r,o)||this;var s=i.handleExited.bind(iq(i));return i.state={contextValue:{isMounting:!0},handleExited:s,firstRender:!0},i}var n=e.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},e.getDerivedStateFromProps=function(o,i){var s=i.children,a=i.handleExited,l=i.firstRender;return{children:l?aq(o,a):lq(o,s,a),firstRender:!1}},n.handleExited=function(o,i){var s=Z0(this.props.children);o.key in s||(o.props.onExited&&o.props.onExited(i),this.mounted&&this.setState(function(a){var l=te({},a.children);return delete l[o.key],{children:l}}))},n.render=function(){var o=this.props,i=o.component,s=o.childFactory,a=nt(o,["component","childFactory"]),l=this.state.contextValue,u=cq(this.state.children).map(s);return delete a.appear,delete a.enter,delete a.exit,i===null?J.createElement(hf.Provider,{value:l},u):J.createElement(hf.Provider,{value:l},J.createElement(i,a,u))},e}(J.Component);ru.propTypes=process.env.NODE_ENV!=="production"?{component:c.any,children:c.node,appear:c.bool,enter:c.bool,exit:c.bool,childFactory:c.func}:{};ru.defaultProps=uq;const mI=t=>t.scrollTop;function mf(t,e){const{timeout:n,easing:r,style:o={}}=t;return{duration:o.transitionDuration??(typeof n=="number"?n:n[e.mode]||0),easing:o.transitionTimingFunction??(typeof r=="object"?r[e.mode]:r),delay:o.transitionDelay}}function _v(t){return`scale(${t}, ${t**2})`}const dq={entering:{opacity:1,transform:_v(1)},entered:{opacity:1,transform:"none"}},tg=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Oc=P.forwardRef(function(e,n){const{addEndListener:r,appear:o=!0,children:i,easing:s,in:a,onEnter:l,onEntered:u,onEntering:f,onExit:h,onExited:m,onExiting:g,style:b,timeout:y="auto",TransitionComponent:S=Jr,...C}=e,E=CA(),T=P.useRef(),w=Zi(),M=P.useRef(null),R=kt(M,Jc(i),n),_=$=>F=>{if($){const W=M.current;F===void 0?$(W):$(W,F)}},I=_(f),N=_(($,F)=>{mI($);const{duration:W,delay:U,easing:G}=mf({style:b,timeout:y,easing:s},{mode:"enter"});let Y;y==="auto"?(Y=w.transitions.getAutoHeightDuration($.clientHeight),T.current=Y):Y=W,$.style.transition=[w.transitions.create("opacity",{duration:Y,delay:U}),w.transitions.create("transform",{duration:tg?Y:Y*.666,delay:U,easing:G})].join(","),l&&l($,F)}),O=_(u),A=_(g),L=_($=>{const{duration:F,delay:W,easing:U}=mf({style:b,timeout:y,easing:s},{mode:"exit"});let G;y==="auto"?(G=w.transitions.getAutoHeightDuration($.clientHeight),T.current=G):G=F,$.style.transition=[w.transitions.create("opacity",{duration:G,delay:W}),w.transitions.create("transform",{duration:tg?G:G*.666,delay:tg?W:W||G*.333,easing:U})].join(","),$.style.opacity=0,$.style.transform=_v(.75),h&&h($)}),z=_(m),V=$=>{y==="auto"&&E.start(T.current||0,$),r&&r(M.current,$)};return v.jsx(S,{appear:o,in:a,nodeRef:M,onEnter:N,onEntered:O,onEntering:I,onExit:L,onExited:z,onExiting:A,addEndListener:V,timeout:y==="auto"?null:y,...C,children:($,{ownerState:F,...W})=>P.cloneElement(i,{style:{opacity:0,transform:_v(.75),visibility:$==="exited"&&!a?"hidden":void 0,...dq[$],...b,...i.props.style},ref:R,...W})})});process.env.NODE_ENV!=="production"&&(Oc.propTypes={addEndListener:c.func,appear:c.bool,children:Gc.isRequired,easing:c.oneOfType([c.shape({enter:c.string,exit:c.string}),c.string]),in:c.bool,onEnter:c.func,onEntered:c.func,onEntering:c.func,onExit:c.func,onExited:c.func,onExiting:c.func,style:c.object,timeout:c.oneOfType([c.oneOf(["auto"]),c.number,c.shape({appear:c.number,enter:c.number,exit:c.number})])});Oc&&(Oc.muiSupportAuto=!0);function fq(t){const e=Wn(t);return e.body===t?si(t).innerWidth>e.documentElement.clientWidth:t.scrollHeight>t.clientHeight}function ac(t,e){e?t.setAttribute("aria-hidden","true"):t.removeAttribute("aria-hidden")}function OT(t){return parseInt(si(t).getComputedStyle(t).paddingRight,10)||0}function pq(t){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(t.tagName),r=t.tagName==="INPUT"&&t.getAttribute("type")==="hidden";return n||r}function RT(t,e,n,r,o){const i=[e,n,...r];[].forEach.call(t.children,s=>{const a=!i.includes(s),l=!pq(s);a&&l&&ac(s,o)})}function ng(t,e){let n=-1;return t.some((r,o)=>e(r)?(n=o,!0):!1),n}function hq(t,e){const n=[],r=t.container;if(!e.disableScrollLock){if(fq(r)){const s=wA(si(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${OT(r)+s}px`;const a=Wn(r).querySelectorAll(".mui-fixed");[].forEach.call(a,l=>{n.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${OT(l)+s}px`})}let i;if(r.parentNode instanceof DocumentFragment)i=Wn(r).body;else{const s=r.parentElement,a=si(r);i=(s==null?void 0:s.nodeName)==="HTML"&&a.getComputedStyle(s).overflowY==="scroll"?s:r}n.push({value:i.style.overflow,property:"overflow",el:i},{value:i.style.overflowX,property:"overflow-x",el:i},{value:i.style.overflowY,property:"overflow-y",el:i}),i.style.overflow="hidden"}return()=>{n.forEach(({value:i,el:s,property:a})=>{i?s.style.setProperty(a,i):s.style.removeProperty(a)})}}function mq(t){const e=[];return[].forEach.call(t.children,n=>{n.getAttribute("aria-hidden")==="true"&&e.push(n)}),e}class gq{constructor(){this.modals=[],this.containers=[]}add(e,n){let r=this.modals.indexOf(e);if(r!==-1)return r;r=this.modals.length,this.modals.push(e),e.modalRef&&ac(e.modalRef,!1);const o=mq(n);RT(n,e.mount,e.modalRef,o,!0);const i=ng(this.containers,s=>s.container===n);return i!==-1?(this.containers[i].modals.push(e),r):(this.containers.push({modals:[e],container:n,restore:null,hiddenSiblings:o}),r)}mount(e,n){const r=ng(this.containers,i=>i.modals.includes(e)),o=this.containers[r];o.restore||(o.restore=hq(o,n))}remove(e,n=!0){const r=this.modals.indexOf(e);if(r===-1)return r;const o=ng(this.containers,s=>s.modals.includes(e)),i=this.containers[o];if(i.modals.splice(i.modals.indexOf(e),1),this.modals.splice(r,1),i.modals.length===0)i.restore&&i.restore(),e.modalRef&&ac(e.modalRef,n),RT(i.container,e.mount,e.modalRef,i.hiddenSiblings,!1),this.containers.splice(o,1);else{const s=i.modals[i.modals.length-1];s.modalRef&&ac(s.modalRef,!1)}return r}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}const yq=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function bq(t){const e=parseInt(t.getAttribute("tabindex")||"",10);return Number.isNaN(e)?t.contentEditable==="true"||(t.nodeName==="AUDIO"||t.nodeName==="VIDEO"||t.nodeName==="DETAILS")&&t.getAttribute("tabindex")===null?0:t.tabIndex:e}function vq(t){if(t.tagName!=="INPUT"||t.type!=="radio"||!t.name)return!1;const e=r=>t.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=e(`[name="${t.name}"]:checked`);return n||(n=e(`[name="${t.name}"]`)),n!==t}function xq(t){return!(t.disabled||t.tagName==="INPUT"&&t.type==="hidden"||vq(t))}function Sq(t){const e=[],n=[];return Array.from(t.querySelectorAll(yq)).forEach((r,o)=>{const i=bq(r);i===-1||!xq(r)||(i===0?e.push(r):n.push({documentOrder:o,tabIndex:i,node:r}))}),n.sort((r,o)=>r.tabIndex===o.tabIndex?r.documentOrder-o.documentOrder:r.tabIndex-o.tabIndex).map(r=>r.node).concat(e)}function Cq(){return!0}function Rc(t){const{children:e,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:i=Sq,isEnabled:s=Cq,open:a}=t,l=P.useRef(!1),u=P.useRef(null),f=P.useRef(null),h=P.useRef(null),m=P.useRef(null),g=P.useRef(!1),b=P.useRef(null),y=kt(Jc(e),b),S=P.useRef(null);P.useEffect(()=>{!a||!b.current||(g.current=!n)},[n,a]),P.useEffect(()=>{if(!a||!b.current)return;const T=Wn(b.current);return b.current.contains(T.activeElement)||(b.current.hasAttribute("tabIndex")||(process.env.NODE_ENV!=="production"&&console.error(["MUI: The modal content node does not accept focus.",'For the benefit of assistive technologies, the tabIndex of the node is being set to "-1".'].join(`
113
+ `)),b.current.setAttribute("tabIndex","-1")),g.current&&b.current.focus()),()=>{o||(h.current&&h.current.focus&&(l.current=!0,h.current.focus()),h.current=null)}},[a]),P.useEffect(()=>{if(!a||!b.current)return;const T=Wn(b.current),w=_=>{S.current=_,!(r||!s()||_.key!=="Tab")&&T.activeElement===b.current&&_.shiftKey&&(l.current=!0,f.current&&f.current.focus())},M=()=>{var N,O;const _=b.current;if(_===null)return;if(!T.hasFocus()||!s()||l.current){l.current=!1;return}if(_.contains(T.activeElement)||r&&T.activeElement!==u.current&&T.activeElement!==f.current)return;if(T.activeElement!==m.current)m.current=null;else if(m.current!==null)return;if(!g.current)return;let I=[];if((T.activeElement===u.current||T.activeElement===f.current)&&(I=i(b.current)),I.length>0){const A=!!((N=S.current)!=null&&N.shiftKey&&((O=S.current)==null?void 0:O.key)==="Tab"),L=I[0],z=I[I.length-1];typeof L!="string"&&typeof z!="string"&&(A?z.focus():L.focus())}else _.focus()};T.addEventListener("focusin",M),T.addEventListener("keydown",w,!0);const R=setInterval(()=>{T.activeElement&&T.activeElement.tagName==="BODY"&&M()},50);return()=>{clearInterval(R),T.removeEventListener("focusin",M),T.removeEventListener("keydown",w,!0)}},[n,r,o,s,a,i]);const C=T=>{h.current===null&&(h.current=T.relatedTarget),g.current=!0,m.current=T.target;const w=e.props.onFocus;w&&w(T)},E=T=>{h.current===null&&(h.current=T.relatedTarget),g.current=!0};return v.jsxs(P.Fragment,{children:[v.jsx("div",{tabIndex:a?0:-1,onFocus:E,ref:u,"data-testid":"sentinelStart"}),P.cloneElement(e,{ref:y,onFocus:C}),v.jsx("div",{tabIndex:a?0:-1,onFocus:E,ref:f,"data-testid":"sentinelEnd"})]})}process.env.NODE_ENV!=="production"&&(Rc.propTypes={children:Gc,disableAutoFocus:c.bool,disableEnforceFocus:c.bool,disableRestoreFocus:c.bool,getTabbable:c.func,isEnabled:c.func,open:c.bool.isRequired});process.env.NODE_ENV!=="production"&&(Rc.propTypes=bA(Rc.propTypes));function wq(t){return typeof t=="function"?t():t}const Ac=P.forwardRef(function(e,n){const{children:r,container:o,disablePortal:i=!1}=e,[s,a]=P.useState(null),l=kt(P.isValidElement(r)?Jc(r):null,n);if(Rn(()=>{i||a(wq(o)||document.body)},[o,i]),Rn(()=>{if(s&&!i)return kv(n,s),()=>{kv(n,null)}},[n,s,i]),i){if(P.isValidElement(r)){const u={ref:l};return P.cloneElement(r,u)}return r}return s&&kV.createPortal(r,s)});process.env.NODE_ENV!=="production"&&(Ac.propTypes={children:c.node,container:c.oneOfType([ii,c.func]),disablePortal:c.bool});process.env.NODE_ENV!=="production"&&(Ac.propTypes=bA(Ac.propTypes));function Ft(t,e){const{className:n,elementType:r,ownerState:o,externalForwardedProps:i,internalForwardedProps:s,shouldForwardComponentProp:a=!1,...l}=e,{component:u,slots:f={[t]:void 0},slotProps:h={[t]:void 0},...m}=i,g=f[t]||r,b=pp(h[t],o),{props:{component:y,...S},internalRef:C}=AA({className:n,...l,externalForwardedProps:t==="root"?m:void 0,externalSlotProps:b}),E=kt(C,b==null?void 0:b.ref,e.ref),T=t==="root"?y||u:y,w=MA(g,{...t==="root"&&!u&&!f[t]&&s,...t!=="root"&&!f[t]&&s,...S,...T&&!a&&{as:T},...T&&a&&{component:T},ref:E},o);return[g,w]}const Tq={entering:{opacity:1},entered:{opacity:1}},qi=P.forwardRef(function(e,n){const r=Zi(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:i,appear:s=!0,children:a,easing:l,in:u,onEnter:f,onEntered:h,onEntering:m,onExit:g,onExited:b,onExiting:y,style:S,timeout:C=o,TransitionComponent:E=Jr,...T}=e,w=P.useRef(null),M=kt(w,Jc(a),n),R=V=>$=>{if(V){const F=w.current;$===void 0?V(F):V(F,$)}},_=R(m),I=R((V,$)=>{mI(V);const F=mf({style:S,timeout:C,easing:l},{mode:"enter"});V.style.webkitTransition=r.transitions.create("opacity",F),V.style.transition=r.transitions.create("opacity",F),f&&f(V,$)}),N=R(h),O=R(y),A=R(V=>{const $=mf({style:S,timeout:C,easing:l},{mode:"exit"});V.style.webkitTransition=r.transitions.create("opacity",$),V.style.transition=r.transitions.create("opacity",$),g&&g(V)}),L=R(b),z=V=>{i&&i(w.current,V)};return v.jsx(E,{appear:s,in:u,nodeRef:w,onEnter:I,onEntered:N,onEntering:_,onExit:A,onExited:L,onExiting:O,addEndListener:z,timeout:C,...T,children:(V,{ownerState:$,...F})=>P.cloneElement(a,{style:{opacity:0,visibility:V==="exited"&&!u?"hidden":void 0,...Tq[V],...S,...a.props.style},ref:M,...F})})});process.env.NODE_ENV!=="production"&&(qi.propTypes={addEndListener:c.func,appear:c.bool,children:Gc.isRequired,easing:c.oneOfType([c.shape({enter:c.string,exit:c.string}),c.string]),in:c.bool,onEnter:c.func,onEntered:c.func,onEntering:c.func,onExit:c.func,onExited:c.func,onExiting:c.func,style:c.object,timeout:c.oneOfType([c.number,c.shape({appear:c.number,enter:c.number,exit:c.number})])});function Eq(t){return Ke("MuiBackdrop",t)}He("MuiBackdrop",["root","invisible"]);const kq=t=>{const{classes:e,invisible:n}=t;return Ue({root:["root",n&&"invisible"]},Eq,e)},Mq=ye("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.invisible&&e.invisible]}})({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),X0=P.forwardRef(function(e,n){const r=xt({props:e,name:"MuiBackdrop"}),{children:o,className:i,component:s="div",invisible:a=!1,open:l,components:u={},componentsProps:f={},slotProps:h={},slots:m={},TransitionComponent:g,transitionDuration:b,...y}=r,S={...r,component:s,invisible:a},C=kq(S),E={transition:g,root:u.Root,...m},T={...f,...h},w={slots:E,slotProps:T},[M,R]=Ft("root",{elementType:Mq,externalForwardedProps:w,className:Pe(C.root,i),ownerState:S}),[_,I]=Ft("transition",{elementType:qi,externalForwardedProps:w,ownerState:S});return v.jsx(_,{in:l,timeout:b,...y,...I,children:v.jsx(M,{"aria-hidden":!0,...R,classes:C,ref:n,children:o})})});process.env.NODE_ENV!=="production"&&(X0.propTypes={children:c.node,classes:c.object,className:c.string,component:c.elementType,components:c.shape({Root:c.elementType}),componentsProps:c.shape({root:c.object}),invisible:c.bool,open:c.bool.isRequired,slotProps:c.shape({root:c.oneOfType([c.func,c.object]),transition:c.oneOfType([c.func,c.object])}),slots:c.shape({root:c.elementType,transition:c.elementType}),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),TransitionComponent:c.elementType,transitionDuration:c.oneOfType([c.number,c.shape({appear:c.number,enter:c.number,exit:c.number})])});function Oq(t){return typeof t=="function"?t():t}function Rq(t){return t?t.props.hasOwnProperty("in"):!1}const AT=()=>{},hd=new gq;function Aq(t){const{container:e,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,closeAfterTransition:o=!1,onTransitionEnter:i,onTransitionExited:s,children:a,onClose:l,open:u,rootRef:f}=t,h=P.useRef({}),m=P.useRef(null),g=P.useRef(null),b=kt(g,f),[y,S]=P.useState(!u),C=Rq(a);let E=!0;(t["aria-hidden"]==="false"||t["aria-hidden"]===!1)&&(E=!1);const T=()=>Wn(m.current),w=()=>(h.current.modalRef=g.current,h.current.mount=m.current,h.current),M=()=>{hd.mount(w(),{disableScrollLock:r}),g.current&&(g.current.scrollTop=0)},R=je(()=>{const $=Oq(e)||T().body;hd.add(w(),$),g.current&&M()}),_=()=>hd.isTopModal(w()),I=je($=>{m.current=$,$&&(u&&_()?M():g.current&&ac(g.current,E))}),N=P.useCallback(()=>{hd.remove(w(),E)},[E]);P.useEffect(()=>()=>{N()},[N]),P.useEffect(()=>{u?R():(!C||!o)&&N()},[u,N,C,o,R]);const O=$=>F=>{var W;(W=$.onKeyDown)==null||W.call($,F),!(F.key!=="Escape"||F.which===229||!_())&&(n||(F.stopPropagation(),l&&l(F,"escapeKeyDown")))},A=$=>F=>{var W;(W=$.onClick)==null||W.call($,F),F.target===F.currentTarget&&l&&l(F,"backdropClick")};return{getRootProps:($={})=>{const F=RA(t);delete F.onTransitionEnter,delete F.onTransitionExited;const W={...F,...$};return{role:"presentation",...W,onKeyDown:O(W),ref:b}},getBackdropProps:($={})=>{const F=$;return{"aria-hidden":!0,...F,onClick:A(F),open:u}},getTransitionProps:()=>{const $=()=>{S(!1),i&&i()},F=()=>{S(!0),s&&s(),o&&N()};return{onEnter:ww($,(a==null?void 0:a.props.onEnter)??AT),onExited:ww(F,(a==null?void 0:a.props.onExited)??AT)}},rootRef:b,portalRef:I,isTopModal:_,exited:y,hasTransition:C}}function Iq(t){return Ke("MuiModal",t)}He("MuiModal",["root","hidden","backdrop"]);const Dq=t=>{const{open:e,exited:n,classes:r}=t;return Ue({root:["root",!e&&n&&"hidden"],backdrop:["backdrop"]},Iq,r)},Pq=ye("div",{name:"MuiModal",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.open&&n.exited&&e.hidden]}})(It(({theme:t})=>({position:"fixed",zIndex:(t.vars||t).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:e})=>!e.open&&e.exited,style:{visibility:"hidden"}}]}))),_q=ye(X0,{name:"MuiModal",slot:"Backdrop",overridesResolver:(t,e)=>e.backdrop})({zIndex:-1}),Q0=P.forwardRef(function(e,n){const r=xt({name:"MuiModal",props:e}),{BackdropComponent:o=_q,BackdropProps:i,classes:s,className:a,closeAfterTransition:l=!1,children:u,container:f,component:h,components:m={},componentsProps:g={},disableAutoFocus:b=!1,disableEnforceFocus:y=!1,disableEscapeKeyDown:S=!1,disablePortal:C=!1,disableRestoreFocus:E=!1,disableScrollLock:T=!1,hideBackdrop:w=!1,keepMounted:M=!1,onBackdropClick:R,onClose:_,onTransitionEnter:I,onTransitionExited:N,open:O,slotProps:A={},slots:L={},theme:z,...V}=r,$={...r,closeAfterTransition:l,disableAutoFocus:b,disableEnforceFocus:y,disableEscapeKeyDown:S,disablePortal:C,disableRestoreFocus:E,disableScrollLock:T,hideBackdrop:w,keepMounted:M},{getRootProps:F,getBackdropProps:W,getTransitionProps:U,portalRef:G,isTopModal:Y,exited:Z,hasTransition:me}=Aq({...$,rootRef:n}),fe={...$,exited:Z},pe=Dq(fe),re={};if(u.props.tabIndex===void 0&&(re.tabIndex="-1"),me){const{onEnter:he,onExited:ee}=U();re.onEnter=he,re.onExited=ee}const ue={slots:{root:m.Root,backdrop:m.Backdrop,...L},slotProps:{...g,...A}},[ae,K]=Ft("root",{ref:n,elementType:Pq,externalForwardedProps:{...ue,...V,component:h},getSlotProps:F,ownerState:fe,className:Pe(a,pe==null?void 0:pe.root,!fe.open&&fe.exited&&(pe==null?void 0:pe.hidden))}),[Q,ie]=Ft("backdrop",{ref:i==null?void 0:i.ref,elementType:o,externalForwardedProps:ue,shouldForwardComponentProp:!0,additionalProps:i,getSlotProps:he=>W({...he,onClick:ee=>{R&&R(ee),he!=null&&he.onClick&&he.onClick(ee)}}),className:Pe(i==null?void 0:i.className,pe==null?void 0:pe.backdrop),ownerState:fe});return!M&&!O&&(!me||Z)?null:v.jsx(Ac,{ref:G,container:f,disablePortal:C,children:v.jsxs(ae,{...K,children:[!w&&o?v.jsx(Q,{...ie}):null,v.jsx(Rc,{disableEnforceFocus:y,disableAutoFocus:b,disableRestoreFocus:E,isEnabled:Y,open:O,children:P.cloneElement(u,re)})]})})});process.env.NODE_ENV!=="production"&&(Q0.propTypes={BackdropComponent:c.elementType,BackdropProps:c.object,children:Gc.isRequired,classes:c.object,className:c.string,closeAfterTransition:c.bool,component:c.elementType,components:c.shape({Backdrop:c.elementType,Root:c.elementType}),componentsProps:c.shape({backdrop:c.oneOfType([c.func,c.object]),root:c.oneOfType([c.func,c.object])}),container:c.oneOfType([ii,c.func]),disableAutoFocus:c.bool,disableEnforceFocus:c.bool,disableEscapeKeyDown:c.bool,disablePortal:c.bool,disableRestoreFocus:c.bool,disableScrollLock:c.bool,hideBackdrop:c.bool,keepMounted:c.bool,onBackdropClick:c.func,onClose:c.func,onTransitionEnter:c.func,onTransitionExited:c.func,open:c.bool.isRequired,slotProps:c.shape({backdrop:c.oneOfType([c.func,c.object]),root:c.oneOfType([c.func,c.object])}),slots:c.shape({backdrop:c.elementType,root:c.elementType}),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object])});function Nq(t){return Ke("MuiPaper",t)}He("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const Lq=t=>{const{square:e,elevation:n,variant:r,classes:o}=t,i={root:["root",r,!e&&"rounded",r==="elevation"&&`elevation${n}`]};return Ue(i,Nq,o)},jq=ye("div",{name:"MuiPaper",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],!n.square&&e.rounded,n.variant==="elevation"&&e[`elevation${n.elevation}`]]}})(It(({theme:t})=>({backgroundColor:(t.vars||t).palette.background.paper,color:(t.vars||t).palette.text.primary,transition:t.transitions.create("box-shadow"),variants:[{props:({ownerState:e})=>!e.square,style:{borderRadius:t.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(t.vars||t).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]}))),ul=P.forwardRef(function(e,n){var g;const r=xt({props:e,name:"MuiPaper"}),o=Zi(),{className:i,component:s="div",elevation:a=1,square:l=!1,variant:u="elevation",...f}=r,h={...r,component:s,elevation:a,square:l,variant:u},m=Lq(h);return process.env.NODE_ENV!=="production"&&o.shadows[a]===void 0&&console.error([`MUI: The elevation provided <Paper elevation={${a}}> is not available in the theme.`,`Please make sure that \`theme.shadows[${a}]\` is defined.`].join(`
114
+ `)),v.jsx(jq,{as:s,ownerState:h,className:Pe(m.root,i),ref:n,...f,style:{...u==="elevation"&&{"--Paper-shadow":(o.vars||o).shadows[a],...o.vars&&{"--Paper-overlay":(g=o.vars.overlays)==null?void 0:g[a]},...!o.vars&&o.palette.mode==="dark"&&{"--Paper-overlay":`linear-gradient(${$t("#fff",Av(a))}, ${$t("#fff",Av(a))})`}},...f.style}})});process.env.NODE_ENV!=="production"&&(ul.propTypes={children:c.node,classes:c.object,className:c.string,component:c.elementType,elevation:ui(kA,t=>{const{elevation:e,variant:n}=t;return e>0&&n==="outlined"?new Error(`MUI: Combining \`elevation={${e}}\` with \`variant="${n}"\` has no effect. Either use \`elevation={0}\` or use a different \`variant\`.`):null}),square:c.bool,style:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),variant:c.oneOfType([c.oneOf(["elevation","outlined"]),c.string])});function $q(t){return Ke("MuiPopover",t)}He("MuiPopover",["root","paper"]);function IT(t,e){let n=0;return typeof e=="number"?n=e:e==="center"?n=t.height/2:e==="bottom"&&(n=t.height),n}function DT(t,e){let n=0;return typeof e=="number"?n=e:e==="center"?n=t.width/2:e==="right"&&(n=t.width),n}function PT(t){return[t.horizontal,t.vertical].map(e=>typeof e=="number"?`${e}px`:e).join(" ")}function Gd(t){return typeof t=="function"?t():t}const Fq=t=>{const{classes:e}=t;return Ue({root:["root"],paper:["paper"]},$q,e)},Bq=ye(Q0,{name:"MuiPopover",slot:"Root",overridesResolver:(t,e)=>e.root})({}),gI=ye(ul,{name:"MuiPopover",slot:"Paper",overridesResolver:(t,e)=>e.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),yI=P.forwardRef(function(e,n){const r=xt({props:e,name:"MuiPopover"}),{action:o,anchorEl:i,anchorOrigin:s={vertical:"top",horizontal:"left"},anchorPosition:a,anchorReference:l="anchorEl",children:u,className:f,container:h,elevation:m=8,marginThreshold:g=16,open:b,PaperProps:y={},slots:S={},slotProps:C={},transformOrigin:E={vertical:"top",horizontal:"left"},TransitionComponent:T,transitionDuration:w="auto",TransitionProps:M={},disableScrollLock:R=!1,..._}=r,I=P.useRef(),N={...r,anchorOrigin:s,anchorReference:l,elevation:m,marginThreshold:g,transformOrigin:E,TransitionComponent:T,transitionDuration:w,TransitionProps:M},O=Fq(N),A=P.useCallback(()=>{if(l==="anchorPosition")return process.env.NODE_ENV!=="production"&&(a||console.error('MUI: You need to provide a `anchorPosition` prop when using <Popover anchorReference="anchorPosition" />.')),a;const ie=Gd(i),he=ie&&ie.nodeType===1?ie:Wn(I.current).body,ee=he.getBoundingClientRect();if(process.env.NODE_ENV!=="production"){const se=he.getBoundingClientRect();process.env.NODE_ENV!=="test"&&se.top===0&&se.left===0&&se.right===0&&se.bottom===0&&console.warn(["MUI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
115
+ `))}return{top:ee.top+IT(ee,s.vertical),left:ee.left+DT(ee,s.horizontal)}},[i,s.horizontal,s.vertical,a,l]),L=P.useCallback(ie=>({vertical:IT(ie,E.vertical),horizontal:DT(ie,E.horizontal)}),[E.horizontal,E.vertical]),z=P.useCallback(ie=>{const he={width:ie.offsetWidth,height:ie.offsetHeight},ee=L(he);if(l==="none")return{top:null,left:null,transformOrigin:PT(ee)};const se=A();let le=se.top-ee.vertical,ge=se.left-ee.horizontal;const we=le+he.height,xe=ge+he.width,Me=si(Gd(i)),_e=Me.innerHeight-g,Ve=Me.innerWidth-g;if(g!==null&&le<g){const Ye=le-g;le-=Ye,ee.vertical+=Ye}else if(g!==null&&we>_e){const Ye=we-_e;le-=Ye,ee.vertical+=Ye}if(process.env.NODE_ENV!=="production"&&he.height>_e&&he.height&&_e&&console.error(["MUI: The popover component is too tall.",`Some part of it can not be seen on the screen (${he.height-_e}px).`,"Please consider adding a `max-height` to improve the user-experience."].join(`
116
+ `)),g!==null&&ge<g){const Ye=ge-g;ge-=Ye,ee.horizontal+=Ye}else if(xe>Ve){const Ye=xe-Ve;ge-=Ye,ee.horizontal+=Ye}return{top:`${Math.round(le)}px`,left:`${Math.round(ge)}px`,transformOrigin:PT(ee)}},[i,l,A,L,g]),[V,$]=P.useState(b),F=P.useCallback(()=>{const ie=I.current;if(!ie)return;const he=z(ie);he.top!==null&&ie.style.setProperty("top",he.top),he.left!==null&&(ie.style.left=he.left),ie.style.transformOrigin=he.transformOrigin,$(!0)},[z]);P.useEffect(()=>(R&&window.addEventListener("scroll",F),()=>window.removeEventListener("scroll",F)),[i,R,F]);const W=()=>{F()},U=()=>{$(!1)};P.useEffect(()=>{b&&F()}),P.useImperativeHandle(o,()=>b?{updatePosition:()=>{F()}}:null,[b,F]),P.useEffect(()=>{if(!b)return;const ie=xA(()=>{F()}),he=si(i);return he.addEventListener("resize",ie),()=>{ie.clear(),he.removeEventListener("resize",ie)}},[i,b,F]);let G=w;const Y={slots:{transition:T,...S},slotProps:{transition:M,paper:y,...C}},[Z,me]=Ft("transition",{elementType:Oc,externalForwardedProps:Y,ownerState:N,getSlotProps:ie=>({...ie,onEntering:(he,ee)=>{var se;(se=ie.onEntering)==null||se.call(ie,he,ee),W()},onExited:he=>{var ee;(ee=ie.onExited)==null||ee.call(ie,he),U()}}),additionalProps:{appear:!0,in:b}});w==="auto"&&!Z.muiSupportAuto&&(G=void 0);const fe=h||(i?Wn(Gd(i)).body:void 0),[pe,{slots:re,slotProps:ue,...ae}]=Ft("root",{ref:n,elementType:Bq,externalForwardedProps:{...Y,..._},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:S.backdrop},slotProps:{backdrop:wH(typeof C.backdrop=="function"?C.backdrop(N):C.backdrop,{invisible:!0})},container:fe,open:b},ownerState:N,className:Pe(O.root,f)}),[K,Q]=Ft("paper",{ref:I,className:O.paper,elementType:gI,externalForwardedProps:Y,shouldForwardComponentProp:!0,additionalProps:{elevation:m,style:V?void 0:{opacity:0}},ownerState:N});return v.jsx(pe,{...ae,...!Mc(pe)&&{slots:re,slotProps:ue,disableScrollLock:R},children:v.jsx(Z,{...me,timeout:G,children:v.jsx(K,{...Q,children:u})})})});process.env.NODE_ENV!=="production"&&(yI.propTypes={action:mn,anchorEl:ui(c.oneOfType([ii,c.func]),t=>{if(t.open&&(!t.anchorReference||t.anchorReference==="anchorEl")){const e=Gd(t.anchorEl);if(e&&e.nodeType===1){const n=e.getBoundingClientRect();if(process.env.NODE_ENV!=="test"&&n.top===0&&n.left===0&&n.right===0&&n.bottom===0)return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
117
+ `))}else return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.",`It should be an Element or PopoverVirtualElement instance but it's \`${e}\` instead.`].join(`
118
+ `))}return null}),anchorOrigin:c.shape({horizontal:c.oneOfType([c.oneOf(["center","left","right"]),c.number]).isRequired,vertical:c.oneOfType([c.oneOf(["bottom","center","top"]),c.number]).isRequired}),anchorPosition:c.shape({left:c.number.isRequired,top:c.number.isRequired}),anchorReference:c.oneOf(["anchorEl","anchorPosition","none"]),BackdropComponent:c.elementType,BackdropProps:c.object,children:c.node,classes:c.object,className:c.string,container:c.oneOfType([ii,c.func]),disableScrollLock:c.bool,elevation:kA,marginThreshold:c.number,onClose:c.func,open:c.bool.isRequired,PaperProps:c.shape({component:fp}),slotProps:c.shape({backdrop:c.oneOfType([c.func,c.object]),paper:c.oneOfType([c.func,c.object]),root:c.oneOfType([c.func,c.object]),transition:c.oneOfType([c.func,c.object])}),slots:c.shape({backdrop:c.elementType,paper:c.elementType,root:c.elementType,transition:c.elementType}),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),transformOrigin:c.shape({horizontal:c.oneOfType([c.oneOf(["center","left","right"]),c.number]).isRequired,vertical:c.oneOfType([c.oneOf(["bottom","center","top"]),c.number]).isRequired}),TransitionComponent:c.elementType,transitionDuration:c.oneOfType([c.oneOf(["auto"]),c.number,c.shape({appear:c.number,enter:c.number,exit:c.number})]),TransitionProps:c.object});function Vq(t){return Ke("MuiMenu",t)}He("MuiMenu",["root","paper","list"]);const zq={vertical:"top",horizontal:"right"},Hq={vertical:"top",horizontal:"left"},Wq=t=>{const{classes:e}=t;return Ue({root:["root"],paper:["paper"],list:["list"]},Vq,e)},qq=ye(yI,{shouldForwardProp:t=>lo(t)||t==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(t,e)=>e.root})({}),Uq=ye(gI,{name:"MuiMenu",slot:"Paper",overridesResolver:(t,e)=>e.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),Kq=ye(pI,{name:"MuiMenu",slot:"List",overridesResolver:(t,e)=>e.list})({outline:0}),bI=P.forwardRef(function(e,n){const r=xt({props:e,name:"MuiMenu"}),{autoFocus:o=!0,children:i,className:s,disableAutoFocusItem:a=!1,MenuListProps:l={},onClose:u,open:f,PaperProps:h={},PopoverClasses:m,transitionDuration:g="auto",TransitionProps:{onEntering:b,...y}={},variant:S="selectedMenu",slots:C={},slotProps:E={},...T}=r,w=ao(),M={...r,autoFocus:o,disableAutoFocusItem:a,MenuListProps:l,onEntering:b,PaperProps:h,transitionDuration:g,TransitionProps:y,variant:S},R=Wq(M),_=o&&!a&&f,I=P.useRef(null),N=(G,Y)=>{I.current&&I.current.adjustStyleForScrollbar(G,{direction:w?"rtl":"ltr"}),b&&b(G,Y)},O=G=>{G.key==="Tab"&&(G.preventDefault(),u&&u(G,"tabKeyDown"))};let A=-1;P.Children.map(i,(G,Y)=>{P.isValidElement(G)&&(process.env.NODE_ENV!=="production"&&$s.isFragment(G)&&console.error(["MUI: The Menu component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
119
+ `)),G.props.disabled||(S==="selectedMenu"&&G.props.selected||A===-1)&&(A=Y))});const L={slots:C,slotProps:{list:l,transition:y,paper:h,...E}},z=Ct({elementType:C.root,externalSlotProps:E.root,ownerState:M,className:[R.root,s]}),[V,$]=Ft("paper",{className:R.paper,elementType:Uq,externalForwardedProps:L,shouldForwardComponentProp:!0,ownerState:M}),[F,W]=Ft("list",{className:Pe(R.list,l.className),elementType:Kq,shouldForwardComponentProp:!0,externalForwardedProps:L,getSlotProps:G=>({...G,onKeyDown:Y=>{var Z;O(Y),(Z=G.onKeyDown)==null||Z.call(G,Y)}}),ownerState:M}),U=typeof L.slotProps.transition=="function"?L.slotProps.transition(M):L.slotProps.transition;return v.jsx(qq,{onClose:u,anchorOrigin:{vertical:"bottom",horizontal:w?"right":"left"},transformOrigin:w?zq:Hq,slots:{root:C.root,paper:V,backdrop:C.backdrop,...C.transition&&{transition:C.transition}},slotProps:{root:z,paper:$,backdrop:typeof E.backdrop=="function"?E.backdrop(M):E.backdrop,transition:{...U,onEntering:(...G)=>{var Y;N(...G),(Y=U==null?void 0:U.onEntering)==null||Y.call(U,...G)}}},open:f,ref:n,transitionDuration:g,ownerState:M,...T,classes:m,children:v.jsx(F,{actions:I,autoFocus:o&&(A===-1||a),autoFocusItem:_,variant:S,...W,children:i})})});process.env.NODE_ENV!=="production"&&(bI.propTypes={anchorEl:c.oneOfType([ii,c.func]),autoFocus:c.bool,children:c.node,classes:c.object,className:c.string,disableAutoFocusItem:c.bool,MenuListProps:c.object,onClose:c.func,open:c.bool.isRequired,PaperProps:c.object,PopoverClasses:c.object,slotProps:c.shape({backdrop:c.oneOfType([c.func,c.object]),list:c.oneOfType([c.func,c.object]),paper:c.oneOfType([c.func,c.object]),root:c.oneOfType([c.func,c.object]),transition:c.oneOfType([c.func,c.object])}),slots:c.shape({backdrop:c.elementType,list:c.elementType,paper:c.elementType,root:c.elementType,transition:c.elementType}),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),transitionDuration:c.oneOfType([c.oneOf(["auto"]),c.number,c.shape({appear:c.number,enter:c.number,exit:c.number})]),TransitionProps:c.object,variant:c.oneOf(["menu","selectedMenu"])});function Yq(t){return Ke("MuiNativeSelect",t)}const ex=He("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),Gq=t=>{const{classes:e,variant:n,disabled:r,multiple:o,open:i,error:s}=t,a={select:["select",n,r&&"disabled",o&&"multiple",s&&"error"],icon:["icon",`icon${Re(n)}`,i&&"iconOpen",r&&"disabled"]};return Ue(a,Yq,e)},vI=ye("select")(({theme:t})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${ex.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(t.vars||t).palette.background.paper},variants:[{props:({ownerState:e})=>e.variant!=="filled"&&e.variant!=="outlined",style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:"filled"},style:{"&&&":{paddingRight:32}}},{props:{variant:"outlined"},style:{borderRadius:(t.vars||t).shape.borderRadius,"&:focus":{borderRadius:(t.vars||t).shape.borderRadius},"&&&":{paddingRight:32}}}]})),Jq=ye(vI,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:lo,overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.select,e[n.variant],n.error&&e.error,{[`&.${ex.multiple}`]:e.multiple}]}})({}),xI=ye("svg")(({theme:t})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(t.vars||t).palette.action.active,[`&.${ex.disabled}`]:{color:(t.vars||t).palette.action.disabled},variants:[{props:({ownerState:e})=>e.open,style:{transform:"rotate(180deg)"}},{props:{variant:"filled"},style:{right:7}},{props:{variant:"outlined"},style:{right:7}}]})),Zq=ye(xI,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.icon,n.variant&&e[`icon${Re(n.variant)}`],n.open&&e.iconOpen]}})({}),SI=P.forwardRef(function(e,n){const{className:r,disabled:o,error:i,IconComponent:s,inputRef:a,variant:l="standard",...u}=e,f={...e,disabled:o,variant:l,error:i},h=Gq(f);return v.jsxs(P.Fragment,{children:[v.jsx(Jq,{ownerState:f,className:Pe(h.select,r),disabled:o,ref:a||n,...u}),e.multiple?null:v.jsx(Zq,{as:s,ownerState:f,className:h.icon})]})});process.env.NODE_ENV!=="production"&&(SI.propTypes={children:c.node,classes:c.object,className:c.string,disabled:c.bool,error:c.bool,IconComponent:c.elementType.isRequired,inputRef:mn,multiple:c.bool,name:c.string,onChange:c.func,value:c.any,variant:c.oneOf(["standard","outlined","filled"])});function CI(t){return Ke("MuiSelect",t)}const jl=He("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var _T;const Xq=ye(vI,{name:"MuiSelect",slot:"Select",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`&.${jl.select}`]:e.select},{[`&.${jl.select}`]:e[n.variant]},{[`&.${jl.error}`]:e.error},{[`&.${jl.multiple}`]:e.multiple}]}})({[`&.${jl.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),Qq=ye(xI,{name:"MuiSelect",slot:"Icon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.icon,n.variant&&e[`icon${Re(n.variant)}`],n.open&&e.iconOpen]}})({}),e9=ye("input",{shouldForwardProp:t=>JA(t)&&t!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(t,e)=>e.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function NT(t,e){return typeof e=="object"&&e!==null?t===e:String(t)===String(e)}function t9(t){return t==null||typeof t=="string"&&!t.trim()}const n9=t=>{const{classes:e,variant:n,disabled:r,multiple:o,open:i,error:s}=t,a={select:["select",n,r&&"disabled",o&&"multiple",s&&"error"],icon:["icon",`icon${Re(n)}`,i&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return Ue(a,CI,e)},wI=P.forwardRef(function(e,n){var Ne;const{"aria-describedby":r,"aria-label":o,autoFocus:i,autoWidth:s,children:a,className:l,defaultOpen:u,defaultValue:f,disabled:h,displayEmpty:m,error:g=!1,IconComponent:b,inputRef:y,labelId:S,MenuProps:C={},multiple:E,name:T,onBlur:w,onChange:M,onClose:R,onFocus:_,onOpen:I,open:N,readOnly:O,renderValue:A,required:L,SelectDisplayProps:z={},tabIndex:V,type:$,value:F,variant:W="standard",...U}=e,[G,Y]=ai({controlled:F,default:f,name:"Select"}),[Z,me]=ai({controlled:N,default:u,name:"Select"}),fe=P.useRef(null),pe=P.useRef(null),[re,ue]=P.useState(null),{current:ae}=P.useRef(N!=null),[K,Q]=P.useState(),ie=kt(n,y),he=P.useCallback(Ee=>{pe.current=Ee,Ee&&ue(Ee)},[]),ee=re==null?void 0:re.parentNode;P.useImperativeHandle(ie,()=>({focus:()=>{pe.current.focus()},node:fe.current,value:G}),[G]),P.useEffect(()=>{u&&Z&&re&&!ae&&(Q(s?null:ee.clientWidth),pe.current.focus())},[re,s]),P.useEffect(()=>{i&&pe.current.focus()},[i]),P.useEffect(()=>{if(!S)return;const Ee=Wn(pe.current).getElementById(S);if(Ee){const Le=()=>{getSelection().isCollapsed&&pe.current.focus()};return Ee.addEventListener("click",Le),()=>{Ee.removeEventListener("click",Le)}}},[S]);const se=(Ee,Le)=>{Ee?I&&I(Le):R&&R(Le),ae||(Q(s?null:ee.clientWidth),me(Ee))},le=Ee=>{Ee.button===0&&(Ee.preventDefault(),pe.current.focus(),se(!0,Ee))},ge=Ee=>{se(!1,Ee)},we=P.Children.toArray(a),xe=Ee=>{const Le=we.find(We=>We.props.value===Ee.target.value);Le!==void 0&&(Y(Le.props.value),M&&M(Ee,Le))},Me=Ee=>Le=>{let We;if(Le.currentTarget.hasAttribute("tabindex")){if(E){We=Array.isArray(G)?G.slice():[];const et=G.indexOf(Ee.props.value);et===-1?We.push(Ee.props.value):We.splice(et,1)}else We=Ee.props.value;if(Ee.props.onClick&&Ee.props.onClick(Le),G!==We&&(Y(We),M)){const et=Le.nativeEvent||Le,Ot=new et.constructor(et.type,et);Object.defineProperty(Ot,"target",{writable:!0,value:{value:We,name:T}}),M(Ot,Ee)}E||se(!1,Le)}},_e=Ee=>{O||[" ","ArrowUp","ArrowDown","Enter"].includes(Ee.key)&&(Ee.preventDefault(),se(!0,Ee))},Ve=re!==null&&Z,Ye=Ee=>{!Ve&&w&&(Object.defineProperty(Ee,"target",{writable:!0,value:{value:G,name:T}}),w(Ee))};delete U["aria-invalid"];let Ie,it;const vt=[];let Yt=!1,yn=!1;(pf({value:G})||m)&&(A?Ie=A(G):Yt=!0);const tn=we.map(Ee=>{if(!P.isValidElement(Ee))return null;process.env.NODE_ENV!=="production"&&$s.isFragment(Ee)&&console.error(["MUI: The Select component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
120
+ `));let Le;if(E){if(!Array.isArray(G))throw new Error(process.env.NODE_ENV!=="production"?"MUI: The `value` prop must be an array when using the `Select` component with `multiple`.":Oo(2));Le=G.some(We=>NT(We,Ee.props.value)),Le&&Yt&&vt.push(Ee.props.children)}else Le=NT(G,Ee.props.value),Le&&Yt&&(it=Ee.props.children);return Le&&(yn=!0),P.cloneElement(Ee,{"aria-selected":Le?"true":"false",onClick:Me(Ee),onKeyUp:We=>{We.key===" "&&We.preventDefault(),Ee.props.onKeyUp&&Ee.props.onKeyUp(We)},role:"option",selected:Le,value:void 0,"data-value":Ee.props.value})});process.env.NODE_ENV!=="production"&&P.useEffect(()=>{if(!yn&&!E&&G!==""){const Ee=we.map(Le=>Le.props.value);console.warn([`MUI: You have provided an out-of-range value \`${G}\` for the select ${T?`(name="${T}") `:""}component.`,"Consider providing a value that matches one of the available options or ''.",`The available values are ${Ee.filter(Le=>Le!=null).map(Le=>`\`${Le}\``).join(", ")||'""'}.`].join(`
121
+ `))}},[yn,we,E,T,G]),Yt&&(E?vt.length===0?Ie=null:Ie=vt.reduce((Ee,Le,We)=>(Ee.push(Le),We<vt.length-1&&Ee.push(", "),Ee),[]):Ie=it);let Dt=K;!s&&ae&&re&&(Dt=ee.clientWidth);let Sn;typeof V<"u"?Sn=V:Sn=h?null:0;const jn=z.id||(T?`mui-component-select-${T}`:void 0),ut={...e,variant:W,value:G,open:Ve,error:g},An=n9(ut),Vt={...C.PaperProps,...(Ne=C.slotProps)==null?void 0:Ne.paper},de=_o();return v.jsxs(P.Fragment,{children:[v.jsx(Xq,{as:"div",ref:he,tabIndex:Sn,role:"combobox","aria-controls":Ve?de:void 0,"aria-disabled":h?"true":void 0,"aria-expanded":Ve?"true":"false","aria-haspopup":"listbox","aria-label":o,"aria-labelledby":[S,jn].filter(Boolean).join(" ")||void 0,"aria-describedby":r,"aria-required":L?"true":void 0,"aria-invalid":g?"true":void 0,onKeyDown:_e,onMouseDown:h||O?null:le,onBlur:Ye,onFocus:_,...z,ownerState:ut,className:Pe(z.className,An.select,l),id:jn,children:t9(Ie)?_T||(_T=v.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):Ie}),v.jsx(e9,{"aria-invalid":g,value:Array.isArray(G)?G.join(","):G,name:T,ref:fe,"aria-hidden":!0,onChange:xe,tabIndex:-1,disabled:h,className:An.nativeInput,autoFocus:i,required:L,...U,ownerState:ut}),v.jsx(Qq,{as:b,className:An.icon,ownerState:ut}),v.jsx(bI,{id:`menu-${T||""}`,anchorEl:ee,open:Ve,onClose:ge,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...C,slotProps:{...C.slotProps,list:{"aria-labelledby":S,role:"listbox","aria-multiselectable":E?"true":void 0,disableListWrap:!0,id:de,...C.MenuListProps},paper:{...Vt,style:{minWidth:Dt,...Vt!=null?Vt.style:null}}},children:tn})]})});process.env.NODE_ENV!=="production"&&(wI.propTypes={"aria-describedby":c.string,"aria-label":c.string,autoFocus:c.bool,autoWidth:c.bool,children:c.node,classes:c.object,className:c.string,defaultOpen:c.bool,defaultValue:c.any,disabled:c.bool,displayEmpty:c.bool,error:c.bool,IconComponent:c.elementType.isRequired,inputRef:mn,labelId:c.string,MenuProps:c.object,multiple:c.bool,name:c.string,onBlur:c.func,onChange:c.func,onClose:c.func,onFocus:c.func,onOpen:c.func,open:c.bool,readOnly:c.bool,renderValue:c.func,required:c.bool,SelectDisplayProps:c.object,tabIndex:c.oneOfType([c.number,c.string]),type:c.any,value:c.any,variant:c.oneOf(["standard","outlined","filled"])});const r9=Fe(v.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),o9=t=>{const{classes:e}=t,r=Ue({root:["root"]},CI,e);return{...e,...r}},tx={name:"MuiSelect",overridesResolver:(t,e)=>e.root,shouldForwardProp:t=>lo(t)&&t!=="variant",slot:"Root"},i9=ye(Ip,tx)(""),s9=ye(Pp,tx)(""),a9=ye(Dp,tx)(""),nx=P.forwardRef(function(e,n){const r=xt({name:"MuiSelect",props:e}),{autoWidth:o=!1,children:i,classes:s={},className:a,defaultOpen:l=!1,displayEmpty:u=!1,IconComponent:f=r9,id:h,input:m,inputProps:g,label:b,labelId:y,MenuProps:S,multiple:C=!1,native:E=!1,onClose:T,onOpen:w,open:M,renderValue:R,SelectDisplayProps:_,variant:I="outlined",...N}=r,O=E?SI:wI,A=uo(),L=cl({props:r,muiFormControl:A,states:["variant","error"]}),z=L.variant||I,V={...r,variant:z,classes:s},$=o9(V),{root:F,...W}=$,U=m||{standard:v.jsx(i9,{ownerState:V}),outlined:v.jsx(s9,{label:b,ownerState:V}),filled:v.jsx(a9,{ownerState:V})}[z],G=kt(n,Jc(U));return v.jsx(P.Fragment,{children:P.cloneElement(U,{inputComponent:O,inputProps:{children:i,error:L.error,IconComponent:f,variant:z,type:void 0,multiple:C,...E?{id:h}:{autoWidth:o,defaultOpen:l,displayEmpty:u,labelId:y,MenuProps:S,onClose:T,onOpen:w,open:M,renderValue:R,SelectDisplayProps:{id:h,..._}},...g,classes:g?Hn(W,g.classes):W,...m?m.props.inputProps:{}},...(C&&E||u)&&z==="outlined"?{notched:!0}:{},ref:G,className:Pe(U.props.className,a,$.root),...!m&&{variant:z},...N})})});process.env.NODE_ENV!=="production"&&(nx.propTypes={autoWidth:c.bool,children:c.node,classes:c.object,className:c.string,defaultOpen:c.bool,defaultValue:c.any,displayEmpty:c.bool,IconComponent:c.elementType,id:c.string,input:c.element,inputProps:c.object,label:c.node,labelId:c.string,MenuProps:c.object,multiple:c.bool,native:c.bool,onChange:c.func,onClose:c.func,onOpen:c.func,open:c.bool,renderValue:c.func,SelectDisplayProps:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),value:c.oneOfType([c.oneOf([""]),c.any]),variant:c.oneOf(["filled","outlined","standard"])});nx.muiName="Select";function l9(t){return Ke("MuiTextField",t)}He("MuiTextField",["root"]);const c9={standard:Ip,filled:Dp,outlined:Pp},u9=t=>{const{classes:e}=t;return Ue({root:["root"]},l9,e)},d9=ye(U0,{name:"MuiTextField",slot:"Root",overridesResolver:(t,e)=>e.root})({}),TI=P.forwardRef(function(e,n){const r=xt({props:e,name:"MuiTextField"}),{autoComplete:o,autoFocus:i=!1,children:s,className:a,color:l="primary",defaultValue:u,disabled:f=!1,error:h=!1,FormHelperTextProps:m,fullWidth:g=!1,helperText:b,id:y,InputLabelProps:S,inputProps:C,InputProps:E,inputRef:T,label:w,maxRows:M,minRows:R,multiline:_=!1,name:I,onBlur:N,onChange:O,onFocus:A,placeholder:L,required:z=!1,rows:V,select:$=!1,SelectProps:F,slots:W={},slotProps:U={},type:G,value:Y,variant:Z="outlined",...me}=r,fe={...r,autoFocus:i,color:l,disabled:f,error:h,fullWidth:g,multiline:_,required:z,select:$,variant:Z},pe=u9(fe);process.env.NODE_ENV!=="production"&&$&&!s&&console.error("MUI: `children` must be passed when using the `TextField` component with `select`.");const re=_o(y),ue=b&&re?`${re}-helper-text`:void 0,ae=w&&re?`${re}-label`:void 0,K=c9[Z],Q={slots:W,slotProps:{input:E,inputLabel:S,htmlInput:C,formHelperText:m,select:F,...U}},ie={},he=Q.slotProps.inputLabel;Z==="outlined"&&(he&&typeof he.shrink<"u"&&(ie.notched=he.shrink),ie.label=w),$&&((!F||!F.native)&&(ie.id=void 0),ie["aria-describedby"]=void 0);const[ee,se]=Ft("root",{elementType:d9,shouldForwardComponentProp:!0,externalForwardedProps:{...Q,...me},ownerState:fe,className:Pe(pe.root,a),ref:n,additionalProps:{disabled:f,error:h,fullWidth:g,required:z,color:l,variant:Z}}),[le,ge]=Ft("input",{elementType:K,externalForwardedProps:Q,additionalProps:ie,ownerState:fe}),[we,xe]=Ft("inputLabel",{elementType:q0,externalForwardedProps:Q,ownerState:fe}),[Me,_e]=Ft("htmlInput",{elementType:"input",externalForwardedProps:Q,ownerState:fe}),[Ve,Ye]=Ft("formHelperText",{elementType:K0,externalForwardedProps:Q,ownerState:fe}),[Ie,it]=Ft("select",{elementType:nx,externalForwardedProps:Q,ownerState:fe}),vt=v.jsx(le,{"aria-describedby":ue,autoComplete:o,autoFocus:i,defaultValue:u,fullWidth:g,multiline:_,name:I,rows:V,maxRows:M,minRows:R,type:G,value:Y,id:re,inputRef:T,onBlur:N,onChange:O,onFocus:A,placeholder:L,inputProps:_e,slots:{input:W.htmlInput?Me:void 0},...ge});return v.jsxs(ee,{...se,children:[w!=null&&w!==""&&v.jsx(we,{htmlFor:re,id:ae,...xe,children:w}),$?v.jsx(Ie,{"aria-describedby":ue,id:re,labelId:ae,value:Y,input:vt,...it,children:s}):vt,b&&v.jsx(Ve,{id:ue,...Ye,children:b})]})});process.env.NODE_ENV!=="production"&&(TI.propTypes={autoComplete:c.string,autoFocus:c.bool,children:c.node,classes:c.object,className:c.string,color:c.oneOfType([c.oneOf(["primary","secondary","error","info","success","warning"]),c.string]),defaultValue:c.any,disabled:c.bool,error:c.bool,FormHelperTextProps:c.object,fullWidth:c.bool,helperText:c.node,id:c.string,InputLabelProps:c.object,inputProps:c.object,InputProps:c.object,inputRef:mn,label:c.node,margin:c.oneOf(["dense","none","normal"]),maxRows:c.oneOfType([c.number,c.string]),minRows:c.oneOfType([c.number,c.string]),multiline:c.bool,name:c.string,onBlur:c.func,onChange:c.func,onFocus:c.func,placeholder:c.string,required:c.bool,rows:c.oneOfType([c.number,c.string]),select:c.bool,SelectProps:c.object,size:c.oneOfType([c.oneOf(["medium","small"]),c.string]),slotProps:c.shape({formHelperText:c.oneOfType([c.func,c.object]),htmlInput:c.oneOfType([c.func,c.object]),input:c.oneOfType([c.func,c.object]),inputLabel:c.oneOfType([c.func,c.object]),select:c.oneOfType([c.func,c.object])}),slots:c.shape({formHelperText:c.elementType,htmlInput:c.elementType,input:c.elementType,inputLabel:c.elementType,root:c.elementType,select:c.elementType}),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),type:c.string,value:c.any,variant:c.oneOf(["filled","outlined","standard"])});const $l=(t,e)=>t.length!==e.length?!1:e.every(n=>t.includes(n)),f9=({openTo:t,defaultOpenTo:e,views:n,defaultViews:r})=>{const o=n??r;let i;if(t!=null)i=t;else if(o.includes(e))i=e;else if(o.length>0)i=o[0];else throw new Error("MUI X: The `views` prop must contain at least one view.");return{views:o,openTo:i}},gf=(t,e,n)=>{let r=e;return r=t.setHours(r,t.getHours(n)),r=t.setMinutes(r,t.getMinutes(n)),r=t.setSeconds(r,t.getSeconds(n)),r=t.setMilliseconds(r,t.getMilliseconds(n)),r},lc=({date:t,disableFuture:e,disablePast:n,maxDate:r,minDate:o,isDateDisabled:i,utils:s,timezone:a})=>{const l=gf(s,s.date(void 0,a),t);n&&s.isBefore(o,l)&&(o=l),e&&s.isAfter(r,l)&&(r=l);let u=t,f=t;for(s.isBefore(t,o)&&(u=o,f=null),s.isAfter(t,r)&&(f&&(f=r),u=null);u||f;){if(u&&s.isAfter(u,r)&&(u=null),f&&s.isBefore(f,o)&&(f=null),u){if(!i(u))return u;u=s.addDays(u,1)}if(f){if(!i(f))return f;f=s.addDays(f,-1)}}return null},p9=(t,e)=>e==null||!t.isValid(e)?null:e,Ur=(t,e,n)=>e==null||!t.isValid(e)?n:e,h9=(t,e,n)=>!t.isValid(e)&&e!=null&&!t.isValid(n)&&n!=null?!0:t.isEqual(e,n),rx=(t,e)=>{const r=[t.startOfYear(e)];for(;r.length<12;){const o=r[r.length-1];r.push(t.addMonths(o,1))}return r},EI=(t,e,n)=>n==="date"?t.startOfDay(t.date(void 0,e)):t.date(void 0,e),m9=["year","month","day"],LT=t=>m9.includes(t),ox=(t,{format:e,views:n},r)=>{if(e!=null)return e;const o=t.formats;return $l(n,["year"])?o.year:$l(n,["month"])?o.month:$l(n,["day"])?o.dayOfMonth:$l(n,["month","year"])?`${o.month} ${o.year}`:$l(n,["day","month"])?`${o.month} ${o.dayOfMonth}`:r?/en/.test(t.getCurrentLocaleCode())?o.normalDateWithWeekday:o.normalDate:o.keyboardDate},g9=(t,e)=>{const n=t.startOfWeek(e);return[0,1,2,3,4,5,6].map(r=>t.addDays(n,r))},y9=["hours","minutes","seconds"],b9=t=>y9.includes(t),jT=(t,e)=>e.getHours(t)*3600+e.getMinutes(t)*60+e.getSeconds(t),v9=(t,e)=>(n,r)=>t?e.isAfter(n,r):jT(n,e)>jT(r,e),wo={year:1,month:2,day:3,hours:4,minutes:5,seconds:6,milliseconds:7},x9=t=>Math.max(...t.map(e=>wo[e.type]??1)),Fl=(t,e,n)=>{if(e===wo.year)return t.startOfYear(n);if(e===wo.month)return t.startOfMonth(n);if(e===wo.day)return t.startOfDay(n);let r=n;return e<wo.minutes&&(r=t.setMinutes(r,0)),e<wo.seconds&&(r=t.setSeconds(r,0)),e<wo.milliseconds&&(r=t.setMilliseconds(r,0)),r},S9=({props:t,utils:e,granularity:n,timezone:r,getTodayDate:o})=>{let i=o?o():Fl(e,n,EI(e,r));t.minDate!=null&&e.isAfterDay(t.minDate,i)&&(i=Fl(e,n,t.minDate)),t.maxDate!=null&&e.isBeforeDay(t.maxDate,i)&&(i=Fl(e,n,t.maxDate));const s=v9(t.disableIgnoringDatePartForTimeValidation??!1,e);return t.minTime!=null&&s(t.minTime,i)&&(i=Fl(e,n,t.disableIgnoringDatePartForTimeValidation?t.minTime:gf(e,i,t.minTime))),t.maxTime!=null&&s(i,t.maxTime)&&(i=Fl(e,n,t.disableIgnoringDatePartForTimeValidation?t.maxTime:gf(e,i,t.maxTime))),i},ix=(t,e)=>{const n=t.formatTokenMap[e];if(n==null)throw new Error([`MUI X: The token "${e}" is not supported by the Date and Time Pickers.`,"Please try using another token or open an issue on https://github.com/mui/mui-x/issues/new/choose if you think it should be supported."].join(`
122
+ `));return typeof n=="string"?{type:n,contentType:n==="meridiem"?"letter":"digit",maxLength:void 0}:{type:n.sectionType,contentType:n.contentType,maxLength:n.maxLength}},C9=t=>{switch(t){case"ArrowUp":return 1;case"ArrowDown":return-1;case"PageUp":return 5;case"PageDown":return-5;default:return 0}},_p=(t,e)=>{const n=[],r=t.date(void 0,"default"),o=t.startOfWeek(r),i=t.endOfWeek(r);let s=o;for(;t.isBefore(s,i);)n.push(s),s=t.addDays(s,1);return n.map(a=>t.formatByString(a,e))},kI=(t,e,n,r)=>{switch(n){case"month":return rx(t,t.date(void 0,e)).map(o=>t.formatByString(o,r));case"weekDay":return _p(t,r);case"meridiem":{const o=t.date(void 0,e);return[t.startOfDay(o),t.endOfDay(o)].map(i=>t.formatByString(i,r))}default:return[]}},$T="s",w9=["0","1","2","3","4","5","6","7","8","9"],T9=t=>{const e=t.date(void 0);return t.formatByString(t.setSeconds(e,0),$T)==="0"?w9:Array.from({length:10}).map((r,o)=>t.formatByString(t.setSeconds(e,o),$T))},Fs=(t,e)=>{if(e[0]==="0")return t;const n=[];let r="";for(let o=0;o<t.length;o+=1){r+=t[o];const i=e.indexOf(r);i>-1&&(n.push(i.toString()),r="")}return n.join("")},sx=(t,e)=>e[0]==="0"?t:t.split("").map(n=>e[Number(n)]).join(""),FT=(t,e)=>{const n=Fs(t,e);return n!==" "&&!Number.isNaN(Number(n))},MI=(t,e)=>{let n=t;for(n=Number(n).toString();n.length<e;)n=`0${n}`;return n},OI=(t,e,n,r,o)=>{if(process.env.NODE_ENV!=="production"&&o.type!=="day"&&o.contentType==="digit-with-letter")throw new Error([`MUI X: The token "${o.format}" is a digit format with letter in it.'
123
+ This type of format is only supported for 'day' sections`].join(`
124
+ `));if(o.type==="day"&&o.contentType==="digit-with-letter"){const s=t.setDate(n.longestMonth,e);return t.formatByString(s,o.format)}let i=e.toString();return o.hasLeadingZerosInInput&&(i=MI(i,o.maxLength)),sx(i,r)},E9=(t,e,n,r,o,i,s,a)=>{const l=C9(r),u=r==="Home",f=r==="End",h=n.value===""||u||f,m=()=>{const b=o[n.type]({currentDate:s,format:n.format,contentType:n.contentType}),y=T=>OI(t,T,b,i,n),S=n.type==="minutes"&&(a!=null&&a.minutesStep)?a.minutesStep:1;let E=parseInt(Fs(n.value,i),10)+l*S;if(h){if(n.type==="year"&&!f&&!u)return t.formatByString(t.date(void 0,e),n.format);l>0||u?E=b.minimum:E=b.maximum}return E%S!==0&&((l<0||u)&&(E+=S-(S+E)%S),(l>0||f)&&(E-=E%S)),E>b.maximum?y(b.minimum+(E-b.maximum-1)%(b.maximum-b.minimum+1)):E<b.minimum?y(b.maximum-(b.minimum-E-1)%(b.maximum-b.minimum+1)):y(E)},g=()=>{const b=kI(t,e,n.type,n.format);if(b.length===0)return n.value;if(h)return l>0||u?b[0]:b[b.length-1];const C=((b.indexOf(n.value)+l)%b.length+b.length)%b.length;return b[C]};return n.contentType==="digit"||n.contentType==="digit-with-letter"?m():g()},ax=(t,e,n)=>{let r=t.value||t.placeholder;const o=e==="non-input"?t.hasLeadingZerosInFormat:t.hasLeadingZerosInInput;return e==="non-input"&&t.hasLeadingZerosInInput&&!t.hasLeadingZerosInFormat&&(r=Number(Fs(r,n)).toString()),["input-rtl","input-ltr"].includes(e)&&t.contentType==="digit"&&!o&&r.length===1&&(r=`${r}‎`),e==="input-rtl"&&(r=`⁨${r}⁩`),r},BT=(t,e,n,r)=>{if(process.env.NODE_ENV!=="production"&&ix(t,n).type==="weekDay")throw new Error("changeSectionValueFormat doesn't support week day formats");return t.formatByString(t.parse(e,n),r)},RI=(t,e)=>t.formatByString(t.date(void 0,"system"),e).length===4,AI=(t,e,n,r)=>{if(e!=="digit")return!1;const o=t.date(void 0,"default");switch(n){case"year":return RI(t,r)?t.formatByString(t.setYear(o,1),r)==="0001":t.formatByString(t.setYear(o,2001),r)==="01";case"month":return t.formatByString(t.startOfYear(o),r).length>1;case"day":return t.formatByString(t.startOfMonth(o),r).length>1;case"weekDay":return t.formatByString(t.startOfWeek(o),r).length>1;case"hours":return t.formatByString(t.setHours(o,1),r).length>1;case"minutes":return t.formatByString(t.setMinutes(o,1),r).length>1;case"seconds":return t.formatByString(t.setSeconds(o,1),r).length>1;default:throw new Error("Invalid section type")}},k9=(t,e,n)=>{const r=e.some(l=>l.type==="day"),o=[],i=[];for(let l=0;l<e.length;l+=1){const u=e[l];r&&u.type==="weekDay"||(o.push(u.format),i.push(ax(u,"non-input",n)))}const s=o.join(" "),a=i.join(" ");return t.parse(a,s)},M9=t=>t.map(e=>`${e.startSeparator}${e.value||e.placeholder}${e.endSeparator}`).join(""),O9=(t,e,n)=>{const o=t.map(i=>{const s=ax(i,n?"input-rtl":"input-ltr",e);return`${i.startSeparator}${s}${i.endSeparator}`}).join("");return n?`⁦${o}⁩`:o},R9=(t,e,n)=>{const r=t.date(void 0,n),o=t.endOfYear(r),i=t.endOfDay(r),{maxDaysInMonth:s,longestMonth:a}=rx(t,r).reduce((l,u)=>{const f=t.getDaysInMonth(u);return f>l.maxDaysInMonth?{maxDaysInMonth:f,longestMonth:u}:l},{maxDaysInMonth:0,longestMonth:null});return{year:({format:l})=>({minimum:0,maximum:RI(t,l)?9999:99}),month:()=>({minimum:1,maximum:t.getMonth(o)+1}),day:({currentDate:l})=>({minimum:1,maximum:l!=null&&t.isValid(l)?t.getDaysInMonth(l):s,longestMonth:a}),weekDay:({format:l,contentType:u})=>{if(u==="digit"){const f=_p(t,l).map(Number);return{minimum:Math.min(...f),maximum:Math.max(...f)}}return{minimum:1,maximum:7}},hours:({format:l})=>{const u=t.getHours(i);return Fs(t.formatByString(t.endOfDay(r),l),e)!==u.toString()?{minimum:1,maximum:Number(Fs(t.formatByString(t.startOfDay(r),l),e))}:{minimum:0,maximum:u}},minutes:()=>({minimum:0,maximum:t.getMinutes(i)}),seconds:()=>({minimum:0,maximum:t.getSeconds(i)}),meridiem:()=>({minimum:0,maximum:1}),empty:()=>({minimum:0,maximum:0})}};let VT=!1;const zT=(t,e)=>{if(process.env.NODE_ENV!=="production"&&!VT){const n=["empty"];["date","date-time"].includes(e)&&n.push("weekDay","day","month","year"),["time","date-time"].includes(e)&&n.push("hours","minutes","seconds","meridiem");const r=t.find(o=>!n.includes(o.type));r&&(console.warn(`MUI X: The field component you are using is not compatible with the "${r.type}" date section.`,`The supported date sections are ["${n.join('", "')}"]\`.`),VT=!0)}},A9=(t,e,n,r)=>{switch(e.type){case"year":return t.setYear(r,t.getYear(n));case"month":return t.setMonth(r,t.getMonth(n));case"weekDay":{const o=_p(t,e.format),i=t.formatByString(n,e.format),s=o.indexOf(i),l=o.indexOf(e.value)-s;return t.addDays(n,l)}case"day":return t.setDate(r,t.getDate(n));case"meridiem":{const o=t.getHours(n)<12,i=t.getHours(r);return o&&i>=12?t.addHours(r,-12):!o&&i<12?t.addHours(r,12):r}case"hours":return t.setHours(r,t.getHours(n));case"minutes":return t.setMinutes(r,t.getMinutes(n));case"seconds":return t.setSeconds(r,t.getSeconds(n));default:return r}},HT={year:1,month:2,day:3,weekDay:4,hours:5,minutes:6,seconds:7,meridiem:8,empty:9},WT=(t,e,n,r,o)=>[...n].sort((i,s)=>HT[i.type]-HT[s.type]).reduce((i,s)=>!o||s.modified?A9(t,s,e,i):i,r),I9=()=>navigator.userAgent.toLowerCase().includes("android"),D9=(t,e)=>{const n={};if(!e)return t.forEach((l,u)=>{const f=u===0?null:u-1,h=u===t.length-1?null:u+1;n[u]={leftIndex:f,rightIndex:h}}),{neighbors:n,startIndex:0,endIndex:t.length-1};const r={},o={};let i=0,s=0,a=t.length-1;for(;a>=0;){s=t.findIndex((l,u)=>{var f;return u>=i&&((f=l.endSeparator)==null?void 0:f.includes(" "))&&l.endSeparator!==" / "}),s===-1&&(s=t.length-1);for(let l=s;l>=i;l-=1)o[l]=a,r[a]=l,a-=1;i=s+1}return t.forEach((l,u)=>{const f=o[u],h=f===0?null:r[f-1],m=f===t.length-1?null:r[f+1];n[u]={leftIndex:h,rightIndex:m}}),{neighbors:n,startIndex:r[0],endIndex:r[t.length-1]}},Nv=(t,e)=>{if(t==null)return null;if(t==="all")return"all";if(typeof t=="string"){const n=e.findIndex(r=>r.type===t);return n===-1?null:n}return t},P9=(t,e)=>{if(t.value)switch(t.type){case"month":{if(t.contentType==="digit")return e.format(e.setMonth(e.date(),Number(t.value)-1),"month");const n=e.parse(t.value,t.format);return n?e.format(n,"month"):void 0}case"day":return t.contentType==="digit"?e.format(e.setDate(e.startOfYear(e.date()),Number(t.value)),"dayOfMonthFull"):t.value;case"weekDay":return;default:return}},_9=(t,e)=>{if(t.value)switch(t.type){case"weekDay":return t.contentType==="letter"?void 0:Number(t.value);case"meridiem":{const n=e.parse(`01:00 ${t.value}`,`${e.formats.hours12h}:${e.formats.minutes} ${t.format}`);return n?e.getHours(n)>=12?1:0:void 0}case"day":return t.contentType==="digit-with-letter"?parseInt(t.value,10):Number(t.value);case"month":{if(t.contentType==="digit")return Number(t.value);const n=e.parse(t.value,t.format);return n?e.getMonth(n)+1:void 0}default:return t.contentType!=="letter"?Number(t.value):void 0}},N9=["value","referenceDate"],Ro={emptyValue:null,getTodayValue:EI,getInitialReferenceValue:t=>{let{value:e,referenceDate:n}=t,r=nt(t,N9);return e!=null&&r.utils.isValid(e)?e:n??S9(r)},cleanValue:p9,areValuesEqual:h9,isSameError:(t,e)=>t===e,hasError:t=>t!=null,defaultErrorState:null,getTimezone:(t,e)=>e==null||!t.isValid(e)?null:t.getTimezone(e),setTimezone:(t,e,n)=>n==null?null:t.setTimezone(n,e)},L9={updateReferenceValue:(t,e,n)=>e==null||!t.isValid(e)?n:e,getSectionsFromValue:(t,e,n,r)=>!t.isValid(e)&&!!n?n:r(e),getV7HiddenInputValueFromSections:M9,getV6InputValueFromSections:O9,getActiveDateManager:(t,e)=>({date:e.value,referenceDate:e.referenceValue,getSections:n=>n,getNewValuesFromNewActiveDate:n=>({value:n,referenceValue:n==null||!t.isValid(n)?e.referenceValue:n})}),parseValueStr:(t,e,n)=>n(t.trim(),e)},ou=({props:t,value:e,timezone:n,adapter:r})=>{if(e===null)return null;const{shouldDisableDate:o,shouldDisableMonth:i,shouldDisableYear:s,disablePast:a,disableFuture:l}=t,u=r.utils.date(void 0,n),f=Ur(r.utils,t.minDate,r.defaultDates.minDate),h=Ur(r.utils,t.maxDate,r.defaultDates.maxDate);switch(!0){case!r.utils.isValid(e):return"invalidDate";case!!(o&&o(e)):return"shouldDisableDate";case!!(i&&i(e)):return"shouldDisableMonth";case!!(s&&s(e)):return"shouldDisableYear";case!!(l&&r.utils.isAfterDay(e,u)):return"disableFuture";case!!(a&&r.utils.isBeforeDay(e,u)):return"disablePast";case!!(f&&r.utils.isBeforeDay(e,f)):return"minDate";case!!(h&&r.utils.isAfterDay(e,h)):return"maxDate";default:return null}};ou.valueManager=Ro;const II=["disablePast","disableFuture","minDate","maxDate","shouldDisableDate","shouldDisableMonth","shouldDisableYear"],j9=["disablePast","disableFuture","minTime","maxTime","shouldDisableTime","minutesStep","ampm","disableIgnoringDatePartForTimeValidation"],$9=["minDateTime","maxDateTime"],F9=[...II,...j9,...$9],DI=t=>F9.reduce((e,n)=>(t.hasOwnProperty(n)&&(e[n]=t[n]),e),{}),B9=t=>({components:{MuiLocalizationProvider:{defaultProps:{localeText:te({},t)}}}}),PI=t=>{const{utils:e,formatKey:n,contextTranslation:r,propsTranslation:o}=t;return i=>{const s=i!==null&&e.isValid(i)?e.format(i,n):null;return(o??r)(i,e,s)}},_I={previousMonth:"Previous month",nextMonth:"Next month",openPreviousView:"Open previous view",openNextView:"Open next view",calendarViewSwitchingButtonAriaLabel:t=>t==="year"?"year view is open, switch to calendar view":"calendar view is open, switch to year view",start:"Start",end:"End",startDate:"Start date",startTime:"Start time",endDate:"End date",endTime:"End time",cancelButtonLabel:"Cancel",clearButtonLabel:"Clear",okButtonLabel:"OK",todayButtonLabel:"Today",datePickerToolbarTitle:"Select date",dateTimePickerToolbarTitle:"Select date & time",timePickerToolbarTitle:"Select time",dateRangePickerToolbarTitle:"Select date range",clockLabelText:(t,e,n,r)=>`Select ${t}. ${!r&&(e===null||!n.isValid(e))?"No time selected":`Selected time is ${r??n.format(e,"fullTime")}`}`,hoursClockNumberText:t=>`${t} hours`,minutesClockNumberText:t=>`${t} minutes`,secondsClockNumberText:t=>`${t} seconds`,selectViewText:t=>`Select ${t}`,calendarWeekNumberHeaderLabel:"Week number",calendarWeekNumberHeaderText:"#",calendarWeekNumberAriaLabelText:t=>`Week ${t}`,calendarWeekNumberText:t=>`${t}`,openDatePickerDialogue:(t,e,n)=>n||t!==null&&e.isValid(t)?`Choose date, selected date is ${n??e.format(t,"fullDate")}`:"Choose date",openTimePickerDialogue:(t,e,n)=>n||t!==null&&e.isValid(t)?`Choose time, selected time is ${n??e.format(t,"fullTime")}`:"Choose time",fieldClearLabel:"Clear",timeTableLabel:"pick time",dateTableLabel:"pick date",fieldYearPlaceholder:t=>"Y".repeat(t.digitAmount),fieldMonthPlaceholder:t=>t.contentType==="letter"?"MMMM":"MM",fieldDayPlaceholder:()=>"DD",fieldWeekDayPlaceholder:t=>t.contentType==="letter"?"EEEE":"EE",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",fieldSecondsPlaceholder:()=>"ss",fieldMeridiemPlaceholder:()=>"aa",year:"Year",month:"Month",day:"Day",weekDay:"Week day",hours:"Hours",minutes:"Minutes",seconds:"Seconds",meridiem:"Meridiem",empty:"Empty"},V9=_I;B9(_I);const Ks=()=>{const t=P.useContext(ff);if(t===null)throw new Error(["MUI X: Can not find the date and time pickers localization context.","It looks like you forgot to wrap your component in LocalizationProvider.","This can also happen if you are bundling multiple versions of the `@mui/x-date-pickers` package"].join(`
125
+ `));if(t.utils===null)throw new Error(["MUI X: Can not find the date and time pickers adapter from its localization context.","It looks like you forgot to pass a `dateAdapter` to your LocalizationProvider."].join(`
126
+ `));const e=P.useMemo(()=>te({},V9,t.localeText),[t.localeText]);return P.useMemo(()=>te({},t,{localeText:e}),[t,e])},Ut=()=>Ks().utils,iu=()=>Ks().defaultDates,Np=t=>{const e=Ut(),n=P.useRef();return n.current===void 0&&(n.current=e.date(void 0,t)),n.current};function NI(t){const{props:e,validator:n,value:r,timezone:o,onError:i}=t,s=Ks(),a=P.useRef(n.valueManager.defaultErrorState),l=n({adapter:s,value:r,timezone:o,props:e}),u=n.valueManager.hasError(l);P.useEffect(()=>{i&&!n.valueManager.isSameError(l,a.current)&&i(l,r),a.current=l},[n,i,l,r]);const f=je(h=>n({adapter:s,value:h,timezone:o,props:e}));return{validationError:l,hasValidationError:u,getValidationErrorForNewValue:f}}const fi=()=>Ks().localeText,z9=({utils:t,format:e})=>{let n=10,r=e,o=t.expandFormat(e);for(;o!==r;)if(r=o,o=t.expandFormat(r),n-=1,n<0)throw new Error("MUI X: The format expansion seems to be in an infinite loop. Please open an issue with the format passed to the picker component.");return o},H9=({utils:t,expandedFormat:e})=>{const n=[],{start:r,end:o}=t.escapedCharacters,i=new RegExp(`(\\${r}[^\\${o}]*\\${o})+`,"g");let s=null;for(;s=i.exec(e);)n.push({start:s.index,end:i.lastIndex-1});return n},W9=(t,e,n,r)=>{switch(n.type){case"year":return e.fieldYearPlaceholder({digitAmount:t.formatByString(t.date(void 0,"default"),r).length,format:r});case"month":return e.fieldMonthPlaceholder({contentType:n.contentType,format:r});case"day":return e.fieldDayPlaceholder({format:r});case"weekDay":return e.fieldWeekDayPlaceholder({contentType:n.contentType,format:r});case"hours":return e.fieldHoursPlaceholder({format:r});case"minutes":return e.fieldMinutesPlaceholder({format:r});case"seconds":return e.fieldSecondsPlaceholder({format:r});case"meridiem":return e.fieldMeridiemPlaceholder({format:r});default:return r}},q9=({utils:t,date:e,shouldRespectLeadingZeros:n,localeText:r,localizedDigits:o,now:i,token:s,startSeparator:a})=>{if(s==="")throw new Error("MUI X: Should not call `commitToken` with an empty token");const l=ix(t,s),u=AI(t,l.contentType,l.type,s),f=n?u:l.contentType==="digit",h=e!=null&&t.isValid(e);let m=h?t.formatByString(e,s):"",g=null;if(f)if(u)g=m===""?t.formatByString(i,s).length:m.length;else{if(l.maxLength==null)throw new Error(`MUI X: The token ${s} should have a 'maxDigitNumber' property on it's adapter`);g=l.maxLength,h&&(m=sx(MI(Fs(m,o),g),o))}return te({},l,{format:s,maxLength:g,value:m,placeholder:W9(t,r,l,s),hasLeadingZerosInFormat:u,hasLeadingZerosInInput:f,startSeparator:a,endSeparator:"",modified:!1})},U9=t=>{var g;const{utils:e,expandedFormat:n,escapedParts:r}=t,o=e.date(void 0),i=[];let s="";const a=Object.keys(e.formatTokenMap).sort((b,y)=>y.length-b.length),l=/^([a-zA-Z]+)/,u=new RegExp(`^(${a.join("|")})*$`),f=new RegExp(`^(${a.join("|")})`),h=b=>r.find(y=>y.start<=b&&y.end>=b);let m=0;for(;m<n.length;){const b=h(m),y=b!=null,S=(g=l.exec(n.slice(m)))==null?void 0:g[1];if(!y&&S!=null&&u.test(S)){let C=S;for(;C.length>0;){const E=f.exec(C)[1];C=C.slice(E.length),i.push(q9(te({},t,{now:o,token:E,startSeparator:s}))),s=""}m+=S.length}else{const C=n[m];y&&(b==null?void 0:b.start)===m||(b==null?void 0:b.end)===m||(i.length===0?s+=C:i[i.length-1].endSeparator+=C),m+=1}}return i.length===0&&s.length>0&&i.push({type:"empty",contentType:"letter",maxLength:null,format:"",value:"",placeholder:"",hasLeadingZerosInFormat:!1,hasLeadingZerosInInput:!1,startSeparator:s,endSeparator:"",modified:!1}),i},K9=({isRtl:t,formatDensity:e,sections:n})=>n.map(r=>{const o=i=>{let s=i;return t&&s!==null&&s.includes(" ")&&(s=`⁩${s}⁦`),e==="spacious"&&["/",".","-"].includes(s)&&(s=` ${s} `),s};return r.startSeparator=o(r.startSeparator),r.endSeparator=o(r.endSeparator),r}),qT=t=>{let e=z9(t);t.isRtl&&t.enableAccessibleFieldDOMStructure&&(e=e.split(" ").reverse().join(" "));const n=H9(te({},t,{expandedFormat:e})),r=U9(te({},t,{expandedFormat:e,escapedParts:n}));return K9(te({},t,{sections:r}))},lx=({timezone:t,value:e,defaultValue:n,referenceDate:r,onChange:o,valueManager:i})=>{const s=Ut(),a=P.useRef(n),l=e??a.current??i.emptyValue,u=P.useMemo(()=>i.getTimezone(s,l),[s,i,l]),f=je(b=>u==null?b:i.setTimezone(s,u,b));let h;t?h=t:u?h=u:r?h=s.getTimezone(r):h="default";const m=P.useMemo(()=>i.setTimezone(s,h,l),[i,s,h,l]),g=je((b,...y)=>{const S=f(b);o==null||o(S,...y)});return{value:m,handleValueChange:g,timezone:h}},cx=({name:t,timezone:e,value:n,defaultValue:r,referenceDate:o,onChange:i,valueManager:s})=>{const[a,l]=ai({name:t,state:"value",controlled:n,default:r??s.emptyValue}),u=je((f,...h)=>{l(f),i==null||i(f,...h)});return lx({timezone:e,value:a,defaultValue:void 0,referenceDate:o,onChange:u,valueManager:s})},Y9=t=>{const e=Ut(),n=fi(),r=Ks(),o=ao(),{valueManager:i,fieldValueManager:s,valueType:a,validator:l,internalProps:u,internalProps:{value:f,defaultValue:h,referenceDate:m,onChange:g,format:b,formatDensity:y="dense",selectedSections:S,onSelectedSectionsChange:C,shouldRespectLeadingZeros:E=!1,timezone:T,enableAccessibleFieldDOMStructure:w=!1}}=t,{timezone:M,value:R,handleValueChange:_}=lx({timezone:T,value:f,defaultValue:h,referenceDate:m,onChange:g,valueManager:i}),I=P.useMemo(()=>T9(e),[e]),N=P.useMemo(()=>R9(e,I,M),[e,I,M]),O=P.useCallback((re,ue=null)=>s.getSectionsFromValue(e,re,ue,ae=>qT({utils:e,localeText:n,localizedDigits:I,format:b,date:ae,formatDensity:y,shouldRespectLeadingZeros:E,enableAccessibleFieldDOMStructure:w,isRtl:o})),[s,b,n,I,o,E,e,y,w]),[A,L]=P.useState(()=>{const re=O(R);zT(re,a);const ue={sections:re,value:R,referenceValue:i.emptyValue,tempValueStrAndroid:null},ae=x9(re),K=i.getInitialReferenceValue({referenceDate:m,value:R,utils:e,props:u,granularity:ae,timezone:M});return te({},ue,{referenceValue:K})}),[z,V]=ai({controlled:S,default:null,name:"useField",state:"selectedSections"}),$=re=>{V(re),C==null||C(re)},F=P.useMemo(()=>Nv(z,A.sections),[z,A.sections]),W=F==="all"?0:F,U=({value:re,referenceValue:ue,sections:ae})=>{if(L(Q=>te({},Q,{sections:ae,value:re,referenceValue:ue,tempValueStrAndroid:null})),i.areValuesEqual(e,A.value,re))return;const K={validationError:l({adapter:r,value:re,timezone:M,props:u})};_(re,K)},G=(re,ue)=>{const ae=[...A.sections];return ae[re]=te({},ae[re],{value:ue,modified:!0}),ae},Y=()=>{U({value:i.emptyValue,referenceValue:A.referenceValue,sections:O(i.emptyValue)})},Z=()=>{if(W==null)return;const re=A.sections[W],ue=s.getActiveDateManager(e,A,re),K=ue.getSections(A.sections).filter(ee=>ee.value!=="").length===(re.value===""?0:1),Q=G(W,""),ie=K?null:e.getInvalidDate(),he=ue.getNewValuesFromNewActiveDate(ie);U(te({},he,{sections:Q}))},me=re=>{const ue=(Q,ie)=>{const he=e.parse(Q,b);if(he==null||!e.isValid(he))return null;const ee=qT({utils:e,localeText:n,localizedDigits:I,format:b,date:he,formatDensity:y,shouldRespectLeadingZeros:E,enableAccessibleFieldDOMStructure:w,isRtl:o});return WT(e,he,ee,ie,!1)},ae=s.parseValueStr(re,A.referenceValue,ue),K=s.updateReferenceValue(e,ae,A.referenceValue);U({value:ae,referenceValue:K,sections:O(ae,A.sections)})},fe=({activeSection:re,newSectionValue:ue,shouldGoToNextSection:ae})=>{ae&&W<A.sections.length-1&&$(W+1);const K=s.getActiveDateManager(e,A,re),Q=G(W,ue),ie=K.getSections(Q),he=k9(e,ie,I);let ee,se;if(he!=null&&e.isValid(he)){const le=WT(e,he,ie,K.referenceDate,!0);ee=K.getNewValuesFromNewActiveDate(le),se=!0}else ee=K.getNewValuesFromNewActiveDate(he),se=(he!=null&&!e.isValid(he))!=(K.date!=null&&!e.isValid(K.date));return se?U(te({},ee,{sections:Q})):L(le=>te({},le,ee,{sections:Q,tempValueStrAndroid:null}))},pe=re=>L(ue=>te({},ue,{tempValueStrAndroid:re}));return P.useEffect(()=>{const re=O(A.value);zT(re,a),L(ue=>te({},ue,{sections:re}))},[b,e.locale,o]),P.useEffect(()=>{let re;i.areValuesEqual(e,A.value,R)?re=i.getTimezone(e,A.value)!==i.getTimezone(e,R):re=!0,re&&L(ue=>te({},ue,{value:R,referenceValue:s.updateReferenceValue(e,R,ue.referenceValue),sections:O(R)}))},[R]),{state:A,activeSectionIndex:W,parsedSelectedSections:F,setSelectedSections:$,clearValue:Y,clearActiveSection:Z,updateSectionValue:fe,updateValueFromValueStr:me,setTempAndroidValueStr:pe,getSectionsFromValue:O,sectionsValueBoundaries:N,localizedDigits:I,timezone:M}},G9=5e3,Sa=t=>t.saveQuery!=null,J9=({sections:t,updateSectionValue:e,sectionsValueBoundaries:n,localizedDigits:r,setTempAndroidValueStr:o,timezone:i})=>{const s=Ut(),[a,l]=P.useState(null),u=je(()=>l(null));P.useEffect(()=>{var b;a!=null&&((b=t[a.sectionIndex])==null?void 0:b.type)!==a.sectionType&&u()},[t,a,u]),P.useEffect(()=>{if(a!=null){const b=setTimeout(()=>u(),G9);return()=>{clearTimeout(b)}}return()=>{}},[a,u]);const f=({keyPressed:b,sectionIndex:y},S,C)=>{const E=b.toLowerCase(),T=t[y];if(a!=null&&(!C||C(a.value))&&a.sectionIndex===y){const M=`${a.value}${E}`,R=S(M,T);if(!Sa(R))return l({sectionIndex:y,value:M,sectionType:T.type}),R}const w=S(E,T);return Sa(w)&&!w.saveQuery?(u(),null):(l({sectionIndex:y,value:E,sectionType:T.type}),Sa(w)?null:w)},h=b=>{const y=(E,T,w)=>{const M=T.filter(R=>R.toLowerCase().startsWith(w));return M.length===0?{saveQuery:!1}:{sectionValue:M[0],shouldGoToNextSection:M.length===1}},S=(E,T,w,M)=>{const R=_=>kI(s,i,T.type,_);if(T.contentType==="letter")return y(T.format,R(T.format),E);if(w&&M!=null&&ix(s,w).contentType==="letter"){const _=R(w),I=y(w,_,E);return Sa(I)?{saveQuery:!1}:te({},I,{sectionValue:M(I.sectionValue,_)})}return{saveQuery:!1}};return f(b,(E,T)=>{switch(T.type){case"month":{const w=M=>BT(s,M,s.formats.month,T.format);return S(E,T,s.formats.month,w)}case"weekDay":{const w=(M,R)=>R.indexOf(M).toString();return S(E,T,s.formats.weekday,w)}case"meridiem":return S(E,T);default:return{saveQuery:!1}}})},m=b=>{const y=(C,E)=>{const T=Fs(C,r),w=Number(T),M=n[E.type]({currentDate:null,format:E.format,contentType:E.contentType});if(w>M.maximum)return{saveQuery:!1};if(w<M.minimum)return{saveQuery:!0};const R=w*10>M.maximum||T.length===M.maximum.toString().length;return{sectionValue:OI(s,w,M,r,E),shouldGoToNextSection:R}};return f(b,(C,E)=>{if(E.contentType==="digit"||E.contentType==="digit-with-letter")return y(C,E);if(E.type==="month"){const T=AI(s,"digit","month","MM"),w=y(C,{type:E.type,format:"MM",hasLeadingZerosInFormat:T,hasLeadingZerosInInput:!0,contentType:"digit",maxLength:2});if(Sa(w))return w;const M=BT(s,w.sectionValue,"MM",E.format);return te({},w,{sectionValue:M})}if(E.type==="weekDay"){const T=y(C,E);if(Sa(T))return T;const w=_p(s,E.format)[Number(T.sectionValue)-1];return te({},T,{sectionValue:w})}return{saveQuery:!1}},C=>FT(C,r))};return{applyCharacterEditing:je(b=>{const y=t[b.sectionIndex],C=FT(b.keyPressed,r)?m(te({},b,{keyPressed:sx(b.keyPressed,r)})):h(b);if(C==null){o(null);return}e({activeSection:y,newSectionValue:C.sectionValue,shouldGoToNextSection:C.shouldGoToNextSection})}),resetCharacterQuery:u}};function Z9(t,e){return Array.isArray(e)?e.every(n=>t.indexOf(n)!==-1):t.indexOf(e)!==-1}const X9=(t,e)=>n=>{(n.key==="Enter"||n.key===" ")&&(t(n),n.preventDefault(),n.stopPropagation())},Cr=(t=document)=>{const e=t.activeElement;return e?e.shadowRoot?Cr(e.shadowRoot):e:null},Q9="@media (pointer: fine)",e8=t=>{const{internalProps:{disabled:e,readOnly:n=!1},forwardedProps:{sectionListRef:r,onBlur:o,onClick:i,onFocus:s,onInput:a,onPaste:l,focused:u,autoFocus:f=!1},fieldValueManager:h,applyCharacterEditing:m,resetCharacterQuery:g,setSelectedSections:b,parsedSelectedSections:y,state:S,clearActiveSection:C,clearValue:E,updateSectionValue:T,updateValueFromValueStr:w,sectionOrder:M,areAllSectionsEmpty:R,sectionsValueBoundaries:_}=t,I=P.useRef(null),N=kt(r,I),O=fi(),A=Ut(),L=_o(),[z,V]=P.useState(!1),$=P.useMemo(()=>({syncSelectionToDOM:()=>{if(!I.current)return;const se=document.getSelection();if(!se)return;if(y==null){se.rangeCount>0&&I.current.getRoot().contains(se.getRangeAt(0).startContainer)&&se.removeAllRanges(),z&&I.current.getRoot().blur();return}if(!I.current.getRoot().contains(Cr(document)))return;const le=new window.Range;let ge;y==="all"?ge=I.current.getRoot():S.sections[y].type==="empty"?ge=I.current.getSectionContainer(y):ge=I.current.getSectionContent(y),le.selectNodeContents(ge),ge.focus(),se.removeAllRanges(),se.addRange(le)},getActiveSectionIndexFromDOM:()=>{const se=Cr(document);return!se||!I.current||!I.current.getRoot().contains(se)?null:I.current.getSectionIndexFromDOMElement(se)},focusField:(se=0)=>{if(!I.current)return;const le=Nv(se,S.sections);V(!0),I.current.getSectionContent(le).focus()},setSelectedSections:se=>{if(!I.current)return;const le=Nv(se,S.sections);V((le==="all"?0:le)!==null),b(se)},isFieldFocused:()=>{const se=Cr(document);return!!I.current&&I.current.getRoot().contains(se)}}),[y,b,S.sections,z]),F=je(se=>{if(!I.current)return;const le=S.sections[se];I.current.getSectionContent(se).innerHTML=le.value||le.placeholder,$.syncSelectionToDOM()}),W=je((se,...le)=>{se.isDefaultPrevented()||!I.current||(V(!0),i==null||i(se,...le),y==="all"?setTimeout(()=>{const ge=document.getSelection().getRangeAt(0).startOffset;if(ge===0){b(M.startIndex);return}let we=0,xe=0;for(;xe<ge&&we<S.sections.length;){const Me=S.sections[we];we+=1,xe+=`${Me.startSeparator}${Me.value||Me.placeholder}${Me.endSeparator}`.length}b(we-1)}):z?I.current.getRoot().contains(se.target)||b(M.startIndex):(V(!0),b(M.startIndex)))}),U=je(se=>{if(a==null||a(se),!I.current||y!=="all")return;const ge=se.target.textContent??"";I.current.getRoot().innerHTML=S.sections.map(we=>`${we.startSeparator}${we.value||we.placeholder}${we.endSeparator}`).join(""),$.syncSelectionToDOM(),ge.length===0||ge.charCodeAt(0)===10?(g(),E(),b("all")):ge.length>1?w(ge):m({keyPressed:ge,sectionIndex:0})}),G=je(se=>{if(l==null||l(se),n||y!=="all"){se.preventDefault();return}const le=se.clipboardData.getData("text");se.preventDefault(),g(),w(le)}),Y=je((...se)=>{if(s==null||s(...se),z||!I.current)return;V(!0),I.current.getSectionIndexFromDOMElement(Cr(document))!=null||b(M.startIndex)}),Z=je((...se)=>{o==null||o(...se),setTimeout(()=>{if(!I.current)return;const le=Cr(document);!I.current.getRoot().contains(le)&&(V(!1),b(null))})}),me=je(se=>le=>{le.isDefaultPrevented()||b(se)}),fe=je(se=>{se.preventDefault()}),pe=je(se=>()=>{b(se)}),re=je(se=>{if(se.preventDefault(),n||e||typeof y!="number")return;const le=S.sections[y],ge=se.clipboardData.getData("text"),we=/^[a-zA-Z]+$/.test(ge),xe=/^[0-9]+$/.test(ge),Me=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(ge);le.contentType==="letter"&&we||le.contentType==="digit"&&xe||le.contentType==="digit-with-letter"&&Me?(g(),T({activeSection:le,newSectionValue:ge,shouldGoToNextSection:!0})):!we&&!xe&&(g(),w(ge))}),ue=je(se=>{se.preventDefault(),se.dataTransfer.dropEffect="none"}),ae=je(se=>{if(!I.current)return;const le=se.target,ge=le.textContent??"",we=I.current.getSectionIndexFromDOMElement(le),xe=S.sections[we];if(n||!I.current){F(we);return}if(ge.length===0){if(xe.value===""){F(we);return}const Me=se.nativeEvent.inputType;if(Me==="insertParagraph"||Me==="insertLineBreak"){F(we);return}g(),C();return}m({keyPressed:ge,sectionIndex:we}),F(we)});Rn(()=>{if(!(!z||!I.current)){if(y==="all")I.current.getRoot().focus();else if(typeof y=="number"){const se=I.current.getSectionContent(y);se&&se.focus()}}},[y,z]);const K=P.useMemo(()=>S.sections.reduce((se,le)=>(se[le.type]=_[le.type]({currentDate:null,contentType:le.contentType,format:le.format}),se),{}),[_,S.sections]),Q=y==="all",ie=P.useMemo(()=>S.sections.map((se,le)=>{const ge=!Q&&!e&&!n;return{container:{"data-sectionindex":le,onClick:me(le)},content:{tabIndex:Q||le>0?-1:0,contentEditable:!Q&&!e&&!n,role:"spinbutton",id:`${L}-${se.type}`,"aria-labelledby":`${L}-${se.type}`,"aria-readonly":n,"aria-valuenow":_9(se,A),"aria-valuemin":K[se.type].minimum,"aria-valuemax":K[se.type].maximum,"aria-valuetext":se.value?P9(se,A):O.empty,"aria-label":O[se.type],"aria-disabled":e,spellCheck:ge?!1:void 0,autoCapitalize:ge?"off":void 0,autoCorrect:ge?"off":void 0,[parseInt(P.version,10)>=17?"enterKeyHint":"enterkeyhint"]:ge?"next":void 0,children:se.value||se.placeholder,onInput:ae,onPaste:re,onFocus:pe(le),onDragOver:ue,onMouseUp:fe,inputMode:se.contentType==="letter"?"text":"numeric"},before:{children:se.startSeparator},after:{children:se.endSeparator}}}),[S.sections,pe,re,ue,ae,me,fe,e,n,Q,O,A,K,L]),he=je(se=>{w(se.target.value)}),ee=P.useMemo(()=>R?"":h.getV7HiddenInputValueFromSections(S.sections),[R,S.sections,h]);return P.useEffect(()=>{if(I.current==null)throw new Error(["MUI X: The `sectionListRef` prop has not been initialized by `PickersSectionList`","You probably tried to pass a component to the `textField` slot that contains an `<input />` element instead of a `PickersSectionList`.","","If you want to keep using an `<input />` HTML element for the editing, please remove the `enableAccessibleFieldDOMStructure` prop from your picker or field component:","","<DatePicker slots={{ textField: MyCustomTextField }} />","","Learn more about the field accessible DOM structure on the MUI documentation: https://mui.com/x/react-date-pickers/fields/#fields-to-edit-a-single-element"].join(`
127
+ `));f&&I.current&&I.current.getSectionContent(M.startIndex).focus()},[]),{interactions:$,returnedValue:{autoFocus:f,readOnly:n,focused:u??z,sectionListRef:N,onBlur:Z,onClick:W,onFocus:Y,onInput:U,onPaste:G,enableAccessibleFieldDOMStructure:!0,elements:ie,tabIndex:y===0?-1:0,contentEditable:Q,value:ee,onChange:he,areAllSectionsEmpty:R}}},_a=t=>t.replace(/[\u2066\u2067\u2068\u2069]/g,""),t8=(t,e,n)=>{let r=0,o=n?1:0;const i=[];for(let s=0;s<t.length;s+=1){const a=t[s],l=ax(a,n?"input-rtl":"input-ltr",e),u=`${a.startSeparator}${l}${a.endSeparator}`,f=_a(u).length,h=u.length,m=_a(l),g=o+(m===""?0:l.indexOf(m[0]))+a.startSeparator.length,b=g+m.length;i.push(te({},a,{start:r,end:r+f,startInInput:g,endInInput:b})),r+=f,o+=h}return i},n8=t=>{const e=ao(),n=P.useRef(),r=P.useRef(),{forwardedProps:{onFocus:o,onClick:i,onPaste:s,onBlur:a,inputRef:l,placeholder:u},internalProps:{readOnly:f=!1,disabled:h=!1},parsedSelectedSections:m,activeSectionIndex:g,state:b,fieldValueManager:y,valueManager:S,applyCharacterEditing:C,resetCharacterQuery:E,updateSectionValue:T,updateValueFromValueStr:w,clearActiveSection:M,clearValue:R,setTempAndroidValueStr:_,setSelectedSections:I,getSectionsFromValue:N,areAllSectionsEmpty:O,localizedDigits:A}=t,L=P.useRef(null),z=kt(l,L),V=P.useMemo(()=>t8(b.sections,A,e),[b.sections,A,e]),$=P.useMemo(()=>({syncSelectionToDOM:()=>{if(!L.current)return;if(m==null){L.current.scrollLeft&&(L.current.scrollLeft=0);return}if(L.current!==Cr(document))return;const ae=L.current.scrollTop;if(m==="all")L.current.select();else{const K=V[m],Q=K.type==="empty"?K.startInInput-K.startSeparator.length:K.startInInput,ie=K.type==="empty"?K.endInInput+K.endSeparator.length:K.endInInput;(Q!==L.current.selectionStart||ie!==L.current.selectionEnd)&&L.current===Cr(document)&&L.current.setSelectionRange(Q,ie),clearTimeout(r.current),r.current=setTimeout(()=>{L.current&&L.current===Cr(document)&&L.current.selectionStart===L.current.selectionEnd&&(L.current.selectionStart!==Q||L.current.selectionEnd!==ie)&&$.syncSelectionToDOM()})}L.current.scrollTop=ae},getActiveSectionIndexFromDOM:()=>{const ae=L.current.selectionStart??0,K=L.current.selectionEnd??0;if(ae===0&&K===0)return null;const Q=ae<=V[0].startInInput?1:V.findIndex(ie=>ie.startInInput-ie.startSeparator.length>ae);return Q===-1?V.length-1:Q-1},focusField:(ae=0)=>{var K;(K=L.current)==null||K.focus(),I(ae)},setSelectedSections:ae=>I(ae),isFieldFocused:()=>L.current===Cr(document)}),[L,m,V,I]),F=()=>{const ae=L.current.selectionStart??0;let K;ae<=V[0].startInInput||ae>=V[V.length-1].endInInput?K=1:K=V.findIndex(ie=>ie.startInInput-ie.startSeparator.length>ae);const Q=K===-1?V.length-1:K-1;I(Q)},W=je((...ae)=>{o==null||o(...ae);const K=L.current;clearTimeout(n.current),n.current=setTimeout(()=>{!K||K!==L.current||g==null&&(K.value.length&&Number(K.selectionEnd)-Number(K.selectionStart)===K.value.length?I("all"):F())})}),U=je((ae,...K)=>{ae.isDefaultPrevented()||(i==null||i(ae,...K),F())}),G=je(ae=>{if(s==null||s(ae),ae.preventDefault(),f||h)return;const K=ae.clipboardData.getData("text");if(typeof m=="number"){const Q=b.sections[m],ie=/^[a-zA-Z]+$/.test(K),he=/^[0-9]+$/.test(K),ee=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(K);if(Q.contentType==="letter"&&ie||Q.contentType==="digit"&&he||Q.contentType==="digit-with-letter"&&ee){E(),T({activeSection:Q,newSectionValue:K,shouldGoToNextSection:!0});return}if(ie||he)return}E(),w(K)}),Y=je((...ae)=>{a==null||a(...ae),I(null)}),Z=je(ae=>{if(f)return;const K=ae.target.value;if(K===""){E(),R();return}const Q=ae.nativeEvent.data,ie=Q&&Q.length>1,he=ie?Q:K,ee=_a(he);if(g==null||ie){w(ie?Q:ee);return}let se;if(m==="all"&&ee.length===1)se=ee;else{const le=_a(y.getV6InputValueFromSections(V,A,e));let ge=-1,we=-1;for(let Ve=0;Ve<le.length;Ve+=1)ge===-1&&le[Ve]!==ee[Ve]&&(ge=Ve),we===-1&&le[le.length-Ve-1]!==ee[ee.length-Ve-1]&&(we=Ve);const xe=V[g];if(ge<xe.start||le.length-we-1>xe.end)return;const _e=ee.length-le.length+xe.end-_a(xe.endSeparator||"").length;se=ee.slice(xe.start+_a(xe.startSeparator||"").length,_e)}if(se.length===0){I9()&&_(he),E(),M();return}C({keyPressed:se,sectionIndex:g})}),me=P.useMemo(()=>u!==void 0?u:y.getV6InputValueFromSections(N(S.emptyValue),A,e),[u,y,N,S.emptyValue,A,e]),fe=P.useMemo(()=>b.tempValueStrAndroid??y.getV6InputValueFromSections(b.sections,A,e),[b.sections,y,b.tempValueStrAndroid,A,e]);P.useEffect(()=>(L.current&&L.current===Cr(document)&&I("all"),()=>{clearTimeout(n.current),clearTimeout(r.current)}),[]);const pe=P.useMemo(()=>g==null||b.sections[g].contentType==="letter"?"text":"numeric",[g,b.sections]),ue=!(L.current&&L.current===Cr(document))&&O;return{interactions:$,returnedValue:{readOnly:f,onBlur:Y,onClick:U,onFocus:W,onPaste:G,inputRef:z,enableAccessibleFieldDOMStructure:!1,placeholder:me,inputMode:pe,autoComplete:"off",value:ue?"":fe,onChange:Z}}},r8=t=>{const e=Ut(),{internalProps:n,internalProps:{unstableFieldRef:r,minutesStep:o,enableAccessibleFieldDOMStructure:i=!1,disabled:s=!1,readOnly:a=!1},forwardedProps:{onKeyDown:l,error:u,clearable:f,onClear:h},fieldValueManager:m,valueManager:g,validator:b}=t,y=ao(),S=Y9(t),{state:C,activeSectionIndex:E,parsedSelectedSections:T,setSelectedSections:w,clearValue:M,clearActiveSection:R,updateSectionValue:_,setTempAndroidValueStr:I,sectionsValueBoundaries:N,localizedDigits:O,timezone:A}=S,L=J9({sections:C.sections,updateSectionValue:_,sectionsValueBoundaries:N,localizedDigits:O,setTempAndroidValueStr:I,timezone:A}),{resetCharacterQuery:z}=L,V=g.areValuesEqual(e,C.value,g.emptyValue),$=i?e8:n8,F=P.useMemo(()=>D9(C.sections,y&&!i),[C.sections,y,i]),{returnedValue:W,interactions:U}=$(te({},t,S,L,{areAllSectionsEmpty:V,sectionOrder:F})),G=je(re=>{if(l==null||l(re),!s)switch(!0){case((re.ctrlKey||re.metaKey)&&String.fromCharCode(re.keyCode)==="A"&&!re.shiftKey&&!re.altKey):{re.preventDefault(),w("all");break}case re.key==="ArrowRight":{if(re.preventDefault(),T==null)w(F.startIndex);else if(T==="all")w(F.endIndex);else{const ue=F.neighbors[T].rightIndex;ue!==null&&w(ue)}break}case re.key==="ArrowLeft":{if(re.preventDefault(),T==null)w(F.endIndex);else if(T==="all")w(F.startIndex);else{const ue=F.neighbors[T].leftIndex;ue!==null&&w(ue)}break}case re.key==="Delete":{if(re.preventDefault(),a)break;T==null||T==="all"?M():R(),z();break}case["ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(re.key):{if(re.preventDefault(),a||E==null)break;const ue=C.sections[E],ae=m.getActiveDateManager(e,C,ue),K=E9(e,A,ue,re.key,N,O,ae.date,{minutesStep:o});_({activeSection:ue,newSectionValue:K,shouldGoToNextSection:!1});break}}});Rn(()=>{U.syncSelectionToDOM()});const{hasValidationError:Y}=NI({props:n,validator:b,timezone:A,value:C.value,onError:n.onError}),Z=P.useMemo(()=>u!==void 0?u:Y,[Y,u]);P.useEffect(()=>{!Z&&E==null&&z()},[C.referenceValue,E,Z]),P.useEffect(()=>{C.tempValueStrAndroid!=null&&E!=null&&(z(),R())},[C.sections]),P.useImperativeHandle(r,()=>({getSections:()=>C.sections,getActiveSectionIndex:U.getActiveSectionIndexFromDOM,setSelectedSections:U.setSelectedSections,focusField:U.focusField,isFieldFocused:U.isFieldFocused}));const me=je((re,...ue)=>{re.preventDefault(),h==null||h(re,...ue),M(),U.isFieldFocused()?w(F.startIndex):U.focusField(0)}),fe={onKeyDown:G,onClear:me,error:Z,clearable:!!(f&&!V&&!a&&!s)},pe={disabled:s,readOnly:a};return te({},t.forwardedProps,fe,pe,W)};class yf{constructor(){Dl(this,"mountEffect",()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())});this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}static create(){return new yf}static use(){const e=SA(yf.create).current,[n,r]=P.useState(!1);return e.shouldMount=n,e.setShouldMount=r,P.useEffect(e.mountEffect,[n]),e}mount(){return this.mounted||(this.mounted=i8(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}start(...e){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.start(...e)})}stop(...e){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.stop(...e)})}pulsate(...e){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.pulsate(...e)})}}function o8(){return yf.use()}function i8(){let t,e;const n=new Promise((r,o)=>{t=r,e=o});return n.resolve=t,n.reject=e,n}function LI(t){const{className:e,classes:n,pulsate:r=!1,rippleX:o,rippleY:i,rippleSize:s,in:a,onExited:l,timeout:u}=t,[f,h]=P.useState(!1),m=Pe(e,n.ripple,n.rippleVisible,r&&n.ripplePulsate),g={width:s,height:s,top:-(s/2)+i,left:-(s/2)+o},b=Pe(n.child,f&&n.childLeaving,r&&n.childPulsate);return!a&&!f&&h(!0),P.useEffect(()=>{if(!a&&l!=null){const y=setTimeout(l,u);return()=>{clearTimeout(y)}}},[l,a,u]),v.jsx("span",{className:m,style:g,children:v.jsx("span",{className:b})})}process.env.NODE_ENV!=="production"&&(LI.propTypes={classes:c.object.isRequired,className:c.string,in:c.bool,onExited:c.func,pulsate:c.bool,rippleSize:c.number,rippleX:c.number,rippleY:c.number,timeout:c.number.isRequired});const Fr=He("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Lv=550,s8=80,a8=so.keyframes`
128
+ 0% {
129
+ transform: scale(0);
130
+ opacity: 0.1;
131
+ }
132
+
133
+ 100% {
134
+ transform: scale(1);
135
+ opacity: 0.3;
136
+ }
137
+ `,l8=so.keyframes`
138
+ 0% {
139
+ opacity: 1;
140
+ }
141
+
142
+ 100% {
143
+ opacity: 0;
144
+ }
145
+ `,c8=so.keyframes`
146
+ 0% {
147
+ transform: scale(1);
148
+ }
149
+
150
+ 50% {
151
+ transform: scale(0.92);
152
+ }
153
+
154
+ 100% {
155
+ transform: scale(1);
156
+ }
157
+ `,u8=ye("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),d8=ye(LI,{name:"MuiTouchRipple",slot:"Ripple"})`
158
+ opacity: 0;
159
+ position: absolute;
160
+
161
+ &.${Fr.rippleVisible} {
162
+ opacity: 0.3;
163
+ transform: scale(1);
164
+ animation-name: ${a8};
165
+ animation-duration: ${Lv}ms;
166
+ animation-timing-function: ${({theme:t})=>t.transitions.easing.easeInOut};
167
+ }
168
+
169
+ &.${Fr.ripplePulsate} {
170
+ animation-duration: ${({theme:t})=>t.transitions.duration.shorter}ms;
171
+ }
172
+
173
+ & .${Fr.child} {
174
+ opacity: 1;
175
+ display: block;
176
+ width: 100%;
177
+ height: 100%;
178
+ border-radius: 50%;
179
+ background-color: currentColor;
180
+ }
181
+
182
+ & .${Fr.childLeaving} {
183
+ opacity: 0;
184
+ animation-name: ${l8};
185
+ animation-duration: ${Lv}ms;
186
+ animation-timing-function: ${({theme:t})=>t.transitions.easing.easeInOut};
187
+ }
188
+
189
+ & .${Fr.childPulsate} {
190
+ position: absolute;
191
+ /* @noflip */
192
+ left: 0px;
193
+ top: 0;
194
+ animation-name: ${c8};
195
+ animation-duration: 2500ms;
196
+ animation-timing-function: ${({theme:t})=>t.transitions.easing.easeInOut};
197
+ animation-iteration-count: infinite;
198
+ animation-delay: 200ms;
199
+ }
200
+ `,jI=P.forwardRef(function(e,n){const r=xt({props:e,name:"MuiTouchRipple"}),{center:o=!1,classes:i={},className:s,...a}=r,[l,u]=P.useState([]),f=P.useRef(0),h=P.useRef(null);P.useEffect(()=>{h.current&&(h.current(),h.current=null)},[l]);const m=P.useRef(!1),g=CA(),b=P.useRef(null),y=P.useRef(null),S=P.useCallback(w=>{const{pulsate:M,rippleX:R,rippleY:_,rippleSize:I,cb:N}=w;u(O=>[...O,v.jsx(d8,{classes:{ripple:Pe(i.ripple,Fr.ripple),rippleVisible:Pe(i.rippleVisible,Fr.rippleVisible),ripplePulsate:Pe(i.ripplePulsate,Fr.ripplePulsate),child:Pe(i.child,Fr.child),childLeaving:Pe(i.childLeaving,Fr.childLeaving),childPulsate:Pe(i.childPulsate,Fr.childPulsate)},timeout:Lv,pulsate:M,rippleX:R,rippleY:_,rippleSize:I},f.current)]),f.current+=1,h.current=N},[i]),C=P.useCallback((w={},M={},R=()=>{})=>{const{pulsate:_=!1,center:I=o||M.pulsate,fakeElement:N=!1}=M;if((w==null?void 0:w.type)==="mousedown"&&m.current){m.current=!1;return}(w==null?void 0:w.type)==="touchstart"&&(m.current=!0);const O=N?null:y.current,A=O?O.getBoundingClientRect():{width:0,height:0,left:0,top:0};let L,z,V;if(I||w===void 0||w.clientX===0&&w.clientY===0||!w.clientX&&!w.touches)L=Math.round(A.width/2),z=Math.round(A.height/2);else{const{clientX:$,clientY:F}=w.touches&&w.touches.length>0?w.touches[0]:w;L=Math.round($-A.left),z=Math.round(F-A.top)}if(I)V=Math.sqrt((2*A.width**2+A.height**2)/3),V%2===0&&(V+=1);else{const $=Math.max(Math.abs((O?O.clientWidth:0)-L),L)*2+2,F=Math.max(Math.abs((O?O.clientHeight:0)-z),z)*2+2;V=Math.sqrt($**2+F**2)}w!=null&&w.touches?b.current===null&&(b.current=()=>{S({pulsate:_,rippleX:L,rippleY:z,rippleSize:V,cb:R})},g.start(s8,()=>{b.current&&(b.current(),b.current=null)})):S({pulsate:_,rippleX:L,rippleY:z,rippleSize:V,cb:R})},[o,S,g]),E=P.useCallback(()=>{C({},{pulsate:!0})},[C]),T=P.useCallback((w,M)=>{if(g.clear(),(w==null?void 0:w.type)==="touchend"&&b.current){b.current(),b.current=null,g.start(0,()=>{T(w,M)});return}b.current=null,u(R=>R.length>0?R.slice(1):R),h.current=M},[g]);return P.useImperativeHandle(n,()=>({pulsate:E,start:C,stop:T}),[E,C,T]),v.jsx(u8,{className:Pe(Fr.root,i.root,s),ref:y,...a,children:v.jsx(ru,{component:null,exit:!0,children:l})})});process.env.NODE_ENV!=="production"&&(jI.propTypes={center:c.bool,classes:c.object,className:c.string});function f8(t){return Ke("MuiButtonBase",t)}const p8=He("MuiButtonBase",["root","disabled","focusVisible"]),h8=t=>{const{disabled:e,focusVisible:n,focusVisibleClassName:r,classes:o}=t,s=Ue({root:["root",e&&"disabled",n&&"focusVisible"]},f8,o);return n&&r&&(s.root+=` ${r}`),s},m8=ye("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${p8.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Ja=P.forwardRef(function(e,n){const r=xt({props:e,name:"MuiButtonBase"}),{action:o,centerRipple:i=!1,children:s,className:a,component:l="button",disabled:u=!1,disableRipple:f=!1,disableTouchRipple:h=!1,focusRipple:m=!1,focusVisibleClassName:g,LinkComponent:b="a",onBlur:y,onClick:S,onContextMenu:C,onDragLeave:E,onFocus:T,onFocusVisible:w,onKeyDown:M,onKeyUp:R,onMouseDown:_,onMouseLeave:I,onMouseUp:N,onTouchEnd:O,onTouchMove:A,onTouchStart:L,tabIndex:z=0,TouchRippleProps:V,touchRippleRef:$,type:F,...W}=r,U=P.useRef(null),G=o8(),Y=kt(G.ref,$),[Z,me]=P.useState(!1);u&&Z&&me(!1),P.useImperativeHandle(o,()=>({focusVisible:()=>{me(!0),U.current.focus()}}),[]);const fe=G.shouldMount&&!f&&!u;P.useEffect(()=>{Z&&m&&!f&&G.pulsate()},[f,m,Z,G]);const pe=Ko(G,"start",_,h),re=Ko(G,"stop",C,h),ue=Ko(G,"stop",E,h),ae=Ko(G,"stop",N,h),K=Ko(G,"stop",Ie=>{Z&&Ie.preventDefault(),I&&I(Ie)},h),Q=Ko(G,"start",L,h),ie=Ko(G,"stop",O,h),he=Ko(G,"stop",A,h),ee=Ko(G,"stop",Ie=>{Mw(Ie.target)||me(!1),y&&y(Ie)},!1),se=je(Ie=>{U.current||(U.current=Ie.currentTarget),Mw(Ie.target)&&(me(!0),w&&w(Ie)),T&&T(Ie)}),le=()=>{const Ie=U.current;return l&&l!=="button"&&!(Ie.tagName==="A"&&Ie.href)},ge=je(Ie=>{m&&!Ie.repeat&&Z&&Ie.key===" "&&G.stop(Ie,()=>{G.start(Ie)}),Ie.target===Ie.currentTarget&&le()&&Ie.key===" "&&Ie.preventDefault(),M&&M(Ie),Ie.target===Ie.currentTarget&&le()&&Ie.key==="Enter"&&!u&&(Ie.preventDefault(),S&&S(Ie))}),we=je(Ie=>{m&&Ie.key===" "&&Z&&!Ie.defaultPrevented&&G.stop(Ie,()=>{G.pulsate(Ie)}),R&&R(Ie),S&&Ie.target===Ie.currentTarget&&le()&&Ie.key===" "&&!Ie.defaultPrevented&&S(Ie)});let xe=l;xe==="button"&&(W.href||W.to)&&(xe=b);const Me={};xe==="button"?(Me.type=F===void 0?"button":F,Me.disabled=u):(!W.href&&!W.to&&(Me.role="button"),u&&(Me["aria-disabled"]=u));const _e=kt(n,U),Ve={...r,centerRipple:i,component:l,disabled:u,disableRipple:f,disableTouchRipple:h,focusRipple:m,tabIndex:z,focusVisible:Z},Ye=h8(Ve);return v.jsxs(m8,{as:xe,className:Pe(Ye.root,a),ownerState:Ve,onBlur:ee,onClick:S,onContextMenu:re,onFocus:se,onKeyDown:ge,onKeyUp:we,onMouseDown:pe,onMouseLeave:K,onMouseUp:ae,onDragLeave:ue,onTouchEnd:ie,onTouchMove:he,onTouchStart:Q,ref:_e,tabIndex:u?-1:z,type:F,...Me,...W,children:[s,fe?v.jsx(jI,{ref:Y,center:i,...V}):null]})});function Ko(t,e,n,r=!1){return je(o=>(n&&n(o),r||t[e](o),!0))}process.env.NODE_ENV!=="production"&&(Ja.propTypes={action:mn,centerRipple:c.bool,children:c.node,classes:c.object,className:c.string,component:fp,disabled:c.bool,disableRipple:c.bool,disableTouchRipple:c.bool,focusRipple:c.bool,focusVisibleClassName:c.string,href:c.any,LinkComponent:c.elementType,onBlur:c.func,onClick:c.func,onContextMenu:c.func,onDragLeave:c.func,onFocus:c.func,onFocusVisible:c.func,onKeyDown:c.func,onKeyUp:c.func,onMouseDown:c.func,onMouseLeave:c.func,onMouseUp:c.func,onTouchEnd:c.func,onTouchMove:c.func,onTouchStart:c.func,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),tabIndex:c.number,TouchRippleProps:c.object,touchRippleRef:c.oneOfType([c.func,c.shape({current:c.shape({pulsate:c.func.isRequired,start:c.func.isRequired,stop:c.func.isRequired})})]),type:c.oneOfType([c.oneOf(["button","reset","submit"]),c.string])});function g8(t){return Ke("MuiCircularProgress",t)}He("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const wi=44,jv=so.keyframes`
201
+ 0% {
202
+ transform: rotate(0deg);
203
+ }
204
+
205
+ 100% {
206
+ transform: rotate(360deg);
207
+ }
208
+ `,$v=so.keyframes`
209
+ 0% {
210
+ stroke-dasharray: 1px, 200px;
211
+ stroke-dashoffset: 0;
212
+ }
213
+
214
+ 50% {
215
+ stroke-dasharray: 100px, 200px;
216
+ stroke-dashoffset: -15px;
217
+ }
218
+
219
+ 100% {
220
+ stroke-dasharray: 1px, 200px;
221
+ stroke-dashoffset: -126px;
222
+ }
223
+ `,y8=typeof jv!="string"?so.css`
224
+ animation: ${jv} 1.4s linear infinite;
225
+ `:null,b8=typeof $v!="string"?so.css`
226
+ animation: ${$v} 1.4s ease-in-out infinite;
227
+ `:null,v8=t=>{const{classes:e,variant:n,color:r,disableShrink:o}=t,i={root:["root",n,`color${Re(r)}`],svg:["svg"],circle:["circle",`circle${Re(n)}`,o&&"circleDisableShrink"]};return Ue(i,g8,e)},x8=ye("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e[`color${Re(n.color)}`]]}})(It(({theme:t})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:t.transitions.create("transform")}},{props:{variant:"indeterminate"},style:y8||{animation:`${jv} 1.4s linear infinite`}},...Object.entries(t.palette).filter(Vn()).map(([e])=>({props:{color:e},style:{color:(t.vars||t).palette[e].main}}))]}))),S8=ye("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(t,e)=>e.svg})({display:"block"}),C8=ye("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.circle,e[`circle${Re(n.variant)}`],n.disableShrink&&e.circleDisableShrink]}})(It(({theme:t})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:t.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:e})=>e.variant==="indeterminate"&&!e.disableShrink,style:b8||{animation:`${$v} 1.4s ease-in-out infinite`}}]}))),ux=P.forwardRef(function(e,n){const r=xt({props:e,name:"MuiCircularProgress"}),{className:o,color:i="primary",disableShrink:s=!1,size:a=40,style:l,thickness:u=3.6,value:f=0,variant:h="indeterminate",...m}=r,g={...r,color:i,disableShrink:s,size:a,thickness:u,value:f,variant:h},b=v8(g),y={},S={},C={};if(h==="determinate"){const E=2*Math.PI*((wi-u)/2);y.strokeDasharray=E.toFixed(3),C["aria-valuenow"]=Math.round(f),y.strokeDashoffset=`${((100-f)/100*E).toFixed(3)}px`,S.transform="rotate(-90deg)"}return v.jsx(x8,{className:Pe(b.root,o),style:{width:a,height:a,...S,...l},ownerState:g,ref:n,role:"progressbar",...C,...m,children:v.jsx(S8,{className:b.svg,ownerState:g,viewBox:`${wi/2} ${wi/2} ${wi} ${wi}`,children:v.jsx(C8,{className:b.circle,style:y,ownerState:g,cx:wi,cy:wi,r:(wi-u)/2,fill:"none",strokeWidth:u})})})});process.env.NODE_ENV!=="production"&&(ux.propTypes={classes:c.object,className:c.string,color:c.oneOfType([c.oneOf(["inherit","primary","secondary","error","info","success","warning"]),c.string]),disableShrink:ui(c.bool,t=>t.disableShrink&&t.variant&&t.variant!=="indeterminate"?new Error("MUI: You have provided the `disableShrink` prop with a variant other than `indeterminate`. This will have no effect."):null),size:c.oneOfType([c.number,c.string]),style:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),thickness:c.number,value:c.number,variant:c.oneOf(["determinate","indeterminate"])});function w8(t){return Ke("MuiIconButton",t)}const UT=He("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),T8=t=>{const{classes:e,disabled:n,color:r,edge:o,size:i,loading:s}=t,a={root:["root",s&&"loading",n&&"disabled",r!=="default"&&`color${Re(r)}`,o&&`edge${Re(o)}`,`size${Re(i)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return Ue(a,w8,e)},E8=ye(Ja,{name:"MuiIconButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.loading&&e.loading,n.color!=="default"&&e[`color${Re(n.color)}`],n.edge&&e[`edge${Re(n.edge)}`],e[`size${Re(n.size)}`]]}})(It(({theme:t})=>({textAlign:"center",flex:"0 0 auto",fontSize:t.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(t.vars||t).palette.action.active,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),variants:[{props:e=>!e.disableRipple,style:{"--IconButton-hoverBg":t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:$t(t.palette.action.active,t.palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]})),It(({theme:t})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(t.palette).filter(Vn()).map(([e])=>({props:{color:e},style:{color:(t.vars||t).palette[e].main}})),...Object.entries(t.palette).filter(Vn()).map(([e])=>({props:{color:e},style:{"--IconButton-hoverBg":t.vars?`rgba(${(t.vars||t).palette[e].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:$t((t.vars||t).palette[e].main,t.palette.action.hoverOpacity)}})),{props:{size:"small"},style:{padding:5,fontSize:t.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:t.typography.pxToRem(28)}}],[`&.${UT.disabled}`]:{backgroundColor:"transparent",color:(t.vars||t).palette.action.disabled},[`&.${UT.loading}`]:{color:"transparent"}}))),k8=ye("span",{name:"MuiIconButton",slot:"LoadingIndicator",overridesResolver:(t,e)=>e.loadingIndicator})(({theme:t})=>({display:"none",position:"absolute",visibility:"visible",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:(t.vars||t).palette.action.disabled,variants:[{props:{loading:!0},style:{display:"flex"}}]})),dl=P.forwardRef(function(e,n){const r=xt({props:e,name:"MuiIconButton"}),{edge:o=!1,children:i,className:s,color:a="default",disabled:l=!1,disableFocusRipple:u=!1,size:f="medium",id:h,loading:m=null,loadingIndicator:g,...b}=r,y=_o(h),S=g??v.jsx(ux,{"aria-labelledby":y,color:"inherit",size:16}),C={...r,edge:o,color:a,disabled:l,disableFocusRipple:u,loading:m,loadingIndicator:S,size:f},E=T8(C);return v.jsxs(E8,{id:m?y:h,className:Pe(E.root,s),centerRipple:!0,focusRipple:!u,disabled:l||m,ref:n,...b,ownerState:C,children:[typeof m=="boolean"&&v.jsx("span",{className:E.loadingWrapper,style:{display:"contents"},children:v.jsx(k8,{className:E.loadingIndicator,ownerState:C,children:m&&S})}),i]})});process.env.NODE_ENV!=="production"&&(dl.propTypes={children:ui(c.node,t=>P.Children.toArray(t.children).some(n=>P.isValidElement(n)&&n.props.onClick)?new Error(["MUI: You are providing an onClick event listener to a child of a button element.","Prefer applying it to the IconButton directly.","This guarantees that the whole <button> will be responsive to click events."].join(`
228
+ `)):null),classes:c.object,className:c.string,color:c.oneOfType([c.oneOf(["inherit","default","primary","secondary","error","info","success","warning"]),c.string]),disabled:c.bool,disableFocusRipple:c.bool,disableRipple:c.bool,edge:c.oneOf(["end","start",!1]),id:c.string,loading:c.bool,loadingIndicator:c.node,size:c.oneOfType([c.oneOf(["small","medium","large"]),c.string]),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object])});function M8(t){return Ke("MuiTypography",t)}He("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const O8={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},R8=vH(),A8=t=>{const{align:e,gutterBottom:n,noWrap:r,paragraph:o,variant:i,classes:s}=t,a={root:["root",i,t.align!=="inherit"&&`align${Re(e)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]};return Ue(a,M8,s)},I8=ye("span",{name:"MuiTypography",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.variant&&e[n.variant],n.align!=="inherit"&&e[`align${Re(n.align)}`],n.noWrap&&e.noWrap,n.gutterBottom&&e.gutterBottom,n.paragraph&&e.paragraph]}})(It(({theme:t})=>{var e;return{margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(t.typography).filter(([n,r])=>n!=="inherit"&&r&&typeof r=="object").map(([n,r])=>({props:{variant:n},style:r})),...Object.entries(t.palette).filter(Vn()).map(([n])=>({props:{color:n},style:{color:(t.vars||t).palette[n].main}})),...Object.entries(((e=t.palette)==null?void 0:e.text)||{}).filter(([,n])=>typeof n=="string").map(([n])=>({props:{color:`text${Re(n)}`},style:{color:(t.vars||t).palette.text[n]}})),{props:({ownerState:n})=>n.align!=="inherit",style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:n})=>n.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:n})=>n.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:n})=>n.paragraph,style:{marginBottom:16}}]}})),KT={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Qi=P.forwardRef(function(e,n){const{color:r,...o}=xt({props:e,name:"MuiTypography"}),i=!O8[r],s=R8({...o,...i&&{color:r}}),{align:a="inherit",className:l,component:u,gutterBottom:f=!1,noWrap:h=!1,paragraph:m=!1,variant:g="body1",variantMapping:b=KT,...y}=s,S={...s,align:a,color:r,className:l,component:u,gutterBottom:f,noWrap:h,paragraph:m,variant:g,variantMapping:b},C=u||(m?"p":b[g]||KT[g])||"span",E=A8(S);return v.jsx(I8,{as:C,ref:n,className:Pe(E.root,l),...y,ownerState:S,style:{...a!=="inherit"&&{"--Typography-textAlign":a},...y.style}})});process.env.NODE_ENV!=="production"&&(Qi.propTypes={align:c.oneOf(["center","inherit","justify","left","right"]),children:c.node,classes:c.object,className:c.string,color:c.oneOfType([c.oneOf(["primary","secondary","success","error","info","warning","textPrimary","textSecondary","textDisabled"]),c.string]),component:c.elementType,gutterBottom:c.bool,noWrap:c.bool,paragraph:c.bool,style:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),variant:c.oneOfType([c.oneOf(["body1","body2","button","caption","h1","h2","h3","h4","h5","h6","inherit","overline","subtitle1","subtitle2"]),c.string]),variantMapping:c.object});function D8(t){return Ke("MuiInputAdornment",t)}const YT=He("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var GT;const P8=(t,e)=>{const{ownerState:n}=t;return[e.root,e[`position${Re(n.position)}`],n.disablePointerEvents===!0&&e.disablePointerEvents,e[n.variant]]},_8=t=>{const{classes:e,disablePointerEvents:n,hiddenLabel:r,position:o,size:i,variant:s}=t,a={root:["root",n&&"disablePointerEvents",o&&`position${Re(o)}`,s,r&&"hiddenLabel",i&&`size${Re(i)}`]};return Ue(a,D8,e)},N8=ye("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:P8})(It(({theme:t})=>({display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(t.vars||t).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${YT.positionStart}&:not(.${YT.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]}))),dx=P.forwardRef(function(e,n){const r=xt({props:e,name:"MuiInputAdornment"}),{children:o,className:i,component:s="div",disablePointerEvents:a=!1,disableTypography:l=!1,position:u,variant:f,...h}=r,m=uo()||{};let g=f;f&&m.variant&&process.env.NODE_ENV!=="production"&&f===m.variant&&console.error("MUI: The `InputAdornment` variant infers the variant prop you do not have to provide one."),g||(g=m.variant);const b={...r,hiddenLabel:m.hiddenLabel,size:m.size,disablePointerEvents:a,position:u,variant:g},y=_8(b);return v.jsx(nu.Provider,{value:null,children:v.jsx(N8,{as:s,ownerState:b,className:Pe(y.root,i),ref:n,...h,children:typeof o=="string"&&!l?v.jsx(Qi,{color:"textSecondary",children:o}):v.jsxs(P.Fragment,{children:[u==="start"?GT||(GT=v.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):null,o]})})})});process.env.NODE_ENV!=="production"&&(dx.propTypes={children:c.node,classes:c.object,className:c.string,component:c.elementType,disablePointerEvents:c.bool,disableTypography:c.bool,position:c.oneOf(["end","start"]).isRequired,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),variant:c.oneOf(["filled","outlined","standard"])});const L8=Fe(v.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),j8=Fe(v.jsx("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"ArrowLeft"),$8=Fe(v.jsx("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"ArrowRight"),F8=Fe(v.jsx("path",{d:"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"}),"Calendar");Fe(v.jsxs(P.Fragment,{children:[v.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),v.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Clock");Fe(v.jsx("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"}),"DateRange");Fe(v.jsxs(P.Fragment,{children:[v.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),v.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Time");const B8=Fe(v.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear"),V8=["clearable","onClear","InputProps","sx","slots","slotProps"],z8=["ownerState"],H8=t=>{const e=fi(),{clearable:n,onClear:r,InputProps:o,sx:i,slots:s,slotProps:a}=t,l=nt(t,V8),u=(s==null?void 0:s.clearButton)??dl,f=Ct({elementType:u,externalSlotProps:a==null?void 0:a.clearButton,ownerState:{},className:"clearButton",additionalProps:{title:e.fieldClearLabel}}),h=nt(f,z8),m=(s==null?void 0:s.clearIcon)??B8,g=Ct({elementType:m,externalSlotProps:a==null?void 0:a.clearIcon,ownerState:{}});return te({},l,{InputProps:te({},o,{endAdornment:v.jsxs(P.Fragment,{children:[n&&v.jsx(dx,{position:"end",sx:{marginRight:o!=null&&o.endAdornment?-1:-1.5},children:v.jsx(u,te({},h,{onClick:r,children:v.jsx(m,te({fontSize:"small"},g))}))}),o==null?void 0:o.endAdornment]})}),sx:[{"& .clearButton":{opacity:1},"@media (pointer: fine)":{"& .clearButton":{opacity:0},"&:hover, &:focus-within":{".clearButton":{opacity:1}}}},...Array.isArray(i)?i:[i]]})},W8=["value","defaultValue","referenceDate","format","formatDensity","onChange","timezone","onError","shouldRespectLeadingZeros","selectedSections","onSelectedSectionsChange","unstableFieldRef","enableAccessibleFieldDOMStructure","disabled","readOnly","dateSeparator"],q8=(t,e)=>P.useMemo(()=>{const n=te({},t),r={},o=i=>{n.hasOwnProperty(i)&&(r[i]=n[i],delete n[i])};return W8.forEach(o),II.forEach(o),{forwardedProps:n,internalProps:r}},[t,e]),U8=P.createContext(null);function $I(t){const{contextValue:e,localeText:n,children:r}=t;return v.jsx(U8.Provider,{value:e,children:v.jsx(W0,{localeText:n,children:r})})}const K8=t=>{const e=Ut(),n=iu();return te({},t,{disablePast:t.disablePast??!1,disableFuture:t.disableFuture??!1,format:t.format??e.formats.keyboardDate,minDate:Ur(e,t.minDate,n.minDate),maxDate:Ur(e,t.maxDate,n.maxDate)})},Y8=t=>{const e=K8(t),{forwardedProps:n,internalProps:r}=q8(e,"date");return r8({forwardedProps:n,internalProps:r,valueManager:Ro,fieldValueManager:L9,validator:ou,valueType:"date"})};function G8(t){return Ke("MuiPickersTextField",t)}He("MuiPickersTextField",["root","focused","disabled","error","required"]);function J8(t){return Ke("MuiPickersInputBase",t)}const Va=He("MuiPickersInputBase",["root","focused","disabled","error","notchedOutline","sectionContent","sectionBefore","sectionAfter","adornedStart","adornedEnd","input"]);function Z8(t){return Ke("MuiPickersSectionList",t)}const Bl=He("MuiPickersSectionList",["root","section","sectionContent"]),X8=["slots","slotProps","elements","sectionListRef"],FI=ye("div",{name:"MuiPickersSectionList",slot:"Root",overridesResolver:(t,e)=>e.root})({direction:"ltr /*! @noflip */",outline:"none"}),BI=ye("span",{name:"MuiPickersSectionList",slot:"Section",overridesResolver:(t,e)=>e.section})({}),VI=ye("span",{name:"MuiPickersSectionList",slot:"SectionSeparator",overridesResolver:(t,e)=>e.sectionSeparator})({whiteSpace:"pre"}),zI=ye("span",{name:"MuiPickersSectionList",slot:"SectionContent",overridesResolver:(t,e)=>e.sectionContent})({outline:"none"}),Q8=t=>{const{classes:e}=t;return Ue({root:["root"],section:["section"],sectionContent:["sectionContent"]},Z8,e)};function HI(t){const{slots:e,slotProps:n,element:r,classes:o}=t,i=(e==null?void 0:e.section)??BI,s=Ct({elementType:i,externalSlotProps:n==null?void 0:n.section,externalForwardedProps:r.container,className:o.section,ownerState:{}}),a=(e==null?void 0:e.sectionContent)??zI,l=Ct({elementType:a,externalSlotProps:n==null?void 0:n.sectionContent,externalForwardedProps:r.content,additionalProps:{suppressContentEditableWarning:!0},className:o.sectionContent,ownerState:{}}),u=(e==null?void 0:e.sectionSeparator)??VI,f=Ct({elementType:u,externalSlotProps:n==null?void 0:n.sectionSeparator,externalForwardedProps:r.before,ownerState:{position:"before"}}),h=Ct({elementType:u,externalSlotProps:n==null?void 0:n.sectionSeparator,externalForwardedProps:r.after,ownerState:{position:"after"}});return v.jsxs(i,te({},s,{children:[v.jsx(u,te({},f)),v.jsx(a,te({},l)),v.jsx(u,te({},h))]}))}process.env.NODE_ENV!=="production"&&(HI.propTypes={classes:c.object.isRequired,element:c.shape({after:c.object.isRequired,before:c.object.isRequired,container:c.object.isRequired,content:c.object.isRequired}).isRequired,slotProps:c.object,slots:c.object});const WI=P.forwardRef(function(e,n){const r=qt({props:e,name:"MuiPickersSectionList"}),{slots:o,slotProps:i,elements:s,sectionListRef:a}=r,l=nt(r,X8),u=Q8(r),f=P.useRef(null),h=kt(n,f),m=y=>{if(!f.current)throw new Error(`MUI X: Cannot call sectionListRef.${y} before the mount of the component.`);return f.current};P.useImperativeHandle(a,()=>({getRoot(){return m("getRoot")},getSectionContainer(y){return m("getSectionContainer").querySelector(`.${Bl.section}[data-sectionindex="${y}"]`)},getSectionContent(y){return m("getSectionContent").querySelector(`.${Bl.section}[data-sectionindex="${y}"] .${Bl.sectionContent}`)},getSectionIndexFromDOMElement(y){const S=m("getSectionIndexFromDOMElement");if(y==null||!S.contains(y))return null;let C=null;return y.classList.contains(Bl.section)?C=y:y.classList.contains(Bl.sectionContent)&&(C=y.parentElement),C==null?null:Number(C.dataset.sectionindex)}}));const g=(o==null?void 0:o.root)??FI,b=Ct({elementType:g,externalSlotProps:i==null?void 0:i.root,externalForwardedProps:l,additionalProps:{ref:h,suppressContentEditableWarning:!0},className:u.root,ownerState:{}});return v.jsx(g,te({},b,{children:b.contentEditable?s.map(({content:y,before:S,after:C})=>`${S.children}${y.children}${C.children}`).join(""):v.jsx(P.Fragment,{children:s.map((y,S)=>v.jsx(HI,{slots:o,slotProps:i,element:y,classes:u},S))})}))});process.env.NODE_ENV!=="production"&&(WI.propTypes={classes:c.object,contentEditable:c.bool.isRequired,elements:c.arrayOf(c.shape({after:c.object.isRequired,before:c.object.isRequired,container:c.object.isRequired,content:c.object.isRequired})).isRequired,sectionListRef:c.oneOfType([c.func,c.shape({current:c.shape({getRoot:c.func.isRequired,getSectionContainer:c.func.isRequired,getSectionContent:c.func.isRequired,getSectionIndexFromDOMElement:c.func.isRequired})})]),slotProps:c.object,slots:c.object});const eU=["elements","areAllSectionsEmpty","defaultValue","label","value","onChange","id","autoFocus","endAdornment","startAdornment","renderSuffix","slots","slotProps","contentEditable","tabIndex","onInput","onPaste","onKeyDown","fullWidth","name","readOnly","inputProps","inputRef","sectionListRef"],tU=t=>Math.round(t*1e5)/1e5,Lp=ye("div",{name:"MuiPickersInputBase",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t})=>te({},t.typography.body1,{color:(t.vars||t).palette.text.primary,cursor:"text",padding:0,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",boxSizing:"border-box",letterSpacing:`${tU(.15/16)}em`,variants:[{props:{fullWidth:!0},style:{width:"100%"}}]})),fx=ye(FI,{name:"MuiPickersInputBase",slot:"SectionsContainer",overridesResolver:(t,e)=>e.sectionsContainer})(({theme:t})=>({padding:"4px 0 5px",fontFamily:t.typography.fontFamily,fontSize:"inherit",lineHeight:"1.4375em",flexGrow:1,outline:"none",display:"flex",flexWrap:"nowrap",overflow:"hidden",letterSpacing:"inherit",width:"182px",variants:[{props:{isRtl:!0},style:{textAlign:"right /*! @noflip */"}},{props:{size:"small"},style:{paddingTop:1}},{props:{adornedStart:!1,focused:!1,filled:!1},style:{color:"currentColor",opacity:0}},{props:({adornedStart:e,focused:n,filled:r,label:o})=>!e&&!n&&!r&&o==null,style:t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:t.palette.mode==="light"?.42:.5}}]})),nU=ye(BI,{name:"MuiPickersInputBase",slot:"Section",overridesResolver:(t,e)=>e.section})(({theme:t})=>({fontFamily:t.typography.fontFamily,fontSize:"inherit",letterSpacing:"inherit",lineHeight:"1.4375em",display:"flex"})),rU=ye(zI,{name:"MuiPickersInputBase",slot:"SectionContent",overridesResolver:(t,e)=>e.content})(({theme:t})=>({fontFamily:t.typography.fontFamily,lineHeight:"1.4375em",letterSpacing:"inherit",width:"fit-content",outline:"none"})),oU=ye(VI,{name:"MuiPickersInputBase",slot:"Separator",overridesResolver:(t,e)=>e.separator})(()=>({whiteSpace:"pre",letterSpacing:"inherit"})),iU=ye("input",{name:"MuiPickersInputBase",slot:"Input",overridesResolver:(t,e)=>e.hiddenInput})(te({},ZV)),sU=t=>{const{focused:e,disabled:n,error:r,classes:o,fullWidth:i,readOnly:s,color:a,size:l,endAdornment:u,startAdornment:f}=t,h={root:["root",e&&!n&&"focused",n&&"disabled",s&&"readOnly",r&&"error",i&&"fullWidth",`color${Re(a)}`,l==="small"&&"inputSizeSmall",!!f&&"adornedStart",!!u&&"adornedEnd"],notchedOutline:["notchedOutline"],input:["input"],sectionsContainer:["sectionsContainer"],sectionContent:["sectionContent"],sectionBefore:["sectionBefore"],sectionAfter:["sectionAfter"]};return Ue(h,J8,o)},jp=P.forwardRef(function(e,n){const r=qt({props:e,name:"MuiPickersInputBase"}),{elements:o,areAllSectionsEmpty:i,value:s,onChange:a,id:l,endAdornment:u,startAdornment:f,renderSuffix:h,slots:m,slotProps:g,contentEditable:b,tabIndex:y,onInput:S,onPaste:C,onKeyDown:E,name:T,readOnly:w,inputProps:M,inputRef:R,sectionListRef:_}=r,I=nt(r,eU),N=P.useRef(null),O=kt(n,N),A=kt(M==null?void 0:M.ref,R),L=ao(),z=uo();if(!z)throw new Error("MUI X: PickersInputBase should always be used inside a PickersTextField component");const V=Y=>{var Z;if(z.disabled){Y.stopPropagation();return}(Z=z.onFocus)==null||Z.call(z,Y)};P.useEffect(()=>{z&&z.setAdornedStart(!!f)},[z,f]),P.useEffect(()=>{z&&(i?z.onEmpty():z.onFilled())},[z,i]);const $=te({},r,z,{isRtl:L}),F=sU($),W=(m==null?void 0:m.root)||Lp,U=Ct({elementType:W,externalSlotProps:g==null?void 0:g.root,externalForwardedProps:I,additionalProps:{"aria-invalid":z.error,ref:O},className:F.root,ownerState:$}),G=(m==null?void 0:m.input)||fx;return v.jsxs(W,te({},U,{children:[f,v.jsx(WI,{sectionListRef:_,elements:o,contentEditable:b,tabIndex:y,className:F.sectionsContainer,onFocus:V,onBlur:z.onBlur,onInput:S,onPaste:C,onKeyDown:E,slots:{root:G,section:nU,sectionContent:rU,sectionSeparator:oU},slotProps:{root:{ownerState:$},sectionContent:{className:Va.sectionContent},sectionSeparator:({position:Y})=>({className:Y==="before"?Va.sectionBefore:Va.sectionAfter})}}),u,h?h(te({},z)):null,v.jsx(iU,te({name:T,className:F.input,value:s,onChange:a,id:l,"aria-hidden":"true",tabIndex:-1,readOnly:w,required:z.required,disabled:z.disabled},M,{ref:A}))]}))});process.env.NODE_ENV!=="production"&&(jp.propTypes={areAllSectionsEmpty:c.bool.isRequired,className:c.string,component:c.elementType,contentEditable:c.bool.isRequired,elements:c.arrayOf(c.shape({after:c.object.isRequired,before:c.object.isRequired,container:c.object.isRequired,content:c.object.isRequired})).isRequired,endAdornment:c.node,fullWidth:c.bool,id:c.string,inputProps:c.object,inputRef:mn,label:c.node,margin:c.oneOf(["dense","none","normal"]),name:c.string,onChange:c.func.isRequired,onClick:c.func.isRequired,onInput:c.func.isRequired,onKeyDown:c.func.isRequired,onPaste:c.func.isRequired,ownerState:c.any,readOnly:c.bool,renderSuffix:c.func,sectionListRef:c.oneOfType([c.func,c.shape({current:c.shape({getRoot:c.func.isRequired,getSectionContainer:c.func.isRequired,getSectionContent:c.func.isRequired,getSectionIndexFromDOMElement:c.func.isRequired})})]),slotProps:c.object,slots:c.object,startAdornment:c.node,style:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),value:c.string.isRequired});function aU(t){return Ke("MuiPickersOutlinedInput",t)}const to=te({},Va,He("MuiPickersOutlinedInput",["root","notchedOutline","input"])),lU=["children","className","label","notched","shrink"],cU=ye("fieldset",{name:"MuiPickersOutlinedInput",slot:"NotchedOutline",overridesResolver:(t,e)=>e.notchedOutline})(({theme:t})=>{const e=t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%",borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:e}}),JT=ye("span")(({theme:t})=>({fontFamily:t.typography.fontFamily,fontSize:"inherit"})),uU=ye("legend")(({theme:t})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:{withLabel:!1},style:{padding:0,lineHeight:"11px",transition:t.transitions.create("width",{duration:150,easing:t.transitions.easing.easeOut})}},{props:{withLabel:!0},style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:t.transitions.create("max-width",{duration:50,easing:t.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:{withLabel:!0,notched:!0},style:{maxWidth:"100%",transition:t.transitions.create("max-width",{duration:100,easing:t.transitions.easing.easeOut,delay:50})}}]}));function dU(t){const{className:e,label:n}=t,r=nt(t,lU),o=n!=null&&n!=="",i=te({},t,{withLabel:o});return v.jsx(cU,te({"aria-hidden":!0,className:e},r,{ownerState:i,children:v.jsx(uU,{ownerState:i,children:o?v.jsx(JT,{children:n}):v.jsx(JT,{className:"notranslate",children:"​"})})}))}const fU=["label","autoFocus","ownerState","notched"],pU=ye(Lp,{name:"MuiPickersOutlinedInput",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t})=>{const e=t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{padding:"0 14px",borderRadius:(t.vars||t).shape.borderRadius,[`&:hover .${to.notchedOutline}`]:{borderColor:(t.vars||t).palette.text.primary},"@media (hover: none)":{[`&:hover .${to.notchedOutline}`]:{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:e}},[`&.${to.focused} .${to.notchedOutline}`]:{borderStyle:"solid",borderWidth:2},[`&.${to.disabled}`]:{[`& .${to.notchedOutline}`]:{borderColor:(t.vars||t).palette.action.disabled},"*":{color:(t.vars||t).palette.action.disabled}},[`&.${to.error} .${to.notchedOutline}`]:{borderColor:(t.vars||t).palette.error.main},variants:Object.keys((t.vars??t).palette).filter(n=>{var r;return((r=(t.vars??t).palette[n])==null?void 0:r.main)??!1}).map(n=>({props:{color:n},style:{[`&.${to.focused}:not(.${to.error}) .${to.notchedOutline}`]:{borderColor:(t.vars||t).palette[n].main}}}))}}),hU=ye(fx,{name:"MuiPickersOutlinedInput",slot:"SectionsContainer",overridesResolver:(t,e)=>e.sectionsContainer})({padding:"16.5px 0",variants:[{props:{size:"small"},style:{padding:"8.5px 0"}}]}),mU=t=>{const{classes:e}=t,r=Ue({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},aU,e);return te({},e,r)},px=P.forwardRef(function(e,n){const r=qt({props:e,name:"MuiPickersOutlinedInput"}),{label:o,ownerState:i,notched:s}=r,a=nt(r,fU),l=uo(),u=te({},r,i,l,{color:(l==null?void 0:l.color)||"primary"}),f=mU(u);return v.jsx(jp,te({slots:{root:pU,input:hU},renderSuffix:h=>v.jsx(dU,{shrink:!!(s||h.adornedStart||h.focused||h.filled),notched:!!(s||h.adornedStart||h.focused||h.filled),className:f.notchedOutline,label:o!=null&&o!==""&&(l!=null&&l.required)?v.jsxs(P.Fragment,{children:[o," ","*"]}):o,ownerState:u})},a,{label:o,classes:f,ref:n}))});process.env.NODE_ENV!=="production"&&(px.propTypes={areAllSectionsEmpty:c.bool.isRequired,className:c.string,component:c.elementType,contentEditable:c.bool.isRequired,elements:c.arrayOf(c.shape({after:c.object.isRequired,before:c.object.isRequired,container:c.object.isRequired,content:c.object.isRequired})).isRequired,endAdornment:c.node,fullWidth:c.bool,id:c.string,inputProps:c.object,inputRef:mn,label:c.node,margin:c.oneOf(["dense","none","normal"]),name:c.string,notched:c.bool,onChange:c.func.isRequired,onClick:c.func.isRequired,onInput:c.func.isRequired,onKeyDown:c.func.isRequired,onPaste:c.func.isRequired,ownerState:c.any,readOnly:c.bool,renderSuffix:c.func,sectionListRef:c.oneOfType([c.func,c.shape({current:c.shape({getRoot:c.func.isRequired,getSectionContainer:c.func.isRequired,getSectionContent:c.func.isRequired,getSectionIndexFromDOMElement:c.func.isRequired})})]),slotProps:c.object,slots:c.object,startAdornment:c.node,style:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),value:c.string.isRequired});px.muiName="Input";function gU(t){return Ke("MuiPickersFilledInput",t)}const hs=te({},Va,He("MuiPickersFilledInput",["root","underline","input"])),yU=["label","autoFocus","disableUnderline","ownerState"],bU=ye(Lp,{name:"MuiPickersFilledInput",slot:"Root",overridesResolver:(t,e)=>e.root,shouldForwardProp:t=>Bd(t)&&t!=="disableUnderline"})(({theme:t})=>{const e=t.palette.mode==="light",n=e?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=e?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",o=e?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",i=e?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(t.vars||t).shape.borderRadius,borderTopRightRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),"&:hover":{backgroundColor:t.vars?t.vars.palette.FilledInput.hoverBg:o,"@media (hover: none)":{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:r}},[`&.${hs.focused}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:r},[`&.${hs.disabled}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.disabledBg:i},variants:[...Object.keys((t.vars??t).palette).filter(s=>(t.vars??t).palette[s].main).map(s=>{var a;return{props:{color:s,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(a=(t.vars||t).palette[s])==null?void 0:a.main}`}}}}),{props:{disableUnderline:!1},style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${hs.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${hs.error}`]:{"&:before, &:after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:`1px solid ${t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`:n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${hs.disabled}, .${hs.error}):before`]:{borderBottom:`1px solid ${(t.vars||t).palette.text.primary}`},[`&.${hs.disabled}:before`]:{borderBottomStyle:"dotted"}}},{props:({startAdornment:s})=>!!s,style:{paddingLeft:12}},{props:({endAdornment:s})=>!!s,style:{paddingRight:12}}]}}),vU=ye(fx,{name:"MuiPickersFilledInput",slot:"sectionsContainer",overridesResolver:(t,e)=>e.sectionsContainer})({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({startAdornment:t})=>!!t,style:{paddingLeft:0}},{props:({endAdornment:t})=>!!t,style:{paddingRight:0}},{props:{hiddenLabel:!0},style:{paddingTop:16,paddingBottom:17}},{props:{hiddenLabel:!0,size:"small"},style:{paddingTop:8,paddingBottom:9}}]}),xU=t=>{const{classes:e,disableUnderline:n}=t,o=Ue({root:["root",!n&&"underline"],input:["input"]},gU,e);return te({},e,o)},hx=P.forwardRef(function(e,n){const r=qt({props:e,name:"MuiPickersFilledInput"}),{label:o,disableUnderline:i=!1,ownerState:s}=r,a=nt(r,yU),l=uo(),u=te({},r,s,l,{color:(l==null?void 0:l.color)||"primary"}),f=xU(u);return v.jsx(jp,te({slots:{root:bU,input:vU},slotProps:{root:{disableUnderline:i}}},a,{label:o,classes:f,ref:n}))});process.env.NODE_ENV!=="production"&&(hx.propTypes={areAllSectionsEmpty:c.bool.isRequired,className:c.string,component:c.elementType,contentEditable:c.bool.isRequired,disableUnderline:c.bool,elements:c.arrayOf(c.shape({after:c.object.isRequired,before:c.object.isRequired,container:c.object.isRequired,content:c.object.isRequired})).isRequired,endAdornment:c.node,fullWidth:c.bool,hiddenLabel:c.bool,id:c.string,inputProps:c.object,inputRef:mn,label:c.node,margin:c.oneOf(["dense","none","normal"]),name:c.string,onChange:c.func.isRequired,onClick:c.func.isRequired,onInput:c.func.isRequired,onKeyDown:c.func.isRequired,onPaste:c.func.isRequired,ownerState:c.any,readOnly:c.bool,renderSuffix:c.func,sectionListRef:c.oneOfType([c.func,c.shape({current:c.shape({getRoot:c.func.isRequired,getSectionContainer:c.func.isRequired,getSectionContent:c.func.isRequired,getSectionIndexFromDOMElement:c.func.isRequired})})]),slotProps:c.object,slots:c.object,startAdornment:c.node,style:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),value:c.string.isRequired});hx.muiName="Input";function SU(t){return Ke("MuiPickersFilledInput",t)}const Vl=te({},Va,He("MuiPickersInput",["root","input"])),CU=["label","autoFocus","disableUnderline","ownerState"],wU=ye(Lp,{name:"MuiPickersInput",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t})=>{let n=t.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return t.vars&&(n=`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`),{"label + &":{marginTop:16},variants:[...Object.keys((t.vars??t).palette).filter(r=>(t.vars??t).palette[r].main).map(r=>({props:{color:r},style:{"&::after":{borderBottom:`2px solid ${(t.vars||t).palette[r].main}`}}})),{props:{disableUnderline:!1},style:{"&::after":{background:"red",left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Vl.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Vl.error}`]:{"&:before, &:after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Vl.disabled}, .${Vl.error}):before`]:{borderBottom:`2px solid ${(t.vars||t).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${Vl.disabled}:before`]:{borderBottomStyle:"dotted"}}}]}}),TU=t=>{const{classes:e,disableUnderline:n}=t,o=Ue({root:["root",!n&&"underline"],input:["input"]},SU,e);return te({},e,o)},mx=P.forwardRef(function(e,n){const r=qt({props:e,name:"MuiPickersInput"}),{label:o,disableUnderline:i=!1,ownerState:s}=r,a=nt(r,CU),l=uo(),u=te({},r,s,l,{disableUnderline:i,color:(l==null?void 0:l.color)||"primary"}),f=TU(u);return v.jsx(jp,te({slots:{root:wU}},a,{label:o,classes:f,ref:n}))});process.env.NODE_ENV!=="production"&&(mx.propTypes={areAllSectionsEmpty:c.bool.isRequired,className:c.string,component:c.elementType,contentEditable:c.bool.isRequired,disableUnderline:c.bool,elements:c.arrayOf(c.shape({after:c.object.isRequired,before:c.object.isRequired,container:c.object.isRequired,content:c.object.isRequired})).isRequired,endAdornment:c.node,fullWidth:c.bool,id:c.string,inputProps:c.object,inputRef:mn,label:c.node,margin:c.oneOf(["dense","none","normal"]),name:c.string,onChange:c.func.isRequired,onClick:c.func.isRequired,onInput:c.func.isRequired,onKeyDown:c.func.isRequired,onPaste:c.func.isRequired,ownerState:c.any,readOnly:c.bool,renderSuffix:c.func,sectionListRef:c.oneOfType([c.func,c.shape({current:c.shape({getRoot:c.func.isRequired,getSectionContainer:c.func.isRequired,getSectionContent:c.func.isRequired,getSectionIndexFromDOMElement:c.func.isRequired})})]),slotProps:c.object,slots:c.object,startAdornment:c.node,style:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),value:c.string.isRequired});mx.muiName="Input";const EU=["onFocus","onBlur","className","color","disabled","error","variant","required","InputProps","inputProps","inputRef","sectionListRef","elements","areAllSectionsEmpty","onClick","onKeyDown","onKeyUp","onPaste","onInput","endAdornment","startAdornment","tabIndex","contentEditable","focused","value","onChange","fullWidth","id","name","helperText","FormHelperTextProps","label","InputLabelProps"],kU={standard:mx,filled:hx,outlined:px},MU=ye(U0,{name:"MuiPickersTextField",slot:"Root",overridesResolver:(t,e)=>e.root})({}),OU=t=>{const{focused:e,disabled:n,classes:r,required:o}=t;return Ue({root:["root",e&&!n&&"focused",n&&"disabled",o&&"required"]},G8,r)},qI=P.forwardRef(function(e,n){const r=qt({props:e,name:"MuiPickersTextField"}),{onFocus:o,onBlur:i,className:s,color:a="primary",disabled:l=!1,error:u=!1,variant:f="outlined",required:h=!1,InputProps:m,inputProps:g,inputRef:b,sectionListRef:y,elements:S,areAllSectionsEmpty:C,onClick:E,onKeyDown:T,onKeyUp:w,onPaste:M,onInput:R,endAdornment:_,startAdornment:I,tabIndex:N,contentEditable:O,focused:A,value:L,onChange:z,fullWidth:V,id:$,name:F,helperText:W,FormHelperTextProps:U,label:G,InputLabelProps:Y}=r,Z=nt(r,EU),me=P.useRef(null),fe=kt(n,me),pe=_o($),re=W&&pe?`${pe}-helper-text`:void 0,ue=G&&pe?`${pe}-label`:void 0,ae=te({},r,{color:a,disabled:l,error:u,focused:A,required:h,variant:f}),K=OU(ae),Q=kU[f];return v.jsxs(MU,te({className:Pe(K.root,s),ref:fe,focused:A,onFocus:o,onBlur:i,disabled:l,variant:f,error:u,color:a,fullWidth:V,required:h,ownerState:ae},Z,{children:[v.jsx(q0,te({htmlFor:pe,id:ue},Y,{children:G})),v.jsx(Q,te({elements:S,areAllSectionsEmpty:C,onClick:E,onKeyDown:T,onKeyUp:w,onInput:R,onPaste:M,endAdornment:_,startAdornment:I,tabIndex:N,contentEditable:O,value:L,onChange:z,id:pe,fullWidth:V,inputProps:g,inputRef:b,sectionListRef:y,label:G,name:F,role:"group","aria-labelledby":ue},m)),W&&v.jsx(K0,te({id:re},U,{children:W}))]}))});process.env.NODE_ENV!=="production"&&(qI.propTypes={areAllSectionsEmpty:c.bool.isRequired,className:c.string,color:c.oneOf(["error","info","primary","secondary","success","warning"]),component:c.elementType,contentEditable:c.bool.isRequired,disabled:c.bool.isRequired,elements:c.arrayOf(c.shape({after:c.object.isRequired,before:c.object.isRequired,container:c.object.isRequired,content:c.object.isRequired})).isRequired,endAdornment:c.node,error:c.bool.isRequired,focused:c.bool,FormHelperTextProps:c.object,fullWidth:c.bool,helperText:c.node,hiddenLabel:c.bool,id:c.string,InputLabelProps:c.object,inputProps:c.object,InputProps:c.object,inputRef:mn,label:c.node,margin:c.oneOf(["dense","none","normal"]),name:c.string,onBlur:c.func.isRequired,onChange:c.func.isRequired,onClick:c.func.isRequired,onFocus:c.func.isRequired,onInput:c.func.isRequired,onKeyDown:c.func.isRequired,onPaste:c.func.isRequired,readOnly:c.bool,required:c.bool,sectionListRef:c.oneOfType([c.func,c.shape({current:c.shape({getRoot:c.func.isRequired,getSectionContainer:c.func.isRequired,getSectionContent:c.func.isRequired,getSectionIndexFromDOMElement:c.func.isRequired})})]),size:c.oneOf(["medium","small"]),startAdornment:c.node,style:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),value:c.string.isRequired,variant:c.oneOf(["filled","outlined","standard"])});const RU=["enableAccessibleFieldDOMStructure"],AU=["InputProps","readOnly"],IU=["onPaste","onKeyDown","inputMode","readOnly","InputProps","inputProps","inputRef"],DU=t=>{let{enableAccessibleFieldDOMStructure:e}=t,n=nt(t,RU);if(e){const{InputProps:h,readOnly:m}=n,g=nt(n,AU);return te({},g,{InputProps:te({},h??{},{readOnly:m})})}const{onPaste:r,onKeyDown:o,inputMode:i,readOnly:s,InputProps:a,inputProps:l,inputRef:u}=n,f=nt(n,IU);return te({},f,{InputProps:te({},a??{},{readOnly:s}),inputProps:te({},l??{},{inputMode:i,onPaste:r,onKeyDown:o,ref:u})})},PU=["slots","slotProps","InputProps","inputProps"],$p=P.forwardRef(function(e,n){const r=qt({props:e,name:"MuiDateField"}),{slots:o,slotProps:i,InputProps:s,inputProps:a}=r,l=nt(r,PU),u=r,f=(o==null?void 0:o.textField)??(e.enableAccessibleFieldDOMStructure?qI:TI),h=Ct({elementType:f,externalSlotProps:i==null?void 0:i.textField,externalForwardedProps:l,additionalProps:{ref:n},ownerState:u});h.inputProps=te({},a,h.inputProps),h.InputProps=te({},s,h.InputProps);const m=Y8(h),g=DU(m),b=H8(te({},g,{slots:o,slotProps:i}));return v.jsx(f,te({},b))});process.env.NODE_ENV!=="production"&&($p.propTypes={autoFocus:c.bool,className:c.string,clearable:c.bool,color:c.oneOf(["error","info","primary","secondary","success","warning"]),component:c.elementType,defaultValue:c.object,disabled:c.bool,disableFuture:c.bool,disablePast:c.bool,enableAccessibleFieldDOMStructure:c.bool,focused:c.bool,format:c.string,formatDensity:c.oneOf(["dense","spacious"]),FormHelperTextProps:c.object,fullWidth:c.bool,helperText:c.node,hiddenLabel:c.bool,id:c.string,InputLabelProps:c.object,inputProps:c.object,InputProps:c.object,inputRef:mn,label:c.node,margin:c.oneOf(["dense","none","normal"]),maxDate:c.object,minDate:c.object,name:c.string,onBlur:c.func,onChange:c.func,onClear:c.func,onError:c.func,onFocus:c.func,onSelectedSectionsChange:c.func,readOnly:c.bool,referenceDate:c.object,required:c.bool,selectedSections:c.oneOfType([c.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),c.number]),shouldDisableDate:c.func,shouldDisableMonth:c.func,shouldDisableYear:c.func,shouldRespectLeadingZeros:c.bool,size:c.oneOf(["medium","small"]),slotProps:c.object,slots:c.object,style:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),timezone:c.string,unstableFieldRef:c.oneOfType([c.func,c.object]),value:c.object,variant:c.oneOf(["filled","outlined","standard"])});var Jd={exports:{}},_U=Jd.exports,ZT;function NU(){return ZT||(ZT=1,function(t,e){(function(n,r){t.exports=r()})(_U,function(){var n="minute",r=/[+-]\d\d(?::?\d\d)?/g,o=/([+-]|\d\d)/g;return function(i,s,a){var l=s.prototype;a.utc=function(y){var S={date:y,utc:!0,args:arguments};return new s(S)},l.utc=function(y){var S=a(this.toDate(),{locale:this.$L,utc:!0});return y?S.add(this.utcOffset(),n):S},l.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var u=l.parse;l.parse=function(y){y.utc&&(this.$u=!0),this.$utils().u(y.$offset)||(this.$offset=y.$offset),u.call(this,y)};var f=l.init;l.init=function(){if(this.$u){var y=this.$d;this.$y=y.getUTCFullYear(),this.$M=y.getUTCMonth(),this.$D=y.getUTCDate(),this.$W=y.getUTCDay(),this.$H=y.getUTCHours(),this.$m=y.getUTCMinutes(),this.$s=y.getUTCSeconds(),this.$ms=y.getUTCMilliseconds()}else f.call(this)};var h=l.utcOffset;l.utcOffset=function(y,S){var C=this.$utils().u;if(C(y))return this.$u?0:C(this.$offset)?h.call(this):this.$offset;if(typeof y=="string"&&(y=function(M){M===void 0&&(M="");var R=M.match(r);if(!R)return null;var _=(""+R[0]).match(o)||["-",0,0],I=_[0],N=60*+_[1]+ +_[2];return N===0?0:I==="+"?N:-N}(y),y===null))return this;var E=Math.abs(y)<=16?60*y:y,T=this;if(S)return T.$offset=E,T.$u=y===0,T;if(y!==0){var w=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(T=this.local().add(E+w,n)).$offset=E,T.$x.$localOffset=w}else T=this.utc();return T};var m=l.format;l.format=function(y){var S=y||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return m.call(this,S)},l.valueOf=function(){var y=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*y},l.isUTC=function(){return!!this.$u},l.toISOString=function(){return this.toDate().toISOString()},l.toString=function(){return this.toDate().toUTCString()};var g=l.toDate;l.toDate=function(y){return y==="s"&&this.$offset?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():g.call(this)};var b=l.diff;l.diff=function(y,S,C){if(y&&this.$u===y.$u)return b.call(this,y,S,C);var E=this.local(),T=a(y).local();return b.call(E,T,S,C)}}})}(Jd)),Jd.exports}var LU=NU();const jU=rr(LU);pn.extend(jU);const UI=k4({themeId:eu});function $U(t){return Ke("MuiPickersToolbar",t)}He("MuiPickersToolbar",["root","content"]);const FU=["children","className","toolbarTitle","hidden","titleId","isLandscape","classes","landscapeDirection"],BU=t=>{const{classes:e}=t;return Ue({root:["root"],content:["content"]},$U,e)},VU=ye("div",{name:"MuiPickersToolbar",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t})=>({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"space-between",padding:t.spacing(2,3),variants:[{props:{isLandscape:!0},style:{height:"auto",maxWidth:160,padding:16,justifyContent:"flex-start",flexWrap:"wrap"}}]})),zU=ye("div",{name:"MuiPickersToolbar",slot:"Content",overridesResolver:(t,e)=>e.content})({display:"flex",flexWrap:"wrap",width:"100%",flex:1,justifyContent:"space-between",alignItems:"center",flexDirection:"row",variants:[{props:{isLandscape:!0},style:{justifyContent:"flex-start",alignItems:"flex-start",flexDirection:"column"}},{props:{isLandscape:!0,landscapeDirection:"row"},style:{flexDirection:"row"}}]}),HU=P.forwardRef(function(e,n){const r=qt({props:e,name:"MuiPickersToolbar"}),{children:o,className:i,toolbarTitle:s,hidden:a,titleId:l}=r,u=nt(r,FU),f=r,h=BU(f);return a?null:v.jsxs(VU,te({ref:n,className:Pe(h.root,i),ownerState:f},u,{children:[v.jsx(Qi,{color:"text.secondary",variant:"overline",id:l,children:s}),v.jsx(zU,{className:h.content,ownerState:f,children:o})]}))});function WU(t){return Ke("MuiDatePickerToolbar",t)}He("MuiDatePickerToolbar",["root","title"]);const qU=["value","isLandscape","onChange","toolbarFormat","toolbarPlaceholder","views","className","onViewChange","view"],UU=t=>{const{classes:e}=t;return Ue({root:["root"],title:["title"]},WU,e)},KU=ye(HU,{name:"MuiDatePickerToolbar",slot:"Root",overridesResolver:(t,e)=>e.root})({}),YU=ye(Qi,{name:"MuiDatePickerToolbar",slot:"Title",overridesResolver:(t,e)=>e.title})({variants:[{props:{isLandscape:!0},style:{margin:"auto 16px auto auto"}}]}),KI=P.forwardRef(function(e,n){const r=qt({props:e,name:"MuiDatePickerToolbar"}),{value:o,isLandscape:i,toolbarFormat:s,toolbarPlaceholder:a="––",views:l,className:u}=r,f=nt(r,qU),h=Ut(),m=fi(),g=UU(r),b=P.useMemo(()=>{if(!o)return a;const S=ox(h,{format:s,views:l},!0);return h.formatByString(o,S)},[o,s,a,h,l]),y=r;return v.jsx(KU,te({ref:n,toolbarTitle:m.datePickerToolbarTitle,isLandscape:i,className:Pe(g.root,u)},f,{children:v.jsx(YU,{variant:"h4",align:i?"left":"center",ownerState:y,className:g.title,children:b})}))});process.env.NODE_ENV!=="production"&&(KI.propTypes={classes:c.object,className:c.string,disabled:c.bool,hidden:c.bool,isLandscape:c.bool.isRequired,onChange:c.func.isRequired,onViewChange:c.func.isRequired,readOnly:c.bool,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),titleId:c.string,toolbarFormat:c.string,toolbarPlaceholder:c.node,value:c.object,view:c.oneOf(["day","month","year"]).isRequired,views:c.arrayOf(c.oneOf(["day","month","year"]).isRequired).isRequired});function YI(t,e){const n=Ut(),r=iu(),o=qt({props:t,name:e}),i=P.useMemo(()=>{var s;return((s=o.localeText)==null?void 0:s.toolbarTitle)==null?o.localeText:te({},o.localeText,{datePickerToolbarTitle:o.localeText.toolbarTitle})},[o.localeText]);return te({},o,{localeText:i},f9({views:o.views,openTo:o.openTo,defaultViews:["year","day"],defaultOpenTo:"day"}),{disableFuture:o.disableFuture??!1,disablePast:o.disablePast??!1,minDate:Ur(n,o.minDate,r.minDate),maxDate:Ur(n,o.maxDate,r.maxDate),slots:te({toolbar:KI},o.slots)})}var fr="top",Kr="bottom",Yr="right",pr="left",gx="auto",su=[fr,Kr,Yr,pr],Za="start",Ic="end",GU="clippingParents",GI="viewport",zl="popper",JU="reference",XT=su.reduce(function(t,e){return t.concat([e+"-"+Za,e+"-"+Ic])},[]),JI=[].concat(su,[gx]).reduce(function(t,e){return t.concat([e,e+"-"+Za,e+"-"+Ic])},[]),ZU="beforeRead",XU="read",QU="afterRead",e7="beforeMain",t7="main",n7="afterMain",r7="beforeWrite",o7="write",i7="afterWrite",s7=[ZU,XU,QU,e7,t7,n7,r7,o7,i7];function Ao(t){return t?(t.nodeName||"").toLowerCase():null}function Mr(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Bs(t){var e=Mr(t).Element;return t instanceof e||t instanceof Element}function Hr(t){var e=Mr(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function yx(t){if(typeof ShadowRoot>"u")return!1;var e=Mr(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function a7(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var r=e.styles[n]||{},o=e.attributes[n]||{},i=e.elements[n];!Hr(i)||!Ao(i)||(Object.assign(i.style,r),Object.keys(o).forEach(function(s){var a=o[s];a===!1?i.removeAttribute(s):i.setAttribute(s,a===!0?"":a)}))})}function l7(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(r){var o=e.elements[r],i=e.attributes[r]||{},s=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:n[r]),a=s.reduce(function(l,u){return l[u]="",l},{});!Hr(o)||!Ao(o)||(Object.assign(o.style,a),Object.keys(i).forEach(function(l){o.removeAttribute(l)}))})}}const ZI={name:"applyStyles",enabled:!0,phase:"write",fn:a7,effect:l7,requires:["computeStyles"]};function Mo(t){return t.split("-")[0]}var Is=Math.max,bf=Math.min,Xa=Math.round;function Fv(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function XI(){return!/^((?!chrome|android).)*safari/i.test(Fv())}function Qa(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var r=t.getBoundingClientRect(),o=1,i=1;e&&Hr(t)&&(o=t.offsetWidth>0&&Xa(r.width)/t.offsetWidth||1,i=t.offsetHeight>0&&Xa(r.height)/t.offsetHeight||1);var s=Bs(t)?Mr(t):window,a=s.visualViewport,l=!XI()&&n,u=(r.left+(l&&a?a.offsetLeft:0))/o,f=(r.top+(l&&a?a.offsetTop:0))/i,h=r.width/o,m=r.height/i;return{width:h,height:m,top:f,right:u+h,bottom:f+m,left:u,x:u,y:f}}function bx(t){var e=Qa(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function QI(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&yx(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function ci(t){return Mr(t).getComputedStyle(t)}function c7(t){return["table","td","th"].indexOf(Ao(t))>=0}function es(t){return((Bs(t)?t.ownerDocument:t.document)||window.document).documentElement}function Fp(t){return Ao(t)==="html"?t:t.assignedSlot||t.parentNode||(yx(t)?t.host:null)||es(t)}function QT(t){return!Hr(t)||ci(t).position==="fixed"?null:t.offsetParent}function u7(t){var e=/firefox/i.test(Fv()),n=/Trident/i.test(Fv());if(n&&Hr(t)){var r=ci(t);if(r.position==="fixed")return null}var o=Fp(t);for(yx(o)&&(o=o.host);Hr(o)&&["html","body"].indexOf(Ao(o))<0;){var i=ci(o);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||e&&i.willChange==="filter"||e&&i.filter&&i.filter!=="none")return o;o=o.parentNode}return null}function au(t){for(var e=Mr(t),n=QT(t);n&&c7(n)&&ci(n).position==="static";)n=QT(n);return n&&(Ao(n)==="html"||Ao(n)==="body"&&ci(n).position==="static")?e:n||u7(t)||e}function vx(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function cc(t,e,n){return Is(t,bf(e,n))}function d7(t,e,n){var r=cc(t,e,n);return r>n?n:r}function e2(){return{top:0,right:0,bottom:0,left:0}}function t2(t){return Object.assign({},e2(),t)}function n2(t,e){return e.reduce(function(n,r){return n[r]=t,n},{})}var f7=function(e,n){return e=typeof e=="function"?e(Object.assign({},n.rects,{placement:n.placement})):e,t2(typeof e!="number"?e:n2(e,su))};function p7(t){var e,n=t.state,r=t.name,o=t.options,i=n.elements.arrow,s=n.modifiersData.popperOffsets,a=Mo(n.placement),l=vx(a),u=[pr,Yr].indexOf(a)>=0,f=u?"height":"width";if(!(!i||!s)){var h=f7(o.padding,n),m=bx(i),g=l==="y"?fr:pr,b=l==="y"?Kr:Yr,y=n.rects.reference[f]+n.rects.reference[l]-s[l]-n.rects.popper[f],S=s[l]-n.rects.reference[l],C=au(i),E=C?l==="y"?C.clientHeight||0:C.clientWidth||0:0,T=y/2-S/2,w=h[g],M=E-m[f]-h[b],R=E/2-m[f]/2+T,_=cc(w,R,M),I=l;n.modifiersData[r]=(e={},e[I]=_,e.centerOffset=_-R,e)}}function h7(t){var e=t.state,n=t.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=e.elements.popper.querySelector(o),!o)||QI(e.elements.popper,o)&&(e.elements.arrow=o))}const m7={name:"arrow",enabled:!0,phase:"main",fn:p7,effect:h7,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function el(t){return t.split("-")[1]}var g7={top:"auto",right:"auto",bottom:"auto",left:"auto"};function y7(t,e){var n=t.x,r=t.y,o=e.devicePixelRatio||1;return{x:Xa(n*o)/o||0,y:Xa(r*o)/o||0}}function eE(t){var e,n=t.popper,r=t.popperRect,o=t.placement,i=t.variation,s=t.offsets,a=t.position,l=t.gpuAcceleration,u=t.adaptive,f=t.roundOffsets,h=t.isFixed,m=s.x,g=m===void 0?0:m,b=s.y,y=b===void 0?0:b,S=typeof f=="function"?f({x:g,y}):{x:g,y};g=S.x,y=S.y;var C=s.hasOwnProperty("x"),E=s.hasOwnProperty("y"),T=pr,w=fr,M=window;if(u){var R=au(n),_="clientHeight",I="clientWidth";if(R===Mr(n)&&(R=es(n),ci(R).position!=="static"&&a==="absolute"&&(_="scrollHeight",I="scrollWidth")),R=R,o===fr||(o===pr||o===Yr)&&i===Ic){w=Kr;var N=h&&R===M&&M.visualViewport?M.visualViewport.height:R[_];y-=N-r.height,y*=l?1:-1}if(o===pr||(o===fr||o===Kr)&&i===Ic){T=Yr;var O=h&&R===M&&M.visualViewport?M.visualViewport.width:R[I];g-=O-r.width,g*=l?1:-1}}var A=Object.assign({position:a},u&&g7),L=f===!0?y7({x:g,y},Mr(n)):{x:g,y};if(g=L.x,y=L.y,l){var z;return Object.assign({},A,(z={},z[w]=E?"0":"",z[T]=C?"0":"",z.transform=(M.devicePixelRatio||1)<=1?"translate("+g+"px, "+y+"px)":"translate3d("+g+"px, "+y+"px, 0)",z))}return Object.assign({},A,(e={},e[w]=E?y+"px":"",e[T]=C?g+"px":"",e.transform="",e))}function b7(t){var e=t.state,n=t.options,r=n.gpuAcceleration,o=r===void 0?!0:r,i=n.adaptive,s=i===void 0?!0:i,a=n.roundOffsets,l=a===void 0?!0:a,u={placement:Mo(e.placement),variation:el(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:o,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,eE(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,eE(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const v7={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:b7,data:{}};var md={passive:!0};function x7(t){var e=t.state,n=t.instance,r=t.options,o=r.scroll,i=o===void 0?!0:o,s=r.resize,a=s===void 0?!0:s,l=Mr(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return i&&u.forEach(function(f){f.addEventListener("scroll",n.update,md)}),a&&l.addEventListener("resize",n.update,md),function(){i&&u.forEach(function(f){f.removeEventListener("scroll",n.update,md)}),a&&l.removeEventListener("resize",n.update,md)}}const S7={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:x7,data:{}};var C7={left:"right",right:"left",bottom:"top",top:"bottom"};function Zd(t){return t.replace(/left|right|bottom|top/g,function(e){return C7[e]})}var w7={start:"end",end:"start"};function tE(t){return t.replace(/start|end/g,function(e){return w7[e]})}function xx(t){var e=Mr(t),n=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Sx(t){return Qa(es(t)).left+xx(t).scrollLeft}function T7(t,e){var n=Mr(t),r=es(t),o=n.visualViewport,i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;var u=XI();(u||!u&&e==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a+Sx(t),y:l}}function E7(t){var e,n=es(t),r=xx(t),o=(e=t.ownerDocument)==null?void 0:e.body,i=Is(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=Is(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-r.scrollLeft+Sx(t),l=-r.scrollTop;return ci(o||n).direction==="rtl"&&(a+=Is(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:s,x:a,y:l}}function Cx(t){var e=ci(t),n=e.overflow,r=e.overflowX,o=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function r2(t){return["html","body","#document"].indexOf(Ao(t))>=0?t.ownerDocument.body:Hr(t)&&Cx(t)?t:r2(Fp(t))}function uc(t,e){var n;e===void 0&&(e=[]);var r=r2(t),o=r===((n=t.ownerDocument)==null?void 0:n.body),i=Mr(r),s=o?[i].concat(i.visualViewport||[],Cx(r)?r:[]):r,a=e.concat(s);return o?a:a.concat(uc(Fp(s)))}function Bv(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function k7(t,e){var n=Qa(t,!1,e==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function nE(t,e,n){return e===GI?Bv(T7(t,n)):Bs(e)?k7(e,n):Bv(E7(es(t)))}function M7(t){var e=uc(Fp(t)),n=["absolute","fixed"].indexOf(ci(t).position)>=0,r=n&&Hr(t)?au(t):t;return Bs(r)?e.filter(function(o){return Bs(o)&&QI(o,r)&&Ao(o)!=="body"}):[]}function O7(t,e,n,r){var o=e==="clippingParents"?M7(t):[].concat(e),i=[].concat(o,[n]),s=i[0],a=i.reduce(function(l,u){var f=nE(t,u,r);return l.top=Is(f.top,l.top),l.right=bf(f.right,l.right),l.bottom=bf(f.bottom,l.bottom),l.left=Is(f.left,l.left),l},nE(t,s,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function o2(t){var e=t.reference,n=t.element,r=t.placement,o=r?Mo(r):null,i=r?el(r):null,s=e.x+e.width/2-n.width/2,a=e.y+e.height/2-n.height/2,l;switch(o){case fr:l={x:s,y:e.y-n.height};break;case Kr:l={x:s,y:e.y+e.height};break;case Yr:l={x:e.x+e.width,y:a};break;case pr:l={x:e.x-n.width,y:a};break;default:l={x:e.x,y:e.y}}var u=o?vx(o):null;if(u!=null){var f=u==="y"?"height":"width";switch(i){case Za:l[u]=l[u]-(e[f]/2-n[f]/2);break;case Ic:l[u]=l[u]+(e[f]/2-n[f]/2);break}}return l}function Dc(t,e){e===void 0&&(e={});var n=e,r=n.placement,o=r===void 0?t.placement:r,i=n.strategy,s=i===void 0?t.strategy:i,a=n.boundary,l=a===void 0?GU:a,u=n.rootBoundary,f=u===void 0?GI:u,h=n.elementContext,m=h===void 0?zl:h,g=n.altBoundary,b=g===void 0?!1:g,y=n.padding,S=y===void 0?0:y,C=t2(typeof S!="number"?S:n2(S,su)),E=m===zl?JU:zl,T=t.rects.popper,w=t.elements[b?E:m],M=O7(Bs(w)?w:w.contextElement||es(t.elements.popper),l,f,s),R=Qa(t.elements.reference),_=o2({reference:R,element:T,strategy:"absolute",placement:o}),I=Bv(Object.assign({},T,_)),N=m===zl?I:R,O={top:M.top-N.top+C.top,bottom:N.bottom-M.bottom+C.bottom,left:M.left-N.left+C.left,right:N.right-M.right+C.right},A=t.modifiersData.offset;if(m===zl&&A){var L=A[o];Object.keys(O).forEach(function(z){var V=[Yr,Kr].indexOf(z)>=0?1:-1,$=[fr,Kr].indexOf(z)>=0?"y":"x";O[z]+=L[$]*V})}return O}function R7(t,e){e===void 0&&(e={});var n=e,r=n.placement,o=n.boundary,i=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?JI:l,f=el(r),h=f?a?XT:XT.filter(function(b){return el(b)===f}):su,m=h.filter(function(b){return u.indexOf(b)>=0});m.length===0&&(m=h);var g=m.reduce(function(b,y){return b[y]=Dc(t,{placement:y,boundary:o,rootBoundary:i,padding:s})[Mo(y)],b},{});return Object.keys(g).sort(function(b,y){return g[b]-g[y]})}function A7(t){if(Mo(t)===gx)return[];var e=Zd(t);return[tE(t),e,tE(e)]}function I7(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var o=n.mainAxis,i=o===void 0?!0:o,s=n.altAxis,a=s===void 0?!0:s,l=n.fallbackPlacements,u=n.padding,f=n.boundary,h=n.rootBoundary,m=n.altBoundary,g=n.flipVariations,b=g===void 0?!0:g,y=n.allowedAutoPlacements,S=e.options.placement,C=Mo(S),E=C===S,T=l||(E||!b?[Zd(S)]:A7(S)),w=[S].concat(T).reduce(function(pe,re){return pe.concat(Mo(re)===gx?R7(e,{placement:re,boundary:f,rootBoundary:h,padding:u,flipVariations:b,allowedAutoPlacements:y}):re)},[]),M=e.rects.reference,R=e.rects.popper,_=new Map,I=!0,N=w[0],O=0;O<w.length;O++){var A=w[O],L=Mo(A),z=el(A)===Za,V=[fr,Kr].indexOf(L)>=0,$=V?"width":"height",F=Dc(e,{placement:A,boundary:f,rootBoundary:h,altBoundary:m,padding:u}),W=V?z?Yr:pr:z?Kr:fr;M[$]>R[$]&&(W=Zd(W));var U=Zd(W),G=[];if(i&&G.push(F[L]<=0),a&&G.push(F[W]<=0,F[U]<=0),G.every(function(pe){return pe})){N=A,I=!1;break}_.set(A,G)}if(I)for(var Y=b?3:1,Z=function(re){var ue=w.find(function(ae){var K=_.get(ae);if(K)return K.slice(0,re).every(function(Q){return Q})});if(ue)return N=ue,"break"},me=Y;me>0;me--){var fe=Z(me);if(fe==="break")break}e.placement!==N&&(e.modifiersData[r]._skip=!0,e.placement=N,e.reset=!0)}}const D7={name:"flip",enabled:!0,phase:"main",fn:I7,requiresIfExists:["offset"],data:{_skip:!1}};function rE(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function oE(t){return[fr,Yr,Kr,pr].some(function(e){return t[e]>=0})}function P7(t){var e=t.state,n=t.name,r=e.rects.reference,o=e.rects.popper,i=e.modifiersData.preventOverflow,s=Dc(e,{elementContext:"reference"}),a=Dc(e,{altBoundary:!0}),l=rE(s,r),u=rE(a,o,i),f=oE(l),h=oE(u);e.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:f,hasPopperEscaped:h},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":h})}const _7={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:P7};function N7(t,e,n){var r=Mo(t),o=[pr,fr].indexOf(r)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,s=i[0],a=i[1];return s=s||0,a=(a||0)*o,[pr,Yr].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}function L7(t){var e=t.state,n=t.options,r=t.name,o=n.offset,i=o===void 0?[0,0]:o,s=JI.reduce(function(f,h){return f[h]=N7(h,e.rects,i),f},{}),a=s[e.placement],l=a.x,u=a.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=u),e.modifiersData[r]=s}const j7={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:L7};function $7(t){var e=t.state,n=t.name;e.modifiersData[n]=o2({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const F7={name:"popperOffsets",enabled:!0,phase:"read",fn:$7,data:{}};function B7(t){return t==="x"?"y":"x"}function V7(t){var e=t.state,n=t.options,r=t.name,o=n.mainAxis,i=o===void 0?!0:o,s=n.altAxis,a=s===void 0?!1:s,l=n.boundary,u=n.rootBoundary,f=n.altBoundary,h=n.padding,m=n.tether,g=m===void 0?!0:m,b=n.tetherOffset,y=b===void 0?0:b,S=Dc(e,{boundary:l,rootBoundary:u,padding:h,altBoundary:f}),C=Mo(e.placement),E=el(e.placement),T=!E,w=vx(C),M=B7(w),R=e.modifiersData.popperOffsets,_=e.rects.reference,I=e.rects.popper,N=typeof y=="function"?y(Object.assign({},e.rects,{placement:e.placement})):y,O=typeof N=="number"?{mainAxis:N,altAxis:N}:Object.assign({mainAxis:0,altAxis:0},N),A=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,L={x:0,y:0};if(R){if(i){var z,V=w==="y"?fr:pr,$=w==="y"?Kr:Yr,F=w==="y"?"height":"width",W=R[w],U=W+S[V],G=W-S[$],Y=g?-I[F]/2:0,Z=E===Za?_[F]:I[F],me=E===Za?-I[F]:-_[F],fe=e.elements.arrow,pe=g&&fe?bx(fe):{width:0,height:0},re=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:e2(),ue=re[V],ae=re[$],K=cc(0,_[F],pe[F]),Q=T?_[F]/2-Y-K-ue-O.mainAxis:Z-K-ue-O.mainAxis,ie=T?-_[F]/2+Y+K+ae+O.mainAxis:me+K+ae+O.mainAxis,he=e.elements.arrow&&au(e.elements.arrow),ee=he?w==="y"?he.clientTop||0:he.clientLeft||0:0,se=(z=A==null?void 0:A[w])!=null?z:0,le=W+Q-se-ee,ge=W+ie-se,we=cc(g?bf(U,le):U,W,g?Is(G,ge):G);R[w]=we,L[w]=we-W}if(a){var xe,Me=w==="x"?fr:pr,_e=w==="x"?Kr:Yr,Ve=R[M],Ye=M==="y"?"height":"width",Ie=Ve+S[Me],it=Ve-S[_e],vt=[fr,pr].indexOf(C)!==-1,Yt=(xe=A==null?void 0:A[M])!=null?xe:0,yn=vt?Ie:Ve-_[Ye]-I[Ye]-Yt+O.altAxis,tn=vt?Ve+_[Ye]+I[Ye]-Yt-O.altAxis:it,Dt=g&&vt?d7(yn,Ve,tn):cc(g?yn:Ie,Ve,g?tn:it);R[M]=Dt,L[M]=Dt-Ve}e.modifiersData[r]=L}}const z7={name:"preventOverflow",enabled:!0,phase:"main",fn:V7,requiresIfExists:["offset"]};function H7(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function W7(t){return t===Mr(t)||!Hr(t)?xx(t):H7(t)}function q7(t){var e=t.getBoundingClientRect(),n=Xa(e.width)/t.offsetWidth||1,r=Xa(e.height)/t.offsetHeight||1;return n!==1||r!==1}function U7(t,e,n){n===void 0&&(n=!1);var r=Hr(e),o=Hr(e)&&q7(e),i=es(e),s=Qa(t,o,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Ao(e)!=="body"||Cx(i))&&(a=W7(e)),Hr(e)?(l=Qa(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):i&&(l.x=Sx(i))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function K7(t){var e=new Map,n=new Set,r=[];t.forEach(function(i){e.set(i.name,i)});function o(i){n.add(i.name);var s=[].concat(i.requires||[],i.requiresIfExists||[]);s.forEach(function(a){if(!n.has(a)){var l=e.get(a);l&&o(l)}}),r.push(i)}return t.forEach(function(i){n.has(i.name)||o(i)}),r}function Y7(t){var e=K7(t);return s7.reduce(function(n,r){return n.concat(e.filter(function(o){return o.phase===r}))},[])}function G7(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function J7(t){var e=t.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(e).map(function(n){return e[n]})}var iE={placement:"bottom",modifiers:[],strategy:"absolute"};function sE(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function Z7(t){t===void 0&&(t={});var e=t,n=e.defaultModifiers,r=n===void 0?[]:n,o=e.defaultOptions,i=o===void 0?iE:o;return function(a,l,u){u===void 0&&(u=i);var f={placement:"bottom",orderedModifiers:[],options:Object.assign({},iE,i),modifiersData:{},elements:{reference:a,popper:l},attributes:{},styles:{}},h=[],m=!1,g={state:f,setOptions:function(C){var E=typeof C=="function"?C(f.options):C;y(),f.options=Object.assign({},i,f.options,E),f.scrollParents={reference:Bs(a)?uc(a):a.contextElement?uc(a.contextElement):[],popper:uc(l)};var T=Y7(J7([].concat(r,f.options.modifiers)));return f.orderedModifiers=T.filter(function(w){return w.enabled}),b(),g.update()},forceUpdate:function(){if(!m){var C=f.elements,E=C.reference,T=C.popper;if(sE(E,T)){f.rects={reference:U7(E,au(T),f.options.strategy==="fixed"),popper:bx(T)},f.reset=!1,f.placement=f.options.placement,f.orderedModifiers.forEach(function(O){return f.modifiersData[O.name]=Object.assign({},O.data)});for(var w=0;w<f.orderedModifiers.length;w++){if(f.reset===!0){f.reset=!1,w=-1;continue}var M=f.orderedModifiers[w],R=M.fn,_=M.options,I=_===void 0?{}:_,N=M.name;typeof R=="function"&&(f=R({state:f,options:I,name:N,instance:g})||f)}}}},update:G7(function(){return new Promise(function(S){g.forceUpdate(),S(f)})}),destroy:function(){y(),m=!0}};if(!sE(a,l))return g;g.setOptions(u).then(function(S){!m&&u.onFirstUpdate&&u.onFirstUpdate(S)});function b(){f.orderedModifiers.forEach(function(S){var C=S.name,E=S.options,T=E===void 0?{}:E,w=S.effect;if(typeof w=="function"){var M=w({state:f,name:C,instance:g,options:T}),R=function(){};h.push(M||R)}})}function y(){h.forEach(function(S){return S()}),h=[]}return g}}var X7=[S7,F7,v7,ZI,j7,D7,z7,m7,_7],i2=Z7({defaultModifiers:X7});function Q7(t){return Ke("MuiPopper",t)}He("MuiPopper",["root"]);function eK(t,e){if(e==="ltr")return t;switch(t){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return t}}function vf(t){return typeof t=="function"?t():t}function Bp(t){return t.nodeType!==void 0}function tK(t){return!Bp(t)}const nK=t=>{const{classes:e}=t;return Ue({root:["root"]},Q7,e)},rK={},oK=P.forwardRef(function(e,n){const{anchorEl:r,children:o,direction:i,disablePortal:s,modifiers:a,open:l,placement:u,popperOptions:f,popperRef:h,slotProps:m={},slots:g={},TransitionProps:b,ownerState:y,...S}=e,C=P.useRef(null),E=kt(C,n),T=P.useRef(null),w=kt(T,h),M=P.useRef(w);Rn(()=>{M.current=w},[w]),P.useImperativeHandle(h,()=>T.current,[]);const R=eK(u,i),[_,I]=P.useState(R),[N,O]=P.useState(vf(r));P.useEffect(()=>{T.current&&T.current.forceUpdate()}),P.useEffect(()=>{r&&O(vf(r))},[r]),Rn(()=>{if(!N||!l)return;const $=U=>{I(U.placement)};if(process.env.NODE_ENV!=="production"&&N&&Bp(N)&&N.nodeType===1){const U=N.getBoundingClientRect();process.env.NODE_ENV!=="test"&&U.top===0&&U.left===0&&U.right===0&&U.bottom===0&&console.warn(["MUI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
229
+ `))}let F=[{name:"preventOverflow",options:{altBoundary:s}},{name:"flip",options:{altBoundary:s}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:U})=>{$(U)}}];a!=null&&(F=F.concat(a)),f&&f.modifiers!=null&&(F=F.concat(f.modifiers));const W=i2(N,C.current,{placement:R,...f,modifiers:F});return M.current(W),()=>{W.destroy(),M.current(null)}},[N,s,a,l,f,R]);const A={placement:_};b!==null&&(A.TransitionProps=b);const L=nK(e),z=g.root??"div",V=Ct({elementType:z,externalSlotProps:m.root,externalForwardedProps:S,additionalProps:{role:"tooltip",ref:E},ownerState:e,className:L.root});return v.jsx(z,{...V,children:typeof o=="function"?o(A):o})}),s2=P.forwardRef(function(e,n){const{anchorEl:r,children:o,container:i,direction:s="ltr",disablePortal:a=!1,keepMounted:l=!1,modifiers:u,open:f,placement:h="bottom",popperOptions:m=rK,popperRef:g,style:b,transition:y=!1,slotProps:S={},slots:C={},...E}=e,[T,w]=P.useState(!0),M=()=>{w(!1)},R=()=>{w(!0)};if(!l&&!f&&(!y||T))return null;let _;if(i)_=i;else if(r){const O=vf(r);_=O&&Bp(O)?Wn(O).body:Wn(null).body}const I=!f&&l&&(!y||T)?"none":void 0,N=y?{in:f,onEnter:M,onExited:R}:void 0;return v.jsx(Ac,{disablePortal:a,container:_,children:v.jsx(oK,{anchorEl:r,direction:s,disablePortal:a,modifiers:u,ref:n,open:y?!T:f,placement:h,popperOptions:m,popperRef:g,slotProps:S,slots:C,...E,style:{position:"fixed",top:0,left:0,display:I,...b},TransitionProps:N,children:o})})});process.env.NODE_ENV!=="production"&&(s2.propTypes={anchorEl:ui(c.oneOfType([ii,c.object,c.func]),t=>{if(t.open){const e=vf(t.anchorEl);if(e&&Bp(e)&&e.nodeType===1){const n=e.getBoundingClientRect();if(process.env.NODE_ENV!=="test"&&n.top===0&&n.left===0&&n.right===0&&n.bottom===0)return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
230
+ `))}else if(!e||typeof e.getBoundingClientRect!="function"||tK(e)&&e.contextElement!=null&&e.contextElement.nodeType!==1)return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.","It should be an HTML element instance or a virtualElement ","(https://popper.js.org/docs/v2/virtual-elements/)."].join(`
231
+ `))}return null}),children:c.oneOfType([c.node,c.func]),container:c.oneOfType([ii,c.func]),direction:c.oneOf(["ltr","rtl"]),disablePortal:c.bool,keepMounted:c.bool,modifiers:c.arrayOf(c.shape({data:c.object,effect:c.func,enabled:c.bool,fn:c.func,name:c.any,options:c.object,phase:c.oneOf(["afterMain","afterRead","afterWrite","beforeMain","beforeRead","beforeWrite","main","read","write"]),requires:c.arrayOf(c.string),requiresIfExists:c.arrayOf(c.string)})),open:c.bool.isRequired,placement:c.oneOf(["auto-end","auto-start","auto","bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),popperOptions:c.shape({modifiers:c.array,onFirstUpdate:c.func,placement:c.oneOf(["auto-end","auto-start","auto","bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),strategy:c.oneOf(["absolute","fixed"])}),popperRef:mn,slotProps:c.shape({root:c.oneOfType([c.func,c.object])}),slots:c.shape({root:c.elementType}),transition:c.bool});const iK=ye(s2,{name:"MuiPopper",slot:"Root",overridesResolver:(t,e)=>e.root})({}),a2=P.forwardRef(function(e,n){const r=ao(),o=xt({props:e,name:"MuiPopper"}),{anchorEl:i,component:s,components:a,componentsProps:l,container:u,disablePortal:f,keepMounted:h,modifiers:m,open:g,placement:b,popperOptions:y,popperRef:S,transition:C,slots:E,slotProps:T,...w}=o,M=(E==null?void 0:E.root)??(a==null?void 0:a.Root),R={anchorEl:i,container:u,disablePortal:f,keepMounted:h,modifiers:m,open:g,placement:b,popperOptions:y,popperRef:S,transition:C,...w};return v.jsx(iK,{as:s,direction:r?"rtl":"ltr",slots:{root:M},slotProps:T??l,...R,ref:n})});process.env.NODE_ENV!=="production"&&(a2.propTypes={anchorEl:c.oneOfType([ii,c.object,c.func]),children:c.oneOfType([c.node,c.func]),component:c.elementType,components:c.shape({Root:c.elementType}),componentsProps:c.shape({root:c.oneOfType([c.func,c.object])}),container:c.oneOfType([ii,c.func]),disablePortal:c.bool,keepMounted:c.bool,modifiers:c.arrayOf(c.shape({data:c.object,effect:c.func,enabled:c.bool,fn:c.func,name:c.any,options:c.object,phase:c.oneOf(["afterMain","afterRead","afterWrite","beforeMain","beforeRead","beforeWrite","main","read","write"]),requires:c.arrayOf(c.string),requiresIfExists:c.arrayOf(c.string)})),open:c.bool.isRequired,placement:c.oneOf(["auto-end","auto-start","auto","bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),popperOptions:c.shape({modifiers:c.array,onFirstUpdate:c.func,placement:c.oneOf(["auto-end","auto-start","auto","bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),strategy:c.oneOf(["absolute","fixed"])}),popperRef:mn,slotProps:c.shape({root:c.oneOfType([c.func,c.object])}),slots:c.shape({root:c.elementType}),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),transition:c.bool});function sK(t){return Ke("MuiPickersPopper",t)}He("MuiPickersPopper",["root","paper"]);const aK="@media (prefers-reduced-motion: reduce)",za=typeof navigator<"u"&&navigator.userAgent.match(/android\s(\d+)|OS\s(\d+)/i),aE=za&&za[1]?parseInt(za[1],10):null,lE=za&&za[2]?parseInt(za[2],10):null,lK=aE&&aE<10||lE&&lE<13||!1,l2=()=>UI(aK,{defaultMatches:!1})||lK,cK=["PaperComponent","popperPlacement","ownerState","children","paperSlotProps","paperClasses","onPaperClick","onPaperTouchStart"],uK=t=>{const{classes:e}=t;return Ue({root:["root"],paper:["paper"]},sK,e)},dK=ye(a2,{name:"MuiPickersPopper",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t})=>({zIndex:t.zIndex.modal})),fK=ye(ul,{name:"MuiPickersPopper",slot:"Paper",overridesResolver:(t,e)=>e.paper})({outline:0,transformOrigin:"top center",variants:[{props:({placement:t})=>["top","top-start","top-end"].includes(t),style:{transformOrigin:"bottom center"}}]});function pK(t,e){return e.documentElement.clientWidth<t.clientX||e.documentElement.clientHeight<t.clientY}function hK(t,e){const n=P.useRef(!1),r=P.useRef(!1),o=P.useRef(null),i=P.useRef(!1);P.useEffect(()=>{if(!t)return;function l(){i.current=!0}return document.addEventListener("mousedown",l,!0),document.addEventListener("touchstart",l,!0),()=>{document.removeEventListener("mousedown",l,!0),document.removeEventListener("touchstart",l,!0),i.current=!1}},[t]);const s=je(l=>{if(!i.current)return;const u=r.current;r.current=!1;const f=Wn(o.current);if(!o.current||"clientX"in l&&pK(l,f))return;if(n.current){n.current=!1;return}let h;l.composedPath?h=l.composedPath().indexOf(o.current)>-1:h=!f.documentElement.contains(l.target)||o.current.contains(l.target),!h&&!u&&e(l)}),a=()=>{r.current=!0};return P.useEffect(()=>{if(t){const l=Wn(o.current),u=()=>{n.current=!0};return l.addEventListener("touchstart",s),l.addEventListener("touchmove",u),()=>{l.removeEventListener("touchstart",s),l.removeEventListener("touchmove",u)}}},[t,s]),P.useEffect(()=>{if(t){const l=Wn(o.current);return l.addEventListener("click",s),()=>{l.removeEventListener("click",s),r.current=!1}}},[t,s]),[o,a,a]}const mK=P.forwardRef((t,e)=>{const{PaperComponent:n,popperPlacement:r,ownerState:o,children:i,paperSlotProps:s,paperClasses:a,onPaperClick:l,onPaperTouchStart:u}=t,f=nt(t,cK),h=te({},o,{placement:r}),m=Ct({elementType:n,externalSlotProps:s,additionalProps:{tabIndex:-1,elevation:8,ref:e},className:a,ownerState:h});return v.jsx(n,te({},f,m,{onClick:g=>{var b;l(g),(b=m.onClick)==null||b.call(m,g)},onTouchStart:g=>{var b;u(g),(b=m.onTouchStart)==null||b.call(m,g)},ownerState:h,children:i}))});function gK(t){const e=qt({props:t,name:"MuiPickersPopper"}),{anchorEl:n,children:r,containerRef:o=null,shouldRestoreFocus:i,onBlur:s,onDismiss:a,open:l,role:u,placement:f,slots:h,slotProps:m,reduceAnimations:g}=e;P.useEffect(()=>{function $(F){l&&F.key==="Escape"&&a()}return document.addEventListener("keydown",$),()=>{document.removeEventListener("keydown",$)}},[a,l]);const b=P.useRef(null);P.useEffect(()=>{u==="tooltip"||i&&!i()||(l?b.current=Cr(document):b.current&&b.current instanceof HTMLElement&&setTimeout(()=>{b.current instanceof HTMLElement&&b.current.focus()}))},[l,u,i]);const[y,S,C]=hK(l,s??a),E=P.useRef(null),T=kt(E,o),w=kt(T,y),M=e,R=uK(M),_=l2(),I=g??_,N=$=>{$.key==="Escape"&&($.stopPropagation(),a())},O=(h==null?void 0:h.desktopTransition)??I?qi:Oc,A=(h==null?void 0:h.desktopTrapFocus)??Rc,L=(h==null?void 0:h.desktopPaper)??fK,z=(h==null?void 0:h.popper)??dK,V=Ct({elementType:z,externalSlotProps:m==null?void 0:m.popper,additionalProps:{transition:!0,role:u,open:l,anchorEl:n,placement:f,onKeyDown:N},className:R.root,ownerState:e});return v.jsx(z,te({},V,{children:({TransitionProps:$,placement:F})=>v.jsx(A,te({open:l,disableAutoFocus:!0,disableRestoreFocus:!0,disableEnforceFocus:u==="tooltip",isEnabled:()=>!0},m==null?void 0:m.desktopTrapFocus,{children:v.jsx(O,te({},$,m==null?void 0:m.desktopTransition,{children:v.jsx(mK,{PaperComponent:L,ownerState:M,popperPlacement:F,ref:w,onPaperClick:S,onPaperTouchStart:C,paperClasses:R.paper,paperSlotProps:m==null?void 0:m.desktopPaper,children:r})}))}))}))}const yK=({open:t,onOpen:e,onClose:n})=>{const r=P.useRef(typeof t=="boolean").current,[o,i]=P.useState(!1);P.useEffect(()=>{if(r){if(typeof t!="boolean")throw new Error("You must not mix controlling and uncontrolled mode for `open` prop");i(t)}},[r,t]);const s=P.useCallback(a=>{r||i(a),a&&e&&e(),!a&&n&&n()},[r,e,n]);return{isOpen:o,setIsOpen:s}},bK=t=>{const{action:e,hasChanged:n,dateState:r,isControlled:o}=t,i=!o&&!r.hasBeenModifiedSinceMount;return e.name==="setValueFromField"?!0:e.name==="setValueFromAction"?i&&["accept","today","clear"].includes(e.pickerAction)?!0:n(r.lastPublishedValue):e.name==="setValueFromView"&&e.selectionState!=="shallow"||e.name==="setValueFromShortcut"?i?!0:n(r.lastPublishedValue):!1},vK=t=>{const{action:e,hasChanged:n,dateState:r,isControlled:o,closeOnSelect:i}=t,s=!o&&!r.hasBeenModifiedSinceMount;return e.name==="setValueFromAction"?s&&["accept","today","clear"].includes(e.pickerAction)?!0:n(r.lastCommittedValue):e.name==="setValueFromView"&&e.selectionState==="finish"&&i?s?!0:n(r.lastCommittedValue):e.name==="setValueFromShortcut"?e.changeImportance==="accept"&&n(r.lastCommittedValue):!1},xK=t=>{const{action:e,closeOnSelect:n}=t;return e.name==="setValueFromAction"?!0:e.name==="setValueFromView"?e.selectionState==="finish"&&n:e.name==="setValueFromShortcut"?e.changeImportance==="accept":!1},SK=({props:t,valueManager:e,valueType:n,wrapperVariant:r,validator:o})=>{const{onAccept:i,onChange:s,value:a,defaultValue:l,closeOnSelect:u=r==="desktop",timezone:f,referenceDate:h}=t,{current:m}=P.useRef(l),{current:g}=P.useRef(a!==void 0),[b,y]=P.useState(f);process.env.NODE_ENV!=="production"&&(P.useEffect(()=>{g!==(a!==void 0)&&console.error([`MUI X: A component is changing the ${g?"":"un"}controlled value of a picker to be ${g?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).","Decide between using a controlled or uncontrolled valuefor the lifetime of the component.","The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
232
+ `))},[a]),P.useEffect(()=>{!g&&m!==l&&console.error(["MUI X: A component is changing the defaultValue of an uncontrolled picker after being initialized. To suppress this warning opt to use a controlled value."].join(`
233
+ `))},[JSON.stringify(m)]));const S=Ut(),C=Ks(),{isOpen:E,setIsOpen:T}=yK(t),{timezone:w,value:M,handleValueChange:R}=lx({timezone:f,value:a,defaultValue:m,referenceDate:h,onChange:s,valueManager:e}),[_,I]=P.useState(()=>{let Q;return M!==void 0?Q=M:m!==void 0?Q=m:Q=e.emptyValue,{draft:Q,lastPublishedValue:Q,lastCommittedValue:Q,lastControlledValue:a,hasBeenModifiedSinceMount:!1}}),N=e.getTimezone(S,_.draft);b!==f&&(y(f),f&&N&&f!==N&&I(Q=>te({},Q,{draft:e.setTimezone(S,f,Q.draft)})));const{getValidationErrorForNewValue:O}=NI({props:t,validator:o,timezone:w,value:_.draft,onError:t.onError}),A=je(Q=>{const ie={action:Q,dateState:_,hasChanged:we=>!e.areValuesEqual(S,Q.value,we),isControlled:g,closeOnSelect:u},he=bK(ie),ee=vK(ie),se=xK(ie);I(we=>te({},we,{draft:Q.value,lastPublishedValue:he?Q.value:we.lastPublishedValue,lastCommittedValue:ee?Q.value:we.lastCommittedValue,hasBeenModifiedSinceMount:!0}));let le=null;const ge=()=>(le||(le={validationError:Q.name==="setValueFromField"?Q.context.validationError:O(Q.value)},Q.name==="setValueFromShortcut"&&(le.shortcut=Q.shortcut)),le);he&&R(Q.value,ge()),ee&&i&&i(Q.value,ge()),se&&T(!1)});if(_.lastControlledValue!==a){const Q=e.areValuesEqual(S,_.draft,M);I(ie=>te({},ie,{lastControlledValue:a},Q?{}:{lastCommittedValue:M,lastPublishedValue:M,draft:M,hasBeenModifiedSinceMount:!0}))}const L=je(()=>{A({value:e.emptyValue,name:"setValueFromAction",pickerAction:"clear"})}),z=je(()=>{A({value:_.lastPublishedValue,name:"setValueFromAction",pickerAction:"accept"})}),V=je(()=>{A({value:_.lastPublishedValue,name:"setValueFromAction",pickerAction:"dismiss"})}),$=je(()=>{A({value:_.lastCommittedValue,name:"setValueFromAction",pickerAction:"cancel"})}),F=je(()=>{A({value:e.getTodayValue(S,w,n),name:"setValueFromAction",pickerAction:"today"})}),W=je(Q=>{Q.preventDefault(),T(!0)}),U=je(Q=>{Q==null||Q.preventDefault(),T(!1)}),G=je((Q,ie="partial")=>A({name:"setValueFromView",value:Q,selectionState:ie})),Y=je((Q,ie,he)=>A({name:"setValueFromShortcut",value:Q,changeImportance:ie,shortcut:he})),Z=je((Q,ie)=>A({name:"setValueFromField",value:Q,context:ie})),me={onClear:L,onAccept:z,onDismiss:V,onCancel:$,onSetToday:F,onOpen:W,onClose:U},fe={value:_.draft,onChange:Z},pe=P.useMemo(()=>e.cleanValue(S,_.draft),[S,e,_.draft]),re={value:pe,onChange:G,onClose:U,open:E},ae=te({},me,{value:pe,onChange:G,onSelectShortcut:Y,isValid:Q=>{const ie=o({adapter:C,value:Q,timezone:w,props:t});return!e.hasError(ie)}}),K=P.useMemo(()=>({onOpen:W,onClose:U,open:E}),[E,U,W]);return{open:E,fieldProps:fe,viewProps:re,layoutProps:ae,actions:me,contextValue:K}};let rg=!1;function c2({onChange:t,onViewChange:e,openTo:n,view:r,views:o,autoFocus:i,focusedView:s,onFocusedViewChange:a}){process.env.NODE_ENV!=="production"&&(rg||(r!=null&&!o.includes(r)&&(console.warn(`MUI X: \`view="${r}"\` is not a valid prop.`,`It must be an element of \`views=["${o.join('", "')}"]\`.`),rg=!0),r==null&&n!=null&&!o.includes(n)&&(console.warn(`MUI X: \`openTo="${n}"\` is not a valid prop.`,`It must be an element of \`views=["${o.join('", "')}"]\`.`),rg=!0)));const l=P.useRef(n),u=P.useRef(o),f=P.useRef(o.includes(n)?n:o[0]),[h,m]=ai({name:"useViews",state:"view",controlled:r,default:f.current}),g=P.useRef(i?h:null),[b,y]=ai({name:"useViews",state:"focusedView",controlled:s,default:g.current});P.useEffect(()=>{(l.current&&l.current!==n||u.current&&u.current.some(_=>!o.includes(_)))&&(m(o.includes(n)?n:o[0]),u.current=o,l.current=n)},[n,m,h,o]);const S=o.indexOf(h),C=o[S-1]??null,E=o[S+1]??null,T=je((_,I)=>{y(I?_:N=>_===N?null:N),a==null||a(_,I)}),w=je(_=>{T(_,!0),_!==h&&(m(_),e&&e(_))}),M=je(()=>{E&&w(E)}),R=je((_,I,N)=>{const O=I==="finish",A=N?o.indexOf(N)<o.length-1:!!E;if(t(_,O&&A?"partial":I,N),N&&N!==h){const z=o[o.indexOf(N)+1];z&&w(z)}else O&&M()});return{view:h,setView:w,focusedView:b,setFocusedView:T,nextView:E,previousView:C,defaultView:o.includes(n)?n:o[0],goToNextView:M,setValueAndGoToNextView:R}}const CK=["className","sx"],wK=({props:t,propsFromPickerValue:e,additionalViewProps:n,autoFocusView:r,rendererInterceptor:o,fieldRef:i})=>{const{onChange:s,open:a,onClose:l}=e,{view:u,views:f,openTo:h,onViewChange:m,viewRenderers:g,timezone:b}=t,y=nt(t,CK),{view:S,setView:C,defaultView:E,focusedView:T,setFocusedView:w,setValueAndGoToNextView:M}=c2({view:u,views:f,openTo:h,onChange:s,onViewChange:m,autoFocus:r}),{hasUIView:R,viewModeLookup:_}=P.useMemo(()=>f.reduce((V,$)=>{let F;return g[$]!=null?F="UI":F="field",V.viewModeLookup[$]=F,F==="UI"&&(V.hasUIView=!0),V},{hasUIView:!1,viewModeLookup:{}}),[g,f]),I=P.useMemo(()=>f.reduce((V,$)=>g[$]!=null&&b9($)?V+1:V,0),[g,f]),N=_[S],O=je(()=>N==="UI"),[A,L]=P.useState(N==="UI"?S:null);return A!==S&&_[S]==="UI"&&L(S),Rn(()=>{N==="field"&&a&&(l(),setTimeout(()=>{var V,$;(V=i==null?void 0:i.current)==null||V.setSelectedSections(S),($=i==null?void 0:i.current)==null||$.focusField(S)}))},[S]),Rn(()=>{if(!a)return;let V=S;N==="field"&&A!=null&&(V=A),V!==E&&_[V]==="UI"&&_[E]==="UI"&&(V=E),V!==S&&C(V),w(V,!0)},[a]),{hasUIView:R,shouldRestoreFocus:O,layoutProps:{views:f,view:A,onViewChange:C},renderCurrentView:()=>{if(A==null)return null;const V=g[A];if(V==null)return null;const $=te({},y,n,e,{views:f,timezone:b,onChange:M,view:A,onViewChange:C,focusedView:T,onFocusedViewChange:w,showViewSwitcher:I>1,timeViewsCount:I});return o?o(g,A,$):V($)}}};function cE(){return typeof window>"u"?"portrait":window.screen&&window.screen.orientation&&window.screen.orientation.angle?Math.abs(window.screen.orientation.angle)===90?"landscape":"portrait":window.orientation&&Math.abs(Number(window.orientation))===90?"landscape":"portrait"}const TK=(t,e)=>{const[n,r]=P.useState(cE);return Rn(()=>{const i=()=>{r(cE())};return window.addEventListener("orientationchange",i),()=>{window.removeEventListener("orientationchange",i)}},[]),Z9(t,["hours","minutes","seconds"])?!1:(e||n)==="landscape"},EK=({props:t,propsFromPickerValue:e,propsFromPickerViews:n,wrapperVariant:r})=>{const{orientation:o}=t,i=TK(n.views,o),s=ao();return{layoutProps:te({},n,e,{isLandscape:i,isRtl:s,wrapperVariant:r,disabled:t.disabled,readOnly:t.readOnly})}};function kK(t){const{props:e,pickerValueResponse:n}=t;return P.useMemo(()=>({value:n.viewProps.value,open:n.open,disabled:e.disabled??!1,readOnly:e.readOnly??!1}),[n.viewProps.value,n.open,e.disabled,e.readOnly])}const u2=({props:t,valueManager:e,valueType:n,wrapperVariant:r,additionalViewProps:o,validator:i,autoFocusView:s,rendererInterceptor:a,fieldRef:l})=>{process.env.NODE_ENV!=="production"&&t.renderInput!=null&&lI(["MUI X: The `renderInput` prop has been removed in version 6.0 of the Date and Time Pickers.","You can replace it with the `textField` component slot in most cases.","For more information, please have a look at the migration guide (https://mui.com/x/migration/migration-pickers-v5/#input-renderer-required-in-v5)."]);const u=SK({props:t,valueManager:e,valueType:n,wrapperVariant:r,validator:i}),f=wK({props:t,additionalViewProps:o,autoFocusView:s,fieldRef:l,propsFromPickerValue:u.viewProps,rendererInterceptor:a}),h=EK({props:t,wrapperVariant:r,propsFromPickerValue:u.layoutProps,propsFromPickerViews:f.layoutProps}),m=kK({props:t,pickerValueResponse:u});return{open:u.open,actions:u.actions,fieldProps:u.fieldProps,renderCurrentView:f.renderCurrentView,hasUIView:f.hasUIView,shouldRestoreFocus:f.shouldRestoreFocus,layoutProps:h.layoutProps,contextValue:u.contextValue,ownerState:m}};function d2(t){return Ke("MuiPickersLayout",t)}const ms=He("MuiPickersLayout",["root","landscape","contentWrapper","toolbar","actionBar","tabs","shortcuts"]);function MK(t){return Ke("MuiButton",t)}const gs=He("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge","loading","loadingWrapper","loadingIconPlaceholder","loadingIndicator","loadingPositionCenter","loadingPositionStart","loadingPositionEnd"]),f2=P.createContext({});process.env.NODE_ENV!=="production"&&(f2.displayName="ButtonGroupContext");const p2=P.createContext(void 0);process.env.NODE_ENV!=="production"&&(p2.displayName="ButtonGroupButtonContext");const OK=t=>{const{color:e,disableElevation:n,fullWidth:r,size:o,variant:i,loading:s,loadingPosition:a,classes:l}=t,u={root:["root",s&&"loading",i,`${i}${Re(e)}`,`size${Re(o)}`,`${i}Size${Re(o)}`,`color${Re(e)}`,n&&"disableElevation",r&&"fullWidth",s&&`loadingPosition${Re(a)}`],startIcon:["icon","startIcon",`iconSize${Re(o)}`],endIcon:["icon","endIcon",`iconSize${Re(o)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},f=Ue(u,MK,l);return{...l,...f}},h2=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],RK=ye(Ja,{shouldForwardProp:t=>lo(t)||t==="classes",name:"MuiButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e[`${n.variant}${Re(n.color)}`],e[`size${Re(n.size)}`],e[`${n.variant}Size${Re(n.size)}`],n.color==="inherit"&&e.colorInherit,n.disableElevation&&e.disableElevation,n.fullWidth&&e.fullWidth,n.loading&&e.loading]}})(It(({theme:t})=>{const e=t.palette.mode==="light"?t.palette.grey[300]:t.palette.grey[800],n=t.palette.mode==="light"?t.palette.grey.A100:t.palette.grey[700];return{...t.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create(["background-color","box-shadow","border-color","color"],{duration:t.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${gs.disabled}`]:{color:(t.vars||t).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(t.vars||t).shadows[2],"&:hover":{boxShadow:(t.vars||t).shadows[4],"@media (hover: none)":{boxShadow:(t.vars||t).shadows[2]}},"&:active":{boxShadow:(t.vars||t).shadows[8]},[`&.${gs.focusVisible}`]:{boxShadow:(t.vars||t).shadows[6]},[`&.${gs.disabled}`]:{color:(t.vars||t).palette.action.disabled,boxShadow:(t.vars||t).shadows[0],backgroundColor:(t.vars||t).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${gs.disabled}`]:{border:`1px solid ${(t.vars||t).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(t.palette).filter(Vn()).map(([r])=>({props:{color:r},style:{"--variant-textColor":(t.vars||t).palette[r].main,"--variant-outlinedColor":(t.vars||t).palette[r].main,"--variant-outlinedBorder":t.vars?`rgba(${t.vars.palette[r].mainChannel} / 0.5)`:$t(t.palette[r].main,.5),"--variant-containedColor":(t.vars||t).palette[r].contrastText,"--variant-containedBg":(t.vars||t).palette[r].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(t.vars||t).palette[r].dark,"--variant-textBg":t.vars?`rgba(${t.vars.palette[r].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:$t(t.palette[r].main,t.palette.action.hoverOpacity),"--variant-outlinedBorder":(t.vars||t).palette[r].main,"--variant-outlinedBg":t.vars?`rgba(${t.vars.palette[r].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:$t(t.palette[r].main,t.palette.action.hoverOpacity)}}}})),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":t.vars?t.vars.palette.Button.inheritContainedBg:e,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":t.vars?t.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.hoverOpacity})`:$t(t.palette.text.primary,t.palette.action.hoverOpacity),"--variant-outlinedBg":t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.hoverOpacity})`:$t(t.palette.text.primary,t.palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:t.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:t.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:t.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:t.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:t.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:t.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${gs.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${gs.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{loadingPosition:"center"},style:{transition:t.transitions.create(["background-color","box-shadow","border-color"],{duration:t.transitions.duration.short}),[`&.${gs.loading}`]:{color:"transparent"}}}]}})),AK=ye("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.startIcon,n.loading&&e.startIconLoadingStart,e[`iconSize${Re(n.size)}`]]}})(({theme:t})=>({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},{props:{loadingPosition:"start",loading:!0},style:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"start",loading:!0,fullWidth:!0},style:{marginRight:-8}},...h2]})),IK=ye("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.endIcon,n.loading&&e.endIconLoadingEnd,e[`iconSize${Re(n.size)}`]]}})(({theme:t})=>({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},{props:{loadingPosition:"end",loading:!0},style:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"end",loading:!0,fullWidth:!0},style:{marginLeft:-8}},...h2]})),DK=ye("span",{name:"MuiButton",slot:"LoadingIndicator",overridesResolver:(t,e)=>e.loadingIndicator})(({theme:t})=>({display:"none",position:"absolute",visibility:"visible",variants:[{props:{loading:!0},style:{display:"flex"}},{props:{loadingPosition:"start"},style:{left:14}},{props:{loadingPosition:"start",size:"small"},style:{left:10}},{props:{variant:"text",loadingPosition:"start"},style:{left:6}},{props:{loadingPosition:"center"},style:{left:"50%",transform:"translate(-50%)",color:(t.vars||t).palette.action.disabled}},{props:{loadingPosition:"end"},style:{right:14}},{props:{loadingPosition:"end",size:"small"},style:{right:10}},{props:{variant:"text",loadingPosition:"end"},style:{right:6}},{props:{loadingPosition:"start",fullWidth:!0},style:{position:"relative",left:-10}},{props:{loadingPosition:"end",fullWidth:!0},style:{position:"relative",right:-10}}]})),uE=ye("span",{name:"MuiButton",slot:"LoadingIconPlaceholder",overridesResolver:(t,e)=>e.loadingIconPlaceholder})({display:"inline-block",width:"1em",height:"1em"}),Jl=P.forwardRef(function(e,n){const r=P.useContext(f2),o=P.useContext(p2),i=Tc(r,e),s=xt({props:i,name:"MuiButton"}),{children:a,color:l="primary",component:u="button",className:f,disabled:h=!1,disableElevation:m=!1,disableFocusRipple:g=!1,endIcon:b,focusVisibleClassName:y,fullWidth:S=!1,id:C,loading:E=null,loadingIndicator:T,loadingPosition:w="center",size:M="medium",startIcon:R,type:_,variant:I="text",...N}=s,O=_o(C),A=T??v.jsx(ux,{"aria-labelledby":O,color:"inherit",size:16}),L={...s,color:l,component:u,disabled:h,disableElevation:m,disableFocusRipple:g,fullWidth:S,loading:E,loadingIndicator:A,loadingPosition:w,size:M,type:_,variant:I},z=OK(L),V=(R||E&&w==="start")&&v.jsx(AK,{className:z.startIcon,ownerState:L,children:R||v.jsx(uE,{className:z.loadingIconPlaceholder,ownerState:L})}),$=(b||E&&w==="end")&&v.jsx(IK,{className:z.endIcon,ownerState:L,children:b||v.jsx(uE,{className:z.loadingIconPlaceholder,ownerState:L})}),F=o||"",W=typeof E=="boolean"?v.jsx("span",{className:z.loadingWrapper,style:{display:"contents"},children:E&&v.jsx(DK,{className:z.loadingIndicator,ownerState:L,children:A})}):null;return v.jsxs(RK,{ownerState:L,className:Pe(r.className,z.root,f,F),component:u,disabled:h||E,focusRipple:!g,focusVisibleClassName:Pe(z.focusVisible,y),ref:n,type:_,id:E?O:C,...N,classes:z,children:[V,w!=="end"&&W,a,w==="end"&&W,$]})});process.env.NODE_ENV!=="production"&&(Jl.propTypes={children:c.node,classes:c.object,className:c.string,color:c.oneOfType([c.oneOf(["inherit","primary","secondary","success","error","info","warning"]),c.string]),component:c.elementType,disabled:c.bool,disableElevation:c.bool,disableFocusRipple:c.bool,disableRipple:c.bool,endIcon:c.node,focusVisibleClassName:c.string,fullWidth:c.bool,href:c.string,id:c.string,loading:c.bool,loadingIndicator:c.node,loadingPosition:c.oneOf(["center","end","start"]),size:c.oneOfType([c.oneOf(["small","medium","large"]),c.string]),startIcon:c.node,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),type:c.oneOfType([c.oneOf(["button","reset","submit"]),c.string]),variant:c.oneOfType([c.oneOf(["contained","outlined","text"]),c.string])});function PK(t){return Ke("MuiDialogActions",t)}He("MuiDialogActions",["root","spacing"]);const _K=t=>{const{classes:e,disableSpacing:n}=t;return Ue({root:["root",!n&&"spacing"]},PK,e)},NK=ye("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disableSpacing&&e.spacing]}})({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto",variants:[{props:({ownerState:t})=>!t.disableSpacing,style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),m2=P.forwardRef(function(e,n){const r=xt({props:e,name:"MuiDialogActions"}),{className:o,disableSpacing:i=!1,...s}=r,a={...r,disableSpacing:i},l=_K(a);return v.jsx(NK,{className:Pe(l.root,o),ownerState:a,ref:n,...s})});process.env.NODE_ENV!=="production"&&(m2.propTypes={children:c.node,classes:c.object,className:c.string,disableSpacing:c.bool,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object])});const LK=["onAccept","onClear","onCancel","onSetToday","actions"];function g2(t){const{onAccept:e,onClear:n,onCancel:r,onSetToday:o,actions:i}=t,s=nt(t,LK),a=fi();if(i==null||i.length===0)return null;const l=i==null?void 0:i.map(u=>{switch(u){case"clear":return v.jsx(Jl,{onClick:n,children:a.clearButtonLabel},u);case"cancel":return v.jsx(Jl,{onClick:r,children:a.cancelButtonLabel},u);case"accept":return v.jsx(Jl,{onClick:e,children:a.okButtonLabel},u);case"today":return v.jsx(Jl,{onClick:o,children:a.todayButtonLabel},u);default:return null}});return v.jsx(m2,te({},s,{children:l}))}process.env.NODE_ENV!=="production"&&(g2.propTypes={actions:c.arrayOf(c.oneOf(["accept","cancel","clear","today"]).isRequired),disableSpacing:c.bool,onAccept:c.func.isRequired,onCancel:c.func.isRequired,onClear:c.func.isRequired,onSetToday:c.func.isRequired,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object])});function jK(t){return Ke("MuiListItem",t)}He("MuiListItem",["root","container","dense","alignItemsFlexStart","divider","gutters","padding","secondaryAction"]);const $K=He("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]);function FK(t){return Ke("MuiListItemSecondaryAction",t)}He("MuiListItemSecondaryAction",["root","disableGutters"]);const BK=t=>{const{disableGutters:e,classes:n}=t;return Ue({root:["root",e&&"disableGutters"]},FK,n)},VK=ye("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.disableGutters&&e.disableGutters]}})({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)",variants:[{props:({ownerState:t})=>t.disableGutters,style:{right:0}}]}),wx=P.forwardRef(function(e,n){const r=xt({props:e,name:"MuiListItemSecondaryAction"}),{className:o,...i}=r,s=P.useContext(Ba),a={...r,disableGutters:s.disableGutters},l=BK(a);return v.jsx(VK,{className:Pe(l.root,o),ownerState:a,ref:n,...i})});process.env.NODE_ENV!=="production"&&(wx.propTypes={children:c.node,classes:c.object,className:c.string,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object])});wx.muiName="ListItemSecondaryAction";const zK=(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,n.alignItems==="flex-start"&&e.alignItemsFlexStart,n.divider&&e.divider,!n.disableGutters&&e.gutters,!n.disablePadding&&e.padding,n.hasSecondaryAction&&e.secondaryAction]},HK=t=>{const{alignItems:e,classes:n,dense:r,disableGutters:o,disablePadding:i,divider:s,hasSecondaryAction:a}=t;return Ue({root:["root",r&&"dense",!o&&"gutters",!i&&"padding",s&&"divider",e==="flex-start"&&"alignItemsFlexStart",a&&"secondaryAction"],container:["container"]},jK,n)},WK=ye("div",{name:"MuiListItem",slot:"Root",overridesResolver:zK})(It(({theme:t})=>({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>!e.disablePadding&&e.dense,style:{paddingTop:4,paddingBottom:4}},{props:({ownerState:e})=>!e.disablePadding&&!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>!e.disablePadding&&!!e.secondaryAction,style:{paddingRight:48}},{props:({ownerState:e})=>!!e.secondaryAction,style:{[`& > .${$K.root}`]:{paddingRight:48}}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:e})=>e.button,style:{transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}}},{props:({ownerState:e})=>e.hasSecondaryAction,style:{paddingRight:48}}]}))),qK=ye("li",{name:"MuiListItem",slot:"Container",overridesResolver:(t,e)=>e.container})({position:"relative"}),y2=P.forwardRef(function(e,n){const r=xt({props:e,name:"MuiListItem"}),{alignItems:o="center",children:i,className:s,component:a,components:l={},componentsProps:u={},ContainerComponent:f="li",ContainerProps:{className:h,...m}={},dense:g=!1,disableGutters:b=!1,disablePadding:y=!1,divider:S=!1,secondaryAction:C,slotProps:E={},slots:T={},...w}=r,M=P.useContext(Ba),R=P.useMemo(()=>({dense:g||M.dense||!1,alignItems:o,disableGutters:b}),[o,M.dense,g,b]),_=P.useRef(null),I=P.Children.toArray(i),N=I.length&&oc(I[I.length-1],["ListItemSecondaryAction"]),O={...r,alignItems:o,dense:R.dense,disableGutters:b,disablePadding:y,divider:S,hasSecondaryAction:N},A=HK(O),L=kt(_,n),z=T.root||l.Root||WK,V=E.root||u.root||{},$={className:Pe(A.root,V.className,s),...w};let F=a||"li";return N?(F=!$.component&&!a?"div":F,f==="li"&&(F==="li"?F="div":$.component==="li"&&($.component="div")),v.jsx(Ba.Provider,{value:R,children:v.jsxs(qK,{as:f,className:Pe(A.container,h),ref:L,ownerState:O,...m,children:[v.jsx(z,{...V,...!Mc(z)&&{as:F,ownerState:{...O,...V.ownerState}},...$,children:I}),I.pop()]})})):v.jsx(Ba.Provider,{value:R,children:v.jsxs(z,{...V,as:F,ref:L,...!Mc(z)&&{ownerState:{...O,...V.ownerState}},...$,children:[I,C&&v.jsx(wx,{children:C})]})})});process.env.NODE_ENV!=="production"&&(y2.propTypes={alignItems:c.oneOf(["center","flex-start"]),children:ui(c.node,t=>{const e=P.Children.toArray(t.children);let n=-1;for(let r=e.length-1;r>=0;r-=1){const o=e[r];if(oc(o,["ListItemSecondaryAction"])){n=r;break}}return n!==-1&&n!==e.length-1?new Error("MUI: You used an element after ListItemSecondaryAction. For ListItem to detect that it has a secondary action you must pass it as the last child to ListItem."):null}),classes:c.object,className:c.string,component:c.elementType,components:c.shape({Root:c.elementType}),componentsProps:c.shape({root:c.object}),ContainerComponent:fp,ContainerProps:c.object,dense:c.bool,disableGutters:c.bool,disablePadding:c.bool,divider:c.bool,secondaryAction:c.node,slotProps:c.shape({root:c.object}),slots:c.shape({root:c.elementType}),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object])});const UK=Fe(v.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");function KK(t){return Ke("MuiChip",t)}const ft=He("MuiChip",["root","sizeSmall","sizeMedium","colorDefault","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),YK=t=>{const{classes:e,disabled:n,size:r,color:o,iconColor:i,onDelete:s,clickable:a,variant:l}=t,u={root:["root",l,n&&"disabled",`size${Re(r)}`,`color${Re(o)}`,a&&"clickable",a&&`clickableColor${Re(o)}`,s&&"deletable",s&&`deletableColor${Re(o)}`,`${l}${Re(o)}`],label:["label",`label${Re(r)}`],avatar:["avatar",`avatar${Re(r)}`,`avatarColor${Re(o)}`],icon:["icon",`icon${Re(r)}`,`iconColor${Re(i)}`],deleteIcon:["deleteIcon",`deleteIcon${Re(r)}`,`deleteIconColor${Re(o)}`,`deleteIcon${Re(l)}Color${Re(o)}`]};return Ue(u,KK,e)},GK=ye("div",{name:"MuiChip",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t,{color:r,iconColor:o,clickable:i,onDelete:s,size:a,variant:l}=n;return[{[`& .${ft.avatar}`]:e.avatar},{[`& .${ft.avatar}`]:e[`avatar${Re(a)}`]},{[`& .${ft.avatar}`]:e[`avatarColor${Re(r)}`]},{[`& .${ft.icon}`]:e.icon},{[`& .${ft.icon}`]:e[`icon${Re(a)}`]},{[`& .${ft.icon}`]:e[`iconColor${Re(o)}`]},{[`& .${ft.deleteIcon}`]:e.deleteIcon},{[`& .${ft.deleteIcon}`]:e[`deleteIcon${Re(a)}`]},{[`& .${ft.deleteIcon}`]:e[`deleteIconColor${Re(r)}`]},{[`& .${ft.deleteIcon}`]:e[`deleteIcon${Re(l)}Color${Re(r)}`]},e.root,e[`size${Re(a)}`],e[`color${Re(r)}`],i&&e.clickable,i&&r!=="default"&&e[`clickableColor${Re(r)})`],s&&e.deletable,s&&r!=="default"&&e[`deletableColor${Re(r)}`],e[l],e[`${l}${Re(r)}`]]}})(It(({theme:t})=>{const e=t.palette.mode==="light"?t.palette.grey[700]:t.palette.grey[300];return{maxWidth:"100%",fontFamily:t.typography.fontFamily,fontSize:t.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(t.vars||t).palette.text.primary,backgroundColor:(t.vars||t).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:t.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${ft.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${ft.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:t.vars?t.vars.palette.Chip.defaultAvatarColor:e,fontSize:t.typography.pxToRem(12)},[`& .${ft.avatarColorPrimary}`]:{color:(t.vars||t).palette.primary.contrastText,backgroundColor:(t.vars||t).palette.primary.dark},[`& .${ft.avatarColorSecondary}`]:{color:(t.vars||t).palette.secondary.contrastText,backgroundColor:(t.vars||t).palette.secondary.dark},[`& .${ft.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:t.typography.pxToRem(10)},[`& .${ft.icon}`]:{marginLeft:5,marginRight:-6},[`& .${ft.deleteIcon}`]:{WebkitTapHighlightColor:"transparent",color:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / 0.26)`:$t(t.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / 0.4)`:$t(t.palette.text.primary,.4)}},variants:[{props:{size:"small"},style:{height:24,[`& .${ft.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${ft.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(t.palette).filter(Vn(["contrastText"])).map(([n])=>({props:{color:n},style:{backgroundColor:(t.vars||t).palette[n].main,color:(t.vars||t).palette[n].contrastText,[`& .${ft.deleteIcon}`]:{color:t.vars?`rgba(${t.vars.palette[n].contrastTextChannel} / 0.7)`:$t(t.palette[n].contrastText,.7),"&:hover, &:active":{color:(t.vars||t).palette[n].contrastText}}}})),{props:n=>n.iconColor===n.color,style:{[`& .${ft.icon}`]:{color:t.vars?t.vars.palette.Chip.defaultIconColor:e}}},{props:n=>n.iconColor===n.color&&n.color!=="default",style:{[`& .${ft.icon}`]:{color:"inherit"}}},{props:{onDelete:!0},style:{[`&.${ft.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.action.selectedChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:$t(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}}},...Object.entries(t.palette).filter(Vn(["dark"])).map(([n])=>({props:{color:n,onDelete:!0},style:{[`&.${ft.focusVisible}`]:{background:(t.vars||t).palette[n].dark}}})),{props:{clickable:!0},style:{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.selectedChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:$t(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity)},[`&.${ft.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.action.selectedChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:$t(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)},"&:active":{boxShadow:(t.vars||t).shadows[1]}}},...Object.entries(t.palette).filter(Vn(["dark"])).map(([n])=>({props:{color:n,clickable:!0},style:{[`&:hover, &.${ft.focusVisible}`]:{backgroundColor:(t.vars||t).palette[n].dark}}})),{props:{variant:"outlined"},style:{backgroundColor:"transparent",border:t.vars?`1px solid ${t.vars.palette.Chip.defaultBorder}`:`1px solid ${t.palette.mode==="light"?t.palette.grey[400]:t.palette.grey[700]}`,[`&.${ft.clickable}:hover`]:{backgroundColor:(t.vars||t).palette.action.hover},[`&.${ft.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`& .${ft.avatar}`]:{marginLeft:4},[`& .${ft.avatarSmall}`]:{marginLeft:2},[`& .${ft.icon}`]:{marginLeft:4},[`& .${ft.iconSmall}`]:{marginLeft:2},[`& .${ft.deleteIcon}`]:{marginRight:5},[`& .${ft.deleteIconSmall}`]:{marginRight:3}}},...Object.entries(t.palette).filter(Vn()).map(([n])=>({props:{variant:"outlined",color:n},style:{color:(t.vars||t).palette[n].main,border:`1px solid ${t.vars?`rgba(${t.vars.palette[n].mainChannel} / 0.7)`:$t(t.palette[n].main,.7)}`,[`&.${ft.clickable}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette[n].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:$t(t.palette[n].main,t.palette.action.hoverOpacity)},[`&.${ft.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette[n].mainChannel} / ${t.vars.palette.action.focusOpacity})`:$t(t.palette[n].main,t.palette.action.focusOpacity)},[`& .${ft.deleteIcon}`]:{color:t.vars?`rgba(${t.vars.palette[n].mainChannel} / 0.7)`:$t(t.palette[n].main,.7),"&:hover, &:active":{color:(t.vars||t).palette[n].main}}}}))]}})),JK=ye("span",{name:"MuiChip",slot:"Label",overridesResolver:(t,e)=>{const{ownerState:n}=t,{size:r}=n;return[e.label,e[`label${Re(r)}`]]}})({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap",variants:[{props:{variant:"outlined"},style:{paddingLeft:11,paddingRight:11}},{props:{size:"small"},style:{paddingLeft:8,paddingRight:8}},{props:{size:"small",variant:"outlined"},style:{paddingLeft:7,paddingRight:7}}]});function dE(t){return t.key==="Backspace"||t.key==="Delete"}const b2=P.forwardRef(function(e,n){const r=xt({props:e,name:"MuiChip"}),{avatar:o,className:i,clickable:s,color:a="default",component:l,deleteIcon:u,disabled:f=!1,icon:h,label:m,onClick:g,onDelete:b,onKeyDown:y,onKeyUp:S,size:C="medium",variant:E="filled",tabIndex:T,skipFocusWhenDisabled:w=!1,...M}=r,R=P.useRef(null),_=kt(R,n),I=G=>{G.stopPropagation(),b&&b(G)},N=G=>{G.currentTarget===G.target&&dE(G)&&G.preventDefault(),y&&y(G)},O=G=>{G.currentTarget===G.target&&b&&dE(G)&&b(G),S&&S(G)},A=s!==!1&&g?!0:s,L=A||b?Ja:l||"div",z={...r,component:L,disabled:f,size:C,color:a,iconColor:P.isValidElement(h)&&h.props.color||a,onDelete:!!b,clickable:A,variant:E},V=YK(z),$=L===Ja?{component:l||"div",focusVisibleClassName:V.focusVisible,...b&&{disableRipple:!0}}:{};let F=null;b&&(F=u&&P.isValidElement(u)?P.cloneElement(u,{className:Pe(u.props.className,V.deleteIcon),onClick:I}):v.jsx(UK,{className:Pe(V.deleteIcon),onClick:I}));let W=null;o&&P.isValidElement(o)&&(W=P.cloneElement(o,{className:Pe(V.avatar,o.props.className)}));let U=null;return h&&P.isValidElement(h)&&(U=P.cloneElement(h,{className:Pe(V.icon,h.props.className)})),process.env.NODE_ENV!=="production"&&W&&U&&console.error("MUI: The Chip component can not handle the avatar and the icon prop at the same time. Pick one."),v.jsxs(GK,{as:L,className:Pe(V.root,i),disabled:A&&f?!0:void 0,onClick:g,onKeyDown:N,onKeyUp:O,ref:_,tabIndex:w&&f?-1:T,ownerState:z,...$,...M,children:[W||U,v.jsx(JK,{className:Pe(V.label),ownerState:z,children:m}),F]})});process.env.NODE_ENV!=="production"&&(b2.propTypes={avatar:c.element,children:YV,classes:c.object,className:c.string,clickable:c.bool,color:c.oneOfType([c.oneOf(["default","primary","secondary","error","info","success","warning"]),c.string]),component:c.elementType,deleteIcon:c.element,disabled:c.bool,icon:c.element,label:c.node,onClick:c.func,onDelete:c.func,onKeyDown:c.func,onKeyUp:c.func,size:c.oneOfType([c.oneOf(["medium","small"]),c.string]),skipFocusWhenDisabled:c.bool,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),tabIndex:c.number,variant:c.oneOfType([c.oneOf(["filled","outlined"]),c.string])});const Pc=36,Vp=2,zp=320,ZK=280,Tx=336,XK=["items","changeImportance","isLandscape","onChange","isValid"],QK=["getValue"];function v2(t){const{items:e,changeImportance:n="accept",onChange:r,isValid:o}=t,i=nt(t,XK);if(e==null||e.length===0)return null;const s=e.map(a=>{let{getValue:l}=a,u=nt(a,QK);const f=l({isValid:o});return te({},u,{label:u.label,onClick:()=>{r(f,n,u)},disabled:!o(f)})});return v.jsx(Y0,te({dense:!0,sx:[{maxHeight:Tx,maxWidth:200,overflow:"auto"},...Array.isArray(i.sx)?i.sx:[i.sx]]},i,{children:s.map(a=>v.jsx(y2,{children:v.jsx(b2,te({},a))},a.id??a.label))}))}process.env.NODE_ENV!=="production"&&(v2.propTypes={changeImportance:c.oneOf(["accept","set"]),className:c.string,component:c.elementType,dense:c.bool,disablePadding:c.bool,isLandscape:c.bool.isRequired,isValid:c.func.isRequired,items:c.arrayOf(c.shape({getValue:c.func.isRequired,id:c.string,label:c.string.isRequired})),onChange:c.func.isRequired,style:c.object,subheader:c.node,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object])});function eY(t){return t.view!==null}const tY=t=>{const{classes:e,isLandscape:n}=t;return Ue({root:["root",n&&"landscape"],contentWrapper:["contentWrapper"],toolbar:["toolbar"],actionBar:["actionBar"],tabs:["tabs"],landscape:["landscape"],shortcuts:["shortcuts"]},d2,e)},nY=t=>{const{wrapperVariant:e,onAccept:n,onClear:r,onCancel:o,onSetToday:i,view:s,views:a,onViewChange:l,value:u,onChange:f,onSelectShortcut:h,isValid:m,isLandscape:g,disabled:b,readOnly:y,children:S,slots:C,slotProps:E}=t,T=tY(t),w=(C==null?void 0:C.actionBar)??g2,M=Ct({elementType:w,externalSlotProps:E==null?void 0:E.actionBar,additionalProps:{onAccept:n,onClear:r,onCancel:o,onSetToday:i,actions:e==="desktop"?[]:["cancel","accept"]},className:T.actionBar,ownerState:te({},t,{wrapperVariant:e})}),R=v.jsx(w,te({},M)),_=C==null?void 0:C.toolbar,I=Ct({elementType:_,externalSlotProps:E==null?void 0:E.toolbar,additionalProps:{isLandscape:g,onChange:f,value:u,view:s,onViewChange:l,views:a,disabled:b,readOnly:y},className:T.toolbar,ownerState:te({},t,{wrapperVariant:e})}),N=eY(I)&&_?v.jsx(_,te({},I)):null,O=S,A=C==null?void 0:C.tabs,L=s&&A?v.jsx(A,te({view:s,onViewChange:l,className:T.tabs},E==null?void 0:E.tabs)):null,z=(C==null?void 0:C.shortcuts)??v2,V=Ct({elementType:z,externalSlotProps:E==null?void 0:E.shortcuts,additionalProps:{isValid:m,isLandscape:g,onChange:h},className:T.shortcuts,ownerState:{isValid:m,isLandscape:g,onChange:h,wrapperVariant:e}}),$=s&&z?v.jsx(z,te({},V)):null;return{toolbar:N,content:O,tabs:L,actionBar:R,shortcuts:$}},rY=t=>{const{isLandscape:e,classes:n}=t;return Ue({root:["root",e&&"landscape"],contentWrapper:["contentWrapper"]},d2,n)},oY=ye("div",{name:"MuiPickersLayout",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"grid",gridAutoColumns:"max-content auto max-content",gridAutoRows:"max-content auto max-content",[`& .${ms.actionBar}`]:{gridColumn:"1 / 4",gridRow:3},variants:[{props:{isLandscape:!0},style:{[`& .${ms.toolbar}`]:{gridColumn:1,gridRow:"2 / 3"},[`.${ms.shortcuts}`]:{gridColumn:"2 / 4",gridRow:1}}},{props:{isLandscape:!0,isRtl:!0},style:{[`& .${ms.toolbar}`]:{gridColumn:3}}},{props:{isLandscape:!1},style:{[`& .${ms.toolbar}`]:{gridColumn:"2 / 4",gridRow:1},[`& .${ms.shortcuts}`]:{gridColumn:1,gridRow:"2 / 3"}}},{props:{isLandscape:!1,isRtl:!0},style:{[`& .${ms.shortcuts}`]:{gridColumn:3}}}]}),iY=ye("div",{name:"MuiPickersLayout",slot:"ContentWrapper",overridesResolver:(t,e)=>e.contentWrapper})({gridColumn:2,gridRow:2,display:"flex",flexDirection:"column"}),Ex=P.forwardRef(function(e,n){const r=qt({props:e,name:"MuiPickersLayout"}),{toolbar:o,content:i,tabs:s,actionBar:a,shortcuts:l}=nY(r),{sx:u,className:f,isLandscape:h,wrapperVariant:m}=r,g=rY(r);return v.jsxs(oY,{ref:n,sx:u,className:Pe(g.root,f),ownerState:r,children:[h?l:o,h?o:l,v.jsx(iY,{className:g.contentWrapper,children:m==="desktop"?v.jsxs(P.Fragment,{children:[i,s]}):v.jsxs(P.Fragment,{children:[s,i]})}),a]})});process.env.NODE_ENV!=="production"&&(Ex.propTypes={children:c.node,classes:c.object,className:c.string,disabled:c.bool,isLandscape:c.bool.isRequired,isRtl:c.bool.isRequired,isValid:c.func.isRequired,onAccept:c.func.isRequired,onCancel:c.func.isRequired,onChange:c.func.isRequired,onClear:c.func.isRequired,onClose:c.func.isRequired,onDismiss:c.func.isRequired,onOpen:c.func.isRequired,onSelectShortcut:c.func.isRequired,onSetToday:c.func.isRequired,onViewChange:c.func.isRequired,orientation:c.oneOf(["landscape","portrait"]),readOnly:c.bool,slotProps:c.object,slots:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),value:c.any,view:c.oneOf(["day","hours","meridiem","minutes","month","seconds","year"]),views:c.arrayOf(c.oneOf(["day","hours","meridiem","minutes","month","seconds","year"]).isRequired).isRequired,wrapperVariant:c.oneOf(["desktop","mobile"])});const sY=["props","getOpenDialogAriaText"],aY=["ownerState"],lY=["ownerState"],cY=t=>{var ge;let{props:e,getOpenDialogAriaText:n}=t,r=nt(t,sY);const{slots:o,slotProps:i,className:s,sx:a,format:l,formatDensity:u,enableAccessibleFieldDOMStructure:f,selectedSections:h,onSelectedSectionsChange:m,timezone:g,name:b,label:y,inputRef:S,readOnly:C,disabled:E,autoFocus:T,localeText:w,reduceAnimations:M}=e,R=P.useRef(null),_=P.useRef(null),I=_o(),N=((ge=i==null?void 0:i.toolbar)==null?void 0:ge.hidden)??!1,{open:O,actions:A,hasUIView:L,layoutProps:z,renderCurrentView:V,shouldRestoreFocus:$,fieldProps:F,contextValue:W,ownerState:U}=u2(te({},r,{props:e,fieldRef:_,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"desktop"})),G=o.inputAdornment??dx,Y=Ct({elementType:G,externalSlotProps:i==null?void 0:i.inputAdornment,additionalProps:{position:"end"},ownerState:e}),Z=nt(Y,aY),me=o.openPickerButton??dl,fe=Ct({elementType:me,externalSlotProps:i==null?void 0:i.openPickerButton,additionalProps:{disabled:E||C,onClick:O?A.onClose:A.onOpen,"aria-label":n(F.value),edge:Z.position},ownerState:e}),pe=nt(fe,lY),re=o.openPickerIcon,ue=Ct({elementType:re,externalSlotProps:i==null?void 0:i.openPickerIcon,ownerState:U}),ae=o.field,K=Ct({elementType:ae,externalSlotProps:i==null?void 0:i.field,additionalProps:te({},F,N&&{id:I},{readOnly:C,disabled:E,className:s,sx:a,format:l,formatDensity:u,enableAccessibleFieldDOMStructure:f,selectedSections:h,onSelectedSectionsChange:m,timezone:g,label:y,name:b,autoFocus:T&&!e.open,focused:O?!0:void 0},S?{inputRef:S}:{}),ownerState:e});L&&(K.InputProps=te({},K.InputProps,{ref:R},!e.disableOpenPicker&&{[`${Z.position}Adornment`]:v.jsx(G,te({},Z,{children:v.jsx(me,te({},pe,{children:v.jsx(re,te({},ue))}))}))}));const Q=te({textField:o.textField,clearIcon:o.clearIcon,clearButton:o.clearButton},K.slots),ie=o.layout??Ex;let he=I;N&&(y?he=`${I}-label`:he=void 0);const ee=te({},i,{toolbar:te({},i==null?void 0:i.toolbar,{titleId:I}),popper:te({"aria-labelledby":he},i==null?void 0:i.popper)}),se=kt(_,K.unstableFieldRef);return{renderPicker:()=>v.jsxs($I,{contextValue:W,localeText:w,children:[v.jsx(ae,te({},K,{slots:Q,slotProps:ee,unstableFieldRef:se})),v.jsx(gK,te({role:"dialog",placement:"bottom-start",anchorEl:R.current},A,{open:O,slots:o,slotProps:ee,shouldRestoreFocus:$,reduceAnimations:M,children:v.jsx(ie,te({},z,ee==null?void 0:ee.layout,{slots:o,slotProps:ee,children:V()}))}))]})}},x2=({shouldDisableDate:t,shouldDisableMonth:e,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:i,disablePast:s,timezone:a})=>{const l=Ks();return P.useCallback(u=>ou({adapter:l,value:u,timezone:a,props:{shouldDisableDate:t,shouldDisableMonth:e,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:i,disablePast:s}})!==null,[l,t,e,n,r,o,i,s,a])},uY=(t,e,n)=>(r,o)=>{switch(o.type){case"changeMonth":return te({},r,{slideDirection:o.direction,currentMonth:o.newMonth,isMonthSwitchingAnimating:!t});case"changeMonthTimezone":{const i=o.newTimezone;if(n.getTimezone(r.currentMonth)===i)return r;let s=n.setTimezone(r.currentMonth,i);return n.getMonth(s)!==n.getMonth(r.currentMonth)&&(s=n.setMonth(s,n.getMonth(r.currentMonth))),te({},r,{currentMonth:s})}case"finishMonthSwitchingAnimation":return te({},r,{isMonthSwitchingAnimating:!1});case"changeFocusedDay":{if(r.focusedDay!=null&&o.focusedDay!=null&&n.isSameDay(o.focusedDay,r.focusedDay))return r;const i=o.focusedDay!=null&&!e&&!n.isSameMonth(r.currentMonth,o.focusedDay);return te({},r,{focusedDay:o.focusedDay,isMonthSwitchingAnimating:i&&!t&&!o.withoutMonthSwitchingAnimation,currentMonth:i?n.startOfMonth(o.focusedDay):r.currentMonth,slideDirection:o.focusedDay!=null&&n.isAfterDay(o.focusedDay,r.currentMonth)?"left":"right"})}default:throw new Error("missing support")}},dY=t=>{const{value:e,referenceDate:n,disableFuture:r,disablePast:o,disableSwitchToMonthOnDayFocus:i=!1,maxDate:s,minDate:a,onMonthChange:l,reduceAnimations:u,shouldDisableDate:f,timezone:h}=t,m=Ut(),g=P.useRef(uY(!!u,i,m)).current,b=P.useMemo(()=>Ro.getInitialReferenceValue({value:e,utils:m,timezone:h,props:t,referenceDate:n,granularity:wo.day}),[n,h]),[y,S]=P.useReducer(g,{isMonthSwitchingAnimating:!1,focusedDay:b,currentMonth:m.startOfMonth(b),slideDirection:"left"});P.useEffect(()=>{S({type:"changeMonthTimezone",newTimezone:m.getTimezone(b)})},[b,m]);const C=P.useCallback(R=>{S(te({type:"changeMonth"},R)),l&&l(R.newMonth)},[l]),E=P.useCallback(R=>{const _=R;m.isSameMonth(_,y.currentMonth)||C({newMonth:m.startOfMonth(_),direction:m.isAfterDay(_,y.currentMonth)?"left":"right"})},[y.currentMonth,C,m]),T=x2({shouldDisableDate:f,minDate:a,maxDate:s,disableFuture:r,disablePast:o,timezone:h}),w=P.useCallback(()=>{S({type:"finishMonthSwitchingAnimation"})},[]),M=je((R,_)=>{T(R)||S({type:"changeFocusedDay",focusedDay:R,withoutMonthSwitchingAnimation:_})});return{referenceDate:b,calendarState:y,changeMonth:E,changeFocusedDay:M,isDateDisabled:T,onMonthSwitchingAnimationEnd:w,handleChangeMonth:C}},fY=t=>Ke("MuiPickersFadeTransitionGroup",t);He("MuiPickersFadeTransitionGroup",["root"]);const pY=t=>{const{classes:e}=t;return Ue({root:["root"]},fY,e)},hY=ye(ru,{name:"MuiPickersFadeTransitionGroup",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"block",position:"relative"});function S2(t){const e=qt({props:t,name:"MuiPickersFadeTransitionGroup"}),{children:n,className:r,reduceAnimations:o,transKey:i}=e,s=pY(e),a=Zi();return o?n:v.jsx(hY,{className:Pe(s.root,r),children:v.jsx(qi,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:a.transitions.duration.enteringScreen,enter:a.transitions.duration.enteringScreen,exit:0},children:n},i)})}function mY(t){return Ke("MuiPickersDay",t)}const ys=He("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]),gY=["autoFocus","className","day","disabled","disableHighlightToday","disableMargin","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","onMouseEnter","outsideCurrentMonth","selected","showDaysOutsideCurrentMonth","children","today","isFirstVisibleCell","isLastVisibleCell"],yY=t=>{const{selected:e,disableMargin:n,disableHighlightToday:r,today:o,disabled:i,outsideCurrentMonth:s,showDaysOutsideCurrentMonth:a,classes:l}=t,u=s&&!a;return Ue({root:["root",e&&!u&&"selected",i&&"disabled",!n&&"dayWithMargin",!r&&o&&"today",s&&a&&"dayOutsideMonth",u&&"hiddenDaySpacingFiller"],hiddenDaySpacingFiller:["hiddenDaySpacingFiller"]},mY,l)},C2=({theme:t})=>te({},t.typography.caption,{width:Pc,height:Pc,borderRadius:"50%",padding:0,backgroundColor:"transparent",transition:t.transitions.create("background-color",{duration:t.transitions.duration.short}),color:(t.vars||t).palette.text.primary,"@media (pointer: fine)":{"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.hoverOpacity})`:$t(t.palette.primary.main,t.palette.action.hoverOpacity)}},"&:focus":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.focusOpacity})`:$t(t.palette.primary.main,t.palette.action.focusOpacity),[`&.${ys.selected}`]:{willChange:"background-color",backgroundColor:(t.vars||t).palette.primary.dark}},[`&.${ys.selected}`]:{color:(t.vars||t).palette.primary.contrastText,backgroundColor:(t.vars||t).palette.primary.main,fontWeight:t.typography.fontWeightMedium,"&:hover":{willChange:"background-color",backgroundColor:(t.vars||t).palette.primary.dark}},[`&.${ys.disabled}:not(.${ys.selected})`]:{color:(t.vars||t).palette.text.disabled},[`&.${ys.disabled}&.${ys.selected}`]:{opacity:.6},variants:[{props:{disableMargin:!1},style:{margin:`0 ${Vp}px`}},{props:{outsideCurrentMonth:!0,showDaysOutsideCurrentMonth:!0},style:{color:(t.vars||t).palette.text.secondary}},{props:{disableHighlightToday:!1,today:!0},style:{[`&:not(.${ys.selected})`]:{border:`1px solid ${(t.vars||t).palette.text.secondary}`}}}]}),w2=(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disableMargin&&e.dayWithMargin,!n.disableHighlightToday&&n.today&&e.today,!n.outsideCurrentMonth&&n.showDaysOutsideCurrentMonth&&e.dayOutsideMonth,n.outsideCurrentMonth&&!n.showDaysOutsideCurrentMonth&&e.hiddenDaySpacingFiller]},bY=ye(Ja,{name:"MuiPickersDay",slot:"Root",overridesResolver:w2})(C2),vY=ye("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:w2})(({theme:t})=>te({},C2({theme:t}),{opacity:0,pointerEvents:"none"})),Hl=()=>{},T2=P.forwardRef(function(e,n){const r=qt({props:e,name:"MuiPickersDay"}),{autoFocus:o=!1,className:i,day:s,disabled:a=!1,disableHighlightToday:l=!1,disableMargin:u=!1,isAnimating:f,onClick:h,onDaySelect:m,onFocus:g=Hl,onBlur:b=Hl,onKeyDown:y=Hl,onMouseDown:S=Hl,onMouseEnter:C=Hl,outsideCurrentMonth:E,selected:T=!1,showDaysOutsideCurrentMonth:w=!1,children:M,today:R=!1}=r,_=nt(r,gY),I=te({},r,{autoFocus:o,disabled:a,disableHighlightToday:l,disableMargin:u,selected:T,showDaysOutsideCurrentMonth:w,today:R}),N=yY(I),O=Ut(),A=P.useRef(null),L=kt(A,n);Rn(()=>{o&&!a&&!f&&!E&&A.current.focus()},[o,a,f,E]);const z=$=>{S($),E&&$.preventDefault()},V=$=>{a||m(s),E&&$.currentTarget.focus(),h&&h($)};return E&&!w?v.jsx(vY,{className:Pe(N.root,N.hiddenDaySpacingFiller,i),ownerState:I,role:_.role}):v.jsx(bY,te({className:Pe(N.root,i),ref:L,centerRipple:!0,disabled:a,tabIndex:T?0:-1,onKeyDown:$=>y($,s),onFocus:$=>g($,s),onBlur:$=>b($,s),onMouseEnter:$=>C($,s),onClick:V,onMouseDown:z},_,{ownerState:I,children:M||O.format(s,"dayOfMonth")}))});process.env.NODE_ENV!=="production"&&(T2.propTypes={action:c.oneOfType([c.func,c.shape({current:c.shape({focusVisible:c.func.isRequired})})]),centerRipple:c.bool,classes:c.object,className:c.string,component:c.elementType,day:c.object.isRequired,disabled:c.bool,disableHighlightToday:c.bool,disableMargin:c.bool,disableRipple:c.bool,disableTouchRipple:c.bool,focusRipple:c.bool,focusVisibleClassName:c.string,isAnimating:c.bool,isFirstVisibleCell:c.bool.isRequired,isLastVisibleCell:c.bool.isRequired,onBlur:c.func,onDaySelect:c.func.isRequired,onFocus:c.func,onFocusVisible:c.func,onKeyDown:c.func,onMouseEnter:c.func,outsideCurrentMonth:c.bool.isRequired,selected:c.bool,showDaysOutsideCurrentMonth:c.bool,style:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),tabIndex:c.number,today:c.bool,TouchRippleProps:c.object,touchRippleRef:c.oneOfType([c.func,c.shape({current:c.shape({pulsate:c.func.isRequired,start:c.func.isRequired,stop:c.func.isRequired})})])});const xY=P.memo(T2),SY=t=>Ke("MuiPickersSlideTransition",t),Lr=He("MuiPickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),CY=["children","className","reduceAnimations","slideDirection","transKey","classes"],wY=t=>{const{classes:e,slideDirection:n}=t,r={root:["root"],exit:["slideExit"],enterActive:["slideEnterActive"],enter:[`slideEnter-${n}`],exitActive:[`slideExitActiveLeft-${n}`]};return Ue(r,SY,e)},TY=ye(ru,{name:"MuiPickersSlideTransition",slot:"Root",overridesResolver:(t,e)=>[e.root,{[`.${Lr["slideEnter-left"]}`]:e["slideEnter-left"]},{[`.${Lr["slideEnter-right"]}`]:e["slideEnter-right"]},{[`.${Lr.slideEnterActive}`]:e.slideEnterActive},{[`.${Lr.slideExit}`]:e.slideExit},{[`.${Lr["slideExitActiveLeft-left"]}`]:e["slideExitActiveLeft-left"]},{[`.${Lr["slideExitActiveLeft-right"]}`]:e["slideExitActiveLeft-right"]}]})(({theme:t})=>{const e=t.transitions.create("transform",{duration:t.transitions.duration.complex,easing:"cubic-bezier(0.35, 0.8, 0.4, 1)"});return{display:"block",position:"relative",overflowX:"hidden","& > *":{position:"absolute",top:0,right:0,left:0},[`& .${Lr["slideEnter-left"]}`]:{willChange:"transform",transform:"translate(100%)",zIndex:1},[`& .${Lr["slideEnter-right"]}`]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},[`& .${Lr.slideEnterActive}`]:{transform:"translate(0%)",transition:e},[`& .${Lr.slideExit}`]:{transform:"translate(0%)"},[`& .${Lr["slideExitActiveLeft-left"]}`]:{willChange:"transform",transform:"translate(-100%)",transition:e,zIndex:0},[`& .${Lr["slideExitActiveLeft-right"]}`]:{willChange:"transform",transform:"translate(100%)",transition:e,zIndex:0}}});function EY(t){const e=qt({props:t,name:"MuiPickersSlideTransition"}),{children:n,className:r,reduceAnimations:o,transKey:i}=e,s=nt(e,CY),a=wY(e),l=Zi();if(o)return v.jsx("div",{className:Pe(a.root,r),children:n});const u={exit:a.exit,enterActive:a.enterActive,enter:a.enter,exitActive:a.exitActive};return v.jsx(TY,{className:Pe(a.root,r),childFactory:f=>P.cloneElement(f,{classNames:u}),role:"presentation",children:v.jsx(J0,te({mountOnEnter:!0,unmountOnExit:!0,timeout:l.transitions.duration.complex,classNames:u},s,{children:n}),i)})}const kY=t=>Ke("MuiDayCalendar",t);He("MuiDayCalendar",["root","header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer","weekNumberLabel","weekNumber"]);const MY=["parentProps","day","focusableDay","selectedDays","isDateDisabled","currentMonthNumber","isViewFocused"],OY=["ownerState"],RY=t=>{const{classes:e}=t;return Ue({root:["root"],header:["header"],weekDayLabel:["weekDayLabel"],loadingContainer:["loadingContainer"],slideTransition:["slideTransition"],monthContainer:["monthContainer"],weekContainer:["weekContainer"],weekNumberLabel:["weekNumberLabel"],weekNumber:["weekNumber"]},kY,e)},E2=(Pc+Vp*2)*6,AY=ye("div",{name:"MuiDayCalendar",slot:"Root",overridesResolver:(t,e)=>e.root})({}),IY=ye("div",{name:"MuiDayCalendar",slot:"Header",overridesResolver:(t,e)=>e.header})({display:"flex",justifyContent:"center",alignItems:"center"}),DY=ye(Qi,{name:"MuiDayCalendar",slot:"WeekDayLabel",overridesResolver:(t,e)=>e.weekDayLabel})(({theme:t})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:(t.vars||t).palette.text.secondary})),PY=ye(Qi,{name:"MuiDayCalendar",slot:"WeekNumberLabel",overridesResolver:(t,e)=>e.weekNumberLabel})(({theme:t})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:t.palette.text.disabled})),_Y=ye(Qi,{name:"MuiDayCalendar",slot:"WeekNumber",overridesResolver:(t,e)=>e.weekNumber})(({theme:t})=>te({},t.typography.caption,{width:Pc,height:Pc,padding:0,margin:`0 ${Vp}px`,color:t.palette.text.disabled,fontSize:"0.75rem",alignItems:"center",justifyContent:"center",display:"inline-flex"})),NY=ye("div",{name:"MuiDayCalendar",slot:"LoadingContainer",overridesResolver:(t,e)=>e.loadingContainer})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:E2}),LY=ye(EY,{name:"MuiDayCalendar",slot:"SlideTransition",overridesResolver:(t,e)=>e.slideTransition})({minHeight:E2}),jY=ye("div",{name:"MuiDayCalendar",slot:"MonthContainer",overridesResolver:(t,e)=>e.monthContainer})({overflow:"hidden"}),$Y=ye("div",{name:"MuiDayCalendar",slot:"WeekContainer",overridesResolver:(t,e)=>e.weekContainer})({margin:`${Vp}px 0`,display:"flex",justifyContent:"center"});function FY(t){let{parentProps:e,day:n,focusableDay:r,selectedDays:o,isDateDisabled:i,currentMonthNumber:s,isViewFocused:a}=t,l=nt(t,MY);const{disabled:u,disableHighlightToday:f,isMonthSwitchingAnimating:h,showDaysOutsideCurrentMonth:m,slots:g,slotProps:b,timezone:y}=e,S=Ut(),C=Np(y),E=r!==null&&S.isSameDay(n,r),T=o.some(L=>S.isSameDay(L,n)),w=S.isSameDay(n,C),M=(g==null?void 0:g.day)??xY,R=Ct({elementType:M,externalSlotProps:b==null?void 0:b.day,additionalProps:te({disableHighlightToday:f,showDaysOutsideCurrentMonth:m,role:"gridcell",isAnimating:h,"data-timestamp":S.toJsDate(n).valueOf()},l),ownerState:te({},e,{day:n,selected:T})}),_=nt(R,OY),I=P.useMemo(()=>u||i(n),[u,i,n]),N=P.useMemo(()=>S.getMonth(n)!==s,[S,n,s]),O=P.useMemo(()=>{const L=S.startOfMonth(S.setMonth(n,s));return m?S.isSameDay(n,S.startOfWeek(L)):S.isSameDay(n,L)},[s,n,m,S]),A=P.useMemo(()=>{const L=S.endOfMonth(S.setMonth(n,s));return m?S.isSameDay(n,S.endOfWeek(L)):S.isSameDay(n,L)},[s,n,m,S]);return v.jsx(M,te({},_,{day:n,disabled:I,autoFocus:a&&E,today:w,outsideCurrentMonth:N,isFirstVisibleCell:O,isLastVisibleCell:A,selected:T,tabIndex:E?0:-1,"aria-selected":T,"aria-current":w?"date":void 0}))}function BY(t){const e=qt({props:t,name:"MuiDayCalendar"}),n=Ut(),{onFocusedDayChange:r,className:o,currentMonth:i,selectedDays:s,focusedDay:a,loading:l,onSelectedDaysChange:u,onMonthSwitchingAnimationEnd:f,readOnly:h,reduceAnimations:m,renderLoading:g=()=>v.jsx("span",{children:"..."}),slideDirection:b,TransitionProps:y,disablePast:S,disableFuture:C,minDate:E,maxDate:T,shouldDisableDate:w,shouldDisableMonth:M,shouldDisableYear:R,dayOfWeekFormatter:_=we=>n.format(we,"weekdayShort").charAt(0).toUpperCase(),hasFocus:I,onFocusedViewChange:N,gridLabelId:O,displayWeekNumber:A,fixedWeekNumber:L,autoFocus:z,timezone:V}=e,$=Np(V),F=RY(e),W=ao(),U=x2({shouldDisableDate:w,shouldDisableMonth:M,shouldDisableYear:R,minDate:E,maxDate:T,disablePast:S,disableFuture:C,timezone:V}),G=fi(),[Y,Z]=ai({name:"DayCalendar",state:"hasFocus",controlled:I,default:z??!1}),[me,fe]=P.useState(()=>a||$),pe=je(we=>{h||u(we)}),re=we=>{U(we)||(r(we),fe(we),N==null||N(!0),Z(!0))},ue=je((we,xe)=>{switch(we.key){case"ArrowUp":re(n.addDays(xe,-7)),we.preventDefault();break;case"ArrowDown":re(n.addDays(xe,7)),we.preventDefault();break;case"ArrowLeft":{const Me=n.addDays(xe,W?1:-1),_e=n.addMonths(xe,W?1:-1),Ve=lc({utils:n,date:Me,minDate:W?Me:n.startOfMonth(_e),maxDate:W?n.endOfMonth(_e):Me,isDateDisabled:U,timezone:V});re(Ve||Me),we.preventDefault();break}case"ArrowRight":{const Me=n.addDays(xe,W?-1:1),_e=n.addMonths(xe,W?-1:1),Ve=lc({utils:n,date:Me,minDate:W?n.startOfMonth(_e):Me,maxDate:W?Me:n.endOfMonth(_e),isDateDisabled:U,timezone:V});re(Ve||Me),we.preventDefault();break}case"Home":re(n.startOfWeek(xe)),we.preventDefault();break;case"End":re(n.endOfWeek(xe)),we.preventDefault();break;case"PageUp":re(n.addMonths(xe,1)),we.preventDefault();break;case"PageDown":re(n.addMonths(xe,-1)),we.preventDefault();break}}),ae=je((we,xe)=>re(xe)),K=je((we,xe)=>{Y&&n.isSameDay(me,xe)&&(N==null||N(!1))}),Q=n.getMonth(i),ie=n.getYear(i),he=P.useMemo(()=>s.filter(we=>!!we).map(we=>n.startOfDay(we)),[n,s]),ee=`${ie}-${Q}`,se=P.useMemo(()=>P.createRef(),[ee]),le=P.useMemo(()=>{const we=n.startOfMonth(i),xe=n.endOfMonth(i);return U(me)||n.isAfterDay(me,xe)||n.isBeforeDay(me,we)?lc({utils:n,date:me,minDate:we,maxDate:xe,disablePast:S,disableFuture:C,isDateDisabled:U,timezone:V}):me},[i,C,S,me,U,n,V]),ge=P.useMemo(()=>{const we=n.getWeekArray(i);let xe=n.addMonths(i,1);for(;L&&we.length<L;){const Me=n.getWeekArray(xe),_e=n.isSameDay(we[we.length-1][0],Me[0][0]);Me.slice(_e?1:0).forEach(Ve=>{we.length<L&&we.push(Ve)}),xe=n.addMonths(xe,1)}return we},[i,L,n]);return v.jsxs(AY,{role:"grid","aria-labelledby":O,className:F.root,children:[v.jsxs(IY,{role:"row",className:F.header,children:[A&&v.jsx(PY,{variant:"caption",role:"columnheader","aria-label":G.calendarWeekNumberHeaderLabel,className:F.weekNumberLabel,children:G.calendarWeekNumberHeaderText}),g9(n,$).map((we,xe)=>v.jsx(DY,{variant:"caption",role:"columnheader","aria-label":n.format(we,"weekday"),className:F.weekDayLabel,children:_(we)},xe.toString()))]}),l?v.jsx(NY,{className:F.loadingContainer,children:g()}):v.jsx(LY,te({transKey:ee,onExited:f,reduceAnimations:m,slideDirection:b,className:Pe(o,F.slideTransition)},y,{nodeRef:se,children:v.jsx(jY,{ref:se,role:"rowgroup",className:F.monthContainer,children:ge.map((we,xe)=>v.jsxs($Y,{role:"row",className:F.weekContainer,"aria-rowindex":xe+1,children:[A&&v.jsx(_Y,{className:F.weekNumber,role:"rowheader","aria-label":G.calendarWeekNumberAriaLabelText(n.getWeekNumber(we[0])),children:G.calendarWeekNumberText(n.getWeekNumber(we[0]))}),we.map((Me,_e)=>v.jsx(FY,{parentProps:e,day:Me,selectedDays:he,focusableDay:le,onKeyDown:ue,onFocus:ae,onBlur:K,onDaySelect:pe,isDateDisabled:U,currentMonthNumber:Q,isViewFocused:Y,"aria-colindex":_e+1},Me.toString()))]},`week-${we[0]}`))})}))]})}function VY(t){return Ke("MuiPickersMonth",t)}const gd=He("MuiPickersMonth",["root","monthButton","disabled","selected"]),zY=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","aria-label","monthsPerRow","slots","slotProps"],HY=t=>{const{disabled:e,selected:n,classes:r}=t;return Ue({root:["root"],monthButton:["monthButton",e&&"disabled",n&&"selected"]},VY,r)},WY=ye("div",{name:"MuiPickersMonth",slot:"Root",overridesResolver:(t,e)=>[e.root]})({display:"flex",alignItems:"center",justifyContent:"center",flexBasis:"33.3%",variants:[{props:{monthsPerRow:4},style:{flexBasis:"25%"}}]}),qY=ye("button",{name:"MuiPickersMonth",slot:"MonthButton",overridesResolver:(t,e)=>[e.monthButton,{[`&.${gd.disabled}`]:e.disabled},{[`&.${gd.selected}`]:e.selected}]})(({theme:t})=>te({color:"unset",backgroundColor:"transparent",border:0,outline:0},t.typography.subtitle1,{margin:"8px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:$t(t.palette.action.active,t.palette.action.hoverOpacity)},"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:$t(t.palette.action.active,t.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${gd.disabled}`]:{color:(t.vars||t).palette.text.secondary},[`&.${gd.selected}`]:{color:(t.vars||t).palette.primary.contrastText,backgroundColor:(t.vars||t).palette.primary.main,"&:focus, &:hover":{backgroundColor:(t.vars||t).palette.primary.dark}}})),UY=P.memo(function(e){const n=qt({props:e,name:"MuiPickersMonth"}),{autoFocus:r,className:o,children:i,disabled:s,selected:a,value:l,tabIndex:u,onClick:f,onKeyDown:h,onFocus:m,onBlur:g,"aria-current":b,"aria-label":y,slots:S,slotProps:C}=n,E=nt(n,zY),T=P.useRef(null),w=HY(n);Rn(()=>{var _;r&&((_=T.current)==null||_.focus())},[r]);const M=(S==null?void 0:S.monthButton)??qY,R=Ct({elementType:M,externalSlotProps:C==null?void 0:C.monthButton,additionalProps:{children:i,disabled:s,tabIndex:u,ref:T,type:"button",role:"radio","aria-current":b,"aria-checked":a,"aria-label":y,onClick:_=>f(_,l),onKeyDown:_=>h(_,l),onFocus:_=>m(_,l),onBlur:_=>g(_,l)},ownerState:n,className:w.monthButton});return v.jsx(WY,te({className:Pe(w.root,o),ownerState:n},E,{children:v.jsx(M,te({},R))}))});function KY(t){return Ke("MuiMonthCalendar",t)}He("MuiMonthCalendar",["root"]);const YY=["className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","autoFocus","onMonthFocus","hasFocus","onFocusedViewChange","monthsPerRow","timezone","gridLabelId","slots","slotProps"],GY=t=>{const{classes:e}=t;return Ue({root:["root"]},KY,e)};function JY(t,e){const n=Ut(),r=iu(),o=qt({props:t,name:e});return te({disableFuture:!1,disablePast:!1},o,{minDate:Ur(n,o.minDate,r.minDate),maxDate:Ur(n,o.maxDate,r.maxDate)})}const ZY=ye("div",{name:"MuiMonthCalendar",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"flex",flexWrap:"wrap",alignContent:"stretch",padding:"0 4px",width:zp,boxSizing:"border-box"}),k2=P.forwardRef(function(e,n){const r=JY(e,"MuiMonthCalendar"),{className:o,value:i,defaultValue:s,referenceDate:a,disabled:l,disableFuture:u,disablePast:f,maxDate:h,minDate:m,onChange:g,shouldDisableMonth:b,readOnly:y,autoFocus:S=!1,onMonthFocus:C,hasFocus:E,onFocusedViewChange:T,monthsPerRow:w=3,timezone:M,gridLabelId:R,slots:_,slotProps:I}=r,N=nt(r,YY),{value:O,handleValueChange:A,timezone:L}=cx({name:"MonthCalendar",timezone:M,value:i,defaultValue:s,referenceDate:a,onChange:g,valueManager:Ro}),z=Np(L),V=ao(),$=Ut(),F=P.useMemo(()=>Ro.getInitialReferenceValue({value:O,utils:$,props:r,timezone:L,referenceDate:a,granularity:wo.month}),[]),W=r,U=GY(W),G=P.useMemo(()=>$.getMonth(z),[$,z]),Y=P.useMemo(()=>O!=null?$.getMonth(O):null,[O,$]),[Z,me]=P.useState(()=>Y||$.getMonth(F)),[fe,pe]=ai({name:"MonthCalendar",state:"hasFocus",controlled:E,default:S??!1}),re=je(ee=>{pe(ee),T&&T(ee)}),ue=P.useCallback(ee=>{const se=$.startOfMonth(f&&$.isAfter(z,m)?z:m),le=$.startOfMonth(u&&$.isBefore(z,h)?z:h),ge=$.startOfMonth(ee);return $.isBefore(ge,se)||$.isAfter(ge,le)?!0:b?b(ge):!1},[u,f,h,m,z,b,$]),ae=je((ee,se)=>{if(y)return;const le=$.setMonth(O??F,se);A(le)}),K=je(ee=>{ue($.setMonth(O??F,ee))||(me(ee),re(!0),C&&C(ee))});P.useEffect(()=>{me(ee=>Y!==null&&ee!==Y?Y:ee)},[Y]);const Q=je((ee,se)=>{switch(ee.key){case"ArrowUp":K((12+se-3)%12),ee.preventDefault();break;case"ArrowDown":K((12+se+3)%12),ee.preventDefault();break;case"ArrowLeft":K((12+se+(V?1:-1))%12),ee.preventDefault();break;case"ArrowRight":K((12+se+(V?-1:1))%12),ee.preventDefault();break}}),ie=je((ee,se)=>{K(se)}),he=je((ee,se)=>{Z===se&&re(!1)});return v.jsx(ZY,te({ref:n,className:Pe(U.root,o),ownerState:W,role:"radiogroup","aria-labelledby":R},N,{children:rx($,O??F).map(ee=>{const se=$.getMonth(ee),le=$.format(ee,"monthShort"),ge=$.format(ee,"month"),we=se===Y,xe=l||ue(ee);return v.jsx(UY,{selected:we,value:se,onClick:ae,onKeyDown:Q,autoFocus:fe&&se===Z,disabled:xe,tabIndex:se===Z&&!xe?0:-1,onFocus:ie,onBlur:he,"aria-current":G===se?"date":void 0,"aria-label":ge,monthsPerRow:w,slots:_,slotProps:I,children:le},le)})}))});process.env.NODE_ENV!=="production"&&(k2.propTypes={autoFocus:c.bool,classes:c.object,className:c.string,defaultValue:c.object,disabled:c.bool,disableFuture:c.bool,disableHighlightToday:c.bool,disablePast:c.bool,gridLabelId:c.string,hasFocus:c.bool,maxDate:c.object,minDate:c.object,monthsPerRow:c.oneOf([3,4]),onChange:c.func,onFocusedViewChange:c.func,onMonthFocus:c.func,readOnly:c.bool,referenceDate:c.object,shouldDisableMonth:c.func,slotProps:c.object,slots:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),timezone:c.string,value:c.object});function XY(t){return Ke("MuiPickersYear",t)}const yd=He("MuiPickersYear",["root","yearButton","selected","disabled"]),QY=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","yearsPerRow","slots","slotProps"],eG=t=>{const{disabled:e,selected:n,classes:r}=t;return Ue({root:["root"],yearButton:["yearButton",e&&"disabled",n&&"selected"]},XY,r)},tG=ye("div",{name:"MuiPickersYear",slot:"Root",overridesResolver:(t,e)=>[e.root]})({display:"flex",alignItems:"center",justifyContent:"center",flexBasis:"33.3%",variants:[{props:{yearsPerRow:4},style:{flexBasis:"25%"}}]}),nG=ye("button",{name:"MuiPickersYear",slot:"YearButton",overridesResolver:(t,e)=>[e.yearButton,{[`&.${yd.disabled}`]:e.disabled},{[`&.${yd.selected}`]:e.selected}]})(({theme:t})=>te({color:"unset",backgroundColor:"transparent",border:0,outline:0},t.typography.subtitle1,{margin:"6px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.focusOpacity})`:$t(t.palette.action.active,t.palette.action.focusOpacity)},"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:$t(t.palette.action.active,t.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${yd.disabled}`]:{color:(t.vars||t).palette.text.secondary},[`&.${yd.selected}`]:{color:(t.vars||t).palette.primary.contrastText,backgroundColor:(t.vars||t).palette.primary.main,"&:focus, &:hover":{backgroundColor:(t.vars||t).palette.primary.dark}}})),rG=P.memo(function(e){const n=qt({props:e,name:"MuiPickersYear"}),{autoFocus:r,className:o,children:i,disabled:s,selected:a,value:l,tabIndex:u,onClick:f,onKeyDown:h,onFocus:m,onBlur:g,"aria-current":b,slots:y,slotProps:S}=n,C=nt(n,QY),E=P.useRef(null),T=eG(n);Rn(()=>{var R;r&&((R=E.current)==null||R.focus())},[r]);const w=(y==null?void 0:y.yearButton)??nG,M=Ct({elementType:w,externalSlotProps:S==null?void 0:S.yearButton,additionalProps:{children:i,disabled:s,tabIndex:u,ref:E,type:"button",role:"radio","aria-current":b,"aria-checked":a,onClick:R=>f(R,l),onKeyDown:R=>h(R,l),onFocus:R=>m(R,l),onBlur:R=>g(R,l)},ownerState:n,className:T.yearButton});return v.jsx(tG,te({className:Pe(T.root,o),ownerState:n},C,{children:v.jsx(w,te({},M))}))});function oG(t){return Ke("MuiYearCalendar",t)}He("MuiYearCalendar",["root"]);const iG=["autoFocus","className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","readOnly","shouldDisableYear","disableHighlightToday","onYearFocus","hasFocus","onFocusedViewChange","yearsOrder","yearsPerRow","timezone","gridLabelId","slots","slotProps"],sG=t=>{const{classes:e}=t;return Ue({root:["root"]},oG,e)};function aG(t,e){const n=Ut(),r=iu(),o=qt({props:t,name:e});return te({disablePast:!1,disableFuture:!1},o,{yearsPerRow:o.yearsPerRow??3,minDate:Ur(n,o.minDate,r.minDate),maxDate:Ur(n,o.maxDate,r.maxDate)})}const lG=ye("div",{name:"MuiYearCalendar",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"flex",flexDirection:"row",flexWrap:"wrap",overflowY:"auto",height:"100%",padding:"0 4px",width:zp,maxHeight:ZK,boxSizing:"border-box",position:"relative"}),M2=P.forwardRef(function(e,n){const r=aG(e,"MuiYearCalendar"),{autoFocus:o,className:i,value:s,defaultValue:a,referenceDate:l,disabled:u,disableFuture:f,disablePast:h,maxDate:m,minDate:g,onChange:b,readOnly:y,shouldDisableYear:S,onYearFocus:C,hasFocus:E,onFocusedViewChange:T,yearsOrder:w="asc",yearsPerRow:M,timezone:R,gridLabelId:_,slots:I,slotProps:N}=r,O=nt(r,iG),{value:A,handleValueChange:L,timezone:z}=cx({name:"YearCalendar",timezone:R,value:s,defaultValue:a,referenceDate:l,onChange:b,valueManager:Ro}),V=Np(z),$=ao(),F=Ut(),W=P.useMemo(()=>Ro.getInitialReferenceValue({value:A,utils:F,props:r,timezone:z,referenceDate:l,granularity:wo.year}),[]),U=r,G=sG(U),Y=P.useMemo(()=>F.getYear(V),[F,V]),Z=P.useMemo(()=>A!=null?F.getYear(A):null,[A,F]),[me,fe]=P.useState(()=>Z||F.getYear(W)),[pe,re]=ai({name:"YearCalendar",state:"hasFocus",controlled:E,default:o??!1}),ue=je(Me=>{re(Me),T&&T(Me)}),ae=P.useCallback(Me=>{if(h&&F.isBeforeYear(Me,V)||f&&F.isAfterYear(Me,V)||g&&F.isBeforeYear(Me,g)||m&&F.isAfterYear(Me,m))return!0;if(!S)return!1;const _e=F.startOfYear(Me);return S(_e)},[f,h,m,g,V,S,F]),K=je((Me,_e)=>{if(y)return;const Ve=F.setYear(A??W,_e);L(Ve)}),Q=je(Me=>{ae(F.setYear(A??W,Me))||(fe(Me),ue(!0),C==null||C(Me))});P.useEffect(()=>{fe(Me=>Z!==null&&Me!==Z?Z:Me)},[Z]);const ie=w!=="desc"?M*1:M*-1,he=$&&w==="asc"||!$&&w==="desc"?-1:1,ee=je((Me,_e)=>{switch(Me.key){case"ArrowUp":Q(_e-ie),Me.preventDefault();break;case"ArrowDown":Q(_e+ie),Me.preventDefault();break;case"ArrowLeft":Q(_e-he),Me.preventDefault();break;case"ArrowRight":Q(_e+he),Me.preventDefault();break}}),se=je((Me,_e)=>{Q(_e)}),le=je((Me,_e)=>{me===_e&&ue(!1)}),ge=P.useRef(null),we=kt(n,ge);P.useEffect(()=>{if(o||ge.current===null)return;const Me=ge.current.querySelector('[tabindex="0"]');if(!Me)return;const _e=Me.offsetHeight,Ve=Me.offsetTop,Ye=ge.current.clientHeight,Ie=ge.current.scrollTop,it=Ve+_e;_e>Ye||Ve<Ie||(ge.current.scrollTop=it-Ye/2-_e/2)},[o]);const xe=F.getYearRange([g,m]);return w==="desc"&&xe.reverse(),v.jsx(lG,te({ref:we,className:Pe(G.root,i),ownerState:U,role:"radiogroup","aria-labelledby":_},O,{children:xe.map(Me=>{const _e=F.getYear(Me),Ve=_e===Z,Ye=u||ae(Me);return v.jsx(rG,{selected:Ve,value:_e,onClick:K,onKeyDown:ee,autoFocus:pe&&_e===me,disabled:Ye,tabIndex:_e===me&&!Ye?0:-1,onFocus:se,onBlur:le,"aria-current":Y===_e?"date":void 0,yearsPerRow:M,slots:I,slotProps:N,children:F.format(Me,"year")},F.format(Me,"year"))})}))});process.env.NODE_ENV!=="production"&&(M2.propTypes={autoFocus:c.bool,classes:c.object,className:c.string,defaultValue:c.object,disabled:c.bool,disableFuture:c.bool,disableHighlightToday:c.bool,disablePast:c.bool,gridLabelId:c.string,hasFocus:c.bool,maxDate:c.object,minDate:c.object,onChange:c.func,onFocusedViewChange:c.func,onYearFocus:c.func,readOnly:c.bool,referenceDate:c.object,shouldDisableYear:c.func,slotProps:c.object,slots:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),timezone:c.string,value:c.object,yearsOrder:c.oneOf(["asc","desc"]),yearsPerRow:c.oneOf([3,4])});const cG=t=>Ke("MuiPickersCalendarHeader",t),uG=He("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]);function dG(t){return Ke("MuiPickersArrowSwitcher",t)}He("MuiPickersArrowSwitcher",["root","spacer","button","previousIconButton","nextIconButton","leftArrowIcon","rightArrowIcon"]);const fG=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel","labelId"],pG=["ownerState"],hG=["ownerState"],mG=ye("div",{name:"MuiPickersArrowSwitcher",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"flex"}),gG=ye("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer",overridesResolver:(t,e)=>e.spacer})(({theme:t})=>({width:t.spacing(3)})),fE=ye(dl,{name:"MuiPickersArrowSwitcher",slot:"Button",overridesResolver:(t,e)=>e.button})({variants:[{props:{hidden:!0},style:{visibility:"hidden"}}]}),yG=t=>{const{classes:e}=t;return Ue({root:["root"],spacer:["spacer"],button:["button"],previousIconButton:["previousIconButton"],nextIconButton:["nextIconButton"],leftArrowIcon:["leftArrowIcon"],rightArrowIcon:["rightArrowIcon"]},dG,e)},bG=P.forwardRef(function(e,n){const r=ao(),o=qt({props:e,name:"MuiPickersArrowSwitcher"}),{children:i,className:s,slots:a,slotProps:l,isNextDisabled:u,isNextHidden:f,onGoToNext:h,nextLabel:m,isPreviousDisabled:g,isPreviousHidden:b,onGoToPrevious:y,previousLabel:S,labelId:C}=o,E=nt(o,fG),T=o,w=yG(T),M={isDisabled:u,isHidden:f,goTo:h,label:m},R={isDisabled:g,isHidden:b,goTo:y,label:S},_=(a==null?void 0:a.previousIconButton)??fE,I=Ct({elementType:_,externalSlotProps:l==null?void 0:l.previousIconButton,additionalProps:{size:"medium",title:R.label,"aria-label":R.label,disabled:R.isDisabled,edge:"end",onClick:R.goTo},ownerState:te({},T,{hidden:R.isHidden}),className:Pe(w.button,w.previousIconButton)}),N=(a==null?void 0:a.nextIconButton)??fE,O=Ct({elementType:N,externalSlotProps:l==null?void 0:l.nextIconButton,additionalProps:{size:"medium",title:M.label,"aria-label":M.label,disabled:M.isDisabled,edge:"start",onClick:M.goTo},ownerState:te({},T,{hidden:M.isHidden}),className:Pe(w.button,w.nextIconButton)}),A=(a==null?void 0:a.leftArrowIcon)??j8,L=Ct({elementType:A,externalSlotProps:l==null?void 0:l.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:T,className:w.leftArrowIcon}),z=nt(L,pG),V=(a==null?void 0:a.rightArrowIcon)??$8,$=Ct({elementType:V,externalSlotProps:l==null?void 0:l.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:T,className:w.rightArrowIcon}),F=nt($,hG);return v.jsxs(mG,te({ref:n,className:Pe(w.root,s),ownerState:T},E,{children:[v.jsx(_,te({},I,{children:r?v.jsx(V,te({},F)):v.jsx(A,te({},z))})),i?v.jsx(Qi,{variant:"subtitle1",component:"span",id:C,children:i}):v.jsx(gG,{className:w.spacer,ownerState:T}),v.jsx(N,te({},O,{children:r?v.jsx(A,te({},z)):v.jsx(V,te({},F))}))]}))});function vG(t,{disableFuture:e,maxDate:n,timezone:r}){const o=Ut();return P.useMemo(()=>{const i=o.date(void 0,r),s=o.startOfMonth(e&&o.isBefore(i,n)?i:n);return!o.isAfter(s,t)},[e,n,t,o,r])}function xG(t,{disablePast:e,minDate:n,timezone:r}){const o=Ut();return P.useMemo(()=>{const i=o.date(void 0,r),s=o.startOfMonth(e&&o.isAfter(i,n)?i:n);return!o.isBefore(s,t)},[e,n,t,o,r])}const SG=["slots","slotProps","currentMonth","disabled","disableFuture","disablePast","maxDate","minDate","onMonthChange","onViewChange","view","reduceAnimations","views","labelId","className","timezone","format"],CG=["ownerState"],wG=t=>{const{classes:e}=t;return Ue({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},cG,e)},TG=ye("div",{name:"MuiPickersCalendarHeader",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"flex",alignItems:"center",marginTop:12,marginBottom:4,paddingLeft:24,paddingRight:12,maxHeight:40,minHeight:40}),EG=ye("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer",overridesResolver:(t,e)=>e.labelContainer})(({theme:t})=>te({display:"flex",overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},t.typography.body1,{fontWeight:t.typography.fontWeightMedium})),kG=ye("div",{name:"MuiPickersCalendarHeader",slot:"Label",overridesResolver:(t,e)=>e.label})({marginRight:6}),MG=ye(dl,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton",overridesResolver:(t,e)=>e.switchViewButton})({marginRight:"auto",variants:[{props:{view:"year"},style:{[`.${uG.switchViewIcon}`]:{transform:"rotate(180deg)"}}}]}),OG=ye(L8,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon",overridesResolver:(t,e)=>e.switchViewIcon})(({theme:t})=>({willChange:"transform",transition:t.transitions.create("transform"),transform:"rotate(0deg)"})),O2=P.forwardRef(function(e,n){const r=fi(),o=Ut(),i=qt({props:e,name:"MuiPickersCalendarHeader"}),{slots:s,slotProps:a,currentMonth:l,disabled:u,disableFuture:f,disablePast:h,maxDate:m,minDate:g,onMonthChange:b,onViewChange:y,view:S,reduceAnimations:C,views:E,labelId:T,className:w,timezone:M,format:R=`${o.formats.month} ${o.formats.year}`}=i,_=nt(i,SG),I=i,N=wG(i),O=(s==null?void 0:s.switchViewButton)??MG,A=Ct({elementType:O,externalSlotProps:a==null?void 0:a.switchViewButton,additionalProps:{size:"small","aria-label":r.calendarViewSwitchingButtonAriaLabel(S)},ownerState:I,className:N.switchViewButton}),L=(s==null?void 0:s.switchViewIcon)??OG,z=Ct({elementType:L,externalSlotProps:a==null?void 0:a.switchViewIcon,ownerState:I,className:N.switchViewIcon}),V=nt(z,CG),$=()=>b(o.addMonths(l,1),"left"),F=()=>b(o.addMonths(l,-1),"right"),W=vG(l,{disableFuture:f,maxDate:m,timezone:M}),U=xG(l,{disablePast:h,minDate:g,timezone:M}),G=()=>{if(!(E.length===1||!y||u))if(E.length===2)y(E.find(Z=>Z!==S)||E[0]);else{const Z=E.indexOf(S)!==0?0:1;y(E[Z])}};if(E.length===1&&E[0]==="year")return null;const Y=o.formatByString(l,R);return v.jsxs(TG,te({},_,{ownerState:I,className:Pe(N.root,w),ref:n,children:[v.jsxs(EG,{role:"presentation",onClick:G,ownerState:I,"aria-live":"polite",className:N.labelContainer,children:[v.jsx(S2,{reduceAnimations:C,transKey:Y,children:v.jsx(kG,{id:T,ownerState:I,className:N.label,children:Y})}),E.length>1&&!u&&v.jsx(O,te({},A,{children:v.jsx(L,te({},V))}))]}),v.jsx(qi,{in:S==="day",children:v.jsx(bG,{slots:s,slotProps:a,onGoToPrevious:F,isPreviousDisabled:U,previousLabel:r.previousMonth,onGoToNext:$,isNextDisabled:W,nextLabel:r.nextMonth})})]}))});process.env.NODE_ENV!=="production"&&(O2.propTypes={classes:c.object,className:c.string,currentMonth:c.object.isRequired,disabled:c.bool,disableFuture:c.bool,disablePast:c.bool,format:c.string,labelId:c.string,maxDate:c.object.isRequired,minDate:c.object.isRequired,onMonthChange:c.func.isRequired,onViewChange:c.func,reduceAnimations:c.bool.isRequired,slotProps:c.object,slots:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),timezone:c.string.isRequired,view:c.oneOf(["day","month","year"]).isRequired,views:c.arrayOf(c.oneOf(["day","month","year"]).isRequired).isRequired});const RG=ye("div")({overflow:"hidden",width:zp,maxHeight:Tx,display:"flex",flexDirection:"column",margin:"0 auto"}),AG=t=>Ke("MuiDateCalendar",t);He("MuiDateCalendar",["root","viewTransitionContainer"]);const IG=["autoFocus","onViewChange","value","defaultValue","referenceDate","disableFuture","disablePast","onChange","onYearChange","onMonthChange","reduceAnimations","shouldDisableDate","shouldDisableMonth","shouldDisableYear","view","views","openTo","className","disabled","readOnly","minDate","maxDate","disableHighlightToday","focusedView","onFocusedViewChange","showDaysOutsideCurrentMonth","fixedWeekNumber","dayOfWeekFormatter","slots","slotProps","loading","renderLoading","displayWeekNumber","yearsOrder","yearsPerRow","monthsPerRow","timezone"],DG=t=>{const{classes:e}=t;return Ue({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},AG,e)};function PG(t,e){const n=Ut(),r=iu(),o=l2(),i=qt({props:t,name:e});return te({},i,{loading:i.loading??!1,disablePast:i.disablePast??!1,disableFuture:i.disableFuture??!1,openTo:i.openTo??"day",views:i.views??["year","day"],reduceAnimations:i.reduceAnimations??o,renderLoading:i.renderLoading??(()=>v.jsx("span",{children:"..."})),minDate:Ur(n,i.minDate,r.minDate),maxDate:Ur(n,i.maxDate,r.maxDate)})}const _G=ye(RG,{name:"MuiDateCalendar",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"flex",flexDirection:"column",height:Tx}),NG=ye(S2,{name:"MuiDateCalendar",slot:"ViewTransitionContainer",overridesResolver:(t,e)=>e.viewTransitionContainer})({}),R2=P.forwardRef(function(e,n){const r=Ut(),o=_o(),i=PG(e,"MuiDateCalendar"),{autoFocus:s,onViewChange:a,value:l,defaultValue:u,referenceDate:f,disableFuture:h,disablePast:m,onChange:g,onYearChange:b,onMonthChange:y,reduceAnimations:S,shouldDisableDate:C,shouldDisableMonth:E,shouldDisableYear:T,view:w,views:M,openTo:R,className:_,disabled:I,readOnly:N,minDate:O,maxDate:A,disableHighlightToday:L,focusedView:z,onFocusedViewChange:V,showDaysOutsideCurrentMonth:$,fixedWeekNumber:F,dayOfWeekFormatter:W,slots:U,slotProps:G,loading:Y,renderLoading:Z,displayWeekNumber:me,yearsOrder:fe,yearsPerRow:pe,monthsPerRow:re,timezone:ue}=i,ae=nt(i,IG),{value:K,handleValueChange:Q,timezone:ie}=cx({name:"DateCalendar",timezone:ue,value:l,defaultValue:u,referenceDate:f,onChange:g,valueManager:Ro}),{view:he,setView:ee,focusedView:se,setFocusedView:le,goToNextView:ge,setValueAndGoToNextView:we}=c2({view:w,views:M,openTo:R,onChange:Q,onViewChange:a,autoFocus:s,focusedView:z,onFocusedViewChange:V}),{referenceDate:xe,calendarState:Me,changeFocusedDay:_e,changeMonth:Ve,handleChangeMonth:Ye,isDateDisabled:Ie,onMonthSwitchingAnimationEnd:it}=dY({value:K,referenceDate:f,reduceAnimations:S,onMonthChange:y,minDate:O,maxDate:A,shouldDisableDate:C,disablePast:m,disableFuture:h,timezone:ie}),vt=I&&K||O,Yt=I&&K||A,yn=`${o}-grid-label`,tn=se!==null,Dt=(U==null?void 0:U.calendarHeader)??O2,Sn=Ct({elementType:Dt,externalSlotProps:G==null?void 0:G.calendarHeader,additionalProps:{views:M,view:he,currentMonth:Me.currentMonth,onViewChange:ee,onMonthChange:(et,Ot)=>Ye({newMonth:et,direction:Ot}),minDate:vt,maxDate:Yt,disabled:I,disablePast:m,disableFuture:h,reduceAnimations:S,timezone:ie,labelId:yn},ownerState:i}),jn=je(et=>{const Ot=r.startOfMonth(et),Kn=r.endOfMonth(et),or=Ie(et)?lc({utils:r,date:et,minDate:r.isBefore(O,Ot)?Ot:O,maxDate:r.isAfter(A,Kn)?Kn:A,disablePast:m,disableFuture:h,isDateDisabled:Ie,timezone:ie}):et;or?(we(or,"finish"),y==null||y(Ot)):(ge(),Ve(Ot)),_e(or,!0)}),ut=je(et=>{const Ot=r.startOfYear(et),Kn=r.endOfYear(et),or=Ie(et)?lc({utils:r,date:et,minDate:r.isBefore(O,Ot)?Ot:O,maxDate:r.isAfter(A,Kn)?Kn:A,disablePast:m,disableFuture:h,isDateDisabled:Ie,timezone:ie}):et;or?(we(or,"finish"),b==null||b(or)):(ge(),Ve(Ot)),_e(or,!0)}),An=je(et=>Q(et&&gf(r,et,K??xe),"finish",he));P.useEffect(()=>{K!=null&&r.isValid(K)&&Ve(K)},[K]);const Vt=i,de=DG(Vt),Ne={disablePast:m,disableFuture:h,maxDate:A,minDate:O},Ee={disableHighlightToday:L,readOnly:N,disabled:I,timezone:ie,gridLabelId:yn,slots:U,slotProps:G},Le=P.useRef(he);P.useEffect(()=>{Le.current!==he&&(se===Le.current&&le(he,!0),Le.current=he)},[se,le,he]);const We=P.useMemo(()=>[K],[K]);return v.jsxs(_G,te({ref:n,className:Pe(de.root,_),ownerState:Vt},ae,{children:[v.jsx(Dt,te({},Sn,{slots:U,slotProps:G})),v.jsx(NG,{reduceAnimations:S,className:de.viewTransitionContainer,transKey:he,ownerState:Vt,children:v.jsxs("div",{children:[he==="year"&&v.jsx(M2,te({},Ne,Ee,{value:K,onChange:ut,shouldDisableYear:T,hasFocus:tn,onFocusedViewChange:et=>le("year",et),yearsOrder:fe,yearsPerRow:pe,referenceDate:xe})),he==="month"&&v.jsx(k2,te({},Ne,Ee,{hasFocus:tn,className:_,value:K,onChange:jn,shouldDisableMonth:E,onFocusedViewChange:et=>le("month",et),monthsPerRow:re,referenceDate:xe})),he==="day"&&v.jsx(BY,te({},Me,Ne,Ee,{onMonthSwitchingAnimationEnd:it,onFocusedDayChange:_e,reduceAnimations:S,selectedDays:We,onSelectedDaysChange:An,shouldDisableDate:C,shouldDisableMonth:E,shouldDisableYear:T,hasFocus:tn,onFocusedViewChange:et=>le("day",et),showDaysOutsideCurrentMonth:$,fixedWeekNumber:F,dayOfWeekFormatter:W,displayWeekNumber:me,loading:Y,renderLoading:Z}))]})})]}))});process.env.NODE_ENV!=="production"&&(R2.propTypes={autoFocus:c.bool,classes:c.object,className:c.string,dayOfWeekFormatter:c.func,defaultValue:c.object,disabled:c.bool,disableFuture:c.bool,disableHighlightToday:c.bool,disablePast:c.bool,displayWeekNumber:c.bool,fixedWeekNumber:c.number,focusedView:c.oneOf(["day","month","year"]),loading:c.bool,maxDate:c.object,minDate:c.object,monthsPerRow:c.oneOf([3,4]),onChange:c.func,onFocusedViewChange:c.func,onMonthChange:c.func,onViewChange:c.func,onYearChange:c.func,openTo:c.oneOf(["day","month","year"]),readOnly:c.bool,reduceAnimations:c.bool,referenceDate:c.object,renderLoading:c.func,shouldDisableDate:c.func,shouldDisableMonth:c.func,shouldDisableYear:c.func,showDaysOutsideCurrentMonth:c.bool,slotProps:c.object,slots:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),timezone:c.string,value:c.object,view:c.oneOf(["day","month","year"]),views:c.arrayOf(c.oneOf(["day","month","year"]).isRequired),yearsOrder:c.oneOf(["asc","desc"]),yearsPerRow:c.oneOf([3,4])});const Ha=({view:t,onViewChange:e,views:n,focusedView:r,onFocusedViewChange:o,value:i,defaultValue:s,referenceDate:a,onChange:l,className:u,classes:f,disableFuture:h,disablePast:m,minDate:g,maxDate:b,shouldDisableDate:y,shouldDisableMonth:S,shouldDisableYear:C,reduceAnimations:E,onMonthChange:T,monthsPerRow:w,onYearChange:M,yearsOrder:R,yearsPerRow:_,slots:I,slotProps:N,loading:O,renderLoading:A,disableHighlightToday:L,readOnly:z,disabled:V,showDaysOutsideCurrentMonth:$,dayOfWeekFormatter:F,sx:W,autoFocus:U,fixedWeekNumber:G,displayWeekNumber:Y,timezone:Z})=>v.jsx(R2,{view:t,onViewChange:e,views:n.filter(LT),focusedView:r&&LT(r)?r:null,onFocusedViewChange:o,value:i,defaultValue:s,referenceDate:a,onChange:l,className:u,classes:f,disableFuture:h,disablePast:m,minDate:g,maxDate:b,shouldDisableDate:y,shouldDisableMonth:S,shouldDisableYear:C,reduceAnimations:E,onMonthChange:T,monthsPerRow:w,onYearChange:M,yearsOrder:R,yearsPerRow:_,slots:I,slotProps:N,loading:O,renderLoading:A,disableHighlightToday:L,readOnly:z,disabled:V,showDaysOutsideCurrentMonth:$,dayOfWeekFormatter:F,sx:W,autoFocus:U,fixedWeekNumber:G,displayWeekNumber:Y,timezone:Z}),A2=P.forwardRef(function(e,n){var u,f;const r=fi(),o=Ut(),i=YI(e,"MuiDesktopDatePicker"),s=te({day:Ha,month:Ha,year:Ha},i.viewRenderers),a=te({},i,{viewRenderers:s,format:ox(o,i,!1),yearsPerRow:i.yearsPerRow??4,slots:te({openPickerIcon:F8,field:$p},i.slots),slotProps:te({},i.slotProps,{field:h=>{var m;return te({},pp((m=i.slotProps)==null?void 0:m.field,h),DI(i),{ref:n})},toolbar:te({hidden:!0},(u=i.slotProps)==null?void 0:u.toolbar)})}),{renderPicker:l}=cY({props:a,valueManager:Ro,valueType:"date",getOpenDialogAriaText:PI({utils:o,formatKey:"fullDate",contextTranslation:r.openDatePickerDialogue,propsTranslation:(f=a.localeText)==null?void 0:f.openDatePickerDialogue}),validator:ou});return l()});A2.propTypes={autoFocus:c.bool,className:c.string,closeOnSelect:c.bool,dayOfWeekFormatter:c.func,defaultValue:c.object,disabled:c.bool,disableFuture:c.bool,disableHighlightToday:c.bool,disableOpenPicker:c.bool,disablePast:c.bool,displayWeekNumber:c.bool,enableAccessibleFieldDOMStructure:c.any,fixedWeekNumber:c.number,format:c.string,formatDensity:c.oneOf(["dense","spacious"]),inputRef:mn,label:c.node,loading:c.bool,localeText:c.object,maxDate:c.object,minDate:c.object,monthsPerRow:c.oneOf([3,4]),name:c.string,onAccept:c.func,onChange:c.func,onClose:c.func,onError:c.func,onMonthChange:c.func,onOpen:c.func,onSelectedSectionsChange:c.func,onViewChange:c.func,onYearChange:c.func,open:c.bool,openTo:c.oneOf(["day","month","year"]),orientation:c.oneOf(["landscape","portrait"]),readOnly:c.bool,reduceAnimations:c.bool,referenceDate:c.object,renderLoading:c.func,selectedSections:c.oneOfType([c.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),c.number]),shouldDisableDate:c.func,shouldDisableMonth:c.func,shouldDisableYear:c.func,showDaysOutsideCurrentMonth:c.bool,slotProps:c.object,slots:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),timezone:c.string,value:c.object,view:c.oneOf(["day","month","year"]),viewRenderers:c.shape({day:c.func,month:c.func,year:c.func}),views:c.arrayOf(c.oneOf(["day","month","year"]).isRequired),yearsOrder:c.oneOf(["asc","desc"]),yearsPerRow:c.oneOf([3,4])};function LG(t){return Ke("MuiDialogContent",t)}He("MuiDialogContent",["root","dividers"]);const jG=He("MuiDialogTitle",["root"]),$G=t=>{const{classes:e,dividers:n}=t;return Ue({root:["root",n&&"dividers"]},LG,e)},FG=ye("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.dividers&&e.dividers]}})(It(({theme:t})=>({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px",variants:[{props:({ownerState:e})=>e.dividers,style:{padding:"16px 24px",borderTop:`1px solid ${(t.vars||t).palette.divider}`,borderBottom:`1px solid ${(t.vars||t).palette.divider}`}},{props:({ownerState:e})=>!e.dividers,style:{[`.${jG.root} + &`]:{paddingTop:0}}}]}))),I2=P.forwardRef(function(e,n){const r=xt({props:e,name:"MuiDialogContent"}),{className:o,dividers:i=!1,...s}=r,a={...r,dividers:i},l=$G(a);return v.jsx(FG,{className:Pe(l.root,o),ownerState:a,ref:n,...s})});process.env.NODE_ENV!=="production"&&(I2.propTypes={children:c.node,classes:c.object,className:c.string,dividers:c.bool,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object])});function BG(t){return Ke("MuiDialog",t)}const dc=He("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),D2=P.createContext({});process.env.NODE_ENV!=="production"&&(D2.displayName="DialogContext");const VG=ye(X0,{name:"MuiDialog",slot:"Backdrop",overrides:(t,e)=>e.backdrop})({zIndex:-1}),zG=t=>{const{classes:e,scroll:n,maxWidth:r,fullWidth:o,fullScreen:i}=t,s={root:["root"],container:["container",`scroll${Re(n)}`],paper:["paper",`paperScroll${Re(n)}`,`paperWidth${Re(String(r))}`,o&&"paperFullWidth",i&&"paperFullScreen"]};return Ue(s,BG,e)},HG=ye(Q0,{name:"MuiDialog",slot:"Root",overridesResolver:(t,e)=>e.root})({"@media print":{position:"absolute !important"}}),WG=ye("div",{name:"MuiDialog",slot:"Container",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.container,e[`scroll${Re(n.scroll)}`]]}})({height:"100%","@media print":{height:"auto"},outline:0,variants:[{props:{scroll:"paper"},style:{display:"flex",justifyContent:"center",alignItems:"center"}},{props:{scroll:"body"},style:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}}}]}),qG=ye(ul,{name:"MuiDialog",slot:"Paper",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.paper,e[`scrollPaper${Re(n.scroll)}`],e[`paperWidth${Re(String(n.maxWidth))}`],n.fullWidth&&e.paperFullWidth,n.fullScreen&&e.paperFullScreen]}})(It(({theme:t})=>({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"},variants:[{props:{scroll:"paper"},style:{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"}},{props:{scroll:"body"},style:{display:"inline-block",verticalAlign:"middle",textAlign:"initial"}},{props:({ownerState:e})=>!e.maxWidth,style:{maxWidth:"calc(100% - 64px)"}},{props:{maxWidth:"xs"},style:{maxWidth:t.breakpoints.unit==="px"?Math.max(t.breakpoints.values.xs,444):`max(${t.breakpoints.values.xs}${t.breakpoints.unit}, 444px)`,[`&.${dc.paperScrollBody}`]:{[t.breakpoints.down(Math.max(t.breakpoints.values.xs,444)+32*2)]:{maxWidth:"calc(100% - 64px)"}}}},...Object.keys(t.breakpoints.values).filter(e=>e!=="xs").map(e=>({props:{maxWidth:e},style:{maxWidth:`${t.breakpoints.values[e]}${t.breakpoints.unit}`,[`&.${dc.paperScrollBody}`]:{[t.breakpoints.down(t.breakpoints.values[e]+32*2)]:{maxWidth:"calc(100% - 64px)"}}}})),{props:({ownerState:e})=>e.fullWidth,style:{width:"calc(100% - 64px)"}},{props:({ownerState:e})=>e.fullScreen,style:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${dc.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}}]}))),P2=P.forwardRef(function(e,n){const r=xt({props:e,name:"MuiDialog"}),o=Zi(),i={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{"aria-describedby":s,"aria-labelledby":a,"aria-modal":l=!0,BackdropComponent:u,BackdropProps:f,children:h,className:m,disableEscapeKeyDown:g=!1,fullScreen:b=!1,fullWidth:y=!1,maxWidth:S="sm",onBackdropClick:C,onClick:E,onClose:T,open:w,PaperComponent:M=ul,PaperProps:R={},scroll:_="paper",slots:I={},slotProps:N={},TransitionComponent:O=qi,transitionDuration:A=i,TransitionProps:L,...z}=r,V={...r,disableEscapeKeyDown:g,fullScreen:b,fullWidth:y,maxWidth:S,scroll:_},$=zG(V),F=P.useRef(),W=le=>{F.current=le.target===le.currentTarget},U=le=>{E&&E(le),F.current&&(F.current=null,C&&C(le),T&&T(le,"backdropClick"))},G=_o(a),Y=P.useMemo(()=>({titleId:G}),[G]),Z={transition:O,...I},me={transition:L,paper:R,backdrop:f,...N},fe={slots:Z,slotProps:me},[pe,re]=Ft("root",{elementType:HG,shouldForwardComponentProp:!0,externalForwardedProps:fe,ownerState:V,className:Pe($.root,m),ref:n}),[ue,ae]=Ft("backdrop",{elementType:VG,shouldForwardComponentProp:!0,externalForwardedProps:fe,ownerState:V}),[K,Q]=Ft("paper",{elementType:qG,shouldForwardComponentProp:!0,externalForwardedProps:fe,ownerState:V,className:Pe($.paper,R.className)}),[ie,he]=Ft("container",{elementType:WG,externalForwardedProps:fe,ownerState:V,className:Pe($.container)}),[ee,se]=Ft("transition",{elementType:qi,externalForwardedProps:fe,ownerState:V,additionalProps:{appear:!0,in:w,timeout:A,role:"presentation"}});return v.jsx(pe,{closeAfterTransition:!0,slots:{backdrop:ue},slotProps:{backdrop:{transitionDuration:A,as:u,...ae}},disableEscapeKeyDown:g,onClose:T,open:w,onClick:U,...re,...z,children:v.jsx(ee,{...se,children:v.jsx(ie,{onMouseDown:W,...he,children:v.jsx(K,{as:M,elevation:24,role:"dialog","aria-describedby":s,"aria-labelledby":G,"aria-modal":l,...Q,children:v.jsx(D2.Provider,{value:Y,children:h})})})})})});process.env.NODE_ENV!=="production"&&(P2.propTypes={"aria-describedby":c.string,"aria-labelledby":c.string,"aria-modal":c.oneOfType([c.oneOf(["false","true"]),c.bool]),BackdropComponent:c.elementType,BackdropProps:c.object,children:c.node,classes:c.object,className:c.string,disableEscapeKeyDown:c.bool,fullScreen:c.bool,fullWidth:c.bool,maxWidth:c.oneOfType([c.oneOf(["xs","sm","md","lg","xl",!1]),c.string]),onBackdropClick:c.func,onClick:c.func,onClose:c.func,open:c.bool.isRequired,PaperComponent:c.elementType,PaperProps:c.object,scroll:c.oneOf(["body","paper"]),slotProps:c.shape({backdrop:c.oneOfType([c.func,c.object]),container:c.oneOfType([c.func,c.object]),paper:c.oneOfType([c.func,c.object]),root:c.oneOfType([c.func,c.object]),transition:c.oneOfType([c.func,c.object])}),slots:c.shape({backdrop:c.elementType,container:c.elementType,paper:c.elementType,root:c.elementType,transition:c.elementType}),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),TransitionComponent:c.elementType,transitionDuration:c.oneOfType([c.number,c.shape({appear:c.number,enter:c.number,exit:c.number})]),TransitionProps:c.object});const UG=ye(P2)({[`& .${dc.container}`]:{outline:0},[`& .${dc.paper}`]:{outline:0,minWidth:zp}}),KG=ye(I2)({"&:first-of-type":{padding:0}});function YG(t){const{children:e,onDismiss:n,open:r,slots:o,slotProps:i}=t,s=(o==null?void 0:o.dialog)??UG,a=(o==null?void 0:o.mobileTransition)??qi;return v.jsx(s,te({open:r,onClose:n},i==null?void 0:i.dialog,{TransitionComponent:a,TransitionProps:i==null?void 0:i.mobileTransition,PaperComponent:o==null?void 0:o.mobilePaper,PaperProps:i==null?void 0:i.mobilePaper,children:v.jsx(KG,{children:e})}))}const GG=["props","getOpenDialogAriaText"],JG=t=>{var Z;let{props:e,getOpenDialogAriaText:n}=t,r=nt(t,GG);const{slots:o,slotProps:i,className:s,sx:a,format:l,formatDensity:u,enableAccessibleFieldDOMStructure:f,selectedSections:h,onSelectedSectionsChange:m,timezone:g,name:b,label:y,inputRef:S,readOnly:C,disabled:E,localeText:T}=e,w=P.useRef(null),M=_o(),R=((Z=i==null?void 0:i.toolbar)==null?void 0:Z.hidden)??!1,{open:_,actions:I,layoutProps:N,renderCurrentView:O,fieldProps:A,contextValue:L}=u2(te({},r,{props:e,fieldRef:w,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"mobile"})),z=o.field,V=Ct({elementType:z,externalSlotProps:i==null?void 0:i.field,additionalProps:te({},A,R&&{id:M},!(E||C)&&{onClick:I.onOpen,onKeyDown:X9(I.onOpen)},{readOnly:C??!0,disabled:E,className:s,sx:a,format:l,formatDensity:u,enableAccessibleFieldDOMStructure:f,selectedSections:h,onSelectedSectionsChange:m,timezone:g,label:y,name:b},S?{inputRef:S}:{}),ownerState:e});V.inputProps=te({},V.inputProps,{"aria-label":n(A.value)});const $=te({textField:o.textField},V.slots),F=o.layout??Ex;let W=M;R&&(y?W=`${M}-label`:W=void 0);const U=te({},i,{toolbar:te({},i==null?void 0:i.toolbar,{titleId:M}),mobilePaper:te({"aria-labelledby":W},i==null?void 0:i.mobilePaper)}),G=kt(w,V.unstableFieldRef);return{renderPicker:()=>v.jsxs($I,{contextValue:L,localeText:T,children:[v.jsx(z,te({},V,{slots:$,slotProps:U,unstableFieldRef:G})),v.jsx(YG,te({},I,{open:_,slots:o,slotProps:U,children:v.jsx(F,te({},N,U==null?void 0:U.layout,{slots:o,slotProps:U,children:O()}))}))]})}},_2=P.forwardRef(function(e,n){var u,f;const r=fi(),o=Ut(),i=YI(e,"MuiMobileDatePicker"),s=te({day:Ha,month:Ha,year:Ha},i.viewRenderers),a=te({},i,{viewRenderers:s,format:ox(o,i,!1),slots:te({field:$p},i.slots),slotProps:te({},i.slotProps,{field:h=>{var m;return te({},pp((m=i.slotProps)==null?void 0:m.field,h),DI(i),{ref:n})},toolbar:te({hidden:!1},(u=i.slotProps)==null?void 0:u.toolbar)})}),{renderPicker:l}=JG({props:a,valueManager:Ro,valueType:"date",getOpenDialogAriaText:PI({utils:o,formatKey:"fullDate",contextTranslation:r.openDatePickerDialogue,propsTranslation:(f=a.localeText)==null?void 0:f.openDatePickerDialogue}),validator:ou});return l()});_2.propTypes={autoFocus:c.bool,className:c.string,closeOnSelect:c.bool,dayOfWeekFormatter:c.func,defaultValue:c.object,disabled:c.bool,disableFuture:c.bool,disableHighlightToday:c.bool,disableOpenPicker:c.bool,disablePast:c.bool,displayWeekNumber:c.bool,enableAccessibleFieldDOMStructure:c.any,fixedWeekNumber:c.number,format:c.string,formatDensity:c.oneOf(["dense","spacious"]),inputRef:mn,label:c.node,loading:c.bool,localeText:c.object,maxDate:c.object,minDate:c.object,monthsPerRow:c.oneOf([3,4]),name:c.string,onAccept:c.func,onChange:c.func,onClose:c.func,onError:c.func,onMonthChange:c.func,onOpen:c.func,onSelectedSectionsChange:c.func,onViewChange:c.func,onYearChange:c.func,open:c.bool,openTo:c.oneOf(["day","month","year"]),orientation:c.oneOf(["landscape","portrait"]),readOnly:c.bool,reduceAnimations:c.bool,referenceDate:c.object,renderLoading:c.func,selectedSections:c.oneOfType([c.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),c.number]),shouldDisableDate:c.func,shouldDisableMonth:c.func,shouldDisableYear:c.func,showDaysOutsideCurrentMonth:c.bool,slotProps:c.object,slots:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),timezone:c.string,value:c.object,view:c.oneOf(["day","month","year"]),viewRenderers:c.shape({day:c.func,month:c.func,year:c.func}),views:c.arrayOf(c.oneOf(["day","month","year"]).isRequired),yearsOrder:c.oneOf(["asc","desc"]),yearsPerRow:c.oneOf([3,4])};const ZG=["desktopModeMediaQuery"],N2=P.forwardRef(function(e,n){const r=qt({props:e,name:"MuiDatePicker"}),{desktopModeMediaQuery:o=Q9}=r,i=nt(r,ZG);return UI(o,{defaultMatches:!0})?v.jsx(A2,te({ref:n},i)):v.jsx(_2,te({ref:n},i))});process.env.NODE_ENV!=="production"&&(N2.propTypes={autoFocus:c.bool,className:c.string,closeOnSelect:c.bool,dayOfWeekFormatter:c.func,defaultValue:c.object,desktopModeMediaQuery:c.string,disabled:c.bool,disableFuture:c.bool,disableHighlightToday:c.bool,disableOpenPicker:c.bool,disablePast:c.bool,displayWeekNumber:c.bool,enableAccessibleFieldDOMStructure:c.any,fixedWeekNumber:c.number,format:c.string,formatDensity:c.oneOf(["dense","spacious"]),inputRef:mn,label:c.node,loading:c.bool,localeText:c.object,maxDate:c.object,minDate:c.object,monthsPerRow:c.oneOf([3,4]),name:c.string,onAccept:c.func,onChange:c.func,onClose:c.func,onError:c.func,onMonthChange:c.func,onOpen:c.func,onSelectedSectionsChange:c.func,onViewChange:c.func,onYearChange:c.func,open:c.bool,openTo:c.oneOf(["day","month","year"]),orientation:c.oneOf(["landscape","portrait"]),readOnly:c.bool,reduceAnimations:c.bool,referenceDate:c.object,renderLoading:c.func,selectedSections:c.oneOfType([c.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),c.number]),shouldDisableDate:c.func,shouldDisableMonth:c.func,shouldDisableYear:c.func,showDaysOutsideCurrentMonth:c.bool,slotProps:c.object,slots:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),timezone:c.string,value:c.object,view:c.oneOf(["day","month","year"]),viewRenderers:c.shape({day:c.func,month:c.func,year:c.func}),views:c.arrayOf(c.oneOf(["day","month","year"]).isRequired),yearsOrder:c.oneOf(["asc","desc"]),yearsPerRow:c.oneOf([3,4])});const XG={invalidDate:"Date selected is invalid",minDate:"Date selected is too far in the past",maxDate:"Date selected is too far in the future",disableFuture:"Date selected cannot be in the future",disablePast:"Date selected cannot be in the past"},xf=t=>{var I;const{name:e,label:n=kn(e),required:r=!1,readOnly:o=!1,format:i="MM/DD/YYYY",errorMessages:s,isDatePicker:a=!1,margin:l="dense",staticLabel:u=!1,staticLabelProps:f={fontSize:".9em",color:"#808080"}}=t,[h,m,g]=Wt.useField({name:e}),{setValue:b,setError:y}=g,{value:S}=h,{error:C}=m,[E,T]=P.useState(null),w={...XG,...s},M=["staticLabel","staticLabelProps","label","errorMessages","isDatePicker","dateFieldProps","datePickerProps","useIso","onChange"];P.useEffect(()=>{const N=E?w[E]??E:"";y(N)},[E]);const R=N=>{if(N!=null)return N==null||N==""?null:pn.utc(N)},_={label:u?void 0:n,onChange:(N,O)=>{let A="";try{const L=N==null?void 0:N.utc();A=(L==null?void 0:L.toISOString())??""}catch{}b(A),t.onChange&&t.onChange(A,O)},format:i,onError:T,value:R(S),...Xn({...t},M)};return v.jsxs(j.FormControl,{fullWidth:!0,margin:l,children:[(u||o)&&v.jsx(j.Typography,{...f,children:n}),o?v.jsx(j.Typography,{children:(I=R(S))==null?void 0:I.format(i)}):v.jsxs(j.Box,{children:[v.jsx(W0,{dateAdapter:hW,children:v.jsx(j.Box,{children:a?v.jsx(N2,{..._,slotProps:{textField:{fullWidth:!0,error:!!C,required:!!r}}}):v.jsx($p,{id:`${e}-df`,..._,fullWidth:!0,slotProps:{textField:{error:!!C}}})})}),v.jsx(Qn,{name:e,id:`${e}-err`})]})]})},QG=t=>{const{nameTo:e,nameFrom:n,labelTo:r=kn(e),labelFrom:o=kn(n),fromFieldProps:i,toFieldProps:s,staticLabels:a=!1}=t,l=["nameTo","nameFrom","toFieldProps","fromFieldProps","labelTo","labelFrom"],u=j.useMediaQuery(j.useTheme().breakpoints.down("sm"));return v.jsxs("div",{style:{display:"flex",flexDirection:u?"column":"row",justifyContent:"space-between",gap:"10px"},children:[v.jsx(xf,{name:n,staticLabel:a,label:o,...Xn({...t,...i},l)}),v.jsx(xf,{name:e,staticLabel:a,label:r,...Xn({...t,...s},l)})]})};function Pn(t){this.content=t}Pn.prototype={constructor:Pn,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,o=r.find(t),i=r.content.slice();return o==-1?i.push(n||t,e):(i[o+1]=e,n&&(i[o]=n)),new Pn(i)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new Pn(n)},addToStart:function(t,e){return new Pn([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new Pn(n)},addBefore:function(t,e,n){var r=this.remove(e),o=r.content.slice(),i=r.find(t);return o.splice(i==-1?o.length:i,0,e,n),new Pn(o)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=Pn.from(t),t.size?new Pn(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=Pn.from(t),t.size?new Pn(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=Pn.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}};Pn.from=function(t){if(t instanceof Pn)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new Pn(e)};function L2(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let o=t.child(r),i=e.child(r);if(o==i){n+=o.nodeSize;continue}if(!o.sameMarkup(i))return n;if(o.isText&&o.text!=i.text){for(let s=0;o.text[s]==i.text[s];s++)n++;return n}if(o.content.size||i.content.size){let s=L2(o.content,i.content,n+1);if(s!=null)return s}n+=o.nodeSize}}function j2(t,e,n,r){for(let o=t.childCount,i=e.childCount;;){if(o==0||i==0)return o==i?null:{a:n,b:r};let s=t.child(--o),a=e.child(--i),l=s.nodeSize;if(s==a){n-=l,r-=l;continue}if(!s.sameMarkup(a))return{a:n,b:r};if(s.isText&&s.text!=a.text){let u=0,f=Math.min(s.text.length,a.text.length);for(;u<f&&s.text[s.text.length-u-1]==a.text[a.text.length-u-1];)u++,n--,r--;return{a:n,b:r}}if(s.content.size||a.content.size){let u=j2(s.content,a.content,n-1,r-1);if(u)return u}n-=l,r-=l}}class Te{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,o=0,i){for(let s=0,a=0;a<n;s++){let l=this.content[s],u=a+l.nodeSize;if(u>e&&r(l,o+a,i||null,s)!==!1&&l.content.size){let f=a+1;l.nodesBetween(Math.max(0,e-f),Math.min(l.content.size,n-f),r,o+f)}a=u}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,o){let i="",s=!0;return this.nodesBetween(e,n,(a,l)=>{let u=a.isText?a.text.slice(Math.max(e,l)-l,n-l):a.isLeaf?o?typeof o=="function"?o(a):o:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&u||a.isTextblock)&&r&&(s?s=!1:i+=r),i+=u},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.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<e.content.length;i++)o.push(e.content[i]);return new Te(o,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],o=0;if(n>e)for(let i=0,s=0;s<n;i++){let a=this.content[i],l=s+a.nodeSize;l>e&&((s<e||l>n)&&(a.isText?a=a.cut(Math.max(0,e-s),Math.min(a.text.length,n-s)):a=a.cut(Math.max(0,e-s-1),Math.min(a.content.size,n-s-1))),r.push(a),o+=a.nodeSize),s=l}return new Te(r,o)}cutByIndex(e,n){return e==n?Te.empty:e==0&&n==this.content.length?this:new Te(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let o=this.content.slice(),i=this.size+n.nodeSize-r.nodeSize;return o[e]=n,new Te(o,i)}addToStart(e){return new Te([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new Te(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.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(e){let n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let o=this.content[n];e(o,r,n),r+=o.nodeSize}}findDiffStart(e,n=0){return L2(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return j2(this,e,n,r)}findIndex(e,n=-1){if(e==0)return bd(0,e);if(e==this.size)return bd(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let r=0,o=0;;r++){let i=this.child(r),s=o+i.nodeSize;if(s>=e)return s==e||n>0?bd(r+1,s):bd(r,o);o=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return Te.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new Te(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return Te.empty;let n,r=0;for(let o=0;o<e.length;o++){let i=e[o];r+=i.nodeSize,o&&i.isText&&e[o-1].sameMarkup(i)?(n||(n=e.slice(0,o)),n[n.length-1]=i.withText(n[n.length-1].text+i.text)):n&&n.push(i)}return new Te(n||e,r)}static from(e){if(!e)return Te.empty;if(e instanceof Te)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new Te([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}Te.empty=new Te([],0);const og={index:0,offset:0};function bd(t,e){return og.index=t,og.offset=e,og}function Sf(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!Sf(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!Sf(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}let Lt=class Vv{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let o=0;o<e.length;o++){let i=e[o];if(this.eq(i))return e;if(this.type.excludes(i.type))n||(n=e.slice(0,o));else{if(i.type.excludes(this.type))return e;!r&&i.type.rank>this.type.rank&&(n||(n=e.slice(0,o)),n.push(this),r=!0),n&&n.push(i)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Sf(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.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(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(n[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Vv.none;if(e instanceof Vv)return[e];let n=e.slice();return n.sort((r,o)=>r.type.rank-o.type.rank),n}};Lt.none=[];class Cf extends Error{}class Ae{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=F2(this.content,e+this.openStart,n);return r&&new Ae(r,this.openStart,this.openEnd)}removeBetween(e,n){return new Ae($2(this.content,e+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,n){if(!n)return Ae.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 Ae(Te.fromJSON(e,n.content),r,o)}static maxOpen(e,n=!0){let r=0,o=0;for(let i=e.firstChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.lastChild)o++;return new Ae(e,r,o)}}Ae.empty=new Ae(Te.empty,0,0);function $2(t,e,n){let{index:r,offset:o}=t.findIndex(e),i=t.maybeChild(r),{index:s,offset:a}=t.findIndex(n);if(o==e||i.isText){if(a!=n&&!t.child(s).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return t.replaceChild(r,i.copy($2(i.content,e-o-1,n-o-1)))}function F2(t,e,n,r){let{index:o,offset:i}=t.findIndex(e),s=t.maybeChild(o);if(i==e||s.isText)return t.cut(0,e).append(n).append(t.cut(e));let a=F2(s.content,e-i-1,n);return a&&t.replaceChild(o,s.copy(a))}function eJ(t,e,n){if(n.openStart>t.depth)throw new Cf("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new Cf("Inconsistent open depths");return B2(t,e,n,0)}function B2(t,e,n,r){let o=t.index(r),i=t.node(r);if(o==e.index(r)&&r<t.depth-n.openStart){let s=B2(t,e,n,r+1);return i.copy(i.content.replaceChild(o,s))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let s=t.parent,a=s.content;return Ps(s,a.cut(0,t.parentOffset).append(n.content).append(a.cut(e.parentOffset)))}else{let{start:s,end:a}=tJ(n,t);return Ps(i,z2(t,s,a,e,r))}else return Ps(i,wf(t,e,r))}function V2(t,e){if(!e.type.compatibleContent(t.type))throw new Cf("Cannot join "+e.type.name+" onto "+t.type.name)}function zv(t,e,n){let r=t.node(n);return V2(r,e.node(n)),r}function Ds(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function fc(t,e,n,r){let o=(e||t).node(n),i=0,s=e?e.index(n):o.childCount;t&&(i=t.index(n),t.depth>n?i++:t.textOffset&&(Ds(t.nodeAfter,r),i++));for(let a=i;a<s;a++)Ds(o.child(a),r);e&&e.depth==n&&e.textOffset&&Ds(e.nodeBefore,r)}function Ps(t,e){return t.type.checkContent(e),t.copy(e)}function z2(t,e,n,r,o){let i=t.depth>o&&zv(t,e,o+1),s=r.depth>o&&zv(n,r,o+1),a=[];return fc(null,t,o,a),i&&s&&e.index(o)==n.index(o)?(V2(i,s),Ds(Ps(i,z2(t,e,n,r,o+1)),a)):(i&&Ds(Ps(i,wf(t,e,o+1)),a),fc(e,n,o,a),s&&Ds(Ps(s,wf(n,r,o+1)),a)),fc(r,null,o,a),new Te(a)}function wf(t,e,n){let r=[];if(fc(null,t,n,r),t.depth>n){let o=zv(t,e,n+1);Ds(Ps(o,wf(t,e,n+1)),r)}return fc(e,null,n,r),new Te(r)}function tJ(t,e){let n=e.depth-t.openStart,o=e.node(n).copy(t.content);for(let i=n-1;i>=0;i--)o=e.node(i).copy(Te.from(o));return{start:o.resolveNoCache(t.openStart+n),end:o.resolveNoCache(o.content.size-t.openEnd-n)}}class _c{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],o=e.child(n);return r?e.child(n).cut(r):o}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,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<e;i++)o+=r.child(i).nodeSize;return o}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return Lt.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),o=e.maybeChild(n);if(!r){let a=r;r=o,o=a}let i=r.marks;for(var s=0;s<i.length;s++)i[s].type.spec.inclusive===!1&&(!o||!i[s].isInSet(o.marks))&&(i=i[s--].removeFromSet(i));return i}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,o=e.parent.maybeChild(e.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(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!n||n(this.node(r))))return new Tf(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],o=0,i=n;for(let s=e;;){let{index:a,offset:l}=s.content.findIndex(i),u=i-l;if(r.push(s,a,o+l),!u||(s=s.child(a),s.isText))break;i=u-1,o+=l+1}return new _c(n,r,i)}static resolveCached(e,n){let r=pE.get(e);if(r)for(let i=0;i<r.elts.length;i++){let s=r.elts[i];if(s.pos==n)return s}else pE.set(e,r=new nJ);let o=r.elts[r.i]=_c.resolve(e,n);return r.i=(r.i+1)%rJ,o}}class nJ{constructor(){this.elts=[],this.i=0}}const rJ=12,pE=new WeakMap;class Tf{constructor(e,n,r){this.$from=e,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 oJ=Object.create(null);let $i=class Hv{constructor(e,n,r,o=Lt.none){this.type=e,this.attrs=n,this.marks=o,this.content=r||Te.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,n,r,o=0){this.content.nodesBetween(e,n,r,o,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,n,r,o){return this.content.textBetween(e,n,r,o)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,n,r){return this.type==e&&Sf(this.attrs,n||e.defaultAttrs||oJ)&&Lt.sameSet(this.marks,r||Lt.none)}copy(e=null){return e==this.content?this:new Hv(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Hv(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,r=!1){if(e==n)return Ae.empty;let o=this.resolve(e),i=this.resolve(n),s=r?0:o.sharedDepth(n),a=o.start(s),u=o.node(s).content.cut(o.pos-a,i.pos-a);return new Ae(u,o.depth-s,i.depth-s)}replace(e,n,r){return eJ(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:o}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(o==e||n.isText)return n;e-=o+1}}childAfter(e){let{index:n,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(e);if(r<e)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(e){return _c.resolveCached(this,e)}resolveNoCache(e){return _c.resolve(this,e)}rangeHasMark(e,n,r){let o=!1;return n>e&&this.nodesBetween(e,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 e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),H2(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=Te.empty,o=0,i=r.childCount){let s=this.contentMatchAt(e).matchFragment(r,o,i),a=s&&s.matchFragment(this.content,n);if(!a||!a.validEnd)return!1;for(let l=o;l<i;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(e,n,r,o){if(o&&!this.type.allowsMarks(o))return!1;let i=this.contentMatchAt(e).matchType(r),s=i&&i.matchFragment(this.content,n);return s?s.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=Lt.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!Lt.sameSet(e,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 e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(n=>n.toJSON())),e}static fromJSON(e,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(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let o=Te.fromJSON(e,n.content),i=e.nodeType(n.type).create(n.attrs,o,r);return i.type.checkAttrs(i.attrs),i}};$i.prototype.text=void 0;class Ef extends $i{constructor(e,n,r,o){if(super(e,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):H2(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Ef(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Ef(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function H2(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class Vs{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new iJ(e,n);if(r.next==null)return Vs.empty;let o=W2(r);r.next&&r.err("Unexpected trailing text");let i=fJ(dJ(o));return pJ(i,r),i}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,r=e.childCount){let o=this;for(let i=n;o&&i<r;i++)o=o.matchType(e.child(i).type);return o}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let r=0;r<e.next.length;r++)if(this.next[n].type==e.next[r].type)return!0;return!1}fillBefore(e,n=!1,r=0){let o=[this];function i(s,a){let l=s.matchFragment(e,r);if(l&&(!n||l.validEnd))return Te.from(a.map(u=>u.createAndFill()));for(let u=0;u<s.next.length;u++){let{type:f,next:h}=s.next[u];if(!(f.isText||f.hasRequiredAttrs())&&o.indexOf(h)==-1){o.push(h);let m=i(h,a.concat(f));if(m)return m}}return null}return i(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){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(e)){let s=[];for(let a=o;a.type;a=a.via)s.push(a.type);return s.reverse()}for(let s=0;s<i.next.length;s++){let{type:a,next:l}=i.next[s];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in n)&&(!o.type||l.validEnd)&&(r.push({match:a.contentMatch,type:a,via:o}),n[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function n(r){e.push(r);for(let o=0;o<r.next.length;o++)e.indexOf(r.next[o].next)==-1&&n(r.next[o].next)}return n(this),e.map((r,o)=>{let i=o+(r.validEnd?"*":" ")+" ";for(let s=0;s<r.next.length;s++)i+=(s?", ":"")+r.next[s].type.name+"->"+e.indexOf(r.next[s].next);return i}).join(`
234
+ `)}}Vs.empty=new Vs(!0);class iJ{constructor(e,n){this.string=e,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=e.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(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function W2(t){let e=[];do e.push(sJ(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function sJ(t){let e=[];do e.push(aJ(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function aJ(t){let e=uJ(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else if(t.eat("{"))e=lJ(t,e);else break;return e}function hE(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function lJ(t,e){let n=hE(t),r=n;return t.eat(",")&&(t.next!="}"?r=hE(t):r=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function cJ(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let o=[];for(let i in n){let s=n[i];s.isInGroup(e)&&o.push(s)}return o.length==0&&t.err("No node type or group '"+e+"' found"),o}function uJ(t){if(t.eat("(")){let e=W2(t);return t.eat(")")||t.err("Missing closing paren"),e}else if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=cJ(t,t.next).map(n=>(t.inline==null?t.inline=n.isInline:t.inline!=n.isInline&&t.err("Mixing inline and block content"),{type:"name",value:n}));return t.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function dJ(t){let e=[[]];return o(i(t,0),n()),e;function n(){return e.push([])-1}function r(s,a,l){let u={term:l,to:a};return e[s].push(u),u}function o(s,a){s.forEach(l=>l.to=a)}function i(s,a){if(s.type=="choice")return s.exprs.reduce((l,u)=>l.concat(i(u,a)),[]);if(s.type=="seq")for(let l=0;;l++){let u=i(s.exprs[l],a);if(l==s.exprs.length-1)return u;o(u,a=n())}else if(s.type=="star"){let l=n();return r(a,l),o(i(s.expr,l),l),[r(l)]}else if(s.type=="plus"){let l=n();return o(i(s.expr,a),l),o(i(s.expr,l),l),[r(l)]}else{if(s.type=="opt")return[r(a)].concat(i(s.expr,a));if(s.type=="range"){let l=a;for(let u=0;u<s.min;u++){let f=n();o(i(s.expr,l),f),l=f}if(s.max==-1)o(i(s.expr,l),l);else for(let u=s.min;u<s.max;u++){let f=n();r(l,f),o(i(s.expr,l),f),l=f}return[r(l)]}else{if(s.type=="name")return[r(a,void 0,s.value)];throw new Error("Unknown expr type")}}}}function q2(t,e){return e-t}function mE(t,e){let n=[];return r(e),n.sort(q2);function r(o){let i=t[o];if(i.length==1&&!i[0].term)return r(i[0].to);n.push(o);for(let s=0;s<i.length;s++){let{term:a,to:l}=i[s];!a&&n.indexOf(l)==-1&&r(l)}}}function fJ(t){let e=Object.create(null);return n(mE(t,0));function n(r){let o=[];r.forEach(s=>{t[s].forEach(({term:a,to:l})=>{if(!a)return;let u;for(let f=0;f<o.length;f++)o[f][0]==a&&(u=o[f][1]);mE(t,l).forEach(f=>{u||o.push([a,u=[]]),u.indexOf(f)==-1&&u.push(f)})})});let i=e[r.join(",")]=new Vs(r.indexOf(t.length-1)>-1);for(let s=0;s<o.length;s++){let a=o[s][1].sort(q2);i.next.push({type:o[s][0],next:e[a.join(",")]||n(a)})}return i}}function pJ(t,e){for(let n=0,r=[t];n<r.length;n++){let o=r[n],i=!o.validEnd,s=[];for(let a=0;a<o.next.length;a++){let{type:l,next:u}=o.next[a];s.push(l.name),i&&!(l.isText||l.hasRequiredAttrs())&&(i=!1),r.indexOf(u)==-1&&r.push(u)}i&&e.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function U2(t){let e=Object.create(null);for(let n in t){let r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}function K2(t,e){let n=Object.create(null);for(let r in t){let o=e&&e[r];if(o===void 0){let i=t[r];if(i.hasDefault)o=i.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=o}return n}function Y2(t,e,n,r){for(let o in e)if(!(o in t))throw new RangeError(`Unsupported attribute ${o} for ${n} of type ${o}`);for(let o in t){let i=t[o];i.validate&&i.validate(e[o])}}function G2(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new mJ(t,r,e[r]);return n}let gE=class J2{constructor(e,n,r){this.name=e,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=G2(e,r.attrs),this.defaultAttrs=U2(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Vs.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:K2(this.attrs,e)}create(e=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new $i(this,this.computeAttrs(e),Te.from(n),Lt.setFrom(r))}createChecked(e=null,n,r){return n=Te.from(n),this.checkContent(n),new $i(this,this.computeAttrs(e),n,Lt.setFrom(r))}createAndFill(e=null,n,r){if(e=this.computeAttrs(e),n=Te.from(n),n.size){let s=this.contentMatch.fillBefore(n);if(!s)return null;n=s.append(n)}let o=this.contentMatch.matchFragment(n),i=o&&o.fillBefore(Te.empty,!0);return i?new $i(this,e,n.append(i),Lt.setFrom(r)):null}validContent(e){let n=this.contentMatch.matchFragment(e);if(!n||!n.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){Y2(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let n=0;n<e.length;n++)if(!this.allowsMarkType(e[n].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let n;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?n&&n.push(e[r]):n||(n=e.slice(0,r));return n?n.length?n:Lt.none:e}static compile(e,n){let r=Object.create(null);e.forEach((i,s)=>r[i]=new J2(i,n,s));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 hJ(t,e,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 ${e} on type ${t}, got ${i}`)}}class mJ{constructor(e,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?hJ(e,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class Hp{constructor(e,n,r,o){this.name=e,this.rank=n,this.schema=r,this.spec=o,this.attrs=G2(e,o.attrs),this.excluded=null;let i=U2(this.attrs);this.instance=i?new Lt(this,i):null}create(e=null){return!e&&this.instance?this.instance:new Lt(this,K2(this.attrs,e))}static compile(e,n){let r=Object.create(null),o=0;return e.forEach((i,s)=>r[i]=new Hp(i,o++,n,s)),r}removeFromSet(e){for(var n=0;n<e.length;n++)e[n].type==this&&(e=e.slice(0,n).concat(e.slice(n+1)),n--);return e}isInSet(e){for(let n=0;n<e.length;n++)if(e[n].type==this)return e[n]}checkAttrs(e){Y2(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}let Z2=class{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let o in e)n[o]=e[o];n.nodes=Pn.from(e.nodes),n.marks=Pn.from(e.marks||{}),this.nodes=gE.compile(this.spec.nodes,this),this.marks=Hp.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],s=i.spec.content||"",a=i.spec.marks;if(i.contentMatch=r[s]||(r[s]=Vs.parse(s,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=a=="_"?null:a?yE(this,a.split(" ")):a==""||!i.inlineContent?[]:null}for(let o in this.marks){let i=this.marks[o],s=i.spec.excludes;i.excluded=s==null?[i]:s==""?[]:yE(this,s.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(e,n=null,r,o){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof gE){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(n,r,o)}text(e,n){let r=this.nodes.text;return new Ef(r,r.defaultAttrs,e,Lt.setFrom(n))}mark(e,n){return typeof e=="string"&&(e=this.marks[e]),e.create(n)}nodeFromJSON(e){return $i.fromJSON(this,e)}markFromJSON(e){return Lt.fromJSON(this,e)}nodeType(e){let n=this.nodes[e];if(!n)throw new RangeError("Unknown node type: "+e);return n}};function yE(t,e){let n=[];for(let r=0;r<e.length;r++){let o=e[r],i=t.marks[o],s=i;if(i)n.push(i);else for(let a in t.marks){let l=t.marks[a];(o=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(o)>-1)&&n.push(s=l)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}function gJ(t){return t.tag!=null}function yJ(t){return t.style!=null}class Fi{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(o=>{if(gJ(o))this.tags.push(o);else if(yJ(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=e.nodes[o.node];return i.contentMatch.matchType(i)})}parse(e,n={}){let r=new vE(this,n,!1);return r.addAll(e,Lt.none,n.from,n.to),r.finish()}parseSlice(e,n={}){let r=new vE(this,n,!0);return r.addAll(e,Lt.none,n.from,n.to),Ae.maxOpen(r.finish())}matchTag(e,n,r){for(let o=r?this.tags.indexOf(r)+1:0;o<this.tags.length;o++){let i=this.tags[o];if(xJ(e,i.tag)&&(i.namespace===void 0||e.namespaceURI==i.namespace)&&(!i.context||n.matchesContext(i.context))){if(i.getAttrs){let s=i.getAttrs(e);if(s===!1)continue;i.attrs=s||void 0}return i}}}matchStyle(e,n,r,o){for(let i=o?this.styles.indexOf(o)+1:0;i<this.styles.length;i++){let s=this.styles[i],a=s.style;if(!(a.indexOf(e)!=0||s.context&&!r.matchesContext(s.context)||a.length>e.length&&(a.charCodeAt(e.length)!=61||a.slice(e.length+1)!=n))){if(s.getAttrs){let l=s.getAttrs(n);if(l===!1)continue;s.attrs=l||void 0}return s}}}static schemaRules(e){let n=[];function r(o){let i=o.priority==null?50:o.priority,s=0;for(;s<n.length;s++){let a=n[s];if((a.priority==null?50:a.priority)<i)break}n.splice(s,0,o)}for(let o in e.marks){let i=e.marks[o].spec.parseDOM;i&&i.forEach(s=>{r(s=xE(s)),s.mark||s.ignore||s.clearMark||(s.mark=o)})}for(let o in e.nodes){let i=e.nodes[o].spec.parseDOM;i&&i.forEach(s=>{r(s=xE(s)),s.node||s.ignore||s.mark||(s.node=o)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Fi(e,Fi.schemaRules(e)))}}const X2={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},bJ={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Q2={ol:!0,ul:!0},Nc=1,Wv=2,pc=4;function bE(t,e,n){return e!=null?(e?Nc:0)|(e==="full"?Wv:0):t&&t.whitespace=="pre"?Nc|Wv:n&~pc}class vd{constructor(e,n,r,o,i,s){this.type=e,this.attrs=n,this.marks=r,this.solid=o,this.options=s,this.content=[],this.activeMarks=Lt.none,this.match=i||(s&pc?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(Te.from(e));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,o;return(o=r.findWrapping(e.type))?(this.match=r,o):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Nc)){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=Te.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(Te.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!X2.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class vE{constructor(e,n,r){this.parser=e,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let o=n.topNode,i,s=bE(null,n.preserveWhitespace,0)|(r?pc:0);o?i=new vd(o.type,o.attrs,Lt.none,!0,n.topMatch||o.type.contentMatch,s):r?i=new vd(null,null,Lt.none,!0,null,s):i=new vd(e.schema.topNodeType,null,Lt.none,!0,null,s),this.nodes=[i],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,n){e.nodeType==3?this.addTextNode(e,n):e.nodeType==1&&this.addElement(e,n)}addTextNode(e,n){let r=e.nodeValue,o=this.top,i=o.options&Wv?"full":this.localPreserveWS||(o.options&Nc)>0;if(i==="full"||o.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(i)i!=="full"?r=r.replace(/\r?\n|\r/g," "):r=r.replace(/\r\n?/g,`
235
+ `);else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let s=o.content[o.content.length-1],a=e.previousSibling;(!s||a&&a.nodeName=="BR"||s.isText&&/[ \t\r\n\u000c]$/.test(s.text))&&(r=r.slice(1))}r&&this.insertNode(this.parser.schema.text(r),n),this.findInText(e)}else this.findInside(e)}addElement(e,n,r){let o=this.localPreserveWS,i=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let s=e.nodeName.toLowerCase(),a;Q2.hasOwnProperty(s)&&this.parser.normalizeLists&&vJ(e);let l=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(a=this.parser.matchTag(e,this,r));e:if(l?l.ignore:bJ.hasOwnProperty(s))this.findInside(e),this.ignoreFallback(e,n);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(e=l.skip);let u,f=this.needsBlock;if(X2.hasOwnProperty(s))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),u=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,n);break e}let h=l&&l.skip?n:this.readStyles(e,n);h&&this.addAll(e,h),u&&this.sync(i),this.needsBlock=f}else{let u=this.readStyles(e,n);u&&this.addElementByRule(e,l,u,l.consuming===!1?a:void 0)}this.localPreserveWS=o}leafFallback(e,n){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
236
+ `),n)}ignoreFallback(e,n){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n)}readStyles(e,n){let r=e.style;if(r&&r.length)for(let o=0;o<this.parser.matchedStyles.length;o++){let i=this.parser.matchedStyles[o],s=r.getPropertyValue(i);if(s)for(let a=void 0;;){let l=this.parser.matchStyle(i,s,this,a);if(!l)break;if(l.ignore)return null;if(l.clearMark?n=n.filter(u=>!l.clearMark(u)):n=n.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)a=l;else break}}return n}addElementByRule(e,n,r,o){let i,s;if(n.node)if(s=this.parser.schema.nodes[n.node],s.isLeaf)this.insertNode(s.create(n.attrs),r)||this.leafFallback(e,r);else{let l=this.enter(s,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 a=this.top;if(s&&s.isLeaf)this.findInside(e);else if(o)this.addElement(e,r,o);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(l=>this.insertNode(l,r));else{let l=e;typeof n.contentElement=="string"?l=e.querySelector(n.contentElement):typeof n.contentElement=="function"?l=n.contentElement(e):n.contentElement&&(l=n.contentElement),this.findAround(e,l,!0),this.addAll(l,r),this.findAround(e,l,!1)}i&&this.sync(a)&&this.open--}addAll(e,n,r,o){let i=r||0;for(let s=r?e.childNodes[r]:e.firstChild,a=o==null?null:e.childNodes[o];s!=a;s=s.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(s,n);this.findAtPoint(e,i)}findPlace(e,n){let r,o;for(let i=this.open;i>=0;i--){let s=this.nodes[i],a=s.findWrapping(e);if(a&&(!r||r.length>a.length)&&(r=a,o=s,!a.length)||s.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(e,n){if(e.isInline&&this.needsBlock&&!this.top.type){let o=this.textblockFromContext();o&&(n=this.enterInner(o,null,n))}let r=this.findPlace(e,n);if(r){this.closeExtra();let o=this.top;o.match&&(o.match=o.match.matchType(e.type));let i=Lt.none;for(let s of r.concat(e.marks))(o.type?o.type.allowsMarkType(s.type):SE(s.type,e.type))&&(i=s.addToSet(i));return o.content.push(e.mark(i)),!0}return!1}enter(e,n,r,o){let i=this.findPlace(e.create(n),r);return i&&(i=this.enterInner(e,n,r,!0,o)),i}enterInner(e,n,r,o=!1,i){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(e);let a=bE(e,i,s.options);s.options&pc&&s.content.length==0&&(a|=pc);let l=Lt.none;return r=r.filter(u=>(s.type?s.type.allowsMarkType(u.type):SE(u.type,e))?(l=u.addToSet(l),!1):!0),this.nodes.push(new vd(e,n,l,o,null,a)),this.open++,r}closeExtra(e=!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(e));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(e){for(let n=this.open;n>=0;n--){if(this.nodes[n]==e)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=Nc)}return!1}get currentPos(){this.closeExtra();let e=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let o=r.length-1;o>=0;o--)e+=r[o].nodeSize;n&&e++}return e}findAtPoint(e,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&e.nodeType==1&&e.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(e,n,r){if(e!=n&&this.find)for(let o=0;o<this.find.length;o++)this.find[o].pos==null&&e.nodeType==1&&e.contains(this.find[o].node)&&n.compareDocumentPosition(this.find[o].node)&(r?2:4)&&(this.find[o].pos=this.currentPos)}findInText(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&(this.find[n].pos=this.currentPos-(e.nodeValue.length-this.find[n].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let n=e.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),s=(a,l)=>{for(;a>=0;a--){let u=n[a];if(u==""){if(a==n.length-1||a==0)continue;for(;l>=i;l--)if(s(a-1,l))return!0;return!1}else{let f=l>0||l==0&&o?this.nodes[l].type:r&&l>=i?r.node(l-i).type:null;if(!f||f.name!=u&&!f.isInGroup(u))return!1;l--}}return!0};return s(n.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let n=e.depth;n>=0;n--){let r=e.node(n).contentMatchAt(e.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 vJ(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&Q2.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):r=="li"?n=e:r&&(n=null)}}function xJ(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function xE(t){let e={};for(let n in t)e[n]=t[n];return e}function SE(t,e){let n=e.schema.nodes;for(let r in n){let o=n[r];if(!o.allowsMarkType(t))continue;let i=[],s=a=>{i.push(a);for(let l=0;l<a.edgeCount;l++){let{type:u,next:f}=a.edge(l);if(u==e||i.indexOf(f)<0&&s(f))return!0}};if(s(o.contentMatch))return!0}}class Ys{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},r){r||(r=ig(n).createDocumentFragment());let o=r,i=[];return e.forEach(s=>{if(i.length||s.marks.length){let a=0,l=0;for(;a<i.length&&l<s.marks.length;){let u=s.marks[l];if(!this.marks[u.type.name]){l++;continue}if(!u.eq(i[a][0])||u.type.spec.spanning===!1)break;a++,l++}for(;a<i.length;)o=i.pop()[1];for(;l<s.marks.length;){let u=s.marks[l++],f=this.serializeMark(u,s.isInline,n);f&&(i.push([u,o]),o.appendChild(f.dom),o=f.contentDOM||f.dom)}}o.appendChild(this.serializeNodeInner(s,n))}),r}serializeNodeInner(e,n){let{dom:r,contentDOM:o}=Xd(ig(n),this.nodes[e.type.name](e),null,e.attrs);if(o){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,n,o)}return r}serializeNode(e,n={}){let r=this.serializeNodeInner(e,n);for(let o=e.marks.length-1;o>=0;o--){let i=this.serializeMark(e.marks[o],e.isInline,n);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(e,n,r={}){let o=this.marks[e.type.name];return o&&Xd(ig(r),o(e,n),null,e.attrs)}static renderSpec(e,n,r=null,o){return Xd(e,n,r,o)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Ys(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=CE(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return CE(e.marks)}}function CE(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function ig(t){return t.document||window.document}const wE=new WeakMap;function SJ(t){let e=wE.get(t);return e===void 0&&wE.set(t,e=CJ(t)),e}function CJ(t){let e=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.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(t),e}function Xd(t,e,n,r){if(typeof e=="string")return{dom:t.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let o=e[0],i;if(typeof o!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(i=SJ(r))&&i.indexOf(e)>-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 s=o.indexOf(" ");s>0&&(n=o.slice(0,s),o=o.slice(s+1));let a,l=n?t.createElementNS(n,o):t.createElement(o),u=e[1],f=1;if(u&&typeof u=="object"&&u.nodeType==null&&!Array.isArray(u)){f=2;for(let h in u)if(u[h]!=null){let m=h.indexOf(" ");m>0?l.setAttributeNS(h.slice(0,m),h.slice(m+1),u[h]):l.setAttribute(h,u[h])}}for(let h=f;h<e.length;h++){let m=e[h];if(m===0){if(h<e.length-1||h>f)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:g,contentDOM:b}=Xd(t,m,n,r);if(l.appendChild(g),b){if(a)throw new RangeError("Multiple content holes");a=b}}}return{dom:l,contentDOM:a}}const eD=65535,tD=Math.pow(2,16);function wJ(t,e){return t+e*tD}function TE(t){return t&eD}function TJ(t){return(t-(t&eD))/tD}const nD=1,rD=2,Qd=4,oD=8;class qv{constructor(e,n,r){this.pos=e,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&oD)>0}get deletedBefore(){return(this.delInfo&(nD|Qd))>0}get deletedAfter(){return(this.delInfo&(rD|Qd))>0}get deletedAcross(){return(this.delInfo&Qd)>0}}class Tr{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&Tr.empty)return Tr.empty}recover(e){let n=0,r=TE(e);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+TJ(e)}mapResult(e,n=1){return this._map(e,n,!1)}map(e,n=1){return this._map(e,n,!0)}_map(e,n,r){let o=0,i=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?o:0);if(l>e)break;let u=this.ranges[a+i],f=this.ranges[a+s],h=l+u;if(e<=h){let m=u?e==l?-1:e==h?1:n:n,g=l+o+(m<0?0:f);if(r)return g;let b=e==(n<0?l:h)?null:wJ(a/3,e-l),y=e==l?rD:e==h?nD:Qd;return(n<0?e!=l:e!=h)&&(y|=oD),new qv(g,y,b)}o+=f-u}return r?e+o:new qv(e+o,0,null)}touches(e,n){let r=0,o=TE(n),i=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?r:0);if(l>e)break;let u=this.ranges[a+i],f=l+u;if(e<=f&&a==o*3)return!0;r+=this.ranges[a+s]-u}return!1}forEach(e){let n=this.inverted?2:1,r=this.inverted?1:2;for(let o=0,i=0;o<this.ranges.length;o+=3){let s=this.ranges[o],a=s-(this.inverted?i:0),l=s+(this.inverted?0:i),u=this.ranges[o+n],f=this.ranges[o+r];e(a,a+u,l,l+f),i+=f-u}}invert(){return new Tr(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?Tr.empty:new Tr(e<0?[0,-e,0]:[0,0,e])}}Tr.empty=new Tr([]);class Lc{constructor(e,n,r=0,o=e?e.length:0){this.mirror=n,this.from=r,this.to=o,this._maps=e||[],this.ownData=!(e||n)}get maps(){return this._maps}slice(e=0,n=this.maps.length){return new Lc(this._maps,this.mirror,e,n)}appendMap(e,n){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),n!=null&&this.setMirror(this._maps.length-1,n)}appendMapping(e){for(let n=0,r=this._maps.length;n<e._maps.length;n++){let o=e.getMirror(n);this.appendMap(e._maps[n],o!=null&&o<n?r+o:void 0)}}getMirror(e){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==e)return this.mirror[n+(n%2?-1:1)]}}setMirror(e,n){this.mirror||(this.mirror=[]),this.mirror.push(e,n)}appendMappingInverted(e){for(let n=e.maps.length-1,r=this._maps.length+e._maps.length;n>=0;n--){let o=e.getMirror(n);this.appendMap(e._maps[n].invert(),o!=null&&o>n?r-o-1:void 0)}}invert(){let e=new Lc;return e.appendMappingInverted(this),e}map(e,n=1){if(this.mirror)return this._map(e,n,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,n);return e}mapResult(e,n=1){return this._map(e,n,!1)}_map(e,n,r){let o=0;for(let i=this.from;i<this.to;i++){let s=this._maps[i],a=s.mapResult(e,n);if(a.recover!=null){let l=this.getMirror(i);if(l!=null&&l>i&&l<this.to){i=l,e=this._maps[l].recover(a.recover);continue}}o|=a.delInfo,e=a.pos}return r?e:new qv(e,o,null)}}const sg=Object.create(null);class Un{getMap(){return Tr.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=sg[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in sg)throw new RangeError("Duplicate use of step JSON ID "+e);return sg[e]=n,n.prototype.jsonID=e,n}}class hn{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new hn(e,null)}static fail(e){return new hn(null,e)}static fromReplace(e,n,r,o){try{return hn.ok(e.replace(n,r,o))}catch(i){if(i instanceof Cf)return hn.fail(i.message);throw i}}}function kx(t,e,n){let r=[];for(let o=0;o<t.childCount;o++){let i=t.child(o);i.content.size&&(i=i.copy(kx(i.content,e,i))),i.isInline&&(i=e(i,n,o)),r.push(i)}return Te.fromArray(r)}class Ni extends Un{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=e.resolve(this.from),o=r.node(r.sharedDepth(this.to)),i=new Ae(kx(n.content,(s,a)=>!s.isAtom||!a.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),o),n.openStart,n.openEnd);return hn.fromReplace(e,this.from,this.to,i)}invert(){return new ko(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Ni(n.pos,r.pos,this.mark)}merge(e){return e instanceof Ni&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Ni(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Ni(n.from,n.to,e.markFromJSON(n.mark))}}Un.jsonID("addMark",Ni);class ko extends Un{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=new Ae(kx(n.content,o=>o.mark(this.mark.removeFromSet(o.marks)),e),n.openStart,n.openEnd);return hn.fromReplace(e,this.from,this.to,r)}invert(){return new Ni(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new ko(n.pos,r.pos,this.mark)}merge(e){return e instanceof ko&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new ko(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new ko(n.from,n.to,e.markFromJSON(n.mark))}}Un.jsonID("removeMark",ko);class Li extends Un{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return hn.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return hn.fromReplace(e,this.pos,this.pos+1,new Ae(Te.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.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 Li(this.pos,n.marks[o]);return new Li(this.pos,this.mark)}}return new tl(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Li(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new Li(n.pos,e.markFromJSON(n.mark))}}Un.jsonID("addNodeMark",Li);class tl extends Un{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return hn.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return hn.fromReplace(e,this.pos,this.pos+1,new Ae(Te.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new Li(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new tl(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new tl(n.pos,e.markFromJSON(n.mark))}}Un.jsonID("removeNodeMark",tl);class Tn extends Un{constructor(e,n,r,o=!1){super(),this.from=e,this.to=n,this.slice=r,this.structure=o}apply(e){return this.structure&&Uv(e,this.from,this.to)?hn.fail("Structure replace would overwrite content"):hn.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Tr([this.from,this.to-this.from,this.slice.size])}invert(e){return new Tn(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deletedAcross&&r.deletedAcross?null:new Tn(n.pos,Math.max(n.pos,r.pos),this.slice)}merge(e){if(!(e instanceof Tn)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let n=this.slice.size+e.slice.size==0?Ae.empty:new Ae(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new Tn(this.from,this.to+(e.to-e.from),n,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let n=this.slice.size+e.slice.size==0?Ae.empty:new Ae(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new Tn(e.from,this.to,n,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new Tn(n.from,n.to,Ae.fromJSON(e,n.slice),!!n.structure)}}Un.jsonID("replace",Tn);class Mn extends Un{constructor(e,n,r,o,i,s,a=!1){super(),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=o,this.slice=i,this.insert=s,this.structure=a}apply(e){if(this.structure&&(Uv(e,this.from,this.gapFrom)||Uv(e,this.gapTo,this.to)))return hn.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return hn.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?hn.fromReplace(e,this.from,this.to,r):hn.fail("Content does not fit in gap")}getMap(){return new Tr([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let n=this.gapTo-this.gapFrom;return new Mn(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),o=this.from==this.gapFrom?n.pos:e.map(this.gapFrom,-1),i=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||o<n.pos||i>r.pos?null:new Mn(n.pos,r.pos,o,i,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,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 Mn(n.from,n.to,n.gapFrom,n.gapTo,Ae.fromJSON(e,n.slice),n.insert,!!n.structure)}}Un.jsonID("replaceAround",Mn);function Uv(t,e,n){let r=t.resolve(e),o=n-e,i=r.depth;for(;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0){let s=r.node(i).maybeChild(r.indexAfter(i));for(;o>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,o--}}return!1}function EJ(t,e,n,r){let o=[],i=[],s,a;t.doc.nodesBetween(e,n,(l,u,f)=>{if(!l.isInline)return;let h=l.marks;if(!r.isInSet(h)&&f.type.allowsMarkType(r.type)){let m=Math.max(u,e),g=Math.min(u+l.nodeSize,n),b=r.addToSet(h);for(let y=0;y<h.length;y++)h[y].isInSet(b)||(s&&s.to==m&&s.mark.eq(h[y])?s.to=g:o.push(s=new ko(m,g,h[y])));a&&a.to==m?a.to=g:i.push(a=new Ni(m,g,r))}}),o.forEach(l=>t.step(l)),i.forEach(l=>t.step(l))}function kJ(t,e,n,r){let o=[],i=0;t.doc.nodesBetween(e,n,(s,a)=>{if(!s.isInline)return;i++;let l=null;if(r instanceof Hp){let u=s.marks,f;for(;f=r.isInSet(u);)(l||(l=[])).push(f),u=f.removeFromSet(u)}else r?r.isInSet(s.marks)&&(l=[r]):l=s.marks;if(l&&l.length){let u=Math.min(a+s.nodeSize,n);for(let f=0;f<l.length;f++){let h=l[f],m;for(let g=0;g<o.length;g++){let b=o[g];b.step==i-1&&h.eq(o[g].style)&&(m=b)}m?(m.to=u,m.step=i):o.push({style:h,from:Math.max(a,e),to:u,step:i})}}}),o.forEach(s=>t.step(new ko(s.from,s.to,s.style)))}function Mx(t,e,n,r=n.contentMatch,o=!0){let i=t.doc.nodeAt(e),s=[],a=e+1;for(let l=0;l<i.childCount;l++){let u=i.child(l),f=a+u.nodeSize,h=r.matchType(u.type);if(!h)s.push(new Tn(a,f,Ae.empty));else{r=h;for(let m=0;m<u.marks.length;m++)n.allowsMarkType(u.marks[m].type)||t.step(new ko(a,f,u.marks[m]));if(o&&u.isText&&n.whitespace!="pre"){let m,g=/\r?\n|\r/g,b;for(;m=g.exec(u.text);)b||(b=new Ae(Te.from(n.schema.text(" ",n.allowedMarks(u.marks))),0,0)),s.push(new Tn(a+m.index,a+m.index+m[0].length,b))}}a=f}if(!r.validEnd){let l=r.fillBefore(Te.empty,!0);t.replace(a,a,new Ae(l,0,0))}for(let l=s.length-1;l>=0;l--)t.step(s[l])}function MJ(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function fl(t){let n=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let r=t.depth;;--r){let o=t.$from.node(r),i=t.$from.index(r),s=t.$to.indexAfter(r);if(r<t.depth&&o.canReplace(i,s,n))return r;if(r==0||o.type.spec.isolating||!MJ(o,i,s))break}return null}function OJ(t,e,n){let{$from:r,$to:o,depth:i}=e,s=r.before(i+1),a=o.after(i+1),l=s,u=a,f=Te.empty,h=0;for(let b=i,y=!1;b>n;b--)y||r.index(b)>0?(y=!0,f=Te.from(r.node(b).copy(f)),h++):l--;let m=Te.empty,g=0;for(let b=i,y=!1;b>n;b--)y||o.after(b+1)<o.end(b)?(y=!0,m=Te.from(o.node(b).copy(m)),g++):u++;t.step(new Mn(l,u,s,a,new Ae(f.append(m),h,g),f.size-h,!0))}function Ox(t,e,n=null,r=t){let o=RJ(t,e),i=o&&AJ(r,e);return i?o.map(EE).concat({type:e,attrs:n}).concat(i.map(EE)):null}function EE(t){return{type:t,attrs:null}}function RJ(t,e){let{parent:n,startIndex:r,endIndex:o}=t,i=n.contentMatchAt(r).findWrapping(e);if(!i)return null;let s=i.length?i[0]:e;return n.canReplaceWith(r,o,s)?i:null}function AJ(t,e){let{parent:n,startIndex:r,endIndex:o}=t,i=n.child(r),s=e.contentMatch.findWrapping(i.type);if(!s)return null;let l=(s.length?s[s.length-1]:e).contentMatch;for(let u=r;l&&u<o;u++)l=l.matchType(n.child(u).type);return!l||!l.validEnd?null:s}function IJ(t,e,n){let r=Te.empty;for(let s=n.length-1;s>=0;s--){if(r.size){let a=n[s].type.contentMatch.matchFragment(r);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=Te.from(n[s].type.create(n[s].attrs,r))}let o=e.start,i=e.end;t.step(new Mn(o,i,o,i,new Ae(r,0,0),n.length,!0))}function DJ(t,e,n,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=t.steps.length;t.doc.nodesBetween(e,n,(s,a)=>{let l=typeof o=="function"?o(s):o;if(s.isTextblock&&!s.hasMarkup(r,l)&&PJ(t.doc,t.mapping.slice(i).map(a),r)){let u=null;if(r.schema.linebreakReplacement){let g=r.whitespace=="pre",b=!!r.contentMatch.matchType(r.schema.linebreakReplacement);g&&!b?u=!1:!g&&b&&(u=!0)}u===!1&&sD(t,s,a,i),Mx(t,t.mapping.slice(i).map(a,1),r,void 0,u===null);let f=t.mapping.slice(i),h=f.map(a,1),m=f.map(a+s.nodeSize,1);return t.step(new Mn(h,m,h+1,m-1,new Ae(Te.from(r.create(l,null,s.marks)),0,0),1,!0)),u===!0&&iD(t,s,a,i),!1}})}function iD(t,e,n,r){e.forEach((o,i)=>{if(o.isText){let s,a=/\r?\n|\r/g;for(;s=a.exec(o.text);){let l=t.mapping.slice(r).map(n+1+i+s.index);t.replaceWith(l,l+1,e.type.schema.linebreakReplacement.create())}}})}function sD(t,e,n,r){e.forEach((o,i)=>{if(o.type==o.type.schema.linebreakReplacement){let s=t.mapping.slice(r).map(n+1+i);t.replaceWith(s,s+1,e.type.schema.text(`
237
+ `))}})}function PJ(t,e,n){let r=t.resolve(e),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}function _J(t,e,n,r,o){let i=t.doc.nodeAt(e);if(!i)throw new RangeError("No node at given position");n||(n=i.type);let s=n.create(r,null,o||i.marks);if(i.isLeaf)return t.replaceWith(e,e+i.nodeSize,s);if(!n.validContent(i.content))throw new RangeError("Invalid content for node type "+n.name);t.step(new Mn(e,e+i.nodeSize,e+1,e+i.nodeSize-1,new Ae(Te.from(s),0,0),1,!0))}function Wa(t,e,n=1,r){let o=t.resolve(e),i=o.depth-n,s=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!s.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let u=o.depth-1,f=n-2;u>i;u--,f--){let h=o.node(u),m=o.index(u);if(h.type.spec.isolating)return!1;let g=h.content.cutByIndex(m,h.childCount),b=r&&r[f+1];b&&(g=g.replaceChild(0,b.type.create(b.attrs)));let y=r&&r[f]||h;if(!h.canReplace(m+1,h.childCount)||!y.type.validContent(g))return!1}let a=o.indexAfter(i),l=r&&r[0];return o.node(i).canReplaceWith(a,a,l?l.type:o.node(i+1).type)}function NJ(t,e,n=1,r){let o=t.doc.resolve(e),i=Te.empty,s=Te.empty;for(let a=o.depth,l=o.depth-n,u=n-1;a>l;a--,u--){i=Te.from(o.node(a).copy(i));let f=r&&r[u];s=Te.from(f?f.type.create(f.attrs,s):o.node(a).copy(s))}t.step(new Tn(e,e,new Ae(i.append(s),n,n),!0))}function ts(t,e){let n=t.resolve(e),r=n.index();return aD(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function LJ(t,e){e.content.size||t.type.compatibleContent(e.type);let n=t.contentMatchAt(t.childCount),{linebreakReplacement:r}=t.type.schema;for(let o=0;o<e.childCount;o++){let i=e.child(o),s=i.type==r?t.type.schema.nodes.text:i.type;if(n=n.matchType(s),!n||!t.type.allowsMarks(i.marks))return!1}return n.validEnd}function aD(t,e){return!!(t&&e&&!t.isLeaf&&LJ(t,e))}function Wp(t,e,n=-1){let r=t.resolve(e);for(let o=r.depth;;o--){let i,s,a=r.index(o);if(o==r.depth?(i=r.nodeBefore,s=r.nodeAfter):n>0?(i=r.node(o+1),a++,s=r.node(o).maybeChild(a)):(i=r.node(o).maybeChild(a-1),s=r.node(o+1)),i&&!i.isTextblock&&aD(i,s)&&r.node(o).canReplace(a,a+1))return e;if(o==0)break;e=n<0?r.before(o):r.after(o)}}function jJ(t,e,n){let r=null,{linebreakReplacement:o}=t.doc.type.schema,i=t.doc.resolve(e-n),s=i.node().type;if(o&&s.inlineContent){let f=s.whitespace=="pre",h=!!s.contentMatch.matchType(o);f&&!h?r=!1:!f&&h&&(r=!0)}let a=t.steps.length;if(r===!1){let f=t.doc.resolve(e+n);sD(t,f.node(),f.before(),a)}s.inlineContent&&Mx(t,e+n-1,s,i.node().contentMatchAt(i.index()),r==null);let l=t.mapping.slice(a),u=l.map(e-n);if(t.step(new Tn(u,l.map(e+n,-1),Ae.empty,!0)),r===!0){let f=t.doc.resolve(u);iD(t,f.node(),f.before(),t.steps.length)}return t}function $J(t,e,n){let r=t.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),n))return e;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 lD(t,e,n){let r=t.resolve(e);if(!n.content.size)return e;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 s=r.depth;s>=0;s--){let a=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,l=r.index(s)+(a>0?1:0),u=r.node(s),f=!1;if(i==1)f=u.canReplace(l,l,o);else{let h=u.contentMatchAt(l).findWrapping(o.firstChild.type);f=h&&u.canReplaceWith(l,l,h[0])}if(f)return a==0?r.pos:a<0?r.before(s+1):r.after(s+1)}return null}function qp(t,e,n=e,r=Ae.empty){if(e==n&&!r.size)return null;let o=t.resolve(e),i=t.resolve(n);return cD(o,i,r)?new Tn(e,n,r):new FJ(o,i,r).fit()}function cD(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}class FJ{constructor(e,n,r){this.$from=e,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=Te.empty;for(let o=0;o<=e.depth;o++){let i=e.node(o);this.frontier.push({type:i.type,match:i.contentMatchAt(e.indexAfter(o))})}for(let o=e.depth;o>0;o--)this.placed=Te.from(e.node(o).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let u=this.findFittable();u?this.placeNodes(u):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(e<0?this.$to:r.doc.resolve(e));if(!o)return null;let i=this.placed,s=r.depth,a=o.depth;for(;s&&a&&i.childCount==1;)i=i.firstChild.content,s--,a--;let l=new Ae(i,s,a);return e>-1?new Mn(r.pos,e,this.$to.pos,this.$to.end(),l,n):l.size||r.pos!=this.$to.pos?new Tn(r.pos,o.pos,l):null}findFittable(){let e=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,o=this.unplaced.openEnd;r<e;r++){let i=n.firstChild;if(n.childCount>1&&(o=0),i.type.spec.isolating&&o<=r){e=r;break}n=i.content}for(let n=1;n<=2;n++)for(let r=n==1?e:this.unplaced.openStart;r>=0;r--){let o,i=null;r?(i=ag(this.unplaced.content,r-1).firstChild,o=i.content):o=this.unplaced.content;let s=o.firstChild;for(let a=this.depth;a>=0;a--){let{type:l,match:u}=this.frontier[a],f,h=null;if(n==1&&(s?u.matchType(s.type)||(h=u.fillBefore(Te.from(s),!1)):i&&l.compatibleContent(i.type)))return{sliceDepth:r,frontierDepth:a,parent:i,inject:h};if(n==2&&s&&(f=u.findWrapping(s.type)))return{sliceDepth:r,frontierDepth:a,parent:i,wrap:f};if(i&&u.matchType(i.type))break}}}openMore(){let{content:e,openStart:n,openEnd:r}=this.unplaced,o=ag(e,n);return!o.childCount||o.firstChild.isLeaf?!1:(this.unplaced=new Ae(e,n+1,Math.max(r,o.size+n>=e.size-r?n+1:0)),!0)}dropNode(){let{content:e,openStart:n,openEnd:r}=this.unplaced,o=ag(e,n);if(o.childCount<=1&&n>0){let i=e.size-n<=n+o.size;this.unplaced=new Ae(Zl(e,n-1,1),n-1,i?n-1:r)}else this.unplaced=new Ae(Zl(e,n,1),n,r)}placeNodes({sliceDepth:e,frontierDepth:n,parent:r,inject:o,wrap:i}){for(;this.depth>n;)this.closeFrontierNode();if(i)for(let y=0;y<i.length;y++)this.openFrontierNode(i[y]);let s=this.unplaced,a=r?r.content:s.content,l=s.openStart-e,u=0,f=[],{match:h,type:m}=this.frontier[n];if(o){for(let y=0;y<o.childCount;y++)f.push(o.child(y));h=h.matchFragment(o)}let g=a.size+e-(s.content.size-s.openEnd);for(;u<a.childCount;){let y=a.child(u),S=h.matchType(y.type);if(!S)break;u++,(u>1||l==0||y.content.size)&&(h=S,f.push(uD(y.mark(m.allowedMarks(y.marks)),u==1?l:0,u==a.childCount?g:-1)))}let b=u==a.childCount;b||(g=-1),this.placed=Xl(this.placed,n,Te.from(f)),this.frontier[n].match=h,b&&g<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let y=0,S=a;y<g;y++){let C=S.lastChild;this.frontier.push({type:C.type,match:C.contentMatchAt(C.childCount)}),S=C.content}this.unplaced=b?e==0?Ae.empty:new Ae(Zl(s.content,e-1,1),e-1,g<0?s.openEnd:e-1):new Ae(Zl(s.content,e,u),s.openStart,s.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],n;if(!e.type.isTextblock||!lg(this.$to,this.$to.depth,e.type,e.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(e){e:for(let n=Math.min(this.depth,e.depth);n>=0;n--){let{match:r,type:o}=this.frontier[n],i=n<e.depth&&e.end(n+1)==e.pos+(e.depth-(n+1)),s=lg(e,n,o,r,i);if(s){for(let a=n-1;a>=0;a--){let{match:l,type:u}=this.frontier[a],f=lg(e,a,u,l,!0);if(!f||f.childCount)continue e}return{depth:n,fit:s,move:i?e.doc.resolve(e.after(n+1)):e}}}}close(e){let n=this.findCloseLevel(e);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=Xl(this.placed,n.depth,n.fit)),e=n.move;for(let r=n.depth+1;r<=e.depth;r++){let o=e.node(r),i=o.type.contentMatch.fillBefore(o.content,!0,e.index(r));this.openFrontierNode(o.type,o.attrs,i)}return e}openFrontierNode(e,n=null,r){let o=this.frontier[this.depth];o.match=o.match.matchType(e),this.placed=Xl(this.placed,this.depth,Te.from(e.create(n,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(Te.empty,!0);n.childCount&&(this.placed=Xl(this.placed,this.frontier.length,n))}}function Zl(t,e,n){return e==0?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(Zl(t.firstChild.content,e-1,n)))}function Xl(t,e,n){return e==0?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(Xl(t.lastChild.content,e-1,n)))}function ag(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function uD(t,e,n){if(e<=0)return t;let r=t.content;return e>1&&(r=r.replaceChild(0,uD(r.firstChild,e-1,r.childCount==1?n-1:0))),e>0&&(r=t.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(t.type.contentMatch.matchFragment(r).fillBefore(Te.empty,!0)))),t.copy(r)}function lg(t,e,n,r,o){let i=t.node(e),s=o?t.indexAfter(e):t.index(e);if(s==i.childCount&&!n.compatibleContent(i.type))return null;let a=r.fillBefore(i.content,!0,s);return a&&!BJ(n,i.content,s)?a:null}function BJ(t,e,n){for(let r=n;r<e.childCount;r++)if(!t.allowsMarks(e.child(r).marks))return!0;return!1}function VJ(t){return t.spec.defining||t.spec.definingForContent}function zJ(t,e,n,r){if(!r.size)return t.deleteRange(e,n);let o=t.doc.resolve(e),i=t.doc.resolve(n);if(cD(o,i,r))return t.step(new Tn(e,n,r));let s=fD(o,t.doc.resolve(n));s[s.length-1]==0&&s.pop();let a=-(o.depth+1);s.unshift(a);for(let m=o.depth,g=o.pos-1;m>0;m--,g--){let b=o.node(m).type.spec;if(b.defining||b.definingAsContext||b.isolating)break;s.indexOf(m)>-1?a=m:o.before(m)==g&&s.splice(1,0,-m)}let l=s.indexOf(a),u=[],f=r.openStart;for(let m=r.content,g=0;;g++){let b=m.firstChild;if(u.push(b),g==r.openStart)break;m=b.content}for(let m=f-1;m>=0;m--){let g=u[m],b=VJ(g.type);if(b&&!g.sameMarkup(o.node(Math.abs(a)-1)))f=m;else if(b||!g.type.isTextblock)break}for(let m=r.openStart;m>=0;m--){let g=(m+f+1)%(r.openStart+1),b=u[g];if(b)for(let y=0;y<s.length;y++){let S=s[(y+l)%s.length],C=!0;S<0&&(C=!1,S=-S);let E=o.node(S-1),T=o.index(S-1);if(E.canReplaceWith(T,T,b.type,b.marks))return t.replace(o.before(S),C?i.after(S):n,new Ae(dD(r.content,0,r.openStart,g),g,r.openEnd))}}let h=t.steps.length;for(let m=s.length-1;m>=0&&(t.replace(e,n,r),!(t.steps.length>h));m--){let g=s[m];g<0||(e=o.before(g),n=i.after(g))}}function dD(t,e,n,r,o){if(e<n){let i=t.firstChild;t=t.replaceChild(0,i.copy(dD(i.content,e+1,n,r,i)))}if(e>r){let i=o.contentMatchAt(0),s=i.fillBefore(t).append(t);t=s.append(i.matchFragment(s).fillBefore(Te.empty,!0))}return t}function HJ(t,e,n,r){if(!r.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let o=$J(t.doc,e,r.type);o!=null&&(e=n=o)}t.replaceRange(e,n,new Ae(Te.from(r),0,0))}function WJ(t,e,n){let r=t.doc.resolve(e),o=t.doc.resolve(n),i=fD(r,o);for(let s=0;s<i.length;s++){let a=i[s],l=s==i.length-1;if(l&&a==0||r.node(a).type.contentMatch.validEnd)return t.delete(r.start(a),o.end(a));if(a>0&&(l||r.node(a-1).canReplace(r.index(a-1),o.indexAfter(a-1))))return t.delete(r.before(a),o.after(a))}for(let s=1;s<=r.depth&&s<=o.depth;s++)if(e-r.start(s)==r.depth-s&&n>r.end(s)&&o.end(s)-n!=o.depth-s&&r.start(s-1)==o.start(s-1)&&r.node(s-1).canReplace(r.index(s-1),o.index(s-1)))return t.delete(r.before(s),n);t.delete(e,n)}function fD(t,e){let n=[],r=Math.min(t.depth,e.depth);for(let o=r;o>=0;o--){let i=t.start(o);if(i<t.pos-(t.depth-o)||e.end(o)>e.pos+(e.depth-o)||t.node(o).type.spec.isolating||e.node(o).type.spec.isolating)break;(i==e.start(o)||o==t.depth&&o==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&o&&e.start(o-1)==i-1)&&n.push(o)}return n}class qa extends Un{constructor(e,n,r){super(),this.pos=e,this.attr=n,this.value=r}apply(e){let n=e.nodeAt(this.pos);if(!n)return hn.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 hn.fromReplace(e,this.pos,this.pos+1,new Ae(Te.from(o),0,n.isLeaf?0:1))}getMap(){return Tr.empty}invert(e){return new qa(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new qa(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new qa(n.pos,n.attr,n.value)}}Un.jsonID("attr",qa);class jc extends Un{constructor(e,n){super(),this.attr=e,this.value=n}apply(e){let n=Object.create(null);for(let o in e.attrs)n[o]=e.attrs[o];n[this.attr]=this.value;let r=e.type.create(n,e.content,e.marks);return hn.ok(r)}getMap(){return Tr.empty}invert(e){return new jc(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new jc(n.attr,n.value)}}Un.jsonID("docAttr",jc);let nl=class extends Error{};nl=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n};nl.prototype=Object.create(Error.prototype);nl.prototype.constructor=nl;nl.prototype.name="TransformError";class Rx{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Lc}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let n=this.maybeStep(e);if(n.failed)throw new nl(n.failed);return this}maybeStep(e){let n=e.apply(this.doc);return n.failed||this.addStep(e,n.doc),n}get docChanged(){return this.steps.length>0}addStep(e,n){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=n}replace(e,n=e,r=Ae.empty){let o=qp(this.doc,e,n,r);return o&&this.step(o),this}replaceWith(e,n,r){return this.replace(e,n,new Ae(Te.from(r),0,0))}delete(e,n){return this.replace(e,n,Ae.empty)}insert(e,n){return this.replaceWith(e,e,n)}replaceRange(e,n,r){return zJ(this,e,n,r),this}replaceRangeWith(e,n,r){return HJ(this,e,n,r),this}deleteRange(e,n){return WJ(this,e,n),this}lift(e,n){return OJ(this,e,n),this}join(e,n=1){return jJ(this,e,n),this}wrap(e,n){return IJ(this,e,n),this}setBlockType(e,n=e,r,o=null){return DJ(this,e,n,r,o),this}setNodeMarkup(e,n,r=null,o){return _J(this,e,n,r,o),this}setNodeAttribute(e,n,r){return this.step(new qa(e,n,r)),this}setDocAttribute(e,n){return this.step(new jc(e,n)),this}addNodeMark(e,n){return this.step(new Li(e,n)),this}removeNodeMark(e,n){if(!(n instanceof Lt)){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(n=n.isInSet(r.marks),!n)return this}return this.step(new tl(e,n)),this}split(e,n=1,r){return NJ(this,e,n,r),this}addMark(e,n,r){return EJ(this,e,n,r),this}removeMark(e,n,r){return kJ(this,e,n,r),this}clearIncompatible(e,n,r){return Mx(this,e,n,r),this}}const cg=Object.create(null);class Qe{constructor(e,n,r){this.$anchor=e,this.$head=n,this.ranges=r||[new pD(e.min(n),e.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 e=this.ranges;for(let n=0;n<e.length;n++)if(e[n].$from.pos!=e[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,n=Ae.empty){let r=n.content.lastChild,o=null;for(let a=0;a<n.openEnd;a++)o=r,r=r.lastChild;let i=e.steps.length,s=this.ranges;for(let a=0;a<s.length;a++){let{$from:l,$to:u}=s[a],f=e.mapping.slice(i);e.replaceRange(f.map(l.pos),f.map(u.pos),a?Ae.empty:n),a==0&&OE(e,i,(r?r.isInline:o&&o.isTextblock)?-1:1)}}replaceWith(e,n){let r=e.steps.length,o=this.ranges;for(let i=0;i<o.length;i++){let{$from:s,$to:a}=o[i],l=e.mapping.slice(r),u=l.map(s.pos),f=l.map(a.pos);i?e.deleteRange(u,f):(e.replaceRangeWith(u,f,n),OE(e,r,n.isInline?-1:1))}}static findFrom(e,n,r=!1){let o=e.parent.inlineContent?new Ge(e):Aa(e.node(0),e.parent,e.pos,e.index(),n,r);if(o)return o;for(let i=e.depth-1;i>=0;i--){let s=n<0?Aa(e.node(0),e.node(i),e.before(i+1),e.index(i),n,r):Aa(e.node(0),e.node(i),e.after(i+1),e.index(i)+1,n,r);if(s)return s}return null}static near(e,n=1){return this.findFrom(e,n)||this.findFrom(e,-n)||new Wr(e.node(0))}static atStart(e){return Aa(e,e,0,0,1)||new Wr(e)}static atEnd(e){return Aa(e,e,e.content.size,e.childCount,-1)||new Wr(e)}static fromJSON(e,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=cg[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in cg)throw new RangeError("Duplicate use of selection JSON ID "+e);return cg[e]=n,n.prototype.jsonID=e,n}getBookmark(){return Ge.between(this.$anchor,this.$head).getBookmark()}}Qe.prototype.visible=!0;class pD{constructor(e,n){this.$from=e,this.$to=n}}let kE=!1;function ME(t){!kE&&!t.parent.inlineContent&&(kE=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class Ge extends Qe{constructor(e,n=e){ME(e),ME(n),super(e,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,n){let r=e.resolve(n.map(this.head));if(!r.parent.inlineContent)return Qe.near(r);let o=e.resolve(n.map(this.anchor));return new Ge(o.parent.inlineContent?o:r,r)}replace(e,n=Ae.empty){if(super.replace(e,n),n==Ae.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof Ge&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new Up(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new Ge(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){let o=e.resolve(n);return new this(o,r==n?o:e.resolve(r))}static between(e,n,r){let o=e.pos-n.pos;if((!r||o)&&(r=o>=0?1:-1),!n.parent.inlineContent){let i=Qe.findFrom(n,r,!0)||Qe.findFrom(n,-r,!0);if(i)n=i.$head;else return Qe.near(n,r)}return e.parent.inlineContent||(o==0?e=n:(e=(Qe.findFrom(e,-r,!0)||Qe.findFrom(e,r,!0)).$anchor,e.pos<n.pos!=o<0&&(e=n))),new Ge(e,n)}}Qe.jsonID("text",Ge);class Up{constructor(e,n){this.anchor=e,this.head=n}map(e){return new Up(e.map(this.anchor),e.map(this.head))}resolve(e){return Ge.between(e.resolve(this.anchor),e.resolve(this.head))}}class qe extends Qe{constructor(e){let n=e.nodeAfter,r=e.node(0).resolve(e.pos+n.nodeSize);super(e,r),this.node=n}map(e,n){let{deleted:r,pos:o}=n.mapResult(this.anchor),i=e.resolve(o);return r?Qe.near(i):new qe(i)}content(){return new Ae(Te.from(this.node),0,0)}eq(e){return e instanceof qe&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new Ax(this.anchor)}static fromJSON(e,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new qe(e.resolve(n.anchor))}static create(e,n){return new qe(e.resolve(n))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}qe.prototype.visible=!1;Qe.jsonID("node",qe);class Ax{constructor(e){this.anchor=e}map(e){let{deleted:n,pos:r}=e.mapResult(this.anchor);return n?new Up(r,r):new Ax(r)}resolve(e){let n=e.resolve(this.anchor),r=n.nodeAfter;return r&&qe.isSelectable(r)?new qe(n):Qe.near(n)}}class Wr extends Qe{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,n=Ae.empty){if(n==Ae.empty){e.delete(0,e.doc.content.size);let r=Qe.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else super.replace(e,n)}toJSON(){return{type:"all"}}static fromJSON(e){return new Wr(e)}map(e){return new Wr(e)}eq(e){return e instanceof Wr}getBookmark(){return qJ}}Qe.jsonID("all",Wr);const qJ={map(){return this},resolve(t){return new Wr(t)}};function Aa(t,e,n,r,o,i=!1){if(e.inlineContent)return Ge.create(t,n);for(let s=r-(o>0?0:1);o>0?s<e.childCount:s>=0;s+=o){let a=e.child(s);if(a.isAtom){if(!i&&qe.isSelectable(a))return qe.create(t,n-(o<0?a.nodeSize:0))}else{let l=Aa(t,a,n+o,o<0?a.childCount:0,o,i);if(l)return l}n+=a.nodeSize*o}return null}function OE(t,e,n){let r=t.steps.length-1;if(r<e)return;let o=t.steps[r];if(!(o instanceof Tn||o instanceof Mn))return;let i=t.mapping.maps[r],s;i.forEach((a,l,u,f)=>{s==null&&(s=f)}),t.setSelection(Qe.near(t.doc.resolve(s),n))}const RE=1,xd=2,AE=4;class UJ extends Rx{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.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(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|RE)&~xd,this.storedMarks=null,this}get selectionSet(){return(this.updated&RE)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=xd,this}ensureMarks(e){return Lt.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&xd)>0}addStep(e,n){super.addStep(e,n),this.updated=this.updated&~xd,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,n=!0){let r=this.selection;return n&&(e=e.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||Lt.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,n,r){let o=this.doc.type.schema;if(n==null)return e?this.replaceSelectionWith(o.text(e),!0):this.deleteSelection();{if(r==null&&(r=n),r=r??n,!e)return this.deleteRange(n,r);let i=this.storedMarks;if(!i){let s=this.doc.resolve(n);i=r==n?s.marks():s.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,o.text(e,i)),this.selection.empty||this.setSelection(Qe.near(this.selection.$to)),this}}setMeta(e,n){return this.meta[typeof e=="string"?e:e.key]=n,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=AE,this}get scrolledIntoView(){return(this.updated&AE)>0}}function IE(t,e){return!e||!t?t:t.bind(e)}class Ql{constructor(e,n,r){this.name=e,this.init=IE(n.init,r),this.apply=IE(n.apply,r)}}const KJ=[new Ql("doc",{init(t){return t.doc||t.schema.topNodeType.createAndFill()},apply(t){return t.doc}}),new Ql("selection",{init(t,e){return t.selection||Qe.atStart(e.doc)},apply(t){return t.selection}}),new Ql("storedMarks",{init(t){return t.storedMarks||null},apply(t,e,n,r){return r.selection.$cursor?t.storedMarks:null}}),new Ql("scrollToSelection",{init(){return 0},apply(t,e){return t.scrolledIntoView?e+1:e}})];class ug{constructor(e,n){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=KJ.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 Ql(r.key,r.spec.state,r))})}}class Na{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,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,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let n=[e],r=this.applyInner(e),o=null;for(;;){let i=!1;for(let s=0;s<this.config.plugins.length;s++){let a=this.config.plugins[s];if(a.spec.appendTransaction){let l=o?o[s].n:0,u=o?o[s].state:this,f=l<n.length&&a.spec.appendTransaction.call(a,l?n.slice(l):n,u,r);if(f&&r.filterTransaction(f,s)){if(f.setMeta("appendedTransaction",e),!o){o=[];for(let h=0;h<this.config.plugins.length;h++)o.push(h<s?{state:r,n:n.length}:{state:this,n:0})}n.push(f),r=r.applyInner(f),i=!0}o&&(o[s]={state:r,n:n.length})}}if(!i)return{state:r,transactions:n}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new Na(this.config),r=this.config.fields;for(let o=0;o<r.length;o++){let i=r[o];n[i.name]=i.apply(e,this[i.name],this,n)}return n}get tr(){return new UJ(this)}static create(e){let n=new ug(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new Na(n);for(let o=0;o<n.fields.length;o++)r[n.fields[o].name]=n.fields[o].init(e,r);return r}reconfigure(e){let n=new ug(this.schema,e.plugins),r=n.fields,o=new Na(n);for(let i=0;i<r.length;i++){let s=r[i].name;o[s]=this.hasOwnProperty(s)?this[s]:r[i].init(e,o)}return o}toJSON(e){let n={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(n.storedMarks=this.storedMarks.map(r=>r.toJSON())),e&&typeof e=="object")for(let r in e){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let o=e[r],i=o.spec.state;i&&i.toJSON&&(n[r]=i.toJSON.call(o,this[o.key]))}return n}static fromJSON(e,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let o=new ug(e.schema,e.plugins),i=new Na(o);return o.fields.forEach(s=>{if(s.name=="doc")i.doc=$i.fromJSON(e.schema,n.doc);else if(s.name=="selection")i.selection=Qe.fromJSON(i.doc,n.selection);else if(s.name=="storedMarks")n.storedMarks&&(i.storedMarks=n.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let a in r){let l=r[a],u=l.spec.state;if(l.key==s.name&&u&&u.fromJSON&&Object.prototype.hasOwnProperty.call(n,a)){i[s.name]=u.fromJSON.call(l,e,n[a],i);return}}i[s.name]=s.init(e,i)}}),i}}function hD(t,e,n){for(let r in t){let o=t[r];o instanceof Function?o=o.bind(e):r=="handleDOMEvents"&&(o=hD(o,e,{})),n[r]=o}return n}class en{constructor(e){this.spec=e,this.props={},e.props&&hD(e.props,this,this.props),this.key=e.key?e.key.key:mD("plugin")}getState(e){return e[this.key]}}const dg=Object.create(null);function mD(t){return t in dg?t+"$"+ ++dg[t]:(dg[t]=0,t+"$")}class gn{constructor(e="key"){this.key=mD(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const _n=function(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e},rl=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let Kv=null;const ei=function(t,e,n){let r=Kv||(Kv=document.createRange());return r.setEnd(t,n??t.nodeValue.length),r.setStart(t,e||0),r},YJ=function(){Kv=null},zs=function(t,e,n,r){return n&&(DE(t,e,n,r,-1)||DE(t,e,n,r,1))},GJ=/^(img|br|input|textarea|hr)$/i;function DE(t,e,n,r,o){for(;;){if(t==n&&e==r)return!0;if(e==(o<0?0:zr(t))){let i=t.parentNode;if(!i||i.nodeType!=1||lu(t)||GJ.test(t.nodeName)||t.contentEditable=="false")return!1;e=_n(t)+(o<0?0:1),t=i}else if(t.nodeType==1){if(t=t.childNodes[e+(o<0?-1:0)],t.contentEditable=="false")return!1;e=o<0?zr(t):0}else return!1}}function zr(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function JJ(t,e){for(;;){if(t.nodeType==3&&e)return t;if(t.nodeType==1&&e>0){if(t.contentEditable=="false")return null;t=t.childNodes[e-1],e=zr(t)}else if(t.parentNode&&!lu(t))e=_n(t),t=t.parentNode;else return null}}function ZJ(t,e){for(;;){if(t.nodeType==3&&e<t.nodeValue.length)return t;if(t.nodeType==1&&e<t.childNodes.length){if(t.contentEditable=="false")return null;t=t.childNodes[e],e=0}else if(t.parentNode&&!lu(t))e=_n(t)+1,t=t.parentNode;else return null}}function XJ(t,e,n){for(let r=e==0,o=e==zr(t);r||o;){if(t==n)return!0;let i=_n(t);if(t=t.parentNode,!t)return!1;r=r&&i==0,o=o&&i==zr(t)}}function lu(t){let e;for(let n=t;n&&!(e=n.pmViewDesc);n=n.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}const Kp=function(t){return t.focusNode&&zs(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function Cs(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function QJ(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function eZ(t,e,n){if(t.caretPositionFromPoint)try{let r=t.caretPositionFromPoint(e,n);if(r)return{node:r.offsetNode,offset:Math.min(zr(r.offsetNode),r.offset)}}catch{}if(t.caretRangeFromPoint){let r=t.caretRangeFromPoint(e,n);if(r)return{node:r.startContainer,offset:Math.min(zr(r.startContainer),r.startOffset)}}}const Io=typeof navigator<"u"?navigator:null,PE=typeof document<"u"?document:null,ns=Io&&Io.userAgent||"",Yv=/Edge\/(\d+)/.exec(ns),gD=/MSIE \d/.exec(ns),Gv=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ns),hr=!!(gD||Gv||Yv),Bi=gD?document.documentMode:Gv?+Gv[1]:Yv?+Yv[1]:0,io=!hr&&/gecko\/(\d+)/i.test(ns);io&&+(/Firefox\/(\d+)/.exec(ns)||[0,0])[1];const Jv=!hr&&/Chrome\/(\d+)/.exec(ns),zn=!!Jv,yD=Jv?+Jv[1]:0,er=!hr&&!!Io&&/Apple Computer/.test(Io.vendor),ol=er&&(/Mobile\/\w+/.test(ns)||!!Io&&Io.maxTouchPoints>2),Br=ol||(Io?/Mac/.test(Io.platform):!1),tZ=Io?/Win/.test(Io.platform):!1,ni=/Android \d/.test(ns),cu=!!PE&&"webkitFontSmoothing"in PE.documentElement.style,nZ=cu?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function rZ(t){let e=t.defaultView&&t.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function Yo(t,e){return typeof t=="number"?t:t[e]}function oZ(t){let e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,r=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*n,top:e.top,bottom:e.top+t.clientHeight*r}}function _E(t,e,n){let r=t.someProp("scrollThreshold")||0,o=t.someProp("scrollMargin")||5,i=t.dom.ownerDocument;for(let s=n||t.dom;s;){if(s.nodeType!=1){s=rl(s);continue}let a=s,l=a==i.body,u=l?rZ(i):oZ(a),f=0,h=0;if(e.top<u.top+Yo(r,"top")?h=-(u.top-e.top+Yo(o,"top")):e.bottom>u.bottom-Yo(r,"bottom")&&(h=e.bottom-e.top>u.bottom-u.top?e.top+Yo(o,"top")-u.top:e.bottom-u.bottom+Yo(o,"bottom")),e.left<u.left+Yo(r,"left")?f=-(u.left-e.left+Yo(o,"left")):e.right>u.right-Yo(r,"right")&&(f=e.right-u.right+Yo(o,"right")),f||h)if(l)i.defaultView.scrollBy(f,h);else{let g=a.scrollLeft,b=a.scrollTop;h&&(a.scrollTop+=h),f&&(a.scrollLeft+=f);let y=a.scrollLeft-g,S=a.scrollTop-b;e={left:e.left-y,top:e.top-S,right:e.right-y,bottom:e.bottom-S}}let m=l?"fixed":getComputedStyle(s).position;if(/^(fixed|sticky)$/.test(m))break;s=m=="absolute"?s.offsetParent:rl(s)}}function iZ(t){let e=t.dom.getBoundingClientRect(),n=Math.max(0,e.top),r,o;for(let i=(e.left+e.right)/2,s=n+1;s<Math.min(innerHeight,e.bottom);s+=5){let a=t.root.elementFromPoint(i,s);if(!a||a==t.dom||!t.dom.contains(a))continue;let l=a.getBoundingClientRect();if(l.top>=n-20){r=a,o=l.top;break}}return{refDOM:r,refTop:o,stack:bD(t.dom)}}function bD(t){let e=[],n=t.ownerDocument;for(let r=t;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),t!=n);r=rl(r));return e}function sZ({refDOM:t,refTop:e,stack:n}){let r=t?t.getBoundingClientRect().top:0;vD(n,r==0?0:r-e)}function vD(t,e){for(let n=0;n<t.length;n++){let{dom:r,top:o,left:i}=t[n];r.scrollTop!=o+e&&(r.scrollTop=o+e),r.scrollLeft!=i&&(r.scrollLeft=i)}}let Ca=null;function aZ(t){if(t.setActive)return t.setActive();if(Ca)return t.focus(Ca);let e=bD(t);t.focus(Ca==null?{get preventScroll(){return Ca={preventScroll:!0},!0}}:void 0),Ca||(Ca=!1,vD(e,0))}function xD(t,e){let n,r=2e8,o,i=0,s=e.top,a=e.top,l,u;for(let f=t.firstChild,h=0;f;f=f.nextSibling,h++){let m;if(f.nodeType==1)m=f.getClientRects();else if(f.nodeType==3)m=ei(f).getClientRects();else continue;for(let g=0;g<m.length;g++){let b=m[g];if(b.top<=s&&b.bottom>=a){s=Math.max(b.bottom,s),a=Math.min(b.top,a);let y=b.left>e.left?b.left-e.left:b.right<e.left?e.left-b.right:0;if(y<r){n=f,r=y,o=y&&n.nodeType==3?{left:b.right<e.left?b.right:b.left,top:e.top}:e,f.nodeType==1&&y&&(i=h+(e.left>=(b.left+b.right)/2?1:0));continue}}else b.top>e.top&&!l&&b.left<=e.left&&b.right>=e.left&&(l=f,u={left:Math.max(b.left,Math.min(b.right,e.left)),top:b.top});!n&&(e.left>=b.right&&e.top>=b.top||e.left>=b.left&&e.top>=b.bottom)&&(i=h+1)}}return!n&&l&&(n=l,o=u,r=0),n&&n.nodeType==3?lZ(n,o):!n||r&&n.nodeType==1?{node:t,offset:i}:xD(n,o)}function lZ(t,e){let n=t.nodeValue.length,r=document.createRange();for(let o=0;o<n;o++){r.setEnd(t,o+1),r.setStart(t,o);let i=Ei(r,1);if(i.top!=i.bottom&&Ix(e,i))return{node:t,offset:o+(e.left>=(i.left+i.right)/2?1:0)}}return{node:t,offset:0}}function Ix(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function cZ(t,e){let n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left<t.getBoundingClientRect().left?n:t}function uZ(t,e,n){let{node:r,offset:o}=xD(e,n),i=-1;if(r.nodeType==1&&!r.firstChild){let s=r.getBoundingClientRect();i=s.left!=s.right&&n.left>(s.left+s.right)/2?1:-1}return t.docView.posFromDOM(r,o,i)}function dZ(t,e,n,r){let o=-1;for(let i=e,s=!1;i!=t.dom;){let a=t.docView.nearestDesc(i,!0),l;if(!a)return null;if(a.dom.nodeType==1&&(a.node.isBlock&&a.parent||!a.contentDOM)&&((l=a.dom.getBoundingClientRect()).width||l.height)&&(a.node.isBlock&&a.parent&&(!s&&l.left>r.left||l.top>r.top?o=a.posBefore:(!s&&l.right<r.left||l.bottom<r.top)&&(o=a.posAfter),s=!0),!a.contentDOM&&o<0&&!a.node.isText))return(a.node.isBlock?r.top<(l.top+l.bottom)/2:r.left<(l.left+l.right)/2)?a.posBefore:a.posAfter;i=a.dom.parentNode}return o>-1?o:t.docView.posFromDOM(e,n,-1)}function SD(t,e,n){let r=t.childNodes.length;if(r&&n.top<n.bottom)for(let o=Math.max(0,Math.min(r-1,Math.floor(r*(e.top-n.top)/(n.bottom-n.top))-2)),i=o;;){let s=t.childNodes[i];if(s.nodeType==1){let a=s.getClientRects();for(let l=0;l<a.length;l++){let u=a[l];if(Ix(e,u))return SD(s,e,u)}}if((i=(i+1)%r)==o)break}return t}function fZ(t,e){let n=t.dom.ownerDocument,r,o=0,i=eZ(n,e.left,e.top);i&&({node:r,offset:o}=i);let s=(t.root.elementFromPoint?t.root:n).elementFromPoint(e.left,e.top),a;if(!s||!t.dom.contains(s.nodeType!=1?s.parentNode:s)){let u=t.dom.getBoundingClientRect();if(!Ix(e,u)||(s=SD(t.dom,e,u),!s))return null}if(er)for(let u=s;r&&u;u=rl(u))u.draggable&&(r=void 0);if(s=cZ(s,e),r){if(io&&r.nodeType==1&&(o=Math.min(o,r.childNodes.length),o<r.childNodes.length)){let f=r.childNodes[o],h;f.nodeName=="IMG"&&(h=f.getBoundingClientRect()).right<=e.left&&h.bottom>e.top&&o++}let u;cu&&o&&r.nodeType==1&&(u=r.childNodes[o-1]).nodeType==1&&u.contentEditable=="false"&&u.getBoundingClientRect().top>=e.top&&o--,r==t.dom&&o==r.childNodes.length-1&&r.lastChild.nodeType==1&&e.top>r.lastChild.getBoundingClientRect().bottom?a=t.state.doc.content.size:(o==0||r.nodeType!=1||r.childNodes[o-1].nodeName!="BR")&&(a=dZ(t,r,o,e))}a==null&&(a=uZ(t,s,e));let l=t.docView.nearestDesc(s,!0);return{pos:a,inside:l?l.posAtStart-l.border:-1}}function NE(t){return t.top<t.bottom||t.left<t.right}function Ei(t,e){let n=t.getClientRects();if(n.length){let r=n[e<0?0:n.length-1];if(NE(r))return r}return Array.prototype.find.call(n,NE)||t.getBoundingClientRect()}const pZ=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function CD(t,e,n){let{node:r,offset:o,atom:i}=t.docView.domFromPos(e,n<0?-1:1),s=cu||io;if(r.nodeType==3)if(s&&(pZ.test(r.nodeValue)||(n<0?!o:o==r.nodeValue.length))){let l=Ei(ei(r,o,o),n);if(io&&o&&/\s/.test(r.nodeValue[o-1])&&o<r.nodeValue.length){let u=Ei(ei(r,o-1,o-1),-1);if(u.top==l.top){let f=Ei(ei(r,o,o+1),-1);if(f.top!=l.top)return Wl(f,f.left<u.left)}}return l}else{let l=o,u=o,f=n<0?1:-1;return n<0&&!o?(u++,f=-1):n>=0&&o==r.nodeValue.length?(l--,f=1):n<0?l--:u++,Wl(Ei(ei(r,l,u),f),f<0)}if(!t.state.doc.resolve(e-(i||0)).parent.inlineContent){if(i==null&&o&&(n<0||o==zr(r))){let l=r.childNodes[o-1];if(l.nodeType==1)return fg(l.getBoundingClientRect(),!1)}if(i==null&&o<zr(r)){let l=r.childNodes[o];if(l.nodeType==1)return fg(l.getBoundingClientRect(),!0)}return fg(r.getBoundingClientRect(),n>=0)}if(i==null&&o&&(n<0||o==zr(r))){let l=r.childNodes[o-1],u=l.nodeType==3?ei(l,zr(l)-(s?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(u)return Wl(Ei(u,1),!1)}if(i==null&&o<zr(r)){let l=r.childNodes[o];for(;l.pmViewDesc&&l.pmViewDesc.ignoreForCoords;)l=l.nextSibling;let u=l?l.nodeType==3?ei(l,0,s?0:1):l.nodeType==1?l:null:null;if(u)return Wl(Ei(u,-1),!0)}return Wl(Ei(r.nodeType==3?ei(r):r,-n),n>=0)}function Wl(t,e){if(t.width==0)return t;let n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function fg(t,e){if(t.height==0)return t;let n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function wD(t,e,n){let r=t.state,o=t.root.activeElement;r!=e&&t.updateState(e),o!=t.dom&&t.focus();try{return n()}finally{r!=e&&t.updateState(r),o!=t.dom&&o&&o.focus()}}function hZ(t,e,n){let r=e.selection,o=n=="up"?r.$from:r.$to;return wD(t,e,()=>{let{node:i}=t.docView.domFromPos(o.pos,n=="up"?-1:1);for(;;){let a=t.docView.nearestDesc(i,!0);if(!a)break;if(a.node.isBlock){i=a.contentDOM||a.dom;break}i=a.dom.parentNode}let s=CD(t,o.pos,1);for(let a=i.firstChild;a;a=a.nextSibling){let l;if(a.nodeType==1)l=a.getClientRects();else if(a.nodeType==3)l=ei(a,0,a.nodeValue.length).getClientRects();else continue;for(let u=0;u<l.length;u++){let f=l[u];if(f.bottom>f.top+1&&(n=="up"?s.top-f.top>(f.bottom-s.top)*2:f.bottom-s.bottom>(s.bottom-f.top)*2))return!1}}return!0})}const mZ=/[\u0590-\u08ac]/;function gZ(t,e,n){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let o=r.parentOffset,i=!o,s=o==r.parent.content.size,a=t.domSelection();return a?!mZ.test(r.parent.textContent)||!a.modify?n=="left"||n=="backward"?i:s:wD(t,e,()=>{let{focusNode:l,focusOffset:u,anchorNode:f,anchorOffset:h}=t.domSelectionRange(),m=a.caretBidiLevel;a.modify("move",n,"character");let g=r.depth?t.docView.domAfterPos(r.before()):t.dom,{focusNode:b,focusOffset:y}=t.domSelectionRange(),S=b&&!g.contains(b.nodeType==1?b:b.parentNode)||l==b&&u==y;try{a.collapse(f,h),l&&(l!=f||u!=h)&&a.extend&&a.extend(l,u)}catch{}return m!=null&&(a.caretBidiLevel=m),S}):r.pos==r.start()||r.pos==r.end()}let LE=null,jE=null,$E=!1;function yZ(t,e,n){return LE==e&&jE==n?$E:(LE=e,jE=n,$E=n=="up"||n=="down"?hZ(t,e,n):gZ(t,e,n))}const qr=0,FE=1,ks=2,Do=3;class uu{constructor(e,n,r,o){this.parent=e,this.children=n,this.dom=r,this.contentDOM=o,this.dirty=qr,r.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,n,r){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let n=0;n<this.children.length;n++)e+=this.children[n].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let n=0,r=this.posAtStart;;n++){let o=this.children[n];if(o==e)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(e,n,r){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(r<0){let i,s;if(e==this.contentDOM)i=e.childNodes[n-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.previousSibling}for(;i&&!((s=i.pmViewDesc)&&s.parent==this);)i=i.previousSibling;return i?this.posBeforeChild(s)+s.size:this.posAtStart}else{let i,s;if(e==this.contentDOM)i=e.childNodes[n];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.nextSibling}for(;i&&!((s=i.pmViewDesc)&&s.parent==this);)i=i.nextSibling;return i?this.posBeforeChild(s):this.posAtEnd}let o;if(e==this.dom&&this.contentDOM)o=n>_n(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))o=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let i=e;;i=i.parentNode){if(i==this.dom){o=!1;break}if(i.previousSibling)break}if(o==null&&n==e.childNodes.length)for(let i=e;;i=i.parentNode){if(i==this.dom){o=!0;break}if(i.nextSibling)break}}return o??r>0?this.posAtEnd:this.posAtStart}nearestDesc(e,n=!1){for(let r=!0,o=e;o;o=o.parentNode){let i=this.getDesc(o),s;if(i&&(!n||i.node))if(r&&(s=i.nodeDOM)&&!(s.nodeType==1?s.contains(e.nodeType==1?e:e.parentNode):s==e))r=!1;else return i}}getDesc(e){let n=e.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(e,n,r){for(let o=e;o;o=o.parentNode){let i=this.getDesc(o);if(i)return i.localPosFromDOM(e,n,r)}return-1}descAt(e){for(let n=0,r=0;n<this.children.length;n++){let o=this.children[n],i=r+o.size;if(r==e&&i!=r){for(;!o.border&&o.children.length;)for(let s=0;s<o.children.length;s++){let a=o.children[s];if(a.size){o=a;break}}return o}if(e<i)return o.descAt(e-r-o.border);r=i}}domFromPos(e,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let r=0,o=0;for(let i=0;r<this.children.length;r++){let s=this.children[r],a=i+s.size;if(a>e||s instanceof ED){o=e-i;break}i=a}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 TD&&i.side>=0;r--);if(n<=0){let i,s=!0;for(;i=r?this.children[r-1]:null,!(!i||i.dom.parentNode==this.contentDOM);r--,s=!1);return i&&n&&s&&!i.border&&!i.domAtom?i.domFromPos(i.size,n):{node:this.contentDOM,offset:i?_n(i.dom)+1:0}}else{let i,s=!0;for(;i=r<this.children.length?this.children[r]:null,!(!i||i.dom.parentNode==this.contentDOM);r++,s=!1);return i&&s&&!i.border&&!i.domAtom?i.domFromPos(0,n):{node:this.contentDOM,offset:i?_n(i.dom):this.contentDOM.childNodes.length}}}parseRange(e,n,r=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let o=-1,i=-1;for(let s=r,a=0;;a++){let l=this.children[a],u=s+l.size;if(o==-1&&e<=u){let f=s+l.border;if(e>=f&&n<=u-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(e,n,f);e=s;for(let h=a;h>0;h--){let m=this.children[h-1];if(m.size&&m.dom.parentNode==this.contentDOM&&!m.emptyChildAt(1)){o=_n(m.dom)+1;break}e-=m.size}o==-1&&(o=0)}if(o>-1&&(u>n||a==this.children.length-1)){n=u;for(let f=a+1;f<this.children.length;f++){let h=this.children[f];if(h.size&&h.dom.parentNode==this.contentDOM&&!h.emptyChildAt(-1)){i=_n(h.dom);break}n+=h.size}i==-1&&(i=this.contentDOM.childNodes.length);break}s=u}return{node:this.contentDOM,from:e,to:n,fromOffset:o,toOffset:i}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let n=this.children[e<0?0:this.children.length-1];return n.size==0||n.emptyChildAt(e)}domAfterPos(e){let{node:n,offset:r}=this.domFromPos(e,0);if(n.nodeType!=1||r==n.childNodes.length)throw new RangeError("No node after pos "+e);return n.childNodes[r]}setSelection(e,n,r,o=!1){let i=Math.min(e,n),s=Math.max(e,n);for(let g=0,b=0;g<this.children.length;g++){let y=this.children[g],S=b+y.size;if(i>b&&s<S)return y.setSelection(e-b-y.border,n-b-y.border,r,o);b=S}let a=this.domFromPos(e,e?-1:1),l=n==e?a:this.domFromPos(n,n?-1:1),u=r.root.getSelection(),f=r.domSelectionRange(),h=!1;if((io||er)&&e==n){let{node:g,offset:b}=a;if(g.nodeType==3){if(h=!!(b&&g.nodeValue[b-1]==`
238
+ `),h&&b==g.nodeValue.length)for(let y=g,S;y;y=y.parentNode){if(S=y.nextSibling){S.nodeName=="BR"&&(a=l={node:S.parentNode,offset:_n(S)+1});break}let C=y.pmViewDesc;if(C&&C.node&&C.node.isBlock)break}}else{let y=g.childNodes[b-1];h=y&&(y.nodeName=="BR"||y.contentEditable=="false")}}if(io&&f.focusNode&&f.focusNode!=l.node&&f.focusNode.nodeType==1){let g=f.focusNode.childNodes[f.focusOffset];g&&g.contentEditable=="false"&&(o=!0)}if(!(o||h&&er)&&zs(a.node,a.offset,f.anchorNode,f.anchorOffset)&&zs(l.node,l.offset,f.focusNode,f.focusOffset))return;let m=!1;if((u.extend||e==n)&&!h){u.collapse(a.node,a.offset);try{e!=n&&u.extend(l.node,l.offset),m=!0}catch{}}if(!m){if(e>n){let b=a;a=l,l=b}let g=document.createRange();g.setEnd(l.node,l.offset),g.setStart(a.node,a.offset),u.removeAllRanges(),u.addRange(g)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,n){for(let r=0,o=0;o<this.children.length;o++){let i=this.children[o],s=r+i.size;if(r==s?e<=s&&n>=r:e<s&&n>r){let a=r+i.border,l=s-i.border;if(e>=a&&n<=l){this.dirty=e==r||n==s?ks:FE,e==a&&n==l&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=Do:i.markDirty(e-a,n-a);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?ks:Do}r=s}this.dirty=ks}markParentsDirty(){let e=1;for(let n=this.parent;n;n=n.parent,e++){let r=e==1?ks:FE;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}isText(e){return!1}}class TD extends uu{constructor(e,n,r,o){let i,s=n.type.toDOM;if(typeof s=="function"&&(s=s(r,()=>{if(!i)return o;if(i.parent)return i.parent.posBeforeChild(i)})),!n.type.spec.raw){if(s.nodeType!=1){let a=document.createElement("span");a.appendChild(s),s=a}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(e,[],s,null),this.widget=n,this.widget=n,i=this}matchesWidget(e){return this.dirty==qr&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let n=this.widget.spec.stopEvent;return n?n(e):!1}ignoreMutation(e){return e.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 bZ extends uu{constructor(e,n,r,o){super(e,[],n,null),this.textDOM=r,this.text=o}get size(){return this.text.length}localPosFromDOM(e,n){return e!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class Hs extends uu{constructor(e,n,r,o,i){super(e,[],r,o),this.mark=n,this.spec=i}static create(e,n,r,o){let i=o.nodeViews[n.type.name],s=i&&i(n,o,r);return(!s||!s.dom)&&(s=Ys.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new Hs(e,n,s.dom,s.contentDOM||s.dom,s)}parseRule(){return this.dirty&Do||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=Do&&this.mark.eq(e)}markDirty(e,n){if(super.markDirty(e,n),this.dirty!=qr){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=qr}}slice(e,n,r){let o=Hs.create(this.parent,this.mark,!0,r),i=this.children,s=this.size;n<s&&(i=Xv(i,n,s,r)),e>0&&(i=Xv(i,0,e,r));for(let a=0;a<i.length;a++)i[a].parent=o;return o.children=i,o}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class Vi extends uu{constructor(e,n,r,o,i,s,a,l,u){super(e,[],i,s),this.node=n,this.outerDeco=r,this.innerDeco=o,this.nodeDOM=a}static create(e,n,r,o,i,s){let a=i.nodeViews[n.type.name],l,u=a&&a(n,i,()=>{if(!l)return s;if(l.parent)return l.parent.posBeforeChild(l)},r,o),f=u&&u.dom,h=u&&u.contentDOM;if(n.isText){if(!f)f=document.createTextNode(n.text);else if(f.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else f||({dom:f,contentDOM:h}=Ys.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!h&&!n.isText&&f.nodeName!="BR"&&(f.hasAttribute("contenteditable")||(f.contentEditable="false"),n.type.spec.draggable&&(f.draggable=!0));let m=f;return f=OD(f,r,n),u?l=new vZ(e,n,r,o,f,h||null,m,u,i,s+1):n.isText?new Yp(e,n,r,o,f,m,i):new Vi(e,n,r,o,f,h||null,m,i,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.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)){e.contentElement=r.dom.parentNode;break}}e.contentElement||(e.getContent=()=>Te.empty)}return e}matchesNode(e,n,r){return this.dirty==qr&&e.eq(this.node)&&kf(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,n){let r=this.node.inlineContent,o=n,i=e.composing?this.localCompositionInfo(e,n):null,s=i&&i.pos>-1?i:null,a=i&&i.pos<0,l=new SZ(this,s&&s.node,e);TZ(this.node,this.innerDeco,(u,f,h)=>{u.spec.marks?l.syncToMarks(u.spec.marks,r,e):u.type.side>=0&&!h&&l.syncToMarks(f==this.node.childCount?Lt.none:this.node.child(f).marks,r,e),l.placeWidget(u,e,o)},(u,f,h,m)=>{l.syncToMarks(u.marks,r,e);let g;l.findNodeMatch(u,f,h,m)||a&&e.state.selection.from>o&&e.state.selection.to<o+u.nodeSize&&(g=l.findIndexWithChild(i.node))>-1&&l.updateNodeAt(u,f,h,g,e)||l.updateNextNode(u,f,h,e,m,o)||l.addNode(u,f,h,e,o),o+=u.nodeSize}),l.syncToMarks([],r,e),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==ks)&&(s&&this.protectLocalComposition(e,s),kD(this.contentDOM,this.children,e),ol&&EZ(this.dom))}localCompositionInfo(e,n){let{from:r,to:o}=e.state.selection;if(!(e.state.selection instanceof Ge)||r<n||o>n+this.node.content.size)return null;let i=e.input.compositionNode;if(!i||!this.dom.contains(i.parentNode))return null;if(this.node.inlineContent){let s=i.nodeValue,a=kZ(this.node.content,s,r-n,o-n);return a<0?null:{node:i,pos:a,text:s}}else return{node:i,pos:-1,text:""}}protectLocalComposition(e,{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 s=new bZ(this,i,n,o);e.input.compositionNodes.push(s),this.children=Xv(this.children,r,r+o.length,e,s)}update(e,n,r,o){return this.dirty==Do||!e.sameMarkup(this.node)?!1:(this.updateInner(e,n,r,o),!0)}updateInner(e,n,r,o){this.updateOuterDeco(n),this.node=e,this.innerDeco=r,this.contentDOM&&this.updateChildren(o,this.posAtStart),this.dirty=qr}updateOuterDeco(e){if(kf(e,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=MD(this.dom,this.nodeDOM,Zv(this.outerDeco,this.node,n),Zv(e,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}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 BE(t,e,n,r,o){OD(r,e,t);let i=new Vi(void 0,t,e,n,r,r,r,o,0);return i.contentDOM&&i.updateChildren(o,0),i}class Yp extends Vi{constructor(e,n,r,o,i,s,a){super(e,n,r,o,i,null,s,a,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,n,r,o){return this.dirty==Do||this.dirty!=qr&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=qr||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,o.trackWrites==this.nodeDOM&&(o.trackWrites=null)),this.node=e,this.dirty=qr,!0)}inParent(){let e=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,n,r){return e==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(e,n,r)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,n,r){let o=this.node.cut(e,n),i=document.createTextNode(o.text);return new Yp(this.parent,o,this.outerDeco,this.innerDeco,i,i,r)}markDirty(e,n){super.markDirty(e,n),this.dom!=this.nodeDOM&&(e==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=Do)}get domAtom(){return!1}isText(e){return this.node.text==e}}class ED extends uu{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==qr&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class vZ extends Vi{constructor(e,n,r,o,i,s,a,l,u,f){super(e,n,r,o,i,s,a,u,f),this.spec=l}update(e,n,r,o){if(this.dirty==Do)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let i=this.spec.update(e,n,r);return i&&this.updateInner(e,n,r,o),i}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,n,r,o)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,n,r,o){this.spec.setSelection?this.spec.setSelection(e,n,r.root):super.setSelection(e,n,r,o)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function kD(t,e,n){let r=t.firstChild,o=!1;for(let i=0;i<e.length;i++){let s=e[i],a=s.dom;if(a.parentNode==t){for(;a!=r;)r=VE(r),o=!0;r=r.nextSibling}else o=!0,t.insertBefore(a,r);if(s instanceof Hs){let l=r?r.previousSibling:t.lastChild;kD(s.contentDOM,s.children,n),r=l?l.nextSibling:t.firstChild}}for(;r;)r=VE(r),o=!0;o&&n.trackWrites==t&&(n.trackWrites=null)}const hc=function(t){t&&(this.nodeName=t)};hc.prototype=Object.create(null);const Ms=[new hc];function Zv(t,e,n){if(t.length==0)return Ms;let r=n?Ms[0]:new hc,o=[r];for(let i=0;i<t.length;i++){let s=t[i].type.attrs;if(s){s.nodeName&&o.push(r=new hc(s.nodeName));for(let a in s){let l=s[a];l!=null&&(n&&o.length==1&&o.push(r=new hc(e.isInline?"span":"div")),a=="class"?r.class=(r.class?r.class+" ":"")+l:a=="style"?r.style=(r.style?r.style+";":"")+l:a!="nodeName"&&(r[a]=l))}}}return o}function MD(t,e,n,r){if(n==Ms&&r==Ms)return e;let o=e;for(let i=0;i<r.length;i++){let s=r[i],a=n[i];if(i){let l;a&&a.nodeName==s.nodeName&&o!=t&&(l=o.parentNode)&&l.nodeName.toLowerCase()==s.nodeName||(l=document.createElement(s.nodeName),l.pmIsDeco=!0,l.appendChild(o),a=Ms[0]),o=l}xZ(o,a||Ms[0],s)}return o}function xZ(t,e,n){for(let r in e)r!="class"&&r!="style"&&r!="nodeName"&&!(r in n)&&t.removeAttribute(r);for(let r in n)r!="class"&&r!="style"&&r!="nodeName"&&n[r]!=e[r]&&t.setAttribute(r,n[r]);if(e.class!=n.class){let r=e.class?e.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&&t.classList.remove(r[i]);for(let i=0;i<o.length;i++)r.indexOf(o[i])==-1&&t.classList.add(o[i]);t.classList.length==0&&t.removeAttribute("class")}if(e.style!=n.style){if(e.style){let r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,o;for(;o=r.exec(e.style);)t.style.removeProperty(o[1])}n.style&&(t.style.cssText+=n.style)}}function OD(t,e,n){return MD(t,t,Ms,Zv(e,n,t.nodeType!=1))}function kf(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].type.eq(e[n].type))return!1;return!0}function VE(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class SZ{constructor(e,n,r){this.lock=n,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=CZ(e.node.content,e)}destroyBetween(e,n){if(e!=n){for(let r=e;r<n;r++)this.top.children[r].destroy();this.top.children.splice(e,n-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,n,r){let o=0,i=this.stack.length>>1,s=Math.min(i,e.length);for(;o<s&&(o==i-1?this.top:this.stack[o+1<<1]).matchesMark(e[o])&&e[o].type.spec.spanning!==!1;)o++;for(;o<i;)this.destroyRest(),this.top.dirty=qr,this.index=this.stack.pop(),this.top=this.stack.pop(),i--;for(;i<e.length;){this.stack.push(this.top,this.index+1);let a=-1;for(let l=this.index;l<Math.min(this.index+3,this.top.children.length);l++){let u=this.top.children[l];if(u.matchesMark(e[i])&&!this.isLocked(u.dom)){a=l;break}}if(a>-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{let l=Hs.create(this.top,e[i],n,r);this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,i++}}findNodeMatch(e,n,r,o){let i=-1,s;if(o>=this.preMatch.index&&(s=this.preMatch.matches[o-this.preMatch.index]).parent==this.top&&s.matchesNode(e,n,r))i=this.top.children.indexOf(s,this.index);else for(let a=this.index,l=Math.min(this.top.children.length,a+5);a<l;a++){let u=this.top.children[a];if(u.matchesNode(e,n,r)&&!this.preMatch.matched.has(u)){i=a;break}}return i<0?!1:(this.destroyBetween(this.index,i),this.index++,!0)}updateNodeAt(e,n,r,o,i){let s=this.top.children[o];return s.dirty==Do&&s.dom==s.contentDOM&&(s.dirty=ks),s.update(e,n,r,i)?(this.destroyBetween(this.index,o),this.index++,!0):!1}findIndexWithChild(e){for(;;){let n=e.parentNode;if(!n)return-1;if(n==this.top.contentDOM){let r=e.pmViewDesc;if(r){for(let o=this.index;o<this.top.children.length;o++)if(this.top.children[o]==r)return o}return-1}e=n}}updateNextNode(e,n,r,o,i,s){for(let a=this.index;a<this.top.children.length;a++){let l=this.top.children[a];if(l instanceof Vi){let u=this.preMatch.matched.get(l);if(u!=null&&u!=i)return!1;let f=l.dom,h,m=this.isLocked(f)&&!(e.isText&&l.node&&l.node.isText&&l.nodeDOM.nodeValue==e.text&&l.dirty!=Do&&kf(n,l.outerDeco));if(!m&&l.update(e,n,r,o))return this.destroyBetween(this.index,a),l.dom!=f&&(this.changed=!0),this.index++,!0;if(!m&&(h=this.recreateWrapper(l,e,n,r,o,s)))return this.destroyBetween(this.index,a),this.top.children[this.index]=h,h.contentDOM&&(h.dirty=ks,h.updateChildren(o,s+1),h.dirty=qr),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,n,r,o,i,s){if(e.dirty||n.isAtom||!e.children.length||!e.node.content.eq(n.content)||!kf(r,e.outerDeco)||!o.eq(e.innerDeco))return null;let a=Vi.create(this.top,n,r,o,i,s);if(a.contentDOM){a.children=e.children,e.children=[];for(let l of a.children)l.parent=a}return e.destroy(),a}addNode(e,n,r,o,i){let s=Vi.create(this.top,e,n,r,o,i);s.contentDOM&&s.updateChildren(o,i+1),this.top.children.splice(this.index++,0,s),this.changed=!0}placeWidget(e,n,r){let o=this.index<this.top.children.length?this.top.children[this.index]:null;if(o&&o.matchesWidget(e)&&(e==o.widget||!o.widget.type.toDOM.parentNode))this.index++;else{let i=new TD(this.top,e,n,r);this.top.children.splice(this.index++,0,i),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],n=this.top;for(;e instanceof Hs;)n=e,e=n.children[n.children.length-1];(!e||!(e instanceof Yp)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((er||zn)&&e&&e.dom.contentEditable=="false"&&this.addHackNode("IMG",n),this.addHackNode("BR",this.top))}addHackNode(e,n){if(n==this.top&&this.index<n.children.length&&n.children[this.index].matchesHack(e))this.index++;else{let r=document.createElement(e);e=="IMG"&&(r.className="ProseMirror-separator",r.alt=""),e=="BR"&&(r.className="ProseMirror-trailingBreak");let o=new ED(this.top,[],r,null);n!=this.top?n.children.push(o):n.children.splice(this.index++,0,o),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function CZ(t,e){let n=e,r=n.children.length,o=t.childCount,i=new Map,s=[];e:for(;o>0;){let a;for(;;)if(r){let u=n.children[r-1];if(u instanceof Hs)n=u,r=u.children.length;else{a=u,r--;break}}else{if(n==e)break e;r=n.parent.children.indexOf(n),n=n.parent}let l=a.node;if(l){if(l!=t.child(o-1))break;--o,i.set(a,o),s.push(a)}}return{index:o,matched:i,matches:s.reverse()}}function wZ(t,e){return t.type.side-e.type.side}function TZ(t,e,n,r){let o=e.locals(t),i=0;if(o.length==0){for(let u=0;u<t.childCount;u++){let f=t.child(u);r(f,o,e.forChild(i,f),u),i+=f.nodeSize}return}let s=0,a=[],l=null;for(let u=0;;){let f,h;for(;s<o.length&&o[s].to==i;){let S=o[s++];S.widget&&(f?(h||(h=[f])).push(S):f=S)}if(f)if(h){h.sort(wZ);for(let S=0;S<h.length;S++)n(h[S],u,!!l)}else n(f,u,!!l);let m,g;if(l)g=-1,m=l,l=null;else if(u<t.childCount)g=u,m=t.child(u++);else break;for(let S=0;S<a.length;S++)a[S].to<=i&&a.splice(S--,1);for(;s<o.length&&o[s].from<=i&&o[s].to>i;)a.push(o[s++]);let b=i+m.nodeSize;if(m.isText){let S=b;s<o.length&&o[s].from<S&&(S=o[s].from);for(let C=0;C<a.length;C++)a[C].to<S&&(S=a[C].to);S<b&&(l=m.cut(S-i),m=m.cut(0,S-i),b=S,g=-1)}else for(;s<o.length&&o[s].to<b;)s++;let y=m.isInline&&!m.isLeaf?a.filter(S=>!S.inline):a.slice();r(m,y,e.forChild(i,m),g),i=b}}function EZ(t){if(t.nodeName=="UL"||t.nodeName=="OL"){let e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}function kZ(t,e,n,r){for(let o=0,i=0;o<t.childCount&&i<=r;){let s=t.child(o++),a=i;if(i+=s.nodeSize,!s.isText)continue;let l=s.text;for(;o<t.childCount;){let u=t.child(o++);if(i+=u.nodeSize,!u.isText)break;l+=u.text}if(i>=n){if(i>=r&&l.slice(r-e.length-a,r-a)==e)return r-e.length;let u=a<r?l.lastIndexOf(e,r-a-1):-1;if(u>=0&&u+e.length+a>=n)return a+u;if(n==r&&l.length>=r+e.length-a&&l.slice(r-a,r-a+e.length)==e)return r}}return-1}function Xv(t,e,n,r,o){let i=[];for(let s=0,a=0;s<t.length;s++){let l=t[s],u=a,f=a+=l.size;u>=n||f<=e?i.push(l):(u<e&&i.push(l.slice(0,e-u,r)),o&&(i.push(o),o=void 0),f>n&&i.push(l.slice(n-u,l.size,r)))}return i}function Dx(t,e=null){let n=t.domSelectionRange(),r=t.state.doc;if(!n.focusNode)return null;let o=t.docView.nearestDesc(n.focusNode),i=o&&o.size==0,s=t.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let a=r.resolve(s),l,u;if(Kp(n)){for(l=s;o&&!o.node;)o=o.parent;let h=o.node;if(o&&h.isAtom&&qe.isSelectable(h)&&o.parent&&!(h.isInline&&XJ(n.focusNode,n.focusOffset,o.dom))){let m=o.posBefore;u=new qe(s==m?a:r.resolve(m))}}else{if(n instanceof t.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let h=s,m=s;for(let g=0;g<n.rangeCount;g++){let b=n.getRangeAt(g);h=Math.min(h,t.docView.posFromDOM(b.startContainer,b.startOffset,1)),m=Math.max(m,t.docView.posFromDOM(b.endContainer,b.endOffset,-1))}if(h<0)return null;[l,s]=m==t.state.selection.anchor?[m,h]:[h,m],a=r.resolve(s)}else l=t.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(l<0)return null}let f=r.resolve(l);if(!u){let h=e=="pointer"||t.state.selection.head<a.pos&&!i?1:-1;u=Px(t,f,a,h)}return u}function RD(t){return t.editable?t.hasFocus():ID(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function oi(t,e=!1){let n=t.state.selection;if(AD(t,n),!!RD(t)){if(!e&&t.input.mouseDown&&t.input.mouseDown.allowDefault&&zn){let r=t.domSelectionRange(),o=t.domObserver.currentSelection;if(r.anchorNode&&o.anchorNode&&zs(r.anchorNode,r.anchorOffset,o.anchorNode,o.anchorOffset)){t.input.mouseDown.delayedSelectionSync=!0,t.domObserver.setCurSelection();return}}if(t.domObserver.disconnectSelection(),t.cursorWrapper)OZ(t);else{let{anchor:r,head:o}=n,i,s;zE&&!(n instanceof Ge)&&(n.$from.parent.inlineContent||(i=HE(t,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(s=HE(t,n.to))),t.docView.setSelection(r,o,t,e),zE&&(i&&WE(i),s&&WE(s)),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&MZ(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}const zE=er||zn&&yD<63;function HE(t,e){let{node:n,offset:r}=t.docView.domFromPos(e,0),o=r<n.childNodes.length?n.childNodes[r]:null,i=r?n.childNodes[r-1]:null;if(er&&o&&o.contentEditable=="false")return pg(o);if((!o||o.contentEditable=="false")&&(!i||i.contentEditable=="false")){if(o)return pg(o);if(i)return pg(i)}}function pg(t){return t.contentEditable="true",er&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function WE(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function MZ(t){let e=t.dom.ownerDocument;e.removeEventListener("selectionchange",t.input.hideSelectionGuard);let n=t.domSelectionRange(),r=n.anchorNode,o=n.anchorOffset;e.addEventListener("selectionchange",t.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=o)&&(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout(()=>{(!RD(t)||t.state.selection.visible)&&t.dom.classList.remove("ProseMirror-hideselection")},20))})}function OZ(t){let e=t.domSelection(),n=document.createRange();if(!e)return;let r=t.cursorWrapper.dom,o=r.nodeName=="IMG";o?n.setStart(r.parentNode,_n(r)+1):n.setStart(r,0),n.collapse(!0),e.removeAllRanges(),e.addRange(n),!o&&!t.state.selection.visible&&hr&&Bi<=11&&(r.disabled=!0,r.disabled=!1)}function AD(t,e){if(e instanceof qe){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(qE(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else qE(t)}function qE(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function Px(t,e,n,r){return t.someProp("createSelectionBetween",o=>o(t,e,n))||Ge.between(e,n,r)}function UE(t){return t.editable&&!t.hasFocus()?!1:ID(t)}function ID(t){let e=t.domSelectionRange();if(!e.anchorNode)return!1;try{return t.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function RZ(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.domSelectionRange();return zs(e.node,e.offset,n.anchorNode,n.anchorOffset)}function Qv(t,e){let{$anchor:n,$head:r}=t.selection,o=e>0?n.max(r):n.min(r),i=o.parent.inlineContent?o.depth?t.doc.resolve(e>0?o.after():o.before()):null:o;return i&&Qe.findFrom(i,e)}function ki(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function KE(t,e,n){let r=t.state.selection;if(r instanceof Ge)if(n.indexOf("s")>-1){let{$head:o}=r,i=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let s=t.state.doc.resolve(o.pos+i.nodeSize*(e<0?-1:1));return ki(t,new Ge(r.$anchor,s))}else if(r.empty){if(t.endOfTextblock(e>0?"forward":"backward")){let o=Qv(t.state,e);return o&&o instanceof qe?ki(t,o):!1}else if(!(Br&&n.indexOf("m")>-1)){let o=r.$head,i=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter,s;if(!i||i.isText)return!1;let a=e<0?o.pos-i.nodeSize:o.pos;return i.isAtom||(s=t.docView.descAt(a))&&!s.contentDOM?qe.isSelectable(i)?ki(t,new qe(e<0?t.state.doc.resolve(o.pos-i.nodeSize):o)):cu?ki(t,new Ge(t.state.doc.resolve(e<0?a:a+i.nodeSize))):!1:!1}}else return!1;else{if(r instanceof qe&&r.node.isInline)return ki(t,new Ge(e>0?r.$to:r.$from));{let o=Qv(t.state,e);return o?ki(t,o):!1}}}function Mf(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function mc(t,e){let n=t.pmViewDesc;return n&&n.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function wa(t,e){return e<0?AZ(t):IZ(t)}function AZ(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let o,i,s=!1;for(io&&n.nodeType==1&&r<Mf(n)&&mc(n.childNodes[r],-1)&&(s=!0);;)if(r>0){if(n.nodeType!=1)break;{let a=n.childNodes[r-1];if(mc(a,-1))o=n,i=--r;else if(a.nodeType==3)n=a,r=n.nodeValue.length;else break}}else{if(DD(n))break;{let a=n.previousSibling;for(;a&&mc(a,-1);)o=n.parentNode,i=_n(a),a=a.previousSibling;if(a)n=a,r=Mf(n);else{if(n=n.parentNode,n==t.dom)break;r=0}}}s?e0(t,n,r):o&&e0(t,o,i)}function IZ(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let o=Mf(n),i,s;for(;;)if(r<o){if(n.nodeType!=1)break;let a=n.childNodes[r];if(mc(a,1))i=n,s=++r;else break}else{if(DD(n))break;{let a=n.nextSibling;for(;a&&mc(a,1);)i=a.parentNode,s=_n(a)+1,a=a.nextSibling;if(a)n=a,r=0,o=Mf(n);else{if(n=n.parentNode,n==t.dom)break;r=o=0}}}i&&e0(t,i,s)}function DD(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function DZ(t,e){for(;t&&e==t.childNodes.length&&!lu(t);)e=_n(t)+1,t=t.parentNode;for(;t&&e<t.childNodes.length;){let n=t.childNodes[e];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=0}}function PZ(t,e){for(;t&&!e&&!lu(t);)e=_n(t),t=t.parentNode;for(;t&&e;){let n=t.childNodes[e-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=t.childNodes.length}}function e0(t,e,n){if(e.nodeType!=3){let i,s;(s=DZ(e,n))?(e=s,n=0):(i=PZ(e,n))&&(e=i,n=i.nodeValue.length)}let r=t.domSelection();if(!r)return;if(Kp(r)){let i=document.createRange();i.setEnd(e,n),i.setStart(e,n),r.removeAllRanges(),r.addRange(i)}else r.extend&&r.extend(e,n);t.domObserver.setCurSelection();let{state:o}=t;setTimeout(()=>{t.state==o&&oi(t)},50)}function YE(t,e){let n=t.state.doc.resolve(e);if(!(zn||tZ)&&n.parent.inlineContent){let o=t.coordsAtPos(e);if(e>n.start()){let i=t.coordsAtPos(e-1),s=(i.top+i.bottom)/2;if(s>o.top&&s<o.bottom&&Math.abs(i.left-o.left)>1)return i.left<o.left?"ltr":"rtl"}if(e<n.end()){let i=t.coordsAtPos(e+1),s=(i.top+i.bottom)/2;if(s>o.top&&s<o.bottom&&Math.abs(i.left-o.left)>1)return i.left>o.left?"ltr":"rtl"}}return getComputedStyle(t.dom).direction=="rtl"?"rtl":"ltr"}function GE(t,e,n){let r=t.state.selection;if(r instanceof Ge&&!r.empty||n.indexOf("s")>-1||Br&&n.indexOf("m")>-1)return!1;let{$from:o,$to:i}=r;if(!o.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let s=Qv(t.state,e);if(s&&s instanceof qe)return ki(t,s)}if(!o.parent.inlineContent){let s=e<0?o:i,a=r instanceof Wr?Qe.near(s,e):Qe.findFrom(s,e);return a?ki(t,a):!1}return!1}function JE(t,e){if(!(t.state.selection instanceof Ge))return!0;let{$head:n,$anchor:r,empty:o}=t.state.selection;if(!n.sameParent(r))return!0;if(!o)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let i=!n.textOffset&&(e<0?n.nodeBefore:n.nodeAfter);if(i&&!i.isText){let s=t.state.tr;return e<0?s.delete(n.pos-i.nodeSize,n.pos):s.delete(n.pos,n.pos+i.nodeSize),t.dispatch(s),!0}return!1}function ZE(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function _Z(t){if(!er||t.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(e&&e.nodeType==1&&n==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let r=e.firstChild;ZE(t,r,"true"),setTimeout(()=>ZE(t,r,"false"),20)}return!1}function NZ(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function LZ(t,e){let n=e.keyCode,r=NZ(e);if(n==8||Br&&n==72&&r=="c")return JE(t,-1)||wa(t,-1);if(n==46&&!e.shiftKey||Br&&n==68&&r=="c")return JE(t,1)||wa(t,1);if(n==13||n==27)return!0;if(n==37||Br&&n==66&&r=="c"){let o=n==37?YE(t,t.state.selection.from)=="ltr"?-1:1:-1;return KE(t,o,r)||wa(t,o)}else if(n==39||Br&&n==70&&r=="c"){let o=n==39?YE(t,t.state.selection.from)=="ltr"?1:-1:1;return KE(t,o,r)||wa(t,o)}else{if(n==38||Br&&n==80&&r=="c")return GE(t,-1,r)||wa(t,-1);if(n==40||Br&&n==78&&r=="c")return _Z(t)||GE(t,1,r)||wa(t,1);if(r==(Br?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function _x(t,e){t.someProp("transformCopied",g=>{e=g(e,t)});let n=[],{content:r,openStart:o,openEnd:i}=e;for(;o>1&&i>1&&r.childCount==1&&r.firstChild.childCount==1;){o--,i--;let g=r.firstChild;n.push(g.type.name,g.attrs!=g.type.defaultAttrs?g.attrs:null),r=g.content}let s=t.someProp("clipboardSerializer")||Ys.fromSchema(t.state.schema),a=$D(),l=a.createElement("div");l.appendChild(s.serializeFragment(r,{document:a}));let u=l.firstChild,f,h=0;for(;u&&u.nodeType==1&&(f=jD[u.nodeName.toLowerCase()]);){for(let g=f.length-1;g>=0;g--){let b=a.createElement(f[g]);for(;l.firstChild;)b.appendChild(l.firstChild);l.appendChild(b),h++}u=l.firstChild}u&&u.nodeType==1&&u.setAttribute("data-pm-slice",`${o} ${i}${h?` -${h}`:""} ${JSON.stringify(n)}`);let m=t.someProp("clipboardTextSerializer",g=>g(e,t))||e.content.textBetween(0,e.content.size,`
239
+
240
+ `);return{dom:l,text:m,slice:e}}function PD(t,e,n,r,o){let i=o.parent.type.spec.code,s,a;if(!n&&!e)return null;let l=e&&(r||i||!n);if(l){if(t.someProp("transformPastedText",m=>{e=m(e,i||r,t)}),i)return e?new Ae(Te.from(t.state.schema.text(e.replace(/\r\n?/g,`
241
+ `))),0,0):Ae.empty;let h=t.someProp("clipboardTextParser",m=>m(e,o,r,t));if(h)a=h;else{let m=o.marks(),{schema:g}=t.state,b=Ys.fromSchema(g);s=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(y=>{let S=s.appendChild(document.createElement("p"));y&&S.appendChild(b.serializeNode(g.text(y,m)))})}}else t.someProp("transformPastedHTML",h=>{n=h(n,t)}),s=BZ(n),cu&&VZ(s);let u=s&&s.querySelector("[data-pm-slice]"),f=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(f&&f[3])for(let h=+f[3];h>0;h--){let m=s.firstChild;for(;m&&m.nodeType!=1;)m=m.nextSibling;if(!m)break;s=m}if(a||(a=(t.someProp("clipboardParser")||t.someProp("domParser")||Fi.fromSchema(t.state.schema)).parseSlice(s,{preserveWhitespace:!!(l||f),context:o,ruleFromNode(m){return m.nodeName=="BR"&&!m.nextSibling&&m.parentNode&&!jZ.test(m.parentNode.nodeName)?{ignore:!0}:null}})),f)a=zZ(XE(a,+f[1],+f[2]),f[4]);else if(a=Ae.maxOpen($Z(a.content,o),!0),a.openStart||a.openEnd){let h=0,m=0;for(let g=a.content.firstChild;h<a.openStart&&!g.type.spec.isolating;h++,g=g.firstChild);for(let g=a.content.lastChild;m<a.openEnd&&!g.type.spec.isolating;m++,g=g.lastChild);a=XE(a,h,m)}return t.someProp("transformPasted",h=>{a=h(a,t)}),a}const jZ=/^(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 $Z(t,e){if(t.childCount<2)return t;for(let n=e.depth;n>=0;n--){let o=e.node(n).contentMatchAt(e.index(n)),i,s=[];if(t.forEach(a=>{if(!s)return;let l=o.findWrapping(a.type),u;if(!l)return s=null;if(u=s.length&&i.length&&ND(l,i,a,s[s.length-1],0))s[s.length-1]=u;else{s.length&&(s[s.length-1]=LD(s[s.length-1],i.length));let f=_D(a,l);s.push(f),o=o.matchType(f.type),i=l}}),s)return Te.from(s)}return t}function _D(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,Te.from(t));return t}function ND(t,e,n,r,o){if(o<t.length&&o<e.length&&t[o]==e[o]){let i=ND(t,e,n,r.lastChild,o+1);if(i)return r.copy(r.content.replaceChild(r.childCount-1,i));if(r.contentMatchAt(r.childCount).matchType(o==t.length-1?n.type:t[o+1]))return r.copy(r.content.append(Te.from(_D(n,t,o+1))))}}function LD(t,e){if(e==0)return t;let n=t.content.replaceChild(t.childCount-1,LD(t.lastChild,e-1)),r=t.contentMatchAt(t.childCount).fillBefore(Te.empty,!0);return t.copy(n.append(r))}function t0(t,e,n,r,o,i){let s=e<0?t.firstChild:t.lastChild,a=s.content;return t.childCount>1&&(i=0),o<r-1&&(a=t0(a,e,n,r,o+1,i)),o>=n&&(a=e<0?s.contentMatchAt(0).fillBefore(a,i<=o).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(Te.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,s.copy(a))}function XE(t,e,n){return e<t.openStart&&(t=new Ae(t0(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new Ae(t0(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}const jD={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 QE=null;function $D(){return QE||(QE=document.implementation.createHTMLDocument("title"))}let hg=null;function FZ(t){let e=window.trustedTypes;return e?(hg||(hg=e.createPolicy("ProseMirrorClipboard",{createHTML:n=>n})),hg.createHTML(t)):t}function BZ(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n=$D().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(t),o;if((o=r&&jD[r[1].toLowerCase()])&&(t=o.map(i=>"<"+i+">").join("")+t+o.map(i=>"</"+i+">").reverse().join("")),n.innerHTML=FZ(t),o)for(let i=0;i<o.length;i++)n=n.querySelector(o[i])||n;return n}function VZ(t){let e=t.querySelectorAll(zn?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<e.length;n++){let r=e[n];r.childNodes.length==1&&r.textContent==" "&&r.parentNode&&r.parentNode.replaceChild(t.ownerDocument.createTextNode(" "),r)}}function zZ(t,e){if(!t.size)return t;let n=t.content.firstChild.type.schema,r;try{r=JSON.parse(e)}catch{return t}let{content:o,openStart:i,openEnd:s}=t;for(let a=r.length-2;a>=0;a-=2){let l=n.nodes[r[a]];if(!l||l.hasRequiredAttrs())break;o=Te.from(l.create(r[a+1],o)),i++,s++}return new Ae(o,i,s)}const tr={},nr={},HZ={touchstart:!0,touchmove:!0};class WZ{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 qZ(t){for(let e in tr){let n=tr[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=r=>{KZ(t,r)&&!Nx(t,r)&&(t.editable||!(r.type in nr))&&n(t,r)},HZ[e]?{passive:!0}:void 0)}er&&t.dom.addEventListener("input",()=>null),n0(t)}function ji(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function UZ(t){t.domObserver.stop();for(let e in t.input.eventHandlers)t.dom.removeEventListener(e,t.input.eventHandlers[e]);clearTimeout(t.input.composingTimeout),clearTimeout(t.input.lastIOSEnterFallbackTimeout)}function n0(t){t.someProp("handleDOMEvents",e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=r=>Nx(t,r))})}function Nx(t,e){return t.someProp("handleDOMEvents",n=>{let r=n[e.type];return r?r(t,e)||e.defaultPrevented:!1})}function KZ(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target;n!=t.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(e))return!1;return!0}function YZ(t,e){!Nx(t,e)&&tr[e.type]&&(t.editable||!(e.type in nr))&&tr[e.type](t,e)}nr.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=n.keyCode==16||n.shiftKey,!BD(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!(ni&&zn&&n.keyCode==13)))if(n.keyCode!=229&&t.domObserver.forceFlush(),ol&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();t.input.lastIOSEnter=r,t.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{t.input.lastIOSEnter==r&&(t.someProp("handleKeyDown",o=>o(t,Cs(13,"Enter"))),t.input.lastIOSEnter=0)},200)}else t.someProp("handleKeyDown",r=>r(t,n))||LZ(t,n)?n.preventDefault():ji(t,"key")};nr.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)};nr.keypress=(t,e)=>{let n=e;if(BD(t,n)||!n.charCode||n.ctrlKey&&!n.altKey||Br&&n.metaKey)return;if(t.someProp("handleKeyPress",o=>o(t,n))){n.preventDefault();return}let r=t.state.selection;if(!(r instanceof Ge)||!r.$from.sameParent(r.$to)){let o=String.fromCharCode(n.charCode);!/[\r\n]/.test(o)&&!t.someProp("handleTextInput",i=>i(t,r.$from.pos,r.$to.pos,o))&&t.dispatch(t.state.tr.insertText(o).scrollIntoView()),n.preventDefault()}};function Gp(t){return{left:t.clientX,top:t.clientY}}function GZ(t,e){let n=e.x-t.clientX,r=e.y-t.clientY;return n*n+r*r<100}function Lx(t,e,n,r,o){if(r==-1)return!1;let i=t.state.doc.resolve(r);for(let s=i.depth+1;s>0;s--)if(t.someProp(e,a=>s>i.depth?a(t,n,i.nodeAfter,i.before(s),o,!0):a(t,n,i.node(s),i.before(s),o,!1)))return!0;return!1}function Ua(t,e,n){if(t.focused||t.focus(),t.state.selection.eq(e))return;let r=t.state.tr.setSelection(e);r.setMeta("pointer",!0),t.dispatch(r)}function JZ(t,e){if(e==-1)return!1;let n=t.state.doc.resolve(e),r=n.nodeAfter;return r&&r.isAtom&&qe.isSelectable(r)?(Ua(t,new qe(n)),!0):!1}function ZZ(t,e){if(e==-1)return!1;let n=t.state.selection,r,o;n instanceof qe&&(r=n.node);let i=t.state.doc.resolve(e);for(let s=i.depth+1;s>0;s--){let a=s>i.depth?i.nodeAfter:i.node(s);if(qe.isSelectable(a)){r&&n.$from.depth>0&&s>=n.$from.depth&&i.before(n.$from.depth+1)==n.$from.pos?o=i.before(n.$from.depth):o=i.before(s);break}}return o!=null?(Ua(t,qe.create(t.state.doc,o)),!0):!1}function XZ(t,e,n,r,o){return Lx(t,"handleClickOn",e,n,r)||t.someProp("handleClick",i=>i(t,e,r))||(o?ZZ(t,n):JZ(t,n))}function QZ(t,e,n,r){return Lx(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",o=>o(t,e,r))}function eX(t,e,n,r){return Lx(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",o=>o(t,e,r))||tX(t,n,r)}function tX(t,e,n){if(n.button!=0)return!1;let r=t.state.doc;if(e==-1)return r.inlineContent?(Ua(t,Ge.create(r,0,r.content.size)),!0):!1;let o=r.resolve(e);for(let i=o.depth+1;i>0;i--){let s=i>o.depth?o.nodeAfter:o.node(i),a=o.before(i);if(s.inlineContent)Ua(t,Ge.create(r,a+1,a+1+s.content.size));else if(qe.isSelectable(s))Ua(t,qe.create(r,a));else continue;return!0}}function jx(t){return Of(t)}const FD=Br?"metaKey":"ctrlKey";tr.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let r=jx(t),o=Date.now(),i="singleClick";o-t.input.lastClick.time<500&&GZ(n,t.input.lastClick)&&!n[FD]&&(t.input.lastClick.type=="singleClick"?i="doubleClick":t.input.lastClick.type=="doubleClick"&&(i="tripleClick")),t.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:i};let s=t.posAtCoords(Gp(n));s&&(i=="singleClick"?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new nX(t,s,n,!!r)):(i=="doubleClick"?QZ:eX)(t,s.pos,s.inside,n)?n.preventDefault():ji(t,"pointer"))};class nX{constructor(e,n,r,o){this.view=e,this.pos=n,this.event=r,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!r[FD],this.allowDefault=r.shiftKey;let i,s;if(n.inside>-1)i=e.state.doc.nodeAt(n.inside),s=n.inside;else{let f=e.state.doc.resolve(n.pos);i=f.parent,s=f.depth?f.before():0}const a=o?null:r.target,l=a?e.docView.nearestDesc(a,!0):null;this.target=l&&l.dom.nodeType==1?l.dom:null;let{selection:u}=e.state;(r.button==0&&i.type.spec.draggable&&i.type.spec.selectable!==!1||u instanceof qe&&u.from<=s&&u.to>s)&&(this.mightDrag={node:i,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&io&&!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()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),ji(e,"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(()=>oi(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(Gp(e))),this.updateAllowDefault(e),this.allowDefault||!n?ji(this.view,"pointer"):XZ(this.view,n.pos,n.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||er&&this.mightDrag&&!this.mightDrag.node.isAtom||zn&&!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)?(Ua(this.view,Qe.near(this.view.state.doc.resolve(n.pos))),e.preventDefault()):ji(this.view,"pointer")}move(e){this.updateAllowDefault(e),ji(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}tr.touchstart=t=>{t.input.lastTouch=Date.now(),jx(t),ji(t,"pointer")};tr.touchmove=t=>{t.input.lastTouch=Date.now(),ji(t,"pointer")};tr.contextmenu=t=>jx(t);function BD(t,e){return t.composing?!0:er&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500?(t.input.compositionEndedAt=-2e8,!0):!1}const rX=ni?5e3:-1;nr.compositionstart=nr.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$to;if(e.selection instanceof Ge&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)))t.markCursor=t.state.storedMarks||n.marks(),Of(t,!0),t.markCursor=null;else if(Of(t,!e.selection.empty),io&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=t.domSelectionRange();for(let o=r.focusNode,i=r.focusOffset;o&&o.nodeType==1&&i!=0;){let s=i<0?o.lastChild:o.childNodes[i-1];if(!s)break;if(s.nodeType==3){let a=t.domSelection();a&&a.collapse(s,s.nodeValue.length);break}else o=s,i=-1}}t.input.composing=!0}VD(t,rX)};nr.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=e.timeStamp,t.input.compositionPendingChanges=t.domObserver.pendingRecords().length?t.input.compositionID:0,t.input.compositionNode=null,t.input.compositionPendingChanges&&Promise.resolve().then(()=>t.domObserver.flush()),t.input.compositionID++,VD(t,20))};function VD(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>Of(t),e))}function zD(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=iX());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function oX(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let n=JJ(e.focusNode,e.focusOffset),r=ZJ(e.focusNode,e.focusOffset);if(n&&r&&n!=r){let o=r.pmViewDesc,i=t.domObserver.lastChangedTextNode;if(n==i||r==i)return i;if(!o||!o.isText(r.nodeValue))return r;if(t.input.compositionNode==r){let s=n.pmViewDesc;if(!(!s||!s.isText(n.nodeValue)))return r}}return n||r}function iX(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}function Of(t,e=!1){if(!(ni&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),zD(t),e||t.docView&&t.docView.dirty){let n=Dx(t);return n&&!n.eq(t.state.selection)?t.dispatch(t.state.tr.setSelection(n)):(t.markCursor||e)&&!t.state.selection.empty?t.dispatch(t.state.tr.deleteSelection()):t.updateState(t.state),!0}return!1}}function sX(t,e){if(!t.dom.parentNode)return;let n=t.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(e),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(e),t.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),t.focus()},50)}const $c=hr&&Bi<15||ol&&nZ<604;tr.copy=nr.cut=(t,e)=>{let n=e,r=t.state.selection,o=n.type=="cut";if(r.empty)return;let i=$c?null:n.clipboardData,s=r.content(),{dom:a,text:l}=_x(t,s);i?(n.preventDefault(),i.clearData(),i.setData("text/html",a.innerHTML),i.setData("text/plain",l)):sX(t,a),o&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function aX(t){return t.openStart==0&&t.openEnd==0&&t.content.childCount==1?t.content.firstChild:null}function lX(t,e){if(!t.dom.parentNode)return;let n=t.input.shiftKey||t.state.selection.$from.parent.type.spec.code,r=t.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=t.input.shiftKey&&t.input.lastKeyCode!=45;setTimeout(()=>{t.focus(),r.parentNode&&r.parentNode.removeChild(r),n?Fc(t,r.value,null,o,e):Fc(t,r.textContent,r.innerHTML,o,e)},50)}function Fc(t,e,n,r,o){let i=PD(t,e,n,r,t.state.selection.$from);if(t.someProp("handlePaste",l=>l(t,o,i||Ae.empty)))return!0;if(!i)return!1;let s=aX(i),a=s?t.state.tr.replaceSelectionWith(s,r):t.state.tr.replaceSelection(i);return t.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function HD(t){let e=t.getData("text/plain")||t.getData("Text");if(e)return e;let n=t.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}nr.paste=(t,e)=>{let n=e;if(t.composing&&!ni)return;let r=$c?null:n.clipboardData,o=t.input.shiftKey&&t.input.lastKeyCode!=45;r&&Fc(t,HD(r),r.getData("text/html"),o,n)?n.preventDefault():lX(t,n)};class WD{constructor(e,n,r){this.slice=e,this.move=n,this.node=r}}const qD=Br?"altKey":"ctrlKey";tr.dragstart=(t,e)=>{let n=e,r=t.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let o=t.state.selection,i=o.empty?null:t.posAtCoords(Gp(n)),s;if(!(i&&i.pos>=o.from&&i.pos<=(o instanceof qe?o.to-1:o.to))){if(r&&r.mightDrag)s=qe.create(t.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let h=t.docView.nearestDesc(n.target,!0);h&&h.node.type.spec.draggable&&h!=t.docView&&(s=qe.create(t.state.doc,h.posBefore))}}let a=(s||t.state.selection).content(),{dom:l,text:u,slice:f}=_x(t,a);(!n.dataTransfer.files.length||!zn||yD>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData($c?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",$c||n.dataTransfer.setData("text/plain",u),t.dragging=new WD(f,!n[qD],s)};tr.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)};nr.dragover=nr.dragenter=(t,e)=>e.preventDefault();nr.drop=(t,e)=>{let n=e,r=t.dragging;if(t.dragging=null,!n.dataTransfer)return;let o=t.posAtCoords(Gp(n));if(!o)return;let i=t.state.doc.resolve(o.pos),s=r&&r.slice;s?t.someProp("transformPasted",b=>{s=b(s,t)}):s=PD(t,HD(n.dataTransfer),$c?null:n.dataTransfer.getData("text/html"),!1,i);let a=!!(r&&!n[qD]);if(t.someProp("handleDrop",b=>b(t,n,s||Ae.empty,a))){n.preventDefault();return}if(!s)return;n.preventDefault();let l=s?lD(t.state.doc,i.pos,s):i.pos;l==null&&(l=i.pos);let u=t.state.tr;if(a){let{node:b}=r;b?b.replace(u):u.deleteSelection()}let f=u.mapping.map(l),h=s.openStart==0&&s.openEnd==0&&s.content.childCount==1,m=u.doc;if(h?u.replaceRangeWith(f,f,s.content.firstChild):u.replaceRange(f,f,s),u.doc.eq(m))return;let g=u.doc.resolve(f);if(h&&qe.isSelectable(s.content.firstChild)&&g.nodeAfter&&g.nodeAfter.sameMarkup(s.content.firstChild))u.setSelection(new qe(g));else{let b=u.mapping.map(l);u.mapping.maps[u.mapping.maps.length-1].forEach((y,S,C,E)=>b=E),u.setSelection(Px(t,g,u.doc.resolve(b)))}t.focus(),t.dispatch(u.setMeta("uiEvent","drop"))};tr.focus=t=>{t.input.lastFocus=Date.now(),t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout(()=>{t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.domSelectionRange())&&oi(t)},20))};tr.blur=(t,e)=>{let n=e;t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),n.relatedTarget&&t.dom.contains(n.relatedTarget)&&t.domObserver.currentSelection.clear(),t.focused=!1)};tr.beforeinput=(t,e)=>{if(zn&&ni&&e.inputType=="deleteContentBackward"){t.domObserver.flushSoon();let{domChangeCount:r}=t.input;setTimeout(()=>{if(t.input.domChangeCount!=r||(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",i=>i(t,Cs(8,"Backspace")))))return;let{$cursor:o}=t.state.selection;o&&o.pos>0&&t.dispatch(t.state.tr.delete(o.pos-1,o.pos).scrollIntoView())},50)}};for(let t in nr)tr[t]=nr[t];function Bc(t,e){if(t==e)return!0;for(let n in t)if(t[n]!==e[n])return!1;for(let n in e)if(!(n in t))return!1;return!0}class Rf{constructor(e,n){this.toDOM=e,this.spec=n||_s,this.side=this.spec.side||0}map(e,n,r,o){let{pos:i,deleted:s}=e.mapResult(n.from+o,this.side<0?-1:1);return s?null:new Ln(i-r,i-r,this)}valid(){return!0}eq(e){return this==e||e instanceof Rf&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Bc(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class zi{constructor(e,n){this.attrs=e,this.spec=n||_s}map(e,n,r,o){let i=e.map(n.from+o,this.spec.inclusiveStart?-1:1)-r,s=e.map(n.to+o,this.spec.inclusiveEnd?1:-1)-r;return i>=s?null:new Ln(i,s,this)}valid(e,n){return n.from<n.to}eq(e){return this==e||e instanceof zi&&Bc(this.attrs,e.attrs)&&Bc(this.spec,e.spec)}static is(e){return e.type instanceof zi}destroy(){}}class $x{constructor(e,n){this.attrs=e,this.spec=n||_s}map(e,n,r,o){let i=e.mapResult(n.from+o,1);if(i.deleted)return null;let s=e.mapResult(n.to+o,-1);return s.deleted||s.pos<=i.pos?null:new Ln(i.pos-r,s.pos-r,this)}valid(e,n){let{index:r,offset:o}=e.content.findIndex(n.from),i;return o==n.from&&!(i=e.child(r)).isText&&o+i.nodeSize==n.to}eq(e){return this==e||e instanceof $x&&Bc(this.attrs,e.attrs)&&Bc(this.spec,e.spec)}destroy(){}}class Ln{constructor(e,n,r){this.from=e,this.to=n,this.type=r}copy(e,n){return new Ln(e,n,this.type)}eq(e,n=0){return this.type.eq(e.type)&&this.from+n==e.from&&this.to+n==e.to}map(e,n,r){return this.type.map(e,this,n,r)}static widget(e,n,r){return new Ln(e,e,new Rf(n,r))}static inline(e,n,r,o){return new Ln(e,n,new zi(r,o))}static node(e,n,r,o){return new Ln(e,n,new $x(r,o))}get spec(){return this.type.spec}get inline(){return this.type instanceof zi}get widget(){return this.type instanceof Rf}}const Ia=[],_s={};class Zt{constructor(e,n){this.local=e.length?e:Ia,this.children=n.length?n:Ia}static create(e,n){return n.length?Af(n,e,0,_s):Bn}find(e,n,r){let o=[];return this.findInner(e??0,n??1e9,o,0,r),o}findInner(e,n,r,o,i){for(let s=0;s<this.local.length;s++){let a=this.local[s];a.from<=n&&a.to>=e&&(!i||i(a.spec))&&r.push(a.copy(a.from+o,a.to+o))}for(let s=0;s<this.children.length;s+=3)if(this.children[s]<n&&this.children[s+1]>e){let a=this.children[s]+1;this.children[s+2].findInner(e-a,n-a,r,o+a,i)}}map(e,n,r){return this==Bn||e.maps.length==0?this:this.mapInner(e,n,0,0,r||_s)}mapInner(e,n,r,o,i){let s;for(let a=0;a<this.local.length;a++){let l=this.local[a].map(e,r,o);l&&l.type.valid(n,l)?(s||(s=[])).push(l):i.onRemove&&i.onRemove(this.local[a].spec)}return this.children.length?cX(this.children,s||[],e,n,r,o,i):s?new Zt(s.sort(Ns),Ia):Bn}add(e,n){return n.length?this==Bn?Zt.create(e,n):this.addInner(e,n,0):this}addInner(e,n,r){let o,i=0;e.forEach((a,l)=>{let u=l+r,f;if(f=KD(n,a,u)){for(o||(o=this.children.slice());i<o.length&&o[i]<l;)i+=3;o[i]==l?o[i+2]=o[i+2].addInner(a,f,u+1):o.splice(i,0,l,l+a.nodeSize,Af(f,a,u+1,_s)),i+=3}});let s=UD(i?YD(n):n,-r);for(let a=0;a<s.length;a++)s[a].type.valid(e,s[a])||s.splice(a--,1);return new Zt(s.length?this.local.concat(s).sort(Ns):this.local,o||this.children)}remove(e){return e.length==0||this==Bn?this:this.removeInner(e,0)}removeInner(e,n){let r=this.children,o=this.local;for(let i=0;i<r.length;i+=3){let s,a=r[i]+n,l=r[i+1]+n;for(let f=0,h;f<e.length;f++)(h=e[f])&&h.from>a&&h.to<l&&(e[f]=null,(s||(s=[])).push(h));if(!s)continue;r==this.children&&(r=this.children.slice());let u=r[i+2].removeInner(s,a+1);u!=Bn?r[i+2]=u:(r.splice(i,3),i-=3)}if(o.length){for(let i=0,s;i<e.length;i++)if(s=e[i])for(let a=0;a<o.length;a++)o[a].eq(s,n)&&(o==this.local&&(o=this.local.slice()),o.splice(a--,1))}return r==this.children&&o==this.local?this:o.length||r.length?new Zt(o,r):Bn}forChild(e,n){if(this==Bn)return this;if(n.isLeaf)return Zt.empty;let r,o;for(let a=0;a<this.children.length;a+=3)if(this.children[a]>=e){this.children[a]==e&&(r=this.children[a+2]);break}let i=e+1,s=i+n.content.size;for(let a=0;a<this.local.length;a++){let l=this.local[a];if(l.from<s&&l.to>i&&l.type instanceof zi){let u=Math.max(i,l.from)-i,f=Math.min(s,l.to)-i;u<f&&(o||(o=[])).push(l.copy(u,f))}}if(o){let a=new Zt(o.sort(Ns),Ia);return r?new Ai([a,r]):a}return r||Bn}eq(e){if(this==e)return!0;if(!(e instanceof Zt)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let n=0;n<this.local.length;n++)if(!this.local[n].eq(e.local[n]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=e.children[n]||this.children[n+1]!=e.children[n+1]||!this.children[n+2].eq(e.children[n+2]))return!1;return!0}locals(e){return Fx(this.localsInner(e))}localsInner(e){if(this==Bn)return Ia;if(e.inlineContent||!this.local.some(zi.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof zi||n.push(this.local[r]);return n}forEachSet(e){e(this)}}Zt.empty=new Zt([],[]);Zt.removeOverlap=Fx;const Bn=Zt.empty;class Ai{constructor(e){this.members=e}map(e,n){const r=this.members.map(o=>o.map(e,n,_s));return Ai.from(r)}forChild(e,n){if(n.isLeaf)return Zt.empty;let r=[];for(let o=0;o<this.members.length;o++){let i=this.members[o].forChild(e,n);i!=Bn&&(i instanceof Ai?r=r.concat(i.members):r.push(i))}return Ai.from(r)}eq(e){if(!(e instanceof Ai)||e.members.length!=this.members.length)return!1;for(let n=0;n<this.members.length;n++)if(!this.members[n].eq(e.members[n]))return!1;return!0}locals(e){let n,r=!0;for(let o=0;o<this.members.length;o++){let i=this.members[o].localsInner(e);if(i.length)if(!n)n=i;else{r&&(n=n.slice(),r=!1);for(let s=0;s<i.length;s++)n.push(i[s])}}return n?Fx(r?n:n.sort(Ns)):Ia}static from(e){switch(e.length){case 0:return Bn;case 1:return e[0];default:return new Ai(e.every(n=>n instanceof Zt)?e:e.reduce((n,r)=>n.concat(r instanceof Zt?r:r.members),[]))}}forEachSet(e){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(e)}}function cX(t,e,n,r,o,i,s){let a=t.slice();for(let u=0,f=i;u<n.maps.length;u++){let h=0;n.maps[u].forEach((m,g,b,y)=>{let S=y-b-(g-m);for(let C=0;C<a.length;C+=3){let E=a[C+1];if(E<0||m>E+f-h)continue;let T=a[C]+f-h;g>=T?a[C+1]=m<=T?-2:-1:m>=f&&S&&(a[C]+=S,a[C+1]+=S)}h+=S}),f=n.maps[u].map(f,-1)}let l=!1;for(let u=0;u<a.length;u+=3)if(a[u+1]<0){if(a[u+1]==-2){l=!0,a[u+1]=-1;continue}let f=n.map(t[u]+i),h=f-o;if(h<0||h>=r.content.size){l=!0;continue}let m=n.map(t[u+1]+i,-1),g=m-o,{index:b,offset:y}=r.content.findIndex(h),S=r.maybeChild(b);if(S&&y==h&&y+S.nodeSize==g){let C=a[u+2].mapInner(n,S,f+1,t[u]+i+1,s);C!=Bn?(a[u]=h,a[u+1]=g,a[u+2]=C):(a[u+1]=-2,l=!0)}else l=!0}if(l){let u=uX(a,t,e,n,o,i,s),f=Af(u,r,0,s);e=f.local;for(let h=0;h<a.length;h+=3)a[h+1]<0&&(a.splice(h,3),h-=3);for(let h=0,m=0;h<f.children.length;h+=3){let g=f.children[h];for(;m<a.length&&a[m]<g;)m+=3;a.splice(m,0,f.children[h],f.children[h+1],f.children[h+2])}}return new Zt(e.sort(Ns),a)}function UD(t,e){if(!e||!t.length)return t;let n=[];for(let r=0;r<t.length;r++){let o=t[r];n.push(new Ln(o.from+e,o.to+e,o.type))}return n}function uX(t,e,n,r,o,i,s){function a(l,u){for(let f=0;f<l.local.length;f++){let h=l.local[f].map(r,o,u);h?n.push(h):s.onRemove&&s.onRemove(l.local[f].spec)}for(let f=0;f<l.children.length;f+=3)a(l.children[f+2],l.children[f]+u+1)}for(let l=0;l<t.length;l+=3)t[l+1]==-1&&a(t[l+2],e[l]+i+1);return n}function KD(t,e,n){if(e.isLeaf)return null;let r=n+e.nodeSize,o=null;for(let i=0,s;i<t.length;i++)(s=t[i])&&s.from>n&&s.to<r&&((o||(o=[])).push(s),t[i]=null);return o}function YD(t){let e=[];for(let n=0;n<t.length;n++)t[n]!=null&&e.push(t[n]);return e}function Af(t,e,n,r){let o=[],i=!1;e.forEach((a,l)=>{let u=KD(t,a,l+n);if(u){i=!0;let f=Af(u,a,n+l+1,r);f!=Bn&&o.push(l,l+a.nodeSize,f)}});let s=UD(i?YD(t):t,-n).sort(Ns);for(let a=0;a<s.length;a++)s[a].type.valid(e,s[a])||(r.onRemove&&r.onRemove(s[a].spec),s.splice(a--,1));return s.length||o.length?new Zt(s,o):Bn}function Ns(t,e){return t.from-e.from||t.to-e.to}function Fx(t){let e=t;for(let n=0;n<e.length-1;n++){let r=e[n];if(r.from!=r.to)for(let o=n+1;o<e.length;o++){let i=e[o];if(i.from==r.from){i.to!=r.to&&(e==t&&(e=t.slice()),e[o]=i.copy(i.from,r.to),ek(e,o+1,i.copy(r.to,i.to)));continue}else{i.from<r.to&&(e==t&&(e=t.slice()),e[n]=r.copy(r.from,i.from),ek(e,o,r.copy(i.from,r.to)));break}}}return e}function ek(t,e,n){for(;e<t.length&&Ns(n,t[e])>0;)e++;t.splice(e,0,n)}function mg(t){let e=[];return t.someProp("decorations",n=>{let r=n(t.state);r&&r!=Bn&&e.push(r)}),t.cursorWrapper&&e.push(Zt.create(t.state.doc,[t.cursorWrapper.deco])),Ai.from(e)}const dX={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},fX=hr&&Bi<=11;class pX{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class hX{constructor(e,n){this.view=e,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new pX,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]);hr&&Bi<=11&&r.some(o=>o.type=="childList"&&o.removedNodes.length||o.type=="characterData"&&o.oldValue.length>o.target.nodeValue.length)?this.flushSoon():this.flush()}),fX&&(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,dX)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let n=0;n<e.length;n++)this.queue.push(e[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(UE(this.view)){if(this.suppressingSelectionUpdates)return oi(this.view);if(hr&&Bi<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&zs(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let n=new Set,r;for(let i=e.focusNode;i;i=rl(i))n.add(i);for(let i=e.anchorNode;i;i=rl(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 e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=e.domSelectionRange(),o=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&UE(e)&&!this.ignoreSelectionChange(r),i=-1,s=-1,a=!1,l=[];if(e.editable)for(let f=0;f<n.length;f++){let h=this.registerMutation(n[f],l);h&&(i=i<0?h.from:Math.min(h.from,i),s=s<0?h.to:Math.max(h.to,s),h.typeOver&&(a=!0))}if(io&&l.length){let f=l.filter(h=>h.nodeName=="BR");if(f.length==2){let[h,m]=f;h.parentNode&&h.parentNode.parentNode==m.parentNode?m.remove():h.remove()}else{let{focusNode:h}=this.currentSelection;for(let m of f){let g=m.parentNode;g&&g.nodeName=="LI"&&(!h||yX(e,h)!=g)&&m.remove()}}}let u=null;i<0&&o&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&Kp(r)&&(u=Dx(e))&&u.eq(Qe.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,oi(e),this.currentSelection.set(r),e.scrollToSelection()):(i>-1||o)&&(i>-1&&(e.docView.markDirty(i,s),mX(e)),this.handleDOMChange(i,s,a,l),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||oi(e),this.currentSelection.set(r))}registerMutation(e,n){if(n.indexOf(e.target)>-1)return null;let r=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(r==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!r||r.ignoreMutation(e))return null;if(e.type=="childList"){for(let f=0;f<e.addedNodes.length;f++){let h=e.addedNodes[f];n.push(h),h.nodeType==3&&(this.lastChangedTextNode=h)}if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(e.target))return{from:r.posBefore,to:r.posAfter};let o=e.previousSibling,i=e.nextSibling;if(hr&&Bi<=11&&e.addedNodes.length)for(let f=0;f<e.addedNodes.length;f++){let{previousSibling:h,nextSibling:m}=e.addedNodes[f];(!h||Array.prototype.indexOf.call(e.addedNodes,h)<0)&&(o=h),(!m||Array.prototype.indexOf.call(e.addedNodes,m)<0)&&(i=m)}let s=o&&o.parentNode==e.target?_n(o)+1:0,a=r.localPosFromDOM(e.target,s,-1),l=i&&i.parentNode==e.target?_n(i):e.target.childNodes.length,u=r.localPosFromDOM(e.target,l,1);return{from:a,to:u}}else return e.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:(this.lastChangedTextNode=e.target,{from:r.posAtStart,to:r.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}}let tk=new WeakMap,nk=!1;function mX(t){if(!tk.has(t)&&(tk.set(t,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace)!==-1)){if(t.requiresGeckoHackNode=io,nk)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."),nk=!0}}function rk(t,e){let n=e.startContainer,r=e.startOffset,o=e.endContainer,i=e.endOffset,s=t.domAtPos(t.state.selection.anchor);return zs(s.node,s.offset,o,i)&&([n,r,o,i]=[o,i,n,r]),{anchorNode:n,anchorOffset:r,focusNode:o,focusOffset:i}}function gX(t,e){if(e.getComposedRanges){let o=e.getComposedRanges(t.root)[0];if(o)return rk(t,o)}let n;function r(o){o.preventDefault(),o.stopImmediatePropagation(),n=o.getTargetRanges()[0]}return t.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),t.dom.removeEventListener("beforeinput",r,!0),n?rk(t,n):null}function yX(t,e){for(let n=e.parentNode;n&&n!=t.dom;n=n.parentNode){let r=t.docView.nearestDesc(n,!0);if(r&&r.node.isBlock)return n}return null}function bX(t,e,n){let{node:r,fromOffset:o,toOffset:i,from:s,to:a}=t.docView.parseRange(e,n),l=t.domSelectionRange(),u,f=l.anchorNode;if(f&&t.dom.contains(f.nodeType==1?f:f.parentNode)&&(u=[{node:f,offset:l.anchorOffset}],Kp(l)||u.push({node:l.focusNode,offset:l.focusOffset})),zn&&t.input.lastKeyCode===8)for(let S=i;S>o;S--){let C=r.childNodes[S-1],E=C.pmViewDesc;if(C.nodeName=="BR"&&!E){i=S;break}if(!E||E.size)break}let h=t.state.doc,m=t.someProp("domParser")||Fi.fromSchema(t.state.schema),g=h.resolve(s),b=null,y=m.parse(r,{topNode:g.parent,topMatch:g.parent.contentMatchAt(g.index()),topOpen:!0,from:o,to:i,preserveWhitespace:g.parent.type.whitespace=="pre"?"full":!0,findPositions:u,ruleFromNode:vX,context:g});if(u&&u[0].pos!=null){let S=u[0].pos,C=u[1]&&u[1].pos;C==null&&(C=S),b={anchor:S+s,head:C+s}}return{doc:y,sel:b,from:s,to:a}}function vX(t){let e=t.pmViewDesc;if(e)return e.parseRule();if(t.nodeName=="BR"&&t.parentNode){if(er&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(t.parentNode.lastChild==t||er&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if(t.nodeName=="IMG"&&t.getAttribute("mark-placeholder"))return{ignore:!0};return null}const xX=/^(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 SX(t,e,n,r,o){let i=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let N=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,O=Dx(t,N);if(O&&!t.state.selection.eq(O)){if(zn&&ni&&t.input.lastKeyCode===13&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",L=>L(t,Cs(13,"Enter"))))return;let A=t.state.tr.setSelection(O);N=="pointer"?A.setMeta("pointer",!0):N=="key"&&A.scrollIntoView(),i&&A.setMeta("composition",i),t.dispatch(A)}return}let s=t.state.doc.resolve(e),a=s.sharedDepth(n);e=s.before(a+1),n=t.state.doc.resolve(n).after(a+1);let l=t.state.selection,u=bX(t,e,n),f=t.state.doc,h=f.slice(u.from,u.to),m,g;t.input.lastKeyCode===8&&Date.now()-100<t.input.lastKeyCodeTime?(m=t.state.selection.to,g="end"):(m=t.state.selection.from,g="start"),t.input.lastKeyCode=null;let b=TX(h.content,u.doc.content,u.from,m,g);if(b&&t.input.domChangeCount++,(ol&&t.input.lastIOSEnter>Date.now()-225||ni)&&o.some(N=>N.nodeType==1&&!xX.test(N.nodeName))&&(!b||b.endA>=b.endB)&&t.someProp("handleKeyDown",N=>N(t,Cs(13,"Enter")))){t.input.lastIOSEnter=0;return}if(!b)if(r&&l instanceof Ge&&!l.empty&&l.$head.sameParent(l.$anchor)&&!t.composing&&!(u.sel&&u.sel.anchor!=u.sel.head))b={start:l.from,endA:l.to,endB:l.to};else{if(u.sel){let N=ok(t,t.state.doc,u.sel);if(N&&!N.eq(t.state.selection)){let O=t.state.tr.setSelection(N);i&&O.setMeta("composition",i),t.dispatch(O)}}return}t.state.selection.from<t.state.selection.to&&b.start==b.endB&&t.state.selection instanceof Ge&&(b.start>t.state.selection.from&&b.start<=t.state.selection.from+2&&t.state.selection.from>=u.from?b.start=t.state.selection.from:b.endA<t.state.selection.to&&b.endA>=t.state.selection.to-2&&t.state.selection.to<=u.to&&(b.endB+=t.state.selection.to-b.endA,b.endA=t.state.selection.to)),hr&&Bi<=11&&b.endB==b.start+1&&b.endA==b.start&&b.start>u.from&&u.doc.textBetween(b.start-u.from-1,b.start-u.from+1)=="  "&&(b.start--,b.endA--,b.endB--);let y=u.doc.resolveNoCache(b.start-u.from),S=u.doc.resolveNoCache(b.endB-u.from),C=f.resolve(b.start),E=y.sameParent(S)&&y.parent.inlineContent&&C.end()>=b.endA,T;if((ol&&t.input.lastIOSEnter>Date.now()-225&&(!E||o.some(N=>N.nodeName=="DIV"||N.nodeName=="P"))||!E&&y.pos<u.doc.content.size&&!y.sameParent(S)&&(T=Qe.findFrom(u.doc.resolve(y.pos+1),1,!0))&&T.head==S.pos)&&t.someProp("handleKeyDown",N=>N(t,Cs(13,"Enter")))){t.input.lastIOSEnter=0;return}if(t.state.selection.anchor>b.start&&wX(f,b.start,b.endA,y,S)&&t.someProp("handleKeyDown",N=>N(t,Cs(8,"Backspace")))){ni&&zn&&t.domObserver.suppressSelectionUpdates();return}zn&&b.endB==b.start&&(t.input.lastChromeDelete=Date.now()),ni&&!E&&y.start()!=S.start()&&S.parentOffset==0&&y.depth==S.depth&&u.sel&&u.sel.anchor==u.sel.head&&u.sel.head==b.endA&&(b.endB-=2,S=u.doc.resolveNoCache(b.endB-u.from),setTimeout(()=>{t.someProp("handleKeyDown",function(N){return N(t,Cs(13,"Enter"))})},20));let w=b.start,M=b.endA,R,_,I;if(E){if(y.pos==S.pos)hr&&Bi<=11&&y.parentOffset==0&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>oi(t),20)),R=t.state.tr.delete(w,M),_=f.resolve(b.start).marksAcross(f.resolve(b.endA));else if(b.endA==b.endB&&(I=CX(y.parent.content.cut(y.parentOffset,S.parentOffset),C.parent.content.cut(C.parentOffset,b.endA-C.start()))))R=t.state.tr,I.type=="add"?R.addMark(w,M,I.mark):R.removeMark(w,M,I.mark);else if(y.parent.child(y.index()).isText&&y.index()==S.index()-(S.textOffset?0:1)){let N=y.parent.textBetween(y.parentOffset,S.parentOffset);if(t.someProp("handleTextInput",O=>O(t,w,M,N)))return;R=t.state.tr.insertText(N,w,M)}}if(R||(R=t.state.tr.replace(w,M,u.doc.slice(b.start-u.from,b.endB-u.from))),u.sel){let N=ok(t,R.doc,u.sel);N&&!(zn&&t.composing&&N.empty&&(b.start!=b.endB||t.input.lastChromeDelete<Date.now()-100)&&(N.head==w||N.head==R.mapping.map(M)-1)||hr&&N.empty&&N.head==w)&&R.setSelection(N)}_&&R.ensureMarks(_),i&&R.setMeta("composition",i),t.dispatch(R.scrollIntoView())}function ok(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:Px(t,e.resolve(n.anchor),e.resolve(n.head))}function CX(t,e){let n=t.firstChild.marks,r=e.firstChild.marks,o=n,i=r,s,a,l;for(let f=0;f<r.length;f++)o=r[f].removeFromSet(o);for(let f=0;f<n.length;f++)i=n[f].removeFromSet(i);if(o.length==1&&i.length==0)a=o[0],s="add",l=f=>f.mark(a.addToSet(f.marks));else if(o.length==0&&i.length==1)a=i[0],s="remove",l=f=>f.mark(a.removeFromSet(f.marks));else return null;let u=[];for(let f=0;f<e.childCount;f++)u.push(l(e.child(f)));if(Te.from(u).eq(t))return{mark:a,type:s}}function wX(t,e,n,r,o){if(n-e<=o.pos-r.pos||gg(r,!0,!1)<o.pos)return!1;let i=t.resolve(e);if(!r.parent.isTextblock){let a=i.nodeAfter;return a!=null&&n==e+a.nodeSize}if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;let s=t.resolve(gg(i,!0,!0));return!s.parent.isTextblock||s.pos>n||gg(s,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(s.parent.content)}function gg(t,e,n){let r=t.depth,o=e?t.end():t.pos;for(;r>0&&(e||t.indexAfter(r)==t.node(r).childCount);)r--,o++,e=!1;if(n){let i=t.node(r).maybeChild(t.indexAfter(r));for(;i&&!i.isLeaf;)i=i.firstChild,o++}return o}function TX(t,e,n,r,o){let i=t.findDiffStart(e,n);if(i==null)return null;let{a:s,b:a}=t.findDiffEnd(e,n+t.size,n+e.size);if(o=="end"){let l=Math.max(0,i-Math.min(s,a));r-=s+l-i}if(s<i&&t.size<e.size){let l=r<=i&&r>=s?i-r:0;i-=l,i&&i<e.size&&ik(e.textBetween(i-1,i+1))&&(i+=l?1:-1),a=i+(a-s),s=i}else if(a<i){let l=r<=i&&r>=a?i-r:0;i-=l,i&&i<t.size&&ik(t.textBetween(i-1,i+1))&&(i+=l?1:-1),s=i+(s-a),a=i}return{start:i,endA:s,endB:a}}function ik(t){if(t.length!=2)return!1;let e=t.charCodeAt(0),n=t.charCodeAt(1);return e>=56320&&e<=57343&&n>=55296&&n<=56319}class EX{constructor(e,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 WZ,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(uk),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=lk(this),ak(this),this.nodeViews=ck(this),this.docView=BE(this.state.doc,sk(this),mg(this),this.dom,this),this.domObserver=new hX(this,(r,o,i,s)=>SX(this,r,o,i,s)),this.domObserver.start(),qZ(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let n in e)this._props[n]=e[n];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&n0(this);let n=this._props;this._props=e,e.plugins&&(e.plugins.forEach(uk),this.directPlugins=e.plugins),this.updateStateInner(e.state,n)}setProps(e){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in e)n[r]=e[r];this.update(n)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,n){var r;let o=this.state,i=!1,s=!1;e.storedMarks&&this.composing&&(zD(this),s=!0),this.state=e;let a=o.plugins!=e.plugins||this._props.plugins!=n.plugins;if(a||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let g=ck(this);MX(g,this.nodeViews)&&(this.nodeViews=g,i=!0)}(a||n.handleDOMEvents!=this._props.handleDOMEvents)&&n0(this),this.editable=lk(this),ak(this);let l=mg(this),u=sk(this),f=o.plugins!=e.plugins&&!o.doc.eq(e.doc)?"reset":e.scrollToSelection>o.scrollToSelection?"to selection":"preserve",h=i||!this.docView.matchesNode(e.doc,u,l);(h||!e.selection.eq(o.selection))&&(s=!0);let m=f=="preserve"&&s&&this.dom.style.overflowAnchor==null&&iZ(this);if(s){this.domObserver.stop();let g=h&&(hr||zn)&&!this.composing&&!o.selection.empty&&!e.selection.empty&&kX(o.selection,e.selection);if(h){let b=zn?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=oX(this)),(i||!this.docView.update(e.doc,u,l,this))&&(this.docView.updateOuterDeco(u),this.docView.destroy(),this.docView=BE(e.doc,u,l,this.dom,this)),b&&!this.trackWrites&&(g=!0)}g||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&RZ(this))?oi(this,g):(AD(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(o),!((r=this.dragging)===null||r===void 0)&&r.node&&!o.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,o),f=="reset"?this.dom.scrollTop=0:f=="to selection"?this.scrollToSelection():m&&sZ(m)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!(!e||!this.dom.contains(e.nodeType==1?e:e.parentNode))){if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof qe){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&_E(this,n.getBoundingClientRect(),e)}else _E(this,this.coordsAtPos(this.state.selection.head,1),e)}}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.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,e)}}updateDraggedNode(e,n){let r=e.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 WD(e.slice,e.move,o<0?void 0:qe.create(this.state.doc,o))}someProp(e,n){let r=this._props&&this._props[e],o;if(r!=null&&(o=n?n(r):r))return o;for(let s=0;s<this.directPlugins.length;s++){let a=this.directPlugins[s].props[e];if(a!=null&&(o=n?n(a):a))return o}let i=this.state.plugins;if(i)for(let s=0;s<i.length;s++){let a=i[s].props[e];if(a!=null&&(o=n?n(a):a))return o}}hasFocus(){if(hr){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if(e.contentEditable=="false")return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&aZ(this.dom),oi(this),this.domObserver.start()}get root(){let e=this._root;if(e==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 e||document}updateRoot(){this._root=null}posAtCoords(e){return fZ(this,e)}coordsAtPos(e,n=1){return CD(this,e,n)}domAtPos(e,n=0){return this.docView.domFromPos(e,n)}nodeDOM(e){let n=this.docView.descAt(e);return n?n.nodeDOM:null}posAtDOM(e,n,r=-1){let o=this.docView.posFromDOM(e,n,r);if(o==null)throw new RangeError("DOM position not inside the editor");return o}endOfTextblock(e,n){return yZ(this,n||this.state,e)}pasteHTML(e,n){return Fc(this,"",e,!1,n||new ClipboardEvent("paste"))}pasteText(e,n){return Fc(this,e,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(e){return _x(this,e)}destroy(){this.docView&&(UZ(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],mg(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,YJ())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return YZ(this,e)}dispatch(e){let n=this._props.dispatchTransaction;n?n.call(this,e):this.updateState(this.state.apply(e))}domSelectionRange(){let e=this.domSelection();return e?er&&this.root.nodeType===11&&QJ(this.dom.ownerDocument)==this.dom&&gX(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function sk(t){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(t.state)),n)for(let r in n)r=="class"?e.class+=" "+n[r]:r=="style"?e.style=(e.style?e.style+";":"")+n[r]:!e[r]&&r!="contenteditable"&&r!="nodeName"&&(e[r]=String(n[r]))}),e.translate||(e.translate="no"),[Ln.node(0,t.state.doc.content.size,e)]}function ak(t){if(t.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),t.cursorWrapper={dom:e,deco:Ln.widget(t.state.selection.from,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function lk(t){return!t.someProp("editable",e=>e(t.state)===!1)}function kX(t,e){let n=Math.min(t.$anchor.sharedDepth(t.head),e.$anchor.sharedDepth(e.head));return t.$anchor.start(n)!=e.$anchor.start(n)}function ck(t){let e=Object.create(null);function n(r){for(let o in r)Object.prototype.hasOwnProperty.call(e,o)||(e[o]=r[o])}return t.someProp("nodeViews",n),t.someProp("markViews",n),e}function MX(t,e){let n=0,r=0;for(let o in t){if(t[o]!=e[o])return!0;n++}for(let o in e)r++;return n!=r}function uk(t){if(t.spec.state||t.spec.filterTransaction||t.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var Ui={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:"'"},If={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},OX=typeof navigator<"u"&&/Mac/.test(navigator.platform),RX=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Nn=0;Nn<10;Nn++)Ui[48+Nn]=Ui[96+Nn]=String(Nn);for(var Nn=1;Nn<=24;Nn++)Ui[Nn+111]="F"+Nn;for(var Nn=65;Nn<=90;Nn++)Ui[Nn]=String.fromCharCode(Nn+32),If[Nn]=String.fromCharCode(Nn);for(var yg in Ui)If.hasOwnProperty(yg)||(If[yg]=Ui[yg]);function AX(t){var e=OX&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||RX&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?If:Ui)[t.keyCode]||t.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 IX=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function DX(t){let e=t.split(/-(?!$)/),n=e[e.length-1];n=="Space"&&(n=" ");let r,o,i,s;for(let a=0;a<e.length-1;a++){let l=e[a];if(/^(cmd|meta|m)$/i.test(l))s=!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))IX?s=!0:o=!0;else throw new Error("Unrecognized modifier name: "+l)}return r&&(n="Alt-"+n),o&&(n="Ctrl-"+n),s&&(n="Meta-"+n),i&&(n="Shift-"+n),n}function PX(t){let e=Object.create(null);for(let n in t)e[DX(n)]=t[n];return e}function bg(t,e,n=!0){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n&&e.shiftKey&&(t="Shift-"+t),t}function _X(t){return new en({props:{handleKeyDown:Bx(t)}})}function Bx(t){let e=PX(t);return function(n,r){let o=AX(r),i,s=e[bg(o,r)];if(s&&s(n.state,n.dispatch,n))return!0;if(o.length==1&&o!=" "){if(r.shiftKey){let a=e[bg(o,r,!1)];if(a&&a(n.state,n.dispatch,n))return!0}if((r.shiftKey||r.altKey||r.metaKey||o.charCodeAt(0)>127)&&(i=Ui[r.keyCode])&&i!=o){let a=e[bg(i,r)];if(a&&a(n.state,n.dispatch,n))return!0}}return!1}}const NX=(t,e)=>t.selection.empty?!1:(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function GD(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("backward",t):n.parentOffset>0)?null:n}const LX=(t,e,n)=>{let r=GD(t,n);if(!r)return!1;let o=Vx(r);if(!o){let s=r.blockRange(),a=s&&fl(s);return a==null?!1:(e&&e(t.tr.lift(s,a).scrollIntoView()),!0)}let i=o.nodeBefore;if(QD(t,o,e,-1))return!0;if(r.parent.content.size==0&&(il(i,"end")||qe.isSelectable(i)))for(let s=r.depth;;s--){let a=qp(t.doc,r.before(s),r.after(s),Ae.empty);if(a&&a.slice.size<a.to-a.from){if(e){let l=t.tr.step(a);l.setSelection(il(i,"end")?Qe.findFrom(l.doc.resolve(l.mapping.map(o.pos,-1)),-1):qe.create(l.doc,o.pos-i.nodeSize)),e(l.scrollIntoView())}return!0}if(s==1||r.node(s-1).childCount>1)break}return i.isAtom&&o.depth==r.depth-1?(e&&e(t.tr.delete(o.pos-i.nodeSize,o.pos).scrollIntoView()),!0):!1},jX=(t,e,n)=>{let r=GD(t,n);if(!r)return!1;let o=Vx(r);return o?JD(t,o,e):!1},$X=(t,e,n)=>{let r=ZD(t,n);if(!r)return!1;let o=zx(r);return o?JD(t,o,e):!1};function JD(t,e,n){let r=e.nodeBefore,o=r,i=e.pos-1;for(;!o.isTextblock;i--){if(o.type.spec.isolating)return!1;let f=o.lastChild;if(!f)return!1;o=f}let s=e.nodeAfter,a=s,l=e.pos+1;for(;!a.isTextblock;l++){if(a.type.spec.isolating)return!1;let f=a.firstChild;if(!f)return!1;a=f}let u=qp(t.doc,i,l,Ae.empty);if(!u||u.from!=i||u instanceof Tn&&u.slice.size>=l-i)return!1;if(n){let f=t.tr.step(u);f.setSelection(Ge.create(f.doc,i)),n(f.scrollIntoView())}return!0}function il(t,e,n=!1){for(let r=t;r;r=e=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}const FX=(t,e,n)=>{let{$head:r,empty:o}=t.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):r.parentOffset>0)return!1;i=Vx(r)}let s=i&&i.nodeBefore;return!s||!qe.isSelectable(s)?!1:(e&&e(t.tr.setSelection(qe.create(t.doc,i.pos-s.nodeSize)).scrollIntoView()),!0)};function Vx(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function ZD(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("forward",t):n.parentOffset<n.parent.content.size)?null:n}const BX=(t,e,n)=>{let r=ZD(t,n);if(!r)return!1;let o=zx(r);if(!o)return!1;let i=o.nodeAfter;if(QD(t,o,e,1))return!0;if(r.parent.content.size==0&&(il(i,"start")||qe.isSelectable(i))){let s=qp(t.doc,r.before(),r.after(),Ae.empty);if(s&&s.slice.size<s.to-s.from){if(e){let a=t.tr.step(s);a.setSelection(il(i,"start")?Qe.findFrom(a.doc.resolve(a.mapping.map(o.pos)),1):qe.create(a.doc,a.mapping.map(o.pos))),e(a.scrollIntoView())}return!0}}return i.isAtom&&o.depth==r.depth-1?(e&&e(t.tr.delete(o.pos,o.pos+i.nodeSize).scrollIntoView()),!0):!1},VX=(t,e,n)=>{let{$head:r,empty:o}=t.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):r.parentOffset<r.parent.content.size)return!1;i=zx(r)}let s=i&&i.nodeAfter;return!s||!qe.isSelectable(s)?!1:(e&&e(t.tr.setSelection(qe.create(t.doc,i.pos)).scrollIntoView()),!0)};function zx(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){let n=t.node(e);if(t.index(e)+1<n.childCount)return t.doc.resolve(t.after(e+1));if(n.type.spec.isolating)break}return null}const zX=(t,e)=>{let n=t.selection,r=n instanceof qe,o;if(r){if(n.node.isTextblock||!ts(t.doc,n.from))return!1;o=n.from}else if(o=Wp(t.doc,n.from,-1),o==null)return!1;if(e){let i=t.tr.join(o);r&&i.setSelection(qe.create(i.doc,o-t.doc.resolve(o).nodeBefore.nodeSize)),e(i.scrollIntoView())}return!0},HX=(t,e)=>{let n=t.selection,r;if(n instanceof qe){if(n.node.isTextblock||!ts(t.doc,n.to))return!1;r=n.to}else if(r=Wp(t.doc,n.to,1),r==null)return!1;return e&&e(t.tr.join(r).scrollIntoView()),!0},WX=(t,e)=>{let{$from:n,$to:r}=t.selection,o=n.blockRange(r),i=o&&fl(o);return i==null?!1:(e&&e(t.tr.lift(o,i).scrollIntoView()),!0)},qX=(t,e)=>{let{$head:n,$anchor:r}=t.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(e&&e(t.tr.insertText(`
242
+ `).scrollIntoView()),!0)};function XD(t){for(let e=0;e<t.edgeCount;e++){let{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const UX=(t,e)=>{let{$head:n,$anchor:r}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let o=n.node(-1),i=n.indexAfter(-1),s=XD(o.contentMatchAt(i));if(!s||!o.canReplaceWith(i,i,s))return!1;if(e){let a=n.after(),l=t.tr.replaceWith(a,a,s.createAndFill());l.setSelection(Qe.near(l.doc.resolve(a),1)),e(l.scrollIntoView())}return!0},KX=(t,e)=>{let n=t.selection,{$from:r,$to:o}=n;if(n instanceof Wr||r.parent.inlineContent||o.parent.inlineContent)return!1;let i=XD(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(e){let s=(!r.parentOffset&&o.index()<o.parent.childCount?r:o).pos,a=t.tr.insert(s,i.createAndFill());a.setSelection(Ge.create(a.doc,s+1)),e(a.scrollIntoView())}return!0},YX=(t,e)=>{let{$cursor:n}=t.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let i=n.before();if(Wa(t.doc,i))return e&&e(t.tr.split(i).scrollIntoView()),!0}let r=n.blockRange(),o=r&&fl(r);return o==null?!1:(e&&e(t.tr.lift(r,o).scrollIntoView()),!0)},GX=(t,e)=>{let{$from:n,to:r}=t.selection,o,i=n.sharedDepth(r);return i==0?!1:(o=n.before(i),e&&e(t.tr.setSelection(qe.create(t.doc,o))),!0)};function JX(t,e,n){let r=e.nodeBefore,o=e.nodeAfter,i=e.index();return!r||!o||!r.type.compatibleContent(o.type)?!1:!r.content.size&&e.parent.canReplace(i-1,i)?(n&&n(t.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(i,i+1)||!(o.isTextblock||ts(t.doc,e.pos))?!1:(n&&n(t.tr.join(e.pos).scrollIntoView()),!0)}function QD(t,e,n,r){let o=e.nodeBefore,i=e.nodeAfter,s,a,l=o.type.spec.isolating||i.type.spec.isolating;if(!l&&JX(t,e,n))return!0;let u=!l&&e.parent.canReplace(e.index(),e.index()+1);if(u&&(s=(a=o.contentMatchAt(o.childCount)).findWrapping(i.type))&&a.matchType(s[0]||i.type).validEnd){if(n){let g=e.pos+i.nodeSize,b=Te.empty;for(let C=s.length-1;C>=0;C--)b=Te.from(s[C].create(null,b));b=Te.from(o.copy(b));let y=t.tr.step(new Mn(e.pos-1,g,e.pos,g,new Ae(b,1,0),s.length,!0)),S=y.doc.resolve(g+2*s.length);S.nodeAfter&&S.nodeAfter.type==o.type&&ts(y.doc,S.pos)&&y.join(S.pos),n(y.scrollIntoView())}return!0}let f=i.type.spec.isolating||r>0&&l?null:Qe.findFrom(e,1),h=f&&f.$from.blockRange(f.$to),m=h&&fl(h);if(m!=null&&m>=e.depth)return n&&n(t.tr.lift(h,m).scrollIntoView()),!0;if(u&&il(i,"start",!0)&&il(o,"end")){let g=o,b=[];for(;b.push(g),!g.isTextblock;)g=g.lastChild;let y=i,S=1;for(;!y.isTextblock;y=y.firstChild)S++;if(g.canReplace(g.childCount,g.childCount,y.content)){if(n){let C=Te.empty;for(let T=b.length-1;T>=0;T--)C=Te.from(b[T].copy(C));let E=t.tr.step(new Mn(e.pos-b.length,e.pos+i.nodeSize,e.pos+S,e.pos+i.nodeSize-S,new Ae(C,b.length,0),0,!0));n(E.scrollIntoView())}return!0}}return!1}function eP(t){return function(e,n){let r=e.selection,o=t<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(e.tr.setSelection(Ge.create(e.doc,t<0?o.start(i):o.end(i)))),!0):!1}}const ZX=eP(-1),XX=eP(1);function QX(t,e=null){return function(n,r){let{$from:o,$to:i}=n.selection,s=o.blockRange(i),a=s&&Ox(s,t,e);return a?(r&&r(n.tr.wrap(s,a).scrollIntoView()),!0):!1}}function dk(t,e=null){return function(n,r){let o=!1;for(let i=0;i<n.selection.ranges.length&&!o;i++){let{$from:{pos:s},$to:{pos:a}}=n.selection.ranges[i];n.doc.nodesBetween(s,a,(l,u)=>{if(o)return!1;if(!(!l.isTextblock||l.hasMarkup(t,e)))if(l.type==t)o=!0;else{let f=n.doc.resolve(u),h=f.index();o=f.parent.canReplaceWith(h,h+1,t)}})}if(!o)return!1;if(r){let i=n.tr;for(let s=0;s<n.selection.ranges.length;s++){let{$from:{pos:a},$to:{pos:l}}=n.selection.ranges[s];i.setBlockType(a,l,t,e)}r(i.scrollIntoView())}return!0}}typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function eQ(t,e=null){return function(n,r){let{$from:o,$to:i}=n.selection,s=o.blockRange(i);if(!s)return!1;let a=r?n.tr:null;return tQ(a,s,t,e)?(r&&r(a.scrollIntoView()),!0):!1}}function tQ(t,e,n,r=null){let o=!1,i=e,s=e.$from.doc;if(e.depth>=2&&e.$from.node(e.depth-1).type.compatibleContent(n)&&e.startIndex==0){if(e.$from.index(e.depth-1)==0)return!1;let l=s.resolve(e.start-2);i=new Tf(l,l,e.depth),e.endIndex<e.parent.childCount&&(e=new Tf(e.$from,s.resolve(e.$to.end(e.depth)),e.depth)),o=!0}let a=Ox(i,n,r,e);return a?(t&&nQ(t,e,a,o,n),!0):!1}function nQ(t,e,n,r,o){let i=Te.empty;for(let f=n.length-1;f>=0;f--)i=Te.from(n[f].type.create(n[f].attrs,i));t.step(new Mn(e.start-(r?2:0),e.end,e.start,e.end,new Ae(i,0,0),n.length,!0));let s=0;for(let f=0;f<n.length;f++)n[f].type==o&&(s=f+1);let a=n.length-s,l=e.start+n.length-(r?2:0),u=e.parent;for(let f=e.startIndex,h=e.endIndex,m=!0;f<h;f++,m=!1)!m&&Wa(t.doc,l,a)&&(t.split(l,a),l+=2*a),l+=u.child(f).nodeSize;return t}function rQ(t){return function(e,n){let{$from:r,$to:o}=e.selection,i=r.blockRange(o,s=>s.childCount>0&&s.firstChild.type==t);return i?n?r.node(i.depth-1).type==t?oQ(e,n,t,i):iQ(e,n,i):!0:!1}}function oQ(t,e,n,r){let o=t.tr,i=r.end,s=r.$to.end(r.depth);i<s&&(o.step(new Mn(i-1,s,i,s,new Ae(Te.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new Tf(o.doc.resolve(r.$from.pos),o.doc.resolve(s),r.depth));const a=fl(r);if(a==null)return!1;o.lift(r,a);let l=o.doc.resolve(o.mapping.map(i,-1)-1);return ts(o.doc,l.pos)&&l.nodeBefore.type==l.nodeAfter.type&&o.join(l.pos),e(o.scrollIntoView()),!0}function iQ(t,e,n){let r=t.tr,o=n.parent;for(let g=n.end,b=n.endIndex-1,y=n.startIndex;b>y;b--)g-=o.child(b).nodeSize,r.delete(g-1,g+1);let i=r.doc.resolve(n.start),s=i.nodeAfter;if(r.mapping.map(n.end)!=n.start+i.nodeAfter.nodeSize)return!1;let a=n.startIndex==0,l=n.endIndex==o.childCount,u=i.node(-1),f=i.index(-1);if(!u.canReplace(f+(a?0:1),f+1,s.content.append(l?Te.empty:Te.from(o))))return!1;let h=i.pos,m=h+s.nodeSize;return r.step(new Mn(h-(a?1:0),m+(l?1:0),h+1,m-1,new Ae((a?Te.empty:Te.from(o.copy(Te.empty))).append(l?Te.empty:Te.from(o.copy(Te.empty))),a?0:1,l?0:1),a?0:1)),e(r.scrollIntoView()),!0}function sQ(t){return function(e,n){let{$from:r,$to:o}=e.selection,i=r.blockRange(o,u=>u.childCount>0&&u.firstChild.type==t);if(!i)return!1;let s=i.startIndex;if(s==0)return!1;let a=i.parent,l=a.child(s-1);if(l.type!=t)return!1;if(n){let u=l.lastChild&&l.lastChild.type==a.type,f=Te.from(u?t.create():null),h=new Ae(Te.from(t.create(null,Te.from(a.type.create(null,f)))),u?3:1,0),m=i.start,g=i.end;n(e.tr.step(new Mn(m-(u?3:1),g,m,g,h,1,!0)).scrollIntoView())}return!0}}function Jp(t){const{state:e,transaction:n}=t;let{selection:r}=n,{doc:o}=n,{storedMarks:i}=n;return{...e,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),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 Zp{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:e,editor:n,state:r}=this,{view:o}=n,{tr:i}=r,s=this.buildProps(i);return Object.fromEntries(Object.entries(e).map(([a,l])=>[a,(...f)=>{const h=l(...f)(s);return!i.getMeta("preventDispatch")&&!this.hasCustomState&&o.dispatch(i),h}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,n=!0){const{rawCommands:r,editor:o,state:i}=this,{view:s}=o,a=[],l=!!e,u=e||i.tr,f=()=>(!l&&n&&!u.getMeta("preventDispatch")&&!this.hasCustomState&&s.dispatch(u),a.every(m=>m===!0)),h={...Object.fromEntries(Object.entries(r).map(([m,g])=>[m,(...y)=>{const S=this.buildProps(u,n),C=g(...y)(S);return a.push(C),h}])),run:f};return h}createCan(e){const{rawCommands:n,state:r}=this,o=!1,i=e||r.tr,s=this.buildProps(i,o);return{...Object.fromEntries(Object.entries(n).map(([l,u])=>[l,(...f)=>u(...f)({...s,dispatch:void 0})])),chain:()=>this.createChain(i,o)}}buildProps(e,n=!0){const{rawCommands:r,editor:o,state:i}=this,{view:s}=o,a={tr:e,editor:o,view:s,state:Jp({state:i,transaction:e}),dispatch:n?()=>{}:void 0,chain:()=>this.createChain(e,n),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(r).map(([l,u])=>[l,(...f)=>u(...f)(a)]))}};return a}}class aQ{constructor(){this.callbacks={}}on(e,n){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(n),this}emit(e,...n){const r=this.callbacks[e];return r&&r.forEach(o=>o.apply(this,n)),this}off(e,n){const r=this.callbacks[e];return r&&(n?this.callbacks[e]=r.filter(o=>o!==n):delete this.callbacks[e]),this}once(e,n){const r=(...o)=>{this.off(e,r),n.apply(this,o)};return this.on(e,r)}removeAllListeners(){this.callbacks={}}}function Be(t,e,n){return t.config[e]===void 0&&t.parent?Be(t.parent,e,n):typeof t.config[e]=="function"?t.config[e].bind({...n,parent:t.parent?Be(t.parent,e,n):null}):t.config[e]}function Xp(t){const e=t.filter(o=>o.type==="extension"),n=t.filter(o=>o.type==="node"),r=t.filter(o=>o.type==="mark");return{baseExtensions:e,nodeExtensions:n,markExtensions:r}}function tP(t){const e=[],{nodeExtensions:n,markExtensions:r}=Xp(t),o=[...n,...r],i={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return t.forEach(s=>{const a={name:s.name,options:s.options,storage:s.storage,extensions:o},l=Be(s,"addGlobalAttributes",a);if(!l)return;l().forEach(f=>{f.types.forEach(h=>{Object.entries(f.attributes).forEach(([m,g])=>{e.push({type:h,name:m,attribute:{...i,...g}})})})})}),o.forEach(s=>{const a={name:s.name,options:s.options,storage:s.storage},l=Be(s,"addAttributes",a);if(!l)return;const u=l();Object.entries(u).forEach(([f,h])=>{const m={...i,...h};typeof(m==null?void 0:m.default)=="function"&&(m.default=m.default()),m!=null&&m.isRequired&&(m==null?void 0:m.default)===void 0&&delete m.default,e.push({type:s.name,name:f,attribute:m})})}),e}function xn(t,e){if(typeof t=="string"){if(!e.nodes[t])throw Error(`There is no node type named '${t}'. Maybe you forgot to add the extension?`);return e.nodes[t]}return t}function yt(...t){return t.filter(e=>!!e).reduce((e,n)=>{const r={...e};return Object.entries(n).forEach(([o,i])=>{if(!r[o]){r[o]=i;return}if(o==="class"){const a=i?String(i).split(" "):[],l=r[o]?r[o].split(" "):[],u=a.filter(f=>!l.includes(f));r[o]=[...l,...u].join(" ")}else if(o==="style"){const a=i?i.split(";").map(f=>f.trim()).filter(Boolean):[],l=r[o]?r[o].split(";").map(f=>f.trim()).filter(Boolean):[],u=new Map;l.forEach(f=>{const[h,m]=f.split(":").map(g=>g.trim());u.set(h,m)}),a.forEach(f=>{const[h,m]=f.split(":").map(g=>g.trim());u.set(h,m)}),r[o]=Array.from(u.entries()).map(([f,h])=>`${f}: ${h}`).join("; ")}else r[o]=i}),r},{})}function Df(t,e){return e.filter(n=>n.type===t.type.name).filter(n=>n.attribute.rendered).map(n=>n.attribute.renderHTML?n.attribute.renderHTML(t.attrs)||{}:{[n.name]:t.attrs[n.name]}).reduce((n,r)=>yt(n,r),{})}function nP(t){return typeof t=="function"}function lt(t,e=void 0,...n){return nP(t)?e?t.bind(e)(...n):t(...n):t}function lQ(t={}){return Object.keys(t).length===0&&t.constructor===Object}function cQ(t){return typeof t!="string"?t:t.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(t):t==="true"?!0:t==="false"?!1:t}function fk(t,e){return"style"in t?t:{...t,getAttrs:n=>{const r=t.getAttrs?t.getAttrs(n):t.attrs;if(r===!1)return!1;const o=e.reduce((i,s)=>{const a=s.attribute.parseHTML?s.attribute.parseHTML(n):cQ(n.getAttribute(s.name));return a==null?i:{...i,[s.name]:a}},{});return{...r,...o}}}}function pk(t){return Object.fromEntries(Object.entries(t).filter(([e,n])=>e==="attrs"&&lQ(n)?!1:n!=null))}function uQ(t,e){var n;const r=tP(t),{nodeExtensions:o,markExtensions:i}=Xp(t),s=(n=o.find(u=>Be(u,"topNode")))===null||n===void 0?void 0:n.name,a=Object.fromEntries(o.map(u=>{const f=r.filter(C=>C.type===u.name),h={name:u.name,options:u.options,storage:u.storage,editor:e},m=t.reduce((C,E)=>{const T=Be(E,"extendNodeSchema",h);return{...C,...T?T(u):{}}},{}),g=pk({...m,content:lt(Be(u,"content",h)),marks:lt(Be(u,"marks",h)),group:lt(Be(u,"group",h)),inline:lt(Be(u,"inline",h)),atom:lt(Be(u,"atom",h)),selectable:lt(Be(u,"selectable",h)),draggable:lt(Be(u,"draggable",h)),code:lt(Be(u,"code",h)),whitespace:lt(Be(u,"whitespace",h)),linebreakReplacement:lt(Be(u,"linebreakReplacement",h)),defining:lt(Be(u,"defining",h)),isolating:lt(Be(u,"isolating",h)),attrs:Object.fromEntries(f.map(C=>{var E;return[C.name,{default:(E=C==null?void 0:C.attribute)===null||E===void 0?void 0:E.default}]}))}),b=lt(Be(u,"parseHTML",h));b&&(g.parseDOM=b.map(C=>fk(C,f)));const y=Be(u,"renderHTML",h);y&&(g.toDOM=C=>y({node:C,HTMLAttributes:Df(C,f)}));const S=Be(u,"renderText",h);return S&&(g.toText=S),[u.name,g]})),l=Object.fromEntries(i.map(u=>{const f=r.filter(S=>S.type===u.name),h={name:u.name,options:u.options,storage:u.storage,editor:e},m=t.reduce((S,C)=>{const E=Be(C,"extendMarkSchema",h);return{...S,...E?E(u):{}}},{}),g=pk({...m,inclusive:lt(Be(u,"inclusive",h)),excludes:lt(Be(u,"excludes",h)),group:lt(Be(u,"group",h)),spanning:lt(Be(u,"spanning",h)),code:lt(Be(u,"code",h)),attrs:Object.fromEntries(f.map(S=>{var C;return[S.name,{default:(C=S==null?void 0:S.attribute)===null||C===void 0?void 0:C.default}]}))}),b=lt(Be(u,"parseHTML",h));b&&(g.parseDOM=b.map(S=>fk(S,f)));const y=Be(u,"renderHTML",h);return y&&(g.toDOM=S=>y({mark:S,HTMLAttributes:Df(S,f)})),[u.name,g]}));return new Z2({topNode:s,nodes:a,marks:l})}function vg(t,e){return e.nodes[t]||e.marks[t]||null}function hk(t,e){return Array.isArray(e)?e.some(n=>(typeof n=="string"?n:n.name)===t.name):e}function Hx(t,e){const n=Ys.fromSchema(e).serializeFragment(t),o=document.implementation.createHTMLDocument().createElement("div");return o.appendChild(n),o.innerHTML}const dQ=(t,e=500)=>{let n="";const r=t.parentOffset;return t.parent.nodesBetween(Math.max(0,r-e),r,(o,i,s,a)=>{var l,u;const f=((u=(l=o.type.spec).toText)===null||u===void 0?void 0:u.call(l,{node:o,pos:i,parent:s,index:a}))||o.textContent||"%leaf%";n+=o.isAtom&&!o.isText?f:f.slice(0,Math.max(0,r-i))}),n};function Wx(t){return Object.prototype.toString.call(t)==="[object RegExp]"}class du{constructor(e){this.find=e.find,this.handler=e.handler}}const fQ=(t,e)=>{if(Wx(e))return e.exec(t);const n=e(t);if(!n)return null;const r=[n.text];return r.index=n.index,r.input=t,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 Sd(t){var e;const{editor:n,from:r,to:o,text:i,rules:s,plugin:a}=t,{view:l}=n;if(l.composing)return!1;const u=l.state.doc.resolve(r);if(u.parent.type.spec.code||!((e=u.nodeBefore||u.nodeAfter)===null||e===void 0)&&e.marks.find(m=>m.type.spec.code))return!1;let f=!1;const h=dQ(u)+i;return s.forEach(m=>{if(f)return;const g=fQ(h,m.find);if(!g)return;const b=l.state.tr,y=Jp({state:l.state,transaction:b}),S={from:r-(g[0].length-i.length),to:o},{commands:C,chain:E,can:T}=new Zp({editor:n,state:y});m.handler({state:y,range:S,match:g,commands:C,chain:E,can:T})===null||!b.steps.length||(b.setMeta(a,{transform:b,from:r,to:o,text:i}),l.dispatch(b),f=!0)}),f}function pQ(t){const{editor:e,rules:n}=t,r=new en({state:{init(){return null},apply(o,i,s){const a=o.getMeta(r);if(a)return a;const l=o.getMeta("applyInputRules");return!!l&&setTimeout(()=>{let{text:f}=l;typeof f=="string"?f=f:f=Hx(Te.from(f),s.schema);const{from:h}=l,m=h+f.length;Sd({editor:e,from:h,to:m,text:f,rules:n,plugin:r})}),o.selectionSet||o.docChanged?null:i}},props:{handleTextInput(o,i,s,a){return Sd({editor:e,from:i,to:s,text:a,rules:n,plugin:r})},handleDOMEvents:{compositionend:o=>(setTimeout(()=>{const{$cursor:i}=o.state.selection;i&&Sd({editor:e,from:i.pos,to:i.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(o,i){if(i.key!=="Enter")return!1;const{$cursor:s}=o.state.selection;return s?Sd({editor:e,from:s.pos,to:s.pos,text:`
243
+ `,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function hQ(t){return Object.prototype.toString.call(t).slice(8,-1)}function Cd(t){return hQ(t)!=="Object"?!1:t.constructor===Object&&Object.getPrototypeOf(t)===Object.prototype}function Qp(t,e){const n={...t};return Cd(t)&&Cd(e)&&Object.keys(e).forEach(r=>{Cd(e[r])&&Cd(t[r])?n[r]=Qp(t[r],e[r]):n[r]=e[r]}),n}class mr{constructor(e={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.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=lt(Be(this,"addOptions",{name:this.name}))),this.storage=lt(Be(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new mr(e)}configure(e={}){const n=this.extend({...this.config,addOptions:()=>Qp(this.options,e)});return n.name=this.name,n.parent=this.parent,n}extend(e={}){const n=new mr(e);return n.parent=this,this.child=n,n.name=e.name?e.name:n.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=lt(Be(n,"addOptions",{name:n.name})),n.storage=lt(Be(n,"addStorage",{name:n.name,options:n.options})),n}static handleExit({editor:e,mark:n}){const{tr:r}=e.state,o=e.state.selection.$from;if(o.pos===o.end()){const s=o.marks();if(!!!s.find(u=>(u==null?void 0:u.type.name)===n.name))return!1;const l=s.find(u=>(u==null?void 0:u.type.name)===n.name);return l&&r.removeStoredMark(l),r.insertText(" ",o.pos),e.view.dispatch(r),!0}return!1}}function mQ(t){return typeof t=="number"}class gQ{constructor(e){this.find=e.find,this.handler=e.handler}}const yQ=(t,e,n)=>{if(Wx(e))return[...t.matchAll(e)];const r=e(t,n);return r?r.map(o=>{const i=[o.text];return i.index=o.index,i.input=t,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 bQ(t){const{editor:e,state:n,from:r,to:o,rule:i,pasteEvent:s,dropEvent:a}=t,{commands:l,chain:u,can:f}=new Zp({editor:e,state:n}),h=[];return n.doc.nodesBetween(r,o,(g,b)=>{if(!g.isTextblock||g.type.spec.code)return;const y=Math.max(r,b),S=Math.min(o,b+g.content.size),C=g.textBetween(y-b,S-b,void 0,"");yQ(C,i.find,s).forEach(T=>{if(T.index===void 0)return;const w=y+T.index+1,M=w+T[0].length,R={from:n.tr.mapping.map(w),to:n.tr.mapping.map(M)},_=i.handler({state:n,range:R,match:T,commands:l,chain:u,can:f,pasteEvent:s,dropEvent:a});h.push(_)})}),h.every(g=>g!==null)}let wd=null;const vQ=t=>{var e;const n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(e=n.clipboardData)===null||e===void 0||e.setData("text/html",t),n};function xQ(t){const{editor:e,rules:n}=t;let r=null,o=!1,i=!1,s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,a;try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}const l=({state:f,from:h,to:m,rule:g,pasteEvt:b})=>{const y=f.tr,S=Jp({state:f,transaction:y});if(!(!bQ({editor:e,state:S,from:Math.max(h-1,0),to:m.b-1,rule:g,pasteEvent:b,dropEvent:a})||!y.steps.length)){try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}return s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,y}};return n.map(f=>new en({view(h){const m=b=>{var y;r=!((y=h.dom.parentElement)===null||y===void 0)&&y.contains(b.target)?h.dom.parentElement:null,r&&(wd=e)},g=()=>{wd&&(wd=null)};return window.addEventListener("dragstart",m),window.addEventListener("dragend",g),{destroy(){window.removeEventListener("dragstart",m),window.removeEventListener("dragend",g)}}},props:{handleDOMEvents:{drop:(h,m)=>{if(i=r===h.dom.parentElement,a=m,!i){const g=wd;g&&setTimeout(()=>{const b=g.state.selection;b&&g.commands.deleteRange({from:b.from,to:b.to})},10)}return!1},paste:(h,m)=>{var g;const b=(g=m.clipboardData)===null||g===void 0?void 0:g.getData("text/html");return s=m,o=!!(b!=null&&b.includes("data-pm-slice")),!1}}},appendTransaction:(h,m,g)=>{const b=h[0],y=b.getMeta("uiEvent")==="paste"&&!o,S=b.getMeta("uiEvent")==="drop"&&!i,C=b.getMeta("applyPasteRules"),E=!!C;if(!y&&!S&&!E)return;if(E){let{text:M}=C;typeof M=="string"?M=M:M=Hx(Te.from(M),g.schema);const{from:R}=C,_=R+M.length,I=vQ(M);return l({rule:f,state:g,from:R,to:{b:_},pasteEvt:I})}const T=m.doc.content.findDiffStart(g.doc.content),w=m.doc.content.findDiffEnd(g.doc.content);if(!(!mQ(T)||!w||T===w.b))return l({rule:f,state:g,from:T,to:w,pasteEvt:s})}}))}function SQ(t){const e=t.filter((n,r)=>t.indexOf(n)!==r);return Array.from(new Set(e))}class La{constructor(e,n){this.splittableMarks=[],this.editor=n,this.extensions=La.resolve(e),this.schema=uQ(this.extensions,n),this.setupExtensions()}static resolve(e){const n=La.sort(La.flatten(e)),r=SQ(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(e){return e.map(n=>{const r={name:n.name,options:n.options,storage:n.storage},o=Be(n,"addExtensions",r);return o?[n,...this.flatten(o())]:n}).flat(10)}static sort(e){return e.sort((r,o)=>{const i=Be(r,"priority")||100,s=Be(o,"priority")||100;return i>s?-1:i<s?1:0})}get commands(){return this.extensions.reduce((e,n)=>{const r={name:n.name,options:n.options,storage:n.storage,editor:this.editor,type:vg(n.name,this.schema)},o=Be(n,"addCommands",r);return o?{...e,...o()}:e},{})}get plugins(){const{editor:e}=this,n=La.sort([...this.extensions].reverse()),r=[],o=[],i=n.map(s=>{const a={name:s.name,options:s.options,storage:s.storage,editor:e,type:vg(s.name,this.schema)},l=[],u=Be(s,"addKeyboardShortcuts",a);let f={};if(s.type==="mark"&&Be(s,"exitable",a)&&(f.ArrowRight=()=>mr.handleExit({editor:e,mark:s})),u){const y=Object.fromEntries(Object.entries(u()).map(([S,C])=>[S,()=>C({editor:e})]));f={...f,...y}}const h=_X(f);l.push(h);const m=Be(s,"addInputRules",a);hk(s,e.options.enableInputRules)&&m&&r.push(...m());const g=Be(s,"addPasteRules",a);hk(s,e.options.enablePasteRules)&&g&&o.push(...g());const b=Be(s,"addProseMirrorPlugins",a);if(b){const y=b();l.push(...y)}return l}).flat();return[pQ({editor:e,rules:r}),...xQ({editor:e,rules:o}),...i]}get attributes(){return tP(this.extensions)}get nodeViews(){const{editor:e}=this,{nodeExtensions:n}=Xp(this.extensions);return Object.fromEntries(n.filter(r=>!!Be(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:e,type:xn(r.name,this.schema)},s=Be(r,"addNodeView",i);if(!s)return[];const a=(l,u,f,h,m)=>{const g=Df(l,o);return s()({node:l,view:u,getPos:f,decorations:h,innerDecorations:m,editor:e,extension:r,HTMLAttributes:g})};return[r.name,a]}))}setupExtensions(){this.extensions.forEach(e=>{var n;this.editor.extensionStorage[e.name]=e.storage;const r={name:e.name,options:e.options,storage:e.storage,editor:this.editor,type:vg(e.name,this.schema)};e.type==="mark"&&(!((n=lt(Be(e,"keepOnSplit",r)))!==null&&n!==void 0)||n)&&this.splittableMarks.push(e.name);const o=Be(e,"onBeforeCreate",r),i=Be(e,"onCreate",r),s=Be(e,"onUpdate",r),a=Be(e,"onSelectionUpdate",r),l=Be(e,"onTransaction",r),u=Be(e,"onFocus",r),f=Be(e,"onBlur",r),h=Be(e,"onDestroy",r);o&&this.editor.on("beforeCreate",o),i&&this.editor.on("create",i),s&&this.editor.on("update",s),a&&this.editor.on("selectionUpdate",a),l&&this.editor.on("transaction",l),u&&this.editor.on("focus",u),f&&this.editor.on("blur",f),h&&this.editor.on("destroy",h)})}}class cn{constructor(e={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.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=lt(Be(this,"addOptions",{name:this.name}))),this.storage=lt(Be(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new cn(e)}configure(e={}){const n=this.extend({...this.config,addOptions:()=>Qp(this.options,e)});return n.name=this.name,n.parent=this.parent,n}extend(e={}){const n=new cn({...this.config,...e});return n.parent=this,this.child=n,n.name=e.name?e.name:n.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=lt(Be(n,"addOptions",{name:n.name})),n.storage=lt(Be(n,"addStorage",{name:n.name,options:n.options})),n}}function rP(t,e,n){const{from:r,to:o}=e,{blockSeparator:i=`
244
+
245
+ `,textSerializers:s={}}=n||{};let a="";return t.nodesBetween(r,o,(l,u,f,h)=>{var m;l.isBlock&&u>r&&(a+=i);const g=s==null?void 0:s[l.type.name];if(g)return f&&(a+=g({node:l,pos:u,parent:f,index:h,range:e})),!1;l.isText&&(a+=(m=l==null?void 0:l.text)===null||m===void 0?void 0:m.slice(Math.max(r,u)-u,o-u))}),a}function qx(t){return Object.fromEntries(Object.entries(t.nodes).filter(([,e])=>e.spec.toText).map(([e,n])=>[e,n.spec.toText]))}const CQ=cn.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new en({key:new gn("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:t}=this,{state:e,schema:n}=t,{doc:r,selection:o}=e,{ranges:i}=o,s=Math.min(...i.map(f=>f.$from.pos)),a=Math.max(...i.map(f=>f.$to.pos)),l=qx(n);return rP(r,{from:s,to:a},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:l})}}})]}}),wQ=()=>({editor:t,view:e})=>(requestAnimationFrame(()=>{var n;t.isDestroyed||(e.dom.blur(),(n=window==null?void 0:window.getSelection())===null||n===void 0||n.removeAllRanges())}),!0),TQ=(t=!1)=>({commands:e})=>e.setContent("",t),EQ=()=>({state:t,tr:e,dispatch:n})=>{const{selection:r}=e,{ranges:o}=r;return n&&o.forEach(({$from:i,$to:s})=>{t.doc.nodesBetween(i.pos,s.pos,(a,l)=>{if(a.type.isText)return;const{doc:u,mapping:f}=e,h=u.resolve(f.map(l)),m=u.resolve(f.map(l+a.nodeSize)),g=h.blockRange(m);if(!g)return;const b=fl(g);if(a.type.isTextblock){const{defaultType:y}=h.parent.contentMatchAt(h.index());e.setNodeMarkup(g.start,y)}(b||b===0)&&e.lift(g,b)})}),!0},kQ=t=>e=>t(e),MQ=()=>({state:t,dispatch:e})=>KX(t,e),OQ=(t,e)=>({editor:n,tr:r})=>{const{state:o}=n,i=o.doc.slice(t.from,t.to);r.deleteRange(t.from,t.to);const s=r.mapping.map(e);return r.insert(s,i.content),r.setSelection(new Ge(r.doc.resolve(s-1))),!0},RQ=()=>({tr:t,dispatch:e})=>{const{selection:n}=t,r=n.$anchor.node();if(r.content.size>0)return!1;const o=t.selection.$anchor;for(let i=o.depth;i>0;i-=1)if(o.node(i).type===r.type){if(e){const a=o.before(i),l=o.after(i);t.delete(a,l).scrollIntoView()}return!0}return!1},AQ=t=>({tr:e,state:n,dispatch:r})=>{const o=xn(t,n.schema),i=e.selection.$anchor;for(let s=i.depth;s>0;s-=1)if(i.node(s).type===o){if(r){const l=i.before(s),u=i.after(s);e.delete(l,u).scrollIntoView()}return!0}return!1},IQ=t=>({tr:e,dispatch:n})=>{const{from:r,to:o}=t;return n&&e.delete(r,o),!0},DQ=()=>({state:t,dispatch:e})=>NX(t,e),PQ=()=>({commands:t})=>t.keyboardShortcut("Enter"),_Q=()=>({state:t,dispatch:e})=>UX(t,e);function Pf(t,e,n={strict:!0}){const r=Object.keys(e);return r.length?r.every(o=>n.strict?e[o]===t[o]:Wx(e[o])?e[o].test(t[o]):e[o]===t[o]):!0}function oP(t,e,n={}){return t.find(r=>r.type===e&&Pf(Object.fromEntries(Object.keys(n).map(o=>[o,r.attrs[o]])),n))}function mk(t,e,n={}){return!!oP(t,e,n)}function fu(t,e,n){var r;if(!t||!e)return;let o=t.parent.childAfter(t.parentOffset);if((!o.node||!o.node.marks.some(f=>f.type===e))&&(o=t.parent.childBefore(t.parentOffset)),!o.node||!o.node.marks.some(f=>f.type===e)||(n=n||((r=o.node.marks[0])===null||r===void 0?void 0:r.attrs),!oP([...o.node.marks],e,n)))return;let s=o.index,a=t.start()+o.offset,l=s+1,u=a+o.node.nodeSize;for(;s>0&&mk([...t.parent.child(s-1).marks],e,n);)s-=1,a-=t.parent.child(s).nodeSize;for(;l<t.parent.childCount&&mk([...t.parent.child(l).marks],e,n);)u+=t.parent.child(l).nodeSize,l+=1;return{from:a,to:u}}function fo(t,e){if(typeof t=="string"){if(!e.marks[t])throw Error(`There is no mark type named '${t}'. Maybe you forgot to add the extension?`);return e.marks[t]}return t}const NQ=(t,e={})=>({tr:n,state:r,dispatch:o})=>{const i=fo(t,r.schema),{doc:s,selection:a}=n,{$from:l,from:u,to:f}=a;if(o){const h=fu(l,i,e);if(h&&h.from<=u&&h.to>=f){const m=Ge.create(s,h.from,h.to);n.setSelection(m)}}return!0},LQ=t=>e=>{const n=typeof t=="function"?t(e):t;for(let r=0;r<n.length;r+=1)if(n[r](e))return!0;return!1};function iP(t){return t instanceof Ge}function ri(t=0,e=0,n=0){return Math.min(Math.max(t,e),n)}function sP(t,e=null){if(!e)return null;const n=Qe.atStart(t),r=Qe.atEnd(t);if(e==="start"||e===!0)return n;if(e==="end")return r;const o=n.from,i=r.to;return e==="all"?Ge.create(t,ri(0,o,i),ri(t.content.size,o,i)):Ge.create(t,ri(e,o,i),ri(e,o,i))}function aP(){return navigator.platform==="Android"||/android/i.test(navigator.userAgent)}function eh(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}const jQ=(t=null,e={})=>({editor:n,view:r,tr:o,dispatch:i})=>{e={scrollIntoView:!0,...e};const s=()=>{(eh()||aP())&&r.dom.focus(),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),e!=null&&e.scrollIntoView&&n.commands.scrollIntoView())})};if(r.hasFocus()&&t===null||t===!1)return!0;if(i&&t===null&&!iP(n.state.selection))return s(),!0;const a=sP(o.doc,t)||n.state.selection,l=n.state.selection.eq(a);return i&&(l||o.setSelection(a),l&&o.storedMarks&&o.setStoredMarks(o.storedMarks),s()),!0},$Q=(t,e)=>n=>t.every((r,o)=>e(r,{...n,index:o})),FQ=(t,e)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},t,e),lP=t=>{const e=t.childNodes;for(let n=e.length-1;n>=0;n-=1){const r=e[n];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?t.removeChild(r):r.nodeType===1&&lP(r)}return t};function Td(t){const e=`<body>${t}</body>`,n=new window.DOMParser().parseFromString(e,"text/html").body;return lP(n)}function _f(t,e,n){if(t instanceof $i||t instanceof Te)return t;n={slice:!0,parseOptions:{},...n};const r=typeof t=="object"&&t!==null,o=typeof t=="string";if(r)try{if(Array.isArray(t)&&t.length>0)return Te.fromArray(t.map(a=>e.nodeFromJSON(a)));const s=e.nodeFromJSON(t);return n.errorOnInvalidContent&&s.check(),s}catch(i){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:i});return console.warn("[tiptap warn]: Invalid content.","Passed value:",t,"Error:",i),_f("",e,n)}if(o){if(n.errorOnInvalidContent){let s=!1,a="";const l=new Z2({topNode:e.spec.topNode,marks:e.spec.marks,nodes:e.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:u=>(s=!0,a=typeof u=="string"?u:u.outerHTML,null)}]}})});if(n.slice?Fi.fromSchema(l).parseSlice(Td(t),n.parseOptions):Fi.fromSchema(l).parse(Td(t),n.parseOptions),n.errorOnInvalidContent&&s)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${a}`)})}const i=Fi.fromSchema(e);return n.slice?i.parseSlice(Td(t),n.parseOptions).content:i.parse(Td(t),n.parseOptions)}return _f("",e,n)}function BQ(t,e,n){const r=t.steps.length-1;if(r<e)return;const o=t.steps[r];if(!(o instanceof Tn||o instanceof Mn))return;const i=t.mapping.maps[r];let s=0;i.forEach((a,l,u,f)=>{s===0&&(s=f)}),t.setSelection(Qe.near(t.doc.resolve(s),n))}const VQ=t=>!("type"in t),zQ=(t,e,n)=>({tr:r,dispatch:o,editor:i})=>{var s;if(o){n={parseOptions:i.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let a;try{a=_f(e,i.schema,{parseOptions:{preserveWhitespace:"full",...n.parseOptions},errorOnInvalidContent:(s=n.errorOnInvalidContent)!==null&&s!==void 0?s:i.options.enableContentCheck})}catch(b){return i.emit("contentError",{editor:i,error:b,disableCollaboration:()=>{i.storage.collaboration&&(i.storage.collaboration.isDisabled=!0)}}),!1}let{from:l,to:u}=typeof t=="number"?{from:t,to:t}:{from:t.from,to:t.to},f=!0,h=!0;if((VQ(a)?a:[a]).forEach(b=>{b.check(),f=f?b.isText&&b.marks.length===0:!1,h=h?b.isBlock:!1}),l===u&&h){const{parent:b}=r.doc.resolve(l);b.isTextblock&&!b.type.spec.code&&!b.childCount&&(l-=1,u+=1)}let g;if(f){if(Array.isArray(e))g=e.map(b=>b.text||"").join("");else if(e instanceof Te){let b="";e.forEach(y=>{y.text&&(b+=y.text)}),g=b}else typeof e=="object"&&e&&e.text?g=e.text:g=e;r.insertText(g,l,u)}else g=a,r.replaceWith(l,u,g);n.updateSelection&&BQ(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:l,text:g}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:l,text:g})}return!0},HQ=()=>({state:t,dispatch:e})=>zX(t,e),WQ=()=>({state:t,dispatch:e})=>HX(t,e),qQ=()=>({state:t,dispatch:e})=>LX(t,e),UQ=()=>({state:t,dispatch:e})=>BX(t,e),KQ=()=>({state:t,dispatch:e,tr:n})=>{try{const r=Wp(t.doc,t.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},YQ=()=>({state:t,dispatch:e,tr:n})=>{try{const r=Wp(t.doc,t.selection.$from.pos,1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},GQ=()=>({state:t,dispatch:e})=>jX(t,e),JQ=()=>({state:t,dispatch:e})=>$X(t,e);function cP(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function ZQ(t){const e=t.split(/-(?!$)/);let n=e[e.length-1];n==="Space"&&(n=" ");let r,o,i,s;for(let a=0;a<e.length-1;a+=1){const l=e[a];if(/^(cmd|meta|m)$/i.test(l))s=!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))eh()||cP()?s=!0:o=!0;else throw new Error(`Unrecognized modifier name: ${l}`)}return r&&(n=`Alt-${n}`),o&&(n=`Ctrl-${n}`),s&&(n=`Meta-${n}`),i&&(n=`Shift-${n}`),n}const XQ=t=>({editor:e,view:n,tr:r,dispatch:o})=>{const i=ZQ(t).split(/-(?!$)/),s=i.find(u=>!["Alt","Ctrl","Meta","Shift"].includes(u)),a=new KeyboardEvent("keydown",{key:s==="Space"?" ":s,altKey:i.includes("Alt"),ctrlKey:i.includes("Ctrl"),metaKey:i.includes("Meta"),shiftKey:i.includes("Shift"),bubbles:!0,cancelable:!0}),l=e.captureTransaction(()=>{n.someProp("handleKeyDown",u=>u(n,a))});return l==null||l.steps.forEach(u=>{const f=u.map(r.mapping);f&&o&&r.maybeStep(f)}),!0};function Vc(t,e,n={}){const{from:r,to:o,empty:i}=t.selection,s=e?xn(e,t.schema):null,a=[];t.doc.nodesBetween(r,o,(h,m)=>{if(h.isText)return;const g=Math.max(r,m),b=Math.min(o,m+h.nodeSize);a.push({node:h,from:g,to:b})});const l=o-r,u=a.filter(h=>s?s.name===h.node.type.name:!0).filter(h=>Pf(h.node.attrs,n,{strict:!1}));return i?!!u.length:u.reduce((h,m)=>h+m.to-m.from,0)>=l}const QQ=(t,e={})=>({state:n,dispatch:r})=>{const o=xn(t,n.schema);return Vc(n,o,e)?WX(n,r):!1},eee=()=>({state:t,dispatch:e})=>YX(t,e),tee=t=>({state:e,dispatch:n})=>{const r=xn(t,e.schema);return rQ(r)(e,n)},nee=()=>({state:t,dispatch:e})=>qX(t,e);function pu(t,e){return e.nodes[t]?"node":e.marks[t]?"mark":null}function gk(t,e){const n=typeof e=="string"?[e]:e;return Object.keys(t).reduce((r,o)=>(n.includes(o)||(r[o]=t[o]),r),{})}const ree=(t,e)=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null;const a=pu(typeof t=="string"?t:t.name,r.schema);return a?(a==="node"&&(i=xn(t,r.schema)),a==="mark"&&(s=fo(t,r.schema)),o&&n.selection.ranges.forEach(l=>{r.doc.nodesBetween(l.$from.pos,l.$to.pos,(u,f)=>{i&&i===u.type&&n.setNodeMarkup(f,void 0,gk(u.attrs,e)),s&&u.marks.length&&u.marks.forEach(h=>{s===h.type&&n.addMark(f,f+u.nodeSize,s.create(gk(h.attrs,e)))})})}),!0):!1},oee=()=>({tr:t,dispatch:e})=>(e&&t.scrollIntoView(),!0),iee=()=>({tr:t,dispatch:e})=>{if(e){const n=new Wr(t.doc);t.setSelection(n)}return!0},see=()=>({state:t,dispatch:e})=>FX(t,e),aee=()=>({state:t,dispatch:e})=>VX(t,e),lee=()=>({state:t,dispatch:e})=>GX(t,e),cee=()=>({state:t,dispatch:e})=>XX(t,e),uee=()=>({state:t,dispatch:e})=>ZX(t,e);function r0(t,e,n={},r={}){return _f(t,e,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}const dee=(t,e=!1,n={},r={})=>({editor:o,tr:i,dispatch:s,commands:a})=>{var l,u;const{doc:f}=i;if(n.preserveWhitespace!=="full"){const h=r0(t,o.schema,n,{errorOnInvalidContent:(l=r.errorOnInvalidContent)!==null&&l!==void 0?l:o.options.enableContentCheck});return s&&i.replaceWith(0,f.content.size,h).setMeta("preventUpdate",!e),!0}return s&&i.setMeta("preventUpdate",!e),a.insertContentAt({from:0,to:f.content.size},t,{parseOptions:n,errorOnInvalidContent:(u=r.errorOnInvalidContent)!==null&&u!==void 0?u:o.options.enableContentCheck})};function uP(t,e){const n=fo(e,t.schema),{from:r,to:o,empty:i}=t.selection,s=[];i?(t.storedMarks&&s.push(...t.storedMarks),s.push(...t.selection.$head.marks())):t.doc.nodesBetween(r,o,l=>{s.push(...l.marks)});const a=s.find(l=>l.type.name===n.name);return a?{...a.attrs}:{}}function fee(t,e){const n=new Rx(t);return e.forEach(r=>{r.steps.forEach(o=>{n.step(o)})}),n}function pee(t){for(let e=0;e<t.edgeCount;e+=1){const{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function hee(t,e,n){const r=[];return t.nodesBetween(e.from,e.to,(o,i)=>{n(o)&&r.push({node:o,pos:i})}),r}function Ux(t,e){for(let n=t.depth;n>0;n-=1){const r=t.node(n);if(e(r))return{pos:n>0?t.before(n):0,start:t.start(n),depth:n,node:r}}}function Kx(t){return e=>Ux(e.$from,t)}function dP(t,e){const n={from:0,to:t.content.size};return rP(t,n,e)}function mee(t,e){const n=xn(e,t.schema),{from:r,to:o}=t.selection,i=[];t.doc.nodesBetween(r,o,a=>{i.push(a)});const s=i.reverse().find(a=>a.type.name===n.name);return s?{...s.attrs}:{}}function Yx(t,e){const n=pu(typeof e=="string"?e:e.name,t.schema);return n==="node"?mee(t,e):n==="mark"?uP(t,e):{}}function gee(t,e=JSON.stringify){const n={};return t.filter(r=>{const o=e(r);return Object.prototype.hasOwnProperty.call(n,o)?!1:n[o]=!0})}function yee(t){const e=gee(t);return e.length===1?e:e.filter((n,r)=>!e.filter((i,s)=>s!==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 bee(t){const{mapping:e,steps:n}=t,r=[];return e.maps.forEach((o,i)=>{const s=[];if(o.ranges.length)o.forEach((a,l)=>{s.push({from:a,to:l})});else{const{from:a,to:l}=n[i];if(a===void 0||l===void 0)return;s.push({from:a,to:l})}s.forEach(({from:a,to:l})=>{const u=e.slice(i).map(a,-1),f=e.slice(i).map(l),h=e.invert().map(u,-1),m=e.invert().map(f);r.push({oldRange:{from:h,to:m},newRange:{from:u,to:f}})})}),yee(r)}function Gx(t,e,n){const r=[];return t===e?n.resolve(t).marks().forEach(o=>{const i=n.resolve(t),s=fu(i,o.type);s&&r.push({mark:o,...s})}):n.nodesBetween(t,e,(o,i)=>{!o||(o==null?void 0:o.nodeSize)===void 0||r.push(...o.marks.map(s=>({from:i,to:i+o.nodeSize,mark:s})))}),r}function ef(t,e,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{const o=t.find(i=>i.type===e&&i.name===r);return o?o.attribute.keepOnSplit:!1}))}function o0(t,e,n={}){const{empty:r,ranges:o}=t.selection,i=e?fo(e,t.schema):null;if(r)return!!(t.storedMarks||t.selection.$from.marks()).filter(h=>i?i.name===h.type.name:!0).find(h=>Pf(h.attrs,n,{strict:!1}));let s=0;const a=[];if(o.forEach(({$from:h,$to:m})=>{const g=h.pos,b=m.pos;t.doc.nodesBetween(g,b,(y,S)=>{if(!y.isText&&!y.marks.length)return;const C=Math.max(g,S),E=Math.min(b,S+y.nodeSize),T=E-C;s+=T,a.push(...y.marks.map(w=>({mark:w,from:C,to:E})))})}),s===0)return!1;const l=a.filter(h=>i?i.name===h.mark.type.name:!0).filter(h=>Pf(h.mark.attrs,n,{strict:!1})).reduce((h,m)=>h+m.to-m.from,0),u=a.filter(h=>i?h.mark.type!==i&&h.mark.type.excludes(i):!0).reduce((h,m)=>h+m.to-m.from,0);return(l>0?l+u:l)>=s}function vee(t,e,n={}){if(!e)return Vc(t,null,n)||o0(t,null,n);const r=pu(e,t.schema);return r==="node"?Vc(t,e,n):r==="mark"?o0(t,e,n):!1}function yk(t,e){const{nodeExtensions:n}=Xp(e),r=n.find(s=>s.name===t);if(!r)return!1;const o={name:r.name,options:r.options,storage:r.storage},i=lt(Be(r,"group",o));return typeof i!="string"?!1:i.split(" ").includes("list")}function th(t,{checkChildren:e=!0,ignoreWhitespace:n=!1}={}){var r;if(n){if(t.type.name==="hardBreak")return!0;if(t.isText)return/^\s*$/m.test((r=t.text)!==null&&r!==void 0?r:"")}if(t.isText)return!t.text;if(t.isAtom||t.isLeaf)return!1;if(t.content.childCount===0)return!0;if(e){let o=!0;return t.content.forEach(i=>{o!==!1&&(th(i,{ignoreWhitespace:n,checkChildren:e})||(o=!1))}),o}return!1}function fP(t){return t instanceof qe}function pP(t,e,n){const o=t.state.doc.content.size,i=ri(e,0,o),s=ri(n,0,o),a=t.coordsAtPos(i),l=t.coordsAtPos(s,-1),u=Math.min(a.top,l.top),f=Math.max(a.bottom,l.bottom),h=Math.min(a.left,l.left),m=Math.max(a.right,l.right),g=m-h,b=f-u,C={top:u,bottom:f,left:h,right:m,width:g,height:b,x:h,y:u};return{...C,toJSON:()=>C}}function xee(t,e,n){var r;const{selection:o}=e;let i=null;if(iP(o)&&(i=o.$cursor),i){const a=(r=t.storedMarks)!==null&&r!==void 0?r:i.marks();return!!n.isInSet(a)||!a.some(l=>l.type.excludes(n))}const{ranges:s}=o;return s.some(({$from:a,$to:l})=>{let u=a.depth===0?t.doc.inlineContent&&t.doc.type.allowsMarkType(n):!1;return t.doc.nodesBetween(a.pos,l.pos,(f,h,m)=>{if(u)return!1;if(f.isInline){const g=!m||m.type.allowsMarkType(n),b=!!n.isInSet(f.marks)||!f.marks.some(y=>y.type.excludes(n));u=g&&b}return!u}),u})}const See=(t,e={})=>({tr:n,state:r,dispatch:o})=>{const{selection:i}=n,{empty:s,ranges:a}=i,l=fo(t,r.schema);if(o)if(s){const u=uP(r,l);n.addStoredMark(l.create({...u,...e}))}else a.forEach(u=>{const f=u.$from.pos,h=u.$to.pos;r.doc.nodesBetween(f,h,(m,g)=>{const b=Math.max(g,f),y=Math.min(g+m.nodeSize,h);m.marks.find(C=>C.type===l)?m.marks.forEach(C=>{l===C.type&&n.addMark(b,y,l.create({...C.attrs,...e}))}):n.addMark(b,y,l.create(e))})});return xee(r,n,l)},Cee=(t,e)=>({tr:n})=>(n.setMeta(t,e),!0),wee=(t,e={})=>({state:n,dispatch:r,chain:o})=>{const i=xn(t,n.schema);let s;return n.selection.$anchor.sameParent(n.selection.$head)&&(s=n.selection.$anchor.parent.attrs),i.isTextblock?o().command(({commands:a})=>dk(i,{...s,...e})(n)?!0:a.clearNodes()).command(({state:a})=>dk(i,{...s,...e})(a,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},Tee=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,o=ri(t,0,r.content.size),i=qe.create(r,o);e.setSelection(i)}return!0},Eee=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,{from:o,to:i}=typeof t=="number"?{from:t,to:t}:t,s=Ge.atStart(r).from,a=Ge.atEnd(r).to,l=ri(o,s,a),u=ri(i,s,a),f=Ge.create(r,l,u);e.setSelection(f)}return!0},kee=t=>({state:e,dispatch:n})=>{const r=xn(t,e.schema);return sQ(r)(e,n)};function bk(t,e){const n=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks();if(n){const r=n.filter(o=>e==null?void 0:e.includes(o.type.name));t.tr.ensureMarks(r)}}const Mee=({keepMarks:t=!0}={})=>({tr:e,state:n,dispatch:r,editor:o})=>{const{selection:i,doc:s}=e,{$from:a,$to:l}=i,u=o.extensionManager.attributes,f=ef(u,a.node().type.name,a.node().attrs);if(i instanceof qe&&i.node.isBlock)return!a.parentOffset||!Wa(s,a.pos)?!1:(r&&(t&&bk(n,o.extensionManager.splittableMarks),e.split(a.pos).scrollIntoView()),!0);if(!a.parent.isBlock)return!1;const h=l.parentOffset===l.parent.content.size,m=a.depth===0?void 0:pee(a.node(-1).contentMatchAt(a.indexAfter(-1)));let g=h&&m?[{type:m,attrs:f}]:void 0,b=Wa(e.doc,e.mapping.map(a.pos),1,g);if(!g&&!b&&Wa(e.doc,e.mapping.map(a.pos),1,m?[{type:m}]:void 0)&&(b=!0,g=m?[{type:m,attrs:f}]:void 0),r){if(b&&(i instanceof Ge&&e.deleteSelection(),e.split(e.mapping.map(a.pos),1,g),m&&!h&&!a.parentOffset&&a.parent.type!==m)){const y=e.mapping.map(a.before()),S=e.doc.resolve(y);a.node(-1).canReplaceWith(S.index(),S.index()+1,m)&&e.setNodeMarkup(e.mapping.map(a.before()),m)}t&&bk(n,o.extensionManager.splittableMarks),e.scrollIntoView()}return b},Oee=(t,e={})=>({tr:n,state:r,dispatch:o,editor:i})=>{var s;const a=xn(t,r.schema),{$from:l,$to:u}=r.selection,f=r.selection.node;if(f&&f.isBlock||l.depth<2||!l.sameParent(u))return!1;const h=l.node(-1);if(h.type!==a)return!1;const m=i.extensionManager.attributes;if(l.parent.content.size===0&&l.node(-1).childCount===l.indexAfter(-1)){if(l.depth===2||l.node(-3).type!==a||l.index(-2)!==l.node(-2).childCount-1)return!1;if(o){let C=Te.empty;const E=l.index(-1)?1:l.index(-2)?2:3;for(let I=l.depth-E;I>=l.depth-3;I-=1)C=Te.from(l.node(I).copy(C));const T=l.indexAfter(-1)<l.node(-2).childCount?1:l.indexAfter(-2)<l.node(-3).childCount?2:3,w={...ef(m,l.node().type.name,l.node().attrs),...e},M=((s=a.contentMatch.defaultType)===null||s===void 0?void 0:s.createAndFill(w))||void 0;C=C.append(Te.from(a.createAndFill(null,M)||void 0));const R=l.before(l.depth-(E-1));n.replace(R,l.after(-T),new Ae(C,4-E,0));let _=-1;n.doc.nodesBetween(R,n.doc.content.size,(I,N)=>{if(_>-1)return!1;I.isTextblock&&I.content.size===0&&(_=N+1)}),_>-1&&n.setSelection(Ge.near(n.doc.resolve(_))),n.scrollIntoView()}return!0}const g=u.pos===l.end()?h.contentMatchAt(0).defaultType:null,b={...ef(m,h.type.name,h.attrs),...e},y={...ef(m,l.node().type.name,l.node().attrs),...e};n.delete(l.pos,u.pos);const S=g?[{type:a,attrs:b},{type:g,attrs:y}]:[{type:a,attrs:b}];if(!Wa(n.doc,l.pos,2))return!1;if(o){const{selection:C,storedMarks:E}=r,{splittableMarks:T}=i.extensionManager,w=E||C.$to.parentOffset&&C.$from.marks();if(n.split(l.pos,2,S).scrollIntoView(),!w||!o)return!0;const M=w.filter(R=>T.includes(R.type.name));n.ensureMarks(M)}return!0},xg=(t,e)=>{const n=Kx(s=>s.type===e)(t.selection);if(!n)return!0;const r=t.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;const o=t.doc.nodeAt(r);return n.node.type===(o==null?void 0:o.type)&&ts(t.doc,n.pos)&&t.join(n.pos),!0},Sg=(t,e)=>{const n=Kx(s=>s.type===e)(t.selection);if(!n)return!0;const r=t.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;const o=t.doc.nodeAt(r);return n.node.type===(o==null?void 0:o.type)&&ts(t.doc,r)&&t.join(r),!0},Ree=(t,e,n,r={})=>({editor:o,tr:i,state:s,dispatch:a,chain:l,commands:u,can:f})=>{const{extensions:h,splittableMarks:m}=o.extensionManager,g=xn(t,s.schema),b=xn(e,s.schema),{selection:y,storedMarks:S}=s,{$from:C,$to:E}=y,T=C.blockRange(E),w=S||y.$to.parentOffset&&y.$from.marks();if(!T)return!1;const M=Kx(R=>yk(R.type.name,h))(y);if(T.depth>=1&&M&&T.depth-M.depth<=1){if(M.node.type===g)return u.liftListItem(b);if(yk(M.node.type.name,h)&&g.validContent(M.node.content)&&a)return l().command(()=>(i.setNodeMarkup(M.pos,g),!0)).command(()=>xg(i,g)).command(()=>Sg(i,g)).run()}return!n||!w||!a?l().command(()=>f().wrapInList(g,r)?!0:u.clearNodes()).wrapInList(g,r).command(()=>xg(i,g)).command(()=>Sg(i,g)).run():l().command(()=>{const R=f().wrapInList(g,r),_=w.filter(I=>m.includes(I.type.name));return i.ensureMarks(_),R?!0:u.clearNodes()}).wrapInList(g,r).command(()=>xg(i,g)).command(()=>Sg(i,g)).run()},Aee=(t,e={},n={})=>({state:r,commands:o})=>{const{extendEmptyMarkRange:i=!1}=n,s=fo(t,r.schema);return o0(r,s,e)?o.unsetMark(s,{extendEmptyMarkRange:i}):o.setMark(s,e)},Iee=(t,e,n={})=>({state:r,commands:o})=>{const i=xn(t,r.schema),s=xn(e,r.schema),a=Vc(r,i,n);let l;return r.selection.$anchor.sameParent(r.selection.$head)&&(l=r.selection.$anchor.parent.attrs),a?o.setNode(s,l):o.setNode(i,{...l,...n})},Dee=(t,e={})=>({state:n,commands:r})=>{const o=xn(t,n.schema);return Vc(n,o,e)?r.lift(o):r.wrapIn(o,e)},Pee=()=>({state:t,dispatch:e})=>{const n=t.plugins;for(let r=0;r<n.length;r+=1){const o=n[r];let i;if(o.spec.isInputRules&&(i=o.getState(t))){if(e){const s=t.tr,a=i.transform;for(let l=a.steps.length-1;l>=0;l-=1)s.step(a.steps[l].invert(a.docs[l]));if(i.text){const l=s.doc.resolve(i.from).marks();s.replaceWith(i.from,i.to,t.schema.text(i.text,l))}else s.delete(i.from,i.to)}return!0}}return!1},_ee=()=>({tr:t,dispatch:e})=>{const{selection:n}=t,{empty:r,ranges:o}=n;return r||e&&o.forEach(i=>{t.removeMark(i.$from.pos,i.$to.pos)}),!0},Nee=(t,e={})=>({tr:n,state:r,dispatch:o})=>{var i;const{extendEmptyMarkRange:s=!1}=e,{selection:a}=n,l=fo(t,r.schema),{$from:u,empty:f,ranges:h}=a;if(!o)return!0;if(f&&s){let{from:m,to:g}=a;const b=(i=u.marks().find(S=>S.type===l))===null||i===void 0?void 0:i.attrs,y=fu(u,l,b);y&&(m=y.from,g=y.to),n.removeMark(m,g,l)}else h.forEach(m=>{n.removeMark(m.$from.pos,m.$to.pos,l)});return n.removeStoredMark(l),!0},Lee=(t,e={})=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null;const a=pu(typeof t=="string"?t:t.name,r.schema);return a?(a==="node"&&(i=xn(t,r.schema)),a==="mark"&&(s=fo(t,r.schema)),o&&n.selection.ranges.forEach(l=>{const u=l.$from.pos,f=l.$to.pos;let h,m,g,b;n.selection.empty?r.doc.nodesBetween(u,f,(y,S)=>{i&&i===y.type&&(g=Math.max(S,u),b=Math.min(S+y.nodeSize,f),h=S,m=y)}):r.doc.nodesBetween(u,f,(y,S)=>{S<u&&i&&i===y.type&&(g=Math.max(S,u),b=Math.min(S+y.nodeSize,f),h=S,m=y),S>=u&&S<=f&&(i&&i===y.type&&n.setNodeMarkup(S,void 0,{...y.attrs,...e}),s&&y.marks.length&&y.marks.forEach(C=>{if(s===C.type){const E=Math.max(S,u),T=Math.min(S+y.nodeSize,f);n.addMark(E,T,s.create({...C.attrs,...e}))}}))}),m&&(h!==void 0&&n.setNodeMarkup(h,void 0,{...m.attrs,...e}),s&&m.marks.length&&m.marks.forEach(y=>{s===y.type&&n.addMark(g,b,s.create({...y.attrs,...e}))}))}),!0):!1},jee=(t,e={})=>({state:n,dispatch:r})=>{const o=xn(t,n.schema);return QX(o,e)(n,r)},$ee=(t,e={})=>({state:n,dispatch:r})=>{const o=xn(t,n.schema);return eQ(o,e)(n,r)};var Fee=Object.freeze({__proto__:null,blur:wQ,clearContent:TQ,clearNodes:EQ,command:kQ,createParagraphNear:MQ,cut:OQ,deleteCurrentNode:RQ,deleteNode:AQ,deleteRange:IQ,deleteSelection:DQ,enter:PQ,exitCode:_Q,extendMarkRange:NQ,first:LQ,focus:jQ,forEach:$Q,insertContent:FQ,insertContentAt:zQ,joinBackward:qQ,joinDown:WQ,joinForward:UQ,joinItemBackward:KQ,joinItemForward:YQ,joinTextblockBackward:GQ,joinTextblockForward:JQ,joinUp:HQ,keyboardShortcut:XQ,lift:QQ,liftEmptyBlock:eee,liftListItem:tee,newlineInCode:nee,resetAttributes:ree,scrollIntoView:oee,selectAll:iee,selectNodeBackward:see,selectNodeForward:aee,selectParentNode:lee,selectTextblockEnd:cee,selectTextblockStart:uee,setContent:dee,setMark:See,setMeta:Cee,setNode:wee,setNodeSelection:Tee,setTextSelection:Eee,sinkListItem:kee,splitBlock:Mee,splitListItem:Oee,toggleList:Ree,toggleMark:Aee,toggleNode:Iee,toggleWrap:Dee,undoInputRule:Pee,unsetAllMarks:_ee,unsetMark:Nee,updateAttributes:Lee,wrapIn:jee,wrapInList:$ee});const Bee=cn.create({name:"commands",addCommands(){return{...Fee}}}),Vee=cn.create({name:"drop",addProseMirrorPlugins(){return[new en({key:new gn("tiptapDrop"),props:{handleDrop:(t,e,n,r)=>{this.editor.emit("drop",{editor:this.editor,event:e,slice:n,moved:r})}}})]}}),zee=cn.create({name:"editable",addProseMirrorPlugins(){return[new en({key:new gn("editable"),props:{editable:()=>this.editor.options.editable}})]}}),Hee=new gn("focusEvents"),Wee=cn.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:t}=this;return[new en({key:Hee,props:{handleDOMEvents:{focus:(e,n)=>{t.isFocused=!0;const r=t.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1},blur:(e,n)=>{t.isFocused=!1;const r=t.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1}}}})]}}),qee=cn.create({name:"keymap",addKeyboardShortcuts(){const t=()=>this.editor.commands.first(({commands:s})=>[()=>s.undoInputRule(),()=>s.command(({tr:a})=>{const{selection:l,doc:u}=a,{empty:f,$anchor:h}=l,{pos:m,parent:g}=h,b=h.parent.isTextblock&&m>0?a.doc.resolve(m-1):h,y=b.parent.type.spec.isolating,S=h.pos-h.parentOffset,C=y&&b.parent.childCount===1?S===h.pos:Qe.atStart(u).from===m;return!f||!g.type.isTextblock||g.textContent.length||!C||C&&h.parent.type.name==="paragraph"?!1:s.clearNodes()}),()=>s.deleteSelection(),()=>s.joinBackward(),()=>s.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:s})=>[()=>s.deleteSelection(),()=>s.deleteCurrentNode(),()=>s.joinForward(),()=>s.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:s})=>[()=>s.newlineInCode(),()=>s.createParagraphNear(),()=>s.liftEmptyBlock(),()=>s.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:t,"Mod-Backspace":t,"Shift-Backspace":t,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},o={...r},i={...r,"Ctrl-h":t,"Alt-Backspace":t,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return eh()||cP()?i:o},addProseMirrorPlugins(){return[new en({key:new gn("clearDocument"),appendTransaction:(t,e,n)=>{if(t.some(y=>y.getMeta("composition")))return;const r=t.some(y=>y.docChanged)&&!e.doc.eq(n.doc),o=t.some(y=>y.getMeta("preventClearDocument"));if(!r||o)return;const{empty:i,from:s,to:a}=e.selection,l=Qe.atStart(e.doc).from,u=Qe.atEnd(e.doc).to;if(i||!(s===l&&a===u)||!th(n.doc))return;const m=n.tr,g=Jp({state:n,transaction:m}),{commands:b}=new Zp({editor:this.editor,state:g});if(b.clearNodes(),!!m.steps.length)return m}})]}}),Uee=cn.create({name:"paste",addProseMirrorPlugins(){return[new en({key:new gn("tiptapPaste"),props:{handlePaste:(t,e,n)=>{this.editor.emit("paste",{editor:this.editor,event:e,slice:n})}}})]}}),Kee=cn.create({name:"tabindex",addProseMirrorPlugins(){return[new en({key:new gn("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}});class ws{get name(){return this.node.type.name}constructor(e,n,r=!1,o=null){this.currentNode=null,this.actualDepth=null,this.isBlock=r,this.resolvedPos=e,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 e;return(e=this.actualDepth)!==null&&e!==void 0?e:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(e){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},e)}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 e=this.resolvedPos.start(this.resolvedPos.depth-1),n=this.resolvedPos.doc.resolve(e);return new ws(n,this.editor)}get before(){let e=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.from-3)),new ws(e,this.editor)}get after(){let e=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.to+3)),new ws(e,this.editor)}get children(){const e=[];return this.node.content.forEach((n,r)=>{const o=n.isBlock&&!n.isTextblock,i=n.isAtom&&!n.isText,s=this.pos+r+(i?0:1),a=this.resolvedPos.doc.resolve(s);if(!o&&a.depth<=this.depth)return;const l=new ws(a,this.editor,o,o?n:null);o&&(l.actualDepth=this.depth+1),e.push(new ws(a,this.editor,o,o?n:null))}),e}get firstChild(){return this.children[0]||null}get lastChild(){const e=this.children;return e[e.length-1]||null}closest(e,n={}){let r=null,o=this.parent;for(;o&&!r;){if(o.node.type.name===e)if(Object.keys(n).length>0){const i=o.node.attrs,s=Object.keys(n);for(let a=0;a<s.length;a+=1){const l=s[a];if(i[l]!==n[l])break}}else r=o;o=o.parent}return r}querySelector(e,n={}){return this.querySelectorAll(e,n,!0)[0]||null}querySelectorAll(e,n={},r=!1){let o=[];if(!this.children||this.children.length===0)return o;const i=Object.keys(n);return this.children.forEach(s=>{r&&o.length>0||(s.node.type.name===e&&i.every(l=>n[l]===s.node.attrs[l])&&o.push(s),!(r&&o.length>0)&&(o=o.concat(s.querySelectorAll(e,n,r))))}),o}setAttribute(e){const{tr:n}=this.editor.state;n.setNodeMarkup(this.from,void 0,{...this.node.attrs,...e}),this.editor.view.dispatch(n)}}const Yee=`.ProseMirror {
246
+ position: relative;
247
+ }
248
+
249
+ .ProseMirror {
250
+ word-wrap: break-word;
251
+ white-space: pre-wrap;
252
+ white-space: break-spaces;
253
+ -webkit-font-variant-ligatures: none;
254
+ font-variant-ligatures: none;
255
+ font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
256
+ }
257
+
258
+ .ProseMirror [contenteditable="false"] {
259
+ white-space: normal;
260
+ }
261
+
262
+ .ProseMirror [contenteditable="false"] [contenteditable="true"] {
263
+ white-space: pre-wrap;
264
+ }
265
+
266
+ .ProseMirror pre {
267
+ white-space: pre-wrap;
268
+ }
269
+
270
+ img.ProseMirror-separator {
271
+ display: inline !important;
272
+ border: none !important;
273
+ margin: 0 !important;
274
+ width: 0 !important;
275
+ height: 0 !important;
276
+ }
277
+
278
+ .ProseMirror-gapcursor {
279
+ display: none;
280
+ pointer-events: none;
281
+ position: absolute;
282
+ margin: 0;
283
+ }
284
+
285
+ .ProseMirror-gapcursor:after {
286
+ content: "";
287
+ display: block;
288
+ position: absolute;
289
+ top: -2px;
290
+ width: 20px;
291
+ border-top: 1px solid black;
292
+ animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
293
+ }
294
+
295
+ @keyframes ProseMirror-cursor-blink {
296
+ to {
297
+ visibility: hidden;
298
+ }
299
+ }
300
+
301
+ .ProseMirror-hideselection *::selection {
302
+ background: transparent;
303
+ }
304
+
305
+ .ProseMirror-hideselection *::-moz-selection {
306
+ background: transparent;
307
+ }
308
+
309
+ .ProseMirror-hideselection * {
310
+ caret-color: transparent;
311
+ }
312
+
313
+ .ProseMirror-focused .ProseMirror-gapcursor {
314
+ display: block;
315
+ }
316
+
317
+ .tippy-box[data-animation=fade][data-state=hidden] {
318
+ opacity: 0
319
+ }`;function Gee(t,e,n){const r=document.querySelector("style[data-tiptap-style]");if(r!==null)return r;const o=document.createElement("style");return e&&o.setAttribute("nonce",e),o.setAttribute("data-tiptap-style",""),o.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(o),o}class Jee extends aQ{constructor(e={}){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(e),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=Gee(Yee,this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},!(!this.view||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,n=!0){this.setOptions({editable:e}),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(e,n){const r=nP(n)?n(e,[...this.state.plugins]):[...this.state.plugins,e],o=this.state.reconfigure({plugins:r});return this.view.updateState(o),o}unregisterPlugin(e){if(this.isDestroyed)return;const n=this.state.plugins;let r=n;if([].concat(e).forEach(i=>{const s=typeof i=="string"?`${i}$`:i.key;r=n.filter(a=>!a.key.startsWith(s))}),n.length===r.length)return;const o=this.state.reconfigure({plugins:r});return this.view.updateState(o),o}createExtensionManager(){var e,n;const o=[...this.options.enableCoreExtensions?[zee,CQ.configure({blockSeparator:(n=(e=this.options.coreExtensionOptions)===null||e===void 0?void 0:e.clipboardTextSerializer)===null||n===void 0?void 0:n.blockSeparator}),Bee,Wee,qee,Kee,Vee,Uee].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 La(o,this)}createCommandManager(){this.commandManager=new Zp({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){var e;let n;try{n=r0(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(s){if(!(s instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(s.message))throw s;this.emit("contentError",{editor:this,error:s,disableCollaboration:()=>{this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(a=>a.name!=="collaboration"),this.createExtensionManager()}}),n=r0(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}const r=sP(n,this.options.autofocus);this.view=new EX(this.options.element,{...this.options.editorProps,attributes:{role:"textbox",...(e=this.options.editorProps)===null||e===void 0?void 0:e.attributes},dispatchTransaction:this.dispatchTransaction.bind(this),state:Na.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(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;const n=this.capturedTransaction;return this.capturedTransaction=null,n}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=e;return}e.steps.forEach(s=>{var a;return(a=this.capturedTransaction)===null||a===void 0?void 0:a.step(s)});return}const n=this.state.apply(e),r=!this.state.selection.eq(n.selection);this.emit("beforeTransaction",{editor:this,transaction:e,nextState:n}),this.view.updateState(n),this.emit("transaction",{editor:this,transaction:e}),r&&this.emit("selectionUpdate",{editor:this,transaction:e});const o=e.getMeta("focus"),i=e.getMeta("blur");o&&this.emit("focus",{editor:this,event:o.event,transaction:e}),i&&this.emit("blur",{editor:this,event:i.event,transaction:e}),!(!e.docChanged||e.getMeta("preventUpdate"))&&this.emit("update",{editor:this,transaction:e})}getAttributes(e){return Yx(this.state,e)}isActive(e,n){const r=typeof e=="string"?e:null,o=typeof e=="string"?n:e;return vee(this.state,r,o)}getJSON(){return this.state.doc.toJSON()}getHTML(){return Hx(this.state.doc.content,this.schema)}getText(e){const{blockSeparator:n=`
320
+
321
+ `,textSerializers:r={}}=e||{};return dP(this.state.doc,{blockSeparator:n,textSerializers:{...qx(this.schema),...r}})}get isEmpty(){return th(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 e=this.view.dom;e&&e.editor&&delete e.editor,this.view.destroy()}this.removeAllListeners()}get isDestroyed(){var e;return!(!((e=this.view)===null||e===void 0)&&e.docView)}$node(e,n){var r;return((r=this.$doc)===null||r===void 0?void 0:r.querySelector(e,n))||null}$nodes(e,n){var r;return((r=this.$doc)===null||r===void 0?void 0:r.querySelectorAll(e,n))||null}$pos(e){const n=this.state.doc.resolve(e);return new ws(n,this)}get $doc(){return this.$pos(0)}}function Ws(t){return new du({find:t.find,handler:({state:e,range:n,match:r})=>{const o=lt(t.getAttributes,void 0,r);if(o===!1||o===null)return null;const{tr:i}=e,s=r[r.length-1],a=r[0];if(s){const l=a.search(/\S/),u=n.from+a.indexOf(s),f=u+s.length;if(Gx(n.from,n.to,e.doc).filter(g=>g.mark.type.excluded.find(y=>y===t.type&&y!==g.mark.type)).filter(g=>g.to>u).length)return null;f<n.to&&i.delete(f,n.to),u>n.from&&i.delete(n.from+l,u);const m=n.from+l+s.length;i.addMark(n.from+l,m,t.type.create(o||{})),i.removeStoredMark(t.type)}}})}function hP(t){return new du({find:t.find,handler:({state:e,range:n,match:r})=>{const o=lt(t.getAttributes,void 0,r)||{},{tr:i}=e,s=n.from;let a=n.to;const l=t.type.create(o);if(r[1]){const u=r[0].lastIndexOf(r[1]);let f=s+u;f>a?f=a:a=f+r[1].length;const h=r[0][r[0].length-1];i.insertText(h,s+r[0].length-1),i.replaceWith(f,a,l)}else if(r[0]){const u=t.type.isInline?s:s-1;i.insert(u,t.type.create(o)).delete(i.mapping.map(s),i.mapping.map(a))}i.scrollIntoView()}})}function i0(t){return new du({find:t.find,handler:({state:e,range:n,match:r})=>{const o=e.doc.resolve(n.from),i=lt(t.getAttributes,void 0,r)||{};if(!o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),t.type))return null;e.tr.delete(n.from,n.to).setBlockType(n.from,n.from,t.type,i)}})}function sl(t){return new du({find:t.find,handler:({state:e,range:n,match:r,chain:o})=>{const i=lt(t.getAttributes,void 0,r)||{},s=e.tr.delete(n.from,n.to),l=s.doc.resolve(n.from).blockRange(),u=l&&Ox(l,t.type,i);if(!u)return null;if(s.wrap(l,u),t.keepMarks&&t.editor){const{selection:h,storedMarks:m}=e,{splittableMarks:g}=t.editor.extensionManager,b=m||h.$to.parentOffset&&h.$from.marks();if(b){const y=b.filter(S=>g.includes(S.type.name));s.ensureMarks(y)}}if(t.keepAttributes){const h=t.type.name==="bulletList"||t.type.name==="orderedList"?"listItem":"taskList";o().updateAttributes(h,i).run()}const f=s.doc.resolve(n.from-1).nodeBefore;f&&f.type===t.type&&ts(s.doc,n.from-1)&&(!t.joinPredicate||t.joinPredicate(r,f))&&s.join(n.from-1)}})}class Qt{constructor(e={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.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=lt(Be(this,"addOptions",{name:this.name}))),this.storage=lt(Be(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new Qt(e)}configure(e={}){const n=this.extend({...this.config,addOptions:()=>Qp(this.options,e)});return n.name=this.name,n.parent=this.parent,n}extend(e={}){const n=new Qt(e);return n.parent=this,this.child=n,n.name=e.name?e.name:n.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=lt(Be(n,"addOptions",{name:n.name})),n.storage=lt(Be(n,"addStorage",{name:n.name,options:n.options})),n}}class Zee{constructor(e,n,r){this.isDragging=!1,this.component=e,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(e){var n,r,o,i,s,a,l;const{view:u}=this.editor,f=e.target,h=f.nodeType===3?(n=f.parentElement)===null||n===void 0?void 0:n.closest("[data-drag-handle]"):f.closest("[data-drag-handle]");if(!this.dom||!((r=this.contentDOM)===null||r===void 0)&&r.contains(f)||!h)return;let m=0,g=0;if(this.dom!==h){const C=this.dom.getBoundingClientRect(),E=h.getBoundingClientRect(),T=(o=e.offsetX)!==null&&o!==void 0?o:(i=e.nativeEvent)===null||i===void 0?void 0:i.offsetX,w=(s=e.offsetY)!==null&&s!==void 0?s:(a=e.nativeEvent)===null||a===void 0?void 0:a.offsetY;m=E.x-C.x+T,g=E.y-C.y+w}(l=e.dataTransfer)===null||l===void 0||l.setDragImage(this.dom,m,g);const b=this.getPos();if(typeof b!="number")return;const y=qe.create(u.state.doc,b),S=u.state.tr.setSelection(y);u.dispatch(S)}stopEvent(e){var n;if(!this.dom)return!1;if(typeof this.options.stopEvent=="function")return this.options.stopEvent({event:e});const r=e.target;if(!(this.dom.contains(r)&&!(!((n=this.contentDOM)===null||n===void 0)&&n.contains(r))))return!1;const i=e.type.startsWith("drag"),s=e.type==="drop";if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(r.tagName)||r.isContentEditable)&&!s&&!i)return!0;const{isEditable:l}=this.editor,{isDragging:u}=this,f=!!this.node.type.spec.draggable,h=qe.isSelectable(this.node),m=e.type==="copy",g=e.type==="paste",b=e.type==="cut",y=e.type==="mousedown";if(!f&&h&&i&&e.target===this.dom&&e.preventDefault(),f&&i&&!u&&e.target===this.dom)return e.preventDefault(),!1;if(f&&l&&!u&&y){const S=r.closest("[data-drag-handle]");S&&(this.dom===S||this.dom.contains(S))&&(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!(u||s||m||g||b||y&&h)}ignoreMutation(e){return!this.dom||!this.contentDOM?!0:typeof this.options.ignoreMutation=="function"?this.options.ignoreMutation({mutation:e}):this.node.isLeaf||this.node.isAtom?!0:e.type==="selection"||this.dom.contains(e.target)&&e.type==="childList"&&(eh()||aP())&&this.editor.isFocused&&[...Array.from(e.addedNodes),...Array.from(e.removedNodes)].every(r=>r.isContentEditable)?!1:this.contentDOM===e.target&&e.type==="attributes"?!0:!this.contentDOM.contains(e.target)}updateAttributes(e){this.editor.commands.command(({tr:n})=>{const r=this.getPos();return typeof r!="number"?!1:(n.setNodeMarkup(r,void 0,{...this.node.attrs,...e}),!0)})}deleteNode(){const e=this.getPos();if(typeof e!="number")return;const n=e+this.node.nodeSize;this.editor.commands.deleteRange({from:e,to:n})}}function Ki(t){return new gQ({find:t.find,handler:({state:e,range:n,match:r,pasteEvent:o})=>{const i=lt(t.getAttributes,void 0,r,o);if(i===!1||i===null)return null;const{tr:s}=e,a=r[r.length-1],l=r[0];let u=n.to;if(a){const f=l.search(/\S/),h=n.from+l.indexOf(a),m=h+a.length;if(Gx(n.from,n.to,e.doc).filter(b=>b.mark.type.excluded.find(S=>S===t.type&&S!==b.mark.type)).filter(b=>b.to>h).length)return null;m<n.to&&s.delete(m,n.to),h>n.from&&s.delete(n.from+f,h),u=n.from+f+a.length,s.addMark(n.from+f,u,t.type.create(i||{})),s.removeStoredMark(t.type)}}})}function Xee(t){return t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}const mP=Object.fromEntries?Object.fromEntries:t=>{if(!t||!t[Symbol.iterator])throw new Error("Object.fromEntries() requires a single iterable argument");const e={};return Object.keys(t).forEach(n=>{const[r,o]=t[n];e[r]=o}),e};function Yi(t){return Object.keys(t)}function Os(t,e){if(!t)throw new Error(e)}function Jx(t,e){return e}const Zx=t=>{const e=t.length;let n=0,r="";for(;n<e;n++){const o=t[n];if(o==null)continue;let i;switch(typeof o){case"boolean":break;case"object":{if(Array.isArray(o))i=Zx(o);else{Os(!Jx(o,!1)),process.env.NODE_ENV!=="production"&&o.styles!==void 0&&o.name!==void 0&&console.error("You have passed styles created with `css` from `@emotion/react` package to the `cx`.\n`cx` is meant to compose class names (strings) so you should convert those styles to a class name by passing them to the `css` received from <ClassNames/> component."),i="";for(const s in o)o[s]&&s&&(i&&(i+=" "),i+=s)}break}default:i=o}i&&(r&&(r+=" "),r+=i)}return r};function Qee(t,e,n){var r="";return n.split(" ").forEach(function(o){t[o]!==void 0?e.push(t[o]+";"):o&&(r+=o+" ")}),r}var ete=function(e,n,r){var o=e.key+"-"+n.name;e.registered[o]===void 0&&(e.registered[o]=n.styles)},tte=function(e,n,r){ete(e,n);var o=e.key+"-"+n.name;if(e.inserted[n.name]===void 0){var i=n;do e.insert(n===i?"."+o:"",i,e.sheet,!0),i=i.next;while(i!==void 0)}};function nte(t,e){var n;const r=J.useRef();return(!r.current||e.length!==((n=r.current.prevDeps)===null||n===void 0?void 0:n.length)||r.current.prevDeps.map((o,i)=>o===e[i]).indexOf(!1)>=0)&&(r.current={v:t(),prevDeps:[...e]}),r.current.v}function rte(t){return t instanceof Object&&!("styles"in t)&&!("length"in t)&&!("__emotion_styles"in t)}const{createCssAndCx:ote}=(()=>{function t(n,r,o){const i=[],s=Qee(n,i,o);return i.length<2?o:s+r(i)}function e(n){const{cache:r}=n,o=(...s)=>{const a=PA(s,r.registered);tte(r,a);const l=`${r.key}-${a.name}`;e:{const u=s[0];if(!rte(u))break e;vk.saveClassNameCSSObjectMapping(r,l,u)}return l};return{css:o,cx:(...s)=>{const a=Zx(s),l=vk.fixClassName(r,a,o);return t(r.registered,o,l)}}}return{createCssAndCx:e}})();function gP(t){const{useCache:e}=t;function n(){const r=e(),{css:o,cx:i}=nte(()=>ote({cache:r}),[r]);return{css:o,cx:i}}return{useCssAndCx:n}}const vk=(()=>{const t=new WeakMap;return{saveClassNameCSSObjectMapping:(e,n,r)=>{let o=t.get(e);o===void 0&&(o=new Map,t.set(e,o)),o.set(n,r)},fixClassName:(()=>{function e(n){let r=!1;return n.map(([o,i])=>{if(i===void 0)return o;let s;if(r)s={"&&":i};else{s=o;for(const a in i)if(a.startsWith("@media")){r=!0;break}}return s})}return(n,r,o)=>{const i=t.get(n);return Zx(e(r.split(" ").map(s=>[s,i==null?void 0:i.get(s)])).map(s=>typeof s=="string"?s:o(s)))}})()}})();function Gi(t){if(!(t instanceof Object)||typeof t=="function")return t;const e=[];for(const n in t){const r=t[n],o=typeof r;if(!(o==="string"||o==="number"&&!isNaN(r)||o==="boolean"||r===void 0||r===null))return t;e.push(`${n}:${o}_${r}`)}return"xSqLiJdLMd9s"+e.join("|")}function Xx(t,e,n){if(!(e instanceof Object))return t;const r={};return Yi(t).forEach(o=>r[o]=n(t[o],e[o])),Yi(e).forEach(o=>{if(o in t)return;const i=e[o];typeof i=="string"&&(r[o]=i)}),r}const yP=({classes:t,theme:e,muiStyleOverridesParams:n,css:r,cx:o,name:i})=>{var s,a;e:{if(i==="makeStyle no name"){i=void 0;break e}if(n!==void 0&&i===void 0)throw new Error("To use muiStyleOverridesParams, you must specify a name using .withName('MyComponent')")}let l;try{l=i===void 0?void 0:((a=(s=e.components)===null||s===void 0?void 0:s[i])===null||a===void 0?void 0:a.styleOverrides)||void 0}catch{}const u=J.useMemo(()=>{if(l===void 0)return;const f={};for(const h in l){const m=l[h];m instanceof Object&&(f[h]=r(typeof m=="function"?m({theme:e,ownerState:n==null?void 0:n.ownerState,...n==null?void 0:n.props}):m))}return f},[l,Gi(n==null?void 0:n.props),Gi(n==null?void 0:n.ownerState),r]);return t=J.useMemo(()=>Xx(t,u,o),[t,u,o]),{classes:t}};let ite=0;function bP(t){const{useTheme:e,cache:n}=t,{useCache:r}=vP({cacheProvidedAtInception:n}),{useCssAndCx:o}=gP({useCache:r});function i(a){const{name:l,uniqId:u=`${ite++}`}=a??{},f=typeof l!="object"?l:Object.keys(l)[0];return function(h){const m=typeof h=="function"?h:()=>h;return function(b,y){const S=e();let{css:C,cx:E}=o();const T=r();let w=J.useMemo(()=>{const M={},R=typeof Proxy<"u"&&new Proxy({},{get:(N,O)=>(typeof O=="symbol"&&Os(!1),M[O]=`${T.key}-${u}${f!==void 0?`-${f}`:""}-${O}-ref`)}),_=m(S,b,R||{}),I=mP(Yi(_).map(N=>{const O=_[N];return O.label||(O.label=`${f!==void 0?`${f}-`:""}${N}`),[N,`${C(O)}${Jx(N,N in M)?` ${M[N]}`:""}`]}));return Yi(M).forEach(N=>{N in I||(I[N]=M[N])}),I},[T,C,E,S,Gi(b)]);{const M=y==null?void 0:y.props.classes;w=J.useMemo(()=>Xx(w,M,E),[w,Gi(M),E])}{const M=yP({classes:w,css:C,cx:E,name:f??"makeStyle no name",idOfUseStyles:u,muiStyleOverridesParams:y,theme:S});M.classes!==void 0&&(w=M.classes),M.css!==void 0&&(C=M.css),M.cx!==void 0&&(E=M.cx)}return{classes:w,theme:S,css:C,cx:E}}}}function s(){const a=e(),{css:l,cx:u}=o();return{theme:a,css:l,cx:u}}return{makeStyles:i,useStyles:s}}const ste=J.createContext(void 0),{createUseCache:vP}=(()=>{function t(){return J.useContext(ste)}function e(n){const{cacheProvidedAtInception:r}=n;function o(){var i;const s=so.__unsafe_useEmotionCache(),a=t(),l=(i=r??a)!==null&&i!==void 0?i:s;if(l===null)throw new Error(["In order to get SSR working with tss-react you need to explicitly provide an Emotion cache.","MUI users be aware: This is not an error strictly related to tss-react, with or without tss-react,","MUI needs an Emotion cache to be provided for SSR to work.","Here is the MUI documentation related to SSR setup: https://mui.com/material-ui/guides/server-rendering/","TSS provides helper that makes the process of setting up SSR easier: https://docs.tss-react.dev/ssr"].join(`
322
+ `));return l}return{useCache:o}}return{createUseCache:e}})();function xk(t){return t.charAt(0).toUpperCase()+t.slice(1)}function ate(t){const{useTheme:e,cache:n}=t,{makeStyles:r}=bP({useTheme:e,cache:n});function o(i,s,a){const l=typeof i=="string"?(()=>{const g=i,b=function({children:y,...S}){return J.createElement(g,S,y)};return Object.defineProperty(b,"name",{value:xk(g)}),b})():i,u=(()=>{{const{name:b}=a??{};if(b!==void 0)return typeof b!="object"?b:Object.keys(b)[0]}let g;e:{const b=l.displayName;if(typeof b!="string"||b==="")break e;g=b}e:{if(g!==void 0)break e;const b=l.name;if(typeof b!="string"||b==="")break e;g=b}if(g!==void 0)return g=g.replace(/\$/g,"usd"),g=g.replace(/\(/g,"_").replace(/\)/g,"_"),g=g.replace(/[^a-zA-Z0-9-_]/g,"_"),g})(),f=r({...a,name:u})(typeof s=="function"?(g,b,y)=>Ck(s(g,b,y)):Ck(s));function h(g){for(const b in g)if(b!=="root")return!0;return!1}const m=J.forwardRef(function(g,b){const{className:y,classes:S,...C}=g,{classes:E,cx:T}=f(g,{props:g}),w=T(E.root,y);return xP.set(E,{...E,root:w}),J.createElement(l,{ref:b,className:h(E)?y:w,...typeof i=="string"?{}:{classes:E},...C})});return u!==void 0&&(m.displayName=`${xk(u)}WithStyles`,Object.defineProperty(m,"name",{value:m.displayName})),m}return o.getClasses=lte,{withStyles:o}}const xP=new WeakMap,Sk="getClasses should only be used in conjunction with withStyles";function lte(t){const e=t.classes;if(e===void 0)throw new Error(Sk);const n=xP.get(e);if(n===void 0)throw new Error(Sk);return n}function Ck(t){const e={},n={};return Object.keys(t).forEach(r=>(r.startsWith("@media")?n:e)[r]=t[r]),Object.keys(n).forEach(r=>{const o=n[r];Object.keys(o).forEach(i=>{var s;return e[i]={...(s=e[i])!==null&&s!==void 0?s:{},[r]:o[i]}})}),e}const cte=!(typeof document=="object"&&typeof(document==null?void 0:document.getElementById)=="function")&&!(typeof jest<"u")&&!(typeof mocha<"u")&&!(typeof __vitest_worker__<"u");function SP(t){CP=0,Mi.splice(0,Mi.length);const{useContext:e,usePlugin:n,cache:r}=t,{useCache:o}=vP({cacheProvidedAtInception:r}),{useCssAndCx:i}=gP({useCache:o});return{tss:tf({useContext:e,useCache:o,useCssAndCx:i,usePlugin:n??(({classes:l,cx:u,css:f})=>({classes:l,cx:u,css:f})),name:void 0,doesUseNestedSelectors:!1})}}let CP=0;const Mi=[];function tf(t){const{useContext:e,useCache:n,useCssAndCx:r,usePlugin:o,name:i,doesUseNestedSelectors:s}=t;return{withParams:()=>tf({...t}),withName:a=>tf({...t,name:typeof a!="object"?a:Object.keys(a)[0]}),withNestedSelectors:()=>tf({...t,doesUseNestedSelectors:!0}),create:a=>{const l=`x${CP++}`;if(i!==void 0)for(;;){const f=Mi.find(h=>h.name===i);if(f===void 0)break;Mi.splice(Mi.indexOf(f),1)}const u=typeof a=="function"?a:()=>a;return function(h){var m,g,b;const{classesOverrides:y,...S}=h??{},C=e(),{css:E,cx:T}=r(),w=n(),M=()=>{const I={},N=u({...h,...C,...s?{classes:typeof Proxy>"u"?{}:new Proxy({},{get:(A,L)=>{if(typeof L=="symbol"&&Os(!1),cte&&i===void 0)throw new Error(["tss-react: In SSR setups, in order to use nested selectors, you must also give a unique name to the useStyle function.",'Solution: Use tss.withName("ComponentName").withNestedSelectors<...>()... to set a name.'].join(`
323
+ `));e:{if(i===void 0)break e;let z=Mi.find(V=>V.name===i&&V.idOfUseStyles===l);z===void 0&&(z={name:i,idOfUseStyles:l,nestedSelectorRuleNames:new Set},Mi.push(z)),z.nestedSelectorRuleNames.add(L)}e:{if(i===void 0||!(Mi.find(V=>V.name===i&&V.idOfUseStyles!==l&&V.nestedSelectorRuleNames.has(L))!==void 0))break e;throw new Error([`tss-react: There are in your codebase two different useStyles named "${i}" that`,`both use use the nested selector ${L}.
324
+ `,`This may lead to CSS class name collisions, causing nested selectors to target elements outside of the intended scope.
325
+ `,`Solution: Ensure each useStyles using nested selectors has a unique name.
326
+ `,'Use: tss.withName("UniqueName").withNestedSelectors<...>()...'].join(" "))}return I[L]=`${w.key}-${i!==void 0?i:l}-${L}-ref`}})}:{}});let O=mP(Yi(N).map(A=>{const L=N[A];return L.label||(L.label=`${i!==void 0?`${i}-`:""}${A}`),[A,`${E(L)}${Jx(A,A in I)?` ${I[A]}`:""}`]}));return Yi(I).forEach(A=>{A in O||(O[A]=I[A])}),O=Xx(O,y,T),O},R=ute({cache:w,cssObjectByRuleNameOrGetCssObjectByRuleName:a,classesOverridesRef:Gi(y),paramsAndPluginParamsRef:Gi(S),idOfUseStyles:l,context:C,getClasses:M}),_=o({classes:R,css:E,cx:T,idOfUseStyles:l,name:i,...C,...S});return{classes:(m=_.classes)!==null&&m!==void 0?m:R,css:(g=_.css)!==null&&g!==void 0?g:E,cx:(b=_.cx)!==null&&b!==void 0?b:T,...C}}}}}const Ed=new WeakMap;function ute(t){const{cache:e,cssObjectByRuleNameOrGetCssObjectByRuleName:n,classesOverridesRef:r,paramsAndPluginParamsRef:o,idOfUseStyles:i,context:s,getClasses:a}=t;e:{const u=Ed.get(e);if(u===void 0)break e;const f=u.get(n);if(f===void 0)break e;const h=f.get(r);if(h===void 0)break e;const m=h.get(o);if(m===void 0)break e;const g=m.find(({context:b})=>{if(b===s)return!0;if(Yi(b).length!==Yi(s).length)return!1;for(const y in b)if(Gi(b[y])!==Gi(s[y]))return!1;return!0});if(g===void 0)break e;if((g==null?void 0:g.idOfUseStyles)!==i){m.splice(m.indexOf(g),1);break e}return g.result}const l=a();{Ed.has(e)||Ed.set(e,new WeakMap);const u=Ed.get(e);Os(u!==void 0),u.has(n)||u.set(n,new Map);const f=u.get(n);Os(f!==void 0),f.has(r)||(f.size>200&&f.clear(),f.set(r,new Map));const h=f.get(r);if(Os(h!==void 0),!h.has(o)){e:{const g=typeof o=="string"?257:5;if(h.size<g)break e;h.clear()}h.set(o,[])}let m=h.get(o);Os(m!==void 0),m.length>5&&(m=[]),m.push({idOfUseStyles:i,context:s,result:l})}return l}function dte(t){return{...bP(t),...ate(t)}}const{tss:fte}=SP({useContext:()=>({})});fte.create({});const{makeStyles:Kt,withStyles:sue}=dte({useTheme:Zi}),{tss:pte}=SP({useContext:function(){return{theme:Zi()}},usePlugin:yP});pte.create({});var Cg,wk;function wP(){if(wk)return Cg;wk=1;function t(e,n){for(var r=-1,o=e==null?0:e.length,i=Array(o);++r<o;)i[r]=n(e[r],r,e);return i}return Cg=t,Cg}var wg,Tk;function hte(){if(Tk)return wg;Tk=1;function t(){this.__data__=[],this.size=0}return wg=t,wg}var Tg,Ek;function TP(){if(Ek)return Tg;Ek=1;function t(e,n){return e===n||e!==e&&n!==n}return Tg=t,Tg}var Eg,kk;function nh(){if(kk)return Eg;kk=1;var t=TP();function e(n,r){for(var o=n.length;o--;)if(t(n[o][0],r))return o;return-1}return Eg=e,Eg}var kg,Mk;function mte(){if(Mk)return kg;Mk=1;var t=nh(),e=Array.prototype,n=e.splice;function r(o){var i=this.__data__,s=t(i,o);if(s<0)return!1;var a=i.length-1;return s==a?i.pop():n.call(i,s,1),--this.size,!0}return kg=r,kg}var Mg,Ok;function gte(){if(Ok)return Mg;Ok=1;var t=nh();function e(n){var r=this.__data__,o=t(r,n);return o<0?void 0:r[o][1]}return Mg=e,Mg}var Og,Rk;function yte(){if(Rk)return Og;Rk=1;var t=nh();function e(n){return t(this.__data__,n)>-1}return Og=e,Og}var Rg,Ak;function bte(){if(Ak)return Rg;Ak=1;var t=nh();function e(n,r){var o=this.__data__,i=t(o,n);return i<0?(++this.size,o.push([n,r])):o[i][1]=r,this}return Rg=e,Rg}var Ag,Ik;function rh(){if(Ik)return Ag;Ik=1;var t=hte(),e=mte(),n=gte(),r=yte(),o=bte();function i(s){var a=-1,l=s==null?0:s.length;for(this.clear();++a<l;){var u=s[a];this.set(u[0],u[1])}}return i.prototype.clear=t,i.prototype.delete=e,i.prototype.get=n,i.prototype.has=r,i.prototype.set=o,Ag=i,Ag}var Ig,Dk;function vte(){if(Dk)return Ig;Dk=1;var t=rh();function e(){this.__data__=new t,this.size=0}return Ig=e,Ig}var Dg,Pk;function xte(){if(Pk)return Dg;Pk=1;function t(e){var n=this.__data__,r=n.delete(e);return this.size=n.size,r}return Dg=t,Dg}var Pg,_k;function Ste(){if(_k)return Pg;_k=1;function t(e){return this.__data__.get(e)}return Pg=t,Pg}var _g,Nk;function Cte(){if(Nk)return _g;Nk=1;function t(e){return this.__data__.has(e)}return _g=t,_g}var Ng,Lk;function EP(){if(Lk)return Ng;Lk=1;var t=Us(),e=di(),n="[object AsyncFunction]",r="[object Function]",o="[object GeneratorFunction]",i="[object Proxy]";function s(a){if(!e(a))return!1;var l=t(a);return l==r||l==o||l==n||l==i}return Ng=s,Ng}var Lg,jk;function wte(){if(jk)return Lg;jk=1;var t=co(),e=t["__core-js_shared__"];return Lg=e,Lg}var jg,$k;function Tte(){if($k)return jg;$k=1;var t=wte(),e=function(){var r=/[^.]+$/.exec(t&&t.keys&&t.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();function n(r){return!!e&&e in r}return jg=n,jg}var $g,Fk;function kP(){if(Fk)return $g;Fk=1;var t=Function.prototype,e=t.toString;function n(r){if(r!=null){try{return e.call(r)}catch{}try{return r+""}catch{}}return""}return $g=n,$g}var Fg,Bk;function Ete(){if(Bk)return Fg;Bk=1;var t=EP(),e=Tte(),n=di(),r=kP(),o=/[\\^$.*+?()[\]{}|]/g,i=/^\[object .+?Constructor\]$/,s=Function.prototype,a=Object.prototype,l=s.toString,u=a.hasOwnProperty,f=RegExp("^"+l.call(u).replace(o,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function h(m){if(!n(m)||e(m))return!1;var g=t(m)?f:i;return g.test(r(m))}return Fg=h,Fg}var Bg,Vk;function kte(){if(Vk)return Bg;Vk=1;function t(e,n){return e==null?void 0:e[n]}return Bg=t,Bg}var Vg,zk;function Gs(){if(zk)return Vg;zk=1;var t=Ete(),e=kte();function n(r,o){var i=e(r,o);return t(i)?i:void 0}return Vg=n,Vg}var zg,Hk;function Qx(){if(Hk)return zg;Hk=1;var t=Gs(),e=co(),n=t(e,"Map");return zg=n,zg}var Hg,Wk;function oh(){if(Wk)return Hg;Wk=1;var t=Gs(),e=t(Object,"create");return Hg=e,Hg}var Wg,qk;function Mte(){if(qk)return Wg;qk=1;var t=oh();function e(){this.__data__=t?t(null):{},this.size=0}return Wg=e,Wg}var qg,Uk;function Ote(){if(Uk)return qg;Uk=1;function t(e){var n=this.has(e)&&delete this.__data__[e];return this.size-=n?1:0,n}return qg=t,qg}var Ug,Kk;function Rte(){if(Kk)return Ug;Kk=1;var t=oh(),e="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function o(i){var s=this.__data__;if(t){var a=s[i];return a===e?void 0:a}return r.call(s,i)?s[i]:void 0}return Ug=o,Ug}var Kg,Yk;function Ate(){if(Yk)return Kg;Yk=1;var t=oh(),e=Object.prototype,n=e.hasOwnProperty;function r(o){var i=this.__data__;return t?i[o]!==void 0:n.call(i,o)}return Kg=r,Kg}var Yg,Gk;function Ite(){if(Gk)return Yg;Gk=1;var t=oh(),e="__lodash_hash_undefined__";function n(r,o){var i=this.__data__;return this.size+=this.has(r)?0:1,i[r]=t&&o===void 0?e:o,this}return Yg=n,Yg}var Gg,Jk;function Dte(){if(Jk)return Gg;Jk=1;var t=Mte(),e=Ote(),n=Rte(),r=Ate(),o=Ite();function i(s){var a=-1,l=s==null?0:s.length;for(this.clear();++a<l;){var u=s[a];this.set(u[0],u[1])}}return i.prototype.clear=t,i.prototype.delete=e,i.prototype.get=n,i.prototype.has=r,i.prototype.set=o,Gg=i,Gg}var Jg,Zk;function Pte(){if(Zk)return Jg;Zk=1;var t=Dte(),e=rh(),n=Qx();function r(){this.size=0,this.__data__={hash:new t,map:new(n||e),string:new t}}return Jg=r,Jg}var Zg,Xk;function _te(){if(Xk)return Zg;Xk=1;function t(e){var n=typeof e;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?e!=="__proto__":e===null}return Zg=t,Zg}var Xg,Qk;function ih(){if(Qk)return Xg;Qk=1;var t=_te();function e(n,r){var o=n.__data__;return t(r)?o[typeof r=="string"?"string":"hash"]:o.map}return Xg=e,Xg}var Qg,eM;function Nte(){if(eM)return Qg;eM=1;var t=ih();function e(n){var r=t(this,n).delete(n);return this.size-=r?1:0,r}return Qg=e,Qg}var ey,tM;function Lte(){if(tM)return ey;tM=1;var t=ih();function e(n){return t(this,n).get(n)}return ey=e,ey}var ty,nM;function jte(){if(nM)return ty;nM=1;var t=ih();function e(n){return t(this,n).has(n)}return ty=e,ty}var ny,rM;function $te(){if(rM)return ny;rM=1;var t=ih();function e(n,r){var o=t(this,n),i=o.size;return o.set(n,r),this.size+=o.size==i?0:1,this}return ny=e,ny}var ry,oM;function MP(){if(oM)return ry;oM=1;var t=Pte(),e=Nte(),n=Lte(),r=jte(),o=$te();function i(s){var a=-1,l=s==null?0:s.length;for(this.clear();++a<l;){var u=s[a];this.set(u[0],u[1])}}return i.prototype.clear=t,i.prototype.delete=e,i.prototype.get=n,i.prototype.has=r,i.prototype.set=o,ry=i,ry}var oy,iM;function Fte(){if(iM)return oy;iM=1;var t=rh(),e=Qx(),n=MP(),r=200;function o(i,s){var a=this.__data__;if(a instanceof t){var l=a.__data__;if(!e||l.length<r-1)return l.push([i,s]),this.size=++a.size,this;a=this.__data__=new n(l)}return a.set(i,s),this.size=a.size,this}return oy=o,oy}var iy,sM;function Bte(){if(sM)return iy;sM=1;var t=rh(),e=vte(),n=xte(),r=Ste(),o=Cte(),i=Fte();function s(a){var l=this.__data__=new t(a);this.size=l.size}return s.prototype.clear=e,s.prototype.delete=n,s.prototype.get=r,s.prototype.has=o,s.prototype.set=i,iy=s,iy}var sy,aM;function Vte(){if(aM)return sy;aM=1;function t(e,n){for(var r=-1,o=e==null?0:e.length;++r<o&&n(e[r],r,e)!==!1;);return e}return sy=t,sy}var ay,lM;function OP(){if(lM)return ay;lM=1;var t=Gs(),e=function(){try{var n=t(Object,"defineProperty");return n({},"",{}),n}catch{}}();return ay=e,ay}var ly,cM;function RP(){if(cM)return ly;cM=1;var t=OP();function e(n,r,o){r=="__proto__"&&t?t(n,r,{configurable:!0,enumerable:!0,value:o,writable:!0}):n[r]=o}return ly=e,ly}var cy,uM;function AP(){if(uM)return cy;uM=1;var t=RP(),e=TP(),n=Object.prototype,r=n.hasOwnProperty;function o(i,s,a){var l=i[s];(!(r.call(i,s)&&e(l,a))||a===void 0&&!(s in i))&&t(i,s,a)}return cy=o,cy}var uy,dM;function hu(){if(dM)return uy;dM=1;var t=AP(),e=RP();function n(r,o,i,s){var a=!i;i||(i={});for(var l=-1,u=o.length;++l<u;){var f=o[l],h=s?s(i[f],r[f],f,i,r):void 0;h===void 0&&(h=r[f]),a?e(i,f,h):t(i,f,h)}return i}return uy=n,uy}var dy,fM;function zte(){if(fM)return dy;fM=1;function t(e,n){for(var r=-1,o=Array(e);++r<e;)o[r]=n(r);return o}return dy=t,dy}var fy,pM;function Hte(){if(pM)return fy;pM=1;var t=Us(),e=Xi(),n="[object Arguments]";function r(o){return e(o)&&t(o)==n}return fy=r,fy}var py,hM;function IP(){if(hM)return py;hM=1;var t=Hte(),e=Xi(),n=Object.prototype,r=n.hasOwnProperty,o=n.propertyIsEnumerable,i=t(function(){return arguments}())?t:function(s){return e(s)&&r.call(s,"callee")&&!o.call(s,"callee")};return py=i,py}var hy,mM;function Js(){if(mM)return hy;mM=1;var t=Array.isArray;return hy=t,hy}var ec={exports:{}},my,gM;function Wte(){if(gM)return my;gM=1;function t(){return!1}return my=t,my}ec.exports;var yM;function DP(){return yM||(yM=1,function(t,e){var n=co(),r=Wte(),o=e&&!e.nodeType&&e,i=o&&!0&&t&&!t.nodeType&&t,s=i&&i.exports===o,a=s?n.Buffer:void 0,l=a?a.isBuffer:void 0,u=l||r;t.exports=u}(ec,ec.exports)),ec.exports}var gy,bM;function qte(){if(bM)return gy;bM=1;var t=9007199254740991,e=/^(?:0|[1-9]\d*)$/;function n(r,o){var i=typeof r;return o=o??t,!!o&&(i=="number"||i!="symbol"&&e.test(r))&&r>-1&&r%1==0&&r<o}return gy=n,gy}var yy,vM;function PP(){if(vM)return yy;vM=1;var t=9007199254740991;function e(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=t}return yy=e,yy}var by,xM;function Ute(){if(xM)return by;xM=1;var t=Us(),e=PP(),n=Xi(),r="[object Arguments]",o="[object Array]",i="[object Boolean]",s="[object Date]",a="[object Error]",l="[object Function]",u="[object Map]",f="[object Number]",h="[object Object]",m="[object RegExp]",g="[object Set]",b="[object String]",y="[object WeakMap]",S="[object ArrayBuffer]",C="[object DataView]",E="[object Float32Array]",T="[object Float64Array]",w="[object Int8Array]",M="[object Int16Array]",R="[object Int32Array]",_="[object Uint8Array]",I="[object Uint8ClampedArray]",N="[object Uint16Array]",O="[object Uint32Array]",A={};A[E]=A[T]=A[w]=A[M]=A[R]=A[_]=A[I]=A[N]=A[O]=!0,A[r]=A[o]=A[S]=A[i]=A[C]=A[s]=A[a]=A[l]=A[u]=A[f]=A[h]=A[m]=A[g]=A[b]=A[y]=!1;function L(z){return n(z)&&e(z.length)&&!!A[t(z)]}return by=L,by}var vy,SM;function sh(){if(SM)return vy;SM=1;function t(e){return function(n){return e(n)}}return vy=t,vy}var tc={exports:{}};tc.exports;var CM;function ah(){return CM||(CM=1,function(t,e){var n=eI(),r=e&&!e.nodeType&&e,o=r&&!0&&t&&!t.nodeType&&t,i=o&&o.exports===r,s=i&&n.process,a=function(){try{var l=o&&o.require&&o.require("util").types;return l||s&&s.binding&&s.binding("util")}catch{}}();t.exports=a}(tc,tc.exports)),tc.exports}var xy,wM;function Kte(){if(wM)return xy;wM=1;var t=Ute(),e=sh(),n=ah(),r=n&&n.isTypedArray,o=r?e(r):t;return xy=o,xy}var Sy,TM;function _P(){if(TM)return Sy;TM=1;var t=zte(),e=IP(),n=Js(),r=DP(),o=qte(),i=Kte(),s=Object.prototype,a=s.hasOwnProperty;function l(u,f){var h=n(u),m=!h&&e(u),g=!h&&!m&&r(u),b=!h&&!m&&!g&&i(u),y=h||m||g||b,S=y?t(u.length,String):[],C=S.length;for(var E in u)(f||a.call(u,E))&&!(y&&(E=="length"||g&&(E=="offset"||E=="parent")||b&&(E=="buffer"||E=="byteLength"||E=="byteOffset")||o(E,C)))&&S.push(E);return S}return Sy=l,Sy}var Cy,EM;function e1(){if(EM)return Cy;EM=1;var t=Object.prototype;function e(n){var r=n&&n.constructor,o=typeof r=="function"&&r.prototype||t;return n===o}return Cy=e,Cy}var wy,kM;function NP(){if(kM)return wy;kM=1;function t(e,n){return function(r){return e(n(r))}}return wy=t,wy}var Ty,MM;function Yte(){if(MM)return Ty;MM=1;var t=NP(),e=t(Object.keys,Object);return Ty=e,Ty}var Ey,OM;function Gte(){if(OM)return Ey;OM=1;var t=e1(),e=Yte(),n=Object.prototype,r=n.hasOwnProperty;function o(i){if(!t(i))return e(i);var s=[];for(var a in Object(i))r.call(i,a)&&a!="constructor"&&s.push(a);return s}return Ey=o,Ey}var ky,RM;function LP(){if(RM)return ky;RM=1;var t=EP(),e=PP();function n(r){return r!=null&&e(r.length)&&!t(r)}return ky=n,ky}var My,AM;function t1(){if(AM)return My;AM=1;var t=_P(),e=Gte(),n=LP();function r(o){return n(o)?t(o):e(o)}return My=r,My}var Oy,IM;function Jte(){if(IM)return Oy;IM=1;var t=hu(),e=t1();function n(r,o){return r&&t(o,e(o),r)}return Oy=n,Oy}var Ry,DM;function Zte(){if(DM)return Ry;DM=1;function t(e){var n=[];if(e!=null)for(var r in Object(e))n.push(r);return n}return Ry=t,Ry}var Ay,PM;function Xte(){if(PM)return Ay;PM=1;var t=di(),e=e1(),n=Zte(),r=Object.prototype,o=r.hasOwnProperty;function i(s){if(!t(s))return n(s);var a=e(s),l=[];for(var u in s)u=="constructor"&&(a||!o.call(s,u))||l.push(u);return l}return Ay=i,Ay}var Iy,_M;function n1(){if(_M)return Iy;_M=1;var t=_P(),e=Xte(),n=LP();function r(o){return n(o)?t(o,!0):e(o)}return Iy=r,Iy}var Dy,NM;function Qte(){if(NM)return Dy;NM=1;var t=hu(),e=n1();function n(r,o){return r&&t(o,e(o),r)}return Dy=n,Dy}var nc={exports:{}};nc.exports;var LM;function ene(){return LM||(LM=1,function(t,e){var n=co(),r=e&&!e.nodeType&&e,o=r&&!0&&t&&!t.nodeType&&t,i=o&&o.exports===r,s=i?n.Buffer:void 0,a=s?s.allocUnsafe:void 0;function l(u,f){if(f)return u.slice();var h=u.length,m=a?a(h):new u.constructor(h);return u.copy(m),m}t.exports=l}(nc,nc.exports)),nc.exports}var Py,jM;function tne(){if(jM)return Py;jM=1;function t(e,n){var r=-1,o=e.length;for(n||(n=Array(o));++r<o;)n[r]=e[r];return n}return Py=t,Py}var _y,$M;function nne(){if($M)return _y;$M=1;function t(e,n){for(var r=-1,o=e==null?0:e.length,i=0,s=[];++r<o;){var a=e[r];n(a,r,e)&&(s[i++]=a)}return s}return _y=t,_y}var Ny,FM;function jP(){if(FM)return Ny;FM=1;function t(){return[]}return Ny=t,Ny}var Ly,BM;function r1(){if(BM)return Ly;BM=1;var t=nne(),e=jP(),n=Object.prototype,r=n.propertyIsEnumerable,o=Object.getOwnPropertySymbols,i=o?function(s){return s==null?[]:(s=Object(s),t(o(s),function(a){return r.call(s,a)}))}:e;return Ly=i,Ly}var jy,VM;function rne(){if(VM)return jy;VM=1;var t=hu(),e=r1();function n(r,o){return t(r,e(r),o)}return jy=n,jy}var $y,zM;function o1(){if(zM)return $y;zM=1;function t(e,n){for(var r=-1,o=n.length,i=e.length;++r<o;)e[i+r]=n[r];return e}return $y=t,$y}var Fy,HM;function i1(){if(HM)return Fy;HM=1;var t=NP(),e=t(Object.getPrototypeOf,Object);return Fy=e,Fy}var By,WM;function $P(){if(WM)return By;WM=1;var t=o1(),e=i1(),n=r1(),r=jP(),o=Object.getOwnPropertySymbols,i=o?function(s){for(var a=[];s;)t(a,n(s)),s=e(s);return a}:r;return By=i,By}var Vy,qM;function one(){if(qM)return Vy;qM=1;var t=hu(),e=$P();function n(r,o){return t(r,e(r),o)}return Vy=n,Vy}var zy,UM;function FP(){if(UM)return zy;UM=1;var t=o1(),e=Js();function n(r,o,i){var s=o(r);return e(r)?s:t(s,i(r))}return zy=n,zy}var Hy,KM;function ine(){if(KM)return Hy;KM=1;var t=FP(),e=r1(),n=t1();function r(o){return t(o,n,e)}return Hy=r,Hy}var Wy,YM;function BP(){if(YM)return Wy;YM=1;var t=FP(),e=$P(),n=n1();function r(o){return t(o,n,e)}return Wy=r,Wy}var qy,GM;function sne(){if(GM)return qy;GM=1;var t=Gs(),e=co(),n=t(e,"DataView");return qy=n,qy}var Uy,JM;function ane(){if(JM)return Uy;JM=1;var t=Gs(),e=co(),n=t(e,"Promise");return Uy=n,Uy}var Ky,ZM;function lne(){if(ZM)return Ky;ZM=1;var t=Gs(),e=co(),n=t(e,"Set");return Ky=n,Ky}var Yy,XM;function cne(){if(XM)return Yy;XM=1;var t=Gs(),e=co(),n=t(e,"WeakMap");return Yy=n,Yy}var Gy,QM;function s1(){if(QM)return Gy;QM=1;var t=sne(),e=Qx(),n=ane(),r=lne(),o=cne(),i=Us(),s=kP(),a="[object Map]",l="[object Object]",u="[object Promise]",f="[object Set]",h="[object WeakMap]",m="[object DataView]",g=s(t),b=s(e),y=s(n),S=s(r),C=s(o),E=i;return(t&&E(new t(new ArrayBuffer(1)))!=m||e&&E(new e)!=a||n&&E(n.resolve())!=u||r&&E(new r)!=f||o&&E(new o)!=h)&&(E=function(T){var w=i(T),M=w==l?T.constructor:void 0,R=M?s(M):"";if(R)switch(R){case g:return m;case b:return a;case y:return u;case S:return f;case C:return h}return w}),Gy=E,Gy}var Jy,eO;function une(){if(eO)return Jy;eO=1;var t=Object.prototype,e=t.hasOwnProperty;function n(r){var o=r.length,i=new r.constructor(o);return o&&typeof r[0]=="string"&&e.call(r,"index")&&(i.index=r.index,i.input=r.input),i}return Jy=n,Jy}var Zy,tO;function dne(){if(tO)return Zy;tO=1;var t=co(),e=t.Uint8Array;return Zy=e,Zy}var Xy,nO;function a1(){if(nO)return Xy;nO=1;var t=dne();function e(n){var r=new n.constructor(n.byteLength);return new t(r).set(new t(n)),r}return Xy=e,Xy}var Qy,rO;function fne(){if(rO)return Qy;rO=1;var t=a1();function e(n,r){var o=r?t(n.buffer):n.buffer;return new n.constructor(o,n.byteOffset,n.byteLength)}return Qy=e,Qy}var eb,oO;function pne(){if(oO)return eb;oO=1;var t=/\w*$/;function e(n){var r=new n.constructor(n.source,t.exec(n));return r.lastIndex=n.lastIndex,r}return eb=e,eb}var tb,iO;function hne(){if(iO)return tb;iO=1;var t=tu(),e=t?t.prototype:void 0,n=e?e.valueOf:void 0;function r(o){return n?Object(n.call(o)):{}}return tb=r,tb}var nb,sO;function mne(){if(sO)return nb;sO=1;var t=a1();function e(n,r){var o=r?t(n.buffer):n.buffer;return new n.constructor(o,n.byteOffset,n.length)}return nb=e,nb}var rb,aO;function gne(){if(aO)return rb;aO=1;var t=a1(),e=fne(),n=pne(),r=hne(),o=mne(),i="[object Boolean]",s="[object Date]",a="[object Map]",l="[object Number]",u="[object RegExp]",f="[object Set]",h="[object String]",m="[object Symbol]",g="[object ArrayBuffer]",b="[object DataView]",y="[object Float32Array]",S="[object Float64Array]",C="[object Int8Array]",E="[object Int16Array]",T="[object Int32Array]",w="[object Uint8Array]",M="[object Uint8ClampedArray]",R="[object Uint16Array]",_="[object Uint32Array]";function I(N,O,A){var L=N.constructor;switch(O){case g:return t(N);case i:case s:return new L(+N);case b:return e(N,A);case y:case S:case C:case E:case T:case w:case M:case R:case _:return o(N,A);case a:return new L;case l:case h:return new L(N);case u:return n(N);case f:return new L;case m:return r(N)}}return rb=I,rb}var ob,lO;function yne(){if(lO)return ob;lO=1;var t=di(),e=Object.create,n=function(){function r(){}return function(o){if(!t(o))return{};if(e)return e(o);r.prototype=o;var i=new r;return r.prototype=void 0,i}}();return ob=n,ob}var ib,cO;function bne(){if(cO)return ib;cO=1;var t=yne(),e=i1(),n=e1();function r(o){return typeof o.constructor=="function"&&!n(o)?t(e(o)):{}}return ib=r,ib}var sb,uO;function vne(){if(uO)return sb;uO=1;var t=s1(),e=Xi(),n="[object Map]";function r(o){return e(o)&&t(o)==n}return sb=r,sb}var ab,dO;function xne(){if(dO)return ab;dO=1;var t=vne(),e=sh(),n=ah(),r=n&&n.isMap,o=r?e(r):t;return ab=o,ab}var lb,fO;function Sne(){if(fO)return lb;fO=1;var t=s1(),e=Xi(),n="[object Set]";function r(o){return e(o)&&t(o)==n}return lb=r,lb}var cb,pO;function Cne(){if(pO)return cb;pO=1;var t=Sne(),e=sh(),n=ah(),r=n&&n.isSet,o=r?e(r):t;return cb=o,cb}var ub,hO;function wne(){if(hO)return ub;hO=1;var t=Bte(),e=Vte(),n=AP(),r=Jte(),o=Qte(),i=ene(),s=tne(),a=rne(),l=one(),u=ine(),f=BP(),h=s1(),m=une(),g=gne(),b=bne(),y=Js(),S=DP(),C=xne(),E=di(),T=Cne(),w=t1(),M=n1(),R=1,_=2,I=4,N="[object Arguments]",O="[object Array]",A="[object Boolean]",L="[object Date]",z="[object Error]",V="[object Function]",$="[object GeneratorFunction]",F="[object Map]",W="[object Number]",U="[object Object]",G="[object RegExp]",Y="[object Set]",Z="[object String]",me="[object Symbol]",fe="[object WeakMap]",pe="[object ArrayBuffer]",re="[object DataView]",ue="[object Float32Array]",ae="[object Float64Array]",K="[object Int8Array]",Q="[object Int16Array]",ie="[object Int32Array]",he="[object Uint8Array]",ee="[object Uint8ClampedArray]",se="[object Uint16Array]",le="[object Uint32Array]",ge={};ge[N]=ge[O]=ge[pe]=ge[re]=ge[A]=ge[L]=ge[ue]=ge[ae]=ge[K]=ge[Q]=ge[ie]=ge[F]=ge[W]=ge[U]=ge[G]=ge[Y]=ge[Z]=ge[me]=ge[he]=ge[ee]=ge[se]=ge[le]=!0,ge[z]=ge[V]=ge[fe]=!1;function we(xe,Me,_e,Ve,Ye,Ie){var it,vt=Me&R,Yt=Me&_,yn=Me&I;if(_e&&(it=Ye?_e(xe,Ve,Ye,Ie):_e(xe)),it!==void 0)return it;if(!E(xe))return xe;var tn=y(xe);if(tn){if(it=m(xe),!vt)return s(xe,it)}else{var Dt=h(xe),Sn=Dt==V||Dt==$;if(S(xe))return i(xe,vt);if(Dt==U||Dt==N||Sn&&!Ye){if(it=Yt||Sn?{}:b(xe),!vt)return Yt?l(xe,o(it,xe)):a(xe,r(it,xe))}else{if(!ge[Dt])return Ye?xe:{};it=g(xe,Dt,vt)}}Ie||(Ie=new t);var jn=Ie.get(xe);if(jn)return jn;Ie.set(xe,it),T(xe)?xe.forEach(function(Vt){it.add(we(Vt,Me,_e,Vt,xe,Ie))}):C(xe)&&xe.forEach(function(Vt,de){it.set(de,we(Vt,Me,_e,de,xe,Ie))});var ut=yn?Yt?f:u:Yt?M:w,An=tn?void 0:ut(xe);return e(An||xe,function(Vt,de){An&&(de=Vt,Vt=xe[de]),n(it,de,we(Vt,Me,_e,de,xe,Ie))}),it}return ub=we,ub}var db,mO;function Tne(){if(mO)return db;mO=1;var t=Js(),e=Ep(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function o(i,s){if(t(i))return!1;var a=typeof i;return a=="number"||a=="symbol"||a=="boolean"||i==null||e(i)?!0:r.test(i)||!n.test(i)||s!=null&&i in Object(s)}return db=o,db}var fb,gO;function Ene(){if(gO)return fb;gO=1;var t=MP(),e="Expected a function";function n(r,o){if(typeof r!="function"||o!=null&&typeof o!="function")throw new TypeError(e);var i=function(){var s=arguments,a=o?o.apply(this,s):s[0],l=i.cache;if(l.has(a))return l.get(a);var u=r.apply(this,s);return i.cache=l.set(a,u)||l,u};return i.cache=new(n.Cache||t),i}return n.Cache=t,fb=n,fb}var pb,yO;function kne(){if(yO)return pb;yO=1;var t=Ene(),e=500;function n(r){var o=t(r,function(s){return i.size===e&&i.clear(),s}),i=o.cache;return o}return pb=n,pb}var hb,bO;function Mne(){if(bO)return hb;bO=1;var t=kne(),e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=t(function(o){var i=[];return o.charCodeAt(0)===46&&i.push(""),o.replace(e,function(s,a,l,u){i.push(l?u.replace(n,"$1"):a||s)}),i});return hb=r,hb}var mb,vO;function VP(){if(vO)return mb;vO=1;var t=tu(),e=wP(),n=Js(),r=Ep(),o=1/0,i=t?t.prototype:void 0,s=i?i.toString:void 0;function a(l){if(typeof l=="string")return l;if(n(l))return e(l,a)+"";if(r(l))return s?s.call(l):"";var u=l+"";return u=="0"&&1/l==-o?"-0":u}return mb=a,mb}var gb,xO;function zP(){if(xO)return gb;xO=1;var t=VP();function e(n){return n==null?"":t(n)}return gb=e,gb}var yb,SO;function l1(){if(SO)return yb;SO=1;var t=Js(),e=Tne(),n=Mne(),r=zP();function o(i,s){return t(i)?i:e(i,s)?[i]:n(r(i))}return yb=o,yb}var bb,CO;function One(){if(CO)return bb;CO=1;function t(e){var n=e==null?0:e.length;return n?e[n-1]:void 0}return bb=t,bb}var vb,wO;function HP(){if(wO)return vb;wO=1;var t=Ep(),e=1/0;function n(r){if(typeof r=="string"||t(r))return r;var o=r+"";return o=="0"&&1/r==-e?"-0":o}return vb=n,vb}var xb,TO;function Rne(){if(TO)return xb;TO=1;var t=l1(),e=HP();function n(r,o){o=t(o,r);for(var i=0,s=o.length;r!=null&&i<s;)r=r[e(o[i++])];return i&&i==s?r:void 0}return xb=n,xb}var Sb,EO;function WP(){if(EO)return Sb;EO=1;function t(e,n,r){var o=-1,i=e.length;n<0&&(n=-n>i?0:i+n),r=r>i?i:r,r<0&&(r+=i),i=n>r?0:r-n>>>0,n>>>=0;for(var s=Array(i);++o<i;)s[o]=e[o+n];return s}return Sb=t,Sb}var Cb,kO;function Ane(){if(kO)return Cb;kO=1;var t=Rne(),e=WP();function n(r,o){return o.length<2?r:t(r,e(o,0,-1))}return Cb=n,Cb}var wb,MO;function Ine(){if(MO)return wb;MO=1;var t=l1(),e=One(),n=Ane(),r=HP();function o(i,s){return s=t(s,i),i=n(i,s),i==null||delete i[r(e(s))]}return wb=o,wb}var Tb,OO;function Dne(){if(OO)return Tb;OO=1;var t=Us(),e=i1(),n=Xi(),r="[object Object]",o=Function.prototype,i=Object.prototype,s=o.toString,a=i.hasOwnProperty,l=s.call(Object);function u(f){if(!n(f)||t(f)!=r)return!1;var h=e(f);if(h===null)return!0;var m=a.call(h,"constructor")&&h.constructor;return typeof m=="function"&&m instanceof m&&s.call(m)==l}return Tb=u,Tb}var Eb,RO;function Pne(){if(RO)return Eb;RO=1;var t=Dne();function e(n){return t(n)?void 0:n}return Eb=e,Eb}var kb,AO;function _ne(){if(AO)return kb;AO=1;var t=tu(),e=IP(),n=Js(),r=t?t.isConcatSpreadable:void 0;function o(i){return n(i)||e(i)||!!(r&&i&&i[r])}return kb=o,kb}var Mb,IO;function Nne(){if(IO)return Mb;IO=1;var t=o1(),e=_ne();function n(r,o,i,s,a){var l=-1,u=r.length;for(i||(i=e),a||(a=[]);++l<u;){var f=r[l];o>0&&i(f)?o>1?n(f,o-1,i,s,a):t(a,f):s||(a[a.length]=f)}return a}return Mb=n,Mb}var Ob,DO;function Lne(){if(DO)return Ob;DO=1;var t=Nne();function e(n){var r=n==null?0:n.length;return r?t(n,1):[]}return Ob=e,Ob}var Rb,PO;function jne(){if(PO)return Rb;PO=1;function t(e,n,r){switch(r.length){case 0:return e.call(n);case 1:return e.call(n,r[0]);case 2:return e.call(n,r[0],r[1]);case 3:return e.call(n,r[0],r[1],r[2])}return e.apply(n,r)}return Rb=t,Rb}var Ab,_O;function $ne(){if(_O)return Ab;_O=1;var t=jne(),e=Math.max;function n(r,o,i){return o=e(o===void 0?r.length-1:o,0),function(){for(var s=arguments,a=-1,l=e(s.length-o,0),u=Array(l);++a<l;)u[a]=s[o+a];a=-1;for(var f=Array(o+1);++a<o;)f[a]=s[a];return f[o]=i(u),t(r,this,f)}}return Ab=n,Ab}var Ib,NO;function Fne(){if(NO)return Ib;NO=1;function t(e){return function(){return e}}return Ib=t,Ib}var Db,LO;function Bne(){if(LO)return Db;LO=1;function t(e){return e}return Db=t,Db}var Pb,jO;function Vne(){if(jO)return Pb;jO=1;var t=Fne(),e=OP(),n=Bne(),r=e?function(o,i){return e(o,"toString",{configurable:!0,enumerable:!1,value:t(i),writable:!0})}:n;return Pb=r,Pb}var _b,$O;function zne(){if($O)return _b;$O=1;var t=800,e=16,n=Date.now;function r(o){var i=0,s=0;return function(){var a=n(),l=e-(a-s);if(s=a,l>0){if(++i>=t)return arguments[0]}else i=0;return o.apply(void 0,arguments)}}return _b=r,_b}var Nb,FO;function Hne(){if(FO)return Nb;FO=1;var t=Vne(),e=zne(),n=e(t);return Nb=n,Nb}var Lb,BO;function Wne(){if(BO)return Lb;BO=1;var t=Lne(),e=$ne(),n=Hne();function r(o){return n(e(o,void 0,t),o+"")}return Lb=r,Lb}var jb,VO;function qne(){if(VO)return jb;VO=1;var t=wP(),e=wne(),n=Ine(),r=l1(),o=hu(),i=Pne(),s=Wne(),a=BP(),l=1,u=2,f=4,h=s(function(m,g){var b={};if(m==null)return b;var y=!1;g=t(g,function(C){return C=r(C,m),y||(y=C.length>1),C}),o(m,a(m),b),y&&(b=e(b,l|u|f,i));for(var S=g.length;S--;)n(b,g[S]);return b});return jb=h,jb}var Une=qne();const Ta=rr(Une),Nf={TABLE_ELEMENT:1,MENU_BAR:2,NOTCHED_OUTLINE:2};function qP(t){const e=Object.keys(t.typography.h1).some(r=>r.includes("@media")),n=so.keyframes`
327
+ 0%, 95% {
328
+ opacity: 1;
329
+ }
330
+ 100% {
331
+ opacity: 0;
332
+ }
333
+ `;return{...Ta(t.typography.body1,["lineHeight"]),"&:focus":{outline:"none"},"& h1":{fontFamily:t.typography.h3.fontFamily,fontWeight:"bold",...e?{fontSize:`${(1.5625*1.2).toFixed(4)}rem`,[t.breakpoints.up("sm")]:{fontSize:`${(1.8219*1.2).toFixed(4)}rem`},[t.breakpoints.up("md")]:{fontSize:`${(2.0243*1.2).toFixed(4)}rem`},[t.breakpoints.up("lg")]:{fontSize:`${(2.0243*1.2).toFixed(4)}rem`}}:{fontSize:`${(2.0243*1.2).toFixed(4)}rem`}},"& h2":{...Ta(t.typography.h4,["lineHeight"]),fontWeight:500},"& h3":{...Ta(t.typography.h5,["lineHeight"]),fontWeight:500},"& h4":{...Ta(t.typography.h6,["lineHeight"]),fontWeight:500},"& h5":{...Ta(t.typography.subtitle1,["lineHeight"]),fontWeight:500},"& h6":{...Ta(t.typography.subtitle2,["lineHeight"]),fontWeight:500},"& h1, & h2, & h3, & h4, & h5, & h6, & p":{marginBlockStart:0,marginBlockEnd:0},'& a:not([data-type="mention"])':{color:t.palette.primary.main,textDecoration:"none","&:hover":{textDecoration:"underline"}},"& ul, & ol":{marginBlockStart:0,marginBlockEnd:0},"& ol":{listStyleType:"decimal","& ol":{listStyleType:"lower-alpha","& ol":{listStyleType:"lower-roman","& ol":{listStyleType:"decimal","& ol":{listStyleType:"lower-alpha","& ol":{listStyleType:"lower-roman"}}}}}},"& ul":{listStyleType:"disc","& ul":{listStyleType:"circle","& ul":{listStyleType:"square","& ul":{listStyleType:"disc","& ul":{listStyleType:"circle","& ul":{listStyleType:"square"}}}}}},'& ul[data-type="taskList"]':{listStyle:"none",padding:0,"& li":{display:"flex","& > label":{flex:"0 0 auto",marginRight:"0.5rem",userSelect:"none"},"& > div":{flex:"1 1 auto"}}},"& blockquote":{paddingLeft:"1rem",marginInlineStart:t.spacing(1),marginInlineEnd:t.spacing(1),position:"relative","&:before":{position:"absolute",top:0,bottom:0,left:0,display:"block",width:4,borderRadius:t.shape.borderRadius,background:t.palette.text.disabled,content:'""'}},"& :not(pre) > code":{padding:"2px 3px 1px",borderWidth:1,borderStyle:"solid",borderColor:t.palette.divider,borderRadius:3,backgroundColor:t.palette.action.hover,color:t.palette.mode==="dark"?t.palette.secondary.main:j.darken(t.palette.secondary.dark,.1)},"& pre":{marginTop:t.spacing(.5),marginBottom:t.spacing(.5),padding:t.spacing(1),borderWidth:1,borderStyle:"solid",borderColor:t.palette.divider,borderRadius:t.shape.borderRadius,background:t.palette.action.hover,lineHeight:1.4,overflowX:"auto",whiteSpace:"pre !important"},'& [data-type="mention"]':{padding:"0 0.25rem",lineHeight:"1.3em",borderRadius:t.shape.borderRadius,color:t.palette.primary.main,background:t.palette.mode==="dark"?j.alpha(j.darken(t.palette.primary.dark,.7),.5):j.alpha(j.lighten(t.palette.primary.light,.6),.3),textDecoration:"none"},"& img:not(.ProseMirror-separator)":{maxWidth:"100%",height:"auto",display:"inline-flex",...Kne(t),"&.ProseMirror-selectednode":{outline:`3px solid ${t.palette.primary.main}`}},"& hr":{borderWidth:0,borderTopWidth:"thin",borderStyle:"solid",borderColor:t.palette.text.secondary,"&.ProseMirror-selectednode":{borderColor:t.palette.primary.main}},"& table":{borderCollapse:"collapse",tableLayout:"fixed",margin:0,overflowY:"hidden",overflowX:"auto",display:"block","& td, th":{minWidth:"1em",borderWidth:1,borderStyle:"solid",borderColor:t.palette.mode==="dark"?t.palette.grey[500]:t.palette.grey[400],padding:"3px 5px",verticalAlign:"top",boxSizing:"border-box",position:"relative","& > *":{marginBottom:0}},"& th":{fontWeight:500,textAlign:"left",backgroundColor:t.palette.action.selected}},"& .tableWrapper":{overflowX:"auto","& table":{overflow:"hidden",display:"table"}},"& .selectedCell:after":{zIndex:Nf.TABLE_ELEMENT,position:"absolute",content:'""',left:0,right:0,top:0,bottom:0,background:"rgba(200, 200, 255, 0.4)",pointerEvents:"none"},'&[contenteditable="true"]':{"& .column-resize-handle":{position:"absolute",right:-2,top:-1,bottom:-2,width:4,zIndex:Nf.TABLE_ELEMENT,backgroundColor:t.palette.primary.light,pointerEvents:"none"},"&.resize-cursor":{cursor:"col-resize"}},'&[contenteditable="false"]':{"& .column-resize-handle":{display:"none"},"&.resize-cursor":{pointerEvents:"none"}},"& p.is-editor-empty:first-of-type::before":{color:t.palette.text.disabled,content:"attr(data-placeholder)",float:"left",height:0,pointerEvents:"none"},"& .ProseMirror-gapcursor:after":{borderColor:t.palette.text.primary},"& .collaboration-cursor__caret":{borderLeft:"1px solid #0d0d0d",borderRight:"1px solid #0d0d0d",marginLeft:"-1px",marginRight:"-1px",position:"relative",wordBreak:"normal",cursor:"text","&:after":{position:"absolute",content:'""',left:-3,right:0,top:-2,borderWidth:3,borderStyle:"solid",borderColor:"inherit"},"&:hover .collaboration-cursor__label":{opacity:1,transition:t.transitions.create("opacity",{delay:0,duration:100,easing:"linear"})}},"& .collaboration-cursor__label":{borderRadius:"3px 3px 3px 0",color:"#0d0d0d",fontSize:12,fontStyle:"normal",fontWeight:600,fontFamily:t.typography.body1.fontFamily,left:-1,lineHeight:"normal",padding:"0.1rem 0.3rem",position:"absolute",top:"-1.4em",userSelect:"none",whiteSpace:"nowrap",pointerEvents:"none",opacity:0,transition:t.transitions.create("opacity",{delay:500,duration:100,easing:"linear"}),animation:`${n} 3s linear 1`}}}function Kne(t){if(t.palette.mode!=="dark")return{};const e=t.palette.grey[200];return{backgroundColor:e,color:t.palette.getContrastText(e)}}const Yne="MuiTiptap-";function Gne(t,e){return`${Yne}${t}-${e}`}function Zs(t,e){const n={};return e.forEach(r=>{n[r]=Gne(t,r)}),n}const zO=Zs("ControlledBubbleMenu",["root","paper"]),Jne=Kt({name:{ControlledBubbleMenu:lh}})(t=>({root:{zIndex:t.zIndex.tooltip},paper:{backgroundColor:t.palette.background.default}}));function lh({editor:t,open:e,className:n,classes:r={},sx:o,children:i,anchorEl:s,container:a,disablePortal:l,placement:u="top",fallbackPlacements:f=["top","bottom","top-start","bottom-start","top-end","bottom-end"],flipPadding:h=8,PaperProps:m}){const{classes:g,cx:b}=Jne(void 0,{props:{classes:r}}),y=j.useTheme(),S=J.useCallback(()=>{const{ranges:C}=t.state.selection,E=Math.min(...C.map(w=>w.$from.pos)),T=Math.max(...C.map(w=>w.$to.pos));return{getBoundingClientRect:()=>{if(fP(t.state.selection)){const w=t.view.nodeDOM(E);if(w instanceof HTMLElement)return w.getBoundingClientRect()}return pP(t.view,E,T)}}},[t]);return v.jsx(j.Popper,{open:e,placement:u,modifiers:[{name:"offset",options:{offset:[0,6]}},{name:"flip",enabled:!0,options:{boundary:t.options.element,fallbackPlacements:f,padding:h}},{name:"preventOverflow",enabled:!0,options:{altAxis:!0,boundary:"clippingParents",padding:8}}],anchorEl:s??S,className:b(zO.root,g.root,n),sx:o,container:a,disablePortal:l,transition:!0,children:({TransitionProps:C})=>v.jsx(j.Fade,{...C,timeout:{enter:y.transitions.duration.enteringScreen,exit:0},children:v.jsx(j.Paper,{elevation:7,...m,className:b(zO.paper,g.paper,m==null?void 0:m.className),children:i})})})}const UP=J.createContext(void 0);function bt(){const t=J.useContext(UP);if(t===void 0)throw new Error("Tiptap editor not found in component context. Be sure to use <RichTextEditorProvider editor={editor} />!");return t}var Zn;(function(t){t[t.HIDDEN=0]="HIDDEN",t[t.VIEW_LINK_DETAILS=1]="VIEW_LINK_DETAILS",t[t.EDIT_LINK=2]="EDIT_LINK"})(Zn||(Zn={}));const Zne=cn.create({name:"linkBubbleMenuHandler",addStorage(){return{state:Zn.HIDDEN,bubbleMenuOptions:void 0}},addCommands(){return{openLinkBubbleMenu:(t={})=>({editor:e,chain:n,dispatch:r})=>{const o=this.storage.state;let i;return e.isActive("link")?(o!==Zn.VIEW_LINK_DETAILS&&n().extendMarkRange("link").focus().run(),i=Zn.VIEW_LINK_DETAILS):i=Zn.EDIT_LINK,r&&(this.storage.state=i,this.storage.bubbleMenuOptions=t),!0},editLinkInBubbleMenu:()=>({dispatch:t})=>{const e=this.storage.state,n=Zn.EDIT_LINK;return e===n?!1:(t&&(this.storage.state=n),!0)},closeLinkBubbleMenu:()=>({commands:t,dispatch:e})=>this.storage.state===Zn.HIDDEN?!1:(t.focus(),e&&(this.storage.state=Zn.HIDDEN),!0)}},onSelectionUpdate(){this.storage.state===Zn.EDIT_LINK?this.editor.commands.closeLinkBubbleMenu():this.storage.state===Zn.VIEW_LINK_DETAILS&&!this.editor.isActive("link")&&this.editor.commands.closeLinkBubbleMenu()},addKeyboardShortcuts(){return{"Mod-Shift-u":()=>(this.editor.commands.openLinkBubbleMenu(),!0)}},addProseMirrorPlugins(){return[new en({key:new gn("handleClickLinkForMenu"),props:{handleClick:(t,e,n)=>{const r=Yx(t.state,"link");return n.target.closest("a")&&r.href&&this.storage.state===Zn.HIDDEN?this.editor.commands.openLinkBubbleMenu():this.editor.commands.closeLinkBubbleMenu(),!1}}})]}});function KP(t,e){const n=J.useRef(e);J.useEffect(()=>{n.current=e},[e]),J.useEffect(()=>{function r(o){t===o.key&&n.current(o)}return document.addEventListener("keydown",r),()=>{document.removeEventListener("keydown",r)}},[t])}/*!
334
+ * encodeurl
335
+ * Copyright(c) 2016 Douglas Christopher Wilson
336
+ * MIT Licensed
337
+ */var $b,HO;function Xne(){if(HO)return $b;HO=1,$b=r;var t=/(?:[^\x21\x25\x26-\x3B\x3D\x3F-\x5B\x5D\x5F\x61-\x7A\x7E]|%(?:[^0-9A-Fa-f]|[0-9A-Fa-f][^0-9A-Fa-f]|$))+/g,e=/(^|[^\uD800-\uDBFF])[\uDC00-\uDFFF]|[\uD800-\uDBFF]([^\uDC00-\uDFFF]|$)/g,n="$1�$2";function r(o){return String(o).replace(e,n).replace(t,encodeURI)}return $b}var Qne=Xne();const ere=rr(Qne);function YP(t){let e=t.trim();return e&&!/^(https?:\/\/|mailto:|tel:|sms:|\/|#)/.test(e)&&(e=`http://${e}`),ere(e)}function tre({editor:t,onCancel:e,onSave:n,labels:r,formatHref:o=YP}){var i,s,a,l,u,f;const h=t.isActive("link")?t.getAttributes("link").href:"",m=fu(t.state.selection.$from,fo("link",t.schema)),g=m?t.state.doc.textBetween(m.from,m.to):"",b=t.state.doc.textBetween(t.state.selection.$from.pos,t.state.selection.$to.pos),y=g||b,[S,C]=J.useState(y),[E,T]=J.useState(h),w=J.useRef(null),M=J.useRef(null),R=!h,_=(i=r==null?void 0:r.editLinkAddTitle)!==null&&i!==void 0?i:"Add link",I=(s=r==null?void 0:r.editLinkEditTitle)!==null&&s!==void 0?s:"Edit link",N=R?_:I;J.useEffect(()=>{var z,V;!R||!y?(z=w.current)===null||z===void 0||z.focus():(V=M.current)===null||V===void 0||V.focus()},[R,y]),KP("Escape",e);function O(){M.current&&T(o(M.current.value))}const[A,L]=J.useState(!1);return v.jsxs("form",{onSubmit:z=>{var V,$,F,W;z.preventDefault(),z.stopPropagation(),L(!0);const U=($=(V=w.current)===null||V===void 0?void 0:V.value)!==null&&$!==void 0?$:"",G=(W=(F=M.current)===null||F===void 0?void 0:F.value)!==null&&W!==void 0?W:"";n({text:U,link:G}),L(!1)},autoComplete:"off",children:[v.jsx(j.Typography,{variant:"h6",children:N}),v.jsx(j.TextField,{inputRef:w,value:S,disabled:A,onChange:z=>{C(z.target.value)},label:(a=r==null?void 0:r.editLinkTextInputLabel)!==null&&a!==void 0?a:"Text",margin:"normal",size:"small",fullWidth:!0,required:!0}),v.jsx(j.TextField,{inputRef:M,value:E,onChange:z=>{T(z.target.value)},disabled:A,label:(l=r==null?void 0:r.editLinkHrefInputLabel)!==null&&l!==void 0?l:"Link",margin:"dense",size:"small",type:"text",onBlur:O,onKeyDown:z=>{z.key==="Enter"&&O()},fullWidth:!0,required:!0}),v.jsxs(j.DialogActions,{sx:{px:0},children:[v.jsx(j.Button,{onClick:e,variant:"outlined",size:"small",children:(u=r==null?void 0:r.editLinkCancelButtonLabel)!==null&&u!==void 0?u:"Cancel"}),v.jsx(j.Button,{type:"submit",color:"primary",variant:"outlined",size:"small",disabled:A,children:(f=r==null?void 0:r.editLinkSaveButtonLabel)!==null&&f!==void 0?f:"Save"})]})]})}var Fb,WO;function nre(){if(WO)return Fb;WO=1;var t=WP();function e(n,r,o){var i=n.length;return o=o===void 0?i:o,!r&&o>=i?n:t(n,r,o)}return Fb=e,Fb}var Bb,qO;function c1(){if(qO)return Bb;qO=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",o=e+n+r,i="\\ufe0e\\ufe0f",s="\\u200d",a=RegExp("["+s+t+o+i+"]");function l(u){return a.test(u)}return Bb=l,Bb}var Vb,UO;function rre(){if(UO)return Vb;UO=1;var t=Us(),e=Xi(),n="[object RegExp]";function r(o){return e(o)&&t(o)==n}return Vb=r,Vb}var zb,KO;function ore(){if(KO)return zb;KO=1;var t=rre(),e=sh(),n=ah(),r=n&&n.isRegExp,o=r?e(r):t;return zb=o,zb}var Hb,YO;function ire(){if(YO)return Hb;YO=1;function t(e){return function(n){return n==null?void 0:n[e]}}return Hb=t,Hb}var Wb,GO;function sre(){if(GO)return Wb;GO=1;var t=ire(),e=t("length");return Wb=e,Wb}var qb,JO;function are(){if(JO)return qb;JO=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",o=e+n+r,i="\\ufe0e\\ufe0f",s="["+t+"]",a="["+o+"]",l="\\ud83c[\\udffb-\\udfff]",u="(?:"+a+"|"+l+")",f="[^"+t+"]",h="(?:\\ud83c[\\udde6-\\uddff]){2}",m="[\\ud800-\\udbff][\\udc00-\\udfff]",g="\\u200d",b=u+"?",y="["+i+"]?",S="(?:"+g+"(?:"+[f,h,m].join("|")+")"+y+b+")*",C=y+b+S,E="(?:"+[f+a+"?",a,h,m,s].join("|")+")",T=RegExp(l+"(?="+l+")|"+E+C,"g");function w(M){for(var R=T.lastIndex=0;T.test(M);)++R;return R}return qb=w,qb}var Ub,ZO;function lre(){if(ZO)return Ub;ZO=1;var t=sre(),e=c1(),n=are();function r(o){return e(o)?n(o):t(o)}return Ub=r,Ub}var Kb,XO;function cre(){if(XO)return Kb;XO=1;function t(e){return e.split("")}return Kb=t,Kb}var Yb,QO;function ure(){if(QO)return Yb;QO=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",o=e+n+r,i="\\ufe0e\\ufe0f",s="["+t+"]",a="["+o+"]",l="\\ud83c[\\udffb-\\udfff]",u="(?:"+a+"|"+l+")",f="[^"+t+"]",h="(?:\\ud83c[\\udde6-\\uddff]){2}",m="[\\ud800-\\udbff][\\udc00-\\udfff]",g="\\u200d",b=u+"?",y="["+i+"]?",S="(?:"+g+"(?:"+[f,h,m].join("|")+")"+y+b+")*",C=y+b+S,E="(?:"+[f+a+"?",a,h,m,s].join("|")+")",T=RegExp(l+"(?="+l+")|"+E+C,"g");function w(M){return M.match(T)||[]}return Yb=w,Yb}var Gb,eR;function dre(){if(eR)return Gb;eR=1;var t=cre(),e=c1(),n=ure();function r(o){return e(o)?n(o):t(o)}return Gb=r,Gb}var Jb,tR;function fre(){if(tR)return Jb;tR=1;var t=tI(),e=1/0,n=17976931348623157e292;function r(o){if(!o)return o===0?o:0;if(o=t(o),o===e||o===-e){var i=o<0?-1:1;return i*n}return o===o?o:0}return Jb=r,Jb}var Zb,nR;function pre(){if(nR)return Zb;nR=1;var t=fre();function e(n){var r=t(n),o=r%1;return r===r?o?r-o:r:0}return Zb=e,Zb}var Xb,rR;function hre(){if(rR)return Xb;rR=1;var t=VP(),e=nre(),n=c1(),r=di(),o=ore(),i=lre(),s=dre(),a=pre(),l=zP(),u=30,f="...",h=/\w*$/;function m(g,b){var y=u,S=f;if(r(b)){var C="separator"in b?b.separator:C;y="length"in b?a(b.length):y,S="omission"in b?t(b.omission):S}g=l(g);var E=g.length;if(n(g)){var T=s(g);E=T.length}if(y>=E)return g;var w=y-i(S);if(w<1)return S;var M=T?e(T,0,w).join(""):g.slice(0,w);if(C===void 0)return M+S;if(T&&(w+=M.length-w),o(C)){if(g.slice(w).search(C)){var R,_=M;for(C.global||(C=RegExp(C.source,l(h.exec(C))+"g")),C.lastIndex=0;R=C.exec(_);)var I=R.index;M=M.slice(0,I===void 0?w:I)}}else if(g.indexOf(t(C),w)!=w){var N=M.lastIndexOf(C);N>-1&&(M=M.slice(0,N))}return M+S}return Xb=m,Xb}var mre=hre();const gre=rr(mre);function yre(t,e=20){if(t.length<=e)return t;const n=Math.floor(e/2);return`${t.slice(0,n).trim()}…${t.slice(-n).trim()}`}const bre=Kt({name:{ViewLinkMenuContent:GP}})({linkPreviewText:{overflowWrap:"anywhere"}});function GP({editor:t,onCancel:e,onEdit:n,onRemove:r,labels:o}){var i,s,a;const{classes:l}=bre(),u=fu(t.state.selection.$to,fo("link",t.schema)),f=u?t.state.doc.textBetween(u.from,u.to):"",h=(i=t.getAttributes("link").href)!==null&&i!==void 0?i:"";return KP("Escape",e),v.jsxs(v.Fragment,{children:[v.jsx("div",{className:l.linkPreviewText,children:gre(f,{length:50,omission:"…"})}),v.jsx("div",{className:l.linkPreviewText,children:v.jsx(j.Link,{href:h,target:"_blank",rel:"noopener",children:yre(h,50)})}),v.jsxs(j.DialogActions,{sx:{px:0},children:[v.jsx(j.Button,{onClick:n,color:"primary",variant:"outlined",size:"small",children:(s=o==null?void 0:o.viewLinkEditButtonLabel)!==null&&s!==void 0?s:"Edit"}),v.jsx(j.Button,{onClick:r,color:"error",variant:"outlined",size:"small",children:(a=o==null?void 0:o.viewLinkRemoveButtonLabel)!==null&&a!==void 0?a:"Remove"})]})]})}const vre=Kt({name:{LinkBubbleMenu:JP}})(t=>({content:{padding:t.spacing(1.5,2,.5)}}));function JP({labels:t,formatHref:e,...n}){const{classes:r}=vre(),o=bt();if(!(o!=null&&o.isEditable))return null;if(!("linkBubbleMenuHandler"in o.storage))throw new Error("You must add the LinkBubbleMenuHandler extension to the useEditor `extensions` array in order to use this component!");const i=o.storage.linkBubbleMenuHandler,s=i.state;let a=null;return s===Zn.VIEW_LINK_DETAILS?a=v.jsx(GP,{editor:o,onCancel:o.commands.closeLinkBubbleMenu,onEdit:o.commands.editLinkInBubbleMenu,onRemove:()=>{o.chain().unsetLink().setTextSelection(o.state.selection.to).focus().run()},labels:t}):s===Zn.EDIT_LINK&&(a=v.jsx(tre,{editor:o,onCancel:o.commands.closeLinkBubbleMenu,onSave:({text:l,link:u})=>{o.chain().extendMarkRange("link").insertContent({type:"text",marks:[{type:"link",attrs:{href:u}}],text:l}).setLink({href:u}).focus().run(),o.commands.closeLinkBubbleMenu()},labels:t,formatHref:e})),v.jsx(lh,{editor:o,open:s!==Zn.HIDDEN,...i.bubbleMenuOptions,...n,children:v.jsx("div",{className:r.content,children:a})})}const Qb=Zs("MenuBar",["root","sticky","nonSticky","content"]),xre=Kt({name:{MenuBar:ZP}})((t,{stickyOffset:e})=>({root:{borderBottomColor:t.palette.divider,borderBottomStyle:"solid",borderBottomWidth:1},sticky:{position:"sticky",top:e??0,zIndex:Nf.MENU_BAR,background:t.palette.background.default},nonSticky:{},content:{}}));function ZP({hide:t,disableSticky:e,stickyOffset:n,children:r,className:o,classes:i}){const{classes:s,cx:a}=xre({stickyOffset:n},{props:{classes:i}});return v.jsx(j.Collapse,{in:!t,unmountOnExit:!0,className:a(Qb.root,s.root,e?[Qb.nonSticky,s.nonSticky]:[Qb.sticky,s.sticky],o),children:v.jsx("div",{className:s.content,children:r})})}const Sre=Kt({name:{MenuDivider:wn}})(t=>({root:{height:18,margin:t.spacing(0,.5)}}));function wn(t){const{classes:e,cx:n}=Sre();return v.jsx(j.Divider,{orientation:"vertical",...t,className:n(e.root,t.className)})}var Cre="tippy-box",XP="tippy-content",wre="tippy-backdrop",QP="tippy-arrow",e_="tippy-svg-arrow",Ss={passive:!0,capture:!0},t_=function(){return document.body};function Tre(t,e){return{}.hasOwnProperty.call(t,e)}function ev(t,e,n){if(Array.isArray(t)){var r=t[e];return r??(Array.isArray(n)?n[e]:n)}return t}function u1(t,e){var n={}.toString.call(t);return n.indexOf("[object")===0&&n.indexOf(e+"]")>-1}function n_(t,e){return typeof t=="function"?t.apply(void 0,e):t}function oR(t,e){if(e===0)return t;var n;return function(r){clearTimeout(n),n=setTimeout(function(){t(r)},e)}}function Ere(t,e){var n=Object.assign({},t);return e.forEach(function(r){delete n[r]}),n}function kre(t){return t.split(/\s+/).filter(Boolean)}function Da(t){return[].concat(t)}function iR(t,e){t.indexOf(e)===-1&&t.push(e)}function Mre(t){return t.filter(function(e,n){return t.indexOf(e)===n})}function Ore(t){return t.split("-")[0]}function Lf(t){return[].slice.call(t)}function sR(t){return Object.keys(t).reduce(function(e,n){return t[n]!==void 0&&(e[n]=t[n]),e},{})}function gc(){return document.createElement("div")}function zc(t){return["Element","Fragment"].some(function(e){return u1(t,e)})}function Rre(t){return u1(t,"NodeList")}function Are(t){return u1(t,"MouseEvent")}function Ire(t){return!!(t&&t._tippy&&t._tippy.reference===t)}function Dre(t){return zc(t)?[t]:Rre(t)?Lf(t):Array.isArray(t)?t:Lf(document.querySelectorAll(t))}function tv(t,e){t.forEach(function(n){n&&(n.style.transitionDuration=e+"ms")})}function aR(t,e){t.forEach(function(n){n&&n.setAttribute("data-state",e)})}function Pre(t){var e,n=Da(t),r=n[0];return r!=null&&(e=r.ownerDocument)!=null&&e.body?r.ownerDocument:document}function _re(t,e){var n=e.clientX,r=e.clientY;return t.every(function(o){var i=o.popperRect,s=o.popperState,a=o.props,l=a.interactiveBorder,u=Ore(s.placement),f=s.modifiersData.offset;if(!f)return!0;var h=u==="bottom"?f.top.y:0,m=u==="top"?f.bottom.y:0,g=u==="right"?f.left.x:0,b=u==="left"?f.right.x:0,y=i.top-r+h>l,S=r-i.bottom-m>l,C=i.left-n+g>l,E=n-i.right-b>l;return y||S||C||E})}function nv(t,e,n){var r=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(o){t[r](o,n)})}function lR(t,e){for(var n=e;n;){var r;if(t.contains(n))return!0;n=n.getRootNode==null||(r=n.getRootNode())==null?void 0:r.host}return!1}var To={isTouch:!1},cR=0;function Nre(){To.isTouch||(To.isTouch=!0,window.performance&&document.addEventListener("mousemove",r_))}function r_(){var t=performance.now();t-cR<20&&(To.isTouch=!1,document.removeEventListener("mousemove",r_)),cR=t}function Lre(){var t=document.activeElement;if(Ire(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}function jre(){document.addEventListener("touchstart",Nre,Ss),window.addEventListener("blur",Lre)}var $re=typeof window<"u"&&typeof document<"u",Fre=$re?!!window.msCrypto:!1;function Ea(t){var e=t==="destroy"?"n already-":" ";return[t+"() was called on a"+e+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function uR(t){var e=/[ \t]{2,}/g,n=/^[ \t]*/gm;return t.replace(e," ").replace(n,"").trim()}function Bre(t){return uR(`
338
+ %ctippy.js
339
+
340
+ %c`+uR(t)+`
341
+
342
+ %c👷‍ This is a development-only message. It will be removed in production.
343
+ `)}function o_(t){return[Bre(t),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}var Hc;process.env.NODE_ENV!=="production"&&Vre();function Vre(){Hc=new Set}function ti(t,e){if(t&&!Hc.has(e)){var n;Hc.add(e),(n=console).warn.apply(n,o_(e))}}function s0(t,e){if(t&&!Hc.has(e)){var n;Hc.add(e),(n=console).error.apply(n,o_(e))}}function zre(t){var e=!t,n=Object.prototype.toString.call(t)==="[object Object]"&&!t.addEventListener;s0(e,["tippy() was passed","`"+String(t)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),s0(n,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}var i_={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Hre={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},Er=Object.assign({appendTo:t_,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},i_,Hre),Wre=Object.keys(Er),qre=function(e){process.env.NODE_ENV!=="production"&&a_(e,[]);var n=Object.keys(e);n.forEach(function(r){Er[r]=e[r]})};function s_(t){var e=t.plugins||[],n=e.reduce(function(r,o){var i=o.name,s=o.defaultValue;if(i){var a;r[i]=t[i]!==void 0?t[i]:(a=Er[i])!=null?a:s}return r},{});return Object.assign({},t,n)}function Ure(t,e){var n=e?Object.keys(s_(Object.assign({},Er,{plugins:e}))):Wre,r=n.reduce(function(o,i){var s=(t.getAttribute("data-tippy-"+i)||"").trim();if(!s)return o;if(i==="content")o[i]=s;else try{o[i]=JSON.parse(s)}catch{o[i]=s}return o},{});return r}function dR(t,e){var n=Object.assign({},e,{content:n_(e.content,[t])},e.ignoreAttributes?{}:Ure(t,e.plugins));return n.aria=Object.assign({},Er.aria,n.aria),n.aria={expanded:n.aria.expanded==="auto"?e.interactive:n.aria.expanded,content:n.aria.content==="auto"?e.interactive?null:"describedby":n.aria.content},n}function a_(t,e){t===void 0&&(t={}),e===void 0&&(e=[]);var n=Object.keys(t);n.forEach(function(r){var o=Ere(Er,Object.keys(i_)),i=!Tre(o,r);i&&(i=e.filter(function(s){return s.name===r}).length===0),ti(i,["`"+r+"`","is not a valid prop. You may have spelled it incorrectly, or if it's","a plugin, forgot to pass it in an array as props.plugins.",`
344
+
345
+ `,`All props: https://atomiks.github.io/tippyjs/v6/all-props/
346
+ `,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var Kre=function(){return"innerHTML"};function a0(t,e){t[Kre()]=e}function fR(t){var e=gc();return t===!0?e.className=QP:(e.className=e_,zc(t)?e.appendChild(t):a0(e,t)),e}function pR(t,e){zc(e.content)?(a0(t,""),t.appendChild(e.content)):typeof e.content!="function"&&(e.allowHTML?a0(t,e.content):t.textContent=e.content)}function l0(t){var e=t.firstElementChild,n=Lf(e.children);return{box:e,content:n.find(function(r){return r.classList.contains(XP)}),arrow:n.find(function(r){return r.classList.contains(QP)||r.classList.contains(e_)}),backdrop:n.find(function(r){return r.classList.contains(wre)})}}function l_(t){var e=gc(),n=gc();n.className=Cre,n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=gc();r.className=XP,r.setAttribute("data-state","hidden"),pR(r,t.props),e.appendChild(n),n.appendChild(r),o(t.props,t.props);function o(i,s){var a=l0(e),l=a.box,u=a.content,f=a.arrow;s.theme?l.setAttribute("data-theme",s.theme):l.removeAttribute("data-theme"),typeof s.animation=="string"?l.setAttribute("data-animation",s.animation):l.removeAttribute("data-animation"),s.inertia?l.setAttribute("data-inertia",""):l.removeAttribute("data-inertia"),l.style.maxWidth=typeof s.maxWidth=="number"?s.maxWidth+"px":s.maxWidth,s.role?l.setAttribute("role",s.role):l.removeAttribute("role"),(i.content!==s.content||i.allowHTML!==s.allowHTML)&&pR(u,t.props),s.arrow?f?i.arrow!==s.arrow&&(l.removeChild(f),l.appendChild(fR(s.arrow))):l.appendChild(fR(s.arrow)):f&&l.removeChild(f)}return{popper:e,onUpdate:o}}l_.$$tippy=!0;var Yre=1,kd=[],rv=[];function Gre(t,e){var n=dR(t,Object.assign({},Er,s_(sR(e)))),r,o,i,s=!1,a=!1,l=!1,u=!1,f,h,m,g=[],b=oR(le,n.interactiveDebounce),y,S=Yre++,C=null,E=Mre(n.plugins),T={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},w={id:S,reference:t,popper:gc(),popperInstance:C,props:n,state:T,plugins:E,clearDelayTimeouts:yn,setProps:tn,setContent:Dt,show:Sn,hide:jn,hideWithInteractivity:ut,enable:vt,disable:Yt,unmount:An,destroy:Vt};if(!n.render)return process.env.NODE_ENV!=="production"&&s0(!0,"render() function has not been supplied."),w;var M=n.render(w),R=M.popper,_=M.onUpdate;R.setAttribute("data-tippy-root",""),R.id="tippy-"+w.id,w.popper=R,t._tippy=w,R._tippy=w;var I=E.map(function(de){return de.fn(w)}),N=t.hasAttribute("aria-expanded");return he(),Y(),W(),U("onCreate",[w]),n.showOnCreate&&Ie(),R.addEventListener("mouseenter",function(){w.props.interactive&&w.state.isVisible&&w.clearDelayTimeouts()}),R.addEventListener("mouseleave",function(){w.props.interactive&&w.props.trigger.indexOf("mouseenter")>=0&&V().addEventListener("mousemove",b)}),w;function O(){var de=w.props.touch;return Array.isArray(de)?de:[de,0]}function A(){return O()[0]==="hold"}function L(){var de;return!!((de=w.props.render)!=null&&de.$$tippy)}function z(){return y||t}function V(){var de=z().parentNode;return de?Pre(de):document}function $(){return l0(R)}function F(de){return w.state.isMounted&&!w.state.isVisible||To.isTouch||f&&f.type==="focus"?0:ev(w.props.delay,de?0:1,Er.delay)}function W(de){de===void 0&&(de=!1),R.style.pointerEvents=w.props.interactive&&!de?"":"none",R.style.zIndex=""+w.props.zIndex}function U(de,Ne,Ee){if(Ee===void 0&&(Ee=!0),I.forEach(function(We){We[de]&&We[de].apply(We,Ne)}),Ee){var Le;(Le=w.props)[de].apply(Le,Ne)}}function G(){var de=w.props.aria;if(de.content){var Ne="aria-"+de.content,Ee=R.id,Le=Da(w.props.triggerTarget||t);Le.forEach(function(We){var et=We.getAttribute(Ne);if(w.state.isVisible)We.setAttribute(Ne,et?et+" "+Ee:Ee);else{var Ot=et&&et.replace(Ee,"").trim();Ot?We.setAttribute(Ne,Ot):We.removeAttribute(Ne)}})}}function Y(){if(!(N||!w.props.aria.expanded)){var de=Da(w.props.triggerTarget||t);de.forEach(function(Ne){w.props.interactive?Ne.setAttribute("aria-expanded",w.state.isVisible&&Ne===z()?"true":"false"):Ne.removeAttribute("aria-expanded")})}}function Z(){V().removeEventListener("mousemove",b),kd=kd.filter(function(de){return de!==b})}function me(de){if(!(To.isTouch&&(l||de.type==="mousedown"))){var Ne=de.composedPath&&de.composedPath()[0]||de.target;if(!(w.props.interactive&&lR(R,Ne))){if(Da(w.props.triggerTarget||t).some(function(Ee){return lR(Ee,Ne)})){if(To.isTouch||w.state.isVisible&&w.props.trigger.indexOf("click")>=0)return}else U("onClickOutside",[w,de]);w.props.hideOnClick===!0&&(w.clearDelayTimeouts(),w.hide(),a=!0,setTimeout(function(){a=!1}),w.state.isMounted||ue())}}}function fe(){l=!0}function pe(){l=!1}function re(){var de=V();de.addEventListener("mousedown",me,!0),de.addEventListener("touchend",me,Ss),de.addEventListener("touchstart",pe,Ss),de.addEventListener("touchmove",fe,Ss)}function ue(){var de=V();de.removeEventListener("mousedown",me,!0),de.removeEventListener("touchend",me,Ss),de.removeEventListener("touchstart",pe,Ss),de.removeEventListener("touchmove",fe,Ss)}function ae(de,Ne){Q(de,function(){!w.state.isVisible&&R.parentNode&&R.parentNode.contains(R)&&Ne()})}function K(de,Ne){Q(de,Ne)}function Q(de,Ne){var Ee=$().box;function Le(We){We.target===Ee&&(nv(Ee,"remove",Le),Ne())}if(de===0)return Ne();nv(Ee,"remove",h),nv(Ee,"add",Le),h=Le}function ie(de,Ne,Ee){Ee===void 0&&(Ee=!1);var Le=Da(w.props.triggerTarget||t);Le.forEach(function(We){We.addEventListener(de,Ne,Ee),g.push({node:We,eventType:de,handler:Ne,options:Ee})})}function he(){A()&&(ie("touchstart",se,{passive:!0}),ie("touchend",ge,{passive:!0})),kre(w.props.trigger).forEach(function(de){if(de!=="manual")switch(ie(de,se),de){case"mouseenter":ie("mouseleave",ge);break;case"focus":ie(Fre?"focusout":"blur",we);break;case"focusin":ie("focusout",we);break}})}function ee(){g.forEach(function(de){var Ne=de.node,Ee=de.eventType,Le=de.handler,We=de.options;Ne.removeEventListener(Ee,Le,We)}),g=[]}function se(de){var Ne,Ee=!1;if(!(!w.state.isEnabled||xe(de)||a)){var Le=((Ne=f)==null?void 0:Ne.type)==="focus";f=de,y=de.currentTarget,Y(),!w.state.isVisible&&Are(de)&&kd.forEach(function(We){return We(de)}),de.type==="click"&&(w.props.trigger.indexOf("mouseenter")<0||s)&&w.props.hideOnClick!==!1&&w.state.isVisible?Ee=!0:Ie(de),de.type==="click"&&(s=!Ee),Ee&&!Le&&it(de)}}function le(de){var Ne=de.target,Ee=z().contains(Ne)||R.contains(Ne);if(!(de.type==="mousemove"&&Ee)){var Le=Ye().concat(R).map(function(We){var et,Ot=We._tippy,Kn=(et=Ot.popperInstance)==null?void 0:et.state;return Kn?{popperRect:We.getBoundingClientRect(),popperState:Kn,props:n}:null}).filter(Boolean);_re(Le,de)&&(Z(),it(de))}}function ge(de){var Ne=xe(de)||w.props.trigger.indexOf("click")>=0&&s;if(!Ne){if(w.props.interactive){w.hideWithInteractivity(de);return}it(de)}}function we(de){w.props.trigger.indexOf("focusin")<0&&de.target!==z()||w.props.interactive&&de.relatedTarget&&R.contains(de.relatedTarget)||it(de)}function xe(de){return To.isTouch?A()!==de.type.indexOf("touch")>=0:!1}function Me(){_e();var de=w.props,Ne=de.popperOptions,Ee=de.placement,Le=de.offset,We=de.getReferenceClientRect,et=de.moveTransition,Ot=L()?l0(R).arrow:null,Kn=We?{getBoundingClientRect:We,contextElement:We.contextElement||z()}:t,or={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(Qs){var pi=Qs.state;if(L()){var vu=$(),gl=vu.box;["placement","reference-hidden","escaped"].forEach(function(ea){ea==="placement"?gl.setAttribute("data-placement",pi.placement):pi.attributes.popper["data-popper-"+ea]?gl.setAttribute("data-"+ea,""):gl.removeAttribute("data-"+ea)}),pi.attributes.popper={}}}},Lo=[{name:"offset",options:{offset:Le}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!et}},or];L()&&Ot&&Lo.push({name:"arrow",options:{element:Ot,padding:3}}),Lo.push.apply(Lo,(Ne==null?void 0:Ne.modifiers)||[]),w.popperInstance=i2(Kn,R,Object.assign({},Ne,{placement:Ee,onFirstUpdate:m,modifiers:Lo}))}function _e(){w.popperInstance&&(w.popperInstance.destroy(),w.popperInstance=null)}function Ve(){var de=w.props.appendTo,Ne,Ee=z();w.props.interactive&&de===t_||de==="parent"?Ne=Ee.parentNode:Ne=n_(de,[Ee]),Ne.contains(R)||Ne.appendChild(R),w.state.isMounted=!0,Me(),process.env.NODE_ENV!=="production"&&ti(w.props.interactive&&de===Er.appendTo&&Ee.nextElementSibling!==R,["Interactive tippy element may not be accessible via keyboard","navigation because it is not directly after the reference element","in the DOM source order.",`
347
+
348
+ `,"Using a wrapper <div> or <span> tag around the reference element","solves this by creating a new parentNode context.",`
349
+
350
+ `,"Specifying `appendTo: document.body` silences this warning, but it","assumes you are using a focus management solution to handle","keyboard navigation.",`
351
+
352
+ `,"See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "))}function Ye(){return Lf(R.querySelectorAll("[data-tippy-root]"))}function Ie(de){w.clearDelayTimeouts(),de&&U("onTrigger",[w,de]),re();var Ne=F(!0),Ee=O(),Le=Ee[0],We=Ee[1];To.isTouch&&Le==="hold"&&We&&(Ne=We),Ne?r=setTimeout(function(){w.show()},Ne):w.show()}function it(de){if(w.clearDelayTimeouts(),U("onUntrigger",[w,de]),!w.state.isVisible){ue();return}if(!(w.props.trigger.indexOf("mouseenter")>=0&&w.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(de.type)>=0&&s)){var Ne=F(!1);Ne?o=setTimeout(function(){w.state.isVisible&&w.hide()},Ne):i=requestAnimationFrame(function(){w.hide()})}}function vt(){w.state.isEnabled=!0}function Yt(){w.hide(),w.state.isEnabled=!1}function yn(){clearTimeout(r),clearTimeout(o),cancelAnimationFrame(i)}function tn(de){if(process.env.NODE_ENV!=="production"&&ti(w.state.isDestroyed,Ea("setProps")),!w.state.isDestroyed){U("onBeforeUpdate",[w,de]),ee();var Ne=w.props,Ee=dR(t,Object.assign({},Ne,sR(de),{ignoreAttributes:!0}));w.props=Ee,he(),Ne.interactiveDebounce!==Ee.interactiveDebounce&&(Z(),b=oR(le,Ee.interactiveDebounce)),Ne.triggerTarget&&!Ee.triggerTarget?Da(Ne.triggerTarget).forEach(function(Le){Le.removeAttribute("aria-expanded")}):Ee.triggerTarget&&t.removeAttribute("aria-expanded"),Y(),W(),_&&_(Ne,Ee),w.popperInstance&&(Me(),Ye().forEach(function(Le){requestAnimationFrame(Le._tippy.popperInstance.forceUpdate)})),U("onAfterUpdate",[w,de])}}function Dt(de){w.setProps({content:de})}function Sn(){process.env.NODE_ENV!=="production"&&ti(w.state.isDestroyed,Ea("show"));var de=w.state.isVisible,Ne=w.state.isDestroyed,Ee=!w.state.isEnabled,Le=To.isTouch&&!w.props.touch,We=ev(w.props.duration,0,Er.duration);if(!(de||Ne||Ee||Le)&&!z().hasAttribute("disabled")&&(U("onShow",[w],!1),w.props.onShow(w)!==!1)){if(w.state.isVisible=!0,L()&&(R.style.visibility="visible"),W(),re(),w.state.isMounted||(R.style.transition="none"),L()){var et=$(),Ot=et.box,Kn=et.content;tv([Ot,Kn],0)}m=function(){var Lo;if(!(!w.state.isVisible||u)){if(u=!0,R.offsetHeight,R.style.transition=w.props.moveTransition,L()&&w.props.animation){var ml=$(),Qs=ml.box,pi=ml.content;tv([Qs,pi],We),aR([Qs,pi],"visible")}G(),Y(),iR(rv,w),(Lo=w.popperInstance)==null||Lo.forceUpdate(),U("onMount",[w]),w.props.animation&&L()&&K(We,function(){w.state.isShown=!0,U("onShown",[w])})}},Ve()}}function jn(){process.env.NODE_ENV!=="production"&&ti(w.state.isDestroyed,Ea("hide"));var de=!w.state.isVisible,Ne=w.state.isDestroyed,Ee=!w.state.isEnabled,Le=ev(w.props.duration,1,Er.duration);if(!(de||Ne||Ee)&&(U("onHide",[w],!1),w.props.onHide(w)!==!1)){if(w.state.isVisible=!1,w.state.isShown=!1,u=!1,s=!1,L()&&(R.style.visibility="hidden"),Z(),ue(),W(!0),L()){var We=$(),et=We.box,Ot=We.content;w.props.animation&&(tv([et,Ot],Le),aR([et,Ot],"hidden"))}G(),Y(),w.props.animation?L()&&ae(Le,w.unmount):w.unmount()}}function ut(de){process.env.NODE_ENV!=="production"&&ti(w.state.isDestroyed,Ea("hideWithInteractivity")),V().addEventListener("mousemove",b),iR(kd,b),b(de)}function An(){process.env.NODE_ENV!=="production"&&ti(w.state.isDestroyed,Ea("unmount")),w.state.isVisible&&w.hide(),w.state.isMounted&&(_e(),Ye().forEach(function(de){de._tippy.unmount()}),R.parentNode&&R.parentNode.removeChild(R),rv=rv.filter(function(de){return de!==w}),w.state.isMounted=!1,U("onHidden",[w]))}function Vt(){process.env.NODE_ENV!=="production"&&ti(w.state.isDestroyed,Ea("destroy")),!w.state.isDestroyed&&(w.clearDelayTimeouts(),w.unmount(),ee(),delete t._tippy,w.state.isDestroyed=!0,U("onDestroy",[w]))}}function mu(t,e){e===void 0&&(e={});var n=Er.plugins.concat(e.plugins||[]);process.env.NODE_ENV!=="production"&&(zre(t),a_(e,n)),jre();var r=Object.assign({},e,{plugins:n}),o=Dre(t);if(process.env.NODE_ENV!=="production"){var i=zc(r.content),s=o.length>1;ti(i&&s,["tippy() was passed an Element as the `content` prop, but more than","one tippy instance was created by this invocation. This means the","content element will only be appended to the last tippy instance.",`
353
+
354
+ `,"Instead, pass the .innerHTML of the element, or use a function that","returns a cloned version of the element instead.",`
355
+
356
+ `,`1) content: element.innerHTML
357
+ `,"2) content: () => element.cloneNode(true)"].join(" "))}var a=o.reduce(function(l,u){var f=u&&Gre(u,r);return f&&l.push(f),l},[]);return zc(t)?a[0]:a}mu.defaultProps=Er;mu.setDefaultProps=qre;mu.currentInput=To;Object.assign({},ZI,{effect:function(e){var n=e.state,r={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(n.elements.popper.style,r.popper),n.styles=r,n.elements.arrow&&Object.assign(n.elements.arrow.style,r.arrow)}});mu.setDefaultProps({render:l_});function Jre(t){return t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var c0={exports:{}},ov={};/**
358
+ * @license React
359
+ * use-sync-external-store-shim.production.min.js
360
+ *
361
+ * Copyright (c) Facebook, Inc. and its affiliates.
362
+ *
363
+ * This source code is licensed under the MIT license found in the
364
+ * LICENSE file in the root directory of this source tree.
365
+ */var hR;function Zre(){if(hR)return ov;hR=1;var t=J;function e(h,m){return h===m&&(h!==0||1/h===1/m)||h!==h&&m!==m}var n=typeof Object.is=="function"?Object.is:e,r=t.useState,o=t.useEffect,i=t.useLayoutEffect,s=t.useDebugValue;function a(h,m){var g=m(),b=r({inst:{value:g,getSnapshot:m}}),y=b[0].inst,S=b[1];return i(function(){y.value=g,y.getSnapshot=m,l(y)&&S({inst:y})},[h,g,m]),o(function(){return l(y)&&S({inst:y}),h(function(){l(y)&&S({inst:y})})},[h]),s(g),g}function l(h){var m=h.getSnapshot;h=h.value;try{var g=m();return!n(h,g)}catch{return!0}}function u(h,m){return m()}var f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:a;return ov.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:f,ov}var iv={};/**
366
+ * @license React
367
+ * use-sync-external-store-shim.development.js
368
+ *
369
+ * Copyright (c) Facebook, Inc. and its affiliates.
370
+ *
371
+ * This source code is licensed under the MIT license found in the
372
+ * LICENSE file in the root directory of this source tree.
373
+ */var mR;function Xre(){return mR||(mR=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 t=J,e=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(T){{for(var w=arguments.length,M=new Array(w>1?w-1:0),R=1;R<w;R++)M[R-1]=arguments[R];r("error",T,M)}}function r(T,w,M){{var R=e.ReactDebugCurrentFrame,_=R.getStackAddendum();_!==""&&(w+="%s",M=M.concat([_]));var I=M.map(function(N){return String(N)});I.unshift("Warning: "+w),Function.prototype.apply.call(console[T],console,I)}}function o(T,w){return T===w&&(T!==0||1/T===1/w)||T!==T&&w!==w}var i=typeof Object.is=="function"?Object.is:o,s=t.useState,a=t.useEffect,l=t.useLayoutEffect,u=t.useDebugValue,f=!1,h=!1;function m(T,w,M){f||t.startTransition!==void 0&&(f=!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 R=w();if(!h){var _=w();i(R,_)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),h=!0)}var I=s({inst:{value:R,getSnapshot:w}}),N=I[0].inst,O=I[1];return l(function(){N.value=R,N.getSnapshot=w,g(N)&&O({inst:N})},[T,R,w]),a(function(){g(N)&&O({inst:N});var A=function(){g(N)&&O({inst:N})};return T(A)},[T]),u(R),R}function g(T){var w=T.getSnapshot,M=T.value;try{var R=w();return!i(M,R)}catch{return!0}}function b(T,w,M){return w()}var y=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",S=!y,C=S?b:m,E=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:C;iv.useSyncExternalStore=E,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),iv}process.env.NODE_ENV==="production"?c0.exports=Zre():c0.exports=Xre();var ch=c0.exports;const Qre=(...t)=>e=>{t.forEach(n=>{typeof n=="function"?n(e):n&&(n.current=e)})},eoe=({contentComponent:t})=>{const e=ch.useSyncExternalStore(t.subscribe,t.getSnapshot,t.getServerSnapshot);return J.createElement(J.Fragment,null,Object.values(e))};function toe(){const t=new Set;let e={};return{subscribe(n){return t.add(n),()=>{t.delete(n)}},getSnapshot(){return e},getServerSnapshot(){return e},setRenderer(n,r){e={...e,[n]:Ts.createPortal(r.reactElement,r.element,n)},t.forEach(o=>o())},removeRenderer(n){const r={...e};delete r[n],e=r,t.forEach(o=>o())}}}class noe extends J.Component{constructor(e){var n;super(e),this.editorContentRef=J.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:!!(!((n=e.editor)===null||n===void 0)&&n.contentComponent)}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){const e=this.props.editor;if(e&&!e.isDestroyed&&e.options.element){if(e.contentComponent)return;const n=this.editorContentRef.current;n.append(...e.options.element.childNodes),e.setOptions({element:n}),e.contentComponent=toe(),this.state.hasContentComponentInitialized||(this.unsubscribeToContentComponent=e.contentComponent.subscribe(()=>{this.setState(r=>r.hasContentComponentInitialized?r:{hasContentComponentInitialized:!0}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()})),e.createNodeViews(),this.initialized=!0}}componentWillUnmount(){const e=this.props.editor;if(!e||(this.initialized=!1,e.isDestroyed||e.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),e.contentComponent=null,!e.options.element.firstChild))return;const n=document.createElement("div");n.append(...e.options.element.childNodes),e.setOptions({element:n})}render(){const{editor:e,innerRef:n,...r}=this.props;return J.createElement(J.Fragment,null,J.createElement("div",{ref:Qre(n,this.editorContentRef),...r}),(e==null?void 0:e.contentComponent)&&J.createElement(eoe,{contentComponent:e.contentComponent}))}}const roe=J.forwardRef((t,e)=>{const n=J.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[t.editor]);return J.createElement(noe,{key:n,innerRef:e,...t})}),ooe=J.memo(roe);var ioe=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!t(e[o],n[o]))return!1;return!0}if(e instanceof Map&&n instanceof Map){if(e.size!==n.size)return!1;for(o of e.entries())if(!n.has(o[0]))return!1;for(o of e.entries())if(!t(o[1],n.get(o[0])))return!1;return!0}if(e instanceof Set&&n instanceof Set){if(e.size!==n.size)return!1;for(o of e.entries())if(!n.has(o[0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(n)){if(r=e.length,r!=n.length)return!1;for(o=r;o--!==0;)if(e[o]!==n[o])return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(i=Object.keys(e),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 s=i[o];if(!(s==="_owner"&&e.$$typeof)&&!t(e[s],n[s]))return!1}return!0}return e!==e&&n!==n},soe=Jre(ioe),u0={exports:{}},sv={};/**
374
+ * @license React
375
+ * use-sync-external-store-shim/with-selector.production.min.js
376
+ *
377
+ * Copyright (c) Facebook, Inc. and its affiliates.
378
+ *
379
+ * This source code is licensed under the MIT license found in the
380
+ * LICENSE file in the root directory of this source tree.
381
+ */var gR;function aoe(){if(gR)return sv;gR=1;var t=J,e=ch;function n(u,f){return u===f&&(u!==0||1/u===1/f)||u!==u&&f!==f}var r=typeof Object.is=="function"?Object.is:n,o=e.useSyncExternalStore,i=t.useRef,s=t.useEffect,a=t.useMemo,l=t.useDebugValue;return sv.useSyncExternalStoreWithSelector=function(u,f,h,m,g){var b=i(null);if(b.current===null){var y={hasValue:!1,value:null};b.current=y}else y=b.current;b=a(function(){function C(R){if(!E){if(E=!0,T=R,R=m(R),g!==void 0&&y.hasValue){var _=y.value;if(g(_,R))return w=_}return w=R}if(_=w,r(T,R))return _;var I=m(R);return g!==void 0&&g(_,I)?_:(T=R,w=I)}var E=!1,T,w,M=h===void 0?null:h;return[function(){return C(f())},M===null?void 0:function(){return C(M())}]},[f,h,m,g]);var S=o(u,b[0],b[1]);return s(function(){y.hasValue=!0,y.value=S},[S]),l(S),S},sv}var av={};/**
382
+ * @license React
383
+ * use-sync-external-store-shim/with-selector.development.js
384
+ *
385
+ * Copyright (c) Facebook, Inc. and its affiliates.
386
+ *
387
+ * This source code is licensed under the MIT license found in the
388
+ * LICENSE file in the root directory of this source tree.
389
+ */var yR;function loe(){return yR||(yR=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 t=J,e=ch;function n(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var r=typeof Object.is=="function"?Object.is:n,o=e.useSyncExternalStore,i=t.useRef,s=t.useEffect,a=t.useMemo,l=t.useDebugValue;function u(f,h,m,g,b){var y=i(null),S;y.current===null?(S={hasValue:!1,value:null},y.current=S):S=y.current;var C=a(function(){var M=!1,R,_,I=function(L){if(!M){M=!0,R=L;var z=g(L);if(b!==void 0&&S.hasValue){var V=S.value;if(b(V,z))return _=V,V}return _=z,z}var $=R,F=_;if(r($,L))return F;var W=g(L);return b!==void 0&&b(F,W)?F:(R=L,_=W,W)},N=m===void 0?null:m,O=function(){return I(h())},A=N===null?void 0:function(){return I(N())};return[O,A]},[h,m,g,b]),E=C[0],T=C[1],w=o(f,E,T);return s(function(){S.hasValue=!0,S.value=w},[w]),l(w),w}av.useSyncExternalStoreWithSelector=u,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),av}process.env.NODE_ENV==="production"?u0.exports=aoe():u0.exports=loe();var coe=u0.exports;const uoe=typeof window<"u"?J.useLayoutEffect:J.useEffect;class doe{constructor(e){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=e,this.lastSnapshot={editor:e,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(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}watch(e){if(this.editor=e,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 foe(t){var e;const[n]=J.useState(()=>new doe(t.editor)),r=coe.useSyncExternalStoreWithSelector(n.subscribe,n.getSnapshot,n.getServerSnapshot,t.selector,(e=t.equalityFn)!==null&&e!==void 0?e:soe);return uoe(()=>n.watch(t.editor),[t.editor,n]),J.useDebugValue(r),r}const bR=process.env.NODE_ENV!=="production",d0=typeof window>"u",poe=d0||!!(typeof window<"u"&&window.next);class d1{constructor(e){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=e,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(e){this.editor=e,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(n=>n())}getInitialEditor(){if(this.options.current.immediatelyRender===void 0)return d0||poe?(bR&&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&&d0&&bR)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 e={...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 Jee(e)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(e){return this.subscriptions.add(e),()=>{this.subscriptions.delete(e)}}static compareOptions(e,n){return Object.keys(e).every(r=>["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(r)?!0:r==="extensions"&&e.extensions&&n.extensions?e.extensions.length!==n.extensions.length?!1:e.extensions.every((o,i)=>{var s;return o===((s=n.extensions)===null||s===void 0?void 0:s[i])}):e[r]===n[r])}onRender(e){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&e.length===0?d1.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(e),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(e){if(this.editor&&!this.editor.isDestroyed){if(this.previousDeps===null){this.previousDeps=e;return}if(this.previousDeps.length===e.length&&this.previousDeps.every((r,o)=>r===e[o]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=e}scheduleDestroy(){const e=this.instanceId,n=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===e){n&&n.setOptions(this.options.current);return}n&&!n.isDestroyed&&(n.destroy(),this.instanceId===e&&this.setEditor(null))},1)}}function c_(t={},e=[]){const n=J.useRef(t);n.current=t;const[r]=J.useState(()=>new d1(n)),o=ch.useSyncExternalStore(r.subscribe,r.getEditor,r.getServerSnapshot);return J.useDebugValue(o),J.useEffect(r.onRender(e)),foe({editor:o,selector:({transactionNumber:i})=>t.shouldRerenderOnTransaction===!1?null:t.immediatelyRender&&i===0?0:i+1}),o}const hoe=J.createContext({editor:null});hoe.Consumer;const u_=J.createContext({onDragStart:void 0}),d_=()=>J.useContext(u_),moe=t=>{const e=t.as||"div",{nodeViewContentRef:n}=d_();return J.createElement(e,{...t,ref:n,"data-node-view-content":"",style:{whiteSpace:"pre-wrap",...t.style}})},f1=J.forwardRef((t,e)=>{const{onDragStart:n}=d_(),r=t.as||"div";return J.createElement(r,{...t,ref:e,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...t.style}})});function goe(t){return!!(typeof t=="function"&&t.prototype&&t.prototype.isReactComponent)}function yoe(t){var e;return typeof t=="object"&&((e=t.$$typeof)===null||e===void 0?void 0:e.toString())==="Symbol(react.forward_ref)"}class f_{constructor(e,{editor:n,props:r={},as:o="div",className:i=""}){this.ref=null,this.id=Math.floor(Math.random()*4294967295).toString(),this.component=e,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?Ts.flushSync(()=>{this.render()}):this.render()}render(){var e;const n=this.component,r=this.props,o=this.editor;(goe(n)||yoe(n))&&(r.ref=i=>{this.ref=i}),this.reactElement=J.createElement(n,{...r}),(e=o==null?void 0:o.contentComponent)===null||e===void 0||e.setRenderer(this.id,this)}updateProps(e={}){this.props={...this.props,...e},this.render()}destroy(){var e;const n=this.editor;(e=n==null?void 0:n.contentComponent)===null||e===void 0||e.removeRenderer(this.id)}updateAttributes(e){Object.keys(e).forEach(n=>{this.element.setAttribute(n,e[n])})}}class boe extends Zee{mount(){const e={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:(u={})=>this.updateAttributes(u),deleteNode:()=>this.deleteNode()};if(!this.component.displayName){const u=f=>f.charAt(0).toUpperCase()+f.substring(1);this.component.displayName=u(this.extension.name)}const o={onDragStart:this.onDragStart.bind(this),nodeViewContentRef:u=>{u&&this.contentDOMElement&&u.firstChild!==this.contentDOMElement&&u.appendChild(this.contentDOMElement)}},i=this.component,s=J.memo(u=>J.createElement(u_.Provider,{value:o},J.createElement(i,u)));s.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 a=this.node.isInline?"span":"div";this.options.as&&(a=this.options.as);const{className:l=""}=this.options;this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.renderer=new f_(s,{editor:this.editor,props:e,as:a,className:`node-${this.node.type.name} ${l}`.trim()}),this.editor.on("selectionUpdate",this.handleSelectionUpdate),this.updateElementAttributes()}get dom(){var e;if(this.renderer.element.firstElementChild&&!(!((e=this.renderer.element.firstElementChild)===null||e===void 0)&&e.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:e,to:n}=this.editor.state.selection,r=this.getPos();if(typeof r=="number")if(e<=r&&n>=r+this.node.nodeSize){if(this.renderer.props.selected)return;this.selectNode()}else{if(!this.renderer.props.selected)return;this.deselectNode()}}update(e,n,r){const o=i=>{this.renderer.updateProps(i),typeof this.options.attrs=="function"&&this.updateElementAttributes()};if(e.type!==this.node.type)return!1;if(typeof this.options.update=="function"){const i=this.node,s=this.decorations,a=this.innerDecorations;return this.node=e,this.decorations=n,this.innerDecorations=r,this.options.update({oldNode:i,oldDecorations:s,newNode:e,newDecorations:n,oldInnerDecorations:a,innerDecorations:r,updateProps:()=>o({node:e,decorations:n,innerDecorations:r})})}return e===this.node&&this.decorations===n&&this.innerDecorations===r||(this.node=e,this.decorations=n,this.innerDecorations=r,o({node:e,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 e={};if(typeof this.options.attrs=="function"){const n=this.editor.extensionManager.attributes,r=Df(this.node,n);e=this.options.attrs({node:this.node,HTMLAttributes:r})}else e=this.options.attrs;this.renderer.updateAttributes(e)}}}function p1(t,e){return n=>n.editor.contentComponent?new boe(t,n,e):{}}const lv=Zs("RichTextContent",["root","readonly","editable"]),voe=Kt({name:{RichTextContent:h1}})(t=>({root:{"& .ProseMirror":{...qP(t)}},readonly:{},editable:{}}));function h1({className:t,classes:e={}}){const{classes:n,cx:r}=voe(void 0,{props:{classes:e}}),o=bt(),i=J.useMemo(()=>r(lv.root,t,n.root,o!=null&&o.isEditable?[lv.editable,n.editable]:[lv.readonly,n.readonly]),[t,n,r,o==null?void 0:o.isEditable]);return v.jsx(j.Box,{className:i,component:ooe,editor:o})}function p_({editor:t,children:e}){return v.jsx(UP.Provider,{value:t,children:e})}const ka=Zs("FieldContainer",["root","outlined","standard","focused","disabled","notchedOutline"]),xoe=Kt({name:{FieldContainer:h_},uniqId:"Os7ZPW"})((t,e,n)=>({root:{},outlined:{borderRadius:t.shape.borderRadius,padding:1,position:"relative",[`&:hover .${n.notchedOutline}`]:{borderColor:t.palette.text.primary},[`&.${n.focused} .${n.notchedOutline}`]:{borderColor:t.palette.primary.main,borderWidth:2},[`&.${n.disabled} .${n.notchedOutline}`]:{borderColor:t.palette.action.disabled}},standard:{},focused:{},disabled:{},notchedOutline:{position:"absolute",inset:0,borderRadius:"inherit",borderColor:t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)",borderStyle:"solid",borderWidth:1,pointerEvents:"none",overflow:"hidden",zIndex:Nf.NOTCHED_OUTLINE}}));function h_({variant:t="outlined",children:e,focused:n,disabled:r,classes:o={},className:i}){const{classes:s,cx:a}=xoe(void 0,{props:{classes:o}});return v.jsxs("div",{className:a(ka.root,s.root,t==="outlined"?[ka.outlined,s.outlined]:[ka.standard,s.standard],n&&[ka.focused,s.focused],r&&[ka.disabled,s.disabled],i),children:[e,t==="outlined"&&v.jsx("div",{className:a(ka.notchedOutline,s.notchedOutline),"aria-hidden":!0})]})}var Soe=nI();const m_=rr(Soe);function g_({editor:t,wait:e=250}){const[n,r]=J.useState(!!(t!=null&&t.isFocused)),o=J.useMemo(()=>m_(i=>{r(i)},e),[e]);return J.useEffect(()=>{const i=!!(t!=null&&t.isFocused);return o(i),i&&o.flush(),()=>{o.cancel()}},[t==null?void 0:t.isFocused,o]),n}class m1 extends J.Component{constructor(e){var n,r;super(e),this.updateDebounced=m_(this.forceUpdate,(n=e.wait)!==null&&n!==void 0?n:170,(r=e.options)!==null&&r!==void 0?r:{leading:!0,trailing:!0,maxWait:300})}shouldComponentUpdate(){return this.updateDebounced(),!1}componentWillUnmount(){this.updateDebounced.cancel()}render(){return this.props.children}}const Ma=Zs("RichTextField",["root","standard","outlined","menuBar","menuBarContent","content"]),Coe=Kt({name:{RichTextField:y_},uniqId:"E2Alw3"})((t,e,n)=>({root:{},standard:{[`& .${n.content}`]:{padding:t.spacing(1.5,0)},[`& .${n.menuBarContent}`]:{padding:t.spacing(1,0)}},outlined:{[`& .${n.content}`]:{padding:t.spacing(1.5)},[`& .${n.menuBarContent}`]:{padding:t.spacing(1,1.5)}},menuBar:{},menuBarContent:{},content:{}}));function y_({variant:t="outlined",controls:e,disableDebounceRenderControls:n=!1,disabled:r,className:o,classes:i={},footer:s,MenuBarProps:a,RichTextContentProps:l}){var u,f;const{classes:h,cx:m}=Coe(void 0,{props:{classes:i}}),g=bt(),b=g_({editor:g});return v.jsxs(h_,{variant:t,focused:!r&&b,disabled:r,className:m(Ma.root,h.root,t==="outlined"?[Ma.outlined,h.outlined]:[Ma.standard,h.standard],o),children:[e&&v.jsx(ZP,{...a,classes:{...a==null?void 0:a.classes,root:m(Ma.menuBar,h.menuBar,(u=a==null?void 0:a.classes)===null||u===void 0?void 0:u.root),content:m(Ma.content,h.menuBarContent,(f=a==null?void 0:a.classes)===null||f===void 0?void 0:f.content)},children:n?e:v.jsx(m1,{children:e})}),v.jsx(h1,{...l,className:m(Ma.content,h.content,l==null?void 0:l.className)}),s]})}const b_=J.forwardRef(function({className:e,renderControls:n,RichTextFieldProps:r={},children:o,editorDependencies:i=[],editable:s=!0,...a},l){const u=c_({editable:s,...a},i);return J.useImperativeHandle(l,()=>({editor:u}),[u]),J.useEffect(()=>{!u||u.isDestroyed||u.isEditable===s||queueMicrotask(()=>{u.setEditable(s)})},[s,u]),v.jsxs(p_,{editor:u,children:[v.jsx(y_,{disabled:!s,controls:n==null?void 0:n(u),className:e,...r}),o==null?void 0:o(u)]})});function woe(t){const e=c_({...t,editable:!1}),n=J.useRef(t.content);return J.useEffect(()=>{!e||e.isDestroyed||t.content===void 0||t.content===n.current||queueMicrotask(()=>{t.content!==void 0&&e.commands.setContent(t.content)})},[t.content,e]),J.useEffect(()=>{n.current=t.content},[t.content]),v.jsx(p_,{editor:e,children:v.jsx(h1,{})})}function Toe(t){return t.content?v.jsx(woe,{...t}):null}const Eoe=j.createSvgIcon(v.jsxs(v.Fragment,{children:[v.jsx("path",{d:"M20 3H4c-1.103 0-2 .897-2 2v14c0 1.103.897 2 2 2h16c1.103 0 2-.897 2-2V5c0-1.103-.897-2-2-2zM4 19V7h16l.002 12H4z"}),v.jsx("path",{d:"M9.293 9.293 5.586 13l3.707 3.707 1.414-1.414L8.414 13l2.293-2.293zm5.414 0-1.414 1.414L15.586 13l-2.293 2.293 1.414 1.414L18.414 13z"})]}),"CodeBlock"),koe=j.createSvgIcon(v.jsx("path",{d:"M12 3C12.5523 3 13 3.44772 13 4L12.9998 11.9998C13.8355 11.372 14.8743 11 16 11C18.7614 11 21 13.2386 21 16C21 18.7614 18.7614 21 16 21C14.9681 21 14.0092 20.6874 13.2129 20.1518L13 20C13 20.5523 12.5523 21 12 21H6C5.44772 21 5 20.5523 5 20V4C5 3.44772 5.44772 3 6 3H12ZM11 5H7V19H11V5ZM19 15H13V17H19V15Z"}),"DeleteColumn"),Moe=j.createSvgIcon(v.jsx("path",{d:"M20 5C20.5523 5 21 5.44772 21 6V12C21 12.5523 20.5523 13 20 13C20.628 13.8355 21 14.8743 21 16C21 18.7614 18.7614 21 16 21C13.2386 21 11 18.7614 11 16C11 14.8743 11.372 13.8355 11.9998 12.9998L4 13C3.44772 13 3 12.5523 3 12V6C3 5.44772 3.44772 5 4 5H20ZM13 15V17H19V15H13ZM19 7H5V11H19V7Z"}),"DeleteRow"),Ooe=j.createSvgIcon(v.jsx("path",{d:"M 2 20 h 20 v 4 H 2 v -4 z"}),"FormatColorBar"),Roe=j.createSvgIcon(v.jsx("path",{d:"M 5.49 17 h 2.42 l 1.27 -3.58 h 5.65 L 16.09 17 h 2.42 L 13.25 3 h -2.5 L 5.49 17 z m 4.42 -5.61 l 2.03 -5.79 h 0.12 l 2.03 5.79 H 9.91 z"}),"FormatColorTextNoBar"),Aoe=j.createSvgIcon(v.jsx("path",{d:"M 10.6 8 l 5.4 5.425 l -4 4 q -0.6 0.6 -1.413 0.6 t -1.412 -0.6 L 8.5 18 h -5 l 3.15 -3.125 q -0.6 -0.6 -0.625 -1.438 T 6.6 12 l 4 -4 Z M 12 6.575 L 16 2.6 q 0.6 -0.6 1.413 -0.6 t 1.412 0.6 l 2.6 2.575 q 0.6 0.6 0.6 1.413 T 21.425 8 l -4 4 L 12 6.575 Z"}),"FormatInkHighlighterNoBar"),Ioe=j.createSvgIcon(v.jsx("path",{d:"M20 3C20.5523 3 21 3.44772 21 4V20C21 20.5523 20.5523 21 20 21H14C13.4477 21 13 20.5523 13 20V4C13 3.44772 13.4477 3 14 3H20ZM19 5H15V19H19V5ZM6 7C8.76142 7 11 9.23858 11 12C11 14.7614 8.76142 17 6 17C3.23858 17 1 14.7614 1 12C1 9.23858 3.23858 7 6 7ZM7 9H5V10.999L3 11V13L5 12.999V15H7V12.999L9 13V11L7 10.999V9Z"}),"InsertColumnLeft"),Doe=j.createSvgIcon(v.jsx("path",{d:"M10 3C10.5523 3 11 3.44772 11 4V20C11 20.5523 10.5523 21 10 21H4C3.44772 21 3 20.5523 3 20V4C3 3.44772 3.44772 3 4 3H10ZM9 5H5V19H9V5ZM18 7C20.7614 7 23 9.23858 23 12C23 14.7614 20.7614 17 18 17C15.2386 17 13 14.7614 13 12C13 9.23858 15.2386 7 18 7ZM19 9H17V10.999L15 11V13L17 12.999V15H19V12.999L21 13V11L19 10.999V9Z"}),"InsertColumnRight"),Poe=j.createSvgIcon(v.jsx("path",{d:"M12 13C14.7614 13 17 15.2386 17 18C17 20.7614 14.7614 23 12 23C9.23858 23 7 20.7614 7 18C7 15.2386 9.23858 13 12 13ZM13 15H11V16.999L9 17V19L11 18.999V21H13V18.999L15 19V17L13 16.999V15ZM20 3C20.5523 3 21 3.44772 21 4V10C21 10.5523 20.5523 11 20 11H4C3.44772 11 3 10.5523 3 10V4C3 3.44772 3.44772 3 4 3H20ZM5 5V9H19V5H5Z"}),"InsertRowBottom"),_oe=j.createSvgIcon(v.jsx("path",{d:"M20 13C20.5523 13 21 13.4477 21 14V20C21 20.5523 20.5523 21 20 21H4C3.44772 21 3 20.5523 3 20V14C3 13.4477 3.44772 13 4 13H20ZM19 15H5V19H19V15ZM12 1C14.7614 1 17 3.23858 17 6C17 8.76142 14.7614 11 12 11C9.23858 11 7 8.76142 7 6C7 3.23858 9.23858 1 12 1ZM13 3H11V4.999L9 5V7L11 6.999V9H13V6.999L15 7V5L13 4.999V3Z"}),"InsertRowTop"),Noe=j.createSvgIcon(v.jsx("path",{d:"M12 5V19H19V5H12ZM4 3H20C20.5523 3 21 3.44772 21 4V20C21 20.5523 20.5523 21 20 21H4C3.44772 21 3 20.5523 3 20V4C3 3.44772 3.44772 3 4 3Z"}),"LayoutColumnFill"),Loe=j.createSvgIcon(v.jsx("path",{d:"M19 12H5V19H19V12ZM4 3H20C20.5523 3 21 3.44772 21 4V20C21 20.5523 20.5523 21 20 21H4C3.44772 21 3 20.5523 3 20V4C3 3.44772 3.44772 3 4 3Z"}),"LayoutRowFill"),joe=j.createSvgIcon(v.jsx("path",{d:"M20 3C20.5523 3 21 3.44772 21 4V20C21 20.5523 20.5523 21 20 21H4C3.44772 21 3 20.5523 3 20V4C3 3.44772 3.44772 3 4 3H20ZM11 5H5V10.999H7V9L10 12L7 15V13H5V19H11V17H13V19H19V13H17V15L14 12L17 9V10.999H19V5H13V7H11V5ZM13 13V15H11V13H13ZM13 9V11H11V9H13Z"}),"MergeCellsHorizontal"),$oe=j.createSvgIcon(v.jsx("path",{d:"M20 3C20.5523 3 21 3.44772 21 4V20C21 20.5523 20.5523 21 20 21H4C3.44772 21 3 20.5523 3 20V4C3 3.44772 3.44772 3 4 3H20ZM11 5H5V19H11V15H13V19H19V5H13V9H11V5ZM15 9L18 12L15 15V13H9V15L6 12L9 9V11H15V9Z"}),"SplitCellsHorizontal"),Foe=j.createSvgIcon(v.jsx("path",{d:"M4 21h15.893c1.103 0 2-.897 2-2V5c0-1.103-.897-2-2-2H4c-1.103 0-2 .897-2 2v14c0 1.103.897 2 2 2zm0-2v-5h4v5H4zM14 7v5h-4V7h4zM8 7v5H4V7h4zm2 12v-5h4v5h-4zm6 0v-5h3.894v5H16zm3.893-7H16V7h3.893v5z"}),"Table");let cv,uv;function Boe(){return cv===void 0&&(cv=navigator.platform.includes("Mac")),cv}function Voe(){return Boe()?"⌘":"Ctrl"}function zoe(){return uv===void 0&&(uv=window&&"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0),uv}const Hoe=Kt({name:{MenuButtonTooltip:no}})(t=>({titleContainer:{textAlign:"center"},label:{fontSize:t.typography.pxToRem(13)},shortcutKey:{fontSize:t.typography.pxToRem(12),border:`1px solid ${j.alpha(t.palette.text.secondary,.2)}`,backgroundColor:j.alpha(t.palette.background.paper,.3),height:"19px",lineHeight:"19px",padding:"0 4px",minWidth:17,borderRadius:t.shape.borderRadius,display:"inline-block","&:not(:first-of-type)":{marginLeft:1}}}));function no({label:t,shortcutKeys:e,placement:n="top",contentWrapperClassName:r,children:o,...i}){const{classes:s}=Hoe();return v.jsx(j.Tooltip,{title:t||e&&e.length>0?v.jsxs("div",{className:s.titleContainer,children:[v.jsx("div",{className:s.label,children:t}),e&&e.length>0&&v.jsx(j.Typography,{variant:"body2",component:"div",children:e.map((a,l)=>v.jsx("span",{className:s.shortcutKey,children:a==="mod"?Voe():a},l))})]}):"",placement:n,arrow:!0,...i,children:v.jsx("span",{className:r,children:o})})}const Wc="1.25rem",Woe=Kt({name:{MenuButton:ht}})({root:{[`&& .${j.toggleButtonClasses.root}`]:{border:"none",padding:5}},menuButtonIcon:{fontSize:Wc}});function ht({tooltipLabel:t,tooltipShortcutKeys:e,IconComponent:n,buttonRef:r,children:o,...i}){const{classes:s}=Woe();return v.jsx("span",{className:s.root,children:v.jsx(no,{label:t,shortcutKeys:e,children:v.jsx(j.ToggleButton,{ref:r,size:"small",value:t,...i,children:o??(n&&v.jsx(n,{className:s.menuButtonIcon}))})})})}const qoe=Kt({name:{MenuControlsContainer:uh}})(t=>({root:{display:"flex",rowGap:t.spacing(.3),columnGap:t.spacing(.3),alignItems:"center",flexWrap:"wrap"}}));function uh({children:t,className:e,debounced:n,DebounceProps:r}){const{classes:o,cx:i}=qoe(),s=v.jsx("div",{className:i(o.root,e),children:t});return n?v.jsx(m1,{...r,children:s}):s}function Uoe({className:t,labels:e}){var n,r,o,i,s,a,l,u,f,h,m,g,b;const y=bt();return v.jsxs(uh,{className:t,children:[v.jsx(ht,{tooltipLabel:(n=e==null?void 0:e.insertColumnBefore)!==null&&n!==void 0?n:"Insert column before",IconComponent:Ioe,onClick:()=>y==null?void 0:y.chain().focus().addColumnBefore().run(),disabled:!(y!=null&&y.can().addColumnBefore())}),v.jsx(ht,{tooltipLabel:(r=e==null?void 0:e.insertColumnAfter)!==null&&r!==void 0?r:"Insert column after",IconComponent:Doe,onClick:()=>y==null?void 0:y.chain().focus().addColumnAfter().run(),disabled:!(y!=null&&y.can().addColumnAfter())}),v.jsx(ht,{tooltipLabel:(o=e==null?void 0:e.deleteColumn)!==null&&o!==void 0?o:"Delete column",IconComponent:koe,onClick:()=>y==null?void 0:y.chain().focus().deleteColumn().run(),disabled:!(y!=null&&y.can().deleteColumn())}),v.jsx(wn,{}),v.jsx(ht,{tooltipLabel:(i=e==null?void 0:e.insertRowAbove)!==null&&i!==void 0?i:"Insert row above",IconComponent:_oe,onClick:()=>y==null?void 0:y.chain().focus().addRowBefore().run(),disabled:!(y!=null&&y.can().addRowBefore())}),v.jsx(ht,{tooltipLabel:(s=e==null?void 0:e.insertRowBelow)!==null&&s!==void 0?s:"Insert row below",IconComponent:Poe,onClick:()=>y==null?void 0:y.chain().focus().addRowAfter().run(),disabled:!(y!=null&&y.can().addRowAfter())}),v.jsx(ht,{tooltipLabel:(a=e==null?void 0:e.deleteRow)!==null&&a!==void 0?a:"Delete row",IconComponent:Moe,onClick:()=>y==null?void 0:y.chain().focus().deleteRow().run(),disabled:!(y!=null&&y.can().deleteRow())}),v.jsx(wn,{}),v.jsx(ht,{tooltipLabel:(l=e==null?void 0:e.mergeCells)!==null&&l!==void 0?l:"Merge cells",IconComponent:joe,onClick:()=>y==null?void 0:y.chain().focus().mergeCells().run(),disabled:!(y!=null&&y.can().mergeCells())}),v.jsx(ht,{tooltipLabel:(u=e==null?void 0:e.splitCell)!==null&&u!==void 0?u:"Split cell",IconComponent:$oe,onClick:()=>y==null?void 0:y.chain().focus().splitCell().run(),disabled:!(y!=null&&y.can().splitCell())}),v.jsx(wn,{}),v.jsx(ht,{tooltipLabel:(f=e==null?void 0:e.toggleHeaderRow)!==null&&f!==void 0?f:"Toggle header row",IconComponent:Loe,onClick:()=>y==null?void 0:y.chain().focus().toggleHeaderRow().run(),disabled:!(y!=null&&y.can().toggleHeaderRow())}),v.jsx(ht,{tooltipLabel:(h=e==null?void 0:e.toggleHeaderColumn)!==null&&h!==void 0?h:"Toggle header column",IconComponent:Noe,onClick:()=>y==null?void 0:y.chain().focus().toggleHeaderColumn().run(),disabled:!(y!=null&&y.can().toggleHeaderColumn())}),v.jsx(ht,{tooltipLabel:(m=e==null?void 0:e.toggleHeaderCell)!==null&&m!==void 0?m:"Toggle header cell",IconComponent:h6,onClick:()=>y==null?void 0:y.chain().focus().toggleHeaderCell().run(),disabled:!(y!=null&&y.can().toggleHeaderCell()),selected:(g=y==null?void 0:y.isActive("tableHeader"))!==null&&g!==void 0?g:!1}),v.jsx(wn,{}),v.jsx(ht,{tooltipLabel:(b=e==null?void 0:e.deleteTable)!==null&&b!==void 0?b:"Delete table",IconComponent:w6,onClick:()=>y==null?void 0:y.chain().focus().deleteTable().run(),disabled:!(y!=null&&y.can().deleteTable())})]})}const Koe=Kt({name:{TableBubbleMenu:v_}})(t=>({controls:{maxWidth:"90vw",padding:t.spacing(.5,1)}}));function v_({disableDebounce:t=!1,DebounceProps:e,labels:n,...r}){const o=bt(),{classes:i}=Koe(),s=g_({editor:o}),a=J.useMemo(()=>o?{getBoundingClientRect:()=>{const u=o.isActive("table")?Ux(o.state.selection.$anchor,g=>g.type.name==="table"):null;if(u){const g=o.view.nodeDOM(u.pos),b=g==null?void 0:g.querySelector("table");if(b)return b.getBoundingClientRect()}const{ranges:f}=o.state.selection,h=Math.min(...f.map(g=>g.$from.pos)),m=Math.max(...f.map(g=>g.$to.pos));return pP(o.view,h,m)}}:null,[o]);if(!(o!=null&&o.isEditable))return null;const l=v.jsx(Uoe,{className:i.controls,labels:n});return v.jsx(lh,{editor:o,open:s&&o.isActive("table"),anchorEl:a,placement:"top-start",fallbackPlacements:["bottom-start","top","bottom","top-end","bottom-end"],flipPadding:{top:35,left:8,right:8,bottom:-1/0},...r,children:t?l:v.jsx(m1,{...e,children:l})})}function pl(){return(pl=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function g1(t,e){if(t==null)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)e.indexOf(n=i[r])>=0||(o[n]=t[n]);return o}function f0(t){var e=J.useRef(t),n=J.useRef(function(r){e.current&&e.current(r)});return e.current=t,n.current}var al=function(t,e,n){return e===void 0&&(e=0),n===void 0&&(n=1),t>n?n:t<e?e:t},yc=function(t){return"touches"in t},p0=function(t){return t&&t.ownerDocument.defaultView||self},vR=function(t,e,n){var r=t.getBoundingClientRect(),o=yc(e)?function(i,s){for(var a=0;a<i.length;a++)if(i[a].identifier===s)return i[a];return i[0]}(e.touches,n):e;return{left:al((o.pageX-(r.left+p0(t).pageXOffset))/r.width),top:al((o.pageY-(r.top+p0(t).pageYOffset))/r.height)}},xR=function(t){!yc(t)&&t.preventDefault()},y1=J.memo(function(t){var e=t.onMove,n=t.onKey,r=g1(t,["onMove","onKey"]),o=J.useRef(null),i=f0(e),s=f0(n),a=J.useRef(null),l=J.useRef(!1),u=J.useMemo(function(){var g=function(S){xR(S),(yc(S)?S.touches.length>0:S.buttons>0)&&o.current?i(vR(o.current,S,a.current)):y(!1)},b=function(){return y(!1)};function y(S){var C=l.current,E=p0(o.current),T=S?E.addEventListener:E.removeEventListener;T(C?"touchmove":"mousemove",g),T(C?"touchend":"mouseup",b)}return[function(S){var C=S.nativeEvent,E=o.current;if(E&&(xR(C),!function(w,M){return M&&!yc(w)}(C,l.current)&&E)){if(yc(C)){l.current=!0;var T=C.changedTouches||[];T.length&&(a.current=T[0].identifier)}E.focus(),i(vR(E,C,a.current)),y(!0)}},function(S){var C=S.which||S.keyCode;C<37||C>40||(S.preventDefault(),s({left:C===39?.05:C===37?-.05:0,top:C===40?.05:C===38?-.05:0}))},y]},[s,i]),f=u[0],h=u[1],m=u[2];return J.useEffect(function(){return m},[m]),J.createElement("div",pl({},r,{onTouchStart:f,onMouseDown:f,className:"react-colorful__interactive",ref:o,onKeyDown:h,tabIndex:0,role:"slider"}))}),gu=function(t){return t.filter(Boolean).join(" ")},b1=function(t){var e=t.color,n=t.left,r=t.top,o=r===void 0?.5:r,i=gu(["react-colorful__pointer",t.className]);return J.createElement("div",{className:i,style:{top:100*o+"%",left:100*n+"%"}},J.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:e}}))},En=function(t,e,n){return e===void 0&&(e=0),n===void 0&&(n=Math.pow(10,e)),Math.round(n*t)/n},x_=function(t){return Joe(h0(t))},h0=function(t){return t[0]==="#"&&(t=t.substring(1)),t.length<6?{r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:t.length===4?En(parseInt(t[3]+t[3],16)/255,2):1}:{r:parseInt(t.substring(0,2),16),g:parseInt(t.substring(2,4),16),b:parseInt(t.substring(4,6),16),a:t.length===8?En(parseInt(t.substring(6,8),16)/255,2):1}},S_=function(t){return Goe(Yoe(t))},C_=function(t){var e=t.s,n=t.v,r=t.a,o=(200-e)*n/100;return{h:En(t.h),s:En(o>0&&o<200?e*n/100/(o<=100?o:200-o)*100:0),l:En(o/2),a:En(r,2)}},m0=function(t){var e=C_(t);return"hsl("+e.h+", "+e.s+"%, "+e.l+"%)"},dv=function(t){var e=C_(t);return"hsla("+e.h+", "+e.s+"%, "+e.l+"%, "+e.a+")"},Yoe=function(t){var e=t.h,n=t.s,r=t.v,o=t.a;e=e/360*6,n/=100,r/=100;var i=Math.floor(e),s=r*(1-n),a=r*(1-(e-i)*n),l=r*(1-(1-e+i)*n),u=i%6;return{r:En(255*[r,a,s,s,l,r][u]),g:En(255*[l,r,r,a,s,s][u]),b:En(255*[s,s,l,r,r,a][u]),a:En(o,2)}},Md=function(t){var e=t.toString(16);return e.length<2?"0"+e:e},Goe=function(t){var e=t.r,n=t.g,r=t.b,o=t.a,i=o<1?Md(En(255*o)):"";return"#"+Md(e)+Md(n)+Md(r)+i},Joe=function(t){var e=t.r,n=t.g,r=t.b,o=t.a,i=Math.max(e,n,r),s=i-Math.min(e,n,r),a=s?i===e?(n-r)/s:i===n?2+(r-e)/s:4+(e-n)/s:0;return{h:En(60*(a<0?a+6:a)),s:En(i?s/i*100:0),v:En(i/255*100),a:o}},w_=J.memo(function(t){var e=t.hue,n=t.onChange,r=gu(["react-colorful__hue",t.className]);return J.createElement("div",{className:r},J.createElement(y1,{onMove:function(o){n({h:360*o.left})},onKey:function(o){n({h:al(e+360*o.left,0,360)})},"aria-label":"Hue","aria-valuenow":En(e),"aria-valuemax":"360","aria-valuemin":"0"},J.createElement(b1,{className:"react-colorful__hue-pointer",left:e/360,color:m0({h:e,s:100,v:100,a:1})})))}),T_=J.memo(function(t){var e=t.hsva,n=t.onChange,r={backgroundColor:m0({h:e.h,s:100,v:100,a:1})};return J.createElement("div",{className:"react-colorful__saturation",style:r},J.createElement(y1,{onMove:function(o){n({s:100*o.left,v:100-100*o.top})},onKey:function(o){n({s:al(e.s+100*o.left,0,100),v:al(e.v-100*o.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+En(e.s)+"%, Brightness "+En(e.v)+"%"},J.createElement(b1,{className:"react-colorful__saturation-pointer",top:1-e.v/100,left:e.s/100,color:m0(e)})))}),E_=function(t,e){if(t===e)return!0;for(var n in t)if(t[n]!==e[n])return!1;return!0},k_=function(t,e){return t.toLowerCase()===e.toLowerCase()||E_(h0(t),h0(e))};function M_(t,e,n){var r=f0(n),o=J.useState(function(){return t.toHsva(e)}),i=o[0],s=o[1],a=J.useRef({color:e,hsva:i});J.useEffect(function(){if(!t.equal(e,a.current.color)){var u=t.toHsva(e);a.current={hsva:u,color:e},s(u)}},[e,t]),J.useEffect(function(){var u;E_(i,a.current.hsva)||t.equal(u=t.fromHsva(i),a.current.color)||(a.current={hsva:i,color:u},r(u))},[i,t,r]);var l=J.useCallback(function(u){s(function(f){return Object.assign({},f,u)})},[]);return[i,l]}var Zoe=typeof window<"u"?J.useLayoutEffect:J.useEffect,Xoe=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},SR=new Map,O_=function(t){Zoe(function(){var e=t.current?t.current.ownerDocument:document;if(e!==void 0&&!SR.has(e)){var n=e.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,SR.set(e,n);var r=Xoe();r&&n.setAttribute("nonce",r),e.head.appendChild(n)}},[])},Qoe=function(t){var e=t.className,n=t.colorModel,r=t.color,o=r===void 0?n.defaultColor:r,i=t.onChange,s=g1(t,["className","colorModel","color","onChange"]),a=J.useRef(null);O_(a);var l=M_(n,o,i),u=l[0],f=l[1],h=gu(["react-colorful",e]);return J.createElement("div",pl({},s,{ref:a,className:h}),J.createElement(T_,{hsva:u,onChange:f}),J.createElement(w_,{hue:u.h,onChange:f,className:"react-colorful__last-control"}))},eie={defaultColor:"000",toHsva:x_,fromHsva:function(t){return S_({h:t.h,s:t.s,v:t.v,a:1})},equal:k_},tie=function(t){return J.createElement(Qoe,pl({},t,{colorModel:eie}))},nie=function(t){var e=t.className,n=t.hsva,r=t.onChange,o={backgroundImage:"linear-gradient(90deg, "+dv(Object.assign({},n,{a:0}))+", "+dv(Object.assign({},n,{a:1}))+")"},i=gu(["react-colorful__alpha",e]),s=En(100*n.a);return J.createElement("div",{className:i},J.createElement("div",{className:"react-colorful__alpha-gradient",style:o}),J.createElement(y1,{onMove:function(a){r({a:a.left})},onKey:function(a){r({a:al(n.a+a.left)})},"aria-label":"Alpha","aria-valuetext":s+"%","aria-valuenow":s,"aria-valuemin":"0","aria-valuemax":"100"},J.createElement(b1,{className:"react-colorful__alpha-pointer",left:n.a,color:dv(n)})))},rie=function(t){var e=t.className,n=t.colorModel,r=t.color,o=r===void 0?n.defaultColor:r,i=t.onChange,s=g1(t,["className","colorModel","color","onChange"]),a=J.useRef(null);O_(a);var l=M_(n,o,i),u=l[0],f=l[1],h=gu(["react-colorful",e]);return J.createElement("div",pl({},s,{ref:a,className:h}),J.createElement(T_,{hsva:u,onChange:f}),J.createElement(w_,{hue:u.h,onChange:f}),J.createElement(nie,{hsva:u,onChange:f,className:"react-colorful__last-control"}))},oie={defaultColor:"0001",toHsva:x_,fromHsva:S_,equal:k_},iie=function(t){return J.createElement(rie,pl({},t,{colorModel:oie}))};function sie(t){try{return j.rgbToHex(t)}catch{return null}}const v1=J.forwardRef(({value:t,label:e,padding:n,active:r,...o},i)=>{const{classes:s,cx:a,theme:l}=aie();return v.jsx("button",{ref:i,type:"button",style:{backgroundColor:t,padding:n},"aria-label":e??t,value:t,...o,className:a(s.root,!t&&s.colorNotSet,o.className),children:r&&v.jsx(n6,{fontSize:"small",className:s.activeIcon,style:{color:t?l.palette.getContrastText(t):void 0}})})}),aie=Kt({name:{ColorSwatchButton:v1}})(t=>({root:{height:t.spacing(2.5),width:t.spacing(2.5),minWidth:t.spacing(2.5),borderRadius:t.shape.borderRadius,borderColor:t.palette.mode==="dark"?t.palette.grey[700]:t.palette.grey[400],borderStyle:"solid",borderWidth:1,cursor:"pointer",padding:0,backgroundClip:"content-box"},activeIcon:{height:"100%",width:"80%",verticalAlign:"middle"},colorNotSet:{background:`repeating-conic-gradient(
390
+ ${t.palette.grey[400]} 0% 25%, ${t.palette.common.white} 0% 50%)
391
+ 50% / 12px 12px`,backgroundClip:"content-box"}}));v1.displayName="ColorSwatchButton";const Od=Zs("ColorPicker",["gradientPicker","colorTextInput","swatchContainer"]),lie=Kt({name:{ColorPicker:R_}})(t=>({gradientPicker:{"&&":{width:"100%"}},colorTextInput:{marginTop:t.spacing(1)},swatchContainer:{display:"flex",flexWrap:"wrap",gap:5,marginTop:t.spacing(1)}}));function R_({value:t,onChange:e,swatchColors:n,colorToHex:r=sie,disableAlpha:o=!1,labels:i={},classes:s={}}){const{classes:a,cx:l}=lie(void 0,{props:{classes:s}}),{textFieldPlaceholder:u='Ex: "#7cb5ec"'}=i,f=J.useRef(null);J.useEffect(()=>{f.current&&f.current!==document.activeElement&&(f.current.value=t)},[t]);const h=(n??[]).map(g=>typeof g=="string"?{value:g}:g),m=r(t);return v.jsxs(v.Fragment,{children:[o?v.jsx(tie,{color:m??"#000000",className:l(Od.gradientPicker,a.gradientPicker),onChange:g=>{e(g,"gradient")}}):v.jsx(iie,{color:m??"#000000",className:l(Od.gradientPicker,a.gradientPicker),onChange:g=>{e(g,"gradient")}}),v.jsx(j.TextField,{placeholder:u,variant:"outlined",size:"small",defaultValue:t||"",inputRef:f,spellCheck:!1,className:l(Od.colorTextInput,a.colorTextInput),onChange:g=>{const b=g.target.value,y=r(b);y&&e(y,"text")},fullWidth:!0}),h.length>0&&v.jsx("div",{className:l(Od.swatchContainer,a.swatchContainer),children:h.map(g=>v.jsx(v1,{value:g.value,label:g.label,onClick:()=>{var b;e((b=g.value)!==null&&b!==void 0?b:"","swatch")},active:g.value==t||!g.value&&!t||!!g.value&&!!m&&r(g.value)===m},g.value))})]})}function cie({value:t,onCancel:e,onSave:n,swatchColors:r,labels:o={},ColorPickerProps:i}){const{removeColorButton:s="None",removeColorButtonTooltipTitle:a="",cancelButton:l="Cancel",saveButton:u="OK"}=o,[f,h]=J.useState(t);return J.useEffect(()=>{h(t)},[t]),v.jsxs(v.Fragment,{children:[v.jsx(R_,{swatchColors:r,value:f,onChange:m=>{h(m)},labels:o,...i}),v.jsxs(j.Stack,{direction:"row",justifyContent:"space-between",sx:{mt:1},children:[v.jsx(j.Tooltip,{title:a,arrow:!0,children:v.jsx(j.Button,{onClick:()=>{n("")},size:"small",children:s})}),v.jsx(j.Button,{onClick:e,size:"small",children:l}),v.jsx(j.Button,{onClick:()=>{n(f)},size:"small",children:u})]})]})}const uie=Kt({name:{ColorPickerPopper:A_}})(t=>({root:{zIndex:t.zIndex.tooltip,width:235}}));function A_({value:t,onSave:e,onCancel:n,swatchColors:r,ColorPickerProps:o,labels:i,...s}){const{classes:a,cx:l}=uie();return v.jsx(j.Popper,{transition:!0,placement:"bottom-start",...s,className:l(a.root,s.className),children:({TransitionProps:u})=>v.jsx(j.Fade,{...u,timeout:100,children:v.jsx("div",{children:v.jsx(j.ClickAwayListener,{mouseEvent:"onMouseDown",touchEvent:"onTouchStart",onClickAway:n,children:v.jsx(j.Paper,{elevation:5,sx:{p:2.5,pb:1},children:v.jsx(cie,{value:t||"",onSave:e,onCancel:n,swatchColors:r,ColorPickerProps:o,labels:i})})})})})})}function die({...t}){const e=bt();return v.jsx(ht,{tooltipLabel:"Insert image",IconComponent:QH,disabled:!(e!=null&&e.isEditable)||!e.can().setImage({src:"http://example.com"}),...t})}function fie(t){const e=bt();return v.jsx(ht,{tooltipLabel:"Insert table",IconComponent:Foe,disabled:!(e!=null&&e.isEditable)||!e.can().insertTable(),onClick:()=>e==null?void 0:e.chain().focus().insertTable({rows:3,cols:3,withHeaderRow:!0}).run(),...t})}function pie(t){var e;const n=bt();return v.jsx(ht,{tooltipLabel:"Blockquote",tooltipShortcutKeys:["mod","Shift","B"],IconComponent:x6,selected:(e=n==null?void 0:n.isActive("blockquote"))!==null&&e!==void 0?e:!1,disabled:!(n!=null&&n.isEditable)||!n.can().toggleBlockquote(),onClick:()=>n==null?void 0:n.chain().focus().toggleBlockquote().run(),...t})}function hie(t){var e;const n=bt();return v.jsx(ht,{tooltipLabel:"Bold",tooltipShortcutKeys:["mod","B"],IconComponent:f6,selected:(e=n==null?void 0:n.isActive("bold"))!==null&&e!==void 0?e:!1,disabled:!(n!=null&&n.isEditable)||!n.can().toggleBold(),onClick:()=>n==null?void 0:n.chain().focus().toggleBold().run(),...t})}function mie(t){var e;const n=bt();return v.jsx(ht,{tooltipLabel:"Bulleted list",tooltipShortcutKeys:["mod","Shift","8"],IconComponent:b6,selected:(e=n==null?void 0:n.isActive("bulletList"))!==null&&e!==void 0?e:!1,disabled:!(n!=null&&n.isEditable)||!n.can().toggleBulletList(),onClick:()=>n==null?void 0:n.chain().focus().toggleBulletList().run(),...t})}function gie(t){var e;const n=bt();return v.jsx(ht,{tooltipLabel:"Code",tooltipShortcutKeys:["mod","E"],IconComponent:s6,selected:(e=n==null?void 0:n.isActive("code"))!==null&&e!==void 0?e:!1,disabled:!(n!=null&&n.isEditable)||!n.can().toggleCode(),onClick:()=>n==null?void 0:n.chain().focus().toggleCode().run(),...t})}function yie(t){var e;const n=bt();return v.jsx(ht,{tooltipLabel:"Code block",tooltipShortcutKeys:["mod","Alt","C"],IconComponent:Eoe,selected:(e=n==null?void 0:n.isActive("codeBlock"))!==null&&e!==void 0?e:!1,disabled:!(n!=null&&n.isEditable)||!n.can().toggleCodeBlock(),onClick:()=>n==null?void 0:n.chain().focus().toggleCodeBlock().run(),...t})}const bie=Kt({name:{MenuButtonColorPicker:x1}})(t=>({menuButtonIcon:{fontSize:Wc},colorIndicatorIcon:{position:"absolute"},colorIndicatorIconDisabled:{color:t.palette.action.disabled}}));function x1({value:t,onChange:e,swatchColors:n,labels:r,hideColorIndicator:o=!1,popperId:i,PopperProps:s,ColorPickerProps:a,...l}){const{classes:u,cx:f}=bie(),[h,m]=J.useState(null),g=()=>{m(null)},{IconComponent:b,children:y,...S}=l;return v.jsxs(v.Fragment,{children:[v.jsx(ht,{onClick:C=>{h?g():m(C.currentTarget)},"aria-describedby":i,...S,children:y??v.jsxs(v.Fragment,{children:[b&&v.jsx(b,{className:u.menuButtonIcon}),!o&&t&&v.jsx(Ooe,{className:f(u.menuButtonIcon,u.colorIndicatorIcon,l.disabled&&u.colorIndicatorIconDisabled),style:l.disabled?void 0:{color:t}})]})}),v.jsx(A_,{id:i,open:!!h,anchorEl:h,value:t??"",onSave:C=>{e(C),g()},onCancel:g,swatchColors:n,ColorPickerProps:a,labels:r,...s})]})}function vie(t){const e=bt(),n=J.useRef(null);return v.jsx(ht,{buttonRef:n,tooltipLabel:"Link",tooltipShortcutKeys:["mod","Shift","U"],IconComponent:H0,selected:e==null?void 0:e.isActive("link"),disabled:!(e!=null&&e.isEditable),onClick:()=>e==null?void 0:e.commands.openLinkBubbleMenu({anchorEl:n.current,placement:"bottom"}),...t})}function xie({defaultMarkColor:t="#ffff00",...e}){const n=bt(),r=n!=null&&n.isActive("highlight")?n.getAttributes("highlight").color||t:"";return v.jsx(x1,{IconComponent:Aoe,tooltipLabel:"Highlight color",tooltipShortcutKeys:["mod","Shift","H"],value:r,onChange:o=>{o?n==null||n.chain().focus().setHighlight({color:o}).run():n==null||n.chain().focus().unsetHighlight().run()},disabled:!(n!=null&&n.isEditable)||!n.can().toggleHighlight(),...e,labels:{removeColorButton:"None",removeColorButtonTooltipTitle:"Remove highlighting from this text",...e.labels}})}function Sie(t){const e=bt();return v.jsx(ht,{tooltipLabel:"Insert horizontal line",IconComponent:T6,disabled:!(e!=null&&e.isEditable)||!e.can().setHorizontalRule(),onClick:()=>e==null?void 0:e.chain().focus().setHorizontalRule().run(),...t})}function Cie(t,e){const n=fo(e,t.schema),{from:r,to:o,empty:i}=t.selection,s=[];return i?(t.storedMarks&&s.push(...t.storedMarks),s.push(...t.selection.$head.marks())):t.doc.nodesBetween(r,o,a=>{s.push(...a.marks)}),s.filter(a=>a.type.name===n.name).map(a=>({...a.attrs}))}function wie(t,e){const n=xn(e,t.schema),{from:r,to:o}=t.selection,i=[];return t.doc.nodesBetween(r,o,s=>{i.push(s)}),i.reverse().filter(s=>s.type.name===n.name).map(s=>({...s.attrs}))}function dh(t,e){const n=pu(typeof e=="string"?e:e.name,t.schema);return n==="node"?wie(t,e):n==="mark"?Cie(t,e):[]}function g0({images:t,editor:e,position:n}){if(!e||e.isDestroyed||t.length===0)return;const r=t.filter(o=>!!o.src).map(o=>({type:e.schema.nodes.image.name,attrs:o}));e.chain().command(({commands:o})=>n==null?o.insertContent(r):o.insertContentAt(n,r)).focus().run()}function Tie(t){return t.toLowerCase().normalize("NFKD").replace(/[^\w\s-]+/g,"").replace(/[-\s]+/g,"-").replace(/^[\s-_]+|[\s-_]+$/g,"")}function Eie({onUploadFiles:t,inputProps:e,insertImages:n=g0,...r}){const o=bt(),i=J.useRef(null),s=async a=>{if(!o||o.isDestroyed||a.length===0)return;const l=await t(Array.from(a));n({editor:o,images:l})};return v.jsxs(v.Fragment,{children:[v.jsx(die,{tooltipLabel:"Upload images",onClick:()=>{var a;return(a=i.current)===null||a===void 0?void 0:a.click()},...r}),v.jsx("input",{ref:i,type:"file",accept:"image/*",multiple:!0,onChange:async a=>{a.target.files&&await s(a.target.files),a.target.value=""},style:{display:"none"},...e})]})}function kie(t){const e=bt();return v.jsx(ht,{tooltipLabel:"Indent",tooltipShortcutKeys:["Tab"],IconComponent:g6,disabled:!(e!=null&&e.isEditable)||!e.can().sinkListItem("listItem"),onClick:()=>e==null?void 0:e.chain().focus().sinkListItem("listItem").run(),...t})}function Mie(t){var e;const n=bt();return v.jsx(ht,{tooltipLabel:"Italic",tooltipShortcutKeys:["mod","I"],IconComponent:y6,selected:(e=n==null?void 0:n.isActive("italic"))!==null&&e!==void 0?e:!1,disabled:!(n!=null&&n.isEditable)||!n.can().toggleItalic(),onClick:()=>n==null?void 0:n.chain().focus().toggleItalic().run(),...t})}function Oie(t){var e;const n=bt();return v.jsx(ht,{tooltipLabel:"Ordered list",tooltipShortcutKeys:["mod","Shift","7"],IconComponent:v6,selected:(e=n==null?void 0:n.isActive("orderedList"))!==null&&e!==void 0?e:!1,disabled:!(n!=null&&n.isEditable)||!n.can().toggleOrderedList(),onClick:()=>n==null?void 0:n.chain().focus().toggleOrderedList().run(),...t})}function Rie(t){const e=bt();return v.jsx(ht,{tooltipLabel:"Redo",tooltipShortcutKeys:["mod","Shift","Z"],IconComponent:I6,disabled:!(e!=null&&e.isEditable)||!e.can().redo(),onClick:()=>e==null?void 0:e.chain().focus().redo().run(),...t})}function Aie(t){const e=bt();return v.jsx(ht,{tooltipLabel:"Remove inline formatting",IconComponent:p6,disabled:!(e!=null&&e.isEditable)||!e.can().unsetAllMarks(),onClick:()=>e==null?void 0:e.chain().focus().unsetAllMarks().run(),...t})}function Iie(t){var e;const n=bt();return v.jsx(ht,{tooltipLabel:"Strikethrough",tooltipShortcutKeys:["mod","Shift","S"],IconComponent:L6,selected:(e=n==null?void 0:n.isActive("strike"))!==null&&e!==void 0?e:!1,disabled:!(n!=null&&n.isEditable)||!n.can().toggleStrike(),onClick:()=>n==null?void 0:n.chain().focus().toggleStrike().run(),...t})}function Die(t){var e;const n=bt();return v.jsx(ht,{tooltipLabel:"Subscript",tooltipShortcutKeys:["mod",","],IconComponent:j6,selected:(e=n==null?void 0:n.isActive("subscript"))!==null&&e!==void 0?e:!1,disabled:!(n!=null&&n.isEditable)||!n.can().toggleSubscript(),onClick:()=>n==null?void 0:n.chain().focus().toggleSubscript().run(),...t})}function Pie(t){var e;const n=bt();return v.jsx(ht,{tooltipLabel:"Superscript",tooltipShortcutKeys:["mod","."],IconComponent:$6,selected:(e=n==null?void 0:n.isActive("superscript"))!==null&&e!==void 0?e:!1,disabled:!(n!=null&&n.isEditable)||!n.can().toggleSuperscript(),onClick:()=>n==null?void 0:n.chain().focus().toggleSuperscript().run(),...t})}function _ie(t){var e;const n=bt();return v.jsx(ht,{tooltipLabel:"Task checklist",tooltipShortcutKeys:["mod","Shift","9"],IconComponent:r6,selected:(e=n==null?void 0:n.isActive("taskList"))!==null&&e!==void 0?e:!1,disabled:!(n!=null&&n.isEditable)||!n.can().toggleTaskList(),onClick:()=>n==null?void 0:n.chain().focus().toggleTaskList().run(),...t})}function Nie({IconComponent:t=Roe,tooltipLabel:e="Text color",defaultTextColor:n="",...r}){const o=bt(),i=o?dh(o.state,"textStyle"):[],s=!!(o!=null&&o.isActive("textStyle")),a=i.map(f=>f.color||n);s||a.push(n);const l=new Set(a).size;let u;return l===1?u=a[0]:l>1?u="":u=n,v.jsx(x1,{IconComponent:t,tooltipLabel:e,value:u,onChange:f=>{o==null||o.chain().focus().setColor(f).run()},disabled:!(o!=null&&o.isEditable)||!o.can().setColor("#000"),...r,labels:{removeColorButton:"Reset",...r.labels}})}function Lie(t){var e;const n=bt();return v.jsx(ht,{tooltipLabel:"Underline",tooltipShortcutKeys:["mod","U"],IconComponent:C6,selected:(e=n==null?void 0:n.isActive("underline"))!==null&&e!==void 0?e:!1,disabled:!(n!=null&&n.isEditable)||!n.can().toggleUnderline(),onClick:()=>n==null?void 0:n.chain().focus().toggleUnderline().run(),...t})}function jie(t){const e=bt();return v.jsx(ht,{tooltipLabel:"Undo",tooltipShortcutKeys:["mod","Z"],IconComponent:F6,disabled:!(e!=null&&e.isEditable)||!e.can().undo(),onClick:()=>e==null?void 0:e.chain().focus().undo().run(),...t})}function $ie(t){const e=bt();return v.jsx(ht,{tooltipLabel:"Unindent",tooltipShortcutKeys:["Shift","Tab"],IconComponent:m6,disabled:!(e!=null&&e.isEditable)||!e.can().liftListItem("listItem"),onClick:()=>e==null?void 0:e.chain().focus().liftListItem("listItem").run(),...t})}const Fie=Kt({name:{MenuSelect:yu}})(t=>({rootTooltipWrapper:{display:"inline-flex"},selectRoot:{[`&:not(:hover):not(.${j.outlinedInputClasses.focused}) .${j.outlinedInputClasses.notchedOutline}`]:{borderWidth:0},[`& .${j.svgIconClasses.root}`]:{color:t.palette.action.active},[`&.${j.selectClasses.disabled} .${j.svgIconClasses.root}`]:{color:t.palette.action.disabled}},select:{"&&&":{paddingLeft:t.spacing(1),paddingRight:t.spacing(3)}},selectDropdownIcon:{right:1},input:{paddingTop:"3px",paddingBottom:"3px",fontSize:"0.9em"}}));function yu({tooltipTitle:t,...e}){var n,r,o;const{classes:i,cx:s}=Fie(),[a,l]=J.useState(!1),u=v.jsx(j.Select,{margin:"none",variant:"outlined",size:"small",...e,onMouseEnter:(...f)=>{var h;l(!0),(h=e.onMouseEnter)===null||h===void 0||h.call(e,...f)},onMouseLeave:(...f)=>{var h;l(!1),(h=e.onMouseLeave)===null||h===void 0||h.call(e,...f)},onClick:(...f)=>{var h;l(!1),(h=e.onClick)===null||h===void 0||h.call(e,...f)},onOpen:(...f)=>{var h;l(!1),(h=e.onOpen)===null||h===void 0||h.call(e,...f)},inputProps:{...e.inputProps,className:s(i.input,(n=e.inputProps)===null||n===void 0?void 0:n.className)},MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},...e.MenuProps},className:s(i.selectRoot,e.className),classes:{...e.classes,select:s(i.select,(r=e.classes)===null||r===void 0?void 0:r.select),icon:s(i.selectDropdownIcon,(o=e.classes)===null||o===void 0?void 0:o.icon)}});return t?v.jsx(no,{label:t,contentWrapperClassName:i.rootTooltipWrapper,open:a,children:u}):u}const Bie=Kt({name:{MenuSelectFontFamily:I_}})({selectInput:{width:55}}),fv="MULTIPLE";function I_({options:t,hideUnsetOption:e=!1,unsetOptionLabel:n="Default",emptyLabel:r="Font",...o}){var i;const{classes:s,cx:a}=Bie(),l=bt(),u=l?dh(l.state,"textStyle"):[],f=!!(l!=null&&l.isActive("textStyle")),h=u.map(b=>{var y;return(y=b.fontFamily)!==null&&y!==void 0?y:""});f||h.push("");const m=new Set(h).size;let g;return m===1?g=h[0]:m>1?g=fv:g="",v.jsxs(yu,{onChange:b=>{const y=b.target.value;y?l==null||l.chain().setFontFamily(y).focus().run():l==null||l.chain().unsetFontFamily().focus().run()},disabled:!(l!=null&&l.isEditable)||!l.can().setFontFamily("serif"),renderValue:b=>{var y,S;return!b||b===fv?r:(S=(y=t.find(C=>C.value===b))===null||y===void 0?void 0:y.label)!==null&&S!==void 0?S:b},displayEmpty:!0,"aria-label":"Font families",tooltipTitle:"Font",...o,value:g||"",inputProps:{...o.inputProps,className:a(s.selectInput,(i=o.inputProps)===null||i===void 0?void 0:i.className)},children:[!e&&v.jsx(j.MenuItem,{value:"",children:n}),v.jsx(j.MenuItem,{style:{display:"none"},value:fv}),t.map(b=>{var y;return v.jsx(j.MenuItem,{value:b.value,children:v.jsx("span",{style:{fontFamily:b.value},children:(y=b.label)!==null&&y!==void 0?y:b.value})},b.value)})]})}const Vie=Kt({name:{MenuSelectFontSize:D_}})({selectInput:{width:17,display:"flex",alignItems:"center"},fontSizeIcon:{fontSize:Wc}}),zie=["8px","9px","10px","11px","12px","14px","16px","18px","24px","30px","36px","48px","60px","72px","96px"];function CR(t){return t.replace("px","")}const pv="MULTIPLE";function D_({options:t=zie,sizeOptions:e,hideUnsetOption:n=!1,unsetOptionLabel:r="Default",unsetOptionContent:o,emptyLabel:i,emptyValue:s,...a}){var l;const{classes:u,cx:f}=Vie(),h=bt();i=s??i,r=o??r,t=e??t;const m=(t??[]).map(E=>typeof E=="string"?{value:E}:E),g=h?dh(h.state,"textStyle"):[],b=!!(h!=null&&h.isActive("textStyle")),y=g.map(E=>{var T;return(T=E.fontSize)!==null&&T!==void 0?T:""});b||y.push("");const S=new Set(y).size;let C;return S===1?C=y[0]:S>1?C=pv:C="",v.jsxs(yu,{onChange:E=>{const T=E.target.value;T?h==null||h.chain().setFontSize(T).focus().run():h==null||h.chain().unsetFontSize().focus().run()},disabled:!(h!=null&&h.isEditable)||!h.can().setFontSize("12px"),renderValue:E=>!E||E===pv?i??v.jsx(S6,{className:u.fontSizeIcon}):CR(E),displayEmpty:!0,"aria-label":"Font sizes",tooltipTitle:"Font size",...a,value:C||"",inputProps:{...a.inputProps,className:f(u.selectInput,(l=a.inputProps)===null||l===void 0?void 0:l.className)},children:[!n&&v.jsx(j.MenuItem,{value:"",children:r}),v.jsx(j.MenuItem,{style:{display:"none"},value:pv}),m.map(E=>{var T;return v.jsx(j.MenuItem,{value:E.value,children:(T=E.label)!==null&&T!==void 0?T:CR(E.value)},E.value)})]})}const Hie=Kt({name:{MenuSelectHeading:P_}})(t=>{const e=qP(t);return{selectInput:{width:77},menuOption:{display:"block",width:"100%"},headingOption:{marginBlockStart:0,marginBlockEnd:0,fontWeight:"bold"},headingOption1:{fontSize:e["& h1"].fontSize},headingOption2:{fontSize:e["& h2"].fontSize},headingOption3:{fontSize:e["& h3"].fontSize},headingOption4:{fontSize:e["& h4"].fontSize},headingOption5:{fontSize:e["& h5"].fontSize},headingOption6:{fontSize:e["& h6"].fontSize}}}),gt={Paragraph:"Paragraph",Heading1:"Heading 1",Heading2:"Heading 2",Heading3:"Heading 3",Heading4:"Heading 4",Heading5:"Heading 5",Heading6:"Heading 6"},wR={[gt.Heading1]:1,[gt.Heading2]:2,[gt.Heading3]:3,[gt.Heading4]:4,[gt.Heading5]:5,[gt.Heading6]:6},TR={1:gt.Heading1,2:gt.Heading2,3:gt.Heading3,4:gt.Heading4,5:gt.Heading5,6:gt.Heading6};function P_({labels:t,hideShortcuts:e=!1,...n}){var r,o,i,s,a,l,u,f;const{classes:h,cx:m}=Hie(),g=bt(),b=J.useCallback(_=>{const I=_.target.value;I===gt.Paragraph?g==null||g.chain().setParagraph().focus().run():I in wR&&(g==null||g.chain().setHeading({level:wR[I]}).focus().run())},[g]);let y="",S;if(g!=null&&g.isActive("paragraph"))y=gt.Paragraph;else if(g!=null&&g.isActive("heading")){const I=dh(g.state,"heading").map(O=>O.level);S=new Set(I).size===1?I[0]:void 0,S&&S in TR&&(y=TR[S])}const C=y!=="",E=!!(g!=null&&g.can().setParagraph()),T=J.useMemo(()=>{var _;const I=g==null?void 0:g.extensionManager.extensions.find(N=>N.name=="heading");return new Set((_=I==null?void 0:I.options.levels)!==null&&_!==void 0?_:[])},[g]),w=T.values().next(),M=w.done?void 0:w.value,R=M!==void 0&&(S===M||!!(g!=null&&g.can().setHeading({level:M})));return v.jsxs(yu,{onChange:b,disabled:!(g!=null&&g.isEditable)||!C&&!E&&!R,displayEmpty:!0,renderValue:_=>{var I,N;let O;return _===""?O=(N=(I=t==null?void 0:t.emptyValue)!==null&&I!==void 0?I:t==null?void 0:t.empty)!==null&&N!==void 0?N:v.jsx("em",{children:"Change to…"}):_===gt.Paragraph?O=t==null?void 0:t.paragraph:_===gt.Heading1?O=t==null?void 0:t.heading1:_===gt.Heading2?O=t==null?void 0:t.heading2:_===gt.Heading3?O=t==null?void 0:t.heading3:_===gt.Heading4?O=t==null?void 0:t.heading4:_===gt.Heading5?O=t==null?void 0:t.heading5:_===gt.Heading6&&(O=t==null?void 0:t.heading6),O??_},"aria-label":"Text headings",tooltipTitle:"Styles",...n,value:y,inputProps:{...n.inputProps,className:m(h.selectInput,(r=n.inputProps)===null||r===void 0?void 0:r.className)},children:[v.jsx(j.MenuItem,{value:gt.Paragraph,disabled:!C&&!E,children:v.jsx(no,{label:"",shortcutKeys:e?void 0:["mod","alt","0"],placement:"right",contentWrapperClassName:h.menuOption,children:(o=t==null?void 0:t.paragraph)!==null&&o!==void 0?o:gt.Paragraph})}),T.has(1)&&v.jsx(j.MenuItem,{value:gt.Heading1,disabled:!R,children:v.jsx(no,{label:"",shortcutKeys:e?void 0:["mod","alt","1"],placement:"right",contentWrapperClassName:m(h.menuOption,h.headingOption,h.headingOption1),children:(i=t==null?void 0:t.heading1)!==null&&i!==void 0?i:gt.Heading1})}),T.has(2)&&v.jsx(j.MenuItem,{value:gt.Heading2,disabled:!R,children:v.jsx(no,{label:"",shortcutKeys:e?void 0:["mod","alt","2"],placement:"right",contentWrapperClassName:m(h.menuOption,h.headingOption,h.headingOption2),children:(s=t==null?void 0:t.heading2)!==null&&s!==void 0?s:gt.Heading2})}),T.has(3)&&v.jsx(j.MenuItem,{value:gt.Heading3,disabled:!R,children:v.jsx(no,{label:"",shortcutKeys:e?void 0:["mod","alt","3"],placement:"right",contentWrapperClassName:m(h.menuOption,h.headingOption,h.headingOption3),children:(a=t==null?void 0:t.heading3)!==null&&a!==void 0?a:gt.Heading3})}),T.has(4)&&v.jsx(j.MenuItem,{value:gt.Heading4,disabled:!R,children:v.jsx(no,{label:"",shortcutKeys:e?void 0:["mod","alt","4"],placement:"right",contentWrapperClassName:m(h.menuOption,h.headingOption,h.headingOption4),children:(l=t==null?void 0:t.heading4)!==null&&l!==void 0?l:gt.Heading4})}),T.has(5)&&v.jsx(j.MenuItem,{value:gt.Heading5,disabled:!R,children:v.jsx(no,{label:"",shortcutKeys:e?void 0:["mod","alt","5"],placement:"right",contentWrapperClassName:m(h.menuOption,h.headingOption,h.headingOption5),children:(u=t==null?void 0:t.heading5)!==null&&u!==void 0?u:gt.Heading5})}),T.has(6)&&v.jsx(j.MenuItem,{value:gt.Heading6,disabled:!R,children:v.jsx(no,{label:"",shortcutKeys:e?void 0:["mod","alt","6"],placement:"right",contentWrapperClassName:m(h.menuOption,h.headingOption,h.headingOption6),children:(f=t==null?void 0:t.heading6)!==null&&f!==void 0?f:gt.Heading6})})]})}const Wie=Kt({name:{MenuSelectTextAlign:__}})(t=>({selectInput:{width:Wc},menuItem:{paddingLeft:0,paddingRight:0},menuOption:{display:"flex",width:"100%",justifyContent:"center"},menuButtonIcon:{fontSize:Wc,color:t.palette.action.active}})),qie=[{value:"left",label:"Left",shortcutKeys:["mod","Shift","L"],IconComponent:u6},{value:"center",label:"Center",shortcutKeys:["mod","Shift","E"],IconComponent:l6},{value:"right",label:"Right",shortcutKeys:["mod","Shift","R"],IconComponent:d6},{value:"justify",label:"Justify",shortcutKeys:["mod","Shift","J"],IconComponent:c6}];function __({options:t=qie,emptyLabel:e="",alignmentOptions:n,...r}){var o,i,s;const{classes:a,cx:l}=Wie(),u=bt();t=(o=n==null?void 0:n.map(b=>({...b,value:b.alignment})))!==null&&o!==void 0?o:t;const f=J.useCallback(b=>{const y=b.target.value;u==null||u.chain().setTextAlign(y).focus().run()},[u]),h=J.useMemo(()=>{const b=u==null?void 0:u.extensionManager.extensions.find(y=>y.name=="textAlign");return b==null?void 0:b.options},[u]),m=J.useMemo(()=>new Set(h==null?void 0:h.alignments),[h]),g=(i=Array.from(m).find(b=>u==null?void 0:u.isActive({textAlign:b})))!==null&&i!==void 0?i:"";return v.jsx(yu,{onChange:f,disabled:!(u!=null&&u.isEditable)||!Array.from(m).some(b=>u.can().setTextAlign(b)),renderValue:b=>{let y;if(b){const S=t.find(C=>C.value===b);y=S?v.jsx(S.IconComponent,{className:a.menuButtonIcon}):b}else y=e;return v.jsx("span",{className:a.menuOption,children:y})},"aria-label":"Text alignments",tooltipTitle:"Align",value:g,displayEmpty:!0,...r,inputProps:{...r.inputProps,className:l(a.selectInput,(s=r.inputProps)===null||s===void 0?void 0:s.className)},children:t.filter(b=>m.has(b.value)).map(b=>{var y;return v.jsx(j.MenuItem,{value:b.value,disabled:!(u!=null&&u.can().setTextAlign(b.value)),className:a.menuItem,children:v.jsx(no,{label:(y=b.label)!==null&&y!==void 0?y:"",shortcutKeys:b.shortcutKeys,placement:"right",contentWrapperClassName:a.menuOption,children:v.jsx(b.IconComponent,{className:a.menuButtonIcon})})},b.value)})})}const Uie=cn.create({name:"fontSize",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontSize:{default:null,parseHTML:t=>t.style.fontSize.replace(/['"]+/g,""),renderHTML:t=>t.fontSize?{style:`font-size: ${t.fontSize}`}:{}}}}]},addCommands(){return{setFontSize:t=>({chain:e})=>e().setMark("textStyle",{fontSize:t}).run(),unsetFontSize:()=>({chain:t})=>t().setMark("textStyle",{fontSize:null}).removeEmptyTextStyle().run()}}}),N_=Qt.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(t=>({tag:`h${t}`,attrs:{level:t}}))},renderHTML({node:t,HTMLAttributes:e}){return[`h${this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0]}`,yt(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.setNode(this.name,t):!1,toggleHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.toggleNode(this.name,"paragraph",t):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(t=>i0({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${t}})\\s$`),type:this.type,getAttributes:{level:t}}))}}),Kie=Kt({name:{HeadingWithAnchorComponent:L_},uniqId:"kNc4LD"})((t,e,n)=>({root:{[`&:hover .${n.link}`]:{opacity:100}},container:{display:"inline-block",position:"relative"},link:{position:"absolute",left:-21,color:`${t.palette.text.secondary} !important`,opacity:0,transition:t.transitions.create("opacity"),textDecoration:"none",outline:"none",[t.breakpoints.down("sm")]:{left:-18},'.ProseMirror[contenteditable="true"] &':{display:"none"}},linkIcon:{transform:"rotate(-45deg)",fontSize:"1.25rem",[t.breakpoints.down("sm")]:{fontSize:"1.15rem"}}})),Rd=Zs("HeadingWithAnchorComponent",["root","container","link","linkIcon"]);function L_({editor:t,node:e,extension:n}){const{classes:r,cx:o}=Kie(),a=`h${n.options.levels.includes(e.attrs.level)?e.attrs.level:n.options.levels[0]}`,l=J.useMemo(()=>qx(t.schema),[t.schema]),u=Tie(dP(e,{textSerializers:l}));return v.jsx(f1,{as:a,id:u,...n.options.HTMLAttributes,className:o(Rd.root,r.root),style:{textAlign:e.attrs.textAlign},children:v.jsxs("span",{className:o(Rd.container,r.container),children:[v.jsx("a",{href:`#${u}`,contentEditable:!1,className:o(Rd.link,r.link),children:v.jsx(H0,{className:o(Rd.linkIcon,r.linkIcon)})}),v.jsx(moe,{as:"span"})]})})}const Yie=N_.extend({addOptions(){var t;return{...(t=this.parent)===null||t===void 0?void 0:t.call(this),scrollToAnchorOnMount:!0}},onCreate(){this.options.scrollToAnchorOnMount&&setTimeout(()=>{Gie(this.editor)})},addNodeView(){return p1(L_)}});function Gie(t){if(t.isDestroyed||!("heading"in t.storage))return;const n=window.location.hash.slice(1);if(!n)return;const r=window.document.getElementById(n);r&&t.options.element.contains(r)&&r.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"})}const Jie=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,Zie=Qt.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{}}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:t}){return["img",yt(this.options.HTMLAttributes,t)]},addCommands(){return{setImage:t=>({commands:e})=>e.insertContent({type:this.name,attrs:t})}},addInputRules(){return[hP({find:Jie,type:this.type,getAttributes:t=>{const[,,e,n,r]=t;return{src:n,alt:e,title:r}}})]}}),Xie=Kt({name:{ResizableImageResizer:j_}})(t=>({root:{position:"absolute",bottom:-3,right:-3,width:12,height:12,background:t.palette.primary.main,cursor:"nwse-resize"}}));function j_({onResize:t,className:e,mouseDown:n,setMouseDown:r}){const{classes:o,cx:i}=Xie();J.useEffect(()=>{if(!n)return;const a=l=>{t(l)};return window.addEventListener("mousemove",a),()=>{window.removeEventListener("mousemove",a)}},[n,t]),J.useEffect(()=>{const a=()=>{r(!1)};return window.addEventListener("mouseup",a),()=>{window.removeEventListener("mouseup",a)}},[r]);const s=J.useCallback(a=>{r(!0)},[r]);return v.jsx("div",{className:i(o.root,e),onMouseDown:s})}const Qie=15,ese=Kt({name:{ResizableImageComponent:$_}})(t=>({imageContainer:{display:"inline-flex",position:"relative"},image:{display:"block"},imageSelected:{outline:`3px solid ${t.palette.primary.main}`},resizer:{'.ProseMirror[contenteditable="false"] &':{display:"none"}}}));function $_(t){var e;const{node:n,selected:r,updateAttributes:o,extension:i}=t,{classes:s,cx:a}=ese(),{attrs:l}=n,u=J.useRef(null),[f,h]=J.useState(!1),m=r||f,g=J.useMemo(()=>rI(y=>{if(!u.current)return;const S=u.current.getBoundingClientRect(),C=y.clientX-S.x,E=y.clientY-S.y,T=Math.max(C,S.width/S.height*E,Qie);o({width:Math.round(T)})},50,{trailing:!0}),[o]),b=i.options.ChildComponent;return v.jsx(f1,{style:{textAlign:l.textAlign,width:"100%"},as:i.options.inline?"span":"div",children:v.jsxs("div",{className:s.imageContainer,children:[v.jsx("img",{ref:u,src:l.src,height:"auto",width:l.width?l.width:void 0,alt:l.alt||void 0,title:l.title||void 0,className:a(s.image,m&&"ProseMirror-selectednode",m&&s.imageSelected),style:{maxWidth:l.width?void 0:"auto",aspectRatio:(e=l.aspectRatio)!==null&&e!==void 0?e:void 0},"data-drag-handle":!0,onLoad:y=>{const S={};l.width||(S.width=y.currentTarget.naturalWidth),l.aspectRatio||(S.aspectRatio=String(y.currentTarget.naturalWidth/y.currentTarget.naturalHeight)),(S.width||S.aspectRatio)&&o(S)}}),m&&v.jsx(j_,{onResize:g,className:s.resizer,mouseDown:f,setMouseDown:h}),b&&v.jsx(b,{...t})]})})}const tse=Zie.extend({addOptions(){var t;return{...(t=this.parent)===null||t===void 0?void 0:t.call(this),isAllowedImgSrc:e=>!!e}},addAttributes(){var t;return{...(t=this.parent)===null||t===void 0?void 0:t.call(this),width:{default:null,renderHTML:e=>({width:e.width}),parseHTML:e=>e.getAttribute("width")},aspectRatio:{default:null,renderHTML:e=>e.aspectRatio?{style:`aspect-ratio: ${e.aspectRatio}`}:{},parseHTML:e=>e.style.aspectRatio}}},renderHTML({HTMLAttributes:t}){return["img",yt({height:"auto"},this.options.HTMLAttributes,t)]},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])',getAttrs:t=>{if(!(t instanceof Element))return!1;const e=t.getAttribute("src");return this.options.isAllowedImgSrc(e)&&null}}]},addInputRules(){var t;const e=(t=this.parent)===null||t===void 0?void 0:t.call(this);if(!e)return[];const n=r=>{const[,,o,i,s]=r;return{src:i,alt:o,title:s}};return e.map(r=>new du({find:r.find,handler:o=>{const i=n(o.match);if(this.options.isAllowedImgSrc(i.src))return r.handler(o)}}))},addNodeView(){return p1($_)}});var y0,b0;if(typeof WeakMap<"u"){let t=new WeakMap;y0=e=>t.get(e),b0=(e,n)=>(t.set(e,n),n)}else{const t=[];let n=0;y0=r=>{for(let o=0;o<t.length;o+=2)if(t[o]==r)return t[o+1]},b0=(r,o)=>(n==10&&(n=0),t[n++]=r,t[n++]=o)}var ln=class{constructor(t,e,n,r){this.width=t,this.height=e,this.map=n,this.problems=r}findCell(t){for(let e=0;e<this.map.length;e++){const n=this.map[e];if(n!=t)continue;const r=e%this.width,o=e/this.width|0;let i=r+1,s=o+1;for(let a=1;i<this.width&&this.map[e+a]==n;a++)i++;for(let a=1;s<this.height&&this.map[e+this.width*a]==n;a++)s++;return{left:r,top:o,right:i,bottom:s}}throw new RangeError(`No cell with offset ${t} found`)}colCount(t){for(let e=0;e<this.map.length;e++)if(this.map[e]==t)return e%this.width;throw new RangeError(`No cell with offset ${t} found`)}nextCell(t,e,n){const{left:r,right:o,top:i,bottom:s}=this.findCell(t);return e=="horiz"?(n<0?r==0:o==this.width)?null:this.map[i*this.width+(n<0?r-1:o)]:(n<0?i==0:s==this.height)?null:this.map[r+this.width*(n<0?i-1:s)]}rectBetween(t,e){const{left:n,right:r,top:o,bottom:i}=this.findCell(t),{left:s,right:a,top:l,bottom:u}=this.findCell(e);return{left:Math.min(n,s),top:Math.min(o,l),right:Math.max(r,a),bottom:Math.max(i,u)}}cellsInRect(t){const e=[],n={};for(let r=t.top;r<t.bottom;r++)for(let o=t.left;o<t.right;o++){const i=r*this.width+o,s=this.map[i];n[s]||(n[s]=!0,!(o==t.left&&o&&this.map[i-1]==s||r==t.top&&r&&this.map[i-this.width]==s)&&e.push(s))}return e}positionAt(t,e,n){for(let r=0,o=0;;r++){const i=o+n.child(r).nodeSize;if(r==t){let s=e+t*this.width;const a=(t+1)*this.width;for(;s<a&&this.map[s]<o;)s++;return s==a?i-1:this.map[s]}o=i}}static get(t){return y0(t)||b0(t,nse(t))}};function nse(t){if(t.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+t.type.name);const e=rse(t),n=t.childCount,r=[];let o=0,i=null;const s=[];for(let u=0,f=e*n;u<f;u++)r[u]=0;for(let u=0,f=0;u<n;u++){const h=t.child(u);f++;for(let b=0;;b++){for(;o<r.length&&r[o]!=0;)o++;if(b==h.childCount)break;const y=h.child(b),{colspan:S,rowspan:C,colwidth:E}=y.attrs;for(let T=0;T<C;T++){if(T+u>=n){(i||(i=[])).push({type:"overlong_rowspan",pos:f,n:C-T});break}const w=o+T*e;for(let M=0;M<S;M++){r[w+M]==0?r[w+M]=f:(i||(i=[])).push({type:"collision",row:u,pos:f,n:S-M});const R=E&&E[M];if(R){const _=(w+M)%e*2,I=s[_];I==null||I!=R&&s[_+1]==1?(s[_]=R,s[_+1]=1):I==R&&s[_+1]++}}}o+=S,f+=y.nodeSize}const m=(u+1)*e;let g=0;for(;o<m;)r[o++]==0&&g++;g&&(i||(i=[])).push({type:"missing",row:u,n:g}),f++}(e===0||n===0)&&(i||(i=[])).push({type:"zero_sized"});const a=new ln(e,n,r,i);let l=!1;for(let u=0;!l&&u<s.length;u+=2)s[u]!=null&&s[u+1]<n&&(l=!0);return l&&ose(a,s,t),a}function rse(t){let e=-1,n=!1;for(let r=0;r<t.childCount;r++){const o=t.child(r);let i=0;if(n)for(let s=0;s<r;s++){const a=t.child(s);for(let l=0;l<a.childCount;l++){const u=a.child(l);s+u.attrs.rowspan>r&&(i+=u.attrs.colspan)}}for(let s=0;s<o.childCount;s++){const a=o.child(s);i+=a.attrs.colspan,a.attrs.rowspan>1&&(n=!0)}e==-1?e=i:e!=i&&(e=Math.max(e,i))}return e}function ose(t,e,n){t.problems||(t.problems=[]);const r={};for(let o=0;o<t.map.length;o++){const i=t.map[o];if(r[i])continue;r[i]=!0;const s=n.nodeAt(i);if(!s)throw new RangeError(`No cell with offset ${i} found`);let a=null;const l=s.attrs;for(let u=0;u<l.colspan;u++){const f=(o+u)%t.width,h=e[f*2];h!=null&&(!l.colwidth||l.colwidth[u]!=h)&&((a||(a=ise(l)))[u]=h)}a&&t.problems.unshift({type:"colwidth mismatch",pos:i,colwidth:a})}}function ise(t){if(t.colwidth)return t.colwidth.slice();const e=[];for(let n=0;n<t.colspan;n++)e.push(0);return e}function qn(t){let e=t.cached.tableNodeTypes;if(!e){e=t.cached.tableNodeTypes={};for(const n in t.nodes){const r=t.nodes[n],o=r.spec.tableRole;o&&(e[o]=r)}}return e}var Ii=new gn("selectingCells");function hl(t){for(let e=t.depth-1;e>0;e--)if(t.node(e).type.spec.tableRole=="row")return t.node(0).resolve(t.before(e+1));return null}function sse(t){for(let e=t.depth;e>0;e--){const n=t.node(e).type.spec.tableRole;if(n==="cell"||n==="header_cell")return t.node(e)}return null}function po(t){const e=t.selection.$head;for(let n=e.depth;n>0;n--)if(e.node(n).type.spec.tableRole=="row")return!0;return!1}function fh(t){const e=t.selection;if("$anchorCell"in e&&e.$anchorCell)return e.$anchorCell.pos>e.$headCell.pos?e.$anchorCell:e.$headCell;if("node"in e&&e.node&&e.node.type.spec.tableRole=="cell")return e.$anchor;const n=hl(e.$head)||ase(e.$head);if(n)return n;throw new RangeError(`No cell found around position ${e.head}`)}function ase(t){for(let e=t.nodeAfter,n=t.pos;e;e=e.firstChild,n++){const r=e.type.spec.tableRole;if(r=="cell"||r=="header_cell")return t.doc.resolve(n)}for(let e=t.nodeBefore,n=t.pos;e;e=e.lastChild,n--){const r=e.type.spec.tableRole;if(r=="cell"||r=="header_cell")return t.doc.resolve(n-e.nodeSize)}}function v0(t){return t.parent.type.spec.tableRole=="row"&&!!t.nodeAfter}function lse(t){return t.node(0).resolve(t.pos+t.nodeAfter.nodeSize)}function S1(t,e){return t.depth==e.depth&&t.pos>=e.start(-1)&&t.pos<=e.end(-1)}function F_(t,e,n){const r=t.node(-1),o=ln.get(r),i=t.start(-1),s=o.nextCell(t.pos-i,e,n);return s==null?null:t.node(0).resolve(i+s)}function qs(t,e,n=1){const r={...t,colspan:t.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(e,n),r.colwidth.some(o=>o>0)||(r.colwidth=null)),r}function B_(t,e,n=1){const r={...t,colspan:t.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let o=0;o<n;o++)r.colwidth.splice(e,0,0)}return r}function cse(t,e,n){const r=qn(e.type.schema).header_cell;for(let o=0;o<t.height;o++)if(e.nodeAt(t.map[n+o*t.width]).type!=r)return!1;return!0}var Bt=class Xo extends Qe{constructor(e,n=e){const r=e.node(-1),o=ln.get(r),i=e.start(-1),s=o.rectBetween(e.pos-i,n.pos-i),a=e.node(0),l=o.cellsInRect(s).filter(f=>f!=n.pos-i);l.unshift(n.pos-i);const u=l.map(f=>{const h=r.nodeAt(f);if(!h)throw RangeError(`No cell with offset ${f} found`);const m=i+f+1;return new pD(a.resolve(m),a.resolve(m+h.content.size))});super(u[0].$from,u[0].$to,u),this.$anchorCell=e,this.$headCell=n}map(e,n){const r=e.resolve(n.map(this.$anchorCell.pos)),o=e.resolve(n.map(this.$headCell.pos));if(v0(r)&&v0(o)&&S1(r,o)){const i=this.$anchorCell.node(-1)!=r.node(-1);return i&&this.isRowSelection()?Xo.rowSelection(r,o):i&&this.isColSelection()?Xo.colSelection(r,o):new Xo(r,o)}return Ge.between(r,o)}content(){const e=this.$anchorCell.node(-1),n=ln.get(e),r=this.$anchorCell.start(-1),o=n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r),i={},s=[];for(let l=o.top;l<o.bottom;l++){const u=[];for(let f=l*n.width+o.left,h=o.left;h<o.right;h++,f++){const m=n.map[f];if(i[m])continue;i[m]=!0;const g=n.findCell(m);let b=e.nodeAt(m);if(!b)throw RangeError(`No cell with offset ${m} found`);const y=o.left-g.left,S=g.right-o.right;if(y>0||S>0){let C=b.attrs;if(y>0&&(C=qs(C,0,y)),S>0&&(C=qs(C,C.colspan-S,S)),g.left<o.left){if(b=b.type.createAndFill(C),!b)throw RangeError(`Could not create cell with attrs ${JSON.stringify(C)}`)}else b=b.type.create(C,b.content)}if(g.top<o.top||g.bottom>o.bottom){const C={...b.attrs,rowspan:Math.min(g.bottom,o.bottom)-Math.max(g.top,o.top)};g.top<o.top?b=b.type.createAndFill(C):b=b.type.create(C,b.content)}u.push(b)}s.push(e.child(l).copy(Te.from(u)))}const a=this.isColSelection()&&this.isRowSelection()?e:s;return new Ae(Te.from(a),1,1)}replace(e,n=Ae.empty){const r=e.steps.length,o=this.ranges;for(let s=0;s<o.length;s++){const{$from:a,$to:l}=o[s],u=e.mapping.slice(r);e.replace(u.map(a.pos),u.map(l.pos),s?Ae.empty:n)}const i=Qe.findFrom(e.doc.resolve(e.mapping.slice(r).map(this.to)),-1);i&&e.setSelection(i)}replaceWith(e,n){this.replace(e,new Ae(Te.from(n),0,0))}forEachCell(e){const n=this.$anchorCell.node(-1),r=ln.get(n),o=this.$anchorCell.start(-1),i=r.cellsInRect(r.rectBetween(this.$anchorCell.pos-o,this.$headCell.pos-o));for(let s=0;s<i.length;s++)e(n.nodeAt(i[s]),o+i[s])}isColSelection(){const e=this.$anchorCell.index(-1),n=this.$headCell.index(-1);if(Math.min(e,n)>0)return!1;const r=e+this.$anchorCell.nodeAfter.attrs.rowspan,o=n+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(r,o)==this.$headCell.node(-1).childCount}static colSelection(e,n=e){const r=e.node(-1),o=ln.get(r),i=e.start(-1),s=o.findCell(e.pos-i),a=o.findCell(n.pos-i),l=e.node(0);return s.top<=a.top?(s.top>0&&(e=l.resolve(i+o.map[s.left])),a.bottom<o.height&&(n=l.resolve(i+o.map[o.width*(o.height-1)+a.right-1]))):(a.top>0&&(n=l.resolve(i+o.map[a.left])),s.bottom<o.height&&(e=l.resolve(i+o.map[o.width*(o.height-1)+s.right-1]))),new Xo(e,n)}isRowSelection(){const e=this.$anchorCell.node(-1),n=ln.get(e),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 s=o+this.$anchorCell.nodeAfter.attrs.colspan,a=i+this.$headCell.nodeAfter.attrs.colspan;return Math.max(s,a)==n.width}eq(e){return e instanceof Xo&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,n=e){const r=e.node(-1),o=ln.get(r),i=e.start(-1),s=o.findCell(e.pos-i),a=o.findCell(n.pos-i),l=e.node(0);return s.left<=a.left?(s.left>0&&(e=l.resolve(i+o.map[s.top*o.width])),a.right<o.width&&(n=l.resolve(i+o.map[o.width*(a.top+1)-1]))):(a.left>0&&(n=l.resolve(i+o.map[a.top*o.width])),s.right<o.width&&(e=l.resolve(i+o.map[o.width*(s.top+1)-1]))),new Xo(e,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(e,n){return new Xo(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){return new Xo(e.resolve(n),e.resolve(r))}getBookmark(){return new use(this.$anchorCell.pos,this.$headCell.pos)}};Bt.prototype.visible=!1;Qe.jsonID("cell",Bt);var use=class V_{constructor(e,n){this.anchor=e,this.head=n}map(e){return new V_(e.map(this.anchor),e.map(this.head))}resolve(e){const n=e.resolve(this.anchor),r=e.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&&S1(n,r)?new Bt(n,r):Qe.near(r,1)}};function dse(t){if(!(t.selection instanceof Bt))return null;const e=[];return t.selection.forEachCell((n,r)=>{e.push(Ln.node(r,r+n.nodeSize,{class:"selectedCell"}))}),Zt.create(t.doc,e)}function fse({$from:t,$to:e}){if(t.pos==e.pos||t.pos<e.pos-6)return!1;let n=t.pos,r=e.pos,o=t.depth;for(;o>=0&&!(t.after(o+1)<t.end(o));o--,n++);for(let i=e.depth;i>=0&&!(e.before(i+1)>e.start(i));i--,r--);return n==r&&/row|table/.test(t.node(o).type.spec.tableRole)}function pse({$from:t,$to:e}){let n,r;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"){n=i;break}}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"){r=i;break}}return n!==r&&e.parentOffset===0}function hse(t,e,n){const r=(e||t).selection,o=(e||t).doc;let i,s;if(r instanceof qe&&(s=r.node.type.spec.tableRole)){if(s=="cell"||s=="header_cell")i=Bt.create(o,r.from);else if(s=="row"){const a=o.resolve(r.from+1);i=Bt.rowSelection(a,a)}else if(!n){const a=ln.get(r.node),l=r.from+1,u=l+a.map[a.width*a.height-1];i=Bt.create(o,l+1,u)}}else r instanceof Ge&&fse(r)?i=Ge.create(o,r.from):r instanceof Ge&&pse(r)&&(i=Ge.create(o,r.$from.start(),r.$from.end()));return i&&(e||(e=t.tr)).setSelection(i),e}var mse=new gn("fix-tables");function z_(t,e,n,r){const o=t.childCount,i=e.childCount;e:for(let s=0,a=0;s<i;s++){const l=e.child(s);for(let u=a,f=Math.min(o,s+3);u<f;u++)if(t.child(u)==l){a=u+1,n+=l.nodeSize;continue e}r(l,n),a<o&&t.child(a).sameMarkup(l)?z_(t.child(a),l,n+1,r):l.nodesBetween(0,l.content.size,r,n+1),n+=l.nodeSize}}function H_(t,e){let n;const r=(o,i)=>{o.type.spec.tableRole=="table"&&(n=gse(t,o,i,n))};return e?e.doc!=t.doc&&z_(e.doc,t.doc,0,r):t.doc.descendants(r),n}function gse(t,e,n,r){const o=ln.get(e);if(!o.problems)return r;r||(r=t.tr);const i=[];for(let l=0;l<o.height;l++)i.push(0);for(let l=0;l<o.problems.length;l++){const u=o.problems[l];if(u.type=="collision"){const f=e.nodeAt(u.pos);if(!f)continue;const h=f.attrs;for(let m=0;m<h.rowspan;m++)i[u.row+m]+=u.n;r.setNodeMarkup(r.mapping.map(n+1+u.pos),null,qs(h,h.colspan-u.n,u.n))}else if(u.type=="missing")i[u.row]+=u.n;else if(u.type=="overlong_rowspan"){const f=e.nodeAt(u.pos);if(!f)continue;r.setNodeMarkup(r.mapping.map(n+1+u.pos),null,{...f.attrs,rowspan:f.attrs.rowspan-u.n})}else if(u.type=="colwidth mismatch"){const f=e.nodeAt(u.pos);if(!f)continue;r.setNodeMarkup(r.mapping.map(n+1+u.pos),null,{...f.attrs,colwidth:u.colwidth})}else if(u.type=="zero_sized"){const f=r.mapping.map(n);r.delete(f,f+e.nodeSize)}}let s,a;for(let l=0;l<i.length;l++)i[l]&&(s==null&&(s=l),a=l);for(let l=0,u=n+1;l<o.height;l++){const f=e.child(l),h=u+f.nodeSize,m=i[l];if(m>0){let g="cell";f.firstChild&&(g=f.firstChild.type.spec.tableRole);const b=[];for(let S=0;S<m;S++){const C=qn(t.schema)[g].createAndFill();C&&b.push(C)}const y=(l==0||s==l-1)&&a==l?u+1:h-1;r.insert(r.mapping.map(y),b)}u=h}return r.setMeta(mse,{fixTables:!0})}function No(t){const e=t.selection,n=fh(t),r=n.node(-1),o=n.start(-1),i=ln.get(r);return{...e instanceof Bt?i.rectBetween(e.$anchorCell.pos-o,e.$headCell.pos-o):i.findCell(n.pos-o),tableStart:o,map:i,table:r}}function W_(t,{map:e,tableStart:n,table:r},o){let i=o>0?-1:0;cse(e,r,o+i)&&(i=o==0||o==e.width?null:0);for(let s=0;s<e.height;s++){const a=s*e.width+o;if(o>0&&o<e.width&&e.map[a-1]==e.map[a]){const l=e.map[a],u=r.nodeAt(l);t.setNodeMarkup(t.mapping.map(n+l),null,B_(u.attrs,o-e.colCount(l))),s+=u.attrs.rowspan-1}else{const l=i==null?qn(r.type.schema).cell:r.nodeAt(e.map[a+i]).type,u=e.positionAt(s,o,r);t.insert(t.mapping.map(n+u),l.createAndFill())}}return t}function yse(t,e){if(!po(t))return!1;if(e){const n=No(t);e(W_(t.tr,n,n.left))}return!0}function bse(t,e){if(!po(t))return!1;if(e){const n=No(t);e(W_(t.tr,n,n.right))}return!0}function vse(t,{map:e,table:n,tableStart:r},o){const i=t.mapping.maps.length;for(let s=0;s<e.height;){const a=s*e.width+o,l=e.map[a],u=n.nodeAt(l),f=u.attrs;if(o>0&&e.map[a-1]==l||o<e.width-1&&e.map[a+1]==l)t.setNodeMarkup(t.mapping.slice(i).map(r+l),null,qs(f,o-e.colCount(l)));else{const h=t.mapping.slice(i).map(r+l);t.delete(h,h+u.nodeSize)}s+=f.rowspan}}function xse(t,e){if(!po(t))return!1;if(e){const n=No(t),r=t.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let o=n.right-1;vse(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=ln.get(i)}e(r)}return!0}function Sse(t,e,n){var r;const o=qn(e.type.schema).header_cell;for(let i=0;i<t.width;i++)if(((r=e.nodeAt(t.map[i+n*t.width]))==null?void 0:r.type)!=o)return!1;return!0}function q_(t,{map:e,tableStart:n,table:r},o){var i;let s=n;for(let u=0;u<o;u++)s+=r.child(u).nodeSize;const a=[];let l=o>0?-1:0;Sse(e,r,o+l)&&(l=o==0||o==e.height?null:0);for(let u=0,f=e.width*o;u<e.width;u++,f++)if(o>0&&o<e.height&&e.map[f]==e.map[f-e.width]){const h=e.map[f],m=r.nodeAt(h).attrs;t.setNodeMarkup(n+h,null,{...m,rowspan:m.rowspan+1}),u+=m.colspan-1}else{const h=l==null?qn(r.type.schema).cell:(i=r.nodeAt(e.map[f+l*e.width]))==null?void 0:i.type,m=h==null?void 0:h.createAndFill();m&&a.push(m)}return t.insert(s,qn(r.type.schema).row.create(null,a)),t}function Cse(t,e){if(!po(t))return!1;if(e){const n=No(t);e(q_(t.tr,n,n.top))}return!0}function wse(t,e){if(!po(t))return!1;if(e){const n=No(t);e(q_(t.tr,n,n.bottom))}return!0}function Tse(t,{map:e,table:n,tableStart:r},o){let i=0;for(let u=0;u<o;u++)i+=n.child(u).nodeSize;const s=i+n.child(o).nodeSize,a=t.mapping.maps.length;t.delete(i+r,s+r);const l=new Set;for(let u=0,f=o*e.width;u<e.width;u++,f++){const h=e.map[f];if(!l.has(h)){if(l.add(h),o>0&&h==e.map[f-e.width]){const m=n.nodeAt(h).attrs;t.setNodeMarkup(t.mapping.slice(a).map(h+r),null,{...m,rowspan:m.rowspan-1}),u+=m.colspan-1}else if(o<e.height&&h==e.map[f+e.width]){const m=n.nodeAt(h),g=m.attrs,b=m.type.create({...g,rowspan:m.attrs.rowspan-1},m.content),y=e.positionAt(o+1,u,n);t.insert(t.mapping.slice(a).map(r+y),b),u+=g.colspan-1}}}}function Ese(t,e){if(!po(t))return!1;if(e){const n=No(t),r=t.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let o=n.bottom-1;Tse(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=ln.get(n.table)}e(r)}return!0}function ER(t){const e=t.content;return e.childCount==1&&e.child(0).isTextblock&&e.child(0).childCount==0}function kse({width:t,height:e,map:n},r){let o=r.top*t+r.left,i=o,s=(r.bottom-1)*t+r.left,a=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<t&&n[a]==n[a+1])return!0;i+=t,a+=t}for(let l=r.left;l<r.right;l++){if(r.top>0&&n[o]==n[o-t]||r.bottom<e&&n[s]==n[s+t])return!0;o++,s++}return!1}function kR(t,e){const n=t.selection;if(!(n instanceof Bt)||n.$anchorCell.pos==n.$headCell.pos)return!1;const r=No(t),{map:o}=r;if(kse(o,r))return!1;if(e){const i=t.tr,s={};let a=Te.empty,l,u;for(let f=r.top;f<r.bottom;f++)for(let h=r.left;h<r.right;h++){const m=o.map[f*o.width+h],g=r.table.nodeAt(m);if(!(s[m]||!g))if(s[m]=!0,l==null)l=m,u=g;else{ER(g)||(a=a.append(g.content));const b=i.mapping.map(m+r.tableStart);i.delete(b,b+g.nodeSize)}}if(l==null||u==null)return!0;if(i.setNodeMarkup(l+r.tableStart,null,{...B_(u.attrs,u.attrs.colspan,r.right-r.left-u.attrs.colspan),rowspan:r.bottom-r.top}),a.size){const f=l+1+u.content.size,h=ER(u)?l+1:f;i.replaceWith(h+r.tableStart,f+r.tableStart,a)}i.setSelection(new Bt(i.doc.resolve(l+r.tableStart))),e(i)}return!0}function MR(t,e){const n=qn(t.schema);return Mse(({node:r})=>n[r.type.spec.tableRole])(t,e)}function Mse(t){return(e,n)=>{var r;const o=e.selection;let i,s;if(o instanceof Bt){if(o.$anchorCell.pos!=o.$headCell.pos)return!1;i=o.$anchorCell.nodeAfter,s=o.$anchorCell.pos}else{if(i=sse(o.$from),!i)return!1;s=(r=hl(o.$from))==null?void 0:r.pos}if(i==null||s==null||i.attrs.colspan==1&&i.attrs.rowspan==1)return!1;if(n){let a=i.attrs;const l=[],u=a.colwidth;a.rowspan>1&&(a={...a,rowspan:1}),a.colspan>1&&(a={...a,colspan:1});const f=No(e),h=e.tr;for(let g=0;g<f.right-f.left;g++)l.push(u?{...a,colwidth:u&&u[g]?[u[g]]:null}:a);let m;for(let g=f.top;g<f.bottom;g++){let b=f.map.positionAt(g,f.left,f.table);g==f.top&&(b+=i.nodeSize);for(let y=f.left,S=0;y<f.right;y++,S++)y==f.left&&g==f.top||h.insert(m=h.mapping.map(b+f.tableStart,1),t({node:i,row:g,col:y}).createAndFill(l[S]))}h.setNodeMarkup(s,t({node:i,row:f.top,col:f.left}),l[0]),o instanceof Bt&&h.setSelection(new Bt(h.doc.resolve(o.$anchorCell.pos),m?h.doc.resolve(m):void 0)),n(h)}return!0}}function Ose(t,e){return function(n,r){if(!po(n))return!1;const o=fh(n);if(o.nodeAfter.attrs[t]===e)return!1;if(r){const i=n.tr;n.selection instanceof Bt?n.selection.forEachCell((s,a)=>{s.attrs[t]!==e&&i.setNodeMarkup(a,null,{...s.attrs,[t]:e})}):i.setNodeMarkup(o.pos,null,{...o.nodeAfter.attrs,[t]:e}),r(i)}return!0}}function Rse(t){return function(e,n){if(!po(e))return!1;if(n){const r=qn(e.schema),o=No(e),i=e.tr,s=o.map.cellsInRect(t=="column"?{left:o.left,top:0,right:o.right,bottom:o.map.height}:t=="row"?{left:0,top:o.top,right:o.map.width,bottom:o.bottom}:o),a=s.map(l=>o.table.nodeAt(l));for(let l=0;l<s.length;l++)a[l].type==r.header_cell&&i.setNodeMarkup(o.tableStart+s[l],r.cell,a[l].attrs);if(i.steps.length==0)for(let l=0;l<s.length;l++)i.setNodeMarkup(o.tableStart+s[l],r.header_cell,a[l].attrs);n(i)}return!0}}function OR(t,e,n){const r=e.map.cellsInRect({left:0,top:0,right:t=="row"?e.map.width:1,bottom:t=="column"?e.map.height:1});for(let o=0;o<r.length;o++){const i=e.table.nodeAt(r[o]);if(i&&i.type!==n.header_cell)return!1}return!0}function qc(t,e){return e=e||{useDeprecatedLogic:!1},e.useDeprecatedLogic?Rse(t):function(n,r){if(!po(n))return!1;if(r){const o=qn(n.schema),i=No(n),s=n.tr,a=OR("row",i,o),l=OR("column",i,o),f=(t==="column"?a:t==="row"?l:!1)?1:0,h=t=="column"?{left:0,top:f,right:1,bottom:i.map.height}:t=="row"?{left:f,top:0,right:i.map.width,bottom:1}:i,m=t=="column"?l?o.cell:o.header_cell:t=="row"?a?o.cell:o.header_cell:o.cell;i.map.cellsInRect(h).forEach(g=>{const b=g+i.tableStart,y=s.doc.nodeAt(b);y&&s.setNodeMarkup(b,m,y.attrs)}),r(s)}return!0}}qc("row",{useDeprecatedLogic:!0});qc("column",{useDeprecatedLogic:!0});var Ase=qc("cell",{useDeprecatedLogic:!0});function Ise(t,e){if(e<0){const n=t.nodeBefore;if(n)return t.pos-n.nodeSize;for(let r=t.index(-1)-1,o=t.before();r>=0;r--){const i=t.node(-1).child(r),s=i.lastChild;if(s)return o-1-s.nodeSize;o-=i.nodeSize}}else{if(t.index()<t.parent.childCount-1)return t.pos+t.nodeAfter.nodeSize;const n=t.node(-1);for(let r=t.indexAfter(-1),o=t.after();r<n.childCount;r++){const i=n.child(r);if(i.childCount)return o+1;o+=i.nodeSize}}return null}function RR(t){return function(e,n){if(!po(e))return!1;const r=Ise(fh(e),t);if(r==null)return!1;if(n){const o=e.doc.resolve(r);n(e.tr.setSelection(Ge.between(o,lse(o))).scrollIntoView())}return!0}}function Dse(t,e){const n=t.selection.$anchor;for(let r=n.depth;r>0;r--)if(n.node(r).type.spec.tableRole=="table")return e&&e(t.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}function Ad(t,e){const n=t.selection;if(!(n instanceof Bt))return!1;if(e){const r=t.tr,o=qn(t.schema).cell.createAndFill().content;n.forEachCell((i,s)=>{i.content.eq(o)||r.replace(r.mapping.map(s+1),r.mapping.map(s+i.nodeSize-1),new Ae(o,0,0))}),r.docChanged&&e(r)}return!0}function Pse(t){if(!t.size)return null;let{content:e,openStart:n,openEnd:r}=t;for(;e.childCount==1&&(n>0&&r>0||e.child(0).type.spec.tableRole=="table");)n--,r--,e=e.child(0).content;const o=e.child(0),i=o.type.spec.tableRole,s=o.type.schema,a=[];if(i=="row")for(let l=0;l<e.childCount;l++){let u=e.child(l).content;const f=l?0:Math.max(0,n-1),h=l<e.childCount-1?0:Math.max(0,r-1);(f||h)&&(u=x0(qn(s).row,new Ae(u,f,h)).content),a.push(u)}else if(i=="cell"||i=="header_cell")a.push(n||r?x0(qn(s).row,new Ae(e,n,r)).content:e);else return null;return _se(s,a)}function _se(t,e){const n=[];for(let o=0;o<e.length;o++){const i=e[o];for(let s=i.childCount-1;s>=0;s--){const{rowspan:a,colspan:l}=i.child(s).attrs;for(let u=o;u<o+a;u++)n[u]=(n[u]||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>=e.length&&e.push(Te.empty),n[o]<r){const i=qn(t).cell.createAndFill(),s=[];for(let a=n[o];a<r;a++)s.push(i);e[o]=e[o].append(Te.from(s))}return{height:e.length,width:r,rows:e}}function x0(t,e){const n=t.createAndFill();return new Rx(n).replace(0,n.content.size,e).doc}function Nse({width:t,height:e,rows:n},r,o){if(t!=r){const i=[],s=[];for(let a=0;a<n.length;a++){const l=n[a],u=[];for(let f=i[a]||0,h=0;f<r;h++){let m=l.child(h%l.childCount);f+m.attrs.colspan>r&&(m=m.type.createChecked(qs(m.attrs,m.attrs.colspan,f+m.attrs.colspan-r),m.content)),u.push(m),f+=m.attrs.colspan;for(let g=1;g<m.attrs.rowspan;g++)i[a+g]=(i[a+g]||0)+m.attrs.colspan}s.push(Te.from(u))}n=s,t=r}if(e!=o){const i=[];for(let s=0,a=0;s<o;s++,a++){const l=[],u=n[a%e];for(let f=0;f<u.childCount;f++){let h=u.child(f);s+h.attrs.rowspan>o&&(h=h.type.create({...h.attrs,rowspan:Math.max(1,o-h.attrs.rowspan)},h.content)),l.push(h)}i.push(Te.from(l))}n=i,e=o}return{width:t,height:e,rows:n}}function Lse(t,e,n,r,o,i,s){const a=t.doc.type.schema,l=qn(a);let u,f;if(o>e.width)for(let h=0,m=0;h<e.height;h++){const g=n.child(h);m+=g.nodeSize;const b=[];let y;g.lastChild==null||g.lastChild.type==l.cell?y=u||(u=l.cell.createAndFill()):y=f||(f=l.header_cell.createAndFill());for(let S=e.width;S<o;S++)b.push(y);t.insert(t.mapping.slice(s).map(m-1+r),b)}if(i>e.height){const h=[];for(let b=0,y=(e.height-1)*e.width;b<Math.max(e.width,o);b++){const S=b>=e.width?!1:n.nodeAt(e.map[y+b]).type==l.header_cell;h.push(S?f||(f=l.header_cell.createAndFill()):u||(u=l.cell.createAndFill()))}const m=l.row.create(null,Te.from(h)),g=[];for(let b=e.height;b<i;b++)g.push(m);t.insert(t.mapping.slice(s).map(r+n.nodeSize-2),g)}return!!(u||f)}function AR(t,e,n,r,o,i,s,a){if(s==0||s==e.height)return!1;let l=!1;for(let u=o;u<i;u++){const f=s*e.width+u,h=e.map[f];if(e.map[f-e.width]==h){l=!0;const m=n.nodeAt(h),{top:g,left:b}=e.findCell(h);t.setNodeMarkup(t.mapping.slice(a).map(h+r),null,{...m.attrs,rowspan:s-g}),t.insert(t.mapping.slice(a).map(e.positionAt(s,b,n)),m.type.createAndFill({...m.attrs,rowspan:g+m.attrs.rowspan-s})),u+=m.attrs.colspan-1}}return l}function IR(t,e,n,r,o,i,s,a){if(s==0||s==e.width)return!1;let l=!1;for(let u=o;u<i;u++){const f=u*e.width+s,h=e.map[f];if(e.map[f-1]==h){l=!0;const m=n.nodeAt(h),g=e.colCount(h),b=t.mapping.slice(a).map(h+r);t.setNodeMarkup(b,null,qs(m.attrs,s-g,m.attrs.colspan-(s-g))),t.insert(b+m.nodeSize,m.type.createAndFill(qs(m.attrs,0,s-g))),u+=m.attrs.rowspan-1}}return l}function DR(t,e,n,r,o){let i=n?t.doc.nodeAt(n-1):t.doc;if(!i)throw new Error("No table found");let s=ln.get(i);const{top:a,left:l}=r,u=l+o.width,f=a+o.height,h=t.tr;let m=0;function g(){if(i=n?h.doc.nodeAt(n-1):h.doc,!i)throw new Error("No table found");s=ln.get(i),m=h.mapping.maps.length}Lse(h,s,i,n,u,f,m)&&g(),AR(h,s,i,n,l,u,a,m)&&g(),AR(h,s,i,n,l,u,f,m)&&g(),IR(h,s,i,n,a,f,l,m)&&g(),IR(h,s,i,n,a,f,u,m)&&g();for(let b=a;b<f;b++){const y=s.positionAt(b,l,i),S=s.positionAt(b,u,i);h.replace(h.mapping.slice(m).map(y+n),h.mapping.slice(m).map(S+n),new Ae(o.rows[b-a],0,0))}g(),h.setSelection(new Bt(h.doc.resolve(n+s.positionAt(a,l,i)),h.doc.resolve(n+s.positionAt(f-1,u-1,i)))),e(h)}var jse=Bx({ArrowLeft:Id("horiz",-1),ArrowRight:Id("horiz",1),ArrowUp:Id("vert",-1),ArrowDown:Id("vert",1),"Shift-ArrowLeft":Dd("horiz",-1),"Shift-ArrowRight":Dd("horiz",1),"Shift-ArrowUp":Dd("vert",-1),"Shift-ArrowDown":Dd("vert",1),Backspace:Ad,"Mod-Backspace":Ad,Delete:Ad,"Mod-Delete":Ad});function nf(t,e,n){return n.eq(t.selection)?!1:(e&&e(t.tr.setSelection(n).scrollIntoView()),!0)}function Id(t,e){return(n,r,o)=>{if(!o)return!1;const i=n.selection;if(i instanceof Bt)return nf(n,r,Qe.near(i.$headCell,e));if(t!="horiz"&&!i.empty)return!1;const s=U_(o,t,e);if(s==null)return!1;if(t=="horiz")return nf(n,r,Qe.near(n.doc.resolve(i.head+e),e));{const a=n.doc.resolve(s),l=F_(a,t,e);let u;return l?u=Qe.near(l,1):e<0?u=Qe.near(n.doc.resolve(a.before(-1)),-1):u=Qe.near(n.doc.resolve(a.after(-1)),1),nf(n,r,u)}}}function Dd(t,e){return(n,r,o)=>{if(!o)return!1;const i=n.selection;let s;if(i instanceof Bt)s=i;else{const l=U_(o,t,e);if(l==null)return!1;s=new Bt(n.doc.resolve(l))}const a=F_(s.$headCell,t,e);return a?nf(n,r,new Bt(s.$anchorCell,a)):!1}}function $se(t,e){const n=t.state.doc,r=hl(n.resolve(e));return r?(t.dispatch(t.state.tr.setSelection(new Bt(r))),!0):!1}function Fse(t,e,n){if(!po(t.state))return!1;let r=Pse(n);const o=t.state.selection;if(o instanceof Bt){r||(r={width:1,height:1,rows:[Te.from(x0(qn(t.state.schema).cell,n))]});const i=o.$anchorCell.node(-1),s=o.$anchorCell.start(-1),a=ln.get(i).rectBetween(o.$anchorCell.pos-s,o.$headCell.pos-s);return r=Nse(r,a.right-a.left,a.bottom-a.top),DR(t.state,t.dispatch,s,a,r),!0}else if(r){const i=fh(t.state),s=i.start(-1);return DR(t.state,t.dispatch,s,ln.get(i.node(-1)).findCell(i.pos-s),r),!0}else return!1}function Bse(t,e){var n;if(e.ctrlKey||e.metaKey)return;const r=PR(t,e.target);let o;if(e.shiftKey&&t.state.selection instanceof Bt)i(t.state.selection.$anchorCell,e),e.preventDefault();else if(e.shiftKey&&r&&(o=hl(t.state.selection.$anchor))!=null&&((n=hv(t,e))==null?void 0:n.pos)!=o.pos)i(o,e),e.preventDefault();else if(!r)return;function i(l,u){let f=hv(t,u);const h=Ii.getState(t.state)==null;if(!f||!S1(l,f))if(h)f=l;else return;const m=new Bt(l,f);if(h||!t.state.selection.eq(m)){const g=t.state.tr.setSelection(m);h&&g.setMeta(Ii,l.pos),t.dispatch(g)}}function s(){t.root.removeEventListener("mouseup",s),t.root.removeEventListener("dragstart",s),t.root.removeEventListener("mousemove",a),Ii.getState(t.state)!=null&&t.dispatch(t.state.tr.setMeta(Ii,-1))}function a(l){const u=l,f=Ii.getState(t.state);let h;if(f!=null)h=t.state.doc.resolve(f);else if(PR(t,u.target)!=r&&(h=hv(t,e),!h))return s();h&&i(h,u)}t.root.addEventListener("mouseup",s),t.root.addEventListener("dragstart",s),t.root.addEventListener("mousemove",a)}function U_(t,e,n){if(!(t.state.selection instanceof Ge))return null;const{$head:r}=t.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 a=r.before(o),l=e=="vert"?n>0?"down":"up":n>0?"right":"left";return t.endOfTextblock(l)?a:null}}return null}function PR(t,e){for(;e&&e!=t.dom;e=e.parentNode)if(e.nodeName=="TD"||e.nodeName=="TH")return e;return null}function hv(t,e){const n=t.posAtCoords({left:e.clientX,top:e.clientY});return n&&n?hl(t.state.doc.resolve(n.pos)):null}var Vse=class{constructor(e,n){this.node=e,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")),S0(e,this.colgroup,this.table,n),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!=this.node.type?!1:(this.node=e,S0(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return e.type=="attributes"&&(e.target==this.table||this.colgroup.contains(e.target))}};function S0(t,e,n,r,o,i){var s;let a=0,l=!0,u=e.firstChild;const f=t.firstChild;if(f){for(let h=0,m=0;h<f.childCount;h++){const{colspan:g,colwidth:b}=f.child(h).attrs;for(let y=0;y<g;y++,m++){const S=o==m?i:b&&b[y],C=S?S+"px":"";if(a+=S||r,S||(l=!1),u)u.style.width!=C&&(u.style.width=C),u=u.nextSibling;else{const E=document.createElement("col");E.style.width=C,e.appendChild(E)}}}for(;u;){const h=u.nextSibling;(s=u.parentNode)==null||s.removeChild(u),u=h}l?(n.style.width=a+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=a+"px")}}var kr=new gn("tableColumnResizing");function K_({handleWidth:t=5,cellMinWidth:e=25,defaultCellMinWidth:n=100,View:r=Vse,lastColumnResizable:o=!0}={}){const i=new en({key:kr,state:{init(s,a){var l,u;const f=(u=(l=i.spec)==null?void 0:l.props)==null?void 0:u.nodeViews,h=qn(a.schema).table.name;return r&&f&&(f[h]=(m,g)=>new r(m,n,g)),new zse(-1,!1)},apply(s,a){return a.apply(s)}},props:{attributes:s=>{const a=kr.getState(s);return a&&a.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(s,a)=>{Hse(s,a,t,o)},mouseleave:s=>{Wse(s)},mousedown:(s,a)=>{qse(s,a,e,n)}},decorations:s=>{const a=kr.getState(s);if(a&&a.activeHandle>-1)return Jse(s,a.activeHandle)},nodeViews:{}}});return i}var zse=class rf{constructor(e,n){this.activeHandle=e,this.dragging=n}apply(e){const n=this,r=e.getMeta(kr);if(r&&r.setHandle!=null)return new rf(r.setHandle,!1);if(r&&r.setDragging!==void 0)return new rf(n.activeHandle,r.setDragging);if(n.activeHandle>-1&&e.docChanged){let o=e.mapping.map(n.activeHandle,-1);return v0(e.doc.resolve(o))||(o=-1),new rf(o,n.dragging)}return n}};function Hse(t,e,n,r){if(!t.editable)return;const o=kr.getState(t.state);if(o&&!o.dragging){const i=Kse(e.target);let s=-1;if(i){const{left:a,right:l}=i.getBoundingClientRect();e.clientX-a<=n?s=_R(t,e,"left",n):l-e.clientX<=n&&(s=_R(t,e,"right",n))}if(s!=o.activeHandle){if(!r&&s!==-1){const a=t.state.doc.resolve(s),l=a.node(-1),u=ln.get(l),f=a.start(-1);if(u.colCount(a.pos-f)+a.nodeAfter.attrs.colspan-1==u.width-1)return}Y_(t,s)}}}function Wse(t){if(!t.editable)return;const e=kr.getState(t.state);e&&e.activeHandle>-1&&!e.dragging&&Y_(t,-1)}function qse(t,e,n,r){var o;if(!t.editable)return!1;const i=(o=t.dom.ownerDocument.defaultView)!=null?o:window,s=kr.getState(t.state);if(!s||s.activeHandle==-1||s.dragging)return!1;const a=t.state.doc.nodeAt(s.activeHandle),l=Use(t,s.activeHandle,a.attrs);t.dispatch(t.state.tr.setMeta(kr,{setDragging:{startX:e.clientX,startWidth:l}}));function u(h){i.removeEventListener("mouseup",u),i.removeEventListener("mousemove",f);const m=kr.getState(t.state);m!=null&&m.dragging&&(Yse(t,m.activeHandle,NR(m.dragging,h,n)),t.dispatch(t.state.tr.setMeta(kr,{setDragging:null})))}function f(h){if(!h.which)return u(h);const m=kr.getState(t.state);if(m&&m.dragging){const g=NR(m.dragging,h,n);LR(t,m.activeHandle,g,r)}}return LR(t,s.activeHandle,l,r),i.addEventListener("mouseup",u),i.addEventListener("mousemove",f),e.preventDefault(),!0}function Use(t,e,{colspan:n,colwidth:r}){const o=r&&r[r.length-1];if(o)return o;const i=t.domAtPos(e);let a=i.node.childNodes[i.offset].offsetWidth,l=n;if(r)for(let u=0;u<n;u++)r[u]&&(a-=r[u],l--);return a/l}function Kse(t){for(;t&&t.nodeName!="TD"&&t.nodeName!="TH";)t=t.classList&&t.classList.contains("ProseMirror")?null:t.parentNode;return t}function _R(t,e,n,r){const o=n=="right"?-r:r,i=t.posAtCoords({left:e.clientX+o,top:e.clientY});if(!i)return-1;const{pos:s}=i,a=hl(t.state.doc.resolve(s));if(!a)return-1;if(n=="right")return a.pos;const l=ln.get(a.node(-1)),u=a.start(-1),f=l.map.indexOf(a.pos-u);return f%l.width==0?-1:u+l.map[f-1]}function NR(t,e,n){const r=e.clientX-t.startX;return Math.max(n,t.startWidth+r)}function Y_(t,e){t.dispatch(t.state.tr.setMeta(kr,{setHandle:e}))}function Yse(t,e,n){const r=t.state.doc.resolve(e),o=r.node(-1),i=ln.get(o),s=r.start(-1),a=i.colCount(r.pos-s)+r.nodeAfter.attrs.colspan-1,l=t.state.tr;for(let u=0;u<i.height;u++){const f=u*i.width+a;if(u&&i.map[f]==i.map[f-i.width])continue;const h=i.map[f],m=o.nodeAt(h).attrs,g=m.colspan==1?0:a-i.colCount(h);if(m.colwidth&&m.colwidth[g]==n)continue;const b=m.colwidth?m.colwidth.slice():Gse(m.colspan);b[g]=n,l.setNodeMarkup(s+h,null,{...m,colwidth:b})}l.docChanged&&t.dispatch(l)}function LR(t,e,n,r){const o=t.state.doc.resolve(e),i=o.node(-1),s=o.start(-1),a=ln.get(i).colCount(o.pos-s)+o.nodeAfter.attrs.colspan-1;let l=t.domAtPos(o.start(-1)).node;for(;l&&l.nodeName!="TABLE";)l=l.parentNode;l&&S0(i,l.firstChild,l,r,a,n)}function Gse(t){return Array(t).fill(0)}function Jse(t,e){var n;const r=[],o=t.doc.resolve(e),i=o.node(-1);if(!i)return Zt.empty;const s=ln.get(i),a=o.start(-1),l=s.colCount(o.pos-a)+o.nodeAfter.attrs.colspan-1;for(let u=0;u<s.height;u++){const f=l+u*s.width;if((l==s.width-1||s.map[f]!=s.map[f+1])&&(u==0||s.map[f]!=s.map[f-s.width])){const h=s.map[f],m=a+h+i.nodeAt(h).nodeSize-1,g=document.createElement("div");g.className="column-resize-handle",(n=kr.getState(t))!=null&&n.dragging&&r.push(Ln.node(a+h,a+h+i.nodeAt(h).nodeSize,{class:"column-resize-dragging"})),r.push(Ln.widget(m,g))}}return Zt.create(t.doc,r)}function G_({allowTableNodeSelection:t=!1}={}){return new en({key:Ii,state:{init(){return null},apply(e,n){const r=e.getMeta(Ii);if(r!=null)return r==-1?null:r;if(n==null||!e.docChanged)return n;const{deleted:o,pos:i}=e.mapping.mapResult(n);return o?null:i}},props:{decorations:dse,handleDOMEvents:{mousedown:Bse},createSelectionBetween(e){return Ii.getState(e.state)!=null?e.state.selection:null},handleTripleClick:$se,handleKeyDown:jse,handlePaste:Fse},appendTransaction(e,n,r){return hse(r,H_(r,n),t)}})}function C0(t,e){return e?["width",`${Math.max(e,t)}px`]:["min-width",`${t}px`]}function jR(t,e,n,r,o,i){var s;let a=0,l=!0,u=e.firstChild;const f=t.firstChild;if(f!==null)for(let h=0,m=0;h<f.childCount;h+=1){const{colspan:g,colwidth:b}=f.child(h).attrs;for(let y=0;y<g;y+=1,m+=1){const S=o===m?i:b&&b[y],C=S?`${S}px`:"";if(a+=S||r,S||(l=!1),u){if(u.style.width!==C){const[E,T]=C0(r,S);u.style.setProperty(E,T)}u=u.nextSibling}else{const E=document.createElement("col"),[T,w]=C0(r,S);E.style.setProperty(T,w),e.appendChild(E)}}}for(;u;){const h=u.nextSibling;(s=u.parentNode)===null||s===void 0||s.removeChild(u),u=h}l?(n.style.width=`${a}px`,n.style.minWidth=""):(n.style.width="",n.style.minWidth=`${a}px`)}class Zse{constructor(e,n){this.node=e,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")),jR(e,this.colgroup,this.table,n),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!==this.node.type?!1:(this.node=e,jR(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){return e.type==="attributes"&&(e.target===this.table||this.colgroup.contains(e.target))}}function Xse(t,e,n,r){let o=0,i=!0;const s=[],a=t.firstChild;if(!a)return{};for(let h=0,m=0;h<a.childCount;h+=1){const{colspan:g,colwidth:b}=a.child(h).attrs;for(let y=0;y<g;y+=1,m+=1){const S=n===m?r:b&&b[y];o+=S||e,S||(i=!1);const[C,E]=C0(e,S);s.push(["col",{style:`${C}: ${E}`}])}}const l=i?`${o}px`:"",u=i?"":`${o}px`;return{colgroup:["colgroup",{},...s],tableWidth:l,tableMinWidth:u}}function $R(t,e){return t.createAndFill()}function Qse(t){if(t.cached.tableNodeTypes)return t.cached.tableNodeTypes;const e={};return Object.keys(t.nodes).forEach(n=>{const r=t.nodes[n];r.spec.tableRole&&(e[r.spec.tableRole]=r)}),t.cached.tableNodeTypes=e,e}function eae(t,e,n,r,o){const i=Qse(t),s=[],a=[];for(let u=0;u<n;u+=1){const f=$R(i.cell);if(f&&a.push(f),r){const h=$R(i.header_cell);h&&s.push(h)}}const l=[];for(let u=0;u<e;u+=1)l.push(i.row.createChecked(null,r&&u===0?s:a));return i.table.createChecked(null,l)}function tae(t){return t instanceof Bt}const Pd=({editor:t})=>{const{selection:e}=t.state;if(!tae(e))return!1;let n=0;const r=Ux(e.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===e.ranges.length?(t.commands.deleteTable(),!0):!1},nae=Qt.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,handleWidth:5,cellMinWidth:25,View:Zse,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML(){return[{tag:"table"}]},renderHTML({node:t,HTMLAttributes:e}){const{colgroup:n,tableWidth:r,tableMinWidth:o}=Xse(t,this.options.cellMinWidth);return["table",yt(this.options.HTMLAttributes,e,{style:r?`width: ${r}`:`min-width: ${o}`}),n,["tbody",0]]},addCommands(){return{insertTable:({rows:t=3,cols:e=3,withHeaderRow:n=!0}={})=>({tr:r,dispatch:o,editor:i})=>{const s=eae(i.schema,t,e,n);if(o){const a=r.selection.from+1;r.replaceSelectionWith(s).scrollIntoView().setSelection(Ge.near(r.doc.resolve(a)))}return!0},addColumnBefore:()=>({state:t,dispatch:e})=>yse(t,e),addColumnAfter:()=>({state:t,dispatch:e})=>bse(t,e),deleteColumn:()=>({state:t,dispatch:e})=>xse(t,e),addRowBefore:()=>({state:t,dispatch:e})=>Cse(t,e),addRowAfter:()=>({state:t,dispatch:e})=>wse(t,e),deleteRow:()=>({state:t,dispatch:e})=>Ese(t,e),deleteTable:()=>({state:t,dispatch:e})=>Dse(t,e),mergeCells:()=>({state:t,dispatch:e})=>kR(t,e),splitCell:()=>({state:t,dispatch:e})=>MR(t,e),toggleHeaderColumn:()=>({state:t,dispatch:e})=>qc("column")(t,e),toggleHeaderRow:()=>({state:t,dispatch:e})=>qc("row")(t,e),toggleHeaderCell:()=>({state:t,dispatch:e})=>Ase(t,e),mergeOrSplit:()=>({state:t,dispatch:e})=>kR(t,e)?!0:MR(t,e),setCellAttribute:(t,e)=>({state:n,dispatch:r})=>Ose(t,e)(n,r),goToNextCell:()=>({state:t,dispatch:e})=>RR(1)(t,e),goToPreviousCell:()=>({state:t,dispatch:e})=>RR(-1)(t,e),fixTables:()=>({state:t,dispatch:e})=>(e&&H_(t),!0),setCellSelection:t=>({tr:e,dispatch:n})=>{if(n){const r=Bt.create(e.doc,t.anchorCell,t.headCell);e.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:Pd,"Mod-Backspace":Pd,Delete:Pd,"Mod-Delete":Pd}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[K_({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],G_({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(t){const e={name:t.name,options:t.options,storage:t.storage};return{tableRole:lt(Be(t,"tableRole",e))}}}),rae=nae.extend({addProseMirrorPlugins(){return[...this.options.resizable?[K_({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],G_({allowTableNodeSelection:this.options.allowTableNodeSelection})]}}),oae=t=>{const{onUploadFiles:e}=t,n=j.useTheme();return v.jsxs(uh,{children:[v.jsx(I_,{options:[{label:"Monospace",value:"monospace"},{label:"Serif",value:"serif"}]}),v.jsx(wn,{}),v.jsx(P_,{}),v.jsx(wn,{}),v.jsx(D_,{}),v.jsx(wn,{}),v.jsx(hie,{}),v.jsx(Mie,{}),v.jsx(Lie,{}),v.jsx(Iie,{}),v.jsx(Die,{}),v.jsx(Pie,{}),v.jsx(wn,{}),v.jsx(Nie,{defaultTextColor:n.palette.text.primary,swatchColors:[{value:"#000000",label:"Black"},{value:"#ffffff",label:"White"},{value:"#888888",label:"Grey"},{value:"#ff0000",label:"Red"},{value:"#ff9900",label:"Orange"},{value:"#ffff00",label:"Yellow"},{value:"#00d000",label:"Green"},{value:"#0000ff",label:"Blue"}]}),v.jsx(xie,{swatchColors:[{value:"#595959",label:"Dark grey"},{value:"#dddddd",label:"Light grey"},{value:"#ffa6a6",label:"Light red"},{value:"#ffd699",label:"Light orange"},{value:"#ffff00",label:"Yellow"},{value:"#99cc99",label:"Light green"},{value:"#90c6ff",label:"Light blue"},{value:"#8085e9",label:"Light purple"}]}),v.jsx(wn,{}),v.jsx(vie,{}),v.jsx(wn,{}),v.jsx(__,{}),v.jsx(wn,{}),v.jsx(Oie,{}),v.jsx(mie,{}),v.jsx(_ie,{}),zoe()&&v.jsxs(v.Fragment,{children:[v.jsx(kie,{}),v.jsx($ie,{})]}),v.jsx(wn,{}),v.jsx(pie,{}),v.jsx(wn,{}),v.jsx(gie,{}),v.jsx(yie,{}),v.jsx(wn,{}),v.jsx(Eie,{onUploadFiles:e}),v.jsx(wn,{}),v.jsx(Sie,{}),v.jsx(fie,{}),v.jsx(wn,{}),v.jsx(Aie,{}),v.jsx(wn,{}),v.jsx(jie,{}),v.jsx(Rie,{})]})},iae=/^\s*>\s$/,J_=Qt.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:t}){return["blockquote",yt(this.options.HTMLAttributes,t),0]},addCommands(){return{setBlockquote:()=>({commands:t})=>t.wrapIn(this.name),toggleBlockquote:()=>({commands:t})=>t.toggleWrap(this.name),unsetBlockquote:()=>({commands:t})=>t.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[sl({find:iae,type:this.type})]}}),sae=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,aae=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,lae=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,cae=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,Z_=mr.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:t=>t.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:t=>t.type.name===this.name},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}]},renderHTML({HTMLAttributes:t}){return["strong",yt(this.options.HTMLAttributes,t),0]},addCommands(){return{setBold:()=>({commands:t})=>t.setMark(this.name),toggleBold:()=>({commands:t})=>t.toggleMark(this.name),unsetBold:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[Ws({find:sae,type:this.type}),Ws({find:lae,type:this.type})]},addPasteRules(){return[Ki({find:aae,type:this.type}),Ki({find:cae,type:this.type})]}}),uae="listItem",FR="textStyle",BR=/^\s*([-+*])\s$/,X_=Qt.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:t}){return["ul",yt(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleBulletList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(uae,this.editor.getAttributes(FR)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let t=sl({find:BR,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=sl({find:BR,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(FR),editor:this.editor})),[t]}}),dae=/(^|[^`])`([^`]+)`(?!`)/,fae=/(^|[^`])`([^`]+)`(?!`)/g,Q_=mr.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:t}){return["code",yt(this.options.HTMLAttributes,t),0]},addCommands(){return{setCode:()=>({commands:t})=>t.setMark(this.name),toggleCode:()=>({commands:t})=>t.toggleMark(this.name),unsetCode:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[Ws({find:dae,type:this.type})]},addPasteRules(){return[Ki({find:fae,type:this.type})]}}),pae=/^```([a-z]+)?[\s\n]$/,hae=/^~~~([a-z]+)?[\s\n]$/,eN=Qt.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:t=>{var e;const{languageClassPrefix:n}=this.options,i=[...((e=t.firstElementChild)===null||e===void 0?void 0:e.classList)||[]].filter(s=>s.startsWith(n)).map(s=>s.replace(n,""))[0];return i||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:t,HTMLAttributes:e}){return["pre",yt(this.options.HTMLAttributes,e),["code",{class:t.attrs.language?this.options.languageClassPrefix+t.attrs.language:null},0]]},addCommands(){return{setCodeBlock:t=>({commands:e})=>e.setNode(this.name,t),toggleCodeBlock:t=>({commands:e})=>e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:t,$anchor:e}=this.editor.state.selection,n=e.pos===1;return!t||e.parent.type.name!==this.name?!1:n||!e.parent.textContent.length?this.editor.commands.clearNodes():!1},Enter:({editor:t})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:e}=t,{selection:n}=e,{$from:r,empty:o}=n;if(!o||r.parent.type!==this.type)return!1;const i=r.parentOffset===r.parent.nodeSize-2,s=r.parent.textContent.endsWith(`
392
+
393
+ `);return!i||!s?!1:t.chain().command(({tr:a})=>(a.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:t})=>{if(!this.options.exitOnArrowDown)return!1;const{state:e}=t,{selection:n,doc:r}=e,{$from:o,empty:i}=n;if(!i||o.parent.type!==this.type||!(o.parentOffset===o.parent.nodeSize-2))return!1;const a=o.after();return a===void 0?!1:r.nodeAt(a)?t.commands.command(({tr:u})=>(u.setSelection(Qe.near(r.resolve(a))),!0)):t.commands.exitCode()}}},addInputRules(){return[i0({find:pae,type:this.type,getAttributes:t=>({language:t[1]})}),i0({find:hae,type:this.type,getAttributes:t=>({language:t[1]})})]},addProseMirrorPlugins(){return[new en({key:new gn("codeBlockVSCodeHandler"),props:{handlePaste:(t,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;const n=e.clipboardData.getData("text/plain"),r=e.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:s,schema:a}=t.state,l=a.text(n.replace(/\r\n?/g,`
394
+ `));return s.replaceSelectionWith(this.type.create({language:i},l)),s.selection.$from.parent.type!==this.type&&s.setSelection(Ge.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.setMeta("paste",!0),t.dispatch(s),!0}}})]}}),mae=t=>{if(!t.children.length)return;const e=t.querySelectorAll("span");e&&e.forEach(n=>{var r,o;const i=n.getAttribute("style"),s=(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",`${s};${i}`)})},gae=mr.create({name:"textStyle",priority:101,addOptions(){return{HTMLAttributes:{},mergeNestedSpanStyles:!1}},parseHTML(){return[{tag:"span",getAttrs:t=>t.hasAttribute("style")?(this.options.mergeNestedSpanStyles&&mae(t),{}):!1}]},renderHTML({HTMLAttributes:t}){return["span",yt(this.options.HTMLAttributes,t),0]},addCommands(){return{removeEmptyTextStyle:()=>({tr:t})=>{const{selection:e}=t;return t.doc.nodesBetween(e.from,e.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))||t.removeMark(r,r+n.nodeSize,this.type)}),!0}}}}),yae=cn.create({name:"color",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:t=>{var e;return(e=t.style.color)===null||e===void 0?void 0:e.replace(/['"]+/g,"")},renderHTML:t=>t.color?{style:`color: ${t.color}`}:{}}}}]},addCommands(){return{setColor:t=>({chain:e})=>e().setMark("textStyle",{color:t}).run(),unsetColor:()=>({chain:t})=>t().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()}}}),tN=Qt.create({name:"doc",topNode:!0,content:"block+"});function bae(t={}){return new en({view(e){return new vae(e,t)}})}class vae{constructor(e,n){var r;this.editorView=e,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=s=>{this[o](s)};return e.dom.addEventListener(o,i),{name:o,handler:i}})}destroy(){this.handlers.forEach(({name:e,handler:n})=>this.editorView.dom.removeEventListener(e,n))}update(e,n){this.cursorPos!=null&&n.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),n=!e.parent.inlineContent,r;if(n){let a=e.nodeBefore,l=e.nodeAfter;if(a||l){let u=this.editorView.nodeDOM(this.cursorPos-(a?a.nodeSize:0));if(u){let f=u.getBoundingClientRect(),h=a?f.bottom:f.top;a&&l&&(h=(h+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),r={left:f.left,right:f.right,top:h-this.width/2,bottom:h+this.width/2}}}}if(!r){let a=this.editorView.coordsAtPos(this.cursorPos);r={left:a.left-this.width/2,right:a.left+this.width/2,top:a.top,bottom:a.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,s;if(!o||o==document.body&&getComputedStyle(o).position=="static")i=-pageXOffset,s=-pageYOffset;else{let a=o.getBoundingClientRect();i=a.left-o.scrollLeft,s=a.top-o.scrollTop}this.element.style.left=r.left-i+"px",this.element.style.top=r.top-s+"px",this.element.style.width=r.right-r.left+"px",this.element.style.height=r.bottom-r.top+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:e.clientX,top:e.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,e):o;if(n&&!i){let s=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let a=lD(this.editorView.state.doc,s,this.editorView.dragging.slice);a!=null&&(s=a)}this.setCursor(s),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){(e.target==this.editorView.dom||!this.editorView.dom.contains(e.relatedTarget))&&this.setCursor(null)}}const nN=cn.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[bae(this.options)]}}),xae=cn.create({name:"fontFamily",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontFamily:{default:null,parseHTML:t=>t.style.fontFamily,renderHTML:t=>t.fontFamily?{style:`font-family: ${t.fontFamily}`}:{}}}}]},addCommands(){return{setFontFamily:t=>({chain:e})=>e().setMark("textStyle",{fontFamily:t}).run(),unsetFontFamily:()=>({chain:t})=>t().setMark("textStyle",{fontFamily:null}).removeEmptyTextStyle().run()}}});class an extends Qe{constructor(e){super(e,e)}map(e,n){let r=e.resolve(n.map(this.head));return an.valid(r)?new an(r):Qe.near(r)}content(){return Ae.empty}eq(e){return e instanceof an&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new an(e.resolve(n.pos))}getBookmark(){return new C1(this.anchor)}static valid(e){let n=e.parent;if(n.isTextblock||!Sae(e)||!Cae(e))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let o=n.contentMatchAt(e.index()).defaultType;return o&&o.isTextblock}static findGapCursorFrom(e,n,r=!1){e:for(;;){if(!r&&an.valid(e))return e;let o=e.pos,i=null;for(let s=e.depth;;s--){let a=e.node(s);if(n>0?e.indexAfter(s)<a.childCount:e.index(s)>0){i=a.child(n>0?e.indexAfter(s):e.index(s)-1);break}else if(s==0)return null;o+=n;let l=e.doc.resolve(o);if(an.valid(l))return l}for(;;){let s=n>0?i.firstChild:i.lastChild;if(!s){if(i.isAtom&&!i.isText&&!qe.isSelectable(i)){e=e.doc.resolve(o+i.nodeSize*n),r=!1;continue e}break}i=s,o+=n;let a=e.doc.resolve(o);if(an.valid(a))return a}return null}}}an.prototype.visible=!1;an.findFrom=an.findGapCursorFrom;Qe.jsonID("gapcursor",an);class C1{constructor(e){this.pos=e}map(e){return new C1(e.map(this.pos))}resolve(e){let n=e.resolve(this.pos);return an.valid(n)?new an(n):Qe.near(n)}}function Sae(t){for(let e=t.depth;e>=0;e--){let n=t.index(e),r=t.node(e);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 Cae(t){for(let e=t.depth;e>=0;e--){let n=t.indexAfter(e),r=t.node(e);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 wae(){return new en({props:{decorations:Mae,createSelectionBetween(t,e,n){return e.pos==n.pos&&an.valid(n)?new an(n):null},handleClick:Eae,handleKeyDown:Tae,handleDOMEvents:{beforeinput:kae}}})}const Tae=Bx({ArrowLeft:_d("horiz",-1),ArrowRight:_d("horiz",1),ArrowUp:_d("vert",-1),ArrowDown:_d("vert",1)});function _d(t,e){const n=t=="vert"?e>0?"down":"up":e>0?"right":"left";return function(r,o,i){let s=r.selection,a=e>0?s.$to:s.$from,l=s.empty;if(s instanceof Ge){if(!i.endOfTextblock(n)||a.depth==0)return!1;l=!1,a=r.doc.resolve(e>0?a.after():a.before())}let u=an.findGapCursorFrom(a,e,l);return u?(o&&o(r.tr.setSelection(new an(u))),!0):!1}}function Eae(t,e,n){if(!t||!t.editable)return!1;let r=t.state.doc.resolve(e);if(!an.valid(r))return!1;let o=t.posAtCoords({left:n.clientX,top:n.clientY});return o&&o.inside>-1&&qe.isSelectable(t.state.doc.nodeAt(o.inside))?!1:(t.dispatch(t.state.tr.setSelection(new an(r))),!0)}function kae(t,e){if(e.inputType!="insertCompositionText"||!(t.state.selection instanceof an))return!1;let{$from:n}=t.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(t.state.schema.nodes.text);if(!r)return!1;let o=Te.empty;for(let s=r.length-1;s>=0;s--)o=Te.from(r[s].createAndFill(null,o));let i=t.state.tr.replace(n.pos,n.pos,new Ae(o,0,0));return i.setSelection(Ge.near(i.doc.resolve(n.pos+1))),t.dispatch(i),!1}function Mae(t){if(!(t.selection instanceof an))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",Zt.create(t.doc,[Ln.widget(t.selection.head,e,{key:"gapcursor"})])}const rN=cn.create({name:"gapCursor",addProseMirrorPlugins(){return[wae()]},extendNodeSchema(t){var e;const n={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:(e=lt(Be(t,"allowGapCursor",n)))!==null&&e!==void 0?e:null}}}),oN=Qt.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:t}){return["br",yt(this.options.HTMLAttributes,t)]},renderText(){return`
395
+ `},addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command(()=>{const{selection:o,storedMarks:i}=n;if(o.$from.parent.type.spec.isolating)return!1;const{keepMarks:s}=this.options,{splittableMarks:a}=r.extensionManager,l=i||o.$to.parentOffset&&o.$from.marks();return e().insertContent({type:this.name}).command(({tr:u,dispatch:f})=>{if(f&&l&&s){const h=l.filter(m=>a.includes(m.type.name));u.ensureMarks(h)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),Oae=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/,Rae=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g,Aae=mr.create({name:"highlight",addOptions(){return{multicolor:!1,HTMLAttributes:{}}},addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:t=>t.getAttribute("data-color")||t.style.backgroundColor,renderHTML:t=>t.color?{"data-color":t.color,style:`background-color: ${t.color}; color: inherit`}:{}}}:{}},parseHTML(){return[{tag:"mark"}]},renderHTML({HTMLAttributes:t}){return["mark",yt(this.options.HTMLAttributes,t),0]},addCommands(){return{setHighlight:t=>({commands:e})=>e.setMark(this.name,t),toggleHighlight:t=>({commands:e})=>e.toggleMark(this.name,t),unsetHighlight:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[Ws({find:Oae,type:this.type})]},addPasteRules(){return[Ki({find:Rae,type:this.type})]}});var jf=200,On=function(){};On.prototype.append=function(e){return e.length?(e=On.from(e),!this.length&&e||e.length<jf&&this.leafAppend(e)||this.length<jf&&e.leafPrepend(this)||this.appendInner(e)):this};On.prototype.prepend=function(e){return e.length?On.from(e).append(this):this};On.prototype.appendInner=function(e){return new Iae(this,e)};On.prototype.slice=function(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.length),e>=n?On.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))};On.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};On.prototype.forEach=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(e,n,r,0):this.forEachInvertedInner(e,n,r,0)};On.prototype.map=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var o=[];return this.forEach(function(i,s){return o.push(e(i,s))},n,r),o};On.from=function(e){return e instanceof On?e:e&&e.length?new iN(e):On.empty};var iN=function(t){function e(r){t.call(this),this.values=r}e.__proto__=t,e.prototype=Object.create(t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(o,i){return o==0&&i==this.length?this:new e(this.values.slice(o,i))},e.prototype.getInner=function(o){return this.values[o]},e.prototype.forEachInner=function(o,i,s,a){for(var l=i;l<s;l++)if(o(this.values[l],a+l)===!1)return!1},e.prototype.forEachInvertedInner=function(o,i,s,a){for(var l=i-1;l>=s;l--)if(o(this.values[l],a+l)===!1)return!1},e.prototype.leafAppend=function(o){if(this.length+o.length<=jf)return new e(this.values.concat(o.flatten()))},e.prototype.leafPrepend=function(o){if(this.length+o.length<=jf)return new e(o.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(On);On.empty=new iN([]);var Iae=function(t){function e(n,r){t.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.__proto__=t,e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},e.prototype.forEachInner=function(r,o,i,s){var a=this.left.length;if(o<a&&this.left.forEachInner(r,o,Math.min(i,a),s)===!1||i>a&&this.right.forEachInner(r,Math.max(o-a,0),Math.min(this.length,i)-a,s+a)===!1)return!1},e.prototype.forEachInvertedInner=function(r,o,i,s){var a=this.left.length;if(o>a&&this.right.forEachInvertedInner(r,o-a,Math.max(i,a)-a,s+a)===!1||i<a&&this.left.forEachInvertedInner(r,Math.min(o,a),i,s)===!1)return!1},e.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))},e.prototype.leafAppend=function(r){var o=this.right.leafAppend(r);if(o)return new e(this.left,o)},e.prototype.leafPrepend=function(r){var o=this.left.leafPrepend(r);if(o)return new e(o,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e}(On);const Dae=500;class ro{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,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 s=e.tr,a,l,u=[],f=[];return this.items.forEach((h,m)=>{if(!h.step){o||(o=this.remapping(r,m+1),i=o.maps.length),i--,f.push(h);return}if(o){f.push(new vo(h.map));let g=h.step.map(o.slice(i)),b;g&&s.maybeStep(g).doc&&(b=s.mapping.maps[s.mapping.maps.length-1],u.push(new vo(b,void 0,void 0,u.length+f.length))),i--,b&&o.appendMap(b,i)}else s.maybeStep(h.step);if(h.selection)return a=o?h.selection.map(o.slice(i)):h.selection,l=new ro(this.items.slice(0,r).append(f.reverse().concat(u)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:s,selection:a}}addTransform(e,n,r,o){let i=[],s=this.eventCount,a=this.items,l=!o&&a.length?a.get(a.length-1):null;for(let f=0;f<e.steps.length;f++){let h=e.steps[f].invert(e.docs[f]),m=new vo(e.mapping.maps[f],h,n),g;(g=l&&l.merge(m))&&(m=g,f?i.pop():a=a.slice(0,a.length-1)),i.push(m),n&&(s++,n=void 0),o||(l=m)}let u=s-r.depth;return u>_ae&&(a=Pae(a,u),s-=u),new ro(a.append(i),s)}remapping(e,n){let r=new Lc;return this.items.forEach((o,i)=>{let s=o.mirrorOffset!=null&&i-o.mirrorOffset>=e?r.maps.length-o.mirrorOffset:void 0;r.appendMap(o.map,s)},e,n),r}addMaps(e){return this.eventCount==0?this:new ro(this.items.append(e.map(n=>new vo(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let r=[],o=Math.max(0,this.items.length-n),i=e.mapping,s=e.steps.length,a=this.eventCount;this.items.forEach(m=>{m.selection&&a--},o);let l=n;this.items.forEach(m=>{let g=i.getMirror(--l);if(g==null)return;s=Math.min(s,g);let b=i.maps[g];if(m.step){let y=e.steps[g].invert(e.docs[g]),S=m.selection&&m.selection.map(i.slice(l+1,g));S&&a++,r.push(new vo(b,y,S))}else r.push(new vo(b))},o);let u=[];for(let m=n;m<s;m++)u.push(new vo(i.maps[m]));let f=this.items.slice(0,o).append(u).append(r),h=new ro(f,a);return h.emptyItemCount()>Dae&&(h=h.compress(this.items.length-r.length)),h}emptyItemCount(){let e=0;return this.items.forEach(n=>{n.step||e++}),e}compress(e=this.items.length){let n=this.remapping(0,e),r=n.maps.length,o=[],i=0;return this.items.forEach((s,a)=>{if(a>=e)o.push(s),s.selection&&i++;else if(s.step){let l=s.step.map(n.slice(r)),u=l&&l.getMap();if(r--,u&&n.appendMap(u,r),l){let f=s.selection&&s.selection.map(n.slice(r));f&&i++;let h=new vo(u.invert(),l,f),m,g=o.length-1;(m=o.length&&o[g].merge(h))?o[g]=m:o.push(h)}}else s.map&&r--},this.items.length,0),new ro(On.from(o.reverse()),i)}}ro.empty=new ro(On.empty,0);function Pae(t,e){let n;return t.forEach((r,o)=>{if(r.selection&&e--==0)return n=o,!1}),t.slice(n)}class vo{constructor(e,n,r,o){this.map=e,this.step=n,this.selection=r,this.mirrorOffset=o}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new vo(n.getMap().invert(),n,this.selection)}}}class Oi{constructor(e,n,r,o,i){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=o,this.prevComposition=i}}const _ae=20;function Nae(t,e,n,r){let o=n.getMeta(Ls),i;if(o)return o.historyState;n.getMeta($ae)&&(t=new Oi(t.done,t.undone,null,0,-1));let s=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(s&&s.getMeta(Ls))return s.getMeta(Ls).redo?new Oi(t.done.addTransform(n,void 0,r,of(e)),t.undone,VR(n.mapping.maps),t.prevTime,t.prevComposition):new Oi(t.done,t.undone.addTransform(n,void 0,r,of(e)),null,t.prevTime,t.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(s&&s.getMeta("addToHistory")===!1)){let a=n.getMeta("composition"),l=t.prevTime==0||!s&&t.prevComposition!=a&&(t.prevTime<(n.time||0)-r.newGroupDelay||!Lae(n,t.prevRanges)),u=s?mv(t.prevRanges,n.mapping):VR(n.mapping.maps);return new Oi(t.done.addTransform(n,l?e.selection.getBookmark():void 0,r,of(e)),ro.empty,u,n.time,a??t.prevComposition)}else return(i=n.getMeta("rebased"))?new Oi(t.done.rebased(n,i),t.undone.rebased(n,i),mv(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new Oi(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),mv(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function Lae(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((r,o)=>{for(let i=0;i<e.length;i+=2)r<=e[i+1]&&o>=e[i]&&(n=!0)}),n}function VR(t){let e=[];for(let n=t.length-1;n>=0&&e.length==0;n--)t[n].forEach((r,o,i,s)=>e.push(i,s));return e}function mv(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let o=e.map(t[r],1),i=e.map(t[r+1],-1);o<=i&&n.push(o,i)}return n}function jae(t,e,n){let r=of(e),o=Ls.get(e).spec.config,i=(n?t.undone:t.done).popEvent(e,r);if(!i)return null;let s=i.selection.resolve(i.transform.doc),a=(n?t.done:t.undone).addTransform(i.transform,e.selection.getBookmark(),o,r),l=new Oi(n?a:i.remaining,n?i.remaining:a,null,0,-1);return i.transform.setSelection(s).setMeta(Ls,{redo:n,historyState:l})}let gv=!1,zR=null;function of(t){let e=t.plugins;if(zR!=e){gv=!1,zR=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){gv=!0;break}}return gv}const Ls=new gn("history"),$ae=new gn("closeHistory");function Fae(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new en({key:Ls,state:{init(){return new Oi(ro.empty,ro.empty,null,0,-1)},apply(e,n,r){return Nae(n,r,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let r=n.inputType,o=r=="historyUndo"?aN:r=="historyRedo"?lN:null;return o?(n.preventDefault(),o(e.state,e.dispatch)):!1}}}})}function sN(t,e){return(n,r)=>{let o=Ls.getState(n);if(!o||(t?o.undone:o.done).eventCount==0)return!1;if(r){let i=jae(o,n,t);i&&r(e?i.scrollIntoView():i)}return!0}}const aN=sN(!1,!0),lN=sN(!0,!0),cN=cn.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:t,dispatch:e})=>aN(t,e),redo:()=>({state:t,dispatch:e})=>lN(t,e)}},addProseMirrorPlugins(){return[Fae(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()}}}),uN=Qt.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",yt(this.options.HTMLAttributes,t)]},addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{const{selection:n}=e,{$from:r,$to:o}=n,i=t();return r.parentOffset===0?i.insertContentAt({from:Math.max(r.pos-1,0),to:o.pos},{type:this.name}):fP(n)?i.insertContentAt(o.pos,{type:this.name}):i.insertContent({type:this.name}),i.command(({tr:s,dispatch:a})=>{var l;if(a){const{$to:u}=s.selection,f=u.end();if(u.nodeAfter)u.nodeAfter.isTextblock?s.setSelection(Ge.create(s.doc,u.pos+1)):u.nodeAfter.isBlock?s.setSelection(qe.create(s.doc,u.pos)):s.setSelection(Ge.create(s.doc,u.pos));else{const h=(l=u.parent.type.contentMatch.defaultType)===null||l===void 0?void 0:l.create();h&&(s.insert(f,h),s.setSelection(Ge.create(s.doc,f+1)))}s.scrollIntoView()}return!0}).run()}}},addInputRules(){return[hP({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),Bae=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,Vae=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,zae=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,Hae=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,dN=mr.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>t.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:t=>t.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:t}){return["em",yt(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({commands:t})=>t.toggleMark(this.name),unsetItalic:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Ws({find:Bae,type:this.type}),Ws({find:zae,type:this.type})]},addPasteRules(){return[Ki({find:Vae,type:this.type}),Ki({find:Hae,type:this.type})]}}),Wae="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",qae="ελ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",ll=(t,e)=>{for(const n in e)t[n]=e[n];return t},w0="numeric",T0="ascii",E0="alpha",bc="asciinumeric",rc="alphanumeric",k0="domain",fN="emoji",Uae="scheme",Kae="slashscheme",yv="whitespace";function Yae(t,e){return t in e||(e[t]=[]),e[t]}function Rs(t,e,n){e[w0]&&(e[bc]=!0,e[rc]=!0),e[T0]&&(e[bc]=!0,e[E0]=!0),e[bc]&&(e[rc]=!0),e[E0]&&(e[rc]=!0),e[rc]&&(e[k0]=!0),e[fN]&&(e[k0]=!0);for(const r in e){const o=Yae(r,n);o.indexOf(t)<0&&o.push(t)}}function Gae(t,e){const n={};for(const r in e)e[r].indexOf(t)>=0&&(n[r]=!0);return n}function ur(t=null){this.j={},this.jr=[],this.jd=null,this.t=t}ur.groups={};ur.prototype={accepts(){return!!this.t},go(t){const e=this,n=e.j[t];if(n)return n;for(let r=0;r<e.jr.length;r++){const o=e.jr[r][0],i=e.jr[r][1];if(i&&o.test(t))return i}return e.jd},has(t,e=!1){return e?t in this.j:!!this.go(t)},ta(t,e,n,r){for(let o=0;o<t.length;o++)this.tt(t[o],e,n,r)},tr(t,e,n,r){r=r||ur.groups;let o;return e&&e.j?o=e:(o=new ur(e),n&&r&&Rs(e,n,r)),this.jr.push([t,o]),o},ts(t,e,n,r){let o=this;const i=t.length;if(!i)return o;for(let s=0;s<i-1;s++)o=o.tt(t[s]);return o.tt(t[i-1],e,n,r)},tt(t,e,n,r){r=r||ur.groups;const o=this;if(e&&e.j)return o.j[t]=e,e;const i=e;let s,a=o.go(t);if(a?(s=new ur,ll(s.j,a.j),s.jr.push.apply(s.jr,a.jr),s.jd=a.jd,s.t=a.t):s=new ur,i){if(r)if(s.t&&typeof s.t=="string"){const l=ll(Gae(s.t,r),n);Rs(i,l,r)}else n&&Rs(i,n,r);s.t=i}return o.j[t]=s,s}};const at=(t,e,n,r,o)=>t.ta(e,n,r,o),rn=(t,e,n,r,o)=>t.tr(e,n,r,o),HR=(t,e,n,r,o)=>t.ts(e,n,r,o),Oe=(t,e,n,r,o)=>t.tt(e,n,r,o),Qo="WORD",M0="UWORD",pN="ASCIINUMERICAL",hN="ALPHANUMERICAL",Uc="LOCALHOST",O0="TLD",R0="UTLD",sf="SCHEME",Pa="SLASH_SCHEME",w1="NUM",A0="WS",T1="NL",vc="OPENBRACE",xc="CLOSEBRACE",$f="OPENBRACKET",Ff="CLOSEBRACKET",Bf="OPENPAREN",Vf="CLOSEPAREN",zf="OPENANGLEBRACKET",Hf="CLOSEANGLEBRACKET",Wf="FULLWIDTHLEFTPAREN",qf="FULLWIDTHRIGHTPAREN",Uf="LEFTCORNERBRACKET",Kf="RIGHTCORNERBRACKET",Yf="LEFTWHITECORNERBRACKET",Gf="RIGHTWHITECORNERBRACKET",Jf="FULLWIDTHLESSTHAN",Zf="FULLWIDTHGREATERTHAN",Xf="AMPERSAND",E1="APOSTROPHE",Qf="ASTERISK",Ri="AT",ep="BACKSLASH",tp="BACKTICK",np="CARET",Di="COLON",k1="COMMA",rp="DOLLAR",xo="DOT",op="EQUALS",M1="EXCLAMATION",$r="HYPHEN",Sc="PERCENT",ip="PIPE",sp="PLUS",ap="POUND",Cc="QUERY",O1="QUOTE",mN="FULLWIDTHMIDDLEDOT",R1="SEMI",So="SLASH",wc="TILDE",lp="UNDERSCORE",gN="EMOJI",cp="SYM";var yN=Object.freeze({__proto__:null,WORD:Qo,UWORD:M0,ASCIINUMERICAL:pN,ALPHANUMERICAL:hN,LOCALHOST:Uc,TLD:O0,UTLD:R0,SCHEME:sf,SLASH_SCHEME:Pa,NUM:w1,WS:A0,NL:T1,OPENBRACE:vc,CLOSEBRACE:xc,OPENBRACKET:$f,CLOSEBRACKET:Ff,OPENPAREN:Bf,CLOSEPAREN:Vf,OPENANGLEBRACKET:zf,CLOSEANGLEBRACKET:Hf,FULLWIDTHLEFTPAREN:Wf,FULLWIDTHRIGHTPAREN:qf,LEFTCORNERBRACKET:Uf,RIGHTCORNERBRACKET:Kf,LEFTWHITECORNERBRACKET:Yf,RIGHTWHITECORNERBRACKET:Gf,FULLWIDTHLESSTHAN:Jf,FULLWIDTHGREATERTHAN:Zf,AMPERSAND:Xf,APOSTROPHE:E1,ASTERISK:Qf,AT:Ri,BACKSLASH:ep,BACKTICK:tp,CARET:np,COLON:Di,COMMA:k1,DOLLAR:rp,DOT:xo,EQUALS:op,EXCLAMATION:M1,HYPHEN:$r,PERCENT:Sc,PIPE:ip,PLUS:sp,POUND:ap,QUERY:Cc,QUOTE:O1,FULLWIDTHMIDDLEDOT:mN,SEMI:R1,SLASH:So,TILDE:wc,UNDERSCORE:lp,EMOJI:gN,SYM:cp});const Go=/[a-z]/,ql=new RegExp("\\p{L}","u"),bv=new RegExp("\\p{Emoji}","u"),Jo=/\d/,vv=/\s/,WR="\r",xv=`
396
+ `,Jae="️",Zae="‍",Sv="";let Nd=null,Ld=null;function Xae(t=[]){const e={};ur.groups=e;const n=new ur;Nd==null&&(Nd=qR(Wae)),Ld==null&&(Ld=qR(qae)),Oe(n,"'",E1),Oe(n,"{",vc),Oe(n,"}",xc),Oe(n,"[",$f),Oe(n,"]",Ff),Oe(n,"(",Bf),Oe(n,")",Vf),Oe(n,"<",zf),Oe(n,">",Hf),Oe(n,"(",Wf),Oe(n,")",qf),Oe(n,"「",Uf),Oe(n,"」",Kf),Oe(n,"『",Yf),Oe(n,"』",Gf),Oe(n,"<",Jf),Oe(n,">",Zf),Oe(n,"&",Xf),Oe(n,"*",Qf),Oe(n,"@",Ri),Oe(n,"`",tp),Oe(n,"^",np),Oe(n,":",Di),Oe(n,",",k1),Oe(n,"$",rp),Oe(n,".",xo),Oe(n,"=",op),Oe(n,"!",M1),Oe(n,"-",$r),Oe(n,"%",Sc),Oe(n,"|",ip),Oe(n,"+",sp),Oe(n,"#",ap),Oe(n,"?",Cc),Oe(n,'"',O1),Oe(n,"/",So),Oe(n,";",R1),Oe(n,"~",wc),Oe(n,"_",lp),Oe(n,"\\",ep),Oe(n,"・",mN);const r=rn(n,Jo,w1,{[w0]:!0});rn(r,Jo,r);const o=rn(r,Go,pN,{[bc]:!0}),i=rn(r,ql,hN,{[rc]:!0}),s=rn(n,Go,Qo,{[T0]:!0});rn(s,Jo,o),rn(s,Go,s),rn(o,Jo,o),rn(o,Go,o);const a=rn(n,ql,M0,{[E0]:!0});rn(a,Go),rn(a,Jo,i),rn(a,ql,a),rn(i,Jo,i),rn(i,Go),rn(i,ql,i);const l=Oe(n,xv,T1,{[yv]:!0}),u=Oe(n,WR,A0,{[yv]:!0}),f=rn(n,vv,A0,{[yv]:!0});Oe(n,Sv,f),Oe(u,xv,l),Oe(u,Sv,f),rn(u,vv,f),Oe(f,WR),Oe(f,xv),rn(f,vv,f),Oe(f,Sv,f);const h=rn(n,bv,gN,{[fN]:!0});Oe(h,"#"),rn(h,bv,h),Oe(h,Jae,h);const m=Oe(h,Zae);Oe(m,"#"),rn(m,bv,h);const g=[[Go,s],[Jo,o]],b=[[Go,null],[ql,a],[Jo,i]];for(let y=0;y<Nd.length;y++)Ti(n,Nd[y],O0,Qo,g);for(let y=0;y<Ld.length;y++)Ti(n,Ld[y],R0,M0,b);Rs(O0,{tld:!0,ascii:!0},e),Rs(R0,{utld:!0,alpha:!0},e),Ti(n,"file",sf,Qo,g),Ti(n,"mailto",sf,Qo,g),Ti(n,"http",Pa,Qo,g),Ti(n,"https",Pa,Qo,g),Ti(n,"ftp",Pa,Qo,g),Ti(n,"ftps",Pa,Qo,g),Rs(sf,{scheme:!0,ascii:!0},e),Rs(Pa,{slashscheme:!0,ascii:!0},e),t=t.sort((y,S)=>y[0]>S[0]?1:-1);for(let y=0;y<t.length;y++){const S=t[y][0],E=t[y][1]?{[Uae]:!0}:{[Kae]:!0};S.indexOf("-")>=0?E[k0]=!0:Go.test(S)?Jo.test(S)?E[bc]=!0:E[T0]=!0:E[w0]=!0,HR(n,S,S,E)}return HR(n,"localhost",Uc,{ascii:!0}),n.jd=new ur(cp),{start:n,tokens:ll({groups:e},yN)}}function bN(t,e){const n=Qae(e.replace(/[A-Z]/g,a=>a.toLowerCase())),r=n.length,o=[];let i=0,s=0;for(;s<r;){let a=t,l=null,u=0,f=null,h=-1,m=-1;for(;s<r&&(l=a.go(n[s]));)a=l,a.accepts()?(h=0,m=0,f=a):h>=0&&(h+=n[s].length,m++),u+=n[s].length,i+=n[s].length,s++;i-=h,s-=m,u-=h,o.push({t:f.t,v:e.slice(i-u,i),s:i-u,e:i})}return o}function Qae(t){const e=[],n=t.length;let r=0;for(;r<n;){let o=t.charCodeAt(r),i,s=o<55296||o>56319||r+1===n||(i=t.charCodeAt(r+1))<56320||i>57343?t[r]:t.slice(r,r+2);e.push(s),r+=s.length}return e}function Ti(t,e,n,r,o){let i;const s=e.length;for(let a=0;a<s-1;a++){const l=e[a];t.j[l]?i=t.j[l]:(i=new ur(r),i.jr=o.slice(),t.j[l]=i),t=i}return i=new ur(n),i.jr=o.slice(),t.j[e[s-1]]=i,i}function qR(t){const e=[],n=[];let r=0,o="0123456789";for(;r<t.length;){let i=0;for(;o.indexOf(t[r+i])>=0;)i++;if(i>0){e.push(n.join(""));for(let s=parseInt(t.substring(r,r+i),10);s>0;s--)n.pop();r+=i}else n.push(t[r]),r++}return e}const Kc={defaultProtocol:"http",events:null,format:UR,formatHref:UR,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function A1(t,e=null){let n=ll({},Kc);t&&(n=ll(n,t instanceof A1?t.o:t));const r=n.ignoreTags,o=[];for(let i=0;i<r.length;i++)o.push(r[i].toUpperCase());this.o=n,e&&(this.defaultRender=e),this.ignoreTags=o}A1.prototype={o:Kc,ignoreTags:[],defaultRender(t){return t},check(t){return this.get("validate",t.toString(),t)},get(t,e,n){const r=e!=null;let o=this.o[t];return o&&(typeof o=="object"?(o=n.t in o?o[n.t]:Kc[t],typeof o=="function"&&r&&(o=o(e,n))):typeof o=="function"&&r&&(o=o(e,n.t,n)),o)},getObj(t,e,n){let r=this.o[t];return typeof r=="function"&&e!=null&&(r=r(e,n.t,n)),r},render(t){const e=t.render(this);return(this.get("render",null,t)||this.defaultRender)(e,t.t,t)}};function UR(t){return t}function vN(t,e){this.t="token",this.v=t,this.tk=e}vN.prototype={isLink:!1,toString(){return this.v},toHref(t){return this.toString()},toFormattedString(t){const e=this.toString(),n=t.get("truncate",e,this),r=t.get("format",e,this);return n&&r.length>n?r.substring(0,n)+"…":r},toFormattedHref(t){return t.get("formatHref",this.toHref(t.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(t=Kc.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(t),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(t){return{type:this.t,value:this.toFormattedString(t),isLink:this.isLink,href:this.toFormattedHref(t),start:this.startIndex(),end:this.endIndex()}},validate(t){return t.get("validate",this.toString(),this)},render(t){const e=this,n=this.toHref(t.get("defaultProtocol")),r=t.get("formatHref",n,this),o=t.get("tagName",n,e),i=this.toFormattedString(t),s={},a=t.get("className",n,e),l=t.get("target",n,e),u=t.get("rel",n,e),f=t.getObj("attributes",n,e),h=t.getObj("events",n,e);return s.href=r,a&&(s.class=a),l&&(s.target=l),u&&(s.rel=u),f&&ll(s,f),{tagName:o,attributes:s,content:i,eventListeners:h}}};function ph(t,e){class n extends vN{constructor(o,i){super(o,i),this.t=t}}for(const r in e)n.prototype[r]=e[r];return n.t=t,n}const KR=ph("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),YR=ph("text"),ele=ph("nl"),jd=ph("url",{isLink:!0,toHref(t=Kc.defaultProtocol){return this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){const t=this.tk;return t.length>=2&&t[0].t!==Uc&&t[1].t===Di}}),jr=t=>new ur(t);function tle({groups:t}){const e=t.domain.concat([Xf,Qf,Ri,ep,tp,np,rp,op,$r,w1,Sc,ip,sp,ap,So,cp,wc,lp]),n=[Di,k1,xo,M1,Sc,Cc,O1,R1,zf,Hf,vc,xc,Ff,$f,Bf,Vf,Wf,qf,Uf,Kf,Yf,Gf,Jf,Zf],r=[Xf,E1,Qf,ep,tp,np,rp,op,$r,vc,xc,Sc,ip,sp,ap,Cc,So,cp,wc,lp],o=jr(),i=Oe(o,wc);at(i,r,i),at(i,t.domain,i);const s=jr(),a=jr(),l=jr();at(o,t.domain,s),at(o,t.scheme,a),at(o,t.slashscheme,l),at(s,r,i),at(s,t.domain,s);const u=Oe(s,Ri);Oe(i,Ri,u),Oe(a,Ri,u),Oe(l,Ri,u);const f=Oe(i,xo);at(f,r,i),at(f,t.domain,i);const h=jr();at(u,t.domain,h),at(h,t.domain,h);const m=Oe(h,xo);at(m,t.domain,h);const g=jr(KR);at(m,t.tld,g),at(m,t.utld,g),Oe(u,Uc,g);const b=Oe(h,$r);Oe(b,$r,b),at(b,t.domain,h),at(g,t.domain,h),Oe(g,xo,m),Oe(g,$r,b);const y=Oe(g,Di);at(y,t.numeric,KR);const S=Oe(s,$r),C=Oe(s,xo);Oe(S,$r,S),at(S,t.domain,s),at(C,r,i),at(C,t.domain,s);const E=jr(jd);at(C,t.tld,E),at(C,t.utld,E),at(E,t.domain,s),at(E,r,i),Oe(E,xo,C),Oe(E,$r,S),Oe(E,Ri,u);const T=Oe(E,Di),w=jr(jd);at(T,t.numeric,w);const M=jr(jd),R=jr();at(M,e,M),at(M,n,R),at(R,e,M),at(R,n,R),Oe(E,So,M),Oe(w,So,M);const _=Oe(a,Di),I=Oe(l,Di),N=Oe(I,So),O=Oe(N,So);at(a,t.domain,s),Oe(a,xo,C),Oe(a,$r,S),at(l,t.domain,s),Oe(l,xo,C),Oe(l,$r,S),at(_,t.domain,M),Oe(_,So,M),Oe(_,Cc,M),at(O,t.domain,M),at(O,e,M),Oe(O,So,M);const A=[[vc,xc],[$f,Ff],[Bf,Vf],[zf,Hf],[Wf,qf],[Uf,Kf],[Yf,Gf],[Jf,Zf]];for(let L=0;L<A.length;L++){const[z,V]=A[L],$=Oe(M,z);Oe(R,z,$),Oe($,V,M);const F=jr(jd);at($,e,F);const W=jr();at($,n),at(F,e,F),at(F,n,W),at(W,e,F),at(W,n,W),Oe(F,V,M),Oe(W,V,M)}return Oe(o,Uc,E),Oe(o,T1,ele),{start:o,tokens:yN}}function nle(t,e,n){let r=n.length,o=0,i=[],s=[];for(;o<r;){let a=t,l=null,u=null,f=0,h=null,m=-1;for(;o<r&&!(l=a.go(n[o].t));)s.push(n[o++]);for(;o<r&&(u=l||a.go(n[o].t));)l=null,a=u,a.accepts()?(m=0,h=a):m>=0&&m++,o++,f++;if(m<0)o-=f,o<r&&(s.push(n[o]),o++);else{s.length>0&&(i.push(Cv(YR,e,s)),s=[]),o-=m,f-=m;const g=h.t,b=n.slice(o-f,o);i.push(Cv(g,e,b))}}return s.length>0&&i.push(Cv(YR,e,s)),i}function Cv(t,e,n){const r=n[0].s,o=n[n.length-1].e,i=e.slice(r,o);return new t(i,n)}const rle=typeof console<"u"&&console&&console.warn||(()=>{}),ole="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",Ht={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function ile(){return ur.groups={},Ht.scanner=null,Ht.parser=null,Ht.tokenQueue=[],Ht.pluginQueue=[],Ht.customSchemes=[],Ht.initialized=!1,Ht}function GR(t,e=!1){if(Ht.initialized&&rle(`linkifyjs: already initialized - will not register custom scheme "${t}" ${ole}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(t))throw new Error(`linkifyjs: incorrect scheme format.
397
+ 1. Must only contain digits, lowercase ASCII letters or "-"
398
+ 2. Cannot start or end with "-"
399
+ 3. "-" cannot repeat`);Ht.customSchemes.push([t,e])}function sle(){Ht.scanner=Xae(Ht.customSchemes);for(let t=0;t<Ht.tokenQueue.length;t++)Ht.tokenQueue[t][1]({scanner:Ht.scanner});Ht.parser=tle(Ht.scanner.tokens);for(let t=0;t<Ht.pluginQueue.length;t++)Ht.pluginQueue[t][1]({scanner:Ht.scanner,parser:Ht.parser});return Ht.initialized=!0,Ht}function I1(t){return Ht.initialized||sle(),nle(Ht.parser.start,t,bN(Ht.scanner.start,t))}I1.scan=bN;function xN(t,e=null,n=null){if(e&&typeof e=="object"){if(n)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);n=e,e=null}const r=new A1(n),o=I1(t),i=[];for(let s=0;s<o.length;s++){const a=o[s];a.isLink&&(!e||a.t===e)&&r.check(a)&&i.push(a.toFormattedObject(r))}return i}function ale(t){return t.length===1?t[0].isLink:t.length===3&&t[1].isLink?["()","[]"].includes(t[0].value+t[2].value):!1}function lle(t){return new en({key:new gn("autolink"),appendTransaction:(e,n,r)=>{const o=e.some(u=>u.docChanged)&&!n.doc.eq(r.doc),i=e.some(u=>u.getMeta("preventAutolink"));if(!o||i)return;const{tr:s}=r,a=fee(n.doc,[...e]);if(bee(a).forEach(({newRange:u})=>{const f=hee(r.doc,u,g=>g.isTextblock);let h,m;if(f.length>1?(h=f[0],m=r.doc.textBetween(h.pos,h.pos+h.node.nodeSize,void 0," ")):f.length&&r.doc.textBetween(u.from,u.to," "," ").endsWith(" ")&&(h=f[0],m=r.doc.textBetween(h.pos,u.to,void 0," ")),h&&m){const g=m.split(" ").filter(C=>C!=="");if(g.length<=0)return!1;const b=g[g.length-1],y=h.pos+m.lastIndexOf(b);if(!b)return!1;const S=I1(b).map(C=>C.toObject(t.defaultProtocol));if(!ale(S))return!1;S.filter(C=>C.isLink).map(C=>({...C,from:y+C.start+1,to:y+C.end+1})).filter(C=>r.schema.marks.code?!r.doc.rangeHasMark(C.from,C.to,r.schema.marks.code):!0).filter(C=>t.validate(C.value)).filter(C=>t.shouldAutoLink(C.value)).forEach(C=>{Gx(C.from,C.to,r.doc).some(E=>E.mark.type===t.type)||s.addMark(C.from,C.to,t.type.create({href:C.href}))})}}),!!s.steps.length)return s}})}function cle(t){return new en({key:new gn("handleClickLink"),props:{handleClick:(e,n,r)=>{var o,i;if(r.button!==0||!e.editable)return!1;let s=r.target;const a=[];for(;s.nodeName!=="DIV";)a.push(s),s=s.parentNode;if(!a.find(m=>m.nodeName==="A"))return!1;const l=Yx(e.state,t.type.name),u=r.target,f=(o=u==null?void 0:u.href)!==null&&o!==void 0?o:l.href,h=(i=u==null?void 0:u.target)!==null&&i!==void 0?i:l.target;return u&&f?(window.open(f,h),!0):!1}}})}function ule(t){return new en({key:new gn("handlePasteLink"),props:{handlePaste:(e,n,r)=>{const{state:o}=e,{selection:i}=o,{empty:s}=i;if(s)return!1;let a="";r.content.forEach(u=>{a+=u.textContent});const l=xN(a,{defaultProtocol:t.defaultProtocol}).find(u=>u.isLink&&u.value===a);return!a||!l?!1:t.editor.commands.setMark(t.type,{href:l.href})}}})}const dle=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g;function bs(t,e){const n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(r=>{const o=typeof r=="string"?r:r.scheme;o&&n.push(o)}),!t||t.replace(dle,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}const fle=mr.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(t=>{if(typeof t=="string"){GR(t);return}GR(t.scheme,t.optionalSlashes)})},onDestroy(){ile()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(t,e)=>!!bs(t,e.protocols),validate:t=>!!t,shouldAutoLink:t=>!!t}},addAttributes(){return{href:{default:null,parseHTML(t){return t.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:t=>{const e=t.getAttribute("href");return!e||!this.options.isAllowedUri(e,{defaultValidate:n=>!!bs(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:t}){return this.options.isAllowedUri(t.href,{defaultValidate:e=>!!bs(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",yt(this.options.HTMLAttributes,t),0]:["a",yt(this.options.HTMLAttributes,{...t,href:""}),0]},addCommands(){return{setLink:t=>({chain:e})=>{const{href:n}=t;return this.options.isAllowedUri(n,{defaultValidate:r=>!!bs(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().setMark(this.name,t).setMeta("preventAutolink",!0).run():!1},toggleLink:t=>({chain:e})=>{const{href:n}=t;return this.options.isAllowedUri(n,{defaultValidate:r=>!!bs(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().toggleMark(this.name,t,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run():!1},unsetLink:()=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[Ki({find:t=>{const e=[];if(t){const{protocols:n,defaultProtocol:r}=this.options,o=xN(t).filter(i=>i.isLink&&this.options.isAllowedUri(i.value,{defaultValidate:s=>!!bs(s,n),protocols:n,defaultProtocol:r}));o.length&&o.forEach(i=>e.push({text:i.value,data:{href:i.href},index:i.start}))}return e},type:this.type,getAttributes:t=>{var e;return{href:(e=t.data)===null||e===void 0?void 0:e.href}}})]},addProseMirrorPlugins(){const t=[],{protocols:e,defaultProtocol:n}=this.options;return this.options.autolink&&t.push(lle({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:o=>!!bs(o,e),protocols:e,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),this.options.openOnClick===!0&&t.push(cle({type:this.type})),this.options.linkOnPaste&&t.push(ule({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type})),t}}),SN=Qt.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",yt(this.options.HTMLAttributes,t),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)}}});function ple(t){var e;const{char:n,allowSpaces:r,allowToIncludeChar:o,allowedPrefixes:i,startOfLine:s,$position:a}=t,l=r&&!o,u=Xee(n),f=new RegExp(`\\s${u}$`),h=s?"^":"",m=o?"":u,g=l?new RegExp(`${h}${u}.*?(?=\\s${m}|$)`,"gm"):new RegExp(`${h}(?:^)?${u}[^\\s${m}]*`,"gm"),b=((e=a.nodeBefore)===null||e===void 0?void 0:e.isText)&&a.nodeBefore.text;if(!b)return null;const y=a.pos-b.length,S=Array.from(b.matchAll(g)).pop();if(!S||S.input===void 0||S.index===void 0)return null;const C=S.input.slice(Math.max(0,S.index-1),S.index),E=new RegExp(`^[${i==null?void 0:i.join("")}\0]?$`).test(C);if(i!==null&&!E)return null;const T=y+S.index;let w=T+S[0].length;return l&&f.test(b.slice(w-1,w+1))&&(S[0]+=" ",w+=1),T<a.pos&&w>=a.pos?{range:{from:T,to:w},query:S[0].slice(n.length),text:S[0]}:null}const hle=new gn("suggestion");function mle({pluginKey:t=hle,editor:e,char:n="@",allowSpaces:r=!1,allowToIncludeChar:o=!1,allowedPrefixes:i=[" "],startOfLine:s=!1,decorationTag:a="span",decorationClass:l="suggestion",command:u=()=>null,items:f=()=>[],render:h=()=>({}),allow:m=()=>!0,findSuggestionMatch:g=ple}){let b;const y=h==null?void 0:h(),S=new en({key:t,view(){return{update:async(C,E)=>{var T,w,M,R,_,I,N;const O=(T=this.key)===null||T===void 0?void 0:T.getState(E),A=(w=this.key)===null||w===void 0?void 0:w.getState(C.state),L=O.active&&A.active&&O.range.from!==A.range.from,z=!O.active&&A.active,V=O.active&&!A.active,$=!z&&!V&&O.query!==A.query,F=z||L&&$,W=$||L,U=V||L&&$;if(!F&&!W&&!U)return;const G=U&&!F?O:A,Y=C.dom.querySelector(`[data-decoration-id="${G.decorationId}"]`);b={editor:e,range:G.range,query:G.query,text:G.text,items:[],command:Z=>u({editor:e,range:G.range,props:Z}),decorationNode:Y,clientRect:Y?()=>{var Z;const{decorationId:me}=(Z=this.key)===null||Z===void 0?void 0:Z.getState(e.state),fe=C.dom.querySelector(`[data-decoration-id="${me}"]`);return(fe==null?void 0:fe.getBoundingClientRect())||null}:null},F&&((M=y==null?void 0:y.onBeforeStart)===null||M===void 0||M.call(y,b)),W&&((R=y==null?void 0:y.onBeforeUpdate)===null||R===void 0||R.call(y,b)),(W||F)&&(b.items=await f({editor:e,query:G.query})),U&&((_=y==null?void 0:y.onExit)===null||_===void 0||_.call(y,b)),W&&((I=y==null?void 0:y.onUpdate)===null||I===void 0||I.call(y,b)),F&&((N=y==null?void 0:y.onStart)===null||N===void 0||N.call(y,b))},destroy:()=>{var C;b&&((C=y==null?void 0:y.onExit)===null||C===void 0||C.call(y,b))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(C,E,T,w){const{isEditable:M}=e,{composing:R}=e.view,{selection:_}=C,{empty:I,from:N}=_,O={...E};if(O.composing=R,M&&(I||e.view.composing)){(N<E.range.from||N>E.range.to)&&!R&&!E.composing&&(O.active=!1);const A=g({char:n,allowSpaces:r,allowToIncludeChar:o,allowedPrefixes:i,startOfLine:s,$position:_.$from}),L=`id_${Math.floor(Math.random()*4294967295)}`;A&&m({editor:e,state:w,range:A.range,isActive:E.active})?(O.active=!0,O.decorationId=E.decorationId?E.decorationId:L,O.range=A.range,O.query=A.query,O.text=A.text):O.active=!1}else O.active=!1;return O.active||(O.decorationId=null,O.range={from:0,to:0},O.query=null,O.text=null),O}},props:{handleKeyDown(C,E){var T;const{active:w,range:M}=S.getState(C.state);return w&&((T=y==null?void 0:y.onKeyDown)===null||T===void 0?void 0:T.call(y,{view:C,event:E,range:M}))||!1},decorations(C){const{active:E,range:T,decorationId:w}=S.getState(C);return E?Zt.create(C.doc,[Ln.inline(T.from,T.to,{nodeName:a,class:l,"data-decoration-id":w})]):null}}});return S}const gle=new gn("mention"),yle=Qt.create({name:"mention",priority:101,addOptions(){return{HTMLAttributes:{},renderText({options:t,node:e}){var n;return`${t.suggestion.char}${(n=e.attrs.label)!==null&&n!==void 0?n:e.attrs.id}`},deleteTriggerWithBackspace:!1,renderHTML({options:t,node:e}){var n;return["span",yt(this.HTMLAttributes,t.HTMLAttributes),`${t.suggestion.char}${(n=e.attrs.label)!==null&&n!==void 0?n:e.attrs.id}`]},suggestion:{char:"@",pluginKey:gle,command:({editor:t,range:e,props:n})=>{var r,o,i;const s=t.view.state.selection.$to.nodeAfter;((r=s==null?void 0:s.text)===null||r===void 0?void 0:r.startsWith(" "))&&(e.to+=1),t.chain().focus().insertContentAt(e,[{type:this.name,attrs:n},{type:"text",text:" "}]).run(),(i=(o=t.view.dom.ownerDocument.defaultView)===null||o===void 0?void 0:o.getSelection())===null||i===void 0||i.collapseToEnd()},allow:({state:t,range:e})=>{const n=t.doc.resolve(e.from),r=t.schema.nodes[this.name];return!!n.parent.type.contentMatch.matchType(r)}}}},group:"inline",inline:!0,selectable:!1,atom:!0,addAttributes(){return{id:{default:null,parseHTML:t=>t.getAttribute("data-id"),renderHTML:t=>t.id?{"data-id":t.id}:{}},label:{default:null,parseHTML:t=>t.getAttribute("data-label"),renderHTML:t=>t.label?{"data-label":t.label}:{}}}},parseHTML(){return[{tag:`span[data-type="${this.name}"]`}]},renderHTML({node:t,HTMLAttributes:e}){if(this.options.renderLabel!==void 0)return console.warn("renderLabel is deprecated use renderText and renderHTML instead"),["span",yt({"data-type":this.name},this.options.HTMLAttributes,e),this.options.renderLabel({options:this.options,node:t})];const n={...this.options};n.HTMLAttributes=yt({"data-type":this.name},this.options.HTMLAttributes,e);const r=this.options.renderHTML({options:n,node:t});return typeof r=="string"?["span",yt({"data-type":this.name},this.options.HTMLAttributes,e),r]:r},renderText({node:t}){return this.options.renderLabel!==void 0?(console.warn("renderLabel is deprecated use renderText and renderHTML instead"),this.options.renderLabel({options:this.options,node:t})):this.options.renderText({options:this.options,node:t})},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.command(({tr:t,state:e})=>{let n=!1;const{selection:r}=e,{empty:o,anchor:i}=r;return o?(e.doc.nodesBetween(i-1,i,(s,a)=>{if(s.type.name===this.name)return n=!0,t.insertText(this.options.deleteTriggerWithBackspace?"":this.options.suggestion.char||"",a,a+s.nodeSize),!1}),n):!1})}},addProseMirrorPlugins(){return[mle({editor:this.editor,...this.options.suggestion})]}}),ble="listItem",JR="textStyle",ZR=/^(\d+)\.\s$/,CN=Qt.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:t=>t.hasAttribute("start")?parseInt(t.getAttribute("start")||"",10):1},type:{default:null,parseHTML:t=>t.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:t}){const{start:e,...n}=t;return e===1?["ol",yt(this.options.HTMLAttributes,n),0]:["ol",yt(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(ble,this.editor.getAttributes(JR)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let t=sl({find:ZR,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(t=sl({find:ZR,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(JR)}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1],editor:this.editor})),[t]}}),wN=Qt.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",yt(this.options.HTMLAttributes,t),0]},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),TN=cn.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new en({key:new gn("placeholder"),props:{decorations:({doc:t,selection:e})=>{const n=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=e,o=[];if(!n)return null;const i=this.editor.isEmpty;return t.descendants((s,a)=>{const l=r>=a&&r<=a+s.nodeSize,u=!s.isLeaf&&th(s);if((l||!this.options.showOnlyCurrent)&&u){const f=[this.options.emptyNodeClass];i&&f.push(this.options.emptyEditorClass);const h=Ln.node(a,a+s.nodeSize,{class:f.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:s,pos:a,hasAnchor:l}):this.options.placeholder});o.push(h)}return this.options.includeChildren}),Zt.create(t,o)}}})]}}),vle=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,xle=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,EN=mr.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["s",yt(this.options.HTMLAttributes,t),0]},addCommands(){return{setStrike:()=>({commands:t})=>t.setMark(this.name),toggleStrike:()=>({commands:t})=>t.toggleMark(this.name),unsetStrike:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[Ws({find:vle,type:this.type})]},addPasteRules(){return[Ki({find:xle,type:this.type})]}}),Sle=mr.create({name:"subscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sub"},{style:"vertical-align",getAttrs(t){return t!=="sub"?!1:null}}]},renderHTML({HTMLAttributes:t}){return["sub",yt(this.options.HTMLAttributes,t),0]},addCommands(){return{setSubscript:()=>({commands:t})=>t.setMark(this.name),toggleSubscript:()=>({commands:t})=>t.toggleMark(this.name),unsetSubscript:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-,":()=>this.editor.commands.toggleSubscript()}}}),Cle=mr.create({name:"superscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sup"},{style:"vertical-align",getAttrs(t){return t!=="super"?!1:null}}]},renderHTML({HTMLAttributes:t}){return["sup",yt(this.options.HTMLAttributes,t),0]},addCommands(){return{setSuperscript:()=>({commands:t})=>t.setMark(this.name),toggleSuperscript:()=>({commands:t})=>t.toggleMark(this.name),unsetSuperscript:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-.":()=>this.editor.commands.toggleSuperscript()}}}),wle=Qt.create({name:"tableCell",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:t=>{const e=t.getAttribute("colwidth");return e?e.split(",").map(r=>parseInt(r,10)):null}}}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td"}]},renderHTML({HTMLAttributes:t}){return["td",yt(this.options.HTMLAttributes,t),0]}}),Tle=Qt.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:t=>{const e=t.getAttribute("colwidth");return e?e.split(",").map(r=>parseInt(r,10)):null}}}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th"}]},renderHTML({HTMLAttributes:t}){return["th",yt(this.options.HTMLAttributes,t),0]}}),Ele=Qt.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:t}){return["tr",yt(this.options.HTMLAttributes,t),0]}}),kle=/^\s*(\[([( |x])?\])\s$/,Mle=Qt.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:t=>{const e=t.getAttribute("data-checked");return e===""||e==="true"},renderHTML:t=>({"data-checked":t.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:t,HTMLAttributes:e}){return["li",yt(this.options.HTMLAttributes,e,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:t.attrs.checked?"checked":null}],["span"]],["div",0]]},addKeyboardShortcuts(){const t={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...t,Tab:()=>this.editor.commands.sinkListItem(this.name)}:t},addNodeView(){return({node:t,HTMLAttributes:e,getPos:n,editor:r})=>{const o=document.createElement("li"),i=document.createElement("label"),s=document.createElement("span"),a=document.createElement("input"),l=document.createElement("div");return i.contentEditable="false",a.type="checkbox",a.addEventListener("mousedown",u=>u.preventDefault()),a.addEventListener("change",u=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){a.checked=!a.checked;return}const{checked:f}=u.target;r.isEditable&&typeof n=="function"&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:h})=>{const m=n();if(typeof m!="number")return!1;const g=h.doc.nodeAt(m);return h.setNodeMarkup(m,void 0,{...g==null?void 0:g.attrs,checked:f}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(t,f)||(a.checked=!a.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([u,f])=>{o.setAttribute(u,f)}),o.dataset.checked=t.attrs.checked,a.checked=t.attrs.checked,i.append(a,s),o.append(i,l),Object.entries(e).forEach(([u,f])=>{o.setAttribute(u,f)}),{dom:o,contentDOM:l,update:u=>u.type!==this.type?!1:(o.dataset.checked=u.attrs.checked,a.checked=u.attrs.checked,!0)}}},addInputRules(){return[sl({find:kle,type:this.type,getAttributes:t=>({checked:t[t.length-1]==="x"})})]}}),Ole=Qt.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:t}){return["ul",yt(this.options.HTMLAttributes,t,{"data-type":this.name}),0]},addCommands(){return{toggleTaskList:()=>({commands:t})=>t.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),kN=Qt.create({name:"text",group:"inline"}),Rle=cn.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:t=>{const e=t.style.textAlign;return this.options.alignments.includes(e)?e:this.options.defaultAlignment},renderHTML:t=>t.textAlign?{style:`text-align: ${t.textAlign}`}:{}}}}]},addCommands(){return{setTextAlign:t=>({commands:e})=>this.options.alignments.includes(t)?this.options.types.map(n=>e.updateAttributes(n,{textAlign:t})).every(n=>n):!1,unsetTextAlign:()=>({commands:t})=>this.options.types.map(e=>t.resetAttributes(e,"textAlign")).every(e=>e)}},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")}}}),Ale=mr.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["u",yt(this.options.HTMLAttributes,t),0]},addCommands(){return{setUnderline:()=>({commands:t})=>t.setMark(this.name),toggleUnderline:()=>({commands:t})=>t.toggleMark(this.name),unsetUnderline:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),MN=J.forwardRef((t,e)=>{const[n,r]=J.useState(0),o=l=>{if(l>=t.items.length)return;const u=t.items[l],f={id:u.id,label:u.mentionLabel};t.command(f)},i=()=>{r((n+t.items.length-1)%t.items.length)},s=()=>{r((n+1)%t.items.length)},a=()=>{o(n)};return J.useEffect(()=>r(0),[t.items]),J.useImperativeHandle(e,()=>({onKeyDown:({event:l})=>l.key==="ArrowUp"?(i(),!0):l.key==="ArrowDown"?(s(),!0):l.key==="Enter"?(a(),!0):!1})),t.items.length>0?v.jsx(j.Paper,{elevation:5,children:v.jsx(j.List,{dense:!0,sx:{overflow:"hidden"},children:t.items.map((l,u)=>v.jsx(j.ListItem,{disablePadding:!0,children:v.jsx(j.ListItemButton,{selected:u===n,onClick:()=>o(u),children:l.mentionLabel})},l.id))})}):null});MN.displayName="SuggestionList";const XR={bottom:0,height:0,left:0,right:0,top:0,width:0,x:0,y:0,toJSON(){return{}}},Ile={items:async({query:t})=>Promise.resolve(["Lea Thompson","Cyndi Lauper","Tom Cruise","Madonna","Jerry Hall","Joan Collins","Winona Ryder","Christina Applegate","Alyssa Milano","Molly Ringwald","Ally Sheedy","Debbie Harry","Olivia Newton-John","Elton John","Michael J. Fox","Axl Rose","Emilio Estevez","Ralph Macchio","Rob Lowe","Jennifer Grey","Mickey Rourke","John Cusack","Matthew Broderick","Justine Bateman","Lisa Bonet","Benicio Monserrate Rafael del Toro Sánchez"].map((e,n)=>({mentionLabel:e,id:n.toString()})).filter(e=>e.mentionLabel.toLowerCase().startsWith(t.toLowerCase())).slice(0,5)),render:()=>{let t,e;return{onStart:n=>{t=new f_(MN,{props:n,editor:n.editor}),e=mu("body",{getReferenceClientRect:()=>{var r;return((r=n.clientRect)==null?void 0:r.call(n))??XR},appendTo:()=>document.body,content:t.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start"})[0]},onUpdate(n){t==null||t.updateProps(n),e==null||e.setProps({getReferenceClientRect:()=>{var r;return((r=n.clientRect)==null?void 0:r.call(n))??XR}})},onKeyDown(n){return n.event.key==="Escape"?(e==null||e.hide(),!0):t!=null&&t.ref?t.ref.onKeyDown(n):!1},onExit(){e==null||e.destroy(),t==null||t.destroy(),e=void 0,t=void 0}}}},Dle=fle.extend({inclusive:!1}),Ple=Sle.extend({excludes:"superscript"}),_le=Cle.extend({excludes:"subscript"});function Nle({placeholder:t}={}){return J.useMemo(()=>[rae.configure({resizable:!0}),Ele,Tle,wle,X_,eN,tN,oN,SN,CN,wN,Ple,_le,kN,Z_,J_,Q_,dN,Ale,EN,Dle.configure({autolink:!0,linkOnPaste:!0,openOnClick:!1}),Zne,rN,Yie,Rle.configure({types:["heading","paragraph","image"]}),gae,yae,xae,Uie,Aae.configure({multicolor:!0}),uN,tse,nN,Ole,Mle.configure({nested:!0}),yle.configure({suggestion:Ile}),TN.configure({placeholder:t}),cN],[t])}function QR(t){return Array.from(t).filter(e=>(e.type||"").toLowerCase().startsWith("image/"))}const Lle=t=>{const e=Nle({placeholder:"Add your own content here..."});if(t.renderContentOnly)return v.jsx(Toe,{content:t.renderContentOnly,extensions:e});const{name:n,label:r,labelProps:o={fontSize:"0.9em",color:"#808080",fontWeight:"400"},onUploadFiles:i,readOnly:s=!1}=t,[a,l,u]=Wt.useField({name:n}),{setValue:f}=u,{value:h}=a;J.useEffect(()=>{var C,E,T;(T=(E=(C=m==null?void 0:m.current)==null?void 0:C.editor)==null?void 0:E.commands)==null||T.setContent(h)},[h]);const m=J.useRef(null),g=J.useCallback((C,E)=>{var w;const T=(w=m.current)==null?void 0:w.editor;if(T)if(i instanceof Promise)i(C).then(M=>{g0({images:M,editor:T,position:E})});else{const M=i(C);g0({images:M,editor:T,position:E})}},[]),b=J.useCallback((C,E,T,w)=>{var R;if(!(E instanceof DragEvent)||!E.dataTransfer)return!1;const M=QR(E.dataTransfer.files);if(M.length>0){const _=(R=C.posAtCoords({left:E.clientX,top:E.clientY}))==null?void 0:R.pos;return g(M,_),E.preventDefault(),!0}return!1},[g]),y=J.useCallback((C,E,T)=>{if(!E.clipboardData)return!1;const w=QR(E.clipboardData.files);return w.length>0?(g(w),!0):!1},[g]),S=v.jsx(j.Box,{sx:{"& .ProseMirror":{"& h1, & h2, & h3, & h4, & h5, & h6":{scrollMarginTop:s?0:50}}},children:v.jsx(b_,{ref:m,extensions:e,content:h,editable:!s,editorProps:{handleDrop:b,handlePaste:y},renderControls:s?void 0:()=>v.jsx(oae,{onUploadFiles:i}),onBlur:()=>{var C,E;return f(((E=(C=m.current)==null?void 0:C.editor)==null?void 0:E.getHTML())??"")},RichTextFieldProps:{variant:"outlined",MenuBarProps:{hide:s}},children:()=>v.jsxs(v.Fragment,{children:[v.jsx(JP,{}),v.jsx(v_,{})]})})});return v.jsxs(j.Box,{display:"flex",flexDirection:"column",children:[r&&v.jsx(j.Typography,{...o,children:r}),S]})},I0=t=>{const{title:e="Loading...",message:n}=t;return v.jsxs(j.Box,{className:"loading-page",sx:{gap:2},"data-testid":"loading-page",children:[v.jsxs(j.Box,{className:"text-content",children:[v.jsx(j.Typography,{variant:"h1","data-testid":"title",children:e}),n&&v.jsx(j.Typography,{"data-testid":"message",children:n})]}),v.jsx(j.CircularProgress,{size:75,"data-testid":"loading-spinner"})]})},eA=t=>{const{colSpan:e,isExpanded:n,renderExpand:r,obj:o,asMobileCard:i=!1}=t,[s,a]=J.useState(!1),[l,u]=J.useState(void 0);return J.useEffect(()=>{n&&!s&&(a(!0),u(r(o)))},[n]),i?v.jsx(j.Box,{children:v.jsx(j.Collapse,{in:n,children:l})}):v.jsx(j.TableRow,{children:v.jsx(j.TableCell,{style:{paddingBottom:0,paddingTop:0},colSpan:e,children:v.jsx(j.Collapse,{in:n,children:l})})})},ON=t=>{const{id:e,getRowKey:n=K=>"id"in K&&(typeof K.id=="string"||typeof K.id=="number")?K.id:(console.warn(`Table: "id: string | number" not found in ${JSON.stringify(K)}. Please implement the Table.getRowKey prop so Table knows how to uniquely identify this row.`),JSON.stringify(K)),columns:r,data:o=[],onRowClick:i,renderExpand:s,hideColumnsOnMobile:a=[],sortField:l,sortOrder:u,onSortChange:f,allowSortCols:h,fixedLayout:m=!1,className:g,emptyTableMsg:b="No items to display",errorTableMsg:y,retryCallback:S,isLoading:C=!1,disableMobileCards:E=!1,highlightSelectedRow:T=!1,headerRowStyle:w={},stickyHeader:M,...R}=t,{palette:_}=j.useTheme(),[I,N]=J.useState(void 0),[O,A]=J.useState(void 0);Array.isArray(m)&&m.length!==r.length&&console.error('Table component: Length of "fixedLayout" is not equal to the length of "columns".');const L=K=>{K!==l?f&&f(K,"asc"):f&&f(l,u==="asc"?"desc":"asc")},z=K=>l===K?u:null,V=j.useMediaQuery(j.useTheme().breakpoints.down("sm")),$=V&&a?r.filter(K=>!a.includes(K.fieldName)):r,F=(K,Q)=>Q.split(".").reduce((ie,he)=>{if(ie&&typeof ie=="object")return ie[he]},K),W=(K,Q)=>{const ie=F(Q,K.fieldName);return K.render?K.render(ie,Q,V):ie},U=f!==void 0,G=K=>U?h?h.includes(K):!0:!1,Y=v.jsxs(j.Box,{display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"row",children:[v.jsx(E6,{})," ",b]}),Z=v.jsxs(j.Box,{"data-testid":"table-fetch-error-msg",display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"row",children:[v.jsx(ZA,{color:"error"})," ",y,S&&v.jsx(j.Button,{variant:"text",onClick:S,children:"Retry?"})]}),me=()=>{if(C)return v.jsx(j.TableRow,{children:v.jsx(j.TableCell,{colSpan:r.length,align:"center",children:v.jsx(j.Box,{display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"row",children:v.jsx(I0,{})})})});if(y)return v.jsx(j.TableRow,{children:v.jsx(j.TableCell,{colSpan:r.length,align:"center",children:Z})});if(o.length===0)return v.jsx(j.TableRow,{children:v.jsx(j.TableCell,{colSpan:r.length,align:"center",children:Y})})},fe=()=>{if(C)return v.jsx(I0,{});if(y)return Z;if(o.length===0)return Y},pe=K=>{T&&A(K)},re=K=>{if(i&&(i(K),pe(K)),s){const Q=I===K?void 0:K;N(Q),pe(Q)}},ue=typeof T=="string"?T:_.grey[_.mode=="dark"?600:50],ae=K=>{const Q=O===n(K)?ue:"inherit";return{cursor:i||s?"pointer":"default",backgroundColor:Q,...i&&{"&:hover":{backgroundColor:Q===ue?Ya(Q,.1):ue}}}};return V&&!E?v.jsxs("div",{...e?{id:`mobile-table-${e}`}:{},className:g,"data-testid":"mui-table-mobile",children:[U&&v.jsxs(v.Fragment,{children:[v.jsxs(j.Box,{display:"flex",className:"MBv2_Table_Stack_Sort",children:[v.jsx(j.TextField,{select:!0,sx:{flexGrow:1},id:"demo-simple-select",size:"small",value:l??"",label:"Sort By...",onChange:K=>L(K.target.value),fullWidth:!0,children:$.map(K=>{if(G(K.fieldName))return v.jsx(j.MenuItem,{value:K.sortName??K.fieldName,children:K.label??kn(K.fieldName)},`${K.key??"rowHeader"}-${K.fieldName}`)})}),v.jsx(j.IconButton,{onClick:()=>{l&&L(l)},children:v.jsx(N6,{className:`sort-icon-${u}`})})]}),v.jsx(j.Divider,{sx:{margin:"10px 0"}})]}),fe()??o.map(K=>v.jsxs(j.Card,{className:"MBv2_Table_Stack_Container",sx:{margin:"5px 0",padding:"5px",...ae(K)},onClick:()=>re(n(K)),"data-testid":`card-${n(K)}`,children:[v.jsx("table",{className:"MBv2_Table_Stack",children:v.jsx("tbody",{className:"MBv2_Table_Stack_Body",children:$.map(Q=>v.jsxs("tr",{className:"MBv2_Table_Stack_Row",children:[v.jsx("td",{className:`MBv2_Table_Stack_Cell_Label MBv2_Table_Stack_Col_${Q.fieldName}`,children:Q.label??kn(Q.fieldName)}),v.jsx("td",{className:`MBv2_Table_Stack_Cell_Value MBv2_Table_Stack_Val_${Q.fieldName}`,style:{paddingLeft:"10px"},children:W(Q,K)})]},`${Q.key??"row"}-${n(K)}-${Q.fieldName}`))})}),s&&v.jsx(eA,{colSpan:r.length,isExpanded:n(K)===I,obj:K,renderExpand:Q=>s(Q),asMobileCard:!0})]},n(K)))]}):v.jsx(j.TableContainer,{component:j.Card,"data-testid":"mui-table",...e?{id:`table-${e}`}:{},className:g,style:M?{maxHeight:M,overflow:"auto"}:{},children:v.jsxs(j.Table,{stickyHeader:M!=="undefined",style:{tableLayout:m?"fixed":"auto"},className:"MBv2_Table",sx:w?{"& .MuiTableCell-head":{...w}}:{},...R,children:[v.jsx(j.TableHead,{className:"MBv2_Table_Head",children:v.jsx(j.TableRow,{className:"MBv2_Table_Head_Row",children:$.map((K,Q)=>{const ie=G(K.fieldName);return v.jsx(j.TableCell,{width:Array.isArray(m)?m[Q]:"auto",children:v.jsx(j.Box,{style:{display:"flex",alignItems:"center"},children:v.jsxs(j.Box,{sx:[ie&&{"&:hover":{cursor:"pointer",backgroundColor:_.mode==="dark"?"#222222":"#ededed",borderRadius:2}}],style:{display:"flex",alignItems:"center",padding:"5px",paddingLeft:"6px",marginLeft:"-6px"},onClick:ie?()=>L(K.sortName??K.fieldName):void 0,children:[v.jsx("strong",{className:"MBv2_Table_Col_Label",style:{wordBreak:"normal"},children:K.label??kn(K.fieldName)}),ie&&z(K.fieldName)==="asc"&&v.jsx(sI,{style:{marginLeft:"5px"}}),ie&&z(K.fieldName)==="desc"&&v.jsx(k6,{style:{marginLeft:"5px"}}),ie&&z(K.fieldName)!=="asc"&&z(K.fieldName)!=="desc"&&v.jsx(D6,{style:{marginLeft:"5px"}})]})})},`${K.key??"rowHeader"}-${K.fieldName}`)})})}),v.jsx(j.TableBody,{className:"MBv2_Table_Body",children:me()??o.map(K=>v.jsxs(J.Fragment,{children:[v.jsx(j.TableRow,{"data-testid":`row-${n(K)}`,className:"MBv2_Table_Body_Row",onClick:()=>re(n(K)),sx:ae(K),children:$.map(Q=>v.jsx(j.TableCell,{className:`MBv2_Table_Body_Cell MBv2_Table_Body_Col_${Q.fieldName}`,children:W(Q,K)},`${Q.key??"row"}-${n(K)}-${Q.fieldName}`))}),s&&v.jsx(eA,{colSpan:r.length,isExpanded:n(K)===I,obj:K,renderExpand:Q=>s(Q)})]},n(K)))})]})})},RN=t=>{const{paginationState:e,onPageChange:n,onRowsPerPageChange:r,hidePaginationControls:o=!1,rowsPerPageOptions:i=[5,10,25],...s}=t,{pageNo:a,pageSize:l,totalCount:u,sortField:f,sortOrder:h}=e,m=S=>{n(S)},g=S=>{r(parseInt(S.target.value,10))},b=j.useMediaQuery(j.useTheme().breakpoints.down("sm")),y=!t.data||t.data&&t.data.length===0;return v.jsxs(j.Box,{children:[v.jsx(ON,{sortOrder:h,sortField:f,...s}),!o&&!y&&v.jsx(j.TablePagination,{"data-testid":"pagination-controls",component:"div",rowsPerPageOptions:b?[]:i,count:u,rowsPerPage:l,page:a,onPageChange:(S,C)=>m(C),onRowsPerPageChange:g,sx:{flexGrow:1,marginRight:{xs:0,md:15}}})]})},jle=t=>{const{onCancel:e,onNewCitation:n,onNewAttachment:r,onEditCitation:o,onEditAttachment:i,onSelect:s,fetchExistingCitations:a,selectedIds:l,toggleCheckbox:u,onError:f=()=>{}}=t,[h,m]=J.useState([]),[g,b]=J.useState(!1),[y,S]=J.useState(!0),[C,E]=J.useState({pageNo:0,pageSize:5,totalCount:0}),T=()=>{b(!1),S(!0),a({pageNo:C.pageNo,pageSize:C.pageSize}).then(w=>{m(w.data),E({...C,totalCount:w.totalCount})}).catch(w=>{f(w),b(!0),m([])}).finally(()=>S(!1))};return J.useEffect(()=>{T()},[C.pageNo,C.pageSize]),v.jsxs(v.Fragment,{children:[v.jsx(RN,{"data-testid":"citation-table",size:"x-small",isLoading:y,columns:[{fieldName:"id",key:"select",label:"",render:(w,M)=>v.jsx(j.Checkbox,{"data-testid":`citation-table_checkbox-${w}`,onChange:()=>u(M),checked:l.includes(w)})},{fieldName:"title"},{fieldName:"fileName",key:"CitationOrAttachment",label:"Type",render:w=>w?"Attachment":"Citation"},{fieldName:"id",key:"Action",label:"Action",render:(w,M)=>v.jsx(j.IconButton,{color:"primary",onClick:()=>M.fileName?i(M):o(M),"data-testid":`citation-table_edit-btn-${w}`,children:v.jsx(a6,{})})}],data:h,paginationState:C,onPageChange:w=>E({...C,pageNo:w}),onRowsPerPageChange:w=>E({...C,pageSize:w,pageNo:0}),fixedLayout:["60px","auto","auto","120px"],errorTableMsg:g?"Failed to load citations.":void 0,retryCallback:T}),v.jsxs(j.Box,{display:"flex",flexDirection:"row",justifyContent:"space-between",marginTop:"20px",children:[v.jsxs(j.Box,{display:"flex",flexDirection:"row",gap:".25rem",children:[v.jsx(j.Button,{variant:"outlined",size:"small",onClick:n,startIcon:v.jsx(H0,{}),children:"Add Citation"}),v.jsx(j.Button,{variant:"outlined",size:"small",onClick:r,startIcon:v.jsx(e6,{}),children:"Add Attachment"})]}),v.jsxs(j.Box,{display:"flex",flexDirection:"row",gap:".25rem",children:[v.jsx(j.Button,{variant:"outlined",size:"small",onClick:e,children:"Cancel"}),v.jsxs(j.Button,{variant:"contained",size:"small",onClick:()=>s(l),children:["Select",l.length>0&&` (${l.length})`]})]})]})]})},tA=()=>({height:window.innerHeight,width:window.innerWidth}),AN=()=>{const[t,e]=J.useState(tA());return J.useEffect(()=>{const n=()=>{e(tA())};return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[]),t},D1=t=>{const{name:e="button",color:n="primary",fullWidthOnMobile:r=!0,type:o="button",variant:i="contained"}=t,{width:s}=AN(),a=["locationInBar","closeDialog","fullWidthOnMobile"],l=r&&s<600;return v.jsx(j.Button,{role:"button",name:e,color:n,variant:i,type:o,fullWidth:t.fullWidth?!0:l,...Xn({...t},a)})},IN=t=>{const{name:e="submit"}=t;return v.jsx(D1,{name:e,type:"submit",...t})},$le=t=>{const{id:e,onSave:n,onCancel:r,getCitationById:o,setError:i}=t,s=J.useRef(null),[a,l]=J.useState(!0),[u,f]=J.useState({source:"",title:"",accessedAt:null,url:"",classification:""}),[h,m]=J.useState("");J.useEffect(()=>{if(e===void 0){l(!1);return}o(e).then(b=>{f(b),m(b.title),l(!1)}).catch(b=>{l(!1),i({title:"Failed to retrieve citation",err:b})})},[]);const g=()=>{var y,S,C;const b=(S=(y=s==null?void 0:s.current)==null?void 0:y.values)==null?void 0:S.url;b&&((C=s==null?void 0:s.current)==null||C.setFieldValue("url",YP(b)))};return v.jsx(Wt.Formik,{innerRef:s,enableReinitialize:!0,initialValues:u,onSubmit:async b=>{l(!0),n(b,e!==void 0&&h!==b.title).catch(y=>{l(!1),i({title:`Failed to ${e===void 0?"save":"update"} citation`,err:y})}).finally(()=>l(!1))},children:v.jsxs(Wt.Form,{autoComplete:"off",children:[v.jsx(Fa,{name:"source",disabled:a,required:!0,margin:"none"}),v.jsx(Fa,{name:"title",disabled:a,required:!0,margin:"none"}),v.jsx(xf,{name:"accessedAt",disabled:a,required:!0,margin:"none"}),v.jsx(Fa,{name:"url",disabled:a,required:!0,onBlur:g,margin:"none"}),v.jsx(oI,{row:!0,name:"classification",required:!0,radios:[{label:"Public Source",value:"Public Source"},{label:"Unclassified",value:"Unclassified"}],margin:"none"}),v.jsxs(j.DialogActions,{sx:{px:0},children:[v.jsx(j.Button,{onClick:r,variant:"outlined",size:"small",children:"Cancel"}),v.jsx(IN,{color:"primary",variant:"contained",size:"small",disabled:a,children:e?"Update Citation":"Add New Citation"})]})]})})};var wv,nA;function Fle(){if(nA)return wv;nA=1;function t(C){this._maxSize=C,this.clear()}t.prototype.clear=function(){this._size=0,this._values=Object.create(null)},t.prototype.get=function(C){return this._values[C]},t.prototype.set=function(C,E){return this._size>=this._maxSize&&this.clear(),C in this._values||this._size++,this._values[C]=E};var e=/[^.^\]^[]+|(?=\[\]|\.\.)/g,n=/^\d+$/,r=/^\d/,o=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,i=/^\s*(['"]?)(.*?)(\1)\s*$/,s=512,a=new t(s),l=new t(s),u=new t(s);wv={Cache:t,split:h,normalizePath:f,setter:function(C){var E=f(C);return l.get(C)||l.set(C,function(w,M){for(var R=0,_=E.length,I=w;R<_-1;){var N=E[R];if(N==="__proto__"||N==="constructor"||N==="prototype")return w;I=I[E[R++]]}I[E[R]]=M})},getter:function(C,E){var T=f(C);return u.get(C)||u.set(C,function(M){for(var R=0,_=T.length;R<_;)if(M!=null||!E)M=M[T[R++]];else return;return M})},join:function(C){return C.reduce(function(E,T){return E+(g(T)||n.test(T)?"["+T+"]":(E?".":"")+T)},"")},forEach:function(C,E,T){m(Array.isArray(C)?C:h(C),E,T)}};function f(C){return a.get(C)||a.set(C,h(C).map(function(E){return E.replace(i,"$2")}))}function h(C){return C.match(e)||[""]}function m(C,E,T){var w=C.length,M,R,_,I;for(R=0;R<w;R++)M=C[R],M&&(S(M)&&(M='"'+M+'"'),I=g(M),_=!I&&/^\d+$/.test(M),E.call(T,M,I,_,R,C))}function g(C){return typeof C=="string"&&C&&["'",'"'].indexOf(C.charAt(0))!==-1}function b(C){return C.match(r)&&!C.match(n)}function y(C){return o.test(C)}function S(C){return!g(C)&&(b(C)||y(C))}return wv}var js=Fle(),Tv,rA;function Ble(){if(rA)return Tv;rA=1;const t=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,e=f=>f.match(t)||[],n=f=>f[0].toUpperCase()+f.slice(1),r=(f,h)=>e(f).join(h).toLowerCase(),o=f=>e(f).reduce((h,m)=>`${h}${h?m[0].toUpperCase()+m.slice(1).toLowerCase():m.toLowerCase()}`,"");return Tv={words:e,upperFirst:n,camelCase:o,pascalCase:f=>n(o(f)),snakeCase:f=>r(f,"_"),kebabCase:f=>r(f,"-"),sentenceCase:f=>n(r(f," ")),titleCase:f=>e(f).map(n).join(" ")},Tv}var Ev=Ble(),$d={exports:{}},oA;function Vle(){if(oA)return $d.exports;oA=1,$d.exports=function(o){return t(e(o),o)},$d.exports.array=t;function t(o,i){var s=o.length,a=new Array(s),l={},u=s,f=n(i),h=r(o);for(i.forEach(function(g){if(!h.has(g[0])||!h.has(g[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});u--;)l[u]||m(o[u],u,new Set);return a;function m(g,b,y){if(y.has(g)){var S;try{S=", node was:"+JSON.stringify(g)}catch{S=""}throw new Error("Cyclic dependency"+S)}if(!h.has(g))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(g));if(!l[b]){l[b]=!0;var C=f.get(g)||new Set;if(C=Array.from(C),b=C.length){y.add(g);do{var E=C[--b];m(E,h.get(E),y)}while(b);y.delete(g)}a[--s]=g}}}function e(o){for(var i=new Set,s=0,a=o.length;s<a;s++){var l=o[s];i.add(l[0]),i.add(l[1])}return Array.from(i)}function n(o){for(var i=new Map,s=0,a=o.length;s<a;s++){var l=o[s];i.has(l[0])||i.set(l[0],new Set),i.has(l[1])||i.set(l[1],new Set),i.get(l[0]).add(l[1])}return i}function r(o){for(var i=new Map,s=0,a=o.length;s<a;s++)i.set(o[s],s);return i}return $d.exports}var zle=Vle();const Hle=rr(zle),Wle=Object.prototype.toString,qle=Error.prototype.toString,Ule=RegExp.prototype.toString,Kle=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",Yle=/^Symbol\((.*)\)(.*)$/;function Gle(t){return t!=+t?"NaN":t===0&&1/t<0?"-0":""+t}function iA(t,e=!1){if(t==null||t===!0||t===!1)return""+t;const n=typeof t;if(n==="number")return Gle(t);if(n==="string")return e?`"${t}"`:t;if(n==="function")return"[Function "+(t.name||"anonymous")+"]";if(n==="symbol")return Kle.call(t).replace(Yle,"Symbol($1)");const r=Wle.call(t).slice(8,-1);return r==="Date"?isNaN(t.getTime())?""+t:t.toISOString(t):r==="Error"||t instanceof Error?"["+qle.call(t)+"]":r==="RegExp"?Ule.call(t):null}function Hi(t,e){let n=iA(t,e);return n!==null?n:JSON.stringify(t,function(r,o){let i=iA(this[r],e);return i!==null?i:o},2)}function DN(t){return t==null?[]:[].concat(t)}let PN,_N,NN,Jle=/\$\{\s*(\w+)\s*\}/g;PN=Symbol.toStringTag;class sA{constructor(e,n,r,o){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[PN]="Error",this.name="ValidationError",this.value=n,this.path=r,this.type=o,this.errors=[],this.inner=[],DN(e).forEach(i=>{if(dr.isError(i)){this.errors.push(...i.errors);const s=i.inner.length?i.inner:[i];this.inner.push(...s)}else this.errors.push(i)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}_N=Symbol.hasInstance;NN=Symbol.toStringTag;class dr extends Error{static formatError(e,n){const r=n.label||n.path||"this";return n=Object.assign({},n,{path:r,originalPath:n.path}),typeof e=="string"?e.replace(Jle,(o,i)=>Hi(n[i])):typeof e=="function"?e(n):e}static isError(e){return e&&e.name==="ValidationError"}constructor(e,n,r,o,i){const s=new sA(e,n,r,o);if(i)return s;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[NN]="Error",this.name=s.name,this.message=s.message,this.type=s.type,this.value=s.value,this.path=s.path,this.errors=s.errors,this.inner=s.inner,Error.captureStackTrace&&Error.captureStackTrace(this,dr)}static[_N](e){return sA[Symbol.hasInstance](e)||super[Symbol.hasInstance](e)}}let Co={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:t,type:e,value:n,originalValue:r})=>{const o=r!=null&&r!==n?` (cast from the value \`${Hi(r,!0)}\`).`:".";return e!=="mixed"?`${t} must be a \`${e}\` type, but the final value was: \`${Hi(n,!0)}\``+o:`${t} must match the configured type. The validated value was: \`${Hi(n,!0)}\``+o}},cr={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},Zle={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},D0={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},Xle={isValue:"${path} field must be ${value}"},af={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},Qle={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},ece={notType:t=>{const{path:e,value:n,spec:r}=t,o=r.types.length;if(Array.isArray(n)){if(n.length<o)return`${e} tuple value has too few items, expected a length of ${o} but got ${n.length} for value: \`${Hi(n,!0)}\``;if(n.length>o)return`${e} tuple value has too many items, expected a length of ${o} but got ${n.length} for value: \`${Hi(n,!0)}\``}return dr.formatError(Co.notType,t)}};Object.assign(Object.create(null),{mixed:Co,string:cr,number:Zle,date:D0,object:af,array:Qle,boolean:Xle,tuple:ece});const P1=t=>t&&t.__isYupSchema__;class up{static fromOptions(e,n){if(!n.then&&!n.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:r,then:o,otherwise:i}=n,s=typeof r=="function"?r:(...a)=>a.every(l=>l===r);return new up(e,(a,l)=>{var u;let f=s(...a)?o:i;return(u=f==null?void 0:f(l))!=null?u:l})}constructor(e,n){this.fn=void 0,this.refs=e,this.refs=e,this.fn=n}resolve(e,n){let r=this.refs.map(i=>i.getValue(n==null?void 0:n.value,n==null?void 0:n.parent,n==null?void 0:n.context)),o=this.fn(r,e,n);if(o===void 0||o===e)return e;if(!P1(o))throw new TypeError("conditions must return a schema object");return o.resolve(n)}}const Fd={context:"$",value:"."};class Xs{constructor(e,n={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof e!="string")throw new TypeError("ref must be a string, got: "+e);if(this.key=e.trim(),e==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===Fd.context,this.isValue=this.key[0]===Fd.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?Fd.context:this.isValue?Fd.value:"";this.path=this.key.slice(r.length),this.getter=this.path&&js.getter(this.path,!0),this.map=n.map}getValue(e,n,r){let o=this.isContext?r:this.isValue?e:n;return this.getter&&(o=this.getter(o||{})),this.map&&(o=this.map(o)),o}cast(e,n){return this.getValue(e,n==null?void 0:n.parent,n==null?void 0:n.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}}Xs.prototype.__isYupRef=!0;const As=t=>t==null;function Oa(t){function e({value:n,path:r="",options:o,originalValue:i,schema:s},a,l){const{name:u,test:f,params:h,message:m,skipAbsent:g}=t;let{parent:b,context:y,abortEarly:S=s.spec.abortEarly,disableStackTrace:C=s.spec.disableStackTrace}=o;function E(A){return Xs.isRef(A)?A.getValue(n,b,y):A}function T(A={}){const L=Object.assign({value:n,originalValue:i,label:s.spec.label,path:A.path||r,spec:s.spec,disableStackTrace:A.disableStackTrace||C},h,A.params);for(const V of Object.keys(L))L[V]=E(L[V]);const z=new dr(dr.formatError(A.message||m,L),n,L.path,A.type||u,L.disableStackTrace);return z.params=L,z}const w=S?a:l;let M={path:r,parent:b,type:u,from:o.from,createError:T,resolve:E,options:o,originalValue:i,schema:s};const R=A=>{dr.isError(A)?w(A):A?l(null):w(T())},_=A=>{dr.isError(A)?w(A):a(A)};if(g&&As(n))return R(!0);let N;try{var O;if(N=f.call(M,n,M),typeof((O=N)==null?void 0:O.then)=="function"){if(o.sync)throw new Error(`Validation test of type: "${M.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(N).then(R,_)}}catch(A){_(A);return}R(N)}return e.OPTIONS=t,e}function tce(t,e,n,r=n){let o,i,s;return e?(js.forEach(e,(a,l,u)=>{let f=l?a.slice(1,a.length-1):a;t=t.resolve({context:r,parent:o,value:n});let h=t.type==="tuple",m=u?parseInt(f,10):0;if(t.innerType||h){if(h&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${s}" must contain an index to the tuple element, e.g. "${s}[0]"`);if(n&&m>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${a}, in the path: ${e}. because there is no value at that index. `);o=n,n=n&&n[m],t=h?t.spec.types[m]:t.innerType}if(!u){if(!t.fields||!t.fields[f])throw new Error(`The schema does not contain the path: ${e}. (failed at: ${s} which is a type: "${t.type}")`);o=n,n=n&&n[f],t=t.fields[f]}i=f,s=l?"["+a+"]":"."+a}),{schema:t,parent:o,parentPath:i}):{parent:o,parentPath:e,schema:t}}class dp extends Set{describe(){const e=[];for(const n of this.values())e.push(Xs.isRef(n)?n.describe():n);return e}resolveAll(e){let n=[];for(const r of this.values())n.push(e(r));return n}clone(){return new dp(this.values())}merge(e,n){const r=this.clone();return e.forEach(o=>r.add(o)),n.forEach(o=>r.delete(o)),r}}function ja(t,e=new Map){if(P1(t)||!t||typeof t!="object")return t;if(e.has(t))return e.get(t);let n;if(t instanceof Date)n=new Date(t.getTime()),e.set(t,n);else if(t instanceof RegExp)n=new RegExp(t),e.set(t,n);else if(Array.isArray(t)){n=new Array(t.length),e.set(t,n);for(let r=0;r<t.length;r++)n[r]=ja(t[r],e)}else if(t instanceof Map){n=new Map,e.set(t,n);for(const[r,o]of t.entries())n.set(r,ja(o,e))}else if(t instanceof Set){n=new Set,e.set(t,n);for(const r of t)n.add(ja(r,e))}else if(t instanceof Object){n={},e.set(t,n);for(const[r,o]of Object.entries(t))n[r]=ja(o,e)}else throw Error(`Unable to clone ${t}`);return n}class Po{constructor(e){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new dp,this._blacklist=new dp,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Co.notType)}),this.type=e.type,this._typeCheck=e.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},e==null?void 0:e.spec),this.withMutation(n=>{n.nonNullable()})}get _type(){return this.type}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;const n=Object.create(Object.getPrototypeOf(this));return n.type=this.type,n._typeCheck=this._typeCheck,n._whitelist=this._whitelist.clone(),n._blacklist=this._blacklist.clone(),n.internalTests=Object.assign({},this.internalTests),n.exclusiveTests=Object.assign({},this.exclusiveTests),n.deps=[...this.deps],n.conditions=[...this.conditions],n.tests=[...this.tests],n.transforms=[...this.transforms],n.spec=ja(Object.assign({},this.spec,e)),n}label(e){let n=this.clone();return n.spec.label=e,n}meta(...e){if(e.length===0)return this.spec.meta;let n=this.clone();return n.spec.meta=Object.assign(n.spec.meta||{},e[0]),n}withMutation(e){let n=this._mutate;this._mutate=!0;let r=e(this);return this._mutate=n,r}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let n=this,r=e.clone();const o=Object.assign({},n.spec,r.spec);return r.spec=o,r.internalTests=Object.assign({},n.internalTests,r.internalTests),r._whitelist=n._whitelist.merge(e._whitelist,e._blacklist),r._blacklist=n._blacklist.merge(e._blacklist,e._whitelist),r.tests=n.tests,r.exclusiveTests=n.exclusiveTests,r.withMutation(i=>{e.tests.forEach(s=>{i.test(s.OPTIONS)})}),r.transforms=[...n.transforms,...r.transforms],r}isType(e){return e==null?!!(this.spec.nullable&&e===null||this.spec.optional&&e===void 0):this._typeCheck(e)}resolve(e){let n=this;if(n.conditions.length){let r=n.conditions;n=n.clone(),n.conditions=[],n=r.reduce((o,i)=>i.resolve(o,e),n),n=n.resolve(e)}return n}resolveOptions(e){var n,r,o,i;return Object.assign({},e,{from:e.from||[],strict:(n=e.strict)!=null?n:this.spec.strict,abortEarly:(r=e.abortEarly)!=null?r:this.spec.abortEarly,recursive:(o=e.recursive)!=null?o:this.spec.recursive,disableStackTrace:(i=e.disableStackTrace)!=null?i:this.spec.disableStackTrace})}cast(e,n={}){let r=this.resolve(Object.assign({value:e},n)),o=n.assert==="ignore-optionality",i=r._cast(e,n);if(n.assert!==!1&&!r.isType(i)){if(o&&As(i))return i;let s=Hi(e),a=Hi(i);throw new TypeError(`The value of ${n.path||"field"} could not be cast to a value that satisfies the schema type: "${r.type}".
400
+
401
+ attempted value: ${s}
402
+ `+(a!==s?`result of cast: ${a}`:""))}return i}_cast(e,n){let r=e===void 0?e:this.transforms.reduce((o,i)=>i.call(this,o,e,this),e);return r===void 0&&(r=this.getDefault(n)),r}_validate(e,n={},r,o){let{path:i,originalValue:s=e,strict:a=this.spec.strict}=n,l=e;a||(l=this._cast(l,Object.assign({assert:!1},n)));let u=[];for(let f of Object.values(this.internalTests))f&&u.push(f);this.runTests({path:i,value:l,originalValue:s,options:n,tests:u},r,f=>{if(f.length)return o(f,l);this.runTests({path:i,value:l,originalValue:s,options:n,tests:this.tests},r,o)})}runTests(e,n,r){let o=!1,{tests:i,value:s,originalValue:a,path:l,options:u}=e,f=y=>{o||(o=!0,n(y,s))},h=y=>{o||(o=!0,r(y,s))},m=i.length,g=[];if(!m)return h([]);let b={value:s,originalValue:a,path:l,options:u,schema:this};for(let y=0;y<i.length;y++){const S=i[y];S(b,f,function(E){E&&(Array.isArray(E)?g.push(...E):g.push(E)),--m<=0&&h(g)})}}asNestedTest({key:e,index:n,parent:r,parentPath:o,originalParent:i,options:s}){const a=e??n;if(a==null)throw TypeError("Must include `key` or `index` for nested validations");const l=typeof a=="number";let u=r[a];const f=Object.assign({},s,{strict:!0,parent:r,value:u,originalValue:i[a],key:void 0,[l?"index":"key"]:a,path:l||a.includes(".")?`${o||""}[${l?a:`"${a}"`}]`:(o?`${o}.`:"")+e});return(h,m,g)=>this.resolve(f)._validate(u,f,m,g)}validate(e,n){var r;let o=this.resolve(Object.assign({},n,{value:e})),i=(r=n==null?void 0:n.disableStackTrace)!=null?r:o.spec.disableStackTrace;return new Promise((s,a)=>o._validate(e,n,(l,u)=>{dr.isError(l)&&(l.value=u),a(l)},(l,u)=>{l.length?a(new dr(l,u,void 0,void 0,i)):s(u)}))}validateSync(e,n){var r;let o=this.resolve(Object.assign({},n,{value:e})),i,s=(r=n==null?void 0:n.disableStackTrace)!=null?r:o.spec.disableStackTrace;return o._validate(e,Object.assign({},n,{sync:!0}),(a,l)=>{throw dr.isError(a)&&(a.value=l),a},(a,l)=>{if(a.length)throw new dr(a,e,void 0,void 0,s);i=l}),i}isValid(e,n){return this.validate(e,n).then(()=>!0,r=>{if(dr.isError(r))return!1;throw r})}isValidSync(e,n){try{return this.validateSync(e,n),!0}catch(r){if(dr.isError(r))return!1;throw r}}_getDefault(e){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,e):ja(n)}getDefault(e){return this.resolve(e||{})._getDefault(e)}default(e){return arguments.length===0?this._getDefault():this.clone({default:e})}strict(e=!0){return this.clone({strict:e})}nullability(e,n){const r=this.clone({nullable:e});return r.internalTests.nullable=Oa({message:n,name:"nullable",test(o){return o===null?this.schema.spec.nullable:!0}}),r}optionality(e,n){const r=this.clone({optional:e});return r.internalTests.optionality=Oa({message:n,name:"optionality",test(o){return o===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(e=Co.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=Co.notNull){return this.nullability(!1,e)}required(e=Co.required){return this.clone().withMutation(n=>n.nonNullable(e).defined(e))}notRequired(){return this.clone().withMutation(e=>e.nullable().optional())}transform(e){let n=this.clone();return n.transforms.push(e),n}test(...e){let n;if(e.length===1?typeof e[0]=="function"?n={test:e[0]}:n=e[0]:e.length===2?n={name:e[0],test:e[1]}:n={name:e[0],message:e[1],test:e[2]},n.message===void 0&&(n.message=Co.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),o=Oa(n),i=n.exclusive||n.name&&r.exclusiveTests[n.name]===!0;if(n.exclusive&&!n.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return n.name&&(r.exclusiveTests[n.name]=!!n.exclusive),r.tests=r.tests.filter(s=>!(s.OPTIONS.name===n.name&&(i||s.OPTIONS.test===o.OPTIONS.test))),r.tests.push(o),r}when(e,n){!Array.isArray(e)&&typeof e!="string"&&(n=e,e=".");let r=this.clone(),o=DN(e).map(i=>new Xs(i));return o.forEach(i=>{i.isSibling&&r.deps.push(i.key)}),r.conditions.push(typeof n=="function"?new up(o,n):up.fromOptions(o,n)),r}typeError(e){let n=this.clone();return n.internalTests.typeError=Oa({message:e,name:"typeError",skipAbsent:!0,test(r){return this.schema._typeCheck(r)?!0:this.createError({params:{type:this.schema.type}})}}),n}oneOf(e,n=Co.oneOf){let r=this.clone();return e.forEach(o=>{r._whitelist.add(o),r._blacklist.delete(o)}),r.internalTests.whiteList=Oa({message:n,name:"oneOf",skipAbsent:!0,test(o){let i=this.schema._whitelist,s=i.resolveAll(this.resolve);return s.includes(o)?!0:this.createError({params:{values:Array.from(i).join(", "),resolved:s}})}}),r}notOneOf(e,n=Co.notOneOf){let r=this.clone();return e.forEach(o=>{r._blacklist.add(o),r._whitelist.delete(o)}),r.internalTests.blacklist=Oa({message:n,name:"notOneOf",test(o){let i=this.schema._blacklist,s=i.resolveAll(this.resolve);return s.includes(o)?this.createError({params:{values:Array.from(i).join(", "),resolved:s}}):!0}}),r}strip(e=!0){let n=this.clone();return n.spec.strip=e,n}describe(e){const n=(e?this.resolve(e):this).clone(),{label:r,meta:o,optional:i,nullable:s}=n.spec;return{meta:o,label:r,optional:i,nullable:s,default:n.getDefault(e),type:n.type,oneOf:n._whitelist.describe(),notOneOf:n._blacklist.describe(),tests:n.tests.map(l=>({name:l.OPTIONS.name,params:l.OPTIONS.params})).filter((l,u,f)=>f.findIndex(h=>h.name===l.name)===u)}}}Po.prototype.__isYupSchema__=!0;for(const t of["validate","validateSync"])Po.prototype[`${t}At`]=function(e,n,r={}){const{parent:o,parentPath:i,schema:s}=tce(this,e,n,r.context);return s[t](o&&o[i],Object.assign({},r,{parent:o,path:e}))};for(const t of["equals","is"])Po.prototype[t]=Po.prototype.oneOf;for(const t of["not","nope"])Po.prototype[t]=Po.prototype.notOneOf;const nce=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function rce(t){const e=P0(t);if(!e)return Date.parse?Date.parse(t):Number.NaN;if(e.z===void 0&&e.plusMinus===void 0)return new Date(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond).valueOf();let n=0;return e.z!=="Z"&&e.plusMinus!==void 0&&(n=e.hourOffset*60+e.minuteOffset,e.plusMinus==="+"&&(n=0-n)),Date.UTC(e.year,e.month,e.day,e.hour,e.minute+n,e.second,e.millisecond)}function P0(t){var e,n;const r=nce.exec(t);return r?{year:Zo(r[1]),month:Zo(r[2],1)-1,day:Zo(r[3],1),hour:Zo(r[4]),minute:Zo(r[5]),second:Zo(r[6]),millisecond:r[7]?Zo(r[7].substring(0,3)):0,precision:(e=(n=r[7])==null?void 0:n.length)!=null?e:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:Zo(r[10]),minuteOffset:Zo(r[11])}:null}function Zo(t,e=0){return Number(t)||e}let oce=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,ice=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,sce=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,ace="^\\d{4}-\\d{2}-\\d{2}",lce="\\d{2}:\\d{2}:\\d{2}",cce="(([+-]\\d{2}(:?\\d{2})?)|Z)",uce=new RegExp(`${ace}T${lce}(\\.\\d+)?${cce}$`),dce=t=>As(t)||t===t.trim(),fce={}.toString();function _0(){return new LN}class LN extends Po{constructor(){super({type:"string",check(e){return e instanceof String&&(e=e.valueOf()),typeof e=="string"}}),this.withMutation(()=>{this.transform((e,n,r)=>{if(!r.spec.coerce||r.isType(e)||Array.isArray(e))return e;const o=e!=null&&e.toString?e.toString():e;return o===fce?e:o})})}required(e){return super.required(e).withMutation(n=>n.test({message:e||Co.required,name:"required",skipAbsent:!0,test:r=>!!r.length}))}notRequired(){return super.notRequired().withMutation(e=>(e.tests=e.tests.filter(n=>n.OPTIONS.name!=="required"),e))}length(e,n=cr.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(r){return r.length===this.resolve(e)}})}min(e,n=cr.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(r){return r.length>=this.resolve(e)}})}max(e,n=cr.max){return this.test({name:"max",exclusive:!0,message:n,params:{max:e},skipAbsent:!0,test(r){return r.length<=this.resolve(e)}})}matches(e,n){let r=!1,o,i;return n&&(typeof n=="object"?{excludeEmptyString:r=!1,message:o,name:i}=n:o=n),this.test({name:i||"matches",message:o||cr.matches,params:{regex:e},skipAbsent:!0,test:s=>s===""&&r||s.search(e)!==-1})}email(e=cr.email){return this.matches(oce,{name:"email",message:e,excludeEmptyString:!0})}url(e=cr.url){return this.matches(ice,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=cr.uuid){return this.matches(sce,{name:"uuid",message:e,excludeEmptyString:!1})}datetime(e){let n="",r,o;return e&&(typeof e=="object"?{message:n="",allowOffset:r=!1,precision:o=void 0}=e:n=e),this.matches(uce,{name:"datetime",message:n||cr.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||cr.datetime_offset,params:{allowOffset:r},skipAbsent:!0,test:i=>{if(!i||r)return!0;const s=P0(i);return s?!!s.z:!1}}).test({name:"datetime_precision",message:n||cr.datetime_precision,params:{precision:o},skipAbsent:!0,test:i=>{if(!i||o==null)return!0;const s=P0(i);return s?s.precision===o:!1}})}ensure(){return this.default("").transform(e=>e===null?"":e)}trim(e=cr.trim){return this.transform(n=>n!=null?n.trim():n).test({message:e,name:"trim",test:dce})}lowercase(e=cr.lowercase){return this.transform(n=>As(n)?n:n.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>As(n)||n===n.toLowerCase()})}uppercase(e=cr.uppercase){return this.transform(n=>As(n)?n:n.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>As(n)||n===n.toUpperCase()})}}_0.prototype=LN.prototype;let pce=new Date(""),hce=t=>Object.prototype.toString.call(t)==="[object Date]";class hh extends Po{constructor(){super({type:"date",check(e){return hce(e)&&!isNaN(e.getTime())}}),this.withMutation(()=>{this.transform((e,n,r)=>!r.spec.coerce||r.isType(e)||e===null?e:(e=rce(e),isNaN(e)?hh.INVALID_DATE:new Date(e)))})}prepareParam(e,n){let r;if(Xs.isRef(e))r=e;else{let o=this.cast(e);if(!this._typeCheck(o))throw new TypeError(`\`${n}\` must be a Date or a value that can be \`cast()\` to a Date`);r=o}return r}min(e,n=D0.min){let r=this.prepareParam(e,"min");return this.test({message:n,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(o){return o>=this.resolve(r)}})}max(e,n=D0.max){let r=this.prepareParam(e,"max");return this.test({message:n,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(o){return o<=this.resolve(r)}})}}hh.INVALID_DATE=pce;hh.prototype;function mce(t,e=[]){let n=[],r=new Set,o=new Set(e.map(([s,a])=>`${s}-${a}`));function i(s,a){let l=js.split(s)[0];r.add(l),o.has(`${a}-${l}`)||n.push([a,l])}for(const s of Object.keys(t)){let a=t[s];r.add(s),Xs.isRef(a)&&a.isSibling?i(a.path,s):P1(a)&&"deps"in a&&a.deps.forEach(l=>i(l,s))}return Hle.array(Array.from(r),n).reverse()}function aA(t,e){let n=1/0;return t.some((r,o)=>{var i;if((i=e.path)!=null&&i.includes(r))return n=o,!0}),n}function jN(t){return(e,n)=>aA(t,e)-aA(t,n)}const gce=(t,e,n)=>{if(typeof t!="string")return t;let r=t;try{r=JSON.parse(t)}catch{}return n.isType(r)?r:t};function lf(t){if("fields"in t){const e={};for(const[n,r]of Object.entries(t.fields))e[n]=lf(r);return t.setFields(e)}if(t.type==="array"){const e=t.optional();return e.innerType&&(e.innerType=lf(e.innerType)),e}return t.type==="tuple"?t.optional().clone({types:t.spec.types.map(lf)}):"optional"in t?t.optional():t}const yce=(t,e)=>{const n=[...js.normalizePath(e)];if(n.length===1)return n[0]in t;let r=n.pop(),o=js.getter(js.join(n),!0)(t);return!!(o&&r in o)};let lA=t=>Object.prototype.toString.call(t)==="[object Object]";function cA(t,e){let n=Object.keys(t.fields);return Object.keys(e).filter(r=>n.indexOf(r)===-1)}const bce=jN([]);function $N(t){return new FN(t)}class FN extends Po{constructor(e){super({type:"object",check(n){return lA(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=bce,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{e&&this.shape(e)})}_cast(e,n={}){var r;let o=super._cast(e,n);if(o===void 0)return this.getDefault(n);if(!this._typeCheck(o))return o;let i=this.fields,s=(r=n.stripUnknown)!=null?r:this.spec.noUnknown,a=[].concat(this._nodes,Object.keys(o).filter(h=>!this._nodes.includes(h))),l={},u=Object.assign({},n,{parent:l,__validating:n.__validating||!1}),f=!1;for(const h of a){let m=i[h],g=h in o;if(m){let b,y=o[h];u.path=(n.path?`${n.path}.`:"")+h,m=m.resolve({value:y,context:n.context,parent:l});let S=m instanceof Po?m.spec:void 0,C=S==null?void 0:S.strict;if(S!=null&&S.strip){f=f||h in o;continue}b=!n.__validating||!C?m.cast(o[h],u):o[h],b!==void 0&&(l[h]=b)}else g&&!s&&(l[h]=o[h]);(g!==h in l||l[h]!==o[h])&&(f=!0)}return f?l:o}_validate(e,n={},r,o){let{from:i=[],originalValue:s=e,recursive:a=this.spec.recursive}=n;n.from=[{schema:this,value:s},...i],n.__validating=!0,n.originalValue=s,super._validate(e,n,r,(l,u)=>{if(!a||!lA(u)){o(l,u);return}s=s||u;let f=[];for(let h of this._nodes){let m=this.fields[h];!m||Xs.isRef(m)||f.push(m.asNestedTest({options:n,key:h,parent:u,parentPath:n.path,originalParent:s}))}this.runTests({tests:f,value:u,originalValue:s,options:n},r,h=>{o(h.sort(this._sortErrors).concat(l),u)})})}clone(e){const n=super.clone(e);return n.fields=Object.assign({},this.fields),n._nodes=this._nodes,n._excludedEdges=this._excludedEdges,n._sortErrors=this._sortErrors,n}concat(e){let n=super.concat(e),r=n.fields;for(let[o,i]of Object.entries(this.fields)){const s=r[o];r[o]=s===void 0?i:s}return n.withMutation(o=>o.setFields(r,[...this._excludedEdges,...e._excludedEdges]))}_getDefault(e){if("default"in this.spec)return super._getDefault(e);if(!this._nodes.length)return;let n={};return this._nodes.forEach(r=>{var o;const i=this.fields[r];let s=e;(o=s)!=null&&o.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[r]})),n[r]=i&&"getDefault"in i?i.getDefault(s):void 0}),n}setFields(e,n){let r=this.clone();return r.fields=e,r._nodes=mce(e,n),r._sortErrors=jN(Object.keys(e)),n&&(r._excludedEdges=n),r}shape(e,n=[]){return this.clone().withMutation(r=>{let o=r._excludedEdges;return n.length&&(Array.isArray(n[0])||(n=[n]),o=[...r._excludedEdges,...n]),r.setFields(Object.assign(r.fields,e),o)})}partial(){const e={};for(const[n,r]of Object.entries(this.fields))e[n]="optional"in r&&r.optional instanceof Function?r.optional():r;return this.setFields(e)}deepPartial(){return lf(this)}pick(e){const n={};for(const r of e)this.fields[r]&&(n[r]=this.fields[r]);return this.setFields(n,this._excludedEdges.filter(([r,o])=>e.includes(r)&&e.includes(o)))}omit(e){const n=[];for(const r of Object.keys(this.fields))e.includes(r)||n.push(r);return this.pick(n)}from(e,n,r){let o=js.getter(e,!0);return this.transform(i=>{if(!i)return i;let s=i;return yce(i,e)&&(s=Object.assign({},i),r||delete s[e],s[n]=o(i)),s})}json(){return this.transform(gce)}exact(e){return this.test({name:"exact",exclusive:!0,message:e||af.exact,test(n){if(n==null)return!0;const r=cA(this.schema,n);return r.length===0||this.createError({params:{properties:r.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(e=!0,n=af.noUnknown){typeof e!="boolean"&&(n=e,e=!0);let r=this.test({name:"noUnknown",exclusive:!0,message:n,test(o){if(o==null)return!0;const i=cA(this.schema,o);return!e||i.length===0||this.createError({params:{unknown:i.join(", ")}})}});return r.spec.noUnknown=e,r}unknown(e=!0,n=af.noUnknown){return this.noUnknown(!e,n)}transformKeys(e){return this.transform(n=>{if(!n)return n;const r={};for(const o of Object.keys(n))r[e(o)]=n[o];return r})}camelCase(){return this.transformKeys(Ev.camelCase)}snakeCase(){return this.transformKeys(Ev.snakeCase)}constantCase(){return this.transformKeys(e=>Ev.snakeCase(e).toUpperCase())}describe(e){const n=(e?this.resolve(e):this).clone(),r=super.describe(e);r.fields={};for(const[i,s]of Object.entries(n.fields)){var o;let a=e;(o=a)!=null&&o.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[i]})),r.fields[i]=s.describe(a)}return r}}$N.prototype=FN.prototype;const vce=t=>{const{id:e,onSave:n,onCancel:r,getCitationById:o,disableFileUpload:i=!1,setError:s}=t,a=J.useRef(null),[l,u]=J.useState(!0),[f,h]=J.useState(""),[m,g]=J.useState({title:"",file:void 0,fileName:""});return J.useEffect(()=>{if(e===void 0){u(!1);return}o(e).then(b=>{g({...b,file:void 0}),h(b.title),u(!1)}).catch(b=>{u(!1),s({title:"Failed to retrieve attachment",err:b})})},[]),v.jsx(Wt.Formik,{innerRef:a,enableReinitialize:!0,initialValues:m,validationSchema:$N().shape({title:_0().required("Title is required"),fileName:_0().required("A file is required")}),onSubmit:async b=>{u(!0),n(b,e!==void 0&&f!==b.title).catch(y=>{u(!1),s({title:`Failed to ${e===void 0?"save":"update"} attachment`,err:y})}).finally(()=>u(!1))},children:({values:b,setFieldValue:y})=>{var S;return J.useEffect(()=>{var C,E;(C=b.file)!=null&&C.name&&y("fileName",(E=b.file)==null?void 0:E.name)},[(S=b.file)==null?void 0:S.name]),v.jsxs(Wt.Form,{autoComplete:"off",children:[v.jsx(Fa,{name:"title",disabled:l,required:!0,margin:"none"}),v.jsxs(j.Box,{display:"flex",flexDirection:"row",alignItems:"flex-start",children:[v.jsx(QA,{name:"file",readOnly:i}),b.fileName&&v.jsx("span",{style:{margin:"6px 0 0 10px"},children:b.fileName}),v.jsx(Qn,{name:"fileName",id:"fileName-err"})]}),v.jsxs(j.DialogActions,{sx:{px:0},children:[v.jsx(j.Button,{onClick:r,variant:"outlined",size:"small",children:"Cancel"}),v.jsx(j.Button,{type:"submit",color:"primary",variant:"contained",size:"small",disabled:l,children:e?"Update Attachment":"Add New Attachment"})]})]})}})};function xce(t){return Ke("MuiAlert",t)}const uA=He("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]),Sce=Fe(v.jsx("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),Cce=Fe(v.jsx("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),wce=Fe(v.jsx("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),Tce=Fe(v.jsx("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined"),Ece=Fe(v.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),kce=t=>{const{variant:e,color:n,severity:r,classes:o}=t,i={root:["root",`color${Re(n||r)}`,`${e}${Re(n||r)}`,`${e}`],icon:["icon"],message:["message"],action:["action"]};return Ue(i,xce,o)},Mce=ye(ul,{name:"MuiAlert",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[n.variant],e[`${n.variant}${Re(n.color||n.severity)}`]]}})(It(({theme:t})=>{const e=t.palette.mode==="light"?Ya:Ec,n=t.palette.mode==="light"?Ec:Ya;return{...t.typography.body2,backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(t.palette).filter(Vn(["light"])).map(([r])=>({props:{colorSeverity:r,variant:"standard"},style:{color:t.vars?t.vars.palette.Alert[`${r}Color`]:e(t.palette[r].light,.6),backgroundColor:t.vars?t.vars.palette.Alert[`${r}StandardBg`]:n(t.palette[r].light,.9),[`& .${uA.icon}`]:t.vars?{color:t.vars.palette.Alert[`${r}IconColor`]}:{color:t.palette[r].main}}})),...Object.entries(t.palette).filter(Vn(["light"])).map(([r])=>({props:{colorSeverity:r,variant:"outlined"},style:{color:t.vars?t.vars.palette.Alert[`${r}Color`]:e(t.palette[r].light,.6),border:`1px solid ${(t.vars||t).palette[r].light}`,[`& .${uA.icon}`]:t.vars?{color:t.vars.palette.Alert[`${r}IconColor`]}:{color:t.palette[r].main}}})),...Object.entries(t.palette).filter(Vn(["dark"])).map(([r])=>({props:{colorSeverity:r,variant:"filled"},style:{fontWeight:t.typography.fontWeightMedium,...t.vars?{color:t.vars.palette.Alert[`${r}FilledColor`],backgroundColor:t.vars.palette.Alert[`${r}FilledBg`]}:{backgroundColor:t.palette.mode==="dark"?t.palette[r].dark:t.palette[r].main,color:t.palette.getContrastText(t.palette[r].main)}}}))]}})),Oce=ye("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(t,e)=>e.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),Rce=ye("div",{name:"MuiAlert",slot:"Message",overridesResolver:(t,e)=>e.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),Ace=ye("div",{name:"MuiAlert",slot:"Action",overridesResolver:(t,e)=>e.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),dA={success:v.jsx(Sce,{fontSize:"inherit"}),warning:v.jsx(Cce,{fontSize:"inherit"}),error:v.jsx(wce,{fontSize:"inherit"}),info:v.jsx(Tce,{fontSize:"inherit"})},BN=P.forwardRef(function(e,n){const r=xt({props:e,name:"MuiAlert"}),{action:o,children:i,className:s,closeText:a="Close",color:l,components:u={},componentsProps:f={},icon:h,iconMapping:m=dA,onClose:g,role:b="alert",severity:y="success",slotProps:S={},slots:C={},variant:E="standard",...T}=r,w={...r,color:l,severity:y,variant:E,colorSeverity:l||y},M=kce(w),R={slots:{closeButton:u.CloseButton,closeIcon:u.CloseIcon,...C},slotProps:{...f,...S}},[_,I]=Ft("root",{ref:n,shouldForwardComponentProp:!0,className:Pe(M.root,s),elementType:Mce,externalForwardedProps:{...R,...T},ownerState:w,additionalProps:{role:b,elevation:0}}),[N,O]=Ft("icon",{className:M.icon,elementType:Oce,externalForwardedProps:R,ownerState:w}),[A,L]=Ft("message",{className:M.message,elementType:Rce,externalForwardedProps:R,ownerState:w}),[z,V]=Ft("action",{className:M.action,elementType:Ace,externalForwardedProps:R,ownerState:w}),[$,F]=Ft("closeButton",{elementType:dl,externalForwardedProps:R,ownerState:w}),[W,U]=Ft("closeIcon",{elementType:Ece,externalForwardedProps:R,ownerState:w});return v.jsxs(_,{...I,children:[h!==!1?v.jsx(N,{...O,children:h||m[y]||dA[y]}):null,v.jsx(A,{...L,children:i}),o!=null?v.jsx(z,{...V,children:o}):null,o==null&&g?v.jsx(z,{...V,children:v.jsx($,{size:"small","aria-label":a,title:a,color:"inherit",onClick:g,...F,children:v.jsx(W,{fontSize:"small",...U})})}):null]})});process.env.NODE_ENV!=="production"&&(BN.propTypes={action:c.node,children:c.node,classes:c.object,className:c.string,closeText:c.string,color:c.oneOfType([c.oneOf(["error","info","success","warning"]),c.string]),components:c.shape({CloseButton:c.elementType,CloseIcon:c.elementType}),componentsProps:c.shape({closeButton:c.object,closeIcon:c.object}),icon:c.node,iconMapping:c.shape({error:c.node,info:c.node,success:c.node,warning:c.node}),onClose:c.func,role:c.string,severity:c.oneOfType([c.oneOf(["error","info","success","warning"]),c.string]),slotProps:c.shape({action:c.oneOfType([c.func,c.object]),closeButton:c.oneOfType([c.func,c.object]),closeIcon:c.oneOfType([c.func,c.object]),icon:c.oneOfType([c.func,c.object]),message:c.oneOfType([c.func,c.object]),root:c.oneOfType([c.func,c.object])}),slots:c.shape({action:c.elementType,closeButton:c.elementType,closeIcon:c.elementType,icon:c.elementType,message:c.elementType,root:c.elementType}),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),variant:c.oneOfType([c.oneOf(["filled","outlined","standard"]),c.string])});const bu=t=>{var g;const{noIcon:e=!1,children:n,severity:r="success",variant:o="leftBorder",sx:i,title:s,...a}=t,{palette:l}=j.useTheme(),u=e?{icon:!1}:{},f=o==="leftBorder"?"standard":o,h=o==="leftBorder"?{...i,borderLeft:`4px solid ${(g=l[r])==null?void 0:g.main}`}:i,m=s?{icon:{sx:{mt:"6px"}}}:{};return v.jsxs(BN,{severity:r,variant:f,sx:h,slotProps:m,...u,...a,children:[s&&v.jsx(j.Typography,{variant:"h3",children:s}),n]})},VN=t=>v.jsx(bu,{severity:"error",...t});function zN({fetchExistingCitations:t,onCreateCitation:e,onUpdateCitation:n,getCitationById:r,onStoreAttachment:o,onSelectCitations:i,onCancel:s,initialSelectedIds:a=[],onContentUpdate:l,onTitleChanged:u,onError:f=()=>{}}){const[h,m]=J.useState("Insert Citation/Attachment(s)"),[g,b]=J.useState(a),[y,S]=J.useState(void 0),[C,E]=J.useState(void 0);J.useEffect(()=>l==null?void 0:l(),[h,g]),J.useEffect(()=>E(void 0),[h]),J.useEffect(()=>{C&&f(C.err)},[C]);const T=async(R,_)=>{if(h==="Edit Citation"){if(R.id===void 0)throw Error("Failed to update citation. Citation is missing id");await n(R).then(I=>{m("Insert Citation/Attachment(s)"),_&&(u==null||u(I))}).catch(I=>E({title:"Failed to update citation",err:I}))}else h==="Add Citation"&&await e(R).then(I=>{b([...g,I.id]),m("Insert Citation/Attachment(s)")}).catch(I=>E({title:"Failed to create citation",err:I}))},w=async(R,_)=>{if(h==="Edit Attachment"){if(R.id===void 0)throw Error("Failed to update citation. Citation is missing id");await n(R).then(I=>{m("Insert Citation/Attachment(s)"),_&&(u==null||u(I))}).catch(I=>E({title:"Failed to update attachment",err:I}))}else h==="Add Attachment"&&await o(R).then(I=>{b([...g,I.id]),m("Insert Citation/Attachment(s)")}).catch(I=>E({title:"Failed to upload attachment",err:I}))};let M=null;return h==="Insert Citation/Attachment(s)"?M=v.jsx(jle,{fetchExistingCitations:t,onCancel:s,onNewCitation:()=>{S(void 0),m("Add Citation")},onNewAttachment:()=>{S(void 0),m("Add Attachment")},onEditCitation:R=>{S(R.id),m("Edit Citation")},onEditAttachment:R=>{S(R.id),m("Edit Attachment")},onSelect:i,selectedIds:g,toggleCheckbox:R=>{const _=g.includes(R.id);b(_?g.filter(I=>I!==R.id):[...g,R.id])},onError:f}):h==="Add Citation"||h==="Edit Citation"?M=v.jsx($le,{id:y,onSave:T,onCancel:()=>m("Insert Citation/Attachment(s)"),getCitationById:r,setError:E}):(h==="Add Attachment"||h==="Edit Attachment")&&(M=v.jsx(vce,{id:y,onSave:w,onCancel:()=>m("Insert Citation/Attachment(s)"),getCitationById:r,disableFileUpload:h==="Edit Attachment",setError:E})),v.jsxs(j.Box,{width:"500px",children:[v.jsx(j.Typography,{variant:"h6",children:h}),C&&v.jsx(VN,{"data-testid":"citation-menu-error",onClose:()=>E(void 0),children:C.title}),v.jsx(j.Box,{paddingTop:"8px",children:M})]})}const Ice=Kt({name:{CitationBubbleMenuTipTap:HN}})(t=>({content:{padding:t.spacing(1.5,2,.5),backgroundColor:"#f9f9f9"}}));function HN({fetchExistingCitations:t,onCreateCitation:e,onUpdateCitation:n,getCitationById:r,onStoreAttachment:o,onTitleChanged:i,...s}){const{classes:a}=Ice(),l=bt();if(!(l!=null&&l.isEditable))return null;if(!("citationBubbleMenuHandler"in l.storage))throw new Error("You must add the CitationBubbleMenuHandler extension to the useEditor `extensions` array in order to use this component!");const u=l.storage.citationBubbleMenuHandler,f=u.isOpen,h=u.selectedIds,m=u.selectedNodePos,g=()=>{!l||!m||l.chain().focus().deleteRange({from:m,to:m+1}).run()},b=T=>{l&&l.chain().focus().insertContent({type:"citation",attrs:{ids:T}}).run()},y=T=>{!l||!m||l.chain().focus().command(({tr:w})=>{const M=m,R=w.doc.nodeAt(M);return R?(w.setNodeMarkup(M,void 0,{...R.attrs,ids:T}),!0):!1}).run()},S=T=>{T.length===0?g():h.length===0?b(T):y(T)},C=T=>{S(T),l.commands.closeCitationBubbleMenu()},E=()=>{S(h),l.commands.closeCitationBubbleMenu()};return v.jsx(lh,{editor:l,open:f,...u.bubbleMenuOptions,...s,children:v.jsx("div",{className:a.content,children:v.jsx(zN,{fetchExistingCitations:t,onCreateCitation:e,onUpdateCitation:n,getCitationById:r,onStoreAttachment:o,onSelectCitations:C,onCancel:E,initialSelectedIds:h,onContentUpdate:()=>{requestAnimationFrame(()=>{l!=null&&l.view&&l.view.dispatch(l.view.state.tr)})},onTitleChanged:i})})})}const Dce=cn.create({name:"starterKit",addExtensions(){const t=[];return this.options.bold!==!1&&t.push(Z_.configure(this.options.bold)),this.options.blockquote!==!1&&t.push(J_.configure(this.options.blockquote)),this.options.bulletList!==!1&&t.push(X_.configure(this.options.bulletList)),this.options.code!==!1&&t.push(Q_.configure(this.options.code)),this.options.codeBlock!==!1&&t.push(eN.configure(this.options.codeBlock)),this.options.document!==!1&&t.push(tN.configure(this.options.document)),this.options.dropcursor!==!1&&t.push(nN.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&t.push(rN.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&t.push(oN.configure(this.options.hardBreak)),this.options.heading!==!1&&t.push(N_.configure(this.options.heading)),this.options.history!==!1&&t.push(cN.configure(this.options.history)),this.options.horizontalRule!==!1&&t.push(uN.configure(this.options.horizontalRule)),this.options.italic!==!1&&t.push(dN.configure(this.options.italic)),this.options.listItem!==!1&&t.push(SN.configure(this.options.listItem)),this.options.orderedList!==!1&&t.push(CN.configure(this.options.orderedList)),this.options.paragraph!==!1&&t.push(wN.configure(this.options.paragraph)),this.options.strike!==!1&&t.push(EN.configure(this.options.strike)),this.options.text!==!1&&t.push(kN.configure(this.options.text)),t}}),Pce=()=>cn.create({name:"citationBubbleMenuHandler",addStorage(){return{isOpen:!1,selectedIds:[],bubbleMenuOptions:void 0,selectedNodePos:void 0}},addCommands(){return{openCitationBubbleMenu:(t={},e)=>({editor:n,dispatch:r})=>{var a;const{doc:o}=n.state,i=e!==void 0?o.nodeAt(e):void 0,s=((a=i==null?void 0:i.attrs)==null?void 0:a.ids)??[];return n.getAttributes,r&&(this.storage.isOpen=!0,this.storage.selectedIds=s,this.storage.bubbleMenuOptions=t,this.storage.selectedNodePos=e),!0},closeCitationBubbleMenu:()=>({commands:t,dispatch:e})=>this.storage.isOpen?(t.focus(),e&&(this.storage.isOpen=!1,this.storage.selectedIds=[],this.storage.selectedNodePos=void 0),!0):!1}},onSelectionUpdate(){this.storage.isOpen&&!this.editor.isActive("citation")&&this.editor.commands.closeCitationBubbleMenu()},addKeyboardShortcuts(){return{"Mod-Shift-c":()=>(this.editor.commands.openCitationBubbleMenu(),!0)}}});function _ce(t){const e=bt(),n=J.useRef(null);return v.jsx(ht,{buttonRef:n,tooltipLabel:"Insert Citation",tooltipShortcutKeys:["mod","Shift","C"],disabled:!(e!=null&&e.isEditable),onClick:()=>e==null?void 0:e.commands.openCitationBubbleMenu({anchorEl:n.current,placement:"bottom"}),...t,children:v.jsxs(j.Box,{display:"flex",flexDirection:"row",gap:"4px",alignItems:"center",children:[v.jsx(t6,{fontSize:"small"}),v.jsx(j.Typography,{variant:"body2",children:"Insert Citation"})]})})}const WN=J.createContext(void 0),qN=()=>{const t=J.useContext(WN);if(!t)throw new Error("useSync must be used inside CitationFieldProvider");return t},Nce=({node:t,HTMLAttributes:e,selected:n})=>{const r=t.attrs.ids||[],{citations:o}=qN(),[i,s]=J.useState(String(r));return J.useEffect(()=>{const l=o.filter(u=>r.includes(u.id)).map(u=>u.title).join(", ");s(l)},[o,r]),v.jsx(f1,{as:"span",...e,children:v.jsx("a",{href:"#",onClick:a=>{a.preventDefault(),a.stopPropagation()},className:n?"selected-citation-link":"citation-link",children:i})})},Lce=Qt.create({name:"citation",group:"inline",inline:!0,atom:!0,selectable:!0,addAttributes(){return{ids:{default:[],parseHTML:t=>{const e=t.getAttribute("ids");return e?e.split(",").map(n=>parseInt(n.trim(),10)).filter(n=>!isNaN(n)):[]},renderHTML:t=>({ids:Array.isArray(t.ids)?t.ids.join(","):""})}}},parseHTML(){return[{tag:"citation"}]},renderHTML({HTMLAttributes:t}){return["citation",yt(t)]},addNodeView(){return p1(Nce)},addProseMirrorPlugins(){return[new en({props:{handleClickOn:(t,e,n,r,o,i)=>n&&n.type.name==="citation"?(this.editor.commands.openCitationBubbleMenu({},r),!0):!1}})]}}),jce=t=>{const e=J.useMemo(()=>[Dce,TN.configure({placeholder:"Start typing here..."}),Pce(),Lce],[]),{name:n,label:r=kn(n),hideLabel:o=!1,required:i=!1,readOnly:s=!1,margin:a="dense",fetchExistingCitations:l,onCreateCitation:u,onUpdateCitation:f,getCitationById:h,onStoreAttachment:m,onError:g=()=>{}}=t,[b,y,S]=Wt.useField({name:n}),{setValue:C}=S,{value:E}=b,{resync:T,addUpdateCitation:w}=qN();J.useEffect(()=>{var N,O;E!==((O=(N=M==null?void 0:M.current)==null?void 0:N.editor)==null?void 0:O.getHTML())&&setTimeout(()=>{var A,L,z;(z=(L=(A=M==null?void 0:M.current)==null?void 0:A.editor)==null?void 0:L.commands)==null||z.setContent(E),T()},0)},[E]),J.useEffect(()=>{E&&setTimeout(()=>{var N,O,A;(A=(O=(N=M==null?void 0:M.current)==null?void 0:N.editor)==null?void 0:O.commands)==null||A.setContent(E),T()},0)},[]);const M=J.useRef(null),R={normal:{marginTop:"16px",marginBottom:"8px"},dense:{marginTop:"8px",marginBottom:"4px"},none:{margin:0}},_=()=>{var A,L;const N=((L=(A=M.current)==null?void 0:A.editor)==null?void 0:L.getHTML())??"<p></p>",O=!N.replace(/<\/?p>|<br>/g,"").trim();C(O?"<p></p>":N)},I=v.jsxs(j.Box,{id:`citation-field_${n}`,sx:{"& .ProseMirror":{"& h1, & h2, & h3, & h4, & h5, & h6":{scrollMarginTop:s?0:50}}},...R[a],children:[v.jsx(b_,{ref:M,extensions:e,content:E,editable:!s,renderControls:s?void 0:()=>v.jsx(uh,{children:v.jsx(_ce,{})}),onBlur:_,RichTextFieldProps:{variant:"outlined",MenuBarProps:{hide:s}},children:()=>v.jsx(HN,{fetchExistingCitations:l,onCreateCitation:N=>u(N).then(O=>(w(O),O)),onUpdateCitation:f,getCitationById:h,onStoreAttachment:m,onTitleChanged:w,onError:g})}),v.jsx(Qn,{name:n,id:`${n}-err`})]});return v.jsxs(j.Box,{display:"flex",flexDirection:"column",width:"100%",children:[!o&&v.jsx(j.InputLabel,{htmlFor:`citation-field_${n}`,required:i,children:r}),I]})},$ce=t=>{const{label:e="Return to Top",icon:n=sI,scrollThresholdPx:r=100}=t,o=j.useScrollTrigger({threshold:r}),i=J.useCallback(()=>{window.scrollTo({top:0,behavior:"smooth"})},[]);return v.jsx(j.Zoom,{in:o,children:v.jsx(j.Box,{sx:{position:"fixed",bottom:32,right:32,zIndex:1},children:v.jsxs(j.Fab,{onClick:i,color:"primary",size:"small",variant:"extended","aria-label":"Scroll back to top",children:[v.jsx(n,{fontSize:"medium"}),e]})})})},Fce=()=>{const{values:t,errors:e,status:n}=Wt.useFormikContext(),{palette:r}=j.useTheme();return v.jsx(j.Paper,{style:{backgroundColor:r.mode==="dark"?"#303030":"#f0f0f0",margin:"10px 0"},children:v.jsxs(j.List,{children:[v.jsxs(j.ListItem,{children:[v.jsx(j.Typography,{display:"block",variant:"h6",children:"Values"}),v.jsx("br",{}),v.jsx(j.Divider,{variant:"inset"}),v.jsx("pre",{children:JSON.stringify(t,null,2)})]}),v.jsx(j.Divider,{variant:"inset",component:"li"}),v.jsxs(j.ListItem,{id:"testing",children:[v.jsx(j.Typography,{display:"block",variant:"h6",children:"Errors"}),v.jsx("br",{}),v.jsx(j.Divider,{variant:"inset"}),v.jsx("pre",{children:JSON.stringify(e,null,2)})]}),v.jsxs(j.ListItem,{children:[v.jsx(j.Typography,{display:"block",variant:"h6",children:"Status"}),v.jsx("br",{}),v.jsx(j.Divider,{variant:"inset"}),v.jsx("pre",{children:JSON.stringify(n,null,2)})]})]})})},Bce=t=>{const{steps:e,orientation:n,inlineLabel:r=n=="vertical",isResponsive:o=!1}=t,{width:i}=AN();let s=!r,a=n;o&&(n&&console.warn("Stepper: Ignoring orientation. isResponsive is set to true, so the orientation is determined automatically based on the window size."),a=i<600?"vertical":"horizontal",a=="vertical"?s=!1:s=!r),n=="vertical"&&!r&&(console.warn("Stepper: ignoring inlineLabel={false}. Must use inline labels when orientation is vertical"),s=!1);const l=["steps","inlineLabel","orientation","isResponsive"],u={alternativeLabel:s,orientation:a,...Xn({...t},l)};return v.jsx(j.Stepper,{...u,children:e.map(f=>v.jsx(j.Step,{children:v.jsx(j.StepLabel,{children:f})},f))})},Vce=t=>{const{name:e,label:n=kn(e),labelProps:r={fontSize:"1.1em",color:"#808080",fontWeight:"600"},initialState:o,renderFormGroup:i,addButtonContent:s="Add Another",removeButtonContent:a=t.removePosition==="right"?v.jsx(P6,{}):"Remove",variant:l="card",addButtonSx:u,removeButtonSx:f,allowRemoveAll:h=!1,readOnly:m=!1,emptyListMsg:g="None",showDivider:b=!1,removePosition:y="bottom"}=t,[S]=Wt.useField({name:e}),{value:C}=S,E=T=>({display:"flex",flexDirection:T==="bottom"?"column":"row",alignItems:T==="bottom"?"flex-start":"center"});return v.jsxs(j.FormControl,{fullWidth:!0,children:[v.jsx(j.Typography,{...r,children:n}),m&&S.value.length===0?v.jsx(j.Typography,{children:g}):v.jsx(Wt.FieldArray,{name:e,render:T=>v.jsxs("div",{children:[C.map((w,M)=>v.jsx(J.Fragment,{children:v.jsx(zce,{variant:l,content:v.jsxs(j.Box,{"data-testid":"form-group-container",sx:typeof y=="string"?E(y):{...y},children:[v.jsxs(j.Box,{width:"100%",children:[i(`${e}.${M}`,M),b&&M!==C.length-1&&v.jsx(j.Divider,{"data-testid":"divider"})]}),!m&&C.length>(h?0:1)&&v.jsx(j.Button,{"data-testid":"repeatable-form-group_remove-btn",sx:f,onClick:()=>T.remove(M),children:a})]})})},`${e}-${M}`)),!m&&v.jsx(j.Button,{"data-testid":"repeatable-form-group_add-btn",onClick:()=>T.push(o),sx:u,children:s})]})})]})},zce=({variant:t,content:e})=>{switch(t){case"card":return v.jsx(j.Card,{"data-testid":"repeatable-form-group_card",sx:{padding:"8px",marginBottom:"8px"},children:v.jsx(j.CardContent,{children:e})});case"elevatedCard":return v.jsx(j.Card,{"data-testid":"repeatable-form-group_elevated-card",elevation:4,sx:{border:"unset",padding:"8px",marginBottom:"8px"},children:v.jsx(j.CardContent,{children:e})});case"none":return e}},_1=t=>{const{open:e=!1,onClose:n,title:r,children:o,actions:i,closeBtnLabel:s="Cancel",closeButtonPosition:a="bottom",closeButtonProps:l={color:"primary",variant:"text"},disableDismiss:u=!1,...f}=t;if(!e)return null;const h=()=>{if(a!=="top")return v.jsx(j.Button,{className:"MBv2_Modal_Close",onClick:t.onClose,...l,children:s})},m=()=>i?v.jsx(j.DialogActions,{className:"MBv2_Modal_Actions",children:v.jsxs(j.Box,{display:"flex",flexDirection:"row",justifyContent:"space-between",width:"100%",gap:"0.25rem",children:[v.jsx(j.Box,{children:h()}),v.jsxs(j.Box,{display:"flex",gap:".25rem",children:[...i]})]})}):v.jsx(j.DialogActions,{className:"MBv2_Modal_Actions",children:v.jsx(j.Box,{children:h()})});return v.jsxs(j.Dialog,{className:"MBv2_Modal",open:e,onClose:()=>{u||n==null||n()},...f,children:[typeof r=="string"?v.jsx(j.DialogTitle,{className:"MBv2_Modal_Title",children:v.jsxs(j.Box,{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",children:[r,a!=="bottom"&&v.jsx(j.IconButton,{"data-testid":"modal-header-close-btn",onClick:n,children:v.jsx(o6,{})})]})}):r,o&&(typeof o=="string"?v.jsx(j.DialogContent,{className:"MBv2_Modal_Content",children:v.jsx(j.DialogContentText,{className:"MBv2_Modal_Content_Text",children:o})}):o),m()]})},Hce=t=>{const{confirmBtnLabel:e,onConfirm:n,confirmButtonProps:r={color:"primary",variant:"contained"},closeButtonProps:o={},...i}=t;return v.jsx(_1,{actions:[v.jsx(j.Button,{className:"MBv2_ConfirmationModal_ConfirmBtn",onClick:n,...r,children:e})],...i})},Wce=t=>{const{closeBtnLabel:e="OK",closeButtonProps:n={color:"primary",variant:"contained"}}=t;return v.jsx(_1,{closeBtnLabel:e,closeButtonProps:n,...t})},qce=t=>{const{primaryBtnLabel:e,onPrimaryAction:n,primaryActionProps:r={color:"primary",variant:"contained"},secondaryBtnLabel:o,onSecondaryAction:i,secondaryActionProps:s={color:"primary",variant:"outlined"},...a}=t;return v.jsx(_1,{actions:[v.jsx(j.Button,{className:"MBv2_DecisionModal_SecondaryAction",onClick:i,...s,children:o}),v.jsx(j.Button,{className:"MBv2_DecisionModal_PrimaryAction",onClick:n,...r,children:e})],...a})},Uce=t=>{const{featureMenuOptions:e=[],copyright:n,logo:r,sx:o={},fontColor:i="primary"}=t,{palette:s}=j.useTheme(),a=oo.useNavigate();return v.jsxs(j.Box,{className:"MBv2_Footer",sx:{backgroundColor:s.mode==="dark"?"#222222":"#ededed",padding:"25px 30px",...o},children:[v.jsx(j.Box,{className:"MBv2_Footer_Logo",sx:{display:"flex",gap:2,alignItems:"center",paddingBottom:1},children:typeof r=="string"?v.jsx("img",{draggable:"false",src:r,style:{width:"200px"},alt:"logo"}):r}),v.jsxs(j.Box,{display:"flex",justifyContent:"space-between",flexWrap:"wrap",className:"MBv2_Footer_Nav_Links_Container",gap:2,children:[v.jsx(j.Box,{sx:{flexGrow:1},className:"MBv2_Footer_Nav_Links",display:"flex",flexDirection:"row",justifyContent:"flex-start",gap:3,children:e==null?void 0:e.map(l=>v.jsx(j.Link,{"data-testid":l.label,sx:{cursor:"pointer",fontSize:15},color:i,...Yc(l,a),children:l.label},l.label))}),n&&v.jsx(j.Typography,{style:{fontSize:15},"data-testid":"copyright",className:"MBv2_Footer_Copyright",color:i,children:n})]})]})},UN=t=>{const{menuOptionLists:e,anchor:n="left",children:r}=t,{pathname:o}=oo.useLocation(),i=oo.useNavigate(),[s,a]=J.useState(!1),l=(m,g)=>v.jsx(j.MenuList,{children:m.map(b=>v.jsxs(j.MenuItem,{...Yc(b,i,()=>a(!1)),children:[b.icon&&v.jsx(j.ListItemIcon,{children:b.icon}),v.jsx(j.ListItemText,{primary:b.label})]},`mobile-drawer-group-${g}-item-${b.path}`))}),f=(()=>{if(e){const m=e.filter(g=>g&&g.length>0);return m.length===0?null:m.map((g,b)=>v.jsxs(J.Fragment,{children:[l(g,b),b<m.length-1&&v.jsx(j.Divider,{})]},`mobile-drawer-group-${b}`))}return r?v.jsx(j.Box,{role:"presentation",onClick:()=>a(!1),children:r}):null})(),h=f??!1;return J.useEffect(()=>{a(!1)},[o]),h&&v.jsxs(v.Fragment,{children:[v.jsx(j.IconButton,{onClick:()=>a(!0),color:"inherit",title:"Menu",children:v.jsx(O6,{})}),v.jsx(j.Drawer,{"data-testid":"mobile-drawer",anchor:n,open:s,onClose:()=>a(!1),children:v.jsx(j.Box,{sx:{width:300},display:"flex",flexDirection:"column",justifyContent:"space-between",children:v.jsx(j.Box,{display:"flex",justifyContent:"start",flexDirection:"column",children:f})})})]})},KN=t=>{const{env:e,isProd:n}=t;return n?null:v.jsx(j.Paper,{sx:{borderRadius:0,display:"flex",alignItems:"center",justifyContent:"center"},children:v.jsxs(j.Typography,{variant:"h6",color:"error",children:[e," Environment - Test Data Only"]})})},YN=t=>{const{label:e,menuOptions:n=[],icon:r}=t,o=oo.useNavigate(),[i,s]=P.useState(null),a=!!i,l=f=>{s(f.currentTarget)},u=()=>{s(null)};return n.length===0?null:v.jsxs(v.Fragment,{children:[v.jsx(j.Button,{startIcon:r,variant:"outlined",color:"inherit",sx:{minWidth:0,padding:1},onClick:l,children:e}),v.jsx(j.Menu,{anchorEl:i,open:a,onClick:u,children:n.map(f=>v.jsxs(j.MenuItem,{...Yc(f,o),children:[f.icon&&v.jsx(j.ListItemIcon,{children:f.icon}),v.jsx(j.ListItemText,{primary:f.label})]},f.label))})]})},GN=t=>{const{displayName:e,userMenuOptions:n}=t;return v.jsx(YN,{label:e,menuOptions:n,icon:v.jsx(A6,{})})},mh=t=>{const{menuOptions:e,orientation:n="horizontal",activeTabIdx:r,sx:o=n=="vertical"?{"& .MuiTabs-indicator":{left:0}}:void 0,slotProps:i={indicator:{sx:n=="horizontal"?{height:4}:{width:4}}}}=t,{palette:s}=j.useTheme(),a=oo.useNavigate();return v.jsx(j.Tabs,{orientation:n,value:r??!1,sx:o,slotProps:i,children:e.map((l,u)=>v.jsx(j.Tab,{icon:l.icon,label:l.label,value:u,...Yc(l,a),sx:{alignItems:n=="vertical"?"flex-start":void 0,borderBottom:n=="vertical"?"1px solid":void 0,borderColor:"divider","&.Mui-selected":{backgroundColor:n=="vertical"?s.grey[s.mode=="dark"?800:50]:void 0,color:"inherit"}}},l.label))})},JN=t=>{const{featureMenuOptions:e=[],activeTabIdx:n,sx:r}=t;return e.length>0&&v.jsx(j.Paper,{sx:{pl:4,pr:4,borderRadius:0},"data-testid":"navBar",children:v.jsx(mh,{menuOptions:e,activeTabIdx:n,sx:r})})},ZN=t=>{const{onToggle:e}=t,{palette:n}=j.useTheme(),r=n.mode==="dark";return v.jsx(j.IconButton,{onClick:e,color:"inherit",title:"Dark Mode Toggle",children:r?v.jsx(aI,{}):v.jsx(iI,{})})},Kce=t=>{const{envInfo:e,headerRef:n,logo:r,featureMenuOptions:o=[],userMenuOptions:i=[],onToggleDarkMode:s,quickLinks:a=[],displayName:l,banner:u,position:f="fixed",children:h,sx:m,navBarSx:g}=t,b=oo.useNavigate(),y=j.useMediaQuery(j.useTheme().breakpoints.down("sm")),{palette:S}=j.useTheme(),{pathname:C}=oo.useLocation(),E=S.mode==="dark",[T,w]=P.useState(void 0);P.useEffect(()=>{const _=o.findIndex(I=>I.path&&C.startsWith(I.path));w(_>=0?_:void 0)},[C,o]);const M=s&&v.jsx(ZN,{onToggle:s}),R=s&&(y||!y&&l)?[{icon:E?v.jsx(aI,{}):v.jsx(iI,{}),label:`Switch to ${E?"Light":"Dark"} mode`,onClick:s},...i]:i;return v.jsxs(j.AppBar,{ref:n,position:f,sx:m,elevation:4,children:[e&&v.jsx(KN,{...e}),u,v.jsxs(j.Toolbar,{sx:{color:"white",display:"flex",justifyContent:"space-between",gap:2},children:[v.jsx(j.Button,{disableRipple:!0,component:oo.Link,to:"/",children:r&&typeof r=="string"?v.jsx("img",{draggable:"false",src:r,style:{width:"200px",filter:"brightness(0) invert(1)"},alt:"logo"}):r}),v.jsxs(j.Box,{display:"flex",gap:2,alignItems:"center",children:[!l&&!y&&M,y&&v.jsx(UN,{menuOptionLists:[o,a,R],anchor:"right"}),!y&&v.jsxs(v.Fragment,{children:[v.jsx(j.Box,{display:"flex",gap:0,children:a==null?void 0:a.map((_,I)=>v.jsxs(j.Box,{display:"flex",alignItems:"center",children:[I>0&&v.jsx(j.Typography,{className:"quickLink-divider",color:S.primary.contrastText,children:"|"}),v.jsx(j.Button,{variant:"text",sx:{color:"white"},...Yc(_,b),children:v.jsxs(j.Box,{display:"flex",gap:"3px",alignItems:"center",children:[_.icon,_.label]})})]},_.label))}),h,l&&v.jsx(GN,{displayName:l,userMenuOptions:R})]})]})]}),!y&&v.jsx(JN,{featureMenuOptions:o,activeTabIdx:T,sx:g})]})},Yce=t=>{const{sx:e,menuOptions:n=[]}=t,{pathname:r}=oo.useLocation(),o=j.useMediaQuery(j.useTheme().breakpoints.down("sm")),[i,s]=J.useState(void 0);return J.useEffect(()=>{const a=n.findIndex(l=>l.path&&r.startsWith(l.path))??-1;s(a>=0?a:void 0)},[r,n]),!o&&n.length>0&&v.jsx(j.Box,{sx:e,children:v.jsx(j.Card,{sx:{height:"100%",width:200},children:v.jsx(mh,{orientation:"vertical",menuOptions:n,activeTabIdx:i})})})},Gce=t=>{const{featureMenuOptions:e=[],activeTabIdx:n,sx:r}=t,{palette:o}=j.useTheme();return e.length>0&&v.jsx(mh,{menuOptions:e,activeTabIdx:n,sx:{margin:"8px",backgroundColor:o.primary.dark,borderRadius:"8px","& .MuiTab-root":{color:o.secondary.light,flexDirection:"row",gap:"2px","& .MuiTab-icon":{marginBottom:"unset"},minHeight:"58px"},"& .MuiTab-root.Mui-selected":{color:o.primary.contrastText,fontSize:"120%"},"& .MuiTabs-indicator":{display:"none"},...r}})},Jce=t=>v.jsx(bu,{severity:"success",...t}),Zce=t=>v.jsx(bu,{severity:"info",...t}),Xce=t=>v.jsx(bu,{severity:"warning",...t}),XN=t=>{const{crumbInfo:e}=t,n=oo.useNavigate();return v.jsx(j.Breadcrumbs,{"aria-label":"breadcrumb",separator:v.jsx(R6,{color:"primary"}),sx:{marginBottom:2},children:e.map(({label:r,path:o},i)=>o&&i<e.length-1?v.jsx(j.Link,{color:"primary",sx:{cursor:"pointer"},onClick:()=>n(o),children:r},r):v.jsx(j.Typography,{color:"primary",children:r},r))})},Qce=t=>{const{title:e,message:n,type:r,onClose:o,autoHideDuration:i=8e3,variant:s="leftBorder",elevation:a=6}=t,l=eue(r);return v.jsx(j.Snackbar,{"data-testid":"message-snackbar",anchorOrigin:{vertical:"bottom",horizontal:"right"},open:!0,onClose:u=>{u==null&&o()},autoHideDuration:i,children:v.jsx(bu,{"data-testid":"message-snackbar-alert",severity:l,iconMapping:{info:fA(r),warning:fA(r)},onClose:o,elevation:a,variant:s,children:n?v.jsxs(v.Fragment,{children:[v.jsx(j.AlertTitle,{"data-testid":"alertTitle",sx:{fontWeight:"bold"},children:e}),n]}):e})})},eue=t=>t=="logout"?"info":t=="timeout"?"warning":t,fA=t=>{if(t=="timeout")return v.jsx(ZH,{});if(t=="logout")return v.jsx(M6,{})},tue=t=>{const{title:e,createButtonLabel:n,showAddButton:r=!1,onAdd:o=()=>alert("Not implemented yet"),breadcrumbs:i=[],children:s,sx:a}=t,l=j.useMediaQuery(j.useTheme().breakpoints.down("sm"));return r&&o.toString()==='() => alert("Not implemented yet")'&&console.warn('PageHeader: "showAddButton" is true but "onAdd" is not defined.'),v.jsxs(j.Box,{sx:a,children:[i.length>0&&v.jsx(XN,{crumbInfo:i}),v.jsxs(j.Box,{className:"MBv2_PageHeader_Header",display:"flex",flexDirection:l?"column":"row",justifyContent:"space-between",alignItems:"center",gap:1,children:[v.jsxs(j.Box,{className:"MBv2_PageHeader_TitleAndCreateBtn",display:"flex",flexDirection:"row",justifyContent:l||!s?"space-between":"start",alignItems:"center",width:"100%",gap:1,children:[typeof e=="string"?v.jsx(j.Typography,{className:"MBv2_PageHeader_Title",variant:"h2",children:e}):e,r&&v.jsxs(D1,{className:"MBv2_PageHeader_CreateBtn",onClick:()=>o(),children:[v.jsx(XH,{style:{marginRight:"0.5rem"}}),n]})]}),s&&v.jsx(j.Box,{width:l?"100%":"50%",children:s})]})]})},nue=t=>{const{title:e,titleIcon:n,fullWidthIcon:r=!1,children:o,actionLabel:i,action:s,sx:a}=t,l=j.useMediaQuery(j.useTheme().breakpoints.down("sm"));return v.jsxs(j.Card,{sx:a||{padding:"30px 40px",display:"flex",flexDirection:"column",gap:"1rem"},children:[n&&v.jsx(j.Box,{className:"MBv2_SingleActionCard_Img",sx:[r?{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",gap:"20px",marginBottom:"10px"}:{display:"inline"}],children:n}),v.jsx(j.Typography,{variant:"h1",display:"inline",fontSize:"calc(20px + .9vw)",className:"MBv2_SingleActionCard_Title",children:e}),o,v.jsx(j.Button,{variant:"contained",color:"primary",onClick:s,fullWidth:l,className:"MBv2_SingleActionCard_ActionButton",children:i})]})},rue=({children:t,fetchExistingCitations:e})=>{const[n,r]=J.useState([]),o=J.useCallback(async()=>{const s=await e();r(a=>{const l=new Set(a.map(f=>f.id));return[...a.filter(f=>!l.has(f.id)),...s]})},[e]),i=J.useCallback(s=>{const a=n.findIndex(l=>l.id===s.id);r(a!==-1?l=>{const u=[...l];return u[a]=s,u}:[...n,s])},[n]);return v.jsx(WN.Provider,{value:{citations:n,resync:o,addUpdateCitation:i},children:t})};exports.AlertModal=Wce;exports.Autocomplete=XA;exports.Breadcrumbs=XN;exports.Button=D1;exports.Checkbox=OH;exports.CheckboxGroup=RH;exports.CitationField=jce;exports.CitationFieldProvider=rue;exports.CitationMenu=zN;exports.ConfirmationModal=Hce;exports.DarkModeToggle=ZN;exports.DateField=xf;exports.DateRangeField=QG;exports.DecisionModal=qce;exports.Drawer=UN;exports.DynamicAutocomplete=kH;exports.EnvironmentBanner=KN;exports.Error=Qn;exports.ErrorAlert=VN;exports.FileList=DH;exports.FileUpload=QA;exports.FloatingNavBar=Gce;exports.Footer=Uce;exports.FormDebugger=Fce;exports.Header=Kce;exports.InfoAlert=Zce;exports.LoadingIndicator=I0;exports.Location=KH;exports.MenuButton=YN;exports.MultiAutocomplete=MH;exports.NavBar=JN;exports.PageHeader=tue;exports.PaginatedTable=RN;exports.ProfileMenu=GN;exports.RadioGroup=oI;exports.RangeSlider=YH;exports.RepeatableFormGroup=Vce;exports.RichTextField=Lle;exports.ScrollToTop=$ce;exports.SearchField=B6;exports.Select=GH;exports.Sidebar=Yce;exports.SingleActionCard=nue;exports.Snackbar=Qce;exports.Stepper=Bce;exports.Submit=IN;exports.SuccessAlert=Jce;exports.Switch=JH;exports.Table=ON;exports.Tabs=mh;exports.TextField=Fa;exports.WarningAlert=Xce;