@remarkablejames/editor 0.0.6 → 0.0.8

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 (134) hide show
  1. package/README.md +1 -1
  2. package/lib/{ActionMenuButton-NfiUDE60.cjs → ActionMenuButton-DI9_8wC0.cjs} +1 -1
  3. package/lib/{ActionMenuButton-CpmEfz31.js → ActionMenuButton-DL05l66z.js} +1 -1
  4. package/lib/Attachment.cjs +1 -1
  5. package/lib/Attachment.js +2 -2
  6. package/lib/Blockquote.cjs +1 -1
  7. package/lib/Blockquote.js +1 -1
  8. package/lib/Bold.cjs +1 -1
  9. package/lib/Bold.js +1 -1
  10. package/lib/BulletList.cjs +1 -1
  11. package/lib/BulletList.js +1 -1
  12. package/lib/Callout.cjs +1 -1
  13. package/lib/Callout.js +16 -15
  14. package/lib/Clear.cjs +1 -1
  15. package/lib/Clear.js +1 -1
  16. package/lib/Code.cjs +1 -1
  17. package/lib/Code.js +1 -1
  18. package/lib/CodeBlock.cjs +1 -1
  19. package/lib/CodeBlock.js +32 -31
  20. package/lib/CodeView.cjs +1 -1
  21. package/lib/CodeView.js +1 -1
  22. package/lib/Color.cjs +1 -1
  23. package/lib/Color.js +2 -2
  24. package/lib/Column.cjs +1 -1
  25. package/lib/Column.js +1 -1
  26. package/lib/{Drawer-DlgdaO_B.cjs → Drawer-DEzhWKwY.cjs} +1 -1
  27. package/lib/{Drawer-CayP4Ww4.js → Drawer-DhM1qM6R.js} +15 -15
  28. package/lib/Drawer.cjs +1 -1
  29. package/lib/Drawer.js +2 -2
  30. package/lib/Emoji.cjs +1 -1
  31. package/lib/Emoji.js +8 -8
  32. package/lib/Excalidraw.cjs +1 -1
  33. package/lib/Excalidraw.js +36 -36
  34. package/lib/ExportPdf.cjs +1 -1
  35. package/lib/ExportPdf.js +1 -1
  36. package/lib/ExportWord.cjs +1 -1
  37. package/lib/ExportWord.js +1 -1
  38. package/lib/FontFamily.cjs +1 -1
  39. package/lib/FontFamily.js +3 -3
  40. package/lib/FontSize.cjs +1 -1
  41. package/lib/FontSize.js +3 -3
  42. package/lib/Heading.cjs +1 -1
  43. package/lib/Heading.js +8 -8
  44. package/lib/Highlight.cjs +1 -1
  45. package/lib/Highlight.js +2 -2
  46. package/lib/History.cjs +1 -1
  47. package/lib/History.js +1 -1
  48. package/lib/HorizontalRule.cjs +1 -1
  49. package/lib/HorizontalRule.js +1 -1
  50. package/lib/{Iframe-CANdxSpV.cjs → Iframe-DbYJ82AI.cjs} +1 -1
  51. package/lib/{Iframe-C6Sb97KS.js → Iframe-yDX_zHls.js} +1 -1
  52. package/lib/Iframe.cjs +1 -1
  53. package/lib/Iframe.js +2 -2
  54. package/lib/Image.cjs +1 -1
  55. package/lib/Image.js +3 -3
  56. package/lib/ImageGif.cjs +1 -1
  57. package/lib/ImageGif.js +28 -28
  58. package/lib/ImportWord.cjs +1 -1
  59. package/lib/ImportWord.js +12 -12
  60. package/lib/{Indent-CcFe8py3.js → Indent-CA46zsbb.js} +1 -1
  61. package/lib/{Indent-DuB2U6Cs.cjs → Indent-CYaCq_Mv.cjs} +1 -1
  62. package/lib/Indent.cjs +1 -1
  63. package/lib/Indent.js +1 -1
  64. package/lib/Italic.cjs +1 -1
  65. package/lib/Italic.js +1 -1
  66. package/lib/Katex-Dh-kTBjf.cjs +4 -0
  67. package/lib/{Katex-Bp6AnIUF.js → Katex-g3ZS3zUf.js} +4 -3
  68. package/lib/Katex.cjs +1 -1
  69. package/lib/Katex.js +1 -1
  70. package/lib/LineHeight.cjs +1 -1
  71. package/lib/LineHeight.js +2 -2
  72. package/lib/Link.cjs +1 -1
  73. package/lib/Link.js +1 -1
  74. package/lib/{LinkEditBlock-C2zX0WVK.cjs → LinkEditBlock-ClqpI1FH.cjs} +1 -1
  75. package/lib/{LinkEditBlock-BiHumIJR.js → LinkEditBlock-qE5KHPQs.js} +7 -7
  76. package/lib/Mermaid-BmUChJSB.cjs +2 -0
  77. package/lib/{Mermaid-Dlx0XTJj.js → Mermaid-CefRECZY.js} +24 -23
  78. package/lib/Mermaid.cjs +1 -1
  79. package/lib/Mermaid.js +1 -1
  80. package/lib/MoreMark.cjs +1 -1
  81. package/lib/MoreMark.js +2 -2
  82. package/lib/OrderedList.cjs +1 -1
  83. package/lib/OrderedList.js +1 -1
  84. package/lib/PaywallSeparator.cjs +1 -1
  85. package/lib/PaywallSeparator.js +1 -1
  86. package/lib/SearchAndReplace.cjs +1 -1
  87. package/lib/SearchAndReplace.js +7 -7
  88. package/lib/SlashCommand.cjs +1 -1
  89. package/lib/SlashCommand.js +2 -2
  90. package/lib/{SlashCommandNodeView-DzmsYaNc.js → SlashCommandNodeView-BsIrWlhS.js} +5 -5
  91. package/lib/{SlashCommandNodeView-BfWNWGRr.cjs → SlashCommandNodeView-DpXsfGmo.cjs} +1 -1
  92. package/lib/Strike.cjs +1 -1
  93. package/lib/Strike.js +1 -1
  94. package/lib/{Table-BfM6ywrZ.cjs → Table-B-0TePQ3.cjs} +1 -1
  95. package/lib/{Table-IH34r4jd.js → Table-CG0nisk4.js} +2 -2
  96. package/lib/Table.cjs +1 -1
  97. package/lib/Table.js +1 -1
  98. package/lib/TaskList.cjs +1 -1
  99. package/lib/TaskList.js +1 -1
  100. package/lib/TextAlign.cjs +1 -1
  101. package/lib/TextAlign.js +2 -2
  102. package/lib/TextDirection.cjs +1 -1
  103. package/lib/TextDirection.js +2 -2
  104. package/lib/TextUnderline.cjs +1 -1
  105. package/lib/TextUnderline.js +1 -1
  106. package/lib/{Twitter-FVQKPaq6.js → Twitter-DlGSWdh7.js} +7 -7
  107. package/lib/{Twitter-axcoCgD7.cjs → Twitter-DvMmVNMF.cjs} +1 -1
  108. package/lib/Twitter.cjs +1 -1
  109. package/lib/Twitter.js +1 -1
  110. package/lib/Video.cjs +1 -1
  111. package/lib/Video.js +3 -3
  112. package/lib/bubble.cjs +3 -3
  113. package/lib/bubble.js +83 -81
  114. package/lib/components/RichTextProvider.d.ts +1 -1
  115. package/lib/{dropdown-menu-Ce2TorkG.js → dropdown-menu-D-mNjyKn.js} +1 -1
  116. package/lib/{dropdown-menu-DirUyRAI.cjs → dropdown-menu-gOopBX-L.cjs} +1 -1
  117. package/lib/index-CUnpdrCy.cjs +28 -0
  118. package/lib/{index-CnKgiZFQ.js → index-CelRl0mr.js} +1062 -1191
  119. package/lib/index.cjs +3 -3
  120. package/lib/index.js +61 -59
  121. package/lib/{popover-BdLwAlrM.cjs → popover-DEMkixfo.cjs} +1 -1
  122. package/lib/{popover-BzJyaFvy.js → popover-SMtif0E1.js} +1 -1
  123. package/lib/select-BqlizSg4.cjs +1 -0
  124. package/lib/select-Dc3RkAhQ.js +120 -0
  125. package/lib/{separator-D-fyzbfx.js → separator-DWLSmuSh.js} +14 -14
  126. package/lib/{separator-CoQaQmFK.cjs → separator-DuP4NoiV.cjs} +1 -1
  127. package/lib/textarea-C89l2GRG.cjs +1 -0
  128. package/lib/textarea-DvciwVxS.js +20 -0
  129. package/lib/theme.cjs +1 -1
  130. package/lib/theme.js +18 -18
  131. package/package.json +21 -32
  132. package/lib/Katex-DFU1unCm.cjs +0 -4
  133. package/lib/Mermaid-B8lQSOGn.cjs +0 -2
  134. package/lib/index-BynXHtjJ.cjs +0 -28
package/lib/theme.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-NsYff_Ni.cjs"),n={light:{default:{radius:"0.65rem",background:"0 0% 100%",foreground:"240 10% 3.9%",card:"0 0% 100%","card-foreground":"240 10% 3.9%",popover:"0 0% 100%","popover-foreground":"240 10% 3.9%",primary:"240 5.9% 10%","primary-foreground":"0 0% 98%",secondary:"240 4.8% 95.9%","secondary-foreground":"240 5.9% 10%",muted:"240 4.8% 95.9%","muted-foreground":"240 3.8% 46.1%",accent:"240 4.8% 95.9%","accent-foreground":"240 5.9% 10%",destructive:"0 84.2% 60.2%","destructive-foreground":"0 0% 98%",border:"240 5.9% 90%",input:"240 5.9% 90%",ring:"240 5.9% 10%"},red:{radius:"0.65rem",background:"0 0% 100%",foreground:"0 0% 3.9%",card:"0 0% 100%","card-foreground":"0 0% 3.9%",popover:"0 0% 100%","popover-foreground":"0 0% 3.9%",primary:"0 72.2% 50.6%","primary-foreground":"0 85.7% 97.3%",secondary:"0 0% 96.1%","secondary-foreground":"0 0% 9%",muted:"0 0% 96.1%","muted-foreground":"0 0% 45.1%",accent:"0 0% 96.1%","accent-foreground":"0 0% 9%",destructive:"0 84.2% 60.2%","destructive-foreground":"0 0% 98%",border:"0 0% 89.8%",input:"0 0% 89.8%",ring:"0 72.2% 50.6%"},blue:{radius:"0.65rem",background:"0 0% 100%",foreground:"222.2 84% 4.9%",card:"0 0% 100%","card-foreground":"222.2 84% 4.9%",popover:"0 0% 100%","popover-foreground":"222.2 84% 4.9%",primary:"221.2 83.2% 53.3%","primary-foreground":"210 40% 98%",secondary:"210 40% 96.1%","secondary-foreground":"222.2 47.4% 11.2%",muted:"210 40% 96.1%","muted-foreground":"215.4 16.3% 46.9%",accent:"210 40% 96.1%","accent-foreground":"222.2 47.4% 11.2%",destructive:"0 84.2% 60.2%","destructive-foreground":"210 40% 98%",border:"214.3 31.8% 91.4%",input:"214.3 31.8% 91.4%",ring:"221.2 83.2% 53.3%"},green:{radius:"0.65rem",background:"0 0% 100%",foreground:"240 10% 3.9%",card:"0 0% 100%","card-foreground":"240 10% 3.9%",popover:"0 0% 100%","popover-foreground":"240 10% 3.9%",primary:"142.1 76.2% 36.3%","primary-foreground":"355.7 100% 97.3%",secondary:"240 4.8% 95.9%","secondary-foreground":"240 5.9% 10%",muted:"240 4.8% 95.9%","muted-foreground":"240 3.8% 46.1%",accent:"240 4.8% 95.9%","accent-foreground":"240 5.9% 10%",destructive:"0 84.2% 60.2%","destructive-foreground":"0 0% 98%",border:"240 5.9% 90%",input:"240 5.9% 90%",ring:"142.1 76.2% 36.3%"},orange:{radius:"0.65rem",background:"0 0% 100%",foreground:"20 14.3% 4.1%",card:"0 0% 100%","card-foreground":"20 14.3% 4.1%",popover:"0 0% 100%","popover-foreground":"20 14.3% 4.1%",primary:"24.6 95% 53.1%","primary-foreground":"60 9.1% 97.8%",secondary:"60 4.8% 95.9%","secondary-foreground":"24 9.8% 10%",muted:"60 4.8% 95.9%","muted-foreground":"25 5.3% 44.7%",accent:"60 4.8% 95.9%","accent-foreground":"24 9.8% 10%",destructive:"0 84.2% 60.2%","destructive-foreground":"60 9.1% 97.8%",border:"20 5.9% 90%",input:"20 5.9% 90%"},rose:{radius:"0.65rem",background:"0 0% 100%",foreground:"240 10% 3.9%",card:"0 0% 100%","card-foreground":"240 10% 3.9%",popover:"0 0% 100%","popover-foreground":"240 10% 3.9%",primary:"346.8 77.2% 49.8%","primary-foreground":"355.7 100% 97.3%",secondary:"240 4.8% 95.9%","secondary-foreground":"240 5.9% 10%",muted:"240 4.8% 95.9%","muted-foreground":"240 3.8% 46.1%",accent:"240 4.8% 95.9%","accent-foreground":"240 5.9% 10%",destructive:"0 84.2% 60.2%","destructive-foreground":"0 0% 98%",border:"240 5.9% 90%",input:"240 5.9% 90%",ring:"346.8 77.2% 49.8%"},violet:{radius:"0.65rem",background:"0 0% 100%",foreground:"224 71.4% 4.1%",card:"0 0% 100%","card-foreground":"224 71.4% 4.1%",popover:"0 0% 100%","popover-foreground":"224 71.4% 4.1%",primary:"262.1 83.3% 57.8%","primary-foreground":"210 20% 98%",secondary:"220 14.3% 95.9%","secondary-foreground":"220.9 39.3% 11%",muted:"220 14.3% 95.9%","muted-foreground":"220 8.9% 46.1%",accent:"220 14.3% 95.9%","accent-foreground":"220.9 39.3% 11%",destructive:"0 84.2% 60.2%","destructive-foreground":"210 20% 98%",border:"220 13% 91%",input:"220 13% 91%",ring:"262.1 83.3% 57.8%"},yellow:{radius:"0.65rem",background:"0 0% 100%",foreground:"20 14.3% 4.1%",card:"0 0% 100%","card-foreground":"20 14.3% 4.1%",popover:"0 0% 100%","popover-foreground":"20 14.3% 4.1%",primary:"47.9 95.8% 53.1%","primary-foreground":"26 83.3% 14.1%",secondary:"60 4.8% 95.9%","secondary-foreground":"24 9.8% 10%",muted:"60 4.8% 95.9%","muted-foreground":"25 5.3% 44.7%",accent:"60 4.8% 95.9%","accent-foreground":"24 9.8% 10%",destructive:"0 84.2% 60.2%","destructive-foreground":"60 9.1% 97.8%",border:"20 5.9% 90%",input:"20 5.9% 90%",ring:"20 14.3% 4.1"}},dark:{default:{radius:"0.65rem",background:"240 10% 3.9%",foreground:"0 0% 98%",card:"240 10% 3.9%","card-foreground":"0 0% 98%",popover:"240 10% 3.9%","popover-foreground":"0 0% 98%",primary:"0 0% 98%","primary-foreground":"240 5.9% 10%",secondary:"240 3.7% 15.9%","secondary-foreground":"0 0% 98%",muted:"240 3.7% 15.9%","muted-foreground":"240 5% 64.9%",accent:"240 3.7% 15.9%","accent-foreground":"0 0% 98%",destructive:"0 62.8% 30.6%","destructive-foreground":"0 0% 98%",border:"240 3.7% 15.9%",input:"240 3.7% 15.9%",ring:"240 4.9% 83.9%"},red:{radius:"0.65rem",background:"0 0% 3.9%",foreground:"0 0% 98%",card:"0 0% 3.9%","card-foreground":"0 0% 98%",popover:"0 0% 3.9%","popover-foreground":"0 0% 98%",primary:"0 72.2% 50.6%","primary-foreground":"0 85.7% 97.3%",secondary:"0 0% 14.9%","secondary-foreground":"0 0% 98%",muted:"0 0% 14.9%","muted-foreground":"0 0% 63.9%",accent:"0 0% 14.9%","accent-foreground":"0 0% 98%",destructive:"0 62.8% 30.6%","destructive-foreground":"0 0% 98%",border:"0 0% 14.9%",input:"0 0% 14.9%",ring:"0 72.2% 50.6%"},blue:{radius:"0.65rem",background:"222.2 84% 4.9%",foreground:"210 40% 98%",card:"222.2 84% 4.9%","card-foreground":"210 40% 98%",popover:"222.2 84% 4.9%","popover-foreground":"210 40% 98%",primary:"217.2 91.2% 59.8%","primary-foreground":"222.2 47.4% 11.2%",secondary:"217.2 32.6% 17.5%","secondary-foreground":"210 40% 98%",muted:"217.2 32.6% 17.5%","muted-foreground":"215 20.2% 65.1%",accent:"217.2 32.6% 17.5%","accent-foreground":"210 40% 98%",destructive:"0 62.8% 30.6%","destructive-foreground":"210 40% 98%",border:"217.2 32.6% 17.5%",input:"217.2 32.6% 17.5%",ring:"224.3 76.3% 48%"},green:{radius:"0.65rem",background:"20 14.3% 4.1%",foreground:"0 0% 95%",card:"24 9.8% 10%","card-foreground":"0 0% 95%",popover:"0 0% 9%","popover-foreground":"0 0% 95%",primary:"142.1 70.6% 45.3%","primary-foreground":"144.9 80.4% 10%",secondary:"240 3.7% 15.9%","secondary-foreground":"0 0% 98%",muted:"0 0% 15%","muted-foreground":"240 5% 64.9%",accent:"12 6.5% 15.1%","accent-foreground":"0 0% 98%",destructive:"0 62.8% 30.6%","destructive-foreground":"0 85.7% 97.3%",border:"240 3.7% 15.9%",input:"240 3.7% 15.9%",ring:"142.4 71.8% 29.2%"},orange:{radius:"0.65rem",background:"20 14.3% 4.1%",foreground:"60 9.1% 97.8%",card:"20 14.3% 4.1%","card-foreground":"60 9.1% 97.8%",popover:"20 14.3% 4.1%","popover-foreground":"60 9.1% 97.8%",primary:"20.5 90.2% 48.2%","primary-foreground":"60 9.1% 97.8%",secondary:"12 6.5% 15.1%","secondary-foreground":"60 9.1% 97.8%",muted:"12 6.5% 15.1%","muted-foreground":"24 5.4% 63.9%",accent:"12 6.5% 15.1%","accent-foreground":"60 9.1% 97.8%",destructive:"0 72.2% 50.6%","destructive-foreground":"60 9.1% 97.8%",border:"12 6.5% 15.1%",input:"12 6.5% 15.1%",ring:"20.5 90.2% 48.2%"},rose:{radius:"0.65rem",background:"20 14.3% 4.1%",foreground:"0 0% 95%",card:"24 9.8% 10%","card-foreground":"0 0% 95%",popover:"0 0% 9%","popover-foreground":"0 0% 95%",primary:"346.8 77.2% 49.8%","primary-foreground":"355.7 100% 97.3%",secondary:"240 3.7% 15.9%","secondary-foreground":"0 0% 98%",muted:"0 0% 15%","muted-foreground":"240 5% 64.9%",accent:"12 6.5% 15.1%","accent-foreground":"0 0% 98%",destructive:"0 62.8% 30.6%","destructive-foreground":"0 85.7% 97.3%",border:"240 3.7% 15.9%",input:"240 3.7% 15.9%",ring:"346.8 77.2% 49.8%"},violet:{radius:"0.65rem",background:"224 71.4% 4.1%",foreground:"210 20% 98%",card:"224 71.4% 4.1%","card-foreground":"210 20% 98%",popover:"224 71.4% 4.1%","popover-foreground":"210 20% 98%",primary:"263.4 70% 50.4%","primary-foreground":"210 20% 98%",secondary:"215 27.9% 16.9%","secondary-foreground":"210 20% 98%",muted:"215 27.9% 16.9%","muted-foreground":"217.9 10.6% 64.9%",accent:"215 27.9% 16.9%","accent-foreground":"210 20% 98%",destructive:"0 62.8% 30.6%","destructive-foreground":"210 20% 98%",border:"215 27.9% 16.9%",input:"215 27.9% 16.9%",ring:"263.4 70% 50.4%"},yellow:{radius:"0.65rem",background:"20 14.3% 4.1%",foreground:"60 9.1% 97.8%",card:"20 14.3% 4.1%","card-foreground":"60 9.1% 97.8%",popover:"20 14.3% 4.1%","popover-foreground":"60 9.1% 97.8%",primary:"47.9 95.8% 53.1%","primary-foreground":"26 83.3% 14.1%",secondary:"12 6.5% 15.1%","secondary-foreground":"60 9.1% 97.8%",muted:"12 6.5% 15.1%","muted-foreground":"24 5.4% 63.9%",accent:"12 6.5% 15.1%","accent-foreground":"60 9.1% 97.8%",destructive:"0 62.8% 30.6%","destructive-foreground":"60 9.1% 97.8%",border:"12 6.5% 15.1%",input:"12 6.5% 15.1%",ring:"35.5 91.7% 32.9%"}}},d=o.y({theme:"light",color:"default",borderRadius:"0.65rem"});function c(){const{theme:r,color:e,borderRadius:u}=o.b(d);return{theme:r,color:e,borderRadius:u}}const t={setTheme:r=>{o.v(d).setValue(e=>({...e,theme:r}))},setColor:r=>{o.v(d).setValue(e=>({...e,color:r}))},setBorderRadius:r=>{o.v(d).setValue(e=>({...e,borderRadius:r}))}};exports.THEME=n;exports.themeActions=t;exports.useTheme=c;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-NsYff_Ni.cjs"),n={light:{default:{radius:"0.65rem",background:"0 0% 100%",foreground:"240 10% 3.9%",card:"0 0% 100%","card-foreground":"240 10% 3.9%",popover:"0 0% 100%","popover-foreground":"240 10% 3.9%",primary:"240 5.9% 10%","primary-foreground":"0 0% 98%",secondary:"240 4.8% 95.9%","secondary-foreground":"240 5.9% 10%",muted:"240 4.8% 95.9%","muted-foreground":"240 3.8% 46.1%",accent:"240 4.8% 95.9%","accent-foreground":"240 5.9% 10%",destructive:"0 84.2% 60.2%","destructive-foreground":"0 0% 98%",border:"240 5.9% 90%",input:"240 5.9% 90%",ring:"240 5.9% 10%"},red:{radius:"0.65rem",background:"0 0% 100%",foreground:"0 0% 3.9%",card:"0 0% 100%","card-foreground":"0 0% 3.9%",popover:"0 0% 100%","popover-foreground":"0 0% 3.9%",primary:"0 72.2% 50.6%","primary-foreground":"0 85.7% 97.3%",secondary:"0 0% 96.1%","secondary-foreground":"0 0% 9%",muted:"0 0% 96.1%","muted-foreground":"0 0% 45.1%",accent:"0 0% 96.1%","accent-foreground":"0 0% 9%",destructive:"0 84.2% 60.2%","destructive-foreground":"0 0% 98%",border:"0 0% 89.8%",input:"0 0% 89.8%",ring:"0 72.2% 50.6%"},blue:{radius:"0.65rem",background:"0 0% 100%",foreground:"222.2 84% 4.9%",card:"0 0% 100%","card-foreground":"222.2 84% 4.9%",popover:"0 0% 100%","popover-foreground":"222.2 84% 4.9%",primary:"221.2 83.2% 53.3%","primary-foreground":"210 40% 98%",secondary:"210 40% 96.1%","secondary-foreground":"222.2 47.4% 11.2%",muted:"210 40% 96.1%","muted-foreground":"215.4 16.3% 46.9%",accent:"210 40% 96.1%","accent-foreground":"222.2 47.4% 11.2%",destructive:"0 84.2% 60.2%","destructive-foreground":"210 40% 98%",border:"214.3 31.8% 91.4%",input:"214.3 31.8% 91.4%",ring:"221.2 83.2% 53.3%"},green:{radius:"0.65rem",background:"0 0% 100%",foreground:"240 10% 3.9%",card:"0 0% 100%","card-foreground":"240 10% 3.9%",popover:"0 0% 100%","popover-foreground":"240 10% 3.9%",primary:"142.1 76.2% 36.3%","primary-foreground":"355.7 100% 97.3%",secondary:"240 4.8% 95.9%","secondary-foreground":"240 5.9% 10%",muted:"240 4.8% 95.9%","muted-foreground":"240 3.8% 46.1%",accent:"240 4.8% 95.9%","accent-foreground":"240 5.9% 10%",destructive:"0 84.2% 60.2%","destructive-foreground":"0 0% 98%",border:"240 5.9% 90%",input:"240 5.9% 90%",ring:"142.1 76.2% 36.3%"},orange:{radius:"0.65rem",background:"0 0% 100%",foreground:"20 14.3% 4.1%",card:"0 0% 100%","card-foreground":"20 14.3% 4.1%",popover:"0 0% 100%","popover-foreground":"20 14.3% 4.1%",primary:"24.6 95% 53.1%","primary-foreground":"60 9.1% 97.8%",secondary:"60 4.8% 95.9%","secondary-foreground":"24 9.8% 10%",muted:"60 4.8% 95.9%","muted-foreground":"25 5.3% 44.7%",accent:"60 4.8% 95.9%","accent-foreground":"24 9.8% 10%",destructive:"0 84.2% 60.2%","destructive-foreground":"60 9.1% 97.8%",border:"20 5.9% 90%",input:"20 5.9% 90%"},rose:{radius:"0.65rem",background:"0 0% 100%",foreground:"240 10% 3.9%",card:"0 0% 100%","card-foreground":"240 10% 3.9%",popover:"0 0% 100%","popover-foreground":"240 10% 3.9%",primary:"346.8 77.2% 49.8%","primary-foreground":"355.7 100% 97.3%",secondary:"240 4.8% 95.9%","secondary-foreground":"240 5.9% 10%",muted:"240 4.8% 95.9%","muted-foreground":"240 3.8% 46.1%",accent:"240 4.8% 95.9%","accent-foreground":"240 5.9% 10%",destructive:"0 84.2% 60.2%","destructive-foreground":"0 0% 98%",border:"240 5.9% 90%",input:"240 5.9% 90%",ring:"346.8 77.2% 49.8%"},violet:{radius:"0.65rem",background:"0 0% 100%",foreground:"224 71.4% 4.1%",card:"0 0% 100%","card-foreground":"224 71.4% 4.1%",popover:"0 0% 100%","popover-foreground":"224 71.4% 4.1%",primary:"262.1 83.3% 57.8%","primary-foreground":"210 20% 98%",secondary:"220 14.3% 95.9%","secondary-foreground":"220.9 39.3% 11%",muted:"220 14.3% 95.9%","muted-foreground":"220 8.9% 46.1%",accent:"220 14.3% 95.9%","accent-foreground":"220.9 39.3% 11%",destructive:"0 84.2% 60.2%","destructive-foreground":"210 20% 98%",border:"220 13% 91%",input:"220 13% 91%",ring:"262.1 83.3% 57.8%"},yellow:{radius:"0.65rem",background:"0 0% 100%",foreground:"20 14.3% 4.1%",card:"0 0% 100%","card-foreground":"20 14.3% 4.1%",popover:"0 0% 100%","popover-foreground":"20 14.3% 4.1%",primary:"47.9 95.8% 53.1%","primary-foreground":"26 83.3% 14.1%",secondary:"60 4.8% 95.9%","secondary-foreground":"24 9.8% 10%",muted:"60 4.8% 95.9%","muted-foreground":"25 5.3% 44.7%",accent:"60 4.8% 95.9%","accent-foreground":"24 9.8% 10%",destructive:"0 84.2% 60.2%","destructive-foreground":"60 9.1% 97.8%",border:"20 5.9% 90%",input:"20 5.9% 90%",ring:"20 14.3% 4.1"}},dark:{default:{radius:"0.65rem",background:"0 0% 12.9%",foreground:"0 0% 98.5%",card:"0 0% 12.9%","card-foreground":"0 0% 98.5%",popover:"0 0% 12.9%","popover-foreground":"0 0% 98.5%",primary:"0 0% 92.2%","primary-foreground":"0 0% 20.5%",secondary:"0 0% 26.9%","secondary-foreground":"0 0% 98.5%",muted:"0 0% 26.9%","muted-foreground":"0 0% 70.8%",accent:"0 0% 26.9%","accent-foreground":"0 0% 98.5%",destructive:"0 62.8% 30.6%","destructive-foreground":"0 0% 98.5%",border:"0 0% 100% / 10%",input:"0 0% 100% / 15%",ring:"0 0% 55.6%"},red:{radius:"0.65rem",background:"0 0% 3.9%",foreground:"0 0% 98%",card:"0 0% 3.9%","card-foreground":"0 0% 98%",popover:"0 0% 3.9%","popover-foreground":"0 0% 98%",primary:"0 72.2% 50.6%","primary-foreground":"0 85.7% 97.3%",secondary:"0 0% 14.9%","secondary-foreground":"0 0% 98%",muted:"0 0% 14.9%","muted-foreground":"0 0% 63.9%",accent:"0 0% 14.9%","accent-foreground":"0 0% 98%",destructive:"0 62.8% 30.6%","destructive-foreground":"0 0% 98%",border:"0 0% 14.9%",input:"0 0% 14.9%",ring:"0 72.2% 50.6%"},blue:{radius:"0.65rem",background:"222.2 84% 4.9%",foreground:"210 40% 98%",card:"222.2 84% 4.9%","card-foreground":"210 40% 98%",popover:"222.2 84% 4.9%","popover-foreground":"210 40% 98%",primary:"217.2 91.2% 59.8%","primary-foreground":"222.2 47.4% 11.2%",secondary:"217.2 32.6% 17.5%","secondary-foreground":"210 40% 98%",muted:"217.2 32.6% 17.5%","muted-foreground":"215 20.2% 65.1%",accent:"217.2 32.6% 17.5%","accent-foreground":"210 40% 98%",destructive:"0 62.8% 30.6%","destructive-foreground":"210 40% 98%",border:"217.2 32.6% 17.5%",input:"217.2 32.6% 17.5%",ring:"224.3 76.3% 48%"},green:{radius:"0.65rem",background:"20 14.3% 4.1%",foreground:"0 0% 95%",card:"24 9.8% 10%","card-foreground":"0 0% 95%",popover:"0 0% 9%","popover-foreground":"0 0% 95%",primary:"142.1 70.6% 45.3%","primary-foreground":"144.9 80.4% 10%",secondary:"240 3.7% 15.9%","secondary-foreground":"0 0% 98%",muted:"0 0% 15%","muted-foreground":"240 5% 64.9%",accent:"12 6.5% 15.1%","accent-foreground":"0 0% 98%",destructive:"0 62.8% 30.6%","destructive-foreground":"0 85.7% 97.3%",border:"240 3.7% 15.9%",input:"240 3.7% 15.9%",ring:"142.4 71.8% 29.2%"},orange:{radius:"0.65rem",background:"20 14.3% 4.1%",foreground:"60 9.1% 97.8%",card:"20 14.3% 4.1%","card-foreground":"60 9.1% 97.8%",popover:"20 14.3% 4.1%","popover-foreground":"60 9.1% 97.8%",primary:"20.5 90.2% 48.2%","primary-foreground":"60 9.1% 97.8%",secondary:"12 6.5% 15.1%","secondary-foreground":"60 9.1% 97.8%",muted:"12 6.5% 15.1%","muted-foreground":"24 5.4% 63.9%",accent:"12 6.5% 15.1%","accent-foreground":"60 9.1% 97.8%",destructive:"0 72.2% 50.6%","destructive-foreground":"60 9.1% 97.8%",border:"12 6.5% 15.1%",input:"12 6.5% 15.1%",ring:"20.5 90.2% 48.2%"},rose:{radius:"0.65rem",background:"20 14.3% 4.1%",foreground:"0 0% 95%",card:"24 9.8% 10%","card-foreground":"0 0% 95%",popover:"0 0% 9%","popover-foreground":"0 0% 95%",primary:"346.8 77.2% 49.8%","primary-foreground":"355.7 100% 97.3%",secondary:"240 3.7% 15.9%","secondary-foreground":"0 0% 98%",muted:"0 0% 15%","muted-foreground":"240 5% 64.9%",accent:"12 6.5% 15.1%","accent-foreground":"0 0% 98%",destructive:"0 62.8% 30.6%","destructive-foreground":"0 85.7% 97.3%",border:"240 3.7% 15.9%",input:"240 3.7% 15.9%",ring:"346.8 77.2% 49.8%"},violet:{radius:"0.65rem",background:"224 71.4% 4.1%",foreground:"210 20% 98%",card:"224 71.4% 4.1%","card-foreground":"210 20% 98%",popover:"224 71.4% 4.1%","popover-foreground":"210 20% 98%",primary:"263.4 70% 50.4%","primary-foreground":"210 20% 98%",secondary:"215 27.9% 16.9%","secondary-foreground":"210 20% 98%",muted:"215 27.9% 16.9%","muted-foreground":"217.9 10.6% 64.9%",accent:"215 27.9% 16.9%","accent-foreground":"210 20% 98%",destructive:"0 62.8% 30.6%","destructive-foreground":"210 20% 98%",border:"215 27.9% 16.9%",input:"215 27.9% 16.9%",ring:"263.4 70% 50.4%"},yellow:{radius:"0.65rem",background:"20 14.3% 4.1%",foreground:"60 9.1% 97.8%",card:"20 14.3% 4.1%","card-foreground":"60 9.1% 97.8%",popover:"20 14.3% 4.1%","popover-foreground":"60 9.1% 97.8%",primary:"47.9 95.8% 53.1%","primary-foreground":"26 83.3% 14.1%",secondary:"12 6.5% 15.1%","secondary-foreground":"60 9.1% 97.8%",muted:"12 6.5% 15.1%","muted-foreground":"24 5.4% 63.9%",accent:"12 6.5% 15.1%","accent-foreground":"60 9.1% 97.8%",destructive:"0 62.8% 30.6%","destructive-foreground":"60 9.1% 97.8%",border:"12 6.5% 15.1%",input:"12 6.5% 15.1%",ring:"35.5 91.7% 32.9%"}}},d=o.y({theme:"light",color:"default",borderRadius:"0.65rem"});function c(){const{theme:r,color:e,borderRadius:u}=o.b(d);return{theme:r,color:e,borderRadius:u}}const t={setTheme:r=>{o.v(d).setValue(e=>({...e,theme:r}))},setColor:r=>{o.v(d).setValue(e=>({...e,color:r}))},setBorderRadius:r=>{o.v(d).setValue(e=>({...e,borderRadius:r}))}};exports.THEME=n;exports.themeActions=t;exports.useTheme=c;
package/lib/theme.js CHANGED
@@ -180,25 +180,25 @@ const t = {
180
180
  dark: {
181
181
  default: {
182
182
  radius: "0.65rem",
183
- background: "240 10% 3.9%",
184
- foreground: "0 0% 98%",
185
- card: "240 10% 3.9%",
186
- "card-foreground": "0 0% 98%",
187
- popover: "240 10% 3.9%",
188
- "popover-foreground": "0 0% 98%",
189
- primary: "0 0% 98%",
190
- "primary-foreground": "240 5.9% 10%",
191
- secondary: "240 3.7% 15.9%",
192
- "secondary-foreground": "0 0% 98%",
193
- muted: "240 3.7% 15.9%",
194
- "muted-foreground": "240 5% 64.9%",
195
- accent: "240 3.7% 15.9%",
196
- "accent-foreground": "0 0% 98%",
183
+ background: "0 0% 12.9%",
184
+ foreground: "0 0% 98.5%",
185
+ card: "0 0% 12.9%",
186
+ "card-foreground": "0 0% 98.5%",
187
+ popover: "0 0% 12.9%",
188
+ "popover-foreground": "0 0% 98.5%",
189
+ primary: "0 0% 92.2%",
190
+ "primary-foreground": "0 0% 20.5%",
191
+ secondary: "0 0% 26.9%",
192
+ "secondary-foreground": "0 0% 98.5%",
193
+ muted: "0 0% 26.9%",
194
+ "muted-foreground": "0 0% 70.8%",
195
+ accent: "0 0% 26.9%",
196
+ "accent-foreground": "0 0% 98.5%",
197
197
  destructive: "0 62.8% 30.6%",
198
- "destructive-foreground": "0 0% 98%",
199
- border: "240 3.7% 15.9%",
200
- input: "240 3.7% 15.9%",
201
- ring: "240 4.9% 83.9%"
198
+ "destructive-foreground": "0 0% 98.5%",
199
+ border: "0 0% 100% / 10%",
200
+ input: "0 0% 100% / 15%",
201
+ ring: "0 0% 55.6%"
202
202
  },
203
203
  red: {
204
204
  radius: "0.65rem",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remarkablejames/editor",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "description": "A modern WYSIWYG rich text editor based on tiptap and shadcn ui for React",
5
5
  "keywords": [
6
6
  "editor",
@@ -700,27 +700,6 @@
700
700
  }
701
701
  }
702
702
  },
703
- "scripts": {
704
- "build:lib": "vite build",
705
- "build:lib:dev": "vite build --mode development --watch",
706
- "build:playground": "pnpm build:lib && pnpm --dir ./playground run build",
707
- "docs:dev": "pnpm --parallel --filter docs... dev",
708
- "docs:build": "pnpm --filter docs... build",
709
- "docs:preview": "pnpm -C docs preview",
710
- "prepublishOnly": "pnpm build:lib",
711
- "playground": "pnpm --dir ./playground run dev",
712
- "preview": "pnpm --dir ./playground run preview",
713
- "lint": "oxlint",
714
- "lint:fix": "oxlint --fix",
715
- "fmt": "oxfmt",
716
- "fmt:check": "oxfmt --check",
717
- "type-check": "tsc",
718
- "verify-commit": "verify-commit-msg",
719
- "prepare": "git-scm-hooks",
720
- "release": "bumpp -r",
721
- "gen-changelog": "esno ./scripts/genExtensions.ts && esno ./scripts/changelog.ts",
722
- "gen-contributors": "contributorkit"
723
- },
724
703
  "dependencies": {
725
704
  "@excalidraw/excalidraw": "^0.18.0",
726
705
  "@floating-ui/dom": "^1.7.4",
@@ -842,17 +821,27 @@
842
821
  "node": ">=18.0.0"
843
822
  },
844
823
  "packageManager": "pnpm@8.15.9",
845
- "pnpm": {
846
- "overrides": {
847
- "@excalidraw/excalidraw>nanoid": "3.3.11",
848
- "@excalidraw/mermaid-to-excalidraw": "2.0.0",
849
- "@excalidraw/mermaid-to-excalidraw>nanoid": "5.1.6",
850
- "esbuild": "0.25.12",
851
- "prosemirror-view": "1.41.1"
852
- }
853
- },
854
824
  "git-hooks": {
855
825
  "pre-commit": "npm run lint:fix",
856
826
  "commit-msg": "npm run verify-commit"
827
+ },
828
+ "scripts": {
829
+ "build:lib": "vite build",
830
+ "build:lib:dev": "vite build --mode development --watch",
831
+ "build:playground": "pnpm build:lib && pnpm --dir ./playground run build",
832
+ "docs:dev": "pnpm --parallel --filter docs... dev",
833
+ "docs:build": "pnpm --filter docs... build",
834
+ "docs:preview": "pnpm -C docs preview",
835
+ "playground": "pnpm --dir ./playground run dev",
836
+ "preview": "pnpm --dir ./playground run preview",
837
+ "lint": "oxlint",
838
+ "lint:fix": "oxlint --fix",
839
+ "fmt": "oxfmt",
840
+ "fmt:check": "oxfmt --check",
841
+ "type-check": "tsc",
842
+ "verify-commit": "verify-commit-msg",
843
+ "release": "bumpp -r",
844
+ "gen-changelog": "esno ./scripts/genExtensions.ts && esno ./scripts/changelog.ts",
845
+ "gen-contributors": "contributorkit"
857
846
  }
858
- }
847
+ }
@@ -1,4 +0,0 @@
1
- "use strict";const Dr=require("./clsx-CXbNJWDD.cjs"),Y=require("react/jsx-runtime"),Ya=require("katex"),fr=require("react"),tr=require("./index-BynXHtjJ.cjs");require("./theme.cjs");const qo=require("./index-DgOXAdKt.cjs");var Gr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Po(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function Io(r){if(Object.prototype.hasOwnProperty.call(r,"__esModule"))return r;var e=r.default;if(typeof e=="function"){var n=function a(){return this instanceof a?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(r).forEach(function(a){var t=Object.getOwnPropertyDescriptor(r,a);Object.defineProperty(n,a,t.get?t:{enumerable:!0,get:function(){return r[a]}})}),n}function kt(r,e={}){if(typeof r=="object")return r;try{return JSON.parse(r)}catch{return e}}var ae,sn;function Xa(){if(sn)return ae;sn=1;var r=Object.prototype.toString;return ae=function(n){var a=r.call(n),t=a==="[object Arguments]";return t||(t=a!=="[object Array]"&&n!==null&&typeof n=="object"&&typeof n.length=="number"&&n.length>=0&&r.call(n.callee)==="[object Function]"),t},ae}var oe,ln;function Ro(){if(ln)return oe;ln=1;var r;if(!Object.keys){var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,a=Xa(),t=Object.prototype.propertyIsEnumerable,f=!t.call({toString:null},"toString"),i=t.call(function(){},"prototype"),o=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],u=function(y){var h=y.constructor;return h&&h.prototype===y},c={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},v=(function(){if(typeof window>"u")return!1;for(var y in window)try{if(!c["$"+y]&&e.call(window,y)&&window[y]!==null&&typeof window[y]=="object")try{u(window[y])}catch{return!0}}catch{return!0}return!1})(),p=function(y){if(typeof window>"u"||!v)return u(y);try{return u(y)}catch{return!1}};r=function(h){var S=h!==null&&typeof h=="object",R=n.call(h)==="[object Function]",w=a(h),q=S&&n.call(h)==="[object String]",O=[];if(!S&&!R&&!w)throw new TypeError("Object.keys called on a non-object");var m=i&&R;if(q&&h.length>0&&!e.call(h,0))for(var j=0;j<h.length;++j)O.push(String(j));if(w&&h.length>0)for(var Q=0;Q<h.length;++Q)O.push(String(Q));else for(var H in h)!(m&&H==="prototype")&&e.call(h,H)&&O.push(String(H));if(f)for(var F=p(h),D=0;D<o.length;++D)!(F&&o[D]==="constructor")&&e.call(h,o[D])&&O.push(o[D]);return O}}return oe=r,oe}var ie,cn;function Lt(){if(cn)return ie;cn=1;var r=Array.prototype.slice,e=Xa(),n=Object.keys,a=n?function(i){return n(i)}:Ro(),t=Object.keys;return a.shim=function(){if(Object.keys){var i=(function(){var o=Object.keys(arguments);return o&&o.length===arguments.length})(1,2);i||(Object.keys=function(u){return e(u)?t(r.call(u)):t(u)})}else Object.keys=a;return Object.keys||a},ie=a,ie}var ue,pn;function zr(){if(pn)return ue;pn=1;var r=Object.defineProperty||!1;if(r)try{r({},"a",{value:1})}catch{r=!1}return ue=r,ue}var fe,yn;function Ut(){return yn||(yn=1,fe=SyntaxError),fe}var se,vn;function ar(){return vn||(vn=1,se=TypeError),se}var le,gn;function $o(){return gn||(gn=1,le=Object.getOwnPropertyDescriptor),le}var ce,hn;function qr(){if(hn)return ce;hn=1;var r=$o();if(r)try{r([],"length")}catch{r=null}return ce=r,ce}var pe,dn;function Ht(){if(dn)return pe;dn=1;var r=zr(),e=Ut(),n=ar(),a=qr();return pe=function(f,i,o){if(!f||typeof f!="object"&&typeof f!="function")throw new n("`obj` must be an object or a function`");if(typeof i!="string"&&typeof i!="symbol")throw new n("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new n("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new n("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new n("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new n("`loose`, if provided, must be a boolean");var u=arguments.length>3?arguments[3]:null,c=arguments.length>4?arguments[4]:null,v=arguments.length>5?arguments[5]:null,p=arguments.length>6?arguments[6]:!1,y=!!a&&a(f,i);if(r)r(f,i,{configurable:v===null&&y?y.configurable:!v,enumerable:u===null&&y?y.enumerable:!u,value:o,writable:c===null&&y?y.writable:!c});else if(p||!u&&!c&&!v)f[i]=o;else throw new e("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},pe}var ye,mn;function Gt(){if(mn)return ye;mn=1;var r=zr(),e=function(){return!!r};return e.hasArrayLengthDefineBug=function(){if(!r)return null;try{return r([],"length",{value:1}).length!==1}catch{return!0}},ye=e,ye}var ve,Sn;function Pr(){if(Sn)return ve;Sn=1;var r=Lt(),e=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",n=Object.prototype.toString,a=Array.prototype.concat,t=Ht(),f=function(c){return typeof c=="function"&&n.call(c)==="[object Function]"},i=Gt()(),o=function(c,v,p,y){if(v in c){if(y===!0){if(c[v]===p)return}else if(!f(y)||!y())return}i?t(c,v,p,!0):t(c,v,p)},u=function(c,v){var p=arguments.length>2?arguments[2]:{},y=r(v);e&&(y=a.call(y,Object.getOwnPropertySymbols(v)));for(var h=0;h<y.length;h+=1)o(c,y[h],v[y[h]],p[y[h]])};return u.supportsDescriptors=!!i,ve=u,ve}var ge={exports:{}},he,bn;function zt(){return bn||(bn=1,he=Object),he}var de,An;function Qa(){return An||(An=1,de=Error),de}var me,On;function xo(){return On||(On=1,me=EvalError),me}var Se,wn;function Eo(){return wn||(wn=1,Se=RangeError),Se}var be,qn;function Bo(){return qn||(qn=1,be=ReferenceError),be}var Ae,Pn;function jo(){return Pn||(Pn=1,Ae=URIError),Ae}var Oe,In;function Mo(){return In||(In=1,Oe=Math.abs),Oe}var we,Rn;function To(){return Rn||(Rn=1,we=Math.floor),we}var qe,$n;function Co(){return $n||($n=1,qe=Math.max),qe}var Pe,xn;function Do(){return xn||(xn=1,Pe=Math.min),Pe}var Ie,En;function Fo(){return En||(En=1,Ie=Math.pow),Ie}var Re,Bn;function _o(){return Bn||(Bn=1,Re=Math.round),Re}var $e,jn;function No(){return jn||(jn=1,$e=Number.isNaN||function(e){return e!==e}),$e}var xe,Mn;function Wo(){if(Mn)return xe;Mn=1;var r=No();return xe=function(n){return r(n)||n===0?n:n<0?-1:1},xe}var Ee,Tn;function Vr(){return Tn||(Tn=1,Ee=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},n=Symbol("test"),a=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(a)!=="[object Symbol]")return!1;var t=42;e[n]=t;for(var f in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var i=Object.getOwnPropertySymbols(e);if(i.length!==1||i[0]!==n||!Object.prototype.propertyIsEnumerable.call(e,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(e,n);if(o.value!==t||o.enumerable!==!0)return!1}return!0}),Ee}var Be,Cn;function Vt(){if(Cn)return Be;Cn=1;var r=typeof Symbol<"u"&&Symbol,e=Vr();return Be=function(){return typeof r!="function"||typeof Symbol!="function"||typeof r("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},Be}var je,Dn;function Za(){return Dn||(Dn=1,je=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),je}var Me,Fn;function ro(){if(Fn)return Me;Fn=1;var r=zt();return Me=r.getPrototypeOf||null,Me}var Te,_n;function ko(){if(_n)return Te;_n=1;var r="Function.prototype.bind called on incompatible ",e=Object.prototype.toString,n=Math.max,a="[object Function]",t=function(u,c){for(var v=[],p=0;p<u.length;p+=1)v[p]=u[p];for(var y=0;y<c.length;y+=1)v[y+u.length]=c[y];return v},f=function(u,c){for(var v=[],p=c,y=0;p<u.length;p+=1,y+=1)v[y]=u[p];return v},i=function(o,u){for(var c="",v=0;v<o.length;v+=1)c+=o[v],v+1<o.length&&(c+=u);return c};return Te=function(u){var c=this;if(typeof c!="function"||e.apply(c)!==a)throw new TypeError(r+c);for(var v=f(arguments,1),p,y=function(){if(this instanceof p){var q=c.apply(this,t(v,arguments));return Object(q)===q?q:this}return c.apply(u,t(v,arguments))},h=n(0,c.length-v.length),S=[],R=0;R<h;R++)S[R]="$"+R;if(p=Function("binder","return function ("+i(S,",")+"){ return binder.apply(this,arguments); }")(y),c.prototype){var w=function(){};w.prototype=c.prototype,p.prototype=new w,w.prototype=null}return p},Te}var Ce,Nn;function Fr(){if(Nn)return Ce;Nn=1;var r=ko();return Ce=Function.prototype.bind||r,Ce}var De,Wn;function Kt(){return Wn||(Wn=1,De=Function.prototype.call),De}var Fe,kn;function Jt(){return kn||(kn=1,Fe=Function.prototype.apply),Fe}var _e,Ln;function Lo(){return Ln||(Ln=1,_e=typeof Reflect<"u"&&Reflect&&Reflect.apply),_e}var Ne,Un;function eo(){if(Un)return Ne;Un=1;var r=Fr(),e=Jt(),n=Kt(),a=Lo();return Ne=a||r.call(n,e),Ne}var We,Hn;function Yt(){if(Hn)return We;Hn=1;var r=Fr(),e=ar(),n=Kt(),a=eo();return We=function(f){if(f.length<1||typeof f[0]!="function")throw new e("a function is required");return a(r,n,f)},We}var ke,Gn;function Uo(){if(Gn)return ke;Gn=1;var r=Yt(),e=qr(),n;try{n=[].__proto__===Array.prototype}catch(i){if(!i||typeof i!="object"||!("code"in i)||i.code!=="ERR_PROTO_ACCESS")throw i}var a=!!n&&e&&e(Object.prototype,"__proto__"),t=Object,f=t.getPrototypeOf;return ke=a&&typeof a.get=="function"?r([a.get]):typeof f=="function"?function(o){return f(o==null?o:t(o))}:!1,ke}var Le,zn;function Xt(){if(zn)return Le;zn=1;var r=Za(),e=ro(),n=Uo();return Le=r?function(t){return r(t)}:e?function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return e(t)}:n?function(t){return n(t)}:null,Le}var Ue,Vn;function Qt(){if(Vn)return Ue;Vn=1;var r=Function.prototype.call,e=Object.prototype.hasOwnProperty,n=Fr();return Ue=n.call(r,e),Ue}var He,Kn;function vr(){if(Kn)return He;Kn=1;var r,e=zt(),n=Qa(),a=xo(),t=Eo(),f=Bo(),i=Ut(),o=ar(),u=jo(),c=Mo(),v=To(),p=Co(),y=Do(),h=Fo(),S=_o(),R=Wo(),w=Function,q=function(T){try{return w('"use strict"; return ('+T+").constructor;")()}catch{}},O=qr(),m=zr(),j=function(){throw new o},Q=O?(function(){try{return arguments.callee,j}catch{try{return O(arguments,"callee").get}catch{return j}}})():j,H=Vt()(),F=Xt(),D=ro(),P=Za(),_=Jt(),L=Kt(),N={},U=typeof Uint8Array>"u"||!F?r:F(Uint8Array),V={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":H&&F?F([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":N,"%AsyncGenerator%":N,"%AsyncGeneratorFunction%":N,"%AsyncIteratorPrototype%":N,"%Atomics%":typeof Atomics>"u"?r:Atomics,"%BigInt%":typeof BigInt>"u"?r:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?r:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":a,"%Float16Array%":typeof Float16Array>"u"?r:Float16Array,"%Float32Array%":typeof Float32Array>"u"?r:Float32Array,"%Float64Array%":typeof Float64Array>"u"?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?r:FinalizationRegistry,"%Function%":w,"%GeneratorFunction%":N,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":H&&F?F(F([][Symbol.iterator]())):r,"%JSON%":typeof JSON=="object"?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!H||!F?r:F(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":e,"%Object.getOwnPropertyDescriptor%":O,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?r:Promise,"%Proxy%":typeof Proxy>"u"?r:Proxy,"%RangeError%":t,"%ReferenceError%":f,"%Reflect%":typeof Reflect>"u"?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?r:Set,"%SetIteratorPrototype%":typeof Set>"u"||!H||!F?r:F(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":H&&F?F(""[Symbol.iterator]()):r,"%Symbol%":H?Symbol:r,"%SyntaxError%":i,"%ThrowTypeError%":Q,"%TypedArray%":U,"%TypeError%":o,"%Uint8Array%":typeof Uint8Array>"u"?r:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?r:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?r:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?r:Uint32Array,"%URIError%":u,"%WeakMap%":typeof WeakMap>"u"?r:WeakMap,"%WeakRef%":typeof WeakRef>"u"?r:WeakRef,"%WeakSet%":typeof WeakSet>"u"?r:WeakSet,"%Function.prototype.call%":L,"%Function.prototype.apply%":_,"%Object.defineProperty%":m,"%Object.getPrototypeOf%":D,"%Math.abs%":c,"%Math.floor%":v,"%Math.max%":p,"%Math.min%":y,"%Math.pow%":h,"%Math.round%":S,"%Math.sign%":R,"%Reflect.getPrototypeOf%":P};if(F)try{null.error}catch(T){var sr=F(F(T));V["%Error.prototype%"]=sr}var Rr=function T(A){var I;if(A==="%AsyncFunction%")I=q("async function () {}");else if(A==="%GeneratorFunction%")I=q("function* () {}");else if(A==="%AsyncGeneratorFunction%")I=q("async function* () {}");else if(A==="%AsyncGenerator%"){var b=T("%AsyncGeneratorFunction%");b&&(I=b.prototype)}else if(A==="%AsyncIteratorPrototype%"){var E=T("%AsyncGenerator%");E&&F&&(I=F(E.prototype))}return V[A]=I,I},br={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},or=Fr(),G=Qt(),Ar=or.call(L,Array.prototype.concat),$r=or.call(_,Array.prototype.splice),Or=or.call(L,String.prototype.replace),gr=or.call(L,String.prototype.slice),g=or.call(L,RegExp.prototype.exec),d=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,x=/\\(\\)?/g,$=function(A){var I=gr(A,0,1),b=gr(A,-1);if(I==="%"&&b!=="%")throw new i("invalid intrinsic syntax, expected closing `%`");if(b==="%"&&I!=="%")throw new i("invalid intrinsic syntax, expected opening `%`");var E=[];return Or(A,d,function(z,K,J,X){E[E.length]=J?Or(X,x,"$1"):K||z}),E},M=function(A,I){var b=A,E;if(G(br,b)&&(E=br[b],b="%"+E[0]+"%"),G(V,b)){var z=V[b];if(z===N&&(z=Rr(b)),typeof z>"u"&&!I)throw new o("intrinsic "+A+" exists, but is not available. Please file an issue!");return{alias:E,name:b,value:z}}throw new i("intrinsic "+A+" does not exist!")};return He=function(A,I){if(typeof A!="string"||A.length===0)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof I!="boolean")throw new o('"allowMissing" argument must be a boolean');if(g(/^%?[^%]*%?$/,A)===null)throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var b=$(A),E=b.length>0?b[0]:"",z=M("%"+E+"%",I),K=z.name,J=z.value,X=!1,rr=z.alias;rr&&(E=rr[0],$r(b,Ar([0,1],rr)));for(var lr=1,ir=!0;lr<b.length;lr+=1){var er=b[lr],cr=gr(er,0,1),pr=gr(er,-1);if((cr==='"'||cr==="'"||cr==="`"||pr==='"'||pr==="'"||pr==="`")&&cr!==pr)throw new i("property names with quotes must have matching quotes");if((er==="constructor"||!ir)&&(X=!0),E+="."+er,K="%"+E+"%",G(V,K))J=V[K];else if(J!=null){if(!(er in J)){if(!I)throw new o("base intrinsic for "+A+" exists, but the property is not available.");return}if(O&&lr+1>=b.length){var yr=O(J,er);ir=!!yr,ir&&"get"in yr&&!("originalValue"in yr.get)?J=yr.get:J=J[er]}else ir=G(J,er),J=J[er];ir&&!X&&(V[K]=J)}}return J},He}var Ge,Jn;function Ho(){if(Jn)return Ge;Jn=1;var r=vr(),e=Ht(),n=Gt()(),a=qr(),t=ar(),f=r("%Math.floor%");return Ge=function(o,u){if(typeof o!="function")throw new t("`fn` is not a function");if(typeof u!="number"||u<0||u>4294967295||f(u)!==u)throw new t("`length` must be a positive 32-bit integer");var c=arguments.length>2&&!!arguments[2],v=!0,p=!0;if("length"in o&&a){var y=a(o,"length");y&&!y.configurable&&(v=!1),y&&!y.writable&&(p=!1)}return(v||p||!c)&&(n?e(o,"length",u,!0,!0):e(o,"length",u)),o},Ge}var ze,Yn;function Go(){if(Yn)return ze;Yn=1;var r=Fr(),e=Jt(),n=eo();return ze=function(){return n(r,e,arguments)},ze}var Xn;function jr(){return Xn||(Xn=1,(function(r){var e=Ho(),n=zr(),a=Yt(),t=Go();r.exports=function(i){var o=a(arguments),u=i.length-(arguments.length-1);return e(o,1+(u>0?u:0),!0)},n?n(r.exports,"apply",{value:t}):r.exports.apply=t})(ge)),ge.exports}var Ve,Qn;function Z(){if(Qn)return Ve;Qn=1;var r=vr(),e=Yt(),n=e([r("%String.prototype.indexOf%")]);return Ve=function(t,f){var i=r(t,!!f);return typeof i=="function"&&n(t,".prototype.")>-1?e([i]):i},Ve}var Ke,Zn;function to(){if(Zn)return Ke;Zn=1;var r=Lt(),e=Vr()(),n=Z(),a=zt(),t=n("Array.prototype.push"),f=n("Object.prototype.propertyIsEnumerable"),i=e?a.getOwnPropertySymbols:null;return Ke=function(u,c){if(u==null)throw new TypeError("target must be an object");var v=a(u);if(arguments.length===1)return v;for(var p=1;p<arguments.length;++p){var y=a(arguments[p]),h=r(y),S=e&&(a.getOwnPropertySymbols||i);if(S)for(var R=S(y),w=0;w<R.length;++w){var q=R[w];f(y,q)&&t(h,q)}for(var O=0;O<h.length;++O){var m=h[O];if(f(y,m)){var j=y[m];v[m]=j}}}return v},Ke}var Je,ra;function no(){if(ra)return Je;ra=1;var r=to(),e=function(){if(!Object.assign)return!1;for(var a="abcdefghijklmnopqrst",t=a.split(""),f={},i=0;i<t.length;++i)f[t[i]]=t[i];var o=Object.assign({},f),u="";for(var c in o)u+=c;return a!==u},n=function(){if(!Object.assign||!Object.preventExtensions)return!1;var a=Object.preventExtensions({1:2});try{Object.assign(a,"xy")}catch{return a[1]==="y"}return!1};return Je=function(){return!Object.assign||e()||n()?r:Object.assign},Je}var Ye,ea;function zo(){if(ea)return Ye;ea=1;var r=Pr(),e=no();return Ye=function(){var a=e();return r(Object,{assign:a},{assign:function(){return Object.assign!==a}}),a},Ye}var Xe,ta;function Vo(){if(ta)return Xe;ta=1;var r=Pr(),e=jr(),n=to(),a=no(),t=zo(),f=e.apply(a()),i=function(u,c){return f(Object,arguments)};return r(i,{getPolyfill:a,implementation:n,shim:t}),Xe=i,Xe}var Qe,na;function ao(){if(na)return Qe;na=1;var r=vr(),e=jr(),n=e(r("String.prototype.indexOf"));return Qe=function(t,f){var i=r(t,!!f);return typeof i=="function"&&n(t,".prototype.")>-1?e(i):i},Qe}var Ze,aa;function Ko(){if(aa)return Ze;aa=1;var r=function(){return typeof(function(){}).name=="string"},e=Object.getOwnPropertyDescriptor;if(e)try{e([],"length")}catch{e=null}r.functionsHaveConfigurableNames=function(){if(!r()||!e)return!1;var t=e(function(){},"name");return!!t&&!!t.configurable};var n=Function.prototype.bind;return r.boundFunctionsHaveNames=function(){return r()&&typeof n=="function"&&(function(){}).bind().name!==""},Ze=r,Ze}var rt,oa;function Jo(){if(oa)return rt;oa=1;var r=Ht(),e=Gt()(),n=Ko().functionsHaveConfigurableNames(),a=ar();return rt=function(f,i){if(typeof f!="function")throw new a("`fn` is not a function");var o=arguments.length>2&&!!arguments[2];return(!o||n)&&(e?r(f,"name",i,!0,!0):r(f,"name",i)),f},rt}var et,ia;function oo(){if(ia)return et;ia=1;var r=Jo(),e=ar(),n=Object;return et=r(function(){if(this==null||this!==n(this))throw new e("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t},"get flags",!0),et}var tt,ua;function io(){if(ua)return tt;ua=1;var r=oo(),e=Pr().supportsDescriptors,n=Object.getOwnPropertyDescriptor;return tt=function(){if(e&&/a/mig.flags==="gim"){var t=n(RegExp.prototype,"flags");if(t&&typeof t.get=="function"&&"dotAll"in RegExp.prototype&&"hasIndices"in RegExp.prototype){var f="",i={};if(Object.defineProperty(i,"hasIndices",{get:function(){f+="d"}}),Object.defineProperty(i,"sticky",{get:function(){f+="y"}}),t.get.call(i),f==="dy")return t.get}}return r},tt}var nt,fa;function Yo(){if(fa)return nt;fa=1;var r=Pr().supportsDescriptors,e=io(),n=qr(),a=Object.defineProperty,t=Qa(),f=Xt(),i=/a/;return nt=function(){if(!r||!f)throw new t("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var u=e(),c=f(i),v=n(c,"flags");return(!v||v.get!==u)&&a(c,"flags",{configurable:!0,enumerable:!1,get:u}),u},nt}var at,sa;function Xo(){if(sa)return at;sa=1;var r=Pr(),e=jr(),n=oo(),a=io(),t=Yo(),f=e(a());return r(f,{getPolyfill:a,implementation:n,shim:t}),at=f,at}var Cr={exports:{}},ot,la;function Ir(){if(la)return ot;la=1;var r=Vr();return ot=function(){return r()&&!!Symbol.toStringTag},ot}var it,ca;function uo(){if(ca)return it;ca=1;var r=Ir()(),e=Z(),n=e("Object.prototype.toString"),a=function(o){return r&&o&&typeof o=="object"&&Symbol.toStringTag in o?!1:n(o)==="[object Arguments]"},t=function(o){return a(o)?!0:o!==null&&typeof o=="object"&&"length"in o&&typeof o.length=="number"&&o.length>=0&&n(o)!=="[object Array]"&&"callee"in o&&n(o.callee)==="[object Function]"},f=(function(){return a(arguments)})();return a.isLegacyArguments=t,it=f?a:t,it}const Qo={},Zo=Object.freeze(Object.defineProperty({__proto__:null,default:Qo},Symbol.toStringTag,{value:"Module"})),ri=Io(Zo);var ut,pa;function Kr(){if(pa)return ut;pa=1;var r=typeof Map=="function"&&Map.prototype,e=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,n=r&&e&&typeof e.get=="function"?e.get:null,a=r&&Map.prototype.forEach,t=typeof Set=="function"&&Set.prototype,f=Object.getOwnPropertyDescriptor&&t?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,i=t&&f&&typeof f.get=="function"?f.get:null,o=t&&Set.prototype.forEach,u=typeof WeakMap=="function"&&WeakMap.prototype,c=u?WeakMap.prototype.has:null,v=typeof WeakSet=="function"&&WeakSet.prototype,p=v?WeakSet.prototype.has:null,y=typeof WeakRef=="function"&&WeakRef.prototype,h=y?WeakRef.prototype.deref:null,S=Boolean.prototype.valueOf,R=Object.prototype.toString,w=Function.prototype.toString,q=String.prototype.match,O=String.prototype.slice,m=String.prototype.replace,j=String.prototype.toUpperCase,Q=String.prototype.toLowerCase,H=RegExp.prototype.test,F=Array.prototype.concat,D=Array.prototype.join,P=Array.prototype.slice,_=Math.floor,L=typeof BigInt=="function"?BigInt.prototype.valueOf:null,N=Object.getOwnPropertySymbols,U=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,V=typeof Symbol=="function"&&typeof Symbol.iterator=="object",sr=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===V||!0)?Symbol.toStringTag:null,Rr=Object.prototype.propertyIsEnumerable,br=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(s){return s.__proto__}:null);function or(s,l){if(s===1/0||s===-1/0||s!==s||s&&s>-1e3&&s<1e3||H.call(/e/,l))return l;var C=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof s=="number"){var W=s<0?-_(-s):_(s);if(W!==s){var k=String(W),B=O.call(l,k.length+1);return m.call(k,C,"$&_")+"."+m.call(m.call(B,/([0-9]{3})/g,"$&_"),/_$/,"")}}return m.call(l,C,"$&_")}var G=ri,Ar=G.custom,$r=z(Ar)?Ar:null,Or={__proto__:null,double:'"',single:"'"},gr={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};ut=function s(l,C,W,k){var B=C||{};if(X(B,"quoteStyle")&&!X(Or,B.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(X(B,"maxStringLength")&&(typeof B.maxStringLength=="number"?B.maxStringLength<0&&B.maxStringLength!==1/0:B.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var mr=X(B,"customInspect")?B.customInspect:!0;if(typeof mr!="boolean"&&mr!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(X(B,"indent")&&B.indent!==null&&B.indent!==" "&&!(parseInt(B.indent,10)===B.indent&&B.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(X(B,"numericSeparator")&&typeof B.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var wr=B.numericSeparator;if(typeof l>"u")return"undefined";if(l===null)return"null";if(typeof l=="boolean")return l?"true":"false";if(typeof l=="string")return xr(l,B);if(typeof l=="number"){if(l===0)return 1/0/l>0?"0":"-0";var nr=String(l);return wr?or(l,nr):nr}if(typeof l=="bigint"){var Sr=String(l)+"n";return wr?or(l,Sr):Sr}var Xr=typeof B.depth>"u"?5:B.depth;if(typeof W>"u"&&(W=0),W>=Xr&&Xr>0&&typeof l=="object")return $(l)?"[Array]":"[Object]";var Er=Ao(B,W);if(typeof k>"u")k=[];else if(ir(k,l)>=0)return"[Circular]";function ur(Br,kr,wo){if(kr&&(k=P.call(k),k.push(kr)),wo){var fn={depth:B.depth};return X(B,"quoteStyle")&&(fn.quoteStyle=B.quoteStyle),s(Br,fn,W+1,k)}return s(Br,B,W+1,k)}if(typeof l=="function"&&!T(l)){var rn=lr(l),en=Nr(l,ur);return"[Function"+(rn?": "+rn:" (anonymous)")+"]"+(en.length>0?" { "+D.call(en,", ")+" }":"")}if(z(l)){var tn=V?m.call(String(l),/^(Symbol\(.*\))_[^)]*$/,"$1"):U.call(l);return typeof l=="object"&&!V?dr(tn):tn}if(hr(l)){for(var Tr="<"+Q.call(String(l.nodeName)),Qr=l.attributes||[],Wr=0;Wr<Qr.length;Wr++)Tr+=" "+Qr[Wr].name+"="+g(d(Qr[Wr].value),"double",B);return Tr+=">",l.childNodes&&l.childNodes.length&&(Tr+="..."),Tr+="</"+Q.call(String(l.nodeName))+">",Tr}if($(l)){if(l.length===0)return"[]";var Zr=Nr(l,ur);return Er&&!bo(Zr)?"["+Yr(Zr,Er)+"]":"[ "+D.call(Zr,", ")+" ]"}if(A(l)){var re=Nr(l,ur);return!("cause"in Error.prototype)&&"cause"in l&&!Rr.call(l,"cause")?"{ ["+String(l)+"] "+D.call(F.call("[cause]: "+ur(l.cause),re),", ")+" }":re.length===0?"["+String(l)+"]":"{ ["+String(l)+"] "+D.call(re,", ")+" }"}if(typeof l=="object"&&mr){if($r&&typeof l[$r]=="function"&&G)return G(l,{depth:Xr-W});if(mr!=="symbol"&&typeof l.inspect=="function")return l.inspect()}if(er(l)){var nn=[];return a&&a.call(l,function(Br,kr){nn.push(ur(kr,l,!0)+" => "+ur(Br,l))}),Zt("Map",n.call(l),nn,Er)}if(yr(l)){var an=[];return o&&o.call(l,function(Br){an.push(ur(Br,l))}),Zt("Set",i.call(l),an,Er)}if(cr(l))return Jr("WeakMap");if(_r(l))return Jr("WeakSet");if(pr(l))return Jr("WeakRef");if(b(l))return dr(ur(Number(l)));if(K(l))return dr(ur(L.call(l)));if(E(l))return dr(S.call(l));if(I(l))return dr(ur(String(l)));if(typeof window<"u"&&l===window)return"{ [object Window] }";if(typeof globalThis<"u"&&l===globalThis||typeof Gr<"u"&&l===Gr)return"{ [object globalThis] }";if(!M(l)&&!T(l)){var ee=Nr(l,ur),on=br?br(l)===Object.prototype:l instanceof Object||l.constructor===Object,te=l instanceof Object?"":"null prototype",un=!on&&sr&&Object(l)===l&&sr in l?O.call(rr(l),8,-1):te?"Object":"",Oo=on||typeof l.constructor!="function"?"":l.constructor.name?l.constructor.name+" ":"",ne=Oo+(un||te?"["+D.call(F.call([],un||[],te||[]),": ")+"] ":"");return ee.length===0?ne+"{}":Er?ne+"{"+Yr(ee,Er)+"}":ne+"{ "+D.call(ee,", ")+" }"}return String(l)};function g(s,l,C){var W=C.quoteStyle||l,k=Or[W];return k+s+k}function d(s){return m.call(String(s),/"/g,"&quot;")}function x(s){return!sr||!(typeof s=="object"&&(sr in s||typeof s[sr]<"u"))}function $(s){return rr(s)==="[object Array]"&&x(s)}function M(s){return rr(s)==="[object Date]"&&x(s)}function T(s){return rr(s)==="[object RegExp]"&&x(s)}function A(s){return rr(s)==="[object Error]"&&x(s)}function I(s){return rr(s)==="[object String]"&&x(s)}function b(s){return rr(s)==="[object Number]"&&x(s)}function E(s){return rr(s)==="[object Boolean]"&&x(s)}function z(s){if(V)return s&&typeof s=="object"&&s instanceof Symbol;if(typeof s=="symbol")return!0;if(!s||typeof s!="object"||!U)return!1;try{return U.call(s),!0}catch{}return!1}function K(s){if(!s||typeof s!="object"||!L)return!1;try{return L.call(s),!0}catch{}return!1}var J=Object.prototype.hasOwnProperty||function(s){return s in this};function X(s,l){return J.call(s,l)}function rr(s){return R.call(s)}function lr(s){if(s.name)return s.name;var l=q.call(w.call(s),/^function\s*([\w$]+)/);return l?l[1]:null}function ir(s,l){if(s.indexOf)return s.indexOf(l);for(var C=0,W=s.length;C<W;C++)if(s[C]===l)return C;return-1}function er(s){if(!n||!s||typeof s!="object")return!1;try{n.call(s);try{i.call(s)}catch{return!0}return s instanceof Map}catch{}return!1}function cr(s){if(!c||!s||typeof s!="object")return!1;try{c.call(s,c);try{p.call(s,p)}catch{return!0}return s instanceof WeakMap}catch{}return!1}function pr(s){if(!h||!s||typeof s!="object")return!1;try{return h.call(s),!0}catch{}return!1}function yr(s){if(!i||!s||typeof s!="object")return!1;try{i.call(s);try{n.call(s)}catch{return!0}return s instanceof Set}catch{}return!1}function _r(s){if(!p||!s||typeof s!="object")return!1;try{p.call(s,p);try{c.call(s,c)}catch{return!0}return s instanceof WeakSet}catch{}return!1}function hr(s){return!s||typeof s!="object"?!1:typeof HTMLElement<"u"&&s instanceof HTMLElement?!0:typeof s.nodeName=="string"&&typeof s.getAttribute=="function"}function xr(s,l){if(s.length>l.maxStringLength){var C=s.length-l.maxStringLength,W="... "+C+" more character"+(C>1?"s":"");return xr(O.call(s,0,l.maxStringLength),l)+W}var k=gr[l.quoteStyle||"single"];k.lastIndex=0;var B=m.call(m.call(s,k,"\\$1"),/[\x00-\x1f]/g,Mr);return g(B,"single",l)}function Mr(s){var l=s.charCodeAt(0),C={8:"b",9:"t",10:"n",12:"f",13:"r"}[l];return C?"\\"+C:"\\x"+(l<16?"0":"")+j.call(l.toString(16))}function dr(s){return"Object("+s+")"}function Jr(s){return s+" { ? }"}function Zt(s,l,C,W){var k=W?Yr(C,W):D.call(C,", ");return s+" ("+l+") {"+k+"}"}function bo(s){for(var l=0;l<s.length;l++)if(ir(s[l],`
2
- `)>=0)return!1;return!0}function Ao(s,l){var C;if(s.indent===" ")C=" ";else if(typeof s.indent=="number"&&s.indent>0)C=D.call(Array(s.indent+1)," ");else return null;return{base:C,prev:D.call(Array(l+1),C)}}function Yr(s,l){if(s.length===0)return"";var C=`
3
- `+l.prev+l.base;return C+D.call(s,","+C)+`
4
- `+l.prev}function Nr(s,l){var C=$(s),W=[];if(C){W.length=s.length;for(var k=0;k<s.length;k++)W[k]=X(s,k)?l(s[k],s):""}var B=typeof N=="function"?N(s):[],mr;if(V){mr={};for(var wr=0;wr<B.length;wr++)mr["$"+B[wr]]=B[wr]}for(var nr in s)X(s,nr)&&(C&&String(Number(nr))===nr&&nr<s.length||V&&mr["$"+nr]instanceof Symbol||(H.call(/[^\w$]/,nr)?W.push(l(nr,s)+": "+l(s[nr],s)):W.push(nr+": "+l(s[nr],s))));if(typeof N=="function")for(var Sr=0;Sr<B.length;Sr++)Rr.call(s,B[Sr])&&W.push("["+l(B[Sr])+"]: "+l(s[B[Sr]],s));return W}return ut}var ft,ya;function ei(){if(ya)return ft;ya=1;var r=Kr(),e=ar(),n=function(o,u,c){for(var v=o,p;(p=v.next)!=null;v=p)if(p.key===u)return v.next=p.next,c||(p.next=o.next,o.next=p),p},a=function(o,u){if(o){var c=n(o,u);return c&&c.value}},t=function(o,u,c){var v=n(o,u);v?v.value=c:o.next={key:u,next:o.next,value:c}},f=function(o,u){return o?!!n(o,u):!1},i=function(o,u){if(o)return n(o,u,!0)};return ft=function(){var u,c={assert:function(v){if(!c.has(v))throw new e("Side channel does not contain "+r(v))},delete:function(v){var p=u&&u.next,y=i(u,v);return y&&p&&p===y&&(u=void 0),!!y},get:function(v){return a(u,v)},has:function(v){return f(u,v)},set:function(v,p){u||(u={next:void 0}),t(u,v,p)}};return c},ft}var st,va;function fo(){if(va)return st;va=1;var r=vr(),e=Z(),n=Kr(),a=ar(),t=r("%Map%",!0),f=e("Map.prototype.get",!0),i=e("Map.prototype.set",!0),o=e("Map.prototype.has",!0),u=e("Map.prototype.delete",!0),c=e("Map.prototype.size",!0);return st=!!t&&function(){var p,y={assert:function(h){if(!y.has(h))throw new a("Side channel does not contain "+n(h))},delete:function(h){if(p){var S=u(p,h);return c(p)===0&&(p=void 0),S}return!1},get:function(h){if(p)return f(p,h)},has:function(h){return p?o(p,h):!1},set:function(h,S){p||(p=new t),i(p,h,S)}};return y},st}var lt,ga;function ti(){if(ga)return lt;ga=1;var r=vr(),e=Z(),n=Kr(),a=fo(),t=ar(),f=r("%WeakMap%",!0),i=e("WeakMap.prototype.get",!0),o=e("WeakMap.prototype.set",!0),u=e("WeakMap.prototype.has",!0),c=e("WeakMap.prototype.delete",!0);return lt=f?function(){var p,y,h={assert:function(S){if(!h.has(S))throw new t("Side channel does not contain "+n(S))},delete:function(S){if(f&&S&&(typeof S=="object"||typeof S=="function")){if(p)return c(p,S)}else if(a&&y)return y.delete(S);return!1},get:function(S){return f&&S&&(typeof S=="object"||typeof S=="function")&&p?i(p,S):y&&y.get(S)},has:function(S){return f&&S&&(typeof S=="object"||typeof S=="function")&&p?u(p,S):!!y&&y.has(S)},set:function(S,R){f&&S&&(typeof S=="object"||typeof S=="function")?(p||(p=new f),o(p,S,R)):a&&(y||(y=a()),y.set(S,R))}};return h}:a,lt}var ct,ha;function so(){if(ha)return ct;ha=1;var r=ar(),e=Kr(),n=ei(),a=fo(),t=ti(),f=t||a||n;return ct=function(){var o,u={assert:function(c){if(!u.has(c))throw new r("Side channel does not contain "+e(c))},delete:function(c){return!!o&&o.delete(c)},get:function(c){return o&&o.get(c)},has:function(c){return!!o&&o.has(c)},set:function(c,v){o||(o=f()),o.set(c,v)}};return u},ct}var pt,da;function ni(){if(da)return pt;da=1;var r=Qt(),e=so()(),n=ar(),a={assert:function(t,f){if(!t||typeof t!="object"&&typeof t!="function")throw new n("`O` is not an object");if(typeof f!="string")throw new n("`slot` must be a string");if(e.assert(t),!a.has(t,f))throw new n("`"+f+"` is not present on `O`")},get:function(t,f){if(!t||typeof t!="object"&&typeof t!="function")throw new n("`O` is not an object");if(typeof f!="string")throw new n("`slot` must be a string");var i=e.get(t);return i&&i["$"+f]},has:function(t,f){if(!t||typeof t!="object"&&typeof t!="function")throw new n("`O` is not an object");if(typeof f!="string")throw new n("`slot` must be a string");var i=e.get(t);return!!i&&r(i,"$"+f)},set:function(t,f,i){if(!t||typeof t!="object"&&typeof t!="function")throw new n("`O` is not an object");if(typeof f!="string")throw new n("`slot` must be a string");var o=e.get(t);o||(o={},e.set(t,o)),o["$"+f]=i}};return Object.freeze&&Object.freeze(a),pt=a,pt}var yt,ma;function ai(){if(ma)return yt;ma=1;var r=ni(),e=Ut(),n=typeof StopIteration=="object"?StopIteration:null;return yt=function(t){if(!n)throw new e("this environment lacks StopIteration");r.set(t,"[[Done]]",!1);var f={next:function(){var o=r.get(this,"[[Iterator]]"),u=!!r.get(o,"[[Done]]");try{return{done:u,value:u?void 0:o.next()}}catch(c){if(r.set(o,"[[Done]]",!0),c!==n)throw c;return{done:!0,value:void 0}}}};return r.set(f,"[[Iterator]]",t),f},yt}var vt,Sa;function lo(){if(Sa)return vt;Sa=1;var r={}.toString;return vt=Array.isArray||function(e){return r.call(e)=="[object Array]"},vt}var gt,ba;function co(){if(ba)return gt;ba=1;var r=Z(),e=r("String.prototype.valueOf"),n=function(o){try{return e(o),!0}catch{return!1}},a=r("Object.prototype.toString"),t="[object String]",f=Ir()();return gt=function(o){return typeof o=="string"?!0:!o||typeof o!="object"?!1:f?n(o):a(o)===t},gt}var ht,Aa;function po(){if(Aa)return ht;Aa=1;var r=typeof Map=="function"&&Map.prototype?Map:null,e=typeof Set=="function"&&Set.prototype?Set:null,n;r||(n=function(i){return!1});var a=r?Map.prototype.has:null,t=e?Set.prototype.has:null;return!n&&!a&&(n=function(i){return!1}),ht=n||function(i){if(!i||typeof i!="object")return!1;try{if(a.call(i),t)try{t.call(i)}catch{return!0}return i instanceof r}catch{}return!1},ht}var dt,Oa;function yo(){if(Oa)return dt;Oa=1;var r=typeof Map=="function"&&Map.prototype?Map:null,e=typeof Set=="function"&&Set.prototype?Set:null,n;e||(n=function(i){return!1});var a=r?Map.prototype.has:null,t=e?Set.prototype.has:null;return!n&&!t&&(n=function(i){return!1}),dt=n||function(i){if(!i||typeof i!="object")return!1;try{if(t.call(i),a)try{a.call(i)}catch{return!0}return i instanceof e}catch{}return!1},dt}var wa;function oi(){if(wa)return Cr.exports;wa=1;var r=uo(),e=ai();if(Vt()()||Vr()()){var n=Symbol.iterator;Cr.exports=function(P){if(P!=null&&typeof P[n]<"u")return P[n]();if(r(P))return Array.prototype[n].call(P)}}else{var a=lo(),t=co(),f=vr(),i=f("%Map%",!0),o=f("%Set%",!0),u=ao(),c=u("Array.prototype.push"),v=u("String.prototype.charCodeAt"),p=u("String.prototype.slice"),y=function(P,_){var L=P.length;if(_+1>=L)return _+1;var N=v(P,_);if(N<55296||N>56319)return _+1;var U=v(P,_+1);return U<56320||U>57343?_+1:_+2},h=function(P){var _=0;return{next:function(){var N=_>=P.length,U;return N||(U=P[_],_+=1),{done:N,value:U}}}},S=function(P,_){if(a(P)||r(P))return h(P);if(t(P)){var L=0;return{next:function(){var U=y(P,L),V=p(P,L,U);return L=U,{done:U>P.length,value:V}}}}if(_&&typeof P["_es6-shim iterator_"]<"u")return P["_es6-shim iterator_"]()};if(!i&&!o)Cr.exports=function(P){if(P!=null)return S(P,!0)};else{var R=po(),w=yo(),q=u("Map.prototype.forEach",!0),O=u("Set.prototype.forEach",!0);if(typeof process>"u"||!process.versions||!process.versions.node)var m=u("Map.prototype.iterator",!0),j=u("Set.prototype.iterator",!0);var Q=u("Map.prototype.@@iterator",!0)||u("Map.prototype._es6-shim iterator_",!0),H=u("Set.prototype.@@iterator",!0)||u("Set.prototype._es6-shim iterator_",!0),F=function(P){if(R(P)){if(m)return e(m(P));if(Q)return Q(P);if(q){var _=[];return q(P,function(N,U){c(_,[U,N])}),h(_)}}if(w(P)){if(j)return e(j(P));if(H)return H(P);if(O){var L=[];return O(P,function(N){c(L,N)}),h(L)}}};Cr.exports=function(P){return F(P)||S(P)}}}return Cr.exports}var mt,qa;function vo(){if(qa)return mt;qa=1;var r=function(e){return e!==e};return mt=function(n,a){return n===0&&a===0?1/n===1/a:!!(n===a||r(n)&&r(a))},mt}var St,Pa;function go(){if(Pa)return St;Pa=1;var r=vo();return St=function(){return typeof Object.is=="function"?Object.is:r},St}var bt,Ia;function ii(){if(Ia)return bt;Ia=1;var r=go(),e=Pr();return bt=function(){var a=r();return e(Object,{is:a},{is:function(){return Object.is!==a}}),a},bt}var At,Ra;function ui(){if(Ra)return At;Ra=1;var r=Pr(),e=jr(),n=vo(),a=go(),t=ii(),f=e(a(),Object);return r(f,{getPolyfill:a,implementation:n,shim:t}),At=f,At}var Ot,$a;function ho(){if($a)return Ot;$a=1;var r=jr(),e=Z(),n=vr(),a=n("%ArrayBuffer%",!0),t=e("ArrayBuffer.prototype.byteLength",!0),f=e("Object.prototype.toString"),i=!!a&&!t&&new a(0).slice,o=!!i&&r(i);return Ot=t||o?function(c){if(!c||typeof c!="object")return!1;try{return t?t(c):o(c,0),!0}catch{return!1}}:a?function(c){return f(c)==="[object ArrayBuffer]"}:function(c){return!1},Ot}var wt,xa;function fi(){if(xa)return wt;xa=1;var r=Z(),e=r("Date.prototype.getDay"),n=function(o){try{return e(o),!0}catch{return!1}},a=r("Object.prototype.toString"),t="[object Date]",f=Ir()();return wt=function(o){return typeof o!="object"||o===null?!1:f?n(o):a(o)===t},wt}var qt,Ea;function mo(){if(Ea)return qt;Ea=1;var r=Z(),e=Ir()(),n=Qt(),a=qr(),t;if(e){var f=r("RegExp.prototype.exec"),i={},o=function(){throw i},u={toString:o,valueOf:o};typeof Symbol.toPrimitive=="symbol"&&(u[Symbol.toPrimitive]=o),t=function(y){if(!y||typeof y!="object")return!1;var h=a(y,"lastIndex"),S=h&&n(h,"value");if(!S)return!1;try{f(y,u)}catch(R){return R===i}}}else{var c=r("Object.prototype.toString"),v="[object RegExp]";t=function(y){return!y||typeof y!="object"&&typeof y!="function"?!1:c(y)===v}}return qt=t,qt}var Pt,Ba;function si(){if(Ba)return Pt;Ba=1;var r=Z(),e=r("SharedArrayBuffer.prototype.byteLength",!0);return Pt=e?function(a){if(!a||typeof a!="object")return!1;try{return e(a),!0}catch{return!1}}:function(a){return!1},Pt}var It,ja;function li(){if(ja)return It;ja=1;var r=Z(),e=r("Number.prototype.toString"),n=function(o){try{return e(o),!0}catch{return!1}},a=r("Object.prototype.toString"),t="[object Number]",f=Ir()();return It=function(o){return typeof o=="number"?!0:!o||typeof o!="object"?!1:f?n(o):a(o)===t},It}var Rt,Ma;function ci(){if(Ma)return Rt;Ma=1;var r=Z(),e=r("Boolean.prototype.toString"),n=r("Object.prototype.toString"),a=function(o){try{return e(o),!0}catch{return!1}},t="[object Boolean]",f=Ir()();return Rt=function(o){return typeof o=="boolean"?!0:o===null||typeof o!="object"?!1:f?a(o):n(o)===t},Rt}var Lr={exports:{}},$t,Ta;function pi(){if(Ta)return $t;Ta=1;var r=Z(),e=mo(),n=r("RegExp.prototype.exec"),a=ar();return $t=function(f){if(!e(f))throw new a("`regex` must be a RegExp");return function(o){return n(f,o)!==null}},$t}var Ca;function yi(){if(Ca)return Lr.exports;Ca=1;var r=Z(),e=r("Object.prototype.toString"),n=Vt()(),a=pi();if(n){var t=r("Symbol.prototype.toString"),f=a(/^Symbol\(.*\)$/),i=function(u){return typeof u.valueOf()!="symbol"?!1:f(t(u))};Lr.exports=function(u){if(typeof u=="symbol")return!0;if(!u||typeof u!="object"||e(u)!=="[object Symbol]")return!1;try{return i(u)}catch{return!1}}}else Lr.exports=function(u){return!1};return Lr.exports}var Ur={exports:{}},xt,Da;function vi(){if(Da)return xt;Da=1;var r=typeof BigInt<"u"&&BigInt;return xt=function(){return typeof r=="function"&&typeof BigInt=="function"&&typeof r(42)=="bigint"&&typeof BigInt(42)=="bigint"},xt}var Fa;function gi(){if(Fa)return Ur.exports;Fa=1;var r=vi()();if(r){var e=BigInt.prototype.valueOf,n=function(t){try{return e.call(t),!0}catch{}return!1};Ur.exports=function(t){return t===null||typeof t>"u"||typeof t=="boolean"||typeof t=="string"||typeof t=="number"||typeof t=="symbol"||typeof t=="function"?!1:typeof t=="bigint"?!0:n(t)}}else Ur.exports=function(t){return!1};return Ur.exports}var Et,_a;function hi(){if(_a)return Et;_a=1;var r=co(),e=li(),n=ci(),a=yi(),t=gi();return Et=function(i){if(i==null||typeof i!="object"&&typeof i!="function")return null;if(r(i))return"String";if(e(i))return"Number";if(n(i))return"Boolean";if(a(i))return"Symbol";if(t(i))return"BigInt"},Et}var Bt,Na;function di(){if(Na)return Bt;Na=1;var r=typeof WeakMap=="function"&&WeakMap.prototype?WeakMap:null,e=typeof WeakSet=="function"&&WeakSet.prototype?WeakSet:null,n;r||(n=function(i){return!1});var a=r?r.prototype.has:null,t=e?e.prototype.has:null;return!n&&!a&&(n=function(i){return!1}),Bt=n||function(i){if(!i||typeof i!="object")return!1;try{if(a.call(i,a),t)try{t.call(i,t)}catch{return!0}return i instanceof r}catch{}return!1},Bt}var Hr={exports:{}},Wa;function mi(){if(Wa)return Hr.exports;Wa=1;var r=vr(),e=Z(),n=r("%WeakSet%",!0),a=e("WeakSet.prototype.has",!0);if(a){var t=e("WeakMap.prototype.has",!0);Hr.exports=function(i){if(!i||typeof i!="object")return!1;try{if(a(i,a),t)try{t(i,t)}catch{return!0}return i instanceof n}catch{}return!1}}else Hr.exports=function(i){return!1};return Hr.exports}var jt,ka;function Si(){if(ka)return jt;ka=1;var r=po(),e=yo(),n=di(),a=mi();return jt=function(f){if(f&&typeof f=="object"){if(r(f))return"Map";if(e(f))return"Set";if(n(f))return"WeakMap";if(a(f))return"WeakSet"}return!1},jt}var Mt,La;function bi(){if(La)return Mt;La=1;var r=Function.prototype.toString,e=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,n,a;if(typeof e=="function"&&typeof Object.defineProperty=="function")try{n=Object.defineProperty({},"length",{get:function(){throw a}}),a={},e(function(){throw 42},null,n)}catch(O){O!==a&&(e=null)}else e=null;var t=/^\s*class\b/,f=function(m){try{var j=r.call(m);return t.test(j)}catch{return!1}},i=function(m){try{return f(m)?!1:(r.call(m),!0)}catch{return!1}},o=Object.prototype.toString,u="[object Object]",c="[object Function]",v="[object GeneratorFunction]",p="[object HTMLAllCollection]",y="[object HTML document.all class]",h="[object HTMLCollection]",S=typeof Symbol=="function"&&!!Symbol.toStringTag,R=!(0 in[,]),w=function(){return!1};if(typeof document=="object"){var q=document.all;o.call(q)===o.call(document.all)&&(w=function(m){if((R||!m)&&(typeof m>"u"||typeof m=="object"))try{var j=o.call(m);return(j===p||j===y||j===h||j===u)&&m("")==null}catch{}return!1})}return Mt=e?function(m){if(w(m))return!0;if(!m||typeof m!="function"&&typeof m!="object")return!1;try{e(m,null,n)}catch(j){if(j!==a)return!1}return!f(m)&&i(m)}:function(m){if(w(m))return!0;if(!m||typeof m!="function"&&typeof m!="object")return!1;if(S)return i(m);if(f(m))return!1;var j=o.call(m);return j!==c&&j!==v&&!/^\[object HTML/.test(j)?!1:i(m)},Mt}var Tt,Ua;function Ai(){if(Ua)return Tt;Ua=1;var r=bi(),e=Object.prototype.toString,n=Object.prototype.hasOwnProperty,a=function(u,c,v){for(var p=0,y=u.length;p<y;p++)n.call(u,p)&&(v==null?c(u[p],p,u):c.call(v,u[p],p,u))},t=function(u,c,v){for(var p=0,y=u.length;p<y;p++)v==null?c(u.charAt(p),p,u):c.call(v,u.charAt(p),p,u)},f=function(u,c,v){for(var p in u)n.call(u,p)&&(v==null?c(u[p],p,u):c.call(v,u[p],p,u))};function i(o){return e.call(o)==="[object Array]"}return Tt=function(u,c,v){if(!r(c))throw new TypeError("iterator must be a function");var p;arguments.length>=3&&(p=v),i(u)?a(u,c,p):typeof u=="string"?t(u,c,p):f(u,c,p)},Tt}var Ct,Ha;function Oi(){return Ha||(Ha=1,Ct=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),Ct}var Dt,Ga;function wi(){if(Ga)return Dt;Ga=1;var r=Oi(),e=typeof globalThis>"u"?Gr:globalThis;return Dt=function(){for(var a=[],t=0;t<r.length;t++)typeof e[r[t]]=="function"&&(a[a.length]=r[t]);return a},Dt}var Ft,za;function qi(){if(za)return Ft;za=1;var r=Ai(),e=wi(),n=jr(),a=Z(),t=qr(),f=Xt(),i=a("Object.prototype.toString"),o=Ir()(),u=typeof globalThis>"u"?Gr:globalThis,c=e(),v=a("String.prototype.slice"),p=a("Array.prototype.indexOf",!0)||function(w,q){for(var O=0;O<w.length;O+=1)if(w[O]===q)return O;return-1},y={__proto__:null};o&&t&&f?r(c,function(R){var w=new u[R];if(Symbol.toStringTag in w&&f){var q=f(w),O=t(q,Symbol.toStringTag);if(!O&&q){var m=f(q);O=t(m,Symbol.toStringTag)}y["$"+R]=n(O.get)}}):r(c,function(R){var w=new u[R],q=w.slice||w.set;q&&(y["$"+R]=n(q))});var h=function(w){var q=!1;return r(y,function(O,m){if(!q)try{"$"+O(w)===m&&(q=v(m,1))}catch{}}),q},S=function(w){var q=!1;return r(y,function(O,m){if(!q)try{O(w),q=v(m,1)}catch{}}),q};return Ft=function(w){if(!w||typeof w!="object")return!1;if(!o){var q=v(i(w),8,-1);return p(c,q)>-1?q:q!=="Object"?!1:S(w)}return t?h(w):null},Ft}var _t,Va;function Pi(){if(Va)return _t;Va=1;var r=Z(),e=r("ArrayBuffer.prototype.byteLength",!0),n=ho();return _t=function(t){return n(t)?e?e(t):t.byteLength:NaN},_t}var Nt,Ka;function Ii(){if(Ka)return Nt;Ka=1;var r=Vo(),e=ao(),n=Xo(),a=vr(),t=oi(),f=so(),i=ui(),o=uo(),u=lo(),c=ho(),v=fi(),p=mo(),y=si(),h=Lt(),S=hi(),R=Si(),w=qi(),q=Pi(),O=e("SharedArrayBuffer.prototype.byteLength",!0),m=e("Date.prototype.getTime"),j=Object.getPrototypeOf,Q=e("Object.prototype.toString"),H=a("%Set%",!0),F=e("Map.prototype.has",!0),D=e("Map.prototype.get",!0),P=e("Map.prototype.size",!0),_=e("Set.prototype.add",!0),L=e("Set.prototype.delete",!0),N=e("Set.prototype.has",!0),U=e("Set.prototype.size",!0);function V(g,d,x,$){for(var M=t(g),T;(T=M.next())&&!T.done;)if(G(d,T.value,x,$))return L(g,T.value),!0;return!1}function sr(g){if(typeof g>"u")return null;if(typeof g!="object")return typeof g=="symbol"?!1:typeof g=="string"||typeof g=="number"?+g==+g:!0}function Rr(g,d,x,$,M,T){var A=sr(x);if(A!=null)return A;var I=D(d,A),b=r({},M,{strict:!1});return typeof I>"u"&&!F(d,A)||!G($,I,b,T)?!1:!F(g,A)&&G($,I,b,T)}function br(g,d,x){var $=sr(x);return $??(N(d,$)&&!N(g,$))}function or(g,d,x,$,M,T){for(var A=t(g),I,b;(I=A.next())&&!I.done;)if(b=I.value,G(x,b,M,T)&&G($,D(d,b),M,T))return L(g,b),!0;return!1}function G(g,d,x,$){var M=x||{};if(M.strict?i(g,d):g===d)return!0;var T=S(g),A=S(d);if(T!==A)return!1;if(!g||!d||typeof g!="object"&&typeof d!="object")return M.strict?i(g,d):g==d;var I=$.has(g),b=$.has(d),E;if(I&&b){if($.get(g)===$.get(d))return!0}else E={};return I||$.set(g,E),b||$.set(d,E),gr(g,d,M,$)}function Ar(g){return!g||typeof g!="object"||typeof g.length!="number"||typeof g.copy!="function"||typeof g.slice!="function"||g.length>0&&typeof g[0]!="number"?!1:!!(g.constructor&&g.constructor.isBuffer&&g.constructor.isBuffer(g))}function $r(g,d,x,$){if(U(g)!==U(d))return!1;for(var M=t(g),T=t(d),A,I,b;(A=M.next())&&!A.done;)if(A.value&&typeof A.value=="object")b||(b=new H),_(b,A.value);else if(!N(d,A.value)){if(x.strict||!br(g,d,A.value))return!1;b||(b=new H),_(b,A.value)}if(b){for(;(I=T.next())&&!I.done;)if(I.value&&typeof I.value=="object"){if(!V(b,I.value,x.strict,$))return!1}else if(!x.strict&&!N(g,I.value)&&!V(b,I.value,x.strict,$))return!1;return U(b)===0}return!0}function Or(g,d,x,$){if(P(g)!==P(d))return!1;for(var M=t(g),T=t(d),A,I,b,E,z,K;(A=M.next())&&!A.done;)if(E=A.value[0],z=A.value[1],E&&typeof E=="object")b||(b=new H),_(b,E);else if(K=D(d,E),typeof K>"u"&&!F(d,E)||!G(z,K,x,$)){if(x.strict||!Rr(g,d,E,z,x,$))return!1;b||(b=new H),_(b,E)}if(b){for(;(I=T.next())&&!I.done;)if(E=I.value[0],K=I.value[1],E&&typeof E=="object"){if(!or(b,g,E,K,x,$))return!1}else if(!x.strict&&(!g.has(E)||!G(D(g,E),K,x,$))&&!or(b,g,E,K,r({},x,{strict:!1}),$))return!1;return U(b)===0}return!0}function gr(g,d,x,$){var M,T;if(typeof g!=typeof d||g==null||d==null||Q(g)!==Q(d)||o(g)!==o(d))return!1;var A=u(g),I=u(d);if(A!==I)return!1;var b=g instanceof Error,E=d instanceof Error;if(b!==E||(b||E)&&(g.name!==d.name||g.message!==d.message))return!1;var z=p(g),K=p(d);if(z!==K||(z||K)&&(g.source!==d.source||n(g)!==n(d)))return!1;var J=v(g),X=v(d);if(J!==X||(J||X)&&m(g)!==m(d)||x.strict&&j&&j(g)!==j(d))return!1;var rr=w(g),lr=w(d);if(rr!==lr)return!1;if(rr||lr){if(g.length!==d.length)return!1;for(M=0;M<g.length;M++)if(g[M]!==d[M])return!1;return!0}var ir=Ar(g),er=Ar(d);if(ir!==er)return!1;if(ir||er){if(g.length!==d.length)return!1;for(M=0;M<g.length;M++)if(g[M]!==d[M])return!1;return!0}var cr=c(g),pr=c(d);if(cr!==pr)return!1;if(cr||pr)return q(g)!==q(d)?!1:typeof Uint8Array=="function"&&G(new Uint8Array(g),new Uint8Array(d),x,$);var yr=y(g),_r=y(d);if(yr!==_r)return!1;if(yr||_r)return O(g)!==O(d)?!1:typeof Uint8Array=="function"&&G(new Uint8Array(g),new Uint8Array(d),x,$);if(typeof g!=typeof d)return!1;var hr=h(g),xr=h(d);if(hr.length!==xr.length)return!1;for(hr.sort(),xr.sort(),M=hr.length-1;M>=0;M--)if(hr[M]!=xr[M])return!1;for(M=hr.length-1;M>=0;M--)if(T=hr[M],!G(g[T],d[T],x,$))return!1;var Mr=R(g),dr=R(d);return Mr!==dr?!1:Mr==="Set"||dr==="Set"?$r(g,d,x,$):Mr==="Map"?Or(g,d,x,$):!0}return Nt=function(d,x,$){return G(d,x,$,f())},Nt}var Ri=Ii();const $i=Po(Ri);function xi(r){return r}function So(r,e,n,a){const t=xi,[f,i]=fr.useState(t(n)),o=fr.useRef(f);return fr.useEffect(()=>{const u=()=>{const c={...n,...r.getAttributes(e)};Object.keys(c).forEach(p=>{(c[p]===null||c[p]===void 0)&&(c[p]=n?n[p]:null)});const v=t(c);$i(o.current,v)||(i(v),o.current=v)};return r.on("selectionUpdate",u),r.on("transaction",u),()=>{r.off("selectionUpdate",u),r.off("transaction",u)}},[r,n,e,t]),f}function Ei({node:r}){const{text:e,macros:n}=r.attrs,a=fr.useMemo(()=>{try{return Ya.renderToString(decodeURIComponent(e||""),{macros:kt(decodeURIComponent(n||""))})}catch{return e}},[e,n]),t=fr.useMemo(()=>e.trim()?Y.jsx("span",{contentEditable:!1,dangerouslySetInnerHTML:{__html:a}}):Y.jsx("span",{contentEditable:!1,children:"Not enter a formula"}),[e,a]);return Y.jsx(Dr.NodeViewWrapper,{as:"span",style:{display:"inline-block"},children:t})}function Bi(){const{t:r}=qo.useLocale(),[e,n]=fr.useState(!1),a=tr.useButtonProps(Wt.name),{icon:t=void 0,tooltip:f=void 0,tooltipOptions:i={},isActive:o=void 0}=(a==null?void 0:a.componentProps)??{},{editorDisabled:u}=tr.useToggleActive(o),c=tr.useEditorInstance(),v=So(c,Wt.name,{text:"",macros:""}),{text:p,macros:y}=v,[h,S]=fr.useState(decodeURIComponent(p||"")),[R,w]=fr.useState(decodeURIComponent(y||"")),q=fr.useCallback(()=>{c.chain().focus().setKatex({text:encodeURIComponent(h),macros:encodeURIComponent(R)}).run(),S(""),w(""),n(!1)},[c,h,R]),O=fr.useMemo(()=>{try{return Ya.renderToString(h,{macros:kt(R)})}catch{return h}},[R,h]),m=fr.useMemo(()=>`${h}`.trim()?O:null,[h,O]);return Y.jsxs(tr.Dialog,{onOpenChange:n,open:e,children:[Y.jsx(tr.DialogTrigger,{asChild:!0,disabled:u,children:Y.jsx(tr.ActionButton,{disabled:u,icon:t,tooltip:f,tooltipOptions:i,action:()=>{u||n(!0)}})}),Y.jsxs(tr.DialogContent,{className:"richtext-z-[99999] !richtext-max-w-[1300px]",children:[Y.jsx(tr.DialogTitle,{children:r("editor.formula.dialog.text")}),Y.jsx("div",{style:{height:"100%",border:"1px solid hsl(var(--border))"},children:Y.jsxs("div",{className:"richtext-flex richtext-gap-[10px] richtext-rounded-[10px] richtext-p-[10px]",children:[Y.jsxs("div",{className:"richtext-flex-1",children:[Y.jsx(tr.Label,{className:"mb-[6px]",children:"Expression"}),Y.jsx(tr.Textarea,{autoFocus:!0,className:"richtext-mb-[10px]",onChange:j=>S(j.target.value),placeholder:"Text",required:!0,rows:10,value:h,style:{color:"hsl(var(--foreground))"}}),Y.jsx(tr.Label,{className:"mb-[6px]",children:"Macros"}),Y.jsx(tr.Textarea,{className:"richtext-flex-1",placeholder:"Macros",rows:10,value:R,onChange:j=>{w(j.target.value)},style:{color:"hsl(var(--foreground))"}})]}),Y.jsx("div",{className:"richtext-flex richtext-flex-1 richtext-items-center richtext-justify-center richtext-rounded-[10px] richtext-p-[10px]",dangerouslySetInnerHTML:{__html:m||""},style:{height:"100%",borderWidth:1,minHeight:500,background:"#fff"}})]})}),Y.jsx(tr.DialogFooter,{children:Y.jsx(tr.Button,{onClick:q,type:"button",children:"Save changes"})})]})]})}function Ja(r){return e=>e.getAttribute(r)}const Wt=Dr.Node3.create({name:"katex",group:"inline",inline:!0,defining:!0,draggable:!0,selectable:!0,addOptions(){return{HTMLAttributes:{class:"katex"},button:({t:r})=>({componentProps:{action:()=>!0,isActive:()=>!1,disabled:!1,icon:"KatexIcon",tooltip:r("editor.katex.tooltip")}})}},addAttributes(){return{text:{default:"",parseHTML:Ja("text")},macros:{default:"",parseHTML:Ja("macros")}}},parseHTML(){return[{tag:"span.katex"}]},renderHTML({HTMLAttributes:r}){return["span",Dr.mergeAttributes(this.options&&this.options.HTMLAttributes||{},r)]},addCommands(){return{setKatex:r=>({commands:e})=>e.insertContent({type:this.name,attrs:r})}},addInputRules(){return[Dr.nodeInputRule({find:/^\$katex\$$/,type:this.type})]},addNodeView(){return Dr.ReactNodeViewRenderer(Ei)}});exports.Katex=Wt;exports.RichTextKatex=Bi;exports.safeJSONParse=kt;exports.useAttributes=So;
@@ -1,2 +0,0 @@
1
- "use strict";var H=Object.create;var A=Object.defineProperty;var O=Object.getOwnPropertyDescriptor;var _=Object.getOwnPropertyNames;var $=Object.getPrototypeOf,B=Object.prototype.hasOwnProperty;var z=(e,i,s,o)=>{if(i&&typeof i=="object"||typeof i=="function")for(let l of _(i))!B.call(e,l)&&l!==s&&A(e,l,{get:()=>i[l],enumerable:!(o=O(i,l))||o.enumerable});return e};var T=(e,i,s)=>(s=e!=null?H($(e)):{},z(i||!e||!e.__esModule?A(s,"default",{value:e,enumerable:!0}):s,e));const N=require("./clsx-CXbNJWDD.cjs"),t=require("react/jsx-runtime"),r=require("react"),c=require("./index-BynXHtjJ.cjs"),L=({editor:e,node:i,updateAttributes:s})=>{var n,d;const o=((n=i==null?void 0:i.attrs)==null?void 0:n.code)??v,l=((d=i==null?void 0:i.attrs)==null?void 0:d.align)??"center",[a,M]=r.useState(o),[b,m]=r.useState(""),[y,u]=r.useState(""),[g,f]=r.useState(!1),[h,w]=r.useState(null),[p,S]=r.useState(!0),D=r.useRef(`mermaid-edit-${Math.random().toString(36).slice(2,9)}`),C=r.useCallback(x=>{f(x),x&&M(o)},[o]);r.useEffect(()=>{import("mermaid").then(x=>{const j=x.default;j.initialize({startOnLoad:!1,darkMode:!1,fontSize:12,theme:"base"}),w(j)}).finally(()=>S(!1))},[]),r.useEffect(()=>{if(!h||!g)return;(async()=>{const j=a.trim();if(!j){m(""),u("");return}try{const E=`${D.current}-${Date.now()}`,{svg:k}=await h.render(E,j);m(k),u("")}catch(E){m(""),u((E==null?void 0:E.message)??"Invalid Mermaid syntax")}})()},[a,h,g]);const I=r.useCallback(()=>{a.trim()&&(s?s({code:a}):e==null||e.chain().focus().setMermaid({code:a,align:l}).run(),f(!1))},[e,a,l,s]);return t.jsxs(c.Dialog,{onOpenChange:C,open:g,children:[t.jsx(c.DialogTrigger,{asChild:!0,children:t.jsx(c.ActionButton,{action:()=>f(!0),icon:"Pencil",tooltip:"Edit Mermaid"})}),t.jsxs(c.DialogContent,{className:"richtext-z-[99999] !richtext-max-w-[1300px]",children:[t.jsx(c.DialogTitle,{children:"Edit Mermaid Diagram"}),t.jsx("div",{style:{height:"100%",border:"1px solid hsl(var(--border))"},children:p?t.jsx("div",{className:"richtext-flex richtext-items-center richtext-justify-center richtext-p-10 richtext-text-sm richtext-text-gray-400",children:"Loading Mermaid…"}):t.jsxs("div",{className:"richtext-flex richtext-gap-[10px] richtext-rounded-[10px] richtext-p-[10px]",children:[t.jsx(c.Textarea,{autoFocus:!0,className:"richtext-flex-1 richtext-font-mono richtext-text-sm",onChange:x=>M(x.target.value),placeholder:v,required:!0,rows:18,value:a,style:{color:"hsl(var(--foreground))"}}),t.jsx("div",{className:"richtext-flex richtext-flex-1 richtext-items-center richtext-justify-center richtext-overflow-auto richtext-rounded-[10px] richtext-p-[10px]",style:{minHeight:400,border:"1px solid hsl(var(--border))",background:"#fff"},children:y?t.jsxs("p",{className:"richtext-max-w-xs richtext-break-words richtext-text-sm richtext-text-red-500",children:["⚠ ",y]}):b?t.jsx("div",{dangerouslySetInnerHTML:{__html:b}}):t.jsx("p",{className:"richtext-text-sm richtext-text-gray-400",children:"Start typing to preview…"})})]})}),t.jsx(c.DialogFooter,{children:t.jsx(c.Button,{disabled:p||!h||!a.trim(),onClick:I,type:"button",children:"Save changes"})})]})]})};function q({editor:e,node:i,updateAttributes:s,selected:o,extension:l}){const[a,M]=r.useState(()=>(e==null?void 0:e.isEditable)??!1);r.useEffect(()=>{const n=()=>M((e==null?void 0:e.isEditable)??!1);return n(),e==null||e.on("editableUpdate",n),e==null||e.on("update",n),()=>{e==null||e.off("editableUpdate",n),e==null||e.off("update",n)}},[e]);const{code:b,align:m,width:y}=i.attrs,u=r.useRef(null),[g,f]=r.useState(""),[h,w]=r.useState(""),[p,S]=r.useState(null),D=r.useRef(`mermaid-view-${Math.random().toString(36).slice(2,9)}`);r.useEffect(()=>{import("mermaid").then(n=>{const d=n.default;d.initialize({startOnLoad:!1,darkMode:!1,fontSize:12,theme:"base"}),S(d)})},[]);const C=r.useCallback(async n=>{if(!(!p||!(n!=null&&n.trim())))try{const d=`${D.current}-${Date.now()}`,{svg:x}=await p.render(d,n);f(x),w("")}catch(d){f(""),w((d==null?void 0:d.message)??"Invalid Mermaid syntax")}},[p]);r.useEffect(()=>{C(b)},[b,C]);const I={textAlign:m??"center",width:y??"100%"};return t.jsx(N.NodeViewWrapper,{className:"mermaid-node-view richtext-relative richtext-my-4",style:I,children:t.jsxs("div",{"data-drag-handle":!0,draggable:a?"true":"false",ref:u,className:["richtext-relative richtext-inline-block richtext-rounded-lg richtext-border richtext-bg-white richtext-p-4 richtext-transition-all",a?o?"richtext-border-gray-300":"richtext-border-transparent":"richtext-pointer-events-none richtext-select-none richtext-border-transparent"].join(" "),style:{maxWidth:"100%"},children:[h?t.jsx("div",{className:"richtext-flex richtext-min-h-[120px] richtext-min-w-[200px] richtext-items-center richtext-justify-center richtext-rounded richtext-bg-red-50 richtext-p-4 richtext-text-sm richtext-text-red-500",children:t.jsxs("span",{children:["⚠ ",h]})}):g?t.jsx("div",{className:"mermaid-svg-container",dangerouslySetInnerHTML:{__html:g}}):t.jsx("div",{className:"richtext-flex richtext-min-h-[120px] richtext-min-w-[200px] richtext-items-center richtext-justify-center richtext-rounded richtext-bg-gray-50 richtext-text-sm richtext-text-gray-400",children:"Rendering…"}),a&&t.jsx("div",{className:"richtext-absolute richtext-right-2 richtext-top-2 richtext-opacity-0 richtext-transition-opacity [.mermaid-node-view:hover_&]:richtext-opacity-100",children:t.jsx(L,{editor:e,node:i,updateAttributes:s,extension:l})})]})})}function F(){const e=c.useEditorInstance(),i=c.useButtonProps(R.name),{tooltipOptions:s={},isActive:o=void 0}=(i==null?void 0:i.componentProps)??{},{editorDisabled:l}=c.useToggleActive(o),[a,M]=r.useState(v),[b,m]=r.useState(""),[y,u]=r.useState(""),[g,f]=r.useState(!1),[h,w]=r.useState(null),[p,S]=r.useState(!0),D=r.useRef(`mermaid-toolbar-${Math.random().toString(36).slice(2,9)}`);r.useEffect(()=>{import("mermaid").then(n=>{const d=n.default;d.initialize({startOnLoad:!1,darkMode:!1,fontSize:12,theme:"base"}),w(d)}).finally(()=>S(!1))},[]),r.useEffect(()=>{if(!h||!g)return;(async()=>{const d=a.trim();if(!d){m(""),u("");return}try{const x=`${D.current}-${Date.now()}`,{svg:j}=await h.render(x,d);m(j),u("")}catch(x){m(""),u((x==null?void 0:x.message)??"Invalid Mermaid syntax")}})()},[a,h,g]);const C=r.useCallback(n=>{f(n),n&&(M(v),m(""),u(""))},[]),I=r.useCallback(()=>{a.trim()&&(e==null||e.chain().focus().setMermaid({code:a,align:"center",width:"100%"}).run(),f(!1))},[e,a]);return t.jsxs(c.Dialog,{onOpenChange:C,open:g,children:[t.jsx(c.DialogTrigger,{asChild:!0,children:t.jsx(c.ActionButton,{disabled:l,icon:"Mermaid",tooltip:"Mermaid",tooltipOptions:s,action:()=>{l||f(!0)}})}),t.jsxs(c.DialogContent,{className:"richtext-z-[99999] !richtext-max-w-[1300px]",children:[t.jsx(c.DialogTitle,{children:"Insert Mermaid Diagram"}),t.jsx("div",{style:{height:"100%",border:"1px solid hsl(var(--border))"},children:p?t.jsx("div",{className:"richtext-flex richtext-items-center richtext-justify-center richtext-p-10 richtext-text-sm richtext-text-gray-400",children:"Loading Mermaid…"}):t.jsxs("div",{className:"richtext-flex richtext-gap-[10px] richtext-rounded-[10px] richtext-p-[10px]",children:[t.jsx(c.Textarea,{autoFocus:!0,className:"richtext-flex-1 richtext-font-mono richtext-text-sm",onChange:n=>M(n.target.value),placeholder:v,required:!0,rows:18,value:a,style:{color:"hsl(var(--foreground))"}}),t.jsx("div",{className:"richtext-flex richtext-flex-1 richtext-items-center richtext-justify-center richtext-overflow-auto richtext-rounded-[10px] richtext-p-[10px]",style:{minHeight:400,border:"1px solid hsl(var(--border))",background:"#fff"},children:y?t.jsxs("p",{className:"richtext-max-w-xs richtext-break-words richtext-text-sm richtext-text-red-500",children:["⚠ ",y]}):b?t.jsx("div",{dangerouslySetInnerHTML:{__html:b}}):t.jsx("p",{className:"richtext-text-sm richtext-text-gray-400",children:"Start typing to preview…"})})]})}),t.jsx(c.DialogFooter,{children:t.jsx(c.Button,{disabled:p||!h||!a.trim(),onClick:I,type:"button",children:"Insert diagram"})})]})]})}const v=`graph TB
2
- A --> B`,R=N.Node3.create({name:"mermaid",group:"block",selectable:!0,atom:!0,draggable:!0,inline:!1,addOptions(){return{divider:!1,spacer:!1,HTMLAttributes:{class:"mermaid-node"},button:({editor:e,t:i,extension:s})=>({componentProps:{action:()=>!0,isActive:()=>e.isActive("mermaid"),disabled:!1,editor:e,icon:"Mermaid",tooltip:i("editor.mermaid.tooltip")}})}},addAttributes(){return{code:{default:v,parseHTML:e=>e.getAttribute("data-code")?decodeURIComponent(e.getAttribute("data-code")):v,renderHTML:e=>({"data-code":encodeURIComponent(e.code??"")})},align:{default:"center",parseHTML:e=>e.getAttribute("data-align")??"center",renderHTML:e=>({"data-align":e.align})},width:{default:"100%",parseHTML:e=>e.getAttribute("data-width")??"100%",renderHTML:e=>({"data-width":e.width})}}},parseHTML(){return[{tag:"div[class=mermaid-node]"}]},renderHTML({HTMLAttributes:e,node:i}){const{align:s}=i.attrs,o=s?`text-align: ${s};`:"";return["div",N.mergeAttributes({class:"mermaid-node"},e,{style:o})]},addCommands(){return{setMermaid:e=>({tr:i,commands:s})=>{var o,l,a;return e={code:v,align:"center",width:"100%",...e},((a=(l=(o=i.selection)==null?void 0:o.node)==null?void 0:l.type)==null?void 0:a.name)===this.name?s.updateAttributes(this.name,e):s.insertContent({type:this.name,attrs:e})},setMermaidAlign:e=>({commands:i})=>i.updateAttributes(this.name,{align:e})}},addNodeView(){return N.ReactNodeViewRenderer(q)}});exports.DEFAULT_MERMAID_CODE=v;exports.EditMermaidBlock=L;exports.Mermaid=R;exports.RichTextMermaid=F;