@blocknote/core 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/README.md +1 -1
  2. package/dist/blocknote.js +3454 -2426
  3. package/dist/blocknote.js.map +1 -1
  4. package/dist/blocknote.umd.cjs +35 -71
  5. package/dist/blocknote.umd.cjs.map +1 -1
  6. package/dist/style.css +1 -1
  7. package/package.json +7 -6
  8. package/src/BlockNoteTheme.ts +150 -0
  9. package/src/extensions/Blocks/BlockAttributes.ts +12 -0
  10. package/src/extensions/Blocks/MultipleNodeSelection.ts +87 -0
  11. package/src/extensions/Blocks/PreviousBlockTypePlugin.ts +8 -2
  12. package/src/extensions/Blocks/nodes/Block.module.css +37 -37
  13. package/src/extensions/Blocks/nodes/Block.ts +79 -32
  14. package/src/extensions/Blocks/nodes/BlockGroup.ts +18 -1
  15. package/src/extensions/Blocks/nodes/Content.ts +14 -1
  16. package/src/extensions/BubbleMenu/BubbleMenuExtension.tsx +8 -1
  17. package/src/extensions/BubbleMenu/component/BubbleMenu.tsx +116 -88
  18. package/src/extensions/BubbleMenu/component/LinkToolbarButton.tsx +8 -8
  19. package/src/extensions/DraggableBlocks/DraggableBlocksPlugin.tsx +143 -33
  20. package/src/extensions/DraggableBlocks/components/DragHandle.tsx +14 -19
  21. package/src/extensions/DraggableBlocks/components/DragHandleMenu.tsx +8 -7
  22. package/src/extensions/Hyperlinks/HyperlinkMenuPlugin.tsx +31 -66
  23. package/src/extensions/Hyperlinks/menus/EditHyperlinkMenu.tsx +44 -0
  24. package/src/extensions/Hyperlinks/menus/EditHyperlinkMenuItem.tsx +34 -0
  25. package/src/extensions/Hyperlinks/menus/EditHyperlinkMenuItemIcon.tsx +31 -0
  26. package/src/extensions/Hyperlinks/menus/EditHyperlinkMenuItemInput.tsx +40 -0
  27. package/src/extensions/Hyperlinks/menus/HoverHyperlinkMenu.tsx +37 -0
  28. package/src/extensions/Hyperlinks/menus/HyperlinkMenu.tsx +63 -0
  29. package/src/extensions/SlashMenu/SlashMenuItem.ts +3 -1
  30. package/src/extensions/SlashMenu/defaultCommands.tsx +4 -4
  31. package/src/extensions/UniqueID/UniqueID.ts +0 -11
  32. package/src/shared/components/toolbar/Toolbar.tsx +8 -3
  33. package/src/shared/components/toolbar/ToolbarButton.tsx +57 -0
  34. package/src/shared/components/toolbar/ToolbarDropdown.tsx +35 -0
  35. package/src/shared/components/toolbar/ToolbarDropdownItem.tsx +35 -0
  36. package/src/shared/components/toolbar/ToolbarDropdownTarget.tsx +31 -0
  37. package/src/shared/plugins/suggestion/SuggestionItem.ts +3 -1
  38. package/src/shared/plugins/suggestion/{SuggestionListReactRenderer.ts → SuggestionListReactRenderer.tsx} +13 -4
  39. package/src/shared/plugins/suggestion/components/SuggestionGroup.tsx +6 -93
  40. package/src/shared/plugins/suggestion/components/SuggestionGroupItem.tsx +82 -0
  41. package/src/shared/plugins/suggestion/components/SuggestionList.tsx +24 -23
  42. package/src/utils.ts +12 -0
  43. package/types/src/BlockNoteTheme.d.ts +2 -0
  44. package/types/src/commands/indentation.d.ts +2 -0
  45. package/types/src/extensions/Blocks/BlockAttributes.d.ts +2 -0
  46. package/types/src/extensions/Blocks/MultipleNodeSelection.d.ts +24 -0
  47. package/types/src/extensions/Blocks/nodes/Block.d.ts +1 -1
  48. package/types/src/extensions/BubbleMenu/component/LinkToolbarButton.d.ts +2 -2
  49. package/types/src/extensions/Hyperlinks/menus/EditHyperlinkMenu.d.ts +11 -0
  50. package/types/src/extensions/Hyperlinks/menus/EditHyperlinkMenuItem.d.ts +13 -0
  51. package/types/src/extensions/Hyperlinks/menus/EditHyperlinkMenuItemIcon.d.ts +8 -0
  52. package/types/src/extensions/Hyperlinks/menus/EditHyperlinkMenuItemInput.d.ts +9 -0
  53. package/types/src/extensions/Hyperlinks/menus/HoverHyperlinkMenu.d.ts +12 -0
  54. package/types/src/extensions/Hyperlinks/menus/HyperlinkMenu.d.ts +21 -0
  55. package/types/src/extensions/Hyperlinks/menus/helpers/PanelTextInput.d.ts +39 -0
  56. package/types/src/extensions/Hyperlinks/menus/helpers/PanelTextInputStyles.d.ts +3 -0
  57. package/types/src/extensions/Hyperlinks/menus/helpers/ToolbarComponent.d.ts +13 -0
  58. package/types/src/extensions/SlashMenu/SlashMenuItem.d.ts +4 -7
  59. package/types/src/nodes/ChildgroupNode.d.ts +28 -0
  60. package/types/src/nodes/patchNodes.d.ts +1 -0
  61. package/types/src/plugins/TreeViewPlugin/index.d.ts +2 -0
  62. package/types/src/plugins/animation.d.ts +2 -0
  63. package/types/src/react/BlockNoteComposer.d.ts +17 -0
  64. package/types/src/react/BlockNotePlugin.d.ts +1 -0
  65. package/types/src/react/index.d.ts +3 -0
  66. package/types/src/react/useBlockNoteSetup.d.ts +2 -0
  67. package/types/src/registerBlockNote.d.ts +2 -0
  68. package/types/src/shared/components/toolbar/SimpleToolbarButton.d.ts +2 -3
  69. package/types/src/shared/components/toolbar/SimpleToolbarDropdown.d.ts +11 -0
  70. package/types/src/shared/components/toolbar/SimpleToolbarDropdownItem.d.ts +11 -0
  71. package/types/src/shared/components/toolbar/Toolbar.d.ts +2 -2
  72. package/types/src/shared/components/toolbar/ToolbarButton.d.ts +15 -0
  73. package/types/src/shared/components/toolbar/ToolbarDropdown.d.ts +17 -0
  74. package/types/src/shared/components/toolbar/ToolbarDropdownItem.d.ts +11 -0
  75. package/types/src/shared/components/toolbar/ToolbarDropdownTarget.d.ts +8 -0
  76. package/types/src/shared/plugins/suggestion/SuggestionItem.d.ts +2 -4
  77. package/types/src/shared/plugins/suggestion/components/SuggestionGroupItem.d.ts +9 -0
  78. package/types/src/shared/plugins/suggestion/components/SuggestionList.d.ts +0 -15
  79. package/types/src/themes/BlockNoteEditorTheme.d.ts +11 -0
  80. package/types/src/utils.d.ts +2 -0
  81. package/src/extensions/BubbleMenu/component/DropdownBlockItem.module.css +0 -13
  82. package/src/extensions/BubbleMenu/component/DropdownBlockItem.tsx +0 -25
  83. package/src/extensions/DraggableBlocks/components/DragHandle.module.css +0 -33
  84. package/src/extensions/DraggableBlocks/components/DragHandleMenu.module.css +0 -10
  85. package/src/extensions/Hyperlinks/menus/HyperlinkBasicMenu.tsx +0 -59
  86. package/src/extensions/Hyperlinks/menus/HyperlinkEditMenu.tsx +0 -72
  87. package/src/extensions/Hyperlinks/menus/atlaskit/PanelTextInput.tsx +0 -173
  88. package/src/extensions/Hyperlinks/menus/atlaskit/PanelTextInputStyles.ts +0 -36
  89. package/src/extensions/Hyperlinks/menus/atlaskit/README.md +0 -1
  90. package/src/extensions/Hyperlinks/menus/atlaskit/ToolbarComponent.tsx +0 -61
  91. package/src/extensions/helpers/formatKeyboardShortcut.ts +0 -9
  92. package/src/lib/atlaskit/browser.ts +0 -47
  93. package/src/shared/components/toolbar/SimpleToolbarButton.module.css +0 -13
  94. package/src/shared/components/toolbar/SimpleToolbarButton.tsx +0 -56
  95. package/src/shared/components/toolbar/Toolbar.module.css +0 -10
  96. package/src/shared/components/toolbar/ToolbarSeparator.module.css +0 -13
  97. package/src/shared/components/toolbar/ToolbarSeparator.tsx +0 -7
  98. package/src/shared/plugins/suggestion/components/SuggestionGroup.module.css +0 -45
  99. package/src/shared/plugins/suggestion/components/SuggestionList.module.css +0 -10
@@ -1,90 +1,54 @@
1
- (function(C,E){typeof exports=="object"&&typeof module<"u"?E(exports,require("@tiptap/core"),require("@tiptap/extension-bold"),require("@tiptap/extension-code"),require("@tiptap/extension-dropcursor"),require("@tiptap/extension-gapcursor"),require("@tiptap/extension-hard-break"),require("@tiptap/extension-history"),require("@tiptap/extension-italic"),require("@tiptap/extension-strike"),require("@tiptap/extension-text"),require("@tiptap/extension-underline"),require("prosemirror-state"),require("prosemirror-model"),require("prosemirror-view"),require("react-dom"),require("@atlaskit/dropdown-menu"),require("react"),require("@atlaskit/button"),require("@tippyjs/react"),require("styled-components"),require("lodash"),require("@tiptap/react"),require("@atlaskit/menu"),require("@tiptap/extension-link"),require("@tiptap/extension-paragraph"),require("uuid")):typeof define=="function"&&define.amd?define(["exports","@tiptap/core","@tiptap/extension-bold","@tiptap/extension-code","@tiptap/extension-dropcursor","@tiptap/extension-gapcursor","@tiptap/extension-hard-break","@tiptap/extension-history","@tiptap/extension-italic","@tiptap/extension-strike","@tiptap/extension-text","@tiptap/extension-underline","prosemirror-state","prosemirror-model","prosemirror-view","react-dom","@atlaskit/dropdown-menu","react","@atlaskit/button","@tippyjs/react","styled-components","lodash","@tiptap/react","@atlaskit/menu","@tiptap/extension-link","@tiptap/extension-paragraph","uuid"],E):(C=typeof globalThis<"u"?globalThis:C||self,E(C.blocknote={},C.core,C.Bold,C.Code,C.DropCursor,C.GapCursor,C.HardBreak,C.extensionHistory,C.Italic,C.Strike,C.Text,C.Underline,C.prosemirrorState,C.prosemirrorModel,C.pv,C.ReactDOM,C.DropdownMenu,C.React,C.Button,C.Tippy,C.styled,C.lodash,C.react,C.menu,C.extensionLink,C.Paragraph,C.uuid))})(this,function(C,E,De,ri,ii,oi,ai,si,li,ci,ui,di,H,O,ye,fi,Gt,ne,pi,hi,Mn,Yt,Xt,Je,mi,vi,gi){"use strict";var Qs=Object.defineProperty;var el=(C,E,De)=>E in C?Qs(C,E,{enumerable:!0,configurable:!0,writable:!0,value:De}):C[E]=De;var P=(C,E,De)=>(el(C,typeof E!="symbol"?E+"":E,De),De);const q=e=>e&&typeof e=="object"&&"default"in e?e:{default:e};function yi(e){if(e&&e.__esModule)return e;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const bi=q(De),wi=q(ri),Ei=q(ii),xi=q(oi),ki=q(ai),Ti=q(li),Ci=q(ci),Si=q(ui),Oi=q(di),Ai=yi(ye),Te=q(fi),Ni=q(Gt),M=q(ne),In=q(pi),He=q(hi),Ge=q(Mn),Ri=q(vi),tl="",Dn=65535,Hn=Math.pow(2,16);function Mi(e,t){return e+t*Hn}function Ln(e){return e&Dn}function Ii(e){return(e-(e&Dn))/Hn}const _n=1,Bn=2,At=4,Pn=8;class zn{constructor(t,n,r){this.pos=t,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&Pn)>0}get deletedBefore(){return(this.delInfo&(_n|At))>0}get deletedAfter(){return(this.delInfo&(Bn|At))>0}get deletedAcross(){return(this.delInfo&At)>0}}class se{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&se.empty)return se.empty}recover(t){let n=0,r=Ln(t);if(!this.inverted)for(let i=0;i<r;i++)n+=this.ranges[i*3+2]-this.ranges[i*3+1];return this.ranges[r*3]+n+Ii(t)}mapResult(t,n=1){return this._map(t,n,!1)}map(t,n=1){return this._map(t,n,!0)}_map(t,n,r){let i=0,o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?i:0);if(l>t)break;let d=this.ranges[a+o],u=this.ranges[a+s],f=l+d;if(t<=f){let v=d?t==l?-1:t==f?1:n:n,m=l+i+(v<0?0:u);if(r)return m;let y=t==(n<0?l:f)?null:Mi(a/3,t-l),h=t==l?Bn:t==f?_n:At;return(n<0?t!=l:t!=f)&&(h|=Pn),new zn(m,h,y)}i+=u-d}return r?t+i:new zn(t+i,0,null)}touches(t,n){let r=0,i=Ln(n),o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?r:0);if(l>t)break;let d=this.ranges[a+o],u=l+d;if(t<=u&&a==i*3)return!0;r+=this.ranges[a+s]-d}return!1}forEach(t){let n=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,o=0;i<this.ranges.length;i+=3){let s=this.ranges[i],a=s-(this.inverted?o:0),l=s+(this.inverted?0:o),d=this.ranges[i+n],u=this.ranges[i+r];t(a,a+d,l,l+u),o+=u-d}}invert(){return new se(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return t==0?se.empty:new se(t<0?[0,-t,0]:[0,0,t])}}se.empty=new se([]);const Zt=Object.create(null);class Ce{getMap(){return se.empty}merge(t){return null}static fromJSON(t,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=Zt[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in Zt)throw new RangeError("Duplicate use of step JSON ID "+t);return Zt[t]=n,n.prototype.jsonID=t,n}}class Y{constructor(t,n){this.doc=t,this.failed=n}static ok(t){return new Y(t,null)}static fail(t){return new Y(null,t)}static fromReplace(t,n,r,i){try{return Y.ok(t.replace(n,r,i))}catch(o){if(o instanceof O.ReplaceError)return Y.fail(o.message);throw o}}}function Qt(e,t,n){let r=[];for(let i=0;i<e.childCount;i++){let o=e.child(i);o.content.size&&(o=o.copy(Qt(o.content,t,o))),o.isInline&&(o=t(o,n,i)),r.push(o)}return O.Fragment.fromArray(r)}class Le extends Ce{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=t.resolve(this.from),i=r.node(r.sharedDepth(this.to)),o=new O.Slice(Qt(n.content,(s,a)=>!s.isAtom||!a.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),i),n.openStart,n.openEnd);return Y.fromReplace(t,this.from,this.to,o)}invert(){return new _e(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Le(n.pos,r.pos,this.mark)}merge(t){return t instanceof Le&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Le(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Le(n.from,n.to,t.markFromJSON(n.mark))}}Ce.jsonID("addMark",Le);class _e extends Ce{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=new O.Slice(Qt(n.content,i=>i.mark(this.mark.removeFromSet(i.marks)),t),n.openStart,n.openEnd);return Y.fromReplace(t,this.from,this.to,r)}invert(){return new Le(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new _e(n.pos,r.pos,this.mark)}merge(t){return t instanceof _e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new _e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new _e(n.from,n.to,t.markFromJSON(n.mark))}}Ce.jsonID("removeMark",_e);class de extends Ce{constructor(t,n,r,i=!1){super(),this.from=t,this.to=n,this.slice=r,this.structure=i}apply(t){return this.structure&&en(t,this.from,this.to)?Y.fail("Structure replace would overwrite content"):Y.fromReplace(t,this.from,this.to,this.slice)}getMap(){return new se([this.from,this.to-this.from,this.slice.size])}invert(t){return new de(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deletedAcross&&r.deletedAcross?null:new de(n.pos,Math.max(n.pos,r.pos),this.slice)}merge(t){if(!(t instanceof de)||t.structure||this.structure)return null;if(this.from+this.slice.size==t.from&&!this.slice.openEnd&&!t.slice.openStart){let n=this.slice.size+t.slice.size==0?O.Slice.empty:new O.Slice(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new de(this.from,this.to+(t.to-t.from),n,this.structure)}else if(t.to==this.from&&!this.slice.openStart&&!t.slice.openEnd){let n=this.slice.size+t.slice.size==0?O.Slice.empty:new O.Slice(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new de(t.from,this.to,n,this.structure)}else return null}toJSON(){let t={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new de(n.from,n.to,O.Slice.fromJSON(t,n.slice),!!n.structure)}}Ce.jsonID("replace",de);class Se extends Ce{constructor(t,n,r,i,o,s,a=!1){super(),this.from=t,this.to=n,this.gapFrom=r,this.gapTo=i,this.slice=o,this.insert=s,this.structure=a}apply(t){if(this.structure&&(en(t,this.from,this.gapFrom)||en(t,this.gapTo,this.to)))return Y.fail("Structure gap-replace would overwrite content");let n=t.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return Y.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?Y.fromReplace(t,this.from,this.to,r):Y.fail("Content does not fit in gap")}getMap(){return new se([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let n=this.gapTo-this.gapFrom;return new Se(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1),i=t.map(this.gapFrom,-1),o=t.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||i<n.pos||o>r.pos?null:new Se(n.pos,r.pos,i,o,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Se(n.from,n.to,n.gapFrom,n.gapTo,O.Slice.fromJSON(t,n.slice),n.insert,!!n.structure)}}Ce.jsonID("replaceAround",Se);function en(e,t,n){let r=e.resolve(t),i=n-t,o=r.depth;for(;i>0&&o>0&&r.indexAfter(o)==r.node(o).childCount;)o--,i--;if(i>0){let s=r.node(o).maybeChild(r.indexAfter(o));for(;i>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,i--}}return!1}function Di(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function Fn(e){let n=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let r=e.depth;;--r){let i=e.$from.node(r),o=e.$from.index(r),s=e.$to.indexAfter(r);if(r<e.depth&&i.canReplace(o,s,n))return r;if(r==0||i.type.spec.isolating||!Di(i,o,s))break}return null}function Vn(e,t){let n=e.resolve(t),r=n.index();return Hi(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function Hi(e,t){return!!(e&&t&&!e.isLeaf&&e.canAppend(t))}function Li(e,t,n=t,r=O.Slice.empty){if(t==n&&!r.size)return null;let i=e.resolve(t),o=e.resolve(n);return _i(i,o,r)?new de(t,n,r):new Bi(i,o,r).fit()}function _i(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}class Bi{constructor(t,n,r){this.$from=t,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=O.Fragment.empty;for(let i=0;i<=t.depth;i++){let o=t.node(i);this.frontier.push({type:o.type,match:o.contentMatchAt(t.indexAfter(i))})}for(let i=t.depth;i>0;i--)this.placed=O.Fragment.from(t.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let d=this.findFittable();d?this.placeNodes(d):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,i=this.close(t<0?this.$to:r.doc.resolve(t));if(!i)return null;let o=this.placed,s=r.depth,a=i.depth;for(;s&&a&&o.childCount==1;)o=o.firstChild.content,s--,a--;let l=new O.Slice(o,s,a);return t>-1?new Se(r.pos,t,this.$to.pos,this.$to.end(),l,n):l.size||r.pos!=this.$to.pos?new de(r.pos,i.pos,l):null}findFittable(){for(let t=1;t<=2;t++)for(let n=this.unplaced.openStart;n>=0;n--){let r,i=null;n?(i=tn(this.unplaced.content,n-1).firstChild,r=i.content):r=this.unplaced.content;let o=r.firstChild;for(let s=this.depth;s>=0;s--){let{type:a,match:l}=this.frontier[s],d,u=null;if(t==1&&(o?l.matchType(o.type)||(u=l.fillBefore(O.Fragment.from(o),!1)):i&&a.compatibleContent(i.type)))return{sliceDepth:n,frontierDepth:s,parent:i,inject:u};if(t==2&&o&&(d=l.findWrapping(o.type)))return{sliceDepth:n,frontierDepth:s,parent:i,wrap:d};if(i&&l.matchType(i.type))break}}}openMore(){let{content:t,openStart:n,openEnd:r}=this.unplaced,i=tn(t,n);return!i.childCount||i.firstChild.isLeaf?!1:(this.unplaced=new O.Slice(t,n+1,Math.max(r,i.size+n>=t.size-r?n+1:0)),!0)}dropNode(){let{content:t,openStart:n,openEnd:r}=this.unplaced,i=tn(t,n);if(i.childCount<=1&&n>0){let o=t.size-n<=n+i.size;this.unplaced=new O.Slice(ut(t,n-1,1),n-1,o?n-1:r)}else this.unplaced=new O.Slice(ut(t,n,1),n,r)}placeNodes({sliceDepth:t,frontierDepth:n,parent:r,inject:i,wrap:o}){for(;this.depth>n;)this.closeFrontierNode();if(o)for(let h=0;h<o.length;h++)this.openFrontierNode(o[h]);let s=this.unplaced,a=r?r.content:s.content,l=s.openStart-t,d=0,u=[],{match:f,type:v}=this.frontier[n];if(i){for(let h=0;h<i.childCount;h++)u.push(i.child(h));f=f.matchFragment(i)}let m=a.size+t-(s.content.size-s.openEnd);for(;d<a.childCount;){let h=a.child(d),w=f.matchType(h.type);if(!w)break;d++,(d>1||l==0||h.content.size)&&(f=w,u.push(jn(h.mark(v.allowedMarks(h.marks)),d==1?l:0,d==a.childCount?m:-1)))}let y=d==a.childCount;y||(m=-1),this.placed=dt(this.placed,n,O.Fragment.from(u)),this.frontier[n].match=f,y&&m<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let h=0,w=a;h<m;h++){let x=w.lastChild;this.frontier.push({type:x.type,match:x.contentMatchAt(x.childCount)}),w=x.content}this.unplaced=y?t==0?O.Slice.empty:new O.Slice(ut(s.content,t-1,1),t-1,m<0?s.openEnd:t-1):new O.Slice(ut(s.content,t,d),s.openStart,s.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let t=this.frontier[this.depth],n;if(!t.type.isTextblock||!nn(this.$to,this.$to.depth,t.type,t.match,!1)||this.$to.depth==this.depth&&(n=this.findCloseLevel(this.$to))&&n.depth==this.depth)return-1;let{depth:r}=this.$to,i=this.$to.after(r);for(;r>1&&i==this.$to.end(--r);)++i;return i}findCloseLevel(t){e:for(let n=Math.min(this.depth,t.depth);n>=0;n--){let{match:r,type:i}=this.frontier[n],o=n<t.depth&&t.end(n+1)==t.pos+(t.depth-(n+1)),s=nn(t,n,i,r,o);if(!!s){for(let a=n-1;a>=0;a--){let{match:l,type:d}=this.frontier[a],u=nn(t,a,d,l,!0);if(!u||u.childCount)continue e}return{depth:n,fit:s,move:o?t.doc.resolve(t.after(n+1)):t}}}}close(t){let n=this.findCloseLevel(t);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=dt(this.placed,n.depth,n.fit)),t=n.move;for(let r=n.depth+1;r<=t.depth;r++){let i=t.node(r),o=i.type.contentMatch.fillBefore(i.content,!0,t.index(r));this.openFrontierNode(i.type,i.attrs,o)}return t}openFrontierNode(t,n=null,r){let i=this.frontier[this.depth];i.match=i.match.matchType(t),this.placed=dt(this.placed,this.depth,O.Fragment.from(t.create(n,r))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(O.Fragment.empty,!0);n.childCount&&(this.placed=dt(this.placed,this.frontier.length,n))}}function ut(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(ut(e.firstChild.content,t-1,n)))}function dt(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(dt(e.lastChild.content,t-1,n)))}function tn(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function jn(e,t,n){if(t<=0)return e;let r=e.content;return t>1&&(r=r.replaceChild(0,jn(r.firstChild,t-1,r.childCount==1?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(O.Fragment.empty,!0)))),e.copy(r)}function nn(e,t,n,r,i){let o=e.node(t),s=i?e.indexAfter(t):e.index(t);if(s==o.childCount&&!n.compatibleContent(o.type))return null;let a=r.fillBefore(o.content,!0,s);return a&&!Pi(n,o.content,s)?a:null}function Pi(e,t,n){for(let r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}let ft=class extends Error{};ft=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n},ft.prototype=Object.create(Error.prototype),ft.prototype.constructor=ft,ft.prototype.name="TransformError";const zi=(e,t,n)=>{let{$cursor:r}=e.selection;if(!r||(n?!n.endOfTextblock("backward",e):r.parentOffset>0))return!1;let i=Fi(r);if(!i){let s=r.blockRange(),a=s&&Fn(s);return a===null?!1:(t&&t(e.tr.lift(s,a).scrollIntoView()),!0)}let o=i.nodeBefore;if(!o.type.spec.isolating&&Vi(e,i,t))return!0;if(r.parent.content.size===0&&(Nt(o,"end")||H.NodeSelection.isSelectable(o))){let s=Li(e.doc,r.before(),r.after(),O.Slice.empty);if(s&&s.slice.size<s.to-s.from){if(t){let a=e.tr.step(s);a.setSelection(Nt(o,"end")?H.Selection.findFrom(a.doc.resolve(a.mapping.map(i.pos,-1)),-1):H.NodeSelection.create(a.doc,i.pos-o.nodeSize)),t(a.scrollIntoView())}return!0}}return o.isAtom&&i.depth===r.depth-1?(t&&t(e.tr.delete(i.pos-o.nodeSize,i.pos).scrollIntoView()),!0):!1};function Fi(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function Vi(e,t,n){let r=t.nodeBefore,i=t.nodeAfter,o,s;if(r.type.spec.isolating||i.type.spec.isolating)return!1;if(ji(e,t,n))return!0;let a=t.parent.canReplace(t.index(),t.index()+1),l=H.Selection.findFrom(t,1),d=l&&l.$from.blockRange(l.$to),u=d&&Fn(d);if(u!=null&&u>=t.depth)return n&&n(e.tr.lift(d,u).scrollIntoView()),!0;if(a&&Nt(i,"start",!0)&&Nt(r,"end")){let f=r,v=[];for(;v.push(f),!f.isTextblock;)f=f.lastChild;let m=i,y=1;for(;!m.isTextblock;m=m.firstChild)y++;if(f.canReplace(f.childCount,f.childCount,m.content)){if(n){let h=O.Fragment.empty;for(let x=v.length-1;x>=0;x--)h=O.Fragment.from(v[x].copy(h));let w=e.tr.step(new Se(t.pos-v.length,t.pos+i.nodeSize,t.pos+y,t.pos+i.nodeSize-y,new O.Slice(h,v.length,0),0,!0));n(w.scrollIntoView())}return!0}}if(a&&(o=(s=r.contentMatchAt(r.childCount)).findWrapping(i.type))&&s.matchType(o[0]||i.type).validEnd){if(n){let f=t.pos+i.nodeSize,v=O.Fragment.empty;for(let h=o.length-1;h>=0;h--)v=O.Fragment.from(o[h].create(null,v));v=O.Fragment.from(r.copy(v));let m=e.tr.step(new Se(t.pos-1,f,t.pos,f,new O.Slice(v,1,0),o.length,!0)),y=f+2*o.length;Vn(m.doc,y)&&m.join(y),n(m.scrollIntoView())}return!0}return!1}function Nt(e,t,n=!1){for(let r=e;r;r=t==="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!==1)return!1}return!1}function ji(e,t,n){let r=t.nodeBefore,i=t.nodeAfter,o=t.index();return!r||!i||!r.type.compatibleContent(i.type)?!1:!r.content.size&&t.parent.canReplace(o-1,o)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(o,o+1)||!(i.isTextblock||Vn(e.doc,t.pos))?!1:(n&&n(e.tr.clearIncompatible(t.pos,r.type,r.contentMatchAt(r.childCount)).join(t.pos).scrollIntoView()),!0)}const Be=E.findParentNode(e=>e.type.name==="block");function qn(e,t,n){const r=Be(e.selection);return r?(t&&e.setNodeMarkup(r.pos,void 0,{...r.node.attrs,headingType:n}),!0):!1}const qi=new H.PluginKey("ordered-list"),Wi=()=>new H.Plugin({key:qi,appendTransaction:(e,t,n)=>{const r=n.tr;let i=!1,o=1,s=0;return n.doc.descendants((a,l)=>{a.type.name==="block"&&!a.attrs.listType&&(o=1),s===0&&a.type.name==="block"&&a.attrs.listType==="oli"?(s=a.content.childCount,a.content.child(0).attrs.position!==`${o}.`&&(r.setNodeMarkup(l+1,void 0,{...a.attrs,position:`${o}.`}),i=!0),o++):s>0&&s--}),i?r:null}}),Wn=new H.PluginKey("previous-blocks"),$i=()=>new H.Plugin({key:Wn,view(e){return{update:async(t,n)=>{var r;(r=this.key)!=null&&r.getState(t.state).needsUpdate&&setTimeout(()=>{t.dispatch(t.state.tr.setMeta(Wn,{clearUpdate:!0}))},0)}}},state:{init(){return{prevBlockAttrs:{},needsUpdate:!1}},apply(e,t,n,r){if(t.needsUpdate=!1,t.prevBlockAttrs={},!e.docChanged||n.doc.eq(r.doc))return t;const i=E.combineTransactionSteps(n.doc,[e]);return E.getChangedRanges(i).forEach(()=>{const s=E.findChildren(n.doc,d=>d.attrs.id),a=new Map(s.map(d=>[d.node.attrs.id,d])),l=E.findChildren(r.doc,d=>d.attrs.id);for(let d of l){const u=a.get(d.node.attrs.id);if(u){const f={listType:d.node.attrs.listType,blockColor:d.node.attrs.blockColor,blockStyle:d.node.attrs.blockStyle,headingType:d.node.attrs.headingType,depth:r.doc.resolve(d.pos).depth},v={listType:u.node.attrs.listType,blockColor:u.node.attrs.blockColor,blockStyle:u.node.attrs.blockStyle,headingType:u.node.attrs.headingType,depth:n.doc.resolve(u.pos).depth};JSON.stringify(v)!==JSON.stringify(f)&&(v.depthChange=v.depth-f.depth,t.prevBlockAttrs[d.node.attrs.id]=v,t.needsUpdate=!0)}}}),t}},props:{decorations(e){const t=this.getState(e);if(!t.needsUpdate)return;const n=[];return e.doc.descendants((r,i)=>{if(!r.attrs.id)return;const o=t.prevBlockAttrs[r.attrs.id];if(!o)return;const s={};for(let[l,d]of Object.entries(o))s["data-prev-"+l]=d||"none";const a=ye.Decoration.node(i,i+r.nodeSize,{...s});n.push(a)}),ye.DecorationSet.create(e.doc,n)}}});function rn(e){return new E.InputRule({find:e.find,handler:({state:t,range:n,match:r})=>{const i=t.doc.resolve(n.from),o=E.callOrReturn(e.getAttributes,void 0,r)||{},s=i.node(-1);if(s.type!==e.type)return null;t.tr.setNodeMarkup(n.from-2,void 0,{...s.attrs,...o}).delete(n.from,n.to)}})}const Pe={blockOuter:"_blockOuter_4ownn_5",block:"_block_4ownn_5",blockContent:"_blockContent_4ownn_25",blockGroup:"_blockGroup_4ownn_35",isEmpty:"_isEmpty_4ownn_198",isFilter:"_isFilter_4ownn_199",hasAnchor:"_hasAnchor_4ownn_212"},Ui=E.Node.create({name:"block",group:"block",addOptions(){return{HTMLAttributes:{}}},content:"content blockgroup?",defining:!0,addAttributes(){return{listType:{default:void 0,renderHTML:e=>({"data-listType":e.listType}),parseHTML:e=>e.getAttribute("data-listType")},blockColor:{default:void 0,renderHTML:e=>({"data-blockColor":e.blockColor}),parseHTML:e=>e.getAttribute("data-blockColor")},blockStyle:{default:void 0,renderHTML:e=>({"data-blockStyle":e.blockStyle}),parseHTML:e=>e.getAttribute("data-blockStyle")},headingType:{default:void 0,keepOnSplit:!1,renderHTML:e=>({"data-headingType":e.headingType}),parseHTML:e=>e.getAttribute("data-headingType")}}},parseHTML(){return[{tag:"div"}]},renderHTML({HTMLAttributes:e}){return["div",E.mergeAttributes(this.options.HTMLAttributes,e,{class:Pe.blockOuter}),["div",E.mergeAttributes(this.options.HTMLAttributes,e,{class:Pe.block}),0]]},addInputRules(){return[...[1,2,3].map(e=>rn({find:new RegExp(`^(#{1,${e}})\\s$`),type:this.type,getAttributes:{headingType:e}})),rn({find:/^\s*([-+*])\s$/,type:this.type,getAttributes:{listType:"li"}}),rn({find:new RegExp(/^1.\s/),type:this.type,getAttributes:{listType:"oli"}})]},addCommands(){return{setBlockHeading:e=>({tr:t,dispatch:n})=>qn(t,n,e.level),unsetBlockHeading:()=>({tr:e,dispatch:t})=>qn(e,t,void 0),unsetList:()=>({tr:e,dispatch:t})=>{const n=e.selection.$anchor.node(-1),r=e.selection.$anchor.posAtIndex(0,-1)-1;return n.type.name==="block"&&n.attrs.listType&&t?(e.setNodeMarkup(r,void 0,{...n.attrs,listType:void 0}),!0):!1},addNewBlockAsSibling:e=>({tr:t,dispatch:n,state:r})=>{var a;const i=Be(t.selection);if(!i)return!1;if(((a=i.node.firstChild)==null?void 0:a.textContent.length)===0)return n&&t.setNodeMarkup(i.pos,void 0,e),!0;const o=i.pos+i.node.nodeSize;let s=r.schema.nodes.block.createAndFill(e);return n&&(t.insert(o,s),t.setSelection(new H.TextSelection(t.doc.resolve(o+1)))),!0},setBlockList:e=>({tr:t,dispatch:n})=>{const r=t.selection.$anchor.node(-1),i=t.selection.$anchor.posAtIndex(0,-1)-1;return r.type.name==="block"?(n&&t.setNodeMarkup(i,void 0,{...r.attrs,listType:e}),!0):!1},joinBackward:()=>({view:e,dispatch:t,state:n})=>zi(n,t,e)}},addProseMirrorPlugins(){return[$i(),Wi()]},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.first(({commands:n})=>[()=>n.undoInputRule(),()=>n.command(({tr:r})=>{const{selection:i,doc:o}=r,{empty:s,$anchor:a}=i,{pos:l,parent:d}=a,u=H.Selection.atStart(o).from===l;return!s||!u||!d.type.isTextblock||d.textContent.length?!1:n.clearNodes()}),()=>n.deleteSelection(),()=>n.command(({tr:r})=>{const i=r.selection.$anchor.parentOffset===0,o=r.selection.$anchor.node(-1);return i&&o.type.name==="block"?n.first([()=>n.unsetList(),()=>n.liftListItem("block")]):!1}),({chain:r})=>r().command(({tr:i,state:o,dispatch:s})=>{const a=i.selection.$anchor.parentOffset===0,l=i.selection.$anchor,d=l.node(-1);if(a&&d.type.name==="block"){if(d.childCount===2){const u=l.posAtIndex(1,-1)+1,f=l.posAtIndex(2,-1)-1,v=o.doc.resolve(u).blockRange(o.doc.resolve(f));s&&i.lift(v,l.depth-2)}return!0}return!1}).joinBackward().run(),()=>n.selectNodeBackward()]),Enter:()=>this.editor.commands.first(({commands:n})=>[()=>n.splitListItem("block"),({tr:r,dispatch:i})=>{if(r.selection.$from.depth!==3)return!1;const s=r.selection.$anchor.node(-1),a=r.selection.$anchor.posAtIndex(0,-1)-1;return s.type.name==="block"&&s.attrs.listType?(i&&r.setNodeMarkup(a,void 0,{...s.attrs,listType:void 0}),!0):!1},({tr:r,dispatch:i})=>{const o=r.selection.$from;return i&&r.split(o.pos,2).scrollIntoView(),!0}]),Tab:()=>this.editor.commands.sinkListItem("block"),"Shift-Tab":()=>this.editor.commands.liftListItem("block"),"Mod-Alt-0":()=>this.editor.chain().unsetList().unsetBlockHeading().run(),"Mod-Alt-1":()=>this.editor.commands.setBlockHeading({level:1}),"Mod-Alt-2":()=>this.editor.commands.setBlockHeading({level:2}),"Mod-Alt-3":()=>this.editor.commands.setBlockHeading({level:3}),"Mod-Shift-7":()=>this.editor.commands.setBlockList("li"),"Mod-Shift-8":()=>this.editor.commands.setBlockList("oli")}}}),Ki=E.Node.create({name:"blockgroup",addOptions(){return{HTMLAttributes:{}}},content:"block+",parseHTML(){return[{tag:"div"}]},renderHTML({HTMLAttributes:e}){return["div",E.mergeAttributes(this.options.HTMLAttributes,e,{class:Pe.blockGroup}),0]}}),Ji=[E.Node.create({name:"content",addOptions(){return{HTMLAttributes:{}}},addAttributes(){return{position:{default:void 0,renderHTML:e=>({"data-position":e.position}),parseHTML:e=>e.getAttribute("data-position")}}},content:"inline*",parseHTML(){return[{tag:"div"}]},renderHTML({HTMLAttributes:e}){return["div",E.mergeAttributes(this.options.HTMLAttributes,e,{class:Pe.blockContent}),["div",0]]}}),Ui,Ki,E.Node.create({name:"doc",topNode:!0,content:"blockgroup"})],Rt={bnRoot:"_bnRoot_15721_7"};var J="top",re="bottom",ie="right",G="left",Mt="auto",pt=[J,re,ie,G],Ye="start",ht="end",Gi="clippingParents",$n="viewport",mt="popper",Yi="reference",Un=pt.reduce(function(e,t){return e.concat([t+"-"+Ye,t+"-"+ht])},[]),Kn=[].concat(pt,[Mt]).reduce(function(e,t){return e.concat([t,t+"-"+Ye,t+"-"+ht])},[]),Xi="beforeRead",Zi="read",Qi="afterRead",eo="beforeMain",to="main",no="afterMain",ro="beforeWrite",io="write",oo="afterWrite",on=[Xi,Zi,Qi,eo,to,no,ro,io,oo];function fe(e){return e?(e.nodeName||"").toLowerCase():null}function oe(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function ze(e){var t=oe(e).Element;return e instanceof t||e instanceof Element}function X(e){var t=oe(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function an(e){if(typeof ShadowRoot>"u")return!1;var t=oe(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function ao(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!X(o)||!fe(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(s){var a=i[s];a===!1?o.removeAttribute(s):o.setAttribute(s,a===!0?"":a)}))})}function so(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},s=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),a=s.reduce(function(l,d){return l[d]="",l},{});!X(i)||!fe(i)||(Object.assign(i.style,a),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const Jn={name:"applyStyles",enabled:!0,phase:"write",fn:ao,effect:so,requires:["computeStyles"]};function le(e){return e.split("-")[0]}var Fe=Math.max,It=Math.min,Xe=Math.round;function sn(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Gn(){return!/^((?!chrome|android).)*safari/i.test(sn())}function Ze(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&X(e)&&(i=e.offsetWidth>0&&Xe(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Xe(r.height)/e.offsetHeight||1);var s=ze(e)?oe(e):window,a=s.visualViewport,l=!Gn()&&n,d=(r.left+(l&&a?a.offsetLeft:0))/i,u=(r.top+(l&&a?a.offsetTop:0))/o,f=r.width/i,v=r.height/o;return{width:f,height:v,top:u,right:d+f,bottom:u+v,left:d,x:d,y:u}}function ln(e){var t=Ze(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Yn(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&an(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function ce(e){return oe(e).getComputedStyle(e)}function lo(e){return["table","td","th"].indexOf(fe(e))>=0}function Oe(e){return((ze(e)?e.ownerDocument:e.document)||window.document).documentElement}function Dt(e){return fe(e)==="html"?e:e.assignedSlot||e.parentNode||(an(e)?e.host:null)||Oe(e)}function Xn(e){return!X(e)||ce(e).position==="fixed"?null:e.offsetParent}function co(e){var t=/firefox/i.test(sn()),n=/Trident/i.test(sn());if(n&&X(e)){var r=ce(e);if(r.position==="fixed")return null}var i=Dt(e);for(an(i)&&(i=i.host);X(i)&&["html","body"].indexOf(fe(i))<0;){var o=ce(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function vt(e){for(var t=oe(e),n=Xn(e);n&&lo(n)&&ce(n).position==="static";)n=Xn(n);return n&&(fe(n)==="html"||fe(n)==="body"&&ce(n).position==="static")?t:n||co(e)||t}function cn(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function gt(e,t,n){return Fe(e,It(t,n))}function uo(e,t,n){var r=gt(e,t,n);return r>n?n:r}function Zn(){return{top:0,right:0,bottom:0,left:0}}function Qn(e){return Object.assign({},Zn(),e)}function er(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var fo=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,Qn(typeof t!="number"?t:er(t,pt))};function po(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,a=le(n.placement),l=cn(a),d=[G,ie].indexOf(a)>=0,u=d?"height":"width";if(!(!o||!s)){var f=fo(i.padding,n),v=ln(o),m=l==="y"?J:G,y=l==="y"?re:ie,h=n.rects.reference[u]+n.rects.reference[l]-s[l]-n.rects.popper[u],w=s[l]-n.rects.reference[l],x=vt(o),S=x?l==="y"?x.clientHeight||0:x.clientWidth||0:0,A=h/2-w/2,c=f[m],k=S-v[u]-f[y],g=S/2-v[u]/2+A,N=gt(c,g,k),z=l;n.modifiersData[r]=(t={},t[z]=N,t.centerOffset=N-g,t)}}function ho(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;if(i!=null&&!(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i))){if(process.env.NODE_ENV!=="production"&&(X(i)||console.error(['Popper: "arrow" element must be an HTMLElement (not an SVGElement).',"To use an SVG arrow, wrap it in an HTMLElement that will be used as","the arrow."].join(" "))),!Yn(t.elements.popper,i)){process.env.NODE_ENV!=="production"&&console.error(['Popper: "arrow" modifier\'s `element` must be a child of the popper',"element."].join(" "));return}t.elements.arrow=i}}const mo={name:"arrow",enabled:!0,phase:"main",fn:po,effect:ho,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Qe(e){return e.split("-")[1]}var vo={top:"auto",right:"auto",bottom:"auto",left:"auto"};function go(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:Xe(t*i)/i||0,y:Xe(n*i)/i||0}}function tr(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,s=e.offsets,a=e.position,l=e.gpuAcceleration,d=e.adaptive,u=e.roundOffsets,f=e.isFixed,v=s.x,m=v===void 0?0:v,y=s.y,h=y===void 0?0:y,w=typeof u=="function"?u({x:m,y:h}):{x:m,y:h};m=w.x,h=w.y;var x=s.hasOwnProperty("x"),S=s.hasOwnProperty("y"),A=G,c=J,k=window;if(d){var g=vt(n),N="clientHeight",z="clientWidth";if(g===oe(n)&&(g=Oe(n),ce(g).position!=="static"&&a==="absolute"&&(N="scrollHeight",z="scrollWidth")),g=g,i===J||(i===G||i===ie)&&o===ht){c=re;var F=f&&g===k&&k.visualViewport?k.visualViewport.height:g[N];h-=F-r.height,h*=l?1:-1}if(i===G||(i===J||i===re)&&o===ht){A=ie;var _=f&&g===k&&k.visualViewport?k.visualViewport.width:g[z];m-=_-r.width,m*=l?1:-1}}var I=Object.assign({position:a},d&&vo),L=u===!0?go({x:m,y:h}):{x:m,y:h};if(m=L.x,h=L.y,l){var B;return Object.assign({},I,(B={},B[c]=S?"0":"",B[A]=x?"0":"",B.transform=(k.devicePixelRatio||1)<=1?"translate("+m+"px, "+h+"px)":"translate3d("+m+"px, "+h+"px, 0)",B))}return Object.assign({},I,(t={},t[c]=S?h+"px":"",t[A]=x?m+"px":"",t.transform="",t))}function yo(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,s=o===void 0?!0:o,a=n.roundOffsets,l=a===void 0?!0:a;if(process.env.NODE_ENV!=="production"){var d=ce(t.elements.popper).transitionProperty||"";s&&["transform","top","right","bottom","left"].some(function(f){return d.indexOf(f)>=0})&&console.warn(["Popper: Detected CSS transitions on at least one of the following",'CSS properties: "transform", "top", "right", "bottom", "left".',`
1
+ (function(P,A){typeof exports=="object"&&typeof module<"u"?A(exports,require("@tiptap/core"),require("@tiptap/extension-bold"),require("@tiptap/extension-code"),require("@tiptap/extension-dropcursor"),require("@tiptap/extension-gapcursor"),require("@tiptap/extension-hard-break"),require("@tiptap/extension-history"),require("@tiptap/extension-italic"),require("@tiptap/extension-strike"),require("@tiptap/extension-text"),require("@tiptap/extension-underline"),require("prosemirror-state"),require("prosemirror-model"),require("prosemirror-view"),require("react"),require("@mantine/core"),require("react-dom"),require("@tippyjs/react"),require("lodash"),require("@tiptap/react"),require("@tiptap/extension-link"),require("@tiptap/extension-paragraph"),require("uuid")):typeof define=="function"&&define.amd?define(["exports","@tiptap/core","@tiptap/extension-bold","@tiptap/extension-code","@tiptap/extension-dropcursor","@tiptap/extension-gapcursor","@tiptap/extension-hard-break","@tiptap/extension-history","@tiptap/extension-italic","@tiptap/extension-strike","@tiptap/extension-text","@tiptap/extension-underline","prosemirror-state","prosemirror-model","prosemirror-view","react","@mantine/core","react-dom","@tippyjs/react","lodash","@tiptap/react","@tiptap/extension-link","@tiptap/extension-paragraph","uuid"],A):(P=typeof globalThis<"u"?globalThis:P||self,A(P.blocknote={},P.core,P.Bold,P.Code,P.DropCursor,P.GapCursor,P.HardBreak,P.extensionHistory,P.Italic,P.Strike,P.Text,P.Underline,P.prosemirrorState,P.prosemirrorModel,P.pv,P.React,P.core$1,P.ReactDOM,P.Tippy,P.lodash,P.react,P.extensionLink,P.Paragraph,P.uuid))})(this,function(P,A,lt,Oi,Si,Ci,Ai,Ri,Ii,Di,Ni,Mi,V,D,Ve,ae,L,Pi,ji,yn,bn,Li,Bi,_i){"use strict";var ul=Object.defineProperty;var dl=(P,A,lt)=>A in P?ul(P,A,{enumerable:!0,configurable:!0,writable:!0,value:lt}):P[A]=lt;var oe=(P,A,lt)=>(dl(P,typeof A!="symbol"?A+"":A,lt),lt);const he=e=>e&&typeof e=="object"&&"default"in e?e:{default:e};function Hi(e){if(e&&e.__esModule)return e;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const Fi=he(lt),zi=he(Oi),Vi=he(Si),qi=he(Ci),Ui=he(Ai),Wi=he(Ii),$i=he(Di),Ji=he(Ni),Yi=he(Mi),Gi=Hi(Ve),qe=he(ae),Ke=he(Pi),Ht=he(ji),Ki=he(Bi),fl="",or=65535,ar=Math.pow(2,16);function Xi(e,t){return e+t*ar}function sr(e){return e&or}function Zi(e){return(e-(e&or))/ar}const lr=1,cr=2,sn=4,ur=8;class dr{constructor(t,n,r){this.pos=t,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&ur)>0}get deletedBefore(){return(this.delInfo&(lr|sn))>0}get deletedAfter(){return(this.delInfo&(cr|sn))>0}get deletedAcross(){return(this.delInfo&sn)>0}}class Te{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&Te.empty)return Te.empty}recover(t){let n=0,r=sr(t);if(!this.inverted)for(let i=0;i<r;i++)n+=this.ranges[i*3+2]-this.ranges[i*3+1];return this.ranges[r*3]+n+Zi(t)}mapResult(t,n=1){return this._map(t,n,!1)}map(t,n=1){return this._map(t,n,!0)}_map(t,n,r){let i=0,o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?i:0);if(l>t)break;let d=this.ranges[a+o],u=this.ranges[a+s],p=l+d;if(t<=p){let m=d?t==l?-1:t==p?1:n:n,y=l+i+(m<0?0:u);if(r)return y;let x=t==(n<0?l:p)?null:Xi(a/3,t-l),b=t==l?cr:t==p?lr:sn;return(n<0?t!=l:t!=p)&&(b|=ur),new dr(y,b,x)}i+=u-d}return r?t+i:new dr(t+i,0,null)}touches(t,n){let r=0,i=sr(n),o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?r:0);if(l>t)break;let d=this.ranges[a+o],u=l+d;if(t<=u&&a==i*3)return!0;r+=this.ranges[a+s]-d}return!1}forEach(t){let n=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,o=0;i<this.ranges.length;i+=3){let s=this.ranges[i],a=s-(this.inverted?o:0),l=s+(this.inverted?0:o),d=this.ranges[i+n],u=this.ranges[i+r];t(a,a+d,l,l+u),o+=u-d}}invert(){return new Te(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return t==0?Te.empty:new Te(t<0?[0,-t,0]:[0,0,t])}}Te.empty=new Te([]);const xn=Object.create(null);class ue{getMap(){return Te.empty}merge(t){return null}static fromJSON(t,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=xn[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in xn)throw new RangeError("Duplicate use of step JSON ID "+t);return xn[t]=n,n.prototype.jsonID=t,n}}class Q{constructor(t,n){this.doc=t,this.failed=n}static ok(t){return new Q(t,null)}static fail(t){return new Q(null,t)}static fromReplace(t,n,r,i){try{return Q.ok(t.replace(n,r,i))}catch(o){if(o instanceof D.ReplaceError)return Q.fail(o.message);throw o}}}function wn(e,t,n){let r=[];for(let i=0;i<e.childCount;i++){let o=e.child(i);o.content.size&&(o=o.copy(wn(o.content,t,o))),o.isInline&&(o=t(o,n,i)),r.push(o)}return D.Fragment.fromArray(r)}class ct extends ue{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=t.resolve(this.from),i=r.node(r.sharedDepth(this.to)),o=new D.Slice(wn(n.content,(s,a)=>!s.isAtom||!a.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),i),n.openStart,n.openEnd);return Q.fromReplace(t,this.from,this.to,o)}invert(){return new ut(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new ct(n.pos,r.pos,this.mark)}merge(t){return t instanceof ct&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new ct(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new ct(n.from,n.to,t.markFromJSON(n.mark))}}ue.jsonID("addMark",ct);class ut extends ue{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=new D.Slice(wn(n.content,i=>i.mark(this.mark.removeFromSet(i.marks)),t),n.openStart,n.openEnd);return Q.fromReplace(t,this.from,this.to,r)}invert(){return new ct(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new ut(n.pos,r.pos,this.mark)}merge(t){return t instanceof ut&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new ut(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new ut(n.from,n.to,t.markFromJSON(n.mark))}}ue.jsonID("removeMark",ut);class dt extends ue{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return Q.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return Q.fromReplace(t,this.pos,this.pos+1,new D.Slice(D.Fragment.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let i=0;i<n.marks.length;i++)if(!n.marks[i].isInSet(r))return new dt(this.pos,n.marks[i]);return new dt(this.pos,this.mark)}}return new Ft(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new dt(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new dt(n.pos,t.markFromJSON(n.mark))}}ue.jsonID("addNodeMark",dt);class Ft extends ue{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return Q.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return Q.fromReplace(t,this.pos,this.pos+1,new D.Slice(D.Fragment.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new dt(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new Ft(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Ft(n.pos,t.markFromJSON(n.mark))}}ue.jsonID("removeNodeMark",Ft);class Ne extends ue{constructor(t,n,r,i=!1){super(),this.from=t,this.to=n,this.slice=r,this.structure=i}apply(t){return this.structure&&En(t,this.from,this.to)?Q.fail("Structure replace would overwrite content"):Q.fromReplace(t,this.from,this.to,this.slice)}getMap(){return new Te([this.from,this.to-this.from,this.slice.size])}invert(t){return new Ne(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deletedAcross&&r.deletedAcross?null:new Ne(n.pos,Math.max(n.pos,r.pos),this.slice)}merge(t){if(!(t instanceof Ne)||t.structure||this.structure)return null;if(this.from+this.slice.size==t.from&&!this.slice.openEnd&&!t.slice.openStart){let n=this.slice.size+t.slice.size==0?D.Slice.empty:new D.Slice(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new Ne(this.from,this.to+(t.to-t.from),n,this.structure)}else if(t.to==this.from&&!this.slice.openStart&&!t.slice.openEnd){let n=this.slice.size+t.slice.size==0?D.Slice.empty:new D.Slice(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new Ne(t.from,this.to,n,this.structure)}else return null}toJSON(){let t={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new Ne(n.from,n.to,D.Slice.fromJSON(t,n.slice),!!n.structure)}}ue.jsonID("replace",Ne);class Xe extends ue{constructor(t,n,r,i,o,s,a=!1){super(),this.from=t,this.to=n,this.gapFrom=r,this.gapTo=i,this.slice=o,this.insert=s,this.structure=a}apply(t){if(this.structure&&(En(t,this.from,this.gapFrom)||En(t,this.gapTo,this.to)))return Q.fail("Structure gap-replace would overwrite content");let n=t.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return Q.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?Q.fromReplace(t,this.from,this.to,r):Q.fail("Content does not fit in gap")}getMap(){return new Te([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let n=this.gapTo-this.gapFrom;return new Xe(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1),i=t.map(this.gapFrom,-1),o=t.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||i<n.pos||o>r.pos?null:new Xe(n.pos,r.pos,i,o,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Xe(n.from,n.to,n.gapFrom,n.gapTo,D.Slice.fromJSON(t,n.slice),n.insert,!!n.structure)}}ue.jsonID("replaceAround",Xe);function En(e,t,n){let r=e.resolve(t),i=n-t,o=r.depth;for(;i>0&&o>0&&r.indexAfter(o)==r.node(o).childCount;)o--,i--;if(i>0){let s=r.node(o).maybeChild(r.indexAfter(o));for(;i>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,i--}}return!1}function Qi(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function fr(e){let n=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let r=e.depth;;--r){let i=e.$from.node(r),o=e.$from.index(r),s=e.$to.indexAfter(r);if(r<e.depth&&i.canReplace(o,s,n))return r;if(r==0||i.type.spec.isolating||!Qi(i,o,s))break}return null}function pr(e,t){let n=e.resolve(t),r=n.index();return eo(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function eo(e,t){return!!(e&&t&&!e.isLeaf&&e.canAppend(t))}function to(e,t,n=t,r=D.Slice.empty){if(t==n&&!r.size)return null;let i=e.resolve(t),o=e.resolve(n);return no(i,o,r)?new Ne(t,n,r):new ro(i,o,r).fit()}function no(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}class ro{constructor(t,n,r){this.$from=t,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=D.Fragment.empty;for(let i=0;i<=t.depth;i++){let o=t.node(i);this.frontier.push({type:o.type,match:o.contentMatchAt(t.indexAfter(i))})}for(let i=t.depth;i>0;i--)this.placed=D.Fragment.from(t.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let d=this.findFittable();d?this.placeNodes(d):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,i=this.close(t<0?this.$to:r.doc.resolve(t));if(!i)return null;let o=this.placed,s=r.depth,a=i.depth;for(;s&&a&&o.childCount==1;)o=o.firstChild.content,s--,a--;let l=new D.Slice(o,s,a);return t>-1?new Xe(r.pos,t,this.$to.pos,this.$to.end(),l,n):l.size||r.pos!=this.$to.pos?new Ne(r.pos,i.pos,l):null}findFittable(){for(let t=1;t<=2;t++)for(let n=this.unplaced.openStart;n>=0;n--){let r,i=null;n?(i=kn(this.unplaced.content,n-1).firstChild,r=i.content):r=this.unplaced.content;let o=r.firstChild;for(let s=this.depth;s>=0;s--){let{type:a,match:l}=this.frontier[s],d,u=null;if(t==1&&(o?l.matchType(o.type)||(u=l.fillBefore(D.Fragment.from(o),!1)):i&&a.compatibleContent(i.type)))return{sliceDepth:n,frontierDepth:s,parent:i,inject:u};if(t==2&&o&&(d=l.findWrapping(o.type)))return{sliceDepth:n,frontierDepth:s,parent:i,wrap:d};if(i&&l.matchType(i.type))break}}}openMore(){let{content:t,openStart:n,openEnd:r}=this.unplaced,i=kn(t,n);return!i.childCount||i.firstChild.isLeaf?!1:(this.unplaced=new D.Slice(t,n+1,Math.max(r,i.size+n>=t.size-r?n+1:0)),!0)}dropNode(){let{content:t,openStart:n,openEnd:r}=this.unplaced,i=kn(t,n);if(i.childCount<=1&&n>0){let o=t.size-n<=n+i.size;this.unplaced=new D.Slice(zt(t,n-1,1),n-1,o?n-1:r)}else this.unplaced=new D.Slice(zt(t,n,1),n,r)}placeNodes({sliceDepth:t,frontierDepth:n,parent:r,inject:i,wrap:o}){for(;this.depth>n;)this.closeFrontierNode();if(o)for(let b=0;b<o.length;b++)this.openFrontierNode(o[b]);let s=this.unplaced,a=r?r.content:s.content,l=s.openStart-t,d=0,u=[],{match:p,type:m}=this.frontier[n];if(i){for(let b=0;b<i.childCount;b++)u.push(i.child(b));p=p.matchFragment(i)}let y=a.size+t-(s.content.size-s.openEnd);for(;d<a.childCount;){let b=a.child(d),O=p.matchType(b.type);if(!O)break;d++,(d>1||l==0||b.content.size)&&(p=O,u.push(hr(b.mark(m.allowedMarks(b.marks)),d==1?l:0,d==a.childCount?y:-1)))}let x=d==a.childCount;x||(y=-1),this.placed=Vt(this.placed,n,D.Fragment.from(u)),this.frontier[n].match=p,x&&y<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let b=0,O=a;b<y;b++){let C=O.lastChild;this.frontier.push({type:C.type,match:C.contentMatchAt(C.childCount)}),O=C.content}this.unplaced=x?t==0?D.Slice.empty:new D.Slice(zt(s.content,t-1,1),t-1,y<0?s.openEnd:t-1):new D.Slice(zt(s.content,t,d),s.openStart,s.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let t=this.frontier[this.depth],n;if(!t.type.isTextblock||!Tn(this.$to,this.$to.depth,t.type,t.match,!1)||this.$to.depth==this.depth&&(n=this.findCloseLevel(this.$to))&&n.depth==this.depth)return-1;let{depth:r}=this.$to,i=this.$to.after(r);for(;r>1&&i==this.$to.end(--r);)++i;return i}findCloseLevel(t){e:for(let n=Math.min(this.depth,t.depth);n>=0;n--){let{match:r,type:i}=this.frontier[n],o=n<t.depth&&t.end(n+1)==t.pos+(t.depth-(n+1)),s=Tn(t,n,i,r,o);if(!!s){for(let a=n-1;a>=0;a--){let{match:l,type:d}=this.frontier[a],u=Tn(t,a,d,l,!0);if(!u||u.childCount)continue e}return{depth:n,fit:s,move:o?t.doc.resolve(t.after(n+1)):t}}}}close(t){let n=this.findCloseLevel(t);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=Vt(this.placed,n.depth,n.fit)),t=n.move;for(let r=n.depth+1;r<=t.depth;r++){let i=t.node(r),o=i.type.contentMatch.fillBefore(i.content,!0,t.index(r));this.openFrontierNode(i.type,i.attrs,o)}return t}openFrontierNode(t,n=null,r){let i=this.frontier[this.depth];i.match=i.match.matchType(t),this.placed=Vt(this.placed,this.depth,D.Fragment.from(t.create(n,r))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(D.Fragment.empty,!0);n.childCount&&(this.placed=Vt(this.placed,this.frontier.length,n))}}function zt(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(zt(e.firstChild.content,t-1,n)))}function Vt(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(Vt(e.lastChild.content,t-1,n)))}function kn(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function hr(e,t,n){if(t<=0)return e;let r=e.content;return t>1&&(r=r.replaceChild(0,hr(r.firstChild,t-1,r.childCount==1?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(D.Fragment.empty,!0)))),e.copy(r)}function Tn(e,t,n,r,i){let o=e.node(t),s=i?e.indexAfter(t):e.index(t);if(s==o.childCount&&!n.compatibleContent(o.type))return null;let a=r.fillBefore(o.content,!0,s);return a&&!io(n,o.content,s)?a:null}function io(e,t,n){for(let r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}class qt extends ue{constructor(t,n,r){super(),this.pos=t,this.attr=n,this.value=r}apply(t){let n=t.nodeAt(this.pos);if(!n)return Q.fail("No node at attribute step's position");let r=Object.create(null);for(let o in n.attrs)r[o]=n.attrs[o];r[this.attr]=this.value;let i=n.type.create(r,null,n.marks);return Q.fromReplace(t,this.pos,this.pos+1,new D.Slice(D.Fragment.from(i),0,n.isLeaf?0:1))}getMap(){return Te.empty}invert(t){return new qt(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new qt(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new qt(n.pos,n.attr,n.value)}}ue.jsonID("attr",qt);let Ut=class extends Error{};Ut=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n},Ut.prototype=Object.create(Error.prototype),Ut.prototype.constructor=Ut,Ut.prototype.name="TransformError";const oo=(e,t,n)=>{let{$cursor:r}=e.selection;if(!r||(n?!n.endOfTextblock("backward",e):r.parentOffset>0))return!1;let i=ao(r);if(!i){let s=r.blockRange(),a=s&&fr(s);return a===null?!1:(t&&t(e.tr.lift(s,a).scrollIntoView()),!0)}let o=i.nodeBefore;if(!o.type.spec.isolating&&so(e,i,t))return!0;if(r.parent.content.size===0&&(ln(o,"end")||V.NodeSelection.isSelectable(o))){let s=to(e.doc,r.before(),r.after(),D.Slice.empty);if(s&&s.slice.size<s.to-s.from){if(t){let a=e.tr.step(s);a.setSelection(ln(o,"end")?V.Selection.findFrom(a.doc.resolve(a.mapping.map(i.pos,-1)),-1):V.NodeSelection.create(a.doc,i.pos-o.nodeSize)),t(a.scrollIntoView())}return!0}}return o.isAtom&&i.depth===r.depth-1?(t&&t(e.tr.delete(i.pos-o.nodeSize,i.pos).scrollIntoView()),!0):!1};function ao(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function so(e,t,n){let r=t.nodeBefore,i=t.nodeAfter,o,s;if(r.type.spec.isolating||i.type.spec.isolating)return!1;if(lo(e,t,n))return!0;let a=t.parent.canReplace(t.index(),t.index()+1),l=V.Selection.findFrom(t,1),d=l&&l.$from.blockRange(l.$to),u=d&&fr(d);if(u!=null&&u>=t.depth)return n&&n(e.tr.lift(d,u).scrollIntoView()),!0;if(a&&ln(i,"start",!0)&&ln(r,"end")){let p=r,m=[];for(;m.push(p),!p.isTextblock;)p=p.lastChild;let y=i,x=1;for(;!y.isTextblock;y=y.firstChild)x++;if(p.canReplace(p.childCount,p.childCount,y.content)){if(n){let b=D.Fragment.empty;for(let C=m.length-1;C>=0;C--)b=D.Fragment.from(m[C].copy(b));let O=e.tr.step(new Xe(t.pos-m.length,t.pos+i.nodeSize,t.pos+x,t.pos+i.nodeSize-x,new D.Slice(b,m.length,0),0,!0));n(O.scrollIntoView())}return!0}}if(a&&(o=(s=r.contentMatchAt(r.childCount)).findWrapping(i.type))&&s.matchType(o[0]||i.type).validEnd){if(n){let p=t.pos+i.nodeSize,m=D.Fragment.empty;for(let b=o.length-1;b>=0;b--)m=D.Fragment.from(o[b].create(null,m));m=D.Fragment.from(r.copy(m));let y=e.tr.step(new Xe(t.pos-1,p,t.pos,p,new D.Slice(m,1,0),o.length,!0)),x=p+2*o.length;pr(y.doc,x)&&y.join(x),n(y.scrollIntoView())}return!0}return!1}function ln(e,t,n=!1){for(let r=e;r;r=t==="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!==1)return!1}return!1}function lo(e,t,n){let r=t.nodeBefore,i=t.nodeAfter,o=t.index();return!r||!i||!r.type.compatibleContent(i.type)?!1:!r.content.size&&t.parent.canReplace(o-1,o)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(o,o+1)||!(i.isTextblock||pr(e.doc,t.pos))?!1:(n&&n(e.tr.clearIncompatible(t.pos,r.type,r.contentMatchAt(r.childCount)).join(t.pos).scrollIntoView()),!0)}const ft=A.findParentNode(e=>e.type.name==="block");function vr(e,t,n){const r=ft(e.selection);return r?(t&&e.setNodeMarkup(r.pos,void 0,{...r.node.attrs,headingType:n}),!0):!1}const co=new V.PluginKey("ordered-list"),uo=()=>new V.Plugin({key:co,appendTransaction:(e,t,n)=>{const r=n.tr;let i=!1,o=1,s=0;return n.doc.descendants((a,l)=>{a.type.name==="block"&&!a.attrs.listType&&(o=1),s===0&&a.type.name==="block"&&a.attrs.listType==="oli"?(s=a.content.childCount,a.content.child(0).attrs.position!==`${o}.`&&(r.setNodeMarkup(l+1,void 0,{...a.attrs,position:`${o}.`}),i=!0),o++):s>0&&s--}),i?r:null}}),On={listType:"data-list-type",blockColor:"data-block-color",blockStyle:"data-block-style",headingType:"data-heading-type",id:"data-id",depth:"data-depth",depthChange:"data-depth-change"},mr=new V.PluginKey("previous-blocks"),fo=e=>e.slice(0,5)+"prev-"+e.slice(5),po=()=>new V.Plugin({key:mr,view(e){return{update:async(t,n)=>{var r;(r=this.key)!=null&&r.getState(t.state).needsUpdate&&setTimeout(()=>{t.dispatch(t.state.tr.setMeta(mr,{clearUpdate:!0}))},0)}}},state:{init(){return{prevBlockAttrs:{},needsUpdate:!1}},apply(e,t,n,r){if(t.needsUpdate=!1,t.prevBlockAttrs={},!e.docChanged||n.doc.eq(r.doc))return t;const i=A.combineTransactionSteps(n.doc,[e]);return A.getChangedRanges(i).forEach(()=>{const s=A.findChildren(n.doc,d=>d.attrs.id),a=new Map(s.map(d=>[d.node.attrs.id,d])),l=A.findChildren(r.doc,d=>d.attrs.id);for(let d of l){const u=a.get(d.node.attrs.id);if(u){const p={listType:d.node.attrs.listType,blockColor:d.node.attrs.blockColor,blockStyle:d.node.attrs.blockStyle,headingType:d.node.attrs.headingType,depth:r.doc.resolve(d.pos).depth},m={listType:u.node.attrs.listType,blockColor:u.node.attrs.blockColor,blockStyle:u.node.attrs.blockStyle,headingType:u.node.attrs.headingType,depth:n.doc.resolve(u.pos).depth};JSON.stringify(m)!==JSON.stringify(p)&&(m.depthChange=m.depth-p.depth,t.prevBlockAttrs[d.node.attrs.id]=m,t.needsUpdate=!0)}}}),t}},props:{decorations(e){const t=this.getState(e);if(!t.needsUpdate)return;const n=[];return e.doc.descendants((r,i)=>{if(!r.attrs.id)return;const o=t.prevBlockAttrs[r.attrs.id];if(!o)return;const s={};for(let[l,d]of Object.entries(o))s[fo(On[l])]=d||"none";const a=Ve.Decoration.node(i,i+r.nodeSize,{...s});n.push(a)}),Ve.DecorationSet.create(e.doc,n)}}});function Sn(e){return new A.InputRule({find:e.find,handler:({state:t,range:n,match:r})=>{const i=t.doc.resolve(n.from),o=A.callOrReturn(e.getAttributes,void 0,r)||{},s=i.node(-1);if(s.type!==e.type)return null;t.tr.setNodeMarkup(n.from-2,void 0,{...s.attrs,...o}).delete(n.from,n.to)}})}const pt={blockOuter:"_blockOuter_1houv_5",block:"_block_1houv_5",blockContent:"_blockContent_1houv_25",blockGroup:"_blockGroup_1houv_35",isEmpty:"_isEmpty_1houv_198",isFilter:"_isFilter_1houv_199",hasAnchor:"_hasAnchor_1houv_212"},ho=A.Node.create({name:"block",group:"block",addOptions(){return{HTMLAttributes:{}}},content:"content blockgroup?",defining:!0,addAttributes(){return{listType:{default:void 0},blockColor:{default:void 0},blockStyle:{default:void 0},headingType:{default:void 0,keepOnSplit:!1}}},parseHTML(){return[{tag:"div",getAttrs:e=>{if(typeof e=="string")return!1;const t={};for(let[n,r]of Object.entries(On))e.getAttribute(r)&&(t[n]=e.getAttribute(r));return e.getAttribute("data-node-type")==="block"?t:!1}},{tag:"p",priority:100},{tag:"h1",attrs:{headingType:"1"}},{tag:"h2",attrs:{headingType:"2"}},{tag:"h3",attrs:{headingType:"3"}},{tag:"li",getAttrs:e=>{if(typeof e=="string")return!1;const t=e.parentElement;return t===null?!1:t.tagName==="UL"?{listType:"li"}:t.tagName==="OL"?{listType:"oli"}:!1}}]},renderHTML({HTMLAttributes:e}){const t={};for(let[n,r]of Object.entries(On))e[n]&&(t[r]=e[n]);return["div",A.mergeAttributes(t,{class:pt.blockOuter,"data-node-type":"block-outer"}),["div",A.mergeAttributes(t,{class:pt.block,"data-node-type":"block"}),0]]},addInputRules(){return[...["1","2","3"].map(e=>Sn({find:new RegExp(`^(#{1,${e}})\\s$`),type:this.type,getAttributes:{headingType:e}})),Sn({find:/^\s*([-+*])\s$/,type:this.type,getAttributes:{listType:"li"}}),Sn({find:new RegExp(/^1.\s/),type:this.type,getAttributes:{listType:"oli"}})]},addCommands(){return{setBlockHeading:e=>({tr:t,dispatch:n})=>vr(t,n,e.level),unsetBlockHeading:()=>({tr:e,dispatch:t})=>vr(e,t,void 0),unsetList:()=>({tr:e,dispatch:t})=>{const n=e.selection.$anchor.node(-1),r=e.selection.$anchor.posAtIndex(0,-1)-1;return n.type.name==="block"&&n.attrs.listType&&t?(e.setNodeMarkup(r,void 0,{...n.attrs,listType:void 0}),!0):!1},addNewBlockAsSibling:e=>({tr:t,dispatch:n,state:r})=>{var a;const i=ft(t.selection);if(!i)return!1;if(((a=i.node.firstChild)==null?void 0:a.textContent.length)===0)return n&&t.setNodeMarkup(i.pos,void 0,e),!0;const o=i.pos+i.node.nodeSize;let s=r.schema.nodes.block.createAndFill(e);return n&&(t.insert(o,s),t.setSelection(new V.TextSelection(t.doc.resolve(o+1)))),!0},setBlockList:e=>({tr:t,dispatch:n})=>{const r=t.selection.$anchor.node(-1),i=t.selection.$anchor.posAtIndex(0,-1)-1;return r.type.name==="block"?(n&&t.setNodeMarkup(i,void 0,{...r.attrs,listType:e}),!0):!1},joinBackward:()=>({view:e,dispatch:t,state:n})=>oo(n,t,e)}},addProseMirrorPlugins(){return[po(),uo()]},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.first(({commands:n})=>[()=>n.undoInputRule(),()=>n.command(({tr:r})=>{const{selection:i,doc:o}=r,{empty:s,$anchor:a}=i,{pos:l,parent:d}=a,u=V.Selection.atStart(o).from===l;return!s||!u||!d.type.isTextblock||d.textContent.length?!1:n.clearNodes()}),()=>n.deleteSelection(),()=>n.command(({tr:r})=>{const i=r.selection.$anchor.parentOffset===0,o=r.selection.$anchor.node(-1);return i&&o.type.name==="block"?n.first([()=>n.unsetList(),()=>n.liftListItem("block")]):!1}),({chain:r})=>r().command(({tr:i,state:o,dispatch:s})=>{const a=i.selection.$anchor.parentOffset===0,l=i.selection.$anchor,d=l.node(-1);if(a&&d.type.name==="block"){if(d.childCount===2){const u=l.posAtIndex(1,-1)+1,p=l.posAtIndex(2,-1)-1,m=o.doc.resolve(u).blockRange(o.doc.resolve(p));s&&i.lift(m,l.depth-2)}return!0}return!1}).joinBackward().run(),()=>n.selectNodeBackward()]),Enter:()=>this.editor.commands.first(({commands:n})=>[()=>n.splitListItem("block"),({tr:r,dispatch:i})=>{if(r.selection.$from.depth!==3)return!1;const s=r.selection.$anchor.node(-1),a=r.selection.$anchor.posAtIndex(0,-1)-1;return s.type.name==="block"&&s.attrs.listType?(i&&r.setNodeMarkup(a,void 0,{...s.attrs,listType:void 0}),!0):!1},({tr:r,dispatch:i})=>{const o=r.selection.$from;return i&&r.split(o.pos,2).scrollIntoView(),!0}]),Tab:()=>this.editor.commands.sinkListItem("block"),"Shift-Tab":()=>this.editor.commands.liftListItem("block"),"Mod-Alt-0":()=>this.editor.chain().unsetList().unsetBlockHeading().run(),"Mod-Alt-1":()=>this.editor.commands.setBlockHeading({level:"1"}),"Mod-Alt-2":()=>this.editor.commands.setBlockHeading({level:"2"}),"Mod-Alt-3":()=>this.editor.commands.setBlockHeading({level:"3"}),"Mod-Shift-7":()=>this.editor.commands.setBlockList("li"),"Mod-Shift-8":()=>this.editor.commands.setBlockList("oli")}}}),vo=A.Node.create({name:"blockgroup",addOptions(){return{HTMLAttributes:{}}},content:"block+",parseHTML(){return[{tag:"div",getAttrs:e=>typeof e=="string"?!1:e.getAttribute("data-node-type")==="block-group"?null:!1}]},renderHTML({HTMLAttributes:e}){return["div",A.mergeAttributes(this.options.HTMLAttributes,e,{class:pt.blockGroup,"data-node-type":"block-group"}),0]}}),mo=[A.Node.create({name:"content",addOptions(){return{HTMLAttributes:{}}},addAttributes(){return{position:{default:void 0,renderHTML:e=>({"data-position":e.position}),parseHTML:e=>e.getAttribute("data-position")}}},content:"inline*",parseHTML(){return[{tag:"div",getAttrs:e=>typeof e=="string"?!1:e.getAttribute("data-node-type")==="block-content"?null:!1}]},renderHTML({HTMLAttributes:e}){return["div",A.mergeAttributes(this.options.HTMLAttributes,e,{class:pt.blockContent,"data-node-type":"block-content"}),["div",0]]}}),ho,vo,A.Node.create({name:"doc",topNode:!0,content:"blockgroup"})];var v={exports:{}},wt={};/*
2
+ object-assign
3
+ (c) Sindre Sorhus
4
+ @license MIT
5
+ */var Cn,gr;function yr(){if(gr)return Cn;gr=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(o){if(o==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(o)}function i(){try{if(!Object.assign)return!1;var o=new String("abc");if(o[5]="de",Object.getOwnPropertyNames(o)[0]==="5")return!1;for(var s={},a=0;a<10;a++)s["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(s).map(function(u){return s[u]});if(l.join("")!=="0123456789")return!1;var d={};return"abcdefghijklmnopqrst".split("").forEach(function(u){d[u]=u}),Object.keys(Object.assign({},d)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Cn=i()?Object.assign:function(o,s){for(var a,l=r(o),d,u=1;u<arguments.length;u++){a=Object(arguments[u]);for(var p in a)t.call(a,p)&&(l[p]=a[p]);if(e){d=e(a);for(var m=0;m<d.length;m++)n.call(a,d[m])&&(l[d[m]]=a[d[m]])}}return l},Cn}/** @license React v17.0.2
6
+ * react-jsx-runtime.production.min.js
7
+ *
8
+ * Copyright (c) Facebook, Inc. and its affiliates.
9
+ *
10
+ * This source code is licensed under the MIT license found in the
11
+ * LICENSE file in the root directory of this source tree.
12
+ */var br;function go(){if(br)return wt;br=1,yr();var e=qe.default,t=60103;if(wt.Fragment=60107,typeof Symbol=="function"&&Symbol.for){var n=Symbol.for;t=n("react.element"),wt.Fragment=n("react.fragment")}var r=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i=Object.prototype.hasOwnProperty,o={key:!0,ref:!0,__self:!0,__source:!0};function s(a,l,d){var u,p={},m=null,y=null;d!==void 0&&(m=""+d),l.key!==void 0&&(m=""+l.key),l.ref!==void 0&&(y=l.ref);for(u in l)i.call(l,u)&&!o.hasOwnProperty(u)&&(p[u]=l[u]);if(a&&a.defaultProps)for(u in l=a.defaultProps,l)p[u]===void 0&&(p[u]=l[u]);return{$$typeof:t,type:a,key:m,ref:y,props:p,_owner:r.current}}return wt.jsx=s,wt.jsxs=s,wt}var An={};/** @license React v17.0.2
13
+ * react-jsx-runtime.development.js
14
+ *
15
+ * Copyright (c) Facebook, Inc. and its affiliates.
16
+ *
17
+ * This source code is licensed under the MIT license found in the
18
+ * LICENSE file in the root directory of this source tree.
19
+ */var xr;function yo(){return xr||(xr=1,function(e){process.env.NODE_ENV!=="production"&&function(){var t=qe.default,n=yr(),r=60103,i=60106;e.Fragment=60107;var o=60108,s=60114,a=60109,l=60110,d=60112,u=60113,p=60120,m=60115,y=60116,x=60121,b=60122,O=60117,C=60129,N=60131;if(typeof Symbol=="function"&&Symbol.for){var T=Symbol.for;r=T("react.element"),i=T("react.portal"),e.Fragment=T("react.fragment"),o=T("react.strict_mode"),s=T("react.profiler"),a=T("react.provider"),l=T("react.context"),d=T("react.forward_ref"),u=T("react.suspense"),p=T("react.suspense_list"),m=T("react.memo"),y=T("react.lazy"),x=T("react.block"),b=T("react.server.block"),O=T("react.fundamental"),T("react.scope"),T("react.opaque.id"),C=T("react.debug_trace_mode"),T("react.offscreen"),N=T("react.legacy_hidden")}var f=typeof Symbol=="function"&&Symbol.iterator,I="@@iterator";function w(c){if(c===null||typeof c!="object")return null;var g=f&&c[f]||c[I];return typeof g=="function"?g:null}var M=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function j(c){{for(var g=arguments.length,E=new Array(g>1?g-1:0),R=1;R<g;R++)E[R-1]=arguments[R];Y("error",c,E)}}function Y(c,g,E){{var R=M.ReactDebugCurrentFrame,U=R.getStackAddendum();U!==""&&(g+="%s",E=E.concat([U]));var W=E.map(function(F){return""+F});W.unshift("Warning: "+g),Function.prototype.apply.call(console[c],console,W)}}var J=!1;function z(c){return!!(typeof c=="string"||typeof c=="function"||c===e.Fragment||c===s||c===C||c===o||c===u||c===p||c===N||J||typeof c=="object"&&c!==null&&(c.$$typeof===y||c.$$typeof===m||c.$$typeof===a||c.$$typeof===l||c.$$typeof===d||c.$$typeof===O||c.$$typeof===x||c[0]===b))}function q(c,g,E){var R=g.displayName||g.name||"";return c.displayName||(R!==""?E+"("+R+")":E)}function $(c){return c.displayName||"Context"}function G(c){if(c==null)return null;if(typeof c.tag=="number"&&j("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),typeof c=="function")return c.displayName||c.name||null;if(typeof c=="string")return c;switch(c){case e.Fragment:return"Fragment";case i:return"Portal";case s:return"Profiler";case o:return"StrictMode";case u:return"Suspense";case p:return"SuspenseList"}if(typeof c=="object")switch(c.$$typeof){case l:var g=c;return $(g)+".Consumer";case a:var E=c;return $(E._context)+".Provider";case d:return q(c,c.render,"ForwardRef");case m:return G(c.type);case x:return G(c._render);case y:{var R=c,U=R._payload,W=R._init;try{return G(W(U))}catch{return null}}}return null}var te=0,ne,re,X,ye,be,Le,xe;function Be(){}Be.__reactDisabledLog=!0;function De(){{if(te===0){ne=console.log,re=console.info,X=console.warn,ye=console.error,be=console.group,Le=console.groupCollapsed,xe=console.groupEnd;var c={configurable:!0,enumerable:!0,value:Be,writable:!0};Object.defineProperties(console,{info:c,log:c,warn:c,error:c,group:c,groupCollapsed:c,groupEnd:c})}te++}}function we(){{if(te--,te===0){var c={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:n({},c,{value:ne}),info:n({},c,{value:re}),warn:n({},c,{value:X}),error:n({},c,{value:ye}),group:n({},c,{value:be}),groupCollapsed:n({},c,{value:Le}),groupEnd:n({},c,{value:xe})})}te<0&&j("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Ee=M.ReactCurrentDispatcher,_e;function pe(c,g,E){{if(_e===void 0)try{throw Error()}catch(U){var R=U.stack.trim().match(/\n( *(at )?)/);_e=R&&R[1]||""}return`
20
+ `+_e+c}}var He=!1,ke;{var tt=typeof WeakMap=="function"?WeakMap:Map;ke=new tt}function bt(c,g){if(!c||He)return"";{var E=ke.get(c);if(E!==void 0)return E}var R;He=!0;var U=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var W;W=Ee.current,Ee.current=null,De();try{if(g){var F=function(){throw Error()};if(Object.defineProperty(F.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(F,[])}catch(Ge){R=Ge}Reflect.construct(c,[],F)}else{try{F.call()}catch(Ge){R=Ge}c.call(F.prototype)}}else{try{throw Error()}catch(Ge){R=Ge}c()}}catch(Ge){if(Ge&&R&&typeof Ge.stack=="string"){for(var _=Ge.stack.split(`
21
+ `),ce=R.stack.split(`
22
+ `),K=_.length-1,Z=ce.length-1;K>=1&&Z>=0&&_[K]!==ce[Z];)Z--;for(;K>=1&&Z>=0;K--,Z--)if(_[K]!==ce[Z]){if(K!==1||Z!==1)do if(K--,Z--,Z<0||_[K]!==ce[Z]){var Ye=`
23
+ `+_[K].replace(" at new "," at ");return typeof c=="function"&&ke.set(c,Ye),Ye}while(K>=1&&Z>=0);break}}}finally{He=!1,Ee.current=W,we(),Error.prepareStackTrace=U}var _t=c?c.displayName||c.name:"",Ti=_t?pe(_t):"";return typeof c=="function"&&ke.set(c,Ti),Ti}function nt(c,g,E){return bt(c,!1)}function Dt(c){var g=c.prototype;return!!(g&&g.isReactComponent)}function We(c,g,E){if(c==null)return"";if(typeof c=="function")return bt(c,Dt(c));if(typeof c=="string")return pe(c);switch(c){case u:return pe("Suspense");case p:return pe("SuspenseList")}if(typeof c=="object")switch(c.$$typeof){case d:return nt(c.render);case m:return We(c.type,g,E);case x:return nt(c._render);case y:{var R=c,U=R._payload,W=R._init;try{return We(W(U),g,E)}catch{}}}return""}var rt={},it=M.ReactDebugCurrentFrame;function $e(c){if(c){var g=c._owner,E=We(c.type,c._source,g?g.type:null);it.setExtraStackFrame(E)}else it.setExtraStackFrame(null)}function Nt(c,g,E,R,U){{var W=Function.call.bind(Object.prototype.hasOwnProperty);for(var F in c)if(W(c,F)){var _=void 0;try{if(typeof c[F]!="function"){var ce=Error((R||"React class")+": "+E+" type `"+F+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof c[F]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ce.name="Invariant Violation",ce}_=c[F](g,F,R,E,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(K){_=K}_&&!(_ instanceof Error)&&($e(U),j("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",R||"React class",E,F,typeof _),$e(null)),_ instanceof Error&&!(_.message in rt)&&(rt[_.message]=!0,$e(U),j("Failed %s type: %s",E,_.message),$e(null))}}}var se=M.ReactCurrentOwner,Ae=Object.prototype.hasOwnProperty,xt={key:!0,ref:!0,__self:!0,__source:!0},Fe,ot,at;at={};function Mt(c){if(Ae.call(c,"ref")){var g=Object.getOwnPropertyDescriptor(c,"ref").get;if(g&&g.isReactWarning)return!1}return c.ref!==void 0}function Pt(c){if(Ae.call(c,"key")){var g=Object.getOwnPropertyDescriptor(c,"key").get;if(g&&g.isReactWarning)return!1}return c.key!==void 0}function jt(c,g){if(typeof c.ref=="string"&&se.current&&g&&se.current.stateNode!==g){var E=G(se.current.type);at[E]||(j('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',G(se.current.type),c.ref),at[E]=!0)}}function er(c,g){{var E=function(){Fe||(Fe=!0,j("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",g))};E.isReactWarning=!0,Object.defineProperty(c,"key",{get:E,configurable:!0})}}function tr(c,g){{var E=function(){ot||(ot=!0,j("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",g))};E.isReactWarning=!0,Object.defineProperty(c,"ref",{get:E,configurable:!0})}}var nr=function(c,g,E,R,U,W,F){var _={$$typeof:r,type:c,key:g,ref:E,props:F,_owner:W};return _._store={},Object.defineProperty(_._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(_,"_self",{configurable:!1,enumerable:!1,writable:!1,value:R}),Object.defineProperty(_,"_source",{configurable:!1,enumerable:!1,writable:!1,value:U}),Object.freeze&&(Object.freeze(_.props),Object.freeze(_)),_};function rr(c,g,E,R,U){{var W,F={},_=null,ce=null;E!==void 0&&(_=""+E),Pt(g)&&(_=""+g.key),Mt(g)&&(ce=g.ref,jt(g,U));for(W in g)Ae.call(g,W)&&!xt.hasOwnProperty(W)&&(F[W]=g[W]);if(c&&c.defaultProps){var K=c.defaultProps;for(W in K)F[W]===void 0&&(F[W]=K[W])}if(_||ce){var Z=typeof c=="function"?c.displayName||c.name||"Unknown":c;_&&er(F,Z),ce&&tr(F,Z)}return nr(c,_,ce,U,R,se.current,F)}}var nn=M.ReactCurrentOwner,h=M.ReactDebugCurrentFrame;function k(c){if(c){var g=c._owner,E=We(c.type,c._source,g?g.type:null);h.setExtraStackFrame(E)}else h.setExtraStackFrame(null)}var S;S=!1;function H(c){return typeof c=="object"&&c!==null&&c.$$typeof===r}function B(){{if(nn.current){var c=G(nn.current.type);if(c)return`
24
+
25
+ Check the render method of \``+c+"`."}return""}}function ie(c){{if(c!==void 0){var g=c.fileName.replace(/^.*[\\\/]/,""),E=c.lineNumber;return`
26
+
27
+ Check your code at `+g+":"+E+"."}return""}}var le={};function st(c){{var g=B();if(!g){var E=typeof c=="string"?c:c.displayName||c.name;E&&(g=`
28
+
29
+ Check the top-level render call using <`+E+">.")}return g}}function rn(c,g){{if(!c._store||c._store.validated||c.key!=null)return;c._store.validated=!0;var E=st(g);if(le[E])return;le[E]=!0;var R="";c&&c._owner&&c._owner!==nn.current&&(R=" It was passed a child from "+G(c._owner.type)+"."),k(c),j('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',E,R),k(null)}}function ze(c,g){{if(typeof c!="object")return;if(Array.isArray(c))for(var E=0;E<c.length;E++){var R=c[E];H(R)&&rn(R,g)}else if(H(c))c._store&&(c._store.validated=!0);else if(c){var U=w(c);if(typeof U=="function"&&U!==c.entries)for(var W=U.call(c),F;!(F=W.next()).done;)H(F.value)&&rn(F.value,g)}}}function on(c){{var g=c.type;if(g==null||typeof g=="string")return;var E;if(typeof g=="function")E=g.propTypes;else if(typeof g=="object"&&(g.$$typeof===d||g.$$typeof===m))E=g.propTypes;else return;if(E){var R=G(g);Nt(E,c.props,"prop",R,c)}else if(g.PropTypes!==void 0&&!S){S=!0;var U=G(g);j("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",U||"Unknown")}typeof g.getDefaultProps=="function"&&!g.getDefaultProps.isReactClassApproved&&j("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Lt(c){{for(var g=Object.keys(c.props),E=0;E<g.length;E++){var R=g[E];if(R!=="children"&&R!=="key"){k(c),j("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",R),k(null);break}}c.ref!==null&&(k(c),j("Invalid attribute `ref` supplied to `React.Fragment`."),k(null))}}function Je(c,g,E,R,U,W){{var F=z(c);if(!F){var _="";(c===void 0||typeof c=="object"&&c!==null&&Object.keys(c).length===0)&&(_+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var ce=ie(U);ce?_+=ce:_+=B();var K;c===null?K="null":Array.isArray(c)?K="array":c!==void 0&&c.$$typeof===r?(K="<"+(G(c.type)||"Unknown")+" />",_=" Did you accidentally export a JSX literal instead of a component?"):K=typeof c,j("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",K,_)}var Z=rr(c,g,E,U,W);if(Z==null)return Z;if(F){var Ye=g.children;if(Ye!==void 0)if(R)if(Array.isArray(Ye)){for(var _t=0;_t<Ye.length;_t++)ze(Ye[_t],c);Object.freeze&&Object.freeze(Ye)}else j("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else ze(Ye,c)}return c===e.Fragment?Lt(Z):on(Z),Z}}function ir(c,g,E){return Je(c,g,E,!0)}function an(c,g,E){return Je(c,g,E,!1)}var Bt=an,cl=ir;e.jsx=Bt,e.jsxs=cl}()}(An)),An}(function(e){process.env.NODE_ENV==="production"?e.exports=go():e.exports=yo()})(v);const cn={activeStyles:{transform:"none"},colorScheme:"light",colors:{brandFinal:["#F6F6F8","#ECEDF0","#DFE1E6","#C2C7D0","#A6ADBA","#8993A4","#6D798F","#505F79","#344563","#172B4D"]},components:{Menu:{styles:e=>({dropdown:{backgroundColor:"white",boxShadow:`0px 4px 8px ${e.colors.brandFinal[2]}, 0px 0px 1px ${e.colors.brandFinal[2]}`,border:`1px solid ${e.colors.brandFinal[1]}`,borderRadius:"6px",padding:"2px"}})},DragHandleMenu:{styles:e=>({root:{".mantine-Menu-item":{color:e.colors.brandFinal,fontSize:"12px",height:"34px"}}})},EditHyperlinkMenu:{styles:e=>({root:{backgroundColor:"white",boxShadow:`0px 4px 8px ${e.colors.brandFinal[2]}, 0px 0px 1px ${e.colors.brandFinal[2]}`,border:`1px solid ${e.colors.brandFinal[1]}`,borderRadius:"6px",gap:"4px",minWidth:"145px",padding:"2px",".mantine-Group-root":{flexWrap:"nowrap",gap:"8px",paddingInline:"6px",".mantine-Container-root":{color:e.colors.brandFinal,display:"flex",justifyContent:"center",padding:"0",width:"fit-content"},".mantine-TextInput-root":{background:"transparent",width:"300px",".mantine-TextInput-wrapper":{".mantine-TextInput-input":{fontSize:"12px",border:0,padding:0}}}}}})},Toolbar:{styles:e=>({root:{backgroundColor:"white",boxShadow:`0px 4px 8px ${e.colors.brandFinal[2]}, 0px 0px 1px ${e.colors.brandFinal[2]}`,border:`1px solid ${e.colors.brandFinal[1]}`,borderRadius:"6px",flexWrap:"nowrap",gap:"2px",padding:"2px",width:"fit-content",".mantine-UnstyledButton-root":{borderRadius:"4px"},".mantine-Menu-dropdown":{".mantine-Menu-item":{color:e.colors.brandFinal,fontSize:"12px",height:"34px",".mantine-Menu-itemRightSection":{paddingLeft:"5px"}}}}})},SuggestionList:{styles:e=>({root:{".mantine-Menu-item":{".mantine-Menu-itemIcon":{padding:"8px",border:`1px solid ${e.colors.brandFinal[2]}`,backgroundColor:e.colors.brandFinal[0],borderRadius:"4px",color:e.colors.brandFinal},".mantine-Menu-itemLabel":{color:e.colors.brandFinal,paddingRight:"16px",".mantine-Stack-root":{gap:"0"}},".mantine-Menu-itemRightSection":{".mantine-Badge-root":{border:`1px solid ${e.colors.brandFinal[2]}`}}}}})}},fontFamily:"Inter",primaryColor:"brandFinal",primaryShade:9},Rn={bnRoot:"_bnRoot_15721_7"};var de="top",Oe="bottom",Se="right",fe="left",un="auto",Wt=[de,Oe,Se,fe],Et="start",$t="end",bo="clippingParents",wr="viewport",Jt="popper",xo="reference",Er=Wt.reduce(function(e,t){return e.concat([t+"-"+Et,t+"-"+$t])},[]),kr=[].concat(Wt,[un]).reduce(function(e,t){return e.concat([t,t+"-"+Et,t+"-"+$t])},[]),wo="beforeRead",Eo="read",ko="afterRead",To="beforeMain",Oo="main",So="afterMain",Co="beforeWrite",Ao="write",Ro="afterWrite",In=[wo,Eo,ko,To,Oo,So,Co,Ao,Ro];function Me(e){return e?(e.nodeName||"").toLowerCase():null}function Ce(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function ht(e){var t=Ce(e).Element;return e instanceof t||e instanceof Element}function ve(e){var t=Ce(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Dn(e){if(typeof ShadowRoot>"u")return!1;var t=Ce(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Io(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!ve(o)||!Me(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(s){var a=i[s];a===!1?o.removeAttribute(s):o.setAttribute(s,a===!0?"":a)}))})}function Do(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},s=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),a=s.reduce(function(l,d){return l[d]="",l},{});!ve(i)||!Me(i)||(Object.assign(i.style,a),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const Tr={name:"applyStyles",enabled:!0,phase:"write",fn:Io,effect:Do,requires:["computeStyles"]};function Re(e){return e.split("-")[0]}var vt=Math.max,dn=Math.min,kt=Math.round;function Nn(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Or(){return!/^((?!chrome|android).)*safari/i.test(Nn())}function Tt(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&ve(e)&&(i=e.offsetWidth>0&&kt(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&kt(r.height)/e.offsetHeight||1);var s=ht(e)?Ce(e):window,a=s.visualViewport,l=!Or()&&n,d=(r.left+(l&&a?a.offsetLeft:0))/i,u=(r.top+(l&&a?a.offsetTop:0))/o,p=r.width/i,m=r.height/o;return{width:p,height:m,top:u,right:d+p,bottom:u+m,left:d,x:d,y:u}}function Mn(e){var t=Tt(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Sr(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Dn(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Ie(e){return Ce(e).getComputedStyle(e)}function No(e){return["table","td","th"].indexOf(Me(e))>=0}function Ze(e){return((ht(e)?e.ownerDocument:e.document)||window.document).documentElement}function fn(e){return Me(e)==="html"?e:e.assignedSlot||e.parentNode||(Dn(e)?e.host:null)||Ze(e)}function Cr(e){return!ve(e)||Ie(e).position==="fixed"?null:e.offsetParent}function Mo(e){var t=/firefox/i.test(Nn()),n=/Trident/i.test(Nn());if(n&&ve(e)){var r=Ie(e);if(r.position==="fixed")return null}var i=fn(e);for(Dn(i)&&(i=i.host);ve(i)&&["html","body"].indexOf(Me(i))<0;){var o=Ie(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function Yt(e){for(var t=Ce(e),n=Cr(e);n&&No(n)&&Ie(n).position==="static";)n=Cr(n);return n&&(Me(n)==="html"||Me(n)==="body"&&Ie(n).position==="static")?t:n||Mo(e)||t}function Pn(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Gt(e,t,n){return vt(e,dn(t,n))}function Po(e,t,n){var r=Gt(e,t,n);return r>n?n:r}function Ar(){return{top:0,right:0,bottom:0,left:0}}function Rr(e){return Object.assign({},Ar(),e)}function Ir(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var jo=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,Rr(typeof t!="number"?t:Ir(t,Wt))};function Lo(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,a=Re(n.placement),l=Pn(a),d=[fe,Se].indexOf(a)>=0,u=d?"height":"width";if(!(!o||!s)){var p=jo(i.padding,n),m=Mn(o),y=l==="y"?de:fe,x=l==="y"?Oe:Se,b=n.rects.reference[u]+n.rects.reference[l]-s[l]-n.rects.popper[u],O=s[l]-n.rects.reference[l],C=Yt(o),N=C?l==="y"?C.clientHeight||0:C.clientWidth||0:0,T=b/2-O/2,f=p[y],I=N-m[u]-p[x],w=N/2-m[u]/2+T,M=Gt(f,w,I),j=l;n.modifiersData[r]=(t={},t[j]=M,t.centerOffset=M-w,t)}}function Bo(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;if(i!=null&&!(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i))){if(process.env.NODE_ENV!=="production"&&(ve(i)||console.error(['Popper: "arrow" element must be an HTMLElement (not an SVGElement).',"To use an SVG arrow, wrap it in an HTMLElement that will be used as","the arrow."].join(" "))),!Sr(t.elements.popper,i)){process.env.NODE_ENV!=="production"&&console.error(['Popper: "arrow" modifier\'s `element` must be a child of the popper',"element."].join(" "));return}t.elements.arrow=i}}const _o={name:"arrow",enabled:!0,phase:"main",fn:Lo,effect:Bo,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ot(e){return e.split("-")[1]}var Ho={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Fo(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:kt(t*i)/i||0,y:kt(n*i)/i||0}}function Dr(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,s=e.offsets,a=e.position,l=e.gpuAcceleration,d=e.adaptive,u=e.roundOffsets,p=e.isFixed,m=s.x,y=m===void 0?0:m,x=s.y,b=x===void 0?0:x,O=typeof u=="function"?u({x:y,y:b}):{x:y,y:b};y=O.x,b=O.y;var C=s.hasOwnProperty("x"),N=s.hasOwnProperty("y"),T=fe,f=de,I=window;if(d){var w=Yt(n),M="clientHeight",j="clientWidth";if(w===Ce(n)&&(w=Ze(n),Ie(w).position!=="static"&&a==="absolute"&&(M="scrollHeight",j="scrollWidth")),w=w,i===de||(i===fe||i===Se)&&o===$t){f=Oe;var Y=p&&w===I&&I.visualViewport?I.visualViewport.height:w[M];b-=Y-r.height,b*=l?1:-1}if(i===fe||(i===de||i===Oe)&&o===$t){T=Se;var J=p&&w===I&&I.visualViewport?I.visualViewport.width:w[j];y-=J-r.width,y*=l?1:-1}}var z=Object.assign({position:a},d&&Ho),q=u===!0?Fo({x:y,y:b}):{x:y,y:b};if(y=q.x,b=q.y,l){var $;return Object.assign({},z,($={},$[f]=N?"0":"",$[T]=C?"0":"",$.transform=(I.devicePixelRatio||1)<=1?"translate("+y+"px, "+b+"px)":"translate3d("+y+"px, "+b+"px, 0)",$))}return Object.assign({},z,(t={},t[f]=N?b+"px":"",t[T]=C?y+"px":"",t.transform="",t))}function zo(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,s=o===void 0?!0:o,a=n.roundOffsets,l=a===void 0?!0:a;if(process.env.NODE_ENV!=="production"){var d=Ie(t.elements.popper).transitionProperty||"";s&&["transform","top","right","bottom","left"].some(function(p){return d.indexOf(p)>=0})&&console.warn(["Popper: Detected CSS transitions on at least one of the following",'CSS properties: "transform", "top", "right", "bottom", "left".',`
2
30
 
3
31
  `,'Disable the "computeStyles" modifier\'s `adaptive` option to allow',"for smooth transitions, or remove these properties from the CSS","transition declaration on the popper element if only transitioning","opacity or background-color for example.",`
4
32
 
5
- `,"We recommend using the popper element as a wrapper around an inner","element that can have any CSS property transitioned for animations."].join(" "))}var u={placement:le(t.placement),variation:Qe(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,tr(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,tr(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const bo={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:yo,data:{}};var Ht={passive:!0};function wo(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,s=r.resize,a=s===void 0?!0:s,l=oe(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&d.forEach(function(u){u.addEventListener("scroll",n.update,Ht)}),a&&l.addEventListener("resize",n.update,Ht),function(){o&&d.forEach(function(u){u.removeEventListener("scroll",n.update,Ht)}),a&&l.removeEventListener("resize",n.update,Ht)}}const Eo={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:wo,data:{}};var xo={left:"right",right:"left",bottom:"top",top:"bottom"};function Lt(e){return e.replace(/left|right|bottom|top/g,function(t){return xo[t]})}var ko={start:"end",end:"start"};function nr(e){return e.replace(/start|end/g,function(t){return ko[t]})}function un(e){var t=oe(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function dn(e){return Ze(Oe(e)).left+un(e).scrollLeft}function To(e,t){var n=oe(e),r=Oe(e),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;var d=Gn();(d||!d&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:s,x:a+dn(e),y:l}}function Co(e){var t,n=Oe(e),r=un(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Fe(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=Fe(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+dn(e),l=-r.scrollTop;return ce(i||n).direction==="rtl"&&(a+=Fe(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}function fn(e){var t=ce(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function rr(e){return["html","body","#document"].indexOf(fe(e))>=0?e.ownerDocument.body:X(e)&&fn(e)?e:rr(Dt(e))}function yt(e,t){var n;t===void 0&&(t=[]);var r=rr(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=oe(r),s=i?[o].concat(o.visualViewport||[],fn(r)?r:[]):r,a=t.concat(s);return i?a:a.concat(yt(Dt(s)))}function pn(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function So(e,t){var n=Ze(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function ir(e,t,n){return t===$n?pn(To(e,n)):ze(t)?So(t,n):pn(Co(Oe(e)))}function Oo(e){var t=yt(Dt(e)),n=["absolute","fixed"].indexOf(ce(e).position)>=0,r=n&&X(e)?vt(e):e;return ze(r)?t.filter(function(i){return ze(i)&&Yn(i,r)&&fe(i)!=="body"}):[]}function Ao(e,t,n,r){var i=t==="clippingParents"?Oo(e):[].concat(t),o=[].concat(i,[n]),s=o[0],a=o.reduce(function(l,d){var u=ir(e,d,r);return l.top=Fe(u.top,l.top),l.right=It(u.right,l.right),l.bottom=It(u.bottom,l.bottom),l.left=Fe(u.left,l.left),l},ir(e,s,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function or(e){var t=e.reference,n=e.element,r=e.placement,i=r?le(r):null,o=r?Qe(r):null,s=t.x+t.width/2-n.width/2,a=t.y+t.height/2-n.height/2,l;switch(i){case J:l={x:s,y:t.y-n.height};break;case re:l={x:s,y:t.y+t.height};break;case ie:l={x:t.x+t.width,y:a};break;case G:l={x:t.x-n.width,y:a};break;default:l={x:t.x,y:t.y}}var d=i?cn(i):null;if(d!=null){var u=d==="y"?"height":"width";switch(o){case Ye:l[d]=l[d]-(t[u]/2-n[u]/2);break;case ht:l[d]=l[d]+(t[u]/2-n[u]/2);break}}return l}function bt(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,s=o===void 0?e.strategy:o,a=n.boundary,l=a===void 0?Gi:a,d=n.rootBoundary,u=d===void 0?$n:d,f=n.elementContext,v=f===void 0?mt:f,m=n.altBoundary,y=m===void 0?!1:m,h=n.padding,w=h===void 0?0:h,x=Qn(typeof w!="number"?w:er(w,pt)),S=v===mt?Yi:mt,A=e.rects.popper,c=e.elements[y?S:v],k=Ao(ze(c)?c:c.contextElement||Oe(e.elements.popper),l,u,s),g=Ze(e.elements.reference),N=or({reference:g,element:A,strategy:"absolute",placement:i}),z=pn(Object.assign({},A,N)),F=v===mt?z:g,_={top:k.top-F.top+x.top,bottom:F.bottom-k.bottom+x.bottom,left:k.left-F.left+x.left,right:F.right-k.right+x.right},I=e.modifiersData.offset;if(v===mt&&I){var L=I[i];Object.keys(_).forEach(function(B){var ee=[ie,re].indexOf(B)>=0?1:-1,te=[J,re].indexOf(B)>=0?"y":"x";_[B]+=L[te]*ee})}return _}function No(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,d=l===void 0?Kn:l,u=Qe(r),f=u?a?Un:Un.filter(function(y){return Qe(y)===u}):pt,v=f.filter(function(y){return d.indexOf(y)>=0});v.length===0&&(v=f,process.env.NODE_ENV!=="production"&&console.error(["Popper: The `allowedAutoPlacements` option did not allow any","placements. Ensure the `placement` option matches the variation","of the allowed placements.",'For example, "auto" cannot be used to allow "bottom-start".','Use "auto-start" instead.'].join(" ")));var m=v.reduce(function(y,h){return y[h]=bt(e,{placement:h,boundary:i,rootBoundary:o,padding:s})[le(h)],y},{});return Object.keys(m).sort(function(y,h){return m[y]-m[h]})}function Ro(e){if(le(e)===Mt)return[];var t=Lt(e);return[nr(e),t,nr(t)]}function Mo(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,a=s===void 0?!0:s,l=n.fallbackPlacements,d=n.padding,u=n.boundary,f=n.rootBoundary,v=n.altBoundary,m=n.flipVariations,y=m===void 0?!0:m,h=n.allowedAutoPlacements,w=t.options.placement,x=le(w),S=x===w,A=l||(S||!y?[Lt(w)]:Ro(w)),c=[w].concat(A).reduce(function(we,ue){return we.concat(le(ue)===Mt?No(t,{placement:ue,boundary:u,rootBoundary:f,padding:d,flipVariations:y,allowedAutoPlacements:h}):ue)},[]),k=t.rects.reference,g=t.rects.popper,N=new Map,z=!0,F=c[0],_=0;_<c.length;_++){var I=c[_],L=le(I),B=Qe(I)===Ye,ee=[J,re].indexOf(L)>=0,te=ee?"width":"height",W=bt(t,{placement:I,boundary:u,rootBoundary:f,altBoundary:v,padding:d}),$=ee?B?ie:G:B?re:J;k[te]>g[te]&&($=Lt($));var j=Lt($),me=[];if(o&&me.push(W[L]<=0),a&&me.push(W[$]<=0,W[j]<=0),me.every(function(we){return we})){F=I,z=!1;break}N.set(I,me)}if(z)for(var ve=y?3:1,We=function(ue){var Ee=c.find(function(ot){var xe=N.get(ot);if(xe)return xe.slice(0,ue).every(function(at){return at})});if(Ee)return F=Ee,"break"},ge=ve;ge>0;ge--){var $e=We(ge);if($e==="break")break}t.placement!==F&&(t.modifiersData[r]._skip=!0,t.placement=F,t.reset=!0)}}const Io={name:"flip",enabled:!0,phase:"main",fn:Mo,requiresIfExists:["offset"],data:{_skip:!1}};function ar(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function sr(e){return[J,ie,re,G].some(function(t){return e[t]>=0})}function Do(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,s=bt(t,{elementContext:"reference"}),a=bt(t,{altBoundary:!0}),l=ar(s,r),d=ar(a,i,o),u=sr(l),f=sr(d);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:d,isReferenceHidden:u,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":f})}const Ho={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Do};function Lo(e,t,n){var r=le(e),i=[G,J].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,s=o[0],a=o[1];return s=s||0,a=(a||0)*i,[G,ie].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}function _o(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,s=Kn.reduce(function(u,f){return u[f]=Lo(f,t.rects,o),u},{}),a=s[t.placement],l=a.x,d=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=d),t.modifiersData[r]=s}const Bo={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:_o};function Po(e){var t=e.state,n=e.name;t.modifiersData[n]=or({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const zo={name:"popperOffsets",enabled:!0,phase:"read",fn:Po,data:{}};function Fo(e){return e==="x"?"y":"x"}function Vo(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,a=s===void 0?!1:s,l=n.boundary,d=n.rootBoundary,u=n.altBoundary,f=n.padding,v=n.tether,m=v===void 0?!0:v,y=n.tetherOffset,h=y===void 0?0:y,w=bt(t,{boundary:l,rootBoundary:d,padding:f,altBoundary:u}),x=le(t.placement),S=Qe(t.placement),A=!S,c=cn(x),k=Fo(c),g=t.modifiersData.popperOffsets,N=t.rects.reference,z=t.rects.popper,F=typeof h=="function"?h(Object.assign({},t.rects,{placement:t.placement})):h,_=typeof F=="number"?{mainAxis:F,altAxis:F}:Object.assign({mainAxis:0,altAxis:0},F),I=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,L={x:0,y:0};if(!!g){if(o){var B,ee=c==="y"?J:G,te=c==="y"?re:ie,W=c==="y"?"height":"width",$=g[c],j=$+w[ee],me=$-w[te],ve=m?-z[W]/2:0,We=S===Ye?N[W]:z[W],ge=S===Ye?-z[W]:-N[W],$e=t.elements.arrow,we=m&&$e?ln($e):{width:0,height:0},ue=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Zn(),Ee=ue[ee],ot=ue[te],xe=gt(0,N[W],we[W]),at=A?N[W]/2-ve-xe-Ee-_.mainAxis:We-xe-Ee-_.mainAxis,Me=A?-N[W]/2+ve+xe+ot+_.mainAxis:ge+xe+ot+_.mainAxis,st=t.elements.arrow&&vt(t.elements.arrow),Pt=st?c==="y"?st.clientTop||0:st.clientLeft||0:0,kt=(B=I==null?void 0:I[c])!=null?B:0,zt=$+at-kt-Pt,Ft=$+Me-kt,Tt=gt(m?It(j,zt):j,$,m?Fe(me,Ft):me);g[c]=Tt,L[c]=Tt-$}if(a){var Ct,Vt=c==="x"?J:G,jt=c==="x"?re:ie,ke=g[k],Ie=k==="y"?"height":"width",St=ke+w[Vt],Ue=ke-w[jt],Ot=[J,G].indexOf(x)!==-1,qt=(Ct=I==null?void 0:I[k])!=null?Ct:0,Wt=Ot?St:ke-N[Ie]-z[Ie]-qt+_.altAxis,$t=Ot?ke+N[Ie]+z[Ie]-qt-_.altAxis:Ue,Ut=m&&Ot?uo(Wt,ke,$t):gt(m?Wt:St,ke,m?$t:Ue);g[k]=Ut,L[k]=Ut-ke}t.modifiersData[r]=L}}const jo={name:"preventOverflow",enabled:!0,phase:"main",fn:Vo,requiresIfExists:["offset"]};function qo(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Wo(e){return e===oe(e)||!X(e)?un(e):qo(e)}function $o(e){var t=e.getBoundingClientRect(),n=Xe(t.width)/e.offsetWidth||1,r=Xe(t.height)/e.offsetHeight||1;return n!==1||r!==1}function Uo(e,t,n){n===void 0&&(n=!1);var r=X(t),i=X(t)&&$o(t),o=Oe(t),s=Ze(e,i,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((fe(t)!=="body"||fn(o))&&(a=Wo(t)),X(t)?(l=Ze(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=dn(o))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function Ko(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var s=[].concat(o.requires||[],o.requiresIfExists||[]);s.forEach(function(a){if(!n.has(a)){var l=t.get(a);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function Jo(e){var t=Ko(e);return on.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function Go(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Ae(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return[].concat(n).reduce(function(i,o){return i.replace(/%s/,o)},e)}var Ve='Popper: modifier "%s" provided an invalid %s property, expected %s but got %s',Yo='Popper: modifier "%s" requires "%s", but "%s" modifier is not available',lr=["name","enabled","phase","fn","effect","requires","options"];function Xo(e){e.forEach(function(t){[].concat(Object.keys(t),lr).filter(function(n,r,i){return i.indexOf(n)===r}).forEach(function(n){switch(n){case"name":typeof t.name!="string"&&console.error(Ae(Ve,String(t.name),'"name"','"string"','"'+String(t.name)+'"'));break;case"enabled":typeof t.enabled!="boolean"&&console.error(Ae(Ve,t.name,'"enabled"','"boolean"','"'+String(t.enabled)+'"'));break;case"phase":on.indexOf(t.phase)<0&&console.error(Ae(Ve,t.name,'"phase"',"either "+on.join(", "),'"'+String(t.phase)+'"'));break;case"fn":typeof t.fn!="function"&&console.error(Ae(Ve,t.name,'"fn"','"function"','"'+String(t.fn)+'"'));break;case"effect":t.effect!=null&&typeof t.effect!="function"&&console.error(Ae(Ve,t.name,'"effect"','"function"','"'+String(t.fn)+'"'));break;case"requires":t.requires!=null&&!Array.isArray(t.requires)&&console.error(Ae(Ve,t.name,'"requires"','"array"','"'+String(t.requires)+'"'));break;case"requiresIfExists":Array.isArray(t.requiresIfExists)||console.error(Ae(Ve,t.name,'"requiresIfExists"','"array"','"'+String(t.requiresIfExists)+'"'));break;case"options":case"data":break;default:console.error('PopperJS: an invalid property has been provided to the "'+t.name+'" modifier, valid properties are '+lr.map(function(r){return'"'+r+'"'}).join(", ")+'; but "'+n+'" was provided.')}t.requires&&t.requires.forEach(function(r){e.find(function(i){return i.name===r})==null&&console.error(Ae(Yo,String(t.name),r,r))})})})}function Zo(e,t){var n=new Set;return e.filter(function(r){var i=t(r);if(!n.has(i))return n.add(i),!0})}function Qo(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var cr="Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.",ea="Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.",ur={placement:"bottom",modifiers:[],strategy:"absolute"};function dr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function ta(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,o=i===void 0?ur:i;return function(a,l,d){d===void 0&&(d=o);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},ur,o),modifiersData:{},elements:{reference:a,popper:l},attributes:{},styles:{}},f=[],v=!1,m={state:u,setOptions:function(x){var S=typeof x=="function"?x(u.options):x;h(),u.options=Object.assign({},o,u.options,S),u.scrollParents={reference:ze(a)?yt(a):a.contextElement?yt(a.contextElement):[],popper:yt(l)};var A=Jo(Qo([].concat(r,u.options.modifiers)));if(u.orderedModifiers=A.filter(function(I){return I.enabled}),process.env.NODE_ENV!=="production"){var c=Zo([].concat(A,u.options.modifiers),function(I){var L=I.name;return L});if(Xo(c),le(u.options.placement)===Mt){var k=u.orderedModifiers.find(function(I){var L=I.name;return L==="flip"});k||console.error(['Popper: "auto" placements require the "flip" modifier be',"present and enabled to work."].join(" "))}var g=ce(l),N=g.marginTop,z=g.marginRight,F=g.marginBottom,_=g.marginLeft;[N,z,F,_].some(function(I){return parseFloat(I)})&&console.warn(['Popper: CSS "margin" styles cannot be used to apply padding',"between the popper and its reference element or boundary.","To replicate margin, use the `offset` modifier, as well as","the `padding` option in the `preventOverflow` and `flip`","modifiers."].join(" "))}return y(),m.update()},forceUpdate:function(){if(!v){var x=u.elements,S=x.reference,A=x.popper;if(!dr(S,A)){process.env.NODE_ENV!=="production"&&console.error(cr);return}u.rects={reference:Uo(S,vt(A),u.options.strategy==="fixed"),popper:ln(A)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(I){return u.modifiersData[I.name]=Object.assign({},I.data)});for(var c=0,k=0;k<u.orderedModifiers.length;k++){if(process.env.NODE_ENV!=="production"&&(c+=1,c>100)){console.error(ea);break}if(u.reset===!0){u.reset=!1,k=-1;continue}var g=u.orderedModifiers[k],N=g.fn,z=g.options,F=z===void 0?{}:z,_=g.name;typeof N=="function"&&(u=N({state:u,options:F,name:_,instance:m})||u)}}},update:Go(function(){return new Promise(function(w){m.forceUpdate(),w(u)})}),destroy:function(){h(),v=!0}};if(!dr(a,l))return process.env.NODE_ENV!=="production"&&console.error(cr),m;m.setOptions(d).then(function(w){!v&&d.onFirstUpdate&&d.onFirstUpdate(w)});function y(){u.orderedModifiers.forEach(function(w){var x=w.name,S=w.options,A=S===void 0?{}:S,c=w.effect;if(typeof c=="function"){var k=c({state:u,name:x,instance:m,options:A}),g=function(){};f.push(k||g)}})}function h(){f.forEach(function(w){return w()}),f=[]}return m}}var na=[Eo,zo,bo,Jn,Bo,Io,jo,mo,Ho],ra=ta({defaultModifiers:na}),ia="tippy-box",fr="tippy-content",oa="tippy-backdrop",pr="tippy-arrow",hr="tippy-svg-arrow",je={passive:!0,capture:!0},mr=function(){return document.body};function aa(e,t){return{}.hasOwnProperty.call(e,t)}function hn(e,t,n){if(Array.isArray(e)){var r=e[t];return r==null?Array.isArray(n)?n[t]:n:r}return e}function mn(e,t){var n={}.toString.call(e);return n.indexOf("[object")===0&&n.indexOf(t+"]")>-1}function vr(e,t){return typeof e=="function"?e.apply(void 0,t):e}function gr(e,t){if(t===0)return e;var n;return function(r){clearTimeout(n),n=setTimeout(function(){e(r)},t)}}function sa(e,t){var n=Object.assign({},e);return t.forEach(function(r){delete n[r]}),n}function la(e){return e.split(/\s+/).filter(Boolean)}function et(e){return[].concat(e)}function yr(e,t){e.indexOf(t)===-1&&e.push(t)}function ca(e){return e.filter(function(t,n){return e.indexOf(t)===n})}function ua(e){return e.split("-")[0]}function _t(e){return[].slice.call(e)}function br(e){return Object.keys(e).reduce(function(t,n){return e[n]!==void 0&&(t[n]=e[n]),t},{})}function wt(){return document.createElement("div")}function Et(e){return["Element","Fragment"].some(function(t){return mn(e,t)})}function da(e){return mn(e,"NodeList")}function fa(e){return mn(e,"MouseEvent")}function pa(e){return!!(e&&e._tippy&&e._tippy.reference===e)}function ha(e){return Et(e)?[e]:da(e)?_t(e):Array.isArray(e)?e:_t(document.querySelectorAll(e))}function vn(e,t){e.forEach(function(n){n&&(n.style.transitionDuration=t+"ms")})}function wr(e,t){e.forEach(function(n){n&&n.setAttribute("data-state",t)})}function ma(e){var t,n=et(e),r=n[0];return r!=null&&(t=r.ownerDocument)!=null&&t.body?r.ownerDocument:document}function va(e,t){var n=t.clientX,r=t.clientY;return e.every(function(i){var o=i.popperRect,s=i.popperState,a=i.props,l=a.interactiveBorder,d=ua(s.placement),u=s.modifiersData.offset;if(!u)return!0;var f=d==="bottom"?u.top.y:0,v=d==="top"?u.bottom.y:0,m=d==="right"?u.left.x:0,y=d==="left"?u.right.x:0,h=o.top-r+f>l,w=r-o.bottom-v>l,x=o.left-n+m>l,S=n-o.right-y>l;return h||w||x||S})}function gn(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(i){e[r](i,n)})}function Er(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=n.getRootNode==null||(r=n.getRootNode())==null?void 0:r.host}return!1}var pe={isTouch:!1},xr=0;function ga(){pe.isTouch||(pe.isTouch=!0,window.performance&&document.addEventListener("mousemove",kr))}function kr(){var e=performance.now();e-xr<20&&(pe.isTouch=!1,document.removeEventListener("mousemove",kr)),xr=e}function ya(){var e=document.activeElement;if(pa(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function ba(){document.addEventListener("touchstart",ga,je),window.addEventListener("blur",ya)}var wa=typeof window<"u"&&typeof document<"u",Ea=wa?!!window.msCrypto:!1;function tt(e){var t=e==="destroy"?"n already-":" ";return[e+"() was called on a"+t+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function Tr(e){var t=/[ \t]{2,}/g,n=/^[ \t]*/gm;return e.replace(t," ").replace(n,"").trim()}function xa(e){return Tr(`
33
+ `,"We recommend using the popper element as a wrapper around an inner","element that can have any CSS property transitioned for animations."].join(" "))}var u={placement:Re(t.placement),variation:Ot(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Dr(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Dr(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Vo={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:zo,data:{}};var pn={passive:!0};function qo(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,s=r.resize,a=s===void 0?!0:s,l=Ce(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&d.forEach(function(u){u.addEventListener("scroll",n.update,pn)}),a&&l.addEventListener("resize",n.update,pn),function(){o&&d.forEach(function(u){u.removeEventListener("scroll",n.update,pn)}),a&&l.removeEventListener("resize",n.update,pn)}}const Uo={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:qo,data:{}};var Wo={left:"right",right:"left",bottom:"top",top:"bottom"};function hn(e){return e.replace(/left|right|bottom|top/g,function(t){return Wo[t]})}var $o={start:"end",end:"start"};function Nr(e){return e.replace(/start|end/g,function(t){return $o[t]})}function jn(e){var t=Ce(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Ln(e){return Tt(Ze(e)).left+jn(e).scrollLeft}function Jo(e,t){var n=Ce(e),r=Ze(e),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;var d=Or();(d||!d&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:s,x:a+Ln(e),y:l}}function Yo(e){var t,n=Ze(e),r=jn(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=vt(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=vt(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+Ln(e),l=-r.scrollTop;return Ie(i||n).direction==="rtl"&&(a+=vt(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}function Bn(e){var t=Ie(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function Mr(e){return["html","body","#document"].indexOf(Me(e))>=0?e.ownerDocument.body:ve(e)&&Bn(e)?e:Mr(fn(e))}function Kt(e,t){var n;t===void 0&&(t=[]);var r=Mr(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Ce(r),s=i?[o].concat(o.visualViewport||[],Bn(r)?r:[]):r,a=t.concat(s);return i?a:a.concat(Kt(fn(s)))}function _n(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Go(e,t){var n=Tt(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function Pr(e,t,n){return t===wr?_n(Jo(e,n)):ht(t)?Go(t,n):_n(Yo(Ze(e)))}function Ko(e){var t=Kt(fn(e)),n=["absolute","fixed"].indexOf(Ie(e).position)>=0,r=n&&ve(e)?Yt(e):e;return ht(r)?t.filter(function(i){return ht(i)&&Sr(i,r)&&Me(i)!=="body"}):[]}function Xo(e,t,n,r){var i=t==="clippingParents"?Ko(e):[].concat(t),o=[].concat(i,[n]),s=o[0],a=o.reduce(function(l,d){var u=Pr(e,d,r);return l.top=vt(u.top,l.top),l.right=dn(u.right,l.right),l.bottom=dn(u.bottom,l.bottom),l.left=vt(u.left,l.left),l},Pr(e,s,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function jr(e){var t=e.reference,n=e.element,r=e.placement,i=r?Re(r):null,o=r?Ot(r):null,s=t.x+t.width/2-n.width/2,a=t.y+t.height/2-n.height/2,l;switch(i){case de:l={x:s,y:t.y-n.height};break;case Oe:l={x:s,y:t.y+t.height};break;case Se:l={x:t.x+t.width,y:a};break;case fe:l={x:t.x-n.width,y:a};break;default:l={x:t.x,y:t.y}}var d=i?Pn(i):null;if(d!=null){var u=d==="y"?"height":"width";switch(o){case Et:l[d]=l[d]-(t[u]/2-n[u]/2);break;case $t:l[d]=l[d]+(t[u]/2-n[u]/2);break}}return l}function Xt(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,s=o===void 0?e.strategy:o,a=n.boundary,l=a===void 0?bo:a,d=n.rootBoundary,u=d===void 0?wr:d,p=n.elementContext,m=p===void 0?Jt:p,y=n.altBoundary,x=y===void 0?!1:y,b=n.padding,O=b===void 0?0:b,C=Rr(typeof O!="number"?O:Ir(O,Wt)),N=m===Jt?xo:Jt,T=e.rects.popper,f=e.elements[x?N:m],I=Xo(ht(f)?f:f.contextElement||Ze(e.elements.popper),l,u,s),w=Tt(e.elements.reference),M=jr({reference:w,element:T,strategy:"absolute",placement:i}),j=_n(Object.assign({},T,M)),Y=m===Jt?j:w,J={top:I.top-Y.top+C.top,bottom:Y.bottom-I.bottom+C.bottom,left:I.left-Y.left+C.left,right:Y.right-I.right+C.right},z=e.modifiersData.offset;if(m===Jt&&z){var q=z[i];Object.keys(J).forEach(function($){var G=[Se,Oe].indexOf($)>=0?1:-1,te=[de,Oe].indexOf($)>=0?"y":"x";J[$]+=q[te]*G})}return J}function Zo(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,d=l===void 0?kr:l,u=Ot(r),p=u?a?Er:Er.filter(function(x){return Ot(x)===u}):Wt,m=p.filter(function(x){return d.indexOf(x)>=0});m.length===0&&(m=p,process.env.NODE_ENV!=="production"&&console.error(["Popper: The `allowedAutoPlacements` option did not allow any","placements. Ensure the `placement` option matches the variation","of the allowed placements.",'For example, "auto" cannot be used to allow "bottom-start".','Use "auto-start" instead.'].join(" ")));var y=m.reduce(function(x,b){return x[b]=Xt(e,{placement:b,boundary:i,rootBoundary:o,padding:s})[Re(b)],x},{});return Object.keys(y).sort(function(x,b){return y[x]-y[b]})}function Qo(e){if(Re(e)===un)return[];var t=hn(e);return[Nr(e),t,Nr(t)]}function ea(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,a=s===void 0?!0:s,l=n.fallbackPlacements,d=n.padding,u=n.boundary,p=n.rootBoundary,m=n.altBoundary,y=n.flipVariations,x=y===void 0?!0:y,b=n.allowedAutoPlacements,O=t.options.placement,C=Re(O),N=C===O,T=l||(N||!x?[hn(O)]:Qo(O)),f=[O].concat(T).reduce(function(De,we){return De.concat(Re(we)===un?Zo(t,{placement:we,boundary:u,rootBoundary:p,padding:d,flipVariations:x,allowedAutoPlacements:b}):we)},[]),I=t.rects.reference,w=t.rects.popper,M=new Map,j=!0,Y=f[0],J=0;J<f.length;J++){var z=f[J],q=Re(z),$=Ot(z)===Et,G=[de,Oe].indexOf(q)>=0,te=G?"width":"height",ne=Xt(t,{placement:z,boundary:u,rootBoundary:p,altBoundary:m,padding:d}),re=G?$?Se:fe:$?Oe:de;I[te]>w[te]&&(re=hn(re));var X=hn(re),ye=[];if(o&&ye.push(ne[q]<=0),a&&ye.push(ne[re]<=0,ne[X]<=0),ye.every(function(De){return De})){Y=z,j=!1;break}M.set(z,ye)}if(j)for(var be=x?3:1,Le=function(we){var Ee=f.find(function(_e){var pe=M.get(_e);if(pe)return pe.slice(0,we).every(function(He){return He})});if(Ee)return Y=Ee,"break"},xe=be;xe>0;xe--){var Be=Le(xe);if(Be==="break")break}t.placement!==Y&&(t.modifiersData[r]._skip=!0,t.placement=Y,t.reset=!0)}}const ta={name:"flip",enabled:!0,phase:"main",fn:ea,requiresIfExists:["offset"],data:{_skip:!1}};function Lr(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Br(e){return[de,Se,Oe,fe].some(function(t){return e[t]>=0})}function na(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,s=Xt(t,{elementContext:"reference"}),a=Xt(t,{altBoundary:!0}),l=Lr(s,r),d=Lr(a,i,o),u=Br(l),p=Br(d);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:d,isReferenceHidden:u,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":p})}const ra={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:na};function ia(e,t,n){var r=Re(e),i=[fe,de].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,s=o[0],a=o[1];return s=s||0,a=(a||0)*i,[fe,Se].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}function oa(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,s=kr.reduce(function(u,p){return u[p]=ia(p,t.rects,o),u},{}),a=s[t.placement],l=a.x,d=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=d),t.modifiersData[r]=s}const aa={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:oa};function sa(e){var t=e.state,n=e.name;t.modifiersData[n]=jr({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const la={name:"popperOffsets",enabled:!0,phase:"read",fn:sa,data:{}};function ca(e){return e==="x"?"y":"x"}function ua(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,a=s===void 0?!1:s,l=n.boundary,d=n.rootBoundary,u=n.altBoundary,p=n.padding,m=n.tether,y=m===void 0?!0:m,x=n.tetherOffset,b=x===void 0?0:x,O=Xt(t,{boundary:l,rootBoundary:d,padding:p,altBoundary:u}),C=Re(t.placement),N=Ot(t.placement),T=!N,f=Pn(C),I=ca(f),w=t.modifiersData.popperOffsets,M=t.rects.reference,j=t.rects.popper,Y=typeof b=="function"?b(Object.assign({},t.rects,{placement:t.placement})):b,J=typeof Y=="number"?{mainAxis:Y,altAxis:Y}:Object.assign({mainAxis:0,altAxis:0},Y),z=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,q={x:0,y:0};if(!!w){if(o){var $,G=f==="y"?de:fe,te=f==="y"?Oe:Se,ne=f==="y"?"height":"width",re=w[f],X=re+O[G],ye=re-O[te],be=y?-j[ne]/2:0,Le=N===Et?M[ne]:j[ne],xe=N===Et?-j[ne]:-M[ne],Be=t.elements.arrow,De=y&&Be?Mn(Be):{width:0,height:0},we=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Ar(),Ee=we[G],_e=we[te],pe=Gt(0,M[ne],De[ne]),He=T?M[ne]/2-be-pe-Ee-J.mainAxis:Le-pe-Ee-J.mainAxis,ke=T?-M[ne]/2+be+pe+_e+J.mainAxis:xe+pe+_e+J.mainAxis,tt=t.elements.arrow&&Yt(t.elements.arrow),bt=tt?f==="y"?tt.clientTop||0:tt.clientLeft||0:0,nt=($=z==null?void 0:z[f])!=null?$:0,Dt=re+He-nt-bt,We=re+ke-nt,rt=Gt(y?dn(X,Dt):X,re,y?vt(ye,We):ye);w[f]=rt,q[f]=rt-re}if(a){var it,$e=f==="x"?de:fe,Nt=f==="x"?Oe:Se,se=w[I],Ae=I==="y"?"height":"width",xt=se+O[$e],Fe=se-O[Nt],ot=[de,fe].indexOf(C)!==-1,at=(it=z==null?void 0:z[I])!=null?it:0,Mt=ot?xt:se-M[Ae]-j[Ae]-at+J.altAxis,Pt=ot?se+M[Ae]+j[Ae]-at-J.altAxis:Fe,jt=y&&ot?Po(Mt,se,Pt):Gt(y?Mt:xt,se,y?Pt:Fe);w[I]=jt,q[I]=jt-se}t.modifiersData[r]=q}}const da={name:"preventOverflow",enabled:!0,phase:"main",fn:ua,requiresIfExists:["offset"]};function fa(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function pa(e){return e===Ce(e)||!ve(e)?jn(e):fa(e)}function ha(e){var t=e.getBoundingClientRect(),n=kt(t.width)/e.offsetWidth||1,r=kt(t.height)/e.offsetHeight||1;return n!==1||r!==1}function va(e,t,n){n===void 0&&(n=!1);var r=ve(t),i=ve(t)&&ha(t),o=Ze(t),s=Tt(e,i,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Me(t)!=="body"||Bn(o))&&(a=pa(t)),ve(t)?(l=Tt(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=Ln(o))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function ma(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var s=[].concat(o.requires||[],o.requiresIfExists||[]);s.forEach(function(a){if(!n.has(a)){var l=t.get(a);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function ga(e){var t=ma(e);return In.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function ya(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Qe(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return[].concat(n).reduce(function(i,o){return i.replace(/%s/,o)},e)}var mt='Popper: modifier "%s" provided an invalid %s property, expected %s but got %s',ba='Popper: modifier "%s" requires "%s", but "%s" modifier is not available',_r=["name","enabled","phase","fn","effect","requires","options"];function xa(e){e.forEach(function(t){[].concat(Object.keys(t),_r).filter(function(n,r,i){return i.indexOf(n)===r}).forEach(function(n){switch(n){case"name":typeof t.name!="string"&&console.error(Qe(mt,String(t.name),'"name"','"string"','"'+String(t.name)+'"'));break;case"enabled":typeof t.enabled!="boolean"&&console.error(Qe(mt,t.name,'"enabled"','"boolean"','"'+String(t.enabled)+'"'));break;case"phase":In.indexOf(t.phase)<0&&console.error(Qe(mt,t.name,'"phase"',"either "+In.join(", "),'"'+String(t.phase)+'"'));break;case"fn":typeof t.fn!="function"&&console.error(Qe(mt,t.name,'"fn"','"function"','"'+String(t.fn)+'"'));break;case"effect":t.effect!=null&&typeof t.effect!="function"&&console.error(Qe(mt,t.name,'"effect"','"function"','"'+String(t.fn)+'"'));break;case"requires":t.requires!=null&&!Array.isArray(t.requires)&&console.error(Qe(mt,t.name,'"requires"','"array"','"'+String(t.requires)+'"'));break;case"requiresIfExists":Array.isArray(t.requiresIfExists)||console.error(Qe(mt,t.name,'"requiresIfExists"','"array"','"'+String(t.requiresIfExists)+'"'));break;case"options":case"data":break;default:console.error('PopperJS: an invalid property has been provided to the "'+t.name+'" modifier, valid properties are '+_r.map(function(r){return'"'+r+'"'}).join(", ")+'; but "'+n+'" was provided.')}t.requires&&t.requires.forEach(function(r){e.find(function(i){return i.name===r})==null&&console.error(Qe(ba,String(t.name),r,r))})})})}function wa(e,t){var n=new Set;return e.filter(function(r){var i=t(r);if(!n.has(i))return n.add(i),!0})}function Ea(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var Hr="Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.",ka="Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.",Fr={placement:"bottom",modifiers:[],strategy:"absolute"};function zr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function Ta(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,o=i===void 0?Fr:i;return function(a,l,d){d===void 0&&(d=o);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},Fr,o),modifiersData:{},elements:{reference:a,popper:l},attributes:{},styles:{}},p=[],m=!1,y={state:u,setOptions:function(C){var N=typeof C=="function"?C(u.options):C;b(),u.options=Object.assign({},o,u.options,N),u.scrollParents={reference:ht(a)?Kt(a):a.contextElement?Kt(a.contextElement):[],popper:Kt(l)};var T=ga(Ea([].concat(r,u.options.modifiers)));if(u.orderedModifiers=T.filter(function(z){return z.enabled}),process.env.NODE_ENV!=="production"){var f=wa([].concat(T,u.options.modifiers),function(z){var q=z.name;return q});if(xa(f),Re(u.options.placement)===un){var I=u.orderedModifiers.find(function(z){var q=z.name;return q==="flip"});I||console.error(['Popper: "auto" placements require the "flip" modifier be',"present and enabled to work."].join(" "))}var w=Ie(l),M=w.marginTop,j=w.marginRight,Y=w.marginBottom,J=w.marginLeft;[M,j,Y,J].some(function(z){return parseFloat(z)})&&console.warn(['Popper: CSS "margin" styles cannot be used to apply padding',"between the popper and its reference element or boundary.","To replicate margin, use the `offset` modifier, as well as","the `padding` option in the `preventOverflow` and `flip`","modifiers."].join(" "))}return x(),y.update()},forceUpdate:function(){if(!m){var C=u.elements,N=C.reference,T=C.popper;if(!zr(N,T)){process.env.NODE_ENV!=="production"&&console.error(Hr);return}u.rects={reference:va(N,Yt(T),u.options.strategy==="fixed"),popper:Mn(T)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(z){return u.modifiersData[z.name]=Object.assign({},z.data)});for(var f=0,I=0;I<u.orderedModifiers.length;I++){if(process.env.NODE_ENV!=="production"&&(f+=1,f>100)){console.error(ka);break}if(u.reset===!0){u.reset=!1,I=-1;continue}var w=u.orderedModifiers[I],M=w.fn,j=w.options,Y=j===void 0?{}:j,J=w.name;typeof M=="function"&&(u=M({state:u,options:Y,name:J,instance:y})||u)}}},update:ya(function(){return new Promise(function(O){y.forceUpdate(),O(u)})}),destroy:function(){b(),m=!0}};if(!zr(a,l))return process.env.NODE_ENV!=="production"&&console.error(Hr),y;y.setOptions(d).then(function(O){!m&&d.onFirstUpdate&&d.onFirstUpdate(O)});function x(){u.orderedModifiers.forEach(function(O){var C=O.name,N=O.options,T=N===void 0?{}:N,f=O.effect;if(typeof f=="function"){var I=f({state:u,name:C,instance:y,options:T}),w=function(){};p.push(I||w)}})}function b(){p.forEach(function(O){return O()}),p=[]}return y}}var Oa=[Uo,la,Vo,Tr,aa,ta,da,_o,ra],Sa=Ta({defaultModifiers:Oa}),Ca="tippy-box",Vr="tippy-content",Aa="tippy-backdrop",qr="tippy-arrow",Ur="tippy-svg-arrow",gt={passive:!0,capture:!0},Wr=function(){return document.body};function Ra(e,t){return{}.hasOwnProperty.call(e,t)}function Hn(e,t,n){if(Array.isArray(e)){var r=e[t];return r==null?Array.isArray(n)?n[t]:n:r}return e}function Fn(e,t){var n={}.toString.call(e);return n.indexOf("[object")===0&&n.indexOf(t+"]")>-1}function $r(e,t){return typeof e=="function"?e.apply(void 0,t):e}function Jr(e,t){if(t===0)return e;var n;return function(r){clearTimeout(n),n=setTimeout(function(){e(r)},t)}}function Ia(e,t){var n=Object.assign({},e);return t.forEach(function(r){delete n[r]}),n}function Da(e){return e.split(/\s+/).filter(Boolean)}function St(e){return[].concat(e)}function Yr(e,t){e.indexOf(t)===-1&&e.push(t)}function Na(e){return e.filter(function(t,n){return e.indexOf(t)===n})}function Ma(e){return e.split("-")[0]}function vn(e){return[].slice.call(e)}function Gr(e){return Object.keys(e).reduce(function(t,n){return e[n]!==void 0&&(t[n]=e[n]),t},{})}function Zt(){return document.createElement("div")}function Qt(e){return["Element","Fragment"].some(function(t){return Fn(e,t)})}function Pa(e){return Fn(e,"NodeList")}function ja(e){return Fn(e,"MouseEvent")}function La(e){return!!(e&&e._tippy&&e._tippy.reference===e)}function Ba(e){return Qt(e)?[e]:Pa(e)?vn(e):Array.isArray(e)?e:vn(document.querySelectorAll(e))}function zn(e,t){e.forEach(function(n){n&&(n.style.transitionDuration=t+"ms")})}function Kr(e,t){e.forEach(function(n){n&&n.setAttribute("data-state",t)})}function _a(e){var t,n=St(e),r=n[0];return r!=null&&(t=r.ownerDocument)!=null&&t.body?r.ownerDocument:document}function Ha(e,t){var n=t.clientX,r=t.clientY;return e.every(function(i){var o=i.popperRect,s=i.popperState,a=i.props,l=a.interactiveBorder,d=Ma(s.placement),u=s.modifiersData.offset;if(!u)return!0;var p=d==="bottom"?u.top.y:0,m=d==="top"?u.bottom.y:0,y=d==="right"?u.left.x:0,x=d==="left"?u.right.x:0,b=o.top-r+p>l,O=r-o.bottom-m>l,C=o.left-n+y>l,N=n-o.right-x>l;return b||O||C||N})}function Vn(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(i){e[r](i,n)})}function Xr(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=n.getRootNode==null||(r=n.getRootNode())==null?void 0:r.host}return!1}var Pe={isTouch:!1},Zr=0;function Fa(){Pe.isTouch||(Pe.isTouch=!0,window.performance&&document.addEventListener("mousemove",Qr))}function Qr(){var e=performance.now();e-Zr<20&&(Pe.isTouch=!1,document.removeEventListener("mousemove",Qr)),Zr=e}function za(){var e=document.activeElement;if(La(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function Va(){document.addEventListener("touchstart",Fa,gt),window.addEventListener("blur",za)}var qa=typeof window<"u"&&typeof document<"u",Ua=qa?!!window.msCrypto:!1;function Ct(e){var t=e==="destroy"?"n already-":" ";return[e+"() was called on a"+t+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function ei(e){var t=/[ \t]{2,}/g,n=/^[ \t]*/gm;return e.replace(t," ").replace(n,"").trim()}function Wa(e){return ei(`
6
34
  %ctippy.js
7
35
 
8
- %c`+Tr(e)+`
36
+ %c`+ei(e)+`
9
37
 
10
38
  %c\u{1F477}\u200D This is a development-only message. It will be removed in production.
11
- `)}function Cr(e){return[xa(e),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}var xt;process.env.NODE_ENV!=="production"&&ka();function ka(){xt=new Set}function be(e,t){if(e&&!xt.has(t)){var n;xt.add(t),(n=console).warn.apply(n,Cr(t))}}function yn(e,t){if(e&&!xt.has(t)){var n;xt.add(t),(n=console).error.apply(n,Cr(t))}}function Ta(e){var t=!e,n=Object.prototype.toString.call(e)==="[object Object]"&&!e.addEventListener;yn(t,["tippy() was passed","`"+String(e)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),yn(n,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}var Sr={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Ca={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},Z=Object.assign({appendTo:mr,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Sr,Ca),Sa=Object.keys(Z),Oa=function(t){process.env.NODE_ENV!=="production"&&Nr(t,[]);var n=Object.keys(t);n.forEach(function(r){Z[r]=t[r]})};function Or(e){var t=e.plugins||[],n=t.reduce(function(r,i){var o=i.name,s=i.defaultValue;if(o){var a;r[o]=e[o]!==void 0?e[o]:(a=Z[o])!=null?a:s}return r},{});return Object.assign({},e,n)}function Aa(e,t){var n=t?Object.keys(Or(Object.assign({},Z,{plugins:t}))):Sa,r=n.reduce(function(i,o){var s=(e.getAttribute("data-tippy-"+o)||"").trim();if(!s)return i;if(o==="content")i[o]=s;else try{i[o]=JSON.parse(s)}catch{i[o]=s}return i},{});return r}function Ar(e,t){var n=Object.assign({},t,{content:vr(t.content,[e])},t.ignoreAttributes?{}:Aa(e,t.plugins));return n.aria=Object.assign({},Z.aria,n.aria),n.aria={expanded:n.aria.expanded==="auto"?t.interactive:n.aria.expanded,content:n.aria.content==="auto"?t.interactive?null:"describedby":n.aria.content},n}function Nr(e,t){e===void 0&&(e={}),t===void 0&&(t=[]);var n=Object.keys(e);n.forEach(function(r){var i=sa(Z,Object.keys(Sr)),o=!aa(i,r);o&&(o=t.filter(function(s){return s.name===r}).length===0),be(o,["`"+r+"`","is not a valid prop. You may have spelled it incorrectly, or if it's","a plugin, forgot to pass it in an array as props.plugins.",`
39
+ `)}function ti(e){return[Wa(e),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}var en;process.env.NODE_ENV!=="production"&&$a();function $a(){en=new Set}function Ue(e,t){if(e&&!en.has(t)){var n;en.add(t),(n=console).warn.apply(n,ti(t))}}function qn(e,t){if(e&&!en.has(t)){var n;en.add(t),(n=console).error.apply(n,ti(t))}}function Ja(e){var t=!e,n=Object.prototype.toString.call(e)==="[object Object]"&&!e.addEventListener;qn(t,["tippy() was passed","`"+String(e)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),qn(n,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}var ni={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Ya={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},me=Object.assign({appendTo:Wr,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},ni,Ya),Ga=Object.keys(me),Ka=function(t){process.env.NODE_ENV!=="production"&&oi(t,[]);var n=Object.keys(t);n.forEach(function(r){me[r]=t[r]})};function ri(e){var t=e.plugins||[],n=t.reduce(function(r,i){var o=i.name,s=i.defaultValue;if(o){var a;r[o]=e[o]!==void 0?e[o]:(a=me[o])!=null?a:s}return r},{});return Object.assign({},e,n)}function Xa(e,t){var n=t?Object.keys(ri(Object.assign({},me,{plugins:t}))):Ga,r=n.reduce(function(i,o){var s=(e.getAttribute("data-tippy-"+o)||"").trim();if(!s)return i;if(o==="content")i[o]=s;else try{i[o]=JSON.parse(s)}catch{i[o]=s}return i},{});return r}function ii(e,t){var n=Object.assign({},t,{content:$r(t.content,[e])},t.ignoreAttributes?{}:Xa(e,t.plugins));return n.aria=Object.assign({},me.aria,n.aria),n.aria={expanded:n.aria.expanded==="auto"?t.interactive:n.aria.expanded,content:n.aria.content==="auto"?t.interactive?null:"describedby":n.aria.content},n}function oi(e,t){e===void 0&&(e={}),t===void 0&&(t=[]);var n=Object.keys(e);n.forEach(function(r){var i=Ia(me,Object.keys(ni)),o=!Ra(i,r);o&&(o=t.filter(function(s){return s.name===r}).length===0),Ue(o,["`"+r+"`","is not a valid prop. You may have spelled it incorrectly, or if it's","a plugin, forgot to pass it in an array as props.plugins.",`
12
40
 
13
41
  `,`All props: https://atomiks.github.io/tippyjs/v6/all-props/
14
- `,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var Na=function(){return"innerHTML"};function bn(e,t){e[Na()]=t}function Rr(e){var t=wt();return e===!0?t.className=pr:(t.className=hr,Et(e)?t.appendChild(e):bn(t,e)),t}function Mr(e,t){Et(t.content)?(bn(e,""),e.appendChild(t.content)):typeof t.content!="function"&&(t.allowHTML?bn(e,t.content):e.textContent=t.content)}function wn(e){var t=e.firstElementChild,n=_t(t.children);return{box:t,content:n.find(function(r){return r.classList.contains(fr)}),arrow:n.find(function(r){return r.classList.contains(pr)||r.classList.contains(hr)}),backdrop:n.find(function(r){return r.classList.contains(oa)})}}function Ir(e){var t=wt(),n=wt();n.className=ia,n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=wt();r.className=fr,r.setAttribute("data-state","hidden"),Mr(r,e.props),t.appendChild(n),n.appendChild(r),i(e.props,e.props);function i(o,s){var a=wn(t),l=a.box,d=a.content,u=a.arrow;s.theme?l.setAttribute("data-theme",s.theme):l.removeAttribute("data-theme"),typeof s.animation=="string"?l.setAttribute("data-animation",s.animation):l.removeAttribute("data-animation"),s.inertia?l.setAttribute("data-inertia",""):l.removeAttribute("data-inertia"),l.style.maxWidth=typeof s.maxWidth=="number"?s.maxWidth+"px":s.maxWidth,s.role?l.setAttribute("role",s.role):l.removeAttribute("role"),(o.content!==s.content||o.allowHTML!==s.allowHTML)&&Mr(d,e.props),s.arrow?u?o.arrow!==s.arrow&&(l.removeChild(u),l.appendChild(Rr(s.arrow))):l.appendChild(Rr(s.arrow)):u&&l.removeChild(u)}return{popper:t,onUpdate:i}}Ir.$$tippy=!0;var Ra=1,Bt=[],En=[];function Ma(e,t){var n=Ar(e,Object.assign({},Z,Or(br(t)))),r,i,o,s=!1,a=!1,l=!1,d=!1,u,f,v,m=[],y=gr(zt,n.interactiveDebounce),h,w=Ra++,x=null,S=ca(n.plugins),A={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},c={id:w,reference:e,popper:wt(),popperInstance:x,props:n,state:A,plugins:S,clearDelayTimeouts:Wt,setProps:$t,setContent:Ut,show:Ks,hide:Js,hideWithInteractivity:Gs,enable:Ot,disable:qt,unmount:Ys,destroy:Xs};if(!n.render)return process.env.NODE_ENV!=="production"&&yn(!0,"render() function has not been supplied."),c;var k=n.render(c),g=k.popper,N=k.onUpdate;g.setAttribute("data-tippy-root",""),g.id="tippy-"+c.id,c.popper=g,e._tippy=c,g._tippy=c;var z=S.map(function(p){return p.fn(c)}),F=e.hasAttribute("aria-expanded");return st(),ve(),$(),j("onCreate",[c]),n.showOnCreate&&St(),g.addEventListener("mouseenter",function(){c.props.interactive&&c.state.isVisible&&c.clearDelayTimeouts()}),g.addEventListener("mouseleave",function(){c.props.interactive&&c.props.trigger.indexOf("mouseenter")>=0&&ee().addEventListener("mousemove",y)}),c;function _(){var p=c.props.touch;return Array.isArray(p)?p:[p,0]}function I(){return _()[0]==="hold"}function L(){var p;return!!((p=c.props.render)!=null&&p.$$tippy)}function B(){return h||e}function ee(){var p=B().parentNode;return p?ma(p):document}function te(){return wn(g)}function W(p){return c.state.isMounted&&!c.state.isVisible||pe.isTouch||u&&u.type==="focus"?0:hn(c.props.delay,p?0:1,Z.delay)}function $(p){p===void 0&&(p=!1),g.style.pointerEvents=c.props.interactive&&!p?"":"none",g.style.zIndex=""+c.props.zIndex}function j(p,b,T){if(T===void 0&&(T=!0),z.forEach(function(R){R[p]&&R[p].apply(R,b)}),T){var D;(D=c.props)[p].apply(D,b)}}function me(){var p=c.props.aria;if(!!p.content){var b="aria-"+p.content,T=g.id,D=et(c.props.triggerTarget||e);D.forEach(function(R){var K=R.getAttribute(b);if(c.state.isVisible)R.setAttribute(b,K?K+" "+T:T);else{var ae=K&&K.replace(T,"").trim();ae?R.setAttribute(b,ae):R.removeAttribute(b)}})}}function ve(){if(!(F||!c.props.aria.expanded)){var p=et(c.props.triggerTarget||e);p.forEach(function(b){c.props.interactive?b.setAttribute("aria-expanded",c.state.isVisible&&b===B()?"true":"false"):b.removeAttribute("aria-expanded")})}}function We(){ee().removeEventListener("mousemove",y),Bt=Bt.filter(function(p){return p!==y})}function ge(p){if(!(pe.isTouch&&(l||p.type==="mousedown"))){var b=p.composedPath&&p.composedPath()[0]||p.target;if(!(c.props.interactive&&Er(g,b))){if(et(c.props.triggerTarget||e).some(function(T){return Er(T,b)})){if(pe.isTouch||c.state.isVisible&&c.props.trigger.indexOf("click")>=0)return}else j("onClickOutside",[c,p]);c.props.hideOnClick===!0&&(c.clearDelayTimeouts(),c.hide(),a=!0,setTimeout(function(){a=!1}),c.state.isMounted||Ee())}}}function $e(){l=!0}function we(){l=!1}function ue(){var p=ee();p.addEventListener("mousedown",ge,!0),p.addEventListener("touchend",ge,je),p.addEventListener("touchstart",we,je),p.addEventListener("touchmove",$e,je)}function Ee(){var p=ee();p.removeEventListener("mousedown",ge,!0),p.removeEventListener("touchend",ge,je),p.removeEventListener("touchstart",we,je),p.removeEventListener("touchmove",$e,je)}function ot(p,b){at(p,function(){!c.state.isVisible&&g.parentNode&&g.parentNode.contains(g)&&b()})}function xe(p,b){at(p,b)}function at(p,b){var T=te().box;function D(R){R.target===T&&(gn(T,"remove",D),b())}if(p===0)return b();gn(T,"remove",f),gn(T,"add",D),f=D}function Me(p,b,T){T===void 0&&(T=!1);var D=et(c.props.triggerTarget||e);D.forEach(function(R){R.addEventListener(p,b,T),m.push({node:R,eventType:p,handler:b,options:T})})}function st(){I()&&(Me("touchstart",kt,{passive:!0}),Me("touchend",Ft,{passive:!0})),la(c.props.trigger).forEach(function(p){if(p!=="manual")switch(Me(p,kt),p){case"mouseenter":Me("mouseleave",Ft);break;case"focus":Me(Ea?"focusout":"blur",Tt);break;case"focusin":Me("focusout",Tt);break}})}function Pt(){m.forEach(function(p){var b=p.node,T=p.eventType,D=p.handler,R=p.options;b.removeEventListener(T,D,R)}),m=[]}function kt(p){var b,T=!1;if(!(!c.state.isEnabled||Ct(p)||a)){var D=((b=u)==null?void 0:b.type)==="focus";u=p,h=p.currentTarget,ve(),!c.state.isVisible&&fa(p)&&Bt.forEach(function(R){return R(p)}),p.type==="click"&&(c.props.trigger.indexOf("mouseenter")<0||s)&&c.props.hideOnClick!==!1&&c.state.isVisible?T=!0:St(p),p.type==="click"&&(s=!T),T&&!D&&Ue(p)}}function zt(p){var b=p.target,T=B().contains(b)||g.contains(b);if(!(p.type==="mousemove"&&T)){var D=Ie().concat(g).map(function(R){var K,ae=R._tippy,lt=(K=ae.popperInstance)==null?void 0:K.state;return lt?{popperRect:R.getBoundingClientRect(),popperState:lt,props:n}:null}).filter(Boolean);va(D,p)&&(We(),Ue(p))}}function Ft(p){var b=Ct(p)||c.props.trigger.indexOf("click")>=0&&s;if(!b){if(c.props.interactive){c.hideWithInteractivity(p);return}Ue(p)}}function Tt(p){c.props.trigger.indexOf("focusin")<0&&p.target!==B()||c.props.interactive&&p.relatedTarget&&g.contains(p.relatedTarget)||Ue(p)}function Ct(p){return pe.isTouch?I()!==p.type.indexOf("touch")>=0:!1}function Vt(){jt();var p=c.props,b=p.popperOptions,T=p.placement,D=p.offset,R=p.getReferenceClientRect,K=p.moveTransition,ae=L()?wn(g).arrow:null,lt=R?{getBoundingClientRect:R,contextElement:R.contextElement||B()}:e,ni={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(Kt){var ct=Kt.state;if(L()){var Zs=te(),Rn=Zs.box;["placement","reference-hidden","escaped"].forEach(function(Jt){Jt==="placement"?Rn.setAttribute("data-placement",ct.placement):ct.attributes.popper["data-popper-"+Jt]?Rn.setAttribute("data-"+Jt,""):Rn.removeAttribute("data-"+Jt)}),ct.attributes.popper={}}}},Ke=[{name:"offset",options:{offset:D}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!K}},ni];L()&&ae&&Ke.push({name:"arrow",options:{element:ae,padding:3}}),Ke.push.apply(Ke,(b==null?void 0:b.modifiers)||[]),c.popperInstance=ra(lt,g,Object.assign({},b,{placement:T,onFirstUpdate:v,modifiers:Ke}))}function jt(){c.popperInstance&&(c.popperInstance.destroy(),c.popperInstance=null)}function ke(){var p=c.props.appendTo,b,T=B();c.props.interactive&&p===mr||p==="parent"?b=T.parentNode:b=vr(p,[T]),b.contains(g)||b.appendChild(g),c.state.isMounted=!0,Vt(),process.env.NODE_ENV!=="production"&&be(c.props.interactive&&p===Z.appendTo&&T.nextElementSibling!==g,["Interactive tippy element may not be accessible via keyboard","navigation because it is not directly after the reference element","in the DOM source order.",`
42
+ `,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var Za=function(){return"innerHTML"};function Un(e,t){e[Za()]=t}function ai(e){var t=Zt();return e===!0?t.className=qr:(t.className=Ur,Qt(e)?t.appendChild(e):Un(t,e)),t}function si(e,t){Qt(t.content)?(Un(e,""),e.appendChild(t.content)):typeof t.content!="function"&&(t.allowHTML?Un(e,t.content):e.textContent=t.content)}function Wn(e){var t=e.firstElementChild,n=vn(t.children);return{box:t,content:n.find(function(r){return r.classList.contains(Vr)}),arrow:n.find(function(r){return r.classList.contains(qr)||r.classList.contains(Ur)}),backdrop:n.find(function(r){return r.classList.contains(Aa)})}}function li(e){var t=Zt(),n=Zt();n.className=Ca,n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=Zt();r.className=Vr,r.setAttribute("data-state","hidden"),si(r,e.props),t.appendChild(n),n.appendChild(r),i(e.props,e.props);function i(o,s){var a=Wn(t),l=a.box,d=a.content,u=a.arrow;s.theme?l.setAttribute("data-theme",s.theme):l.removeAttribute("data-theme"),typeof s.animation=="string"?l.setAttribute("data-animation",s.animation):l.removeAttribute("data-animation"),s.inertia?l.setAttribute("data-inertia",""):l.removeAttribute("data-inertia"),l.style.maxWidth=typeof s.maxWidth=="number"?s.maxWidth+"px":s.maxWidth,s.role?l.setAttribute("role",s.role):l.removeAttribute("role"),(o.content!==s.content||o.allowHTML!==s.allowHTML)&&si(d,e.props),s.arrow?u?o.arrow!==s.arrow&&(l.removeChild(u),l.appendChild(ai(s.arrow))):l.appendChild(ai(s.arrow)):u&&l.removeChild(u)}return{popper:t,onUpdate:i}}li.$$tippy=!0;var Qa=1,mn=[],$n=[];function es(e,t){var n=ii(e,Object.assign({},me,ri(Gr(t)))),r,i,o,s=!1,a=!1,l=!1,d=!1,u,p,m,y=[],x=Jr(Dt,n.interactiveDebounce),b,O=Qa++,C=null,N=Na(n.plugins),T={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},f={id:O,reference:e,popper:Zt(),popperInstance:C,props:n,state:T,plugins:N,clearDelayTimeouts:Mt,setProps:Pt,setContent:jt,show:er,hide:tr,hideWithInteractivity:nr,enable:ot,disable:at,unmount:rr,destroy:nn};if(!n.render)return process.env.NODE_ENV!=="production"&&qn(!0,"render() function has not been supplied."),f;var I=n.render(f),w=I.popper,M=I.onUpdate;w.setAttribute("data-tippy-root",""),w.id="tippy-"+f.id,f.popper=w,e._tippy=f,w._tippy=f;var j=N.map(function(h){return h.fn(f)}),Y=e.hasAttribute("aria-expanded");return tt(),be(),re(),X("onCreate",[f]),n.showOnCreate&&xt(),w.addEventListener("mouseenter",function(){f.props.interactive&&f.state.isVisible&&f.clearDelayTimeouts()}),w.addEventListener("mouseleave",function(){f.props.interactive&&f.props.trigger.indexOf("mouseenter")>=0&&G().addEventListener("mousemove",x)}),f;function J(){var h=f.props.touch;return Array.isArray(h)?h:[h,0]}function z(){return J()[0]==="hold"}function q(){var h;return!!((h=f.props.render)!=null&&h.$$tippy)}function $(){return b||e}function G(){var h=$().parentNode;return h?_a(h):document}function te(){return Wn(w)}function ne(h){return f.state.isMounted&&!f.state.isVisible||Pe.isTouch||u&&u.type==="focus"?0:Hn(f.props.delay,h?0:1,me.delay)}function re(h){h===void 0&&(h=!1),w.style.pointerEvents=f.props.interactive&&!h?"":"none",w.style.zIndex=""+f.props.zIndex}function X(h,k,S){if(S===void 0&&(S=!0),j.forEach(function(B){B[h]&&B[h].apply(B,k)}),S){var H;(H=f.props)[h].apply(H,k)}}function ye(){var h=f.props.aria;if(!!h.content){var k="aria-"+h.content,S=w.id,H=St(f.props.triggerTarget||e);H.forEach(function(B){var ie=B.getAttribute(k);if(f.state.isVisible)B.setAttribute(k,ie?ie+" "+S:S);else{var le=ie&&ie.replace(S,"").trim();le?B.setAttribute(k,le):B.removeAttribute(k)}})}}function be(){if(!(Y||!f.props.aria.expanded)){var h=St(f.props.triggerTarget||e);h.forEach(function(k){f.props.interactive?k.setAttribute("aria-expanded",f.state.isVisible&&k===$()?"true":"false"):k.removeAttribute("aria-expanded")})}}function Le(){G().removeEventListener("mousemove",x),mn=mn.filter(function(h){return h!==x})}function xe(h){if(!(Pe.isTouch&&(l||h.type==="mousedown"))){var k=h.composedPath&&h.composedPath()[0]||h.target;if(!(f.props.interactive&&Xr(w,k))){if(St(f.props.triggerTarget||e).some(function(S){return Xr(S,k)})){if(Pe.isTouch||f.state.isVisible&&f.props.trigger.indexOf("click")>=0)return}else X("onClickOutside",[f,h]);f.props.hideOnClick===!0&&(f.clearDelayTimeouts(),f.hide(),a=!0,setTimeout(function(){a=!1}),f.state.isMounted||Ee())}}}function Be(){l=!0}function De(){l=!1}function we(){var h=G();h.addEventListener("mousedown",xe,!0),h.addEventListener("touchend",xe,gt),h.addEventListener("touchstart",De,gt),h.addEventListener("touchmove",Be,gt)}function Ee(){var h=G();h.removeEventListener("mousedown",xe,!0),h.removeEventListener("touchend",xe,gt),h.removeEventListener("touchstart",De,gt),h.removeEventListener("touchmove",Be,gt)}function _e(h,k){He(h,function(){!f.state.isVisible&&w.parentNode&&w.parentNode.contains(w)&&k()})}function pe(h,k){He(h,k)}function He(h,k){var S=te().box;function H(B){B.target===S&&(Vn(S,"remove",H),k())}if(h===0)return k();Vn(S,"remove",p),Vn(S,"add",H),p=H}function ke(h,k,S){S===void 0&&(S=!1);var H=St(f.props.triggerTarget||e);H.forEach(function(B){B.addEventListener(h,k,S),y.push({node:B,eventType:h,handler:k,options:S})})}function tt(){z()&&(ke("touchstart",nt,{passive:!0}),ke("touchend",We,{passive:!0})),Da(f.props.trigger).forEach(function(h){if(h!=="manual")switch(ke(h,nt),h){case"mouseenter":ke("mouseleave",We);break;case"focus":ke(Ua?"focusout":"blur",rt);break;case"focusin":ke("focusout",rt);break}})}function bt(){y.forEach(function(h){var k=h.node,S=h.eventType,H=h.handler,B=h.options;k.removeEventListener(S,H,B)}),y=[]}function nt(h){var k,S=!1;if(!(!f.state.isEnabled||it(h)||a)){var H=((k=u)==null?void 0:k.type)==="focus";u=h,b=h.currentTarget,be(),!f.state.isVisible&&ja(h)&&mn.forEach(function(B){return B(h)}),h.type==="click"&&(f.props.trigger.indexOf("mouseenter")<0||s)&&f.props.hideOnClick!==!1&&f.state.isVisible?S=!0:xt(h),h.type==="click"&&(s=!S),S&&!H&&Fe(h)}}function Dt(h){var k=h.target,S=$().contains(k)||w.contains(k);if(!(h.type==="mousemove"&&S)){var H=Ae().concat(w).map(function(B){var ie,le=B._tippy,st=(ie=le.popperInstance)==null?void 0:ie.state;return st?{popperRect:B.getBoundingClientRect(),popperState:st,props:n}:null}).filter(Boolean);Ha(H,h)&&(Le(),Fe(h))}}function We(h){var k=it(h)||f.props.trigger.indexOf("click")>=0&&s;if(!k){if(f.props.interactive){f.hideWithInteractivity(h);return}Fe(h)}}function rt(h){f.props.trigger.indexOf("focusin")<0&&h.target!==$()||f.props.interactive&&h.relatedTarget&&w.contains(h.relatedTarget)||Fe(h)}function it(h){return Pe.isTouch?z()!==h.type.indexOf("touch")>=0:!1}function $e(){Nt();var h=f.props,k=h.popperOptions,S=h.placement,H=h.offset,B=h.getReferenceClientRect,ie=h.moveTransition,le=q()?Wn(w).arrow:null,st=B?{getBoundingClientRect:B,contextElement:B.contextElement||$()}:e,rn={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(Lt){var Je=Lt.state;if(q()){var ir=te(),an=ir.box;["placement","reference-hidden","escaped"].forEach(function(Bt){Bt==="placement"?an.setAttribute("data-placement",Je.placement):Je.attributes.popper["data-popper-"+Bt]?an.setAttribute("data-"+Bt,""):an.removeAttribute("data-"+Bt)}),Je.attributes.popper={}}}},ze=[{name:"offset",options:{offset:H}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!ie}},rn];q()&&le&&ze.push({name:"arrow",options:{element:le,padding:3}}),ze.push.apply(ze,(k==null?void 0:k.modifiers)||[]),f.popperInstance=Sa(st,w,Object.assign({},k,{placement:S,onFirstUpdate:m,modifiers:ze}))}function Nt(){f.popperInstance&&(f.popperInstance.destroy(),f.popperInstance=null)}function se(){var h=f.props.appendTo,k,S=$();f.props.interactive&&h===Wr||h==="parent"?k=S.parentNode:k=$r(h,[S]),k.contains(w)||k.appendChild(w),f.state.isMounted=!0,$e(),process.env.NODE_ENV!=="production"&&Ue(f.props.interactive&&h===me.appendTo&&S.nextElementSibling!==w,["Interactive tippy element may not be accessible via keyboard","navigation because it is not directly after the reference element","in the DOM source order.",`
15
43
 
16
44
  `,"Using a wrapper <div> or <span> tag around the reference element","solves this by creating a new parentNode context.",`
17
45
 
18
46
  `,"Specifying `appendTo: document.body` silences this warning, but it","assumes you are using a focus management solution to handle","keyboard navigation.",`
19
47
 
20
- `,"See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "))}function Ie(){return _t(g.querySelectorAll("[data-tippy-root]"))}function St(p){c.clearDelayTimeouts(),p&&j("onTrigger",[c,p]),ue();var b=W(!0),T=_(),D=T[0],R=T[1];pe.isTouch&&D==="hold"&&R&&(b=R),b?r=setTimeout(function(){c.show()},b):c.show()}function Ue(p){if(c.clearDelayTimeouts(),j("onUntrigger",[c,p]),!c.state.isVisible){Ee();return}if(!(c.props.trigger.indexOf("mouseenter")>=0&&c.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(p.type)>=0&&s)){var b=W(!1);b?i=setTimeout(function(){c.state.isVisible&&c.hide()},b):o=requestAnimationFrame(function(){c.hide()})}}function Ot(){c.state.isEnabled=!0}function qt(){c.hide(),c.state.isEnabled=!1}function Wt(){clearTimeout(r),clearTimeout(i),cancelAnimationFrame(o)}function $t(p){if(process.env.NODE_ENV!=="production"&&be(c.state.isDestroyed,tt("setProps")),!c.state.isDestroyed){j("onBeforeUpdate",[c,p]),Pt();var b=c.props,T=Ar(e,Object.assign({},b,br(p),{ignoreAttributes:!0}));c.props=T,st(),b.interactiveDebounce!==T.interactiveDebounce&&(We(),y=gr(zt,T.interactiveDebounce)),b.triggerTarget&&!T.triggerTarget?et(b.triggerTarget).forEach(function(D){D.removeAttribute("aria-expanded")}):T.triggerTarget&&e.removeAttribute("aria-expanded"),ve(),$(),N&&N(b,T),c.popperInstance&&(Vt(),Ie().forEach(function(D){requestAnimationFrame(D._tippy.popperInstance.forceUpdate)})),j("onAfterUpdate",[c,p])}}function Ut(p){c.setProps({content:p})}function Ks(){process.env.NODE_ENV!=="production"&&be(c.state.isDestroyed,tt("show"));var p=c.state.isVisible,b=c.state.isDestroyed,T=!c.state.isEnabled,D=pe.isTouch&&!c.props.touch,R=hn(c.props.duration,0,Z.duration);if(!(p||b||T||D)&&!B().hasAttribute("disabled")&&(j("onShow",[c],!1),c.props.onShow(c)!==!1)){if(c.state.isVisible=!0,L()&&(g.style.visibility="visible"),$(),ue(),c.state.isMounted||(g.style.transition="none"),L()){var K=te(),ae=K.box,lt=K.content;vn([ae,lt],0)}v=function(){var Ke;if(!(!c.state.isVisible||d)){if(d=!0,g.offsetHeight,g.style.transition=c.props.moveTransition,L()&&c.props.animation){var Nn=te(),Kt=Nn.box,ct=Nn.content;vn([Kt,ct],R),wr([Kt,ct],"visible")}me(),ve(),yr(En,c),(Ke=c.popperInstance)==null||Ke.forceUpdate(),j("onMount",[c]),c.props.animation&&L()&&xe(R,function(){c.state.isShown=!0,j("onShown",[c])})}},ke()}}function Js(){process.env.NODE_ENV!=="production"&&be(c.state.isDestroyed,tt("hide"));var p=!c.state.isVisible,b=c.state.isDestroyed,T=!c.state.isEnabled,D=hn(c.props.duration,1,Z.duration);if(!(p||b||T)&&(j("onHide",[c],!1),c.props.onHide(c)!==!1)){if(c.state.isVisible=!1,c.state.isShown=!1,d=!1,s=!1,L()&&(g.style.visibility="hidden"),We(),Ee(),$(!0),L()){var R=te(),K=R.box,ae=R.content;c.props.animation&&(vn([K,ae],D),wr([K,ae],"hidden"))}me(),ve(),c.props.animation?L()&&ot(D,c.unmount):c.unmount()}}function Gs(p){process.env.NODE_ENV!=="production"&&be(c.state.isDestroyed,tt("hideWithInteractivity")),ee().addEventListener("mousemove",y),yr(Bt,y),y(p)}function Ys(){process.env.NODE_ENV!=="production"&&be(c.state.isDestroyed,tt("unmount")),c.state.isVisible&&c.hide(),c.state.isMounted&&(jt(),Ie().forEach(function(p){p._tippy.unmount()}),g.parentNode&&g.parentNode.removeChild(g),En=En.filter(function(p){return p!==c}),c.state.isMounted=!1,j("onHidden",[c]))}function Xs(){process.env.NODE_ENV!=="production"&&be(c.state.isDestroyed,tt("destroy")),!c.state.isDestroyed&&(c.clearDelayTimeouts(),c.unmount(),Pt(),delete e._tippy,c.state.isDestroyed=!0,j("onDestroy",[c]))}}function nt(e,t){t===void 0&&(t={});var n=Z.plugins.concat(t.plugins||[]);process.env.NODE_ENV!=="production"&&(Ta(e),Nr(t,n)),ba();var r=Object.assign({},t,{plugins:n}),i=ha(e);if(process.env.NODE_ENV!=="production"){var o=Et(r.content),s=i.length>1;be(o&&s,["tippy() was passed an Element as the `content` prop, but more than","one tippy instance was created by this invocation. This means the","content element will only be appended to the last tippy instance.",`
48
+ `,"See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "))}function Ae(){return vn(w.querySelectorAll("[data-tippy-root]"))}function xt(h){f.clearDelayTimeouts(),h&&X("onTrigger",[f,h]),we();var k=ne(!0),S=J(),H=S[0],B=S[1];Pe.isTouch&&H==="hold"&&B&&(k=B),k?r=setTimeout(function(){f.show()},k):f.show()}function Fe(h){if(f.clearDelayTimeouts(),X("onUntrigger",[f,h]),!f.state.isVisible){Ee();return}if(!(f.props.trigger.indexOf("mouseenter")>=0&&f.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(h.type)>=0&&s)){var k=ne(!1);k?i=setTimeout(function(){f.state.isVisible&&f.hide()},k):o=requestAnimationFrame(function(){f.hide()})}}function ot(){f.state.isEnabled=!0}function at(){f.hide(),f.state.isEnabled=!1}function Mt(){clearTimeout(r),clearTimeout(i),cancelAnimationFrame(o)}function Pt(h){if(process.env.NODE_ENV!=="production"&&Ue(f.state.isDestroyed,Ct("setProps")),!f.state.isDestroyed){X("onBeforeUpdate",[f,h]),bt();var k=f.props,S=ii(e,Object.assign({},k,Gr(h),{ignoreAttributes:!0}));f.props=S,tt(),k.interactiveDebounce!==S.interactiveDebounce&&(Le(),x=Jr(Dt,S.interactiveDebounce)),k.triggerTarget&&!S.triggerTarget?St(k.triggerTarget).forEach(function(H){H.removeAttribute("aria-expanded")}):S.triggerTarget&&e.removeAttribute("aria-expanded"),be(),re(),M&&M(k,S),f.popperInstance&&($e(),Ae().forEach(function(H){requestAnimationFrame(H._tippy.popperInstance.forceUpdate)})),X("onAfterUpdate",[f,h])}}function jt(h){f.setProps({content:h})}function er(){process.env.NODE_ENV!=="production"&&Ue(f.state.isDestroyed,Ct("show"));var h=f.state.isVisible,k=f.state.isDestroyed,S=!f.state.isEnabled,H=Pe.isTouch&&!f.props.touch,B=Hn(f.props.duration,0,me.duration);if(!(h||k||S||H)&&!$().hasAttribute("disabled")&&(X("onShow",[f],!1),f.props.onShow(f)!==!1)){if(f.state.isVisible=!0,q()&&(w.style.visibility="visible"),re(),we(),f.state.isMounted||(w.style.transition="none"),q()){var ie=te(),le=ie.box,st=ie.content;zn([le,st],0)}m=function(){var ze;if(!(!f.state.isVisible||d)){if(d=!0,w.offsetHeight,w.style.transition=f.props.moveTransition,q()&&f.props.animation){var on=te(),Lt=on.box,Je=on.content;zn([Lt,Je],B),Kr([Lt,Je],"visible")}ye(),be(),Yr($n,f),(ze=f.popperInstance)==null||ze.forceUpdate(),X("onMount",[f]),f.props.animation&&q()&&pe(B,function(){f.state.isShown=!0,X("onShown",[f])})}},se()}}function tr(){process.env.NODE_ENV!=="production"&&Ue(f.state.isDestroyed,Ct("hide"));var h=!f.state.isVisible,k=f.state.isDestroyed,S=!f.state.isEnabled,H=Hn(f.props.duration,1,me.duration);if(!(h||k||S)&&(X("onHide",[f],!1),f.props.onHide(f)!==!1)){if(f.state.isVisible=!1,f.state.isShown=!1,d=!1,s=!1,q()&&(w.style.visibility="hidden"),Le(),Ee(),re(!0),q()){var B=te(),ie=B.box,le=B.content;f.props.animation&&(zn([ie,le],H),Kr([ie,le],"hidden"))}ye(),be(),f.props.animation?q()&&_e(H,f.unmount):f.unmount()}}function nr(h){process.env.NODE_ENV!=="production"&&Ue(f.state.isDestroyed,Ct("hideWithInteractivity")),G().addEventListener("mousemove",x),Yr(mn,x),x(h)}function rr(){process.env.NODE_ENV!=="production"&&Ue(f.state.isDestroyed,Ct("unmount")),f.state.isVisible&&f.hide(),f.state.isMounted&&(Nt(),Ae().forEach(function(h){h._tippy.unmount()}),w.parentNode&&w.parentNode.removeChild(w),$n=$n.filter(function(h){return h!==f}),f.state.isMounted=!1,X("onHidden",[f]))}function nn(){process.env.NODE_ENV!=="production"&&Ue(f.state.isDestroyed,Ct("destroy")),!f.state.isDestroyed&&(f.clearDelayTimeouts(),f.unmount(),bt(),delete e._tippy,f.state.isDestroyed=!0,X("onDestroy",[f]))}}function At(e,t){t===void 0&&(t={});var n=me.plugins.concat(t.plugins||[]);process.env.NODE_ENV!=="production"&&(Ja(e),oi(t,n)),Va();var r=Object.assign({},t,{plugins:n}),i=Ba(e);if(process.env.NODE_ENV!=="production"){var o=Qt(r.content),s=i.length>1;Ue(o&&s,["tippy() was passed an Element as the `content` prop, but more than","one tippy instance was created by this invocation. This means the","content element will only be appended to the last tippy instance.",`
21
49
 
22
50
  `,"Instead, pass the .innerHTML of the element, or use a function that","returns a cloned version of the element instead.",`
23
51
 
24
52
  `,`1) content: element.innerHTML
25
- `,"2) content: () => element.cloneNode(true)"].join(" "))}var a=i.reduce(function(l,d){var u=d&&Ma(d,r);return u&&l.push(u),l},[]);return Et(e)?a[0]:a}nt.defaultProps=Z,nt.setDefaultProps=Oa,nt.currentInput=pe,Object.assign({},Jn,{effect:function(t){var n=t.state,r={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(n.elements.popper.style,r.popper),n.styles=r,n.elements.arrow&&Object.assign(n.elements.arrow.style,r.arrow)}}),nt.setDefaultProps({render:Ir});class Ia{constructor({editor:t,element:n,view:r,tippyOptions:i={},shouldShow:o}){P(this,"editor");P(this,"element");P(this,"view");P(this,"preventHide",!1);P(this,"preventShow",!1);P(this,"tippy");P(this,"tippyOptions");P(this,"shouldShow",({view:t,state:n,from:r,to:i})=>{const{doc:o,selection:s}=n,{empty:a}=s,l=!o.textBetween(r,i).length&&E.isTextSelection(n.selection);return!(!t.hasFocus()||a||l)});P(this,"mousedownHandler",()=>{this.preventHide=!0});P(this,"viewMousedownHandler",()=>{this.preventShow=!0});P(this,"viewMouseupHandler",()=>{this.preventShow=!1,setTimeout(()=>this.update(this.editor.view))});P(this,"dragstartHandler",()=>{this.hide()});P(this,"focusHandler",()=>{setTimeout(()=>this.update(this.editor.view))});P(this,"blurHandler",({event:t})=>{var n;if(this.preventHide){this.preventHide=!1;return}(t==null?void 0:t.relatedTarget)&&((n=this.element.parentNode)==null?void 0:n.contains(t.relatedTarget))||this.hide()});this.editor=t,this.element=n,this.view=r,o&&(this.shouldShow=o),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("mousedown",this.viewMousedownHandler),this.view.dom.addEventListener("mouseup",this.viewMouseupHandler),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=i,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:t}=this.editor.options,n=!!t.parentElement;this.tippy||!n||(this.tippy=nt(t,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"top",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",r=>{this.blurHandler({event:r})}))}update(t,n){var v,m;const{state:r,composing:i}=t,{doc:o,selection:s}=r,a=n&&n.doc.eq(o)&&n.selection.eq(s);if(i||a)return;this.createTooltip();const{ranges:l}=s,d=Math.min(...l.map(y=>y.$from.pos)),u=Math.max(...l.map(y=>y.$to.pos));if(!((v=this.shouldShow)==null?void 0:v.call(this,{editor:this.editor,view:t,state:r,oldState:n,from:d,to:u}))||this.preventShow){this.hide();return}(m=this.tippy)==null||m.setProps({getReferenceClientRect:()=>{if(E.isNodeSelection(r.selection)){const y=t.nodeDOM(d);if(y)return y.getBoundingClientRect()}return E.posToDOMRect(t,d,u)}}),this.show()}show(){var t;(t=this.tippy)==null||t.show()}hide(){var t;(t=this.tippy)==null||t.hide()}destroy(){var t;(t=this.tippy)==null||t.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("mousedown",this.viewMousedownHandler),this.view.dom.removeEventListener("mouseup",this.viewMouseupHandler),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const Da=e=>new H.Plugin({key:new H.PluginKey("BubbleMenuPlugin"),view:t=>new Ia({view:t,...e})});var Dr={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Hr=M.default.createContext&&M.default.createContext(Dr),Ne=globalThis&&globalThis.__assign||function(){return Ne=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Ne.apply(this,arguments)},Ha=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function Lr(e){return e&&e.map(function(t,n){return M.default.createElement(t.tag,Ne({key:n},t.attr),Lr(t.child))})}function V(e){return function(t){return M.default.createElement(La,Ne({attr:Ne({},e.attr)},t),Lr(e.child))}}function La(e){var t=function(n){var r=e.attr,i=e.size,o=e.title,s=Ha(e,["attr","size","title"]),a=i||n.size||"1em",l;return n.className&&(l=n.className),e.className&&(l=(l?l+" ":"")+e.className),M.default.createElement("svg",Ne({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,s,{className:l,style:Ne(Ne({color:e.color||n.color},n.style),e.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),o&&M.default.createElement("title",null,o),e.children)};return Hr!==void 0?M.default.createElement(Hr.Consumer,null,function(n){return t(n)}):t(Dr)}function _a(e){return V({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 11h4.5a2.5 2.5 0 1 0 0-5H8v5zm10 4.5a4.5 4.5 0 0 1-4.5 4.5H6V4h6.5a4.5 4.5 0 0 1 3.256 7.606A4.498 4.498 0 0 1 18 15.5zM8 13v5h5.5a2.5 2.5 0 1 0 0-5H8z"}}]}]})(e)}function _r(e){return V({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M13 20h-2v-7H4v7H2V4h2v7h7V4h2v16zm8-12v12h-2v-9.796l-2 .536V8.67L19.5 8H21z"}}]}]})(e)}function Br(e){return V({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M4 4v7h7V4h2v16h-2v-7H4v7H2V4h2zm14.5 4c2.071 0 3.75 1.679 3.75 3.75 0 .857-.288 1.648-.772 2.28l-.148.18L18.034 18H22v2h-7v-1.556l4.82-5.546c.268-.307.43-.709.43-1.148 0-.966-.784-1.75-1.75-1.75-.918 0-1.671.707-1.744 1.606l-.006.144h-2C14.75 9.679 16.429 8 18.5 8z"}}]}]})(e)}function Pr(e){return V({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M22 8l-.002 2-2.505 2.883c1.59.435 2.757 1.89 2.757 3.617 0 2.071-1.679 3.75-3.75 3.75-1.826 0-3.347-1.305-3.682-3.033l1.964-.382c.156.806.866 1.415 1.718 1.415.966 0 1.75-.784 1.75-1.75s-.784-1.75-1.75-1.75c-.286 0-.556.069-.794.19l-1.307-1.547L19.35 10H15V8h7zM4 4v7h7V4h2v16h-2v-7H4v7H2V4h2z"}}]}]})(e)}function Ba(e){return V({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 4h18v2H3V4zm0 15h18v2H3v-2zm8-5h10v2H11v-2zm0-5h10v2H11V9zm-8 3.5L7 9v7l-4-3.5z"}}]}]})(e)}function Pa(e){return V({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 4h18v2H3V4zm0 15h18v2H3v-2zm8-5h10v2H11v-2zm0-5h10v2H11V9zm-4 3.5L3 16V9l4 3.5z"}}]}]})(e)}function za(e){return V({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 20H7v-2h2.927l2.116-12H9V4h8v2h-2.927l-2.116 12H15z"}}]}]})(e)}function Fa(e){return V({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17 17h5v2h-3v3h-2v-5zM7 7H2V5h3V2h2v5zm11.364 8.536L16.95 14.12l1.414-1.414a5 5 0 1 0-7.071-7.071L9.879 7.05 8.464 5.636 9.88 4.222a7 7 0 0 1 9.9 9.9l-1.415 1.414zm-2.828 2.828l-1.415 1.414a7 7 0 0 1-9.9-9.9l1.415-1.414L7.05 9.88l-1.414 1.414a5 5 0 1 0 7.071 7.071l1.414-1.414 1.415 1.414zm-.708-10.607l1.415 1.415-7.071 7.07-1.415-1.414 7.071-7.07z"}}]}]})(e)}function zr(e){return V({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M18.364 15.536L16.95 14.12l1.414-1.414a5 5 0 1 0-7.071-7.071L9.879 7.05 8.464 5.636 9.88 4.222a7 7 0 0 1 9.9 9.9l-1.415 1.414zm-2.828 2.828l-1.415 1.414a7 7 0 0 1-9.9-9.9l1.415-1.414L7.05 9.88l-1.414 1.414a5 5 0 1 0 7.071 7.071l1.414-1.414 1.415 1.414zm-.708-10.607l1.415 1.415-7.071 7.07-1.415-1.414 7.071-7.07z"}}]}]})(e)}function Fr(e){return V({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 4h13v2H8V4zM5 3v3h1v1H3V6h1V4H3V3h2zM3 14v-2.5h2V11H3v-1h3v2.5H4v.5h2v1H3zm2 5.5H3v-1h2V18H3v-1h3v4H3v-1h2v-.5zM8 11h13v2H8v-2zm0 7h13v2H8v-2z"}}]}]})(e)}function Vr(e){return V({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 4h13v2H8V4zM4.5 6.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm0 7a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm0 6.9a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zM8 11h13v2H8v-2zm0 7h13v2H8v-2z"}}]}]})(e)}function Va(e){return V({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17.154 14c.23.516.346 1.09.346 1.72 0 1.342-.524 2.392-1.571 3.147C14.88 19.622 13.433 20 11.586 20c-1.64 0-3.263-.381-4.87-1.144V16.6c1.52.877 3.075 1.316 4.666 1.316 2.551 0 3.83-.732 3.839-2.197a2.21 2.21 0 0 0-.648-1.603l-.12-.117H3v-2h18v2h-3.846zm-4.078-3H7.629a4.086 4.086 0 0 1-.481-.522C6.716 9.92 6.5 9.246 6.5 8.452c0-1.236.466-2.287 1.397-3.153C8.83 4.433 10.271 4 12.222 4c1.471 0 2.879.328 4.222.984v2.152c-1.2-.687-2.515-1.03-3.946-1.03-2.48 0-3.719.782-3.719 2.346 0 .42.218.786.654 1.099.436.313.974.562 1.613.75.62.18 1.297.414 2.03.699z"}}]}]})(e)}function xn(e){return V({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M13 6v15h-2V6H5V4h14v2z"}}]}]})(e)}function ja(e){return V({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 3v9a4 4 0 1 0 8 0V3h2v9a6 6 0 1 1-12 0V3h2zM4 20h16v2H4v-2z"}}]}]})(e)}function qa(e){return V({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M10 6v2H5v11h11v-5h2v6a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h6zm11-3v9l-3.794-3.793-5.999 6-1.414-1.414 5.999-6L12 3h9z"}}]}]})(e)}const kn={icon:"_icon_1sxr9_1",isSelected:"_isSelected_1sxr9_7",isDisabled:"_isDisabled_1sxr9_11"},jr={tooltip:"_tooltip_mmzq3_1",secondaryText:"_secondaryText_mmzq3_12"},Tn=e=>React.createElement("div",{className:jr.tooltip},React.createElement("div",null,e.mainTooltip),e.secondaryTooltip&&React.createElement("div",{className:jr.secondaryText},e.secondaryTooltip)),he=ne.forwardRef((e,t)=>{const n=e.icon;return M.default.createElement(He.default,{content:M.default.createElement(Tn,{mainTooltip:e.mainTooltip,secondaryTooltip:e.secondaryTooltip})},M.default.createElement(In.default,{ref:t,appearance:"subtle",onClick:e.onClick,isSelected:e.isSelected||!1,isDisabled:e.isDisabled||!1,iconBefore:n&&M.default.createElement(n,{className:kn.icon+" "+(e.isSelected?kn.isSelected:"")+" "+(e.isDisabled?kn.isDisabled:"")})},e.children))}),Wa={toolbar:"_toolbar_1rs9g_1"},qr=e=>React.createElement("div",{className:Wa.toolbar},e.children);function $a(){const[,e]=ne.useState(0);return()=>e(t=>t+1)}const Ua=e=>{const t=$a();ne.useEffect(()=>{const n=()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{t()})})};return e.on("transaction",n),()=>{e.off("transaction",n)}},[e])},U={mac:!1,ie:!1,ie_version:0,gecko:!1,chrome:!1,chrome_version:0,android:!1,ios:!1,webkit:!1};if(typeof navigator<"u"){const e=/Edge\/(\d+)/.exec(navigator.userAgent),t=/MSIE \d/.test(navigator.userAgent),n=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);U.mac=/Mac/.test(navigator.platform);let r=U.ie=!!(t||n||e);U.ie_version=t?document.documentMode||6:n?+n[1]:e?+e[1]:null,U.gecko=!r&&/gecko\/\d/i.test(navigator.userAgent),U.chrome=!r&&/Chrome\//.test(navigator.userAgent),U.chrome_version=parseInt((navigator.userAgent.match(/Chrome\/(\d{2})/)||[])[1],10),U.android=/Android \d/.test(navigator.userAgent),U.ios=!r&&/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent),U.webkit=!r&&!!document.documentElement&&"WebkitAppearance"in document.documentElement.style}function Q(e){return U.ios||U.mac?e.replace("Mod","\u2318"):e.replace("Mod","Ctrl")}function Ka(e){return V({tag:"svg",attr:{version:"1.2",baseProfile:"tiny",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M16.972 6.251c-.967-.538-2.185-.188-2.72.777l-3.713 6.682-2.125-2.125c-.781-.781-2.047-.781-2.828 0-.781.781-.781 2.047 0 2.828l4 4c.378.379.888.587 1.414.587l.277-.02c.621-.087 1.166-.46 1.471-1.009l5-9c.537-.966.189-2.183-.776-2.72z"}}]})(e)}const Wr={item_container:"_item_container_1fy3g_1",logo_and_item_container:"_logo_and_item_container_1fy3g_8"};function rt(e){const t=e.icon;return React.createElement(Gt.DropdownItem,{onClick:e.onClick},React.createElement("div",{className:`${Wr.item_container}`},React.createElement("div",{className:`${Wr.logo_and_item_container}`},React.createElement(t,null),e.title),e.isSelected&&React.createElement(Ka,null)))}var Ja="#EBECF0",Ga="#97A0AF",Ya="#505F79",Xa="#172B4D";const Za=Ge.default.input`
26
- input& {
27
- autofocus: true;
28
- background: transparent;
29
- border: 0;
30
- border-radius: 0;
31
- box-sizing: content-box;
32
- color: ${Ya};
33
- flex-grow: 1;
34
- font-size: 13px;
35
- line-height: 20px;
36
- padding: 0;
37
- ${e=>e.width?`width: ${e.width}px`:""};
38
- min-width: 145px;
39
-
40
- /* Hides IE10+ built-in [x] clear input button */
41
- &::-ms-clear {
42
- display: none;
43
- }
44
-
45
- &:focus {
46
- outline: none;
47
- }
48
-
49
- &::placeholder {
50
- color: ${Xa};
51
- opacity: 0.5;
52
- }
53
- }
54
- `,Cn=90,Qa=89;class $r extends ne.PureComponent{constructor(n){super(n);P(this,"input");P(this,"focusTimeoutId");P(this,"onMouseDown",()=>{const{onMouseDown:n}=this.props;n&&n()});P(this,"onBlur",n=>{const{onBlur:r}=this.props;r&&r(n)});P(this,"handleChange",()=>{const{onChange:n}=this.props;this.input&&this.setState({value:this.input.value}),n&&this.input&&n(this.input.value)});P(this,"handleKeydown",n=>{const{onUndo:r,onRedo:i,onSubmit:o,onCancel:s}=this.props;n.keyCode===13&&o?(n.preventDefault(),o(this.input.value)):n.keyCode===27&&s?s(n):typeof r=="function"&&this.isUndoEvent(n)?(n.preventDefault(),r()):typeof i=="function"&&this.isRedoEvent(n)&&(n.preventDefault(),i()),this.props.onKeyDown&&this.props.onKeyDown(n)});P(this,"handleRef",n=>{n instanceof HTMLInputElement?(this.input=n,this.props.autoFocus&&(this.focusTimeoutId=window.setTimeout(()=>this.focus()))):this.input=void 0});this.state={value:n.defaultValue||""}}UNSAFE_componentWillReceiveProps(n){n.defaultValue!==this.props.defaultValue&&this.setState({value:n.defaultValue})}componentWillUnmount(){window.clearTimeout(this.focusTimeoutId)}render(){const{placeholder:n,width:r,maxLength:i,testId:o,ariaLabel:s}=this.props,{value:a}=this.state;return React.createElement(Za,{"data-testid":o||"",type:"text",placeholder:n,value:a,onChange:this.handleChange,onKeyDown:this.handleKeydown,onMouseDown:this.onMouseDown,onBlur:this.onBlur,ref:this.handleRef,width:r,maxLength:i,"aria-label":s,id:this.props.id,style:{fontSize:"0.8rem"}})}focus(){const{input:n}=this;if(n){const r=typeof this.props.autoFocus=="object"?this.props.autoFocus:{};n.focus(r)}}isUndoEvent(n){return n.keyCode===Cn&&(U.mac&&n.metaKey&&!n.shiftKey||!U.mac&&n.ctrlKey)}isRedoEvent(n){return!U.mac&&n.ctrlKey&&n.keyCode===Qa||U.mac&&n.metaKey&&n.shiftKey&&n.keyCode===Cn||n.ctrlKey&&n.shiftKey&&n.keyCode===Cn}}const Ur=420,es=360,Kr=`
55
- display: flex;
56
- line-height: 0;
57
- padding: 4px 0;
58
- align-items: center;
59
- `,ts=Ge.default.div`
60
- ${Kr}
61
- border-bottom: none !important;
62
- `,ns=Ge.default.div`
63
- width: ${Ur}px;
64
- display: flex;
65
- flex-direction: column;
66
- overflow: auto;
67
- padding: 0;
68
-
69
- ${({provider:e})=>Mn.css`
70
- width: ${e?Ur:es}px;
71
- `};
72
- line-height: initial;
73
- `,rs=Ge.default.div`
74
- ${Kr};
75
- border-top: 1px solid ${Ja};
76
- `,Jr=Ge.default.span`
77
- color: ${Ga};
78
- padding: 3px 6px;
79
- width: 32px;
80
- `,is=Ge.default.div`
81
- background-color: white;
82
- border-radius: 3px;
83
- box-shadow: rgb(9 30 66 / 31%) 0px 0px 1px,
84
- rgb(9 30 66 / 25%) 0px 4px 8px -2px;
85
- padding: 3px 6px;
86
- display: flex;
87
- line-height: 1;
88
- box-sizing: border-box;
89
- `,Gr=e=>{const[t,n]=ne.useState(e.url),[r,i]=ne.useState(e.text);return React.createElement(is,null,React.createElement(ns,{provider:!1},React.createElement(ts,null,React.createElement(Jr,null,React.createElement(He.default,{content:React.createElement(Tn,{mainTooltip:"Edit URL"}),placement:"left"},React.createElement("span",null,React.createElement(zr,{size:20})))),React.createElement($r,{defaultValue:t,autoFocus:!0,onSubmit:o=>{e.onSubmit(o,r)},onChange:o=>{n(o)}})),React.createElement(rs,null,React.createElement(Jr,null,React.createElement(He.default,{content:React.createElement(Tn,{mainTooltip:"Edit title"}),placement:"left"},React.createElement("span",null,React.createElement(xn,{size:20})))),React.createElement($r,{defaultValue:r,onSubmit:o=>{e.onSubmit(t,o)},onChange:o=>{i(o)}}))))},os=e=>{const[t,n]=ne.useState(),r=ne.useCallback(()=>{const i=(d,u)=>{if(d==="")return;const f=e.editor.schema.mark("link",{href:d});let{from:v,to:m}=e.editor.state.selection;e.editor.view.dispatch(e.editor.view.state.tr.insertText(u,v,m).addMark(v,v+u.length,f))},{from:o,to:s}=e.editor.state.selection,a=e.editor.state.doc.textBetween(o,s),l=e.editor.isActive("link")&&e.editor.getAttributes("link").href||"";n(React.createElement(Gr,{key:Math.random()+"",url:l,text:a,onSubmit:i}))},[e.editor]);return React.createElement(He.default,{content:t,trigger:"click",onShow:i=>{r()},interactive:!0,maxWidth:500},React.createElement(he,{...e}))};function as(e,t){const n=["Heading 1","Heading 2","Heading 3"],r={li:"Bullet List",oli:"Numbered List"};return e?n[e-1]:t?r[t]:"Text"}const ss=e=>{Ua(e.editor);const t=Be(e.editor.state.selection),n=t==null?void 0:t.node.attrs.headingType,r=t==null?void 0:t.node.attrs.listType,i=as(n,r);return React.createElement(qr,null,React.createElement(Ni.default,{trigger:i},React.createElement(Gt.DropdownItemGroup,null,React.createElement(rt,{title:"Text",icon:xn,isSelected:i==="Paragraph",onClick:()=>e.editor.chain().focus().unsetBlockHeading().unsetList().run()}),React.createElement(rt,{title:"Heading 1",icon:_r,isSelected:i==="Heading 1",onClick:()=>e.editor.chain().focus().unsetList().setBlockHeading({level:1}).run()}),React.createElement(rt,{title:"Heading 2",icon:Br,isSelected:i==="Heading 2",onClick:()=>e.editor.chain().focus().unsetList().setBlockHeading({level:2}).run()}),React.createElement(rt,{title:"Heading 3",icon:Pr,isSelected:i==="Heading 3",onClick:()=>e.editor.chain().focus().unsetList().setBlockHeading({level:3}).run()}),React.createElement(rt,{title:"Bullet List",icon:Vr,isSelected:i==="Bullet List",onClick:()=>e.editor.chain().focus().unsetBlockHeading().setBlockList("li").run()}),React.createElement(rt,{title:"Numbered List",icon:Fr,isSelected:i==="Numbered List",onClick:()=>e.editor.chain().focus().unsetBlockHeading().setBlockList("oli").run()}))),React.createElement(he,{onClick:()=>e.editor.chain().focus().toggleBold().run(),isSelected:e.editor.isActive("bold"),mainTooltip:"Bold",secondaryTooltip:Q("Mod+B"),icon:_a}),React.createElement(he,{onClick:()=>e.editor.chain().focus().toggleItalic().run(),isSelected:e.editor.isActive("italic"),mainTooltip:"Italic",secondaryTooltip:Q("Mod+I"),icon:za}),React.createElement(he,{onClick:()=>e.editor.chain().focus().toggleUnderline().run(),isSelected:e.editor.isActive("underline"),mainTooltip:"Underline",secondaryTooltip:Q("Mod+U"),icon:ja}),React.createElement(he,{onClick:()=>e.editor.chain().focus().toggleStrike().run(),isDisabled:e.editor.isActive("strike"),mainTooltip:"Strike-through",secondaryTooltip:Q("Mod+Shift+X"),icon:Va}),React.createElement(he,{onClick:()=>e.editor.chain().focus().sinkListItem("block").run(),isDisabled:!e.editor.can().sinkListItem("block"),mainTooltip:"Indent",secondaryTooltip:Q("Tab"),icon:Pa}),React.createElement(he,{onClick:()=>e.editor.chain().focus().liftListItem("block").run(),isDisabled:!e.editor.can().command(({state:o})=>{const s=Be(o.selection);return s?s.depth>2:!1}),mainTooltip:"Decrease Indent",secondaryTooltip:Q("Shift+Tab"),icon:Ba}),React.createElement(os,{isSelected:e.editor.isActive("link"),mainTooltip:"Link",secondaryTooltip:Q("Mod+K"),icon:zr,editor:e.editor}))},ls=E.Extension.create({name:"BubbleMenuExtension",addProseMirrorPlugins(){const e=document.createElement("div");return e.className=Rt.bnRoot,Te.default.render(React.createElement(ss,{editor:this.editor}),e),[Da({editor:this.editor,element:e,pluginKey:new H.PluginKey("BubbleMenuPlugin"),tippyOptions:{appendTo:document.body}})]}});function cs(e){return V({tag:"svg",attr:{t:"1551322312294",style:"",viewBox:"0 0 1024 1024",version:"1.1"},child:[{tag:"defs",attr:{},child:[]},{tag:"path",attr:{d:"M474 152m8 0l60 0q8 0 8 8l0 704q0 8-8 8l-60 0q-8 0-8-8l0-704q0-8 8-8Z"}},{tag:"path",attr:{d:"M168 474m8 0l672 0q8 0 8 8l0 60q0 8-8 8l-672 0q-8 0-8-8l0-60q0-8 8-8Z"}}]})(e)}const us={menuList:"_menuList_drels_1"},Re={suggestionWrapper:"_suggestionWrapper_hy0qj_1",buttonName:"_buttonName_hy0qj_9",buttonHint:"_buttonHint_hy0qj_13",buttonShortcut:"_buttonShortcut_hy0qj_17",iconWrapper:"_iconWrapper_hy0qj_25",icon:"_icon_hy0qj_25",selectedIcon:"_selectedIcon_hy0qj_42"},ds=5;function fs(e){return M.default.createElement("div",{className:Re.suggestionWrapper},M.default.createElement("div",null,M.default.createElement("div",{className:Re.buttonName},e.item.name),e.item.hint&&M.default.createElement("div",{className:Re.buttonHint},e.item.hint)),e.item.shortcut&&M.default.createElement("div",null,M.default.createElement("div",{className:Re.buttonShortcut},e.item.shortcut)))}function ps(e,t){const n=e.icon;return n&&M.default.createElement("div",{className:Re.iconWrapper},M.default.createElement(n,{className:Re.icon+" "+(t?Re.selectedIcon:"")}))}function hs(e){let t=e.selectedIndex!==void 0&&e.selectedIndex===e.index;const n=M.default.useRef(null);return M.default.useEffect(()=>{t&&n.current&&n.current.getBoundingClientRect().left>ds&&n.current.scrollIntoView({behavior:"smooth",block:"nearest"})},[t]),M.default.createElement("div",{className:Re.buttonItem},M.default.createElement(Je.ButtonItem,{isSelected:t,iconBefore:ps(e.item,t),onClick:r=>{setTimeout(()=>{e.clickItem(e.item)},0)},ref:n},M.default.createElement(fs,{item:e.item})))}function ms(e){return M.default.createElement(Je.Section,{title:e.name},e.items.map((t,n)=>M.default.createElement(hs,{item:t,key:n,index:n,selectedIndex:e.selectedIndex,clickItem:e.clickItem})))}function vs(e){const t=[];let n=0;for(const r in e.groups){const i=e.groups[r];t.push(React.createElement(ms,{key:r,name:r,items:i,selectedIndex:e.selectedIndex>=n?e.selectedIndex-n:void 0,clickItem:e.onSelectItem})),n+=i.length}return React.createElement("div",{className:us.menuList+" "+Rt.bnRoot},React.createElement(Je.MenuGroup,null,t.length>0?t:React.createElement(Je.Section,{title:"No match found"}," ")))}function gs(e){let t,n,r=!0,i=0,o;const s=a=>{if(!o)throw new Error("props not set");let l=0;for(const d in o.groups){const u=o.groups[d],f=u.length;if(a<l+f)return u[a-l];l+=f}throw Error("item not found")};return{getComponent:()=>{if(!(!n||!n[0]))return n[0].reference},onStart:a=>{o=a,r=!1,i=0;const l={groups:a.groups,count:a.count,onSelectItem:a.onSelectItem,selectedIndex:i};t=new Xt.ReactRenderer(vs,{editor:e,props:l}),n=nt("body",{getReferenceClientRect:a.clientRect,appendTo:()=>document.body,content:t.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start"})},onUpdate:a=>{o=a,o.groups!==t.props.groups&&(i=0);const l={groups:o.groups,count:o.count,onSelectItem:o.onSelectItem,selectedIndex:i};t.updateProps(l),n[0].setProps({getReferenceClientRect:o.clientRect})},onKeyDown:a=>{if(!o)return!1;if(a.key==="ArrowUp")return i=(i+o.count-1)%o.count,t.updateProps({selectedIndex:i}),!0;if(a.key==="ArrowDown")return i=(i+1)%o.count,t.updateProps({selectedIndex:i}),!0;if(a.key==="Enter"){const l=s(i);return o.onSelectItem(l),!0}return a.key==="Escape"?(o.onClose(),!0):!1},onExit:a=>{if(r)return;r=!0;const l=n[0],d=t;l.hide(),setTimeout(()=>{l.destroy(),d.destroy()},1e3)}}}function ys(e,t){if(!t.empty)return;const n=t.$anchor.nodeBefore;if(!n||!n.text)return;const r=new RegExp(`${Yt.escapeRegExp(e)}([^${Yt.escapeRegExp(e)}]*)$`),i=n.text.match(r);if(!!i)return{query:i[1],range:{from:t.$anchor.pos-i[1].length-e.length,to:t.$anchor.pos}}}function bs({pluginKey:e,editor:t,char:n,onSelectItem:r=()=>{},items:i=()=>[]}){if(n.length!==1)throw new Error("'char' should be a single character");const o=gs(t);return new H.Plugin({key:e,filterTransaction(s){const a=s.getMeta("blur");if(a!=null&&a.event.relatedTarget){const l=o.getComponent();if(l!=null&&l.contains(a.event.relatedTarget))return!1}return!0},view(){return{update:async(s,a)=>{var S,A,c,k,g;const l=(S=this.key)==null?void 0:S.getState(a),d=(A=this.key)==null?void 0:A.getState(s.state),u=!l.active&&d.active,f=l.active&&!d.active,v=!u&&!f&&l.query!==d.query;if(!u&&!v&&!f)return;const m=f?l:d,y=document.querySelector(`[data-decoration-id="${m.decorationId}"]`),h=Yt.groupBy(m.items,"groupName"),w=()=>{s.dispatch(s.state.tr.setMeta(e,{deactivate:!0}))},x={groups:v||u?h:{},count:m.items.length,onSelectItem:N=>{w(),r({item:N,editor:t,range:m.range})},clientRect:y?()=>y.getBoundingClientRect():null,onClose:()=>{var N;w(),(N=o.onExit)==null||N.call(o,x)}};f&&((c=o.onExit)==null||c.call(o,x)),v&&((k=o.onUpdate)==null||k.call(o,x)),u&&((g=o.onStart)==null||g.call(o,x))}}},state:{init(){return{active:!1,range:{},query:null,notFoundCount:0,items:[],type:"slash",decorationId:null}},apply(s,a,l,d){var v,m,y;const{selection:u}=s,f={...a};if(u.from===u.to&&!((v=s.getMeta(e))!=null&&v.deactivate)&&!s.getMeta("focus")&&!s.getMeta("blur")&&!s.getMeta("pointer")){if(a.active&&u.from<=a.range.from)f.active=!1;else if((m=s.getMeta(e))!=null&&m.activate){const h=`id_${Math.floor(Math.random()*4294967295)}`;f.decorationId=h,f.range={from:u.from-1,to:u.to},f.query="",f.active=!0,f.type=(y=s.getMeta(e))==null?void 0:y.type}else if(a.active){const h=ys(a.type==="slash"?n:"",u);if(!h)throw new Error("active but no match (suggestions)");f.range=h.range,f.active=!0,f.decorationId=a.decorationId,f.query=h.query}}else f.active=!1;return f.active&&(f.items=i(f.query),f.items.length?f.notFoundCount=0:f.range.to>a.range.to?f.notFoundCount=a.notFoundCount+1:f.notFoundCount=a.notFoundCount,f.notFoundCount>3&&(f.active=!1)),f.active||(f.decorationId=null,f.range={},f.query=null,f.notFoundCount=0,f.items=[]),f}},props:{handleKeyDown(s,a){var d;const{active:l}=this.getState(s.state);return l?((d=o.onKeyDown)==null?void 0:d.call(o,a))||!1:a.key===n?(s.dispatch(s.state.tr.insertText(n).scrollIntoView().setMeta(e,{activate:!0,type:"slash"})),!0):!1},decorations(s){const{active:a,range:l,decorationId:d,type:u}=this.getState(s);if(!a)return null;if(u==="drag"){const f=Be(s.selection);if(f)return ye.DecorationSet.create(s.doc,[ye.Decoration.node(f.pos,f.pos+f.node.nodeSize,{nodeName:"span",class:"suggestion-decorator","data-decoration-id":d})])}return ye.DecorationSet.create(s.doc,[ye.Decoration.inline(l.from,l.to,{nodeName:"span",class:"suggestion-decorator","data-decoration-id":d})])}}})}var qe=(e=>(e.HEADINGS="Headings",e.BASIC_BLOCKS="Basic Blocks",e.CODE="Code Blocks",e.INLINE="Inline",e.EMBED="Embed",e.PLUGIN="Plugin",e))(qe||{});class it{constructor(t,n,r,i=[],o,s,a){P(this,"groupName");this.name=t,this.group=n,this.execute=r,this.aliases=i,this.icon=o,this.hint=s,this.shortcut=a,this.groupName=n}match(t){return this.name.toLowerCase().startsWith(t.toLowerCase())||this.aliases.filter(n=>n.toLowerCase().startsWith(t.toLowerCase())).length!==0}}const ws={heading:new it("Heading",qe.HEADINGS,(e,t)=>e.chain().focus().deleteRange(t).addNewBlockAsSibling({headingType:1}).run(),["h","heading1","h1"],_r,"Used for a top-level heading",Q("Mod-Alt-1")),heading2:new it("Heading 2",qe.HEADINGS,(e,t)=>e.chain().focus().deleteRange(t).addNewBlockAsSibling({headingType:2}).run(),["h2","heading2","subheading"],Br,"Used for key sections",Q("Mod-Alt-2")),heading3:new it("Heading 3",qe.HEADINGS,(e,t)=>e.chain().focus().deleteRange(t).addNewBlockAsSibling({headingType:3}).run(),["h3","heading3","subheading"],Pr,"Used for subsections and group headings",Q("Mod-Alt-3")),numberedList:new it("Numbered List",qe.BASIC_BLOCKS,(e,t)=>e.chain().focus().deleteRange(t).addNewBlockAsSibling({listType:"oli"}).run(),["li","list","numberedlist","numbered list"],Fr,"Used to display a numbered list",Q("Mod-Shift-7")),bulletlist:new it("Bullet List",qe.BASIC_BLOCKS,(e,t)=>e.chain().focus().deleteRange(t).addNewBlockAsSibling({listType:"li"}).run(),["ul","list","bulletlist","bullet list"],Vr,"Used to display an unordered list",Q("Mod-Shift-8")),paragraph:new it("Paragraph",qe.BASIC_BLOCKS,(e,t)=>e.chain().focus().deleteRange(t).addNewBlockAsSibling().run(),["p"],xn,"Used for the body of your document",Q("Mod-Alt-0"))},Sn=new H.PluginKey("suggestions-slash-commands"),Es=E.Extension.create({name:"slash-command",addOptions(){return{commands:ws}},addProseMirrorPlugins(){return[bs({pluginKey:Sn,editor:this.editor,char:"/",items:e=>{const t=[];for(const n in this.options.commands)t.push(this.options.commands[n]);return t.filter(n=>n.match(e))},onSelectItem:({item:e,editor:t,range:n})=>{e.execute(t,n)}})]}}),Yr={dragHandle:"_dragHandle_tsup4_1",dragHandleAdd:"_dragHandleAdd_tsup4_19"},xs={menuList:"_menuList_drels_1"},ks=e=>React.createElement("div",{className:xs.menuList},React.createElement(Je.MenuGroup,null,React.createElement(Je.ButtonItem,{onClick:e.onDelete},"Delete"))),Ts=e=>{const[t,n]=ne.useState(!1),[r,i]=ne.useState(!1),o=()=>{const a=e.view.posAtCoords(e.coords);if(!a)return;const l=Be(H.TextSelection.create(e.view.state.doc,a.pos));l&&(e.view.dispatch&&e.view.dispatch(e.view.state.tr.deleteRange(l.pos,l.pos+l.node.nodeSize)),i(!0))},s=()=>{var d;n(!0),e.onAddClicked&&e.onAddClicked();const a=e.view.posAtCoords(e.coords);if(!a)return;const l=Be(H.TextSelection.create(e.view.state.doc,a.pos));if(!!l){if(((d=l.node.firstChild)==null?void 0:d.textContent.length)!==0){const u=l.pos+l.node.nodeSize;let f=e.view.state.schema.nodes.content.createAndFill();e.view.state.tr.insert(u,f),e.view.dispatch(e.view.state.tr.insert(u,f)),e.view.dispatch(e.view.state.tr.setSelection(new H.TextSelection(e.view.state.tr.doc.resolve(u+1))))}e.view.focus(),e.view.dispatch(e.view.state.tr.scrollIntoView().setMeta(Sn,{activate:!0,type:"drag"}))}};return r||t?null:React.createElement("div",{style:{display:"flex",flexDirection:"row"}},React.createElement(cs,{size:24,fillOpacity:"0.25",className:Yr.dragHandleAdd,onClick:s}),React.createElement(He.default,{content:React.createElement(ks,{onDelete:o}),placement:"left",trigger:"click",duration:0,interactiveBorder:100,interactive:!0,onShow:e.onShow,onHide:e.onHide},React.createElement("div",{className:Yr.dragHandle})))},Cs=Ai.__serializeForClipboard;let On;function Ss(){if(!On){const e=document.querySelector(".ProseMirror > [class*='blockGroup']");e&&(On=Xr(e).left)}return On}function Os(e){let t={left:e.left+document.body.scrollLeft,top:e.top+document.body.scrollTop,width:e.width,height:e.height,bottom:0,right:0};return t.bottom=t.top+t.height,t.right=t.left+t.width,t}function Xr(e){return Os(e.getBoundingClientRect())}function As(e,t){let n=An(e,t);if(n&&n.node.nodeType===1){const r=t.docView;let i=r.nearestDesc(n.node,!0);return!i||i===r?null:i.posBefore}return null}function An(e,t){var i;let n=t.posAtCoords(e);if(!n)return;let r=t.domAtPos(n.pos).node;if(r!==t.dom){for(;r&&r.parentNode&&r.parentNode!==t.dom&&!((i=r.hasAttribute)!=null&&i.call(r,"data-id"));)r=r.parentNode;if(!!r)return{node:r,id:r.getAttribute("data-id")}}}function Ns(e,t){if(!e.dataTransfer)return;let n={left:t.dom.clientWidth/2,top:e.clientY},r=As(n,t);if(r!=null){t.dispatch(t.state.tr.setSelection(H.NodeSelection.create(t.state.doc,r)));let i=t.state.selection.content(),{dom:o,text:s}=Cs(t,i);e.dataTransfer.clearData(),e.dataTransfer.setData("text/html",o.innerHTML),e.dataTransfer.setData("text/plain",s),e.dataTransfer.effectAllowed="move";const a=An(n,t);e.dataTransfer.setDragImage(a==null?void 0:a.node,0,0),t.dragging={slice:i,move:!0}}}const Rs=()=>{let e,n=!1,r=!1;const i=()=>{n=!0},o=()=>{n=!1},s=()=>{r=!0};return new H.Plugin({key:new H.PluginKey("DraggableBlocksPlugin"),view(a){return e=document.createElement("div"),e.setAttribute("draggable","true"),e.style.position="absolute",e.style.height="24px",document.body.append(e),e.addEventListener("dragstart",l=>Ns(l,a)),{destroy(){if(!e)throw new Error("unexpected");e.parentNode.removeChild(e),e=void 0}}},props:{handleKeyDown(a,l){if(!e)throw new Error("unexpected");return n=!1,r=!1,Te.default.render(React.createElement(React.Fragment,null),e),!1},handleDOMEvents:{mouseleave(a,l){if(!e)throw new Error("unexpected");return!0},mousedown(a,l){if(!e)throw new Error("unexpected");return n=!1,r=!1,Te.default.render(React.createElement(React.Fragment,null),e),!1},mousemove(a,l){if(!e)throw new Error("unexpected");if(n||r)return!0;const d={left:a.dom.clientWidth/2,top:l.clientY},u=An(d,a);if(!u)return console.warn("Perhaps we should hide element?"),!0;const f=u.node.firstChild;if(!f)return!0;const v=Xr(f),m=u.node.ownerDocument.defaultView,y=e.getBoundingClientRect(),h=Ss()-48+m.pageXOffset;return v.top+=v.height/2-y.height/2+m.pageYOffset,e.style.left=h+"px",e.style.top=v.top+"px",Te.default.render(React.createElement(Ts,{onShow:i,onHide:o,onAddClicked:s,key:u.id+"",view:a,coords:d}),e),!0}}}})},Ms=E.Extension.create({name:"DraggableBlocksExtension",priority:1e3,addProseMirrorPlugins(){return[Rs()]}}),Is={separator:"_separator_1j7dp_1"},Zr=()=>React.createElement(In.default,{appearance:"subtle",className:Is.separator}),Ds=e=>{const[t,n]=ne.useState(!1);if(t)return e.editMenu;function r(i){n(!0),i.stopPropagation()}return M.default.createElement(qr,null,M.default.createElement(he,{mainTooltip:"Edit",isSelected:!1,onClick:r},"Edit Link"),M.default.createElement(Zr,null),M.default.createElement(he,{mainTooltip:"Open in new tab",isSelected:!1,onClick:()=>{window.open(e.href,"_blank")},icon:qa}),M.default.createElement(Zr,null),M.default.createElement(he,{mainTooltip:"Remove link",isSelected:!1,onClick:e.removeHandler,icon:Fa}))},Qr=new H.PluginKey("HyperlinkMenuPlugin"),Hs=e=>{const{anchorPos:t,...n}=e;return React.createElement(He.default,{getReferenceClientRect:()=>t,content:React.createElement(Gr,{...n}),interactive:!0,interactiveBorder:30,showOnCreate:!0,trigger:"click",hideOnClick:!0,className:Rt.bnRoot,appendTo:document.body},React.createElement("div",null))},Ls=()=>{const e=document.createElement("div");let t,n="hidden",r=0;return new H.Plugin({key:Qr,view(){return{update:async(i,o)=>{const s=i.state.selection;if(s.from!==s.to){n!=="hidden"&&(n="hidden",Te.default.render(React.createElement(React.Fragment,null),e));return}let a,l,d,u=!1;if(t){a=i.posAtDOM(t.firstChild,0),l=i.state.doc.resolve(a);const c=l.parent.childAfter(l.parentOffset).node;d=c==null?void 0:c.marks.find(k=>k.type.name.startsWith("link"))}if(!d&&(i.hasFocus()||n==="cursor-based")){a=s.from,l=i.state.doc.resolve(a);const c=l.parent.childAfter(l.parentOffset).node;d=c==null?void 0:c.marks.find(k=>k.type.name.startsWith("link")),u=!0}if(!d||!a||!l){n==="cursor-based"&&(n="hidden",Te.default.render(React.createElement(React.Fragment,null),e));return}const f=E.getMarkRange(l,d.type,d.attrs);if(!f)return;const v=i.state.doc.textBetween(f.from,f.to),m=d.attrs.href,y={...i.coordsAtPos(Math.round((f.from+f.to)/2)),height:0,width:0},h=d,w=(c,k)=>{n="hidden",Te.default.render(React.createElement(React.Fragment,null),e),h.attrs={...h.attrs,href:c};const g=i.state.tr.insertText(k,f.from,f.to);g.addMark(f.from,f.from+k.length,h),i.dispatch(g)},x=()=>{i.dispatch(i.state.tr.removeMark(f.from,f.to,h.type).setMeta("preventAutolink",!0))},S=Hs({anchorPos:y,text:v,url:m,onSubmit:w}),A=React.createElement(He.default,{key:r+"",getReferenceClientRect:()=>y,content:React.createElement(Ds,{editMenu:S,removeHandler:x,href:m}),onHide:()=>{r++,n="hidden"},aria:{expanded:!1},interactive:!0,interactiveBorder:30,triggerTarget:t,showOnCreate:u,appendTo:document.body},React.createElement("div",null));Te.default.render(A,e),n=u?"cursor-based":"mouse-based"}}},props:{handleDOMEvents:{mouseover(i,o){const s=o.target instanceof HTMLAnchorElement&&o.target.nodeName==="A"?o.target:void 0;return s!==t&&(t=s,i.dispatch(i.state.tr.setMeta(Qr,{hoveredLinkChanged:!0}))),!1}}}})},_s=mi.Link.extend({priority:500,addProseMirrorPlugins(){var e;return[...((e=this.parent)==null?void 0:e.call(this))||[],Ls()]}}),Bs=Ri.default.extend({addKeyboardShortcuts:()=>({"Mod-Alt-0":()=>!1})}),Ps=E.Extension.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",isFilterClass:"is-filter",hasAnchorClass:"has-anchor",placeholder:"Write something \u2026",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new H.Plugin({props:{decorations:e=>{const{doc:t,selection:n}=e,r=Sn.getState(e),i=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:o}=n,s=[];if(!!i)return t.descendants((a,l)=>{const d=o>=l&&o<=l+a.nodeSize,u=!a.isLeaf&&!a.childCount;if((d||!this.options.showOnlyCurrent)&&u){const f=[this.options.emptyNodeClass];this.editor.isEmpty&&f.push(this.options.emptyEditorClass),d&&f.push(this.options.hasAnchorClass),r.type==="drag"&&r.active&&f.push(this.options.isFilterClass);const v=ye.Decoration.node(l,l+a.nodeSize,{class:f.join(" ")});s.push(v)}return this.options.includeChildren}),ye.DecorationSet.create(t,s)}}})]}}),zs=E.Extension.create({name:"trailingNode",addProseMirrorPlugins(){const e=new H.PluginKey(this.name);return[new H.Plugin({key:e,appendTransaction:(t,n,r)=>{const{doc:i,tr:o,schema:s}=r,a=e.getState(r),l=i.content.size-2,d=s.nodes.block,u=s.nodes.content;if(!!a)return o.insert(l,d.create(void 0,u.create()))},state:{init:(t,n)=>{},apply:(t,n)=>{if(!t.docChanged)return n;let r=t.doc.lastChild;if(!r||r.type.name!=="blockgroup")throw new Error("Expected blockgroup");if(r=r.lastChild,!r||r.type.name!=="block")throw new Error("Expected block");return r.nodeSize>4}}})]}});function Fs(e,t=JSON.stringify){const n={};return e.filter(r=>{const i=t(r);return Object.prototype.hasOwnProperty.call(n,i)?!1:n[i]=!0})}function Vs(e){const t=e.filter((r,i)=>e.indexOf(r)!==i);return Fs(t)}const js=E.Extension.create({name:"uniqueID",priority:1e4,addOptions(){return{attributeName:"id",types:[],generateID:()=>gi.v4(),filterTransaction:null}},addGlobalAttributes(){return[{types:this.options.types,attributes:{[this.options.attributeName]:{default:null,parseHTML:e=>e.getAttribute(`data-${this.options.attributeName}`),renderHTML:e=>e[this.options.attributeName]?{[`data-${this.options.attributeName}`]:e[this.options.attributeName]}:{}}}}]},onCreate(){if(this.editor.extensionManager.extensions.find(l=>l.name==="collaboration"))return;const{view:e,state:t}=this.editor,{tr:n,doc:r}=t,{types:i,attributeName:o,generateID:s}=this.options;E.findChildren(r,l=>i.includes(l.type.name)&&l.attrs[o]===null).forEach(({node:l,pos:d})=>{n.setNodeMarkup(d,void 0,{...l.attrs,[o]:s()})}),n.setMeta("addToHistory",!1),e.dispatch(n)},addProseMirrorPlugins(){let e=null,t=!1;return[new H.Plugin({key:new H.PluginKey("uniqueID"),appendTransaction:(n,r,i)=>{console.log("appendTransaction");const o=n.some(y=>y.docChanged)&&!r.doc.eq(i.doc),s=this.options.filterTransaction&&n.some(y=>{var h,w;return!(!((w=(h=this.options).filterTransaction)===null||w===void 0)&&w.call(h,y))});if(!o||s)return;const{tr:a}=i,{types:l,attributeName:d,generateID:u}=this.options,f=E.combineTransactionSteps(r.doc,n),{mapping:v}=f;if(E.getChangedRanges(f).forEach(({newRange:y})=>{const h=E.findChildrenInRange(i.doc,y,S=>l.includes(S.type.name)),w=h.map(({node:S})=>S.attrs[d]).filter(S=>S!==null),x=Vs(w);h.forEach(({node:S,pos:A})=>{var c;const k=(c=a.doc.nodeAt(A))===null||c===void 0?void 0:c.attrs[d];if(k===null){a.setNodeMarkup(A,void 0,{...S.attrs,[d]:u()});return}const{deleted:g}=v.invert().mapResult(A);g&&x.includes(k)&&a.setNodeMarkup(A,void 0,{...S.attrs,[d]:u()})})}),!!a.steps.length)return a},view(n){const r=i=>{var o;e=!((o=n.dom.parentElement)===null||o===void 0)&&o.contains(i.target)?n.dom.parentElement:null};return window.addEventListener("dragstart",r),{destroy(){window.removeEventListener("dragstart",r)}}},props:{handleDOMEvents:{drop:(n,r)=>{var i;return(e!==n.dom.parentElement||((i=r.dataTransfer)===null||i===void 0?void 0:i.effectAllowed)==="copy")&&(e=null,t=!0),!1},paste:()=>(t=!0,!1)},transformPasted:n=>{if(!t)return n;const{types:r,attributeName:i}=this.options,o=s=>{const a=[];return s.forEach(l=>{if(l.isText){a.push(l);return}if(!r.includes(l.type.name)){a.push(l.copy(o(l.content)));return}const d=l.type.create({...l.attrs,[i]:null},o(l.content),l.marks);a.push(d)}),O.Fragment.from(a)};return t=!1,new O.Slice(o(n.content),n.openStart,n.openEnd)}}})]}}),qs=E.Node.create({name:"doc",topNode:!0,content:"block+"}),ei=()=>[E.extensions.ClipboardTextSerializer,E.extensions.Commands,E.extensions.Editable,E.extensions.FocusEvents,E.extensions.Tabindex,xi.default,Ps.configure({emptyNodeClass:Pe.isEmpty,hasAnchorClass:Pe.hasAnchor,isFilterClass:Pe.isFilter,includeChildren:!0,showOnlyCurrent:!1}),js.configure({types:["block"]}),ki.default,Si.default,bi.default,wi.default,Ti.default,Ci.default,Oi.default,_s,Bs,...Ji,Ms,Ei.default.configure({width:5,color:"#ddeeff"}),ls,si.History,Es,zs],Ws={bnEditor:"_bnEditor_1bxtz_1"},ti=ei(),$s={enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!1},Us=(e={},t=[])=>{var i,o,s;const n=e.disableHistoryExtension?ti.filter(a=>a.name!=="history"):ti,r={...$s,...e,extensions:e.enableBlockNoteExtensions===!1?e.extensions:[...e.extensions||[],...n],editorProps:{attributes:{...((i=e.editorProps)==null?void 0:i.attributes)||{},class:[Ws.bnEditor,Rt.bnRoot,((s=(o=e.editorProps)==null?void 0:o.attributes)==null?void 0:s.class)||""].join(" ")}}};return Xt.useEditor(r,t)};Object.defineProperty(C,"EditorContent",{enumerable:!0,get:()=>Xt.EditorContent}),C.Document=qs,C.getBlockNoteExtensions=ei,C.useEditor=Us,Object.defineProperties(C,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
53
+ `,"2) content: () => element.cloneNode(true)"].join(" "))}var a=i.reduce(function(l,d){var u=d&&es(d,r);return u&&l.push(u),l},[]);return Qt(e)?a[0]:a}At.defaultProps=me,At.setDefaultProps=Ka,At.currentInput=Pe,Object.assign({},Tr,{effect:function(t){var n=t.state,r={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(n.elements.popper.style,r.popper),n.styles=r,n.elements.arrow&&Object.assign(n.elements.arrow.style,r.arrow)}}),At.setDefaultProps({render:li});class ts{constructor({editor:t,element:n,view:r,tippyOptions:i={},shouldShow:o}){oe(this,"editor");oe(this,"element");oe(this,"view");oe(this,"preventHide",!1);oe(this,"preventShow",!1);oe(this,"tippy");oe(this,"tippyOptions");oe(this,"shouldShow",({view:t,state:n,from:r,to:i})=>{const{doc:o,selection:s}=n,{empty:a}=s,l=!o.textBetween(r,i).length&&A.isTextSelection(n.selection);return!(!t.hasFocus()||a||l)});oe(this,"mousedownHandler",()=>{this.preventHide=!0});oe(this,"viewMousedownHandler",()=>{this.preventShow=!0});oe(this,"viewMouseupHandler",()=>{this.preventShow=!1,setTimeout(()=>this.update(this.editor.view))});oe(this,"dragstartHandler",()=>{this.hide()});oe(this,"focusHandler",()=>{setTimeout(()=>this.update(this.editor.view))});oe(this,"blurHandler",({event:t})=>{var n;if(this.preventHide){this.preventHide=!1;return}(t==null?void 0:t.relatedTarget)&&((n=this.element.parentNode)==null?void 0:n.contains(t.relatedTarget))||this.hide()});this.editor=t,this.element=n,this.view=r,o&&(this.shouldShow=o),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("mousedown",this.viewMousedownHandler),this.view.dom.addEventListener("mouseup",this.viewMouseupHandler),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=i,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:t}=this.editor.options,n=!!t.parentElement;this.tippy||!n||(this.tippy=At(t,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"top",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",r=>{this.blurHandler({event:r})}))}update(t,n){var m,y;const{state:r,composing:i}=t,{doc:o,selection:s}=r,a=n&&n.doc.eq(o)&&n.selection.eq(s);if(i||a)return;this.createTooltip();const{ranges:l}=s,d=Math.min(...l.map(x=>x.$from.pos)),u=Math.max(...l.map(x=>x.$to.pos));if(!((m=this.shouldShow)==null?void 0:m.call(this,{editor:this.editor,view:t,state:r,oldState:n,from:d,to:u}))||this.preventShow){this.hide();return}(y=this.tippy)==null||y.setProps({getReferenceClientRect:()=>{if(A.isNodeSelection(r.selection)){const x=t.nodeDOM(d);if(x)return x.getBoundingClientRect()}return A.posToDOMRect(t,d,u)}}),this.show()}show(){var t;(t=this.tippy)==null||t.show()}hide(){var t;(t=this.tippy)==null||t.hide()}destroy(){var t;(t=this.tippy)==null||t.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("mousedown",this.viewMousedownHandler),this.view.dom.removeEventListener("mouseup",this.viewMouseupHandler),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const ns=e=>new V.Plugin({key:new V.PluginKey("BubbleMenuPlugin"),view:t=>new ts({view:t,...e})});var ci={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},ui=qe.default.createContext&&qe.default.createContext(ci),et=globalThis&&globalThis.__assign||function(){return et=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},et.apply(this,arguments)},rs=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function di(e){return e&&e.map(function(t,n){return qe.default.createElement(t.tag,et({key:n},t.attr),di(t.child))})}function ee(e){return function(t){return qe.default.createElement(is,et({attr:et({},e.attr)},t),di(e.child))}}function is(e){var t=function(n){var r=e.attr,i=e.size,o=e.title,s=rs(e,["attr","size","title"]),a=i||n.size||"1em",l;return n.className&&(l=n.className),e.className&&(l=(l?l+" ":"")+e.className),qe.default.createElement("svg",et({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,s,{className:l,style:et(et({color:e.color||n.color},n.style),e.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),o&&qe.default.createElement("title",null,o),e.children)};return ui!==void 0?qe.default.createElement(ui.Consumer,null,function(n){return t(n)}):t(ci)}function os(e){return ee({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 11h4.5a2.5 2.5 0 1 0 0-5H8v5zm10 4.5a4.5 4.5 0 0 1-4.5 4.5H6V4h6.5a4.5 4.5 0 0 1 3.256 7.606A4.498 4.498 0 0 1 18 15.5zM8 13v5h5.5a2.5 2.5 0 1 0 0-5H8z"}}]}]})(e)}function Jn(e){return ee({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M13 20h-2v-7H4v7H2V4h2v7h7V4h2v16zm8-12v12h-2v-9.796l-2 .536V8.67L19.5 8H21z"}}]}]})(e)}function Yn(e){return ee({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M4 4v7h7V4h2v16h-2v-7H4v7H2V4h2zm14.5 4c2.071 0 3.75 1.679 3.75 3.75 0 .857-.288 1.648-.772 2.28l-.148.18L18.034 18H22v2h-7v-1.556l4.82-5.546c.268-.307.43-.709.43-1.148 0-.966-.784-1.75-1.75-1.75-.918 0-1.671.707-1.744 1.606l-.006.144h-2C14.75 9.679 16.429 8 18.5 8z"}}]}]})(e)}function Gn(e){return ee({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{fill:"none",d:"M0 0H24V24H0z"}},{tag:"path",attr:{d:"M22 8l-.002 2-2.505 2.883c1.59.435 2.757 1.89 2.757 3.617 0 2.071-1.679 3.75-3.75 3.75-1.826 0-3.347-1.305-3.682-3.033l1.964-.382c.156.806.866 1.415 1.718 1.415.966 0 1.75-.784 1.75-1.75s-.784-1.75-1.75-1.75c-.286 0-.556.069-.794.19l-1.307-1.547L19.35 10H15V8h7zM4 4v7h7V4h2v16h-2v-7H4v7H2V4h2z"}}]}]})(e)}function as(e){return ee({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 4h18v2H3V4zm0 15h18v2H3v-2zm8-5h10v2H11v-2zm0-5h10v2H11V9zm-8 3.5L7 9v7l-4-3.5z"}}]}]})(e)}function ss(e){return ee({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M3 4h18v2H3V4zm0 15h18v2H3v-2zm8-5h10v2H11v-2zm0-5h10v2H11V9zm-4 3.5L3 16V9l4 3.5z"}}]}]})(e)}function ls(e){return ee({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 20H7v-2h2.927l2.116-12H9V4h8v2h-2.927l-2.116 12H15z"}}]}]})(e)}function cs(e){return ee({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17 17h5v2h-3v3h-2v-5zM7 7H2V5h3V2h2v5zm11.364 8.536L16.95 14.12l1.414-1.414a5 5 0 1 0-7.071-7.071L9.879 7.05 8.464 5.636 9.88 4.222a7 7 0 0 1 9.9 9.9l-1.415 1.414zm-2.828 2.828l-1.415 1.414a7 7 0 0 1-9.9-9.9l1.415-1.414L7.05 9.88l-1.414 1.414a5 5 0 1 0 7.071 7.071l1.414-1.414 1.415 1.414zm-.708-10.607l1.415 1.415-7.071 7.07-1.415-1.414 7.071-7.07z"}}]}]})(e)}function fi(e){return ee({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M18.364 15.536L16.95 14.12l1.414-1.414a5 5 0 1 0-7.071-7.071L9.879 7.05 8.464 5.636 9.88 4.222a7 7 0 0 1 9.9 9.9l-1.415 1.414zm-2.828 2.828l-1.415 1.414a7 7 0 0 1-9.9-9.9l1.415-1.414L7.05 9.88l-1.414 1.414a5 5 0 1 0 7.071 7.071l1.414-1.414 1.415 1.414zm-.708-10.607l1.415 1.415-7.071 7.07-1.415-1.414 7.071-7.07z"}}]}]})(e)}function Kn(e){return ee({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 4h13v2H8V4zM5 3v3h1v1H3V6h1V4H3V3h2zM3 14v-2.5h2V11H3v-1h3v2.5H4v.5h2v1H3zm2 5.5H3v-1h2V18H3v-1h3v4H3v-1h2v-.5zM8 11h13v2H8v-2zm0 7h13v2H8v-2z"}}]}]})(e)}function Xn(e){return ee({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 4h13v2H8V4zM4.5 6.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm0 7a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm0 6.9a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zM8 11h13v2H8v-2zm0 7h13v2H8v-2z"}}]}]})(e)}function us(e){return ee({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M17.154 14c.23.516.346 1.09.346 1.72 0 1.342-.524 2.392-1.571 3.147C14.88 19.622 13.433 20 11.586 20c-1.64 0-3.263-.381-4.87-1.144V16.6c1.52.877 3.075 1.316 4.666 1.316 2.551 0 3.83-.732 3.839-2.197a2.21 2.21 0 0 0-.648-1.603l-.12-.117H3v-2h18v2h-3.846zm-4.078-3H7.629a4.086 4.086 0 0 1-.481-.522C6.716 9.92 6.5 9.246 6.5 8.452c0-1.236.466-2.287 1.397-3.153C8.83 4.433 10.271 4 12.222 4c1.471 0 2.879.328 4.222.984v2.152c-1.2-.687-2.515-1.03-3.946-1.03-2.48 0-3.719.782-3.719 2.346 0 .42.218.786.654 1.099.436.313.974.562 1.613.75.62.18 1.297.414 2.03.699z"}}]}]})(e)}function gn(e){return ee({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M13 6v15h-2V6H5V4h14v2z"}}]}]})(e)}function ds(e){return ee({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M8 3v9a4 4 0 1 0 8 0V3h2v9a6 6 0 1 1-12 0V3h2zM4 20h16v2H4v-2z"}}]}]})(e)}function fs(e){return ee({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M10 6v2H5v11h11v-5h2v6a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h6zm11-3v9l-3.794-3.793-5.999 6-1.414-1.414 5.999-6L12 3h9z"}}]}]})(e)}const pi={tooltip:"_tooltip_mmzq3_1",secondaryText:"_secondaryText_mmzq3_12"},hi=e=>v.exports.jsxs("div",{className:pi.tooltip,children:[v.exports.jsx("div",{children:e.mainTooltip}),e.secondaryTooltip&&v.exports.jsx("div",{className:pi.secondaryText,children:e.secondaryTooltip})]}),je=ae.forwardRef((e,t)=>{const n=e.icon;return v.exports.jsx(Ht.default,{content:v.exports.jsx(hi,{mainTooltip:e.mainTooltip,secondaryTooltip:e.secondaryTooltip}),trigger:"mouseenter",children:e.children?v.exports.jsxs(L.Button,{onClick:e.onClick,color:"brandFinal",size:"xs",variant:e.isSelected?"filled":"subtle",disabled:e.isDisabled||!1,ref:t,children:[n&&v.exports.jsx(n,{}),e.children]}):v.exports.jsx(L.ActionIcon,{onClick:e.onClick,color:"brandFinal",size:30,variant:e.isSelected?"filled":"subtle",disabled:e.isDisabled||!1,ref:t,children:n&&v.exports.jsx(n,{})})})});function ps(e){return ee({tag:"svg",attr:{viewBox:"0 0 20 20",fill:"currentColor"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"}}]})(e)}const hs=ae.forwardRef((e,t)=>{const{text:n,icon:r,isDisabled:i,...o}=e,s=e.icon;return v.exports.jsx(L.Button,{leftIcon:s&&v.exports.jsx(s,{size:16}),rightIcon:v.exports.jsx(ps,{}),size:"xs",variant:"subtle",disabled:e.isDisabled,ref:t,...o,children:e.text})});function vs(e){return ee({tag:"svg",attr:{version:"1.2",baseProfile:"tiny",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M16.972 6.251c-.967-.538-2.185-.188-2.72.777l-3.713 6.682-2.125-2.125c-.781-.781-2.047-.781-2.828 0-.781.781-.781 2.047 0 2.828l4 4c.378.379.888.587 1.414.587l.277-.02c.621-.087 1.166-.46 1.471-1.009l5-9c.537-.966.189-2.183-.776-2.72z"}}]})(e)}function ms(e){const t=e.icon;return v.exports.jsx(L.Menu.Item,{onClick:e.onClick,icon:t&&v.exports.jsx(t,{size:16}),rightSection:e.isSelected?v.exports.jsx(vs,{size:16}):v.exports.jsx("div",{style:{width:"16px",padding:"0"}}),disabled:e.isDisabled,children:e.text},e.text)}function gs(e){return v.exports.jsxs(L.Menu,{exitTransitionDuration:0,children:[v.exports.jsx(L.Menu.Target,{children:v.exports.jsx(hs,{...e})}),v.exports.jsx(L.Menu.Dropdown,{children:e.items.map(t=>v.exports.jsx(ms,{...t},t.text))})]})}const vi=e=>{const{classes:t}=L.createStyles({root:{}})(void 0,{name:"Toolbar"});return v.exports.jsx(L.Group,{className:t.root,children:e.children})};function ys(){const[,e]=ae.useState(0);return()=>e(t=>t+1)}const bs=e=>{const t=ys();ae.useEffect(()=>{const n=()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{t()})})};return e.on("transaction",n),()=>{e.off("transaction",n)}},[e])},xs=()=>/Mac/.test(navigator.platform)||/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent);function ge(e){return xs()?e.replace("Mod","\u2318"):e.replace("Mod","Ctrl")}function ws(e){const t=e.icon;return v.exports.jsx(Ht.default,{content:v.exports.jsx(hi,{mainTooltip:e.mainTooltip,secondaryTooltip:e.secondaryTooltip}),placement:"left",children:v.exports.jsx(L.Container,{children:v.exports.jsx(t,{size:16})})})}function Es(e){const t=ae.useRef(null);ae.useEffect(()=>{setTimeout(()=>{var r;e.autofocus&&((r=t.current)==null||r.focus())})},[e.autofocus]);function n(r){r.key==="Enter"&&(r.preventDefault(),e.onSubmit())}return v.exports.jsx(L.TextInput,{size:"xs",value:e.value,onChange:r=>e.onChange(r.currentTarget.value),onKeyDown:n,placeholder:e.placeholder,ref:t})}function mi(e){return v.exports.jsxs(L.Group,{children:[v.exports.jsx(ws,{icon:e.icon,mainTooltip:e.mainIconTooltip,secondaryTooltip:e.secondaryIconTooltip}),v.exports.jsx(Es,{autofocus:e.autofocus,placeholder:e.placeholder,value:e.value,onChange:e.onChange,onSubmit:e.onSubmit})]})}const gi=e=>{const[t,n]=ae.useState(e.url),[r,i]=ae.useState(e.text),{classes:o}=L.createStyles({root:{}})(void 0,{name:"EditHyperlinkMenu"});return v.exports.jsxs(L.Stack,{className:o.root,children:[v.exports.jsx(mi,{icon:fi,mainIconTooltip:"Edit URL",autofocus:!0,placeholder:"Edit URL",value:t,onChange:s=>n(s),onSubmit:()=>e.update(t,r)}),v.exports.jsx(mi,{icon:gn,mainIconTooltip:"Edit Title",placeholder:"Edit Title",value:r,onChange:s=>i(s),onSubmit:()=>e.update(t,r)})]})},ks=e=>{const[t,n]=ae.useState(),r=ae.useCallback(()=>{const i=(d,u)=>{if(d==="")return;const p=e.editor.schema.mark("link",{href:d});let{from:m,to:y}=e.editor.state.selection;e.editor.view.dispatch(e.editor.view.state.tr.insertText(u,m,y).addMark(m,m+u.length,p))},{from:o,to:s}=e.editor.state.selection,a=e.editor.state.doc.textBetween(o,s),l=e.editor.isActive("link")&&e.editor.getAttributes("link").href||"";n(v.exports.jsx(gi,{url:l,text:a,update:i},Math.random()+""))},[e.editor]);return v.exports.jsx(Ht.default,{content:t,trigger:"click",onShow:i=>{r()},interactive:!0,maxWidth:500,children:v.exports.jsx(je,{...e})})};function Ts(e,t){const n=["Heading 1","Heading 2","Heading 3"],r={li:"Bullet List",oli:"Numbered List"};return e?n[e-1]:t?r[t]:"Text"}const Os=e=>{bs(e.editor);const t=ft(e.editor.state.selection),n=t==null?void 0:t.node.attrs.headingType,r=t==null?void 0:t.node.attrs.listType,i=Ts(n,r),o={Text:gn,"Heading 1":Jn,"Heading 2":Yn,"Heading 3":Gn,"Bullet List":Xn,"Numbered List":Kn};return v.exports.jsxs(vi,{children:[v.exports.jsx(gs,{text:i,icon:o[i],items:[{onClick:()=>{e.editor.view.focus(),e.editor.chain().unsetBlockHeading().unsetList().run()},text:"Text",icon:gn,isSelected:i==="Text"},{onClick:()=>{e.editor.view.focus(),e.editor.chain().unsetList().setBlockHeading({level:"1"}).run()},text:"Heading 1",icon:Jn,isSelected:i==="Heading 1"},{onClick:()=>{e.editor.view.focus(),e.editor.chain().unsetList().setBlockHeading({level:"2"}).run()},text:"Heading 2",icon:Yn,isSelected:i==="Heading 2"},{onClick:()=>{e.editor.view.focus(),e.editor.chain().unsetList().setBlockHeading({level:"3"}).run()},text:"Heading 3",icon:Gn,isSelected:i==="Heading 3"},{onClick:()=>{e.editor.view.focus(),e.editor.chain().unsetBlockHeading().setBlockList("li").run()},text:"Bullet List",icon:Xn,isSelected:i==="Bullet List"},{onClick:()=>{e.editor.view.focus(),e.editor.chain().unsetBlockHeading().setBlockList("oli").run()},text:"Numbered List",icon:Kn,isSelected:i==="Numbered List"}]}),v.exports.jsx(je,{onClick:()=>{e.editor.view.focus(),e.editor.commands.toggleBold()},isSelected:e.editor.isActive("bold"),mainTooltip:"Bold",secondaryTooltip:ge("Mod+B"),icon:os}),v.exports.jsx(je,{onClick:()=>{e.editor.view.focus(),e.editor.commands.toggleItalic()},isSelected:e.editor.isActive("italic"),mainTooltip:"Italic",secondaryTooltip:ge("Mod+I"),icon:ls}),v.exports.jsx(je,{onClick:()=>{e.editor.view.focus(),e.editor.commands.toggleUnderline()},isSelected:e.editor.isActive("underline"),mainTooltip:"Underline",secondaryTooltip:ge("Mod+U"),icon:ds}),v.exports.jsx(je,{onClick:()=>{e.editor.view.focus(),e.editor.commands.toggleStrike()},isSelected:e.editor.isActive("strike"),mainTooltip:"Strike-through",secondaryTooltip:ge("Mod+Shift+X"),icon:us}),v.exports.jsx(je,{onClick:()=>{e.editor.view.focus(),e.editor.commands.sinkListItem("block")},isDisabled:!e.editor.can().sinkListItem("block"),mainTooltip:"Indent",secondaryTooltip:ge("Tab"),icon:ss}),v.exports.jsx(je,{onClick:()=>{e.editor.view.focus(),e.editor.commands.liftListItem("block")},isDisabled:!e.editor.can().command(({state:s})=>{const a=ft(s.selection);return a?a.depth>2:!1}),mainTooltip:"Decrease Indent",secondaryTooltip:ge("Shift+Tab"),icon:as}),v.exports.jsx(ks,{isSelected:e.editor.isActive("link"),mainTooltip:"Link",secondaryTooltip:ge("Mod+K"),icon:fi,editor:e.editor})]})},Ss=A.Extension.create({name:"BubbleMenuExtension",addProseMirrorPlugins(){const e=document.createElement("div");return e.className=Rn.bnRoot,Ke.default.render(v.exports.jsx(L.MantineProvider,{theme:cn,children:v.exports.jsx(Os,{editor:this.editor})}),e),[ns({editor:this.editor,element:e,pluginKey:new V.PluginKey("BubbleMenuPlugin"),tippyOptions:{appendTo:document.body}})]}});function Cs(e){return ee({tag:"svg",attr:{t:"1551322312294",style:"",viewBox:"0 0 1024 1024",version:"1.1"},child:[{tag:"defs",attr:{},child:[]},{tag:"path",attr:{d:"M474 152m8 0l60 0q8 0 8 8l0 704q0 8-8 8l-60 0q-8 0-8-8l0-704q0-8 8-8Z"}},{tag:"path",attr:{d:"M168 474m8 0l672 0q8 0 8 8l0 60q0 8-8 8l-672 0q-8 0-8-8l0-60q0-8 8-8Z"}}]})(e)}const As=5;function Rs(e){const t=ae.useRef(null),{classes:n}=L.createStyles({root:{}})(void 0,{name:"SuggestionListItem"});function r(){var l;const s=e.selectedIndex!==void 0&&e.selectedIndex===e.index,a=(l=t.current)==null?void 0:l.matches(":hover");return s||a}function i(){var s,a;r()?(s=t.current)==null||s.setAttribute("data-hovered","true"):(a=t.current)==null||a.removeAttribute("data-hovered")}ae.useEffect(()=>{i(),r()&&t.current&&t.current.getBoundingClientRect().left>As&&t.current.scrollIntoView({behavior:"smooth",block:"nearest"})});const o=e.item.icon;return v.exports.jsx(L.Menu.Item,{className:n.root,icon:o&&v.exports.jsx(o,{size:18}),onClick:()=>e.clickItem(e.item),onMouseLeave:()=>{setTimeout(()=>{i()})},ref:t,rightSection:e.item.shortcut&&v.exports.jsx(L.Badge,{size:"xs",children:e.item.shortcut}),children:v.exports.jsxs(L.Stack,{children:[v.exports.jsx(L.Text,{size:14,weight:500,children:e.item.name}),v.exports.jsx(L.Text,{size:10,children:e.item.hint})]})})}function Is(e){return v.exports.jsxs(v.exports.Fragment,{children:[v.exports.jsx(L.Menu.Label,{children:e.name}),e.items.map((t,n)=>v.exports.jsx(Rs,{item:t,index:n,selectedIndex:e.selectedIndex,clickItem:e.clickItem},n))]})}function Ds(e){const{classes:t}=L.createStyles({root:{}})(void 0,{name:"SuggestionList"}),n=[];let r=0;for(const i in e.groups){const o=e.groups[i];n.push(v.exports.jsx(Is,{name:i,items:o,selectedIndex:e.selectedIndex>=r?e.selectedIndex-r:void 0,clickItem:e.onSelectItem},i)),r+=o.length}return v.exports.jsx(L.Menu,{defaultOpened:!0,trigger:"hover",closeDelay:1e7,children:v.exports.jsx(L.Menu.Dropdown,{className:t.root,children:n.length>0?n:v.exports.jsx(L.Menu.Item,{children:"No match found"})})})}function Ns(e){let t,n,r=!0,i=0,o;const s=a=>{if(!o)throw new Error("props not set");let l=0;for(const d in o.groups){const u=o.groups[d],p=u.length;if(a<l+p)return u[a-l];l+=p}throw Error("item not found")};return{getComponent:()=>{if(!(!n||!n[0]))return n[0].reference},onStart:a=>{o=a,r=!1,i=0;const l={groups:a.groups,count:a.count,onSelectItem:a.onSelectItem,selectedIndex:i};t=new bn.ReactRenderer(d=>v.exports.jsx(L.MantineProvider,{theme:cn,children:v.exports.jsx(Ds,{...d})}),{editor:e,props:l}),n=At("body",{getReferenceClientRect:a.clientRect,appendTo:()=>document.body,content:t.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start"})},onUpdate:a=>{o=a,o.groups!==t.props.groups&&(i=0);const l={groups:o.groups,count:o.count,onSelectItem:o.onSelectItem,selectedIndex:i};t.updateProps(l),n[0].setProps({getReferenceClientRect:o.clientRect})},onKeyDown:a=>{if(!o)return!1;if(a.key==="ArrowUp")return i=(i+o.count-1)%o.count,t.updateProps({selectedIndex:i}),!0;if(a.key==="ArrowDown")return i=(i+1)%o.count,t.updateProps({selectedIndex:i}),!0;if(a.key==="Enter"){const l=s(i);return o.onSelectItem(l),!0}return a.key==="Escape"?(o.onClose(),!0):!1},onExit:a=>{if(r)return;r=!0;const l=n[0],d=t;l.hide(),setTimeout(()=>{l.destroy(),d.destroy()},1e3)}}}function Ms(e,t){if(!t.empty)return;const n=t.$anchor.nodeBefore;if(!n||!n.text)return;const r=new RegExp(`${yn.escapeRegExp(e)}([^${yn.escapeRegExp(e)}]*)$`),i=n.text.match(r);if(!!i)return{query:i[1],range:{from:t.$anchor.pos-i[1].length-e.length,to:t.$anchor.pos}}}function Ps({pluginKey:e,editor:t,char:n,onSelectItem:r=()=>{},items:i=()=>[]}){if(n.length!==1)throw new Error("'char' should be a single character");const o=Ns(t);return new V.Plugin({key:e,filterTransaction(s){const a=s.getMeta("blur");if(a!=null&&a.event.relatedTarget){const l=o.getComponent();if(l!=null&&l.contains(a.event.relatedTarget))return!1}return!0},view(){return{update:async(s,a)=>{var N,T,f,I,w;const l=(N=this.key)==null?void 0:N.getState(a),d=(T=this.key)==null?void 0:T.getState(s.state),u=!l.active&&d.active,p=l.active&&!d.active,m=!u&&!p&&l.query!==d.query;if(!u&&!m&&!p)return;const y=p?l:d,x=document.querySelector(`[data-decoration-id="${y.decorationId}"]`),b=yn.groupBy(y.items,"groupName"),O=()=>{s.dispatch(s.state.tr.setMeta(e,{deactivate:!0}))},C={groups:m||u?b:{},count:y.items.length,onSelectItem:M=>{O(),r({item:M,editor:t,range:y.range})},clientRect:x?()=>x.getBoundingClientRect():null,onClose:()=>{var M;O(),(M=o.onExit)==null||M.call(o,C)}};p&&((f=o.onExit)==null||f.call(o,C)),m&&((I=o.onUpdate)==null||I.call(o,C)),u&&((w=o.onStart)==null||w.call(o,C))}}},state:{init(){return{active:!1,range:{},query:null,notFoundCount:0,items:[],type:"slash",decorationId:null}},apply(s,a,l,d){var m,y,x;const{selection:u}=s,p={...a};if(u.from===u.to&&!((m=s.getMeta(e))!=null&&m.deactivate)&&!s.getMeta("focus")&&!s.getMeta("blur")&&!s.getMeta("pointer")){if(a.active&&u.from<=a.range.from)p.active=!1;else if((y=s.getMeta(e))!=null&&y.activate){const b=`id_${Math.floor(Math.random()*4294967295)}`;p.decorationId=b,p.range={from:u.from-1,to:u.to},p.query="",p.active=!0,p.type=(x=s.getMeta(e))==null?void 0:x.type}else if(a.active){const b=Ms(a.type==="slash"?n:"",u);if(!b)throw new Error("active but no match (suggestions)");p.range=b.range,p.active=!0,p.decorationId=a.decorationId,p.query=b.query}}else p.active=!1;return p.active&&(p.items=i(p.query),p.items.length?p.notFoundCount=0:p.range.to>a.range.to?p.notFoundCount=a.notFoundCount+1:p.notFoundCount=a.notFoundCount,p.notFoundCount>3&&(p.active=!1)),p.active||(p.decorationId=null,p.range={},p.query=null,p.notFoundCount=0,p.items=[]),p}},props:{handleKeyDown(s,a){var d;const{active:l}=this.getState(s.state);return l?((d=o.onKeyDown)==null?void 0:d.call(o,a))||!1:a.key===n?(s.dispatch(s.state.tr.insertText(n).scrollIntoView().setMeta(e,{activate:!0,type:"slash"})),!0):!1},decorations(s){const{active:a,range:l,decorationId:d,type:u}=this.getState(s);if(!a)return null;if(u==="drag"){const p=ft(s.selection);if(p)return Ve.DecorationSet.create(s.doc,[Ve.Decoration.node(p.pos,p.pos+p.node.nodeSize,{nodeName:"span",class:"suggestion-decorator","data-decoration-id":d})])}return Ve.DecorationSet.create(s.doc,[Ve.Decoration.inline(l.from,l.to,{nodeName:"span",class:"suggestion-decorator","data-decoration-id":d})])}}})}var yt=(e=>(e.HEADINGS="Headings",e.BASIC_BLOCKS="Basic Blocks",e.CODE="Code Blocks",e.INLINE="Inline",e.EMBED="Embed",e.PLUGIN="Plugin",e))(yt||{});class Rt{constructor(t,n,r,i=[],o,s,a){oe(this,"groupName");this.name=t,this.group=n,this.execute=r,this.aliases=i,this.icon=o,this.hint=s,this.shortcut=a,this.groupName=n}match(t){return this.name.toLowerCase().startsWith(t.toLowerCase())||this.aliases.filter(n=>n.toLowerCase().startsWith(t.toLowerCase())).length!==0}}const js={heading:new Rt("Heading",yt.HEADINGS,(e,t)=>e.chain().focus().deleteRange(t).addNewBlockAsSibling({headingType:"1"}).run(),["h","heading1","h1"],Jn,"Used for a top-level heading",ge("Mod-Alt-1")),heading2:new Rt("Heading 2",yt.HEADINGS,(e,t)=>e.chain().focus().deleteRange(t).addNewBlockAsSibling({headingType:"2"}).run(),["h2","heading2","subheading"],Yn,"Used for key sections",ge("Mod-Alt-2")),heading3:new Rt("Heading 3",yt.HEADINGS,(e,t)=>e.chain().focus().deleteRange(t).addNewBlockAsSibling({headingType:"3"}).run(),["h3","heading3","subheading"],Gn,"Used for subsections and group headings",ge("Mod-Alt-3")),numberedList:new Rt("Numbered List",yt.BASIC_BLOCKS,(e,t)=>e.chain().focus().deleteRange(t).addNewBlockAsSibling({listType:"oli"}).run(),["li","list","numberedlist","numbered list"],Kn,"Used to display a numbered list",ge("Mod-Shift-7")),bulletlist:new Rt("Bullet List",yt.BASIC_BLOCKS,(e,t)=>e.chain().focus().deleteRange(t).addNewBlockAsSibling({listType:"li"}).run(),["ul","list","bulletlist","bullet list"],Xn,"Used to display an unordered list",ge("Mod-Shift-8")),paragraph:new Rt("Paragraph",yt.BASIC_BLOCKS,(e,t)=>e.chain().focus().deleteRange(t).addNewBlockAsSibling().run(),["p"],gn,"Used for the body of your document",ge("Mod-Alt-0"))},Zn=new V.PluginKey("suggestions-slash-commands"),Ls=A.Extension.create({name:"slash-command",addOptions(){return{commands:js}},addProseMirrorPlugins(){return[Ps({pluginKey:Zn,editor:this.editor,char:"/",items:e=>{const t=[];for(const n in this.options.commands)t.push(this.options.commands[n]);return t.filter(n=>n.match(e))},onSelectItem:({item:e,editor:t,range:n})=>{e.execute(t,n)}})]}});function Bs(e){return ee({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}}]})(e)}const _s=e=>{const{classes:t}=L.createStyles({root:{}})(void 0,{name:"DragHandleMenu"});return v.exports.jsx(L.Menu.Dropdown,{className:t.root,children:v.exports.jsx(L.Menu.Item,{onClick:e.onDelete,children:"Delete"})})},Hs=e=>{const[t,n]=ae.useState(!1),[r,i]=ae.useState(!1),o=()=>{const a=e.view.posAtCoords(e.coords);if(!a)return;const l=ft(V.TextSelection.create(e.view.state.doc,a.pos));l&&(e.view.dispatch&&e.view.dispatch(e.view.state.tr.deleteRange(l.pos,l.pos+l.node.nodeSize)),i(!0))},s=()=>{var d;n(!0),e.onAddClicked&&e.onAddClicked();const a=e.view.posAtCoords(e.coords);if(!a)return;const l=ft(V.TextSelection.create(e.view.state.doc,a.pos));if(!!l){if(((d=l.node.firstChild)==null?void 0:d.textContent.length)!==0){const u=l.pos+l.node.nodeSize;let p=e.view.state.schema.nodes.content.createAndFill();e.view.state.tr.insert(u,p),e.view.dispatch(e.view.state.tr.insert(u,p)),e.view.dispatch(e.view.state.tr.setSelection(new V.TextSelection(e.view.state.tr.doc.resolve(u+1))))}e.view.focus(),e.view.dispatch(e.view.state.tr.scrollIntoView().setMeta(Zn,{activate:!0,type:"drag"}))}};return r||t?null:v.exports.jsxs("div",{style:{display:"flex",flexDirection:"row"},children:[v.exports.jsx(L.ActionIcon,{size:24,color:"brandFinal.3","data-test":"dragHandleAdd",children:v.exports.jsx(Cs,{size:24,onClick:s})}),v.exports.jsxs(L.Menu,{onOpen:e.onShow,onClose:e.onHide,position:"left",children:[v.exports.jsx(L.Menu.Target,{children:v.exports.jsx(L.ActionIcon,{size:24,color:"brandFinal.3","data-test":"dragHandle",children:v.exports.jsx(Bs,{size:24})})}),v.exports.jsx(_s,{onDelete:o})]})]})};class tn extends V.Selection{constructor(n,r){super(n,r);oe(this,"nodes");const i=n.node();this.nodes=[],n.doc.nodesBetween(n.pos,r.pos,(o,s,a)=>{if(a!==null&&a.eq(i))return this.nodes.push(o),!1})}static create(n,r,i=r){return new tn(n.resolve(r),n.resolve(i))}content(){return new D.Slice(D.Fragment.from(this.nodes),0,0)}eq(n){if(!(n instanceof tn)||this.nodes.length!==n.nodes.length||this.from!==n.from||this.to!==n.to)return!1;for(let r=0;r<this.nodes.length;r++)if(!this.nodes[r].eq(n.nodes[r]))return!1;return!0}map(n,r){let i=r.mapResult(this.from),o=r.mapResult(this.to);return o.deleted?V.Selection.near(n.resolve(i.pos)):i.deleted?V.Selection.near(n.resolve(o.pos)):new tn(n.resolve(i.pos),n.resolve(o.pos))}toJSON(){return{type:"node",anchor:this.anchor,head:this.head}}}const Fs=Gi.__serializeForClipboard;let Qn,It;function zs(){if(!Qn){const e=document.querySelector(".ProseMirror > [class*='blockGroup']");e&&(Qn=yi(e).left)}return Qn}function Vs(e){let t={left:e.left+document.body.scrollLeft,top:e.top+document.body.scrollTop,width:e.width,height:e.height,bottom:0,right:0};return t.bottom=t.top+t.height,t.right=t.left+t.width,t}function yi(e){return Vs(e.getBoundingClientRect())}function bi(e,t){var i;let n=t.posAtCoords(e);if(!n)return;let r=t.domAtPos(n.pos).node;if(r!==t.dom){for(;r&&r.parentNode&&r.parentNode!==t.dom&&!((i=r.hasAttribute)!=null&&i.call(r,"data-id"));)r=r.parentNode;if(!!r)return{node:r,id:r.getAttribute("data-id")}}}function qs(e,t){let n=bi(e,t);if(n&&n.node.nodeType===1){const r=t.docView;let i=r.nearestDesc(n.node,!0);return!i||i===r?null:i.posBefore}return null}function Us(e,t){let n,r;const i=t.resolve(e.from).node().type.name==="content",o=t.resolve(e.to).node().type.name==="content",s=Math.min(e.$anchor.depth,e.$head.depth);if(i&&o){const a=e.$from.start(s-1),l=e.$to.end(s-1);n=t.resolve(a-1).pos,r=t.resolve(l+1).pos}else n=e.from,r=e.to;return{from:n,to:r}}function xi(e,t,n=t){t===n&&(n+=e.state.doc.resolve(t+1).node().nodeSize);const r=e.domAtPos(t).node.cloneNode(!0),i=e.domAtPos(t).node,o=(l,d)=>Array.prototype.indexOf.call(l.children,d),s=o(i,e.domAtPos(t+1).node.parentElement),a=o(i,e.domAtPos(n-1).node.parentElement);for(let l=i.childElementCount-1;l>=0;l--)(l>a||l<s)&&r.removeChild(r.children[l]);It=r,document.body.appendChild(It)}function Ws(){It!==void 0&&(document.body.removeChild(It),It=void 0)}function $s(e,t){if(!e.dataTransfer)return;let n={left:t.dom.clientWidth/2,top:e.clientY},r=qs(n,t);if(r!=null){const i=t.state.selection,o=t.state.doc,{from:s,to:a}=Us(i,o),l=s<=r&&r<a,d=!i.$anchor.node().eq(i.$head.node());l&&d?(t.dispatch(t.state.tr.setSelection(tn.create(o,s,a))),xi(t,s,a)):(t.dispatch(t.state.tr.setSelection(V.NodeSelection.create(t.state.doc,r))),xi(t,r));let u=t.state.selection.content(),{dom:p,text:m}=Fs(t,u);e.dataTransfer.clearData(),e.dataTransfer.setData("text/html",p.innerHTML),e.dataTransfer.setData("text/plain",m),e.dataTransfer.effectAllowed="move",e.dataTransfer.setDragImage(It,0,0),t.dragging={slice:u,move:!0}}}const Js=()=>{let e,n=!1,r=!1;const i=()=>{n=!0},o=()=>{n=!1},s=()=>{r=!0};return new V.Plugin({key:new V.PluginKey("DraggableBlocksPlugin"),view(a){return e=document.createElement("div"),e.setAttribute("draggable","true"),e.style.position="absolute",e.style.height="24px",document.body.append(e),e.addEventListener("dragstart",l=>$s(l,a)),e.addEventListener("dragend",()=>Ws()),{destroy(){if(!e)throw new Error("unexpected");e.parentNode.removeChild(e),e=void 0}}},props:{handleKeyDown(a,l){if(!e)throw new Error("unexpected");return n=!1,r=!1,Ke.default.render(v.exports.jsx(v.exports.Fragment,{}),e),!1},handleDOMEvents:{mouseleave(a,l){if(!e)throw new Error("unexpected");return!0},mousedown(a,l){if(!e)throw new Error("unexpected");return n=!1,r=!1,Ke.default.render(v.exports.jsx(v.exports.Fragment,{}),e),!1},mousemove(a,l){if(!e)throw new Error("unexpected");if(n||r)return!0;const d={left:a.dom.clientWidth/2,top:l.clientY},u=bi(d,a);if(!u)return console.warn("Perhaps we should hide element?"),!0;const p=u.node.firstChild;if(!p)return!0;const m=yi(p),y=u.node.ownerDocument.defaultView,x=e.getBoundingClientRect(),b=zs()-48+y.pageXOffset;return m.top+=m.height/2-x.height/2+y.pageYOffset,e.style.left=b+"px",e.style.top=m.top+"px",Ke.default.render(v.exports.jsx(L.MantineProvider,{theme:cn,children:v.exports.jsx(Hs,{onShow:i,onHide:o,onAddClicked:s,view:a,coords:d},u.id+"")}),e),!0}}}})},Ys=A.Extension.create({name:"DraggableBlocksExtension",priority:1e3,addProseMirrorPlugins(){return[Js()]}}),Gs=e=>v.exports.jsxs(vi,{children:[v.exports.jsx(je,{mainTooltip:"Edit",isSelected:!1,onClick:e.edit,children:"Edit Link"}),v.exports.jsx(je,{mainTooltip:"Open in new tab",isSelected:!1,onClick:()=>{window.open(e.url,"_blank")},icon:fs}),v.exports.jsx(je,{mainTooltip:"Remove link",isSelected:!1,onClick:e.remove,icon:cs})]}),Ks=e=>{const[t,n]=ae.useState(!1),r=v.exports.jsx(Ht.default,{getReferenceClientRect:()=>e.pos,content:v.exports.jsx(gi,{url:e.url,text:e.text,update:e.update}),interactive:!0,interactiveBorder:30,showOnCreate:!0,trigger:"click",hideOnClick:!0,className:Rn.bnRoot,appendTo:document.body,children:v.exports.jsx("div",{})}),i=v.exports.jsx(Gs,{url:e.url,edit:()=>n(!0),remove:e.remove});return t?r:i},wi=new V.PluginKey("HyperlinkMenuPlugin"),Xs=()=>{const e=document.createElement("div");let t,n="hidden",r=0;return new V.Plugin({key:wi,view(){return{update:async(i,o)=>{const s=i.state.selection;if(s.from!==s.to){n!=="hidden"&&(n="hidden",Ke.default.render(v.exports.jsx(v.exports.Fragment,{}),e));return}let a,l,d,u=!1;if(t){a=i.posAtDOM(t.firstChild,0),l=i.state.doc.resolve(a);const T=l.parent.childAfter(l.parentOffset).node;d=T==null?void 0:T.marks.find(f=>f.type.name.startsWith("link"))}if(!d&&(i.hasFocus()||n==="cursor-based")){a=s.from,l=i.state.doc.resolve(a);const T=l.parent.childAfter(l.parentOffset).node;d=T==null?void 0:T.marks.find(f=>f.type.name.startsWith("link")),u=!0}if(!d||!a||!l){n==="cursor-based"&&(n="hidden",Ke.default.render(v.exports.jsx(v.exports.Fragment,{}),e));return}const p=A.getMarkRange(l,d.type,d.attrs);if(!p)return;const m=i.state.doc.textBetween(p.from,p.to),y=d.attrs.href,x={...i.coordsAtPos(Math.round((p.from+p.to)/2)),height:0,width:0},b=d,O=(T,f)=>{n="hidden",Ke.default.render(v.exports.jsx(v.exports.Fragment,{}),e),b.attrs={...b.attrs,href:T};const I=i.state.tr.insertText(f,p.from,p.to);I.addMark(p.from,p.from+f.length,b),i.dispatch(I)},C=()=>{i.dispatch(i.state.tr.removeMark(p.from,p.to,b.type).setMeta("preventAutolink",!0))},N=v.exports.jsx(L.MantineProvider,{theme:cn,children:v.exports.jsx(Ht.default,{getReferenceClientRect:()=>x,content:v.exports.jsx(Ks,{update:O,pos:x,remove:C,text:m,url:y}),onHide:()=>{r++,n="hidden"},aria:{expanded:!1},interactive:!0,interactiveBorder:30,triggerTarget:t,showOnCreate:u,appendTo:document.body,children:v.exports.jsx("div",{})},r+"")});Ke.default.render(N,e),n=u?"cursor-based":"mouse-based"}}},props:{handleDOMEvents:{mouseover(i,o){const s=o.target instanceof HTMLAnchorElement&&o.target.nodeName==="A"?o.target:void 0;return s!==t&&(t=s,i.dispatch(i.state.tr.setMeta(wi,{hoveredLinkChanged:!0}))),!1}}}})},Zs=Li.Link.extend({priority:500,addProseMirrorPlugins(){var e;return[...((e=this.parent)==null?void 0:e.call(this))||[],Xs()]}}),Qs=Ki.default.extend({addKeyboardShortcuts:()=>({"Mod-Alt-0":()=>!1})}),el=A.Extension.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",isFilterClass:"is-filter",hasAnchorClass:"has-anchor",placeholder:"Write something \u2026",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new V.Plugin({props:{decorations:e=>{const{doc:t,selection:n}=e,r=Zn.getState(e),i=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:o}=n,s=[];if(!!i)return t.descendants((a,l)=>{const d=o>=l&&o<=l+a.nodeSize,u=!a.isLeaf&&!a.childCount;if((d||!this.options.showOnlyCurrent)&&u){const p=[this.options.emptyNodeClass];this.editor.isEmpty&&p.push(this.options.emptyEditorClass),d&&p.push(this.options.hasAnchorClass),r.type==="drag"&&r.active&&p.push(this.options.isFilterClass);const m=Ve.Decoration.node(l,l+a.nodeSize,{class:p.join(" ")});s.push(m)}return this.options.includeChildren}),Ve.DecorationSet.create(t,s)}}})]}}),tl=A.Extension.create({name:"trailingNode",addProseMirrorPlugins(){const e=new V.PluginKey(this.name);return[new V.Plugin({key:e,appendTransaction:(t,n,r)=>{const{doc:i,tr:o,schema:s}=r,a=e.getState(r),l=i.content.size-2,d=s.nodes.block,u=s.nodes.content;if(!!a)return o.insert(l,d.create(void 0,u.create()))},state:{init:(t,n)=>{},apply:(t,n)=>{if(!t.docChanged)return n;let r=t.doc.lastChild;if(!r||r.type.name!=="blockgroup")throw new Error("Expected blockgroup");if(r=r.lastChild,!r||r.type.name!=="block")throw new Error("Expected block");return r.nodeSize>4}}})]}});function nl(e,t=JSON.stringify){const n={};return e.filter(r=>{const i=t(r);return Object.prototype.hasOwnProperty.call(n,i)?!1:n[i]=!0})}function rl(e){const t=e.filter((r,i)=>e.indexOf(r)!==i);return nl(t)}const il=A.Extension.create({name:"uniqueID",priority:1e4,addOptions(){return{attributeName:"id",types:[],generateID:()=>_i.v4(),filterTransaction:null}},addGlobalAttributes(){return[{types:this.options.types,attributes:{[this.options.attributeName]:{default:null}}}]},onCreate(){if(this.editor.extensionManager.extensions.find(l=>l.name==="collaboration"))return;const{view:e,state:t}=this.editor,{tr:n,doc:r}=t,{types:i,attributeName:o,generateID:s}=this.options;A.findChildren(r,l=>i.includes(l.type.name)&&l.attrs[o]===null).forEach(({node:l,pos:d})=>{n.setNodeMarkup(d,void 0,{...l.attrs,[o]:s()})}),n.setMeta("addToHistory",!1),e.dispatch(n)},addProseMirrorPlugins(){let e=null,t=!1;return[new V.Plugin({key:new V.PluginKey("uniqueID"),appendTransaction:(n,r,i)=>{console.log("appendTransaction");const o=n.some(x=>x.docChanged)&&!r.doc.eq(i.doc),s=this.options.filterTransaction&&n.some(x=>{var b,O;return!(!((O=(b=this.options).filterTransaction)===null||O===void 0)&&O.call(b,x))});if(!o||s)return;const{tr:a}=i,{types:l,attributeName:d,generateID:u}=this.options,p=A.combineTransactionSteps(r.doc,n),{mapping:m}=p;if(A.getChangedRanges(p).forEach(({newRange:x})=>{const b=A.findChildrenInRange(i.doc,x,N=>l.includes(N.type.name)),O=b.map(({node:N})=>N.attrs[d]).filter(N=>N!==null),C=rl(O);b.forEach(({node:N,pos:T})=>{var f;const I=(f=a.doc.nodeAt(T))===null||f===void 0?void 0:f.attrs[d];if(I===null){a.setNodeMarkup(T,void 0,{...N.attrs,[d]:u()});return}const{deleted:w}=m.invert().mapResult(T);w&&C.includes(I)&&a.setNodeMarkup(T,void 0,{...N.attrs,[d]:u()})})}),!!a.steps.length)return a},view(n){const r=i=>{var o;e=!((o=n.dom.parentElement)===null||o===void 0)&&o.contains(i.target)?n.dom.parentElement:null};return window.addEventListener("dragstart",r),{destroy(){window.removeEventListener("dragstart",r)}}},props:{handleDOMEvents:{drop:(n,r)=>{var i;return(e!==n.dom.parentElement||((i=r.dataTransfer)===null||i===void 0?void 0:i.effectAllowed)==="copy")&&(e=null,t=!0),!1},paste:()=>(t=!0,!1)},transformPasted:n=>{if(!t)return n;const{types:r,attributeName:i}=this.options,o=s=>{const a=[];return s.forEach(l=>{if(l.isText){a.push(l);return}if(!r.includes(l.type.name)){a.push(l.copy(o(l.content)));return}const d=l.type.create({...l.attrs,[i]:null},o(l.content),l.marks);a.push(d)}),D.Fragment.from(a)};return t=!1,new D.Slice(o(n.content),n.openStart,n.openEnd)}}})]}}),ol=A.Node.create({name:"doc",topNode:!0,content:"block+"}),Ei=()=>[A.extensions.ClipboardTextSerializer,A.extensions.Commands,A.extensions.Editable,A.extensions.FocusEvents,A.extensions.Tabindex,qi.default,el.configure({emptyNodeClass:pt.isEmpty,hasAnchorClass:pt.hasAnchor,isFilterClass:pt.isFilter,includeChildren:!0,showOnlyCurrent:!1}),il.configure({types:["block"]}),Ui.default,Ji.default,Fi.default,zi.default,Wi.default,$i.default,Yi.default,Zs,Qs,...mo,Ys,Vi.default.configure({width:5,color:"#ddeeff"}),Ss,Ri.History,Ls,tl],al={bnEditor:"_bnEditor_1bxtz_1"},ki=Ei(),sl={enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!1},ll=(e={},t=[])=>{var i,o,s;const n=e.disableHistoryExtension?ki.filter(a=>a.name!=="history"):ki,r={...sl,...e,extensions:e.enableBlockNoteExtensions===!1?e.extensions:[...e.extensions||[],...n],editorProps:{attributes:{...((i=e.editorProps)==null?void 0:i.attributes)||{},class:[al.bnEditor,Rn.bnRoot,((s=(o=e.editorProps)==null?void 0:o.attributes)==null?void 0:s.class)||""].join(" ")}}};return bn.useEditor(r,t)};Object.defineProperty(P,"EditorContent",{enumerable:!0,get:()=>bn.EditorContent}),P.Document=ol,P.getBlockNoteExtensions=Ei,P.useEditor=ll,Object.defineProperties(P,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
90
54
  //# sourceMappingURL=blocknote.umd.cjs.map