reactjs-tiptap-editor 0.3.30 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -2
- package/lib/{ActionMenuButton-wiDnIxE2.cjs → ActionMenuButton-CYdM1xx5.cjs} +1 -1
- package/lib/{ActionMenuButton-B6fitGKu.js → ActionMenuButton-DKRF6oa0.js} +5 -5
- package/lib/Attachment.cjs +2 -2
- package/lib/Attachment.d.cts +47 -51
- package/lib/Attachment.d.ts +47 -51
- package/lib/Attachment.js +7 -6
- package/lib/BaseKit.cjs +3 -0
- package/lib/BaseKit.d.cts +481 -0
- package/lib/BaseKit.d.ts +481 -0
- package/lib/BaseKit.js +132 -0
- package/lib/Blockquote.cjs +5 -1
- package/lib/Blockquote.d.cts +47 -51
- package/lib/Blockquote.d.ts +47 -51
- package/lib/Blockquote.js +33 -17
- package/lib/Bold.cjs +1 -1
- package/lib/Bold.d.cts +47 -51
- package/lib/Bold.d.ts +47 -51
- package/lib/Bold.js +23 -16
- package/lib/BulletList.cjs +1 -1
- package/lib/BulletList.d.cts +48 -52
- package/lib/BulletList.d.ts +48 -52
- package/lib/BulletList.js +11 -57
- package/lib/Clear.cjs +1 -1
- package/lib/Clear.d.cts +47 -51
- package/lib/Clear.d.ts +47 -51
- package/lib/Clear.js +4 -2
- package/lib/Code.cjs +1 -1
- package/lib/Code.d.cts +47 -51
- package/lib/Code.d.ts +47 -51
- package/lib/Code.js +29 -25
- package/lib/CodeBlock.cjs +2 -2
- package/lib/CodeBlock.d.cts +47 -51
- package/lib/CodeBlock.d.ts +47 -51
- package/lib/CodeBlock.js +5 -4
- package/lib/CodeView.cjs +1 -1
- package/lib/CodeView.d.cts +47 -51
- package/lib/CodeView.d.ts +47 -51
- package/lib/CodeView.js +3 -2
- package/lib/Color.cjs +1 -1
- package/lib/Color.d.cts +48 -52
- package/lib/Color.d.ts +48 -52
- package/lib/Color.js +42 -74
- package/lib/Document.cjs +1 -1
- package/lib/Document.d.cts +47 -51
- package/lib/Document.d.ts +47 -51
- package/lib/Document.js +4 -8
- package/lib/{Drawer-BKTU9CpU.js → Drawer-CaAfmqNo.js} +268 -265
- package/lib/Drawer-CdvCMSzN.cjs +1 -0
- package/lib/Drawer.cjs +1 -1
- package/lib/Drawer.d.cts +47 -51
- package/lib/Drawer.d.ts +47 -51
- package/lib/Drawer.js +4 -4
- package/lib/Emoji.cjs +1 -1
- package/lib/Emoji.d.cts +50 -52
- package/lib/Emoji.d.ts +50 -52
- package/lib/Emoji.js +19790 -178
- package/lib/Excalidraw-BbMQhNvs.cjs +1 -0
- package/lib/Excalidraw-CVWz2Vyn.js +290 -0
- package/lib/Excalidraw.cjs +1 -1
- package/lib/Excalidraw.d.cts +47 -51
- package/lib/Excalidraw.d.ts +47 -51
- package/lib/Excalidraw.js +3 -3
- package/lib/ExportPdf.cjs +1 -1
- package/lib/ExportPdf.d.cts +47 -51
- package/lib/ExportPdf.d.ts +47 -51
- package/lib/ExportPdf.js +4 -2
- package/lib/ExportWord.cjs +1 -1
- package/lib/ExportWord.d.cts +47 -51
- package/lib/ExportWord.d.ts +47 -51
- package/lib/ExportWord.js +22 -51
- package/lib/FontFamily.cjs +1 -1
- package/lib/FontFamily.d.cts +48 -52
- package/lib/FontFamily.d.ts +48 -52
- package/lib/FontFamily.js +46 -74
- package/lib/FontSize.cjs +1 -1
- package/lib/FontSize.d.cts +47 -51
- package/lib/FontSize.d.ts +47 -51
- package/lib/FontSize.js +11 -8
- package/lib/FormatPainter.cjs +1 -1
- package/lib/FormatPainter.d.cts +47 -51
- package/lib/FormatPainter.d.ts +47 -51
- package/lib/FormatPainter.js +4 -2
- package/lib/Heading.cjs +1 -1
- package/lib/Heading.d.cts +47 -51
- package/lib/Heading.d.ts +47 -51
- package/lib/Heading.js +77 -65
- package/lib/Highlight.cjs +1 -1
- package/lib/Highlight.d.cts +47 -51
- package/lib/Highlight.d.ts +47 -51
- package/lib/Highlight.js +5 -4
- package/lib/History.cjs +1 -1
- package/lib/History.d.cts +49 -53
- package/lib/History.d.ts +49 -53
- package/lib/History.js +39 -403
- package/lib/HorizontalRule.cjs +1 -1
- package/lib/HorizontalRule.d.cts +47 -51
- package/lib/HorizontalRule.d.ts +47 -51
- package/lib/HorizontalRule.js +16 -65
- package/lib/Iframe.cjs +1 -1
- package/lib/Iframe.d.cts +47 -51
- package/lib/Iframe.d.ts +47 -51
- package/lib/Iframe.js +4 -4
- package/lib/Image.cjs +1 -1
- package/lib/Image.d.cts +47 -51
- package/lib/Image.d.ts +47 -51
- package/lib/Image.js +3 -3
- package/lib/ImageGif.cjs +1 -1
- package/lib/ImageGif.d.cts +47 -51
- package/lib/ImageGif.d.ts +47 -51
- package/lib/ImageGif.js +5 -5
- package/lib/ImportWord.cjs +72 -72
- package/lib/ImportWord.d.cts +47 -51
- package/lib/ImportWord.d.ts +47 -51
- package/lib/ImportWord.js +5654 -5616
- package/lib/Indent.cjs +1 -1
- package/lib/Indent.d.cts +47 -51
- package/lib/Indent.d.ts +47 -51
- package/lib/Indent.js +4 -2
- package/lib/Italic.cjs +1 -1
- package/lib/Italic.d.cts +47 -51
- package/lib/Italic.d.ts +47 -51
- package/lib/Italic.js +20 -14
- package/lib/Katex.cjs +1 -1
- package/lib/Katex.d.cts +47 -51
- package/lib/Katex.d.ts +47 -51
- package/lib/Katex.js +49 -48
- package/lib/LineHeight.cjs +1 -1
- package/lib/LineHeight.d.cts +47 -51
- package/lib/LineHeight.d.ts +47 -51
- package/lib/LineHeight.js +21 -18
- package/lib/Link.cjs +1 -1
- package/lib/Link.d.cts +47 -51
- package/lib/Link.d.ts +47 -51
- package/lib/Link.js +4 -4
- package/lib/ListItem.cjs +1 -1
- package/lib/ListItem.d.cts +52 -52
- package/lib/ListItem.d.ts +52 -52
- package/lib/ListItem.js +4 -30
- package/lib/Mention.cjs +1 -1
- package/lib/Mention.d.cts +47 -51
- package/lib/Mention.d.ts +47 -51
- package/lib/Mention.js +161 -132
- package/lib/Mermaid.cjs +2 -2
- package/lib/Mermaid.d.cts +47 -51
- package/lib/Mermaid.d.ts +47 -51
- package/lib/Mermaid.js +150 -147
- package/lib/MoreMark.cjs +1 -1
- package/lib/MoreMark.d.cts +47 -51
- package/lib/MoreMark.d.ts +47 -51
- package/lib/MoreMark.js +5 -3
- package/lib/MultiColumn.cjs +1 -1
- package/lib/MultiColumn.d.cts +47 -51
- package/lib/MultiColumn.d.ts +47 -51
- package/lib/MultiColumn.js +2 -2
- package/lib/OrderedList.cjs +1 -1
- package/lib/OrderedList.d.cts +48 -52
- package/lib/OrderedList.d.ts +48 -52
- package/lib/OrderedList.js +11 -75
- package/lib/RichTextEditor-CxvwGvQG.cjs +142 -0
- package/lib/RichTextEditor-DGcKEUGr.js +22166 -0
- package/lib/SearchAndReplace.cjs +1 -1
- package/lib/SearchAndReplace.d.cts +60 -134
- package/lib/SearchAndReplace.d.ts +60 -134
- package/lib/SearchAndReplace.js +207 -194
- package/lib/Selection.cjs +1 -1
- package/lib/Selection.d.cts +47 -51
- package/lib/Selection.d.ts +47 -51
- package/lib/Selection.js +1 -1
- package/lib/SlashCommand.cjs +1 -1
- package/lib/SlashCommand.d.cts +47 -51
- package/lib/SlashCommand.d.ts +47 -51
- package/lib/SlashCommand.js +177 -222
- package/lib/Strike.cjs +1 -1
- package/lib/Strike.d.cts +47 -51
- package/lib/Strike.d.ts +47 -51
- package/lib/Strike.js +20 -14
- package/lib/SubAndSuperScript.cjs +1 -1
- package/lib/SubAndSuperScript.d.cts +47 -51
- package/lib/SubAndSuperScript.d.ts +47 -51
- package/lib/SubAndSuperScript.js +5 -3
- package/lib/Table.cjs +8 -10
- package/lib/Table.d.cts +50 -54
- package/lib/Table.d.ts +50 -54
- package/lib/Table.js +382 -2021
- package/lib/TableOfContent.cjs +1 -1
- package/lib/TableOfContent.d.cts +47 -51
- package/lib/TableOfContent.d.ts +47 -51
- package/lib/TableOfContent.js +53 -52
- package/lib/TaskList.cjs +1 -1
- package/lib/TaskList.d.cts +49 -53
- package/lib/TaskList.d.ts +49 -53
- package/lib/TaskList.js +12 -154
- package/lib/TextAlign.cjs +1 -1
- package/lib/TextAlign.d.cts +47 -51
- package/lib/TextAlign.d.ts +47 -51
- package/lib/TextAlign.js +11 -8
- package/lib/TextBubble.cjs +1 -1
- package/lib/TextBubble.d.cts +47 -51
- package/lib/TextBubble.d.ts +47 -51
- package/lib/TextBubble.js +5 -3
- package/lib/TextDirection.cjs +1 -1
- package/lib/TextDirection.d.cts +47 -51
- package/lib/TextDirection.d.ts +47 -51
- package/lib/TextDirection.js +15 -15
- package/lib/TextUnderline.cjs +1 -1
- package/lib/TextUnderline.d.cts +47 -51
- package/lib/TextUnderline.d.ts +47 -51
- package/lib/TextUnderline.js +40 -12
- package/lib/TrailingNode.cjs +1 -1
- package/lib/TrailingNode.d.cts +47 -51
- package/lib/TrailingNode.d.ts +47 -51
- package/lib/TrailingNode.js +1 -1
- package/lib/Twitter-BFULyqdR.js +1628 -0
- package/lib/Twitter-Cutpkh3h.cjs +1 -0
- package/lib/Twitter.cjs +1 -1
- package/lib/Twitter.d.cts +47 -51
- package/lib/Twitter.d.ts +47 -51
- package/lib/Twitter.js +3 -3
- package/lib/Video.cjs +1 -1
- package/lib/Video.d.cts +47 -51
- package/lib/Video.d.ts +47 -51
- package/lib/Video.js +3 -3
- package/lib/bubble-extra.cjs +2 -2
- package/lib/bubble-extra.d.cts +47 -51
- package/lib/bubble-extra.d.ts +47 -51
- package/lib/bubble-extra.js +200 -192
- package/lib/dom-dataset-_6-diIRQ.cjs +33 -0
- package/lib/dom-dataset-lYeH6gfI.js +2361 -0
- package/lib/index-5iBZLua9.cjs +12 -0
- package/lib/index-6D1J-A-o.cjs +1 -0
- package/lib/index-B96Cclrj.cjs +3 -0
- package/lib/index-BBz7Nmv9.js +55 -0
- package/lib/index-BeCTd5v2.cjs +1 -0
- package/lib/index-ByurDDMv.js +237 -0
- package/lib/index-CUogRI7j.cjs +1 -0
- package/lib/index-Ch6dBBad.js +709 -0
- package/lib/index-DF2Lp4HZ.cjs +100 -0
- package/lib/{index-LUL9mqY4.js → index-D_L6n8O8.js} +4 -4
- package/lib/index-Dbvi-Bvh.cjs +1 -0
- package/lib/index-DpCrt7xs.cjs +1 -0
- package/lib/index-DsAX1Vq8.cjs +1 -0
- package/lib/index-Dy4DlW9o.js +12 -0
- package/lib/index-J3jHHZ4d.js +200 -0
- package/lib/{index-CsK90iVd.js → index-LmrOdnen.js} +302 -389
- package/lib/index-VvXaaKe3.js +898 -0
- package/lib/index-kbO3iWqL.js +13432 -0
- package/lib/index.cjs +1 -2
- package/lib/index.d.cts +49 -251
- package/lib/index.d.ts +49 -251
- package/lib/index.js +2 -588
- package/lib/jsx-runtime-CT7Pcg-t.js +13 -0
- package/lib/jsx-runtime-C_NLcKys.cjs +1 -0
- package/lib/locale-bundle.cjs +1 -1
- package/lib/locale-bundle.d.cts +47 -51
- package/lib/locale-bundle.d.ts +47 -51
- package/lib/locale-bundle.js +1 -1
- package/lib/style.css +1 -1
- package/lib/{textarea-D5WVZMgt.cjs → textarea-DFo_aXnj.cjs} +1 -1
- package/lib/{textarea-BglwYF6b.js → textarea-aPtytkDx.js} +1 -1
- package/package.json +76 -70
- package/lib/Drawer-CmoEF-Zg.cjs +0 -1
- package/lib/Excalidraw-CM74U5tG.js +0 -289
- package/lib/Excalidraw-DAPP9qgY.cjs +0 -1
- package/lib/RichTextEditor-BQN2eLD_.js +0 -12775
- package/lib/RichTextEditor-C8Sm1E6J.cjs +0 -140
- package/lib/Twitter-CL2pu4QM.cjs +0 -17
- package/lib/Twitter-Dg6WWauX.js +0 -1743
- package/lib/dom-dataset-Byuf1YmW.cjs +0 -33
- package/lib/dom-dataset-Di3tIRrR.js +0 -1031
- package/lib/index-BI-IcZcN.cjs +0 -1
- package/lib/index-ByRfqzMr.cjs +0 -89
- package/lib/index-C1fzuXpN.js +0 -46
- package/lib/index-CbQQFj2T.js +0 -133
- package/lib/index-DI9T3iLd.js +0 -12354
- package/lib/index-D_A0TBRA.cjs +0 -1
- package/lib/index-DclQSrIx.cjs +0 -1
- package/lib/index-Z4b9rzn-.cjs +0 -1
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";const R=require("react"),ct=require("react-dom"),G=require("react/jsx-runtime"),Se=require("./index-DF2Lp4HZ.cjs");var ae={exports:{}},ve={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* use-sync-external-store-shim.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Me;function Dt(){if(Me)return ve;Me=1;var e=R;function t(c,m){return c===m&&(c!==0||1/c===1/m)||c!==c&&m!==m}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,i=e.useEffect,o=e.useLayoutEffect,s=e.useDebugValue;function a(c,m){var f=m(),g=n({inst:{value:f,getSnapshot:m}}),d=g[0].inst,p=g[1];return o(function(){d.value=f,d.getSnapshot=m,l(d)&&p({inst:d})},[c,f,m]),i(function(){return l(d)&&p({inst:d}),c(function(){l(d)&&p({inst:d})})},[c]),s(f),f}function l(c){var m=c.getSnapshot;c=c.value;try{var f=m();return!r(c,f)}catch{return!0}}function u(c,m){return m()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:a;return ve.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,ve}var ye={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* use-sync-external-store-shim.development.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var Ne;function Tt(){return Ne||(Ne=1,process.env.NODE_ENV!=="production"&&(function(){function e(f,g){return f===g&&(f!==0||1/f===1/g)||f!==f&&g!==g}function t(f,g){h||i.startTransition===void 0||(h=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var d=g();if(!c){var p=g();o(d,p)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),c=!0)}p=s({inst:{value:d,getSnapshot:g}});var v=p[0].inst,y=p[1];return l(function(){v.value=d,v.getSnapshot=g,r(v)&&y({inst:v})},[f,d,g]),a(function(){return r(v)&&y({inst:v}),f(function(){r(v)&&y({inst:v})})},[f]),u(d),d}function r(f){var g=f.getSnapshot;f=f.value;try{var d=g();return!o(f,d)}catch{return!0}}function n(f,g){return g()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var i=R,o=typeof Object.is=="function"?Object.is:e,s=i.useState,a=i.useEffect,l=i.useLayoutEffect,u=i.useDebugValue,h=!1,c=!1,m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?n:t;ye.useSyncExternalStore=i.useSyncExternalStore!==void 0?i.useSyncExternalStore:m,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),ye}var Ve;function Ce(){return Ve||(Ve=1,process.env.NODE_ENV==="production"?ae.exports=Dt():ae.exports=Tt()),ae.exports}var Ae=Ce(),Lt=Object.getOwnPropertyNames,qt=Object.getOwnPropertySymbols,Pt=Object.prototype.hasOwnProperty;function je(e,t){return function(n,i,o){return e(n,i,o)&&t(n,i,o)}}function ce(e){return function(r,n,i){if(!r||!n||typeof r!="object"||typeof n!="object")return e(r,n,i);var o=i.cache,s=o.get(r),a=o.get(n);if(s&&a)return s===n&&a===r;o.set(r,n),o.set(n,r);var l=e(r,n,i);return o.delete(r),o.delete(n),l}}function Mt(e){return e!=null?e[Symbol.toStringTag]:void 0}function Ie(e){return Lt(e).concat(qt(e))}var Nt=Object.hasOwn||(function(e,t){return Pt.call(e,t)});function Z(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var Vt="__v",jt="__o",It="_owner",Be=Object.getOwnPropertyDescriptor,We=Object.keys;function Bt(e,t,r){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function Wt(e,t){return Z(e.getTime(),t.getTime())}function $t(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function kt(e,t){return e===t}function $e(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var i=new Array(n),o=e.entries(),s,a,l=0;(s=o.next())&&!s.done;){for(var u=t.entries(),h=!1,c=0;(a=u.next())&&!a.done;){if(i[c]){c++;continue}var m=s.value,f=a.value;if(r.equals(m[0],f[0],l,c,e,t,r)&&r.equals(m[1],f[1],m[0],f[0],e,t,r)){h=i[c]=!0;break}c++}if(!h)return!1;l++}return!0}var Ft=Z;function Ht(e,t,r){var n=We(e),i=n.length;if(We(t).length!==i)return!1;for(;i-- >0;)if(!lt(e,t,r,n[i]))return!1;return!0}function ie(e,t,r){var n=Ie(e),i=n.length;if(Ie(t).length!==i)return!1;for(var o,s,a;i-- >0;)if(o=n[i],!lt(e,t,r,o)||(s=Be(e,o),a=Be(t,o),(s||a)&&(!s||!a||s.configurable!==a.configurable||s.enumerable!==a.enumerable||s.writable!==a.writable)))return!1;return!0}function Ut(e,t){return Z(e.valueOf(),t.valueOf())}function Gt(e,t){return e.source===t.source&&e.flags===t.flags}function ke(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var i=new Array(n),o=e.values(),s,a;(s=o.next())&&!s.done;){for(var l=t.values(),u=!1,h=0;(a=l.next())&&!a.done;){if(!i[h]&&r.equals(s.value,a.value,s.value,a.value,e,t,r)){u=i[h]=!0;break}h++}if(!u)return!1}return!0}function zt(e,t){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function Kt(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function lt(e,t,r,n){return(n===It||n===jt||n===Vt)&&(e.$$typeof||t.$$typeof)?!0:Nt(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}var Xt="[object Arguments]",Yt="[object Boolean]",Jt="[object Date]",Zt="[object Error]",Qt="[object Map]",en="[object Number]",tn="[object Object]",nn="[object RegExp]",rn="[object Set]",on="[object String]",sn="[object URL]",an=Array.isArray,Fe=typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView:null,He=Object.assign,cn=Object.prototype.toString.call.bind(Object.prototype.toString);function ln(e){var t=e.areArraysEqual,r=e.areDatesEqual,n=e.areErrorsEqual,i=e.areFunctionsEqual,o=e.areMapsEqual,s=e.areNumbersEqual,a=e.areObjectsEqual,l=e.arePrimitiveWrappersEqual,u=e.areRegExpsEqual,h=e.areSetsEqual,c=e.areTypedArraysEqual,m=e.areUrlsEqual,f=e.unknownTagComparators;return function(d,p,v){if(d===p)return!0;if(d==null||p==null)return!1;var y=typeof d;if(y!==typeof p)return!1;if(y!=="object")return y==="number"?s(d,p,v):y==="function"?i(d,p,v):!1;var w=d.constructor;if(w!==p.constructor)return!1;if(w===Object)return a(d,p,v);if(an(d))return t(d,p,v);if(Fe!=null&&Fe(d))return c(d,p,v);if(w===Date)return r(d,p,v);if(w===RegExp)return u(d,p,v);if(w===Map)return o(d,p,v);if(w===Set)return h(d,p,v);var E=cn(d);if(E===Jt)return r(d,p,v);if(E===nn)return u(d,p,v);if(E===Qt)return o(d,p,v);if(E===rn)return h(d,p,v);if(E===tn)return typeof d.then!="function"&&typeof p.then!="function"&&a(d,p,v);if(E===sn)return m(d,p,v);if(E===Zt)return n(d,p,v);if(E===Xt)return a(d,p,v);if(E===Yt||E===en||E===on)return l(d,p,v);if(f){var S=f[E];if(!S){var b=Mt(d);b&&(S=f[b])}if(S)return S(d,p,v)}return!1}}function un(e){var t=e.circular,r=e.createCustomConfig,n=e.strict,i={areArraysEqual:n?ie:Bt,areDatesEqual:Wt,areErrorsEqual:$t,areFunctionsEqual:kt,areMapsEqual:n?je($e,ie):$e,areNumbersEqual:Ft,areObjectsEqual:n?ie:Ht,arePrimitiveWrappersEqual:Ut,areRegExpsEqual:Gt,areSetsEqual:n?je(ke,ie):ke,areTypedArraysEqual:n?ie:zt,areUrlsEqual:Kt,unknownTagComparators:void 0};if(r&&(i=He({},i,r(i))),t){var o=ce(i.areArraysEqual),s=ce(i.areMapsEqual),a=ce(i.areObjectsEqual),l=ce(i.areSetsEqual);i=He({},i,{areArraysEqual:o,areMapsEqual:s,areObjectsEqual:a,areSetsEqual:l})}return i}function fn(e){return function(t,r,n,i,o,s,a){return e(t,r,a)}}function dn(e){var t=e.circular,r=e.comparator,n=e.createState,i=e.equals,o=e.strict;if(n)return function(l,u){var h=n(),c=h.cache,m=c===void 0?t?new WeakMap:void 0:c,f=h.meta;return r(l,u,{cache:m,equals:i,meta:f,strict:o})};if(t)return function(l,u){return r(l,u,{cache:new WeakMap,equals:i,meta:void 0,strict:o})};var s={cache:void 0,equals:i,meta:void 0,strict:o};return function(l,u){return r(l,u,s)}}var hn=J();J({strict:!0});J({circular:!0});J({circular:!0,strict:!0});J({createInternalComparator:function(){return Z}});J({strict:!0,createInternalComparator:function(){return Z}});J({circular:!0,createInternalComparator:function(){return Z}});J({circular:!0,createInternalComparator:function(){return Z},strict:!0});function J(e){e===void 0&&(e={});var t=e.circular,r=t===void 0?!1:t,n=e.createInternalComparator,i=e.createState,o=e.strict,s=o===void 0?!1:o,a=un(e),l=ln(a),u=n?n(l):fn(l);return dn({circular:r,comparator:l,createState:i,equals:u,strict:s})}var le={exports:{}},we={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var Ue;function pn(){if(Ue)return we;Ue=1;var e=R,t=Ce();function r(u,h){return u===h&&(u!==0||1/u===1/h)||u!==u&&h!==h}var n=typeof Object.is=="function"?Object.is:r,i=t.useSyncExternalStore,o=e.useRef,s=e.useEffect,a=e.useMemo,l=e.useDebugValue;return we.useSyncExternalStoreWithSelector=function(u,h,c,m,f){var g=o(null);if(g.current===null){var d={hasValue:!1,value:null};g.current=d}else d=g.current;g=a(function(){function v(b){if(!y){if(y=!0,w=b,b=m(b),f!==void 0&&d.hasValue){var O=d.value;if(f(O,b))return E=O}return E=b}if(O=E,n(w,b))return O;var C=m(b);return f!==void 0&&f(O,C)?(w=b,O):(w=b,E=C)}var y=!1,w,E,S=c===void 0?null:c;return[function(){return v(h())},S===null?void 0:function(){return v(S())}]},[h,c,m,f]);var p=i(u,g[0],g[1]);return s(function(){d.hasValue=!0,d.value=p},[p]),l(p),p},we}var Ee={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* use-sync-external-store-shim/with-selector.development.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var Ge;function mn(){return Ge||(Ge=1,process.env.NODE_ENV!=="production"&&(function(){function e(u,h){return u===h&&(u!==0||1/u===1/h)||u!==u&&h!==h}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=R,r=Ce(),n=typeof Object.is=="function"?Object.is:e,i=r.useSyncExternalStore,o=t.useRef,s=t.useEffect,a=t.useMemo,l=t.useDebugValue;Ee.useSyncExternalStoreWithSelector=function(u,h,c,m,f){var g=o(null);if(g.current===null){var d={hasValue:!1,value:null};g.current=d}else d=g.current;g=a(function(){function v(b){if(!y){if(y=!0,w=b,b=m(b),f!==void 0&&d.hasValue){var O=d.value;if(f(O,b))return E=O}return E=b}if(O=E,n(w,b))return O;var C=m(b);return f!==void 0&&f(O,C)?(w=b,O):(w=b,E=C)}var y=!1,w,E,S=c===void 0?null:c;return[function(){return v(h())},S===null?void 0:function(){return v(S())}]},[h,c,m,f]);var p=i(u,g[0],g[1]);return s(function(){d.hasValue=!0,d.value=p},[p]),l(p),p},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Ee}var ze;function gn(){return ze||(ze=1,process.env.NODE_ENV==="production"?le.exports=pn():le.exports=mn()),le.exports}var vn=gn(),yn=(...e)=>t=>{e.forEach(r=>{typeof r=="function"?r(t):r&&(r.current=t)})},wn=({contentComponent:e})=>{const t=Ae.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getServerSnapshot);return G.jsx(G.Fragment,{children:Object.values(t)})};function En(){const e=new Set;let t={};return{subscribe(r){return e.add(r),()=>{e.delete(r)}},getSnapshot(){return t},getServerSnapshot(){return t},setRenderer(r,n){t={...t,[r]:ct.createPortal(n.reactElement,n.element,r)},e.forEach(i=>i())},removeRenderer(r){const n={...t};delete n[r],t=n,e.forEach(i=>i())}}}var bn=class extends R.Component{constructor(e){var t;super(e),this.editorContentRef=R.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:!!((t=e.editor)!=null&&t.contentComponent)}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){const e=this.props.editor;if(e&&!e.isDestroyed&&e.options.element){if(e.contentComponent)return;const t=this.editorContentRef.current;t.append(e.view.dom),e.setOptions({element:t}),e.contentComponent=En(),this.state.hasContentComponentInitialized||(this.unsubscribeToContentComponent=e.contentComponent.subscribe(()=>{this.setState(r=>r.hasContentComponentInitialized?r:{hasContentComponentInitialized:!0}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()})),e.createNodeViews(),this.initialized=!0}}componentWillUnmount(){var e;const t=this.props.editor;if(t){this.initialized=!1,t.isDestroyed||t.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),t.contentComponent=null;try{if(!((e=t.view.dom)!=null&&e.firstChild))return;const r=document.createElement("div");r.append(t.view.dom),t.setOptions({element:r})}catch{}}}render(){const{editor:e,innerRef:t,...r}=this.props;return G.jsxs(G.Fragment,{children:[G.jsx("div",{ref:yn(t,this.editorContentRef),...r}),(e==null?void 0:e.contentComponent)&&G.jsx(wn,{contentComponent:e.contentComponent})]})}},Sn=R.forwardRef((e,t)=>{const r=R.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[e.editor]);return R.createElement(bn,{key:r,innerRef:t,...e})}),xn=R.memo(Sn),On=typeof window<"u"?R.useLayoutEffect:R.useEffect,Rn=class{constructor(e){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=e,this.lastSnapshot={editor:e,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber?this.lastSnapshot:(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot)}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}watch(e){if(this.editor=e,this.editor){const t=()=>{this.transactionNumber+=1,this.subscribers.forEach(n=>n())},r=this.editor;return r.on("transaction",t),()=>{r.off("transaction",t)}}}};function ut(e){var t;const[r]=R.useState(()=>new Rn(e.editor)),n=vn.useSyncExternalStoreWithSelector(r.subscribe,r.getSnapshot,r.getServerSnapshot,e.selector,(t=e.equalityFn)!=null?t:hn);return On(()=>r.watch(e.editor),[e.editor,r]),R.useDebugValue(n),n}var Ke=process.env.NODE_ENV!=="production",xe=typeof window>"u",Cn=xe||!!(typeof window<"u"&&window.next),An=class ft{constructor(t){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=t,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(t){this.editor=t,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(r=>r())}getInitialEditor(){if(this.options.current.immediatelyRender===void 0){if(xe||Cn){if(Ke)throw new Error("Tiptap Error: SSR has been detected, please set `immediatelyRender` explicitly to `false` to avoid hydration mismatches.");return null}return this.createEditor()}if(this.options.current.immediatelyRender&&xe&&Ke)throw new Error("Tiptap Error: SSR has been detected, and `immediatelyRender` has been set to `true` this is an unsupported configuration that may result in errors, explicitly set `immediatelyRender` to `false` to avoid hydration mismatches.");return this.options.current.immediatelyRender?this.createEditor():null}createEditor(){const t={...this.options.current,onBeforeCreate:(...n)=>{var i,o;return(o=(i=this.options.current).onBeforeCreate)==null?void 0:o.call(i,...n)},onBlur:(...n)=>{var i,o;return(o=(i=this.options.current).onBlur)==null?void 0:o.call(i,...n)},onCreate:(...n)=>{var i,o;return(o=(i=this.options.current).onCreate)==null?void 0:o.call(i,...n)},onDestroy:(...n)=>{var i,o;return(o=(i=this.options.current).onDestroy)==null?void 0:o.call(i,...n)},onFocus:(...n)=>{var i,o;return(o=(i=this.options.current).onFocus)==null?void 0:o.call(i,...n)},onSelectionUpdate:(...n)=>{var i,o;return(o=(i=this.options.current).onSelectionUpdate)==null?void 0:o.call(i,...n)},onTransaction:(...n)=>{var i,o;return(o=(i=this.options.current).onTransaction)==null?void 0:o.call(i,...n)},onUpdate:(...n)=>{var i,o;return(o=(i=this.options.current).onUpdate)==null?void 0:o.call(i,...n)},onContentError:(...n)=>{var i,o;return(o=(i=this.options.current).onContentError)==null?void 0:o.call(i,...n)},onDrop:(...n)=>{var i,o;return(o=(i=this.options.current).onDrop)==null?void 0:o.call(i,...n)},onPaste:(...n)=>{var i,o;return(o=(i=this.options.current).onPaste)==null?void 0:o.call(i,...n)},onDelete:(...n)=>{var i,o;return(o=(i=this.options.current).onDelete)==null?void 0:o.call(i,...n)}};return new Se.Editor(t)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(t){return this.subscriptions.add(t),()=>{this.subscriptions.delete(t)}}static compareOptions(t,r){return Object.keys(t).every(n=>["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(n)?!0:n==="extensions"&&t.extensions&&r.extensions?t.extensions.length!==r.extensions.length?!1:t.extensions.every((i,o)=>{var s;return i===((s=r.extensions)==null?void 0:s[o])}):t[n]===r[n])}onRender(t){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&t.length===0?ft.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(t),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(t){if(this.editor&&!this.editor.isDestroyed){if(this.previousDeps===null){this.previousDeps=t;return}if(this.previousDeps.length===t.length&&this.previousDeps.every((n,i)=>n===t[i]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=t}scheduleDestroy(){const t=this.instanceId,r=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===t){r&&r.setOptions(this.options.current);return}r&&!r.isDestroyed&&(r.destroy(),this.instanceId===t&&this.setEditor(null))},1)}};function _n(e={},t=[]){const r=R.useRef(e);r.current=e;const[n]=R.useState(()=>new An(r)),i=Ae.useSyncExternalStore(n.subscribe,n.getEditor,n.getServerSnapshot);return R.useDebugValue(i),R.useEffect(n.onRender(t)),ut({editor:i,selector:({transactionNumber:o})=>e.shouldRerenderOnTransaction===!1||e.shouldRerenderOnTransaction===void 0?null:e.immediatelyRender&&o===0?0:o+1}),i}var _e=R.createContext({editor:null});_e.Consumer;var Dn=()=>R.useContext(_e),dt=R.createContext({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}}),Tn=()=>R.useContext(dt),Ln=R.forwardRef((e,t)=>{const{onDragStart:r}=Tn(),n=e.as||"div";return G.jsx(n,{...e,ref:t,"data-node-view-wrapper":"",onDragStart:r,style:{whiteSpace:"normal",...e.style}})});function Xe(e){return!!(typeof e=="function"&&e.prototype&&e.prototype.isReactComponent)}function Ye(e){return!!(typeof e=="object"&&e.$$typeof&&(e.$$typeof.toString()==="Symbol(react.forward_ref)"||e.$$typeof.description==="react.forward_ref"))}function qn(e){return!!(typeof e=="object"&&e.$$typeof&&(e.$$typeof.toString()==="Symbol(react.memo)"||e.$$typeof.description==="react.memo"))}function Pn(e){if(Xe(e)||Ye(e))return!0;if(qn(e)){const t=e.type;if(t)return Xe(t)||Ye(t)}return!1}function Mn(){try{if(R.version)return parseInt(R.version.split(".")[0],10)>=19}catch{}return!1}var ht=class{constructor(e,{editor:t,props:r={},as:n="div",className:i=""}){this.ref=null,this.id=Math.floor(Math.random()*4294967295).toString(),this.component=e,this.editor=t,this.props=r,this.element=document.createElement(n),this.element.classList.add("react-renderer"),i&&this.element.classList.add(...i.split(" ")),this.editor.isInitialized?ct.flushSync(()=>{this.render()}):queueMicrotask(()=>{this.render()})}render(){var e;const t=this.component,r=this.props,n=this.editor,i=Mn(),o=Pn(t),s={...r};s.ref&&!(i||o)&&delete s.ref,!s.ref&&(i||o)&&(s.ref=a=>{this.ref=a}),this.reactElement=G.jsx(t,{...s}),(e=n==null?void 0:n.contentComponent)==null||e.setRenderer(this.id,this)}updateProps(e={}){this.props={...this.props,...e},this.render()}destroy(){var e;const t=this.editor;(e=t==null?void 0:t.contentComponent)==null||e.removeRenderer(this.id);try{this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}catch{}}updateAttributes(e){Object.keys(e).forEach(t=>{this.element.setAttribute(t,e[t])})}};R.createContext({markViewContentRef:()=>{}});var Nn=class extends Se.NodeView{constructor(e,t,r){if(super(e,t,r),this.selectionRafId=null,!this.node.isLeaf){this.options.contentDOMElementTag?this.contentDOMElement=document.createElement(this.options.contentDOMElementTag):this.contentDOMElement=document.createElement(this.node.isInline?"span":"div"),this.contentDOMElement.dataset.nodeViewContentReact="",this.contentDOMElement.dataset.nodeViewWrapper="",this.contentDOMElement.style.whiteSpace="inherit";const n=this.dom.querySelector("[data-node-view-content]");if(!n)return;n.appendChild(this.contentDOMElement)}}mount(){const e={editor:this.editor,node:this.node,decorations:this.decorations,innerDecorations:this.innerDecorations,view:this.view,selected:!1,extension:this.extension,HTMLAttributes:this.HTMLAttributes,getPos:()=>this.getPos(),updateAttributes:(l={})=>this.updateAttributes(l),deleteNode:()=>this.deleteNode(),ref:R.createRef()};if(!this.component.displayName){const l=u=>u.charAt(0).toUpperCase()+u.substring(1);this.component.displayName=l(this.extension.name)}const n={onDragStart:this.onDragStart.bind(this),nodeViewContentRef:l=>{l&&this.contentDOMElement&&l.firstChild!==this.contentDOMElement&&(l.hasAttribute("data-node-view-wrapper")&&l.removeAttribute("data-node-view-wrapper"),l.appendChild(this.contentDOMElement))}},i=this.component,o=R.memo(l=>G.jsx(dt.Provider,{value:n,children:R.createElement(i,l)}));o.displayName="ReactNodeView";let s=this.node.isInline?"span":"div";this.options.as&&(s=this.options.as);const{className:a=""}=this.options;this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.renderer=new ht(o,{editor:this.editor,props:e,as:s,className:`node-${this.node.type.name} ${a}`.trim()}),this.editor.on("selectionUpdate",this.handleSelectionUpdate),this.updateElementAttributes()}get dom(){var e;if(this.renderer.element.firstElementChild&&!((e=this.renderer.element.firstElementChild)!=null&&e.hasAttribute("data-node-view-wrapper")))throw Error("Please use the NodeViewWrapper component for your node view.");return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.contentDOMElement}handleSelectionUpdate(){this.selectionRafId&&(cancelAnimationFrame(this.selectionRafId),this.selectionRafId=null),this.selectionRafId=requestAnimationFrame(()=>{this.selectionRafId=null;const{from:e,to:t}=this.editor.state.selection,r=this.getPos();if(typeof r=="number")if(e<=r&&t>=r+this.node.nodeSize){if(this.renderer.props.selected)return;this.selectNode()}else{if(!this.renderer.props.selected)return;this.deselectNode()}})}update(e,t,r){const n=i=>{this.renderer.updateProps(i),typeof this.options.attrs=="function"&&this.updateElementAttributes()};if(e.type!==this.node.type)return!1;if(typeof this.options.update=="function"){const i=this.node,o=this.decorations,s=this.innerDecorations;return this.node=e,this.decorations=t,this.innerDecorations=r,this.options.update({oldNode:i,oldDecorations:o,newNode:e,newDecorations:t,oldInnerDecorations:s,innerDecorations:r,updateProps:()=>n({node:e,decorations:t,innerDecorations:r})})}return e===this.node&&this.decorations===t&&this.innerDecorations===r||(this.node=e,this.decorations=t,this.innerDecorations=r,n({node:e,decorations:t,innerDecorations:r})),!0}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element.classList.add("ProseMirror-selectednode")}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element.classList.remove("ProseMirror-selectednode")}destroy(){this.renderer.destroy(),this.editor.off("selectionUpdate",this.handleSelectionUpdate),this.contentDOMElement=null,this.selectionRafId&&(cancelAnimationFrame(this.selectionRafId),this.selectionRafId=null)}updateElementAttributes(){if(this.options.attrs){let e={};if(typeof this.options.attrs=="function"){const t=this.editor.extensionManager.attributes,r=Se.getRenderedAttributes(this.node,t);e=this.options.attrs({node:this.node,HTMLAttributes:r})}else e=this.options.attrs;this.renderer.updateAttributes(e)}}};function Vn(e,t){return r=>r.editor.contentComponent?new Nn(e,r,t):{}}function pt(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=pt(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function jn(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=pt(e))&&(n&&(n+=" "),n+=t);return n}const mt=["top","right","bottom","left"],Je=["start","end"],Ze=mt.reduce((e,t)=>e.concat(t,t+"-"+Je[0],t+"-"+Je[1]),[]),H=Math.min,L=Math.max,ue=Math.round,F=e=>({x:e,y:e}),In={left:"right",right:"left",bottom:"top",top:"bottom"},Bn={start:"end",end:"start"};function Oe(e,t,r){return L(e,H(t,r))}function z(e,t){return typeof e=="function"?e(t):e}function j(e){return e.split("-")[0]}function B(e){return e.split("-")[1]}function gt(e){return e==="x"?"y":"x"}function De(e){return e==="y"?"height":"width"}const Wn=new Set(["top","bottom"]);function k(e){return Wn.has(j(e))?"y":"x"}function Te(e){return gt(k(e))}function vt(e,t,r){r===void 0&&(r=!1);const n=B(e),i=Te(e),o=De(i);let s=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=de(s)),[s,de(s)]}function $n(e){const t=de(e);return[fe(e),t,fe(t)]}function fe(e){return e.replace(/start|end/g,t=>Bn[t])}const Qe=["left","right"],et=["right","left"],kn=["top","bottom"],Fn=["bottom","top"];function Hn(e,t,r){switch(e){case"top":case"bottom":return r?t?et:Qe:t?Qe:et;case"left":case"right":return t?kn:Fn;default:return[]}}function Un(e,t,r,n){const i=B(e);let o=Hn(j(e),r==="start",n);return i&&(o=o.map(s=>s+"-"+i),t&&(o=o.concat(o.map(fe)))),o}function de(e){return e.replace(/left|right|bottom|top/g,t=>In[t])}function Gn(e){return{top:0,right:0,bottom:0,left:0,...e}}function Le(e){return typeof e!="number"?Gn(e):{top:e,right:e,bottom:e,left:e}}function ee(e){const{x:t,y:r,width:n,height:i}=e;return{width:n,height:i,top:r,left:t,right:t+n,bottom:r+i,x:t,y:r}}function tt(e,t,r){let{reference:n,floating:i}=e;const o=k(t),s=Te(t),a=De(s),l=j(t),u=o==="y",h=n.x+n.width/2-i.width/2,c=n.y+n.height/2-i.height/2,m=n[a]/2-i[a]/2;let f;switch(l){case"top":f={x:h,y:n.y-i.height};break;case"bottom":f={x:h,y:n.y+n.height};break;case"right":f={x:n.x+n.width,y:c};break;case"left":f={x:n.x-i.width,y:c};break;default:f={x:n.x,y:n.y}}switch(B(t)){case"start":f[s]-=m*(r&&u?-1:1);break;case"end":f[s]+=m*(r&&u?-1:1);break}return f}const zn=async(e,t,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:o=[],platform:s}=r,a=o.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:h,y:c}=tt(u,n,l),m=n,f={},g=0;for(let d=0;d<a.length;d++){const{name:p,fn:v}=a[d],{x:y,y:w,data:E,reset:S}=await v({x:h,y:c,initialPlacement:n,placement:m,strategy:i,middlewareData:f,rects:u,platform:s,elements:{reference:e,floating:t}});h=y??h,c=w??c,f={...f,[p]:{...f[p],...E}},S&&g<=50&&(g++,typeof S=="object"&&(S.placement&&(m=S.placement),S.rects&&(u=S.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:i}):S.rects),{x:h,y:c}=tt(u,m,l)),d=-1)}return{x:h,y:c,placement:m,strategy:i,middlewareData:f}};async function te(e,t){var r;t===void 0&&(t={});const{x:n,y:i,platform:o,rects:s,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:h="viewport",elementContext:c="floating",altBoundary:m=!1,padding:f=0}=z(t,e),g=Le(f),p=a[m?c==="floating"?"reference":"floating":c],v=ee(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(p)))==null||r?p:p.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:u,rootBoundary:h,strategy:l})),y=c==="floating"?{x:n,y:i,width:s.floating.width,height:s.floating.height}:s.reference,w=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),E=await(o.isElement==null?void 0:o.isElement(w))?await(o.getScale==null?void 0:o.getScale(w))||{x:1,y:1}:{x:1,y:1},S=ee(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:w,strategy:l}):y);return{top:(v.top-S.top+g.top)/E.y,bottom:(S.bottom-v.bottom+g.bottom)/E.y,left:(v.left-S.left+g.left)/E.x,right:(S.right-v.right+g.right)/E.x}}const Kn=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:i,rects:o,platform:s,elements:a,middlewareData:l}=t,{element:u,padding:h=0}=z(e,t)||{};if(u==null)return{};const c=Le(h),m={x:r,y:n},f=Te(i),g=De(f),d=await s.getDimensions(u),p=f==="y",v=p?"top":"left",y=p?"bottom":"right",w=p?"clientHeight":"clientWidth",E=o.reference[g]+o.reference[f]-m[f]-o.floating[g],S=m[f]-o.reference[f],b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let O=b?b[w]:0;(!O||!await(s.isElement==null?void 0:s.isElement(b)))&&(O=a.floating[w]||o.floating[g]);const C=E/2-S/2,D=O/2-d[g]/2-1,x=H(c[v],D),A=H(c[y],D),T=x,q=O-d[g]-A,_=O/2-d[g]/2+C,I=Oe(T,_,q),V=!l.arrow&&B(i)!=null&&_!==I&&o.reference[g]/2-(_<T?x:A)-d[g]/2<0,P=V?_<T?_-T:_-q:0;return{[f]:m[f]+P,data:{[f]:I,centerOffset:_-I-P,...V&&{alignmentOffset:P}},reset:V}}});function Xn(e,t,r){return(e?[...r.filter(i=>B(i)===e),...r.filter(i=>B(i)!==e)]:r.filter(i=>j(i)===i)).filter(i=>e?B(i)===e||(t?fe(i)!==i:!1):!0)}const Yn=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var r,n,i;const{rects:o,middlewareData:s,placement:a,platform:l,elements:u}=t,{crossAxis:h=!1,alignment:c,allowedPlacements:m=Ze,autoAlignment:f=!0,...g}=z(e,t),d=c!==void 0||m===Ze?Xn(c||null,f,m):m,p=await te(t,g),v=((r=s.autoPlacement)==null?void 0:r.index)||0,y=d[v];if(y==null)return{};const w=vt(y,o,await(l.isRTL==null?void 0:l.isRTL(u.floating)));if(a!==y)return{reset:{placement:d[0]}};const E=[p[j(y)],p[w[0]],p[w[1]]],S=[...((n=s.autoPlacement)==null?void 0:n.overflows)||[],{placement:y,overflows:E}],b=d[v+1];if(b)return{data:{index:v+1,overflows:S},reset:{placement:b}};const O=S.map(x=>{const A=B(x.placement);return[x.placement,A&&h?x.overflows.slice(0,2).reduce((T,q)=>T+q,0):x.overflows[0],x.overflows]}).sort((x,A)=>x[1]-A[1]),D=((i=O.filter(x=>x[2].slice(0,B(x[0])?2:3).every(A=>A<=0))[0])==null?void 0:i[0])||O[0][0];return D!==a?{data:{index:v+1,overflows:S},reset:{placement:D}}:{}}}},Jn=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:i,middlewareData:o,rects:s,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:h=!0,crossAxis:c=!0,fallbackPlacements:m,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:d=!0,...p}=z(e,t);if((r=o.arrow)!=null&&r.alignmentOffset)return{};const v=j(i),y=k(a),w=j(a)===a,E=await(l.isRTL==null?void 0:l.isRTL(u.floating)),S=m||(w||!d?[de(a)]:$n(a)),b=g!=="none";!m&&b&&S.push(...Un(a,d,g,E));const O=[a,...S],C=await te(t,p),D=[];let x=((n=o.flip)==null?void 0:n.overflows)||[];if(h&&D.push(C[v]),c){const _=vt(i,s,E);D.push(C[_[0]],C[_[1]])}if(x=[...x,{placement:i,overflows:D}],!D.every(_=>_<=0)){var A,T;const _=(((A=o.flip)==null?void 0:A.index)||0)+1,I=O[_];if(I&&(!(c==="alignment"?y!==k(I):!1)||x.every(M=>k(M.placement)===y?M.overflows[0]>0:!0)))return{data:{index:_,overflows:x},reset:{placement:I}};let V=(T=x.filter(P=>P.overflows[0]<=0).sort((P,M)=>P.overflows[1]-M.overflows[1])[0])==null?void 0:T.placement;if(!V)switch(f){case"bestFit":{var q;const P=(q=x.filter(M=>{if(b){const X=k(M.placement);return X===y||X==="y"}return!0}).map(M=>[M.placement,M.overflows.filter(X=>X>0).reduce((X,_t)=>X+_t,0)]).sort((M,X)=>M[1]-X[1])[0])==null?void 0:q[0];P&&(V=P);break}case"initialPlacement":V=a;break}if(i!==V)return{reset:{placement:V}}}return{}}}};function nt(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function rt(e){return mt.some(t=>e[t]>=0)}const Zn=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...i}=z(e,t);switch(n){case"referenceHidden":{const o=await te(t,{...i,elementContext:"reference"}),s=nt(o,r.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:rt(s)}}}case"escaped":{const o=await te(t,{...i,altBoundary:!0}),s=nt(o,r.floating);return{data:{escapedOffsets:s,escaped:rt(s)}}}default:return{}}}}};function yt(e){const t=H(...e.map(o=>o.left)),r=H(...e.map(o=>o.top)),n=L(...e.map(o=>o.right)),i=L(...e.map(o=>o.bottom));return{x:t,y:r,width:n-t,height:i-r}}function Qn(e){const t=e.slice().sort((i,o)=>i.y-o.y),r=[];let n=null;for(let i=0;i<t.length;i++){const o=t[i];!n||o.y-n.y>n.height/2?r.push([o]):r[r.length-1].push(o),n=o}return r.map(i=>ee(yt(i)))}const er=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){const{placement:r,elements:n,rects:i,platform:o,strategy:s}=t,{padding:a=2,x:l,y:u}=z(e,t),h=Array.from(await(o.getClientRects==null?void 0:o.getClientRects(n.reference))||[]),c=Qn(h),m=ee(yt(h)),f=Le(a);function g(){if(c.length===2&&c[0].left>c[1].right&&l!=null&&u!=null)return c.find(p=>l>p.left-f.left&&l<p.right+f.right&&u>p.top-f.top&&u<p.bottom+f.bottom)||m;if(c.length>=2){if(k(r)==="y"){const x=c[0],A=c[c.length-1],T=j(r)==="top",q=x.top,_=A.bottom,I=T?x.left:A.left,V=T?x.right:A.right,P=V-I,M=_-q;return{top:q,bottom:_,left:I,right:V,width:P,height:M,x:I,y:q}}const p=j(r)==="left",v=L(...c.map(x=>x.right)),y=H(...c.map(x=>x.left)),w=c.filter(x=>p?x.left===y:x.right===v),E=w[0].top,S=w[w.length-1].bottom,b=y,O=v,C=O-b,D=S-E;return{top:E,bottom:S,left:b,right:O,width:C,height:D,x:b,y:E}}return m}const d=await o.getElementRects({reference:{getBoundingClientRect:g},floating:n.floating,strategy:s});return i.reference.x!==d.reference.x||i.reference.y!==d.reference.y||i.reference.width!==d.reference.width||i.reference.height!==d.reference.height?{reset:{rects:d}}:{}}}},tr=new Set(["left","top"]);async function nr(e,t){const{placement:r,platform:n,elements:i}=e,o=await(n.isRTL==null?void 0:n.isRTL(i.floating)),s=j(r),a=B(r),l=k(r)==="y",u=tr.has(s)?-1:1,h=o&&l?-1:1,c=z(t,e);let{mainAxis:m,crossAxis:f,alignmentAxis:g}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return a&&typeof g=="number"&&(f=a==="end"?g*-1:g),l?{x:f*h,y:m*u}:{x:m*u,y:f*h}}const rr=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:i,y:o,placement:s,middlewareData:a}=t,l=await nr(t,e);return s===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:s}}}}},ir=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:i}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:a={fn:p=>{let{x:v,y}=p;return{x:v,y}}},...l}=z(e,t),u={x:r,y:n},h=await te(t,l),c=k(j(i)),m=gt(c);let f=u[m],g=u[c];if(o){const p=m==="y"?"top":"left",v=m==="y"?"bottom":"right",y=f+h[p],w=f-h[v];f=Oe(y,f,w)}if(s){const p=c==="y"?"top":"left",v=c==="y"?"bottom":"right",y=g+h[p],w=g-h[v];g=Oe(y,g,w)}const d=a.fn({...t,[m]:f,[c]:g});return{...d,data:{x:d.x-r,y:d.y-n,enabled:{[m]:o,[c]:s}}}}}},or=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:i,rects:o,platform:s,elements:a}=t,{apply:l=()=>{},...u}=z(e,t),h=await te(t,u),c=j(i),m=B(i),f=k(i)==="y",{width:g,height:d}=o.floating;let p,v;c==="top"||c==="bottom"?(p=c,v=m===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(v=c,p=m==="end"?"top":"bottom");const y=d-h.top-h.bottom,w=g-h.left-h.right,E=H(d-h[p],y),S=H(g-h[v],w),b=!t.middlewareData.shift;let O=E,C=S;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(C=w),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(O=y),b&&!m){const x=L(h.left,0),A=L(h.right,0),T=L(h.top,0),q=L(h.bottom,0);f?C=g-2*(x!==0||A!==0?x+A:L(h.left,h.right)):O=d-2*(T!==0||q!==0?T+q:L(h.top,h.bottom))}await l({...t,availableWidth:C,availableHeight:O});const D=await s.getDimensions(a.floating);return g!==D.width||d!==D.height?{reset:{rects:!0}}:{}}}};function he(){return typeof window<"u"}function re(e){return wt(e)?(e.nodeName||"").toLowerCase():"#document"}function N(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function K(e){var t;return(t=(wt(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function wt(e){return he()?e instanceof Node||e instanceof N(e).Node:!1}function W(e){return he()?e instanceof Element||e instanceof N(e).Element:!1}function U(e){return he()?e instanceof HTMLElement||e instanceof N(e).HTMLElement:!1}function it(e){return!he()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof N(e).ShadowRoot}const sr=new Set(["inline","contents"]);function se(e){const{overflow:t,overflowX:r,overflowY:n,display:i}=$(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!sr.has(i)}const ar=new Set(["table","td","th"]);function cr(e){return ar.has(re(e))}const lr=[":popover-open",":modal"];function pe(e){return lr.some(t=>{try{return e.matches(t)}catch{return!1}})}const ur=["transform","translate","scale","rotate","perspective"],fr=["transform","translate","scale","rotate","perspective","filter"],dr=["paint","layout","strict","content"];function qe(e){const t=Pe(),r=W(e)?$(e):e;return ur.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||fr.some(n=>(r.willChange||"").includes(n))||dr.some(n=>(r.contain||"").includes(n))}function hr(e){let t=Y(e);for(;U(t)&&!ne(t);){if(qe(t))return t;if(pe(t))return null;t=Y(t)}return null}function Pe(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const pr=new Set(["html","body","#document"]);function ne(e){return pr.has(re(e))}function $(e){return N(e).getComputedStyle(e)}function me(e){return W(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Y(e){if(re(e)==="html")return e;const t=e.assignedSlot||e.parentNode||it(e)&&e.host||K(e);return it(t)?t.host:t}function Et(e){const t=Y(e);return ne(t)?e.ownerDocument?e.ownerDocument.body:e.body:U(t)&&se(t)?t:Et(t)}function bt(e,t,r){var n;t===void 0&&(t=[]);const i=Et(e),o=i===((n=e.ownerDocument)==null?void 0:n.body),s=N(i);return o?(Re(s),t.concat(s,s.visualViewport||[],se(i)?i:[],[])):t.concat(i,bt(i,[]))}function Re(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function St(e){const t=$(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const i=U(e),o=i?e.offsetWidth:r,s=i?e.offsetHeight:n,a=ue(r)!==o||ue(n)!==s;return a&&(r=o,n=s),{width:r,height:n,$:a}}function xt(e){return W(e)?e:e.contextElement}function Q(e){const t=xt(e);if(!U(t))return F(1);const r=t.getBoundingClientRect(),{width:n,height:i,$:o}=St(t);let s=(o?ue(r.width):r.width)/n,a=(o?ue(r.height):r.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const mr=F(0);function Ot(e){const t=N(e);return!Pe()||!t.visualViewport?mr:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function gr(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==N(e)?!1:t}function oe(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const i=e.getBoundingClientRect(),o=xt(e);let s=F(1);t&&(n?W(n)&&(s=Q(n)):s=Q(e));const a=gr(o,r,n)?Ot(o):F(0);let l=(i.left+a.x)/s.x,u=(i.top+a.y)/s.y,h=i.width/s.x,c=i.height/s.y;if(o){const m=N(o),f=n&&W(n)?N(n):n;let g=m,d=Re(g);for(;d&&n&&f!==g;){const p=Q(d),v=d.getBoundingClientRect(),y=$(d),w=v.left+(d.clientLeft+parseFloat(y.paddingLeft))*p.x,E=v.top+(d.clientTop+parseFloat(y.paddingTop))*p.y;l*=p.x,u*=p.y,h*=p.x,c*=p.y,l+=w,u+=E,g=N(d),d=Re(g)}}return ee({width:h,height:c,x:l,y:u})}function ge(e,t){const r=me(e).scrollLeft;return t?t.left+r:oe(K(e)).left+r}function Rt(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-ge(e,r),i=r.top+t.scrollTop;return{x:n,y:i}}function vr(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e;const o=i==="fixed",s=K(n),a=t?pe(t.floating):!1;if(n===s||a&&o)return r;let l={scrollLeft:0,scrollTop:0},u=F(1);const h=F(0),c=U(n);if((c||!c&&!o)&&((re(n)!=="body"||se(s))&&(l=me(n)),U(n))){const f=oe(n);u=Q(n),h.x=f.x+n.clientLeft,h.y=f.y+n.clientTop}const m=s&&!c&&!o?Rt(s,l):F(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+h.x+m.x,y:r.y*u.y-l.scrollTop*u.y+h.y+m.y}}function yr(e){return Array.from(e.getClientRects())}function wr(e){const t=K(e),r=me(e),n=e.ownerDocument.body,i=L(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=L(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-r.scrollLeft+ge(e);const a=-r.scrollTop;return $(n).direction==="rtl"&&(s+=L(t.clientWidth,n.clientWidth)-i),{width:i,height:o,x:s,y:a}}const ot=25;function Er(e,t){const r=N(e),n=K(e),i=r.visualViewport;let o=n.clientWidth,s=n.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;const h=Pe();(!h||h&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}const u=ge(n);if(u<=0){const h=n.ownerDocument,c=h.body,m=getComputedStyle(c),f=h.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,g=Math.abs(n.clientWidth-c.clientWidth-f);g<=ot&&(o-=g)}else u<=ot&&(o+=u);return{width:o,height:s,x:a,y:l}}const br=new Set(["absolute","fixed"]);function Sr(e,t){const r=oe(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,o=U(e)?Q(e):F(1),s=e.clientWidth*o.x,a=e.clientHeight*o.y,l=i*o.x,u=n*o.y;return{width:s,height:a,x:l,y:u}}function st(e,t,r){let n;if(t==="viewport")n=Er(e,r);else if(t==="document")n=wr(K(e));else if(W(t))n=Sr(t,r);else{const i=Ot(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return ee(n)}function Ct(e,t){const r=Y(e);return r===t||!W(r)||ne(r)?!1:$(r).position==="fixed"||Ct(r,t)}function xr(e,t){const r=t.get(e);if(r)return r;let n=bt(e,[]).filter(a=>W(a)&&re(a)!=="body"),i=null;const o=$(e).position==="fixed";let s=o?Y(e):e;for(;W(s)&&!ne(s);){const a=$(s),l=qe(s);!l&&a.position==="fixed"&&(i=null),(o?!l&&!i:!l&&a.position==="static"&&!!i&&br.has(i.position)||se(s)&&!l&&Ct(e,s))?n=n.filter(h=>h!==s):i=a,s=Y(s)}return t.set(e,n),n}function Or(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e;const s=[...r==="clippingAncestors"?pe(t)?[]:xr(t,this._c):[].concat(r),n],a=s[0],l=s.reduce((u,h)=>{const c=st(t,h,i);return u.top=L(c.top,u.top),u.right=H(c.right,u.right),u.bottom=H(c.bottom,u.bottom),u.left=L(c.left,u.left),u},st(t,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Rr(e){const{width:t,height:r}=St(e);return{width:t,height:r}}function Cr(e,t,r){const n=U(t),i=K(t),o=r==="fixed",s=oe(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const l=F(0);function u(){l.x=ge(i)}if(n||!n&&!o)if((re(t)!=="body"||se(i))&&(a=me(t)),n){const f=oe(t,!0,o,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else i&&u();o&&!n&&i&&u();const h=i&&!n&&!o?Rt(i,a):F(0),c=s.left+a.scrollLeft-l.x-h.x,m=s.top+a.scrollTop-l.y-h.y;return{x:c,y:m,width:s.width,height:s.height}}function be(e){return $(e).position==="static"}function at(e,t){if(!U(e)||$(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return K(e)===r&&(r=r.ownerDocument.body),r}function At(e,t){const r=N(e);if(pe(e))return r;if(!U(e)){let i=Y(e);for(;i&&!ne(i);){if(W(i)&&!be(i))return i;i=Y(i)}return r}let n=at(e,t);for(;n&&cr(n)&&be(n);)n=at(n,t);return n&&ne(n)&&be(n)&&!qe(n)?r:n||hr(e)||r}const Ar=async function(e){const t=this.getOffsetParent||At,r=this.getDimensions,n=await r(e.floating);return{reference:Cr(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function _r(e){return $(e).direction==="rtl"}const Dr={convertOffsetParentRelativeRectToViewportRelativeRect:vr,getDocumentElement:K,getClippingRect:Or,getOffsetParent:At,getElementRects:Ar,getClientRects:yr,getDimensions:Rr,getScale:Q,isElement:W,isRTL:_r},Tr=rr,Lr=Yn,qr=ir,Pr=Jn,Mr=or,Nr=Zn,Vr=Kn,jr=er,Ir=(e,t,r)=>{const n=new Map,i={platform:Dr,...r},o={...i.platform,_c:n};return zn(e,t,{...i,platform:o})};function Br(e){try{return JSON.stringify(e)}catch{return JSON.stringify({})}}function Wr(e,t=!1){return r=>{const n=e.startsWith("data-")?e:`data-${e}`;let i=decodeURIComponent(r.getAttribute(n));if(i==null||typeof i=="string"&&i==="null")try{const a=r.outerHTML.match(/([\S\s])+?="([\S\s])+?"/g);a&&a.length>0&&(i=(a.map(u=>u.trim()).reduce((u,h)=>{const c=h.indexOf("="),m=[h.slice(0,c),h.slice(c+1).slice(1,-1)];return u[m[0]]=m[1],u},{})[e.toLowerCase()]||"").replaceAll(""",'"'))}catch(s){console.error("Error getDatasetAttribute ",s.message,r)}if(t)try{return JSON.parse(i)}catch{return{}}if(i.includes("%")||i.includes("auto"))return i;const o=Number.parseInt(i);return o!==o?i:o}}function $r(e){const{attrs:t}=e;return Object.keys(t).reduce((r,n)=>{const i=t[n];if(i==null)return r;let o="";return typeof i=="object"?o=Br(i):o=i,r[n]=o,r},Object.create(null))}exports.EditorContent=xn;exports.EditorContext=_e;exports.NodeViewWrapper=Ln;exports.ReactNodeViewRenderer=Vn;exports.ReactRenderer=ht;exports.arrow=Vr;exports.autoPlacement=Lr;exports.clsx=jn;exports.computePosition=Ir;exports.flip=Pr;exports.getDatasetAttribute=Wr;exports.hide=Nr;exports.inline=jr;exports.nodeAttrsToDataset=$r;exports.offset=Tr;exports.shift=qr;exports.shimExports=Ae;exports.size=Mr;exports.useCurrentEditor=Dn;exports.useEditor=_n;exports.useEditorState=ut;
|