dgz-ui 1.4.12 → 1.4.13

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 (159) hide show
  1. package/dist/accordion/index.cjs.js +1 -1
  2. package/dist/accordion/index.es.js +1 -1
  3. package/dist/alert/index.cjs.js +1 -1
  4. package/dist/alert/index.es.js +1 -1
  5. package/dist/alert-dialog/index.cjs.js +1 -1
  6. package/dist/alert-dialog/index.es.js +1 -1
  7. package/dist/avatar/index.cjs.js +1 -1
  8. package/dist/avatar/index.es.js +1 -1
  9. package/dist/badge/index.cjs.js +1 -1
  10. package/dist/badge/index.es.js +1 -1
  11. package/dist/breadcrumb/index.cjs.js +1 -1
  12. package/dist/breadcrumb/index.es.js +1 -1
  13. package/dist/button/index.cjs.js +1 -1
  14. package/dist/button/index.es.js +2 -2
  15. package/dist/calendar/index.cjs.js +1 -1
  16. package/dist/calendar/index.es.js +1 -1
  17. package/dist/card/index.cjs.js +1 -1
  18. package/dist/card/index.es.js +1 -1
  19. package/dist/carousel/index.cjs.js +1 -1
  20. package/dist/carousel/index.es.js +2 -2
  21. package/dist/chunks/{alert-D7LmNw1T.es.js → alert-B9rImkiX.es.js} +3 -3
  22. package/dist/chunks/{alert-D7LmNw1T.es.js.map → alert-B9rImkiX.es.js.map} +1 -1
  23. package/dist/chunks/{alert-CQSIGY8u.cjs.js → alert-BNcf_eJn.cjs.js} +2 -2
  24. package/dist/chunks/{alert-CQSIGY8u.cjs.js.map → alert-BNcf_eJn.cjs.js.map} +1 -1
  25. package/dist/chunks/{alert-dialog-BrsfAyUm.cjs.js → alert-dialog-BfBtlIHj.cjs.js} +2 -2
  26. package/dist/chunks/{alert-dialog-BrsfAyUm.cjs.js.map → alert-dialog-BfBtlIHj.cjs.js.map} +1 -1
  27. package/dist/chunks/{alert-dialog-DbC22-z2.es.js → alert-dialog-BrCPhmhd.es.js} +3 -3
  28. package/dist/chunks/{alert-dialog-DbC22-z2.es.js.map → alert-dialog-BrCPhmhd.es.js.map} +1 -1
  29. package/dist/chunks/{avatar-DpvcnhV-.cjs.js → avatar-CQMWDnOM.cjs.js} +2 -2
  30. package/dist/chunks/{avatar-DpvcnhV-.cjs.js.map → avatar-CQMWDnOM.cjs.js.map} +1 -1
  31. package/dist/chunks/{avatar-MPlL_Ty_.es.js → avatar-zl4cf4c2.es.js} +3 -3
  32. package/dist/chunks/{avatar-MPlL_Ty_.es.js.map → avatar-zl4cf4c2.es.js.map} +1 -1
  33. package/dist/chunks/{badge-hJsnkvT2.cjs.js → badge-1ocx6hox.cjs.js} +2 -2
  34. package/dist/chunks/{badge-hJsnkvT2.cjs.js.map → badge-1ocx6hox.cjs.js.map} +1 -1
  35. package/dist/chunks/{badge-aHtYwGC6.es.js → badge-CPzxgRrM.es.js} +3 -3
  36. package/dist/chunks/{badge-aHtYwGC6.es.js.map → badge-CPzxgRrM.es.js.map} +1 -1
  37. package/dist/chunks/{breadcrumb-DWV0rL7P.es.js → breadcrumb-BrMrkZfa.es.js} +2 -2
  38. package/dist/chunks/{breadcrumb-DWV0rL7P.es.js.map → breadcrumb-BrMrkZfa.es.js.map} +1 -1
  39. package/dist/chunks/{breadcrumb-BeExVsql.cjs.js → breadcrumb-iPT-f06l.cjs.js} +2 -2
  40. package/dist/chunks/{breadcrumb-BeExVsql.cjs.js.map → breadcrumb-iPT-f06l.cjs.js.map} +1 -1
  41. package/dist/chunks/{button-BXJ2cCVi.cjs.js → button-CpKtD3qG.cjs.js} +2 -2
  42. package/dist/chunks/{button-BXJ2cCVi.cjs.js.map → button-CpKtD3qG.cjs.js.map} +1 -1
  43. package/dist/chunks/{button-C7Gcg6zZ.es.js → button-DTRIYqDb.es.js} +3 -3
  44. package/dist/chunks/{button-C7Gcg6zZ.es.js.map → button-DTRIYqDb.es.js.map} +1 -1
  45. package/dist/chunks/{button-group-CRBe0_eB.es.js → button-group-B4h4-5eB.es.js} +4 -4
  46. package/dist/chunks/{button-group-CRBe0_eB.es.js.map → button-group-B4h4-5eB.es.js.map} +1 -1
  47. package/dist/chunks/{button-group-BpjA8AOm.cjs.js → button-group-CaFYso6b.cjs.js} +2 -2
  48. package/dist/chunks/{button-group-BpjA8AOm.cjs.js.map → button-group-CaFYso6b.cjs.js.map} +1 -1
  49. package/dist/chunks/{card-ClxRfnoC.cjs.js → card-B1sx5mON.cjs.js} +2 -2
  50. package/dist/chunks/{card-ClxRfnoC.cjs.js.map → card-B1sx5mON.cjs.js.map} +1 -1
  51. package/dist/chunks/{card-DI87w6OJ.es.js → card-BJ0eqFqO.es.js} +2 -2
  52. package/dist/chunks/{card-DI87w6OJ.es.js.map → card-BJ0eqFqO.es.js.map} +1 -1
  53. package/dist/chunks/{dialog-ztKmNTXl.cjs.js → dialog-BWF5BkHj.cjs.js} +2 -2
  54. package/dist/chunks/{dialog-ztKmNTXl.cjs.js.map → dialog-BWF5BkHj.cjs.js.map} +1 -1
  55. package/dist/chunks/{dialog-C5H9YueP.es.js → dialog-D9BMBoAJ.es.js} +2 -2
  56. package/dist/chunks/{dialog-C5H9YueP.es.js.map → dialog-D9BMBoAJ.es.js.map} +1 -1
  57. package/dist/chunks/{dropdown-menu-CHTYlgbi.es.js → dropdown-menu-BUaCITEG.es.js} +2 -2
  58. package/dist/chunks/{dropdown-menu-CHTYlgbi.es.js.map → dropdown-menu-BUaCITEG.es.js.map} +1 -1
  59. package/dist/chunks/{dropdown-menu-Dm0HBDm-.cjs.js → dropdown-menu-D52NH0Di.cjs.js} +2 -2
  60. package/dist/chunks/{dropdown-menu-Dm0HBDm-.cjs.js.map → dropdown-menu-D52NH0Di.cjs.js.map} +1 -1
  61. package/dist/chunks/{index-DcN2zBOn.es.js → index-xA4mlFw5.es.js} +2 -2
  62. package/dist/chunks/{index-DcN2zBOn.es.js.map → index-xA4mlFw5.es.js.map} +1 -1
  63. package/dist/chunks/{index-BP8Me5c9.cjs.js → index-x_Mxo00P.cjs.js} +2 -2
  64. package/dist/chunks/{index-BP8Me5c9.cjs.js.map → index-x_Mxo00P.cjs.js.map} +1 -1
  65. package/dist/chunks/{pagination-Cwng-7FS.es.js → pagination-DFYeehFF.es.js} +3 -3
  66. package/dist/chunks/{pagination-Cwng-7FS.es.js.map → pagination-DFYeehFF.es.js.map} +1 -1
  67. package/dist/chunks/{pagination-CTmvz3Yq.cjs.js → pagination-LHTb7tXo.cjs.js} +2 -2
  68. package/dist/chunks/{pagination-CTmvz3Yq.cjs.js.map → pagination-LHTb7tXo.cjs.js.map} +1 -1
  69. package/dist/chunks/{popover-Cqh2olw7.cjs.js → popover-Bh6emR_J.cjs.js} +2 -2
  70. package/dist/chunks/{popover-Cqh2olw7.cjs.js.map → popover-Bh6emR_J.cjs.js.map} +1 -1
  71. package/dist/chunks/{popover-B52SY7sk.es.js → popover-BredK0sg.es.js} +2 -2
  72. package/dist/chunks/{popover-B52SY7sk.es.js.map → popover-BredK0sg.es.js.map} +1 -1
  73. package/dist/chunks/{react-select-C21jRzGG.es.js → react-select-BDoLUa8t.es.js} +2 -2
  74. package/dist/chunks/{react-select-C21jRzGG.es.js.map → react-select-BDoLUa8t.es.js.map} +1 -1
  75. package/dist/chunks/{react-select-1n8mmj6n.cjs.js → react-select-DvBVNVXL.cjs.js} +2 -2
  76. package/dist/chunks/{react-select-1n8mmj6n.cjs.js.map → react-select-DvBVNVXL.cjs.js.map} +1 -1
  77. package/dist/chunks/{scroll-area-CpVgh3EC.es.js → scroll-area-CwWjTiks.es.js} +2 -2
  78. package/dist/chunks/{scroll-area-CpVgh3EC.es.js.map → scroll-area-CwWjTiks.es.js.map} +1 -1
  79. package/dist/chunks/{scroll-area-DfdUITCu.cjs.js → scroll-area-Nj6J9MqV.cjs.js} +2 -2
  80. package/dist/chunks/{scroll-area-DfdUITCu.cjs.js.map → scroll-area-Nj6J9MqV.cjs.js.map} +1 -1
  81. package/dist/chunks/{separator-BGecc9_9.cjs.js → separator-CGvV-BlI.cjs.js} +2 -2
  82. package/dist/chunks/{separator-BGecc9_9.cjs.js.map → separator-CGvV-BlI.cjs.js.map} +1 -1
  83. package/dist/chunks/{separator-57fHPAAv.es.js → separator-CgP4OHOF.es.js} +2 -2
  84. package/dist/chunks/{separator-57fHPAAv.es.js.map → separator-CgP4OHOF.es.js.map} +1 -1
  85. package/dist/chunks/{sheet-Cd8pVcuR.cjs.js → sheet-BL1AP0aU.cjs.js} +2 -2
  86. package/dist/chunks/{sheet-Cd8pVcuR.cjs.js.map → sheet-BL1AP0aU.cjs.js.map} +1 -1
  87. package/dist/chunks/{sheet-BnHJdRsn.es.js → sheet-CKsRhiVy.es.js} +2 -2
  88. package/dist/chunks/{sheet-BnHJdRsn.es.js.map → sheet-CKsRhiVy.es.js.map} +1 -1
  89. package/dist/chunks/{skeleton-9sn_asi7.cjs.js → skeleton-C7pnV7bc.cjs.js} +2 -2
  90. package/dist/chunks/{skeleton-9sn_asi7.cjs.js.map → skeleton-C7pnV7bc.cjs.js.map} +1 -1
  91. package/dist/chunks/{skeleton-iS5JnNYj.es.js → skeleton-DKbF2Fso.es.js} +2 -2
  92. package/dist/chunks/{skeleton-iS5JnNYj.es.js.map → skeleton-DKbF2Fso.es.js.map} +1 -1
  93. package/dist/chunks/{table-BEkdKcLT.es.js → table-BTb0KUhR.es.js} +2 -2
  94. package/dist/chunks/{table-BEkdKcLT.es.js.map → table-BTb0KUhR.es.js.map} +1 -1
  95. package/dist/chunks/{table-BVd6_9C_.cjs.js → table-Dxainp0Z.cjs.js} +2 -2
  96. package/dist/chunks/{table-BVd6_9C_.cjs.js.map → table-Dxainp0Z.cjs.js.map} +1 -1
  97. package/dist/chunks/{tabs-D2mtxMzj.es.js → tabs-BnamvF0S.es.js} +4 -4
  98. package/dist/chunks/{tabs-D2mtxMzj.es.js.map → tabs-BnamvF0S.es.js.map} +1 -1
  99. package/dist/chunks/{tabs-mihPEAju.cjs.js → tabs-CDt2LiNL.cjs.js} +2 -2
  100. package/dist/chunks/{tabs-mihPEAju.cjs.js.map → tabs-CDt2LiNL.cjs.js.map} +1 -1
  101. package/dist/chunks/{textarea-0VSN2V4u.es.js → textarea-BnUWlaPx.es.js} +5827 -5786
  102. package/dist/chunks/textarea-BnUWlaPx.es.js.map +1 -0
  103. package/dist/chunks/textarea-EPWY09og.cjs.js +173 -0
  104. package/dist/chunks/textarea-EPWY09og.cjs.js.map +1 -0
  105. package/dist/chunks/{timepicker-Bez86y4j.es.js → timepicker-Ca0gLbqn.es.js} +5 -5
  106. package/dist/chunks/timepicker-Ca0gLbqn.es.js.map +1 -0
  107. package/dist/chunks/{timepicker-Ba7H_jbd.cjs.js → timepicker-CuuVE0le.cjs.js} +2 -2
  108. package/dist/chunks/timepicker-CuuVE0le.cjs.js.map +1 -0
  109. package/dist/chunks/{tooltip-DSraOWNq.cjs.js → tooltip-CsZB0nVr.cjs.js} +2 -2
  110. package/dist/chunks/{tooltip-DSraOWNq.cjs.js.map → tooltip-CsZB0nVr.cjs.js.map} +1 -1
  111. package/dist/chunks/{tooltip-DCNsfjjI.es.js → tooltip-Dtzkuphk.es.js} +2 -2
  112. package/dist/chunks/{tooltip-DCNsfjjI.es.js.map → tooltip-Dtzkuphk.es.js.map} +1 -1
  113. package/dist/chunks/utils-C4d7Ql9-.cjs.js +2 -0
  114. package/dist/chunks/utils-C4d7Ql9-.cjs.js.map +1 -0
  115. package/dist/chunks/{utils-D6dQK9i-.es.js → utils-CnvKSirc.es.js} +157 -157
  116. package/dist/chunks/utils-CnvKSirc.es.js.map +1 -0
  117. package/dist/dialog/index.cjs.js +1 -1
  118. package/dist/dialog/index.es.js +1 -1
  119. package/dist/dropdown/index.cjs.js +1 -1
  120. package/dist/dropdown/index.es.js +1 -1
  121. package/dist/form/index.cjs.js +1 -1
  122. package/dist/form/index.es.js +2 -2
  123. package/dist/index.cjs.js +1 -1
  124. package/dist/index.es.js +23 -23
  125. package/dist/pagination/index.cjs.js +1 -1
  126. package/dist/pagination/index.es.js +1 -1
  127. package/dist/popover/index.cjs.js +1 -1
  128. package/dist/popover/index.es.js +1 -1
  129. package/dist/progress/index.cjs.js +1 -1
  130. package/dist/progress/index.es.js +1 -1
  131. package/dist/scroll-area/index.cjs.js +1 -1
  132. package/dist/scroll-area/index.es.js +1 -1
  133. package/dist/separator/index.cjs.js +1 -1
  134. package/dist/separator/index.es.js +1 -1
  135. package/dist/sheet/index.cjs.js +1 -1
  136. package/dist/sheet/index.es.js +1 -1
  137. package/dist/skeleton/index.cjs.js +1 -1
  138. package/dist/skeleton/index.es.js +1 -1
  139. package/dist/styles.css +2 -2
  140. package/dist/tab/index.cjs.js +1 -1
  141. package/dist/tab/index.es.js +1 -1
  142. package/dist/table/index.cjs.js +1 -1
  143. package/dist/table/index.es.js +1 -1
  144. package/dist/tooltip/index.cjs.js +1 -1
  145. package/dist/tooltip/index.es.js +1 -1
  146. package/dist/types/App.d.ts.map +1 -1
  147. package/dist/types/ui/form/html-editor.d.ts +5 -3
  148. package/dist/types/ui/form/html-editor.d.ts.map +1 -1
  149. package/dist/utils/index.cjs.js +1 -1
  150. package/dist/utils/index.es.js +1 -1
  151. package/package.json +5 -2
  152. package/dist/chunks/textarea-0VSN2V4u.es.js.map +0 -1
  153. package/dist/chunks/textarea-DbxcvKTh.cjs.js +0 -186
  154. package/dist/chunks/textarea-DbxcvKTh.cjs.js.map +0 -1
  155. package/dist/chunks/timepicker-Ba7H_jbd.cjs.js.map +0 -1
  156. package/dist/chunks/timepicker-Bez86y4j.es.js.map +0 -1
  157. package/dist/chunks/utils-BWS4jvS6.cjs.js +0 -2
  158. package/dist/chunks/utils-BWS4jvS6.cjs.js.map +0 -1
  159. package/dist/chunks/utils-D6dQK9i-.es.js.map +0 -1
@@ -1,186 +0,0 @@
1
- "use strict";var Cf=Object.defineProperty;var Tf=(n,e,t)=>e in n?Cf(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var J=(n,e,t)=>Tf(n,typeof e!="symbol"?e+"":e,t);const O=require("react/jsx-runtime"),Ke=require("react"),Oe=require("./index-jFOWwfD3.cjs.js"),le=require("./index-D9zW9Tk7.cjs.js"),Qt=require("./index-BruMW80s.cjs.js"),jt=require("./index-CGLGXpw0.cjs.js"),Ys=require("./index-is755vrc.cjs.js"),Ce=require("./utils-BWS4jvS6.cjs.js"),nc=require("./index-CMEUY8i_.cjs.js"),Oa=require("react-hook-form"),kf=require("react-dom"),La=require("./index-BP8Me5c9.cjs.js"),ct=require("./_commonjsHelpers-DKOUU3wS.cjs.js"),Te=require("./index-DG15yxNP.cjs.js"),Jr=require("./react-select-1n8mmj6n.cjs.js"),oi=require("./index-DGEvZwN5.cjs.js"),sc=require("./index-DnRKXUWD.cjs.js"),ic=require("./circle-CKMW6wiB.cjs.js"),ml=require("./index-C8ni3LLa.cjs.js"),Nf=require("./index-pF_O2Ico.cjs.js"),If=require("./index-CItoM52t.cjs.js"),Rf=require("./index-CN4RxFxN.cjs.js"),rr=require("./index-pQxT4IlV.cjs.js"),Of=require("./index-C28jaZCP.cjs.js"),oc=require("./chevron-down-T-PkxHnH.cjs.js"),Lf=require("./createLucideIcon-HtK0p34L.cjs.js"),Mf=require("./button-BXJ2cCVi.cjs.js");function ac(n){if(n&&n.__esModule)return n;const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const t in n)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,r.get?r:{enumerable:!0,get:()=>n[t]})}}return e.default=n,Object.freeze(e)}const C=ac(Ke),lc=ac(kf);/**
2
- * @license lucide-react v0.563.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */const Df=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Pf=Lf.createLucideIcon("chevron-up",Df);function ai(n){const e=C.useRef({value:n,previous:n});return C.useMemo(()=>(e.current.value!==n&&(e.current.previous=e.current.value,e.current.value=n),e.current.previous),[n])}var li="Checkbox",[Bf]=le.createContextScope(li),[qf,Ma]=Bf(li);function Ff(n){const{__scopeCheckbox:e,checked:t,children:r,defaultChecked:s,disabled:i,form:o,name:a,onCheckedChange:u,required:c,value:h="on",internal_do_not_use_render:g}=n,[d,m]=Qt.useControllableState({prop:t,defaultProp:s??!1,onChange:u,caller:li}),[v,p]=C.useState(null),[y,E]=C.useState(null),S=C.useRef(!1),x=v?!!o||!!v.closest("form"):!0,N={checked:d,disabled:i,setChecked:m,control:v,setControl:p,name:a,form:o,value:h,hasConsumerStoppedPropagationRef:S,required:c,defaultChecked:Jt(s)?!1:s,isFormControl:x,bubbleInput:y,setBubbleInput:E};return O.jsx(qf,{scope:e,...N,children:jf(g)?g(N):r})}var uc="CheckboxTrigger",cc=C.forwardRef(({__scopeCheckbox:n,onKeyDown:e,onClick:t,...r},s)=>{const{control:i,value:o,disabled:a,checked:u,required:c,setControl:h,setChecked:g,hasConsumerStoppedPropagationRef:d,isFormControl:m,bubbleInput:v}=Ma(uc,n),p=Oe.useComposedRefs(s,h),y=C.useRef(u);return C.useEffect(()=>{const E=i==null?void 0:i.form;if(E){const S=()=>g(y.current);return E.addEventListener("reset",S),()=>E.removeEventListener("reset",S)}},[i,g]),O.jsx(le.Primitive.button,{type:"button",role:"checkbox","aria-checked":Jt(u)?"mixed":u,"aria-required":c,"data-state":gc(u),"data-disabled":a?"":void 0,disabled:a,value:o,...r,ref:p,onKeyDown:le.composeEventHandlers(e,E=>{E.key==="Enter"&&E.preventDefault()}),onClick:le.composeEventHandlers(t,E=>{g(S=>Jt(S)?!0:!S),v&&m&&(d.current=E.isPropagationStopped(),d.current||E.stopPropagation())})})});cc.displayName=uc;var Da=C.forwardRef((n,e)=>{const{__scopeCheckbox:t,name:r,checked:s,defaultChecked:i,required:o,disabled:a,value:u,onCheckedChange:c,form:h,...g}=n;return O.jsx(Ff,{__scopeCheckbox:t,checked:s,defaultChecked:i,disabled:a,required:o,onCheckedChange:c,name:r,form:h,value:u,internal_do_not_use_render:({isFormControl:d})=>O.jsxs(O.Fragment,{children:[O.jsx(cc,{...g,ref:e,__scopeCheckbox:t}),d&&O.jsx(pc,{__scopeCheckbox:t})]})})});Da.displayName=li;var hc="CheckboxIndicator",dc=C.forwardRef((n,e)=>{const{__scopeCheckbox:t,forceMount:r,...s}=n,i=Ma(hc,t);return O.jsx(le.Presence,{present:r||Jt(i.checked)||i.checked===!0,children:O.jsx(le.Primitive.span,{"data-state":gc(i.checked),"data-disabled":i.disabled?"":void 0,...s,ref:e,style:{pointerEvents:"none",...n.style}})})});dc.displayName=hc;var fc="CheckboxBubbleInput",pc=C.forwardRef(({__scopeCheckbox:n,...e},t)=>{const{control:r,hasConsumerStoppedPropagationRef:s,checked:i,defaultChecked:o,required:a,disabled:u,name:c,value:h,form:g,bubbleInput:d,setBubbleInput:m}=Ma(fc,n),v=Oe.useComposedRefs(t,m),p=ai(i),y=jt.useSize(r);C.useEffect(()=>{const S=d;if(!S)return;const x=window.HTMLInputElement.prototype,_=Object.getOwnPropertyDescriptor(x,"checked").set,P=!s.current;if(p!==i&&_){const I=new Event("click",{bubbles:P});S.indeterminate=Jt(i),_.call(S,Jt(i)?!1:i),S.dispatchEvent(I)}},[d,p,i,s]);const E=C.useRef(Jt(i)?!1:i);return O.jsx(le.Primitive.input,{type:"checkbox","aria-hidden":!0,defaultChecked:o??E.current,required:a,disabled:u,name:c,value:h,form:g,...e,tabIndex:-1,ref:v,style:{...e.style,...y,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});pc.displayName=fc;function jf(n){return typeof n=="function"}function Jt(n){return n==="indeterminate"}function gc(n){return Jt(n)?"indeterminate":n?"checked":"unchecked"}const mc=C.forwardRef(({className:n,...e},t)=>O.jsx(Da,{ref:t,className:Ce.cn("peer border-border-alpha-strong ring-offset-background size-4 shrink-0 cursor-pointer rounded-sm border disabled:cursor-not-allowed disabled:opacity-50","data-[state=checked]:text-primary data-[state=checked]:bg-item-primary",n),...e,children:O.jsx(dc,{className:Ce.cn("flex size-4 items-center justify-center text-current"),children:e.checked==="indeterminate"?O.jsx(Ys.RN,{className:"mr-0.5 mb-0.5 size-3.5 text-white"}):O.jsx(Ys.s7,{className:"mr-0.5 mb-0.5 size-3.5 text-white"})})}));mc.displayName=Da.displayName;var $f=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Vf=Jr.memoize(function(n){return $f.test(n)||n.charCodeAt(0)===111&&n.charCodeAt(1)===110&&n.charCodeAt(2)<91}),_e="-ms-",jn="-moz-",ye="-webkit-",vc="comm",ui="rule",Pa="decl",Uf="@import",Hf="@namespace",yc="@keyframes",zf="@layer",bc=Math.abs,Ba=String.fromCharCode,Yo=Object.assign;function Gf(n,e){return Re(n,0)^45?(((e<<2^Re(n,0))<<2^Re(n,1))<<2^Re(n,2))<<2^Re(n,3):0}function Ec(n){return n.trim()}function Mt(n,e){return(n=e.exec(n))?n[0]:n}function fe(n,e,t){return n.replace(e,t)}function qs(n,e,t){return n.indexOf(e,t)}function Re(n,e){return n.charCodeAt(e)|0}function br(n,e,t){return n.slice(e,t)}function at(n){return n.length}function wc(n){return n.length}function Mn(n,e){return e.push(n),n}function Kf(n,e){return n.map(e).join("")}function vl(n,e){return n.filter(function(t){return!Mt(t,e)})}var ci=1,nn=1,xc=0,tt=0,Ne=0,fn="";function hi(n,e,t,r,s,i,o,a){return{value:n,root:e,parent:t,type:r,props:s,children:i,line:ci,column:nn,length:o,return:"",siblings:a}}function Gt(n,e){return Yo(hi("",null,null,"",null,null,0,n.siblings),n,{length:-n.length},e)}function Hr(n){for(;n.root;)n=Gt(n.root,{children:[n]});Mn(n,n.siblings)}function Wf(){return Ne}function Yf(){return Ne=tt>0?Re(fn,--tt):0,nn--,Ne===10&&(nn=1,ci--),Ne}function ht(){return Ne=tt<xc?Re(fn,tt++):0,nn++,Ne===10&&(nn=1,ci++),Ne}function Yt(){return Re(fn,tt)}function Fs(){return tt}function di(n,e){return br(fn,n,e)}function zn(n){switch(n){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Zf(n){return ci=nn=1,xc=at(fn=n),tt=0,[]}function Xf(n){return fn="",n}function xo(n){return Ec(di(tt-1,Zo(n===91?n+2:n===40?n+1:n)))}function Qf(n){for(;(Ne=Yt())&&Ne<33;)ht();return zn(n)>2||zn(Ne)>3?"":" "}function Jf(n,e){for(;--e&&ht()&&!(Ne<48||Ne>102||Ne>57&&Ne<65||Ne>70&&Ne<97););return di(n,Fs()+(e<6&&Yt()==32&&ht()==32))}function Zo(n){for(;ht();)switch(Ne){case n:return tt;case 34:case 39:n!==34&&n!==39&&Zo(Ne);break;case 40:n===41&&Zo(n);break;case 92:ht();break}return tt}function ep(n,e){for(;ht()&&n+Ne!==57;)if(n+Ne===84&&Yt()===47)break;return"/*"+di(e,tt-1)+"*"+Ba(n===47?n:ht())}function tp(n){for(;!zn(Yt());)ht();return di(n,tt)}function rp(n){return Xf(js("",null,null,null,[""],n=Zf(n),0,[0],n))}function js(n,e,t,r,s,i,o,a,u){for(var c=0,h=0,g=o,d=0,m=0,v=0,p=1,y=1,E=1,S=0,x="",N=s,_=i,P=r,I=x;y;)switch(v=S,S=ht()){case 40:if(v!=108&&Re(I,g-1)==58){qs(I+=fe(xo(S),"&","&\f"),"&\f",bc(c?a[c-1]:0))!=-1&&(E=-1);break}case 34:case 39:case 91:I+=xo(S);break;case 9:case 10:case 13:case 32:I+=Qf(v);break;case 92:I+=Jf(Fs()-1,7);continue;case 47:switch(Yt()){case 42:case 47:Mn(np(ep(ht(),Fs()),e,t,u),u),(zn(v||1)==5||zn(Yt()||1)==5)&&at(I)&&br(I,-1,void 0)!==" "&&(I+=" ");break;default:I+="/"}break;case 123*p:a[c++]=at(I)*E;case 125*p:case 59:case 0:switch(S){case 0:case 125:y=0;case 59+h:E==-1&&(I=fe(I,/\f/g,"")),m>0&&(at(I)-g||p===0&&v===47)&&Mn(m>32?bl(I+";",r,t,g-1,u):bl(fe(I," ","")+";",r,t,g-2,u),u);break;case 59:I+=";";default:if(Mn(P=yl(I,e,t,c,h,s,a,x,N=[],_=[],g,i),i),S===123)if(h===0)js(I,e,P,P,N,i,g,a,_);else{switch(d){case 99:if(Re(I,3)===110)break;case 108:if(Re(I,2)===97)break;default:h=0;case 100:case 109:case 115:}h?js(n,P,P,r&&Mn(yl(n,P,P,0,0,s,a,x,s,N=[],g,_),_),s,_,g,a,r?N:_):js(I,P,P,P,[""],_,0,a,_)}}c=h=m=0,p=E=1,x=I="",g=o;break;case 58:g=1+at(I),m=v;default:if(p<1){if(S==123)--p;else if(S==125&&p++==0&&Yf()==125)continue}switch(I+=Ba(S),S*p){case 38:E=h>0?1:(I+="\f",-1);break;case 44:a[c++]=(at(I)-1)*E,E=1;break;case 64:Yt()===45&&(I+=xo(ht())),d=Yt(),h=g=at(x=I+=tp(Fs())),S++;break;case 45:v===45&&at(I)==2&&(p=0)}}return i}function yl(n,e,t,r,s,i,o,a,u,c,h,g){for(var d=s-1,m=s===0?i:[""],v=wc(m),p=0,y=0,E=0;p<r;++p)for(var S=0,x=br(n,d+1,d=bc(y=o[p])),N=n;S<v;++S)(N=Ec(y>0?m[S]+" "+x:fe(x,/&\f/g,m[S])))&&(u[E++]=N);return hi(n,e,t,s===0?ui:a,u,c,h,g)}function np(n,e,t,r){return hi(n,e,t,vc,Ba(Wf()),br(n,2,-2),0,r)}function bl(n,e,t,r,s){return hi(n,e,t,Pa,br(n,0,r),br(n,r+1,-1),r,s)}function Sc(n,e,t){switch(Gf(n,e)){case 5103:return ye+"print-"+n+n;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:case 6391:case 5879:case 5623:case 6135:case 4599:return ye+n+n;case 4855:return ye+n.replace("add","source-over").replace("substract","source-out").replace("intersect","source-in").replace("exclude","xor")+n;case 4789:return jn+n+n;case 5349:case 4246:case 4810:case 6968:case 2756:return ye+n+jn+n+_e+n+n;case 5936:switch(Re(n,e+11)){case 114:return ye+n+_e+fe(n,/[svh]\w+-[tblr]{2}/,"tb")+n;case 108:return ye+n+_e+fe(n,/[svh]\w+-[tblr]{2}/,"tb-rl")+n;case 45:return ye+n+_e+fe(n,/[svh]\w+-[tblr]{2}/,"lr")+n}case 6828:case 4268:case 2903:return ye+n+_e+n+n;case 6165:return ye+n+_e+"flex-"+n+n;case 5187:return ye+n+fe(n,/(\w+).+(:[^]+)/,ye+"box-$1$2"+_e+"flex-$1$2")+n;case 5443:return ye+n+_e+"flex-item-"+fe(n,/flex-|-self/g,"")+(Mt(n,/flex-|baseline/)?"":_e+"grid-row-"+fe(n,/flex-|-self/g,""))+n;case 4675:return ye+n+_e+"flex-line-pack"+fe(n,/align-content|flex-|-self/g,"")+n;case 5548:return ye+n+_e+fe(n,"shrink","negative")+n;case 5292:return ye+n+_e+fe(n,"basis","preferred-size")+n;case 6060:return ye+"box-"+fe(n,"-grow","")+ye+n+_e+fe(n,"grow","positive")+n;case 4554:return ye+fe(n,/([^-])(transform)/g,"$1"+ye+"$2")+n;case 6187:return fe(fe(fe(n,/(zoom-|grab)/,ye+"$1"),/(image-set)/,ye+"$1"),n,"")+n;case 5495:case 3959:return fe(n,/(image-set\([^]*)/,ye+"$1$`$1");case 4968:return fe(fe(n,/(.+:)(flex-)?(.*)/,ye+"box-pack:$3"+_e+"flex-pack:$3"),/space-between/,"justify")+ye+n+n;case 4200:if(!Mt(n,/flex-|baseline/))return _e+"grid-column-align"+br(n,e)+n;break;case 2592:case 3360:return _e+fe(n,"template-","")+n;case 4384:case 3616:return t&&t.some(function(r,s){return e=s,Mt(r.props,/grid-\w+-end/)})?~qs(n+(t=t[e].value),"span",0)?n:_e+fe(n,"-start","")+n+_e+"grid-row-span:"+(~qs(t,"span",0)?Mt(t,/\d+/):+Mt(t,/\d+/)-+Mt(n,/\d+/))+";":_e+fe(n,"-start","")+n;case 4896:case 4128:return t&&t.some(function(r){return Mt(r.props,/grid-\w+-start/)})?n:_e+fe(fe(n,"-end","-span"),"span ","")+n;case 4095:case 3583:case 4068:case 2532:return fe(n,/(.+)-inline(.+)/,ye+"$1$2")+n;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(at(n)-1-e>6)switch(Re(n,e+1)){case 109:if(Re(n,e+4)!==45)break;case 102:return fe(n,/(.+:)(.+)-([^]+)/,"$1"+ye+"$2-$3$1"+jn+(Re(n,e+3)==108?"$3":"$2-$3"))+n;case 115:return~qs(n,"stretch",0)?Sc(fe(n,"stretch","fill-available"),e,t)+n:n}break;case 5152:case 5920:return fe(n,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(r,s,i,o,a,u,c){return _e+s+":"+i+c+(o?_e+s+"-span:"+(a?u:+u-+i)+c:"")+n});case 4949:if(Re(n,e+6)===121)return fe(n,":",":"+ye)+n;break;case 6444:switch(Re(n,Re(n,14)===45?18:11)){case 120:return fe(n,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+ye+(Re(n,14)===45?"inline-":"")+"box$3$1"+ye+"$2$3$1"+_e+"$2box$3")+n;case 100:return fe(n,":",":"+_e)+n}break;case 5719:case 2647:case 2135:case 3927:case 2391:return fe(n,"scroll-","scroll-snap-")+n}return n}function Zs(n,e){for(var t="",r=0;r<n.length;r++)t+=e(n[r],r,n,e)||"";return t}function sp(n,e,t,r){switch(n.type){case zf:if(n.children.length)break;case Uf:case Hf:case Pa:return n.return=n.return||n.value;case vc:return"";case yc:return n.return=n.value+"{"+Zs(n.children,r)+"}";case ui:if(!at(n.value=n.props.join(",")))return""}return at(t=Zs(n.children,r))?n.return=n.value+"{"+t+"}":""}function ip(n){var e=wc(n);return function(t,r,s,i){for(var o="",a=0;a<e;a++)o+=n[a](t,r,s,i)||"";return o}}function op(n){return function(e){e.root||(e=e.return)&&n(e)}}function ap(n,e,t,r){if(n.length>-1&&!n.return)switch(n.type){case Pa:n.return=Sc(n.value,n.length,t);return;case yc:return Zs([Gt(n,{value:fe(n.value,"@","@"+ye)})],r);case ui:if(n.length)return Kf(t=n.props,function(s){switch(Mt(s,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":Hr(Gt(n,{props:[fe(s,/:(read-\w+)/,":"+jn+"$1")]})),Hr(Gt(n,{props:[s]})),Yo(n,{props:vl(t,r)});break;case"::placeholder":Hr(Gt(n,{props:[fe(s,/:(plac\w+)/,":"+ye+"input-$1")]})),Hr(Gt(n,{props:[fe(s,/:(plac\w+)/,":"+jn+"$1")]})),Hr(Gt(n,{props:[fe(s,/:(plac\w+)/,_e+"input-$1")]})),Hr(Gt(n,{props:[s]})),Yo(n,{props:vl(t,r)});break}return""})}}var Er=typeof process<"u"&&process.env!==void 0&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",_c="active",Ac="data-styled-version",fi="6.3.8",qa=`/*!sc*/
7
- `,Xs=typeof window<"u"&&typeof document<"u",wr=C.default.createContext===void 0,lp=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof process<"u"&&process.env!==void 0&&process.env.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&process.env.REACT_APP_SC_DISABLE_SPEEDY!==""?process.env.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&process.env.REACT_APP_SC_DISABLE_SPEEDY:typeof process<"u"&&process.env!==void 0&&process.env.SC_DISABLE_SPEEDY!==void 0&&process.env.SC_DISABLE_SPEEDY!==""?process.env.SC_DISABLE_SPEEDY!=="false"&&process.env.SC_DISABLE_SPEEDY:process.env.NODE_ENV!=="production"),El=/invalid hook call/i,_s=new Set,up=function(n,e){if(process.env.NODE_ENV!=="production"){if(wr)return;var t=e?' with the id of "'.concat(e,'"'):"",r="The component ".concat(n).concat(t,` has been created dynamically.
8
- `)+`You may see this warning because you've called styled inside another component.
9
- To resolve this only create new StyledComponents outside of any render method and function component.
10
- See https://styled-components.com/docs/basics#define-styled-components-outside-of-the-render-method for more info.
11
- `,s=console.error;try{var i=!0;console.error=function(o){for(var a=[],u=1;u<arguments.length;u++)a[u-1]=arguments[u];El.test(o)?(i=!1,_s.delete(r)):s.apply(void 0,Te.__spreadArray([o],a,!1))},typeof C.default.useState=="function"&&C.default.useState(null),i&&!_s.has(r)&&(console.warn(r),_s.add(r))}catch(o){El.test(o.message)&&_s.delete(r)}finally{console.error=s}}},pi=Object.freeze([]),sn=Object.freeze({});function cp(n,e,t){return t===void 0&&(t=sn),n.theme!==t.theme&&n.theme||e||t.theme}var Xo=new Set(["a","abbr","address","area","article","aside","audio","b","bdi","bdo","blockquote","body","button","br","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","map","mark","menu","meter","nav","object","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","slot","small","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","switch","symbol","text","textPath","tspan","use"]),hp=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,dp=/(^-|-$)/g;function wl(n){return n.replace(hp,"-").replace(dp,"")}var fp=/(a)(d)/gi,xl=function(n){return String.fromCharCode(n+(n>25?39:97))};function Qo(n){var e,t="";for(e=Math.abs(n);e>52;e=e/52|0)t=xl(e%52)+t;return(xl(e%52)+t).replace(fp,"$1-$2")}var So,gr=function(n,e){for(var t=e.length;t;)n=33*n^e.charCodeAt(--t);return n},Cc=function(n){return gr(5381,n)};function pp(n){return Qo(Cc(n)>>>0)}function Tc(n){return process.env.NODE_ENV!=="production"&&typeof n=="string"&&n||n.displayName||n.name||"Component"}function _o(n){return typeof n=="string"&&(process.env.NODE_ENV==="production"||n.charAt(0)===n.charAt(0).toLowerCase())}var kc=typeof Symbol=="function"&&Symbol.for,Nc=kc?Symbol.for("react.memo"):60115,gp=kc?Symbol.for("react.forward_ref"):60112,mp={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},vp={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Ic={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},yp=((So={})[gp]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},So[Nc]=Ic,So);function Sl(n){return("type"in(e=n)&&e.type.$$typeof)===Nc?Ic:"$$typeof"in n?yp[n.$$typeof]:mp;var e}var bp=Object.defineProperty,Ep=Object.getOwnPropertyNames,_l=Object.getOwnPropertySymbols,wp=Object.getOwnPropertyDescriptor,xp=Object.getPrototypeOf,Al=Object.prototype;function Rc(n,e,t){if(typeof e!="string"){if(Al){var r=xp(e);r&&r!==Al&&Rc(n,r,t)}var s=Ep(e);_l&&(s=s.concat(_l(e)));for(var i=Sl(n),o=Sl(e),a=0;a<s.length;++a){var u=s[a];if(!(u in vp||t&&t[u]||o&&u in o||i&&u in i)){var c=wp(e,u);try{bp(n,u,c)}catch{}}}}return n}function on(n){return typeof n=="function"}function Fa(n){return typeof n=="object"&&"styledComponentId"in n}function mr(n,e){return n&&e?"".concat(n," ").concat(e):n||e||""}function Cl(n,e){if(n.length===0)return"";for(var t=n[0],r=1;r<n.length;r++)t+=n[r];return t}function an(n){return n!==null&&typeof n=="object"&&n.constructor.name===Object.name&&!("props"in n&&n.$$typeof)}function Jo(n,e,t){if(t===void 0&&(t=!1),!t&&!an(n)&&!Array.isArray(n))return e;if(Array.isArray(e))for(var r=0;r<e.length;r++)n[r]=Jo(n[r],e[r]);else if(an(e))for(var r in e)n[r]=Jo(n[r],e[r]);return n}function ja(n,e){Object.defineProperty(n,"toString",{value:e})}var Sp=process.env.NODE_ENV!=="production"?{1:`Cannot create styled-component for component: %s.
12
-
13
- `,2:`Can't collect styles once you've consumed a \`ServerStyleSheet\`'s styles! \`ServerStyleSheet\` is a one off instance for each server-side render cycle.
14
-
15
- - Are you trying to reuse it across renders?
16
- - Are you accidentally calling collectStyles twice?
17
-
18
- `,3:`Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.
19
-
20
- `,4:`The \`StyleSheetManager\` expects a valid target or sheet prop!
21
-
22
- - Does this error occur on the client and is your target falsy?
23
- - Does this error occur on the server and is the sheet falsy?
24
-
25
- `,5:`The clone method cannot be used on the client!
26
-
27
- - Are you running in a client-like environment on the server?
28
- - Are you trying to run SSR on the client?
29
-
30
- `,6:`Trying to insert a new style tag, but the given Node is unmounted!
31
-
32
- - Are you using a custom target that isn't mounted?
33
- - Does your document not have a valid head element?
34
- - Have you accidentally removed a style tag manually?
35
-
36
- `,7:'ThemeProvider: Please return an object from your "theme" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n',8:`ThemeProvider: Please make your "theme" prop an object.
37
-
38
- `,9:"Missing document `<head>`\n\n",10:`Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021
39
-
40
- `,11:`_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.
41
-
42
- `,12:"It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\n\n",13:`%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.
43
-
44
- `,14:`ThemeProvider: "theme" prop is required.
45
-
46
- `,15:"A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\n\n```js\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\n```\n\n",16:`Reached the limit of how many styled components may be created at group %s.
47
- You may only create up to 1,073,741,824 components. If you're creating components dynamically,
48
- as for instance in your render method then you may be running into this limitation.
49
-
50
- `,17:`CSSStyleSheet could not be found on HTMLStyleElement.
51
- Has styled-components' style tag been unmounted or altered by another script?
52
- `,18:"ThemeProvider: Please make sure your useTheme hook is within a `<ThemeProvider>`"}:{};function _p(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];for(var t=n[0],r=[],s=1,i=n.length;s<i;s+=1)r.push(n[s]);return r.forEach(function(o){t=t.replace(/%[a-z]/,o)}),t}function pn(n){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return process.env.NODE_ENV==="production"?new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(n," for more information.").concat(e.length>0?" Args: ".concat(e.join(", ")):"")):new Error(_p.apply(void 0,Te.__spreadArray([Sp[n]],e,!1)).trim())}var Ap=(function(){function n(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return n.prototype.indexOfGroup=function(e){for(var t=0,r=0;r<e;r++)t+=this.groupSizes[r];return t},n.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var r=this.groupSizes,s=r.length,i=s;e>=i;)if((i<<=1)<0)throw pn(16,"".concat(e));this.groupSizes=new Uint32Array(i),this.groupSizes.set(r),this.length=i;for(var o=s;o<i;o++)this.groupSizes[o]=0}for(var a=this.indexOfGroup(e+1),u=(o=0,t.length);o<u;o++)this.tag.insertRule(a,t[o])&&(this.groupSizes[e]++,a++)},n.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],r=this.indexOfGroup(e),s=r+t;this.groupSizes[e]=0;for(var i=r;i<s;i++)this.tag.deleteRule(r)}},n.prototype.getGroup=function(e){var t="";if(e>=this.length||this.groupSizes[e]===0)return t;for(var r=this.groupSizes[e],s=this.indexOfGroup(e),i=s+r,o=s;o<i;o++)t+="".concat(this.tag.getRule(o)).concat(qa);return t},n})(),Cp=1<<30,$s=new Map,Qs=new Map,Vs=1,Dn=function(n){if($s.has(n))return $s.get(n);for(;Qs.has(Vs);)Vs++;var e=Vs++;if(process.env.NODE_ENV!=="production"&&((0|e)<0||e>Cp))throw pn(16,"".concat(e));return $s.set(n,e),Qs.set(e,n),e},Tp=function(n,e){Vs=e+1,$s.set(n,e),Qs.set(e,n)},kp="style[".concat(Er,"][").concat(Ac,'="').concat(fi,'"]'),Np=new RegExp("^".concat(Er,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),Ip=function(n,e,t){for(var r,s=t.split(","),i=0,o=s.length;i<o;i++)(r=s[i])&&n.registerName(e,r)},Rp=function(n,e){for(var t,r=((t=e.textContent)!==null&&t!==void 0?t:"").split(qa),s=[],i=0,o=r.length;i<o;i++){var a=r[i].trim();if(a){var u=a.match(Np);if(u){var c=0|parseInt(u[1],10),h=u[2];c!==0&&(Tp(h,c),Ip(n,h,u[3]),n.getTag().insertRules(c,s)),s.length=0}else s.push(a)}}},Tl=function(n){for(var e=document.querySelectorAll(kp),t=0,r=e.length;t<r;t++){var s=e[t];s&&s.getAttribute(Er)!==_c&&(Rp(n,s),s.parentNode&&s.parentNode.removeChild(s))}};function Op(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:null}var Oc=function(n){var e=document.head,t=n||e,r=document.createElement("style"),s=(function(a){var u=Array.from(a.querySelectorAll("style[".concat(Er,"]")));return u[u.length-1]})(t),i=s!==void 0?s.nextSibling:null;r.setAttribute(Er,_c),r.setAttribute(Ac,fi);var o=Op();return o&&r.setAttribute("nonce",o),t.insertBefore(r,i),r},Lp=(function(){function n(e){this.element=Oc(e),this.element.appendChild(document.createTextNode("")),this.sheet=(function(t){if(t.sheet)return t.sheet;for(var r=document.styleSheets,s=0,i=r.length;s<i;s++){var o=r[s];if(o.ownerNode===t)return o}throw pn(17)})(this.element),this.length=0}return n.prototype.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch{return!1}},n.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},n.prototype.getRule=function(e){var t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""},n})(),Mp=(function(){function n(e){this.element=Oc(e),this.nodes=this.element.childNodes,this.length=0}return n.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var r=document.createTextNode(t);return this.element.insertBefore(r,this.nodes[e]||null),this.length++,!0}return!1},n.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},n.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},n})(),Dp=(function(){function n(e){this.rules=[],this.length=0}return n.prototype.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},n.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--},n.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},n})(),kl=Xs,Pp={isServer:!Xs,useCSSOMInjection:!lp},Lc=(function(){function n(e,t,r){e===void 0&&(e=sn),t===void 0&&(t={});var s=this;this.options=Te.__assign(Te.__assign({},Pp),e),this.gs=t,this.names=new Map(r),this.server=!!e.isServer,!this.server&&Xs&&kl&&(kl=!1,Tl(this)),ja(this,function(){return(function(i){for(var o=i.getTag(),a=o.length,u="",c=function(g){var d=(function(E){return Qs.get(E)})(g);if(d===void 0)return"continue";var m=i.names.get(d),v=o.getGroup(g);if(m===void 0||!m.size||v.length===0)return"continue";var p="".concat(Er,".g").concat(g,'[id="').concat(d,'"]'),y="";m!==void 0&&m.forEach(function(E){E.length>0&&(y+="".concat(E,","))}),u+="".concat(v).concat(p,'{content:"').concat(y,'"}').concat(qa)},h=0;h<a;h++)c(h);return u})(s)})}return n.registerId=function(e){return Dn(e)},n.prototype.rehydrate=function(){!this.server&&Xs&&Tl(this)},n.prototype.reconstructWithOptions=function(e,t){return t===void 0&&(t=!0),new n(Te.__assign(Te.__assign({},this.options),e),this.gs,t&&this.names||void 0)},n.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},n.prototype.getTag=function(){return this.tag||(this.tag=(e=(function(t){var r=t.useCSSOMInjection,s=t.target;return t.isServer?new Dp(s):r?new Lp(s):new Mp(s)})(this.options),new Ap(e)));var e},n.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},n.prototype.registerName=function(e,t){if(Dn(e),this.names.has(e))this.names.get(e).add(t);else{var r=new Set;r.add(t),this.names.set(e,r)}},n.prototype.insertRules=function(e,t,r){this.registerName(e,t),this.getTag().insertRules(Dn(e),r)},n.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},n.prototype.clearRules=function(e){this.getTag().clearGroup(Dn(e)),this.clearNames(e)},n.prototype.clearTag=function(){this.tag=void 0},n})(),Bp=/&/g,Qr=47;function Nl(n){if(n.indexOf("}")===-1)return!1;for(var e=n.length,t=0,r=0,s=!1,i=0;i<e;i++){var o=n.charCodeAt(i);if(r!==0||s||o!==Qr||n.charCodeAt(i+1)!==42)if(s)o===42&&n.charCodeAt(i+1)===Qr&&(s=!1,i++);else if(o!==34&&o!==39||i!==0&&n.charCodeAt(i-1)===92){if(r===0){if(o===123)t++;else if(o===125&&--t<0)return!0}}else r===0?r=o:r===o&&(r=0);else s=!0,i++}return t!==0||r!==0}function Mc(n,e){return n.map(function(t){return t.type==="rule"&&(t.value="".concat(e," ").concat(t.value),t.value=t.value.replaceAll(",",",".concat(e," ")),t.props=t.props.map(function(r){return"".concat(e," ").concat(r)})),Array.isArray(t.children)&&t.type!=="@keyframes"&&(t.children=Mc(t.children,e)),t})}function qp(n){var e,t,r,s=sn,i=s.options,o=i===void 0?sn:i,a=s.plugins,u=a===void 0?pi:a,c=function(d,m,v){return v.startsWith(t)&&v.endsWith(t)&&v.replaceAll(t,"").length>0?".".concat(e):d},h=u.slice();h.push(function(d){d.type===ui&&d.value.includes("&")&&(d.props[0]=d.props[0].replace(Bp,t).replace(r,c))}),o.prefix&&h.push(ap),h.push(sp);var g=function(d,m,v,p){m===void 0&&(m=""),v===void 0&&(v=""),p===void 0&&(p="&"),e=p,t=m,r=new RegExp("\\".concat(t,"\\b"),"g");var y=(function(x){if(!Nl(x))return x;for(var N=x.length,_="",P=0,I=0,te=0,ue=!1,ie=0;ie<N;ie++){var b=x.charCodeAt(ie);if(te!==0||ue||b!==Qr||x.charCodeAt(ie+1)!==42)if(ue)b===42&&x.charCodeAt(ie+1)===Qr&&(ue=!1,ie++);else if(b!==34&&b!==39||ie!==0&&x.charCodeAt(ie-1)===92){if(te===0)if(b===123)I++;else if(b===125){if(--I<0){for(var M=ie+1;M<N;){var A=x.charCodeAt(M);if(A===59||A===10)break;M++}M<N&&x.charCodeAt(M)===59&&M++,I=0,ie=M-1,P=M;continue}I===0&&(_+=x.substring(P,ie+1),P=ie+1)}else b===59&&I===0&&(_+=x.substring(P,ie+1),P=ie+1)}else te===0?te=b:te===b&&(te=0);else ue=!0,ie++}if(P<N){var $=x.substring(P);Nl($)||(_+=$)}return _})((function(x){if(x.indexOf("//")===-1)return x;for(var N=x.length,_=[],P=0,I=0,te=0,ue=0;I<N;){var ie=x.charCodeAt(I);if(ie!==34&&ie!==39||I!==0&&x.charCodeAt(I-1)===92)if(te===0)if(ie===40&&I>=3&&(32|x.charCodeAt(I-1))==108&&(32|x.charCodeAt(I-2))==114&&(32|x.charCodeAt(I-3))==117)ue=1,I++;else if(ue>0)ie===41?ue--:ie===40&&ue++,I++;else if(ie===Qr&&I+1<N&&x.charCodeAt(I+1)===Qr){for(I>P&&_.push(x.substring(P,I));I<N&&x.charCodeAt(I)!==10;)I++;P=I}else I++;else I++;else te===0?te=ie:te===ie&&(te=0),I++}return P===0?x:(P<N&&_.push(x.substring(P)),_.join(""))})(d)),E=rp(v||m?"".concat(v," ").concat(m," { ").concat(y," }"):y);o.namespace&&(E=Mc(E,o.namespace));var S=[];return Zs(E,ip(h.concat(op(function(x){return S.push(x)})))),S};return g.hash=u.length?u.reduce(function(d,m){return m.name||pn(15),gr(d,m.name)},5381).toString():"",g}var Fp=new Lc,ea=qp(),ta={shouldForwardProp:void 0,styleSheet:Fp,stylis:ea},Dc=wr?{Provider:function(n){return n.children},Consumer:function(n){return(0,n.children)(ta)}}:C.default.createContext(ta);Dc.Consumer;wr||C.default.createContext(void 0);function Il(){return wr?ta:C.default.useContext(Dc)}var Rl=(function(){function n(e,t){var r=this;this.inject=function(s,i){i===void 0&&(i=ea);var o=r.name+i.hash;s.hasNameForId(r.id,o)||s.insertRules(r.id,o,i(r.rules,o,"@keyframes"))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t,ja(this,function(){throw pn(12,String(r.name))})}return n.prototype.getName=function(e){return e===void 0&&(e=ea),this.name+e.hash},n})();function jp(n,e){return e==null||typeof e=="boolean"||e===""?"":typeof e!="number"||e===0||n in Jr.unitlessKeys||n.startsWith("--")?String(e).trim():"".concat(e,"px")}var $p=function(n){return n>="A"&&n<="Z"};function Ol(n){for(var e="",t=0;t<n.length;t++){var r=n[t];if(t===1&&r==="-"&&n[0]==="-")return n;$p(r)?e+="-"+r.toLowerCase():e+=r}return e.startsWith("ms-")?"-"+e:e}var Pc=function(n){return n==null||n===!1||n===""},Bc=function(n){var e=[];for(var t in n){var r=n[t];n.hasOwnProperty(t)&&!Pc(r)&&(Array.isArray(r)&&r.isCss||on(r)?e.push("".concat(Ol(t),":"),r,";"):an(r)?e.push.apply(e,Te.__spreadArray(Te.__spreadArray(["".concat(t," {")],Bc(r),!1),["}"],!1)):e.push("".concat(Ol(t),": ").concat(jp(t,r),";")))}return e};function yr(n,e,t,r){if(Pc(n))return[];if(Fa(n))return[".".concat(n.styledComponentId)];if(on(n)){if(!on(i=n)||i.prototype&&i.prototype.isReactComponent||!e)return[n];var s=n(e);return process.env.NODE_ENV==="production"||typeof s!="object"||Array.isArray(s)||s instanceof Rl||an(s)||s===null||console.error("".concat(Tc(n)," is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.")),yr(s,e,t,r)}var i;return n instanceof Rl?t?(n.inject(t,r),[n.getName(r)]):[n]:an(n)?Bc(n):Array.isArray(n)?Array.prototype.concat.apply(pi,n.map(function(o){return yr(o,e,t,r)})):[n.toString()]}function Vp(n){for(var e=0;e<n.length;e+=1){var t=n[e];if(on(t)&&!Fa(t))return!1}return!0}var Up=Cc(fi),Hp=(function(){function n(e,t,r){this.rules=e,this.staticRulesId="",this.isStatic=process.env.NODE_ENV==="production"&&(r===void 0||r.isStatic)&&Vp(e),this.componentId=t,this.baseHash=gr(Up,t),this.baseStyle=r,Lc.registerId(t)}return n.prototype.generateAndInjectStyles=function(e,t,r){var s=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,r).className:"";if(this.isStatic&&!r.hash)if(this.staticRulesId&&t.hasNameForId(this.componentId,this.staticRulesId))s=mr(s,this.staticRulesId);else{var i=Cl(yr(this.rules,e,t,r)),o=Qo(gr(this.baseHash,i)>>>0);if(!t.hasNameForId(this.componentId,o)){var a=r(i,".".concat(o),void 0,this.componentId);t.insertRules(this.componentId,o,a)}s=mr(s,o),this.staticRulesId=o}else{for(var u=gr(this.baseHash,r.hash),c="",h=0;h<this.rules.length;h++){var g=this.rules[h];if(typeof g=="string")c+=g,process.env.NODE_ENV!=="production"&&(u=gr(u,g));else if(g){var d=Cl(yr(g,e,t,r));u=gr(u,d+h),c+=d}}if(c){var m=Qo(u>>>0);if(!t.hasNameForId(this.componentId,m)){var v=r(c,".".concat(m),void 0,this.componentId);t.insertRules(this.componentId,m,v)}s=mr(s,m)}}return{className:s,css:typeof window>"u"?t.getTag().getGroup(Dn(this.componentId)):""}},n})(),qc=wr?{Provider:function(n){return n.children},Consumer:function(n){return(0,n.children)(void 0)}}:C.default.createContext(void 0);qc.Consumer;var Ao={},Ll=new Set;function zp(n,e,t){var r=Fa(n),s=n,i=!_o(n),o=e.attrs,a=o===void 0?pi:o,u=e.componentId,c=u===void 0?(function(N,_){var P=typeof N!="string"?"sc":wl(N);Ao[P]=(Ao[P]||0)+1;var I="".concat(P,"-").concat(pp(fi+P+Ao[P]));return _?"".concat(_,"-").concat(I):I})(e.displayName,e.parentComponentId):u,h=e.displayName,g=h===void 0?(function(N){return _o(N)?"styled.".concat(N):"Styled(".concat(Tc(N),")")})(n):h,d=e.displayName&&e.componentId?"".concat(wl(e.displayName),"-").concat(e.componentId):e.componentId||c,m=r&&s.attrs?s.attrs.concat(a).filter(Boolean):a,v=e.shouldForwardProp;if(r&&s.shouldForwardProp){var p=s.shouldForwardProp;if(e.shouldForwardProp){var y=e.shouldForwardProp;v=function(N,_){return p(N,_)&&y(N,_)}}else v=p}var E=new Hp(t,d,r?s.componentStyle:void 0);function S(N,_){return(function(P,I,te){var ue=P.attrs,ie=P.componentStyle,b=P.defaultProps,M=P.foldedComponentIds,A=P.styledComponentId,$=P.target,V=wr?void 0:C.default.useContext(qc),R=Il(),q=P.shouldForwardProp||R.shouldForwardProp;process.env.NODE_ENV!=="production"&&C.default.useDebugValue&&C.default.useDebugValue(A);var W=cp(I,V,b)||sn,Y=(function(j,Z,G){for(var X,k=Te.__assign(Te.__assign({},Z),{className:void 0,theme:G}),ce=0;ce<j.length;ce+=1){var ge=on(X=j[ce])?X(k):X;for(var be in ge)be==="className"?k.className=mr(k.className,ge[be]):be==="style"?k.style=Te.__assign(Te.__assign({},k.style),ge[be]):k[be]=ge[be]}return"className"in Z&&typeof Z.className=="string"&&(k.className=mr(k.className,Z.className)),k})(ue,I,W),T=Y.as||$,D={};for(var U in Y)Y[U]===void 0||U[0]==="$"||U==="as"||U==="theme"&&Y.theme===W||(U==="forwardedAs"?D.as=Y.forwardedAs:q&&!q(U,T)||(D[U]=Y[U],q||process.env.NODE_ENV!=="development"||Vf(U)||Ll.has(U)||!Xo.has(T)||(Ll.add(U),console.warn('styled-components: it looks like an unknown prop "'.concat(U,'" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via `<StyleSheetManager shouldForwardProp={...}>` (connect an API like `@emotion/is-prop-valid`) or consider using transient props (`$` prefix for automatic filtering.)')))));var K=(function(j,Z){var G=Il(),X=j.generateAndInjectStyles(Z,G.styleSheet,G.stylis);return process.env.NODE_ENV!=="production"&&C.default.useDebugValue&&C.default.useDebugValue(X.className),X})(ie,Y),z=K.className,H=K.css;process.env.NODE_ENV!=="production"&&P.warnTooManyClasses&&P.warnTooManyClasses(z);var Q=mr(M,A);z&&(Q+=" "+z),Y.className&&(Q+=" "+Y.className),D[_o(T)&&!Xo.has(T)?"class":"className"]=Q,te&&(D.ref=te);var F=Ke.createElement(T,D);return wr&&H?C.default.createElement(C.default.Fragment,null,C.default.createElement("style",{precedence:"styled-components",href:"sc-".concat(A,"-").concat(z),children:H}),F):F})(x,N,_)}S.displayName=g;var x=C.default.forwardRef(S);return x.attrs=m,x.componentStyle=E,x.displayName=g,x.shouldForwardProp=v,x.foldedComponentIds=r?mr(s.foldedComponentIds,s.styledComponentId):"",x.styledComponentId=d,x.target=r?s.target:n,Object.defineProperty(x,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(N){this._foldedDefaultProps=r?(function(_){for(var P=[],I=1;I<arguments.length;I++)P[I-1]=arguments[I];for(var te=0,ue=P;te<ue.length;te++)Jo(_,ue[te],!0);return _})({},s.defaultProps,N):N}}),process.env.NODE_ENV!=="production"&&(up(g,d),x.warnTooManyClasses=(function(N,_){var P={},I=!1;return function(te){if(!I&&(P[te]=!0,Object.keys(P).length>=200)){var ue=_?' with the id of "'.concat(_,'"'):"";console.warn("Over ".concat(200," classes were generated for component ").concat(N).concat(ue,`.
53
- `)+`Consider using the attrs method, together with a style object for frequently changed styles.
54
- Example:
55
- const Component = styled.div.attrs(props => ({
56
- style: {
57
- background: props.background,
58
- },
59
- }))\`width: 100%;\`
60
-
61
- <Component />`),I=!0,P={}}}})(g,d)),ja(x,function(){return".".concat(x.styledComponentId)}),i&&Rc(x,n,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),x}function Ml(n,e){for(var t=[n[0]],r=0,s=e.length;r<s;r+=1)t.push(e[r],n[r+1]);return t}var Dl=function(n){return Object.assign(n,{isCss:!0})};function Gp(n){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];if(on(n)||an(n))return Dl(yr(Ml(pi,Te.__spreadArray([n],e,!0))));var r=n;return e.length===0&&r.length===1&&typeof r[0]=="string"?yr(r):Dl(yr(Ml(r,e)))}function ra(n,e,t){if(t===void 0&&(t=sn),!e)throw pn(1,e);var r=function(s){for(var i=[],o=1;o<arguments.length;o++)i[o-1]=arguments[o];return n(e,t,Gp.apply(void 0,Te.__spreadArray([s],i,!1)))};return r.attrs=function(s){return ra(n,e,Te.__assign(Te.__assign({},t),{attrs:Array.prototype.concat(t.attrs,s).filter(Boolean)}))},r.withConfig=function(s){return ra(n,e,Te.__assign(Te.__assign({},t),s))},r}var Fc=function(n){return ra(zp,n)},$a=Fc;Xo.forEach(function(n){$a[n]=Fc(n)});process.env.NODE_ENV!=="production"&&typeof navigator<"u"&&navigator.product==="ReactNative"&&console.warn(`It looks like you've imported 'styled-components' on React Native.
62
- Perhaps you're looking to import 'styled-components/native'?
63
- Read more about this at https://www.styled-components.com/docs/basics#react-native`);var As="__sc-".concat(Er,"__");process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&typeof window<"u"&&(window[As]||(window[As]=0),window[As]===1&&console.warn(`It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.
64
-
65
- See https://styled-components.com/docs/faqs#why-am-i-getting-a-warning-about-several-instances-of-module-on-the-page for more info.`),window[As]+=1);const Kp=$a.div`
66
- .filepond {
67
- &--drop-label {
68
- label {
69
- color: ${({$invalid:n})=>n?"var(--color-item-primary-destructive)":"inherit"} !important;
70
- }
71
- }
72
-
73
- &--root {
74
- margin-bottom: 0.5rem;
75
- border-radius: 0.75rem;
76
- }
77
-
78
- &--panel {
79
- border-radius: 0.8rem;
80
- overflow: hidden;
81
-
82
- &-root {
83
- background-color: transparent;
84
- }
85
- }
86
-
87
- &--drip {
88
- border: 1px solid
89
- ${({$invalid:n})=>n?"var(--color-item-primary-destructive)":"var(--color-border-alpha-strong)"};
90
- background-color: transparent;
91
- opacity: 1;
92
- outline-offset: 2px;
93
- border-radius: 0.75rem;
94
- }
95
- }
96
-
97
- &:focus-within {
98
- .filepond {
99
- &--drip {
100
- outline: 2px solid
101
- ${({$invalid:n})=>n?"var(--color-item-primary-destructive)":"var(--color-item-primary-primary)"};
102
- }
103
- }
104
- }
105
- `;function jc({variant:n="default",...e}){return O.jsx(Kp,{$invalid:n==="failure",...e})}jc.displayName="FilepondContainer";var Wp=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Yp=Wp.reduce((n,e)=>{const t=nc.createSlot(`Primitive.${e}`),r=C.forwardRef((s,i)=>{const{asChild:o,...a}=s,u=o?t:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),O.jsx(u,{...a,ref:i})});return r.displayName=`Primitive.${e}`,{...n,[e]:r}},{}),Zp="Label",$c=C.forwardRef((n,e)=>O.jsx(Yp.label,{...n,ref:e,onMouseDown:t=>{var s;t.target.closest("button, input, select, textarea")||((s=n.onMouseDown)==null||s.call(n,t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));$c.displayName=Zp;var Vc=$c;const Xp=La.cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Va=C.forwardRef(({className:n,...e},t)=>O.jsx(Vc,{ref:t,className:Ce.cn(Xp(),n),...e}));Va.displayName=Vc.displayName;const Qp=Oa.FormProvider,Uc=C.createContext({}),Jp=({...n})=>O.jsx(Uc.Provider,{value:{name:n.name},children:O.jsx(Oa.Controller,{...n})}),es=()=>{const n=C.useContext(Uc),e=C.useContext(Hc),{getFieldState:t,formState:r}=Oa.useFormContext(),s=t(n.name,r);if(!n)throw new Error("useFormField should be used within <FormField>");const{id:i}=e;return{id:i,name:n.name,formItemId:`${i}-form-item`,formDescriptionId:`${i}-form-item-description`,formMessageId:`${i}-form-item-message`,...s}},Hc=C.createContext({}),zc=C.forwardRef(({className:n,...e},t)=>{const r=C.useId();return O.jsx(Hc.Provider,{value:{id:r},children:O.jsx("div",{ref:t,className:Ce.cn("relative space-y-3",n),...e})})});zc.displayName="FormItem";const Gc=C.forwardRef(({className:n,...e},t)=>{const{error:r,formItemId:s}=es();return O.jsx(Va,{ref:t,className:Ce.cn("!text-body-xs-medium",n,r&&"text-destructive"),htmlFor:s,...e})});Gc.displayName="FormLabel";const Kc=C.forwardRef(({...n},e)=>{const{error:t,formItemId:r,formDescriptionId:s,formMessageId:i}=es();return O.jsx(nc.Slot,{ref:e,id:r,"aria-describedby":t?`${s} ${i}`:`${s}`,"aria-invalid":!!t,...n})});Kc.displayName="FormControl";const Wc=C.forwardRef(({className:n,...e},t)=>{const{formDescriptionId:r}=es();return O.jsx("p",{ref:t,id:r,className:Ce.cn("text-muted-foreground text-sm",n),...e})});Wc.displayName="FormDescription";const Yc=C.forwardRef(({className:n,children:e,...t},r)=>{const{error:s,formMessageId:i}=es(),o=s?String(s==null?void 0:s.message):e;return o?O.jsx("p",{ref:r,id:i,className:Ce.cn("!text-body-xs-medium text-destructive",n),...t,children:o}):null});Yc.displayName="FormMessage";var Zc=typeof global=="object"&&global&&global.Object===Object&&global,eg=typeof self=="object"&&self&&self.Object===Object&&self,Tt=Zc||eg||Function("return this")(),nr=Tt.Symbol,Xc=Object.prototype,tg=Xc.hasOwnProperty,rg=Xc.toString,On=nr?nr.toStringTag:void 0;function ng(n){var e=tg.call(n,On),t=n[On];try{n[On]=void 0;var r=!0}catch{}var s=rg.call(n);return r&&(e?n[On]=t:delete n[On]),s}var sg=Object.prototype,ig=sg.toString;function og(n){return ig.call(n)}var ag="[object Null]",lg="[object Undefined]",Pl=nr?nr.toStringTag:void 0;function gn(n){return n==null?n===void 0?lg:ag:Pl&&Pl in Object(n)?ng(n):og(n)}function Pt(n){return n!=null&&typeof n=="object"}var xr=Array.isArray;function sr(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}function Qc(n){return n}var ug="[object AsyncFunction]",cg="[object Function]",hg="[object GeneratorFunction]",dg="[object Proxy]";function Ua(n){if(!sr(n))return!1;var e=gn(n);return e==cg||e==hg||e==ug||e==dg}var Co=Tt["__core-js_shared__"],Bl=(function(){var n=/[^.]+$/.exec(Co&&Co.keys&&Co.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""})();function fg(n){return!!Bl&&Bl in n}var pg=Function.prototype,gg=pg.toString;function Tr(n){if(n!=null){try{return gg.call(n)}catch{}try{return n+""}catch{}}return""}var mg=/[\\^$.*+?()[\]{}|]/g,vg=/^\[object .+?Constructor\]$/,yg=Function.prototype,bg=Object.prototype,Eg=yg.toString,wg=bg.hasOwnProperty,xg=RegExp("^"+Eg.call(wg).replace(mg,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Sg(n){if(!sr(n)||fg(n))return!1;var e=Ua(n)?xg:vg;return e.test(Tr(n))}function _g(n,e){return n==null?void 0:n[e]}function kr(n,e){var t=_g(n,e);return Sg(t)?t:void 0}var na=kr(Tt,"WeakMap"),ql=Object.create,Ag=(function(){function n(){}return function(e){if(!sr(e))return{};if(ql)return ql(e);n.prototype=e;var t=new n;return n.prototype=void 0,t}})();function Cg(n,e,t){switch(t.length){case 0:return n.call(e);case 1:return n.call(e,t[0]);case 2:return n.call(e,t[0],t[1]);case 3:return n.call(e,t[0],t[1],t[2])}return n.apply(e,t)}function Tg(n,e){var t=-1,r=n.length;for(e||(e=Array(r));++t<r;)e[t]=n[t];return e}var kg=800,Ng=16,Ig=Date.now;function Rg(n){var e=0,t=0;return function(){var r=Ig(),s=Ng-(r-t);if(t=r,s>0){if(++e>=kg)return arguments[0]}else e=0;return n.apply(void 0,arguments)}}function Og(n){return function(){return n}}var Js=(function(){try{var n=kr(Object,"defineProperty");return n({},"",{}),n}catch{}})(),Lg=Js?function(n,e){return Js(n,"toString",{configurable:!0,enumerable:!1,value:Og(e),writable:!0})}:Qc,Mg=Rg(Lg);function Dg(n,e){for(var t=-1,r=n==null?0:n.length;++t<r&&e(n[t],t,n)!==!1;);return n}var Pg=9007199254740991,Bg=/^(?:0|[1-9]\d*)$/;function Jc(n,e){var t=typeof n;return e=e??Pg,!!e&&(t=="number"||t!="symbol"&&Bg.test(n))&&n>-1&&n%1==0&&n<e}function Ha(n,e,t){e=="__proto__"&&Js?Js(n,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):n[e]=t}function ts(n,e){return n===e||n!==n&&e!==e}var qg=Object.prototype,Fg=qg.hasOwnProperty;function eh(n,e,t){var r=n[e];(!(Fg.call(n,e)&&ts(r,t))||t===void 0&&!(e in n))&&Ha(n,e,t)}function jg(n,e,t,r){var s=!t;t||(t={});for(var i=-1,o=e.length;++i<o;){var a=e[i],u=void 0;u===void 0&&(u=n[a]),s?Ha(t,a,u):eh(t,a,u)}return t}var Fl=Math.max;function $g(n,e,t){return e=Fl(e===void 0?n.length-1:e,0),function(){for(var r=arguments,s=-1,i=Fl(r.length-e,0),o=Array(i);++s<i;)o[s]=r[e+s];s=-1;for(var a=Array(e+1);++s<e;)a[s]=r[s];return a[e]=t(o),Cg(n,this,a)}}function Vg(n,e){return Mg($g(n,e,Qc),n+"")}var Ug=9007199254740991;function th(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=Ug}function gi(n){return n!=null&&th(n.length)&&!Ua(n)}function Hg(n,e,t){if(!sr(t))return!1;var r=typeof e;return(r=="number"?gi(t)&&Jc(e,t.length):r=="string"&&e in t)?ts(t[e],n):!1}function zg(n){return Vg(function(e,t){var r=-1,s=t.length,i=s>1?t[s-1]:void 0,o=s>2?t[2]:void 0;for(i=n.length>3&&typeof i=="function"?(s--,i):void 0,o&&Hg(t[0],t[1],o)&&(i=s<3?void 0:i,s=1),e=Object(e);++r<s;){var a=t[r];a&&n(e,a,r,i)}return e})}var Gg=Object.prototype;function za(n){var e=n&&n.constructor,t=typeof e=="function"&&e.prototype||Gg;return n===t}function Kg(n,e){for(var t=-1,r=Array(n);++t<n;)r[t]=e(t);return r}var Wg="[object Arguments]";function jl(n){return Pt(n)&&gn(n)==Wg}var rh=Object.prototype,Yg=rh.hasOwnProperty,Zg=rh.propertyIsEnumerable,sa=jl((function(){return arguments})())?jl:function(n){return Pt(n)&&Yg.call(n,"callee")&&!Zg.call(n,"callee")};function Xg(){return!1}var nh=typeof exports=="object"&&exports&&!exports.nodeType&&exports,$l=nh&&typeof module=="object"&&module&&!module.nodeType&&module,Qg=$l&&$l.exports===nh,Vl=Qg?Tt.Buffer:void 0,Jg=Vl?Vl.isBuffer:void 0,Gn=Jg||Xg,em="[object Arguments]",tm="[object Array]",rm="[object Boolean]",nm="[object Date]",sm="[object Error]",im="[object Function]",om="[object Map]",am="[object Number]",lm="[object Object]",um="[object RegExp]",cm="[object Set]",hm="[object String]",dm="[object WeakMap]",fm="[object ArrayBuffer]",pm="[object DataView]",gm="[object Float32Array]",mm="[object Float64Array]",vm="[object Int8Array]",ym="[object Int16Array]",bm="[object Int32Array]",Em="[object Uint8Array]",wm="[object Uint8ClampedArray]",xm="[object Uint16Array]",Sm="[object Uint32Array]",Ae={};Ae[gm]=Ae[mm]=Ae[vm]=Ae[ym]=Ae[bm]=Ae[Em]=Ae[wm]=Ae[xm]=Ae[Sm]=!0;Ae[em]=Ae[tm]=Ae[fm]=Ae[rm]=Ae[pm]=Ae[nm]=Ae[sm]=Ae[im]=Ae[om]=Ae[am]=Ae[lm]=Ae[um]=Ae[cm]=Ae[hm]=Ae[dm]=!1;function _m(n){return Pt(n)&&th(n.length)&&!!Ae[gn(n)]}function Ga(n){return function(e){return n(e)}}var sh=typeof exports=="object"&&exports&&!exports.nodeType&&exports,$n=sh&&typeof module=="object"&&module&&!module.nodeType&&module,Am=$n&&$n.exports===sh,To=Am&&Zc.process,ln=(function(){try{var n=$n&&$n.require&&$n.require("util").types;return n||To&&To.binding&&To.binding("util")}catch{}})(),Ul=ln&&ln.isTypedArray,Ka=Ul?Ga(Ul):_m,Cm=Object.prototype,Tm=Cm.hasOwnProperty;function ih(n,e){var t=xr(n),r=!t&&sa(n),s=!t&&!r&&Gn(n),i=!t&&!r&&!s&&Ka(n),o=t||r||s||i,a=o?Kg(n.length,String):[],u=a.length;for(var c in n)(e||Tm.call(n,c))&&!(o&&(c=="length"||s&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Jc(c,u)))&&a.push(c);return a}function oh(n,e){return function(t){return n(e(t))}}var km=oh(Object.keys,Object),Nm=Object.prototype,Im=Nm.hasOwnProperty;function Rm(n){if(!za(n))return km(n);var e=[];for(var t in Object(n))Im.call(n,t)&&t!="constructor"&&e.push(t);return e}function Om(n){return gi(n)?ih(n):Rm(n)}function Lm(n){var e=[];if(n!=null)for(var t in Object(n))e.push(t);return e}var Mm=Object.prototype,Dm=Mm.hasOwnProperty;function Pm(n){if(!sr(n))return Lm(n);var e=za(n),t=[];for(var r in n)r=="constructor"&&(e||!Dm.call(n,r))||t.push(r);return t}function ah(n){return gi(n)?ih(n,!0):Pm(n)}var Kn=kr(Object,"create");function Bm(){this.__data__=Kn?Kn(null):{},this.size=0}function qm(n){var e=this.has(n)&&delete this.__data__[n];return this.size-=e?1:0,e}var Fm="__lodash_hash_undefined__",jm=Object.prototype,$m=jm.hasOwnProperty;function Vm(n){var e=this.__data__;if(Kn){var t=e[n];return t===Fm?void 0:t}return $m.call(e,n)?e[n]:void 0}var Um=Object.prototype,Hm=Um.hasOwnProperty;function zm(n){var e=this.__data__;return Kn?e[n]!==void 0:Hm.call(e,n)}var Gm="__lodash_hash_undefined__";function Km(n,e){var t=this.__data__;return this.size+=this.has(n)?0:1,t[n]=Kn&&e===void 0?Gm:e,this}function Sr(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var r=n[e];this.set(r[0],r[1])}}Sr.prototype.clear=Bm;Sr.prototype.delete=qm;Sr.prototype.get=Vm;Sr.prototype.has=zm;Sr.prototype.set=Km;function Wm(){this.__data__=[],this.size=0}function mi(n,e){for(var t=n.length;t--;)if(ts(n[t][0],e))return t;return-1}var Ym=Array.prototype,Zm=Ym.splice;function Xm(n){var e=this.__data__,t=mi(e,n);if(t<0)return!1;var r=e.length-1;return t==r?e.pop():Zm.call(e,t,1),--this.size,!0}function Qm(n){var e=this.__data__,t=mi(e,n);return t<0?void 0:e[t][1]}function Jm(n){return mi(this.__data__,n)>-1}function e0(n,e){var t=this.__data__,r=mi(t,n);return r<0?(++this.size,t.push([n,e])):t[r][1]=e,this}function $t(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var r=n[e];this.set(r[0],r[1])}}$t.prototype.clear=Wm;$t.prototype.delete=Xm;$t.prototype.get=Qm;$t.prototype.has=Jm;$t.prototype.set=e0;var Wn=kr(Tt,"Map");function t0(){this.size=0,this.__data__={hash:new Sr,map:new(Wn||$t),string:new Sr}}function r0(n){var e=typeof n;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?n!=="__proto__":n===null}function vi(n,e){var t=n.__data__;return r0(e)?t[typeof e=="string"?"string":"hash"]:t.map}function n0(n){var e=vi(this,n).delete(n);return this.size-=e?1:0,e}function s0(n){return vi(this,n).get(n)}function i0(n){return vi(this,n).has(n)}function o0(n,e){var t=vi(this,n),r=t.size;return t.set(n,e),this.size+=t.size==r?0:1,this}function Nr(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var r=n[e];this.set(r[0],r[1])}}Nr.prototype.clear=t0;Nr.prototype.delete=n0;Nr.prototype.get=s0;Nr.prototype.has=i0;Nr.prototype.set=o0;function a0(n,e){for(var t=-1,r=e.length,s=n.length;++t<r;)n[s+t]=e[t];return n}var lh=oh(Object.getPrototypeOf,Object),l0="[object Object]",u0=Function.prototype,c0=Object.prototype,uh=u0.toString,h0=c0.hasOwnProperty,d0=uh.call(Object);function f0(n){if(!Pt(n)||gn(n)!=l0)return!1;var e=lh(n);if(e===null)return!0;var t=h0.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&uh.call(t)==d0}function p0(){this.__data__=new $t,this.size=0}function g0(n){var e=this.__data__,t=e.delete(n);return this.size=e.size,t}function m0(n){return this.__data__.get(n)}function v0(n){return this.__data__.has(n)}var y0=200;function b0(n,e){var t=this.__data__;if(t instanceof $t){var r=t.__data__;if(!Wn||r.length<y0-1)return r.push([n,e]),this.size=++t.size,this;t=this.__data__=new Nr(r)}return t.set(n,e),this.size=t.size,this}function St(n){var e=this.__data__=new $t(n);this.size=e.size}St.prototype.clear=p0;St.prototype.delete=g0;St.prototype.get=m0;St.prototype.has=v0;St.prototype.set=b0;var ch=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Hl=ch&&typeof module=="object"&&module&&!module.nodeType&&module,E0=Hl&&Hl.exports===ch,zl=E0?Tt.Buffer:void 0,Gl=zl?zl.allocUnsafe:void 0;function hh(n,e){if(e)return n.slice();var t=n.length,r=Gl?Gl(t):new n.constructor(t);return n.copy(r),r}function w0(n,e){for(var t=-1,r=n==null?0:n.length,s=0,i=[];++t<r;){var o=n[t];e(o,t,n)&&(i[s++]=o)}return i}function x0(){return[]}var S0=Object.prototype,_0=S0.propertyIsEnumerable,Kl=Object.getOwnPropertySymbols,A0=Kl?function(n){return n==null?[]:(n=Object(n),w0(Kl(n),function(e){return _0.call(n,e)}))}:x0;function C0(n,e,t){var r=e(n);return xr(n)?r:a0(r,t(n))}function ia(n){return C0(n,Om,A0)}var oa=kr(Tt,"DataView"),aa=kr(Tt,"Promise"),la=kr(Tt,"Set"),Wl="[object Map]",T0="[object Object]",Yl="[object Promise]",Zl="[object Set]",Xl="[object WeakMap]",Ql="[object DataView]",k0=Tr(oa),N0=Tr(Wn),I0=Tr(aa),R0=Tr(la),O0=Tr(na),lt=gn;(oa&&lt(new oa(new ArrayBuffer(1)))!=Ql||Wn&&lt(new Wn)!=Wl||aa&&lt(aa.resolve())!=Yl||la&&lt(new la)!=Zl||na&&lt(new na)!=Xl)&&(lt=function(n){var e=gn(n),t=e==T0?n.constructor:void 0,r=t?Tr(t):"";if(r)switch(r){case k0:return Ql;case N0:return Wl;case I0:return Yl;case R0:return Zl;case O0:return Xl}return e});var L0=Object.prototype,M0=L0.hasOwnProperty;function D0(n){var e=n.length,t=new n.constructor(e);return e&&typeof n[0]=="string"&&M0.call(n,"index")&&(t.index=n.index,t.input=n.input),t}var ei=Tt.Uint8Array;function Wa(n){var e=new n.constructor(n.byteLength);return new ei(e).set(new ei(n)),e}function P0(n,e){var t=Wa(n.buffer);return new n.constructor(t,n.byteOffset,n.byteLength)}var B0=/\w*$/;function q0(n){var e=new n.constructor(n.source,B0.exec(n));return e.lastIndex=n.lastIndex,e}var Jl=nr?nr.prototype:void 0,eu=Jl?Jl.valueOf:void 0;function F0(n){return eu?Object(eu.call(n)):{}}function dh(n,e){var t=e?Wa(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.length)}var j0="[object Boolean]",$0="[object Date]",V0="[object Map]",U0="[object Number]",H0="[object RegExp]",z0="[object Set]",G0="[object String]",K0="[object Symbol]",W0="[object ArrayBuffer]",Y0="[object DataView]",Z0="[object Float32Array]",X0="[object Float64Array]",Q0="[object Int8Array]",J0="[object Int16Array]",e1="[object Int32Array]",t1="[object Uint8Array]",r1="[object Uint8ClampedArray]",n1="[object Uint16Array]",s1="[object Uint32Array]";function i1(n,e,t){var r=n.constructor;switch(e){case W0:return Wa(n);case j0:case $0:return new r(+n);case Y0:return P0(n);case Z0:case X0:case Q0:case J0:case e1:case t1:case r1:case n1:case s1:return dh(n,t);case V0:return new r;case U0:case G0:return new r(n);case H0:return q0(n);case z0:return new r;case K0:return F0(n)}}function fh(n){return typeof n.constructor=="function"&&!za(n)?Ag(lh(n)):{}}var o1="[object Map]";function a1(n){return Pt(n)&&lt(n)==o1}var tu=ln&&ln.isMap,l1=tu?Ga(tu):a1,u1="[object Set]";function c1(n){return Pt(n)&&lt(n)==u1}var ru=ln&&ln.isSet,h1=ru?Ga(ru):c1,d1=1,ph="[object Arguments]",f1="[object Array]",p1="[object Boolean]",g1="[object Date]",m1="[object Error]",gh="[object Function]",v1="[object GeneratorFunction]",y1="[object Map]",b1="[object Number]",mh="[object Object]",E1="[object RegExp]",w1="[object Set]",x1="[object String]",S1="[object Symbol]",_1="[object WeakMap]",A1="[object ArrayBuffer]",C1="[object DataView]",T1="[object Float32Array]",k1="[object Float64Array]",N1="[object Int8Array]",I1="[object Int16Array]",R1="[object Int32Array]",O1="[object Uint8Array]",L1="[object Uint8ClampedArray]",M1="[object Uint16Array]",D1="[object Uint32Array]",Se={};Se[ph]=Se[f1]=Se[A1]=Se[C1]=Se[p1]=Se[g1]=Se[T1]=Se[k1]=Se[N1]=Se[I1]=Se[R1]=Se[y1]=Se[b1]=Se[mh]=Se[E1]=Se[w1]=Se[x1]=Se[S1]=Se[O1]=Se[L1]=Se[M1]=Se[D1]=!0;Se[m1]=Se[gh]=Se[_1]=!1;function Us(n,e,t,r,s,i){var o,a=e&d1;if(o!==void 0)return o;if(!sr(n))return n;var u=xr(n);if(u)o=D0(n);else{var c=lt(n),h=c==gh||c==v1;if(Gn(n))return hh(n,a);if(c==mh||c==ph||h&&!s)o=h?{}:fh(n);else{if(!Se[c])return s?n:{};o=i1(n,c,a)}}i||(i=new St);var g=i.get(n);if(g)return g;i.set(n,o),h1(n)?n.forEach(function(v){o.add(Us(v,e,t,v,n,i))}):l1(n)&&n.forEach(function(v,p){o.set(p,Us(v,e,t,p,n,i))});var d=ia,m=u?void 0:d(n);return Dg(m||n,function(v,p){m&&(p=v,v=n[p]),eh(o,p,Us(v,e,t,p,n,i))}),o}var P1=1,B1=4;function en(n){return Us(n,P1|B1)}var q1="__lodash_hash_undefined__";function F1(n){return this.__data__.set(n,q1),this}function j1(n){return this.__data__.has(n)}function ti(n){var e=-1,t=n==null?0:n.length;for(this.__data__=new Nr;++e<t;)this.add(n[e])}ti.prototype.add=ti.prototype.push=F1;ti.prototype.has=j1;function $1(n,e){for(var t=-1,r=n==null?0:n.length;++t<r;)if(e(n[t],t,n))return!0;return!1}function V1(n,e){return n.has(e)}var U1=1,H1=2;function vh(n,e,t,r,s,i){var o=t&U1,a=n.length,u=e.length;if(a!=u&&!(o&&u>a))return!1;var c=i.get(n),h=i.get(e);if(c&&h)return c==e&&h==n;var g=-1,d=!0,m=t&H1?new ti:void 0;for(i.set(n,e),i.set(e,n);++g<a;){var v=n[g],p=e[g];if(r)var y=o?r(p,v,g,e,n,i):r(v,p,g,n,e,i);if(y!==void 0){if(y)continue;d=!1;break}if(m){if(!$1(e,function(E,S){if(!V1(m,S)&&(v===E||s(v,E,t,r,i)))return m.push(S)})){d=!1;break}}else if(!(v===p||s(v,p,t,r,i))){d=!1;break}}return i.delete(n),i.delete(e),d}function z1(n){var e=-1,t=Array(n.size);return n.forEach(function(r,s){t[++e]=[s,r]}),t}function G1(n){var e=-1,t=Array(n.size);return n.forEach(function(r){t[++e]=r}),t}var K1=1,W1=2,Y1="[object Boolean]",Z1="[object Date]",X1="[object Error]",Q1="[object Map]",J1="[object Number]",ev="[object RegExp]",tv="[object Set]",rv="[object String]",nv="[object Symbol]",sv="[object ArrayBuffer]",iv="[object DataView]",nu=nr?nr.prototype:void 0,ko=nu?nu.valueOf:void 0;function ov(n,e,t,r,s,i,o){switch(t){case iv:if(n.byteLength!=e.byteLength||n.byteOffset!=e.byteOffset)return!1;n=n.buffer,e=e.buffer;case sv:return!(n.byteLength!=e.byteLength||!i(new ei(n),new ei(e)));case Y1:case Z1:case J1:return ts(+n,+e);case X1:return n.name==e.name&&n.message==e.message;case ev:case rv:return n==e+"";case Q1:var a=z1;case tv:var u=r&K1;if(a||(a=G1),n.size!=e.size&&!u)return!1;var c=o.get(n);if(c)return c==e;r|=W1,o.set(n,e);var h=vh(a(n),a(e),r,s,i,o);return o.delete(n),h;case nv:if(ko)return ko.call(n)==ko.call(e)}return!1}var av=1,lv=Object.prototype,uv=lv.hasOwnProperty;function cv(n,e,t,r,s,i){var o=t&av,a=ia(n),u=a.length,c=ia(e),h=c.length;if(u!=h&&!o)return!1;for(var g=u;g--;){var d=a[g];if(!(o?d in e:uv.call(e,d)))return!1}var m=i.get(n),v=i.get(e);if(m&&v)return m==e&&v==n;var p=!0;i.set(n,e),i.set(e,n);for(var y=o;++g<u;){d=a[g];var E=n[d],S=e[d];if(r)var x=o?r(S,E,d,e,n,i):r(E,S,d,n,e,i);if(!(x===void 0?E===S||s(E,S,t,r,i):x)){p=!1;break}y||(y=d=="constructor")}if(p&&!y){var N=n.constructor,_=e.constructor;N!=_&&"constructor"in n&&"constructor"in e&&!(typeof N=="function"&&N instanceof N&&typeof _=="function"&&_ instanceof _)&&(p=!1)}return i.delete(n),i.delete(e),p}var hv=1,su="[object Arguments]",iu="[object Array]",Cs="[object Object]",dv=Object.prototype,ou=dv.hasOwnProperty;function fv(n,e,t,r,s,i){var o=xr(n),a=xr(e),u=o?iu:lt(n),c=a?iu:lt(e);u=u==su?Cs:u,c=c==su?Cs:c;var h=u==Cs,g=c==Cs,d=u==c;if(d&&Gn(n)){if(!Gn(e))return!1;o=!0,h=!1}if(d&&!h)return i||(i=new St),o||Ka(n)?vh(n,e,t,r,s,i):ov(n,e,u,t,r,s,i);if(!(t&hv)){var m=h&&ou.call(n,"__wrapped__"),v=g&&ou.call(e,"__wrapped__");if(m||v){var p=m?n.value():n,y=v?e.value():e;return i||(i=new St),s(p,y,t,r,i)}}return d?(i||(i=new St),cv(n,e,t,r,s,i)):!1}function yh(n,e,t,r,s){return n===e?!0:n==null||e==null||!Pt(n)&&!Pt(e)?n!==n&&e!==e:fv(n,e,t,r,yh,s)}function pv(n){return function(e,t,r){for(var s=-1,i=Object(e),o=r(e),a=o.length;a--;){var u=o[++s];if(t(i[u],u,i)===!1)break}return e}}var gv=pv();function ua(n,e,t){(t!==void 0&&!ts(n[e],t)||t===void 0&&!(e in n))&&Ha(n,e,t)}function mv(n){return Pt(n)&&gi(n)}function ca(n,e){if(!(e==="constructor"&&typeof n[e]=="function")&&e!="__proto__")return n[e]}function vv(n){return jg(n,ah(n))}function yv(n,e,t,r,s,i,o){var a=ca(n,t),u=ca(e,t),c=o.get(u);if(c){ua(n,t,c);return}var h=i?i(a,u,t+"",n,e,o):void 0,g=h===void 0;if(g){var d=xr(u),m=!d&&Gn(u),v=!d&&!m&&Ka(u);h=u,d||m||v?xr(a)?h=a:mv(a)?h=Tg(a):m?(g=!1,h=hh(u,!0)):v?(g=!1,h=dh(u,!0)):h=[]:f0(u)||sa(u)?(h=a,sa(a)?h=vv(a):(!sr(a)||Ua(a))&&(h=fh(u))):g=!1}g&&(o.set(u,h),s(h,u,r,i,o),o.delete(u)),ua(n,t,h)}function bh(n,e,t,r,s){n!==e&&gv(e,function(i,o){if(s||(s=new St),sr(i))yv(n,e,o,t,bh,r,s);else{var a=r?r(ca(n,o),i,o+"",n,e,s):void 0;a===void 0&&(a=i),ua(n,o,a)}},ah)}function Wt(n,e){return yh(n,e)}var er=zg(function(n,e,t){bh(n,e,t)}),ne=(n=>(n[n.TYPE=3]="TYPE",n[n.LEVEL=12]="LEVEL",n[n.ATTRIBUTE=13]="ATTRIBUTE",n[n.BLOT=14]="BLOT",n[n.INLINE=7]="INLINE",n[n.BLOCK=11]="BLOCK",n[n.BLOCK_BLOT=10]="BLOCK_BLOT",n[n.INLINE_BLOT=6]="INLINE_BLOT",n[n.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",n[n.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",n[n.ANY=15]="ANY",n))(ne||{});class At{constructor(e,t,r={}){this.attrName=e,this.keyName=t;const s=ne.TYPE&ne.ATTRIBUTE;this.scope=r.scope!=null?r.scope&ne.LEVEL|s:ne.ATTRIBUTE,r.whitelist!=null&&(this.whitelist=r.whitelist)}static keys(e){return Array.from(e.attributes).map(t=>t.name)}add(e,t){return this.canAdd(e,t)?(e.setAttribute(this.keyName,t),!0):!1}canAdd(e,t){return this.whitelist==null?!0:typeof t=="string"?this.whitelist.indexOf(t.replace(/["']/g,""))>-1:this.whitelist.indexOf(t)>-1}remove(e){e.removeAttribute(this.keyName)}value(e){const t=e.getAttribute(this.keyName);return this.canAdd(e,t)&&t?t:""}}class tn extends Error{constructor(e){e="[Parchment] "+e,super(e),this.message=e,this.name=this.constructor.name}}const Eh=class ha{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(e,t=!1){if(e==null)return null;if(this.blots.has(e))return this.blots.get(e)||null;if(t){let r=null;try{r=e.parentNode}catch{return null}return this.find(r,t)}return null}create(e,t,r){const s=this.query(t);if(s==null)throw new tn(`Unable to create ${t} blot`);const i=s,o=t instanceof Node||t.nodeType===Node.TEXT_NODE?t:i.create(r),a=new i(e,o,r);return ha.blots.set(a.domNode,a),a}find(e,t=!1){return ha.find(e,t)}query(e,t=ne.ANY){let r;return typeof e=="string"?r=this.types[e]||this.attributes[e]:e instanceof Text||e.nodeType===Node.TEXT_NODE?r=this.types.text:typeof e=="number"?e&ne.LEVEL&ne.BLOCK?r=this.types.block:e&ne.LEVEL&ne.INLINE&&(r=this.types.inline):e instanceof Element&&((e.getAttribute("class")||"").split(/\s+/).some(s=>(r=this.classes[s],!!r)),r=r||this.tags[e.tagName]),r==null?null:"scope"in r&&t&ne.LEVEL&r.scope&&t&ne.TYPE&r.scope?r:null}register(...e){return e.map(t=>{const r="blotName"in t,s="attrName"in t;if(!r&&!s)throw new tn("Invalid definition");if(r&&t.blotName==="abstract")throw new tn("Cannot register abstract class");const i=r?t.blotName:s?t.attrName:void 0;return this.types[i]=t,s?typeof t.keyName=="string"&&(this.attributes[t.keyName]=t):r&&(t.className&&(this.classes[t.className]=t),t.tagName&&(Array.isArray(t.tagName)?t.tagName=t.tagName.map(o=>o.toUpperCase()):t.tagName=t.tagName.toUpperCase(),(Array.isArray(t.tagName)?t.tagName:[t.tagName]).forEach(o=>{(this.tags[o]==null||t.className==null)&&(this.tags[o]=t)}))),t})}};Eh.blots=new WeakMap;let un=Eh;function au(n,e){return(n.getAttribute("class")||"").split(/\s+/).filter(t=>t.indexOf(`${e}-`)===0)}class bv extends At{static keys(e){return(e.getAttribute("class")||"").split(/\s+/).map(t=>t.split("-").slice(0,-1).join("-"))}add(e,t){return this.canAdd(e,t)?(this.remove(e),e.classList.add(`${this.keyName}-${t}`),!0):!1}remove(e){au(e,this.keyName).forEach(t=>{e.classList.remove(t)}),e.classList.length===0&&e.removeAttribute("class")}value(e){const t=(au(e,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(e,t)?t:""}}const pt=bv;function No(n){const e=n.split("-"),t=e.slice(1).map(r=>r[0].toUpperCase()+r.slice(1)).join("");return e[0]+t}class Ev extends At{static keys(e){return(e.getAttribute("style")||"").split(";").map(t=>t.split(":")[0].trim())}add(e,t){return this.canAdd(e,t)?(e.style[No(this.keyName)]=t,!0):!1}remove(e){e.style[No(this.keyName)]="",e.getAttribute("style")||e.removeAttribute("style")}value(e){const t=e.style[No(this.keyName)];return this.canAdd(e,t)?t:""}}const ir=Ev;class wv{constructor(e){this.attributes={},this.domNode=e,this.build()}attribute(e,t){t?e.add(this.domNode,t)&&(e.value(this.domNode)!=null?this.attributes[e.attrName]=e:delete this.attributes[e.attrName]):(e.remove(this.domNode),delete this.attributes[e.attrName])}build(){this.attributes={};const e=un.find(this.domNode);if(e==null)return;const t=At.keys(this.domNode),r=pt.keys(this.domNode),s=ir.keys(this.domNode);t.concat(r).concat(s).forEach(i=>{const o=e.scroll.query(i,ne.ATTRIBUTE);o instanceof At&&(this.attributes[o.attrName]=o)})}copy(e){Object.keys(this.attributes).forEach(t=>{const r=this.attributes[t].value(this.domNode);e.format(t,r)})}move(e){this.copy(e),Object.keys(this.attributes).forEach(t=>{this.attributes[t].remove(this.domNode)}),this.attributes={}}values(){return Object.keys(this.attributes).reduce((e,t)=>(e[t]=this.attributes[t].value(this.domNode),e),{})}}const yi=wv,wh=class{constructor(e,t){this.scroll=e,this.domNode=t,un.blots.set(t,this),this.prev=null,this.next=null}static create(e){if(this.tagName==null)throw new tn("Blot definition missing tagName");let t,r;return Array.isArray(this.tagName)?(typeof e=="string"?(r=e.toUpperCase(),parseInt(r,10).toString()===r&&(r=parseInt(r,10))):typeof e=="number"&&(r=e),typeof r=="number"?t=document.createElement(this.tagName[r-1]):r&&this.tagName.indexOf(r)>-1?t=document.createElement(r):t=document.createElement(this.tagName[0])):t=document.createElement(this.tagName),this.className&&t.classList.add(this.className),t}get statics(){return this.constructor}attach(){}clone(){const e=this.domNode.cloneNode(!1);return this.scroll.create(e)}detach(){this.parent!=null&&this.parent.removeChild(this),un.blots.delete(this.domNode)}deleteAt(e,t){this.isolate(e,t).remove()}formatAt(e,t,r,s){const i=this.isolate(e,t);if(this.scroll.query(r,ne.BLOT)!=null&&s)i.wrap(r,s);else if(this.scroll.query(r,ne.ATTRIBUTE)!=null){const o=this.scroll.create(this.statics.scope);i.wrap(o),o.format(r,s)}}insertAt(e,t,r){const s=r==null?this.scroll.create("text",t):this.scroll.create(t,r),i=this.split(e);this.parent.insertBefore(s,i||void 0)}isolate(e,t){const r=this.split(e);if(r==null)throw new Error("Attempt to isolate at end");return r.split(t),r}length(){return 1}offset(e=this.parent){return this.parent==null||this===e?0:this.parent.children.offset(this)+this.parent.offset(e)}optimize(e){this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)&&this.wrap(this.statics.requiredContainer.blotName)}remove(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()}replaceWith(e,t){const r=typeof e=="string"?this.scroll.create(e,t):e;return this.parent!=null&&(this.parent.insertBefore(r,this.next||void 0),this.remove()),r}split(e,t){return e===0?this:this.next}update(e,t){}wrap(e,t){const r=typeof e=="string"?this.scroll.create(e,t):e;if(this.parent!=null&&this.parent.insertBefore(r,this.next||void 0),typeof r.appendChild!="function")throw new tn(`Cannot wrap ${e}`);return r.appendChild(this),r}};wh.blotName="abstract";let xh=wh;const Sh=class extends xh{static value(e){return!0}index(e,t){return this.domNode===e||this.domNode.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(t,1):-1}position(e,t){let r=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return e>0&&(r+=1),[this.parent.domNode,r]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}};Sh.scope=ne.INLINE_BLOT;let xv=Sh;const Fe=xv;class Sv{constructor(){this.head=null,this.tail=null,this.length=0}append(...e){if(this.insertBefore(e[0],null),e.length>1){const t=e.slice(1);this.append(...t)}}at(e){const t=this.iterator();let r=t();for(;r&&e>0;)e-=1,r=t();return r}contains(e){const t=this.iterator();let r=t();for(;r;){if(r===e)return!0;r=t()}return!1}indexOf(e){const t=this.iterator();let r=t(),s=0;for(;r;){if(r===e)return s;s+=1,r=t()}return-1}insertBefore(e,t){e!=null&&(this.remove(e),e.next=t,t!=null?(e.prev=t.prev,t.prev!=null&&(t.prev.next=e),t.prev=e,t===this.head&&(this.head=e)):this.tail!=null?(this.tail.next=e,e.prev=this.tail,this.tail=e):(e.prev=null,this.head=this.tail=e),this.length+=1)}offset(e){let t=0,r=this.head;for(;r!=null;){if(r===e)return t;t+=r.length(),r=r.next}return-1}remove(e){this.contains(e)&&(e.prev!=null&&(e.prev.next=e.next),e.next!=null&&(e.next.prev=e.prev),e===this.head&&(this.head=e.next),e===this.tail&&(this.tail=e.prev),this.length-=1)}iterator(e=this.head){return()=>{const t=e;return e!=null&&(e=e.next),t}}find(e,t=!1){const r=this.iterator();let s=r();for(;s;){const i=s.length();if(e<i||t&&e===i&&(s.next==null||s.next.length()!==0))return[s,e];e-=i,s=r()}return[null,0]}forEach(e){const t=this.iterator();let r=t();for(;r;)e(r),r=t()}forEachAt(e,t,r){if(t<=0)return;const[s,i]=this.find(e);let o=e-i;const a=this.iterator(s);let u=a();for(;u&&o<e+t;){const c=u.length();e>o?r(u,e-o,Math.min(t,o+c-e)):r(u,0,Math.min(c,e+t-o)),o+=c,u=a()}}map(e){return this.reduce((t,r)=>(t.push(e(r)),t),[])}reduce(e,t){const r=this.iterator();let s=r();for(;s;)t=e(t,s),s=r();return t}}function lu(n,e){const t=e.find(n);if(t)return t;try{return e.create(n)}catch{const r=e.create(ne.INLINE);return Array.from(n.childNodes).forEach(s=>{r.domNode.appendChild(s)}),n.parentNode&&n.parentNode.replaceChild(r.domNode,n),r.attach(),r}}const _h=class Kt extends xh{constructor(e,t){super(e,t),this.uiNode=null,this.build()}appendChild(e){this.insertBefore(e)}attach(){super.attach(),this.children.forEach(e=>{e.attach()})}attachUI(e){this.uiNode!=null&&this.uiNode.remove(),this.uiNode=e,Kt.uiClass&&this.uiNode.classList.add(Kt.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new Sv,Array.from(this.domNode.childNodes).filter(e=>e!==this.uiNode).reverse().forEach(e=>{try{const t=lu(e,this.scroll);this.insertBefore(t,this.children.head||void 0)}catch(t){if(t instanceof tn)return;throw t}})}deleteAt(e,t){if(e===0&&t===this.length())return this.remove();this.children.forEachAt(e,t,(r,s,i)=>{r.deleteAt(s,i)})}descendant(e,t=0){const[r,s]=this.children.find(t);return e.blotName==null&&e(r)||e.blotName!=null&&r instanceof e?[r,s]:r instanceof Kt?r.descendant(e,s):[null,-1]}descendants(e,t=0,r=Number.MAX_VALUE){let s=[],i=r;return this.children.forEachAt(t,r,(o,a,u)=>{(e.blotName==null&&e(o)||e.blotName!=null&&o instanceof e)&&s.push(o),o instanceof Kt&&(s=s.concat(o.descendants(e,a,i))),i-=u}),s}detach(){this.children.forEach(e=>{e.detach()}),super.detach()}enforceAllowedChildren(){let e=!1;this.children.forEach(t=>{e||this.statics.allowedChildren.some(r=>t instanceof r)||(t.statics.scope===ne.BLOCK_BLOT?(t.next!=null&&this.splitAfter(t),t.prev!=null&&this.splitAfter(t.prev),t.parent.unwrap(),e=!0):t instanceof Kt?t.unwrap():t.remove())})}formatAt(e,t,r,s){this.children.forEachAt(e,t,(i,o,a)=>{i.formatAt(o,a,r,s)})}insertAt(e,t,r){const[s,i]=this.children.find(e);if(s)s.insertAt(i,t,r);else{const o=r==null?this.scroll.create("text",t):this.scroll.create(t,r);this.appendChild(o)}}insertBefore(e,t){e.parent!=null&&e.parent.children.remove(e);let r=null;this.children.insertBefore(e,t||null),e.parent=this,t!=null&&(r=t.domNode),(this.domNode.parentNode!==e.domNode||this.domNode.nextSibling!==r)&&this.domNode.insertBefore(e.domNode,r),e.attach()}length(){return this.children.reduce((e,t)=>e+t.length(),0)}moveChildren(e,t){this.children.forEach(r=>{e.insertBefore(r,t)})}optimize(e){if(super.optimize(e),this.enforceAllowedChildren(),this.uiNode!=null&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),this.children.length===0)if(this.statics.defaultChild!=null){const t=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(t)}else this.remove()}path(e,t=!1){const[r,s]=this.children.find(e,t),i=[[this,e]];return r instanceof Kt?i.concat(r.path(s,t)):(r!=null&&i.push([r,s]),i)}removeChild(e){this.children.remove(e)}replaceWith(e,t){const r=typeof e=="string"?this.scroll.create(e,t):e;return r instanceof Kt&&this.moveChildren(r),super.replaceWith(r)}split(e,t=!1){if(!t){if(e===0)return this;if(e===this.length())return this.next}const r=this.clone();return this.parent&&this.parent.insertBefore(r,this.next||void 0),this.children.forEachAt(e,this.length(),(s,i,o)=>{const a=s.split(i,t);a!=null&&r.appendChild(a)}),r}splitAfter(e){const t=this.clone();for(;e.next!=null;)t.appendChild(e.next);return this.parent&&this.parent.insertBefore(t,this.next||void 0),t}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()}update(e,t){const r=[],s=[];e.forEach(i=>{i.target===this.domNode&&i.type==="childList"&&(r.push(...i.addedNodes),s.push(...i.removedNodes))}),s.forEach(i=>{if(i.parentNode!=null&&i.tagName!=="IFRAME"&&document.body.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;const o=this.scroll.find(i);o!=null&&(o.domNode.parentNode==null||o.domNode.parentNode===this.domNode)&&o.detach()}),r.filter(i=>i.parentNode===this.domNode&&i!==this.uiNode).sort((i,o)=>i===o?0:i.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1).forEach(i=>{let o=null;i.nextSibling!=null&&(o=this.scroll.find(i.nextSibling));const a=lu(i,this.scroll);(a.next!==o||a.next==null)&&(a.parent!=null&&a.parent.removeChild(this),this.insertBefore(a,o||void 0))}),this.enforceAllowedChildren()}};_h.uiClass="";let _v=_h;const dt=_v;function Av(n,e){if(Object.keys(n).length!==Object.keys(e).length)return!1;for(const t in n)if(n[t]!==e[t])return!1;return!0}const Gr=class Kr extends dt{static create(e){return super.create(e)}static formats(e,t){const r=t.query(Kr.blotName);if(!(r!=null&&e.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return e.tagName.toLowerCase()}}constructor(e,t){super(e,t),this.attributes=new yi(this.domNode)}format(e,t){if(e===this.statics.blotName&&!t)this.children.forEach(r=>{r instanceof Kr||(r=r.wrap(Kr.blotName,!0)),this.attributes.copy(r)}),this.unwrap();else{const r=this.scroll.query(e,ne.INLINE);if(r==null)return;r instanceof At?this.attributes.attribute(r,t):t&&(e!==this.statics.blotName||this.formats()[e]!==t)&&this.replaceWith(e,t)}}formats(){const e=this.attributes.values(),t=this.statics.formats(this.domNode,this.scroll);return t!=null&&(e[this.statics.blotName]=t),e}formatAt(e,t,r,s){this.formats()[r]!=null||this.scroll.query(r,ne.ATTRIBUTE)?this.isolate(e,t).format(r,s):super.formatAt(e,t,r,s)}optimize(e){super.optimize(e);const t=this.formats();if(Object.keys(t).length===0)return this.unwrap();const r=this.next;r instanceof Kr&&r.prev===this&&Av(t,r.formats())&&(r.moveChildren(this),r.remove())}replaceWith(e,t){const r=super.replaceWith(e,t);return this.attributes.copy(r),r}update(e,t){super.update(e,t),e.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}wrap(e,t){const r=super.wrap(e,t);return r instanceof Kr&&this.attributes.move(r),r}};Gr.allowedChildren=[Gr,Fe],Gr.blotName="inline",Gr.scope=ne.INLINE_BLOT,Gr.tagName="SPAN";let Cv=Gr;const Ya=Cv,Wr=class da extends dt{static create(e){return super.create(e)}static formats(e,t){const r=t.query(da.blotName);if(!(r!=null&&e.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return e.tagName.toLowerCase()}}constructor(e,t){super(e,t),this.attributes=new yi(this.domNode)}format(e,t){const r=this.scroll.query(e,ne.BLOCK);r!=null&&(r instanceof At?this.attributes.attribute(r,t):e===this.statics.blotName&&!t?this.replaceWith(da.blotName):t&&(e!==this.statics.blotName||this.formats()[e]!==t)&&this.replaceWith(e,t))}formats(){const e=this.attributes.values(),t=this.statics.formats(this.domNode,this.scroll);return t!=null&&(e[this.statics.blotName]=t),e}formatAt(e,t,r,s){this.scroll.query(r,ne.BLOCK)!=null?this.format(r,s):super.formatAt(e,t,r,s)}insertAt(e,t,r){if(r==null||this.scroll.query(t,ne.INLINE)!=null)super.insertAt(e,t,r);else{const s=this.split(e);if(s!=null){const i=this.scroll.create(t,r);s.parent.insertBefore(i,s)}else throw new Error("Attempt to insertAt after block boundaries")}}replaceWith(e,t){const r=super.replaceWith(e,t);return this.attributes.copy(r),r}update(e,t){super.update(e,t),e.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}};Wr.blotName="block",Wr.scope=ne.BLOCK_BLOT,Wr.tagName="P",Wr.allowedChildren=[Ya,Wr,Fe];let Tv=Wr;const Yn=Tv,fa=class extends dt{checkMerge(){return this.next!==null&&this.next.statics.blotName===this.statics.blotName}deleteAt(e,t){super.deleteAt(e,t),this.enforceAllowedChildren()}formatAt(e,t,r,s){super.formatAt(e,t,r,s),this.enforceAllowedChildren()}insertAt(e,t,r){super.insertAt(e,t,r),this.enforceAllowedChildren()}optimize(e){super.optimize(e),this.children.length>0&&this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};fa.blotName="container",fa.scope=ne.BLOCK_BLOT;let kv=fa;const bi=kv;class Nv extends Fe{static formats(e,t){}format(e,t){super.formatAt(0,this.length(),e,t)}formatAt(e,t,r,s){e===0&&t===this.length()?this.format(r,s):super.formatAt(e,t,r,s)}formats(){return this.statics.formats(this.domNode,this.scroll)}}const We=Nv,Iv={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},Rv=100,Yr=class extends dt{constructor(e,t){super(null,t),this.registry=e,this.scroll=this,this.build(),this.observer=new MutationObserver(r=>{this.update(r)}),this.observer.observe(this.domNode,Iv),this.attach()}create(e,t){return this.registry.create(this,e,t)}find(e,t=!1){const r=this.registry.find(e,t);return r?r.scroll===this?r:t?this.find(r.scroll.domNode.parentNode,!0):null:null}query(e,t=ne.ANY){return this.registry.query(e,t)}register(...e){return this.registry.register(...e)}build(){this.scroll!=null&&super.build()}detach(){super.detach(),this.observer.disconnect()}deleteAt(e,t){this.update(),e===0&&t===this.length()?this.children.forEach(r=>{r.remove()}):super.deleteAt(e,t)}formatAt(e,t,r,s){this.update(),super.formatAt(e,t,r,s)}insertAt(e,t,r){this.update(),super.insertAt(e,t,r)}optimize(e=[],t={}){super.optimize(t);const r=t.mutationsMap||new WeakMap;let s=Array.from(this.observer.takeRecords());for(;s.length>0;)e.push(s.pop());const i=(u,c=!0)=>{u==null||u===this||u.domNode.parentNode!=null&&(r.has(u.domNode)||r.set(u.domNode,[]),c&&i(u.parent))},o=u=>{r.has(u.domNode)&&(u instanceof dt&&u.children.forEach(o),r.delete(u.domNode),u.optimize(t))};let a=e;for(let u=0;a.length>0;u+=1){if(u>=Rv)throw new Error("[Parchment] Maximum optimize iterations reached");for(a.forEach(c=>{const h=this.find(c.target,!0);h!=null&&(h.domNode===c.target&&(c.type==="childList"?(i(this.find(c.previousSibling,!1)),Array.from(c.addedNodes).forEach(g=>{const d=this.find(g,!1);i(d,!1),d instanceof dt&&d.children.forEach(m=>{i(m,!1)})})):c.type==="attributes"&&i(h.prev)),i(h))}),this.children.forEach(o),a=Array.from(this.observer.takeRecords()),s=a.slice();s.length>0;)e.push(s.pop())}}update(e,t={}){e=e||this.observer.takeRecords();const r=new WeakMap;e.map(s=>{const i=this.find(s.target,!0);return i==null?null:r.has(i.domNode)?(r.get(i.domNode).push(s),null):(r.set(i.domNode,[s]),i)}).forEach(s=>{s!=null&&s!==this&&r.has(s.domNode)&&s.update(r.get(s.domNode)||[],t)}),t.mutationsMap=r,r.has(this.domNode)&&super.update(r.get(this.domNode),t),this.optimize(e,t)}};Yr.blotName="scroll",Yr.defaultChild=Yn,Yr.allowedChildren=[Yn,bi],Yr.scope=ne.BLOCK_BLOT,Yr.tagName="DIV";let Ov=Yr;const Za=Ov,pa=class Ah extends Fe{static create(e){return document.createTextNode(e)}static value(e){return e.data}constructor(e,t){super(e,t),this.text=this.statics.value(this.domNode)}deleteAt(e,t){this.domNode.data=this.text=this.text.slice(0,e)+this.text.slice(e+t)}index(e,t){return this.domNode===e?t:-1}insertAt(e,t,r){r==null?(this.text=this.text.slice(0,e)+t+this.text.slice(e),this.domNode.data=this.text):super.insertAt(e,t,r)}length(){return this.text.length}optimize(e){super.optimize(e),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof Ah&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())}position(e,t=!1){return[this.domNode,e]}split(e,t=!1){if(!t){if(e===0)return this;if(e===this.length())return this.next}const r=this.scroll.create(this.domNode.splitText(e));return this.parent.insertBefore(r,this.next||void 0),this.text=this.statics.value(this.domNode),r}update(e,t){e.some(r=>r.type==="characterData"&&r.target===this.domNode)&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};pa.blotName="text",pa.scope=ne.INLINE_BLOT;let Lv=pa;const ri=Lv,Mv=Object.freeze(Object.defineProperty({__proto__:null,Attributor:At,AttributorStore:yi,BlockBlot:Yn,ClassAttributor:pt,ContainerBlot:bi,EmbedBlot:We,InlineBlot:Ya,LeafBlot:Fe,ParentBlot:dt,Registry:un,Scope:ne,ScrollBlot:Za,StyleAttributor:ir,TextBlot:ri},Symbol.toStringTag,{value:"Module"}));var Ts={exports:{}},Io,uu;function Dv(){if(uu)return Io;uu=1;var n=-1,e=1,t=0;function r(b,M,A,$,V){if(b===M)return b?[[t,b]]:[];if(A!=null){var R=ue(b,M,A);if(R)return R}var q=a(b,M),W=b.substring(0,q);b=b.substring(q),M=M.substring(q),q=c(b,M);var Y=b.substring(b.length-q);b=b.substring(0,b.length-q),M=M.substring(0,M.length-q);var T=s(b,M);return W&&T.unshift([t,W]),Y&&T.push([t,Y]),S(T,V),$&&g(T),T}function s(b,M){var A;if(!b)return[[e,M]];if(!M)return[[n,b]];var $=b.length>M.length?b:M,V=b.length>M.length?M:b,R=$.indexOf(V);if(R!==-1)return A=[[e,$.substring(0,R)],[t,V],[e,$.substring(R+V.length)]],b.length>M.length&&(A[0][0]=A[2][0]=n),A;if(V.length===1)return[[n,b],[e,M]];var q=h(b,M);if(q){var W=q[0],Y=q[1],T=q[2],D=q[3],U=q[4],K=r(W,T),z=r(Y,D);return K.concat([[t,U]],z)}return i(b,M)}function i(b,M){for(var A=b.length,$=M.length,V=Math.ceil((A+$)/2),R=V,q=2*V,W=new Array(q),Y=new Array(q),T=0;T<q;T++)W[T]=-1,Y[T]=-1;W[R+1]=0,Y[R+1]=0;for(var D=A-$,U=D%2!==0,K=0,z=0,H=0,Q=0,F=0;F<V;F++){for(var j=-F+K;j<=F-z;j+=2){var Z=R+j,G;j===-F||j!==F&&W[Z-1]<W[Z+1]?G=W[Z+1]:G=W[Z-1]+1;for(var X=G-j;G<A&&X<$&&b.charAt(G)===M.charAt(X);)G++,X++;if(W[Z]=G,G>A)z+=2;else if(X>$)K+=2;else if(U){var k=R+D-j;if(k>=0&&k<q&&Y[k]!==-1){var ce=A-Y[k];if(G>=ce)return o(b,M,G,X)}}}for(var ge=-F+H;ge<=F-Q;ge+=2){var k=R+ge,ce;ge===-F||ge!==F&&Y[k-1]<Y[k+1]?ce=Y[k+1]:ce=Y[k-1]+1;for(var be=ce-ge;ce<A&&be<$&&b.charAt(A-ce-1)===M.charAt($-be-1);)ce++,be++;if(Y[k]=ce,ce>A)Q+=2;else if(be>$)H+=2;else if(!U){var Z=R+D-ge;if(Z>=0&&Z<q&&W[Z]!==-1){var G=W[Z],X=R+G-Z;if(ce=A-ce,G>=ce)return o(b,M,G,X)}}}}return[[n,b],[e,M]]}function o(b,M,A,$){var V=b.substring(0,A),R=M.substring(0,$),q=b.substring(A),W=M.substring($),Y=r(V,R),T=r(q,W);return Y.concat(T)}function a(b,M){if(!b||!M||b.charAt(0)!==M.charAt(0))return 0;for(var A=0,$=Math.min(b.length,M.length),V=$,R=0;A<V;)b.substring(R,V)==M.substring(R,V)?(A=V,R=A):$=V,V=Math.floor(($-A)/2+A);return x(b.charCodeAt(V-1))&&V--,V}function u(b,M){var A=b.length,$=M.length;if(A==0||$==0)return 0;A>$?b=b.substring(A-$):A<$&&(M=M.substring(0,A));var V=Math.min(A,$);if(b==M)return V;for(var R=0,q=1;;){var W=b.substring(V-q),Y=M.indexOf(W);if(Y==-1)return R;q+=Y,(Y==0||b.substring(V-q)==M.substring(0,q))&&(R=q,q++)}}function c(b,M){if(!b||!M||b.slice(-1)!==M.slice(-1))return 0;for(var A=0,$=Math.min(b.length,M.length),V=$,R=0;A<V;)b.substring(b.length-V,b.length-R)==M.substring(M.length-V,M.length-R)?(A=V,R=A):$=V,V=Math.floor(($-A)/2+A);return N(b.charCodeAt(b.length-V))&&V--,V}function h(b,M){var A=b.length>M.length?b:M,$=b.length>M.length?M:b;if(A.length<4||$.length*2<A.length)return null;function V(z,H,Q){for(var F=z.substring(Q,Q+Math.floor(z.length/4)),j=-1,Z="",G,X,k,ce;(j=H.indexOf(F,j+1))!==-1;){var ge=a(z.substring(Q),H.substring(j)),be=c(z.substring(0,Q),H.substring(0,j));Z.length<be+ge&&(Z=H.substring(j-be,j)+H.substring(j,j+ge),G=z.substring(0,Q-be),X=z.substring(Q+ge),k=H.substring(0,j-be),ce=H.substring(j+ge))}return Z.length*2>=z.length?[G,X,k,ce,Z]:null}var R=V(A,$,Math.ceil(A.length/4)),q=V(A,$,Math.ceil(A.length/2)),W;if(!R&&!q)return null;q?R?W=R[4].length>q[4].length?R:q:W=q:W=R;var Y,T,D,U;b.length>M.length?(Y=W[0],T=W[1],D=W[2],U=W[3]):(D=W[0],U=W[1],Y=W[2],T=W[3]);var K=W[4];return[Y,T,D,U,K]}function g(b){for(var M=!1,A=[],$=0,V=null,R=0,q=0,W=0,Y=0,T=0;R<b.length;)b[R][0]==t?(A[$++]=R,q=Y,W=T,Y=0,T=0,V=b[R][1]):(b[R][0]==e?Y+=b[R][1].length:T+=b[R][1].length,V&&V.length<=Math.max(q,W)&&V.length<=Math.max(Y,T)&&(b.splice(A[$-1],0,[n,V]),b[A[$-1]+1][0]=e,$--,$--,R=$>0?A[$-1]:-1,q=0,W=0,Y=0,T=0,V=null,M=!0)),R++;for(M&&S(b),E(b),R=1;R<b.length;){if(b[R-1][0]==n&&b[R][0]==e){var D=b[R-1][1],U=b[R][1],K=u(D,U),z=u(U,D);K>=z?(K>=D.length/2||K>=U.length/2)&&(b.splice(R,0,[t,U.substring(0,K)]),b[R-1][1]=D.substring(0,D.length-K),b[R+1][1]=U.substring(K),R++):(z>=D.length/2||z>=U.length/2)&&(b.splice(R,0,[t,D.substring(0,z)]),b[R-1][0]=e,b[R-1][1]=U.substring(0,U.length-z),b[R+1][0]=n,b[R+1][1]=D.substring(z),R++),R++}R++}}var d=/[^a-zA-Z0-9]/,m=/\s/,v=/[\r\n]/,p=/\n\r?\n$/,y=/^\r?\n\r?\n/;function E(b){function M(z,H){if(!z||!H)return 6;var Q=z.charAt(z.length-1),F=H.charAt(0),j=Q.match(d),Z=F.match(d),G=j&&Q.match(m),X=Z&&F.match(m),k=G&&Q.match(v),ce=X&&F.match(v),ge=k&&z.match(p),be=ce&&H.match(y);return ge||be?5:k||ce?4:j&&!G&&X?3:G||X?2:j||Z?1:0}for(var A=1;A<b.length-1;){if(b[A-1][0]==t&&b[A+1][0]==t){var $=b[A-1][1],V=b[A][1],R=b[A+1][1],q=c($,V);if(q){var W=V.substring(V.length-q);$=$.substring(0,$.length-q),V=W+V.substring(0,V.length-q),R=W+R}for(var Y=$,T=V,D=R,U=M($,V)+M(V,R);V.charAt(0)===R.charAt(0);){$+=V.charAt(0),V=V.substring(1)+R.charAt(0),R=R.substring(1);var K=M($,V)+M(V,R);K>=U&&(U=K,Y=$,T=V,D=R)}b[A-1][1]!=Y&&(Y?b[A-1][1]=Y:(b.splice(A-1,1),A--),b[A][1]=T,D?b[A+1][1]=D:(b.splice(A+1,1),A--))}A++}}function S(b,M){b.push([t,""]);for(var A=0,$=0,V=0,R="",q="",W;A<b.length;){if(A<b.length-1&&!b[A][1]){b.splice(A,1);continue}switch(b[A][0]){case e:V++,q+=b[A][1],A++;break;case n:$++,R+=b[A][1],A++;break;case t:var Y=A-V-$-1;if(M){if(Y>=0&&P(b[Y][1])){var T=b[Y][1].slice(-1);if(b[Y][1]=b[Y][1].slice(0,-1),R=T+R,q=T+q,!b[Y][1]){b.splice(Y,1),A--;var D=Y-1;b[D]&&b[D][0]===e&&(V++,q=b[D][1]+q,D--),b[D]&&b[D][0]===n&&($++,R=b[D][1]+R,D--),Y=D}}if(_(b[A][1])){var T=b[A][1].charAt(0);b[A][1]=b[A][1].slice(1),R+=T,q+=T}}if(A<b.length-1&&!b[A][1]){b.splice(A,1);break}if(R.length>0||q.length>0){R.length>0&&q.length>0&&(W=a(q,R),W!==0&&(Y>=0?b[Y][1]+=q.substring(0,W):(b.splice(0,0,[t,q.substring(0,W)]),A++),q=q.substring(W),R=R.substring(W)),W=c(q,R),W!==0&&(b[A][1]=q.substring(q.length-W)+b[A][1],q=q.substring(0,q.length-W),R=R.substring(0,R.length-W)));var U=V+$;R.length===0&&q.length===0?(b.splice(A-U,U),A=A-U):R.length===0?(b.splice(A-U,U,[e,q]),A=A-U+1):q.length===0?(b.splice(A-U,U,[n,R]),A=A-U+1):(b.splice(A-U,U,[n,R],[e,q]),A=A-U+2)}A!==0&&b[A-1][0]===t?(b[A-1][1]+=b[A][1],b.splice(A,1)):A++,V=0,$=0,R="",q="";break}}b[b.length-1][1]===""&&b.pop();var K=!1;for(A=1;A<b.length-1;)b[A-1][0]===t&&b[A+1][0]===t&&(b[A][1].substring(b[A][1].length-b[A-1][1].length)===b[A-1][1]?(b[A][1]=b[A-1][1]+b[A][1].substring(0,b[A][1].length-b[A-1][1].length),b[A+1][1]=b[A-1][1]+b[A+1][1],b.splice(A-1,1),K=!0):b[A][1].substring(0,b[A+1][1].length)==b[A+1][1]&&(b[A-1][1]+=b[A+1][1],b[A][1]=b[A][1].substring(b[A+1][1].length)+b[A+1][1],b.splice(A+1,1),K=!0)),A++;K&&S(b,M)}function x(b){return b>=55296&&b<=56319}function N(b){return b>=56320&&b<=57343}function _(b){return N(b.charCodeAt(0))}function P(b){return x(b.charCodeAt(b.length-1))}function I(b){for(var M=[],A=0;A<b.length;A++)b[A][1].length>0&&M.push(b[A]);return M}function te(b,M,A,$){return P(b)||_($)?null:I([[t,b],[n,M],[e,A],[t,$]])}function ue(b,M,A){var $=typeof A=="number"?{index:A,length:0}:A.oldRange,V=typeof A=="number"?null:A.newRange,R=b.length,q=M.length;if($.length===0&&(V===null||V.length===0)){var W=$.index,Y=b.slice(0,W),T=b.slice(W),D=V?V.index:null;e:{var U=W+q-R;if(D!==null&&D!==U||U<0||U>q)break e;var K=M.slice(0,U),z=M.slice(U);if(z!==T)break e;var H=Math.min(W,U),Q=Y.slice(0,H),F=K.slice(0,H);if(Q!==F)break e;var j=Y.slice(H),Z=K.slice(H);return te(Q,j,Z,T)}e:{if(D!==null&&D!==W)break e;var G=W,K=M.slice(0,G),z=M.slice(G);if(K!==Y)break e;var X=Math.min(R-G,q-G),k=T.slice(T.length-X),ce=z.slice(z.length-X);if(k!==ce)break e;var j=T.slice(0,T.length-X),Z=z.slice(0,z.length-X);return te(Y,j,Z,k)}}if($.length>0&&V&&V.length===0)e:{var Q=b.slice(0,$.index),k=b.slice($.index+$.length),H=Q.length,X=k.length;if(q<H+X)break e;var F=M.slice(0,H),ce=M.slice(q-X);if(Q!==F||k!==ce)break e;var j=b.slice(H,R-X),Z=M.slice(H,q-X);return te(Q,j,Z,k)}return null}function ie(b,M,A,$){return r(b,M,A,$,!0)}return ie.INSERT=e,ie.DELETE=n,ie.EQUAL=t,Io=ie,Io}var Pn={exports:{}};Pn.exports;var cu;function Ch(){return cu||(cu=1,(function(n,e){var t=200,r="__lodash_hash_undefined__",s=9007199254740991,i="[object Arguments]",o="[object Array]",a="[object Boolean]",u="[object Date]",c="[object Error]",h="[object Function]",g="[object GeneratorFunction]",d="[object Map]",m="[object Number]",v="[object Object]",p="[object Promise]",y="[object RegExp]",E="[object Set]",S="[object String]",x="[object Symbol]",N="[object WeakMap]",_="[object ArrayBuffer]",P="[object DataView]",I="[object Float32Array]",te="[object Float64Array]",ue="[object Int8Array]",ie="[object Int16Array]",b="[object Int32Array]",M="[object Uint8Array]",A="[object Uint8ClampedArray]",$="[object Uint16Array]",V="[object Uint32Array]",R=/[\\^$.*+?()[\]{}|]/g,q=/\w*$/,W=/^\[object .+?Constructor\]$/,Y=/^(?:0|[1-9]\d*)$/,T={};T[i]=T[o]=T[_]=T[P]=T[a]=T[u]=T[I]=T[te]=T[ue]=T[ie]=T[b]=T[d]=T[m]=T[v]=T[y]=T[E]=T[S]=T[x]=T[M]=T[A]=T[$]=T[V]=!0,T[c]=T[h]=T[N]=!1;var D=typeof ct.commonjsGlobal=="object"&&ct.commonjsGlobal&&ct.commonjsGlobal.Object===Object&&ct.commonjsGlobal,U=typeof self=="object"&&self&&self.Object===Object&&self,K=D||U||Function("return this")(),z=e&&!e.nodeType&&e,H=z&&!0&&n&&!n.nodeType&&n,Q=H&&H.exports===z;function F(l,f){return l.set(f[0],f[1]),l}function j(l,f){return l.add(f),l}function Z(l,f){for(var w=-1,L=l?l.length:0;++w<L&&f(l[w],w,l)!==!1;);return l}function G(l,f){for(var w=-1,L=f.length,de=l.length;++w<L;)l[de+w]=f[w];return l}function X(l,f,w,L){for(var de=-1,oe=l?l.length:0;++de<oe;)w=f(w,l[de],de,l);return w}function k(l,f){for(var w=-1,L=Array(l);++w<l;)L[w]=f(w);return L}function ce(l,f){return l==null?void 0:l[f]}function ge(l){var f=!1;if(l!=null&&typeof l.toString!="function")try{f=!!(l+"")}catch{}return f}function be(l){var f=-1,w=Array(l.size);return l.forEach(function(L,de){w[++f]=[de,L]}),w}function kt(l,f){return function(w){return l(f(w))}}function Ut(l){var f=-1,w=Array(l.size);return l.forEach(function(L){w[++f]=L}),w}var Mi=Array.prototype,Di=Function.prototype,Lr=Object.prototype,vn=K["__core-js_shared__"],os=(function(){var l=/[^.]+$/.exec(vn&&vn.keys&&vn.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""})(),as=Di.toString,vt=Lr.hasOwnProperty,Mr=Lr.toString,Pi=RegExp("^"+as.call(vt).replace(R,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),lr=Q?K.Buffer:void 0,Dr=K.Symbol,yn=K.Uint8Array,Ye=kt(Object.getPrototypeOf,Object),ls=Object.create,us=Lr.propertyIsEnumerable,Bi=Mi.splice,bn=Object.getOwnPropertySymbols,Pr=lr?lr.isBuffer:void 0,cs=kt(Object.keys,Object),Br=nt(K,"DataView"),ur=nt(K,"Map"),rt=nt(K,"Promise"),qr=nt(K,"Set"),En=nt(K,"WeakMap"),cr=nt(Object,"create"),wn=Ue(Br),hr=Ue(ur),xn=Ue(rt),Sn=Ue(qr),_n=Ue(En),Ht=Dr?Dr.prototype:void 0,hs=Ht?Ht.valueOf:void 0;function Nt(l){var f=-1,w=l?l.length:0;for(this.clear();++f<w;){var L=l[f];this.set(L[0],L[1])}}function qi(){this.__data__=cr?cr(null):{}}function Fi(l){return this.has(l)&&delete this.__data__[l]}function ji(l){var f=this.__data__;if(cr){var w=f[l];return w===r?void 0:w}return vt.call(f,l)?f[l]:void 0}function ds(l){var f=this.__data__;return cr?f[l]!==void 0:vt.call(f,l)}function An(l,f){var w=this.__data__;return w[l]=cr&&f===void 0?r:f,this}Nt.prototype.clear=qi,Nt.prototype.delete=Fi,Nt.prototype.get=ji,Nt.prototype.has=ds,Nt.prototype.set=An;function Le(l){var f=-1,w=l?l.length:0;for(this.clear();++f<w;){var L=l[f];this.set(L[0],L[1])}}function $i(){this.__data__=[]}function Vi(l){var f=this.__data__,w=jr(f,l);if(w<0)return!1;var L=f.length-1;return w==L?f.pop():Bi.call(f,w,1),!0}function Ui(l){var f=this.__data__,w=jr(f,l);return w<0?void 0:f[w][1]}function Hi(l){return jr(this.__data__,l)>-1}function zi(l,f){var w=this.__data__,L=jr(w,l);return L<0?w.push([l,f]):w[L][1]=f,this}Le.prototype.clear=$i,Le.prototype.delete=Vi,Le.prototype.get=Ui,Le.prototype.has=Hi,Le.prototype.set=zi;function Pe(l){var f=-1,w=l?l.length:0;for(this.clear();++f<w;){var L=l[f];this.set(L[0],L[1])}}function Gi(){this.__data__={hash:new Nt,map:new(ur||Le),string:new Nt}}function Ki(l){return fr(this,l).delete(l)}function Wi(l){return fr(this,l).get(l)}function Yi(l){return fr(this,l).has(l)}function Zi(l,f){return fr(this,l).set(l,f),this}Pe.prototype.clear=Gi,Pe.prototype.delete=Ki,Pe.prototype.get=Wi,Pe.prototype.has=Yi,Pe.prototype.set=Zi;function He(l){this.__data__=new Le(l)}function Xi(){this.__data__=new Le}function Qi(l){return this.__data__.delete(l)}function Ji(l){return this.__data__.get(l)}function eo(l){return this.__data__.has(l)}function to(l,f){var w=this.__data__;if(w instanceof Le){var L=w.__data__;if(!ur||L.length<t-1)return L.push([l,f]),this;w=this.__data__=new Pe(L)}return w.set(l,f),this}He.prototype.clear=Xi,He.prototype.delete=Qi,He.prototype.get=Ji,He.prototype.has=eo,He.prototype.set=to;function Fr(l,f){var w=Nn(l)||Vr(l)?k(l.length,String):[],L=w.length,de=!!L;for(var oe in l)vt.call(l,oe)&&!(de&&(oe=="length"||mo(oe,L)))&&w.push(oe);return w}function fs(l,f,w){var L=l[f];(!(vt.call(l,f)&&ys(L,w))||w===void 0&&!(f in l))&&(l[f]=w)}function jr(l,f){for(var w=l.length;w--;)if(ys(l[w][0],f))return w;return-1}function yt(l,f){return l&&kn(f,Rn(f),l)}function Cn(l,f,w,L,de,oe,ve){var me;if(L&&(me=oe?L(l,de,oe,ve):L(l)),me!==void 0)return me;if(!Et(l))return l;var ke=Nn(l);if(ke){if(me=po(l),!f)return co(l,me)}else{var Ee=Rt(l),Be=Ee==h||Ee==g;if(bs(l))return $r(l,f);if(Ee==v||Ee==i||Be&&!oe){if(ge(l))return oe?l:{};if(me=bt(Be?{}:l),!f)return ho(l,yt(me,l))}else{if(!T[Ee])return oe?l:{};me=go(l,Ee,Cn,f)}}ve||(ve=new He);var ze=ve.get(l);if(ze)return ze;if(ve.set(l,me),!ke)var Ie=w?fo(l):Rn(l);return Z(Ie||l,function(qe,Me){Ie&&(Me=qe,qe=l[Me]),fs(me,Me,Cn(qe,f,w,L,Me,l,ve))}),me}function ro(l){return Et(l)?ls(l):{}}function no(l,f,w){var L=f(l);return Nn(l)?L:G(L,w(l))}function so(l){return Mr.call(l)}function io(l){if(!Et(l)||yo(l))return!1;var f=In(l)||ge(l)?Pi:W;return f.test(Ue(l))}function oo(l){if(!ms(l))return cs(l);var f=[];for(var w in Object(l))vt.call(l,w)&&w!="constructor"&&f.push(w);return f}function $r(l,f){if(f)return l.slice();var w=new l.constructor(l.length);return l.copy(w),w}function Tn(l){var f=new l.constructor(l.byteLength);return new yn(f).set(new yn(l)),f}function dr(l,f){var w=f?Tn(l.buffer):l.buffer;return new l.constructor(w,l.byteOffset,l.byteLength)}function ps(l,f,w){var L=f?w(be(l),!0):be(l);return X(L,F,new l.constructor)}function gs(l){var f=new l.constructor(l.source,q.exec(l));return f.lastIndex=l.lastIndex,f}function ao(l,f,w){var L=f?w(Ut(l),!0):Ut(l);return X(L,j,new l.constructor)}function lo(l){return hs?Object(hs.call(l)):{}}function uo(l,f){var w=f?Tn(l.buffer):l.buffer;return new l.constructor(w,l.byteOffset,l.length)}function co(l,f){var w=-1,L=l.length;for(f||(f=Array(L));++w<L;)f[w]=l[w];return f}function kn(l,f,w,L){w||(w={});for(var de=-1,oe=f.length;++de<oe;){var ve=f[de],me=void 0;fs(w,ve,me===void 0?l[ve]:me)}return w}function ho(l,f){return kn(l,It(l),f)}function fo(l){return no(l,Rn,It)}function fr(l,f){var w=l.__data__;return vo(f)?w[typeof f=="string"?"string":"hash"]:w.map}function nt(l,f){var w=ce(l,f);return io(w)?w:void 0}var It=bn?kt(bn,Object):Eo,Rt=so;(Br&&Rt(new Br(new ArrayBuffer(1)))!=P||ur&&Rt(new ur)!=d||rt&&Rt(rt.resolve())!=p||qr&&Rt(new qr)!=E||En&&Rt(new En)!=N)&&(Rt=function(l){var f=Mr.call(l),w=f==v?l.constructor:void 0,L=w?Ue(w):void 0;if(L)switch(L){case wn:return P;case hr:return d;case xn:return p;case Sn:return E;case _n:return N}return f});function po(l){var f=l.length,w=l.constructor(f);return f&&typeof l[0]=="string"&&vt.call(l,"index")&&(w.index=l.index,w.input=l.input),w}function bt(l){return typeof l.constructor=="function"&&!ms(l)?ro(Ye(l)):{}}function go(l,f,w,L){var de=l.constructor;switch(f){case _:return Tn(l);case a:case u:return new de(+l);case P:return dr(l,L);case I:case te:case ue:case ie:case b:case M:case A:case $:case V:return uo(l,L);case d:return ps(l,L,w);case m:case S:return new de(l);case y:return gs(l);case E:return ao(l,L,w);case x:return lo(l)}}function mo(l,f){return f=f??s,!!f&&(typeof l=="number"||Y.test(l))&&l>-1&&l%1==0&&l<f}function vo(l){var f=typeof l;return f=="string"||f=="number"||f=="symbol"||f=="boolean"?l!=="__proto__":l===null}function yo(l){return!!os&&os in l}function ms(l){var f=l&&l.constructor,w=typeof f=="function"&&f.prototype||Lr;return l===w}function Ue(l){if(l!=null){try{return as.call(l)}catch{}try{return l+""}catch{}}return""}function vs(l){return Cn(l,!0,!0)}function ys(l,f){return l===f||l!==l&&f!==f}function Vr(l){return bo(l)&&vt.call(l,"callee")&&(!us.call(l,"callee")||Mr.call(l)==i)}var Nn=Array.isArray;function Ur(l){return l!=null&&Es(l.length)&&!In(l)}function bo(l){return ws(l)&&Ur(l)}var bs=Pr||wo;function In(l){var f=Et(l)?Mr.call(l):"";return f==h||f==g}function Es(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=s}function Et(l){var f=typeof l;return!!l&&(f=="object"||f=="function")}function ws(l){return!!l&&typeof l=="object"}function Rn(l){return Ur(l)?Fr(l):oo(l)}function Eo(){return[]}function wo(){return!1}n.exports=vs})(Pn,Pn.exports)),Pn.exports}var Bn={exports:{}};Bn.exports;var hu;function Th(){return hu||(hu=1,(function(n,e){var t=200,r="__lodash_hash_undefined__",s=1,i=2,o=9007199254740991,a="[object Arguments]",u="[object Array]",c="[object AsyncFunction]",h="[object Boolean]",g="[object Date]",d="[object Error]",m="[object Function]",v="[object GeneratorFunction]",p="[object Map]",y="[object Number]",E="[object Null]",S="[object Object]",x="[object Promise]",N="[object Proxy]",_="[object RegExp]",P="[object Set]",I="[object String]",te="[object Symbol]",ue="[object Undefined]",ie="[object WeakMap]",b="[object ArrayBuffer]",M="[object DataView]",A="[object Float32Array]",$="[object Float64Array]",V="[object Int8Array]",R="[object Int16Array]",q="[object Int32Array]",W="[object Uint8Array]",Y="[object Uint8ClampedArray]",T="[object Uint16Array]",D="[object Uint32Array]",U=/[\\^$.*+?()[\]{}|]/g,K=/^\[object .+?Constructor\]$/,z=/^(?:0|[1-9]\d*)$/,H={};H[A]=H[$]=H[V]=H[R]=H[q]=H[W]=H[Y]=H[T]=H[D]=!0,H[a]=H[u]=H[b]=H[h]=H[M]=H[g]=H[d]=H[m]=H[p]=H[y]=H[S]=H[_]=H[P]=H[I]=H[ie]=!1;var Q=typeof ct.commonjsGlobal=="object"&&ct.commonjsGlobal&&ct.commonjsGlobal.Object===Object&&ct.commonjsGlobal,F=typeof self=="object"&&self&&self.Object===Object&&self,j=Q||F||Function("return this")(),Z=e&&!e.nodeType&&e,G=Z&&!0&&n&&!n.nodeType&&n,X=G&&G.exports===Z,k=X&&Q.process,ce=(function(){try{return k&&k.binding&&k.binding("util")}catch{}})(),ge=ce&&ce.isTypedArray;function be(l,f){for(var w=-1,L=l==null?0:l.length,de=0,oe=[];++w<L;){var ve=l[w];f(ve,w,l)&&(oe[de++]=ve)}return oe}function kt(l,f){for(var w=-1,L=f.length,de=l.length;++w<L;)l[de+w]=f[w];return l}function Ut(l,f){for(var w=-1,L=l==null?0:l.length;++w<L;)if(f(l[w],w,l))return!0;return!1}function Mi(l,f){for(var w=-1,L=Array(l);++w<l;)L[w]=f(w);return L}function Di(l){return function(f){return l(f)}}function Lr(l,f){return l.has(f)}function vn(l,f){return l==null?void 0:l[f]}function os(l){var f=-1,w=Array(l.size);return l.forEach(function(L,de){w[++f]=[de,L]}),w}function as(l,f){return function(w){return l(f(w))}}function vt(l){var f=-1,w=Array(l.size);return l.forEach(function(L){w[++f]=L}),w}var Mr=Array.prototype,Pi=Function.prototype,lr=Object.prototype,Dr=j["__core-js_shared__"],yn=Pi.toString,Ye=lr.hasOwnProperty,ls=(function(){var l=/[^.]+$/.exec(Dr&&Dr.keys&&Dr.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""})(),us=lr.toString,Bi=RegExp("^"+yn.call(Ye).replace(U,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),bn=X?j.Buffer:void 0,Pr=j.Symbol,cs=j.Uint8Array,Br=lr.propertyIsEnumerable,ur=Mr.splice,rt=Pr?Pr.toStringTag:void 0,qr=Object.getOwnPropertySymbols,En=bn?bn.isBuffer:void 0,cr=as(Object.keys,Object),wn=It(j,"DataView"),hr=It(j,"Map"),xn=It(j,"Promise"),Sn=It(j,"Set"),_n=It(j,"WeakMap"),Ht=It(Object,"create"),hs=Ue(wn),Nt=Ue(hr),qi=Ue(xn),Fi=Ue(Sn),ji=Ue(_n),ds=Pr?Pr.prototype:void 0,An=ds?ds.valueOf:void 0;function Le(l){var f=-1,w=l==null?0:l.length;for(this.clear();++f<w;){var L=l[f];this.set(L[0],L[1])}}function $i(){this.__data__=Ht?Ht(null):{},this.size=0}function Vi(l){var f=this.has(l)&&delete this.__data__[l];return this.size-=f?1:0,f}function Ui(l){var f=this.__data__;if(Ht){var w=f[l];return w===r?void 0:w}return Ye.call(f,l)?f[l]:void 0}function Hi(l){var f=this.__data__;return Ht?f[l]!==void 0:Ye.call(f,l)}function zi(l,f){var w=this.__data__;return this.size+=this.has(l)?0:1,w[l]=Ht&&f===void 0?r:f,this}Le.prototype.clear=$i,Le.prototype.delete=Vi,Le.prototype.get=Ui,Le.prototype.has=Hi,Le.prototype.set=zi;function Pe(l){var f=-1,w=l==null?0:l.length;for(this.clear();++f<w;){var L=l[f];this.set(L[0],L[1])}}function Gi(){this.__data__=[],this.size=0}function Ki(l){var f=this.__data__,w=$r(f,l);if(w<0)return!1;var L=f.length-1;return w==L?f.pop():ur.call(f,w,1),--this.size,!0}function Wi(l){var f=this.__data__,w=$r(f,l);return w<0?void 0:f[w][1]}function Yi(l){return $r(this.__data__,l)>-1}function Zi(l,f){var w=this.__data__,L=$r(w,l);return L<0?(++this.size,w.push([l,f])):w[L][1]=f,this}Pe.prototype.clear=Gi,Pe.prototype.delete=Ki,Pe.prototype.get=Wi,Pe.prototype.has=Yi,Pe.prototype.set=Zi;function He(l){var f=-1,w=l==null?0:l.length;for(this.clear();++f<w;){var L=l[f];this.set(L[0],L[1])}}function Xi(){this.size=0,this.__data__={hash:new Le,map:new(hr||Pe),string:new Le}}function Qi(l){var f=nt(this,l).delete(l);return this.size-=f?1:0,f}function Ji(l){return nt(this,l).get(l)}function eo(l){return nt(this,l).has(l)}function to(l,f){var w=nt(this,l),L=w.size;return w.set(l,f),this.size+=w.size==L?0:1,this}He.prototype.clear=Xi,He.prototype.delete=Qi,He.prototype.get=Ji,He.prototype.has=eo,He.prototype.set=to;function Fr(l){var f=-1,w=l==null?0:l.length;for(this.__data__=new He;++f<w;)this.add(l[f])}function fs(l){return this.__data__.set(l,r),this}function jr(l){return this.__data__.has(l)}Fr.prototype.add=Fr.prototype.push=fs,Fr.prototype.has=jr;function yt(l){var f=this.__data__=new Pe(l);this.size=f.size}function Cn(){this.__data__=new Pe,this.size=0}function ro(l){var f=this.__data__,w=f.delete(l);return this.size=f.size,w}function no(l){return this.__data__.get(l)}function so(l){return this.__data__.has(l)}function io(l,f){var w=this.__data__;if(w instanceof Pe){var L=w.__data__;if(!hr||L.length<t-1)return L.push([l,f]),this.size=++w.size,this;w=this.__data__=new He(L)}return w.set(l,f),this.size=w.size,this}yt.prototype.clear=Cn,yt.prototype.delete=ro,yt.prototype.get=no,yt.prototype.has=so,yt.prototype.set=io;function oo(l,f){var w=Vr(l),L=!w&&ys(l),de=!w&&!L&&Ur(l),oe=!w&&!L&&!de&&ws(l),ve=w||L||de||oe,me=ve?Mi(l.length,String):[],ke=me.length;for(var Ee in l)Ye.call(l,Ee)&&!(ve&&(Ee=="length"||de&&(Ee=="offset"||Ee=="parent")||oe&&(Ee=="buffer"||Ee=="byteLength"||Ee=="byteOffset")||go(Ee,ke)))&&me.push(Ee);return me}function $r(l,f){for(var w=l.length;w--;)if(vs(l[w][0],f))return w;return-1}function Tn(l,f,w){var L=f(l);return Vr(l)?L:kt(L,w(l))}function dr(l){return l==null?l===void 0?ue:E:rt&&rt in Object(l)?Rt(l):ms(l)}function ps(l){return Et(l)&&dr(l)==a}function gs(l,f,w,L,de){return l===f?!0:l==null||f==null||!Et(l)&&!Et(f)?l!==l&&f!==f:ao(l,f,w,L,gs,de)}function ao(l,f,w,L,de,oe){var ve=Vr(l),me=Vr(f),ke=ve?u:bt(l),Ee=me?u:bt(f);ke=ke==a?S:ke,Ee=Ee==a?S:Ee;var Be=ke==S,ze=Ee==S,Ie=ke==Ee;if(Ie&&Ur(l)){if(!Ur(f))return!1;ve=!0,Be=!1}if(Ie&&!Be)return oe||(oe=new yt),ve||ws(l)?kn(l,f,w,L,de,oe):ho(l,f,ke,w,L,de,oe);if(!(w&s)){var qe=Be&&Ye.call(l,"__wrapped__"),Me=ze&&Ye.call(f,"__wrapped__");if(qe||Me){var zt=qe?l.value():l,Ot=Me?f.value():f;return oe||(oe=new yt),de(zt,Ot,w,L,oe)}}return Ie?(oe||(oe=new yt),fo(l,f,w,L,de,oe)):!1}function lo(l){if(!Es(l)||vo(l))return!1;var f=bs(l)?Bi:K;return f.test(Ue(l))}function uo(l){return Et(l)&&In(l.length)&&!!H[dr(l)]}function co(l){if(!yo(l))return cr(l);var f=[];for(var w in Object(l))Ye.call(l,w)&&w!="constructor"&&f.push(w);return f}function kn(l,f,w,L,de,oe){var ve=w&s,me=l.length,ke=f.length;if(me!=ke&&!(ve&&ke>me))return!1;var Ee=oe.get(l);if(Ee&&oe.get(f))return Ee==f;var Be=-1,ze=!0,Ie=w&i?new Fr:void 0;for(oe.set(l,f),oe.set(f,l);++Be<me;){var qe=l[Be],Me=f[Be];if(L)var zt=ve?L(Me,qe,Be,f,l,oe):L(qe,Me,Be,l,f,oe);if(zt!==void 0){if(zt)continue;ze=!1;break}if(Ie){if(!Ut(f,function(Ot,pr){if(!Lr(Ie,pr)&&(qe===Ot||de(qe,Ot,w,L,oe)))return Ie.push(pr)})){ze=!1;break}}else if(!(qe===Me||de(qe,Me,w,L,oe))){ze=!1;break}}return oe.delete(l),oe.delete(f),ze}function ho(l,f,w,L,de,oe,ve){switch(w){case M:if(l.byteLength!=f.byteLength||l.byteOffset!=f.byteOffset)return!1;l=l.buffer,f=f.buffer;case b:return!(l.byteLength!=f.byteLength||!oe(new cs(l),new cs(f)));case h:case g:case y:return vs(+l,+f);case d:return l.name==f.name&&l.message==f.message;case _:case I:return l==f+"";case p:var me=os;case P:var ke=L&s;if(me||(me=vt),l.size!=f.size&&!ke)return!1;var Ee=ve.get(l);if(Ee)return Ee==f;L|=i,ve.set(l,f);var Be=kn(me(l),me(f),L,de,oe,ve);return ve.delete(l),Be;case te:if(An)return An.call(l)==An.call(f)}return!1}function fo(l,f,w,L,de,oe){var ve=w&s,me=fr(l),ke=me.length,Ee=fr(f),Be=Ee.length;if(ke!=Be&&!ve)return!1;for(var ze=ke;ze--;){var Ie=me[ze];if(!(ve?Ie in f:Ye.call(f,Ie)))return!1}var qe=oe.get(l);if(qe&&oe.get(f))return qe==f;var Me=!0;oe.set(l,f),oe.set(f,l);for(var zt=ve;++ze<ke;){Ie=me[ze];var Ot=l[Ie],pr=f[Ie];if(L)var gl=ve?L(pr,Ot,Ie,f,l,oe):L(Ot,pr,Ie,l,f,oe);if(!(gl===void 0?Ot===pr||de(Ot,pr,w,L,oe):gl)){Me=!1;break}zt||(zt=Ie=="constructor")}if(Me&&!zt){var xs=l.constructor,Ss=f.constructor;xs!=Ss&&"constructor"in l&&"constructor"in f&&!(typeof xs=="function"&&xs instanceof xs&&typeof Ss=="function"&&Ss instanceof Ss)&&(Me=!1)}return oe.delete(l),oe.delete(f),Me}function fr(l){return Tn(l,Rn,po)}function nt(l,f){var w=l.__data__;return mo(f)?w[typeof f=="string"?"string":"hash"]:w.map}function It(l,f){var w=vn(l,f);return lo(w)?w:void 0}function Rt(l){var f=Ye.call(l,rt),w=l[rt];try{l[rt]=void 0;var L=!0}catch{}var de=us.call(l);return L&&(f?l[rt]=w:delete l[rt]),de}var po=qr?function(l){return l==null?[]:(l=Object(l),be(qr(l),function(f){return Br.call(l,f)}))}:Eo,bt=dr;(wn&&bt(new wn(new ArrayBuffer(1)))!=M||hr&&bt(new hr)!=p||xn&&bt(xn.resolve())!=x||Sn&&bt(new Sn)!=P||_n&&bt(new _n)!=ie)&&(bt=function(l){var f=dr(l),w=f==S?l.constructor:void 0,L=w?Ue(w):"";if(L)switch(L){case hs:return M;case Nt:return p;case qi:return x;case Fi:return P;case ji:return ie}return f});function go(l,f){return f=f??o,!!f&&(typeof l=="number"||z.test(l))&&l>-1&&l%1==0&&l<f}function mo(l){var f=typeof l;return f=="string"||f=="number"||f=="symbol"||f=="boolean"?l!=="__proto__":l===null}function vo(l){return!!ls&&ls in l}function yo(l){var f=l&&l.constructor,w=typeof f=="function"&&f.prototype||lr;return l===w}function ms(l){return us.call(l)}function Ue(l){if(l!=null){try{return yn.call(l)}catch{}try{return l+""}catch{}}return""}function vs(l,f){return l===f||l!==l&&f!==f}var ys=ps((function(){return arguments})())?ps:function(l){return Et(l)&&Ye.call(l,"callee")&&!Br.call(l,"callee")},Vr=Array.isArray;function Nn(l){return l!=null&&In(l.length)&&!bs(l)}var Ur=En||wo;function bo(l,f){return gs(l,f)}function bs(l){if(!Es(l))return!1;var f=dr(l);return f==m||f==v||f==c||f==N}function In(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=o}function Es(l){var f=typeof l;return l!=null&&(f=="object"||f=="function")}function Et(l){return l!=null&&typeof l=="object"}var ws=ge?Di(ge):uo;function Rn(l){return Nn(l)?oo(l):co(l)}function Eo(){return[]}function wo(){return!1}n.exports=bo})(Bn,Bn.exports)),Bn.exports}var ks={},du;function Pv(){if(du)return ks;du=1,Object.defineProperty(ks,"__esModule",{value:!0});const n=Ch(),e=Th();var t;return(function(r){function s(u={},c={},h=!1){typeof u!="object"&&(u={}),typeof c!="object"&&(c={});let g=n(c);h||(g=Object.keys(g).reduce((d,m)=>(g[m]!=null&&(d[m]=g[m]),d),{}));for(const d in u)u[d]!==void 0&&c[d]===void 0&&(g[d]=u[d]);return Object.keys(g).length>0?g:void 0}r.compose=s;function i(u={},c={}){typeof u!="object"&&(u={}),typeof c!="object"&&(c={});const h=Object.keys(u).concat(Object.keys(c)).reduce((g,d)=>(e(u[d],c[d])||(g[d]=c[d]===void 0?null:c[d]),g),{});return Object.keys(h).length>0?h:void 0}r.diff=i;function o(u={},c={}){u=u||{};const h=Object.keys(c).reduce((g,d)=>(c[d]!==u[d]&&u[d]!==void 0&&(g[d]=c[d]),g),{});return Object.keys(u).reduce((g,d)=>(u[d]!==c[d]&&c[d]===void 0&&(g[d]=null),g),h)}r.invert=o;function a(u,c,h=!1){if(typeof u!="object")return c;if(typeof c!="object")return;if(!h)return c;const g=Object.keys(c).reduce((d,m)=>(u[m]===void 0&&(d[m]=c[m]),d),{});return Object.keys(g).length>0?g:void 0}r.transform=a})(t||(t={})),ks.default=t,ks}var Ns={},fu;function kh(){if(fu)return Ns;fu=1,Object.defineProperty(Ns,"__esModule",{value:!0});var n;return(function(e){function t(r){return typeof r.delete=="number"?r.delete:typeof r.retain=="number"?r.retain:typeof r.retain=="object"&&r.retain!==null?1:typeof r.insert=="string"?r.insert.length:1}e.length=t})(n||(n={})),Ns.default=n,Ns}var Is={},pu;function Bv(){if(pu)return Is;pu=1,Object.defineProperty(Is,"__esModule",{value:!0});const n=kh();class e{constructor(r){this.ops=r,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(r){r||(r=1/0);const s=this.ops[this.index];if(s){const i=this.offset,o=n.default.length(s);if(r>=o-i?(r=o-i,this.index+=1,this.offset=0):this.offset+=r,typeof s.delete=="number")return{delete:r};{const a={};return s.attributes&&(a.attributes=s.attributes),typeof s.retain=="number"?a.retain=r:typeof s.retain=="object"&&s.retain!==null?a.retain=s.retain:typeof s.insert=="string"?a.insert=s.insert.substr(i,r):a.insert=s.insert,a}}else return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?n.default.length(this.ops[this.index])-this.offset:1/0}peekType(){const r=this.ops[this.index];return r?typeof r.delete=="number"?"delete":typeof r.retain=="number"||typeof r.retain=="object"&&r.retain!==null?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);{const r=this.offset,s=this.index,i=this.next(),o=this.ops.slice(this.index);return this.offset=r,this.index=s,[i].concat(o)}}else return[]}}return Is.default=e,Is}var gu;function qv(){return gu||(gu=1,(function(n,e){Object.defineProperty(e,"__esModule",{value:!0}),e.AttributeMap=e.OpIterator=e.Op=void 0;const t=Dv(),r=Ch(),s=Th(),i=Pv();e.AttributeMap=i.default;const o=kh();e.Op=o.default;const a=Bv();e.OpIterator=a.default;const u="\0",c=(g,d)=>{if(typeof g!="object"||g===null)throw new Error(`cannot retain a ${typeof g}`);if(typeof d!="object"||d===null)throw new Error(`cannot retain a ${typeof d}`);const m=Object.keys(g)[0];if(!m||m!==Object.keys(d)[0])throw new Error(`embed types not matched: ${m} != ${Object.keys(d)[0]}`);return[m,g[m],d[m]]};class h{constructor(d){Array.isArray(d)?this.ops=d:d!=null&&Array.isArray(d.ops)?this.ops=d.ops:this.ops=[]}static registerEmbed(d,m){this.handlers[d]=m}static unregisterEmbed(d){delete this.handlers[d]}static getHandler(d){const m=this.handlers[d];if(!m)throw new Error(`no handlers for embed type "${d}"`);return m}insert(d,m){const v={};return typeof d=="string"&&d.length===0?this:(v.insert=d,m!=null&&typeof m=="object"&&Object.keys(m).length>0&&(v.attributes=m),this.push(v))}delete(d){return d<=0?this:this.push({delete:d})}retain(d,m){if(typeof d=="number"&&d<=0)return this;const v={retain:d};return m!=null&&typeof m=="object"&&Object.keys(m).length>0&&(v.attributes=m),this.push(v)}push(d){let m=this.ops.length,v=this.ops[m-1];if(d=r(d),typeof v=="object"){if(typeof d.delete=="number"&&typeof v.delete=="number")return this.ops[m-1]={delete:v.delete+d.delete},this;if(typeof v.delete=="number"&&d.insert!=null&&(m-=1,v=this.ops[m-1],typeof v!="object"))return this.ops.unshift(d),this;if(s(d.attributes,v.attributes)){if(typeof d.insert=="string"&&typeof v.insert=="string")return this.ops[m-1]={insert:v.insert+d.insert},typeof d.attributes=="object"&&(this.ops[m-1].attributes=d.attributes),this;if(typeof d.retain=="number"&&typeof v.retain=="number")return this.ops[m-1]={retain:v.retain+d.retain},typeof d.attributes=="object"&&(this.ops[m-1].attributes=d.attributes),this}}return m===this.ops.length?this.ops.push(d):this.ops.splice(m,0,d),this}chop(){const d=this.ops[this.ops.length-1];return d&&typeof d.retain=="number"&&!d.attributes&&this.ops.pop(),this}filter(d){return this.ops.filter(d)}forEach(d){this.ops.forEach(d)}map(d){return this.ops.map(d)}partition(d){const m=[],v=[];return this.forEach(p=>{(d(p)?m:v).push(p)}),[m,v]}reduce(d,m){return this.ops.reduce(d,m)}changeLength(){return this.reduce((d,m)=>m.insert?d+o.default.length(m):m.delete?d-m.delete:d,0)}length(){return this.reduce((d,m)=>d+o.default.length(m),0)}slice(d=0,m=1/0){const v=[],p=new a.default(this.ops);let y=0;for(;y<m&&p.hasNext();){let E;y<d?E=p.next(d-y):(E=p.next(m-y),v.push(E)),y+=o.default.length(E)}return new h(v)}compose(d){const m=new a.default(this.ops),v=new a.default(d.ops),p=[],y=v.peek();if(y!=null&&typeof y.retain=="number"&&y.attributes==null){let S=y.retain;for(;m.peekType()==="insert"&&m.peekLength()<=S;)S-=m.peekLength(),p.push(m.next());y.retain-S>0&&v.next(y.retain-S)}const E=new h(p);for(;m.hasNext()||v.hasNext();)if(v.peekType()==="insert")E.push(v.next());else if(m.peekType()==="delete")E.push(m.next());else{const S=Math.min(m.peekLength(),v.peekLength()),x=m.next(S),N=v.next(S);if(N.retain){const _={};if(typeof x.retain=="number")_.retain=typeof N.retain=="number"?S:N.retain;else if(typeof N.retain=="number")x.retain==null?_.insert=x.insert:_.retain=x.retain;else{const I=x.retain==null?"insert":"retain",[te,ue,ie]=c(x[I],N.retain),b=h.getHandler(te);_[I]={[te]:b.compose(ue,ie,I==="retain")}}const P=i.default.compose(x.attributes,N.attributes,typeof x.retain=="number");if(P&&(_.attributes=P),E.push(_),!v.hasNext()&&s(E.ops[E.ops.length-1],_)){const I=new h(m.rest());return E.concat(I).chop()}}else typeof N.delete=="number"&&(typeof x.retain=="number"||typeof x.retain=="object"&&x.retain!==null)&&E.push(N)}return E.chop()}concat(d){const m=new h(this.ops.slice());return d.ops.length>0&&(m.push(d.ops[0]),m.ops=m.ops.concat(d.ops.slice(1))),m}diff(d,m){if(this.ops===d.ops)return new h;const v=[this,d].map(x=>x.map(N=>{if(N.insert!=null)return typeof N.insert=="string"?N.insert:u;const _=x===d?"on":"with";throw new Error("diff() called "+_+" non-document")}).join("")),p=new h,y=t(v[0],v[1],m,!0),E=new a.default(this.ops),S=new a.default(d.ops);return y.forEach(x=>{let N=x[1].length;for(;N>0;){let _=0;switch(x[0]){case t.INSERT:_=Math.min(S.peekLength(),N),p.push(S.next(_));break;case t.DELETE:_=Math.min(N,E.peekLength()),E.next(_),p.delete(_);break;case t.EQUAL:_=Math.min(E.peekLength(),S.peekLength(),N);const P=E.next(_),I=S.next(_);s(P.insert,I.insert)?p.retain(_,i.default.diff(P.attributes,I.attributes)):p.push(I).delete(_);break}N-=_}}),p.chop()}eachLine(d,m=`
106
- `){const v=new a.default(this.ops);let p=new h,y=0;for(;v.hasNext();){if(v.peekType()!=="insert")return;const E=v.peek(),S=o.default.length(E)-v.peekLength(),x=typeof E.insert=="string"?E.insert.indexOf(m,S)-S:-1;if(x<0)p.push(v.next());else if(x>0)p.push(v.next(x));else{if(d(p,v.next(1).attributes||{},y)===!1)return;y+=1,p=new h}}p.length()>0&&d(p,{},y)}invert(d){const m=new h;return this.reduce((v,p)=>{if(p.insert)m.delete(o.default.length(p));else{if(typeof p.retain=="number"&&p.attributes==null)return m.retain(p.retain),v+p.retain;if(p.delete||typeof p.retain=="number"){const y=p.delete||p.retain;return d.slice(v,v+y).forEach(S=>{p.delete?m.push(S):p.retain&&p.attributes&&m.retain(o.default.length(S),i.default.invert(p.attributes,S.attributes))}),v+y}else if(typeof p.retain=="object"&&p.retain!==null){const y=d.slice(v,v+1),E=new a.default(y.ops).next(),[S,x,N]=c(p.retain,E.insert),_=h.getHandler(S);return m.retain({[S]:_.invert(x,N)},i.default.invert(p.attributes,E.attributes)),v+1}}return v},0),m.chop()}transform(d,m=!1){if(m=!!m,typeof d=="number")return this.transformPosition(d,m);const v=d,p=new a.default(this.ops),y=new a.default(v.ops),E=new h;for(;p.hasNext()||y.hasNext();)if(p.peekType()==="insert"&&(m||y.peekType()!=="insert"))E.retain(o.default.length(p.next()));else if(y.peekType()==="insert")E.push(y.next());else{const S=Math.min(p.peekLength(),y.peekLength()),x=p.next(S),N=y.next(S);if(x.delete)continue;if(N.delete)E.push(N);else{const _=x.retain,P=N.retain;let I=typeof P=="object"&&P!==null?P:S;if(typeof _=="object"&&_!==null&&typeof P=="object"&&P!==null){const te=Object.keys(_)[0];if(te===Object.keys(P)[0]){const ue=h.getHandler(te);ue&&(I={[te]:ue.transform(_[te],P[te],m)})}}E.retain(I,i.default.transform(x.attributes,N.attributes,m))}}return E.chop()}transformPosition(d,m=!1){m=!!m;const v=new a.default(this.ops);let p=0;for(;v.hasNext()&&p<=d;){const y=v.peekLength(),E=v.peekType();if(v.next(),E==="delete"){d-=Math.min(y,d-p);continue}else E==="insert"&&(p<d||!m)&&(d+=y);p+=y}return d}}h.Op=o.default,h.OpIterator=a.default,h.AttributeMap=i.default,h.handlers={},e.default=h,n.exports=h,n.exports.default=h})(Ts,Ts.exports)),Ts.exports}var et=qv();const re=ct.getDefaultExportFromCjs(et);class gt extends We{static value(){}optimize(){(this.prev||this.next)&&this.remove()}length(){return 0}value(){return""}}gt.blotName="break";gt.tagName="BR";let ft=class extends ri{};const Fv={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Ei(n){return n.replace(/[&<>"']/g,e=>Fv[e])}const wt=class wt extends Ya{static compare(e,t){const r=wt.order.indexOf(e),s=wt.order.indexOf(t);return r>=0||s>=0?r-s:e===t?0:e<t?-1:1}formatAt(e,t,r,s){if(wt.compare(this.statics.blotName,r)<0&&this.scroll.query(r,ne.BLOT)){const i=this.isolate(e,t);s&&i.wrap(r,s)}else super.formatAt(e,t,r,s)}optimize(e){if(super.optimize(e),this.parent instanceof wt&&wt.compare(this.statics.blotName,this.parent.statics.blotName)>0){const t=this.parent.isolate(this.offset(),this.length());this.moveChildren(t),t.wrap(this)}}};J(wt,"allowedChildren",[wt,gt,We,ft]),J(wt,"order",["cursor","inline","link","underline","strike","italic","bold","script","code"]);let Ct=wt;const mu=1;class De extends Yn{constructor(){super(...arguments);J(this,"cache",{})}delta(){return this.cache.delta==null&&(this.cache.delta=Nh(this)),this.cache.delta}deleteAt(t,r){super.deleteAt(t,r),this.cache={}}formatAt(t,r,s,i){r<=0||(this.scroll.query(s,ne.BLOCK)?t+r===this.length()&&this.format(s,i):super.formatAt(t,Math.min(r,this.length()-t-1),s,i),this.cache={})}insertAt(t,r,s){if(s!=null){super.insertAt(t,r,s),this.cache={};return}if(r.length===0)return;const i=r.split(`
107
- `),o=i.shift();o.length>0&&(t<this.length()-1||this.children.tail==null?super.insertAt(Math.min(t,this.length()-1),o):this.children.tail.insertAt(this.children.tail.length(),o),this.cache={});let a=this;i.reduce((u,c)=>(a=a.split(u,!0),a.insertAt(0,c),c.length),t+o.length)}insertBefore(t,r){const{head:s}=this.children;super.insertBefore(t,r),s instanceof gt&&s.remove(),this.cache={}}length(){return this.cache.length==null&&(this.cache.length=super.length()+mu),this.cache.length}moveChildren(t,r){super.moveChildren(t,r),this.cache={}}optimize(t){super.optimize(t),this.cache={}}path(t){return super.path(t,!0)}removeChild(t){super.removeChild(t),this.cache={}}split(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(r&&(t===0||t>=this.length()-mu)){const i=this.clone();return t===0?(this.parent.insertBefore(i,this),this):(this.parent.insertBefore(i,this.next),i)}const s=super.split(t,r);return this.cache={},s}}De.blotName="block";De.tagName="P";De.defaultChild=gt;De.allowedChildren=[gt,Ct,We,ft];class Je extends We{attach(){super.attach(),this.attributes=new yi(this.domNode)}delta(){return new re().insert(this.value(),{...this.formats(),...this.attributes.values()})}format(e,t){const r=this.scroll.query(e,ne.BLOCK_ATTRIBUTE);r!=null&&this.attributes.attribute(r,t)}formatAt(e,t,r,s){this.format(r,s)}insertAt(e,t,r){if(r!=null){super.insertAt(e,t,r);return}const s=t.split(`
108
- `),i=s.pop(),o=s.map(u=>{const c=this.scroll.create(De.blotName);return c.insertAt(0,u),c}),a=this.split(e);o.forEach(u=>{this.parent.insertBefore(u,a)}),i&&this.parent.insertBefore(this.scroll.create("text",i),a)}}Je.scope=ne.BLOCK_BLOT;function Nh(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return n.descendants(Fe).reduce((t,r)=>r.length()===0?t:t.insert(r.value(),Xe(r,{},e)),new re).insert(`
109
- `,Xe(n))}function Xe(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return n==null||("formats"in n&&typeof n.formats=="function"&&(e={...e,...n.formats()},t&&delete e["code-token"]),n.parent==null||n.parent.statics.blotName==="scroll"||n.parent.statics.scope!==n.statics.scope)?e:Xe(n.parent,e,t)}const Ze=class Ze extends We{static value(){}constructor(e,t,r){super(e,t),this.selection=r,this.textNode=document.createTextNode(Ze.CONTENTS),this.domNode.appendChild(this.textNode),this.savedLength=0}detach(){this.parent!=null&&this.parent.removeChild(this)}format(e,t){if(this.savedLength!==0){super.format(e,t);return}let r=this,s=0;for(;r!=null&&r.statics.scope!==ne.BLOCK_BLOT;)s+=r.offset(r.parent),r=r.parent;r!=null&&(this.savedLength=Ze.CONTENTS.length,r.optimize(),r.formatAt(s,Ze.CONTENTS.length,e,t),this.savedLength=0)}index(e,t){return e===this.textNode?0:super.index(e,t)}length(){return this.savedLength}position(){return[this.textNode,this.textNode.data.length]}remove(){super.remove(),this.parent=null}restore(){if(this.selection.composing||this.parent==null)return null;const e=this.selection.getNativeRange();for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);const t=this.prev instanceof ft?this.prev:null,r=t?t.length():0,s=this.next instanceof ft?this.next:null,i=s?s.text:"",{textNode:o}=this,a=o.data.split(Ze.CONTENTS).join("");o.data=Ze.CONTENTS;let u;if(t)u=t,(a||s)&&(t.insertAt(t.length(),a+i),s&&s.remove());else if(s)u=s,s.insertAt(0,a);else{const c=document.createTextNode(a);u=this.scroll.create(c),this.parent.insertBefore(u,this)}if(this.remove(),e){const c=(d,m)=>t&&d===t.domNode?m:d===o?r+m-1:s&&d===s.domNode?r+a.length+m:null,h=c(e.start.node,e.start.offset),g=c(e.end.node,e.end.offset);if(h!==null&&g!==null)return{startNode:u.domNode,startOffset:h,endNode:u.domNode,endOffset:g}}return null}update(e,t){if(e.some(r=>r.type==="characterData"&&r.target===this.textNode)){const r=this.restore();r&&(t.range=r)}}optimize(e){super.optimize(e);let{parent:t}=this;for(;t;){if(t.domNode.tagName==="A"){this.savedLength=Ze.CONTENTS.length,t.isolate(this.offset(t),this.length()).unwrap(),this.savedLength=0;break}t=t.parent}}value(){return""}};J(Ze,"blotName","cursor"),J(Ze,"className","ql-cursor"),J(Ze,"tagName","span"),J(Ze,"CONTENTS","\uFEFF");let cn=Ze;var Ro={exports:{}},vu;function jv(){return vu||(vu=1,(function(n){var e=Object.prototype.hasOwnProperty,t="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(t=!1));function s(u,c,h){this.fn=u,this.context=c,this.once=h||!1}function i(u,c,h,g,d){if(typeof h!="function")throw new TypeError("The listener must be a function");var m=new s(h,g||u,d),v=t?t+c:c;return u._events[v]?u._events[v].fn?u._events[v]=[u._events[v],m]:u._events[v].push(m):(u._events[v]=m,u._eventsCount++),u}function o(u,c){--u._eventsCount===0?u._events=new r:delete u._events[c]}function a(){this._events=new r,this._eventsCount=0}a.prototype.eventNames=function(){var c=[],h,g;if(this._eventsCount===0)return c;for(g in h=this._events)e.call(h,g)&&c.push(t?g.slice(1):g);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(h)):c},a.prototype.listeners=function(c){var h=t?t+c:c,g=this._events[h];if(!g)return[];if(g.fn)return[g.fn];for(var d=0,m=g.length,v=new Array(m);d<m;d++)v[d]=g[d].fn;return v},a.prototype.listenerCount=function(c){var h=t?t+c:c,g=this._events[h];return g?g.fn?1:g.length:0},a.prototype.emit=function(c,h,g,d,m,v){var p=t?t+c:c;if(!this._events[p])return!1;var y=this._events[p],E=arguments.length,S,x;if(y.fn){switch(y.once&&this.removeListener(c,y.fn,void 0,!0),E){case 1:return y.fn.call(y.context),!0;case 2:return y.fn.call(y.context,h),!0;case 3:return y.fn.call(y.context,h,g),!0;case 4:return y.fn.call(y.context,h,g,d),!0;case 5:return y.fn.call(y.context,h,g,d,m),!0;case 6:return y.fn.call(y.context,h,g,d,m,v),!0}for(x=1,S=new Array(E-1);x<E;x++)S[x-1]=arguments[x];y.fn.apply(y.context,S)}else{var N=y.length,_;for(x=0;x<N;x++)switch(y[x].once&&this.removeListener(c,y[x].fn,void 0,!0),E){case 1:y[x].fn.call(y[x].context);break;case 2:y[x].fn.call(y[x].context,h);break;case 3:y[x].fn.call(y[x].context,h,g);break;case 4:y[x].fn.call(y[x].context,h,g,d);break;default:if(!S)for(_=1,S=new Array(E-1);_<E;_++)S[_-1]=arguments[_];y[x].fn.apply(y[x].context,S)}}return!0},a.prototype.on=function(c,h,g){return i(this,c,h,g,!1)},a.prototype.once=function(c,h,g){return i(this,c,h,g,!0)},a.prototype.removeListener=function(c,h,g,d){var m=t?t+c:c;if(!this._events[m])return this;if(!h)return o(this,m),this;var v=this._events[m];if(v.fn)v.fn===h&&(!d||v.once)&&(!g||v.context===g)&&o(this,m);else{for(var p=0,y=[],E=v.length;p<E;p++)(v[p].fn!==h||d&&!v[p].once||g&&v[p].context!==g)&&y.push(v[p]);y.length?this._events[m]=y.length===1?y[0]:y:o(this,m)}return this},a.prototype.removeAllListeners=function(c){var h;return c?(h=t?t+c:c,this._events[h]&&o(this,h)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=t,a.EventEmitter=a,n.exports=a})(Ro)),Ro.exports}var $v=jv();const Vv=ct.getDefaultExportFromCjs($v),ga=new WeakMap,ma=["error","warn","log","info"];let va="warn";function Ih(n){if(va&&ma.indexOf(n)<=ma.indexOf(va)){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r<e;r++)t[r-1]=arguments[r];console[n](...t)}}function Vt(n){return ma.reduce((e,t)=>(e[t]=Ih.bind(console,t,n),e),{})}Vt.level=n=>{va=n};Ih.level=Vt.level;const Oo=Vt("quill:events"),Uv=["selectionchange","mousedown","mouseup","click"];Uv.forEach(n=>{document.addEventListener(n,function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];Array.from(document.querySelectorAll(".ql-container")).forEach(s=>{const i=ga.get(s);i&&i.emitter&&i.emitter.handleDOM(...t)})})});class ee extends Vv{constructor(){super(),this.domListeners={},this.on("error",Oo.error)}emit(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Oo.log.call(Oo,...t),super.emit(...t)}handleDOM(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),s=1;s<t;s++)r[s-1]=arguments[s];(this.domListeners[e.type]||[]).forEach(i=>{let{node:o,handler:a}=i;(e.target===o||o.contains(e.target))&&a(e,...r)})}listenDOM(e,t,r){this.domListeners[e]||(this.domListeners[e]=[]),this.domListeners[e].push({node:t,handler:r})}}J(ee,"events",{EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_BLOT_MOUNT:"scroll-blot-mount",SCROLL_BLOT_UNMOUNT:"scroll-blot-unmount",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SCROLL_EMBED_UPDATE:"scroll-embed-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change",COMPOSITION_BEFORE_START:"composition-before-start",COMPOSITION_START:"composition-start",COMPOSITION_BEFORE_END:"composition-before-end",COMPOSITION_END:"composition-end"}),J(ee,"sources",{API:"api",SILENT:"silent",USER:"user"});const Lo=Vt("quill:selection");class _r{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;this.index=e,this.length=t}}class Hv{constructor(e,t){this.emitter=t,this.scroll=e,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=this.scroll.create("cursor",this),this.savedRange=new _r(0,0),this.lastRange=this.savedRange,this.lastNative=null,this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,()=>{!this.mouseDown&&!this.composing&&setTimeout(this.update.bind(this,ee.sources.USER),1)}),this.emitter.on(ee.events.SCROLL_BEFORE_UPDATE,()=>{if(!this.hasFocus())return;const r=this.getNativeRange();r!=null&&r.start.node!==this.cursor.textNode&&this.emitter.once(ee.events.SCROLL_UPDATE,(s,i)=>{try{this.root.contains(r.start.node)&&this.root.contains(r.end.node)&&this.setNativeRange(r.start.node,r.start.offset,r.end.node,r.end.offset);const o=i.some(a=>a.type==="characterData"||a.type==="childList"||a.type==="attributes"&&a.target===this.root);this.update(o?ee.sources.SILENT:s)}catch{}})}),this.emitter.on(ee.events.SCROLL_OPTIMIZE,(r,s)=>{if(s.range){const{startNode:i,startOffset:o,endNode:a,endOffset:u}=s.range;this.setNativeRange(i,o,a,u),this.update(ee.sources.SILENT)}}),this.update(ee.sources.SILENT)}handleComposition(){this.emitter.on(ee.events.COMPOSITION_BEFORE_START,()=>{this.composing=!0}),this.emitter.on(ee.events.COMPOSITION_END,()=>{if(this.composing=!1,this.cursor.parent){const e=this.cursor.restore();if(!e)return;setTimeout(()=>{this.setNativeRange(e.startNode,e.startOffset,e.endNode,e.endOffset)},1)}})}handleDragging(){this.emitter.listenDOM("mousedown",document.body,()=>{this.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,()=>{this.mouseDown=!1,this.update(ee.sources.USER)})}focus(){this.hasFocus()||(this.root.focus({preventScroll:!0}),this.setRange(this.savedRange))}format(e,t){this.scroll.update();const r=this.getNativeRange();if(!(r==null||!r.native.collapsed||this.scroll.query(e,ne.BLOCK))){if(r.start.node!==this.cursor.textNode){const s=this.scroll.find(r.start.node,!1);if(s==null)return;if(s instanceof Fe){const i=s.split(r.start.offset);s.parent.insertBefore(this.cursor,i)}else s.insertBefore(this.cursor,r.start.node);this.cursor.attach()}this.cursor.format(e,t),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}getBounds(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;const r=this.scroll.length();e=Math.min(e,r-1),t=Math.min(e+t,r-1)-e;let s,[i,o]=this.scroll.leaf(e);if(i==null)return null;if(t>0&&o===i.length()){const[h]=this.scroll.leaf(e+1);if(h){const[g]=this.scroll.line(e),[d]=this.scroll.line(e+1);g===d&&(i=h,o=0)}}[s,o]=i.position(o,!0);const a=document.createRange();if(t>0)return a.setStart(s,o),[i,o]=this.scroll.leaf(e+t),i==null?null:([s,o]=i.position(o,!0),a.setEnd(s,o),a.getBoundingClientRect());let u="left",c;if(s instanceof Text){if(!s.data.length)return null;o<s.data.length?(a.setStart(s,o),a.setEnd(s,o+1)):(a.setStart(s,o-1),a.setEnd(s,o),u="right"),c=a.getBoundingClientRect()}else{if(!(i.domNode instanceof Element))return null;c=i.domNode.getBoundingClientRect(),o>0&&(u="right")}return{bottom:c.top+c.height,height:c.height,left:c[u],right:c[u],top:c.top,width:0}}getNativeRange(){const e=document.getSelection();if(e==null||e.rangeCount<=0)return null;const t=e.getRangeAt(0);if(t==null)return null;const r=this.normalizeNative(t);return Lo.info("getNativeRange",r),r}getRange(){const e=this.scroll.domNode;if("isConnected"in e&&!e.isConnected)return[null,null];const t=this.getNativeRange();return t==null?[null,null]:[this.normalizedToRange(t),t]}hasFocus(){return document.activeElement===this.root||document.activeElement!=null&&Mo(this.root,document.activeElement)}normalizedToRange(e){const t=[[e.start.node,e.start.offset]];e.native.collapsed||t.push([e.end.node,e.end.offset]);const r=t.map(o=>{const[a,u]=o,c=this.scroll.find(a,!0),h=c.offset(this.scroll);return u===0?h:c instanceof Fe?h+c.index(a,u):h+c.length()}),s=Math.min(Math.max(...r),this.scroll.length()-1),i=Math.min(s,...r);return new _r(i,s-i)}normalizeNative(e){if(!Mo(this.root,e.startContainer)||!e.collapsed&&!Mo(this.root,e.endContainer))return null;const t={start:{node:e.startContainer,offset:e.startOffset},end:{node:e.endContainer,offset:e.endOffset},native:e};return[t.start,t.end].forEach(r=>{let{node:s,offset:i}=r;for(;!(s instanceof Text)&&s.childNodes.length>0;)if(s.childNodes.length>i)s=s.childNodes[i],i=0;else if(s.childNodes.length===i)s=s.lastChild,s instanceof Text?i=s.data.length:s.childNodes.length>0?i=s.childNodes.length:i=s.childNodes.length+1;else break;r.node=s,r.offset=i}),t}rangeToNative(e){const t=this.scroll.length(),r=(s,i)=>{s=Math.min(t-1,s);const[o,a]=this.scroll.leaf(s);return o?o.position(a,i):[null,-1]};return[...r(e.index,!1),...r(e.index+e.length,!0)]}setNativeRange(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:t,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(Lo.info("setNativeRange",e,t,r,s),e!=null&&(this.root.parentNode==null||e.parentNode==null||r.parentNode==null))return;const o=document.getSelection();if(o!=null)if(e!=null){this.hasFocus()||this.root.focus({preventScroll:!0});const{native:a}=this.getNativeRange()||{};if(a==null||i||e!==a.startContainer||t!==a.startOffset||r!==a.endContainer||s!==a.endOffset){e instanceof Element&&e.tagName==="BR"&&(t=Array.from(e.parentNode.childNodes).indexOf(e),e=e.parentNode),r instanceof Element&&r.tagName==="BR"&&(s=Array.from(r.parentNode.childNodes).indexOf(r),r=r.parentNode);const u=document.createRange();u.setStart(e,t),u.setEnd(r,s),o.removeAllRanges(),o.addRange(u)}}else o.removeAllRanges(),this.root.blur()}setRange(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ee.sources.API;if(typeof t=="string"&&(r=t,t=!1),Lo.info("setRange",e),e!=null){const s=this.rangeToNative(e);this.setNativeRange(...s,t)}else this.setNativeRange(null);this.update(r)}update(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ee.sources.USER;const t=this.lastRange,[r,s]=this.getRange();if(this.lastRange=r,this.lastNative=s,this.lastRange!=null&&(this.savedRange=this.lastRange),!Wt(t,this.lastRange)){if(!this.composing&&s!=null&&s.native.collapsed&&s.start.node!==this.cursor.textNode){const o=this.cursor.restore();o&&this.setNativeRange(o.startNode,o.startOffset,o.endNode,o.endOffset)}const i=[ee.events.SELECTION_CHANGE,en(this.lastRange),en(t),e];this.emitter.emit(ee.events.EDITOR_CHANGE,...i),e!==ee.sources.SILENT&&this.emitter.emit(...i)}}}function Mo(n,e){try{e.parentNode}catch{return!1}return n.contains(e)}const zv=/^[ -~]*$/;class Gv{constructor(e){this.scroll=e,this.delta=this.getDelta()}applyDelta(e){this.scroll.update();let t=this.scroll.length();this.scroll.batchStart();const r=yu(e),s=new re;return Wv(r.ops.slice()).reduce((o,a)=>{const u=et.Op.length(a);let c=a.attributes||{},h=!1,g=!1;if(a.insert!=null){if(s.retain(u),typeof a.insert=="string"){const v=a.insert;g=!v.endsWith(`
110
- `)&&(t<=o||!!this.scroll.descendant(Je,o)[0]),this.scroll.insertAt(o,v);const[p,y]=this.scroll.line(o);let E=er({},Xe(p));if(p instanceof De){const[S]=p.descendant(Fe,y);S&&(E=er(E,Xe(S)))}c=et.AttributeMap.diff(E,c)||{}}else if(typeof a.insert=="object"){const v=Object.keys(a.insert)[0];if(v==null)return o;const p=this.scroll.query(v,ne.INLINE)!=null;if(p)(t<=o||this.scroll.descendant(Je,o)[0])&&(g=!0);else if(o>0){const[y,E]=this.scroll.descendant(Fe,o-1);y instanceof ft?y.value()[E]!==`
111
- `&&(h=!0):y instanceof We&&y.statics.scope===ne.INLINE_BLOT&&(h=!0)}if(this.scroll.insertAt(o,v,a.insert[v]),p){const[y]=this.scroll.descendant(Fe,o);if(y){const E=er({},Xe(y));c=et.AttributeMap.diff(E,c)||{}}}}t+=u}else if(s.push(a),a.retain!==null&&typeof a.retain=="object"){const v=Object.keys(a.retain)[0];if(v==null)return o;this.scroll.updateEmbedAt(o,v,a.retain[v])}Object.keys(c).forEach(v=>{this.scroll.formatAt(o,u,v,c[v])});const d=h?1:0,m=g?1:0;return t+=d+m,s.retain(d),s.delete(m),o+u+d+m},0),s.reduce((o,a)=>typeof a.delete=="number"?(this.scroll.deleteAt(o,a.delete),o):o+et.Op.length(a),0),this.scroll.batchEnd(),this.scroll.optimize(),this.update(r)}deleteText(e,t){return this.scroll.deleteAt(e,t),this.update(new re().retain(e).delete(t))}formatLine(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.scroll.update(),Object.keys(r).forEach(i=>{this.scroll.lines(e,Math.max(t,1)).forEach(o=>{o.format(i,r[i])})}),this.scroll.optimize();const s=new re().retain(e).retain(t,en(r));return this.update(s)}formatText(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Object.keys(r).forEach(i=>{this.scroll.formatAt(e,t,i,r[i])});const s=new re().retain(e).retain(t,en(r));return this.update(s)}getContents(e,t){return this.delta.slice(e,e+t)}getDelta(){return this.scroll.lines().reduce((e,t)=>e.concat(t.delta()),new re)}getFormat(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=[],s=[];t===0?this.scroll.path(e).forEach(a=>{const[u]=a;u instanceof De?r.push(u):u instanceof Fe&&s.push(u)}):(r=this.scroll.lines(e,t),s=this.scroll.descendants(Fe,e,t));const[i,o]=[r,s].map(a=>{const u=a.shift();if(u==null)return{};let c=Xe(u);for(;Object.keys(c).length>0;){const h=a.shift();if(h==null)return c;c=Kv(Xe(h),c)}return c});return{...i,...o}}getHTML(e,t){const[r,s]=this.scroll.line(e);if(r){const i=r.length();return r.length()>=s+t&&!(s===0&&t===i)?Zn(r,s,t,!0):Zn(this.scroll,e,t,!0)}return""}getText(e,t){return this.getContents(e,t).filter(r=>typeof r.insert=="string").map(r=>r.insert).join("")}insertContents(e,t){const r=yu(t),s=new re().retain(e).concat(r);return this.scroll.insertContents(e,r),this.update(s)}insertEmbed(e,t,r){return this.scroll.insertAt(e,t,r),this.update(new re().retain(e).insert({[t]:r}))}insertText(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return t=t.replace(/\r\n/g,`
112
- `).replace(/\r/g,`
113
- `),this.scroll.insertAt(e,t),Object.keys(r).forEach(s=>{this.scroll.formatAt(e,t.length,s,r[s])}),this.update(new re().retain(e).insert(t,en(r)))}isBlank(){if(this.scroll.children.length===0)return!0;if(this.scroll.children.length>1)return!1;const e=this.scroll.children.head;if((e==null?void 0:e.statics.blotName)!==De.blotName)return!1;const t=e;return t.children.length>1?!1:t.children.head instanceof gt}removeFormat(e,t){const r=this.getText(e,t),[s,i]=this.scroll.line(e+t);let o=0,a=new re;s!=null&&(o=s.length()-i,a=s.delta().slice(i,i+o-1).insert(`
114
- `));const c=this.getContents(e,t+o).diff(new re().insert(r).concat(a)),h=new re().retain(e).concat(c);return this.applyDelta(h)}update(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;const s=this.delta;if(t.length===1&&t[0].type==="characterData"&&t[0].target.data.match(zv)&&this.scroll.find(t[0].target)){const i=this.scroll.find(t[0].target),o=Xe(i),a=i.offset(this.scroll),u=t[0].oldValue.replace(cn.CONTENTS,""),c=new re().insert(u),h=new re().insert(i.value()),g=r&&{oldRange:bu(r.oldRange,-a),newRange:bu(r.newRange,-a)};e=new re().retain(a).concat(c.diff(h,g)).reduce((m,v)=>v.insert?m.insert(v.insert,o):m.push(v),new re),this.delta=s.compose(e)}else this.delta=this.getDelta(),(!e||!Wt(s.compose(e),this.delta))&&(e=s.diff(this.delta,r));return e}}function Zr(n,e,t){if(n.length===0){const[m]=Do(t.pop());return e<=0?`</li></${m}>`:`</li></${m}>${Zr([],e-1,t)}`}const[{child:r,offset:s,length:i,indent:o,type:a},...u]=n,[c,h]=Do(a);if(o>e)return t.push(a),o===e+1?`<${c}><li${h}>${Zn(r,s,i)}${Zr(u,o,t)}`:`<${c}><li>${Zr(n,e+1,t)}`;const g=t[t.length-1];if(o===e&&a===g)return`</li><li${h}>${Zn(r,s,i)}${Zr(u,o,t)}`;const[d]=Do(t.pop());return`</li></${d}>${Zr(n,e-1,t)}`}function Zn(n,e,t){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if("html"in n&&typeof n.html=="function")return n.html(e,t);if(n instanceof ft)return Ei(n.value().slice(e,e+t)).replaceAll(" ","&nbsp;");if(n instanceof dt){if(n.statics.blotName==="list-container"){const c=[];return n.children.forEachAt(e,t,(h,g,d)=>{const m="formats"in h&&typeof h.formats=="function"?h.formats():{};c.push({child:h,offset:g,length:d,indent:m.indent||0,type:m.list})}),Zr(c,-1,[])}const s=[];if(n.children.forEachAt(e,t,(c,h,g)=>{s.push(Zn(c,h,g))}),r||n.statics.blotName==="list")return s.join("");const{outerHTML:i,innerHTML:o}=n.domNode,[a,u]=i.split(`>${o}<`);return a==="<table"?`<table style="border: 1px solid #000;">${s.join("")}<${u}`:`${a}>${s.join("")}<${u}`}return n.domNode instanceof Element?n.domNode.outerHTML:""}function Kv(n,e){return Object.keys(e).reduce((t,r)=>{if(n[r]==null)return t;const s=e[r];return s===n[r]?t[r]=s:Array.isArray(s)?s.indexOf(n[r])<0?t[r]=s.concat([n[r]]):t[r]=s:t[r]=[s,n[r]],t},{})}function Do(n){const e=n==="ordered"?"ol":"ul";switch(n){case"checked":return[e,' data-list="checked"'];case"unchecked":return[e,' data-list="unchecked"'];default:return[e,""]}}function yu(n){return n.reduce((e,t)=>{if(typeof t.insert=="string"){const r=t.insert.replace(/\r\n/g,`
115
- `).replace(/\r/g,`
116
- `);return e.insert(r,t.attributes)}return e.push(t)},new re)}function bu(n,e){let{index:t,length:r}=n;return new _r(t+e,r)}function Wv(n){const e=[];return n.forEach(t=>{typeof t.insert=="string"?t.insert.split(`
117
- `).forEach((s,i)=>{i&&e.push({insert:`
118
- `,attributes:t.attributes}),s&&e.push({insert:s,attributes:t.attributes})}):e.push(t)}),e}class mt{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.quill=e,this.options=t}}J(mt,"DEFAULTS",{});const Rs="\uFEFF";class Xa extends We{constructor(e,t){super(e,t),this.contentNode=document.createElement("span"),this.contentNode.setAttribute("contenteditable","false"),Array.from(this.domNode.childNodes).forEach(r=>{this.contentNode.appendChild(r)}),this.leftGuard=document.createTextNode(Rs),this.rightGuard=document.createTextNode(Rs),this.domNode.appendChild(this.leftGuard),this.domNode.appendChild(this.contentNode),this.domNode.appendChild(this.rightGuard)}index(e,t){return e===this.leftGuard?0:e===this.rightGuard?1:super.index(e,t)}restore(e){let t=null,r;const s=e.data.split(Rs).join("");if(e===this.leftGuard)if(this.prev instanceof ft){const i=this.prev.length();this.prev.insertAt(i,s),t={startNode:this.prev.domNode,startOffset:i+s.length}}else r=document.createTextNode(s),this.parent.insertBefore(this.scroll.create(r),this),t={startNode:r,startOffset:s.length};else e===this.rightGuard&&(this.next instanceof ft?(this.next.insertAt(0,s),t={startNode:this.next.domNode,startOffset:s.length}):(r=document.createTextNode(s),this.parent.insertBefore(this.scroll.create(r),this.next),t={startNode:r,startOffset:s.length}));return e.data=Rs,t}update(e,t){e.forEach(r=>{if(r.type==="characterData"&&(r.target===this.leftGuard||r.target===this.rightGuard)){const s=this.restore(r.target);s&&(t.range=s)}})}}class Yv{constructor(e,t){J(this,"isComposing",!1);this.scroll=e,this.emitter=t,this.setupListeners()}setupListeners(){this.scroll.domNode.addEventListener("compositionstart",e=>{this.isComposing||this.handleCompositionStart(e)}),this.scroll.domNode.addEventListener("compositionend",e=>{this.isComposing&&queueMicrotask(()=>{this.handleCompositionEnd(e)})})}handleCompositionStart(e){const t=e.target instanceof Node?this.scroll.find(e.target,!0):null;t&&!(t instanceof Xa)&&(this.emitter.emit(ee.events.COMPOSITION_BEFORE_START,e),this.scroll.batchStart(),this.emitter.emit(ee.events.COMPOSITION_START,e),this.isComposing=!0)}handleCompositionEnd(e){this.emitter.emit(ee.events.COMPOSITION_BEFORE_END,e),this.scroll.batchEnd(),this.emitter.emit(ee.events.COMPOSITION_END,e),this.isComposing=!1}}const Un=class Un{constructor(e,t){J(this,"modules",{});this.quill=e,this.options=t}init(){Object.keys(this.options.modules).forEach(e=>{this.modules[e]==null&&this.addModule(e)})}addModule(e){const t=this.quill.constructor.import(`modules/${e}`);return this.modules[e]=new t(this.quill,this.options.modules[e]||{}),this.modules[e]}};J(Un,"DEFAULTS",{modules:{}}),J(Un,"themes",{default:Un});let hn=Un;const Zv=n=>n.parentElement||n.getRootNode().host||null,Xv=n=>{const e=n.getBoundingClientRect(),t="offsetWidth"in n&&Math.abs(e.width)/n.offsetWidth||1,r="offsetHeight"in n&&Math.abs(e.height)/n.offsetHeight||1;return{top:e.top,right:e.left+n.clientWidth*t,bottom:e.top+n.clientHeight*r,left:e.left}},Os=n=>{const e=parseInt(n,10);return Number.isNaN(e)?0:e},Eu=(n,e,t,r,s,i)=>n<t&&e>r?0:n<t?-(t-n+s):e>r?e-n>r-t?n+s-t:e-r+i:0,Qv=(n,e)=>{var i,o,a;const t=n.ownerDocument;let r=e,s=n;for(;s;){const u=s===t.body,c=u?{top:0,right:((i=window.visualViewport)==null?void 0:i.width)??t.documentElement.clientWidth,bottom:((o=window.visualViewport)==null?void 0:o.height)??t.documentElement.clientHeight,left:0}:Xv(s),h=getComputedStyle(s),g=Eu(r.left,r.right,c.left,c.right,Os(h.scrollPaddingLeft),Os(h.scrollPaddingRight)),d=Eu(r.top,r.bottom,c.top,c.bottom,Os(h.scrollPaddingTop),Os(h.scrollPaddingBottom));if(g||d)if(u)(a=t.defaultView)==null||a.scrollBy(g,d);else{const{scrollLeft:m,scrollTop:v}=s;d&&(s.scrollTop+=d),g&&(s.scrollLeft+=g);const p=s.scrollLeft-m,y=s.scrollTop-v;r={left:r.left-p,top:r.top-y,right:r.right-p,bottom:r.bottom-y}}s=u||h.position==="fixed"?null:Zv(s)}},Jv=100,ey=["block","break","cursor","inline","scroll","text"],ty=(n,e,t)=>{const r=new un;return ey.forEach(s=>{const i=e.query(s);i&&r.register(i)}),n.forEach(s=>{let i=e.query(s);i||t.error(`Cannot register "${s}" specified in "formats" config. Are you sure it was registered?`);let o=0;for(;i;)if(r.register(i),i="blotName"in i?i.requiredContainer??null:null,o+=1,o>Jv){t.error(`Cycle detected in registering blot requiredContainer: "${s}"`);break}}),r},rn=Vt("quill"),Ls=new un;dt.uiClass="ql-ui";const ot=class ot{static debug(e){e===!0&&(e="log"),Vt.level(e)}static find(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return ga.get(e)||Ls.find(e,t)}static import(e){return this.imports[e]==null&&rn.error(`Cannot import ${e}. Are you sure it was registered?`),this.imports[e]}static register(){if(typeof(arguments.length<=0?void 0:arguments[0])!="string"){const e=arguments.length<=0?void 0:arguments[0],t=!!(!(arguments.length<=1)&&arguments[1]),r="attrName"in e?e.attrName:e.blotName;typeof r=="string"?this.register(`formats/${r}`,e,t):Object.keys(e).forEach(s=>{this.register(s,e[s],t)})}else{const e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],r=!!(!(arguments.length<=2)&&arguments[2]);this.imports[e]!=null&&!r&&rn.warn(`Overwriting ${e} with`,t),this.imports[e]=t,(e.startsWith("blots/")||e.startsWith("formats/"))&&t&&typeof t!="boolean"&&t.blotName!=="abstract"&&Ls.register(t),typeof t.register=="function"&&t.register(Ls)}}constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.options=ry(e,t),this.container=this.options.container,this.container==null){rn.error("Invalid Quill container",e);return}this.options.debug&&ot.debug(this.options.debug);const r=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",ga.set(this.container,this),this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.emitter=new ee;const s=Za.blotName,i=this.options.registry.query(s);if(!i||!("blotName"in i))throw new Error(`Cannot initialize Quill without "${s}" blot`);if(this.scroll=new i(this.options.registry,this.root,{emitter:this.emitter}),this.editor=new Gv(this.scroll),this.selection=new Hv(this.scroll,this.emitter),this.composition=new Yv(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.uploader=this.theme.addModule("uploader"),this.theme.addModule("input"),this.theme.addModule("uiNode"),this.theme.init(),this.emitter.on(ee.events.EDITOR_CHANGE,o=>{o===ee.events.TEXT_CHANGE&&this.root.classList.toggle("ql-blank",this.editor.isBlank())}),this.emitter.on(ee.events.SCROLL_UPDATE,(o,a)=>{const u=this.selection.lastRange,[c]=this.selection.getRange(),h=u&&c?{oldRange:u,newRange:c}:void 0;st.call(this,()=>this.editor.update(null,a,h),o)}),this.emitter.on(ee.events.SCROLL_EMBED_UPDATE,(o,a)=>{const u=this.selection.lastRange,[c]=this.selection.getRange(),h=u&&c?{oldRange:u,newRange:c}:void 0;st.call(this,()=>{const g=new re().retain(o.offset(this)).retain({[o.statics.blotName]:a});return this.editor.update(g,[],h)},ot.sources.USER)}),r){const o=this.clipboard.convert({html:`${r}<p><br></p>`,text:`
119
- `});this.setContents(o)}this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable(),this.allowReadOnlyEdits=!1}addContainer(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof e=="string"){const r=e;e=document.createElement("div"),e.classList.add(r)}return this.container.insertBefore(e,t),e}blur(){this.selection.setRange(null)}deleteText(e,t,r){return[e,t,,r]=Lt(e,t,r),st.call(this,()=>this.editor.deleteText(e,t),r,e,-1*t)}disable(){this.enable(!1)}editReadOnly(e){this.allowReadOnlyEdits=!0;const t=e();return this.allowReadOnlyEdits=!1,t}enable(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(e),this.container.classList.toggle("ql-disabled",!e)}focus(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.selection.focus(),e.preventScroll||this.scrollSelectionIntoView()}format(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ee.sources.API;return st.call(this,()=>{const s=this.getSelection(!0);let i=new re;if(s==null)return i;if(this.scroll.query(e,ne.BLOCK))i=this.editor.formatLine(s.index,s.length,{[e]:t});else{if(s.length===0)return this.selection.format(e,t),i;i=this.editor.formatText(s.index,s.length,{[e]:t})}return this.setSelection(s,ee.sources.SILENT),i},r)}formatLine(e,t,r,s,i){let o;return[e,t,o,i]=Lt(e,t,r,s,i),st.call(this,()=>this.editor.formatLine(e,t,o),i,e,0)}formatText(e,t,r,s,i){let o;return[e,t,o,i]=Lt(e,t,r,s,i),st.call(this,()=>this.editor.formatText(e,t,o),i,e,0)}getBounds(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=null;if(typeof e=="number"?r=this.selection.getBounds(e,t):r=this.selection.getBounds(e.index,e.length),!r)return null;const s=this.container.getBoundingClientRect();return{bottom:r.bottom-s.top,height:r.height,left:r.left-s.left,right:r.right-s.left,top:r.top-s.top,width:r.width}}getContents(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-e;return[e,t]=Lt(e,t),this.editor.getContents(e,t)}getFormat(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof e=="number"?this.editor.getFormat(e,t):this.editor.getFormat(e.index,e.length)}getIndex(e){return e.offset(this.scroll)}getLength(){return this.scroll.length()}getLeaf(e){return this.scroll.leaf(e)}getLine(e){return this.scroll.line(e)}getLines(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof e!="number"?this.scroll.lines(e.index,e.length):this.scroll.lines(e,t)}getModule(e){return this.theme.modules[e]}getSelection(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1)&&this.focus(),this.update(),this.selection.getRange()[0]}getSemanticHTML(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;return typeof e=="number"&&(t=t??this.getLength()-e),[e,t]=Lt(e,t),this.editor.getHTML(e,t)}getText(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;return typeof e=="number"&&(t=t??this.getLength()-e),[e,t]=Lt(e,t),this.editor.getText(e,t)}hasFocus(){return this.selection.hasFocus()}insertEmbed(e,t,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:ot.sources.API;return st.call(this,()=>this.editor.insertEmbed(e,t,r),s,e)}insertText(e,t,r,s,i){let o;return[e,,o,i]=Lt(e,0,r,s,i),st.call(this,()=>this.editor.insertText(e,t,o),i,e,t.length)}isEnabled(){return this.scroll.isEnabled()}off(){return this.emitter.off(...arguments)}on(){return this.emitter.on(...arguments)}once(){return this.emitter.once(...arguments)}removeFormat(e,t,r){return[e,t,,r]=Lt(e,t,r),st.call(this,()=>this.editor.removeFormat(e,t),r,e)}scrollRectIntoView(e){Qv(this.root,e)}scrollIntoView(){console.warn("Quill#scrollIntoView() has been deprecated and will be removed in the near future. Please use Quill#scrollSelectionIntoView() instead."),this.scrollSelectionIntoView()}scrollSelectionIntoView(){const e=this.selection.lastRange,t=e&&this.selection.getBounds(e.index,e.length);t&&this.scrollRectIntoView(t)}setContents(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ee.sources.API;return st.call(this,()=>{e=new re(e);const r=this.getLength(),s=this.editor.deleteText(0,r),i=this.editor.insertContents(0,e),o=this.editor.deleteText(this.getLength()-1,1);return s.compose(i).compose(o)},t)}setSelection(e,t,r){e==null?this.selection.setRange(null,t||ot.sources.API):([e,t,,r]=Lt(e,t,r),this.selection.setRange(new _r(Math.max(0,e),t),r),r!==ee.sources.SILENT&&this.scrollSelectionIntoView())}setText(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ee.sources.API;const r=new re().insert(e);return this.setContents(r,t)}update(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ee.sources.USER;const t=this.scroll.update(e);return this.selection.update(e),t}updateContents(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ee.sources.API;return st.call(this,()=>(e=new re(e),this.editor.applyDelta(e)),t,!0)}};J(ot,"DEFAULTS",{bounds:null,modules:{clipboard:!0,keyboard:!0,history:!0,uploader:!0},placeholder:"",readOnly:!1,registry:Ls,theme:"default"}),J(ot,"events",ee.events),J(ot,"sources",ee.sources),J(ot,"version","2.0.3"),J(ot,"imports",{delta:re,parchment:Mv,"core/module":mt,"core/theme":hn});let B=ot;function wu(n){return typeof n=="string"?document.querySelector(n):n}function Po(n){return Object.entries(n??{}).reduce((e,t)=>{let[r,s]=t;return{...e,[r]:s===!0?{}:s}},{})}function xu(n){return Object.fromEntries(Object.entries(n).filter(e=>e[1]!==void 0))}function ry(n,e){const t=wu(n);if(!t)throw new Error("Invalid Quill container");const s=!e.theme||e.theme===B.DEFAULTS.theme?hn:B.import(`themes/${e.theme}`);if(!s)throw new Error(`Invalid theme ${e.theme}. Did you register it?`);const{modules:i,...o}=B.DEFAULTS,{modules:a,...u}=s.DEFAULTS;let c=Po(e.modules);c!=null&&c.toolbar&&c.toolbar.constructor!==Object&&(c={...c,toolbar:{container:c.toolbar}});const h=er({},Po(i),Po(a),c),g={...o,...xu(u),...xu(e)};let d=e.registry;return d?e.formats&&rn.warn('Ignoring "formats" option because "registry" is specified'):d=e.formats?ty(e.formats,g.registry,rn):g.registry,{...g,registry:d,container:t,theme:s,modules:Object.entries(h).reduce((m,v)=>{let[p,y]=v;if(!y)return m;const E=B.import(`modules/${p}`);return E==null?(rn.error(`Cannot load ${p} module. Are you sure you registered it?`),m):{...m,[p]:er({},E.DEFAULTS||{},y)}},{}),bounds:wu(g.bounds)}}function st(n,e,t,r){if(!this.isEnabled()&&e===ee.sources.USER&&!this.allowReadOnlyEdits)return new re;let s=t==null?null:this.getSelection();const i=this.editor.delta,o=n();if(s!=null&&(t===!0&&(t=s.index),r==null?s=Su(s,o,e):r!==0&&(s=Su(s,t,r,e)),this.setSelection(s,ee.sources.SILENT)),o.length()>0){const a=[ee.events.TEXT_CHANGE,o,i,e];this.emitter.emit(ee.events.EDITOR_CHANGE,...a),e!==ee.sources.SILENT&&this.emitter.emit(...a)}return o}function Lt(n,e,t,r,s){let i={};return typeof n.index=="number"&&typeof n.length=="number"?typeof e!="number"?(s=r,r=t,t=e,e=n.length,n=n.index):(e=n.length,n=n.index):typeof e!="number"&&(s=r,r=t,t=e,e=0),typeof t=="object"?(i=t,s=r):typeof t=="string"&&(r!=null?i[t]=r:s=t),s=s||ee.sources.API,[n,e,i,s]}function Su(n,e,t,r){const s=typeof t=="number"?t:0;if(n==null)return null;let i,o;return e&&typeof e.transformPosition=="function"?[i,o]=[n.index,n.index+n.length].map(a=>e.transformPosition(a,r!==ee.sources.USER)):[i,o]=[n.index,n.index+n.length].map(a=>a<e||a===e&&r===ee.sources.USER?a:s>=0?a+s:Math.max(e,a+s)),new _r(i,o-i)}class Ir extends bi{}function _u(n){return n instanceof De||n instanceof Je}function Au(n){return typeof n.updateContent=="function"}class Xr extends Za{constructor(e,t,r){let{emitter:s}=r;super(e,t),this.emitter=s,this.batch=!1,this.optimize(),this.enable(),this.domNode.addEventListener("dragstart",i=>this.handleDragStart(i))}batchStart(){Array.isArray(this.batch)||(this.batch=[])}batchEnd(){if(!this.batch)return;const e=this.batch;this.batch=!1,this.update(e)}emitMount(e){this.emitter.emit(ee.events.SCROLL_BLOT_MOUNT,e)}emitUnmount(e){this.emitter.emit(ee.events.SCROLL_BLOT_UNMOUNT,e)}emitEmbedUpdate(e,t){this.emitter.emit(ee.events.SCROLL_EMBED_UPDATE,e,t)}deleteAt(e,t){const[r,s]=this.line(e),[i]=this.line(e+t);if(super.deleteAt(e,t),i!=null&&r!==i&&s>0){if(r instanceof Je||i instanceof Je){this.optimize();return}const o=i.children.head instanceof gt?null:i.children.head;r.moveChildren(i,o),r.remove()}this.optimize()}enable(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",e?"true":"false")}formatAt(e,t,r,s){super.formatAt(e,t,r,s),this.optimize()}insertAt(e,t,r){if(e>=this.length())if(r==null||this.scroll.query(t,ne.BLOCK)==null){const s=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(s),r==null&&t.endsWith(`
120
- `)?s.insertAt(0,t.slice(0,-1),r):s.insertAt(0,t,r)}else{const s=this.scroll.create(t,r);this.appendChild(s)}else super.insertAt(e,t,r);this.optimize()}insertBefore(e,t){if(e.statics.scope===ne.INLINE_BLOT){const r=this.scroll.create(this.statics.defaultChild.blotName);r.appendChild(e),super.insertBefore(r,t)}else super.insertBefore(e,t)}insertContents(e,t){const r=this.deltaToRenderBlocks(t.concat(new re().insert(`
121
- `))),s=r.pop();if(s==null)return;this.batchStart();const i=r.shift();if(i){const u=i.type==="block"&&(i.delta.length()===0||!this.descendant(Je,e)[0]&&e<this.length()),c=i.type==="block"?i.delta:new re().insert({[i.key]:i.value});Bo(this,e,c);const h=i.type==="block"?1:0,g=e+c.length()+h;u&&this.insertAt(g-1,`
122
- `);const d=Xe(this.line(e)[0]),m=et.AttributeMap.diff(d,i.attributes)||{};Object.keys(m).forEach(v=>{this.formatAt(g-1,1,v,m[v])}),e=g}let[o,a]=this.children.find(e);if(r.length&&(o&&(o=o.split(a),a=0),r.forEach(u=>{if(u.type==="block"){const c=this.createBlock(u.attributes,o||void 0);Bo(c,0,u.delta)}else{const c=this.create(u.key,u.value);this.insertBefore(c,o||void 0),Object.keys(u.attributes).forEach(h=>{c.format(h,u.attributes[h])})}})),s.type==="block"&&s.delta.length()){const u=o?o.offset(o.scroll)+a:this.length();Bo(this,u,s.delta)}this.batchEnd(),this.optimize()}isEnabled(){return this.domNode.getAttribute("contenteditable")==="true"}leaf(e){const t=this.path(e).pop();if(!t)return[null,-1];const[r,s]=t;return r instanceof Fe?[r,s]:[null,-1]}line(e){return e===this.length()?this.line(e-1):this.descendant(_u,e)}lines(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;const r=(s,i,o)=>{let a=[],u=o;return s.children.forEachAt(i,o,(c,h,g)=>{_u(c)?a.push(c):c instanceof bi&&(a=a.concat(r(c,h,u))),u-=g}),a};return r(this,e,t)}optimize(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch||(super.optimize(e,t),e.length>0&&this.emitter.emit(ee.events.SCROLL_OPTIMIZE,e,t))}path(e){return super.path(e).slice(1)}remove(){}update(e){if(this.batch){Array.isArray(e)&&(this.batch=this.batch.concat(e));return}let t=ee.sources.USER;typeof e=="string"&&(t=e),Array.isArray(e)||(e=this.observer.takeRecords()),e=e.filter(r=>{let{target:s}=r;const i=this.find(s,!0);return i&&!Au(i)}),e.length>0&&this.emitter.emit(ee.events.SCROLL_BEFORE_UPDATE,t,e),super.update(e.concat([])),e.length>0&&this.emitter.emit(ee.events.SCROLL_UPDATE,t,e)}updateEmbedAt(e,t,r){const[s]=this.descendant(i=>i instanceof Je,e);s&&s.statics.blotName===t&&Au(s)&&s.updateContent(r)}handleDragStart(e){e.preventDefault()}deltaToRenderBlocks(e){const t=[];let r=new re;return e.forEach(s=>{const i=s==null?void 0:s.insert;if(i)if(typeof i=="string"){const o=i.split(`
123
- `);o.slice(0,-1).forEach(u=>{r.insert(u,s.attributes),t.push({type:"block",delta:r,attributes:s.attributes??{}}),r=new re});const a=o[o.length-1];a&&r.insert(a,s.attributes)}else{const o=Object.keys(i)[0];if(!o)return;this.query(o,ne.INLINE)?r.push(s):(r.length()&&t.push({type:"block",delta:r,attributes:{}}),r=new re,t.push({type:"blockEmbed",key:o,value:i[o],attributes:s.attributes??{}}))}}),r.length()&&t.push({type:"block",delta:r,attributes:{}}),t}createBlock(e,t){let r;const s={};Object.entries(e).forEach(a=>{let[u,c]=a;this.query(u,ne.BLOCK&ne.BLOT)!=null?r=u:s[u]=c});const i=this.create(r||this.statics.defaultChild.blotName,r?e[r]:void 0);this.insertBefore(i,t||void 0);const o=i.length();return Object.entries(s).forEach(a=>{let[u,c]=a;i.formatAt(0,o,u,c)}),i}}J(Xr,"blotName","scroll"),J(Xr,"className","ql-editor"),J(Xr,"tagName","DIV"),J(Xr,"defaultChild",De),J(Xr,"allowedChildren",[De,Je,Ir]);function Bo(n,e,t){t.reduce((r,s)=>{const i=et.Op.length(s);let o=s.attributes||{};if(s.insert!=null){if(typeof s.insert=="string"){const a=s.insert;n.insertAt(r,a);const[u]=n.descendant(Fe,r),c=Xe(u);o=et.AttributeMap.diff(c,o)||{}}else if(typeof s.insert=="object"){const a=Object.keys(s.insert)[0];if(a==null)return r;if(n.insertAt(r,a,s.insert[a]),n.scroll.query(a,ne.INLINE)!=null){const[c]=n.descendant(Fe,r),h=Xe(c);o=et.AttributeMap.diff(h,o)||{}}}}return Object.keys(o).forEach(a=>{n.formatAt(r,i,a,o[a])}),r+i},e)}const Qa={scope:ne.BLOCK,whitelist:["right","center","justify"]},ny=new At("align","align",Qa),Rh=new pt("align","ql-align",Qa),Oh=new ir("align","text-align",Qa);class Lh extends ir{value(e){let t=super.value(e);return t.startsWith("rgb(")?(t=t.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),`#${t.split(",").map(s=>`00${parseInt(s,10).toString(16)}`.slice(-2)).join("")}`):t}}const sy=new pt("color","ql-color",{scope:ne.INLINE}),Ja=new Lh("color","color",{scope:ne.INLINE}),iy=new pt("background","ql-bg",{scope:ne.INLINE}),el=new Lh("background","background-color",{scope:ne.INLINE});class Rr extends Ir{static create(e){const t=super.create(e);return t.setAttribute("spellcheck","false"),t}code(e,t){return this.children.map(r=>r.length()<=1?"":r.domNode.innerText).join(`
124
- `).slice(e,e+t)}html(e,t){return`<pre>
125
- ${Ei(this.code(e,t))}
126
- </pre>`}}class je extends De{static register(){B.register(Rr)}}J(je,"TAB"," ");class tl extends Ct{}tl.blotName="code";tl.tagName="CODE";je.blotName="code-block";je.className="ql-code-block";je.tagName="DIV";Rr.blotName="code-block-container";Rr.className="ql-code-block-container";Rr.tagName="DIV";Rr.allowedChildren=[je];je.allowedChildren=[ft,gt,cn];je.requiredContainer=Rr;const rl={scope:ne.BLOCK,whitelist:["rtl"]},Mh=new At("direction","dir",rl),Dh=new pt("direction","ql-direction",rl),Ph=new ir("direction","direction",rl),Bh={scope:ne.INLINE,whitelist:["serif","monospace"]},qh=new pt("font","ql-font",Bh);class oy extends ir{value(e){return super.value(e).replace(/["']/g,"")}}const Fh=new oy("font","font-family",Bh),jh=new pt("size","ql-size",{scope:ne.INLINE,whitelist:["small","large","huge"]}),$h=new ir("size","font-size",{scope:ne.INLINE,whitelist:["10px","18px","32px"]}),ay=Vt("quill:keyboard"),ly=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey";class wi extends mt{static match(e,t){return["altKey","ctrlKey","metaKey","shiftKey"].some(r=>!!t[r]!==e[r]&&t[r]!==null)?!1:t.key===e.key||t.key===e.which}constructor(e,t){super(e,t),this.bindings={},Object.keys(this.options.bindings).forEach(r=>{this.options.bindings[r]&&this.addBinding(this.options.bindings[r])}),this.addBinding({key:"Enter",shiftKey:null},this.handleEnter),this.addBinding({key:"Enter",metaKey:null,ctrlKey:null,altKey:null},()=>{}),/Firefox/i.test(navigator.userAgent)?(this.addBinding({key:"Backspace"},{collapsed:!0},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0},this.handleDelete)):(this.addBinding({key:"Backspace"},{collapsed:!0,prefix:/^.?$/},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0,suffix:/^.?$/},this.handleDelete)),this.addBinding({key:"Backspace"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Delete"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Backspace",altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},this.handleBackspace),this.listen()}addBinding(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const s=cy(e);if(s==null){ay.warn("Attempted to add invalid keyboard binding",s);return}typeof t=="function"&&(t={handler:t}),typeof r=="function"&&(r={handler:r}),(Array.isArray(s.key)?s.key:[s.key]).forEach(o=>{const a={...s,key:o,...t,...r};this.bindings[a.key]=this.bindings[a.key]||[],this.bindings[a.key].push(a)})}listen(){this.quill.root.addEventListener("keydown",e=>{if(e.defaultPrevented||e.isComposing||e.keyCode===229&&(e.key==="Enter"||e.key==="Backspace"))return;const s=(this.bindings[e.key]||[]).concat(this.bindings[e.which]||[]).filter(E=>wi.match(e,E));if(s.length===0)return;const i=B.find(e.target,!0);if(i&&i.scroll!==this.quill.scroll)return;const o=this.quill.getSelection();if(o==null||!this.quill.hasFocus())return;const[a,u]=this.quill.getLine(o.index),[c,h]=this.quill.getLeaf(o.index),[g,d]=o.length===0?[c,h]:this.quill.getLeaf(o.index+o.length),m=c instanceof ri?c.value().slice(0,h):"",v=g instanceof ri?g.value().slice(d):"",p={collapsed:o.length===0,empty:o.length===0&&a.length()<=1,format:this.quill.getFormat(o),line:a,offset:u,prefix:m,suffix:v,event:e};s.some(E=>{if(E.collapsed!=null&&E.collapsed!==p.collapsed||E.empty!=null&&E.empty!==p.empty||E.offset!=null&&E.offset!==p.offset)return!1;if(Array.isArray(E.format)){if(E.format.every(S=>p.format[S]==null))return!1}else if(typeof E.format=="object"&&!Object.keys(E.format).every(S=>E.format[S]===!0?p.format[S]!=null:E.format[S]===!1?p.format[S]==null:Wt(E.format[S],p.format[S])))return!1;return E.prefix!=null&&!E.prefix.test(p.prefix)||E.suffix!=null&&!E.suffix.test(p.suffix)?!1:E.handler.call(this,o,p,E)!==!0})&&e.preventDefault()})}handleBackspace(e,t){const r=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(t.prefix)?2:1;if(e.index===0||this.quill.getLength()<=1)return;let s={};const[i]=this.quill.getLine(e.index);let o=new re().retain(e.index-r).delete(r);if(t.offset===0){const[a]=this.quill.getLine(e.index-1);if(a&&!(a.statics.blotName==="block"&&a.length()<=1)){const c=i.formats(),h=this.quill.getFormat(e.index-1,1);if(s=et.AttributeMap.diff(c,h)||{},Object.keys(s).length>0){const g=new re().retain(e.index+i.length()-2).retain(1,s);o=o.compose(g)}}}this.quill.updateContents(o,B.sources.USER),this.quill.focus()}handleDelete(e,t){const r=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(t.suffix)?2:1;if(e.index>=this.quill.getLength()-r)return;let s={};const[i]=this.quill.getLine(e.index);let o=new re().retain(e.index).delete(r);if(t.offset>=i.length()-1){const[a]=this.quill.getLine(e.index+1);if(a){const u=i.formats(),c=this.quill.getFormat(e.index,1);s=et.AttributeMap.diff(u,c)||{},Object.keys(s).length>0&&(o=o.retain(a.length()-1).retain(1,s))}}this.quill.updateContents(o,B.sources.USER),this.quill.focus()}handleDeleteRange(e){nl({range:e,quill:this.quill}),this.quill.focus()}handleEnter(e,t){const r=Object.keys(t.format).reduce((i,o)=>(this.quill.scroll.query(o,ne.BLOCK)&&!Array.isArray(t.format[o])&&(i[o]=t.format[o]),i),{}),s=new re().retain(e.index).delete(e.length).insert(`
127
- `,r);this.quill.updateContents(s,B.sources.USER),this.quill.setSelection(e.index+1,B.sources.SILENT),this.quill.focus()}}const uy={bindings:{bold:qo("bold"),italic:qo("italic"),underline:qo("underline"),indent:{key:"Tab",format:["blockquote","indent","list"],handler(n,e){return e.collapsed&&e.offset!==0?!0:(this.quill.format("indent","+1",B.sources.USER),!1)}},outdent:{key:"Tab",shiftKey:!0,format:["blockquote","indent","list"],handler(n,e){return e.collapsed&&e.offset!==0?!0:(this.quill.format("indent","-1",B.sources.USER),!1)}},"outdent backspace":{key:"Backspace",collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler(n,e){e.format.indent!=null?this.quill.format("indent","-1",B.sources.USER):e.format.list!=null&&this.quill.format("list",!1,B.sources.USER)}},"indent code-block":Cu(!0),"outdent code-block":Cu(!1),"remove tab":{key:"Tab",shiftKey:!0,collapsed:!0,prefix:/\t$/,handler(n){this.quill.deleteText(n.index-1,1,B.sources.USER)}},tab:{key:"Tab",handler(n,e){if(e.format.table)return!0;this.quill.history.cutoff();const t=new re().retain(n.index).delete(n.length).insert(" ");return this.quill.updateContents(t,B.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(n.index+1,B.sources.SILENT),!1}},"blockquote empty enter":{key:"Enter",collapsed:!0,format:["blockquote"],empty:!0,handler(){this.quill.format("blockquote",!1,B.sources.USER)}},"list empty enter":{key:"Enter",collapsed:!0,format:["list"],empty:!0,handler(n,e){const t={list:!1};e.format.indent&&(t.indent=!1),this.quill.formatLine(n.index,n.length,t,B.sources.USER)}},"checklist enter":{key:"Enter",collapsed:!0,format:{list:"checked"},handler(n){const[e,t]=this.quill.getLine(n.index),r={...e.formats(),list:"checked"},s=new re().retain(n.index).insert(`
128
- `,r).retain(e.length()-t-1).retain(1,{list:"unchecked"});this.quill.updateContents(s,B.sources.USER),this.quill.setSelection(n.index+1,B.sources.SILENT),this.quill.scrollSelectionIntoView()}},"header enter":{key:"Enter",collapsed:!0,format:["header"],suffix:/^$/,handler(n,e){const[t,r]=this.quill.getLine(n.index),s=new re().retain(n.index).insert(`
129
- `,e.format).retain(t.length()-r-1).retain(1,{header:null});this.quill.updateContents(s,B.sources.USER),this.quill.setSelection(n.index+1,B.sources.SILENT),this.quill.scrollSelectionIntoView()}},"table backspace":{key:"Backspace",format:["table"],collapsed:!0,offset:0,handler(){}},"table delete":{key:"Delete",format:["table"],collapsed:!0,suffix:/^$/,handler(){}},"table enter":{key:"Enter",shiftKey:null,format:["table"],handler(n){const e=this.quill.getModule("table");if(e){const[t,r,s,i]=e.getTable(n),o=hy(t,r,s,i);if(o==null)return;let a=t.offset();if(o<0){const u=new re().retain(a).insert(`
130
- `);this.quill.updateContents(u,B.sources.USER),this.quill.setSelection(n.index+1,n.length,B.sources.SILENT)}else if(o>0){a+=t.length();const u=new re().retain(a).insert(`
131
- `);this.quill.updateContents(u,B.sources.USER),this.quill.setSelection(a,B.sources.USER)}}}},"table tab":{key:"Tab",shiftKey:null,format:["table"],handler(n,e){const{event:t,line:r}=e,s=r.offset(this.quill.scroll);t.shiftKey?this.quill.setSelection(s-1,B.sources.USER):this.quill.setSelection(s+r.length(),B.sources.USER)}},"list autofill":{key:" ",shiftKey:null,collapsed:!0,format:{"code-block":!1,blockquote:!1,table:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler(n,e){if(this.quill.scroll.query("list")==null)return!0;const{length:t}=e.prefix,[r,s]=this.quill.getLine(n.index);if(s>t)return!0;let i;switch(e.prefix.trim()){case"[]":case"[ ]":i="unchecked";break;case"[x]":i="checked";break;case"-":case"*":i="bullet";break;default:i="ordered"}this.quill.insertText(n.index," ",B.sources.USER),this.quill.history.cutoff();const o=new re().retain(n.index-s).delete(t+1).retain(r.length()-2-s).retain(1,{list:i});return this.quill.updateContents(o,B.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(n.index-t,B.sources.SILENT),!1}},"code exit":{key:"Enter",collapsed:!0,format:["code-block"],prefix:/^$/,suffix:/^\s*$/,handler(n){const[e,t]=this.quill.getLine(n.index);let r=2,s=e;for(;s!=null&&s.length()<=1&&s.formats()["code-block"];)if(s=s.prev,r-=1,r<=0){const i=new re().retain(n.index+e.length()-t-2).retain(1,{"code-block":null}).delete(1);return this.quill.updateContents(i,B.sources.USER),this.quill.setSelection(n.index-1,B.sources.SILENT),!1}return!0}},"embed left":Ms("ArrowLeft",!1),"embed left shift":Ms("ArrowLeft",!0),"embed right":Ms("ArrowRight",!1),"embed right shift":Ms("ArrowRight",!0),"table down":Tu(!1),"table up":Tu(!0)}};wi.DEFAULTS=uy;function Cu(n){return{key:"Tab",shiftKey:!n,format:{"code-block":!0},handler(e,t){let{event:r}=t;const s=this.quill.scroll.query("code-block"),{TAB:i}=s;if(e.length===0&&!r.shiftKey){this.quill.insertText(e.index,i,B.sources.USER),this.quill.setSelection(e.index+i.length,B.sources.SILENT);return}const o=e.length===0?this.quill.getLines(e.index,1):this.quill.getLines(e);let{index:a,length:u}=e;o.forEach((c,h)=>{n?(c.insertAt(0,i),h===0?a+=i.length:u+=i.length):c.domNode.textContent.startsWith(i)&&(c.deleteAt(0,i.length),h===0?a-=i.length:u-=i.length)}),this.quill.update(B.sources.USER),this.quill.setSelection(a,u,B.sources.SILENT)}}}function Ms(n,e){return{key:n,shiftKey:e,altKey:null,[n==="ArrowLeft"?"prefix":"suffix"]:/^$/,handler(r){let{index:s}=r;n==="ArrowRight"&&(s+=r.length+1);const[i]=this.quill.getLeaf(s);return i instanceof We?(n==="ArrowLeft"?e?this.quill.setSelection(r.index-1,r.length+1,B.sources.USER):this.quill.setSelection(r.index-1,B.sources.USER):e?this.quill.setSelection(r.index,r.length+1,B.sources.USER):this.quill.setSelection(r.index+r.length+1,B.sources.USER),!1):!0}}}function qo(n){return{key:n[0],shortKey:!0,handler(e,t){this.quill.format(n,!t.format[n],B.sources.USER)}}}function Tu(n){return{key:n?"ArrowUp":"ArrowDown",collapsed:!0,format:["table"],handler(e,t){const r=n?"prev":"next",s=t.line,i=s.parent[r];if(i!=null){if(i.statics.blotName==="table-row"){let o=i.children.head,a=s;for(;a.prev!=null;)a=a.prev,o=o.next;const u=o.offset(this.quill.scroll)+Math.min(t.offset,o.length()-1);this.quill.setSelection(u,0,B.sources.USER)}}else{const o=s.table()[r];o!=null&&(n?this.quill.setSelection(o.offset(this.quill.scroll)+o.length()-1,0,B.sources.USER):this.quill.setSelection(o.offset(this.quill.scroll),0,B.sources.USER))}return!1}}}function cy(n){if(typeof n=="string"||typeof n=="number")n={key:n};else if(typeof n=="object")n=en(n);else return null;return n.shortKey&&(n[ly]=n.shortKey,delete n.shortKey),n}function nl(n){let{quill:e,range:t}=n;const r=e.getLines(t);let s={};if(r.length>1){const i=r[0].formats(),o=r[r.length-1].formats();s=et.AttributeMap.diff(o,i)||{}}e.deleteText(t,B.sources.USER),Object.keys(s).length>0&&e.formatLine(t.index,1,s,B.sources.USER),e.setSelection(t.index,B.sources.SILENT)}function hy(n,e,t,r){return e.prev==null&&e.next==null?t.prev==null&&t.next==null?r===0?-1:1:t.prev==null?-1:1:e.prev==null?-1:e.next==null?1:null}const dy=/font-weight:\s*normal/,fy=["P","OL","UL"],ku=n=>n&&fy.includes(n.tagName),py=n=>{Array.from(n.querySelectorAll("br")).filter(e=>ku(e.previousElementSibling)&&ku(e.nextElementSibling)).forEach(e=>{var t;(t=e.parentNode)==null||t.removeChild(e)})},gy=n=>{Array.from(n.querySelectorAll('b[style*="font-weight"]')).filter(e=>{var t;return(t=e.getAttribute("style"))==null?void 0:t.match(dy)}).forEach(e=>{var r;const t=n.createDocumentFragment();t.append(...e.childNodes),(r=e.parentNode)==null||r.replaceChild(t,e)})};function my(n){n.querySelector('[id^="docs-internal-guid-"]')&&(gy(n),py(n))}const vy=/\bmso-list:[^;]*ignore/i,yy=/\bmso-list:[^;]*\bl(\d+)/i,by=/\bmso-list:[^;]*\blevel(\d+)/i,Ey=(n,e)=>{const t=n.getAttribute("style"),r=t==null?void 0:t.match(yy);if(!r)return null;const s=Number(r[1]),i=t==null?void 0:t.match(by),o=i?Number(i[1]):1,a=new RegExp(`@list l${s}:level${o}\\s*\\{[^\\}]*mso-level-number-format:\\s*([\\w-]+)`,"i"),u=e.match(a),c=u&&u[1]==="bullet"?"bullet":"ordered";return{id:s,indent:o,type:c,element:n}},wy=n=>{var o,a;const e=Array.from(n.querySelectorAll("[style*=mso-list]")),t=[],r=[];e.forEach(u=>{(u.getAttribute("style")||"").match(vy)?t.push(u):r.push(u)}),t.forEach(u=>{var c;return(c=u.parentNode)==null?void 0:c.removeChild(u)});const s=n.documentElement.innerHTML,i=r.map(u=>Ey(u,s)).filter(u=>u);for(;i.length;){const u=[];let c=i.shift();for(;c;)u.push(c),c=i.length&&((o=i[0])==null?void 0:o.element)===c.element.nextElementSibling&&i[0].id===c.id?i.shift():null;const h=document.createElement("ul");u.forEach(m=>{const v=document.createElement("li");v.setAttribute("data-list",m.type),m.indent>1&&v.setAttribute("class",`ql-indent-${m.indent-1}`),v.innerHTML=m.element.innerHTML,h.appendChild(v)});const g=(a=u[0])==null?void 0:a.element,{parentNode:d}=g??{};g&&(d==null||d.replaceChild(h,g)),u.slice(1).forEach(m=>{let{element:v}=m;d==null||d.removeChild(v)})}};function xy(n){n.documentElement.getAttribute("xmlns:w")==="urn:schemas-microsoft-com:office:word"&&wy(n)}const Sy=[xy,my],_y=n=>{n.documentElement&&Sy.forEach(e=>{e(n)})},Ay=Vt("quill:clipboard"),Cy=[[Node.TEXT_NODE,qy],[Node.TEXT_NODE,Iu],["br",Ry],[Node.ELEMENT_NODE,Iu],[Node.ELEMENT_NODE,Iy],[Node.ELEMENT_NODE,Ny],[Node.ELEMENT_NODE,Py],["li",My],["ol, ul",Dy],["pre",Oy],["tr",By],["b",Fo("bold")],["i",Fo("italic")],["strike",Fo("strike")],["style",Ly]],Ty=[ny,Mh].reduce((n,e)=>(n[e.keyName]=e,n),{}),Nu=[Oh,el,Ja,Ph,Fh,$h].reduce((n,e)=>(n[e.keyName]=e,n),{});class Vh extends mt{constructor(e,t){super(e,t),this.quill.root.addEventListener("copy",r=>this.onCaptureCopy(r,!1)),this.quill.root.addEventListener("cut",r=>this.onCaptureCopy(r,!0)),this.quill.root.addEventListener("paste",this.onCapturePaste.bind(this)),this.matchers=[],Cy.concat(this.options.matchers??[]).forEach(r=>{let[s,i]=r;this.addMatcher(s,i)})}addMatcher(e,t){this.matchers.push([e,t])}convert(e){let{html:t,text:r}=e,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(s[je.blotName])return new re().insert(r||"",{[je.blotName]:s[je.blotName]});if(!t)return new re().insert(r||"",s);const i=this.convertHTML(t);return rs(i,`
132
- `)&&(i.ops[i.ops.length-1].attributes==null||s.table)?i.compose(new re().retain(i.length()-1).delete(1)):i}normalizeHTML(e){_y(e)}convertHTML(e){const t=new DOMParser().parseFromString(e,"text/html");this.normalizeHTML(t);const r=t.body,s=new WeakMap,[i,o]=this.prepareMatching(r,s);return sl(this.quill.scroll,r,i,o,s)}dangerouslyPasteHTML(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:B.sources.API;if(typeof e=="string"){const s=this.convert({html:e,text:""});this.quill.setContents(s,t),this.quill.setSelection(0,B.sources.SILENT)}else{const s=this.convert({html:t,text:""});this.quill.updateContents(new re().retain(e).concat(s),r),this.quill.setSelection(e+s.length(),B.sources.SILENT)}}onCaptureCopy(e){var o,a;let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(e.defaultPrevented)return;e.preventDefault();const[r]=this.quill.selection.getRange();if(r==null)return;const{html:s,text:i}=this.onCopy(r,t);(o=e.clipboardData)==null||o.setData("text/plain",i),(a=e.clipboardData)==null||a.setData("text/html",s),t&&nl({range:r,quill:this.quill})}normalizeURIList(e){return e.split(/\r?\n/).filter(t=>t[0]!=="#").join(`
133
- `)}onCapturePaste(e){var o,a,u,c,h;if(e.defaultPrevented||!this.quill.isEnabled())return;e.preventDefault();const t=this.quill.getSelection(!0);if(t==null)return;const r=(o=e.clipboardData)==null?void 0:o.getData("text/html");let s=(a=e.clipboardData)==null?void 0:a.getData("text/plain");if(!r&&!s){const g=(u=e.clipboardData)==null?void 0:u.getData("text/uri-list");g&&(s=this.normalizeURIList(g))}const i=Array.from(((c=e.clipboardData)==null?void 0:c.files)||[]);if(!r&&i.length>0){this.quill.uploader.upload(t,i);return}if(r&&i.length>0){const g=new DOMParser().parseFromString(r,"text/html");if(g.body.childElementCount===1&&((h=g.body.firstElementChild)==null?void 0:h.tagName)==="IMG"){this.quill.uploader.upload(t,i);return}}this.onPaste(t,{html:r,text:s})}onCopy(e){const t=this.quill.getText(e);return{html:this.quill.getSemanticHTML(e),text:t}}onPaste(e,t){let{text:r,html:s}=t;const i=this.quill.getFormat(e.index),o=this.convert({text:r,html:s},i);Ay.log("onPaste",o,{text:r,html:s});const a=new re().retain(e.index).delete(e.length).concat(o);this.quill.updateContents(a,B.sources.USER),this.quill.setSelection(a.length()-e.length,B.sources.SILENT),this.quill.scrollSelectionIntoView()}prepareMatching(e,t){const r=[],s=[];return this.matchers.forEach(i=>{const[o,a]=i;switch(o){case Node.TEXT_NODE:s.push(a);break;case Node.ELEMENT_NODE:r.push(a);break;default:Array.from(e.querySelectorAll(o)).forEach(u=>{if(t.has(u)){const c=t.get(u);c==null||c.push(a)}else t.set(u,[a])});break}}),[r,s]}}J(Vh,"DEFAULTS",{matchers:[]});function Or(n,e,t,r){return r.query(e)?n.reduce((s,i)=>{if(!i.insert)return s;if(i.attributes&&i.attributes[e])return s.push(i);const o=t?{[e]:t}:{};return s.insert(i.insert,{...o,...i.attributes})},new re):n}function rs(n,e){let t="";for(let r=n.ops.length-1;r>=0&&t.length<e.length;--r){const s=n.ops[r];if(typeof s.insert!="string")break;t=s.insert+t}return t.slice(-1*e.length)===e}function Zt(n,e){if(!(n instanceof Element))return!1;const t=e.query(n);return t&&t.prototype instanceof We?!1:["address","article","blockquote","canvas","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","iframe","li","main","nav","ol","output","p","pre","section","table","td","tr","ul","video"].includes(n.tagName.toLowerCase())}function ky(n,e){return n.previousElementSibling&&n.nextElementSibling&&!Zt(n.previousElementSibling,e)&&!Zt(n.nextElementSibling,e)}const Ds=new WeakMap;function Uh(n){return n==null?!1:(Ds.has(n)||(n.tagName==="PRE"?Ds.set(n,!0):Ds.set(n,Uh(n.parentNode))),Ds.get(n))}function sl(n,e,t,r,s){return e.nodeType===e.TEXT_NODE?r.reduce((i,o)=>o(e,i,n),new re):e.nodeType===e.ELEMENT_NODE?Array.from(e.childNodes||[]).reduce((i,o)=>{let a=sl(n,o,t,r,s);return o.nodeType===e.ELEMENT_NODE&&(a=t.reduce((u,c)=>c(o,u,n),a),a=(s.get(o)||[]).reduce((u,c)=>c(o,u,n),a)),i.concat(a)},new re):new re}function Fo(n){return(e,t,r)=>Or(t,n,!0,r)}function Ny(n,e,t){const r=At.keys(n),s=pt.keys(n),i=ir.keys(n),o={};return r.concat(s).concat(i).forEach(a=>{let u=t.query(a,ne.ATTRIBUTE);u!=null&&(o[u.attrName]=u.value(n),o[u.attrName])||(u=Ty[a],u!=null&&(u.attrName===a||u.keyName===a)&&(o[u.attrName]=u.value(n)||void 0),u=Nu[a],u!=null&&(u.attrName===a||u.keyName===a)&&(u=Nu[a],o[u.attrName]=u.value(n)||void 0))}),Object.entries(o).reduce((a,u)=>{let[c,h]=u;return Or(a,c,h,t)},e)}function Iy(n,e,t){const r=t.query(n);if(r==null)return e;if(r.prototype instanceof We){const s={},i=r.value(n);if(i!=null)return s[r.blotName]=i,new re().insert(s,r.formats(n,t))}else if(r.prototype instanceof Yn&&!rs(e,`
134
- `)&&e.insert(`
135
- `),"blotName"in r&&"formats"in r&&typeof r.formats=="function")return Or(e,r.blotName,r.formats(n,t),t);return e}function Ry(n,e){return rs(e,`
136
- `)||e.insert(`
137
- `),e}function Oy(n,e,t){const r=t.query("code-block"),s=r&&"formats"in r&&typeof r.formats=="function"?r.formats(n,t):!0;return Or(e,"code-block",s,t)}function Ly(){return new re}function My(n,e,t){const r=t.query(n);if(r==null||r.blotName!=="list"||!rs(e,`
138
- `))return e;let s=-1,i=n.parentNode;for(;i!=null;)["OL","UL"].includes(i.tagName)&&(s+=1),i=i.parentNode;return s<=0?e:e.reduce((o,a)=>a.insert?a.attributes&&typeof a.attributes.indent=="number"?o.push(a):o.insert(a.insert,{indent:s,...a.attributes||{}}):o,new re)}function Dy(n,e,t){const r=n;let s=r.tagName==="OL"?"ordered":"bullet";const i=r.getAttribute("data-checked");return i&&(s=i==="true"?"checked":"unchecked"),Or(e,"list",s,t)}function Iu(n,e,t){if(!rs(e,`
139
- `)){if(Zt(n,t)&&(n.childNodes.length>0||n instanceof HTMLParagraphElement))return e.insert(`
140
- `);if(e.length()>0&&n.nextSibling){let r=n.nextSibling;for(;r!=null;){if(Zt(r,t))return e.insert(`
141
- `);const s=t.query(r);if(s&&s.prototype instanceof Je)return e.insert(`
142
- `);r=r.firstChild}}}return e}function Py(n,e,t){var i;const r={},s=n.style||{};return s.fontStyle==="italic"&&(r.italic=!0),s.textDecoration==="underline"&&(r.underline=!0),s.textDecoration==="line-through"&&(r.strike=!0),((i=s.fontWeight)!=null&&i.startsWith("bold")||parseInt(s.fontWeight,10)>=700)&&(r.bold=!0),e=Object.entries(r).reduce((o,a)=>{let[u,c]=a;return Or(o,u,c,t)},e),parseFloat(s.textIndent||0)>0?new re().insert(" ").concat(e):e}function By(n,e,t){var s,i;const r=((s=n.parentElement)==null?void 0:s.tagName)==="TABLE"?n.parentElement:(i=n.parentElement)==null?void 0:i.parentElement;if(r!=null){const a=Array.from(r.querySelectorAll("tr")).indexOf(n)+1;return Or(e,"table",a,t)}return e}function qy(n,e,t){var s;let r=n.data;if(((s=n.parentElement)==null?void 0:s.tagName)==="O:P")return e.insert(r.trim());if(!Uh(n)){if(r.trim().length===0&&r.includes(`
143
- `)&&!ky(n,t))return e;r=r.replace(/[^\S\u00a0]/g," "),r=r.replace(/ {2,}/g," "),(n.previousSibling==null&&n.parentElement!=null&&Zt(n.parentElement,t)||n.previousSibling instanceof Element&&Zt(n.previousSibling,t))&&(r=r.replace(/^ /,"")),(n.nextSibling==null&&n.parentElement!=null&&Zt(n.parentElement,t)||n.nextSibling instanceof Element&&Zt(n.nextSibling,t))&&(r=r.replace(/ $/,"")),r=r.replaceAll(" "," ")}return e.insert(r)}class Hh extends mt{constructor(t,r){super(t,r);J(this,"lastRecorded",0);J(this,"ignoreChange",!1);J(this,"stack",{undo:[],redo:[]});J(this,"currentRange",null);this.quill.on(B.events.EDITOR_CHANGE,(s,i,o,a)=>{s===B.events.SELECTION_CHANGE?i&&a!==B.sources.SILENT&&(this.currentRange=i):s===B.events.TEXT_CHANGE&&(this.ignoreChange||(!this.options.userOnly||a===B.sources.USER?this.record(i,o):this.transform(i)),this.currentRange=ya(this.currentRange,i))}),this.quill.keyboard.addBinding({key:"z",shortKey:!0},this.undo.bind(this)),this.quill.keyboard.addBinding({key:["z","Z"],shortKey:!0,shiftKey:!0},this.redo.bind(this)),/Win/i.test(navigator.platform)&&this.quill.keyboard.addBinding({key:"y",shortKey:!0},this.redo.bind(this)),this.quill.root.addEventListener("beforeinput",s=>{s.inputType==="historyUndo"?(this.undo(),s.preventDefault()):s.inputType==="historyRedo"&&(this.redo(),s.preventDefault())})}change(t,r){if(this.stack[t].length===0)return;const s=this.stack[t].pop();if(!s)return;const i=this.quill.getContents(),o=s.delta.invert(i);this.stack[r].push({delta:o,range:ya(s.range,o)}),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(s.delta,B.sources.USER),this.ignoreChange=!1,this.restoreSelection(s)}clear(){this.stack={undo:[],redo:[]}}cutoff(){this.lastRecorded=0}record(t,r){if(t.ops.length===0)return;this.stack.redo=[];let s=t.invert(r),i=this.currentRange;const o=Date.now();if(this.lastRecorded+this.options.delay>o&&this.stack.undo.length>0){const a=this.stack.undo.pop();a&&(s=s.compose(a.delta),i=a.range)}else this.lastRecorded=o;s.length()!==0&&(this.stack.undo.push({delta:s,range:i}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift())}redo(){this.change("redo","undo")}transform(t){Ru(this.stack.undo,t),Ru(this.stack.redo,t)}undo(){this.change("undo","redo")}restoreSelection(t){if(t.range)this.quill.setSelection(t.range,B.sources.USER);else{const r=jy(this.quill.scroll,t.delta);this.quill.setSelection(r,B.sources.USER)}}}J(Hh,"DEFAULTS",{delay:1e3,maxStack:100,userOnly:!1});function Ru(n,e){let t=e;for(let r=n.length-1;r>=0;r-=1){const s=n[r];n[r]={delta:t.transform(s.delta,!0),range:s.range&&ya(s.range,t)},t=s.delta.transform(t),n[r].delta.length()===0&&n.splice(r,1)}}function Fy(n,e){const t=e.ops[e.ops.length-1];return t==null?!1:t.insert!=null?typeof t.insert=="string"&&t.insert.endsWith(`
144
- `):t.attributes!=null?Object.keys(t.attributes).some(r=>n.query(r,ne.BLOCK)!=null):!1}function jy(n,e){const t=e.reduce((s,i)=>s+(i.delete||0),0);let r=e.length()-t;return Fy(n,e)&&(r-=1),r}function ya(n,e){if(!n)return n;const t=e.transformPosition(n.index),r=e.transformPosition(n.index+n.length);return{index:t,length:r-t}}class zh extends mt{constructor(e,t){super(e,t),e.root.addEventListener("drop",r=>{var o;r.preventDefault();let s=null;if(document.caretRangeFromPoint)s=document.caretRangeFromPoint(r.clientX,r.clientY);else if(document.caretPositionFromPoint){const a=document.caretPositionFromPoint(r.clientX,r.clientY);s=document.createRange(),s.setStart(a.offsetNode,a.offset),s.setEnd(a.offsetNode,a.offset)}const i=s&&e.selection.normalizeNative(s);if(i){const a=e.selection.normalizedToRange(i);(o=r.dataTransfer)!=null&&o.files&&this.upload(a,r.dataTransfer.files)}})}upload(e,t){const r=[];Array.from(t).forEach(s=>{var i;s&&((i=this.options.mimetypes)!=null&&i.includes(s.type))&&r.push(s)}),r.length>0&&this.options.handler.call(this,e,r)}}zh.DEFAULTS={mimetypes:["image/png","image/jpeg"],handler(n,e){if(!this.quill.scroll.query("image"))return;const t=e.map(r=>new Promise(s=>{const i=new FileReader;i.onload=()=>{s(i.result)},i.readAsDataURL(r)}));Promise.all(t).then(r=>{const s=r.reduce((i,o)=>i.insert({image:o}),new re().retain(n.index).delete(n.length));this.quill.updateContents(s,ee.sources.USER),this.quill.setSelection(n.index+r.length,ee.sources.SILENT)})}};const $y=["insertText","insertReplacementText"];let Vy=class extends mt{constructor(e,t){super(e,t),e.root.addEventListener("beforeinput",r=>{this.handleBeforeInput(r)}),/Android/i.test(navigator.userAgent)||e.on(B.events.COMPOSITION_BEFORE_START,()=>{this.handleCompositionStart()})}deleteRange(e){nl({range:e,quill:this.quill})}replaceText(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if(e.length===0)return!1;if(t){const r=this.quill.getFormat(e.index,1);this.deleteRange(e),this.quill.updateContents(new re().retain(e.index).insert(t,r),B.sources.USER)}else this.deleteRange(e);return this.quill.setSelection(e.index+t.length,0,B.sources.SILENT),!0}handleBeforeInput(e){if(this.quill.composition.isComposing||e.defaultPrevented||!$y.includes(e.inputType))return;const t=e.getTargetRanges?e.getTargetRanges()[0]:null;if(!t||t.collapsed===!0)return;const r=Uy(e);if(r==null)return;const s=this.quill.selection.normalizeNative(t),i=s?this.quill.selection.normalizedToRange(s):null;i&&this.replaceText(i,r)&&e.preventDefault()}handleCompositionStart(){const e=this.quill.getSelection();e&&this.replaceText(e)}};function Uy(n){var e;return typeof n.data=="string"?n.data:(e=n.dataTransfer)!=null&&e.types.includes("text/plain")?n.dataTransfer.getData("text/plain"):null}const Hy=/Mac/i.test(navigator.platform),zy=100,Gy=n=>!!(n.key==="ArrowLeft"||n.key==="ArrowRight"||n.key==="ArrowUp"||n.key==="ArrowDown"||n.key==="Home"||Hy&&n.key==="a"&&n.ctrlKey===!0);class Ky extends mt{constructor(t,r){super(t,r);J(this,"isListening",!1);J(this,"selectionChangeDeadline",0);this.handleArrowKeys(),this.handleNavigationShortcuts()}handleArrowKeys(){this.quill.keyboard.addBinding({key:["ArrowLeft","ArrowRight"],offset:0,shiftKey:null,handler(t,r){let{line:s,event:i}=r;if(!(s instanceof dt)||!s.uiNode)return!0;const o=getComputedStyle(s.domNode).direction==="rtl";return o&&i.key!=="ArrowRight"||!o&&i.key!=="ArrowLeft"?!0:(this.quill.setSelection(t.index-1,t.length+(i.shiftKey?1:0),B.sources.USER),!1)}})}handleNavigationShortcuts(){this.quill.root.addEventListener("keydown",t=>{!t.defaultPrevented&&Gy(t)&&this.ensureListeningToSelectionChange()})}ensureListeningToSelectionChange(){if(this.selectionChangeDeadline=Date.now()+zy,this.isListening)return;this.isListening=!0;const t=()=>{this.isListening=!1,Date.now()<=this.selectionChangeDeadline&&this.handleSelectionChange()};document.addEventListener("selectionchange",t,{once:!0})}handleSelectionChange(){const t=document.getSelection();if(!t)return;const r=t.getRangeAt(0);if(r.collapsed!==!0||r.startOffset!==0)return;const s=this.quill.scroll.find(r.startContainer);if(!(s instanceof dt)||!s.uiNode)return;const i=document.createRange();i.setStartAfter(s.uiNode),i.setEndAfter(s.uiNode),t.removeAllRanges(),t.addRange(i)}}B.register({"blots/block":De,"blots/block/embed":Je,"blots/break":gt,"blots/container":Ir,"blots/cursor":cn,"blots/embed":Xa,"blots/inline":Ct,"blots/scroll":Xr,"blots/text":ft,"modules/clipboard":Vh,"modules/history":Hh,"modules/keyboard":wi,"modules/uploader":zh,"modules/input":Vy,"modules/uiNode":Ky});class Wy extends pt{add(e,t){let r=0;if(t==="+1"||t==="-1"){const s=this.value(e)||0;r=t==="+1"?s+1:s-1}else typeof t=="number"&&(r=t);return r===0?(this.remove(e),!0):super.add(e,r.toString())}canAdd(e,t){return super.canAdd(e,t)||super.canAdd(e,parseInt(t,10))}value(e){return parseInt(super.value(e),10)||void 0}}const Yy=new Wy("indent","ql-indent",{scope:ne.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});class ba extends De{}J(ba,"blotName","blockquote"),J(ba,"tagName","blockquote");class Ea extends De{static formats(e){return this.tagName.indexOf(e.tagName)+1}}J(Ea,"blotName","header"),J(Ea,"tagName",["H1","H2","H3","H4","H5","H6"]);class ns extends Ir{}ns.blotName="list-container";ns.tagName="OL";class ss extends De{static create(e){const t=super.create();return t.setAttribute("data-list",e),t}static formats(e){return e.getAttribute("data-list")||void 0}static register(){B.register(ns)}constructor(e,t){super(e,t);const r=t.ownerDocument.createElement("span"),s=i=>{if(!e.isEnabled())return;const o=this.statics.formats(t,e);o==="checked"?(this.format("list","unchecked"),i.preventDefault()):o==="unchecked"&&(this.format("list","checked"),i.preventDefault())};r.addEventListener("mousedown",s),r.addEventListener("touchstart",s),this.attachUI(r)}format(e,t){e===this.statics.blotName&&t?this.domNode.setAttribute("data-list",t):super.format(e,t)}}ss.blotName="list";ss.tagName="LI";ns.allowedChildren=[ss];ss.requiredContainer=ns;class Xn extends Ct{static create(){return super.create()}static formats(){return!0}optimize(e){super.optimize(e),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}J(Xn,"blotName","bold"),J(Xn,"tagName",["STRONG","B"]);class wa extends Xn{}J(wa,"blotName","italic"),J(wa,"tagName",["EM","I"]);class Xt extends Ct{static create(e){const t=super.create(e);return t.setAttribute("href",this.sanitize(e)),t.setAttribute("rel","noopener noreferrer"),t.setAttribute("target","_blank"),t}static formats(e){return e.getAttribute("href")}static sanitize(e){return Gh(e,this.PROTOCOL_WHITELIST)?e:this.SANITIZED_URL}format(e,t){e!==this.statics.blotName||!t?super.format(e,t):this.domNode.setAttribute("href",this.constructor.sanitize(t))}}J(Xt,"blotName","link"),J(Xt,"tagName","A"),J(Xt,"SANITIZED_URL","about:blank"),J(Xt,"PROTOCOL_WHITELIST",["http","https","mailto","tel","sms"]);function Gh(n,e){const t=document.createElement("a");t.href=n;const r=t.href.slice(0,t.href.indexOf(":"));return e.indexOf(r)>-1}class xa extends Ct{static create(e){return e==="super"?document.createElement("sup"):e==="sub"?document.createElement("sub"):super.create(e)}static formats(e){if(e.tagName==="SUB")return"sub";if(e.tagName==="SUP")return"super"}}J(xa,"blotName","script"),J(xa,"tagName",["SUB","SUP"]);class Sa extends Xn{}J(Sa,"blotName","strike"),J(Sa,"tagName",["S","STRIKE"]);class _a extends Ct{}J(_a,"blotName","underline"),J(_a,"tagName","U");class Hs extends Xa{static create(e){if(window.katex==null)throw new Error("Formula module requires KaTeX.");const t=super.create(e);return typeof e=="string"&&(window.katex.render(e,t,{throwOnError:!1,errorColor:"#f00"}),t.setAttribute("data-value",e)),t}static value(e){return e.getAttribute("data-value")}html(){const{formula:e}=this.value();return`<span>${e}</span>`}}J(Hs,"blotName","formula"),J(Hs,"className","ql-formula"),J(Hs,"tagName","SPAN");const Ou=["alt","height","width"];class Aa extends We{static create(e){const t=super.create(e);return typeof e=="string"&&t.setAttribute("src",this.sanitize(e)),t}static formats(e){return Ou.reduce((t,r)=>(e.hasAttribute(r)&&(t[r]=e.getAttribute(r)),t),{})}static match(e){return/\.(jpe?g|gif|png)$/.test(e)||/^data:image\/.+;base64/.test(e)}static sanitize(e){return Gh(e,["http","https","data"])?e:"//:0"}static value(e){return e.getAttribute("src")}format(e,t){Ou.indexOf(e)>-1?t?this.domNode.setAttribute(e,t):this.domNode.removeAttribute(e):super.format(e,t)}}J(Aa,"blotName","image"),J(Aa,"tagName","IMG");const Lu=["height","width"];class zs extends Je{static create(e){const t=super.create(e);return t.setAttribute("frameborder","0"),t.setAttribute("allowfullscreen","true"),t.setAttribute("src",this.sanitize(e)),t}static formats(e){return Lu.reduce((t,r)=>(e.hasAttribute(r)&&(t[r]=e.getAttribute(r)),t),{})}static sanitize(e){return Xt.sanitize(e)}static value(e){return e.getAttribute("src")}format(e,t){Lu.indexOf(e)>-1?t?this.domNode.setAttribute(e,t):this.domNode.removeAttribute(e):super.format(e,t)}html(){const{video:e}=this.value();return`<a href="${e}">${e}</a>`}}J(zs,"blotName","video"),J(zs,"className","ql-video"),J(zs,"tagName","IFRAME");const qn=new pt("code-token","hljs",{scope:ne.INLINE});class Bt extends Ct{static formats(e,t){for(;e!=null&&e!==t.domNode;){if(e.classList&&e.classList.contains(je.className))return super.formats(e,t);e=e.parentNode}}constructor(e,t,r){super(e,t,r),qn.add(this.domNode,r)}format(e,t){e!==Bt.blotName?super.format(e,t):t?qn.add(this.domNode,t):(qn.remove(this.domNode),this.domNode.classList.remove(this.statics.className))}optimize(){super.optimize(...arguments),qn.value(this.domNode)||this.unwrap()}}Bt.blotName="code-token";Bt.className="ql-token";class Qe extends je{static create(e){const t=super.create(e);return typeof e=="string"&&t.setAttribute("data-language",e),t}static formats(e){return e.getAttribute("data-language")||"plain"}static register(){}format(e,t){e===this.statics.blotName&&t?this.domNode.setAttribute("data-language",t):super.format(e,t)}replaceWith(e,t){return this.formatAt(0,this.length(),Bt.blotName,!1),super.replaceWith(e,t)}}class Vn extends Rr{attach(){super.attach(),this.forceNext=!1,this.scroll.emitMount(this)}format(e,t){e===Qe.blotName&&(this.forceNext=!0,this.children.forEach(r=>{r.format(e,t)}))}formatAt(e,t,r,s){r===Qe.blotName&&(this.forceNext=!0),super.formatAt(e,t,r,s)}highlight(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.children.head==null)return;const s=`${Array.from(this.domNode.childNodes).filter(o=>o!==this.uiNode).map(o=>o.textContent).join(`
145
- `)}
146
- `,i=Qe.formats(this.children.head.domNode);if(t||this.forceNext||this.cachedText!==s){if(s.trim().length>0||this.cachedText==null){const o=this.children.reduce((u,c)=>u.concat(Nh(c,!1)),new re),a=e(s,i);o.diff(a).reduce((u,c)=>{let{retain:h,attributes:g}=c;return h?(g&&Object.keys(g).forEach(d=>{[Qe.blotName,Bt.blotName].includes(d)&&this.formatAt(u,h,d,g[d])}),u+h):u},0)}this.cachedText=s,this.forceNext=!1}}html(e,t){const[r]=this.children.find(e);return`<pre data-language="${r?Qe.formats(r.domNode):"plain"}">
147
- ${Ei(this.code(e,t))}
148
- </pre>`}optimize(e){if(super.optimize(e),this.parent!=null&&this.children.head!=null&&this.uiNode!=null){const t=Qe.formats(this.children.head.domNode);t!==this.uiNode.value&&(this.uiNode.value=t)}}}Vn.allowedChildren=[Qe];Qe.requiredContainer=Vn;Qe.allowedChildren=[Bt,cn,ft,gt];const Zy=(n,e,t)=>{if(typeof n.versionString=="string"){const r=n.versionString.split(".")[0];if(parseInt(r,10)>=11)return n.highlight(t,{language:e}).value}return n.highlight(e,t).value};class Kh extends mt{static register(){B.register(Bt,!0),B.register(Qe,!0),B.register(Vn,!0)}constructor(e,t){if(super(e,t),this.options.hljs==null)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");this.languages=this.options.languages.reduce((r,s)=>{let{key:i}=s;return r[i]=!0,r},{}),this.highlightBlot=this.highlightBlot.bind(this),this.initListener(),this.initTimer()}initListener(){this.quill.on(B.events.SCROLL_BLOT_MOUNT,e=>{if(!(e instanceof Vn))return;const t=this.quill.root.ownerDocument.createElement("select");this.options.languages.forEach(r=>{let{key:s,label:i}=r;const o=t.ownerDocument.createElement("option");o.textContent=i,o.setAttribute("value",s),t.appendChild(o)}),t.addEventListener("change",()=>{e.format(Qe.blotName,t.value),this.quill.root.focus(),this.highlight(e,!0)}),e.uiNode==null&&(e.attachUI(t),e.children.head&&(t.value=Qe.formats(e.children.head.domNode)))})}initTimer(){let e=null;this.quill.on(B.events.SCROLL_OPTIMIZE,()=>{e&&clearTimeout(e),e=setTimeout(()=>{this.highlight(),e=null},this.options.interval)})}highlight(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.quill.selection.composing)return;this.quill.update(B.sources.USER);const r=this.quill.getSelection();(e==null?this.quill.scroll.descendants(Vn):[e]).forEach(i=>{i.highlight(this.highlightBlot,t)}),this.quill.update(B.sources.SILENT),r!=null&&this.quill.setSelection(r,B.sources.SILENT)}highlightBlot(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"plain";if(t=this.languages[t]?t:"plain",t==="plain")return Ei(e).split(`
149
- `).reduce((s,i,o)=>(o!==0&&s.insert(`
150
- `,{[je.blotName]:t}),s.insert(i)),new re);const r=this.quill.root.ownerDocument.createElement("div");return r.classList.add(je.className),r.innerHTML=Zy(this.options.hljs,t,e),sl(this.quill.scroll,r,[(s,i)=>{const o=qn.value(s);return o?i.compose(new re().retain(i.length(),{[Bt.blotName]:o})):i}],[(s,i)=>s.data.split(`
151
- `).reduce((o,a,u)=>(u!==0&&o.insert(`
152
- `,{[je.blotName]:t}),o.insert(a)),i)],new WeakMap)}}Kh.DEFAULTS={hljs:window.hljs,interval:1e3,languages:[{key:"plain",label:"Plain"},{key:"bash",label:"Bash"},{key:"cpp",label:"C++"},{key:"cs",label:"C#"},{key:"css",label:"CSS"},{key:"diff",label:"Diff"},{key:"xml",label:"HTML/XML"},{key:"java",label:"Java"},{key:"javascript",label:"JavaScript"},{key:"markdown",label:"Markdown"},{key:"php",label:"PHP"},{key:"python",label:"Python"},{key:"ruby",label:"Ruby"},{key:"sql",label:"SQL"}]};const Hn=class Hn extends De{static create(e){const t=super.create();return e?t.setAttribute("data-row",e):t.setAttribute("data-row",il()),t}static formats(e){if(e.hasAttribute("data-row"))return e.getAttribute("data-row")}cellOffset(){return this.parent?this.parent.children.indexOf(this):-1}format(e,t){e===Hn.blotName&&t?this.domNode.setAttribute("data-row",t):super.format(e,t)}row(){return this.parent}rowOffset(){return this.row()?this.row().rowOffset():-1}table(){return this.row()&&this.row().table()}};J(Hn,"blotName","table"),J(Hn,"tagName","TD");let ut=Hn;class qt extends Ir{checkMerge(){if(super.checkMerge()&&this.next.children.head!=null){const e=this.children.head.formats(),t=this.children.tail.formats(),r=this.next.children.head.formats(),s=this.next.children.tail.formats();return e.table===t.table&&e.table===r.table&&e.table===s.table}return!1}optimize(e){super.optimize(e),this.children.forEach(t=>{if(t.next==null)return;const r=t.formats(),s=t.next.formats();if(r.table!==s.table){const i=this.splitAfter(t);i&&i.optimize(),this.prev&&this.prev.optimize()}})}rowOffset(){return this.parent?this.parent.children.indexOf(this):-1}table(){return this.parent&&this.parent.parent}}J(qt,"blotName","table-row"),J(qt,"tagName","TR");class _t extends Ir{}J(_t,"blotName","table-body"),J(_t,"tagName","TBODY");class dn extends Ir{balanceCells(){const e=this.descendants(qt),t=e.reduce((r,s)=>Math.max(s.children.length,r),0);e.forEach(r=>{new Array(t-r.children.length).fill(0).forEach(()=>{let s;r.children.head!=null&&(s=ut.formats(r.children.head.domNode));const i=this.scroll.create(ut.blotName,s);r.appendChild(i),i.optimize()})})}cells(e){return this.rows().map(t=>t.children.at(e))}deleteColumn(e){const[t]=this.descendant(_t);t==null||t.children.head==null||t.children.forEach(r=>{const s=r.children.at(e);s!=null&&s.remove()})}insertColumn(e){const[t]=this.descendant(_t);t==null||t.children.head==null||t.children.forEach(r=>{const s=r.children.at(e),i=ut.formats(r.children.head.domNode),o=this.scroll.create(ut.blotName,i);r.insertBefore(o,s)})}insertRow(e){const[t]=this.descendant(_t);if(t==null||t.children.head==null)return;const r=il(),s=this.scroll.create(qt.blotName);t.children.head.children.forEach(()=>{const o=this.scroll.create(ut.blotName,r);s.appendChild(o)});const i=t.children.at(e);t.insertBefore(s,i)}rows(){const e=this.children.head;return e==null?[]:e.children.map(t=>t)}}J(dn,"blotName","table-container"),J(dn,"tagName","TABLE");dn.allowedChildren=[_t];_t.requiredContainer=dn;_t.allowedChildren=[qt];qt.requiredContainer=_t;qt.allowedChildren=[ut];ut.requiredContainer=qt;function il(){return`row-${Math.random().toString(36).slice(2,6)}`}class Xy extends mt{static register(){B.register(ut),B.register(qt),B.register(_t),B.register(dn)}constructor(){super(...arguments),this.listenBalanceCells()}balanceTables(){this.quill.scroll.descendants(dn).forEach(e=>{e.balanceCells()})}deleteColumn(){const[e,,t]=this.getTable();t!=null&&(e.deleteColumn(t.cellOffset()),this.quill.update(B.sources.USER))}deleteRow(){const[,e]=this.getTable();e!=null&&(e.remove(),this.quill.update(B.sources.USER))}deleteTable(){const[e]=this.getTable();if(e==null)return;const t=e.offset();e.remove(),this.quill.update(B.sources.USER),this.quill.setSelection(t,B.sources.SILENT)}getTable(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.quill.getSelection();if(e==null)return[null,null,null,-1];const[t,r]=this.quill.getLine(e.index);if(t==null||t.statics.blotName!==ut.blotName)return[null,null,null,-1];const s=t.parent;return[s.parent.parent,s,t,r]}insertColumn(e){const t=this.quill.getSelection();if(!t)return;const[r,s,i]=this.getTable(t);if(i==null)return;const o=i.cellOffset();r.insertColumn(o+e),this.quill.update(B.sources.USER);let a=s.rowOffset();e===0&&(a+=1),this.quill.setSelection(t.index+a,t.length,B.sources.SILENT)}insertColumnLeft(){this.insertColumn(0)}insertColumnRight(){this.insertColumn(1)}insertRow(e){const t=this.quill.getSelection();if(!t)return;const[r,s,i]=this.getTable(t);if(i==null)return;const o=s.rowOffset();r.insertRow(o+e),this.quill.update(B.sources.USER),e>0?this.quill.setSelection(t,B.sources.SILENT):this.quill.setSelection(t.index+s.children.length,t.length,B.sources.SILENT)}insertRowAbove(){this.insertRow(0)}insertRowBelow(){this.insertRow(1)}insertTable(e,t){const r=this.quill.getSelection();if(r==null)return;const s=new Array(e).fill(0).reduce(i=>{const o=new Array(t).fill(`
153
- `).join("");return i.insert(o,{table:il()})},new re().retain(r.index));this.quill.updateContents(s,B.sources.USER),this.quill.setSelection(r.index,B.sources.SILENT),this.balanceTables()}listenBalanceCells(){this.quill.on(B.events.SCROLL_OPTIMIZE,e=>{e.some(t=>["TD","TR","TBODY","TABLE"].includes(t.target.tagName)?(this.quill.once(B.events.TEXT_CHANGE,(r,s,i)=>{i===B.sources.USER&&this.balanceTables()}),!0):!1)})}}const Mu=Vt("quill:toolbar");class ol extends mt{constructor(e,t){var r,s;if(super(e,t),Array.isArray(this.options.container)){const i=document.createElement("div");i.setAttribute("role","toolbar"),Qy(i,this.options.container),(s=(r=e.container)==null?void 0:r.parentNode)==null||s.insertBefore(i,e.container),this.container=i}else typeof this.options.container=="string"?this.container=document.querySelector(this.options.container):this.container=this.options.container;if(!(this.container instanceof HTMLElement)){Mu.error("Container required for toolbar",this.options);return}this.container.classList.add("ql-toolbar"),this.controls=[],this.handlers={},this.options.handlers&&Object.keys(this.options.handlers).forEach(i=>{var a;const o=(a=this.options.handlers)==null?void 0:a[i];o&&this.addHandler(i,o)}),Array.from(this.container.querySelectorAll("button, select")).forEach(i=>{this.attach(i)}),this.quill.on(B.events.EDITOR_CHANGE,()=>{const[i]=this.quill.selection.getRange();this.update(i)})}addHandler(e,t){this.handlers[e]=t}attach(e){let t=Array.from(e.classList).find(s=>s.indexOf("ql-")===0);if(!t)return;if(t=t.slice(3),e.tagName==="BUTTON"&&e.setAttribute("type","button"),this.handlers[t]==null&&this.quill.scroll.query(t)==null){Mu.warn("ignoring attaching to nonexistent format",t,e);return}const r=e.tagName==="SELECT"?"change":"click";e.addEventListener(r,s=>{let i;if(e.tagName==="SELECT"){if(e.selectedIndex<0)return;const a=e.options[e.selectedIndex];a.hasAttribute("selected")?i=!1:i=a.value||!1}else e.classList.contains("ql-active")?i=!1:i=e.value||!e.hasAttribute("value"),s.preventDefault();this.quill.focus();const[o]=this.quill.selection.getRange();if(this.handlers[t]!=null)this.handlers[t].call(this,i);else if(this.quill.scroll.query(t).prototype instanceof We){if(i=prompt(`Enter ${t}`),!i)return;this.quill.updateContents(new re().retain(o.index).delete(o.length).insert({[t]:i}),B.sources.USER)}else this.quill.format(t,i,B.sources.USER);this.update(o)}),this.controls.push([t,e])}update(e){const t=e==null?{}:this.quill.getFormat(e);this.controls.forEach(r=>{const[s,i]=r;if(i.tagName==="SELECT"){let o=null;if(e==null)o=null;else if(t[s]==null)o=i.querySelector("option[selected]");else if(!Array.isArray(t[s])){let a=t[s];typeof a=="string"&&(a=a.replace(/"/g,'\\"')),o=i.querySelector(`option[value="${a}"]`)}o==null?(i.value="",i.selectedIndex=-1):o.selected=!0}else if(e==null)i.classList.remove("ql-active"),i.setAttribute("aria-pressed","false");else if(i.hasAttribute("value")){const o=t[s],a=o===i.getAttribute("value")||o!=null&&o.toString()===i.getAttribute("value")||o==null&&!i.getAttribute("value");i.classList.toggle("ql-active",a),i.setAttribute("aria-pressed",a.toString())}else{const o=t[s]!=null;i.classList.toggle("ql-active",o),i.setAttribute("aria-pressed",o.toString())}})}}ol.DEFAULTS={};function Du(n,e,t){const r=document.createElement("button");r.setAttribute("type","button"),r.classList.add(`ql-${e}`),r.setAttribute("aria-pressed","false"),t!=null?(r.value=t,r.setAttribute("aria-label",`${e}: ${t}`)):r.setAttribute("aria-label",e),n.appendChild(r)}function Qy(n,e){Array.isArray(e[0])||(e=[e]),e.forEach(t=>{const r=document.createElement("span");r.classList.add("ql-formats"),t.forEach(s=>{if(typeof s=="string")Du(r,s);else{const i=Object.keys(s)[0],o=s[i];Array.isArray(o)?Jy(r,i,o):Du(r,i,o)}}),n.appendChild(r)})}function Jy(n,e,t){const r=document.createElement("select");r.classList.add(`ql-${e}`),t.forEach(s=>{const i=document.createElement("option");s!==!1?i.setAttribute("value",String(s)):i.setAttribute("selected","selected"),r.appendChild(i)}),n.appendChild(r)}ol.DEFAULTS={container:null,handlers:{clean(){const n=this.quill.getSelection();if(n!=null)if(n.length===0){const e=this.quill.getFormat();Object.keys(e).forEach(t=>{this.quill.scroll.query(t,ne.INLINE)!=null&&this.quill.format(t,!1,B.sources.USER)})}else this.quill.removeFormat(n.index,n.length,B.sources.USER)},direction(n){const{align:e}=this.quill.getFormat();n==="rtl"&&e==null?this.quill.format("align","right",B.sources.USER):!n&&e==="right"&&this.quill.format("align",!1,B.sources.USER),this.quill.format("direction",n,B.sources.USER)},indent(n){const e=this.quill.getSelection(),t=this.quill.getFormat(e),r=parseInt(t.indent||0,10);if(n==="+1"||n==="-1"){let s=n==="+1"?1:-1;t.direction==="rtl"&&(s*=-1),this.quill.format("indent",r+s,B.sources.USER)}},link(n){n===!0&&(n=prompt("Enter link URL:")),this.quill.format("link",n,B.sources.USER)},list(n){const e=this.quill.getSelection(),t=this.quill.getFormat(e);n==="check"?t.list==="checked"||t.list==="unchecked"?this.quill.format("list",!1,B.sources.USER):this.quill.format("list","unchecked",B.sources.USER):this.quill.format("list",n,B.sources.USER)}}};const eb='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="13" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="9" y1="4" y2="4"/></svg>',tb='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="14" x2="4" y1="14" y2="14"/><line class="ql-stroke" x1="12" x2="6" y1="4" y2="4"/></svg>',rb='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="5" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="9" y1="4" y2="4"/></svg>',nb='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="3" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="3" y1="4" y2="4"/></svg>',sb='<svg viewbox="0 0 18 18"><g class="ql-fill ql-color-label"><polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"/><rect height="1" width="1" x="4" y="4"/><polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"/><rect height="1" width="1" x="2" y="6"/><rect height="1" width="1" x="3" y="5"/><rect height="1" width="1" x="4" y="7"/><polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"/><rect height="1" width="1" x="2" y="12"/><rect height="1" width="1" x="2" y="9"/><rect height="1" width="1" x="2" y="15"/><polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"/><rect height="1" width="1" x="3" y="8"/><path d="M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z"/><path d="M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z"/><path d="M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z"/><rect height="1" width="1" x="12" y="2"/><rect height="1" width="1" x="11" y="3"/><path d="M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z"/><rect height="1" width="1" x="2" y="3"/><rect height="1" width="1" x="6" y="2"/><rect height="1" width="1" x="3" y="2"/><rect height="1" width="1" x="5" y="3"/><rect height="1" width="1" x="9" y="2"/><rect height="1" width="1" x="15" y="14"/><polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"/><rect height="1" width="1" x="13" y="7"/><rect height="1" width="1" x="15" y="5"/><rect height="1" width="1" x="14" y="6"/><rect height="1" width="1" x="15" y="8"/><rect height="1" width="1" x="14" y="9"/><path d="M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z"/><rect height="1" width="1" x="14" y="3"/><polygon points="12 6.868 12 6 11.62 6 12 6.868"/><rect height="1" width="1" x="15" y="2"/><rect height="1" width="1" x="12" y="5"/><rect height="1" width="1" x="13" y="4"/><polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"/><rect height="1" width="1" x="9" y="14"/><rect height="1" width="1" x="8" y="15"/><path d="M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z"/><rect height="1" width="1" x="5" y="15"/><path d="M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z"/><rect height="1" width="1" x="11" y="15"/><path d="M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z"/><rect height="1" width="1" x="14" y="15"/><rect height="1" width="1" x="15" y="11"/></g><polyline class="ql-stroke" points="5.5 13 9 5 12.5 13"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="11" y2="11"/></svg>',ib='<svg viewbox="0 0 18 18"><rect class="ql-fill ql-stroke" height="3" width="3" x="4" y="5"/><rect class="ql-fill ql-stroke" height="3" width="3" x="11" y="5"/><path class="ql-even ql-fill ql-stroke" d="M7,8c0,4.031-3,5-3,5"/><path class="ql-even ql-fill ql-stroke" d="M14,8c0,4.031-3,5-3,5"/></svg>',ob='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z"/><path class="ql-stroke" d="M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z"/></svg>',ab='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="5" x2="13" y1="3" y2="3"/><line class="ql-stroke" x1="6" x2="9.35" y1="12" y2="3"/><line class="ql-stroke" x1="11" x2="15" y1="11" y2="15"/><line class="ql-stroke" x1="15" x2="11" y1="11" y2="15"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="7" x="2" y="14"/></svg>',Pu='<svg viewbox="0 0 18 18"><polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"/><polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"/><line class="ql-stroke" x1="10" x2="8" y1="5" y2="13"/></svg>',lb='<svg viewbox="0 0 18 18"><line class="ql-color-label ql-stroke ql-transparent" x1="3" x2="15" y1="15" y2="15"/><polyline class="ql-stroke" points="5.5 11 9 3 12.5 11"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="9" y2="9"/></svg>',ub='<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"/><line class="ql-stroke ql-fill" x1="15" x2="11" y1="4" y2="4"/><path class="ql-fill" d="M11,3a3,3,0,0,0,0,6h1V3H11Z"/><rect class="ql-fill" height="11" width="1" x="11" y="4"/><rect class="ql-fill" height="11" width="1" x="13" y="4"/></svg>',cb='<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"/><line class="ql-stroke ql-fill" x1="9" x2="5" y1="4" y2="4"/><path class="ql-fill" d="M5,3A3,3,0,0,0,5,9H6V3H5Z"/><rect class="ql-fill" height="11" width="1" x="5" y="4"/><rect class="ql-fill" height="11" width="1" x="7" y="4"/></svg>',hb='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z"/><rect class="ql-fill" height="1.6" rx="0.8" ry="0.8" width="5" x="5.15" y="6.2"/><path class="ql-fill" d="M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z"/></svg>',db='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z"/></svg>',fb='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',pb='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.65186,12.30664a2.6742,2.6742,0,0,1-2.915,2.68457,3.96592,3.96592,0,0,1-2.25537-.6709.56007.56007,0,0,1-.13232-.83594L11.64648,13c.209-.34082.48389-.36328.82471-.1543a2.32654,2.32654,0,0,0,1.12256.33008c.71484,0,1.12207-.35156,1.12207-.78125,0-.61523-.61621-.86816-1.46338-.86816H13.2085a.65159.65159,0,0,1-.68213-.41895l-.05518-.10937a.67114.67114,0,0,1,.14307-.78125l.71533-.86914a8.55289,8.55289,0,0,1,.68213-.7373V8.58887a3.93913,3.93913,0,0,1-.748.05469H11.9873a.54085.54085,0,0,1-.605-.60547V7.59863a.54085.54085,0,0,1,.605-.60547h3.75146a.53773.53773,0,0,1,.60547.59375v.17676a1.03723,1.03723,0,0,1-.27539.748L14.74854,10.0293A2.31132,2.31132,0,0,1,16.65186,12.30664ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',gb='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm7.05371,7.96582v.38477c0,.39648-.165.60547-.46191.60547h-.47314v1.29785a.54085.54085,0,0,1-.605.60547h-.69336a.54085.54085,0,0,1-.605-.60547V12.95605H11.333a.5412.5412,0,0,1-.60547-.60547v-.15332a1.199,1.199,0,0,1,.22021-.748l2.56348-4.05957a.7819.7819,0,0,1,.72607-.39648h1.27637a.54085.54085,0,0,1,.605.60547v3.7627h.33008A.54055.54055,0,0,1,17.05371,11.96582ZM14.28125,8.7207h-.022a4.18969,4.18969,0,0,1-.38525.81348l-1.188,1.80469v.02246h1.5293V9.60059A7.04058,7.04058,0,0,1,14.28125,8.7207Z"/></svg>',mb='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.74023,12.18555a2.75131,2.75131,0,0,1-2.91553,2.80566,3.908,3.908,0,0,1-2.25537-.68164.54809.54809,0,0,1-.13184-.8252L11.73438,13c.209-.34082.48389-.36328.8252-.1543a2.23757,2.23757,0,0,0,1.1001.33008,1.01827,1.01827,0,0,0,1.1001-.96777c0-.61621-.53906-.97949-1.25439-.97949a2.15554,2.15554,0,0,0-.64893.09961,1.15209,1.15209,0,0,1-.814.01074l-.12109-.04395a.64116.64116,0,0,1-.45117-.71484l.231-3.00391a.56666.56666,0,0,1,.62744-.583H15.541a.54085.54085,0,0,1,.605.60547v.43945a.54085.54085,0,0,1-.605.60547H13.41748l-.04395.72559a1.29306,1.29306,0,0,1-.04395.30859h.022a2.39776,2.39776,0,0,1,.57227-.07715A2.53266,2.53266,0,0,1,16.74023,12.18555ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',vb='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M14.51758,9.64453a1.85627,1.85627,0,0,0-1.24316.38477H13.252a1.73532,1.73532,0,0,1,1.72754-1.4082,2.66491,2.66491,0,0,1,.5498.06641c.35254.05469.57227.01074.70508-.40723l.16406-.5166a.53393.53393,0,0,0-.373-.75977,4.83723,4.83723,0,0,0-1.17773-.14258c-2.43164,0-3.7627,2.17773-3.7627,4.43359,0,2.47559,1.60645,3.69629,3.19043,3.69629A2.70585,2.70585,0,0,0,16.96,12.19727,2.43861,2.43861,0,0,0,14.51758,9.64453Zm-.23047,3.58691c-.67187,0-1.22168-.81445-1.22168-1.45215,0-.47363.30762-.583.72559-.583.96875,0,1.27734.59375,1.27734,1.12207A.82182.82182,0,0,1,14.28711,13.23145ZM10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Z"/></svg>',yb='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="13" y1="4" y2="4"/><line class="ql-stroke" x1="5" x2="11" y1="14" y2="14"/><line class="ql-stroke" x1="8" x2="10" y1="14" y2="4"/></svg>',bb='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="10" width="12" x="3" y="4"/><circle class="ql-fill" cx="6" cy="7" r="1"/><polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"/></svg>',Eb='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"/></svg>',wb='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="5 7 5 11 3 9 5 7"/></svg>',xb='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="11" y1="7" y2="11"/><path class="ql-even ql-stroke" d="M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z"/><path class="ql-even ql-stroke" d="M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z"/></svg>',Sb='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="6" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="6" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="6" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="3" y1="4" y2="4"/><line class="ql-stroke" x1="3" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="3" y1="14" y2="14"/></svg>',_b='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="9" x2="15" y1="4" y2="4"/><polyline class="ql-stroke" points="3 4 4 5 6 3"/><line class="ql-stroke" x1="9" x2="15" y1="14" y2="14"/><polyline class="ql-stroke" points="3 14 4 15 6 13"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="3 9 4 10 6 8"/></svg>',Ab='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="7" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="7" x2="15" y1="14" y2="14"/><line class="ql-stroke ql-thin" x1="2.5" x2="4.5" y1="5.5" y2="5.5"/><path class="ql-fill" d="M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z"/><path class="ql-stroke ql-thin" d="M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156"/><path class="ql-stroke ql-thin" d="M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109"/></svg>',Cb='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z"/><path class="ql-fill" d="M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z"/></svg>',Tb='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z"/><path class="ql-fill" d="M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z"/></svg>',kb='<svg viewbox="0 0 18 18"><line class="ql-stroke ql-thin" x1="15.5" x2="2.5" y1="8.5" y2="9.5"/><path class="ql-fill" d="M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z"/><path class="ql-fill" d="M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z"/></svg>',Nb='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="2" width="3" x="5" y="5"/><rect class="ql-fill" height="2" width="4" x="9" y="5"/><g class="ql-fill ql-transparent"><rect height="2" width="3" x="5" y="8"/><rect height="2" width="4" x="9" y="8"/><rect height="2" width="3" x="5" y="11"/><rect height="2" width="4" x="9" y="11"/></g></svg>',Ib='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="12" x="3" y="15"/></svg>',Rb='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="12" width="1" x="5" y="3"/><rect class="ql-fill" height="12" width="1" x="12" y="3"/><rect class="ql-fill" height="2" width="8" x="5" y="8"/><rect class="ql-fill" height="1" width="3" x="3" y="5"/><rect class="ql-fill" height="1" width="3" x="3" y="7"/><rect class="ql-fill" height="1" width="3" x="3" y="10"/><rect class="ql-fill" height="1" width="3" x="3" y="12"/><rect class="ql-fill" height="1" width="3" x="12" y="5"/><rect class="ql-fill" height="1" width="3" x="12" y="7"/><rect class="ql-fill" height="1" width="3" x="12" y="10"/><rect class="ql-fill" height="1" width="3" x="12" y="12"/></svg>',Qn={align:{"":eb,center:tb,right:rb,justify:nb},background:sb,blockquote:ib,bold:ob,clean:ab,code:Pu,"code-block":Pu,color:lb,direction:{"":ub,rtl:cb},formula:hb,header:{1:db,2:fb,3:pb,4:gb,5:mb,6:vb},italic:yb,image:bb,indent:{"+1":Eb,"-1":wb},link:xb,list:{bullet:Sb,check:_b,ordered:Ab},script:{sub:Cb,super:Tb},strike:kb,table:Nb,underline:Ib,video:Rb},Ob='<svg viewbox="0 0 18 18"><polygon class="ql-stroke" points="7 11 9 13 11 11 7 11"/><polygon class="ql-stroke" points="7 7 9 5 11 7 7 7"/></svg>';let Bu=0;function qu(n,e){n.setAttribute(e,`${n.getAttribute(e)!=="true"}`)}class xi{constructor(e){this.select=e,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",()=>{this.togglePicker()}),this.label.addEventListener("keydown",t=>{switch(t.key){case"Enter":this.togglePicker();break;case"Escape":this.escape(),t.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}togglePicker(){this.container.classList.toggle("ql-expanded"),qu(this.label,"aria-expanded"),qu(this.options,"aria-hidden")}buildItem(e){const t=document.createElement("span");t.tabIndex="0",t.setAttribute("role","button"),t.classList.add("ql-picker-item");const r=e.getAttribute("value");return r&&t.setAttribute("data-value",r),e.textContent&&t.setAttribute("data-label",e.textContent),t.addEventListener("click",()=>{this.selectItem(t,!0)}),t.addEventListener("keydown",s=>{switch(s.key){case"Enter":this.selectItem(t,!0),s.preventDefault();break;case"Escape":this.escape(),s.preventDefault();break}}),t}buildLabel(){const e=document.createElement("span");return e.classList.add("ql-picker-label"),e.innerHTML=Ob,e.tabIndex="0",e.setAttribute("role","button"),e.setAttribute("aria-expanded","false"),this.container.appendChild(e),e}buildOptions(){const e=document.createElement("span");e.classList.add("ql-picker-options"),e.setAttribute("aria-hidden","true"),e.tabIndex="-1",e.id=`ql-picker-options-${Bu}`,Bu+=1,this.label.setAttribute("aria-controls",e.id),this.options=e,Array.from(this.select.options).forEach(t=>{const r=this.buildItem(t);e.appendChild(r),t.selected===!0&&this.selectItem(r)}),this.container.appendChild(e)}buildPicker(){Array.from(this.select.attributes).forEach(e=>{this.container.setAttribute(e.name,e.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}escape(){this.close(),setTimeout(()=>this.label.focus(),1)}close(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}selectItem(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const r=this.container.querySelector(".ql-selected");e!==r&&(r!=null&&r.classList.remove("ql-selected"),e!=null&&(e.classList.add("ql-selected"),this.select.selectedIndex=Array.from(e.parentNode.children).indexOf(e),e.hasAttribute("data-value")?this.label.setAttribute("data-value",e.getAttribute("data-value")):this.label.removeAttribute("data-value"),e.hasAttribute("data-label")?this.label.setAttribute("data-label",e.getAttribute("data-label")):this.label.removeAttribute("data-label"),t&&(this.select.dispatchEvent(new Event("change")),this.close())))}update(){let e;if(this.select.selectedIndex>-1){const r=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];e=this.select.options[this.select.selectedIndex],this.selectItem(r)}else this.selectItem(null);const t=e!=null&&e!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",t)}}class Wh extends xi{constructor(e,t){super(e),this.label.innerHTML=t,this.container.classList.add("ql-color-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).slice(0,7).forEach(r=>{r.classList.add("ql-primary")})}buildItem(e){const t=super.buildItem(e);return t.style.backgroundColor=e.getAttribute("value")||"",t}selectItem(e,t){super.selectItem(e,t);const r=this.label.querySelector(".ql-color-label"),s=e&&e.getAttribute("data-value")||"";r&&(r.tagName==="line"?r.style.stroke=s:r.style.fill=s)}}class Yh extends xi{constructor(e,t){super(e),this.container.classList.add("ql-icon-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).forEach(r=>{r.innerHTML=t[r.getAttribute("data-value")||""]}),this.defaultItem=this.container.querySelector(".ql-selected"),this.selectItem(this.defaultItem)}selectItem(e,t){super.selectItem(e,t);const r=e||this.defaultItem;if(r!=null){if(this.label.innerHTML===r.innerHTML)return;this.label.innerHTML=r.innerHTML}}}const Lb=n=>{const{overflowY:e}=getComputedStyle(n,null);return e!=="visible"&&e!=="clip"};class Zh{constructor(e,t){this.quill=e,this.boundsContainer=t||document.body,this.root=e.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,Lb(this.quill.root)&&this.quill.root.addEventListener("scroll",()=>{this.root.style.marginTop=`${-1*this.quill.root.scrollTop}px`}),this.hide()}hide(){this.root.classList.add("ql-hidden")}position(e){const t=e.left+e.width/2-this.root.offsetWidth/2,r=e.bottom+this.quill.root.scrollTop;this.root.style.left=`${t}px`,this.root.style.top=`${r}px`,this.root.classList.remove("ql-flip");const s=this.boundsContainer.getBoundingClientRect(),i=this.root.getBoundingClientRect();let o=0;if(i.right>s.right&&(o=s.right-i.right,this.root.style.left=`${t+o}px`),i.left<s.left&&(o=s.left-i.left,this.root.style.left=`${t+o}px`),i.bottom>s.bottom){const a=i.bottom-i.top,u=e.bottom-e.top+a;this.root.style.top=`${r-u}px`,this.root.classList.add("ql-flip")}return o}show(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}const Mb=[!1,"center","right","justify"],Db=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],Pb=[!1,"serif","monospace"],Bb=["1","2","3",!1],qb=["small",!1,"large","huge"];class is extends hn{constructor(e,t){super(e,t);const r=s=>{if(!document.body.contains(e.root)){document.body.removeEventListener("click",r);return}this.tooltip!=null&&!this.tooltip.root.contains(s.target)&&document.activeElement!==this.tooltip.textbox&&!this.quill.hasFocus()&&this.tooltip.hide(),this.pickers!=null&&this.pickers.forEach(i=>{i.container.contains(s.target)||i.close()})};e.emitter.listenDOM("click",document.body,r)}addModule(e){const t=super.addModule(e);return e==="toolbar"&&this.extendToolbar(t),t}buildButtons(e,t){Array.from(e).forEach(r=>{(r.getAttribute("class")||"").split(/\s+/).forEach(i=>{if(i.startsWith("ql-")&&(i=i.slice(3),t[i]!=null))if(i==="direction")r.innerHTML=t[i][""]+t[i].rtl;else if(typeof t[i]=="string")r.innerHTML=t[i];else{const o=r.value||"";o!=null&&t[i][o]&&(r.innerHTML=t[i][o])}})})}buildPickers(e,t){this.pickers=Array.from(e).map(s=>{if(s.classList.contains("ql-align")&&(s.querySelector("option")==null&&Ln(s,Mb),typeof t.align=="object"))return new Yh(s,t.align);if(s.classList.contains("ql-background")||s.classList.contains("ql-color")){const i=s.classList.contains("ql-background")?"background":"color";return s.querySelector("option")==null&&Ln(s,Db,i==="background"?"#ffffff":"#000000"),new Wh(s,t[i])}return s.querySelector("option")==null&&(s.classList.contains("ql-font")?Ln(s,Pb):s.classList.contains("ql-header")?Ln(s,Bb):s.classList.contains("ql-size")&&Ln(s,qb)),new xi(s)});const r=()=>{this.pickers.forEach(s=>{s.update()})};this.quill.on(ee.events.EDITOR_CHANGE,r)}}is.DEFAULTS=er({},hn.DEFAULTS,{modules:{toolbar:{handlers:{formula(){this.quill.theme.tooltip.edit("formula")},image(){let n=this.container.querySelector("input.ql-image[type=file]");n==null&&(n=document.createElement("input"),n.setAttribute("type","file"),n.setAttribute("accept",this.quill.uploader.options.mimetypes.join(", ")),n.classList.add("ql-image"),n.addEventListener("change",()=>{const e=this.quill.getSelection(!0);this.quill.uploader.upload(e,n.files),n.value=""}),this.container.appendChild(n)),n.click()},video(){this.quill.theme.tooltip.edit("video")}}}}});class Xh extends Zh{constructor(e,t){super(e,t),this.textbox=this.root.querySelector('input[type="text"]'),this.listen()}listen(){this.textbox.addEventListener("keydown",e=>{e.key==="Enter"?(this.save(),e.preventDefault()):e.key==="Escape"&&(this.cancel(),e.preventDefault())})}cancel(){this.hide(),this.restoreFocus()}edit(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),this.textbox==null)return;t!=null?this.textbox.value=t:e!==this.root.getAttribute("data-mode")&&(this.textbox.value="");const r=this.quill.getBounds(this.quill.selection.savedRange);r!=null&&this.position(r),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute(`data-${e}`)||""),this.root.setAttribute("data-mode",e)}restoreFocus(){this.quill.focus({preventScroll:!0})}save(){let{value:e}=this.textbox;switch(this.root.getAttribute("data-mode")){case"link":{const{scrollTop:t}=this.quill.root;this.linkRange?(this.quill.formatText(this.linkRange,"link",e,ee.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",e,ee.sources.USER)),this.quill.root.scrollTop=t;break}case"video":e=Fb(e);case"formula":{if(!e)break;const t=this.quill.getSelection(!0);if(t!=null){const r=t.index+t.length;this.quill.insertEmbed(r,this.root.getAttribute("data-mode"),e,ee.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(r+1," ",ee.sources.USER),this.quill.setSelection(r+2,ee.sources.USER)}break}}this.textbox.value="",this.hide()}}function Fb(n){let e=n.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||n.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return e?`${e[1]||"https"}://www.youtube.com/embed/${e[2]}?showinfo=0`:(e=n.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?`${e[1]||"https"}://player.vimeo.com/video/${e[2]}/`:n}function Ln(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;e.forEach(r=>{const s=document.createElement("option");r===t?s.setAttribute("selected","selected"):s.setAttribute("value",String(r)),n.appendChild(s)})}const jb=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]];class Qh extends Xh{constructor(e,t){super(e,t),this.quill.on(ee.events.EDITOR_CHANGE,(r,s,i,o)=>{if(r===ee.events.SELECTION_CHANGE)if(s!=null&&s.length>0&&o===ee.sources.USER){this.show(),this.root.style.left="0px",this.root.style.width="",this.root.style.width=`${this.root.offsetWidth}px`;const a=this.quill.getLines(s.index,s.length);if(a.length===1){const u=this.quill.getBounds(s);u!=null&&this.position(u)}else{const u=a[a.length-1],c=this.quill.getIndex(u),h=Math.min(u.length()-1,s.index+s.length-c),g=this.quill.getBounds(new _r(c,h));g!=null&&this.position(g)}}else document.activeElement!==this.textbox&&this.quill.hasFocus()&&this.hide()})}listen(){super.listen(),this.root.querySelector(".ql-close").addEventListener("click",()=>{this.root.classList.remove("ql-editing")}),this.quill.on(ee.events.SCROLL_OPTIMIZE,()=>{setTimeout(()=>{if(this.root.classList.contains("ql-hidden"))return;const e=this.quill.getSelection();if(e!=null){const t=this.quill.getBounds(e);t!=null&&this.position(t)}},1)})}cancel(){this.show()}position(e){const t=super.position(e),r=this.root.querySelector(".ql-tooltip-arrow");return r.style.marginLeft="",t!==0&&(r.style.marginLeft=`${-1*t-r.offsetWidth/2}px`),t}}J(Qh,"TEMPLATE",['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""));class Jh extends is{constructor(e,t){t.modules.toolbar!=null&&t.modules.toolbar.container==null&&(t.modules.toolbar.container=jb),super(e,t),this.quill.container.classList.add("ql-bubble")}extendToolbar(e){this.tooltip=new Qh(this.quill,this.options.bounds),e.container!=null&&(this.tooltip.root.appendChild(e.container),this.buildButtons(e.container.querySelectorAll("button"),Qn),this.buildPickers(e.container.querySelectorAll("select"),Qn))}}Jh.DEFAULTS=er({},is.DEFAULTS,{modules:{toolbar:{handlers:{link(n){n?this.quill.theme.tooltip.edit():this.quill.format("link",!1,B.sources.USER)}}}}});const $b=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]];class ed extends Xh{constructor(){super(...arguments);J(this,"preview",this.root.querySelector("a.ql-preview"))}listen(){super.listen(),this.root.querySelector("a.ql-action").addEventListener("click",t=>{this.root.classList.contains("ql-editing")?this.save():this.edit("link",this.preview.textContent),t.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",t=>{if(this.linkRange!=null){const r=this.linkRange;this.restoreFocus(),this.quill.formatText(r,"link",!1,ee.sources.USER),delete this.linkRange}t.preventDefault(),this.hide()}),this.quill.on(ee.events.SELECTION_CHANGE,(t,r,s)=>{if(t!=null){if(t.length===0&&s===ee.sources.USER){const[i,o]=this.quill.scroll.descendant(Xt,t.index);if(i!=null){this.linkRange=new _r(t.index-o,i.length());const a=Xt.formats(i.domNode);this.preview.textContent=a,this.preview.setAttribute("href",a),this.show();const u=this.quill.getBounds(this.linkRange);u!=null&&this.position(u);return}}else delete this.linkRange;this.hide()}})}show(){super.show(),this.root.removeAttribute("data-mode")}}J(ed,"TEMPLATE",['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""));class td extends is{constructor(e,t){t.modules.toolbar!=null&&t.modules.toolbar.container==null&&(t.modules.toolbar.container=$b),super(e,t),this.quill.container.classList.add("ql-snow")}extendToolbar(e){e.container!=null&&(e.container.classList.add("ql-snow"),this.buildButtons(e.container.querySelectorAll("button"),Qn),this.buildPickers(e.container.querySelectorAll("select"),Qn),this.tooltip=new ed(this.quill,this.options.bounds),e.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"k",shortKey:!0},(t,r)=>{e.handlers.link.call(e,!r.format.link)}))}}td.DEFAULTS=er({},is.DEFAULTS,{modules:{toolbar:{handlers:{link(n){if(n){const e=this.quill.getSelection();if(e==null||e.length===0)return;let t=this.quill.getText(e);/^\S+@\S+\.\S+$/.test(t)&&t.indexOf("mailto:")!==0&&(t=`mailto:${t}`);const{tooltip:r}=this.quill.theme;r.edit("link",t)}else this.quill.format("link",!1,B.sources.USER)}}}}});B.register({"attributors/attribute/direction":Mh,"attributors/class/align":Rh,"attributors/class/background":iy,"attributors/class/color":sy,"attributors/class/direction":Dh,"attributors/class/font":qh,"attributors/class/size":jh,"attributors/style/align":Oh,"attributors/style/background":el,"attributors/style/color":Ja,"attributors/style/direction":Ph,"attributors/style/font":Fh,"attributors/style/size":$h},!0);B.register({"formats/align":Rh,"formats/direction":Dh,"formats/indent":Yy,"formats/background":el,"formats/color":Ja,"formats/font":qh,"formats/size":jh,"formats/blockquote":ba,"formats/code-block":je,"formats/header":Ea,"formats/list":ss,"formats/bold":Xn,"formats/code":tl,"formats/italic":wa,"formats/link":Xt,"formats/script":xa,"formats/strike":Sa,"formats/underline":_a,"formats/formula":Hs,"formats/image":Aa,"formats/video":zs,"modules/syntax":Kh,"modules/table":Xy,"modules/toolbar":ol,"themes/bubble":Jh,"themes/snow":td,"ui/icons":Qn,"ui/picker":xi,"ui/icon-picker":Yh,"ui/color-picker":Wh,"ui/tooltip":Zh},!0);class Si extends C.default.Component{constructor(e){super(e),this.editingAreaRef=Ke.createRef(),this.containerRef=Ke.createRef(),this.dirtyProps=["modules","formats","bounds","theme","children"],this.cleanProps=["id","className","style","placeholder","tabIndex","onChange","onChangeSelection","onFocus","onBlur","onKeyPress","onKeyDown","onKeyUp"],this.state={generation:0},this.selection=null,this.onEditorChange=(r,s,i,o)=>{var a,u;r==="text-change"?(a=this.onEditorChangeText)==null||a.call(this,this.editor.getSemanticHTML(),s,o,this.unprivilegedEditor):r==="selection-change"&&((u=this.onEditorChangeSelection)==null||u.call(this,s,o,this.unprivilegedEditor))};const t=this.isControlled()?e.value:e.defaultValue;this.value=t??""}validateProps(e){if(C.default.Children.count(e.children)>1)throw new Error("The Quill editing area can only be composed of a single React element.");if(C.default.Children.count(e.children)){const t=C.default.Children.only(e.children);if((t==null?void 0:t.type)==="textarea")throw new Error("Quill does not support editing on a <textarea>. Use a <div> instead.")}if(this.lastDeltaChangeSet&&e.value===this.lastDeltaChangeSet)throw new Error("You are passing the `delta` object from the `onChange` event back as `value`. You most probably want `editor.getContents()` instead. See: https://github.com/zenoamaro/react-quill#using-deltas")}shouldComponentUpdate(e,t){if(this.validateProps(e),!this.editor||this.state.generation!==t.generation)return!0;if("value"in e){const r=this.getEditorContents(),s=e.value??"";this.isEqualValue(s,r)||this.setEditorContents(this.editor,s)}return e.readOnly!==this.props.readOnly&&this.setEditorReadOnly(this.editor,e.readOnly),[...this.cleanProps,...this.dirtyProps].some(r=>!Wt(e[r],this.props[r]))}shouldComponentRegenerate(e){return this.dirtyProps.some(t=>!Wt(e[t],this.props[t]))}componentDidMount(){this.instantiateEditor(),this.setEditorContents(this.editor,this.getEditorContents())}componentWillUnmount(){this.destroyEditor()}componentDidUpdate(e,t){if(this.editor&&this.shouldComponentRegenerate(e)){const r=this.editor.getContents(),s=this.editor.getSelection();this.regenerationSnapshot={delta:r,selection:s},this.setState({generation:this.state.generation+1}),this.destroyEditor()}if(this.editor&&e.placeholder!==this.props.placeholder&&(this.editor.root.dataset.placeholder=this.props.placeholder||""),this.state.generation!==t.generation){const{delta:r,selection:s}=this.regenerationSnapshot;delete this.regenerationSnapshot,this.instantiateEditor();const i=this.editor;i.setContents(r),Fu(()=>this.setEditorSelection(i,s))}}instantiateEditor(){this.editor?this.hookEditor(this.editor):this.editor=this.createEditor(this.getEditingArea(),this.getEditorConfig())}destroyEditor(){var r,s;if(!this.editor)return;this.unhookEditor(this.editor);const e=(r=this.props.modules)==null?void 0:r.toolbar;if(!(typeof e=="object"&&e&&"container"in e&&typeof e.container=="string"||typeof e=="string")){const i=(s=this.containerRef.current)==null?void 0:s.querySelector(".ql-toolbar");i&&i.remove()}delete this.editor}isControlled(){return"value"in this.props}getEditorConfig(){return{bounds:this.props.bounds,formats:this.props.formats,modules:this.props.modules,placeholder:this.props.placeholder,readOnly:this.props.readOnly,tabIndex:this.props.tabIndex,theme:this.props.theme}}getEditor(){if(!this.editor)throw new Error("Accessing non-instantiated editor");return this.editor}createEditor(e,t){const r=new B(e,t);return t.tabIndex!=null&&this.setEditorTabIndex(r,t.tabIndex),this.hookEditor(r),r}hookEditor(e){this.unprivilegedEditor=this.makeUnprivilegedEditor(e),e.on("editor-change",this.onEditorChange)}unhookEditor(e){e.off("editor-change",this.onEditorChange)}getEditorContents(){return this.value}getEditorSelection(){return this.selection}isDelta(e){return e&&e.ops}isEqualValue(e,t){return this.isDelta(e)&&this.isDelta(t)?Wt(e.ops,t.ops):Wt(e,t)}setEditorContents(e,t){this.value=t;const r=this.getEditorSelection();typeof t=="string"?e.setContents(e.clipboard.convert({html:t})):e.setContents(t),Fu(()=>this.setEditorSelection(e,r))}setEditorSelection(e,t){if(this.selection=t,t){const r=e.getLength();t.index=Math.max(0,Math.min(t.index,r-1)),t.length=Math.max(0,Math.min(t.length,r-1-t.index)),e.setSelection(t)}}setEditorTabIndex(e,t){var r;(r=e==null?void 0:e.scroll)!=null&&r.domNode&&(e.scroll.domNode.tabIndex=t)}setEditorReadOnly(e,t){t?e.disable():e.enable()}makeUnprivilegedEditor(e){const t=e;return{getHTML:()=>t.root.innerHTML,getSemanticHTML:t.getSemanticHTML.bind(t),getLength:t.getLength.bind(t),getText:t.getText.bind(t),getContents:t.getContents.bind(t),getSelection:t.getSelection.bind(t),getBounds:t.getBounds.bind(t)}}getEditingArea(){const e=this.editingAreaRef.current;if(!e)throw new Error("Cannot find element for editing area");if(e.nodeType===3)throw new Error("Editing area cannot be a text node");return e}renderEditingArea(){const{children:e,preserveWhitespace:t}=this.props,{generation:r}=this.state,s={key:r,ref:this.editingAreaRef};return C.default.Children.count(e)?C.default.cloneElement(C.default.Children.only(e),s):t?C.default.createElement("pre",{...s}):C.default.createElement("div",{...s})}render(){return C.default.createElement("div",{ref:this.containerRef,id:this.props.id,style:this.props.style,key:this.state.generation,className:`quill ${this.props.className??""}`,onKeyPress:this.props.onKeyPress,onKeyDown:this.props.onKeyDown,onKeyUp:this.props.onKeyUp},this.renderEditingArea())}onEditorChangeText(e,t,r,s){var o,a;if(!this.editor)return;const i=this.isDelta(this.value)?s.getContents():s.getSemanticHTML();i!==this.getEditorContents()&&(this.lastDeltaChangeSet=t,this.value=i,(a=(o=this.props).onChange)==null||a.call(o,e,t,r,s))}onEditorChangeSelection(e,t,r){var a,u,c,h,g,d;if(!this.editor)return;const s=this.getEditorSelection(),i=!s&&e,o=s&&!e;Wt(e,s)||(this.selection=e,(u=(a=this.props).onChangeSelection)==null||u.call(a,e,t,r),i?(h=(c=this.props).onFocus)==null||h.call(c,e,t,r):o&&((d=(g=this.props).onBlur)==null||d.call(g,s,t,r)))}focus(){this.editor&&this.editor.focus()}blur(){this.editor&&(this.selection=null,this.editor.blur())}}Si.displayName="React Quill";Si.Quill=B;Si.defaultProps={theme:"snow",modules:{},readOnly:!1};function Fu(n){Promise.resolve().then(n)}const Vb=La.cva("w-full rounded-lg border border-border-alpha-strong dark:bg-transparent file:border-0 placeholder:text-secondary placeholder:text-body-sm-regular focus-within:outline-none focus-within:ring-2 focus-within:ring-offset-bg focus-within:ring-offset-2 focus-within:ring-ring disabled:cursor-not-allowed disabled:opacity-50",{variants:{variant:{default:"focus-within:ring-item-primary",failure:"focus-within:ring-item-destructive bg-item-destructive-focus placeholder:text-item-destructive border-item-destructive text-destructive",success:"focus-within:ring-success bg-success/20 placeholder:text-success/80 border-success text-success"}},defaultVariants:{variant:"default"}}),Ub=$a.div`
154
- .quill {
155
- .ql {
156
- &-toolbar {
157
- border: none;
158
- }
159
-
160
- &-editor,
161
- &-container {
162
- min-height: 120px;
163
- border: none;
164
- }
165
- }
166
- `;function rd({containerProps:n,className:e,variant:t,...r}){return O.jsx(Ub,{...n,className:Ce.cn(Vb({variant:t}),"block h-auto p-0",e),children:O.jsx(Si,{theme:"snow",...r})})}rd.displayName="HtmlEditor";const _i=La.cva(Ce.cn("h-10 w-full rounded-lg px-2.5 py-2 flex border border-border-alpha-strong","placeholder:text-secondary placeholder:text-body-sm-regular disabled:cursor-not-allowed disabled:opacity-50","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-bg focus-visible:ring-offset-2 focus-visible:ring-ring "),{variants:{variant:{default:"focus-visible:ring-item-primary",failure:"focus-visible:ring-item-destructive placeholder:!text-item-destructive border-item-destructive text-destructive!"}},defaultVariants:{variant:"default"}}),nd=C.forwardRef(({className:n,type:e,variant:t,...r},s)=>{const[i,o]=Ke.useState(!1),[a,u]=Ke.useState(!1);return Ke.useEffect(()=>{o(e==="password")},[e]),O.jsxs("div",{className:"relative",children:[O.jsx("input",{type:a?"text":e,className:Ce.cn(_i({variant:t}),n,i&&"pr-10"),ref:s,...r}),i&&O.jsx(Mf.Button,{type:"button",size:"icon",variant:"tertiary",className:"absolute top-1 right-1 size-8 cursor-pointer rounded-md p-2 !ring-0 !ring-offset-0",onClick:()=>{u(!a)},children:a?O.jsx(Ys.Xt,{}):O.jsx(Ys.qt,{})})]})});nd.displayName="Input";function tr(n){return typeof n=="string"||n instanceof String}function ju(n){var e;return typeof n=="object"&&n!=null&&(n==null||(e=n.constructor)==null?void 0:e.name)==="Object"}function sd(n,e){return Array.isArray(e)?sd(n,(t,r)=>e.includes(r)):Object.entries(n).reduce((t,r)=>{let[s,i]=r;return e(i,s)&&(t[s]=i),t},{})}const ae={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function Hb(n){switch(n){case ae.LEFT:return ae.FORCE_LEFT;case ae.RIGHT:return ae.FORCE_RIGHT;default:return n}}function jo(n){return n.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function ni(n,e){if(e===n)return!0;const t=Array.isArray(e),r=Array.isArray(n);let s;if(t&&r){if(e.length!=n.length)return!1;for(s=0;s<e.length;s++)if(!ni(e[s],n[s]))return!1;return!0}if(t!=r)return!1;if(e&&n&&typeof e=="object"&&typeof n=="object"){const i=e instanceof Date,o=n instanceof Date;if(i&&o)return e.getTime()==n.getTime();if(i!=o)return!1;const a=e instanceof RegExp,u=n instanceof RegExp;if(a&&u)return e.toString()==n.toString();if(a!=u)return!1;const c=Object.keys(e);for(s=0;s<c.length;s++)if(!Object.prototype.hasOwnProperty.call(n,c[s]))return!1;for(s=0;s<c.length;s++)if(!ni(n[c[s]],e[c[s]]))return!1;return!0}else if(e&&n&&typeof e=="function"&&typeof n=="function")return e.toString()===n.toString();return!1}class zb{constructor(e){for(Object.assign(this,e);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start;if(this.insertedCount)for(;this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end);)this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end?++this.oldSelection.end:++this.cursorPos}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?ae.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?ae.RIGHT:ae.LEFT}}function he(n,e){return new he.InputMask(n,e)}function id(n){if(n==null)throw new Error("mask property should be defined");return n instanceof RegExp?he.MaskedRegExp:tr(n)?he.MaskedPattern:n===Date?he.MaskedDate:n===Number?he.MaskedNumber:Array.isArray(n)||n===Array?he.MaskedDynamic:he.Masked&&n.prototype instanceof he.Masked?n:he.Masked&&n instanceof he.Masked?n.constructor:n instanceof Function?he.MaskedFunction:(console.warn("Mask not found for mask",n),he.Masked)}function Jn(n){if(!n)throw new Error("Options in not defined");if(he.Masked){if(n.prototype instanceof he.Masked)return{mask:n};const{mask:e=void 0,...t}=n instanceof he.Masked?{mask:n}:ju(n)&&n.mask instanceof he.Masked?n:{};if(e){const r=e.mask;return{...sd(e,(s,i)=>!i.startsWith("_")),mask:e.constructor,_mask:r,...t}}}return ju(n)?{...n}:{mask:n}}function Ft(n){if(he.Masked&&n instanceof he.Masked)return n;const e=Jn(n),t=id(e.mask);if(!t)throw new Error("Masked class is not found for provided mask "+e.mask+", appropriate module needs to be imported manually before creating mask.");return e.mask===t&&delete e.mask,e._mask&&(e.mask=e._mask,delete e._mask),new t(e)}he.createMask=Ft;class al{get selectionStart(){let e;try{e=this._unsafeSelectionStart}catch{}return e??this.value.length}get selectionEnd(){let e;try{e=this._unsafeSelectionEnd}catch{}return e??this.value.length}select(e,t){if(!(e==null||t==null||e===this.selectionStart&&t===this.selectionEnd))try{this._unsafeSelect(e,t)}catch{}}get isActive(){return!1}}he.MaskElement=al;const $u=90,Gb=89;class Ai extends al{constructor(e){super(),this.input=e,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var e,t,r;return(e=(t=(r=this.input).getRootNode)==null?void 0:t.call(r))!=null?e:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(e){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",e.drop),this.input.addEventListener("click",e.click),this.input.addEventListener("focus",e.focus),this.input.addEventListener("blur",e.commit),this._handlers=e}_onKeydown(e){if(this._handlers.redo&&(e.keyCode===$u&&e.shiftKey&&(e.metaKey||e.ctrlKey)||e.keyCode===Gb&&e.ctrlKey))return e.preventDefault(),this._handlers.redo(e);if(this._handlers.undo&&e.keyCode===$u&&(e.metaKey||e.ctrlKey))return e.preventDefault(),this._handlers.undo(e);e.isComposing||this._handlers.selectionChange(e)}_onBeforeinput(e){if(e.inputType==="historyUndo"&&this._handlers.undo)return e.preventDefault(),this._handlers.undo(e);if(e.inputType==="historyRedo"&&this._handlers.redo)return e.preventDefault(),this._handlers.redo(e)}_onCompositionEnd(e){this._handlers.input(e)}_onInput(e){e.isComposing||this._handlers.input(e)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}}he.HTMLMaskElement=Ai;class Kb extends Ai{constructor(e){super(e),this.input=e}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(e,t){this.input.setSelectionRange(e,t)}get value(){return this.input.value}set value(e){this.input.value=e}}he.HTMLMaskElement=Ai;class od extends Ai{get _unsafeSelectionStart(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),r=t&&t.anchorOffset,s=t&&t.focusOffset;return s==null||r==null||r<s?r:s}get _unsafeSelectionEnd(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),r=t&&t.anchorOffset,s=t&&t.focusOffset;return s==null||r==null||r>s?r:s}_unsafeSelect(e,t){if(!this.rootElement.createRange)return;const r=this.rootElement.createRange();r.setStart(this.input.firstChild||this.input,e),r.setEnd(this.input.lastChild||this.input,t);const s=this.rootElement,i=s.getSelection&&s.getSelection();i&&(i.removeAllRanges(),i.addRange(r))}get value(){return this.input.textContent||""}set value(e){this.input.textContent=e}}he.HTMLContenteditableMaskElement=od;class Ci{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return this.states.length===0}push(e){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(e),this.states.length>Ci.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(e){return this.currentIndex=Math.min(Math.max(this.currentIndex+e,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}}Ci.MAX_LENGTH=100;class Wb{constructor(e,t){this.el=e instanceof al?e:e.isContentEditable&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"?new od(e):new Kb(e),this.masked=Ft(t),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new Ci,this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(e){var t;return e==null||((t=this.masked)==null?void 0:t.maskEquals(e))}get mask(){return this.masked.mask}set mask(e){if(this.maskEquals(e))return;if(!(e instanceof he.Masked)&&this.masked.constructor===id(e)){this.masked.updateOptions({mask:e});return}const t=e instanceof he.Masked?e:Ft({mask:e});t.unmaskedValue=this.masked.unmaskedValue,this.masked=t}get value(){return this._value}set value(e){this.value!==e&&(this.masked.value=e,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(e){this.unmaskedValue!==e&&(this.masked.unmaskedValue=e,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(e){this.rawInputValue!==e&&(this.masked.rawInputValue=e,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(e){this.masked.typedValueEquals(e)||(this.masked.typedValue=e,this.updateControl("auto"))}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(e,t){const r=this._listeners[e];r&&r.forEach(s=>s(t))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(e){!this.el||!this.el.isActive||(this.el.select(e,e),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value,this._unmaskedValue=this.masked.unmaskedValue,this._rawInputValue=this.masked.rawInputValue}updateControl(e){const t=this.masked.unmaskedValue,r=this.masked.value,s=this.masked.rawInputValue,i=this.displayValue,o=this.unmaskedValue!==t||this.value!==r||this._rawInputValue!==s;this._unmaskedValue=t,this._value=r,this._rawInputValue=s,this.el.value!==i&&(this.el.value=i),e==="auto"?this.alignCursor():e!=null&&(this.cursorPos=e),o&&this._fireChangeEvents(),!this._historyChanging&&(o||this.history.isEmpty)&&this.history.push({unmaskedValue:t,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(e){const{mask:t,...r}=e,s=!this.maskEquals(t),i=this.masked.optionsIsChanged(r);s&&(this.mask=t),i&&this.masked.updateOptions(r),(s||i)&&this.updateControl()}updateCursor(e){e!=null&&(this.cursorPos=e,this._delayUpdateCursor(e))}_delayUpdateCursor(e){this._abortUpdateCursor(),this._changingCursorPos=e,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,ae.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(e,t){return this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t),this}off(e,t){if(!this._listeners[e])return this;if(!t)return delete this._listeners[e],this;const r=this._listeners[e].indexOf(t);return r>=0&&this._listeners[e].splice(r,1),this}_onInput(e){this._inputEvent=e,this._abortUpdateCursor();const t=new zb({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),r=this.masked.rawInputValue,s=this.masked.splice(t.startChangePos,t.removed.length,t.inserted,t.removeDirection,{input:!0,raw:!0}).offset,i=r===this.masked.rawInputValue?t.removeDirection:ae.NONE;let o=this.masked.nearestInputPos(t.startChangePos+s,i);i!==ae.NONE&&(o=this.masked.nearestInputPos(o,ae.NONE)),this.updateControl(o),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(e){e.preventDefault(),e.stopPropagation()}_onFocus(e){this.alignCursorFriendly()}_onClick(e){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(e){e&&(this._historyChanging=!0,this.unmaskedValue=e.unmaskedValue,this.el.select(e.selection.start,e.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}he.InputMask=Wb;class pe{static normalize(e){return Array.isArray(e)?e:[e,new pe]}constructor(e){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},e)}aggregate(e){return this.inserted+=e.inserted,this.rawInserted+=e.rawInserted,this.tailShift+=e.tailShift,this.skip=this.skip||e.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return!!this.rawInserted||this.skip}equals(e){return this.inserted===e.inserted&&this.tailShift===e.tailShift&&this.rawInserted===e.rawInserted&&this.skip===e.skip}}he.ChangeDetails=pe;class xt{constructor(e,t,r){e===void 0&&(e=""),t===void 0&&(t=0),this.value=e,this.from=t,this.stop=r}toString(){return this.value}extend(e){this.value+=String(e)}appendTo(e){return e.append(this.toString(),{tail:!0}).aggregate(e._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(e){Object.assign(this,e)}unshift(e){if(!this.value.length||e!=null&&this.from>=e)return"";const t=this.value[0];return this.value=this.value.slice(1),t}shift(){if(!this.value.length)return"";const e=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),e}}class $e{constructor(e){this._value="",this._update({...$e.DEFAULTS,...e}),this._initialized=!0}updateOptions(e){this.optionsIsChanged(e)&&this.withValueRefresh(this._update.bind(this,e))}_update(e){Object.assign(this,e)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value}reset(){this._value=""}get value(){return this._value}set value(e){this.resolve(e,{input:!0})}resolve(e,t){t===void 0&&(t={input:!0}),this.reset(),this.append(e,t,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(e){this.resolve(e,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(e){this.format?this.value=this.format(e,this):this.unmaskedValue=String(e)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(e){this.resolve(e,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(e,t){return e}totalInputPositions(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),Math.min(this.displayValue.length,t-e)}extractInput(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),this.displayValue.slice(e,t)}extractTail(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),new xt(this.extractInput(e,t),e)}appendTail(e){return tr(e)&&(e=new xt(String(e))),e.appendTo(this)}_appendCharRaw(e,t){return e?(this._value+=e,new pe({inserted:e,rawInserted:e})):new pe}_appendChar(e,t,r){t===void 0&&(t={});const s=this.state;let i;if([e,i]=this.doPrepareChar(e,t),e&&(i=i.aggregate(this._appendCharRaw(e,t)),!i.rawInserted&&this.autofix==="pad")){const o=this.state;this.state=s;let a=this.pad(t);const u=this._appendCharRaw(e,t);a=a.aggregate(u),u.rawInserted||a.equals(i)?i=a:this.state=o}if(i.inserted){let o,a=this.doValidate(t)!==!1;if(a&&r!=null){const u=this.state;if(this.overwrite===!0){o=r.state;for(let h=0;h<i.rawInserted.length;++h)r.unshift(this.displayValue.length-i.tailShift)}let c=this.appendTail(r);if(a=c.rawInserted.length===r.toString().length,!(a&&c.inserted)&&this.overwrite==="shift"){this.state=u,o=r.state;for(let h=0;h<i.rawInserted.length;++h)r.shift();c=this.appendTail(r),a=c.rawInserted.length===r.toString().length}a&&c.inserted&&(this.state=u)}a||(i=new pe,this.state=s,r&&o&&(r.state=o))}return i}_appendPlaceholder(){return new pe}_appendEager(){return new pe}append(e,t,r){if(!tr(e))throw new Error("value should be string");const s=tr(r)?new xt(String(r)):r;t!=null&&t.tail&&(t._beforeTailState=this.state);let i;[e,i]=this.doPrepare(e,t);for(let o=0;o<e.length;++o){const a=this._appendChar(e[o],t,s);if(!a.rawInserted&&!this.doSkipInvalid(e[o],t,s))break;i.aggregate(a)}return(this.eager===!0||this.eager==="append")&&t!=null&&t.input&&e&&i.aggregate(this._appendEager()),s!=null&&(i.tailShift+=this.appendTail(s).tailShift),i}remove(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),this._value=this.displayValue.slice(0,e)+this.displayValue.slice(t),new pe}withValueRefresh(e){if(this._refreshing||!this._initialized)return e();this._refreshing=!0;const t=this.rawInputValue,r=this.value,s=e();return this.rawInputValue=t,this.value&&this.value!==r&&r.indexOf(this.value)===0&&(this.append(r.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,s}runIsolated(e){if(this._isolated||!this._initialized)return e(this);this._isolated=!0;const t=this.state,r=e(this);return this.state=t,delete this._isolated,r}doSkipInvalid(e,t,r){return!!this.skipInvalid}doPrepare(e,t){return t===void 0&&(t={}),pe.normalize(this.prepare?this.prepare(e,this,t):e)}doPrepareChar(e,t){return t===void 0&&(t={}),pe.normalize(this.prepareChar?this.prepareChar(e,this,t):e)}doValidate(e){return(!this.validate||this.validate(this.value,this,e))&&(!this.parent||this.parent.doValidate(e))}doCommit(){this.commit&&this.commit(this.value,this)}splice(e,t,r,s,i){r===void 0&&(r=""),s===void 0&&(s=ae.NONE),i===void 0&&(i={input:!0});const o=e+t,a=this.extractTail(o),u=this.eager===!0||this.eager==="remove";let c;u&&(s=Hb(s),c=this.extractInput(0,o,{raw:!0}));let h=e;const g=new pe;if(s!==ae.NONE&&(h=this.nearestInputPos(e,t>1&&e!==0&&!u?ae.NONE:s),g.tailShift=h-e),g.aggregate(this.remove(h)),u&&s!==ae.NONE&&c===this.rawInputValue)if(s===ae.FORCE_LEFT){let d;for(;c===this.rawInputValue&&(d=this.displayValue.length);)g.aggregate(new pe({tailShift:-1})).aggregate(this.remove(d-1))}else s===ae.FORCE_RIGHT&&a.unshift();return g.aggregate(this.append(r,i,a))}maskEquals(e){return this.mask===e}optionsIsChanged(e){return!ni(this,e)}typedValueEquals(e){const t=this.typedValue;return e===t||$e.EMPTY_VALUES.includes(e)&&$e.EMPTY_VALUES.includes(t)||(this.format?this.format(e,this)===this.format(this.typedValue,this):!1)}pad(e){return new pe}}$e.DEFAULTS={skipInvalid:!0};$e.EMPTY_VALUES=[void 0,null,""];he.Masked=$e;class vr{constructor(e,t){e===void 0&&(e=[]),t===void 0&&(t=0),this.chunks=e,this.from=t}toString(){return this.chunks.map(String).join("")}extend(e){if(!String(e))return;e=tr(e)?new xt(String(e)):e;const t=this.chunks[this.chunks.length-1],r=t&&(t.stop===e.stop||e.stop==null)&&e.from===t.from+t.toString().length;if(e instanceof xt)r?t.extend(e.toString()):this.chunks.push(e);else if(e instanceof vr){if(e.stop==null){let s;for(;e.chunks.length&&e.chunks[0].stop==null;)s=e.chunks.shift(),s.from+=e.from,this.extend(s)}e.toString()&&(e.stop=e.blockIndex,this.chunks.push(e))}}appendTo(e){if(!(e instanceof he.MaskedPattern))return new xt(this.toString()).appendTo(e);const t=new pe;for(let r=0;r<this.chunks.length;++r){const s=this.chunks[r],i=e._mapPosToBlock(e.displayValue.length),o=s.stop;let a;if(o!=null&&(!i||i.index<=o)&&((s instanceof vr||e._stops.indexOf(o)>=0)&&t.aggregate(e._appendPlaceholder(o)),a=s instanceof vr&&e._blocks[o]),a){const u=a.appendTail(s);t.aggregate(u);const c=s.toString().slice(u.rawInserted.length);c&&t.aggregate(e.append(c,{tail:!0}))}else t.aggregate(e.append(s.toString(),{tail:!0}))}return t}get state(){return{chunks:this.chunks.map(e=>e.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(e){const{chunks:t,...r}=e;Object.assign(this,r),this.chunks=t.map(s=>{const i="chunks"in s?new vr:new xt;return i.state=s,i})}unshift(e){if(!this.chunks.length||e!=null&&this.from>=e)return"";const t=e!=null?e-this.from:e;let r=0;for(;r<this.chunks.length;){const s=this.chunks[r],i=s.unshift(t);if(s.toString()){if(!i)break;++r}else this.chunks.splice(r,1);if(i)return i}return""}shift(){if(!this.chunks.length)return"";let e=this.chunks.length-1;for(;0<=e;){const t=this.chunks[e],r=t.shift();if(t.toString()){if(!r)break;--e}else this.chunks.splice(e,1);if(r)return r}return""}}class Yb{constructor(e,t){this.masked=e,this._log=[];const{offset:r,index:s}=e._mapPosToBlock(t)||(t<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=r,this.index=s,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(e){Object.assign(this,e)}pushState(){this._log.push(this.state)}popState(){const e=this._log.pop();return e&&(this.state=e),e}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(e){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((t=this.block)==null?void 0:t.displayValue.length)||0){var t;if(e())return this.ok=!0}return this.ok=!1}_pushRight(e){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(e())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,ae.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,ae.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,ae.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,ae.FORCE_RIGHT),this.offset!==this.block.value.length))return!0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,ae.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,ae.NONE),!0})}}class ad{constructor(e){Object.assign(this,e),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(e,t){return e===void 0&&(e=0),t===void 0&&(t=this._value.length),this._value=this._value.slice(0,e)+this._value.slice(t),this._value||(this._isRawInput=!1),new pe}nearestInputPos(e,t){t===void 0&&(t=ae.NONE);const r=0,s=this._value.length;switch(t){case ae.LEFT:case ae.FORCE_LEFT:return r;case ae.NONE:case ae.RIGHT:case ae.FORCE_RIGHT:default:return s}}totalInputPositions(e,t){return e===void 0&&(e=0),t===void 0&&(t=this._value.length),this._isRawInput?t-e:0}extractInput(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=this._value.length),r===void 0&&(r={}),r.raw&&this._isRawInput&&this._value.slice(e,t)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(e,t){if(t===void 0&&(t={}),this.isFilled)return new pe;const r=this.eager===!0||this.eager==="append",i=this.char===e&&(this.isUnmasking||t.input||t.raw)&&(!t.raw||!r)&&!t.tail,o=new pe({inserted:this.char,rawInserted:i?this.char:""});return this._value=this.char,this._isRawInput=i&&(t.raw||t.input),o}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const e=new pe;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new xt("")}appendTail(e){return tr(e)&&(e=new xt(String(e))),e.appendTo(this)}append(e,t,r){const s=this._appendChar(e[0],t);return r!=null&&(s.tailShift+=this.appendTail(r).tailShift),s}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value,this._isRawInput=!!e._rawInputValue}pad(e){return this._appendPlaceholder()}}class si{constructor(e){const{parent:t,isOptional:r,placeholderChar:s,displayChar:i,lazy:o,eager:a,...u}=e;this.masked=Ft(u),Object.assign(this,{parent:t,isOptional:r,placeholderChar:s,displayChar:i,lazy:o,eager:a})}reset(){this.isFilled=!1,this.masked.reset()}remove(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.value.length),e===0&&t>=1?(this.isFilled=!1,this.masked.remove(e,t)):new pe}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(e,t){if(t===void 0&&(t={}),this.isFilled)return new pe;const r=this.masked.state;let s=this.masked._appendChar(e,this.currentMaskFlags(t));return s.inserted&&this.doValidate(t)===!1&&(s=new pe,this.masked.state=r),!s.inserted&&!this.isOptional&&!this.lazy&&!t.input&&(s.inserted=this.placeholderChar),s.skip=!s.inserted&&!this.isOptional,this.isFilled=!!s.inserted,s}append(e,t,r){return this.masked.append(e,this.currentMaskFlags(t),r)}_appendPlaceholder(){return this.isFilled||this.isOptional?new pe:(this.isFilled=!0,new pe({inserted:this.placeholderChar}))}_appendEager(){return new pe}extractTail(e,t){return this.masked.extractTail(e,t)}appendTail(e){return this.masked.appendTail(e)}extractInput(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=this.value.length),this.masked.extractInput(e,t,r)}nearestInputPos(e,t){t===void 0&&(t=ae.NONE);const r=0,s=this.value.length,i=Math.min(Math.max(e,r),s);switch(t){case ae.LEFT:case ae.FORCE_LEFT:return this.isComplete?i:r;case ae.RIGHT:case ae.FORCE_RIGHT:return this.isComplete?i:s;case ae.NONE:default:return i}}totalInputPositions(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.value.length),this.value.slice(e,t).length}doValidate(e){return this.masked.doValidate(this.currentMaskFlags(e))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(e)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(e){this.masked.state=e.masked,this.isFilled=e.isFilled}currentMaskFlags(e){var t;return{...e,_beforeTailState:(e==null||(t=e._beforeTailState)==null?void 0:t.masked)||(e==null?void 0:e._beforeTailState)}}pad(e){return new pe}}si.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class Zb extends $e{updateOptions(e){super.updateOptions(e)}_update(e){const t=e.mask;t&&(e.validate=r=>r.search(t)>=0),super._update(e)}}he.MaskedRegExp=Zb;class Ve extends $e{constructor(e){super({...Ve.DEFAULTS,...e,definitions:Object.assign({},si.DEFAULT_DEFINITIONS,e==null?void 0:e.definitions)})}updateOptions(e){super.updateOptions(e)}_update(e){e.definitions=Object.assign({},this.definitions,e.definitions),super._update(e),this._rebuildMask()}_rebuildMask(){const e=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const t=this.mask;if(!t||!e)return;let r=!1,s=!1;for(let i=0;i<t.length;++i){if(this.blocks){const c=t.slice(i),h=Object.keys(this.blocks).filter(d=>c.indexOf(d)===0);h.sort((d,m)=>m.length-d.length);const g=h[0];if(g){const{expose:d,repeat:m,...v}=Jn(this.blocks[g]),p={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...v,repeat:m,parent:this},y=m!=null?new he.RepeatBlock(p):Ft(p);y&&(this._blocks.push(y),d&&(this.exposeBlock=y),this._maskedBlocks[g]||(this._maskedBlocks[g]=[]),this._maskedBlocks[g].push(this._blocks.length-1)),i+=g.length-1;continue}}let o=t[i],a=o in e;if(o===Ve.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(o==="{"||o==="}"){r=!r;continue}if(o==="["||o==="]"){s=!s;continue}if(o===Ve.ESCAPE_CHAR){if(++i,o=t[i],!o)break;a=!1}const u=a?new si({isOptional:s,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...Jn(e[o]),parent:this}):new ad({char:o,eager:this.eager,isUnmasking:r});this._blocks.push(u)}}get state(){return{...super.state,_blocks:this._blocks.map(e=>e.state)}}set state(e){if(!e){this.reset();return}const{_blocks:t,...r}=e;this._blocks.forEach((s,i)=>s.state=t[i]),super.state=r}reset(){super.reset(),this._blocks.forEach(e=>e.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(e=>e.isComplete)}get isFilled(){return this._blocks.every(e=>e.isFilled)}get isFixed(){return this._blocks.every(e=>e.isFixed)}get isOptional(){return this._blocks.every(e=>e.isOptional)}doCommit(){this._blocks.forEach(e=>e.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((e,t)=>e+=t.unmaskedValue,"")}set unmaskedValue(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=e,this.appendTail(t),this.doCommit()}else super.unmaskedValue=e}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((e,t)=>e+=t.value,"")}set value(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=e,this.appendTail(t),this.doCommit()}else super.value=e}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=e,this.appendTail(t),this.doCommit()}else super.typedValue=e}get displayValue(){return this._blocks.reduce((e,t)=>e+=t.displayValue,"")}appendTail(e){return super.appendTail(e).aggregate(this._appendPlaceholder())}_appendEager(){var e;const t=new pe;let r=(e=this._mapPosToBlock(this.displayValue.length))==null?void 0:e.index;if(r==null)return t;this._blocks[r].isFilled&&++r;for(let s=r;s<this._blocks.length;++s){const i=this._blocks[s]._appendEager();if(!i.inserted)break;t.aggregate(i)}return t}_appendCharRaw(e,t){t===void 0&&(t={});const r=this._mapPosToBlock(this.displayValue.length),s=new pe;if(!r)return s;for(let o=r.index,a;a=this._blocks[o];++o){var i;const u=a._appendChar(e,{...t,_beforeTailState:(i=t._beforeTailState)==null||(i=i._blocks)==null?void 0:i[o]});if(s.aggregate(u),u.consumed)break}return s}extractTail(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);const r=new vr;return e===t||this._forEachBlocksInRange(e,t,(s,i,o,a)=>{const u=s.extractTail(o,a);u.stop=this._findStopBefore(i),u.from=this._blockStartPos(i),u instanceof vr&&(u.blockIndex=i),r.extend(u)}),r}extractInput(e,t,r){if(e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),r===void 0&&(r={}),e===t)return"";let s="";return this._forEachBlocksInRange(e,t,(i,o,a,u)=>{s+=i.extractInput(a,u,r)}),s}_findStopBefore(e){let t;for(let r=0;r<this._stops.length;++r){const s=this._stops[r];if(s<=e)t=s;else break}return t}_appendPlaceholder(e){const t=new pe;if(this.lazy&&e==null)return t;const r=this._mapPosToBlock(this.displayValue.length);if(!r)return t;const s=r.index,i=e??this._blocks.length;return this._blocks.slice(s,i).forEach(o=>{if(!o.lazy||e!=null){var a;t.aggregate(o._appendPlaceholder((a=o._blocks)==null?void 0:a.length))}}),t}_mapPosToBlock(e){let t="";for(let r=0;r<this._blocks.length;++r){const s=this._blocks[r],i=t.length;if(t+=s.displayValue,e<=t.length)return{index:r,offset:e-i}}}_blockStartPos(e){return this._blocks.slice(0,e).reduce((t,r)=>t+=r.displayValue.length,0)}_forEachBlocksInRange(e,t,r){t===void 0&&(t=this.displayValue.length);const s=this._mapPosToBlock(e);if(s){const i=this._mapPosToBlock(t),o=i&&s.index===i.index,a=s.offset,u=i&&o?i.offset:this._blocks[s.index].displayValue.length;if(r(this._blocks[s.index],s.index,a,u),i&&!o){for(let c=s.index+1;c<i.index;++c)r(this._blocks[c],c,0,this._blocks[c].displayValue.length);r(this._blocks[i.index],i.index,0,i.offset)}}}remove(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);const r=super.remove(e,t);return this._forEachBlocksInRange(e,t,(s,i,o,a)=>{r.aggregate(s.remove(o,a))}),r}nearestInputPos(e,t){if(t===void 0&&(t=ae.NONE),!this._blocks.length)return 0;const r=new Yb(this,e);if(t===ae.NONE)return r.pushRightBeforeInput()||(r.popState(),r.pushLeftBeforeInput())?r.pos:this.displayValue.length;if(t===ae.LEFT||t===ae.FORCE_LEFT){if(t===ae.LEFT){if(r.pushRightBeforeFilled(),r.ok&&r.pos===e)return e;r.popState()}if(r.pushLeftBeforeInput(),r.pushLeftBeforeRequired(),r.pushLeftBeforeFilled(),t===ae.LEFT){if(r.pushRightBeforeInput(),r.pushRightBeforeRequired(),r.ok&&r.pos<=e||(r.popState(),r.ok&&r.pos<=e))return r.pos;r.popState()}return r.ok?r.pos:t===ae.FORCE_LEFT?0:(r.popState(),r.ok||(r.popState(),r.ok)?r.pos:0)}return t===ae.RIGHT||t===ae.FORCE_RIGHT?(r.pushRightBeforeInput(),r.pushRightBeforeRequired(),r.pushRightBeforeFilled()?r.pos:t===ae.FORCE_RIGHT?this.displayValue.length:(r.popState(),r.ok||(r.popState(),r.ok)?r.pos:this.nearestInputPos(e,ae.LEFT))):e}totalInputPositions(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);let r=0;return this._forEachBlocksInRange(e,t,(s,i,o,a)=>{r+=s.totalInputPositions(o,a)}),r}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){const t=this._maskedBlocks[e];return t?t.map(r=>this._blocks[r]):[]}pad(e){const t=new pe;return this._forEachBlocksInRange(0,this.displayValue.length,r=>t.aggregate(r.pad(e))),t}}Ve.DEFAULTS={...$e.DEFAULTS,lazy:!0,placeholderChar:"_"};Ve.STOP_CHAR="`";Ve.ESCAPE_CHAR="\\";Ve.InputDefinition=si;Ve.FixedDefinition=ad;he.MaskedPattern=Ve;class Gs extends Ve{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{to:t=this.to||0,from:r=this.from||0,maxLength:s=this.maxLength||0,autofix:i=this.autofix,...o}=e;this.to=t,this.from=r,this.maxLength=Math.max(String(t).length,s),this.autofix=i;const a=String(this.from).padStart(this.maxLength,"0"),u=String(this.to).padStart(this.maxLength,"0");let c=0;for(;c<u.length&&u[c]===a[c];)++c;o.mask=u.slice(0,c).replace(/0/g,"\\0")+"0".repeat(this.maxLength-c),super._update(o)}get isComplete(){return super.isComplete&&!!this.value}boundaries(e){let t="",r="";const[,s,i]=e.match(/^(\D*)(\d*)(\D*)/)||[];return i&&(t="0".repeat(s.length)+i,r="9".repeat(s.length)+i),t=t.padEnd(this.maxLength,"0"),r=r.padEnd(this.maxLength,"9"),[t,r]}doPrepareChar(e,t){t===void 0&&(t={});let r;return[e,r]=super.doPrepareChar(e.replace(/\D/g,""),t),e||(r.skip=!this.isComplete),[e,r]}_appendCharRaw(e,t){if(t===void 0&&(t={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(e,t);const r=String(this.from).padStart(this.maxLength,"0"),s=String(this.to).padStart(this.maxLength,"0"),[i,o]=this.boundaries(this.value+e);return Number(o)<this.from?super._appendCharRaw(r[this.value.length],t):Number(i)>this.to?!t.tail&&this.autofix==="pad"&&this.value.length+1<this.maxLength?super._appendCharRaw(r[this.value.length],t).aggregate(this._appendCharRaw(e,t)):super._appendCharRaw(s[this.value.length],t):super._appendCharRaw(e,t)}doValidate(e){const t=this.value;if(t.search(/[^0]/)===-1&&t.length<=this._matchFrom)return!0;const[s,i]=this.boundaries(t);return this.from<=Number(i)&&Number(s)<=this.to&&super.doValidate(e)}pad(e){const t=new pe;if(this.value.length===this.maxLength)return t;const r=this.value,s=this.maxLength-this.value.length;if(s){this.reset();for(let i=0;i<s;++i)t.aggregate(super._appendCharRaw("0",e));r.split("").forEach(i=>this._appendCharRaw(i))}return t}}he.MaskedRange=Gs;const Xb="d{.}`m{.}`Y";class Dt extends Ve{static extractPatternOptions(e){const{mask:t,pattern:r,...s}=e;return{...s,mask:tr(t)?t:r}}constructor(e){super(Dt.extractPatternOptions({...Dt.DEFAULTS,...e}))}updateOptions(e){super.updateOptions(e)}_update(e){const{mask:t,pattern:r,blocks:s,...i}={...Dt.DEFAULTS,...e},o=Object.assign({},Dt.GET_DEFAULT_BLOCKS());e.min&&(o.Y.from=e.min.getFullYear()),e.max&&(o.Y.to=e.max.getFullYear()),e.min&&e.max&&o.Y.from===o.Y.to&&(o.m.from=e.min.getMonth()+1,o.m.to=e.max.getMonth()+1,o.m.from===o.m.to&&(o.d.from=e.min.getDate(),o.d.to=e.max.getDate())),Object.assign(o,this.blocks,s),super._update({...i,mask:tr(t)?t:r,blocks:o})}doValidate(e){const t=this.date;return super.doValidate(e)&&(!this.isComplete||this.isDateExist(this.value)&&t!=null&&(this.min==null||this.min<=t)&&(this.max==null||t<=this.max))}isDateExist(e){return this.format(this.parse(e,this),this).indexOf(e)>=0}get date(){return this.typedValue}set date(e){this.typedValue=e}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(e){super.typedValue=e}maskEquals(e){return e===Date||super.maskEquals(e)}optionsIsChanged(e){return super.optionsIsChanged(Dt.extractPatternOptions(e))}}Dt.GET_DEFAULT_BLOCKS=()=>({d:{mask:Gs,from:1,to:31,maxLength:2},m:{mask:Gs,from:1,to:12,maxLength:2},Y:{mask:Gs,from:1900,to:9999}});Dt.DEFAULTS={...Ve.DEFAULTS,mask:Date,pattern:Xb,format:(n,e)=>{if(!n)return"";const t=String(n.getDate()).padStart(2,"0"),r=String(n.getMonth()+1).padStart(2,"0"),s=n.getFullYear();return[t,r,s].join(".")},parse:(n,e)=>{const[t,r,s]=n.split(".").map(Number);return new Date(s,r-1,t)}};he.MaskedDate=Dt;class Ti extends $e{constructor(e){super({...Ti.DEFAULTS,...e}),this.currentMask=void 0}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),"mask"in e&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(e.mask)?e.mask.map(t=>{const{expose:r,...s}=Jn(t),i=Ft({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...s});return r&&(this.exposeMask=i),i}):[])}_appendCharRaw(e,t){t===void 0&&(t={});const r=this._applyDispatch(e,t);return this.currentMask&&r.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(t))),r}_applyDispatch(e,t,r){e===void 0&&(e=""),t===void 0&&(t={}),r===void 0&&(r="");const s=t.tail&&t._beforeTailState!=null?t._beforeTailState._value:this.value,i=this.rawInputValue,o=t.tail&&t._beforeTailState!=null?t._beforeTailState._rawInputValue:i,a=i.slice(o.length),u=this.currentMask,c=new pe,h=u==null?void 0:u.state;return this.currentMask=this.doDispatch(e,{...t},r),this.currentMask&&(this.currentMask!==u?(this.currentMask.reset(),o&&(this.currentMask.append(o,{raw:!0}),c.tailShift=this.currentMask.value.length-s.length),a&&(c.tailShift+=this.currentMask.append(a,{raw:!0,tail:!0}).tailShift)):h&&(this.currentMask.state=h)),c}_appendPlaceholder(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendPlaceholder()),e}_appendEager(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendEager()),e}appendTail(e){const t=new pe;return e&&t.aggregate(this._applyDispatch("",{},e)),t.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var t,r;return{...e,_beforeTailState:((t=e._beforeTailState)==null?void 0:t.currentMaskRef)===this.currentMask&&((r=e._beforeTailState)==null?void 0:r.currentMask)||e._beforeTailState}}doDispatch(e,t,r){return t===void 0&&(t={}),r===void 0&&(r=""),this.dispatch(e,this,t,r)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e,t){t===void 0&&(t={});let[r,s]=super.doPrepare(e,t);if(this.currentMask){let i;[r,i]=super.doPrepare(r,this.currentMaskFlags(t)),s=s.aggregate(i)}return[r,s]}doPrepareChar(e,t){t===void 0&&(t={});let[r,s]=super.doPrepareChar(e,t);if(this.currentMask){let i;[r,i]=super.doPrepareChar(r,this.currentMaskFlags(t)),s=s.aggregate(i)}return[r,s]}reset(){var e;(e=this.currentMask)==null||e.reset(),this.compiledMasks.forEach(t=>t.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(e){this.exposeMask?(this.exposeMask.value=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=e}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(e){this.exposeMask?(this.exposeMask.unmaskedValue=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=e}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(e){if(this.exposeMask){this.exposeMask.typedValue=e,this.currentMask=this.exposeMask,this._applyDispatch();return}let t=String(e);this.currentMask&&(this.currentMask.typedValue=e,t=this.currentMask.unmaskedValue),this.unmaskedValue=t}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var e;return!!((e=this.currentMask)!=null&&e.isComplete)}get isFilled(){var e;return!!((e=this.currentMask)!=null&&e.isFilled)}remove(e,t){const r=new pe;return this.currentMask&&r.aggregate(this.currentMask.remove(e,t)).aggregate(this._applyDispatch()),r}get state(){var e;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(t=>t.state),currentMaskRef:this.currentMask,currentMask:(e=this.currentMask)==null?void 0:e.state}}set state(e){const{compiledMasks:t,currentMaskRef:r,currentMask:s,...i}=e;t&&this.compiledMasks.forEach((o,a)=>o.state=t[a]),r!=null&&(this.currentMask=r,this.currentMask.state=s),super.state=i}extractInput(e,t,r){return this.currentMask?this.currentMask.extractInput(e,t,r):""}extractTail(e,t){return this.currentMask?this.currentMask.extractTail(e,t):super.extractTail(e,t)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(e,t){return this.currentMask?this.currentMask.nearestInputPos(e,t):super.nearestInputPos(e,t)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(e){this._overwrite=e}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(e){this._eager=e}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(e){this._skipInvalid=e}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(e){this._autofix=e}maskEquals(e){return Array.isArray(e)?this.compiledMasks.every((t,r)=>{if(!e[r])return;const{mask:s,...i}=e[r];return ni(t,i)&&t.maskEquals(s)}):super.maskEquals(e)}typedValueEquals(e){var t;return!!((t=this.currentMask)!=null&&t.typedValueEquals(e))}}Ti.DEFAULTS={...$e.DEFAULTS,dispatch:(n,e,t,r)=>{if(!e.compiledMasks.length)return;const s=e.rawInputValue,i=e.compiledMasks.map((o,a)=>{const u=e.currentMask===o,c=u?o.displayValue.length:o.nearestInputPos(o.displayValue.length,ae.FORCE_LEFT);return o.rawInputValue!==s?(o.reset(),o.append(s,{raw:!0})):u||o.remove(c),o.append(n,e.currentMaskFlags(t)),o.appendTail(r),{index:a,weight:o.rawInputValue.length,totalInputPositions:o.totalInputPositions(0,Math.max(c,o.nearestInputPos(o.displayValue.length,ae.FORCE_LEFT)))}});return i.sort((o,a)=>a.weight-o.weight||a.totalInputPositions-o.totalInputPositions),e.compiledMasks[i[0].index]}};he.MaskedDynamic=Ti;class ki extends Ve{constructor(e){super({...ki.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){const{enum:t,...r}=e;if(t){const s=t.map(a=>a.length),i=Math.min(...s),o=Math.max(...s)-i;r.mask="*".repeat(i),o&&(r.mask+="["+"*".repeat(o)+"]"),this.enum=t}super._update(r)}_appendCharRaw(e,t){t===void 0&&(t={});const r=Math.min(this.nearestInputPos(0,ae.FORCE_RIGHT),this.value.length),s=this.enum.filter(i=>this.matchValue(i,this.unmaskedValue+e,r));if(s.length){s.length===1&&this._forEachBlocksInRange(0,this.value.length,(o,a)=>{const u=s[0][a];a>=this.value.length||u===o.value||(o.reset(),o._appendChar(u,t))});const i=super._appendCharRaw(s[0][this.value.length],t);return s.length===1&&s[0].slice(this.unmaskedValue.length).split("").forEach(o=>i.aggregate(super._appendCharRaw(o))),i}return new pe({skip:!this.isComplete})}extractTail(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),new xt("",e)}remove(e,t){if(e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),e===t)return new pe;const r=Math.min(super.nearestInputPos(0,ae.FORCE_RIGHT),this.value.length);let s;for(s=e;s>=0&&!(this.enum.filter(a=>this.matchValue(a,this.value.slice(r,s),r)).length>1);--s);const i=super.remove(s,t);return i.tailShift+=s-e,i}get isComplete(){return this.enum.indexOf(this.value)>=0}}ki.DEFAULTS={...Ve.DEFAULTS,matchValue:(n,e,t)=>n.indexOf(e,t)===t};he.MaskedEnum=ki;class Qb extends $e{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}}he.MaskedFunction=Qb;var ld;class Ge extends $e{constructor(e){super({...Ge.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){const e="^"+(this.allowNegative?"[+|\\-]?":""),t="\\d*",r=(this.scale?"("+jo(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+t+r),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(jo).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(jo(this.thousandsSeparator),"g")}_removeThousandsSeparators(e){return e.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(e){const t=e.split(this.radix);return t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),t.join(this.radix)}doPrepareChar(e,t){t===void 0&&(t={});const[r,s]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(t.input&&t.raw||!t.input&&!t.raw)?e.replace(this._mapToRadixRegExp,this.radix):e),t);return e&&!r&&(s.skip=!0),r&&!this.allowPositive&&!this.value&&r!=="-"&&s.aggregate(this._appendChar("-")),[r,s]}_separatorsCount(e,t){t===void 0&&(t=!1);let r=0;for(let s=0;s<e;++s)this._value.indexOf(this.thousandsSeparator,s)===s&&(++r,t&&(e+=this.thousandsSeparator.length));return r}_separatorsCountFromSlice(e){return e===void 0&&(e=this._value),this._separatorsCount(this._removeThousandsSeparators(e).length,!0)}extractInput(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t),this._removeThousandsSeparators(super.extractInput(e,t,r))}_appendCharRaw(e,t){t===void 0&&(t={});const r=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,s=this._separatorsCountFromSlice(r);this._value=this._removeThousandsSeparators(this.value);const i=this._value;this._value+=e;const o=this.number;let a=!isNaN(o),u=!1;if(a){let d;this.min!=null&&this.min<0&&this.number<this.min&&(d=this.min),this.max!=null&&this.max>0&&this.number>this.max&&(d=this.max),d!=null&&(this.autofix?(this._value=this.format(d,this).replace(Ge.UNMASKED_RADIX,this.radix),u||(u=i===this._value&&!t.tail)):a=!1),a&&(a=!!this._value.match(this._numberRegExp))}let c;a?c=new pe({inserted:this._value.slice(i.length),rawInserted:u?"":e,skip:u}):(this._value=i,c=new pe),this._value=this._insertThousandsSeparators(this._value);const h=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,g=this._separatorsCountFromSlice(h);return c.tailShift+=(g-s)*this.thousandsSeparator.length,c}_findSeparatorAround(e){if(this.thousandsSeparator){const t=e-this.thousandsSeparator.length+1,r=this.value.indexOf(this.thousandsSeparator,t);if(r<=e)return r}return-1}_adjustRangeWithSeparators(e,t){const r=this._findSeparatorAround(e);r>=0&&(e=r);const s=this._findSeparatorAround(t);return s>=0&&(t=s+this.thousandsSeparator.length),[e,t]}remove(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t);const r=this.value.slice(0,e),s=this.value.slice(t),i=this._separatorsCount(r.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(r+s));const o=this._separatorsCountFromSlice(r);return new pe({tailShift:(o-i)*this.thousandsSeparator.length})}nearestInputPos(e,t){if(!this.thousandsSeparator)return e;switch(t){case ae.NONE:case ae.LEFT:case ae.FORCE_LEFT:{const r=this._findSeparatorAround(e-1);if(r>=0){const s=r+this.thousandsSeparator.length;if(e<s||this.value.length<=s||t===ae.FORCE_LEFT)return r}break}case ae.RIGHT:case ae.FORCE_RIGHT:{const r=this._findSeparatorAround(e);if(r>=0)return r+this.thousandsSeparator.length}}return e}doCommit(){if(this.value){const e=this.number;let t=e;this.min!=null&&(t=Math.max(t,this.min)),this.max!=null&&(t=Math.min(t,this.max)),t!==e&&(this.unmaskedValue=this.format(t,this));let r=this.value;this.normalizeZeros&&(r=this._normalizeZeros(r)),this.padFractionalZeros&&this.scale>0&&(r=this._padFractionalZeros(r)),this._value=r}super.doCommit()}_normalizeZeros(e){const t=this._removeThousandsSeparators(e).split(this.radix);return t[0]=t[0].replace(/^(\D*)(0*)(\d*)/,(r,s,i,o)=>s+o),e.length&&!/\d$/.test(t[0])&&(t[0]=t[0]+"0"),t.length>1&&(t[1]=t[1].replace(/0*$/,""),t[1].length||(t.length=1)),this._insertThousandsSeparators(t.join(this.radix))}_padFractionalZeros(e){if(!e)return e;const t=e.split(this.radix);return t.length<2&&t.push(""),t[1]=t[1].padEnd(this.scale,"0"),t.join(this.radix)}doSkipInvalid(e,t,r){t===void 0&&(t={});const s=this.scale===0&&e!==this.thousandsSeparator&&(e===this.radix||e===Ge.UNMASKED_RADIX||this.mapToRadix.includes(e));return super.doSkipInvalid(e,t,r)&&!s}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,Ge.UNMASKED_RADIX)}set unmaskedValue(e){super.unmaskedValue=e}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(e){this.rawInputValue=this.format(e,this).replace(Ge.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(e){this.typedValue=e}get allowNegative(){return this.min!=null&&this.min<0||this.max!=null&&this.max<0}get allowPositive(){return this.min!=null&&this.min>0||this.max!=null&&this.max>0}typedValueEquals(e){return(super.typedValueEquals(e)||Ge.EMPTY_VALUES.includes(e)&&Ge.EMPTY_VALUES.includes(this.typedValue))&&!(e===0&&this.value==="")}}ld=Ge;Ge.UNMASKED_RADIX=".";Ge.EMPTY_VALUES=[...$e.EMPTY_VALUES,0];Ge.DEFAULTS={...$e.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[ld.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:n=>n.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})};he.MaskedNumber=Ge;const Ca={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function ud(n,e,t){e===void 0&&(e=Ca.MASKED),t===void 0&&(t=Ca.MASKED);const r=Ft(n);return s=>r.runIsolated(i=>(i[e]=s,i[t]))}function Jb(n,e,t,r){return ud(e,t,r)(n)}he.PIPE_TYPE=Ca;he.createPipe=ud;he.pipe=Jb;class eE extends Ve{get repeatFrom(){var e;return(e=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)!=null?e:0}get repeatTo(){var e;return(e=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)!=null?e:1/0}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){var t,r,s;const{repeat:i,...o}=Jn(e);this._blockOpts=Object.assign({},this._blockOpts,o);const a=Ft(this._blockOpts);this.repeat=(t=(r=i??a.repeat)!=null?r:this.repeat)!=null?t:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&((s=this._blocks)==null?void 0:s.length)||0,this.repeatFrom)),blocks:{m:a},eager:a.eager,overwrite:a.overwrite,skipInvalid:a.skipInvalid,lazy:a.lazy,placeholderChar:a.placeholderChar,displayChar:a.displayChar})}_allocateBlock(e){if(e<this._blocks.length)return this._blocks[e];if(this.repeatTo===1/0||this._blocks.length<this.repeatTo)return this._blocks.push(Ft(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]}_appendCharRaw(e,t){t===void 0&&(t={});const r=new pe;for(let u=(s=(i=this._mapPosToBlock(this.displayValue.length))==null?void 0:i.index)!=null?s:Math.max(this._blocks.length-1,0),c,h;c=(o=this._blocks[u])!=null?o:h=!h&&this._allocateBlock(u);++u){var s,i,o,a;const g=c._appendChar(e,{...t,_beforeTailState:(a=t._beforeTailState)==null||(a=a._blocks)==null?void 0:a[u]});if(g.skip&&h){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(r.aggregate(g),g.consumed)break}return r}_trimEmptyTail(e,t){var r,s;e===void 0&&(e=0);const i=Math.max(((r=this._mapPosToBlock(e))==null?void 0:r.index)||0,this.repeatFrom,0);let o;t!=null&&(o=(s=this._mapPosToBlock(t))==null?void 0:s.index),o==null&&(o=this._blocks.length-1);let a=0;for(let u=o;i<=u&&!this._blocks[u].unmaskedValue;--u,++a);a&&(this._blocks.splice(o-a+1,a),this.mask=this.mask.slice(a))}reset(){super.reset(),this._trimEmptyTail()}remove(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);const r=super.remove(e,t);return this._trimEmptyTail(e,t),r}totalInputPositions(e,t){return e===void 0&&(e=0),t==null&&this.repeatTo===1/0?1/0:super.totalInputPositions(e,t)}get state(){return super.state}set state(e){this._blocks.length=e._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=e}}he.RepeatBlock=eE;try{globalThis.IMask=he}catch{}var Ps={exports:{}},Bs={exports:{}},we={};/** @license React v16.13.1
167
- * react-is.production.min.js
168
- *
169
- * Copyright (c) Facebook, Inc. and its affiliates.
170
- *
171
- * This source code is licensed under the MIT license found in the
172
- * LICENSE file in the root directory of this source tree.
173
- */var Vu;function tE(){if(Vu)return we;Vu=1;var n=typeof Symbol=="function"&&Symbol.for,e=n?Symbol.for("react.element"):60103,t=n?Symbol.for("react.portal"):60106,r=n?Symbol.for("react.fragment"):60107,s=n?Symbol.for("react.strict_mode"):60108,i=n?Symbol.for("react.profiler"):60114,o=n?Symbol.for("react.provider"):60109,a=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,c=n?Symbol.for("react.concurrent_mode"):60111,h=n?Symbol.for("react.forward_ref"):60112,g=n?Symbol.for("react.suspense"):60113,d=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,v=n?Symbol.for("react.lazy"):60116,p=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,E=n?Symbol.for("react.responder"):60118,S=n?Symbol.for("react.scope"):60119;function x(_){if(typeof _=="object"&&_!==null){var P=_.$$typeof;switch(P){case e:switch(_=_.type,_){case u:case c:case r:case i:case s:case g:return _;default:switch(_=_&&_.$$typeof,_){case a:case h:case v:case m:case o:return _;default:return P}}case t:return P}}}function N(_){return x(_)===c}return we.AsyncMode=u,we.ConcurrentMode=c,we.ContextConsumer=a,we.ContextProvider=o,we.Element=e,we.ForwardRef=h,we.Fragment=r,we.Lazy=v,we.Memo=m,we.Portal=t,we.Profiler=i,we.StrictMode=s,we.Suspense=g,we.isAsyncMode=function(_){return N(_)||x(_)===u},we.isConcurrentMode=N,we.isContextConsumer=function(_){return x(_)===a},we.isContextProvider=function(_){return x(_)===o},we.isElement=function(_){return typeof _=="object"&&_!==null&&_.$$typeof===e},we.isForwardRef=function(_){return x(_)===h},we.isFragment=function(_){return x(_)===r},we.isLazy=function(_){return x(_)===v},we.isMemo=function(_){return x(_)===m},we.isPortal=function(_){return x(_)===t},we.isProfiler=function(_){return x(_)===i},we.isStrictMode=function(_){return x(_)===s},we.isSuspense=function(_){return x(_)===g},we.isValidElementType=function(_){return typeof _=="string"||typeof _=="function"||_===r||_===c||_===i||_===s||_===g||_===d||typeof _=="object"&&_!==null&&(_.$$typeof===v||_.$$typeof===m||_.$$typeof===o||_.$$typeof===a||_.$$typeof===h||_.$$typeof===y||_.$$typeof===E||_.$$typeof===S||_.$$typeof===p)},we.typeOf=x,we}var xe={};/** @license React v16.13.1
174
- * react-is.development.js
175
- *
176
- * Copyright (c) Facebook, Inc. and its affiliates.
177
- *
178
- * This source code is licensed under the MIT license found in the
179
- * LICENSE file in the root directory of this source tree.
180
- */var Uu;function rE(){return Uu||(Uu=1,process.env.NODE_ENV!=="production"&&(function(){var n=typeof Symbol=="function"&&Symbol.for,e=n?Symbol.for("react.element"):60103,t=n?Symbol.for("react.portal"):60106,r=n?Symbol.for("react.fragment"):60107,s=n?Symbol.for("react.strict_mode"):60108,i=n?Symbol.for("react.profiler"):60114,o=n?Symbol.for("react.provider"):60109,a=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,c=n?Symbol.for("react.concurrent_mode"):60111,h=n?Symbol.for("react.forward_ref"):60112,g=n?Symbol.for("react.suspense"):60113,d=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,v=n?Symbol.for("react.lazy"):60116,p=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,E=n?Symbol.for("react.responder"):60118,S=n?Symbol.for("react.scope"):60119;function x(k){return typeof k=="string"||typeof k=="function"||k===r||k===c||k===i||k===s||k===g||k===d||typeof k=="object"&&k!==null&&(k.$$typeof===v||k.$$typeof===m||k.$$typeof===o||k.$$typeof===a||k.$$typeof===h||k.$$typeof===y||k.$$typeof===E||k.$$typeof===S||k.$$typeof===p)}function N(k){if(typeof k=="object"&&k!==null){var ce=k.$$typeof;switch(ce){case e:var ge=k.type;switch(ge){case u:case c:case r:case i:case s:case g:return ge;default:var be=ge&&ge.$$typeof;switch(be){case a:case h:case v:case m:case o:return be;default:return ce}}case t:return ce}}}var _=u,P=c,I=a,te=o,ue=e,ie=h,b=r,M=v,A=m,$=t,V=i,R=s,q=g,W=!1;function Y(k){return W||(W=!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.")),T(k)||N(k)===u}function T(k){return N(k)===c}function D(k){return N(k)===a}function U(k){return N(k)===o}function K(k){return typeof k=="object"&&k!==null&&k.$$typeof===e}function z(k){return N(k)===h}function H(k){return N(k)===r}function Q(k){return N(k)===v}function F(k){return N(k)===m}function j(k){return N(k)===t}function Z(k){return N(k)===i}function G(k){return N(k)===s}function X(k){return N(k)===g}xe.AsyncMode=_,xe.ConcurrentMode=P,xe.ContextConsumer=I,xe.ContextProvider=te,xe.Element=ue,xe.ForwardRef=ie,xe.Fragment=b,xe.Lazy=M,xe.Memo=A,xe.Portal=$,xe.Profiler=V,xe.StrictMode=R,xe.Suspense=q,xe.isAsyncMode=Y,xe.isConcurrentMode=T,xe.isContextConsumer=D,xe.isContextProvider=U,xe.isElement=K,xe.isForwardRef=z,xe.isFragment=H,xe.isLazy=Q,xe.isMemo=F,xe.isPortal=j,xe.isProfiler=Z,xe.isStrictMode=G,xe.isSuspense=X,xe.isValidElementType=x,xe.typeOf=N})()),xe}var Hu;function cd(){return Hu||(Hu=1,process.env.NODE_ENV==="production"?Bs.exports=tE():Bs.exports=rE()),Bs.exports}/*
181
- object-assign
182
- (c) Sindre Sorhus
183
- @license MIT
184
- */var $o,zu;function nE(){if(zu)return $o;zu=1;var n=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,t=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 s(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var o={},a=0;a<10;a++)o["_"+String.fromCharCode(a)]=a;var u=Object.getOwnPropertyNames(o).map(function(h){return o[h]});if(u.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(h){c[h]=h}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return $o=s()?Object.assign:function(i,o){for(var a,u=r(i),c,h=1;h<arguments.length;h++){a=Object(arguments[h]);for(var g in a)e.call(a,g)&&(u[g]=a[g]);if(n){c=n(a);for(var d=0;d<c.length;d++)t.call(a,c[d])&&(u[c[d]]=a[c[d]])}}return u},$o}var Vo,Gu;function ll(){if(Gu)return Vo;Gu=1;var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Vo=n,Vo}var Uo,Ku;function hd(){return Ku||(Ku=1,Uo=Function.call.bind(Object.prototype.hasOwnProperty)),Uo}var Ho,Wu;function sE(){if(Wu)return Ho;Wu=1;var n=function(){};if(process.env.NODE_ENV!=="production"){var e=ll(),t={},r=hd();n=function(i){var o="Warning: "+i;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function s(i,o,a,u,c){if(process.env.NODE_ENV!=="production"){for(var h in i)if(r(i,h)){var g;try{if(typeof i[h]!="function"){var d=Error((u||"React class")+": "+a+" type `"+h+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[h]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}g=i[h](o,h,u,a,null,e)}catch(v){g=v}if(g&&!(g instanceof Error)&&n((u||"React class")+": type specification of "+a+" `"+h+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof g+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),g instanceof Error&&!(g.message in t)){t[g.message]=!0;var m=c?c():"";n("Failed "+a+" type: "+g.message+(m??""))}}}}return s.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(t={})},Ho=s,Ho}var zo,Yu;function iE(){if(Yu)return zo;Yu=1;var n=cd(),e=nE(),t=ll(),r=hd(),s=sE(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(a){var u="Warning: "+a;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function o(){return null}return zo=function(a,u){var c=typeof Symbol=="function"&&Symbol.iterator,h="@@iterator";function g(T){var D=T&&(c&&T[c]||T[h]);if(typeof D=="function")return D}var d="<<anonymous>>",m={array:E("array"),bigint:E("bigint"),bool:E("boolean"),func:E("function"),number:E("number"),object:E("object"),string:E("string"),symbol:E("symbol"),any:S(),arrayOf:x,element:N(),elementType:_(),instanceOf:P,node:ie(),objectOf:te,oneOf:I,oneOfType:ue,shape:M,exact:A};function v(T,D){return T===D?T!==0||1/T===1/D:T!==T&&D!==D}function p(T,D){this.message=T,this.data=D&&typeof D=="object"?D:{},this.stack=""}p.prototype=Error.prototype;function y(T){if(process.env.NODE_ENV!=="production")var D={},U=0;function K(H,Q,F,j,Z,G,X){if(j=j||d,G=G||F,X!==t){if(u){var k=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 k.name="Invariant Violation",k}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ce=j+":"+F;!D[ce]&&U<3&&(i("You are manually calling a React.PropTypes validation function for the `"+G+"` prop on `"+j+"`. 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."),D[ce]=!0,U++)}}return Q[F]==null?H?Q[F]===null?new p("The "+Z+" `"+G+"` is marked as required "+("in `"+j+"`, but its value is `null`.")):new p("The "+Z+" `"+G+"` is marked as required in "+("`"+j+"`, but its value is `undefined`.")):null:T(Q,F,j,Z,G)}var z=K.bind(null,!1);return z.isRequired=K.bind(null,!0),z}function E(T){function D(U,K,z,H,Q,F){var j=U[K],Z=R(j);if(Z!==T){var G=q(j);return new p("Invalid "+H+" `"+Q+"` of type "+("`"+G+"` supplied to `"+z+"`, expected ")+("`"+T+"`."),{expectedType:T})}return null}return y(D)}function S(){return y(o)}function x(T){function D(U,K,z,H,Q){if(typeof T!="function")return new p("Property `"+Q+"` of component `"+z+"` has invalid PropType notation inside arrayOf.");var F=U[K];if(!Array.isArray(F)){var j=R(F);return new p("Invalid "+H+" `"+Q+"` of type "+("`"+j+"` supplied to `"+z+"`, expected an array."))}for(var Z=0;Z<F.length;Z++){var G=T(F,Z,z,H,Q+"["+Z+"]",t);if(G instanceof Error)return G}return null}return y(D)}function N(){function T(D,U,K,z,H){var Q=D[U];if(!a(Q)){var F=R(Q);return new p("Invalid "+z+" `"+H+"` of type "+("`"+F+"` supplied to `"+K+"`, expected a single ReactElement."))}return null}return y(T)}function _(){function T(D,U,K,z,H){var Q=D[U];if(!n.isValidElementType(Q)){var F=R(Q);return new p("Invalid "+z+" `"+H+"` of type "+("`"+F+"` supplied to `"+K+"`, expected a single ReactElement type."))}return null}return y(T)}function P(T){function D(U,K,z,H,Q){if(!(U[K]instanceof T)){var F=T.name||d,j=Y(U[K]);return new p("Invalid "+H+" `"+Q+"` of type "+("`"+j+"` supplied to `"+z+"`, expected ")+("instance of `"+F+"`."))}return null}return y(D)}function I(T){if(!Array.isArray(T))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.")),o;function D(U,K,z,H,Q){for(var F=U[K],j=0;j<T.length;j++)if(v(F,T[j]))return null;var Z=JSON.stringify(T,function(X,k){var ce=q(k);return ce==="symbol"?String(k):k});return new p("Invalid "+H+" `"+Q+"` of value `"+String(F)+"` "+("supplied to `"+z+"`, expected one of "+Z+"."))}return y(D)}function te(T){function D(U,K,z,H,Q){if(typeof T!="function")return new p("Property `"+Q+"` of component `"+z+"` has invalid PropType notation inside objectOf.");var F=U[K],j=R(F);if(j!=="object")return new p("Invalid "+H+" `"+Q+"` of type "+("`"+j+"` supplied to `"+z+"`, expected an object."));for(var Z in F)if(r(F,Z)){var G=T(F,Z,z,H,Q+"."+Z,t);if(G instanceof Error)return G}return null}return y(D)}function ue(T){if(!Array.isArray(T))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var D=0;D<T.length;D++){var U=T[D];if(typeof U!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+W(U)+" at index "+D+"."),o}function K(z,H,Q,F,j){for(var Z=[],G=0;G<T.length;G++){var X=T[G],k=X(z,H,Q,F,j,t);if(k==null)return null;k.data&&r(k.data,"expectedType")&&Z.push(k.data.expectedType)}var ce=Z.length>0?", expected one of type ["+Z.join(", ")+"]":"";return new p("Invalid "+F+" `"+j+"` supplied to "+("`"+Q+"`"+ce+"."))}return y(K)}function ie(){function T(D,U,K,z,H){return $(D[U])?null:new p("Invalid "+z+" `"+H+"` supplied to "+("`"+K+"`, expected a ReactNode."))}return y(T)}function b(T,D,U,K,z){return new p((T||"React class")+": "+D+" type `"+U+"."+K+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+z+"`.")}function M(T){function D(U,K,z,H,Q){var F=U[K],j=R(F);if(j!=="object")return new p("Invalid "+H+" `"+Q+"` of type `"+j+"` "+("supplied to `"+z+"`, expected `object`."));for(var Z in T){var G=T[Z];if(typeof G!="function")return b(z,H,Q,Z,q(G));var X=G(F,Z,z,H,Q+"."+Z,t);if(X)return X}return null}return y(D)}function A(T){function D(U,K,z,H,Q){var F=U[K],j=R(F);if(j!=="object")return new p("Invalid "+H+" `"+Q+"` of type `"+j+"` "+("supplied to `"+z+"`, expected `object`."));var Z=e({},U[K],T);for(var G in Z){var X=T[G];if(r(T,G)&&typeof X!="function")return b(z,H,Q,G,q(X));if(!X)return new p("Invalid "+H+" `"+Q+"` key `"+G+"` supplied to `"+z+"`.\nBad object: "+JSON.stringify(U[K],null," ")+`
185
- Valid keys: `+JSON.stringify(Object.keys(T),null," "));var k=X(F,G,z,H,Q+"."+G,t);if(k)return k}return null}return y(D)}function $(T){switch(typeof T){case"number":case"string":case"undefined":return!0;case"boolean":return!T;case"object":if(Array.isArray(T))return T.every($);if(T===null||a(T))return!0;var D=g(T);if(D){var U=D.call(T),K;if(D!==T.entries){for(;!(K=U.next()).done;)if(!$(K.value))return!1}else for(;!(K=U.next()).done;){var z=K.value;if(z&&!$(z[1]))return!1}}else return!1;return!0;default:return!1}}function V(T,D){return T==="symbol"?!0:D?D["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&D instanceof Symbol:!1}function R(T){var D=typeof T;return Array.isArray(T)?"array":T instanceof RegExp?"object":V(D,T)?"symbol":D}function q(T){if(typeof T>"u"||T===null)return""+T;var D=R(T);if(D==="object"){if(T instanceof Date)return"date";if(T instanceof RegExp)return"regexp"}return D}function W(T){var D=q(T);switch(D){case"array":case"object":return"an "+D;case"boolean":case"date":case"regexp":return"a "+D;default:return D}}function Y(T){return!T.constructor||!T.constructor.name?d:T.constructor.name}return m.checkPropTypes=s,m.resetWarningCache=s.resetWarningCache,m.PropTypes=m,m},zo}var Go,Zu;function oE(){if(Zu)return Go;Zu=1;var n=ll();function e(){}function t(){}return t.resetWarningCache=e,Go=function(){function r(o,a,u,c,h,g){if(g!==n){var d=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 d.name="Invariant Violation",d}}r.isRequired=r;function s(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:s,element:r,elementType:r,instanceOf:s,node:r,objectOf:s,oneOf:s,oneOfType:s,shape:s,exact:s,checkPropTypes:t,resetWarningCache:e};return i.PropTypes=i,i},Go}var Xu;function aE(){if(Xu)return Ps.exports;if(Xu=1,process.env.NODE_ENV!=="production"){var n=cd(),e=!0;Ps.exports=iE()(n.isElement,e)}else Ps.exports=oE()();return Ps.exports}var lE=aE();const se=ct.getDefaultExportFromCjs(lE),dd={mask:se.oneOfType([se.array,se.func,se.string,se.instanceOf(RegExp),se.oneOf([Date,Number,he.Masked]),se.instanceOf(he.Masked)]),value:se.any,unmask:se.oneOfType([se.bool,se.oneOf(["typed"])]),prepare:se.func,prepareChar:se.func,validate:se.func,commit:se.func,overwrite:se.oneOfType([se.bool,se.oneOf(["shift"])]),eager:se.oneOfType([se.bool,se.oneOf(["append","remove"])]),skipInvalid:se.bool,onAccept:se.func,onComplete:se.func,placeholderChar:se.string,displayChar:se.string,lazy:se.bool,definitions:se.object,blocks:se.object,enum:se.arrayOf(se.string),maxLength:se.number,from:se.number,to:se.number,pattern:se.string,format:se.func,parse:se.func,autofix:se.oneOfType([se.bool,se.oneOf(["pad"])]),radix:se.string,thousandsSeparator:se.string,mapToRadix:se.arrayOf(se.string),scale:se.number,normalizeZeros:se.bool,padFractionalZeros:se.bool,min:se.oneOfType([se.number,se.instanceOf(Date)]),max:se.oneOfType([se.number,se.instanceOf(Date)]),dispatch:se.func,inputRef:se.oneOfType([se.func,se.shape({current:se.object})])},fd=Object.keys(dd).filter(n=>n!=="value"),uE=["value","unmask","onAccept","onComplete","inputRef"],cE=fd.filter(n=>uE.indexOf(n)<0);function hE(n){var e;const t=(e=class extends C.default.Component{constructor(i){super(i),this._inputRef=this._inputRef.bind(this)}componentDidMount(){this.props.mask&&this.initMask()}componentDidUpdate(){const i=this.props,o=this._extractMaskOptionsFromProps(i);if(o.mask)this.maskRef?(this.maskRef.updateOptions(o),"value"in i&&i.value!==void 0&&(this.maskValue=i.value)):this.initMask(o);else if(this.destroyMask(),"value"in i&&i.value!==void 0){var a;(a=this.element)!=null&&a.isContentEditable&&this.element.tagName!=="INPUT"&&this.element.tagName!=="TEXTAREA"?this.element.textContent=i.value:this.element.value=i.value}}componentWillUnmount(){this.destroyMask()}_inputRef(i){this.element=i,this.props.inputRef&&(Object.prototype.hasOwnProperty.call(this.props.inputRef,"current")?this.props.inputRef.current=i:this.props.inputRef(i))}initMask(i){i===void 0&&(i=this._extractMaskOptionsFromProps(this.props)),this.maskRef=he(this.element,i).on("accept",this._onAccept.bind(this)).on("complete",this._onComplete.bind(this)),"value"in this.props&&this.props.value!==void 0&&(this.maskValue=this.props.value)}destroyMask(){this.maskRef&&(this.maskRef.destroy(),delete this.maskRef)}_extractMaskOptionsFromProps(i){const{...o}=i;return Object.keys(o).filter(a=>cE.indexOf(a)<0).forEach(a=>{delete o[a]}),o}_extractNonMaskProps(i){const{...o}=i;return fd.forEach(a=>{a!=="maxLength"&&delete o[a]}),"defaultValue"in o||(o.defaultValue=i.mask?"":o.value),delete o.value,o}get maskValue(){return this.maskRef?this.props.unmask==="typed"?this.maskRef.typedValue:this.props.unmask?this.maskRef.unmaskedValue:this.maskRef.value:""}set maskValue(i){this.maskRef&&(i=i==null&&this.props.unmask!=="typed"?"":i,this.props.unmask==="typed"?this.maskRef.typedValue=i:this.props.unmask?this.maskRef.unmaskedValue=i:this.maskRef.value=i)}_onAccept(i){this.props.onAccept&&this.maskRef&&this.props.onAccept(this.maskValue,this.maskRef,i)}_onComplete(i){this.props.onComplete&&this.maskRef&&this.props.onComplete(this.maskValue,this.maskRef,i)}render(){return C.default.createElement(n,{...this._extractNonMaskProps(this.props),inputRef:this._inputRef})}},e.displayName=void 0,e.propTypes=void 0,e),r=n.displayName||n.name||"Component";return t.displayName="IMask("+r+")",t.propTypes=dd,C.default.forwardRef((s,i)=>C.default.createElement(t,{...s,ref:i}))}const dE=hE(n=>{let{inputRef:e,...t}=n;return C.default.createElement("input",{...t,ref:e})}),fE=(n,e)=>C.default.createElement(dE,{...n,ref:e}),pE=C.default.forwardRef(fE),pd=Ke.forwardRef(({className:n,type:e,variant:t,...r},s)=>O.jsx(pE,{className:Ce.cn(_i({variant:t}),n),ref:s,...r}));pd.displayName="MaskInput";var ul="Radio",[gE,gd]=le.createContextScope(ul),[mE,vE]=gE(ul),md=C.forwardRef((n,e)=>{const{__scopeRadio:t,name:r,checked:s=!1,required:i,disabled:o,value:a="on",onCheck:u,form:c,...h}=n,[g,d]=C.useState(null),m=Oe.useComposedRefs(e,y=>d(y)),v=C.useRef(!1),p=g?c||!!g.closest("form"):!0;return O.jsxs(mE,{scope:t,checked:s,disabled:o,children:[O.jsx(le.Primitive.button,{type:"button",role:"radio","aria-checked":s,"data-state":Ed(s),"data-disabled":o?"":void 0,disabled:o,value:a,...h,ref:m,onClick:le.composeEventHandlers(n.onClick,y=>{s||u==null||u(),p&&(v.current=y.isPropagationStopped(),v.current||y.stopPropagation())})}),p&&O.jsx(bd,{control:g,bubbles:!v.current,name:r,value:a,checked:s,required:i,disabled:o,form:c,style:{transform:"translateX(-100%)"}})]})});md.displayName=ul;var vd="RadioIndicator",yd=C.forwardRef((n,e)=>{const{__scopeRadio:t,forceMount:r,...s}=n,i=vE(vd,t);return O.jsx(le.Presence,{present:r||i.checked,children:O.jsx(le.Primitive.span,{"data-state":Ed(i.checked),"data-disabled":i.disabled?"":void 0,...s,ref:e})})});yd.displayName=vd;var yE="RadioBubbleInput",bd=C.forwardRef(({__scopeRadio:n,control:e,checked:t,bubbles:r=!0,...s},i)=>{const o=C.useRef(null),a=Oe.useComposedRefs(o,i),u=ai(t),c=jt.useSize(e);return C.useEffect(()=>{const h=o.current;if(!h)return;const g=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(g,"checked").set;if(u!==t&&m){const v=new Event("click",{bubbles:r});m.call(h,t),h.dispatchEvent(v)}},[u,t,r]),O.jsx(le.Primitive.input,{type:"radio","aria-hidden":!0,defaultChecked:t,...s,tabIndex:-1,ref:a,style:{...s.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});bd.displayName=yE;function Ed(n){return n?"checked":"unchecked"}var bE=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Ni="RadioGroup",[EE]=le.createContextScope(Ni,[oi.createRovingFocusGroupScope,gd]),wd=oi.createRovingFocusGroupScope(),xd=gd(),[wE,xE]=EE(Ni),Sd=C.forwardRef((n,e)=>{const{__scopeRadioGroup:t,name:r,defaultValue:s,value:i,required:o=!1,disabled:a=!1,orientation:u,dir:c,loop:h=!0,onValueChange:g,...d}=n,m=wd(t),v=sc.useDirection(c),[p,y]=Qt.useControllableState({prop:i,defaultProp:s??null,onChange:g,caller:Ni});return O.jsx(wE,{scope:t,name:r,required:o,disabled:a,value:p,onValueChange:y,children:O.jsx(oi.Root,{asChild:!0,...m,orientation:u,dir:v,loop:h,children:O.jsx(le.Primitive.div,{role:"radiogroup","aria-required":o,"aria-orientation":u,"data-disabled":a?"":void 0,dir:v,...d,ref:e})})})});Sd.displayName=Ni;var _d="RadioGroupItem",Ad=C.forwardRef((n,e)=>{const{__scopeRadioGroup:t,disabled:r,...s}=n,i=xE(_d,t),o=i.disabled||r,a=wd(t),u=xd(t),c=C.useRef(null),h=Oe.useComposedRefs(e,c),g=i.value===s.value,d=C.useRef(!1);return C.useEffect(()=>{const m=p=>{bE.includes(p.key)&&(d.current=!0)},v=()=>d.current=!1;return document.addEventListener("keydown",m),document.addEventListener("keyup",v),()=>{document.removeEventListener("keydown",m),document.removeEventListener("keyup",v)}},[]),O.jsx(oi.Item,{asChild:!0,...a,focusable:!o,active:g,children:O.jsx(md,{disabled:o,required:i.required,checked:g,...u,...s,name:i.name,ref:h,onCheck:()=>i.onValueChange(s.value),onKeyDown:le.composeEventHandlers(m=>{m.key==="Enter"&&m.preventDefault()}),onFocus:le.composeEventHandlers(s.onFocus,()=>{var m;d.current&&((m=c.current)==null||m.click())})})})});Ad.displayName=_d;var SE="RadioGroupIndicator",Cd=C.forwardRef((n,e)=>{const{__scopeRadioGroup:t,...r}=n,s=xd(t);return O.jsx(yd,{...s,...r,ref:e})});Cd.displayName=SE;var Td=Sd,kd=Ad,_E=Cd;const Nd=C.forwardRef(({className:n,...e},t)=>O.jsx(Td,{className:Ce.cn("grid gap-2",n),...e,ref:t}));Nd.displayName=Td.displayName;const Id=C.forwardRef(({className:n,...e},t)=>O.jsx(kd,{ref:t,className:Ce.cn("border-border-alpha-strong text-item-primary ring-offset-background focus-visible:ring-ring aspect-square size-4 rounded-full border focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",n),...e,children:O.jsx(_E,{className:"flex items-center justify-center",children:O.jsx(ic.Circle,{className:"size-2.5 fill-current text-current"})})}));Id.displayName=kd.displayName;function AE(n){const e=CE(n),t=C.forwardRef((r,s)=>{const{children:i,...o}=r,a=C.Children.toArray(i),u=a.find(kE);if(u){const c=u.props.children,h=a.map(g=>g===u?C.Children.count(c)>1?C.Children.only(null):C.isValidElement(c)?c.props.children:null:g);return O.jsx(e,{...o,ref:s,children:C.isValidElement(c)?C.cloneElement(c,void 0,h):null})}return O.jsx(e,{...o,ref:s,children:i})});return t.displayName=`${n}.Slot`,t}function CE(n){const e=C.forwardRef((t,r)=>{const{children:s,...i}=t;if(C.isValidElement(s)){const o=IE(s),a=NE(i,s.props);return s.type!==C.Fragment&&(a.ref=r?Oe.composeRefs(r,o):o),C.cloneElement(s,a)}return C.Children.count(s)>1?C.Children.only(null):null});return e.displayName=`${n}.SlotClone`,e}var TE=Symbol("radix.slottable");function kE(n){return C.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===TE}function NE(n,e){const t={...e};for(const r in e){const s=n[r],i=e[r];/^on[A-Z]/.test(r)?s&&i?t[r]=(...a)=>{const u=i(...a);return s(...a),u}:s&&(t[r]=s):r==="style"?t[r]={...s,...i}:r==="className"&&(t[r]=[s,i].filter(Boolean).join(" "))}return{...n,...t}}function IE(n){var r,s;let e=(r=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:r.get,t=e&&"isReactWarning"in e&&e.isReactWarning;return t?n.ref:(e=(s=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:s.get,t=e&&"isReactWarning"in e&&e.isReactWarning,t?n.props.ref:n.props.ref||n.ref)}var RE=[" ","Enter","ArrowUp","ArrowDown"],OE=[" ","Enter"],Ar="Select",[Ii,Ri,LE]=Nf.createCollection(Ar),[mn]=le.createContextScope(Ar,[LE,jt.createPopperScope]),Oi=jt.createPopperScope(),[ME,or]=mn(Ar),[DE,PE]=mn(Ar),Rd=n=>{const{__scopeSelect:e,children:t,open:r,defaultOpen:s,onOpenChange:i,value:o,defaultValue:a,onValueChange:u,dir:c,name:h,autoComplete:g,disabled:d,required:m,form:v}=n,p=Oi(e),[y,E]=C.useState(null),[S,x]=C.useState(null),[N,_]=C.useState(!1),P=sc.useDirection(c),[I,te]=Qt.useControllableState({prop:r,defaultProp:s??!1,onChange:i,caller:Ar}),[ue,ie]=Qt.useControllableState({prop:o,defaultProp:a,onChange:u,caller:Ar}),b=C.useRef(null),M=y?v||!!y.closest("form"):!0,[A,$]=C.useState(new Set),V=Array.from(A).map(R=>R.props.value).join(";");return O.jsx(jt.Root2,{...p,children:O.jsxs(ME,{required:m,scope:e,trigger:y,onTriggerChange:E,valueNode:S,onValueNodeChange:x,valueNodeHasChildren:N,onValueNodeHasChildrenChange:_,contentId:Qt.useId(),value:ue,onValueChange:ie,open:I,onOpenChange:te,dir:P,triggerPointerDownPosRef:b,disabled:d,children:[O.jsx(Ii.Provider,{scope:e,children:O.jsx(DE,{scope:n.__scopeSelect,onNativeOptionAdd:C.useCallback(R=>{$(q=>new Set(q).add(R))},[]),onNativeOptionRemove:C.useCallback(R=>{$(q=>{const W=new Set(q);return W.delete(R),W})},[]),children:t})}),M?O.jsxs(rf,{"aria-hidden":!0,required:m,tabIndex:-1,name:h,autoComplete:g,value:ue,onChange:R=>ie(R.target.value),disabled:d,form:v,children:[ue===void 0?O.jsx("option",{value:""}):null,Array.from(A)]},V):null]})})};Rd.displayName=Ar;var Od="SelectTrigger",Ld=C.forwardRef((n,e)=>{const{__scopeSelect:t,disabled:r=!1,...s}=n,i=Oi(t),o=or(Od,t),a=o.disabled||r,u=Oe.useComposedRefs(e,o.onTriggerChange),c=Ri(t),h=C.useRef("touch"),[g,d,m]=sf(p=>{const y=c().filter(x=>!x.disabled),E=y.find(x=>x.value===o.value),S=of(y,p,E);S!==void 0&&o.onValueChange(S.value)}),v=p=>{a||(o.onOpenChange(!0),m()),p&&(o.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return O.jsx(jt.Anchor,{asChild:!0,...i,children:O.jsx(le.Primitive.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":nf(o.value)?"":void 0,...s,ref:u,onClick:le.composeEventHandlers(s.onClick,p=>{p.currentTarget.focus(),h.current!=="mouse"&&v(p)}),onPointerDown:le.composeEventHandlers(s.onPointerDown,p=>{h.current=p.pointerType;const y=p.target;y.hasPointerCapture(p.pointerId)&&y.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(v(p),p.preventDefault())}),onKeyDown:le.composeEventHandlers(s.onKeyDown,p=>{const y=g.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&d(p.key),!(y&&p.key===" ")&&RE.includes(p.key)&&(v(),p.preventDefault())})})})});Ld.displayName=Od;var Md="SelectValue",Dd=C.forwardRef((n,e)=>{const{__scopeSelect:t,className:r,style:s,children:i,placeholder:o="",...a}=n,u=or(Md,t),{onValueNodeHasChildrenChange:c}=u,h=i!==void 0,g=Oe.useComposedRefs(e,u.onValueNodeChange);return rr.useLayoutEffect2(()=>{c(h)},[c,h]),O.jsx(le.Primitive.span,{...a,ref:g,style:{pointerEvents:"none"},children:nf(u.value)?O.jsx(O.Fragment,{children:o}):i})});Dd.displayName=Md;var BE="SelectIcon",Pd=C.forwardRef((n,e)=>{const{__scopeSelect:t,children:r,...s}=n;return O.jsx(le.Primitive.span,{"aria-hidden":!0,...s,ref:e,children:r||"▼"})});Pd.displayName=BE;var qE="SelectPortal",Bd=n=>O.jsx(Te.Portal,{asChild:!0,...n});Bd.displayName=qE;var Cr="SelectContent",qd=C.forwardRef((n,e)=>{const t=or(Cr,n.__scopeSelect),[r,s]=C.useState();if(rr.useLayoutEffect2(()=>{s(new DocumentFragment)},[]),!t.open){const i=r;return i?lc.createPortal(O.jsx(Fd,{scope:n.__scopeSelect,children:O.jsx(Ii.Slot,{scope:n.__scopeSelect,children:O.jsx("div",{children:n.children})})}),i):null}return O.jsx(jd,{...n,ref:e})});qd.displayName=Cr;var it=10,[Fd,ar]=mn(Cr),FE="SelectContentImpl",jE=AE("SelectContent.RemoveScroll"),jd=C.forwardRef((n,e)=>{const{__scopeSelect:t,position:r="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:i,onPointerDownOutside:o,side:a,sideOffset:u,align:c,alignOffset:h,arrowPadding:g,collisionBoundary:d,collisionPadding:m,sticky:v,hideWhenDetached:p,avoidCollisions:y,...E}=n,S=or(Cr,t),[x,N]=C.useState(null),[_,P]=C.useState(null),I=Oe.useComposedRefs(e,F=>N(F)),[te,ue]=C.useState(null),[ie,b]=C.useState(null),M=Ri(t),[A,$]=C.useState(!1),V=C.useRef(!1);C.useEffect(()=>{if(x)return Te.hideOthers(x)},[x]),Te.useFocusGuards();const R=C.useCallback(F=>{const[j,...Z]=M().map(k=>k.ref.current),[G]=Z.slice(-1),X=document.activeElement;for(const k of F)if(k===X||(k==null||k.scrollIntoView({block:"nearest"}),k===j&&_&&(_.scrollTop=0),k===G&&_&&(_.scrollTop=_.scrollHeight),k==null||k.focus(),document.activeElement!==X))return},[M,_]),q=C.useCallback(()=>R([te,x]),[R,te,x]);C.useEffect(()=>{A&&q()},[A,q]);const{onOpenChange:W,triggerPointerDownPosRef:Y}=S;C.useEffect(()=>{if(x){let F={x:0,y:0};const j=G=>{var X,k;F={x:Math.abs(Math.round(G.pageX)-(((X=Y.current)==null?void 0:X.x)??0)),y:Math.abs(Math.round(G.pageY)-(((k=Y.current)==null?void 0:k.y)??0))}},Z=G=>{F.x<=10&&F.y<=10?G.preventDefault():x.contains(G.target)||W(!1),document.removeEventListener("pointermove",j),Y.current=null};return Y.current!==null&&(document.addEventListener("pointermove",j),document.addEventListener("pointerup",Z,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",j),document.removeEventListener("pointerup",Z,{capture:!0})}}},[x,W,Y]),C.useEffect(()=>{const F=()=>W(!1);return window.addEventListener("blur",F),window.addEventListener("resize",F),()=>{window.removeEventListener("blur",F),window.removeEventListener("resize",F)}},[W]);const[T,D]=sf(F=>{const j=M().filter(X=>!X.disabled),Z=j.find(X=>X.ref.current===document.activeElement),G=of(j,F,Z);G&&setTimeout(()=>G.ref.current.focus())}),U=C.useCallback((F,j,Z)=>{const G=!V.current&&!Z;(S.value!==void 0&&S.value===j||G)&&(ue(F),G&&(V.current=!0))},[S.value]),K=C.useCallback(()=>x==null?void 0:x.focus(),[x]),z=C.useCallback((F,j,Z)=>{const G=!V.current&&!Z;(S.value!==void 0&&S.value===j||G)&&b(F)},[S.value]),H=r==="popper"?Ta:$d,Q=H===Ta?{side:a,sideOffset:u,align:c,alignOffset:h,arrowPadding:g,collisionBoundary:d,collisionPadding:m,sticky:v,hideWhenDetached:p,avoidCollisions:y}:{};return O.jsx(Fd,{scope:t,content:x,viewport:_,onViewportChange:P,itemRefCallback:U,selectedItem:te,onItemLeave:K,itemTextRefCallback:z,focusSelectedItem:q,selectedItemText:ie,position:r,isPositioned:A,searchRef:T,children:O.jsx(Te.ReactRemoveScroll,{as:jE,allowPinchZoom:!0,children:O.jsx(Te.FocusScope,{asChild:!0,trapped:S.open,onMountAutoFocus:F=>{F.preventDefault()},onUnmountAutoFocus:le.composeEventHandlers(s,F=>{var j;(j=S.trigger)==null||j.focus({preventScroll:!0}),F.preventDefault()}),children:O.jsx(If.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:F=>F.preventDefault(),onDismiss:()=>S.onOpenChange(!1),children:O.jsx(H,{role:"listbox",id:S.contentId,"data-state":S.open?"open":"closed",dir:S.dir,onContextMenu:F=>F.preventDefault(),...E,...Q,onPlaced:()=>$(!0),ref:I,style:{display:"flex",flexDirection:"column",outline:"none",...E.style},onKeyDown:le.composeEventHandlers(E.onKeyDown,F=>{const j=F.ctrlKey||F.altKey||F.metaKey;if(F.key==="Tab"&&F.preventDefault(),!j&&F.key.length===1&&D(F.key),["ArrowUp","ArrowDown","Home","End"].includes(F.key)){let G=M().filter(X=>!X.disabled).map(X=>X.ref.current);if(["ArrowUp","End"].includes(F.key)&&(G=G.slice().reverse()),["ArrowUp","ArrowDown"].includes(F.key)){const X=F.target,k=G.indexOf(X);G=G.slice(k+1)}setTimeout(()=>R(G)),F.preventDefault()}})})})})})})});jd.displayName=FE;var $E="SelectItemAlignedPosition",$d=C.forwardRef((n,e)=>{const{__scopeSelect:t,onPlaced:r,...s}=n,i=or(Cr,t),o=ar(Cr,t),[a,u]=C.useState(null),[c,h]=C.useState(null),g=Oe.useComposedRefs(e,I=>h(I)),d=Ri(t),m=C.useRef(!1),v=C.useRef(!0),{viewport:p,selectedItem:y,selectedItemText:E,focusSelectedItem:S}=o,x=C.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&c&&p&&y&&E){const I=i.trigger.getBoundingClientRect(),te=c.getBoundingClientRect(),ue=i.valueNode.getBoundingClientRect(),ie=E.getBoundingClientRect();if(i.dir!=="rtl"){const X=ie.left-te.left,k=ue.left-X,ce=I.left-k,ge=I.width+ce,be=Math.max(ge,te.width),kt=window.innerWidth-it,Ut=ml.clamp(k,[it,Math.max(it,kt-be)]);a.style.minWidth=ge+"px",a.style.left=Ut+"px"}else{const X=te.right-ie.right,k=window.innerWidth-ue.right-X,ce=window.innerWidth-I.right-k,ge=I.width+ce,be=Math.max(ge,te.width),kt=window.innerWidth-it,Ut=ml.clamp(k,[it,Math.max(it,kt-be)]);a.style.minWidth=ge+"px",a.style.right=Ut+"px"}const b=d(),M=window.innerHeight-it*2,A=p.scrollHeight,$=window.getComputedStyle(c),V=parseInt($.borderTopWidth,10),R=parseInt($.paddingTop,10),q=parseInt($.borderBottomWidth,10),W=parseInt($.paddingBottom,10),Y=V+R+A+W+q,T=Math.min(y.offsetHeight*5,Y),D=window.getComputedStyle(p),U=parseInt(D.paddingTop,10),K=parseInt(D.paddingBottom,10),z=I.top+I.height/2-it,H=M-z,Q=y.offsetHeight/2,F=y.offsetTop+Q,j=V+R+F,Z=Y-j;if(j<=z){const X=b.length>0&&y===b[b.length-1].ref.current;a.style.bottom="0px";const k=c.clientHeight-p.offsetTop-p.offsetHeight,ce=Math.max(H,Q+(X?K:0)+k+q),ge=j+ce;a.style.height=ge+"px"}else{const X=b.length>0&&y===b[0].ref.current;a.style.top="0px";const ce=Math.max(z,V+p.offsetTop+(X?U:0)+Q)+Z;a.style.height=ce+"px",p.scrollTop=j-z+p.offsetTop}a.style.margin=`${it}px 0`,a.style.minHeight=T+"px",a.style.maxHeight=M+"px",r==null||r(),requestAnimationFrame(()=>m.current=!0)}},[d,i.trigger,i.valueNode,a,c,p,y,E,i.dir,r]);rr.useLayoutEffect2(()=>x(),[x]);const[N,_]=C.useState();rr.useLayoutEffect2(()=>{c&&_(window.getComputedStyle(c).zIndex)},[c]);const P=C.useCallback(I=>{I&&v.current===!0&&(x(),S==null||S(),v.current=!1)},[x,S]);return O.jsx(UE,{scope:t,contentWrapper:a,shouldExpandOnScrollRef:m,onScrollButtonChange:P,children:O.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:N},children:O.jsx(le.Primitive.div,{...s,ref:g,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});$d.displayName=$E;var VE="SelectPopperPosition",Ta=C.forwardRef((n,e)=>{const{__scopeSelect:t,align:r="start",collisionPadding:s=it,...i}=n,o=Oi(t);return O.jsx(jt.Content,{...o,...i,ref:e,align:r,collisionPadding:s,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Ta.displayName=VE;var[UE,cl]=mn(Cr,{}),ka="SelectViewport",Vd=C.forwardRef((n,e)=>{const{__scopeSelect:t,nonce:r,...s}=n,i=ar(ka,t),o=cl(ka,t),a=Oe.useComposedRefs(e,i.onViewportChange),u=C.useRef(0);return O.jsxs(O.Fragment,{children:[O.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),O.jsx(Ii.Slot,{scope:t,children:O.jsx(le.Primitive.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:le.composeEventHandlers(s.onScroll,c=>{const h=c.currentTarget,{contentWrapper:g,shouldExpandOnScrollRef:d}=o;if(d!=null&&d.current&&g){const m=Math.abs(u.current-h.scrollTop);if(m>0){const v=window.innerHeight-it*2,p=parseFloat(g.style.minHeight),y=parseFloat(g.style.height),E=Math.max(p,y);if(E<v){const S=E+m,x=Math.min(v,S),N=S-x;g.style.height=x+"px",g.style.bottom==="0px"&&(h.scrollTop=N>0?N:0,g.style.justifyContent="flex-end")}}}u.current=h.scrollTop})})})]})});Vd.displayName=ka;var Ud="SelectGroup",[HE,zE]=mn(Ud),Hd=C.forwardRef((n,e)=>{const{__scopeSelect:t,...r}=n,s=Qt.useId();return O.jsx(HE,{scope:t,id:s,children:O.jsx(le.Primitive.div,{role:"group","aria-labelledby":s,...r,ref:e})})});Hd.displayName=Ud;var zd="SelectLabel",Gd=C.forwardRef((n,e)=>{const{__scopeSelect:t,...r}=n,s=zE(zd,t);return O.jsx(le.Primitive.div,{id:s.id,...r,ref:e})});Gd.displayName=zd;var ii="SelectItem",[GE,Kd]=mn(ii),Wd=C.forwardRef((n,e)=>{const{__scopeSelect:t,value:r,disabled:s=!1,textValue:i,...o}=n,a=or(ii,t),u=ar(ii,t),c=a.value===r,[h,g]=C.useState(i??""),[d,m]=C.useState(!1),v=Oe.useComposedRefs(e,S=>{var x;return(x=u.itemRefCallback)==null?void 0:x.call(u,S,r,s)}),p=Qt.useId(),y=C.useRef("touch"),E=()=>{s||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return O.jsx(GE,{scope:t,value:r,disabled:s,textId:p,isSelected:c,onItemTextChange:C.useCallback(S=>{g(x=>x||((S==null?void 0:S.textContent)??"").trim())},[]),children:O.jsx(Ii.ItemSlot,{scope:t,value:r,disabled:s,textValue:h,children:O.jsx(le.Primitive.div,{role:"option","aria-labelledby":p,"data-highlighted":d?"":void 0,"aria-selected":c&&d,"data-state":c?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...o,ref:v,onFocus:le.composeEventHandlers(o.onFocus,()=>m(!0)),onBlur:le.composeEventHandlers(o.onBlur,()=>m(!1)),onClick:le.composeEventHandlers(o.onClick,()=>{y.current!=="mouse"&&E()}),onPointerUp:le.composeEventHandlers(o.onPointerUp,()=>{y.current==="mouse"&&E()}),onPointerDown:le.composeEventHandlers(o.onPointerDown,S=>{y.current=S.pointerType}),onPointerMove:le.composeEventHandlers(o.onPointerMove,S=>{var x;y.current=S.pointerType,s?(x=u.onItemLeave)==null||x.call(u):y.current==="mouse"&&S.currentTarget.focus({preventScroll:!0})}),onPointerLeave:le.composeEventHandlers(o.onPointerLeave,S=>{var x;S.currentTarget===document.activeElement&&((x=u.onItemLeave)==null||x.call(u))}),onKeyDown:le.composeEventHandlers(o.onKeyDown,S=>{var N;((N=u.searchRef)==null?void 0:N.current)!==""&&S.key===" "||(OE.includes(S.key)&&E(),S.key===" "&&S.preventDefault())})})})})});Wd.displayName=ii;var Fn="SelectItemText",Yd=C.forwardRef((n,e)=>{const{__scopeSelect:t,className:r,style:s,...i}=n,o=or(Fn,t),a=ar(Fn,t),u=Kd(Fn,t),c=PE(Fn,t),[h,g]=C.useState(null),d=Oe.useComposedRefs(e,E=>g(E),u.onItemTextChange,E=>{var S;return(S=a.itemTextRefCallback)==null?void 0:S.call(a,E,u.value,u.disabled)}),m=h==null?void 0:h.textContent,v=C.useMemo(()=>O.jsx("option",{value:u.value,disabled:u.disabled,children:m},u.value),[u.disabled,u.value,m]),{onNativeOptionAdd:p,onNativeOptionRemove:y}=c;return rr.useLayoutEffect2(()=>(p(v),()=>y(v)),[p,y,v]),O.jsxs(O.Fragment,{children:[O.jsx(le.Primitive.span,{id:u.textId,...i,ref:d}),u.isSelected&&o.valueNode&&!o.valueNodeHasChildren?lc.createPortal(i.children,o.valueNode):null]})});Yd.displayName=Fn;var Zd="SelectItemIndicator",Xd=C.forwardRef((n,e)=>{const{__scopeSelect:t,...r}=n;return Kd(Zd,t).isSelected?O.jsx(le.Primitive.span,{"aria-hidden":!0,...r,ref:e}):null});Xd.displayName=Zd;var Na="SelectScrollUpButton",Qd=C.forwardRef((n,e)=>{const t=ar(Na,n.__scopeSelect),r=cl(Na,n.__scopeSelect),[s,i]=C.useState(!1),o=Oe.useComposedRefs(e,r.onScrollButtonChange);return rr.useLayoutEffect2(()=>{if(t.viewport&&t.isPositioned){let a=function(){const c=u.scrollTop>0;i(c)};const u=t.viewport;return a(),u.addEventListener("scroll",a),()=>u.removeEventListener("scroll",a)}},[t.viewport,t.isPositioned]),s?O.jsx(ef,{...n,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:u}=t;a&&u&&(a.scrollTop=a.scrollTop-u.offsetHeight)}}):null});Qd.displayName=Na;var Ia="SelectScrollDownButton",Jd=C.forwardRef((n,e)=>{const t=ar(Ia,n.__scopeSelect),r=cl(Ia,n.__scopeSelect),[s,i]=C.useState(!1),o=Oe.useComposedRefs(e,r.onScrollButtonChange);return rr.useLayoutEffect2(()=>{if(t.viewport&&t.isPositioned){let a=function(){const c=u.scrollHeight-u.clientHeight,h=Math.ceil(u.scrollTop)<c;i(h)};const u=t.viewport;return a(),u.addEventListener("scroll",a),()=>u.removeEventListener("scroll",a)}},[t.viewport,t.isPositioned]),s?O.jsx(ef,{...n,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:u}=t;a&&u&&(a.scrollTop=a.scrollTop+u.offsetHeight)}}):null});Jd.displayName=Ia;var ef=C.forwardRef((n,e)=>{const{__scopeSelect:t,onAutoScroll:r,...s}=n,i=ar("SelectScrollButton",t),o=C.useRef(null),a=Ri(t),u=C.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return C.useEffect(()=>()=>u(),[u]),rr.useLayoutEffect2(()=>{var h;const c=a().find(g=>g.ref.current===document.activeElement);(h=c==null?void 0:c.ref.current)==null||h.scrollIntoView({block:"nearest"})},[a]),O.jsx(le.Primitive.div,{"aria-hidden":!0,...s,ref:e,style:{flexShrink:0,...s.style},onPointerDown:le.composeEventHandlers(s.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:le.composeEventHandlers(s.onPointerMove,()=>{var c;(c=i.onItemLeave)==null||c.call(i),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:le.composeEventHandlers(s.onPointerLeave,()=>{u()})})}),KE="SelectSeparator",tf=C.forwardRef((n,e)=>{const{__scopeSelect:t,...r}=n;return O.jsx(le.Primitive.div,{"aria-hidden":!0,...r,ref:e})});tf.displayName=KE;var Ra="SelectArrow",WE=C.forwardRef((n,e)=>{const{__scopeSelect:t,...r}=n,s=Oi(t),i=or(Ra,t),o=ar(Ra,t);return i.open&&o.position==="popper"?O.jsx(jt.Arrow,{...s,...r,ref:e}):null});WE.displayName=Ra;var YE="SelectBubbleInput",rf=C.forwardRef(({__scopeSelect:n,value:e,...t},r)=>{const s=C.useRef(null),i=Oe.useComposedRefs(r,s),o=ai(e);return C.useEffect(()=>{const a=s.current;if(!a)return;const u=window.HTMLSelectElement.prototype,h=Object.getOwnPropertyDescriptor(u,"value").set;if(o!==e&&h){const g=new Event("change",{bubbles:!0});h.call(a,e),a.dispatchEvent(g)}},[o,e]),O.jsx(le.Primitive.select,{...t,style:{...Of.VISUALLY_HIDDEN_STYLES,...t.style},ref:i,defaultValue:e})});rf.displayName=YE;function nf(n){return n===""||n===void 0}function sf(n){const e=Rf.useCallbackRef(n),t=C.useRef(""),r=C.useRef(0),s=C.useCallback(o=>{const a=t.current+o;e(a),(function u(c){t.current=c,window.clearTimeout(r.current),c!==""&&(r.current=window.setTimeout(()=>u(""),1e3))})(a)},[e]),i=C.useCallback(()=>{t.current="",window.clearTimeout(r.current)},[]);return C.useEffect(()=>()=>window.clearTimeout(r.current),[]),[t,s,i]}function of(n,e,t){const s=e.length>1&&Array.from(e).every(c=>c===e[0])?e[0]:e,i=t?n.indexOf(t):-1;let o=ZE(n,Math.max(i,0));s.length===1&&(o=o.filter(c=>c!==t));const u=o.find(c=>c.textValue.toLowerCase().startsWith(s.toLowerCase()));return u!==t?u:void 0}function ZE(n,e){return n.map((t,r)=>n[(e+r)%n.length])}var XE=Rd,af=Ld,QE=Dd,JE=Pd,ew=Bd,lf=qd,tw=Vd,rw=Hd,uf=Gd,cf=Wd,nw=Yd,sw=Xd,hf=Qd,df=Jd,ff=tf;function iw(n,e){n.prototype=Object.create(e.prototype),n.prototype.constructor=n,Jr._setPrototypeOf(n,e)}var Qu=Number.isNaN||function(e){return typeof e=="number"&&e!==e};function ow(n,e){return!!(n===e||Qu(n)&&Qu(e))}function aw(n,e){if(n.length!==e.length)return!1;for(var t=0;t<n.length;t++)if(!ow(n[t],e[t]))return!1;return!0}function Ko(n,e){e===void 0&&(e=aw);var t,r=[],s,i=!1;function o(){for(var a=[],u=0;u<arguments.length;u++)a[u]=arguments[u];return i&&t===this&&e(a,r)||(s=n.apply(this,a),i=!0,t=this,r=a),s}return o}var lw=typeof performance=="object"&&typeof performance.now=="function",Ju=lw?function(){return performance.now()}:function(){return Date.now()};function ec(n){cancelAnimationFrame(n.id)}function uw(n,e){var t=Ju();function r(){Ju()-t>=e?n.call(null):s.id=requestAnimationFrame(r)}var s={id:requestAnimationFrame(r)};return s}var Wo=-1;function tc(n){if(n===void 0&&(n=!1),Wo===-1||n){var e=document.createElement("div"),t=e.style;t.width="50px",t.height="50px",t.overflow="scroll",document.body.appendChild(e),Wo=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return Wo}var zr=null;function rc(n){if(n===void 0&&(n=!1),zr===null||n){var e=document.createElement("div"),t=e.style;t.width="50px",t.height="50px",t.overflow="scroll",t.direction="rtl";var r=document.createElement("div"),s=r.style;return s.width="100px",s.height="100px",e.appendChild(r),document.body.appendChild(e),e.scrollLeft>0?zr="positive-descending":(e.scrollLeft=1,e.scrollLeft===0?zr="negative":zr="positive-ascending"),document.body.removeChild(e),zr}return zr}process.env.NODE_ENV;var cw=150,hw=function(e,t){return e},Ks=null,Ws=null;process.env.NODE_ENV!=="production"&&typeof window<"u"&&typeof window.WeakSet<"u"&&(Ks=new WeakSet,Ws=new WeakSet);function dw(n){var e,t=n.getItemOffset,r=n.getEstimatedTotalSize,s=n.getItemSize,i=n.getOffsetForIndexAndAlignment,o=n.getStartIndexForOffset,a=n.getStopIndexForStartIndex,u=n.initInstanceProps,c=n.shouldResetStyleCacheOnItemSizeChange,h=n.validateProps;return e=(function(g){iw(d,g);function d(v){var p;return p=g.call(this,v)||this,p._instanceProps=u(p.props,Jr._assertThisInitialized(p)),p._outerRef=void 0,p._resetIsScrollingTimeoutId=null,p.state={instance:Jr._assertThisInitialized(p),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof p.props.initialScrollOffset=="number"?p.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},p._callOnItemsRendered=void 0,p._callOnItemsRendered=Ko(function(y,E,S,x){return p.props.onItemsRendered({overscanStartIndex:y,overscanStopIndex:E,visibleStartIndex:S,visibleStopIndex:x})}),p._callOnScroll=void 0,p._callOnScroll=Ko(function(y,E,S){return p.props.onScroll({scrollDirection:y,scrollOffset:E,scrollUpdateWasRequested:S})}),p._getItemStyle=void 0,p._getItemStyle=function(y){var E=p.props,S=E.direction,x=E.itemSize,N=E.layout,_=p._getItemStyleCache(c&&x,c&&N,c&&S),P;if(_.hasOwnProperty(y))P=_[y];else{var I=t(p.props,y,p._instanceProps),te=s(p.props,y,p._instanceProps),ue=S==="horizontal"||N==="horizontal",ie=S==="rtl",b=ue?I:0;_[y]=P={position:"absolute",left:ie?void 0:b,right:ie?b:void 0,top:ue?0:I,height:ue?"100%":te,width:ue?te:"100%"}}return P},p._getItemStyleCache=void 0,p._getItemStyleCache=Ko(function(y,E,S){return{}}),p._onScrollHorizontal=function(y){var E=y.currentTarget,S=E.clientWidth,x=E.scrollLeft,N=E.scrollWidth;p.setState(function(_){if(_.scrollOffset===x)return null;var P=p.props.direction,I=x;if(P==="rtl")switch(rc()){case"negative":I=-x;break;case"positive-descending":I=N-S-x;break}return I=Math.max(0,Math.min(I,N-S)),{isScrolling:!0,scrollDirection:_.scrollOffset<I?"forward":"backward",scrollOffset:I,scrollUpdateWasRequested:!1}},p._resetIsScrollingDebounced)},p._onScrollVertical=function(y){var E=y.currentTarget,S=E.clientHeight,x=E.scrollHeight,N=E.scrollTop;p.setState(function(_){if(_.scrollOffset===N)return null;var P=Math.max(0,Math.min(N,x-S));return{isScrolling:!0,scrollDirection:_.scrollOffset<P?"forward":"backward",scrollOffset:P,scrollUpdateWasRequested:!1}},p._resetIsScrollingDebounced)},p._outerRefSetter=function(y){var E=p.props.outerRef;p._outerRef=y,typeof E=="function"?E(y):E!=null&&typeof E=="object"&&E.hasOwnProperty("current")&&(E.current=y)},p._resetIsScrollingDebounced=function(){p._resetIsScrollingTimeoutId!==null&&ec(p._resetIsScrollingTimeoutId),p._resetIsScrollingTimeoutId=uw(p._resetIsScrolling,cw)},p._resetIsScrolling=function(){p._resetIsScrollingTimeoutId=null,p.setState({isScrolling:!1},function(){p._getItemStyleCache(-1,null)})},p}d.getDerivedStateFromProps=function(p,y){return fw(p,y),h(p),null};var m=d.prototype;return m.scrollTo=function(p){p=Math.max(0,p),this.setState(function(y){return y.scrollOffset===p?null:{scrollDirection:y.scrollOffset<p?"forward":"backward",scrollOffset:p,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},m.scrollToItem=function(p,y){y===void 0&&(y="auto");var E=this.props,S=E.itemCount,x=E.layout,N=this.state.scrollOffset;p=Math.max(0,Math.min(p,S-1));var _=0;if(this._outerRef){var P=this._outerRef;x==="vertical"?_=P.scrollWidth>P.clientWidth?tc():0:_=P.scrollHeight>P.clientHeight?tc():0}this.scrollTo(i(this.props,p,y,N,this._instanceProps,_))},m.componentDidMount=function(){var p=this.props,y=p.direction,E=p.initialScrollOffset,S=p.layout;if(typeof E=="number"&&this._outerRef!=null){var x=this._outerRef;y==="horizontal"||S==="horizontal"?x.scrollLeft=E:x.scrollTop=E}this._callPropsCallbacks()},m.componentDidUpdate=function(){var p=this.props,y=p.direction,E=p.layout,S=this.state,x=S.scrollOffset,N=S.scrollUpdateWasRequested;if(N&&this._outerRef!=null){var _=this._outerRef;if(y==="horizontal"||E==="horizontal")if(y==="rtl")switch(rc()){case"negative":_.scrollLeft=-x;break;case"positive-ascending":_.scrollLeft=x;break;default:var P=_.clientWidth,I=_.scrollWidth;_.scrollLeft=I-P-x;break}else _.scrollLeft=x;else _.scrollTop=x}this._callPropsCallbacks()},m.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&ec(this._resetIsScrollingTimeoutId)},m.render=function(){var p=this.props,y=p.children,E=p.className,S=p.direction,x=p.height,N=p.innerRef,_=p.innerElementType,P=p.innerTagName,I=p.itemCount,te=p.itemData,ue=p.itemKey,ie=ue===void 0?hw:ue,b=p.layout,M=p.outerElementType,A=p.outerTagName,$=p.style,V=p.useIsScrolling,R=p.width,q=this.state.isScrolling,W=S==="horizontal"||b==="horizontal",Y=W?this._onScrollHorizontal:this._onScrollVertical,T=this._getRangeToRender(),D=T[0],U=T[1],K=[];if(I>0)for(var z=D;z<=U;z++)K.push(Ke.createElement(y,{data:te,key:ie(z,te),index:z,isScrolling:V?q:void 0,style:this._getItemStyle(z)}));var H=r(this.props,this._instanceProps);return Ke.createElement(M||A||"div",{className:E,onScroll:Y,ref:this._outerRefSetter,style:Jr._extends({position:"relative",height:x,width:R,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:S},$)},Ke.createElement(_||P||"div",{children:K,ref:N,style:{height:W?"100%":H,pointerEvents:q?"none":void 0,width:W?H:"100%"}}))},m._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var p=this.props.itemCount;if(p>0){var y=this._getRangeToRender(),E=y[0],S=y[1],x=y[2],N=y[3];this._callOnItemsRendered(E,S,x,N)}}if(typeof this.props.onScroll=="function"){var _=this.state,P=_.scrollDirection,I=_.scrollOffset,te=_.scrollUpdateWasRequested;this._callOnScroll(P,I,te)}},m._getRangeToRender=function(){var p=this.props,y=p.itemCount,E=p.overscanCount,S=this.state,x=S.isScrolling,N=S.scrollDirection,_=S.scrollOffset;if(y===0)return[0,0,0,0];var P=o(this.props,_,this._instanceProps),I=a(this.props,P,_,this._instanceProps),te=!x||N==="backward"?Math.max(1,E):1,ue=!x||N==="forward"?Math.max(1,E):1;return[Math.max(0,P-te),Math.max(0,Math.min(y-1,I+ue)),P,I]},d})(Ke.PureComponent),e.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},e}var fw=function(e,t){var r=e.children,s=e.direction,i=e.height,o=e.layout,a=e.innerTagName,u=e.outerTagName,c=e.width,h=t.instance;if(process.env.NODE_ENV!=="production"){(a!=null||u!=null)&&Ws&&!Ws.has(h)&&(Ws.add(h),console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead."));var g=s==="horizontal"||o==="horizontal";switch(s){case"horizontal":case"vertical":Ks&&!Ks.has(h)&&(Ks.add(h),console.warn('The direction prop should be either "ltr" (default) or "rtl". Please use the layout prop to specify "vertical" (default) or "horizontal" orientation.'));break;case"ltr":case"rtl":break;default:throw Error('An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". '+('"'+s+'" was specified.'))}switch(o){case"horizontal":case"vertical":break;default:throw Error('An invalid "layout" prop has been specified. Value should be either "horizontal" or "vertical". '+('"'+o+'" was specified.'))}if(r==null)throw Error('An invalid "children" prop has been specified. Value should be a React component. '+('"'+(r===null?"null":typeof r)+'" was specified.'));if(g&&typeof c!="number")throw Error('An invalid "width" prop has been specified. Horizontal lists must specify a number for width. '+('"'+(c===null?"null":typeof c)+'" was specified.'));if(!g&&typeof i!="number")throw Error('An invalid "height" prop has been specified. Vertical lists must specify a number for height. '+('"'+(i===null?"null":typeof i)+'" was specified.'))}},pw=dw({getItemOffset:function(e,t){var r=e.itemSize;return t*r},getItemSize:function(e,t){var r=e.itemSize;return r},getEstimatedTotalSize:function(e){var t=e.itemCount,r=e.itemSize;return r*t},getOffsetForIndexAndAlignment:function(e,t,r,s,i,o){var a=e.direction,u=e.height,c=e.itemCount,h=e.itemSize,g=e.layout,d=e.width,m=a==="horizontal"||g==="horizontal",v=m?d:u,p=Math.max(0,c*h-v),y=Math.min(p,t*h),E=Math.max(0,t*h-v+h+o);switch(r==="smart"&&(s>=E-v&&s<=y+v?r="auto":r="center"),r){case"start":return y;case"end":return E;case"center":{var S=Math.round(E+(y-E)/2);return S<Math.ceil(v/2)?0:S>p+Math.floor(v/2)?p:S}case"auto":default:return s>=E&&s<=y?s:s<E?E:y}},getStartIndexForOffset:function(e,t){var r=e.itemCount,s=e.itemSize;return Math.max(0,Math.min(r-1,Math.floor(t/s)))},getStopIndexForStartIndex:function(e,t,r){var s=e.direction,i=e.height,o=e.itemCount,a=e.itemSize,u=e.layout,c=e.width,h=s==="horizontal"||u==="horizontal",g=t*a,d=h?c:i,m=Math.ceil((d+r-g)/a);return Math.max(0,Math.min(o-1,t+m-1))},initInstanceProps:function(e){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(e){var t=e.itemSize;if(process.env.NODE_ENV!=="production"&&typeof t!="number")throw Error('An invalid "itemSize" prop has been specified. Value should be a number. '+('"'+(t===null?"null":typeof t)+'" was specified.'))}});const gw=XE,mw=rw,vw=QE,pf=C.forwardRef(({className:n,children:e,variant:t="default",...r},s)=>O.jsxs(af,{ref:s,className:Ce.cn("border-border ring-offset-background placeholder:text-muted-foreground focus:ring-offset-none focus:ring-primary flex h-10 w-full items-center justify-between rounded-md border bg-white px-3 py-2 text-sm focus:ring-2 focus:ring-offset-transparent focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 dark:bg-transparent [&>span]:line-clamp-1",t==="failure"&&"focus:ring-destructive hover:bg-destructive/20 bg-destructive/20 border-destructive !text-destructive",n),...r,children:[e,O.jsx(JE,{asChild:!0,children:O.jsx(oc.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));pf.displayName=af.displayName;const hl=C.forwardRef(({className:n,...e},t)=>O.jsx(hf,{ref:t,className:Ce.cn("flex cursor-default items-center justify-center py-1",n),...e,children:O.jsx(Pf,{className:"h-4 w-4"})}));hl.displayName=hf.displayName;const dl=C.forwardRef(({className:n,...e},t)=>O.jsx(df,{ref:t,className:Ce.cn("flex cursor-default items-center justify-center py-1",n),...e,children:O.jsx(oc.ChevronDown,{className:"h-4 w-4"})}));dl.displayName=df.displayName;const fl=C.forwardRef(({className:n,children:e,position:t="popper",...r},s)=>O.jsx(ew,{children:O.jsxs(lf,{ref:s,className:Ce.cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border shadow-md",t==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",n),position:t,...r,children:[O.jsx(hl,{}),O.jsx(tw,{className:Ce.cn("p-1",t==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),O.jsx(dl,{})]})}));fl.displayName=lf.displayName;const gf=C.forwardRef(({className:n,...e},t)=>O.jsx(uf,{ref:t,className:Ce.cn("py-1.5 pr-2 pl-8 text-sm font-semibold",n),...e}));gf.displayName=uf.displayName;const pl=C.forwardRef(({className:n,children:e,...t},r)=>O.jsxs(cf,{ref:r,className:Ce.cn("focus:bg-accent focus:text-accent-foreground relative flex w-full cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n),...t,children:[O.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:O.jsx(sw,{children:O.jsx(ic.Check,{className:"h-4 w-4"})})}),O.jsx(nw,{children:e})]}));pl.displayName=cf.displayName;const mf=C.forwardRef(({className:n,...e},t)=>O.jsx(ff,{ref:t,className:Ce.cn("bg-muted -mx-1 my-1 h-px",n),...e}));mf.displayName=ff.displayName;const vf=C.forwardRef(({className:n,options:e,position:t="popper",itemHeight:r=35,maxHeight:s=300,...i},o)=>{const a=Ke.useRef(null),u=({index:c,style:h})=>{const g=e[c];return O.jsx("div",{style:h,children:O.jsx(pl,{value:`${g.value}`,children:g.label})})};return O.jsx(fl,{ref:o,...i,children:O.jsx(pw,{ref:a,height:Math.min(s,e.length*r),itemCount:e.length,itemSize:r,width:"100%",children:u})})});vf.displayName="VirtualizedSelectContent";var Li="Switch",[yw]=le.createContextScope(Li),[bw,Ew]=yw(Li),yf=C.forwardRef((n,e)=>{const{__scopeSwitch:t,name:r,checked:s,defaultChecked:i,required:o,disabled:a,value:u="on",onCheckedChange:c,form:h,...g}=n,[d,m]=C.useState(null),v=Oe.useComposedRefs(e,x=>m(x)),p=C.useRef(!1),y=d?h||!!d.closest("form"):!0,[E,S]=Qt.useControllableState({prop:s,defaultProp:i??!1,onChange:c,caller:Li});return O.jsxs(bw,{scope:t,checked:E,disabled:a,children:[O.jsx(le.Primitive.button,{type:"button",role:"switch","aria-checked":E,"aria-required":o,"data-state":xf(E),"data-disabled":a?"":void 0,disabled:a,value:u,...g,ref:v,onClick:le.composeEventHandlers(n.onClick,x=>{S(N=>!N),y&&(p.current=x.isPropagationStopped(),p.current||x.stopPropagation())})}),y&&O.jsx(wf,{control:d,bubbles:!p.current,name:r,value:u,checked:E,required:o,disabled:a,form:h,style:{transform:"translateX(-100%)"}})]})});yf.displayName=Li;var bf="SwitchThumb",Ef=C.forwardRef((n,e)=>{const{__scopeSwitch:t,...r}=n,s=Ew(bf,t);return O.jsx(le.Primitive.span,{"data-state":xf(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:e})});Ef.displayName=bf;var ww="SwitchBubbleInput",wf=C.forwardRef(({__scopeSwitch:n,control:e,checked:t,bubbles:r=!0,...s},i)=>{const o=C.useRef(null),a=Oe.useComposedRefs(o,i),u=ai(t),c=jt.useSize(e);return C.useEffect(()=>{const h=o.current;if(!h)return;const g=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(g,"checked").set;if(u!==t&&m){const v=new Event("click",{bubbles:r});m.call(h,t),h.dispatchEvent(v)}},[u,t,r]),O.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:t,...s,tabIndex:-1,ref:a,style:{...s.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});wf.displayName=ww;function xf(n){return n?"checked":"unchecked"}var Sf=yf,xw=Ef;const _f=C.forwardRef(({className:n,...e},t)=>O.jsx(Sf,{className:Ce.cn("peer focus-visible:ring-ring focus-visible:ring-offset-background data-[state=checked]:bg-item-primary data-[state=unchecked]:bg-input inline-flex h-4 w-7 shrink-0 cursor-pointer items-center rounded-full border border-transparent transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-40",n),...e,ref:t,children:O.jsx(xw,{className:Ce.cn("bg-background pointer-events-none block size-3.5 rounded-full shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-3 data-[state=unchecked]:translate-x-0")})}));_f.displayName=Sf.displayName;const Af=C.forwardRef(({className:n,variant:e,...t},r)=>O.jsx("textarea",{className:Ce.cn("min-h-20 px-3 py-2",_i({variant:e}),n),ref:r,...t}));Af.displayName="Textarea";exports.Checkbox=mc;exports.FilepondContainer=jc;exports.Form=Qp;exports.FormControl=Kc;exports.FormDescription=Wc;exports.FormField=Jp;exports.FormItem=zc;exports.FormLabel=Gc;exports.FormMessage=Yc;exports.HtmlEditor=rd;exports.Input=nd;exports.Label=Va;exports.MaskInput=pd;exports.RadioGroup=Nd;exports.RadioGroupItem=Id;exports.Select=gw;exports.SelectContent=fl;exports.SelectGroup=mw;exports.SelectItem=pl;exports.SelectLabel=gf;exports.SelectScrollDownButton=dl;exports.SelectScrollUpButton=hl;exports.SelectSeparator=mf;exports.SelectTrigger=pf;exports.SelectValue=vw;exports.Switch=_f;exports.Textarea=Af;exports.VirtualizedSelectContent=vf;exports.inputVariants=_i;exports.useFormField=es;
186
- //# sourceMappingURL=textarea-DbxcvKTh.cjs.js.map