From d89d1afbef44ce46581232a85e1371f4cfcb0b67 Mon Sep 17 00:00:00 2001 From: Andrew Leith Date: Mon, 18 Sep 2023 12:48:36 +0000 Subject: [PATCH 01/37] feat(lexical): add lexical to admin and try it out on the welcome ppage --- app/.babelrc | 2 +- app/assets/assets/img/1F642.png | Bin 0 -> 1421 bytes app/assets/assets/img/arrow-clockwise.svg | 4 + .../assets/img/arrow-counterclockwise.svg | 4 + app/assets/assets/img/chat-square-quote.svg | 4 + app/assets/assets/img/chevron-down.svg | 3 + app/assets/assets/img/code.svg | 3 + app/assets/assets/img/justify.svg | 3 + app/assets/assets/img/link.svg | 4 + app/assets/assets/img/list-ol.svg | 4 + app/assets/assets/img/list-ul.svg | 3 + app/assets/assets/img/pencil-fill.svg | 3 + app/assets/assets/img/text-center.svg | 3 + app/assets/assets/img/text-left.svg | 3 + app/assets/assets/img/text-paragraph.svg | 3 + app/assets/assets/img/text-right.svg | 3 + app/assets/assets/img/type-bold.svg | 3 + app/assets/assets/img/type-h1.svg | 3 + app/assets/assets/img/type-h2.svg | 3 + app/assets/assets/img/type-italic.svg | 3 + app/assets/assets/img/type-strikethrough.svg | 3 + app/assets/assets/img/type-underline.svg | 3 + app/assets/images/1F642.png | Bin 0 -> 1421 bytes app/assets/images/arrow-clockwise.svg | 4 + app/assets/images/arrow-counterclockwise.svg | 4 + app/assets/images/chat-square-quote.svg | 4 + app/assets/images/chevron-down.svg | 3 + app/assets/images/code.svg | 3 + app/assets/images/justify.svg | 3 + app/assets/images/lexical/1F642.png | Bin 0 -> 1421 bytes app/assets/images/lexical/arrow-clockwise.svg | 4 + .../images/lexical/arrow-counterclockwise.svg | 4 + .../images/lexical/chat-square-quote.svg | 4 + app/assets/images/lexical/chevron-down.svg | 3 + app/assets/images/lexical/code.svg | 3 + app/assets/images/lexical/justify.svg | 3 + app/assets/images/lexical/link.svg | 4 + app/assets/images/lexical/list-ol.svg | 4 + app/assets/images/lexical/list-ul.svg | 3 + app/assets/images/lexical/pencil-fill.svg | 3 + app/assets/images/lexical/text-center.svg | 3 + app/assets/images/lexical/text-left.svg | 3 + app/assets/images/lexical/text-paragraph.svg | 3 + app/assets/images/lexical/text-right.svg | 3 + app/assets/images/lexical/type-bold.svg | 3 + app/assets/images/lexical/type-h1.svg | 3 + app/assets/images/lexical/type-h2.svg | 3 + app/assets/images/lexical/type-italic.svg | 3 + .../images/lexical/type-strikethrough.svg | 3 + app/assets/images/lexical/type-underline.svg | 3 + app/assets/images/link.svg | 4 + app/assets/images/list-ol.svg | 4 + app/assets/images/list-ul.svg | 3 + app/assets/images/pencil-fill.svg | 3 + app/assets/images/text-center.svg | 3 + app/assets/images/text-left.svg | 3 + app/assets/images/text-paragraph.svg | 3 + app/assets/images/text-right.svg | 3 + app/assets/images/type-bold.svg | 3 + app/assets/images/type-h1.svg | 3 + app/assets/images/type-h2.svg | 3 + app/assets/images/type-italic.svg | 3 + app/assets/images/type-strikethrough.svg | 3 + app/assets/images/type-underline.svg | 3 + app/assets/javascripts/lexical.min.js | 2 + app/assets/javascripts/lexical/App.js | 16 + app/assets/javascripts/lexical/Editor.js | 76 ++ .../lexical/images/emoji/1F600.png | Bin 0 -> 1796 bytes .../lexical/images/emoji/1F641.png | Bin 0 -> 1454 bytes .../lexical/images/emoji/1F642.png | Bin 0 -> 1421 bytes .../javascripts/lexical/images/emoji/2764.png | Bin 0 -> 1596 bytes .../lexical/images/emoji/LICENSE.md | 5 + .../lexical/images/icons/LICENSE.md | 5 + .../lexical/images/icons/arrow-clockwise.svg | 4 + .../images/icons/arrow-counterclockwise.svg | 4 + .../images/icons/chat-square-quote.svg | 4 + .../lexical/images/icons/chevron-down.svg | 3 + .../javascripts/lexical/images/icons/code.svg | 3 + .../lexical/images/icons/journal-code.svg | 5 + .../lexical/images/icons/journal-text.svg | 5 + .../lexical/images/icons/justify.svg | 3 + .../javascripts/lexical/images/icons/link.svg | 4 + .../lexical/images/icons/list-ol.svg | 4 + .../lexical/images/icons/list-ul.svg | 3 + .../lexical/images/icons/pencil-fill.svg | 3 + .../lexical/images/icons/text-center.svg | 3 + .../lexical/images/icons/text-left.svg | 3 + .../lexical/images/icons/text-paragraph.svg | 3 + .../lexical/images/icons/text-right.svg | 3 + .../lexical/images/icons/type-bold.svg | 3 + .../lexical/images/icons/type-h1.svg | 3 + .../lexical/images/icons/type-h2.svg | 3 + .../lexical/images/icons/type-h3.svg | 3 + .../lexical/images/icons/type-italic.svg | 3 + .../images/icons/type-strikethrough.svg | 3 + .../lexical/images/icons/type-underline.svg | 3 + app/assets/javascripts/lexical/index.js | 12 + .../lexical/plugins/AutoLinkPlugin.js | 34 + .../lexical/plugins/CodeHighlightPlugin.js | 11 + .../plugins/ListMaxIndentLevelPlugin.js | 68 ++ .../lexical/plugins/ToolbarPlugin.js | 697 ++++++++++++++++ .../lexical/plugins/TreeViewPlugin.js | 16 + app/assets/javascripts/lexical/styles.css | 758 ++++++++++++++++++ .../lexical/themes/ExampleTheme.js | 70 ++ app/assets/javascripts/scheduler.min.js | 2 +- app/assets/stylesheets/index.css | 2 +- app/templates/views/welcome.html | 4 +- gulpfile.js | 15 + package-lock.json | 317 +++++++- package.json | 4 +- webpack.config.js | 21 +- 111 files changed, 2401 insertions(+), 9 deletions(-) create mode 100644 app/assets/assets/img/1F642.png create mode 100644 app/assets/assets/img/arrow-clockwise.svg create mode 100644 app/assets/assets/img/arrow-counterclockwise.svg create mode 100644 app/assets/assets/img/chat-square-quote.svg create mode 100644 app/assets/assets/img/chevron-down.svg create mode 100644 app/assets/assets/img/code.svg create mode 100644 app/assets/assets/img/justify.svg create mode 100644 app/assets/assets/img/link.svg create mode 100644 app/assets/assets/img/list-ol.svg create mode 100644 app/assets/assets/img/list-ul.svg create mode 100644 app/assets/assets/img/pencil-fill.svg create mode 100644 app/assets/assets/img/text-center.svg create mode 100644 app/assets/assets/img/text-left.svg create mode 100644 app/assets/assets/img/text-paragraph.svg create mode 100644 app/assets/assets/img/text-right.svg create mode 100644 app/assets/assets/img/type-bold.svg create mode 100644 app/assets/assets/img/type-h1.svg create mode 100644 app/assets/assets/img/type-h2.svg create mode 100644 app/assets/assets/img/type-italic.svg create mode 100644 app/assets/assets/img/type-strikethrough.svg create mode 100644 app/assets/assets/img/type-underline.svg create mode 100644 app/assets/images/1F642.png create mode 100644 app/assets/images/arrow-clockwise.svg create mode 100644 app/assets/images/arrow-counterclockwise.svg create mode 100644 app/assets/images/chat-square-quote.svg create mode 100644 app/assets/images/chevron-down.svg create mode 100644 app/assets/images/code.svg create mode 100644 app/assets/images/justify.svg create mode 100644 app/assets/images/lexical/1F642.png create mode 100644 app/assets/images/lexical/arrow-clockwise.svg create mode 100644 app/assets/images/lexical/arrow-counterclockwise.svg create mode 100644 app/assets/images/lexical/chat-square-quote.svg create mode 100644 app/assets/images/lexical/chevron-down.svg create mode 100644 app/assets/images/lexical/code.svg create mode 100644 app/assets/images/lexical/justify.svg create mode 100644 app/assets/images/lexical/link.svg create mode 100644 app/assets/images/lexical/list-ol.svg create mode 100644 app/assets/images/lexical/list-ul.svg create mode 100644 app/assets/images/lexical/pencil-fill.svg create mode 100644 app/assets/images/lexical/text-center.svg create mode 100644 app/assets/images/lexical/text-left.svg create mode 100644 app/assets/images/lexical/text-paragraph.svg create mode 100644 app/assets/images/lexical/text-right.svg create mode 100644 app/assets/images/lexical/type-bold.svg create mode 100644 app/assets/images/lexical/type-h1.svg create mode 100644 app/assets/images/lexical/type-h2.svg create mode 100644 app/assets/images/lexical/type-italic.svg create mode 100644 app/assets/images/lexical/type-strikethrough.svg create mode 100644 app/assets/images/lexical/type-underline.svg create mode 100644 app/assets/images/link.svg create mode 100644 app/assets/images/list-ol.svg create mode 100644 app/assets/images/list-ul.svg create mode 100644 app/assets/images/pencil-fill.svg create mode 100644 app/assets/images/text-center.svg create mode 100644 app/assets/images/text-left.svg create mode 100644 app/assets/images/text-paragraph.svg create mode 100644 app/assets/images/text-right.svg create mode 100644 app/assets/images/type-bold.svg create mode 100644 app/assets/images/type-h1.svg create mode 100644 app/assets/images/type-h2.svg create mode 100644 app/assets/images/type-italic.svg create mode 100644 app/assets/images/type-strikethrough.svg create mode 100644 app/assets/images/type-underline.svg create mode 100644 app/assets/javascripts/lexical.min.js create mode 100644 app/assets/javascripts/lexical/App.js create mode 100644 app/assets/javascripts/lexical/Editor.js create mode 100644 app/assets/javascripts/lexical/images/emoji/1F600.png create mode 100644 app/assets/javascripts/lexical/images/emoji/1F641.png create mode 100644 app/assets/javascripts/lexical/images/emoji/1F642.png create mode 100644 app/assets/javascripts/lexical/images/emoji/2764.png create mode 100644 app/assets/javascripts/lexical/images/emoji/LICENSE.md create mode 100644 app/assets/javascripts/lexical/images/icons/LICENSE.md create mode 100644 app/assets/javascripts/lexical/images/icons/arrow-clockwise.svg create mode 100644 app/assets/javascripts/lexical/images/icons/arrow-counterclockwise.svg create mode 100644 app/assets/javascripts/lexical/images/icons/chat-square-quote.svg create mode 100644 app/assets/javascripts/lexical/images/icons/chevron-down.svg create mode 100644 app/assets/javascripts/lexical/images/icons/code.svg create mode 100644 app/assets/javascripts/lexical/images/icons/journal-code.svg create mode 100644 app/assets/javascripts/lexical/images/icons/journal-text.svg create mode 100644 app/assets/javascripts/lexical/images/icons/justify.svg create mode 100644 app/assets/javascripts/lexical/images/icons/link.svg create mode 100644 app/assets/javascripts/lexical/images/icons/list-ol.svg create mode 100644 app/assets/javascripts/lexical/images/icons/list-ul.svg create mode 100644 app/assets/javascripts/lexical/images/icons/pencil-fill.svg create mode 100644 app/assets/javascripts/lexical/images/icons/text-center.svg create mode 100644 app/assets/javascripts/lexical/images/icons/text-left.svg create mode 100644 app/assets/javascripts/lexical/images/icons/text-paragraph.svg create mode 100644 app/assets/javascripts/lexical/images/icons/text-right.svg create mode 100644 app/assets/javascripts/lexical/images/icons/type-bold.svg create mode 100644 app/assets/javascripts/lexical/images/icons/type-h1.svg create mode 100644 app/assets/javascripts/lexical/images/icons/type-h2.svg create mode 100644 app/assets/javascripts/lexical/images/icons/type-h3.svg create mode 100644 app/assets/javascripts/lexical/images/icons/type-italic.svg create mode 100644 app/assets/javascripts/lexical/images/icons/type-strikethrough.svg create mode 100644 app/assets/javascripts/lexical/images/icons/type-underline.svg create mode 100644 app/assets/javascripts/lexical/index.js create mode 100644 app/assets/javascripts/lexical/plugins/AutoLinkPlugin.js create mode 100644 app/assets/javascripts/lexical/plugins/CodeHighlightPlugin.js create mode 100644 app/assets/javascripts/lexical/plugins/ListMaxIndentLevelPlugin.js create mode 100644 app/assets/javascripts/lexical/plugins/ToolbarPlugin.js create mode 100644 app/assets/javascripts/lexical/plugins/TreeViewPlugin.js create mode 100644 app/assets/javascripts/lexical/styles.css create mode 100644 app/assets/javascripts/lexical/themes/ExampleTheme.js diff --git a/app/.babelrc b/app/.babelrc index b4d1f4c6e9..37457f4563 100644 --- a/app/.babelrc +++ b/app/.babelrc @@ -1,4 +1,4 @@ { - "presets": ["@babel/preset-env", "@babel/preset-react"], + "presets": ["@babel/preset-env", ["@babel/preset-react", {"runtime": "automatic"}]], "plugins": ["@babel/plugin-proposal-class-properties"] } \ No newline at end of file diff --git a/app/assets/assets/img/1F642.png b/app/assets/assets/img/1F642.png new file mode 100644 index 0000000000000000000000000000000000000000..b37115fd507c895673f767880a68c5d0b5475f9e GIT binary patch literal 1421 zcmeAS@N?(olHy`uVBq!ia0vp^9w5xY3?!3`ol6-Qn1lm-LR{Soe1IZD9WcT?0B67i zaMFKXX#?fTazz*!8NNNyl9FKg`b4X>M%=@hM^c>S(qWa$M^x4>l;h%LYO59h{7Cc5 zV=W$TCU+;EKySVvAHLVOG#+18Z>|zsHcMvdOc`YbHYIts_xCg<#8^smM5HBI%kxB1 z;{>PoNcnm2{(P?W>ZZokV=B+Dt8Z8=_xq*xnZ3&P*4)KeB7D3|F`)uXObpyyOe^Nd zx;pT<*z+u(Efeg^=jO=s=C;O#gUaXjE1%t`9OB2fZKb@5BAdS_@A(7DJJ%@Gm5T0K ztMKlw=Jr+c5kdT_N^Ff4VpF;#SIv`MJzw_aO^pd{lIs`Av9mG0xS_$p&iLet`own0 z0586cOXQj=#XMbjCUr=L2l9sn@PD|k`Sy-RR0#jnZpqTm4oiSR6I>GH7tFx=M?$#o z^Ot`=cT5P2%+CGz?#JslZ*ShXwQZ|d@97iAMRUIPOZSvZrhk$OD88V6_MA$of5PuO zp||tIBScP~67oIs@qEf>Q-)zqj&R`fn~T zulwD5$2$GbpPEl6m)EavP*|*}d-xX;n_tYS(4CqgwB8aWnG36^r-FEZGa*aalj_6VvYg zGi}!VgROhl%=ydy;K#w!D>5ZlW#`N>nZP=4QBjkC*tuBIpGSkYx`ps8zAfIR6z915 z!o7e;cg`I0j|;p%Vf7a7pbej5CBJN8tmOJV^RUwS1*#drD;KEreDK+%+;%KbeNv&> z1(t^yk}^%_Z5HQnENe(I-0*YZ&$`0KlREFTdaop!FYSA|s-?y}H$-8wgi3G7m)DC@ z9UV7t-0d>obyv7KMyZ)&3ag~+>|F_qZ!;U7Pz~bl)j847f2q-?M0%ESP*?1x1(Nm;w9 zt6JLwvl4@gQ~XW@Hf{g5YvbADuYU2bcWfy#@zmd1CuPx6UuN~|+U30qx86+2%FB(( z|JGZ=rJp|0$JW(o%M9_}r>WsLm&Lw*Ulsqj#<=$j!>@zW+GnbL+_NQe{?;kex7%#r z=E--$Ek!GGYmAQe`oAJYeFzUvS*#98>yk|%63gNQXN6MvQV?Jo+>w8>m uoVDUa!CpHXBP}(9d*yGxoLv6jVLzk7=BR~Tvjl#D${kNvKbLh*2~7ZB4-(t} literal 0 HcmV?d00001 diff --git a/app/assets/assets/img/arrow-clockwise.svg b/app/assets/assets/img/arrow-clockwise.svg new file mode 100644 index 0000000000..b072eb097a --- /dev/null +++ b/app/assets/assets/img/arrow-clockwise.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/app/assets/assets/img/arrow-counterclockwise.svg b/app/assets/assets/img/arrow-counterclockwise.svg new file mode 100644 index 0000000000..b0b23b9bbc --- /dev/null +++ b/app/assets/assets/img/arrow-counterclockwise.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/app/assets/assets/img/chat-square-quote.svg b/app/assets/assets/img/chat-square-quote.svg new file mode 100644 index 0000000000..40893f495a --- /dev/null +++ b/app/assets/assets/img/chat-square-quote.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/app/assets/assets/img/chevron-down.svg b/app/assets/assets/img/chevron-down.svg new file mode 100644 index 0000000000..1f0b8bc703 --- /dev/null +++ b/app/assets/assets/img/chevron-down.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/app/assets/assets/img/code.svg b/app/assets/assets/img/code.svg new file mode 100644 index 0000000000..079f5c67f1 --- /dev/null +++ b/app/assets/assets/img/code.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/app/assets/assets/img/justify.svg b/app/assets/assets/img/justify.svg new file mode 100644 index 0000000000..009bd7214d --- /dev/null +++ b/app/assets/assets/img/justify.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/app/assets/assets/img/link.svg b/app/assets/assets/img/link.svg new file mode 100644 index 0000000000..df35bc8a1e --- /dev/null +++ b/app/assets/assets/img/link.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/app/assets/assets/img/list-ol.svg b/app/assets/assets/img/list-ol.svg new file mode 100644 index 0000000000..5782568d7c --- /dev/null +++ b/app/assets/assets/img/list-ol.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/app/assets/assets/img/list-ul.svg b/app/assets/assets/img/list-ul.svg new file mode 100644 index 0000000000..217d1539c5 --- /dev/null +++ b/app/assets/assets/img/list-ul.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/app/assets/assets/img/pencil-fill.svg b/app/assets/assets/img/pencil-fill.svg new file mode 100644 index 0000000000..59d2830c5e --- /dev/null +++ b/app/assets/assets/img/pencil-fill.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/app/assets/assets/img/text-center.svg b/app/assets/assets/img/text-center.svg new file mode 100644 index 0000000000..2887a99f26 --- /dev/null +++ b/app/assets/assets/img/text-center.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/app/assets/assets/img/text-left.svg b/app/assets/assets/img/text-left.svg new file mode 100644 index 0000000000..0452611648 --- /dev/null +++ b/app/assets/assets/img/text-left.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/app/assets/assets/img/text-paragraph.svg b/app/assets/assets/img/text-paragraph.svg new file mode 100644 index 0000000000..9779beabf1 --- /dev/null +++ b/app/assets/assets/img/text-paragraph.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/app/assets/assets/img/text-right.svg b/app/assets/assets/img/text-right.svg new file mode 100644 index 0000000000..34686b0f1f --- /dev/null +++ b/app/assets/assets/img/text-right.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/app/assets/assets/img/type-bold.svg b/app/assets/assets/img/type-bold.svg new file mode 100644 index 0000000000..276d133c25 --- /dev/null +++ b/app/assets/assets/img/type-bold.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/app/assets/assets/img/type-h1.svg b/app/assets/assets/img/type-h1.svg new file mode 100644 index 0000000000..4c89181757 --- /dev/null +++ b/app/assets/assets/img/type-h1.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/app/assets/assets/img/type-h2.svg b/app/assets/assets/img/type-h2.svg new file mode 100644 index 0000000000..b6ab765012 --- /dev/null +++ b/app/assets/assets/img/type-h2.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/app/assets/assets/img/type-italic.svg b/app/assets/assets/img/type-italic.svg new file mode 100644 index 0000000000..3ac6b09f02 --- /dev/null +++ b/app/assets/assets/img/type-italic.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/app/assets/assets/img/type-strikethrough.svg b/app/assets/assets/img/type-strikethrough.svg new file mode 100644 index 0000000000..1c940e42a8 --- /dev/null +++ b/app/assets/assets/img/type-strikethrough.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/app/assets/assets/img/type-underline.svg b/app/assets/assets/img/type-underline.svg new file mode 100644 index 0000000000..c299b8bf2f --- /dev/null +++ b/app/assets/assets/img/type-underline.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/app/assets/images/1F642.png b/app/assets/images/1F642.png new file mode 100644 index 0000000000000000000000000000000000000000..b37115fd507c895673f767880a68c5d0b5475f9e GIT binary patch literal 1421 zcmeAS@N?(olHy`uVBq!ia0vp^9w5xY3?!3`ol6-Qn1lm-LR{Soe1IZD9WcT?0B67i zaMFKXX#?fTazz*!8NNNyl9FKg`b4X>M%=@hM^c>S(qWa$M^x4>l;h%LYO59h{7Cc5 zV=W$TCU+;EKySVvAHLVOG#+18Z>|zsHcMvdOc`YbHYIts_xCg<#8^smM5HBI%kxB1 z;{>PoNcnm2{(P?W>ZZokV=B+Dt8Z8=_xq*xnZ3&P*4)KeB7D3|F`)uXObpyyOe^Nd zx;pT<*z+u(Efeg^=jO=s=C;O#gUaXjE1%t`9OB2fZKb@5BAdS_@A(7DJJ%@Gm5T0K ztMKlw=Jr+c5kdT_N^Ff4VpF;#SIv`MJzw_aO^pd{lIs`Av9mG0xS_$p&iLet`own0 z0586cOXQj=#XMbjCUr=L2l9sn@PD|k`Sy-RR0#jnZpqTm4oiSR6I>GH7tFx=M?$#o z^Ot`=cT5P2%+CGz?#JslZ*ShXwQZ|d@97iAMRUIPOZSvZrhk$OD88V6_MA$of5PuO zp||tIBScP~67oIs@qEf>Q-)zqj&R`fn~T zulwD5$2$GbpPEl6m)EavP*|*}d-xX;n_tYS(4CqgwB8aWnG36^r-FEZGa*aalj_6VvYg zGi}!VgROhl%=ydy;K#w!D>5ZlW#`N>nZP=4QBjkC*tuBIpGSkYx`ps8zAfIR6z915 z!o7e;cg`I0j|;p%Vf7a7pbej5CBJN8tmOJV^RUwS1*#drD;KEreDK+%+;%KbeNv&> z1(t^yk}^%_Z5HQnENe(I-0*YZ&$`0KlREFTdaop!FYSA|s-?y}H$-8wgi3G7m)DC@ z9UV7t-0d>obyv7KMyZ)&3ag~+>|F_qZ!;U7Pz~bl)j847f2q-?M0%ESP*?1x1(Nm;w9 zt6JLwvl4@gQ~XW@Hf{g5YvbADuYU2bcWfy#@zmd1CuPx6UuN~|+U30qx86+2%FB(( z|JGZ=rJp|0$JW(o%M9_}r>WsLm&Lw*Ulsqj#<=$j!>@zW+GnbL+_NQe{?;kex7%#r z=E--$Ek!GGYmAQe`oAJYeFzUvS*#98>yk|%63gNQXN6MvQV?Jo+>w8>m uoVDUa!CpHXBP}(9d*yGxoLv6jVLzk7=BR~Tvjl#D${kNvKbLh*2~7ZB4-(t} literal 0 HcmV?d00001 diff --git a/app/assets/images/arrow-clockwise.svg b/app/assets/images/arrow-clockwise.svg new file mode 100644 index 0000000000..b072eb097a --- /dev/null +++ b/app/assets/images/arrow-clockwise.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/app/assets/images/arrow-counterclockwise.svg b/app/assets/images/arrow-counterclockwise.svg new file mode 100644 index 0000000000..b0b23b9bbc --- /dev/null +++ b/app/assets/images/arrow-counterclockwise.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/app/assets/images/chat-square-quote.svg b/app/assets/images/chat-square-quote.svg new file mode 100644 index 0000000000..40893f495a --- /dev/null +++ b/app/assets/images/chat-square-quote.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/app/assets/images/chevron-down.svg b/app/assets/images/chevron-down.svg new file mode 100644 index 0000000000..1f0b8bc703 --- /dev/null +++ b/app/assets/images/chevron-down.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/app/assets/images/code.svg b/app/assets/images/code.svg new file mode 100644 index 0000000000..079f5c67f1 --- /dev/null +++ b/app/assets/images/code.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/app/assets/images/justify.svg b/app/assets/images/justify.svg new file mode 100644 index 0000000000..009bd7214d --- /dev/null +++ b/app/assets/images/justify.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/app/assets/images/lexical/1F642.png b/app/assets/images/lexical/1F642.png new file mode 100644 index 0000000000000000000000000000000000000000..b37115fd507c895673f767880a68c5d0b5475f9e GIT binary patch literal 1421 zcmeAS@N?(olHy`uVBq!ia0vp^9w5xY3?!3`ol6-Qn1lm-LR{Soe1IZD9WcT?0B67i zaMFKXX#?fTazz*!8NNNyl9FKg`b4X>M%=@hM^c>S(qWa$M^x4>l;h%LYO59h{7Cc5 zV=W$TCU+;EKySVvAHLVOG#+18Z>|zsHcMvdOc`YbHYIts_xCg<#8^smM5HBI%kxB1 z;{>PoNcnm2{(P?W>ZZokV=B+Dt8Z8=_xq*xnZ3&P*4)KeB7D3|F`)uXObpyyOe^Nd zx;pT<*z+u(Efeg^=jO=s=C;O#gUaXjE1%t`9OB2fZKb@5BAdS_@A(7DJJ%@Gm5T0K ztMKlw=Jr+c5kdT_N^Ff4VpF;#SIv`MJzw_aO^pd{lIs`Av9mG0xS_$p&iLet`own0 z0586cOXQj=#XMbjCUr=L2l9sn@PD|k`Sy-RR0#jnZpqTm4oiSR6I>GH7tFx=M?$#o z^Ot`=cT5P2%+CGz?#JslZ*ShXwQZ|d@97iAMRUIPOZSvZrhk$OD88V6_MA$of5PuO zp||tIBScP~67oIs@qEf>Q-)zqj&R`fn~T zulwD5$2$GbpPEl6m)EavP*|*}d-xX;n_tYS(4CqgwB8aWnG36^r-FEZGa*aalj_6VvYg zGi}!VgROhl%=ydy;K#w!D>5ZlW#`N>nZP=4QBjkC*tuBIpGSkYx`ps8zAfIR6z915 z!o7e;cg`I0j|;p%Vf7a7pbej5CBJN8tmOJV^RUwS1*#drD;KEreDK+%+;%KbeNv&> z1(t^yk}^%_Z5HQnENe(I-0*YZ&$`0KlREFTdaop!FYSA|s-?y}H$-8wgi3G7m)DC@ z9UV7t-0d>obyv7KMyZ)&3ag~+>|F_qZ!;U7Pz~bl)j847f2q-?M0%ESP*?1x1(Nm;w9 zt6JLwvl4@gQ~XW@Hf{g5YvbADuYU2bcWfy#@zmd1CuPx6UuN~|+U30qx86+2%FB(( z|JGZ=rJp|0$JW(o%M9_}r>WsLm&Lw*Ulsqj#<=$j!>@zW+GnbL+_NQe{?;kex7%#r z=E--$Ek!GGYmAQe`oAJYeFzUvS*#98>yk|%63gNQXN6MvQV?Jo+>w8>m uoVDUa!CpHXBP}(9d*yGxoLv6jVLzk7=BR~Tvjl#D${kNvKbLh*2~7ZB4-(t} literal 0 HcmV?d00001 diff --git a/app/assets/images/lexical/arrow-clockwise.svg b/app/assets/images/lexical/arrow-clockwise.svg new file mode 100644 index 0000000000..b072eb097a --- /dev/null +++ b/app/assets/images/lexical/arrow-clockwise.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/app/assets/images/lexical/arrow-counterclockwise.svg b/app/assets/images/lexical/arrow-counterclockwise.svg new file mode 100644 index 0000000000..b0b23b9bbc --- /dev/null +++ b/app/assets/images/lexical/arrow-counterclockwise.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/app/assets/images/lexical/chat-square-quote.svg b/app/assets/images/lexical/chat-square-quote.svg new file mode 100644 index 0000000000..40893f495a --- /dev/null +++ b/app/assets/images/lexical/chat-square-quote.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/app/assets/images/lexical/chevron-down.svg b/app/assets/images/lexical/chevron-down.svg new file mode 100644 index 0000000000..1f0b8bc703 --- /dev/null +++ b/app/assets/images/lexical/chevron-down.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/app/assets/images/lexical/code.svg b/app/assets/images/lexical/code.svg new file mode 100644 index 0000000000..079f5c67f1 --- /dev/null +++ b/app/assets/images/lexical/code.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/app/assets/images/lexical/justify.svg b/app/assets/images/lexical/justify.svg new file mode 100644 index 0000000000..009bd7214d --- /dev/null +++ b/app/assets/images/lexical/justify.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/app/assets/images/lexical/link.svg b/app/assets/images/lexical/link.svg new file mode 100644 index 0000000000..df35bc8a1e --- /dev/null +++ b/app/assets/images/lexical/link.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/app/assets/images/lexical/list-ol.svg b/app/assets/images/lexical/list-ol.svg new file mode 100644 index 0000000000..5782568d7c --- /dev/null +++ b/app/assets/images/lexical/list-ol.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/app/assets/images/lexical/list-ul.svg b/app/assets/images/lexical/list-ul.svg new file mode 100644 index 0000000000..217d1539c5 --- /dev/null +++ b/app/assets/images/lexical/list-ul.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/app/assets/images/lexical/pencil-fill.svg b/app/assets/images/lexical/pencil-fill.svg new file mode 100644 index 0000000000..59d2830c5e --- /dev/null +++ b/app/assets/images/lexical/pencil-fill.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/app/assets/images/lexical/text-center.svg b/app/assets/images/lexical/text-center.svg new file mode 100644 index 0000000000..2887a99f26 --- /dev/null +++ b/app/assets/images/lexical/text-center.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/app/assets/images/lexical/text-left.svg b/app/assets/images/lexical/text-left.svg new file mode 100644 index 0000000000..0452611648 --- /dev/null +++ b/app/assets/images/lexical/text-left.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/app/assets/images/lexical/text-paragraph.svg b/app/assets/images/lexical/text-paragraph.svg new file mode 100644 index 0000000000..9779beabf1 --- /dev/null +++ b/app/assets/images/lexical/text-paragraph.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/app/assets/images/lexical/text-right.svg b/app/assets/images/lexical/text-right.svg new file mode 100644 index 0000000000..34686b0f1f --- /dev/null +++ b/app/assets/images/lexical/text-right.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/app/assets/images/lexical/type-bold.svg b/app/assets/images/lexical/type-bold.svg new file mode 100644 index 0000000000..276d133c25 --- /dev/null +++ b/app/assets/images/lexical/type-bold.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/app/assets/images/lexical/type-h1.svg b/app/assets/images/lexical/type-h1.svg new file mode 100644 index 0000000000..4c89181757 --- /dev/null +++ b/app/assets/images/lexical/type-h1.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/app/assets/images/lexical/type-h2.svg b/app/assets/images/lexical/type-h2.svg new file mode 100644 index 0000000000..b6ab765012 --- /dev/null +++ b/app/assets/images/lexical/type-h2.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/app/assets/images/lexical/type-italic.svg b/app/assets/images/lexical/type-italic.svg new file mode 100644 index 0000000000..3ac6b09f02 --- /dev/null +++ b/app/assets/images/lexical/type-italic.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/app/assets/images/lexical/type-strikethrough.svg b/app/assets/images/lexical/type-strikethrough.svg new file mode 100644 index 0000000000..1c940e42a8 --- /dev/null +++ b/app/assets/images/lexical/type-strikethrough.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/app/assets/images/lexical/type-underline.svg b/app/assets/images/lexical/type-underline.svg new file mode 100644 index 0000000000..c299b8bf2f --- /dev/null +++ b/app/assets/images/lexical/type-underline.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/app/assets/images/link.svg b/app/assets/images/link.svg new file mode 100644 index 0000000000..df35bc8a1e --- /dev/null +++ b/app/assets/images/link.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/app/assets/images/list-ol.svg b/app/assets/images/list-ol.svg new file mode 100644 index 0000000000..5782568d7c --- /dev/null +++ b/app/assets/images/list-ol.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/app/assets/images/list-ul.svg b/app/assets/images/list-ul.svg new file mode 100644 index 0000000000..217d1539c5 --- /dev/null +++ b/app/assets/images/list-ul.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/app/assets/images/pencil-fill.svg b/app/assets/images/pencil-fill.svg new file mode 100644 index 0000000000..59d2830c5e --- /dev/null +++ b/app/assets/images/pencil-fill.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/app/assets/images/text-center.svg b/app/assets/images/text-center.svg new file mode 100644 index 0000000000..2887a99f26 --- /dev/null +++ b/app/assets/images/text-center.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/app/assets/images/text-left.svg b/app/assets/images/text-left.svg new file mode 100644 index 0000000000..0452611648 --- /dev/null +++ b/app/assets/images/text-left.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/app/assets/images/text-paragraph.svg b/app/assets/images/text-paragraph.svg new file mode 100644 index 0000000000..9779beabf1 --- /dev/null +++ b/app/assets/images/text-paragraph.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/app/assets/images/text-right.svg b/app/assets/images/text-right.svg new file mode 100644 index 0000000000..34686b0f1f --- /dev/null +++ b/app/assets/images/text-right.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/app/assets/images/type-bold.svg b/app/assets/images/type-bold.svg new file mode 100644 index 0000000000..276d133c25 --- /dev/null +++ b/app/assets/images/type-bold.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/app/assets/images/type-h1.svg b/app/assets/images/type-h1.svg new file mode 100644 index 0000000000..4c89181757 --- /dev/null +++ b/app/assets/images/type-h1.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/app/assets/images/type-h2.svg b/app/assets/images/type-h2.svg new file mode 100644 index 0000000000..b6ab765012 --- /dev/null +++ b/app/assets/images/type-h2.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/app/assets/images/type-italic.svg b/app/assets/images/type-italic.svg new file mode 100644 index 0000000000..3ac6b09f02 --- /dev/null +++ b/app/assets/images/type-italic.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/app/assets/images/type-strikethrough.svg b/app/assets/images/type-strikethrough.svg new file mode 100644 index 0000000000..1c940e42a8 --- /dev/null +++ b/app/assets/images/type-strikethrough.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/app/assets/images/type-underline.svg b/app/assets/images/type-underline.svg new file mode 100644 index 0000000000..c299b8bf2f --- /dev/null +++ b/app/assets/images/type-underline.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/app/assets/javascripts/lexical.min.js b/app/assets/javascripts/lexical.min.js new file mode 100644 index 0000000000..517dc5c522 --- /dev/null +++ b/app/assets/javascripts/lexical.min.js @@ -0,0 +1,2 @@ +/*! For license information please see lexical.min.js.LICENSE.txt */ +(()=>{var e={6907:(e,t,n)=>{"use strict";const r=n(1313);e.exports=r},1313:(e,t,n)=>{"use strict";var r=n(7592),i=n(9408),o=n(6969),l=n(2998);function a(e){let t=new URLSearchParams;t.append("code",e);for(let e=1;el.DEPRECATED_$isGridCellNode(e)))&&null!==o.$findMatchingParent(n.focus.getNode(),(e=>l.DEPRECATED_$isGridCellNode(e))))&&1===t.length&&l.DEPRECATED_$isGridNode(t[0])?function(e,t,n,r){1===e.length&&l.DEPRECATED_$isGridNode(e[0])||a(42);var i=e[0];e=i.getChildren(),n=i.getFirstChildOrThrow().getChildrenSize();var s=i.getChildrenSize(),u=o.$findMatchingParent(t.anchor.getNode(),(e=>l.DEPRECATED_$isGridCellNode(e)));t=(i=u&&o.$findMatchingParent(u,(e=>l.DEPRECATED_$isGridRowNode(e))))&&o.$findMatchingParent(i,(e=>l.DEPRECATED_$isGridNode(e))),l.DEPRECATED_$isGridCellNode(u)&&l.DEPRECATED_$isGridRowNode(i)&&l.DEPRECATED_$isGridNode(t)||a(43);var c=i.getIndexWithinParent(),d=Math.min(t.getChildrenSize()-1,c+s-1);let f,g;s=u.getIndexWithinParent(),u=Math.min(i.getChildrenSize()-1,s+n-1),n=Math.min(s,u),i=Math.min(c,d),s=Math.max(s,u),c=Math.max(c,d),d=t.getChildren(),u=0;for(let t=i;t<=c;t++){var p=d[t];l.DEPRECATED_$isGridRowNode(p)||a(24);var h=e[u];l.DEPRECATED_$isGridRowNode(h)||a(24),p=p.getChildren(),h=h.getChildren();let r=0;for(let e=n;e<=s;e++){let o=p[e];l.DEPRECATED_$isGridCellNode(o)||a(25);let u=h[r];l.DEPRECATED_$isGridCellNode(u)||a(25),t===i&&e===n?f=o.getKey():t===c&&e===s&&(g=o.getKey());let d=o.getChildren();u.getChildren().forEach((e=>{l.$isTextNode(e)&&l.$createParagraphNode().append(e),o.append(e)})),d.forEach((e=>e.remove())),r++}u++}f&&g&&((e=l.DEPRECATED_$createGridSelection()).set(t.getKey(),f,g),l.$setSelection(e),r.dispatchCommand(l.SELECTION_CHANGE_COMMAND,void 0))}(t,n,!1,e):function(e,t){let n=[],r=null;for(let t=0;t{e.update((()=>{n(m(e,t))}))}));var n=e.getRootElement();let r=null==e._window?window.document:e._window.document,i=s?(e._window||window).getSelection():null;if(null===n||null===i)return!1;let a=r.createElement("span");return a.style.cssText="position: fixed; top: -1000px;",a.append(r.createTextNode("#")),n.append(a),(n=new Range).setStart(a,0),n.setEnd(a,1),i.removeAllRanges(),i.addRange(n),new Promise((t=>{let n=e.registerCommand(l.COPY_COMMAND,(r=>(o.objectKlassEquals(r,ClipboardEvent)&&(n(),null!==h&&(window.clearTimeout(h),h=null),t(m(e,r))),!0)),l.COMMAND_PRIORITY_CRITICAL);h=window.setTimeout((()=>{n(),h=null,t(!1)}),50),r.execCommand("copy"),a.remove()}))}},3277:(e,t,n)=>{"use strict";const r=n(757);e.exports=r},757:(e,t,n)=>{"use strict";var r=n(5660);n(5433),n(9980),n(4335),n(4064),n(4279),n(6102),n(1426),n(5266),n(366),n(767),n(874),n(6836),n(2503),n(2731);var i=n(6969),o=n(2998);let l=e=>null!=e&&r.languages.hasOwnProperty(e)?e:void 0;function a(e,t){for(let n of e.childNodes){if(i.isHTMLElement(n)&&n.tagName===t)return!0;a(n,t)}return!1}class s extends o.ElementNode{static getType(){return"code"}static clone(e){return new s(e.__language,e.__key)}constructor(e,t){super(t),this.__language=l(e)}createDOM(e){let t=document.createElement("code");return i.addClassNamesToElement(t,e.theme.code),t.setAttribute("spellcheck","false"),(e=this.getLanguage())&&t.setAttribute("data-highlight-language",e),t}updateDOM(e,t){let n=this.__language;return e=e.__language,n?n!==e&&t.setAttribute("data-highlight-language",n):e&&t.removeAttribute("data-highlight-language"),!1}exportDOM(){let e=document.createElement("pre");e.setAttribute("spellcheck","false");let t=this.getLanguage();return t&&e.setAttribute("data-highlight-language",t),{element:e}}static importDOM(){return{code:e=>null!=e.textContent&&(/\r?\n/.test(e.textContent)||a(e,"BR"))?{conversion:d,priority:1}:null,div:()=>({conversion:f,priority:1}),pre:()=>({conversion:d,priority:0}),table:e=>m(e)?{conversion:g,priority:3}:null,td:e=>{let t=e.closest("table");return e.classList.contains("js-file-line")?{conversion:h,priority:3}:t&&m(t)?{conversion:p,priority:3}:null},tr:e=>(e=e.closest("table"))&&m(e)?{conversion:p,priority:3}:null}}static importJSON(e){let t=u(e.language);return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}exportJSON(){return{...super.exportJSON(),language:this.getLanguage(),type:"code",version:1}}insertNewAfter(e,t=!0){var n=this.getChildren(),r=n.length;if(2<=r&&"\n"===n[r-1].getTextContent()&&"\n"===n[r-2].getTextContent()&&e.isCollapsed()&&e.anchor.key===this.__key&&e.anchor.offset===r)return n[r-1].remove(),n[r-2].remove(),e=o.$createParagraphNode(),this.insertAfter(e,t),e;if(t=e.anchor,n=e.focus,E(t=(t.isBefore(n)?t:n).getNode())||o.$isTabNode(t)){for(t=C(t),n=[];;)if(o.$isTabNode(t))n.push(o.$createTabNode()),t=t.getNextSibling();else{if(!E(t))break;{r=0;let e=t.getTextContent(),i=t.getTextContentSize();for(;re.append(t))),this.replace(e),!0}setLanguage(e){this.getWritable().__language=l(e)}getLanguage(){return this.getLatest().__language}}function u(e){return o.$applyNodeReplacement(new s(e))}function c(e){return e instanceof s}function d(e){let t;return i.isHTMLElement(e)&&(t=e.getAttribute("data-highlight-language")),{node:u(t)}}function f(e){let t=null!==e.style.fontFamily.match("monospace");return t||function(e){for(e=e.parentElement;null!==e;){if(null!==e.style.fontFamily.match("monospace"))return!0;e=e.parentElement}return!1}(e)?{after:t=>{let n=e.parentNode;return null!=n&&e!==n.lastChild&&t.push(o.$createLineBreakNode()),t},node:t?u():null}:{node:null}}function g(){return{node:u()}}function p(){return{node:null}}function h(e){return{after:t=>(e.parentNode&&e.parentNode.nextSibling&&t.push(o.$createLineBreakNode()),t),node:null}}function m(e){return e.classList.contains("js-file-line-container")}let _={c:"C",clike:"C-like",cpp:"C++",css:"CSS",html:"HTML",java:"Java",js:"JavaScript",markdown:"Markdown",objc:"Objective-C",plain:"Plain Text",py:"Python",rust:"Rust",sql:"SQL",swift:"Swift",typescript:"TypeScript",xml:"XML"},y={cpp:"cpp",java:"java",javascript:"js",md:"markdown",plaintext:"plain",python:"py",text:"plain",ts:"typescript"};function v(e){return y[e]||e}class b extends o.TextNode{constructor(e,t,n){super(e,n),this.__highlightType=t}static getType(){return"code-highlight"}static clone(e){return new b(e.__text,e.__highlightType||void 0,e.__key)}getHighlightType(){return this.getLatest().__highlightType}createDOM(e){let t=super.createDOM(e);return e=x(e.theme,this.__highlightType),i.addClassNamesToElement(t,e),t}updateDOM(e,t,n){let r=super.updateDOM(e,t,n);return(e=x(n.theme,e.__highlightType))!==(n=x(n.theme,this.__highlightType))&&(e&&i.removeClassNamesFromElement(t,e),n&&i.addClassNamesToElement(t,n)),r}static importJSON(e){let t=N(e.text,e.highlightType);return t.setFormat(e.format),t.setDetail(e.detail),t.setMode(e.mode),t.setStyle(e.style),t}exportJSON(){return{...super.exportJSON(),highlightType:this.getHighlightType(),type:"code-highlight",version:1}}setFormat(){return this}isParentRequired(){return!0}createParentElementNode(){return u()}}function x(e,t){return t&&e&&e.codeHighlight&&e.codeHighlight[t]}function N(e,t){return o.$applyNodeReplacement(new b(e,t))}function E(e){return e instanceof b}function C(e){let t=e;for(;E(e)||o.$isTabNode(e);)t=e,e=e.getPreviousSibling();return t}function S(e){let t=e;for(;E(e)||o.$isTabNode(e);)t=e,e=e.getNextSibling();return t}let T={defaultLanguage:"javascript",tokenize(e,t){return r.tokenize(e,r.languages[t||""]||r.languages[this.defaultLanguage])}};function k(e,t){let n=null;var r=null,i=e;let l=t,a=e.getTextContent();for(;;){if(0===l){if(null===(i=i.getPreviousSibling()))break;if(!(E(i)||o.$isTabNode(i)||o.$isLineBreakNode(i)))throw Error("Expected a valid Code Node: CodeHighlightNode, TabNode, LineBreakNode");if(o.$isLineBreakNode(i)){n={node:i,offset:1};break}l=Math.max(0,i.getTextContentSize()-1),a=i.getTextContent()}else l--;let e=a[l];E(i)&&" "!==e&&(r={node:i,offset:l})}if(null!==r)return r;if(r=null,t{!function(e,t){if(c(e=o.$getNodeByKey(e))&&e.isAttached()){var n=o.$getSelection();if(o.$isRangeSelection(n)){var r=(n=n.anchor).offset,i="element"===n.type&&o.$isLineBreakNode(e.getChildAtIndex(n.offset-1)),l=0;if(!i){let e=n.getNode();l=r+e.getPreviousSiblings().reduce(((e,t)=>e+t.getTextContentSize()),0)}t()&&(i?n.getNode().select(r,r):e.getChildren().some((e=>{let t=o.$isTextNode(e);if(t||o.$isLineBreakNode(e)){let n=e.getTextContentSize();if(t&&n>=l)return e.select(l,l),!0;l-=n}return!1})))}else t()}}(r,(()=>{var t=o.$getNodeByKey(r);if(!c(t)||!t.isAttached())return!1;var i=t.getTextContent();i=D(i=n.tokenize(i,t.getLanguage()||n.defaultLanguage));var l=t.getChildren();for(t=0;t{R.delete(r)},skipTransforms:!0}))}function D(e,t){let n=[];for(let r of e)if("string"==typeof r){let i=(e=r.split(/(\n|\t)/)).length;for(let r=0;re.remove())),e===o.KEY_ARROW_UP_COMMAND?(g.forEach((e=>p.insertBefore(e))),p.insertBefore(t)):(p.insertAfter(t),p=t,g.forEach((e=>{p.insertAfter(e),p=e}))),n.setTextNodeRange(s,l,u,a),!0}function F(e,t){let n=o.$getSelection();if(!o.$isRangeSelection(n))return!1;let{anchor:r,focus:i}=n;var l=r.getNode();let a=i.getNode();if(e=e===o.MOVE_TO_START,!E(l)&&!o.$isTabNode(l)||!E(a)&&!o.$isTabNode(a))return!1;if(e)if(null!==(l=k(a,i.offset))){let{node:e,offset:t}=l;o.$isLineBreakNode(e)?e.selectNext(0,0):n.setTextNodeRange(e,t,e,t)}else a.getParentOrThrow().selectStart();else w(a).select();return t.preventDefault(),t.stopPropagation(),!0}t.$createCodeHighlightNode=N,t.$createCodeNode=u,t.$isCodeHighlightNode=E,t.$isCodeNode=c,t.CODE_LANGUAGE_FRIENDLY_NAME_MAP=_,t.CODE_LANGUAGE_MAP=y,t.CodeHighlightNode=b,t.CodeNode=s,t.DEFAULT_CODE_LANGUAGE="javascript",t.PrismTokenizer=T,t.getCodeLanguages=()=>Object.keys(r.languages).filter((e=>"function"!=typeof r.languages[e])).sort(),t.getDefaultCodeLanguage=()=>"javascript",t.getEndOfCodeInLine=w,t.getFirstCodeNodeOfLine=C,t.getLanguageFriendlyName=function(e){return e=v(e),_[e]||e},t.getLastCodeNodeOfLine=S,t.getStartOfCodeInLine=k,t.normalizeCodeLang=v,t.registerCodeHighlighting=function(e,t){if(!e.hasNodes([s,b]))throw Error("CodeHighlightPlugin: CodeNode or CodeHighlightNode not registered on editor");return null==t&&(t=T),i.mergeRegister(e.registerMutationListener(s,(t=>{e.update((()=>{for(let[i,l]of t)if("destroyed"!==l){var n=o.$getNodeByKey(i);if(null!==n)e:{var r=n;if(null===(n=e.getElementByKey(r.getKey())))break e;let t=(r=r.getChildren()).length;if(t===n.__cachedChildrenLength)break e;n.__cachedChildrenLength=t;let i="1",l=1;for(let e=0;eA(n,e,t))),e.registerNodeTransform(o.TextNode,(n=>O(n,e,t))),e.registerNodeTransform(b,(n=>O(n,e,t))),e.registerCommand(o.KEY_TAB_COMMAND,(t=>{let n=function(e){var t=o.$getSelection();if(!o.$isRangeSelection(t)||!$(t))return null;let n=e?o.OUTDENT_CONTENT_COMMAND:o.INDENT_CONTENT_COMMAND;if(e=e?o.OUTDENT_CONTENT_COMMAND:o.INSERT_TAB_COMMAND,1!!$(o.$getSelection())&&(o.$insertNodes([o.$createTabNode()]),!0)),o.COMMAND_PRIORITY_LOW),e.registerCommand(o.INDENT_CONTENT_COMMAND,(()=>L(o.INDENT_CONTENT_COMMAND)),o.COMMAND_PRIORITY_LOW),e.registerCommand(o.OUTDENT_CONTENT_COMMAND,(()=>L(o.OUTDENT_CONTENT_COMMAND)),o.COMMAND_PRIORITY_LOW),e.registerCommand(o.KEY_ARROW_UP_COMMAND,(e=>I(o.KEY_ARROW_UP_COMMAND,e)),o.COMMAND_PRIORITY_LOW),e.registerCommand(o.KEY_ARROW_DOWN_COMMAND,(e=>I(o.KEY_ARROW_DOWN_COMMAND,e)),o.COMMAND_PRIORITY_LOW),e.registerCommand(o.MOVE_TO_END,(e=>F(o.MOVE_TO_END,e)),o.COMMAND_PRIORITY_LOW),e.registerCommand(o.MOVE_TO_START,(e=>F(o.MOVE_TO_START,e)),o.COMMAND_PRIORITY_LOW))}},573:(e,t,n)=>{"use strict";const r=n(7370);e.exports=r},7370:(e,t,n)=>{"use strict";var r=n(2998);t.registerDragonSupport=function(e){let t=window.location.origin,n=n=>{if(n.origin===t){var i=e.getRootElement();if(document.activeElement===i&&"string"==typeof(i=n.data)){try{var o=JSON.parse(i)}catch(e){return}if(o&&"nuanria_messaging"===o.protocol&&"request"===o.type&&(o=o.payload)&&"makeChanges"===o.functionId&&(o=o.args)){const[t,i,l,a,s]=o;e.update((()=>{const e=r.$getSelection();if(r.$isRangeSelection(e)){var o=e.anchor;let u=o.getNode(),c=0,d=0;r.$isTextNode(u)&&0<=t&&0<=i&&(c=t,d=t+i,e.setTextNodeRange(u,c,u,d)),c===d&&""===l||(e.insertRawText(l),u=o.getNode()),r.$isTextNode(u)&&(c=a,d=a+s,c=c>(o=u.getTextContentSize())?o:c,d=d>o?o:d,e.setTextNodeRange(u,c,u,d)),n.stopImmediatePropagation()}}))}}}};return window.addEventListener("message",n,!0),()=>{window.removeEventListener("message",n,!0)}}},8854:(e,t,n)=>{"use strict";const r=n(4379);e.exports=r},4379:(e,t,n)=>{"use strict";var r=n(6969),i=n(2998);t.createEmptyHistoryState=function(){return{current:null,redoStack:[],undoStack:[]}},t.registerHistory=function(e,t,n){let o=function(e,t){let n=Date.now(),r=0;return(o,l,a,s,u,c)=>{let d=Date.now();if(c.has("historic"))return r=0,n=d,2;let f=function(e,t,n,r,o){if(null===e||0===n.size&&0===r.size&&!o)return 0;var l=t._selection,a=e._selection;if(o)return 1;if(!(i.$isRangeSelection(l)&&i.$isRangeSelection(a)&&a.isCollapsed()&&l.isCollapsed()))return 0;o=t._nodeMap;let s=[];for(let e of n)void 0!==(n=o.get(e))&&s.push(n);for(let[e,t]of r)t&&(void 0===(r=o.get(e))||i.$isRootNode(r)||s.push(r));return 0===s.length?0:1{var g=null===a||a.editor===e,p=c.has("history-push");if(!p&&g&&c.has("history-merge"))return 0;if(null===o)return 1;var h=l._selection;if(!(0{const u=t.current,c=t.redoStack,d=t.undoStack,f=null===u?null:u.editorState;if(null===u||n!==f){if(1===(r=o(r,n,u,l,a,s)))0!==c.length&&(t.redoStack=[],e.dispatchCommand(i.CAN_REDO_COMMAND,!1)),null!==u&&(d.push({...u}),e.dispatchCommand(i.CAN_UNDO_COMMAND,!0));else if(2===r)return;t.current={editor:e,editorState:n}}};let l=r.mergeRegister(e.registerCommand(i.UNDO_COMMAND,(()=>{let n=t.redoStack,r=t.undoStack;if(0!==r.length){let o=t.current,l=r.pop();null!==o&&(n.push(o),e.dispatchCommand(i.CAN_REDO_COMMAND,!0)),0===r.length&&e.dispatchCommand(i.CAN_UNDO_COMMAND,!1),t.current=l||null,l&&l.editor.setEditorState(l.editorState,{tag:"historic"})}return!0}),i.COMMAND_PRIORITY_EDITOR),e.registerCommand(i.REDO_COMMAND,(()=>{let n=t.redoStack;var r=t.undoStack;if(0!==n.length){let o=t.current;null!==o&&(r.push(o),e.dispatchCommand(i.CAN_UNDO_COMMAND,!0)),r=n.pop(),0===n.length&&e.dispatchCommand(i.CAN_REDO_COMMAND,!1),t.current=r||null,r&&r.editor.setEditorState(r.editorState,{tag:"historic"})}return!0}),i.COMMAND_PRIORITY_EDITOR),e.registerCommand(i.CLEAR_EDITOR_COMMAND,(()=>(t.undoStack=[],t.redoStack=[],t.current=null,!1)),i.COMMAND_PRIORITY_EDITOR),e.registerCommand(i.CLEAR_HISTORY_COMMAND,(()=>(t.undoStack=[],t.redoStack=[],t.current=null,e.dispatchCommand(i.CAN_REDO_COMMAND,!1),e.dispatchCommand(i.CAN_UNDO_COMMAND,!1),!0)),i.COMMAND_PRIORITY_EDITOR),e.registerUpdateListener(n)),a=e.registerUpdateListener(n);return()=>{l(),a()}}},7592:(e,t,n)=>{"use strict";const r=n(4478);e.exports=r},4478:(e,t,n)=>{"use strict";var r=n(9408),i=n(6969),o=n(2998);function l(e,t,n,a=null){let s=null==a||t.isSelected(a),u=o.$isElementNode(t)&&t.excludeFromCopy("html");var c=t;null!==a&&(c=r.$cloneWithProperties(t),c=o.$isTextNode(c)&&null!=a?r.$sliceSelectedTextNodeContent(a,c):c);let d=o.$isElementNode(c)?c.getChildren():[],{element:f,after:g}=c.exportDOM(e);if(!f)return!1;let p=document.createDocumentFragment();for(let n=0;n{"use strict";const r=n(3906);e.exports=r},3906:(e,t,n)=>{"use strict";var r=n(6969),i=n(2998);let o=new Set(["http:","https:","mailto:","sms:","tel:"]);class l extends i.ElementNode{static getType(){return"link"}static clone(e){return new l(e.__url,{rel:e.__rel,target:e.__target,title:e.__title},e.__key)}constructor(e,t={},n){super(n);let{target:r=null,rel:i=null,title:o=null}=t;this.__url=e,this.__target=r,this.__rel=i,this.__title=o}createDOM(e){let t=document.createElement("a");return t.href=this.sanitizeUrl(this.__url),null!==this.__target&&(t.target=this.__target),null!==this.__rel&&(t.rel=this.__rel),null!==this.__title&&(t.title=this.__title),r.addClassNamesToElement(t,e.theme.link),t}updateDOM(e,t){let n=this.__url,r=this.__target,i=this.__rel,o=this.__title;return n!==e.__url&&(t.href=n),r!==e.__target&&(r?t.target=r:t.removeAttribute("target")),i!==e.__rel&&(i?t.rel=i:t.removeAttribute("rel")),o!==e.__title&&(o?t.title=o:t.removeAttribute("title")),!1}static importDOM(){return{a:()=>({conversion:a,priority:1})}}static importJSON(e){let t=s(e.url,{rel:e.rel,target:e.target,title:e.title});return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}sanitizeUrl(e){try{let t=new URL(e);if(!o.has(t.protocol))return"about:blank"}catch{}return e}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),type:"link",url:this.getURL(),version:1}}getURL(){return this.getLatest().__url}setURL(e){this.getWritable().__url=e}getTarget(){return this.getLatest().__target}setTarget(e){this.getWritable().__target=e}getRel(){return this.getLatest().__rel}setRel(e){this.getWritable().__rel=e}getTitle(){return this.getLatest().__title}setTitle(e){this.getWritable().__title=e}insertNewAfter(e,t=!0){return e=this.getParentOrThrow().insertNewAfter(e,t),i.$isElementNode(e)?(t=s(this.__url,{rel:this.__rel,target:this.__target,title:this.__title}),e.append(t),t):null}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(e,t){if(!i.$isRangeSelection(t))return!1;e=t.anchor.getNode();let n=t.focus.getNode();return this.isParentOf(e)&&this.isParentOf(n)&&0{if(u(e=e.getParent())){let t=e.getChildren();for(let n=0;n{var l=t.getParent();if(l!==c&&null!==l&&(!i.$isElementNode(t)||t.isInline()))if(u(l))c=l,l.setURL(e),void 0!==n&&l.setTarget(n),null!==o&&c.setRel(o),void 0!==r&&c.setTitle(r);else if(l.is(a)||(a=l,c=s(e,{rel:o,target:n}),u(l)?null===t.getPreviousSibling()?l.insertBefore(c):l.insertAfter(c):t.insertBefore(c)),u(t)){if(!t.is(c)){if(null!==c){l=t.getChildren();for(let e=0;e{"use strict";const r=n(9206);e.exports=r},9206:(e,t,n)=>{"use strict";var r=n(2998),i=n(6969);function o(e){let t=new URLSearchParams;t.append("code",e);for(let e=1;er.append(e))),o=x(),l=w(l),o.append(l),f(l,e.getNextSiblings()),n.insertBefore(i),n.insertAfter(o),n.replace(e)}h(t),h(r)}}}class _ extends r.ElementNode{static getType(){return"listitem"}static clone(e){return new _(e.__value,e.__checked,e.__key)}constructor(e,t,n){super(n),this.__value=void 0===e?1:e,this.__checked=t}createDOM(e){let t=document.createElement("li"),n=this.getParent();return O(n)&&"check"===n.getListType()&&v(t,this,null),t.value=this.__value,y(t,e.theme,this),t}updateDOM(e,t,n){let r=this.getParent();return O(r)&&"check"===r.getListType()&&v(t,this,e),t.value=this.__value,y(t,n.theme,this),!1}static transform(){return e=>{let t=e.getParent();O(t)&&(h(t),"check"!==t.getListType()&&null!=e.getChecked()&&e.setChecked(void 0))}}static importDOM(){return{li:()=>({conversion:b,priority:0})}}static importJSON(e){let t=x();return t.setChecked(e.checked),t.setValue(e.value),t.setFormat(e.format),t.setDirection(e.direction),t}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),type:"listitem",value:this.getValue(),version:1}}append(...e){for(let t=0;t{e.append(t)})),this.remove(),0===n.getChildrenSize()&&n.remove(),e}insertAfter(e,t=!0){var n=this.getParentOrThrow();O(n)||o(39);var r=this.getNextSiblings();if(N(e))return t=super.insertAfter(e,t),O(e=e.getParentOrThrow())&&h(e),t;if(O(e)){for(n=e,r=(e=e.getChildren()).length-1;0<=r;r--)n=e[r],this.insertAfter(n,t);return n}if(n.insertAfter(e,t),0!==r.length){let i=w(n.getListType());r.forEach((e=>i.append(e))),e.insertAfter(i,t)}return e}remove(e){let t=this.getPreviousSibling(),n=this.getNextSibling();super.remove(e),t&&n&&u(t)&&u(n)?(p(t.getFirstChild(),n.getFirstChild()),n.remove()):n&&O(e=n.getParent())&&h(e)}insertNewAfter(e,t=!0){return e=x(null==this.__checked&&void 0),this.insertAfter(e,t),e}collapseAtStart(e){let t=r.$createParagraphNode();this.getChildren().forEach((e=>t.append(e)));var n=this.getParentOrThrow(),i=n.getParentOrThrow();let o=N(i);return 1===n.getChildrenSize()?o?(n.remove(),i.select()):(n.insertBefore(t),n.remove(),n=e.anchor,e=e.focus,i=t.getKey(),"element"===n.type&&n.getNode().is(this)&&n.set(i,n.offset,"element"),"element"===e.type&&e.getNode().is(this)&&e.set(i,e.offset,"element")):(n.insertBefore(t),this.remove()),!0}getValue(){return this.getLatest().__value}setValue(e){this.getWritable().__value=e}getChecked(){return this.getLatest().__checked}setChecked(e){this.getWritable().__checked=e}toggleChecked(){this.setChecked(!this.__checked)}getIndent(){var e=this.getParent();if(null===e)return this.getLatest().__indent;e=e.getParentOrThrow();let t=0;for(;N(e);)e=e.getParentOrThrow().getParentOrThrow(),t++;return t}setIndent(e){"number"==typeof e&&-1O(e)))?r.push(...a):o.push(...a)),0({conversion:T,priority:0}),ul:()=>({conversion:T,priority:0})}}static importJSON(e){let t=w(e.listType,e.start);return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}exportDOM(e){return({element:e}=super.exportDOM(e)),e&&i.isHTMLElement(e)&&(1!==this.__start&&e.setAttribute("start",String(this.__start)),"check"===this.__listType&&e.setAttribute("__lexicalListType","check")),{element:e}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag(),type:"list",version:1}}canBeEmpty(){return!1}canIndent(){return!1}append(...e){for(let n=0;n{O(e)&&t.push(c(e))}))):t.push(c(n))}return t}function T(e){let t=e.nodeName.toLowerCase(),n=null;return"ol"===t?n=w("number",e.start):"ul"===t&&(n=i.isHTMLElement(e)&&"check"===e.getAttribute("__lexicallisttype")?w("check"):w("bullet")),{after:S,node:n}}let k={ol:"number",ul:"bullet"};function w(e,t=1){return r.$applyNodeReplacement(new E(e,t))}function O(e){return e instanceof E}let R=r.createCommand("INSERT_UNORDERED_LIST_COMMAND"),A=r.createCommand("INSERT_ORDERED_LIST_COMMAND"),D=r.createCommand("INSERT_CHECK_LIST_COMMAND"),M=r.createCommand("REMOVE_LIST_COMMAND");t.$createListItemNode=x,t.$createListNode=w,t.$getListDepth=l,t.$handleListInsertParagraph=function(){var e=r.$getSelection();if(!r.$isRangeSelection(e)||!e.isCollapsed())return!1;if(!N(e=e.anchor.getNode())||0!==e.getChildrenSize())return!1;var t=a(e),n=e.getParent();O(n)||o(40);let i,l=n.getParent();if(r.$isRootOrShadowRoot(l))i=r.$createParagraphNode(),t.insertAfter(i);else{if(!N(l))return!1;i=x(),l.insertAfter(i)}if(i.select(),0<(t=e.getNextSiblings()).length){let e=w(n.getListType());r.$isParagraphNode(i)?i.insertAfter(e):((n=x()).append(e),i.insertAfter(n)),t.forEach((t=>{t.remove(),e.append(t)}))}return function(e){for(;null==e.getNextSibling()&&null==e.getPreviousSibling();){let t=e.getParent();if(null==t||!N(e)&&!O(e))break;e=t}e.remove()}(e),!0},t.$isListItemNode=N,t.$isListNode=O,t.INSERT_CHECK_LIST_COMMAND=D,t.INSERT_ORDERED_LIST_COMMAND=A,t.INSERT_UNORDERED_LIST_COMMAND=R,t.ListItemNode=_,t.ListNode=E,t.REMOVE_LIST_COMMAND=M,t.insertList=function(e,t){e.update((()=>{var e=r.$getSelection();if(r.$isRangeSelection(e)||r.DEPRECATED_$isGridSelection(e)){var n=e.getNodes(),i=(e=e.anchor.getNode()).getParent();if(d(e,n))n=w(t),r.$isRootOrShadowRoot(i)?(e.replace(n),i=x(),r.$isElementNode(e)&&(i.setFormat(e.getFormatType()),i.setIndent(e.getIndent())),n.append(i)):N(e)&&(f(n,(e=e.getParentOrThrow()).getChildren()),e.replace(n));else for(e=new Set,i=0;i{let e=r.$getSelection();if(r.$isRangeSelection(e)){var t=new Set,n=e.getNodes(),o=e.anchor.getNode();if(d(o,n))t.add(a(o));else for(o=0;o{"use strict";const r=n(4301);e.exports=r},4301:(e,t,n)=>{"use strict";var r=n(2998),i=n(6969);class o extends r.ElementNode{static getType(){return"mark"}static clone(e){return new o(Array.from(e.__ids),e.__key)}static importDOM(){return null}static importJSON(e){let t=l(e.ids);return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}exportJSON(){return{...super.exportJSON(),ids:this.getIDs(),type:"mark",version:1}}constructor(e,t){super(t),this.__ids=e||[]}createDOM(e){let t=document.createElement("mark");return i.addClassNamesToElement(t,e.theme.mark),1{"use strict";const r=n(6992);e.exports=r},6992:(e,t,n)=>{"use strict";var r=n(2998),i=n(3277),o=n(4783),l=n(2903),a=n(6969),s=n(3435);function u(e,t){let n={};for(let r of e)n[e=t(r)]?n[e].push(r):n[e]=[r];return n}function c(e){return{element:(e=u(e,(e=>e.type))).element||[],textFormat:e["text-format"]||[],textMatch:e["text-match"]||[]}}let d=/[!-/:-@[-`{-~\s]/;function f(e,t,n,i){for(let r of t)if(null!=(t=r.export(e,(e=>g(e,n,i)))))return t;return r.$isElementNode(e)?g(e,n,i):r.$isDecoratorNode(e)?e.getTextContent():null}function g(e,t,n){let i=[];e=e.getChildren();e:for(let o of e){for(let r of n)if(null!=(e=r.export(o,(e=>g(e,t,n)),((e,n)=>p(e,n,t))))){i.push(e);continue e}r.$isLineBreakNode(o)?i.push("\n"):r.$isTextNode(o)?i.push(p(o,o.getTextContent(),t)):r.$isElementNode(o)?i.push(g(o,t,n)):r.$isDecoratorNode(o)&&i.push(o.getTextContent())}return i.join("")}function p(e,t,n){let r=t.trim(),i=r,o=new Set;for(let t of n){n=t.format[0];let r=t.tag;if(m(e,n)&&!o.has(n)){o.add(n);var l=h(e,!0);m(l,n)||(i=r+i),m(l=h(e,!1),n)||(i+=r)}}return t.replace(r,i)}function h(e,t){let n=t?e.getPreviousSibling():e.getNextSibling();for(n||(e=e.getParentOrThrow()).isInline()&&(n=t?e.getPreviousSibling():e.getNextSibling());n;){if(r.$isElementNode(n)){if(!n.isInline())break;if(e=t?n.getLastDescendant():n.getFirstDescendant(),r.$isTextNode(e))return e;n=t?n.getPreviousSibling():n.getNextSibling()}if(r.$isTextNode(n))return n;if(!r.$isElementNode(n))break}return null}function m(e,t){return r.$isTextNode(e)&&e.hasFormat(t)}let _="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,y=_&&"documentMode"in document?document.documentMode:null;_&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),_&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),_&&"InputEvent"in window&&!y&&new window.InputEvent("input");let v=_&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),b=_&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,x=_&&/^(?=.*Chrome).*/i.test(navigator.userAgent),N=_&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!x,E=/^\s{0,3}$/,C=/^```(\w{1,10})?\s?$/;function S(e,t,n){var r=e.getTextContent();let i=function(e,t){var n=e.match(t.openTagsRegExp);if(null==n)return null;for(let o of n){var r=o.replace(/^\s/,"");if(null!=(n=t.fullMatchRegExpByTag[r])&&(n=e.match(n),r=t.transformersByTag[r],null!=n&&null!=r)){if(!1!==r.intraword)return n;var{index:i=0}=n;if(r=e[i-1],i=e[i+n[0].length],!(r&&!d.test(r)||i&&!d.test(i)))return n}}return null}(r,t);if(i){var o,l;if(i[0]===r)var a=e;else{let t=(r=i.index||0)+i[0].length;0===r?[a,o]=e.splitText(t):[l,a,o]=e.splitText(r,t)}if(a.setTextContent(i[2]),e=t.transformersByTag[i[1]])for(let t of e.format)a.hasFormat(t)||a.toggleFormat(t);a.hasFormat("code")||S(a,t,n),l&&S(l,t,n),o&&S(o,t,n)}else T(e,n)}function T(e,t){e:for(;e;){for(let n of t){let r=e.getTextContent().match(n.importRegExp);if(!r)continue;let i,o,l,a=r.index||0,s=a+r[0].length;0===a?[i,e]=e.splitText(s):[o,i,l]=e.splitText(a,s),o&&T(o,t),l&&(e=l),n.replace(i,r);continue e}break}}function k(e,t,n){let r=n.length;for(;t>=r;t--){let i=t-r;if(w(e,i,n,0,r)&&" "!==e[i+r])return i}return-1}function w(e,t,n,r,i){for(let o=0;o(t,n,r)=>{(r=e(r)).append(...n),t.replace(r),r.select(0,0)},R=e=>(t,n,r)=>{var i=t.getPreviousSibling(),l=t.getNextSibling();const a=o.$createListItemNode("check"===e?"x"===r[3]:void 0);o.$isListNode(l)&&l.getListType()===e?(null!==(i=l.getFirstChild())?i.insertBefore(a):l.append(a),t.remove()):o.$isListNode(i)&&i.getListType()===e?(i.append(a),t.remove()):((l=o.$createListNode(e,"number"===e?Number(r[2]):void 0)).append(a),t.replace(l)),a.append(...n),a.select(0,0),(t=Math.floor(r[1].length/4))&&a.setIndent(t)},A=(e,t,n)=>{const r=[];var i=e.getChildren();let l=0;for(const s of i)if(o.$isListItemNode(s)){if(1===s.getChildrenSize()&&(i=s.getFirstChild(),o.$isListNode(i))){r.push(A(i,t,n+1));continue}i=" ".repeat(4*n);var a=e.getListType();a="number"===a?`${e.getStart()+l}. `:"check"===a?`- [${s.getChecked()?"x":" "}] `:"- ",r.push(i+a+t(s)),l++}return r.join("\n")},D={dependencies:[l.HeadingNode],export:(e,t)=>{if(!l.$isHeadingNode(e))return null;const n=Number(e.getTag().slice(1));return"#".repeat(n)+" "+t(e)},regExp:/^(#{1,6})\s/,replace:O((e=>l.$createHeadingNode("h"+e[1].length))),type:"element"},M={dependencies:[l.QuoteNode],export:(e,t)=>{if(!l.$isQuoteNode(e))return null;e=t(e).split("\n"),t=[];for(const n of e)t.push("> "+n);return t.join("\n")},regExp:/^>\s/,replace:(e,t,n,i)=>{if(i&&(n=e.getPreviousSibling(),l.$isQuoteNode(n)))return n.splice(n.getChildrenSize(),0,[r.$createLineBreakNode(),...t]),n.select(0,0),void e.remove();(n=l.$createQuoteNode()).append(...t),e.replace(n),n.select(0,0)},type:"element"},$={dependencies:[i.CodeNode],export:e=>{if(!i.$isCodeNode(e))return null;const t=e.getTextContent();return"```"+(e.getLanguage()||"")+(t?"\n"+t:"")+"\n```"},regExp:/^```(\w{1,10})?\s/,replace:O((e=>i.$createCodeNode(e?e[1]:void 0))),type:"element"},P={dependencies:[o.ListNode,o.ListItemNode],export:(e,t)=>o.$isListNode(e)?A(e,t,0):null,regExp:/^(\s*)[-*+]\s/,replace:R("bullet"),type:"element"},L={dependencies:[o.ListNode,o.ListItemNode],export:(e,t)=>o.$isListNode(e)?A(e,t,0):null,regExp:/^(\s*)(?:-\s)?\s?(\[(\s|x)?\])\s/i,replace:R("check"),type:"element"},I={dependencies:[o.ListNode,o.ListItemNode],export:(e,t)=>o.$isListNode(e)?A(e,t,0):null,regExp:/^(\s*)(\d{1,})\.\s/,replace:R("number"),type:"element"},F={format:["code"],tag:"`",type:"text-format"},z={format:["highlight"],tag:"==",type:"text-format"},B={format:["bold","italic"],tag:"***",type:"text-format"},j={format:["bold","italic"],intraword:!1,tag:"___",type:"text-format"},U={format:["bold"],tag:"**",type:"text-format"},K={format:["bold"],intraword:!1,tag:"__",type:"text-format"},H={format:["strikethrough"],tag:"~~",type:"text-format"},W={format:["italic"],tag:"*",type:"text-format"},G={format:["italic"],intraword:!1,tag:"_",type:"text-format"},Y={dependencies:[s.LinkNode],export:(e,t,n)=>{if(!s.$isLinkNode(e))return null;t=(t=e.getTitle())?`[${e.getTextContent()}](${e.getURL()} "${t}")`:`[${e.getTextContent()}](${e.getURL()})`;const i=e.getFirstChild();return 1===e.getChildrenSize()&&r.$isTextNode(i)?n(i,t):t},importRegExp:/(?:\[([^[]+)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))/,regExp:/(?:\[([^[]+)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))$/,replace:(e,t)=>{const[,n,i,o]=t;t=s.$createLinkNode(i,{title:o});const l=r.$createTextNode(n);l.setFormat(e.getFormat()),t.append(l),e.replace(t)},trigger:")",type:"text-match"},V=[D,M,$,P,I],q=[F,B,j,U,K,z,W,G,H],Q=[Y],J=[...V,...q,...Q];t.$convertFromMarkdownString=function(e,t=J,n){return function(e){let t=c(e),n=function(e){let t={},n={},r=[];for(let i of e){({tag:e}=i),t[e]=i;let o=e.replace(/(\*|\^|\+)/g,"\\$1");r.push(o),n[e]=v||b||N?new RegExp(`(${o})(?![${o}\\s])(.*?[^${o}\\s])${o}(?!${o})`):new RegExp(`(?{var u=(e=e.split("\n")).length;(s=s||r.$getRoot()).clear();for(let y=0;y1===e.format.length));return e=>{let i=[];e=(e||r.$getRoot()).getChildren();for(let r of e)null!=(e=f(r,t.element,n,t.textMatch))&&i.push(e);return i.join("\n\n")}}(e)(t)},t.BOLD_ITALIC_STAR=B,t.BOLD_ITALIC_UNDERSCORE=j,t.BOLD_STAR=U,t.BOLD_UNDERSCORE=K,t.CHECK_LIST=L,t.CODE=$,t.ELEMENT_TRANSFORMERS=V,t.HEADING=D,t.HIGHLIGHT=z,t.INLINE_CODE=F,t.ITALIC_STAR=W,t.ITALIC_UNDERSCORE=G,t.LINK=Y,t.ORDERED_LIST=I,t.QUOTE=M,t.STRIKETHROUGH=H,t.TEXT_FORMAT_TRANSFORMERS=q,t.TEXT_MATCH_TRANSFORMERS=Q,t.TRANSFORMERS=J,t.UNORDERED_LIST=P,t.registerMarkdownShortcuts=function(e,t=J){let n=c(t),o=u(n.textFormat,(({tag:e})=>e[e.length-1])),l=u(n.textMatch,(({trigger:e})=>e));for(let n of t)if("element"===(t=n.type)||"text-match"===t){t=n.dependencies;for(let n of t)if(!e.hasNode(n))throw Error(`MarkdownShortcuts: missing dependency ${n.getType()} for transformer. Ensure node dependency is included in editor initial config.`)}return e.registerUpdateListener((({tags:t,dirtyLeaves:a,editorState:s,prevEditorState:u})=>{if(!t.has("historic")&&!e.isComposing()){var c=s.read(r.$getSelection);if(t=u.read(r.$getSelection),r.$isRangeSelection(t)&&r.$isRangeSelection(c)&&c.isCollapsed()){u=c.anchor.key;var f=c.anchor.offset,g=s._nodeMap.get(u);!r.$isTextNode(g)||!a.has(u)||1!==f&&f>t.anchor.offset+1||e.update((()=>{if(!g.hasFormat("code")){var e=g.getParent();if(null!==e&&!i.$isCodeNode(e)){var t=c.anchor.offset;e:{var a=n.element,s=e.getParent();if(r.$isRootOrShadowRoot(s)&&e.getFirstChild()===g&&" "===(s=g.getTextContent())[t-1])for(let{regExp:n,replace:r}of a)if((a=s.match(n))&&a[0].length===t){s=g.getNextSiblings();let[n,i]=g.splitText(t);n.remove(),r(e,s=i?[i,...s]:s,a,!1),e=!0;break e}e=!1}if(!e){e:{if(a=g.getTextContent(),null!=(e=l[a[t-1]]))for(f of(ta&&(m=m.getPreviousSibling())&&!r.$isLineBreakNode(m);)r.$isTextNode(m)&&(a=m.getTextContent(),e=m,a=k(a,a.length,h));if(!(0>a||e===u&&a+f===i||(h=e.getTextContent(),0{"use strict";const r=n(24);e.exports=r},24:(e,t,n)=>{"use strict";var r=n(4260),i=n(7294);t.AutoFocusPlugin=function({defaultSelection:e}){let[t]=r.useLexicalComposerContext();return i.useEffect((()=>{t.focus((()=>{let e=document.activeElement,n=t.getRootElement();null===n||null!==e&&n.contains(e)||n.focus({preventScroll:!0})}),{defaultSelection:e})}),[e,t]),null}},2358:(e,t,n)=>{"use strict";const r=n(4990);e.exports=r},4990:(e,t,n)=>{"use strict";var r=n(3435),i=n(4260),o=n(6969),l=n(2998),a=n(7294);function s(e,t){for(let n=0;ne.getLatest()))}t.AutoLinkPlugin=function({matchers:e,onChange:t}){let[n]=i.useLexicalComposerContext();return function(e,t,n){a.useEffect((()=>{e.hasNodes([r.AutoLinkNode])||function(e){let t=new URLSearchParams;t.append("code",e);for(let e=1;e{n&&n(e,t)};return o.mergeRegister(e.registerNodeTransform(l.TextNode,(e=>{var o=e.getParentOrThrow(),a=e.getPreviousSibling();if(r.$isAutoLinkNode(o))f(o,t,i);else if(!r.$isLinkNode(o)){if(e.isSimpleText()&&(u.test(e.getTextContent()[0])||!r.$isAutoLinkNode(a))){a=o=e.getTextContent();let i=0,f=e;for(var p;(p=s(a,t))&&null!==p;){let t=p.index,s=p.length,g=t+s;var h=i+t,m=i+g,_=o,y=e;if((0e)){return n=>{let r=e.exec(n);return null===r?null:{index:r.index,length:r[0].length,text:r[0],url:t(n)}}}},2292:(e,t,n)=>{"use strict";const r=n(6122);e.exports=r},6122:(e,t,n)=>{"use strict";var r=n(4260),i=n(2998),o=n(7294);let l="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;var a=l?o.useLayoutEffect:o.useEffect;let s={tag:"history-merge"};t.LexicalComposer=function({initialConfig:e,children:t}){let n=o.useMemo((()=>{const{theme:t,namespace:n,editor__DEPRECATED:o,nodes:a,onError:u,editorState:c}=e,d=r.createLexicalComposerContext(null,t);let f=o||null;if(null===f){const r=i.createEditor({editable:e.editable,namespace:n,nodes:a,onError:e=>u(e,r),theme:t});!function(e,t){if(null!==t)if(void 0===t)e.update((()=>{var t=i.$getRoot();if(t.isEmpty()){let n=i.$createParagraphNode();t.append(n),t=l?document.activeElement:null,(null!==i.$getSelection()||null!==t&&t===e.getRootElement())&&n.select()}}),s);else if(null!==t)switch(typeof t){case"string":let n=e.parseEditorState(t);e.setEditorState(n,s);break;case"object":e.setEditorState(t,s);break;case"function":e.update((()=>{i.$getRoot().isEmpty()&&t(e)}),s)}}(r,c),f=r}return[f,d]}),[]);return a((()=>{let t=e.editable,[r]=n;r.setEditable(void 0===t||t)}),[]),o.createElement(r.LexicalComposerContext.Provider,{value:n},t)}},4260:(e,t,n)=>{"use strict";const r=n(3489);e.exports=r},3489:(e,t,n)=>{"use strict";var r=n(7294);let i=r.createContext(null);t.LexicalComposerContext=i,t.createLexicalComposerContext=function(e,t){let n=null;return null!=e&&(n=e[1]),{getTheme:function(){return null!=t?t:null!=n?n.getTheme():null}}},t.useLexicalComposerContext=function(){let e=r.useContext(i);return null==e&&function(e){let t=new URLSearchParams;t.append("code",e);for(let e=1;e{"use strict";const r=n(5781);e.exports=r},5781:(e,t,n)=>{"use strict";var r=n(4260),i=n(7294);function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t{E.setRootElement(e)}),[E]);return l((()=>(S(E.isEditable()),E.registerEditableListener((e=>{S(e)})))),[E]),i.createElement("div",o({},N,{"aria-activedescendant":C?e:void 0,"aria-autocomplete":C?t:"none","aria-controls":C?n:void 0,"aria-describedby":a,"aria-expanded":C&&"combobox"===_?!!s:void 0,"aria-label":u,"aria-labelledby":c,"aria-multiline":d,"aria-owns":C?f:void 0,"aria-readonly":!C||void 0,"aria-required":g,autoCapitalize:p,className:h,contentEditable:C,"data-testid":x,id:m,ref:T,role:_,spellCheck:y,style:v,tabIndex:b}))}},7943:(e,t,n)=>{"use strict";const r=n(9848);e.exports=r},9848:(e,t,n)=>{"use strict";var r=n(7294);function i(e,t){return(i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var o={error:null},l=function(e){function t(){for(var t,n=arguments.length,r=Array(n),i=0;i{"use strict";const r=n(548);e.exports=r},548:(e,t,n)=>{"use strict";var r=n(4260),i=n(8854),o=n(7294);t.createEmptyHistoryState=i.createEmptyHistoryState,t.HistoryPlugin=function({externalHistoryState:e}){let[t]=r.useLexicalComposerContext();return function(e,t,n=1e3){let r=o.useMemo((()=>t||i.createEmptyHistoryState()),[t]);o.useEffect((()=>i.registerHistory(e,r,n)),[n,e,r])}(t,e),null}},1589:(e,t,n)=>{"use strict";const r=n(7618);e.exports=r},7618:(e,t,n)=>{"use strict";var r=n(4260),i=n(5567),o=n(6969),l=n(2998),a=n(7294);let s=l.createCommand("INSERT_HORIZONTAL_RULE_COMMAND");function u({nodeKey:e}){let[t]=r.useLexicalComposerContext(),[n,s,u]=i.useLexicalNodeSelection(e),c=a.useCallback((t=>(n&&l.$isNodeSelection(l.$getSelection())&&(t.preventDefault(),g(t=l.$getNodeByKey(e))&&t.remove()),!1)),[n,e]);return a.useEffect((()=>o.mergeRegister(t.registerCommand(l.CLICK_COMMAND,(r=>{let i=t.getElementByKey(e);return r.target===i&&(r.shiftKey||u(),s(!n),!0)}),l.COMMAND_PRIORITY_LOW),t.registerCommand(l.KEY_DELETE_COMMAND,c,l.COMMAND_PRIORITY_LOW),t.registerCommand(l.KEY_BACKSPACE_COMMAND,c,l.COMMAND_PRIORITY_LOW))),[u,t,n,e,c,s]),a.useEffect((()=>{let r=t.getElementByKey(e);null!==r&&(r.className=n?"selected":"")}),[t,n,e]),null}class c extends l.DecoratorNode{static getType(){return"horizontalrule"}static clone(e){return new c(e.__key)}static importJSON(){return f()}static importDOM(){return{hr:()=>({conversion:d,priority:0})}}exportJSON(){return{type:"horizontalrule",version:1}}exportDOM(){return{element:document.createElement("hr")}}createDOM(){return document.createElement("hr")}getTextContent(){return"\n"}isInline(){return!1}updateDOM(){return!1}decorate(){return a.createElement(u,{nodeKey:this.__key})}}function d(){return{node:f()}}function f(){return l.$applyNodeReplacement(new c)}function g(e){return e instanceof c}t.$createHorizontalRuleNode=f,t.$isHorizontalRuleNode=g,t.HorizontalRuleNode=c,t.INSERT_HORIZONTAL_RULE_COMMAND=s},9421:(e,t,n)=>{"use strict";const r=n(6458);e.exports=r},6458:(e,t,n)=>{"use strict";var r=n(3435),i=n(4260),o=n(6969),l=n(2998),a=n(7294);t.LinkPlugin=function({validateUrl:e}){let[t]=i.useLexicalComposerContext();return a.useEffect((()=>{if(!t.hasNodes([r.LinkNode]))throw Error("LinkPlugin: LinkNode not registered on editor");return o.mergeRegister(t.registerCommand(r.TOGGLE_LINK_COMMAND,(t=>{if(null===t)return r.toggleLink(t),!0;if("string"==typeof t)return!(void 0!==e&&!e(t)||(r.toggleLink(t),0));let{url:n,target:i,rel:o,title:l}=t;return r.toggleLink(n,{rel:o,target:i,title:l}),!0}),l.COMMAND_PRIORITY_LOW),void 0!==e?t.registerCommand(l.PASTE_COMMAND,(n=>{let i=l.$getSelection();if(!l.$isRangeSelection(i)||i.isCollapsed()||!(n instanceof ClipboardEvent)||null==n.clipboardData)return!1;let o=n.clipboardData.getData("text");return!!e(o)&&!i.getNodes().some((e=>l.$isElementNode(e)))&&(t.dispatchCommand(r.TOGGLE_LINK_COMMAND,o),n.preventDefault(),!0)}),l.COMMAND_PRIORITY_LOW):()=>{})}),[t,e]),null}},8957:(e,t,n)=>{"use strict";const r=n(7336);e.exports=r},7336:(e,t,n)=>{"use strict";var r=n(4783),i=n(4260),o=n(7294),l=n(6969),a=n(2998);t.ListPlugin=function(){let[e]=i.useLexicalComposerContext();return o.useEffect((()=>{if(!e.hasNodes([r.ListNode,r.ListItemNode]))throw Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")}),[e]),function(e){o.useEffect((()=>l.mergeRegister(e.registerCommand(r.INSERT_ORDERED_LIST_COMMAND,(()=>(r.insertList(e,"number"),!0)),a.COMMAND_PRIORITY_LOW),e.registerCommand(r.INSERT_UNORDERED_LIST_COMMAND,(()=>(r.insertList(e,"bullet"),!0)),a.COMMAND_PRIORITY_LOW),e.registerCommand(r.REMOVE_LIST_COMMAND,(()=>(r.removeList(e),!0)),a.COMMAND_PRIORITY_LOW),e.registerCommand(a.INSERT_PARAGRAPH_COMMAND,(()=>!!r.$handleListInsertParagraph()),a.COMMAND_PRIORITY_LOW))),[e])}(e),null}},7632:(e,t,n)=>{"use strict";const r=n(8845);e.exports=r},8845:(e,t,n)=>{"use strict";var r=n(6571),i=n(4260),o=n(1589),l=n(7294);let a=[{dependencies:[o.HorizontalRuleNode],export:e=>o.$isHorizontalRuleNode(e)?"***":null,regExp:/^(---|\*\*\*|___)\s?$/,replace:(e,t,n,r)=>{t=o.$createHorizontalRuleNode(),r||null!=e.getNextSibling()?e.replace(t):e.insertBefore(t),t.selectNext()},type:"element"},...r.TRANSFORMERS];t.DEFAULT_TRANSFORMERS=a,t.MarkdownShortcutPlugin=function({transformers:e=a}){let[t]=i.useLexicalComposerContext();return l.useEffect((()=>r.registerMarkdownShortcuts(t,e)),[t,e]),null}},6146:(e,t,n)=>{"use strict";const r=n(1827);e.exports=r},1827:(e,t,n)=>{"use strict";var r=n(4260),i=n(9722),o=n(7294),l=n(2977),a=n(6969),s=n(3935),u=n(573),c=n(2903),d="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?o.useLayoutEffect:o.useEffect;function f(e){return e.getEditorState().read(l.$canShowPlaceholderCurry(e.isComposing()))}function g({content:e}){var[t]=r.useLexicalComposerContext();t=function(e){let[t,n]=o.useState((()=>f(e)));return d((()=>{function t(){let t=f(e);n(t)}return t(),a.mergeRegister(e.registerUpdateListener((()=>{t()})),e.registerEditableListener((()=>{t()})))}),[e]),t}(t);let n=i();return t?"function"==typeof e?e(n):e:null}t.RichTextPlugin=function({contentEditable:e,placeholder:t,ErrorBoundary:n}){let[i]=r.useLexicalComposerContext();return n=function(e,t){let[n,r]=o.useState((()=>e.getDecorators()));return d((()=>e.registerDecoratorListener((e=>{s.flushSync((()=>{r(e)}))}))),[e]),o.useEffect((()=>{r(e.getDecorators())}),[e]),o.useMemo((()=>{let r=[],i=Object.keys(n);for(let l=0;le._onError(t)},o.createElement(o.Suspense,{fallback:null},n[a])),c=e.getElementByKey(a);null!==c&&r.push(s.createPortal(u,c,a))}return r}),[t,n,e])}(i,n),function(e){d((()=>a.mergeRegister(c.registerRichText(e),u.registerDragonSupport(e))),[e])}(i),o.createElement(o.Fragment,null,e,o.createElement(g,{content:t}),n)}},7480:(e,t,n)=>{"use strict";const r=n(2210);e.exports=r},2210:(e,t,n)=>{"use strict";var r=n(7592),i=n(3435),o=n(9428),l=n(6969),a=n(2998),s=n(7294);let u=Object.freeze({"\t":"\\t","\n":"\\n"}),c=new RegExp(Object.keys(u).join("|"),"g"),d=Object.freeze({ancestorHasNextSibling:"|",ancestorIsLastChild:" ",hasNextSibling:"├",isLastChild:"└",selectedChar:"^",selectedLine:">"});function f(e,t,n){let l=e.getEditorState(),s=e._config,u=e._compositionKey,f=e._editable;if(n){let t="";return l.read((()=>{var n=r.$generateHtmlFromNodes(e);let i=document.createElement("div");i.innerHTML=n.trim(),t=x(i,0).innerHTML})),t}let h=" root\n";if(n=l.read((()=>{const e=a.$getSelection();return g(a.$getRoot(),((t,n)=>{const r=`(${t.getKey()})`,l=t.getType()||"",s=t.isSelected(),u=o.$isMarkNode(t)?` id: [ ${t.getIDs().join(", ")} ] `:"";var f=h,g=s?d.selectedLine:" ",m=n.join(" ");if(a.$isTextNode(t)){var _=t.getTextContent(),x=0===_.length?"(empty)":`"${p(_)}"`;_=[x,0!==(_=[b(t),y(t),v(t)].filter(Boolean).join(", ")).length?`{ ${_} }`:null].filter(Boolean).join(" ").trim()}else if(i.$isLinkNode(t)){_=0===(_=t.getURL()).length?"(empty)":`"${p(_)}"`,null!=(x=t.getTarget())&&(x="target: "+x);var N=Boolean,E=t.getRel();null!=E&&(E="rel: "+E);let e=t.getTitle();null!=e&&(e="title: "+e),_=[_,0!==(x=[x,E,e].filter(N).join(", ")).length?`{ ${x} }`:null].filter(Boolean).join(" ").trim()}else _="";h=f+`${g} ${m} ${r} ${l} ${u} ${_}\n`,h+=function({indent:e,isSelected:t,node:n,nodeKeyDisplay:r,selection:i,typeDisplay:o}){if(!a.$isTextNode(n)||!a.$isRangeSelection(i)||!t||a.$isElementNode(n))return"";t=i.anchor;var l=i.focus;if(""===n.getTextContent()||t.getNode()===i.focus.getNode()&&t.offset===l.offset)return"";l=i.anchor;let s=i.focus,u=n.getTextContent(),f=u.length;if(t=i=-1,"text"===l.type&&"text"===s.type){let e=l.getNode(),r=s.getNode();e===r&&n===e&&l.offset!==s.offset?[i,t]=l.offset{t(e,n.concat(i===r-1?d.isLastChild:d.hasNextSibling)),a.$isElementNode(e)&&g(e,t,n.concat(i===r-1?d.ancestorIsLastChild:d.ancestorHasNextSibling))}))}function p(e){return Object.entries(u).reduce(((e,[t,n])=>e.replace(new RegExp(t,"g"),String(n))),e)}let h=[e=>e.hasFormat("bold")&&"Bold",e=>e.hasFormat("code")&&"Code",e=>e.hasFormat("italic")&&"Italic",e=>e.hasFormat("strikethrough")&&"Strikethrough",e=>e.hasFormat("subscript")&&"Subscript",e=>e.hasFormat("superscript")&&"Superscript",e=>e.hasFormat("underline")&&"Underline"],m=[e=>e.isDirectionless()&&"Directionless",e=>e.isUnmergeable()&&"Unmergeable"],_=[e=>e.isToken()&&"Token",e=>e.isSegmented()&&"Segmented"];function y(e){let t=m.map((t=>t(e))).filter(Boolean).join(", ").toLocaleLowerCase();return""!==t&&(t="detail: "+t),t}function v(e){let t=_.map((t=>t(e))).filter(Boolean).join(", ").toLocaleLowerCase();return""!==t&&(t="mode: "+t),t}function b(e){let t=h.map((t=>t(e))).filter(Boolean).join(", ").toLocaleLowerCase();return""!==t&&(t="format: "+t),t}function x(e,t){let n,r=Array(1+t++).join(" "),i=Array(t-1).join(" ");for(let o=0;o{let t=new Set;for(let[r]of e._commands)t.add(e.registerCommand(r,(e=>(n((t=>((t=[...t]).push({payload:e,type:r.type?r.type:"UNKNOWN"}),10t.forEach((e=>e()))}),[e]),s.useMemo((()=>t),[t])}(u),R=s.useCallback((e=>{const t=f(u,O,_);p(t),h||d((t=>[...t,[Date.now(),e]]))}),[O,u,h,_]);s.useEffect((()=>{let e=u.getEditorState();!T&&1e3>e._nodeMap.size&&p(f(u,O,_))}),[O,u,T,_]),s.useEffect((()=>l.mergeRegister(u.registerUpdateListener((({editorState:e})=>{!T&&1e3{let e=f(u,O,_);p(e)})))),[O,u,_,C,R,T]);let A=c.length;return s.useEffect((()=>{if(N){let e,t=()=>{const n=v.current;n===A-1?E(!1):e=setTimeout((()=>{v.current++;const e=v.current,n=x.current;null!==n&&(n.value=String(e)),u.setEditorState(c[e][1]),t()}),c[n+1][0]-c[n][0])};return t(),()=>{clearTimeout(e)}}}),[c,N,u,A]),s.useEffect((()=>{let e=b.current;if(null!==e)return e.__lexicalEditor=u,()=>{e.__lexicalEditor=null}}),[u]),s.createElement("div",{className:i},!T&&C?s.createElement("div",{style:{padding:20}},s.createElement("span",{style:{marginRight:20}},"Detected large EditorState, this can impact debugging performance."),s.createElement("button",{onClick:()=>{k(!0);let e=w.current;null!==e&&(w.current=null,R(e))},style:{background:"transparent",border:"1px solid white",color:"white",cursor:"pointer",padding:5}},"Show full tree")):null,T?null:s.createElement("button",{onClick:()=>y(!_),className:e,type:"button"},_?"Tree":"Export DOM"),!h&&(T||!C)&&2{let e=u.getRootElement();null!==e&&(e.contentEditable="false",v.current=A-1,m(!0))},className:t,type:"button"},"Time Travel"),(T||!C)&&s.createElement("pre",{ref:b},g),h&&(T||!C)&&s.createElement("div",{className:o},s.createElement("button",{className:r,onClick:()=>{v.current===A-1&&(v.current=1),E(!N)},type:"button"},N?"Pause":"Play"),s.createElement("input",{className:n,ref:x,onChange:e=>{e=Number(e.target.value);let t=c[e];t&&(v.current=e,u.setEditorState(t[1]))},type:"range",min:"1",max:A-1}),s.createElement("button",{className:r,onClick:()=>{var e=u.getRootElement();if(null!==e){e.contentEditable="true",e=c.length-1,u.setEditorState(c[e][1]);let t=x.current;null!==t&&(t.value=String(e)),m(!1),E(!1)}},type:"button"},"Exit")))}},9722:(e,t,n)=>{"use strict";const r=n(5836);e.exports=r},5836:(e,t,n)=>{"use strict";var r=n(4260),i=n(7294),o="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?i.useLayoutEffect:i.useEffect;function l(e){return{initialValueFn:()=>e.isEditable(),subscribe:t=>e.registerEditableListener(t)}}e.exports=function(){return function(e){let[t]=r.useLexicalComposerContext(),n=i.useMemo((()=>e(t)),[t,e]),l=i.useRef(n.initialValueFn()),[a,s]=i.useState(l.current);return o((()=>{let{initialValueFn:e,subscribe:t}=n,r=e();return l.current!==r&&(l.current=r,s(r)),t((e=>{l.current=e,s(e)}))}),[n,e]),a}(l)}},5567:(e,t,n)=>{"use strict";const r=n(9121);e.exports=r},9121:(e,t,n)=>{"use strict";var r=n(4260),i=n(2998),o=n(7294);function l(e,t){return e.getEditorState().read((()=>{let e=i.$getNodeByKey(t);return null!==e&&e.isSelected()}))}t.useLexicalNodeSelection=function(e){let[t]=r.useLexicalComposerContext(),[n,a]=o.useState((()=>l(t,e)));return o.useEffect((()=>{let n=!0,r=t.registerUpdateListener((()=>{n&&a(l(t,e))}));return()=>{n=!1,r()}}),[t,e]),[n,o.useCallback((n=>{t.update((()=>{let t=i.$getSelection();i.$isNodeSelection(t)||(t=i.$createNodeSelection(),i.$setSelection(t)),n?t.add(e):t.delete(e)}))}),[t,e]),o.useCallback((()=>{t.update((()=>{const e=i.$getSelection();i.$isNodeSelection(e)&&e.clear()}))}),[t])]}},2903:(e,t,n)=>{"use strict";const r=n(925);e.exports=r},925:(e,t,n)=>{"use strict";var r=n(6907),i=n(9408),o=n(6969),l=n(2998);function a(e,t){return void 0!==document.caretRangeFromPoint?null===(e=document.caretRangeFromPoint(e,t))?null:{node:e.startContainer,offset:e.startOffset}:"undefined"!==document.caretPositionFromPoint?null===(e=document.caretPositionFromPoint(e,t))?null:{node:e.offsetNode,offset:e.offset}:null}let s="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,u=s&&"documentMode"in document?document.documentMode:null;s&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),s&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent);let c=!(!s||!("InputEvent"in window)||u)&&"getTargetRanges"in new window.InputEvent("input"),d=s&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),f=s&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,g=s&&/^(?=.*Chrome).*/i.test(navigator.userAgent),p=s&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!g,h=l.createCommand("DRAG_DROP_PASTE_FILE");class m extends l.ElementNode{static getType(){return"quote"}static clone(e){return new m(e.__key)}constructor(e){super(e)}createDOM(e){let t=document.createElement("blockquote");return o.addClassNamesToElement(t,e.theme.quote),t}updateDOM(){return!1}static importDOM(){return{blockquote:()=>({conversion:x,priority:0})}}exportDOM(e){if(({element:e}=super.exportDOM(e)),e&&o.isHTMLElement(e)){this.isEmpty()&&e.append(document.createElement("br"));var t=this.getFormatType();e.style.textAlign=t,(t=this.getDirection())&&(e.dir=t)}return{element:e}}static importJSON(e){let t=_();return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}exportJSON(){return{...super.exportJSON(),type:"quote"}}insertNewAfter(e,t){e=l.$createParagraphNode();let n=this.getDirection();return e.setDirection(n),this.insertAfter(e,t),e}collapseAtStart(){let e=l.$createParagraphNode();return this.getChildren().forEach((t=>e.append(t))),this.replace(e),!0}}function _(){return l.$applyNodeReplacement(new m)}class y extends l.ElementNode{static getType(){return"heading"}static clone(e){return new y(e.__tag,e.__key)}constructor(e,t){super(t),this.__tag=e}getTag(){return this.__tag}createDOM(e){let t=this.__tag,n=document.createElement(t);return void 0!==(e=e.theme.heading)&&o.addClassNamesToElement(n,e[t]),n}updateDOM(){return!1}static importDOM(){return{h1:()=>({conversion:b,priority:0}),h2:()=>({conversion:b,priority:0}),h3:()=>({conversion:b,priority:0}),h4:()=>({conversion:b,priority:0}),h5:()=>({conversion:b,priority:0}),h6:()=>({conversion:b,priority:0}),p:e=>null!==(e=e.firstChild)&&v(e)?{conversion:()=>({node:null}),priority:3}:null,span:e=>v(e)?{conversion:()=>({node:N("h1")}),priority:3}:null}}exportDOM(e){if(({element:e}=super.exportDOM(e)),e&&o.isHTMLElement(e)){this.isEmpty()&&e.append(document.createElement("br"));var t=this.getFormatType();e.style.textAlign=t,(t=this.getDirection())&&(e.dir=t)}return{element:e}}static importJSON(e){let t=N(e.tag);return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}exportJSON(){return{...super.exportJSON(),tag:this.getTag(),type:"heading",version:1}}insertNewAfter(e,t=!0){e=0<(e=e?e.anchor.offset:0)&&ee.append(t))),this.replace(e),!0}extractWithChild(){return!0}}function v(e){return"span"===e.nodeName.toLowerCase()&&"26pt"===e.style.fontSize}function b(e){let t=e.nodeName.toLowerCase(),n=null;return"h1"!==t&&"h2"!==t&&"h3"!==t&&"h4"!==t&&"h5"!==t&&"h6"!==t||(n=N(t),null!==e.style&&n.setFormat(e.style.textAlign)),{node:n}}function x(e){let t=_();return null!==e.style&&t.setFormat(e.style.textAlign),{node:t}}function N(e){return l.$applyNodeReplacement(new y(e))}function E(e){let t=null;if(e instanceof DragEvent?t=e.dataTransfer:e instanceof ClipboardEvent&&(t=e.clipboardData),null===t)return[!1,[],!1];var n=t.types;return e=n.includes("Files"),n=n.includes("text/html")||n.includes("text/plain"),[e,Array.from(t.files),n]}function C(e){var t=l.$getSelection();if(!l.$isRangeSelection(t))return!1;let n=new Set;t=t.getNodes();for(let l=0;l{const e=l.$getSelection();return!!l.$isNodeSelection(e)&&(e.clear(),!0)}),0),e.registerCommand(l.DELETE_CHARACTER_COMMAND,(e=>{const t=l.$getSelection();return!!l.$isRangeSelection(t)&&(t.deleteCharacter(e),!0)}),l.COMMAND_PRIORITY_EDITOR),e.registerCommand(l.DELETE_WORD_COMMAND,(e=>{const t=l.$getSelection();return!!l.$isRangeSelection(t)&&(t.deleteWord(e),!0)}),l.COMMAND_PRIORITY_EDITOR),e.registerCommand(l.DELETE_LINE_COMMAND,(e=>{const t=l.$getSelection();return!!l.$isRangeSelection(t)&&(t.deleteLine(e),!0)}),l.COMMAND_PRIORITY_EDITOR),e.registerCommand(l.CONTROLLED_TEXT_INSERTION_COMMAND,(t=>{const n=l.$getSelection();if("string"==typeof t)l.$isRangeSelection(n)?n.insertText(t):l.DEPRECATED_$isGridSelection(n);else{if(!l.$isRangeSelection(n)&&!l.DEPRECATED_$isGridSelection(n))return!1;const i=t.dataTransfer;null!=i?r.$insertDataTransferForRichText(i,n,e):l.$isRangeSelection(n)&&(t=t.data)&&n.insertText(t)}return!0}),l.COMMAND_PRIORITY_EDITOR),e.registerCommand(l.REMOVE_TEXT_COMMAND,(()=>{const e=l.$getSelection();return!!l.$isRangeSelection(e)&&(e.removeText(),!0)}),l.COMMAND_PRIORITY_EDITOR),e.registerCommand(l.FORMAT_TEXT_COMMAND,(e=>{const t=l.$getSelection();return!!l.$isRangeSelection(t)&&(t.formatText(e),!0)}),l.COMMAND_PRIORITY_EDITOR),e.registerCommand(l.FORMAT_ELEMENT_COMMAND,(e=>{var t=l.$getSelection();if(!l.$isRangeSelection(t)&&!l.$isNodeSelection(t))return!1;t=t.getNodes();for(const n of t)null!==(t=o.$findMatchingParent(n,(e=>l.$isElementNode(e)&&!e.isInline())))&&t.setFormat(e);return!0}),l.COMMAND_PRIORITY_EDITOR),e.registerCommand(l.INSERT_LINE_BREAK_COMMAND,(e=>{const t=l.$getSelection();return!!l.$isRangeSelection(t)&&(t.insertLineBreak(e),!0)}),l.COMMAND_PRIORITY_EDITOR),e.registerCommand(l.INSERT_PARAGRAPH_COMMAND,(()=>{const e=l.$getSelection();return!!l.$isRangeSelection(e)&&(e.insertParagraph(),!0)}),l.COMMAND_PRIORITY_EDITOR),e.registerCommand(l.INSERT_TAB_COMMAND,(()=>(l.$insertNodes([l.$createTabNode()]),!0)),l.COMMAND_PRIORITY_EDITOR),e.registerCommand(l.INDENT_CONTENT_COMMAND,(()=>C((e=>{const t=e.getIndent();e.setIndent(t+1)}))),l.COMMAND_PRIORITY_EDITOR),e.registerCommand(l.OUTDENT_CONTENT_COMMAND,(()=>C((e=>{const t=e.getIndent();0{var t=l.$getSelection();if(l.$isNodeSelection(t)&&!S(e.target)){if(0<(e=t.getNodes()).length)return e[0].selectPrevious(),!0}else if(l.$isRangeSelection(t)&&(t=l.$getAdjacentNode(t.focus,!0),!e.shiftKey&&l.$isDecoratorNode(t)&&!t.isIsolated()&&!t.isInline()))return t.selectPrevious(),e.preventDefault(),!0;return!1}),l.COMMAND_PRIORITY_EDITOR),e.registerCommand(l.KEY_ARROW_DOWN_COMMAND,(e=>{var t=l.$getSelection();if(l.$isNodeSelection(t)){if(0<(e=t.getNodes()).length)return e[0].selectNext(0,0),!0}else if(l.$isRangeSelection(t)){let n=t.focus;if("root"===n.key&&n.offset===l.$getRoot().getChildrenSize())return e.preventDefault(),!0;if(t=l.$getAdjacentNode(t.focus,!1),!e.shiftKey&&l.$isDecoratorNode(t)&&!t.isIsolated()&&!t.isInline())return t.selectNext(),e.preventDefault(),!0}return!1}),l.COMMAND_PRIORITY_EDITOR),e.registerCommand(l.KEY_ARROW_LEFT_COMMAND,(e=>{const t=l.$getSelection();if(l.$isNodeSelection(t)){var n=t.getNodes();if(0{const t=l.$getSelection();if(l.$isNodeSelection(t)&&!S(e.target)){var n=t.getNodes();if(0{if(S(t.target))return!1;const n=l.$getSelection();if(!l.$isRangeSelection(n))return!1;t.preventDefault(),({anchor:t}=n);const r=t.getNode();return n.isCollapsed()&&0===t.offset&&!l.$isRootNode(r)&&0{if(S(t.target))return!1;const n=l.$getSelection();return!!l.$isRangeSelection(n)&&(t.preventDefault(),e.dispatchCommand(l.DELETE_CHARACTER_COMMAND,!1))}),l.COMMAND_PRIORITY_EDITOR),e.registerCommand(l.KEY_ENTER_COMMAND,(t=>{const n=l.$getSelection();if(!l.$isRangeSelection(n))return!1;if(null!==t){if((f||d||p)&&c)return!1;if(t.preventDefault(),t.shiftKey)return e.dispatchCommand(l.INSERT_LINE_BREAK_COMMAND,!1)}return e.dispatchCommand(l.INSERT_PARAGRAPH_COMMAND,void 0)}),l.COMMAND_PRIORITY_EDITOR),e.registerCommand(l.KEY_ESCAPE_COMMAND,(()=>{const t=l.$getSelection();return!!l.$isRangeSelection(t)&&(e.blur(),!0)}),l.COMMAND_PRIORITY_EDITOR),e.registerCommand(l.DROP_COMMAND,(t=>{const[,n]=E(t);if(0{[e]=E(e);const t=l.$getSelection();return!(e&&!l.$isRangeSelection(t))}),l.COMMAND_PRIORITY_EDITOR),e.registerCommand(l.DRAGOVER_COMMAND,(e=>{var[t]=E(e);const n=l.$getSelection();return!(t&&!l.$isRangeSelection(n)||(null!==(t=a(e.clientX,e.clientY))&&(t=l.$getNearestNodeFromDOMNode(t.node),l.$isDecoratorNode(t)&&e.preventDefault()),0))}),l.COMMAND_PRIORITY_EDITOR),e.registerCommand(l.SELECT_ALL_COMMAND,(()=>(l.$selectAll(),!0)),l.COMMAND_PRIORITY_EDITOR),e.registerCommand(l.COPY_COMMAND,(t=>(r.copyToClipboard(e,o.objectKlassEquals(t,ClipboardEvent)?t:null),!0)),l.COMMAND_PRIORITY_EDITOR),e.registerCommand(l.CUT_COMMAND,(t=>(async function(e,t){await r.copyToClipboard(t,o.objectKlassEquals(e,ClipboardEvent)?e:null),t.update((()=>{let e=l.$getSelection();l.$isRangeSelection(e)?e.removeText():l.$isNodeSelection(e)&&e.getNodes().forEach((e=>e.remove()))}))}(t,e),!0)),l.COMMAND_PRIORITY_EDITOR),e.registerCommand(l.PASTE_COMMAND,(t=>{const[,n,i]=E(t);if(0{let n=l.$getSelection(),i=e instanceof InputEvent||e instanceof KeyboardEvent?null:e.clipboardData;null!=i&&(l.$isRangeSelection(n)||l.DEPRECATED_$isGridSelection(n))&&r.$insertDataTransferForRichText(i,n,t)}),{tag:"paste"})}(t,e),0))}),l.COMMAND_PRIORITY_EDITOR))}},9408:(e,t,n)=>{"use strict";const r=n(9235);e.exports=r},9235:(e,t,n)=>{"use strict";var r=n(2998);let i=new Map;function o(e){for(;null!=e;){if(e.nodeType===Node.TEXT_NODE)return e;e=e.firstChild}return null}function l(e){let t=e.parentNode;if(null==t)throw Error("Should never happen");return[t,Array.from(t.childNodes).indexOf(e)]}function a(e){let t={};e=e.split(";");for(let n of e)if(""!==n){let[e,r]=n.split(/:([^]+)/);t[e.trim()]=r.trim()}return t}function s(e){let t=i.get(e);return void 0===t&&(t=a(e),i.set(e,t)),t}function u(e,t){var n=s("getStyle"in e?e.getStyle():e.style);n=function(e){let t="";for(let n in e)n&&(t+=`${n}: ${e[n]};`);return t}(t=Object.entries(t).reduce(((e,[t,n])=>(null===n?delete e[t]:e[t]=n,e)),{...n})),e.setStyle(n),i.set(n,t)}function c(e){for(;null!==e&&!r.$isRootOrShadowRoot(e);){let t=e.getLatest(),n=e.getParent();0===t.getChildrenSize()&&e.remove(!0),e=n}}function d(e,t,n,i,o=null){if(0!==t.length){var l=t[0],a=new Map,s=[];(l=r.$isElementNode(l)?l:l.getParentOrThrow()).isInline()&&(l=l.getParentOrThrow());for(var u=!1;null!==l;){var d=l.getPreviousSibling();if(null!==d){l=d,u=!0;break}if(l=l.getParentOrThrow(),r.$isRootOrShadowRoot(l))break}d=new Set;for(var f=0;f{e.append(t),p.add(t.getKey()),r.$isElementNode(t)&&t.getChildrenKeys().forEach((e=>p.add(e)))})),c(h)}}else d.has(g.getKey())&&((h=i()).setFormat(g.getFormatType()),h.setIndent(g.getIndent()),s.push(h),g.remove(!0))}if(null!==o)for(t=0;td?d:p)!==(t="element"===_?c:p>d?p:d)&&(0===s&&t===c?(u(l,n),l.select(s,t)):(i=l.splitText(s,t),u(i=0===s?i[0]:i[1],n),i.select(0,t-s)));else for(r.$isTextNode(l)&&ss?s:a,r=a>s?a:s):l?(n=o?s:a,r=void 0):i&&(n=0,r=o=o?a:s),t.__text=t.__text.slice(n,r)}}return t},t.$wrapNodes=function(e,t,n=null){var i=e.getNodes();let o=i.length;var l=e.anchor;if(0===o||1===o&&"element"===l.type&&0===l.getNode().getChildrenSize()){i=(e="text"===l.type?l.getNode().getParentOrThrow():l.getNode()).getChildren();let r=t();r.setFormat(e.getFormatType()),r.setIndent(e.getIndent()),i.forEach((e=>r.append(e))),n&&(r=n.append(r)),e.replace(r)}else{l=null;var a=[];for(let s=0;s{let n=e.top-t.top;return 3>=Math.abs(n)?e.left-t.left:n}));for(let o=0;ol.top&&r.left+r.width>l.left||a?(t.splice(o--,1),i--):r=l}return t},t.getStyleObjectFromCSS=s,t.trimTextContentFromAnchor=function(e,t,n){let i=t.getNode();if(r.$isElementNode(i)){var o=i.getDescendantByIndex(t.offset);null!==o&&(i=o)}for(;0=o)s=i.getParent(),i.remove(),null==s||0!==s.getChildrenSize()||r.$isRootNode(s)||s.remove(),n-=o+a,i=l;else{let u=i.getKey();a=e.getEditorState().read((()=>{const e=r.$getNodeByKey(u);return r.$isTextNode(e)&&e.isSimpleText()?e.getTextContent():null})),l=o-n;let c=s.slice(0,l);null!==a&&a!==s?(n=r.$getPreviousSelection(),o=i,i.isSimpleText()?i.setTextContent(a):(o=r.$createTextNode(a),i.replace(o)),r.$isRangeSelection(n)&&n.isCollapsed()&&(n=n.anchor.offset,o.select(n,n))):i.isSimpleText()?(a=t.key===u,(s=t.offset){"use strict";const r=n(9957);e.exports=r},9957:(e,t,n)=>{"use strict";var r=n(2998),i=n(6969);let o=/^(\d+(?:\.\d+)?)px$/,l={BOTH:3,COLUMN:2,NO_STATUS:0,ROW:1};class a extends r.DEPRECATED_GridCellNode{static getType(){return"tablecell"}static clone(e){let t=new a(e.__headerState,e.__colSpan,e.__width,e.__key);return t.__rowSpan=e.__rowSpan,t.__backgroundColor=e.__backgroundColor,t}static importDOM(){return{td:()=>({conversion:s,priority:0}),th:()=>({conversion:s,priority:0})}}static importJSON(e){let t=e.rowSpan||1,n=u(e.headerState,e.colSpan||1,e.width||void 0);return n.__rowSpan=t,n.__backgroundColor=e.backgroundColor||null,n}constructor(e=l.NO_STATUS,t=1,n,r){super(t,r),this.__headerState=e,this.__width=n,this.__backgroundColor=null}createDOM(e){let t=document.createElement(this.getTag());return this.__width&&(t.style.width=`${this.__width}px`),1c(t)&&!r.$isElementNode(e)?(t=r.$createParagraphNode(),r.$isLineBreakNode(e)&&"\n"===e.getTextContent()?null:(t.append(e),t)):e,node:t}}function u(e,t=1,n){return r.$applyNodeReplacement(new a(e,t,n))}function c(e){return e instanceof a}class d extends r.DEPRECATED_GridRowNode{static getType(){return"tablerow"}static clone(e){return new d(e.__height,e.__key)}static importDOM(){return{tr:()=>({conversion:f,priority:0})}}static importJSON(e){return g(e.height)}constructor(e,t){super(t),this.__height=e}exportJSON(){return{...super.exportJSON(),type:"tablerow",version:1}}createDOM(e){let t=document.createElement("tr");return this.__height&&(t.style.height=`${this.__height}px`),i.addClassNamesToElement(t,e.theme.tableRow),t}isShadowRoot(){return!0}setHeight(e){return this.getWritable().__height=e,this.__height}getHeight(){return this.getLatest().__height}updateDOM(e){return e.__height!==this.__height}canBeEmpty(){return!1}canIndent(){return!1}}function f(e){let t;return o.test(e.style.height)&&(t=parseFloat(e.style.height)),{node:g(t)}}function g(e){return r.$applyNodeReplacement(new d(e))}function p(e){return e instanceof d}function h(e){let t=new URLSearchParams;t.append("code",e);for(let e=1;ee()))}trackTableGrid(){let e=new MutationObserver((e=>{this.editor.update((()=>{var t=!1;for(let n=0;n{let t=this.editor.getElementByKey(this.tableNodeKey);if(!t)throw Error("Expected to find TableElement in DOM");this.grid=v(t),e.observe(t,{childList:!0,subtree:!0})}))}clearHighlight(){let e=this.editor;this.isHighlightingCells=!1,this.focusY=this.focusX=this.anchorY=this.anchorX=-1,this.focusCell=this.anchorCell=this.focusCellNodeKey=this.anchorCellNodeKey=this.gridSelection=null,this.hasHijackedSelectionStyles=!1,this.enableHighlightStyle(),e.update((()=>{var t=r.$getNodeByKey(this.tableNodeKey);if(!$(t))throw Error("Expected TableNode.");if(!(t=e.getElementByKey(this.tableNodeKey)))throw Error("Expected to find TableElement in DOM");t=v(t),b(e,t,null),r.$setSelection(null),e.dispatchCommand(r.SELECTION_CHANGE_COMMAND,void 0)}))}enableHighlightStyle(){let e=this.editor;e.update((()=>{let t=e.getElementByKey(this.tableNodeKey);if(!t)throw Error("Expected to find TableElement in DOM");i.removeClassNamesFromElement(t,e._config.theme.tableSelection),t.classList.remove("disable-selection"),this.hasHijackedSelectionStyles=!1}))}disableHighlightStyle(){let e=this.editor;e.update((()=>{let t=e.getElementByKey(this.tableNodeKey);if(!t)throw Error("Expected to find TableElement in DOM");i.addClassNamesToElement(t,e._config.theme.tableSelection),this.hasHijackedSelectionStyles=!0}))}updateTableGridSelection(e){if(null!=e&&e.gridKey===this.tableNodeKey){let t=this.editor;this.gridSelection=e,this.isHighlightingCells=!0,this.disableHighlightStyle(),b(t,this.grid,this.gridSelection)}else null==e&&this.clearHighlight()}setFocusCellForSelection(e,t=!1){let n=this.editor;n.update((()=>{var i=r.$getNodeByKey(this.tableNodeKey);if(!$(i))throw Error("Expected TableNode.");if(!n.getElementByKey(this.tableNodeKey))throw Error("Expected to find TableElement in DOM");i=e.x;let o=e.y;if(this.focusCell=e,null!==this.anchorCell){let e=m?(n._window||window).getSelection():null;e&&e.setBaseAndExtent(this.anchorCell.elem,0,this.focusCell.elem,0)}if(this.isHighlightingCells||this.anchorX===i&&this.anchorY===o&&!t){if(i===this.focusX&&o===this.focusY)return}else this.isHighlightingCells=!0,this.disableHighlightStyle();this.focusX=i,this.focusY=o,this.isHighlightingCells&&(i=r.$getNearestNodeFromDOMNode(e.elem),null!=this.gridSelection&&null!=this.anchorCellNodeKey&&c(i)&&(i=i.getKey(),this.gridSelection=this.gridSelection.clone()||r.DEPRECATED_$createGridSelection(),this.focusCellNodeKey=i,this.gridSelection.set(this.tableNodeKey,this.anchorCellNodeKey,this.focusCellNodeKey),r.$setSelection(this.gridSelection),n.dispatchCommand(r.SELECTION_CHANGE_COMMAND,void 0),b(n,this.grid,this.gridSelection)))}))}setAnchorCellForSelection(e){this.isHighlightingCells=!1,this.anchorCell=e,this.anchorX=e.x,this.anchorY=e.y,this.editor.update((()=>{var t=r.$getNearestNodeFromDOMNode(e.elem);c(t)&&(t=t.getKey(),this.gridSelection=r.DEPRECATED_$createGridSelection(),this.anchorCellNodeKey=t)}))}formatCells(e){this.editor.update((()=>{let t=r.$getSelection();r.DEPRECATED_$isGridSelection(t)||h(11);let n=r.$createRangeSelection(),i=n.anchor,o=n.focus;t.getNodes().forEach((t=>{c(t)&&0!==t.getTextContentSize()&&(i.set(t.getKey(),0,"element"),o.set(t.getKey(),t.getChildrenSize(),"element"),n.formatText(e))})),r.$setSelection(t),this.editor.dispatchCommand(r.SELECTION_CHANGE_COMMAND,void 0)}))}clearText(){let e=this.editor;e.update((()=>{let t=r.$getNodeByKey(this.tableNodeKey);if(!$(t))throw Error("Expected TableNode.");var n=r.$getSelection();r.DEPRECATED_$isGridSelection(n)||h(11),(n=n.getNodes().filter(c)).length===this.grid.columns*this.grid.rows?(t.selectPrevious(),t.remove(),r.$getRoot().selectStart()):(n.forEach((e=>{if(r.$isElementNode(e)){let t=r.$createParagraphNode(),n=r.$createTextNode();t.append(n),e.append(t),e.getChildren().forEach((e=>{e!==t&&e.remove()}))}})),b(e,this.grid,null),r.$setSelection(null),e.dispatchCommand(r.SELECTION_CHANGE_COMMAND,void 0))}))}}function y(e){for(;null!=e;){let t=e.nodeName;if("TD"===t||"TH"===t){if(void 0===(e=e._cell))break;return e}e=e.parentNode}return null}function v(e){let t=[],n={cells:t,columns:0,rows:0};var r=e.firstChild;let i=e=0;for(t.length=0;null!=r;){var o=r.nodeName;if("TD"===o||"TH"===o){o={elem:o=r,hasBackgroundColor:""!==o.style.backgroundColor,highlighted:!1,x:e,y:i},r._cell=o;let n=t[i];void 0===n&&(n=t[i]=[]),n[e]=o}else if(null!=(o=r.firstChild)){r=o;continue}if(null!=(o=r.nextSibling))e++,r=o;else if(null!=(o=r.parentNode)){if(null==(r=o.nextSibling))break;i++,e=0}}return n.columns=e+1,n.rows=i+1,n}function b(e,t,n){let r=new Set(n?n.getNodes():[]);x(t,((t,n)=>{let i=t.elem;r.has(n)?(t.highlighted=!0,S(e,t)):(t.highlighted=!1,T(e,t),i.getAttribute("style")||i.removeAttribute("style"))}))}function x(e,t){({cells:e}=e);for(let n=0;n{t.highlighted=!0,S(e,t)}))}let E=(e,t,n,r,i)=>{const o="forward"===i;switch(i){case"backward":case"forward":return n!==(o?e.grid.columns-1:0)?(e=t.getCellNodeFromCordsOrThrow(n+(o?1:-1),r,e.grid),o?e.selectStart():e.selectEnd()):r!==(o?e.grid.rows-1:0)?(e=t.getCellNodeFromCordsOrThrow(o?0:e.grid.columns-1,r+(o?1:-1),e.grid),o?e.selectStart():e.selectEnd()):o?t.selectNext():t.selectPrevious(),!0;case"up":return 0!==r?t.getCellNodeFromCordsOrThrow(n,r-1,e.grid).selectEnd():t.selectPrevious(),!0;case"down":return r!==e.grid.rows-1?t.getCellNodeFromCordsOrThrow(n,r+1,e.grid).selectStart():t.selectNext(),!0;default:return!1}};function C(e,t){if(r.$isRangeSelection(e)||r.DEPRECATED_$isGridSelection(e)){let n=t.isParentOf(e.anchor.getNode());return e=t.isParentOf(e.focus.getNode()),n&&e}return!1}function S(e,t){e=t.elem,c(t=r.$getNearestNodeFromDOMNode(e))||h(131),null===t.getBackgroundColor()?e.style.setProperty("background-color","rgb(172,206,247)"):e.style.setProperty("background-image","linear-gradient(to right, rgba(172,206,247,0.85), rgba(172,206,247,0.85))"),e.style.setProperty("caret-color","transparent")}function T(e,t){e=t.elem,c(t=r.$getNearestNodeFromDOMNode(e))||h(131),null===t.getBackgroundColor()&&e.style.removeProperty("background-color"),e.style.removeProperty("background-image"),e.style.removeProperty("caret-color")}function k(e){return c(e=i.$findMatchingParent(e,c))?e:null}function w(e){return $(e=i.$findMatchingParent(e,$))?e:null}function O(e,t,n,o,l){var a=r.$getSelection();if(!C(a,o))return!1;if(r.$isRangeSelection(a)&&a.isCollapsed()){if("backward"===n||"forward"===n)return!1;let{anchor:r,focus:d}=a;a=i.$findMatchingParent(r.getNode(),c);var s=i.$findMatchingParent(d.getNode(),c);if(!c(a)||!a.is(s))return!1;s=e.getElementByKey(a.__key);var u=e.getElementByKey(r.key);if(null==u||null==s)return!1;if("element"===r.type)s=u.getBoundingClientRect();else{if(null===(s=window.getSelection())||0===s.rangeCount)return!1;s=s.getRangeAt(0).getBoundingClientRect()}if(null==(u="up"===n?a.getFirstChild():a.getLastChild()))return!1;if(null==(e=e.getElementByKey(u.__key)))return!1;if(e=e.getBoundingClientRect(),"up"===n?e.top>s.top-s.height:s.bottom+s.height>e.bottom)return R(t),a=o.getCordsFromCellNode(a,l.grid),t.shiftKey?(n=o.getCellFromCordsOrThrow(a.x,a.y,l.grid),l.setAnchorCellForSelection(n),l.setFocusCellForSelection(n,!0),!0):E(l,o,a.x,a.y,n)}else if(r.DEPRECATED_$isGridSelection(a)){let{anchor:r,focus:s}=a;return a=i.$findMatchingParent(r.getNode(),c),e=i.$findMatchingParent(s.getNode(),c),!(!c(a)||!c(e))&&(R(t),t.shiftKey?(t=o.getCordsFromCellNode(e,l.grid),((e,t,n,r,i)=>{const o="forward"===i;switch(i){case"backward":case"forward":return n!==(o?e.grid.columns-1:0)&&e.setFocusCellForSelection(t.getCellFromCordsOrThrow(n+(o?1:-1),r,e.grid)),!0;case"up":return 0!==r&&(e.setFocusCellForSelection(t.getCellFromCordsOrThrow(n,r-1,e.grid)),!0);case"down":return r!==e.grid.rows-1&&(e.setFocusCellForSelection(t.getCellFromCordsOrThrow(n,r+1,e.grid)),!0);default:return!1}})(l,o,t.x,t.y,n)):(e.selectEnd(),!0))}return!1}function R(e){e.preventDefault(),e.stopImmediatePropagation(),e.stopPropagation()}class A extends r.DEPRECATED_GridNode{static getType(){return"table"}static clone(e){return new A(e.__key)}static importDOM(){return{table:()=>({conversion:D,priority:1})}}static importJSON(){return M()}constructor(e){super(e)}exportJSON(){return{...super.exportJSON(),type:"table",version:1}}createDOM(e){let t=document.createElement("table");return i.addClassNamesToElement(t,e.theme.table),t}updateDOM(){return!1}exportDOM(e){return{...super.exportDOM(e),after:e=>{if(e){let t=e.cloneNode(),n=document.createElement("colgroup"),r=document.createElement("tbody");if(i.isHTMLElement(e)&&r.append(...e.children),!p(e=this.getFirstChildOrThrow()))throw Error("Expected to find row node.");e=e.getChildrenSize();for(let t=0;t{if(t)return({elem:t}=t),r.$getNearestNodeFromDOMNode(t)===e}))))return{x:o,y:t}}throw Error("Cell not found in table.")}getCellFromCords(e,t,n){return({cells:n}=n),null==(t=n[t])||null==(e=t[e])?null:e}getCellFromCordsOrThrow(e,t,n){if(!(e=this.getCellFromCords(e,t,n)))throw Error("Cell not found at cords.");return e}getCellNodeFromCords(e,t,n){return null==(e=this.getCellFromCords(e,t,n))?null:c(e=r.$getNearestNodeFromDOMNode(e.elem))?e:null}getCellNodeFromCordsOrThrow(e,t,n){if(!(e=this.getCellNodeFromCords(e,t,n)))throw Error("Node at cords not TableCellNode.");return e}canSelectBefore(){return!0}canIndent(){return!1}}function D(){return{node:M()}}function M(){return r.$applyNodeReplacement(new A)}function $(e){return e instanceof A}function P(e){if(e=i.$findMatchingParent(e,(e=>p(e))),p(e))return e;throw Error("Expected table cell to be inside of table row.")}function L(e){if(e=i.$findMatchingParent(e,(e=>$(e))),$(e))return e;throw Error("Expected table cell to be inside of table.")}function I(e,t){let n=L(e),{x:r,y:i}=n.getCordsFromCellNode(e,t);return{above:n.getCellNodeFromCords(r,i-1,t),below:n.getCellNodeFromCords(r,i+1,t),left:n.getCellNodeFromCords(r-1,i,t),right:n.getCellNodeFromCords(r+1,i,t)}}function F(e){null===(e=e.getFirstDescendant())&&h(124),e.getParentOrThrow().selectStart()}function z(e,t){let n=e.getFirstChild();null!==n?n.insertBefore(t):e.append(t)}let B=r.createCommand("INSERT_TABLE_COMMAND");t.$createTableCellNode=u,t.$createTableNode=M,t.$createTableNodeWithDimensions=function(e,t,n=!0){let i=M();for(let a=0;a=(r=r.getChildren()).length||0>t)throw Error("Table column target index out of range");r[t].remove()}}return e},t.$deleteTableColumn__EXPERIMENTAL=function(){var e=r.$getSelection();r.$isRangeSelection(e)||r.DEPRECATED_$isGridSelection(e)||h(118);var t=e.anchor.getNode();e=e.focus.getNode();let[n,,i]=r.DEPRECATED_$getNodeTriplet(t);[t]=r.DEPRECATED_$getNodeTriplet(e);let[o,l,a]=r.DEPRECATED_$computeGridMap(i,n,t);var{startColumn:s}=l;let{startRow:u,startColumn:c}=a;e=Math.min(s,c);let d=(s=Math.max(s+n.__colSpan-1,c+t.__colSpan-1))-e+1;if(o[0].length===s-e+1)i.selectPrevious(),i.remove();else{var f=o.length;for(let t=0;ts?n===s&&r.setColSpan(r.__colSpan-(s-i+1)):r.remove()}void 0!==(t=(e=o[u])[c+t.__colSpan])?(({cell:t}=t),F(t)):(({cell:t}=e[c-1]),F(t))}},t.$deleteTableRow__EXPERIMENTAL=function(){var e=r.$getSelection();r.$isRangeSelection(e)||r.DEPRECATED_$isGridSelection(e)||h(118);var t=e.anchor.getNode();e=e.focus.getNode();let[n,,i]=r.DEPRECATED_$getNodeTriplet(t);[e]=r.DEPRECATED_$getNodeTriplet(e);let[o,l,a]=r.DEPRECATED_$computeGridMap(i,n,e);({startRow:t}=l);var{startRow:s}=a;if(e=s+e.__rowSpan-1,o.length===e-t+1)i.remove();else{s=o[0].length;var u=o[e+1],c=i.getChildAtIndex(e+1);for(let n=e;n>=t;n--){for(var d=s-1;0<=d;d--){let{cell:r,startRow:i,startColumn:l}=o[n][d];if(l===d&&(n===t&&i=t&&i+r.__rowSpan-1>e))if(r.setRowSpan(r.__rowSpan-(e-i+1)),null===c&&h(122),0===d)z(c,r);else{let{cell:e}=u[d-1];e.insertAfter(r)}}d=i.getChildAtIndex(n),r.DEPRECATED_$isGridRowNode(d)||h(123,String(n)),d.remove()}void 0!==u?(({cell:t}=u[0]),F(t)):(({cell:t}=o[t-1][0]),F(t))}},t.$getElementGridForTableNode=function(e,t){if(null==(e=e.getElementByKey(t.getKey())))throw Error("Table Element Not Found");return v(e)},t.$getTableCellNodeFromLexicalNode=function(e){return e=i.$findMatchingParent(e,(e=>c(e))),c(e)?e:null},t.$getTableColumnIndexFromTableCellNode=function(e){return P(e).getChildren().findIndex((t=>t.is(e)))},t.$getTableNodeFromLexicalNodeOrThrow=L,t.$getTableRowIndexFromTableCellNode=function(e){let t=P(e);return L(t).getChildren().findIndex((e=>e.is(t)))},t.$getTableRowNodeFromTableCellNodeOrThrow=P,t.$insertTableColumn=function(e,t,n=!0,i,o){let a=e.getChildren();for(let e=0;e=s.length||0>t)throw Error("Table column target index out of range");c(s=s[t])||h(12);let{left:e,right:i}=I(s,o);var d=l.NO_STATUS;(e&&e.hasHeaderState(l.ROW)||i&&i.hasHeaderState(l.ROW))&&(d|=l.ROW),(d=u(d)).append(r.$createParagraphNode()),n?s.insertAfter(d):s.insertBefore(d)}}return e},t.$insertTableColumn__EXPERIMENTAL=function(e=!0){function t(){let e=u(l.NO_STATUS).append(r.$createParagraphNode());return null===f&&(f=e),e}var n=r.$getSelection();r.$isRangeSelection(n)||r.DEPRECATED_$isGridSelection(n)||h(118);var i=n.anchor.getNode();n=n.focus.getNode(),[i]=r.DEPRECATED_$getNodeTriplet(i);let[o,,a]=r.DEPRECATED_$getNodeTriplet(n),[s,c,d]=r.DEPRECATED_$computeGridMap(a,o,i);i=s.length,n=e?Math.max(c.startColumn,d.startColumn):Math.min(c.startColumn,d.startColumn),e=e?n+o.__colSpan-1:n-1,n=a.getFirstChild(),r.DEPRECATED_$isGridRowNode(n)||h(120);let f=null;var g=n;e:for(n=0;ne){z(g,t());continue}let{cell:o,startColumn:l,startRow:a}=i[e];if(l+o.__colSpan-1<=e){let r=o,l=a,s=e;for(;l!==n&&1=a.length||0>t)throw Error("Table row target index out of range");if(!p(t=a[t]))throw Error("Row before insertion index does not exist.");for(a=0;a=n.length||0>t)throw Error("Expected table cell to be inside of table row.");return n[t].remove(),e},t.$unmergeCell=function(){var e=r.$getSelection();r.$isRangeSelection(e)||r.DEPRECATED_$isGridSelection(e)||h(118),e=e.anchor.getNode();let[t,n,i]=r.DEPRECATED_$getNodeTriplet(e);e=t.__colSpan;let o=t.__rowSpan;if(1{setTimeout((()=>{if(0===e.button&&u){var t=y(e.target);null!==t&&(R(e),s.setAnchorCellForSelection(t));var n=()=>{u.removeEventListener("mouseup",n),u.removeEventListener("mousemove",r)},r=e=>{const t=y(e.target);null===t||s.anchorX===t.x&&s.anchorY===t.y||(e.preventDefault(),s.setFocusCellForSelection(t))};u.addEventListener("mouseup",n),u.addEventListener("mousemove",r)}}),0)}));let d=e=>{0===e.button&&n.update((()=>{const t=r.$getSelection(),n=e.target;r.DEPRECATED_$isGridSelection(t)&&t.gridKey===s.tableNodeKey&&a.contains(n)&&s.clearHighlight()}))};return u.addEventListener("mousedown",d),s.listenersToRemove.add((()=>u.removeEventListener("mousedown",d))),s.listenersToRemove.add(n.registerCommand(r.KEY_ARROW_DOWN_COMMAND,(t=>O(n,t,"down",e,s)),r.COMMAND_PRIORITY_HIGH)),s.listenersToRemove.add(n.registerCommand(r.KEY_ARROW_UP_COMMAND,(t=>O(n,t,"up",e,s)),r.COMMAND_PRIORITY_HIGH)),s.listenersToRemove.add(n.registerCommand(r.KEY_ARROW_LEFT_COMMAND,(t=>O(n,t,"backward",e,s)),r.COMMAND_PRIORITY_HIGH)),s.listenersToRemove.add(n.registerCommand(r.KEY_ARROW_RIGHT_COMMAND,(t=>O(n,t,"forward",e,s)),r.COMMAND_PRIORITY_HIGH)),s.listenersToRemove.add(n.registerCommand(r.KEY_ESCAPE_COMMAND,(e=>{var t=r.$getSelection();return!(!r.DEPRECATED_$isGridSelection(t)||(t=i.$findMatchingParent(t.focus.getNode(),c),!c(t))||(R(e),t.selectEnd(),0))}),r.COMMAND_PRIORITY_HIGH)),[r.DELETE_WORD_COMMAND,r.DELETE_LINE_COMMAND,r.DELETE_CHARACTER_COMMAND].forEach((t=>{s.listenersToRemove.add(n.registerCommand(t,(t=>()=>{var n=r.$getSelection();if(!C(n,e))return!1;if(r.DEPRECATED_$isGridSelection(n))return s.clearText(),!0;if(r.$isRangeSelection(n)){const a=i.$findMatchingParent(n.anchor.getNode(),(e=>c(e)));if(!c(a))return!1;var o=n.anchor.getNode(),l=n.focus.getNode();if(o=e.isParentOf(o),l=e.isParentOf(l),o&&!l||l&&!o)return s.clearText(),!0;if(o=(l=i.$findMatchingParent(n.anchor.getNode(),(e=>r.$isElementNode(e))))&&i.$findMatchingParent(l,(e=>r.$isElementNode(e)&&c(e.getParent()))),!r.$isElementNode(o)||!r.$isElementNode(l))return!1;if(t===r.DELETE_LINE_COMMAND&&null===o.getPreviousSibling())return!0;if((t===r.DELETE_CHARACTER_COMMAND||t===r.DELETE_WORD_COMMAND)&&n.isCollapsed()&&0===n.anchor.offset&&l!==o){n=l.getChildren();const e=r.$createParagraphNode();return n.forEach((t=>e.append(t))),l.replace(e),l.getWritable().__parent=a.getKey(),!0}}return!1})(t),r.COMMAND_PRIORITY_CRITICAL))})),t=t=>{const n=r.$getSelection();return!!C(n,e)&&(r.DEPRECATED_$isGridSelection(n)?(t.preventDefault(),t.stopPropagation(),s.clearText(),!0):(r.$isRangeSelection(n)&&(t=i.$findMatchingParent(n.anchor.getNode(),(e=>c(e))),c(t)),!1))},s.listenersToRemove.add(n.registerCommand(r.KEY_BACKSPACE_COMMAND,t,r.COMMAND_PRIORITY_CRITICAL)),s.listenersToRemove.add(n.registerCommand(r.KEY_DELETE_COMMAND,t,r.COMMAND_PRIORITY_CRITICAL)),s.listenersToRemove.add(n.registerCommand(r.FORMAT_TEXT_COMMAND,(t=>{let n=r.$getSelection();return!!C(n,e)&&(r.DEPRECATED_$isGridSelection(n)?(s.formatCells(t),!0):(r.$isRangeSelection(n)&&(t=i.$findMatchingParent(n.anchor.getNode(),(e=>c(e))),c(t)),!1))}),r.COMMAND_PRIORITY_CRITICAL)),s.listenersToRemove.add(n.registerCommand(r.CONTROLLED_TEXT_INSERTION_COMMAND,(()=>{var t=r.$getSelection();return!!C(t,e)&&(r.DEPRECATED_$isGridSelection(t)?s.clearHighlight():r.$isRangeSelection(t)&&(t=i.$findMatchingParent(t.anchor.getNode(),(e=>c(e))),c(t)),!1)}),r.COMMAND_PRIORITY_CRITICAL)),o&&s.listenersToRemove.add(n.registerCommand(r.KEY_TAB_COMMAND,(t=>{var n=r.$getSelection();return!!(r.$isRangeSelection(n)&&n.isCollapsed()&&C(n,e))&&null!==(n=k(n.anchor.getNode()))&&(R(t),n=e.getCordsFromCellNode(n,s.grid),E(s,e,n.x,n.y,t.shiftKey?"backward":"forward"),!0)}),r.COMMAND_PRIORITY_CRITICAL)),s.listenersToRemove.add(n.registerCommand(r.FOCUS_COMMAND,(()=>e.isSelected()),r.COMMAND_PRIORITY_HIGH)),s.listenersToRemove.add(n.registerCommand(r.SELECTION_CHANGE_COMMAND,(()=>{let t=r.$getSelection(),i=r.$getPreviousSelection();if(r.$isRangeSelection(t)){let{anchor:i,focus:d}=t;var o=i.getNode(),a=d.getNode();o=k(o),a=k(a);var u=o&&e.is(w(o)),c=a&&e.is(w(a));let f=u!==c;c=u&&c,u=t.isBackward(),f?((o=t.clone()).focus.set(e.getKey(),u?0:e.getChildrenSize(),"element"),r.$setSelection(o),N(n,s)):c&&!o.is(a)&&(s.setAnchorCellForSelection(l(o)),s.setFocusCellForSelection(l(a),!0))}return t&&!t.is(i)&&(r.DEPRECATED_$isGridSelection(t)||r.DEPRECATED_$isGridSelection(i))&&s.gridSelection&&!s.gridSelection.is(i)?(r.DEPRECATED_$isGridSelection(t)&&t.gridKey===s.tableNodeKey?s.updateTableGridSelection(t):!r.DEPRECATED_$isGridSelection(t)&&r.DEPRECATED_$isGridSelection(i)&&i.gridKey===s.tableNodeKey&&s.updateTableGridSelection(null),!1):(s.hasHijackedSelectionStyles&&!e.isSelected()?function(e,t){t.enableHighlightStyle(),x(t.grid,(t=>{let n=t.elem;t.highlighted=!1,T(e,t),n.getAttribute("style")||n.removeAttribute("style")}))}(n,s):!s.hasHijackedSelectionStyles&&e.isSelected()&&N(n,s),!1)}),r.COMMAND_PRIORITY_CRITICAL)),s},t.getCellFromTarget=y,t.getTableSelectionFromTableElement=function(e){return e.__lexicalTableSelection}},2977:(e,t,n)=>{"use strict";const r=n(8263);e.exports=r},8263:(e,t,n)=>{"use strict";var r=n(2998);function i(e,t=!0){return!e&&(e=o(),t&&(e=e.trim()),""===e)}function o(){return r.$getRoot().getTextContent()}function l(e){if(!i(e,!1))return!1;let t=(e=r.$getRoot().getChildren()).length;if(1l(e)},t.$findTextIntersectionFromCharacters=function(e,t){var n=e.getFirstChild();e=0;e:for(;null!==n;){if(r.$isElementNode(n)){var i=n.getFirstChild();if(null!==i){n=i;continue}}else if(r.$isTextNode(n)){if(e+(i=n.getTextContentSize())>t)return{node:n,offset:t-e};e+=i}if(null===(i=n.getNextSibling())){for(n=n.getParent();null!==n;){if(null!==(i=n.getNextSibling())){n=i;continue e}n=n.getParent()}break}n=i}return null},t.$isRootTextContentEmpty=i,t.$isRootTextContentEmptyCurry=function(e,t){return()=>i(e,t)},t.$rootTextContent=o,t.registerLexicalTextEntity=function(e,t,n,i){let o=e=>{const t=r.$createTextNode(e.getTextContent());t.setFormat(e.getFormat()),e.replace(t)};return[e.registerNodeTransform(r.TextNode,(e=>{if(e.isSimpleText()){var l=e.getPreviousSibling(),a=e.getTextContent(),s=e;if(r.$isTextNode(l)){var u=l.getTextContent(),c=t(u+a);if(l instanceof n){if(null===c||0!==l.getLatest().__mode)return void o(l);if(0<(c=c.end-u.length))return s=u+(s=a.slice(0,c)),l.select(),l.setTextContent(s),void(c===a.length?e.remove():(l=a.slice(c),e.setTextContent(l)))}else if(null===c||c.start{var i=e.getTextContent();const l=t(i);null===l||0!==l.start?o(e):i.length>l.end?e.splitText(l.end):(i=e.getPreviousSibling(),r.$isTextNode(i)&&i.isTextEntity()&&(o(i),o(e)),i=e.getNextSibling(),r.$isTextNode(i)&&i.isTextEntity()&&(o(i),e instanceof n&&o(e)))}))]}},6969:(e,t,n)=>{"use strict";const r=n(7502);e.exports=r},7502:(e,t,n)=>{"use strict";var r=n(9408),i=n(2998);function o(e,t){for(let n of t)if(e.type.startsWith(n))return!0;return!1}function l(e,t){for(;e!==i.$getRoot()&&null!=e;){if(t(e))return e;e=e.getParent()}return null}t.$splitNode=i.$splitNode,t.isHTMLAnchorElement=i.isHTMLAnchorElement,t.isHTMLElement=i.isHTMLElement,t.$dfs=function(e,t){let n=[];e=(e||i.$getRoot()).getLatest(),t=t||(i.$isElementNode(e)?e.getLastDescendant():e);for(var r=e,o=0;null!==(r=r.getParent());)o++;for(r=o;null!==e&&!e.is(t);)if(n.push({depth:r,node:e}),i.$isElementNode(e)&&0i.$isElementNode(e)&&!e.isInline()));return i.$isElementNode(t)||function(e){let t=new URLSearchParams;t.append("code",e);for(let e=1;e{"string"==typeof t&&(t=t.split(" ").filter((e=>""!==e)),e.classList.add(...t))}))},t.isMimeType=o,t.mediaFileReader=function(e,t){let n=e[Symbol.iterator]();return new Promise(((e,r)=>{let i=[],l=()=>{const{done:a,value:s}=n.next();if(a)return e(i);const u=new FileReader;u.addEventListener("error",r),u.addEventListener("load",(()=>{const e=u.result;"string"==typeof e&&i.push({file:s,result:e}),l()})),o(s,t)?u.readAsDataURL(s):l()};l()}))},t.mergeRegister=function(...e){return()=>{e.forEach((e=>e()))}},t.objectKlassEquals=function(e,t){return null!==e&&Object.getPrototypeOf(e).constructor.name===t.name},t.registerNestedElementResolver=function(e,t,n,r){return e.registerNodeTransform(t,(e=>{e:{for(var i=e.getChildren(),o=0;o{"string"==typeof t&&e.classList.remove(...t.split(" "))}))}},5162:(e,t,n)=>{var r=n(3645),i=n(1667),o=n(3522),l=n(629),a=n(834),s=n(6503),u=n(6713),c=n(821),d=n(974),f=n(9368),g=n(7907),p=n(3164),h=n(3497),m=n(5284),_=n(3075),y=n(6690),v=n(7296),b=n(6786),x=n(8620),N=n(3222),E=n(3696),C=n(8535),S=n(7848);t=r(!1);var T=i(o),k=i(l),w=i(a),O=i(s),R=i(u),A=i(c),D=i(d),M=i(f),$=i(g),P=i(p),L=i(h),I=i(m),F=i(_),z=i(y),B=i(v),j=i(b),U=i(x),K=i(N),H=i(E),W=i(C),G=i(S);t.push([e.id,'body {\n margin: 0;\n background: #eee;\n font-family: system-ui, -apple-system, BlinkMacSystemFont, ".SFNSText-Regular",\n sans-serif;\n font-weight: 500;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n \n .other h2 {\n font-size: 18px;\n color: #444;\n margin-bottom: 7px;\n }\n \n .other a {\n color: #777;\n text-decoration: underline;\n font-size: 14px;\n }\n \n .other ul {\n padding: 0;\n margin: 0;\n list-style-type: none;\n }\n \n .App {\n font-family: sans-serif;\n text-align: center;\n }\n \n h1 {\n font-size: 24px;\n color: #333;\n }\n \n .ltr {\n text-align: left;\n }\n \n .rtl {\n text-align: right;\n }\n \n .editor-container {\n margin: 20px auto 20px auto;\n border-radius: 2px;\n max-width: 600px;\n color: #000;\n position: relative;\n line-height: 20px;\n font-weight: 400;\n text-align: left;\n border-top-left-radius: 10px;\n border-top-right-radius: 10px;\n }\n \n .editor-inner {\n background: #fff;\n position: relative;\n border: 1px solid #a8a8a8;\n }\n \n .editor-input {\n min-height: 150px;\n resize: none;\n font-size: 15px;\n caret-color: rgb(5, 5, 5);\n position: relative;\n tab-size: 1;\n outline: 0;\n padding: 15px 10px;\n caret-color: #444;\n }\n \n .editor-placeholder {\n color: #999;\n overflow: hidden;\n position: absolute;\n text-overflow: ellipsis;\n top: 15px;\n left: 10px;\n font-size: 15px;\n user-select: none;\n display: inline-block;\n pointer-events: none;\n }\n \n .editor-text-bold {\n font-weight: bold;\n }\n \n .editor-text-italic {\n font-style: italic;\n }\n \n .editor-text-underline {\n text-decoration: underline;\n }\n \n .editor-text-strikethrough {\n text-decoration: line-through;\n }\n \n .editor-text-underlineStrikethrough {\n text-decoration: underline line-through;\n }\n \n .editor-text-code {\n background-color: rgb(240, 242, 245);\n padding: 1px 0.25rem;\n font-family: Menlo, Consolas, Monaco, monospace;\n font-size: 94%;\n }\n \n .editor-link {\n color: rgb(33, 111, 219);\n text-decoration: none;\n }\n \n .tree-view-output {\n display: block;\n background: #222;\n color: #fff;\n padding: 5px;\n font-size: 12px;\n white-space: pre-wrap;\n margin: 1px auto 10px auto;\n max-height: 250px;\n position: relative;\n border-bottom-left-radius: 10px;\n border-bottom-right-radius: 10px;\n overflow: auto;\n line-height: 14px;\n }\n \n .editor-code {\n background-color: rgb(240, 242, 245);\n font-family: Menlo, Consolas, Monaco, monospace;\n display: block;\n padding: 8px 8px 8px 52px;\n line-height: 1.53;\n font-size: 13px;\n margin: 0;\n margin-top: 8px;\n margin-bottom: 8px;\n tab-size: 2;\n /* white-space: pre; */\n overflow-x: auto;\n position: relative;\n }\n \n .editor-code:before {\n content: attr(data-gutter);\n position: absolute;\n background-color: #eee;\n left: 0;\n top: 0;\n border-right: 1px solid #ccc;\n padding: 8px;\n color: #777;\n white-space: pre-wrap;\n text-align: right;\n min-width: 25px;\n }\n .editor-code:after {\n content: attr(data-highlight-language);\n top: 0;\n right: 3px;\n padding: 3px;\n font-size: 10px;\n text-transform: uppercase;\n position: absolute;\n color: rgba(0, 0, 0, 0.5);\n }\n \n .editor-tokenComment {\n color: slategray;\n }\n \n .editor-tokenPunctuation {\n color: #999;\n }\n \n .editor-tokenProperty {\n color: #905;\n }\n \n .editor-tokenSelector {\n color: #690;\n }\n \n .editor-tokenOperator {\n color: #9a6e3a;\n }\n \n .editor-tokenAttr {\n color: #07a;\n }\n \n .editor-tokenVariable {\n color: #e90;\n }\n \n .editor-tokenFunction {\n color: #dd4a68;\n }\n \n .editor-paragraph {\n margin: 0;\n margin-bottom: 8px;\n position: relative;\n }\n \n .editor-paragraph:last-child {\n margin-bottom: 0;\n }\n \n .editor-heading-h1 {\n font-size: 24px;\n color: rgb(5, 5, 5);\n font-weight: 400;\n margin: 0;\n margin-bottom: 12px;\n padding: 0;\n }\n \n .editor-heading-h2 {\n font-size: 15px;\n color: rgb(101, 103, 107);\n font-weight: 700;\n margin: 0;\n margin-top: 10px;\n padding: 0;\n text-transform: uppercase;\n }\n \n .editor-quote {\n margin: 0;\n margin-left: 20px;\n font-size: 15px;\n color: rgb(101, 103, 107);\n border-left-color: rgb(206, 208, 212);\n border-left-width: 4px;\n border-left-style: solid;\n padding-left: 16px;\n }\n \n .editor-list-ol {\n padding: 0;\n margin: 0;\n margin-left: 16px;\n list-style-type: auto;\n }\n \n .editor-list-ul {\n padding: 0;\n margin: 0;\n margin-left: 16px;\n list-style-type: disc;\n }\n \n .editor-listitem {\n margin: 8px 32px 8px 32px;\n }\n \n .editor-nested-listitem {\n list-style-type: none;\n }\n \n pre::-webkit-scrollbar {\n background: transparent;\n width: 10px;\n }\n \n pre::-webkit-scrollbar-thumb {\n background: #999;\n }\n \n .debug-timetravel-panel {\n overflow: hidden;\n padding: 0 0 10px 0;\n margin: auto;\n display: flex;\n }\n \n .debug-timetravel-panel-slider {\n padding: 0;\n flex: 8;\n }\n \n .debug-timetravel-panel-button {\n padding: 0;\n border: 0;\n background: none;\n flex: 1;\n color: #fff;\n font-size: 12px;\n }\n \n .debug-timetravel-panel-button:hover {\n text-decoration: underline;\n }\n \n .debug-timetravel-button {\n border: 0;\n padding: 0;\n font-size: 12px;\n top: 10px;\n right: 15px;\n position: absolute;\n background: none;\n color: #fff;\n }\n \n .debug-timetravel-button:hover {\n text-decoration: underline;\n }\n \n .emoji {\n color: transparent;\n background-size: 16px 16px;\n background-position: center;\n background-repeat: no-repeat;\n vertical-align: middle;\n margin: 0 -1px;\n }\n \n .emoji-inner {\n padding: 0 0.15em;\n }\n \n .emoji-inner::selection {\n color: transparent;\n background-color: rgba(150, 150, 150, 0.4);\n }\n \n .emoji-inner::moz-selection {\n color: transparent;\n background-color: rgba(150, 150, 150, 0.4);\n }\n \n .emoji.happysmile {\n background-image: url('+T+");\n }\n \n .toolbar {\n display: flex;\n margin-bottom: 1px;\n background: #fff;\n padding: 4px;\n border-top-left-radius: 10px;\n border-top-right-radius: 10px;\n vertical-align: middle;\n border: 1px solid #a8a8a8;\n border-bottom: none;\n margin-bottom: 0;\n }\n \n .toolbar button.toolbar-item {\n border: 0;\n display: flex;\n background: none;\n border-radius: 10px;\n padding: 8px;\n cursor: pointer;\n vertical-align: middle;\n }\n \n .toolbar button.toolbar-item:disabled {\n cursor: not-allowed;\n }\n \n .toolbar button.toolbar-item.spaced {\n margin-right: 2px;\n }\n \n .toolbar button.toolbar-item i.format {\n background-size: contain;\n display: inline-block;\n height: 18px;\n width: 18px;\n margin-top: 2px;\n vertical-align: -0.25em;\n display: flex;\n opacity: 0.6;\n }\n \n .toolbar button.toolbar-item:disabled i.format {\n opacity: 0.2;\n }\n \n .toolbar button.toolbar-item.active {\n background-color: rgba(223, 232, 250, 0.3);\n }\n \n .toolbar button.toolbar-item.active i {\n opacity: 1;\n }\n \n .toolbar .toolbar-item:hover:not([disabled]) {\n background-color: #eee;\n }\n \n .toolbar .divider {\n width: 1px;\n background-color: #eee;\n margin: 0 4px;\n }\n \n .toolbar select.toolbar-item {\n border: 0;\n display: flex;\n background: none;\n border-radius: 10px;\n padding: 8px;\n vertical-align: middle;\n -webkit-appearance: none;\n -moz-appearance: none;\n width: 70px;\n font-size: 14px;\n color: #777;\n text-overflow: ellipsis;\n }\n \n .toolbar select.code-language {\n text-transform: capitalize;\n width: 130px;\n }\n \n .toolbar .toolbar-item .text {\n display: flex;\n line-height: 20px;\n width: 200px;\n vertical-align: middle;\n font-size: 14px;\n color: #777;\n text-overflow: ellipsis;\n width: 70px;\n overflow: hidden;\n height: 20px;\n text-align: left;\n }\n \n .toolbar .toolbar-item .icon {\n display: flex;\n width: 20px;\n height: 20px;\n user-select: none;\n margin-right: 8px;\n line-height: 16px;\n background-size: contain;\n }\n \n .toolbar i.chevron-down {\n margin-top: 3px;\n width: 16px;\n height: 16px;\n display: flex;\n user-select: none;\n }\n \n .toolbar i.chevron-down.inside {\n width: 16px;\n height: 16px;\n display: flex;\n margin-left: -25px;\n margin-top: 11px;\n margin-right: 10px;\n pointer-events: none;\n }\n \n i.chevron-down {\n background-color: transparent;\n background-size: contain;\n display: inline-block;\n height: 8px;\n width: 8px;\n background-image: url("+k+");\n }\n \n #block-controls button:hover {\n background-color: #efefef;\n }\n \n #block-controls button:focus-visible {\n border-color: blue;\n }\n \n #block-controls span.block-type {\n background-size: contain;\n display: block;\n width: 18px;\n height: 18px;\n margin: 2px;\n }\n \n #block-controls span.block-type.paragraph {\n background-image: url("+w+");\n }\n \n #block-controls span.block-type.h1 {\n background-image: url("+O+");\n }\n \n #block-controls span.block-type.h2 {\n background-image: url("+R+");\n }\n \n #block-controls span.block-type.quote {\n background-image: url("+A+");\n }\n \n #block-controls span.block-type.ul {\n background-image: url("+D+");\n }\n \n #block-controls span.block-type.ol {\n background-image: url("+M+");\n }\n \n #block-controls span.block-type.code {\n background-image: url("+$+");\n }\n \n .dropdown {\n z-index: 5;\n display: block;\n position: absolute;\n box-shadow: 0 12px 28px 0 rgba(0, 0, 0, 0.2), 0 2px 4px 0 rgba(0, 0, 0, 0.1),\n inset 0 0 0 1px rgba(255, 255, 255, 0.5);\n border-radius: 8px;\n min-width: 100px;\n min-height: 40px;\n background-color: #fff;\n }\n \n .dropdown .item {\n margin: 0 8px 0 8px;\n padding: 8px;\n color: #050505;\n cursor: pointer;\n line-height: 16px;\n font-size: 15px;\n display: flex;\n align-content: center;\n flex-direction: row;\n flex-shrink: 0;\n justify-content: space-between;\n background-color: #fff;\n border-radius: 8px;\n border: 0;\n min-width: 268px;\n }\n \n .dropdown .item .active {\n display: flex;\n width: 20px;\n height: 20px;\n background-size: contain;\n }\n \n .dropdown .item:first-child {\n margin-top: 8px;\n }\n \n .dropdown .item:last-child {\n margin-bottom: 8px;\n }\n \n .dropdown .item:hover {\n background-color: #eee;\n }\n \n .dropdown .item .text {\n display: flex;\n line-height: 20px;\n flex-grow: 1;\n width: 200px;\n }\n \n .dropdown .item .icon {\n display: flex;\n width: 20px;\n height: 20px;\n user-select: none;\n margin-right: 12px;\n line-height: 16px;\n background-size: contain;\n }\n \n .link-editor {\n position: absolute;\n z-index: 100;\n top: -10000px;\n left: -10000px;\n margin-top: -6px;\n max-width: 300px;\n width: 100%;\n opacity: 0;\n background-color: #fff;\n box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.3);\n border-radius: 8px;\n transition: opacity 0.5s;\n }\n \n .link-editor .link-input {\n display: block;\n width: calc(100% - 24px);\n box-sizing: border-box;\n margin: 8px 12px;\n padding: 8px 12px;\n border-radius: 15px;\n background-color: #eee;\n font-size: 15px;\n color: rgb(5, 5, 5);\n border: 0;\n outline: 0;\n position: relative;\n font-family: inherit;\n }\n \n .link-editor div.link-edit {\n background-image: url("+P+");\n background-size: 16px;\n background-position: center;\n background-repeat: no-repeat;\n width: 35px;\n vertical-align: -0.25em;\n position: absolute;\n right: 0;\n top: 0;\n bottom: 0;\n cursor: pointer;\n }\n \n .link-editor .link-input a {\n color: rgb(33, 111, 219);\n text-decoration: none;\n display: block;\n white-space: nowrap;\n overflow: hidden;\n margin-right: 30px;\n text-overflow: ellipsis;\n }\n \n .link-editor .link-input a:hover {\n text-decoration: underline;\n }\n \n .link-editor .button {\n width: 20px;\n height: 20px;\n display: inline-block;\n padding: 6px;\n border-radius: 8px;\n cursor: pointer;\n margin: 0 2px;\n }\n \n .link-editor .button.hovered {\n width: 20px;\n height: 20px;\n display: inline-block;\n background-color: #eee;\n }\n \n .link-editor .button i,\n .actions i {\n background-size: contain;\n display: inline-block;\n height: 20px;\n width: 20px;\n vertical-align: -0.25em;\n }\n \n i.undo {\n background-image: url("+L+");\n }\n \n i.redo {\n background-image: url("+I+");\n }\n \n .icon.paragraph {\n background-image: url("+w+");\n }\n \n .icon.large-heading,\n .icon.h1 {\n background-image: url("+O+");\n }\n \n .icon.small-heading,\n .icon.h2 {\n background-image: url("+R+");\n }\n \n .icon.bullet-list,\n .icon.ul {\n background-image: url("+D+");\n }\n \n .icon.numbered-list,\n .icon.ol {\n background-image: url("+M+");\n }\n \n .icon.quote {\n background-image: url("+A+");\n }\n \n .icon.code {\n background-image: url("+$+");\n }\n \n i.bold {\n background-image: url("+F+");\n }\n \n i.italic {\n background-image: url("+z+");\n }\n \n i.underline {\n background-image: url("+B+");\n }\n \n i.strikethrough {\n background-image: url("+j+");\n }\n \n i.code {\n background-image: url("+$+");\n }\n \n i.link {\n background-image: url("+U+");\n }\n \n i.left-align {\n background-image: url("+K+");\n }\n \n i.center-align {\n background-image: url("+H+");\n }\n \n i.right-align {\n background-image: url("+W+");\n }\n \n i.justify-align {\n background-image: url("+G+");\n }\n ",""]),e.exports=t},3645:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n,r,i,o=e[1]||"",l=e[3];if(!l)return o;if(t&&"function"==typeof btoa){var a=(n=l,r=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),"/*# ".concat(i," */")),s=l.sources.map((function(e){return"/*# sourceURL=".concat(l.sourceRoot||"").concat(e," */")}));return[o].concat(s).concat([a]).join("\n")}return[o].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var i={};if(r)for(var o=0;o{"use strict";e.exports=function(e,t){return t||(t={}),"string"!=typeof(e=e&&e.__esModule?e.default:e)?e:(/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e)}},3522:(e,t,n)=>{e.exports=n.p+"images/lexical/1F642.png"},5284:(e,t,n)=>{e.exports=n.p+"images/lexical/arrow-clockwise.svg"},3497:(e,t,n)=>{e.exports=n.p+"images/lexical/arrow-counterclockwise.svg"},821:(e,t,n)=>{e.exports=n.p+"images/lexical/chat-square-quote.svg"},629:(e,t,n)=>{e.exports=n.p+"images/lexical/chevron-down.svg"},7907:(e,t,n)=>{e.exports=n.p+"images/lexical/code.svg"},7848:(e,t,n)=>{e.exports=n.p+"images/lexical/justify.svg"},8620:(e,t,n)=>{e.exports=n.p+"images/lexical/link.svg"},9368:(e,t,n)=>{e.exports=n.p+"images/lexical/list-ol.svg"},974:(e,t,n)=>{e.exports=n.p+"images/lexical/list-ul.svg"},3164:(e,t,n)=>{e.exports=n.p+"images/lexical/pencil-fill.svg"},3696:(e,t,n)=>{e.exports=n.p+"images/lexical/text-center.svg"},3222:(e,t,n)=>{e.exports=n.p+"images/lexical/text-left.svg"},834:(e,t,n)=>{e.exports=n.p+"images/lexical/text-paragraph.svg"},8535:(e,t,n)=>{e.exports=n.p+"images/lexical/text-right.svg"},3075:(e,t,n)=>{e.exports=n.p+"images/lexical/type-bold.svg"},6503:(e,t,n)=>{e.exports=n.p+"images/lexical/type-h1.svg"},6713:(e,t,n)=>{e.exports=n.p+"images/lexical/type-h2.svg"},6690:(e,t,n)=>{e.exports=n.p+"images/lexical/type-italic.svg"},6786:(e,t,n)=>{e.exports=n.p+"images/lexical/type-strikethrough.svg"},7296:(e,t,n)=>{e.exports=n.p+"images/lexical/type-underline.svg"},2998:(e,t,n)=>{"use strict";const r=n(4556);e.exports=r},4556:(e,t)=>{"use strict";let n={},r={},i={},o={},l={},a={},s={},u={},c={},d={},f={},g={},p={},h={},m={},_={},y={},v={},b={},x={},N={},E={},C={},S={},T={},k={},w={},O={},R={},A={},D={},M={},$={},P={},L={},I={};function F(e){let t=new URLSearchParams;t.append("code",e);for(let e=1;e{let i=rr()||function(e){return e.getEditorState().read((()=>{let e=rr();return null!==e?e.clone():null}))}(e);var o=new Map,l=e.getRootElement(),a=e._editorState,s=e._blockCursorElement;let u=!1,c="";for(var d=0;d{se(e,t,n)}))}function de(e,t){let n=e.__mode,r=e.__format;e=e.__style;let i=t.__mode,o=t.__format;return t=t.__style,!(null!==n&&n!==i||null!==r&&r!==o||null!==e&&e!==t)}function fe(e,t){let n=e.mergeWithSibling(t),r=br()._normalizedNodes;return r.add(e.__key),r.add(t.__key),n}function ge(e){if(""===e.__text&&e.isSimpleText()&&!e.isUnmergeable())e.remove();else{for(var t;null!==(t=e.getPreviousSibling())&&An(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(""!==t.__text){de(t,e)&&(e=fe(t,e));break}t.remove()}for(var n;null!==(n=e.getNextSibling())&&An(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(""!==n.__text){de(e,n)&&fe(e,n);break}n.remove()}}}function pe(e){return he(e.anchor),he(e.focus),e}function he(e){for(;"element"===e.type;){var t=e.getNode(),n=e.offset;if(n===t.getChildrenSize()?(t=t.getChildAtIndex(n-1),n=!0):(t=t.getChildAtIndex(n),n=!1),An(t)){e.set(t.__key,n?t.getTextContentSize():0,"text");break}if(!Mr(t))break;e.set(t.__key,n?t.getChildrenSize():0,"element")}}let me=1,_e="function"==typeof queueMicrotask?queueMicrotask:e=>{Promise.resolve().then(e)};function ye(e){let t=document.activeElement;if(null===t)return!1;let n=t.nodeName;return Ar(De(e))&&("INPUT"===n||"TEXTAREA"===n||"true"===t.contentEditable&&null==t.__lexicalEditor)}function ve(e,t,n){let r=e.getRootElement();try{return null!==r&&r.contains(t)&&r.contains(n)&&null!==t&&!ye(t)&&be(t)===e}catch(e){return!1}}function be(e){for(;null!=e;){let t=e.__lexicalEditor;if(null!=t)return t;e=Qe(e)}return null}function xe(e){return e.isToken()||e.isSegmented()}function Ne(e){for(;null!=e;){if(3===e.nodeType)return e;e=e.firstChild}return null}function Ee(e,t,n){return e&(t=X[t])&&(null===n||0==(n&t))?e^t:null===n||n&t?e|t:e}function Ce(e){return An(e)||hn(e)||Ar(e)}function Se(e,t){if(null!=t)e.__key=t;else{yr(),99Pe().getTextContent()))}function Pe(){return vr()._nodeMap.get("root")}function Le(e){yr();let t=vr();null!==e&&(e.dirty=!0,e._cachedNodes=null),t._selection=e}function Ie(e){var t,n=br();e:{for(t=e;null!=t;){let e=t[`__lexicalKey_${n._key}`];if(void 0!==e){t=e;break e}t=Qe(t)}t=null}return null===t?e===(n=n.getRootElement())?Re("root"):null:Re(t)}function Fe(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function ze(e){let t=[];for(;null!==e;)t.push(e),e=e._parentEditor;return t}function Be(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function je(e,t,n){if(null!==(t=lt(t._window))){var r=t.anchorNode,{anchorOffset:i,focusOffset:o}=t;null!==r&&(t=3===r.nodeType?r.nodeValue:null,r=De(r),null!==t&&An(r))&&(t===V&&n&&(t=n,o=i=n.length),null!==t&&Ue(r,t,i,o,e))}}function Ue(e,t,n,r,i){let o=e;if(o.isAttached()&&(i||!o.isDirty())){let u=o.isComposing(),c=t;if((u||i)&&t[t.length-1]===V&&(c=t.slice(0,-1)),t=o.getTextContent(),i||c!==t)if(""===c)if(we(null),H||W||Y)o.remove();else{let e=br();setTimeout((()=>{e.update((()=>{o.isAttached()&&o.remove()}))}),20)}else{i=o.getParent(),t=ir();var l=o.getTextContentSize(),a=Oe(),s=o.getKey();o.isToken()||null!==a&&s===a&&!u||Bn(t)&&(null!==i&&!i.canInsertTextBefore()&&0===t.anchor.offset||t.anchor.key===e.__key&&0===t.anchor.offset&&!o.canInsertTextBefore()||t.focus.key===e.__key&&t.focus.offset===l&&!o.canInsertTextAfter())?o.markDirty():(Bn(e=rr())&&null!==n&&null!==r&&(e.setTextNodeRange(o,n,o,r),o.isSegmented()&&(n=Rn(n=o.getTextContent()),o.replace(n),o=n)),o.setTextContent(c))}}}function Ke(e,t){void 0===e.__lexicalClassNameCache&&(e.__lexicalClassNameCache={});let n=e.__lexicalClassNameCache,r=n[t];return void 0!==r?r:"string"==typeof(e=e[t])?(e=e.split(" "),n[t]=e):e}function He(e,t,n,r,i){0!==n.size&&(n=r.__type,r=r.__key,void 0===(t=t.get(n))&&F(33,n),n=t.klass,void 0===(t=e.get(n))&&(t=new Map,e.set(n,t)),n="destroyed"===(e=t.get(r))&&"created"===i,(void 0===e||n)&&t.set(r,n?"updated":i))}function We(e,t,n){let r=e.getParent(),i=n;return null!==r&&(t&&0===n?(i=e.getIndexWithinParent(),e=r):t||n!==e.getChildrenSize()||(i=e.getIndexWithinParent()+1,e=r)),e.getChildAtIndex(t?i-1:i)}function Ge(e,t){var n=e.offset;return"element"===e.type?We(e=e.getNode(),t,n):(e=e.getNode(),t&&0===n||!t&&n===e.getTextContentSize()?null===(n=t?e.getPreviousSibling():e.getNextSibling())?We(e.getParentOrThrow(),t,e.getIndexWithinParent()+(t?0:1)):n:null)}function Ye(e){return"insertFromPaste"===(e=(e=Xe(e).event)&&e.inputType)||"insertFromPasteAsQuotation"===e}function Ve(e){return!Lr(e)&&!e.isLastChild()&&!e.isInline()}function qe(e,t){return void 0===(e=e._keyToDOMMap.get(t))&&F(75,t),e}function Qe(e){return null!==(e=e.assignedSlot||e.parentElement)&&11===e.nodeType?e.host:e}function Je(e,t){for(e=e.getParent();null!==e;){if(e.is(t))return!0;e=e.getParent()}return!1}function Xe(e){return null===(e=e._window)&&F(78),e}function Ze(e){for(e=e.getParentOrThrow();null!==e&&!et(e);)e=e.getParentOrThrow();return e}function et(e){return Lr(e)||Mr(e)&&e.isShadowRoot()}function tt(e){return Se(e=e.constructor.clone(e),null),e}function nt(e){var t=br();let n=e.constructor.getType();return void 0===(t=t._nodes.get(n))&&F(97),null!==(t=t.replace)?((t=t(e))instanceof e.constructor||F(98),t):e}function rt(e,t){!Lr(e=e.getParent())||Mr(t)||Ar(t)||F(99)}function it(e){return(Ar(e)||Mr(e)&&!e.canBeEmpty())&&!e.isInline()}function ot(e,t,n){n.style.removeProperty("caret-color"),t._blockCursorElement=null,null!==(t=e.parentElement)&&t.removeChild(e)}function lt(e){return z?(e||window).getSelection():null}function at(e,t){let n=e.getChildAtIndex(t);null==n&&(n=e),et(e)&&F(102);let r=e=>{const t=e.getParentOrThrow(),i=et(t),o=e!==n||i?tt(e):e;if(i)return e.insertAfter(o),[e,o,o];const[l,a,s]=r(t);return e=e.getNextSiblings(),s.append(o,...e),[l,a,o]},[i,o]=r(n);return[i,o]}function st(e,t){for(;e!==Pe()&&null!=e;){if(t(e))return e;e=e.getParent()}return null}function ut(e){let t=[],n=[e];for(;0t&&r&&e.classList.remove(n)}n=getComputedStyle(e).getPropertyValue("--lexical-indent-base-value")||"40px",e.style.setProperty("padding-inline-start",0===t?"":`calc(${t} * ${n})`)}function Dt(e,t){e=e.style,0===t?Rt(e,""):1===t?Rt(e,"left"):2===t?Rt(e,"center"):3===t?Rt(e,"right"):4===t?Rt(e,"justify"):5===t?Rt(e,"start"):6===t&&Rt(e,"end")}function Mt(e,t,n){let r=vt.get(e);void 0===r&&F(60);let i=r.createDOM(ft,gt);var o=gt._keyToDOMMap;if(i["__lexicalKey_"+gt._key]=e,o.set(e,i),An(r)?i.setAttribute("data-lexical-text","true"):Ar(r)&&i.setAttribute("data-lexical-decorator","true"),Mr(r)){if(e=r.__indent,o=r.__size,0!==e&&At(i,e),0!==o){--o,e=Ft(r,vt);var l=Et;Et="",$t(e,r,0,o,i,null),It(r,i),Et=l}0!==(e=r.__format)&&Dt(i,e),r.isInline()||Lt(null,r,i),Ve(r)&&(Nt+="\n\n",Ct+="\n\n")}else o=r.getTextContent(),Ar(r)?(null!==(l=r.decorate(gt,ft))&&Bt(e,l),i.contentEditable="false"):An(r)&&(r.isDirectionless()||(Et+=o)),Nt+=o,Ct+=o;return null!==t&&(null!=n||null!=(n=t.__lexicalLineBreak)?t.insertBefore(i,n):t.appendChild(i)),He(xt,pt,ht,r,"created"),i}function $t(e,t,n,r,i,o){let l=Nt;for(Nt="";n<=r;++n)Mt(e[n],i,o);Ve(t)&&(Nt+="\n\n"),i.__lexicalTextContent=Nt,Nt=l+Nt}function Pt(e,t){return hn(e=t.get(e))||Ar(e)&&e.isInline()}function Lt(e,t,n){e=null!==e&&(0===e.__size||Pt(e.__last,yt)),t=0===t.__size||Pt(t.__last,vt),e?t||(null!=(t=n.__lexicalLineBreak)&&n.removeChild(t),n.__lexicalLineBreak=null):t&&(t=document.createElement("br"),n.__lexicalLineBreak=t,n.appendChild(t))}function It(e,t){var n=t.__lexicalDir;if(t.__lexicalDirTextContent!==Et||n!==kt){let o=""===Et;if(o)var r=kt;else r=Et,r=Q.test(r)?"rtl":J.test(r)?"ltr":null;if(r!==n){let l=t.classList,a=ft.theme;var i=null!==n?a[n]:void 0;let s=null!==r?a[r]:void 0;void 0!==i&&("string"==typeof i&&(i=i.split(" "),i=a[n]=i),l.remove(...i)),null===r||o&&"ltr"===r?t.removeAttribute("dir"):(void 0!==s&&("string"==typeof s&&(n=s.split(" "),s=a[r]=n),void 0!==s&&l.add(...s)),t.dir=r),Tt||(e.getWritable().__dir=r)}kt=r,t.__lexicalDirTextContent=Et,t.__lexicalDir=r}}function Ft(e,t){let n=[];for(e=e.__first;null!==e;){let r=t.get(e);void 0===r&&F(101),n.push(e),e=r.__next}return n}function zt(e,t){var n=yt.get(e),r=vt.get(e);void 0!==n&&void 0!==r||F(61);var i=St||_t.has(e)||mt.has(e);let o=qe(gt,e);if(n===r&&!i)return Mr(n)?(void 0!==(r=o.__lexicalTextContent)&&(Nt+=r,Ct+=r),void 0!==(r=o.__lexicalDirTextContent)&&(Et+=r)):(r=n.getTextContent(),An(n)&&!n.isDirectionless()&&(Et+=r),Ct+=r,Nt+=r),o;if(n!==r&&i&&He(xt,pt,ht,r,"updated"),r.updateDOM(n,o,ft))return r=Mt(e,null,null),null===t&&F(62),t.replaceChild(r,o),wt(e,null),r;if(Mr(n)&&Mr(r)){if((e=r.__indent)!==n.__indent&&At(o,e),(e=r.__format)!==n.__format&&Dt(o,e),i){e=r,i=Et,Et="",t=Nt;var l=n.__size,a=e.__size;if(Nt="",1===l&&1===a){var s=n.__first,u=e.__first;if(s===u)zt(s,o);else{var c=Ut(s);u=Mt(u,null,null),o.replaceChild(u,c),wt(s,null)}}else{u=Ft(n,yt);var d=Ft(e,vt);if(0===l)0!==a&&$t(d,e,0,a-1,o,null);else if(0===a)0!==l&&(Ot(u,0,l-1,(s=null==o.__lexicalLineBreak)?null:o),s&&(o.textContent=""));else{var f=u;u=d,d=l-1,l=a-1;let t=o.firstChild,n=0;for(a=0;n<=d&&a<=l;){var g=f[n];let e=u[a];if(g===e)t=jt(zt(e,o)),n++,a++;else{void 0===s&&(s=new Set(f)),void 0===c&&(c=new Set(u));let r=c.has(g),i=s.has(e);r?(i?((g=qe(gt,e))===t?t=jt(zt(e,o)):(null!=t?o.insertBefore(g,t):o.appendChild(g),zt(e,o)),n++):Mt(e,o,t),a++):(t=jt(Ut(g)),wt(g,o),n++)}}c=a>l,(s=n>d)&&!c?$t(u,e,a,l,o,s=void 0===(s=u[l+1])?null:gt.getElementByKey(s)):c&&!s&&Ot(f,n,d,o)}}Ve(e)&&(Nt+="\n\n"),o.__lexicalTextContent=Nt,Nt=t+Nt,It(e,o),Et=i,Lr(r)||r.isInline()||Lt(n,r,o)}Ve(r)&&(Nt+="\n\n",Ct+="\n\n")}else n=r.getTextContent(),Ar(r)?null!==(i=r.decorate(gt,ft))&&Bt(e,i):An(r)&&!r.isDirectionless()&&(Et+=n),Nt+=n,Ct+=n;return!Tt&&Lr(r)&&r.__cachedText!==Ct&&((r=r.getWritable()).__cachedText=Ct),o}function Bt(e,t){let n=gt._pendingDecorators,r=gt._decorators;if(null===n){if(r[e]===t)return;n=Me(gt)}n[e]=t}function jt(e){return null!==(e=e.nextSibling)&&e===gt._blockCursorElement&&(e=e.nextSibling),e}function Ut(e){let t=bt.get(e);return void 0===t&&F(75,e),t}let Kt=Object.freeze({}),Ht=[["keydown",function(e,t){if(Wt=e.timeStamp,Gt=e.keyCode,!t.isComposing()){var{keyCode:n,shiftKey:r,ctrlKey:l,metaKey:a,altKey:s}=e;if(!Tr(t,h,e)){if(39!==n||l||a||s)if(39!==n||s||r||!l&&!a)if(37!==n||l||a||s)if(37!==n||s||r||!l&&!a)if(38!==n||l||a)if(40!==n||l||a)if(13===n&&r)Xt=!0,Tr(t,N,e);else if(32===n)Tr(t,E,e);else if(j&&l&&79===n)e.preventDefault(),Xt=!0,Tr(t,o,!0);else if(13!==n||r){var u=j?!s&&!a&&(8===n||72===n&&l):!(l||s||a)&&8===n;u?8===n?Tr(t,C,e):(e.preventDefault(),Tr(t,i,!0)):27===n?Tr(t,S,e):(u=j?!(r||s||a)&&(46===n||68===n&&l):!(l||s||a)&&46===n)?46===n?Tr(t,T,e):(e.preventDefault(),Tr(t,i,!1)):8===n&&(j?s:l)?(e.preventDefault(),Tr(t,c,!0)):46===n&&(j?s:l)?(e.preventDefault(),Tr(t,c,!1)):j&&a&&8===n?(e.preventDefault(),Tr(t,d,!0)):j&&a&&46===n?(e.preventDefault(),Tr(t,d,!1)):66===n&&!s&&(j?a:l)?(e.preventDefault(),Tr(t,f,"bold")):85===n&&!s&&(j?a:l)?(e.preventDefault(),Tr(t,f,"underline")):73===n&&!s&&(j?a:l)?(e.preventDefault(),Tr(t,f,"italic")):9!==n||s||l||a?90===n&&!r&&(j?a:l)?(e.preventDefault(),Tr(t,g,void 0)):(u=j?90===n&&a&&r:89===n&&l||90===n&&l&&r)?(e.preventDefault(),Tr(t,p,void 0)):Wn(t._editorState._selection)?(u=!r&&67===n&&(j?a:l))?(e.preventDefault(),Tr(t,D,e)):(u=!r&&88===n&&(j?a:l))?(e.preventDefault(),Tr(t,M,e)):65===n&&(j?a:l)&&(e.preventDefault(),Tr(t,$,e)):!U&&65===n&&(j?a:l)&&(e.preventDefault(),Tr(t,$,e)):Tr(t,k,e)}else Xt=!1,Tr(t,N,e);else Tr(t,x,e);else Tr(t,b,e);else Tr(t,v,e);else Tr(t,y,e);else Tr(t,_,e);else Tr(t,m,e);(l||r||s||a)&&Tr(t,I,e)}}}],["pointerdown",function(e,t){let n=e.target;e=e.pointerType,n instanceof Node&&"touch"!==e&&Or(t,(()=>{Ar(De(n))||(Jt=!0)}))}],["compositionstart",function(e,t){Or(t,(()=>{let n=rr();if(Bn(n)&&!t.isComposing()){let r=n.anchor,i=n.anchor.getNode();we(r.key),(e.timeStamp{ln(t,e.data)}))}],["input",function(e,t){e.stopPropagation(),Or(t,(()=>{var n=rr(),r=e.data,i=on(e);if(null!=r&&Bn(n)&&tn(n,i,r,e.timeStamp,!1)){Zt&&(ln(t,r),Zt=!1);var o=n.anchor,l=o.getNode();if(null===(i=lt(t._window)))return;let s=o.offset;(o=K&&!n.isCollapsed()&&An(l)&&null!==i.anchorNode)&&(o=(l=l.getTextContent().slice(0,s)+r+l.getTextContent().slice(s+n.focus.offset))===(3===(i=i.anchorNode).nodeType?i.nodeValue:null)),o||Tr(t,a,r),r=r.length,U&&1{let n=rr();var i=lt(t._window);let o=ir();if(i)if(Bn(n)){let t=n.anchor;var l=t.getNode();"element"===t.type&&0===t.offset&&n.isCollapsed()&&!Lr(l)&&1===Pe().getChildrenSize()&&l.getTopLevelElementOrThrow().isEmpty()&&null!==o&&n.is(o)?(i.removeAllRanges(),n.dirty=!0):3!==e.detail||n.isCollapsed()||l!==(i=n.focus.getNode())&&(Mr(l)?l.select(0):l.getParentOrThrow().select(0))}else"touch"===e.pointerType&&null!==(l=i.anchorNode)&&(1===(l=l.nodeType)||3===l)&&Le(i=nr(o,i,t));Tr(t,r,e)}))}],["cut",Kt],["copy",Kt],["dragstart",Kt],["dragover",Kt],["dragend",Kt],["paste",Kt],["focus",Kt],["blur",Kt],["drop",Kt]];K&&Ht.push(["beforeinput",(e,t)=>function(e,t){let n=e.inputType,r=on(e);"deleteCompositionText"===n||U&&Ye(t)||"insertCompositionText"!==n&&Or(t,(()=>{let h=rr();if("deleteContentBackward"===n){if(null===h){var m=ir();if(!Bn(m))return;Le(m.clone())}if(Bn(h))return void(229===Gt&&e.timeStamp{Or(t,(()=>{we(null)}))}),30),Bn(h)&&(m=h.anchor.getNode(),m.markDirty(),h.format=m.getFormat(),h.style=m.getStyle())):(e.preventDefault(),Tr(t,i,!0)))}if(Bn(h)){m=e.data,null!==Vt&&je(!1,t,Vt),h.dirty&&null===Vt||!h.isCollapsed()||Lr(h.anchor.getNode())||null===r||h.applyDOMRange(r),Vt=null;var _=h.focus,y=h.anchor.getNode();if(_=_.getNode(),"insertText"===n||"insertTranspose"===n)"\n"===m?(e.preventDefault(),Tr(t,o,!1)):"\n\n"===m?(e.preventDefault(),Tr(t,l,void 0)):null==m&&e.dataTransfer?(m=e.dataTransfer.getData("text/plain"),e.preventDefault(),h.insertRawText(m)):null!=m&&tn(h,r,m,e.timeStamp,!0)?(e.preventDefault(),Tr(t,a,m)):Vt=m,Yt=e.timeStamp;else switch(e.preventDefault(),n){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":Tr(t,a,e);break;case"insertFromComposition":we(null),Tr(t,a,e);break;case"insertLineBreak":we(null),Tr(t,o,!1);break;case"insertParagraph":we(null),Xt&&!W?(Xt=!1,Tr(t,o,!1)):Tr(t,l,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":Tr(t,s,e);break;case"deleteByComposition":(function(e,t){return e!==t||Mr(e)||Mr(t)||!e.isToken()||!t.isToken()})(y,_)&&Tr(t,u,e);break;case"deleteByDrag":case"deleteByCut":Tr(t,u,e);break;case"deleteContent":Tr(t,i,!1);break;case"deleteWordBackward":Tr(t,c,!0);break;case"deleteWordForward":Tr(t,c,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":Tr(t,d,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":Tr(t,d,!1);break;case"formatStrikeThrough":Tr(t,f,"strikethrough");break;case"formatBold":Tr(t,f,"bold");break;case"formatItalic":Tr(t,f,"italic");break;case"formatUnderline":Tr(t,f,"underline");break;case"historyUndo":Tr(t,g,void 0);break;case"historyRedo":Tr(t,p,void 0)}}}))}(e,t)]);let Wt=0,Gt=0,Yt=0,Vt=null,qt=0,Qt=!1,Jt=!1,Xt=!1,Zt=!1,en=[0,"",0,"root",0];function tn(e,t,n,r,i){let o=e.anchor,l=e.focus,a=o.getNode();var s=br();let u=lt(s._window),c=null!==u?u.anchorNode:null,d=o.key;s=s.getElementByKey(d);let f=n.length;return d!==l.key||!An(a)||(!i&&(!K||Ytf||Fe(n))&&o.offset!==l.offset&&!a.isComposing()||xe(a)||a.isDirty()&&1{if(r){if(ve(t,i,l)){var o=rr();if(Bn(o)){var a=o.anchor,s=a.getNode();if(o.isCollapsed()){"Range"===e.type&&e.anchorNode===e.focusNode&&(o.dirty=!0);var u=Xe(t).event;u=u?u.timeStamp:performance.now();let[n,r,i,l,c]=en;u{var e=ir(),r=t.anchorNode;null!==r&&(1===(r=r.nodeType)||3===r)&&Le(e=nr(e,t,n))})));var r=(e=(e=ze(n))[e.length-1])._key,i=sn.get(r),o=i||e;o!==n&&rn(t,o,!1),rn(t,n,!0),n!==e?sn.set(r,n):i&&sn.delete(r)}}}function cn(e,t,n){yr();var r=e.__key;let i=e.getParent();if(null!==i){var o=rr();if(Bn(o)&&Mr(e)){var{anchor:l,focus:a}=o,s=l.getNode(),u=a.getNode();Je(s,e)&&l.set(e.__key,0,"element"),Je(u,e)&&a.set(e.__key,0,"element")}if(u=!1,Bn(s=o)&&t){o=s.anchor;let t=s.focus;o.key===r&&(ar(o,e,i,e.getPreviousSibling(),e.getNextSibling()),u=!0),t.key===r&&(ar(t,e,i,e.getPreviousSibling(),e.getNextSibling()),u=!0)}else Wn(s)&&t&&e.isSelected()&&e.selectPrevious();Bn(s)&&t&&!u?(r=e.getIndexWithinParent(),Te(e),or(s,i,r,-1)):Te(e),n||et(i)||i.canBeEmpty()||!i.isEmpty()||cn(i,t),t&&Lr(i)&&i.isEmpty()&&i.selectEnd()}}class dn{static getType(){F(64,this.name)}static clone(){F(65,this.name)}constructor(e){this.__type=this.constructor.getType(),this.__next=this.__prev=this.__parent=null,Se(this,e)}getType(){return this.__type}isAttached(){for(var e=this.__key;null!==e;){if("root"===e)return!0;if(null===(e=Re(e)))break;e=e.__parent}return!1}isSelected(e){if(null==(e=e||rr()))return!1;let t=e.getNodes().some((e=>e.__key===this.__key));return(An(this)||!Bn(e)||"element"!==e.anchor.type||"element"!==e.focus.type||e.anchor.key!==e.focus.key||e.anchor.offset!==e.focus.offset)&&t}getKey(){return this.__key}getIndexWithinParent(){var e=this.getParent();if(null===e)return-1;e=e.getFirstChild();let t=0;for(;null!==e;){if(this.is(e))return t;t++,e=e.getNextSibling()}return-1}getParent(){let e=this.getLatest().__parent;return null===e?null:Re(e)}getParentOrThrow(){let e=this.getParent();return null===e&&F(66,this.__key),e}getTopLevelElement(){let e=this;for(;null!==e;){let t=e.getParent();if(et(t))return e;e=t}return null}getTopLevelElementOrThrow(){let e=this.getTopLevelElement();return null===e&&F(67,this.__key),e}getParents(){let e=[],t=this.getParent();for(;null!==t;)e.push(t),t=t.getParent();return e}getParentKeys(){let e=[],t=this.getParent();for(;null!==t;)e.push(t.__key),t=t.getParent();return e}getPreviousSibling(){let e=this.getLatest().__prev;return null===e?null:Re(e)}getPreviousSiblings(){let e=[];var t=this.getParent();if(null===t)return e;for(t=t.getFirstChild();null!==t&&!t.is(this);)e.push(t),t=t.getNextSibling();return e}getNextSibling(){let e=this.getLatest().__next;return null===e?null:Re(e)}getNextSiblings(){let e=[],t=this.getNextSibling();for(;null!==t;)e.push(t),t=t.getNextSibling();return e}getCommonAncestor(e){let t=this.getParents();var n=e.getParents();Mr(this)&&t.unshift(this),Mr(e)&&n.unshift(e),e=t.length;var r=n.length;if(0===e||0===r||t[e-1]!==n[r-1])return null;for(n=new Set(n),r=0;r{l.append(e)})),Bn(n)&&(Le(n),t=n.anchor,n=n.focus,t.key===i&&Ln(t,l),n.key===i&&Ln(n,l)),Oe()===i&&we(o),l}insertAfter(e,t=!0){yr(),rt(this,e);var n=this.getWritable();let r=e.getWritable();var i=r.getParent();let o=rr();var l=!1,a=!1;if(null!==i){var s=e.getIndexWithinParent();Te(r),Bn(o)&&(a=i.__key,l=o.anchor,i=o.focus,l="element"===l.type&&l.key===a&&l.offset===s+1,a="element"===i.type&&i.key===a&&i.offset===s+1)}i=this.getNextSibling(),s=this.getParentOrThrow().getWritable();let u=r.__key,c=n.__next;return null===i?s.__last=u:i.getWritable().__prev=u,s.__size++,n.__next=u,r.__next=c,r.__prev=n.__key,r.__parent=n.__parent,t&&Bn(o)&&(or(o,s,(t=this.getIndexWithinParent())+1),n=s.__key,l&&o.anchor.set(n,t+2,"element"),a&&o.focus.set(n,t+2,"element")),e}insertBefore(e,t=!0){yr(),rt(this,e);var n=this.getWritable();let r=e.getWritable(),i=r.__key;Te(r);let o=this.getPreviousSibling(),l=this.getParentOrThrow().getWritable(),a=n.__prev,s=this.getIndexWithinParent();return null===o?l.__first=i:o.getWritable().__next=i,l.__size++,n.__prev=i,r.__prev=a,r.__next=n.__key,r.__parent=n.__parent,n=rr(),t&&Bn(n)&&or(n,t=this.getParentOrThrow(),s),e}isParentRequired(){return!1}createParentElementNode(){return Ur()}selectPrevious(e,t){yr();let n=this.getPreviousSibling(),r=this.getParentOrThrow();return null===n?r.select(0,0):Mr(n)?n.select():An(n)?n.select(e,t):(e=n.getIndexWithinParent()+1,r.select(e,e))}selectNext(e,t){yr();let n=this.getNextSibling(),r=this.getParentOrThrow();return null===n?r.select():Mr(n)?n.select(0,0):An(n)?n.select(e,t):(e=n.getIndexWithinParent(),r.select(e,e))}markDirty(){this.getWritable()}}class fn extends dn{static getType(){return"linebreak"}static clone(e){return new fn(e.__key)}constructor(e){super(e)}getTextContent(){return"\n"}createDOM(){return document.createElement("br")}updateDOM(){return!1}static importDOM(){return{br:e=>{let t,n,r=e.parentElement;return null!==r&&((t=r.firstChild)===e||t.nextSibling===e&&3===t.nodeType&&null!==(t.textContent||"").match(/^( |\t|\r?\n)+$/))&&((n=r.lastChild)===e||n.previousSibling===e&&3===n.nodeType&&null!==(n.textContent||"").match(/^( |\t|\r?\n)+$/))?null:{conversion:gn,priority:0}}}}static importJSON(){return pn()}exportJSON(){return{type:"linebreak",version:1}}}function gn(){return{node:pn()}}function pn(){return nt(new fn)}function hn(e){return e instanceof fn}function mn(e,t){return 16&t?"code":128&t?"mark":32&t?"sub":64&t?"sup":null}function _n(e,t){return 1&t?"strong":2&t?"em":"span"}function yn(e,t,n,r,i){e=r.classList,void 0!==(r=Ke(i,"base"))&&e.add(...r);let o=!1,l=8&t&&4&t;var a=8&n&&4&n;void 0!==(r=Ke(i,"underlineStrikethrough"))&&(a?(o=!0,l||e.add(...r)):l&&e.remove(...r));for(let s in X)a=X[s],void 0!==(r=Ke(i,s))&&(n&a&&(!o||"underline"!==s&&"strikethrough"!==s)?(0==(t&a)||l&&"underline"===s||"strikethrough"===s)&&e.add(...r):t&a&&e.remove(...r))}function vn(e,t,n){let r=t.firstChild;if(e+=(n=n.isComposing())?V:"",null==r)t.textContent=e;else if((t=r.nodeValue)!==e)if(n||U){n=t.length;let i=e.length,o=0,l=0;for(;o({conversion:Sn,priority:0}),b:()=>({conversion:En,priority:0}),code:()=>({conversion:On,priority:0}),em:()=>({conversion:On,priority:0}),i:()=>({conversion:On,priority:0}),s:()=>({conversion:On,priority:0}),span:()=>({conversion:Nn,priority:0}),strong:()=>({conversion:On,priority:0}),sub:()=>({conversion:On,priority:0}),sup:()=>({conversion:On,priority:0}),u:()=>({conversion:On,priority:0})}}static importJSON(e){let t=Rn(e.text);return t.setFormat(e.format),t.setDetail(e.detail),t.setMode(e.mode),t.setStyle(e.style),t}exportDOM(e){return({element:e}=super.exportDOM(e)),null!==e&&ct(e)||F(132),e.style.whiteSpace="pre-wrap",this.hasFormat("bold")&&(e=bn(e,"b")),this.hasFormat("italic")&&(e=bn(e,"i")),this.hasFormat("strikethrough")&&(e=bn(e,"s")),this.hasFormat("underline")&&(e=bn(e,"u")),{element:e}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),type:"text",version:1}}selectionTransform(){}setFormat(e){let t=this.getWritable();return t.__format="string"==typeof e?X[e]:e,t}setDetail(e){let t=this.getWritable();return t.__detail="string"==typeof e?Z[e]:e,t}setStyle(e){let t=this.getWritable();return t.__style=e,t}toggleFormat(e){return e=X[e],this.setFormat(this.getFormat()^e)}toggleDirectionless(){let e=this.getWritable();return e.__detail^=1,e}toggleUnmergeable(){let e=this.getWritable();return e.__detail^=2,e}setMode(e){if(e=ne[e],this.__mode===e)return this;let t=this.getWritable();return t.__mode=e,t}setTextContent(e){if(this.__text===e)return this;let t=this.getWritable();return t.__text=e,t}select(e,t){yr();let n=rr();var r=this.getTextContent();let i=this.__key;return"string"==typeof r?(r=r.length,void 0===e&&(e=r),void 0===t&&(t=r)):t=e=0,Bn(n)?((r=Oe())!==n.anchor.key&&r!==n.focus.key||we(i),n.setTextNodeRange(this,e,this,t),n):er(i,e,i,t,"text","text")}spliceText(e,t,n,r){let i=this.getWritable(),o=i.__text,l=n.length,a=e;0>a&&(a=l+a,0>a&&(a=0));let s=rr();return r&&Bn(s)&&(e+=l,s.setTextNodeRange(i,e,i,e)),t=o.slice(0,a)+n+o.slice(a+t),i.__text=t,i}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...e){yr();var t=this.getLatest(),n=t.getTextContent(),r=t.__key,i=Oe(),o=new Set(e);e=[];for(var l=n.length,a="",s=0;su&&e.offset<=g&&(e.key=o,e.offset-=u,t.dirty=!0),n.key===r&&"text"===n.type&&n.offset>u&&n.offset<=g&&(n.key=o,n.offset-=u,t.dirty=!0)}i===r&&we(o),u=g,a.push(f)}return r=this.getPreviousSibling(),i=this.getNextSibling(),null!==r&&ke(r),null!==i&&ke(i),r=n.getWritable(),i=this.getIndexWithinParent(),l?(r.splice(i,0,a),this.remove()):r.splice(i,1,a),Bn(t)&&or(t,n,i,o-1),a}mergeWithSibling(e){var t=e===this.getPreviousSibling();t||e===this.getNextSibling()||F(50);var n=this.__key;let r=e.__key,i=this.__text,o=i.length;Oe()===r&&we(n);let l=rr();if(Bn(l)){let i=l.anchor,a=l.focus;null!==i&&i.key===r&&(sr(i,t,n,e,o),l.dirty=!0),null!==a&&a.key===r&&(sr(a,t,n,e,o),l.dirty=!0)}return n=e.__text,this.setTextContent(t?n+i:i+n),t=this.getWritable(),e.remove(),t}isTextEntity(){return!1}}function Nn(e){let t="700"===e.style.fontWeight,n="line-through"===e.style.textDecoration,r="italic"===e.style.fontStyle,i="underline"===e.style.textDecoration,o=e.style.verticalAlign;return{forChild:e=>An(e)?(t&&e.toggleFormat("bold"),n&&e.toggleFormat("strikethrough"),r&&e.toggleFormat("italic"),i&&e.toggleFormat("underline"),"sub"===o&&e.toggleFormat("subscript"),"super"===o&&e.toggleFormat("superscript"),e):e,node:null}}function En(e){let t="normal"===e.style.fontWeight;return{forChild:e=>(An(e)&&!t&&e.toggleFormat("bold"),e),node:null}}let Cn=new WeakMap;function Sn(e){null===e.parentElement&&F(129);for(var t,n=e.textContent||"",r=e.parentNode,i=[e];null!==r&&void 0===(t=Cn.get(r))&&!("PRE"===r.nodeName||1===r.nodeType&&r.style.whiteSpace.startsWith("pre"));)i.push(r),r=r.parentNode;for(t=void 0===t?r:t,r=0;r(An(e)&&!e.hasFormat(t)&&e.toggleFormat(t),e),node:null}}function Rn(e=""){return nt(new xn(e))}function An(e){return e instanceof xn}class Dn extends xn{static getType(){return"tab"}static clone(e){let t=new Dn(e.__key);return t.__text=e.__text,t.__format=e.__format,t.__style=e.__style,t}constructor(e){super("\t",e),this.__detail=2}static importDOM(){return null}static importJSON(e){let t=Mn();return t.setFormat(e.format),t.setStyle(e.style),t}exportJSON(){return{...super.exportJSON(),type:"tab",version:1}}setTextContent(){F(126)}setDetail(){F(127)}setMode(){F(128)}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function Mn(){return nt(new Dn)}class $n{constructor(e,t,n){this._selection=null,this.key=e,this.offset=t,this.type=n}is(e){return this.key===e.key&&this.offset===e.offset&&this.type===e.type}isBefore(e){let t=this.getNode(),n=e.getNode(),r=this.offset;if(e=e.offset,Mr(t)){var i=t.getDescendantByIndex(r);t=null!=i?i:t}return Mr(n)&&(i=n.getDescendantByIndex(e),n=null!=i?i:n),t===n?r(t=t.getTextContentSize())&&(r=t);else if(!Mr(t)){var o=t.getNextSibling();An(o)?(n=o.__key,r=0,i="text"):(o=t.getParent())&&(n=o.__key,r=t.getIndexWithinParent()+1)}e.set(n,r,i)}function Ln(e,t){if(Mr(t)){let n=t.getLastDescendant();Mr(n)||An(n)?Pn(e,n):Pn(e,t)}else Pn(e,t)}function In(e,t,n,r){let i=e.getNode(),o=i.getChildAtIndex(e.offset),l=Rn(),a=Lr(i)?Ur().append(l):l;l.setFormat(n),l.setStyle(r),null===o?i.append(a):(o.insertBefore(a),"element"===t.type&&t.key===e.key&&t.offset!==e.offset&&t.set(t.key,t.offset+1,"element")),e.is(t)&&t.set(l.__key,0,"text"),e.set(l.__key,0,"text")}function Fn(e,t,n,r){e.key=t,e.offset=n,e.type=r}class zn{constructor(e){this.dirty=!1,this._nodes=e,this._cachedNodes=null}is(e){if(!Wn(e))return!1;let t=this._nodes,n=e._nodes;return t.size===n.size&&Array.from(t).every((e=>n.has(e)))}add(e){this.dirty=!0,this._nodes.add(e),this._cachedNodes=null}delete(e){this.dirty=!0,this._nodes.delete(e),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(e){return this._nodes.has(e)}clone(){return new zn(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(){}insertText(){}insertNodes(e,t){let n=this.getNodes(),r=n.length;var i=n[r-1];if(An(i))i=i.select();else{let e=i.getIndexWithinParent()+1;i=i.getParentOrThrow().select(e,e)}for(i.insertNodes(e,t),e=0;ed||c>f;){if(ad)for(g=f-r,d+=1,p=0;p<=g;p++)e(i[r+p][d]);if(c>f)for(g=d-n,f+=1,p=0;p<=g;p++)e(i[f][n+p])}for(t=[t],n=null,r=s;r<=c;r++)for(d=a;d<=u;d++)({cell:f}=i[r][d]),Qr(g=f.getParent())||F(107),g!==n&&t.push(g),t.push(f,...ut(f)),n=g;return _r()||(this._cachedNodes=t),t}getTextContent(){let e=this.getNodes(),t="";for(let n=0;ns?s:a,n=o.splitText(e,a>s?a:s),null!=(e=0===e?n[0]:n[1])?[e]:[]):[o]:(t=r.isBefore(i),An(o)&&((r=t?a:s)===o.getTextContentSize()?e.shift():0!==r&&([,o]=o.splitText(r),e[0]=o)),An(l)&&(o=l.getTextContent().length,0===(t=t?s:a)?e.pop():t!==o&&([l]=l.splitText(t),e[n]=l)),e)}modify(e,t,n){var r=this.focus,i=this.anchor,o="move"===e,l=Ge(r,t);if(Ar(l)&&!l.isIsolated())o&&l.isKeyboardSelectable()?((t=tr()).add(l.__key),Le(t)):An(e=t?l.getPreviousSibling():l.getNextSibling())?(l=e.__key,t=t?e.getTextContent().length:0,r.set(l,t,"text"),o&&i.set(l,t,"text")):(n=l.getParentOrThrow(),Mr(e)?(n=e.__key,l=t?e.getChildrenSize():0):(l=l.getIndexWithinParent(),n=n.__key,t||l++),r.set(n,l,"element"),o&&i.set(n,l,"element"));else if(r=lt((i=br())._window)){var a=i._blockCursorElement,s=i._rootElement;if(null===s||null===a||!Mr(l)||l.isInline()||l.canBeEmpty()||ot(a,i,s),r.modify(e,t?"backward":"forward",n),0n||a){r.splice(e,1),a&&(l=void 0);break}}""===(t=r.join("").trim())?e.remove():(e.setTextContent(t),e.select(l,l))}function qn(e,t,n,r){var i=t;if(1===e.nodeType){let a=!1;var o=e.childNodes,l=o.length;i===l&&(a=!0,i=l-1);let s=o[i];if(l=!1,s===r._blockCursorElement?(s=o[i+1],l=!0):null!==r._blockCursorElement&&i--,An(r=Ie(s)))i=a?r.getTextContentSize():0;else{if(null===(o=Ie(e)))return null;if(Mr(o)?((t=Mr(e=o.getChildAtIndex(i)))&&(t=e.getParent(),t=null===n||null===t||!t.canBeEmpty()||t!==n.getNode()),t&&(null===(n=a?e.getLastDescendant():e.getFirstDescendant())?(o=e,i=0):o=Mr(e=n)?e:e.getParentOrThrow()),An(e)?(r=e,o=null,i=a?e.getTextContentSize():0):e!==o&&a&&!l&&i++):(i=o.getIndexWithinParent(),i=0===t&&Ar(o)&&Ie(e)===o?i:i+1,o=o.getParentOrThrow()),Mr(o))return new $n(o.__key,i,"element")}}else r=Ie(e);return An(r)?new $n(r.__key,i,"text"):null}function Qn(e,t,n){var r=e.offset,i=e.getNode();0===r?(r=i.getPreviousSibling(),i=i.getParent(),t?(n||!t)&&null===r&&Mr(i)&&i.isInline()&&An(t=i.getPreviousSibling())&&(e.key=t.__key,e.offset=t.getTextContent().length):Mr(r)&&!n&&r.isInline()?(e.key=r.__key,e.offset=r.getChildrenSize(),e.type="element"):An(r)&&(e.key=r.__key,e.offset=r.getTextContent().length)):r===i.getTextContent().length&&(r=i.getNextSibling(),i=i.getParent(),t&&Mr(r)&&r.isInline()?(e.key=r.__key,e.offset=0,e.type="element"):(n||t)&&null===r&&Mr(i)&&i.isInline()&&!i.canInsertTextAfter()&&An(t=i.getNextSibling())&&(e.key=t.__key,e.offset=0))}function Jn(e,t,n){if("text"===e.type&&"text"===t.type){var r=e.isBefore(t);let i=e.is(t);Qn(e,r,i),Qn(t,!r,i),i&&(t.key=e.key,t.offset=e.offset,t.type=e.type),(r=br()).isComposing()&&r._compositionKey!==e.key&&Bn(n)&&(r=n.anchor,n=n.focus,Fn(e,r.key,r.offset,r.type),Fn(t,n.key,n.offset,n.type))}}function Xn(e,t,n,r,i,o){return null!==e&&null!==n&&ve(i,e,n)?null===(t=qn(e,t,Bn(o)?o.anchor:null,i))||null===(r=qn(n,r,Bn(o)?o.focus:null,i))||"element"===t.type&&"element"===r.type&&(e=Ie(e),n=Ie(n),Ar(e)&&Ar(n))?null:(Jn(t,r,o),[t,r]):null}function Zn(e){return Mr(e)&&!e.isInline()}function er(e,t,n,r,i,o){let l=vr();return(e=new Hn(new $n(e,t,i),new $n(n,r,o),0,"")).dirty=!0,l._selection=e}function tr(){return new zn(new Set)}function nr(e,t,n){var r=n._window;if(null===r)return null;var i=r.event,o=i?i.type:void 0;let l;if(r="selectionchange"===o,i=!ie&&(r||"beforeinput"===o||"compositionstart"===o||"compositionend"===o||"click"===o&&i&&3===i.detail||"drop"===o||void 0===o),Bn(e)&&!i)return e.clone();if(null===t)return null;if(i=t.anchorNode,o=t.focusNode,l=t.anchorOffset,t=t.focusOffset,r&&Bn(e)&&!ve(n,i,o))return e.clone();if(null===(n=Xn(i,l,o,t,n,e)))return null;let[a,s]=n;return new Hn(a,s,Bn(e)?e.format:0,Bn(e)?e.style:"")}function rr(){return vr()._selection}function ir(){return br()._editorState._selection}function or(e,t,n,r=1){var i=e.anchor,o=e.focus,l=i.getNode(),a=o.getNode();if(t.is(l)||t.is(a)){if(l=t.__key,e.isCollapsed())(n<=(t=i.offset)&&0r)&&(n=Math.max(0,t+r),i.set(l,n,"element"),o.set(l,n,"element"),lr(e));else{let u=e.isBackward();var s=(a=u?o:i).getNode();o=(i=u?i:o).getNode(),t.is(s)&&(n<=(s=a.offset)&&0r)&&a.set(l,Math.max(0,s+r),"element"),t.is(o)&&(n<=(t=i.offset)&&0r)&&i.set(l,Math.max(0,t+r),"element")}lr(e)}}function lr(e){var t=e.anchor,n=t.offset;let r=e.focus;var i=r.offset,o=t.getNode(),l=r.getNode();if(e.isCollapsed())Mr(o)&&An(l=(i=n>=(l=o.getChildrenSize()))?o.getChildAtIndex(l-1):o.getChildAtIndex(n))&&(n=0,i&&(n=l.getTextContentSize()),t.set(l.__key,n,"text"),r.set(l.__key,n,"text"));else{if(Mr(o)){let r=o.getChildrenSize();An(n=(e=n>=r)?o.getChildAtIndex(r-1):o.getChildAtIndex(n))&&(o=0,e&&(o=n.getTextContentSize()),t.set(n.__key,o,"text"))}Mr(l)&&An(i=(t=i>=(n=l.getChildrenSize()))?l.getChildAtIndex(n-1):l.getChildAtIndex(i))&&(l=0,t&&(l=i.getTextContentSize()),r.set(i.__key,l,"text"))}}function ar(e,t,n,r,i){let o=null,l=0,a=null;null!==r?(o=r.__key,An(r)?(l=r.getTextContentSize(),a="text"):Mr(r)&&(l=r.getChildrenSize(),a="element")):null!==i&&(o=i.__key,An(i)?a="text":Mr(i)&&(a="element")),null!==o&&null!==a?e.set(o,l,a):(l=t.getIndexWithinParent(),-1===l&&(l=n.getChildrenSize()),e.set(n.__key,l,"element"))}function sr(e,t,n,r,i){"text"===e.type?(e.key=n,t||(e.offset+=i)):e.offset>r.getIndexWithinParent()&&--e.offset}function ur(e,t,n){let r=[],i=null,o=null;e=e.getChildren();for(let c=0;cH&&(n=G-H),0!==n)if(t)o.scrollBy(0,n);else{let e=Y.scrollTop;Y.scrollTop+=n;let t=Y.scrollTop-e;W-=t,G-=t}if(t)break;Y=Qe(Y)}}}Qt=!0}}else null!==a&&ve(e,t,n)&&k.removeAllRanges()}}e:{let t=e._blockCursorElement;if(Bn(s)&&s.isCollapsed()&&"element"===s.anchor.type&&i.contains(document.activeElement)){let n=s.anchor,r=n.getNode(),o=n.offset,l=r.getChildrenSize(),a=!1,u=null;if(o===l)it(r.getChildAtIndex(o-1))&&(a=!0);else{let t=r.getChildAtIndex(o);if(it(t)){let n=t.getPreviousSibling();(null===n||it(n))&&(a=!0,u=e.getElementByKey(t.__key))}}if(a){let n=e.getElementByKey(r.__key);if(null===t){let n=e._config.theme,r=document.createElement("div");r.contentEditable="false",r.setAttribute("data-lexical-cursor","true");let i=n.blockCursor;if(void 0!==i){if("string"==typeof i){let e=i.split(" ");i=n.blockCursor=e}void 0!==i&&r.classList.add(...i)}e._blockCursorElement=t=r}i.style.caretColor="transparent",null===u?n.appendChild(t):n.insertBefore(t,u);break e}}null!==t&&ot(t,e,i)}null!==p&&p.observe(i,mr)}finally{fr=f,dr=c}}if(null!==h){var V=h;let t=Array.from(e._listeners.mutation),n=t.length;for(let e=0;e{r=Tr(e,t,n)})),r}let r=ze(e);for(let o=4;0<=o;o--)for(let l=0;l{Cr(e)})):(l._flushSync=!1,a&&(r.clear(),e._deferred=[],e._pendingEditorState=null))}function Or(e,t,n){e._updating?e._updates.push([t,n]):wr(e,t,n)}class Rr extends dn{constructor(e){super(e)}decorate(){F(47)}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function Ar(e){return e instanceof Rr}class Dr extends dn{constructor(e){super(e),this.__last=this.__first=null,this.__indent=this.__format=this.__size=0,this.__dir=null}getFormat(){return this.getLatest().__format}getFormatType(){let e=this.getFormat();return te[e]||""}getIndent(){return this.getLatest().__indent}getChildren(){let e=[],t=this.getFirstChild();for(;null!==t;)e.push(t),t=t.getNextSibling();return e}getChildrenKeys(){let e=[],t=this.getFirstChild();for(;null!==t;)e.push(t.__key),t=t.getNextSibling();return e}getChildrenSize(){return this.getLatest().__size}isEmpty(){return 0===this.getChildrenSize()}isDirty(){let e=br()._dirtyElements;return null!==e&&e.has(this.__key)}isLastChild(){let e=this.getLatest(),t=this.getParentOrThrow().getLastChild();return null!==t&&t.is(e)}getAllTextNodes(){let e=[],t=this.getFirstChild();for(;null!==t;){if(An(t)&&e.push(t),Mr(t)){let n=t.getAllTextNodes();e.push(...n)}t=t.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;null!==e;){if(Mr(e)){let t=e.getFirstChild();if(null!==t){e=t;continue}}break}return e}getLastDescendant(){let e=this.getLastChild();for(;null!==e;){if(Mr(e)){let t=e.getLastChild();if(null!==t){e=t;continue}}break}return e}getDescendantByIndex(e){let t=this.getChildren(),n=t.length;return e>=n?Mr(e=t[n-1])&&e.getLastDescendant()||e||null:Mr(e=t[e])&&e.getFirstDescendant()||e||null}getFirstChild(){let e=this.getLatest().__first;return null===e?null:Re(e)}getFirstChildOrThrow(){let e=this.getFirstChild();return null===e&&F(45,this.__key),e}getLastChild(){let e=this.getLatest().__last;return null===e?null:Re(e)}getLastChildOrThrow(){let e=this.getLastChild();return null===e&&F(96,this.__key),e}getChildAtIndex(e){var t=this.getChildrenSize();let n;if(e=e;){if(t===e)return n;n=n.getPreviousSibling(),t--}return null}getTextContent(){let e="",t=this.getChildren(),n=t.length;for(let r=0;re.remove())),e}append(...e){return this.splice(this.getChildrenSize(),0,e)}setDirection(e){let t=this.getWritable();return t.__dir=e,t}setFormat(e){return this.getWritable().__format=""!==e?ee[e]:0,this}setIndent(e){return this.getWritable().__indent=e,this}splice(e,t,n){let r=n.length,i=this.getChildrenSize(),o=this.getWritable(),l=o.__key;var a=[],s=[];let u=this.getChildAtIndex(e+t),c=null,d=i-t+r;if(0!==e)if(e===i)c=this.getLastChild();else{var f=this.getChildAtIndex(e);null!==f&&(c=f.getPreviousSibling())}if(0({root:Fr(Pe())})))}}class Br extends Dr{static getType(){return"paragraph"}static clone(e){return new Br(e.__key)}createDOM(e){let t=document.createElement("p");return void 0!==(e=Ke(e.theme,"paragraph"))&&t.classList.add(...e),t}updateDOM(){return!1}static importDOM(){return{p:()=>({conversion:jr,priority:0})}}exportDOM(e){if(({element:e}=super.exportDOM(e)),e&&ct(e)){this.isEmpty()&&e.append(document.createElement("br"));var t=this.getFormatType();e.style.textAlign=t,(t=this.getDirection())&&(e.dir=t),0<(t=this.getIndent())&&(e.style.textIndent=20*t+"px")}return{element:e}}static importJSON(e){let t=Ur();return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}exportJSON(){return{...super.exportJSON(),type:"paragraph",version:1}}insertNewAfter(e,t){e=Ur();let n=this.getDirection();return e.setDirection(n),this.insertAfter(e,t),e}collapseAtStart(){let e=this.getChildren();if(0===e.length||An(e[0])&&""===e[0].getTextContent().trim()){if(null!==this.getNextSibling())return this.selectNext(),this.remove(),!0;if(null!==this.getPreviousSibling())return this.selectPrevious(),this.remove(),!0}return!1}}function jr(e){let t=Ur();return e.style&&(t.setFormat(e.style.textAlign),0<(e=parseInt(e.style.textIndent,10)/20)&&t.setIndent(e)),{node:t}}function Ur(){return nt(new Br)}function Kr(e,t,n,r){let i=e._keyToDOMMap;i.clear(),e._editorState=Ir(),e._pendingEditorState=r,e._compositionKey=null,e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),e._normalizedNodes=new Set,e._updateTags=new Set,e._updates=[],e._blockCursorElement=null,null!==(r=e._observer)&&(r.disconnect(),e._observer=null),null!==t&&(t.textContent=""),null!==n&&(n.textContent="",i.set("root",n))}class Hr{constructor(e,t,n,r,i,o,l){this._parentEditor=t,this._rootElement=null,this._editorState=e,this._compositionKey=this._pendingEditorState=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=r,this._nodes=n,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=Be(),this._onError=i,this._htmlConversions=o,this._editable=l,this._headless=null!==t&&t._headless,this._blockCursorElement=this._window=null}isComposing(){return null!=this._compositionKey}registerUpdateListener(e){let t=this._listeners.update;return t.add(e),()=>{t.delete(e)}}registerEditableListener(e){let t=this._listeners.editable;return t.add(e),()=>{t.delete(e)}}registerDecoratorListener(e){let t=this._listeners.decorator;return t.add(e),()=>{t.delete(e)}}registerTextContentListener(e){let t=this._listeners.textcontent;return t.add(e),()=>{t.delete(e)}}registerRootListener(e){let t=this._listeners.root;return e(this._rootElement,null),t.add(e),()=>{e(null,this._rootElement),t.delete(e)}}registerCommand(e,t,n){void 0===n&&F(35);let r=this._commands;r.has(e)||r.set(e,[new Set,new Set,new Set,new Set,new Set]);let i=r.get(e);void 0===i&&F(36,String(e));let o=i[n];return o.add(t),()=>{o.delete(t),i.every((e=>0===e.size))&&r.delete(e)}}registerMutationListener(e,t){void 0===this._nodes.get(e.getType())&&F(37,e.name);let n=this._listeners.mutation;return n.set(t,e),()=>{n.delete(t)}}registerNodeTransformToKlass(e,t){var n=e.getType();return void 0===(n=this._nodes.get(n))&&F(37,e.name),n.transforms.add(t),n}registerNodeTransform(e,t){var n=this.registerNodeTransformToKlass(e,t);let r=[n];return null!=(n=n.replaceWithKlass)&&(n=this.registerNodeTransformToKlass(n,t),r.push(n)),function(e,t){Or(e,(()=>{var e=vr();if(!e.isEmpty())if("root"===t)Pe().markDirty();else{e=e._nodeMap;for(let[,t]of e)t.markDirty()}}),null===e._pendingEditorState?{tag:"history-merge"}:void 0)}(this,e.getType()),()=>{r.forEach((e=>e.transforms.delete(t)))}}hasNode(e){return this._nodes.has(e.getType())}hasNodes(e){return e.every(this.hasNode.bind(this))}dispatchCommand(e,t){return Tr(this,e,t)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(e){let t=this._rootElement;if(e!==t){let o=Ke(this._config.theme,"root");var n=this._pendingEditorState||this._editorState;if(this._rootElement=e,Kr(this,t,e,n),null!==t){if(!this._config.disableEvents){0!==qt&&(qt--,0===qt&&t.ownerDocument.removeEventListener("selectionchange",un));var r=t.__lexicalEditor;if(null!=r){if(null!==r._parentEditor){var i=ze(r);i=i[i.length-1]._key,sn.get(i)===r&&sn.delete(i)}else sn.delete(r._key);t.__lexicalEditor=null}for(r=an(t),i=0;i{!0!==e._lexicalHandled&&(e._lexicalHandled=!0,t.isEditable()&&o(e,t))}:e=>{if(!0!==e._lexicalHandled&&(e._lexicalHandled=!0,t.isEditable()))switch(i){case"cut":return Tr(t,M,e);case"copy":return Tr(t,D,e);case"paste":return Tr(t,s,e);case"dragstart":return Tr(t,O,e);case"dragover":return Tr(t,R,e);case"dragend":return Tr(t,A,e);case"focus":return Tr(t,P,e);case"blur":return Tr(t,L,e);case"drop":return Tr(t,w,e)}};e.addEventListener(i,l),n.push((()=>{e.removeEventListener(i,l)}))}}(e,this),null!=o&&e.classList.add(...o)):(this._editorState=n,this._window=this._pendingEditorState=null),Sr("root",this,!1,e,t)}}getElementByKey(e){return this._keyToDOMMap.get(e)||null}getEditorState(){return this._editorState}setEditorState(e,t){e.isEmpty()&&F(38),ue(this);let n=this._pendingEditorState,r=this._updateTags;t=void 0!==t?t.tag:null,null===n||n.isEmpty()||(null!=t&&r.add(t),Cr(this)),this._pendingEditorState=e,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,null!=t&&r.add(t),Cr(this)}parseEditorState(e,t){e="string"==typeof e?JSON.parse(e):e;let n=Ir(),r=dr,i=gr,o=fr,l=this._dirtyElements,a=this._dirtyLeaves,s=this._cloneNotNeeded,u=this._dirtyType;this._dirtyElements=new Map,this._dirtyLeaves=new Set,this._cloneNotNeeded=new Set,this._dirtyType=0,dr=n,gr=!1,fr=this;try{Nr(e.root,this._nodes),t&&t(),n._readOnly=!0}catch(e){e instanceof Error&&this._onError(e)}finally{this._dirtyElements=l,this._dirtyLeaves=a,this._cloneNotNeeded=s,this._dirtyType=u,dr=r,gr=i,fr=o}return n}update(e,t){Or(this,e,t)}focus(e,t={}){let n=this._rootElement;null!==n&&(n.setAttribute("autocapitalize","off"),Or(this,(()=>{let e=rr(),n=Pe();null!==e?e.dirty=!0:0!==n.getChildrenSize()&&("rootStart"===t.defaultSelection?n.selectStart():n.selectEnd())}),{onUpdate:()=>{n.removeAttribute("autocapitalize"),e&&e()},tag:"focus"}),null===this._pendingEditorState&&n.removeAttribute("autocapitalize"))}blur(){var e=this._rootElement;null!==e&&e.blur(),null!==(e=lt(this._window))&&e.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,Sr("editable",this,!0,e))}toJSON(){return{editorState:this._editorState.toJSON()}}}class Wr extends Dr{constructor(e,t){super(t),this.__colSpan=e,this.__rowSpan=1}exportJSON(){return{...super.exportJSON(),colSpan:this.__colSpan,rowSpan:this.__rowSpan}}getColSpan(){return this.__colSpan}setColSpan(e){return this.getWritable().__colSpan=e,this}getRowSpan(){return this.__rowSpan}setRowSpan(e){return this.getWritable().__rowSpan=e,this}}function Gr(e){return e instanceof Wr}class Yr extends Dr{}function Vr(e){return e instanceof Yr}class qr extends Dr{}function Qr(e){return e instanceof qr}t.$addUpdateTag=function(e){yr(),br()._updateTags.add(e)},t.$applyNodeReplacement=nt,t.$copyNode=tt,t.$createLineBreakNode=pn,t.$createNodeSelection=tr,t.$createParagraphNode=Ur,t.$createRangeSelection=function(){let e=new $n("root",0,"element"),t=new $n("root",0,"element");return new Hn(e,t,0,"")},t.$createTabNode=Mn,t.$createTextNode=Rn,t.$getAdjacentNode=Ge,t.$getNearestNodeFromDOMNode=De,t.$getNearestRootOrShadowRoot=Ze,t.$getNodeByKey=Re,t.$getPreviousSelection=ir,t.$getRoot=Pe,t.$getSelection=rr,t.$getTextContent=function(){let e=rr();return null===e?"":e.getTextContent()},t.$hasAncestor=Je,t.$hasUpdateTag=function(e){return br()._updateTags.has(e)},t.$insertNodes=function(e,t){let n=rr()||ir();return null===n&&(n=Pe().selectEnd()),n.insertNodes(e,t)},t.$isBlockElementNode=Zn,t.$isDecoratorNode=Ar,t.$isElementNode=Mr,t.$isInlineElementOrDecoratorNode=function(e){return Mr(e)&&e.isInline()||Ar(e)&&e.isInline()},t.$isLeafNode=Ce,t.$isLineBreakNode=hn,t.$isNodeSelection=Wn,t.$isParagraphNode=function(e){return e instanceof Br},t.$isRangeSelection=Bn,t.$isRootNode=Lr,t.$isRootOrShadowRoot=et,t.$isTabNode=function(e){return e instanceof Dn},t.$isTextNode=An,t.$nodesOfType=function(e){var t=vr();let n=t._readOnly,r=e.getType();t=t._nodeMap;let i=[];for(let[,o]of t)o instanceof e&&o.__type===r&&(n||o.isAttached())&&i.push(o);return i},t.$normalizeSelection__EXPERIMENTAL=pe,t.$parseSerializedNode=function(e){return Nr(e,br()._nodes)},t.$selectAll=function(){var e=Pe();Le(pe(e=e.select(0,e.getChildrenSize())))},t.$setCompositionKey=we,t.$setSelection=Le,t.$splitNode=at,t.BLUR_COMMAND=L,t.CAN_REDO_COMMAND={},t.CAN_UNDO_COMMAND={},t.CLEAR_EDITOR_COMMAND={},t.CLEAR_HISTORY_COMMAND={},t.CLICK_COMMAND=r,t.COMMAND_PRIORITY_CRITICAL=4,t.COMMAND_PRIORITY_EDITOR=0,t.COMMAND_PRIORITY_HIGH=3,t.COMMAND_PRIORITY_LOW=1,t.COMMAND_PRIORITY_NORMAL=2,t.CONTROLLED_TEXT_INSERTION_COMMAND=a,t.COPY_COMMAND=D,t.CUT_COMMAND=M,t.DELETE_CHARACTER_COMMAND=i,t.DELETE_LINE_COMMAND=d,t.DELETE_WORD_COMMAND=c,t.DEPRECATED_$computeGridMap=ur,t.DEPRECATED_$createGridSelection=function(){let e=new $n("root",0,"element"),t=new $n("root",0,"element");return new Un("root",e,t)},t.DEPRECATED_$getGridCellNodeRect=jn,t.DEPRECATED_$getNodeTriplet=cr,t.DEPRECATED_$isGridCellNode=Gr,t.DEPRECATED_$isGridNode=Vr,t.DEPRECATED_$isGridRowNode=Qr,t.DEPRECATED_$isGridSelection=Kn,t.DEPRECATED_GridCellNode=Wr,t.DEPRECATED_GridNode=Yr,t.DEPRECATED_GridRowNode=qr,t.DRAGEND_COMMAND=A,t.DRAGOVER_COMMAND=R,t.DRAGSTART_COMMAND=O,t.DROP_COMMAND=w,t.DecoratorNode=Rr,t.ElementNode=Dr,t.FOCUS_COMMAND=P,t.FORMAT_ELEMENT_COMMAND={},t.FORMAT_TEXT_COMMAND=f,t.INDENT_CONTENT_COMMAND={},t.INSERT_LINE_BREAK_COMMAND=o,t.INSERT_PARAGRAPH_COMMAND=l,t.INSERT_TAB_COMMAND={},t.KEY_ARROW_DOWN_COMMAND=x,t.KEY_ARROW_LEFT_COMMAND=y,t.KEY_ARROW_RIGHT_COMMAND=m,t.KEY_ARROW_UP_COMMAND=b,t.KEY_BACKSPACE_COMMAND=C,t.KEY_DELETE_COMMAND=T,t.KEY_DOWN_COMMAND=h,t.KEY_ENTER_COMMAND=N,t.KEY_ESCAPE_COMMAND=S,t.KEY_MODIFIER_COMMAND=I,t.KEY_SPACE_COMMAND=E,t.KEY_TAB_COMMAND=k,t.LineBreakNode=fn,t.MOVE_TO_END=_,t.MOVE_TO_START=v,t.OUTDENT_CONTENT_COMMAND={},t.PASTE_COMMAND=s,t.ParagraphNode=Br,t.REDO_COMMAND=p,t.REMOVE_TEXT_COMMAND=u,t.RootNode=Pr,t.SELECTION_CHANGE_COMMAND=n,t.SELECT_ALL_COMMAND=$,t.TabNode=Dn,t.TextNode=xn,t.UNDO_COMMAND=g,t.createCommand=function(){return{}},t.createEditor=function(e){var t=e||{},n=fr,r=t.theme||{};let i=void 0===e?n:t.parentEditor||null,o=t.disableEvents||!1,l=Ir(),a=t.namespace||(null!==i?i._config.namespace:Be()),s=t.editorState,u=[Pr,xn,fn,Dn,Br,...t.nodes||[]],c=t.onError;if(t=void 0===t.editable||t.editable,void 0===e&&null!==n)e=n._nodes;else for(e=new Map,n=0;n{if(null!=(e=null!=e.klass.importDOM?e.klass.importDOM.bind(e.klass):null)&&!n.has(e)){n.add(e);var r=e();null!==r&&Object.keys(r).forEach((e=>{let n=t.get(e);void 0===n&&(n=[],t.set(e,n)),n.push(r[e])}))}})),t}(e),t),void 0!==s&&(r._pendingEditorState=s,r._dirtyType=2),r},t.getNearestEditorFromDOMNode=be,t.isHTMLAnchorElement=function(e){return ct(e)&&"A"===e.tagName},t.isHTMLElement=ct,t.isSelectionCapturedInDecoratorInput=ye,t.isSelectionWithinEditor=ve},4279:()=>{Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}}),Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete Prism.languages.c.boolean},5433:()=>{Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}},2731:()=>{!function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!)\w+(?:\s*\.\s*\w+)*\b/.source.replace(//g,(function(){return t.source}));e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!)\w+/.source.replace(//g,(function(){return t.source}))),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/(?:\s*:\s*)?|:\s*/.source.replace(//g,(function(){return n}))+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(Prism)},6102:()=>{!function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(Prism)},2503:()=>{!function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[r,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:r.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:r.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:r.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:r.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(//g,(function(){return t.source}))),lookbehind:!0,inside:{punctuation:/\./}}})}(Prism)},9980:()=>{Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),Prism.languages.js=Prism.languages.javascript},4064:()=>{!function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(//g,(function(){return t})),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,(function(){return r})),o=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+o+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+o+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+o+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~))+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach((function(t){["url","bold","italic","strike","code-snippet"].forEach((function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])}))})),e.hooks.add("after-tokenize",(function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n",quot:'"'},s=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(Prism)},4335:()=>{Prism.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^$)/i,lookbehind:!0,inside:Prism.languages[t]},n.cdata=/^$/i;var r={"included-cdata":{pattern://i,inside:n}};r["language-"+t]={pattern:/[\s\S]+/,inside:Prism.languages[t]};var i={};i[e]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:r},Prism.languages.insertBefore("markup","cdata",i)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(e,t){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:Prism.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml},1426:()=>{Prism.languages.objectivec=Prism.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete Prism.languages.objectivec["class-name"],Prism.languages.objc=Prism.languages.objectivec},366:()=>{Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python},767:()=>{!function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|)*\*\//.source,n=0;n<2;n++)t=t.replace(//g,(function(){return t}));t=t.replace(//g,(function(){return/[^\s\S]/.source})),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(Prism)},5266:()=>{Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/}},874:()=>{Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ \t]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},Prism.languages.swift["string-literal"].forEach((function(e){e.inside.interpolation.inside=Prism.languages.swift}))},6836:()=>{!function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(Prism)},5660:(e,t,n)=>{var r=function(e){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,r={},i={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof o?new o(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/=d.reach);E+=N.value.length,N=N.next){var C=N.value;if(t.length>e.length)return;if(!(C instanceof o)){var S,T=1;if(y){if(!(S=l(x,E,e,_))||S.index>=e.length)break;var k=S.index,w=S.index+S[0].length,O=E;for(O+=N.value.length;k>=O;)O+=(N=N.next).value.length;if(E=O-=N.value.length,N.value instanceof o)continue;for(var R=N;R!==t.tail&&(Od.reach&&(d.reach=$);var P=N.prev;if(D&&(P=u(t,P,D),E+=D.length),c(t,P,T),N=u(t,P,new o(f,m?i.tokenize(A,m):A,v,A)),M&&u(t,N,M),T>1){var L={cause:f+","+p,reach:$};a(e,t,n,N.prev,E,L),d&&L.reach>d.reach&&(d.reach=L.reach)}}}}}}function s(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function u(e,t,n){var r=t.next,i={value:n,prev:t,next:r};return t.next=i,r.prev=i,e.length++,i}function c(e,t,n){for(var r=t.next,i=0;i"+o.content+""},!e.document)return e.addEventListener?(i.disableWorkerMessageHandler||e.addEventListener("message",(function(t){var n=JSON.parse(t.data),r=n.language,o=n.code,l=n.immediateClose;e.postMessage(i.highlight(o,i.languages[r],r)),l&&e.close()}),!1),i):i;var d=i.util.currentScript();function f(){i.manual||i.highlightAll()}if(d&&(i.filename=d.src,d.hasAttribute("data-manual")&&(i.manual=!0)),!i.manual){var g=document.readyState;"loading"===g||"interactive"===g&&d&&d.defer?document.addEventListener("DOMContentLoaded",f):window.requestAnimationFrame?window.requestAnimationFrame(f):window.setTimeout(f,16)}return i}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});e.exports&&(e.exports=r),void 0!==n.g&&(n.g.Prism=r),r.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},r.languages.markup.tag.inside["attr-value"].inside.entity=r.languages.markup.entity,r.languages.markup.doctype.inside["internal-subset"].inside=r.languages.markup,r.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(r.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^$)/i,lookbehind:!0,inside:r.languages[t]},n.cdata=/^$/i;var i={"included-cdata":{pattern://i,inside:n}};i["language-"+t]={pattern:/[\s\S]+/,inside:r.languages[t]};var o={};o[e]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:i},r.languages.insertBefore("markup","cdata",o)}}),Object.defineProperty(r.languages.markup.tag,"addAttribute",{value:function(e,t){r.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:r.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),r.languages.html=r.languages.markup,r.languages.mathml=r.languages.markup,r.languages.svg=r.languages.markup,r.languages.xml=r.languages.extend("markup",{}),r.languages.ssml=r.languages.xml,r.languages.atom=r.languages.xml,r.languages.rss=r.languages.xml,function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(r),r.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},r.languages.javascript=r.languages.extend("clike",{"class-name":[r.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),r.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,r.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:r.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:r.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:r.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:r.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:r.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),r.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:r.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),r.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),r.languages.markup&&(r.languages.markup.tag.addInlined("script","javascript"),r.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),r.languages.js=r.languages.javascript,function(){if(void 0!==r&&"undefined"!=typeof document){Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var e={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},t="data-src-status",n="loading",i="loaded",o="pre[data-src]:not(["+t+'="'+i+'"]):not(['+t+'="'+n+'"])';r.hooks.add("before-highlightall",(function(e){e.selector+=", "+o})),r.hooks.add("before-sanity-check",(function(l){var a=l.element;if(a.matches(o)){l.code="",a.setAttribute(t,n);var s=a.appendChild(document.createElement("CODE"));s.textContent="Loading…";var u=a.getAttribute("data-src"),c=l.language;if("none"===c){var d=(/\.(\w+)$/.exec(u)||[,"none"])[1];c=e[d]||d}r.util.setLanguage(s,c),r.util.setLanguage(a,c);var f=r.plugins.autoloader;f&&f.loadLanguages(c),function(e,n,o){var l=new XMLHttpRequest;l.open("GET",e,!0),l.onreadystatechange=function(){4==l.readyState&&(l.status<400&&l.responseText?function(e){a.setAttribute(t,i);var n=function(e){var t=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(e||"");if(t){var n=Number(t[1]),r=t[2],i=t[3];return r?i?[n,Number(i)]:[n,void 0]:[n,n]}}(a.getAttribute("data-range"));if(n){var o=e.split(/\r\n?|\n/g),l=n[0],u=null==n[1]?o.length:n[1];l<0&&(l+=o.length),l=Math.max(0,Math.min(l-1,o.length)),u<0&&(u+=o.length),u=Math.max(0,Math.min(u,o.length)),e=o.slice(l,u).join("\n"),a.hasAttribute("data-start")||a.setAttribute("data-start",String(l+1))}s.textContent=e,r.highlightElement(s)}(l.responseText):l.status>=400?o("✖ Error "+l.status+" while fetching file: "+l.statusText):o("✖ Error: File does not exist or is empty"))},l.send(null)}(u,0,(function(e){a.setAttribute(t,"failed"),s.textContent=e}))}})),r.plugins.fileHighlight={highlight:function(e){for(var t,n=(e||document).querySelectorAll(o),i=0;t=n[i++];)r.highlightElement(t)}};var l=!1;r.fileHighlight=function(){l||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),l=!0),r.plugins.fileHighlight.highlight.apply(this,arguments)}}}()},4448:(e,t,n)=>{"use strict";var r=n(7294),i=n(3840);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n