1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8082],{59962:function(t,e,n){n.d(e,{z:function(){return Q}});var r=n(85893),i=n(67294),s=n(28590),o=n(20700),l=n(69429),a=n(13637),h=n(90987),c=n(46976),d=n(44185),u=n(9535),p=n(52762),f=n(88565),m=n(59375);function g(t){return{x:(0,m.u)(t.x,0,1),y:(0,m.u)(t.y,0,1)}}function y(t,e,n="ltr"){let r=(0,i.useRef)(null),s=(0,i.useRef)(!1),o=(0,i.useRef)(!1),l=(0,i.useRef)(0),[a,h]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{s.current=!0},[]),(0,i.useEffect)(()=>{let i=({x:e,y:i})=>{cancelAnimationFrame(l.current),l.current=requestAnimationFrame(()=>{if(s.current&&r.current){r.current.style.userSelect="none";let s=r.current.getBoundingClientRect();if(s.width&&s.height){let r=(0,m.u)((e-s.left)/s.width,0,1);t({x:"ltr"===n?r:1-r,y:(0,m.u)((i-s.top)/s.height,0,1)})}}})},a=()=>{document.addEventListener("mousemove",f),document.addEventListener("mouseup",u),document.addEventListener("touchmove",y),document.addEventListener("touchend",u)},c=()=>{document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",u),document.removeEventListener("touchmove",y),document.removeEventListener("touchend",u)},d=()=>{!o.current&&s.current&&(o.current=!0,"function"==typeof e?.onScrubStart&&e.onScrubStart(),h(!0),a())},u=()=>{o.current&&s.current&&(o.current=!1,h(!1),c(),setTimeout(()=>{"function"==typeof e?.onScrubEnd&&e.onScrubEnd()},0))},p=t=>{d(),t.preventDefault(),f(t)},f=t=>i({x:t.clientX,y:t.clientY}),g=t=>{t.cancelable&&t.preventDefault(),d(),y(t)},y=t=>{t.cancelable&&t.preventDefault(),i({x:t.changedTouches[0].clientX,y:t.changedTouches[0].clientY})};return r.current?.addEventListener("mousedown",p),r.current?.addEventListener("touchstart",g,{passive:!1}),()=>{r.current&&(r.current.removeEventListener("mousedown",p),r.current.removeEventListener("touchstart",g))}},[n,t]),{ref:r,active:a}}
1var x=n(36645),k=n(65984);let[v,b]=(0,n(4704).V)(null),w=(0,i.forwardRef)(({position:t,...e},n)=>(0,r.jsx)(d.x,{ref:n,__vars:{"--thumb-y-offset":`${100*t.y}%`,"--thumb-x-offset":`${100*t.x}%`},...e}));w.displayName="@mantine/core/ColorPickerThumb";var M={wrapper:"m_fee9c77",preview:"m_9dddfbac",body:"m_bffecc3e",sliders:"m_3283bb96",thumb:"m_40d572ba",swatch:"m_d8ee6fd8",swatches:"m_5711e686",saturation:"m_202a296e",saturationOverlay:"m_11b3db02",slider:"m_d856d47d",sliderOverlay:"m_8f327113"};let S={},C=(0,u.d)((t,e)=>{let n=(0,h.w)("ColorSlider",S,t),{classNames:s,className:l,style:a,styles:u,unstyled:p,vars:m,onChange:v,onChangeEnd:C,maxValue:T,round:j,size:A="md",focusable:E=!0,value:L,overlays:O,thumbColor:R="transparent",onScrubStart:I,onScrubEnd:N,__staticSelector:H="ColorPicker",...z}=n,P=(0,c.y)({name:H,classes:M,props:n,className:l,style:a,classNames:s,styles:u,unstyled:p}),B=b()?.getStyles||P,$=(0,k.rZ)(),[F,D]=(0,i.useState)({y:0,x:L/T}),J=(0,i.useRef)(F),_=t=>j?Math.round(t*T):t*T,{ref:q}=y(({x:t,y:e})=>{J.current={x:t,y:e},v?.(_(t))},{onScrubEnd:()=>{let{x:t}=J.current;C?.(_(t)),N?.()},onScrubStart:I});(0,o.l)(()=>{D({y:0,x:L/T})},[L]);let K=(t,e)=>{t.preventDefault();let n=g(e);v?.(_(n.x)),C?.(_(n.x))},Y=O.map((t,e)=>(0,i.createElement)("div",{...B("sliderOverlay"),style:t,key:e}));return(0,r.jsxs)(d.x,{...z,ref:(0,x.Yx)(q,e),...B("slider"),role:"slider","aria-valuenow":L,"aria-valuemax":T,"aria-valuemin":0,tabIndex:E?0:-1,onKeyDown:t=>{switch(t.key){case"ArrowRight":K(t,{x:F.x+.05,y:F.y});break;case"ArrowLeft":K(t,{x:F.x-.05,y:F.y})}},"data-focus-ring":$.focusRing,__vars:{"--cp-thumb-size":`var(--cp-thumb-size-${A})`},children:[Y,(0,r.jsx)(w,{position:F,...B("thumb",{style:{top:(0,f.h)(1),background:R}})})]})});function T(t,e=0,n=10**e){return Math.round(n*t)/n}C.displayName="@mantine/core/ColorSlider";let j={grad:.9,turn:360,rad:360/(2*Math.PI)},A=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function E(t){let e=A.exec(t);return e?function({h:t,s:e,l:n,a:r}){let i=(n<50?n:100-n)/100*e;return{h:t,s:i>0?2*i/(n+i)*100:0,v:n+i,a:r}}({h:function(t,e="deg"){return Number(t)*(j[e]||1)}(e[1],e[2]),s:Number(e[3]),l:Number(e[4]),a:void 0===e[5]?1:Number(e[5])/(e[6]?100:1)}):{h:0,s:0,v:0,a:1}}function L({r:t,g:e,b:n,a:r}){let i=Math.max(t,e,n),s=i-Math.min(t,e,n),o=s?i===t?(e-n)/s:i===e?2+(n-t)/s:4+(t-e)/s:0;return{h:T(60*(o<0?o+6:o),3),s:T(i?s/i*100:0,3),v:T(i/255*100,3),a:r}}function O(t){let e="#"===t[0]?t.slice(1):t;return 3===e.length?L({r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:1}):L({r:parseInt(e.slice(0,2),16),g:parseInt(e.slice(2,4),16),b:parseInt(e.slice(4,6),16),a:1})}let R=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function I(t){let e=R.exec(t);return e?L({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:void 0===e[7]?1:Number(e[7])/(e[8]?100:1)}):{h:0,s:0,v:0,a:1}}let N={hex:/^#?([0-9A-F]{3}){1,2}$/i,hexa:/^#?([0-9A-F]{4}){1,2}$/i,rgb:/^rgb\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/i,rgba:/^rgba\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/i,hsl:/hsl\(\s*(\d+)\s*,\s*(\d+(?:\.\d+)?%)\s*,\s*(\d+(?:\.\d+)?%)\)/i,hsla:/^hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*(\d*(?:\.\d+)?)\)$/i},H={hex:O,hexa:function(t){let e="#"===t[0]?t.slice(1):t,n=t=>T(parseInt(t,16)/255,3);if(4===e.length){let t=e.slice(0,3),r=n(e[3]+e[3]);return{...O(t),a:r}}let r=e.slice(0,6),i=n(e.slice(6,8));return{...O(r),a:i}},rgb:I,rgba:I,hsl:E,hsla:E};function z(t){if("string"!=typeof t)return{h:0,s:0,v:0,a:1};if("transparent"===t)return{h:0,s:0,v:0,a:0};let e=t.trim();for(let[t,n]of Object.entries(N))if(n.test(e))return H[t](e);return{h:0,s:0,v:0,a:1}}let P={},B=(0,i.forwardRef)((t,e)=>{let{value:n,onChange:i,onChangeEnd:s,color:o,...l}=(0,h.w)("AlphaSlider",P,t);return(0,r.jsx)(C,{...l,ref:e,value:n,onChange:t=>i?.(T(t,2)),onChangeEnd:t=>s?.(T(t,2)),maxValue:1,round:!1,"data-alpha":!0,overlays:[{backgroundImage:"linear-gradient(45deg, var(--slider-checkers
1) 25%, transparent 25%), linear-gradient(-45deg, var(--slider-checkers) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, var(--slider-checkers) 75%), linear-gradient(-45deg, var(--mantine-color-body) 75%, var(--slider-checkers) 75%)",backgroundSize:`${(0,f.h)(8)} ${(0,f.h)(8)}`,backgroundPosition:`0 0, 0 ${(0,f.h)(4)}, ${(0,f.h)(4)} ${(0,f.h)(-4)}, ${(0,f.h)(-4)} 0`},{backgroundImage:`linear-gradient(90deg, transparent, ${o})`},{boxShadow:`rgba(0, 0, 0, .1) 0 0 0 ${(0,f.h)(1)} inset, rgb(0, 0, 0, .15) 0 0 ${(0,f.h)(4)} inset`}]})});function $({h:t,s:e,v:n,a:r}){let i=t/360*6,s=e/100,o=n/100,l=Math.floor(i),a=o*(1-s),h=o*(1-(i-l)*s),c=o*(1-(1-i+l)*s),d=l%6;return{r:T(255*[o,h,a,a,c,o][d]),g:T(255*[c,o,o,h,a,a][d]),b:T(255*[a,a,c,o,o,h][d]),a:T(r,2)}}function F(t,e){let{r:n,g:r,b:i,a:s}=$(t);return e?`rgba(${n}, ${r}, ${i}, ${T(s,2)})`:`rgb(${n}, ${r}, ${i})`}function D({h:t,s:e,v:n,a:r},i){let s=(200-e)*n/100,o={h:Math.round(t),s:Math.round(s>0&&s<200?e*n/100/(s<=100?s:200-s)*100:0),l:Math.round(s/2)};return i?`hsla(${o.h}, ${o.s}%, ${o.l}%, ${T(r,2)})`:`hsl(${o.h}, ${o.s}%, ${o.l}%)`}function J(t){let e=t.toString(16);return e.length<2?`0${e}`:e}
1function _(t){let{r:e,g:n,b:r}=$(t);return`#${J(e)}${J(n)}${J(r)}`}B.displayName="@mantine/core/AlphaSlider";let q={hex:_,hexa:t=>(function(t){let e=Math.round(255*t.a);return`${_(t)}${J(e)}`})(t),rgb:t=>F(t,!1),rgba:t=>F(t,!0),hsl:t=>D(t,!1),hsla:t=>D(t,!0)};function K(t,e){return e?t in q?q[t](e):q.hex(e):"#000000"}let Y=(0,i.forwardRef)((t,e)=>{let{value:n,onChange:i,onChangeEnd:s,color:o,...l}=(0,h.w)("HueSlider",{},t);return(0,r.jsx)(C,{...l,ref:e,value:n,onChange:i,onChangeEnd:s,maxValue:360,thumbColor:`hsl(${n}, 100%, 50%)`,round:!0,"data-hue":!0,overlays:[{backgroundImage:"linear-gradient(to right,hsl(0,100%,50%),hsl(60,100%,50%),hsl(120,100%,50%),hsl(170,100%,50%),hsl(240,100%,50%),hsl(300,100%,50%),hsl(360,100%,50%))"},{boxShadow:`rgba(0, 0, 0, .1) 0 0 0 ${(0,f.h)(1)} inset, rgb(0, 0, 0, .15) 0 0 ${(0,f.h)(4)} inset`}]})});function W({className:t,onChange:e,onChangeEnd:n,value:s,saturationLabel:o,focusable:l=!0,size:a,color:h,onScrubStart:c,onScrubEnd:u,...p}){let{getStyles:f}=b(),[m,x]=(0,i.useState)({x:s.s/100,y:1-s.v/100}),k=(0,i.useRef)(m),{ref:v}=y(({x:t,y:n})=>{k.current={x:t,y:n},e({s:Math.round(100*t),v:Math.round((1-n)*100)})},{onScrubEnd:()=>{let{x:t,y:e}=k.current;n({s:Math.round(100*t),v:Math.round((1-e)*100)}),u?.()},onScrubStart:c});(0,i.useEffect)(()=>{x({x:s.s/100,y:1-s.v/100})},[s.s,s.v]);let M=(t,r)=>{t.preventDefault();let i=g(r);e({s:Math.round(100*i.x),v:Math.round((1-i.y)*100)}),n({s:Math.round(100*i.x),v:Math.round((1-i.y)*100)})};return(0,r.jsxs)(d.x,{...f("saturation"),ref:v,...p,role:"slider","aria-label":o,"aria-valuenow":m.x,"aria-valuetext":K("rgba",s),tabIndex:l?0:-1,onKeyDown:t=>{switch(t.key){case"ArrowUp":M(t,{y:m.y-.05,x:m.x});break;case"ArrowDown":M(t,{y:m.y+.05,x:m.x});break;case"ArrowRight":M(t,{x:m.x+.05,y:m.y});break;case"ArrowLeft":M(t,{x:m.x-.05,y:m.y})}},children:[(0,r.jsx)("div",{...f("saturationOverlay",{style:{backgroundColor:`hsl(${s.h}, 100%, 50%)`}})}),(0,r.jsx)("div",{...f("saturationOverlay",{style:{backgroundImage:"linear-gradient(90deg, #fff, transparent)"}})}),(0,r.jsx)("div",{...f("saturationOverlay",{style:{backgroundImage:"linear-gradient(0deg, #000, transparent)"}})}),(0,r.jsx)(w,{position:m,...f("thumb",{style:{backgroundColor:h}})})]})}Y.displayName="@mantine/core/HueSlider",W.displayName="@mantine/core/Saturation";let U=(0,i.forwardRef)(({className:t,datatype:e,setValue:n,onChangeEnd:s,size:o,focusable:l,data:a,swatchesPerRow:h,...c},u)=>{let f=b(),m=a.map((t,e)=>(0,i.createElement)(p.b,{...f.getStyles("swatch"),unstyled:f.unstyled,component:"button",type:"button",color:t,key:e,radius:"sm",onClick:()=>{n(t),s?.(t)},"aria-label":t,tabIndex:l?0:-1,"data-swatch":!0}));return(0,r.jsx)(d.x,{...f.getStyles("swatches"),ref:u,...c,children:m})});U.displayName="@mantine/core/Swatches";let V={swatchesPerRow:7,withPicker:!0,focusable:!0,size:"md",__staticSelector:"ColorPicker"},G=(0,a.Z)((t,{size:e,swatchesPerRow:n})=>({wrapper:{"--cp-preview-size":(0,l.ap)(e,"cp-preview-size"),"--cp-width":(0,l.ap)(e,"cp-width"),"--cp-body-spacing":(0,l.bG)(e),"--cp-swatch-size":`${100/n}%`,"--cp-thumb-size":(0,l.ap)(e,"cp-thumb-size"),"--cp-saturation-height":(0,l.ap)(e,"cp-saturation-height")}})),Q=(0,u.d)((t,e)=>{let n=(0,h.w)("ColorPicker",V,t),{classNames:l,className:a,style:u,styles:f,unstyled:m,vars:g,format:y,value:x,defaultValue:k,onChange:b,onChangeEnd:w,withPicker:S,size:C,saturationLabel:T,hueLabel:j,alphaLabel:A,focusable:E,swatches:L,swatchesPerRow:O,fullWidth:R,onColorSwatchClick:I,__staticSelector:H,mod:P,...$}=n,F=(0,c.y)({name:H,props:n,classes:M,className:a,style:u,classNames:l,styles:f,unstyled:m,rootSelector:"wrapper",vars:g,varsResolver:G}),D=(0,i.useRef)(y),J=(0,i.useRef)(),_=(0,i.useRef)(-1),q=(0,i.useRef)(!1),Q="hexa"===y||"rgba"===y||"hsla"===y,[Z,X,tt]=(0,s.C)({value:x,defaultValue:k,finalValue:"#FFFFFF",onChange:b}),[te,tn]=(0,i.useState)(z(Z)),tr=()=>{window.clearTimeout(_.current),q.current=!0},ti=()=>{window.clearTimeout(_.current),_.current=window.setTimeout(()=>{q.current=!1},200)},ts=t=>{tn(e=>{let n={...e,...t};return J.current=K(D.current,n),n}),X(J.current)};return(0,o.l)(()=>{(function(t){for(let[,e]of Object.entries(N))if(e.test(t))return!0;return!1})(x)&&!q.current&&tn(z(x))},[x]),(0,o.l)(()=>
1{D.current=y,X(K(y,te))},[y]),(0,r.jsx)(v,{value:{getStyles:F,unstyled:m},children:(0,r.jsxs)(d.x,{ref:e,...F("wrapper"),size:C,mod:[{"full-width":R},P],...$,children:[S&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(W,{value:te,onChange:ts,onChangeEnd:({s:t,v:e})=>w?.(K(D.current,{...te,s:t,v:e})),color:Z,size:C,focusable:E,saturationLabel:T,onScrubStart:tr,onScrubEnd:ti}),(0,r.jsxs)("div",{...F("body"),children:[(0,r.jsxs)("div",{...F("sliders"),children:[(0,r.jsx)(Y,{value:te.h,onChange:t=>ts({h:t}),onChangeEnd:t=>w?.(K(D.current,{...te,h:t})),size:C,focusable:E,"aria-label":j,onScrubStart:tr,onScrubEnd:ti}),Q&&(0,r.jsx)(B,{value:te.a,onChange:t=>ts({a:t}),onChangeEnd:t=>{w?.(K(D.current,{...te,a:t}))},size:C,color:K("hex",te),focusable:E,"aria-label":A,onScrubStart:tr,onScrubEnd:ti})]}),Q&&(0,r.jsx)(p.b,{color:Z,radius:"sm",size:"var(--cp-preview-size)",...F("preview")})]})]}),Array.isArray(L)&&(0,r.jsx)(U,{data:L,swatchesPerRow:O,focusable:E,setValue:X,onChangeEnd:t=>{let e=K(y,z(t));I?.(e),w?.(e),tt||tn(z(t))}})]})})});Q.classes=M,Q.displayName="@mantine/core/ColorPicker"},52762:function(t,e,n){n.d(e,{b:function(){return f}});var r=n(85893),i=n(88565);n(67294);var s=n(69429),o=n(13637),l=n(90987),a=n(46976),h=n(44185),c=n(43362),d={root:"m_de3d2490",colorOverlay:"m_862f3d1b",shadowOverlay:"m_98ae7f22",alphaOverlay:"m_95709ac0",childrenOverlay:"m_93e74e3"};let u={withShadow:!0},p=(0,o.Z)((t,{radius:e,size:n})=>({root:{"--cs-radius":void 0===e?void 0:(0,s.H5)(e),"--cs-size":(0,i.h)(n)}})),f=(0,c.b)((t,e)=>{let n=(0,l.w)("ColorSwatch",u,t),{classNames:i,className:s,style:o,styles:c,unstyled:f,vars:m,color:g,size:y,radius:x,withShadow:k,children:v,variant:b,...w}=(0,l.w)("ColorSwatch",u,n),M=(0,a.y)({name:"ColorSwatch",props:n,classes:d,className:s,style:o,classNames:i,styles:c,unstyled:f,vars:m,varsResolver:p});return(0,r.jsxs)(h.x,{ref:e,variant:b,size:y,...M("root",{focusable:!0}),...w,children:[(0,r.jsx)("span",{...M("alphaOverlay")}),k&&(0,r.jsx)("span",{...M("shadowOverlay")}),(0,r.jsx)("span",{...M("colorOverlay",{style:{backgroundColor:g}})}),(0,r.jsx)("span",{...M("childrenOverlay"),children:v})]})});f.classes=d,f.displayName="@mantine/core/ColorSwatch"},356:function(t,e,n){n.d(e,{Z:function(){return f}});var r=n(85893),i=n(67294),s=n(69429),o=n(13637),l=n(90987),a=n(46976),h=n(44185),c=n(9535),d={root:"m_4081bf90"};let u={preventGrowOverflow:!0,gap:"md",align:"center",justify:"flex-start",wrap:"wrap"},p=(0,o.Z)((t,{grow:e,preventGrowOverflow:n,gap:r,align:i,justify:o,wrap:l},{childWidth:a})=>({root:{"--group-child-width":e&&n?a:void 0,"--group-gap":(0,s.bG)(r),"--group-align":i,"--group-justify":o,"--group-wrap":l}})),f=(0,c.d)((t,e)=>{let n=(0,l.w)("Group",u,t),{classNames:o,className:c,style:f,styles:m,unstyled:g,children:y,gap:x,align:k,justify:v,wrap:b,grow:w,preventGrowOverflow:M,vars:S,variant:C,__size:T,mod:j,...A}=n,E=i.Children.toArray(y).filter(Boolean),L=E.length,O=(0,s.bG)(x??"md"),R=`calc(${100/L}% - (${O} - ${O} / ${L}))`,I=(0,a.y)({name:"Group",props:n,stylesCtx:{childWidth:R},className:c,style:f,classes:d,classNames:o,styles:m,unstyled:g,vars:S,varsResolver:p});return(0,r.jsx)(h.x,{...I("root"),ref:e,variant:C,mod:[{grow:w},j],size:T,...A,children:E})});f.classes=d,f.displayName="@mantine/core/Group"},7:function(t,e,n){n.d(e,{M:function(){return w}});var r=n(85893);n(67294);var i=n(90987),s=n(46976),o=n(23491),l=n(44185),a=n(9535),h=n(3877),c=n(55541),d=n(68626),u=n(69429),p=n(91193),f=n(57370),m=n(65984),g=n(90954);function y({spacing:t,verticalSpacing:e,cols:n,selector:i}){let s=(0,m.rZ)(),o=void 0===e?t:e,l=(0,d.L)({"--sg-spacing-x":(0,u.bG)((0,f.v)(t)),"--sg-spacing-y":(0,u.bG)((0,f.v)(o)),"--sg-cols":f.v(n)?.toString()}),a=(0,h.X)(s.breakpoints).reduce((e,r)=>(e[r]||(e[r]={}),"object"==typeof t&&void 0!==t[r]&&(e[r]["--sg-spacing-x"]=(0,u.bG)(t[r])),"object"==typeof o&&void 0!==o[r]&&(e[r]["--sg-spacing-y"]=(0,u.bG)(o[r])),"object"==typeof n&&void 0!==n[r]&&(e[r]["--sg-cols"]=n[r]),e),{}),c=(0,p.I)((0,h.X)(a),s).filter(t=>(0,h.X)(a[t.value]).length>0).map(t=>({query:`(min-width: ${s.breakpoints[t.value]})`,styles:a[t.value]}));return(0,r.jsx)(g.f,{styles:l,media:c,selector:i})}function x(t){return"object"==typeof t&&null!==t?(0,h.X)(t):[]}function k({spacing:t,verticalSpacing:e,cols:n,selector:i}){let s=void 0===e?t:e,o=(0,d.L)({"--sg-spacing-x":(0,u.bG)((0,f.v)(t)),"--sg-spacing-y":(0,u.bG)((0,f.v)(s)),"--sg-cols":f.v(n)?.toString()}),l=function({spacing:t,verticalSpacing:e,cols:n}){return Array.from(new Set([...x(t),...x(e),...x(n)])).sort((t,e)=>(0,c.px)(t)-(0,c.px)(e))}({spacing:t,verticalSpacing:e,cols:n}),a=l.reduce((e,r)=>(e[r]||(e[r]={}),"object"==typeof t&&void 0!==t[r]&&(e[r]["--sg-spacing-x"]=(0,u.bG)(t[r])),"object"==typeof s&&void 0!==s[r]&&(e[r]["--sg-spacing-y"]=(0,u.bG)(s[r])),"object"==typeof n&&void 0!==n[r]&&(e[r]["--sg-cols"]=n[r]),e),{}),h=l.map(t=>({query:`simple-grid (min-width: ${t})`,styles:a[t]}));return(0,r.jsx)(g.f,{styles:o,container:h,selector:i})}var v={container:"m_925c2d2c",root:"m_2415a157"};let b={cols:1,spacing:"md",type:"media"},w=(0,a.d)((t,e)=>{let n=(0,i.w)("SimpleGrid",b,t),{classNames:a,className:h,style:c,styles:d,unstyled:u,vars:p,cols:f,verticalSpacing:m,spacing:g,type:x,...w}=n,M=(0,s.y)({name:"SimpleGrid",classes:v,props:n,className:h,style:c,classNames:a,styles:d,unstyled:u,vars:p}),S=(0,o.m)();return"container"===x?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(k,{...n,selector:`.${S}`}),(0,r.jsx)("div",{...M("container"),children:(0,r.jsx)(l.x,{ref:e,...M("root",{className:S}),...w})})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(y,{...n,selector:`.${S}`}),(0,r.jsx)(l.x,{ref:e,...M("root",{className:S}),...w})]})});w.classes=v,w.displayName="@mantine/core/SimpleGrid"},57370:function(t,e,n){n.d(e,{v:function(){return r}});function r(t){return"object"==typeof t&&null!==t?"base"in t?t.base:void 0:t}},91193:function(t,e,n){n.d(e,{I:function(){return i}});var r=n(55541);function i(t,e){let n=t.map(t=>({value:t,px:t in e.breakpoints?(0,r.px)(e.breakpoints[t]):(0,r.px)(t)}));return n.sort((t,e)=>t.px-e.px),n}},37113:function(t,e,n){n.d(e,{q:function(){return i}});var r=n(67294);function i(t=!1,e){let{onOpen:n,onClose:i}=e||{},[s,o]=(0,r.useState)(t),l=(0,r.useCallback)(()=>{o(t=>t||(n?.(),!0))},[n]),a=(0,r.useCallback)(()=>{o(t=>t?(i?.(),!1):t)},[i]),h=(0,r.useCallback)(()=>{s?a():l()},[a,l,s]);return[s,{open:l,close:a,toggle:h}]}},93034:function(t,e,n){n.d(e,{h:function(){return s}});var r=n(67294);let i={x:0,y:0,width:0,height:0,top:0,left:0,bottom:0,right:0};function s(t){let[e,{width:n,height:s}]=function(t){let e=(0,r.useRef)(0),n=(0,r.useRef)(null),[s,o]=(0,r.useState)(i),l=(0,r.useMemo)(()=>"undefined"!=typeof window?new ResizeObserver(t=>{let r=t[0];r&&(cancelAnimationFrame(e.current),e.current=requestAnimationFrame(()=>{n.current&&o(r.contentRect)}))}):null,[]);return(0,r.useEffect)(()=>(n.current&&l?.observe(n.current,t),()=>{l?.disconnect(),e.current&&cancelAnimationFrame(e.current)}),[n.current]),[n,s]}(t);return{ref:e,width:n,height:s}}},30233:function(t,e,n){n.d(e,{L:function(){return t8}});var r=n(85893),i=n(67294),s=n(9535),o=n(90987),l=n(46976),a=n(44185);let h={linkControlLabel:"Link",colorPickerControlLabel:"Text color",highlightControl
1Label:"Highlight text",colorControlLabel:t=>`Set text color ${t}`,boldControlLabel:"Bold",italicControlLabel:"Italic",underlineControlLabel:"Underline",strikeControlLabel:"Strikethrough",clearFormattingControlLabel:"Clear formatting",unlinkControlLabel:"Remove link",bulletListControlLabel:"Bullet list",orderedListControlLabel:"Ordered list",h1ControlLabel:"Heading 1",h2ControlLabel:"Heading 2",h3ControlLabel:"Heading 3",h4ControlLabel:"Heading 4",h5ControlLabel:"Heading 5",h6ControlLabel:"Heading 6",blockquoteControlLabel:"Blockquote",alignLeftControlLabel:"Align text: left",alignCenterControlLabel:"Align text: center",alignRightControlLabel:"Align text: right",alignJustifyControlLabel:"Align text: justify",codeControlLabel:"Code",codeBlockControlLabel:"Code block",subscriptControlLabel:"Subscript",superscriptControlLabel:"Superscript",unsetColorControlLabel:"Unset color",hrControlLabel:"Horizontal line",undoControlLabel:"Undo",redoControlLabel:"Redo",tasksControlLabel:"Task list",tasksSinkLabel:"Decrease task level",tasksLiftLabel:"Increase task level",linkEditorInputLabel:"Enter URL",linkEditorInputPlaceholder:"https://example.com/",linkEditorExternalLink:"Open link in a new tab",linkEditorInternalLink:"Open link in the same tab",linkEditorSave:"Save",colorPickerCancel:"Cancel",colorPickerClear:"Clear color",colorPickerColorPicker:"Color picker",colorPickerPalette:"Color palette",colorPickerSave:"Save",colorPickerColorLabel:t=>`Set text color ${t}`},[c,d]=(0,n(76197).R)("RichTextEditor component was not found in tree");var u=n(71284),p={root:"m_d6493fad"};let f={},m=(0,s.d)((t,e)=>{let n=(0,o.w)("TypographyStylesProvider",f,t),{classNames:i,className:s,style:h,styles:c,unstyled:d,...u}=n,m=(0,l.y)({name:"TypographyStylesProvider",classes:p,props:n,className:s,style:h,classNames:i,styles:c,unstyled:d});return(0,r.jsx)(a.x,{ref:e,...m("root"),...u})});m.classes=p,m.displayName="@mantine/core/TypographyStylesProvider";var g={root:"m_dd3f7539",typographyStylesProvider:"m_d37966d9",content:"m_c2204cc2",linkEditorDropdown:"m_8a991b4f",control:"m_c2207da6",controlsGroup:"m_2ab47ef2",linkEditor:"m_b67b711e",linkEditorInput:"m_296cf94c",linkEditorExternalControl:"m_cfef614",linkEditorSave:"m_3b28e7bb",toolbar:"m_4574a3c4",taskList:"m_8b44009a"};let y={},x=(0,s.d)((t,e)=>{let{classNames:n,className:i,style:s,styles:l,vars:h,...c}=(0,o.w)("RichTextEditorContent",y,t),p=d();return p.withTypographyStyles?(0,r.jsx)(m,{...p.getStyles("typographyStylesProvider",{className:i,style:s,styles:l,classNames:n}),unstyled:p.unstyled,ref:e,children:(0,r.jsx)(a.x,{component:u.kg,editor:p.editor,...p.getStyles("content",{classNames:n,styles:l}),...c})}):(0,r.jsx)(a.x,{component:u.kg,editor:p.editor,...p.getStyles("content",{classNames:n,styles:l,className:i,style:s}),...c})});function k(t){return(0,r.jsx)("svg",{...t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"})}function v(t){return(0,r.jsxs)(k,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M7 5h6a3.5 3.5 0 0 1 0 7h-6z"}),(0,r.jsx)("path",{d:"M13 12h1a3.5 3.5 0 0 1 0 7h-7v-7"})]})}function b(t){return(0,r.jsxs)(k,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M11 5l6 0"}),(0,r.jsx)("path",{d:"M7 19l6 0"}),(0,r.jsx)("path",{d:"M14 5l-4 14"})]})}function w(t){return(0,r.jsxs)(k,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M7 5v5a5 5 0 0 0 10 0v-5"}),(0,r.jsx)("path",{d:"M5 19h14"})]})}function M(t){return(0,r.jsxs)(k,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M5 12l14 0"}),(0,r.jsx)("path",{d:"M16 6.5a4 2 0 0 0 -4 -1.5h-1a3.5 3.5 0 0 0 0 7h2a3.5 3.5 0 0 1 0 7h-1.5a4 2 0 0 1 -4 -1.5"})]})}function S(t){return(0,r.jsxs)(k,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M17 15l4 4m0 -4l-4 4"}),(0,r.jsx)("path",{d:"M7 6v-1h11v1"}),(0,r.jsx)("path",{d:"M7 19l4 0"}),(0,r.jsx)("path",{d:"M13 5l-4 14"})]})}function C(t){return(0,r.jsxs)(k,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M19 18v-8l-2 2"}),(0,r.jsx)("path",{d:"M4 6v12"}),(0,r.jsx)("path",{d:"M12 6v12"}),(0,r.jsx)("path",{d:"M11 18h2"}),(0,r.jsx)("path",{d:"M3 18h2"}),(0,r.jsx)("path",{d:"M4 12h8"}),(0,r.jsx)("path",{d:"M3 6h2"}),(0,r.jsx)("path",{d:"M11 6h2"})]})}function T(t){return(0,r.jsxs)(k,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M17 12a2 2 0 1 1 4 0c0 .591 -.417 1.318 -.816 1.858l-3.184 4.143l4 0"}),(0,r.jsx)("path",{d:"M4 6v12"}),(0,r.jsx)("path",{d:"M12 6v12"}),(0,r.jsx)("path",{d:"M11 18h2"}),(0,r.jsx)("path",{d:"M3 18h2"}),(0,r.jsx)("path",{d:"M4 12h8"}),(0,r.jsx)("path",{d:"M3 6h2"}),(0,r.jsx)("path",{d:"M11 6h2"})]})}function j(t){return(0,r.jsxs)(k,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M19 14a2 2 0 1 0 -2 -2"}),(0,r.jsx)("path",{d:"M17 16a2 2 0 1 0 2 -2"}),(0,r.jsx)("path",{d:"M4 6v12"}),(0,r.jsx)("path",{d:"M12 6v12"}),(0,r.jsx)("path",{d:"M11 18h2"}),(0,r.jsx)("path",{d:"M3 18h2"}),(0,r.jsx)("path",{d:"M4 12h8"}),(0,r.jsx)("path",{d:"M3 6h2"}),(0,r.jsx)("path",{d:"M11 6h2"})]})}function A(t){return(0,r.jsxs)(k,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M20 18v-8l-4 6h5"}),(0,r.jsx)("path",{d:"M4 6v12"}),(0,r.jsx)("path",{d:"M12 6v12"}),(0,r.jsx)("path",{d:"M11 18h2"}),(0,r.jsx)("path",{d:"M3 18h2"}),(0,r.jsx)("path",{d:"M4 12h8"}),(0,r.jsx)("path",{d:"M3 6h2"}),(0,r.jsx)("path",{d:"M11 6h2"})]})}function E(t){return(0,r.jsxs)(k,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M17 18h2a2 2 0 1 0 0 -4h-2v-4h4"}),(0,r.jsx)("path",{d:"M4 6v12"}),(0,r.jsx)("path",{d:"M12 6v12"}),(0,r.jsx)("path",{d:"M11 18h2"}),(0,r.jsx)("path",{d:"M3 18h2"}),(0,r.jsx)("path",{d:"M4 12h8"}),(0,r.jsx)("path",{d:"M3 6h2"}),(0,r.jsx)("path",{d:"M11 6h2"})]})}function L(t){return(0,r.jsxs)(k,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M19 14a2 2 0 1 0 0 4a2 2 0 0 0 0 -4z"}),(0,r.jsx)("path",{d:"M21 12a2 2 0 1 0 -4 0v4"}),(0,r.jsx)("path",{d:"M4 6v12"}),(0,r.jsx)("path",{d:"M12 6v12"}),(0,r.jsx)("path",{d:"M11 18h2"}),(0,r.jsx)("path",{d:"M3 18h2"}),(0,r.jsx)("path",{d:"M4 12h8"}),(0,r.jsx)("path",{d:"M3 6h2"}),(0,r.jsx)("path",{d:"M11 6h2"})]})}function O(t){return(0,r.jsxs)(k,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M9 6l11 0"}),(0,r.jsx)("path",{d:"M9 12l11 0"}),(0,r.jsx)("path",{d:"M9 18l11 0"}),(0,r.jsx)("path",{d:"M5 6l0 .01"}),(0,r.jsx)("path",{d:"M5 12l0 .01"}),(0,r.jsx)("path",{d:"M5 18l0 .01"})]})}function R(t){return(0,r.jsxs)(k,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M11 6h9"}),(0,r.jsx)("path",{d:"M11 12h9"}),(0,r.jsx)("path",{d:"M12 18h8"}),(0,r.jsx)("path",{d:"M4 16a2 2 0 1 1 4 0c0 .591 -.5 1 -1 1.5l-3 2.5h4"}),(0,r.jsx)("path",{d:"M6 10v-6l-2 2"})]})}function I(t){return(0,r.jsxs)(k,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M17 22v-2"}),(0,r.jsx)("path",{d:"M9 15l6 -6"}),(0,r.jsx)("path",{d:"M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464"}),(0,r.jsx)("path",{d:"M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463"}),(0,r.jsx)("path",{d:"M20 17h2"}),(0,r.jsx)("path",{d:"M2 7h2"}),(0,r.jsx)("path",{d:"M7 2v2"})]})}function N(t){return(0,r.jsxs)(k,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M6 15h15"}),(0,r.jsx)("path",{d:"M21 19h-15"}),(0,r.jsx)("path",{d:"M15 11h6"}),(0,r.jsx)("path",{d:"M21 7h-6"}),(0,r.jsx)("path",{d:"M9 9h1a1 1 0 1 1 -1 1v-2.5a2 2 0 0 1 2 -2"}),(0,r.jsx)("path",{d:"M3 9h1a1 1 0 1 1 -1 1v-2.5a2 2 0 0 1 2 -2"})]})}function H(t){return(0,r.jsxs)(k,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M4 6l16 0"}),(0,r.jsx)("path",{d:"M4 12l10 0"}),(0,r.jsx)("path",{d:"M4 18l14 0"})]})}function z(t){return(0,r.jsxs)(k,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M4 6l16 0"}),(0,r.jsx)("path",{d:"M10 12l10 0"}),(0,r.jsx)("path",{d:"M6 18l14 0"})]})}function P(t){return(0,r.jsxs)(k,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M4 6l16 0"}),(0,r.jsx)("path",{d:"M8 12l8 0"}),(0,r.jsx)("path",{d:"M6 18l12 0"})]})}function B(t){return(0,r.jsxs)(k,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M4 6l16 0"}),(0,r.jsx)("path",{d:"M4 12l16 0"}),(0,r.jsx)("path",{d:"M4 18l12 0"})]})}function $(t){return(0,r.jsxs)(k,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M5 7l8 10m-8 0l8 -10"}),(0,r.jsx)("path",{d:"M21 20h-4l3.5 -4a1.73 1.73 0 0 0 -3.5 -2"})]})}function F(t){return(0,r.jsxs)(k,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M5 7l8 10m-8 0l8 -10"}),(0,r.jsx)("path",{d:"M21 11h-4l3.5 -4a1.73 1.73 0 0 0 -3.5 -2"})]})}function D(t){return(0,r.jsxs)(k,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M7 8l-4 4l4 4"}),(0,r.jsx)("path",{d:"M17 8l4 4l-4 4"}),(0,r.jsx)("path",{d:"M14 4l-4 16"})]})}function J(t){return(0,r.jsxs)(k,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M3 19h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4"}),(0,r.jsx)("path",{d:"M12.5 5.5l4 4"}),(0,r.jsx)("path",{d:"M4.5 13.5l4 4"}),(0,r.jsx)("path",{d:"M21 15v4h-8l4 -4z"})]})}function _(t){return(0,r.jsxs)(k,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M5 12h2"}),(0,r.jsx)("path",{d:"M17 12h2"}),(0,r.jsx)("path",{d:"M11 12h2"})]})}function q(t){return(0,r.jsxs)(k,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M20.042 16.045a9 9 0 0 0 -12.087 -12.087m-2.318 1.677a9 9 0 1 0 12.725 12.73"}),(0,r.jsx)("path",{d:"M3 3l18 18"})]})}function K(t){return(0,r.jsxs)(k,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M11 7l6 6"}),(0,r.jsx)("path",{d:"M4 16l11.7 -11.7a1 1 0 0 1 1.4 0l2.6 2.6a1 1 0 0 1 0 1.4l-11.7 11.7h-4v-4z"})]})}function Y(t){return(0,r.jsxs)(k,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M18 6l-12 12"}),(0,r.jsx)("path",{d:"M6 6l12 12"})]})}function W(t){return(0,r.jsxs)(k,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M12 21a9 9 0 0 1 0 -18c4.97 0 9 3.582 9 8c0 1.06 -.474 2.078 -1.318 2.828c-.844 .75 -1.989 1.172 -3.182 1.172h-2.5a2 2 0 0 0 -1 3.75a1.3 1.3 0 0 1 -1 2.25"}),(0,r.jsx)("path",{d:"M8.5 10.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),(0,r.jsx)("path",{d:"M12.5 7.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),(0,r.jsx)("path",{d:"M16.5 10.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"})]})}function U(t){return(0,r.jsxs)(k,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M5 12l5 5l10 -10"})]})}function V(t){return(0,r.jsxs)(k,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M9 15l6 -6"}),(0,r.jsx)("path",{d:"M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464"}),(0,r.jsx)("path",{d:"M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463"})]})}function G(t){return(0,r.jsxs)(k,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M12 6h-6a2 2 0 0 0 -2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-6"}),(0,r.jsx)("path",{d:"M11 13l9 -9"}),(0,r.jsx)("path",{d:"M15 4h5v5"})]})}function Q(t){return(0,r.jsxs)(k,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M9 14l-4 -4l4 -4"}),(0,r.jsx)("path",{d:"M5 10h11a4 4 0 1 1 0 8h-1"})]})}function Z(t){return(0,r.jsxs)(k,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M15 14l4 -4l-4 -4"}),(0,r.jsx)("path",{d:"M19 10h-11a4 4 0 1 0 0 8h1"})]})}function X(t){return(0,r.jsxs)(k,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M3.5 5.5l1.5 1.5l2.5 -2.5"}),(0,r.jsx)("path",{d:"M3.5 11.5l1.5 1.5l2.5 -2.5"}),(0,r.jsx)("path",{d:"M3.5 17.5l1.5 1.5l2.5 -2.5"}),(0,r.jsx)("path",{d:"M11 6l9 0"}),(0,r.jsx)("path",{d:"M11 12l9 0"}),(0,r.jsx)("path",{d:"M11 18l9 0"})]})}function tt(t){return(0,r.jsxs)(k,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M20 6l-11 0"}),(0,r.jsx)("path",{d:"M20 12l-7 0"}),(0,r.jsx)("path",{d:"M20 18l-11 0"}),(0,r.jsx)("path",{d:"M4 8l4 4l-4 4"})]})}function te(t){return(0,r.jsxs)(k,{...t,children:[(0,r.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,r.jsx)("path",{d:"M20 6l-7 0"}),(0,r.jsx)("path",{d:"M20 12l-9 0"}),(0,r.jsx)("path",{d:"M20 18l-7 0"}),(0,r.jsx)("path",{d:"M8 8l-4 4l4 4"})]})}x.classes=g,x.displayName="@mantine/tiptap/RichTextEditorContent";var tn=n(91166),tr=n(88565);let ti={interactive:!0},ts=(0,s.d)((t,e)=>{let{classNames:n,className:i,style:s,styles:l,vars:a,interactive:h,active:c,onMouseDown:u,disabled:p,...f}=(0,o.w)("RichTextEditorControl",ti,t),m=d();return(0,r.jsx)(tn.k,{...f,...m.getStyles("control",{className:i,style:s,classNames:n,styles:l}),disabled:p,"data-rich-text-editor-control":!0,tabIndex:h?0:-1,"data-interactive":h||void 0,"data-disabled":p||void 0,"data-active":c||void 0,"aria-pressed":c&&h||void 0,"aria-hidden":!h||void 0,ref:e,unstyled:m.unstyled,onMouseDown:t=>{t.preventDefault(),u?.(t)}})});ts.classes=g,ts.displayName="@mantine/tiptap/RichTextEditorControl";let to=(0,i.forwardRef)(({className:t,icon:e,...n},i)=>(0,r.jsx)(ts,{ref:i,...n,children:(0,r.jsx)(e,{style:{width:(0,tr.h)(16),height:(0,tr.h)(16)}})}));function tl({label:t,isActive:e,operation:n,icon:s,isDisabled:o}){return(0,i.forwardRef)((i,l)=>{let{editor:a,labels:h}=d(),c=h[t];return(0,r.jsx)(to,{...i,"aria-label":c,title:c,active:!!e?.name&&a?.isActive(e.name,e.attributes),ref:l,onClick:()=>a?.chain().focus()[n.name](n.attributes).run(),icon:i.icon||s,disabled:o?.(a)||!1})})}to.displayName="@mantine/tiptap/RichTextEditorControlBase";let ta=tl({label:"boldControlLabel",icon:t=>(0,r.jsx)(v,{...t}),isActive:{name:"bold"},operation:{name:"toggleBold"}}
1),th=tl({label:"italicControlLabel",icon:t=>(0,r.jsx)(b,{...t}),isActive:{name:"italic"},operation:{name:"toggleItalic"}}),tc=tl({label:"underlineControlLabel",icon:t=>(0,r.jsx)(w,{...t}),isActive:{name:"underline"},operation:{name:"toggleUnderline"}}),td=tl({label:"strikeControlLabel",icon:t=>(0,r.jsx)(M,{...t}),isActive:{name:"strike"},operation:{name:"toggleStrike"}}),tu=tl({label:"clearFormattingControlLabel",icon:t=>(0,r.jsx)(S,{...t}),operation:{name:"unsetAllMarks"}}),tp=tl({label:"unlinkControlLabel",icon:t=>(0,r.jsx)(I,{...t}),operation:{name:"unsetLink"}}),tf=tl({label:"bulletListControlLabel",icon:t=>(0,r.jsx)(O,{...t}),isActive:{name:"bulletList"},operation:{name:"toggleBulletList"}}),tm=tl({label:"orderedListControlLabel",icon:t=>(0,r.jsx)(R,{...t}),isActive:{name:"orderedList"},operation:{name:"toggleOrderedList"}}),tg=tl({label:"h1ControlLabel",icon:t=>(0,r.jsx)(C,{...t}),isActive:{name:"heading",attributes:{level:1}},operation:{name:"toggleHeading",attributes:{level:1}}}),ty=tl({label:"h2ControlLabel",icon:t=>(0,r.jsx)(T,{...t}),isActive:{name:"heading",attributes:{level:2}},operation:{name:"toggleHeading",attributes:{level:2}}}),tx=tl({label:"h3ControlLabel",icon:t=>(0,r.jsx)(j,{...t}),isActive:{name:"heading",attributes:{level:3}},operation:{name:"toggleHeading",attributes:{level:3}}}),tk=tl({label:"h4ControlLabel",icon:t=>(0,r.jsx)(A,{...t}),isActive:{name:"heading",attributes:{level:4}},operation:{name:"toggleHeading",attributes:{level:4}}}),tv=tl({label:"h5ControlLabel",icon:t=>(0,r.jsx)(E,{...t}),isActive:{name:"heading",attributes:{level:5}},operation:{name:"toggleHeading",attributes:{level:5}}}),tb=tl({label:"h6ControlLabel",icon:t=>(0,r.jsx)(L,{...t}),isActive:{name:"heading",attributes:{level:6}},operation:{name:"toggleHeading",attributes:{level:6}}}),tw=tl({label:"blockquoteControlLabel",icon:t=>(0,r.jsx)(N,{...t}),isActive:{name:"blockquote"},operation:{name:"toggleBlockquote"}}),tM=tl({label:"alignLeftControlLabel",icon:t=>(0,r.jsx)(H,{...t}),operation:{name:"setTextAlign",attributes:"left"}}),tS=tl({label:"alignRightControlLabel",icon:t=>(0,r.jsx)(z,{...t}),operation:{name:"setTextAlign",attributes:"right"}}),tC=tl({label:"alignCenterControlLabel",icon:t=>(0,r.jsx)(P,{...t}),operation:{name:"setTextAlign",attributes:"center"}}),tT=tl({label:"alignJustifyControlLabel",icon:t=>(0,r.jsx)(B,{...t}),operation:{name:"setTextAlign",attributes:"justify"}}),tj=tl({label:"subscriptControlLabel",icon:t=>(0,r.jsx)($,{...t}),isActive:{name:"subscript"},operation:{name:"toggleSubscript"}}),tA=tl({label:"superscriptControlLabel",icon:t=>(0,r.jsx)(F,{...t}),isActive:{name:"superscript"},operation:{name:"toggleSuperscript"}}),tE=tl({label:"codeControlLabel",icon:t=>(0,r.jsx)(D,{...t}),isActive:{name:"code"},operation:{name:"toggleCode"}}),tL=tl({label:"codeBlockControlLabel",icon:t=>(0,r.jsx)(D,{...t}),isActive:{name:"codeBlock"},operation:{name:"toggleCodeBlock"}}),tO=tl({label:"highlightControlLabel",icon:t=>(0,r.jsx)(J,{...t}),isActive:{name:"highlight"},operation:{name:"toggleHighlight"}}),tR=tl({label:"hrControlLabel",icon:t=>(0,r.jsx)(_,{...t}),operation:{name:"setHorizontalRule"}}),tI=tl({label:"unsetColorControlLabel",icon:t=>(0,r.jsx)(q,{...t}),operation:{name:"unsetColor"}}),tN=tl({label:"undoControlLabel",icon:t=>(0,r.jsx)(Q,{...t}),isDisabled:t=>!t?.can().undo(),operation:{name:"undo"}}),tH=tl({label:"redoControlLabel",icon:t=>(0,r.jsx)(Z,{...t}),isDisabled:t=>!t?.can().redo(),operation:{name:"redo"}}),tz=tl({label:"tasksControlLabel",icon:t=>(0,r.jsx)(X,{...t}),isActive:{name:"taskList"},operation:{name:"toggleTaskList"}}),tP=tl({label:"tasksSinkLabel",icon:t=>(0,r.jsx)(tt,{...t}),operation:{name:"sinkListItem",attributes:"taskItem"},isDisabled:t=>!t?.can().sinkListItem("taskItem")}),tB=tl({label:"tasksLiftLabel",icon:t=>(0,r.jsx)(te,{...t}),operation:{name:"liftListItem",attributes:"taskItem"},isDisabled:t=>!t?.can().liftListItem("taskItem")});var t$=n(19784),tF=n(214),tD=n(86414),tJ=n(1032),t_=n(24920),tq=n(37113),tK=n(77953);let tY=t=>(0,r.jsx)(V,{...t}),tW={},tU=(0,s.d)((t,e)=>{let n=(0,o.w)("RichTextEditorLinkControl",tW,t),{classNames:s,className:l,style:a,styles:h,vars:c,icon:u,popoverProps:p,disableTooltips:f,initialExternal:m,...g}=n,y=d(),x={classNames:s,styles:h},[k,v]=function(t){let[e,n]=(0,i.useState)("");return[e,t=>{if(t){if("function"==typeof t)n(t);else if("object"==typeof t&&"nativeEvent"in t){let{currentTarget:e}=t;n("checkbox"===e.type?e.checked:e.value)}else n(t)}else n(t)}]}(0),[b,w]=(0,i.useState)(m),[M,{open:S,close:C}]=(0,tq.q)(!1),T=()=>{S();let t=y.editor?.getAttributes("link");v(t?.href||""),w(t?.href?t?.target==="_blank":m)},j=()=>{C(),v(""),w(m)},A=()=>{j(),""===k?y.editor?.chain().focus().extendMarkRange("link").unsetLink().run():y.editor?.chain().focus().extendMarkRange("link").setLink({href:k,target:b?"_blank":null}).run()};(0,tK.s)("edit-link",T,!1);let{resolvedClassNames:E,resolvedStyles:L}=(0,t$.h)({classNames:s,styles:h,props:n});return(0,r.jsxs)(tF.J,{trapFocus:!0,shadow:"md",withinPortal:!0,opened:M,onClose:j,offset:-44,zIndex:1e4,...p,children:[(0,r.jsx)(tF.J.Target,{children:(0,r.jsx)(to,{icon:u||tY,...g,"aria-label":y.labels.linkControlLabel,title:y.labels.linkControlLabel,onClick:T,active:y.editor?.isActive("link"),ref:e,classNames:E,styles:L,className:l,style:a})}),(0,r.jsx)(tF.J.Dropdown,{...y.getStyles("linkEditorDropdown",x),children:(0,r.jsxs)("div",{...y.getStyles("linkEditor",x),children:[(0,r.jsx)(tD.o,{placeholder:y.labels.linkEditorInputPlaceholder,"aria-label":y.labels.linkEditorInputLabel,type:"url",value:k,onChange:v,classNames:{input:y.getStyles("linkEditorInput",x).className},onKeyDown:t=>{"Enter"===t.key&&(t.preventDefault(),A())},rightSection:(0,r.jsx)(tJ.u,{label:b?y.labels.linkEditorExternalLink:y.labels.linkEditorInternalLink,events:{hover:!0,focus:!0,touch:!0},withinPortal:!0,withArrow:!0,disabled:f,zIndex:1e4,children:(0,r.jsx)(tn.k,{onClick:()=>w(t=>!t),"data-active":b||void 0,...y.getStyles("linkEditorExternalControl",x),children:(0,r.jsx)(G,{style:{width:(0,tr.h)(14),height:(0,tr.h)(14)}})})})}),(0,r.jsx)(t_.z,{variant:"default",onClick:A,...y.getStyles("linkEditorSave",x),children:y.labels.linkEditorSave})]})})]})});tU.classes=g,tU.displayName="@mantine/tiptap/RichTextEditorLinkControl";var tV=n(52762),tG=n(7),tQ=n(59962),tZ=n(356),tX=n(91992);let t0={},t1=(0,i.forwardRef)((t,e)=>{let{popoverProps:n,colors:s,colorPickerProps:l,...a}=(0,o.w)("RichTextEditorColorPickerControl",t0,t),{editor:h,labels:c,get
1Styles:u}=d(),[p,{toggle:f,close:m}]=(0,tq.q)(!1),[g,y]=(0,i.useState)("palette"),x=h?.getAttributes("textStyle").color||"var(--mantine-color-text)",k=(t,e=!0)=>{(h?.chain()).focus().setColor(t).run(),e&&m()},v=s.map((t,e)=>(0,r.jsx)(tV.b,{component:"button",color:t,onClick:()=>k(t),size:26,radius:"xs",style:{cursor:"pointer"},title:c.colorPickerColorLabel(t),"aria-label":c.colorPickerColorLabel(t)},e));return(0,r.jsxs)(tF.J,{opened:p,withinPortal:!0,trapFocus:!0,onClose:m,...n,children:[(0,r.jsx)(tF.J.Target,{children:(0,r.jsx)(ts,{...a,"aria-label":c.colorPickerControlLabel,title:c.colorPickerControlLabel,ref:e,onClick:f,children:(0,r.jsx)(tV.b,{color:x,size:14})})}),(0,r.jsxs)(tF.J.Dropdown,{...u("linkEditorDropdown"),children:["palette"===g&&(0,r.jsx)(tG.M,{cols:7,spacing:2,children:v}),"colorPicker"===g&&(0,r.jsx)(tQ.z,{defaultValue:x,onChange:t=>k(t,!1),...l}),(0,r.jsx)(tJ.u.Group,{closeDelay:200,children:(0,r.jsxs)(tZ.Z,{justify:"flex-end",gap:"xs",mt:"sm",children:["palette"===g&&(0,r.jsx)(tX.A,{variant:"default",onClick:m,title:c.colorPickerCancel,"aria-label":c.colorPickerCancel,children:(0,r.jsx)(Y,{style:{width:(0,tr.h)(16),height:(0,tr.h)(16)}})}),(0,r.jsx)(tX.A,{variant:"default",onClick:()=>{(h?.chain()).focus().unsetColor().run(),m()},title:c.colorPickerClear,"aria-label":c.colorPickerClear,children:(0,r.jsx)(q,{style:{width:(0,tr.h)(16),height:(0,tr.h)(16)}})}),"palette"===g?(0,r.jsx)(tX.A,{variant:"default",onClick:()=>y("colorPicker"),title:c.colorPickerColorPicker,"aria-label":c.colorPickerColorPicker,children:(0,r.jsx)(K,{style:{width:(0,tr.h)(16),height:(0,tr.h)(16)}})}):(0,r.jsx)(tX.A,{variant:"default",onClick:()=>y("palette"),"aria-label":c.colorPickerPalette,title:c.colorPickerPalette,children:(0,r.jsx)(W,{style:{width:(0,tr.h)(16),height:(0,tr.h)(16)}})}),"colorPicker"===g&&(0,r.jsx)(tX.A,{variant:"default",onClick:m,title:c.colorPickerSave,"aria-label":c.colorPickerSave,children:(0,r.jsx)(U,{style:{width:(0,tr.h)(16),height:(0,tr.h)(16)}})})]})})]})]})});t1.displayName="@mantine/tiptap/ColorPickerControl";let t2={},t4=(0,i.forwardRef)((t,e)=>{let{color:n,...i}=(0,o.w)("RichTextEditorColorControl",t2,t),{editor:s,labels:l}=d(),a=s?.getAttributes("textStyle").color||null,h=l.colorControlLabel(n);return(0,r.jsx)(ts,{...i,active:a===n,"aria-label":h,title:h,onClick:()=>(s?.chain()).focus().setColor(n).run(),ref:e,children:(0,r.jsx)(tV.b,{color:n,size:14})})}),t5={},t3=(0,s.d)((t,e)=>{let{classNames:n,className:i,style:s,styles:l,vars:h,...c}=(0,o.w)("RichTextEditorControlsGroup",t5,t),u=d();return(0,r.jsx)(a.x,{ref:e,...u.getStyles("controlsGroup",{className:i,style:s,styles:l,classNames:n}),...c})});t3.classes=g,t3.displayName="@mantine/tiptap/RichTextEditorControlsGroup";let t6={},t9=(0,s.d)((t,e)=>{let{classNames:n,className:i,style:s,styles:l,vars:h,sticky:c,stickyOffset:u,mod:p,...f}=(0,o.w)("RichTextEditorToolbar",t6,t),m=d();return(0,r.jsx)(a.x,{ref:e,mod:[{sticky:c},p],...m.getStyles("toolbar",{className:i,style:s,styles:l,classNames:n}),...f,__vars:{"--rte-sticky-offset":(0,tr.h)(u)}})});t9.classes=g,t9.displayName="@mantine/tiptap/RichTextEditorToolbar";let t7={withCodeHighlightStyles:!0,withTypographyStyles:!0},t8=(0,s.d)((t,e)=>{let n=(0,o.w)("RichTextEditor",t7,t),{classNames:s,className:d,style:u,styles:p,unstyled:f,vars:m,editor:y,withCodeHighlightStyles:x,withTypographyStyles:k,labels:v,children:b,...w}=n,M=(0,l.y)({name:"RichTextEditor",classes:g,props:n,className:d,style:u,classNames:s,styles:p,unstyled:f,vars:m}),S=(0,i.useMemo)(()=>({...h,...v}),[v]);return(0,r.jsx)(c,{value:{editor:y,getStyles:M,labels:S,withCodeHighlightStyles:x,withTypographyStyles:k,unstyled:f},children:(0,r.jsx)(a.x,{...M("root"),...w,ref:e,children:b})})});t8.classes=g,t8.displayName="@mantine/tiptap/RichTextEditor",t8.Content=x,t8.Control=ts,t8.Toolbar=t9,t8.ControlsGroup=t3,t8.Bold=ta,t8.Italic=th,t8.Strikethrough=td,t8.Underline=tc,t8.ClearFormatting=tu,t8.H1=tg,t8.H2=ty,t8.H3=tx,t8.H4=tk,t8.H5=tv,t8.H6=tb,t8.BulletList=tf,t8.OrderedList=tm,t8.Link=tU,t8.Unlink=tp,t8.Blockquote=tw,t8.AlignLeft=tM,t8.AlignRight=tS,t8.AlignCenter=tC,t8.AlignJustify=tT,t8.Superscript=tA,t8.Subscript=tj,t8.Code=tE,t8.CodeBlock=tL,t8.ColorPicker=t1,t8.Color=t4,t8.Highlight=tO,t8.Hr=tR,t8.UnsetColor=tI,t8.Undo=tN,t8.Redo=tH,t8.TaskList=tz,t8.TaskListSink=tP,t8.TaskListLift=tB},30941:function(t,e,n){n.d(e,{r:function(){return tP}});var r=n(5865);let i=(t,e)=>{for(let n in e)t[n]=e[n];return t}
1,s="numeric",o="ascii",l="alpha",a="asciinumeric",h="alphanumeric",c="domain",d="emoji",u="whitespace";function p(t,e,n){for(let r in e[s]&&(e[a]=!0,e[h]=!0),e[o]&&(e[a]=!0,e[l]=!0),e[a]&&(e[h]=!0),e[l]&&(e[h]=!0),e[h]&&(e[c]=!0),e[d]&&(e[c]=!0),e){let e=(r in n||(n[r]=[]),n[r]);0>e.indexOf(t)&&e.push(t)}}function f(t){void 0===t&&(t=null),this.j={},this.jr=[],this.jd=null,this.t=t}f.groups={},f.prototype={accepts(){return!!this.t},go(t){let e=this.j[t];if(e)return e;for(let e=0;e<this.jr.length;e++){let n=this.jr[e][0],r=this.jr[e][1];if(r&&n.test(t))return r}return this.jd},has(t,e){return void 0===e&&(e=!1),e?t in this.j:!!this.go(t)},ta(t,e,n,r){for(let i=0;i<t.length;i++)this.tt(t[i],e,n,r)},tr(t,e,n,r){let i;return r=r||f.groups,e&&e.j?i=e:(i=new f(e),n&&r&&p(e,n,r)),this.jr.push([t,i]),i},ts(t,e,n,r){let i=this,s=t.length;if(!s)return i;for(let e=0;e<s-1;e++)i=i.tt(t[e]);return i.tt(t[s-1],e,n,r)},tt(t,e,n,r){if(r=r||f.groups,e&&e.j)return this.j[t]=e,e;let s,o=this.go(t);return o?(i((s=new f).j,o.j),s.jr.push.apply(s.jr,o.jr),s.jd=o.jd,s.t=o.t):s=new f,e&&(r&&(s.t&&"string"==typeof s.t?p(e,i(function(t,e){let n={};for(let r in e)e[r].indexOf(t)>=0&&(n[r]=!0);return n}(s.t,r),n),r):n&&p(e,n,r)),s.t=e),this.j[t]=s,s}};let m=(t,e,n,r,i)=>t.ta(e,n,r,i),g=(t,e,n,r,i)=>t.tr(e,n,r,i),y=(t,e,n,r,i)=>t.ts(e,n,r,i),x=(t,e,n,r,i)=>t.tt(e,n,r,i),k="WORD",v="UWORD",b="LOCALHOST",w="UTLD",M="SCHEME",S="SLASH_SCHEME",C="OPENBRACE",T="CLOSEBRACE",j="OPENBRACKET",A="CLOSEBRACKET",E="OPENPAREN",L="CLOSEPAREN",O="OPENANGLEBRACKET",R="CLOSEANGLEBRACKET",I="FULLWIDTHLEFTPAREN",N="FULLWIDTHRIGHTPAREN",H="LEFTCORNERBRACKET",z="RIGHTCORNERBRACKET",P="LEFTWHITECORNERBRACKET",B="RIGHTWHITECORNERBRACKET",$="FULLWIDTHLESSTHAN",F="FULLWIDTHGREATERTHAN",D="AMPERSAND",J="APOSTROPHE",_="ASTERISK",q="BACKSLASH",K="BACKTICK",Y="CARET",W="COLON",U="COMMA",V="DOLLAR",G="EQUALS",Q="EXCLAMATION",Z="HYPHEN",X="PERCENT",tt="PIPE",te="PLUS",tn="POUND",tr="QUERY",ti="QUOTE",ts="SEMI",to="SLASH",tl="TILDE",ta="UNDERSCORE",th="EMOJI";var tc=Object.freeze({__proto__:null,WORD:k,UWORD:v,LOCALHOST:b,TLD:"TLD",UTLD:w,SCHEME:M,SLASH_SCHEME:S,NUM:"NUM",WS:"WS",NL:"NL",OPENBRACE:C,CLOSEBRACE:T,OPENBRACKET:j,CLOSEBRACKET:A,OPENPAREN:E,CLOSEPAREN:L,OPENANGLEBRACKET:O,CLOSEANGLEBRACKET:R,FULLWIDTHLEFTPAREN:I,FULLWIDTHRIGHTPAREN:N,LEFTCORNERBRACKET:H,RIGHTCORNERBRACKET:z,LEFTWHITECORNERBRACKET:P,RIGHTWHITECORNERBRACKET:B,FULLWIDTHLESSTHAN:$,FULLWIDTHGREATERTHAN:F,AMPERSAND:D,APOSTROPHE:J,ASTERISK:_,AT:"AT",BACKSLASH:q,BACKTICK:K,CARET:Y,COLON:W,COMMA:U,DOLLAR:V,DOT:"DOT",EQUALS:G,EXCLAMATION:Q,HYPHEN:Z,PERCENT:X,PIPE:tt,PLUS:te,POUND:tn,QUERY:tr,QUOTE:ti,SEMI:ts,SLASH:to,TILDE:tl,UNDERSCORE:ta,EMOJI:th,SYM:"SYM"});let td=/[a-z]/,tu=/\p{L}/u,tp=/\p{Emoji}/u,tf=/\d/,tm=/\s/,tg=null,ty=null;function tx(t,e,n,r,i){let s;let o=e.length;for(let n=0;n<o-1;n++){let o=e[n];t.j[o]?s=t.j[o]:((s=new f(r)).jr=i.slice(),t.j[o]=s),t=s}return(s=new f(n)).jr=i.slice(),t.j[e[o-1]]=s,s}function tk(t){let e=[],n=[],r=0;for(;r<t.length;){let i=0;for(;"0123456789".indexOf(t[r+i])>=0;)i++;if(i>0){e.push(n.join(""));for(let e=parseInt(t.substring(r,r+i),10);e>0;e--)n.pop();r+=i}else n.push(t[r]),r++}return e}let tv={defaultProtocol:"http",events:null,format:tw,formatHref:tw,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function tb(t,e){void 0===e&&(e=null);let n=i({},tv);t&&(n=i(n,t instanceof tb?t.o:t));let r=n.ignoreTags,s=[];for(let t=0;t<r.length;t++)s.push(r[t].toUpperCase());this.o=n,e&&(this.defaultRender=e),this.ignoreTags=s}function tw(t){return t}function tM(t,e){this.t="token",this.v=t,this.tk=e}function tS(t,e){class n extends tM{constructor(e,n){super(e,n),this.t=t}}for(let t in e)n.prototype[t]=e[t];return n.t=t,n}tb.prototype={o:tv,ignoreTags:[],defaultRender:t=>t,check(t){return this.get("validate",t.toString(),t)},get(t,e,n){let r=null!=e,i=this.o[t];return i&&("object"==typeof i?"function"==typeof(i=n.t in i?i[n.t]:tv[t])&&r&&(i=i(e,n)):"function"==typeof i&&r&&(i=i(e,n.t,n))),i},getObj(t,e,n){let r=this.o[t];return"function"==typeof r&&null!=e&&(r=r(e,n.t,n)),r},render(t){let e=t.render(this);return(this.get("render",null,t)||this.defaultRender)(e,t.t,t)}},tM.prototype={isLink:!1,toString(){return this.v},toHref(t){return this.toString()},toFormattedString(t){let e=this.toString(),n=t.get("truncate",e,this),r=t.get("format",e,this);return n&&r.length>n?r.substring(0,n)+"â¦":r},toFormattedHref(t){return t.get("formatHref",this.toHref(t.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(t){return void 0===t&&(t=tv.defaultProtocol),{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(t),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(t){return{type:this.t,value:this.toFormattedString(t),isLink:this.isLink,href:this.toFormattedHref(t),start:this.startIndex(),end:this.endIndex()}},validate(t){return t.get("validate",this.toString(),this)},render(t){let e=this.toHref(t.get("defaultProtocol")),n=t.get("formatHref",e,this),r=t.get("tagName",e,this),s=this.toFormattedString(t),o={},l=t.get("className",e,this),a=t.get("target",e,this),h=t.get("rel",e,this),c=t.getObj("attributes",e,this),d=t.getObj("events",e,this);return o.href=n,l&&(o.class=l),a&&(o.target=a),h&&(o.rel=h),c&&i(o,c),{tagName:r,attributes:o,content:s,eventListeners:d}}};let tC=tS("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),tT=tS("text"),tj=tS("nl"),tA=tS("url",{isLink:!0,toHref(t){return void 0===t&&(t=tv.defaultProtocol),this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){let t=this.tk;return t.length>=2&&t[0].t!==b&&t[1].t===W}}
1),tE=t=>new f(t);function tL(t,e,n){let r=n[0].s,i=n[n.length-1].e;return new t(e.slice(r,i),n)}let tO="undefined"!=typeof console&&console&&console.warn||(()=>{}),tR={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function tI(t,e){if(void 0===e&&(e=!1),tR.initialized&&tO(`linkifyjs: already initialized - will not register custom scheme "${t}" until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(t))throw Error(`linkifyjs: incorrect scheme format. 21. Must only contain digits, lowercase ASCII letters or "-" 32. Cannot start or end with "-" 43. "-" cannot repeat`);tR.customSchemes.push([t,e])}function tN(t){return tR.initialized||function(){tR.scanner=function(t){void 0===t&&(t=[]);let e={};f.groups=e;let n=new f;null==tg&&(tg=tk("aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4vianca6w0s2x0a2z0ure5ba0by2idu3namex3narepublic11d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0cast4mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dabur3d1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0ardian6cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2tura4vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9dnavy5lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2
4ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0a1b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp2w2ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5m\xf6gensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4finity6ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2")),null==ty&&(ty=tk("ελ1Ï
2бг1ел3деÑи4еÑ2каÑолик6ом3мÐ
4ºÐ´2он1Ñква6онлайн5Ñг3ÑÑÑ2Ñ2ÑайÑ3Ñб3ÑкÑ3Òаз3Õ°Õ¡Õµ3×שר××5×§××3Ø§Ø¨ÙØ¸Ø¨Ù5راÙ
ÙÙ5ÙØ§Ø±Ø¯Ù4Ø¨ØØ±ÙÙ5جزائر5Ø³Ø¹ÙØ¯ÙØ©6عÙÙØ§Ù5Ù
غرب5Ù
ارات5ÛØ±Ø§Ù5بارت2زار4ÙØªÙ3ھارت5تÙÙØ³4Ø³ÙØ¯Ø§Ù3Ø±ÙØ©5Ø´Ø¨ÙØ©4عراÙ2ب2Ù
اÙ4ÙÙØ³Ø·ÙÙ6ÙØ·Ø±3ÙØ§Ø«ÙÙÙÙ6ÙÙ
3Ù
صر2ÙÙØ³Ùا5ÙØ±ÙتاÙÙØ§7ÙØ¹4ÙÙ
راÙ5پاکستاÙ7ÚØ§Ø±Øª4à¤à¥à¤®3नà¥à¤3à¤à¤¾à¤°à¤¤0मà¥3à¥à¤¤5सà¤à¤à¤ न5বাà¦à¦²à¦¾5à¦à¦¾à¦°à¦¤2ৰত4à¨à¨¾à¨°à¨¤4àªàª¾àª°àª¤4à¬à¬¾à¬°à¬¤4à®à®¨à¯à®¤à®¿à®¯à®¾6லà®à¯à®à¯6à®à®¿à®à¯à®à®ªà¯à®ªà¯à®°à¯11à°à°¾à°°à°¤à±5à²à²¾à²°à²¤4à´à´¾à´°à´¤à´5à¶½à¶à¶à·4à¸à¸à¸¡3à¹à¸à¸¢3ລາວ3áá2ã¿ããª3ã¢ãã¾ã³4ã¯ã©ã¦ã4ã°ã¼ã°ã«4ã³ã 2ã¹ãã¢3ã»ã¼ã«3ãã¡ãã·ã§ã³6ãã¤ã³ã4ä¸ç2ä¸ä¿¡1å½1å1æç½3äºé©¬é3ä¼ä¸2ä½å±±2ä¿¡æ¯2å¥åº·2å
«å¦2å
¬å¸1ç2å°æ¹¾1ç£2åå1åº1æ 2åé0大é
åº5å¨çº¿2大æ¿2天主æ3娱ä¹2å®¶é»2广ä¸2å¾®å2æ
å2æç±ä½ 3ææº2æè2æ¿å¡1åº2æ°å å¡2é»2æ¶å°2æ¸ç±2æºæ2淡马é¡3游æ2æ¾³é2ç¹ç2ç§»å¨2ç»ç»æºæ4ç½å1åº1ç«1ç»2èé2è°·æ2è´ç©2é販2éå¢2é»è¨çç§4é£å©æµ¦3é£å2é¤å
2馿 ¼éæ3港2ë·ë·1ì»´2ì¼ì±2íêµ2")),x(n,"'",J),x(n,"{",C),x(n,"}",T),x(n,"[",j),x(n,"]",A),x(n,"(",E),x(n,")",L),x(n,"<",O),x(n,">",R),x(n,"ï¼",I),x(n,"ï¼",N),x(n,"ã",H),x(n,"ã",z),x(n,"ã",P),x(n,"ã",B),x(n,"ï¼",$),x(n,"ï¼",F),x(n,"&",D),x(n,"*",_),x(n,"@","AT"),x(n,"`",K),x(n,"^",Y),x(n,":",W),x(n,",",U),x(n,"$",V),x(n,".","DOT"),x(n,"=",G),x(n,"!",Q),x(n,"-",Z),x(n,"%",X),x(n,"|",tt),x(n,"+",te),x(n,"#",tn),x(n,"?",tr),x(n,'"',ti),x(n,"/",to),x(n,";",ts),x(n,"~",tl),x(n,"_",ta),x(n,"\\",q);let r=g(n,tf,"NUM",{[s]:!0});g(r,tf,r);let h=g(n,td,k,{[o]:!0});g(h,td,h);let m=g(n,tu,v,{[l]:!0});g(m,td),g(m,tu,m);let tv=g(n,tm,"WS",{[u]:!0});x(n,"\n","NL",{[u]:!0}),x(tv,"\n"),g(tv,tm,tv);let tb=g(n,tp,th,{[d]:!0});g(tb,tp,tb),x(tb,"ï¸",tb),g(x(tb,"â"),tp,tb);let tw=[[td,h]],tM=[[td,null],[tu,m]];for(let t=0;t<tg.length;t++)tx(n,tg[t],"TLD",k,tw);for(let t=0;t<ty.length;t++)tx(n,ty[t],w,v,tM);p("TLD",{tld:!0,ascii:!0},e),p(w,{utld:!0,alpha:!0},e),tx(n,"file",M,k,tw),tx(n,"mailto",M,k,tw),tx(n,"http",S,k,tw),tx(n,"https",S,k,tw),tx(n,"ftp",S,k,tw),tx(n,"ftps",S,k,tw),p(M,{scheme:!0,ascii:!0},e),p(S,{slashscheme:!0,ascii:!0},e),t=t.sort((t,e)=>t[0]>e[0]?1:-1);for(let e=0;e<t.length;e++){let r=t[e][0],i=t[e][1]?{scheme:!0}:{slashscheme:!0};r.indexOf("-")>=0?i[c]=!0:td.test(r)?tf.test(r)?i[a]=!0:i[o]=!0:i[s]=!0,y(n,r,r,i)}return y(n,"localhost",b,{ascii:!0}),n.jd=new f("SYM"),{start:n,tokens:i({groups:e},tc)}}(tR.customSchemes);for(let t=0;t<tR.tokenQueue.length;t++)tR.tokenQueue[t][1]({scanner:tR.scanner});tR.parser=function(t){let{groups:e}=t,n=e.domain.concat([D,_,"AT",q,K,Y,V,G,Z,"NUM",X,tt,te,tn,to,"SYM",tl,ta]),r=[J,W,U,"DOT",Q,tr,ti,ts,O,R,C,T,A,j,E,L,I,N,H,z,P,B,$,F],i=[D,J,_,q,K,Y,V,G,Z,C,T,X,tt,te,tn,tr,to,"SYM",tl,ta],s=tE(),o=x(s,tl);m(o,i,o),m(o,e.domain,o);let l=tE(),a=tE(),h=tE();m(s,e.domain,l),m(s,e.scheme,a),m(s,e.slashscheme,h),m(l,i,o),m(l,e.domain,l);let c=x(l,"AT");x(o,"AT",c),x(a,"AT",c),x(h,"AT",c);let d=x(o,"DOT");m(d,i,o),m(d,e.domain,o);let u=tE();m(c,e.domain,u),m(u,e.domain,u);let p=x(u,"DOT");m(p,e.domain,u);let f=tE(tC);m(p,e.tld,f),m(p,e.utld,f),x(c,b,f);let g=x(u,Z);m(g,e.domain,u),m(f,e.domain,u),x(f,"DOT",p),x(f,Z,g),m(x(f,W),e.numeric,tC);let y=x(l,Z),k=x(l,"DOT");m(y,e.domain,l),m(k,i,o),m(k,e.domain,l);let v=tE(tA);m(k,e.tld,v),m(k,e.utld,v),m(v,e.domain,l),m(v,i,o),x(v,"DOT",k),x(v,Z,y),x(v,"AT",c);let w=x(v,W),M=tE(tA);m(w,e.numeric,M);let S=tE(tA),th=tE();m(S,n,S),m(S,r,th),m(th,n,S),m(th,r,th),x(v,to,S),x(M,to,S);let td=x(a,W),tu=x(h,W),tp=x(tu,to),tf=x(tp,to);m(a,e.domain,l),x(a,"DOT",k),x(a,Z,y),m(h,e.domain,l),x(h,"DOT",k),x(h,Z,y),m(td,e.domain,S),x(td,to,S),m(tf,e.domain,S),m(tf,n,S),x(tf,to,S);let tm=[[C,T],[j,A],[E,L],[O,R],[I,N],[H,z],[P,B],[$,F]];for(let t=0;t<tm.length;t++){let[e,i]=tm[t],s=x(S,e);x(th,e,s),x(s,i,S);let o=tE(tA);m(s,n,o);let l=tE();m(s,r),m(o,n,o),m(o,r,l),m(l,n,o),m(l,r,l),x(o,i,S),x(l,i,S)}return x(s,b,v),x(s,"NL",tj),{start:s,tokens:tc}}(tR.scanner.tokens);for(let t=0;t<tR.pluginQueue.length;t++)tR.pluginQueue[t][1]({scanner:tR.scanner,parser:tR.parser});tR.initialized=!0}(),function(t,e,n){let r=n.length,i=0,s=[],o=[];for(;i<r;){let l=t,a=null,h=null,c=0,d=null,u=-1;for(;i<r&&!(a=l.go(n[i].t));)o.push(n[i++]);for(;i<r&&(h=a||l.go(n[i].t));)a=null,(l=h).accepts()?(u=0,d=l):u>=0&&u++,i++,c++;if(u<0)(i-=c)<r&&(o.push(n[i]),i++);else{o.length>0&&(s.push(tL(tT,e,o)),o=[]),i-=u,c-=u;let t=d.t,r=n.slice(i-c,i);s.push(tL(t,e,r))}}return o.length>0&&s.push(tL(tT,e,o)),s}(tR.parser.start,t,function(t,e){let n=function(t){let e=[],n=t.length,r=0;for(;r<n;){let i,s=t.charCodeAt(r),o=s<55296||s>56319||r+1===n||(i=t.charCodeAt(r+1))<56320||i>57343?t[r]:t.slice(r,r+2);e.push(o),r+=o.length}return e}(e.replace(/[A-Z]/g,t=>t.toLowerCase())),r=n.length,i=[],s=0,o=0;for(;o<r;){let l=t,a=null,h=0,c=null,d=-1,u=-1;for(;o<r&&(a=l.go(n[o]));)(l=a).accepts()?(d=0,u=0,c=l):d>=0&&(d+=n[o].length,u++),h+=n[o].length,s+=n[o].length,o++;s-=d,o-=u,h-=d,i.push({t:c.t,v:e.slice(s-h,s),s:s-h,e:s})}return i}(tR.scanner.start,t))}function tH(t,e,n){if(void 0===e&&(e=null),void 0===n&&(n=null),e&&"object"==typeof e){if(n)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);n=e,e=null}let r=new tb(n),i=tN(t),s=[];for(let t=0;t<i.length;t++){let n=i[t];n.isLink&&(!e||n.t===e)&&r.check(n)&&s.push(n.toFormattedObject(r))}return s}var tz=n(2376);let tP=r.vc.create({name:"link",priority:1e3,keepOnSplit:!1,onCreate(){this.options.protocols.forEac
4h(t=>{if("string"==typeof t){tI(t);return}tI(t.scheme,t.optionalSlashes)})},onDestroy(){f.groups={},tR.scanner=null,tR.parser=null,tR.tokenQueue=[],tR.pluginQueue=[],tR.customSchemes=[],tR.initialized=!1},inclusive(){return this.options.autolink},addOptions:()=>({openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:void 0}),addAttributes(){return{href:{default:null},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML:()=>[{tag:'a[href]:not([href *= "javascript:" i])'}],renderHTML({HTMLAttributes:t}){var e;return(null===(e=t.href)||void 0===e?void 0:e.startsWith("javascript:"))?["a",(0,r.P1)(this.options.HTMLAttributes,{...t,href:""}),0]:["a",(0,r.P1)(this.options.HTMLAttributes,t),0]},addCommands(){return{setLink:t=>({chain:e})=>e().setMark(this.name,t).setMeta("preventAutolink",!0).run(),toggleLink:t=>({chain:e})=>e().toggleMark(this.name,t,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run(),unsetLink:()=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[(0,r.K9)({find:t=>{let e=[];
4if(t){let n=tH(t).filter(t=>t.isLink);n.length&&n.forEach(t=>e.push({text:t.value,data:{href:t.href},index:t.start}))}return e},type:this.type,getAttributes:t=>{var e;return{href:null===(e=t.data)||void 0===e?void 0:e.href}}})]},addProseMirrorPlugins(){var t,e,n;let i=[];return this.options.autolink&&i.push((t={type:this.type,validate:this.options.validate},new tz.Sy({key:new tz.H$("autolink"),appendTransaction:(e,n,i)=>{let s=e.some(t=>t.docChanged)&&!n.doc.eq(i.doc),o=e.some(t=>t.getMeta("preventAutolink"));if(!s||o)return;let{tr:l}=i,a=(0,r.XP)(n.doc,[...e]);if((0,r.QC)(a).forEach(({newRange:e})=>{let n,s;let o=(0,r.b5)(i.doc,e,t=>t.isTextblock);if(o.length>1?(n=o[0],s=i.doc.textBetween(n.pos,n.pos+n.node.nodeSize,void 0," ")):o.length&&i.doc.textBetween(e.from,e.to," "," ").endsWith(" ")&&(n=o[0],s=i.doc.textBetween(n.pos,e.to,void 0," ")),n&&s){let e=s.split(" ").filter(t=>""!==t);if(e.length<=0)return!1;let o=e[e.length-1],a=n.pos+s.lastIndexOf(o);if(!o)return!1;let h=tN(o).map(t=>t.toObject());if(!(1===h.length?h[0].isLink:3===h.length&&!!h[1].isLink&&["()","[]"].includes(h[0].value+h[2].value)))return!1;h.filter(t=>t.isLink).map(t=>({...t,from:a+t.start+1,to:a+t.end+1})).filter(t=>!i.schema.marks.code||!i.doc.rangeHasMark(t.from,t.to,i.schema.marks.code)).filter(e=>!t.validate||t.validate(e.value)).forEach(e=>{(0,r.tI)(e.from,e.to,i.doc).some(e=>e.mark.type===t.type)||l.addMark(e.from,e.to,t.type.create({href:e.href}))})}}),l.steps.length)return l}}))),this.options.openOnClick&&i.push((e={type:this.type,whenNotEditable:"whenNotEditable"===this.options.openOnClick},new tz.Sy({key:new tz.H$("handleClickLink"),props:{handleClick:(t,n,i)=>{var s,o;if(e.whenNotEditable&&t.editable||0!==i.button)return!1;let l=i.target,a=[];for(;"DIV"!==l.nodeName;)a.push(l),l=l.parentNode;if(!a.find(t=>"A"===t.nodeName))return!1;let h=(0,r.u9)(t.state,e.type.name),c=i.target,d=null!==(s=null==c?void 0:c.href)&&void 0!==s?s:h.href,u=null!==(o=null==c?void 0:c.target)&&void 0!==o?o:h.target;return!!c&&!!d&&(window.open(d,u),!0)}}}))),this.options.linkOnPaste&&i.push((n={editor:this.editor,type:this.type},new tz.Sy({key:new tz.H$("handlePasteLink"),props:{handlePaste:(t,e,r)=>{let{state:i}=t,{selection:s}=i,{empty:o}=s;if(o)return!1;let l="";r.content.forEach(t=>{l+=t.textContent});let a=tH(l).find(t=>t.isLink&&t.value===l);return!!l&&!!a&&(n.editor.commands.setMark(n.type,{href:a.href}),!0)}}}))),i}}).extend({addKeyboardShortcuts:()=>({"Mod-k":()=>(window.dispatchEvent(new Event("edit-link")),!0)})}).configure({openOnClick:!1})},50601:function(t,e,n){n.d(e,{ZP:function(){return o}});var r=n(5865);let i=/(?:^|\s)((?:==)((?:[^~=]+))(?:==))$/,s=/(?:^|\s)((?:==)((?:[^~=]+))(?:==))/g,o=r.vc.create({name:"highlight",addOptions:()=>({multicolor:!1,HTMLAttributes:{}}),addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:t=>t.getAttribute("data-color")||t.style.backgroundColor,renderHTML:t=>t.color?{"data-color":t.color,style:`background-color: ${t.color}; color: inherit`}:{}}}:{}},parseHTML:()=>[{tag:"mark"}],renderHTML({HTMLAttributes:t}){return["mark",(0,r.P1)(this.options.HTMLAttributes,t),0]},addCommands(){return{setHighlight:t=>({commands:e})=>e.setMark(this.name,t),toggleHighlight:t=>({commands:e})=>e.toggleMark(this.name,t),unsetHighlight:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}}
4,addInputRules(){return[(0,r.Cf)({find:i,type:this.type})]},addPasteRules(){return[(0,r.K9)({find:s,type:this.type})]}})},18151:function(t,e,n){n.d(e,{Z:function(){return i}});var r=n(5865);let i=r.vc.create({name:"subscript",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"sub"},{style:"vertical-align",getAttrs:t=>"sub"===t&&null}],renderHTML({HTMLAttributes:t}){return["sub",(0,r.P1)(this.options.HTMLAttributes,t),0]},addCommands(){return{setSubscript:()=>({commands:t})=>t.setMark(this.name),toggleSubscript:()=>({commands:t})=>t.toggleMark(this.name),unsetSubscript:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-,":()=>this.editor.commands.toggleSubscript()}}})},41705:function(t,e,n){n.d(e,{Z:function(){return i}});var r=n(5865);let i=r.vc.create({name:"superscript",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"sup"},{style:"vertical-align",getAttrs:t=>"super"===t&&null}],renderHTML({HTMLAttributes:t}){return["sup",(0,r.P1)(this.options.HTMLAttributes,t),0]},addCommands(){return{setSuperscript:()=>({commands:t})=>t.setMark(this.name),toggleSuperscript:()=>({commands:t})=>t.toggleMark(this.name),unsetSuperscript:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-.":()=>this.editor.commands.toggleSuperscript()}}})},96279:function(t,e,n){n.d(e,{Z:function(){return r}});let r=n(5865).hj.create({name:"textAlign",addOptions:()=>({types:[],alignments:["left","center","right","justify"],defaultAlignment:"left"}),addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:t=>t.style.textAlign||this.options.defaultAlignment,renderHTML:t=>t.textAlign===this.options.defaultAlignment?{}:{style:`text-align: ${t.textAlign}`}}}}]},addCommands(){return{setTextAlign:t=>({commands:e})=>!!this.options.alignments.includes(t)&&this.options.types.every(n=>e.updateAttributes(n,{textAlign:t})),unsetTextAlign:()=>({commands:t})=>this.options.types.every(e=>t.resetAttributes(e,"textAlign"))}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}})},48510:function(t,e,n){n.d(e,{Z:function(){return i}});var r=n(5865);let i=r.vc.create({name:"underline",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:t=>!!t.includes("underline")&&{}}],renderHTML({HTMLAttributes:t}){return["u",(0,r.P1)(this.options.HTMLAttributes,t),0]},addCommands(){return{setUnderline:()=>({commands:t})=>t.setMark(this.name),toggleUnderline:()=>({commands:t})=>t.toggleMark(this.name),unsetUnderline:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}})},71284:function(t,e,n){n.d(e,{jE:function(){return u},kg:function(){return c}});var r=n(67294),i=n(73935),s=n(5865);let o=(...t)=>e=>{t.forEach(t=>{"function"==typeof t?t(e):t&&(t.current=e)})},l=({renderers:t})=>r.createElement(r.Fragment,null,Object.entries(t).map(([t,e])=>i.createPortal(e.reactElement,e.element,t)));class a extends r.Component{constructor(t){super(t),this.editorContentRef=r.createRef(),this.initialized=!1,this.state={renderers:{}}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){let{editor:t}=this.props;if(t&&t.options.element){if(t.contentComponent)return;let e=this.editorContentRef.current;e.append(...t.options.element.childNodes),t.setOptions({element:e}),t.contentComponent=this,t.createNodeViews(),this.initialized=!0}}maybeFlushSync(t){this.initialized?(0,i.flushSync)(t):t()}setRenderer(t,e){this.maybeFlushSync(()=>{this.setState(({renderers:n})=>({renderers:{...n,[t]:e}}))})}removeRenderer(t){this.maybeFlushSync(()=>{this.setState(({renderers:e})=>{let n={...e};return delete n[t],{renderers:n}})})}componentWillUnmount(){let{editor:t}=this.props;if(!t||(this.initialized=!1,t.isDestroyed||t.view.setProps({nodeViews:{}}),t.contentComponent=null,!t.options.element.firstChild))return;let e=document.createElement("div");e.append(...t.options.element.childNodes),t.setOptions({element:e})}render(){let{editor:t,innerRef:e,...n}=this.props;return r.createElement(r.Fragment,null,r.createElement("div",{ref:o(e,this.editorContentRef),...n}),r.createElement(l,{renderers:this.state.renderers}))}}let h=(0,r.forwardRef)((t,e)=>{let n=r.useMemo(()=>Math.floor(4294967295*Math.random()).toString(),[t.editor]);return r.createElement(a,{key:n,innerRef:e,...t})}),c=r.memo(h);class d extends s.ML{constructor(){super(...arguments),this.contentComponent=null}}let u=(t={},e=[])=>{let n=(0,r.useRef)(null),[,i]=(0,r.useState)({}),{onBeforeCreate:s,onBlur:o,onCreate:l,onDestroy:a,onFocus:h,onSelectionUpdate:c,onTransaction:u,onUpdate:p}=t,f=(0,r.useRef)(s),m=(0,r.useRef)(o),g=(0,r.useRef)(l),y=(0,r.useRef)(a),x=(0,r.useRef)(h),k=(0,r.useRef)(c),v=(0,r.useRef)(u),b=(0,r.useRef)(p);return(0,r.useEffect)(()=>{n.current&&(s&&(n.current.off("beforeCreate",f.current),n.current.on("beforeCreate",s),f.current=s),o&&(n.current.off("blur",m.current),n.current.on("blur",o),m.current=o),l&&(n.current.off("create",g.current),n.current.on("create",l),g.current=l),a&&(n.current.off("destroy",y.current),n.current.on("destroy",a),y.current=a),h&&(n.current.off("focus",x.current),n.current.on("focus",h),x.current=h),c&&(n.current.off("selectionUpdate",k.current),n.current.on("selectionUpdate",c),k.current=c),u&&(n.current.off("transaction",v.current),n.current.on("transaction",u),v.current=u),p&&(n.current.off("update",b.current),n.current.on("update",p),b.current=p))},[s,o,l,a,h,c,u,p,n.current]),(0,r.useEffect)(()=>{let e=!0,r=new d(t);return n.current=r,n.current.on("transaction",()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{e&&i({})})})}),()=>{e=!1,r.destroy()}},e),n.current};(0,r.createContext)({editor:null}).Consumer;let p=(0,r.createContext)({onDragStart:void 0}),f=()=>(0,r.useContext)(p);r.forwardRef((t,e)=>{let{onDragStart:n}=f(),i=t.as||"div";return r.createElement(i,{...t,ref:e,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...t.style}})})},54929:function(t,e,n){n.d(e,{Z:function(){return tk}});var r=n(5865);let i=/^\s*>\s$/,s=r.NB.create({name:"blockquote",addOptions:()=>({HTMLAttributes:{}}),content:"block+",group:"block",defining:!0,parseHTML:()=>[{tag:"blockquote"}],renderHTML({HTMLAttributes:t}){return["blockquote",(0,r.P1)(this.options.HTMLAttributes,t),0]},addCommands(){return{setBlockquote:()=>({commands:t})=>t.wrapIn(this.name),toggleBlockquote:()=>({commands:t})=>t.toggleWrap(this.name),unsetBlockquote:()=>({commands:t})=>t.lift(this.name)}}
4,addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[(0,r.S0)({find:i,type:this.type})]}}),o=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,l=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,a=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,h=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,c=r.vc.create({name:"bold",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"strong"},{tag:"b",getAttrs:t=>"normal"!==t.style.fontWeight&&null},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}],renderHTML({HTMLAttributes:t}){return["strong",(0,r.P1)(this.options.HTMLAttributes,t),0]},addCommands(){return{setBold:()=>({commands:t})=>t.setMark(this.name),toggleBold:()=>({commands:t})=>t.toggleMark(this.name),unsetBold:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[(0,r.Cf)({find:o,type:this.t
4ype}),(0,r.Cf)({find:a,type:this.type})]},addPasteRules(){return[(0,r.K9)({find:l,type:this.type}),(0,r.K9)({find:h,type:this.type})]}}),d=r.NB.create({name:"listItem",addOptions:()=>({HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:t}){return["li",(0,r.P1)(this.options.HTMLAttributes,t),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),u=r.vc.create({name:"textStyle",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"span",getAttrs:t=>!!t.hasAttribute("style")&&{}}],renderHTML({HTMLAttributes:t}){return["span",(0,r.P1)(this.options.HTMLAttributes,t),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:t,commands:e})=>!!Object.entries((0,r.Jo)(t,this.type)).some(([,t])=>!!t)||e.unsetMark(this.name)}}}),p=/^\s*([-+*])\s$/,f=r.NB.create({name:"bulletList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}),group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML:()=>[{tag:"ul"}],renderHTML({HTMLAttributes:t}){return["ul",(0,r.P1)(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleBulletList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(d.name,this.editor.getAttributes(u.name)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}}
4,addInputRules(){let t=(0,r.S0)({find:p,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=(0,r.S0)({find:p,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(u.name),editor:this.editor})),[t]}}),m=/(?:^|\s)(`(?!\s+`)((?:[^`]+))`(?!\s+`))$/,g=/(?:^|\s)(`(?!\s+`)((?:[^`]+))`(?!\s+`))/g,y=r.vc.create({name:"code",addOptions:()=>({HTMLAttributes:{}}),excludes:"_",code:!0,exitable:!0,parseHTML:()=>[{tag:"code"}],renderHTML({HTMLAttributes:t}){return["code",(0,r.P1)(this.options.HTMLAttributes,t),0]},addCommands(){return{setCode:()=>({commands:t})=>t.setMark(this.name),toggleCode:()=>({commands:t})=>t.toggleMark(this.name),unsetCode:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[(0,r.Cf)({find:m,type:this.type})]},addPasteRules(){return[(0,r.K9)({find:g,type:this.type})]}});var x=n(2376);let k=/^```([a-z]+)?[\s\n]$/,v=/^~~~([a-z]+)?[\s\n]$/,b=r.NB.create({name:"codeBlock",addOptions:()=>({languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,HTMLAttributes:{}}),content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:null,parseHTML:t=>{var e;let{languageClassPrefix:n}=this.options;return[...(null===(e=t.firstElementChild)||void 0===e?void 0:e.classList)||[]].filter(t=>t.startsWith(n)).map(t=>t.replace(n,""))[0]||null},rendered:!1}}},parseHTML:()=>[{tag:"pre",preserveWhitespace:"full"}],renderHTML({node:t,HTMLAttributes:e}){return["pre",(0,r.P1)(this.options.HTMLAttributes,e),["code",{class:t.attrs.language?this.options.languageClassPrefix+t.attrs.language:null},0]]},addCommands(){return{setCodeBlock:t=>({commands:e})=>e.setNode(this.name,t),toggleCodeBlock:t=>({commands:e})=>e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{let{empty:t,$anchor:e}=this.editor.state.selection,n=1===e.pos;return!!t&&e.parent.type.name===this.name&&(!!n||!e.parent.textContent.length)&&this.editor.commands.clearNodes()},Enter:({editor:t})=>{if(!this.options.exitOnTripleEnter)return!1;let{state:e}=t,{selection:n}=e,{$from:r,empty:i}=n;if(!i||r.parent.type!==this.type)return!1;let s=r.parentOffset===r.parent.nodeSize-2,o=r.parent.textContent.endsWith("\n\n");return!!s&&!!o&&t.chain().command(({tr:t})=>(t.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:t})=>{if(!this.options.exitOnArrowDown)return!1;let{state:e}=t,{selection:n,doc:r}=e,{$from:i,empty:s}=n;if(!s||i.parent.type!==this.type||i.parentOffset!==i.parent.nodeSize-2)return!1;let o=i.after();return!(void 0===o||r.nodeAt(o))&&t.commands.exitCode()}}}
4,addInputRules(){return[(0,r.zK)({find:k,type:this.type,getAttributes:t=>({language:t[1]})}),(0,r.zK)({find:v,type:this.type,getAttributes:t=>({language:t[1]})})]},addProseMirrorPlugins(){return[new x.Sy({key:new x.H$("codeBlockVSCodeHandler"),props:{handlePaste:(t,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;let n=e.clipboardData.getData("text/plain"),r=e.clipboardData.getData("vscode-editor-data"),i=r?JSON.parse(r):void 0,s=null==i?void 0:i.mode;if(!n||!s)return!1;let{tr:o}=t.state;return t.state.selection.from===t.state.doc.nodeSize-(1+2*t.state.selection.$to.depth)?o.insert(t.state.selection.from-1,this.type.create({language:s})):o.replaceSelectionWith(this.type.create({language:s})),o.setSelection(x.Bs.near(o.doc.resolve(Math.max(0,o.selection.from-2)))),o.insertText(n.replace(/\r\n?/g,"\n")),o.setMeta("paste",!0),t.dispatch(o),!0}}})]}}),w=r.NB.create({name:"doc",topNode:!0,content:"block+"});var M=n(16560);class S{constructor(t,e){var n;this.editorView=t,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=null!==(n=e.width)&&void 0!==n?n:1,this.color=!1===e.color?void 0:e.color||"black",this.class=e.class,this.handlers=["dragover","dragend","drop","dragleave"].map(e=>{let n=t=>{this[e](t)};return t.dom.addEventListener(e,n),{name:e,handler:n}})}destroy(){this.handlers.forEach(({name:t,handler:e})=>this.editorView.dom.removeEventListener(t,e))}update(t,e){null!=this.cursorPos&&e.doc!=t.state.doc&&(this.cursorPos>t.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(t){t!=this.cursorPos&&(this.cursorPos=t,null==t?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let t,e,n=this.editorView.state.doc.resolve(this.cursorPos),r=!n.parent.inlineContent,i;if(r){let t=n.nodeBefore,e=n.nodeAfter;if(t||e){let n=this.editorView.nodeDOM(this.cursorPos-(t?t.nodeSize:0));if(n){let r=n.getBoundingClientRect(),s=t?r.bottom:r.top;t&&e&&(s=(s+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),i={left:r.left,right:r.right,top:s-this.width/2,bottom:s+this.width/2}}}}if(!i){let t=this.editorView.coordsAtPos(this.cursorPos);i={left:t.left-this.width/2,right:t.left+this.width/2,top:t.top,bottom:t.bottom}}let s=this.editorView.dom.offsetParent;if(!this.element&&(this.element=s.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",r),this.element.classList.toggle("prosemirror-dropcursor-inline",!r),s&&(s!=document.body||"static"!=getComputedStyle(s).position)){let n=s.getBoundingClientRect();t=n.left-s.scrollLeft,e=n.top-s.scrollTop}else t=-pageXOffset,e=-pageYOffset;this.element.style.left=i.left-t+"px",this.element.style.top=i.top-e+"px",this.element.style.width=i.right-i.left+"px",this.element.style.height=i.bottom-i.top+"px"}scheduleRemoval(t){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),t)}dragover(t){if(!this.editorView.editable)return;let e=this.editorView.posAtCoords({left:t.clientX,top:t.clientY}),n=e&&e.inside>=0&&this.editorView.state.doc.nodeAt(e.inside),r=n&&n.type.spec.disableDropCursor,i="function"==typeof r?r(this.editorView,e,t):r;if(e&&!i){let t=e.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let e=(0,M.nj)(this.editorView.state.doc,t,this.editorView.dragging.slice);null!=e&&(t=e)}this.setCursor(t),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(t){t.target!=this.editorView.dom&&this.editorView.dom.contains(t.relatedTarget)||this.setCursor(null)}}let C=r.hj.create({name:"dropCursor",addOptions:()=>({color:"currentColor",width:1,class:void 0}),addProseMirrorPlugins(){return[function(t={}){return new x.Sy({view:e=>new S(e,t)})}(this.options)]}});var T=n(82696),j=n(12806),A=n(84348);class E extends x.Y1{constructor(t){super(t,t)}map(t,e){let n=t.resolve(e.map(this.head));return E.valid(n)?new E(n):x.Y1.near(n)}content(){return j.p2.empty}eq(t){return t instanceof E&&t.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(t,e){if("number"!=typeof e.pos)throw RangeError("Invalid input for GapCursor.fromJSON");return new E(t.resolve(e.pos))}getBookmark(){return new L(this.anchor)}static valid(t){let e=t.parent;if(e.isTextblock||!function(t){for(let e=t.depth;e>=0;e--){let n=t.index(e),r=t.node(e);if(0==n){if(r.type.spec.isolating)return!0;continue}for(let t=r.child(n-1);;t=t.lastChild){if(0==t.childCount&&!t.inlineContent||t.isAtom||t.type.spec.isolating)return!0;
4if(t.inlineContent)return!1}}return!0}(t)||!function(t){for(let e=t.depth;e>=0;e--){let n=t.indexAfter(e),r=t.node(e);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let t=r.child(n);;t=t.firstChild){if(0==t.childCount&&!t.inlineContent||t.isAtom||t.type.spec.isolating)return!0;if(t.inlineContent)return!1}}return!0}(t))return!1;let n=e.type.spec.allowGapCursor;if(null!=n)return n;let r=e.contentMatchAt(t.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(t,e,n=!1){t:for(;;){if(!n&&E.valid(t))return t;let r=t.pos,i=null;for(let n=t.depth;;n--){let s=t.node(n);if(e>0?t.indexAfter(n)<s.childCount:t.index(n)>0){i=s.child(e>0?t.indexAfter(n):t.index(n)-1);break}if(0==n)return null;r+=e;let o=t.doc.resolve(r);if(E.valid(o))return o}for(;;){let s=e>0?i.firstChild:i.lastChild;if(!s){if(i.isAtom&&!i.isText&&!x.qv.isSelectable(i)){t=t.doc.resolve(r+i.nodeSize*e),n=!1;continue t}break}i=s,r+=e;let o=t.doc.resolve(r);if(E.valid(o))return o}return null}}}E.prototype.visible=!1,E.findFrom=E.findGapCursorFrom,x.Y1.jsonID("gapcursor",E);class L{constructor(t){this.pos=t}map(t){return new L(t.map(this.pos))}resolve(t){let e=t.resolve(this.pos);return E.valid(e)?new E(e):x.Y1.near(e)}}let O=(0,T.$)({ArrowLeft:R("horiz",-1),ArrowRight:R("horiz",1),ArrowUp:R("vert",-1),ArrowDown:R("vert",1)});function R(t,e){let n="vert"==t?e>0?"down":"up":e>0?"right":"left";return function(t,r,i){let s=t.selection,o=e>0?s.$to:s.$from,l=s.empty;if(s instanceof x.Bs){if(!i.endOfTextblock(n)||0==o.depth)return!1;l=!1,o=t.doc.resolve(e>0?o.after():o.before())}let a=E.findGapCursorFrom(o,e,l);return!!a&&(r&&r(t.tr.setSelection(new E(a))),!0)}}function I(t,e,n){if(!t||!t.editable)return!1;let r=t.state.doc.resolve(e);if(!E.valid(r))return!1;let i=t.posAtCoords({left:n.clientX,top:n.clientY});return!(i&&i.inside>-1&&x.qv.isSelectable(t.state.doc.nodeAt(i.inside)))&&(t.dispatch(t.state.tr.setSelection(new E(r))),!0)}function N(t,e){if("insertCompositionText"!=e.inputType||!(t.state.selection instanceof E))return!1;let{$from:n}=t.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(t.state.schema.nodes.text);if(!r)return!1;let i=j.HY.empty;for(let t=r.length-1;t>=0;t--)i=j.HY.from(r[t].createAndFill(null,i));let s=t.state.tr.replace(n.pos,n.pos,new j.p2(i,0,0));return s.setSelection(x.Bs.near(s.doc.resolve(n.pos+1))),t.dispatch(s),!1}function H(t){if(!(t.selection instanceof E))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",A.EH.create(t.doc,[A.p.widget(t.selection.head,e,{key:"gapcursor"})])}let z=r.hj.create({name:"gapCursor",addProseMirrorPlugins:()=>[new x.Sy({props:{decorations:H,createSelectionBetween:(t,e,n)=>e.pos==n.pos&&E.valid(n)?new E(n):null,handleClick:I,handleKeyDown:O,handleDOMEvents:{beforeinput
4:N}}})],extendNodeSchema(t){var e;let n={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:null!==(e=(0,r.nU)((0,r.Nl)(t,"allowGapCursor",n)))&&void 0!==e?e:null}}}),P=r.NB.create({name:"hardBreak",addOptions:()=>({keepMarks:!0,HTMLAttributes:{}}),inline:!0,group:"inline",selectable:!1,parseHTML:()=>[{tag:"br"}],renderHTML({HTMLAttributes:t}){return["br",(0,r.P1)(this.options.HTMLAttributes,t)]},renderText:()=>"\n",addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command(()=>{let{selection:t,storedMarks:i}=n;if(t.$from.parent.type.spec.isolating)return!1;let{keepMarks:s}=this.options,{splittableMarks:o}=r.extensionManager,l=i||t.$to.parentOffset&&t.$from.marks();return e().insertContent({type:this.name}).command(({tr:t,dispatch:e})=>{if(e&&l&&s){let e=l.filter(t=>o.includes(t.type.name));t.ensureMarks(e)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),B=r.NB.create({name:"heading",addOptions:()=>({levels:[1,2,3,4,5,6],HTMLAttributes:{}}),content:"inline*",group:"block",defining:!0,addAttributes:()=>({level:{default:1,rendered:!1}}),parseHTML(){return this.options.levels.map(t=>({tag:`h${t}`,attrs:{level:t}}))},renderHTML({node:t,HTMLAttributes:e}){let n=this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0];return[`h${n}`,(0,r.P1)(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:t=>({commands:e})=>!!this.options.levels.includes(t.level)&&e.setNode(this.name,t),toggleHeading:t=>({commands:e})=>!!this.options.levels.includes(t.level)&&e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return this.options.levels.reduce((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(t=>(0,r.zK)({find:RegExp(`^(#{1,${t}}
4)\\s$`),type:this.type,getAttributes:{level:t}}))}});var $=function(){};$.prototype.append=function(t){return t.length?(t=$.from(t),!this.length&&t||t.length<200&&this.leafAppend(t)||this.length<200&&t.leafPrepend(this)||this.appendInner(t)):this},$.prototype.prepend=function(t){return t.length?$.from(t).append(this):this},$.prototype.appendInner=function(t){return new D(this,t)},$.prototype.slice=function(t,e){return(void 0===t&&(t=0),void 0===e&&(e=this.length),t>=e)?$.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,e))},$.prototype.get=function(t){if(!(t<0)&&!(t>=this.length))return this.getInner(t)},$.prototype.forEach=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=this.length),e<=n?this.forEachInner(t,e,n,0):this.forEachInvertedInner(t,e,n,0)},$.prototype.map=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=this.length);var r=[];return this.forEach(function(e,n){return r.push(t(e,n))},e,n),r},$.from=function(t){return t instanceof $?t:t&&t.length?new F(t):$.empty};var F=function(t){function e(e){t.call(this),this.values=e}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(t,n){return 0==t&&n==this.length?this:new e(this.values.slice(t,n))},e.prototype.getInner=function(t){return this.values[t]},e.prototype.forEachInner=function(t,e,n,r){for(var i=e;i<n;i++)if(!1===t(this.values[i],r+i))return!1},e.prototype.forEachInvertedInner=function(t,e,n,r){for(var i=e-1;i>=n;i--)if(!1===t(this.values[i],r+i))return!1},e.prototype.leafAppend=function(t){if(this.length+t.length<=200)return new e(this.values.concat(t.flatten()))},e.prototype.leafPrepend=function(t){if(this.length+t.length<=200)return new e(t.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}($);$.empty=new F([]);var D=function(t){function e(e,n){t.call(this),this.left=e,this.right=n,this.length=e.length+n.length,this.depth=Math.max(e.depth,n.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(t){return t<this.left.length?this.left.get(t):this.right.get(t-this.left.length)},e.prototype.forEachInner=function(t,e,n,r){var i=this.left.length;if(e<i&&!1===this.left.forEachInner(t,e,Math.min(n,i),r)||n>i&&!1===this.right.forEachInner(t,Math.max(e-i,0),Math.min(this.length,n)-i,r+i))return!1},e.prototype.forEachInvertedInner=function(t,e,n,r){var i=this.left.length;if(e>i&&!1===this.right.forEachInvertedInner(t,e-i,Math.max(n,i)-i,r+i)||n<i&&!1===this.left.forEachInvertedInner(t,Math.min(e,i),n,r))return!1},e.prototype.sliceInner=function(t,e){if(0==t&&e==this.length)return this;var n=this.left.length;return e<=n?this.left.slice(t,e):t>=n?this.right.slice(t-n,e-n):this.left.slice(t,n).append(this.right.slice(0,e-n))},e.prototype.leafAppend=function(t){var n=this.right.leafAppend(t);if(n)return new e(this.left,n)},e.prototype.leafPrepend=function(t){var n=this.left.leafPrepend(t);if(n)return new e(n,this.right)},e.prototype.appendInner=function(t){return this.left.depth>=Math.max(this.right.depth,t.depth)+1?new e(this.left,new e(this.right,t)):new e(this,t)},e}($);class J{constructor(t,e){this.items=t,this.eventCount=e}popEvent(t,e){let n,r,i,s;if(0==this.eventCount)return null;let o=this.items.length;for(;;o--)if(this.items.get(o-1).selection){--o;break}e&&(r=(n=this.remapping(o,this.items.length)).maps.length);let l=t.tr,a=[],h=[];return this.items.forEach((t,e)=>{if(!t.step){n||(r=(n=this.remapping(o,e+1)).maps.length),r--,h.push(t);return}if(n){h.push(new _(t.map));let e=t.step.map(n.slice(r)),i;e&&l.maybeStep(e).doc&&(i=l.mapping.maps[l.mapping.maps.length-1],a.push(new _(i,void 0,void 0,a.length+h.length))),r--,i&&n.appendMap(i,r)}else l.maybeStep(t.step);if(t.selection)return i=n?t.selection.map(n.slice(r)):t.selection,s=new J(this.items.slice(0,o).append(h.reverse().concat(a)),this.eventCount-1),!1},this.items.length,0),{remaining:s,transform:l,selection:i}}addTransform(t,e,n,r){var i,s;let o,l=[],a=this.eventCount,h=this.items,c=!r&&h.length?h.get(h.length-1):null;for(let n=0;n<t.steps.length;n++){let i=t.steps[n].invert(t.docs[n]),s=new _(t.mapping.maps[n],i,e),o;(o=c&&c.merge(s))&&(s=o,n?l.pop():h=h.slice(0,h.length-1)),l.push(s),e&&(a++,e=void 0),r||(c=s)}let d=a-n.depth;return d>
4K&&(i=h,s=d,i.forEach((t,e)=>{if(t.selection&&0==s--)return o=e,!1}),h=i.slice(o),a-=d),new J(h.append(l),a)}remapping(t,e){let n=new M.vs;return this.items.forEach((e,r)=>{let i=null!=e.mirrorOffset&&r-e.mirrorOffset>=t?n.maps.length-e.mirrorOffset:void 0;n.appendMap(e.map,i)},t,e),n}addMaps(t){return 0==this.eventCount?this:new J(this.items.append(t.map(t=>new _(t))),this.eventCount)}rebased(t,e){if(!this.eventCount)return this;let n=[],r=Math.max(0,this.items.length-e),i=t.mapping,s=t.steps.length,o=this.eventCount;this.items.forEach(t=>{t.selection&&o--},r);let l=e;this.items.forEach(e=>{let r=i.getMirror(--l);if(null==r)return;s=Math.min(s,r);let a=i.maps[r];if(e.step){let s=t.steps[r].invert(t.docs[r]),h=e.selection&&e.selection.map(i.slice(l+1,r));h&&o++,n.push(new _(a,s,h))}else n.push(new _(a))},r);let a=[];for(let t=e;t<s;t++)a.push(new _(i.maps[t]));let h=new J(this.items.slice(0,r).append(a).append(n),o);return h.emptyItemCount()>500&&(h=h.compress(this.items.length-n.length)),h}emptyItemCount(){let t=0;return this.items.forEach(e=>{!e.step&&t++}),t}compress(t=this.items.length){let e=this.remapping(0,t),n=e.maps.length,r=[],i=0;return this.items.forEach((s,o)=>{if(o>=t)r.push(s),s.selection&&i++;else if(s.step){let t=s.step.map(e.slice(n)),o=t&&t.getMap();if(n--,o&&e.appendMap(o,n),t){let l=s.selection&&s.selection.map(e.slice(n));l&&i++;let a=new _(o.invert(),t,l),h,c=r.length-1;(h=r.length&&r[c].merge(a))?r[c]=h:r.push(a)}}else s.map&&n--},this.items.length,0),new J($.from(r.reverse()),i)}}J.empty=new J($.empty,0);class _{constructor(t,e,n,r){this.map=t,this.step=e,this.selection=n,this.mirrorOffset=r}merge(t){if(this.step&&t.step&&!t.selection){let e=t.step.merge(this.step);if(e)return new _(e.getMap().invert(),e,this.selection)}}}class q{constructor(t,e,n,r,i){this.done=t,this.undone=e,this.prevRanges=n,this.prevTime=r,this.prevComposition=i}}let K=20;function Y(t){let e=[];return t.forEach((t,n,r,i)=>e.push(r,i)),e}function W(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let i=e.map(t[r],1),s=e.map(t[r+1],-1);i<=s&&n.push(i,s)}return n}function U(t,e,n,r){let i=Q(e),s=Z.get(e).spec.config,o=(r?t.undone:t.done).popEvent(e,i);if(!o)return;let l=o.selection.resolve(o.transform.doc),a=(r?t.done:t.undone).addTransform(o.transform,e.selection.getBookmark(),s,i),h=new q(r?a:o.remaining,r?o.remaining:a,null,0,-1);n(o.transform.setSelection(l).setMeta(Z,{redo:r,historyState:h}).scrollIntoView())}let V=!1,G=null;function Q(t){let e=t.plugins;if(G!=e){V=!1,G=e;for(let t=0;t<e.length;t++)if(e[t].spec.historyPreserveItems){V=!0;break}}return V}let Z=new x.H$("history"),X=new x.H$("closeHistory"),tt=(t,e)=>{let n=Z.getState(t);return!!n&&0!=n.done.eventCount&&(e&&U(n,t,e,!1),!0)},te=(t,e)=>{let n=Z.getState(t);return!!n&&0!=n.undone.eventCount&&(e&&U(n,t,e,!0),!0)},tn=r.hj.create({name:"history",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>({state:t,dispatch:e})=>tt(t,e),redo:()=>({state:t,dispatch:e})=>te(t,e)}),addProseMirrorPlugins(){return[function(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new x.Sy({key:Z,state:{init:()=>new q(J.empty,J.empty,null,0,-1),apply:(e,n,r)=>(function(t,e,n,r){let i=n.getMeta(Z),s;if(i)return i.historyState;n.getMeta(X)&&(t=new q(t.done,t.undone,null,0,-1));let o=n.getMeta("appendedTransaction");if(0==n.steps.length)return t;if(o&&o.getMeta(Z))return o.getMeta(Z).redo?new q(t.done.addTransform(n,void 0,r,Q(e)),t.undone,Y(n.mapping.maps[n.steps.length-1]),t.prevTime,t.prevComposition):new q(t.done,t.undone.addTransform(n,void 0,r,Q(e)),null,t.prevTime,t.prevComposition);if(!1===n.getMeta("addToHistory")||o&&!1===o.getMeta("addToHistory"))return(s=n.getMeta("rebased"))?new q(t.done.rebased(n,s),t.undone.rebased(n,s),W(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new q(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),W(t.prevRanges,n.mapping),t.prevTime,t.prevComposition);{let i=n.getMeta("composition"),s=0==t.prevTime||!o&&t.prevComposition!=i&&(t.prevTime<(n.time||0)-r.newGroupDelay||!function(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;
4return t.mapping.maps[0].forEach((t,r)=>{for(let i=0;i<e.length;i+=2)t<=e[i+1]&&r>=e[i]&&(n=!0)}),n}(n,t.prevRanges)),l=o?W(t.prevRanges,n.mapping):Y(n.mapping.maps[n.steps.length-1]);return new q(t.done.addTransform(n,s?e.selection.getBookmark():void 0,r,Q(e)),J.empty,l,n.time,null==i?t.prevComposition:i)}})(n,r,e,t)},config:t,props:{handleDOMEvents:{beforeinput(t,e){let n=e.inputType,r="historyUndo"==n?tt:"historyRedo"==n?te:null;return!!r&&(e.preventDefault(),r(t.state,t.dispatch))}}}})}(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-Ñ":()=>this.editor.commands.undo(),"Shift-Mod-Ñ":()=>this.editor.commands.redo()}}}),tr=r.NB.create({name:"horizontalRule",addOptions:()=>({HTMLAttributes:{}}),group:"block",parseHTML:()=>[{tag:"hr"}],renderHTML({HTMLAttributes:t}){return["hr",(0,r.P1)(this.options.HTMLAttributes,t)]},addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{let{$to:n}=e.selection,r=t();return 0===n.parentOffset?r.insertContentAt(Math.max(n.pos-2,0),{type:this.name}):r.insertContent({type:this.name}),r.command(({tr:t,dispatch:e})=>{var n;if(e){let{$to:e}=t.selection,r=e.end();if(e.nodeAfter)e.nodeAfter.isTextblock?t.setSelection(x.Bs.create(t.doc,e.pos+1)):e.nodeAfter.isBlock?t.setSelection(x.qv.create(t.doc,e.pos)):t.setSelection(x.Bs.create(t.doc,e.pos));else{let i=null===(n=e.parent.type.contentMatch.defaultType)||void 0===n?void 0:n.create();i&&(t.insert(r,i),t.setSelection(x.Bs.create(t.doc,r+1)))}t.scrollIntoView()}return!0}).run()}}},addInputRules(){return[(0,r.x2)({find:/^(?:---|â-|___\s|\*\*\*\s)$/,type:this.t
4ype})]}}),ti=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,ts=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,to=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,tl=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,ta=r.vc.create({name:"italic",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"em"},{tag:"i",getAttrs:t=>"normal"!==t.style.fontStyle&&null},{style:"font-style=italic"}],renderHTML({HTMLAttributes:t}){return["em",(0,r.P1)(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({commands:t})=>t.toggleMark(this.name),unsetItalic:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[(0,r.Cf)({find:ti,type:this.type}),(0,r.Cf)({find:to,type:this.type})]},addPasteRules(){return[(0,r.K9)({find:ts,type:this.type}),(0,r.K9)({find:tl,type:this.type})]}}),th=r.NB.create({name:"listItem",addOptions:()=>({HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:t}){return["li",(0,r.P1)(this.options.HTMLAttributes,t),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),tc=r.NB.create({name:"listItem",addOptions:()=>({HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:t}){return["li",(0,r.P1)(this.options.HTMLAttributes,t),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),td=r.vc.create({name:"textStyle",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"span",getAttrs:t=>!!t.hasAttribute("style")&&{}}],renderHTML({HTMLAttributes:t}){return["span",(0,r.P1)(this.options.HTMLAttributes,t),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:t,commands:e})=>!!Object.entries((0,r.Jo)(t,this.type)).some(([,t])=>!!t)||e.unsetMark(this.name)}}}),tu=/^(\d+)\.\s$/,tp=r.NB.create({name:"orderedList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}),group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes:()=>({start:{default:1,parseHTML:t=>t.hasAttribute("start")?parseInt(t.getAttribute("start")||"",10):1}}),parseHTML:()=>[{tag:"ol"}],renderHTML({HTMLAttributes:t}){let{start:e,...n}=t;return 1===e?["ol",(0,r.P1)(this.options.HTMLAttributes,n),0]:["ol",(0,r.P1)(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(tc.name,this.editor.getAttributes(td.name)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let t=(0,r.S0)({find:tu,type:this.type,getAttributes:t=>({start:+t[1]}),joinPredicate:(t,e)=>e.childCount+e.attrs.start===+t[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(t=(0,r.S0)({find:tu,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:t=>({start:+t[1],...this.editor.getAttributes(td.name)}),joinPredicate:(t,e)=>e.childCount+e.attrs.start===+t[1],editor:this.editor})),[t]}}),tf=r.NB.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:t}){return["p",(0,r.P1)(this.options.HTMLAttributes,t),0]},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),tm=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,tg=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,ty=r.vc.create({name:"strike",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:t=>!!t.includes("line-through")&&{}}],renderHTML({HTMLAttributes:t}){return["s",(0,r.P1)(this.options.HTMLAttributes,t),0]},addCommands(){return{setStrike:()=>({commands:t})=>t.setMark(this.name),toggleStrike:()=>({commands:t})=>t.toggleMark(this.name),unsetStrike:()=>({commands:t})=>t.unsetMark(this.name)}}
4,addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[(0,r.Cf)({find:tm,type:this.type})]},addPasteRules(){return[(0,r.K9)({find:tg,type:this.type})]}}),tx=r.NB.create({name:"text",group:"inline"}),tk=r.hj.create({name:"starterKit",addExtensions(){var t,e,n,r,i,o,l,a,h,d,u,p,m,g,x,k,v,M;let S=[];return!1!==this.options.blockquote&&S.push(s.configure(null===(t=this.options)||void 0===t?void 0:t.blockquote)),!1!==this.options.bold&&S.push(c.configure(null===(e=this.options)||void 0===e?void 0:e.bold)),!1!==this.options.bulletList&&S.push(f.configure(null===(n=this.options)||void 0===n?void 0:n.bulletList)),!1!==this.options.code&&S.push(y.configure(null===(r=this.options)||void 0===r?void 0:r.code)),!1!==this.options.codeBlock&&S.push(b.configure(null===(i=this.options)||void 0===i?void 0:i.codeBlock)),!1!==this.options.document&&S.push(w.configure(null===(o=this.options)||void 0===o?void 0:o.document)),!1!==this.options.dropcursor&&S.push(C.configure(null===(l=this.options)||void 0===l?void 0:l.dropcursor)),!1!==this.options.gapcursor&&S.push(z.configure(null===(a=this.options)||void 0===a?void 0:a.gapcursor)),!1!==this.options.hardBreak&&S.push(P.configure(null===(h=this.options)||void 0===h?void 0:h.hardBreak)),!1!==this.options.heading&&S.push(B.configure(null===(d=this.options)||void 0===d?void 0:d.heading)),!1!==this.options.history&&S.push(tn.configure(null===(u=this.options)||void 0===u?void 0:u.history)),!1!==this.options.horizontalRule&&S.push(tr.configure(null===(p=this.options)||void 0===p?void 0:p.horizontalRule)),!1!==this.options.italic&&S.push(ta.configure(null===(m=this.options)||void 0===m?void 0:m.italic)),!1!==this.options.listItem&&S.push(th.configure(null===(g=this.options)||void 0===g?void 0:g.listItem)),!1!==this.options.orderedList&&S.push(tp.configure(null===(x=this.options)||void 0===x?void 0:x.orderedList)),!1!==this.options.paragraph&&S.push(tf.configure(null===(k=this.options)||void 0===k?void 0:k.paragraph)),!1!==this.options.strike&&S.push(ty.configure(null===(v=this.options)||void 0===v?void 0:v.strike)),!1!==this.options.text&&S.push(tx.configure(null===(M=this.options)||void 0===M?void 0:M.text)),S}})},25804:function(t,e,n){n.d(e,{Ig:function(){return v},MI:function(){return k},N0:function(){return j},NE:function(){return o},QK:function(){return w},U9:function(){return L},X0:function(){return T},Y_:function(){return g},_M:function(){return p},al:function(){return a},cR:function(){return c},mD:function(){return C},nw:function(){return O},o:function(){return y},rr:function(){return h},uJ:function(){return I},uo:function(){return S},xb:function(){return b},ym:function(){return R}});var r=n(16560),i=n(12806),s=n(2376);let o=(t,e)=>!t.selection.empty&&(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function l(t,e){let{$cursor:n}=t.selection;return n&&(e?e.endOfTextblock("backward",t):!(n.parentOffset>0))?n:null}let a=(t,e,n)=>{let o=l(t,n);if(!o)return!1;let a=f(o);if(!a){let n=o.blockRange(),i=n&&(0,r.k9)(n);return null!=i&&(e&&e(t.tr.lift(n,i).scrollIntoView()),!0)}let h=a.nodeBefore;if(!h.type.spec.isolating&&A(t,a,e))return!0;if(0==o.parent.content.size&&(u(h,"end")||s.qv.isSelectable(h))){let n=(0,r.dR)(t.doc,o.before(),o.after(),i.p2.empty);if(n&&n.slice.size<n.to-n.from){if(e){let r=t.tr.step(n);r.setSelection(u(h,"end")?s.Y1.findFrom(r.doc.resolve(r.mapping.map(a.pos,-1)),-1):s.qv.create(r.doc,a.pos-h.nodeSize)),e(r.scrollIntoView())}return!0}}return!!h.isAtom&&a.depth==o.depth-1&&(e&&e(t.tr.delete(a.pos-h.nodeSize,a.pos).scrollIntoView()),!0)},h=(t,e,n)=>{let r=l(t,n);if(!r)return!1;let i=f(r);return!!i&&d(t,i,e)},c=(t,e,n)=>{let r=m(t,n);if(!r)return!1;let i=x(r);return!!i&&d(t,i,e)};function d(t,e,n){let o=e.nodeBefore,l=e.pos-1;for(;!o.isTextblock;l--){if(o.type.spec.isolating)return!1;let t=o.lastChild;if(!t)return!1;o=t}let a=e.nodeAfter,h=e.pos+1;for(;!a.isTextblock;h++){if(a.type.spec.isolating)return!1;let t=a.firstChild;if(!t)return!1;a=t}let c=(0,r.dR)(t.doc,l,h,i.p2.empty);if(!c||c.from!=l||c instanceof r.Pu&&c.slice.size>=h-l)return!1;if(n){let e=t.tr.step(c);e.setSelection(s.Bs.create(e.doc,l)),n(e.scrollIntoView())}return!0}function u(t,e,n=!1){for(let r=t;r;r="start"==e?r.firstChild:r.lastChild){if(r.isTextblock)return!0;
4if(n&&1!=r.childCount)break}return!1}let p=(t,e,n)=>{let{$head:r,empty:i}=t.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):r.parentOffset>0)return!1;o=f(r)}let l=o&&o.nodeBefore;return!!(l&&s.qv.isSelectable(l))&&(e&&e(t.tr.setSelection(s.qv.create(t.doc,o.pos-l.nodeSize)).scrollIntoView()),!0)};function f(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function m(t,e){let{$cursor:n}=t.selection;return n&&(e?e.endOfTextblock("forward",t):!(n.parentOffset<n.parent.content.size))?n:null}let g=(t,e,n)=>{let o=m(t,n);if(!o)return!1;let l=x(o);if(!l)return!1;let a=l.nodeAfter;if(A(t,l,e))return!0;if(0==o.parent.content.size&&(u(a,"start")||s.qv.isSelectable(a))){let n=(0,r.dR)(t.doc,o.before(),o.after(),i.p2.empty);if(n&&n.slice.size<n.to-n.from){if(e){let r=t.tr.step(n);r.setSelection(u(a,"start")?s.Y1.findFrom(r.doc.resolve(r.mapping.map(l.pos)),1):s.qv.create(r.doc,r.mapping.map(l.pos))),e(r.scrollIntoView())}return!0}}return!!a.isAtom&&l.depth==o.depth-1&&(e&&e(t.tr.delete(l.pos,l.pos+a.nodeSize).scrollIntoView()),!0)},y=(t,e,n)=>{let{$head:r,empty:i}=t.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):r.parentOffset<r.parent.content.size)return!1;o=x(r)}let l=o&&o.nodeAfter;return!!(l&&s.qv.isSelectable(l))&&(e&&e(t.tr.setSelection(s.qv.create(t.doc,o.pos)).scrollIntoView()),!0)};function x(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){let n=t.node(e);if(t.index(e)+1<n.childCount)return t.doc.resolve(t.after(e+1));if(n.type.spec.isolating)break}return null}let k=(t,e)=>{let n=t.selection,i=n instanceof s.qv,o;if(i){if(n.node.isTextblock||!(0,r.Mn)(t.doc,n.from))return!1;o=n.from}else if(null==(o=(0,r.GJ)(t.doc,n.from,-1)))return!1;if(e){let n=t.tr.join(o);i&&n.setSelection(s.qv.create(n.doc,o-t.doc.resolve(o).nodeBefore.nodeSize)),e(n.scrollIntoView())}return!0},v=(t,e)=>{let n=t.selection,i;if(n instanceof s.qv){if(n.node.isTextblock||!(0,r.Mn)(t.doc,n.to))return!1;i=n.to}else if(null==(i=(0,r.GJ)(t.doc,n.to,1)))return!1;return e&&e(t.tr.join(i).scrollIntoView()),!0},b=(t,e)=>{let{$from:n,$to:i}=t.selection,s=n.blockRange(i),o=s&&(0,r.k9)(s);return null!=o&&(e&&e(t.tr.lift(s,o).scrollIntoView()),!0)},w=(t,e)=>{let{$head:n,$anchor:r}=t.selection;return!!(n.parent.type.spec.code&&n.sameParent(r))&&(e&&e(t.tr.insertText("\n").scrollIntoView()),!0)};function M(t){for(let e=0;e<t.edgeCount;e++){let{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}let S=(t,e)=>{let{$head:n,$anchor:r}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),o=n.indexAfter(-1),l=M(i.contentMatchAt(o));if(!l||!i.canReplaceWith(o,o,l))return!1;if(e){let r=n.after(),i=t.tr.replaceWith(r,r,l.createAndFill());i.setSelection(s.Y1.near(i.doc.resolve(r),1)),e(i.scrollIntoView())}return!0},C=(t,e)=>{let n=t.selection,{$from:r,$to:i}=n;if(n instanceof s.C1||r.parent.inlineContent||i.parent.inlineContent)return!1;let o=M(i.parent.contentMatchAt(i.indexAfter()));if(!o||!o.isTextblock)return!1;if(e){let n=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,l=t.tr.insert(n,o.createAndFill());l.setSelection(s.Bs.create(l.doc,n+1)),e(l.scrollIntoView())}return!0},T=(t,e)=>{let{$cursor:n}=t.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let i=n.before();if((0,r.Ax)(t.doc,i))return e&&e(t.tr.split(i).scrollIntoView()),!0}let i=n.blockRange(),s=i&&(0,r.k9)(i);return null!=s&&(e&&e(t.tr.lift(i,s).scrollIntoView()),!0)},j=(t,e)=>{let{$from:n,to:r}=t.selection,i,o=n.sharedDepth(r);return 0!=o&&(i=n.before(o),e&&e(t.tr.setSelection(s.qv.create(t.doc,i))),!0)};function A(t,e,n){let o,l,a,h=e.nodeBefore,c=e.nodeAfter,d,p;if(h.type.spec.isolating||c.type.spec.isolating)return!1;if(o=e.nodeBefore,l=e.nodeAfter,a=e.index(),o&&l&&o.type.compatibleContent(l.type)&&(!o.content.size&&e.parent.canReplace(a-1,a)?(n&&n(t.tr.delete(e.pos-o.nodeSize,e.pos).scrollIntoView()),!0):!!(e.parent.canReplace(a,a+1)&&(l.isTextblock||(0,r.Mn)(t.doc,e.pos)))&&(n&&n(t.tr.clearIncompatible(e.pos,o.type,o.contentMatchAt(o.childCount)).join(e.pos).scrollIntoView()),!0)))return!0;let f=e.parent.canReplace(e.index(),e.index()+1);if(f&&(d=(p=h.contentMatchAt(h.childCount)).findWrapping(c.type))&&p.matchType(d[0]||c.type).validEnd){if(n){let s=e.pos+c.nodeSize,o=i.HY.empty;for(let t=d.length-1;t>=0;t--)o=i.HY.from(d[t].create(null,o));o=i.HY.from(h.copy(o));let l=t.tr.step(new r.FC(e.pos-1,s,e.pos,s,new i.p2(o,1,0),d.length,!0)),a=s+2*d.length;(0,r.Mn)(l.doc,a)&&l.join(a),n(l.scrollIntoView())}return!0}let m=s.Y1.findFrom(e,1),g=m&&m.$from.blockRange(m.$to),y=g&&(0,r.k9)(g);if(null!=y&&y>=e.depth)return n&&n(t.tr.lift(g,y).scrollIntoView()),!0;if(f&&u(c,"start",!0)&&u(h,"end")){let s=h,o=[];for(;o.push(s),!s.isTextblock;)s=s.lastChild;let l=c,a=1;for(;!l.isTextblock;l=l.firstChild)a++;if(s.canReplace(s.childCount,s.childCount,l.content)){if(n){let s=i.HY.empty;for(let t=o.length-1;t>=0;t--)s=i.HY.from(o[t].copy(s));n(t.tr.step(new r.FC(e.pos-o.length,e.pos+c.nodeSize,e.pos+a,e.pos+c.nodeSize-a,new i.p2(s,o.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function E(t){return function(e,n){let r=e.selection,i=t<0?r.$from:r.$to,o=i.depth;for(;i.node(o).isInline;){if(!o)return!1;o--}return!!i.node(o).isTextblock&&(n&&n(e.tr.setSelection(s.Bs.create(e.doc,t<0?i.start(o):i.end(o)))),!0)}}let L=E(-1),O=E(1);function R(t,e=null){return function(n,i){let{$from:s,$to:o}=n.selection,l=s.blockRange(o),a=l&&(0,r.nd)(l,t,e);return!!a&&(i&&i(n.tr.wrap(l,a).scrollIntoView()),!0)}}function I(t,e=null){return function(n,r){let i=!1;for(let r=0;r<n.selection.ranges.length&&!i;r++){let{$from:{pos:s},$to:{pos:o}}=n.selection.ranges[r];n.doc.nodesBetween(s,o,(r,s)=>{if(i)return!1;
4if(!(!r.isTextblock||r.hasMarkup(t,e))){if(r.type==t)i=!0;else{let e=n.doc.resolve(s),r=e.index();i=e.parent.canReplaceWith(r,r+1,t)}}})}if(!i)return!1;if(r){let i=n.tr;for(let r=0;r<n.selection.ranges.length;r++){let{$from:{pos:s},$to:{pos:o}}=n.selection.ranges[r];i.setBlockType(s,o,t,e)}r(i.scrollIntoView())}return!0}}function N(...t){return function(e,n,r){for(let i=0;i<t.length;i++)if(t[i](e,n,r))return!0;return!1}}let H=N(o,a,p),z=N(o,g,y),P={Enter:N(w,C,T,(t,e)=>{let{$from:n,$to:i}=t.selection;if(t.selection instanceof s.qv&&t.selection.node.isBlock)return!!(n.parentOffset&&(0,r.Ax)(t.doc,n.pos))&&(e&&e(t.tr.split(n.pos).scrollIntoView()),!0);if(!n.parent.isBlock)return!1;if(e){let o=i.parentOffset==i.parent.content.size,l=t.tr;(t.selection instanceof s.Bs||t.selection instanceof s.C1)&&l.deleteSelection();let a=0==n.depth?null:M(n.node(-1).contentMatchAt(n.indexAfter(-1))),h,c=h?[h]:o&&a?[{type:a}]:void 0,d=(0,r.Ax)(l.doc,l.mapping.map(n.pos),1,c);if(!c&&!d&&(0,r.Ax)(l.doc,l.mapping.map(n.pos),1,a?[{type:a}]:void 0)&&(a&&(c=[{type:a}]),d=!0),d&&(l.split(l.mapping.map(n.pos),1,c),!o&&!n.parentOffset&&n.parent.type!=a)){let t=l.mapping.map(n.before()),e=l.doc.resolve(t);a&&n.node(-1).canReplaceWith(e.index(),e.index()+1,a)&&l.setNodeMarkup(l.mapping.map(n.before()),a)}e(l.scrollIntoView())}return!0}),"Mod-Enter":S,Backspace:H,"Mod-Backspace":H,"Shift-Backspace":H,Delete:z,"Mod-Delete":z,"Mod-a":(t,e)=>(e&&e(t.tr.setSelection(new s.C1(t.doc))),!0)},B={"Ctrl-h":P.Backspace,"Alt-Backspace":P["Mod-Backspace"],"Ctrl-d":P.Delete,"Ctrl-Alt-Backspace":P["Mod-Delete"],"Alt-Delete":P["Mod-Delete"],"Alt-d":P["Mod-Delete"],"Ctrl-a":L,"Ctrl-e":O};for(let t in P)B[t]=P[t];"undefined"!=typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):"undefined"!=typeof os&&os.platform&&os.platform()},82696:function(t,e,n){n.d(e,{$:function(){return p},h:function(){return u}});for(var r={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},i={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},s="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),o="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),l=0;l<10;l++)r[48+l]=r[96+l]=String(l);for(var l=1;l<=24;l++)r[l+111]="F"+l;for(var l=65;l<=90;l++)r[l]=String.fromCharCode(l+32),i[l]=String.fromCharCode(l);for(var a in r)i.hasOwnProperty(a)||(i[a]=r[a]);var h=n(2376);let c="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function d(t,e,n=!0){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n&&e.shiftKey&&(t="Shift-"+t),t}function u(t){return new h.Sy({props:{handleKeyDown:p(t)}})}function p(t){let e=function(t){let e=Object.create(null);for(let n in t)e[function(t){let e,n,r,i,s=t.split(/-(?!$)/),o=s[s.length-1];"Space"==o&&(o=" ");for(let t=0;t<s.length-1;t++){let o=s[t];if(/^(cmd|meta|m)$/i.test(o))i=!0;else if(/^a(lt)?$/i.test(o))e=!0;else if(/^(c|ctrl|control)$/i.test(o))n=!0;else if(/^s(hift)?$/i.test(o))r=!0;else if(/^mod$/i.test(o))c?i=!0:n=!0;else throw Error("Unrecognized modifier name: "+o)}return e&&(o="Alt-"+o),n&&(o="Ctrl-"+o),i&&(o="Meta-"+o),r&&(o="Shift-"+o),o}(n)]=t[n];return e}(t);return function(t,n){var l;let a=("Esc"==(l=!(s&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||o&&n.shiftKey&&n.key&&1==n.key.length||"Unidentified"==n.key)&&n.key||(n.shiftKey?i:r)[n.keyCode]||n.key||"Unidentified")&&(l="Escape"),"Del"==l&&(l="Delete"),"Left"==l&&(l="ArrowLeft"),"Up"==l&&(l="ArrowUp"),"Right"==l&&(l="ArrowRight"),"Down"==l&&(l="ArrowDown"),l),h,c=e[d(a,n)];if(c&&c(t.state,t.dispatch,t))return!0;
vendor: 4,710 bytes, line 4
4if(1==a.length&&" "!=a){if(n.shiftKey){let r=e[d(a,n,!1)];if(r&&r(t.state,t.dispatch,t))return!0}if((n.shiftKey||n.altKey||n.metaKey||a.charCodeAt(0)>127)&&(h=r[n.keyCode])&&h!=a){let r=e[d(h,n)];if(r&&r(t.state,t.dispatch,t))return!0}}return!1}}},12806:function(t,e,n){function r(t){this.content=t}n.d(e,{aw:function(){return $},PW:function(){return W},HY:function(){return i},vc:function(){return a},ZU:function(){return z},NB:function(){return M},Ts:function(){return b},e4:function(){return h},V_:function(){return P},p2:function(){return c}}),r.prototype={constructor:r,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return -1},get:function(t){var e=this.find(t);return -1==e?void 0:this.content[e+1]},update:function(t,e,n){var i=n&&n!=t?this.remove(n):this,s=i.find(t),o=i.content.slice();return -1==s?o.push(n||t,e):(o[s+1]=e,n&&(o[s]=n)),new r(o)},remove:function(t){var e=this.find(t);if(-1==e)return this;var n=this.content.slice();return n.splice(e,2),new r(n)},addToStart:function(t,e){return new r([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new r(n)},addBefore:function(t,e,n){var i=this.remove(e),s=i.content.slice(),o=i.find(t);return s.splice(-1==o?s.length:o,0,e,n),new r(s)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return(t=r.from(t)).size?new r(t.content.concat(this.subtract(t).content)):this},append:function(t){return(t=r.from(t)).size?new r(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=r.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}},r.from=function(t){if(t instanceof r)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new r(e)};class i{constructor(t,e){if(this.content=t,this.size=e||0,null==e)for(let e=0;e<t.length;e++)this.size+=t[e].nodeSize}nodesBetween(t,e,n,r=0,i){for(let s=0,o=0;o<e;s++){let l=this.content[s],a=o+l.nodeSize;if(a>t&&!1!==n(l,r+o,i||null,s)&&l.content.size){let i=o+1;l.nodesBetween(Math.max(0,t-i),Math.min(l.content.size,e-i),n,r+i)}o=a}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,e,n,r){let i="",s=!0;return this.nodesBetween(t,e,(o,l)=>{let a=o.isText?o.text.slice(Math.max(t,l)-l,e-l):o.isLeaf?r?"function"==typeof r?r(o):r:o.type.spec.leafText?o.type.spec.leafText(o):"":"";o.isBlock&&(o.isLeaf&&a||o.isTextblock)&&n&&(s?s=!1:i+=n),i+=a},0),i}append(t){if(!t.size)return this;if(!this.size)return t;let e=this.lastChild,n=t.firstChild,r=this.content.slice(),s=0;for(e.isText&&e.sameMarkup(n)&&(r[r.length-1]=e.withText(e.text+n.text),s=1);s<t.content.length;s++)r.push(t.content[s]);return new i(r,this.size+t.size)}cut(t,e=this.size){if(0==t&&e==this.size)return this;let n=[],r=0;if(e>t)for(let i=0,s=0;s<e;i++){let o=this.content[i],l=s+o.nodeSize;l>t&&((s<t||l>e)&&(o=o.isText?o.cut(Math.max(0,t-s),Math.min(o.text.length,e-s)):o.cut(Math.max(0,t-s-1),Math.min(o.content.size,e-s-1))),n.push(o),r+=o.nodeSize),s=l}return new i(n,r)}cutByIndex(t,e){return t==e?i.empty:0==t&&e==this.content.length?this:new i(this.content.slice(t,e))}replaceChild(t,e){let n=this.content[t];if(n==e)return this;let r=this.content.slice(),s=this.size+e.nodeSize-n.nodeSize;return r[t]=e,new i(r,s)}addToStart(t){return new i([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new i(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let e=0;e<this.content.length;e++)if(!this.content[e].eq(t.content[e]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(t){let e=this.content[t];if(!e)throw RangeError("Index "+t+" out of range for "+this);return e}maybeChild(t){return this.content[t]||null}forEach(t){for(let e=0,n=0;e<this.content.length;e++){let r=this.content[e];t(r,n,e),n+=r.nodeSize}}findDiffStart(t,e=0){return function t(e,n,r){for(let i=0;;i++){if(i==e.childCount||i==n.childCount)return e.childCount==n.childCount?null:r;let s=e.child(i),o=n.child(i);if(s==o){r+=s.nodeSize;continue}if(!s.sameMarkup(o))return r;if(s.isText&&s.text!=o.text){for(let t=0;s.text[t]==o.text[t];t++)r++;return r}if(s.content.size||o.content.size){let e=t(s.content,o.content,r+1);if(null!=e)return e}r+=s.nodeSize}}(this,t,e)}findDiffEnd(t,e=this.size,n=t.size){return function t(e,n,r,i){for(let s=e.childCount,o=n.childCount;;
4){if(0==s||0==o)return s==o?null:{a:r,b:i};let l=e.child(--s),a=n.child(--o),h=l.nodeSize;if(l==a){r-=h,i-=h;continue}if(!l.sameMarkup(a))return{a:r,b:i};if(l.isText&&l.text!=a.text){let t=0,e=Math.min(l.text.length,a.text.length);for(;t<e&&l.text[l.text.length-t-1]==a.text[a.text.length-t-1];)t++,r--,i--;return{a:r,b:i}}if(l.content.size||a.content.size){let e=t(l.content,a.content,r-1,i-1);if(e)return e}r-=h,i-=h}}(this,t,e,n)}findIndex(t,e=-1){if(0==t)return o(0,t);if(t==this.size)return o(this.content.length,t);if(t>this.size||t<0)throw RangeError(`Position ${t} outside of fragment (${this})`);for(let n=0,r=0;;n++){let i=r+this.child(n).nodeSize;if(i>=t){if(i==t||e>0)return o(n+1,i);return o(n,r)}r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,e){if(!e)return i.empty;if(!Array.isArray(e))throw RangeError("Invalid input for Fragment.fromJSON");return new i(e.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return i.empty;let e,n=0;for(let r=0;r<t.length;r++){let i=t[r];n+=i.nodeSize,r&&i.isText&&t[r-1].sameMarkup(i)?(e||(e=t.slice(0,r)),e[e.length-1]=i.withText(e[e.length-1].text+i.text)):e&&e.push(i)}return new i(e||t,n)}static from(t){if(!t)return i.empty;if(t instanceof i)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new i([t],t.nodeSize);throw RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}i.empty=new i([],0);let s={index:0,offset:0};function o(t,e){return s.index=t,s.offset=e,s}function l(t,e){if(t===e)return!0;if(!(t&&"object"==typeof t)||!(e&&"object"==typeof e))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!l(t[n],e[n]))return!1}else{for(let n in t)if(!(n in e)||!l(t[n],e[n]))return!1;for(let n in e)if(!(n in t))return!1}return!0}class a{constructor(t,e){this.type=t,this.attrs=e}addToSet(t){let e,n=!1;for(let r=0;r<t.length;r++){let i=t[r];if(this.eq(i))return t;if(this.type.excludes(i.type))e||(e=t.slice(0,r));else{if(i.type.excludes(this.type))return t;!n&&i.type.rank>this.type.rank&&(e||(e=t.slice(0,r)),e.push(this),n=!0),e&&e.push(i)}}return e||(e=t.slice()),n||e.push(this),e}removeFromSet(t){for(let e=0;e<t.length;e++)if(this.eq(t[e]))return t.slice(0,e).concat(t.slice(e+1));return t}isInSet(t){for(let e=0;e<t.length;e++)if(this.eq(t[e]))return!0;return!1}eq(t){return this==t||this.type==t.type&&l(this.attrs,t.attrs)}toJSON(){let t={type:this.type.name};for(let e in this.attrs){t.attrs=this.attrs;break}return t}static fromJSON(t,e){if(!e)throw RangeError("Invalid input for Mark.fromJSON");let n=t.marks[e.type];if(!n)throw RangeError(`There is no mark type ${e.type} in this schema`);return n.create(e.attrs)}static sameSet(t,e){if(t==e)return!0;if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].eq(e[n]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&0==t.length)return a.none;if(t instanceof a)return[t];let e=t.slice();return e.sort((t,e)=>t.type.rank-e.type.rank),e}}a.none=[];
vendor: 5,277 bytes, line 4
4class h extends Error{}class c{constructor(t,e,n){this.content=t,this.openStart=e,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,e){let n=function t(e,n,r,i){let{index:s,offset:o}=e.findIndex(n),l=e.maybeChild(s);if(o==n||l.isText)return i&&!i.canReplace(s,s,r)?null:e.cut(0,n).append(r).append(e.cut(n));let a=t(l.content,n-o-1,r);return a&&e.replaceChild(s,l.copy(a))}(this.content,t+this.openStart,e);return n&&new c(n,this.openStart,this.openEnd)}removeBetween(t,e){return new c(function t(e,n,r){let{index:i,offset:s}=e.findIndex(n),o=e.maybeChild(i),{index:l,offset:a}=e.findIndex(r);if(s==n||o.isText){if(a!=r&&!e.child(l).isText)throw RangeError("Removing non-flat range");return e.cut(0,n).append(e.cut(r))}if(i!=l)throw RangeError("Removing non-flat range");return e.replaceChild(i,o.copy(t(o.content,n-s-1,r-s-1)))}(this.content,t+this.openStart,e+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,e){if(!e)return c.empty;let n=e.openStart||0,r=e.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw RangeError("Invalid input for Slice.fromJSON");return new c(i.fromJSON(t,e.content),n,r)}static maxOpen(t,e=!0){let n=0,r=0;for(let r=t.firstChild;r&&!r.isLeaf&&(e||!r.type.spec.isolating);r=r.firstChild)n++;for(let n=t.lastChild;n&&!n.isLeaf&&(e||!n.type.spec.isolating);n=n.lastChild)r++;return new c(t,n,r)}}function d(t,e){if(!e.type.compatibleContent(t.type))throw new h("Cannot join "+e.type.name+" onto "+t.type.name)}function u(t,e,n){let r=t.node(n);return d(r,e.node(n)),r}function p(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function f(t,e,n,r){let i=(e||t).node(n),s=0,o=e?e.index(n):i.childCount;t&&(s=t.index(n),t.depth>n?s++:t.textOffset&&(p(t.nodeAfter,r),s++));for(let t=s;t<o;t++)p(i.child(t),r);e&&e.depth==n&&e.textOffset&&p(e.nodeBefore,r)}function m(t,e){return t.type.checkContent(e),t.copy(e)}function g(t,e,n){let r=[];return f(null,t,n,r),t.depth>n&&p(m(u(t,e,n+1),g(t,e,n+1)),r),f(e,null,n,r),new i(r)}c.empty=new c(i.empty,0,0);class y{constructor(t,e,n){this.pos=t,this.path=e,this.parentOffset=n,this.depth=e.length/3-1}resolveDepth(t){return null==t?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[3*this.resolveDepth(t)]}index(t){return this.path[3*this.resolveDepth(t)+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t!=this.depth||this.textOffset?1:0)}start(t){return 0==(t=this.resolveDepth(t))?0:this.path[3*t-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(!(t=this.resolveDepth(t)))throw RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]}after(t){if(!(t=this.resolveDepth(t)))throw RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]+this.path[3*t].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,e=this.index(this.depth);if(e==t.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=t.child(e);return n?t.child(e).cut(n):r}get nodeBefore(){let t=this.index(this.depth),e=this.pos-this.path[this.path.length-1];return e?this.parent.child(t).cut(0,e):0==t?null:this.parent.child(t-1)}posAtIndex(t,e){e=this.resolveDepth(e);let n=this.path[3*e],r=0==e?0:this.path[3*e-1]+1;for(let e=0;e<t;e++)r+=n.child(e).nodeSize;return r}marks(){let t=this.parent,e=this.index();if(0==t.content.size)return a.none;if(this.textOffset)return t.child(e).marks;let n=t.maybeChild(e-1),r=t.maybeChild(e);if(!n){let t=n;n=r,r=t}let i=n.marks;for(var s=0;s<i.length;s++)!1!==i[s].type.spec.inclusive||r&&i[s].isInSet(r.marks)||(i=i[s--].removeFromSet(i));return i}marksAcross(t){let e=this.parent.maybeChild(this.index());if(!e||!e.isInline)return null;let n=e.marks,r=t.parent.maybeChild(t.index());for(var i=0;i<n.length;i++)!1!==n[i].type.spec.inclusive||r&&n[i].isInSet(r.marks)||(n=n[i--].removeFromSet(n));return n}sharedDepth(t){for(let e=this.depth;e>0;e--)if(this.start(e)<=t&&this.end(e)>=t)return e;return 0}blockRange(t=this,e){if(t.pos<this.pos)return t.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);n>=0;n--)if(t.pos<=this.end(n)&&(!e||e(this.node(n))))return new b(this,t,n);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos<this.pos?t:this}toString(){let t="";for(let e=1;e<=this.depth;e++)t+=(t?"/":"")+this.node(e).type.name+"_"+this.index(e-1);return t+":"+this.parentOffset}static resolve(t,e){if(!(e>=0&&e<=t.content.size))throw RangeError("Position "+e+" out of range");let n=[],r=0,i=e;for(let e=t;;){let{index:t,offset:s}=e.content.findIndex(i),o=i-s;if(n.push(e,t,r+s),!o||(e=e.child(t)).isText)break;
4i=o-1,r+=s+1}return new y(e,n,i)}static resolveCached(t,e){for(let n=0;n<x.length;n++){let r=x[n];if(r.pos==e&&r.doc==t)return r}let n=x[k]=y.resolve(t,e);return k=(k+1)%v,n}}let x=[],k=0,v=12;class b{constructor(t,e,n){this.$from=t,this.$to=e,this.depth=n}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}let w=Object.create(null);class M{constructor(t,e,n,r=a.none){this.type=t,this.attrs=e,this.marks=r,this.content=n||i.empty}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(t){return this.content.child(t)}maybeChild(t){return this.content.maybeChild(t)}forEach(t){this.content.forEach(t)}nodesBetween(t,e,n,r=0){this.content.nodesBetween(t,e,n,r,this)}descendants(t){this.nodesBetween(0,this.content.size,t)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(t,e,n,r){return this.content.textBetween(t,e,n,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(t){return this==t||this.sameMarkup(t)&&this.content.eq(t.content)}sameMarkup(t){return this.hasMarkup(t.type,t.attrs,t.marks)}hasMarkup(t,e,n){return this.type==t&&l(this.attrs,e||t.defaultAttrs||w)&&a.sameSet(this.marks,n||a.none)}copy(t=null){return t==this.content?this:new M(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new M(this.type,this.attrs,this.content,t)}cut(t,e=this.content.size){return 0==t&&e==this.content.size?this:this.copy(this.content.cut(t,e))}slice(t,e=this.content.size,n=!1){if(t==e)return c.empty;let r=this.resolve(t),i=this.resolve(e),s=n?0:r.sharedDepth(e),o=r.start(s);return new c(r.node(s).content.cut(r.pos-o,i.pos-o),r.depth-s,i.depth-s)}replace(t,e,n){return function(t,e,n){if(n.openStart>t.depth)throw new h("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new h("Inconsistent open depths");return function t(e,n,r,s){let o=e.index(s),l=e.node(s);if(o==n.index(s)&&s<e.depth-r.openStart){let i=t(e,n,r,s+1);return l.copy(l.content.replaceChild(o,i))}if(!r.content.size)return m(l,g(e,n,s));if(r.openStart||r.openEnd||e.depth!=s||n.depth!=s){let{start:t,end:o}=function(t,e){let n=e.depth-t.openStart,r=e.node(n).copy(t.content);for(let t=n-1;t>=0;t--)r=e.node(t).copy(i.from(r));return{start:r.resolveNoCache(t.openStart+n),end:r.resolveNoCache(r.content.size-t.openEnd-n)}}(r,e);return m(l,function t(e,n,r,s,o){let l=e.depth>o&&u(e,n,o+1),a=s.depth>o&&u(r,s,o+1),h=[];return f(null,e,o,h),l&&a&&n.index(o)==r.index(o)?(d(l,a),p(m(l,t(e,n,r,s,o+1)),h)):(l&&p(m(l,g(e,n,o+1)),h),f(n,r,o,h),a&&p(m(a,g(r,s,o+1)),h)),f(s,null,o,h),new i(h)}(e,t,o,n,s))}{let t=e.parent,i=t.content;return m(t,i.cut(0,e.parentOffset).append(r.content).append(i.cut(n.parentOffset)))}}(t,e,n,0)}(this.resolve(t),this.resolve(e),n)}nodeAt(t){for(let e=this;;){let{index:n,offset:r}=e.content.findIndex(t);if(!(e=e.maybeChild(n)))return null;if(r==t||e.isText)return e;t-=r+1}}childAfter(t){let{index:e,offset:n}=this.content.findIndex(t);return{node:this.content.maybeChild(e),index:e,offset:n}}childBefore(t){if(0==t)return{node:null,index:0,offset:0};let{index:e,offset:n}=this.content.findIndex(t);if(n<t)return{node:this.content.child(e),index:e,offset:n};let r=this.content.child(e-1);return{node:r,index:e-1,offset:n-r.nodeSize}}resolve(t){return y.resolveCached(this,t)}resolveNoCache(t){return y.resolve(this,t)}rangeHasMark(t,e,n){let r=!1;return e>t&&this.nodesBetween(t,e,t=>(n.isInSet(t.marks)&&(r=!0),!r)),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);
4let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),C(this.marks,t)}contentMatchAt(t){let e=this.type.contentMatch.matchFragment(this.content,0,t);if(!e)throw Error("Called contentMatchAt on a node with invalid content");return e}canReplace(t,e,n=i.empty,r=0,s=n.childCount){let o=this.contentMatchAt(t).matchFragment(n,r,s),l=o&&o.matchFragment(this.content,e);if(!l||!l.validEnd)return!1;for(let t=r;t<s;t++)if(!this.type.allowsMarks(n.child(t).marks))return!1;return!0}canReplaceWith(t,e,n,r){if(r&&!this.type.allowsMarks(r))return!1;let i=this.contentMatchAt(t).matchType(n),s=i&&i.matchFragment(this.content,e);return!!s&&s.validEnd}canAppend(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)}check(){this.type.checkContent(this.content);let t=a.none;for(let e=0;e<this.marks.length;e++)t=this.marks[e].addToSet(t);if(!a.sameSet(t,this.marks))throw RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let t={type:this.type.name};for(let e in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(t=>t.toJSON())),t}static fromJSON(t,e){if(!e)throw RangeError("Invalid input for Node.fromJSON");let n=null;if(e.marks){if(!Array.isArray(e.marks))throw RangeError("Invalid mark data for Node.fromJSON");n=e.marks.map(t.markFromJSON)}if("text"==e.type){if("string"!=typeof e.text)throw RangeError("Invalid text node in JSON");return t.text(e.text,n)}let r=i.fromJSON(t,e.content);return t.nodeType(e.type).create(e.attrs,r,n)}}M.prototype.text=void 0;class S extends M{constructor(t,e,n,r){if(super(t,e,null,r),!n)throw RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):C(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,e){return this.text.slice(t,e)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new S(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new S(this.type,this.attrs,t,this.marks)}cut(t=0,e=this.text.length){return 0==t&&e==this.text.length?this:this.withText(this.text.slice(t,e))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function C(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class T{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,e){var n;let r,i=new j(t,e);if(null==i.next)return T.empty;let s=function t(e){let n=[];do n.push(function(e){let n=[];do n.push(function(e){let n=function(e){if(e.eat("(")){let n=t(e);return e.eat(")")||e.err("Missing closing paren"),n}if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let t=(function(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let i=[];for(let t in n){let r=n[t];r.groups.indexOf(e)>-1&&i.push(r)}return 0==i.length&&t.err("No node type or group '"+e+"' found"),i})(e,e.next).map(t=>(null==e.inline?e.inline=t.isInline:e.inline!=t.isInline&&e.err("Mixing inline and block content"),{type:"name",value:t}));return e.pos++,1==t.length?t[0]:{type:"choice",exprs:t}}}(e);for(;;)if(e.eat("+"))n={type:"plus",expr:n};else if(e.eat("*"))n={type:"star",expr:n};else if(e.eat("?"))n={type:"opt",expr:n};else if(e.eat("{"))n=function(t,e){let n=A(t),r=n;return t.eat(",")&&(r="}"!=t.next?A(t):-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}(e,n);else break;return n}(e));while(e.next&&")"!=e.next&&"|"!=e.next);return 1==n.length?n[0]:{type:"seq",exprs:n}}(e));while(e.eat("|"));return 1==n.length?n[0]:{type:"choice",exprs:n}}(i);i.next&&i.err("Unexpected trailing text");let o=(n=function(t){let e=[[]];return i(function t(e,s){if("choice"==e.type)return e.exprs.reduce((e,n)=>e.concat(t(n,s)),[]);if("seq"==e.type)for(let r=0;;r++){let o=t(e.exprs[r],s);if(r==e.exprs.length-1)return o;i(o,s=n())}else if("star"==e.type){let o=n();return r(s,o),i(t(e.expr,o),o),[r(o)]}else if("plus"==e.type){let o=n();return i(t(e.expr,s),o),i(t(e.expr,o),o),[r(o)]}else if("opt"==e.type)return[r(s)].concat(t(e.expr,s));else if("range"==e.type){let o=s;for(let r=0;r<e.min;r++){let r=n();i(t(e.expr,o),r),o=r}if(-1==e.max)i(t(e.expr,o),o);else for(let s=e.min;s<e.max;s++){let s=n();r(o,s),i(t(e.expr,o),s),o=s}return[r(o)]}else if("name"==e.type)return[r(s,void 0,e.value)];else throw Error("Unknown expr type")}(t,0),n()),e;function n(){return e.push([])-1}function r(t,n,r){let i={term:r,to:n};return e[t].push(i),i}function i(t,e){t.forEach(t=>t.to=e)}}(s),r=Object.create(null),function t(e){let i=[];e.forEach(t=>{n[t].forEach(({term:t,to:e})=>{let r;if(t){for(let e=0;e<i.length;e++)i[e][0]==t&&(r=i[e][1]);
vendor: 5,927 bytes, line 4
4L(n,e).forEach(e=>{r||i.push([t,r=[]]),-1==r.indexOf(e)&&r.push(e)})}})});let s=r[e.join(",")]=new T(e.indexOf(n.length-1)>-1);for(let e=0;e<i.length;e++){let n=i[e][1].sort(E);s.next.push({type:i[e][0],next:r[n.join(",")]||t(n)})}return s}(L(n,0)));return function(t,e){for(let n=0,r=[t];n<r.length;n++){let t=r[n],i=!t.validEnd,s=[];for(let e=0;e<t.next.length;e++){let{type:n,next:o}=t.next[e];s.push(n.name),i&&!(n.isText||n.hasRequiredAttrs())&&(i=!1),-1==r.indexOf(o)&&r.push(o)}i&&e.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(o,i),o}matchType(t){for(let e=0;e<this.next.length;e++)if(this.next[e].type==t)return this.next[e].next;return null}matchFragment(t,e=0,n=t.childCount){let r=this;for(let i=e;r&&i<n;i++)r=r.matchType(t.child(i).type);return r}get inlineContent(){return 0!=this.next.length&&this.next[0].type.isInline}get defaultType(){for(let t=0;t<this.next.length;t++){let{type:e}=this.next[t];if(!(e.isText||e.hasRequiredAttrs()))return e}return null}compatible(t){for(let e=0;e<this.next.length;e++)for(let n=0;n<t.next.length;n++)if(this.next[e].type==t.next[n].type)return!0;return!1}fillBefore(t,e=!1,n=0){let r=[this];return function s(o,l){let a=o.matchFragment(t,n);if(a&&(!e||a.validEnd))return i.from(l.map(t=>t.createAndFill()));for(let t=0;t<o.next.length;t++){let{type:e,next:n}=o.next[t];if(!(e.isText||e.hasRequiredAttrs())&&-1==r.indexOf(n)){r.push(n);let t=s(n,l.concat(e));if(t)return t}}return null}(this,[])}findWrapping(t){for(let e=0;e<this.wrapCache.length;e+=2)if(this.wrapCache[e]==t)return this.wrapCache[e+1];let e=this.computeWrapping(t);return this.wrapCache.push(t,e),e}computeWrapping(t){let e=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let r=n.shift(),i=r.match;if(i.matchType(t)){let t=[];for(let e=r;e.type;e=e.via)t.push(e.type);return t.reverse()}for(let t=0;t<i.next.length;t++){let{type:s,next:o}=i.next[t];s.isLeaf||s.hasRequiredAttrs()||s.name in e||r.type&&!o.validEnd||(n.push({match:s.contentMatch,type:s,via:r}),e[s.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(t){if(t>=this.next.length)throw RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];return!function e(n){t.push(n);for(let r=0;r<n.next.length;r++)-1==t.indexOf(n.next[r].next)&&e(n.next[r].next)}(this),t.map((e,n)=>{let r=n+(e.validEnd?"*":" ")+" ";for(let n=0;n<e.next.length;n++)r+=(n?", ":"")+e.next[n].type.name+"->"+t.indexOf(e.next[n].next);return r}).join("\n")}}T.empty=new T(!0);class j{constructor(t,e){this.string=t,this.nodeTypes=e,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw SyntaxError(t+" (in content expression '"+this.string+"')")}}function A(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function E(t,e){return e-t}function L(t,e){let n=[];return function e(r){let i=t[r];if(1==i.length&&!i[0].term)return e(i[0].to);n.push(r);for(let t=0;t<i.length;t++){let{term:r,to:s}=i[t];r||-1!=n.indexOf(s)||e(s)}}(e),n.sort(E)}function O(t){let e=Object.create(null);for(let n in t){let r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}function R(t,e){let n=Object.create(null);for(let r in t){let i=e&&e[r];if(void 0===i){let e=t[r];if(e.hasDefault)i=e.default;else throw RangeError("No value supplied for attribute "+r)}n[r]=i}return n}function I(t){let e=Object.create(null);if(t)for(let n in t)e[n]=new H(t[n]);return e}class N{constructor(t,e,n){this.name=t,this.schema=e,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(" "):[],this.attrs=I(n.attrs),this.defaultAttrs=O(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||"text"==t),this.isText="text"==t}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==T.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:R(this.attrs,t)}create(t=null,e,n){if(this.isText)throw Error("NodeType.create can't construct text nodes");return new M(this,this.computeAttrs(t),i.from(e),a.setFrom(n))}createChecked(t=null,e,n){return e=i.from(e),this.checkContent(e),new M(this,this.computeAttrs(t),e,a.setFrom(n))}createAndFill(t=null,e,n){if(t=this.computeAttrs(t),(e=i.from(e)).size){let t=this.contentMatch.fillBefore(e);if(!t)return null;e=t.append(e)}let r=this.contentMatch.matchFragment(e),s=r&&r.fillBefore(i.empty,!0);return s?new M(this,t,e.append(s),a.setFrom(n)):null}validContent(t){let e=this.contentMatch.matchFragment(t);if(!e||!e.validEnd)return!1;for(let e=0;e<t.childCount;e++)if(!this.allowsMarks(t.child(e).marks))return!1;return!0}checkContent(t){if(!this.validContent(t))throw RangeError(`Invalid content for node ${this.name}: ${t.toString().slice(0,50)}`)}allowsMarkType(t){return null==this.markSet||this.markSet.indexOf(t)>-1}allowsMarks(t){if(null==this.markSet)return!0;for(let e=0;e<t.length;e++)if(!this.allowsMarkType(t[e].type))return!1;return!0}allowedMarks(t){let e;if(null==this.markSet)return t;for(let n=0;n<t.length;n++)this.allowsMarkType(t[n].type)?e&&e.push(t[n]):e||(e=t.slice(0,n));return e?e.length?e:a.none:t}static compile(t,e){let n=Object.create(null);t.forEach((t,r)=>n[t]=new N(t,e,r));let r=e.spec.topNode||"doc";if(!n[r])throw RangeError("Schema is missing its top node type ('"+r+"')");
4if(!n.text)throw RangeError("Every schema needs a 'text' type");for(let t in n.text.attrs)throw RangeError("The text node type should not have attributes");return n}}class H{constructor(t){this.hasDefault=Object.prototype.hasOwnProperty.call(t,"default"),this.default=t.default}get isRequired(){return!this.hasDefault}}class z{constructor(t,e,n,r){this.name=t,this.rank=e,this.schema=n,this.spec=r,this.attrs=I(r.attrs),this.excluded=null;let i=O(this.attrs);this.instance=i?new a(this,i):null}create(t=null){return!t&&this.instance?this.instance:new a(this,R(this.attrs,t))}static compile(t,e){let n=Object.create(null),r=0;return t.forEach((t,i)=>n[t]=new z(t,r++,e,i)),n}removeFromSet(t){for(var e=0;e<t.length;e++)t[e].type==this&&(t=t.slice(0,e).concat(t.slice(e+1)),e--);return t}isInSet(t){for(let e=0;e<t.length;e++)if(t[e].type==this)return t[e]}excludes(t){return this.excluded.indexOf(t)>-1}}class P{constructor(t){this.cached=Object.create(null);let e=this.spec={};for(let n in t)e[n]=t[n];e.nodes=r.from(t.nodes),e.marks=r.from(t.marks||{}),this.nodes=N.compile(this.spec.nodes,this),this.marks=z.compile(this.spec.marks,this);let n=Object.create(null);for(let t in this.nodes){if(t in this.marks)throw RangeError(t+" can not be both a node and a mark");let e=this.nodes[t],r=e.spec.content||"",i=e.spec.marks;e.contentMatch=n[r]||(n[r]=T.parse(r,this.nodes)),e.inlineContent=e.contentMatch.inlineContent,e.markSet="_"==i?null:i?B(this,i.split(" ")):""!=i&&e.inlineContent?null:[]}for(let t in this.marks){let e=this.marks[t],n=e.spec.excludes;e.excluded=null==n?[e]:""==n?[]:B(this,n.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,e=null,n,r){if("string"==typeof t)t=this.nodeType(t);else if(t instanceof N){if(t.schema!=this)throw RangeError("Node type from different schema used ("+t.name+")")}else throw RangeError("Invalid node type: "+t);return t.createChecked(e,n,r)}text(t,e){let n=this.nodes.text;return new S(n,n.defaultAttrs,t,a.setFrom(e))}mark(t,e){return"string"==typeof t&&(t=this.marks[t]),t.create(e)}nodeFromJSON(t){return M.fromJSON(this,t)}markFromJSON(t){return a.fromJSON(this,t)}nodeType(t){let e=this.nodes[t];if(!e)throw RangeError("Unknown node type: "+t);return e}}function B(t,e){let n=[];for(let r=0;r<e.length;r++){let i=e[r],s=t.marks[i],o=s;if(s)n.push(s);else for(let e in t.marks){let r=t.marks[e];("_"==i||r.spec.group&&r.spec.group.split(" ").indexOf(i)>-1)&&n.push(o=r)}if(!o)throw SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}class ${constructor(t,e){this.schema=t,this.rules=e,this.tags=[],this.styles=[],e.forEach(t=>{t.tag?this.tags.push(t):t.style&&this.styles.push(t)}),this.normalizeLists=!this.tags.some(e=>{if(!/^(ul|ol)\b/.test(e.tag)||!e.node)return!1;let n=t.nodes[e.node];return n.contentMatch.matchType(n)})}parse(t,e={}){let n=new K(this,e,!1);return n.addAll(t,e.from,e.to),n.finish()}parseSlice(t,e={}){let n=new K(this,e,!0);return n.addAll(t,e.from,e.to),c.maxOpen(n.finish())}matchTag(t,e,n){for(let i=n?this.tags.indexOf(n)+1:0;i<this.tags.length;i++){var r;let n=this.tags[i];if(r=n.tag,(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,r)&&(void 0===n.namespace||t.namespaceURI==n.namespace)&&(!n.context||e.matchesContext(n.context))){if(n.getAttrs){let e=n.getAttrs(t);if(!1===e)continue;n.attrs=e||void 0}return n}}}matchStyle(t,e,n,r){for(let i=r?this.styles.indexOf(r)+1:0;i<this.styles.length;i++){let r=this.styles[i],s=r.style;if(0==s.indexOf(t)&&(!r.context||n.matchesContext(r.context))&&(!(s.length>t.length)||61==s.charCodeAt(t.length)&&s.slice(t.length+1)==e)){if(r.getAttrs){let t=r.getAttrs(e);if(!1===t)continue;r.attrs=t||void 0}return r}}}static schemaRules(t){let e=[];function n(t){let n=null==t.priority?50:t.priority,r=0;for(;r<e.length;r++){let t=e[r];if((null==t.priority?50:t.priority)<n)break}e.splice(r,0,t)}for(let e in t.marks){let r=t.marks[e].spec.parseDOM;r&&r.forEach(t=>{n(t=Y(t)),t.mark||t.ignore||t.clearMark||(t.mark=e)})}for(let e in t.nodes){let r=t.nodes[e].spec.parseDOM;r&&r.forEach(t=>
4{n(t=Y(t)),t.node||t.ignore||t.mark||(t.node=e)})}return e}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new $(t,$.schemaRules(t)))}}let F={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},D={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},J={ol:!0,ul:!0};function _(t,e,n){return null!=e?(e?1:0)|("full"===e?2:0):t&&"pre"==t.whitespace?3:-5&n}class q{constructor(t,e,n,r,i,s,o){this.type=t,this.attrs=e,this.marks=n,this.pendingMarks=r,this.solid=i,this.options=o,this.content=[],this.activeMarks=a.none,this.stashMarks=[],this.match=s||(4&o?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let e=this.type.contentMatch.fillBefore(i.from(t));if(e)this.match=this.type.contentMatch.matchFragment(e);else{let e=this.type.contentMatch,n;return(n=e.findWra
4pping(t.type))?(this.match=e,n):null}}return this.match.findWrapping(t.type)}finish(t){if(!(1&this.options)){let t=this.content[this.content.length-1],e;t&&t.isText&&(e=/[ \t\r\n\u000c]+$/.exec(t.text))&&(t.text.length==e[0].length?this.content.pop():this.content[this.content.length-1]=t.withText(t.text.slice(0,t.text.length-e[0].length)))}let e=i.from(this.content);return!t&&this.match&&(e=e.append(this.match.fillBefore(i.empty,!0))),this.type?this.type.create(this.attrs,e,this.marks):e}popFromStashMark(t){for(let e=this.stashMarks.length-1;e>=0;e--)if(t.eq(this.stashMarks[e]))return this.stashMarks.splice(e,1)[0]}applyPending(t){for(let e=0,n=this.pendingMarks;e<n.length;e++){let r=n[e];(this.type?this.type.allowsMarkType(r.type):function(t,e){let n=e.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(t))continue;let s=[],o=t=>{s.push(t);for(let n=0;n<t.edgeCount;n++){let{type:r,next:i}=t.edge(n);if(r==e||0>s.indexOf(i)&&o(i))return!0}};if(o(i.contentMatch))return!0}}(r.type,t))&&!r.isInSet(this.activeMarks)&&(this.activeMarks=r.addToSet(this.activeMarks),this.pendingMarks=r.removeFromSet(this.pendingMarks))}}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!F.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}}class K{constructor(t,e,n){this.parser=t,this.options=e,this.isOpen=n,this.open=0;let r=e.topNode,i,s=_(null,e.preserveWhitespace,0)|(n?4:0);i=r?new q(r.type,r.attrs,a.none,a.none,!0,e.topMatch||r.type.contentMatch,s):n?new q(null,null,a.none,a.none,!0,null,s):new q(t.schema.topNodeType,null,a.none,a.none,!0,null,s),this.nodes=[i],this.find=e.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t){3==t.nodeType?this.addTextNode(t):1==t.nodeType&&this.addElement(t)}withStyleRules(t,e){let n=t.getAttribute("style");if(!n)return e();let r=this.readStyles(function(t){let e=/\s*([\w-]+)\s*:\s*([^;]+)/g,n,r=[];for(;n=e.exec(t);)r.push(n[1],n[2].trim());return r}(n));if(!r)return;let[i,s]=r,o=this.top;for(let t=0;t<s.length;t++)this.removePendingMark(s[t],o);for(let t=0;t<i.length;t++)this.addPendingMark(i[t]);e();for(let t=0;t<i.length;t++)this.removePendingMark(i[t],o);for(let t=0;t<s.length;t++)this.addPendingMark(s[t])}addTextNode(t){let e=t.nodeValue,n=this.top;if(2&n.options||n.inlineContext(t)||/[^ \t\r\n\u000c]/.test(e)){if(1&n.options)e=2&n.options?e.replace(/\r\n?/g,"\n"):e.replace(/\r?\n|\r/g," ");else if(e=e.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(e)&&this.open==this.nodes.length-1){let r=n.content[n.content.length-1],i=t.previousSibling;(!r||i&&"BR"==i.nodeName||r.isText&&/[ \t\r\n\u000c]$/.test(r.text))&&(e=e.slice(1))}e&&this.insertNode(this.parser.schema.text(e)),this.findInText(t)}else this.findInside(t)}addElement(t,e){let n=t.nodeName.toLowerCase(),r;J.hasOwnProperty(n)&&this.parser.normalizeLists&&function(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let t=1==e.nodeType?e.nodeName.toLowerCase():null;t&&J.hasOwnProperty(t)&&n?(n.appendChild(e),e=n):"li"==t?n=e:t&&(n=null)}}(t);let i=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(r=this.parser.matchTag(t,this,e));if(i?i.ignore:D.hasOwnProperty(n))this.findInside(t),this.ignoreFallback(t);else if(!i||i.skip||i.closeParent){i&&i.closeParent?this.open=Math.max(0,this.open-1):i&&i.skip.nodeType&&(t=i.skip);let e,r=this.top,s=this.needsBlock;if(F.hasOwnProperty(n))r.content.length&&r.content[0].isInline&&this.open&&(this.open--,r=this.top),e=!0,r.type||(this.needsBlock=!0);else if(!t.firstChild){this.leafFallback(t);return}i&&i.skip?this.addAll(t):this.withStyleRules(t,()=>this.addAll(t)),e&&this.sync(r),this.needsBlock=s}else this.withStyleRules(t,()=>{this.addElementByRule(t,i,!1===i.consuming?r:void 0)})}leafFallback(t){"BR"==t.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode("\n"))}ignoreFallback(t){"BR"!=t.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"))}readStyles(t){let e=a.none,n=a.none;for(let r=0;r<t.length;r+=2)for(let i;;){let s=this.parser.matchStyle(t[r],t[r+1],this,i);if(!s)break;if(s.ignore)return null;if(s.clearMark?this.top.pendingMarks.concat(this.top.activeMarks).forEac
4h(t=>{s.clearMark(t)&&(n=t.addToSet(n))}):e=this.parser.schema.marks[s.mark].create(s.attrs).addToSet(e),!1===s.consuming)i=s;else break}return[e,n]}addElementByRule(t,e,n){let r,i,s;e.node?(i=this.parser.schema.nodes[e.node]).isLeaf?this.insertNode(i.create(e.attrs))||this.leafFallback(t):r=this.enter(i,e.attrs||null,e.preserveWhitespace):(s=this.parser.schema.marks[e.mark].create(e.attrs),this.addPendingMark(s));let o=this.top;if(i&&i.isLeaf)this.findInside(t);else if(n)this.addElement(t,n);else if(e.getContent)this.findInside(t),e.getContent(t,this.parser.schema).forEach(t=>this.insertNode(t));else{let n=t;"string"==typeof e.contentElement?n=t.querySelector(e.contentElement):"function"==typeof e.contentElement?n=e.contentElement(t):e.contentElement&&(n=e.contentElement),this.findAround(t,n,!0),this.addAll(n)}r&&this.sync(o)&&this.open--,s&&this.removePendingMark(s,o)}addAll(t,e,n){let r=e||0;for(let i=e?t.childNodes[e]:t.firstChild,s=null==n?null:t.childNodes[n];i!=s;i=i.nextSibling,++r)this.findAtPoint(t,r),this.addDOM(i);this.findAtPoint(t,r)}findPlace(t){let e,n;for(let r=this.open;r>=0;r--){let i=this.nodes[r],s=i.findWrapping(t);if(s&&(!e||e.length>s.length)&&(e=s,n=i,!s.length)||i.solid)break}if(!e)return!1;this.sync(n);for(let t=0;t<e.length;t++)this.enterInner(e[t],null,!1);return!0}insertNode(t){if(t.isInline&&this.needsBlock&&!this.top.type){let t=this.textblockFromContext();t&&this.enterInner(t)}if(this.findPlace(t)){this.closeExtra();let e=this.top;e.applyPending(t.type),e.match&&(e.match=e.match.matchType(t.type));let n=e.activeMarks;for(let r=0;r<t.marks.length;r++)(!e.type||e.type.allowsMarkType(t.marks[r].type))&&(n=t.marks[r].addToSet(n));return e.content.push(t.mark(n)),!0}return!1}enter(t,e,n){let r=this.findPlace(t.create(e));return r&&this.enterInner(t,e,!0,n),r}enterInner(t,e=null,n=!1,r){this.closeExtra();let i=this.top;i.applyPending(t),i.match=i.match&&i.match.matchType(t);let s=_(t,r,i.options);4&i.options&&0==i.content.length&&(s|=4),this.nodes.push(new q(t,e,i.activeMarks,i.pendingMarks,n,null,s)),this.open++}closeExtra(t=!1){let e=this.nodes.length-1;if(e>this.open){for(;e>this.open;e--)this.nodes[e-1].content.push(this.nodes[e].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(t){for(let e=this.open;e>=0;e--)if(this.nodes[e]==t)return this.open=e,!0;return!1}get currentPos(){this.closeExtra();let t=0;for(let e=this.open;e>=0;e--){let n=this.nodes[e].content;for(let e=n.length-1;e>=0;e--)t+=n[e].nodeSize;e&&t++}return t}findAtPoint(t,e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==t&&this.find[n].offset==e&&(this.find[n].pos=this.currentPos)}findInside(t){if(this.find)for(let e=0;e<this.find.length;e++)null==this.find[e].pos&&1==t.nodeType&&t.contains(this.find[e].node)&&(this.find[e].pos=this.currentPos)}findAround(t,e,n){if(t!=e&&this.find)for(let r=0;r<this.find.length;r++)null==this.find[r].pos&&1==t.nodeType&&t.contains(this.find[r].node)&&e.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}findInText(t){if(this.find)for(let e=0;e<this.find.length;e++)this.find[e].node==t&&(this.find[e].pos=this.currentPos-(t.nodeValue.length-this.find[e].offset))}matchesContext(t){if(t.indexOf("|")>-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let e=t.split("/"),n=this.options.context,r=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),i=-(n?n.depth+1:0)+(r?0:1),s=(t,o)=>{for(;t>=0;t--){let l=e[t];if(""==l){if(t==e.length-1||0==t)continue;for(;o>=i;o--)if(s(t-1,o))return!0;return!1}{let t=o>0||0==o&&r?this.nodes[o].type:n&&o>=i?n.node(o-i).type:null;if(!t||t.name!=l&&-1==t.groups.indexOf(l))return!1;o--}}return!0};return s(e.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let e=t.depth;e>=0;e--){let n=t.node(e).contentMatchAt(t.indexAfter(e)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let t in this.parser.schema.nodes){let e=this.parser.schema.nodes[t];
4if(e.isTextblock&&e.defaultAttrs)return e}}addPendingMark(t){let e=function(t,e){for(let n=0;n<e.length;n++)if(t.eq(e[n]))return e[n]}(t,this.top.pendingMarks);e&&this.top.stashMarks.push(e),this.top.pendingMarks=t.addToSet(this.top.pendingMarks)}removePendingMark(t,e){for(let n=this.open;n>=0;n--){let r=this.nodes[n];if(r.pendingMarks.lastIndexOf(t)>-1)r.pendingMarks=t.removeFromSet(r.pendingMarks);else{r.activeMarks=t.removeFromSet(r.activeMarks);let e=r.popFromStashMark(t);e&&r.type&&r.type.allowsMarkType(e.type)&&(r.activeMarks=e.addToSet(r.activeMarks))}if(r==e)break}}}function Y(t){let e={};for(let n in t)e[n]=t[n];return e}class W{constructor(t,e){this.nodes=t,this.marks=e}serializeFragment(t,e={},n){n||(n=V(e).createDocumentFragment());let r=n,i=[];return t.forEach(t=>{if(i.length||t.marks.length){let n=0,s=0;for(;n<i.length&&s<t.marks.length;){let e=t.marks[s];if(!this.marks[e.type.name]){s++;continue}if(!e.eq(i[n][0])||!1===e.type.spec.spanning)break;n++,s++}for(;n<i.length;)r=i.pop()[1];for(;s<t.marks.length;){let n=t.marks[s++],o=this.serializeMark(n,t.isInline,e);o&&(i.push([n,r]),r.appendChild(o.dom),r=o.contentDOM||o.dom)}}r.appendChild(this.serializeNodeInner(t,e))}),n}serializeNodeInner(t,e){let{dom:n,contentDOM:r}=W.renderSpec(V(e),this.nodes[t.type.name](t));if(r){if(t.isLeaf)throw RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(t.content,e,r)}return n}serializeNode(t,e={}){let n=this.serializeNodeInner(t,e);for(let r=t.marks.length-1;r>=0;r--){let i=this.serializeMark(t.marks[r],t.isInline,e);i&&((i.contentDOM||i.dom).appendChild(n),n=i.dom)}return n}serializeMark(t,e,n={}){let r=this.marks[t.type.name];return r&&W.renderSpec(V(n),r(t,e))}static renderSpec(t,e,n=null){let r;if("string"==typeof e)return{dom:t.createTextNode(e)};if(null!=e.nodeType)return{dom:e};if(e.dom&&null!=e.dom.nodeType)return e;let i=e[0],s=i.indexOf(" ");s>0&&(n=i.slice(0,s),i=i.slice(s+1));let o=n?t.createElementNS(n,i):t.createElement(i),l=e[1],a=1;if(l&&"object"==typeof l&&null==l.nodeType&&!Array.isArray(l)){for(let t in a=2,l)if(null!=l[t]){let e=t.indexOf(" ");e>0?o.setAttributeNS(t.slice(0,e),t.slice(e+1),l[t]):o.setAttribute(t,l[t])}}for(let i=a;i<e.length;i++){let s=e[i];if(0===s){if(i<e.length-1||i>a)throw RangeError("Content hole must be the only child of its parent node");return{dom:o,contentDOM:o}}{let{dom:e,contentDOM:i}=W.renderSpec(t,s,n);if(o.appendChild(e),i){if(r)throw RangeError("Multiple content holes");r=i}}}return{dom:o,contentDOM:r}}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new W(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let e=U(t.nodes);return e.text||(e.text=t=>t.text),e}static marksFromSchema(t){return U(t.marks)}}function U(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function V(t){return t.document||window.document}},53833:function(t,e,n){n.d(e,{IB:function(){return o},KI:function(){return s},bw:function(){return l}});var r=n(16560),i=n(12806);function s(t,e=null){return function(n,s){let{$from:o,$to:l}=n.selection,a=o.blockRange(l),h=!1,c=a;if(!a)return!1;if(a.depth>=2&&o.node(a.depth-1).type.compatibleContent(t)&&0==a.startIndex){if(0==o.index(a.depth-1))return!1;let t=n.doc.resolve(a.start-2);c=new i.Ts(t,t,a.depth),a.endIndex<a.parent.childCount&&(a=new i.Ts(o,n.doc.resolve(l.end(a.depth)),a.depth)),h=!0}let d=(0,r.nd)(c,t,e,a);return!!d&&(s&&s((function(t,e,n,s,o){let l=i.HY.empty;for(let t=n.length-1;t>=0;t--)l=i.HY.from(n[t].type.create(n[t].attrs,l));t.step(new r.FC(e.start-(s?2:0),e.end,e.start,e.end,new i.p2(l,0,0),n.length,!0));let a=0;for(let t=0;t<n.length;t++)n[t].type==o&&(a=t+1);let h=n.length-a,c=e.start+n.length-(s?2:0),d=e.parent;for(let n=e.startIndex,i=e.endIndex,s=!0;n<i;n++,s=!1)!s&&(0,r.Ax)(t.doc,c,h)&&(t.split(c,h),c+=2*h),c+=d.child(n).nodeSize;return t})(n.tr,a,d,h,t).scrollIntoView()),!0)}}function o(t){return function(e,n){let{$from:s,$to:o}=e.selection,l=s.blockRange(o,e=>e.childCount>0&&e.firstChild.type==t);return!!l&&(!n||(s.node(l.depth-1).type==t?function(t,e,n,s){let o=t.tr,l=s.end,a=s.$to.end(s.depth);l<a&&(o.step(new r.FC(l-1,a,l,a,new i.p2(i.HY.from(n.create(null,s.parent.copy())),1,0),1,!0)),s=new i.Ts(o.doc.resolve(s.$from.pos),o.doc.resolve(a),s.depth));let h=(0,r.k9)(s);if(null==h)return!1;o.lift(s,h);let c=o.mapping.map(l,-1)-1;return(0,r.Mn)(o.doc,c)&&o.join(c),e(o.scrollIntoView()),!0}(e,n,t,l):function(t,e,n){let s=t.tr,o=n.parent;for(let t=n.end,e=n.endIndex-1,r=n.startIndex;e>r;e--)t-=o.child(e).nodeSize,s.delete(t-1,t+1);
4let l=s.doc.resolve(n.start),a=l.nodeAfter;if(s.mapping.map(n.end)!=n.start+l.nodeAfter.nodeSize)return!1;let h=0==n.startIndex,c=n.endIndex==o.childCount,d=l.node(-1),u=l.index(-1);if(!d.canReplace(u+(h?0:1),u+1,a.content.append(c?i.HY.empty:i.HY.from(o))))return!1;let p=l.pos,f=p+a.nodeSize;return s.step(new r.FC(p-(h?1:0),f+(c?1:0),p+1,f-1,new i.p2((h?i.HY.empty:i.HY.from(o.copy(i.HY.empty))).append(c?i.HY.empty:i.HY.from(o.copy(i.HY.empty))),h?0:1,c?0:1),h?0:1)),e(s.scrollIntoView()),!0}(e,n,l)))}}function l(t){return function(e,n){let{$from:s,$to:o}=e.selection,l=s.blockRange(o,e=>e.childCount>0&&e.firstChild.type==t);if(!l)return!1;let a=l.startIndex;if(0==a)return!1;let h=l.parent,c=h.child(a-1);if(c.type!=t)return!1;if(n){let s=c.lastChild&&c.lastChild.type==h.type,o=i.HY.from(s?t.create():null),a=new i.p2(i.HY.from(t.create(null,i.HY.from(h.type.create(null,o)))),s?3:1,0),d=l.start,u=l.end;n(e.tr.step(new r.FC(d-(s?3:1),u,d,u,a,1,!0)).scrollIntoView())}return!0}}},2376:function(t,e,n){n.d(e,{Bs:function(){return c},C1:function(){return f},H$:function(){return j},Sy:function(){return S},Y1:function(){return o},qv:function(){return u},yy:function(){return M}});var r=n(12806),i=n(16560);let s=Object.create(null);class o{constructor(t,e,n){this.$anchor=t,this.$head=e,this.ranges=n||[new l(t.min(e),t.max(e))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let e=0;e<t.length;e++)if(t[e].$from.pos!=t[e].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(t,e=r.p2.empty){let n=e.content.lastChild,i=null;for(let t=0;t<e.openEnd;t++)i=n,n=n.lastChild;let s=t.steps.length,o=this.ranges;for(let l=0;l<o.length;l++){let{$from:a,$to:h}=o[l],c=t.mapping.slice(s);t.replaceRange(c.map(a.pos),c.map(h.pos),l?r.p2.empty:e),0==l&&y(t,s,(n?n.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(t,e){let n=t.steps.length,r=this.ranges;for(let i=0;i<r.length;i++){let{$from:s,$to:o}=r[i],l=t.mapping.slice(n),a=l.map(s.pos),h=l.map(o.pos);i?t.deleteRange(a,h):(t.replaceRangeWith(a,h,e),y(t,n,e.isInline?-1:1))}}static findFrom(t,e,n=!1){let r=t.parent.inlineContent?new c(t):g(t.node(0),t.parent,t.pos,t.index(),e,n);if(r)return r;for(let r=t.depth-1;r>=0;r--){let i=e<0?g(t.node(0),t.node(r),t.before(r+1),t.index(r),e,n):g(t.node(0),t.node(r),t.after(r+1),t.index(r)+1,e,n);if(i)return i}return null}static near(t,e=1){return this.findFrom(t,e)||this.findFrom(t,-e)||new f(t.node(0))}static atStart(t){return g(t,t,0,0,1)||new f(t)}static atEnd(t){return g(t,t,t.content.size,t.childCount,-1)||new f(t)}static fromJSON(t,e){if(!e||!e.type)throw RangeError("Invalid input for Selection.fromJSON");let n=s[e.type];if(!n)throw RangeError(`No selection type ${e.type} defined`);return n.fromJSON(t,e)}static jsonID(t,e){if(t in s)throw RangeError("Duplicate use of selection JSON ID "+t);return s[t]=e,e.prototype.jsonID=t,e}getBookmark(){return c.between(this.$anchor,this.$head).getBookmark()}}o.prototype.visible=!0;class l{constructor(t,e){this.$from=t,this.$to=e}}let a=!1;function h(t){a||t.parent.inlineContent||(a=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class c extends o{constructor(t,e=t){h(t),h(e),super(t,e)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,e){let n=t.resolve(e.map(this.head));if(!n.parent.inlineContent)return o.near(n);let r=t.resolve(e.map(this.anchor));return new c(r.parent.inlineContent?r:n,n)}replace(t,e=r.p2.empty){if(super.replace(t,e),e==r.p2.empty){let e=this.$from.marksAcross(this.$to);e&&t.ensureMarks(e)}}eq(t){return t instanceof c&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new d(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,e){if("number"!=typeof e.anchor||"number"!=typeof e.head)throw RangeError("Invalid input for TextSelection.fromJSON");return new c(t.resolve(e.anchor),t.resolve(e.head))}static create(t,e,n=e){let r=t.resolve(e);return new this(r,n==e?r:t.resolve(n))}static between(t,e,n){let r=t.pos-e.pos;if((!n||r)&&(n=r>=0?1:-1),!e.parent.inlineContent){let t=o.findFrom(e,n,!0)||o.findFrom(e,-n,!0);if(!t)return o.near(e,n);e=t.$head}return t.parent.inlineContent||(0==r?t=e:(t=(o.findFrom(t,-n,!0)||o.findFrom(t,n,!0)).$anchor).pos<e.pos==r<0||(t=e)),new c(t,e)}}o.jsonID("text",c);class d{constructor(t,e){this.anchor=t,this.head=e}map(t){return new d(t.map(this.anchor),t.map(this.head))}resolve(t){return c.between(t.resolve(this.anchor),t.resolve(this.head))}}class u extends o{constructor(t){let e=t.nodeAfter;super(t,t.node(0).resolve(t.pos+e.nodeSize)),this.node=e}map(t,e){let{deleted:n,pos:r}=e.mapResult(this.anchor),i=t.resolve(r);return n?o.near(i):new u(i)}content(){return new r.p2(r.HY.from(this.node),0,0)}eq(t){return t instanceof u&&t.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new p(this.anchor)}static fromJSON(t,e){if("number"!=typeof e.anchor)throw RangeError("Invalid input for NodeSelection.fromJSON");return new u(t.resolve(e.anchor))}static create(t,e){return new u(t.resolve(e))}static isSelectable(t){return!t.isText&&!1!==t.type.spec.selectable}}u.prototype.visible=!1,o.jsonID("node",u);class p{constructor(t){this.anchor=t}map(t){let{deleted:e,pos:n}=t.mapResult(this.anchor);return e?new d(n,n):new p(n)}resolve(t){let e=t.resolve(this.anchor),n=e.nodeAfter;return n&&u.isSelectable(n)?new u(e):o.near(e)}}class f extends o{constructor(t){super(t.resolve(0),t.resolve(t.content.size))}
vendor: 6,153 bytes, line 4
4replace(t,e=r.p2.empty){if(e==r.p2.empty){t.delete(0,t.doc.content.size);let e=o.atStart(t.doc);e.eq(t.selection)||t.setSelection(e)}else super.replace(t,e)}toJSON(){return{type:"all"}}static fromJSON(t){return new f(t)}map(t){return new f(t)}eq(t){return t instanceof f}getBookmark(){return m}}o.jsonID("all",f);let m={map(){return this},resolve:t=>new f(t)};function g(t,e,n,r,i,s=!1){if(e.inlineContent)return c.create(t,n);for(let o=r-(i>0?0:1);i>0?o<e.childCount:o>=0;o+=i){let r=e.child(o);if(r.isAtom){if(!s&&u.isSelectable(r))return u.create(t,n-(i<0?r.nodeSize:0))}else{let e=g(t,r,n+i,i<0?r.childCount:0,i,s);if(e)return e}n+=r.nodeSize*i}return null}function y(t,e,n){let r,s=t.steps.length-1;if(s<e)return;let l=t.steps[s];(l instanceof i.Pu||l instanceof i.FC)&&(t.mapping.maps[s].forEach((t,e,n,i)=>{null==r&&(r=i)}),t.setSelection(o.near(t.doc.resolve(r),n)))}class x extends i.wx{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(t){if(t.$from.doc!=this.doc)throw RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=t,this.curSelectionFor=this.steps.length,this.updated=(1|this.updated)&-3,this.storedMarks=null,this}get selectionSet(){return(1&this.updated)>0}setStoredMarks(t){return this.storedMarks=t,this.updated|=2,this}ensureMarks(t){return r.vc.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(2&this.updated)>0}addStep(t,e){super.addStep(t,e),this.updated=-3&this.updated,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,e=!0){let n=this.selection;return e&&(t=t.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||r.vc.none))),n.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,e,n){let r=this.doc.type.schema;if(null==e)return t?this.replaceSelectionWith(r.text(t),!0):this.deleteSelection();{if(null==n&&(n=e),n=null==n?e:n,!t)return this.deleteRange(e,n);let i=this.storedMarks;if(!i){let t=this.doc.resolve(e);i=n==e?t.marks():t.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(e,n,r.text(t,i)),this.selection.empty||this.setSelection(o.near(this.selection.$to)),this}}setMeta(t,e){return this.meta["string"==typeof t?t:t.key]=e,this}getMeta(t){return this.meta["string"==typeof t?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=4,this}get scrolledIntoView(){return(4&this.updated)>0}}function k(t,e){return e&&t?t.bind(e):t}class v{constructor(t,e,n){this.name=t,this.init=k(e.init,n),this.apply=k(e.apply,n)}}let b=[new v("doc",{init:t=>t.doc||t.schema.topNodeType.createAndFill(),apply:t=>t.doc}),new v("selection",{init:(t,e)=>t.selection||o.atStart(e.doc),apply:t=>t.selection}),new v("storedMarks",{init:t=>t.storedMarks||null,apply:(t,e,n,r)=>r.selection.$cursor?t.storedMarks:null}),new v("scrollToSelection",{init:()=>0,apply:(t,e)=>t.scrolledIntoView?e+1:e})];class w{constructor(t,e){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=b.slice(),e&&e.forEach(t=>{if(this.pluginsByKey[t.key])throw RangeError("Adding different instances of a keyed plugin ("+t.key+")");this.plugins.push(t),this.pluginsByKey[t.key]=t,t.spec.state&&this.fields.push(new v(t.key,t.spec.state,t))})}}class M{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(t){return this.applyTransaction(t).state}filterTransaction(t,e=-1){for(let n=0;n<this.config.plugins.length;n++)if(n!=e){let e=this.config.plugins[n];if(e.spec.filterTransaction&&!e.spec.filterTransaction.call(e,t,this))return!1}return!0}applyTransaction(t){if(!this.filterTransaction(t))return{state:this,transactions:[]};let e=[t],n=this.applyInner(t),r=null;for(;;){let i=!1;for(let s=0;s<this.config.plugins.length;s++){let o=this.config.plugins[s];if(o.spec.appendTransaction){let l=r?r[s].n:0,a=r?r[s].state:this,h=l<e.length&&o.spec.appendTransaction.call(o,l?e.slice(l):e,a,n);if(h&&n.filterTransaction(h,s)){if(h.setMeta("appendedTransaction",t),!r){r=[];for(let t=0;t<this.config.plugins.length;t++)r.push(t<s?{state:n,n:e.length}:{state:this,n:0})}e.push(h),n=n.applyInner(h),i=!0}r&&(r[s]={state:n,n:e.length})}}if(!i)return{state:n,transactions:e}}}applyInner(t){if(!t.before.eq(this.doc))throw RangeError("Applying a mismatched transaction");let e=new M(this.config),n=this.config.fields;for(let r=0;r<n.length;r++){let i=n[r];e[i.name]=i.apply(t,this[i.name],this,e)}return e}get tr(){return new x(this)}static create(t){let e=new w(t.doc?t.doc.type.schema:t.schema,t.plugins),n=new M(e);for(let r=0;r<e.fields.length;r++)n[e.fields[r].name]=e.fields[r].init(t,n);return n}reconfigure(t){let e=new w(this.schema,t.plugins),n=e.fields,r=new M(e);for(let e=0;e<n.length;e++){let i=n[e].name;r[i]=this.hasOwnProperty(i)?this[i]:n[e].init(t,r)}return r}toJSON(t){let e={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(e.storedMarks=this.storedMarks.map(t=>t.toJSON())),t&&"object"==typeof t)for(let n in t){if("doc"==n||"selection"==n)throw RangeError("The JSON fields `doc` and `selection` are reserved");let r=t[n],i=r.spec.state;i&&i.toJSON&&(e[n]=i.toJSON.call(r,this[r.key]))}return e}static fromJSON(t,e,n){if(!e)throw RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw RangeError("Required config field 'schema' missing");let i=new w(t.schema,t.plugins),s=new M(i);return i.fields.forEach(i=>
4{if("doc"==i.name)s.doc=r.NB.fromJSON(t.schema,e.doc);else if("selection"==i.name)s.selection=o.fromJSON(s.doc,e.selection);else if("storedMarks"==i.name)e.storedMarks&&(s.storedMarks=e.storedMarks.map(t.schema.markFromJSON));else{if(n)for(let r in n){let o=n[r],l=o.spec.state;if(o.key==i.name&&l&&l.fromJSON&&Object.prototype.hasOwnProperty.call(e,r)){s[i.name]=l.fromJSON.call(o,t,e[r],s);return}}s[i.name]=i.init(t,s)}}),s}}class S{constructor(t){this.spec=t,this.props={},t.props&&function t(e,n,r){for(let i in e){let s=e[i];s instanceof Function?s=s.bind(n):"handleDOMEvents"==i&&(s=t(s,n,{})),r[i]=s}return r}(t.props,this,this.props),this.key=t.key?t.key.key:T("plugin")}getState(t){return t[this.key]}}let C=Object.create(null);function T(t){return t in C?t+"$"+ ++C[t]:(C[t]=0,t+"$")}class j{constructor(t="key"){this.key=T(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}},16560:function(t,e,n){n.d(e,{Ax:function(){return b},FC:function(){return g},GJ:function(){return S},Mn:function(){return w},Pu:function(){return m},dR:function(){return T},k9:function(){return x},nd:function(){return k},nj:function(){return C},vs:function(){return o},wx:function(){return P}});var r=n(12806);class i{constructor(t,e,n){this.pos=t,this.delInfo=e,this.recover=n}get deleted(){return(8&this.delInfo)>0}get deletedBefore(){return(5&this.delInfo)>0}get deletedAfter(){return(6&this.delInfo)>0}get deletedAcross(){return(4&this.delInfo)>0}}class s{constructor(t,e=!1){if(this.ranges=t,this.inverted=e,!t.length&&s.empty)return s.empty}recover(t){let e=0,n=65535&t;if(!this.inverted)for(let t=0;t<n;t++)e+=this.ranges[3*t+2]-this.ranges[3*t+1];return this.ranges[3*n]+e+(t-(65535&t))/65536}mapResult(t,e=1){return this._map(t,e,!1)}map(t,e=1){return this._map(t,e,!0)}_map(t,e,n){let r=0,s=this.inverted?2:1,o=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?r:0);if(a>t)break;let h=this.ranges[l+s],c=this.ranges[l+o],d=a+h;if(t<=d){let s=h?t==a?-1:t==d?1:e:e,o=a+r+(s<0?0:c);if(n)return o;let u=t==(e<0?a:d)?null:l/3+(t-a)*65536,p=t==a?2:t==d?1:4;return(e<0?t!=a:t!=d)&&(p|=8),new i(o,p,u)}r+=c-h}return n?t+r:new i(t+r,0,null)}touches(t,e){let n=0,r=65535&e,i=this.inverted?2:1,s=this.inverted?1:2;for(let e=0;e<this.ranges.length;e+=3){let o=this.ranges[e]-(this.inverted?n:0);if(o>t)break;let l=this.ranges[e+i];if(t<=o+l&&e==3*r)return!0;n+=this.ranges[e+s]-l}return!1}forEach(t){let e=this.inverted?2:1,n=this.inverted?1:2;for(let r=0,i=0;r<this.ranges.length;r+=3){let s=this.ranges[r],o=s-(this.inverted?i:0),l=s+(this.inverted?0:i),a=this.ranges[r+e],h=this.ranges[r+n];t(o,o+a,l,l+h),i+=h-a}}invert(){return new s(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return 0==t?s.empty:new s(t<0?[0,-t,0]:[0,0,t])}}s.empty=new s([]);class o{constructor(t=[],e,n=0,r=t.length){this.maps=t,this.mirror=e,this.from=n,this.to=r}slice(t=0,e=this.maps.length){return new o(this.maps,this.mirror,t,e)}copy(){return new o(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(t,e){this.to=this.maps.push(t),null!=e&&this.setMirror(this.maps.length-1,e)}appendMapping(t){for(let e=0,n=this.maps.length;e<t.maps.length;e++){let r=t.getMirror(e);this.appendMap(t.maps[e],null!=r&&r<e?n+r:void 0)}}getMirror(t){if(this.mirror){for(let e=0;e<this.mirror.length;e++)if(this.mirror[e]==t)return this.mirror[e+(e%2?-1:1)]}}setMirror(t,e){this.mirror||(this.mirror=[]),this.mirror.push(t,e)}appendMappingInverted(t){for(let e=t.maps.length-1,n=this.maps.length+t.maps.length;e>=0;e--){let r=t.getMirror(e);this.appendMap(t.maps[e].invert(),null!=r&&r>e?n-r-1:void 0)}}invert(){let t=new o;return t.appendMappingInverted(this),t}map(t,e=1){if(this.mirror)return this._map(t,e,!0);for(let n=this.from;n<this.to;n++)t=this.maps[n].map(t,e);return t}mapResult(t,e=1){return this._map(t,e,!1)}_map(t,e,n){let r=0;for(let n=this.from;n<this.to;n++){let i=this.maps[n].mapResult(t,e);if(null!=i.recover){let e=this.getMirror(n);if(null!=e&&e>n&&e<this.to){n=e,t=this.maps[e].recover(i.recover);continue}}r|=i.delInfo,t=i.pos}return n?t:new i(t,r,null)}}let l=Object.create(null);class a{getMap(){return s.empty}merge(t){return null}static fromJSON(t,e){if(!e||!e.stepType)throw RangeError("Invalid input for Step.fromJSON");let n=l[e.stepType];if(!n)throw RangeError(`No step type ${e.stepType} defined`);return n.fromJSON(t,e)}static jsonID(t,e){if(t in l)throw RangeError("Duplicate use of step JSON ID "+t);return l[t]=e,e.prototype.jsonID=t,e}}class h{constructor(t,e){this.doc=t,this.failed=e}static ok(t){return new h(t,null)}static fail(t){return new h(null,t)}
vendor: 9,197 bytes, line 4
4static fromReplace(t,e,n,i){try{return h.ok(t.replace(e,n,i))}catch(t){if(t instanceof r.e4)return h.fail(t.message);throw t}}}function c(t,e,n){let i=[];for(let r=0;r<t.childCount;r++){let s=t.child(r);s.content.size&&(s=s.copy(c(s.content,e,s))),s.isInline&&(s=e(s,n,r)),i.push(s)}return r.HY.fromArray(i)}class d extends a{constructor(t,e,n){super(),this.from=t,this.to=e,this.mark=n}apply(t){let e=t.slice(this.from,this.to),n=t.resolve(this.from),i=n.node(n.sharedDepth(this.to)),s=new r.p2(c(e.content,(t,e)=>t.isAtom&&e.type.allowsMarkType(this.mark.type)?t.mark(this.mark.addToSet(t.marks)):t,i),e.openStart,e.openEnd);return h.fromReplace(t,this.from,this.to,s)}invert(){return new u(this.from,this.to,this.mark)}map(t){let e=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return e.deleted&&n.deleted||e.pos>=n.pos?null:new d(e.pos,n.pos,this.mark)}merge(t){return t instanceof d&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new d(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,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw RangeError("Invalid input for AddMarkStep.fromJSON");return new d(e.from,e.to,t.markFromJSON(e.mark))}}a.jsonID("addMark",d);class u extends a{constructor(t,e,n){super(),this.from=t,this.to=e,this.mark=n}apply(t){let e=t.slice(this.from,this.to),n=new r.p2(c(e.content,t=>t.mark(this.mark.removeFromSet(t.marks)),t),e.openStart,e.openEnd);return h.fromReplace(t,this.from,this.to,n)}invert(){return new d(this.from,this.to,this.mark)}map(t){let e=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return e.deleted&&n.deleted||e.pos>=n.pos?null:new u(e.pos,n.pos,this.mark)}merge(t){return t instanceof u&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new u(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,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw RangeError("Invalid input for RemoveMarkStep.fromJSON");return new u(e.from,e.to,t.markFromJSON(e.mark))}}a.jsonID("removeMark",u);class p extends a{constructor(t,e){super(),this.pos=t,this.mark=e}apply(t){let e=t.nodeAt(this.pos);if(!e)return h.fail("No node at mark step's position");let n=e.type.create(e.attrs,null,this.mark.addToSet(e.marks));return h.fromReplace(t,this.pos,this.pos+1,new r.p2(r.HY.from(n),0,e.isLeaf?0:1))}invert(t){let e=t.nodeAt(this.pos);if(e){let t=this.mark.addToSet(e.marks);if(t.length==e.marks.length){for(let n=0;n<e.marks.length;n++)if(!e.marks[n].isInSet(t))return new p(this.pos,e.marks[n]);return new p(this.pos,this.mark)}}return new f(this.pos,this.mark)}map(t){let e=t.mapResult(this.pos,1);return e.deletedAfter?null:new p(e.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,e){if("number"!=typeof e.pos)throw RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new p(e.pos,t.markFromJSON(e.mark))}}a.jsonID("addNodeMark",p);class f extends a{constructor(t,e){super(),this.pos=t,this.mark=e}apply(t){let e=t.nodeAt(this.pos);if(!e)return h.fail("No node at mark step's position");let n=e.type.create(e.attrs,null,this.mark.removeFromSet(e.marks));return h.fromReplace(t,this.pos,this.pos+1,new r.p2(r.HY.from(n),0,e.isLeaf?0:1))}invert(t){let e=t.nodeAt(this.pos);return e&&this.mark.isInSet(e.marks)?new p(this.pos,this.mark):this}map(t){let e=t.mapResult(this.pos,1);return e.deletedAfter?null:new f(e.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,e){if("number"!=typeof e.pos)throw RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new f(e.pos,t.markFromJSON(e.mark))}}a.jsonID("removeNodeMark",f);class m extends a{constructor(t,e,n,r=!1){super(),this.from=t,this.to=e,this.slice=n,this.structure=r}apply(t){return this.structure&&y(t,this.from,this.to)?h.fail("Structure replace would overwrite content"):h.fromReplace(t,this.from,this.to,this.slice)}getMap(){return new s([this.from,this.to-this.from,this.slice.size])}invert(t){return new m(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let e=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return e.deletedAcross&&n.deletedAcross?null:new m(e.pos,Math.max(e.pos,n.pos),this.slice)}merge(t){if(!(t instanceof m)||t.structure||this.structure)return null;if(this.from+this.slice.size!=t.from||this.slice.openEnd||t.slice.openStart){if(t.to!=this.from||this.slice.openStart||t.slice.openEnd)return null;{let e=this.slice.size+t.slice.size==0?r.p2.empty:new r.p2(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new m(t.from,this.to,e,this.structure)}}{let e=this.slice.size+t.slice.size==0?r.p2.empty:new r.p2(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new m(this.from,this.to+(t.to-t.from),e,this.structure)}}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,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw RangeError("Invalid input for ReplaceStep.fromJSON");return new m(e.from,e.to,r.p2.fromJSON(t,e.slice),!!e.structure)}}a.jsonID("replace",m);class g extends a{constructor(t,e,n,r,i,s,o=!1){super(),this.from=t,this.to=e,this.gapFrom=n,this.gapTo=r,this.slice=i,this.insert=s,this.structure=o}apply(t){if(this.structure&&(y(t,this.from,this.gapFrom)||y(t,this.gapTo,this.to)))return h.fail("Structure gap-replace would overwrite content");let e=t.slice(this.gapFrom,this.gapTo);if(e.openStart||e.openEnd)return h.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,e.content);return n?h.fromReplace(t,this.from,this.to,n):h.fail("Content does not fit in gap")}getMap(){return new s([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let e=this.gapTo-this.gapFrom;return new g(this.from,this.from+this.slice.size+e,this.from+this.insert,this.from+this.insert+e,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let e=t.mapResult(this.from,1),n=t.mapResult(this.to,-1),r=t.map(this.gapFrom,-1),i=t.map(this.gapTo,1);return e.deletedAcross&&n.deletedAcross||r<e.pos||i>n.pos?null:new g(e.pos,n.pos,r,i,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,e){if("number"!=typeof e.from||"number"!=typeof e.to||"number"!=typeof e.gapFrom||"number"!=typeof e.gapTo||"number"!=typeof e.insert)throw RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new g(e.from,e.to,e.gapFrom,e.gapTo,r.p2.fromJSON(t,e.slice),e.insert,!!e.structure)}}function y(t,e,n){let r=t.resolve(e),i=n-e,s=r.depth;for(;i>0&&s>0&&r.indexAfter(s)==r.node(s).childCount;)s--,i--;if(i>0){let t=r.node(s).maybeChild(r.indexAfter(s));for(;i>0;){if(!t||t.isLeaf)return!0;t=t.firstChild,i--}}return!1}function x(t){let e=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let n=t.depth;;--n){let r=t.$from.node(n),i=t.$from.index(n),s=t.$to.indexAfter(n);if(n<t.depth&&r.canReplace(i,s,e))return n;if(0==n||r.type.spec.isolating||!((0==i||r.canReplace(i,r.childCount))&&(s==r.childCount||r.canReplace(0,s))))break}return null}function k(t,e,n=null,r=t){let i=function(t,e){let{parent:n,startIndex:r,endIndex:i}=t,s=n.contentMatchAt(r).findWrapping(e);if(!s)return null;let o=s.length?s[0]:e;return n.canReplaceWith(r,i,o)?s:null}(t,e),s=i&&function(t,e){let{parent:n,startIndex:r,endIndex:i}=t,s=n.child(r),o=e.contentMatch.findWrapping(s.type);if(!o)return null;let l=(o.length?o[o.length-1]:e).contentMatch;for(let t=r;l&&t<i;t++)l=l.matchType(n.child(t).type);return l&&l.validEnd?o:null}(r,e);return s?i.map(v).concat({type:e,attrs:n}).concat(s.map(v)):null}function v(t){return{type:t,attrs:null}}function b(t,e,n=1,r){let i=t.resolve(e),s=i.depth-n,o=r&&r[r.length-1]||i.parent;if(s<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!o.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let t=i.depth-1,e=n-2;t>s;t--,e--){let n=i.node(t),s=i.index(t);if(n.type.spec.isolating)return!1;let o=n.content.cutByIndex(s,n.childCount),l=r&&r[e+1];l&&(o=o.replaceChild(0,l.type.create(l.attrs)));let a=r&&r[e]||n;if(!n.canReplace(s+1,n.childCount)||!a.type.validContent(o))return!1}let l=i.indexAfter(s),a=r&&r[0];return i.node(s).canReplaceWith(l,l,a?a.type:i.node(s+1).type)}function w(t,e){let n=t.resolve(e),r=n.index();return M(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function M(t,e){return!!(t&&e&&!t.isLeaf&&t.canAppend(e))}function S(t,e,n=-1){let r=t.resolve(e);for(let t=r.depth;;t--){let i,s,o=r.index(t);if(t==r.depth?(i=r.nodeBefore,s=r.nodeAfter):n>
40?(i=r.node(t+1),o++,s=r.node(t).maybeChild(o)):(i=r.node(t).maybeChild(o-1),s=r.node(t+1)),i&&!i.isTextblock&&M(i,s)&&r.node(t).canReplace(o,o+1))return e;if(0==t)break;e=n<0?r.before(t):r.after(t)}}function C(t,e,n){let r=t.resolve(e);if(!n.content.size)return e;let i=n.content;for(let t=0;t<n.openStart;t++)i=i.firstChild.content;for(let t=1;t<=(0==n.openStart&&n.size?2:1);t++)for(let e=r.depth;e>=0;e--){let n=e==r.depth?0:r.pos<=(r.start(e+1)+r.end(e+1))/2?-1:1,s=r.index(e)+(n>0?1:0),o=r.node(e),l=!1;if(1==t)l=o.canReplace(s,s,i);else{let t=o.contentMatchAt(s).findWrapping(i.firstChild.type);l=t&&o.canReplaceWith(s,s,t[0])}if(l)return 0==n?r.pos:n<0?r.before(e+1):r.after(e+1)}return null}function T(t,e,n=e,i=r.p2.empty){if(e==n&&!i.size)return null;let s=t.resolve(e),o=t.resolve(n);return j(s,o,i)?new m(e,n,i):new A(s,o,i).fit()}function j(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}a.jsonID("replaceAround",g);class A{constructor(t,e,n){this.$from=t,this.$to=e,this.unplaced=n,this.frontier=[],this.placed=r.HY.empty;for(let e=0;e<=t.depth;e++){let n=t.node(e);this.frontier.push({type:n.type,match:n.contentMatchAt(t.indexAfter(e))})}for(let e=t.depth;e>0;e--)this.placed=r.HY.from(t.node(e).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let t=this.findFittable();t?this.placeNodes(t):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),e=this.placed.size-this.depth-this.$from.depth,n=this.$from,i=this.close(t<0?this.$to:n.doc.resolve(t));if(!i)return null;let s=this.placed,o=n.depth,l=i.depth;for(;o&&l&&1==s.childCount;)s=s.firstChild.content,o--,l--;let a=new r.p2(s,o,l);return t>-1?new g(n.pos,t,this.$to.pos,this.$to.end(),a,e):a.size||n.pos!=this.$to.pos?new m(n.pos,i.pos,a):null}findFittable(){let t=this.unplaced.openStart;for(let e=this.unplaced.content,n=0,r=this.unplaced.openEnd;n<t;n++){let i=e.firstChild;if(e.childCount>1&&(r=0),i.type.spec.isolating&&r<=n){t=n;break}e=i.content}for(let e=1;e<=2;e++)for(let n=1==e?t:this.unplaced.openStart;n>=0;n--){let t=null,i=(n?(t=O(this.unplaced.content,n-1).firstChild).content:this.unplaced.content).firstChild;for(let s=this.depth;s>=0;s--){let{type:o,match:l}=this.frontier[s],a,h=null;if(1==e&&(i?l.matchType(i.type)||(h=l.fillBefore(r.HY.from(i),!1)):t&&o.compatibleContent(t.type)))return{sliceDepth:n,frontierDepth:s,parent:t,inject:h};if(2==e&&i&&(a=l.findWrapping(i.type)))return{sliceDepth:n,frontierDepth:s,parent:t,wrap:a};if(t&&l.matchType(t.type))break}}}openMore(){let{content:t,openStart:e,openEnd:n}=this.unplaced,i=O(t,e);return!!i.childCount&&!i.firstChild.isLeaf&&(this.unplaced=new r.p2(t,e+1,Math.max(n,i.size+e>=t.size-n?e+1:0)),!0)}dropNode(){let{content:t,openStart:e,openEnd:n}=this.unplaced,i=O(t,e);if(i.childCount<=1&&e>0){let s=t.size-e<=e+i.size;this.unplaced=new r.p2(E(t,e-1,1),e-1,s?e-1:n)}else this.unplaced=new r.p2(E(t,e,1),e,n)}placeNodes({sliceDepth:t,frontierDepth:e,parent:n,inject:i,wrap:s}){for(;this.depth>e;)this.closeFrontierNode();if(s)for(let t=0;t<s.length;t++)this.openFrontierNode(s[t]);let o=this.unplaced,l=n?n.content:o.content,a=o.openStart-t,h=0,c=[],{match:d,type:u}=this.frontier[e];if(i){for(let t=0;t<i.childCount;t++)c.push(i.child(t));d=d.matchFragment(i)}let p=l.size+t-(o.content.size-o.openEnd);for(;h<l.childCount;){let t=l.child(h),e=d.matchType(t.type);if(!e)break;(++h>1||0==a||t.content.size)&&(d=e,c.push(function t(e,n,i){if(n<=0)return e;let s=e.content;return n>1&&(s=s.replaceChild(0,t(s.firstChild,n-1,1==s.childCount?i-1:0))),n>0&&(s=e.type.contentMatch.fillBefore(s).append(s),i<=0&&(s=s.append(e.type.contentMatch.matchFragment(s).fillBefore(r.HY.empty,!0)))),e.copy(s)}(t.mark(u.allowedMarks(t.marks)),1==h?a:0,h==l.childCount?p:-1)))}let f=h==l.childCount;f||(p=-1),this.placed=L(this.placed,e,r.HY.from(c)),this.frontier[e].match=d,f&&p<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let t=0,e=l;t<p;t++){let t=e.lastChild;this.frontier.push({type:t.type,match:t.contentMatchAt(t.childCount)}),e=t.content}this.unplaced=f?0==t?r.p2.empty:new r.p2(E(o.content,t-1,1),t-1,p<0?o.openEnd:t-1):new r.p2(E(o.content,t,h),o.openStart,o.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return -1;let t=this.frontier[this.depth],e;if(!t.type.isTextblock||!R(this.$to,this.$to.depth,t.type,t.match,!1)||this.$to.depth==this.depth&&(e=this.findCloseLevel(this.$to))&&e.depth==this.depth)return -1;let{depth:n}=this.$to,r=this.$to.after(n);for(;n>1&&r==this.$to.end(--n);)++r;return r}findCloseLevel(t){e:for(let e=Math.min(this.depth,t.depth);e>=0;e--){let{match:n,type:r}=this.frontier[e],i=e<t.depth&&t.end(e+1)==t.pos+(t.depth-(e+1)),s=R(t,e,r,n,i);if(s){for(let n=e-1;n>=0;n--){let{match:e,type:r}=this.frontier[n],i=R(t,n,r,e,!0);if(!i||i.childCount)continue e}return{depth:e,fit:s,move:i?t.doc.resolve(t.after(e+1)):t}}}}close(t){let e=this.findCloseLevel(t);if(!e)return null;for(;this.depth>e.depth;)this.closeFrontierNode();e.fit.childCount&&(this.placed=L(this.placed,e.depth,e.fit)),t=e.move;for(let n=e.depth+1;n<=t.depth;
4n++){let e=t.node(n),r=e.type.contentMatch.fillBefore(e.content,!0,t.index(n));this.openFrontierNode(e.type,e.attrs,r)}return t}openFrontierNode(t,e=null,n){let i=this.frontier[this.depth];i.match=i.match.matchType(t),this.placed=L(this.placed,this.depth,r.HY.from(t.create(e,n))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(r.HY.empty,!0);t.childCount&&(this.placed=L(this.placed,this.frontier.length,t))}}function E(t,e,n){return 0==e?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(E(t.firstChild.content,e-1,n)))}function L(t,e,n){return 0==e?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(L(t.lastChild.content,e-1,n)))}function O(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function R(t,e,n,r,i){let s=t.node(e),o=i?t.indexAfter(e):t.index(e);if(o==s.childCount&&!n.compatibleContent(s.type))return null;let l=r.fillBefore(s.content,!0,o);return l&&!function(t,e,n){for(let r=n;r<e.childCount;r++)if(!t.allowsMarks(e.child(r).marks))return!0;return!1}(n,s.content,o)?l:null}function I(t,e){let n=[],r=Math.min(t.depth,e.depth);for(let i=r;i>=0;i--){let r=t.start(i);if(r<t.pos-(t.depth-i)||e.end(i)>e.pos+(e.depth-i)||t.node(i).type.spec.isolating||e.node(i).type.spec.isolating)break;(r==e.start(i)||i==t.depth&&i==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&i&&e.start(i-1)==r-1)&&n.push(i)}return n}class N extends a{constructor(t,e,n){super(),this.pos=t,this.attr=e,this.value=n}apply(t){let e=t.nodeAt(this.pos);if(!e)return h.fail("No node at attribute step's position");let n=Object.create(null);for(let t in e.attrs)n[t]=e.attrs[t];n[this.attr]=this.value;let i=e.type.create(n,null,e.marks);return h.fromReplace(t,this.pos,this.pos+1,new r.p2(r.HY.from(i),0,e.isLeaf?0:1))}getMap(){return s.empty}invert(t){return new N(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let e=t.mapResult(this.pos,1);return e.deletedAfter?null:new N(e.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,e){if("number"!=typeof e.pos||"string"!=typeof e.attr)throw RangeError("Invalid input for AttrStep.fromJSON");return new N(e.pos,e.attr,e.value)}}a.jsonID("attr",N);class H extends a{constructor(t,e){super(),this.attr=t,this.value=e}apply(t){let e=Object.create(null);for(let n in t.attrs)e[n]=t.attrs[n];e[this.attr]=this.value;let n=t.type.create(e,t.content,t.marks);return h.ok(n)}getMap(){return s.empty}invert(t){return new H(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,e){if("string"!=typeof e.attr)throw RangeError("Invalid input for DocAttrStep.fromJSON");return new H(e.attr,e.value)}}a.jsonID("docAttr",H);let z=class extends Error{};(z=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n}).prototype=Object.create(Error.prototype),z.prototype.constructor=z,z.prototype.name="TransformError";class P{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new o}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let e=this.maybeStep(t);if(e.failed)throw new z(e.failed);return this}maybeStep(t){let e=t.apply(this.doc);return e.failed||this.addStep(t,e.doc),e}get docChanged(){return this.steps.length>0}addStep(t,e){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=e}replace(t,e=t,n=r.p2.empty){let i=T(this.doc,t,e,n);return i&&this.step(i),this}replaceWith(t,e,n){return this.replace(t,e,new r.p2(r.HY.from(n),0,0))}delete(t,e){return this.replace(t,e,r.p2.empty)}insert(t,e){return this.replaceWith(t,t,e)}replaceRange(t,e,n){return!function(t,e,n,i){if(!i.size)return t.deleteRange(e,n);let s=t.doc.resolve(e),o=t.doc.resolve(n);if(j(s,o,i))return t.step(new m(e,n,i));let l=I(s,t.doc.resolve(n));0==l[l.length-1]&&l.pop();let a=-(s.depth+1);l.unshift(a);for(let t=s.depth,e=s.pos-1;t>0;t--,e--){let n=s.node(t).type.spec;if(n.defining||n.definingAsContext||n.isolating)break;l.indexOf(t)>-1?a=t:s.before(t)==e&&l.splice(1,0,-t)}let h=l.indexOf(a),c=[],d=i.openStart;for(let t=i.content,e=0;;e++){let n=t.firstChild;if(c.push(n),e==i.openStart)break;t=n.content}for(let t=d-1;t>=0;t--){var u;let e=c[t],n=(u=e.type).spec.defining||u.spec.definingForContent;if(n&&!e.sameMarkup(s.node(Math.abs(a)-1)))d=t;else if(n||!e.type.isTextblock)break}for(let e=i.openStart;e>=0;e--){let a=(e+d+1)%(i.openStart+1),u=c[a];if(u)for(let e=0;e<l.length;e++){let c=l[(e+h)%l.length],d=!0;c<0&&(d=!1,c=-c);let p=s.node(c-1),f=s.index(c-1);if(p.canReplaceWith(f,f,u.type,u.marks))return t.replace(s.before(c),d?o.after(c):n,new r.p2(function t(e,n,i,s,o){if(n<i){let r=e.firstChild;e=e.replaceChild(0,r.copy(t(r.content,n+1,i,s,r)))}if(n>
4s){let t=o.contentMatchAt(0),n=t.fillBefore(e).append(e);e=n.append(t.matchFragment(n).fillBefore(r.HY.empty,!0))}return e}(i.content,0,i.openStart,a),a,i.openEnd))}}let p=t.steps.length;for(let r=l.length-1;r>=0&&(t.replace(e,n,i),!(t.steps.length>p));r--){let t=l[r];t<0||(e=s.before(t),n=o.after(t))}}(this,t,e,n),this}replaceRangeWith(t,e,n){return!function(t,e,n,i){if(!i.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let r=function(t,e,n){let r=t.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),n))return e;if(0==r.parentOffset)for(let t=r.depth-1;t>=0;t--){let e=r.index(t);if(r.node(t).canReplaceWith(e,e,n))return r.before(t+1);if(e>0)return null}if(r.parentOffset==r.parent.content.size)for(let t=r.depth-1;t>=0;t--){let e=r.indexAfter(t);if(r.node(t).canReplaceWith(e,e,n))return r.after(t+1);if(e<r.node(t).childCount)break}return null}(t.doc,e,i.type);null!=r&&(e=n=r)}t.replaceRange(e,n,new r.p2(r.HY.from(i),0,0))}(this,t,e,n),this}deleteRange(t,e){return!function(t,e,n){let r=t.doc.resolve(e),i=t.doc.resolve(n),s=I(r,i);for(let e=0;e<s.length;e++){let n=s[e],o=e==s.length-1;if(o&&0==n||r.node(n).type.contentMatch.validEnd)return t.delete(r.start(n),i.end(n));if(n>0&&(o||r.node(n-1).canReplace(r.index(n-1),i.indexAfter(n-1))))return t.delete(r.before(n),i.after(n))}for(let s=1;s<=r.depth&&s<=i.depth;s++)if(e-r.start(s)==r.depth-s&&n>r.end(s)&&i.end(s)-n!=i.depth-s)return t.delete(r.before(s),n);t.delete(e,n)}(this,t,e),this}lift(t,e){return!function(t,e,n){let{$from:i,$to:s,depth:o}=e,l=i.before(o+1),a=s.after(o+1),h=l,c=a,d=r.HY.empty,u=0;for(let t=o,e=!1;t>n;t--)e||i.index(t)>0?(e=!0,d=r.HY.from(i.node(t).copy(d)),u++):h--;let p=r.HY.empty,f=0;for(let t=o,e=!1;t>n;t--)e||s.after(t+1)<s.end(t)?(e=!0,p=r.HY.from(s.node(t).copy(p)),f++):c++;t.step(new g(h,c,l,a,new r.p2(d.append(p),u,f),d.size-u,!0))}(this,t,e),this}join(t,e=1){return!function(t,e,n){let i=new m(e-n,e+n,r.p2.empty,!0);t.step(i)}(this,t,e),this}wrap(t,e){return!function(t,e,n){let i=r.HY.empty;for(let t=n.length-1;t>=0;t--){if(i.size){let e=n[t].type.contentMatch.matchFragment(i);if(!e||!e.validEnd)throw RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}i=r.HY.from(n[t].type.create(n[t].attrs,i))}let s=e.start,o=e.end;t.step(new g(s,o,s,o,new r.p2(i,0,0),n.length,!0))}(this,t,e),this}setBlockType(t,e=t,n,i=null){return!function(t,e,n,i,s){if(!i.isTextblock)throw RangeError("Type given to setBlockType should be a textblock");let o=t.steps.length;t.doc.nodesBetween(e,n,(e,n)=>{var l,a;let h,c;if(e.isTextblock&&!e.hasMarkup(i,s)&&(l=t.doc,a=t.mapping.slice(o).map(n),c=(h=l.resolve(a)).index(),h.parent.canReplaceWith(c,c+1,i))){t.clearIncompatible(t.mapping.slice(o).map(n,1),i);let l=t.mapping.slice(o),a=l.map(n,1),h=l.map(n+e.nodeSize,1);return t.step(new g(a,h,a+1,h-1,new r.p2(r.HY.from(i.create(s,null,e.marks)),0,0),1,!0)),!1}})}(this,t,e,n,i),this}setNodeMarkup(t,e,n=null,i){return!function(t,e,n,i,s){let o=t.doc.nodeAt(e);if(!o)throw RangeError("No node at given position");n||(n=o.type);let l=n.create(i,null,s||o.marks);if(o.isLeaf)return t.replaceWith(e,e+o.nodeSize,l);if(!n.validContent(o.content))throw RangeError("Invalid content for node type "+n.name);t.step(new g(e,e+o.nodeSize,e+1,e+o.nodeSize-1,new r.p2(r.HY.from(l),0,0),1,!0))}(this,t,e,n,i),this}setNodeAttribute(t,e,n){return this.step(new N(t,e,n)),this}setDocAttribute(t,e){return this.step(new H(t,e)),this}addNodeMark(t,e){return this.step(new p(t,e)),this}removeNodeMark(t,e){if(!(e instanceof r.vc)){let n=this.doc.nodeAt(t);if(!n)throw RangeError("No node at position "+t);if(!(e=e.isInSet(n.marks)))return this}return this.step(new f(t,e)),this}split(t,e=1,n){return!function(t,e,n=1,i){let s=t.doc.resolve(e),o=r.HY.empty,l=r.HY.empty;for(let t=s.depth,e=s.depth-n,a=n-1;t>e;t--,a--){o=r.HY.from(s.node(t).copy(o));let e=i&&i[a];l=r.HY.from(e?e.type.create(e.attrs,l):s.node(t).copy(l))}t.step(new m(e,e,new r.p2(o.append(l),n,n),!0))}(this,t,e,n),this}addMark(t,e,n){var r;let i,s,o,l;return r=this,o=[],l=[],r.doc.nodesBetween(t,e,(r,a,h)=>{if(!r.isInline)return;let c=r.marks;if(!n.isInSet(c)&&h.type.allowsMarkType(n.type)){let h=Math.max(a,t),p=Math.min(a+r.nodeSize,e),f=n.addToSet(c);for(let t=0;t<c.length;t++)c[t].isInSet(f)||(i&&i.to==h&&i.mark.eq(c[t])?i.to=p:o.push(i=new u(h,p,c[t])));s&&s.to==h?s.to=p:l.push(s=new d(h,p,n))}}),o.forEach(t=>r.step(t)),l.forEach(t=>r.step(t)),this}removeMark(t,e,n){var i;let s,o;return i=this,s=[],o=0,i.doc.nodesBetween(t,e,(i,l)=>{if(!i.isInline)return;o++;let a=null;if(n instanceof r.ZU){let t=i.marks,e;for(;e=n.isInSet(t);)(a||(a=[])).push(e),t=e.removeFromSet(t)}else n?n.isInSet(i.marks)&&(a=[n]):a=i.marks;if(a&&a.length){let n=Math.min(l+i.nodeSize,e);for(let e=0;e<a.length;e++){let r=a[e],i;for(let t=0;t<s.length;t++){let e=s[t];
4e.step==o-1&&r.eq(s[t].style)&&(i=e)}i?(i.to=n,i.step=o):s.push({style:r,from:Math.max(l,t),to:n,step:o})}}}),s.forEach(t=>i.step(new u(t.from,t.to,t.style))),this}clearIncompatible(t,e,n){return!function(t,e,n,i=n.contentMatch){let s=t.doc.nodeAt(e),o=[],l=e+1;for(let e=0;e<s.childCount;e++){let a=s.child(e),h=l+a.nodeSize,c=i.matchType(a.type);if(c){i=c;for(let e=0;e<a.marks.length;e++)n.allowsMarkType(a.marks[e].type)||t.step(new u(l,h,a.marks[e]));if(a.isText&&!n.spec.code){let t,e=/\r?\n|\r/g,i;for(;t=e.exec(a.text);)i||(i=new r.p2(r.HY.from(n.schema.text(" ",n.allowedMarks(a.marks))),0,0)),o.push(new m(l+t.index,l+t.index+t[0].length,i))}}else o.push(new m(l,h,r.p2.empty));l=h}if(!i.validEnd){let e=i.fillBefore(r.HY.empty,!0);t.replace(l,l,new r.p2(e,0,0))}for(let e=o.length-1;e>=0;e--)t.step(o[e])}(this,t,e,n),this}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.