@beterdichtbij/component-library 0.15.4 → 0.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
(function(ve,m){typeof exports=="object"&&typeof module<"u"?m(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],m):(ve=typeof globalThis<"u"?globalThis:ve||self,m(ve.BDComponentLibrary={},ve.Vue))})(this,function(ve,m){"use strict";const
|
|
1
|
+
(function(ve,m){typeof exports=="object"&&typeof module<"u"?m(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],m):(ve=typeof globalThis<"u"?globalThis:ve||self,m(ve.BDComponentLibrary={},ve.Vue))})(this,function(ve,m){"use strict";const Wa=m.defineComponent({__name:"BDCol",props:{class:{},cols:{},xs:{},sm:{},md:{},lg:{},xxl:{},orderClass:{},offsetClass:{}},setup(n){const e=n,t=m.computed(()=>({col:!e.cols&&!e.xs&&!e.sm&&!e.md&&!e.lg&&!e.xxl,[`col-${e.cols}`]:e.cols,[`col-xs-${e.xs}`]:e.xs,[`col-sm-${e.sm}`]:e.sm,[`col-md-${e.md}`]:e.md,[`col-lg-${e.lg}`]:e.lg,[`col-xxl-${e.xxl}`]:e.xxl,[`${e.orderClass}`]:e.orderClass,[`${e.offsetClass}`]:e.offsetClass,[`${e.class}`]:e.class}));return(r,o)=>(m.openBlock(),m.createElementBlock("div",{class:m.normalizeClass(t.value)},[m.renderSlot(r.$slots,"default")],2))}}),Ka=m.defineComponent({__name:"BDContainer",props:{class:{default:""},fluid:{type:Boolean,default:!1}},setup(n){const e=n,t=m.computed(()=>({container:!e.fluid,"container-fluid":e.fluid===!0,[`container-${e.fluid}`]:e.fluid&&e.fluid!==!0,[e.class]:!0}));return(r,o)=>(m.openBlock(),m.createElementBlock("div",{class:m.normalizeClass(t.value)},[m.renderSlot(r.$slots,"default")],2))}}),Ga=m.defineComponent({__name:"BDRow",props:{class:{}},setup(n){return(e,t)=>(m.openBlock(),m.createElementBlock("div",{class:m.normalizeClass(["row",e.class])},[m.renderSlot(e.$slots,"default")],2))}}),ot={XS:"xs",SM:"sm",MD:"md",LG:"lg"},Ge=(n,e)=>{const t=n.__vccOpts||n;for(const[r,o]of e)t[r]=o;return t},kf={},Cf={class:"icon icon-check",xmlns:"http://www.w3.org/2000/svg",width:"18",height:"13",viewBox:"0 0 18 13"},wf=[m.createElementVNode("path",{d:"M6 10.586L1.707 6.293A1 1 0 0 0 .293 7.707l5 5a1 1 0 0 0 1.414 0l11-11A1 1 0 1 0 16.293.293L6 10.586z"},null,-1)];function Tf(n,e){return m.openBlock(),m.createElementBlock("svg",Cf,wf)}const io=Ge(kf,[["render",Tf]]),Af={},Of={class:"icon icon-error",xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18"},Mf=[m.createElementVNode("path",{d:"M9 18A9 9 0 1 1 9 0a9 9 0 0 1 0 18zm.542-7.01l.102-7.654h-1.42l.094 7.654h1.224zm-1.37 2.329c0 .22.067.401.201.546.135.144.334.216.597.216.264 0 .464-.072.6-.216a.761.761 0 0 0 .206-.546.787.787 0 0 0-.205-.553c-.137-.15-.337-.224-.6-.224-.264 0-.463.075-.598.224a.795.795 0 0 0-.201.553z"},null,-1)];function If(n,e){return m.openBlock(),m.createElementBlock("svg",Of,Mf)}const so=Ge(Af,[["render",If]]),Nf={},Rf={class:"icon icon-attachment",width:"17",height:"18",viewBox:"0 0 17 18",xmlns:"http://www.w3.org/2000/svg"},Df=[m.createElementVNode("path",{d:"M15.56 7.97l-7.135 7.135a3.91 3.91 0 0 1-5.53-5.53L10.03 2.44a2.357 2.357 0 0 1 3.333 3.334L6.22 12.907a.804.804 0 1 1-1.137-1.136l6.591-6.582a.75.75 0 0 0-1.06-1.062l-6.59 6.583a2.304 2.304 0 1 0 3.256 3.258l7.142-7.134A3.857 3.857 0 1 0 8.97 1.38L1.835 8.514a5.41 5.41 0 0 0 7.651 7.651l7.134-7.134a.75.75 0 1 0-1.06-1.06z"},null,-1)];function Lf(n,e){return m.openBlock(),m.createElementBlock("svg",Rf,Df)}const Er=Ge(Nf,[["render",Lf]]),Pf={},Bf={class:"icon icon-calendar",xmlns:"http://www.w3.org/2000/svg",width:"17",height:"18",viewBox:"0 0 17 18"},Ff=[m.createElementVNode("path",{d:"M4.25 3.35H3c-.69 0-1.25.56-1.25 1.25v2.05h12.9V4.6c0-.69-.56-1.25-1.25-1.25h-1.25v.85a.75.75 0 1 1-1.5 0v-.85h-4.9v.85a.75.75 0 0 1-1.5 0v-.85zm1.5-1.5h4.9V1a.75.75 0 1 1 1.5 0v.85h1.25a2.75 2.75 0 0 1 2.75 2.75V15a2.75 2.75 0 0 1-2.75 2.75H3A2.75 2.75 0 0 1 .25 15V4.6A2.75 2.75 0 0 1 3 1.85h1.25V1a.75.75 0 0 1 1.5 0v.85zm8.9 6.3H1.75V15c0 .69.56 1.25 1.25 1.25h10.4c.69 0 1.25-.56 1.25-1.25V8.15z"},null,-1)];function Vf(n,e){return m.openBlock(),m.createElementBlock("svg",Bf,Ff)}const Ja=Ge(Pf,[["render",Vf]]),zf={},$f={class:"icon icon-info",xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18"},Uf=[m.createElementVNode("path",{d:"M9 18A9 9 0 1 1 9 0a9 9 0 0 1 0 18zm.498-4V6.075H8.143V14h1.355zM8.033 3.973c0 .22.067.403.201.55.134.146.333.22.597.22.264 0 .464-.074.6-.22a.774.774 0 0 0 .206-.55.8.8 0 0 0-.205-.556c-.137-.152-.337-.228-.6-.228-.265 0-.464.076-.598.228a.809.809 0 0 0-.201.556z"},null,-1)];function Hf(n,e){return m.openBlock(),m.createElementBlock("svg",$f,Uf)}const ao=Ge(zf,[["render",Hf]]),jf={},Wf={class:"icon icon-remove",width:"11",height:"11",viewBox:"0 0 11 11",xmlns:"http://www.w3.org/2000/svg"},Kf=[m.createElementVNode("path",{d:"M.893.893a1 1 0 0 1 1.414 0L5.5 4.085 8.693.893a1 1 0 0 1 1.32-.083l.094.083a1 1 0 0 1 0 1.414L6.915 5.5l3.192 3.193a1 1 0 0 1 .083 1.32l-.083.094a1 1 0 0 1-1.414 0L5.5 6.915l-3.193 3.192a1 1 0 0 1-1.32.083l-.094-.083a1 1 0 0 1 0-1.414L4.085 5.5.893 2.307A1 1 0 0 1 .81.987L.893.893z"},null,-1)];function Gf(n,e){return m.openBlock(),m.createElementBlock("svg",Wf,Kf)}const Fi=Ge(jf,[["render",Gf]]),Jf={},Yf={version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 24 24",style:{"enable-background":"new 0 0 24 24"},"xml:space":"preserve",class:"icon icon-file"},Xf=[m.createElementVNode("title",null,"common-file-empty",-1),m.createElementVNode("g",null,[m.createElementVNode("path",{d:`M3.023,24c-1.241,0-2.25-1.009-2.25-2.25V2.25C0.773,1.009,1.782,0,3.023,0h15c0.59,0,1.147,0.227,1.571,0.639l2.955,2.883
|
|
2
2
|
c0.431,0.422,0.678,1.009,0.678,1.611V21.75c0,1.241-1.009,2.25-2.25,2.25H3.023z M3.023,1.5c-0.414,0-0.75,0.336-0.75,0.75v19.5
|
|
3
3
|
c0,0.414,0.336,0.75,0.75,0.75h17.954c0.414,0,0.75-0.336,0.75-0.75V5.133c0-0.201-0.082-0.397-0.226-0.537l-2.955-2.883
|
|
4
|
-
C18.406,1.576,18.22,1.5,18.023,1.5H3.023z`})],-1)];function jf(n,e){return m.openBlock(),m.createElementBlock("svg",Hf,Uf)}const Fi=Ge($f,[["render",jf]]),Wf={},Kf={xmlns:"http://www.w3.org/2000/svg",width:"18",height:"10"},Gf=[m.createElementVNode("path",{d:"M8.828 6.207L14.632.404a1 1 0 0 1 1.414 0l.707.707a1 1 0 0 1 0 1.414L9.682 9.596a.999.999 0 0 1-.854.282.999.999 0 0 1-.853-.282L.904 2.526a1 1 0 0 1 0-1.415L1.61.404a1 1 0 0 1 1.414 0l5.803 5.803z",fill:"#3594CF"},null,-1)];function Jf(n,e){return m.openBlock(),m.createElementBlock("svg",Kf,Gf)}const Ka=Ge(Wf,[["render",Jf]]),Yf={},Xf={class:"icon icon-caret-right",xmlns:"http://www.w3.org/2000/svg",width:"7",height:"11",viewBox:"0 0 7 11"},Zf=[m.createElementVNode("path",{d:"M4.324 5.703l-3.27-3.27A.9.9 0 1 1 2.327 1.16L6.146 4.98a.898.898 0 0 1 .259.724.898.898 0 0 1-.26.724l-3.818 3.819a.9.9 0 1 1-1.273-1.273l3.27-3.27z"},null,-1)];function Qf(n,e){return m.openBlock(),m.createElementBlock("svg",Xf,Zf)}const Vi=Ge(Yf,[["render",Qf]]),_f={},qf={class:"icon icon-caret-left",xmlns:"http://www.w3.org/2000/svg",width:"6",height:"10",viewBox:"0 0 6 10"},ep=[m.createElementVNode("path",{d:"M2.276 4.897l3.27 3.27A.9.9 0 1 1 4.273 9.44L.454 5.62a.898.898 0 0 1-.259-.724.898.898 0 0 1 .26-.724L4.272.354a.9.9 0 1 1 1.273 1.273l-3.27 3.27z"},null,-1)];function tp(n,e){return m.openBlock(),m.createElementBlock("svg",qf,ep)}const zi=Ge(_f,[["render",tp]]),np={},rp={class:"icon icon-close",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"-4 -4 22 22"},op=[m.createElementVNode("path",{d:"M8.414 7l5.293 5.293a1 1 0 0 1-1.414 1.414L7 8.414l-5.293 5.293a1 1 0 1 1-1.414-1.414L5.586 7 .293 1.707A1 1 0 1 1 1.707.293L7 5.586 12.293.293a1 1 0 0 1 1.414 1.414L8.414 7z"},null,-1)];function ip(n,e){return m.openBlock(),m.createElementBlock("svg",rp,op)}const $i=Ge(np,[["render",ip]]),sp={},ap={width:"12",height:"14",viewBox:"0 0 12 14",xmlns:"http://www.w3.org/2000/svg",class:"icon icon-italic"},lp=[m.createElementVNode("path",{d:"M12 0.75C12 1.1875 11.6562 1.5 11.25 1.5H9.125L4.53125 12.5H7.25C7.65625 12.5 8 12.8438 8 13.25C8 13.6875 7.65625 14 7.25 14H0.75C0.3125 14 0 13.6875 0 13.25C0 12.8438 0.3125 12.5 0.75 12.5H2.9375L7.53125 1.5H4.75C4.3125 1.5 4 1.1875 4 0.75C4 0.34375 4.3125 0 4.75 0H11.25C11.6562 0 12 0.34375 12 0.75Z"},null,-1)];function cp(n,e){return m.openBlock(),m.createElementBlock("svg",ap,lp)}const Hi=Ge(sp,[["render",cp]]),up={},dp={width:"11",height:"13",viewBox:"0 0 11 13",xmlns:"http://www.w3.org/2000/svg",class:"icon icon-bold"},fp=[m.createElementVNode("path",{d:"M8.85547 6.25781C9.21094 5.84766 9.53906 5.05469 9.59375 4.48047C9.78516 2.40234 8.17188 0.625 6.12109 0.625H0.679688C0.433594 0.625 0.242188 0.84375 0.242188 1.0625V2.375C0.242188 2.62109 0.433594 2.8125 0.679688 2.8125H1.52734V10.6875H0.679688C0.433594 10.6875 0.242188 10.9062 0.242188 11.125V12.4375C0.242188 12.6836 0.433594 12.875 0.679688 12.875H6.39453C8.33594 12.875 10.0586 11.4805 10.25 9.53906C10.3867 8.22656 9.78516 7.02344 8.85547 6.25781ZM3.71484 2.8125H6.12109C6.83203 2.8125 7.43359 3.41406 7.43359 4.125C7.43359 4.86328 6.83203 5.4375 6.12109 5.4375H3.71484V2.8125ZM6.12109 10.6875H3.71484V7.625H6.12109C6.96875 7.625 7.65234 8.33594 7.65234 9.15625C7.65234 10.0039 6.96875 10.6875 6.12109 10.6875Z"},null,-1)];function pp(n,e){return m.openBlock(),m.createElementBlock("svg",dp,fp)}const Ui=Ge(up,[["render",pp]]),hp={},mp={width:"14",height:"16",viewBox:"0 0 14 16",xmlns:"http://www.w3.org/2000/svg",class:"icon icon-underline"},gp=[m.createElementVNode("path",{d:"M1.25 1.5H2V7.5C2 10.2812 4.21875 12.5 7 12.5C9.75 12.5 12 10.2812 12 7.5V1.5H12.75C13.1562 1.5 13.5 1.1875 13.5 0.75C13.5 0.34375 13.1562 0 12.75 0H9.75C9.3125 0 9 0.34375 9 0.75C9 1.1875 9.3125 1.5 9.75 1.5H10.5V7.5C10.5 9.4375 8.90625 11 7 11C5.0625 11 3.5 9.4375 3.5 7.5V1.5H4.25C4.65625 1.5 5 1.1875 5 0.75C5 0.34375 4.65625 0 4.25 0H1.25C0.8125 0 0.5 0.34375 0.5 0.75C0.5 1.1875 0.8125 1.5 1.25 1.5ZM13.25 14.5H0.75C0.3125 14.5 0 14.8438 0 15.25C0 15.6875 0.3125 16 0.75 16H13.25C13.6562 16 14 15.6875 14 15.25C14 14.8438 13.6562 14.5 13.25 14.5Z"},null,-1)];function yp(n,e){return m.openBlock(),m.createElementBlock("svg",mp,gp)}const ji=Ge(hp,[["render",yp]]),vp={},bp={width:"16",height:"14",viewBox:"0 0 16 14",xmlns:"http://www.w3.org/2000/svg",class:"icon icon-bullet-list"},xp=[m.createElementVNode("path",{d:"M2.5 5.5H0.5C0.21875 5.5 0 5.75 0 6V8C0 8.28125 0.21875 8.5 0.5 8.5H2.5C2.75 8.5 3 8.28125 3 8V6C3 5.75 2.75 5.5 2.5 5.5ZM2.5 10.5H0.5C0.21875 10.5 0 10.75 0 11V13C0 13.2812 0.21875 13.5 0.5 13.5H2.5C2.75 13.5 3 13.2812 3 13V11C3 10.75 2.75 10.5 2.5 10.5ZM2.5 0.5H0.5C0.21875 0.5 0 0.75 0 1V3C0 3.28125 0.21875 3.5 0.5 3.5H2.5C2.75 3.5 3 3.28125 3 3V1C3 0.75 2.75 0.5 2.5 0.5ZM15.25 6.25H5.71875C5.3125 6.25 5 6.59375 5 7C5 7.4375 5.3125 7.75 5.71875 7.75H15.25C15.6562 7.75 16 7.4375 16 7C16 6.59375 15.6562 6.25 15.25 6.25ZM15.25 1.25H5.71875C5.3125 1.25 5 1.59375 5 2C5 2.375 5.3125 2.75 5.71875 2.75H15.25C15.6562 2.75 16 2.4375 16 2.03125C16 1.65625 15.6562 1.25 15.25 1.25ZM15.25 11.25H5.71875C5.3125 11.25 5 11.5938 5 12C5 12.4375 5.3125 12.75 5.71875 12.75H15.25C15.6562 12.75 16 12.4375 16 12C16 11.5938 15.6562 11.25 15.25 11.25Z"},null,-1)];function Sp(n,e){return m.openBlock(),m.createElementBlock("svg",bp,xp)}const Wi=Ge(vp,[["render",Sp]]),Ep={},Cp={width:"17",height:"15",viewBox:"0 0 17 15",xmlns:"http://www.w3.org/2000/svg",class:"icon icon-ordered-list"},kp=[m.createElementVNode("path",{d:"M7.75 3.75H16.25C16.6562 3.75 17 3.4375 17 3C17 2.59375 16.6562 2.25 16.25 2.25H7.75C7.3125 2.25 7 2.59375 7 3C7 3.4375 7.3125 3.75 7.75 3.75ZM16.25 12.25H7.75C7.3125 12.25 7 12.5938 7 13C7 13.4375 7.3125 13.75 7.75 13.75H16.25C16.6562 13.75 17 13.4375 17 13C17 12.5938 16.6562 12.25 16.25 12.25ZM16.25 7.25H7.75C7.3125 7.25 7 7.59375 7 8C7 8.4375 7.3125 8.75 7.75 8.75H16.25C16.6562 8.75 17 8.4375 17 8C17 7.59375 16.6562 7.25 16.25 7.25ZM2.25 7H4.75C5.15625 7 5.5 6.6875 5.5 6.25C5.5 5.78125 5.15625 5.5 4.75 5.5H4.25V1.75C4.25 1.5 4.09375 1.25 3.84375 1.125C3.625 0.96875 3.34375 0.96875 3.09375 1.125L2.09375 1.6875C1.75 1.90625 1.625 2.375 1.84375 2.71875C2.03125 3.03125 2.40625 3.1875 2.75 3.0625V5.5H2.25C1.8125 5.5 1.5 5.84375 1.5 6.25C1.5 6.6875 1.8125 7 2.25 7ZM5.25 13.5H3.6875L4.84375 12.5C5.78125 11.6875 5.875 10.2812 5.09375 9.34375C4.6875 8.84375 4.125 8.5625 3.5 8.53125C2.90625 8.46875 2.28125 8.65625 1.8125 9.0625L1.4375 9.40625C1.125 9.6875 1.09375 10.1562 1.34375 10.4688C1.625 10.7812 2.09375 10.8125 2.40625 10.5625L2.8125 10.2188C2.96875 10.0625 3.1875 10 3.40625 10.0312C3.625 10.0312 3.8125 10.125 3.9375 10.3125C4.21875 10.625 4.1875 11.0938 3.84375 11.375L1.25 13.7188C1 13.9062 0.9375 14.25 1.03125 14.5312C1.15625 14.8125 1.4375 15 1.71875 15H5.25C5.65625 15 6 14.6875 6 14.2812C6 13.8438 5.65625 13.5 5.25 13.5Z"},null,-1)];function wp(n,e){return m.openBlock(),m.createElementBlock("svg",Cp,kp)}const Ki=Ge(Ep,[["render",wp]]),Tp={},Ap={class:"icon icon-hyperlink",xmlns:"http://www.w3.org/2000/svg",version:"1.1","xmlns:xlink":"http://www.w3.org/1999/xlink","xmlns:svgjs":"http://svgjs.com/svgjs",viewBox:"0 0 20 20",width:"20",height:"20"},Op=[m.createElementVNode("g",{transform:"matrix(0.8333333333333334,0,0,0.8333333333333334,0,0)"},[m.createElementVNode("path",{d:"M10.458,18.374,7.721,21.11a2.853,2.853,0,0,1-3.942,0l-.892-.891a2.787,2.787,0,0,1,0-3.941l5.8-5.8a2.789,2.789,0,0,1,3.942,0l.893.892A1,1,0,0,0,14.94,9.952l-.893-.892a4.791,4.791,0,0,0-6.771,0l-5.8,5.8a4.787,4.787,0,0,0,0,6.77l.892.891a4.785,4.785,0,0,0,6.771,0l2.736-2.735a1,1,0,1,0-1.414-1.415Z",stroke:"none","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"0"}),m.createElementVNode("path",{d:"M22.526,2.363l-.892-.892a4.8,4.8,0,0,0-6.77,0l-2.905,2.9a1,1,0,0,0,1.414,1.414l2.9-2.9a2.79,2.79,0,0,1,3.941,0l.893.893a2.786,2.786,0,0,1,0,3.942l-5.8,5.8a2.769,2.769,0,0,1-1.971.817h0a2.766,2.766,0,0,1-1.969-.816,1,1,0,1,0-1.415,1.412,4.751,4.751,0,0,0,3.384,1.4h0a4.752,4.752,0,0,0,3.385-1.4l5.8-5.8a4.786,4.786,0,0,0,0-6.771Z",stroke:"none","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"0"})],-1)];function Mp(n,e){return m.openBlock(),m.createElementBlock("svg",Ap,Op)}const Gi=Ge(Tp,[["render",Mp]]),Ip={},Np=[m.createStaticVNode('<title>BeterDichtbij logo</title><g id="Logo" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Group-3-Copy-2" transform="translate(0.000000, -14.000000)"><g id="Master-Copy" transform="translate(0.000000, 21.000000)" fill="#E1523D"><g id="Group-36-Copy-2"><path d="M0,7.07801038 C0,4.71449972 1.60969434,3.38479666 3.84879725,3.38479666 L13.2067282,3.38479666 C18.2745524,3.38479666 22.3693254,6.83325734 22.3693254,12.0497847 C22.3693254,15.4945924 20.9549647,17.8069606 17.8368602,19.2827849 L17.8368602,19.3814167 C21.978658,19.9732076 25.2450714,23.4655047 25.2450714,27.7468563 C25.2450714,34.687614 20.6619642,38.4283171 13.9374209,38.4283171 L3.89943932,38.4283171 C1.65671912,38.4283171 0,36.9999822 0,34.687614 L0,7.07801038 Z M7.3105444,17.2663121 L11.1123169,17.2663121 C13.4997287,17.2663121 15.058781,15.8379772 15.058781,13.3758348 C15.058781,11.0634665 13.2537529,9.88353771 11.1123169,9.88353771 L7.3105444,9.88353771 L7.3105444,17.2663121 Z M7.3105444,31.9332291 L13.0620365,31.9332291 C15.6918068,31.9332291 17.6415265,30.4062624 17.6415265,27.6482244 C17.6415265,25.3358562 15.8871405,23.7614001 12.4760354,23.7614001 L7.3105444,23.7614001 L7.3105444,31.9332291 Z" id="Fill-10"></path><path d="M33.6758908,27.6990016 C34.164225,31.1912986 37.0399711,32.8168971 40.3027672,32.8168971 C43.909206,32.8168971 46.3942847,29.9638804 48.2463375,29.9638804 C49.758365,29.9638804 51.1220836,31.4871941 51.1220836,33.0141608 C51.1220836,36.0644411 44.8858745,39.0197427 39.6697414,39.0197427 C31.7768132,39.0197427 26.5136553,33.2114244 26.5136553,25.3866333 C26.5136553,18.2011226 31.6791463,11.6548921 39.0873576,11.6548921 C46.6872852,11.6548921 51.7080846,18.6431393 51.7080846,24.5500894 C51.7080846,26.665194 50.7820582,27.6990016 48.6370049,27.6990016 L33.6758908,27.6990016 Z M44.6905408,22.9756333 C44.2998734,19.8742105 42.3501537,17.5618423 39.0873576,17.5618423 C35.9656357,17.5618423 33.8712245,19.9728423 33.5311991,22.9756333 L44.6905408,22.9756333 Z" id="Fill-12"></path><path d="M55.9001628,18.4462409 L54.3411105,18.4462409 C52.4384156,18.4462409 51.2700307,17.2663121 51.2700307,15.3448181 C51.2700307,13.5730984 52.5867245,12.2470484 54.3411105,12.2470484 L55.9001628,12.2470484 L55.9001628,8.01318615 C55.9001628,5.6496755 57.3615482,4.0752194 59.4089347,4.0752194 C61.4563212,4.0752194 62.9177066,5.6496755 62.9177066,8.01318615 L62.9177066,12.2470484 L64.9144511,12.2470484 C66.7194791,12.2470484 68.2785314,13.0799393 68.2785314,15.3448181 C68.2785314,17.5585545 66.7194791,18.4462409 64.9144511,18.4462409 L62.9177066,18.4462409 L62.9177066,34.7862458 C62.9177066,37.1497565 61.4563212,38.7205595 59.4089347,38.7205595 C57.3615482,38.7205595 55.9001628,37.1497565 55.9001628,34.7862458 L55.9001628,18.4462409 Z" id="Fill-14"></path><path d="M74.2727437,27.6990016 C74.761078,31.1912986 77.636824,32.8168971 80.8996202,32.8168971 C84.506059,32.8168971 86.9911376,29.9638804 88.8431905,29.9638804 C90.3552179,29.9638804 91.7189365,31.4871941 91.7189365,33.0141608 C91.7189365,36.0644411 85.4827274,39.0197427 80.2665943,39.0197427 C72.3736661,39.0197427 67.1105082,33.2114244 67.1105082,25.3866333 C67.1105082,18.2011226 72.2759993,11.6548921 79.6805932,11.6548921 C87.2841382,11.6548921 92.3049376,18.6431393 92.3049376,24.5500894 C92.3049376,26.665194 91.3789112,27.6990016 89.2338578,27.6990016 L74.2727437,27.6990016 Z M85.2873937,22.9756333 C84.8967264,19.8742105 82.9470067,17.5618423 79.6805932,17.5618423 C76.5624887,17.5618423 74.4680774,19.9728423 74.1280521,22.9756333 L85.2873937,22.9756333 Z" id="Fill-16"></path><path d="M94.6934346,15.4934965 C94.6934346,13.1299858 96.5454874,11.950057 98.2998734,11.950057 C100.151926,11.950057 101.710978,12.6404797 101.710978,14.9017055 L101.808645,14.9017055 C103.125339,12.9327222 104.5397,11.950057 106.731778,11.950057 C108.435522,11.950057 110.142883,13.1811282 110.142883,15.7382495 C110.142883,18.0506177 108.044854,18.200392 105.950443,19.1830571 C103.856032,20.1693753 101.710978,21.1045511 101.710978,23.9100785 L101.710978,34.7851499 C101.710978,37.1486606 100.249593,38.7231166 98.2022065,38.7231166 C96.15482,38.7231166 94.6934346,37.1486606 94.6934346,34.7851499 L94.6934346,15.4934965 Z" id="Fill-18"></path><path d="M114.139266,7.17591159 C114.139266,4.91103276 115.698318,3.38771909 117.890396,3.38771909 L125.982275,3.38771909 C136.899258,3.38771909 143.135468,10.474598 143.135468,21.4008119 C143.135468,31.7352348 136.508591,38.4275865 126.47061,38.4275865 L117.988063,38.4275865 C116.381986,38.4275865 114.139266,37.5435531 114.139266,34.7380258 L114.139266,7.17591159 Z M121.44981,31.636603 L126.369325,31.636603 C132.659794,31.636603 135.531923,26.9607241 135.531923,21.053774 C135.531923,14.7559496 132.609152,10.1787026 125.884608,10.1787026 L121.44981,10.1787026 L121.44981,31.636603 Z" id="Fill-20"></path><path d="M153.809731,5.20729352 C153.809731,7.42102993 152.055345,9.29138148 149.863266,9.29138148 C147.765238,9.29138148 145.913185,7.37354053 145.913185,5.20729352 C145.913185,3.19082075 147.765238,1.32046919 149.863266,1.32046919 C151.957678,1.32046919 153.809731,3.13967832 153.809731,5.20729352 L153.809731,5.20729352 Z M146.354494,15.8887543 C146.354494,13.5252437 147.81588,11.9507876 149.863266,11.9507876 C151.910653,11.9507876 153.372038,13.5252437 153.372038,15.8887543 L153.372038,34.7858805 C153.372038,37.1493912 151.910653,38.7238473 149.863266,38.7238473 C147.81588,38.7238473 146.354494,37.1493912 146.354494,34.7858805 L146.354494,15.8887543 Z" id="Fill-22"></path><path d="M174.716947,19.5289991 C172.962561,19.5289991 171.403509,18.1518067 169.160789,18.1518067 C165.163682,18.1518067 163.264605,21.7427355 163.264605,25.3848068 C163.264605,28.8807569 165.359016,32.5228282 169.160789,32.5228282 C170.915175,32.5228282 173.548562,31.0470039 174.376922,31.0470039 C176.033641,31.0470039 177.397359,32.4716858 177.397359,34.1447737 C177.397359,37.786845 171.352867,39.0179162 168.820763,39.0179162 C161.26786,39.0179162 156.247061,32.7675812 156.247061,25.3848068 C156.247061,18.1992961 161.412552,11.6530656 168.820763,11.6530656 C171.598842,11.6530656 177.397359,12.6868732 177.397359,16.1316809 C177.397359,17.6075051 176.373666,19.5289991 174.716947,19.5289991" id="Fill-24"></path><path d="M179.83469,4.46901608 C179.83469,2.10550542 181.296075,0.531049329 183.343462,0.531049329 C185.390848,0.531049329 186.852234,2.10550542 186.852234,4.46901608 L186.852234,14.1166693 L186.949901,14.1166693 C188.411286,12.2938072 191.14234,11.6545268 193.334419,11.6545268 C198.839935,11.6545268 202.934708,15.1979663 202.934708,21.2035482 L202.934708,34.7855152 C202.934708,37.1490259 201.473322,38.723482 199.425936,38.723482 C197.378549,38.723482 195.917164,37.1490259 195.917164,34.7855152 L195.917164,22.4346195 C195.917164,19.1359331 193.869778,17.561477 191.337674,17.561477 C188.461928,17.561477 186.852234,19.6765816 186.852234,22.4346195 L186.852234,34.7855152 C186.852234,37.1490259 185.390848,38.723482 183.343462,38.723482 C181.296075,38.723482 179.83469,37.1490259 179.83469,34.7855152 L179.83469,4.46901608 Z" id="Fill-26"></path><path d="M208.63809,18.4462409 L207.079038,18.4462409 C205.17996,18.4462409 204.007958,17.2663121 204.007958,15.3448181 C204.007958,13.5730984 205.324652,12.2470484 207.079038,12.2470484 L208.63809,12.2470484 L208.63809,8.01318615 C208.63809,5.6496755 210.099475,4.0752194 212.146862,4.0752194 C214.194249,4.0752194 215.655634,5.6496755 215.655634,8.01318615 L215.655634,12.2470484 L217.652378,12.2470484 C219.457406,12.2470484 221.016459,13.0799393 221.016459,15.3448181 C221.016459,17.5585545 219.457406,18.4462409 217.652378,18.4462409 L215.655634,18.4462409 L215.655634,34.7862458 C215.655634,37.1497565 214.194249,38.7205595 212.146862,38.7205595 C210.099475,38.7205595 208.63809,37.1497565 208.63809,34.7862458 L208.63809,18.4462409 Z" id="Fill-28"></path><path d="M222.820402,4.46865078 C222.820402,2.10514012 224.281787,0.530684026 226.329173,0.530684026 C228.37656,0.530684026 229.837945,2.10514012 229.837945,4.46865078 L229.837945,14.116304 C231.689998,12.4907055 234.07741,11.6541615 236.515464,11.6541615 C244.068367,11.6541615 247.819497,18.7921829 247.819497,25.6817982 C247.819497,32.3741498 243.337674,39.0190121 236.269488,39.0190121 C233.882076,39.0190121 231.154639,37.9340621 229.837945,35.7714681 C229.400253,37.6418197 228.278893,38.7231166 226.329173,38.7231166 C224.281787,38.7231166 222.820402,37.1486606 222.820402,34.7851499 L222.820402,4.46865078 Z M235.343462,32.5202711 C239.000543,32.5202711 240.801953,28.6845892 240.801953,25.3859027 C240.801953,22.0397269 239.000543,18.1492495 235.343462,18.1492495 C231.592331,18.1492495 229.837945,21.692689 229.837945,25.1411497 C229.837945,28.5859573 231.494664,32.5202711 235.343462,32.5202711 L235.343462,32.5202711 Z" id="Fill-30"></path><path d="M258.153735,5.20729352 C258.153735,7.42102993 256.399349,9.29138148 254.207271,9.29138148 C252.109242,9.29138148 250.257189,7.37354053 250.257189,5.20729352 C250.257189,3.19082075 252.109242,1.32046919 254.207271,1.32046919 C256.301682,1.32046919 258.153735,3.13967832 258.153735,5.20729352 L258.153735,5.20729352 Z M250.698499,15.8887543 C250.698499,13.5252437 252.159884,11.9507876 254.207271,11.9507876 C256.254657,11.9507876 257.716043,13.5252437 257.716043,15.8887543 L257.716043,34.7858805 C257.716043,37.1493912 256.254657,38.7238473 254.207271,38.7238473 C252.159884,38.7238473 250.698499,37.1493912 250.698499,34.7858805 L250.698499,15.8887543 Z" id="Fill-32"></path><path d="M268.972689,5.20729352 C268.972689,7.42102993 267.218303,9.29138148 265.026225,9.29138148 C262.928197,9.29138148 261.076144,7.37354053 261.076144,5.20729352 C261.076144,3.19082075 262.928197,1.32046919 265.026225,1.32046919 C267.120637,1.32046919 268.972689,3.13967832 268.972689,5.20729352 L268.972689,5.20729352 Z M261.517453,15.8887543 C261.517453,13.5252437 262.978839,11.9507876 265.026225,11.9507876 C267.073612,11.9507876 268.534997,13.5252437 268.534997,15.8887543 L268.534997,45.2189353 C268.534997,47.5824459 267.073612,49.156902 265.026225,49.156902 C262.978839,49.156902 261.517453,47.5824459 261.517453,45.2189353 L261.517453,15.8887543 Z" id="Fill-34"></path></g></g><polyline id="Path" stroke="#E1523D" stroke-width="6.4" stroke-linecap="round" stroke-linejoin="round" transform="translate(346.970563, 44.470563) rotate(-45.000000) translate(-346.970563, -44.470563) " points="334.970563 56.4705627 334.970563 32.4705627 334.970563 32.4705627 358.970563 32.4705627"></polyline><g id="Group-2" transform="translate(319.970563, 44.500000) rotate(90.000000) translate(-319.970563, -44.500000) translate(275.970563, 27.500000)" stroke-linecap="round" stroke-linejoin="round" stroke-width="6.4"><polyline id="Path-Copy-2" stroke="#418FDE" transform="translate(70.970563, 17.000000) rotate(-45.000000) translate(-70.970563, -17.000000) " points="58.9705627 29 58.9705627 5 82.9705627 5"></polyline><polyline id="Path-Copy-3" stroke="#FFC72C" transform="translate(16.970563, 17.000000) scale(-1, 1) rotate(-45.000000) translate(-16.970563, -17.000000) " points="4.97056275 29 4.97056275 5 28.9705627 5"></polyline></g><polyline id="Path-Copy" stroke="#00BF6F" stroke-width="6.4" stroke-linecap="round" stroke-linejoin="round" transform="translate(292.970563, 44.470563) scale(-1, 1) rotate(-45.000000) translate(-292.970563, -44.470563) " points="280.970563 56.4705627 280.970563 32.4705627 280.970563 32.4705627 304.970563 32.4705627"></polyline></g></g>',2)];function Rp(n,e){return m.openBlock(),m.createElementBlock("svg",m.mergeProps({class:"bd-logo"},n.$attrs,{version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}),Np,16)}const Ga=Ge(Ip,[["render",Rp]]),Ja=/^https:/i,ao=m.defineComponent({__name:"BDLink",props:{to:{default:""},target:{default:"_blank"},text:{default:void 0},rel:{default:"noopener noreferrer"}},setup(n){const e=n,t=m.computed(()=>typeof e.to=="string"&&Ja.test(e.to)?"a":typeof e.to!="string"&&typeof m.resolveComponent("router-link")!="string"?"router-link":"div"),r=m.computed(()=>{if(typeof e.to=="string"&&Ja.test(e.to)){const{to:o,target:i,rel:s}=e;return{href:o,target:i,rel:s}}else{const{to:o}=e;return{to:o}}});return(o,i)=>(m.openBlock(),m.createBlock(m.resolveDynamicComponent(t.value),m.mergeProps({class:"bd-link"},r.value),{default:m.withCtx(()=>[m.renderSlot(o.$slots,"default",{},()=>[m.createTextVNode(m.toDisplayString(e.text),1)])]),_:3},16))}}),lo={PRIMARY:"primary",SECONDARY:"secondary",DANGER:"danger",WARNING:"warning",INFO:"info",SUCCESS:"success",LIGHT:"light"},Dp={key:0,class:"b-d-alert-title"},Ya=m.defineComponent({__name:"BDAlert",props:{variant:{default:lo.PRIMARY},title:{default:""}},setup(n){const e=n,t=m.computed(()=>["alert",`alert-${e.variant}`]);return(r,o)=>(m.openBlock(),m.createElementBlock("div",{class:m.normalizeClass(t.value),role:"alert"},[r.title?(m.openBlock(),m.createElementBlock("div",Dp,[m.createVNode(m.unref(so)),m.createElementVNode("span",null,[m.createElementVNode("strong",null,m.toDisplayString(e.title),1)])])):m.createCommentVNode("",!0),m.renderSlot(r.$slots,"default")],2))}}),Lp=["src","alt"],Pp=["textContent"],Ji=m.defineComponent({__name:"BDProfileImage",props:{showFooter:{type:Boolean,default:!1},size:{default:ot.LG},linkText:{default:""},src:{default:""},alt:{default:""}},emits:["click"],setup(n,{emit:e}){const t=()=>{e("click")};return(r,o)=>(m.openBlock(),m.createElementBlock("div",{class:m.normalizeClass(["bd-profile-picture rounded-circle",r.size])},[m.createElementVNode("img",{src:r.src,alt:r.alt,class:"position-absolute top-0 start-0"},null,8,Lp),r.showFooter?(m.openBlock(),m.createElementBlock("a",{key:0,class:"bd-profile-picture__footer position-absolute bottom-0 start-0",onClick:t,textContent:m.toDisplayString(r.linkText)},null,8,Pp)):m.createCommentVNode("",!0)],2))}});function Bp(n){return m.getCurrentScope()?(m.onScopeDispose(n),!0):!1}function co(n){return typeof n=="function"?n():m.unref(n)}const Fp=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Vp=n=>typeof n<"u",zp=Object.prototype.toString,$p=n=>zp.call(n)==="[object Object]",Yi=()=>{};function Hp(n,e){function t(...r){return new Promise((o,i)=>{Promise.resolve(n(()=>e.apply(this,r),{fn:e,thisArg:this,args:r})).then(o).catch(i)})}return t}function Up(n,e={}){let t,r,o=Yi;const i=l=>{clearTimeout(l),o(),o=Yi};return l=>{const a=co(n),c=co(e.maxWait);return t&&i(t),a<=0||c!==void 0&&c<=0?(r&&(i(r),r=null),Promise.resolve(l())):new Promise((u,d)=>{o=e.rejectOnCancel?d:u,c&&!r&&(r=setTimeout(()=>{t&&i(t),r=null,u(l())},c)),t=setTimeout(()=>{r&&i(r),r=null,u(l())},a)})}}function jp(n,e=200,t={}){return Hp(Up(e,t),n)}function Xa(n){var e;const t=co(n);return(e=t==null?void 0:t.$el)!=null?e:t}const Wp=Fp?window:void 0;function Za(...n){let e,t,r,o;if(typeof n[0]=="string"||Array.isArray(n[0])?([t,r,o]=n,e=Wp):[e,t,r,o]=n,!e)return Yi;Array.isArray(t)||(t=[t]),Array.isArray(r)||(r=[r]);const i=[],s=()=>{i.forEach(u=>u()),i.length=0},l=(u,d,f,h)=>(u.addEventListener(d,f,h),()=>u.removeEventListener(d,f,h)),a=m.watch(()=>[Xa(e),co(o)],([u,d])=>{if(s(),!u)return;const f=$p(d)?{...d}:d;i.push(...t.flatMap(h=>r.map(p=>l(u,h,p,f))))},{immediate:!0,flush:"post"}),c=()=>{a(),s()};return Bp(c),c}function Kp(n){return JSON.parse(JSON.stringify(n))}function Gp(n,e={}){const{initialValue:t=!1,focusVisible:r=!1}=e,o=m.ref(!1),i=m.computed(()=>Xa(n));Za(i,"focus",l=>{var a,c;(!r||(c=(a=l.target).matches)!=null&&c.call(a,":focus-visible"))&&(o.value=!0)}),Za(i,"blur",()=>o.value=!1);const s=m.computed({get:()=>o.value,set(l){var a,c;!l&&o.value?(a=i.value)==null||a.blur():l&&!o.value&&((c=i.value)==null||c.focus())}});return m.watch(i,()=>{s.value=t},{immediate:!0,flush:"post"}),{focused:s}}function Nn(n,e,t,r={}){var o,i,s;const{clone:l=!1,passive:a=!1,eventName:c,deep:u=!1,defaultValue:d,shouldEmit:f}=r,h=m.getCurrentInstance(),p=t||(h==null?void 0:h.emit)||((o=h==null?void 0:h.$emit)==null?void 0:o.bind(h))||((s=(i=h==null?void 0:h.proxy)==null?void 0:i.$emit)==null?void 0:s.bind(h==null?void 0:h.proxy));let g=c;e||(e="modelValue"),g=g||`update:${e.toString()}`;const y=k=>l?typeof l=="function"?l(k):Kp(k):k,S=()=>Vp(n[e])?y(n[e]):d,C=k=>{f?f(k)&&p(g,k):p(g,k)};if(a){const k=S(),b=m.ref(k);let R=!1;return m.watch(()=>n[e],w=>{R||(R=!0,b.value=y(w),m.nextTick(()=>R=!1))}),m.watch(b,w=>{!R&&(w!==n[e]||u)&&C(w)},{deep:u}),b}else return m.computed({get(){return S()},set(k){C(k)}})}const Jp={class:"bd-zoom-slider d-flex"},Yp=[m.createElementVNode("g",{transform:"matrix(0.8333333333333334,0,0,0.8333333333333334,0,0)"},[m.createElementVNode("path",{d:"M1.5 13.5h21a1.5 1.5 0 0 0 0-3h-21a1.5 1.5 0 0 0 0 3z","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"0"})],-1)],Xp=["max"],Zp=[m.createElementVNode("g",{transform:"matrix(0.8333333333333334,0,0,0.8333333333333334,0,0)"},[m.createElementVNode("path",{d:"M0 12a1.5 1.5 0 0 0 1.5 1.5h8.75a.25.25 0 0 1 .25.25v8.75a1.5 1.5 0 0 0 3 0v-8.75a.25.25 0 0 1 .25-.25h8.75a1.5 1.5 0 0 0 0-3h-8.75a.25.25 0 0 1-.25-.25V1.5a1.5 1.5 0 0 0-3 0v8.75a.25.25 0 0 1-.25.25H1.5A1.5 1.5 0 0 0 0 12z","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"0"})],-1)],Qa=m.defineComponent({__name:"BDZoomslider",props:{modelValue:{},maxValue:{default:5}},emits:["update:modelValue"],setup(n,{emit:e}){const t=n,r=Nn(t,"modelValue",e);function o(){r.value!==0&&r.value--}function i(){r.value<t.maxValue&&r.value++}return(s,l)=>(m.openBlock(),m.createElementBlock("div",Jp,[(m.openBlock(),m.createElementBlock("svg",{class:"bd-zoom-slider-min-button",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",fill:"#000000",stroke:"#000000",height:"20",width:"20",onClick:o},Yp)),m.withDirectives(m.createElementVNode("input",{type:"range","onUpdate:modelValue":l[0]||(l[0]=a=>m.isRef(r)?r.value=a:null),min:"0",max:s.maxValue,class:"bd-zoom-slider-input"},null,8,Xp),[[m.vModelText,m.unref(r)]]),(m.openBlock(),m.createElementBlock("svg",{class:"bd-zoom-slider-plus-button",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",fill:"#000000",stroke:"#000000",height:"20",width:"20",onClick:i},Zp))]))}});for(var Rn=256,_a=[],qa=256,uo;Rn--;)_a[Rn]=(Rn+256).toString(16).substring(1);function Qp(n){var e=0,t=n||11;if(!uo||Rn+t>qa*2)for(uo="",Rn=0;e<qa;e++)uo+=_a[Math.random()*256|0];return uo.substring(Rn,Rn+++t)}function Cr(){return{uniqueIdentifier:m.ref(Qp())}}const _p=["id"],qp={key:0},Xi=m.defineComponent({__name:"BDCard",props:{class:{default:""},title:{default:""},noHeader:{type:Boolean,default:!1},noBody:{type:Boolean,default:!1},headerClass:{default:""},bodyClass:{default:""},id:{default:0},headerVariant:{default:"primary"}},setup(n){const e=n,{uniqueIdentifier:t}=Cr(),r=t.value,o=m.computed(()=>({"bd-card card":!0,[`${e.class}`]:e.class,"no-body":e.noBody})),i=m.computed(()=>({"card-header":!0,"no-title":!e.title,[`${e.headerClass}`]:e.headerClass,[`${e.headerVariant}`]:e.headerVariant})),s=m.computed(()=>({"card-body":!0,[`${e.bodyClass}`]:e.bodyClass}));return(l,a)=>(m.openBlock(),m.createElementBlock("div",{id:m.unref(r),class:m.normalizeClass(o.value)},[!l.noHeader||l.noBody?(m.openBlock(),m.createElementBlock("div",{key:0,class:m.normalizeClass(i.value)},[m.renderSlot(l.$slots,"header",{},()=>[l.title?(m.openBlock(),m.createElementBlock("h2",qp,m.toDisplayString(l.title),1)):m.createCommentVNode("",!0)])],2)):m.createCommentVNode("",!0),l.noBody?m.createCommentVNode("",!0):(m.openBlock(),m.createElementBlock("div",{key:1,class:m.normalizeClass(s.value)},[m.renderSlot(l.$slots,"body")],2))],10,_p))}}),eh={key:0},th={class:"bd-collapsable-card__actions"},nh=["data-bs-target"],el=m.defineComponent({__name:"BDCollapsableCard",props:{title:{default:"Title"},disabled:{type:Boolean,default:!1},showOn:{default:"md"},visible:{type:Boolean,default:!0}},setup(n){const e=n,{uniqueIdentifier:t}=Cr(),r=t.value,o=m.computed(()=>`bd-collapsable-card__collapse-${r}`),i=m.computed(()=>({"d-block":[ot.SM,ot.MD].includes(e.showOn.toLowerCase()),"d-md-none":e.showOn.toLowerCase()==ot.SM,"d-lg-none":e.showOn.toLowerCase()==ot.MD})),s=m.computed(()=>{let a={"round-corners-sm":e.showOn.toLowerCase()==ot.SM,"round-corners-md":e.showOn.toLowerCase()==ot.MD,"is-disabled":e.disabled,"round-corners":!e.visible};return Object.keys(a).filter(c=>a[c]).join(" ")}),l=m.computed(()=>{let a={collapse:!0,show:!0,"collapsable-body":!0,[`${o.value}`]:!0,"display-none":!e.visible||e.disabled,"open-collapse-lg":e.visible&&[ot.SM,ot.MD].includes(e.showOn.toLowerCase()),"open-collapse-md":e.showOn.toLowerCase()==ot.SM&&e.visible};return Object.keys(a).filter(c=>a[c]).join(" ")});return(a,c)=>(m.openBlock(),m.createBlock(Xi,{class:"bd-collapsable-card",title:a.title,"header-class":s.value,"body-class":l.value},{header:m.withCtx(()=>[a.title?(m.openBlock(),m.createElementBlock("h2",eh,m.toDisplayString(a.title),1)):m.createCommentVNode("",!0),m.createElementVNode("div",th,[m.renderSlot(a.$slots,"action"),!a.disabled&&a.visible?(m.openBlock(),m.createElementBlock("button",{key:0,class:m.normalizeClass(["btn btn-white btn-caret",i.value]),type:"button","data-bs-toggle":"collapse","data-bs-target":`.${o.value}`,"aria-expanded":"true"},[m.createVNode(m.unref(Ka))],10,nh)):m.createCommentVNode("",!0)])]),body:m.withCtx(()=>[m.renderSlot(a.$slots,"body")]),_:3},8,["title","header-class","body-class"]))}}),rh=["value","type"],tl=m.defineComponent({__name:"BDFormInput",props:{modelValue:{default:""},formGroupClass:{default:void 0},type:{default:"text"},label:{default:void 0},labelClass:{default:void 0},formFieldClass:{default:void 0},inputClass:{default:void 0},placeholder:{default:void 0},state:{type:[Boolean,null],default:null},readonly:{type:[Boolean,null],default:null},disabled:{type:[Boolean,null],default:null},autofocus:{type:[Boolean,null],default:null},size:{default:ot.MD},tabindex:{default:null},invalidFeedbackClass:{default:void 0},invalidFeedbackText:{default:void 0},delayTimeMs:{default:0}},emits:["update:modelValue","click","blur","enter"],setup(n,{emit:e}){const t=n,{uniqueIdentifier:r}=Cr(),o=Nn(t,"modelValue",e),i=`__BD__FORM__LABEL__${r.value}`,s=`__BD__FORM__GROUP__${r.value}`,l=`form-input-${t.label?t.label.replace(/ /g,"-").toLowerCase():r.value}`,a=`validationFeedback${t.label?t.label.replace(/ /g,""):r.value}`,c=m.computed(()=>({[`${t.inputClass}`]:t.inputClass,"is-invalid":t.state===!1,"is-valid":t.state===!0,[`form-control-${t.size}`]:t.size})),u=m.computed(()=>({placeholder:t.placeholder?t.placeholder:null,readonly:t.readonly===!0,disabled:t.disabled===!0,autofocus:t.autofocus===!0,tabindex:t.tabindex?t.tabindex:null,"aria-describedby":t.state===!1?a:null})),d=jp(f=>{o.value=f.target.value},t.delayTimeMs);return(f,h)=>(m.openBlock(),m.createElementBlock("div",{class:m.normalizeClass(["bd-form-input",f.formGroupClass]),id:s},[m.renderSlot(f.$slots,"label",{},()=>[f.label?(m.openBlock(),m.createElementBlock("label",{key:0,for:l,id:i,class:m.normalizeClass(["form-label",f.labelClass])},m.toDisplayString(f.label),3)):m.createCommentVNode("",!0)]),m.createElementVNode("div",{class:m.normalizeClass(f.formFieldClass)},[m.createElementVNode("input",m.mergeProps({value:f.modelValue,type:f.type,id:l,class:["form-control",c.value]},u.value,{onInput:h[0]||(h[0]=(...p)=>m.unref(d)&&m.unref(d)(...p)),onClick:h[1]||(h[1]=p=>f.$emit("click")),onBlur:h[2]||(h[2]=p=>f.$emit("blur")),onKeydown:h[3]||(h[3]=m.withKeys(p=>f.$emit("enter"),["enter"]))}),null,16,rh),m.renderSlot(f.$slots,"default"),m.createVNode(m.unref(fo),{text:f.invalidFeedbackText,class:m.normalizeClass(f.invalidFeedbackClass),state:f.state,id:a},null,8,["text","class","state"])],2)],2))}}),oh=["for"],nl=m.defineComponent({__name:"BDInputGroup",props:{label:{default:void 0},labelForId:{default:void 0}},setup(n){const e=n,t=m.useAttrs();return(r,o)=>(m.openBlock(),m.createElementBlock(m.Fragment,null,[e.label?(m.openBlock(),m.createElementBlock("label",{key:0,for:e.labelForId,class:"form-label"},m.toDisplayString(e.label),9,oh)):m.createCommentVNode("",!0),m.createElementVNode("div",{class:m.normalizeClass(["input-group bd-input-group",m.unref(t).class])},[m.renderSlot(r.$slots,"default")],2)],64))}}),ih={class:"invalid-feedback bd-invalid-feedback"},fo=m.defineComponent({__name:"BDFormInvalidFeedback",props:{state:{type:[Boolean,null],default:null},text:{default:""}},setup(n){return(e,t)=>(m.openBlock(),m.createElementBlock("div",ih,[m.createVNode(m.unref(io)),m.createTextVNode(" "+m.toDisplayString(e.text),1)]))}}),rl=m.defineComponent({__name:"BDBadge",props:{variant:{default:lo.PRIMARY}},setup(n){const e=n,t=m.computed(()=>["badge","bd-badge",`text-bg-${e.variant}`]);return(r,o)=>(m.openBlock(),m.createElementBlock("span",{role:"status",class:m.normalizeClass(t.value)},[m.renderSlot(r.$slots,"default")],2))}}),sh=["onSubmit","onReset"],ol=m.defineComponent({__name:"BDForm",emits:["submit","reset"],setup(n,{emit:e}){function t(){e("submit")}function r(){e("reset")}return(o,i)=>(m.openBlock(),m.createElementBlock("form",{onSubmit:m.withModifiers(t,["prevent"]),onReset:m.withModifiers(r,["prevent"])},[m.renderSlot(o.$slots,"default")],40,sh))}}),ah={"aria-label":"Page navigation",class:"bd-pagination"},lh={class:"page-item"},ch=["data-page"],uh=["data-page"],dh={class:"page-item"},fh=["data-page"],il=m.defineComponent({__name:"BDPagination",props:{modelValue:{default:1},totalRows:{default:1},rowsPerPage:{default:10},isPatient:{type:Boolean,default:!0}},emits:["click","update:modelValue"],setup(n,{emit:e}){const t=n,r=Nn(t,"modelValue",e),o=m.ref(Math.ceil(t.totalRows/t.rowsPerPage)),i=m.ref([]);m.watch([()=>t.totalRows,()=>t.rowsPerPage],()=>{o.value=Math.ceil(t.totalRows/t.rowsPerPage),i.value=a()}),m.onMounted(()=>{i.value=a()});const s=m.computed(()=>({[`${t.class}`]:t.class,colleague:!t.isPatient})),l=c=>{const u=c.currentTarget.getAttribute("data-page");isNaN(Number(u))||(r.value=Number(u)),i.value=a(),e("click",r.value)},a=()=>{const c=[],u=o.value,d=7;if(u<=d)for(let f=1;f<=u;f++)c.push(f);else{const h=Math.floor((d-3)/2);if(r.value<=h+2){for(let p=1;p<=h+3;p++)c.push(p);c.push("..."),c.push(u)}else if(r.value>=u-h-1){c.push(1),c.push("...");for(let p=u-h-3;p<=u;p++)c.push(p)}else{c.push(1),c.push("...");for(let p=r.value-1;p<=r.value+1;p++)c.push(p);c.push("..."),c.push(u)}}return c};return(c,u)=>(m.openBlock(),m.createElementBlock("div",ah,[m.createElementVNode("ul",{class:m.normalizeClass(["pagination",s.value])},[m.withDirectives(m.createElementVNode("li",lh,[m.createElementVNode("a",{class:"page-link d-flex justify-content-center align-items-center","aria-label":"Previous",onClick:l,"data-page":m.unref(r)-1},[m.createVNode(m.unref(zi))],8,ch)],512),[[m.vShow,m.unref(r)>1]]),(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(i.value,d=>(m.openBlock(),m.createElementBlock("li",{class:m.normalizeClass(["page-item",{active:m.unref(r)===d,disabled:typeof d=="string"}]),key:d},[m.createElementVNode("a",{class:"page-link d-flex justify-content-center align-items-center",onClick:l,"data-page":d},m.toDisplayString(d),9,uh)],2))),128)),m.withDirectives(m.createElementVNode("li",dh,[m.createElementVNode("a",{class:"page-link d-flex justify-content-center align-items-center","aria-label":"Next",onClick:l,"data-page":m.unref(r)+1},[m.createVNode(m.unref(Vi))],8,fh)],512),[[m.vShow,m.unref(r)<o.value]])],2)]))}}),ph=["disabled"],hh=["value"],sl=m.defineComponent({__name:"BDFormSelect",props:{size:{default:ot.MD},disabled:{type:Boolean},autofocus:{type:Boolean,default:!1},options:{default:void 0},modelValue:{default:""},state:{type:[Boolean,null],default:null}},emits:["update:modelValue","change","input"],setup(n,{emit:e}){const t=n,r=Nn(t,"modelValue",e),o=m.ref(null),{focused:i}=Gp(o,{initialValue:t.autofocus}),s=m.computed(()=>({"form-select":!0,"bd-form-select":!0,"is-invalid":t.state===!1,[`form-select-${t.size}`]:["xs","sm","lg"].includes(t.size)}));m.watch(()=>t.autofocus,c=>{c&&(i.value=!0)});const l=c=>{r.value=c.target.value,e("input",c.target.value)},a=c=>{e("change",c.target.value)};return(c,u)=>m.withDirectives((m.openBlock(),m.createElementBlock("select",{class:m.normalizeClass(s.value),"onUpdate:modelValue":u[0]||(u[0]=d=>m.isRef(r)?r.value=d:null),disabled:t.disabled,ref_key:"input",ref:o,onInput:l,onChange:a},[m.renderSlot(c.$slots,"first",{},()=>[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(t.options,d=>(m.openBlock(),m.createElementBlock("option",{value:d.value,key:d.value},m.toDisplayString(d.text),9,hh))),128))])],42,ph)),[[m.vModelSelect,m.unref(r)]])}}),mh=["value","true-value","false-value","data-checked"],al=m.defineComponent({__name:"BDFormCheckbox",props:{modelValue:{type:[Boolean,String],default:void 0},value:{type:[Boolean,String],default:!0},uncheckedValue:{type:[Boolean,String],default:!1},state:{type:[Boolean,null],default:void 0}},emits:["update:modelValue","change","input"],setup(n,{emit:e}){const t=n,{uniqueIdentifier:r}=Cr(),o=Nn(t,"modelValue",e),i=`form-check-input-${r.value}`,s=m.computed(()=>["form-check","bd-form-checkbox"]),l=m.computed(()=>({"form-check-input":!0,"is-invalid":t.state===!1})),a=u=>{e("input",u.target.value)},c=u=>{e("change",u.target.value)};return(u,d)=>(m.openBlock(),m.createElementBlock("div",{class:m.normalizeClass(s.value)},[m.withDirectives(m.createElementVNode("input",{"onUpdate:modelValue":d[0]||(d[0]=f=>m.isRef(o)?o.value=f:null),class:m.normalizeClass(l.value),type:"checkbox",value:u.value,"true-value":u.value,"false-value":u.uncheckedValue,id:i,onChange:c,onInput:a,"data-checked":m.unref(o)===u.value},null,42,mh),[[m.vModelCheckbox,m.unref(o)]]),m.createElementVNode("label",{class:"form-check-label",for:i},[m.renderSlot(u.$slots,"default")]),m.renderSlot(u.$slots,"last")],2))}}),gh={key:0,class:"bd-article__body"},yh={key:1},ll=m.defineComponent({__name:"BDArticle",props:{title:{default:""},text:{default:""},hideBody:{type:Boolean,default:!1},hideFooter:{type:Boolean,default:!1},identifier:{}},emits:["click"],setup(n,{emit:e}){const t=n,r=o=>e("click",{event:o,identifier:t.identifier});return(o,i)=>(m.openBlock(),m.createElementBlock("article",{class:"bd-article",onClick:r},[m.createElementVNode("header",null,[m.renderSlot(o.$slots,"header",{},()=>[m.createElementVNode("h5",null,m.toDisplayString(t.title),1)])]),t.hideBody?m.createCommentVNode("",!0):(m.openBlock(),m.createElementBlock("div",gh,[m.renderSlot(o.$slots,"default",{},()=>[m.createTextVNode(m.toDisplayString(t.text),1)])])),t.hideFooter?m.createCommentVNode("",!0):(m.openBlock(),m.createElementBlock("footer",yh,[m.renderSlot(o.$slots,"footer")]))]))}}),cl={DANGER:"danger",WARNING:"warning",INFO:"info",SUCCESS:"success"},vh=["id"],bh=m.createElementVNode("div",{class:"toast-left-border"},null,-1),xh={class:"toast-header"},Sh=m.createElementVNode("button",{type:"button",class:"btn-close","data-bs-dismiss":"toast","aria-label":"Close"},null,-1),Eh={class:"toast-body"},ul=m.defineComponent({__name:"BDToast",props:{id:{},show:{type:Boolean,default:!1},variant:{default:cl.INFO},teleport:{default:{to:"body",disabled:!1}},title:{default:""},text:{default:""}},setup(n){const e=n,t=m.computed(()=>({show:e.show,[`bd-toast-${e.variant}`]:!0})),r=m.computed(()=>e.variant!==cl.SUCCESS);return(o,i)=>(m.openBlock(),m.createBlock(m.Teleport,m.normalizeProps(m.guardReactiveProps(e.teleport)),[m.createElementVNode("div",{class:m.normalizeClass(["toast bd-toast",t.value]),role:"alert","aria-live":"assertive","aria-atomic":"true",id:e.id},[bh,m.createElementVNode("div",xh,[r.value?(m.openBlock(),m.createBlock(m.unref(so),{key:0})):(m.openBlock(),m.createBlock(m.unref(oo),{key:1})),m.createElementVNode("h5",null,m.toDisplayString(e.title),1),Sh]),m.createElementVNode("div",Eh,[m.createElementVNode("span",null,m.toDisplayString(e.text),1)])],10,vh)],16))}}),dl=m.defineComponent({__name:"BDDropdownItem",props:{to:{default:""},target:{default:"_blank"},text:{default:void 0},rel:{default:"noopener noreferrer"}},emits:["click"],setup(n,{emit:e}){const t=n,r=()=>{e("click")};return(o,i)=>(m.openBlock(),m.createElementBlock("li",m.mergeProps({class:"bd-dropdown-item"},o.$attrs),[m.createVNode(ao,m.mergeProps({class:"dropdown-item",onClick:r},t),{default:m.withCtx(()=>[m.renderSlot(o.$slots,"default",{},()=>[m.createTextVNode(m.toDisplayString(t.text),1)])]),_:3},16)],16))}});function Ch(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var fl={exports:{}};(function(n,e){(function(r,o){n.exports=o()})(self,function(){return function(){var t={3099:function(s){s.exports=function(l){if(typeof l!="function")throw TypeError(String(l)+" is not a function");return l}},6077:function(s,l,a){var c=a(111);s.exports=function(u){if(!c(u)&&u!==null)throw TypeError("Can't set "+String(u)+" as a prototype");return u}},1223:function(s,l,a){var c=a(5112),u=a(30),d=a(3070),f=c("unscopables"),h=Array.prototype;h[f]==null&&d.f(h,f,{configurable:!0,value:u(null)}),s.exports=function(p){h[f][p]=!0}},1530:function(s,l,a){var c=a(8710).charAt;s.exports=function(u,d,f){return d+(f?c(u,d).length:1)}},5787:function(s){s.exports=function(l,a,c){if(!(l instanceof a))throw TypeError("Incorrect "+(c?c+" ":"")+"invocation");return l}},9670:function(s,l,a){var c=a(111);s.exports=function(u){if(!c(u))throw TypeError(String(u)+" is not an object");return u}},4019:function(s){s.exports=typeof ArrayBuffer<"u"&&typeof DataView<"u"},260:function(s,l,a){var c=a(4019),u=a(9781),d=a(7854),f=a(111),h=a(6656),p=a(648),g=a(8880),y=a(1320),S=a(3070).f,C=a(9518),k=a(7674),b=a(5112),R=a(9711),w=d.Int8Array,F=w&&w.prototype,z=d.Uint8ClampedArray,$=z&&z.prototype,V=w&&C(w),B=F&&C(F),P=Object.prototype,U=P.isPrototypeOf,Y=b("toStringTag"),Z=R("TYPED_ARRAY_TAG"),Q=c&&!!k&&p(d.opera)!=="Opera",re=!1,W,le={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},de={BigInt64Array:8,BigUint64Array:8},ye=function(A){if(!f(A))return!1;var M=p(A);return M==="DataView"||h(le,M)||h(de,M)},Ee=function(ge){if(!f(ge))return!1;var A=p(ge);return h(le,A)||h(de,A)},be=function(ge){if(Ee(ge))return ge;throw TypeError("Target is not a typed array")},Te=function(ge){if(k){if(U.call(V,ge))return ge}else for(var A in le)if(h(le,W)){var M=d[A];if(M&&(ge===M||U.call(M,ge)))return ge}throw TypeError("Target is not a typed array constructor")},ke=function(ge,A,M){if(u){if(M)for(var E in le){var O=d[E];O&&h(O.prototype,ge)&&delete O.prototype[ge]}(!B[ge]||M)&&y(B,ge,M?A:Q&&F[ge]||A)}},Ae=function(ge,A,M){var E,O;if(u){if(k){if(M)for(E in le)O=d[E],O&&h(O,ge)&&delete O[ge];if(!V[ge]||M)try{return y(V,ge,M?A:Q&&w[ge]||A)}catch{}else return}for(E in le)O=d[E],O&&(!O[ge]||M)&&y(O,ge,A)}};for(W in le)d[W]||(Q=!1);if((!Q||typeof V!="function"||V===Function.prototype)&&(V=function(){throw TypeError("Incorrect invocation")},Q))for(W in le)d[W]&&k(d[W],V);if((!Q||!B||B===P)&&(B=V.prototype,Q))for(W in le)d[W]&&k(d[W].prototype,B);if(Q&&C($)!==B&&k($,B),u&&!h(B,Y)){re=!0,S(B,Y,{get:function(){return f(this)?this[Z]:void 0}});for(W in le)d[W]&&g(d[W],Z,W)}s.exports={NATIVE_ARRAY_BUFFER_VIEWS:Q,TYPED_ARRAY_TAG:re&&Z,aTypedArray:be,aTypedArrayConstructor:Te,exportTypedArrayMethod:ke,exportTypedArrayStaticMethod:Ae,isView:ye,isTypedArray:Ee,TypedArray:V,TypedArrayPrototype:B}},3331:function(s,l,a){var c=a(7854),u=a(9781),d=a(4019),f=a(8880),h=a(2248),p=a(7293),g=a(5787),y=a(9958),S=a(7466),C=a(7067),k=a(1179),b=a(9518),R=a(7674),w=a(8006).f,F=a(3070).f,z=a(1285),$=a(8003),V=a(9909),B=V.get,P=V.set,U="ArrayBuffer",Y="DataView",Z="prototype",Q="Wrong length",re="Wrong index",W=c[U],le=W,de=c[Y],ye=de&&de[Z],Ee=Object.prototype,be=c.RangeError,Te=k.pack,ke=k.unpack,Ae=function(G){return[G&255]},ge=function(G){return[G&255,G>>8&255]},A=function(G){return[G&255,G>>8&255,G>>16&255,G>>24&255]},M=function(G){return G[3]<<24|G[2]<<16|G[1]<<8|G[0]},E=function(G){return Te(G,23,4)},O=function(G){return Te(G,52,8)},v=function(G,J){F(G[Z],J,{get:function(){return B(this)[J]}})},x=function(G,J,q,ce){var me=C(q),Me=B(G);if(me+J>Me.byteLength)throw be(re);var Fe=B(Me.buffer).bytes,Be=me+Me.byteOffset,Ne=Fe.slice(Be,Be+J);return ce?Ne:Ne.reverse()},I=function(G,J,q,ce,me,Me){var Fe=C(q),Be=B(G);if(Fe+J>Be.byteLength)throw be(re);for(var Ne=B(Be.buffer).bytes,Ke=Fe+Be.byteOffset,yt=ce(+me),rt=0;rt<J;rt++)Ne[Ke+rt]=yt[Me?rt:J-rt-1]};if(!d)le=function(J){g(this,le,U);var q=C(J);P(this,{bytes:z.call(new Array(q),0),byteLength:q}),u||(this.byteLength=q)},de=function(J,q,ce){g(this,de,Y),g(J,le,Y);var me=B(J).byteLength,Me=y(q);if(Me<0||Me>me)throw be("Wrong offset");if(ce=ce===void 0?me-Me:S(ce),Me+ce>me)throw be(Q);P(this,{buffer:J,byteLength:ce,byteOffset:Me}),u||(this.buffer=J,this.byteLength=ce,this.byteOffset=Me)},u&&(v(le,"byteLength"),v(de,"buffer"),v(de,"byteLength"),v(de,"byteOffset")),h(de[Z],{getInt8:function(J){return x(this,1,J)[0]<<24>>24},getUint8:function(J){return x(this,1,J)[0]},getInt16:function(J){var q=x(this,2,J,arguments.length>1?arguments[1]:void 0);return(q[1]<<8|q[0])<<16>>16},getUint16:function(J){var q=x(this,2,J,arguments.length>1?arguments[1]:void 0);return q[1]<<8|q[0]},getInt32:function(J){return M(x(this,4,J,arguments.length>1?arguments[1]:void 0))},getUint32:function(J){return M(x(this,4,J,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(J){return ke(x(this,4,J,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(J){return ke(x(this,8,J,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(J,q){I(this,1,J,Ae,q)},setUint8:function(J,q){I(this,1,J,Ae,q)},setInt16:function(J,q){I(this,2,J,ge,q,arguments.length>2?arguments[2]:void 0)},setUint16:function(J,q){I(this,2,J,ge,q,arguments.length>2?arguments[2]:void 0)},setInt32:function(J,q){I(this,4,J,A,q,arguments.length>2?arguments[2]:void 0)},setUint32:function(J,q){I(this,4,J,A,q,arguments.length>2?arguments[2]:void 0)},setFloat32:function(J,q){I(this,4,J,E,q,arguments.length>2?arguments[2]:void 0)},setFloat64:function(J,q){I(this,8,J,O,q,arguments.length>2?arguments[2]:void 0)}});else{if(!p(function(){W(1)})||!p(function(){new W(-1)})||p(function(){return new W,new W(1.5),new W(NaN),W.name!=U})){le=function(J){return g(this,le),new W(C(J))};for(var N=le[Z]=W[Z],D=w(W),L=0,H;D.length>L;)(H=D[L++])in le||f(le,H,W[H]);N.constructor=le}R&&b(ye)!==Ee&&R(ye,Ee);var K=new de(new le(2)),j=ye.setInt8;K.setInt8(0,2147483648),K.setInt8(1,2147483649),(K.getInt8(0)||!K.getInt8(1))&&h(ye,{setInt8:function(J,q){j.call(this,J,q<<24>>24)},setUint8:function(J,q){j.call(this,J,q<<24>>24)}},{unsafe:!0})}$(le,U),$(de,Y),s.exports={ArrayBuffer:le,DataView:de}},1048:function(s,l,a){var c=a(7908),u=a(1400),d=a(7466),f=Math.min;s.exports=[].copyWithin||function(p,g){var y=c(this),S=d(y.length),C=u(p,S),k=u(g,S),b=arguments.length>2?arguments[2]:void 0,R=f((b===void 0?S:u(b,S))-k,S-C),w=1;for(k<C&&C<k+R&&(w=-1,k+=R-1,C+=R-1);R-- >0;)k in y?y[C]=y[k]:delete y[C],C+=w,k+=w;return y}},1285:function(s,l,a){var c=a(7908),u=a(1400),d=a(7466);s.exports=function(h){for(var p=c(this),g=d(p.length),y=arguments.length,S=u(y>1?arguments[1]:void 0,g),C=y>2?arguments[2]:void 0,k=C===void 0?g:u(C,g);k>S;)p[S++]=h;return p}},8533:function(s,l,a){var c=a(2092).forEach,u=a(9341),d=u("forEach");s.exports=d?[].forEach:function(h){return c(this,h,arguments.length>1?arguments[1]:void 0)}},8457:function(s,l,a){var c=a(9974),u=a(7908),d=a(3411),f=a(7659),h=a(7466),p=a(6135),g=a(1246);s.exports=function(S){var C=u(S),k=typeof this=="function"?this:Array,b=arguments.length,R=b>1?arguments[1]:void 0,w=R!==void 0,F=g(C),z=0,$,V,B,P,U,Y;if(w&&(R=c(R,b>2?arguments[2]:void 0,2)),F!=null&&!(k==Array&&f(F)))for(P=F.call(C),U=P.next,V=new k;!(B=U.call(P)).done;z++)Y=w?d(P,R,[B.value,z],!0):B.value,p(V,z,Y);else for($=h(C.length),V=new k($);$>z;z++)Y=w?R(C[z],z):C[z],p(V,z,Y);return V.length=z,V}},1318:function(s,l,a){var c=a(5656),u=a(7466),d=a(1400),f=function(h){return function(p,g,y){var S=c(p),C=u(S.length),k=d(y,C),b;if(h&&g!=g){for(;C>k;)if(b=S[k++],b!=b)return!0}else for(;C>k;k++)if((h||k in S)&&S[k]===g)return h||k||0;return!h&&-1}};s.exports={includes:f(!0),indexOf:f(!1)}},2092:function(s,l,a){var c=a(9974),u=a(8361),d=a(7908),f=a(7466),h=a(5417),p=[].push,g=function(y){var S=y==1,C=y==2,k=y==3,b=y==4,R=y==6,w=y==7,F=y==5||R;return function(z,$,V,B){for(var P=d(z),U=u(P),Y=c($,V,3),Z=f(U.length),Q=0,re=B||h,W=S?re(z,Z):C||w?re(z,0):void 0,le,de;Z>Q;Q++)if((F||Q in U)&&(le=U[Q],de=Y(le,Q,P),y))if(S)W[Q]=de;else if(de)switch(y){case 3:return!0;case 5:return le;case 6:return Q;case 2:p.call(W,le)}else switch(y){case 4:return!1;case 7:p.call(W,le)}return R?-1:k||b?b:W}};s.exports={forEach:g(0),map:g(1),filter:g(2),some:g(3),every:g(4),find:g(5),findIndex:g(6),filterOut:g(7)}},6583:function(s,l,a){var c=a(5656),u=a(9958),d=a(7466),f=a(9341),h=Math.min,p=[].lastIndexOf,g=!!p&&1/[1].lastIndexOf(1,-0)<0,y=f("lastIndexOf"),S=g||!y;s.exports=S?function(k){if(g)return p.apply(this,arguments)||0;var b=c(this),R=d(b.length),w=R-1;for(arguments.length>1&&(w=h(w,u(arguments[1]))),w<0&&(w=R+w);w>=0;w--)if(w in b&&b[w]===k)return w||0;return-1}:p},1194:function(s,l,a){var c=a(7293),u=a(5112),d=a(7392),f=u("species");s.exports=function(h){return d>=51||!c(function(){var p=[],g=p.constructor={};return g[f]=function(){return{foo:1}},p[h](Boolean).foo!==1})}},9341:function(s,l,a){var c=a(7293);s.exports=function(u,d){var f=[][u];return!!f&&c(function(){f.call(null,d||function(){throw 1},1)})}},3671:function(s,l,a){var c=a(3099),u=a(7908),d=a(8361),f=a(7466),h=function(p){return function(g,y,S,C){c(y);var k=u(g),b=d(k),R=f(k.length),w=p?R-1:0,F=p?-1:1;if(S<2)for(;;){if(w in b){C=b[w],w+=F;break}if(w+=F,p?w<0:R<=w)throw TypeError("Reduce of empty array with no initial value")}for(;p?w>=0:R>w;w+=F)w in b&&(C=y(C,b[w],w,k));return C}};s.exports={left:h(!1),right:h(!0)}},5417:function(s,l,a){var c=a(111),u=a(3157),d=a(5112),f=d("species");s.exports=function(h,p){var g;return u(h)&&(g=h.constructor,typeof g=="function"&&(g===Array||u(g.prototype))?g=void 0:c(g)&&(g=g[f],g===null&&(g=void 0))),new(g===void 0?Array:g)(p===0?0:p)}},3411:function(s,l,a){var c=a(9670),u=a(9212);s.exports=function(d,f,h,p){try{return p?f(c(h)[0],h[1]):f(h)}catch(g){throw u(d),g}}},7072:function(s,l,a){var c=a(5112),u=c("iterator"),d=!1;try{var f=0,h={next:function(){return{done:!!f++}},return:function(){d=!0}};h[u]=function(){return this},Array.from(h,function(){throw 2})}catch{}s.exports=function(p,g){if(!g&&!d)return!1;var y=!1;try{var S={};S[u]=function(){return{next:function(){return{done:y=!0}}}},p(S)}catch{}return y}},4326:function(s){var l={}.toString;s.exports=function(a){return l.call(a).slice(8,-1)}},648:function(s,l,a){var c=a(1694),u=a(4326),d=a(5112),f=d("toStringTag"),h=u(function(){return arguments}())=="Arguments",p=function(g,y){try{return g[y]}catch{}};s.exports=c?u:function(g){var y,S,C;return g===void 0?"Undefined":g===null?"Null":typeof(S=p(y=Object(g),f))=="string"?S:h?u(y):(C=u(y))=="Object"&&typeof y.callee=="function"?"Arguments":C}},9920:function(s,l,a){var c=a(6656),u=a(3887),d=a(1236),f=a(3070);s.exports=function(h,p){for(var g=u(p),y=f.f,S=d.f,C=0;C<g.length;C++){var k=g[C];c(h,k)||y(h,k,S(p,k))}}},8544:function(s,l,a){var c=a(7293);s.exports=!c(function(){function u(){}return u.prototype.constructor=null,Object.getPrototypeOf(new u)!==u.prototype})},4994:function(s,l,a){var c=a(3383).IteratorPrototype,u=a(30),d=a(9114),f=a(8003),h=a(7497),p=function(){return this};s.exports=function(g,y,S){var C=y+" Iterator";return g.prototype=u(c,{next:d(1,S)}),f(g,C,!1,!0),h[C]=p,g}},8880:function(s,l,a){var c=a(9781),u=a(3070),d=a(9114);s.exports=c?function(f,h,p){return u.f(f,h,d(1,p))}:function(f,h,p){return f[h]=p,f}},9114:function(s){s.exports=function(l,a){return{enumerable:!(l&1),configurable:!(l&2),writable:!(l&4),value:a}}},6135:function(s,l,a){var c=a(7593),u=a(3070),d=a(9114);s.exports=function(f,h,p){var g=c(h);g in f?u.f(f,g,d(0,p)):f[g]=p}},654:function(s,l,a){var c=a(2109),u=a(4994),d=a(9518),f=a(7674),h=a(8003),p=a(8880),g=a(1320),y=a(5112),S=a(1913),C=a(7497),k=a(3383),b=k.IteratorPrototype,R=k.BUGGY_SAFARI_ITERATORS,w=y("iterator"),F="keys",z="values",$="entries",V=function(){return this};s.exports=function(B,P,U,Y,Z,Q,re){u(U,P,Y);var W=function(A){if(A===Z&&be)return be;if(!R&&A in ye)return ye[A];switch(A){case F:return function(){return new U(this,A)};case z:return function(){return new U(this,A)};case $:return function(){return new U(this,A)}}return function(){return new U(this)}},le=P+" Iterator",de=!1,ye=B.prototype,Ee=ye[w]||ye["@@iterator"]||Z&&ye[Z],be=!R&&Ee||W(Z),Te=P=="Array"&&ye.entries||Ee,ke,Ae,ge;if(Te&&(ke=d(Te.call(new B)),b!==Object.prototype&&ke.next&&(!S&&d(ke)!==b&&(f?f(ke,b):typeof ke[w]!="function"&&p(ke,w,V)),h(ke,le,!0,!0),S&&(C[le]=V))),Z==z&&Ee&&Ee.name!==z&&(de=!0,be=function(){return Ee.call(this)}),(!S||re)&&ye[w]!==be&&p(ye,w,be),C[P]=be,Z)if(Ae={values:W(z),keys:Q?be:W(F),entries:W($)},re)for(ge in Ae)(R||de||!(ge in ye))&&g(ye,ge,Ae[ge]);else c({target:P,proto:!0,forced:R||de},Ae);return Ae}},9781:function(s,l,a){var c=a(7293);s.exports=!c(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},317:function(s,l,a){var c=a(7854),u=a(111),d=c.document,f=u(d)&&u(d.createElement);s.exports=function(h){return f?d.createElement(h):{}}},8324:function(s){s.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},8113:function(s,l,a){var c=a(5005);s.exports=c("navigator","userAgent")||""},7392:function(s,l,a){var c=a(7854),u=a(8113),d=c.process,f=d&&d.versions,h=f&&f.v8,p,g;h?(p=h.split("."),g=p[0]+p[1]):u&&(p=u.match(/Edge\/(\d+)/),(!p||p[1]>=74)&&(p=u.match(/Chrome\/(\d+)/),p&&(g=p[1]))),s.exports=g&&+g},748:function(s){s.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:function(s,l,a){var c=a(7854),u=a(1236).f,d=a(8880),f=a(1320),h=a(3505),p=a(9920),g=a(4705);s.exports=function(y,S){var C=y.target,k=y.global,b=y.stat,R,w,F,z,$,V;if(k?w=c:b?w=c[C]||h(C,{}):w=(c[C]||{}).prototype,w)for(F in S){if($=S[F],y.noTargetGet?(V=u(w,F),z=V&&V.value):z=w[F],R=g(k?F:C+(b?".":"#")+F,y.forced),!R&&z!==void 0){if(typeof $==typeof z)continue;p($,z)}(y.sham||z&&z.sham)&&d($,"sham",!0),f(w,F,$,y)}}},7293:function(s){s.exports=function(l){try{return!!l()}catch{return!0}}},7007:function(s,l,a){a(4916);var c=a(1320),u=a(7293),d=a(5112),f=a(2261),h=a(8880),p=d("species"),g=!u(function(){var b=/./;return b.exec=function(){var R=[];return R.groups={a:"7"},R},"".replace(b,"$<a>")!=="7"}),y=function(){return"a".replace(/./,"$0")==="$0"}(),S=d("replace"),C=function(){return/./[S]?/./[S]("a","$0")==="":!1}(),k=!u(function(){var b=/(?:)/,R=b.exec;b.exec=function(){return R.apply(this,arguments)};var w="ab".split(b);return w.length!==2||w[0]!=="a"||w[1]!=="b"});s.exports=function(b,R,w,F){var z=d(b),$=!u(function(){var Z={};return Z[z]=function(){return 7},""[b](Z)!=7}),V=$&&!u(function(){var Z=!1,Q=/a/;return b==="split"&&(Q={},Q.constructor={},Q.constructor[p]=function(){return Q},Q.flags="",Q[z]=/./[z]),Q.exec=function(){return Z=!0,null},Q[z](""),!Z});if(!$||!V||b==="replace"&&!(g&&y&&!C)||b==="split"&&!k){var B=/./[z],P=w(z,""[b],function(Z,Q,re,W,le){return Q.exec===f?$&&!le?{done:!0,value:B.call(Q,re,W)}:{done:!0,value:Z.call(re,Q,W)}:{done:!1}},{REPLACE_KEEPS_$0:y,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:C}),U=P[0],Y=P[1];c(String.prototype,b,U),c(RegExp.prototype,z,R==2?function(Z,Q){return Y.call(Z,this,Q)}:function(Z){return Y.call(Z,this)})}F&&h(RegExp.prototype[z],"sham",!0)}},9974:function(s,l,a){var c=a(3099);s.exports=function(u,d,f){if(c(u),d===void 0)return u;switch(f){case 0:return function(){return u.call(d)};case 1:return function(h){return u.call(d,h)};case 2:return function(h,p){return u.call(d,h,p)};case 3:return function(h,p,g){return u.call(d,h,p,g)}}return function(){return u.apply(d,arguments)}}},5005:function(s,l,a){var c=a(857),u=a(7854),d=function(f){return typeof f=="function"?f:void 0};s.exports=function(f,h){return arguments.length<2?d(c[f])||d(u[f]):c[f]&&c[f][h]||u[f]&&u[f][h]}},1246:function(s,l,a){var c=a(648),u=a(7497),d=a(5112),f=d("iterator");s.exports=function(h){if(h!=null)return h[f]||h["@@iterator"]||u[c(h)]}},8554:function(s,l,a){var c=a(9670),u=a(1246);s.exports=function(d){var f=u(d);if(typeof f!="function")throw TypeError(String(d)+" is not iterable");return c(f.call(d))}},647:function(s,l,a){var c=a(7908),u=Math.floor,d="".replace,f=/\$([$&'`]|\d\d?|<[^>]*>)/g,h=/\$([$&'`]|\d\d?)/g;s.exports=function(p,g,y,S,C,k){var b=y+p.length,R=S.length,w=h;return C!==void 0&&(C=c(C),w=f),d.call(k,w,function(F,z){var $;switch(z.charAt(0)){case"$":return"$";case"&":return p;case"`":return g.slice(0,y);case"'":return g.slice(b);case"<":$=C[z.slice(1,-1)];break;default:var V=+z;if(V===0)return F;if(V>R){var B=u(V/10);return B===0?F:B<=R?S[B-1]===void 0?z.charAt(1):S[B-1]+z.charAt(1):F}$=S[V-1]}return $===void 0?"":$})}},7854:function(s,l,a){var c=function(u){return u&&u.Math==Math&&u};s.exports=c(typeof globalThis=="object"&&globalThis)||c(typeof window=="object"&&window)||c(typeof self=="object"&&self)||c(typeof a.g=="object"&&a.g)||function(){return this}()||Function("return this")()},6656:function(s){var l={}.hasOwnProperty;s.exports=function(a,c){return l.call(a,c)}},3501:function(s){s.exports={}},490:function(s,l,a){var c=a(5005);s.exports=c("document","documentElement")},4664:function(s,l,a){var c=a(9781),u=a(7293),d=a(317);s.exports=!c&&!u(function(){return Object.defineProperty(d("div"),"a",{get:function(){return 7}}).a!=7})},1179:function(s){var l=Math.abs,a=Math.pow,c=Math.floor,u=Math.log,d=Math.LN2,f=function(p,g,y){var S=new Array(y),C=y*8-g-1,k=(1<<C)-1,b=k>>1,R=g===23?a(2,-24)-a(2,-77):0,w=p<0||p===0&&1/p<0?1:0,F=0,z,$,V;for(p=l(p),p!=p||p===1/0?($=p!=p?1:0,z=k):(z=c(u(p)/d),p*(V=a(2,-z))<1&&(z--,V*=2),z+b>=1?p+=R/V:p+=R*a(2,1-b),p*V>=2&&(z++,V/=2),z+b>=k?($=0,z=k):z+b>=1?($=(p*V-1)*a(2,g),z=z+b):($=p*a(2,b-1)*a(2,g),z=0));g>=8;S[F++]=$&255,$/=256,g-=8);for(z=z<<g|$,C+=g;C>0;S[F++]=z&255,z/=256,C-=8);return S[--F]|=w*128,S},h=function(p,g){var y=p.length,S=y*8-g-1,C=(1<<S)-1,k=C>>1,b=S-7,R=y-1,w=p[R--],F=w&127,z;for(w>>=7;b>0;F=F*256+p[R],R--,b-=8);for(z=F&(1<<-b)-1,F>>=-b,b+=g;b>0;z=z*256+p[R],R--,b-=8);if(F===0)F=1-k;else{if(F===C)return z?NaN:w?-1/0:1/0;z=z+a(2,g),F=F-k}return(w?-1:1)*z*a(2,F-g)};s.exports={pack:f,unpack:h}},8361:function(s,l,a){var c=a(7293),u=a(4326),d="".split;s.exports=c(function(){return!Object("z").propertyIsEnumerable(0)})?function(f){return u(f)=="String"?d.call(f,""):Object(f)}:Object},9587:function(s,l,a){var c=a(111),u=a(7674);s.exports=function(d,f,h){var p,g;return u&&typeof(p=f.constructor)=="function"&&p!==h&&c(g=p.prototype)&&g!==h.prototype&&u(d,g),d}},2788:function(s,l,a){var c=a(5465),u=Function.toString;typeof c.inspectSource!="function"&&(c.inspectSource=function(d){return u.call(d)}),s.exports=c.inspectSource},9909:function(s,l,a){var c=a(8536),u=a(7854),d=a(111),f=a(8880),h=a(6656),p=a(5465),g=a(6200),y=a(3501),S=u.WeakMap,C,k,b,R=function(P){return b(P)?k(P):C(P,{})},w=function(P){return function(U){var Y;if(!d(U)||(Y=k(U)).type!==P)throw TypeError("Incompatible receiver, "+P+" required");return Y}};if(c){var F=p.state||(p.state=new S),z=F.get,$=F.has,V=F.set;C=function(P,U){return U.facade=P,V.call(F,P,U),U},k=function(P){return z.call(F,P)||{}},b=function(P){return $.call(F,P)}}else{var B=g("state");y[B]=!0,C=function(P,U){return U.facade=P,f(P,B,U),U},k=function(P){return h(P,B)?P[B]:{}},b=function(P){return h(P,B)}}s.exports={set:C,get:k,has:b,enforce:R,getterFor:w}},7659:function(s,l,a){var c=a(5112),u=a(7497),d=c("iterator"),f=Array.prototype;s.exports=function(h){return h!==void 0&&(u.Array===h||f[d]===h)}},3157:function(s,l,a){var c=a(4326);s.exports=Array.isArray||function(d){return c(d)=="Array"}},4705:function(s,l,a){var c=a(7293),u=/#|\.prototype\./,d=function(y,S){var C=h[f(y)];return C==g?!0:C==p?!1:typeof S=="function"?c(S):!!S},f=d.normalize=function(y){return String(y).replace(u,".").toLowerCase()},h=d.data={},p=d.NATIVE="N",g=d.POLYFILL="P";s.exports=d},111:function(s){s.exports=function(l){return typeof l=="object"?l!==null:typeof l=="function"}},1913:function(s){s.exports=!1},7850:function(s,l,a){var c=a(111),u=a(4326),d=a(5112),f=d("match");s.exports=function(h){var p;return c(h)&&((p=h[f])!==void 0?!!p:u(h)=="RegExp")}},9212:function(s,l,a){var c=a(9670);s.exports=function(u){var d=u.return;if(d!==void 0)return c(d.call(u)).value}},3383:function(s,l,a){var c=a(7293),u=a(9518),d=a(8880),f=a(6656),h=a(5112),p=a(1913),g=h("iterator"),y=!1,S=function(){return this},C,k,b;[].keys&&(b=[].keys(),"next"in b?(k=u(u(b)),k!==Object.prototype&&(C=k)):y=!0);var R=C==null||c(function(){var w={};return C[g].call(w)!==w});R&&(C={}),(!p||R)&&!f(C,g)&&d(C,g,S),s.exports={IteratorPrototype:C,BUGGY_SAFARI_ITERATORS:y}},7497:function(s){s.exports={}},133:function(s,l,a){var c=a(7293);s.exports=!!Object.getOwnPropertySymbols&&!c(function(){return!String(Symbol())})},590:function(s,l,a){var c=a(7293),u=a(5112),d=a(1913),f=u("iterator");s.exports=!c(function(){var h=new URL("b?a=1&b=2&c=3","http://a"),p=h.searchParams,g="";return h.pathname="c%20d",p.forEach(function(y,S){p.delete("b"),g+=S+y}),d&&!h.toJSON||!p.sort||h.href!=="http://a/c%20d?a=1&c=3"||p.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!p[f]||new URL("https://a@b").username!=="a"||new URLSearchParams(new URLSearchParams("a=b")).get("a")!=="b"||new URL("http://тест").host!=="xn--e1aybc"||new URL("http://a#б").hash!=="#%D0%B1"||g!=="a1c3"||new URL("http://x",void 0).host!=="x"})},8536:function(s,l,a){var c=a(7854),u=a(2788),d=c.WeakMap;s.exports=typeof d=="function"&&/native code/.test(u(d))},1574:function(s,l,a){var c=a(9781),u=a(7293),d=a(1956),f=a(5181),h=a(5296),p=a(7908),g=a(8361),y=Object.assign,S=Object.defineProperty;s.exports=!y||u(function(){if(c&&y({b:1},y(S({},"a",{enumerable:!0,get:function(){S(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var C={},k={},b=Symbol(),R="abcdefghijklmnopqrst";return C[b]=7,R.split("").forEach(function(w){k[w]=w}),y({},C)[b]!=7||d(y({},k)).join("")!=R})?function(k,b){for(var R=p(k),w=arguments.length,F=1,z=f.f,$=h.f;w>F;)for(var V=g(arguments[F++]),B=z?d(V).concat(z(V)):d(V),P=B.length,U=0,Y;P>U;)Y=B[U++],(!c||$.call(V,Y))&&(R[Y]=V[Y]);return R}:y},30:function(s,l,a){var c=a(9670),u=a(6048),d=a(748),f=a(3501),h=a(490),p=a(317),g=a(6200),y=">",S="<",C="prototype",k="script",b=g("IE_PROTO"),R=function(){},w=function(B){return S+k+y+B+S+"/"+k+y},F=function(B){B.write(w("")),B.close();var P=B.parentWindow.Object;return B=null,P},z=function(){var B=p("iframe"),P="java"+k+":",U;return B.style.display="none",h.appendChild(B),B.src=String(P),U=B.contentWindow.document,U.open(),U.write(w("document.F=Object")),U.close(),U.F},$,V=function(){try{$=document.domain&&new ActiveXObject("htmlfile")}catch{}V=$?F($):z();for(var B=d.length;B--;)delete V[C][d[B]];return V()};f[b]=!0,s.exports=Object.create||function(P,U){var Y;return P!==null?(R[C]=c(P),Y=new R,R[C]=null,Y[b]=P):Y=V(),U===void 0?Y:u(Y,U)}},6048:function(s,l,a){var c=a(9781),u=a(3070),d=a(9670),f=a(1956);s.exports=c?Object.defineProperties:function(p,g){d(p);for(var y=f(g),S=y.length,C=0,k;S>C;)u.f(p,k=y[C++],g[k]);return p}},3070:function(s,l,a){var c=a(9781),u=a(4664),d=a(9670),f=a(7593),h=Object.defineProperty;l.f=c?h:function(g,y,S){if(d(g),y=f(y,!0),d(S),u)try{return h(g,y,S)}catch{}if("get"in S||"set"in S)throw TypeError("Accessors not supported");return"value"in S&&(g[y]=S.value),g}},1236:function(s,l,a){var c=a(9781),u=a(5296),d=a(9114),f=a(5656),h=a(7593),p=a(6656),g=a(4664),y=Object.getOwnPropertyDescriptor;l.f=c?y:function(C,k){if(C=f(C),k=h(k,!0),g)try{return y(C,k)}catch{}if(p(C,k))return d(!u.f.call(C,k),C[k])}},8006:function(s,l,a){var c=a(6324),u=a(748),d=u.concat("length","prototype");l.f=Object.getOwnPropertyNames||function(h){return c(h,d)}},5181:function(s,l){l.f=Object.getOwnPropertySymbols},9518:function(s,l,a){var c=a(6656),u=a(7908),d=a(6200),f=a(8544),h=d("IE_PROTO"),p=Object.prototype;s.exports=f?Object.getPrototypeOf:function(g){return g=u(g),c(g,h)?g[h]:typeof g.constructor=="function"&&g instanceof g.constructor?g.constructor.prototype:g instanceof Object?p:null}},6324:function(s,l,a){var c=a(6656),u=a(5656),d=a(1318).indexOf,f=a(3501);s.exports=function(h,p){var g=u(h),y=0,S=[],C;for(C in g)!c(f,C)&&c(g,C)&&S.push(C);for(;p.length>y;)c(g,C=p[y++])&&(~d(S,C)||S.push(C));return S}},1956:function(s,l,a){var c=a(6324),u=a(748);s.exports=Object.keys||function(f){return c(f,u)}},5296:function(s,l){var a={}.propertyIsEnumerable,c=Object.getOwnPropertyDescriptor,u=c&&!a.call({1:2},1);l.f=u?function(f){var h=c(this,f);return!!h&&h.enumerable}:a},7674:function(s,l,a){var c=a(9670),u=a(6077);s.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var d=!1,f={},h;try{h=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,h.call(f,[]),d=f instanceof Array}catch{}return function(g,y){return c(g),u(y),d?h.call(g,y):g.__proto__=y,g}}():void 0)},288:function(s,l,a){var c=a(1694),u=a(648);s.exports=c?{}.toString:function(){return"[object "+u(this)+"]"}},3887:function(s,l,a){var c=a(5005),u=a(8006),d=a(5181),f=a(9670);s.exports=c("Reflect","ownKeys")||function(p){var g=u.f(f(p)),y=d.f;return y?g.concat(y(p)):g}},857:function(s,l,a){var c=a(7854);s.exports=c},2248:function(s,l,a){var c=a(1320);s.exports=function(u,d,f){for(var h in d)c(u,h,d[h],f);return u}},1320:function(s,l,a){var c=a(7854),u=a(8880),d=a(6656),f=a(3505),h=a(2788),p=a(9909),g=p.get,y=p.enforce,S=String(String).split("String");(s.exports=function(C,k,b,R){var w=R?!!R.unsafe:!1,F=R?!!R.enumerable:!1,z=R?!!R.noTargetGet:!1,$;if(typeof b=="function"&&(typeof k=="string"&&!d(b,"name")&&u(b,"name",k),$=y(b),$.source||($.source=S.join(typeof k=="string"?k:""))),C===c){F?C[k]=b:f(k,b);return}else w?!z&&C[k]&&(F=!0):delete C[k];F?C[k]=b:u(C,k,b)})(Function.prototype,"toString",function(){return typeof this=="function"&&g(this).source||h(this)})},7651:function(s,l,a){var c=a(4326),u=a(2261);s.exports=function(d,f){var h=d.exec;if(typeof h=="function"){var p=h.call(d,f);if(typeof p!="object")throw TypeError("RegExp exec method returned something other than an Object or null");return p}if(c(d)!=="RegExp")throw TypeError("RegExp#exec called on incompatible receiver");return u.call(d,f)}},2261:function(s,l,a){var c=a(7066),u=a(2999),d=RegExp.prototype.exec,f=String.prototype.replace,h=d,p=function(){var C=/a/,k=/b*/g;return d.call(C,"a"),d.call(k,"a"),C.lastIndex!==0||k.lastIndex!==0}(),g=u.UNSUPPORTED_Y||u.BROKEN_CARET,y=/()??/.exec("")[1]!==void 0,S=p||y||g;S&&(h=function(k){var b=this,R,w,F,z,$=g&&b.sticky,V=c.call(b),B=b.source,P=0,U=k;return $&&(V=V.replace("y",""),V.indexOf("g")===-1&&(V+="g"),U=String(k).slice(b.lastIndex),b.lastIndex>0&&(!b.multiline||b.multiline&&k[b.lastIndex-1]!==`
|
|
5
|
-
`)&&(B="(?: "+B+")",
|
|
6
|
-
\v\f\r \u2028\u2029\uFEFF`},8264:function(s,l,a){var c=a(2109),u=a(7854),d=a(3331),f=a(6340),h="ArrayBuffer",p=d[h],g=u[h];c({global:!0,forced:g!==p},{ArrayBuffer:p}),f(h)},2222:function(s,l,a){var c=a(2109),u=a(7293),d=a(3157),f=a(111),h=a(7908),p=a(7466),g=a(6135),y=a(5417),S=a(1194),C=a(5112),k=a(7392),b=C("isConcatSpreadable"),R=9007199254740991,w="Maximum allowed index exceeded",F=k>=51||!u(function(){var B=[];return B[b]=!1,B.concat()[0]!==B}),z=S("concat"),$=function(B){if(!f(B))return!1;var P=B[b];return P!==void 0?!!P:d(B)},V=!F||!z;c({target:"Array",proto:!0,forced:V},{concat:function(P){var U=h(this),Y=y(U,0),Z=0,Q,re,W,le,de;for(Q=-1,W=arguments.length;Q<W;Q++)if(de=Q===-1?U:arguments[Q],$(de)){if(le=p(de.length),Z+le>R)throw TypeError(w);for(re=0;re<le;re++,Z++)re in de&&g(Y,Z,de[re])}else{if(Z>=R)throw TypeError(w);g(Y,Z++,de)}return Y.length=Z,Y}})},7327:function(s,l,a){var c=a(2109),u=a(2092).filter,d=a(1194),f=d("filter");c({target:"Array",proto:!0,forced:!f},{filter:function(p){return u(this,p,arguments.length>1?arguments[1]:void 0)}})},2772:function(s,l,a){var c=a(2109),u=a(1318).indexOf,d=a(9341),f=[].indexOf,h=!!f&&1/[1].indexOf(1,-0)<0,p=d("indexOf");c({target:"Array",proto:!0,forced:h||!p},{indexOf:function(y){return h?f.apply(this,arguments)||0:u(this,y,arguments.length>1?arguments[1]:void 0)}})},6992:function(s,l,a){var c=a(5656),u=a(1223),d=a(7497),f=a(9909),h=a(654),p="Array Iterator",g=f.set,y=f.getterFor(p);s.exports=h(Array,"Array",function(S,C){g(this,{type:p,target:c(S),index:0,kind:C})},function(){var S=y(this),C=S.target,k=S.kind,b=S.index++;return!C||b>=C.length?(S.target=void 0,{value:void 0,done:!0}):k=="keys"?{value:b,done:!1}:k=="values"?{value:C[b],done:!1}:{value:[b,C[b]],done:!1}},"values"),d.Arguments=d.Array,u("keys"),u("values"),u("entries")},1249:function(s,l,a){var c=a(2109),u=a(2092).map,d=a(1194),f=d("map");c({target:"Array",proto:!0,forced:!f},{map:function(p){return u(this,p,arguments.length>1?arguments[1]:void 0)}})},7042:function(s,l,a){var c=a(2109),u=a(111),d=a(3157),f=a(1400),h=a(7466),p=a(5656),g=a(6135),y=a(5112),S=a(1194),C=S("slice"),k=y("species"),b=[].slice,R=Math.max;c({target:"Array",proto:!0,forced:!C},{slice:function(F,z){var $=p(this),V=h($.length),B=f(F,V),P=f(z===void 0?V:z,V),U,Y,Z;if(d($)&&(U=$.constructor,typeof U=="function"&&(U===Array||d(U.prototype))?U=void 0:u(U)&&(U=U[k],U===null&&(U=void 0)),U===Array||U===void 0))return b.call($,B,P);for(Y=new(U===void 0?Array:U)(R(P-B,0)),Z=0;B<P;B++,Z++)B in $&&g(Y,Z,$[B]);return Y.length=Z,Y}})},561:function(s,l,a){var c=a(2109),u=a(1400),d=a(9958),f=a(7466),h=a(7908),p=a(5417),g=a(6135),y=a(1194),S=y("splice"),C=Math.max,k=Math.min,b=9007199254740991,R="Maximum allowed length exceeded";c({target:"Array",proto:!0,forced:!S},{splice:function(F,z){var $=h(this),V=f($.length),B=u(F,V),P=arguments.length,U,Y,Z,Q,re,W;if(P===0?U=Y=0:P===1?(U=0,Y=V-B):(U=P-2,Y=k(C(d(z),0),V-B)),V+U-Y>b)throw TypeError(R);for(Z=p($,Y),Q=0;Q<Y;Q++)re=B+Q,re in $&&g(Z,Q,$[re]);if(Z.length=Y,U<Y){for(Q=B;Q<V-Y;Q++)re=Q+Y,W=Q+U,re in $?$[W]=$[re]:delete $[W];for(Q=V;Q>V-Y+U;Q--)delete $[Q-1]}else if(U>Y)for(Q=V-Y;Q>B;Q--)re=Q+Y-1,W=Q+U-1,re in $?$[W]=$[re]:delete $[W];for(Q=0;Q<U;Q++)$[Q+B]=arguments[Q+2];return $.length=V-Y+U,Z}})},8309:function(s,l,a){var c=a(9781),u=a(3070).f,d=Function.prototype,f=d.toString,h=/^\s*function ([^ (]*)/,p="name";c&&!(p in d)&&u(d,p,{configurable:!0,get:function(){try{return f.call(this).match(h)[1]}catch{return""}}})},489:function(s,l,a){var c=a(2109),u=a(7293),d=a(7908),f=a(9518),h=a(8544),p=u(function(){f(1)});c({target:"Object",stat:!0,forced:p,sham:!h},{getPrototypeOf:function(y){return f(d(y))}})},1539:function(s,l,a){var c=a(1694),u=a(1320),d=a(288);c||u(Object.prototype,"toString",d,{unsafe:!0})},4916:function(s,l,a){var c=a(2109),u=a(2261);c({target:"RegExp",proto:!0,forced:/./.exec!==u},{exec:u})},9714:function(s,l,a){var c=a(1320),u=a(9670),d=a(7293),f=a(7066),h="toString",p=RegExp.prototype,g=p[h],y=d(function(){return g.call({source:"a",flags:"b"})!="/a/b"}),S=g.name!=h;(y||S)&&c(RegExp.prototype,h,function(){var k=u(this),b=String(k.source),R=k.flags,w=String(R===void 0&&k instanceof RegExp&&!("flags"in p)?f.call(k):R);return"/"+b+"/"+w},{unsafe:!0})},8783:function(s,l,a){var c=a(8710).charAt,u=a(9909),d=a(654),f="String Iterator",h=u.set,p=u.getterFor(f);d(String,"String",function(g){h(this,{type:f,string:String(g),index:0})},function(){var y=p(this),S=y.string,C=y.index,k;return C>=S.length?{value:void 0,done:!0}:(k=c(S,C),y.index+=k.length,{value:k,done:!1})})},4723:function(s,l,a){var c=a(7007),u=a(9670),d=a(7466),f=a(4488),h=a(1530),p=a(7651);c("match",1,function(g,y,S){return[function(k){var b=f(this),R=k==null?void 0:k[g];return R!==void 0?R.call(k,b):new RegExp(k)[g](String(b))},function(C){var k=S(y,C,this);if(k.done)return k.value;var b=u(C),R=String(this);if(!b.global)return p(b,R);var w=b.unicode;b.lastIndex=0;for(var F=[],z=0,$;($=p(b,R))!==null;){var V=String($[0]);F[z]=V,V===""&&(b.lastIndex=h(R,d(b.lastIndex),w)),z++}return z===0?null:F}]})},5306:function(s,l,a){var c=a(7007),u=a(9670),d=a(7466),f=a(9958),h=a(4488),p=a(1530),g=a(647),y=a(7651),S=Math.max,C=Math.min,k=function(b){return b===void 0?b:String(b)};c("replace",2,function(b,R,w,F){var z=F.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,$=F.REPLACE_KEEPS_$0,V=z?"$":"$0";return[function(P,U){var Y=h(this),Z=P==null?void 0:P[b];return Z!==void 0?Z.call(P,Y,U):R.call(String(Y),P,U)},function(B,P){if(!z&&$||typeof P=="string"&&P.indexOf(V)===-1){var U=w(R,B,this,P);if(U.done)return U.value}var Y=u(B),Z=String(this),Q=typeof P=="function";Q||(P=String(P));var re=Y.global;if(re){var W=Y.unicode;Y.lastIndex=0}for(var le=[];;){var de=y(Y,Z);if(de===null||(le.push(de),!re))break;var ye=String(de[0]);ye===""&&(Y.lastIndex=p(Z,d(Y.lastIndex),W))}for(var Ee="",be=0,Te=0;Te<le.length;Te++){de=le[Te];for(var ke=String(de[0]),Ae=S(C(f(de.index),Z.length),0),ge=[],A=1;A<de.length;A++)ge.push(k(de[A]));var M=de.groups;if(Q){var E=[ke].concat(ge,Ae,Z);M!==void 0&&E.push(M);var O=String(P.apply(void 0,E))}else O=g(ke,Z,Ae,ge,M,P);Ae>=be&&(Ee+=Z.slice(be,Ae)+O,be=Ae+ke.length)}return Ee+Z.slice(be)}]})},3123:function(s,l,a){var c=a(7007),u=a(7850),d=a(9670),f=a(4488),h=a(6707),p=a(1530),g=a(7466),y=a(7651),S=a(2261),C=a(7293),k=[].push,b=Math.min,R=4294967295,w=!C(function(){return!RegExp(R,"y")});c("split",2,function(F,z,$){var V;return"abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?V=function(B,P){var U=String(f(this)),Y=P===void 0?R:P>>>0;if(Y===0)return[];if(B===void 0)return[U];if(!u(B))return z.call(U,B,Y);for(var Z=[],Q=(B.ignoreCase?"i":"")+(B.multiline?"m":"")+(B.unicode?"u":"")+(B.sticky?"y":""),re=0,W=new RegExp(B.source,Q+"g"),le,de,ye;(le=S.call(W,U))&&(de=W.lastIndex,!(de>re&&(Z.push(U.slice(re,le.index)),le.length>1&&le.index<U.length&&k.apply(Z,le.slice(1)),ye=le[0].length,re=de,Z.length>=Y)));)W.lastIndex===le.index&&W.lastIndex++;return re===U.length?(ye||!W.test(""))&&Z.push(""):Z.push(U.slice(re)),Z.length>Y?Z.slice(0,Y):Z}:"0".split(void 0,0).length?V=function(B,P){return B===void 0&&P===0?[]:z.call(this,B,P)}:V=z,[function(P,U){var Y=f(this),Z=P==null?void 0:P[F];return Z!==void 0?Z.call(P,Y,U):V.call(String(Y),P,U)},function(B,P){var U=$(V,B,this,P,V!==z);if(U.done)return U.value;var Y=d(B),Z=String(this),Q=h(Y,RegExp),re=Y.unicode,W=(Y.ignoreCase?"i":"")+(Y.multiline?"m":"")+(Y.unicode?"u":"")+(w?"y":"g"),le=new Q(w?Y:"^(?:"+Y.source+")",W),de=P===void 0?R:P>>>0;if(de===0)return[];if(Z.length===0)return y(le,Z)===null?[Z]:[];for(var ye=0,Ee=0,be=[];Ee<Z.length;){le.lastIndex=w?Ee:0;var Te=y(le,w?Z:Z.slice(Ee)),ke;if(Te===null||(ke=b(g(le.lastIndex+(w?0:Ee)),Z.length))===ye)Ee=p(Z,Ee,re);else{if(be.push(Z.slice(ye,Ee)),be.length===de)return be;for(var Ae=1;Ae<=Te.length-1;Ae++)if(be.push(Te[Ae]),be.length===de)return be;Ee=ye=ke}}return be.push(Z.slice(ye)),be}]},!w)},3210:function(s,l,a){var c=a(2109),u=a(3111).trim,d=a(6091);c({target:"String",proto:!0,forced:d("trim")},{trim:function(){return u(this)}})},2990:function(s,l,a){var c=a(260),u=a(1048),d=c.aTypedArray,f=c.exportTypedArrayMethod;f("copyWithin",function(p,g){return u.call(d(this),p,g,arguments.length>2?arguments[2]:void 0)})},8927:function(s,l,a){var c=a(260),u=a(2092).every,d=c.aTypedArray,f=c.exportTypedArrayMethod;f("every",function(p){return u(d(this),p,arguments.length>1?arguments[1]:void 0)})},3105:function(s,l,a){var c=a(260),u=a(1285),d=c.aTypedArray,f=c.exportTypedArrayMethod;f("fill",function(p){return u.apply(d(this),arguments)})},5035:function(s,l,a){var c=a(260),u=a(2092).filter,d=a(3074),f=c.aTypedArray,h=c.exportTypedArrayMethod;h("filter",function(g){var y=u(f(this),g,arguments.length>1?arguments[1]:void 0);return d(this,y)})},7174:function(s,l,a){var c=a(260),u=a(2092).findIndex,d=c.aTypedArray,f=c.exportTypedArrayMethod;f("findIndex",function(p){return u(d(this),p,arguments.length>1?arguments[1]:void 0)})},4345:function(s,l,a){var c=a(260),u=a(2092).find,d=c.aTypedArray,f=c.exportTypedArrayMethod;f("find",function(p){return u(d(this),p,arguments.length>1?arguments[1]:void 0)})},2846:function(s,l,a){var c=a(260),u=a(2092).forEach,d=c.aTypedArray,f=c.exportTypedArrayMethod;f("forEach",function(p){u(d(this),p,arguments.length>1?arguments[1]:void 0)})},4731:function(s,l,a){var c=a(260),u=a(1318).includes,d=c.aTypedArray,f=c.exportTypedArrayMethod;f("includes",function(p){return u(d(this),p,arguments.length>1?arguments[1]:void 0)})},7209:function(s,l,a){var c=a(260),u=a(1318).indexOf,d=c.aTypedArray,f=c.exportTypedArrayMethod;f("indexOf",function(p){return u(d(this),p,arguments.length>1?arguments[1]:void 0)})},6319:function(s,l,a){var c=a(7854),u=a(260),d=a(6992),f=a(5112),h=f("iterator"),p=c.Uint8Array,g=d.values,y=d.keys,S=d.entries,C=u.aTypedArray,k=u.exportTypedArrayMethod,b=p&&p.prototype[h],R=!!b&&(b.name=="values"||b.name==null),w=function(){return g.call(C(this))};k("entries",function(){return S.call(C(this))}),k("keys",function(){return y.call(C(this))}),k("values",w,!R),k(h,w,!R)},8867:function(s,l,a){var c=a(260),u=c.aTypedArray,d=c.exportTypedArrayMethod,f=[].join;d("join",function(p){return f.apply(u(this),arguments)})},7789:function(s,l,a){var c=a(260),u=a(6583),d=c.aTypedArray,f=c.exportTypedArrayMethod;f("lastIndexOf",function(p){return u.apply(d(this),arguments)})},3739:function(s,l,a){var c=a(260),u=a(2092).map,d=a(6707),f=c.aTypedArray,h=c.aTypedArrayConstructor,p=c.exportTypedArrayMethod;p("map",function(y){return u(f(this),y,arguments.length>1?arguments[1]:void 0,function(S,C){return new(h(d(S,S.constructor)))(C)})})},4483:function(s,l,a){var c=a(260),u=a(3671).right,d=c.aTypedArray,f=c.exportTypedArrayMethod;f("reduceRight",function(p){return u(d(this),p,arguments.length,arguments.length>1?arguments[1]:void 0)})},9368:function(s,l,a){var c=a(260),u=a(3671).left,d=c.aTypedArray,f=c.exportTypedArrayMethod;f("reduce",function(p){return u(d(this),p,arguments.length,arguments.length>1?arguments[1]:void 0)})},2056:function(s,l,a){var c=a(260),u=c.aTypedArray,d=c.exportTypedArrayMethod,f=Math.floor;d("reverse",function(){for(var p=this,g=u(p).length,y=f(g/2),S=0,C;S<y;)C=p[S],p[S++]=p[--g],p[g]=C;return p})},3462:function(s,l,a){var c=a(260),u=a(7466),d=a(4590),f=a(7908),h=a(7293),p=c.aTypedArray,g=c.exportTypedArrayMethod,y=h(function(){new Int8Array(1).set({})});g("set",function(C){p(this);var k=d(arguments.length>1?arguments[1]:void 0,1),b=this.length,R=f(C),w=u(R.length),F=0;if(w+k>b)throw RangeError("Wrong length");for(;F<w;)this[k+F]=R[F++]},y)},678:function(s,l,a){var c=a(260),u=a(6707),d=a(7293),f=c.aTypedArray,h=c.aTypedArrayConstructor,p=c.exportTypedArrayMethod,g=[].slice,y=d(function(){new Int8Array(1).slice()});p("slice",function(C,k){for(var b=g.call(f(this),C,k),R=u(this,this.constructor),w=0,F=b.length,z=new(h(R))(F);F>w;)z[w]=b[w++];return z},y)},7462:function(s,l,a){var c=a(260),u=a(2092).some,d=c.aTypedArray,f=c.exportTypedArrayMethod;f("some",function(p){return u(d(this),p,arguments.length>1?arguments[1]:void 0)})},3824:function(s,l,a){var c=a(260),u=c.aTypedArray,d=c.exportTypedArrayMethod,f=[].sort;d("sort",function(p){return f.call(u(this),p)})},5021:function(s,l,a){var c=a(260),u=a(7466),d=a(1400),f=a(6707),h=c.aTypedArray,p=c.exportTypedArrayMethod;p("subarray",function(y,S){var C=h(this),k=C.length,b=d(y,k);return new(f(C,C.constructor))(C.buffer,C.byteOffset+b*C.BYTES_PER_ELEMENT,u((S===void 0?k:d(S,k))-b))})},2974:function(s,l,a){var c=a(7854),u=a(260),d=a(7293),f=c.Int8Array,h=u.aTypedArray,p=u.exportTypedArrayMethod,g=[].toLocaleString,y=[].slice,S=!!f&&d(function(){g.call(new f(1))}),C=d(function(){return[1,2].toLocaleString()!=new f([1,2]).toLocaleString()})||!d(function(){f.prototype.toLocaleString.call([1,2])});p("toLocaleString",function(){return g.apply(S?y.call(h(this)):h(this),arguments)},C)},5016:function(s,l,a){var c=a(260).exportTypedArrayMethod,u=a(7293),d=a(7854),f=d.Uint8Array,h=f&&f.prototype||{},p=[].toString,g=[].join;u(function(){p.call({})})&&(p=function(){return g.call(this)});var y=h.toString!=p;c("toString",p,y)},2472:function(s,l,a){var c=a(9843);c("Uint8",function(u){return function(f,h,p){return u(this,f,h,p)}})},4747:function(s,l,a){var c=a(7854),u=a(8324),d=a(8533),f=a(8880);for(var h in u){var p=c[h],g=p&&p.prototype;if(g&&g.forEach!==d)try{f(g,"forEach",d)}catch{g.forEach=d}}},3948:function(s,l,a){var c=a(7854),u=a(8324),d=a(6992),f=a(8880),h=a(5112),p=h("iterator"),g=h("toStringTag"),y=d.values;for(var S in u){var C=c[S],k=C&&C.prototype;if(k){if(k[p]!==y)try{f(k,p,y)}catch{k[p]=y}if(k[g]||f(k,g,S),u[S]){for(var b in d)if(k[b]!==d[b])try{f(k,b,d[b])}catch{k[b]=d[b]}}}}},1637:function(s,l,a){a(6992);var c=a(2109),u=a(5005),d=a(590),f=a(1320),h=a(2248),p=a(8003),g=a(4994),y=a(9909),S=a(5787),C=a(6656),k=a(9974),b=a(648),R=a(9670),w=a(111),F=a(30),z=a(9114),$=a(8554),V=a(1246),B=a(5112),P=u("fetch"),U=u("Headers"),Y=B("iterator"),Z="URLSearchParams",Q=Z+"Iterator",re=y.set,W=y.getterFor(Z),le=y.getterFor(Q),de=/\+/g,ye=Array(4),Ee=function(N){return ye[N-1]||(ye[N-1]=RegExp("((?:%[\\da-f]{2}){"+N+"})","gi"))},be=function(N){try{return decodeURIComponent(N)}catch{return N}},Te=function(N){var D=N.replace(de," "),L=4;try{return decodeURIComponent(D)}catch{for(;L;)D=D.replace(Ee(L--),be);return D}},ke=/[!'()~]|%20/g,Ae={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},ge=function(N){return Ae[N]},A=function(N){return encodeURIComponent(N).replace(ke,ge)},M=function(N,D){if(D)for(var L=D.split("&"),H=0,K,j;H<L.length;)K=L[H++],K.length&&(j=K.split("="),N.push({key:Te(j.shift()),value:Te(j.join("="))}))},E=function(N){this.entries.length=0,M(this.entries,N)},O=function(N,D){if(N<D)throw TypeError("Not enough arguments")},v=g(function(D,L){re(this,{type:Q,iterator:$(W(D).entries),kind:L})},"Iterator",function(){var D=le(this),L=D.kind,H=D.iterator.next(),K=H.value;return H.done||(H.value=L==="keys"?K.key:L==="values"?K.value:[K.key,K.value]),H}),x=function(){S(this,x,Z);var D=arguments.length>0?arguments[0]:void 0,L=this,H=[],K,j,G,J,q,ce,me,Me,Fe;if(re(L,{type:Z,entries:H,updateURL:function(){},updateSearchParams:E}),D!==void 0)if(w(D))if(K=V(D),typeof K=="function")for(j=K.call(D),G=j.next;!(J=G.call(j)).done;){if(q=$(R(J.value)),ce=q.next,(me=ce.call(q)).done||(Me=ce.call(q)).done||!ce.call(q).done)throw TypeError("Expected sequence with length 2");H.push({key:me.value+"",value:Me.value+""})}else for(Fe in D)C(D,Fe)&&H.push({key:Fe,value:D[Fe]+""});else M(H,typeof D=="string"?D.charAt(0)==="?"?D.slice(1):D:D+"")},I=x.prototype;h(I,{append:function(D,L){O(arguments.length,2);var H=W(this);H.entries.push({key:D+"",value:L+""}),H.updateURL()},delete:function(N){O(arguments.length,1);for(var D=W(this),L=D.entries,H=N+"",K=0;K<L.length;)L[K].key===H?L.splice(K,1):K++;D.updateURL()},get:function(D){O(arguments.length,1);for(var L=W(this).entries,H=D+"",K=0;K<L.length;K++)if(L[K].key===H)return L[K].value;return null},getAll:function(D){O(arguments.length,1);for(var L=W(this).entries,H=D+"",K=[],j=0;j<L.length;j++)L[j].key===H&&K.push(L[j].value);return K},has:function(D){O(arguments.length,1);for(var L=W(this).entries,H=D+"",K=0;K<L.length;)if(L[K++].key===H)return!0;return!1},set:function(D,L){O(arguments.length,1);for(var H=W(this),K=H.entries,j=!1,G=D+"",J=L+"",q=0,ce;q<K.length;q++)ce=K[q],ce.key===G&&(j?K.splice(q--,1):(j=!0,ce.value=J));j||K.push({key:G,value:J}),H.updateURL()},sort:function(){var D=W(this),L=D.entries,H=L.slice(),K,j,G;for(L.length=0,G=0;G<H.length;G++){for(K=H[G],j=0;j<G;j++)if(L[j].key>K.key){L.splice(j,0,K);break}j===G&&L.push(K)}D.updateURL()},forEach:function(D){for(var L=W(this).entries,H=k(D,arguments.length>1?arguments[1]:void 0,3),K=0,j;K<L.length;)j=L[K++],H(j.value,j.key,this)},keys:function(){return new v(this,"keys")},values:function(){return new v(this,"values")},entries:function(){return new v(this,"entries")}},{enumerable:!0}),f(I,Y,I.entries),f(I,"toString",function(){for(var D=W(this).entries,L=[],H=0,K;H<D.length;)K=D[H++],L.push(A(K.key)+"="+A(K.value));return L.join("&")},{enumerable:!0}),p(x,Z),c({global:!0,forced:!d},{URLSearchParams:x}),!d&&typeof P=="function"&&typeof U=="function"&&c({global:!0,enumerable:!0,forced:!0},{fetch:function(D){var L=[D],H,K,j;return arguments.length>1&&(H=arguments[1],w(H)&&(K=H.body,b(K)===Z&&(j=H.headers?new U(H.headers):new U,j.has("content-type")||j.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),H=F(H,{body:z(0,String(K)),headers:z(0,j)}))),L.push(H)),P.apply(this,L)}}),s.exports={URLSearchParams:x,getState:W}},285:function(s,l,a){a(8783);var c=a(2109),u=a(9781),d=a(590),f=a(7854),h=a(6048),p=a(1320),g=a(5787),y=a(6656),S=a(1574),C=a(8457),k=a(8710).codeAt,b=a(3197),R=a(8003),w=a(1637),F=a(9909),z=f.URL,$=w.URLSearchParams,V=w.getState,B=F.set,P=F.getterFor("URL"),U=Math.floor,Y=Math.pow,Z="Invalid authority",Q="Invalid scheme",re="Invalid host",W="Invalid port",le=/[A-Za-z]/,de=/[\d+-.A-Za-z]/,ye=/\d/,Ee=/^(0x|0X)/,be=/^[0-7]+$/,Te=/^\d+$/,ke=/^[\dA-Fa-f]+$/,Ae=/[\u0000\t\u000A\u000D #%/:?@[\\]]/,ge=/[\u0000\t\u000A\u000D #/:?@[\\]]/,A=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,M=/[\t\u000A\u000D]/g,E,O=function(T,ee){var _,te,ie;if(ee.charAt(0)=="["){if(ee.charAt(ee.length-1)!="]"||(_=x(ee.slice(1,-1)),!_))return re;T.host=_}else if(J(T)){if(ee=b(ee),Ae.test(ee)||(_=v(ee),_===null))return re;T.host=_}else{if(ge.test(ee))return re;for(_="",te=C(ee),ie=0;ie<te.length;ie++)_+=j(te[ie],D);T.host=_}},v=function(T){var ee=T.split("."),_,te,ie,we,he,Pe,$e;if(ee.length&&ee[ee.length-1]==""&&ee.pop(),_=ee.length,_>4)return T;for(te=[],ie=0;ie<_;ie++){if(we=ee[ie],we=="")return T;if(he=10,we.length>1&&we.charAt(0)=="0"&&(he=Ee.test(we)?16:8,we=we.slice(he==8?1:2)),we==="")Pe=0;else{if(!(he==10?Te:he==8?be:ke).test(we))return T;Pe=parseInt(we,he)}te.push(Pe)}for(ie=0;ie<_;ie++)if(Pe=te[ie],ie==_-1){if(Pe>=Y(256,5-_))return null}else if(Pe>255)return null;for($e=te.pop(),ie=0;ie<te.length;ie++)$e+=te[ie]*Y(256,3-ie);return $e},x=function(T){var ee=[0,0,0,0,0,0,0,0],_=0,te=null,ie=0,we,he,Pe,$e,je,Pt,ne,Xe=function(){return T.charAt(ie)};if(Xe()==":"){if(T.charAt(1)!=":")return;ie+=2,_++,te=_}for(;Xe();){if(_==8)return;if(Xe()==":"){if(te!==null)return;ie++,_++,te=_;continue}for(we=he=0;he<4&&ke.test(Xe());)we=we*16+parseInt(Xe(),16),ie++,he++;if(Xe()=="."){if(he==0||(ie-=he,_>6))return;for(Pe=0;Xe();){if($e=null,Pe>0)if(Xe()=="."&&Pe<4)ie++;else return;if(!ye.test(Xe()))return;for(;ye.test(Xe());){if(je=parseInt(Xe(),10),$e===null)$e=je;else{if($e==0)return;$e=$e*10+je}if($e>255)return;ie++}ee[_]=ee[_]*256+$e,Pe++,(Pe==2||Pe==4)&&_++}if(Pe!=4)return;break}else if(Xe()==":"){if(ie++,!Xe())return}else if(Xe())return;ee[_++]=we}if(te!==null)for(Pt=_-te,_=7;_!=0&&Pt>0;)ne=ee[_],ee[_--]=ee[te+Pt-1],ee[te+--Pt]=ne;else if(_!=8)return;return ee},I=function(T){for(var ee=null,_=1,te=null,ie=0,we=0;we<8;we++)T[we]!==0?(ie>_&&(ee=te,_=ie),te=null,ie=0):(te===null&&(te=we),++ie);return ie>_&&(ee=te,_=ie),ee},N=function(T){var ee,_,te,ie;if(typeof T=="number"){for(ee=[],_=0;_<4;_++)ee.unshift(T%256),T=U(T/256);return ee.join(".")}else if(typeof T=="object"){for(ee="",te=I(T),_=0;_<8;_++)ie&&T[_]===0||(ie&&(ie=!1),te===_?(ee+=_?":":"::",ie=!0):(ee+=T[_].toString(16),_<7&&(ee+=":")));return"["+ee+"]"}return T},D={},L=S({},D,{" ":1,'"':1,"<":1,">":1,"`":1}),H=S({},L,{"#":1,"?":1,"{":1,"}":1}),K=S({},H,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),j=function(T,ee){var _=k(T,0);return _>32&&_<127&&!y(ee,T)?T:encodeURIComponent(T)},G={ftp:21,file:null,http:80,https:443,ws:80,wss:443},J=function(T){return y(G,T.scheme)},q=function(T){return T.username!=""||T.password!=""},ce=function(T){return!T.host||T.cannotBeABaseURL||T.scheme=="file"},me=function(T,ee){var _;return T.length==2&&le.test(T.charAt(0))&&((_=T.charAt(1))==":"||!ee&&_=="|")},Me=function(T){var ee;return T.length>1&&me(T.slice(0,2))&&(T.length==2||(ee=T.charAt(2))==="/"||ee==="\\"||ee==="?"||ee==="#")},Fe=function(T){var ee=T.path,_=ee.length;_&&(T.scheme!="file"||_!=1||!me(ee[0],!0))&&ee.pop()},Be=function(T){return T==="."||T.toLowerCase()==="%2e"},Ne=function(T){return T=T.toLowerCase(),T===".."||T==="%2e."||T===".%2e"||T==="%2e%2e"},Ke={},yt={},rt={},Mn={},X={},se={},ae={},xe={},Ce={},ze={},He={},ut={},dt={},qe={},en={},In={},Et={},Rt={},Sr={},Dt={},cn={},tn=function(T,ee,_,te){var ie=_||Ke,we=0,he="",Pe=!1,$e=!1,je=!1,Pt,ne,Xe,un;for(_||(T.scheme="",T.username="",T.password="",T.host=null,T.port=null,T.path=[],T.query=null,T.fragment=null,T.cannotBeABaseURL=!1,ee=ee.replace(A,"")),ee=ee.replace(M,""),Pt=C(ee);we<=Pt.length;){switch(ne=Pt[we],ie){case Ke:if(ne&&le.test(ne))he+=ne.toLowerCase(),ie=yt;else{if(_)return Q;ie=rt;continue}break;case yt:if(ne&&(de.test(ne)||ne=="+"||ne=="-"||ne=="."))he+=ne.toLowerCase();else if(ne==":"){if(_&&(J(T)!=y(G,he)||he=="file"&&(q(T)||T.port!==null)||T.scheme=="file"&&!T.host))return;if(T.scheme=he,_){J(T)&&G[T.scheme]==T.port&&(T.port=null);return}he="",T.scheme=="file"?ie=qe:J(T)&&te&&te.scheme==T.scheme?ie=Mn:J(T)?ie=xe:Pt[we+1]=="/"?(ie=X,we++):(T.cannotBeABaseURL=!0,T.path.push(""),ie=Sr)}else{if(_)return Q;he="",ie=rt,we=0;continue}break;case rt:if(!te||te.cannotBeABaseURL&&ne!="#")return Q;if(te.cannotBeABaseURL&&ne=="#"){T.scheme=te.scheme,T.path=te.path.slice(),T.query=te.query,T.fragment="",T.cannotBeABaseURL=!0,ie=cn;break}ie=te.scheme=="file"?qe:se;continue;case Mn:if(ne=="/"&&Pt[we+1]=="/")ie=Ce,we++;else{ie=se;continue}break;case X:if(ne=="/"){ie=ze;break}else{ie=Rt;continue}case se:if(T.scheme=te.scheme,ne==E)T.username=te.username,T.password=te.password,T.host=te.host,T.port=te.port,T.path=te.path.slice(),T.query=te.query;else if(ne=="/"||ne=="\\"&&J(T))ie=ae;else if(ne=="?")T.username=te.username,T.password=te.password,T.host=te.host,T.port=te.port,T.path=te.path.slice(),T.query="",ie=Dt;else if(ne=="#")T.username=te.username,T.password=te.password,T.host=te.host,T.port=te.port,T.path=te.path.slice(),T.query=te.query,T.fragment="",ie=cn;else{T.username=te.username,T.password=te.password,T.host=te.host,T.port=te.port,T.path=te.path.slice(),T.path.pop(),ie=Rt;continue}break;case ae:if(J(T)&&(ne=="/"||ne=="\\"))ie=Ce;else if(ne=="/")ie=ze;else{T.username=te.username,T.password=te.password,T.host=te.host,T.port=te.port,ie=Rt;continue}break;case xe:if(ie=Ce,ne!="/"||he.charAt(we+1)!="/")continue;we++;break;case Ce:if(ne!="/"&&ne!="\\"){ie=ze;continue}break;case ze:if(ne=="@"){Pe&&(he="%40"+he),Pe=!0,Xe=C(he);for(var Fa=0;Fa<Xe.length;Fa++){var pf=Xe[Fa];if(pf==":"&&!je){je=!0;continue}var hf=j(pf,K);je?T.password+=hf:T.username+=hf}he=""}else if(ne==E||ne=="/"||ne=="?"||ne=="#"||ne=="\\"&&J(T)){if(Pe&&he=="")return Z;we-=C(he).length+1,he="",ie=He}else he+=ne;break;case He:case ut:if(_&&T.scheme=="file"){ie=In;continue}else if(ne==":"&&!$e){if(he=="")return re;if(un=O(T,he),un)return un;if(he="",ie=dt,_==ut)return}else if(ne==E||ne=="/"||ne=="?"||ne=="#"||ne=="\\"&&J(T)){if(J(T)&&he=="")return re;if(_&&he==""&&(q(T)||T.port!==null))return;if(un=O(T,he),un)return un;if(he="",ie=Et,_)return;continue}else ne=="["?$e=!0:ne=="]"&&($e=!1),he+=ne;break;case dt:if(ye.test(ne))he+=ne;else if(ne==E||ne=="/"||ne=="?"||ne=="#"||ne=="\\"&&J(T)||_){if(he!=""){var Va=parseInt(he,10);if(Va>65535)return W;T.port=J(T)&&Va===G[T.scheme]?null:Va,he=""}if(_)return;ie=Et;continue}else return W;break;case qe:if(T.scheme="file",ne=="/"||ne=="\\")ie=en;else if(te&&te.scheme=="file")if(ne==E)T.host=te.host,T.path=te.path.slice(),T.query=te.query;else if(ne=="?")T.host=te.host,T.path=te.path.slice(),T.query="",ie=Dt;else if(ne=="#")T.host=te.host,T.path=te.path.slice(),T.query=te.query,T.fragment="",ie=cn;else{Me(Pt.slice(we).join(""))||(T.host=te.host,T.path=te.path.slice(),Fe(T)),ie=Rt;continue}else{ie=Rt;continue}break;case en:if(ne=="/"||ne=="\\"){ie=In;break}te&&te.scheme=="file"&&!Me(Pt.slice(we).join(""))&&(me(te.path[0],!0)?T.path.push(te.path[0]):T.host=te.host),ie=Rt;continue;case In:if(ne==E||ne=="/"||ne=="\\"||ne=="?"||ne=="#"){if(!_&&me(he))ie=Rt;else if(he==""){if(T.host="",_)return;ie=Et}else{if(un=O(T,he),un)return un;if(T.host=="localhost"&&(T.host=""),_)return;he="",ie=Et}continue}else he+=ne;break;case Et:if(J(T)){if(ie=Rt,ne!="/"&&ne!="\\")continue}else if(!_&&ne=="?")T.query="",ie=Dt;else if(!_&&ne=="#")T.fragment="",ie=cn;else if(ne!=E&&(ie=Rt,ne!="/"))continue;break;case Rt:if(ne==E||ne=="/"||ne=="\\"&&J(T)||!_&&(ne=="?"||ne=="#")){if(Ne(he)?(Fe(T),ne!="/"&&!(ne=="\\"&&J(T))&&T.path.push("")):Be(he)?ne!="/"&&!(ne=="\\"&&J(T))&&T.path.push(""):(T.scheme=="file"&&!T.path.length&&me(he)&&(T.host&&(T.host=""),he=he.charAt(0)+":"),T.path.push(he)),he="",T.scheme=="file"&&(ne==E||ne=="?"||ne=="#"))for(;T.path.length>1&&T.path[0]==="";)T.path.shift();ne=="?"?(T.query="",ie=Dt):ne=="#"&&(T.fragment="",ie=cn)}else he+=j(ne,H);break;case Sr:ne=="?"?(T.query="",ie=Dt):ne=="#"?(T.fragment="",ie=cn):ne!=E&&(T.path[0]+=j(ne,D));break;case Dt:!_&&ne=="#"?(T.fragment="",ie=cn):ne!=E&&(ne=="'"&&J(T)?T.query+="%27":ne=="#"?T.query+="%23":T.query+=j(ne,D));break;case cn:ne!=E&&(T.fragment+=j(ne,L));break}we++}},Xn=function(ee){var _=g(this,Xn,"URL"),te=arguments.length>1?arguments[1]:void 0,ie=String(ee),we=B(_,{type:"URL"}),he,Pe;if(te!==void 0){if(te instanceof Xn)he=P(te);else if(Pe=tn(he={},String(te)),Pe)throw TypeError(Pe)}if(Pe=tn(we,ie,null,he),Pe)throw TypeError(Pe);var $e=we.searchParams=new $,je=V($e);je.updateSearchParams(we.query),je.updateURL=function(){we.query=String($e)||null},u||(_.href=Pi.call(_),_.origin=qd.call(_),_.protocol=ef.call(_),_.username=tf.call(_),_.password=nf.call(_),_.host=rf.call(_),_.hostname=of.call(_),_.port=sf.call(_),_.pathname=af.call(_),_.search=lf.call(_),_.searchParams=cf.call(_),_.hash=uf.call(_))},Ba=Xn.prototype,Pi=function(){var T=P(this),ee=T.scheme,_=T.username,te=T.password,ie=T.host,we=T.port,he=T.path,Pe=T.query,$e=T.fragment,je=ee+":";return ie!==null?(je+="//",q(T)&&(je+=_+(te?":"+te:"")+"@"),je+=N(ie),we!==null&&(je+=":"+we)):ee=="file"&&(je+="//"),je+=T.cannotBeABaseURL?he[0]:he.length?"/"+he.join("/"):"",Pe!==null&&(je+="?"+Pe),$e!==null&&(je+="#"+$e),je},qd=function(){var T=P(this),ee=T.scheme,_=T.port;if(ee=="blob")try{return new URL(ee.path[0]).origin}catch{return"null"}return ee=="file"||!J(T)?"null":ee+"://"+N(T.host)+(_!==null?":"+_:"")},ef=function(){return P(this).scheme+":"},tf=function(){return P(this).username},nf=function(){return P(this).password},rf=function(){var T=P(this),ee=T.host,_=T.port;return ee===null?"":_===null?N(ee):N(ee)+":"+_},of=function(){var T=P(this).host;return T===null?"":N(T)},sf=function(){var T=P(this).port;return T===null?"":String(T)},af=function(){var T=P(this),ee=T.path;return T.cannotBeABaseURL?ee[0]:ee.length?"/"+ee.join("/"):""},lf=function(){var T=P(this).query;return T?"?"+T:""},cf=function(){return P(this).searchParams},uf=function(){var T=P(this).fragment;return T?"#"+T:""},Lt=function(T,ee){return{get:T,set:ee,configurable:!0,enumerable:!0}};if(u&&h(Ba,{href:Lt(Pi,function(T){var ee=P(this),_=String(T),te=tn(ee,_);if(te)throw TypeError(te);V(ee.searchParams).updateSearchParams(ee.query)}),origin:Lt(qd),protocol:Lt(ef,function(T){var ee=P(this);tn(ee,String(T)+":",Ke)}),username:Lt(tf,function(T){var ee=P(this),_=C(String(T));if(!ce(ee)){ee.username="";for(var te=0;te<_.length;te++)ee.username+=j(_[te],K)}}),password:Lt(nf,function(T){var ee=P(this),_=C(String(T));if(!ce(ee)){ee.password="";for(var te=0;te<_.length;te++)ee.password+=j(_[te],K)}}),host:Lt(rf,function(T){var ee=P(this);ee.cannotBeABaseURL||tn(ee,String(T),He)}),hostname:Lt(of,function(T){var ee=P(this);ee.cannotBeABaseURL||tn(ee,String(T),ut)}),port:Lt(sf,function(T){var ee=P(this);ce(ee)||(T=String(T),T==""?ee.port=null:tn(ee,T,dt))}),pathname:Lt(af,function(T){var ee=P(this);ee.cannotBeABaseURL||(ee.path=[],tn(ee,T+"",Et))}),search:Lt(lf,function(T){var ee=P(this);T=String(T),T==""?ee.query=null:(T.charAt(0)=="?"&&(T=T.slice(1)),ee.query="",tn(ee,T,Dt)),V(ee.searchParams).updateSearchParams(ee.query)}),searchParams:Lt(cf),hash:Lt(uf,function(T){var ee=P(this);if(T=String(T),T==""){ee.fragment=null;return}T.charAt(0)=="#"&&(T=T.slice(1)),ee.fragment="",tn(ee,T,cn)})}),p(Ba,"toJSON",function(){return Pi.call(this)},{enumerable:!0}),p(Ba,"toString",function(){return Pi.call(this)},{enumerable:!0}),z){var df=z.createObjectURL,ff=z.revokeObjectURL;df&&p(Xn,"createObjectURL",function(ee){return df.apply(z,arguments)}),ff&&p(Xn,"revokeObjectURL",function(ee){return ff.apply(z,arguments)})}R(Xn,"URL"),c({global:!0,forced:!d,sham:!u},{URL:Xn})}},r={};function o(s){if(r[s])return r[s].exports;var l=r[s]={exports:{}};return t[s](l,l.exports,o),l.exports}(function(){o.d=function(s,l){for(var a in l)o.o(l,a)&&!o.o(s,a)&&Object.defineProperty(s,a,{enumerable:!0,get:l[a]})}})(),function(){o.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}()}(),function(){o.o=function(s,l){return Object.prototype.hasOwnProperty.call(s,l)}}(),function(){o.r=function(s){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})}}();var i={};return function(){o.r(i),o.d(i,{Dropzone:function(){return W},default:function(){return ge}}),o(2222),o(7327),o(2772),o(6992),o(1249),o(7042),o(561),o(8264),o(8309),o(489),o(1539),o(4916),o(9714),o(8783),o(4723),o(5306),o(3123),o(3210),o(2472),o(2990),o(8927),o(3105),o(5035),o(4345),o(7174),o(2846),o(4731),o(7209),o(6319),o(8867),o(7789),o(3739),o(9368),o(4483),o(2056),o(3462),o(678),o(7462),o(3824),o(5021),o(2974),o(5016),o(4747),o(3948),o(285);function s(A,M){var E;if(typeof Symbol>"u"||A[Symbol.iterator]==null){if(Array.isArray(A)||(E=l(A))||M&&A&&typeof A.length=="number"){E&&(A=E);var O=0,v=function(){};return{s:v,n:function(){return O>=A.length?{done:!0}:{done:!1,value:A[O++]}},e:function(L){throw L},f:v}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
7
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var x=!0,I=!1,N;return{s:function(){E=A[Symbol.iterator]()},n:function(){var L=E.next();return x=L.done,L},e:function(L){I=!0,N=L},f:function(){try{!x&&E.return!=null&&E.return()}finally{if(I)throw N}}}}function l(A,M){if(A){if(typeof A=="string")return a(A,M);var E=Object.prototype.toString.call(A).slice(8,-1);if(E==="Object"&&A.constructor&&(E=A.constructor.name),E==="Map"||E==="Set")return Array.from(A);if(E==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(E))return a(A,M)}}function a(A,M){(M==null||M>A.length)&&(M=A.length);for(var E=0,O=new Array(M);E<M;E++)O[E]=A[E];return O}function c(A,M){if(!(A instanceof M))throw new TypeError("Cannot call a class as a function")}function u(A,M){for(var E=0;E<M.length;E++){var O=M[E];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(A,O.key,O)}}function d(A,M,E){return M&&u(A.prototype,M),E&&u(A,E),A}var f=function(){function A(){c(this,A)}return d(A,[{key:"on",value:function(E,O){return this._callbacks=this._callbacks||{},this._callbacks[E]||(this._callbacks[E]=[]),this._callbacks[E].push(O),this}},{key:"emit",value:function(E){this._callbacks=this._callbacks||{};for(var O=this._callbacks[E],v=arguments.length,x=new Array(v>1?v-1:0),I=1;I<v;I++)x[I-1]=arguments[I];if(O){var N=s(O,!0),D;try{for(N.s();!(D=N.n()).done;){var L=D.value;L.apply(this,x)}}catch(
|
|
8
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var x=!0,I=!1,N;return{s:function(){E=A[Symbol.iterator]()},n:function(){var L=E.next();return x=L.done,L},e:function(L){I=!0,N=L},f:function(){try{!x&&E.return!=null&&E.return()}finally{if(I)throw N}}}}function y(A,M){if(A){if(typeof A=="string")return S(A,M);var E=Object.prototype.toString.call(A).slice(8,-1);if(E==="Object"&&A.constructor&&(E=A.constructor.name),E==="Map"||E==="Set")return Array.from(A);if(E==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(E))return S(A,M)}}function S(A,M){(M==null||M>A.length)&&(M=A.length);for(var E=0,O=new Array(M);E<M;E++)O[E]=A[E];return O}var
|
|
9
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var x=!0,I=!1,N;return{s:function(){E=A[Symbol.iterator]()},n:function(){var L=E.next();return x=L.done,L},e:function(L){I=!0,N=L},f:function(){try{!x&&E.return!=null&&E.return()}finally{if(I)throw N}}}}function w(A,M){if(A){if(typeof A=="string")return F(A,M);var E=Object.prototype.toString.call(A).slice(8,-1);if(E==="Object"&&A.constructor&&(E=A.constructor.name),E==="Map"||E==="Set")return Array.from(A);if(E==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(E))return F(A,M)}}function F(A,M){(M==null||M>A.length)&&(M=A.length);for(var E=0,O=new Array(M);E<M;E++)O[E]=A[E];return O}function z(A,M){if(!(A instanceof M))throw new TypeError("Cannot call a class as a function")}function $(A,M){for(var E=0;E<M.length;E++){var O=M[E];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(A,O.key,O)}}function V(A,M,E){return M&&$(A.prototype,M),E&&$(A,E),A}function B(A,M){if(typeof M!="function"&&M!==null)throw new TypeError("Super expression must either be null or a function");A.prototype=Object.create(M&&M.prototype,{constructor:{value:A,writable:!0,configurable:!0}}),M&&P(A,M)}function P(A,M){return P=Object.setPrototypeOf||function(O,v){return O.__proto__=v,O},P(A,M)}function U(A){var M=Q();return function(){var O=re(A),v;if(M){var x=re(this).constructor;v=Reflect.construct(O,arguments,x)}else v=O.apply(this,arguments);return Y(this,v)}}function Y(A,M){return M&&(b(M)==="object"||typeof M=="function")?M:Z(A)}function Z(A){if(A===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A}function Q(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function re(A){return re=Object.setPrototypeOf?Object.getPrototypeOf:function(E){return E.__proto__||Object.getPrototypeOf(E)},re(A)}var W=function(A){B(E,A);var M=U(E);function E(O,v){var x;z(this,E),x=M.call(this);var I,N;if(x.element=O,x.version=E.version,x.clickableElements=[],x.listeners=[],x.files=[],typeof x.element=="string"&&(x.element=document.querySelector(x.element)),!x.element||x.element.nodeType==null)throw new Error("Invalid dropzone element.");if(x.element.dropzone)throw new Error("Dropzone already attached.");E.instances.push(Z(x)),x.element.dropzone=Z(x);var D=(N=E.optionsForElement(x.element))!=null?N:{};if(x.options=E.extend({},k,D,v??{}),x.options.previewTemplate=x.options.previewTemplate.replace(/\n*/g,""),x.options.forceFallback||!E.isBrowserSupported())return Y(x,x.options.fallback.call(Z(x)));if(x.options.url==null&&(x.options.url=x.element.getAttribute("action")),!x.options.url)throw new Error("No URL provided.");if(x.options.acceptedFiles&&x.options.acceptedMimeTypes)throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");if(x.options.uploadMultiple&&x.options.chunking)throw new Error("You cannot set both: uploadMultiple and chunking.");return x.options.acceptedMimeTypes&&(x.options.acceptedFiles=x.options.acceptedMimeTypes,delete x.options.acceptedMimeTypes),x.options.renameFilename!=null&&(x.options.renameFile=function(L){return x.options.renameFilename.call(Z(x),L.name,L)}),typeof x.options.method=="string"&&(x.options.method=x.options.method.toUpperCase()),(I=x.getExistingFallback())&&I.parentNode&&I.parentNode.removeChild(I),x.options.previewsContainer!==!1&&(x.options.previewsContainer?x.previewsContainer=E.getElement(x.options.previewsContainer,"previewsContainer"):x.previewsContainer=x.element),x.options.clickable&&(x.options.clickable===!0?x.clickableElements=[x.element]:x.clickableElements=E.getElements(x.options.clickable,"clickable")),x.init(),x}return V(E,[{key:"getAcceptedFiles",value:function(){return this.files.filter(function(v){return v.accepted}).map(function(v){return v})}},{key:"getRejectedFiles",value:function(){return this.files.filter(function(v){return!v.accepted}).map(function(v){return v})}},{key:"getFilesWithStatus",value:function(v){return this.files.filter(function(x){return x.status===v}).map(function(x){return x})}},{key:"getQueuedFiles",value:function(){return this.getFilesWithStatus(E.QUEUED)}},{key:"getUploadingFiles",value:function(){return this.getFilesWithStatus(E.UPLOADING)}},{key:"getAddedFiles",value:function(){return this.getFilesWithStatus(E.ADDED)}},{key:"getActiveFiles",value:function(){return this.files.filter(function(v){return v.status===E.UPLOADING||v.status===E.QUEUED}).map(function(v){return v})}},{key:"init",value:function(){var v=this;if(this.element.tagName==="form"&&this.element.setAttribute("enctype","multipart/form-data"),this.element.classList.contains("dropzone")&&!this.element.querySelector(".dz-message")&&this.element.appendChild(E.createElement('<div class="dz-default dz-message"><button class="dz-button" type="button">'.concat(this.options.dictDefaultMessage,"</button></div>"))),this.clickableElements.length){var x=function K(){v.hiddenFileInput&&v.hiddenFileInput.parentNode.removeChild(v.hiddenFileInput),v.hiddenFileInput=document.createElement("input"),v.hiddenFileInput.setAttribute("type","file"),(v.options.maxFiles===null||v.options.maxFiles>1)&&v.hiddenFileInput.setAttribute("multiple","multiple"),v.hiddenFileInput.className="dz-hidden-input",v.options.acceptedFiles!==null&&v.hiddenFileInput.setAttribute("accept",v.options.acceptedFiles),v.options.capture!==null&&v.hiddenFileInput.setAttribute("capture",v.options.capture),v.hiddenFileInput.setAttribute("tabindex","-1"),v.hiddenFileInput.style.visibility="hidden",v.hiddenFileInput.style.position="absolute",v.hiddenFileInput.style.top="0",v.hiddenFileInput.style.left="0",v.hiddenFileInput.style.height="0",v.hiddenFileInput.style.width="0",E.getElement(v.options.hiddenInputContainer,"hiddenInputContainer").appendChild(v.hiddenFileInput),v.hiddenFileInput.addEventListener("change",function(){var j=v.hiddenFileInput.files;if(j.length){var G=R(j,!0),J;try{for(G.s();!(J=G.n()).done;){var q=J.value;v.addFile(q)}}catch(ce){G.e(ce)}finally{G.f()}}v.emit("addedfiles",j),K()})};x()}this.URL=window.URL!==null?window.URL:window.webkitURL;var I=R(this.events,!0),N;try{for(I.s();!(N=I.n()).done;){var D=N.value;this.on(D,this.options[D])}}catch(K){I.e(K)}finally{I.f()}this.on("uploadprogress",function(){return v.updateTotalUploadProgress()}),this.on("removedfile",function(){return v.updateTotalUploadProgress()}),this.on("canceled",function(K){return v.emit("complete",K)}),this.on("complete",function(K){if(v.getAddedFiles().length===0&&v.getUploadingFiles().length===0&&v.getQueuedFiles().length===0)return setTimeout(function(){return v.emit("queuecomplete")},0)});var L=function(j){if(j.dataTransfer.types){for(var G=0;G<j.dataTransfer.types.length;G++)if(j.dataTransfer.types[G]==="Files")return!0}return!1},H=function(j){if(L(j))return j.stopPropagation(),j.preventDefault?j.preventDefault():j.returnValue=!1};return this.listeners=[{element:this.element,events:{dragstart:function(j){return v.emit("dragstart",j)},dragenter:function(j){return H(j),v.emit("dragenter",j)},dragover:function(j){var G;try{G=j.dataTransfer.effectAllowed}catch{}return j.dataTransfer.dropEffect=G==="move"||G==="linkMove"?"move":"copy",H(j),v.emit("dragover",j)},dragleave:function(j){return v.emit("dragleave",j)},drop:function(j){return H(j),v.drop(j)},dragend:function(j){return v.emit("dragend",j)}}}],this.clickableElements.forEach(function(K){return v.listeners.push({element:K,events:{click:function(G){return(K!==v.element||G.target===v.element||E.elementInside(G.target,v.element.querySelector(".dz-message")))&&v.hiddenFileInput.click(),!0}}})}),this.enable(),this.options.init.call(this)}},{key:"destroy",value:function(){return this.disable(),this.removeAllFiles(!0),this.hiddenFileInput!=null&&this.hiddenFileInput.parentNode&&(this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=null),delete this.element.dropzone,E.instances.splice(E.instances.indexOf(this),1)}},{key:"updateTotalUploadProgress",value:function(){var v,x=0,I=0,N=this.getActiveFiles();if(N.length){var D=R(this.getActiveFiles(),!0),L;try{for(D.s();!(L=D.n()).done;){var H=L.value;x+=H.upload.bytesSent,I+=H.upload.total}}catch(K){D.e(K)}finally{D.f()}v=100*x/I}else v=100;return this.emit("totaluploadprogress",v,I,x)}},{key:"_getParamName",value:function(v){return typeof this.options.paramName=="function"?this.options.paramName(v):"".concat(this.options.paramName).concat(this.options.uploadMultiple?"[".concat(v,"]"):"")}},{key:"_renameFile",value:function(v){return typeof this.options.renameFile!="function"?v.name:this.options.renameFile(v)}},{key:"getFallbackForm",value:function(){var v,x;if(v=this.getExistingFallback())return v;var I='<div class="dz-fallback">';this.options.dictFallbackText&&(I+="<p>".concat(this.options.dictFallbackText,"</p>")),I+='<input type="file" name="'.concat(this._getParamName(0),'" ').concat(this.options.uploadMultiple?'multiple="multiple"':void 0,' /><input type="submit" value="Upload!"></div>');var N=E.createElement(I);return this.element.tagName!=="FORM"?(x=E.createElement('<form action="'.concat(this.options.url,'" enctype="multipart/form-data" method="').concat(this.options.method,'"></form>')),x.appendChild(N)):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),x??N}},{key:"getExistingFallback",value:function(){for(var v=function(H){var K=R(H,!0),j;try{for(K.s();!(j=K.n()).done;){var G=j.value;if(/(^| )fallback($| )/.test(G.className))return G}}catch(J){K.e(J)}finally{K.f()}},x=0,I=["div","form"];x<I.length;x++){var N=I[x],D;if(D=v(this.element.getElementsByTagName(N)))return D}}},{key:"setupEventListeners",value:function(){return this.listeners.map(function(v){return function(){var x=[];for(var I in v.events){var N=v.events[I];x.push(v.element.addEventListener(I,N,!1))}return x}()})}},{key:"removeEventListeners",value:function(){return this.listeners.map(function(v){return function(){var x=[];for(var I in v.events){var N=v.events[I];x.push(v.element.removeEventListener(I,N,!1))}return x}()})}},{key:"disable",value:function(){var v=this;return this.clickableElements.forEach(function(x){return x.classList.remove("dz-clickable")}),this.removeEventListeners(),this.disabled=!0,this.files.map(function(x){return v.cancelUpload(x)})}},{key:"enable",value:function(){return delete this.disabled,this.clickableElements.forEach(function(v){return v.classList.add("dz-clickable")}),this.setupEventListeners()}},{key:"filesize",value:function(v){var x=0,I="b";if(v>0){for(var N=["tb","gb","mb","kb","b"],D=0;D<N.length;D++){var L=N[D],H=Math.pow(this.options.filesizeBase,4-D)/10;if(v>=H){x=v/Math.pow(this.options.filesizeBase,4-D),I=L;break}}x=Math.round(10*x)/10}return"<strong>".concat(x,"</strong> ").concat(this.options.dictFileSizeUnits[I])}},{key:"_updateMaxFilesReachedClass",value:function(){return this.options.maxFiles!=null&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")}},{key:"drop",value:function(v){if(v.dataTransfer){this.emit("drop",v);for(var x=[],I=0;I<v.dataTransfer.files.length;I++)x[I]=v.dataTransfer.files[I];if(x.length){var N=v.dataTransfer.items;N&&N.length&&N[0].webkitGetAsEntry!=null?this._addFilesFromItems(N):this.handleFiles(x)}this.emit("addedfiles",x)}}},{key:"paste",value:function(v){if(ke(v!=null?v.clipboardData:void 0,function(I){return I.items})!=null){this.emit("paste",v);var x=v.clipboardData.items;if(x.length)return this._addFilesFromItems(x)}}},{key:"handleFiles",value:function(v){var x=R(v,!0),I;try{for(x.s();!(I=x.n()).done;){var N=I.value;this.addFile(N)}}catch(D){x.e(D)}finally{x.f()}}},{key:"_addFilesFromItems",value:function(v){var x=this;return function(){var I=[],N=R(v,!0),D;try{for(N.s();!(D=N.n()).done;){var L=D.value,H;L.webkitGetAsEntry!=null&&(H=L.webkitGetAsEntry())?H.isFile?I.push(x.addFile(L.getAsFile())):H.isDirectory?I.push(x._addFilesFromDirectory(H,H.name)):I.push(void 0):L.getAsFile!=null&&(L.kind==null||L.kind==="file")?I.push(x.addFile(L.getAsFile())):I.push(void 0)}}catch(K){N.e(K)}finally{N.f()}return I}()}},{key:"_addFilesFromDirectory",value:function(v,x){var I=this,N=v.createReader(),D=function(K){return Ae(console,"log",function(j){return j.log(K)})},L=function H(){return N.readEntries(function(K){if(K.length>0){var j=R(K,!0),G;try{for(j.s();!(G=j.n()).done;){var J=G.value;J.isFile?J.file(function(q){if(!(I.options.ignoreHiddenFiles&&q.name.substring(0,1)==="."))return q.fullPath="".concat(x,"/").concat(q.name),I.addFile(q)}):J.isDirectory&&I._addFilesFromDirectory(J,"".concat(x,"/").concat(J.name))}}catch(q){j.e(q)}finally{j.f()}H()}return null},D)};return L()}},{key:"accept",value:function(v,x){this.options.maxFilesize&&v.size>this.options.maxFilesize*1024*1024?x(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(v.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):E.isValidFile(v,this.options.acceptedFiles)?this.options.maxFiles!=null&&this.getAcceptedFiles().length>=this.options.maxFiles?(x(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",v)):this.options.accept.call(this,v,x):x(this.options.dictInvalidFileType)}},{key:"addFile",value:function(v){var x=this;v.upload={uuid:E.uuidv4(),progress:0,total:v.size,bytesSent:0,filename:this._renameFile(v)},this.files.push(v),v.status=E.ADDED,this.emit("addedfile",v),this._enqueueThumbnail(v),this.accept(v,function(I){I?(v.accepted=!1,x._errorProcessing([v],I)):(v.accepted=!0,x.options.autoQueue&&x.enqueueFile(v)),x._updateMaxFilesReachedClass()})}},{key:"enqueueFiles",value:function(v){var x=R(v,!0),I;try{for(x.s();!(I=x.n()).done;){var N=I.value;this.enqueueFile(N)}}catch(D){x.e(D)}finally{x.f()}return null}},{key:"enqueueFile",value:function(v){var x=this;if(v.status===E.ADDED&&v.accepted===!0){if(v.status=E.QUEUED,this.options.autoProcessQueue)return setTimeout(function(){return x.processQueue()},0)}else throw new Error("This file can't be queued because it has already been processed or was rejected.")}},{key:"_enqueueThumbnail",value:function(v){var x=this;if(this.options.createImageThumbnails&&v.type.match(/image.*/)&&v.size<=this.options.maxThumbnailFilesize*1024*1024)return this._thumbnailQueue.push(v),setTimeout(function(){return x._processThumbnailQueue()},0)}},{key:"_processThumbnailQueue",value:function(){var v=this;if(!(this._processingThumbnail||this._thumbnailQueue.length===0)){this._processingThumbnail=!0;var x=this._thumbnailQueue.shift();return this.createThumbnail(x,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,!0,function(I){return v.emit("thumbnail",x,I),v._processingThumbnail=!1,v._processThumbnailQueue()})}}},{key:"removeFile",value:function(v){if(v.status===E.UPLOADING&&this.cancelUpload(v),this.files=le(this.files,v),this.emit("removedfile",v),this.files.length===0)return this.emit("reset")}},{key:"removeAllFiles",value:function(v){v==null&&(v=!1);var x=R(this.files.slice(),!0),I;try{for(x.s();!(I=x.n()).done;){var N=I.value;(N.status!==E.UPLOADING||v)&&this.removeFile(N)}}catch(D){x.e(D)}finally{x.f()}return null}},{key:"resizeImage",value:function(v,x,I,N,D){var L=this;return this.createThumbnail(v,x,I,N,!0,function(H,K){if(K==null)return D(v);var j=L.options.resizeMimeType;j==null&&(j=v.type);var G=K.toDataURL(j,L.options.resizeQuality);return(j==="image/jpeg"||j==="image/jpg")&&(G=be.restore(v.dataURL,G)),D(E.dataURItoBlob(G))})}},{key:"createThumbnail",value:function(v,x,I,N,D,L){var H=this,K=new FileReader;K.onload=function(){if(v.dataURL=K.result,v.type==="image/svg+xml"){L!=null&&L(K.result);return}H.createThumbnailFromUrl(v,x,I,N,D,L)},K.readAsDataURL(v)}},{key:"displayExistingFile",value:function(v,x,I,N){var D=this,L=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;if(this.emit("addedfile",v),this.emit("complete",v),!L)this.emit("thumbnail",v,x),I&&I();else{var H=function(j){D.emit("thumbnail",v,j),I&&I()};v.dataURL=x,this.createThumbnailFromUrl(v,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,this.options.fixOrientation,H,N)}}},{key:"createThumbnailFromUrl",value:function(v,x,I,N,D,L,H){var K=this,j=document.createElement("img");return H&&(j.crossOrigin=H),D=getComputedStyle(document.body).imageOrientation=="from-image"?!1:D,j.onload=function(){var G=function(q){return q(1)};return typeof EXIF<"u"&&EXIF!==null&&D&&(G=function(q){return EXIF.getData(j,function(){return q(EXIF.getTag(this,"Orientation"))})}),G(function(J){v.width=j.width,v.height=j.height;var q=K.options.resize.call(K,v,x,I,N),ce=document.createElement("canvas"),me=ce.getContext("2d");switch(ce.width=q.trgWidth,ce.height=q.trgHeight,J>4&&(ce.width=q.trgHeight,ce.height=q.trgWidth),J){case 2:me.translate(ce.width,0),me.scale(-1,1);break;case 3:me.translate(ce.width,ce.height),me.rotate(Math.PI);break;case 4:me.translate(0,ce.height),me.scale(1,-1);break;case 5:me.rotate(.5*Math.PI),me.scale(1,-1);break;case 6:me.rotate(.5*Math.PI),me.translate(0,-ce.width);break;case 7:me.rotate(.5*Math.PI),me.translate(ce.height,-ce.width),me.scale(-1,1);break;case 8:me.rotate(-.5*Math.PI),me.translate(-ce.height,0);break}Ee(me,j,q.srcX!=null?q.srcX:0,q.srcY!=null?q.srcY:0,q.srcWidth,q.srcHeight,q.trgX!=null?q.trgX:0,q.trgY!=null?q.trgY:0,q.trgWidth,q.trgHeight);var Me=ce.toDataURL("image/png");if(L!=null)return L(Me,ce)})},L!=null&&(j.onerror=L),j.src=v.dataURL}},{key:"processQueue",value:function(){var v=this.options.parallelUploads,x=this.getUploadingFiles().length,I=x;if(!(x>=v)){var N=this.getQueuedFiles();if(N.length>0){if(this.options.uploadMultiple)return this.processFiles(N.slice(0,v-x));for(;I<v;){if(!N.length)return;this.processFile(N.shift()),I++}}}}},{key:"processFile",value:function(v){return this.processFiles([v])}},{key:"processFiles",value:function(v){var x=R(v,!0),I;try{for(x.s();!(I=x.n()).done;){var N=I.value;N.processing=!0,N.status=E.UPLOADING,this.emit("processing",N)}}catch(D){x.e(D)}finally{x.f()}return this.options.uploadMultiple&&this.emit("processingmultiple",v),this.uploadFiles(v)}},{key:"_getFilesWithXhr",value:function(v){return this.files.filter(function(x){return x.xhr===v}).map(function(x){return x})}},{key:"cancelUpload",value:function(v){if(v.status===E.UPLOADING){var x=this._getFilesWithXhr(v.xhr),I=R(x,!0),N;try{for(I.s();!(N=I.n()).done;){var D=N.value;D.status=E.CANCELED}}catch(j){I.e(j)}finally{I.f()}typeof v.xhr<"u"&&v.xhr.abort();var L=R(x,!0),H;try{for(L.s();!(H=L.n()).done;){var K=H.value;this.emit("canceled",K)}}catch(j){L.e(j)}finally{L.f()}this.options.uploadMultiple&&this.emit("canceledmultiple",x)}else(v.status===E.ADDED||v.status===E.QUEUED)&&(v.status=E.CANCELED,this.emit("canceled",v),this.options.uploadMultiple&&this.emit("canceledmultiple",[v]));if(this.options.autoProcessQueue)return this.processQueue()}},{key:"resolveOption",value:function(v){if(typeof v=="function"){for(var x=arguments.length,I=new Array(x>1?x-1:0),N=1;N<x;N++)I[N-1]=arguments[N];return v.apply(this,I)}return v}},{key:"uploadFile",value:function(v){return this.uploadFiles([v])}},{key:"uploadFiles",value:function(v){var x=this;this._transformFiles(v,function(I){if(x.options.chunking){var N=I[0];v[0].upload.chunked=x.options.chunking&&(x.options.forceChunking||N.size>x.options.chunkSize),v[0].upload.totalChunkCount=Math.ceil(N.size/x.options.chunkSize)}if(v[0].upload.chunked){var D=v[0],L=I[0];D.upload.chunks=[];var H=function(){for(var q=0;D.upload.chunks[q]!==void 0;)q++;if(!(q>=D.upload.totalChunkCount)){var ce=q*x.options.chunkSize,me=Math.min(ce+x.options.chunkSize,L.size),Me={name:x._getParamName(0),data:L.webkitSlice?L.webkitSlice(ce,me):L.slice(ce,me),filename:D.upload.filename,chunkIndex:q};D.upload.chunks[q]={file:D,index:q,dataBlock:Me,status:E.UPLOADING,progress:0,retries:0},x._uploadData(v,[Me])}};if(D.upload.finishedChunkUpload=function(J,q){var ce=!0;J.status=E.SUCCESS,J.dataBlock=null,J.xhr=null;for(var me=0;me<D.upload.totalChunkCount;me++){if(D.upload.chunks[me]===void 0)return H();D.upload.chunks[me].status!==E.SUCCESS&&(ce=!1)}ce&&x.options.chunksUploaded(D,function(){x._finished(v,q,null)})},x.options.parallelChunkUploads)for(var K=0;K<D.upload.totalChunkCount;K++)H();else H()}else{for(var j=[],G=0;G<v.length;G++)j[G]={name:x._getParamName(G),data:I[G],filename:v[G].upload.filename};x._uploadData(v,j)}})}},{key:"_getChunk",value:function(v,x){for(var I=0;I<v.upload.totalChunkCount;I++)if(v.upload.chunks[I]!==void 0&&v.upload.chunks[I].xhr===x)return v.upload.chunks[I]}},{key:"_uploadData",value:function(v,x){var I=this,N=new XMLHttpRequest,D=R(v,!0),L;try{for(D.s();!(L=D.n()).done;){var H=L.value;H.xhr=N}}catch(ae){D.e(ae)}finally{D.f()}v[0].upload.chunked&&(v[0].upload.chunks[x[0].chunkIndex].xhr=N);var K=this.resolveOption(this.options.method,v),j=this.resolveOption(this.options.url,v);N.open(K,j,!0);var G=this.resolveOption(this.options.timeout,v);G&&(N.timeout=this.resolveOption(this.options.timeout,v)),N.withCredentials=!!this.options.withCredentials,N.onload=function(ae){I._finishedUploading(v,N,ae)},N.ontimeout=function(){I._handleUploadError(v,N,"Request timedout after ".concat(I.options.timeout/1e3," seconds"))},N.onerror=function(){I._handleUploadError(v,N)};var J=N.upload!=null?N.upload:N;J.onprogress=function(ae){return I._updateFilesUploadProgress(v,N,ae)};var q={Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"};this.options.headers&&E.extend(q,this.options.headers);for(var ce in q){var me=q[ce];me&&N.setRequestHeader(ce,me)}var Me=new FormData;if(this.options.params){var Fe=this.options.params;typeof Fe=="function"&&(Fe=Fe.call(this,v,N,v[0].upload.chunked?this._getChunk(v[0],N):null));for(var Be in Fe){var Ne=Fe[Be];if(Array.isArray(Ne))for(var Ke=0;Ke<Ne.length;Ke++)Me.append(Be,Ne[Ke]);else Me.append(Be,Ne)}}var yt=R(v,!0),rt;try{for(yt.s();!(rt=yt.n()).done;){var Mn=rt.value;this.emit("sending",Mn,N,Me)}}catch(ae){yt.e(ae)}finally{yt.f()}this.options.uploadMultiple&&this.emit("sendingmultiple",v,N,Me),this._addFormElementData(Me);for(var X=0;X<x.length;X++){var se=x[X];Me.append(se.name,se.data,se.filename)}this.submitRequest(N,Me,v)}},{key:"_transformFiles",value:function(v,x){for(var I=this,N=[],D=0,L=function(j){I.options.transformFile.call(I,v[j],function(G){N[j]=G,++D===v.length&&x(N)})},H=0;H<v.length;H++)L(H)}},{key:"_addFormElementData",value:function(v){if(this.element.tagName==="FORM"){var x=R(this.element.querySelectorAll("input, textarea, select, button"),!0),I;try{for(x.s();!(I=x.n()).done;){var N=I.value,D=N.getAttribute("name"),L=N.getAttribute("type");if(L&&(L=L.toLowerCase()),!(typeof D>"u"||D===null))if(N.tagName==="SELECT"&&N.hasAttribute("multiple")){var H=R(N.options,!0),K;try{for(H.s();!(K=H.n()).done;){var j=K.value;j.selected&&v.append(D,j.value)}}catch(G){H.e(G)}finally{H.f()}}else(!L||L!=="checkbox"&&L!=="radio"||N.checked)&&v.append(D,N.value)}}catch(G){x.e(G)}finally{x.f()}}}},{key:"_updateFilesUploadProgress",value:function(v,x,I){if(v[0].upload.chunked){var H=v[0],K=this._getChunk(H,x);I?(K.progress=100*I.loaded/I.total,K.total=I.total,K.bytesSent=I.loaded):(K.progress=100,K.bytesSent=K.total),H.upload.progress=0,H.upload.total=0,H.upload.bytesSent=0;for(var j=0;j<H.upload.totalChunkCount;j++)H.upload.chunks[j]&&typeof H.upload.chunks[j].progress<"u"&&(H.upload.progress+=H.upload.chunks[j].progress,H.upload.total+=H.upload.chunks[j].total,H.upload.bytesSent+=H.upload.chunks[j].bytesSent);H.upload.progress=H.upload.progress/H.upload.totalChunkCount,this.emit("uploadprogress",H,H.upload.progress,H.upload.bytesSent)}else{var N=R(v,!0),D;try{for(N.s();!(D=N.n()).done;){var L=D.value;L.upload.total&&L.upload.bytesSent&&L.upload.bytesSent==L.upload.total||(I?(L.upload.progress=100*I.loaded/I.total,L.upload.total=I.total,L.upload.bytesSent=I.loaded):(L.upload.progress=100,L.upload.bytesSent=L.upload.total),this.emit("uploadprogress",L,L.upload.progress,L.upload.bytesSent))}}catch(G){N.e(G)}finally{N.f()}}}},{key:"_finishedUploading",value:function(v,x,I){var N;if(v[0].status!==E.CANCELED&&x.readyState===4){if(x.responseType!=="arraybuffer"&&x.responseType!=="blob"&&(N=x.responseText,x.getResponseHeader("content-type")&&~x.getResponseHeader("content-type").indexOf("application/json")))try{N=JSON.parse(N)}catch(D){I=D,N="Invalid JSON response from server."}this._updateFilesUploadProgress(v,x),200<=x.status&&x.status<300?v[0].upload.chunked?v[0].upload.finishedChunkUpload(this._getChunk(v[0],x),N):this._finished(v,N,I):this._handleUploadError(v,x,N)}}},{key:"_handleUploadError",value:function(v,x,I){if(v[0].status!==E.CANCELED){if(v[0].upload.chunked&&this.options.retryChunks){var N=this._getChunk(v[0],x);if(N.retries++<this.options.retryChunksLimit){this._uploadData(v,[N.dataBlock]);return}else console.warn("Retried this chunk too often. Giving up.")}this._errorProcessing(v,I||this.options.dictResponseError.replace("{{statusCode}}",x.status),x)}}},{key:"submitRequest",value:function(v,x,I){if(v.readyState!=1){console.warn("Cannot send this request because the XMLHttpRequest.readyState is not OPENED.");return}v.send(x)}},{key:"_finished",value:function(v,x,I){var N=R(v,!0),D;try{for(N.s();!(D=N.n()).done;){var L=D.value;L.status=E.SUCCESS,this.emit("success",L,x,I),this.emit("complete",L)}}catch(H){N.e(H)}finally{N.f()}if(this.options.uploadMultiple&&(this.emit("successmultiple",v,x,I),this.emit("completemultiple",v)),this.options.autoProcessQueue)return this.processQueue()}},{key:"_errorProcessing",value:function(v,x,I){var N=R(v,!0),D;try{for(N.s();!(D=N.n()).done;){var L=D.value;L.status=E.ERROR,this.emit("error",L,x,I),this.emit("complete",L)}}catch(H){N.e(H)}finally{N.f()}if(this.options.uploadMultiple&&(this.emit("errormultiple",v,x,I),this.emit("completemultiple",v)),this.options.autoProcessQueue)return this.processQueue()}}],[{key:"initClass",value:function(){this.prototype.Emitter=f,this.prototype.events=["drop","dragstart","dragend","dragenter","dragover","dragleave","addedfile","addedfiles","removedfile","thumbnail","error","errormultiple","processing","processingmultiple","uploadprogress","totaluploadprogress","sending","sendingmultiple","success","successmultiple","canceled","canceledmultiple","complete","completemultiple","reset","maxfilesexceeded","maxfilesreached","queuecomplete"],this.prototype._thumbnailQueue=[],this.prototype._processingThumbnail=!1}},{key:"extend",value:function(v){for(var x=arguments.length,I=new Array(x>1?x-1:0),N=1;N<x;N++)I[N-1]=arguments[N];for(var D=0,L=I;D<L.length;D++){var H=L[D];for(var K in H){var j=H[K];v[K]=j}}return v}},{key:"uuidv4",value:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(v){var x=Math.random()*16|0,I=v==="x"?x:x&3|8;return I.toString(16)})}}]),E}(f);W.initClass(),W.version="5.9.3",W.options={},W.optionsForElement=function(A){if(A.getAttribute("id"))return W.options[de(A.getAttribute("id"))]},W.instances=[],W.forElement=function(A){if(typeof A=="string"&&(A=document.querySelector(A)),(A!=null?A.dropzone:void 0)==null)throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");return A.dropzone},W.autoDiscover=!0,W.discover=function(){var A;if(document.querySelectorAll)A=document.querySelectorAll(".dropzone");else{A=[];var M=function(O){return function(){var v=[],x=R(O,!0),I;try{for(x.s();!(I=x.n()).done;){var N=I.value;/(^| )dropzone($| )/.test(N.className)?v.push(A.push(N)):v.push(void 0)}}catch(D){x.e(D)}finally{x.f()}return v}()};M(document.getElementsByTagName("div")),M(document.getElementsByTagName("form"))}return function(){var E=[],O=R(A,!0),v;try{for(O.s();!(v=O.n()).done;){var x=v.value;W.optionsForElement(x)!==!1?E.push(new W(x)):E.push(void 0)}}catch(I){O.e(I)}finally{O.f()}return E}()},W.blockedBrowsers=[/opera.*(Macintosh|Windows Phone).*version\/12/i],W.isBrowserSupported=function(){var A=!0;if(window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if(!("classList"in document.createElement("a")))A=!1;else{W.blacklistedBrowsers!==void 0&&(W.blockedBrowsers=W.blacklistedBrowsers);var M=R(W.blockedBrowsers,!0),E;try{for(M.s();!(E=M.n()).done;){var O=E.value;if(O.test(navigator.userAgent)){A=!1;continue}}}catch(v){M.e(v)}finally{M.f()}}else A=!1;return A},W.dataURItoBlob=function(A){for(var M=atob(A.split(",")[1]),E=A.split(",")[0].split(":")[1].split(";")[0],O=new ArrayBuffer(M.length),v=new Uint8Array(O),x=0,I=M.length,N=0<=I;N?x<=I:x>=I;N?x++:x--)v[x]=M.charCodeAt(x);return new Blob([O],{type:E})};var le=function(M,E){return M.filter(function(O){return O!==E}).map(function(O){return O})},de=function(M){return M.replace(/[\-_](\w)/g,function(E){return E.charAt(1).toUpperCase()})};W.createElement=function(A){var M=document.createElement("div");return M.innerHTML=A,M.childNodes[0]},W.elementInside=function(A,M){if(A===M)return!0;for(;A=A.parentNode;)if(A===M)return!0;return!1},W.getElement=function(A,M){var E;if(typeof A=="string"?E=document.querySelector(A):A.nodeType!=null&&(E=A),E==null)throw new Error("Invalid `".concat(M,"` option provided. Please provide a CSS selector or a plain HTML element."));return E},W.getElements=function(A,M){var E,O;if(A instanceof Array){O=[];try{var v=R(A,!0),x;try{for(v.s();!(x=v.n()).done;)E=x.value,O.push(this.getElement(E,M))}catch(D){v.e(D)}finally{v.f()}}catch{O=null}}else if(typeof A=="string"){O=[];var I=R(document.querySelectorAll(A),!0),N;try{for(I.s();!(N=I.n()).done;)E=N.value,O.push(E)}catch(D){I.e(D)}finally{I.f()}}else A.nodeType!=null&&(O=[A]);if(O==null||!O.length)throw new Error("Invalid `".concat(M,"` option provided. Please provide a CSS selector, a plain HTML element or a list of those."));return O},W.confirm=function(A,M,E){if(window.confirm(A))return M();if(E!=null)return E()},W.isValidFile=function(A,M){if(!M)return!0;M=M.split(",");var E=A.type,O=E.replace(/\/.*$/,""),v=R(M,!0),x;try{for(v.s();!(x=v.n()).done;){var I=x.value;if(I=I.trim(),I.charAt(0)==="."){if(A.name.toLowerCase().indexOf(I.toLowerCase(),A.name.length-I.length)!==-1)return!0}else if(/\/\*$/.test(I)){if(O===I.replace(/\/.*$/,""))return!0}else if(E===I)return!0}}catch(N){v.e(N)}finally{v.f()}return!1},typeof jQuery<"u"&&jQuery!==null&&(jQuery.fn.dropzone=function(A){return this.each(function(){return new W(this,A)})}),W.ADDED="added",W.QUEUED="queued",W.ACCEPTED=W.QUEUED,W.UPLOADING="uploading",W.PROCESSING=W.UPLOADING,W.CANCELED="canceled",W.ERROR="error",W.SUCCESS="success";var ye=function(M){M.naturalWidth;var E=M.naturalHeight,O=document.createElement("canvas");O.width=1,O.height=E;var v=O.getContext("2d");v.drawImage(M,0,0);for(var x=v.getImageData(1,0,1,E),I=x.data,N=0,D=E,L=E;L>N;){var H=I[(L-1)*4+3];H===0?D=L:N=L,L=D+N>>1}var K=L/E;return K===0?1:K},Ee=function(M,E,O,v,x,I,N,D,L,H){var K=ye(E);return M.drawImage(E,O,v,x,I,N,D,L,H/K)},be=function(){function A(){z(this,A)}return V(A,null,[{key:"initClass",value:function(){this.KEY_STR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}},{key:"encode64",value:function(E){for(var O="",v=void 0,x=void 0,I="",N=void 0,D=void 0,L=void 0,H="",K=0;v=E[K++],x=E[K++],I=E[K++],N=v>>2,D=(v&3)<<4|x>>4,L=(x&15)<<2|I>>6,H=I&63,isNaN(x)?L=H=64:isNaN(I)&&(H=64),O=O+this.KEY_STR.charAt(N)+this.KEY_STR.charAt(D)+this.KEY_STR.charAt(L)+this.KEY_STR.charAt(H),v=x=I="",N=D=L=H="",K<E.length;);return O}},{key:"restore",value:function(E,O){if(!E.match("data:image/jpeg;base64,"))return O;var v=this.decode64(E.replace("data:image/jpeg;base64,","")),x=this.slice2Segments(v),I=this.exifManipulation(O,x);return"data:image/jpeg;base64,".concat(this.encode64(I))}},{key:"exifManipulation",value:function(E,O){var v=this.getExifArray(O),x=this.insertExif(E,v),I=new Uint8Array(x);return I}},{key:"getExifArray",value:function(E){for(var O=void 0,v=0;v<E.length;){if(O=E[v],O[0]===255&O[1]===225)return O;v++}return[]}},{key:"insertExif",value:function(E,O){var v=E.replace("data:image/jpeg;base64,",""),x=this.decode64(v),I=x.indexOf(255,3),N=x.slice(0,I),D=x.slice(I),L=N;return L=L.concat(O),L=L.concat(D),L}},{key:"slice2Segments",value:function(E){for(var O=0,v=[];;){var x;if(E[O]===255&E[O+1]===218)break;if(E[O]===255&E[O+1]===216)O+=2;else{x=E[O+2]*256+E[O+3];var I=O+x+2,N=E.slice(O,I);v.push(N),O=I}if(O>E.length)break}return v}},{key:"decode64",value:function(E){var O=void 0,v=void 0,x="",I=void 0,N=void 0,D=void 0,L="",H=0,K=[],j=/[^A-Za-z0-9\+\/\=]/g;for(j.exec(E)&&console.warn(`There were invalid base64 characters in the input text.
|
|
4
|
+
C18.406,1.576,18.22,1.5,18.023,1.5H3.023z`})],-1)];function Zf(n,e){return m.openBlock(),m.createElementBlock("svg",Yf,Xf)}const Vi=Ge(Jf,[["render",Zf]]),Qf={},_f={xmlns:"http://www.w3.org/2000/svg",width:"18",height:"10"},qf=[m.createElementVNode("path",{d:"M8.828 6.207L14.632.404a1 1 0 0 1 1.414 0l.707.707a1 1 0 0 1 0 1.414L9.682 9.596a.999.999 0 0 1-.854.282.999.999 0 0 1-.853-.282L.904 2.526a1 1 0 0 1 0-1.415L1.61.404a1 1 0 0 1 1.414 0l5.803 5.803z",fill:"#3594CF"},null,-1)];function ep(n,e){return m.openBlock(),m.createElementBlock("svg",_f,qf)}const Ya=Ge(Qf,[["render",ep]]),tp={},np={class:"icon icon-caret-right",xmlns:"http://www.w3.org/2000/svg",width:"7",height:"11",viewBox:"0 0 7 11"},rp=[m.createElementVNode("path",{d:"M4.324 5.703l-3.27-3.27A.9.9 0 1 1 2.327 1.16L6.146 4.98a.898.898 0 0 1 .259.724.898.898 0 0 1-.26.724l-3.818 3.819a.9.9 0 1 1-1.273-1.273l3.27-3.27z"},null,-1)];function op(n,e){return m.openBlock(),m.createElementBlock("svg",np,rp)}const zi=Ge(tp,[["render",op]]),ip={},sp={class:"icon icon-caret-left",xmlns:"http://www.w3.org/2000/svg",width:"6",height:"10",viewBox:"0 0 6 10"},ap=[m.createElementVNode("path",{d:"M2.276 4.897l3.27 3.27A.9.9 0 1 1 4.273 9.44L.454 5.62a.898.898 0 0 1-.259-.724.898.898 0 0 1 .26-.724L4.272.354a.9.9 0 1 1 1.273 1.273l-3.27 3.27z"},null,-1)];function lp(n,e){return m.openBlock(),m.createElementBlock("svg",sp,ap)}const $i=Ge(ip,[["render",lp]]),cp={},up={class:"icon icon-close",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"-4 -4 22 22"},dp=[m.createElementVNode("path",{d:"M8.414 7l5.293 5.293a1 1 0 0 1-1.414 1.414L7 8.414l-5.293 5.293a1 1 0 1 1-1.414-1.414L5.586 7 .293 1.707A1 1 0 1 1 1.707.293L7 5.586 12.293.293a1 1 0 0 1 1.414 1.414L8.414 7z"},null,-1)];function fp(n,e){return m.openBlock(),m.createElementBlock("svg",up,dp)}const Ui=Ge(cp,[["render",fp]]),pp={},hp={width:"12",height:"14",viewBox:"0 0 12 14",xmlns:"http://www.w3.org/2000/svg",class:"icon icon-italic"},mp=[m.createElementVNode("path",{d:"M12 0.75C12 1.1875 11.6562 1.5 11.25 1.5H9.125L4.53125 12.5H7.25C7.65625 12.5 8 12.8438 8 13.25C8 13.6875 7.65625 14 7.25 14H0.75C0.3125 14 0 13.6875 0 13.25C0 12.8438 0.3125 12.5 0.75 12.5H2.9375L7.53125 1.5H4.75C4.3125 1.5 4 1.1875 4 0.75C4 0.34375 4.3125 0 4.75 0H11.25C11.6562 0 12 0.34375 12 0.75Z"},null,-1)];function gp(n,e){return m.openBlock(),m.createElementBlock("svg",hp,mp)}const Hi=Ge(pp,[["render",gp]]),yp={},vp={width:"11",height:"13",viewBox:"0 0 11 13",xmlns:"http://www.w3.org/2000/svg",class:"icon icon-bold"},bp=[m.createElementVNode("path",{d:"M8.85547 6.25781C9.21094 5.84766 9.53906 5.05469 9.59375 4.48047C9.78516 2.40234 8.17188 0.625 6.12109 0.625H0.679688C0.433594 0.625 0.242188 0.84375 0.242188 1.0625V2.375C0.242188 2.62109 0.433594 2.8125 0.679688 2.8125H1.52734V10.6875H0.679688C0.433594 10.6875 0.242188 10.9062 0.242188 11.125V12.4375C0.242188 12.6836 0.433594 12.875 0.679688 12.875H6.39453C8.33594 12.875 10.0586 11.4805 10.25 9.53906C10.3867 8.22656 9.78516 7.02344 8.85547 6.25781ZM3.71484 2.8125H6.12109C6.83203 2.8125 7.43359 3.41406 7.43359 4.125C7.43359 4.86328 6.83203 5.4375 6.12109 5.4375H3.71484V2.8125ZM6.12109 10.6875H3.71484V7.625H6.12109C6.96875 7.625 7.65234 8.33594 7.65234 9.15625C7.65234 10.0039 6.96875 10.6875 6.12109 10.6875Z"},null,-1)];function xp(n,e){return m.openBlock(),m.createElementBlock("svg",vp,bp)}const ji=Ge(yp,[["render",xp]]),Sp={},Ep={width:"14",height:"16",viewBox:"0 0 14 16",xmlns:"http://www.w3.org/2000/svg",class:"icon icon-underline"},kp=[m.createElementVNode("path",{d:"M1.25 1.5H2V7.5C2 10.2812 4.21875 12.5 7 12.5C9.75 12.5 12 10.2812 12 7.5V1.5H12.75C13.1562 1.5 13.5 1.1875 13.5 0.75C13.5 0.34375 13.1562 0 12.75 0H9.75C9.3125 0 9 0.34375 9 0.75C9 1.1875 9.3125 1.5 9.75 1.5H10.5V7.5C10.5 9.4375 8.90625 11 7 11C5.0625 11 3.5 9.4375 3.5 7.5V1.5H4.25C4.65625 1.5 5 1.1875 5 0.75C5 0.34375 4.65625 0 4.25 0H1.25C0.8125 0 0.5 0.34375 0.5 0.75C0.5 1.1875 0.8125 1.5 1.25 1.5ZM13.25 14.5H0.75C0.3125 14.5 0 14.8438 0 15.25C0 15.6875 0.3125 16 0.75 16H13.25C13.6562 16 14 15.6875 14 15.25C14 14.8438 13.6562 14.5 13.25 14.5Z"},null,-1)];function Cp(n,e){return m.openBlock(),m.createElementBlock("svg",Ep,kp)}const Wi=Ge(Sp,[["render",Cp]]),wp={},Tp={width:"16",height:"14",viewBox:"0 0 16 14",xmlns:"http://www.w3.org/2000/svg",class:"icon icon-bullet-list"},Ap=[m.createElementVNode("path",{d:"M2.5 5.5H0.5C0.21875 5.5 0 5.75 0 6V8C0 8.28125 0.21875 8.5 0.5 8.5H2.5C2.75 8.5 3 8.28125 3 8V6C3 5.75 2.75 5.5 2.5 5.5ZM2.5 10.5H0.5C0.21875 10.5 0 10.75 0 11V13C0 13.2812 0.21875 13.5 0.5 13.5H2.5C2.75 13.5 3 13.2812 3 13V11C3 10.75 2.75 10.5 2.5 10.5ZM2.5 0.5H0.5C0.21875 0.5 0 0.75 0 1V3C0 3.28125 0.21875 3.5 0.5 3.5H2.5C2.75 3.5 3 3.28125 3 3V1C3 0.75 2.75 0.5 2.5 0.5ZM15.25 6.25H5.71875C5.3125 6.25 5 6.59375 5 7C5 7.4375 5.3125 7.75 5.71875 7.75H15.25C15.6562 7.75 16 7.4375 16 7C16 6.59375 15.6562 6.25 15.25 6.25ZM15.25 1.25H5.71875C5.3125 1.25 5 1.59375 5 2C5 2.375 5.3125 2.75 5.71875 2.75H15.25C15.6562 2.75 16 2.4375 16 2.03125C16 1.65625 15.6562 1.25 15.25 1.25ZM15.25 11.25H5.71875C5.3125 11.25 5 11.5938 5 12C5 12.4375 5.3125 12.75 5.71875 12.75H15.25C15.6562 12.75 16 12.4375 16 12C16 11.5938 15.6562 11.25 15.25 11.25Z"},null,-1)];function Op(n,e){return m.openBlock(),m.createElementBlock("svg",Tp,Ap)}const Ki=Ge(wp,[["render",Op]]),Mp={},Ip={width:"17",height:"15",viewBox:"0 0 17 15",xmlns:"http://www.w3.org/2000/svg",class:"icon icon-ordered-list"},Np=[m.createElementVNode("path",{d:"M7.75 3.75H16.25C16.6562 3.75 17 3.4375 17 3C17 2.59375 16.6562 2.25 16.25 2.25H7.75C7.3125 2.25 7 2.59375 7 3C7 3.4375 7.3125 3.75 7.75 3.75ZM16.25 12.25H7.75C7.3125 12.25 7 12.5938 7 13C7 13.4375 7.3125 13.75 7.75 13.75H16.25C16.6562 13.75 17 13.4375 17 13C17 12.5938 16.6562 12.25 16.25 12.25ZM16.25 7.25H7.75C7.3125 7.25 7 7.59375 7 8C7 8.4375 7.3125 8.75 7.75 8.75H16.25C16.6562 8.75 17 8.4375 17 8C17 7.59375 16.6562 7.25 16.25 7.25ZM2.25 7H4.75C5.15625 7 5.5 6.6875 5.5 6.25C5.5 5.78125 5.15625 5.5 4.75 5.5H4.25V1.75C4.25 1.5 4.09375 1.25 3.84375 1.125C3.625 0.96875 3.34375 0.96875 3.09375 1.125L2.09375 1.6875C1.75 1.90625 1.625 2.375 1.84375 2.71875C2.03125 3.03125 2.40625 3.1875 2.75 3.0625V5.5H2.25C1.8125 5.5 1.5 5.84375 1.5 6.25C1.5 6.6875 1.8125 7 2.25 7ZM5.25 13.5H3.6875L4.84375 12.5C5.78125 11.6875 5.875 10.2812 5.09375 9.34375C4.6875 8.84375 4.125 8.5625 3.5 8.53125C2.90625 8.46875 2.28125 8.65625 1.8125 9.0625L1.4375 9.40625C1.125 9.6875 1.09375 10.1562 1.34375 10.4688C1.625 10.7812 2.09375 10.8125 2.40625 10.5625L2.8125 10.2188C2.96875 10.0625 3.1875 10 3.40625 10.0312C3.625 10.0312 3.8125 10.125 3.9375 10.3125C4.21875 10.625 4.1875 11.0938 3.84375 11.375L1.25 13.7188C1 13.9062 0.9375 14.25 1.03125 14.5312C1.15625 14.8125 1.4375 15 1.71875 15H5.25C5.65625 15 6 14.6875 6 14.2812C6 13.8438 5.65625 13.5 5.25 13.5Z"},null,-1)];function Rp(n,e){return m.openBlock(),m.createElementBlock("svg",Ip,Np)}const Gi=Ge(Mp,[["render",Rp]]),Dp={},Lp={class:"icon icon-hyperlink",xmlns:"http://www.w3.org/2000/svg",version:"1.1","xmlns:xlink":"http://www.w3.org/1999/xlink","xmlns:svgjs":"http://svgjs.com/svgjs",viewBox:"0 0 20 20",width:"20",height:"20"},Pp=[m.createElementVNode("g",{transform:"matrix(0.8333333333333334,0,0,0.8333333333333334,0,0)"},[m.createElementVNode("path",{d:"M10.458,18.374,7.721,21.11a2.853,2.853,0,0,1-3.942,0l-.892-.891a2.787,2.787,0,0,1,0-3.941l5.8-5.8a2.789,2.789,0,0,1,3.942,0l.893.892A1,1,0,0,0,14.94,9.952l-.893-.892a4.791,4.791,0,0,0-6.771,0l-5.8,5.8a4.787,4.787,0,0,0,0,6.77l.892.891a4.785,4.785,0,0,0,6.771,0l2.736-2.735a1,1,0,1,0-1.414-1.415Z",stroke:"none","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"0"}),m.createElementVNode("path",{d:"M22.526,2.363l-.892-.892a4.8,4.8,0,0,0-6.77,0l-2.905,2.9a1,1,0,0,0,1.414,1.414l2.9-2.9a2.79,2.79,0,0,1,3.941,0l.893.893a2.786,2.786,0,0,1,0,3.942l-5.8,5.8a2.769,2.769,0,0,1-1.971.817h0a2.766,2.766,0,0,1-1.969-.816,1,1,0,1,0-1.415,1.412,4.751,4.751,0,0,0,3.384,1.4h0a4.752,4.752,0,0,0,3.385-1.4l5.8-5.8a4.786,4.786,0,0,0,0-6.771Z",stroke:"none","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"0"})],-1)];function Bp(n,e){return m.openBlock(),m.createElementBlock("svg",Lp,Pp)}const Ji=Ge(Dp,[["render",Bp]]),Fp={},Vp=[m.createStaticVNode('<title>BeterDichtbij logo</title><g id="Logo" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Group-3-Copy-2" transform="translate(0.000000, -14.000000)"><g id="Master-Copy" transform="translate(0.000000, 21.000000)" fill="#E1523D"><g id="Group-36-Copy-2"><path d="M0,7.07801038 C0,4.71449972 1.60969434,3.38479666 3.84879725,3.38479666 L13.2067282,3.38479666 C18.2745524,3.38479666 22.3693254,6.83325734 22.3693254,12.0497847 C22.3693254,15.4945924 20.9549647,17.8069606 17.8368602,19.2827849 L17.8368602,19.3814167 C21.978658,19.9732076 25.2450714,23.4655047 25.2450714,27.7468563 C25.2450714,34.687614 20.6619642,38.4283171 13.9374209,38.4283171 L3.89943932,38.4283171 C1.65671912,38.4283171 0,36.9999822 0,34.687614 L0,7.07801038 Z M7.3105444,17.2663121 L11.1123169,17.2663121 C13.4997287,17.2663121 15.058781,15.8379772 15.058781,13.3758348 C15.058781,11.0634665 13.2537529,9.88353771 11.1123169,9.88353771 L7.3105444,9.88353771 L7.3105444,17.2663121 Z M7.3105444,31.9332291 L13.0620365,31.9332291 C15.6918068,31.9332291 17.6415265,30.4062624 17.6415265,27.6482244 C17.6415265,25.3358562 15.8871405,23.7614001 12.4760354,23.7614001 L7.3105444,23.7614001 L7.3105444,31.9332291 Z" id="Fill-10"></path><path d="M33.6758908,27.6990016 C34.164225,31.1912986 37.0399711,32.8168971 40.3027672,32.8168971 C43.909206,32.8168971 46.3942847,29.9638804 48.2463375,29.9638804 C49.758365,29.9638804 51.1220836,31.4871941 51.1220836,33.0141608 C51.1220836,36.0644411 44.8858745,39.0197427 39.6697414,39.0197427 C31.7768132,39.0197427 26.5136553,33.2114244 26.5136553,25.3866333 C26.5136553,18.2011226 31.6791463,11.6548921 39.0873576,11.6548921 C46.6872852,11.6548921 51.7080846,18.6431393 51.7080846,24.5500894 C51.7080846,26.665194 50.7820582,27.6990016 48.6370049,27.6990016 L33.6758908,27.6990016 Z M44.6905408,22.9756333 C44.2998734,19.8742105 42.3501537,17.5618423 39.0873576,17.5618423 C35.9656357,17.5618423 33.8712245,19.9728423 33.5311991,22.9756333 L44.6905408,22.9756333 Z" id="Fill-12"></path><path d="M55.9001628,18.4462409 L54.3411105,18.4462409 C52.4384156,18.4462409 51.2700307,17.2663121 51.2700307,15.3448181 C51.2700307,13.5730984 52.5867245,12.2470484 54.3411105,12.2470484 L55.9001628,12.2470484 L55.9001628,8.01318615 C55.9001628,5.6496755 57.3615482,4.0752194 59.4089347,4.0752194 C61.4563212,4.0752194 62.9177066,5.6496755 62.9177066,8.01318615 L62.9177066,12.2470484 L64.9144511,12.2470484 C66.7194791,12.2470484 68.2785314,13.0799393 68.2785314,15.3448181 C68.2785314,17.5585545 66.7194791,18.4462409 64.9144511,18.4462409 L62.9177066,18.4462409 L62.9177066,34.7862458 C62.9177066,37.1497565 61.4563212,38.7205595 59.4089347,38.7205595 C57.3615482,38.7205595 55.9001628,37.1497565 55.9001628,34.7862458 L55.9001628,18.4462409 Z" id="Fill-14"></path><path d="M74.2727437,27.6990016 C74.761078,31.1912986 77.636824,32.8168971 80.8996202,32.8168971 C84.506059,32.8168971 86.9911376,29.9638804 88.8431905,29.9638804 C90.3552179,29.9638804 91.7189365,31.4871941 91.7189365,33.0141608 C91.7189365,36.0644411 85.4827274,39.0197427 80.2665943,39.0197427 C72.3736661,39.0197427 67.1105082,33.2114244 67.1105082,25.3866333 C67.1105082,18.2011226 72.2759993,11.6548921 79.6805932,11.6548921 C87.2841382,11.6548921 92.3049376,18.6431393 92.3049376,24.5500894 C92.3049376,26.665194 91.3789112,27.6990016 89.2338578,27.6990016 L74.2727437,27.6990016 Z M85.2873937,22.9756333 C84.8967264,19.8742105 82.9470067,17.5618423 79.6805932,17.5618423 C76.5624887,17.5618423 74.4680774,19.9728423 74.1280521,22.9756333 L85.2873937,22.9756333 Z" id="Fill-16"></path><path d="M94.6934346,15.4934965 C94.6934346,13.1299858 96.5454874,11.950057 98.2998734,11.950057 C100.151926,11.950057 101.710978,12.6404797 101.710978,14.9017055 L101.808645,14.9017055 C103.125339,12.9327222 104.5397,11.950057 106.731778,11.950057 C108.435522,11.950057 110.142883,13.1811282 110.142883,15.7382495 C110.142883,18.0506177 108.044854,18.200392 105.950443,19.1830571 C103.856032,20.1693753 101.710978,21.1045511 101.710978,23.9100785 L101.710978,34.7851499 C101.710978,37.1486606 100.249593,38.7231166 98.2022065,38.7231166 C96.15482,38.7231166 94.6934346,37.1486606 94.6934346,34.7851499 L94.6934346,15.4934965 Z" id="Fill-18"></path><path d="M114.139266,7.17591159 C114.139266,4.91103276 115.698318,3.38771909 117.890396,3.38771909 L125.982275,3.38771909 C136.899258,3.38771909 143.135468,10.474598 143.135468,21.4008119 C143.135468,31.7352348 136.508591,38.4275865 126.47061,38.4275865 L117.988063,38.4275865 C116.381986,38.4275865 114.139266,37.5435531 114.139266,34.7380258 L114.139266,7.17591159 Z M121.44981,31.636603 L126.369325,31.636603 C132.659794,31.636603 135.531923,26.9607241 135.531923,21.053774 C135.531923,14.7559496 132.609152,10.1787026 125.884608,10.1787026 L121.44981,10.1787026 L121.44981,31.636603 Z" id="Fill-20"></path><path d="M153.809731,5.20729352 C153.809731,7.42102993 152.055345,9.29138148 149.863266,9.29138148 C147.765238,9.29138148 145.913185,7.37354053 145.913185,5.20729352 C145.913185,3.19082075 147.765238,1.32046919 149.863266,1.32046919 C151.957678,1.32046919 153.809731,3.13967832 153.809731,5.20729352 L153.809731,5.20729352 Z M146.354494,15.8887543 C146.354494,13.5252437 147.81588,11.9507876 149.863266,11.9507876 C151.910653,11.9507876 153.372038,13.5252437 153.372038,15.8887543 L153.372038,34.7858805 C153.372038,37.1493912 151.910653,38.7238473 149.863266,38.7238473 C147.81588,38.7238473 146.354494,37.1493912 146.354494,34.7858805 L146.354494,15.8887543 Z" id="Fill-22"></path><path d="M174.716947,19.5289991 C172.962561,19.5289991 171.403509,18.1518067 169.160789,18.1518067 C165.163682,18.1518067 163.264605,21.7427355 163.264605,25.3848068 C163.264605,28.8807569 165.359016,32.5228282 169.160789,32.5228282 C170.915175,32.5228282 173.548562,31.0470039 174.376922,31.0470039 C176.033641,31.0470039 177.397359,32.4716858 177.397359,34.1447737 C177.397359,37.786845 171.352867,39.0179162 168.820763,39.0179162 C161.26786,39.0179162 156.247061,32.7675812 156.247061,25.3848068 C156.247061,18.1992961 161.412552,11.6530656 168.820763,11.6530656 C171.598842,11.6530656 177.397359,12.6868732 177.397359,16.1316809 C177.397359,17.6075051 176.373666,19.5289991 174.716947,19.5289991" id="Fill-24"></path><path d="M179.83469,4.46901608 C179.83469,2.10550542 181.296075,0.531049329 183.343462,0.531049329 C185.390848,0.531049329 186.852234,2.10550542 186.852234,4.46901608 L186.852234,14.1166693 L186.949901,14.1166693 C188.411286,12.2938072 191.14234,11.6545268 193.334419,11.6545268 C198.839935,11.6545268 202.934708,15.1979663 202.934708,21.2035482 L202.934708,34.7855152 C202.934708,37.1490259 201.473322,38.723482 199.425936,38.723482 C197.378549,38.723482 195.917164,37.1490259 195.917164,34.7855152 L195.917164,22.4346195 C195.917164,19.1359331 193.869778,17.561477 191.337674,17.561477 C188.461928,17.561477 186.852234,19.6765816 186.852234,22.4346195 L186.852234,34.7855152 C186.852234,37.1490259 185.390848,38.723482 183.343462,38.723482 C181.296075,38.723482 179.83469,37.1490259 179.83469,34.7855152 L179.83469,4.46901608 Z" id="Fill-26"></path><path d="M208.63809,18.4462409 L207.079038,18.4462409 C205.17996,18.4462409 204.007958,17.2663121 204.007958,15.3448181 C204.007958,13.5730984 205.324652,12.2470484 207.079038,12.2470484 L208.63809,12.2470484 L208.63809,8.01318615 C208.63809,5.6496755 210.099475,4.0752194 212.146862,4.0752194 C214.194249,4.0752194 215.655634,5.6496755 215.655634,8.01318615 L215.655634,12.2470484 L217.652378,12.2470484 C219.457406,12.2470484 221.016459,13.0799393 221.016459,15.3448181 C221.016459,17.5585545 219.457406,18.4462409 217.652378,18.4462409 L215.655634,18.4462409 L215.655634,34.7862458 C215.655634,37.1497565 214.194249,38.7205595 212.146862,38.7205595 C210.099475,38.7205595 208.63809,37.1497565 208.63809,34.7862458 L208.63809,18.4462409 Z" id="Fill-28"></path><path d="M222.820402,4.46865078 C222.820402,2.10514012 224.281787,0.530684026 226.329173,0.530684026 C228.37656,0.530684026 229.837945,2.10514012 229.837945,4.46865078 L229.837945,14.116304 C231.689998,12.4907055 234.07741,11.6541615 236.515464,11.6541615 C244.068367,11.6541615 247.819497,18.7921829 247.819497,25.6817982 C247.819497,32.3741498 243.337674,39.0190121 236.269488,39.0190121 C233.882076,39.0190121 231.154639,37.9340621 229.837945,35.7714681 C229.400253,37.6418197 228.278893,38.7231166 226.329173,38.7231166 C224.281787,38.7231166 222.820402,37.1486606 222.820402,34.7851499 L222.820402,4.46865078 Z M235.343462,32.5202711 C239.000543,32.5202711 240.801953,28.6845892 240.801953,25.3859027 C240.801953,22.0397269 239.000543,18.1492495 235.343462,18.1492495 C231.592331,18.1492495 229.837945,21.692689 229.837945,25.1411497 C229.837945,28.5859573 231.494664,32.5202711 235.343462,32.5202711 L235.343462,32.5202711 Z" id="Fill-30"></path><path d="M258.153735,5.20729352 C258.153735,7.42102993 256.399349,9.29138148 254.207271,9.29138148 C252.109242,9.29138148 250.257189,7.37354053 250.257189,5.20729352 C250.257189,3.19082075 252.109242,1.32046919 254.207271,1.32046919 C256.301682,1.32046919 258.153735,3.13967832 258.153735,5.20729352 L258.153735,5.20729352 Z M250.698499,15.8887543 C250.698499,13.5252437 252.159884,11.9507876 254.207271,11.9507876 C256.254657,11.9507876 257.716043,13.5252437 257.716043,15.8887543 L257.716043,34.7858805 C257.716043,37.1493912 256.254657,38.7238473 254.207271,38.7238473 C252.159884,38.7238473 250.698499,37.1493912 250.698499,34.7858805 L250.698499,15.8887543 Z" id="Fill-32"></path><path d="M268.972689,5.20729352 C268.972689,7.42102993 267.218303,9.29138148 265.026225,9.29138148 C262.928197,9.29138148 261.076144,7.37354053 261.076144,5.20729352 C261.076144,3.19082075 262.928197,1.32046919 265.026225,1.32046919 C267.120637,1.32046919 268.972689,3.13967832 268.972689,5.20729352 L268.972689,5.20729352 Z M261.517453,15.8887543 C261.517453,13.5252437 262.978839,11.9507876 265.026225,11.9507876 C267.073612,11.9507876 268.534997,13.5252437 268.534997,15.8887543 L268.534997,45.2189353 C268.534997,47.5824459 267.073612,49.156902 265.026225,49.156902 C262.978839,49.156902 261.517453,47.5824459 261.517453,45.2189353 L261.517453,15.8887543 Z" id="Fill-34"></path></g></g><polyline id="Path" stroke="#E1523D" stroke-width="6.4" stroke-linecap="round" stroke-linejoin="round" transform="translate(346.970563, 44.470563) rotate(-45.000000) translate(-346.970563, -44.470563) " points="334.970563 56.4705627 334.970563 32.4705627 334.970563 32.4705627 358.970563 32.4705627"></polyline><g id="Group-2" transform="translate(319.970563, 44.500000) rotate(90.000000) translate(-319.970563, -44.500000) translate(275.970563, 27.500000)" stroke-linecap="round" stroke-linejoin="round" stroke-width="6.4"><polyline id="Path-Copy-2" stroke="#418FDE" transform="translate(70.970563, 17.000000) rotate(-45.000000) translate(-70.970563, -17.000000) " points="58.9705627 29 58.9705627 5 82.9705627 5"></polyline><polyline id="Path-Copy-3" stroke="#FFC72C" transform="translate(16.970563, 17.000000) scale(-1, 1) rotate(-45.000000) translate(-16.970563, -17.000000) " points="4.97056275 29 4.97056275 5 28.9705627 5"></polyline></g><polyline id="Path-Copy" stroke="#00BF6F" stroke-width="6.4" stroke-linecap="round" stroke-linejoin="round" transform="translate(292.970563, 44.470563) scale(-1, 1) rotate(-45.000000) translate(-292.970563, -44.470563) " points="280.970563 56.4705627 280.970563 32.4705627 280.970563 32.4705627 304.970563 32.4705627"></polyline></g></g>',2)];function zp(n,e){return m.openBlock(),m.createElementBlock("svg",m.mergeProps({class:"bd-logo"},n.$attrs,{version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}),Vp,16)}const Xa=Ge(Fp,[["render",zp]]),Za=/^https:/i,lo=m.defineComponent({__name:"BDLink",props:{to:{default:""},target:{default:"_blank"},text:{default:void 0},rel:{default:"noopener noreferrer"}},setup(n){const e=n,t=m.computed(()=>typeof e.to=="string"&&Za.test(e.to)?"a":typeof e.to!="string"&&typeof m.resolveComponent("router-link")!="string"?"router-link":"div"),r=m.computed(()=>{if(typeof e.to=="string"&&Za.test(e.to)){const{to:o,target:i,rel:s}=e;return{href:o,target:i,rel:s}}else{const{to:o}=e;return{to:o}}});return(o,i)=>(m.openBlock(),m.createBlock(m.resolveDynamicComponent(t.value),m.mergeProps({class:"bd-link"},r.value),{default:m.withCtx(()=>[m.renderSlot(o.$slots,"default",{},()=>[m.createTextVNode(m.toDisplayString(e.text),1)])]),_:3},16))}}),co={PRIMARY:"primary",SECONDARY:"secondary",DANGER:"danger",WARNING:"warning",INFO:"info",SUCCESS:"success",LIGHT:"light"},$p={key:0,class:"b-d-alert-title"},Qa=m.defineComponent({__name:"BDAlert",props:{variant:{default:co.PRIMARY},title:{default:""}},setup(n){const e=n,t=m.computed(()=>["alert",`alert-${e.variant}`]);return(r,o)=>(m.openBlock(),m.createElementBlock("div",{class:m.normalizeClass(t.value),role:"alert"},[r.title?(m.openBlock(),m.createElementBlock("div",$p,[m.createVNode(m.unref(ao)),m.createElementVNode("span",null,[m.createElementVNode("strong",null,m.toDisplayString(e.title),1)])])):m.createCommentVNode("",!0),m.renderSlot(r.$slots,"default")],2))}}),Up=["src","alt"],Hp=["textContent"],Yi=m.defineComponent({__name:"BDProfileImage",props:{showFooter:{type:Boolean,default:!1},size:{default:ot.LG},linkText:{default:""},src:{default:""},alt:{default:""}},emits:["click"],setup(n,{emit:e}){const t=()=>{e("click")};return(r,o)=>(m.openBlock(),m.createElementBlock("div",{class:m.normalizeClass(["bd-profile-picture rounded-circle",r.size])},[m.createElementVNode("img",{src:r.src,alt:r.alt,class:"position-absolute top-0 start-0"},null,8,Up),r.showFooter?(m.openBlock(),m.createElementBlock("a",{key:0,class:"bd-profile-picture__footer position-absolute bottom-0 start-0",onClick:t,textContent:m.toDisplayString(r.linkText)},null,8,Hp)):m.createCommentVNode("",!0)],2))}});function jp(n){return m.getCurrentScope()?(m.onScopeDispose(n),!0):!1}function uo(n){return typeof n=="function"?n():m.unref(n)}const Wp=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Kp=n=>typeof n<"u",Gp=Object.prototype.toString,Jp=n=>Gp.call(n)==="[object Object]",Xi=()=>{};function Yp(n,e){function t(...r){return new Promise((o,i)=>{Promise.resolve(n(()=>e.apply(this,r),{fn:e,thisArg:this,args:r})).then(o).catch(i)})}return t}function Xp(n,e={}){let t,r,o=Xi;const i=l=>{clearTimeout(l),o(),o=Xi};return l=>{const a=uo(n),c=uo(e.maxWait);return t&&i(t),a<=0||c!==void 0&&c<=0?(r&&(i(r),r=null),Promise.resolve(l())):new Promise((u,d)=>{o=e.rejectOnCancel?d:u,c&&!r&&(r=setTimeout(()=>{t&&i(t),r=null,u(l())},c)),t=setTimeout(()=>{r&&i(r),r=null,u(l())},a)})}}function Zp(n,e=200,t={}){return Yp(Xp(e,t),n)}function _a(n){var e;const t=uo(n);return(e=t==null?void 0:t.$el)!=null?e:t}const Qp=Wp?window:void 0;function qa(...n){let e,t,r,o;if(typeof n[0]=="string"||Array.isArray(n[0])?([t,r,o]=n,e=Qp):[e,t,r,o]=n,!e)return Xi;Array.isArray(t)||(t=[t]),Array.isArray(r)||(r=[r]);const i=[],s=()=>{i.forEach(u=>u()),i.length=0},l=(u,d,f,h)=>(u.addEventListener(d,f,h),()=>u.removeEventListener(d,f,h)),a=m.watch(()=>[_a(e),uo(o)],([u,d])=>{if(s(),!u)return;const f=Jp(d)?{...d}:d;i.push(...t.flatMap(h=>r.map(p=>l(u,h,p,f))))},{immediate:!0,flush:"post"}),c=()=>{a(),s()};return jp(c),c}function _p(n){return JSON.parse(JSON.stringify(n))}function qp(n,e={}){const{initialValue:t=!1,focusVisible:r=!1}=e,o=m.ref(!1),i=m.computed(()=>_a(n));qa(i,"focus",l=>{var a,c;(!r||(c=(a=l.target).matches)!=null&&c.call(a,":focus-visible"))&&(o.value=!0)}),qa(i,"blur",()=>o.value=!1);const s=m.computed({get:()=>o.value,set(l){var a,c;!l&&o.value?(a=i.value)==null||a.blur():l&&!o.value&&((c=i.value)==null||c.focus())}});return m.watch(i,()=>{s.value=t},{immediate:!0,flush:"post"}),{focused:s}}function Nn(n,e,t,r={}){var o,i,s;const{clone:l=!1,passive:a=!1,eventName:c,deep:u=!1,defaultValue:d,shouldEmit:f}=r,h=m.getCurrentInstance(),p=t||(h==null?void 0:h.emit)||((o=h==null?void 0:h.$emit)==null?void 0:o.bind(h))||((s=(i=h==null?void 0:h.proxy)==null?void 0:i.$emit)==null?void 0:s.bind(h==null?void 0:h.proxy));let g=c;e||(e="modelValue"),g=g||`update:${e.toString()}`;const y=C=>l?typeof l=="function"?l(C):_p(C):C,S=()=>Kp(n[e])?y(n[e]):d,k=C=>{f?f(C)&&p(g,C):p(g,C)};if(a){const C=S(),b=m.ref(C);let R=!1;return m.watch(()=>n[e],w=>{R||(R=!0,b.value=y(w),m.nextTick(()=>R=!1))}),m.watch(b,w=>{!R&&(w!==n[e]||u)&&k(w)},{deep:u}),b}else return m.computed({get(){return S()},set(C){k(C)}})}const eh={class:"bd-zoom-slider d-flex"},th=[m.createElementVNode("g",{transform:"matrix(0.8333333333333334,0,0,0.8333333333333334,0,0)"},[m.createElementVNode("path",{d:"M1.5 13.5h21a1.5 1.5 0 0 0 0-3h-21a1.5 1.5 0 0 0 0 3z","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"0"})],-1)],nh=["max"],rh=[m.createElementVNode("g",{transform:"matrix(0.8333333333333334,0,0,0.8333333333333334,0,0)"},[m.createElementVNode("path",{d:"M0 12a1.5 1.5 0 0 0 1.5 1.5h8.75a.25.25 0 0 1 .25.25v8.75a1.5 1.5 0 0 0 3 0v-8.75a.25.25 0 0 1 .25-.25h8.75a1.5 1.5 0 0 0 0-3h-8.75a.25.25 0 0 1-.25-.25V1.5a1.5 1.5 0 0 0-3 0v8.75a.25.25 0 0 1-.25.25H1.5A1.5 1.5 0 0 0 0 12z","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"0"})],-1)],el=m.defineComponent({__name:"BDZoomslider",props:{modelValue:{},maxValue:{default:5}},emits:["update:modelValue"],setup(n,{emit:e}){const t=n,r=Nn(t,"modelValue",e);function o(){r.value!==0&&r.value--}function i(){r.value<t.maxValue&&r.value++}return(s,l)=>(m.openBlock(),m.createElementBlock("div",eh,[(m.openBlock(),m.createElementBlock("svg",{class:"bd-zoom-slider-min-button",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",fill:"#000000",stroke:"#000000",height:"20",width:"20",onClick:o},th)),m.withDirectives(m.createElementVNode("input",{type:"range","onUpdate:modelValue":l[0]||(l[0]=a=>m.isRef(r)?r.value=a:null),min:"0",max:s.maxValue,class:"bd-zoom-slider-input"},null,8,nh),[[m.vModelText,m.unref(r)]]),(m.openBlock(),m.createElementBlock("svg",{class:"bd-zoom-slider-plus-button",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",fill:"#000000",stroke:"#000000",height:"20",width:"20",onClick:i},rh))]))}});for(var Rn=256,tl=[],nl=256,fo;Rn--;)tl[Rn]=(Rn+256).toString(16).substring(1);function oh(n){var e=0,t=n||11;if(!fo||Rn+t>nl*2)for(fo="",Rn=0;e<nl;e++)fo+=tl[Math.random()*256|0];return fo.substring(Rn,Rn+++t)}function kr(){return{uniqueIdentifier:m.ref(oh())}}const ih=["id"],sh={key:0},Zi=m.defineComponent({__name:"BDCard",props:{class:{default:""},title:{default:""},noHeader:{type:Boolean,default:!1},noBody:{type:Boolean,default:!1},headerClass:{default:""},bodyClass:{default:""},id:{default:0},headerVariant:{default:"primary"}},setup(n){const e=n,{uniqueIdentifier:t}=kr(),r=t.value,o=m.computed(()=>({"bd-card card":!0,[`${e.class}`]:e.class,"no-body":e.noBody})),i=m.computed(()=>({"card-header":!0,"no-title":!e.title,[`${e.headerClass}`]:e.headerClass,[`${e.headerVariant}`]:e.headerVariant})),s=m.computed(()=>({"card-body":!0,[`${e.bodyClass}`]:e.bodyClass}));return(l,a)=>(m.openBlock(),m.createElementBlock("div",{id:m.unref(r),class:m.normalizeClass(o.value)},[!l.noHeader||l.noBody?(m.openBlock(),m.createElementBlock("div",{key:0,class:m.normalizeClass(i.value)},[m.renderSlot(l.$slots,"header",{},()=>[l.title?(m.openBlock(),m.createElementBlock("h2",sh,m.toDisplayString(l.title),1)):m.createCommentVNode("",!0)])],2)):m.createCommentVNode("",!0),l.noBody?m.createCommentVNode("",!0):(m.openBlock(),m.createElementBlock("div",{key:1,class:m.normalizeClass(s.value)},[m.renderSlot(l.$slots,"body")],2))],10,ih))}}),ah={key:0},lh={class:"bd-collapsable-card__actions"},ch=["data-bs-target"],rl=m.defineComponent({__name:"BDCollapsableCard",props:{title:{default:"Title"},disabled:{type:Boolean,default:!1},showOn:{default:"md"},visible:{type:Boolean,default:!0}},setup(n){const e=n,{uniqueIdentifier:t}=kr(),r=t.value,o=m.computed(()=>`bd-collapsable-card__collapse-${r}`),i=m.computed(()=>({"d-block":[ot.SM,ot.MD].includes(e.showOn.toLowerCase()),"d-md-none":e.showOn.toLowerCase()==ot.SM,"d-lg-none":e.showOn.toLowerCase()==ot.MD})),s=m.computed(()=>{let a={"round-corners-sm":e.showOn.toLowerCase()==ot.SM,"round-corners-md":e.showOn.toLowerCase()==ot.MD,"is-disabled":e.disabled,"round-corners":!e.visible};return Object.keys(a).filter(c=>a[c]).join(" ")}),l=m.computed(()=>{let a={collapse:!0,show:!0,"collapsable-body":!0,[`${o.value}`]:!0,"display-none":!e.visible||e.disabled,"open-collapse-lg":e.visible&&[ot.SM,ot.MD].includes(e.showOn.toLowerCase()),"open-collapse-md":e.showOn.toLowerCase()==ot.SM&&e.visible};return Object.keys(a).filter(c=>a[c]).join(" ")});return(a,c)=>(m.openBlock(),m.createBlock(Zi,{class:"bd-collapsable-card",title:a.title,"header-class":s.value,"body-class":l.value},{header:m.withCtx(()=>[a.title?(m.openBlock(),m.createElementBlock("h2",ah,m.toDisplayString(a.title),1)):m.createCommentVNode("",!0),m.createElementVNode("div",lh,[m.renderSlot(a.$slots,"action"),!a.disabled&&a.visible?(m.openBlock(),m.createElementBlock("button",{key:0,class:m.normalizeClass(["btn btn-white btn-caret",i.value]),type:"button","data-bs-toggle":"collapse","data-bs-target":`.${o.value}`,"aria-expanded":"true"},[m.createVNode(m.unref(Ya))],10,ch)):m.createCommentVNode("",!0)])]),body:m.withCtx(()=>[m.renderSlot(a.$slots,"body")]),_:3},8,["title","header-class","body-class"]))}});/*! maska v2.1.11 | (c) Alexander Shabunevich | Released under the MIT license */var uh=Object.defineProperty,dh=(n,e,t)=>e in n?uh(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Cr=(n,e,t)=>(dh(n,typeof e!="symbol"?e+"":e,t),t);const ol={"#":{pattern:/[0-9]/},"@":{pattern:/[a-zA-Z]/},"*":{pattern:/[a-zA-Z0-9]/}};class il{constructor(e={}){Cr(this,"opts",{}),Cr(this,"memo",new Map);const t={...e};if(t.tokens!=null){t.tokens=t.tokensReplace?{...t.tokens}:{...ol,...t.tokens};for(const r of Object.values(t.tokens))typeof r.pattern=="string"&&(r.pattern=new RegExp(r.pattern))}else t.tokens=ol;Array.isArray(t.mask)&&(t.mask.length>1?t.mask=[...t.mask].sort((r,o)=>r.length-o.length):t.mask=t.mask[0]??""),t.mask===""&&(t.mask=null),this.opts=t}masked(e){return this.process(e,this.findMask(e))}unmasked(e){return this.process(e,this.findMask(e),!1)}isEager(){return this.opts.eager===!0}isReversed(){return this.opts.reversed===!0}completed(e){const t=this.findMask(e);if(this.opts.mask==null||t==null)return!1;const r=this.process(e,t).length;return typeof this.opts.mask=="string"?r>=this.opts.mask.length:typeof this.opts.mask=="function"?r>=t.length:this.opts.mask.filter(o=>r>=o.length).length===this.opts.mask.length}findMask(e){const t=this.opts.mask;if(t==null)return null;if(typeof t=="string")return t;if(typeof t=="function")return t(e);const r=this.process(e,t.slice(-1).pop()??"",!1);return t.find(o=>this.process(e,o,!1).length>=r.length)??""}escapeMask(e){const t=[],r=[];return e.split("").forEach((o,i)=>{o==="!"&&e[i-1]!=="!"?r.push(i-r.length):t.push(o)}),{mask:t.join(""),escaped:r}}process(e,t,r=!0){if(t==null)return e;const o=`value=${e},mask=${t},masked=${r?1:0}`;if(this.memo.has(o))return this.memo.get(o);const{mask:i,escaped:s}=this.escapeMask(t),l=[],a=this.opts.tokens!=null?this.opts.tokens:{},c=this.isReversed()?-1:1,u=this.isReversed()?"unshift":"push",d=this.isReversed()?0:i.length-1,f=this.isReversed()?()=>y>-1&&S>-1:()=>y<i.length&&S<e.length,h=C=>!this.isReversed()&&C<=d||this.isReversed()&&C>=d;let p,g=-1,y=this.isReversed()?i.length-1:0,S=this.isReversed()?e.length-1:0,k=!1;for(;f();){const C=i.charAt(y),b=a[C],R=(b==null?void 0:b.transform)!=null?b.transform(e.charAt(S)):e.charAt(S);if(!s.includes(y)&&b!=null?(R.match(b.pattern)!=null?(l[u](R),b.repeated?(g===-1?g=y:y===d&&y!==g&&(y=g-c),d===g&&(y-=c)):b.multiple&&(k=!0,y-=c),y+=c):b.multiple?k&&(y+=c,S-=c,k=!1):R===p?p=void 0:b.optional&&(y+=c,S-=c),S+=c):(r&&!this.isEager()&&l[u](C),R===C&&!this.isEager()?S+=c:p=C,this.isEager()||(y+=c)),this.isEager())for(;h(y)&&(a[i.charAt(y)]==null||s.includes(y));)r?l[u](i.charAt(y)):i.charAt(y)===e.charAt(S)&&(S+=c),y+=c}return this.memo.set(o,l.join("")),this.memo.get(o)}}const sl=n=>JSON.parse(n.replaceAll("'",'"')),al=(n,e={})=>{const t={...e};return n.dataset.maska!=null&&n.dataset.maska!==""&&(t.mask=fh(n.dataset.maska)),n.dataset.maskaEager!=null&&(t.eager=Qi(n.dataset.maskaEager)),n.dataset.maskaReversed!=null&&(t.reversed=Qi(n.dataset.maskaReversed)),n.dataset.maskaTokensReplace!=null&&(t.tokensReplace=Qi(n.dataset.maskaTokensReplace)),n.dataset.maskaTokens!=null&&(t.tokens=ph(n.dataset.maskaTokens)),t},Qi=n=>n!==""?!!JSON.parse(n):!0,fh=n=>n.startsWith("[")&&n.endsWith("]")?sl(n):n,ph=n=>{if(n.startsWith("{")&&n.endsWith("}"))return sl(n);const e={};return n.split("|").forEach(t=>{const r=t.split(":");e[r[0]]={pattern:new RegExp(r[1]),optional:r[2]==="optional",multiple:r[2]==="multiple",repeated:r[2]==="repeated"}}),e};class hh{constructor(e,t={}){Cr(this,"items",new Map),Cr(this,"beforeinputEvent",r=>{const o=r.target,i=this.items.get(o);i.isEager()&&"inputType"in r&&r.inputType.startsWith("delete")&&i.unmasked(o.value).length<=1&&this.setMaskedValue(o,"")}),Cr(this,"inputEvent",r=>{if(r instanceof CustomEvent&&r.type==="input"&&r.detail!=null&&typeof r.detail=="object"&&"masked"in r.detail)return;const o=r.target,i=this.items.get(o),s=o.value,l=o.selectionStart,a=o.selectionEnd;let c=s;if(i.isEager()){const u=i.masked(s),d=i.unmasked(s);d===""&&"data"in r&&r.data!=null?c=r.data:d!==i.unmasked(u)&&(c=d)}if(this.setMaskedValue(o,c),"inputType"in r&&(r.inputType.startsWith("delete")||l!=null&&l<s.length))try{o.setSelectionRange(l,a)}catch{}}),this.options=t,typeof e=="string"?this.init(Array.from(document.querySelectorAll(e)),this.getMaskOpts(t)):this.init("length"in e?Array.from(e):[e],this.getMaskOpts(t))}destroy(){for(const e of this.items.keys())e.removeEventListener("input",this.inputEvent),e.removeEventListener("beforeinput",this.beforeinputEvent);this.items.clear()}needUpdateOptions(e,t){const r=this.items.get(e),o=new il(al(e,this.getMaskOpts(t)));return JSON.stringify(r.opts)!==JSON.stringify(o.opts)}needUpdateValue(e){const t=e.dataset.maskaValue;return t==null&&e.value!==""||t!=null&&t!==e.value}getMaskOpts(e){const{onMaska:t,preProcess:r,postProcess:o,...i}=e;return i}init(e,t){for(const r of e){const o=new il(al(r,t));this.items.set(r,o),r.value!==""&&this.setMaskedValue(r,r.value),r.addEventListener("input",this.inputEvent),r.addEventListener("beforeinput",this.beforeinputEvent)}}setMaskedValue(e,t){const r=this.items.get(e);this.options.preProcess!=null&&(t=this.options.preProcess(t));const o=r.masked(t),i=r.unmasked(r.isEager()?o:t),s=r.completed(t),l={masked:o,unmasked:i,completed:s};t=o,this.options.postProcess!=null&&(t=this.options.postProcess(t)),e.value=t,e.dataset.maskaValue=t,this.options.onMaska!=null&&(Array.isArray(this.options.onMaska)?this.options.onMaska.forEach(a=>a(l)):this.options.onMaska(l)),e.dispatchEvent(new CustomEvent("maska",{detail:l})),e.dispatchEvent(new CustomEvent("input",{detail:l}))}}const _i=new WeakMap,mh=n=>{setTimeout(()=>{var e;((e=_i.get(n))==null?void 0:e.needUpdateValue(n))===!0&&n.dispatchEvent(new CustomEvent("input"))})},gh=(n,e)=>{const t=n instanceof HTMLInputElement?n:n.querySelector("input"),r={...e.arg};if(t==null||(t==null?void 0:t.type)==="file")return;mh(t);const o=_i.get(t);if(o!=null){if(!o.needUpdateOptions(t,r))return;o.destroy()}if(e.value!=null){const i=e.value,s=l=>{i.masked=l.masked,i.unmasked=l.unmasked,i.completed=l.completed};r.onMaska=r.onMaska==null?s:Array.isArray(r.onMaska)?[...r.onMaska,s]:[r.onMaska,s]}_i.set(t,new hh(t,r))},yh=["value","type"],ll=m.defineComponent({__name:"BDFormInput",props:{modelValue:{default:""},formGroupClass:{default:void 0},type:{default:"text"},label:{default:void 0},labelClass:{default:void 0},formFieldClass:{default:void 0},inputClass:{default:void 0},placeholder:{default:void 0},state:{type:[Boolean,null],default:null},readonly:{type:[Boolean,null],default:null},disabled:{type:[Boolean,null],default:null},autofocus:{type:[Boolean,null],default:null},size:{default:ot.MD},tabindex:{default:null},invalidFeedbackClass:{default:void 0},invalidFeedbackText:{default:void 0},delayTimeMs:{default:0},mask:{default:void 0}},emits:["update:modelValue","click","blur","enter"],setup(n,{emit:e}){const t=n,{uniqueIdentifier:r}=kr(),o=Nn(t,"modelValue",e),i=`__BD__FORM__LABEL__${r.value}`,s=`__BD__FORM__GROUP__${r.value}`,l=`form-input-${t.label?t.label.replace(/ /g,"-").toLowerCase():r.value}`,a=`validationFeedback${t.label?t.label.replace(/ /g,""):r.value}`,c=m.computed(()=>({[`${t.inputClass}`]:t.inputClass,"is-invalid":t.state===!1,"is-valid":t.state===!0,[`form-control-${t.size}`]:t.size})),u=m.computed(()=>({placeholder:t.placeholder?t.placeholder:null,readonly:t.readonly===!0,disabled:t.disabled===!0,autofocus:t.autofocus===!0,tabindex:t.tabindex?t.tabindex:null,"aria-describedby":t.state===!1&&t.invalidFeedbackText?a:null,"data-maska":t.mask})),d=Zp(f=>{o.value=f.target.value},t.delayTimeMs);return(f,h)=>(m.openBlock(),m.createElementBlock("div",{class:m.normalizeClass(["bd-form-input",f.formGroupClass]),id:s},[m.renderSlot(f.$slots,"label",{},()=>[f.label?(m.openBlock(),m.createElementBlock("label",{key:0,for:l,id:i,class:m.normalizeClass(["form-label",f.labelClass])},m.toDisplayString(f.label),3)):m.createCommentVNode("",!0)]),m.createElementVNode("div",{class:m.normalizeClass(f.formFieldClass)},[m.withDirectives(m.createElementVNode("input",m.mergeProps({value:f.modelValue,type:f.type,id:l,class:["form-control",c.value]},u.value,{onInput:h[0]||(h[0]=(...p)=>m.unref(d)&&m.unref(d)(...p)),onClick:h[1]||(h[1]=p=>f.$emit("click")),onBlur:h[2]||(h[2]=p=>f.$emit("blur")),onKeydown:h[3]||(h[3]=m.withKeys(p=>f.$emit("enter"),["enter"]))}),null,16,yh),[[m.unref(gh)]]),m.renderSlot(f.$slots,"default")],2),m.createVNode(m.unref(po),{text:f.invalidFeedbackText,class:m.normalizeClass(f.invalidFeedbackClass),state:f.state,id:a},null,8,["text","class","state"])],2))}}),vh=["for"],cl=m.defineComponent({__name:"BDInputGroup",props:{label:{default:void 0},labelForId:{default:void 0}},setup(n){const e=n,t=m.useAttrs();return(r,o)=>(m.openBlock(),m.createElementBlock(m.Fragment,null,[e.label?(m.openBlock(),m.createElementBlock("label",{key:0,for:e.labelForId,class:"form-label"},m.toDisplayString(e.label),9,vh)):m.createCommentVNode("",!0),m.createElementVNode("div",{class:m.normalizeClass(["input-group bd-input-group",m.unref(t).class])},[m.renderSlot(r.$slots,"default")],2)],64))}}),bh={class:"invalid-feedback bd-invalid-feedback"},po=m.defineComponent({__name:"BDFormInvalidFeedback",props:{state:{type:[Boolean,null],default:null},text:{default:""}},setup(n){return(e,t)=>(m.openBlock(),m.createElementBlock("div",bh,[m.createVNode(m.unref(so)),m.createTextVNode(" "+m.toDisplayString(e.text),1)]))}}),ul=m.defineComponent({__name:"BDBadge",props:{variant:{default:co.PRIMARY}},setup(n){const e=n,t=m.computed(()=>["badge","bd-badge",`text-bg-${e.variant}`]);return(r,o)=>(m.openBlock(),m.createElementBlock("span",{role:"status",class:m.normalizeClass(t.value)},[m.renderSlot(r.$slots,"default")],2))}}),xh=["onSubmit","onReset"],dl=m.defineComponent({__name:"BDForm",emits:["submit","reset"],setup(n,{emit:e}){function t(){e("submit")}function r(){e("reset")}return(o,i)=>(m.openBlock(),m.createElementBlock("form",{onSubmit:m.withModifiers(t,["prevent"]),onReset:m.withModifiers(r,["prevent"])},[m.renderSlot(o.$slots,"default")],40,xh))}}),Sh={"aria-label":"Page navigation",class:"bd-pagination"},Eh={class:"page-item"},kh=["data-page"],Ch=["data-page"],wh={class:"page-item"},Th=["data-page"],fl=m.defineComponent({__name:"BDPagination",props:{modelValue:{default:1},totalRows:{default:1},rowsPerPage:{default:10},isPatient:{type:Boolean,default:!0}},emits:["click","update:modelValue"],setup(n,{emit:e}){const t=n,r=Nn(t,"modelValue",e),o=m.ref(Math.ceil(t.totalRows/t.rowsPerPage)),i=m.ref([]);m.watch([()=>t.totalRows,()=>t.rowsPerPage],()=>{o.value=Math.ceil(t.totalRows/t.rowsPerPage),i.value=a()}),m.onMounted(()=>{i.value=a()});const s=m.computed(()=>({[`${t.class}`]:t.class,colleague:!t.isPatient})),l=c=>{const u=c.currentTarget.getAttribute("data-page");isNaN(Number(u))||(r.value=Number(u)),i.value=a(),e("click",r.value)},a=()=>{const c=[],u=o.value,d=7;if(u<=d)for(let f=1;f<=u;f++)c.push(f);else{const h=Math.floor((d-3)/2);if(r.value<=h+2){for(let p=1;p<=h+3;p++)c.push(p);c.push("..."),c.push(u)}else if(r.value>=u-h-1){c.push(1),c.push("...");for(let p=u-h-3;p<=u;p++)c.push(p)}else{c.push(1),c.push("...");for(let p=r.value-1;p<=r.value+1;p++)c.push(p);c.push("..."),c.push(u)}}return c};return(c,u)=>(m.openBlock(),m.createElementBlock("div",Sh,[m.createElementVNode("ul",{class:m.normalizeClass(["pagination",s.value])},[m.withDirectives(m.createElementVNode("li",Eh,[m.createElementVNode("a",{class:"page-link d-flex justify-content-center align-items-center","aria-label":"Previous",onClick:l,"data-page":m.unref(r)-1},[m.createVNode(m.unref($i))],8,kh)],512),[[m.vShow,m.unref(r)>1]]),(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(i.value,d=>(m.openBlock(),m.createElementBlock("li",{class:m.normalizeClass(["page-item",{active:m.unref(r)===d,disabled:typeof d=="string"}]),key:d},[m.createElementVNode("a",{class:"page-link d-flex justify-content-center align-items-center",onClick:l,"data-page":d},m.toDisplayString(d),9,Ch)],2))),128)),m.withDirectives(m.createElementVNode("li",wh,[m.createElementVNode("a",{class:"page-link d-flex justify-content-center align-items-center","aria-label":"Next",onClick:l,"data-page":m.unref(r)+1},[m.createVNode(m.unref(zi))],8,Th)],512),[[m.vShow,m.unref(r)<o.value]])],2)]))}}),Ah=["disabled"],Oh=["value"],pl=m.defineComponent({__name:"BDFormSelect",props:{size:{default:ot.MD},disabled:{type:Boolean},autofocus:{type:Boolean,default:!1},options:{default:void 0},modelValue:{default:""},state:{type:[Boolean,null],default:null}},emits:["update:modelValue","change","input"],setup(n,{emit:e}){const t=n,r=Nn(t,"modelValue",e),o=m.ref(null),{focused:i}=qp(o,{initialValue:t.autofocus}),s=m.computed(()=>({"form-select":!0,"bd-form-select":!0,"is-invalid":t.state===!1,[`form-select-${t.size}`]:["xs","sm","lg"].includes(t.size)}));m.watch(()=>t.autofocus,c=>{c&&(i.value=!0)});const l=c=>{r.value=c.target.value,e("input",c.target.value)},a=c=>{e("change",c.target.value)};return(c,u)=>m.withDirectives((m.openBlock(),m.createElementBlock("select",{class:m.normalizeClass(s.value),"onUpdate:modelValue":u[0]||(u[0]=d=>m.isRef(r)?r.value=d:null),disabled:t.disabled,ref_key:"input",ref:o,onInput:l,onChange:a},[m.renderSlot(c.$slots,"first",{},()=>[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(t.options,d=>(m.openBlock(),m.createElementBlock("option",{value:d.value,key:d.value},m.toDisplayString(d.text),9,Oh))),128))])],42,Ah)),[[m.vModelSelect,m.unref(r)]])}}),Mh=["value","true-value","false-value","data-checked"],hl=m.defineComponent({__name:"BDFormCheckbox",props:{modelValue:{type:[Boolean,String],default:void 0},value:{type:[Boolean,String],default:!0},uncheckedValue:{type:[Boolean,String],default:!1},state:{type:[Boolean,null],default:void 0}},emits:["update:modelValue","change","input"],setup(n,{emit:e}){const t=n,{uniqueIdentifier:r}=kr(),o=Nn(t,"modelValue",e),i=`form-check-input-${r.value}`,s=m.computed(()=>["form-check","bd-form-checkbox"]),l=m.computed(()=>({"form-check-input":!0,"is-invalid":t.state===!1})),a=u=>{e("input",u.target.value)},c=u=>{e("change",u.target.value)};return(u,d)=>(m.openBlock(),m.createElementBlock("div",{class:m.normalizeClass(s.value)},[m.withDirectives(m.createElementVNode("input",{"onUpdate:modelValue":d[0]||(d[0]=f=>m.isRef(o)?o.value=f:null),class:m.normalizeClass(l.value),type:"checkbox",value:u.value,"true-value":u.value,"false-value":u.uncheckedValue,id:i,onChange:c,onInput:a,"data-checked":m.unref(o)===u.value},null,42,Mh),[[m.vModelCheckbox,m.unref(o)]]),m.createElementVNode("label",{class:"form-check-label",for:i},[m.renderSlot(u.$slots,"default")]),m.renderSlot(u.$slots,"last")],2))}}),Ih={key:0,class:"bd-article__body"},Nh={key:1},ml=m.defineComponent({__name:"BDArticle",props:{title:{default:""},text:{default:""},hideBody:{type:Boolean,default:!1},hideFooter:{type:Boolean,default:!1},identifier:{}},emits:["click"],setup(n,{emit:e}){const t=n,r=o=>e("click",{event:o,identifier:t.identifier});return(o,i)=>(m.openBlock(),m.createElementBlock("article",{class:"bd-article",onClick:r},[m.createElementVNode("header",null,[m.renderSlot(o.$slots,"header",{},()=>[m.createElementVNode("h5",null,m.toDisplayString(t.title),1)])]),t.hideBody?m.createCommentVNode("",!0):(m.openBlock(),m.createElementBlock("div",Ih,[m.renderSlot(o.$slots,"default",{},()=>[m.createTextVNode(m.toDisplayString(t.text),1)])])),t.hideFooter?m.createCommentVNode("",!0):(m.openBlock(),m.createElementBlock("footer",Nh,[m.renderSlot(o.$slots,"footer")]))]))}}),gl={DANGER:"danger",WARNING:"warning",INFO:"info",SUCCESS:"success"},Rh=["id"],Dh=m.createElementVNode("div",{class:"toast-left-border"},null,-1),Lh={class:"toast-header"},Ph=m.createElementVNode("button",{type:"button",class:"btn-close","data-bs-dismiss":"toast","aria-label":"Close"},null,-1),Bh={class:"toast-body"},yl=m.defineComponent({__name:"BDToast",props:{id:{},show:{type:Boolean,default:!1},variant:{default:gl.INFO},teleport:{default:{to:"body",disabled:!1}},title:{default:""},text:{default:""}},setup(n){const e=n,t=m.computed(()=>({show:e.show,[`bd-toast-${e.variant}`]:!0})),r=m.computed(()=>e.variant!==gl.SUCCESS);return(o,i)=>(m.openBlock(),m.createBlock(m.Teleport,m.normalizeProps(m.guardReactiveProps(e.teleport)),[m.createElementVNode("div",{class:m.normalizeClass(["toast bd-toast",t.value]),role:"alert","aria-live":"assertive","aria-atomic":"true",id:e.id},[Dh,m.createElementVNode("div",Lh,[r.value?(m.openBlock(),m.createBlock(m.unref(ao),{key:0})):(m.openBlock(),m.createBlock(m.unref(io),{key:1})),m.createElementVNode("h5",null,m.toDisplayString(e.title),1),Ph]),m.createElementVNode("div",Bh,[m.createElementVNode("span",null,m.toDisplayString(e.text),1)])],10,Rh)],16))}}),vl=m.defineComponent({__name:"BDDropdownItem",props:{to:{default:""},target:{default:"_blank"},text:{default:void 0},rel:{default:"noopener noreferrer"}},emits:["click"],setup(n,{emit:e}){const t=n,r=()=>{e("click")};return(o,i)=>(m.openBlock(),m.createElementBlock("li",m.mergeProps({class:"bd-dropdown-item"},o.$attrs),[m.createVNode(lo,m.mergeProps({class:"dropdown-item",onClick:r},t),{default:m.withCtx(()=>[m.renderSlot(o.$slots,"default",{},()=>[m.createTextVNode(m.toDisplayString(t.text),1)])]),_:3},16)],16))}});function Fh(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var bl={exports:{}};(function(n,e){(function(r,o){n.exports=o()})(self,function(){return function(){var t={3099:function(s){s.exports=function(l){if(typeof l!="function")throw TypeError(String(l)+" is not a function");return l}},6077:function(s,l,a){var c=a(111);s.exports=function(u){if(!c(u)&&u!==null)throw TypeError("Can't set "+String(u)+" as a prototype");return u}},1223:function(s,l,a){var c=a(5112),u=a(30),d=a(3070),f=c("unscopables"),h=Array.prototype;h[f]==null&&d.f(h,f,{configurable:!0,value:u(null)}),s.exports=function(p){h[f][p]=!0}},1530:function(s,l,a){var c=a(8710).charAt;s.exports=function(u,d,f){return d+(f?c(u,d).length:1)}},5787:function(s){s.exports=function(l,a,c){if(!(l instanceof a))throw TypeError("Incorrect "+(c?c+" ":"")+"invocation");return l}},9670:function(s,l,a){var c=a(111);s.exports=function(u){if(!c(u))throw TypeError(String(u)+" is not an object");return u}},4019:function(s){s.exports=typeof ArrayBuffer<"u"&&typeof DataView<"u"},260:function(s,l,a){var c=a(4019),u=a(9781),d=a(7854),f=a(111),h=a(6656),p=a(648),g=a(8880),y=a(1320),S=a(3070).f,k=a(9518),C=a(7674),b=a(5112),R=a(9711),w=d.Int8Array,F=w&&w.prototype,z=d.Uint8ClampedArray,$=z&&z.prototype,V=w&&k(w),B=F&&k(F),P=Object.prototype,H=P.isPrototypeOf,Y=b("toStringTag"),Z=R("TYPED_ARRAY_TAG"),Q=c&&!!C&&p(d.opera)!=="Opera",re=!1,W,le={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},de={BigInt64Array:8,BigUint64Array:8},ye=function(A){if(!f(A))return!1;var M=p(A);return M==="DataView"||h(le,M)||h(de,M)},Ee=function(ge){if(!f(ge))return!1;var A=p(ge);return h(le,A)||h(de,A)},be=function(ge){if(Ee(ge))return ge;throw TypeError("Target is not a typed array")},Te=function(ge){if(C){if(H.call(V,ge))return ge}else for(var A in le)if(h(le,W)){var M=d[A];if(M&&(ge===M||H.call(M,ge)))return ge}throw TypeError("Target is not a typed array constructor")},Ce=function(ge,A,M){if(u){if(M)for(var E in le){var O=d[E];O&&h(O.prototype,ge)&&delete O.prototype[ge]}(!B[ge]||M)&&y(B,ge,M?A:Q&&F[ge]||A)}},Ae=function(ge,A,M){var E,O;if(u){if(C){if(M)for(E in le)O=d[E],O&&h(O,ge)&&delete O[ge];if(!V[ge]||M)try{return y(V,ge,M?A:Q&&w[ge]||A)}catch{}else return}for(E in le)O=d[E],O&&(!O[ge]||M)&&y(O,ge,A)}};for(W in le)d[W]||(Q=!1);if((!Q||typeof V!="function"||V===Function.prototype)&&(V=function(){throw TypeError("Incorrect invocation")},Q))for(W in le)d[W]&&C(d[W],V);if((!Q||!B||B===P)&&(B=V.prototype,Q))for(W in le)d[W]&&C(d[W].prototype,B);if(Q&&k($)!==B&&C($,B),u&&!h(B,Y)){re=!0,S(B,Y,{get:function(){return f(this)?this[Z]:void 0}});for(W in le)d[W]&&g(d[W],Z,W)}s.exports={NATIVE_ARRAY_BUFFER_VIEWS:Q,TYPED_ARRAY_TAG:re&&Z,aTypedArray:be,aTypedArrayConstructor:Te,exportTypedArrayMethod:Ce,exportTypedArrayStaticMethod:Ae,isView:ye,isTypedArray:Ee,TypedArray:V,TypedArrayPrototype:B}},3331:function(s,l,a){var c=a(7854),u=a(9781),d=a(4019),f=a(8880),h=a(2248),p=a(7293),g=a(5787),y=a(9958),S=a(7466),k=a(7067),C=a(1179),b=a(9518),R=a(7674),w=a(8006).f,F=a(3070).f,z=a(1285),$=a(8003),V=a(9909),B=V.get,P=V.set,H="ArrayBuffer",Y="DataView",Z="prototype",Q="Wrong length",re="Wrong index",W=c[H],le=W,de=c[Y],ye=de&&de[Z],Ee=Object.prototype,be=c.RangeError,Te=C.pack,Ce=C.unpack,Ae=function(G){return[G&255]},ge=function(G){return[G&255,G>>8&255]},A=function(G){return[G&255,G>>8&255,G>>16&255,G>>24&255]},M=function(G){return G[3]<<24|G[2]<<16|G[1]<<8|G[0]},E=function(G){return Te(G,23,4)},O=function(G){return Te(G,52,8)},v=function(G,J){F(G[Z],J,{get:function(){return B(this)[J]}})},x=function(G,J,q,ce){var me=k(q),Me=B(G);if(me+J>Me.byteLength)throw be(re);var Fe=B(Me.buffer).bytes,Be=me+Me.byteOffset,Ne=Fe.slice(Be,Be+J);return ce?Ne:Ne.reverse()},I=function(G,J,q,ce,me,Me){var Fe=k(q),Be=B(G);if(Fe+J>Be.byteLength)throw be(re);for(var Ne=B(Be.buffer).bytes,Ke=Fe+Be.byteOffset,yt=ce(+me),rt=0;rt<J;rt++)Ne[Ke+rt]=yt[Me?rt:J-rt-1]};if(!d)le=function(J){g(this,le,H);var q=k(J);P(this,{bytes:z.call(new Array(q),0),byteLength:q}),u||(this.byteLength=q)},de=function(J,q,ce){g(this,de,Y),g(J,le,Y);var me=B(J).byteLength,Me=y(q);if(Me<0||Me>me)throw be("Wrong offset");if(ce=ce===void 0?me-Me:S(ce),Me+ce>me)throw be(Q);P(this,{buffer:J,byteLength:ce,byteOffset:Me}),u||(this.buffer=J,this.byteLength=ce,this.byteOffset=Me)},u&&(v(le,"byteLength"),v(de,"buffer"),v(de,"byteLength"),v(de,"byteOffset")),h(de[Z],{getInt8:function(J){return x(this,1,J)[0]<<24>>24},getUint8:function(J){return x(this,1,J)[0]},getInt16:function(J){var q=x(this,2,J,arguments.length>1?arguments[1]:void 0);return(q[1]<<8|q[0])<<16>>16},getUint16:function(J){var q=x(this,2,J,arguments.length>1?arguments[1]:void 0);return q[1]<<8|q[0]},getInt32:function(J){return M(x(this,4,J,arguments.length>1?arguments[1]:void 0))},getUint32:function(J){return M(x(this,4,J,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(J){return Ce(x(this,4,J,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(J){return Ce(x(this,8,J,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(J,q){I(this,1,J,Ae,q)},setUint8:function(J,q){I(this,1,J,Ae,q)},setInt16:function(J,q){I(this,2,J,ge,q,arguments.length>2?arguments[2]:void 0)},setUint16:function(J,q){I(this,2,J,ge,q,arguments.length>2?arguments[2]:void 0)},setInt32:function(J,q){I(this,4,J,A,q,arguments.length>2?arguments[2]:void 0)},setUint32:function(J,q){I(this,4,J,A,q,arguments.length>2?arguments[2]:void 0)},setFloat32:function(J,q){I(this,4,J,E,q,arguments.length>2?arguments[2]:void 0)},setFloat64:function(J,q){I(this,8,J,O,q,arguments.length>2?arguments[2]:void 0)}});else{if(!p(function(){W(1)})||!p(function(){new W(-1)})||p(function(){return new W,new W(1.5),new W(NaN),W.name!=H})){le=function(J){return g(this,le),new W(k(J))};for(var N=le[Z]=W[Z],D=w(W),L=0,U;D.length>L;)(U=D[L++])in le||f(le,U,W[U]);N.constructor=le}R&&b(ye)!==Ee&&R(ye,Ee);var K=new de(new le(2)),j=ye.setInt8;K.setInt8(0,2147483648),K.setInt8(1,2147483649),(K.getInt8(0)||!K.getInt8(1))&&h(ye,{setInt8:function(J,q){j.call(this,J,q<<24>>24)},setUint8:function(J,q){j.call(this,J,q<<24>>24)}},{unsafe:!0})}$(le,H),$(de,Y),s.exports={ArrayBuffer:le,DataView:de}},1048:function(s,l,a){var c=a(7908),u=a(1400),d=a(7466),f=Math.min;s.exports=[].copyWithin||function(p,g){var y=c(this),S=d(y.length),k=u(p,S),C=u(g,S),b=arguments.length>2?arguments[2]:void 0,R=f((b===void 0?S:u(b,S))-C,S-k),w=1;for(C<k&&k<C+R&&(w=-1,C+=R-1,k+=R-1);R-- >0;)C in y?y[k]=y[C]:delete y[k],k+=w,C+=w;return y}},1285:function(s,l,a){var c=a(7908),u=a(1400),d=a(7466);s.exports=function(h){for(var p=c(this),g=d(p.length),y=arguments.length,S=u(y>1?arguments[1]:void 0,g),k=y>2?arguments[2]:void 0,C=k===void 0?g:u(k,g);C>S;)p[S++]=h;return p}},8533:function(s,l,a){var c=a(2092).forEach,u=a(9341),d=u("forEach");s.exports=d?[].forEach:function(h){return c(this,h,arguments.length>1?arguments[1]:void 0)}},8457:function(s,l,a){var c=a(9974),u=a(7908),d=a(3411),f=a(7659),h=a(7466),p=a(6135),g=a(1246);s.exports=function(S){var k=u(S),C=typeof this=="function"?this:Array,b=arguments.length,R=b>1?arguments[1]:void 0,w=R!==void 0,F=g(k),z=0,$,V,B,P,H,Y;if(w&&(R=c(R,b>2?arguments[2]:void 0,2)),F!=null&&!(C==Array&&f(F)))for(P=F.call(k),H=P.next,V=new C;!(B=H.call(P)).done;z++)Y=w?d(P,R,[B.value,z],!0):B.value,p(V,z,Y);else for($=h(k.length),V=new C($);$>z;z++)Y=w?R(k[z],z):k[z],p(V,z,Y);return V.length=z,V}},1318:function(s,l,a){var c=a(5656),u=a(7466),d=a(1400),f=function(h){return function(p,g,y){var S=c(p),k=u(S.length),C=d(y,k),b;if(h&&g!=g){for(;k>C;)if(b=S[C++],b!=b)return!0}else for(;k>C;C++)if((h||C in S)&&S[C]===g)return h||C||0;return!h&&-1}};s.exports={includes:f(!0),indexOf:f(!1)}},2092:function(s,l,a){var c=a(9974),u=a(8361),d=a(7908),f=a(7466),h=a(5417),p=[].push,g=function(y){var S=y==1,k=y==2,C=y==3,b=y==4,R=y==6,w=y==7,F=y==5||R;return function(z,$,V,B){for(var P=d(z),H=u(P),Y=c($,V,3),Z=f(H.length),Q=0,re=B||h,W=S?re(z,Z):k||w?re(z,0):void 0,le,de;Z>Q;Q++)if((F||Q in H)&&(le=H[Q],de=Y(le,Q,P),y))if(S)W[Q]=de;else if(de)switch(y){case 3:return!0;case 5:return le;case 6:return Q;case 2:p.call(W,le)}else switch(y){case 4:return!1;case 7:p.call(W,le)}return R?-1:C||b?b:W}};s.exports={forEach:g(0),map:g(1),filter:g(2),some:g(3),every:g(4),find:g(5),findIndex:g(6),filterOut:g(7)}},6583:function(s,l,a){var c=a(5656),u=a(9958),d=a(7466),f=a(9341),h=Math.min,p=[].lastIndexOf,g=!!p&&1/[1].lastIndexOf(1,-0)<0,y=f("lastIndexOf"),S=g||!y;s.exports=S?function(C){if(g)return p.apply(this,arguments)||0;var b=c(this),R=d(b.length),w=R-1;for(arguments.length>1&&(w=h(w,u(arguments[1]))),w<0&&(w=R+w);w>=0;w--)if(w in b&&b[w]===C)return w||0;return-1}:p},1194:function(s,l,a){var c=a(7293),u=a(5112),d=a(7392),f=u("species");s.exports=function(h){return d>=51||!c(function(){var p=[],g=p.constructor={};return g[f]=function(){return{foo:1}},p[h](Boolean).foo!==1})}},9341:function(s,l,a){var c=a(7293);s.exports=function(u,d){var f=[][u];return!!f&&c(function(){f.call(null,d||function(){throw 1},1)})}},3671:function(s,l,a){var c=a(3099),u=a(7908),d=a(8361),f=a(7466),h=function(p){return function(g,y,S,k){c(y);var C=u(g),b=d(C),R=f(C.length),w=p?R-1:0,F=p?-1:1;if(S<2)for(;;){if(w in b){k=b[w],w+=F;break}if(w+=F,p?w<0:R<=w)throw TypeError("Reduce of empty array with no initial value")}for(;p?w>=0:R>w;w+=F)w in b&&(k=y(k,b[w],w,C));return k}};s.exports={left:h(!1),right:h(!0)}},5417:function(s,l,a){var c=a(111),u=a(3157),d=a(5112),f=d("species");s.exports=function(h,p){var g;return u(h)&&(g=h.constructor,typeof g=="function"&&(g===Array||u(g.prototype))?g=void 0:c(g)&&(g=g[f],g===null&&(g=void 0))),new(g===void 0?Array:g)(p===0?0:p)}},3411:function(s,l,a){var c=a(9670),u=a(9212);s.exports=function(d,f,h,p){try{return p?f(c(h)[0],h[1]):f(h)}catch(g){throw u(d),g}}},7072:function(s,l,a){var c=a(5112),u=c("iterator"),d=!1;try{var f=0,h={next:function(){return{done:!!f++}},return:function(){d=!0}};h[u]=function(){return this},Array.from(h,function(){throw 2})}catch{}s.exports=function(p,g){if(!g&&!d)return!1;var y=!1;try{var S={};S[u]=function(){return{next:function(){return{done:y=!0}}}},p(S)}catch{}return y}},4326:function(s){var l={}.toString;s.exports=function(a){return l.call(a).slice(8,-1)}},648:function(s,l,a){var c=a(1694),u=a(4326),d=a(5112),f=d("toStringTag"),h=u(function(){return arguments}())=="Arguments",p=function(g,y){try{return g[y]}catch{}};s.exports=c?u:function(g){var y,S,k;return g===void 0?"Undefined":g===null?"Null":typeof(S=p(y=Object(g),f))=="string"?S:h?u(y):(k=u(y))=="Object"&&typeof y.callee=="function"?"Arguments":k}},9920:function(s,l,a){var c=a(6656),u=a(3887),d=a(1236),f=a(3070);s.exports=function(h,p){for(var g=u(p),y=f.f,S=d.f,k=0;k<g.length;k++){var C=g[k];c(h,C)||y(h,C,S(p,C))}}},8544:function(s,l,a){var c=a(7293);s.exports=!c(function(){function u(){}return u.prototype.constructor=null,Object.getPrototypeOf(new u)!==u.prototype})},4994:function(s,l,a){var c=a(3383).IteratorPrototype,u=a(30),d=a(9114),f=a(8003),h=a(7497),p=function(){return this};s.exports=function(g,y,S){var k=y+" Iterator";return g.prototype=u(c,{next:d(1,S)}),f(g,k,!1,!0),h[k]=p,g}},8880:function(s,l,a){var c=a(9781),u=a(3070),d=a(9114);s.exports=c?function(f,h,p){return u.f(f,h,d(1,p))}:function(f,h,p){return f[h]=p,f}},9114:function(s){s.exports=function(l,a){return{enumerable:!(l&1),configurable:!(l&2),writable:!(l&4),value:a}}},6135:function(s,l,a){var c=a(7593),u=a(3070),d=a(9114);s.exports=function(f,h,p){var g=c(h);g in f?u.f(f,g,d(0,p)):f[g]=p}},654:function(s,l,a){var c=a(2109),u=a(4994),d=a(9518),f=a(7674),h=a(8003),p=a(8880),g=a(1320),y=a(5112),S=a(1913),k=a(7497),C=a(3383),b=C.IteratorPrototype,R=C.BUGGY_SAFARI_ITERATORS,w=y("iterator"),F="keys",z="values",$="entries",V=function(){return this};s.exports=function(B,P,H,Y,Z,Q,re){u(H,P,Y);var W=function(A){if(A===Z&&be)return be;if(!R&&A in ye)return ye[A];switch(A){case F:return function(){return new H(this,A)};case z:return function(){return new H(this,A)};case $:return function(){return new H(this,A)}}return function(){return new H(this)}},le=P+" Iterator",de=!1,ye=B.prototype,Ee=ye[w]||ye["@@iterator"]||Z&&ye[Z],be=!R&&Ee||W(Z),Te=P=="Array"&&ye.entries||Ee,Ce,Ae,ge;if(Te&&(Ce=d(Te.call(new B)),b!==Object.prototype&&Ce.next&&(!S&&d(Ce)!==b&&(f?f(Ce,b):typeof Ce[w]!="function"&&p(Ce,w,V)),h(Ce,le,!0,!0),S&&(k[le]=V))),Z==z&&Ee&&Ee.name!==z&&(de=!0,be=function(){return Ee.call(this)}),(!S||re)&&ye[w]!==be&&p(ye,w,be),k[P]=be,Z)if(Ae={values:W(z),keys:Q?be:W(F),entries:W($)},re)for(ge in Ae)(R||de||!(ge in ye))&&g(ye,ge,Ae[ge]);else c({target:P,proto:!0,forced:R||de},Ae);return Ae}},9781:function(s,l,a){var c=a(7293);s.exports=!c(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},317:function(s,l,a){var c=a(7854),u=a(111),d=c.document,f=u(d)&&u(d.createElement);s.exports=function(h){return f?d.createElement(h):{}}},8324:function(s){s.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},8113:function(s,l,a){var c=a(5005);s.exports=c("navigator","userAgent")||""},7392:function(s,l,a){var c=a(7854),u=a(8113),d=c.process,f=d&&d.versions,h=f&&f.v8,p,g;h?(p=h.split("."),g=p[0]+p[1]):u&&(p=u.match(/Edge\/(\d+)/),(!p||p[1]>=74)&&(p=u.match(/Chrome\/(\d+)/),p&&(g=p[1]))),s.exports=g&&+g},748:function(s){s.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:function(s,l,a){var c=a(7854),u=a(1236).f,d=a(8880),f=a(1320),h=a(3505),p=a(9920),g=a(4705);s.exports=function(y,S){var k=y.target,C=y.global,b=y.stat,R,w,F,z,$,V;if(C?w=c:b?w=c[k]||h(k,{}):w=(c[k]||{}).prototype,w)for(F in S){if($=S[F],y.noTargetGet?(V=u(w,F),z=V&&V.value):z=w[F],R=g(C?F:k+(b?".":"#")+F,y.forced),!R&&z!==void 0){if(typeof $==typeof z)continue;p($,z)}(y.sham||z&&z.sham)&&d($,"sham",!0),f(w,F,$,y)}}},7293:function(s){s.exports=function(l){try{return!!l()}catch{return!0}}},7007:function(s,l,a){a(4916);var c=a(1320),u=a(7293),d=a(5112),f=a(2261),h=a(8880),p=d("species"),g=!u(function(){var b=/./;return b.exec=function(){var R=[];return R.groups={a:"7"},R},"".replace(b,"$<a>")!=="7"}),y=function(){return"a".replace(/./,"$0")==="$0"}(),S=d("replace"),k=function(){return/./[S]?/./[S]("a","$0")==="":!1}(),C=!u(function(){var b=/(?:)/,R=b.exec;b.exec=function(){return R.apply(this,arguments)};var w="ab".split(b);return w.length!==2||w[0]!=="a"||w[1]!=="b"});s.exports=function(b,R,w,F){var z=d(b),$=!u(function(){var Z={};return Z[z]=function(){return 7},""[b](Z)!=7}),V=$&&!u(function(){var Z=!1,Q=/a/;return b==="split"&&(Q={},Q.constructor={},Q.constructor[p]=function(){return Q},Q.flags="",Q[z]=/./[z]),Q.exec=function(){return Z=!0,null},Q[z](""),!Z});if(!$||!V||b==="replace"&&!(g&&y&&!k)||b==="split"&&!C){var B=/./[z],P=w(z,""[b],function(Z,Q,re,W,le){return Q.exec===f?$&&!le?{done:!0,value:B.call(Q,re,W)}:{done:!0,value:Z.call(re,Q,W)}:{done:!1}},{REPLACE_KEEPS_$0:y,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:k}),H=P[0],Y=P[1];c(String.prototype,b,H),c(RegExp.prototype,z,R==2?function(Z,Q){return Y.call(Z,this,Q)}:function(Z){return Y.call(Z,this)})}F&&h(RegExp.prototype[z],"sham",!0)}},9974:function(s,l,a){var c=a(3099);s.exports=function(u,d,f){if(c(u),d===void 0)return u;switch(f){case 0:return function(){return u.call(d)};case 1:return function(h){return u.call(d,h)};case 2:return function(h,p){return u.call(d,h,p)};case 3:return function(h,p,g){return u.call(d,h,p,g)}}return function(){return u.apply(d,arguments)}}},5005:function(s,l,a){var c=a(857),u=a(7854),d=function(f){return typeof f=="function"?f:void 0};s.exports=function(f,h){return arguments.length<2?d(c[f])||d(u[f]):c[f]&&c[f][h]||u[f]&&u[f][h]}},1246:function(s,l,a){var c=a(648),u=a(7497),d=a(5112),f=d("iterator");s.exports=function(h){if(h!=null)return h[f]||h["@@iterator"]||u[c(h)]}},8554:function(s,l,a){var c=a(9670),u=a(1246);s.exports=function(d){var f=u(d);if(typeof f!="function")throw TypeError(String(d)+" is not iterable");return c(f.call(d))}},647:function(s,l,a){var c=a(7908),u=Math.floor,d="".replace,f=/\$([$&'`]|\d\d?|<[^>]*>)/g,h=/\$([$&'`]|\d\d?)/g;s.exports=function(p,g,y,S,k,C){var b=y+p.length,R=S.length,w=h;return k!==void 0&&(k=c(k),w=f),d.call(C,w,function(F,z){var $;switch(z.charAt(0)){case"$":return"$";case"&":return p;case"`":return g.slice(0,y);case"'":return g.slice(b);case"<":$=k[z.slice(1,-1)];break;default:var V=+z;if(V===0)return F;if(V>R){var B=u(V/10);return B===0?F:B<=R?S[B-1]===void 0?z.charAt(1):S[B-1]+z.charAt(1):F}$=S[V-1]}return $===void 0?"":$})}},7854:function(s,l,a){var c=function(u){return u&&u.Math==Math&&u};s.exports=c(typeof globalThis=="object"&&globalThis)||c(typeof window=="object"&&window)||c(typeof self=="object"&&self)||c(typeof a.g=="object"&&a.g)||function(){return this}()||Function("return this")()},6656:function(s){var l={}.hasOwnProperty;s.exports=function(a,c){return l.call(a,c)}},3501:function(s){s.exports={}},490:function(s,l,a){var c=a(5005);s.exports=c("document","documentElement")},4664:function(s,l,a){var c=a(9781),u=a(7293),d=a(317);s.exports=!c&&!u(function(){return Object.defineProperty(d("div"),"a",{get:function(){return 7}}).a!=7})},1179:function(s){var l=Math.abs,a=Math.pow,c=Math.floor,u=Math.log,d=Math.LN2,f=function(p,g,y){var S=new Array(y),k=y*8-g-1,C=(1<<k)-1,b=C>>1,R=g===23?a(2,-24)-a(2,-77):0,w=p<0||p===0&&1/p<0?1:0,F=0,z,$,V;for(p=l(p),p!=p||p===1/0?($=p!=p?1:0,z=C):(z=c(u(p)/d),p*(V=a(2,-z))<1&&(z--,V*=2),z+b>=1?p+=R/V:p+=R*a(2,1-b),p*V>=2&&(z++,V/=2),z+b>=C?($=0,z=C):z+b>=1?($=(p*V-1)*a(2,g),z=z+b):($=p*a(2,b-1)*a(2,g),z=0));g>=8;S[F++]=$&255,$/=256,g-=8);for(z=z<<g|$,k+=g;k>0;S[F++]=z&255,z/=256,k-=8);return S[--F]|=w*128,S},h=function(p,g){var y=p.length,S=y*8-g-1,k=(1<<S)-1,C=k>>1,b=S-7,R=y-1,w=p[R--],F=w&127,z;for(w>>=7;b>0;F=F*256+p[R],R--,b-=8);for(z=F&(1<<-b)-1,F>>=-b,b+=g;b>0;z=z*256+p[R],R--,b-=8);if(F===0)F=1-C;else{if(F===k)return z?NaN:w?-1/0:1/0;z=z+a(2,g),F=F-C}return(w?-1:1)*z*a(2,F-g)};s.exports={pack:f,unpack:h}},8361:function(s,l,a){var c=a(7293),u=a(4326),d="".split;s.exports=c(function(){return!Object("z").propertyIsEnumerable(0)})?function(f){return u(f)=="String"?d.call(f,""):Object(f)}:Object},9587:function(s,l,a){var c=a(111),u=a(7674);s.exports=function(d,f,h){var p,g;return u&&typeof(p=f.constructor)=="function"&&p!==h&&c(g=p.prototype)&&g!==h.prototype&&u(d,g),d}},2788:function(s,l,a){var c=a(5465),u=Function.toString;typeof c.inspectSource!="function"&&(c.inspectSource=function(d){return u.call(d)}),s.exports=c.inspectSource},9909:function(s,l,a){var c=a(8536),u=a(7854),d=a(111),f=a(8880),h=a(6656),p=a(5465),g=a(6200),y=a(3501),S=u.WeakMap,k,C,b,R=function(P){return b(P)?C(P):k(P,{})},w=function(P){return function(H){var Y;if(!d(H)||(Y=C(H)).type!==P)throw TypeError("Incompatible receiver, "+P+" required");return Y}};if(c){var F=p.state||(p.state=new S),z=F.get,$=F.has,V=F.set;k=function(P,H){return H.facade=P,V.call(F,P,H),H},C=function(P){return z.call(F,P)||{}},b=function(P){return $.call(F,P)}}else{var B=g("state");y[B]=!0,k=function(P,H){return H.facade=P,f(P,B,H),H},C=function(P){return h(P,B)?P[B]:{}},b=function(P){return h(P,B)}}s.exports={set:k,get:C,has:b,enforce:R,getterFor:w}},7659:function(s,l,a){var c=a(5112),u=a(7497),d=c("iterator"),f=Array.prototype;s.exports=function(h){return h!==void 0&&(u.Array===h||f[d]===h)}},3157:function(s,l,a){var c=a(4326);s.exports=Array.isArray||function(d){return c(d)=="Array"}},4705:function(s,l,a){var c=a(7293),u=/#|\.prototype\./,d=function(y,S){var k=h[f(y)];return k==g?!0:k==p?!1:typeof S=="function"?c(S):!!S},f=d.normalize=function(y){return String(y).replace(u,".").toLowerCase()},h=d.data={},p=d.NATIVE="N",g=d.POLYFILL="P";s.exports=d},111:function(s){s.exports=function(l){return typeof l=="object"?l!==null:typeof l=="function"}},1913:function(s){s.exports=!1},7850:function(s,l,a){var c=a(111),u=a(4326),d=a(5112),f=d("match");s.exports=function(h){var p;return c(h)&&((p=h[f])!==void 0?!!p:u(h)=="RegExp")}},9212:function(s,l,a){var c=a(9670);s.exports=function(u){var d=u.return;if(d!==void 0)return c(d.call(u)).value}},3383:function(s,l,a){var c=a(7293),u=a(9518),d=a(8880),f=a(6656),h=a(5112),p=a(1913),g=h("iterator"),y=!1,S=function(){return this},k,C,b;[].keys&&(b=[].keys(),"next"in b?(C=u(u(b)),C!==Object.prototype&&(k=C)):y=!0);var R=k==null||c(function(){var w={};return k[g].call(w)!==w});R&&(k={}),(!p||R)&&!f(k,g)&&d(k,g,S),s.exports={IteratorPrototype:k,BUGGY_SAFARI_ITERATORS:y}},7497:function(s){s.exports={}},133:function(s,l,a){var c=a(7293);s.exports=!!Object.getOwnPropertySymbols&&!c(function(){return!String(Symbol())})},590:function(s,l,a){var c=a(7293),u=a(5112),d=a(1913),f=u("iterator");s.exports=!c(function(){var h=new URL("b?a=1&b=2&c=3","http://a"),p=h.searchParams,g="";return h.pathname="c%20d",p.forEach(function(y,S){p.delete("b"),g+=S+y}),d&&!h.toJSON||!p.sort||h.href!=="http://a/c%20d?a=1&c=3"||p.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!p[f]||new URL("https://a@b").username!=="a"||new URLSearchParams(new URLSearchParams("a=b")).get("a")!=="b"||new URL("http://тест").host!=="xn--e1aybc"||new URL("http://a#б").hash!=="#%D0%B1"||g!=="a1c3"||new URL("http://x",void 0).host!=="x"})},8536:function(s,l,a){var c=a(7854),u=a(2788),d=c.WeakMap;s.exports=typeof d=="function"&&/native code/.test(u(d))},1574:function(s,l,a){var c=a(9781),u=a(7293),d=a(1956),f=a(5181),h=a(5296),p=a(7908),g=a(8361),y=Object.assign,S=Object.defineProperty;s.exports=!y||u(function(){if(c&&y({b:1},y(S({},"a",{enumerable:!0,get:function(){S(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var k={},C={},b=Symbol(),R="abcdefghijklmnopqrst";return k[b]=7,R.split("").forEach(function(w){C[w]=w}),y({},k)[b]!=7||d(y({},C)).join("")!=R})?function(C,b){for(var R=p(C),w=arguments.length,F=1,z=f.f,$=h.f;w>F;)for(var V=g(arguments[F++]),B=z?d(V).concat(z(V)):d(V),P=B.length,H=0,Y;P>H;)Y=B[H++],(!c||$.call(V,Y))&&(R[Y]=V[Y]);return R}:y},30:function(s,l,a){var c=a(9670),u=a(6048),d=a(748),f=a(3501),h=a(490),p=a(317),g=a(6200),y=">",S="<",k="prototype",C="script",b=g("IE_PROTO"),R=function(){},w=function(B){return S+C+y+B+S+"/"+C+y},F=function(B){B.write(w("")),B.close();var P=B.parentWindow.Object;return B=null,P},z=function(){var B=p("iframe"),P="java"+C+":",H;return B.style.display="none",h.appendChild(B),B.src=String(P),H=B.contentWindow.document,H.open(),H.write(w("document.F=Object")),H.close(),H.F},$,V=function(){try{$=document.domain&&new ActiveXObject("htmlfile")}catch{}V=$?F($):z();for(var B=d.length;B--;)delete V[k][d[B]];return V()};f[b]=!0,s.exports=Object.create||function(P,H){var Y;return P!==null?(R[k]=c(P),Y=new R,R[k]=null,Y[b]=P):Y=V(),H===void 0?Y:u(Y,H)}},6048:function(s,l,a){var c=a(9781),u=a(3070),d=a(9670),f=a(1956);s.exports=c?Object.defineProperties:function(p,g){d(p);for(var y=f(g),S=y.length,k=0,C;S>k;)u.f(p,C=y[k++],g[C]);return p}},3070:function(s,l,a){var c=a(9781),u=a(4664),d=a(9670),f=a(7593),h=Object.defineProperty;l.f=c?h:function(g,y,S){if(d(g),y=f(y,!0),d(S),u)try{return h(g,y,S)}catch{}if("get"in S||"set"in S)throw TypeError("Accessors not supported");return"value"in S&&(g[y]=S.value),g}},1236:function(s,l,a){var c=a(9781),u=a(5296),d=a(9114),f=a(5656),h=a(7593),p=a(6656),g=a(4664),y=Object.getOwnPropertyDescriptor;l.f=c?y:function(k,C){if(k=f(k),C=h(C,!0),g)try{return y(k,C)}catch{}if(p(k,C))return d(!u.f.call(k,C),k[C])}},8006:function(s,l,a){var c=a(6324),u=a(748),d=u.concat("length","prototype");l.f=Object.getOwnPropertyNames||function(h){return c(h,d)}},5181:function(s,l){l.f=Object.getOwnPropertySymbols},9518:function(s,l,a){var c=a(6656),u=a(7908),d=a(6200),f=a(8544),h=d("IE_PROTO"),p=Object.prototype;s.exports=f?Object.getPrototypeOf:function(g){return g=u(g),c(g,h)?g[h]:typeof g.constructor=="function"&&g instanceof g.constructor?g.constructor.prototype:g instanceof Object?p:null}},6324:function(s,l,a){var c=a(6656),u=a(5656),d=a(1318).indexOf,f=a(3501);s.exports=function(h,p){var g=u(h),y=0,S=[],k;for(k in g)!c(f,k)&&c(g,k)&&S.push(k);for(;p.length>y;)c(g,k=p[y++])&&(~d(S,k)||S.push(k));return S}},1956:function(s,l,a){var c=a(6324),u=a(748);s.exports=Object.keys||function(f){return c(f,u)}},5296:function(s,l){var a={}.propertyIsEnumerable,c=Object.getOwnPropertyDescriptor,u=c&&!a.call({1:2},1);l.f=u?function(f){var h=c(this,f);return!!h&&h.enumerable}:a},7674:function(s,l,a){var c=a(9670),u=a(6077);s.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var d=!1,f={},h;try{h=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,h.call(f,[]),d=f instanceof Array}catch{}return function(g,y){return c(g),u(y),d?h.call(g,y):g.__proto__=y,g}}():void 0)},288:function(s,l,a){var c=a(1694),u=a(648);s.exports=c?{}.toString:function(){return"[object "+u(this)+"]"}},3887:function(s,l,a){var c=a(5005),u=a(8006),d=a(5181),f=a(9670);s.exports=c("Reflect","ownKeys")||function(p){var g=u.f(f(p)),y=d.f;return y?g.concat(y(p)):g}},857:function(s,l,a){var c=a(7854);s.exports=c},2248:function(s,l,a){var c=a(1320);s.exports=function(u,d,f){for(var h in d)c(u,h,d[h],f);return u}},1320:function(s,l,a){var c=a(7854),u=a(8880),d=a(6656),f=a(3505),h=a(2788),p=a(9909),g=p.get,y=p.enforce,S=String(String).split("String");(s.exports=function(k,C,b,R){var w=R?!!R.unsafe:!1,F=R?!!R.enumerable:!1,z=R?!!R.noTargetGet:!1,$;if(typeof b=="function"&&(typeof C=="string"&&!d(b,"name")&&u(b,"name",C),$=y(b),$.source||($.source=S.join(typeof C=="string"?C:""))),k===c){F?k[C]=b:f(C,b);return}else w?!z&&k[C]&&(F=!0):delete k[C];F?k[C]=b:u(k,C,b)})(Function.prototype,"toString",function(){return typeof this=="function"&&g(this).source||h(this)})},7651:function(s,l,a){var c=a(4326),u=a(2261);s.exports=function(d,f){var h=d.exec;if(typeof h=="function"){var p=h.call(d,f);if(typeof p!="object")throw TypeError("RegExp exec method returned something other than an Object or null");return p}if(c(d)!=="RegExp")throw TypeError("RegExp#exec called on incompatible receiver");return u.call(d,f)}},2261:function(s,l,a){var c=a(7066),u=a(2999),d=RegExp.prototype.exec,f=String.prototype.replace,h=d,p=function(){var k=/a/,C=/b*/g;return d.call(k,"a"),d.call(C,"a"),k.lastIndex!==0||C.lastIndex!==0}(),g=u.UNSUPPORTED_Y||u.BROKEN_CARET,y=/()??/.exec("")[1]!==void 0,S=p||y||g;S&&(h=function(C){var b=this,R,w,F,z,$=g&&b.sticky,V=c.call(b),B=b.source,P=0,H=C;return $&&(V=V.replace("y",""),V.indexOf("g")===-1&&(V+="g"),H=String(C).slice(b.lastIndex),b.lastIndex>0&&(!b.multiline||b.multiline&&C[b.lastIndex-1]!==`
|
|
5
|
+
`)&&(B="(?: "+B+")",H=" "+H,P++),w=new RegExp("^(?:"+B+")",V)),y&&(w=new RegExp("^"+B+"$(?!\\s)",V)),p&&(R=b.lastIndex),F=d.call($?w:b,H),$?F?(F.input=F.input.slice(P),F[0]=F[0].slice(P),F.index=b.lastIndex,b.lastIndex+=F[0].length):b.lastIndex=0:p&&F&&(b.lastIndex=b.global?F.index+F[0].length:R),y&&F&&F.length>1&&f.call(F[0],w,function(){for(z=1;z<arguments.length-2;z++)arguments[z]===void 0&&(F[z]=void 0)}),F}),s.exports=h},7066:function(s,l,a){var c=a(9670);s.exports=function(){var u=c(this),d="";return u.global&&(d+="g"),u.ignoreCase&&(d+="i"),u.multiline&&(d+="m"),u.dotAll&&(d+="s"),u.unicode&&(d+="u"),u.sticky&&(d+="y"),d}},2999:function(s,l,a){var c=a(7293);function u(d,f){return RegExp(d,f)}l.UNSUPPORTED_Y=c(function(){var d=u("a","y");return d.lastIndex=2,d.exec("abcd")!=null}),l.BROKEN_CARET=c(function(){var d=u("^r","gy");return d.lastIndex=2,d.exec("str")!=null})},4488:function(s){s.exports=function(l){if(l==null)throw TypeError("Can't call method on "+l);return l}},3505:function(s,l,a){var c=a(7854),u=a(8880);s.exports=function(d,f){try{u(c,d,f)}catch{c[d]=f}return f}},6340:function(s,l,a){var c=a(5005),u=a(3070),d=a(5112),f=a(9781),h=d("species");s.exports=function(p){var g=c(p),y=u.f;f&&g&&!g[h]&&y(g,h,{configurable:!0,get:function(){return this}})}},8003:function(s,l,a){var c=a(3070).f,u=a(6656),d=a(5112),f=d("toStringTag");s.exports=function(h,p,g){h&&!u(h=g?h:h.prototype,f)&&c(h,f,{configurable:!0,value:p})}},6200:function(s,l,a){var c=a(2309),u=a(9711),d=c("keys");s.exports=function(f){return d[f]||(d[f]=u(f))}},5465:function(s,l,a){var c=a(7854),u=a(3505),d="__core-js_shared__",f=c[d]||u(d,{});s.exports=f},2309:function(s,l,a){var c=a(1913),u=a(5465);(s.exports=function(d,f){return u[d]||(u[d]=f!==void 0?f:{})})("versions",[]).push({version:"3.9.0",mode:c?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},6707:function(s,l,a){var c=a(9670),u=a(3099),d=a(5112),f=d("species");s.exports=function(h,p){var g=c(h).constructor,y;return g===void 0||(y=c(g)[f])==null?p:u(y)}},8710:function(s,l,a){var c=a(9958),u=a(4488),d=function(f){return function(h,p){var g=String(u(h)),y=c(p),S=g.length,k,C;return y<0||y>=S?f?"":void 0:(k=g.charCodeAt(y),k<55296||k>56319||y+1===S||(C=g.charCodeAt(y+1))<56320||C>57343?f?g.charAt(y):k:f?g.slice(y,y+2):(k-55296<<10)+(C-56320)+65536)}};s.exports={codeAt:d(!1),charAt:d(!0)}},3197:function(s){var l=2147483647,a=36,c=1,u=26,d=38,f=700,h=72,p=128,g="-",y=/[^\0-\u007E]/,S=/[.\u3002\uFF0E\uFF61]/g,k="Overflow: input needs wider integers to process",C=a-c,b=Math.floor,R=String.fromCharCode,w=function(V){for(var B=[],P=0,H=V.length;P<H;){var Y=V.charCodeAt(P++);if(Y>=55296&&Y<=56319&&P<H){var Z=V.charCodeAt(P++);(Z&64512)==56320?B.push(((Y&1023)<<10)+(Z&1023)+65536):(B.push(Y),P--)}else B.push(Y)}return B},F=function(V){return V+22+75*(V<26)},z=function(V,B,P){var H=0;for(V=P?b(V/f):V>>1,V+=b(V/B);V>C*u>>1;H+=a)V=b(V/C);return b(H+(C+1)*V/(V+d))},$=function(V){var B=[];V=w(V);var P=V.length,H=p,Y=0,Z=h,Q,re;for(Q=0;Q<V.length;Q++)re=V[Q],re<128&&B.push(R(re));var W=B.length,le=W;for(W&&B.push(g);le<P;){var de=l;for(Q=0;Q<V.length;Q++)re=V[Q],re>=H&&re<de&&(de=re);var ye=le+1;if(de-H>b((l-Y)/ye))throw RangeError(k);for(Y+=(de-H)*ye,H=de,Q=0;Q<V.length;Q++){if(re=V[Q],re<H&&++Y>l)throw RangeError(k);if(re==H){for(var Ee=Y,be=a;;be+=a){var Te=be<=Z?c:be>=Z+u?u:be-Z;if(Ee<Te)break;var Ce=Ee-Te,Ae=a-Te;B.push(R(F(Te+Ce%Ae))),Ee=b(Ce/Ae)}B.push(R(F(Ee))),Z=z(Y,ye,le==W),Y=0,++le}}++Y,++H}return B.join("")};s.exports=function(V){var B=[],P=V.toLowerCase().replace(S,".").split("."),H,Y;for(H=0;H<P.length;H++)Y=P[H],B.push(y.test(Y)?"xn--"+$(Y):Y);return B.join(".")}},6091:function(s,l,a){var c=a(7293),u=a(1361),d="
";s.exports=function(f){return c(function(){return!!u[f]()||d[f]()!=d||u[f].name!==f})}},3111:function(s,l,a){var c=a(4488),u=a(1361),d="["+u+"]",f=RegExp("^"+d+d+"*"),h=RegExp(d+d+"*$"),p=function(g){return function(y){var S=String(c(y));return g&1&&(S=S.replace(f,"")),g&2&&(S=S.replace(h,"")),S}};s.exports={start:p(1),end:p(2),trim:p(3)}},1400:function(s,l,a){var c=a(9958),u=Math.max,d=Math.min;s.exports=function(f,h){var p=c(f);return p<0?u(p+h,0):d(p,h)}},7067:function(s,l,a){var c=a(9958),u=a(7466);s.exports=function(d){if(d===void 0)return 0;var f=c(d),h=u(f);if(f!==h)throw RangeError("Wrong length or index");return h}},5656:function(s,l,a){var c=a(8361),u=a(4488);s.exports=function(d){return c(u(d))}},9958:function(s){var l=Math.ceil,a=Math.floor;s.exports=function(c){return isNaN(c=+c)?0:(c>0?a:l)(c)}},7466:function(s,l,a){var c=a(9958),u=Math.min;s.exports=function(d){return d>0?u(c(d),9007199254740991):0}},7908:function(s,l,a){var c=a(4488);s.exports=function(u){return Object(c(u))}},4590:function(s,l,a){var c=a(3002);s.exports=function(u,d){var f=c(u);if(f%d)throw RangeError("Wrong offset");return f}},3002:function(s,l,a){var c=a(9958);s.exports=function(u){var d=c(u);if(d<0)throw RangeError("The argument can't be less than 0");return d}},7593:function(s,l,a){var c=a(111);s.exports=function(u,d){if(!c(u))return u;var f,h;if(d&&typeof(f=u.toString)=="function"&&!c(h=f.call(u))||typeof(f=u.valueOf)=="function"&&!c(h=f.call(u))||!d&&typeof(f=u.toString)=="function"&&!c(h=f.call(u)))return h;throw TypeError("Can't convert object to primitive value")}},1694:function(s,l,a){var c=a(5112),u=c("toStringTag"),d={};d[u]="z",s.exports=String(d)==="[object z]"},9843:function(s,l,a){var c=a(2109),u=a(7854),d=a(9781),f=a(3832),h=a(260),p=a(3331),g=a(5787),y=a(9114),S=a(8880),k=a(7466),C=a(7067),b=a(4590),R=a(7593),w=a(6656),F=a(648),z=a(111),$=a(30),V=a(7674),B=a(8006).f,P=a(7321),H=a(2092).forEach,Y=a(6340),Z=a(3070),Q=a(1236),re=a(9909),W=a(9587),le=re.get,de=re.set,ye=Z.f,Ee=Q.f,be=Math.round,Te=u.RangeError,Ce=p.ArrayBuffer,Ae=p.DataView,ge=h.NATIVE_ARRAY_BUFFER_VIEWS,A=h.TYPED_ARRAY_TAG,M=h.TypedArray,E=h.TypedArrayPrototype,O=h.aTypedArrayConstructor,v=h.isTypedArray,x="BYTES_PER_ELEMENT",I="Wrong length",N=function(G,J){for(var q=0,ce=J.length,me=new(O(G))(ce);ce>q;)me[q]=J[q++];return me},D=function(G,J){ye(G,J,{get:function(){return le(this)[J]}})},L=function(G){var J;return G instanceof Ce||(J=F(G))=="ArrayBuffer"||J=="SharedArrayBuffer"},U=function(G,J){return v(G)&&typeof J!="symbol"&&J in G&&String(+J)==String(J)},K=function(J,q){return U(J,q=R(q,!0))?y(2,J[q]):Ee(J,q)},j=function(J,q,ce){return U(J,q=R(q,!0))&&z(ce)&&w(ce,"value")&&!w(ce,"get")&&!w(ce,"set")&&!ce.configurable&&(!w(ce,"writable")||ce.writable)&&(!w(ce,"enumerable")||ce.enumerable)?(J[q]=ce.value,J):ye(J,q,ce)};d?(ge||(Q.f=K,Z.f=j,D(E,"buffer"),D(E,"byteOffset"),D(E,"byteLength"),D(E,"length")),c({target:"Object",stat:!0,forced:!ge},{getOwnPropertyDescriptor:K,defineProperty:j}),s.exports=function(G,J,q){var ce=G.match(/\d+$/)[0]/8,me=G+(q?"Clamped":"")+"Array",Me="get"+G,Fe="set"+G,Be=u[me],Ne=Be,Ke=Ne&&Ne.prototype,yt={},rt=function(se,ae){var xe=le(se);return xe.view[Me](ae*ce+xe.byteOffset,!0)},Mn=function(se,ae,xe){var ke=le(se);q&&(xe=(xe=be(xe))<0?0:xe>255?255:xe&255),ke.view[Fe](ae*ce+ke.byteOffset,xe,!0)},X=function(se,ae){ye(se,ae,{get:function(){return rt(this,ae)},set:function(xe){return Mn(this,ae,xe)},enumerable:!0})};ge?f&&(Ne=J(function(se,ae,xe,ke){return g(se,Ne,me),W(function(){return z(ae)?L(ae)?ke!==void 0?new Be(ae,b(xe,ce),ke):xe!==void 0?new Be(ae,b(xe,ce)):new Be(ae):v(ae)?N(Ne,ae):P.call(Ne,ae):new Be(C(ae))}(),se,Ne)}),V&&V(Ne,M),H(B(Be),function(se){se in Ne||S(Ne,se,Be[se])}),Ne.prototype=Ke):(Ne=J(function(se,ae,xe,ke){g(se,Ne,me);var ze=0,Ue=0,ut,dt,qe;if(!z(ae))qe=C(ae),dt=qe*ce,ut=new Ce(dt);else if(L(ae)){ut=ae,Ue=b(xe,ce);var en=ae.byteLength;if(ke===void 0){if(en%ce||(dt=en-Ue,dt<0))throw Te(I)}else if(dt=k(ke)*ce,dt+Ue>en)throw Te(I);qe=dt/ce}else return v(ae)?N(Ne,ae):P.call(Ne,ae);for(de(se,{buffer:ut,byteOffset:Ue,byteLength:dt,length:qe,view:new Ae(ut)});ze<qe;)X(se,ze++)}),V&&V(Ne,M),Ke=Ne.prototype=$(E)),Ke.constructor!==Ne&&S(Ke,"constructor",Ne),A&&S(Ke,A,me),yt[me]=Ne,c({global:!0,forced:Ne!=Be,sham:!ge},yt),x in Ne||S(Ne,x,ce),x in Ke||S(Ke,x,ce),Y(me)}):s.exports=function(){}},3832:function(s,l,a){var c=a(7854),u=a(7293),d=a(7072),f=a(260).NATIVE_ARRAY_BUFFER_VIEWS,h=c.ArrayBuffer,p=c.Int8Array;s.exports=!f||!u(function(){p(1)})||!u(function(){new p(-1)})||!d(function(g){new p,new p(null),new p(1.5),new p(g)},!0)||u(function(){return new p(new h(2),1,void 0).length!==1})},3074:function(s,l,a){var c=a(260).aTypedArrayConstructor,u=a(6707);s.exports=function(d,f){for(var h=u(d,d.constructor),p=0,g=f.length,y=new(c(h))(g);g>p;)y[p]=f[p++];return y}},7321:function(s,l,a){var c=a(7908),u=a(7466),d=a(1246),f=a(7659),h=a(9974),p=a(260).aTypedArrayConstructor;s.exports=function(y){var S=c(y),k=arguments.length,C=k>1?arguments[1]:void 0,b=C!==void 0,R=d(S),w,F,z,$,V,B;if(R!=null&&!f(R))for(V=R.call(S),B=V.next,S=[];!($=B.call(V)).done;)S.push($.value);for(b&&k>2&&(C=h(C,arguments[2],2)),F=u(S.length),z=new(p(this))(F),w=0;F>w;w++)z[w]=b?C(S[w],w):S[w];return z}},9711:function(s){var l=0,a=Math.random();s.exports=function(c){return"Symbol("+String(c===void 0?"":c)+")_"+(++l+a).toString(36)}},3307:function(s,l,a){var c=a(133);s.exports=c&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},5112:function(s,l,a){var c=a(7854),u=a(2309),d=a(6656),f=a(9711),h=a(133),p=a(3307),g=u("wks"),y=c.Symbol,S=p?y:y&&y.withoutSetter||f;s.exports=function(k){return d(g,k)||(h&&d(y,k)?g[k]=y[k]:g[k]=S("Symbol."+k)),g[k]}},1361:function(s){s.exports=`
|
|
6
|
+
\v\f\r \u2028\u2029\uFEFF`},8264:function(s,l,a){var c=a(2109),u=a(7854),d=a(3331),f=a(6340),h="ArrayBuffer",p=d[h],g=u[h];c({global:!0,forced:g!==p},{ArrayBuffer:p}),f(h)},2222:function(s,l,a){var c=a(2109),u=a(7293),d=a(3157),f=a(111),h=a(7908),p=a(7466),g=a(6135),y=a(5417),S=a(1194),k=a(5112),C=a(7392),b=k("isConcatSpreadable"),R=9007199254740991,w="Maximum allowed index exceeded",F=C>=51||!u(function(){var B=[];return B[b]=!1,B.concat()[0]!==B}),z=S("concat"),$=function(B){if(!f(B))return!1;var P=B[b];return P!==void 0?!!P:d(B)},V=!F||!z;c({target:"Array",proto:!0,forced:V},{concat:function(P){var H=h(this),Y=y(H,0),Z=0,Q,re,W,le,de;for(Q=-1,W=arguments.length;Q<W;Q++)if(de=Q===-1?H:arguments[Q],$(de)){if(le=p(de.length),Z+le>R)throw TypeError(w);for(re=0;re<le;re++,Z++)re in de&&g(Y,Z,de[re])}else{if(Z>=R)throw TypeError(w);g(Y,Z++,de)}return Y.length=Z,Y}})},7327:function(s,l,a){var c=a(2109),u=a(2092).filter,d=a(1194),f=d("filter");c({target:"Array",proto:!0,forced:!f},{filter:function(p){return u(this,p,arguments.length>1?arguments[1]:void 0)}})},2772:function(s,l,a){var c=a(2109),u=a(1318).indexOf,d=a(9341),f=[].indexOf,h=!!f&&1/[1].indexOf(1,-0)<0,p=d("indexOf");c({target:"Array",proto:!0,forced:h||!p},{indexOf:function(y){return h?f.apply(this,arguments)||0:u(this,y,arguments.length>1?arguments[1]:void 0)}})},6992:function(s,l,a){var c=a(5656),u=a(1223),d=a(7497),f=a(9909),h=a(654),p="Array Iterator",g=f.set,y=f.getterFor(p);s.exports=h(Array,"Array",function(S,k){g(this,{type:p,target:c(S),index:0,kind:k})},function(){var S=y(this),k=S.target,C=S.kind,b=S.index++;return!k||b>=k.length?(S.target=void 0,{value:void 0,done:!0}):C=="keys"?{value:b,done:!1}:C=="values"?{value:k[b],done:!1}:{value:[b,k[b]],done:!1}},"values"),d.Arguments=d.Array,u("keys"),u("values"),u("entries")},1249:function(s,l,a){var c=a(2109),u=a(2092).map,d=a(1194),f=d("map");c({target:"Array",proto:!0,forced:!f},{map:function(p){return u(this,p,arguments.length>1?arguments[1]:void 0)}})},7042:function(s,l,a){var c=a(2109),u=a(111),d=a(3157),f=a(1400),h=a(7466),p=a(5656),g=a(6135),y=a(5112),S=a(1194),k=S("slice"),C=y("species"),b=[].slice,R=Math.max;c({target:"Array",proto:!0,forced:!k},{slice:function(F,z){var $=p(this),V=h($.length),B=f(F,V),P=f(z===void 0?V:z,V),H,Y,Z;if(d($)&&(H=$.constructor,typeof H=="function"&&(H===Array||d(H.prototype))?H=void 0:u(H)&&(H=H[C],H===null&&(H=void 0)),H===Array||H===void 0))return b.call($,B,P);for(Y=new(H===void 0?Array:H)(R(P-B,0)),Z=0;B<P;B++,Z++)B in $&&g(Y,Z,$[B]);return Y.length=Z,Y}})},561:function(s,l,a){var c=a(2109),u=a(1400),d=a(9958),f=a(7466),h=a(7908),p=a(5417),g=a(6135),y=a(1194),S=y("splice"),k=Math.max,C=Math.min,b=9007199254740991,R="Maximum allowed length exceeded";c({target:"Array",proto:!0,forced:!S},{splice:function(F,z){var $=h(this),V=f($.length),B=u(F,V),P=arguments.length,H,Y,Z,Q,re,W;if(P===0?H=Y=0:P===1?(H=0,Y=V-B):(H=P-2,Y=C(k(d(z),0),V-B)),V+H-Y>b)throw TypeError(R);for(Z=p($,Y),Q=0;Q<Y;Q++)re=B+Q,re in $&&g(Z,Q,$[re]);if(Z.length=Y,H<Y){for(Q=B;Q<V-Y;Q++)re=Q+Y,W=Q+H,re in $?$[W]=$[re]:delete $[W];for(Q=V;Q>V-Y+H;Q--)delete $[Q-1]}else if(H>Y)for(Q=V-Y;Q>B;Q--)re=Q+Y-1,W=Q+H-1,re in $?$[W]=$[re]:delete $[W];for(Q=0;Q<H;Q++)$[Q+B]=arguments[Q+2];return $.length=V-Y+H,Z}})},8309:function(s,l,a){var c=a(9781),u=a(3070).f,d=Function.prototype,f=d.toString,h=/^\s*function ([^ (]*)/,p="name";c&&!(p in d)&&u(d,p,{configurable:!0,get:function(){try{return f.call(this).match(h)[1]}catch{return""}}})},489:function(s,l,a){var c=a(2109),u=a(7293),d=a(7908),f=a(9518),h=a(8544),p=u(function(){f(1)});c({target:"Object",stat:!0,forced:p,sham:!h},{getPrototypeOf:function(y){return f(d(y))}})},1539:function(s,l,a){var c=a(1694),u=a(1320),d=a(288);c||u(Object.prototype,"toString",d,{unsafe:!0})},4916:function(s,l,a){var c=a(2109),u=a(2261);c({target:"RegExp",proto:!0,forced:/./.exec!==u},{exec:u})},9714:function(s,l,a){var c=a(1320),u=a(9670),d=a(7293),f=a(7066),h="toString",p=RegExp.prototype,g=p[h],y=d(function(){return g.call({source:"a",flags:"b"})!="/a/b"}),S=g.name!=h;(y||S)&&c(RegExp.prototype,h,function(){var C=u(this),b=String(C.source),R=C.flags,w=String(R===void 0&&C instanceof RegExp&&!("flags"in p)?f.call(C):R);return"/"+b+"/"+w},{unsafe:!0})},8783:function(s,l,a){var c=a(8710).charAt,u=a(9909),d=a(654),f="String Iterator",h=u.set,p=u.getterFor(f);d(String,"String",function(g){h(this,{type:f,string:String(g),index:0})},function(){var y=p(this),S=y.string,k=y.index,C;return k>=S.length?{value:void 0,done:!0}:(C=c(S,k),y.index+=C.length,{value:C,done:!1})})},4723:function(s,l,a){var c=a(7007),u=a(9670),d=a(7466),f=a(4488),h=a(1530),p=a(7651);c("match",1,function(g,y,S){return[function(C){var b=f(this),R=C==null?void 0:C[g];return R!==void 0?R.call(C,b):new RegExp(C)[g](String(b))},function(k){var C=S(y,k,this);if(C.done)return C.value;var b=u(k),R=String(this);if(!b.global)return p(b,R);var w=b.unicode;b.lastIndex=0;for(var F=[],z=0,$;($=p(b,R))!==null;){var V=String($[0]);F[z]=V,V===""&&(b.lastIndex=h(R,d(b.lastIndex),w)),z++}return z===0?null:F}]})},5306:function(s,l,a){var c=a(7007),u=a(9670),d=a(7466),f=a(9958),h=a(4488),p=a(1530),g=a(647),y=a(7651),S=Math.max,k=Math.min,C=function(b){return b===void 0?b:String(b)};c("replace",2,function(b,R,w,F){var z=F.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,$=F.REPLACE_KEEPS_$0,V=z?"$":"$0";return[function(P,H){var Y=h(this),Z=P==null?void 0:P[b];return Z!==void 0?Z.call(P,Y,H):R.call(String(Y),P,H)},function(B,P){if(!z&&$||typeof P=="string"&&P.indexOf(V)===-1){var H=w(R,B,this,P);if(H.done)return H.value}var Y=u(B),Z=String(this),Q=typeof P=="function";Q||(P=String(P));var re=Y.global;if(re){var W=Y.unicode;Y.lastIndex=0}for(var le=[];;){var de=y(Y,Z);if(de===null||(le.push(de),!re))break;var ye=String(de[0]);ye===""&&(Y.lastIndex=p(Z,d(Y.lastIndex),W))}for(var Ee="",be=0,Te=0;Te<le.length;Te++){de=le[Te];for(var Ce=String(de[0]),Ae=S(k(f(de.index),Z.length),0),ge=[],A=1;A<de.length;A++)ge.push(C(de[A]));var M=de.groups;if(Q){var E=[Ce].concat(ge,Ae,Z);M!==void 0&&E.push(M);var O=String(P.apply(void 0,E))}else O=g(Ce,Z,Ae,ge,M,P);Ae>=be&&(Ee+=Z.slice(be,Ae)+O,be=Ae+Ce.length)}return Ee+Z.slice(be)}]})},3123:function(s,l,a){var c=a(7007),u=a(7850),d=a(9670),f=a(4488),h=a(6707),p=a(1530),g=a(7466),y=a(7651),S=a(2261),k=a(7293),C=[].push,b=Math.min,R=4294967295,w=!k(function(){return!RegExp(R,"y")});c("split",2,function(F,z,$){var V;return"abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?V=function(B,P){var H=String(f(this)),Y=P===void 0?R:P>>>0;if(Y===0)return[];if(B===void 0)return[H];if(!u(B))return z.call(H,B,Y);for(var Z=[],Q=(B.ignoreCase?"i":"")+(B.multiline?"m":"")+(B.unicode?"u":"")+(B.sticky?"y":""),re=0,W=new RegExp(B.source,Q+"g"),le,de,ye;(le=S.call(W,H))&&(de=W.lastIndex,!(de>re&&(Z.push(H.slice(re,le.index)),le.length>1&&le.index<H.length&&C.apply(Z,le.slice(1)),ye=le[0].length,re=de,Z.length>=Y)));)W.lastIndex===le.index&&W.lastIndex++;return re===H.length?(ye||!W.test(""))&&Z.push(""):Z.push(H.slice(re)),Z.length>Y?Z.slice(0,Y):Z}:"0".split(void 0,0).length?V=function(B,P){return B===void 0&&P===0?[]:z.call(this,B,P)}:V=z,[function(P,H){var Y=f(this),Z=P==null?void 0:P[F];return Z!==void 0?Z.call(P,Y,H):V.call(String(Y),P,H)},function(B,P){var H=$(V,B,this,P,V!==z);if(H.done)return H.value;var Y=d(B),Z=String(this),Q=h(Y,RegExp),re=Y.unicode,W=(Y.ignoreCase?"i":"")+(Y.multiline?"m":"")+(Y.unicode?"u":"")+(w?"y":"g"),le=new Q(w?Y:"^(?:"+Y.source+")",W),de=P===void 0?R:P>>>0;if(de===0)return[];if(Z.length===0)return y(le,Z)===null?[Z]:[];for(var ye=0,Ee=0,be=[];Ee<Z.length;){le.lastIndex=w?Ee:0;var Te=y(le,w?Z:Z.slice(Ee)),Ce;if(Te===null||(Ce=b(g(le.lastIndex+(w?0:Ee)),Z.length))===ye)Ee=p(Z,Ee,re);else{if(be.push(Z.slice(ye,Ee)),be.length===de)return be;for(var Ae=1;Ae<=Te.length-1;Ae++)if(be.push(Te[Ae]),be.length===de)return be;Ee=ye=Ce}}return be.push(Z.slice(ye)),be}]},!w)},3210:function(s,l,a){var c=a(2109),u=a(3111).trim,d=a(6091);c({target:"String",proto:!0,forced:d("trim")},{trim:function(){return u(this)}})},2990:function(s,l,a){var c=a(260),u=a(1048),d=c.aTypedArray,f=c.exportTypedArrayMethod;f("copyWithin",function(p,g){return u.call(d(this),p,g,arguments.length>2?arguments[2]:void 0)})},8927:function(s,l,a){var c=a(260),u=a(2092).every,d=c.aTypedArray,f=c.exportTypedArrayMethod;f("every",function(p){return u(d(this),p,arguments.length>1?arguments[1]:void 0)})},3105:function(s,l,a){var c=a(260),u=a(1285),d=c.aTypedArray,f=c.exportTypedArrayMethod;f("fill",function(p){return u.apply(d(this),arguments)})},5035:function(s,l,a){var c=a(260),u=a(2092).filter,d=a(3074),f=c.aTypedArray,h=c.exportTypedArrayMethod;h("filter",function(g){var y=u(f(this),g,arguments.length>1?arguments[1]:void 0);return d(this,y)})},7174:function(s,l,a){var c=a(260),u=a(2092).findIndex,d=c.aTypedArray,f=c.exportTypedArrayMethod;f("findIndex",function(p){return u(d(this),p,arguments.length>1?arguments[1]:void 0)})},4345:function(s,l,a){var c=a(260),u=a(2092).find,d=c.aTypedArray,f=c.exportTypedArrayMethod;f("find",function(p){return u(d(this),p,arguments.length>1?arguments[1]:void 0)})},2846:function(s,l,a){var c=a(260),u=a(2092).forEach,d=c.aTypedArray,f=c.exportTypedArrayMethod;f("forEach",function(p){u(d(this),p,arguments.length>1?arguments[1]:void 0)})},4731:function(s,l,a){var c=a(260),u=a(1318).includes,d=c.aTypedArray,f=c.exportTypedArrayMethod;f("includes",function(p){return u(d(this),p,arguments.length>1?arguments[1]:void 0)})},7209:function(s,l,a){var c=a(260),u=a(1318).indexOf,d=c.aTypedArray,f=c.exportTypedArrayMethod;f("indexOf",function(p){return u(d(this),p,arguments.length>1?arguments[1]:void 0)})},6319:function(s,l,a){var c=a(7854),u=a(260),d=a(6992),f=a(5112),h=f("iterator"),p=c.Uint8Array,g=d.values,y=d.keys,S=d.entries,k=u.aTypedArray,C=u.exportTypedArrayMethod,b=p&&p.prototype[h],R=!!b&&(b.name=="values"||b.name==null),w=function(){return g.call(k(this))};C("entries",function(){return S.call(k(this))}),C("keys",function(){return y.call(k(this))}),C("values",w,!R),C(h,w,!R)},8867:function(s,l,a){var c=a(260),u=c.aTypedArray,d=c.exportTypedArrayMethod,f=[].join;d("join",function(p){return f.apply(u(this),arguments)})},7789:function(s,l,a){var c=a(260),u=a(6583),d=c.aTypedArray,f=c.exportTypedArrayMethod;f("lastIndexOf",function(p){return u.apply(d(this),arguments)})},3739:function(s,l,a){var c=a(260),u=a(2092).map,d=a(6707),f=c.aTypedArray,h=c.aTypedArrayConstructor,p=c.exportTypedArrayMethod;p("map",function(y){return u(f(this),y,arguments.length>1?arguments[1]:void 0,function(S,k){return new(h(d(S,S.constructor)))(k)})})},4483:function(s,l,a){var c=a(260),u=a(3671).right,d=c.aTypedArray,f=c.exportTypedArrayMethod;f("reduceRight",function(p){return u(d(this),p,arguments.length,arguments.length>1?arguments[1]:void 0)})},9368:function(s,l,a){var c=a(260),u=a(3671).left,d=c.aTypedArray,f=c.exportTypedArrayMethod;f("reduce",function(p){return u(d(this),p,arguments.length,arguments.length>1?arguments[1]:void 0)})},2056:function(s,l,a){var c=a(260),u=c.aTypedArray,d=c.exportTypedArrayMethod,f=Math.floor;d("reverse",function(){for(var p=this,g=u(p).length,y=f(g/2),S=0,k;S<y;)k=p[S],p[S++]=p[--g],p[g]=k;return p})},3462:function(s,l,a){var c=a(260),u=a(7466),d=a(4590),f=a(7908),h=a(7293),p=c.aTypedArray,g=c.exportTypedArrayMethod,y=h(function(){new Int8Array(1).set({})});g("set",function(k){p(this);var C=d(arguments.length>1?arguments[1]:void 0,1),b=this.length,R=f(k),w=u(R.length),F=0;if(w+C>b)throw RangeError("Wrong length");for(;F<w;)this[C+F]=R[F++]},y)},678:function(s,l,a){var c=a(260),u=a(6707),d=a(7293),f=c.aTypedArray,h=c.aTypedArrayConstructor,p=c.exportTypedArrayMethod,g=[].slice,y=d(function(){new Int8Array(1).slice()});p("slice",function(k,C){for(var b=g.call(f(this),k,C),R=u(this,this.constructor),w=0,F=b.length,z=new(h(R))(F);F>w;)z[w]=b[w++];return z},y)},7462:function(s,l,a){var c=a(260),u=a(2092).some,d=c.aTypedArray,f=c.exportTypedArrayMethod;f("some",function(p){return u(d(this),p,arguments.length>1?arguments[1]:void 0)})},3824:function(s,l,a){var c=a(260),u=c.aTypedArray,d=c.exportTypedArrayMethod,f=[].sort;d("sort",function(p){return f.call(u(this),p)})},5021:function(s,l,a){var c=a(260),u=a(7466),d=a(1400),f=a(6707),h=c.aTypedArray,p=c.exportTypedArrayMethod;p("subarray",function(y,S){var k=h(this),C=k.length,b=d(y,C);return new(f(k,k.constructor))(k.buffer,k.byteOffset+b*k.BYTES_PER_ELEMENT,u((S===void 0?C:d(S,C))-b))})},2974:function(s,l,a){var c=a(7854),u=a(260),d=a(7293),f=c.Int8Array,h=u.aTypedArray,p=u.exportTypedArrayMethod,g=[].toLocaleString,y=[].slice,S=!!f&&d(function(){g.call(new f(1))}),k=d(function(){return[1,2].toLocaleString()!=new f([1,2]).toLocaleString()})||!d(function(){f.prototype.toLocaleString.call([1,2])});p("toLocaleString",function(){return g.apply(S?y.call(h(this)):h(this),arguments)},k)},5016:function(s,l,a){var c=a(260).exportTypedArrayMethod,u=a(7293),d=a(7854),f=d.Uint8Array,h=f&&f.prototype||{},p=[].toString,g=[].join;u(function(){p.call({})})&&(p=function(){return g.call(this)});var y=h.toString!=p;c("toString",p,y)},2472:function(s,l,a){var c=a(9843);c("Uint8",function(u){return function(f,h,p){return u(this,f,h,p)}})},4747:function(s,l,a){var c=a(7854),u=a(8324),d=a(8533),f=a(8880);for(var h in u){var p=c[h],g=p&&p.prototype;if(g&&g.forEach!==d)try{f(g,"forEach",d)}catch{g.forEach=d}}},3948:function(s,l,a){var c=a(7854),u=a(8324),d=a(6992),f=a(8880),h=a(5112),p=h("iterator"),g=h("toStringTag"),y=d.values;for(var S in u){var k=c[S],C=k&&k.prototype;if(C){if(C[p]!==y)try{f(C,p,y)}catch{C[p]=y}if(C[g]||f(C,g,S),u[S]){for(var b in d)if(C[b]!==d[b])try{f(C,b,d[b])}catch{C[b]=d[b]}}}}},1637:function(s,l,a){a(6992);var c=a(2109),u=a(5005),d=a(590),f=a(1320),h=a(2248),p=a(8003),g=a(4994),y=a(9909),S=a(5787),k=a(6656),C=a(9974),b=a(648),R=a(9670),w=a(111),F=a(30),z=a(9114),$=a(8554),V=a(1246),B=a(5112),P=u("fetch"),H=u("Headers"),Y=B("iterator"),Z="URLSearchParams",Q=Z+"Iterator",re=y.set,W=y.getterFor(Z),le=y.getterFor(Q),de=/\+/g,ye=Array(4),Ee=function(N){return ye[N-1]||(ye[N-1]=RegExp("((?:%[\\da-f]{2}){"+N+"})","gi"))},be=function(N){try{return decodeURIComponent(N)}catch{return N}},Te=function(N){var D=N.replace(de," "),L=4;try{return decodeURIComponent(D)}catch{for(;L;)D=D.replace(Ee(L--),be);return D}},Ce=/[!'()~]|%20/g,Ae={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},ge=function(N){return Ae[N]},A=function(N){return encodeURIComponent(N).replace(Ce,ge)},M=function(N,D){if(D)for(var L=D.split("&"),U=0,K,j;U<L.length;)K=L[U++],K.length&&(j=K.split("="),N.push({key:Te(j.shift()),value:Te(j.join("="))}))},E=function(N){this.entries.length=0,M(this.entries,N)},O=function(N,D){if(N<D)throw TypeError("Not enough arguments")},v=g(function(D,L){re(this,{type:Q,iterator:$(W(D).entries),kind:L})},"Iterator",function(){var D=le(this),L=D.kind,U=D.iterator.next(),K=U.value;return U.done||(U.value=L==="keys"?K.key:L==="values"?K.value:[K.key,K.value]),U}),x=function(){S(this,x,Z);var D=arguments.length>0?arguments[0]:void 0,L=this,U=[],K,j,G,J,q,ce,me,Me,Fe;if(re(L,{type:Z,entries:U,updateURL:function(){},updateSearchParams:E}),D!==void 0)if(w(D))if(K=V(D),typeof K=="function")for(j=K.call(D),G=j.next;!(J=G.call(j)).done;){if(q=$(R(J.value)),ce=q.next,(me=ce.call(q)).done||(Me=ce.call(q)).done||!ce.call(q).done)throw TypeError("Expected sequence with length 2");U.push({key:me.value+"",value:Me.value+""})}else for(Fe in D)k(D,Fe)&&U.push({key:Fe,value:D[Fe]+""});else M(U,typeof D=="string"?D.charAt(0)==="?"?D.slice(1):D:D+"")},I=x.prototype;h(I,{append:function(D,L){O(arguments.length,2);var U=W(this);U.entries.push({key:D+"",value:L+""}),U.updateURL()},delete:function(N){O(arguments.length,1);for(var D=W(this),L=D.entries,U=N+"",K=0;K<L.length;)L[K].key===U?L.splice(K,1):K++;D.updateURL()},get:function(D){O(arguments.length,1);for(var L=W(this).entries,U=D+"",K=0;K<L.length;K++)if(L[K].key===U)return L[K].value;return null},getAll:function(D){O(arguments.length,1);for(var L=W(this).entries,U=D+"",K=[],j=0;j<L.length;j++)L[j].key===U&&K.push(L[j].value);return K},has:function(D){O(arguments.length,1);for(var L=W(this).entries,U=D+"",K=0;K<L.length;)if(L[K++].key===U)return!0;return!1},set:function(D,L){O(arguments.length,1);for(var U=W(this),K=U.entries,j=!1,G=D+"",J=L+"",q=0,ce;q<K.length;q++)ce=K[q],ce.key===G&&(j?K.splice(q--,1):(j=!0,ce.value=J));j||K.push({key:G,value:J}),U.updateURL()},sort:function(){var D=W(this),L=D.entries,U=L.slice(),K,j,G;for(L.length=0,G=0;G<U.length;G++){for(K=U[G],j=0;j<G;j++)if(L[j].key>K.key){L.splice(j,0,K);break}j===G&&L.push(K)}D.updateURL()},forEach:function(D){for(var L=W(this).entries,U=C(D,arguments.length>1?arguments[1]:void 0,3),K=0,j;K<L.length;)j=L[K++],U(j.value,j.key,this)},keys:function(){return new v(this,"keys")},values:function(){return new v(this,"values")},entries:function(){return new v(this,"entries")}},{enumerable:!0}),f(I,Y,I.entries),f(I,"toString",function(){for(var D=W(this).entries,L=[],U=0,K;U<D.length;)K=D[U++],L.push(A(K.key)+"="+A(K.value));return L.join("&")},{enumerable:!0}),p(x,Z),c({global:!0,forced:!d},{URLSearchParams:x}),!d&&typeof P=="function"&&typeof H=="function"&&c({global:!0,enumerable:!0,forced:!0},{fetch:function(D){var L=[D],U,K,j;return arguments.length>1&&(U=arguments[1],w(U)&&(K=U.body,b(K)===Z&&(j=U.headers?new H(U.headers):new H,j.has("content-type")||j.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),U=F(U,{body:z(0,String(K)),headers:z(0,j)}))),L.push(U)),P.apply(this,L)}}),s.exports={URLSearchParams:x,getState:W}},285:function(s,l,a){a(8783);var c=a(2109),u=a(9781),d=a(590),f=a(7854),h=a(6048),p=a(1320),g=a(5787),y=a(6656),S=a(1574),k=a(8457),C=a(8710).codeAt,b=a(3197),R=a(8003),w=a(1637),F=a(9909),z=f.URL,$=w.URLSearchParams,V=w.getState,B=F.set,P=F.getterFor("URL"),H=Math.floor,Y=Math.pow,Z="Invalid authority",Q="Invalid scheme",re="Invalid host",W="Invalid port",le=/[A-Za-z]/,de=/[\d+-.A-Za-z]/,ye=/\d/,Ee=/^(0x|0X)/,be=/^[0-7]+$/,Te=/^\d+$/,Ce=/^[\dA-Fa-f]+$/,Ae=/[\u0000\t\u000A\u000D #%/:?@[\\]]/,ge=/[\u0000\t\u000A\u000D #/:?@[\\]]/,A=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,M=/[\t\u000A\u000D]/g,E,O=function(T,ee){var _,te,ie;if(ee.charAt(0)=="["){if(ee.charAt(ee.length-1)!="]"||(_=x(ee.slice(1,-1)),!_))return re;T.host=_}else if(J(T)){if(ee=b(ee),Ae.test(ee)||(_=v(ee),_===null))return re;T.host=_}else{if(ge.test(ee))return re;for(_="",te=k(ee),ie=0;ie<te.length;ie++)_+=j(te[ie],D);T.host=_}},v=function(T){var ee=T.split("."),_,te,ie,we,he,Pe,$e;if(ee.length&&ee[ee.length-1]==""&&ee.pop(),_=ee.length,_>4)return T;for(te=[],ie=0;ie<_;ie++){if(we=ee[ie],we=="")return T;if(he=10,we.length>1&&we.charAt(0)=="0"&&(he=Ee.test(we)?16:8,we=we.slice(he==8?1:2)),we==="")Pe=0;else{if(!(he==10?Te:he==8?be:Ce).test(we))return T;Pe=parseInt(we,he)}te.push(Pe)}for(ie=0;ie<_;ie++)if(Pe=te[ie],ie==_-1){if(Pe>=Y(256,5-_))return null}else if(Pe>255)return null;for($e=te.pop(),ie=0;ie<te.length;ie++)$e+=te[ie]*Y(256,3-ie);return $e},x=function(T){var ee=[0,0,0,0,0,0,0,0],_=0,te=null,ie=0,we,he,Pe,$e,je,Pt,ne,Xe=function(){return T.charAt(ie)};if(Xe()==":"){if(T.charAt(1)!=":")return;ie+=2,_++,te=_}for(;Xe();){if(_==8)return;if(Xe()==":"){if(te!==null)return;ie++,_++,te=_;continue}for(we=he=0;he<4&&Ce.test(Xe());)we=we*16+parseInt(Xe(),16),ie++,he++;if(Xe()=="."){if(he==0||(ie-=he,_>6))return;for(Pe=0;Xe();){if($e=null,Pe>0)if(Xe()=="."&&Pe<4)ie++;else return;if(!ye.test(Xe()))return;for(;ye.test(Xe());){if(je=parseInt(Xe(),10),$e===null)$e=je;else{if($e==0)return;$e=$e*10+je}if($e>255)return;ie++}ee[_]=ee[_]*256+$e,Pe++,(Pe==2||Pe==4)&&_++}if(Pe!=4)return;break}else if(Xe()==":"){if(ie++,!Xe())return}else if(Xe())return;ee[_++]=we}if(te!==null)for(Pt=_-te,_=7;_!=0&&Pt>0;)ne=ee[_],ee[_--]=ee[te+Pt-1],ee[te+--Pt]=ne;else if(_!=8)return;return ee},I=function(T){for(var ee=null,_=1,te=null,ie=0,we=0;we<8;we++)T[we]!==0?(ie>_&&(ee=te,_=ie),te=null,ie=0):(te===null&&(te=we),++ie);return ie>_&&(ee=te,_=ie),ee},N=function(T){var ee,_,te,ie;if(typeof T=="number"){for(ee=[],_=0;_<4;_++)ee.unshift(T%256),T=H(T/256);return ee.join(".")}else if(typeof T=="object"){for(ee="",te=I(T),_=0;_<8;_++)ie&&T[_]===0||(ie&&(ie=!1),te===_?(ee+=_?":":"::",ie=!0):(ee+=T[_].toString(16),_<7&&(ee+=":")));return"["+ee+"]"}return T},D={},L=S({},D,{" ":1,'"':1,"<":1,">":1,"`":1}),U=S({},L,{"#":1,"?":1,"{":1,"}":1}),K=S({},U,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),j=function(T,ee){var _=C(T,0);return _>32&&_<127&&!y(ee,T)?T:encodeURIComponent(T)},G={ftp:21,file:null,http:80,https:443,ws:80,wss:443},J=function(T){return y(G,T.scheme)},q=function(T){return T.username!=""||T.password!=""},ce=function(T){return!T.host||T.cannotBeABaseURL||T.scheme=="file"},me=function(T,ee){var _;return T.length==2&&le.test(T.charAt(0))&&((_=T.charAt(1))==":"||!ee&&_=="|")},Me=function(T){var ee;return T.length>1&&me(T.slice(0,2))&&(T.length==2||(ee=T.charAt(2))==="/"||ee==="\\"||ee==="?"||ee==="#")},Fe=function(T){var ee=T.path,_=ee.length;_&&(T.scheme!="file"||_!=1||!me(ee[0],!0))&&ee.pop()},Be=function(T){return T==="."||T.toLowerCase()==="%2e"},Ne=function(T){return T=T.toLowerCase(),T===".."||T==="%2e."||T===".%2e"||T==="%2e%2e"},Ke={},yt={},rt={},Mn={},X={},se={},ae={},xe={},ke={},ze={},Ue={},ut={},dt={},qe={},en={},In={},Et={},Rt={},Sr={},Dt={},cn={},tn=function(T,ee,_,te){var ie=_||Ke,we=0,he="",Pe=!1,$e=!1,je=!1,Pt,ne,Xe,un;for(_||(T.scheme="",T.username="",T.password="",T.host=null,T.port=null,T.path=[],T.query=null,T.fragment=null,T.cannotBeABaseURL=!1,ee=ee.replace(A,"")),ee=ee.replace(M,""),Pt=k(ee);we<=Pt.length;){switch(ne=Pt[we],ie){case Ke:if(ne&&le.test(ne))he+=ne.toLowerCase(),ie=yt;else{if(_)return Q;ie=rt;continue}break;case yt:if(ne&&(de.test(ne)||ne=="+"||ne=="-"||ne=="."))he+=ne.toLowerCase();else if(ne==":"){if(_&&(J(T)!=y(G,he)||he=="file"&&(q(T)||T.port!==null)||T.scheme=="file"&&!T.host))return;if(T.scheme=he,_){J(T)&&G[T.scheme]==T.port&&(T.port=null);return}he="",T.scheme=="file"?ie=qe:J(T)&&te&&te.scheme==T.scheme?ie=Mn:J(T)?ie=xe:Pt[we+1]=="/"?(ie=X,we++):(T.cannotBeABaseURL=!0,T.path.push(""),ie=Sr)}else{if(_)return Q;he="",ie=rt,we=0;continue}break;case rt:if(!te||te.cannotBeABaseURL&&ne!="#")return Q;if(te.cannotBeABaseURL&&ne=="#"){T.scheme=te.scheme,T.path=te.path.slice(),T.query=te.query,T.fragment="",T.cannotBeABaseURL=!0,ie=cn;break}ie=te.scheme=="file"?qe:se;continue;case Mn:if(ne=="/"&&Pt[we+1]=="/")ie=ke,we++;else{ie=se;continue}break;case X:if(ne=="/"){ie=ze;break}else{ie=Rt;continue}case se:if(T.scheme=te.scheme,ne==E)T.username=te.username,T.password=te.password,T.host=te.host,T.port=te.port,T.path=te.path.slice(),T.query=te.query;else if(ne=="/"||ne=="\\"&&J(T))ie=ae;else if(ne=="?")T.username=te.username,T.password=te.password,T.host=te.host,T.port=te.port,T.path=te.path.slice(),T.query="",ie=Dt;else if(ne=="#")T.username=te.username,T.password=te.password,T.host=te.host,T.port=te.port,T.path=te.path.slice(),T.query=te.query,T.fragment="",ie=cn;else{T.username=te.username,T.password=te.password,T.host=te.host,T.port=te.port,T.path=te.path.slice(),T.path.pop(),ie=Rt;continue}break;case ae:if(J(T)&&(ne=="/"||ne=="\\"))ie=ke;else if(ne=="/")ie=ze;else{T.username=te.username,T.password=te.password,T.host=te.host,T.port=te.port,ie=Rt;continue}break;case xe:if(ie=ke,ne!="/"||he.charAt(we+1)!="/")continue;we++;break;case ke:if(ne!="/"&&ne!="\\"){ie=ze;continue}break;case ze:if(ne=="@"){Pe&&(he="%40"+he),Pe=!0,Xe=k(he);for(var $a=0;$a<Xe.length;$a++){var xf=Xe[$a];if(xf==":"&&!je){je=!0;continue}var Sf=j(xf,K);je?T.password+=Sf:T.username+=Sf}he=""}else if(ne==E||ne=="/"||ne=="?"||ne=="#"||ne=="\\"&&J(T)){if(Pe&&he=="")return Z;we-=k(he).length+1,he="",ie=Ue}else he+=ne;break;case Ue:case ut:if(_&&T.scheme=="file"){ie=In;continue}else if(ne==":"&&!$e){if(he=="")return re;if(un=O(T,he),un)return un;if(he="",ie=dt,_==ut)return}else if(ne==E||ne=="/"||ne=="?"||ne=="#"||ne=="\\"&&J(T)){if(J(T)&&he=="")return re;if(_&&he==""&&(q(T)||T.port!==null))return;if(un=O(T,he),un)return un;if(he="",ie=Et,_)return;continue}else ne=="["?$e=!0:ne=="]"&&($e=!1),he+=ne;break;case dt:if(ye.test(ne))he+=ne;else if(ne==E||ne=="/"||ne=="?"||ne=="#"||ne=="\\"&&J(T)||_){if(he!=""){var Ua=parseInt(he,10);if(Ua>65535)return W;T.port=J(T)&&Ua===G[T.scheme]?null:Ua,he=""}if(_)return;ie=Et;continue}else return W;break;case qe:if(T.scheme="file",ne=="/"||ne=="\\")ie=en;else if(te&&te.scheme=="file")if(ne==E)T.host=te.host,T.path=te.path.slice(),T.query=te.query;else if(ne=="?")T.host=te.host,T.path=te.path.slice(),T.query="",ie=Dt;else if(ne=="#")T.host=te.host,T.path=te.path.slice(),T.query=te.query,T.fragment="",ie=cn;else{Me(Pt.slice(we).join(""))||(T.host=te.host,T.path=te.path.slice(),Fe(T)),ie=Rt;continue}else{ie=Rt;continue}break;case en:if(ne=="/"||ne=="\\"){ie=In;break}te&&te.scheme=="file"&&!Me(Pt.slice(we).join(""))&&(me(te.path[0],!0)?T.path.push(te.path[0]):T.host=te.host),ie=Rt;continue;case In:if(ne==E||ne=="/"||ne=="\\"||ne=="?"||ne=="#"){if(!_&&me(he))ie=Rt;else if(he==""){if(T.host="",_)return;ie=Et}else{if(un=O(T,he),un)return un;if(T.host=="localhost"&&(T.host=""),_)return;he="",ie=Et}continue}else he+=ne;break;case Et:if(J(T)){if(ie=Rt,ne!="/"&&ne!="\\")continue}else if(!_&&ne=="?")T.query="",ie=Dt;else if(!_&&ne=="#")T.fragment="",ie=cn;else if(ne!=E&&(ie=Rt,ne!="/"))continue;break;case Rt:if(ne==E||ne=="/"||ne=="\\"&&J(T)||!_&&(ne=="?"||ne=="#")){if(Ne(he)?(Fe(T),ne!="/"&&!(ne=="\\"&&J(T))&&T.path.push("")):Be(he)?ne!="/"&&!(ne=="\\"&&J(T))&&T.path.push(""):(T.scheme=="file"&&!T.path.length&&me(he)&&(T.host&&(T.host=""),he=he.charAt(0)+":"),T.path.push(he)),he="",T.scheme=="file"&&(ne==E||ne=="?"||ne=="#"))for(;T.path.length>1&&T.path[0]==="";)T.path.shift();ne=="?"?(T.query="",ie=Dt):ne=="#"&&(T.fragment="",ie=cn)}else he+=j(ne,U);break;case Sr:ne=="?"?(T.query="",ie=Dt):ne=="#"?(T.fragment="",ie=cn):ne!=E&&(T.path[0]+=j(ne,D));break;case Dt:!_&&ne=="#"?(T.fragment="",ie=cn):ne!=E&&(ne=="'"&&J(T)?T.query+="%27":ne=="#"?T.query+="%23":T.query+=j(ne,D));break;case cn:ne!=E&&(T.fragment+=j(ne,L));break}we++}},Xn=function(ee){var _=g(this,Xn,"URL"),te=arguments.length>1?arguments[1]:void 0,ie=String(ee),we=B(_,{type:"URL"}),he,Pe;if(te!==void 0){if(te instanceof Xn)he=P(te);else if(Pe=tn(he={},String(te)),Pe)throw TypeError(Pe)}if(Pe=tn(we,ie,null,he),Pe)throw TypeError(Pe);var $e=we.searchParams=new $,je=V($e);je.updateSearchParams(we.query),je.updateURL=function(){we.query=String($e)||null},u||(_.href=Bi.call(_),_.origin=af.call(_),_.protocol=lf.call(_),_.username=cf.call(_),_.password=uf.call(_),_.host=df.call(_),_.hostname=ff.call(_),_.port=pf.call(_),_.pathname=hf.call(_),_.search=mf.call(_),_.searchParams=gf.call(_),_.hash=yf.call(_))},za=Xn.prototype,Bi=function(){var T=P(this),ee=T.scheme,_=T.username,te=T.password,ie=T.host,we=T.port,he=T.path,Pe=T.query,$e=T.fragment,je=ee+":";return ie!==null?(je+="//",q(T)&&(je+=_+(te?":"+te:"")+"@"),je+=N(ie),we!==null&&(je+=":"+we)):ee=="file"&&(je+="//"),je+=T.cannotBeABaseURL?he[0]:he.length?"/"+he.join("/"):"",Pe!==null&&(je+="?"+Pe),$e!==null&&(je+="#"+$e),je},af=function(){var T=P(this),ee=T.scheme,_=T.port;if(ee=="blob")try{return new URL(ee.path[0]).origin}catch{return"null"}return ee=="file"||!J(T)?"null":ee+"://"+N(T.host)+(_!==null?":"+_:"")},lf=function(){return P(this).scheme+":"},cf=function(){return P(this).username},uf=function(){return P(this).password},df=function(){var T=P(this),ee=T.host,_=T.port;return ee===null?"":_===null?N(ee):N(ee)+":"+_},ff=function(){var T=P(this).host;return T===null?"":N(T)},pf=function(){var T=P(this).port;return T===null?"":String(T)},hf=function(){var T=P(this),ee=T.path;return T.cannotBeABaseURL?ee[0]:ee.length?"/"+ee.join("/"):""},mf=function(){var T=P(this).query;return T?"?"+T:""},gf=function(){return P(this).searchParams},yf=function(){var T=P(this).fragment;return T?"#"+T:""},Lt=function(T,ee){return{get:T,set:ee,configurable:!0,enumerable:!0}};if(u&&h(za,{href:Lt(Bi,function(T){var ee=P(this),_=String(T),te=tn(ee,_);if(te)throw TypeError(te);V(ee.searchParams).updateSearchParams(ee.query)}),origin:Lt(af),protocol:Lt(lf,function(T){var ee=P(this);tn(ee,String(T)+":",Ke)}),username:Lt(cf,function(T){var ee=P(this),_=k(String(T));if(!ce(ee)){ee.username="";for(var te=0;te<_.length;te++)ee.username+=j(_[te],K)}}),password:Lt(uf,function(T){var ee=P(this),_=k(String(T));if(!ce(ee)){ee.password="";for(var te=0;te<_.length;te++)ee.password+=j(_[te],K)}}),host:Lt(df,function(T){var ee=P(this);ee.cannotBeABaseURL||tn(ee,String(T),Ue)}),hostname:Lt(ff,function(T){var ee=P(this);ee.cannotBeABaseURL||tn(ee,String(T),ut)}),port:Lt(pf,function(T){var ee=P(this);ce(ee)||(T=String(T),T==""?ee.port=null:tn(ee,T,dt))}),pathname:Lt(hf,function(T){var ee=P(this);ee.cannotBeABaseURL||(ee.path=[],tn(ee,T+"",Et))}),search:Lt(mf,function(T){var ee=P(this);T=String(T),T==""?ee.query=null:(T.charAt(0)=="?"&&(T=T.slice(1)),ee.query="",tn(ee,T,Dt)),V(ee.searchParams).updateSearchParams(ee.query)}),searchParams:Lt(gf),hash:Lt(yf,function(T){var ee=P(this);if(T=String(T),T==""){ee.fragment=null;return}T.charAt(0)=="#"&&(T=T.slice(1)),ee.fragment="",tn(ee,T,cn)})}),p(za,"toJSON",function(){return Bi.call(this)},{enumerable:!0}),p(za,"toString",function(){return Bi.call(this)},{enumerable:!0}),z){var vf=z.createObjectURL,bf=z.revokeObjectURL;vf&&p(Xn,"createObjectURL",function(ee){return vf.apply(z,arguments)}),bf&&p(Xn,"revokeObjectURL",function(ee){return bf.apply(z,arguments)})}R(Xn,"URL"),c({global:!0,forced:!d,sham:!u},{URL:Xn})}},r={};function o(s){if(r[s])return r[s].exports;var l=r[s]={exports:{}};return t[s](l,l.exports,o),l.exports}(function(){o.d=function(s,l){for(var a in l)o.o(l,a)&&!o.o(s,a)&&Object.defineProperty(s,a,{enumerable:!0,get:l[a]})}})(),function(){o.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}()}(),function(){o.o=function(s,l){return Object.prototype.hasOwnProperty.call(s,l)}}(),function(){o.r=function(s){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})}}();var i={};return function(){o.r(i),o.d(i,{Dropzone:function(){return W},default:function(){return ge}}),o(2222),o(7327),o(2772),o(6992),o(1249),o(7042),o(561),o(8264),o(8309),o(489),o(1539),o(4916),o(9714),o(8783),o(4723),o(5306),o(3123),o(3210),o(2472),o(2990),o(8927),o(3105),o(5035),o(4345),o(7174),o(2846),o(4731),o(7209),o(6319),o(8867),o(7789),o(3739),o(9368),o(4483),o(2056),o(3462),o(678),o(7462),o(3824),o(5021),o(2974),o(5016),o(4747),o(3948),o(285);function s(A,M){var E;if(typeof Symbol>"u"||A[Symbol.iterator]==null){if(Array.isArray(A)||(E=l(A))||M&&A&&typeof A.length=="number"){E&&(A=E);var O=0,v=function(){};return{s:v,n:function(){return O>=A.length?{done:!0}:{done:!1,value:A[O++]}},e:function(L){throw L},f:v}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
7
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var x=!0,I=!1,N;return{s:function(){E=A[Symbol.iterator]()},n:function(){var L=E.next();return x=L.done,L},e:function(L){I=!0,N=L},f:function(){try{!x&&E.return!=null&&E.return()}finally{if(I)throw N}}}}function l(A,M){if(A){if(typeof A=="string")return a(A,M);var E=Object.prototype.toString.call(A).slice(8,-1);if(E==="Object"&&A.constructor&&(E=A.constructor.name),E==="Map"||E==="Set")return Array.from(A);if(E==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(E))return a(A,M)}}function a(A,M){(M==null||M>A.length)&&(M=A.length);for(var E=0,O=new Array(M);E<M;E++)O[E]=A[E];return O}function c(A,M){if(!(A instanceof M))throw new TypeError("Cannot call a class as a function")}function u(A,M){for(var E=0;E<M.length;E++){var O=M[E];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(A,O.key,O)}}function d(A,M,E){return M&&u(A.prototype,M),E&&u(A,E),A}var f=function(){function A(){c(this,A)}return d(A,[{key:"on",value:function(E,O){return this._callbacks=this._callbacks||{},this._callbacks[E]||(this._callbacks[E]=[]),this._callbacks[E].push(O),this}},{key:"emit",value:function(E){this._callbacks=this._callbacks||{};for(var O=this._callbacks[E],v=arguments.length,x=new Array(v>1?v-1:0),I=1;I<v;I++)x[I-1]=arguments[I];if(O){var N=s(O,!0),D;try{for(N.s();!(D=N.n()).done;){var L=D.value;L.apply(this,x)}}catch(U){N.e(U)}finally{N.f()}}return this.element&&this.element.dispatchEvent(this.makeEvent("dropzone:"+E,{args:x})),this}},{key:"makeEvent",value:function(E,O){var v={bubbles:!0,cancelable:!0,detail:O};if(typeof window.CustomEvent=="function")return new CustomEvent(E,v);var x=document.createEvent("CustomEvent");return x.initCustomEvent(E,v.bubbles,v.cancelable,v.detail),x}},{key:"off",value:function(E,O){if(!this._callbacks||arguments.length===0)return this._callbacks={},this;var v=this._callbacks[E];if(!v)return this;if(arguments.length===1)return delete this._callbacks[E],this;for(var x=0;x<v.length;x++){var I=v[x];if(I===O){v.splice(x,1);break}}return this}}]),A}(),h='<div class="dz-preview dz-file-preview"> <div class="dz-image"><img data-dz-thumbnail/></div> <div class="dz-details"> <div class="dz-size"><span data-dz-size></span></div> <div class="dz-filename"><span data-dz-name></span></div> </div> <div class="dz-progress"> <span class="dz-upload" data-dz-uploadprogress></span> </div> <div class="dz-error-message"><span data-dz-errormessage></span></div> <div class="dz-success-mark"> <svg width="54px" height="54px" viewBox="0 0 54 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>Check</title> <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <path d="M23.5,31.8431458 L17.5852419,25.9283877 C16.0248253,24.3679711 13.4910294,24.366835 11.9289322,25.9289322 C10.3700136,27.4878508 10.3665912,30.0234455 11.9283877,31.5852419 L20.4147581,40.0716123 C20.5133999,40.1702541 20.6159315,40.2626649 20.7218615,40.3488435 C22.2835669,41.8725651 24.794234,41.8626202 26.3461564,40.3106978 L43.3106978,23.3461564 C44.8771021,21.7797521 44.8758057,19.2483887 43.3137085,17.6862915 C41.7547899,16.1273729 39.2176035,16.1255422 37.6538436,17.6893022 L23.5,31.8431458 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z" stroke-opacity="0.198794158" stroke="#747474" fill-opacity="0.816519475" fill="#FFFFFF"></path> </g> </svg> </div> <div class="dz-error-mark"> <svg width="54px" height="54px" viewBox="0 0 54 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>Error</title> <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <g stroke="#747474" stroke-opacity="0.198794158" fill="#FFFFFF" fill-opacity="0.816519475"> <path d="M32.6568542,29 L38.3106978,23.3461564 C39.8771021,21.7797521 39.8758057,19.2483887 38.3137085,17.6862915 C36.7547899,16.1273729 34.2176035,16.1255422 32.6538436,17.6893022 L27,23.3431458 L21.3461564,17.6893022 C19.7823965,16.1255422 17.2452101,16.1273729 15.6862915,17.6862915 C14.1241943,19.2483887 14.1228979,21.7797521 15.6893022,23.3461564 L21.3431458,29 L15.6893022,34.6538436 C14.1228979,36.2202479 14.1241943,38.7516113 15.6862915,40.3137085 C17.2452101,41.8726271 19.7823965,41.8744578 21.3461564,40.3106978 L27,34.6568542 L32.6538436,40.3106978 C34.2176035,41.8744578 36.7547899,41.8726271 38.3137085,40.3137085 C39.8758057,38.7516113 39.8771021,36.2202479 38.3106978,34.6538436 L32.6568542,29 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z"></path> </g> </g> </svg> </div> </div> ',p=h;function g(A,M){var E;if(typeof Symbol>"u"||A[Symbol.iterator]==null){if(Array.isArray(A)||(E=y(A))||M&&A&&typeof A.length=="number"){E&&(A=E);var O=0,v=function(){};return{s:v,n:function(){return O>=A.length?{done:!0}:{done:!1,value:A[O++]}},e:function(L){throw L},f:v}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
8
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var x=!0,I=!1,N;return{s:function(){E=A[Symbol.iterator]()},n:function(){var L=E.next();return x=L.done,L},e:function(L){I=!0,N=L},f:function(){try{!x&&E.return!=null&&E.return()}finally{if(I)throw N}}}}function y(A,M){if(A){if(typeof A=="string")return S(A,M);var E=Object.prototype.toString.call(A).slice(8,-1);if(E==="Object"&&A.constructor&&(E=A.constructor.name),E==="Map"||E==="Set")return Array.from(A);if(E==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(E))return S(A,M)}}function S(A,M){(M==null||M>A.length)&&(M=A.length);for(var E=0,O=new Array(M);E<M;E++)O[E]=A[E];return O}var k={url:null,method:"post",withCredentials:!1,timeout:null,parallelUploads:2,uploadMultiple:!1,chunking:!1,forceChunking:!1,chunkSize:2e6,parallelChunkUploads:!1,retryChunks:!1,retryChunksLimit:3,maxFilesize:256,paramName:"file",createImageThumbnails:!0,maxThumbnailFilesize:10,thumbnailWidth:120,thumbnailHeight:120,thumbnailMethod:"crop",resizeWidth:null,resizeHeight:null,resizeMimeType:null,resizeQuality:.8,resizeMethod:"contain",filesizeBase:1e3,maxFiles:null,headers:null,clickable:!0,ignoreHiddenFiles:!0,acceptedFiles:null,acceptedMimeTypes:null,autoProcessQueue:!0,autoQueue:!0,addRemoveLinks:!1,previewsContainer:null,disablePreviews:!1,hiddenInputContainer:"body",capture:null,renameFilename:null,renameFile:null,forceFallback:!1,dictDefaultMessage:"Drop files here to upload",dictFallbackMessage:"Your browser does not support drag'n'drop file uploads.",dictFallbackText:"Please use the fallback form below to upload your files like in the olden days.",dictFileTooBig:"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",dictInvalidFileType:"You can't upload files of this type.",dictResponseError:"Server responded with {{statusCode}} code.",dictCancelUpload:"Cancel upload",dictUploadCanceled:"Upload canceled.",dictCancelUploadConfirmation:"Are you sure you want to cancel this upload?",dictRemoveFile:"Remove file",dictRemoveFileConfirmation:null,dictMaxFilesExceeded:"You can not upload any more files.",dictFileSizeUnits:{tb:"TB",gb:"GB",mb:"MB",kb:"KB",b:"b"},init:function(){},params:function(M,E,O){if(O)return{dzuuid:O.file.upload.uuid,dzchunkindex:O.index,dztotalfilesize:O.file.size,dzchunksize:this.options.chunkSize,dztotalchunkcount:O.file.upload.totalChunkCount,dzchunkbyteoffset:O.index*this.options.chunkSize}},accept:function(M,E){return E()},chunksUploaded:function(M,E){E()},fallback:function(){var M;this.element.className="".concat(this.element.className," dz-browser-not-supported");var E=g(this.element.getElementsByTagName("div"),!0),O;try{for(E.s();!(O=E.n()).done;){var v=O.value;if(/(^| )dz-message($| )/.test(v.className)){M=v,v.className="dz-message";break}}}catch(I){E.e(I)}finally{E.f()}M||(M=W.createElement('<div class="dz-message"><span></span></div>'),this.element.appendChild(M));var x=M.getElementsByTagName("span")[0];return x&&(x.textContent!=null?x.textContent=this.options.dictFallbackMessage:x.innerText!=null&&(x.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(M,E,O,v){var x={srcX:0,srcY:0,srcWidth:M.width,srcHeight:M.height},I=M.width/M.height;E==null&&O==null?(E=x.srcWidth,O=x.srcHeight):E==null?E=O*I:O==null&&(O=E/I),E=Math.min(E,x.srcWidth),O=Math.min(O,x.srcHeight);var N=E/O;if(x.srcWidth>E||x.srcHeight>O)if(v==="crop")I>N?(x.srcHeight=M.height,x.srcWidth=x.srcHeight*N):(x.srcWidth=M.width,x.srcHeight=x.srcWidth/N);else if(v==="contain")I>N?O=E/I:E=O*I;else throw new Error("Unknown resizeMethod '".concat(v,"'"));return x.srcX=(M.width-x.srcWidth)/2,x.srcY=(M.height-x.srcHeight)/2,x.trgWidth=E,x.trgHeight=O,x},transformFile:function(M,E){return(this.options.resizeWidth||this.options.resizeHeight)&&M.type.match(/image.*/)?this.resizeImage(M,this.options.resizeWidth,this.options.resizeHeight,this.options.resizeMethod,E):E(M)},previewTemplate:p,drop:function(M){return this.element.classList.remove("dz-drag-hover")},dragstart:function(M){},dragend:function(M){return this.element.classList.remove("dz-drag-hover")},dragenter:function(M){return this.element.classList.add("dz-drag-hover")},dragover:function(M){return this.element.classList.add("dz-drag-hover")},dragleave:function(M){return this.element.classList.remove("dz-drag-hover")},paste:function(M){},reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(M){var E=this;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer&&!this.options.disablePreviews){M.previewElement=W.createElement(this.options.previewTemplate.trim()),M.previewTemplate=M.previewElement,this.previewsContainer.appendChild(M.previewElement);var O=g(M.previewElement.querySelectorAll("[data-dz-name]"),!0),v;try{for(O.s();!(v=O.n()).done;){var x=v.value;x.textContent=M.name}}catch(j){O.e(j)}finally{O.f()}var I=g(M.previewElement.querySelectorAll("[data-dz-size]"),!0),N;try{for(I.s();!(N=I.n()).done;)x=N.value,x.innerHTML=this.filesize(M.size)}catch(j){I.e(j)}finally{I.f()}this.options.addRemoveLinks&&(M._removeLink=W.createElement('<a class="dz-remove" href="javascript:undefined;" data-dz-remove>'.concat(this.options.dictRemoveFile,"</a>")),M.previewElement.appendChild(M._removeLink));var D=function(G){return G.preventDefault(),G.stopPropagation(),M.status===W.UPLOADING?W.confirm(E.options.dictCancelUploadConfirmation,function(){return E.removeFile(M)}):E.options.dictRemoveFileConfirmation?W.confirm(E.options.dictRemoveFileConfirmation,function(){return E.removeFile(M)}):E.removeFile(M)},L=g(M.previewElement.querySelectorAll("[data-dz-remove]"),!0),U;try{for(L.s();!(U=L.n()).done;){var K=U.value;K.addEventListener("click",D)}}catch(j){L.e(j)}finally{L.f()}}},removedfile:function(M){return M.previewElement!=null&&M.previewElement.parentNode!=null&&M.previewElement.parentNode.removeChild(M.previewElement),this._updateMaxFilesReachedClass()},thumbnail:function(M,E){if(M.previewElement){M.previewElement.classList.remove("dz-file-preview");var O=g(M.previewElement.querySelectorAll("[data-dz-thumbnail]"),!0),v;try{for(O.s();!(v=O.n()).done;){var x=v.value;x.alt=M.name,x.src=E}}catch(I){O.e(I)}finally{O.f()}return setTimeout(function(){return M.previewElement.classList.add("dz-image-preview")},1)}},error:function(M,E){if(M.previewElement){M.previewElement.classList.add("dz-error"),typeof E!="string"&&E.error&&(E=E.error);var O=g(M.previewElement.querySelectorAll("[data-dz-errormessage]"),!0),v;try{for(O.s();!(v=O.n()).done;){var x=v.value;x.textContent=E}}catch(I){O.e(I)}finally{O.f()}}},errormultiple:function(){},processing:function(M){if(M.previewElement&&(M.previewElement.classList.add("dz-processing"),M._removeLink))return M._removeLink.innerHTML=this.options.dictCancelUpload},processingmultiple:function(){},uploadprogress:function(M,E,O){if(M.previewElement){var v=g(M.previewElement.querySelectorAll("[data-dz-uploadprogress]"),!0),x;try{for(v.s();!(x=v.n()).done;){var I=x.value;I.nodeName==="PROGRESS"?I.value=E:I.style.width="".concat(E,"%")}}catch(N){v.e(N)}finally{v.f()}}},totaluploadprogress:function(){},sending:function(){},sendingmultiple:function(){},success:function(M){if(M.previewElement)return M.previewElement.classList.add("dz-success")},successmultiple:function(){},canceled:function(M){return this.emit("error",M,this.options.dictUploadCanceled)},canceledmultiple:function(){},complete:function(M){if(M._removeLink&&(M._removeLink.innerHTML=this.options.dictRemoveFile),M.previewElement)return M.previewElement.classList.add("dz-complete")},completemultiple:function(){},maxfilesexceeded:function(){},maxfilesreached:function(){},queuecomplete:function(){},addedfiles:function(){}},C=k;function b(A){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?b=function(E){return typeof E}:b=function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},b(A)}function R(A,M){var E;if(typeof Symbol>"u"||A[Symbol.iterator]==null){if(Array.isArray(A)||(E=w(A))||M&&A&&typeof A.length=="number"){E&&(A=E);var O=0,v=function(){};return{s:v,n:function(){return O>=A.length?{done:!0}:{done:!1,value:A[O++]}},e:function(L){throw L},f:v}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
9
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var x=!0,I=!1,N;return{s:function(){E=A[Symbol.iterator]()},n:function(){var L=E.next();return x=L.done,L},e:function(L){I=!0,N=L},f:function(){try{!x&&E.return!=null&&E.return()}finally{if(I)throw N}}}}function w(A,M){if(A){if(typeof A=="string")return F(A,M);var E=Object.prototype.toString.call(A).slice(8,-1);if(E==="Object"&&A.constructor&&(E=A.constructor.name),E==="Map"||E==="Set")return Array.from(A);if(E==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(E))return F(A,M)}}function F(A,M){(M==null||M>A.length)&&(M=A.length);for(var E=0,O=new Array(M);E<M;E++)O[E]=A[E];return O}function z(A,M){if(!(A instanceof M))throw new TypeError("Cannot call a class as a function")}function $(A,M){for(var E=0;E<M.length;E++){var O=M[E];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(A,O.key,O)}}function V(A,M,E){return M&&$(A.prototype,M),E&&$(A,E),A}function B(A,M){if(typeof M!="function"&&M!==null)throw new TypeError("Super expression must either be null or a function");A.prototype=Object.create(M&&M.prototype,{constructor:{value:A,writable:!0,configurable:!0}}),M&&P(A,M)}function P(A,M){return P=Object.setPrototypeOf||function(O,v){return O.__proto__=v,O},P(A,M)}function H(A){var M=Q();return function(){var O=re(A),v;if(M){var x=re(this).constructor;v=Reflect.construct(O,arguments,x)}else v=O.apply(this,arguments);return Y(this,v)}}function Y(A,M){return M&&(b(M)==="object"||typeof M=="function")?M:Z(A)}function Z(A){if(A===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A}function Q(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function re(A){return re=Object.setPrototypeOf?Object.getPrototypeOf:function(E){return E.__proto__||Object.getPrototypeOf(E)},re(A)}var W=function(A){B(E,A);var M=H(E);function E(O,v){var x;z(this,E),x=M.call(this);var I,N;if(x.element=O,x.version=E.version,x.clickableElements=[],x.listeners=[],x.files=[],typeof x.element=="string"&&(x.element=document.querySelector(x.element)),!x.element||x.element.nodeType==null)throw new Error("Invalid dropzone element.");if(x.element.dropzone)throw new Error("Dropzone already attached.");E.instances.push(Z(x)),x.element.dropzone=Z(x);var D=(N=E.optionsForElement(x.element))!=null?N:{};if(x.options=E.extend({},C,D,v??{}),x.options.previewTemplate=x.options.previewTemplate.replace(/\n*/g,""),x.options.forceFallback||!E.isBrowserSupported())return Y(x,x.options.fallback.call(Z(x)));if(x.options.url==null&&(x.options.url=x.element.getAttribute("action")),!x.options.url)throw new Error("No URL provided.");if(x.options.acceptedFiles&&x.options.acceptedMimeTypes)throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");if(x.options.uploadMultiple&&x.options.chunking)throw new Error("You cannot set both: uploadMultiple and chunking.");return x.options.acceptedMimeTypes&&(x.options.acceptedFiles=x.options.acceptedMimeTypes,delete x.options.acceptedMimeTypes),x.options.renameFilename!=null&&(x.options.renameFile=function(L){return x.options.renameFilename.call(Z(x),L.name,L)}),typeof x.options.method=="string"&&(x.options.method=x.options.method.toUpperCase()),(I=x.getExistingFallback())&&I.parentNode&&I.parentNode.removeChild(I),x.options.previewsContainer!==!1&&(x.options.previewsContainer?x.previewsContainer=E.getElement(x.options.previewsContainer,"previewsContainer"):x.previewsContainer=x.element),x.options.clickable&&(x.options.clickable===!0?x.clickableElements=[x.element]:x.clickableElements=E.getElements(x.options.clickable,"clickable")),x.init(),x}return V(E,[{key:"getAcceptedFiles",value:function(){return this.files.filter(function(v){return v.accepted}).map(function(v){return v})}},{key:"getRejectedFiles",value:function(){return this.files.filter(function(v){return!v.accepted}).map(function(v){return v})}},{key:"getFilesWithStatus",value:function(v){return this.files.filter(function(x){return x.status===v}).map(function(x){return x})}},{key:"getQueuedFiles",value:function(){return this.getFilesWithStatus(E.QUEUED)}},{key:"getUploadingFiles",value:function(){return this.getFilesWithStatus(E.UPLOADING)}},{key:"getAddedFiles",value:function(){return this.getFilesWithStatus(E.ADDED)}},{key:"getActiveFiles",value:function(){return this.files.filter(function(v){return v.status===E.UPLOADING||v.status===E.QUEUED}).map(function(v){return v})}},{key:"init",value:function(){var v=this;if(this.element.tagName==="form"&&this.element.setAttribute("enctype","multipart/form-data"),this.element.classList.contains("dropzone")&&!this.element.querySelector(".dz-message")&&this.element.appendChild(E.createElement('<div class="dz-default dz-message"><button class="dz-button" type="button">'.concat(this.options.dictDefaultMessage,"</button></div>"))),this.clickableElements.length){var x=function K(){v.hiddenFileInput&&v.hiddenFileInput.parentNode.removeChild(v.hiddenFileInput),v.hiddenFileInput=document.createElement("input"),v.hiddenFileInput.setAttribute("type","file"),(v.options.maxFiles===null||v.options.maxFiles>1)&&v.hiddenFileInput.setAttribute("multiple","multiple"),v.hiddenFileInput.className="dz-hidden-input",v.options.acceptedFiles!==null&&v.hiddenFileInput.setAttribute("accept",v.options.acceptedFiles),v.options.capture!==null&&v.hiddenFileInput.setAttribute("capture",v.options.capture),v.hiddenFileInput.setAttribute("tabindex","-1"),v.hiddenFileInput.style.visibility="hidden",v.hiddenFileInput.style.position="absolute",v.hiddenFileInput.style.top="0",v.hiddenFileInput.style.left="0",v.hiddenFileInput.style.height="0",v.hiddenFileInput.style.width="0",E.getElement(v.options.hiddenInputContainer,"hiddenInputContainer").appendChild(v.hiddenFileInput),v.hiddenFileInput.addEventListener("change",function(){var j=v.hiddenFileInput.files;if(j.length){var G=R(j,!0),J;try{for(G.s();!(J=G.n()).done;){var q=J.value;v.addFile(q)}}catch(ce){G.e(ce)}finally{G.f()}}v.emit("addedfiles",j),K()})};x()}this.URL=window.URL!==null?window.URL:window.webkitURL;var I=R(this.events,!0),N;try{for(I.s();!(N=I.n()).done;){var D=N.value;this.on(D,this.options[D])}}catch(K){I.e(K)}finally{I.f()}this.on("uploadprogress",function(){return v.updateTotalUploadProgress()}),this.on("removedfile",function(){return v.updateTotalUploadProgress()}),this.on("canceled",function(K){return v.emit("complete",K)}),this.on("complete",function(K){if(v.getAddedFiles().length===0&&v.getUploadingFiles().length===0&&v.getQueuedFiles().length===0)return setTimeout(function(){return v.emit("queuecomplete")},0)});var L=function(j){if(j.dataTransfer.types){for(var G=0;G<j.dataTransfer.types.length;G++)if(j.dataTransfer.types[G]==="Files")return!0}return!1},U=function(j){if(L(j))return j.stopPropagation(),j.preventDefault?j.preventDefault():j.returnValue=!1};return this.listeners=[{element:this.element,events:{dragstart:function(j){return v.emit("dragstart",j)},dragenter:function(j){return U(j),v.emit("dragenter",j)},dragover:function(j){var G;try{G=j.dataTransfer.effectAllowed}catch{}return j.dataTransfer.dropEffect=G==="move"||G==="linkMove"?"move":"copy",U(j),v.emit("dragover",j)},dragleave:function(j){return v.emit("dragleave",j)},drop:function(j){return U(j),v.drop(j)},dragend:function(j){return v.emit("dragend",j)}}}],this.clickableElements.forEach(function(K){return v.listeners.push({element:K,events:{click:function(G){return(K!==v.element||G.target===v.element||E.elementInside(G.target,v.element.querySelector(".dz-message")))&&v.hiddenFileInput.click(),!0}}})}),this.enable(),this.options.init.call(this)}},{key:"destroy",value:function(){return this.disable(),this.removeAllFiles(!0),this.hiddenFileInput!=null&&this.hiddenFileInput.parentNode&&(this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=null),delete this.element.dropzone,E.instances.splice(E.instances.indexOf(this),1)}},{key:"updateTotalUploadProgress",value:function(){var v,x=0,I=0,N=this.getActiveFiles();if(N.length){var D=R(this.getActiveFiles(),!0),L;try{for(D.s();!(L=D.n()).done;){var U=L.value;x+=U.upload.bytesSent,I+=U.upload.total}}catch(K){D.e(K)}finally{D.f()}v=100*x/I}else v=100;return this.emit("totaluploadprogress",v,I,x)}},{key:"_getParamName",value:function(v){return typeof this.options.paramName=="function"?this.options.paramName(v):"".concat(this.options.paramName).concat(this.options.uploadMultiple?"[".concat(v,"]"):"")}},{key:"_renameFile",value:function(v){return typeof this.options.renameFile!="function"?v.name:this.options.renameFile(v)}},{key:"getFallbackForm",value:function(){var v,x;if(v=this.getExistingFallback())return v;var I='<div class="dz-fallback">';this.options.dictFallbackText&&(I+="<p>".concat(this.options.dictFallbackText,"</p>")),I+='<input type="file" name="'.concat(this._getParamName(0),'" ').concat(this.options.uploadMultiple?'multiple="multiple"':void 0,' /><input type="submit" value="Upload!"></div>');var N=E.createElement(I);return this.element.tagName!=="FORM"?(x=E.createElement('<form action="'.concat(this.options.url,'" enctype="multipart/form-data" method="').concat(this.options.method,'"></form>')),x.appendChild(N)):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),x??N}},{key:"getExistingFallback",value:function(){for(var v=function(U){var K=R(U,!0),j;try{for(K.s();!(j=K.n()).done;){var G=j.value;if(/(^| )fallback($| )/.test(G.className))return G}}catch(J){K.e(J)}finally{K.f()}},x=0,I=["div","form"];x<I.length;x++){var N=I[x],D;if(D=v(this.element.getElementsByTagName(N)))return D}}},{key:"setupEventListeners",value:function(){return this.listeners.map(function(v){return function(){var x=[];for(var I in v.events){var N=v.events[I];x.push(v.element.addEventListener(I,N,!1))}return x}()})}},{key:"removeEventListeners",value:function(){return this.listeners.map(function(v){return function(){var x=[];for(var I in v.events){var N=v.events[I];x.push(v.element.removeEventListener(I,N,!1))}return x}()})}},{key:"disable",value:function(){var v=this;return this.clickableElements.forEach(function(x){return x.classList.remove("dz-clickable")}),this.removeEventListeners(),this.disabled=!0,this.files.map(function(x){return v.cancelUpload(x)})}},{key:"enable",value:function(){return delete this.disabled,this.clickableElements.forEach(function(v){return v.classList.add("dz-clickable")}),this.setupEventListeners()}},{key:"filesize",value:function(v){var x=0,I="b";if(v>0){for(var N=["tb","gb","mb","kb","b"],D=0;D<N.length;D++){var L=N[D],U=Math.pow(this.options.filesizeBase,4-D)/10;if(v>=U){x=v/Math.pow(this.options.filesizeBase,4-D),I=L;break}}x=Math.round(10*x)/10}return"<strong>".concat(x,"</strong> ").concat(this.options.dictFileSizeUnits[I])}},{key:"_updateMaxFilesReachedClass",value:function(){return this.options.maxFiles!=null&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")}},{key:"drop",value:function(v){if(v.dataTransfer){this.emit("drop",v);for(var x=[],I=0;I<v.dataTransfer.files.length;I++)x[I]=v.dataTransfer.files[I];if(x.length){var N=v.dataTransfer.items;N&&N.length&&N[0].webkitGetAsEntry!=null?this._addFilesFromItems(N):this.handleFiles(x)}this.emit("addedfiles",x)}}},{key:"paste",value:function(v){if(Ce(v!=null?v.clipboardData:void 0,function(I){return I.items})!=null){this.emit("paste",v);var x=v.clipboardData.items;if(x.length)return this._addFilesFromItems(x)}}},{key:"handleFiles",value:function(v){var x=R(v,!0),I;try{for(x.s();!(I=x.n()).done;){var N=I.value;this.addFile(N)}}catch(D){x.e(D)}finally{x.f()}}},{key:"_addFilesFromItems",value:function(v){var x=this;return function(){var I=[],N=R(v,!0),D;try{for(N.s();!(D=N.n()).done;){var L=D.value,U;L.webkitGetAsEntry!=null&&(U=L.webkitGetAsEntry())?U.isFile?I.push(x.addFile(L.getAsFile())):U.isDirectory?I.push(x._addFilesFromDirectory(U,U.name)):I.push(void 0):L.getAsFile!=null&&(L.kind==null||L.kind==="file")?I.push(x.addFile(L.getAsFile())):I.push(void 0)}}catch(K){N.e(K)}finally{N.f()}return I}()}},{key:"_addFilesFromDirectory",value:function(v,x){var I=this,N=v.createReader(),D=function(K){return Ae(console,"log",function(j){return j.log(K)})},L=function U(){return N.readEntries(function(K){if(K.length>0){var j=R(K,!0),G;try{for(j.s();!(G=j.n()).done;){var J=G.value;J.isFile?J.file(function(q){if(!(I.options.ignoreHiddenFiles&&q.name.substring(0,1)==="."))return q.fullPath="".concat(x,"/").concat(q.name),I.addFile(q)}):J.isDirectory&&I._addFilesFromDirectory(J,"".concat(x,"/").concat(J.name))}}catch(q){j.e(q)}finally{j.f()}U()}return null},D)};return L()}},{key:"accept",value:function(v,x){this.options.maxFilesize&&v.size>this.options.maxFilesize*1024*1024?x(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(v.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):E.isValidFile(v,this.options.acceptedFiles)?this.options.maxFiles!=null&&this.getAcceptedFiles().length>=this.options.maxFiles?(x(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",v)):this.options.accept.call(this,v,x):x(this.options.dictInvalidFileType)}},{key:"addFile",value:function(v){var x=this;v.upload={uuid:E.uuidv4(),progress:0,total:v.size,bytesSent:0,filename:this._renameFile(v)},this.files.push(v),v.status=E.ADDED,this.emit("addedfile",v),this._enqueueThumbnail(v),this.accept(v,function(I){I?(v.accepted=!1,x._errorProcessing([v],I)):(v.accepted=!0,x.options.autoQueue&&x.enqueueFile(v)),x._updateMaxFilesReachedClass()})}},{key:"enqueueFiles",value:function(v){var x=R(v,!0),I;try{for(x.s();!(I=x.n()).done;){var N=I.value;this.enqueueFile(N)}}catch(D){x.e(D)}finally{x.f()}return null}},{key:"enqueueFile",value:function(v){var x=this;if(v.status===E.ADDED&&v.accepted===!0){if(v.status=E.QUEUED,this.options.autoProcessQueue)return setTimeout(function(){return x.processQueue()},0)}else throw new Error("This file can't be queued because it has already been processed or was rejected.")}},{key:"_enqueueThumbnail",value:function(v){var x=this;if(this.options.createImageThumbnails&&v.type.match(/image.*/)&&v.size<=this.options.maxThumbnailFilesize*1024*1024)return this._thumbnailQueue.push(v),setTimeout(function(){return x._processThumbnailQueue()},0)}},{key:"_processThumbnailQueue",value:function(){var v=this;if(!(this._processingThumbnail||this._thumbnailQueue.length===0)){this._processingThumbnail=!0;var x=this._thumbnailQueue.shift();return this.createThumbnail(x,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,!0,function(I){return v.emit("thumbnail",x,I),v._processingThumbnail=!1,v._processThumbnailQueue()})}}},{key:"removeFile",value:function(v){if(v.status===E.UPLOADING&&this.cancelUpload(v),this.files=le(this.files,v),this.emit("removedfile",v),this.files.length===0)return this.emit("reset")}},{key:"removeAllFiles",value:function(v){v==null&&(v=!1);var x=R(this.files.slice(),!0),I;try{for(x.s();!(I=x.n()).done;){var N=I.value;(N.status!==E.UPLOADING||v)&&this.removeFile(N)}}catch(D){x.e(D)}finally{x.f()}return null}},{key:"resizeImage",value:function(v,x,I,N,D){var L=this;return this.createThumbnail(v,x,I,N,!0,function(U,K){if(K==null)return D(v);var j=L.options.resizeMimeType;j==null&&(j=v.type);var G=K.toDataURL(j,L.options.resizeQuality);return(j==="image/jpeg"||j==="image/jpg")&&(G=be.restore(v.dataURL,G)),D(E.dataURItoBlob(G))})}},{key:"createThumbnail",value:function(v,x,I,N,D,L){var U=this,K=new FileReader;K.onload=function(){if(v.dataURL=K.result,v.type==="image/svg+xml"){L!=null&&L(K.result);return}U.createThumbnailFromUrl(v,x,I,N,D,L)},K.readAsDataURL(v)}},{key:"displayExistingFile",value:function(v,x,I,N){var D=this,L=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;if(this.emit("addedfile",v),this.emit("complete",v),!L)this.emit("thumbnail",v,x),I&&I();else{var U=function(j){D.emit("thumbnail",v,j),I&&I()};v.dataURL=x,this.createThumbnailFromUrl(v,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,this.options.fixOrientation,U,N)}}},{key:"createThumbnailFromUrl",value:function(v,x,I,N,D,L,U){var K=this,j=document.createElement("img");return U&&(j.crossOrigin=U),D=getComputedStyle(document.body).imageOrientation=="from-image"?!1:D,j.onload=function(){var G=function(q){return q(1)};return typeof EXIF<"u"&&EXIF!==null&&D&&(G=function(q){return EXIF.getData(j,function(){return q(EXIF.getTag(this,"Orientation"))})}),G(function(J){v.width=j.width,v.height=j.height;var q=K.options.resize.call(K,v,x,I,N),ce=document.createElement("canvas"),me=ce.getContext("2d");switch(ce.width=q.trgWidth,ce.height=q.trgHeight,J>4&&(ce.width=q.trgHeight,ce.height=q.trgWidth),J){case 2:me.translate(ce.width,0),me.scale(-1,1);break;case 3:me.translate(ce.width,ce.height),me.rotate(Math.PI);break;case 4:me.translate(0,ce.height),me.scale(1,-1);break;case 5:me.rotate(.5*Math.PI),me.scale(1,-1);break;case 6:me.rotate(.5*Math.PI),me.translate(0,-ce.width);break;case 7:me.rotate(.5*Math.PI),me.translate(ce.height,-ce.width),me.scale(-1,1);break;case 8:me.rotate(-.5*Math.PI),me.translate(-ce.height,0);break}Ee(me,j,q.srcX!=null?q.srcX:0,q.srcY!=null?q.srcY:0,q.srcWidth,q.srcHeight,q.trgX!=null?q.trgX:0,q.trgY!=null?q.trgY:0,q.trgWidth,q.trgHeight);var Me=ce.toDataURL("image/png");if(L!=null)return L(Me,ce)})},L!=null&&(j.onerror=L),j.src=v.dataURL}},{key:"processQueue",value:function(){var v=this.options.parallelUploads,x=this.getUploadingFiles().length,I=x;if(!(x>=v)){var N=this.getQueuedFiles();if(N.length>0){if(this.options.uploadMultiple)return this.processFiles(N.slice(0,v-x));for(;I<v;){if(!N.length)return;this.processFile(N.shift()),I++}}}}},{key:"processFile",value:function(v){return this.processFiles([v])}},{key:"processFiles",value:function(v){var x=R(v,!0),I;try{for(x.s();!(I=x.n()).done;){var N=I.value;N.processing=!0,N.status=E.UPLOADING,this.emit("processing",N)}}catch(D){x.e(D)}finally{x.f()}return this.options.uploadMultiple&&this.emit("processingmultiple",v),this.uploadFiles(v)}},{key:"_getFilesWithXhr",value:function(v){return this.files.filter(function(x){return x.xhr===v}).map(function(x){return x})}},{key:"cancelUpload",value:function(v){if(v.status===E.UPLOADING){var x=this._getFilesWithXhr(v.xhr),I=R(x,!0),N;try{for(I.s();!(N=I.n()).done;){var D=N.value;D.status=E.CANCELED}}catch(j){I.e(j)}finally{I.f()}typeof v.xhr<"u"&&v.xhr.abort();var L=R(x,!0),U;try{for(L.s();!(U=L.n()).done;){var K=U.value;this.emit("canceled",K)}}catch(j){L.e(j)}finally{L.f()}this.options.uploadMultiple&&this.emit("canceledmultiple",x)}else(v.status===E.ADDED||v.status===E.QUEUED)&&(v.status=E.CANCELED,this.emit("canceled",v),this.options.uploadMultiple&&this.emit("canceledmultiple",[v]));if(this.options.autoProcessQueue)return this.processQueue()}},{key:"resolveOption",value:function(v){if(typeof v=="function"){for(var x=arguments.length,I=new Array(x>1?x-1:0),N=1;N<x;N++)I[N-1]=arguments[N];return v.apply(this,I)}return v}},{key:"uploadFile",value:function(v){return this.uploadFiles([v])}},{key:"uploadFiles",value:function(v){var x=this;this._transformFiles(v,function(I){if(x.options.chunking){var N=I[0];v[0].upload.chunked=x.options.chunking&&(x.options.forceChunking||N.size>x.options.chunkSize),v[0].upload.totalChunkCount=Math.ceil(N.size/x.options.chunkSize)}if(v[0].upload.chunked){var D=v[0],L=I[0];D.upload.chunks=[];var U=function(){for(var q=0;D.upload.chunks[q]!==void 0;)q++;if(!(q>=D.upload.totalChunkCount)){var ce=q*x.options.chunkSize,me=Math.min(ce+x.options.chunkSize,L.size),Me={name:x._getParamName(0),data:L.webkitSlice?L.webkitSlice(ce,me):L.slice(ce,me),filename:D.upload.filename,chunkIndex:q};D.upload.chunks[q]={file:D,index:q,dataBlock:Me,status:E.UPLOADING,progress:0,retries:0},x._uploadData(v,[Me])}};if(D.upload.finishedChunkUpload=function(J,q){var ce=!0;J.status=E.SUCCESS,J.dataBlock=null,J.xhr=null;for(var me=0;me<D.upload.totalChunkCount;me++){if(D.upload.chunks[me]===void 0)return U();D.upload.chunks[me].status!==E.SUCCESS&&(ce=!1)}ce&&x.options.chunksUploaded(D,function(){x._finished(v,q,null)})},x.options.parallelChunkUploads)for(var K=0;K<D.upload.totalChunkCount;K++)U();else U()}else{for(var j=[],G=0;G<v.length;G++)j[G]={name:x._getParamName(G),data:I[G],filename:v[G].upload.filename};x._uploadData(v,j)}})}},{key:"_getChunk",value:function(v,x){for(var I=0;I<v.upload.totalChunkCount;I++)if(v.upload.chunks[I]!==void 0&&v.upload.chunks[I].xhr===x)return v.upload.chunks[I]}},{key:"_uploadData",value:function(v,x){var I=this,N=new XMLHttpRequest,D=R(v,!0),L;try{for(D.s();!(L=D.n()).done;){var U=L.value;U.xhr=N}}catch(ae){D.e(ae)}finally{D.f()}v[0].upload.chunked&&(v[0].upload.chunks[x[0].chunkIndex].xhr=N);var K=this.resolveOption(this.options.method,v),j=this.resolveOption(this.options.url,v);N.open(K,j,!0);var G=this.resolveOption(this.options.timeout,v);G&&(N.timeout=this.resolveOption(this.options.timeout,v)),N.withCredentials=!!this.options.withCredentials,N.onload=function(ae){I._finishedUploading(v,N,ae)},N.ontimeout=function(){I._handleUploadError(v,N,"Request timedout after ".concat(I.options.timeout/1e3," seconds"))},N.onerror=function(){I._handleUploadError(v,N)};var J=N.upload!=null?N.upload:N;J.onprogress=function(ae){return I._updateFilesUploadProgress(v,N,ae)};var q={Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"};this.options.headers&&E.extend(q,this.options.headers);for(var ce in q){var me=q[ce];me&&N.setRequestHeader(ce,me)}var Me=new FormData;if(this.options.params){var Fe=this.options.params;typeof Fe=="function"&&(Fe=Fe.call(this,v,N,v[0].upload.chunked?this._getChunk(v[0],N):null));for(var Be in Fe){var Ne=Fe[Be];if(Array.isArray(Ne))for(var Ke=0;Ke<Ne.length;Ke++)Me.append(Be,Ne[Ke]);else Me.append(Be,Ne)}}var yt=R(v,!0),rt;try{for(yt.s();!(rt=yt.n()).done;){var Mn=rt.value;this.emit("sending",Mn,N,Me)}}catch(ae){yt.e(ae)}finally{yt.f()}this.options.uploadMultiple&&this.emit("sendingmultiple",v,N,Me),this._addFormElementData(Me);for(var X=0;X<x.length;X++){var se=x[X];Me.append(se.name,se.data,se.filename)}this.submitRequest(N,Me,v)}},{key:"_transformFiles",value:function(v,x){for(var I=this,N=[],D=0,L=function(j){I.options.transformFile.call(I,v[j],function(G){N[j]=G,++D===v.length&&x(N)})},U=0;U<v.length;U++)L(U)}},{key:"_addFormElementData",value:function(v){if(this.element.tagName==="FORM"){var x=R(this.element.querySelectorAll("input, textarea, select, button"),!0),I;try{for(x.s();!(I=x.n()).done;){var N=I.value,D=N.getAttribute("name"),L=N.getAttribute("type");if(L&&(L=L.toLowerCase()),!(typeof D>"u"||D===null))if(N.tagName==="SELECT"&&N.hasAttribute("multiple")){var U=R(N.options,!0),K;try{for(U.s();!(K=U.n()).done;){var j=K.value;j.selected&&v.append(D,j.value)}}catch(G){U.e(G)}finally{U.f()}}else(!L||L!=="checkbox"&&L!=="radio"||N.checked)&&v.append(D,N.value)}}catch(G){x.e(G)}finally{x.f()}}}},{key:"_updateFilesUploadProgress",value:function(v,x,I){if(v[0].upload.chunked){var U=v[0],K=this._getChunk(U,x);I?(K.progress=100*I.loaded/I.total,K.total=I.total,K.bytesSent=I.loaded):(K.progress=100,K.bytesSent=K.total),U.upload.progress=0,U.upload.total=0,U.upload.bytesSent=0;for(var j=0;j<U.upload.totalChunkCount;j++)U.upload.chunks[j]&&typeof U.upload.chunks[j].progress<"u"&&(U.upload.progress+=U.upload.chunks[j].progress,U.upload.total+=U.upload.chunks[j].total,U.upload.bytesSent+=U.upload.chunks[j].bytesSent);U.upload.progress=U.upload.progress/U.upload.totalChunkCount,this.emit("uploadprogress",U,U.upload.progress,U.upload.bytesSent)}else{var N=R(v,!0),D;try{for(N.s();!(D=N.n()).done;){var L=D.value;L.upload.total&&L.upload.bytesSent&&L.upload.bytesSent==L.upload.total||(I?(L.upload.progress=100*I.loaded/I.total,L.upload.total=I.total,L.upload.bytesSent=I.loaded):(L.upload.progress=100,L.upload.bytesSent=L.upload.total),this.emit("uploadprogress",L,L.upload.progress,L.upload.bytesSent))}}catch(G){N.e(G)}finally{N.f()}}}},{key:"_finishedUploading",value:function(v,x,I){var N;if(v[0].status!==E.CANCELED&&x.readyState===4){if(x.responseType!=="arraybuffer"&&x.responseType!=="blob"&&(N=x.responseText,x.getResponseHeader("content-type")&&~x.getResponseHeader("content-type").indexOf("application/json")))try{N=JSON.parse(N)}catch(D){I=D,N="Invalid JSON response from server."}this._updateFilesUploadProgress(v,x),200<=x.status&&x.status<300?v[0].upload.chunked?v[0].upload.finishedChunkUpload(this._getChunk(v[0],x),N):this._finished(v,N,I):this._handleUploadError(v,x,N)}}},{key:"_handleUploadError",value:function(v,x,I){if(v[0].status!==E.CANCELED){if(v[0].upload.chunked&&this.options.retryChunks){var N=this._getChunk(v[0],x);if(N.retries++<this.options.retryChunksLimit){this._uploadData(v,[N.dataBlock]);return}else console.warn("Retried this chunk too often. Giving up.")}this._errorProcessing(v,I||this.options.dictResponseError.replace("{{statusCode}}",x.status),x)}}},{key:"submitRequest",value:function(v,x,I){if(v.readyState!=1){console.warn("Cannot send this request because the XMLHttpRequest.readyState is not OPENED.");return}v.send(x)}},{key:"_finished",value:function(v,x,I){var N=R(v,!0),D;try{for(N.s();!(D=N.n()).done;){var L=D.value;L.status=E.SUCCESS,this.emit("success",L,x,I),this.emit("complete",L)}}catch(U){N.e(U)}finally{N.f()}if(this.options.uploadMultiple&&(this.emit("successmultiple",v,x,I),this.emit("completemultiple",v)),this.options.autoProcessQueue)return this.processQueue()}},{key:"_errorProcessing",value:function(v,x,I){var N=R(v,!0),D;try{for(N.s();!(D=N.n()).done;){var L=D.value;L.status=E.ERROR,this.emit("error",L,x,I),this.emit("complete",L)}}catch(U){N.e(U)}finally{N.f()}if(this.options.uploadMultiple&&(this.emit("errormultiple",v,x,I),this.emit("completemultiple",v)),this.options.autoProcessQueue)return this.processQueue()}}],[{key:"initClass",value:function(){this.prototype.Emitter=f,this.prototype.events=["drop","dragstart","dragend","dragenter","dragover","dragleave","addedfile","addedfiles","removedfile","thumbnail","error","errormultiple","processing","processingmultiple","uploadprogress","totaluploadprogress","sending","sendingmultiple","success","successmultiple","canceled","canceledmultiple","complete","completemultiple","reset","maxfilesexceeded","maxfilesreached","queuecomplete"],this.prototype._thumbnailQueue=[],this.prototype._processingThumbnail=!1}},{key:"extend",value:function(v){for(var x=arguments.length,I=new Array(x>1?x-1:0),N=1;N<x;N++)I[N-1]=arguments[N];for(var D=0,L=I;D<L.length;D++){var U=L[D];for(var K in U){var j=U[K];v[K]=j}}return v}},{key:"uuidv4",value:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(v){var x=Math.random()*16|0,I=v==="x"?x:x&3|8;return I.toString(16)})}}]),E}(f);W.initClass(),W.version="5.9.3",W.options={},W.optionsForElement=function(A){if(A.getAttribute("id"))return W.options[de(A.getAttribute("id"))]},W.instances=[],W.forElement=function(A){if(typeof A=="string"&&(A=document.querySelector(A)),(A!=null?A.dropzone:void 0)==null)throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");return A.dropzone},W.autoDiscover=!0,W.discover=function(){var A;if(document.querySelectorAll)A=document.querySelectorAll(".dropzone");else{A=[];var M=function(O){return function(){var v=[],x=R(O,!0),I;try{for(x.s();!(I=x.n()).done;){var N=I.value;/(^| )dropzone($| )/.test(N.className)?v.push(A.push(N)):v.push(void 0)}}catch(D){x.e(D)}finally{x.f()}return v}()};M(document.getElementsByTagName("div")),M(document.getElementsByTagName("form"))}return function(){var E=[],O=R(A,!0),v;try{for(O.s();!(v=O.n()).done;){var x=v.value;W.optionsForElement(x)!==!1?E.push(new W(x)):E.push(void 0)}}catch(I){O.e(I)}finally{O.f()}return E}()},W.blockedBrowsers=[/opera.*(Macintosh|Windows Phone).*version\/12/i],W.isBrowserSupported=function(){var A=!0;if(window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if(!("classList"in document.createElement("a")))A=!1;else{W.blacklistedBrowsers!==void 0&&(W.blockedBrowsers=W.blacklistedBrowsers);var M=R(W.blockedBrowsers,!0),E;try{for(M.s();!(E=M.n()).done;){var O=E.value;if(O.test(navigator.userAgent)){A=!1;continue}}}catch(v){M.e(v)}finally{M.f()}}else A=!1;return A},W.dataURItoBlob=function(A){for(var M=atob(A.split(",")[1]),E=A.split(",")[0].split(":")[1].split(";")[0],O=new ArrayBuffer(M.length),v=new Uint8Array(O),x=0,I=M.length,N=0<=I;N?x<=I:x>=I;N?x++:x--)v[x]=M.charCodeAt(x);return new Blob([O],{type:E})};var le=function(M,E){return M.filter(function(O){return O!==E}).map(function(O){return O})},de=function(M){return M.replace(/[\-_](\w)/g,function(E){return E.charAt(1).toUpperCase()})};W.createElement=function(A){var M=document.createElement("div");return M.innerHTML=A,M.childNodes[0]},W.elementInside=function(A,M){if(A===M)return!0;for(;A=A.parentNode;)if(A===M)return!0;return!1},W.getElement=function(A,M){var E;if(typeof A=="string"?E=document.querySelector(A):A.nodeType!=null&&(E=A),E==null)throw new Error("Invalid `".concat(M,"` option provided. Please provide a CSS selector or a plain HTML element."));return E},W.getElements=function(A,M){var E,O;if(A instanceof Array){O=[];try{var v=R(A,!0),x;try{for(v.s();!(x=v.n()).done;)E=x.value,O.push(this.getElement(E,M))}catch(D){v.e(D)}finally{v.f()}}catch{O=null}}else if(typeof A=="string"){O=[];var I=R(document.querySelectorAll(A),!0),N;try{for(I.s();!(N=I.n()).done;)E=N.value,O.push(E)}catch(D){I.e(D)}finally{I.f()}}else A.nodeType!=null&&(O=[A]);if(O==null||!O.length)throw new Error("Invalid `".concat(M,"` option provided. Please provide a CSS selector, a plain HTML element or a list of those."));return O},W.confirm=function(A,M,E){if(window.confirm(A))return M();if(E!=null)return E()},W.isValidFile=function(A,M){if(!M)return!0;M=M.split(",");var E=A.type,O=E.replace(/\/.*$/,""),v=R(M,!0),x;try{for(v.s();!(x=v.n()).done;){var I=x.value;if(I=I.trim(),I.charAt(0)==="."){if(A.name.toLowerCase().indexOf(I.toLowerCase(),A.name.length-I.length)!==-1)return!0}else if(/\/\*$/.test(I)){if(O===I.replace(/\/.*$/,""))return!0}else if(E===I)return!0}}catch(N){v.e(N)}finally{v.f()}return!1},typeof jQuery<"u"&&jQuery!==null&&(jQuery.fn.dropzone=function(A){return this.each(function(){return new W(this,A)})}),W.ADDED="added",W.QUEUED="queued",W.ACCEPTED=W.QUEUED,W.UPLOADING="uploading",W.PROCESSING=W.UPLOADING,W.CANCELED="canceled",W.ERROR="error",W.SUCCESS="success";var ye=function(M){M.naturalWidth;var E=M.naturalHeight,O=document.createElement("canvas");O.width=1,O.height=E;var v=O.getContext("2d");v.drawImage(M,0,0);for(var x=v.getImageData(1,0,1,E),I=x.data,N=0,D=E,L=E;L>N;){var U=I[(L-1)*4+3];U===0?D=L:N=L,L=D+N>>1}var K=L/E;return K===0?1:K},Ee=function(M,E,O,v,x,I,N,D,L,U){var K=ye(E);return M.drawImage(E,O,v,x,I,N,D,L,U/K)},be=function(){function A(){z(this,A)}return V(A,null,[{key:"initClass",value:function(){this.KEY_STR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}},{key:"encode64",value:function(E){for(var O="",v=void 0,x=void 0,I="",N=void 0,D=void 0,L=void 0,U="",K=0;v=E[K++],x=E[K++],I=E[K++],N=v>>2,D=(v&3)<<4|x>>4,L=(x&15)<<2|I>>6,U=I&63,isNaN(x)?L=U=64:isNaN(I)&&(U=64),O=O+this.KEY_STR.charAt(N)+this.KEY_STR.charAt(D)+this.KEY_STR.charAt(L)+this.KEY_STR.charAt(U),v=x=I="",N=D=L=U="",K<E.length;);return O}},{key:"restore",value:function(E,O){if(!E.match("data:image/jpeg;base64,"))return O;var v=this.decode64(E.replace("data:image/jpeg;base64,","")),x=this.slice2Segments(v),I=this.exifManipulation(O,x);return"data:image/jpeg;base64,".concat(this.encode64(I))}},{key:"exifManipulation",value:function(E,O){var v=this.getExifArray(O),x=this.insertExif(E,v),I=new Uint8Array(x);return I}},{key:"getExifArray",value:function(E){for(var O=void 0,v=0;v<E.length;){if(O=E[v],O[0]===255&O[1]===225)return O;v++}return[]}},{key:"insertExif",value:function(E,O){var v=E.replace("data:image/jpeg;base64,",""),x=this.decode64(v),I=x.indexOf(255,3),N=x.slice(0,I),D=x.slice(I),L=N;return L=L.concat(O),L=L.concat(D),L}},{key:"slice2Segments",value:function(E){for(var O=0,v=[];;){var x;if(E[O]===255&E[O+1]===218)break;if(E[O]===255&E[O+1]===216)O+=2;else{x=E[O+2]*256+E[O+3];var I=O+x+2,N=E.slice(O,I);v.push(N),O=I}if(O>E.length)break}return v}},{key:"decode64",value:function(E){var O=void 0,v=void 0,x="",I=void 0,N=void 0,D=void 0,L="",U=0,K=[],j=/[^A-Za-z0-9\+\/\=]/g;for(j.exec(E)&&console.warn(`There were invalid base64 characters in the input text.
|
|
10
10
|
Valid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='
|
|
11
|
-
Expect errors in decoding.`),E=E.replace(/[^A-Za-z0-9\+\/\=]/g,"");I=this.KEY_STR.indexOf(E.charAt(H++)),N=this.KEY_STR.indexOf(E.charAt(H++)),D=this.KEY_STR.indexOf(E.charAt(H++)),L=this.KEY_STR.indexOf(E.charAt(H++)),O=I<<2|N>>4,v=(N&15)<<4|D>>2,x=(D&3)<<6|L,K.push(O),D!==64&&K.push(v),L!==64&&K.push(x),O=v=x="",I=N=D=L="",H<E.length;);return K}}]),A}();be.initClass();var Te=function(M,E){var O=!1,v=!0,x=M.document,I=x.documentElement,N=x.addEventListener?"addEventListener":"attachEvent",D=x.addEventListener?"removeEventListener":"detachEvent",L=x.addEventListener?"":"on",H=function j(G){if(!(G.type==="readystatechange"&&x.readyState!=="complete")&&((G.type==="load"?M:x)[D](L+G.type,j,!1),!O&&(O=!0)))return E.call(M,G.type||G)},K=function j(){try{I.doScroll("left")}catch{setTimeout(j,50);return}return H("poll")};if(x.readyState!=="complete"){if(x.createEventObject&&I.doScroll){try{v=!M.frameElement}catch{}v&&K()}return x[N](L+"DOMContentLoaded",H,!1),x[N](L+"readystatechange",H,!1),M[N](L+"load",H,!1)}};W._autoDiscoverFunction=function(){if(W.autoDiscover)return W.discover()},Te(window,W._autoDiscoverFunction);function ke(A,M){return typeof A<"u"&&A!==null?M(A):void 0}function Ae(A,M,E){if(typeof A<"u"&&A!==null&&typeof A[M]=="function")return E(A,M)}window.Dropzone=W;var ge=W}(),i}()})})(fl);var kh=fl.exports;const pl=Ch(kh),wh={class:"fallback"},Th=m.createElementVNode("input",{id:"file",type:"file",name:"file",multiple:""},null,-1),Ah={for:"file"},Oh={class:"dz-message","data-dz-message":""},Mh={id:"bd-dropzone-theme",style:{display:"none"}},Ih={class:"dz-preview dz-file-preview"},Nh={class:"dz-details"},Rh=m.createElementVNode("img",{"data-dz-thumbnail":"",class:"dz-image"},null,-1),Dh=m.createElementVNode("div",{class:"dz-filename"},[m.createElementVNode("small",{"data-dz-name":""})],-1),Lh=m.createElementVNode("div",{class:"dz-progress"},[m.createElementVNode("div",{class:"spinner-border text-primary spinner-border-sm",role:"status"},[m.createElementVNode("span",{class:"visually-hidden"},"Loading...")])],-1),Ph={class:"dz-success-mark"},Bh={class:"dz-error-message text-danger"},Fh=m.createElementVNode("small",{"data-dz-errormessage":""},null,-1),hl=m.defineComponent({__name:"BDDropzone",props:{modelValue:{default:[]},buttonText:{default:void 0},multiple:{type:Boolean,default:!1},errorMessage:{default:void 0},fileSizeExceededMessage:{default:void 0},acceptedFiles:{default:".jpg"},url:{default:""},tag:{default:"form"},token:{default:""}},emits:["update:modelValue"],setup(n,{emit:e}){const t=n,r=m.computed(()=>({variant:lo.PRIMARY,size:ot.SM})),o=Nn(t,"modelValue",e);let i=null;pl.autoDiscover=!1,m.watch(()=>t.modelValue,()=>{s()}),m.onMounted(()=>{document.getElementById("dropzone")&&l()});const s=()=>{i&&(i.destroy(),l())},l=()=>{var h;i=new pl("#dropzone",{url:t.url,method:"post",acceptedFiles:t.acceptedFiles,addRemoveLinks:!1,maxFilesize:10,maxFiles:t.multiple?void 0:1,headers:{RequestVerificationToken:t.token},dictResponseError:t.errorMessage,dictFileTooBig:t.fileSizeExceededMessage,previewTemplate:(h=document.querySelector("#bd-dropzone-theme"))==null?void 0:h.innerHTML}),i.on("error",c),i.on("success",a),i.on("removedfile",d)},a=function(h,p){var g;o.value.push({UUID:(g=h.upload)==null?void 0:g.uuid,CorrelationId:p.CorrelationId,Naam:p.Naam}),u(h)},c=function(h){u(h)},u=function(h){const p=h.name;if(!(p.endsWith(".png")||p.endsWith(".jpg")||p.endsWith(".jpeg")||p.endsWith(".gif"))){const g=h.previewElement.getElementsByClassName("icon-file"),y=h.previewElement.getElementsByClassName("dz-image");g[0].classList.remove("d-none"),y[0].classList.add("d-none")}},d=function(h){const p=o.value.findIndex(g=>{var y,S;return((y=g.upload)==null?void 0:y.uuid)===((S=h.upload)==null?void 0:S.uuid)});p!==-1&&o.value.splice(p,1)},f=m.computed(()=>t.tag??"form");return(h,p)=>(m.openBlock(),m.createElementBlock(m.Fragment,null,[(m.openBlock(),m.createBlock(m.resolveDynamicComponent(f.value),{id:"dropzone",class:"dropzone bd-dropzone",enctype:"multipart/form-data"},{default:m.withCtx(()=>[m.createElementVNode("div",wh,[Th,m.createTextVNode(" test "),m.createElementVNode("label",Ah,[m.createVNode(m.unref(Er)),m.createTextVNode(" "+m.toDisplayString(t.buttonText),1)])]),m.createElementVNode("div",Oh,[m.createVNode(m.unref(Ut),m.normalizeProps(m.guardReactiveProps(r.value)),{default:m.withCtx(()=>[m.createVNode(m.unref(Er)),m.createTextVNode(" "+m.toDisplayString(t.buttonText),1)]),_:1},16)])]),_:1})),m.createElementVNode("div",Mh,[m.createElementVNode("div",Ih,[m.createElementVNode("div",Nh,[Rh,m.createVNode(m.unref(Fi),{"data-dz-thumbnail":"",class:"d-none"}),Dh,m.createVNode(m.unref(Ut),{class:"dz-remove",alt:"Click me to remove the file.","data-dz-remove":""},{default:m.withCtx(()=>[m.createVNode(m.unref(Bi))]),_:1})]),Lh,m.createElementVNode("div",Ph,[m.createVNode(m.unref(oo))]),m.createElementVNode("div",Bh,[m.createVNode(m.unref(io)),Fh])])])],64))}});function Ze(n){this.content=n}Ze.prototype={constructor:Ze,find:function(n){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===n)return e;return-1},get:function(n){var e=this.find(n);return e==-1?void 0:this.content[e+1]},update:function(n,e,t){var r=t&&t!=n?this.remove(t):this,o=r.find(n),i=r.content.slice();return o==-1?i.push(t||n,e):(i[o+1]=e,t&&(i[o]=t)),new Ze(i)},remove:function(n){var e=this.find(n);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new Ze(t)},addToStart:function(n,e){return new Ze([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new Ze(t)},addBefore:function(n,e,t){var r=this.remove(e),o=r.content.slice(),i=r.find(n);return o.splice(i==-1?o.length:i,0,e,t),new Ze(o)},forEach:function(n){for(var e=0;e<this.content.length;e+=2)n(this.content[e],this.content[e+1])},prepend:function(n){return n=Ze.from(n),n.size?new Ze(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=Ze.from(n),n.size?new Ze(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=Ze.from(n);for(var t=0;t<n.content.length;t+=2)e=e.remove(n.content[t]);return e},toObject:function(){var n={};return this.forEach(function(e,t){n[e]=t}),n},get size(){return this.content.length>>1}},Ze.from=function(n){if(n instanceof Ze)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new Ze(e)};function ml(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let o=n.child(r),i=e.child(r);if(o==i){t+=o.nodeSize;continue}if(!o.sameMarkup(i))return t;if(o.isText&&o.text!=i.text){for(let s=0;o.text[s]==i.text[s];s++)t++;return t}if(o.content.size||i.content.size){let s=ml(o.content,i.content,t+1);if(s!=null)return s}t+=o.nodeSize}}function gl(n,e,t,r){for(let o=n.childCount,i=e.childCount;;){if(o==0||i==0)return o==i?null:{a:t,b:r};let s=n.child(--o),l=e.child(--i),a=s.nodeSize;if(s==l){t-=a,r-=a;continue}if(!s.sameMarkup(l))return{a:t,b:r};if(s.isText&&s.text!=l.text){let c=0,u=Math.min(s.text.length,l.text.length);for(;c<u&&s.text[s.text.length-c-1]==l.text[l.text.length-c-1];)c++,t--,r--;return{a:t,b:r}}if(s.content.size||l.content.size){let c=gl(s.content,l.content,t-1,r-1);if(c)return c}t-=a,r-=a}}class oe{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,t,r,o=0,i){for(let s=0,l=0;l<t;s++){let a=this.content[s],c=l+a.nodeSize;if(c>e&&r(a,o+l,i||null,s)!==!1&&a.content.size){let u=l+1;a.nodesBetween(Math.max(0,e-u),Math.min(a.content.size,t-u),r,o+u)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,o){let i="",s=!0;return this.nodesBetween(e,t,(l,a)=>{l.isText?(i+=l.text.slice(Math.max(e,a)-a,t-a),s=!r):l.isLeaf?(o?i+=typeof o=="function"?o(l):o:l.type.spec.leafText&&(i+=l.type.spec.leafText(l)),s=!r):!s&&l.isBlock&&(i+=r,s=!0)},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,o=this.content.slice(),i=0;for(t.isText&&t.sameMarkup(r)&&(o[o.length-1]=t.withText(t.text+r.text),i=1);i<e.content.length;i++)o.push(e.content[i]);return new oe(o,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],o=0;if(t>e)for(let i=0,s=0;s<t;i++){let l=this.content[i],a=s+l.nodeSize;a>e&&((s<e||a>t)&&(l.isText?l=l.cut(Math.max(0,e-s),Math.min(l.text.length,t-s)):l=l.cut(Math.max(0,e-s-1),Math.min(l.content.size,t-s-1))),r.push(l),o+=l.nodeSize),s=a}return new oe(r,o)}cutByIndex(e,t){return e==t?oe.empty:e==0&&t==this.content.length?this:new oe(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let o=this.content.slice(),i=this.size+t.nodeSize-r.nodeSize;return o[e]=t,new oe(o,i)}addToStart(e){return new oe([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new oe(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))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(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,r=0;t<this.content.length;t++){let o=this.content[t];e(o,r,t),r+=o.nodeSize}}findDiffStart(e,t=0){return ml(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return gl(this,e,t,r)}findIndex(e,t=-1){if(e==0)return po(0,e);if(e==this.size)return po(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let r=0,o=0;;r++){let i=this.child(r),s=o+i.nodeSize;if(s>=e)return s==e||t>0?po(r+1,s):po(r,o);o=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return oe.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new oe(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return oe.empty;let t,r=0;for(let o=0;o<e.length;o++){let i=e[o];r+=i.nodeSize,o&&i.isText&&e[o-1].sameMarkup(i)?(t||(t=e.slice(0,o)),t[t.length-1]=i.withText(t[t.length-1].text+i.text)):t&&t.push(i)}return new oe(t||e,r)}static from(e){if(!e)return oe.empty;if(e instanceof oe)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new oe([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}oe.empty=new oe([],0);const Zi={index:0,offset:0};function po(n,e){return Zi.index=n,Zi.offset=e,Zi}function ho(n,e){if(n===e)return!0;if(!(n&&typeof n=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(n);if(Array.isArray(e)!=t)return!1;if(t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!ho(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!ho(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let Le=class za{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let o=0;o<e.length;o++){let i=e[o];if(this.eq(i))return e;if(this.type.excludes(i.type))t||(t=e.slice(0,o));else{if(i.type.excludes(this.type))return e;!r&&i.type.rank>this.type.rank&&(t||(t=e.slice(0,o)),t.push(this),r=!0),t&&t.push(i)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&ho(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[t.type];if(!r)throw new RangeError(`There is no mark type ${t.type} in this schema`);return r.create(t.attrs)}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(t[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return za.none;if(e instanceof za)return[e];let t=e.slice();return t.sort((r,o)=>r.type.rank-o.type.rank),t}};Le.none=[];class mo extends Error{}class fe{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=vl(this.content,e+this.openStart,t);return r&&new fe(r,this.openStart,this.openEnd)}removeBetween(e,t){return new fe(yl(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return fe.empty;let r=t.openStart||0,o=t.openEnd||0;if(typeof r!="number"||typeof o!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new fe(oe.fromJSON(e,t.content),r,o)}static maxOpen(e,t=!0){let r=0,o=0;for(let i=e.firstChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.lastChild)o++;return new fe(e,r,o)}}fe.empty=new fe(oe.empty,0,0);function yl(n,e,t){let{index:r,offset:o}=n.findIndex(e),i=n.maybeChild(r),{index:s,offset:l}=n.findIndex(t);if(o==e||i.isText){if(l!=t&&!n.child(s).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=s)throw new RangeError("Removing non-flat range");return n.replaceChild(r,i.copy(yl(i.content,e-o-1,t-o-1)))}function vl(n,e,t,r){let{index:o,offset:i}=n.findIndex(e),s=n.maybeChild(o);if(i==e||s.isText)return r&&!r.canReplace(o,o,t)?null:n.cut(0,e).append(t).append(n.cut(e));let l=vl(s.content,e-i-1,t);return l&&n.replaceChild(o,s.copy(l))}function Vh(n,e,t){if(t.openStart>n.depth)throw new mo("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new mo("Inconsistent open depths");return bl(n,e,t,0)}function bl(n,e,t,r){let o=n.index(r),i=n.node(r);if(o==e.index(r)&&r<n.depth-t.openStart){let s=bl(n,e,t,r+1);return i.copy(i.content.replaceChild(o,s))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&n.depth==r&&e.depth==r){let s=n.parent,l=s.content;return Ln(s,l.cut(0,n.parentOffset).append(t.content).append(l.cut(e.parentOffset)))}else{let{start:s,end:l}=zh(t,n);return Ln(i,Sl(n,s,l,e,r))}else return Ln(i,go(n,e,r))}function xl(n,e){if(!e.type.compatibleContent(n.type))throw new mo("Cannot join "+e.type.name+" onto "+n.type.name)}function Qi(n,e,t){let r=n.node(t);return xl(r,e.node(t)),r}function Dn(n,e){let t=e.length-1;t>=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function kr(n,e,t,r){let o=(e||n).node(t),i=0,s=e?e.index(t):o.childCount;n&&(i=n.index(t),n.depth>t?i++:n.textOffset&&(Dn(n.nodeAfter,r),i++));for(let l=i;l<s;l++)Dn(o.child(l),r);e&&e.depth==t&&e.textOffset&&Dn(e.nodeBefore,r)}function Ln(n,e){return n.type.checkContent(e),n.copy(e)}function Sl(n,e,t,r,o){let i=n.depth>o&&Qi(n,e,o+1),s=r.depth>o&&Qi(t,r,o+1),l=[];return kr(null,n,o,l),i&&s&&e.index(o)==t.index(o)?(xl(i,s),Dn(Ln(i,Sl(n,e,t,r,o+1)),l)):(i&&Dn(Ln(i,go(n,e,o+1)),l),kr(e,t,o,l),s&&Dn(Ln(s,go(t,r,o+1)),l)),kr(r,null,o,l),new oe(l)}function go(n,e,t){let r=[];if(kr(null,n,t,r),n.depth>t){let o=Qi(n,e,t+1);Dn(Ln(o,go(n,e,t+1)),r)}return kr(e,null,t,r),new oe(r)}function zh(n,e){let t=e.depth-n.openStart,o=e.node(t).copy(n.content);for(let i=t-1;i>=0;i--)o=e.node(i).copy(oe.from(o));return{start:o.resolveNoCache(n.openStart+t),end:o.resolveNoCache(o.content.size-n.openEnd-t)}}class wr{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],o=e.child(t);return r?e.child(t).cut(r):o}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],o=t==0?0:this.path[t*3-1]+1;for(let i=0;i<e;i++)o+=r.child(i).nodeSize;return o}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return Le.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),o=e.maybeChild(t);if(!r){let l=r;r=o,o=l}let i=r.marks;for(var s=0;s<i.length;s++)i[s].type.spec.inclusive===!1&&(!o||!i[s].isInSet(o.marks))&&(i=i[s--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,o=e.parent.maybeChild(e.index());for(var i=0;i<r.length;i++)r[i].type.spec.inclusive===!1&&(!o||!r[i].isInSet(o.marks))&&(r=r[i--].removeFromSet(r));return r}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new yo(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],o=0,i=t;for(let s=e;;){let{index:l,offset:a}=s.content.findIndex(i),c=i-a;if(r.push(s,l,o+a),!c||(s=s.child(l),s.isText))break;i=c-1,o+=a+1}return new wr(t,r,i)}static resolveCached(e,t){for(let o=0;o<_i.length;o++){let i=_i[o];if(i.pos==t&&i.doc==e)return i}let r=_i[qi]=wr.resolve(e,t);return qi=(qi+1)%$h,r}}let _i=[],qi=0,$h=12;class yo{constructor(e,t,r){this.$from=e,this.$to=t,this.depth=r}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)}}const Hh=Object.create(null);let Pn=class $a{constructor(e,t,r,o=Le.none){this.type=e,this.attrs=t,this.marks=o,this.content=r||oe.empty}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,r,o=0){this.content.nodesBetween(e,t,r,o,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,r,o){return this.content.textBetween(e,t,r,o)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,r){return this.type==e&&ho(this.attrs,t||e.defaultAttrs||Hh)&&Le.sameSet(this.marks,r||Le.none)}copy(e=null){return e==this.content?this:new $a(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new $a(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,r=!1){if(e==t)return fe.empty;let o=this.resolve(e),i=this.resolve(t),s=r?0:o.sharedDepth(t),l=o.start(s),c=o.node(s).content.cut(o.pos-l,i.pos-l);return new fe(c,o.depth-s,i.depth-s)}replace(e,t,r){return Vh(this.resolve(e),this.resolve(t),r)}nodeAt(e){for(let t=this;;){let{index:r,offset:o}=t.content.findIndex(e);if(t=t.maybeChild(r),!t)return null;if(o==e||t.isText)return t;e-=o+1}}childAfter(e){let{index:t,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(t),index:t,offset:r};let o=this.content.child(t-1);return{node:o,index:t-1,offset:r-o.nodeSize}}resolve(e){return wr.resolveCached(this,e)}resolveNoCache(e){return wr.resolve(this,e)}rangeHasMark(e,t,r){let o=!1;return t>e&&this.nodesBetween(e,t,i=>(r.isInSet(i.marks)&&(o=!0),!o)),o}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);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),El(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=oe.empty,o=0,i=r.childCount){let s=this.contentMatchAt(e).matchFragment(r,o,i),l=s&&s.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let a=o;a<i;a++)if(!this.type.allowsMarks(r.child(a).marks))return!1;return!0}canReplaceWith(e,t,r,o){if(o&&!this.type.allowsMarks(o))return!1;let i=this.contentMatchAt(e).matchType(r),s=i&&i.matchFragment(this.content,t);return s?s.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content);let e=Le.none;for(let t=0;t<this.marks.length;t++)e=this.marks[t].addToSet(e);if(!Le.sameSet(e,this.marks))throw new 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 e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r=null;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let o=oe.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,o,r)}};Pn.prototype.text=void 0;class vo extends Pn{constructor(e,t,r,o){if(super(e,t,null,o),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):El(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new vo(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new vo(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function El(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class Bn{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new Uh(e,t);if(r.next==null)return Bn.empty;let o=Cl(r);r.next&&r.err("Unexpected trailing text");let i=Xh(Yh(o));return Zh(i,r),i}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,r=e.childCount){let o=this;for(let i=t;o&&i<r;i++)o=o.matchType(e.child(i).type);return o}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let r=0;r<e.next.length;r++)if(this.next[t].type==e.next[r].type)return!0;return!1}fillBefore(e,t=!1,r=0){let o=[this];function i(s,l){let a=s.matchFragment(e,r);if(a&&(!t||a.validEnd))return oe.from(l.map(c=>c.createAndFill()));for(let c=0;c<s.next.length;c++){let{type:u,next:d}=s.next[c];if(!(u.isText||u.hasRequiredAttrs())&&o.indexOf(d)==-1){o.push(d);let f=i(d,l.concat(u));if(f)return f}}return null}return i(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let o=r.shift(),i=o.match;if(i.matchType(e)){let s=[];for(let l=o;l.type;l=l.via)s.push(l.type);return s.reverse()}for(let s=0;s<i.next.length;s++){let{type:l,next:a}=i.next[s];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in t)&&(!o.type||a.validEnd)&&(r.push({match:l.contentMatch,type:l,via:o}),t[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let o=0;o<r.next.length;o++)e.indexOf(r.next[o].next)==-1&&t(r.next[o].next)}return t(this),e.map((r,o)=>{let i=o+(r.validEnd?"*":" ")+" ";for(let s=0;s<r.next.length;s++)i+=(s?", ":"")+r.next[s].type.name+"->"+e.indexOf(r.next[s].next);return i}).join(`
|
|
12
|
-
`)}}Bn.empty=new Bn(!0);class Uh{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.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(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function Cl(n){let e=[];do e.push(jh(n));while(n.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function jh(n){let e=[];do e.push(Wh(n));while(n.next&&n.next!=")"&&n.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function Wh(n){let e=Jh(n);for(;;)if(n.eat("+"))e={type:"plus",expr:e};else if(n.eat("*"))e={type:"star",expr:e};else if(n.eat("?"))e={type:"opt",expr:e};else if(n.eat("{"))e=Kh(n,e);else break;return e}function kl(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let e=Number(n.next);return n.pos++,e}function Kh(n,e){let t=kl(n),r=t;return n.eat(",")&&(n.next!="}"?r=kl(n):r=-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:t,max:r,expr:e}}function Gh(n,e){let t=n.nodeTypes,r=t[e];if(r)return[r];let o=[];for(let i in t){let s=t[i];s.groups.indexOf(e)>-1&&o.push(s)}return o.length==0&&n.err("No node type or group '"+e+"' found"),o}function Jh(n){if(n.eat("(")){let e=Cl(n);return n.eat(")")||n.err("Missing closing paren"),e}else if(/\W/.test(n.next))n.err("Unexpected token '"+n.next+"'");else{let e=Gh(n,n.next).map(t=>(n.inline==null?n.inline=t.isInline:n.inline!=t.isInline&&n.err("Mixing inline and block content"),{type:"name",value:t}));return n.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function Yh(n){let e=[[]];return o(i(n,0),t()),e;function t(){return e.push([])-1}function r(s,l,a){let c={term:a,to:l};return e[s].push(c),c}function o(s,l){s.forEach(a=>a.to=l)}function i(s,l){if(s.type=="choice")return s.exprs.reduce((a,c)=>a.concat(i(c,l)),[]);if(s.type=="seq")for(let a=0;;a++){let c=i(s.exprs[a],l);if(a==s.exprs.length-1)return c;o(c,l=t())}else if(s.type=="star"){let a=t();return r(l,a),o(i(s.expr,a),a),[r(a)]}else if(s.type=="plus"){let a=t();return o(i(s.expr,l),a),o(i(s.expr,a),a),[r(a)]}else{if(s.type=="opt")return[r(l)].concat(i(s.expr,l));if(s.type=="range"){let a=l;for(let c=0;c<s.min;c++){let u=t();o(i(s.expr,a),u),a=u}if(s.max==-1)o(i(s.expr,a),a);else for(let c=s.min;c<s.max;c++){let u=t();r(a,u),o(i(s.expr,a),u),a=u}return[r(a)]}else{if(s.type=="name")return[r(l,void 0,s.value)];throw new Error("Unknown expr type")}}}}function wl(n,e){return e-n}function Tl(n,e){let t=[];return r(e),t.sort(wl);function r(o){let i=n[o];if(i.length==1&&!i[0].term)return r(i[0].to);t.push(o);for(let s=0;s<i.length;s++){let{term:l,to:a}=i[s];!l&&t.indexOf(a)==-1&&r(a)}}}function Xh(n){let e=Object.create(null);return t(Tl(n,0));function t(r){let o=[];r.forEach(s=>{n[s].forEach(({term:l,to:a})=>{if(!l)return;let c;for(let u=0;u<o.length;u++)o[u][0]==l&&(c=o[u][1]);Tl(n,a).forEach(u=>{c||o.push([l,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let i=e[r.join(",")]=new Bn(r.indexOf(n.length-1)>-1);for(let s=0;s<o.length;s++){let l=o[s][1].sort(wl);i.next.push({type:o[s][0],next:e[l.join(",")]||t(l)})}return i}}function Zh(n,e){for(let t=0,r=[n];t<r.length;t++){let o=r[t],i=!o.validEnd,s=[];for(let l=0;l<o.next.length;l++){let{type:a,next:c}=o.next[l];s.push(a.name),i&&!(a.isText||a.hasRequiredAttrs())&&(i=!1),r.indexOf(c)==-1&&r.push(c)}i&&e.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function Al(n){let e=Object.create(null);for(let t in n){let r=n[t];if(!r.hasDefault)return null;e[t]=r.default}return e}function Ol(n,e){let t=Object.create(null);for(let r in n){let o=e&&e[r];if(o===void 0){let i=n[r];if(i.hasDefault)o=i.default;else throw new RangeError("No value supplied for attribute "+r)}t[r]=o}return t}function Ml(n){let e=Object.create(null);if(n)for(let t in n)e[t]=new Qh(n[t]);return e}let Il=class mf{constructor(e,t,r){this.name=e,this.schema=t,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=Ml(r.attrs),this.defaultAttrs=Al(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Bn.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:Ol(this.attrs,e)}create(e=null,t,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Pn(this,this.computeAttrs(e),oe.from(t),Le.setFrom(r))}createChecked(e=null,t,r){return t=oe.from(t),this.checkContent(t),new Pn(this,this.computeAttrs(e),t,Le.setFrom(r))}createAndFill(e=null,t,r){if(e=this.computeAttrs(e),t=oe.from(t),t.size){let s=this.contentMatch.fillBefore(t);if(!s)return null;t=s.append(t)}let o=this.contentMatch.matchFragment(t),i=o&&o.fillBefore(oe.empty,!0);return i?new Pn(this,e,t.append(i),Le.setFrom(r)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let t;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?t&&t.push(e[r]):t||(t=e.slice(0,r));return t?t.length?t:Le.none:e}static compile(e,t){let r=Object.create(null);e.forEach((i,s)=>r[i]=new mf(i,t,s));let o=t.spec.topNode||"doc";if(!r[o])throw new RangeError("Schema is missing its top node type ('"+o+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};class Qh{constructor(e){this.hasDefault=Object.prototype.hasOwnProperty.call(e,"default"),this.default=e.default}get isRequired(){return!this.hasDefault}}class bo{constructor(e,t,r,o){this.name=e,this.rank=t,this.schema=r,this.spec=o,this.attrs=Ml(o.attrs),this.excluded=null;let i=Al(this.attrs);this.instance=i?new Le(this,i):null}create(e=null){return!e&&this.instance?this.instance:new Le(this,Ol(this.attrs,e))}static compile(e,t){let r=Object.create(null),o=0;return e.forEach((i,s)=>r[i]=new bo(i,o++,t,s)),r}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}excludes(e){return this.excluded.indexOf(e)>-1}}class _h{constructor(e){this.cached=Object.create(null);let t=this.spec={};for(let o in e)t[o]=e[o];t.nodes=Ze.from(e.nodes),t.marks=Ze.from(e.marks||{}),this.nodes=Il.compile(this.spec.nodes,this),this.marks=bo.compile(this.spec.marks,this);let r=Object.create(null);for(let o in this.nodes){if(o in this.marks)throw new RangeError(o+" can not be both a node and a mark");let i=this.nodes[o],s=i.spec.content||"",l=i.spec.marks;i.contentMatch=r[s]||(r[s]=Bn.parse(s,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.markSet=l=="_"?null:l?Nl(this,l.split(" ")):l==""||!i.inlineContent?[]:null}for(let o in this.marks){let i=this.marks[o],s=i.spec.excludes;i.excluded=s==null?[i]:s==""?[]:Nl(this,s.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(e,t=null,r,o){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof Il){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(t,r,o)}text(e,t){let r=this.nodes.text;return new vo(r,r.defaultAttrs,e,Le.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeFromJSON(e){return Pn.fromJSON(this,e)}markFromJSON(e){return Le.fromJSON(this,e)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function Nl(n,e){let t=[];for(let r=0;r<e.length;r++){let o=e[r],i=n.marks[o],s=i;if(i)t.push(i);else for(let l in n.marks){let a=n.marks[l];(o=="_"||a.spec.group&&a.spec.group.split(" ").indexOf(o)>-1)&&t.push(s=a)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return t}class Zn{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[],t.forEach(r=>{r.tag?this.tags.push(r):r.style&&this.styles.push(r)}),this.normalizeLists=!this.tags.some(r=>{if(!/^(ul|ol)\b/.test(r.tag)||!r.node)return!1;let o=e.nodes[r.node];return o.contentMatch.matchType(o)})}parse(e,t={}){let r=new Pl(this,t,!1);return r.addAll(e,t.from,t.to),r.finish()}parseSlice(e,t={}){let r=new Pl(this,t,!0);return r.addAll(e,t.from,t.to),fe.maxOpen(r.finish())}matchTag(e,t,r){for(let o=r?this.tags.indexOf(r)+1:0;o<this.tags.length;o++){let i=this.tags[o];if(tm(e,i.tag)&&(i.namespace===void 0||e.namespaceURI==i.namespace)&&(!i.context||t.matchesContext(i.context))){if(i.getAttrs){let s=i.getAttrs(e);if(s===!1)continue;i.attrs=s||void 0}return i}}}matchStyle(e,t,r,o){for(let i=o?this.styles.indexOf(o)+1:0;i<this.styles.length;i++){let s=this.styles[i],l=s.style;if(!(l.indexOf(e)!=0||s.context&&!r.matchesContext(s.context)||l.length>e.length&&(l.charCodeAt(e.length)!=61||l.slice(e.length+1)!=t))){if(s.getAttrs){let a=s.getAttrs(t);if(a===!1)continue;s.attrs=a||void 0}return s}}}static schemaRules(e){let t=[];function r(o){let i=o.priority==null?50:o.priority,s=0;for(;s<t.length;s++){let l=t[s];if((l.priority==null?50:l.priority)<i)break}t.splice(s,0,o)}for(let o in e.marks){let i=e.marks[o].spec.parseDOM;i&&i.forEach(s=>{r(s=Bl(s)),s.mark||s.ignore||s.clearMark||(s.mark=o)})}for(let o in e.nodes){let i=e.nodes[o].spec.parseDOM;i&&i.forEach(s=>{r(s=Bl(s)),s.node||s.ignore||s.mark||(s.node=o)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Zn(e,Zn.schemaRules(e)))}}const Rl={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},qh={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Dl={ol:!0,ul:!0},xo=1,So=2,Tr=4;function Ll(n,e,t){return e!=null?(e?xo:0)|(e==="full"?So:0):n&&n.whitespace=="pre"?xo|So:t&~Tr}class Eo{constructor(e,t,r,o,i,s,l){this.type=e,this.attrs=t,this.marks=r,this.pendingMarks=o,this.solid=i,this.options=l,this.content=[],this.activeMarks=Le.none,this.stashMarks=[],this.match=s||(l&Tr?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(oe.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let r=this.type.contentMatch,o;return(o=r.findWrapping(e.type))?(this.match=r,o):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&xo)){let r=this.content[this.content.length-1],o;if(r&&r.isText&&(o=/[ \t\r\n\u000c]+$/.exec(r.text))){let i=r;r.text.length==o[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-o[0].length))}}let t=oe.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(oe.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}popFromStashMark(e){for(let t=this.stashMarks.length-1;t>=0;t--)if(e.eq(this.stashMarks[t]))return this.stashMarks.splice(t,1)[0]}applyPending(e){for(let t=0,r=this.pendingMarks;t<r.length;t++){let o=r[t];(this.type?this.type.allowsMarkType(o.type):rm(o.type,e))&&!o.isInSet(this.activeMarks)&&(this.activeMarks=o.addToSet(this.activeMarks),this.pendingMarks=o.removeFromSet(this.pendingMarks))}}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!Rl.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class Pl{constructor(e,t,r){this.parser=e,this.options=t,this.isOpen=r,this.open=0;let o=t.topNode,i,s=Ll(null,t.preserveWhitespace,0)|(r?Tr:0);o?i=new Eo(o.type,o.attrs,Le.none,Le.none,!0,t.topMatch||o.type.contentMatch,s):r?i=new Eo(null,null,Le.none,Le.none,!0,null,s):i=new Eo(e.schema.topNodeType,null,Le.none,Le.none,!0,null,s),this.nodes=[i],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e){e.nodeType==3?this.addTextNode(e):e.nodeType==1&&this.addElement(e)}withStyleRules(e,t){let r=e.getAttribute("style");if(!r)return t();let o=this.readStyles(nm(r));if(!o)return;let[i,s]=o,l=this.top;for(let a=0;a<s.length;a++)this.removePendingMark(s[a],l);for(let a=0;a<i.length;a++)this.addPendingMark(i[a]);t();for(let a=0;a<i.length;a++)this.removePendingMark(i[a],l);for(let a=0;a<s.length;a++)this.addPendingMark(s[a])}addTextNode(e){let t=e.nodeValue,r=this.top;if(r.options&So||r.inlineContext(e)||/[^ \t\r\n\u000c]/.test(t)){if(r.options&xo)r.options&So?t=t.replace(/\r\n?/g,`
|
|
13
|
-
`):t=t.replace(/\r?\n|\r/g," ");else if(t=t.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(t)&&this.open==this.nodes.length-1){let o=r.content[r.content.length-1],i=e.previousSibling;(!o||i&&i.nodeName=="BR"||o.isText&&/[ \t\r\n\u000c]$/.test(o.text))&&(t=t.slice(1))}t&&this.insertNode(this.parser.schema.text(t)),this.findInText(e)}else this.findInside(e)}addElement(e,t){let r=e.nodeName.toLowerCase(),o
|
|
14
|
-
`))}ignoreFallback(e){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"))}readStyles(e){let t=Le.none,r=Le.none;for(let o=0;o<e.length;o+=2)for(let i=void 0;;){let s=this.parser.matchStyle(e[o],e[o+1],this,i);if(!s)break;if(s.ignore)return null;if(s.clearMark?this.top.pendingMarks.concat(this.top.activeMarks).forEach(l=>{s.clearMark(l)&&(r=l.addToSet(r))}):t=this.parser.schema.marks[s.mark].create(s.attrs).addToSet(t),s.consuming===!1)i=s;else break}return[t,r]}addElementByRule(e,t,r){let o,i,s;t.node?(i=this.parser.schema.nodes[t.node],i.isLeaf?this.insertNode(i.create(t.attrs))||this.leafFallback(e):o=this.enter(i,t.attrs||null,t.preserveWhitespace)):(s=this.parser.schema.marks[t.mark].create(t.attrs),this.addPendingMark(s));let l=this.top;if(i&&i.isLeaf)this.findInside(e);else if(r)this.addElement(e,r);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(a=>this.insertNode(a));else{let a=e;typeof t.contentElement=="string"?a=e.querySelector(t.contentElement):typeof t.contentElement=="function"?a=t.contentElement(e):t.contentElement&&(a=t.contentElement),this.findAround(e,a,!0),this.addAll(a)}o&&this.sync(l)&&this.open--,s&&this.removePendingMark(s,l)}addAll(e,t,r){let o=t||0;for(let i=t?e.childNodes[t]:e.firstChild,s=r==null?null:e.childNodes[r];i!=s;i=i.nextSibling,++o)this.findAtPoint(e,o),this.addDOM(i);this.findAtPoint(e,o)}findPlace(e){let t,r;for(let o=this.open;o>=0;o--){let i=this.nodes[o],s=i.findWrapping(e);if(s&&(!t||t.length>s.length)&&(t=s,r=i,!s.length)||i.solid)break}if(!t)return!1;this.sync(r);for(let o=0;o<t.length;o++)this.enterInner(t[o],null,!1);return!0}insertNode(e){if(e.isInline&&this.needsBlock&&!this.top.type){let t=this.textblockFromContext();t&&this.enterInner(t)}if(this.findPlace(e)){this.closeExtra();let t=this.top;t.applyPending(e.type),t.match&&(t.match=t.match.matchType(e.type));let r=t.activeMarks;for(let o=0;o<e.marks.length;o++)(!t.type||t.type.allowsMarkType(e.marks[o].type))&&(r=e.marks[o].addToSet(r));return t.content.push(e.mark(r)),!0}return!1}enter(e,t,r){let o=this.findPlace(e.create(t));return o&&this.enterInner(e,t,!0,r),o}enterInner(e,t=null,r=!1,o){this.closeExtra();let i=this.top;i.applyPending(e),i.match=i.match&&i.match.matchType(e);let s=Ll(e,o,i.options);i.options&Tr&&i.content.length==0&&(s|=Tr),this.nodes.push(new Eo(e,t,i.activeMarks,i.pendingMarks,r,null,s)),this.open++}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));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(e){for(let t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let r=this.nodes[t].content;for(let o=r.length-1;o>=0;o--)e+=r[o].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==t&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].pos==null&&e.nodeType==1&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,r){if(e!=t&&this.find)for(let o=0;o<this.find.length;o++)this.find[o].pos==null&&e.nodeType==1&&e.contains(this.find[o].node)&&t.compareDocumentPosition(this.find[o].node)&(r?2:4)&&(this.find[o].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),r=this.options.context,o=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(o?0:1),s=(l,a)=>{for(;l>=0;l--){let c=t[l];if(c==""){if(l==t.length-1||l==0)continue;for(;a>=i;a--)if(s(l-1,a))return!0;return!1}else{let u=a>0||a==0&&o?this.nodes[a].type:r&&a>=i?r.node(a-i).type:null;if(!u||u.name!=c&&u.groups.indexOf(c)==-1)return!1;a--}}return!0};return s(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let r=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let t in this.parser.schema.nodes){let r=this.parser.schema.nodes[t];if(r.isTextblock&&r.defaultAttrs)return r}}addPendingMark(e){let t=om(e,this.top.pendingMarks);t&&this.top.stashMarks.push(t),this.top.pendingMarks=e.addToSet(this.top.pendingMarks)}removePendingMark(e,t){for(let r=this.open;r>=0;r--){let o=this.nodes[r];if(o.pendingMarks.lastIndexOf(e)>-1)o.pendingMarks=e.removeFromSet(o.pendingMarks);else{o.activeMarks=e.removeFromSet(o.activeMarks);let s=o.popFromStashMark(e);s&&o.type&&o.type.allowsMarkType(s.type)&&(o.activeMarks=s.addToSet(o.activeMarks))}if(o==t)break}}}function em(n){for(let e=n.firstChild,t=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&Dl.hasOwnProperty(r)&&t?(t.appendChild(e),e=t):r=="li"?t=e:r&&(t=null)}}function tm(n,e){return(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,e)}function nm(n){let e=/\s*([\w-]+)\s*:\s*([^;]+)/g,t,r=[];for(;t=e.exec(n);)r.push(t[1],t[2].trim());return r}function Bl(n){let e={};for(let t in n)e[t]=n[t];return e}function rm(n,e){let t=e.schema.nodes;for(let r in t){let o=t[r];if(!o.allowsMarkType(n))continue;let i=[],s=l=>{i.push(l);for(let a=0;a<l.edgeCount;a++){let{type:c,next:u}=l.edge(a);if(c==e||i.indexOf(u)<0&&s(u))return!0}};if(s(o.contentMatch))return!0}}function om(n,e){for(let t=0;t<e.length;t++)if(n.eq(e[t]))return e[t]}class jt{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},r){r||(r=es(t).createDocumentFragment());let o=r,i=[];return e.forEach(s=>{if(i.length||s.marks.length){let l=0,a=0;for(;l<i.length&&a<s.marks.length;){let c=s.marks[a];if(!this.marks[c.type.name]){a++;continue}if(!c.eq(i[l][0])||c.type.spec.spanning===!1)break;l++,a++}for(;l<i.length;)o=i.pop()[1];for(;a<s.marks.length;){let c=s.marks[a++],u=this.serializeMark(c,s.isInline,t);u&&(i.push([c,o]),o.appendChild(u.dom),o=u.contentDOM||u.dom)}}o.appendChild(this.serializeNodeInner(s,t))}),r}serializeNodeInner(e,t){let{dom:r,contentDOM:o}=jt.renderSpec(es(t),this.nodes[e.type.name](e));if(o){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,o)}return r}serializeNode(e,t={}){let r=this.serializeNodeInner(e,t);for(let o=e.marks.length-1;o>=0;o--){let i=this.serializeMark(e.marks[o],e.isInline,t);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(e,t,r={}){let o=this.marks[e.type.name];return o&&jt.renderSpec(es(r),o(e,t))}static renderSpec(e,t,r=null){if(typeof t=="string")return{dom:e.createTextNode(t)};if(t.nodeType!=null)return{dom:t};if(t.dom&&t.dom.nodeType!=null)return t;let o=t[0],i=o.indexOf(" ");i>0&&(r=o.slice(0,i),o=o.slice(i+1));let s,l=r?e.createElementNS(r,o):e.createElement(o),a=t[1],c=1;if(a&&typeof a=="object"&&a.nodeType==null&&!Array.isArray(a)){c=2;for(let u in a)if(a[u]!=null){let d=u.indexOf(" ");d>0?l.setAttributeNS(u.slice(0,d),u.slice(d+1),a[u]):l.setAttribute(u,a[u])}}for(let u=c;u<t.length;u++){let d=t[u];if(d===0){if(u<t.length-1||u>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:f,contentDOM:h}=jt.renderSpec(e,d,r);if(l.appendChild(f),h){if(s)throw new RangeError("Multiple content holes");s=h}}}return{dom:l,contentDOM:s}}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new jt(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=Fl(e.nodes);return t.text||(t.text=r=>r.text),t}static marksFromSchema(e){return Fl(e.marks)}}function Fl(n){let e={};for(let t in n){let r=n[t].spec.toDOM;r&&(e[t]=r)}return e}function es(n){return n.document||window.document}const Vl=65535,zl=Math.pow(2,16);function im(n,e){return n+e*zl}function $l(n){return n&Vl}function sm(n){return(n-(n&Vl))/zl}const Hl=1,Ul=2,Co=4,jl=8;class ts{constructor(e,t,r){this.pos=e,this.delInfo=t,this.recover=r}get deleted(){return(this.delInfo&jl)>0}get deletedBefore(){return(this.delInfo&(Hl|Co))>0}get deletedAfter(){return(this.delInfo&(Ul|Co))>0}get deletedAcross(){return(this.delInfo&Co)>0}}class vt{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&vt.empty)return vt.empty}recover(e){let t=0,r=$l(e);if(!this.inverted)for(let o=0;o<r;o++)t+=this.ranges[o*3+2]-this.ranges[o*3+1];return this.ranges[r*3]+t+sm(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,r){let o=0,i=this.inverted?2:1,s=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?o:0);if(a>e)break;let c=this.ranges[l+i],u=this.ranges[l+s],d=a+c;if(e<=d){let f=c?e==a?-1:e==d?1:t:t,h=a+o+(f<0?0:u);if(r)return h;let p=e==(t<0?a:d)?null:im(l/3,e-a),g=e==a?Ul:e==d?Hl:Co;return(t<0?e!=a:e!=d)&&(g|=jl),new ts(h,g,p)}o+=u-c}return r?e+o:new ts(e+o,0,null)}touches(e,t){let r=0,o=$l(t),i=this.inverted?2:1,s=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>e)break;let c=this.ranges[l+i],u=a+c;if(e<=u&&l==o*3)return!0;r+=this.ranges[l+s]-c}return!1}forEach(e){let t=this.inverted?2:1,r=this.inverted?1:2;for(let o=0,i=0;o<this.ranges.length;o+=3){let s=this.ranges[o],l=s-(this.inverted?i:0),a=s+(this.inverted?0:i),c=this.ranges[o+t],u=this.ranges[o+r];e(l,l+c,a,a+u),i+=u-c}}invert(){return new vt(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?vt.empty:new vt(e<0?[0,-e,0]:[0,0,e])}}vt.empty=new vt([]);class Ar{constructor(e=[],t,r=0,o=e.length){this.maps=e,this.mirror=t,this.from=r,this.to=o}slice(e=0,t=this.maps.length){return new Ar(this.maps,this.mirror,e,t)}copy(){return new Ar(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(e,t){this.to=this.maps.push(e),t!=null&&this.setMirror(this.maps.length-1,t)}appendMapping(e){for(let t=0,r=this.maps.length;t<e.maps.length;t++){let o=e.getMirror(t);this.appendMap(e.maps[t],o!=null&&o<t?r+o:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,r=this.maps.length+e.maps.length;t>=0;t--){let o=e.getMirror(t);this.appendMap(e.maps[t].invert(),o!=null&&o>t?r-o-1:void 0)}}invert(){let e=new Ar;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let r=this.from;r<this.to;r++)e=this.maps[r].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,r){let o=0;for(let i=this.from;i<this.to;i++){let s=this.maps[i],l=s.mapResult(e,t);if(l.recover!=null){let a=this.getMirror(i);if(a!=null&&a>i&&a<this.to){i=a,e=this.maps[a].recover(l.recover);continue}}o|=l.delInfo,e=l.pos}return r?e:new ts(e,o,null)}}const ns=Object.create(null);class et{getMap(){return vt.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=ns[t.stepType];if(!r)throw new RangeError(`No step type ${t.stepType} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in ns)throw new RangeError("Duplicate use of step JSON ID "+e);return ns[e]=t,t.prototype.jsonID=e,t}}class Ue{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new Ue(e,null)}static fail(e){return new Ue(null,e)}static fromReplace(e,t,r,o){try{return Ue.ok(e.replace(t,r,o))}catch(i){if(i instanceof mo)return Ue.fail(i.message);throw i}}}function rs(n,e,t){let r=[];for(let o=0;o<n.childCount;o++){let i=n.child(o);i.content.size&&(i=i.copy(rs(i.content,e,i))),i.isInline&&(i=e(i,t,o)),r.push(i)}return oe.fromArray(r)}class dn extends et{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=e.resolve(this.from),o=r.node(r.sharedDepth(this.to)),i=new fe(rs(t.content,(s,l)=>!s.isAtom||!l.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),o),t.openStart,t.openEnd);return Ue.fromReplace(e,this.from,this.to,i)}invert(){return new Wt(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new dn(t.pos,r.pos,this.mark)}merge(e){return e instanceof dn&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new dn(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new dn(t.from,t.to,e.markFromJSON(t.mark))}}et.jsonID("addMark",dn);class Wt extends et{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=new fe(rs(t.content,o=>o.mark(this.mark.removeFromSet(o.marks)),e),t.openStart,t.openEnd);return Ue.fromReplace(e,this.from,this.to,r)}invert(){return new dn(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new Wt(t.pos,r.pos,this.mark)}merge(e){return e instanceof Wt&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Wt(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Wt(t.from,t.to,e.markFromJSON(t.mark))}}et.jsonID("removeMark",Wt);class fn extends et{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return Ue.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return Ue.fromReplace(e,this.pos,this.pos+1,new fe(oe.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let r=this.mark.addToSet(t.marks);if(r.length==t.marks.length){for(let o=0;o<t.marks.length;o++)if(!t.marks[o].isInSet(r))return new fn(this.pos,t.marks[o]);return new fn(this.pos,this.mark)}}return new Qn(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new fn(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new fn(t.pos,e.markFromJSON(t.mark))}}et.jsonID("addNodeMark",fn);class Qn extends et{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return Ue.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return Ue.fromReplace(e,this.pos,this.pos+1,new fe(oe.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new fn(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Qn(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Qn(t.pos,e.markFromJSON(t.mark))}}et.jsonID("removeNodeMark",Qn);class Qe extends et{constructor(e,t,r,o=!1){super(),this.from=e,this.to=t,this.slice=r,this.structure=o}apply(e){return this.structure&&is(e,this.from,this.to)?Ue.fail("Structure replace would overwrite content"):Ue.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new vt([this.from,this.to-this.from,this.slice.size])}invert(e){return new Qe(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deletedAcross&&r.deletedAcross?null:new Qe(t.pos,Math.max(t.pos,r.pos),this.slice)}merge(e){if(!(e instanceof Qe)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let t=this.slice.size+e.slice.size==0?fe.empty:new fe(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new Qe(this.from,this.to+(e.to-e.from),t,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let t=this.slice.size+e.slice.size==0?fe.empty:new fe(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new Qe(e.from,this.to,t,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new Qe(t.from,t.to,fe.fromJSON(e,t.slice),!!t.structure)}}et.jsonID("replace",Qe);class Je extends et{constructor(e,t,r,o,i,s,l=!1){super(),this.from=e,this.to=t,this.gapFrom=r,this.gapTo=o,this.slice=i,this.insert=s,this.structure=l}apply(e){if(this.structure&&(is(e,this.from,this.gapFrom)||is(e,this.gapTo,this.to)))return Ue.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return Ue.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,t.content);return r?Ue.fromReplace(e,this.from,this.to,r):Ue.fail("Content does not fit in gap")}getMap(){return new vt([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new Je(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),o=e.map(this.gapFrom,-1),i=e.map(this.gapTo,1);return t.deletedAcross&&r.deletedAcross||o<t.pos||i>r.pos?null:new Je(t.pos,r.pos,o,i,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Je(t.from,t.to,t.gapFrom,t.gapTo,fe.fromJSON(e,t.slice),t.insert,!!t.structure)}}et.jsonID("replaceAround",Je);function is(n,e,t){let r=n.resolve(e),o=t-e,i=r.depth;for(;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0){let s=r.node(i).maybeChild(r.indexAfter(i));for(;o>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,o--}}return!1}function am(n,e,t,r){let o=[],i=[],s,l;n.doc.nodesBetween(e,t,(a,c,u)=>{if(!a.isInline)return;let d=a.marks;if(!r.isInSet(d)&&u.type.allowsMarkType(r.type)){let f=Math.max(c,e),h=Math.min(c+a.nodeSize,t),p=r.addToSet(d);for(let g=0;g<d.length;g++)d[g].isInSet(p)||(s&&s.to==f&&s.mark.eq(d[g])?s.to=h:o.push(s=new Wt(f,h,d[g])));l&&l.to==f?l.to=h:i.push(l=new dn(f,h,r))}}),o.forEach(a=>n.step(a)),i.forEach(a=>n.step(a))}function lm(n,e,t,r){let o=[],i=0;n.doc.nodesBetween(e,t,(s,l)=>{if(!s.isInline)return;i++;let a=null;if(r instanceof bo){let c=s.marks,u;for(;u=r.isInSet(c);)(a||(a=[])).push(u),c=u.removeFromSet(c)}else r?r.isInSet(s.marks)&&(a=[r]):a=s.marks;if(a&&a.length){let c=Math.min(l+s.nodeSize,t);for(let u=0;u<a.length;u++){let d=a[u],f;for(let h=0;h<o.length;h++){let p=o[h];p.step==i-1&&d.eq(o[h].style)&&(f=p)}f?(f.to=c,f.step=i):o.push({style:d,from:Math.max(l,e),to:c,step:i})}}}),o.forEach(s=>n.step(new Wt(s.from,s.to,s.style)))}function cm(n,e,t,r=t.contentMatch){let o=n.doc.nodeAt(e),i=[],s=e+1;for(let l=0;l<o.childCount;l++){let a=o.child(l),c=s+a.nodeSize,u=r.matchType(a.type);if(!u)i.push(new Qe(s,c,fe.empty));else{r=u;for(let d=0;d<a.marks.length;d++)t.allowsMarkType(a.marks[d].type)||n.step(new Wt(s,c,a.marks[d]));if(a.isText&&!t.spec.code){let d,f=/\r?\n|\r/g,h;for(;d=f.exec(a.text);)h||(h=new fe(oe.from(t.schema.text(" ",t.allowedMarks(a.marks))),0,0)),i.push(new Qe(s+d.index,s+d.index+d[0].length,h))}}s=c}if(!r.validEnd){let l=r.fillBefore(oe.empty,!0);n.replace(s,s,new fe(l,0,0))}for(let l=i.length-1;l>=0;l--)n.step(i[l])}function um(n,e,t){return(e==0||n.canReplace(e,n.childCount))&&(t==n.childCount||n.canReplace(0,t))}function _n(n){let t=n.parent.content.cutByIndex(n.startIndex,n.endIndex);for(let r=n.depth;;--r){let o=n.$from.node(r),i=n.$from.index(r),s=n.$to.indexAfter(r);if(r<n.depth&&o.canReplace(i,s,t))return r;if(r==0||o.type.spec.isolating||!um(o,i,s))break}return null}function dm(n,e,t){let{$from:r,$to:o,depth:i}=e,s=r.before(i+1),l=o.after(i+1),a=s,c=l,u=oe.empty,d=0;for(let p=i,g=!1;p>t;p--)g||r.index(p)>0?(g=!0,u=oe.from(r.node(p).copy(u)),d++):a--;let f=oe.empty,h=0;for(let p=i,g=!1;p>t;p--)g||o.after(p+1)<o.end(p)?(g=!0,f=oe.from(o.node(p).copy(f)),h++):c++;n.step(new Je(a,c,s,l,new fe(u.append(f),d,h),u.size-d,!0))}function ss(n,e,t=null,r=n){let o=fm(n,e),i=o&&pm(r,e);return i?o.map(Wl).concat({type:e,attrs:t}).concat(i.map(Wl)):null}function Wl(n){return{type:n,attrs:null}}function fm(n,e){let{parent:t,startIndex:r,endIndex:o}=n,i=t.contentMatchAt(r).findWrapping(e);if(!i)return null;let s=i.length?i[0]:e;return t.canReplaceWith(r,o,s)?i:null}function pm(n,e){let{parent:t,startIndex:r,endIndex:o}=n,i=t.child(r),s=e.contentMatch.findWrapping(i.type);if(!s)return null;let a=(s.length?s[s.length-1]:e).contentMatch;for(let c=r;a&&c<o;c++)a=a.matchType(t.child(c).type);return!a||!a.validEnd?null:s}function hm(n,e,t){let r=oe.empty;for(let s=t.length-1;s>=0;s--){if(r.size){let l=t[s].type.contentMatch.matchFragment(r);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=oe.from(t[s].type.create(t[s].attrs,r))}let o=e.start,i=e.end;n.step(new Je(o,i,o,i,new fe(r,0,0),t.length,!0))}function mm(n,e,t,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=n.steps.length;n.doc.nodesBetween(e,t,(s,l)=>{if(s.isTextblock&&!s.hasMarkup(r,o)&&gm(n.doc,n.mapping.slice(i).map(l),r)){n.clearIncompatible(n.mapping.slice(i).map(l,1),r);let a=n.mapping.slice(i),c=a.map(l,1),u=a.map(l+s.nodeSize,1);return n.step(new Je(c,u,c+1,u-1,new fe(oe.from(r.create(o,null,s.marks)),0,0),1,!0)),!1}})}function gm(n,e,t){let r=n.resolve(e),o=r.index();return r.parent.canReplaceWith(o,o+1,t)}function ym(n,e,t,r,o){let i=n.doc.nodeAt(e);if(!i)throw new RangeError("No node at given position");t||(t=i.type);let s=t.create(r,null,o||i.marks);if(i.isLeaf)return n.replaceWith(e,e+i.nodeSize,s);if(!t.validContent(i.content))throw new RangeError("Invalid content for node type "+t.name);n.step(new Je(e,e+i.nodeSize,e+1,e+i.nodeSize-1,new fe(oe.from(s),0,0),1,!0))}function qn(n,e,t=1,r){let o=n.resolve(e),i=o.depth-t,s=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!s.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let c=o.depth-1,u=t-2;c>i;c--,u--){let d=o.node(c),f=o.index(c);if(d.type.spec.isolating)return!1;let h=d.content.cutByIndex(f,d.childCount),p=r&&r[u+1];p&&(h=h.replaceChild(0,p.type.create(p.attrs)));let g=r&&r[u]||d;if(!d.canReplace(f+1,d.childCount)||!g.type.validContent(h))return!1}let l=o.indexAfter(i),a=r&&r[0];return o.node(i).canReplaceWith(l,l,a?a.type:o.node(i+1).type)}function vm(n,e,t=1,r){let o=n.doc.resolve(e),i=oe.empty,s=oe.empty;for(let l=o.depth,a=o.depth-t,c=t-1;l>a;l--,c--){i=oe.from(o.node(l).copy(i));let u=r&&r[c];s=oe.from(u?u.type.create(u.attrs,s):o.node(l).copy(s))}n.step(new Qe(e,e,new fe(i.append(s),t,t),!0))}function pn(n,e){let t=n.resolve(e),r=t.index();return Kl(t.nodeBefore,t.nodeAfter)&&t.parent.canReplace(r,r+1)}function Kl(n,e){return!!(n&&e&&!n.isLeaf&&n.canAppend(e))}function ko(n,e,t=-1){let r=n.resolve(e);for(let o=r.depth;;o--){let i,s,l=r.index(o);if(o==r.depth?(i=r.nodeBefore,s=r.nodeAfter):t>0?(i=r.node(o+1),l++,s=r.node(o).maybeChild(l)):(i=r.node(o).maybeChild(l-1),s=r.node(o+1)),i&&!i.isTextblock&&Kl(i,s)&&r.node(o).canReplace(l,l+1))return e;if(o==0)break;e=t<0?r.before(o):r.after(o)}}function bm(n,e,t){let r=new Qe(e-t,e+t,fe.empty,!0);n.step(r)}function xm(n,e,t){let r=n.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),t))return e;if(r.parentOffset==0)for(let o=r.depth-1;o>=0;o--){let i=r.index(o);if(r.node(o).canReplaceWith(i,i,t))return r.before(o+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(let o=r.depth-1;o>=0;o--){let i=r.indexAfter(o);if(r.node(o).canReplaceWith(i,i,t))return r.after(o+1);if(i<r.node(o).childCount)return null}return null}function Sm(n,e,t){let r=n.resolve(e);if(!t.content.size)return e;let o=t.content;for(let i=0;i<t.openStart;i++)o=o.firstChild.content;for(let i=1;i<=(t.openStart==0&&t.size?2:1);i++)for(let s=r.depth;s>=0;s--){let l=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,a=r.index(s)+(l>0?1:0),c=r.node(s),u=!1;if(i==1)u=c.canReplace(a,a,o);else{let d=c.contentMatchAt(a).findWrapping(o.firstChild.type);u=d&&c.canReplaceWith(a,a,d[0])}if(u)return l==0?r.pos:l<0?r.before(s+1):r.after(s+1)}return null}function as(n,e,t=e,r=fe.empty){if(e==t&&!r.size)return null;let o=n.resolve(e),i=n.resolve(t);return Gl(o,i,r)?new Qe(e,t,r):new Em(o,i,r).fit()}function Gl(n,e,t){return!t.openStart&&!t.openEnd&&n.start()==e.start()&&n.parent.canReplace(n.index(),e.index(),t.content)}class Em{constructor(e,t,r){this.$from=e,this.$to=t,this.unplaced=r,this.frontier=[],this.placed=oe.empty;for(let o=0;o<=e.depth;o++){let i=e.node(o);this.frontier.push({type:i.type,match:i.contentMatchAt(e.indexAfter(o))})}for(let o=e.depth;o>0;o--)this.placed=oe.from(e.node(o).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(e<0?this.$to:r.doc.resolve(e));if(!o)return null;let i=this.placed,s=r.depth,l=o.depth;for(;s&&l&&i.childCount==1;)i=i.firstChild.content,s--,l--;let a=new fe(i,s,l);return e>-1?new Je(r.pos,e,this.$to.pos,this.$to.end(),a,t):a.size||r.pos!=this.$to.pos?new Qe(r.pos,o.pos,a):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,r=0,o=this.unplaced.openEnd;r<e;r++){let i=t.firstChild;if(t.childCount>1&&(o=0),i.type.spec.isolating&&o<=r){e=r;break}t=i.content}for(let t=1;t<=2;t++)for(let r=t==1?e:this.unplaced.openStart;r>=0;r--){let o,i=null;r?(i=ls(this.unplaced.content,r-1).firstChild,o=i.content):o=this.unplaced.content;let s=o.firstChild;for(let l=this.depth;l>=0;l--){let{type:a,match:c}=this.frontier[l],u,d=null;if(t==1&&(s?c.matchType(s.type)||(d=c.fillBefore(oe.from(s),!1)):i&&a.compatibleContent(i.type)))return{sliceDepth:r,frontierDepth:l,parent:i,inject:d};if(t==2&&s&&(u=c.findWrapping(s.type)))return{sliceDepth:r,frontierDepth:l,parent:i,wrap:u};if(i&&c.matchType(i.type))break}}}openMore(){let{content:e,openStart:t,openEnd:r}=this.unplaced,o=ls(e,t);return!o.childCount||o.firstChild.isLeaf?!1:(this.unplaced=new fe(e,t+1,Math.max(r,o.size+t>=e.size-r?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:r}=this.unplaced,o=ls(e,t);if(o.childCount<=1&&t>0){let i=e.size-t<=t+o.size;this.unplaced=new fe(Or(e,t-1,1),t-1,i?t-1:r)}else this.unplaced=new fe(Or(e,t,1),t,r)}placeNodes({sliceDepth:e,frontierDepth:t,parent:r,inject:o,wrap:i}){for(;this.depth>t;)this.closeFrontierNode();if(i)for(let g=0;g<i.length;g++)this.openFrontierNode(i[g]);let s=this.unplaced,l=r?r.content:s.content,a=s.openStart-e,c=0,u=[],{match:d,type:f}=this.frontier[t];if(o){for(let g=0;g<o.childCount;g++)u.push(o.child(g));d=d.matchFragment(o)}let h=l.size+e-(s.content.size-s.openEnd);for(;c<l.childCount;){let g=l.child(c),y=d.matchType(g.type);if(!y)break;c++,(c>1||a==0||g.content.size)&&(d=y,u.push(Jl(g.mark(f.allowedMarks(g.marks)),c==1?a:0,c==l.childCount?h:-1)))}let p=c==l.childCount;p||(h=-1),this.placed=Mr(this.placed,t,oe.from(u)),this.frontier[t].match=d,p&&h<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let g=0,y=l;g<h;g++){let S=y.lastChild;this.frontier.push({type:S.type,match:S.contentMatchAt(S.childCount)}),y=S.content}this.unplaced=p?e==0?fe.empty:new fe(Or(s.content,e-1,1),e-1,h<0?s.openEnd:e-1):new fe(Or(s.content,e,c),s.openStart,s.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],t;if(!e.type.isTextblock||!cs(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return-1;let{depth:r}=this.$to,o=this.$to.after(r);for(;r>1&&o==this.$to.end(--r);)++o;return o}findCloseLevel(e){e:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:r,type:o}=this.frontier[t],i=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),s=cs(e,t,o,r,i);if(s){for(let l=t-1;l>=0;l--){let{match:a,type:c}=this.frontier[l],u=cs(e,l,c,a,!0);if(!u||u.childCount)continue e}return{depth:t,fit:s,move:i?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=Mr(this.placed,t.depth,t.fit)),e=t.move;for(let r=t.depth+1;r<=e.depth;r++){let o=e.node(r),i=o.type.contentMatch.fillBefore(o.content,!0,e.index(r));this.openFrontierNode(o.type,o.attrs,i)}return e}openFrontierNode(e,t=null,r){let o=this.frontier[this.depth];o.match=o.match.matchType(e),this.placed=Mr(this.placed,this.depth,oe.from(e.create(t,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(oe.empty,!0);t.childCount&&(this.placed=Mr(this.placed,this.frontier.length,t))}}function Or(n,e,t){return e==0?n.cutByIndex(t,n.childCount):n.replaceChild(0,n.firstChild.copy(Or(n.firstChild.content,e-1,t)))}function Mr(n,e,t){return e==0?n.append(t):n.replaceChild(n.childCount-1,n.lastChild.copy(Mr(n.lastChild.content,e-1,t)))}function ls(n,e){for(let t=0;t<e;t++)n=n.firstChild.content;return n}function Jl(n,e,t){if(e<=0)return n;let r=n.content;return e>1&&(r=r.replaceChild(0,Jl(r.firstChild,e-1,r.childCount==1?t-1:0))),e>0&&(r=n.type.contentMatch.fillBefore(r).append(r),t<=0&&(r=r.append(n.type.contentMatch.matchFragment(r).fillBefore(oe.empty,!0)))),n.copy(r)}function cs(n,e,t,r,o){let i=n.node(e),s=o?n.indexAfter(e):n.index(e);if(s==i.childCount&&!t.compatibleContent(i.type))return null;let l=r.fillBefore(i.content,!0,s);return l&&!Cm(t,i.content,s)?l:null}function Cm(n,e,t){for(let r=t;r<e.childCount;r++)if(!n.allowsMarks(e.child(r).marks))return!0;return!1}function km(n){return n.spec.defining||n.spec.definingForContent}function wm(n,e,t,r){if(!r.size)return n.deleteRange(e,t);let o=n.doc.resolve(e),i=n.doc.resolve(t);if(Gl(o,i,r))return n.step(new Qe(e,t,r));let s=Xl(o,n.doc.resolve(t));s[s.length-1]==0&&s.pop();let l=-(o.depth+1);s.unshift(l);for(let f=o.depth,h=o.pos-1;f>0;f--,h--){let p=o.node(f).type.spec;if(p.defining||p.definingAsContext||p.isolating)break;s.indexOf(f)>-1?l=f:o.before(f)==h&&s.splice(1,0,-f)}let a=s.indexOf(l),c=[],u=r.openStart;for(let f=r.content,h=0;;h++){let p=f.firstChild;if(c.push(p),h==r.openStart)break;f=p.content}for(let f=u-1;f>=0;f--){let h=c[f],p=km(h.type);if(p&&!h.sameMarkup(o.node(Math.abs(l)-1)))u=f;else if(p||!h.type.isTextblock)break}for(let f=r.openStart;f>=0;f--){let h=(f+u+1)%(r.openStart+1),p=c[h];if(p)for(let g=0;g<s.length;g++){let y=s[(g+a)%s.length],S=!0;y<0&&(S=!1,y=-y);let C=o.node(y-1),k=o.index(y-1);if(C.canReplaceWith(k,k,p.type,p.marks))return n.replace(o.before(y),S?i.after(y):t,new fe(Yl(r.content,0,r.openStart,h),h,r.openEnd))}}let d=n.steps.length;for(let f=s.length-1;f>=0&&(n.replace(e,t,r),!(n.steps.length>d));f--){let h=s[f];h<0||(e=o.before(h),t=i.after(h))}}function Yl(n,e,t,r,o){if(e<t){let i=n.firstChild;n=n.replaceChild(0,i.copy(Yl(i.content,e+1,t,r,i)))}if(e>r){let i=o.contentMatchAt(0),s=i.fillBefore(n).append(n);n=s.append(i.matchFragment(s).fillBefore(oe.empty,!0))}return n}function Tm(n,e,t,r){if(!r.isInline&&e==t&&n.doc.resolve(e).parent.content.size){let o=xm(n.doc,e,r.type);o!=null&&(e=t=o)}n.replaceRange(e,t,new fe(oe.from(r),0,0))}function Am(n,e,t){let r=n.doc.resolve(e),o=n.doc.resolve(t),i=Xl(r,o);for(let s=0;s<i.length;s++){let l=i[s],a=s==i.length-1;if(a&&l==0||r.node(l).type.contentMatch.validEnd)return n.delete(r.start(l),o.end(l));if(l>0&&(a||r.node(l-1).canReplace(r.index(l-1),o.indexAfter(l-1))))return n.delete(r.before(l),o.after(l))}for(let s=1;s<=r.depth&&s<=o.depth;s++)if(e-r.start(s)==r.depth-s&&t>r.end(s)&&o.end(s)-t!=o.depth-s)return n.delete(r.before(s),t);n.delete(e,t)}function Xl(n,e){let t=[],r=Math.min(n.depth,e.depth);for(let o=r;o>=0;o--){let i=n.start(o);if(i<n.pos-(n.depth-o)||e.end(o)>e.pos+(e.depth-o)||n.node(o).type.spec.isolating||e.node(o).type.spec.isolating)break;(i==e.start(o)||o==n.depth&&o==e.depth&&n.parent.inlineContent&&e.parent.inlineContent&&o&&e.start(o-1)==i-1)&&t.push(o)}return t}class er extends et{constructor(e,t,r){super(),this.pos=e,this.attr=t,this.value=r}apply(e){let t=e.nodeAt(this.pos);if(!t)return Ue.fail("No node at attribute step's position");let r=Object.create(null);for(let i in t.attrs)r[i]=t.attrs[i];r[this.attr]=this.value;let o=t.type.create(r,null,t.marks);return Ue.fromReplace(e,this.pos,this.pos+1,new fe(oe.from(o),0,t.isLeaf?0:1))}getMap(){return vt.empty}invert(e){return new er(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new er(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.pos!="number"||typeof t.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new er(t.pos,t.attr,t.value)}}et.jsonID("attr",er);class Ir extends et{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let o in e.attrs)t[o]=e.attrs[o];t[this.attr]=this.value;let r=e.type.create(t,e.content,e.marks);return Ue.ok(r)}getMap(){return vt.empty}invert(e){return new Ir(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Ir(t.attr,t.value)}}et.jsonID("docAttr",Ir);let tr=class extends Error{};tr=function n(e){let t=Error.call(this,e);return t.__proto__=n.prototype,t},tr.prototype=Object.create(Error.prototype),tr.prototype.constructor=tr,tr.prototype.name="TransformError";class Zl{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Ar}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new tr(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,r=fe.empty){let o=as(this.doc,e,t,r);return o&&this.step(o),this}replaceWith(e,t,r){return this.replace(e,t,new fe(oe.from(r),0,0))}delete(e,t){return this.replace(e,t,fe.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,r){return wm(this,e,t,r),this}replaceRangeWith(e,t,r){return Tm(this,e,t,r),this}deleteRange(e,t){return Am(this,e,t),this}lift(e,t){return dm(this,e,t),this}join(e,t=1){return bm(this,e,t),this}wrap(e,t){return hm(this,e,t),this}setBlockType(e,t=e,r,o=null){return mm(this,e,t,r,o),this}setNodeMarkup(e,t,r=null,o){return ym(this,e,t,r,o),this}setNodeAttribute(e,t,r){return this.step(new er(e,t,r)),this}setDocAttribute(e,t){return this.step(new Ir(e,t)),this}addNodeMark(e,t){return this.step(new fn(e,t)),this}removeNodeMark(e,t){if(!(t instanceof Le)){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(t=t.isInSet(r.marks),!t)return this}return this.step(new Qn(e,t)),this}split(e,t=1,r){return vm(this,e,t,r),this}addMark(e,t,r){return am(this,e,t,r),this}removeMark(e,t,r){return lm(this,e,t,r),this}clearIncompatible(e,t,r){return cm(this,e,t,r),this}}const us=Object.create(null);class Re{constructor(e,t,r){this.$anchor=e,this.$head=t,this.ranges=r||[new Om(e.min(t),e.max(t))]}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 e=this.ranges;for(let t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=fe.empty){let r=t.content.lastChild,o=null;for(let l=0;l<t.openEnd;l++)o=r,r=r.lastChild;let i=e.steps.length,s=this.ranges;for(let l=0;l<s.length;l++){let{$from:a,$to:c}=s[l],u=e.mapping.slice(i);e.replaceRange(u.map(a.pos),u.map(c.pos),l?fe.empty:t),l==0&&ql(e,i,(r?r.isInline:o&&o.isTextblock)?-1:1)}}replaceWith(e,t){let r=e.steps.length,o=this.ranges;for(let i=0;i<o.length;i++){let{$from:s,$to:l}=o[i],a=e.mapping.slice(r),c=a.map(s.pos),u=a.map(l.pos);i?e.deleteRange(c,u):(e.replaceRangeWith(c,u,t),ql(e,r,t.isInline?-1:1))}}static findFrom(e,t,r=!1){let o=e.parent.inlineContent?new De(e):nr(e.node(0),e.parent,e.pos,e.index(),t,r);if(o)return o;for(let i=e.depth-1;i>=0;i--){let s=t<0?nr(e.node(0),e.node(i),e.before(i+1),e.index(i),t,r):nr(e.node(0),e.node(i),e.after(i+1),e.index(i)+1,t,r);if(s)return s}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new Bt(e.node(0))}static atStart(e){return nr(e,e,0,0,1)||new Bt(e)}static atEnd(e){return nr(e,e,e.content.size,e.childCount,-1)||new Bt(e)}static fromJSON(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=us[t.type];if(!r)throw new RangeError(`No selection type ${t.type} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in us)throw new RangeError("Duplicate use of selection JSON ID "+e);return us[e]=t,t.prototype.jsonID=e,t}getBookmark(){return De.between(this.$anchor,this.$head).getBookmark()}}Re.prototype.visible=!0;class Om{constructor(e,t){this.$from=e,this.$to=t}}let Ql=!1;function _l(n){!Ql&&!n.parent.inlineContent&&(Ql=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+n.parent.type.name+")"))}class De extends Re{constructor(e,t=e){_l(e),_l(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let r=e.resolve(t.map(this.head));if(!r.parent.inlineContent)return Re.near(r);let o=e.resolve(t.map(this.anchor));return new De(o.parent.inlineContent?o:r,r)}replace(e,t=fe.empty){if(super.replace(e,t),t==fe.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof De&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new wo(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if(typeof t.anchor!="number"||typeof t.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new De(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,r=t){let o=e.resolve(t);return new this(o,r==t?o:e.resolve(r))}static between(e,t,r){let o=e.pos-t.pos;if((!r||o)&&(r=o>=0?1:-1),!t.parent.inlineContent){let i=Re.findFrom(t,r,!0)||Re.findFrom(t,-r,!0);if(i)t=i.$head;else return Re.near(t,r)}return e.parent.inlineContent||(o==0?e=t:(e=(Re.findFrom(e,-r,!0)||Re.findFrom(e,r,!0)).$anchor,e.pos<t.pos!=o<0&&(e=t))),new De(e,t)}}Re.jsonID("text",De);class wo{constructor(e,t){this.anchor=e,this.head=t}map(e){return new wo(e.map(this.anchor),e.map(this.head))}resolve(e){return De.between(e.resolve(this.anchor),e.resolve(this.head))}}class Se extends Re{constructor(e){let t=e.nodeAfter,r=e.node(0).resolve(e.pos+t.nodeSize);super(e,r),this.node=t}map(e,t){let{deleted:r,pos:o}=t.mapResult(this.anchor),i=e.resolve(o);return r?Re.near(i):new Se(i)}content(){return new fe(oe.from(this.node),0,0)}eq(e){return e instanceof Se&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new ds(this.anchor)}static fromJSON(e,t){if(typeof t.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new Se(e.resolve(t.anchor))}static create(e,t){return new Se(e.resolve(t))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}Se.prototype.visible=!1,Re.jsonID("node",Se);class ds{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:r}=e.mapResult(this.anchor);return t?new wo(r,r):new ds(r)}resolve(e){let t=e.resolve(this.anchor),r=t.nodeAfter;return r&&Se.isSelectable(r)?new Se(t):Re.near(t)}}class Bt extends Re{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=fe.empty){if(t==fe.empty){e.delete(0,e.doc.content.size);let r=Re.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new Bt(e)}map(e){return new Bt(e)}eq(e){return e instanceof Bt}getBookmark(){return Mm}}Re.jsonID("all",Bt);const Mm={map(){return this},resolve(n){return new Bt(n)}};function nr(n,e,t,r,o,i=!1){if(e.inlineContent)return De.create(n,t);for(let s=r-(o>0?0:1);o>0?s<e.childCount:s>=0;s+=o){let l=e.child(s);if(l.isAtom){if(!i&&Se.isSelectable(l))return Se.create(n,t-(o<0?l.nodeSize:0))}else{let a=nr(n,l,t+o,o<0?l.childCount:0,o,i);if(a)return a}t+=l.nodeSize*o}return null}function ql(n,e,t){let r=n.steps.length-1;if(r<e)return;let o=n.steps[r];if(!(o instanceof Qe||o instanceof Je))return;let i=n.mapping.maps[r],s;i.forEach((l,a,c,u)=>{s==null&&(s=u)}),n.setSelection(Re.near(n.doc.resolve(s),t))}const ec=1,To=2,tc=4;class Im extends Zl{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.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(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|ec)&~To,this.storedMarks=null,this}get selectionSet(){return(this.updated&ec)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=To,this}ensureMarks(e){return Le.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&To)>0}addStep(e,t){super.addStep(e,t),this.updated=this.updated&~To,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let r=this.selection;return t&&(e=e.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||Le.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,r){let o=this.doc.type.schema;if(t==null)return e?this.replaceSelectionWith(o.text(e),!0):this.deleteSelection();{if(r==null&&(r=t),r=r??t,!e)return this.deleteRange(t,r);let i=this.storedMarks;if(!i){let s=this.doc.resolve(t);i=r==t?s.marks():s.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(t,r,o.text(e,i)),this.selection.empty||this.setSelection(Re.near(this.selection.$to)),this}}setMeta(e,t){return this.meta[typeof e=="string"?e:e.key]=t,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=tc,this}get scrolledIntoView(){return(this.updated&tc)>0}}function nc(n,e){return!e||!n?n:n.bind(e)}class Nr{constructor(e,t,r){this.name=e,this.init=nc(t.init,r),this.apply=nc(t.apply,r)}}const Nm=[new Nr("doc",{init(n){return n.doc||n.schema.topNodeType.createAndFill()},apply(n){return n.doc}}),new Nr("selection",{init(n,e){return n.selection||Re.atStart(e.doc)},apply(n){return n.selection}}),new Nr("storedMarks",{init(n){return n.storedMarks||null},apply(n,e,t,r){return r.selection.$cursor?n.storedMarks:null}}),new Nr("scrollToSelection",{init(){return 0},apply(n,e){return n.scrolledIntoView?e+1:e}})];class fs{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=Nm.slice(),t&&t.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new Nr(r.key,r.spec.state,r))})}}class rr{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=t){let o=this.config.plugins[r];if(o.spec.filterTransaction&&!o.spec.filterTransaction.call(o,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let t=[e],r=this.applyInner(e),o=null;for(;;){let i=!1;for(let s=0;s<this.config.plugins.length;s++){let l=this.config.plugins[s];if(l.spec.appendTransaction){let a=o?o[s].n:0,c=o?o[s].state:this,u=a<t.length&&l.spec.appendTransaction.call(l,a?t.slice(a):t,c,r);if(u&&r.filterTransaction(u,s)){if(u.setMeta("appendedTransaction",e),!o){o=[];for(let d=0;d<this.config.plugins.length;d++)o.push(d<s?{state:r,n:t.length}:{state:this,n:0})}t.push(u),r=r.applyInner(u),i=!0}o&&(o[s]={state:r,n:t.length})}}if(!i)return{state:r,transactions:t}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let t=new rr(this.config),r=this.config.fields;for(let o=0;o<r.length;o++){let i=r[o];t[i.name]=i.apply(e,this[i.name],this,t)}return t}get tr(){return new Im(this)}static create(e){let t=new fs(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new rr(t);for(let o=0;o<t.fields.length;o++)r[t.fields[o].name]=t.fields[o].init(e,r);return r}reconfigure(e){let t=new fs(this.schema,e.plugins),r=t.fields,o=new rr(t);for(let i=0;i<r.length;i++){let s=r[i].name;o[s]=this.hasOwnProperty(s)?this[s]:r[i].init(e,o)}return o}toJSON(e){let t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map(r=>r.toJSON())),e&&typeof e=="object")for(let r in e){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let o=e[r],i=o.spec.state;i&&i.toJSON&&(t[r]=i.toJSON.call(o,this[o.key]))}return t}static fromJSON(e,t,r){if(!t)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let o=new fs(e.schema,e.plugins),i=new rr(o);return o.fields.forEach(s=>{if(s.name=="doc")i.doc=Pn.fromJSON(e.schema,t.doc);else if(s.name=="selection")i.selection=Re.fromJSON(i.doc,t.selection);else if(s.name=="storedMarks")t.storedMarks&&(i.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let l in r){let a=r[l],c=a.spec.state;if(a.key==s.name&&c&&c.fromJSON&&Object.prototype.hasOwnProperty.call(t,l)){i[s.name]=c.fromJSON.call(a,e,t[l],i);return}}i[s.name]=s.init(e,i)}}),i}}function rc(n,e,t){for(let r in n){let o=n[r];o instanceof Function?o=o.bind(e):r=="handleDOMEvents"&&(o=rc(o,e,{})),t[r]=o}return t}class ft{constructor(e){this.spec=e,this.props={},e.props&&rc(e.props,this,this.props),this.key=e.key?e.key.key:oc("plugin")}getState(e){return e[this.key]}}const ps=Object.create(null);function oc(n){return n in ps?n+"$"+ ++ps[n]:(ps[n]=0,n+"$")}class Ft{constructor(e="key"){this.key=oc(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const it=function(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e},Rr=function(n){let e=n.assignedSlot||n.parentNode;return e&&e.nodeType==11?e.host:e};let ic=null;const nn=function(n,e,t){let r=ic||(ic=document.createRange());return r.setEnd(n,t??n.nodeValue.length),r.setStart(n,e||0),r},Fn=function(n,e,t,r){return t&&(sc(n,e,t,r,-1)||sc(n,e,t,r,1))},Rm=/^(img|br|input|textarea|hr)$/i;function sc(n,e,t,r,o){for(;;){if(n==t&&e==r)return!0;if(e==(o<0?0:Kt(n))){let i=n.parentNode;if(!i||i.nodeType!=1||hs(n)||Rm.test(n.nodeName)||n.contentEditable=="false")return!1;e=it(n)+(o<0?0:1),n=i}else if(n.nodeType==1){if(n=n.childNodes[e+(o<0?-1:0)],n.contentEditable=="false")return!1;e=o<0?Kt(n):0}else return!1}}function Kt(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function Dm(n,e,t){for(let r=e==0,o=e==Kt(n);r||o;){if(n==t)return!0;let i=it(n);if(n=n.parentNode,!n)return!1;r=r&&i==0,o=o&&i==Kt(n)}}function hs(n){let e;for(let t=n;t&&!(e=t.pmViewDesc);t=t.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==n||e.contentDOM==n)}const Ao=function(n){return n.focusNode&&Fn(n.focusNode,n.focusOffset,n.anchorNode,n.anchorOffset)};function Vn(n,e){let t=document.createEvent("Event");return t.initEvent("keydown",!0,!0),t.keyCode=n,t.key=t.code=e,t}function Lm(n){let e=n.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function Pm(n,e,t){if(n.caretPositionFromPoint)try{let r=n.caretPositionFromPoint(e,t);if(r)return{node:r.offsetNode,offset:r.offset}}catch{}if(n.caretRangeFromPoint){let r=n.caretRangeFromPoint(e,t);if(r)return{node:r.startContainer,offset:r.startOffset}}}const Gt=typeof navigator<"u"?navigator:null,ac=typeof document<"u"?document:null,hn=Gt&&Gt.userAgent||"",ms=/Edge\/(\d+)/.exec(hn),lc=/MSIE \d/.exec(hn),gs=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(hn),pt=!!(lc||gs||ms),mn=lc?document.documentMode:gs?+gs[1]:ms?+ms[1]:0,Vt=!pt&&/gecko\/(\d+)/i.test(hn);Vt&&+(/Firefox\/(\d+)/.exec(hn)||[0,0])[1];const ys=!pt&&/Chrome\/(\d+)/.exec(hn),tt=!!ys,Bm=ys?+ys[1]:0,st=!pt&&!!Gt&&/Apple Computer/.test(Gt.vendor),or=st&&(/Mobile\/\w+/.test(hn)||!!Gt&&Gt.maxTouchPoints>2),Ct=or||(Gt?/Mac/.test(Gt.platform):!1),Fm=Gt?/Win/.test(Gt.platform):!1,zt=/Android \d/.test(hn),Dr=!!ac&&"webkitFontSmoothing"in ac.documentElement.style,Vm=Dr?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function zm(n){return{left:0,right:n.documentElement.clientWidth,top:0,bottom:n.documentElement.clientHeight}}function rn(n,e){return typeof n=="number"?n:n[e]}function $m(n){let e=n.getBoundingClientRect(),t=e.width/n.offsetWidth||1,r=e.height/n.offsetHeight||1;return{left:e.left,right:e.left+n.clientWidth*t,top:e.top,bottom:e.top+n.clientHeight*r}}function cc(n,e,t){let r=n.someProp("scrollThreshold")||0,o=n.someProp("scrollMargin")||5,i=n.dom.ownerDocument;for(let s=t||n.dom;s;s=Rr(s)){if(s.nodeType!=1)continue;let l=s,a=l==i.body,c=a?zm(i):$m(l),u=0,d=0;if(e.top<c.top+rn(r,"top")?d=-(c.top-e.top+rn(o,"top")):e.bottom>c.bottom-rn(r,"bottom")&&(d=e.bottom-e.top>c.bottom-c.top?e.top+rn(o,"top")-c.top:e.bottom-c.bottom+rn(o,"bottom")),e.left<c.left+rn(r,"left")?u=-(c.left-e.left+rn(o,"left")):e.right>c.right-rn(r,"right")&&(u=e.right-c.right+rn(o,"right")),u||d)if(a)i.defaultView.scrollBy(u,d);else{let f=l.scrollLeft,h=l.scrollTop;d&&(l.scrollTop+=d),u&&(l.scrollLeft+=u);let p=l.scrollLeft-f,g=l.scrollTop-h;e={left:e.left-p,top:e.top-g,right:e.right-p,bottom:e.bottom-g}}if(a||/^(fixed|sticky)$/.test(getComputedStyle(s).position))break}}function Hm(n){let e=n.dom.getBoundingClientRect(),t=Math.max(0,e.top),r,o;for(let i=(e.left+e.right)/2,s=t+1;s<Math.min(innerHeight,e.bottom);s+=5){let l=n.root.elementFromPoint(i,s);if(!l||l==n.dom||!n.dom.contains(l))continue;let a=l.getBoundingClientRect();if(a.top>=t-20){r=l,o=a.top;break}}return{refDOM:r,refTop:o,stack:uc(n.dom)}}function uc(n){let e=[],t=n.ownerDocument;for(let r=n;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),n!=t);r=Rr(r));return e}function Um({refDOM:n,refTop:e,stack:t}){let r=n?n.getBoundingClientRect().top:0;dc(t,r==0?0:r-e)}function dc(n,e){for(let t=0;t<n.length;t++){let{dom:r,top:o,left:i}=n[t];r.scrollTop!=o+e&&(r.scrollTop=o+e),r.scrollLeft!=i&&(r.scrollLeft=i)}}let ir=null;function jm(n){if(n.setActive)return n.setActive();if(ir)return n.focus(ir);let e=uc(n);n.focus(ir==null?{get preventScroll(){return ir={preventScroll:!0},!0}}:void 0),ir||(ir=!1,dc(e,0))}function fc(n,e){let t,r=2e8,o,i=0,s=e.top,l=e.top,a,c;for(let u=n.firstChild,d=0;u;u=u.nextSibling,d++){let f;if(u.nodeType==1)f=u.getClientRects();else if(u.nodeType==3)f=nn(u).getClientRects();else continue;for(let h=0;h<f.length;h++){let p=f[h];if(p.top<=s&&p.bottom>=l){s=Math.max(p.bottom,s),l=Math.min(p.top,l);let g=p.left>e.left?p.left-e.left:p.right<e.left?e.left-p.right:0;if(g<r){t=u,r=g,o=g&&t.nodeType==3?{left:p.right<e.left?p.right:p.left,top:e.top}:e,u.nodeType==1&&g&&(i=d+(e.left>=(p.left+p.right)/2?1:0));continue}}else p.top>e.top&&!a&&p.left<=e.left&&p.right>=e.left&&(a=u,c={left:Math.max(p.left,Math.min(p.right,e.left)),top:p.top});!t&&(e.left>=p.right&&e.top>=p.top||e.left>=p.left&&e.top>=p.bottom)&&(i=d+1)}}return!t&&a&&(t=a,o=c,r=0),t&&t.nodeType==3?Wm(t,o):!t||r&&t.nodeType==1?{node:n,offset:i}:fc(t,o)}function Wm(n,e){let t=n.nodeValue.length,r=document.createRange();for(let o=0;o<t;o++){r.setEnd(n,o+1),r.setStart(n,o);let i=gn(r,1);if(i.top!=i.bottom&&vs(e,i))return{node:n,offset:o+(e.left>=(i.left+i.right)/2?1:0)}}return{node:n,offset:0}}function vs(n,e){return n.left>=e.left-1&&n.left<=e.right+1&&n.top>=e.top-1&&n.top<=e.bottom+1}function Km(n,e){let t=n.parentNode;return t&&/^li$/i.test(t.nodeName)&&e.left<n.getBoundingClientRect().left?t:n}function Gm(n,e,t){let{node:r,offset:o}=fc(e,t),i=-1;if(r.nodeType==1&&!r.firstChild){let s=r.getBoundingClientRect();i=s.left!=s.right&&t.left>(s.left+s.right)/2?1:-1}return n.docView.posFromDOM(r,o,i)}function Jm(n,e,t,r){let o=-1;for(let i=e,s=!1;i!=n.dom;){let l=n.docView.nearestDesc(i,!0);if(!l)return null;if(l.dom.nodeType==1&&(l.node.isBlock&&l.parent&&!s||!l.contentDOM)){let a=l.dom.getBoundingClientRect();if(l.node.isBlock&&l.parent&&!s&&(s=!0,a.left>r.left||a.top>r.top?o=l.posBefore:(a.right<r.left||a.bottom<r.top)&&(o=l.posAfter)),!l.contentDOM&&o<0&&!l.node.isText)return(l.node.isBlock?r.top<(a.top+a.bottom)/2:r.left<(a.left+a.right)/2)?l.posBefore:l.posAfter}i=l.dom.parentNode}return o>-1?o:n.docView.posFromDOM(e,t,-1)}function pc(n,e,t){let r=n.childNodes.length;if(r&&t.top<t.bottom)for(let o=Math.max(0,Math.min(r-1,Math.floor(r*(e.top-t.top)/(t.bottom-t.top))-2)),i=o;;){let s=n.childNodes[i];if(s.nodeType==1){let l=s.getClientRects();for(let a=0;a<l.length;a++){let c=l[a];if(vs(e,c))return pc(s,e,c)}}if((i=(i+1)%r)==o)break}return n}function Ym(n,e){let t=n.dom.ownerDocument,r,o=0,i=Pm(t,e.left,e.top);i&&({node:r,offset:o}=i);let s=(n.root.elementFromPoint?n.root:t).elementFromPoint(e.left,e.top),l;if(!s||!n.dom.contains(s.nodeType!=1?s.parentNode:s)){let c=n.dom.getBoundingClientRect();if(!vs(e,c)||(s=pc(n.dom,e,c),!s))return null}if(st)for(let c=s;r&&c;c=Rr(c))c.draggable&&(r=void 0);if(s=Km(s,e),r){if(Vt&&r.nodeType==1&&(o=Math.min(o,r.childNodes.length),o<r.childNodes.length)){let u=r.childNodes[o],d;u.nodeName=="IMG"&&(d=u.getBoundingClientRect()).right<=e.left&&d.bottom>e.top&&o++}let c;Dr&&o&&r.nodeType==1&&(c=r.childNodes[o-1]).nodeType==1&&c.contentEditable=="false"&&c.getBoundingClientRect().top>=e.top&&o--,r==n.dom&&o==r.childNodes.length-1&&r.lastChild.nodeType==1&&e.top>r.lastChild.getBoundingClientRect().bottom?l=n.state.doc.content.size:(o==0||r.nodeType!=1||r.childNodes[o-1].nodeName!="BR")&&(l=Jm(n,r,o,e))}l==null&&(l=Gm(n,s,e));let a=n.docView.nearestDesc(s,!0);return{pos:l,inside:a?a.posAtStart-a.border:-1}}function hc(n){return n.top<n.bottom||n.left<n.right}function gn(n,e){let t=n.getClientRects();if(t.length){let r=t[e<0?0:t.length-1];if(hc(r))return r}return Array.prototype.find.call(t,hc)||n.getBoundingClientRect()}const Xm=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function mc(n,e,t){let{node:r,offset:o,atom:i}=n.docView.domFromPos(e,t<0?-1:1),s=Dr||Vt;if(r.nodeType==3)if(s&&(Xm.test(r.nodeValue)||(t<0?!o:o==r.nodeValue.length))){let a=gn(nn(r,o,o),t);if(Vt&&o&&/\s/.test(r.nodeValue[o-1])&&o<r.nodeValue.length){let c=gn(nn(r,o-1,o-1),-1);if(c.top==a.top){let u=gn(nn(r,o,o+1),-1);if(u.top!=a.top)return Lr(u,u.left<c.left)}}return a}else{let a=o,c=o,u=t<0?1:-1;return t<0&&!o?(c++,u=-1):t>=0&&o==r.nodeValue.length?(a--,u=1):t<0?a--:c++,Lr(gn(nn(r,a,c),u),u<0)}if(!n.state.doc.resolve(e-(i||0)).parent.inlineContent){if(i==null&&o&&(t<0||o==Kt(r))){let a=r.childNodes[o-1];if(a.nodeType==1)return bs(a.getBoundingClientRect(),!1)}if(i==null&&o<Kt(r)){let a=r.childNodes[o];if(a.nodeType==1)return bs(a.getBoundingClientRect(),!0)}return bs(r.getBoundingClientRect(),t>=0)}if(i==null&&o&&(t<0||o==Kt(r))){let a=r.childNodes[o-1],c=a.nodeType==3?nn(a,Kt(a)-(s?0:1)):a.nodeType==1&&(a.nodeName!="BR"||!a.nextSibling)?a:null;if(c)return Lr(gn(c,1),!1)}if(i==null&&o<Kt(r)){let a=r.childNodes[o];for(;a.pmViewDesc&&a.pmViewDesc.ignoreForCoords;)a=a.nextSibling;let c=a?a.nodeType==3?nn(a,0,s?0:1):a.nodeType==1?a:null:null;if(c)return Lr(gn(c,-1),!0)}return Lr(gn(r.nodeType==3?nn(r):r,-t),t>=0)}function Lr(n,e){if(n.width==0)return n;let t=e?n.left:n.right;return{top:n.top,bottom:n.bottom,left:t,right:t}}function bs(n,e){if(n.height==0)return n;let t=e?n.top:n.bottom;return{top:t,bottom:t,left:n.left,right:n.right}}function gc(n,e,t){let r=n.state,o=n.root.activeElement;r!=e&&n.updateState(e),o!=n.dom&&n.focus();try{return t()}finally{r!=e&&n.updateState(r),o!=n.dom&&o&&o.focus()}}function Zm(n,e,t){let r=e.selection,o=t=="up"?r.$from:r.$to;return gc(n,e,()=>{let{node:i}=n.docView.domFromPos(o.pos,t=="up"?-1:1);for(;;){let l=n.docView.nearestDesc(i,!0);if(!l)break;if(l.node.isBlock){i=l.contentDOM||l.dom;break}i=l.dom.parentNode}let s=mc(n,o.pos,1);for(let l=i.firstChild;l;l=l.nextSibling){let a;if(l.nodeType==1)a=l.getClientRects();else if(l.nodeType==3)a=nn(l,0,l.nodeValue.length).getClientRects();else continue;for(let c=0;c<a.length;c++){let u=a[c];if(u.bottom>u.top+1&&(t=="up"?s.top-u.top>(u.bottom-s.top)*2:u.bottom-s.bottom>(s.bottom-u.top)*2))return!1}}return!0})}const Qm=/[\u0590-\u08ac]/;function _m(n,e,t){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let o=r.parentOffset,i=!o,s=o==r.parent.content.size,l=n.domSelection();return!Qm.test(r.parent.textContent)||!l.modify?t=="left"||t=="backward"?i:s:gc(n,e,()=>{let{focusNode:a,focusOffset:c,anchorNode:u,anchorOffset:d}=n.domSelectionRange(),f=l.caretBidiLevel;l.modify("move",t,"character");let h=r.depth?n.docView.domAfterPos(r.before()):n.dom,{focusNode:p,focusOffset:g}=n.domSelectionRange(),y=p&&!h.contains(p.nodeType==1?p:p.parentNode)||a==p&&c==g;try{l.collapse(u,d),a&&(a!=u||c!=d)&&l.extend&&l.extend(a,c)}catch{}return f!=null&&(l.caretBidiLevel=f),y})}let yc=null,vc=null,bc=!1;function qm(n,e,t){return yc==e&&vc==t?bc:(yc=e,vc=t,bc=t=="up"||t=="down"?Zm(n,e,t):_m(n,e,t))}const kt=0,xc=1,zn=2,Jt=3;class Pr{constructor(e,t,r,o){this.parent=e,this.children=t,this.dom=r,this.contentDOM=o,this.dirty=kt,r.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,r){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;t<this.children.length;t++)e+=this.children[t].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let t=0,r=this.posAtStart;;t++){let o=this.children[t];if(o==e)return r;r+=o.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,t,r){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(r<0){let i,s;if(e==this.contentDOM)i=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.previousSibling}for(;i&&!((s=i.pmViewDesc)&&s.parent==this);)i=i.previousSibling;return i?this.posBeforeChild(s)+s.size:this.posAtStart}else{let i,s;if(e==this.contentDOM)i=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.nextSibling}for(;i&&!((s=i.pmViewDesc)&&s.parent==this);)i=i.nextSibling;return i?this.posBeforeChild(s):this.posAtEnd}let o;if(e==this.dom&&this.contentDOM)o=t>it(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))o=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(t==0)for(let i=e;;i=i.parentNode){if(i==this.dom){o=!1;break}if(i.previousSibling)break}if(o==null&&t==e.childNodes.length)for(let i=e;;i=i.parentNode){if(i==this.dom){o=!0;break}if(i.nextSibling)break}}return o??r>0?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let r=!0,o=e;o;o=o.parentNode){let i=this.getDesc(o),s;if(i&&(!t||i.node))if(r&&(s=i.nodeDOM)&&!(s.nodeType==1?s.contains(e.nodeType==1?e:e.parentNode):s==e))r=!1;else return i}}getDesc(e){let t=e.pmViewDesc;for(let r=t;r;r=r.parent)if(r==this)return t}posFromDOM(e,t,r){for(let o=e;o;o=o.parentNode){let i=this.getDesc(o);if(i)return i.localPosFromDOM(e,t,r)}return-1}descAt(e){for(let t=0,r=0;t<this.children.length;t++){let o=this.children[t],i=r+o.size;if(r==e&&i!=r){for(;!o.border&&o.children.length;)o=o.children[0];return o}if(e<i)return o.descAt(e-r-o.border);r=i}}domFromPos(e,t){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let r=0,o=0;for(let i=0;r<this.children.length;r++){let s=this.children[r],l=i+s.size;if(l>e||s instanceof Cc){o=e-i;break}i=l}if(o)return this.children[r].domFromPos(o-this.children[r].border,t);for(let i;r&&!(i=this.children[r-1]).size&&i instanceof Sc&&i.side>=0;r--);if(t<=0){let i,s=!0;for(;i=r?this.children[r-1]:null,!(!i||i.dom.parentNode==this.contentDOM);r--,s=!1);return i&&t&&s&&!i.border&&!i.domAtom?i.domFromPos(i.size,t):{node:this.contentDOM,offset:i?it(i.dom)+1:0}}else{let i,s=!0;for(;i=r<this.children.length?this.children[r]:null,!(!i||i.dom.parentNode==this.contentDOM);r++,s=!1);return i&&s&&!i.border&&!i.domAtom?i.domFromPos(0,t):{node:this.contentDOM,offset:i?it(i.dom):this.contentDOM.childNodes.length}}}parseRange(e,t,r=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let o=-1,i=-1;for(let s=r,l=0;;l++){let a=this.children[l],c=s+a.size;if(o==-1&&e<=c){let u=s+a.border;if(e>=u&&t<=c-a.border&&a.node&&a.contentDOM&&this.contentDOM.contains(a.contentDOM))return a.parseRange(e,t,u);e=s;for(let d=l;d>0;d--){let f=this.children[d-1];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(1)){o=it(f.dom)+1;break}e-=f.size}o==-1&&(o=0)}if(o>-1&&(c>t||l==this.children.length-1)){t=c;for(let u=l+1;u<this.children.length;u++){let d=this.children[u];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(-1)){i=it(d.dom);break}t+=d.size}i==-1&&(i=this.contentDOM.childNodes.length);break}s=c}return{node:this.contentDOM,from:e,to:t,fromOffset:o,toOffset:i}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let t=this.children[e<0?0:this.children.length-1];return t.size==0||t.emptyChildAt(e)}domAfterPos(e){let{node:t,offset:r}=this.domFromPos(e,0);if(t.nodeType!=1||r==t.childNodes.length)throw new RangeError("No node after pos "+e);return t.childNodes[r]}setSelection(e,t,r,o=!1){let i=Math.min(e,t),s=Math.max(e,t);for(let f=0,h=0;f<this.children.length;f++){let p=this.children[f],g=h+p.size;if(i>h&&s<g)return p.setSelection(e-h-p.border,t-h-p.border,r,o);h=g}let l=this.domFromPos(e,e?-1:1),a=t==e?l:this.domFromPos(t,t?-1:1),c=r.getSelection(),u=!1;if((Vt||st)&&e==t){let{node:f,offset:h}=l;if(f.nodeType==3){if(u=!!(h&&f.nodeValue[h-1]==`
|
|
15
|
-
`),u&&h==f.nodeValue.length)for(let p=f,g;p;p=p.parentNode){if(g=p.nextSibling){g.nodeName=="BR"&&(l=a={node:g.parentNode,offset:it(g)+1});break}let y=p.pmViewDesc;if(y&&y.node&&y.node.isBlock)break}}else{let p=f.childNodes[h-1];u=p&&(p.nodeName=="BR"||p.contentEditable=="false")}}if(Vt&&c.focusNode&&c.focusNode!=a.node&&c.focusNode.nodeType==1){let f=c.focusNode.childNodes[c.focusOffset];f&&f.contentEditable=="false"&&(o=!0)}if(!(o||u&&st)&&Fn(l.node,l.offset,c.anchorNode,c.anchorOffset)&&Fn(a.node,a.offset,c.focusNode,c.focusOffset))return;let d=!1;if((c.extend||e==t)&&!u){c.collapse(l.node,l.offset);try{e!=t&&c.extend(a.node,a.offset),d=!0}catch{}}if(!d){if(e>t){let h=l;l=a,a=h}let f=document.createRange();f.setEnd(a.node,a.offset),f.setStart(l.node,l.offset),c.removeAllRanges(),c.addRange(f)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let r=0,o=0;o<this.children.length;o++){let i=this.children[o],s=r+i.size;if(r==s?e<=s&&t>=r:e<s&&t>r){let l=r+i.border,a=s-i.border;if(e>=l&&t<=a){this.dirty=e==r||t==s?zn:xc,e==l&&t==a&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=Jt:i.markDirty(e-l,t-l);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?zn:Jt}r=s}this.dirty=zn}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let r=e==1?zn:xc;t.dirty<r&&(t.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}}class Sc extends Pr{constructor(e,t,r,o){let i,s=t.type.toDOM;if(typeof s=="function"&&(s=s(r,()=>{if(!i)return o;if(i.parent)return i.parent.posBeforeChild(i)})),!t.type.spec.raw){if(s.nodeType!=1){let l=document.createElement("span");l.appendChild(s),s=l}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(e,[],s,null),this.widget=t,this.widget=t,i=this}matchesWidget(e){return this.dirty==kt&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return t?t(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class eg extends Pr{constructor(e,t,r,o){super(e,[],t,null),this.textDOM=r,this.text=o}get size(){return this.text.length}localPosFromDOM(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class $n extends Pr{constructor(e,t,r,o){super(e,[],r,o),this.mark=t}static create(e,t,r,o){let i=o.nodeViews[t.type.name],s=i&&i(t,o,r);return(!s||!s.dom)&&(s=jt.renderSpec(document,t.type.spec.toDOM(t,r))),new $n(e,t,s.dom,s.contentDOM||s.dom)}parseRule(){return this.dirty&Jt||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=Jt&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),this.dirty!=kt){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=kt}}slice(e,t,r){let o=$n.create(this.parent,this.mark,!0,r),i=this.children,s=this.size;t<s&&(i=Es(i,t,s,r)),e>0&&(i=Es(i,0,e,r));for(let l=0;l<i.length;l++)i[l].parent=o;return o.children=i,o}}class yn extends Pr{constructor(e,t,r,o,i,s,l,a,c){super(e,[],i,s),this.node=t,this.outerDeco=r,this.innerDeco=o,this.nodeDOM=l}static create(e,t,r,o,i,s){let l=i.nodeViews[t.type.name],a,c=l&&l(t,i,()=>{if(!a)return s;if(a.parent)return a.parent.posBeforeChild(a)},r,o),u=c&&c.dom,d=c&&c.contentDOM;if(t.isText){if(!u)u=document.createTextNode(t.text);else if(u.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else u||({dom:u,contentDOM:d}=jt.renderSpec(document,t.type.spec.toDOM(t)));!d&&!t.isText&&u.nodeName!="BR"&&(u.hasAttribute("contenteditable")||(u.contentEditable="false"),t.type.spec.draggable&&(u.draggable=!0));let f=u;return u=Tc(u,r,t),c?a=new tg(e,t,r,o,u,d||null,f,c,i,s+1):t.isText?new Oo(e,t,r,o,u,f,i):new yn(e,t,r,o,u,d||null,f,i,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let t=this.children.length-1;t>=0;t--){let r=this.children[t];if(this.dom.contains(r.dom.parentNode)){e.contentElement=r.dom.parentNode;break}}e.contentElement||(e.getContent=()=>oe.empty)}return e}matchesNode(e,t,r){return this.dirty==kt&&e.eq(this.node)&&Ss(t,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,t){let r=this.node.inlineContent,o=t,i=e.composing?this.localCompositionInfo(e,t):null,s=i&&i.pos>-1?i:null,l=i&&i.pos<0,a=new rg(this,s&&s.node,e);sg(this.node,this.innerDeco,(c,u,d)=>{c.spec.marks?a.syncToMarks(c.spec.marks,r,e):c.type.side>=0&&!d&&a.syncToMarks(u==this.node.childCount?Le.none:this.node.child(u).marks,r,e),a.placeWidget(c,e,o)},(c,u,d,f)=>{a.syncToMarks(c.marks,r,e);let h;a.findNodeMatch(c,u,d,f)||l&&e.state.selection.from>o&&e.state.selection.to<o+c.nodeSize&&(h=a.findIndexWithChild(i.node))>-1&&a.updateNodeAt(c,u,d,h,e)||a.updateNextNode(c,u,d,e,f,o)||a.addNode(c,u,d,e,o),o+=c.nodeSize}),a.syncToMarks([],r,e),this.node.isTextblock&&a.addTextblockHacks(),a.destroyRest(),(a.changed||this.dirty==zn)&&(s&&this.protectLocalComposition(e,s),kc(this.contentDOM,this.children,e),or&&ag(this.dom))}localCompositionInfo(e,t){let{from:r,to:o}=e.state.selection;if(!(e.state.selection instanceof De)||r<t||o>t+this.node.content.size)return null;let i=e.domSelectionRange(),s=lg(i.focusNode,i.focusOffset);if(!s||!this.dom.contains(s.parentNode))return null;if(this.node.inlineContent){let l=s.nodeValue,a=cg(this.node.content,l,r-t,o-t);return a<0?null:{node:s,pos:a,text:l}}else return{node:s,pos:-1,text:""}}protectLocalComposition(e,{node:t,pos:r,text:o}){if(this.getDesc(t))return;let i=t;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let s=new eg(this,i,t,o);e.input.compositionNodes.push(s),this.children=Es(this.children,r,r+o.length,e,s)}update(e,t,r,o){return this.dirty==Jt||!e.sameMarkup(this.node)?!1:(this.updateInner(e,t,r,o),!0)}updateInner(e,t,r,o){this.updateOuterDeco(t),this.node=e,this.innerDeco=r,this.contentDOM&&this.updateChildren(o,this.posAtStart),this.dirty=kt}updateOuterDeco(e){if(Ss(e,this.outerDeco))return;let t=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=wc(this.dom,this.nodeDOM,xs(this.outerDeco,this.node,t),xs(e,this.node,t)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)}deselectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable")}get domAtom(){return this.node.isAtom}}function Ec(n,e,t,r,o){Tc(r,e,n);let i=new yn(void 0,n,e,t,r,r,r,o,0);return i.contentDOM&&i.updateChildren(o,0),i}class Oo extends yn{constructor(e,t,r,o,i,s,l){super(e,t,r,o,i,null,s,l,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,t,r,o){return this.dirty==Jt||this.dirty!=kt&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(t),(this.dirty!=kt||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,o.trackWrites==this.nodeDOM&&(o.trackWrites=null)),this.node=e,this.dirty=kt,!0)}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,r){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,r)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,t,r){let o=this.node.cut(e,t),i=document.createTextNode(o.text);return new Oo(this.parent,o,this.outerDeco,this.innerDeco,i,i,r)}markDirty(e,t){super.markDirty(e,t),this.dom!=this.nodeDOM&&(e==0||t==this.nodeDOM.nodeValue.length)&&(this.dirty=Jt)}get domAtom(){return!1}}class Cc extends Pr{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==kt&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class tg extends yn{constructor(e,t,r,o,i,s,l,a,c,u){super(e,t,r,o,i,s,l,c,u),this.spec=a}update(e,t,r,o){if(this.dirty==Jt)return!1;if(this.spec.update){let i=this.spec.update(e,t,r);return i&&this.updateInner(e,t,r,o),i}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,t,r,o)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,r,o){this.spec.setSelection?this.spec.setSelection(e,t,r):super.setSelection(e,t,r,o)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function kc(n,e,t){let r=n.firstChild,o=!1;for(let i=0;i<e.length;i++){let s=e[i],l=s.dom;if(l.parentNode==n){for(;l!=r;)r=Ac(r),o=!0;r=r.nextSibling}else o=!0,n.insertBefore(l,r);if(s instanceof $n){let a=r?r.previousSibling:n.lastChild;kc(s.contentDOM,s.children,t),r=a?a.nextSibling:n.firstChild}}for(;r;)r=Ac(r),o=!0;o&&t.trackWrites==n&&(t.trackWrites=null)}const Br=function(n){n&&(this.nodeName=n)};Br.prototype=Object.create(null);const Hn=[new Br];function xs(n,e,t){if(n.length==0)return Hn;let r=t?Hn[0]:new Br,o=[r];for(let i=0;i<n.length;i++){let s=n[i].type.attrs;if(s){s.nodeName&&o.push(r=new Br(s.nodeName));for(let l in s){let a=s[l];a!=null&&(t&&o.length==1&&o.push(r=new Br(e.isInline?"span":"div")),l=="class"?r.class=(r.class?r.class+" ":"")+a:l=="style"?r.style=(r.style?r.style+";":"")+a:l!="nodeName"&&(r[l]=a))}}}return o}function wc(n,e,t,r){if(t==Hn&&r==Hn)return e;let o=e;for(let i=0;i<r.length;i++){let s=r[i],l=t[i];if(i){let a;l&&l.nodeName==s.nodeName&&o!=n&&(a=o.parentNode)&&a.nodeName.toLowerCase()==s.nodeName||(a=document.createElement(s.nodeName),a.pmIsDeco=!0,a.appendChild(o),l=Hn[0]),o=a}ng(o,l||Hn[0],s)}return o}function ng(n,e,t){for(let r in e)r!="class"&&r!="style"&&r!="nodeName"&&!(r in t)&&n.removeAttribute(r);for(let r in t)r!="class"&&r!="style"&&r!="nodeName"&&t[r]!=e[r]&&n.setAttribute(r,t[r]);if(e.class!=t.class){let r=e.class?e.class.split(" ").filter(Boolean):[],o=t.class?t.class.split(" ").filter(Boolean):[];for(let i=0;i<r.length;i++)o.indexOf(r[i])==-1&&n.classList.remove(r[i]);for(let i=0;i<o.length;i++)r.indexOf(o[i])==-1&&n.classList.add(o[i]);n.classList.length==0&&n.removeAttribute("class")}if(e.style!=t.style){if(e.style){let r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,o;for(;o=r.exec(e.style);)n.style.removeProperty(o[1])}t.style&&(n.style.cssText+=t.style)}}function Tc(n,e,t){return wc(n,n,Hn,xs(e,t,n.nodeType!=1))}function Ss(n,e){if(n.length!=e.length)return!1;for(let t=0;t<n.length;t++)if(!n[t].type.eq(e[t].type))return!1;return!0}function Ac(n){let e=n.nextSibling;return n.parentNode.removeChild(n),e}class rg{constructor(e,t,r){this.lock=t,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=og(e.node.content,e)}destroyBetween(e,t){if(e!=t){for(let r=e;r<t;r++)this.top.children[r].destroy();this.top.children.splice(e,t-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,t,r){let o=0,i=this.stack.length>>1,s=Math.min(i,e.length);for(;o<s&&(o==i-1?this.top:this.stack[o+1<<1]).matchesMark(e[o])&&e[o].type.spec.spanning!==!1;)o++;for(;o<i;)this.destroyRest(),this.top.dirty=kt,this.index=this.stack.pop(),this.top=this.stack.pop(),i--;for(;i<e.length;){this.stack.push(this.top,this.index+1);let l=-1;for(let a=this.index;a<Math.min(this.index+3,this.top.children.length);a++){let c=this.top.children[a];if(c.matchesMark(e[i])&&!this.isLocked(c.dom)){l=a;break}}if(l>-1)l>this.index&&(this.changed=!0,this.destroyBetween(this.index,l)),this.top=this.top.children[this.index];else{let a=$n.create(this.top,e[i],t,r);this.top.children.splice(this.index,0,a),this.top=a,this.changed=!0}this.index=0,i++}}findNodeMatch(e,t,r,o){let i=-1,s;if(o>=this.preMatch.index&&(s=this.preMatch.matches[o-this.preMatch.index]).parent==this.top&&s.matchesNode(e,t,r))i=this.top.children.indexOf(s,this.index);else for(let l=this.index,a=Math.min(this.top.children.length,l+5);l<a;l++){let c=this.top.children[l];if(c.matchesNode(e,t,r)&&!this.preMatch.matched.has(c)){i=l;break}}return i<0?!1:(this.destroyBetween(this.index,i),this.index++,!0)}updateNodeAt(e,t,r,o,i){let s=this.top.children[o];return s.dirty==Jt&&s.dom==s.contentDOM&&(s.dirty=zn),s.update(e,t,r,i)?(this.destroyBetween(this.index,o),this.index++,!0):!1}findIndexWithChild(e){for(;;){let t=e.parentNode;if(!t)return-1;if(t==this.top.contentDOM){let r=e.pmViewDesc;if(r){for(let o=this.index;o<this.top.children.length;o++)if(this.top.children[o]==r)return o}return-1}e=t}}updateNextNode(e,t,r,o,i,s){for(let l=this.index;l<this.top.children.length;l++){let a=this.top.children[l];if(a instanceof yn){let c=this.preMatch.matched.get(a);if(c!=null&&c!=i)return!1;let u=a.dom,d,f=this.isLocked(u)&&!(e.isText&&a.node&&a.node.isText&&a.nodeDOM.nodeValue==e.text&&a.dirty!=Jt&&Ss(t,a.outerDeco));if(!f&&a.update(e,t,r,o))return this.destroyBetween(this.index,l),a.dom!=u&&(this.changed=!0),this.index++,!0;if(!f&&(d=this.recreateWrapper(a,e,t,r,o,s)))return this.top.children[this.index]=d,d.contentDOM&&(d.dirty=zn,d.updateChildren(o,s+1),d.dirty=kt),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,t,r,o,i,s){if(e.dirty||t.isAtom||!e.children.length||!e.node.content.eq(t.content))return null;let l=yn.create(this.top,t,r,o,i,s);if(l.contentDOM){l.children=e.children,e.children=[];for(let a of l.children)a.parent=l}return e.destroy(),l}addNode(e,t,r,o,i){let s=yn.create(this.top,e,t,r,o,i);s.contentDOM&&s.updateChildren(o,i+1),this.top.children.splice(this.index++,0,s),this.changed=!0}placeWidget(e,t,r){let o=this.index<this.top.children.length?this.top.children[this.index]:null;if(o&&o.matchesWidget(e)&&(e==o.widget||!o.widget.type.toDOM.parentNode))this.index++;else{let i=new Sc(this.top,e,t,r);this.top.children.splice(this.index++,0,i),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],t=this.top;for(;e instanceof $n;)t=e,e=t.children[t.children.length-1];(!e||!(e instanceof Oo)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((st||tt)&&e&&e.dom.contentEditable=="false"&&this.addHackNode("IMG",t),this.addHackNode("BR",this.top))}addHackNode(e,t){if(t==this.top&&this.index<t.children.length&&t.children[this.index].matchesHack(e))this.index++;else{let r=document.createElement(e);e=="IMG"&&(r.className="ProseMirror-separator",r.alt=""),e=="BR"&&(r.className="ProseMirror-trailingBreak");let o=new Cc(this.top,[],r,null);t!=this.top?t.children.push(o):t.children.splice(this.index++,0,o),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function og(n,e){let t=e,r=t.children.length,o=n.childCount,i=new Map,s=[];e:for(;o>0;){let l;for(;;)if(r){let c=t.children[r-1];if(c instanceof $n)t=c,r=c.children.length;else{l=c,r--;break}}else{if(t==e)break e;r=t.parent.children.indexOf(t),t=t.parent}let a=l.node;if(a){if(a!=n.child(o-1))break;--o,i.set(l,o),s.push(l)}}return{index:o,matched:i,matches:s.reverse()}}function ig(n,e){return n.type.side-e.type.side}function sg(n,e,t,r){let o=e.locals(n),i=0;if(o.length==0){for(let c=0;c<n.childCount;c++){let u=n.child(c);r(u,o,e.forChild(i,u),c),i+=u.nodeSize}return}let s=0,l=[],a=null;for(let c=0;;){let u,d;for(;s<o.length&&o[s].to==i;){let y=o[s++];y.widget&&(u?(d||(d=[u])).push(y):u=y)}if(u)if(d){d.sort(ig);for(let y=0;y<d.length;y++)t(d[y],c,!!a)}else t(u,c,!!a);let f,h;if(a)h=-1,f=a,a=null;else if(c<n.childCount)h=c,f=n.child(c++);else break;for(let y=0;y<l.length;y++)l[y].to<=i&&l.splice(y--,1);for(;s<o.length&&o[s].from<=i&&o[s].to>i;)l.push(o[s++]);let p=i+f.nodeSize;if(f.isText){let y=p;s<o.length&&o[s].from<y&&(y=o[s].from);for(let S=0;S<l.length;S++)l[S].to<y&&(y=l[S].to);y<p&&(a=f.cut(y-i),f=f.cut(0,y-i),p=y,h=-1)}let g=f.isInline&&!f.isLeaf?l.filter(y=>!y.inline):l.slice();r(f,g,e.forChild(i,f),h),i=p}}function ag(n){if(n.nodeName=="UL"||n.nodeName=="OL"){let e=n.style.cssText;n.style.cssText=e+"; list-style: square !important",window.getComputedStyle(n).listStyle,n.style.cssText=e}}function lg(n,e){for(;;){if(n.nodeType==3)return n;if(n.nodeType==1&&e>0){if(n.childNodes.length>e&&n.childNodes[e].nodeType==3)return n.childNodes[e];n=n.childNodes[e-1],e=Kt(n)}else if(n.nodeType==1&&e<n.childNodes.length)n=n.childNodes[e],e=0;else return null}}function cg(n,e,t,r){for(let o=0,i=0;o<n.childCount&&i<=r;){let s=n.child(o++),l=i;if(i+=s.nodeSize,!s.isText)continue;let a=s.text;for(;o<n.childCount;){let c=n.child(o++);if(i+=c.nodeSize,!c.isText)break;a+=c.text}if(i>=t){if(i>=r&&a.slice(r-e.length-l,r-l)==e)return r-e.length;let c=l<r?a.lastIndexOf(e,r-l-1):-1;if(c>=0&&c+e.length+l>=t)return l+c;if(t==r&&a.length>=r+e.length-l&&a.slice(r-l,r-l+e.length)==e)return r}}return-1}function Es(n,e,t,r,o){let i=[];for(let s=0,l=0;s<n.length;s++){let a=n[s],c=l,u=l+=a.size;c>=t||u<=e?i.push(a):(c<e&&i.push(a.slice(0,e-c,r)),o&&(i.push(o),o=void 0),u>t&&i.push(a.slice(t-c,a.size,r)))}return i}function Cs(n,e=null){let t=n.domSelectionRange(),r=n.state.doc;if(!t.focusNode)return null;let o=n.docView.nearestDesc(t.focusNode),i=o&&o.size==0,s=n.docView.posFromDOM(t.focusNode,t.focusOffset,1);if(s<0)return null;let l=r.resolve(s),a,c;if(Ao(t)){for(a=l;o&&!o.node;)o=o.parent;let u=o.node;if(o&&u.isAtom&&Se.isSelectable(u)&&o.parent&&!(u.isInline&&Dm(t.focusNode,t.focusOffset,o.dom))){let d=o.posBefore;c=new Se(s==d?l:r.resolve(d))}}else{let u=n.docView.posFromDOM(t.anchorNode,t.anchorOffset,1);if(u<0)return null;a=r.resolve(u)}if(!c){let u=e=="pointer"||n.state.selection.head<l.pos&&!i?1:-1;c=ws(n,a,l,u)}return c}function Oc(n){return n.editable?n.hasFocus():Pc(n)&&document.activeElement&&document.activeElement.contains(n.dom)}function on(n,e=!1){let t=n.state.selection;if(Rc(n,t),!!Oc(n)){if(!e&&n.input.mouseDown&&n.input.mouseDown.allowDefault&&tt){let r=n.domSelectionRange(),o=n.domObserver.currentSelection;if(r.anchorNode&&o.anchorNode&&Fn(r.anchorNode,r.anchorOffset,o.anchorNode,o.anchorOffset)){n.input.mouseDown.delayedSelectionSync=!0,n.domObserver.setCurSelection();return}}if(n.domObserver.disconnectSelection(),n.cursorWrapper)dg(n);else{let{anchor:r,head:o}=t,i,s;Mc&&!(t instanceof De)&&(t.$from.parent.inlineContent||(i=Ic(n,t.from)),!t.empty&&!t.$from.parent.inlineContent&&(s=Ic(n,t.to))),n.docView.setSelection(r,o,n.root,e),Mc&&(i&&Nc(i),s&&Nc(s)),t.visible?n.dom.classList.remove("ProseMirror-hideselection"):(n.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&ug(n))}n.domObserver.setCurSelection(),n.domObserver.connectSelection()}}const Mc=st||tt&&Bm<63;function Ic(n,e){let{node:t,offset:r}=n.docView.domFromPos(e,0),o=r<t.childNodes.length?t.childNodes[r]:null,i=r?t.childNodes[r-1]:null;if(st&&o&&o.contentEditable=="false")return ks(o);if((!o||o.contentEditable=="false")&&(!i||i.contentEditable=="false")){if(o)return ks(o);if(i)return ks(i)}}function ks(n){return n.contentEditable="true",st&&n.draggable&&(n.draggable=!1,n.wasDraggable=!0),n}function Nc(n){n.contentEditable="false",n.wasDraggable&&(n.draggable=!0,n.wasDraggable=null)}function ug(n){let e=n.dom.ownerDocument;e.removeEventListener("selectionchange",n.input.hideSelectionGuard);let t=n.domSelectionRange(),r=t.anchorNode,o=t.anchorOffset;e.addEventListener("selectionchange",n.input.hideSelectionGuard=()=>{(t.anchorNode!=r||t.anchorOffset!=o)&&(e.removeEventListener("selectionchange",n.input.hideSelectionGuard),setTimeout(()=>{(!Oc(n)||n.state.selection.visible)&&n.dom.classList.remove("ProseMirror-hideselection")},20))})}function dg(n){let e=n.domSelection(),t=document.createRange(),r=n.cursorWrapper.dom,o=r.nodeName=="IMG";o?t.setEnd(r.parentNode,it(r)+1):t.setEnd(r,0),t.collapse(!1),e.removeAllRanges(),e.addRange(t),!o&&!n.state.selection.visible&&pt&&mn<=11&&(r.disabled=!0,r.disabled=!1)}function Rc(n,e){if(e instanceof Se){let t=n.docView.descAt(e.from);t!=n.lastSelectedViewDesc&&(Dc(n),t&&t.selectNode(),n.lastSelectedViewDesc=t)}else Dc(n)}function Dc(n){n.lastSelectedViewDesc&&(n.lastSelectedViewDesc.parent&&n.lastSelectedViewDesc.deselectNode(),n.lastSelectedViewDesc=void 0)}function ws(n,e,t,r){return n.someProp("createSelectionBetween",o=>o(n,e,t))||De.between(e,t,r)}function Lc(n){return n.editable&&!n.hasFocus()?!1:Pc(n)}function Pc(n){let e=n.domSelectionRange();if(!e.anchorNode)return!1;try{return n.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(n.editable||n.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function fg(n){let e=n.docView.domFromPos(n.state.selection.anchor,0),t=n.domSelectionRange();return Fn(e.node,e.offset,t.anchorNode,t.anchorOffset)}function Ts(n,e){let{$anchor:t,$head:r}=n.selection,o=e>0?t.max(r):t.min(r),i=o.parent.inlineContent?o.depth?n.doc.resolve(e>0?o.after():o.before()):null:o;return i&&Re.findFrom(i,e)}function vn(n,e){return n.dispatch(n.state.tr.setSelection(e).scrollIntoView()),!0}function Bc(n,e,t){let r=n.state.selection;if(r instanceof De)if(t.indexOf("s")>-1){let{$head:o}=r,i=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let s=n.state.doc.resolve(o.pos+i.nodeSize*(e<0?-1:1));return vn(n,new De(r.$anchor,s))}else if(r.empty){if(n.endOfTextblock(e>0?"forward":"backward")){let o=Ts(n.state,e);return o&&o instanceof Se?vn(n,o):!1}else if(!(Ct&&t.indexOf("m")>-1)){let o=r.$head,i=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter,s;if(!i||i.isText)return!1;let l=e<0?o.pos-i.nodeSize:o.pos;return i.isAtom||(s=n.docView.descAt(l))&&!s.contentDOM?Se.isSelectable(i)?vn(n,new Se(e<0?n.state.doc.resolve(o.pos-i.nodeSize):o)):Dr?vn(n,new De(n.state.doc.resolve(e<0?l:l+i.nodeSize))):!1:!1}}else return!1;else{if(r instanceof Se&&r.node.isInline)return vn(n,new De(e>0?r.$to:r.$from));{let o=Ts(n.state,e);return o?vn(n,o):!1}}}function Mo(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function Fr(n,e){let t=n.pmViewDesc;return t&&t.size==0&&(e<0||n.nextSibling||n.nodeName!="BR")}function sr(n,e){return e<0?pg(n):hg(n)}function pg(n){let e=n.domSelectionRange(),t=e.focusNode,r=e.focusOffset;if(!t)return;let o,i,s=!1;for(Vt&&t.nodeType==1&&r<Mo(t)&&Fr(t.childNodes[r],-1)&&(s=!0);;)if(r>0){if(t.nodeType!=1)break;{let l=t.childNodes[r-1];if(Fr(l,-1))o=t,i=--r;else if(l.nodeType==3)t=l,r=t.nodeValue.length;else break}}else{if(Fc(t))break;{let l=t.previousSibling;for(;l&&Fr(l,-1);)o=t.parentNode,i=it(l),l=l.previousSibling;if(l)t=l,r=Mo(t);else{if(t=t.parentNode,t==n.dom)break;r=0}}}s?As(n,t,r):o&&As(n,o,i)}function hg(n){let e=n.domSelectionRange(),t=e.focusNode,r=e.focusOffset;if(!t)return;let o=Mo(t),i,s;for(;;)if(r<o){if(t.nodeType!=1)break;let l=t.childNodes[r];if(Fr(l,1))i=t,s=++r;else break}else{if(Fc(t))break;{let l=t.nextSibling;for(;l&&Fr(l,1);)i=l.parentNode,s=it(l)+1,l=l.nextSibling;if(l)t=l,r=0,o=Mo(t);else{if(t=t.parentNode,t==n.dom)break;r=o=0}}}i&&As(n,i,s)}function Fc(n){let e=n.pmViewDesc;return e&&e.node&&e.node.isBlock}function mg(n,e){for(;n&&e==n.childNodes.length&&!hs(n);)e=it(n)+1,n=n.parentNode;for(;n&&e<n.childNodes.length;){let t=n.childNodes[e];if(t.nodeType==3)return t;if(t.nodeType==1&&t.contentEditable=="false")break;n=t,e=0}}function gg(n,e){for(;n&&!e&&!hs(n);)e=it(n),n=n.parentNode;for(;n&&e;){let t=n.childNodes[e-1];if(t.nodeType==3)return t;if(t.nodeType==1&&t.contentEditable=="false")break;n=t,e=n.childNodes.length}}function As(n,e,t){if(e.nodeType!=3){let i,s;(s=mg(e,t))?(e=s,t=0):(i=gg(e,t))&&(e=i,t=i.nodeValue.length)}let r=n.domSelection();if(Ao(r)){let i=document.createRange();i.setEnd(e,t),i.setStart(e,t),r.removeAllRanges(),r.addRange(i)}else r.extend&&r.extend(e,t);n.domObserver.setCurSelection();let{state:o}=n;setTimeout(()=>{n.state==o&&on(n)},50)}function Vc(n,e){let t=n.state.doc.resolve(e);if(!(tt||Fm)&&t.parent.inlineContent){let o=n.coordsAtPos(e);if(e>t.start()){let i=n.coordsAtPos(e-1),s=(i.top+i.bottom)/2;if(s>o.top&&s<o.bottom&&Math.abs(i.left-o.left)>1)return i.left<o.left?"ltr":"rtl"}if(e<t.end()){let i=n.coordsAtPos(e+1),s=(i.top+i.bottom)/2;if(s>o.top&&s<o.bottom&&Math.abs(i.left-o.left)>1)return i.left>o.left?"ltr":"rtl"}}return getComputedStyle(n.dom).direction=="rtl"?"rtl":"ltr"}function zc(n,e,t){let r=n.state.selection;if(r instanceof De&&!r.empty||t.indexOf("s")>-1||Ct&&t.indexOf("m")>-1)return!1;let{$from:o,$to:i}=r;if(!o.parent.inlineContent||n.endOfTextblock(e<0?"up":"down")){let s=Ts(n.state,e);if(s&&s instanceof Se)return vn(n,s)}if(!o.parent.inlineContent){let s=e<0?o:i,l=r instanceof Bt?Re.near(s,e):Re.findFrom(s,e);return l?vn(n,l):!1}return!1}function $c(n,e){if(!(n.state.selection instanceof De))return!0;let{$head:t,$anchor:r,empty:o}=n.state.selection;if(!t.sameParent(r))return!0;if(!o)return!1;if(n.endOfTextblock(e>0?"forward":"backward"))return!0;let i=!t.textOffset&&(e<0?t.nodeBefore:t.nodeAfter);if(i&&!i.isText){let s=n.state.tr;return e<0?s.delete(t.pos-i.nodeSize,t.pos):s.delete(t.pos,t.pos+i.nodeSize),n.dispatch(s),!0}return!1}function Hc(n,e,t){n.domObserver.stop(),e.contentEditable=t,n.domObserver.start()}function yg(n){if(!st||n.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:t}=n.domSelectionRange();if(e&&e.nodeType==1&&t==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let r=e.firstChild;Hc(n,r,"true"),setTimeout(()=>Hc(n,r,"false"),20)}return!1}function vg(n){let e="";return n.ctrlKey&&(e+="c"),n.metaKey&&(e+="m"),n.altKey&&(e+="a"),n.shiftKey&&(e+="s"),e}function bg(n,e){let t=e.keyCode,r=vg(e);if(t==8||Ct&&t==72&&r=="c")return $c(n,-1)||sr(n,-1);if(t==46&&!e.shiftKey||Ct&&t==68&&r=="c")return $c(n,1)||sr(n,1);if(t==13||t==27)return!0;if(t==37||Ct&&t==66&&r=="c"){let o=t==37?Vc(n,n.state.selection.from)=="ltr"?-1:1:-1;return Bc(n,o,r)||sr(n,o)}else if(t==39||Ct&&t==70&&r=="c"){let o=t==39?Vc(n,n.state.selection.from)=="ltr"?1:-1:1;return Bc(n,o,r)||sr(n,o)}else{if(t==38||Ct&&t==80&&r=="c")return zc(n,-1,r)||sr(n,-1);if(t==40||Ct&&t==78&&r=="c")return yg(n)||zc(n,1,r)||sr(n,1);if(r==(Ct?"m":"c")&&(t==66||t==73||t==89||t==90))return!0}return!1}function Uc(n,e){n.someProp("transformCopied",h=>{e=h(e,n)});let t=[],{content:r,openStart:o,openEnd:i}=e;for(;o>1&&i>1&&r.childCount==1&&r.firstChild.childCount==1;){o--,i--;let h=r.firstChild;t.push(h.type.name,h.attrs!=h.type.defaultAttrs?h.attrs:null),r=h.content}let s=n.someProp("clipboardSerializer")||jt.fromSchema(n.state.schema),l=Zc(),a=l.createElement("div");a.appendChild(s.serializeFragment(r,{document:l}));let c=a.firstChild,u,d=0;for(;c&&c.nodeType==1&&(u=Yc[c.nodeName.toLowerCase()]);){for(let h=u.length-1;h>=0;h--){let p=l.createElement(u[h]);for(;a.firstChild;)p.appendChild(a.firstChild);a.appendChild(p),d++}c=a.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${o} ${i}${d?` -${d}`:""} ${JSON.stringify(t)}`);let f=n.someProp("clipboardTextSerializer",h=>h(e,n))||e.content.textBetween(0,e.content.size,`
|
|
16
|
-
|
|
17
|
-
`);return{dom:a,text:f}}function
|
|
18
|
-
`))),0,0):fe.empty;let d=n.someProp("clipboardTextParser",f=>f(e,o,r,n));if(d)l=d;else{let f=o.marks(),{schema:h}=n.state,p=jt.fromSchema(h);s=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(g=>{let y=s.appendChild(document.createElement("p"));g&&y.appendChild(p.serializeNode(h.text(g,f)))})}}else n.someProp("transformPastedHTML",d=>{t=d(t,n)}),s=Eg(t),Dr&&Cg(s);let c=s&&s.querySelector("[data-pm-slice]"),u=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(u&&u[3])for(let d=+u[3];d>0;d--){let f=s.firstChild;for(;f&&f.nodeType!=1;)f=f.nextSibling;if(!f)break;s=f}if(l||(l=(n.someProp("clipboardParser")||n.someProp("domParser")||Zn.fromSchema(n.state.schema)).parseSlice(s,{preserveWhitespace:!!(a||u),context:o,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!xg.test(f.parentNode.nodeName)?{ignore:!0}:null}})),u)l=kg(Jc(l,+u[1],+u[2]),u[4]);else if(l=fe.maxOpen(Sg(l.content,o),!0),l.openStart||l.openEnd){let d=0,f=0;for(let h=l.content.firstChild;d<l.openStart&&!h.type.spec.isolating;d++,h=h.firstChild);for(let h=l.content.lastChild;f<l.openEnd&&!h.type.spec.isolating;f++,h=h.lastChild);l=Jc(l,d,f)}return n.someProp("transformPasted",d=>{l=d(l,n)}),l}const xg=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function Sg(n,e){if(n.childCount<2)return n;for(let t=e.depth;t>=0;t--){let o=e.node(t).contentMatchAt(e.index(t)),i,s=[];if(n.forEach(l=>{if(!s)return;let a=o.findWrapping(l.type),c;if(!a)return s=null;if(c=s.length&&i.length&&Kc(a,i,l,s[s.length-1],0))s[s.length-1]=c;else{s.length&&(s[s.length-1]=Gc(s[s.length-1],i.length));let u=Wc(l,a);s.push(u),o=o.matchType(u.type),i=a}}),s)return oe.from(s)}return n}function Wc(n,e,t=0){for(let r=e.length-1;r>=t;r--)n=e[r].create(null,oe.from(n));return n}function Kc(n,e,t,r,o){if(o<n.length&&o<e.length&&n[o]==e[o]){let i=Kc(n,e,t,r.lastChild,o+1);if(i)return r.copy(r.content.replaceChild(r.childCount-1,i));if(r.contentMatchAt(r.childCount).matchType(o==n.length-1?t.type:n[o+1]))return r.copy(r.content.append(oe.from(Wc(t,n,o+1))))}}function Gc(n,e){if(e==0)return n;let t=n.content.replaceChild(n.childCount-1,Gc(n.lastChild,e-1)),r=n.contentMatchAt(n.childCount).fillBefore(oe.empty,!0);return n.copy(t.append(r))}function Os(n,e,t,r,o,i){let s=e<0?n.firstChild:n.lastChild,l=s.content;return n.childCount>1&&(i=0),o<r-1&&(l=Os(l,e,t,r,o+1,i)),o>=t&&(l=e<0?s.contentMatchAt(0).fillBefore(l,i<=o).append(l):l.append(s.contentMatchAt(s.childCount).fillBefore(oe.empty,!0))),n.replaceChild(e<0?0:n.childCount-1,s.copy(l))}function Jc(n,e,t){return e<n.openStart&&(n=new fe(Os(n.content,-1,e,n.openStart,0,n.openEnd),e,n.openEnd)),t<n.openEnd&&(n=new fe(Os(n.content,1,t,n.openEnd,0,0),n.openStart,t)),n}const Yc={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let Xc=null;function Zc(){return Xc||(Xc=document.implementation.createHTMLDocument("title"))}function Eg(n){let e=/^(\s*<meta [^>]*>)*/.exec(n);e&&(n=n.slice(e[0].length));let t=Zc().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(n),o;if((o=r&&Yc[r[1].toLowerCase()])&&(n=o.map(i=>"<"+i+">").join("")+n+o.map(i=>"</"+i+">").reverse().join("")),t.innerHTML=n,o)for(let i=0;i<o.length;i++)t=t.querySelector(o[i])||t;return t}function Cg(n){let e=n.querySelectorAll(tt?"span:not([class]):not([style])":"span.Apple-converted-space");for(let t=0;t<e.length;t++){let r=e[t];r.childNodes.length==1&&r.textContent==" "&&r.parentNode&&r.parentNode.replaceChild(n.ownerDocument.createTextNode(" "),r)}}function kg(n,e){if(!n.size)return n;let t=n.content.firstChild.type.schema,r;try{r=JSON.parse(e)}catch{return n}let{content:o,openStart:i,openEnd:s}=n;for(let l=r.length-2;l>=0;l-=2){let a=t.nodes[r[l]];if(!a||a.hasRequiredAttrs())break;o=oe.from(a.create(r[l+1],o)),i++,s++}return new fe(o,i,s)}const at={},lt={},wg={touchstart:!0,touchmove:!0};class Tg{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastAndroidDelete=0,this.composing=!1,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function Ag(n){for(let e in at){let t=at[e];n.dom.addEventListener(e,n.input.eventHandlers[e]=r=>{Mg(n,r)&&!Is(n,r)&&(n.editable||!(r.type in lt))&&t(n,r)},wg[e]?{passive:!0}:void 0)}st&&n.dom.addEventListener("input",()=>null),Ms(n)}function bn(n,e){n.input.lastSelectionOrigin=e,n.input.lastSelectionTime=Date.now()}function Og(n){n.domObserver.stop();for(let e in n.input.eventHandlers)n.dom.removeEventListener(e,n.input.eventHandlers[e]);clearTimeout(n.input.composingTimeout),clearTimeout(n.input.lastIOSEnterFallbackTimeout)}function Ms(n){n.someProp("handleDOMEvents",e=>{for(let t in e)n.input.eventHandlers[t]||n.dom.addEventListener(t,n.input.eventHandlers[t]=r=>Is(n,r))})}function Is(n,e){return n.someProp("handleDOMEvents",t=>{let r=t[e.type];return r?r(n,e)||e.defaultPrevented:!1})}function Mg(n,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target;t!=n.dom;t=t.parentNode)if(!t||t.nodeType==11||t.pmViewDesc&&t.pmViewDesc.stopEvent(e))return!1;return!0}function Ig(n,e){!Is(n,e)&&at[e.type]&&(n.editable||!(e.type in lt))&&at[e.type](n,e)}lt.keydown=(n,e)=>{let t=e;if(n.input.shiftKey=t.keyCode==16||t.shiftKey,!_c(n,t)&&(n.input.lastKeyCode=t.keyCode,n.input.lastKeyCodeTime=Date.now(),!(zt&&tt&&t.keyCode==13)))if(t.keyCode!=229&&n.domObserver.forceFlush(),or&&t.keyCode==13&&!t.ctrlKey&&!t.altKey&&!t.metaKey){let r=Date.now();n.input.lastIOSEnter=r,n.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{n.input.lastIOSEnter==r&&(n.someProp("handleKeyDown",o=>o(n,Vn(13,"Enter"))),n.input.lastIOSEnter=0)},200)}else n.someProp("handleKeyDown",r=>r(n,t))||bg(n,t)?t.preventDefault():bn(n,"key")},lt.keyup=(n,e)=>{e.keyCode==16&&(n.input.shiftKey=!1)},lt.keypress=(n,e)=>{let t=e;if(_c(n,t)||!t.charCode||t.ctrlKey&&!t.altKey||Ct&&t.metaKey)return;if(n.someProp("handleKeyPress",o=>o(n,t))){t.preventDefault();return}let r=n.state.selection;if(!(r instanceof De)||!r.$from.sameParent(r.$to)){let o=String.fromCharCode(t.charCode);!/[\r\n]/.test(o)&&!n.someProp("handleTextInput",i=>i(n,r.$from.pos,r.$to.pos,o))&&n.dispatch(n.state.tr.insertText(o).scrollIntoView()),t.preventDefault()}};function Io(n){return{left:n.clientX,top:n.clientY}}function Ng(n,e){let t=e.x-n.clientX,r=e.y-n.clientY;return t*t+r*r<100}function Ns(n,e,t,r,o){if(r==-1)return!1;let i=n.state.doc.resolve(r);for(let s=i.depth+1;s>0;s--)if(n.someProp(e,l=>s>i.depth?l(n,t,i.nodeAfter,i.before(s),o,!0):l(n,t,i.node(s),i.before(s),o,!1)))return!0;return!1}function ar(n,e,t){n.focused||n.focus();let r=n.state.tr.setSelection(e);t=="pointer"&&r.setMeta("pointer",!0),n.dispatch(r)}function Rg(n,e){if(e==-1)return!1;let t=n.state.doc.resolve(e),r=t.nodeAfter;return r&&r.isAtom&&Se.isSelectable(r)?(ar(n,new Se(t),"pointer"),!0):!1}function Dg(n,e){if(e==-1)return!1;let t=n.state.selection,r,o;t instanceof Se&&(r=t.node);let i=n.state.doc.resolve(e);for(let s=i.depth+1;s>0;s--){let l=s>i.depth?i.nodeAfter:i.node(s);if(Se.isSelectable(l)){r&&t.$from.depth>0&&s>=t.$from.depth&&i.before(t.$from.depth+1)==t.$from.pos?o=i.before(t.$from.depth):o=i.before(s);break}}return o!=null?(ar(n,Se.create(n.state.doc,o),"pointer"),!0):!1}function Lg(n,e,t,r,o){return Ns(n,"handleClickOn",e,t,r)||n.someProp("handleClick",i=>i(n,e,r))||(o?Dg(n,t):Rg(n,t))}function Pg(n,e,t,r){return Ns(n,"handleDoubleClickOn",e,t,r)||n.someProp("handleDoubleClick",o=>o(n,e,r))}function Bg(n,e,t,r){return Ns(n,"handleTripleClickOn",e,t,r)||n.someProp("handleTripleClick",o=>o(n,e,r))||Fg(n,t,r)}function Fg(n,e,t){if(t.button!=0)return!1;let r=n.state.doc;if(e==-1)return r.inlineContent?(ar(n,De.create(r,0,r.content.size),"pointer"),!0):!1;let o=r.resolve(e);for(let i=o.depth+1;i>0;i--){let s=i>o.depth?o.nodeAfter:o.node(i),l=o.before(i);if(s.inlineContent)ar(n,De.create(r,l+1,l+1+s.content.size),"pointer");else if(Se.isSelectable(s))ar(n,Se.create(r,l),"pointer");else continue;return!0}}function Rs(n){return No(n)}const Qc=Ct?"metaKey":"ctrlKey";at.mousedown=(n,e)=>{let t=e;n.input.shiftKey=t.shiftKey;let r=Rs(n),o=Date.now(),i="singleClick";o-n.input.lastClick.time<500&&Ng(t,n.input.lastClick)&&!t[Qc]&&(n.input.lastClick.type=="singleClick"?i="doubleClick":n.input.lastClick.type=="doubleClick"&&(i="tripleClick")),n.input.lastClick={time:o,x:t.clientX,y:t.clientY,type:i};let s=n.posAtCoords(Io(t));s&&(i=="singleClick"?(n.input.mouseDown&&n.input.mouseDown.done(),n.input.mouseDown=new Vg(n,s,t,!!r)):(i=="doubleClick"?Pg:Bg)(n,s.pos,s.inside,t)?t.preventDefault():bn(n,"pointer"))};class Vg{constructor(e,t,r,o){this.view=e,this.pos=t,this.event=r,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!r[Qc],this.allowDefault=r.shiftKey;let i,s;if(t.inside>-1)i=e.state.doc.nodeAt(t.inside),s=t.inside;else{let u=e.state.doc.resolve(t.pos);i=u.parent,s=u.depth?u.before():0}const l=o?null:r.target,a=l?e.docView.nearestDesc(l,!0):null;this.target=a?a.dom:null;let{selection:c}=e.state;(r.button==0&&i.type.spec.draggable&&i.type.spec.selectable!==!1||c instanceof Se&&c.from<=s&&c.to>s)&&(this.mightDrag={node:i,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Vt&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),bn(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>on(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(Io(e))),this.updateAllowDefault(e),this.allowDefault||!t?bn(this.view,"pointer"):Lg(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||st&&this.mightDrag&&!this.mightDrag.node.isAtom||tt&&!this.view.state.selection.visible&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(ar(this.view,Re.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):bn(this.view,"pointer")}move(e){this.updateAllowDefault(e),bn(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}at.touchstart=n=>{n.input.lastTouch=Date.now(),Rs(n),bn(n,"pointer")},at.touchmove=n=>{n.input.lastTouch=Date.now(),bn(n,"pointer")},at.contextmenu=n=>Rs(n);function _c(n,e){return n.composing?!0:st&&Math.abs(e.timeStamp-n.input.compositionEndedAt)<500?(n.input.compositionEndedAt=-2e8,!0):!1}const zg=zt?5e3:-1;lt.compositionstart=lt.compositionupdate=n=>{if(!n.composing){n.domObserver.flush();let{state:e}=n,t=e.selection.$from;if(e.selection.empty&&(e.storedMarks||!t.textOffset&&t.parentOffset&&t.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)))n.markCursor=n.state.storedMarks||t.marks(),No(n,!0),n.markCursor=null;else if(No(n),Vt&&e.selection.empty&&t.parentOffset&&!t.textOffset&&t.nodeBefore.marks.length){let r=n.domSelectionRange();for(let o=r.focusNode,i=r.focusOffset;o&&o.nodeType==1&&i!=0;){let s=i<0?o.lastChild:o.childNodes[i-1];if(!s)break;if(s.nodeType==3){n.domSelection().collapse(s,s.nodeValue.length);break}else o=s,i=-1}}n.input.composing=!0}qc(n,zg)},lt.compositionend=(n,e)=>{n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=e.timeStamp,n.input.compositionPendingChanges=n.domObserver.pendingRecords().length?n.input.compositionID:0,n.input.compositionPendingChanges&&Promise.resolve().then(()=>n.domObserver.flush()),n.input.compositionID++,qc(n,20))};function qc(n,e){clearTimeout(n.input.composingTimeout),e>-1&&(n.input.composingTimeout=setTimeout(()=>No(n),e))}function eu(n){for(n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=$g());n.input.compositionNodes.length>0;)n.input.compositionNodes.pop().markParentsDirty()}function $g(){let n=document.createEvent("Event");return n.initEvent("event",!0,!0),n.timeStamp}function No(n,e=!1){if(!(zt&&n.domObserver.flushingSoon>=0)){if(n.domObserver.forceFlush(),eu(n),e||n.docView&&n.docView.dirty){let t=Cs(n);return t&&!t.eq(n.state.selection)?n.dispatch(n.state.tr.setSelection(t)):n.updateState(n.state),!0}return!1}}function Hg(n,e){if(!n.dom.parentNode)return;let t=n.dom.parentNode.appendChild(document.createElement("div"));t.appendChild(e),t.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(e),n.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout(()=>{t.parentNode&&t.parentNode.removeChild(t),n.focus()},50)}const Vr=pt&&mn<15||or&&Vm<604;at.copy=lt.cut=(n,e)=>{let t=e,r=n.state.selection,o=t.type=="cut";if(r.empty)return;let i=Vr?null:t.clipboardData,s=r.content(),{dom:l,text:a}=Uc(n,s);i?(t.preventDefault(),i.clearData(),i.setData("text/html",l.innerHTML),i.setData("text/plain",a)):Hg(n,l),o&&n.dispatch(n.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function Ug(n){return n.openStart==0&&n.openEnd==0&&n.content.childCount==1?n.content.firstChild:null}function jg(n,e){if(!n.dom.parentNode)return;let t=n.input.shiftKey||n.state.selection.$from.parent.type.spec.code,r=n.dom.parentNode.appendChild(document.createElement(t?"textarea":"div"));t||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let o=n.input.shiftKey&&n.input.lastKeyCode!=45;setTimeout(()=>{n.focus(),r.parentNode&&r.parentNode.removeChild(r),t?zr(n,r.value,null,o,e):zr(n,r.textContent,r.innerHTML,o,e)},50)}function zr(n,e,t,r,o){let i=jc(n,e,t,r,n.state.selection.$from);if(n.someProp("handlePaste",a=>a(n,o,i||fe.empty)))return!0;if(!i)return!1;let s=Ug(i),l=s?n.state.tr.replaceSelectionWith(s,r):n.state.tr.replaceSelection(i);return n.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function tu(n){let e=n.getData("text/plain")||n.getData("Text");if(e)return e;let t=n.getData("text/uri-list");return t?t.replace(/\r?\n/g," "):""}lt.paste=(n,e)=>{let t=e;if(n.composing&&!zt)return;let r=Vr?null:t.clipboardData,o=n.input.shiftKey&&n.input.lastKeyCode!=45;r&&zr(n,tu(r),r.getData("text/html"),o,t)?t.preventDefault():jg(n,t)};class nu{constructor(e,t,r){this.slice=e,this.move=t,this.node=r}}const ru=Ct?"altKey":"ctrlKey";at.dragstart=(n,e)=>{let t=e,r=n.input.mouseDown;if(r&&r.done(),!t.dataTransfer)return;let o=n.state.selection,i=o.empty?null:n.posAtCoords(Io(t)),s;if(!(i&&i.pos>=o.from&&i.pos<=(o instanceof Se?o.to-1:o.to))){if(r&&r.mightDrag)s=Se.create(n.state.doc,r.mightDrag.pos);else if(t.target&&t.target.nodeType==1){let u=n.docView.nearestDesc(t.target,!0);u&&u.node.type.spec.draggable&&u!=n.docView&&(s=Se.create(n.state.doc,u.posBefore))}}let l=(s||n.state.selection).content(),{dom:a,text:c}=Uc(n,l);t.dataTransfer.clearData(),t.dataTransfer.setData(Vr?"Text":"text/html",a.innerHTML),t.dataTransfer.effectAllowed="copyMove",Vr||t.dataTransfer.setData("text/plain",c),n.dragging=new nu(l,!t[ru],s)},at.dragend=n=>{let e=n.dragging;window.setTimeout(()=>{n.dragging==e&&(n.dragging=null)},50)},lt.dragover=lt.dragenter=(n,e)=>e.preventDefault(),lt.drop=(n,e)=>{let t=e,r=n.dragging;if(n.dragging=null,!t.dataTransfer)return;let o=n.posAtCoords(Io(t));if(!o)return;let i=n.state.doc.resolve(o.pos),s=r&&r.slice;s?n.someProp("transformPasted",p=>{s=p(s,n)}):s=jc(n,tu(t.dataTransfer),Vr?null:t.dataTransfer.getData("text/html"),!1,i);let l=!!(r&&!t[ru]);if(n.someProp("handleDrop",p=>p(n,t,s||fe.empty,l))){t.preventDefault();return}if(!s)return;t.preventDefault();let a=s?Sm(n.state.doc,i.pos,s):i.pos;a==null&&(a=i.pos);let c=n.state.tr;if(l){let{node:p}=r;p?p.replace(c):c.deleteSelection()}let u=c.mapping.map(a),d=s.openStart==0&&s.openEnd==0&&s.content.childCount==1,f=c.doc;if(d?c.replaceRangeWith(u,u,s.content.firstChild):c.replaceRange(u,u,s),c.doc.eq(f))return;let h=c.doc.resolve(u);if(d&&Se.isSelectable(s.content.firstChild)&&h.nodeAfter&&h.nodeAfter.sameMarkup(s.content.firstChild))c.setSelection(new Se(h));else{let p=c.mapping.map(a);c.mapping.maps[c.mapping.maps.length-1].forEach((g,y,S,C)=>p=C),c.setSelection(ws(n,h,c.doc.resolve(p)))}n.focus(),n.dispatch(c.setMeta("uiEvent","drop"))},at.focus=n=>{n.input.lastFocus=Date.now(),n.focused||(n.domObserver.stop(),n.dom.classList.add("ProseMirror-focused"),n.domObserver.start(),n.focused=!0,setTimeout(()=>{n.docView&&n.hasFocus()&&!n.domObserver.currentSelection.eq(n.domSelectionRange())&&on(n)},20))},at.blur=(n,e)=>{let t=e;n.focused&&(n.domObserver.stop(),n.dom.classList.remove("ProseMirror-focused"),n.domObserver.start(),t.relatedTarget&&n.dom.contains(t.relatedTarget)&&n.domObserver.currentSelection.clear(),n.focused=!1)},at.beforeinput=(n,e)=>{if(tt&&zt&&e.inputType=="deleteContentBackward"){n.domObserver.flushSoon();let{domChangeCount:r}=n.input;setTimeout(()=>{if(n.input.domChangeCount!=r||(n.dom.blur(),n.focus(),n.someProp("handleKeyDown",i=>i(n,Vn(8,"Backspace")))))return;let{$cursor:o}=n.state.selection;o&&o.pos>0&&n.dispatch(n.state.tr.delete(o.pos-1,o.pos).scrollIntoView())},50)}};for(let n in lt)at[n]=lt[n];function $r(n,e){if(n==e)return!0;for(let t in n)if(n[t]!==e[t])return!1;for(let t in e)if(!(t in n))return!1;return!0}class Ro{constructor(e,t){this.toDOM=e,this.spec=t||Un,this.side=this.spec.side||0}map(e,t,r,o){let{pos:i,deleted:s}=e.mapResult(t.from+o,this.side<0?-1:1);return s?null:new wt(i-r,i-r,this)}valid(){return!0}eq(e){return this==e||e instanceof Ro&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&$r(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class xn{constructor(e,t){this.attrs=e,this.spec=t||Un}map(e,t,r,o){let i=e.map(t.from+o,this.spec.inclusiveStart?-1:1)-r,s=e.map(t.to+o,this.spec.inclusiveEnd?1:-1)-r;return i>=s?null:new wt(i,s,this)}valid(e,t){return t.from<t.to}eq(e){return this==e||e instanceof xn&&$r(this.attrs,e.attrs)&&$r(this.spec,e.spec)}static is(e){return e.type instanceof xn}destroy(){}}class Ds{constructor(e,t){this.attrs=e,this.spec=t||Un}map(e,t,r,o){let i=e.mapResult(t.from+o,1);if(i.deleted)return null;let s=e.mapResult(t.to+o,-1);return s.deleted||s.pos<=i.pos?null:new wt(i.pos-r,s.pos-r,this)}valid(e,t){let{index:r,offset:o}=e.content.findIndex(t.from),i;return o==t.from&&!(i=e.child(r)).isText&&o+i.nodeSize==t.to}eq(e){return this==e||e instanceof Ds&&$r(this.attrs,e.attrs)&&$r(this.spec,e.spec)}destroy(){}}class wt{constructor(e,t,r){this.from=e,this.to=t,this.type=r}copy(e,t){return new wt(e,t,this.type)}eq(e,t=0){return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}map(e,t,r){return this.type.map(e,this,t,r)}static widget(e,t,r){return new wt(e,e,new Ro(t,r))}static inline(e,t,r,o){return new wt(e,t,new xn(r,o))}static node(e,t,r,o){return new wt(e,t,new Ds(r,o))}get spec(){return this.type.spec}get inline(){return this.type instanceof xn}get widget(){return this.type instanceof Ro}}const lr=[],Un={};class We{constructor(e,t){this.local=e.length?e:lr,this.children=t.length?t:lr}static create(e,t){return t.length?Do(t,e,0,Un):nt}find(e,t,r){let o=[];return this.findInner(e??0,t??1e9,o,0,r),o}findInner(e,t,r,o,i){for(let s=0;s<this.local.length;s++){let l=this.local[s];l.from<=t&&l.to>=e&&(!i||i(l.spec))&&r.push(l.copy(l.from+o,l.to+o))}for(let s=0;s<this.children.length;s+=3)if(this.children[s]<t&&this.children[s+1]>e){let l=this.children[s]+1;this.children[s+2].findInner(e-l,t-l,r,o+l,i)}}map(e,t,r){return this==nt||e.maps.length==0?this:this.mapInner(e,t,0,0,r||Un)}mapInner(e,t,r,o,i){let s;for(let l=0;l<this.local.length;l++){let a=this.local[l].map(e,r,o);a&&a.type.valid(t,a)?(s||(s=[])).push(a):i.onRemove&&i.onRemove(this.local[l].spec)}return this.children.length?Wg(this.children,s||[],e,t,r,o,i):s?new We(s.sort(jn),lr):nt}add(e,t){return t.length?this==nt?We.create(e,t):this.addInner(e,t,0):this}addInner(e,t,r){let o,i=0;e.forEach((l,a)=>{let c=a+r,u;if(u=iu(t,l,c)){for(o||(o=this.children.slice());i<o.length&&o[i]<a;)i+=3;o[i]==a?o[i+2]=o[i+2].addInner(l,u,c+1):o.splice(i,0,a,a+l.nodeSize,Do(u,l,c+1,Un)),i+=3}});let s=ou(i?su(t):t,-r);for(let l=0;l<s.length;l++)s[l].type.valid(e,s[l])||s.splice(l--,1);return new We(s.length?this.local.concat(s).sort(jn):this.local,o||this.children)}remove(e){return e.length==0||this==nt?this:this.removeInner(e,0)}removeInner(e,t){let r=this.children,o=this.local;for(let i=0;i<r.length;i+=3){let s,l=r[i]+t,a=r[i+1]+t;for(let u=0,d;u<e.length;u++)(d=e[u])&&d.from>l&&d.to<a&&(e[u]=null,(s||(s=[])).push(d));if(!s)continue;r==this.children&&(r=this.children.slice());let c=r[i+2].removeInner(s,l+1);c!=nt?r[i+2]=c:(r.splice(i,3),i-=3)}if(o.length){for(let i=0,s;i<e.length;i++)if(s=e[i])for(let l=0;l<o.length;l++)o[l].eq(s,t)&&(o==this.local&&(o=this.local.slice()),o.splice(l--,1))}return r==this.children&&o==this.local?this:o.length||r.length?new We(o,r):nt}forChild(e,t){if(this==nt)return this;if(t.isLeaf)return We.empty;let r,o;for(let l=0;l<this.children.length;l+=3)if(this.children[l]>=e){this.children[l]==e&&(r=this.children[l+2]);break}let i=e+1,s=i+t.content.size;for(let l=0;l<this.local.length;l++){let a=this.local[l];if(a.from<s&&a.to>i&&a.type instanceof xn){let c=Math.max(i,a.from)-i,u=Math.min(s,a.to)-i;c<u&&(o||(o=[])).push(a.copy(c,u))}}if(o){let l=new We(o.sort(jn),lr);return r?new Sn([l,r]):l}return r||nt}eq(e){if(this==e)return!0;if(!(e instanceof We)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let t=0;t<this.local.length;t++)if(!this.local[t].eq(e.local[t]))return!1;for(let t=0;t<this.children.length;t+=3)if(this.children[t]!=e.children[t]||this.children[t+1]!=e.children[t+1]||!this.children[t+2].eq(e.children[t+2]))return!1;return!0}locals(e){return Ls(this.localsInner(e))}localsInner(e){if(this==nt)return lr;if(e.inlineContent||!this.local.some(xn.is))return this.local;let t=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof xn||t.push(this.local[r]);return t}}We.empty=new We([],[]),We.removeOverlap=Ls;const nt=We.empty;class Sn{constructor(e){this.members=e}map(e,t){const r=this.members.map(o=>o.map(e,t,Un));return Sn.from(r)}forChild(e,t){if(t.isLeaf)return We.empty;let r=[];for(let o=0;o<this.members.length;o++){let i=this.members[o].forChild(e,t);i!=nt&&(i instanceof Sn?r=r.concat(i.members):r.push(i))}return Sn.from(r)}eq(e){if(!(e instanceof Sn)||e.members.length!=this.members.length)return!1;for(let t=0;t<this.members.length;t++)if(!this.members[t].eq(e.members[t]))return!1;return!0}locals(e){let t,r=!0;for(let o=0;o<this.members.length;o++){let i=this.members[o].localsInner(e);if(i.length)if(!t)t=i;else{r&&(t=t.slice(),r=!1);for(let s=0;s<i.length;s++)t.push(i[s])}}return t?Ls(r?t:t.sort(jn)):lr}static from(e){switch(e.length){case 0:return nt;case 1:return e[0];default:return new Sn(e.every(t=>t instanceof We)?e:e.reduce((t,r)=>t.concat(r instanceof We?r:r.members),[]))}}}function Wg(n,e,t,r,o,i,s){let l=n.slice();for(let c=0,u=i;c<t.maps.length;c++){let d=0;t.maps[c].forEach((f,h,p,g)=>{let y=g-p-(h-f);for(let S=0;S<l.length;S+=3){let C=l[S+1];if(C<0||f>C+u-d)continue;let k=l[S]+u-d;h>=k?l[S+1]=f<=k?-2:-1:p>=o&&y&&(l[S]+=y,l[S+1]+=y)}d+=y}),u=t.maps[c].map(u,-1)}let a=!1;for(let c=0;c<l.length;c+=3)if(l[c+1]<0){if(l[c+1]==-2){a=!0,l[c+1]=-1;continue}let u=t.map(n[c]+i),d=u-o;if(d<0||d>=r.content.size){a=!0;continue}let f=t.map(n[c+1]+i,-1),h=f-o,{index:p,offset:g}=r.content.findIndex(d),y=r.maybeChild(p);if(y&&g==d&&g+y.nodeSize==h){let S=l[c+2].mapInner(t,y,u+1,n[c]+i+1,s);S!=nt?(l[c]=d,l[c+1]=h,l[c+2]=S):(l[c+1]=-2,a=!0)}else a=!0}if(a){let c=Kg(l,n,e,t,o,i,s),u=Do(c,r,0,s);e=u.local;for(let d=0;d<l.length;d+=3)l[d+1]<0&&(l.splice(d,3),d-=3);for(let d=0,f=0;d<u.children.length;d+=3){let h=u.children[d];for(;f<l.length&&l[f]<h;)f+=3;l.splice(f,0,u.children[d],u.children[d+1],u.children[d+2])}}return new We(e.sort(jn),l)}function ou(n,e){if(!e||!n.length)return n;let t=[];for(let r=0;r<n.length;r++){let o=n[r];t.push(new wt(o.from+e,o.to+e,o.type))}return t}function Kg(n,e,t,r,o,i,s){function l(a,c){for(let u=0;u<a.local.length;u++){let d=a.local[u].map(r,o,c);d?t.push(d):s.onRemove&&s.onRemove(a.local[u].spec)}for(let u=0;u<a.children.length;u+=3)l(a.children[u+2],a.children[u]+c+1)}for(let a=0;a<n.length;a+=3)n[a+1]==-1&&l(n[a+2],e[a]+i+1);return t}function iu(n,e,t){if(e.isLeaf)return null;let r=t+e.nodeSize,o=null;for(let i=0,s;i<n.length;i++)(s=n[i])&&s.from>t&&s.to<r&&((o||(o=[])).push(s),n[i]=null);return o}function su(n){let e=[];for(let t=0;t<n.length;t++)n[t]!=null&&e.push(n[t]);return e}function Do(n,e,t,r){let o=[],i=!1;e.forEach((l,a)=>{let c=iu(n,l,a+t);if(c){i=!0;let u=Do(c,l,t+a+1,r);u!=nt&&o.push(a,a+l.nodeSize,u)}});let s=ou(i?su(n):n,-t).sort(jn);for(let l=0;l<s.length;l++)s[l].type.valid(e,s[l])||(r.onRemove&&r.onRemove(s[l].spec),s.splice(l--,1));return s.length||o.length?new We(s,o):nt}function jn(n,e){return n.from-e.from||n.to-e.to}function Ls(n){let e=n;for(let t=0;t<e.length-1;t++){let r=e[t];if(r.from!=r.to)for(let o=t+1;o<e.length;o++){let i=e[o];if(i.from==r.from){i.to!=r.to&&(e==n&&(e=n.slice()),e[o]=i.copy(i.from,r.to),au(e,o+1,i.copy(r.to,i.to)));continue}else{i.from<r.to&&(e==n&&(e=n.slice()),e[t]=r.copy(r.from,i.from),au(e,o,r.copy(i.from,r.to)));break}}}return e}function au(n,e,t){for(;e<n.length&&jn(t,n[e])>0;)e++;n.splice(e,0,t)}function Ps(n){let e=[];return n.someProp("decorations",t=>{let r=t(n.state);r&&r!=nt&&e.push(r)}),n.cursorWrapper&&e.push(We.create(n.state.doc,[n.cursorWrapper.deco])),Sn.from(e)}const Gg={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Jg=pt&&mn<=11;class Yg{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class Xg{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new Yg,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let o=0;o<r.length;o++)this.queue.push(r[o]);pt&&mn<=11&&r.some(o=>o.type=="childList"&&o.removedNodes.length||o.type=="characterData"&&o.oldValue.length>o.target.nodeValue.length)?this.flushSoon():this.flush()}),Jg&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,Gg)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let t=0;t<e.length;t++)this.queue.push(e[t]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(Lc(this.view)){if(this.suppressingSelectionUpdates)return on(this.view);if(pt&&mn<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&Fn(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let t=new Set,r;for(let i=e.focusNode;i;i=Rr(i))t.add(i);for(let i=e.anchorNode;i;i=Rr(i))if(t.has(i)){r=i;break}let o=r&&this.view.docView.nearestDesc(r);if(o&&o.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let t=this.pendingRecords();t.length&&(this.queue=[]);let r=e.domSelectionRange(),o=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&Lc(e)&&!this.ignoreSelectionChange(r),i=-1,s=-1,l=!1,a=[];if(e.editable)for(let u=0;u<t.length;u++){let d=this.registerMutation(t[u],a);d&&(i=i<0?d.from:Math.min(d.from,i),s=s<0?d.to:Math.max(d.to,s),d.typeOver&&(l=!0))}if(Vt&&a.length>1){let u=a.filter(d=>d.nodeName=="BR");if(u.length==2){let d=u[0],f=u[1];d.parentNode&&d.parentNode.parentNode==f.parentNode?f.remove():d.remove()}}let c=null;i<0&&o&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&Ao(r)&&(c=Cs(e))&&c.eq(Re.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,on(e),this.currentSelection.set(r),e.scrollToSelection()):(i>-1||o)&&(i>-1&&(e.docView.markDirty(i,s),Zg(e)),this.handleDOMChange(i,s,l,a),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||on(e),this.currentSelection.set(r))}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let r=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(r==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!r||r.ignoreMutation(e))return null;if(e.type=="childList"){for(let u=0;u<e.addedNodes.length;u++)t.push(e.addedNodes[u]);if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(e.target))return{from:r.posBefore,to:r.posAfter};let o=e.previousSibling,i=e.nextSibling;if(pt&&mn<=11&&e.addedNodes.length)for(let u=0;u<e.addedNodes.length;u++){let{previousSibling:d,nextSibling:f}=e.addedNodes[u];(!d||Array.prototype.indexOf.call(e.addedNodes,d)<0)&&(o=d),(!f||Array.prototype.indexOf.call(e.addedNodes,f)<0)&&(i=f)}let s=o&&o.parentNode==e.target?it(o)+1:0,l=r.localPosFromDOM(e.target,s,-1),a=i&&i.parentNode==e.target?it(i):e.target.childNodes.length,c=r.localPosFromDOM(e.target,a,1);return{from:l,to:c}}else return e.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:{from:r.posAtStart,to:r.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}}}let lu=new WeakMap,cu=!1;function Zg(n){if(!lu.has(n)&&(lu.set(n,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(n.dom).whiteSpace)!==-1)){if(n.requiresGeckoHackNode=Vt,cu)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),cu=!0}}function Qg(n){let e;function t(a){a.preventDefault(),a.stopImmediatePropagation(),e=a.getTargetRanges()[0]}n.dom.addEventListener("beforeinput",t,!0),document.execCommand("indent"),n.dom.removeEventListener("beforeinput",t,!0);let r=e.startContainer,o=e.startOffset,i=e.endContainer,s=e.endOffset,l=n.domAtPos(n.state.selection.anchor);return Fn(l.node,l.offset,i,s)&&([r,o,i,s]=[i,s,r,o]),{anchorNode:r,anchorOffset:o,focusNode:i,focusOffset:s}}function _g(n,e,t){let{node:r,fromOffset:o,toOffset:i,from:s,to:l}=n.docView.parseRange(e,t),a=n.domSelectionRange(),c,u=a.anchorNode;if(u&&n.dom.contains(u.nodeType==1?u:u.parentNode)&&(c=[{node:u,offset:a.anchorOffset}],Ao(a)||c.push({node:a.focusNode,offset:a.focusOffset})),tt&&n.input.lastKeyCode===8)for(let y=i;y>o;y--){let S=r.childNodes[y-1],C=S.pmViewDesc;if(S.nodeName=="BR"&&!C){i=y;break}if(!C||C.size)break}let d=n.state.doc,f=n.someProp("domParser")||Zn.fromSchema(n.state.schema),h=d.resolve(s),p=null,g=f.parse(r,{topNode:h.parent,topMatch:h.parent.contentMatchAt(h.index()),topOpen:!0,from:o,to:i,preserveWhitespace:h.parent.type.whitespace=="pre"?"full":!0,findPositions:c,ruleFromNode:qg,context:h});if(c&&c[0].pos!=null){let y=c[0].pos,S=c[1]&&c[1].pos;S==null&&(S=y),p={anchor:y+s,head:S+s}}return{doc:g,sel:p,from:s,to:l}}function qg(n){let e=n.pmViewDesc;if(e)return e.parseRule();if(n.nodeName=="BR"&&n.parentNode){if(st&&/^(ul|ol)$/i.test(n.parentNode.nodeName)){let t=document.createElement("div");return t.appendChild(document.createElement("li")),{skip:t}}else if(n.parentNode.lastChild==n||st&&/^(tr|table)$/i.test(n.parentNode.nodeName))return{ignore:!0}}else if(n.nodeName=="IMG"&&n.getAttribute("mark-placeholder"))return{ignore:!0};return null}const e1=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function t1(n,e,t,r,o){let i=n.input.compositionPendingChanges||(n.composing?n.input.compositionID:0);if(n.input.compositionPendingChanges=0,e<0){let $=n.input.lastSelectionTime>Date.now()-50?n.input.lastSelectionOrigin:null,V=Cs(n,$);if(V&&!n.state.selection.eq(V)){if(tt&&zt&&n.input.lastKeyCode===13&&Date.now()-100<n.input.lastKeyCodeTime&&n.someProp("handleKeyDown",P=>P(n,Vn(13,"Enter"))))return;let B=n.state.tr.setSelection(V);$=="pointer"?B.setMeta("pointer",!0):$=="key"&&B.scrollIntoView(),i&&B.setMeta("composition",i),n.dispatch(B)}return}let s=n.state.doc.resolve(e),l=s.sharedDepth(t);e=s.before(l+1),t=n.state.doc.resolve(t).after(l+1);let a=n.state.selection,c=_g(n,e,t),u=n.state.doc,d=u.slice(c.from,c.to),f,h;n.input.lastKeyCode===8&&Date.now()-100<n.input.lastKeyCodeTime?(f=n.state.selection.to,h="end"):(f=n.state.selection.from,h="start"),n.input.lastKeyCode=null;let p=o1(d.content,c.doc.content,c.from,f,h);if((or&&n.input.lastIOSEnter>Date.now()-225||zt)&&o.some($=>$.nodeType==1&&!e1.test($.nodeName))&&(!p||p.endA>=p.endB)&&n.someProp("handleKeyDown",$=>$(n,Vn(13,"Enter")))){n.input.lastIOSEnter=0;return}if(!p)if(r&&a instanceof De&&!a.empty&&a.$head.sameParent(a.$anchor)&&!n.composing&&!(c.sel&&c.sel.anchor!=c.sel.head))p={start:a.from,endA:a.to,endB:a.to};else{if(c.sel){let $=uu(n,n.state.doc,c.sel);if($&&!$.eq(n.state.selection)){let V=n.state.tr.setSelection($);i&&V.setMeta("composition",i),n.dispatch(V)}}return}if(tt&&n.cursorWrapper&&c.sel&&c.sel.anchor==n.cursorWrapper.deco.from&&c.sel.head==c.sel.anchor){let $=p.endB-p.start;c.sel={anchor:c.sel.anchor+$,head:c.sel.anchor+$}}n.input.domChangeCount++,n.state.selection.from<n.state.selection.to&&p.start==p.endB&&n.state.selection instanceof De&&(p.start>n.state.selection.from&&p.start<=n.state.selection.from+2&&n.state.selection.from>=c.from?p.start=n.state.selection.from:p.endA<n.state.selection.to&&p.endA>=n.state.selection.to-2&&n.state.selection.to<=c.to&&(p.endB+=n.state.selection.to-p.endA,p.endA=n.state.selection.to)),pt&&mn<=11&&p.endB==p.start+1&&p.endA==p.start&&p.start>c.from&&c.doc.textBetween(p.start-c.from-1,p.start-c.from+1)==" "&&(p.start--,p.endA--,p.endB--);let g=c.doc.resolveNoCache(p.start-c.from),y=c.doc.resolveNoCache(p.endB-c.from),S=u.resolve(p.start),C=g.sameParent(y)&&g.parent.inlineContent&&S.end()>=p.endA,k;if((or&&n.input.lastIOSEnter>Date.now()-225&&(!C||o.some($=>$.nodeName=="DIV"||$.nodeName=="P"))||!C&&g.pos<c.doc.content.size&&!g.sameParent(y)&&(k=Re.findFrom(c.doc.resolve(g.pos+1),1,!0))&&k.head==y.pos)&&n.someProp("handleKeyDown",$=>$(n,Vn(13,"Enter")))){n.input.lastIOSEnter=0;return}if(n.state.selection.anchor>p.start&&r1(u,p.start,p.endA,g,y)&&n.someProp("handleKeyDown",$=>$(n,Vn(8,"Backspace")))){zt&&tt&&n.domObserver.suppressSelectionUpdates();return}tt&&zt&&p.endB==p.start&&(n.input.lastAndroidDelete=Date.now()),zt&&!C&&g.start()!=y.start()&&y.parentOffset==0&&g.depth==y.depth&&c.sel&&c.sel.anchor==c.sel.head&&c.sel.head==p.endA&&(p.endB-=2,y=c.doc.resolveNoCache(p.endB-c.from),setTimeout(()=>{n.someProp("handleKeyDown",function($){return $(n,Vn(13,"Enter"))})},20));let b=p.start,R=p.endA,w,F,z;if(C){if(g.pos==y.pos)pt&&mn<=11&&g.parentOffset==0&&(n.domObserver.suppressSelectionUpdates(),setTimeout(()=>on(n),20)),w=n.state.tr.delete(b,R),F=u.resolve(p.start).marksAcross(u.resolve(p.endA));else if(p.endA==p.endB&&(z=n1(g.parent.content.cut(g.parentOffset,y.parentOffset),S.parent.content.cut(S.parentOffset,p.endA-S.start()))))w=n.state.tr,z.type=="add"?w.addMark(b,R,z.mark):w.removeMark(b,R,z.mark);else if(g.parent.child(g.index()).isText&&g.index()==y.index()-(y.textOffset?0:1)){let $=g.parent.textBetween(g.parentOffset,y.parentOffset);if(n.someProp("handleTextInput",V=>V(n,b,R,$)))return;w=n.state.tr.insertText($,b,R)}}if(w||(w=n.state.tr.replace(b,R,c.doc.slice(p.start-c.from,p.endB-c.from))),c.sel){let $=uu(n,w.doc,c.sel);$&&!(tt&&zt&&n.composing&&$.empty&&(p.start!=p.endB||n.input.lastAndroidDelete<Date.now()-100)&&($.head==b||$.head==w.mapping.map(R)-1)||pt&&$.empty&&$.head==b)&&w.setSelection($)}F&&w.ensureMarks(F),i&&w.setMeta("composition",i),n.dispatch(w.scrollIntoView())}function uu(n,e,t){return Math.max(t.anchor,t.head)>e.content.size?null:ws(n,e.resolve(t.anchor),e.resolve(t.head))}function n1(n,e){let t=n.firstChild.marks,r=e.firstChild.marks,o=t,i=r,s,l,a;for(let u=0;u<r.length;u++)o=r[u].removeFromSet(o);for(let u=0;u<t.length;u++)i=t[u].removeFromSet(i);if(o.length==1&&i.length==0)l=o[0],s="add",a=u=>u.mark(l.addToSet(u.marks));else if(o.length==0&&i.length==1)l=i[0],s="remove",a=u=>u.mark(l.removeFromSet(u.marks));else return null;let c=[];for(let u=0;u<e.childCount;u++)c.push(a(e.child(u)));if(oe.from(c).eq(n))return{mark:l,type:s}}function r1(n,e,t,r,o){if(!r.parent.isTextblock||t-e<=o.pos-r.pos||Bs(r,!0,!1)<o.pos)return!1;let i=n.resolve(e);if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;let s=n.resolve(Bs(i,!0,!0));return!s.parent.isTextblock||s.pos>t||Bs(s,!0,!1)<t?!1:r.parent.content.cut(r.parentOffset).eq(s.parent.content)}function Bs(n,e,t){let r=n.depth,o=e?n.end():n.pos;for(;r>0&&(e||n.indexAfter(r)==n.node(r).childCount);)r--,o++,e=!1;if(t){let i=n.node(r).maybeChild(n.indexAfter(r));for(;i&&!i.isLeaf;)i=i.firstChild,o++}return o}function o1(n,e,t,r,o){let i=n.findDiffStart(e,t);if(i==null)return null;let{a:s,b:l}=n.findDiffEnd(e,t+n.size,t+e.size);if(o=="end"){let a=Math.max(0,i-Math.min(s,l));r-=s+a-i}if(s<i&&n.size<e.size){let a=r<=i&&r>=s?i-r:0;i-=a,i&&i<e.size&&du(e.textBetween(i-1,i+1))&&(i+=a?1:-1),l=i+(l-s),s=i}else if(l<i){let a=r<=i&&r>=l?i-r:0;i-=a,i&&i<n.size&&du(n.textBetween(i-1,i+1))&&(i+=a?1:-1),s=i+(s-l),l=i}return{start:i,endA:s,endB:l}}function du(n){if(n.length!=2)return!1;let e=n.charCodeAt(0),t=n.charCodeAt(1);return e>=56320&&e<=57343&&t>=55296&&t<=56319}class i1{constructor(e,t){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new Tg,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(gu),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=hu(this),pu(this),this.nodeViews=mu(this),this.docView=Ec(this.state.doc,fu(this),Ps(this),this.dom,this),this.domObserver=new Xg(this,(r,o,i,s)=>t1(this,r,o,i,s)),this.domObserver.start(),Ag(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let t in e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&Ms(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(gu),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let r in this._props)t[r]=this._props[r];t.state=this.state;for(let r in e)t[r]=e[r];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){var r;let o=this.state,i=!1,s=!1;e.storedMarks&&this.composing&&(eu(this),s=!0),this.state=e;let l=o.plugins!=e.plugins||this._props.plugins!=t.plugins;if(l||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let h=mu(this);a1(h,this.nodeViews)&&(this.nodeViews=h,i=!0)}(l||t.handleDOMEvents!=this._props.handleDOMEvents)&&Ms(this),this.editable=hu(this),pu(this);let a=Ps(this),c=fu(this),u=o.plugins!=e.plugins&&!o.doc.eq(e.doc)?"reset":e.scrollToSelection>o.scrollToSelection?"to selection":"preserve",d=i||!this.docView.matchesNode(e.doc,c,a);(d||!e.selection.eq(o.selection))&&(s=!0);let f=u=="preserve"&&s&&this.dom.style.overflowAnchor==null&&Hm(this);if(s){this.domObserver.stop();let h=d&&(pt||tt)&&!this.composing&&!o.selection.empty&&!e.selection.empty&&s1(o.selection,e.selection);if(d){let p=tt?this.trackWrites=this.domSelectionRange().focusNode:null;(i||!this.docView.update(e.doc,c,a,this))&&(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=Ec(e.doc,c,a,this.dom,this)),p&&!this.trackWrites&&(h=!0)}h||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&fg(this))?on(this,h):(Rc(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(o),!((r=this.dragging)===null||r===void 0)&&r.node&&!o.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,o),u=="reset"?this.dom.scrollTop=0:u=="to selection"?this.scrollToSelection():f&&Um(f)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!this.someProp("handleScrollToSelection",t=>t(this)))if(this.state.selection instanceof Se){let t=this.docView.domAfterPos(this.state.selection.from);t.nodeType==1&&cc(this,t.getBoundingClientRect(),e)}else cc(this,this.coordsAtPos(this.state.selection.head,1),e)}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let t=0;t<this.directPlugins.length;t++){let r=this.directPlugins[t];r.spec.view&&this.pluginViews.push(r.spec.view(this))}for(let t=0;t<this.state.plugins.length;t++){let r=this.state.plugins[t];r.spec.view&&this.pluginViews.push(r.spec.view(this))}}else for(let t=0;t<this.pluginViews.length;t++){let r=this.pluginViews[t];r.update&&r.update(this,e)}}updateDraggedNode(e,t){let r=e.node,o=-1;if(this.state.doc.nodeAt(r.from)==r.node)o=r.from;else{let i=r.from+(this.state.doc.content.size-t.doc.content.size);(i>0&&this.state.doc.nodeAt(i))==r.node&&(o=i)}this.dragging=new nu(e.slice,e.move,o<0?void 0:Se.create(this.state.doc,o))}someProp(e,t){let r=this._props&&this._props[e],o;if(r!=null&&(o=t?t(r):r))return o;for(let s=0;s<this.directPlugins.length;s++){let l=this.directPlugins[s].props[e];if(l!=null&&(o=t?t(l):l))return o}let i=this.state.plugins;if(i)for(let s=0;s<i.length;s++){let l=i[s].props[e];if(l!=null&&(o=t?t(l):l))return o}}hasFocus(){if(pt){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if(e.contentEditable=="false")return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&jm(this.dom),on(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let t=this.dom.parentNode;t;t=t.parentNode)if(t.nodeType==9||t.nodeType==11&&t.host)return t.getSelection||(Object.getPrototypeOf(t).getSelection=()=>t.ownerDocument.getSelection()),this._root=t}return e||document}updateRoot(){this._root=null}posAtCoords(e){return Ym(this,e)}coordsAtPos(e,t=1){return mc(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,r=-1){let o=this.docView.posFromDOM(e,t,r);if(o==null)throw new RangeError("DOM position not inside the editor");return o}endOfTextblock(e,t){return qm(this,t||this.state,e)}pasteHTML(e,t){return zr(this,"",e,!1,t||new ClipboardEvent("paste"))}pasteText(e,t){return zr(this,e,null,!0,t||new ClipboardEvent("paste"))}destroy(){this.docView&&(Og(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Ps(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)}get isDestroyed(){return this.docView==null}dispatchEvent(e){return Ig(this,e)}dispatch(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))}domSelectionRange(){return st&&this.root.nodeType===11&&Lm(this.dom.ownerDocument)==this.dom?Qg(this):this.domSelection()}domSelection(){return this.root.getSelection()}}function fu(n){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(n.editable),n.someProp("attributes",t=>{if(typeof t=="function"&&(t=t(n.state)),t)for(let r in t)r=="class"?e.class+=" "+t[r]:r=="style"?e.style=(e.style?e.style+";":"")+t[r]:!e[r]&&r!="contenteditable"&&r!="nodeName"&&(e[r]=String(t[r]))}),e.translate||(e.translate="no"),[wt.node(0,n.state.doc.content.size,e)]}function pu(n){if(n.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),n.cursorWrapper={dom:e,deco:wt.widget(n.state.selection.head,e,{raw:!0,marks:n.markCursor})}}else n.cursorWrapper=null}function hu(n){return!n.someProp("editable",e=>e(n.state)===!1)}function s1(n,e){let t=Math.min(n.$anchor.sharedDepth(n.head),e.$anchor.sharedDepth(e.head));return n.$anchor.start(t)!=e.$anchor.start(t)}function mu(n){let e=Object.create(null);function t(r){for(let o in r)Object.prototype.hasOwnProperty.call(e,o)||(e[o]=r[o])}return n.someProp("nodeViews",t),n.someProp("markViews",t),e}function a1(n,e){let t=0,r=0;for(let o in n){if(n[o]!=e[o])return!0;t++}for(let o in e)r++;return t!=r}function gu(n){if(n.spec.state||n.spec.filterTransaction||n.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}for(var En={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:"'"},Lo={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},l1=typeof navigator<"u"&&/Mac/.test(navigator.platform),c1=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),_e=0;_e<10;_e++)En[48+_e]=En[96+_e]=String(_e);for(var _e=1;_e<=24;_e++)En[_e+111]="F"+_e;for(var _e=65;_e<=90;_e++)En[_e]=String.fromCharCode(_e+32),Lo[_e]=String.fromCharCode(_e);for(var Fs in En)Lo.hasOwnProperty(Fs)||(Lo[Fs]=En[Fs]);function u1(n){var e=l1&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||c1&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?Lo:En)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}const d1=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function f1(n){let e=n.split(/-(?!$)/),t=e[e.length-1];t=="Space"&&(t=" ");let r,o,i,s;for(let l=0;l<e.length-1;l++){let a=e[l];if(/^(cmd|meta|m)$/i.test(a))s=!0;else if(/^a(lt)?$/i.test(a))r=!0;else if(/^(c|ctrl|control)$/i.test(a))o=!0;else if(/^s(hift)?$/i.test(a))i=!0;else if(/^mod$/i.test(a))d1?s=!0:o=!0;else throw new Error("Unrecognized modifier name: "+a)}return r&&(t="Alt-"+t),o&&(t="Ctrl-"+t),s&&(t="Meta-"+t),i&&(t="Shift-"+t),t}function p1(n){let e=Object.create(null);for(let t in n)e[f1(t)]=n[t];return e}function Vs(n,e,t=!0){return e.altKey&&(n="Alt-"+n),e.ctrlKey&&(n="Ctrl-"+n),e.metaKey&&(n="Meta-"+n),t&&e.shiftKey&&(n="Shift-"+n),n}function h1(n){return new ft({props:{handleKeyDown:m1(n)}})}function m1(n){let e=p1(n);return function(t,r){let o=u1(r),i,s=e[Vs(o,r)];if(s&&s(t.state,t.dispatch,t))return!0;if(o.length==1&&o!=" "){if(r.shiftKey){let l=e[Vs(o,r,!1)];if(l&&l(t.state,t.dispatch,t))return!0}if((r.shiftKey||r.altKey||r.metaKey||o.charCodeAt(0)>127)&&(i=En[r.keyCode])&&i!=o){let l=e[Vs(i,r)];if(l&&l(t.state,t.dispatch,t))return!0}}return!1}}const g1=(n,e)=>n.selection.empty?!1:(e&&e(n.tr.deleteSelection().scrollIntoView()),!0);function y1(n,e){let{$cursor:t}=n.selection;return!t||(e?!e.endOfTextblock("backward",n):t.parentOffset>0)?null:t}const v1=(n,e,t)=>{let r=y1(n,t);if(!r)return!1;let o=yu(r);if(!o){let s=r.blockRange(),l=s&&_n(s);return l==null?!1:(e&&e(n.tr.lift(s,l).scrollIntoView()),!0)}let i=o.nodeBefore;if(!i.type.spec.isolating&&xu(n,o,e))return!0;if(r.parent.content.size==0&&(cr(i,"end")||Se.isSelectable(i))){let s=as(n.doc,r.before(),r.after(),fe.empty);if(s&&s.slice.size<s.to-s.from){if(e){let l=n.tr.step(s);l.setSelection(cr(i,"end")?Re.findFrom(l.doc.resolve(l.mapping.map(o.pos,-1)),-1):Se.create(l.doc,o.pos-i.nodeSize)),e(l.scrollIntoView())}return!0}}return i.isAtom&&o.depth==r.depth-1?(e&&e(n.tr.delete(o.pos-i.nodeSize,o.pos).scrollIntoView()),!0):!1};function cr(n,e,t=!1){for(let r=n;r;r=e=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(t&&r.childCount!=1)return!1}return!1}const b1=(n,e,t)=>{let{$head:r,empty:o}=n.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(t?!t.endOfTextblock("backward",n):r.parentOffset>0)return!1;i=yu(r)}let s=i&&i.nodeBefore;return!s||!Se.isSelectable(s)?!1:(e&&e(n.tr.setSelection(Se.create(n.doc,i.pos-s.nodeSize)).scrollIntoView()),!0)};function yu(n){if(!n.parent.type.spec.isolating)for(let e=n.depth-1;e>=0;e--){if(n.index(e)>0)return n.doc.resolve(n.before(e+1));if(n.node(e).type.spec.isolating)break}return null}function x1(n,e){let{$cursor:t}=n.selection;return!t||(e?!e.endOfTextblock("forward",n):t.parentOffset<t.parent.content.size)?null:t}const S1=(n,e,t)=>{let r=x1(n,t);if(!r)return!1;let o=vu(r);if(!o)return!1;let i=o.nodeAfter;if(xu(n,o,e))return!0;if(r.parent.content.size==0&&(cr(i,"start")||Se.isSelectable(i))){let s=as(n.doc,r.before(),r.after(),fe.empty);if(s&&s.slice.size<s.to-s.from){if(e){let l=n.tr.step(s);l.setSelection(cr(i,"start")?Re.findFrom(l.doc.resolve(l.mapping.map(o.pos)),1):Se.create(l.doc,l.mapping.map(o.pos))),e(l.scrollIntoView())}return!0}}return i.isAtom&&o.depth==r.depth-1?(e&&e(n.tr.delete(o.pos,o.pos+i.nodeSize).scrollIntoView()),!0):!1},E1=(n,e,t)=>{let{$head:r,empty:o}=n.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(t?!t.endOfTextblock("forward",n):r.parentOffset<r.parent.content.size)return!1;i=vu(r)}let s=i&&i.nodeAfter;return!s||!Se.isSelectable(s)?!1:(e&&e(n.tr.setSelection(Se.create(n.doc,i.pos)).scrollIntoView()),!0)};function vu(n){if(!n.parent.type.spec.isolating)for(let e=n.depth-1;e>=0;e--){let t=n.node(e);if(n.index(e)+1<t.childCount)return n.doc.resolve(n.after(e+1));if(t.type.spec.isolating)break}return null}const C1=(n,e)=>{let t=n.selection,r=t instanceof Se,o;if(r){if(t.node.isTextblock||!pn(n.doc,t.from))return!1;o=t.from}else if(o=ko(n.doc,t.from,-1),o==null)return!1;if(e){let i=n.tr.join(o);r&&i.setSelection(Se.create(i.doc,o-n.doc.resolve(o).nodeBefore.nodeSize)),e(i.scrollIntoView())}return!0},k1=(n,e)=>{let t=n.selection,r;if(t instanceof Se){if(t.node.isTextblock||!pn(n.doc,t.to))return!1;r=t.to}else if(r=ko(n.doc,t.to,1),r==null)return!1;return e&&e(n.tr.join(r).scrollIntoView()),!0},w1=(n,e)=>{let{$from:t,$to:r}=n.selection,o=t.blockRange(r),i=o&&_n(o);return i==null?!1:(e&&e(n.tr.lift(o,i).scrollIntoView()),!0)},T1=(n,e)=>{let{$head:t,$anchor:r}=n.selection;return!t.parent.type.spec.code||!t.sameParent(r)?!1:(e&&e(n.tr.insertText(`
|
|
19
|
-
`).scrollIntoView()),!0)};function bu(n){for(let e=0;e<n.edgeCount;e++){let{type:t}=n.edge(e);if(t.isTextblock&&!t.hasRequiredAttrs())return t}return null}const A1=(n,e)=>{let{$head:t,$anchor:r}=n.selection;if(!t.parent.type.spec.code||!t.sameParent(r))return!1;let o=t.node(-1),i=t.indexAfter(-1),s=bu(o.contentMatchAt(i));if(!s||!o.canReplaceWith(i,i,s))return!1;if(e){let l=t.after(),a=n.tr.replaceWith(l,l,s.createAndFill());a.setSelection(Re.near(a.doc.resolve(l),1)),e(a.scrollIntoView())}return!0},O1=(n,e)=>{let t=n.selection,{$from:r,$to:o}=t;if(t instanceof Bt||r.parent.inlineContent||o.parent.inlineContent)return!1;let i=bu(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(e){let s=(!r.parentOffset&&o.index()<o.parent.childCount?r:o).pos,l=n.tr.insert(s,i.createAndFill());l.setSelection(De.create(l.doc,s+1)),e(l.scrollIntoView())}return!0},M1=(n,e)=>{let{$cursor:t}=n.selection;if(!t||t.parent.content.size)return!1;if(t.depth>1&&t.after()!=t.end(-1)){let i=t.before();if(qn(n.doc,i))return e&&e(n.tr.split(i).scrollIntoView()),!0}let r=t.blockRange(),o=r&&_n(r);return o==null?!1:(e&&e(n.tr.lift(r,o).scrollIntoView()),!0)},I1=(n,e)=>{let{$from:t,to:r}=n.selection,o,i=t.sharedDepth(r);return i==0?!1:(o=t.before(i),e&&e(n.tr.setSelection(Se.create(n.doc,o))),!0)};function N1(n,e,t){let r=e.nodeBefore,o=e.nodeAfter,i=e.index();return!r||!o||!r.type.compatibleContent(o.type)?!1:!r.content.size&&e.parent.canReplace(i-1,i)?(t&&t(n.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(i,i+1)||!(o.isTextblock||pn(n.doc,e.pos))?!1:(t&&t(n.tr.clearIncompatible(e.pos,r.type,r.contentMatchAt(r.childCount)).join(e.pos).scrollIntoView()),!0)}function xu(n,e,t){let r=e.nodeBefore,o=e.nodeAfter,i,s;if(r.type.spec.isolating||o.type.spec.isolating)return!1;if(N1(n,e,t))return!0;let l=e.parent.canReplace(e.index(),e.index()+1);if(l&&(i=(s=r.contentMatchAt(r.childCount)).findWrapping(o.type))&&s.matchType(i[0]||o.type).validEnd){if(t){let d=e.pos+o.nodeSize,f=oe.empty;for(let g=i.length-1;g>=0;g--)f=oe.from(i[g].create(null,f));f=oe.from(r.copy(f));let h=n.tr.step(new Je(e.pos-1,d,e.pos,d,new fe(f,1,0),i.length,!0)),p=d+2*i.length;pn(h.doc,p)&&h.join(p),t(h.scrollIntoView())}return!0}let a=Re.findFrom(e,1),c=a&&a.$from.blockRange(a.$to),u=c&&_n(c);if(u!=null&&u>=e.depth)return t&&t(n.tr.lift(c,u).scrollIntoView()),!0;if(l&&cr(o,"start",!0)&&cr(r,"end")){let d=r,f=[];for(;f.push(d),!d.isTextblock;)d=d.lastChild;let h=o,p=1;for(;!h.isTextblock;h=h.firstChild)p++;if(d.canReplace(d.childCount,d.childCount,h.content)){if(t){let g=oe.empty;for(let S=f.length-1;S>=0;S--)g=oe.from(f[S].copy(g));let y=n.tr.step(new Je(e.pos-f.length,e.pos+o.nodeSize,e.pos+p,e.pos+o.nodeSize-p,new fe(g,f.length,0),0,!0));t(y.scrollIntoView())}return!0}}return!1}function Su(n){return function(e,t){let r=e.selection,o=n<0?r.$from:r.$to,i=o.depth;for(;o.node(i).isInline;){if(!i)return!1;i--}return o.node(i).isTextblock?(t&&t(e.tr.setSelection(De.create(e.doc,n<0?o.start(i):o.end(i)))),!0):!1}}const R1=Su(-1),D1=Su(1);function L1(n,e=null){return function(t,r){let{$from:o,$to:i}=t.selection,s=o.blockRange(i),l=s&&ss(s,n,e);return l?(r&&r(t.tr.wrap(s,l).scrollIntoView()),!0):!1}}function Eu(n,e=null){return function(t,r){let o=!1;for(let i=0;i<t.selection.ranges.length&&!o;i++){let{$from:{pos:s},$to:{pos:l}}=t.selection.ranges[i];t.doc.nodesBetween(s,l,(a,c)=>{if(o)return!1;if(!(!a.isTextblock||a.hasMarkup(n,e)))if(a.type==n)o=!0;else{let u=t.doc.resolve(c),d=u.index();o=u.parent.canReplaceWith(d,d+1,n)}})}if(!o)return!1;if(r){let i=t.tr;for(let s=0;s<t.selection.ranges.length;s++){let{$from:{pos:l},$to:{pos:a}}=t.selection.ranges[s];i.setBlockType(l,a,n,e)}r(i.scrollIntoView())}return!0}}typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function P1(n,e=null){return function(t,r){let{$from:o,$to:i}=t.selection,s=o.blockRange(i),l=!1,a=s;if(!s)return!1;if(s.depth>=2&&o.node(s.depth-1).type.compatibleContent(n)&&s.startIndex==0){if(o.index(s.depth-1)==0)return!1;let u=t.doc.resolve(s.start-2);a=new yo(u,u,s.depth),s.endIndex<s.parent.childCount&&(s=new yo(o,t.doc.resolve(i.end(s.depth)),s.depth)),l=!0}let c=ss(a,n,e,s);return c?(r&&r(B1(t.tr,s,c,l,n).scrollIntoView()),!0):!1}}function B1(n,e,t,r,o){let i=oe.empty;for(let u=t.length-1;u>=0;u--)i=oe.from(t[u].type.create(t[u].attrs,i));n.step(new Je(e.start-(r?2:0),e.end,e.start,e.end,new fe(i,0,0),t.length,!0));let s=0;for(let u=0;u<t.length;u++)t[u].type==o&&(s=u+1);let l=t.length-s,a=e.start+t.length-(r?2:0),c=e.parent;for(let u=e.startIndex,d=e.endIndex,f=!0;u<d;u++,f=!1)!f&&qn(n.doc,a,l)&&(n.split(a,l),a+=2*l),a+=c.child(u).nodeSize;return n}function F1(n){return function(e,t){let{$from:r,$to:o}=e.selection,i=r.blockRange(o,s=>s.childCount>0&&s.firstChild.type==n);return i?t?r.node(i.depth-1).type==n?V1(e,t,n,i):z1(e,t,i):!0:!1}}function V1(n,e,t,r){let o=n.tr,i=r.end,s=r.$to.end(r.depth);i<s&&(o.step(new Je(i-1,s,i,s,new fe(oe.from(t.create(null,r.parent.copy())),1,0),1,!0)),r=new yo(o.doc.resolve(r.$from.pos),o.doc.resolve(s),r.depth));const l=_n(r);if(l==null)return!1;o.lift(r,l);let a=o.mapping.map(i,-1)-1;return pn(o.doc,a)&&o.join(a),e(o.scrollIntoView()),!0}function z1(n,e,t){let r=n.tr,o=t.parent;for(let h=t.end,p=t.endIndex-1,g=t.startIndex;p>g;p--)h-=o.child(p).nodeSize,r.delete(h-1,h+1);let i=r.doc.resolve(t.start),s=i.nodeAfter;if(r.mapping.map(t.end)!=t.start+i.nodeAfter.nodeSize)return!1;let l=t.startIndex==0,a=t.endIndex==o.childCount,c=i.node(-1),u=i.index(-1);if(!c.canReplace(u+(l?0:1),u+1,s.content.append(a?oe.empty:oe.from(o))))return!1;let d=i.pos,f=d+s.nodeSize;return r.step(new Je(d-(l?1:0),f+(a?1:0),d+1,f-1,new fe((l?oe.empty:oe.from(o.copy(oe.empty))).append(a?oe.empty:oe.from(o.copy(oe.empty))),l?0:1,a?0:1),l?0:1)),e(r.scrollIntoView()),!0}function $1(n){return function(e,t){let{$from:r,$to:o}=e.selection,i=r.blockRange(o,c=>c.childCount>0&&c.firstChild.type==n);if(!i)return!1;let s=i.startIndex;if(s==0)return!1;let l=i.parent,a=l.child(s-1);if(a.type!=n)return!1;if(t){let c=a.lastChild&&a.lastChild.type==l.type,u=oe.from(c?n.create():null),d=new fe(oe.from(n.create(null,oe.from(l.type.create(null,u)))),c?3:1,0),f=i.start,h=i.end;t(e.tr.step(new Je(f-(c?3:1),h,f,h,d,1,!0)).scrollIntoView())}return!0}}function Po(n){const{state:e,transaction:t}=n;let{selection:r}=t,{doc:o}=t,{storedMarks:i}=t;return{...e,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),filterTransaction:e.filterTransaction,plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return i},get selection(){return r},get doc(){return o},get tr(){return r=t.selection,o=t.doc,i=t.storedMarks,t}}}class Bo{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:e,editor:t,state:r}=this,{view:o}=t,{tr:i}=r,s=this.buildProps(i);return Object.fromEntries(Object.entries(e).map(([l,a])=>[l,(...u)=>{const d=a(...u)(s);return!i.getMeta("preventDispatch")&&!this.hasCustomState&&o.dispatch(i),d}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){const{rawCommands:r,editor:o,state:i}=this,{view:s}=o,l=[],a=!!e,c=e||i.tr,u=()=>(!a&&t&&!c.getMeta("preventDispatch")&&!this.hasCustomState&&s.dispatch(c),l.every(f=>f===!0)),d={...Object.fromEntries(Object.entries(r).map(([f,h])=>[f,(...g)=>{const y=this.buildProps(c,t),S=h(...g)(y);return l.push(S),d}])),run:u};return d}createCan(e){const{rawCommands:t,state:r}=this,o=!1,i=e||r.tr,s=this.buildProps(i,o);return{...Object.fromEntries(Object.entries(t).map(([a,c])=>[a,(...u)=>c(...u)({...s,dispatch:void 0})])),chain:()=>this.createChain(i,o)}}buildProps(e,t=!0){const{rawCommands:r,editor:o,state:i}=this,{view:s}=o,l={tr:e,editor:o,view:s,state:Po({state:i,transaction:e}),dispatch:t?()=>{}:void 0,chain:()=>this.createChain(e,t),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(r).map(([a,c])=>[a,(...u)=>c(...u)(l)]))}};return l}}class H1{constructor(){this.callbacks={}}on(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),this}emit(e,...t){const r=this.callbacks[e];return r&&r.forEach(o=>o.apply(this,t)),this}off(e,t){const r=this.callbacks[e];return r&&(t?this.callbacks[e]=r.filter(o=>o!==t):delete this.callbacks[e]),this}removeAllListeners(){this.callbacks={}}}function pe(n,e,t){return n.config[e]===void 0&&n.parent?pe(n.parent,e,t):typeof n.config[e]=="function"?n.config[e].bind({...t,parent:n.parent?pe(n.parent,e,t):null}):n.config[e]}function Fo(n){const e=n.filter(o=>o.type==="extension"),t=n.filter(o=>o.type==="node"),r=n.filter(o=>o.type==="mark");return{baseExtensions:e,nodeExtensions:t,markExtensions:r}}function Cu(n){const e=[],{nodeExtensions:t,markExtensions:r}=Fo(n),o=[...t,...r],i={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return n.forEach(s=>{const l={name:s.name,options:s.options,storage:s.storage},a=pe(s,"addGlobalAttributes",l);if(!a)return;a().forEach(u=>{u.types.forEach(d=>{Object.entries(u.attributes).forEach(([f,h])=>{e.push({type:d,name:f,attribute:{...i,...h}})})})})}),o.forEach(s=>{const l={name:s.name,options:s.options,storage:s.storage},a=pe(s,"addAttributes",l);if(!a)return;const c=a();Object.entries(c).forEach(([u,d])=>{const f={...i,...d};typeof(f==null?void 0:f.default)=="function"&&(f.default=f.default()),f!=null&&f.isRequired&&(f==null?void 0:f.default)===void 0&&delete f.default,e.push({type:s.name,name:u,attribute:f})})}),e}function Ye(n,e){if(typeof n=="string"){if(!e.nodes[n])throw Error(`There is no node type named '${n}'. Maybe you forgot to add the extension?`);return e.nodes[n]}return n}function ct(...n){return n.filter(e=>!!e).reduce((e,t)=>{const r={...e};return Object.entries(t).forEach(([o,i])=>{if(!r[o]){r[o]=i;return}if(o==="class"){const l=i?i.split(" "):[],a=r[o]?r[o].split(" "):[],c=l.filter(u=>!a.includes(u));r[o]=[...a,...c].join(" ")}else o==="style"?r[o]=[r[o],i].join("; "):r[o]=i}),r},{})}function zs(n,e){return e.filter(t=>t.attribute.rendered).map(t=>t.attribute.renderHTML?t.attribute.renderHTML(n.attrs)||{}:{[t.name]:n.attrs[t.name]}).reduce((t,r)=>ct(t,r),{})}function ku(n){return typeof n=="function"}function Ie(n,e=void 0,...t){return ku(n)?e?n.bind(e)(...t):n(...t):n}function U1(n={}){return Object.keys(n).length===0&&n.constructor===Object}function j1(n){return typeof n!="string"?n:n.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(n):n==="true"?!0:n==="false"?!1:n}function wu(n,e){return n.style?n:{...n,getAttrs:t=>{const r=n.getAttrs?n.getAttrs(t):n.attrs;if(r===!1)return!1;const o=e.reduce((i,s)=>{const l=s.attribute.parseHTML?s.attribute.parseHTML(t):j1(t.getAttribute(s.name));return l==null?i:{...i,[s.name]:l}},{});return{...r,...o}}}}function Tu(n){return Object.fromEntries(Object.entries(n).filter(([e,t])=>e==="attrs"&&U1(t)?!1:t!=null))}function W1(n,e){var t;const r=Cu(n),{nodeExtensions:o,markExtensions:i}=Fo(n),s=(t=o.find(c=>pe(c,"topNode")))===null||t===void 0?void 0:t.name,l=Object.fromEntries(o.map(c=>{const u=r.filter(S=>S.type===c.name),d={name:c.name,options:c.options,storage:c.storage,editor:e},f=n.reduce((S,C)=>{const k=pe(C,"extendNodeSchema",d);return{...S,...k?k(c):{}}},{}),h=Tu({...f,content:Ie(pe(c,"content",d)),marks:Ie(pe(c,"marks",d)),group:Ie(pe(c,"group",d)),inline:Ie(pe(c,"inline",d)),atom:Ie(pe(c,"atom",d)),selectable:Ie(pe(c,"selectable",d)),draggable:Ie(pe(c,"draggable",d)),code:Ie(pe(c,"code",d)),defining:Ie(pe(c,"defining",d)),isolating:Ie(pe(c,"isolating",d)),attrs:Object.fromEntries(u.map(S=>{var C;return[S.name,{default:(C=S==null?void 0:S.attribute)===null||C===void 0?void 0:C.default}]}))}),p=Ie(pe(c,"parseHTML",d));p&&(h.parseDOM=p.map(S=>wu(S,u)));const g=pe(c,"renderHTML",d);g&&(h.toDOM=S=>g({node:S,HTMLAttributes:zs(S,u)}));const y=pe(c,"renderText",d);return y&&(h.toText=y),[c.name,h]})),a=Object.fromEntries(i.map(c=>{const u=r.filter(y=>y.type===c.name),d={name:c.name,options:c.options,storage:c.storage,editor:e},f=n.reduce((y,S)=>{const C=pe(S,"extendMarkSchema",d);return{...y,...C?C(c):{}}},{}),h=Tu({...f,inclusive:Ie(pe(c,"inclusive",d)),excludes:Ie(pe(c,"excludes",d)),group:Ie(pe(c,"group",d)),spanning:Ie(pe(c,"spanning",d)),code:Ie(pe(c,"code",d)),attrs:Object.fromEntries(u.map(y=>{var S;return[y.name,{default:(S=y==null?void 0:y.attribute)===null||S===void 0?void 0:S.default}]}))}),p=Ie(pe(c,"parseHTML",d));p&&(h.parseDOM=p.map(y=>wu(y,u)));const g=pe(c,"renderHTML",d);return g&&(h.toDOM=y=>g({mark:y,HTMLAttributes:zs(y,u)})),[c.name,h]}));return new _h({topNode:s,nodes:l,marks:a})}function $s(n,e){return e.nodes[n]||e.marks[n]||null}function Au(n,e){return Array.isArray(e)?e.some(t=>(typeof t=="string"?t:t.name)===n.name):e}const K1=(n,e=500)=>{let t="";const r=n.parentOffset;return n.parent.nodesBetween(Math.max(0,r-e),r,(o,i,s,l)=>{var a,c;const u=((c=(a=o.type.spec).toText)===null||c===void 0?void 0:c.call(a,{node:o,pos:i,parent:s,index:l}))||o.textContent||"%leaf%";t+=u.slice(0,Math.max(0,r-i))}),t};function Hs(n){return Object.prototype.toString.call(n)==="[object RegExp]"}class Ou{constructor(e){this.find=e.find,this.handler=e.handler}}const G1=(n,e)=>{if(Hs(e))return e.exec(n);const t=e(n);if(!t)return null;const r=[t.text];return r.index=t.index,r.input=n,r.data=t.data,t.replaceWith&&(t.text.includes(t.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(t.replaceWith)),r};function Us(n){var e;const{editor:t,from:r,to:o,text:i,rules:s,plugin:l}=n,{view:a}=t;if(a.composing)return!1;const c=a.state.doc.resolve(r);if(c.parent.type.spec.code||!((e=c.nodeBefore||c.nodeAfter)===null||e===void 0)&&e.marks.find(f=>f.type.spec.code))return!1;let u=!1;const d=K1(c)+i;return s.forEach(f=>{if(u)return;const h=G1(d,f.find);if(!h)return;const p=a.state.tr,g=Po({state:a.state,transaction:p}),y={from:r-(h[0].length-i.length),to:o},{commands:S,chain:C,can:k}=new Bo({editor:t,state:g});f.handler({state:g,range:y,match:h,commands:S,chain:C,can:k})===null||!p.steps.length||(p.setMeta(l,{transform:p,from:r,to:o,text:i}),a.dispatch(p),u=!0)}),u}function J1(n){const{editor:e,rules:t}=n,r=new ft({state:{init(){return null},apply(o,i){const s=o.getMeta(r);return s||(o.selectionSet||o.docChanged?null:i)}},props:{handleTextInput(o,i,s,l){return Us({editor:e,from:i,to:s,text:l,rules:t,plugin:r})},handleDOMEvents:{compositionend:o=>(setTimeout(()=>{const{$cursor:i}=o.state.selection;i&&Us({editor:e,from:i.pos,to:i.pos,text:"",rules:t,plugin:r})}),!1)},handleKeyDown(o,i){if(i.key!=="Enter")return!1;const{$cursor:s}=o.state.selection;return s?Us({editor:e,from:s.pos,to:s.pos,text:`
|
|
20
|
-
`,rules:t,plugin:r}):!1}},isInputRules:!0});return r}function
|
|
21
|
-
|
|
22
|
-
`,textSerializers:s={}}=t||{};let l="",a=!0;return n.nodesBetween(r,o,(c,u,d,f)=>{var h;const p=s==null?void 0:s[c.type.name];p?(c.isBlock&&!a&&(l+=i,a=!0),d&&(l+=p({node:c,pos:u,parent:d,index:f,range:e}))):c.isText?(l+=(h=c==null?void 0:c.text)===null||h===void 0?void 0:h.slice(Math.max(r,u)-u,o-u),a=!1):c.isBlock&&!a&&(l+=i,a=!0)}),l}function Iu(n){return Object.fromEntries(Object.entries(n.nodes).filter(([,e])=>e.spec.toText).map(([e,t])=>[e,t.spec.toText]))}const t0=Tt.create({name:"clipboardTextSerializer",addProseMirrorPlugins(){return[new ft({key:new Ft("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:n}=this,{state:e,schema:t}=n,{doc:r,selection:o}=e,{ranges:i}=o,s=Math.min(...i.map(u=>u.$from.pos)),l=Math.max(...i.map(u=>u.$to.pos)),a=Iu(t);return Mu(r,{from:s,to:l},{textSerializers:a})}}})]}}),n0=()=>({editor:n,view:e})=>(requestAnimationFrame(()=>{var t;n.isDestroyed||(e.dom.blur(),(t=window==null?void 0:window.getSelection())===null||t===void 0||t.removeAllRanges())}),!0),r0=(n=!1)=>({commands:e})=>e.setContent("",n),o0=()=>({state:n,tr:e,dispatch:t})=>{const{selection:r}=e,{ranges:o}=r;return t&&o.forEach(({$from:i,$to:s})=>{n.doc.nodesBetween(i.pos,s.pos,(l,a)=>{if(l.type.isText)return;const{doc:c,mapping:u}=e,d=c.resolve(u.map(a)),f=c.resolve(u.map(a+l.nodeSize)),h=d.blockRange(f);if(!h)return;const p=_n(h);if(l.type.isTextblock){const{defaultType:g}=d.parent.contentMatchAt(d.index());e.setNodeMarkup(h.start,g)}(p||p===0)&&e.lift(h,p)})}),!0},i0=n=>e=>n(e),s0=()=>({state:n,dispatch:e})=>O1(n,e),a0=(n,e)=>({editor:t,tr:r})=>{const{state:o}=t,i=o.doc.slice(n.from,n.to);r.deleteRange(n.from,n.to);const s=r.mapping.map(e);return r.insert(s,i.content),r.setSelection(new De(r.doc.resolve(s-1))),!0},l0=()=>({tr:n,dispatch:e})=>{const{selection:t}=n,r=t.$anchor.node();if(r.content.size>0)return!1;const o=n.selection.$anchor;for(let i=o.depth;i>0;i-=1)if(o.node(i).type===r.type){if(e){const l=o.before(i),a=o.after(i);n.delete(l,a).scrollIntoView()}return!0}return!1},c0=n=>({tr:e,state:t,dispatch:r})=>{const o=Ye(n,t.schema),i=e.selection.$anchor;for(let s=i.depth;s>0;s-=1)if(i.node(s).type===o){if(r){const a=i.before(s),c=i.after(s);e.delete(a,c).scrollIntoView()}return!0}return!1},u0=n=>({tr:e,dispatch:t})=>{const{from:r,to:o}=n;return t&&e.delete(r,o),!0},d0=()=>({state:n,dispatch:e})=>g1(n,e),f0=()=>({commands:n})=>n.keyboardShortcut("Enter"),p0=()=>({state:n,dispatch:e})=>A1(n,e);function zo(n,e,t={strict:!0}){const r=Object.keys(e);return r.length?r.every(o=>t.strict?e[o]===n[o]:Hs(e[o])?e[o].test(n[o]):e[o]===n[o]):!0}function Ws(n,e,t={}){return n.find(r=>r.type===e&&zo(r.attrs,t))}function h0(n,e,t={}){return!!Ws(n,e,t)}function Ks(n,e,t={}){if(!n||!e)return;let r=n.parent.childAfter(n.parentOffset);if(n.parentOffset===r.offset&&r.offset!==0&&(r=n.parent.childBefore(n.parentOffset)),!r.node)return;const o=Ws([...r.node.marks],e,t);if(!o)return;let i=r.index,s=n.start()+r.offset,l=i+1,a=s+r.node.nodeSize;for(Ws([...r.node.marks],e,t);i>0&&o.isInSet(n.parent.child(i-1).marks);)i-=1,s-=n.parent.child(i).nodeSize;for(;l<n.parent.childCount&&h0([...n.parent.child(l).marks],e,t);)a+=n.parent.child(l).nodeSize,l+=1;return{from:s,to:a}}function Cn(n,e){if(typeof n=="string"){if(!e.marks[n])throw Error(`There is no mark type named '${n}'. Maybe you forgot to add the extension?`);return e.marks[n]}return n}const m0=(n,e={})=>({tr:t,state:r,dispatch:o})=>{const i=Cn(n,r.schema),{doc:s,selection:l}=t,{$from:a,from:c,to:u}=l;if(o){const d=Ks(a,i,e);if(d&&d.from<=c&&d.to>=u){const f=De.create(s,d.from,d.to);t.setSelection(f)}}return!0},g0=n=>e=>{const t=typeof n=="function"?n(e):n;for(let r=0;r<t.length;r+=1)if(t[r](e))return!0;return!1};function Gs(n){return n instanceof De}function sn(n=0,e=0,t=0){return Math.min(Math.max(n,e),t)}function Nu(n,e=null){if(!e)return null;const t=Re.atStart(n),r=Re.atEnd(n);if(e==="start"||e===!0)return t;if(e==="end")return r;const o=t.from,i=r.to;return e==="all"?De.create(n,sn(0,o,i),sn(n.content.size,o,i)):De.create(n,sn(e,o,i),sn(e,o,i))}function Js(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}const y0=(n=null,e={})=>({editor:t,view:r,tr:o,dispatch:i})=>{e={scrollIntoView:!0,...e};const s=()=>{Js()&&r.dom.focus(),requestAnimationFrame(()=>{t.isDestroyed||(r.focus(),e!=null&&e.scrollIntoView&&t.commands.scrollIntoView())})};if(r.hasFocus()&&n===null||n===!1)return!0;if(i&&n===null&&!Gs(t.state.selection))return s(),!0;const l=Nu(o.doc,n)||t.state.selection,a=t.state.selection.eq(l);return i&&(a||o.setSelection(l),a&&o.storedMarks&&o.setStoredMarks(o.storedMarks),s()),!0},v0=(n,e)=>t=>n.every((r,o)=>e(r,{...t,index:o})),b0=(n,e)=>({tr:t,commands:r})=>r.insertContentAt({from:t.selection.from,to:t.selection.to},n,e);function Ru(n){const e=`<body>${n}</body>`;return new window.DOMParser().parseFromString(e,"text/html").body}function $o(n,e,t){if(t={slice:!0,parseOptions:{},...t},typeof n=="object"&&n!==null)try{return Array.isArray(n)&&n.length>0?oe.fromArray(n.map(r=>e.nodeFromJSON(r))):e.nodeFromJSON(n)}catch(r){return console.warn("[tiptap warn]: Invalid content.","Passed value:",n,"Error:",r),$o("",e,t)}if(typeof n=="string"){const r=Zn.fromSchema(e);return t.slice?r.parseSlice(Ru(n),t.parseOptions).content:r.parse(Ru(n),t.parseOptions)}return $o("",e,t)}function x0(n,e,t){const r=n.steps.length-1;if(r<e)return;const o=n.steps[r];if(!(o instanceof Qe||o instanceof Je))return;const i=n.mapping.maps[r];let s=0;i.forEach((l,a,c,u)=>{s===0&&(s=u)}),n.setSelection(Re.near(n.doc.resolve(s),t))}const S0=n=>n.toString().startsWith("<"),E0=(n,e,t)=>({tr:r,dispatch:o,editor:i})=>{if(o){t={parseOptions:{},updateSelection:!0,...t};const s=$o(e,i.schema,{parseOptions:{preserveWhitespace:"full",...t.parseOptions}});if(s.toString()==="<>")return!0;let{from:l,to:a}=typeof n=="number"?{from:n,to:n}:{from:n.from,to:n.to},c=!0,u=!0;if((S0(s)?s:[s]).forEach(f=>{f.check(),c=c?f.isText&&f.marks.length===0:!1,u=u?f.isBlock:!1}),l===a&&u){const{parent:f}=r.doc.resolve(l);f.isTextblock&&!f.type.spec.code&&!f.childCount&&(l-=1,a+=1)}c?Array.isArray(e)?r.insertText(e.map(f=>f.text||"").join(""),l,a):typeof e=="object"&&e&&e.text?r.insertText(e.text,l,a):r.insertText(e,l,a):r.replaceWith(l,a,s),t.updateSelection&&x0(r,r.steps.length-1,-1)}return!0},C0=()=>({state:n,dispatch:e})=>C1(n,e),k0=()=>({state:n,dispatch:e})=>k1(n,e),w0=()=>({state:n,dispatch:e})=>v1(n,e),T0=()=>({state:n,dispatch:e})=>S1(n,e),A0=()=>({tr:n,state:e,dispatch:t})=>{try{const r=ko(e.doc,e.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},O0=()=>({state:n,dispatch:e,tr:t})=>{try{const r=ko(n.doc,n.selection.$from.pos,1);return r==null?!1:(t.join(r,2),e&&e(t),!0)}catch{return!1}};function Du(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function M0(n){const e=n.split(/-(?!$)/);let t=e[e.length-1];t==="Space"&&(t=" ");let r,o,i,s;for(let l=0;l<e.length-1;l+=1){const a=e[l];if(/^(cmd|meta|m)$/i.test(a))s=!0;else if(/^a(lt)?$/i.test(a))r=!0;else if(/^(c|ctrl|control)$/i.test(a))o=!0;else if(/^s(hift)?$/i.test(a))i=!0;else if(/^mod$/i.test(a))Js()||Du()?s=!0:o=!0;else throw new Error(`Unrecognized modifier name: ${a}`)}return r&&(t=`Alt-${t}`),o&&(t=`Ctrl-${t}`),s&&(t=`Meta-${t}`),i&&(t=`Shift-${t}`),t}const I0=n=>({editor:e,view:t,tr:r,dispatch:o})=>{const i=M0(n).split(/-(?!$)/),s=i.find(c=>!["Alt","Ctrl","Meta","Shift"].includes(c)),l=new KeyboardEvent("keydown",{key:s==="Space"?" ":s,altKey:i.includes("Alt"),ctrlKey:i.includes("Ctrl"),metaKey:i.includes("Meta"),shiftKey:i.includes("Shift"),bubbles:!0,cancelable:!0}),a=e.captureTransaction(()=>{t.someProp("handleKeyDown",c=>c(t,l))});return a==null||a.steps.forEach(c=>{const u=c.map(r.mapping);u&&o&&r.maybeStep(u)}),!0};function Hr(n,e,t={}){const{from:r,to:o,empty:i}=n.selection,s=e?Ye(e,n.schema):null,l=[];n.doc.nodesBetween(r,o,(d,f)=>{if(d.isText)return;const h=Math.max(r,f),p=Math.min(o,f+d.nodeSize);l.push({node:d,from:h,to:p})});const a=o-r,c=l.filter(d=>s?s.name===d.node.type.name:!0).filter(d=>zo(d.node.attrs,t,{strict:!1}));return i?!!c.length:c.reduce((d,f)=>d+f.to-f.from,0)>=a}const N0=(n,e={})=>({state:t,dispatch:r})=>{const o=Ye(n,t.schema);return Hr(t,o,e)?w1(t,r):!1},R0=()=>({state:n,dispatch:e})=>M1(n,e),D0=n=>({state:e,dispatch:t})=>{const r=Ye(n,e.schema);return F1(r)(e,t)},L0=()=>({state:n,dispatch:e})=>T1(n,e);function Ho(n,e){return e.nodes[n]?"node":e.marks[n]?"mark":null}function Lu(n,e){const t=typeof e=="string"?[e]:e;return Object.keys(n).reduce((r,o)=>(t.includes(o)||(r[o]=n[o]),r),{})}const P0=(n,e)=>({tr:t,state:r,dispatch:o})=>{let i=null,s=null;const l=Ho(typeof n=="string"?n:n.name,r.schema);return l?(l==="node"&&(i=Ye(n,r.schema)),l==="mark"&&(s=Cn(n,r.schema)),o&&t.selection.ranges.forEach(a=>{r.doc.nodesBetween(a.$from.pos,a.$to.pos,(c,u)=>{i&&i===c.type&&t.setNodeMarkup(u,void 0,Lu(c.attrs,e)),s&&c.marks.length&&c.marks.forEach(d=>{s===d.type&&t.addMark(u,u+c.nodeSize,s.create(Lu(d.attrs,e)))})})}),!0):!1},B0=()=>({tr:n,dispatch:e})=>(e&&n.scrollIntoView(),!0),F0=()=>({tr:n,commands:e})=>e.setTextSelection({from:0,to:n.doc.content.size}),V0=()=>({state:n,dispatch:e})=>b1(n,e),z0=()=>({state:n,dispatch:e})=>E1(n,e),$0=()=>({state:n,dispatch:e})=>I1(n,e),H0=()=>({state:n,dispatch:e})=>D1(n,e),U0=()=>({state:n,dispatch:e})=>R1(n,e);function Pu(n,e,t={}){return $o(n,e,{slice:!1,parseOptions:t})}const j0=(n,e=!1,t={})=>({tr:r,editor:o,dispatch:i})=>{const{doc:s}=r,l=Pu(n,o.schema,t);return i&&r.replaceWith(0,s.content.size,l).setMeta("preventUpdate",!e),!0};function Uo(n,e){const t=Cn(e,n.schema),{from:r,to:o,empty:i}=n.selection,s=[];i?(n.storedMarks&&s.push(...n.storedMarks),s.push(...n.selection.$head.marks())):n.doc.nodesBetween(r,o,a=>{s.push(...a.marks)});const l=s.find(a=>a.type.name===t.name);return l?{...l.attrs}:{}}function W0(n,e){const t=new Zl(n);return e.forEach(r=>{r.steps.forEach(o=>{t.step(o)})}),t}function K0(n){for(let e=0;e<n.edgeCount;e+=1){const{type:t}=n.edge(e);if(t.isTextblock&&!t.hasRequiredAttrs())return t}return null}function G0(n,e,t){const r=[];return n.nodesBetween(e.from,e.to,(o,i)=>{t(o)&&r.push({node:o,pos:i})}),r}function J0(n,e){for(let t=n.depth;t>0;t-=1){const r=n.node(t);if(e(r))return{pos:t>0?n.before(t):0,start:n.start(t),depth:t,node:r}}}function Ys(n){return e=>J0(e.$from,n)}function Y0(n,e){const t=jt.fromSchema(e).serializeFragment(n),o=document.implementation.createHTMLDocument().createElement("div");return o.appendChild(t),o.innerHTML}function X0(n,e){const t={from:0,to:n.content.size};return Mu(n,t,e)}function Z0(n,e){const t=Ye(e,n.schema),{from:r,to:o}=n.selection,i=[];n.doc.nodesBetween(r,o,l=>{i.push(l)});const s=i.reverse().find(l=>l.type.name===t.name);return s?{...s.attrs}:{}}function Bu(n,e){const t=Ho(typeof e=="string"?e:e.name,n.schema);return t==="node"?Z0(n,e):t==="mark"?Uo(n,e):{}}function Q0(n,e=JSON.stringify){const t={};return n.filter(r=>{const o=e(r);return Object.prototype.hasOwnProperty.call(t,o)?!1:t[o]=!0})}function _0(n){const e=Q0(n);return e.length===1?e:e.filter((t,r)=>!e.filter((i,s)=>s!==r).some(i=>t.oldRange.from>=i.oldRange.from&&t.oldRange.to<=i.oldRange.to&&t.newRange.from>=i.newRange.from&&t.newRange.to<=i.newRange.to))}function q0(n){const{mapping:e,steps:t}=n,r=[];return e.maps.forEach((o,i)=>{const s=[];if(o.ranges.length)o.forEach((l,a)=>{s.push({from:l,to:a})});else{const{from:l,to:a}=t[i];if(l===void 0||a===void 0)return;s.push({from:l,to:a})}s.forEach(({from:l,to:a})=>{const c=e.slice(i).map(l,-1),u=e.slice(i).map(a),d=e.invert().map(c,-1),f=e.invert().map(u);r.push({oldRange:{from:d,to:f},newRange:{from:c,to:u}})})}),_0(r)}function Xs(n,e,t){const r=[];return n===e?t.resolve(n).marks().forEach(o=>{const i=t.resolve(n-1),s=Ks(i,o.type);s&&r.push({mark:o,...s})}):t.nodesBetween(n,e,(o,i)=>{r.push(...o.marks.map(s=>({from:i,to:i+o.nodeSize,mark:s})))}),r}function jo(n,e,t){return Object.fromEntries(Object.entries(t).filter(([r])=>{const o=n.find(i=>i.type===e&&i.name===r);return o?o.attribute.keepOnSplit:!1}))}function Zs(n,e,t={}){const{empty:r,ranges:o}=n.selection,i=e?Cn(e,n.schema):null;if(r)return!!(n.storedMarks||n.selection.$from.marks()).filter(d=>i?i.name===d.type.name:!0).find(d=>zo(d.attrs,t,{strict:!1}));let s=0;const l=[];if(o.forEach(({$from:d,$to:f})=>{const h=d.pos,p=f.pos;n.doc.nodesBetween(h,p,(g,y)=>{if(!g.isText&&!g.marks.length)return;const S=Math.max(h,y),C=Math.min(p,y+g.nodeSize),k=C-S;s+=k,l.push(...g.marks.map(b=>({mark:b,from:S,to:C})))})}),s===0)return!1;const a=l.filter(d=>i?i.name===d.mark.type.name:!0).filter(d=>zo(d.mark.attrs,t,{strict:!1})).reduce((d,f)=>d+f.to-f.from,0),c=l.filter(d=>i?d.mark.type!==i&&d.mark.type.excludes(i):!0).reduce((d,f)=>d+f.to-f.from,0);return(a>0?a+c:a)>=s}function ey(n,e,t={}){if(!e)return Hr(n,null,t)||Zs(n,null,t);const r=Ho(e,n.schema);return r==="node"?Hr(n,e,t):r==="mark"?Zs(n,e,t):!1}function Fu(n,e){const{nodeExtensions:t}=Fo(e),r=t.find(s=>s.name===n);if(!r)return!1;const o={name:r.name,options:r.options,storage:r.storage},i=Ie(pe(r,"group",o));return typeof i!="string"?!1:i.split(" ").includes("list")}function ty(n){var e;const t=(e=n.type.createAndFill())===null||e===void 0?void 0:e.toJSON(),r=n.toJSON();return JSON.stringify(t)===JSON.stringify(r)}function ny(n){return n instanceof Se}function Vu(n,e,t){const o=n.state.doc.content.size,i=sn(e,0,o),s=sn(t,0,o),l=n.coordsAtPos(i),a=n.coordsAtPos(s,-1),c=Math.min(l.top,a.top),u=Math.max(l.bottom,a.bottom),d=Math.min(l.left,a.left),f=Math.max(l.right,a.right),h=f-d,p=u-c,S={top:c,bottom:u,left:d,right:f,width:h,height:p,x:d,y:c};return{...S,toJSON:()=>S}}function ry(n,e,t){var r;const{selection:o}=e;let i=null;if(Gs(o)&&(i=o.$cursor),i){const l=(r=n.storedMarks)!==null&&r!==void 0?r:i.marks();return!!t.isInSet(l)||!l.some(a=>a.type.excludes(t))}const{ranges:s}=o;return s.some(({$from:l,$to:a})=>{let c=l.depth===0?n.doc.inlineContent&&n.doc.type.allowsMarkType(t):!1;return n.doc.nodesBetween(l.pos,a.pos,(u,d,f)=>{if(c)return!1;if(u.isInline){const h=!f||f.type.allowsMarkType(t),p=!!t.isInSet(u.marks)||!u.marks.some(g=>g.type.excludes(t));c=h&&p}return!c}),c})}const oy=(n,e={})=>({tr:t,state:r,dispatch:o})=>{const{selection:i}=t,{empty:s,ranges:l}=i,a=Cn(n,r.schema);if(o)if(s){const c=Uo(r,a);t.addStoredMark(a.create({...c,...e}))}else l.forEach(c=>{const u=c.$from.pos,d=c.$to.pos;r.doc.nodesBetween(u,d,(f,h)=>{const p=Math.max(h,u),g=Math.min(h+f.nodeSize,d);f.marks.find(S=>S.type===a)?f.marks.forEach(S=>{a===S.type&&t.addMark(p,g,a.create({...S.attrs,...e}))}):t.addMark(p,g,a.create(e))})});return ry(r,t,a)},iy=(n,e)=>({tr:t})=>(t.setMeta(n,e),!0),sy=(n,e={})=>({state:t,dispatch:r,chain:o})=>{const i=Ye(n,t.schema);return i.isTextblock?o().command(({commands:s})=>Eu(i,e)(t)?!0:s.clearNodes()).command(({state:s})=>Eu(i,e)(s,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},ay=n=>({tr:e,dispatch:t})=>{if(t){const{doc:r}=e,o=sn(n,0,r.content.size),i=Se.create(r,o);e.setSelection(i)}return!0},ly=n=>({tr:e,dispatch:t})=>{if(t){const{doc:r}=e,{from:o,to:i}=typeof n=="number"?{from:n,to:n}:n,s=De.atStart(r).from,l=De.atEnd(r).to,a=sn(o,s,l),c=sn(i,s,l),u=De.create(r,a,c);e.setSelection(u)}return!0},cy=n=>({state:e,dispatch:t})=>{const r=Ye(n,e.schema);return $1(r)(e,t)};function zu(n,e){const t=n.storedMarks||n.selection.$to.parentOffset&&n.selection.$from.marks();if(t){const r=t.filter(o=>e==null?void 0:e.includes(o.type.name));n.tr.ensureMarks(r)}}const uy=({keepMarks:n=!0}={})=>({tr:e,state:t,dispatch:r,editor:o})=>{const{selection:i,doc:s}=e,{$from:l,$to:a}=i,c=o.extensionManager.attributes,u=jo(c,l.node().type.name,l.node().attrs);if(i instanceof Se&&i.node.isBlock)return!l.parentOffset||!qn(s,l.pos)?!1:(r&&(n&&zu(t,o.extensionManager.splittableMarks),e.split(l.pos).scrollIntoView()),!0);if(!l.parent.isBlock)return!1;if(r){const d=a.parentOffset===a.parent.content.size;i instanceof De&&e.deleteSelection();const f=l.depth===0?void 0:K0(l.node(-1).contentMatchAt(l.indexAfter(-1)));let h=d&&f?[{type:f,attrs:u}]:void 0,p=qn(e.doc,e.mapping.map(l.pos),1,h);if(!h&&!p&&qn(e.doc,e.mapping.map(l.pos),1,f?[{type:f}]:void 0)&&(p=!0,h=f?[{type:f,attrs:u}]:void 0),p&&(e.split(e.mapping.map(l.pos),1,h),f&&!d&&!l.parentOffset&&l.parent.type!==f)){const g=e.mapping.map(l.before()),y=e.doc.resolve(g);l.node(-1).canReplaceWith(y.index(),y.index()+1,f)&&e.setNodeMarkup(e.mapping.map(l.before()),f)}n&&zu(t,o.extensionManager.splittableMarks),e.scrollIntoView()}return!0},dy=n=>({tr:e,state:t,dispatch:r,editor:o})=>{var i;const s=Ye(n,t.schema),{$from:l,$to:a}=t.selection,c=t.selection.node;if(c&&c.isBlock||l.depth<2||!l.sameParent(a))return!1;const u=l.node(-1);if(u.type!==s)return!1;const d=o.extensionManager.attributes;if(l.parent.content.size===0&&l.node(-1).childCount===l.indexAfter(-1)){if(l.depth===2||l.node(-3).type!==s||l.index(-2)!==l.node(-2).childCount-1)return!1;if(r){let y=oe.empty;const S=l.index(-1)?1:l.index(-2)?2:3;for(let F=l.depth-S;F>=l.depth-3;F-=1)y=oe.from(l.node(F).copy(y));const C=l.indexAfter(-1)<l.node(-2).childCount?1:l.indexAfter(-2)<l.node(-3).childCount?2:3,k=jo(d,l.node().type.name,l.node().attrs),b=((i=s.contentMatch.defaultType)===null||i===void 0?void 0:i.createAndFill(k))||void 0;y=y.append(oe.from(s.createAndFill(null,b)||void 0));const R=l.before(l.depth-(S-1));e.replace(R,l.after(-C),new fe(y,4-S,0));let w=-1;e.doc.nodesBetween(R,e.doc.content.size,(F,z)=>{if(w>-1)return!1;F.isTextblock&&F.content.size===0&&(w=z+1)}),w>-1&&e.setSelection(De.near(e.doc.resolve(w))),e.scrollIntoView()}return!0}const f=a.pos===l.end()?u.contentMatchAt(0).defaultType:null,h=jo(d,u.type.name,u.attrs),p=jo(d,l.node().type.name,l.node().attrs);e.delete(l.pos,a.pos);const g=f?[{type:s,attrs:h},{type:f,attrs:p}]:[{type:s,attrs:h}];if(!qn(e.doc,l.pos,2))return!1;if(r){const{selection:y,storedMarks:S}=t,{splittableMarks:C}=o.extensionManager,k=S||y.$to.parentOffset&&y.$from.marks();if(e.split(l.pos,2,g).scrollIntoView(),!k||!r)return!0;const b=k.filter(R=>C.includes(R.type.name));e.ensureMarks(b)}return!0},Qs=(n,e)=>{const t=Ys(s=>s.type===e)(n.selection);if(!t)return!0;const r=n.doc.resolve(Math.max(0,t.pos-1)).before(t.depth);if(r===void 0)return!0;const o=n.doc.nodeAt(r);return t.node.type===(o==null?void 0:o.type)&&pn(n.doc,t.pos)&&n.join(t.pos),!0},_s=(n,e)=>{const t=Ys(s=>s.type===e)(n.selection);if(!t)return!0;const r=n.doc.resolve(t.start).after(t.depth);if(r===void 0)return!0;const o=n.doc.nodeAt(r);return t.node.type===(o==null?void 0:o.type)&&pn(n.doc,r)&&n.join(r),!0};var fy=Object.freeze({__proto__:null,blur:n0,clearContent:r0,clearNodes:o0,command:i0,createParagraphNear:s0,cut:a0,deleteCurrentNode:l0,deleteNode:c0,deleteRange:u0,deleteSelection:d0,enter:f0,exitCode:p0,extendMarkRange:m0,first:g0,focus:y0,forEach:v0,insertContent:b0,insertContentAt:E0,joinUp:C0,joinDown:k0,joinBackward:w0,joinForward:T0,joinItemBackward:A0,joinItemForward:O0,keyboardShortcut:I0,lift:N0,liftEmptyBlock:R0,liftListItem:D0,newlineInCode:L0,resetAttributes:P0,scrollIntoView:B0,selectAll:F0,selectNodeBackward:V0,selectNodeForward:z0,selectParentNode:$0,selectTextblockEnd:H0,selectTextblockStart:U0,setContent:j0,setMark:oy,setMeta:iy,setNode:sy,setNodeSelection:ay,setTextSelection:ly,sinkListItem:cy,splitBlock:uy,splitListItem:dy,toggleList:(n,e,t,r={})=>({editor:o,tr:i,state:s,dispatch:l,chain:a,commands:c,can:u})=>{const{extensions:d,splittableMarks:f}=o.extensionManager,h=Ye(n,s.schema),p=Ye(e,s.schema),{selection:g,storedMarks:y}=s,{$from:S,$to:C}=g,k=S.blockRange(C),b=y||g.$to.parentOffset&&g.$from.marks();if(!k)return!1;const R=Ys(w=>Fu(w.type.name,d))(g);if(k.depth>=1&&R&&k.depth-R.depth<=1){if(R.node.type===h)return c.liftListItem(p);if(Fu(R.node.type.name,d)&&h.validContent(R.node.content)&&l)return a().command(()=>(i.setNodeMarkup(R.pos,h),!0)).command(()=>Qs(i,h)).command(()=>_s(i,h)).run()}return!t||!b||!l?a().command(()=>u().wrapInList(h,r)?!0:c.clearNodes()).wrapInList(h,r).command(()=>Qs(i,h)).command(()=>_s(i,h)).run():a().command(()=>{const w=u().wrapInList(h,r),F=b.filter(z=>f.includes(z.type.name));return i.ensureMarks(F),w?!0:c.clearNodes()}).wrapInList(h,r).command(()=>Qs(i,h)).command(()=>_s(i,h)).run()},toggleMark:(n,e={},t={})=>({state:r,commands:o})=>{const{extendEmptyMarkRange:i=!1}=t,s=Cn(n,r.schema);return Zs(r,s,e)?o.unsetMark(s,{extendEmptyMarkRange:i}):o.setMark(s,e)},toggleNode:(n,e,t={})=>({state:r,commands:o})=>{const i=Ye(n,r.schema),s=Ye(e,r.schema);return Hr(r,i,t)?o.setNode(s):o.setNode(i,t)},toggleWrap:(n,e={})=>({state:t,commands:r})=>{const o=Ye(n,t.schema);return Hr(t,o,e)?r.lift(o):r.wrapIn(o,e)},undoInputRule:()=>({state:n,dispatch:e})=>{const t=n.plugins;for(let r=0;r<t.length;r+=1){const o=t[r];let i;if(o.spec.isInputRules&&(i=o.getState(n))){if(e){const s=n.tr,l=i.transform;for(let a=l.steps.length-1;a>=0;a-=1)s.step(l.steps[a].invert(l.docs[a]));if(i.text){const a=s.doc.resolve(i.from).marks();s.replaceWith(i.from,i.to,n.schema.text(i.text,a))}else s.delete(i.from,i.to)}return!0}}return!1},unsetAllMarks:()=>({tr:n,dispatch:e})=>{const{selection:t}=n,{empty:r,ranges:o}=t;return r||e&&o.forEach(i=>{n.removeMark(i.$from.pos,i.$to.pos)}),!0},unsetMark:(n,e={})=>({tr:t,state:r,dispatch:o})=>{var i;const{extendEmptyMarkRange:s=!1}=e,{selection:l}=t,a=Cn(n,r.schema),{$from:c,empty:u,ranges:d}=l;if(!o)return!0;if(u&&s){let{from:f,to:h}=l;const p=(i=c.marks().find(y=>y.type===a))===null||i===void 0?void 0:i.attrs,g=Ks(c,a,p);g&&(f=g.from,h=g.to),t.removeMark(f,h,a)}else d.forEach(f=>{t.removeMark(f.$from.pos,f.$to.pos,a)});return t.removeStoredMark(a),!0},updateAttributes:(n,e={})=>({tr:t,state:r,dispatch:o})=>{let i=null,s=null;const l=Ho(typeof n=="string"?n:n.name,r.schema);return l?(l==="node"&&(i=Ye(n,r.schema)),l==="mark"&&(s=Cn(n,r.schema)),o&&t.selection.ranges.forEach(a=>{const c=a.$from.pos,u=a.$to.pos;r.doc.nodesBetween(c,u,(d,f)=>{i&&i===d.type&&t.setNodeMarkup(f,void 0,{...d.attrs,...e}),s&&d.marks.length&&d.marks.forEach(h=>{if(s===h.type){const p=Math.max(f,c),g=Math.min(f+d.nodeSize,u);t.addMark(p,g,s.create({...h.attrs,...e}))}})})}),!0):!1},wrapIn:(n,e={})=>({state:t,dispatch:r})=>{const o=Ye(n,t.schema);return L1(o,e)(t,r)},wrapInList:(n,e={})=>({state:t,dispatch:r})=>{const o=Ye(n,t.schema);return P1(o,e)(t,r)}});const py=Tt.create({name:"commands",addCommands(){return{...fy}}}),hy=Tt.create({name:"editable",addProseMirrorPlugins(){return[new ft({key:new Ft("editable"),props:{editable:()=>this.editor.options.editable}})]}}),my=Tt.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:n}=this;return[new ft({key:new Ft("focusEvents"),props:{handleDOMEvents:{focus:(e,t)=>{n.isFocused=!0;const r=n.state.tr.setMeta("focus",{event:t}).setMeta("addToHistory",!1);return e.dispatch(r),!1},blur:(e,t)=>{n.isFocused=!1;const r=n.state.tr.setMeta("blur",{event:t}).setMeta("addToHistory",!1);return e.dispatch(r),!1}}}})]}}),gy=Tt.create({name:"keymap",addKeyboardShortcuts(){const n=()=>this.editor.commands.first(({commands:s})=>[()=>s.undoInputRule(),()=>s.command(({tr:l})=>{const{selection:a,doc:c}=l,{empty:u,$anchor:d}=a,{pos:f,parent:h}=d,p=d.parent.isTextblock?l.doc.resolve(f-1):d,g=p.parent.type.spec.isolating,y=d.pos-d.parentOffset,S=g&&p.parent.childCount===1?y===d.pos:Re.atStart(c).from===f;return!u||!S||!h.type.isTextblock||h.textContent.length?!1:s.clearNodes()}),()=>s.deleteSelection(),()=>s.joinBackward(),()=>s.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:s})=>[()=>s.deleteSelection(),()=>s.deleteCurrentNode(),()=>s.joinForward(),()=>s.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:s})=>[()=>s.newlineInCode(),()=>s.createParagraphNear(),()=>s.liftEmptyBlock(),()=>s.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:n,"Mod-Backspace":n,"Shift-Backspace":n,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},o={...r},i={...r,"Ctrl-h":n,"Alt-Backspace":n,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return Js()||Du()?i:o},addProseMirrorPlugins(){return[new ft({key:new Ft("clearDocument"),appendTransaction:(n,e,t)=>{if(!(n.some(p=>p.docChanged)&&!e.doc.eq(t.doc)))return;const{empty:o,from:i,to:s}=e.selection,l=Re.atStart(e.doc).from,a=Re.atEnd(e.doc).to;if(o||!(i===l&&s===a)||!(t.doc.textBetween(0,t.doc.content.size," "," ").length===0))return;const d=t.tr,f=Po({state:t,transaction:d}),{commands:h}=new Bo({editor:this.editor,state:f});if(h.clearNodes(),!!d.steps.length)return d}})]}}),yy=Tt.create({name:"tabindex",addProseMirrorPlugins(){return[new ft({key:new Ft("tabindex"),props:{attributes:this.editor.isEditable?{tabindex:"0"}:{}}})]}});var vy=Object.freeze({__proto__:null,ClipboardTextSerializer:t0,Commands:py,Editable:hy,FocusEvents:my,Keymap:gy,Tabindex:yy});const by=`.ProseMirror {
|
|
11
|
+
Expect errors in decoding.`),E=E.replace(/[^A-Za-z0-9\+\/\=]/g,"");I=this.KEY_STR.indexOf(E.charAt(U++)),N=this.KEY_STR.indexOf(E.charAt(U++)),D=this.KEY_STR.indexOf(E.charAt(U++)),L=this.KEY_STR.indexOf(E.charAt(U++)),O=I<<2|N>>4,v=(N&15)<<4|D>>2,x=(D&3)<<6|L,K.push(O),D!==64&&K.push(v),L!==64&&K.push(x),O=v=x="",I=N=D=L="",U<E.length;);return K}}]),A}();be.initClass();var Te=function(M,E){var O=!1,v=!0,x=M.document,I=x.documentElement,N=x.addEventListener?"addEventListener":"attachEvent",D=x.addEventListener?"removeEventListener":"detachEvent",L=x.addEventListener?"":"on",U=function j(G){if(!(G.type==="readystatechange"&&x.readyState!=="complete")&&((G.type==="load"?M:x)[D](L+G.type,j,!1),!O&&(O=!0)))return E.call(M,G.type||G)},K=function j(){try{I.doScroll("left")}catch{setTimeout(j,50);return}return U("poll")};if(x.readyState!=="complete"){if(x.createEventObject&&I.doScroll){try{v=!M.frameElement}catch{}v&&K()}return x[N](L+"DOMContentLoaded",U,!1),x[N](L+"readystatechange",U,!1),M[N](L+"load",U,!1)}};W._autoDiscoverFunction=function(){if(W.autoDiscover)return W.discover()},Te(window,W._autoDiscoverFunction);function Ce(A,M){return typeof A<"u"&&A!==null?M(A):void 0}function Ae(A,M,E){if(typeof A<"u"&&A!==null&&typeof A[M]=="function")return E(A,M)}window.Dropzone=W;var ge=W}(),i}()})})(bl);var Vh=bl.exports;const xl=Fh(Vh),zh={class:"fallback"},$h=m.createElementVNode("input",{id:"file",type:"file",name:"file",multiple:""},null,-1),Uh={for:"file"},Hh={class:"dz-message","data-dz-message":""},jh={id:"bd-dropzone-theme",style:{display:"none"}},Wh={class:"dz-preview dz-file-preview"},Kh={class:"dz-details"},Gh=m.createElementVNode("img",{"data-dz-thumbnail":"",class:"dz-image"},null,-1),Jh=m.createElementVNode("div",{class:"dz-filename"},[m.createElementVNode("small",{"data-dz-name":""})],-1),Yh=m.createElementVNode("div",{class:"dz-progress"},[m.createElementVNode("div",{class:"spinner-border text-primary spinner-border-sm",role:"status"},[m.createElementVNode("span",{class:"visually-hidden"},"Loading...")])],-1),Xh={class:"dz-success-mark"},Zh={class:"dz-error-message text-danger"},Qh=m.createElementVNode("small",{"data-dz-errormessage":""},null,-1),Sl=m.defineComponent({__name:"BDDropzone",props:{modelValue:{default:[]},buttonText:{default:void 0},multiple:{type:Boolean,default:!1},errorMessage:{default:void 0},fileSizeExceededMessage:{default:void 0},acceptedFiles:{default:".jpg"},url:{default:""},tag:{default:"form"},token:{default:""}},emits:["update:modelValue"],setup(n,{emit:e}){const t=n,r=m.computed(()=>({variant:co.PRIMARY,size:ot.SM})),o=Nn(t,"modelValue",e);let i=null;xl.autoDiscover=!1,m.watch(()=>t.modelValue,()=>{s()}),m.onMounted(()=>{document.getElementById("dropzone")&&l()});const s=()=>{i&&(i.destroy(),l())},l=()=>{var h;i=new xl("#dropzone",{url:t.url,method:"post",acceptedFiles:t.acceptedFiles,addRemoveLinks:!1,maxFilesize:10,maxFiles:t.multiple?void 0:1,headers:{RequestVerificationToken:t.token},dictResponseError:t.errorMessage,dictFileTooBig:t.fileSizeExceededMessage,previewTemplate:(h=document.querySelector("#bd-dropzone-theme"))==null?void 0:h.innerHTML}),i.on("error",c),i.on("success",a),i.on("removedfile",d)},a=function(h,p){var g;o.value.push({UUID:(g=h.upload)==null?void 0:g.uuid,CorrelationId:p.CorrelationId,Naam:p.Naam}),u(h)},c=function(h){u(h)},u=function(h){const p=h.name;if(!(p.endsWith(".png")||p.endsWith(".jpg")||p.endsWith(".jpeg")||p.endsWith(".gif"))){const g=h.previewElement.getElementsByClassName("icon-file"),y=h.previewElement.getElementsByClassName("dz-image");g[0].classList.remove("d-none"),y[0].classList.add("d-none")}},d=function(h){const p=o.value.findIndex(g=>{var y,S;return((y=g.upload)==null?void 0:y.uuid)===((S=h.upload)==null?void 0:S.uuid)});p!==-1&&o.value.splice(p,1)},f=m.computed(()=>t.tag??"form");return(h,p)=>(m.openBlock(),m.createElementBlock(m.Fragment,null,[(m.openBlock(),m.createBlock(m.resolveDynamicComponent(f.value),{id:"dropzone",class:"dropzone bd-dropzone",enctype:"multipart/form-data"},{default:m.withCtx(()=>[m.createElementVNode("div",zh,[$h,m.createTextVNode(" test "),m.createElementVNode("label",Uh,[m.createVNode(m.unref(Er)),m.createTextVNode(" "+m.toDisplayString(t.buttonText),1)])]),m.createElementVNode("div",Hh,[m.createVNode(m.unref(Ht),m.normalizeProps(m.guardReactiveProps(r.value)),{default:m.withCtx(()=>[m.createVNode(m.unref(Er)),m.createTextVNode(" "+m.toDisplayString(t.buttonText),1)]),_:1},16)])]),_:1})),m.createElementVNode("div",jh,[m.createElementVNode("div",Wh,[m.createElementVNode("div",Kh,[Gh,m.createVNode(m.unref(Vi),{"data-dz-thumbnail":"",class:"d-none"}),Jh,m.createVNode(m.unref(Ht),{class:"dz-remove",alt:"Click me to remove the file.","data-dz-remove":""},{default:m.withCtx(()=>[m.createVNode(m.unref(Fi))]),_:1})]),Yh,m.createElementVNode("div",Xh,[m.createVNode(m.unref(io))]),m.createElementVNode("div",Zh,[m.createVNode(m.unref(so)),Qh])])])],64))}});function Ze(n){this.content=n}Ze.prototype={constructor:Ze,find:function(n){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===n)return e;return-1},get:function(n){var e=this.find(n);return e==-1?void 0:this.content[e+1]},update:function(n,e,t){var r=t&&t!=n?this.remove(t):this,o=r.find(n),i=r.content.slice();return o==-1?i.push(t||n,e):(i[o+1]=e,t&&(i[o]=t)),new Ze(i)},remove:function(n){var e=this.find(n);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new Ze(t)},addToStart:function(n,e){return new Ze([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new Ze(t)},addBefore:function(n,e,t){var r=this.remove(e),o=r.content.slice(),i=r.find(n);return o.splice(i==-1?o.length:i,0,e,t),new Ze(o)},forEach:function(n){for(var e=0;e<this.content.length;e+=2)n(this.content[e],this.content[e+1])},prepend:function(n){return n=Ze.from(n),n.size?new Ze(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=Ze.from(n),n.size?new Ze(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=Ze.from(n);for(var t=0;t<n.content.length;t+=2)e=e.remove(n.content[t]);return e},toObject:function(){var n={};return this.forEach(function(e,t){n[e]=t}),n},get size(){return this.content.length>>1}},Ze.from=function(n){if(n instanceof Ze)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new Ze(e)};function El(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let o=n.child(r),i=e.child(r);if(o==i){t+=o.nodeSize;continue}if(!o.sameMarkup(i))return t;if(o.isText&&o.text!=i.text){for(let s=0;o.text[s]==i.text[s];s++)t++;return t}if(o.content.size||i.content.size){let s=El(o.content,i.content,t+1);if(s!=null)return s}t+=o.nodeSize}}function kl(n,e,t,r){for(let o=n.childCount,i=e.childCount;;){if(o==0||i==0)return o==i?null:{a:t,b:r};let s=n.child(--o),l=e.child(--i),a=s.nodeSize;if(s==l){t-=a,r-=a;continue}if(!s.sameMarkup(l))return{a:t,b:r};if(s.isText&&s.text!=l.text){let c=0,u=Math.min(s.text.length,l.text.length);for(;c<u&&s.text[s.text.length-c-1]==l.text[l.text.length-c-1];)c++,t--,r--;return{a:t,b:r}}if(s.content.size||l.content.size){let c=kl(s.content,l.content,t-1,r-1);if(c)return c}t-=a,r-=a}}class oe{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,t,r,o=0,i){for(let s=0,l=0;l<t;s++){let a=this.content[s],c=l+a.nodeSize;if(c>e&&r(a,o+l,i||null,s)!==!1&&a.content.size){let u=l+1;a.nodesBetween(Math.max(0,e-u),Math.min(a.content.size,t-u),r,o+u)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,o){let i="",s=!0;return this.nodesBetween(e,t,(l,a)=>{l.isText?(i+=l.text.slice(Math.max(e,a)-a,t-a),s=!r):l.isLeaf?(o?i+=typeof o=="function"?o(l):o:l.type.spec.leafText&&(i+=l.type.spec.leafText(l)),s=!r):!s&&l.isBlock&&(i+=r,s=!0)},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,o=this.content.slice(),i=0;for(t.isText&&t.sameMarkup(r)&&(o[o.length-1]=t.withText(t.text+r.text),i=1);i<e.content.length;i++)o.push(e.content[i]);return new oe(o,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],o=0;if(t>e)for(let i=0,s=0;s<t;i++){let l=this.content[i],a=s+l.nodeSize;a>e&&((s<e||a>t)&&(l.isText?l=l.cut(Math.max(0,e-s),Math.min(l.text.length,t-s)):l=l.cut(Math.max(0,e-s-1),Math.min(l.content.size,t-s-1))),r.push(l),o+=l.nodeSize),s=a}return new oe(r,o)}cutByIndex(e,t){return e==t?oe.empty:e==0&&t==this.content.length?this:new oe(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let o=this.content.slice(),i=this.size+t.nodeSize-r.nodeSize;return o[e]=t,new oe(o,i)}addToStart(e){return new oe([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new oe(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))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(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,r=0;t<this.content.length;t++){let o=this.content[t];e(o,r,t),r+=o.nodeSize}}findDiffStart(e,t=0){return El(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return kl(this,e,t,r)}findIndex(e,t=-1){if(e==0)return ho(0,e);if(e==this.size)return ho(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let r=0,o=0;;r++){let i=this.child(r),s=o+i.nodeSize;if(s>=e)return s==e||t>0?ho(r+1,s):ho(r,o);o=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return oe.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new oe(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return oe.empty;let t,r=0;for(let o=0;o<e.length;o++){let i=e[o];r+=i.nodeSize,o&&i.isText&&e[o-1].sameMarkup(i)?(t||(t=e.slice(0,o)),t[t.length-1]=i.withText(t[t.length-1].text+i.text)):t&&t.push(i)}return new oe(t||e,r)}static from(e){if(!e)return oe.empty;if(e instanceof oe)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new oe([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}oe.empty=new oe([],0);const qi={index:0,offset:0};function ho(n,e){return qi.index=n,qi.offset=e,qi}function mo(n,e){if(n===e)return!0;if(!(n&&typeof n=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(n);if(Array.isArray(e)!=t)return!1;if(t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!mo(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!mo(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let Le=class Ha{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let o=0;o<e.length;o++){let i=e[o];if(this.eq(i))return e;if(this.type.excludes(i.type))t||(t=e.slice(0,o));else{if(i.type.excludes(this.type))return e;!r&&i.type.rank>this.type.rank&&(t||(t=e.slice(0,o)),t.push(this),r=!0),t&&t.push(i)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&mo(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[t.type];if(!r)throw new RangeError(`There is no mark type ${t.type} in this schema`);return r.create(t.attrs)}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(t[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Ha.none;if(e instanceof Ha)return[e];let t=e.slice();return t.sort((r,o)=>r.type.rank-o.type.rank),t}};Le.none=[];class go extends Error{}class fe{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=wl(this.content,e+this.openStart,t);return r&&new fe(r,this.openStart,this.openEnd)}removeBetween(e,t){return new fe(Cl(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return fe.empty;let r=t.openStart||0,o=t.openEnd||0;if(typeof r!="number"||typeof o!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new fe(oe.fromJSON(e,t.content),r,o)}static maxOpen(e,t=!0){let r=0,o=0;for(let i=e.firstChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.lastChild)o++;return new fe(e,r,o)}}fe.empty=new fe(oe.empty,0,0);function Cl(n,e,t){let{index:r,offset:o}=n.findIndex(e),i=n.maybeChild(r),{index:s,offset:l}=n.findIndex(t);if(o==e||i.isText){if(l!=t&&!n.child(s).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=s)throw new RangeError("Removing non-flat range");return n.replaceChild(r,i.copy(Cl(i.content,e-o-1,t-o-1)))}function wl(n,e,t,r){let{index:o,offset:i}=n.findIndex(e),s=n.maybeChild(o);if(i==e||s.isText)return r&&!r.canReplace(o,o,t)?null:n.cut(0,e).append(t).append(n.cut(e));let l=wl(s.content,e-i-1,t);return l&&n.replaceChild(o,s.copy(l))}function _h(n,e,t){if(t.openStart>n.depth)throw new go("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new go("Inconsistent open depths");return Tl(n,e,t,0)}function Tl(n,e,t,r){let o=n.index(r),i=n.node(r);if(o==e.index(r)&&r<n.depth-t.openStart){let s=Tl(n,e,t,r+1);return i.copy(i.content.replaceChild(o,s))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&n.depth==r&&e.depth==r){let s=n.parent,l=s.content;return Ln(s,l.cut(0,n.parentOffset).append(t.content).append(l.cut(e.parentOffset)))}else{let{start:s,end:l}=qh(t,n);return Ln(i,Ol(n,s,l,e,r))}else return Ln(i,yo(n,e,r))}function Al(n,e){if(!e.type.compatibleContent(n.type))throw new go("Cannot join "+e.type.name+" onto "+n.type.name)}function es(n,e,t){let r=n.node(t);return Al(r,e.node(t)),r}function Dn(n,e){let t=e.length-1;t>=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function wr(n,e,t,r){let o=(e||n).node(t),i=0,s=e?e.index(t):o.childCount;n&&(i=n.index(t),n.depth>t?i++:n.textOffset&&(Dn(n.nodeAfter,r),i++));for(let l=i;l<s;l++)Dn(o.child(l),r);e&&e.depth==t&&e.textOffset&&Dn(e.nodeBefore,r)}function Ln(n,e){return n.type.checkContent(e),n.copy(e)}function Ol(n,e,t,r,o){let i=n.depth>o&&es(n,e,o+1),s=r.depth>o&&es(t,r,o+1),l=[];return wr(null,n,o,l),i&&s&&e.index(o)==t.index(o)?(Al(i,s),Dn(Ln(i,Ol(n,e,t,r,o+1)),l)):(i&&Dn(Ln(i,yo(n,e,o+1)),l),wr(e,t,o,l),s&&Dn(Ln(s,yo(t,r,o+1)),l)),wr(r,null,o,l),new oe(l)}function yo(n,e,t){let r=[];if(wr(null,n,t,r),n.depth>t){let o=es(n,e,t+1);Dn(Ln(o,yo(n,e,t+1)),r)}return wr(e,null,t,r),new oe(r)}function qh(n,e){let t=e.depth-n.openStart,o=e.node(t).copy(n.content);for(let i=t-1;i>=0;i--)o=e.node(i).copy(oe.from(o));return{start:o.resolveNoCache(n.openStart+t),end:o.resolveNoCache(o.content.size-n.openEnd-t)}}class Tr{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],o=e.child(t);return r?e.child(t).cut(r):o}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],o=t==0?0:this.path[t*3-1]+1;for(let i=0;i<e;i++)o+=r.child(i).nodeSize;return o}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return Le.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),o=e.maybeChild(t);if(!r){let l=r;r=o,o=l}let i=r.marks;for(var s=0;s<i.length;s++)i[s].type.spec.inclusive===!1&&(!o||!i[s].isInSet(o.marks))&&(i=i[s--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,o=e.parent.maybeChild(e.index());for(var i=0;i<r.length;i++)r[i].type.spec.inclusive===!1&&(!o||!r[i].isInSet(o.marks))&&(r=r[i--].removeFromSet(r));return r}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new vo(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],o=0,i=t;for(let s=e;;){let{index:l,offset:a}=s.content.findIndex(i),c=i-a;if(r.push(s,l,o+a),!c||(s=s.child(l),s.isText))break;i=c-1,o+=a+1}return new Tr(t,r,i)}static resolveCached(e,t){for(let o=0;o<ts.length;o++){let i=ts[o];if(i.pos==t&&i.doc==e)return i}let r=ts[ns]=Tr.resolve(e,t);return ns=(ns+1)%em,r}}let ts=[],ns=0,em=12;class vo{constructor(e,t,r){this.$from=e,this.$to=t,this.depth=r}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)}}const tm=Object.create(null);let Pn=class ja{constructor(e,t,r,o=Le.none){this.type=e,this.attrs=t,this.marks=o,this.content=r||oe.empty}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,r,o=0){this.content.nodesBetween(e,t,r,o,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,r,o){return this.content.textBetween(e,t,r,o)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,r){return this.type==e&&mo(this.attrs,t||e.defaultAttrs||tm)&&Le.sameSet(this.marks,r||Le.none)}copy(e=null){return e==this.content?this:new ja(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new ja(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,r=!1){if(e==t)return fe.empty;let o=this.resolve(e),i=this.resolve(t),s=r?0:o.sharedDepth(t),l=o.start(s),c=o.node(s).content.cut(o.pos-l,i.pos-l);return new fe(c,o.depth-s,i.depth-s)}replace(e,t,r){return _h(this.resolve(e),this.resolve(t),r)}nodeAt(e){for(let t=this;;){let{index:r,offset:o}=t.content.findIndex(e);if(t=t.maybeChild(r),!t)return null;if(o==e||t.isText)return t;e-=o+1}}childAfter(e){let{index:t,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(t),index:t,offset:r};let o=this.content.child(t-1);return{node:o,index:t-1,offset:r-o.nodeSize}}resolve(e){return Tr.resolveCached(this,e)}resolveNoCache(e){return Tr.resolve(this,e)}rangeHasMark(e,t,r){let o=!1;return t>e&&this.nodesBetween(e,t,i=>(r.isInSet(i.marks)&&(o=!0),!o)),o}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);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),Ml(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=oe.empty,o=0,i=r.childCount){let s=this.contentMatchAt(e).matchFragment(r,o,i),l=s&&s.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let a=o;a<i;a++)if(!this.type.allowsMarks(r.child(a).marks))return!1;return!0}canReplaceWith(e,t,r,o){if(o&&!this.type.allowsMarks(o))return!1;let i=this.contentMatchAt(e).matchType(r),s=i&&i.matchFragment(this.content,t);return s?s.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content);let e=Le.none;for(let t=0;t<this.marks.length;t++)e=this.marks[t].addToSet(e);if(!Le.sameSet(e,this.marks))throw new 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 e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r=null;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let o=oe.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,o,r)}};Pn.prototype.text=void 0;class bo extends Pn{constructor(e,t,r,o){if(super(e,t,null,o),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Ml(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new bo(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new bo(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function Ml(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class Bn{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new nm(e,t);if(r.next==null)return Bn.empty;let o=Il(r);r.next&&r.err("Unexpected trailing text");let i=cm(lm(o));return um(i,r),i}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,r=e.childCount){let o=this;for(let i=t;o&&i<r;i++)o=o.matchType(e.child(i).type);return o}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let r=0;r<e.next.length;r++)if(this.next[t].type==e.next[r].type)return!0;return!1}fillBefore(e,t=!1,r=0){let o=[this];function i(s,l){let a=s.matchFragment(e,r);if(a&&(!t||a.validEnd))return oe.from(l.map(c=>c.createAndFill()));for(let c=0;c<s.next.length;c++){let{type:u,next:d}=s.next[c];if(!(u.isText||u.hasRequiredAttrs())&&o.indexOf(d)==-1){o.push(d);let f=i(d,l.concat(u));if(f)return f}}return null}return i(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let o=r.shift(),i=o.match;if(i.matchType(e)){let s=[];for(let l=o;l.type;l=l.via)s.push(l.type);return s.reverse()}for(let s=0;s<i.next.length;s++){let{type:l,next:a}=i.next[s];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in t)&&(!o.type||a.validEnd)&&(r.push({match:l.contentMatch,type:l,via:o}),t[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let o=0;o<r.next.length;o++)e.indexOf(r.next[o].next)==-1&&t(r.next[o].next)}return t(this),e.map((r,o)=>{let i=o+(r.validEnd?"*":" ")+" ";for(let s=0;s<r.next.length;s++)i+=(s?", ":"")+r.next[s].type.name+"->"+e.indexOf(r.next[s].next);return i}).join(`
|
|
12
|
+
`)}}Bn.empty=new Bn(!0);class nm{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.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(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function Il(n){let e=[];do e.push(rm(n));while(n.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function rm(n){let e=[];do e.push(om(n));while(n.next&&n.next!=")"&&n.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function om(n){let e=am(n);for(;;)if(n.eat("+"))e={type:"plus",expr:e};else if(n.eat("*"))e={type:"star",expr:e};else if(n.eat("?"))e={type:"opt",expr:e};else if(n.eat("{"))e=im(n,e);else break;return e}function Nl(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let e=Number(n.next);return n.pos++,e}function im(n,e){let t=Nl(n),r=t;return n.eat(",")&&(n.next!="}"?r=Nl(n):r=-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:t,max:r,expr:e}}function sm(n,e){let t=n.nodeTypes,r=t[e];if(r)return[r];let o=[];for(let i in t){let s=t[i];s.groups.indexOf(e)>-1&&o.push(s)}return o.length==0&&n.err("No node type or group '"+e+"' found"),o}function am(n){if(n.eat("(")){let e=Il(n);return n.eat(")")||n.err("Missing closing paren"),e}else if(/\W/.test(n.next))n.err("Unexpected token '"+n.next+"'");else{let e=sm(n,n.next).map(t=>(n.inline==null?n.inline=t.isInline:n.inline!=t.isInline&&n.err("Mixing inline and block content"),{type:"name",value:t}));return n.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function lm(n){let e=[[]];return o(i(n,0),t()),e;function t(){return e.push([])-1}function r(s,l,a){let c={term:a,to:l};return e[s].push(c),c}function o(s,l){s.forEach(a=>a.to=l)}function i(s,l){if(s.type=="choice")return s.exprs.reduce((a,c)=>a.concat(i(c,l)),[]);if(s.type=="seq")for(let a=0;;a++){let c=i(s.exprs[a],l);if(a==s.exprs.length-1)return c;o(c,l=t())}else if(s.type=="star"){let a=t();return r(l,a),o(i(s.expr,a),a),[r(a)]}else if(s.type=="plus"){let a=t();return o(i(s.expr,l),a),o(i(s.expr,a),a),[r(a)]}else{if(s.type=="opt")return[r(l)].concat(i(s.expr,l));if(s.type=="range"){let a=l;for(let c=0;c<s.min;c++){let u=t();o(i(s.expr,a),u),a=u}if(s.max==-1)o(i(s.expr,a),a);else for(let c=s.min;c<s.max;c++){let u=t();r(a,u),o(i(s.expr,a),u),a=u}return[r(a)]}else{if(s.type=="name")return[r(l,void 0,s.value)];throw new Error("Unknown expr type")}}}}function Rl(n,e){return e-n}function Dl(n,e){let t=[];return r(e),t.sort(Rl);function r(o){let i=n[o];if(i.length==1&&!i[0].term)return r(i[0].to);t.push(o);for(let s=0;s<i.length;s++){let{term:l,to:a}=i[s];!l&&t.indexOf(a)==-1&&r(a)}}}function cm(n){let e=Object.create(null);return t(Dl(n,0));function t(r){let o=[];r.forEach(s=>{n[s].forEach(({term:l,to:a})=>{if(!l)return;let c;for(let u=0;u<o.length;u++)o[u][0]==l&&(c=o[u][1]);Dl(n,a).forEach(u=>{c||o.push([l,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let i=e[r.join(",")]=new Bn(r.indexOf(n.length-1)>-1);for(let s=0;s<o.length;s++){let l=o[s][1].sort(Rl);i.next.push({type:o[s][0],next:e[l.join(",")]||t(l)})}return i}}function um(n,e){for(let t=0,r=[n];t<r.length;t++){let o=r[t],i=!o.validEnd,s=[];for(let l=0;l<o.next.length;l++){let{type:a,next:c}=o.next[l];s.push(a.name),i&&!(a.isText||a.hasRequiredAttrs())&&(i=!1),r.indexOf(c)==-1&&r.push(c)}i&&e.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function Ll(n){let e=Object.create(null);for(let t in n){let r=n[t];if(!r.hasDefault)return null;e[t]=r.default}return e}function Pl(n,e){let t=Object.create(null);for(let r in n){let o=e&&e[r];if(o===void 0){let i=n[r];if(i.hasDefault)o=i.default;else throw new RangeError("No value supplied for attribute "+r)}t[r]=o}return t}function Bl(n){let e=Object.create(null);if(n)for(let t in n)e[t]=new dm(n[t]);return e}let Fl=class Ef{constructor(e,t,r){this.name=e,this.schema=t,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=Bl(r.attrs),this.defaultAttrs=Ll(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Bn.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:Pl(this.attrs,e)}create(e=null,t,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Pn(this,this.computeAttrs(e),oe.from(t),Le.setFrom(r))}createChecked(e=null,t,r){return t=oe.from(t),this.checkContent(t),new Pn(this,this.computeAttrs(e),t,Le.setFrom(r))}createAndFill(e=null,t,r){if(e=this.computeAttrs(e),t=oe.from(t),t.size){let s=this.contentMatch.fillBefore(t);if(!s)return null;t=s.append(t)}let o=this.contentMatch.matchFragment(t),i=o&&o.fillBefore(oe.empty,!0);return i?new Pn(this,e,t.append(i),Le.setFrom(r)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let t;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?t&&t.push(e[r]):t||(t=e.slice(0,r));return t?t.length?t:Le.none:e}static compile(e,t){let r=Object.create(null);e.forEach((i,s)=>r[i]=new Ef(i,t,s));let o=t.spec.topNode||"doc";if(!r[o])throw new RangeError("Schema is missing its top node type ('"+o+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};class dm{constructor(e){this.hasDefault=Object.prototype.hasOwnProperty.call(e,"default"),this.default=e.default}get isRequired(){return!this.hasDefault}}class xo{constructor(e,t,r,o){this.name=e,this.rank=t,this.schema=r,this.spec=o,this.attrs=Bl(o.attrs),this.excluded=null;let i=Ll(this.attrs);this.instance=i?new Le(this,i):null}create(e=null){return!e&&this.instance?this.instance:new Le(this,Pl(this.attrs,e))}static compile(e,t){let r=Object.create(null),o=0;return e.forEach((i,s)=>r[i]=new xo(i,o++,t,s)),r}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}excludes(e){return this.excluded.indexOf(e)>-1}}class fm{constructor(e){this.cached=Object.create(null);let t=this.spec={};for(let o in e)t[o]=e[o];t.nodes=Ze.from(e.nodes),t.marks=Ze.from(e.marks||{}),this.nodes=Fl.compile(this.spec.nodes,this),this.marks=xo.compile(this.spec.marks,this);let r=Object.create(null);for(let o in this.nodes){if(o in this.marks)throw new RangeError(o+" can not be both a node and a mark");let i=this.nodes[o],s=i.spec.content||"",l=i.spec.marks;i.contentMatch=r[s]||(r[s]=Bn.parse(s,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.markSet=l=="_"?null:l?Vl(this,l.split(" ")):l==""||!i.inlineContent?[]:null}for(let o in this.marks){let i=this.marks[o],s=i.spec.excludes;i.excluded=s==null?[i]:s==""?[]:Vl(this,s.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(e,t=null,r,o){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof Fl){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(t,r,o)}text(e,t){let r=this.nodes.text;return new bo(r,r.defaultAttrs,e,Le.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeFromJSON(e){return Pn.fromJSON(this,e)}markFromJSON(e){return Le.fromJSON(this,e)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function Vl(n,e){let t=[];for(let r=0;r<e.length;r++){let o=e[r],i=n.marks[o],s=i;if(i)t.push(i);else for(let l in n.marks){let a=n.marks[l];(o=="_"||a.spec.group&&a.spec.group.split(" ").indexOf(o)>-1)&&t.push(s=a)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return t}class Zn{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[],t.forEach(r=>{r.tag?this.tags.push(r):r.style&&this.styles.push(r)}),this.normalizeLists=!this.tags.some(r=>{if(!/^(ul|ol)\b/.test(r.tag)||!r.node)return!1;let o=e.nodes[r.node];return o.contentMatch.matchType(o)})}parse(e,t={}){let r=new Hl(this,t,!1);return r.addAll(e,t.from,t.to),r.finish()}parseSlice(e,t={}){let r=new Hl(this,t,!0);return r.addAll(e,t.from,t.to),fe.maxOpen(r.finish())}matchTag(e,t,r){for(let o=r?this.tags.indexOf(r)+1:0;o<this.tags.length;o++){let i=this.tags[o];if(mm(e,i.tag)&&(i.namespace===void 0||e.namespaceURI==i.namespace)&&(!i.context||t.matchesContext(i.context))){if(i.getAttrs){let s=i.getAttrs(e);if(s===!1)continue;i.attrs=s||void 0}return i}}}matchStyle(e,t,r,o){for(let i=o?this.styles.indexOf(o)+1:0;i<this.styles.length;i++){let s=this.styles[i],l=s.style;if(!(l.indexOf(e)!=0||s.context&&!r.matchesContext(s.context)||l.length>e.length&&(l.charCodeAt(e.length)!=61||l.slice(e.length+1)!=t))){if(s.getAttrs){let a=s.getAttrs(t);if(a===!1)continue;s.attrs=a||void 0}return s}}}static schemaRules(e){let t=[];function r(o){let i=o.priority==null?50:o.priority,s=0;for(;s<t.length;s++){let l=t[s];if((l.priority==null?50:l.priority)<i)break}t.splice(s,0,o)}for(let o in e.marks){let i=e.marks[o].spec.parseDOM;i&&i.forEach(s=>{r(s=jl(s)),s.mark||s.ignore||s.clearMark||(s.mark=o)})}for(let o in e.nodes){let i=e.nodes[o].spec.parseDOM;i&&i.forEach(s=>{r(s=jl(s)),s.node||s.ignore||s.mark||(s.node=o)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Zn(e,Zn.schemaRules(e)))}}const zl={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},pm={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},$l={ol:!0,ul:!0},So=1,Eo=2,Ar=4;function Ul(n,e,t){return e!=null?(e?So:0)|(e==="full"?Eo:0):n&&n.whitespace=="pre"?So|Eo:t&~Ar}class ko{constructor(e,t,r,o,i,s,l){this.type=e,this.attrs=t,this.marks=r,this.pendingMarks=o,this.solid=i,this.options=l,this.content=[],this.activeMarks=Le.none,this.stashMarks=[],this.match=s||(l&Ar?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(oe.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let r=this.type.contentMatch,o;return(o=r.findWrapping(e.type))?(this.match=r,o):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&So)){let r=this.content[this.content.length-1],o;if(r&&r.isText&&(o=/[ \t\r\n\u000c]+$/.exec(r.text))){let i=r;r.text.length==o[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-o[0].length))}}let t=oe.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(oe.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}popFromStashMark(e){for(let t=this.stashMarks.length-1;t>=0;t--)if(e.eq(this.stashMarks[t]))return this.stashMarks.splice(t,1)[0]}applyPending(e){for(let t=0,r=this.pendingMarks;t<r.length;t++){let o=r[t];(this.type?this.type.allowsMarkType(o.type):ym(o.type,e))&&!o.isInSet(this.activeMarks)&&(this.activeMarks=o.addToSet(this.activeMarks),this.pendingMarks=o.removeFromSet(this.pendingMarks))}}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!zl.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class Hl{constructor(e,t,r){this.parser=e,this.options=t,this.isOpen=r,this.open=0;let o=t.topNode,i,s=Ul(null,t.preserveWhitespace,0)|(r?Ar:0);o?i=new ko(o.type,o.attrs,Le.none,Le.none,!0,t.topMatch||o.type.contentMatch,s):r?i=new ko(null,null,Le.none,Le.none,!0,null,s):i=new ko(e.schema.topNodeType,null,Le.none,Le.none,!0,null,s),this.nodes=[i],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e){e.nodeType==3?this.addTextNode(e):e.nodeType==1&&this.addElement(e)}withStyleRules(e,t){let r=e.getAttribute("style");if(!r)return t();let o=this.readStyles(gm(r));if(!o)return;let[i,s]=o,l=this.top;for(let a=0;a<s.length;a++)this.removePendingMark(s[a],l);for(let a=0;a<i.length;a++)this.addPendingMark(i[a]);t();for(let a=0;a<i.length;a++)this.removePendingMark(i[a],l);for(let a=0;a<s.length;a++)this.addPendingMark(s[a])}addTextNode(e){let t=e.nodeValue,r=this.top;if(r.options&Eo||r.inlineContext(e)||/[^ \t\r\n\u000c]/.test(t)){if(r.options&So)r.options&Eo?t=t.replace(/\r\n?/g,`
|
|
13
|
+
`):t=t.replace(/\r?\n|\r/g," ");else if(t=t.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(t)&&this.open==this.nodes.length-1){let o=r.content[r.content.length-1],i=e.previousSibling;(!o||i&&i.nodeName=="BR"||o.isText&&/[ \t\r\n\u000c]$/.test(o.text))&&(t=t.slice(1))}t&&this.insertNode(this.parser.schema.text(t)),this.findInText(e)}else this.findInside(e)}addElement(e,t){let r=e.nodeName.toLowerCase(),o;$l.hasOwnProperty(r)&&this.parser.normalizeLists&&hm(e);let i=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(o=this.parser.matchTag(e,this,t));if(i?i.ignore:pm.hasOwnProperty(r))this.findInside(e),this.ignoreFallback(e);else if(!i||i.skip||i.closeParent){i&&i.closeParent?this.open=Math.max(0,this.open-1):i&&i.skip.nodeType&&(e=i.skip);let s,l=this.top,a=this.needsBlock;if(zl.hasOwnProperty(r))l.content.length&&l.content[0].isInline&&this.open&&(this.open--,l=this.top),s=!0,l.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e);return}i&&i.skip?this.addAll(e):this.withStyleRules(e,()=>this.addAll(e)),s&&this.sync(l),this.needsBlock=a}else this.withStyleRules(e,()=>{this.addElementByRule(e,i,i.consuming===!1?o:void 0)})}leafFallback(e){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
|
|
14
|
+
`))}ignoreFallback(e){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"))}readStyles(e){let t=Le.none,r=Le.none;for(let o=0;o<e.length;o+=2)for(let i=void 0;;){let s=this.parser.matchStyle(e[o],e[o+1],this,i);if(!s)break;if(s.ignore)return null;if(s.clearMark?this.top.pendingMarks.concat(this.top.activeMarks).forEach(l=>{s.clearMark(l)&&(r=l.addToSet(r))}):t=this.parser.schema.marks[s.mark].create(s.attrs).addToSet(t),s.consuming===!1)i=s;else break}return[t,r]}addElementByRule(e,t,r){let o,i,s;t.node?(i=this.parser.schema.nodes[t.node],i.isLeaf?this.insertNode(i.create(t.attrs))||this.leafFallback(e):o=this.enter(i,t.attrs||null,t.preserveWhitespace)):(s=this.parser.schema.marks[t.mark].create(t.attrs),this.addPendingMark(s));let l=this.top;if(i&&i.isLeaf)this.findInside(e);else if(r)this.addElement(e,r);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(a=>this.insertNode(a));else{let a=e;typeof t.contentElement=="string"?a=e.querySelector(t.contentElement):typeof t.contentElement=="function"?a=t.contentElement(e):t.contentElement&&(a=t.contentElement),this.findAround(e,a,!0),this.addAll(a)}o&&this.sync(l)&&this.open--,s&&this.removePendingMark(s,l)}addAll(e,t,r){let o=t||0;for(let i=t?e.childNodes[t]:e.firstChild,s=r==null?null:e.childNodes[r];i!=s;i=i.nextSibling,++o)this.findAtPoint(e,o),this.addDOM(i);this.findAtPoint(e,o)}findPlace(e){let t,r;for(let o=this.open;o>=0;o--){let i=this.nodes[o],s=i.findWrapping(e);if(s&&(!t||t.length>s.length)&&(t=s,r=i,!s.length)||i.solid)break}if(!t)return!1;this.sync(r);for(let o=0;o<t.length;o++)this.enterInner(t[o],null,!1);return!0}insertNode(e){if(e.isInline&&this.needsBlock&&!this.top.type){let t=this.textblockFromContext();t&&this.enterInner(t)}if(this.findPlace(e)){this.closeExtra();let t=this.top;t.applyPending(e.type),t.match&&(t.match=t.match.matchType(e.type));let r=t.activeMarks;for(let o=0;o<e.marks.length;o++)(!t.type||t.type.allowsMarkType(e.marks[o].type))&&(r=e.marks[o].addToSet(r));return t.content.push(e.mark(r)),!0}return!1}enter(e,t,r){let o=this.findPlace(e.create(t));return o&&this.enterInner(e,t,!0,r),o}enterInner(e,t=null,r=!1,o){this.closeExtra();let i=this.top;i.applyPending(e),i.match=i.match&&i.match.matchType(e);let s=Ul(e,o,i.options);i.options&Ar&&i.content.length==0&&(s|=Ar),this.nodes.push(new ko(e,t,i.activeMarks,i.pendingMarks,r,null,s)),this.open++}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));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(e){for(let t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let r=this.nodes[t].content;for(let o=r.length-1;o>=0;o--)e+=r[o].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==t&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].pos==null&&e.nodeType==1&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,r){if(e!=t&&this.find)for(let o=0;o<this.find.length;o++)this.find[o].pos==null&&e.nodeType==1&&e.contains(this.find[o].node)&&t.compareDocumentPosition(this.find[o].node)&(r?2:4)&&(this.find[o].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),r=this.options.context,o=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(o?0:1),s=(l,a)=>{for(;l>=0;l--){let c=t[l];if(c==""){if(l==t.length-1||l==0)continue;for(;a>=i;a--)if(s(l-1,a))return!0;return!1}else{let u=a>0||a==0&&o?this.nodes[a].type:r&&a>=i?r.node(a-i).type:null;if(!u||u.name!=c&&u.groups.indexOf(c)==-1)return!1;a--}}return!0};return s(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let r=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let t in this.parser.schema.nodes){let r=this.parser.schema.nodes[t];if(r.isTextblock&&r.defaultAttrs)return r}}addPendingMark(e){let t=vm(e,this.top.pendingMarks);t&&this.top.stashMarks.push(t),this.top.pendingMarks=e.addToSet(this.top.pendingMarks)}removePendingMark(e,t){for(let r=this.open;r>=0;r--){let o=this.nodes[r];if(o.pendingMarks.lastIndexOf(e)>-1)o.pendingMarks=e.removeFromSet(o.pendingMarks);else{o.activeMarks=e.removeFromSet(o.activeMarks);let s=o.popFromStashMark(e);s&&o.type&&o.type.allowsMarkType(s.type)&&(o.activeMarks=s.addToSet(o.activeMarks))}if(o==t)break}}}function hm(n){for(let e=n.firstChild,t=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&$l.hasOwnProperty(r)&&t?(t.appendChild(e),e=t):r=="li"?t=e:r&&(t=null)}}function mm(n,e){return(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,e)}function gm(n){let e=/\s*([\w-]+)\s*:\s*([^;]+)/g,t,r=[];for(;t=e.exec(n);)r.push(t[1],t[2].trim());return r}function jl(n){let e={};for(let t in n)e[t]=n[t];return e}function ym(n,e){let t=e.schema.nodes;for(let r in t){let o=t[r];if(!o.allowsMarkType(n))continue;let i=[],s=l=>{i.push(l);for(let a=0;a<l.edgeCount;a++){let{type:c,next:u}=l.edge(a);if(c==e||i.indexOf(u)<0&&s(u))return!0}};if(s(o.contentMatch))return!0}}function vm(n,e){for(let t=0;t<e.length;t++)if(n.eq(e[t]))return e[t]}class jt{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},r){r||(r=rs(t).createDocumentFragment());let o=r,i=[];return e.forEach(s=>{if(i.length||s.marks.length){let l=0,a=0;for(;l<i.length&&a<s.marks.length;){let c=s.marks[a];if(!this.marks[c.type.name]){a++;continue}if(!c.eq(i[l][0])||c.type.spec.spanning===!1)break;l++,a++}for(;l<i.length;)o=i.pop()[1];for(;a<s.marks.length;){let c=s.marks[a++],u=this.serializeMark(c,s.isInline,t);u&&(i.push([c,o]),o.appendChild(u.dom),o=u.contentDOM||u.dom)}}o.appendChild(this.serializeNodeInner(s,t))}),r}serializeNodeInner(e,t){let{dom:r,contentDOM:o}=jt.renderSpec(rs(t),this.nodes[e.type.name](e));if(o){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,o)}return r}serializeNode(e,t={}){let r=this.serializeNodeInner(e,t);for(let o=e.marks.length-1;o>=0;o--){let i=this.serializeMark(e.marks[o],e.isInline,t);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(e,t,r={}){let o=this.marks[e.type.name];return o&&jt.renderSpec(rs(r),o(e,t))}static renderSpec(e,t,r=null){if(typeof t=="string")return{dom:e.createTextNode(t)};if(t.nodeType!=null)return{dom:t};if(t.dom&&t.dom.nodeType!=null)return t;let o=t[0],i=o.indexOf(" ");i>0&&(r=o.slice(0,i),o=o.slice(i+1));let s,l=r?e.createElementNS(r,o):e.createElement(o),a=t[1],c=1;if(a&&typeof a=="object"&&a.nodeType==null&&!Array.isArray(a)){c=2;for(let u in a)if(a[u]!=null){let d=u.indexOf(" ");d>0?l.setAttributeNS(u.slice(0,d),u.slice(d+1),a[u]):l.setAttribute(u,a[u])}}for(let u=c;u<t.length;u++){let d=t[u];if(d===0){if(u<t.length-1||u>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:f,contentDOM:h}=jt.renderSpec(e,d,r);if(l.appendChild(f),h){if(s)throw new RangeError("Multiple content holes");s=h}}}return{dom:l,contentDOM:s}}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new jt(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=Wl(e.nodes);return t.text||(t.text=r=>r.text),t}static marksFromSchema(e){return Wl(e.marks)}}function Wl(n){let e={};for(let t in n){let r=n[t].spec.toDOM;r&&(e[t]=r)}return e}function rs(n){return n.document||window.document}const Kl=65535,Gl=Math.pow(2,16);function bm(n,e){return n+e*Gl}function Jl(n){return n&Kl}function xm(n){return(n-(n&Kl))/Gl}const Yl=1,Xl=2,Co=4,Zl=8;class is{constructor(e,t,r){this.pos=e,this.delInfo=t,this.recover=r}get deleted(){return(this.delInfo&Zl)>0}get deletedBefore(){return(this.delInfo&(Yl|Co))>0}get deletedAfter(){return(this.delInfo&(Xl|Co))>0}get deletedAcross(){return(this.delInfo&Co)>0}}class vt{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&vt.empty)return vt.empty}recover(e){let t=0,r=Jl(e);if(!this.inverted)for(let o=0;o<r;o++)t+=this.ranges[o*3+2]-this.ranges[o*3+1];return this.ranges[r*3]+t+xm(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,r){let o=0,i=this.inverted?2:1,s=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?o:0);if(a>e)break;let c=this.ranges[l+i],u=this.ranges[l+s],d=a+c;if(e<=d){let f=c?e==a?-1:e==d?1:t:t,h=a+o+(f<0?0:u);if(r)return h;let p=e==(t<0?a:d)?null:bm(l/3,e-a),g=e==a?Xl:e==d?Yl:Co;return(t<0?e!=a:e!=d)&&(g|=Zl),new is(h,g,p)}o+=u-c}return r?e+o:new is(e+o,0,null)}touches(e,t){let r=0,o=Jl(t),i=this.inverted?2:1,s=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>e)break;let c=this.ranges[l+i],u=a+c;if(e<=u&&l==o*3)return!0;r+=this.ranges[l+s]-c}return!1}forEach(e){let t=this.inverted?2:1,r=this.inverted?1:2;for(let o=0,i=0;o<this.ranges.length;o+=3){let s=this.ranges[o],l=s-(this.inverted?i:0),a=s+(this.inverted?0:i),c=this.ranges[o+t],u=this.ranges[o+r];e(l,l+c,a,a+u),i+=u-c}}invert(){return new vt(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?vt.empty:new vt(e<0?[0,-e,0]:[0,0,e])}}vt.empty=new vt([]);class Or{constructor(e=[],t,r=0,o=e.length){this.maps=e,this.mirror=t,this.from=r,this.to=o}slice(e=0,t=this.maps.length){return new Or(this.maps,this.mirror,e,t)}copy(){return new Or(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(e,t){this.to=this.maps.push(e),t!=null&&this.setMirror(this.maps.length-1,t)}appendMapping(e){for(let t=0,r=this.maps.length;t<e.maps.length;t++){let o=e.getMirror(t);this.appendMap(e.maps[t],o!=null&&o<t?r+o:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,r=this.maps.length+e.maps.length;t>=0;t--){let o=e.getMirror(t);this.appendMap(e.maps[t].invert(),o!=null&&o>t?r-o-1:void 0)}}invert(){let e=new Or;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let r=this.from;r<this.to;r++)e=this.maps[r].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,r){let o=0;for(let i=this.from;i<this.to;i++){let s=this.maps[i],l=s.mapResult(e,t);if(l.recover!=null){let a=this.getMirror(i);if(a!=null&&a>i&&a<this.to){i=a,e=this.maps[a].recover(l.recover);continue}}o|=l.delInfo,e=l.pos}return r?e:new is(e,o,null)}}const ss=Object.create(null);class et{getMap(){return vt.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=ss[t.stepType];if(!r)throw new RangeError(`No step type ${t.stepType} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in ss)throw new RangeError("Duplicate use of step JSON ID "+e);return ss[e]=t,t.prototype.jsonID=e,t}}class He{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new He(e,null)}static fail(e){return new He(null,e)}static fromReplace(e,t,r,o){try{return He.ok(e.replace(t,r,o))}catch(i){if(i instanceof go)return He.fail(i.message);throw i}}}function as(n,e,t){let r=[];for(let o=0;o<n.childCount;o++){let i=n.child(o);i.content.size&&(i=i.copy(as(i.content,e,i))),i.isInline&&(i=e(i,t,o)),r.push(i)}return oe.fromArray(r)}class dn extends et{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=e.resolve(this.from),o=r.node(r.sharedDepth(this.to)),i=new fe(as(t.content,(s,l)=>!s.isAtom||!l.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),o),t.openStart,t.openEnd);return He.fromReplace(e,this.from,this.to,i)}invert(){return new Wt(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new dn(t.pos,r.pos,this.mark)}merge(e){return e instanceof dn&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new dn(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new dn(t.from,t.to,e.markFromJSON(t.mark))}}et.jsonID("addMark",dn);class Wt extends et{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=new fe(as(t.content,o=>o.mark(this.mark.removeFromSet(o.marks)),e),t.openStart,t.openEnd);return He.fromReplace(e,this.from,this.to,r)}invert(){return new dn(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new Wt(t.pos,r.pos,this.mark)}merge(e){return e instanceof Wt&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Wt(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Wt(t.from,t.to,e.markFromJSON(t.mark))}}et.jsonID("removeMark",Wt);class fn extends et{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return He.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return He.fromReplace(e,this.pos,this.pos+1,new fe(oe.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let r=this.mark.addToSet(t.marks);if(r.length==t.marks.length){for(let o=0;o<t.marks.length;o++)if(!t.marks[o].isInSet(r))return new fn(this.pos,t.marks[o]);return new fn(this.pos,this.mark)}}return new Qn(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new fn(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new fn(t.pos,e.markFromJSON(t.mark))}}et.jsonID("addNodeMark",fn);class Qn extends et{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return He.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return He.fromReplace(e,this.pos,this.pos+1,new fe(oe.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new fn(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Qn(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Qn(t.pos,e.markFromJSON(t.mark))}}et.jsonID("removeNodeMark",Qn);class Qe extends et{constructor(e,t,r,o=!1){super(),this.from=e,this.to=t,this.slice=r,this.structure=o}apply(e){return this.structure&&ls(e,this.from,this.to)?He.fail("Structure replace would overwrite content"):He.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new vt([this.from,this.to-this.from,this.slice.size])}invert(e){return new Qe(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deletedAcross&&r.deletedAcross?null:new Qe(t.pos,Math.max(t.pos,r.pos),this.slice)}merge(e){if(!(e instanceof Qe)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let t=this.slice.size+e.slice.size==0?fe.empty:new fe(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new Qe(this.from,this.to+(e.to-e.from),t,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let t=this.slice.size+e.slice.size==0?fe.empty:new fe(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new Qe(e.from,this.to,t,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new Qe(t.from,t.to,fe.fromJSON(e,t.slice),!!t.structure)}}et.jsonID("replace",Qe);class Je extends et{constructor(e,t,r,o,i,s,l=!1){super(),this.from=e,this.to=t,this.gapFrom=r,this.gapTo=o,this.slice=i,this.insert=s,this.structure=l}apply(e){if(this.structure&&(ls(e,this.from,this.gapFrom)||ls(e,this.gapTo,this.to)))return He.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return He.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,t.content);return r?He.fromReplace(e,this.from,this.to,r):He.fail("Content does not fit in gap")}getMap(){return new vt([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new Je(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),o=e.map(this.gapFrom,-1),i=e.map(this.gapTo,1);return t.deletedAcross&&r.deletedAcross||o<t.pos||i>r.pos?null:new Je(t.pos,r.pos,o,i,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Je(t.from,t.to,t.gapFrom,t.gapTo,fe.fromJSON(e,t.slice),t.insert,!!t.structure)}}et.jsonID("replaceAround",Je);function ls(n,e,t){let r=n.resolve(e),o=t-e,i=r.depth;for(;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0){let s=r.node(i).maybeChild(r.indexAfter(i));for(;o>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,o--}}return!1}function Sm(n,e,t,r){let o=[],i=[],s,l;n.doc.nodesBetween(e,t,(a,c,u)=>{if(!a.isInline)return;let d=a.marks;if(!r.isInSet(d)&&u.type.allowsMarkType(r.type)){let f=Math.max(c,e),h=Math.min(c+a.nodeSize,t),p=r.addToSet(d);for(let g=0;g<d.length;g++)d[g].isInSet(p)||(s&&s.to==f&&s.mark.eq(d[g])?s.to=h:o.push(s=new Wt(f,h,d[g])));l&&l.to==f?l.to=h:i.push(l=new dn(f,h,r))}}),o.forEach(a=>n.step(a)),i.forEach(a=>n.step(a))}function Em(n,e,t,r){let o=[],i=0;n.doc.nodesBetween(e,t,(s,l)=>{if(!s.isInline)return;i++;let a=null;if(r instanceof xo){let c=s.marks,u;for(;u=r.isInSet(c);)(a||(a=[])).push(u),c=u.removeFromSet(c)}else r?r.isInSet(s.marks)&&(a=[r]):a=s.marks;if(a&&a.length){let c=Math.min(l+s.nodeSize,t);for(let u=0;u<a.length;u++){let d=a[u],f;for(let h=0;h<o.length;h++){let p=o[h];p.step==i-1&&d.eq(o[h].style)&&(f=p)}f?(f.to=c,f.step=i):o.push({style:d,from:Math.max(l,e),to:c,step:i})}}}),o.forEach(s=>n.step(new Wt(s.from,s.to,s.style)))}function km(n,e,t,r=t.contentMatch){let o=n.doc.nodeAt(e),i=[],s=e+1;for(let l=0;l<o.childCount;l++){let a=o.child(l),c=s+a.nodeSize,u=r.matchType(a.type);if(!u)i.push(new Qe(s,c,fe.empty));else{r=u;for(let d=0;d<a.marks.length;d++)t.allowsMarkType(a.marks[d].type)||n.step(new Wt(s,c,a.marks[d]));if(a.isText&&!t.spec.code){let d,f=/\r?\n|\r/g,h;for(;d=f.exec(a.text);)h||(h=new fe(oe.from(t.schema.text(" ",t.allowedMarks(a.marks))),0,0)),i.push(new Qe(s+d.index,s+d.index+d[0].length,h))}}s=c}if(!r.validEnd){let l=r.fillBefore(oe.empty,!0);n.replace(s,s,new fe(l,0,0))}for(let l=i.length-1;l>=0;l--)n.step(i[l])}function Cm(n,e,t){return(e==0||n.canReplace(e,n.childCount))&&(t==n.childCount||n.canReplace(0,t))}function _n(n){let t=n.parent.content.cutByIndex(n.startIndex,n.endIndex);for(let r=n.depth;;--r){let o=n.$from.node(r),i=n.$from.index(r),s=n.$to.indexAfter(r);if(r<n.depth&&o.canReplace(i,s,t))return r;if(r==0||o.type.spec.isolating||!Cm(o,i,s))break}return null}function wm(n,e,t){let{$from:r,$to:o,depth:i}=e,s=r.before(i+1),l=o.after(i+1),a=s,c=l,u=oe.empty,d=0;for(let p=i,g=!1;p>t;p--)g||r.index(p)>0?(g=!0,u=oe.from(r.node(p).copy(u)),d++):a--;let f=oe.empty,h=0;for(let p=i,g=!1;p>t;p--)g||o.after(p+1)<o.end(p)?(g=!0,f=oe.from(o.node(p).copy(f)),h++):c++;n.step(new Je(a,c,s,l,new fe(u.append(f),d,h),u.size-d,!0))}function cs(n,e,t=null,r=n){let o=Tm(n,e),i=o&&Am(r,e);return i?o.map(Ql).concat({type:e,attrs:t}).concat(i.map(Ql)):null}function Ql(n){return{type:n,attrs:null}}function Tm(n,e){let{parent:t,startIndex:r,endIndex:o}=n,i=t.contentMatchAt(r).findWrapping(e);if(!i)return null;let s=i.length?i[0]:e;return t.canReplaceWith(r,o,s)?i:null}function Am(n,e){let{parent:t,startIndex:r,endIndex:o}=n,i=t.child(r),s=e.contentMatch.findWrapping(i.type);if(!s)return null;let a=(s.length?s[s.length-1]:e).contentMatch;for(let c=r;a&&c<o;c++)a=a.matchType(t.child(c).type);return!a||!a.validEnd?null:s}function Om(n,e,t){let r=oe.empty;for(let s=t.length-1;s>=0;s--){if(r.size){let l=t[s].type.contentMatch.matchFragment(r);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=oe.from(t[s].type.create(t[s].attrs,r))}let o=e.start,i=e.end;n.step(new Je(o,i,o,i,new fe(r,0,0),t.length,!0))}function Mm(n,e,t,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=n.steps.length;n.doc.nodesBetween(e,t,(s,l)=>{if(s.isTextblock&&!s.hasMarkup(r,o)&&Im(n.doc,n.mapping.slice(i).map(l),r)){n.clearIncompatible(n.mapping.slice(i).map(l,1),r);let a=n.mapping.slice(i),c=a.map(l,1),u=a.map(l+s.nodeSize,1);return n.step(new Je(c,u,c+1,u-1,new fe(oe.from(r.create(o,null,s.marks)),0,0),1,!0)),!1}})}function Im(n,e,t){let r=n.resolve(e),o=r.index();return r.parent.canReplaceWith(o,o+1,t)}function Nm(n,e,t,r,o){let i=n.doc.nodeAt(e);if(!i)throw new RangeError("No node at given position");t||(t=i.type);let s=t.create(r,null,o||i.marks);if(i.isLeaf)return n.replaceWith(e,e+i.nodeSize,s);if(!t.validContent(i.content))throw new RangeError("Invalid content for node type "+t.name);n.step(new Je(e,e+i.nodeSize,e+1,e+i.nodeSize-1,new fe(oe.from(s),0,0),1,!0))}function qn(n,e,t=1,r){let o=n.resolve(e),i=o.depth-t,s=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!s.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let c=o.depth-1,u=t-2;c>i;c--,u--){let d=o.node(c),f=o.index(c);if(d.type.spec.isolating)return!1;let h=d.content.cutByIndex(f,d.childCount),p=r&&r[u+1];p&&(h=h.replaceChild(0,p.type.create(p.attrs)));let g=r&&r[u]||d;if(!d.canReplace(f+1,d.childCount)||!g.type.validContent(h))return!1}let l=o.indexAfter(i),a=r&&r[0];return o.node(i).canReplaceWith(l,l,a?a.type:o.node(i+1).type)}function Rm(n,e,t=1,r){let o=n.doc.resolve(e),i=oe.empty,s=oe.empty;for(let l=o.depth,a=o.depth-t,c=t-1;l>a;l--,c--){i=oe.from(o.node(l).copy(i));let u=r&&r[c];s=oe.from(u?u.type.create(u.attrs,s):o.node(l).copy(s))}n.step(new Qe(e,e,new fe(i.append(s),t,t),!0))}function pn(n,e){let t=n.resolve(e),r=t.index();return _l(t.nodeBefore,t.nodeAfter)&&t.parent.canReplace(r,r+1)}function _l(n,e){return!!(n&&e&&!n.isLeaf&&n.canAppend(e))}function wo(n,e,t=-1){let r=n.resolve(e);for(let o=r.depth;;o--){let i,s,l=r.index(o);if(o==r.depth?(i=r.nodeBefore,s=r.nodeAfter):t>0?(i=r.node(o+1),l++,s=r.node(o).maybeChild(l)):(i=r.node(o).maybeChild(l-1),s=r.node(o+1)),i&&!i.isTextblock&&_l(i,s)&&r.node(o).canReplace(l,l+1))return e;if(o==0)break;e=t<0?r.before(o):r.after(o)}}function Dm(n,e,t){let r=new Qe(e-t,e+t,fe.empty,!0);n.step(r)}function Lm(n,e,t){let r=n.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),t))return e;if(r.parentOffset==0)for(let o=r.depth-1;o>=0;o--){let i=r.index(o);if(r.node(o).canReplaceWith(i,i,t))return r.before(o+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(let o=r.depth-1;o>=0;o--){let i=r.indexAfter(o);if(r.node(o).canReplaceWith(i,i,t))return r.after(o+1);if(i<r.node(o).childCount)return null}return null}function Pm(n,e,t){let r=n.resolve(e);if(!t.content.size)return e;let o=t.content;for(let i=0;i<t.openStart;i++)o=o.firstChild.content;for(let i=1;i<=(t.openStart==0&&t.size?2:1);i++)for(let s=r.depth;s>=0;s--){let l=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,a=r.index(s)+(l>0?1:0),c=r.node(s),u=!1;if(i==1)u=c.canReplace(a,a,o);else{let d=c.contentMatchAt(a).findWrapping(o.firstChild.type);u=d&&c.canReplaceWith(a,a,d[0])}if(u)return l==0?r.pos:l<0?r.before(s+1):r.after(s+1)}return null}function us(n,e,t=e,r=fe.empty){if(e==t&&!r.size)return null;let o=n.resolve(e),i=n.resolve(t);return ql(o,i,r)?new Qe(e,t,r):new Bm(o,i,r).fit()}function ql(n,e,t){return!t.openStart&&!t.openEnd&&n.start()==e.start()&&n.parent.canReplace(n.index(),e.index(),t.content)}class Bm{constructor(e,t,r){this.$from=e,this.$to=t,this.unplaced=r,this.frontier=[],this.placed=oe.empty;for(let o=0;o<=e.depth;o++){let i=e.node(o);this.frontier.push({type:i.type,match:i.contentMatchAt(e.indexAfter(o))})}for(let o=e.depth;o>0;o--)this.placed=oe.from(e.node(o).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(e<0?this.$to:r.doc.resolve(e));if(!o)return null;let i=this.placed,s=r.depth,l=o.depth;for(;s&&l&&i.childCount==1;)i=i.firstChild.content,s--,l--;let a=new fe(i,s,l);return e>-1?new Je(r.pos,e,this.$to.pos,this.$to.end(),a,t):a.size||r.pos!=this.$to.pos?new Qe(r.pos,o.pos,a):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,r=0,o=this.unplaced.openEnd;r<e;r++){let i=t.firstChild;if(t.childCount>1&&(o=0),i.type.spec.isolating&&o<=r){e=r;break}t=i.content}for(let t=1;t<=2;t++)for(let r=t==1?e:this.unplaced.openStart;r>=0;r--){let o,i=null;r?(i=ds(this.unplaced.content,r-1).firstChild,o=i.content):o=this.unplaced.content;let s=o.firstChild;for(let l=this.depth;l>=0;l--){let{type:a,match:c}=this.frontier[l],u,d=null;if(t==1&&(s?c.matchType(s.type)||(d=c.fillBefore(oe.from(s),!1)):i&&a.compatibleContent(i.type)))return{sliceDepth:r,frontierDepth:l,parent:i,inject:d};if(t==2&&s&&(u=c.findWrapping(s.type)))return{sliceDepth:r,frontierDepth:l,parent:i,wrap:u};if(i&&c.matchType(i.type))break}}}openMore(){let{content:e,openStart:t,openEnd:r}=this.unplaced,o=ds(e,t);return!o.childCount||o.firstChild.isLeaf?!1:(this.unplaced=new fe(e,t+1,Math.max(r,o.size+t>=e.size-r?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:r}=this.unplaced,o=ds(e,t);if(o.childCount<=1&&t>0){let i=e.size-t<=t+o.size;this.unplaced=new fe(Mr(e,t-1,1),t-1,i?t-1:r)}else this.unplaced=new fe(Mr(e,t,1),t,r)}placeNodes({sliceDepth:e,frontierDepth:t,parent:r,inject:o,wrap:i}){for(;this.depth>t;)this.closeFrontierNode();if(i)for(let g=0;g<i.length;g++)this.openFrontierNode(i[g]);let s=this.unplaced,l=r?r.content:s.content,a=s.openStart-e,c=0,u=[],{match:d,type:f}=this.frontier[t];if(o){for(let g=0;g<o.childCount;g++)u.push(o.child(g));d=d.matchFragment(o)}let h=l.size+e-(s.content.size-s.openEnd);for(;c<l.childCount;){let g=l.child(c),y=d.matchType(g.type);if(!y)break;c++,(c>1||a==0||g.content.size)&&(d=y,u.push(ec(g.mark(f.allowedMarks(g.marks)),c==1?a:0,c==l.childCount?h:-1)))}let p=c==l.childCount;p||(h=-1),this.placed=Ir(this.placed,t,oe.from(u)),this.frontier[t].match=d,p&&h<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let g=0,y=l;g<h;g++){let S=y.lastChild;this.frontier.push({type:S.type,match:S.contentMatchAt(S.childCount)}),y=S.content}this.unplaced=p?e==0?fe.empty:new fe(Mr(s.content,e-1,1),e-1,h<0?s.openEnd:e-1):new fe(Mr(s.content,e,c),s.openStart,s.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],t;if(!e.type.isTextblock||!fs(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return-1;let{depth:r}=this.$to,o=this.$to.after(r);for(;r>1&&o==this.$to.end(--r);)++o;return o}findCloseLevel(e){e:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:r,type:o}=this.frontier[t],i=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),s=fs(e,t,o,r,i);if(s){for(let l=t-1;l>=0;l--){let{match:a,type:c}=this.frontier[l],u=fs(e,l,c,a,!0);if(!u||u.childCount)continue e}return{depth:t,fit:s,move:i?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=Ir(this.placed,t.depth,t.fit)),e=t.move;for(let r=t.depth+1;r<=e.depth;r++){let o=e.node(r),i=o.type.contentMatch.fillBefore(o.content,!0,e.index(r));this.openFrontierNode(o.type,o.attrs,i)}return e}openFrontierNode(e,t=null,r){let o=this.frontier[this.depth];o.match=o.match.matchType(e),this.placed=Ir(this.placed,this.depth,oe.from(e.create(t,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(oe.empty,!0);t.childCount&&(this.placed=Ir(this.placed,this.frontier.length,t))}}function Mr(n,e,t){return e==0?n.cutByIndex(t,n.childCount):n.replaceChild(0,n.firstChild.copy(Mr(n.firstChild.content,e-1,t)))}function Ir(n,e,t){return e==0?n.append(t):n.replaceChild(n.childCount-1,n.lastChild.copy(Ir(n.lastChild.content,e-1,t)))}function ds(n,e){for(let t=0;t<e;t++)n=n.firstChild.content;return n}function ec(n,e,t){if(e<=0)return n;let r=n.content;return e>1&&(r=r.replaceChild(0,ec(r.firstChild,e-1,r.childCount==1?t-1:0))),e>0&&(r=n.type.contentMatch.fillBefore(r).append(r),t<=0&&(r=r.append(n.type.contentMatch.matchFragment(r).fillBefore(oe.empty,!0)))),n.copy(r)}function fs(n,e,t,r,o){let i=n.node(e),s=o?n.indexAfter(e):n.index(e);if(s==i.childCount&&!t.compatibleContent(i.type))return null;let l=r.fillBefore(i.content,!0,s);return l&&!Fm(t,i.content,s)?l:null}function Fm(n,e,t){for(let r=t;r<e.childCount;r++)if(!n.allowsMarks(e.child(r).marks))return!0;return!1}function Vm(n){return n.spec.defining||n.spec.definingForContent}function zm(n,e,t,r){if(!r.size)return n.deleteRange(e,t);let o=n.doc.resolve(e),i=n.doc.resolve(t);if(ql(o,i,r))return n.step(new Qe(e,t,r));let s=nc(o,n.doc.resolve(t));s[s.length-1]==0&&s.pop();let l=-(o.depth+1);s.unshift(l);for(let f=o.depth,h=o.pos-1;f>0;f--,h--){let p=o.node(f).type.spec;if(p.defining||p.definingAsContext||p.isolating)break;s.indexOf(f)>-1?l=f:o.before(f)==h&&s.splice(1,0,-f)}let a=s.indexOf(l),c=[],u=r.openStart;for(let f=r.content,h=0;;h++){let p=f.firstChild;if(c.push(p),h==r.openStart)break;f=p.content}for(let f=u-1;f>=0;f--){let h=c[f],p=Vm(h.type);if(p&&!h.sameMarkup(o.node(Math.abs(l)-1)))u=f;else if(p||!h.type.isTextblock)break}for(let f=r.openStart;f>=0;f--){let h=(f+u+1)%(r.openStart+1),p=c[h];if(p)for(let g=0;g<s.length;g++){let y=s[(g+a)%s.length],S=!0;y<0&&(S=!1,y=-y);let k=o.node(y-1),C=o.index(y-1);if(k.canReplaceWith(C,C,p.type,p.marks))return n.replace(o.before(y),S?i.after(y):t,new fe(tc(r.content,0,r.openStart,h),h,r.openEnd))}}let d=n.steps.length;for(let f=s.length-1;f>=0&&(n.replace(e,t,r),!(n.steps.length>d));f--){let h=s[f];h<0||(e=o.before(h),t=i.after(h))}}function tc(n,e,t,r,o){if(e<t){let i=n.firstChild;n=n.replaceChild(0,i.copy(tc(i.content,e+1,t,r,i)))}if(e>r){let i=o.contentMatchAt(0),s=i.fillBefore(n).append(n);n=s.append(i.matchFragment(s).fillBefore(oe.empty,!0))}return n}function $m(n,e,t,r){if(!r.isInline&&e==t&&n.doc.resolve(e).parent.content.size){let o=Lm(n.doc,e,r.type);o!=null&&(e=t=o)}n.replaceRange(e,t,new fe(oe.from(r),0,0))}function Um(n,e,t){let r=n.doc.resolve(e),o=n.doc.resolve(t),i=nc(r,o);for(let s=0;s<i.length;s++){let l=i[s],a=s==i.length-1;if(a&&l==0||r.node(l).type.contentMatch.validEnd)return n.delete(r.start(l),o.end(l));if(l>0&&(a||r.node(l-1).canReplace(r.index(l-1),o.indexAfter(l-1))))return n.delete(r.before(l),o.after(l))}for(let s=1;s<=r.depth&&s<=o.depth;s++)if(e-r.start(s)==r.depth-s&&t>r.end(s)&&o.end(s)-t!=o.depth-s)return n.delete(r.before(s),t);n.delete(e,t)}function nc(n,e){let t=[],r=Math.min(n.depth,e.depth);for(let o=r;o>=0;o--){let i=n.start(o);if(i<n.pos-(n.depth-o)||e.end(o)>e.pos+(e.depth-o)||n.node(o).type.spec.isolating||e.node(o).type.spec.isolating)break;(i==e.start(o)||o==n.depth&&o==e.depth&&n.parent.inlineContent&&e.parent.inlineContent&&o&&e.start(o-1)==i-1)&&t.push(o)}return t}class er extends et{constructor(e,t,r){super(),this.pos=e,this.attr=t,this.value=r}apply(e){let t=e.nodeAt(this.pos);if(!t)return He.fail("No node at attribute step's position");let r=Object.create(null);for(let i in t.attrs)r[i]=t.attrs[i];r[this.attr]=this.value;let o=t.type.create(r,null,t.marks);return He.fromReplace(e,this.pos,this.pos+1,new fe(oe.from(o),0,t.isLeaf?0:1))}getMap(){return vt.empty}invert(e){return new er(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new er(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.pos!="number"||typeof t.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new er(t.pos,t.attr,t.value)}}et.jsonID("attr",er);class Nr extends et{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let o in e.attrs)t[o]=e.attrs[o];t[this.attr]=this.value;let r=e.type.create(t,e.content,e.marks);return He.ok(r)}getMap(){return vt.empty}invert(e){return new Nr(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Nr(t.attr,t.value)}}et.jsonID("docAttr",Nr);let tr=class extends Error{};tr=function n(e){let t=Error.call(this,e);return t.__proto__=n.prototype,t},tr.prototype=Object.create(Error.prototype),tr.prototype.constructor=tr,tr.prototype.name="TransformError";class rc{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Or}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new tr(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,r=fe.empty){let o=us(this.doc,e,t,r);return o&&this.step(o),this}replaceWith(e,t,r){return this.replace(e,t,new fe(oe.from(r),0,0))}delete(e,t){return this.replace(e,t,fe.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,r){return zm(this,e,t,r),this}replaceRangeWith(e,t,r){return $m(this,e,t,r),this}deleteRange(e,t){return Um(this,e,t),this}lift(e,t){return wm(this,e,t),this}join(e,t=1){return Dm(this,e,t),this}wrap(e,t){return Om(this,e,t),this}setBlockType(e,t=e,r,o=null){return Mm(this,e,t,r,o),this}setNodeMarkup(e,t,r=null,o){return Nm(this,e,t,r,o),this}setNodeAttribute(e,t,r){return this.step(new er(e,t,r)),this}setDocAttribute(e,t){return this.step(new Nr(e,t)),this}addNodeMark(e,t){return this.step(new fn(e,t)),this}removeNodeMark(e,t){if(!(t instanceof Le)){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(t=t.isInSet(r.marks),!t)return this}return this.step(new Qn(e,t)),this}split(e,t=1,r){return Rm(this,e,t,r),this}addMark(e,t,r){return Sm(this,e,t,r),this}removeMark(e,t,r){return Em(this,e,t,r),this}clearIncompatible(e,t,r){return km(this,e,t,r),this}}const ps=Object.create(null);class Re{constructor(e,t,r){this.$anchor=e,this.$head=t,this.ranges=r||[new Hm(e.min(t),e.max(t))]}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 e=this.ranges;for(let t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=fe.empty){let r=t.content.lastChild,o=null;for(let l=0;l<t.openEnd;l++)o=r,r=r.lastChild;let i=e.steps.length,s=this.ranges;for(let l=0;l<s.length;l++){let{$from:a,$to:c}=s[l],u=e.mapping.slice(i);e.replaceRange(u.map(a.pos),u.map(c.pos),l?fe.empty:t),l==0&&sc(e,i,(r?r.isInline:o&&o.isTextblock)?-1:1)}}replaceWith(e,t){let r=e.steps.length,o=this.ranges;for(let i=0;i<o.length;i++){let{$from:s,$to:l}=o[i],a=e.mapping.slice(r),c=a.map(s.pos),u=a.map(l.pos);i?e.deleteRange(c,u):(e.replaceRangeWith(c,u,t),sc(e,r,t.isInline?-1:1))}}static findFrom(e,t,r=!1){let o=e.parent.inlineContent?new De(e):nr(e.node(0),e.parent,e.pos,e.index(),t,r);if(o)return o;for(let i=e.depth-1;i>=0;i--){let s=t<0?nr(e.node(0),e.node(i),e.before(i+1),e.index(i),t,r):nr(e.node(0),e.node(i),e.after(i+1),e.index(i)+1,t,r);if(s)return s}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new Bt(e.node(0))}static atStart(e){return nr(e,e,0,0,1)||new Bt(e)}static atEnd(e){return nr(e,e,e.content.size,e.childCount,-1)||new Bt(e)}static fromJSON(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=ps[t.type];if(!r)throw new RangeError(`No selection type ${t.type} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in ps)throw new RangeError("Duplicate use of selection JSON ID "+e);return ps[e]=t,t.prototype.jsonID=e,t}getBookmark(){return De.between(this.$anchor,this.$head).getBookmark()}}Re.prototype.visible=!0;class Hm{constructor(e,t){this.$from=e,this.$to=t}}let oc=!1;function ic(n){!oc&&!n.parent.inlineContent&&(oc=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+n.parent.type.name+")"))}class De extends Re{constructor(e,t=e){ic(e),ic(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let r=e.resolve(t.map(this.head));if(!r.parent.inlineContent)return Re.near(r);let o=e.resolve(t.map(this.anchor));return new De(o.parent.inlineContent?o:r,r)}replace(e,t=fe.empty){if(super.replace(e,t),t==fe.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof De&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new To(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if(typeof t.anchor!="number"||typeof t.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new De(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,r=t){let o=e.resolve(t);return new this(o,r==t?o:e.resolve(r))}static between(e,t,r){let o=e.pos-t.pos;if((!r||o)&&(r=o>=0?1:-1),!t.parent.inlineContent){let i=Re.findFrom(t,r,!0)||Re.findFrom(t,-r,!0);if(i)t=i.$head;else return Re.near(t,r)}return e.parent.inlineContent||(o==0?e=t:(e=(Re.findFrom(e,-r,!0)||Re.findFrom(e,r,!0)).$anchor,e.pos<t.pos!=o<0&&(e=t))),new De(e,t)}}Re.jsonID("text",De);class To{constructor(e,t){this.anchor=e,this.head=t}map(e){return new To(e.map(this.anchor),e.map(this.head))}resolve(e){return De.between(e.resolve(this.anchor),e.resolve(this.head))}}class Se extends Re{constructor(e){let t=e.nodeAfter,r=e.node(0).resolve(e.pos+t.nodeSize);super(e,r),this.node=t}map(e,t){let{deleted:r,pos:o}=t.mapResult(this.anchor),i=e.resolve(o);return r?Re.near(i):new Se(i)}content(){return new fe(oe.from(this.node),0,0)}eq(e){return e instanceof Se&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new hs(this.anchor)}static fromJSON(e,t){if(typeof t.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new Se(e.resolve(t.anchor))}static create(e,t){return new Se(e.resolve(t))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}Se.prototype.visible=!1,Re.jsonID("node",Se);class hs{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:r}=e.mapResult(this.anchor);return t?new To(r,r):new hs(r)}resolve(e){let t=e.resolve(this.anchor),r=t.nodeAfter;return r&&Se.isSelectable(r)?new Se(t):Re.near(t)}}class Bt extends Re{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=fe.empty){if(t==fe.empty){e.delete(0,e.doc.content.size);let r=Re.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new Bt(e)}map(e){return new Bt(e)}eq(e){return e instanceof Bt}getBookmark(){return jm}}Re.jsonID("all",Bt);const jm={map(){return this},resolve(n){return new Bt(n)}};function nr(n,e,t,r,o,i=!1){if(e.inlineContent)return De.create(n,t);for(let s=r-(o>0?0:1);o>0?s<e.childCount:s>=0;s+=o){let l=e.child(s);if(l.isAtom){if(!i&&Se.isSelectable(l))return Se.create(n,t-(o<0?l.nodeSize:0))}else{let a=nr(n,l,t+o,o<0?l.childCount:0,o,i);if(a)return a}t+=l.nodeSize*o}return null}function sc(n,e,t){let r=n.steps.length-1;if(r<e)return;let o=n.steps[r];if(!(o instanceof Qe||o instanceof Je))return;let i=n.mapping.maps[r],s;i.forEach((l,a,c,u)=>{s==null&&(s=u)}),n.setSelection(Re.near(n.doc.resolve(s),t))}const ac=1,Ao=2,lc=4;class Wm extends rc{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.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(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|ac)&~Ao,this.storedMarks=null,this}get selectionSet(){return(this.updated&ac)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=Ao,this}ensureMarks(e){return Le.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&Ao)>0}addStep(e,t){super.addStep(e,t),this.updated=this.updated&~Ao,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let r=this.selection;return t&&(e=e.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||Le.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,r){let o=this.doc.type.schema;if(t==null)return e?this.replaceSelectionWith(o.text(e),!0):this.deleteSelection();{if(r==null&&(r=t),r=r??t,!e)return this.deleteRange(t,r);let i=this.storedMarks;if(!i){let s=this.doc.resolve(t);i=r==t?s.marks():s.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(t,r,o.text(e,i)),this.selection.empty||this.setSelection(Re.near(this.selection.$to)),this}}setMeta(e,t){return this.meta[typeof e=="string"?e:e.key]=t,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=lc,this}get scrolledIntoView(){return(this.updated&lc)>0}}function cc(n,e){return!e||!n?n:n.bind(e)}class Rr{constructor(e,t,r){this.name=e,this.init=cc(t.init,r),this.apply=cc(t.apply,r)}}const Km=[new Rr("doc",{init(n){return n.doc||n.schema.topNodeType.createAndFill()},apply(n){return n.doc}}),new Rr("selection",{init(n,e){return n.selection||Re.atStart(e.doc)},apply(n){return n.selection}}),new Rr("storedMarks",{init(n){return n.storedMarks||null},apply(n,e,t,r){return r.selection.$cursor?n.storedMarks:null}}),new Rr("scrollToSelection",{init(){return 0},apply(n,e){return n.scrolledIntoView?e+1:e}})];class ms{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=Km.slice(),t&&t.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new Rr(r.key,r.spec.state,r))})}}class rr{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=t){let o=this.config.plugins[r];if(o.spec.filterTransaction&&!o.spec.filterTransaction.call(o,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let t=[e],r=this.applyInner(e),o=null;for(;;){let i=!1;for(let s=0;s<this.config.plugins.length;s++){let l=this.config.plugins[s];if(l.spec.appendTransaction){let a=o?o[s].n:0,c=o?o[s].state:this,u=a<t.length&&l.spec.appendTransaction.call(l,a?t.slice(a):t,c,r);if(u&&r.filterTransaction(u,s)){if(u.setMeta("appendedTransaction",e),!o){o=[];for(let d=0;d<this.config.plugins.length;d++)o.push(d<s?{state:r,n:t.length}:{state:this,n:0})}t.push(u),r=r.applyInner(u),i=!0}o&&(o[s]={state:r,n:t.length})}}if(!i)return{state:r,transactions:t}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let t=new rr(this.config),r=this.config.fields;for(let o=0;o<r.length;o++){let i=r[o];t[i.name]=i.apply(e,this[i.name],this,t)}return t}get tr(){return new Wm(this)}static create(e){let t=new ms(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new rr(t);for(let o=0;o<t.fields.length;o++)r[t.fields[o].name]=t.fields[o].init(e,r);return r}reconfigure(e){let t=new ms(this.schema,e.plugins),r=t.fields,o=new rr(t);for(let i=0;i<r.length;i++){let s=r[i].name;o[s]=this.hasOwnProperty(s)?this[s]:r[i].init(e,o)}return o}toJSON(e){let t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map(r=>r.toJSON())),e&&typeof e=="object")for(let r in e){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let o=e[r],i=o.spec.state;i&&i.toJSON&&(t[r]=i.toJSON.call(o,this[o.key]))}return t}static fromJSON(e,t,r){if(!t)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let o=new ms(e.schema,e.plugins),i=new rr(o);return o.fields.forEach(s=>{if(s.name=="doc")i.doc=Pn.fromJSON(e.schema,t.doc);else if(s.name=="selection")i.selection=Re.fromJSON(i.doc,t.selection);else if(s.name=="storedMarks")t.storedMarks&&(i.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let l in r){let a=r[l],c=a.spec.state;if(a.key==s.name&&c&&c.fromJSON&&Object.prototype.hasOwnProperty.call(t,l)){i[s.name]=c.fromJSON.call(a,e,t[l],i);return}}i[s.name]=s.init(e,i)}}),i}}function uc(n,e,t){for(let r in n){let o=n[r];o instanceof Function?o=o.bind(e):r=="handleDOMEvents"&&(o=uc(o,e,{})),t[r]=o}return t}class ft{constructor(e){this.spec=e,this.props={},e.props&&uc(e.props,this,this.props),this.key=e.key?e.key.key:dc("plugin")}getState(e){return e[this.key]}}const gs=Object.create(null);function dc(n){return n in gs?n+"$"+ ++gs[n]:(gs[n]=0,n+"$")}class Ft{constructor(e="key"){this.key=dc(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const it=function(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e},Dr=function(n){let e=n.assignedSlot||n.parentNode;return e&&e.nodeType==11?e.host:e};let fc=null;const nn=function(n,e,t){let r=fc||(fc=document.createRange());return r.setEnd(n,t??n.nodeValue.length),r.setStart(n,e||0),r},Fn=function(n,e,t,r){return t&&(pc(n,e,t,r,-1)||pc(n,e,t,r,1))},Gm=/^(img|br|input|textarea|hr)$/i;function pc(n,e,t,r,o){for(;;){if(n==t&&e==r)return!0;if(e==(o<0?0:Kt(n))){let i=n.parentNode;if(!i||i.nodeType!=1||ys(n)||Gm.test(n.nodeName)||n.contentEditable=="false")return!1;e=it(n)+(o<0?0:1),n=i}else if(n.nodeType==1){if(n=n.childNodes[e+(o<0?-1:0)],n.contentEditable=="false")return!1;e=o<0?Kt(n):0}else return!1}}function Kt(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function Jm(n,e,t){for(let r=e==0,o=e==Kt(n);r||o;){if(n==t)return!0;let i=it(n);if(n=n.parentNode,!n)return!1;r=r&&i==0,o=o&&i==Kt(n)}}function ys(n){let e;for(let t=n;t&&!(e=t.pmViewDesc);t=t.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==n||e.contentDOM==n)}const Oo=function(n){return n.focusNode&&Fn(n.focusNode,n.focusOffset,n.anchorNode,n.anchorOffset)};function Vn(n,e){let t=document.createEvent("Event");return t.initEvent("keydown",!0,!0),t.keyCode=n,t.key=t.code=e,t}function Ym(n){let e=n.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function Xm(n,e,t){if(n.caretPositionFromPoint)try{let r=n.caretPositionFromPoint(e,t);if(r)return{node:r.offsetNode,offset:r.offset}}catch{}if(n.caretRangeFromPoint){let r=n.caretRangeFromPoint(e,t);if(r)return{node:r.startContainer,offset:r.startOffset}}}const Gt=typeof navigator<"u"?navigator:null,hc=typeof document<"u"?document:null,hn=Gt&&Gt.userAgent||"",vs=/Edge\/(\d+)/.exec(hn),mc=/MSIE \d/.exec(hn),bs=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(hn),pt=!!(mc||bs||vs),mn=mc?document.documentMode:bs?+bs[1]:vs?+vs[1]:0,Vt=!pt&&/gecko\/(\d+)/i.test(hn);Vt&&+(/Firefox\/(\d+)/.exec(hn)||[0,0])[1];const xs=!pt&&/Chrome\/(\d+)/.exec(hn),tt=!!xs,Zm=xs?+xs[1]:0,st=!pt&&!!Gt&&/Apple Computer/.test(Gt.vendor),or=st&&(/Mobile\/\w+/.test(hn)||!!Gt&&Gt.maxTouchPoints>2),kt=or||(Gt?/Mac/.test(Gt.platform):!1),Qm=Gt?/Win/.test(Gt.platform):!1,zt=/Android \d/.test(hn),Lr=!!hc&&"webkitFontSmoothing"in hc.documentElement.style,_m=Lr?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function qm(n){return{left:0,right:n.documentElement.clientWidth,top:0,bottom:n.documentElement.clientHeight}}function rn(n,e){return typeof n=="number"?n:n[e]}function eg(n){let e=n.getBoundingClientRect(),t=e.width/n.offsetWidth||1,r=e.height/n.offsetHeight||1;return{left:e.left,right:e.left+n.clientWidth*t,top:e.top,bottom:e.top+n.clientHeight*r}}function gc(n,e,t){let r=n.someProp("scrollThreshold")||0,o=n.someProp("scrollMargin")||5,i=n.dom.ownerDocument;for(let s=t||n.dom;s;s=Dr(s)){if(s.nodeType!=1)continue;let l=s,a=l==i.body,c=a?qm(i):eg(l),u=0,d=0;if(e.top<c.top+rn(r,"top")?d=-(c.top-e.top+rn(o,"top")):e.bottom>c.bottom-rn(r,"bottom")&&(d=e.bottom-e.top>c.bottom-c.top?e.top+rn(o,"top")-c.top:e.bottom-c.bottom+rn(o,"bottom")),e.left<c.left+rn(r,"left")?u=-(c.left-e.left+rn(o,"left")):e.right>c.right-rn(r,"right")&&(u=e.right-c.right+rn(o,"right")),u||d)if(a)i.defaultView.scrollBy(u,d);else{let f=l.scrollLeft,h=l.scrollTop;d&&(l.scrollTop+=d),u&&(l.scrollLeft+=u);let p=l.scrollLeft-f,g=l.scrollTop-h;e={left:e.left-p,top:e.top-g,right:e.right-p,bottom:e.bottom-g}}if(a||/^(fixed|sticky)$/.test(getComputedStyle(s).position))break}}function tg(n){let e=n.dom.getBoundingClientRect(),t=Math.max(0,e.top),r,o;for(let i=(e.left+e.right)/2,s=t+1;s<Math.min(innerHeight,e.bottom);s+=5){let l=n.root.elementFromPoint(i,s);if(!l||l==n.dom||!n.dom.contains(l))continue;let a=l.getBoundingClientRect();if(a.top>=t-20){r=l,o=a.top;break}}return{refDOM:r,refTop:o,stack:yc(n.dom)}}function yc(n){let e=[],t=n.ownerDocument;for(let r=n;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),n!=t);r=Dr(r));return e}function ng({refDOM:n,refTop:e,stack:t}){let r=n?n.getBoundingClientRect().top:0;vc(t,r==0?0:r-e)}function vc(n,e){for(let t=0;t<n.length;t++){let{dom:r,top:o,left:i}=n[t];r.scrollTop!=o+e&&(r.scrollTop=o+e),r.scrollLeft!=i&&(r.scrollLeft=i)}}let ir=null;function rg(n){if(n.setActive)return n.setActive();if(ir)return n.focus(ir);let e=yc(n);n.focus(ir==null?{get preventScroll(){return ir={preventScroll:!0},!0}}:void 0),ir||(ir=!1,vc(e,0))}function bc(n,e){let t,r=2e8,o,i=0,s=e.top,l=e.top,a,c;for(let u=n.firstChild,d=0;u;u=u.nextSibling,d++){let f;if(u.nodeType==1)f=u.getClientRects();else if(u.nodeType==3)f=nn(u).getClientRects();else continue;for(let h=0;h<f.length;h++){let p=f[h];if(p.top<=s&&p.bottom>=l){s=Math.max(p.bottom,s),l=Math.min(p.top,l);let g=p.left>e.left?p.left-e.left:p.right<e.left?e.left-p.right:0;if(g<r){t=u,r=g,o=g&&t.nodeType==3?{left:p.right<e.left?p.right:p.left,top:e.top}:e,u.nodeType==1&&g&&(i=d+(e.left>=(p.left+p.right)/2?1:0));continue}}else p.top>e.top&&!a&&p.left<=e.left&&p.right>=e.left&&(a=u,c={left:Math.max(p.left,Math.min(p.right,e.left)),top:p.top});!t&&(e.left>=p.right&&e.top>=p.top||e.left>=p.left&&e.top>=p.bottom)&&(i=d+1)}}return!t&&a&&(t=a,o=c,r=0),t&&t.nodeType==3?og(t,o):!t||r&&t.nodeType==1?{node:n,offset:i}:bc(t,o)}function og(n,e){let t=n.nodeValue.length,r=document.createRange();for(let o=0;o<t;o++){r.setEnd(n,o+1),r.setStart(n,o);let i=gn(r,1);if(i.top!=i.bottom&&Ss(e,i))return{node:n,offset:o+(e.left>=(i.left+i.right)/2?1:0)}}return{node:n,offset:0}}function Ss(n,e){return n.left>=e.left-1&&n.left<=e.right+1&&n.top>=e.top-1&&n.top<=e.bottom+1}function ig(n,e){let t=n.parentNode;return t&&/^li$/i.test(t.nodeName)&&e.left<n.getBoundingClientRect().left?t:n}function sg(n,e,t){let{node:r,offset:o}=bc(e,t),i=-1;if(r.nodeType==1&&!r.firstChild){let s=r.getBoundingClientRect();i=s.left!=s.right&&t.left>(s.left+s.right)/2?1:-1}return n.docView.posFromDOM(r,o,i)}function ag(n,e,t,r){let o=-1;for(let i=e,s=!1;i!=n.dom;){let l=n.docView.nearestDesc(i,!0);if(!l)return null;if(l.dom.nodeType==1&&(l.node.isBlock&&l.parent&&!s||!l.contentDOM)){let a=l.dom.getBoundingClientRect();if(l.node.isBlock&&l.parent&&!s&&(s=!0,a.left>r.left||a.top>r.top?o=l.posBefore:(a.right<r.left||a.bottom<r.top)&&(o=l.posAfter)),!l.contentDOM&&o<0&&!l.node.isText)return(l.node.isBlock?r.top<(a.top+a.bottom)/2:r.left<(a.left+a.right)/2)?l.posBefore:l.posAfter}i=l.dom.parentNode}return o>-1?o:n.docView.posFromDOM(e,t,-1)}function xc(n,e,t){let r=n.childNodes.length;if(r&&t.top<t.bottom)for(let o=Math.max(0,Math.min(r-1,Math.floor(r*(e.top-t.top)/(t.bottom-t.top))-2)),i=o;;){let s=n.childNodes[i];if(s.nodeType==1){let l=s.getClientRects();for(let a=0;a<l.length;a++){let c=l[a];if(Ss(e,c))return xc(s,e,c)}}if((i=(i+1)%r)==o)break}return n}function lg(n,e){let t=n.dom.ownerDocument,r,o=0,i=Xm(t,e.left,e.top);i&&({node:r,offset:o}=i);let s=(n.root.elementFromPoint?n.root:t).elementFromPoint(e.left,e.top),l;if(!s||!n.dom.contains(s.nodeType!=1?s.parentNode:s)){let c=n.dom.getBoundingClientRect();if(!Ss(e,c)||(s=xc(n.dom,e,c),!s))return null}if(st)for(let c=s;r&&c;c=Dr(c))c.draggable&&(r=void 0);if(s=ig(s,e),r){if(Vt&&r.nodeType==1&&(o=Math.min(o,r.childNodes.length),o<r.childNodes.length)){let u=r.childNodes[o],d;u.nodeName=="IMG"&&(d=u.getBoundingClientRect()).right<=e.left&&d.bottom>e.top&&o++}let c;Lr&&o&&r.nodeType==1&&(c=r.childNodes[o-1]).nodeType==1&&c.contentEditable=="false"&&c.getBoundingClientRect().top>=e.top&&o--,r==n.dom&&o==r.childNodes.length-1&&r.lastChild.nodeType==1&&e.top>r.lastChild.getBoundingClientRect().bottom?l=n.state.doc.content.size:(o==0||r.nodeType!=1||r.childNodes[o-1].nodeName!="BR")&&(l=ag(n,r,o,e))}l==null&&(l=sg(n,s,e));let a=n.docView.nearestDesc(s,!0);return{pos:l,inside:a?a.posAtStart-a.border:-1}}function Sc(n){return n.top<n.bottom||n.left<n.right}function gn(n,e){let t=n.getClientRects();if(t.length){let r=t[e<0?0:t.length-1];if(Sc(r))return r}return Array.prototype.find.call(t,Sc)||n.getBoundingClientRect()}const cg=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Ec(n,e,t){let{node:r,offset:o,atom:i}=n.docView.domFromPos(e,t<0?-1:1),s=Lr||Vt;if(r.nodeType==3)if(s&&(cg.test(r.nodeValue)||(t<0?!o:o==r.nodeValue.length))){let a=gn(nn(r,o,o),t);if(Vt&&o&&/\s/.test(r.nodeValue[o-1])&&o<r.nodeValue.length){let c=gn(nn(r,o-1,o-1),-1);if(c.top==a.top){let u=gn(nn(r,o,o+1),-1);if(u.top!=a.top)return Pr(u,u.left<c.left)}}return a}else{let a=o,c=o,u=t<0?1:-1;return t<0&&!o?(c++,u=-1):t>=0&&o==r.nodeValue.length?(a--,u=1):t<0?a--:c++,Pr(gn(nn(r,a,c),u),u<0)}if(!n.state.doc.resolve(e-(i||0)).parent.inlineContent){if(i==null&&o&&(t<0||o==Kt(r))){let a=r.childNodes[o-1];if(a.nodeType==1)return Es(a.getBoundingClientRect(),!1)}if(i==null&&o<Kt(r)){let a=r.childNodes[o];if(a.nodeType==1)return Es(a.getBoundingClientRect(),!0)}return Es(r.getBoundingClientRect(),t>=0)}if(i==null&&o&&(t<0||o==Kt(r))){let a=r.childNodes[o-1],c=a.nodeType==3?nn(a,Kt(a)-(s?0:1)):a.nodeType==1&&(a.nodeName!="BR"||!a.nextSibling)?a:null;if(c)return Pr(gn(c,1),!1)}if(i==null&&o<Kt(r)){let a=r.childNodes[o];for(;a.pmViewDesc&&a.pmViewDesc.ignoreForCoords;)a=a.nextSibling;let c=a?a.nodeType==3?nn(a,0,s?0:1):a.nodeType==1?a:null:null;if(c)return Pr(gn(c,-1),!0)}return Pr(gn(r.nodeType==3?nn(r):r,-t),t>=0)}function Pr(n,e){if(n.width==0)return n;let t=e?n.left:n.right;return{top:n.top,bottom:n.bottom,left:t,right:t}}function Es(n,e){if(n.height==0)return n;let t=e?n.top:n.bottom;return{top:t,bottom:t,left:n.left,right:n.right}}function kc(n,e,t){let r=n.state,o=n.root.activeElement;r!=e&&n.updateState(e),o!=n.dom&&n.focus();try{return t()}finally{r!=e&&n.updateState(r),o!=n.dom&&o&&o.focus()}}function ug(n,e,t){let r=e.selection,o=t=="up"?r.$from:r.$to;return kc(n,e,()=>{let{node:i}=n.docView.domFromPos(o.pos,t=="up"?-1:1);for(;;){let l=n.docView.nearestDesc(i,!0);if(!l)break;if(l.node.isBlock){i=l.contentDOM||l.dom;break}i=l.dom.parentNode}let s=Ec(n,o.pos,1);for(let l=i.firstChild;l;l=l.nextSibling){let a;if(l.nodeType==1)a=l.getClientRects();else if(l.nodeType==3)a=nn(l,0,l.nodeValue.length).getClientRects();else continue;for(let c=0;c<a.length;c++){let u=a[c];if(u.bottom>u.top+1&&(t=="up"?s.top-u.top>(u.bottom-s.top)*2:u.bottom-s.bottom>(s.bottom-u.top)*2))return!1}}return!0})}const dg=/[\u0590-\u08ac]/;function fg(n,e,t){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let o=r.parentOffset,i=!o,s=o==r.parent.content.size,l=n.domSelection();return!dg.test(r.parent.textContent)||!l.modify?t=="left"||t=="backward"?i:s:kc(n,e,()=>{let{focusNode:a,focusOffset:c,anchorNode:u,anchorOffset:d}=n.domSelectionRange(),f=l.caretBidiLevel;l.modify("move",t,"character");let h=r.depth?n.docView.domAfterPos(r.before()):n.dom,{focusNode:p,focusOffset:g}=n.domSelectionRange(),y=p&&!h.contains(p.nodeType==1?p:p.parentNode)||a==p&&c==g;try{l.collapse(u,d),a&&(a!=u||c!=d)&&l.extend&&l.extend(a,c)}catch{}return f!=null&&(l.caretBidiLevel=f),y})}let Cc=null,wc=null,Tc=!1;function pg(n,e,t){return Cc==e&&wc==t?Tc:(Cc=e,wc=t,Tc=t=="up"||t=="down"?ug(n,e,t):fg(n,e,t))}const Ct=0,Ac=1,zn=2,Jt=3;class Br{constructor(e,t,r,o){this.parent=e,this.children=t,this.dom=r,this.contentDOM=o,this.dirty=Ct,r.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,r){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;t<this.children.length;t++)e+=this.children[t].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let t=0,r=this.posAtStart;;t++){let o=this.children[t];if(o==e)return r;r+=o.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,t,r){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(r<0){let i,s;if(e==this.contentDOM)i=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.previousSibling}for(;i&&!((s=i.pmViewDesc)&&s.parent==this);)i=i.previousSibling;return i?this.posBeforeChild(s)+s.size:this.posAtStart}else{let i,s;if(e==this.contentDOM)i=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.nextSibling}for(;i&&!((s=i.pmViewDesc)&&s.parent==this);)i=i.nextSibling;return i?this.posBeforeChild(s):this.posAtEnd}let o;if(e==this.dom&&this.contentDOM)o=t>it(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))o=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(t==0)for(let i=e;;i=i.parentNode){if(i==this.dom){o=!1;break}if(i.previousSibling)break}if(o==null&&t==e.childNodes.length)for(let i=e;;i=i.parentNode){if(i==this.dom){o=!0;break}if(i.nextSibling)break}}return o??r>0?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let r=!0,o=e;o;o=o.parentNode){let i=this.getDesc(o),s;if(i&&(!t||i.node))if(r&&(s=i.nodeDOM)&&!(s.nodeType==1?s.contains(e.nodeType==1?e:e.parentNode):s==e))r=!1;else return i}}getDesc(e){let t=e.pmViewDesc;for(let r=t;r;r=r.parent)if(r==this)return t}posFromDOM(e,t,r){for(let o=e;o;o=o.parentNode){let i=this.getDesc(o);if(i)return i.localPosFromDOM(e,t,r)}return-1}descAt(e){for(let t=0,r=0;t<this.children.length;t++){let o=this.children[t],i=r+o.size;if(r==e&&i!=r){for(;!o.border&&o.children.length;)o=o.children[0];return o}if(e<i)return o.descAt(e-r-o.border);r=i}}domFromPos(e,t){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let r=0,o=0;for(let i=0;r<this.children.length;r++){let s=this.children[r],l=i+s.size;if(l>e||s instanceof Ic){o=e-i;break}i=l}if(o)return this.children[r].domFromPos(o-this.children[r].border,t);for(let i;r&&!(i=this.children[r-1]).size&&i instanceof Oc&&i.side>=0;r--);if(t<=0){let i,s=!0;for(;i=r?this.children[r-1]:null,!(!i||i.dom.parentNode==this.contentDOM);r--,s=!1);return i&&t&&s&&!i.border&&!i.domAtom?i.domFromPos(i.size,t):{node:this.contentDOM,offset:i?it(i.dom)+1:0}}else{let i,s=!0;for(;i=r<this.children.length?this.children[r]:null,!(!i||i.dom.parentNode==this.contentDOM);r++,s=!1);return i&&s&&!i.border&&!i.domAtom?i.domFromPos(0,t):{node:this.contentDOM,offset:i?it(i.dom):this.contentDOM.childNodes.length}}}parseRange(e,t,r=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let o=-1,i=-1;for(let s=r,l=0;;l++){let a=this.children[l],c=s+a.size;if(o==-1&&e<=c){let u=s+a.border;if(e>=u&&t<=c-a.border&&a.node&&a.contentDOM&&this.contentDOM.contains(a.contentDOM))return a.parseRange(e,t,u);e=s;for(let d=l;d>0;d--){let f=this.children[d-1];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(1)){o=it(f.dom)+1;break}e-=f.size}o==-1&&(o=0)}if(o>-1&&(c>t||l==this.children.length-1)){t=c;for(let u=l+1;u<this.children.length;u++){let d=this.children[u];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(-1)){i=it(d.dom);break}t+=d.size}i==-1&&(i=this.contentDOM.childNodes.length);break}s=c}return{node:this.contentDOM,from:e,to:t,fromOffset:o,toOffset:i}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let t=this.children[e<0?0:this.children.length-1];return t.size==0||t.emptyChildAt(e)}domAfterPos(e){let{node:t,offset:r}=this.domFromPos(e,0);if(t.nodeType!=1||r==t.childNodes.length)throw new RangeError("No node after pos "+e);return t.childNodes[r]}setSelection(e,t,r,o=!1){let i=Math.min(e,t),s=Math.max(e,t);for(let f=0,h=0;f<this.children.length;f++){let p=this.children[f],g=h+p.size;if(i>h&&s<g)return p.setSelection(e-h-p.border,t-h-p.border,r,o);h=g}let l=this.domFromPos(e,e?-1:1),a=t==e?l:this.domFromPos(t,t?-1:1),c=r.getSelection(),u=!1;if((Vt||st)&&e==t){let{node:f,offset:h}=l;if(f.nodeType==3){if(u=!!(h&&f.nodeValue[h-1]==`
|
|
15
|
+
`),u&&h==f.nodeValue.length)for(let p=f,g;p;p=p.parentNode){if(g=p.nextSibling){g.nodeName=="BR"&&(l=a={node:g.parentNode,offset:it(g)+1});break}let y=p.pmViewDesc;if(y&&y.node&&y.node.isBlock)break}}else{let p=f.childNodes[h-1];u=p&&(p.nodeName=="BR"||p.contentEditable=="false")}}if(Vt&&c.focusNode&&c.focusNode!=a.node&&c.focusNode.nodeType==1){let f=c.focusNode.childNodes[c.focusOffset];f&&f.contentEditable=="false"&&(o=!0)}if(!(o||u&&st)&&Fn(l.node,l.offset,c.anchorNode,c.anchorOffset)&&Fn(a.node,a.offset,c.focusNode,c.focusOffset))return;let d=!1;if((c.extend||e==t)&&!u){c.collapse(l.node,l.offset);try{e!=t&&c.extend(a.node,a.offset),d=!0}catch{}}if(!d){if(e>t){let h=l;l=a,a=h}let f=document.createRange();f.setEnd(a.node,a.offset),f.setStart(l.node,l.offset),c.removeAllRanges(),c.addRange(f)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let r=0,o=0;o<this.children.length;o++){let i=this.children[o],s=r+i.size;if(r==s?e<=s&&t>=r:e<s&&t>r){let l=r+i.border,a=s-i.border;if(e>=l&&t<=a){this.dirty=e==r||t==s?zn:Ac,e==l&&t==a&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=Jt:i.markDirty(e-l,t-l);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?zn:Jt}r=s}this.dirty=zn}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let r=e==1?zn:Ac;t.dirty<r&&(t.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}}class Oc extends Br{constructor(e,t,r,o){let i,s=t.type.toDOM;if(typeof s=="function"&&(s=s(r,()=>{if(!i)return o;if(i.parent)return i.parent.posBeforeChild(i)})),!t.type.spec.raw){if(s.nodeType!=1){let l=document.createElement("span");l.appendChild(s),s=l}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(e,[],s,null),this.widget=t,this.widget=t,i=this}matchesWidget(e){return this.dirty==Ct&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return t?t(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class hg extends Br{constructor(e,t,r,o){super(e,[],t,null),this.textDOM=r,this.text=o}get size(){return this.text.length}localPosFromDOM(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class $n extends Br{constructor(e,t,r,o){super(e,[],r,o),this.mark=t}static create(e,t,r,o){let i=o.nodeViews[t.type.name],s=i&&i(t,o,r);return(!s||!s.dom)&&(s=jt.renderSpec(document,t.type.spec.toDOM(t,r))),new $n(e,t,s.dom,s.contentDOM||s.dom)}parseRule(){return this.dirty&Jt||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=Jt&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),this.dirty!=Ct){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=Ct}}slice(e,t,r){let o=$n.create(this.parent,this.mark,!0,r),i=this.children,s=this.size;t<s&&(i=ws(i,t,s,r)),e>0&&(i=ws(i,0,e,r));for(let l=0;l<i.length;l++)i[l].parent=o;return o.children=i,o}}class yn extends Br{constructor(e,t,r,o,i,s,l,a,c){super(e,[],i,s),this.node=t,this.outerDeco=r,this.innerDeco=o,this.nodeDOM=l}static create(e,t,r,o,i,s){let l=i.nodeViews[t.type.name],a,c=l&&l(t,i,()=>{if(!a)return s;if(a.parent)return a.parent.posBeforeChild(a)},r,o),u=c&&c.dom,d=c&&c.contentDOM;if(t.isText){if(!u)u=document.createTextNode(t.text);else if(u.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else u||({dom:u,contentDOM:d}=jt.renderSpec(document,t.type.spec.toDOM(t)));!d&&!t.isText&&u.nodeName!="BR"&&(u.hasAttribute("contenteditable")||(u.contentEditable="false"),t.type.spec.draggable&&(u.draggable=!0));let f=u;return u=Dc(u,r,t),c?a=new mg(e,t,r,o,u,d||null,f,c,i,s+1):t.isText?new Mo(e,t,r,o,u,f,i):new yn(e,t,r,o,u,d||null,f,i,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let t=this.children.length-1;t>=0;t--){let r=this.children[t];if(this.dom.contains(r.dom.parentNode)){e.contentElement=r.dom.parentNode;break}}e.contentElement||(e.getContent=()=>oe.empty)}return e}matchesNode(e,t,r){return this.dirty==Ct&&e.eq(this.node)&&Cs(t,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,t){let r=this.node.inlineContent,o=t,i=e.composing?this.localCompositionInfo(e,t):null,s=i&&i.pos>-1?i:null,l=i&&i.pos<0,a=new yg(this,s&&s.node,e);xg(this.node,this.innerDeco,(c,u,d)=>{c.spec.marks?a.syncToMarks(c.spec.marks,r,e):c.type.side>=0&&!d&&a.syncToMarks(u==this.node.childCount?Le.none:this.node.child(u).marks,r,e),a.placeWidget(c,e,o)},(c,u,d,f)=>{a.syncToMarks(c.marks,r,e);let h;a.findNodeMatch(c,u,d,f)||l&&e.state.selection.from>o&&e.state.selection.to<o+c.nodeSize&&(h=a.findIndexWithChild(i.node))>-1&&a.updateNodeAt(c,u,d,h,e)||a.updateNextNode(c,u,d,e,f,o)||a.addNode(c,u,d,e,o),o+=c.nodeSize}),a.syncToMarks([],r,e),this.node.isTextblock&&a.addTextblockHacks(),a.destroyRest(),(a.changed||this.dirty==zn)&&(s&&this.protectLocalComposition(e,s),Nc(this.contentDOM,this.children,e),or&&Sg(this.dom))}localCompositionInfo(e,t){let{from:r,to:o}=e.state.selection;if(!(e.state.selection instanceof De)||r<t||o>t+this.node.content.size)return null;let i=e.domSelectionRange(),s=Eg(i.focusNode,i.focusOffset);if(!s||!this.dom.contains(s.parentNode))return null;if(this.node.inlineContent){let l=s.nodeValue,a=kg(this.node.content,l,r-t,o-t);return a<0?null:{node:s,pos:a,text:l}}else return{node:s,pos:-1,text:""}}protectLocalComposition(e,{node:t,pos:r,text:o}){if(this.getDesc(t))return;let i=t;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let s=new hg(this,i,t,o);e.input.compositionNodes.push(s),this.children=ws(this.children,r,r+o.length,e,s)}update(e,t,r,o){return this.dirty==Jt||!e.sameMarkup(this.node)?!1:(this.updateInner(e,t,r,o),!0)}updateInner(e,t,r,o){this.updateOuterDeco(t),this.node=e,this.innerDeco=r,this.contentDOM&&this.updateChildren(o,this.posAtStart),this.dirty=Ct}updateOuterDeco(e){if(Cs(e,this.outerDeco))return;let t=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=Rc(this.dom,this.nodeDOM,ks(this.outerDeco,this.node,t),ks(e,this.node,t)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)}deselectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable")}get domAtom(){return this.node.isAtom}}function Mc(n,e,t,r,o){Dc(r,e,n);let i=new yn(void 0,n,e,t,r,r,r,o,0);return i.contentDOM&&i.updateChildren(o,0),i}class Mo extends yn{constructor(e,t,r,o,i,s,l){super(e,t,r,o,i,null,s,l,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,t,r,o){return this.dirty==Jt||this.dirty!=Ct&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(t),(this.dirty!=Ct||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,o.trackWrites==this.nodeDOM&&(o.trackWrites=null)),this.node=e,this.dirty=Ct,!0)}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,r){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,r)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,t,r){let o=this.node.cut(e,t),i=document.createTextNode(o.text);return new Mo(this.parent,o,this.outerDeco,this.innerDeco,i,i,r)}markDirty(e,t){super.markDirty(e,t),this.dom!=this.nodeDOM&&(e==0||t==this.nodeDOM.nodeValue.length)&&(this.dirty=Jt)}get domAtom(){return!1}}class Ic extends Br{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==Ct&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class mg extends yn{constructor(e,t,r,o,i,s,l,a,c,u){super(e,t,r,o,i,s,l,c,u),this.spec=a}update(e,t,r,o){if(this.dirty==Jt)return!1;if(this.spec.update){let i=this.spec.update(e,t,r);return i&&this.updateInner(e,t,r,o),i}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,t,r,o)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,r,o){this.spec.setSelection?this.spec.setSelection(e,t,r):super.setSelection(e,t,r,o)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function Nc(n,e,t){let r=n.firstChild,o=!1;for(let i=0;i<e.length;i++){let s=e[i],l=s.dom;if(l.parentNode==n){for(;l!=r;)r=Lc(r),o=!0;r=r.nextSibling}else o=!0,n.insertBefore(l,r);if(s instanceof $n){let a=r?r.previousSibling:n.lastChild;Nc(s.contentDOM,s.children,t),r=a?a.nextSibling:n.firstChild}}for(;r;)r=Lc(r),o=!0;o&&t.trackWrites==n&&(t.trackWrites=null)}const Fr=function(n){n&&(this.nodeName=n)};Fr.prototype=Object.create(null);const Un=[new Fr];function ks(n,e,t){if(n.length==0)return Un;let r=t?Un[0]:new Fr,o=[r];for(let i=0;i<n.length;i++){let s=n[i].type.attrs;if(s){s.nodeName&&o.push(r=new Fr(s.nodeName));for(let l in s){let a=s[l];a!=null&&(t&&o.length==1&&o.push(r=new Fr(e.isInline?"span":"div")),l=="class"?r.class=(r.class?r.class+" ":"")+a:l=="style"?r.style=(r.style?r.style+";":"")+a:l!="nodeName"&&(r[l]=a))}}}return o}function Rc(n,e,t,r){if(t==Un&&r==Un)return e;let o=e;for(let i=0;i<r.length;i++){let s=r[i],l=t[i];if(i){let a;l&&l.nodeName==s.nodeName&&o!=n&&(a=o.parentNode)&&a.nodeName.toLowerCase()==s.nodeName||(a=document.createElement(s.nodeName),a.pmIsDeco=!0,a.appendChild(o),l=Un[0]),o=a}gg(o,l||Un[0],s)}return o}function gg(n,e,t){for(let r in e)r!="class"&&r!="style"&&r!="nodeName"&&!(r in t)&&n.removeAttribute(r);for(let r in t)r!="class"&&r!="style"&&r!="nodeName"&&t[r]!=e[r]&&n.setAttribute(r,t[r]);if(e.class!=t.class){let r=e.class?e.class.split(" ").filter(Boolean):[],o=t.class?t.class.split(" ").filter(Boolean):[];for(let i=0;i<r.length;i++)o.indexOf(r[i])==-1&&n.classList.remove(r[i]);for(let i=0;i<o.length;i++)r.indexOf(o[i])==-1&&n.classList.add(o[i]);n.classList.length==0&&n.removeAttribute("class")}if(e.style!=t.style){if(e.style){let r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,o;for(;o=r.exec(e.style);)n.style.removeProperty(o[1])}t.style&&(n.style.cssText+=t.style)}}function Dc(n,e,t){return Rc(n,n,Un,ks(e,t,n.nodeType!=1))}function Cs(n,e){if(n.length!=e.length)return!1;for(let t=0;t<n.length;t++)if(!n[t].type.eq(e[t].type))return!1;return!0}function Lc(n){let e=n.nextSibling;return n.parentNode.removeChild(n),e}class yg{constructor(e,t,r){this.lock=t,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=vg(e.node.content,e)}destroyBetween(e,t){if(e!=t){for(let r=e;r<t;r++)this.top.children[r].destroy();this.top.children.splice(e,t-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,t,r){let o=0,i=this.stack.length>>1,s=Math.min(i,e.length);for(;o<s&&(o==i-1?this.top:this.stack[o+1<<1]).matchesMark(e[o])&&e[o].type.spec.spanning!==!1;)o++;for(;o<i;)this.destroyRest(),this.top.dirty=Ct,this.index=this.stack.pop(),this.top=this.stack.pop(),i--;for(;i<e.length;){this.stack.push(this.top,this.index+1);let l=-1;for(let a=this.index;a<Math.min(this.index+3,this.top.children.length);a++){let c=this.top.children[a];if(c.matchesMark(e[i])&&!this.isLocked(c.dom)){l=a;break}}if(l>-1)l>this.index&&(this.changed=!0,this.destroyBetween(this.index,l)),this.top=this.top.children[this.index];else{let a=$n.create(this.top,e[i],t,r);this.top.children.splice(this.index,0,a),this.top=a,this.changed=!0}this.index=0,i++}}findNodeMatch(e,t,r,o){let i=-1,s;if(o>=this.preMatch.index&&(s=this.preMatch.matches[o-this.preMatch.index]).parent==this.top&&s.matchesNode(e,t,r))i=this.top.children.indexOf(s,this.index);else for(let l=this.index,a=Math.min(this.top.children.length,l+5);l<a;l++){let c=this.top.children[l];if(c.matchesNode(e,t,r)&&!this.preMatch.matched.has(c)){i=l;break}}return i<0?!1:(this.destroyBetween(this.index,i),this.index++,!0)}updateNodeAt(e,t,r,o,i){let s=this.top.children[o];return s.dirty==Jt&&s.dom==s.contentDOM&&(s.dirty=zn),s.update(e,t,r,i)?(this.destroyBetween(this.index,o),this.index++,!0):!1}findIndexWithChild(e){for(;;){let t=e.parentNode;if(!t)return-1;if(t==this.top.contentDOM){let r=e.pmViewDesc;if(r){for(let o=this.index;o<this.top.children.length;o++)if(this.top.children[o]==r)return o}return-1}e=t}}updateNextNode(e,t,r,o,i,s){for(let l=this.index;l<this.top.children.length;l++){let a=this.top.children[l];if(a instanceof yn){let c=this.preMatch.matched.get(a);if(c!=null&&c!=i)return!1;let u=a.dom,d,f=this.isLocked(u)&&!(e.isText&&a.node&&a.node.isText&&a.nodeDOM.nodeValue==e.text&&a.dirty!=Jt&&Cs(t,a.outerDeco));if(!f&&a.update(e,t,r,o))return this.destroyBetween(this.index,l),a.dom!=u&&(this.changed=!0),this.index++,!0;if(!f&&(d=this.recreateWrapper(a,e,t,r,o,s)))return this.top.children[this.index]=d,d.contentDOM&&(d.dirty=zn,d.updateChildren(o,s+1),d.dirty=Ct),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,t,r,o,i,s){if(e.dirty||t.isAtom||!e.children.length||!e.node.content.eq(t.content))return null;let l=yn.create(this.top,t,r,o,i,s);if(l.contentDOM){l.children=e.children,e.children=[];for(let a of l.children)a.parent=l}return e.destroy(),l}addNode(e,t,r,o,i){let s=yn.create(this.top,e,t,r,o,i);s.contentDOM&&s.updateChildren(o,i+1),this.top.children.splice(this.index++,0,s),this.changed=!0}placeWidget(e,t,r){let o=this.index<this.top.children.length?this.top.children[this.index]:null;if(o&&o.matchesWidget(e)&&(e==o.widget||!o.widget.type.toDOM.parentNode))this.index++;else{let i=new Oc(this.top,e,t,r);this.top.children.splice(this.index++,0,i),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],t=this.top;for(;e instanceof $n;)t=e,e=t.children[t.children.length-1];(!e||!(e instanceof Mo)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((st||tt)&&e&&e.dom.contentEditable=="false"&&this.addHackNode("IMG",t),this.addHackNode("BR",this.top))}addHackNode(e,t){if(t==this.top&&this.index<t.children.length&&t.children[this.index].matchesHack(e))this.index++;else{let r=document.createElement(e);e=="IMG"&&(r.className="ProseMirror-separator",r.alt=""),e=="BR"&&(r.className="ProseMirror-trailingBreak");let o=new Ic(this.top,[],r,null);t!=this.top?t.children.push(o):t.children.splice(this.index++,0,o),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function vg(n,e){let t=e,r=t.children.length,o=n.childCount,i=new Map,s=[];e:for(;o>0;){let l;for(;;)if(r){let c=t.children[r-1];if(c instanceof $n)t=c,r=c.children.length;else{l=c,r--;break}}else{if(t==e)break e;r=t.parent.children.indexOf(t),t=t.parent}let a=l.node;if(a){if(a!=n.child(o-1))break;--o,i.set(l,o),s.push(l)}}return{index:o,matched:i,matches:s.reverse()}}function bg(n,e){return n.type.side-e.type.side}function xg(n,e,t,r){let o=e.locals(n),i=0;if(o.length==0){for(let c=0;c<n.childCount;c++){let u=n.child(c);r(u,o,e.forChild(i,u),c),i+=u.nodeSize}return}let s=0,l=[],a=null;for(let c=0;;){let u,d;for(;s<o.length&&o[s].to==i;){let y=o[s++];y.widget&&(u?(d||(d=[u])).push(y):u=y)}if(u)if(d){d.sort(bg);for(let y=0;y<d.length;y++)t(d[y],c,!!a)}else t(u,c,!!a);let f,h;if(a)h=-1,f=a,a=null;else if(c<n.childCount)h=c,f=n.child(c++);else break;for(let y=0;y<l.length;y++)l[y].to<=i&&l.splice(y--,1);for(;s<o.length&&o[s].from<=i&&o[s].to>i;)l.push(o[s++]);let p=i+f.nodeSize;if(f.isText){let y=p;s<o.length&&o[s].from<y&&(y=o[s].from);for(let S=0;S<l.length;S++)l[S].to<y&&(y=l[S].to);y<p&&(a=f.cut(y-i),f=f.cut(0,y-i),p=y,h=-1)}let g=f.isInline&&!f.isLeaf?l.filter(y=>!y.inline):l.slice();r(f,g,e.forChild(i,f),h),i=p}}function Sg(n){if(n.nodeName=="UL"||n.nodeName=="OL"){let e=n.style.cssText;n.style.cssText=e+"; list-style: square !important",window.getComputedStyle(n).listStyle,n.style.cssText=e}}function Eg(n,e){for(;;){if(n.nodeType==3)return n;if(n.nodeType==1&&e>0){if(n.childNodes.length>e&&n.childNodes[e].nodeType==3)return n.childNodes[e];n=n.childNodes[e-1],e=Kt(n)}else if(n.nodeType==1&&e<n.childNodes.length)n=n.childNodes[e],e=0;else return null}}function kg(n,e,t,r){for(let o=0,i=0;o<n.childCount&&i<=r;){let s=n.child(o++),l=i;if(i+=s.nodeSize,!s.isText)continue;let a=s.text;for(;o<n.childCount;){let c=n.child(o++);if(i+=c.nodeSize,!c.isText)break;a+=c.text}if(i>=t){if(i>=r&&a.slice(r-e.length-l,r-l)==e)return r-e.length;let c=l<r?a.lastIndexOf(e,r-l-1):-1;if(c>=0&&c+e.length+l>=t)return l+c;if(t==r&&a.length>=r+e.length-l&&a.slice(r-l,r-l+e.length)==e)return r}}return-1}function ws(n,e,t,r,o){let i=[];for(let s=0,l=0;s<n.length;s++){let a=n[s],c=l,u=l+=a.size;c>=t||u<=e?i.push(a):(c<e&&i.push(a.slice(0,e-c,r)),o&&(i.push(o),o=void 0),u>t&&i.push(a.slice(t-c,a.size,r)))}return i}function Ts(n,e=null){let t=n.domSelectionRange(),r=n.state.doc;if(!t.focusNode)return null;let o=n.docView.nearestDesc(t.focusNode),i=o&&o.size==0,s=n.docView.posFromDOM(t.focusNode,t.focusOffset,1);if(s<0)return null;let l=r.resolve(s),a,c;if(Oo(t)){for(a=l;o&&!o.node;)o=o.parent;let u=o.node;if(o&&u.isAtom&&Se.isSelectable(u)&&o.parent&&!(u.isInline&&Jm(t.focusNode,t.focusOffset,o.dom))){let d=o.posBefore;c=new Se(s==d?l:r.resolve(d))}}else{let u=n.docView.posFromDOM(t.anchorNode,t.anchorOffset,1);if(u<0)return null;a=r.resolve(u)}if(!c){let u=e=="pointer"||n.state.selection.head<l.pos&&!i?1:-1;c=Os(n,a,l,u)}return c}function Pc(n){return n.editable?n.hasFocus():Hc(n)&&document.activeElement&&document.activeElement.contains(n.dom)}function on(n,e=!1){let t=n.state.selection;if(zc(n,t),!!Pc(n)){if(!e&&n.input.mouseDown&&n.input.mouseDown.allowDefault&&tt){let r=n.domSelectionRange(),o=n.domObserver.currentSelection;if(r.anchorNode&&o.anchorNode&&Fn(r.anchorNode,r.anchorOffset,o.anchorNode,o.anchorOffset)){n.input.mouseDown.delayedSelectionSync=!0,n.domObserver.setCurSelection();return}}if(n.domObserver.disconnectSelection(),n.cursorWrapper)wg(n);else{let{anchor:r,head:o}=t,i,s;Bc&&!(t instanceof De)&&(t.$from.parent.inlineContent||(i=Fc(n,t.from)),!t.empty&&!t.$from.parent.inlineContent&&(s=Fc(n,t.to))),n.docView.setSelection(r,o,n.root,e),Bc&&(i&&Vc(i),s&&Vc(s)),t.visible?n.dom.classList.remove("ProseMirror-hideselection"):(n.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&Cg(n))}n.domObserver.setCurSelection(),n.domObserver.connectSelection()}}const Bc=st||tt&&Zm<63;function Fc(n,e){let{node:t,offset:r}=n.docView.domFromPos(e,0),o=r<t.childNodes.length?t.childNodes[r]:null,i=r?t.childNodes[r-1]:null;if(st&&o&&o.contentEditable=="false")return As(o);if((!o||o.contentEditable=="false")&&(!i||i.contentEditable=="false")){if(o)return As(o);if(i)return As(i)}}function As(n){return n.contentEditable="true",st&&n.draggable&&(n.draggable=!1,n.wasDraggable=!0),n}function Vc(n){n.contentEditable="false",n.wasDraggable&&(n.draggable=!0,n.wasDraggable=null)}function Cg(n){let e=n.dom.ownerDocument;e.removeEventListener("selectionchange",n.input.hideSelectionGuard);let t=n.domSelectionRange(),r=t.anchorNode,o=t.anchorOffset;e.addEventListener("selectionchange",n.input.hideSelectionGuard=()=>{(t.anchorNode!=r||t.anchorOffset!=o)&&(e.removeEventListener("selectionchange",n.input.hideSelectionGuard),setTimeout(()=>{(!Pc(n)||n.state.selection.visible)&&n.dom.classList.remove("ProseMirror-hideselection")},20))})}function wg(n){let e=n.domSelection(),t=document.createRange(),r=n.cursorWrapper.dom,o=r.nodeName=="IMG";o?t.setEnd(r.parentNode,it(r)+1):t.setEnd(r,0),t.collapse(!1),e.removeAllRanges(),e.addRange(t),!o&&!n.state.selection.visible&&pt&&mn<=11&&(r.disabled=!0,r.disabled=!1)}function zc(n,e){if(e instanceof Se){let t=n.docView.descAt(e.from);t!=n.lastSelectedViewDesc&&($c(n),t&&t.selectNode(),n.lastSelectedViewDesc=t)}else $c(n)}function $c(n){n.lastSelectedViewDesc&&(n.lastSelectedViewDesc.parent&&n.lastSelectedViewDesc.deselectNode(),n.lastSelectedViewDesc=void 0)}function Os(n,e,t,r){return n.someProp("createSelectionBetween",o=>o(n,e,t))||De.between(e,t,r)}function Uc(n){return n.editable&&!n.hasFocus()?!1:Hc(n)}function Hc(n){let e=n.domSelectionRange();if(!e.anchorNode)return!1;try{return n.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(n.editable||n.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function Tg(n){let e=n.docView.domFromPos(n.state.selection.anchor,0),t=n.domSelectionRange();return Fn(e.node,e.offset,t.anchorNode,t.anchorOffset)}function Ms(n,e){let{$anchor:t,$head:r}=n.selection,o=e>0?t.max(r):t.min(r),i=o.parent.inlineContent?o.depth?n.doc.resolve(e>0?o.after():o.before()):null:o;return i&&Re.findFrom(i,e)}function vn(n,e){return n.dispatch(n.state.tr.setSelection(e).scrollIntoView()),!0}function jc(n,e,t){let r=n.state.selection;if(r instanceof De)if(t.indexOf("s")>-1){let{$head:o}=r,i=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let s=n.state.doc.resolve(o.pos+i.nodeSize*(e<0?-1:1));return vn(n,new De(r.$anchor,s))}else if(r.empty){if(n.endOfTextblock(e>0?"forward":"backward")){let o=Ms(n.state,e);return o&&o instanceof Se?vn(n,o):!1}else if(!(kt&&t.indexOf("m")>-1)){let o=r.$head,i=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter,s;if(!i||i.isText)return!1;let l=e<0?o.pos-i.nodeSize:o.pos;return i.isAtom||(s=n.docView.descAt(l))&&!s.contentDOM?Se.isSelectable(i)?vn(n,new Se(e<0?n.state.doc.resolve(o.pos-i.nodeSize):o)):Lr?vn(n,new De(n.state.doc.resolve(e<0?l:l+i.nodeSize))):!1:!1}}else return!1;else{if(r instanceof Se&&r.node.isInline)return vn(n,new De(e>0?r.$to:r.$from));{let o=Ms(n.state,e);return o?vn(n,o):!1}}}function Io(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function Vr(n,e){let t=n.pmViewDesc;return t&&t.size==0&&(e<0||n.nextSibling||n.nodeName!="BR")}function sr(n,e){return e<0?Ag(n):Og(n)}function Ag(n){let e=n.domSelectionRange(),t=e.focusNode,r=e.focusOffset;if(!t)return;let o,i,s=!1;for(Vt&&t.nodeType==1&&r<Io(t)&&Vr(t.childNodes[r],-1)&&(s=!0);;)if(r>0){if(t.nodeType!=1)break;{let l=t.childNodes[r-1];if(Vr(l,-1))o=t,i=--r;else if(l.nodeType==3)t=l,r=t.nodeValue.length;else break}}else{if(Wc(t))break;{let l=t.previousSibling;for(;l&&Vr(l,-1);)o=t.parentNode,i=it(l),l=l.previousSibling;if(l)t=l,r=Io(t);else{if(t=t.parentNode,t==n.dom)break;r=0}}}s?Is(n,t,r):o&&Is(n,o,i)}function Og(n){let e=n.domSelectionRange(),t=e.focusNode,r=e.focusOffset;if(!t)return;let o=Io(t),i,s;for(;;)if(r<o){if(t.nodeType!=1)break;let l=t.childNodes[r];if(Vr(l,1))i=t,s=++r;else break}else{if(Wc(t))break;{let l=t.nextSibling;for(;l&&Vr(l,1);)i=l.parentNode,s=it(l)+1,l=l.nextSibling;if(l)t=l,r=0,o=Io(t);else{if(t=t.parentNode,t==n.dom)break;r=o=0}}}i&&Is(n,i,s)}function Wc(n){let e=n.pmViewDesc;return e&&e.node&&e.node.isBlock}function Mg(n,e){for(;n&&e==n.childNodes.length&&!ys(n);)e=it(n)+1,n=n.parentNode;for(;n&&e<n.childNodes.length;){let t=n.childNodes[e];if(t.nodeType==3)return t;if(t.nodeType==1&&t.contentEditable=="false")break;n=t,e=0}}function Ig(n,e){for(;n&&!e&&!ys(n);)e=it(n),n=n.parentNode;for(;n&&e;){let t=n.childNodes[e-1];if(t.nodeType==3)return t;if(t.nodeType==1&&t.contentEditable=="false")break;n=t,e=n.childNodes.length}}function Is(n,e,t){if(e.nodeType!=3){let i,s;(s=Mg(e,t))?(e=s,t=0):(i=Ig(e,t))&&(e=i,t=i.nodeValue.length)}let r=n.domSelection();if(Oo(r)){let i=document.createRange();i.setEnd(e,t),i.setStart(e,t),r.removeAllRanges(),r.addRange(i)}else r.extend&&r.extend(e,t);n.domObserver.setCurSelection();let{state:o}=n;setTimeout(()=>{n.state==o&&on(n)},50)}function Kc(n,e){let t=n.state.doc.resolve(e);if(!(tt||Qm)&&t.parent.inlineContent){let o=n.coordsAtPos(e);if(e>t.start()){let i=n.coordsAtPos(e-1),s=(i.top+i.bottom)/2;if(s>o.top&&s<o.bottom&&Math.abs(i.left-o.left)>1)return i.left<o.left?"ltr":"rtl"}if(e<t.end()){let i=n.coordsAtPos(e+1),s=(i.top+i.bottom)/2;if(s>o.top&&s<o.bottom&&Math.abs(i.left-o.left)>1)return i.left>o.left?"ltr":"rtl"}}return getComputedStyle(n.dom).direction=="rtl"?"rtl":"ltr"}function Gc(n,e,t){let r=n.state.selection;if(r instanceof De&&!r.empty||t.indexOf("s")>-1||kt&&t.indexOf("m")>-1)return!1;let{$from:o,$to:i}=r;if(!o.parent.inlineContent||n.endOfTextblock(e<0?"up":"down")){let s=Ms(n.state,e);if(s&&s instanceof Se)return vn(n,s)}if(!o.parent.inlineContent){let s=e<0?o:i,l=r instanceof Bt?Re.near(s,e):Re.findFrom(s,e);return l?vn(n,l):!1}return!1}function Jc(n,e){if(!(n.state.selection instanceof De))return!0;let{$head:t,$anchor:r,empty:o}=n.state.selection;if(!t.sameParent(r))return!0;if(!o)return!1;if(n.endOfTextblock(e>0?"forward":"backward"))return!0;let i=!t.textOffset&&(e<0?t.nodeBefore:t.nodeAfter);if(i&&!i.isText){let s=n.state.tr;return e<0?s.delete(t.pos-i.nodeSize,t.pos):s.delete(t.pos,t.pos+i.nodeSize),n.dispatch(s),!0}return!1}function Yc(n,e,t){n.domObserver.stop(),e.contentEditable=t,n.domObserver.start()}function Ng(n){if(!st||n.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:t}=n.domSelectionRange();if(e&&e.nodeType==1&&t==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let r=e.firstChild;Yc(n,r,"true"),setTimeout(()=>Yc(n,r,"false"),20)}return!1}function Rg(n){let e="";return n.ctrlKey&&(e+="c"),n.metaKey&&(e+="m"),n.altKey&&(e+="a"),n.shiftKey&&(e+="s"),e}function Dg(n,e){let t=e.keyCode,r=Rg(e);if(t==8||kt&&t==72&&r=="c")return Jc(n,-1)||sr(n,-1);if(t==46&&!e.shiftKey||kt&&t==68&&r=="c")return Jc(n,1)||sr(n,1);if(t==13||t==27)return!0;if(t==37||kt&&t==66&&r=="c"){let o=t==37?Kc(n,n.state.selection.from)=="ltr"?-1:1:-1;return jc(n,o,r)||sr(n,o)}else if(t==39||kt&&t==70&&r=="c"){let o=t==39?Kc(n,n.state.selection.from)=="ltr"?1:-1:1;return jc(n,o,r)||sr(n,o)}else{if(t==38||kt&&t==80&&r=="c")return Gc(n,-1,r)||sr(n,-1);if(t==40||kt&&t==78&&r=="c")return Ng(n)||Gc(n,1,r)||sr(n,1);if(r==(kt?"m":"c")&&(t==66||t==73||t==89||t==90))return!0}return!1}function Xc(n,e){n.someProp("transformCopied",h=>{e=h(e,n)});let t=[],{content:r,openStart:o,openEnd:i}=e;for(;o>1&&i>1&&r.childCount==1&&r.firstChild.childCount==1;){o--,i--;let h=r.firstChild;t.push(h.type.name,h.attrs!=h.type.defaultAttrs?h.attrs:null),r=h.content}let s=n.someProp("clipboardSerializer")||jt.fromSchema(n.state.schema),l=ru(),a=l.createElement("div");a.appendChild(s.serializeFragment(r,{document:l}));let c=a.firstChild,u,d=0;for(;c&&c.nodeType==1&&(u=tu[c.nodeName.toLowerCase()]);){for(let h=u.length-1;h>=0;h--){let p=l.createElement(u[h]);for(;a.firstChild;)p.appendChild(a.firstChild);a.appendChild(p),d++}c=a.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${o} ${i}${d?` -${d}`:""} ${JSON.stringify(t)}`);let f=n.someProp("clipboardTextSerializer",h=>h(e,n))||e.content.textBetween(0,e.content.size,`
|
|
16
|
+
|
|
17
|
+
`);return{dom:a,text:f}}function Zc(n,e,t,r,o){let i=o.parent.type.spec.code,s,l;if(!t&&!e)return null;let a=e&&(r||i||!t);if(a){if(n.someProp("transformPastedText",f=>{e=f(e,i||r,n)}),i)return e?new fe(oe.from(n.state.schema.text(e.replace(/\r\n?/g,`
|
|
18
|
+
`))),0,0):fe.empty;let d=n.someProp("clipboardTextParser",f=>f(e,o,r,n));if(d)l=d;else{let f=o.marks(),{schema:h}=n.state,p=jt.fromSchema(h);s=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(g=>{let y=s.appendChild(document.createElement("p"));g&&y.appendChild(p.serializeNode(h.text(g,f)))})}}else n.someProp("transformPastedHTML",d=>{t=d(t,n)}),s=Bg(t),Lr&&Fg(s);let c=s&&s.querySelector("[data-pm-slice]"),u=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(u&&u[3])for(let d=+u[3];d>0;d--){let f=s.firstChild;for(;f&&f.nodeType!=1;)f=f.nextSibling;if(!f)break;s=f}if(l||(l=(n.someProp("clipboardParser")||n.someProp("domParser")||Zn.fromSchema(n.state.schema)).parseSlice(s,{preserveWhitespace:!!(a||u),context:o,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!Lg.test(f.parentNode.nodeName)?{ignore:!0}:null}})),u)l=Vg(eu(l,+u[1],+u[2]),u[4]);else if(l=fe.maxOpen(Pg(l.content,o),!0),l.openStart||l.openEnd){let d=0,f=0;for(let h=l.content.firstChild;d<l.openStart&&!h.type.spec.isolating;d++,h=h.firstChild);for(let h=l.content.lastChild;f<l.openEnd&&!h.type.spec.isolating;f++,h=h.lastChild);l=eu(l,d,f)}return n.someProp("transformPasted",d=>{l=d(l,n)}),l}const Lg=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function Pg(n,e){if(n.childCount<2)return n;for(let t=e.depth;t>=0;t--){let o=e.node(t).contentMatchAt(e.index(t)),i,s=[];if(n.forEach(l=>{if(!s)return;let a=o.findWrapping(l.type),c;if(!a)return s=null;if(c=s.length&&i.length&&_c(a,i,l,s[s.length-1],0))s[s.length-1]=c;else{s.length&&(s[s.length-1]=qc(s[s.length-1],i.length));let u=Qc(l,a);s.push(u),o=o.matchType(u.type),i=a}}),s)return oe.from(s)}return n}function Qc(n,e,t=0){for(let r=e.length-1;r>=t;r--)n=e[r].create(null,oe.from(n));return n}function _c(n,e,t,r,o){if(o<n.length&&o<e.length&&n[o]==e[o]){let i=_c(n,e,t,r.lastChild,o+1);if(i)return r.copy(r.content.replaceChild(r.childCount-1,i));if(r.contentMatchAt(r.childCount).matchType(o==n.length-1?t.type:n[o+1]))return r.copy(r.content.append(oe.from(Qc(t,n,o+1))))}}function qc(n,e){if(e==0)return n;let t=n.content.replaceChild(n.childCount-1,qc(n.lastChild,e-1)),r=n.contentMatchAt(n.childCount).fillBefore(oe.empty,!0);return n.copy(t.append(r))}function Ns(n,e,t,r,o,i){let s=e<0?n.firstChild:n.lastChild,l=s.content;return n.childCount>1&&(i=0),o<r-1&&(l=Ns(l,e,t,r,o+1,i)),o>=t&&(l=e<0?s.contentMatchAt(0).fillBefore(l,i<=o).append(l):l.append(s.contentMatchAt(s.childCount).fillBefore(oe.empty,!0))),n.replaceChild(e<0?0:n.childCount-1,s.copy(l))}function eu(n,e,t){return e<n.openStart&&(n=new fe(Ns(n.content,-1,e,n.openStart,0,n.openEnd),e,n.openEnd)),t<n.openEnd&&(n=new fe(Ns(n.content,1,t,n.openEnd,0,0),n.openStart,t)),n}const tu={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let nu=null;function ru(){return nu||(nu=document.implementation.createHTMLDocument("title"))}function Bg(n){let e=/^(\s*<meta [^>]*>)*/.exec(n);e&&(n=n.slice(e[0].length));let t=ru().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(n),o;if((o=r&&tu[r[1].toLowerCase()])&&(n=o.map(i=>"<"+i+">").join("")+n+o.map(i=>"</"+i+">").reverse().join("")),t.innerHTML=n,o)for(let i=0;i<o.length;i++)t=t.querySelector(o[i])||t;return t}function Fg(n){let e=n.querySelectorAll(tt?"span:not([class]):not([style])":"span.Apple-converted-space");for(let t=0;t<e.length;t++){let r=e[t];r.childNodes.length==1&&r.textContent==" "&&r.parentNode&&r.parentNode.replaceChild(n.ownerDocument.createTextNode(" "),r)}}function Vg(n,e){if(!n.size)return n;let t=n.content.firstChild.type.schema,r;try{r=JSON.parse(e)}catch{return n}let{content:o,openStart:i,openEnd:s}=n;for(let l=r.length-2;l>=0;l-=2){let a=t.nodes[r[l]];if(!a||a.hasRequiredAttrs())break;o=oe.from(a.create(r[l+1],o)),i++,s++}return new fe(o,i,s)}const at={},lt={},zg={touchstart:!0,touchmove:!0};class $g{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastAndroidDelete=0,this.composing=!1,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function Ug(n){for(let e in at){let t=at[e];n.dom.addEventListener(e,n.input.eventHandlers[e]=r=>{jg(n,r)&&!Ds(n,r)&&(n.editable||!(r.type in lt))&&t(n,r)},zg[e]?{passive:!0}:void 0)}st&&n.dom.addEventListener("input",()=>null),Rs(n)}function bn(n,e){n.input.lastSelectionOrigin=e,n.input.lastSelectionTime=Date.now()}function Hg(n){n.domObserver.stop();for(let e in n.input.eventHandlers)n.dom.removeEventListener(e,n.input.eventHandlers[e]);clearTimeout(n.input.composingTimeout),clearTimeout(n.input.lastIOSEnterFallbackTimeout)}function Rs(n){n.someProp("handleDOMEvents",e=>{for(let t in e)n.input.eventHandlers[t]||n.dom.addEventListener(t,n.input.eventHandlers[t]=r=>Ds(n,r))})}function Ds(n,e){return n.someProp("handleDOMEvents",t=>{let r=t[e.type];return r?r(n,e)||e.defaultPrevented:!1})}function jg(n,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target;t!=n.dom;t=t.parentNode)if(!t||t.nodeType==11||t.pmViewDesc&&t.pmViewDesc.stopEvent(e))return!1;return!0}function Wg(n,e){!Ds(n,e)&&at[e.type]&&(n.editable||!(e.type in lt))&&at[e.type](n,e)}lt.keydown=(n,e)=>{let t=e;if(n.input.shiftKey=t.keyCode==16||t.shiftKey,!iu(n,t)&&(n.input.lastKeyCode=t.keyCode,n.input.lastKeyCodeTime=Date.now(),!(zt&&tt&&t.keyCode==13)))if(t.keyCode!=229&&n.domObserver.forceFlush(),or&&t.keyCode==13&&!t.ctrlKey&&!t.altKey&&!t.metaKey){let r=Date.now();n.input.lastIOSEnter=r,n.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{n.input.lastIOSEnter==r&&(n.someProp("handleKeyDown",o=>o(n,Vn(13,"Enter"))),n.input.lastIOSEnter=0)},200)}else n.someProp("handleKeyDown",r=>r(n,t))||Dg(n,t)?t.preventDefault():bn(n,"key")},lt.keyup=(n,e)=>{e.keyCode==16&&(n.input.shiftKey=!1)},lt.keypress=(n,e)=>{let t=e;if(iu(n,t)||!t.charCode||t.ctrlKey&&!t.altKey||kt&&t.metaKey)return;if(n.someProp("handleKeyPress",o=>o(n,t))){t.preventDefault();return}let r=n.state.selection;if(!(r instanceof De)||!r.$from.sameParent(r.$to)){let o=String.fromCharCode(t.charCode);!/[\r\n]/.test(o)&&!n.someProp("handleTextInput",i=>i(n,r.$from.pos,r.$to.pos,o))&&n.dispatch(n.state.tr.insertText(o).scrollIntoView()),t.preventDefault()}};function No(n){return{left:n.clientX,top:n.clientY}}function Kg(n,e){let t=e.x-n.clientX,r=e.y-n.clientY;return t*t+r*r<100}function Ls(n,e,t,r,o){if(r==-1)return!1;let i=n.state.doc.resolve(r);for(let s=i.depth+1;s>0;s--)if(n.someProp(e,l=>s>i.depth?l(n,t,i.nodeAfter,i.before(s),o,!0):l(n,t,i.node(s),i.before(s),o,!1)))return!0;return!1}function ar(n,e,t){n.focused||n.focus();let r=n.state.tr.setSelection(e);t=="pointer"&&r.setMeta("pointer",!0),n.dispatch(r)}function Gg(n,e){if(e==-1)return!1;let t=n.state.doc.resolve(e),r=t.nodeAfter;return r&&r.isAtom&&Se.isSelectable(r)?(ar(n,new Se(t),"pointer"),!0):!1}function Jg(n,e){if(e==-1)return!1;let t=n.state.selection,r,o;t instanceof Se&&(r=t.node);let i=n.state.doc.resolve(e);for(let s=i.depth+1;s>0;s--){let l=s>i.depth?i.nodeAfter:i.node(s);if(Se.isSelectable(l)){r&&t.$from.depth>0&&s>=t.$from.depth&&i.before(t.$from.depth+1)==t.$from.pos?o=i.before(t.$from.depth):o=i.before(s);break}}return o!=null?(ar(n,Se.create(n.state.doc,o),"pointer"),!0):!1}function Yg(n,e,t,r,o){return Ls(n,"handleClickOn",e,t,r)||n.someProp("handleClick",i=>i(n,e,r))||(o?Jg(n,t):Gg(n,t))}function Xg(n,e,t,r){return Ls(n,"handleDoubleClickOn",e,t,r)||n.someProp("handleDoubleClick",o=>o(n,e,r))}function Zg(n,e,t,r){return Ls(n,"handleTripleClickOn",e,t,r)||n.someProp("handleTripleClick",o=>o(n,e,r))||Qg(n,t,r)}function Qg(n,e,t){if(t.button!=0)return!1;let r=n.state.doc;if(e==-1)return r.inlineContent?(ar(n,De.create(r,0,r.content.size),"pointer"),!0):!1;let o=r.resolve(e);for(let i=o.depth+1;i>0;i--){let s=i>o.depth?o.nodeAfter:o.node(i),l=o.before(i);if(s.inlineContent)ar(n,De.create(r,l+1,l+1+s.content.size),"pointer");else if(Se.isSelectable(s))ar(n,Se.create(r,l),"pointer");else continue;return!0}}function Ps(n){return Ro(n)}const ou=kt?"metaKey":"ctrlKey";at.mousedown=(n,e)=>{let t=e;n.input.shiftKey=t.shiftKey;let r=Ps(n),o=Date.now(),i="singleClick";o-n.input.lastClick.time<500&&Kg(t,n.input.lastClick)&&!t[ou]&&(n.input.lastClick.type=="singleClick"?i="doubleClick":n.input.lastClick.type=="doubleClick"&&(i="tripleClick")),n.input.lastClick={time:o,x:t.clientX,y:t.clientY,type:i};let s=n.posAtCoords(No(t));s&&(i=="singleClick"?(n.input.mouseDown&&n.input.mouseDown.done(),n.input.mouseDown=new _g(n,s,t,!!r)):(i=="doubleClick"?Xg:Zg)(n,s.pos,s.inside,t)?t.preventDefault():bn(n,"pointer"))};class _g{constructor(e,t,r,o){this.view=e,this.pos=t,this.event=r,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!r[ou],this.allowDefault=r.shiftKey;let i,s;if(t.inside>-1)i=e.state.doc.nodeAt(t.inside),s=t.inside;else{let u=e.state.doc.resolve(t.pos);i=u.parent,s=u.depth?u.before():0}const l=o?null:r.target,a=l?e.docView.nearestDesc(l,!0):null;this.target=a?a.dom:null;let{selection:c}=e.state;(r.button==0&&i.type.spec.draggable&&i.type.spec.selectable!==!1||c instanceof Se&&c.from<=s&&c.to>s)&&(this.mightDrag={node:i,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Vt&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),bn(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>on(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(No(e))),this.updateAllowDefault(e),this.allowDefault||!t?bn(this.view,"pointer"):Yg(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||st&&this.mightDrag&&!this.mightDrag.node.isAtom||tt&&!this.view.state.selection.visible&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(ar(this.view,Re.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):bn(this.view,"pointer")}move(e){this.updateAllowDefault(e),bn(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}at.touchstart=n=>{n.input.lastTouch=Date.now(),Ps(n),bn(n,"pointer")},at.touchmove=n=>{n.input.lastTouch=Date.now(),bn(n,"pointer")},at.contextmenu=n=>Ps(n);function iu(n,e){return n.composing?!0:st&&Math.abs(e.timeStamp-n.input.compositionEndedAt)<500?(n.input.compositionEndedAt=-2e8,!0):!1}const qg=zt?5e3:-1;lt.compositionstart=lt.compositionupdate=n=>{if(!n.composing){n.domObserver.flush();let{state:e}=n,t=e.selection.$from;if(e.selection.empty&&(e.storedMarks||!t.textOffset&&t.parentOffset&&t.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)))n.markCursor=n.state.storedMarks||t.marks(),Ro(n,!0),n.markCursor=null;else if(Ro(n),Vt&&e.selection.empty&&t.parentOffset&&!t.textOffset&&t.nodeBefore.marks.length){let r=n.domSelectionRange();for(let o=r.focusNode,i=r.focusOffset;o&&o.nodeType==1&&i!=0;){let s=i<0?o.lastChild:o.childNodes[i-1];if(!s)break;if(s.nodeType==3){n.domSelection().collapse(s,s.nodeValue.length);break}else o=s,i=-1}}n.input.composing=!0}su(n,qg)},lt.compositionend=(n,e)=>{n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=e.timeStamp,n.input.compositionPendingChanges=n.domObserver.pendingRecords().length?n.input.compositionID:0,n.input.compositionPendingChanges&&Promise.resolve().then(()=>n.domObserver.flush()),n.input.compositionID++,su(n,20))};function su(n,e){clearTimeout(n.input.composingTimeout),e>-1&&(n.input.composingTimeout=setTimeout(()=>Ro(n),e))}function au(n){for(n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=e1());n.input.compositionNodes.length>0;)n.input.compositionNodes.pop().markParentsDirty()}function e1(){let n=document.createEvent("Event");return n.initEvent("event",!0,!0),n.timeStamp}function Ro(n,e=!1){if(!(zt&&n.domObserver.flushingSoon>=0)){if(n.domObserver.forceFlush(),au(n),e||n.docView&&n.docView.dirty){let t=Ts(n);return t&&!t.eq(n.state.selection)?n.dispatch(n.state.tr.setSelection(t)):n.updateState(n.state),!0}return!1}}function t1(n,e){if(!n.dom.parentNode)return;let t=n.dom.parentNode.appendChild(document.createElement("div"));t.appendChild(e),t.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(e),n.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout(()=>{t.parentNode&&t.parentNode.removeChild(t),n.focus()},50)}const zr=pt&&mn<15||or&&_m<604;at.copy=lt.cut=(n,e)=>{let t=e,r=n.state.selection,o=t.type=="cut";if(r.empty)return;let i=zr?null:t.clipboardData,s=r.content(),{dom:l,text:a}=Xc(n,s);i?(t.preventDefault(),i.clearData(),i.setData("text/html",l.innerHTML),i.setData("text/plain",a)):t1(n,l),o&&n.dispatch(n.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function n1(n){return n.openStart==0&&n.openEnd==0&&n.content.childCount==1?n.content.firstChild:null}function r1(n,e){if(!n.dom.parentNode)return;let t=n.input.shiftKey||n.state.selection.$from.parent.type.spec.code,r=n.dom.parentNode.appendChild(document.createElement(t?"textarea":"div"));t||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let o=n.input.shiftKey&&n.input.lastKeyCode!=45;setTimeout(()=>{n.focus(),r.parentNode&&r.parentNode.removeChild(r),t?$r(n,r.value,null,o,e):$r(n,r.textContent,r.innerHTML,o,e)},50)}function $r(n,e,t,r,o){let i=Zc(n,e,t,r,n.state.selection.$from);if(n.someProp("handlePaste",a=>a(n,o,i||fe.empty)))return!0;if(!i)return!1;let s=n1(i),l=s?n.state.tr.replaceSelectionWith(s,r):n.state.tr.replaceSelection(i);return n.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function lu(n){let e=n.getData("text/plain")||n.getData("Text");if(e)return e;let t=n.getData("text/uri-list");return t?t.replace(/\r?\n/g," "):""}lt.paste=(n,e)=>{let t=e;if(n.composing&&!zt)return;let r=zr?null:t.clipboardData,o=n.input.shiftKey&&n.input.lastKeyCode!=45;r&&$r(n,lu(r),r.getData("text/html"),o,t)?t.preventDefault():r1(n,t)};class cu{constructor(e,t,r){this.slice=e,this.move=t,this.node=r}}const uu=kt?"altKey":"ctrlKey";at.dragstart=(n,e)=>{let t=e,r=n.input.mouseDown;if(r&&r.done(),!t.dataTransfer)return;let o=n.state.selection,i=o.empty?null:n.posAtCoords(No(t)),s;if(!(i&&i.pos>=o.from&&i.pos<=(o instanceof Se?o.to-1:o.to))){if(r&&r.mightDrag)s=Se.create(n.state.doc,r.mightDrag.pos);else if(t.target&&t.target.nodeType==1){let u=n.docView.nearestDesc(t.target,!0);u&&u.node.type.spec.draggable&&u!=n.docView&&(s=Se.create(n.state.doc,u.posBefore))}}let l=(s||n.state.selection).content(),{dom:a,text:c}=Xc(n,l);t.dataTransfer.clearData(),t.dataTransfer.setData(zr?"Text":"text/html",a.innerHTML),t.dataTransfer.effectAllowed="copyMove",zr||t.dataTransfer.setData("text/plain",c),n.dragging=new cu(l,!t[uu],s)},at.dragend=n=>{let e=n.dragging;window.setTimeout(()=>{n.dragging==e&&(n.dragging=null)},50)},lt.dragover=lt.dragenter=(n,e)=>e.preventDefault(),lt.drop=(n,e)=>{let t=e,r=n.dragging;if(n.dragging=null,!t.dataTransfer)return;let o=n.posAtCoords(No(t));if(!o)return;let i=n.state.doc.resolve(o.pos),s=r&&r.slice;s?n.someProp("transformPasted",p=>{s=p(s,n)}):s=Zc(n,lu(t.dataTransfer),zr?null:t.dataTransfer.getData("text/html"),!1,i);let l=!!(r&&!t[uu]);if(n.someProp("handleDrop",p=>p(n,t,s||fe.empty,l))){t.preventDefault();return}if(!s)return;t.preventDefault();let a=s?Pm(n.state.doc,i.pos,s):i.pos;a==null&&(a=i.pos);let c=n.state.tr;if(l){let{node:p}=r;p?p.replace(c):c.deleteSelection()}let u=c.mapping.map(a),d=s.openStart==0&&s.openEnd==0&&s.content.childCount==1,f=c.doc;if(d?c.replaceRangeWith(u,u,s.content.firstChild):c.replaceRange(u,u,s),c.doc.eq(f))return;let h=c.doc.resolve(u);if(d&&Se.isSelectable(s.content.firstChild)&&h.nodeAfter&&h.nodeAfter.sameMarkup(s.content.firstChild))c.setSelection(new Se(h));else{let p=c.mapping.map(a);c.mapping.maps[c.mapping.maps.length-1].forEach((g,y,S,k)=>p=k),c.setSelection(Os(n,h,c.doc.resolve(p)))}n.focus(),n.dispatch(c.setMeta("uiEvent","drop"))},at.focus=n=>{n.input.lastFocus=Date.now(),n.focused||(n.domObserver.stop(),n.dom.classList.add("ProseMirror-focused"),n.domObserver.start(),n.focused=!0,setTimeout(()=>{n.docView&&n.hasFocus()&&!n.domObserver.currentSelection.eq(n.domSelectionRange())&&on(n)},20))},at.blur=(n,e)=>{let t=e;n.focused&&(n.domObserver.stop(),n.dom.classList.remove("ProseMirror-focused"),n.domObserver.start(),t.relatedTarget&&n.dom.contains(t.relatedTarget)&&n.domObserver.currentSelection.clear(),n.focused=!1)},at.beforeinput=(n,e)=>{if(tt&&zt&&e.inputType=="deleteContentBackward"){n.domObserver.flushSoon();let{domChangeCount:r}=n.input;setTimeout(()=>{if(n.input.domChangeCount!=r||(n.dom.blur(),n.focus(),n.someProp("handleKeyDown",i=>i(n,Vn(8,"Backspace")))))return;let{$cursor:o}=n.state.selection;o&&o.pos>0&&n.dispatch(n.state.tr.delete(o.pos-1,o.pos).scrollIntoView())},50)}};for(let n in lt)at[n]=lt[n];function Ur(n,e){if(n==e)return!0;for(let t in n)if(n[t]!==e[t])return!1;for(let t in e)if(!(t in n))return!1;return!0}class Do{constructor(e,t){this.toDOM=e,this.spec=t||Hn,this.side=this.spec.side||0}map(e,t,r,o){let{pos:i,deleted:s}=e.mapResult(t.from+o,this.side<0?-1:1);return s?null:new wt(i-r,i-r,this)}valid(){return!0}eq(e){return this==e||e instanceof Do&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Ur(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class xn{constructor(e,t){this.attrs=e,this.spec=t||Hn}map(e,t,r,o){let i=e.map(t.from+o,this.spec.inclusiveStart?-1:1)-r,s=e.map(t.to+o,this.spec.inclusiveEnd?1:-1)-r;return i>=s?null:new wt(i,s,this)}valid(e,t){return t.from<t.to}eq(e){return this==e||e instanceof xn&&Ur(this.attrs,e.attrs)&&Ur(this.spec,e.spec)}static is(e){return e.type instanceof xn}destroy(){}}class Bs{constructor(e,t){this.attrs=e,this.spec=t||Hn}map(e,t,r,o){let i=e.mapResult(t.from+o,1);if(i.deleted)return null;let s=e.mapResult(t.to+o,-1);return s.deleted||s.pos<=i.pos?null:new wt(i.pos-r,s.pos-r,this)}valid(e,t){let{index:r,offset:o}=e.content.findIndex(t.from),i;return o==t.from&&!(i=e.child(r)).isText&&o+i.nodeSize==t.to}eq(e){return this==e||e instanceof Bs&&Ur(this.attrs,e.attrs)&&Ur(this.spec,e.spec)}destroy(){}}class wt{constructor(e,t,r){this.from=e,this.to=t,this.type=r}copy(e,t){return new wt(e,t,this.type)}eq(e,t=0){return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}map(e,t,r){return this.type.map(e,this,t,r)}static widget(e,t,r){return new wt(e,e,new Do(t,r))}static inline(e,t,r,o){return new wt(e,t,new xn(r,o))}static node(e,t,r,o){return new wt(e,t,new Bs(r,o))}get spec(){return this.type.spec}get inline(){return this.type instanceof xn}get widget(){return this.type instanceof Do}}const lr=[],Hn={};class We{constructor(e,t){this.local=e.length?e:lr,this.children=t.length?t:lr}static create(e,t){return t.length?Lo(t,e,0,Hn):nt}find(e,t,r){let o=[];return this.findInner(e??0,t??1e9,o,0,r),o}findInner(e,t,r,o,i){for(let s=0;s<this.local.length;s++){let l=this.local[s];l.from<=t&&l.to>=e&&(!i||i(l.spec))&&r.push(l.copy(l.from+o,l.to+o))}for(let s=0;s<this.children.length;s+=3)if(this.children[s]<t&&this.children[s+1]>e){let l=this.children[s]+1;this.children[s+2].findInner(e-l,t-l,r,o+l,i)}}map(e,t,r){return this==nt||e.maps.length==0?this:this.mapInner(e,t,0,0,r||Hn)}mapInner(e,t,r,o,i){let s;for(let l=0;l<this.local.length;l++){let a=this.local[l].map(e,r,o);a&&a.type.valid(t,a)?(s||(s=[])).push(a):i.onRemove&&i.onRemove(this.local[l].spec)}return this.children.length?o1(this.children,s||[],e,t,r,o,i):s?new We(s.sort(jn),lr):nt}add(e,t){return t.length?this==nt?We.create(e,t):this.addInner(e,t,0):this}addInner(e,t,r){let o,i=0;e.forEach((l,a)=>{let c=a+r,u;if(u=fu(t,l,c)){for(o||(o=this.children.slice());i<o.length&&o[i]<a;)i+=3;o[i]==a?o[i+2]=o[i+2].addInner(l,u,c+1):o.splice(i,0,a,a+l.nodeSize,Lo(u,l,c+1,Hn)),i+=3}});let s=du(i?pu(t):t,-r);for(let l=0;l<s.length;l++)s[l].type.valid(e,s[l])||s.splice(l--,1);return new We(s.length?this.local.concat(s).sort(jn):this.local,o||this.children)}remove(e){return e.length==0||this==nt?this:this.removeInner(e,0)}removeInner(e,t){let r=this.children,o=this.local;for(let i=0;i<r.length;i+=3){let s,l=r[i]+t,a=r[i+1]+t;for(let u=0,d;u<e.length;u++)(d=e[u])&&d.from>l&&d.to<a&&(e[u]=null,(s||(s=[])).push(d));if(!s)continue;r==this.children&&(r=this.children.slice());let c=r[i+2].removeInner(s,l+1);c!=nt?r[i+2]=c:(r.splice(i,3),i-=3)}if(o.length){for(let i=0,s;i<e.length;i++)if(s=e[i])for(let l=0;l<o.length;l++)o[l].eq(s,t)&&(o==this.local&&(o=this.local.slice()),o.splice(l--,1))}return r==this.children&&o==this.local?this:o.length||r.length?new We(o,r):nt}forChild(e,t){if(this==nt)return this;if(t.isLeaf)return We.empty;let r,o;for(let l=0;l<this.children.length;l+=3)if(this.children[l]>=e){this.children[l]==e&&(r=this.children[l+2]);break}let i=e+1,s=i+t.content.size;for(let l=0;l<this.local.length;l++){let a=this.local[l];if(a.from<s&&a.to>i&&a.type instanceof xn){let c=Math.max(i,a.from)-i,u=Math.min(s,a.to)-i;c<u&&(o||(o=[])).push(a.copy(c,u))}}if(o){let l=new We(o.sort(jn),lr);return r?new Sn([l,r]):l}return r||nt}eq(e){if(this==e)return!0;if(!(e instanceof We)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let t=0;t<this.local.length;t++)if(!this.local[t].eq(e.local[t]))return!1;for(let t=0;t<this.children.length;t+=3)if(this.children[t]!=e.children[t]||this.children[t+1]!=e.children[t+1]||!this.children[t+2].eq(e.children[t+2]))return!1;return!0}locals(e){return Fs(this.localsInner(e))}localsInner(e){if(this==nt)return lr;if(e.inlineContent||!this.local.some(xn.is))return this.local;let t=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof xn||t.push(this.local[r]);return t}}We.empty=new We([],[]),We.removeOverlap=Fs;const nt=We.empty;class Sn{constructor(e){this.members=e}map(e,t){const r=this.members.map(o=>o.map(e,t,Hn));return Sn.from(r)}forChild(e,t){if(t.isLeaf)return We.empty;let r=[];for(let o=0;o<this.members.length;o++){let i=this.members[o].forChild(e,t);i!=nt&&(i instanceof Sn?r=r.concat(i.members):r.push(i))}return Sn.from(r)}eq(e){if(!(e instanceof Sn)||e.members.length!=this.members.length)return!1;for(let t=0;t<this.members.length;t++)if(!this.members[t].eq(e.members[t]))return!1;return!0}locals(e){let t,r=!0;for(let o=0;o<this.members.length;o++){let i=this.members[o].localsInner(e);if(i.length)if(!t)t=i;else{r&&(t=t.slice(),r=!1);for(let s=0;s<i.length;s++)t.push(i[s])}}return t?Fs(r?t:t.sort(jn)):lr}static from(e){switch(e.length){case 0:return nt;case 1:return e[0];default:return new Sn(e.every(t=>t instanceof We)?e:e.reduce((t,r)=>t.concat(r instanceof We?r:r.members),[]))}}}function o1(n,e,t,r,o,i,s){let l=n.slice();for(let c=0,u=i;c<t.maps.length;c++){let d=0;t.maps[c].forEach((f,h,p,g)=>{let y=g-p-(h-f);for(let S=0;S<l.length;S+=3){let k=l[S+1];if(k<0||f>k+u-d)continue;let C=l[S]+u-d;h>=C?l[S+1]=f<=C?-2:-1:p>=o&&y&&(l[S]+=y,l[S+1]+=y)}d+=y}),u=t.maps[c].map(u,-1)}let a=!1;for(let c=0;c<l.length;c+=3)if(l[c+1]<0){if(l[c+1]==-2){a=!0,l[c+1]=-1;continue}let u=t.map(n[c]+i),d=u-o;if(d<0||d>=r.content.size){a=!0;continue}let f=t.map(n[c+1]+i,-1),h=f-o,{index:p,offset:g}=r.content.findIndex(d),y=r.maybeChild(p);if(y&&g==d&&g+y.nodeSize==h){let S=l[c+2].mapInner(t,y,u+1,n[c]+i+1,s);S!=nt?(l[c]=d,l[c+1]=h,l[c+2]=S):(l[c+1]=-2,a=!0)}else a=!0}if(a){let c=i1(l,n,e,t,o,i,s),u=Lo(c,r,0,s);e=u.local;for(let d=0;d<l.length;d+=3)l[d+1]<0&&(l.splice(d,3),d-=3);for(let d=0,f=0;d<u.children.length;d+=3){let h=u.children[d];for(;f<l.length&&l[f]<h;)f+=3;l.splice(f,0,u.children[d],u.children[d+1],u.children[d+2])}}return new We(e.sort(jn),l)}function du(n,e){if(!e||!n.length)return n;let t=[];for(let r=0;r<n.length;r++){let o=n[r];t.push(new wt(o.from+e,o.to+e,o.type))}return t}function i1(n,e,t,r,o,i,s){function l(a,c){for(let u=0;u<a.local.length;u++){let d=a.local[u].map(r,o,c);d?t.push(d):s.onRemove&&s.onRemove(a.local[u].spec)}for(let u=0;u<a.children.length;u+=3)l(a.children[u+2],a.children[u]+c+1)}for(let a=0;a<n.length;a+=3)n[a+1]==-1&&l(n[a+2],e[a]+i+1);return t}function fu(n,e,t){if(e.isLeaf)return null;let r=t+e.nodeSize,o=null;for(let i=0,s;i<n.length;i++)(s=n[i])&&s.from>t&&s.to<r&&((o||(o=[])).push(s),n[i]=null);return o}function pu(n){let e=[];for(let t=0;t<n.length;t++)n[t]!=null&&e.push(n[t]);return e}function Lo(n,e,t,r){let o=[],i=!1;e.forEach((l,a)=>{let c=fu(n,l,a+t);if(c){i=!0;let u=Lo(c,l,t+a+1,r);u!=nt&&o.push(a,a+l.nodeSize,u)}});let s=du(i?pu(n):n,-t).sort(jn);for(let l=0;l<s.length;l++)s[l].type.valid(e,s[l])||(r.onRemove&&r.onRemove(s[l].spec),s.splice(l--,1));return s.length||o.length?new We(s,o):nt}function jn(n,e){return n.from-e.from||n.to-e.to}function Fs(n){let e=n;for(let t=0;t<e.length-1;t++){let r=e[t];if(r.from!=r.to)for(let o=t+1;o<e.length;o++){let i=e[o];if(i.from==r.from){i.to!=r.to&&(e==n&&(e=n.slice()),e[o]=i.copy(i.from,r.to),hu(e,o+1,i.copy(r.to,i.to)));continue}else{i.from<r.to&&(e==n&&(e=n.slice()),e[t]=r.copy(r.from,i.from),hu(e,o,r.copy(i.from,r.to)));break}}}return e}function hu(n,e,t){for(;e<n.length&&jn(t,n[e])>0;)e++;n.splice(e,0,t)}function Vs(n){let e=[];return n.someProp("decorations",t=>{let r=t(n.state);r&&r!=nt&&e.push(r)}),n.cursorWrapper&&e.push(We.create(n.state.doc,[n.cursorWrapper.deco])),Sn.from(e)}const s1={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},a1=pt&&mn<=11;class l1{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class c1{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new l1,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let o=0;o<r.length;o++)this.queue.push(r[o]);pt&&mn<=11&&r.some(o=>o.type=="childList"&&o.removedNodes.length||o.type=="characterData"&&o.oldValue.length>o.target.nodeValue.length)?this.flushSoon():this.flush()}),a1&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,s1)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let t=0;t<e.length;t++)this.queue.push(e[t]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(Uc(this.view)){if(this.suppressingSelectionUpdates)return on(this.view);if(pt&&mn<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&Fn(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let t=new Set,r;for(let i=e.focusNode;i;i=Dr(i))t.add(i);for(let i=e.anchorNode;i;i=Dr(i))if(t.has(i)){r=i;break}let o=r&&this.view.docView.nearestDesc(r);if(o&&o.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let t=this.pendingRecords();t.length&&(this.queue=[]);let r=e.domSelectionRange(),o=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&Uc(e)&&!this.ignoreSelectionChange(r),i=-1,s=-1,l=!1,a=[];if(e.editable)for(let u=0;u<t.length;u++){let d=this.registerMutation(t[u],a);d&&(i=i<0?d.from:Math.min(d.from,i),s=s<0?d.to:Math.max(d.to,s),d.typeOver&&(l=!0))}if(Vt&&a.length>1){let u=a.filter(d=>d.nodeName=="BR");if(u.length==2){let d=u[0],f=u[1];d.parentNode&&d.parentNode.parentNode==f.parentNode?f.remove():d.remove()}}let c=null;i<0&&o&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&Oo(r)&&(c=Ts(e))&&c.eq(Re.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,on(e),this.currentSelection.set(r),e.scrollToSelection()):(i>-1||o)&&(i>-1&&(e.docView.markDirty(i,s),u1(e)),this.handleDOMChange(i,s,l,a),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||on(e),this.currentSelection.set(r))}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let r=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(r==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!r||r.ignoreMutation(e))return null;if(e.type=="childList"){for(let u=0;u<e.addedNodes.length;u++)t.push(e.addedNodes[u]);if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(e.target))return{from:r.posBefore,to:r.posAfter};let o=e.previousSibling,i=e.nextSibling;if(pt&&mn<=11&&e.addedNodes.length)for(let u=0;u<e.addedNodes.length;u++){let{previousSibling:d,nextSibling:f}=e.addedNodes[u];(!d||Array.prototype.indexOf.call(e.addedNodes,d)<0)&&(o=d),(!f||Array.prototype.indexOf.call(e.addedNodes,f)<0)&&(i=f)}let s=o&&o.parentNode==e.target?it(o)+1:0,l=r.localPosFromDOM(e.target,s,-1),a=i&&i.parentNode==e.target?it(i):e.target.childNodes.length,c=r.localPosFromDOM(e.target,a,1);return{from:l,to:c}}else return e.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:{from:r.posAtStart,to:r.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}}}let mu=new WeakMap,gu=!1;function u1(n){if(!mu.has(n)&&(mu.set(n,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(n.dom).whiteSpace)!==-1)){if(n.requiresGeckoHackNode=Vt,gu)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),gu=!0}}function d1(n){let e;function t(a){a.preventDefault(),a.stopImmediatePropagation(),e=a.getTargetRanges()[0]}n.dom.addEventListener("beforeinput",t,!0),document.execCommand("indent"),n.dom.removeEventListener("beforeinput",t,!0);let r=e.startContainer,o=e.startOffset,i=e.endContainer,s=e.endOffset,l=n.domAtPos(n.state.selection.anchor);return Fn(l.node,l.offset,i,s)&&([r,o,i,s]=[i,s,r,o]),{anchorNode:r,anchorOffset:o,focusNode:i,focusOffset:s}}function f1(n,e,t){let{node:r,fromOffset:o,toOffset:i,from:s,to:l}=n.docView.parseRange(e,t),a=n.domSelectionRange(),c,u=a.anchorNode;if(u&&n.dom.contains(u.nodeType==1?u:u.parentNode)&&(c=[{node:u,offset:a.anchorOffset}],Oo(a)||c.push({node:a.focusNode,offset:a.focusOffset})),tt&&n.input.lastKeyCode===8)for(let y=i;y>o;y--){let S=r.childNodes[y-1],k=S.pmViewDesc;if(S.nodeName=="BR"&&!k){i=y;break}if(!k||k.size)break}let d=n.state.doc,f=n.someProp("domParser")||Zn.fromSchema(n.state.schema),h=d.resolve(s),p=null,g=f.parse(r,{topNode:h.parent,topMatch:h.parent.contentMatchAt(h.index()),topOpen:!0,from:o,to:i,preserveWhitespace:h.parent.type.whitespace=="pre"?"full":!0,findPositions:c,ruleFromNode:p1,context:h});if(c&&c[0].pos!=null){let y=c[0].pos,S=c[1]&&c[1].pos;S==null&&(S=y),p={anchor:y+s,head:S+s}}return{doc:g,sel:p,from:s,to:l}}function p1(n){let e=n.pmViewDesc;if(e)return e.parseRule();if(n.nodeName=="BR"&&n.parentNode){if(st&&/^(ul|ol)$/i.test(n.parentNode.nodeName)){let t=document.createElement("div");return t.appendChild(document.createElement("li")),{skip:t}}else if(n.parentNode.lastChild==n||st&&/^(tr|table)$/i.test(n.parentNode.nodeName))return{ignore:!0}}else if(n.nodeName=="IMG"&&n.getAttribute("mark-placeholder"))return{ignore:!0};return null}const h1=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function m1(n,e,t,r,o){let i=n.input.compositionPendingChanges||(n.composing?n.input.compositionID:0);if(n.input.compositionPendingChanges=0,e<0){let $=n.input.lastSelectionTime>Date.now()-50?n.input.lastSelectionOrigin:null,V=Ts(n,$);if(V&&!n.state.selection.eq(V)){if(tt&&zt&&n.input.lastKeyCode===13&&Date.now()-100<n.input.lastKeyCodeTime&&n.someProp("handleKeyDown",P=>P(n,Vn(13,"Enter"))))return;let B=n.state.tr.setSelection(V);$=="pointer"?B.setMeta("pointer",!0):$=="key"&&B.scrollIntoView(),i&&B.setMeta("composition",i),n.dispatch(B)}return}let s=n.state.doc.resolve(e),l=s.sharedDepth(t);e=s.before(l+1),t=n.state.doc.resolve(t).after(l+1);let a=n.state.selection,c=f1(n,e,t),u=n.state.doc,d=u.slice(c.from,c.to),f,h;n.input.lastKeyCode===8&&Date.now()-100<n.input.lastKeyCodeTime?(f=n.state.selection.to,h="end"):(f=n.state.selection.from,h="start"),n.input.lastKeyCode=null;let p=v1(d.content,c.doc.content,c.from,f,h);if((or&&n.input.lastIOSEnter>Date.now()-225||zt)&&o.some($=>$.nodeType==1&&!h1.test($.nodeName))&&(!p||p.endA>=p.endB)&&n.someProp("handleKeyDown",$=>$(n,Vn(13,"Enter")))){n.input.lastIOSEnter=0;return}if(!p)if(r&&a instanceof De&&!a.empty&&a.$head.sameParent(a.$anchor)&&!n.composing&&!(c.sel&&c.sel.anchor!=c.sel.head))p={start:a.from,endA:a.to,endB:a.to};else{if(c.sel){let $=yu(n,n.state.doc,c.sel);if($&&!$.eq(n.state.selection)){let V=n.state.tr.setSelection($);i&&V.setMeta("composition",i),n.dispatch(V)}}return}if(tt&&n.cursorWrapper&&c.sel&&c.sel.anchor==n.cursorWrapper.deco.from&&c.sel.head==c.sel.anchor){let $=p.endB-p.start;c.sel={anchor:c.sel.anchor+$,head:c.sel.anchor+$}}n.input.domChangeCount++,n.state.selection.from<n.state.selection.to&&p.start==p.endB&&n.state.selection instanceof De&&(p.start>n.state.selection.from&&p.start<=n.state.selection.from+2&&n.state.selection.from>=c.from?p.start=n.state.selection.from:p.endA<n.state.selection.to&&p.endA>=n.state.selection.to-2&&n.state.selection.to<=c.to&&(p.endB+=n.state.selection.to-p.endA,p.endA=n.state.selection.to)),pt&&mn<=11&&p.endB==p.start+1&&p.endA==p.start&&p.start>c.from&&c.doc.textBetween(p.start-c.from-1,p.start-c.from+1)==" "&&(p.start--,p.endA--,p.endB--);let g=c.doc.resolveNoCache(p.start-c.from),y=c.doc.resolveNoCache(p.endB-c.from),S=u.resolve(p.start),k=g.sameParent(y)&&g.parent.inlineContent&&S.end()>=p.endA,C;if((or&&n.input.lastIOSEnter>Date.now()-225&&(!k||o.some($=>$.nodeName=="DIV"||$.nodeName=="P"))||!k&&g.pos<c.doc.content.size&&!g.sameParent(y)&&(C=Re.findFrom(c.doc.resolve(g.pos+1),1,!0))&&C.head==y.pos)&&n.someProp("handleKeyDown",$=>$(n,Vn(13,"Enter")))){n.input.lastIOSEnter=0;return}if(n.state.selection.anchor>p.start&&y1(u,p.start,p.endA,g,y)&&n.someProp("handleKeyDown",$=>$(n,Vn(8,"Backspace")))){zt&&tt&&n.domObserver.suppressSelectionUpdates();return}tt&&zt&&p.endB==p.start&&(n.input.lastAndroidDelete=Date.now()),zt&&!k&&g.start()!=y.start()&&y.parentOffset==0&&g.depth==y.depth&&c.sel&&c.sel.anchor==c.sel.head&&c.sel.head==p.endA&&(p.endB-=2,y=c.doc.resolveNoCache(p.endB-c.from),setTimeout(()=>{n.someProp("handleKeyDown",function($){return $(n,Vn(13,"Enter"))})},20));let b=p.start,R=p.endA,w,F,z;if(k){if(g.pos==y.pos)pt&&mn<=11&&g.parentOffset==0&&(n.domObserver.suppressSelectionUpdates(),setTimeout(()=>on(n),20)),w=n.state.tr.delete(b,R),F=u.resolve(p.start).marksAcross(u.resolve(p.endA));else if(p.endA==p.endB&&(z=g1(g.parent.content.cut(g.parentOffset,y.parentOffset),S.parent.content.cut(S.parentOffset,p.endA-S.start()))))w=n.state.tr,z.type=="add"?w.addMark(b,R,z.mark):w.removeMark(b,R,z.mark);else if(g.parent.child(g.index()).isText&&g.index()==y.index()-(y.textOffset?0:1)){let $=g.parent.textBetween(g.parentOffset,y.parentOffset);if(n.someProp("handleTextInput",V=>V(n,b,R,$)))return;w=n.state.tr.insertText($,b,R)}}if(w||(w=n.state.tr.replace(b,R,c.doc.slice(p.start-c.from,p.endB-c.from))),c.sel){let $=yu(n,w.doc,c.sel);$&&!(tt&&zt&&n.composing&&$.empty&&(p.start!=p.endB||n.input.lastAndroidDelete<Date.now()-100)&&($.head==b||$.head==w.mapping.map(R)-1)||pt&&$.empty&&$.head==b)&&w.setSelection($)}F&&w.ensureMarks(F),i&&w.setMeta("composition",i),n.dispatch(w.scrollIntoView())}function yu(n,e,t){return Math.max(t.anchor,t.head)>e.content.size?null:Os(n,e.resolve(t.anchor),e.resolve(t.head))}function g1(n,e){let t=n.firstChild.marks,r=e.firstChild.marks,o=t,i=r,s,l,a;for(let u=0;u<r.length;u++)o=r[u].removeFromSet(o);for(let u=0;u<t.length;u++)i=t[u].removeFromSet(i);if(o.length==1&&i.length==0)l=o[0],s="add",a=u=>u.mark(l.addToSet(u.marks));else if(o.length==0&&i.length==1)l=i[0],s="remove",a=u=>u.mark(l.removeFromSet(u.marks));else return null;let c=[];for(let u=0;u<e.childCount;u++)c.push(a(e.child(u)));if(oe.from(c).eq(n))return{mark:l,type:s}}function y1(n,e,t,r,o){if(!r.parent.isTextblock||t-e<=o.pos-r.pos||zs(r,!0,!1)<o.pos)return!1;let i=n.resolve(e);if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;let s=n.resolve(zs(i,!0,!0));return!s.parent.isTextblock||s.pos>t||zs(s,!0,!1)<t?!1:r.parent.content.cut(r.parentOffset).eq(s.parent.content)}function zs(n,e,t){let r=n.depth,o=e?n.end():n.pos;for(;r>0&&(e||n.indexAfter(r)==n.node(r).childCount);)r--,o++,e=!1;if(t){let i=n.node(r).maybeChild(n.indexAfter(r));for(;i&&!i.isLeaf;)i=i.firstChild,o++}return o}function v1(n,e,t,r,o){let i=n.findDiffStart(e,t);if(i==null)return null;let{a:s,b:l}=n.findDiffEnd(e,t+n.size,t+e.size);if(o=="end"){let a=Math.max(0,i-Math.min(s,l));r-=s+a-i}if(s<i&&n.size<e.size){let a=r<=i&&r>=s?i-r:0;i-=a,i&&i<e.size&&vu(e.textBetween(i-1,i+1))&&(i+=a?1:-1),l=i+(l-s),s=i}else if(l<i){let a=r<=i&&r>=l?i-r:0;i-=a,i&&i<n.size&&vu(n.textBetween(i-1,i+1))&&(i+=a?1:-1),s=i+(s-l),l=i}return{start:i,endA:s,endB:l}}function vu(n){if(n.length!=2)return!1;let e=n.charCodeAt(0),t=n.charCodeAt(1);return e>=56320&&e<=57343&&t>=55296&&t<=56319}class b1{constructor(e,t){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new $g,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(ku),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=Su(this),xu(this),this.nodeViews=Eu(this),this.docView=Mc(this.state.doc,bu(this),Vs(this),this.dom,this),this.domObserver=new c1(this,(r,o,i,s)=>m1(this,r,o,i,s)),this.domObserver.start(),Ug(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let t in e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&Rs(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(ku),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let r in this._props)t[r]=this._props[r];t.state=this.state;for(let r in e)t[r]=e[r];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){var r;let o=this.state,i=!1,s=!1;e.storedMarks&&this.composing&&(au(this),s=!0),this.state=e;let l=o.plugins!=e.plugins||this._props.plugins!=t.plugins;if(l||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let h=Eu(this);S1(h,this.nodeViews)&&(this.nodeViews=h,i=!0)}(l||t.handleDOMEvents!=this._props.handleDOMEvents)&&Rs(this),this.editable=Su(this),xu(this);let a=Vs(this),c=bu(this),u=o.plugins!=e.plugins&&!o.doc.eq(e.doc)?"reset":e.scrollToSelection>o.scrollToSelection?"to selection":"preserve",d=i||!this.docView.matchesNode(e.doc,c,a);(d||!e.selection.eq(o.selection))&&(s=!0);let f=u=="preserve"&&s&&this.dom.style.overflowAnchor==null&&tg(this);if(s){this.domObserver.stop();let h=d&&(pt||tt)&&!this.composing&&!o.selection.empty&&!e.selection.empty&&x1(o.selection,e.selection);if(d){let p=tt?this.trackWrites=this.domSelectionRange().focusNode:null;(i||!this.docView.update(e.doc,c,a,this))&&(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=Mc(e.doc,c,a,this.dom,this)),p&&!this.trackWrites&&(h=!0)}h||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&Tg(this))?on(this,h):(zc(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(o),!((r=this.dragging)===null||r===void 0)&&r.node&&!o.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,o),u=="reset"?this.dom.scrollTop=0:u=="to selection"?this.scrollToSelection():f&&ng(f)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!this.someProp("handleScrollToSelection",t=>t(this)))if(this.state.selection instanceof Se){let t=this.docView.domAfterPos(this.state.selection.from);t.nodeType==1&&gc(this,t.getBoundingClientRect(),e)}else gc(this,this.coordsAtPos(this.state.selection.head,1),e)}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let t=0;t<this.directPlugins.length;t++){let r=this.directPlugins[t];r.spec.view&&this.pluginViews.push(r.spec.view(this))}for(let t=0;t<this.state.plugins.length;t++){let r=this.state.plugins[t];r.spec.view&&this.pluginViews.push(r.spec.view(this))}}else for(let t=0;t<this.pluginViews.length;t++){let r=this.pluginViews[t];r.update&&r.update(this,e)}}updateDraggedNode(e,t){let r=e.node,o=-1;if(this.state.doc.nodeAt(r.from)==r.node)o=r.from;else{let i=r.from+(this.state.doc.content.size-t.doc.content.size);(i>0&&this.state.doc.nodeAt(i))==r.node&&(o=i)}this.dragging=new cu(e.slice,e.move,o<0?void 0:Se.create(this.state.doc,o))}someProp(e,t){let r=this._props&&this._props[e],o;if(r!=null&&(o=t?t(r):r))return o;for(let s=0;s<this.directPlugins.length;s++){let l=this.directPlugins[s].props[e];if(l!=null&&(o=t?t(l):l))return o}let i=this.state.plugins;if(i)for(let s=0;s<i.length;s++){let l=i[s].props[e];if(l!=null&&(o=t?t(l):l))return o}}hasFocus(){if(pt){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if(e.contentEditable=="false")return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&rg(this.dom),on(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let t=this.dom.parentNode;t;t=t.parentNode)if(t.nodeType==9||t.nodeType==11&&t.host)return t.getSelection||(Object.getPrototypeOf(t).getSelection=()=>t.ownerDocument.getSelection()),this._root=t}return e||document}updateRoot(){this._root=null}posAtCoords(e){return lg(this,e)}coordsAtPos(e,t=1){return Ec(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,r=-1){let o=this.docView.posFromDOM(e,t,r);if(o==null)throw new RangeError("DOM position not inside the editor");return o}endOfTextblock(e,t){return pg(this,t||this.state,e)}pasteHTML(e,t){return $r(this,"",e,!1,t||new ClipboardEvent("paste"))}pasteText(e,t){return $r(this,e,null,!0,t||new ClipboardEvent("paste"))}destroy(){this.docView&&(Hg(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Vs(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)}get isDestroyed(){return this.docView==null}dispatchEvent(e){return Wg(this,e)}dispatch(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))}domSelectionRange(){return st&&this.root.nodeType===11&&Ym(this.dom.ownerDocument)==this.dom?d1(this):this.domSelection()}domSelection(){return this.root.getSelection()}}function bu(n){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(n.editable),n.someProp("attributes",t=>{if(typeof t=="function"&&(t=t(n.state)),t)for(let r in t)r=="class"?e.class+=" "+t[r]:r=="style"?e.style=(e.style?e.style+";":"")+t[r]:!e[r]&&r!="contenteditable"&&r!="nodeName"&&(e[r]=String(t[r]))}),e.translate||(e.translate="no"),[wt.node(0,n.state.doc.content.size,e)]}function xu(n){if(n.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),n.cursorWrapper={dom:e,deco:wt.widget(n.state.selection.head,e,{raw:!0,marks:n.markCursor})}}else n.cursorWrapper=null}function Su(n){return!n.someProp("editable",e=>e(n.state)===!1)}function x1(n,e){let t=Math.min(n.$anchor.sharedDepth(n.head),e.$anchor.sharedDepth(e.head));return n.$anchor.start(t)!=e.$anchor.start(t)}function Eu(n){let e=Object.create(null);function t(r){for(let o in r)Object.prototype.hasOwnProperty.call(e,o)||(e[o]=r[o])}return n.someProp("nodeViews",t),n.someProp("markViews",t),e}function S1(n,e){let t=0,r=0;for(let o in n){if(n[o]!=e[o])return!0;t++}for(let o in e)r++;return t!=r}function ku(n){if(n.spec.state||n.spec.filterTransaction||n.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}for(var En={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:"'"},Po={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},E1=typeof navigator<"u"&&/Mac/.test(navigator.platform),k1=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),_e=0;_e<10;_e++)En[48+_e]=En[96+_e]=String(_e);for(var _e=1;_e<=24;_e++)En[_e+111]="F"+_e;for(var _e=65;_e<=90;_e++)En[_e]=String.fromCharCode(_e+32),Po[_e]=String.fromCharCode(_e);for(var $s in En)Po.hasOwnProperty($s)||(Po[$s]=En[$s]);function C1(n){var e=E1&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||k1&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?Po:En)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}const w1=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function T1(n){let e=n.split(/-(?!$)/),t=e[e.length-1];t=="Space"&&(t=" ");let r,o,i,s;for(let l=0;l<e.length-1;l++){let a=e[l];if(/^(cmd|meta|m)$/i.test(a))s=!0;else if(/^a(lt)?$/i.test(a))r=!0;else if(/^(c|ctrl|control)$/i.test(a))o=!0;else if(/^s(hift)?$/i.test(a))i=!0;else if(/^mod$/i.test(a))w1?s=!0:o=!0;else throw new Error("Unrecognized modifier name: "+a)}return r&&(t="Alt-"+t),o&&(t="Ctrl-"+t),s&&(t="Meta-"+t),i&&(t="Shift-"+t),t}function A1(n){let e=Object.create(null);for(let t in n)e[T1(t)]=n[t];return e}function Us(n,e,t=!0){return e.altKey&&(n="Alt-"+n),e.ctrlKey&&(n="Ctrl-"+n),e.metaKey&&(n="Meta-"+n),t&&e.shiftKey&&(n="Shift-"+n),n}function O1(n){return new ft({props:{handleKeyDown:M1(n)}})}function M1(n){let e=A1(n);return function(t,r){let o=C1(r),i,s=e[Us(o,r)];if(s&&s(t.state,t.dispatch,t))return!0;if(o.length==1&&o!=" "){if(r.shiftKey){let l=e[Us(o,r,!1)];if(l&&l(t.state,t.dispatch,t))return!0}if((r.shiftKey||r.altKey||r.metaKey||o.charCodeAt(0)>127)&&(i=En[r.keyCode])&&i!=o){let l=e[Us(i,r)];if(l&&l(t.state,t.dispatch,t))return!0}}return!1}}const I1=(n,e)=>n.selection.empty?!1:(e&&e(n.tr.deleteSelection().scrollIntoView()),!0);function N1(n,e){let{$cursor:t}=n.selection;return!t||(e?!e.endOfTextblock("backward",n):t.parentOffset>0)?null:t}const R1=(n,e,t)=>{let r=N1(n,t);if(!r)return!1;let o=Cu(r);if(!o){let s=r.blockRange(),l=s&&_n(s);return l==null?!1:(e&&e(n.tr.lift(s,l).scrollIntoView()),!0)}let i=o.nodeBefore;if(!i.type.spec.isolating&&Au(n,o,e))return!0;if(r.parent.content.size==0&&(cr(i,"end")||Se.isSelectable(i))){let s=us(n.doc,r.before(),r.after(),fe.empty);if(s&&s.slice.size<s.to-s.from){if(e){let l=n.tr.step(s);l.setSelection(cr(i,"end")?Re.findFrom(l.doc.resolve(l.mapping.map(o.pos,-1)),-1):Se.create(l.doc,o.pos-i.nodeSize)),e(l.scrollIntoView())}return!0}}return i.isAtom&&o.depth==r.depth-1?(e&&e(n.tr.delete(o.pos-i.nodeSize,o.pos).scrollIntoView()),!0):!1};function cr(n,e,t=!1){for(let r=n;r;r=e=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(t&&r.childCount!=1)return!1}return!1}const D1=(n,e,t)=>{let{$head:r,empty:o}=n.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(t?!t.endOfTextblock("backward",n):r.parentOffset>0)return!1;i=Cu(r)}let s=i&&i.nodeBefore;return!s||!Se.isSelectable(s)?!1:(e&&e(n.tr.setSelection(Se.create(n.doc,i.pos-s.nodeSize)).scrollIntoView()),!0)};function Cu(n){if(!n.parent.type.spec.isolating)for(let e=n.depth-1;e>=0;e--){if(n.index(e)>0)return n.doc.resolve(n.before(e+1));if(n.node(e).type.spec.isolating)break}return null}function L1(n,e){let{$cursor:t}=n.selection;return!t||(e?!e.endOfTextblock("forward",n):t.parentOffset<t.parent.content.size)?null:t}const P1=(n,e,t)=>{let r=L1(n,t);if(!r)return!1;let o=wu(r);if(!o)return!1;let i=o.nodeAfter;if(Au(n,o,e))return!0;if(r.parent.content.size==0&&(cr(i,"start")||Se.isSelectable(i))){let s=us(n.doc,r.before(),r.after(),fe.empty);if(s&&s.slice.size<s.to-s.from){if(e){let l=n.tr.step(s);l.setSelection(cr(i,"start")?Re.findFrom(l.doc.resolve(l.mapping.map(o.pos)),1):Se.create(l.doc,l.mapping.map(o.pos))),e(l.scrollIntoView())}return!0}}return i.isAtom&&o.depth==r.depth-1?(e&&e(n.tr.delete(o.pos,o.pos+i.nodeSize).scrollIntoView()),!0):!1},B1=(n,e,t)=>{let{$head:r,empty:o}=n.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(t?!t.endOfTextblock("forward",n):r.parentOffset<r.parent.content.size)return!1;i=wu(r)}let s=i&&i.nodeAfter;return!s||!Se.isSelectable(s)?!1:(e&&e(n.tr.setSelection(Se.create(n.doc,i.pos)).scrollIntoView()),!0)};function wu(n){if(!n.parent.type.spec.isolating)for(let e=n.depth-1;e>=0;e--){let t=n.node(e);if(n.index(e)+1<t.childCount)return n.doc.resolve(n.after(e+1));if(t.type.spec.isolating)break}return null}const F1=(n,e)=>{let t=n.selection,r=t instanceof Se,o;if(r){if(t.node.isTextblock||!pn(n.doc,t.from))return!1;o=t.from}else if(o=wo(n.doc,t.from,-1),o==null)return!1;if(e){let i=n.tr.join(o);r&&i.setSelection(Se.create(i.doc,o-n.doc.resolve(o).nodeBefore.nodeSize)),e(i.scrollIntoView())}return!0},V1=(n,e)=>{let t=n.selection,r;if(t instanceof Se){if(t.node.isTextblock||!pn(n.doc,t.to))return!1;r=t.to}else if(r=wo(n.doc,t.to,1),r==null)return!1;return e&&e(n.tr.join(r).scrollIntoView()),!0},z1=(n,e)=>{let{$from:t,$to:r}=n.selection,o=t.blockRange(r),i=o&&_n(o);return i==null?!1:(e&&e(n.tr.lift(o,i).scrollIntoView()),!0)},$1=(n,e)=>{let{$head:t,$anchor:r}=n.selection;return!t.parent.type.spec.code||!t.sameParent(r)?!1:(e&&e(n.tr.insertText(`
|
|
19
|
+
`).scrollIntoView()),!0)};function Tu(n){for(let e=0;e<n.edgeCount;e++){let{type:t}=n.edge(e);if(t.isTextblock&&!t.hasRequiredAttrs())return t}return null}const U1=(n,e)=>{let{$head:t,$anchor:r}=n.selection;if(!t.parent.type.spec.code||!t.sameParent(r))return!1;let o=t.node(-1),i=t.indexAfter(-1),s=Tu(o.contentMatchAt(i));if(!s||!o.canReplaceWith(i,i,s))return!1;if(e){let l=t.after(),a=n.tr.replaceWith(l,l,s.createAndFill());a.setSelection(Re.near(a.doc.resolve(l),1)),e(a.scrollIntoView())}return!0},H1=(n,e)=>{let t=n.selection,{$from:r,$to:o}=t;if(t instanceof Bt||r.parent.inlineContent||o.parent.inlineContent)return!1;let i=Tu(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(e){let s=(!r.parentOffset&&o.index()<o.parent.childCount?r:o).pos,l=n.tr.insert(s,i.createAndFill());l.setSelection(De.create(l.doc,s+1)),e(l.scrollIntoView())}return!0},j1=(n,e)=>{let{$cursor:t}=n.selection;if(!t||t.parent.content.size)return!1;if(t.depth>1&&t.after()!=t.end(-1)){let i=t.before();if(qn(n.doc,i))return e&&e(n.tr.split(i).scrollIntoView()),!0}let r=t.blockRange(),o=r&&_n(r);return o==null?!1:(e&&e(n.tr.lift(r,o).scrollIntoView()),!0)},W1=(n,e)=>{let{$from:t,to:r}=n.selection,o,i=t.sharedDepth(r);return i==0?!1:(o=t.before(i),e&&e(n.tr.setSelection(Se.create(n.doc,o))),!0)};function K1(n,e,t){let r=e.nodeBefore,o=e.nodeAfter,i=e.index();return!r||!o||!r.type.compatibleContent(o.type)?!1:!r.content.size&&e.parent.canReplace(i-1,i)?(t&&t(n.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(i,i+1)||!(o.isTextblock||pn(n.doc,e.pos))?!1:(t&&t(n.tr.clearIncompatible(e.pos,r.type,r.contentMatchAt(r.childCount)).join(e.pos).scrollIntoView()),!0)}function Au(n,e,t){let r=e.nodeBefore,o=e.nodeAfter,i,s;if(r.type.spec.isolating||o.type.spec.isolating)return!1;if(K1(n,e,t))return!0;let l=e.parent.canReplace(e.index(),e.index()+1);if(l&&(i=(s=r.contentMatchAt(r.childCount)).findWrapping(o.type))&&s.matchType(i[0]||o.type).validEnd){if(t){let d=e.pos+o.nodeSize,f=oe.empty;for(let g=i.length-1;g>=0;g--)f=oe.from(i[g].create(null,f));f=oe.from(r.copy(f));let h=n.tr.step(new Je(e.pos-1,d,e.pos,d,new fe(f,1,0),i.length,!0)),p=d+2*i.length;pn(h.doc,p)&&h.join(p),t(h.scrollIntoView())}return!0}let a=Re.findFrom(e,1),c=a&&a.$from.blockRange(a.$to),u=c&&_n(c);if(u!=null&&u>=e.depth)return t&&t(n.tr.lift(c,u).scrollIntoView()),!0;if(l&&cr(o,"start",!0)&&cr(r,"end")){let d=r,f=[];for(;f.push(d),!d.isTextblock;)d=d.lastChild;let h=o,p=1;for(;!h.isTextblock;h=h.firstChild)p++;if(d.canReplace(d.childCount,d.childCount,h.content)){if(t){let g=oe.empty;for(let S=f.length-1;S>=0;S--)g=oe.from(f[S].copy(g));let y=n.tr.step(new Je(e.pos-f.length,e.pos+o.nodeSize,e.pos+p,e.pos+o.nodeSize-p,new fe(g,f.length,0),0,!0));t(y.scrollIntoView())}return!0}}return!1}function Ou(n){return function(e,t){let r=e.selection,o=n<0?r.$from:r.$to,i=o.depth;for(;o.node(i).isInline;){if(!i)return!1;i--}return o.node(i).isTextblock?(t&&t(e.tr.setSelection(De.create(e.doc,n<0?o.start(i):o.end(i)))),!0):!1}}const G1=Ou(-1),J1=Ou(1);function Y1(n,e=null){return function(t,r){let{$from:o,$to:i}=t.selection,s=o.blockRange(i),l=s&&cs(s,n,e);return l?(r&&r(t.tr.wrap(s,l).scrollIntoView()),!0):!1}}function Mu(n,e=null){return function(t,r){let o=!1;for(let i=0;i<t.selection.ranges.length&&!o;i++){let{$from:{pos:s},$to:{pos:l}}=t.selection.ranges[i];t.doc.nodesBetween(s,l,(a,c)=>{if(o)return!1;if(!(!a.isTextblock||a.hasMarkup(n,e)))if(a.type==n)o=!0;else{let u=t.doc.resolve(c),d=u.index();o=u.parent.canReplaceWith(d,d+1,n)}})}if(!o)return!1;if(r){let i=t.tr;for(let s=0;s<t.selection.ranges.length;s++){let{$from:{pos:l},$to:{pos:a}}=t.selection.ranges[s];i.setBlockType(l,a,n,e)}r(i.scrollIntoView())}return!0}}typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function X1(n,e=null){return function(t,r){let{$from:o,$to:i}=t.selection,s=o.blockRange(i),l=!1,a=s;if(!s)return!1;if(s.depth>=2&&o.node(s.depth-1).type.compatibleContent(n)&&s.startIndex==0){if(o.index(s.depth-1)==0)return!1;let u=t.doc.resolve(s.start-2);a=new vo(u,u,s.depth),s.endIndex<s.parent.childCount&&(s=new vo(o,t.doc.resolve(i.end(s.depth)),s.depth)),l=!0}let c=cs(a,n,e,s);return c?(r&&r(Z1(t.tr,s,c,l,n).scrollIntoView()),!0):!1}}function Z1(n,e,t,r,o){let i=oe.empty;for(let u=t.length-1;u>=0;u--)i=oe.from(t[u].type.create(t[u].attrs,i));n.step(new Je(e.start-(r?2:0),e.end,e.start,e.end,new fe(i,0,0),t.length,!0));let s=0;for(let u=0;u<t.length;u++)t[u].type==o&&(s=u+1);let l=t.length-s,a=e.start+t.length-(r?2:0),c=e.parent;for(let u=e.startIndex,d=e.endIndex,f=!0;u<d;u++,f=!1)!f&&qn(n.doc,a,l)&&(n.split(a,l),a+=2*l),a+=c.child(u).nodeSize;return n}function Q1(n){return function(e,t){let{$from:r,$to:o}=e.selection,i=r.blockRange(o,s=>s.childCount>0&&s.firstChild.type==n);return i?t?r.node(i.depth-1).type==n?_1(e,t,n,i):q1(e,t,i):!0:!1}}function _1(n,e,t,r){let o=n.tr,i=r.end,s=r.$to.end(r.depth);i<s&&(o.step(new Je(i-1,s,i,s,new fe(oe.from(t.create(null,r.parent.copy())),1,0),1,!0)),r=new vo(o.doc.resolve(r.$from.pos),o.doc.resolve(s),r.depth));const l=_n(r);if(l==null)return!1;o.lift(r,l);let a=o.mapping.map(i,-1)-1;return pn(o.doc,a)&&o.join(a),e(o.scrollIntoView()),!0}function q1(n,e,t){let r=n.tr,o=t.parent;for(let h=t.end,p=t.endIndex-1,g=t.startIndex;p>g;p--)h-=o.child(p).nodeSize,r.delete(h-1,h+1);let i=r.doc.resolve(t.start),s=i.nodeAfter;if(r.mapping.map(t.end)!=t.start+i.nodeAfter.nodeSize)return!1;let l=t.startIndex==0,a=t.endIndex==o.childCount,c=i.node(-1),u=i.index(-1);if(!c.canReplace(u+(l?0:1),u+1,s.content.append(a?oe.empty:oe.from(o))))return!1;let d=i.pos,f=d+s.nodeSize;return r.step(new Je(d-(l?1:0),f+(a?1:0),d+1,f-1,new fe((l?oe.empty:oe.from(o.copy(oe.empty))).append(a?oe.empty:oe.from(o.copy(oe.empty))),l?0:1,a?0:1),l?0:1)),e(r.scrollIntoView()),!0}function e0(n){return function(e,t){let{$from:r,$to:o}=e.selection,i=r.blockRange(o,c=>c.childCount>0&&c.firstChild.type==n);if(!i)return!1;let s=i.startIndex;if(s==0)return!1;let l=i.parent,a=l.child(s-1);if(a.type!=n)return!1;if(t){let c=a.lastChild&&a.lastChild.type==l.type,u=oe.from(c?n.create():null),d=new fe(oe.from(n.create(null,oe.from(l.type.create(null,u)))),c?3:1,0),f=i.start,h=i.end;t(e.tr.step(new Je(f-(c?3:1),h,f,h,d,1,!0)).scrollIntoView())}return!0}}function Bo(n){const{state:e,transaction:t}=n;let{selection:r}=t,{doc:o}=t,{storedMarks:i}=t;return{...e,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),filterTransaction:e.filterTransaction,plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return i},get selection(){return r},get doc(){return o},get tr(){return r=t.selection,o=t.doc,i=t.storedMarks,t}}}class Fo{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:e,editor:t,state:r}=this,{view:o}=t,{tr:i}=r,s=this.buildProps(i);return Object.fromEntries(Object.entries(e).map(([l,a])=>[l,(...u)=>{const d=a(...u)(s);return!i.getMeta("preventDispatch")&&!this.hasCustomState&&o.dispatch(i),d}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){const{rawCommands:r,editor:o,state:i}=this,{view:s}=o,l=[],a=!!e,c=e||i.tr,u=()=>(!a&&t&&!c.getMeta("preventDispatch")&&!this.hasCustomState&&s.dispatch(c),l.every(f=>f===!0)),d={...Object.fromEntries(Object.entries(r).map(([f,h])=>[f,(...g)=>{const y=this.buildProps(c,t),S=h(...g)(y);return l.push(S),d}])),run:u};return d}createCan(e){const{rawCommands:t,state:r}=this,o=!1,i=e||r.tr,s=this.buildProps(i,o);return{...Object.fromEntries(Object.entries(t).map(([a,c])=>[a,(...u)=>c(...u)({...s,dispatch:void 0})])),chain:()=>this.createChain(i,o)}}buildProps(e,t=!0){const{rawCommands:r,editor:o,state:i}=this,{view:s}=o,l={tr:e,editor:o,view:s,state:Bo({state:i,transaction:e}),dispatch:t?()=>{}:void 0,chain:()=>this.createChain(e,t),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(r).map(([a,c])=>[a,(...u)=>c(...u)(l)]))}};return l}}class t0{constructor(){this.callbacks={}}on(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),this}emit(e,...t){const r=this.callbacks[e];return r&&r.forEach(o=>o.apply(this,t)),this}off(e,t){const r=this.callbacks[e];return r&&(t?this.callbacks[e]=r.filter(o=>o!==t):delete this.callbacks[e]),this}removeAllListeners(){this.callbacks={}}}function pe(n,e,t){return n.config[e]===void 0&&n.parent?pe(n.parent,e,t):typeof n.config[e]=="function"?n.config[e].bind({...t,parent:n.parent?pe(n.parent,e,t):null}):n.config[e]}function Vo(n){const e=n.filter(o=>o.type==="extension"),t=n.filter(o=>o.type==="node"),r=n.filter(o=>o.type==="mark");return{baseExtensions:e,nodeExtensions:t,markExtensions:r}}function Iu(n){const e=[],{nodeExtensions:t,markExtensions:r}=Vo(n),o=[...t,...r],i={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return n.forEach(s=>{const l={name:s.name,options:s.options,storage:s.storage},a=pe(s,"addGlobalAttributes",l);if(!a)return;a().forEach(u=>{u.types.forEach(d=>{Object.entries(u.attributes).forEach(([f,h])=>{e.push({type:d,name:f,attribute:{...i,...h}})})})})}),o.forEach(s=>{const l={name:s.name,options:s.options,storage:s.storage},a=pe(s,"addAttributes",l);if(!a)return;const c=a();Object.entries(c).forEach(([u,d])=>{const f={...i,...d};typeof(f==null?void 0:f.default)=="function"&&(f.default=f.default()),f!=null&&f.isRequired&&(f==null?void 0:f.default)===void 0&&delete f.default,e.push({type:s.name,name:u,attribute:f})})}),e}function Ye(n,e){if(typeof n=="string"){if(!e.nodes[n])throw Error(`There is no node type named '${n}'. Maybe you forgot to add the extension?`);return e.nodes[n]}return n}function ct(...n){return n.filter(e=>!!e).reduce((e,t)=>{const r={...e};return Object.entries(t).forEach(([o,i])=>{if(!r[o]){r[o]=i;return}if(o==="class"){const l=i?i.split(" "):[],a=r[o]?r[o].split(" "):[],c=l.filter(u=>!a.includes(u));r[o]=[...a,...c].join(" ")}else o==="style"?r[o]=[r[o],i].join("; "):r[o]=i}),r},{})}function Hs(n,e){return e.filter(t=>t.attribute.rendered).map(t=>t.attribute.renderHTML?t.attribute.renderHTML(n.attrs)||{}:{[t.name]:n.attrs[t.name]}).reduce((t,r)=>ct(t,r),{})}function Nu(n){return typeof n=="function"}function Ie(n,e=void 0,...t){return Nu(n)?e?n.bind(e)(...t):n(...t):n}function n0(n={}){return Object.keys(n).length===0&&n.constructor===Object}function r0(n){return typeof n!="string"?n:n.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(n):n==="true"?!0:n==="false"?!1:n}function Ru(n,e){return n.style?n:{...n,getAttrs:t=>{const r=n.getAttrs?n.getAttrs(t):n.attrs;if(r===!1)return!1;const o=e.reduce((i,s)=>{const l=s.attribute.parseHTML?s.attribute.parseHTML(t):r0(t.getAttribute(s.name));return l==null?i:{...i,[s.name]:l}},{});return{...r,...o}}}}function Du(n){return Object.fromEntries(Object.entries(n).filter(([e,t])=>e==="attrs"&&n0(t)?!1:t!=null))}function o0(n,e){var t;const r=Iu(n),{nodeExtensions:o,markExtensions:i}=Vo(n),s=(t=o.find(c=>pe(c,"topNode")))===null||t===void 0?void 0:t.name,l=Object.fromEntries(o.map(c=>{const u=r.filter(S=>S.type===c.name),d={name:c.name,options:c.options,storage:c.storage,editor:e},f=n.reduce((S,k)=>{const C=pe(k,"extendNodeSchema",d);return{...S,...C?C(c):{}}},{}),h=Du({...f,content:Ie(pe(c,"content",d)),marks:Ie(pe(c,"marks",d)),group:Ie(pe(c,"group",d)),inline:Ie(pe(c,"inline",d)),atom:Ie(pe(c,"atom",d)),selectable:Ie(pe(c,"selectable",d)),draggable:Ie(pe(c,"draggable",d)),code:Ie(pe(c,"code",d)),defining:Ie(pe(c,"defining",d)),isolating:Ie(pe(c,"isolating",d)),attrs:Object.fromEntries(u.map(S=>{var k;return[S.name,{default:(k=S==null?void 0:S.attribute)===null||k===void 0?void 0:k.default}]}))}),p=Ie(pe(c,"parseHTML",d));p&&(h.parseDOM=p.map(S=>Ru(S,u)));const g=pe(c,"renderHTML",d);g&&(h.toDOM=S=>g({node:S,HTMLAttributes:Hs(S,u)}));const y=pe(c,"renderText",d);return y&&(h.toText=y),[c.name,h]})),a=Object.fromEntries(i.map(c=>{const u=r.filter(y=>y.type===c.name),d={name:c.name,options:c.options,storage:c.storage,editor:e},f=n.reduce((y,S)=>{const k=pe(S,"extendMarkSchema",d);return{...y,...k?k(c):{}}},{}),h=Du({...f,inclusive:Ie(pe(c,"inclusive",d)),excludes:Ie(pe(c,"excludes",d)),group:Ie(pe(c,"group",d)),spanning:Ie(pe(c,"spanning",d)),code:Ie(pe(c,"code",d)),attrs:Object.fromEntries(u.map(y=>{var S;return[y.name,{default:(S=y==null?void 0:y.attribute)===null||S===void 0?void 0:S.default}]}))}),p=Ie(pe(c,"parseHTML",d));p&&(h.parseDOM=p.map(y=>Ru(y,u)));const g=pe(c,"renderHTML",d);return g&&(h.toDOM=y=>g({mark:y,HTMLAttributes:Hs(y,u)})),[c.name,h]}));return new fm({topNode:s,nodes:l,marks:a})}function js(n,e){return e.nodes[n]||e.marks[n]||null}function Lu(n,e){return Array.isArray(e)?e.some(t=>(typeof t=="string"?t:t.name)===n.name):e}const i0=(n,e=500)=>{let t="";const r=n.parentOffset;return n.parent.nodesBetween(Math.max(0,r-e),r,(o,i,s,l)=>{var a,c;const u=((c=(a=o.type.spec).toText)===null||c===void 0?void 0:c.call(a,{node:o,pos:i,parent:s,index:l}))||o.textContent||"%leaf%";t+=u.slice(0,Math.max(0,r-i))}),t};function Ws(n){return Object.prototype.toString.call(n)==="[object RegExp]"}class Pu{constructor(e){this.find=e.find,this.handler=e.handler}}const s0=(n,e)=>{if(Ws(e))return e.exec(n);const t=e(n);if(!t)return null;const r=[t.text];return r.index=t.index,r.input=n,r.data=t.data,t.replaceWith&&(t.text.includes(t.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(t.replaceWith)),r};function Ks(n){var e;const{editor:t,from:r,to:o,text:i,rules:s,plugin:l}=n,{view:a}=t;if(a.composing)return!1;const c=a.state.doc.resolve(r);if(c.parent.type.spec.code||!((e=c.nodeBefore||c.nodeAfter)===null||e===void 0)&&e.marks.find(f=>f.type.spec.code))return!1;let u=!1;const d=i0(c)+i;return s.forEach(f=>{if(u)return;const h=s0(d,f.find);if(!h)return;const p=a.state.tr,g=Bo({state:a.state,transaction:p}),y={from:r-(h[0].length-i.length),to:o},{commands:S,chain:k,can:C}=new Fo({editor:t,state:g});f.handler({state:g,range:y,match:h,commands:S,chain:k,can:C})===null||!p.steps.length||(p.setMeta(l,{transform:p,from:r,to:o,text:i}),a.dispatch(p),u=!0)}),u}function a0(n){const{editor:e,rules:t}=n,r=new ft({state:{init(){return null},apply(o,i){const s=o.getMeta(r);return s||(o.selectionSet||o.docChanged?null:i)}},props:{handleTextInput(o,i,s,l){return Ks({editor:e,from:i,to:s,text:l,rules:t,plugin:r})},handleDOMEvents:{compositionend:o=>(setTimeout(()=>{const{$cursor:i}=o.state.selection;i&&Ks({editor:e,from:i.pos,to:i.pos,text:"",rules:t,plugin:r})}),!1)},handleKeyDown(o,i){if(i.key!=="Enter")return!1;const{$cursor:s}=o.state.selection;return s?Ks({editor:e,from:s.pos,to:s.pos,text:`
|
|
20
|
+
`,rules:t,plugin:r}):!1}},isInputRules:!0});return r}function l0(n){return typeof n=="number"}class c0{constructor(e){this.find=e.find,this.handler=e.handler}}const u0=(n,e)=>{if(Ws(e))return[...n.matchAll(e)];const t=e(n);return t?t.map(r=>{const o=[r.text];return o.index=r.index,o.input=n,o.data=r.data,r.replaceWith&&(r.text.includes(r.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),o.push(r.replaceWith)),o}):[]};function d0(n){const{editor:e,state:t,from:r,to:o,rule:i,pasteEvent:s,dropEvent:l}=n,{commands:a,chain:c,can:u}=new Fo({editor:e,state:t}),d=[];return t.doc.nodesBetween(r,o,(h,p)=>{if(!h.isTextblock||h.type.spec.code)return;const g=Math.max(r,p),y=Math.min(o,p+h.content.size),S=h.textBetween(g-p,y-p,void 0,"");u0(S,i.find).forEach(C=>{if(C.index===void 0)return;const b=g+C.index+1,R=b+C[0].length,w={from:t.tr.mapping.map(b),to:t.tr.mapping.map(R)},F=i.handler({state:t,range:w,match:C,commands:a,chain:c,can:u,pasteEvent:s,dropEvent:l});d.push(F)})}),d.every(h=>h!==null)}function f0(n){const{editor:e,rules:t}=n;let r=null,o=!1,i=!1,s=new ClipboardEvent("paste"),l=new DragEvent("drop");return t.map(c=>new ft({view(u){const d=f=>{var h;r=!((h=u.dom.parentElement)===null||h===void 0)&&h.contains(f.target)?u.dom.parentElement:null};return window.addEventListener("dragstart",d),{destroy(){window.removeEventListener("dragstart",d)}}},props:{handleDOMEvents:{drop:(u,d)=>(i=r===u.dom.parentElement,l=d,!1),paste:(u,d)=>{var f;const h=(f=d.clipboardData)===null||f===void 0?void 0:f.getData("text/html");return s=d,o=!!(h!=null&&h.includes("data-pm-slice")),!1}}},appendTransaction:(u,d,f)=>{const h=u[0],p=h.getMeta("uiEvent")==="paste"&&!o,g=h.getMeta("uiEvent")==="drop"&&!i;if(!p&&!g)return;const y=d.doc.content.findDiffStart(f.doc.content),S=d.doc.content.findDiffEnd(f.doc.content);if(!l0(y)||!S||y===S.b)return;const k=f.tr,C=Bo({state:f,transaction:k});if(!(!d0({editor:e,state:C,from:Math.max(y-1,0),to:S.b-1,rule:c,pasteEvent:s,dropEvent:l})||!k.steps.length))return l=new DragEvent("drop"),s=new ClipboardEvent("paste"),k}}))}function p0(n){const e=n.filter((t,r)=>n.indexOf(t)!==r);return[...new Set(e)]}class ur{constructor(e,t){this.splittableMarks=[],this.editor=t,this.extensions=ur.resolve(e),this.schema=o0(this.extensions,t),this.extensions.forEach(r=>{var o;this.editor.extensionStorage[r.name]=r.storage;const i={name:r.name,options:r.options,storage:r.storage,editor:this.editor,type:js(r.name,this.schema)};r.type==="mark"&&(!((o=Ie(pe(r,"keepOnSplit",i)))!==null&&o!==void 0)||o)&&this.splittableMarks.push(r.name);const s=pe(r,"onBeforeCreate",i);s&&this.editor.on("beforeCreate",s);const l=pe(r,"onCreate",i);l&&this.editor.on("create",l);const a=pe(r,"onUpdate",i);a&&this.editor.on("update",a);const c=pe(r,"onSelectionUpdate",i);c&&this.editor.on("selectionUpdate",c);const u=pe(r,"onTransaction",i);u&&this.editor.on("transaction",u);const d=pe(r,"onFocus",i);d&&this.editor.on("focus",d);const f=pe(r,"onBlur",i);f&&this.editor.on("blur",f);const h=pe(r,"onDestroy",i);h&&this.editor.on("destroy",h)})}static resolve(e){const t=ur.sort(ur.flatten(e)),r=p0(t.map(o=>o.name));return r.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${r.map(o=>`'${o}'`).join(", ")}]. This can lead to issues.`),t}static flatten(e){return e.map(t=>{const r={name:t.name,options:t.options,storage:t.storage},o=pe(t,"addExtensions",r);return o?[t,...this.flatten(o())]:t}).flat(10)}static sort(e){return e.sort((r,o)=>{const i=pe(r,"priority")||100,s=pe(o,"priority")||100;return i>s?-1:i<s?1:0})}get commands(){return this.extensions.reduce((e,t)=>{const r={name:t.name,options:t.options,storage:t.storage,editor:this.editor,type:js(t.name,this.schema)},o=pe(t,"addCommands",r);return o?{...e,...o()}:e},{})}get plugins(){const{editor:e}=this,t=ur.sort([...this.extensions].reverse()),r=[],o=[],i=t.map(s=>{const l={name:s.name,options:s.options,storage:s.storage,editor:e,type:js(s.name,this.schema)},a=[],c=pe(s,"addKeyboardShortcuts",l);let u={};if(s.type==="mark"&&s.config.exitable&&(u.ArrowRight=()=>Yt.handleExit({editor:e,mark:s})),c){const g=Object.fromEntries(Object.entries(c()).map(([y,S])=>[y,()=>S({editor:e})]));u={...u,...g}}const d=O1(u);a.push(d);const f=pe(s,"addInputRules",l);Lu(s,e.options.enableInputRules)&&f&&r.push(...f());const h=pe(s,"addPasteRules",l);Lu(s,e.options.enablePasteRules)&&h&&o.push(...h());const p=pe(s,"addProseMirrorPlugins",l);if(p){const g=p();a.push(...g)}return a}).flat();return[a0({editor:e,rules:r}),...f0({editor:e,rules:o}),...i]}get attributes(){return Iu(this.extensions)}get nodeViews(){const{editor:e}=this,{nodeExtensions:t}=Vo(this.extensions);return Object.fromEntries(t.filter(r=>!!pe(r,"addNodeView")).map(r=>{const o=this.attributes.filter(a=>a.type===r.name),i={name:r.name,options:r.options,storage:r.storage,editor:e,type:Ye(r.name,this.schema)},s=pe(r,"addNodeView",i);if(!s)return[];const l=(a,c,u,d)=>{const f=Hs(a,o);return s()({editor:e,node:a,getPos:u,decorations:d,HTMLAttributes:f,extension:r})};return[r.name,l]}))}}function h0(n){return Object.prototype.toString.call(n).slice(8,-1)}function Gs(n){return h0(n)!=="Object"?!1:n.constructor===Object&&Object.getPrototypeOf(n)===Object.prototype}function zo(n,e){const t={...n};return Gs(n)&&Gs(e)&&Object.keys(e).forEach(r=>{Gs(e[r])?r in n?t[r]=zo(n[r],e[r]):Object.assign(t,{[r]:e[r]}):Object.assign(t,{[r]:e[r]})}),t}class Tt{constructor(e={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Ie(pe(this,"addOptions",{name:this.name}))),this.storage=Ie(pe(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new Tt(e)}configure(e={}){const t=this.extend();return t.options=zo(this.options,e),t.storage=Ie(pe(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){const t=new Tt(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=Ie(pe(t,"addOptions",{name:t.name})),t.storage=Ie(pe(t,"addStorage",{name:t.name,options:t.options})),t}}function Bu(n,e,t){const{from:r,to:o}=e,{blockSeparator:i=`
|
|
21
|
+
|
|
22
|
+
`,textSerializers:s={}}=t||{};let l="",a=!0;return n.nodesBetween(r,o,(c,u,d,f)=>{var h;const p=s==null?void 0:s[c.type.name];p?(c.isBlock&&!a&&(l+=i,a=!0),d&&(l+=p({node:c,pos:u,parent:d,index:f,range:e}))):c.isText?(l+=(h=c==null?void 0:c.text)===null||h===void 0?void 0:h.slice(Math.max(r,u)-u,o-u),a=!1):c.isBlock&&!a&&(l+=i,a=!0)}),l}function Fu(n){return Object.fromEntries(Object.entries(n.nodes).filter(([,e])=>e.spec.toText).map(([e,t])=>[e,t.spec.toText]))}const m0=Tt.create({name:"clipboardTextSerializer",addProseMirrorPlugins(){return[new ft({key:new Ft("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:n}=this,{state:e,schema:t}=n,{doc:r,selection:o}=e,{ranges:i}=o,s=Math.min(...i.map(u=>u.$from.pos)),l=Math.max(...i.map(u=>u.$to.pos)),a=Fu(t);return Bu(r,{from:s,to:l},{textSerializers:a})}}})]}}),g0=()=>({editor:n,view:e})=>(requestAnimationFrame(()=>{var t;n.isDestroyed||(e.dom.blur(),(t=window==null?void 0:window.getSelection())===null||t===void 0||t.removeAllRanges())}),!0),y0=(n=!1)=>({commands:e})=>e.setContent("",n),v0=()=>({state:n,tr:e,dispatch:t})=>{const{selection:r}=e,{ranges:o}=r;return t&&o.forEach(({$from:i,$to:s})=>{n.doc.nodesBetween(i.pos,s.pos,(l,a)=>{if(l.type.isText)return;const{doc:c,mapping:u}=e,d=c.resolve(u.map(a)),f=c.resolve(u.map(a+l.nodeSize)),h=d.blockRange(f);if(!h)return;const p=_n(h);if(l.type.isTextblock){const{defaultType:g}=d.parent.contentMatchAt(d.index());e.setNodeMarkup(h.start,g)}(p||p===0)&&e.lift(h,p)})}),!0},b0=n=>e=>n(e),x0=()=>({state:n,dispatch:e})=>H1(n,e),S0=(n,e)=>({editor:t,tr:r})=>{const{state:o}=t,i=o.doc.slice(n.from,n.to);r.deleteRange(n.from,n.to);const s=r.mapping.map(e);return r.insert(s,i.content),r.setSelection(new De(r.doc.resolve(s-1))),!0},E0=()=>({tr:n,dispatch:e})=>{const{selection:t}=n,r=t.$anchor.node();if(r.content.size>0)return!1;const o=n.selection.$anchor;for(let i=o.depth;i>0;i-=1)if(o.node(i).type===r.type){if(e){const l=o.before(i),a=o.after(i);n.delete(l,a).scrollIntoView()}return!0}return!1},k0=n=>({tr:e,state:t,dispatch:r})=>{const o=Ye(n,t.schema),i=e.selection.$anchor;for(let s=i.depth;s>0;s-=1)if(i.node(s).type===o){if(r){const a=i.before(s),c=i.after(s);e.delete(a,c).scrollIntoView()}return!0}return!1},C0=n=>({tr:e,dispatch:t})=>{const{from:r,to:o}=n;return t&&e.delete(r,o),!0},w0=()=>({state:n,dispatch:e})=>I1(n,e),T0=()=>({commands:n})=>n.keyboardShortcut("Enter"),A0=()=>({state:n,dispatch:e})=>U1(n,e);function $o(n,e,t={strict:!0}){const r=Object.keys(e);return r.length?r.every(o=>t.strict?e[o]===n[o]:Ws(e[o])?e[o].test(n[o]):e[o]===n[o]):!0}function Js(n,e,t={}){return n.find(r=>r.type===e&&$o(r.attrs,t))}function O0(n,e,t={}){return!!Js(n,e,t)}function Ys(n,e,t={}){if(!n||!e)return;let r=n.parent.childAfter(n.parentOffset);if(n.parentOffset===r.offset&&r.offset!==0&&(r=n.parent.childBefore(n.parentOffset)),!r.node)return;const o=Js([...r.node.marks],e,t);if(!o)return;let i=r.index,s=n.start()+r.offset,l=i+1,a=s+r.node.nodeSize;for(Js([...r.node.marks],e,t);i>0&&o.isInSet(n.parent.child(i-1).marks);)i-=1,s-=n.parent.child(i).nodeSize;for(;l<n.parent.childCount&&O0([...n.parent.child(l).marks],e,t);)a+=n.parent.child(l).nodeSize,l+=1;return{from:s,to:a}}function kn(n,e){if(typeof n=="string"){if(!e.marks[n])throw Error(`There is no mark type named '${n}'. Maybe you forgot to add the extension?`);return e.marks[n]}return n}const M0=(n,e={})=>({tr:t,state:r,dispatch:o})=>{const i=kn(n,r.schema),{doc:s,selection:l}=t,{$from:a,from:c,to:u}=l;if(o){const d=Ys(a,i,e);if(d&&d.from<=c&&d.to>=u){const f=De.create(s,d.from,d.to);t.setSelection(f)}}return!0},I0=n=>e=>{const t=typeof n=="function"?n(e):n;for(let r=0;r<t.length;r+=1)if(t[r](e))return!0;return!1};function Xs(n){return n instanceof De}function sn(n=0,e=0,t=0){return Math.min(Math.max(n,e),t)}function Vu(n,e=null){if(!e)return null;const t=Re.atStart(n),r=Re.atEnd(n);if(e==="start"||e===!0)return t;if(e==="end")return r;const o=t.from,i=r.to;return e==="all"?De.create(n,sn(0,o,i),sn(n.content.size,o,i)):De.create(n,sn(e,o,i),sn(e,o,i))}function Zs(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}const N0=(n=null,e={})=>({editor:t,view:r,tr:o,dispatch:i})=>{e={scrollIntoView:!0,...e};const s=()=>{Zs()&&r.dom.focus(),requestAnimationFrame(()=>{t.isDestroyed||(r.focus(),e!=null&&e.scrollIntoView&&t.commands.scrollIntoView())})};if(r.hasFocus()&&n===null||n===!1)return!0;if(i&&n===null&&!Xs(t.state.selection))return s(),!0;const l=Vu(o.doc,n)||t.state.selection,a=t.state.selection.eq(l);return i&&(a||o.setSelection(l),a&&o.storedMarks&&o.setStoredMarks(o.storedMarks),s()),!0},R0=(n,e)=>t=>n.every((r,o)=>e(r,{...t,index:o})),D0=(n,e)=>({tr:t,commands:r})=>r.insertContentAt({from:t.selection.from,to:t.selection.to},n,e);function zu(n){const e=`<body>${n}</body>`;return new window.DOMParser().parseFromString(e,"text/html").body}function Uo(n,e,t){if(t={slice:!0,parseOptions:{},...t},typeof n=="object"&&n!==null)try{return Array.isArray(n)&&n.length>0?oe.fromArray(n.map(r=>e.nodeFromJSON(r))):e.nodeFromJSON(n)}catch(r){return console.warn("[tiptap warn]: Invalid content.","Passed value:",n,"Error:",r),Uo("",e,t)}if(typeof n=="string"){const r=Zn.fromSchema(e);return t.slice?r.parseSlice(zu(n),t.parseOptions).content:r.parse(zu(n),t.parseOptions)}return Uo("",e,t)}function L0(n,e,t){const r=n.steps.length-1;if(r<e)return;const o=n.steps[r];if(!(o instanceof Qe||o instanceof Je))return;const i=n.mapping.maps[r];let s=0;i.forEach((l,a,c,u)=>{s===0&&(s=u)}),n.setSelection(Re.near(n.doc.resolve(s),t))}const P0=n=>n.toString().startsWith("<"),B0=(n,e,t)=>({tr:r,dispatch:o,editor:i})=>{if(o){t={parseOptions:{},updateSelection:!0,...t};const s=Uo(e,i.schema,{parseOptions:{preserveWhitespace:"full",...t.parseOptions}});if(s.toString()==="<>")return!0;let{from:l,to:a}=typeof n=="number"?{from:n,to:n}:{from:n.from,to:n.to},c=!0,u=!0;if((P0(s)?s:[s]).forEach(f=>{f.check(),c=c?f.isText&&f.marks.length===0:!1,u=u?f.isBlock:!1}),l===a&&u){const{parent:f}=r.doc.resolve(l);f.isTextblock&&!f.type.spec.code&&!f.childCount&&(l-=1,a+=1)}c?Array.isArray(e)?r.insertText(e.map(f=>f.text||"").join(""),l,a):typeof e=="object"&&e&&e.text?r.insertText(e.text,l,a):r.insertText(e,l,a):r.replaceWith(l,a,s),t.updateSelection&&L0(r,r.steps.length-1,-1)}return!0},F0=()=>({state:n,dispatch:e})=>F1(n,e),V0=()=>({state:n,dispatch:e})=>V1(n,e),z0=()=>({state:n,dispatch:e})=>R1(n,e),$0=()=>({state:n,dispatch:e})=>P1(n,e),U0=()=>({tr:n,state:e,dispatch:t})=>{try{const r=wo(e.doc,e.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},H0=()=>({state:n,dispatch:e,tr:t})=>{try{const r=wo(n.doc,n.selection.$from.pos,1);return r==null?!1:(t.join(r,2),e&&e(t),!0)}catch{return!1}};function $u(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function j0(n){const e=n.split(/-(?!$)/);let t=e[e.length-1];t==="Space"&&(t=" ");let r,o,i,s;for(let l=0;l<e.length-1;l+=1){const a=e[l];if(/^(cmd|meta|m)$/i.test(a))s=!0;else if(/^a(lt)?$/i.test(a))r=!0;else if(/^(c|ctrl|control)$/i.test(a))o=!0;else if(/^s(hift)?$/i.test(a))i=!0;else if(/^mod$/i.test(a))Zs()||$u()?s=!0:o=!0;else throw new Error(`Unrecognized modifier name: ${a}`)}return r&&(t=`Alt-${t}`),o&&(t=`Ctrl-${t}`),s&&(t=`Meta-${t}`),i&&(t=`Shift-${t}`),t}const W0=n=>({editor:e,view:t,tr:r,dispatch:o})=>{const i=j0(n).split(/-(?!$)/),s=i.find(c=>!["Alt","Ctrl","Meta","Shift"].includes(c)),l=new KeyboardEvent("keydown",{key:s==="Space"?" ":s,altKey:i.includes("Alt"),ctrlKey:i.includes("Ctrl"),metaKey:i.includes("Meta"),shiftKey:i.includes("Shift"),bubbles:!0,cancelable:!0}),a=e.captureTransaction(()=>{t.someProp("handleKeyDown",c=>c(t,l))});return a==null||a.steps.forEach(c=>{const u=c.map(r.mapping);u&&o&&r.maybeStep(u)}),!0};function Hr(n,e,t={}){const{from:r,to:o,empty:i}=n.selection,s=e?Ye(e,n.schema):null,l=[];n.doc.nodesBetween(r,o,(d,f)=>{if(d.isText)return;const h=Math.max(r,f),p=Math.min(o,f+d.nodeSize);l.push({node:d,from:h,to:p})});const a=o-r,c=l.filter(d=>s?s.name===d.node.type.name:!0).filter(d=>$o(d.node.attrs,t,{strict:!1}));return i?!!c.length:c.reduce((d,f)=>d+f.to-f.from,0)>=a}const K0=(n,e={})=>({state:t,dispatch:r})=>{const o=Ye(n,t.schema);return Hr(t,o,e)?z1(t,r):!1},G0=()=>({state:n,dispatch:e})=>j1(n,e),J0=n=>({state:e,dispatch:t})=>{const r=Ye(n,e.schema);return Q1(r)(e,t)},Y0=()=>({state:n,dispatch:e})=>$1(n,e);function Ho(n,e){return e.nodes[n]?"node":e.marks[n]?"mark":null}function Uu(n,e){const t=typeof e=="string"?[e]:e;return Object.keys(n).reduce((r,o)=>(t.includes(o)||(r[o]=n[o]),r),{})}const X0=(n,e)=>({tr:t,state:r,dispatch:o})=>{let i=null,s=null;const l=Ho(typeof n=="string"?n:n.name,r.schema);return l?(l==="node"&&(i=Ye(n,r.schema)),l==="mark"&&(s=kn(n,r.schema)),o&&t.selection.ranges.forEach(a=>{r.doc.nodesBetween(a.$from.pos,a.$to.pos,(c,u)=>{i&&i===c.type&&t.setNodeMarkup(u,void 0,Uu(c.attrs,e)),s&&c.marks.length&&c.marks.forEach(d=>{s===d.type&&t.addMark(u,u+c.nodeSize,s.create(Uu(d.attrs,e)))})})}),!0):!1},Z0=()=>({tr:n,dispatch:e})=>(e&&n.scrollIntoView(),!0),Q0=()=>({tr:n,commands:e})=>e.setTextSelection({from:0,to:n.doc.content.size}),_0=()=>({state:n,dispatch:e})=>D1(n,e),q0=()=>({state:n,dispatch:e})=>B1(n,e),ey=()=>({state:n,dispatch:e})=>W1(n,e),ty=()=>({state:n,dispatch:e})=>J1(n,e),ny=()=>({state:n,dispatch:e})=>G1(n,e);function Hu(n,e,t={}){return Uo(n,e,{slice:!1,parseOptions:t})}const ry=(n,e=!1,t={})=>({tr:r,editor:o,dispatch:i})=>{const{doc:s}=r,l=Hu(n,o.schema,t);return i&&r.replaceWith(0,s.content.size,l).setMeta("preventUpdate",!e),!0};function jo(n,e){const t=kn(e,n.schema),{from:r,to:o,empty:i}=n.selection,s=[];i?(n.storedMarks&&s.push(...n.storedMarks),s.push(...n.selection.$head.marks())):n.doc.nodesBetween(r,o,a=>{s.push(...a.marks)});const l=s.find(a=>a.type.name===t.name);return l?{...l.attrs}:{}}function oy(n,e){const t=new rc(n);return e.forEach(r=>{r.steps.forEach(o=>{t.step(o)})}),t}function iy(n){for(let e=0;e<n.edgeCount;e+=1){const{type:t}=n.edge(e);if(t.isTextblock&&!t.hasRequiredAttrs())return t}return null}function sy(n,e,t){const r=[];return n.nodesBetween(e.from,e.to,(o,i)=>{t(o)&&r.push({node:o,pos:i})}),r}function ay(n,e){for(let t=n.depth;t>0;t-=1){const r=n.node(t);if(e(r))return{pos:t>0?n.before(t):0,start:n.start(t),depth:t,node:r}}}function Qs(n){return e=>ay(e.$from,n)}function ly(n,e){const t=jt.fromSchema(e).serializeFragment(n),o=document.implementation.createHTMLDocument().createElement("div");return o.appendChild(t),o.innerHTML}function cy(n,e){const t={from:0,to:n.content.size};return Bu(n,t,e)}function uy(n,e){const t=Ye(e,n.schema),{from:r,to:o}=n.selection,i=[];n.doc.nodesBetween(r,o,l=>{i.push(l)});const s=i.reverse().find(l=>l.type.name===t.name);return s?{...s.attrs}:{}}function ju(n,e){const t=Ho(typeof e=="string"?e:e.name,n.schema);return t==="node"?uy(n,e):t==="mark"?jo(n,e):{}}function dy(n,e=JSON.stringify){const t={};return n.filter(r=>{const o=e(r);return Object.prototype.hasOwnProperty.call(t,o)?!1:t[o]=!0})}function fy(n){const e=dy(n);return e.length===1?e:e.filter((t,r)=>!e.filter((i,s)=>s!==r).some(i=>t.oldRange.from>=i.oldRange.from&&t.oldRange.to<=i.oldRange.to&&t.newRange.from>=i.newRange.from&&t.newRange.to<=i.newRange.to))}function py(n){const{mapping:e,steps:t}=n,r=[];return e.maps.forEach((o,i)=>{const s=[];if(o.ranges.length)o.forEach((l,a)=>{s.push({from:l,to:a})});else{const{from:l,to:a}=t[i];if(l===void 0||a===void 0)return;s.push({from:l,to:a})}s.forEach(({from:l,to:a})=>{const c=e.slice(i).map(l,-1),u=e.slice(i).map(a),d=e.invert().map(c,-1),f=e.invert().map(u);r.push({oldRange:{from:d,to:f},newRange:{from:c,to:u}})})}),fy(r)}function _s(n,e,t){const r=[];return n===e?t.resolve(n).marks().forEach(o=>{const i=t.resolve(n-1),s=Ys(i,o.type);s&&r.push({mark:o,...s})}):t.nodesBetween(n,e,(o,i)=>{r.push(...o.marks.map(s=>({from:i,to:i+o.nodeSize,mark:s})))}),r}function Wo(n,e,t){return Object.fromEntries(Object.entries(t).filter(([r])=>{const o=n.find(i=>i.type===e&&i.name===r);return o?o.attribute.keepOnSplit:!1}))}function qs(n,e,t={}){const{empty:r,ranges:o}=n.selection,i=e?kn(e,n.schema):null;if(r)return!!(n.storedMarks||n.selection.$from.marks()).filter(d=>i?i.name===d.type.name:!0).find(d=>$o(d.attrs,t,{strict:!1}));let s=0;const l=[];if(o.forEach(({$from:d,$to:f})=>{const h=d.pos,p=f.pos;n.doc.nodesBetween(h,p,(g,y)=>{if(!g.isText&&!g.marks.length)return;const S=Math.max(h,y),k=Math.min(p,y+g.nodeSize),C=k-S;s+=C,l.push(...g.marks.map(b=>({mark:b,from:S,to:k})))})}),s===0)return!1;const a=l.filter(d=>i?i.name===d.mark.type.name:!0).filter(d=>$o(d.mark.attrs,t,{strict:!1})).reduce((d,f)=>d+f.to-f.from,0),c=l.filter(d=>i?d.mark.type!==i&&d.mark.type.excludes(i):!0).reduce((d,f)=>d+f.to-f.from,0);return(a>0?a+c:a)>=s}function hy(n,e,t={}){if(!e)return Hr(n,null,t)||qs(n,null,t);const r=Ho(e,n.schema);return r==="node"?Hr(n,e,t):r==="mark"?qs(n,e,t):!1}function Wu(n,e){const{nodeExtensions:t}=Vo(e),r=t.find(s=>s.name===n);if(!r)return!1;const o={name:r.name,options:r.options,storage:r.storage},i=Ie(pe(r,"group",o));return typeof i!="string"?!1:i.split(" ").includes("list")}function my(n){var e;const t=(e=n.type.createAndFill())===null||e===void 0?void 0:e.toJSON(),r=n.toJSON();return JSON.stringify(t)===JSON.stringify(r)}function gy(n){return n instanceof Se}function Ku(n,e,t){const o=n.state.doc.content.size,i=sn(e,0,o),s=sn(t,0,o),l=n.coordsAtPos(i),a=n.coordsAtPos(s,-1),c=Math.min(l.top,a.top),u=Math.max(l.bottom,a.bottom),d=Math.min(l.left,a.left),f=Math.max(l.right,a.right),h=f-d,p=u-c,S={top:c,bottom:u,left:d,right:f,width:h,height:p,x:d,y:c};return{...S,toJSON:()=>S}}function yy(n,e,t){var r;const{selection:o}=e;let i=null;if(Xs(o)&&(i=o.$cursor),i){const l=(r=n.storedMarks)!==null&&r!==void 0?r:i.marks();return!!t.isInSet(l)||!l.some(a=>a.type.excludes(t))}const{ranges:s}=o;return s.some(({$from:l,$to:a})=>{let c=l.depth===0?n.doc.inlineContent&&n.doc.type.allowsMarkType(t):!1;return n.doc.nodesBetween(l.pos,a.pos,(u,d,f)=>{if(c)return!1;if(u.isInline){const h=!f||f.type.allowsMarkType(t),p=!!t.isInSet(u.marks)||!u.marks.some(g=>g.type.excludes(t));c=h&&p}return!c}),c})}const vy=(n,e={})=>({tr:t,state:r,dispatch:o})=>{const{selection:i}=t,{empty:s,ranges:l}=i,a=kn(n,r.schema);if(o)if(s){const c=jo(r,a);t.addStoredMark(a.create({...c,...e}))}else l.forEach(c=>{const u=c.$from.pos,d=c.$to.pos;r.doc.nodesBetween(u,d,(f,h)=>{const p=Math.max(h,u),g=Math.min(h+f.nodeSize,d);f.marks.find(S=>S.type===a)?f.marks.forEach(S=>{a===S.type&&t.addMark(p,g,a.create({...S.attrs,...e}))}):t.addMark(p,g,a.create(e))})});return yy(r,t,a)},by=(n,e)=>({tr:t})=>(t.setMeta(n,e),!0),xy=(n,e={})=>({state:t,dispatch:r,chain:o})=>{const i=Ye(n,t.schema);return i.isTextblock?o().command(({commands:s})=>Mu(i,e)(t)?!0:s.clearNodes()).command(({state:s})=>Mu(i,e)(s,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},Sy=n=>({tr:e,dispatch:t})=>{if(t){const{doc:r}=e,o=sn(n,0,r.content.size),i=Se.create(r,o);e.setSelection(i)}return!0},Ey=n=>({tr:e,dispatch:t})=>{if(t){const{doc:r}=e,{from:o,to:i}=typeof n=="number"?{from:n,to:n}:n,s=De.atStart(r).from,l=De.atEnd(r).to,a=sn(o,s,l),c=sn(i,s,l),u=De.create(r,a,c);e.setSelection(u)}return!0},ky=n=>({state:e,dispatch:t})=>{const r=Ye(n,e.schema);return e0(r)(e,t)};function Gu(n,e){const t=n.storedMarks||n.selection.$to.parentOffset&&n.selection.$from.marks();if(t){const r=t.filter(o=>e==null?void 0:e.includes(o.type.name));n.tr.ensureMarks(r)}}const Cy=({keepMarks:n=!0}={})=>({tr:e,state:t,dispatch:r,editor:o})=>{const{selection:i,doc:s}=e,{$from:l,$to:a}=i,c=o.extensionManager.attributes,u=Wo(c,l.node().type.name,l.node().attrs);if(i instanceof Se&&i.node.isBlock)return!l.parentOffset||!qn(s,l.pos)?!1:(r&&(n&&Gu(t,o.extensionManager.splittableMarks),e.split(l.pos).scrollIntoView()),!0);if(!l.parent.isBlock)return!1;if(r){const d=a.parentOffset===a.parent.content.size;i instanceof De&&e.deleteSelection();const f=l.depth===0?void 0:iy(l.node(-1).contentMatchAt(l.indexAfter(-1)));let h=d&&f?[{type:f,attrs:u}]:void 0,p=qn(e.doc,e.mapping.map(l.pos),1,h);if(!h&&!p&&qn(e.doc,e.mapping.map(l.pos),1,f?[{type:f}]:void 0)&&(p=!0,h=f?[{type:f,attrs:u}]:void 0),p&&(e.split(e.mapping.map(l.pos),1,h),f&&!d&&!l.parentOffset&&l.parent.type!==f)){const g=e.mapping.map(l.before()),y=e.doc.resolve(g);l.node(-1).canReplaceWith(y.index(),y.index()+1,f)&&e.setNodeMarkup(e.mapping.map(l.before()),f)}n&&Gu(t,o.extensionManager.splittableMarks),e.scrollIntoView()}return!0},wy=n=>({tr:e,state:t,dispatch:r,editor:o})=>{var i;const s=Ye(n,t.schema),{$from:l,$to:a}=t.selection,c=t.selection.node;if(c&&c.isBlock||l.depth<2||!l.sameParent(a))return!1;const u=l.node(-1);if(u.type!==s)return!1;const d=o.extensionManager.attributes;if(l.parent.content.size===0&&l.node(-1).childCount===l.indexAfter(-1)){if(l.depth===2||l.node(-3).type!==s||l.index(-2)!==l.node(-2).childCount-1)return!1;if(r){let y=oe.empty;const S=l.index(-1)?1:l.index(-2)?2:3;for(let F=l.depth-S;F>=l.depth-3;F-=1)y=oe.from(l.node(F).copy(y));const k=l.indexAfter(-1)<l.node(-2).childCount?1:l.indexAfter(-2)<l.node(-3).childCount?2:3,C=Wo(d,l.node().type.name,l.node().attrs),b=((i=s.contentMatch.defaultType)===null||i===void 0?void 0:i.createAndFill(C))||void 0;y=y.append(oe.from(s.createAndFill(null,b)||void 0));const R=l.before(l.depth-(S-1));e.replace(R,l.after(-k),new fe(y,4-S,0));let w=-1;e.doc.nodesBetween(R,e.doc.content.size,(F,z)=>{if(w>-1)return!1;F.isTextblock&&F.content.size===0&&(w=z+1)}),w>-1&&e.setSelection(De.near(e.doc.resolve(w))),e.scrollIntoView()}return!0}const f=a.pos===l.end()?u.contentMatchAt(0).defaultType:null,h=Wo(d,u.type.name,u.attrs),p=Wo(d,l.node().type.name,l.node().attrs);e.delete(l.pos,a.pos);const g=f?[{type:s,attrs:h},{type:f,attrs:p}]:[{type:s,attrs:h}];if(!qn(e.doc,l.pos,2))return!1;if(r){const{selection:y,storedMarks:S}=t,{splittableMarks:k}=o.extensionManager,C=S||y.$to.parentOffset&&y.$from.marks();if(e.split(l.pos,2,g).scrollIntoView(),!C||!r)return!0;const b=C.filter(R=>k.includes(R.type.name));e.ensureMarks(b)}return!0},ea=(n,e)=>{const t=Qs(s=>s.type===e)(n.selection);if(!t)return!0;const r=n.doc.resolve(Math.max(0,t.pos-1)).before(t.depth);if(r===void 0)return!0;const o=n.doc.nodeAt(r);return t.node.type===(o==null?void 0:o.type)&&pn(n.doc,t.pos)&&n.join(t.pos),!0},ta=(n,e)=>{const t=Qs(s=>s.type===e)(n.selection);if(!t)return!0;const r=n.doc.resolve(t.start).after(t.depth);if(r===void 0)return!0;const o=n.doc.nodeAt(r);return t.node.type===(o==null?void 0:o.type)&&pn(n.doc,r)&&n.join(r),!0};var Ty=Object.freeze({__proto__:null,blur:g0,clearContent:y0,clearNodes:v0,command:b0,createParagraphNear:x0,cut:S0,deleteCurrentNode:E0,deleteNode:k0,deleteRange:C0,deleteSelection:w0,enter:T0,exitCode:A0,extendMarkRange:M0,first:I0,focus:N0,forEach:R0,insertContent:D0,insertContentAt:B0,joinUp:F0,joinDown:V0,joinBackward:z0,joinForward:$0,joinItemBackward:U0,joinItemForward:H0,keyboardShortcut:W0,lift:K0,liftEmptyBlock:G0,liftListItem:J0,newlineInCode:Y0,resetAttributes:X0,scrollIntoView:Z0,selectAll:Q0,selectNodeBackward:_0,selectNodeForward:q0,selectParentNode:ey,selectTextblockEnd:ty,selectTextblockStart:ny,setContent:ry,setMark:vy,setMeta:by,setNode:xy,setNodeSelection:Sy,setTextSelection:Ey,sinkListItem:ky,splitBlock:Cy,splitListItem:wy,toggleList:(n,e,t,r={})=>({editor:o,tr:i,state:s,dispatch:l,chain:a,commands:c,can:u})=>{const{extensions:d,splittableMarks:f}=o.extensionManager,h=Ye(n,s.schema),p=Ye(e,s.schema),{selection:g,storedMarks:y}=s,{$from:S,$to:k}=g,C=S.blockRange(k),b=y||g.$to.parentOffset&&g.$from.marks();if(!C)return!1;const R=Qs(w=>Wu(w.type.name,d))(g);if(C.depth>=1&&R&&C.depth-R.depth<=1){if(R.node.type===h)return c.liftListItem(p);if(Wu(R.node.type.name,d)&&h.validContent(R.node.content)&&l)return a().command(()=>(i.setNodeMarkup(R.pos,h),!0)).command(()=>ea(i,h)).command(()=>ta(i,h)).run()}return!t||!b||!l?a().command(()=>u().wrapInList(h,r)?!0:c.clearNodes()).wrapInList(h,r).command(()=>ea(i,h)).command(()=>ta(i,h)).run():a().command(()=>{const w=u().wrapInList(h,r),F=b.filter(z=>f.includes(z.type.name));return i.ensureMarks(F),w?!0:c.clearNodes()}).wrapInList(h,r).command(()=>ea(i,h)).command(()=>ta(i,h)).run()},toggleMark:(n,e={},t={})=>({state:r,commands:o})=>{const{extendEmptyMarkRange:i=!1}=t,s=kn(n,r.schema);return qs(r,s,e)?o.unsetMark(s,{extendEmptyMarkRange:i}):o.setMark(s,e)},toggleNode:(n,e,t={})=>({state:r,commands:o})=>{const i=Ye(n,r.schema),s=Ye(e,r.schema);return Hr(r,i,t)?o.setNode(s):o.setNode(i,t)},toggleWrap:(n,e={})=>({state:t,commands:r})=>{const o=Ye(n,t.schema);return Hr(t,o,e)?r.lift(o):r.wrapIn(o,e)},undoInputRule:()=>({state:n,dispatch:e})=>{const t=n.plugins;for(let r=0;r<t.length;r+=1){const o=t[r];let i;if(o.spec.isInputRules&&(i=o.getState(n))){if(e){const s=n.tr,l=i.transform;for(let a=l.steps.length-1;a>=0;a-=1)s.step(l.steps[a].invert(l.docs[a]));if(i.text){const a=s.doc.resolve(i.from).marks();s.replaceWith(i.from,i.to,n.schema.text(i.text,a))}else s.delete(i.from,i.to)}return!0}}return!1},unsetAllMarks:()=>({tr:n,dispatch:e})=>{const{selection:t}=n,{empty:r,ranges:o}=t;return r||e&&o.forEach(i=>{n.removeMark(i.$from.pos,i.$to.pos)}),!0},unsetMark:(n,e={})=>({tr:t,state:r,dispatch:o})=>{var i;const{extendEmptyMarkRange:s=!1}=e,{selection:l}=t,a=kn(n,r.schema),{$from:c,empty:u,ranges:d}=l;if(!o)return!0;if(u&&s){let{from:f,to:h}=l;const p=(i=c.marks().find(y=>y.type===a))===null||i===void 0?void 0:i.attrs,g=Ys(c,a,p);g&&(f=g.from,h=g.to),t.removeMark(f,h,a)}else d.forEach(f=>{t.removeMark(f.$from.pos,f.$to.pos,a)});return t.removeStoredMark(a),!0},updateAttributes:(n,e={})=>({tr:t,state:r,dispatch:o})=>{let i=null,s=null;const l=Ho(typeof n=="string"?n:n.name,r.schema);return l?(l==="node"&&(i=Ye(n,r.schema)),l==="mark"&&(s=kn(n,r.schema)),o&&t.selection.ranges.forEach(a=>{const c=a.$from.pos,u=a.$to.pos;r.doc.nodesBetween(c,u,(d,f)=>{i&&i===d.type&&t.setNodeMarkup(f,void 0,{...d.attrs,...e}),s&&d.marks.length&&d.marks.forEach(h=>{if(s===h.type){const p=Math.max(f,c),g=Math.min(f+d.nodeSize,u);t.addMark(p,g,s.create({...h.attrs,...e}))}})})}),!0):!1},wrapIn:(n,e={})=>({state:t,dispatch:r})=>{const o=Ye(n,t.schema);return Y1(o,e)(t,r)},wrapInList:(n,e={})=>({state:t,dispatch:r})=>{const o=Ye(n,t.schema);return X1(o,e)(t,r)}});const Ay=Tt.create({name:"commands",addCommands(){return{...Ty}}}),Oy=Tt.create({name:"editable",addProseMirrorPlugins(){return[new ft({key:new Ft("editable"),props:{editable:()=>this.editor.options.editable}})]}}),My=Tt.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:n}=this;return[new ft({key:new Ft("focusEvents"),props:{handleDOMEvents:{focus:(e,t)=>{n.isFocused=!0;const r=n.state.tr.setMeta("focus",{event:t}).setMeta("addToHistory",!1);return e.dispatch(r),!1},blur:(e,t)=>{n.isFocused=!1;const r=n.state.tr.setMeta("blur",{event:t}).setMeta("addToHistory",!1);return e.dispatch(r),!1}}}})]}}),Iy=Tt.create({name:"keymap",addKeyboardShortcuts(){const n=()=>this.editor.commands.first(({commands:s})=>[()=>s.undoInputRule(),()=>s.command(({tr:l})=>{const{selection:a,doc:c}=l,{empty:u,$anchor:d}=a,{pos:f,parent:h}=d,p=d.parent.isTextblock?l.doc.resolve(f-1):d,g=p.parent.type.spec.isolating,y=d.pos-d.parentOffset,S=g&&p.parent.childCount===1?y===d.pos:Re.atStart(c).from===f;return!u||!S||!h.type.isTextblock||h.textContent.length?!1:s.clearNodes()}),()=>s.deleteSelection(),()=>s.joinBackward(),()=>s.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:s})=>[()=>s.deleteSelection(),()=>s.deleteCurrentNode(),()=>s.joinForward(),()=>s.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:s})=>[()=>s.newlineInCode(),()=>s.createParagraphNear(),()=>s.liftEmptyBlock(),()=>s.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:n,"Mod-Backspace":n,"Shift-Backspace":n,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},o={...r},i={...r,"Ctrl-h":n,"Alt-Backspace":n,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return Zs()||$u()?i:o},addProseMirrorPlugins(){return[new ft({key:new Ft("clearDocument"),appendTransaction:(n,e,t)=>{if(!(n.some(p=>p.docChanged)&&!e.doc.eq(t.doc)))return;const{empty:o,from:i,to:s}=e.selection,l=Re.atStart(e.doc).from,a=Re.atEnd(e.doc).to;if(o||!(i===l&&s===a)||!(t.doc.textBetween(0,t.doc.content.size," "," ").length===0))return;const d=t.tr,f=Bo({state:t,transaction:d}),{commands:h}=new Fo({editor:this.editor,state:f});if(h.clearNodes(),!!d.steps.length)return d}})]}}),Ny=Tt.create({name:"tabindex",addProseMirrorPlugins(){return[new ft({key:new Ft("tabindex"),props:{attributes:this.editor.isEditable?{tabindex:"0"}:{}}})]}});var Ry=Object.freeze({__proto__:null,ClipboardTextSerializer:m0,Commands:Ay,Editable:Oy,FocusEvents:My,Keymap:Iy,Tabindex:Ny});const Dy=`.ProseMirror {
|
|
23
23
|
position: relative;
|
|
24
24
|
}
|
|
25
25
|
|
|
@@ -93,35 +93,35 @@ img.ProseMirror-separator {
|
|
|
93
93
|
|
|
94
94
|
.tippy-box[data-animation=fade][data-state=hidden] {
|
|
95
95
|
opacity: 0
|
|
96
|
-
}`;function
|
|
96
|
+
}`;function Ly(n,e,t){const r=document.querySelector(`style[data-tiptap-style${t?`-${t}`:""}]`);if(r!==null)return r;const o=document.createElement("style");return e&&o.setAttribute("nonce",e),o.setAttribute(`data-tiptap-style${t?`-${t}`:""}`,""),o.innerHTML=n,document.getElementsByTagName("head")[0].appendChild(o),o}let Py=class extends t0{constructor(e={}){super(),this.isFocused=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),window.setTimeout(()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}))},0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=Ly(Dy,this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},!(!this.view||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,t=!0){this.setOptions({editable:e}),t&&this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(e,t){const r=Nu(t)?t(e,[...this.state.plugins]):[...this.state.plugins,e],o=this.state.reconfigure({plugins:r});this.view.updateState(o)}unregisterPlugin(e){if(this.isDestroyed)return;const t=typeof e=="string"?`${e}$`:e.key,r=this.state.reconfigure({plugins:this.state.plugins.filter(o=>!o.key.startsWith(t))});this.view.updateState(r)}createExtensionManager(){const t=[...this.options.enableCoreExtensions?Object.values(Ry):[],...this.options.extensions].filter(r=>["extension","node","mark"].includes(r==null?void 0:r.type));this.extensionManager=new ur(t,this)}createCommandManager(){this.commandManager=new Fo({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){const e=Hu(this.options.content,this.schema,this.options.parseOptions),t=Vu(e,this.options.autofocus);this.view=new b1(this.options.element,{...this.options.editorProps,dispatchTransaction:this.dispatchTransaction.bind(this),state:rr.create({doc:e,selection:t||void 0})});const r=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(r),this.createNodeViews(),this.prependClass();const o=this.view.dom;o.editor=this}createNodeViews(){this.view.setProps({nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;const t=this.capturedTransaction;return this.capturedTransaction=null,t}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=e;return}e.steps.forEach(s=>{var l;return(l=this.capturedTransaction)===null||l===void 0?void 0:l.step(s)});return}const t=this.state.apply(e),r=!this.state.selection.eq(t.selection);this.view.updateState(t),this.emit("transaction",{editor:this,transaction:e}),r&&this.emit("selectionUpdate",{editor:this,transaction:e});const o=e.getMeta("focus"),i=e.getMeta("blur");o&&this.emit("focus",{editor:this,event:o.event,transaction:e}),i&&this.emit("blur",{editor:this,event:i.event,transaction:e}),!(!e.docChanged||e.getMeta("preventUpdate"))&&this.emit("update",{editor:this,transaction:e})}getAttributes(e){return ju(this.state,e)}isActive(e,t){const r=typeof e=="string"?e:null,o=typeof e=="string"?t:e;return hy(this.state,r,o)}getJSON(){return this.state.doc.toJSON()}getHTML(){return ly(this.state.doc.content,this.schema)}getText(e){const{blockSeparator:t=`
|
|
97
97
|
|
|
98
|
-
`,textSerializers:r={}}=e||{};return X0(this.state.doc,{blockSeparator:t,textSerializers:{...Iu(this.schema),...r}})}get isEmpty(){return ty(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){this.emit("destroy"),this.view&&this.view.destroy(),this.removeAllListeners()}get isDestroyed(){var e;return!(!((e=this.view)===null||e===void 0)&&e.docView)}};function Wo(n){return new Ou({find:n.find,handler:({state:e,range:t,match:r})=>{const o=Ie(n.getAttributes,void 0,r);if(o===!1||o===null)return null;const{tr:i}=e,s=r[r.length-1],l=r[0];if(s){const a=l.search(/\S/),c=t.from+l.indexOf(s),u=c+s.length;if(Xs(t.from,t.to,e.doc).filter(h=>h.mark.type.excluded.find(g=>g===n.type&&g!==h.mark.type)).filter(h=>h.to>c).length)return null;u<t.to&&i.delete(u,t.to),c>t.from&&i.delete(t.from+a,c);const f=t.from+a+s.length;i.addMark(t.from+a,f,n.type.create(o||{})),i.removeStoredMark(n.type)}}})}function Ko(n){return new Ou({find:n.find,handler:({state:e,range:t,match:r,chain:o})=>{const i=Ie(n.getAttributes,void 0,r)||{},s=e.tr.delete(t.from,t.to),a=s.doc.resolve(t.from).blockRange(),c=a&&ss(a,n.type,i);if(!c)return null;if(s.wrap(a,c),n.keepMarks&&n.editor){const{selection:d,storedMarks:f}=e,{splittableMarks:h}=n.editor.extensionManager,p=f||d.$to.parentOffset&&d.$from.marks();if(p){const g=p.filter(y=>h.includes(y.type.name));s.ensureMarks(g)}}if(n.keepAttributes){const d=n.type.name==="bulletList"||n.type.name==="orderedList"?"listItem":"taskList";o().updateAttributes(d,i).run()}const u=s.doc.resolve(t.from-1).nodeBefore;u&&u.type===n.type&&pn(s.doc,t.from-1)&&(!n.joinPredicate||n.joinPredicate(r,u))&&s.join(t.from-1)}})}class Yt{constructor(e={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Ie(pe(this,"addOptions",{name:this.name}))),this.storage=Ie(pe(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new Yt(e)}configure(e={}){const t=this.extend();return t.options=Vo(this.options,e),t.storage=Ie(pe(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){const t=new Yt(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=Ie(pe(t,"addOptions",{name:t.name})),t.storage=Ie(pe(t,"addStorage",{name:t.name,options:t.options})),t}static handleExit({editor:e,mark:t}){const{tr:r}=e.state,o=e.state.selection.$from;if(o.pos===o.end()){const s=o.marks();if(!!!s.find(c=>(c==null?void 0:c.type.name)===t.name))return!1;const a=s.find(c=>(c==null?void 0:c.type.name)===t.name);return a&&r.removeStoredMark(a),r.insertText(" ",o.pos),e.view.dispatch(r),!0}return!1}}class At{constructor(e={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Ie(pe(this,"addOptions",{name:this.name}))),this.storage=Ie(pe(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new At(e)}configure(e={}){const t=this.extend();return t.options=Vo(this.options,e),t.storage=Ie(pe(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){const t=new At(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=Ie(pe(t,"addOptions",{name:t.name})),t.storage=Ie(pe(t,"addStorage",{name:t.name,options:t.options})),t}}function Ur(n){return new X1({find:n.find,handler:({state:e,range:t,match:r,pasteEvent:o})=>{const i=Ie(n.getAttributes,void 0,r,o);if(i===!1||i===null)return null;const{tr:s}=e,l=r[r.length-1],a=r[0];let c=t.to;if(l){const u=a.search(/\S/),d=t.from+a.indexOf(l),f=d+l.length;if(Xs(t.from,t.to,e.doc).filter(p=>p.mark.type.excluded.find(y=>y===n.type&&y!==p.mark.type)).filter(p=>p.to>d).length)return null;f<t.to&&s.delete(f,t.to),d>t.from&&s.delete(t.from+u,d),c=t.from+u+l.length,s.addMark(t.from+u,c,n.type.create(i||{})),s.removeStoredMark(n.type)}}})}var ht="top",Ot="bottom",Mt="right",mt="left",Go="auto",jr=[ht,Ot,Mt,mt],dr="start",Wr="end",Ey="clippingParents",$u="viewport",Kr="popper",Cy="reference",Hu=jr.reduce(function(n,e){return n.concat([e+"-"+dr,e+"-"+Wr])},[]),Uu=[].concat(jr,[Go]).reduce(function(n,e){return n.concat([e,e+"-"+dr,e+"-"+Wr])},[]),ky="beforeRead",wy="read",Ty="afterRead",Ay="beforeMain",Oy="main",My="afterMain",Iy="beforeWrite",Ny="write",Ry="afterWrite",qs=[ky,wy,Ty,Ay,Oy,My,Iy,Ny,Ry];function Xt(n){return n?(n.nodeName||"").toLowerCase():null}function bt(n){if(n==null)return window;if(n.toString()!=="[object Window]"){var e=n.ownerDocument;return e&&e.defaultView||window}return n}function Wn(n){var e=bt(n).Element;return n instanceof e||n instanceof Element}function xt(n){var e=bt(n).HTMLElement;return n instanceof e||n instanceof HTMLElement}function ea(n){if(typeof ShadowRoot>"u")return!1;var e=bt(n).ShadowRoot;return n instanceof e||n instanceof ShadowRoot}function Dy(n){var e=n.state;Object.keys(e.elements).forEach(function(t){var r=e.styles[t]||{},o=e.attributes[t]||{},i=e.elements[t];!xt(i)||!Xt(i)||(Object.assign(i.style,r),Object.keys(o).forEach(function(s){var l=o[s];l===!1?i.removeAttribute(s):i.setAttribute(s,l===!0?"":l)}))})}function Ly(n){var e=n.state,t={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,t.popper),e.styles=t,e.elements.arrow&&Object.assign(e.elements.arrow.style,t.arrow),function(){Object.keys(e.elements).forEach(function(r){var o=e.elements[r],i=e.attributes[r]||{},s=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:t[r]),l=s.reduce(function(a,c){return a[c]="",a},{});!xt(o)||!Xt(o)||(Object.assign(o.style,l),Object.keys(i).forEach(function(a){o.removeAttribute(a)}))})}}const ju={name:"applyStyles",enabled:!0,phase:"write",fn:Dy,effect:Ly,requires:["computeStyles"]};function $t(n){return n.split("-")[0]}var Kn=Math.max,Jo=Math.min,fr=Math.round;function ta(){var n=navigator.userAgentData;return n!=null&&n.brands&&Array.isArray(n.brands)?n.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function Wu(){return!/^((?!chrome|android).)*safari/i.test(ta())}function pr(n,e,t){e===void 0&&(e=!1),t===void 0&&(t=!1);var r=n.getBoundingClientRect(),o=1,i=1;e&&xt(n)&&(o=n.offsetWidth>0&&fr(r.width)/n.offsetWidth||1,i=n.offsetHeight>0&&fr(r.height)/n.offsetHeight||1);var s=Wn(n)?bt(n):window,l=s.visualViewport,a=!Wu()&&t,c=(r.left+(a&&l?l.offsetLeft:0))/o,u=(r.top+(a&&l?l.offsetTop:0))/i,d=r.width/o,f=r.height/i;return{width:d,height:f,top:u,right:c+d,bottom:u+f,left:c,x:c,y:u}}function na(n){var e=pr(n),t=n.offsetWidth,r=n.offsetHeight;return Math.abs(e.width-t)<=1&&(t=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:n.offsetLeft,y:n.offsetTop,width:t,height:r}}function Ku(n,e){var t=e.getRootNode&&e.getRootNode();if(n.contains(e))return!0;if(t&&ea(t)){var r=e;do{if(r&&n.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Ht(n){return bt(n).getComputedStyle(n)}function Py(n){return["table","td","th"].indexOf(Xt(n))>=0}function kn(n){return((Wn(n)?n.ownerDocument:n.document)||window.document).documentElement}function Yo(n){return Xt(n)==="html"?n:n.assignedSlot||n.parentNode||(ea(n)?n.host:null)||kn(n)}function Gu(n){return!xt(n)||Ht(n).position==="fixed"?null:n.offsetParent}function By(n){var e=/firefox/i.test(ta()),t=/Trident/i.test(ta());if(t&&xt(n)){var r=Ht(n);if(r.position==="fixed")return null}var o=Yo(n);for(ea(o)&&(o=o.host);xt(o)&&["html","body"].indexOf(Xt(o))<0;){var i=Ht(o);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||e&&i.willChange==="filter"||e&&i.filter&&i.filter!=="none")return o;o=o.parentNode}return null}function Gr(n){for(var e=bt(n),t=Gu(n);t&&Py(t)&&Ht(t).position==="static";)t=Gu(t);return t&&(Xt(t)==="html"||Xt(t)==="body"&&Ht(t).position==="static")?e:t||By(n)||e}function ra(n){return["top","bottom"].indexOf(n)>=0?"x":"y"}function Jr(n,e,t){return Kn(n,Jo(e,t))}function Fy(n,e,t){var r=Jr(n,e,t);return r>t?t:r}function Ju(){return{top:0,right:0,bottom:0,left:0}}function Yu(n){return Object.assign({},Ju(),n)}function Xu(n,e){return e.reduce(function(t,r){return t[r]=n,t},{})}var Vy=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,Yu(typeof e!="number"?e:Xu(e,jr))};function zy(n){var e,t=n.state,r=n.name,o=n.options,i=t.elements.arrow,s=t.modifiersData.popperOffsets,l=$t(t.placement),a=ra(l),c=[mt,Mt].indexOf(l)>=0,u=c?"height":"width";if(!(!i||!s)){var d=Vy(o.padding,t),f=na(i),h=a==="y"?ht:mt,p=a==="y"?Ot:Mt,g=t.rects.reference[u]+t.rects.reference[a]-s[a]-t.rects.popper[u],y=s[a]-t.rects.reference[a],S=Gr(i),C=S?a==="y"?S.clientHeight||0:S.clientWidth||0:0,k=g/2-y/2,b=d[h],R=C-f[u]-d[p],w=C/2-f[u]/2+k,F=Jr(b,w,R),z=a;t.modifiersData[r]=(e={},e[z]=F,e.centerOffset=F-w,e)}}function $y(n){var e=n.state,t=n.options,r=t.element,o=r===void 0?"[data-popper-arrow]":r;if(o!=null&&!(typeof o=="string"&&(o=e.elements.popper.querySelector(o),!o))){if(process.env.NODE_ENV!=="production"&&(xt(o)||console.error(['Popper: "arrow" element must be an HTMLElement (not an SVGElement).',"To use an SVG arrow, wrap it in an HTMLElement that will be used as","the arrow."].join(" "))),!Ku(e.elements.popper,o)){process.env.NODE_ENV!=="production"&&console.error(['Popper: "arrow" modifier\'s `element` must be a child of the popper',"element."].join(" "));return}e.elements.arrow=o}}const Hy={name:"arrow",enabled:!0,phase:"main",fn:zy,effect:$y,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function hr(n){return n.split("-")[1]}var Uy={top:"auto",right:"auto",bottom:"auto",left:"auto"};function jy(n,e){var t=n.x,r=n.y,o=e.devicePixelRatio||1;return{x:fr(t*o)/o||0,y:fr(r*o)/o||0}}function Zu(n){var e,t=n.popper,r=n.popperRect,o=n.placement,i=n.variation,s=n.offsets,l=n.position,a=n.gpuAcceleration,c=n.adaptive,u=n.roundOffsets,d=n.isFixed,f=s.x,h=f===void 0?0:f,p=s.y,g=p===void 0?0:p,y=typeof u=="function"?u({x:h,y:g}):{x:h,y:g};h=y.x,g=y.y;var S=s.hasOwnProperty("x"),C=s.hasOwnProperty("y"),k=mt,b=ht,R=window;if(c){var w=Gr(t),F="clientHeight",z="clientWidth";if(w===bt(t)&&(w=kn(t),Ht(w).position!=="static"&&l==="absolute"&&(F="scrollHeight",z="scrollWidth")),w=w,o===ht||(o===mt||o===Mt)&&i===Wr){b=Ot;var $=d&&w===R&&R.visualViewport?R.visualViewport.height:w[F];g-=$-r.height,g*=a?1:-1}if(o===mt||(o===ht||o===Ot)&&i===Wr){k=Mt;var V=d&&w===R&&R.visualViewport?R.visualViewport.width:w[z];h-=V-r.width,h*=a?1:-1}}var B=Object.assign({position:l},c&&Uy),P=u===!0?jy({x:h,y:g},bt(t)):{x:h,y:g};if(h=P.x,g=P.y,a){var U;return Object.assign({},B,(U={},U[b]=C?"0":"",U[k]=S?"0":"",U.transform=(R.devicePixelRatio||1)<=1?"translate("+h+"px, "+g+"px)":"translate3d("+h+"px, "+g+"px, 0)",U))}return Object.assign({},B,(e={},e[b]=C?g+"px":"",e[k]=S?h+"px":"",e.transform="",e))}function Wy(n){var e=n.state,t=n.options,r=t.gpuAcceleration,o=r===void 0?!0:r,i=t.adaptive,s=i===void 0?!0:i,l=t.roundOffsets,a=l===void 0?!0:l;if(process.env.NODE_ENV!=="production"){var c=Ht(e.elements.popper).transitionProperty||"";s&&["transform","top","right","bottom","left"].some(function(d){return c.indexOf(d)>=0})&&console.warn(["Popper: Detected CSS transitions on at least one of the following",'CSS properties: "transform", "top", "right", "bottom", "left".',`
|
|
98
|
+
`,textSerializers:r={}}=e||{};return cy(this.state.doc,{blockSeparator:t,textSerializers:{...Fu(this.schema),...r}})}get isEmpty(){return my(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){this.emit("destroy"),this.view&&this.view.destroy(),this.removeAllListeners()}get isDestroyed(){var e;return!(!((e=this.view)===null||e===void 0)&&e.docView)}};function Ko(n){return new Pu({find:n.find,handler:({state:e,range:t,match:r})=>{const o=Ie(n.getAttributes,void 0,r);if(o===!1||o===null)return null;const{tr:i}=e,s=r[r.length-1],l=r[0];if(s){const a=l.search(/\S/),c=t.from+l.indexOf(s),u=c+s.length;if(_s(t.from,t.to,e.doc).filter(h=>h.mark.type.excluded.find(g=>g===n.type&&g!==h.mark.type)).filter(h=>h.to>c).length)return null;u<t.to&&i.delete(u,t.to),c>t.from&&i.delete(t.from+a,c);const f=t.from+a+s.length;i.addMark(t.from+a,f,n.type.create(o||{})),i.removeStoredMark(n.type)}}})}function Go(n){return new Pu({find:n.find,handler:({state:e,range:t,match:r,chain:o})=>{const i=Ie(n.getAttributes,void 0,r)||{},s=e.tr.delete(t.from,t.to),a=s.doc.resolve(t.from).blockRange(),c=a&&cs(a,n.type,i);if(!c)return null;if(s.wrap(a,c),n.keepMarks&&n.editor){const{selection:d,storedMarks:f}=e,{splittableMarks:h}=n.editor.extensionManager,p=f||d.$to.parentOffset&&d.$from.marks();if(p){const g=p.filter(y=>h.includes(y.type.name));s.ensureMarks(g)}}if(n.keepAttributes){const d=n.type.name==="bulletList"||n.type.name==="orderedList"?"listItem":"taskList";o().updateAttributes(d,i).run()}const u=s.doc.resolve(t.from-1).nodeBefore;u&&u.type===n.type&&pn(s.doc,t.from-1)&&(!n.joinPredicate||n.joinPredicate(r,u))&&s.join(t.from-1)}})}class Yt{constructor(e={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Ie(pe(this,"addOptions",{name:this.name}))),this.storage=Ie(pe(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new Yt(e)}configure(e={}){const t=this.extend();return t.options=zo(this.options,e),t.storage=Ie(pe(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){const t=new Yt(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=Ie(pe(t,"addOptions",{name:t.name})),t.storage=Ie(pe(t,"addStorage",{name:t.name,options:t.options})),t}static handleExit({editor:e,mark:t}){const{tr:r}=e.state,o=e.state.selection.$from;if(o.pos===o.end()){const s=o.marks();if(!!!s.find(c=>(c==null?void 0:c.type.name)===t.name))return!1;const a=s.find(c=>(c==null?void 0:c.type.name)===t.name);return a&&r.removeStoredMark(a),r.insertText(" ",o.pos),e.view.dispatch(r),!0}return!1}}class At{constructor(e={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Ie(pe(this,"addOptions",{name:this.name}))),this.storage=Ie(pe(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new At(e)}configure(e={}){const t=this.extend();return t.options=zo(this.options,e),t.storage=Ie(pe(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){const t=new At(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=Ie(pe(t,"addOptions",{name:t.name})),t.storage=Ie(pe(t,"addStorage",{name:t.name,options:t.options})),t}}function jr(n){return new c0({find:n.find,handler:({state:e,range:t,match:r,pasteEvent:o})=>{const i=Ie(n.getAttributes,void 0,r,o);if(i===!1||i===null)return null;const{tr:s}=e,l=r[r.length-1],a=r[0];let c=t.to;if(l){const u=a.search(/\S/),d=t.from+a.indexOf(l),f=d+l.length;if(_s(t.from,t.to,e.doc).filter(p=>p.mark.type.excluded.find(y=>y===n.type&&y!==p.mark.type)).filter(p=>p.to>d).length)return null;f<t.to&&s.delete(f,t.to),d>t.from&&s.delete(t.from+u,d),c=t.from+u+l.length,s.addMark(t.from+u,c,n.type.create(i||{})),s.removeStoredMark(n.type)}}})}var ht="top",Ot="bottom",Mt="right",mt="left",Jo="auto",Wr=[ht,Ot,Mt,mt],dr="start",Kr="end",By="clippingParents",Ju="viewport",Gr="popper",Fy="reference",Yu=Wr.reduce(function(n,e){return n.concat([e+"-"+dr,e+"-"+Kr])},[]),Xu=[].concat(Wr,[Jo]).reduce(function(n,e){return n.concat([e,e+"-"+dr,e+"-"+Kr])},[]),Vy="beforeRead",zy="read",$y="afterRead",Uy="beforeMain",Hy="main",jy="afterMain",Wy="beforeWrite",Ky="write",Gy="afterWrite",na=[Vy,zy,$y,Uy,Hy,jy,Wy,Ky,Gy];function Xt(n){return n?(n.nodeName||"").toLowerCase():null}function bt(n){if(n==null)return window;if(n.toString()!=="[object Window]"){var e=n.ownerDocument;return e&&e.defaultView||window}return n}function Wn(n){var e=bt(n).Element;return n instanceof e||n instanceof Element}function xt(n){var e=bt(n).HTMLElement;return n instanceof e||n instanceof HTMLElement}function ra(n){if(typeof ShadowRoot>"u")return!1;var e=bt(n).ShadowRoot;return n instanceof e||n instanceof ShadowRoot}function Jy(n){var e=n.state;Object.keys(e.elements).forEach(function(t){var r=e.styles[t]||{},o=e.attributes[t]||{},i=e.elements[t];!xt(i)||!Xt(i)||(Object.assign(i.style,r),Object.keys(o).forEach(function(s){var l=o[s];l===!1?i.removeAttribute(s):i.setAttribute(s,l===!0?"":l)}))})}function Yy(n){var e=n.state,t={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,t.popper),e.styles=t,e.elements.arrow&&Object.assign(e.elements.arrow.style,t.arrow),function(){Object.keys(e.elements).forEach(function(r){var o=e.elements[r],i=e.attributes[r]||{},s=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:t[r]),l=s.reduce(function(a,c){return a[c]="",a},{});!xt(o)||!Xt(o)||(Object.assign(o.style,l),Object.keys(i).forEach(function(a){o.removeAttribute(a)}))})}}const Zu={name:"applyStyles",enabled:!0,phase:"write",fn:Jy,effect:Yy,requires:["computeStyles"]};function $t(n){return n.split("-")[0]}var Kn=Math.max,Yo=Math.min,fr=Math.round;function oa(){var n=navigator.userAgentData;return n!=null&&n.brands&&Array.isArray(n.brands)?n.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function Qu(){return!/^((?!chrome|android).)*safari/i.test(oa())}function pr(n,e,t){e===void 0&&(e=!1),t===void 0&&(t=!1);var r=n.getBoundingClientRect(),o=1,i=1;e&&xt(n)&&(o=n.offsetWidth>0&&fr(r.width)/n.offsetWidth||1,i=n.offsetHeight>0&&fr(r.height)/n.offsetHeight||1);var s=Wn(n)?bt(n):window,l=s.visualViewport,a=!Qu()&&t,c=(r.left+(a&&l?l.offsetLeft:0))/o,u=(r.top+(a&&l?l.offsetTop:0))/i,d=r.width/o,f=r.height/i;return{width:d,height:f,top:u,right:c+d,bottom:u+f,left:c,x:c,y:u}}function ia(n){var e=pr(n),t=n.offsetWidth,r=n.offsetHeight;return Math.abs(e.width-t)<=1&&(t=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:n.offsetLeft,y:n.offsetTop,width:t,height:r}}function _u(n,e){var t=e.getRootNode&&e.getRootNode();if(n.contains(e))return!0;if(t&&ra(t)){var r=e;do{if(r&&n.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Ut(n){return bt(n).getComputedStyle(n)}function Xy(n){return["table","td","th"].indexOf(Xt(n))>=0}function Cn(n){return((Wn(n)?n.ownerDocument:n.document)||window.document).documentElement}function Xo(n){return Xt(n)==="html"?n:n.assignedSlot||n.parentNode||(ra(n)?n.host:null)||Cn(n)}function qu(n){return!xt(n)||Ut(n).position==="fixed"?null:n.offsetParent}function Zy(n){var e=/firefox/i.test(oa()),t=/Trident/i.test(oa());if(t&&xt(n)){var r=Ut(n);if(r.position==="fixed")return null}var o=Xo(n);for(ra(o)&&(o=o.host);xt(o)&&["html","body"].indexOf(Xt(o))<0;){var i=Ut(o);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||e&&i.willChange==="filter"||e&&i.filter&&i.filter!=="none")return o;o=o.parentNode}return null}function Jr(n){for(var e=bt(n),t=qu(n);t&&Xy(t)&&Ut(t).position==="static";)t=qu(t);return t&&(Xt(t)==="html"||Xt(t)==="body"&&Ut(t).position==="static")?e:t||Zy(n)||e}function sa(n){return["top","bottom"].indexOf(n)>=0?"x":"y"}function Yr(n,e,t){return Kn(n,Yo(e,t))}function Qy(n,e,t){var r=Yr(n,e,t);return r>t?t:r}function ed(){return{top:0,right:0,bottom:0,left:0}}function td(n){return Object.assign({},ed(),n)}function nd(n,e){return e.reduce(function(t,r){return t[r]=n,t},{})}var _y=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,td(typeof e!="number"?e:nd(e,Wr))};function qy(n){var e,t=n.state,r=n.name,o=n.options,i=t.elements.arrow,s=t.modifiersData.popperOffsets,l=$t(t.placement),a=sa(l),c=[mt,Mt].indexOf(l)>=0,u=c?"height":"width";if(!(!i||!s)){var d=_y(o.padding,t),f=ia(i),h=a==="y"?ht:mt,p=a==="y"?Ot:Mt,g=t.rects.reference[u]+t.rects.reference[a]-s[a]-t.rects.popper[u],y=s[a]-t.rects.reference[a],S=Jr(i),k=S?a==="y"?S.clientHeight||0:S.clientWidth||0:0,C=g/2-y/2,b=d[h],R=k-f[u]-d[p],w=k/2-f[u]/2+C,F=Yr(b,w,R),z=a;t.modifiersData[r]=(e={},e[z]=F,e.centerOffset=F-w,e)}}function ev(n){var e=n.state,t=n.options,r=t.element,o=r===void 0?"[data-popper-arrow]":r;if(o!=null&&!(typeof o=="string"&&(o=e.elements.popper.querySelector(o),!o))){if(process.env.NODE_ENV!=="production"&&(xt(o)||console.error(['Popper: "arrow" element must be an HTMLElement (not an SVGElement).',"To use an SVG arrow, wrap it in an HTMLElement that will be used as","the arrow."].join(" "))),!_u(e.elements.popper,o)){process.env.NODE_ENV!=="production"&&console.error(['Popper: "arrow" modifier\'s `element` must be a child of the popper',"element."].join(" "));return}e.elements.arrow=o}}const tv={name:"arrow",enabled:!0,phase:"main",fn:qy,effect:ev,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function hr(n){return n.split("-")[1]}var nv={top:"auto",right:"auto",bottom:"auto",left:"auto"};function rv(n,e){var t=n.x,r=n.y,o=e.devicePixelRatio||1;return{x:fr(t*o)/o||0,y:fr(r*o)/o||0}}function rd(n){var e,t=n.popper,r=n.popperRect,o=n.placement,i=n.variation,s=n.offsets,l=n.position,a=n.gpuAcceleration,c=n.adaptive,u=n.roundOffsets,d=n.isFixed,f=s.x,h=f===void 0?0:f,p=s.y,g=p===void 0?0:p,y=typeof u=="function"?u({x:h,y:g}):{x:h,y:g};h=y.x,g=y.y;var S=s.hasOwnProperty("x"),k=s.hasOwnProperty("y"),C=mt,b=ht,R=window;if(c){var w=Jr(t),F="clientHeight",z="clientWidth";if(w===bt(t)&&(w=Cn(t),Ut(w).position!=="static"&&l==="absolute"&&(F="scrollHeight",z="scrollWidth")),w=w,o===ht||(o===mt||o===Mt)&&i===Kr){b=Ot;var $=d&&w===R&&R.visualViewport?R.visualViewport.height:w[F];g-=$-r.height,g*=a?1:-1}if(o===mt||(o===ht||o===Ot)&&i===Kr){C=Mt;var V=d&&w===R&&R.visualViewport?R.visualViewport.width:w[z];h-=V-r.width,h*=a?1:-1}}var B=Object.assign({position:l},c&&nv),P=u===!0?rv({x:h,y:g},bt(t)):{x:h,y:g};if(h=P.x,g=P.y,a){var H;return Object.assign({},B,(H={},H[b]=k?"0":"",H[C]=S?"0":"",H.transform=(R.devicePixelRatio||1)<=1?"translate("+h+"px, "+g+"px)":"translate3d("+h+"px, "+g+"px, 0)",H))}return Object.assign({},B,(e={},e[b]=k?g+"px":"",e[C]=S?h+"px":"",e.transform="",e))}function ov(n){var e=n.state,t=n.options,r=t.gpuAcceleration,o=r===void 0?!0:r,i=t.adaptive,s=i===void 0?!0:i,l=t.roundOffsets,a=l===void 0?!0:l;if(process.env.NODE_ENV!=="production"){var c=Ut(e.elements.popper).transitionProperty||"";s&&["transform","top","right","bottom","left"].some(function(d){return c.indexOf(d)>=0})&&console.warn(["Popper: Detected CSS transitions on at least one of the following",'CSS properties: "transform", "top", "right", "bottom", "left".',`
|
|
99
99
|
|
|
100
100
|
`,'Disable the "computeStyles" modifier\'s `adaptive` option to allow',"for smooth transitions, or remove these properties from the CSS","transition declaration on the popper element if only transitioning","opacity or background-color for example.",`
|
|
101
101
|
|
|
102
|
-
`,"We recommend using the popper element as a wrapper around an inner","element that can have any CSS property transitioned for animations."].join(" "))}var u={placement:$t(e.placement),variation:hr(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:o,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,Zu(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:a})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,Zu(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:a})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const Ky={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Wy,data:{}};var Xo={passive:!0};function Gy(n){var e=n.state,t=n.instance,r=n.options,o=r.scroll,i=o===void 0?!0:o,s=r.resize,l=s===void 0?!0:s,a=bt(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return i&&c.forEach(function(u){u.addEventListener("scroll",t.update,Xo)}),l&&a.addEventListener("resize",t.update,Xo),function(){i&&c.forEach(function(u){u.removeEventListener("scroll",t.update,Xo)}),l&&a.removeEventListener("resize",t.update,Xo)}}const Jy={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Gy,data:{}};var Yy={left:"right",right:"left",bottom:"top",top:"bottom"};function Zo(n){return n.replace(/left|right|bottom|top/g,function(e){return Yy[e]})}var Xy={start:"end",end:"start"};function Qu(n){return n.replace(/start|end/g,function(e){return Xy[e]})}function oa(n){var e=bt(n),t=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:t,scrollTop:r}}function ia(n){return pr(kn(n)).left+oa(n).scrollLeft}function Zy(n,e){var t=bt(n),r=kn(n),o=t.visualViewport,i=r.clientWidth,s=r.clientHeight,l=0,a=0;if(o){i=o.width,s=o.height;var c=Wu();(c||!c&&e==="fixed")&&(l=o.offsetLeft,a=o.offsetTop)}return{width:i,height:s,x:l+ia(n),y:a}}function Qy(n){var e,t=kn(n),r=oa(n),o=(e=n.ownerDocument)==null?void 0:e.body,i=Kn(t.scrollWidth,t.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=Kn(t.scrollHeight,t.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),l=-r.scrollLeft+ia(n),a=-r.scrollTop;return Ht(o||t).direction==="rtl"&&(l+=Kn(t.clientWidth,o?o.clientWidth:0)-i),{width:i,height:s,x:l,y:a}}function sa(n){var e=Ht(n),t=e.overflow,r=e.overflowX,o=e.overflowY;return/auto|scroll|overlay|hidden/.test(t+o+r)}function _u(n){return["html","body","#document"].indexOf(Xt(n))>=0?n.ownerDocument.body:xt(n)&&sa(n)?n:_u(Yo(n))}function Yr(n,e){var t;e===void 0&&(e=[]);var r=_u(n),o=r===((t=n.ownerDocument)==null?void 0:t.body),i=bt(r),s=o?[i].concat(i.visualViewport||[],sa(r)?r:[]):r,l=e.concat(s);return o?l:l.concat(Yr(Yo(s)))}function aa(n){return Object.assign({},n,{left:n.x,top:n.y,right:n.x+n.width,bottom:n.y+n.height})}function _y(n,e){var t=pr(n,!1,e==="fixed");return t.top=t.top+n.clientTop,t.left=t.left+n.clientLeft,t.bottom=t.top+n.clientHeight,t.right=t.left+n.clientWidth,t.width=n.clientWidth,t.height=n.clientHeight,t.x=t.left,t.y=t.top,t}function qu(n,e,t){return e===$u?aa(Zy(n,t)):Wn(e)?_y(e,t):aa(Qy(kn(n)))}function qy(n){var e=Yr(Yo(n)),t=["absolute","fixed"].indexOf(Ht(n).position)>=0,r=t&&xt(n)?Gr(n):n;return Wn(r)?e.filter(function(o){return Wn(o)&&Ku(o,r)&&Xt(o)!=="body"}):[]}function ev(n,e,t,r){var o=e==="clippingParents"?qy(n):[].concat(e),i=[].concat(o,[t]),s=i[0],l=i.reduce(function(a,c){var u=qu(n,c,r);return a.top=Kn(u.top,a.top),a.right=Jo(u.right,a.right),a.bottom=Jo(u.bottom,a.bottom),a.left=Kn(u.left,a.left),a},qu(n,s,r));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function ed(n){var e=n.reference,t=n.element,r=n.placement,o=r?$t(r):null,i=r?hr(r):null,s=e.x+e.width/2-t.width/2,l=e.y+e.height/2-t.height/2,a;switch(o){case ht:a={x:s,y:e.y-t.height};break;case Ot:a={x:s,y:e.y+e.height};break;case Mt:a={x:e.x+e.width,y:l};break;case mt:a={x:e.x-t.width,y:l};break;default:a={x:e.x,y:e.y}}var c=o?ra(o):null;if(c!=null){var u=c==="y"?"height":"width";switch(i){case dr:a[c]=a[c]-(e[u]/2-t[u]/2);break;case Wr:a[c]=a[c]+(e[u]/2-t[u]/2);break}}return a}function Xr(n,e){e===void 0&&(e={});var t=e,r=t.placement,o=r===void 0?n.placement:r,i=t.strategy,s=i===void 0?n.strategy:i,l=t.boundary,a=l===void 0?Ey:l,c=t.rootBoundary,u=c===void 0?$u:c,d=t.elementContext,f=d===void 0?Kr:d,h=t.altBoundary,p=h===void 0?!1:h,g=t.padding,y=g===void 0?0:g,S=Yu(typeof y!="number"?y:Xu(y,jr)),C=f===Kr?Cy:Kr,k=n.rects.popper,b=n.elements[p?C:f],R=ev(Wn(b)?b:b.contextElement||kn(n.elements.popper),a,u,s),w=pr(n.elements.reference),F=ed({reference:w,element:k,strategy:"absolute",placement:o}),z=aa(Object.assign({},k,F)),$=f===Kr?z:w,V={top:R.top-$.top+S.top,bottom:$.bottom-R.bottom+S.bottom,left:R.left-$.left+S.left,right:$.right-R.right+S.right},B=n.modifiersData.offset;if(f===Kr&&B){var P=B[o];Object.keys(V).forEach(function(U){var Y=[Mt,Ot].indexOf(U)>=0?1:-1,Z=[ht,Ot].indexOf(U)>=0?"y":"x";V[U]+=P[Z]*Y})}return V}function tv(n,e){e===void 0&&(e={});var t=e,r=t.placement,o=t.boundary,i=t.rootBoundary,s=t.padding,l=t.flipVariations,a=t.allowedAutoPlacements,c=a===void 0?Uu:a,u=hr(r),d=u?l?Hu:Hu.filter(function(p){return hr(p)===u}):jr,f=d.filter(function(p){return c.indexOf(p)>=0});f.length===0&&(f=d,process.env.NODE_ENV!=="production"&&console.error(["Popper: The `allowedAutoPlacements` option did not allow any","placements. Ensure the `placement` option matches the variation","of the allowed placements.",'For example, "auto" cannot be used to allow "bottom-start".','Use "auto-start" instead.'].join(" ")));var h=f.reduce(function(p,g){return p[g]=Xr(n,{placement:g,boundary:o,rootBoundary:i,padding:s})[$t(g)],p},{});return Object.keys(h).sort(function(p,g){return h[p]-h[g]})}function nv(n){if($t(n)===Go)return[];var e=Zo(n);return[Qu(n),e,Qu(e)]}function rv(n){var e=n.state,t=n.options,r=n.name;if(!e.modifiersData[r]._skip){for(var o=t.mainAxis,i=o===void 0?!0:o,s=t.altAxis,l=s===void 0?!0:s,a=t.fallbackPlacements,c=t.padding,u=t.boundary,d=t.rootBoundary,f=t.altBoundary,h=t.flipVariations,p=h===void 0?!0:h,g=t.allowedAutoPlacements,y=e.options.placement,S=$t(y),C=S===y,k=a||(C||!p?[Zo(y)]:nv(y)),b=[y].concat(k).reduce(function(Te,ke){return Te.concat($t(ke)===Go?tv(e,{placement:ke,boundary:u,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:g}):ke)},[]),R=e.rects.reference,w=e.rects.popper,F=new Map,z=!0,$=b[0],V=0;V<b.length;V++){var B=b[V],P=$t(B),U=hr(B)===dr,Y=[ht,Ot].indexOf(P)>=0,Z=Y?"width":"height",Q=Xr(e,{placement:B,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),re=Y?U?Mt:mt:U?Ot:ht;R[Z]>w[Z]&&(re=Zo(re));var W=Zo(re),le=[];if(i&&le.push(Q[P]<=0),l&&le.push(Q[re]<=0,Q[W]<=0),le.every(function(Te){return Te})){$=B,z=!1;break}F.set(B,le)}if(z)for(var de=p?3:1,ye=function(ke){var Ae=b.find(function(ge){var A=F.get(ge);if(A)return A.slice(0,ke).every(function(M){return M})});if(Ae)return $=Ae,"break"},Ee=de;Ee>0;Ee--){var be=ye(Ee);if(be==="break")break}e.placement!==$&&(e.modifiersData[r]._skip=!0,e.placement=$,e.reset=!0)}}const ov={name:"flip",enabled:!0,phase:"main",fn:rv,requiresIfExists:["offset"],data:{_skip:!1}};function td(n,e,t){return t===void 0&&(t={x:0,y:0}),{top:n.top-e.height-t.y,right:n.right-e.width+t.x,bottom:n.bottom-e.height+t.y,left:n.left-e.width-t.x}}function nd(n){return[ht,Mt,Ot,mt].some(function(e){return n[e]>=0})}function iv(n){var e=n.state,t=n.name,r=e.rects.reference,o=e.rects.popper,i=e.modifiersData.preventOverflow,s=Xr(e,{elementContext:"reference"}),l=Xr(e,{altBoundary:!0}),a=td(s,r),c=td(l,o,i),u=nd(a),d=nd(c);e.modifiersData[t]={referenceClippingOffsets:a,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}const sv={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:iv};function av(n,e,t){var r=$t(n),o=[mt,ht].indexOf(r)>=0?-1:1,i=typeof t=="function"?t(Object.assign({},e,{placement:n})):t,s=i[0],l=i[1];return s=s||0,l=(l||0)*o,[mt,Mt].indexOf(r)>=0?{x:l,y:s}:{x:s,y:l}}function lv(n){var e=n.state,t=n.options,r=n.name,o=t.offset,i=o===void 0?[0,0]:o,s=Uu.reduce(function(u,d){return u[d]=av(d,e.rects,i),u},{}),l=s[e.placement],a=l.x,c=l.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=a,e.modifiersData.popperOffsets.y+=c),e.modifiersData[r]=s}const cv={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:lv};function uv(n){var e=n.state,t=n.name;e.modifiersData[t]=ed({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const dv={name:"popperOffsets",enabled:!0,phase:"read",fn:uv,data:{}};function fv(n){return n==="x"?"y":"x"}function pv(n){var e=n.state,t=n.options,r=n.name,o=t.mainAxis,i=o===void 0?!0:o,s=t.altAxis,l=s===void 0?!1:s,a=t.boundary,c=t.rootBoundary,u=t.altBoundary,d=t.padding,f=t.tether,h=f===void 0?!0:f,p=t.tetherOffset,g=p===void 0?0:p,y=Xr(e,{boundary:a,rootBoundary:c,padding:d,altBoundary:u}),S=$t(e.placement),C=hr(e.placement),k=!C,b=ra(S),R=fv(b),w=e.modifiersData.popperOffsets,F=e.rects.reference,z=e.rects.popper,$=typeof g=="function"?g(Object.assign({},e.rects,{placement:e.placement})):g,V=typeof $=="number"?{mainAxis:$,altAxis:$}:Object.assign({mainAxis:0,altAxis:0},$),B=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,P={x:0,y:0};if(w){if(i){var U,Y=b==="y"?ht:mt,Z=b==="y"?Ot:Mt,Q=b==="y"?"height":"width",re=w[b],W=re+y[Y],le=re-y[Z],de=h?-z[Q]/2:0,ye=C===dr?F[Q]:z[Q],Ee=C===dr?-z[Q]:-F[Q],be=e.elements.arrow,Te=h&&be?na(be):{width:0,height:0},ke=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:Ju(),Ae=ke[Y],ge=ke[Z],A=Jr(0,F[Q],Te[Q]),M=k?F[Q]/2-de-A-Ae-V.mainAxis:ye-A-Ae-V.mainAxis,E=k?-F[Q]/2+de+A+ge+V.mainAxis:Ee+A+ge+V.mainAxis,O=e.elements.arrow&&Gr(e.elements.arrow),v=O?b==="y"?O.clientTop||0:O.clientLeft||0:0,x=(U=B==null?void 0:B[b])!=null?U:0,I=re+M-x-v,N=re+E-x,D=Jr(h?Jo(W,I):W,re,h?Kn(le,N):le);w[b]=D,P[b]=D-re}if(l){var L,H=b==="x"?ht:mt,K=b==="x"?Ot:Mt,j=w[R],G=R==="y"?"height":"width",J=j+y[H],q=j-y[K],ce=[ht,mt].indexOf(S)!==-1,me=(L=B==null?void 0:B[R])!=null?L:0,Me=ce?J:j-F[G]-z[G]-me+V.altAxis,Fe=ce?j+F[G]+z[G]-me-V.altAxis:q,Be=h&&ce?Fy(Me,j,Fe):Jr(h?Me:J,j,h?Fe:q);w[R]=Be,P[R]=Be-j}e.modifiersData[r]=P}}const hv={name:"preventOverflow",enabled:!0,phase:"main",fn:pv,requiresIfExists:["offset"]};function mv(n){return{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}}function gv(n){return n===bt(n)||!xt(n)?oa(n):mv(n)}function yv(n){var e=n.getBoundingClientRect(),t=fr(e.width)/n.offsetWidth||1,r=fr(e.height)/n.offsetHeight||1;return t!==1||r!==1}function vv(n,e,t){t===void 0&&(t=!1);var r=xt(e),o=xt(e)&&yv(e),i=kn(e),s=pr(n,o,t),l={scrollLeft:0,scrollTop:0},a={x:0,y:0};return(r||!r&&!t)&&((Xt(e)!=="body"||sa(i))&&(l=gv(e)),xt(e)?(a=pr(e,!0),a.x+=e.clientLeft,a.y+=e.clientTop):i&&(a.x=ia(i))),{x:s.left+l.scrollLeft-a.x,y:s.top+l.scrollTop-a.y,width:s.width,height:s.height}}function bv(n){var e=new Map,t=new Set,r=[];n.forEach(function(i){e.set(i.name,i)});function o(i){t.add(i.name);var s=[].concat(i.requires||[],i.requiresIfExists||[]);s.forEach(function(l){if(!t.has(l)){var a=e.get(l);a&&o(a)}}),r.push(i)}return n.forEach(function(i){t.has(i.name)||o(i)}),r}function xv(n){var e=bv(n);return qs.reduce(function(t,r){return t.concat(e.filter(function(o){return o.phase===r}))},[])}function Sv(n){var e;return function(){return e||(e=new Promise(function(t){Promise.resolve().then(function(){e=void 0,t(n())})})),e}}function wn(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r<e;r++)t[r-1]=arguments[r];return[].concat(t).reduce(function(o,i){return o.replace(/%s/,i)},n)}var Gn='Popper: modifier "%s" provided an invalid %s property, expected %s but got %s',Ev='Popper: modifier "%s" requires "%s", but "%s" modifier is not available',rd=["name","enabled","phase","fn","effect","requires","options"];function Cv(n){n.forEach(function(e){[].concat(Object.keys(e),rd).filter(function(t,r,o){return o.indexOf(t)===r}).forEach(function(t){switch(t){case"name":typeof e.name!="string"&&console.error(wn(Gn,String(e.name),'"name"','"string"','"'+String(e.name)+'"'));break;case"enabled":typeof e.enabled!="boolean"&&console.error(wn(Gn,e.name,'"enabled"','"boolean"','"'+String(e.enabled)+'"'));break;case"phase":qs.indexOf(e.phase)<0&&console.error(wn(Gn,e.name,'"phase"',"either "+qs.join(", "),'"'+String(e.phase)+'"'));break;case"fn":typeof e.fn!="function"&&console.error(wn(Gn,e.name,'"fn"','"function"','"'+String(e.fn)+'"'));break;case"effect":e.effect!=null&&typeof e.effect!="function"&&console.error(wn(Gn,e.name,'"effect"','"function"','"'+String(e.fn)+'"'));break;case"requires":e.requires!=null&&!Array.isArray(e.requires)&&console.error(wn(Gn,e.name,'"requires"','"array"','"'+String(e.requires)+'"'));break;case"requiresIfExists":Array.isArray(e.requiresIfExists)||console.error(wn(Gn,e.name,'"requiresIfExists"','"array"','"'+String(e.requiresIfExists)+'"'));break;case"options":case"data":break;default:console.error('PopperJS: an invalid property has been provided to the "'+e.name+'" modifier, valid properties are '+rd.map(function(r){return'"'+r+'"'}).join(", ")+'; but "'+t+'" was provided.')}e.requires&&e.requires.forEach(function(r){n.find(function(o){return o.name===r})==null&&console.error(wn(Ev,String(e.name),r,r))})})})}function kv(n,e){var t=new Set;return n.filter(function(r){var o=e(r);if(!t.has(o))return t.add(o),!0})}function wv(n){var e=n.reduce(function(t,r){var o=t[r.name];return t[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,t},{});return Object.keys(e).map(function(t){return e[t]})}var od="Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.",Tv="Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.",id={placement:"bottom",modifiers:[],strategy:"absolute"};function sd(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];return!e.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function Av(n){n===void 0&&(n={});var e=n,t=e.defaultModifiers,r=t===void 0?[]:t,o=e.defaultOptions,i=o===void 0?id:o;return function(l,a,c){c===void 0&&(c=i);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},id,i),modifiersData:{},elements:{reference:l,popper:a},attributes:{},styles:{}},d=[],f=!1,h={state:u,setOptions:function(S){var C=typeof S=="function"?S(u.options):S;g(),u.options=Object.assign({},i,u.options,C),u.scrollParents={reference:Wn(l)?Yr(l):l.contextElement?Yr(l.contextElement):[],popper:Yr(a)};var k=xv(wv([].concat(r,u.options.modifiers)));if(u.orderedModifiers=k.filter(function(B){return B.enabled}),process.env.NODE_ENV!=="production"){var b=kv([].concat(k,u.options.modifiers),function(B){var P=B.name;return P});if(Cv(b),$t(u.options.placement)===Go){var R=u.orderedModifiers.find(function(B){var P=B.name;return P==="flip"});R||console.error(['Popper: "auto" placements require the "flip" modifier be',"present and enabled to work."].join(" "))}var w=Ht(a),F=w.marginTop,z=w.marginRight,$=w.marginBottom,V=w.marginLeft;[F,z,$,V].some(function(B){return parseFloat(B)})&&console.warn(['Popper: CSS "margin" styles cannot be used to apply padding',"between the popper and its reference element or boundary.","To replicate margin, use the `offset` modifier, as well as","the `padding` option in the `preventOverflow` and `flip`","modifiers."].join(" "))}return p(),h.update()},forceUpdate:function(){if(!f){var S=u.elements,C=S.reference,k=S.popper;if(!sd(C,k)){process.env.NODE_ENV!=="production"&&console.error(od);return}u.rects={reference:vv(C,Gr(k),u.options.strategy==="fixed"),popper:na(k)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(B){return u.modifiersData[B.name]=Object.assign({},B.data)});for(var b=0,R=0;R<u.orderedModifiers.length;R++){if(process.env.NODE_ENV!=="production"&&(b+=1,b>100)){console.error(Tv);break}if(u.reset===!0){u.reset=!1,R=-1;continue}var w=u.orderedModifiers[R],F=w.fn,z=w.options,$=z===void 0?{}:z,V=w.name;typeof F=="function"&&(u=F({state:u,options:$,name:V,instance:h})||u)}}},update:Sv(function(){return new Promise(function(y){h.forceUpdate(),y(u)})}),destroy:function(){g(),f=!0}};if(!sd(l,a))return process.env.NODE_ENV!=="production"&&console.error(od),h;h.setOptions(c).then(function(y){!f&&c.onFirstUpdate&&c.onFirstUpdate(y)});function p(){u.orderedModifiers.forEach(function(y){var S=y.name,C=y.options,k=C===void 0?{}:C,b=y.effect;if(typeof b=="function"){var R=b({state:u,name:S,instance:h,options:k}),w=function(){};d.push(R||w)}})}function g(){d.forEach(function(y){return y()}),d=[]}return h}}var Ov=[Jy,dv,Ky,ju,cv,ov,hv,Hy,sv],Mv=Av({defaultModifiers:Ov}),Iv="tippy-box",ad="tippy-content",Nv="tippy-backdrop",ld="tippy-arrow",cd="tippy-svg-arrow",Jn={passive:!0,capture:!0},ud=function(){return document.body};function Rv(n,e){return{}.hasOwnProperty.call(n,e)}function la(n,e,t){if(Array.isArray(n)){var r=n[e];return r??(Array.isArray(t)?t[e]:t)}return n}function ca(n,e){var t={}.toString.call(n);return t.indexOf("[object")===0&&t.indexOf(e+"]")>-1}function dd(n,e){return typeof n=="function"?n.apply(void 0,e):n}function fd(n,e){if(e===0)return n;var t;return function(r){clearTimeout(t),t=setTimeout(function(){n(r)},e)}}function Dv(n,e){var t=Object.assign({},n);return e.forEach(function(r){delete t[r]}),t}function Lv(n){return n.split(/\s+/).filter(Boolean)}function mr(n){return[].concat(n)}function pd(n,e){n.indexOf(e)===-1&&n.push(e)}function Pv(n){return n.filter(function(e,t){return n.indexOf(e)===t})}function Bv(n){return n.split("-")[0]}function Qo(n){return[].slice.call(n)}function hd(n){return Object.keys(n).reduce(function(e,t){return n[t]!==void 0&&(e[t]=n[t]),e},{})}function Zr(){return document.createElement("div")}function Qr(n){return["Element","Fragment"].some(function(e){return ca(n,e)})}function Fv(n){return ca(n,"NodeList")}function Vv(n){return ca(n,"MouseEvent")}function zv(n){return!!(n&&n._tippy&&n._tippy.reference===n)}function $v(n){return Qr(n)?[n]:Fv(n)?Qo(n):Array.isArray(n)?n:Qo(document.querySelectorAll(n))}function ua(n,e){n.forEach(function(t){t&&(t.style.transitionDuration=e+"ms")})}function md(n,e){n.forEach(function(t){t&&t.setAttribute("data-state",e)})}function Hv(n){var e,t=mr(n),r=t[0];return r!=null&&(e=r.ownerDocument)!=null&&e.body?r.ownerDocument:document}function Uv(n,e){var t=e.clientX,r=e.clientY;return n.every(function(o){var i=o.popperRect,s=o.popperState,l=o.props,a=l.interactiveBorder,c=Bv(s.placement),u=s.modifiersData.offset;if(!u)return!0;var d=c==="bottom"?u.top.y:0,f=c==="top"?u.bottom.y:0,h=c==="right"?u.left.x:0,p=c==="left"?u.right.x:0,g=i.top-r+d>a,y=r-i.bottom-f>a,S=i.left-t+h>a,C=t-i.right-p>a;return g||y||S||C})}function da(n,e,t){var r=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(o){n[r](o,t)})}function gd(n,e){for(var t=e;t;){var r;if(n.contains(t))return!0;t=t.getRootNode==null||(r=t.getRootNode())==null?void 0:r.host}return!1}var Zt={isTouch:!1},yd=0;function jv(){Zt.isTouch||(Zt.isTouch=!0,window.performance&&document.addEventListener("mousemove",vd))}function vd(){var n=performance.now();n-yd<20&&(Zt.isTouch=!1,document.removeEventListener("mousemove",vd)),yd=n}function Wv(){var n=document.activeElement;if(zv(n)){var e=n._tippy;n.blur&&!e.state.isVisible&&n.blur()}}function Kv(){document.addEventListener("touchstart",jv,Jn),window.addEventListener("blur",Wv)}var Gv=typeof window<"u"&&typeof document<"u",Jv=Gv?!!window.msCrypto:!1;function gr(n){var e=n==="destroy"?"n already-":" ";return[n+"() was called on a"+e+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function bd(n){var e=/[ \t]{2,}/g,t=/^[ \t]*/gm;return n.replace(e," ").replace(t,"").trim()}function Yv(n){return bd(`
|
|
102
|
+
`,"We recommend using the popper element as a wrapper around an inner","element that can have any CSS property transitioned for animations."].join(" "))}var u={placement:$t(e.placement),variation:hr(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:o,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,rd(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:a})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,rd(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:a})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const iv={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:ov,data:{}};var Zo={passive:!0};function sv(n){var e=n.state,t=n.instance,r=n.options,o=r.scroll,i=o===void 0?!0:o,s=r.resize,l=s===void 0?!0:s,a=bt(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return i&&c.forEach(function(u){u.addEventListener("scroll",t.update,Zo)}),l&&a.addEventListener("resize",t.update,Zo),function(){i&&c.forEach(function(u){u.removeEventListener("scroll",t.update,Zo)}),l&&a.removeEventListener("resize",t.update,Zo)}}const av={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:sv,data:{}};var lv={left:"right",right:"left",bottom:"top",top:"bottom"};function Qo(n){return n.replace(/left|right|bottom|top/g,function(e){return lv[e]})}var cv={start:"end",end:"start"};function od(n){return n.replace(/start|end/g,function(e){return cv[e]})}function aa(n){var e=bt(n),t=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:t,scrollTop:r}}function la(n){return pr(Cn(n)).left+aa(n).scrollLeft}function uv(n,e){var t=bt(n),r=Cn(n),o=t.visualViewport,i=r.clientWidth,s=r.clientHeight,l=0,a=0;if(o){i=o.width,s=o.height;var c=Qu();(c||!c&&e==="fixed")&&(l=o.offsetLeft,a=o.offsetTop)}return{width:i,height:s,x:l+la(n),y:a}}function dv(n){var e,t=Cn(n),r=aa(n),o=(e=n.ownerDocument)==null?void 0:e.body,i=Kn(t.scrollWidth,t.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=Kn(t.scrollHeight,t.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),l=-r.scrollLeft+la(n),a=-r.scrollTop;return Ut(o||t).direction==="rtl"&&(l+=Kn(t.clientWidth,o?o.clientWidth:0)-i),{width:i,height:s,x:l,y:a}}function ca(n){var e=Ut(n),t=e.overflow,r=e.overflowX,o=e.overflowY;return/auto|scroll|overlay|hidden/.test(t+o+r)}function id(n){return["html","body","#document"].indexOf(Xt(n))>=0?n.ownerDocument.body:xt(n)&&ca(n)?n:id(Xo(n))}function Xr(n,e){var t;e===void 0&&(e=[]);var r=id(n),o=r===((t=n.ownerDocument)==null?void 0:t.body),i=bt(r),s=o?[i].concat(i.visualViewport||[],ca(r)?r:[]):r,l=e.concat(s);return o?l:l.concat(Xr(Xo(s)))}function ua(n){return Object.assign({},n,{left:n.x,top:n.y,right:n.x+n.width,bottom:n.y+n.height})}function fv(n,e){var t=pr(n,!1,e==="fixed");return t.top=t.top+n.clientTop,t.left=t.left+n.clientLeft,t.bottom=t.top+n.clientHeight,t.right=t.left+n.clientWidth,t.width=n.clientWidth,t.height=n.clientHeight,t.x=t.left,t.y=t.top,t}function sd(n,e,t){return e===Ju?ua(uv(n,t)):Wn(e)?fv(e,t):ua(dv(Cn(n)))}function pv(n){var e=Xr(Xo(n)),t=["absolute","fixed"].indexOf(Ut(n).position)>=0,r=t&&xt(n)?Jr(n):n;return Wn(r)?e.filter(function(o){return Wn(o)&&_u(o,r)&&Xt(o)!=="body"}):[]}function hv(n,e,t,r){var o=e==="clippingParents"?pv(n):[].concat(e),i=[].concat(o,[t]),s=i[0],l=i.reduce(function(a,c){var u=sd(n,c,r);return a.top=Kn(u.top,a.top),a.right=Yo(u.right,a.right),a.bottom=Yo(u.bottom,a.bottom),a.left=Kn(u.left,a.left),a},sd(n,s,r));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function ad(n){var e=n.reference,t=n.element,r=n.placement,o=r?$t(r):null,i=r?hr(r):null,s=e.x+e.width/2-t.width/2,l=e.y+e.height/2-t.height/2,a;switch(o){case ht:a={x:s,y:e.y-t.height};break;case Ot:a={x:s,y:e.y+e.height};break;case Mt:a={x:e.x+e.width,y:l};break;case mt:a={x:e.x-t.width,y:l};break;default:a={x:e.x,y:e.y}}var c=o?sa(o):null;if(c!=null){var u=c==="y"?"height":"width";switch(i){case dr:a[c]=a[c]-(e[u]/2-t[u]/2);break;case Kr:a[c]=a[c]+(e[u]/2-t[u]/2);break}}return a}function Zr(n,e){e===void 0&&(e={});var t=e,r=t.placement,o=r===void 0?n.placement:r,i=t.strategy,s=i===void 0?n.strategy:i,l=t.boundary,a=l===void 0?By:l,c=t.rootBoundary,u=c===void 0?Ju:c,d=t.elementContext,f=d===void 0?Gr:d,h=t.altBoundary,p=h===void 0?!1:h,g=t.padding,y=g===void 0?0:g,S=td(typeof y!="number"?y:nd(y,Wr)),k=f===Gr?Fy:Gr,C=n.rects.popper,b=n.elements[p?k:f],R=hv(Wn(b)?b:b.contextElement||Cn(n.elements.popper),a,u,s),w=pr(n.elements.reference),F=ad({reference:w,element:C,strategy:"absolute",placement:o}),z=ua(Object.assign({},C,F)),$=f===Gr?z:w,V={top:R.top-$.top+S.top,bottom:$.bottom-R.bottom+S.bottom,left:R.left-$.left+S.left,right:$.right-R.right+S.right},B=n.modifiersData.offset;if(f===Gr&&B){var P=B[o];Object.keys(V).forEach(function(H){var Y=[Mt,Ot].indexOf(H)>=0?1:-1,Z=[ht,Ot].indexOf(H)>=0?"y":"x";V[H]+=P[Z]*Y})}return V}function mv(n,e){e===void 0&&(e={});var t=e,r=t.placement,o=t.boundary,i=t.rootBoundary,s=t.padding,l=t.flipVariations,a=t.allowedAutoPlacements,c=a===void 0?Xu:a,u=hr(r),d=u?l?Yu:Yu.filter(function(p){return hr(p)===u}):Wr,f=d.filter(function(p){return c.indexOf(p)>=0});f.length===0&&(f=d,process.env.NODE_ENV!=="production"&&console.error(["Popper: The `allowedAutoPlacements` option did not allow any","placements. Ensure the `placement` option matches the variation","of the allowed placements.",'For example, "auto" cannot be used to allow "bottom-start".','Use "auto-start" instead.'].join(" ")));var h=f.reduce(function(p,g){return p[g]=Zr(n,{placement:g,boundary:o,rootBoundary:i,padding:s})[$t(g)],p},{});return Object.keys(h).sort(function(p,g){return h[p]-h[g]})}function gv(n){if($t(n)===Jo)return[];var e=Qo(n);return[od(n),e,od(e)]}function yv(n){var e=n.state,t=n.options,r=n.name;if(!e.modifiersData[r]._skip){for(var o=t.mainAxis,i=o===void 0?!0:o,s=t.altAxis,l=s===void 0?!0:s,a=t.fallbackPlacements,c=t.padding,u=t.boundary,d=t.rootBoundary,f=t.altBoundary,h=t.flipVariations,p=h===void 0?!0:h,g=t.allowedAutoPlacements,y=e.options.placement,S=$t(y),k=S===y,C=a||(k||!p?[Qo(y)]:gv(y)),b=[y].concat(C).reduce(function(Te,Ce){return Te.concat($t(Ce)===Jo?mv(e,{placement:Ce,boundary:u,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:g}):Ce)},[]),R=e.rects.reference,w=e.rects.popper,F=new Map,z=!0,$=b[0],V=0;V<b.length;V++){var B=b[V],P=$t(B),H=hr(B)===dr,Y=[ht,Ot].indexOf(P)>=0,Z=Y?"width":"height",Q=Zr(e,{placement:B,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),re=Y?H?Mt:mt:H?Ot:ht;R[Z]>w[Z]&&(re=Qo(re));var W=Qo(re),le=[];if(i&&le.push(Q[P]<=0),l&&le.push(Q[re]<=0,Q[W]<=0),le.every(function(Te){return Te})){$=B,z=!1;break}F.set(B,le)}if(z)for(var de=p?3:1,ye=function(Ce){var Ae=b.find(function(ge){var A=F.get(ge);if(A)return A.slice(0,Ce).every(function(M){return M})});if(Ae)return $=Ae,"break"},Ee=de;Ee>0;Ee--){var be=ye(Ee);if(be==="break")break}e.placement!==$&&(e.modifiersData[r]._skip=!0,e.placement=$,e.reset=!0)}}const vv={name:"flip",enabled:!0,phase:"main",fn:yv,requiresIfExists:["offset"],data:{_skip:!1}};function ld(n,e,t){return t===void 0&&(t={x:0,y:0}),{top:n.top-e.height-t.y,right:n.right-e.width+t.x,bottom:n.bottom-e.height+t.y,left:n.left-e.width-t.x}}function cd(n){return[ht,Mt,Ot,mt].some(function(e){return n[e]>=0})}function bv(n){var e=n.state,t=n.name,r=e.rects.reference,o=e.rects.popper,i=e.modifiersData.preventOverflow,s=Zr(e,{elementContext:"reference"}),l=Zr(e,{altBoundary:!0}),a=ld(s,r),c=ld(l,o,i),u=cd(a),d=cd(c);e.modifiersData[t]={referenceClippingOffsets:a,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}const xv={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:bv};function Sv(n,e,t){var r=$t(n),o=[mt,ht].indexOf(r)>=0?-1:1,i=typeof t=="function"?t(Object.assign({},e,{placement:n})):t,s=i[0],l=i[1];return s=s||0,l=(l||0)*o,[mt,Mt].indexOf(r)>=0?{x:l,y:s}:{x:s,y:l}}function Ev(n){var e=n.state,t=n.options,r=n.name,o=t.offset,i=o===void 0?[0,0]:o,s=Xu.reduce(function(u,d){return u[d]=Sv(d,e.rects,i),u},{}),l=s[e.placement],a=l.x,c=l.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=a,e.modifiersData.popperOffsets.y+=c),e.modifiersData[r]=s}const kv={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Ev};function Cv(n){var e=n.state,t=n.name;e.modifiersData[t]=ad({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const wv={name:"popperOffsets",enabled:!0,phase:"read",fn:Cv,data:{}};function Tv(n){return n==="x"?"y":"x"}function Av(n){var e=n.state,t=n.options,r=n.name,o=t.mainAxis,i=o===void 0?!0:o,s=t.altAxis,l=s===void 0?!1:s,a=t.boundary,c=t.rootBoundary,u=t.altBoundary,d=t.padding,f=t.tether,h=f===void 0?!0:f,p=t.tetherOffset,g=p===void 0?0:p,y=Zr(e,{boundary:a,rootBoundary:c,padding:d,altBoundary:u}),S=$t(e.placement),k=hr(e.placement),C=!k,b=sa(S),R=Tv(b),w=e.modifiersData.popperOffsets,F=e.rects.reference,z=e.rects.popper,$=typeof g=="function"?g(Object.assign({},e.rects,{placement:e.placement})):g,V=typeof $=="number"?{mainAxis:$,altAxis:$}:Object.assign({mainAxis:0,altAxis:0},$),B=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,P={x:0,y:0};if(w){if(i){var H,Y=b==="y"?ht:mt,Z=b==="y"?Ot:Mt,Q=b==="y"?"height":"width",re=w[b],W=re+y[Y],le=re-y[Z],de=h?-z[Q]/2:0,ye=k===dr?F[Q]:z[Q],Ee=k===dr?-z[Q]:-F[Q],be=e.elements.arrow,Te=h&&be?ia(be):{width:0,height:0},Ce=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:ed(),Ae=Ce[Y],ge=Ce[Z],A=Yr(0,F[Q],Te[Q]),M=C?F[Q]/2-de-A-Ae-V.mainAxis:ye-A-Ae-V.mainAxis,E=C?-F[Q]/2+de+A+ge+V.mainAxis:Ee+A+ge+V.mainAxis,O=e.elements.arrow&&Jr(e.elements.arrow),v=O?b==="y"?O.clientTop||0:O.clientLeft||0:0,x=(H=B==null?void 0:B[b])!=null?H:0,I=re+M-x-v,N=re+E-x,D=Yr(h?Yo(W,I):W,re,h?Kn(le,N):le);w[b]=D,P[b]=D-re}if(l){var L,U=b==="x"?ht:mt,K=b==="x"?Ot:Mt,j=w[R],G=R==="y"?"height":"width",J=j+y[U],q=j-y[K],ce=[ht,mt].indexOf(S)!==-1,me=(L=B==null?void 0:B[R])!=null?L:0,Me=ce?J:j-F[G]-z[G]-me+V.altAxis,Fe=ce?j+F[G]+z[G]-me-V.altAxis:q,Be=h&&ce?Qy(Me,j,Fe):Yr(h?Me:J,j,h?Fe:q);w[R]=Be,P[R]=Be-j}e.modifiersData[r]=P}}const Ov={name:"preventOverflow",enabled:!0,phase:"main",fn:Av,requiresIfExists:["offset"]};function Mv(n){return{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}}function Iv(n){return n===bt(n)||!xt(n)?aa(n):Mv(n)}function Nv(n){var e=n.getBoundingClientRect(),t=fr(e.width)/n.offsetWidth||1,r=fr(e.height)/n.offsetHeight||1;return t!==1||r!==1}function Rv(n,e,t){t===void 0&&(t=!1);var r=xt(e),o=xt(e)&&Nv(e),i=Cn(e),s=pr(n,o,t),l={scrollLeft:0,scrollTop:0},a={x:0,y:0};return(r||!r&&!t)&&((Xt(e)!=="body"||ca(i))&&(l=Iv(e)),xt(e)?(a=pr(e,!0),a.x+=e.clientLeft,a.y+=e.clientTop):i&&(a.x=la(i))),{x:s.left+l.scrollLeft-a.x,y:s.top+l.scrollTop-a.y,width:s.width,height:s.height}}function Dv(n){var e=new Map,t=new Set,r=[];n.forEach(function(i){e.set(i.name,i)});function o(i){t.add(i.name);var s=[].concat(i.requires||[],i.requiresIfExists||[]);s.forEach(function(l){if(!t.has(l)){var a=e.get(l);a&&o(a)}}),r.push(i)}return n.forEach(function(i){t.has(i.name)||o(i)}),r}function Lv(n){var e=Dv(n);return na.reduce(function(t,r){return t.concat(e.filter(function(o){return o.phase===r}))},[])}function Pv(n){var e;return function(){return e||(e=new Promise(function(t){Promise.resolve().then(function(){e=void 0,t(n())})})),e}}function wn(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r<e;r++)t[r-1]=arguments[r];return[].concat(t).reduce(function(o,i){return o.replace(/%s/,i)},n)}var Gn='Popper: modifier "%s" provided an invalid %s property, expected %s but got %s',Bv='Popper: modifier "%s" requires "%s", but "%s" modifier is not available',ud=["name","enabled","phase","fn","effect","requires","options"];function Fv(n){n.forEach(function(e){[].concat(Object.keys(e),ud).filter(function(t,r,o){return o.indexOf(t)===r}).forEach(function(t){switch(t){case"name":typeof e.name!="string"&&console.error(wn(Gn,String(e.name),'"name"','"string"','"'+String(e.name)+'"'));break;case"enabled":typeof e.enabled!="boolean"&&console.error(wn(Gn,e.name,'"enabled"','"boolean"','"'+String(e.enabled)+'"'));break;case"phase":na.indexOf(e.phase)<0&&console.error(wn(Gn,e.name,'"phase"',"either "+na.join(", "),'"'+String(e.phase)+'"'));break;case"fn":typeof e.fn!="function"&&console.error(wn(Gn,e.name,'"fn"','"function"','"'+String(e.fn)+'"'));break;case"effect":e.effect!=null&&typeof e.effect!="function"&&console.error(wn(Gn,e.name,'"effect"','"function"','"'+String(e.fn)+'"'));break;case"requires":e.requires!=null&&!Array.isArray(e.requires)&&console.error(wn(Gn,e.name,'"requires"','"array"','"'+String(e.requires)+'"'));break;case"requiresIfExists":Array.isArray(e.requiresIfExists)||console.error(wn(Gn,e.name,'"requiresIfExists"','"array"','"'+String(e.requiresIfExists)+'"'));break;case"options":case"data":break;default:console.error('PopperJS: an invalid property has been provided to the "'+e.name+'" modifier, valid properties are '+ud.map(function(r){return'"'+r+'"'}).join(", ")+'; but "'+t+'" was provided.')}e.requires&&e.requires.forEach(function(r){n.find(function(o){return o.name===r})==null&&console.error(wn(Bv,String(e.name),r,r))})})})}function Vv(n,e){var t=new Set;return n.filter(function(r){var o=e(r);if(!t.has(o))return t.add(o),!0})}function zv(n){var e=n.reduce(function(t,r){var o=t[r.name];return t[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,t},{});return Object.keys(e).map(function(t){return e[t]})}var dd="Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.",$v="Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.",fd={placement:"bottom",modifiers:[],strategy:"absolute"};function pd(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];return!e.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function Uv(n){n===void 0&&(n={});var e=n,t=e.defaultModifiers,r=t===void 0?[]:t,o=e.defaultOptions,i=o===void 0?fd:o;return function(l,a,c){c===void 0&&(c=i);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},fd,i),modifiersData:{},elements:{reference:l,popper:a},attributes:{},styles:{}},d=[],f=!1,h={state:u,setOptions:function(S){var k=typeof S=="function"?S(u.options):S;g(),u.options=Object.assign({},i,u.options,k),u.scrollParents={reference:Wn(l)?Xr(l):l.contextElement?Xr(l.contextElement):[],popper:Xr(a)};var C=Lv(zv([].concat(r,u.options.modifiers)));if(u.orderedModifiers=C.filter(function(B){return B.enabled}),process.env.NODE_ENV!=="production"){var b=Vv([].concat(C,u.options.modifiers),function(B){var P=B.name;return P});if(Fv(b),$t(u.options.placement)===Jo){var R=u.orderedModifiers.find(function(B){var P=B.name;return P==="flip"});R||console.error(['Popper: "auto" placements require the "flip" modifier be',"present and enabled to work."].join(" "))}var w=Ut(a),F=w.marginTop,z=w.marginRight,$=w.marginBottom,V=w.marginLeft;[F,z,$,V].some(function(B){return parseFloat(B)})&&console.warn(['Popper: CSS "margin" styles cannot be used to apply padding',"between the popper and its reference element or boundary.","To replicate margin, use the `offset` modifier, as well as","the `padding` option in the `preventOverflow` and `flip`","modifiers."].join(" "))}return p(),h.update()},forceUpdate:function(){if(!f){var S=u.elements,k=S.reference,C=S.popper;if(!pd(k,C)){process.env.NODE_ENV!=="production"&&console.error(dd);return}u.rects={reference:Rv(k,Jr(C),u.options.strategy==="fixed"),popper:ia(C)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(B){return u.modifiersData[B.name]=Object.assign({},B.data)});for(var b=0,R=0;R<u.orderedModifiers.length;R++){if(process.env.NODE_ENV!=="production"&&(b+=1,b>100)){console.error($v);break}if(u.reset===!0){u.reset=!1,R=-1;continue}var w=u.orderedModifiers[R],F=w.fn,z=w.options,$=z===void 0?{}:z,V=w.name;typeof F=="function"&&(u=F({state:u,options:$,name:V,instance:h})||u)}}},update:Pv(function(){return new Promise(function(y){h.forceUpdate(),y(u)})}),destroy:function(){g(),f=!0}};if(!pd(l,a))return process.env.NODE_ENV!=="production"&&console.error(dd),h;h.setOptions(c).then(function(y){!f&&c.onFirstUpdate&&c.onFirstUpdate(y)});function p(){u.orderedModifiers.forEach(function(y){var S=y.name,k=y.options,C=k===void 0?{}:k,b=y.effect;if(typeof b=="function"){var R=b({state:u,name:S,instance:h,options:C}),w=function(){};d.push(R||w)}})}function g(){d.forEach(function(y){return y()}),d=[]}return h}}var Hv=[av,wv,iv,Zu,kv,vv,Ov,tv,xv],jv=Uv({defaultModifiers:Hv}),Wv="tippy-box",hd="tippy-content",Kv="tippy-backdrop",md="tippy-arrow",gd="tippy-svg-arrow",Jn={passive:!0,capture:!0},yd=function(){return document.body};function Gv(n,e){return{}.hasOwnProperty.call(n,e)}function da(n,e,t){if(Array.isArray(n)){var r=n[e];return r??(Array.isArray(t)?t[e]:t)}return n}function fa(n,e){var t={}.toString.call(n);return t.indexOf("[object")===0&&t.indexOf(e+"]")>-1}function vd(n,e){return typeof n=="function"?n.apply(void 0,e):n}function bd(n,e){if(e===0)return n;var t;return function(r){clearTimeout(t),t=setTimeout(function(){n(r)},e)}}function Jv(n,e){var t=Object.assign({},n);return e.forEach(function(r){delete t[r]}),t}function Yv(n){return n.split(/\s+/).filter(Boolean)}function mr(n){return[].concat(n)}function xd(n,e){n.indexOf(e)===-1&&n.push(e)}function Xv(n){return n.filter(function(e,t){return n.indexOf(e)===t})}function Zv(n){return n.split("-")[0]}function _o(n){return[].slice.call(n)}function Sd(n){return Object.keys(n).reduce(function(e,t){return n[t]!==void 0&&(e[t]=n[t]),e},{})}function Qr(){return document.createElement("div")}function _r(n){return["Element","Fragment"].some(function(e){return fa(n,e)})}function Qv(n){return fa(n,"NodeList")}function _v(n){return fa(n,"MouseEvent")}function qv(n){return!!(n&&n._tippy&&n._tippy.reference===n)}function e2(n){return _r(n)?[n]:Qv(n)?_o(n):Array.isArray(n)?n:_o(document.querySelectorAll(n))}function pa(n,e){n.forEach(function(t){t&&(t.style.transitionDuration=e+"ms")})}function Ed(n,e){n.forEach(function(t){t&&t.setAttribute("data-state",e)})}function t2(n){var e,t=mr(n),r=t[0];return r!=null&&(e=r.ownerDocument)!=null&&e.body?r.ownerDocument:document}function n2(n,e){var t=e.clientX,r=e.clientY;return n.every(function(o){var i=o.popperRect,s=o.popperState,l=o.props,a=l.interactiveBorder,c=Zv(s.placement),u=s.modifiersData.offset;if(!u)return!0;var d=c==="bottom"?u.top.y:0,f=c==="top"?u.bottom.y:0,h=c==="right"?u.left.x:0,p=c==="left"?u.right.x:0,g=i.top-r+d>a,y=r-i.bottom-f>a,S=i.left-t+h>a,k=t-i.right-p>a;return g||y||S||k})}function ha(n,e,t){var r=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(o){n[r](o,t)})}function kd(n,e){for(var t=e;t;){var r;if(n.contains(t))return!0;t=t.getRootNode==null||(r=t.getRootNode())==null?void 0:r.host}return!1}var Zt={isTouch:!1},Cd=0;function r2(){Zt.isTouch||(Zt.isTouch=!0,window.performance&&document.addEventListener("mousemove",wd))}function wd(){var n=performance.now();n-Cd<20&&(Zt.isTouch=!1,document.removeEventListener("mousemove",wd)),Cd=n}function o2(){var n=document.activeElement;if(qv(n)){var e=n._tippy;n.blur&&!e.state.isVisible&&n.blur()}}function i2(){document.addEventListener("touchstart",r2,Jn),window.addEventListener("blur",o2)}var s2=typeof window<"u"&&typeof document<"u",a2=s2?!!window.msCrypto:!1;function gr(n){var e=n==="destroy"?"n already-":" ";return[n+"() was called on a"+e+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function Td(n){var e=/[ \t]{2,}/g,t=/^[ \t]*/gm;return n.replace(e," ").replace(t,"").trim()}function l2(n){return Td(`
|
|
103
103
|
%ctippy.js
|
|
104
104
|
|
|
105
|
-
%c`+
|
|
105
|
+
%c`+Td(n)+`
|
|
106
106
|
|
|
107
107
|
%c👷 This is a development-only message. It will be removed in production.
|
|
108
|
-
`)}function
|
|
108
|
+
`)}function Ad(n){return[l2(n),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}var qr;process.env.NODE_ENV!=="production"&&c2();function c2(){qr=new Set}function an(n,e){if(n&&!qr.has(e)){var t;qr.add(e),(t=console).warn.apply(t,Ad(e))}}function ma(n,e){if(n&&!qr.has(e)){var t;qr.add(e),(t=console).error.apply(t,Ad(e))}}function u2(n){var e=!n,t=Object.prototype.toString.call(n)==="[object Object]"&&!n.addEventListener;ma(e,["tippy() was passed","`"+String(n)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),ma(t,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}var Od={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},d2={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},St=Object.assign({appendTo:yd,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Od,d2),f2=Object.keys(St),p2=function(e){process.env.NODE_ENV!=="production"&&Nd(e,[]);var t=Object.keys(e);t.forEach(function(r){St[r]=e[r]})};function Md(n){var e=n.plugins||[],t=e.reduce(function(r,o){var i=o.name,s=o.defaultValue;if(i){var l;r[i]=n[i]!==void 0?n[i]:(l=St[i])!=null?l:s}return r},{});return Object.assign({},n,t)}function h2(n,e){var t=e?Object.keys(Md(Object.assign({},St,{plugins:e}))):f2,r=t.reduce(function(o,i){var s=(n.getAttribute("data-tippy-"+i)||"").trim();if(!s)return o;if(i==="content")o[i]=s;else try{o[i]=JSON.parse(s)}catch{o[i]=s}return o},{});return r}function Id(n,e){var t=Object.assign({},e,{content:vd(e.content,[n])},e.ignoreAttributes?{}:h2(n,e.plugins));return t.aria=Object.assign({},St.aria,t.aria),t.aria={expanded:t.aria.expanded==="auto"?e.interactive:t.aria.expanded,content:t.aria.content==="auto"?e.interactive?null:"describedby":t.aria.content},t}function Nd(n,e){n===void 0&&(n={}),e===void 0&&(e=[]);var t=Object.keys(n);t.forEach(function(r){var o=Jv(St,Object.keys(Od)),i=!Gv(o,r);i&&(i=e.filter(function(s){return s.name===r}).length===0),an(i,["`"+r+"`","is not a valid prop. You may have spelled it incorrectly, or if it's","a plugin, forgot to pass it in an array as props.plugins.",`
|
|
109
109
|
|
|
110
110
|
`,`All props: https://atomiks.github.io/tippyjs/v6/all-props/
|
|
111
|
-
`,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var
|
|
111
|
+
`,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var m2=function(){return"innerHTML"};function ga(n,e){n[m2()]=e}function Rd(n){var e=Qr();return n===!0?e.className=md:(e.className=gd,_r(n)?e.appendChild(n):ga(e,n)),e}function Dd(n,e){_r(e.content)?(ga(n,""),n.appendChild(e.content)):typeof e.content!="function"&&(e.allowHTML?ga(n,e.content):n.textContent=e.content)}function ya(n){var e=n.firstElementChild,t=_o(e.children);return{box:e,content:t.find(function(r){return r.classList.contains(hd)}),arrow:t.find(function(r){return r.classList.contains(md)||r.classList.contains(gd)}),backdrop:t.find(function(r){return r.classList.contains(Kv)})}}function Ld(n){var e=Qr(),t=Qr();t.className=Wv,t.setAttribute("data-state","hidden"),t.setAttribute("tabindex","-1");var r=Qr();r.className=hd,r.setAttribute("data-state","hidden"),Dd(r,n.props),e.appendChild(t),t.appendChild(r),o(n.props,n.props);function o(i,s){var l=ya(e),a=l.box,c=l.content,u=l.arrow;s.theme?a.setAttribute("data-theme",s.theme):a.removeAttribute("data-theme"),typeof s.animation=="string"?a.setAttribute("data-animation",s.animation):a.removeAttribute("data-animation"),s.inertia?a.setAttribute("data-inertia",""):a.removeAttribute("data-inertia"),a.style.maxWidth=typeof s.maxWidth=="number"?s.maxWidth+"px":s.maxWidth,s.role?a.setAttribute("role",s.role):a.removeAttribute("role"),(i.content!==s.content||i.allowHTML!==s.allowHTML)&&Dd(c,n.props),s.arrow?u?i.arrow!==s.arrow&&(a.removeChild(u),a.appendChild(Rd(s.arrow))):a.appendChild(Rd(s.arrow)):u&&a.removeChild(u)}return{popper:e,onUpdate:o}}Ld.$$tippy=!0;var g2=1,qo=[],va=[];function y2(n,e){var t=Id(n,Object.assign({},St,Md(Sd(e)))),r,o,i,s=!1,l=!1,a=!1,c=!1,u,d,f,h=[],p=bd(I,t.interactiveDebounce),g,y=g2++,S=null,k=Xv(t.plugins),C={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},b={id:y,reference:n,popper:Qr(),popperInstance:S,props:t,state:C,plugins:k,clearDelayTimeouts:Me,setProps:Fe,setContent:Be,show:Ne,hide:Ke,hideWithInteractivity:yt,enable:ce,disable:me,unmount:rt,destroy:Mn};if(!t.render)return process.env.NODE_ENV!=="production"&&ma(!0,"render() function has not been supplied."),b;var R=t.render(b),w=R.popper,F=R.onUpdate;w.setAttribute("data-tippy-root",""),w.id="tippy-"+b.id,b.popper=w,n._tippy=b,w._tippy=b;var z=k.map(function(X){return X.fn(b)}),$=n.hasAttribute("aria-expanded");return O(),de(),re(),W("onCreate",[b]),t.showOnCreate&&J(),w.addEventListener("mouseenter",function(){b.props.interactive&&b.state.isVisible&&b.clearDelayTimeouts()}),w.addEventListener("mouseleave",function(){b.props.interactive&&b.props.trigger.indexOf("mouseenter")>=0&&Y().addEventListener("mousemove",p)}),b;function V(){var X=b.props.touch;return Array.isArray(X)?X:[X,0]}function B(){return V()[0]==="hold"}function P(){var X;return!!((X=b.props.render)!=null&&X.$$tippy)}function H(){return g||n}function Y(){var X=H().parentNode;return X?t2(X):document}function Z(){return ya(w)}function Q(X){return b.state.isMounted&&!b.state.isVisible||Zt.isTouch||u&&u.type==="focus"?0:da(b.props.delay,X?0:1,St.delay)}function re(X){X===void 0&&(X=!1),w.style.pointerEvents=b.props.interactive&&!X?"":"none",w.style.zIndex=""+b.props.zIndex}function W(X,se,ae){if(ae===void 0&&(ae=!0),z.forEach(function(ke){ke[X]&&ke[X].apply(ke,se)}),ae){var xe;(xe=b.props)[X].apply(xe,se)}}function le(){var X=b.props.aria;if(X.content){var se="aria-"+X.content,ae=w.id,xe=mr(b.props.triggerTarget||n);xe.forEach(function(ke){var ze=ke.getAttribute(se);if(b.state.isVisible)ke.setAttribute(se,ze?ze+" "+ae:ae);else{var Ue=ze&&ze.replace(ae,"").trim();Ue?ke.setAttribute(se,Ue):ke.removeAttribute(se)}})}}function de(){if(!($||!b.props.aria.expanded)){var X=mr(b.props.triggerTarget||n);X.forEach(function(se){b.props.interactive?se.setAttribute("aria-expanded",b.state.isVisible&&se===H()?"true":"false"):se.removeAttribute("aria-expanded")})}}function ye(){Y().removeEventListener("mousemove",p),qo=qo.filter(function(X){return X!==p})}function Ee(X){if(!(Zt.isTouch&&(a||X.type==="mousedown"))){var se=X.composedPath&&X.composedPath()[0]||X.target;if(!(b.props.interactive&&kd(w,se))){if(mr(b.props.triggerTarget||n).some(function(ae){return kd(ae,se)})){if(Zt.isTouch||b.state.isVisible&&b.props.trigger.indexOf("click")>=0)return}else W("onClickOutside",[b,X]);b.props.hideOnClick===!0&&(b.clearDelayTimeouts(),b.hide(),l=!0,setTimeout(function(){l=!1}),b.state.isMounted||Ae())}}}function be(){a=!0}function Te(){a=!1}function Ce(){var X=Y();X.addEventListener("mousedown",Ee,!0),X.addEventListener("touchend",Ee,Jn),X.addEventListener("touchstart",Te,Jn),X.addEventListener("touchmove",be,Jn)}function Ae(){var X=Y();X.removeEventListener("mousedown",Ee,!0),X.removeEventListener("touchend",Ee,Jn),X.removeEventListener("touchstart",Te,Jn),X.removeEventListener("touchmove",be,Jn)}function ge(X,se){M(X,function(){!b.state.isVisible&&w.parentNode&&w.parentNode.contains(w)&&se()})}function A(X,se){M(X,se)}function M(X,se){var ae=Z().box;function xe(ke){ke.target===ae&&(ha(ae,"remove",xe),se())}if(X===0)return se();ha(ae,"remove",d),ha(ae,"add",xe),d=xe}function E(X,se,ae){ae===void 0&&(ae=!1);var xe=mr(b.props.triggerTarget||n);xe.forEach(function(ke){ke.addEventListener(X,se,ae),h.push({node:ke,eventType:X,handler:se,options:ae})})}function O(){B()&&(E("touchstart",x,{passive:!0}),E("touchend",N,{passive:!0})),Yv(b.props.trigger).forEach(function(X){if(X!=="manual")switch(E(X,x),X){case"mouseenter":E("mouseleave",N);break;case"focus":E(a2?"focusout":"blur",D);break;case"focusin":E("focusout",D);break}})}function v(){h.forEach(function(X){var se=X.node,ae=X.eventType,xe=X.handler,ke=X.options;se.removeEventListener(ae,xe,ke)}),h=[]}function x(X){var se,ae=!1;if(!(!b.state.isEnabled||L(X)||l)){var xe=((se=u)==null?void 0:se.type)==="focus";u=X,g=X.currentTarget,de(),!b.state.isVisible&&_v(X)&&qo.forEach(function(ke){return ke(X)}),X.type==="click"&&(b.props.trigger.indexOf("mouseenter")<0||s)&&b.props.hideOnClick!==!1&&b.state.isVisible?ae=!0:J(X),X.type==="click"&&(s=!ae),ae&&!xe&&q(X)}}function I(X){var se=X.target,ae=H().contains(se)||w.contains(se);if(!(X.type==="mousemove"&&ae)){var xe=G().concat(w).map(function(ke){var ze,Ue=ke._tippy,ut=(ze=Ue.popperInstance)==null?void 0:ze.state;return ut?{popperRect:ke.getBoundingClientRect(),popperState:ut,props:t}:null}).filter(Boolean);n2(xe,X)&&(ye(),q(X))}}function N(X){var se=L(X)||b.props.trigger.indexOf("click")>=0&&s;if(!se){if(b.props.interactive){b.hideWithInteractivity(X);return}q(X)}}function D(X){b.props.trigger.indexOf("focusin")<0&&X.target!==H()||b.props.interactive&&X.relatedTarget&&w.contains(X.relatedTarget)||q(X)}function L(X){return Zt.isTouch?B()!==X.type.indexOf("touch")>=0:!1}function U(){K();var X=b.props,se=X.popperOptions,ae=X.placement,xe=X.offset,ke=X.getReferenceClientRect,ze=X.moveTransition,Ue=P()?ya(w).arrow:null,ut=ke?{getBoundingClientRect:ke,contextElement:ke.contextElement||H()}:n,dt={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(In){var Et=In.state;if(P()){var Rt=Z(),Sr=Rt.box;["placement","reference-hidden","escaped"].forEach(function(Dt){Dt==="placement"?Sr.setAttribute("data-placement",Et.placement):Et.attributes.popper["data-popper-"+Dt]?Sr.setAttribute("data-"+Dt,""):Sr.removeAttribute("data-"+Dt)}),Et.attributes.popper={}}}},qe=[{name:"offset",options:{offset:xe}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!ze}},dt];P()&&Ue&&qe.push({name:"arrow",options:{element:Ue,padding:3}}),qe.push.apply(qe,(se==null?void 0:se.modifiers)||[]),b.popperInstance=jv(ut,w,Object.assign({},se,{placement:ae,onFirstUpdate:f,modifiers:qe}))}function K(){b.popperInstance&&(b.popperInstance.destroy(),b.popperInstance=null)}function j(){var X=b.props.appendTo,se,ae=H();b.props.interactive&&X===yd||X==="parent"?se=ae.parentNode:se=vd(X,[ae]),se.contains(w)||se.appendChild(w),b.state.isMounted=!0,U(),process.env.NODE_ENV!=="production"&&an(b.props.interactive&&X===St.appendTo&&ae.nextElementSibling!==w,["Interactive tippy element may not be accessible via keyboard","navigation because it is not directly after the reference element","in the DOM source order.",`
|
|
112
112
|
|
|
113
113
|
`,"Using a wrapper <div> or <span> tag around the reference element","solves this by creating a new parentNode context.",`
|
|
114
114
|
|
|
115
115
|
`,"Specifying `appendTo: document.body` silences this warning, but it","assumes you are using a focus management solution to handle","keyboard navigation.",`
|
|
116
116
|
|
|
117
|
-
`,"See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "))}function G(){return
|
|
117
|
+
`,"See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "))}function G(){return _o(w.querySelectorAll("[data-tippy-root]"))}function J(X){b.clearDelayTimeouts(),X&&W("onTrigger",[b,X]),Ce();var se=Q(!0),ae=V(),xe=ae[0],ke=ae[1];Zt.isTouch&&xe==="hold"&&ke&&(se=ke),se?r=setTimeout(function(){b.show()},se):b.show()}function q(X){if(b.clearDelayTimeouts(),W("onUntrigger",[b,X]),!b.state.isVisible){Ae();return}if(!(b.props.trigger.indexOf("mouseenter")>=0&&b.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(X.type)>=0&&s)){var se=Q(!1);se?o=setTimeout(function(){b.state.isVisible&&b.hide()},se):i=requestAnimationFrame(function(){b.hide()})}}function ce(){b.state.isEnabled=!0}function me(){b.hide(),b.state.isEnabled=!1}function Me(){clearTimeout(r),clearTimeout(o),cancelAnimationFrame(i)}function Fe(X){if(process.env.NODE_ENV!=="production"&&an(b.state.isDestroyed,gr("setProps")),!b.state.isDestroyed){W("onBeforeUpdate",[b,X]),v();var se=b.props,ae=Id(n,Object.assign({},se,Sd(X),{ignoreAttributes:!0}));b.props=ae,O(),se.interactiveDebounce!==ae.interactiveDebounce&&(ye(),p=bd(I,ae.interactiveDebounce)),se.triggerTarget&&!ae.triggerTarget?mr(se.triggerTarget).forEach(function(xe){xe.removeAttribute("aria-expanded")}):ae.triggerTarget&&n.removeAttribute("aria-expanded"),de(),re(),F&&F(se,ae),b.popperInstance&&(U(),G().forEach(function(xe){requestAnimationFrame(xe._tippy.popperInstance.forceUpdate)})),W("onAfterUpdate",[b,X])}}function Be(X){b.setProps({content:X})}function Ne(){process.env.NODE_ENV!=="production"&&an(b.state.isDestroyed,gr("show"));var X=b.state.isVisible,se=b.state.isDestroyed,ae=!b.state.isEnabled,xe=Zt.isTouch&&!b.props.touch,ke=da(b.props.duration,0,St.duration);if(!(X||se||ae||xe)&&!H().hasAttribute("disabled")&&(W("onShow",[b],!1),b.props.onShow(b)!==!1)){if(b.state.isVisible=!0,P()&&(w.style.visibility="visible"),re(),Ce(),b.state.isMounted||(w.style.transition="none"),P()){var ze=Z(),Ue=ze.box,ut=ze.content;pa([Ue,ut],0)}f=function(){var qe;if(!(!b.state.isVisible||c)){if(c=!0,w.offsetHeight,w.style.transition=b.props.moveTransition,P()&&b.props.animation){var en=Z(),In=en.box,Et=en.content;pa([In,Et],ke),Ed([In,Et],"visible")}le(),de(),xd(va,b),(qe=b.popperInstance)==null||qe.forceUpdate(),W("onMount",[b]),b.props.animation&&P()&&A(ke,function(){b.state.isShown=!0,W("onShown",[b])})}},j()}}function Ke(){process.env.NODE_ENV!=="production"&&an(b.state.isDestroyed,gr("hide"));var X=!b.state.isVisible,se=b.state.isDestroyed,ae=!b.state.isEnabled,xe=da(b.props.duration,1,St.duration);if(!(X||se||ae)&&(W("onHide",[b],!1),b.props.onHide(b)!==!1)){if(b.state.isVisible=!1,b.state.isShown=!1,c=!1,s=!1,P()&&(w.style.visibility="hidden"),ye(),Ae(),re(!0),P()){var ke=Z(),ze=ke.box,Ue=ke.content;b.props.animation&&(pa([ze,Ue],xe),Ed([ze,Ue],"hidden"))}le(),de(),b.props.animation?P()&&ge(xe,b.unmount):b.unmount()}}function yt(X){process.env.NODE_ENV!=="production"&&an(b.state.isDestroyed,gr("hideWithInteractivity")),Y().addEventListener("mousemove",p),xd(qo,p),p(X)}function rt(){process.env.NODE_ENV!=="production"&&an(b.state.isDestroyed,gr("unmount")),b.state.isVisible&&b.hide(),b.state.isMounted&&(K(),G().forEach(function(X){X._tippy.unmount()}),w.parentNode&&w.parentNode.removeChild(w),va=va.filter(function(X){return X!==b}),b.state.isMounted=!1,W("onHidden",[b]))}function Mn(){process.env.NODE_ENV!=="production"&&an(b.state.isDestroyed,gr("destroy")),!b.state.isDestroyed&&(b.clearDelayTimeouts(),b.unmount(),v(),delete n._tippy,b.state.isDestroyed=!0,W("onDestroy",[b]))}}function yr(n,e){e===void 0&&(e={});var t=St.plugins.concat(e.plugins||[]);process.env.NODE_ENV!=="production"&&(u2(n),Nd(e,t)),i2();var r=Object.assign({},e,{plugins:t}),o=e2(n);if(process.env.NODE_ENV!=="production"){var i=_r(r.content),s=o.length>1;an(i&&s,["tippy() was passed an Element as the `content` prop, but more than","one tippy instance was created by this invocation. This means the","content element will only be appended to the last tippy instance.",`
|
|
118
118
|
|
|
119
119
|
`,"Instead, pass the .innerHTML of the element, or use a function that","returns a cloned version of the element instead.",`
|
|
120
120
|
|
|
121
121
|
`,`1) content: element.innerHTML
|
|
122
|
-
`,"2) content: () => element.cloneNode(true)"].join(" "))}var l=o.reduce(function(a,c){var u=c&&r2(c,r);return u&&a.push(u),a},[]);return Qr(n)?l[0]:l}yr.defaultProps=St,yr.setDefaultProps=qv,yr.currentInput=Zt,Object.assign({},ju,{effect:function(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow)}}),yr.setDefaultProps({render:Ad});class o2{constructor({editor:e,element:t,view:r,tippyOptions:o={},updateDelay:i=250,shouldShow:s}){this.preventHide=!1,this.shouldShow=({view:l,state:a,from:c,to:u})=>{const{doc:d,selection:f}=a,{empty:h}=f,p=!d.textBetween(c,u).length&&Gs(a.selection),g=this.element.contains(document.activeElement);return!(!(l.hasFocus()||g)||h||p||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:l})=>{var a;if(this.preventHide){this.preventHide=!1;return}l!=null&&l.relatedTarget&&(!((a=this.element.parentNode)===null||a===void 0)&&a.contains(l.relatedTarget))||this.hide()},this.tippyBlurHandler=l=>{this.blurHandler({event:l})},this.handleDebouncedUpdate=(l,a)=>{const c=!(a!=null&&a.selection.eq(l.state.selection)),u=!(a!=null&&a.doc.eq(l.state.doc));!c&&!u||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(l,c,u,a)},this.updateDelay))},this.updateHandler=(l,a,c,u)=>{var d,f,h;const{state:p,composing:g}=l,{selection:y}=p;if(g||!a&&!c)return;this.createTooltip();const{ranges:C}=y,k=Math.min(...C.map(w=>w.$from.pos)),b=Math.max(...C.map(w=>w.$to.pos));if(!((d=this.shouldShow)===null||d===void 0?void 0:d.call(this,{editor:this.editor,view:l,state:p,oldState:u,from:k,to:b}))){this.hide();return}(f=this.tippy)===null||f===void 0||f.setProps({getReferenceClientRect:((h=this.tippyOptions)===null||h===void 0?void 0:h.getReferenceClientRect)||(()=>{if(ny(p.selection)){let w=l.nodeDOM(k);const F=w.dataset.nodeViewWrapper?w:w.querySelector("[data-node-view-wrapper]");if(F&&(w=F.firstChild),w)return w.getBoundingClientRect()}return Vu(l,k,b)})}),this.show()},this.editor=e,this.element=t,this.view=r,this.updateDelay=i,s&&(this.shouldShow=s),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=o,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:e}=this.editor.options,t=!!e.parentElement;this.tippy||!t||(this.tippy=yr(e,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"top",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(e,t){const{state:r}=e,o=r.selection.$from.pos!==r.selection.$to.pos;if(this.updateDelay>0&&o){this.handleDebouncedUpdate(e,t);return}const i=!(t!=null&&t.selection.eq(e.state.selection)),s=!(t!=null&&t.doc.eq(e.state.doc));this.updateHandler(e,i,s,t)}show(){var e;(e=this.tippy)===null||e===void 0||e.show()}hide(){var e;(e=this.tippy)===null||e===void 0||e.hide()}destroy(){var e,t;!((e=this.tippy)===null||e===void 0)&&e.popper.firstChild&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),(t=this.tippy)===null||t===void 0||t.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const Od=n=>new ft({key:typeof n.pluginKey=="string"?new Ft(n.pluginKey):n.pluginKey,view:e=>new o2({view:e,...n})});Tt.create({name:"bubbleMenu",addOptions(){return{element:null,tippyOptions:{},pluginKey:"bubbleMenu",updateDelay:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[Od({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,updateDelay:this.options.updateDelay,shouldShow:this.options.shouldShow})]:[]}});class i2{constructor({editor:e,element:t,view:r,tippyOptions:o={},shouldShow:i}){this.preventHide=!1,this.shouldShow=({view:s,state:l})=>{const{selection:a}=l,{$anchor:c,empty:u}=a,d=c.depth===1,f=c.parent.isTextblock&&!c.parent.type.spec.code&&!c.parent.textContent;return!(!s.hasFocus()||!u||!d||!f||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:s})=>{var l;if(this.preventHide){this.preventHide=!1;return}s!=null&&s.relatedTarget&&(!((l=this.element.parentNode)===null||l===void 0)&&l.contains(s.relatedTarget))||this.hide()},this.tippyBlurHandler=s=>{this.blurHandler({event:s})},this.editor=e,this.element=t,this.view=r,i&&(this.shouldShow=i),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=o,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:e}=this.editor.options,t=!!e.parentElement;this.tippy||!t||(this.tippy=yr(e,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"right",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(e,t){var r,o,i;const{state:s}=e,{doc:l,selection:a}=s,{from:c,to:u}=a;if(t&&t.doc.eq(l)&&t.selection.eq(a))return;if(this.createTooltip(),!((r=this.shouldShow)===null||r===void 0?void 0:r.call(this,{editor:this.editor,view:e,state:s,oldState:t}))){this.hide();return}(o=this.tippy)===null||o===void 0||o.setProps({getReferenceClientRect:((i=this.tippyOptions)===null||i===void 0?void 0:i.getReferenceClientRect)||(()=>Vu(e,c,u))}),this.show()}show(){var e;(e=this.tippy)===null||e===void 0||e.show()}hide(){var e;(e=this.tippy)===null||e===void 0||e.hide()}destroy(){var e,t;!((e=this.tippy)===null||e===void 0)&&e.popper.firstChild&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),(t=this.tippy)===null||t===void 0||t.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const Md=n=>new ft({key:typeof n.pluginKey=="string"?new Ft(n.pluginKey):n.pluginKey,view:e=>new i2({view:e,...n})});Tt.create({name:"floatingMenu",addOptions(){return{element:null,tippyOptions:{},pluginKey:"floatingMenu",shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[Md({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow})]:[]}}),m.defineComponent({name:"BubbleMenu",props:{pluginKey:{type:[String,Object],default:"bubbleMenu"},editor:{type:Object,required:!0},updateDelay:{type:Number,default:void 0},tippyOptions:{type:Object,default:()=>({})},shouldShow:{type:Function,default:null}},setup(n,{slots:e}){const t=m.ref(null);return m.onMounted(()=>{const{updateDelay:r,editor:o,pluginKey:i,shouldShow:s,tippyOptions:l}=n;o.registerPlugin(Od({updateDelay:r,editor:o,element:t.value,pluginKey:i,shouldShow:s,tippyOptions:l}))}),m.onBeforeUnmount(()=>{const{pluginKey:r,editor:o}=n;o.unregisterPlugin(r)}),()=>{var r;return m.h("div",{ref:t},(r=e.default)===null||r===void 0?void 0:r.call(e))}}});function Id(n){return m.customRef((e,t)=>({get(){return e(),n},set(r){n=r,requestAnimationFrame(()=>{requestAnimationFrame(()=>{t()})})}}))}class s2 extends Sy{constructor(e={}){return super(e),this.vueRenderers=m.reactive(new Map),this.contentComponent=null,this.reactiveState=Id(this.view.state),this.reactiveExtensionStorage=Id(this.extensionStorage),this.on("transaction",()=>{this.reactiveState.value=this.view.state,this.reactiveExtensionStorage.value=this.extensionStorage}),m.markRaw(this)}get state(){return this.reactiveState?this.reactiveState.value:this.view.state}get storage(){return this.reactiveExtensionStorage?this.reactiveExtensionStorage.value:super.storage}registerPlugin(e,t){super.registerPlugin(e,t),this.reactiveState.value=this.view.state}unregisterPlugin(e){super.unregisterPlugin(e),this.reactiveState.value=this.view.state}}const a2=m.defineComponent({name:"EditorContent",props:{editor:{default:null,type:Object}},setup(n){const e=m.ref(),t=m.getCurrentInstance();return m.watchEffect(()=>{const r=n.editor;r&&r.options.element&&e.value&&m.nextTick(()=>{if(!e.value||!r.options.element.firstChild)return;const o=m.unref(e.value);e.value.append(...r.options.element.childNodes),r.contentComponent=t.ctx._,r.setOptions({element:o}),r.createNodeViews()})}),m.onBeforeUnmount(()=>{const r=n.editor;if(!r||(r.isDestroyed||r.view.setProps({nodeViews:{}}),r.contentComponent=null,!r.options.element.firstChild))return;const o=document.createElement("div");o.append(...r.options.element.childNodes),r.setOptions({element:o})}),{rootEl:e}},render(){const n=[];return this.editor&&this.editor.vueRenderers.forEach(e=>{const t=m.h(m.Teleport,{to:e.teleportElement,key:e.id},m.h(e.component,{ref:e.id,...e.props}));n.push(t)}),m.h("div",{ref:e=>{this.rootEl=e}},...n)}});m.defineComponent({name:"FloatingMenu",props:{pluginKey:{type:null,default:"floatingMenu"},editor:{type:Object,required:!0},tippyOptions:{type:Object,default:()=>({})},shouldShow:{type:Function,default:null}},setup(n,{slots:e}){const t=m.ref(null);return m.onMounted(()=>{const{pluginKey:r,editor:o,tippyOptions:i,shouldShow:s}=n;o.registerPlugin(Md({pluginKey:r,editor:o,element:t.value,tippyOptions:i,shouldShow:s}))}),m.onBeforeUnmount(()=>{const{pluginKey:r,editor:o}=n;o.unregisterPlugin(r)}),()=>{var r;return m.h("div",{ref:t},(r=e.default)===null||r===void 0?void 0:r.call(e))}}}),m.defineComponent({name:"NodeViewContent",props:{as:{type:String,default:"div"}},render(){return m.h(this.as,{style:{whiteSpace:"pre-wrap"},"data-node-view-content":""})}}),m.defineComponent({name:"NodeViewWrapper",props:{as:{type:String,default:"div"}},inject:["onDragStart","decorationClasses"],render(){var n,e;return m.h(this.as,{class:this.decorationClasses,style:{whiteSpace:"normal"},"data-node-view-wrapper":"",onDragstart:this.onDragStart},(e=(n=this.$slots).default)===null||e===void 0?void 0:e.call(n))}});const l2=(n={})=>{const e=m.shallowRef();return m.onMounted(()=>{e.value=new s2(n)}),m.onBeforeUnmount(()=>{var t;(t=e.value)===null||t===void 0||t.destroy()}),e},c2=At.create({name:"doc",topNode:!0,content:"block+"}),u2=At.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:n}){return["p",ct(this.options.HTMLAttributes,n),0]},addCommands(){return{setParagraph:()=>({commands:n})=>n.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),d2=At.create({name:"text",group:"inline"}),f2="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4vianca6w0s2x0a2z0ure5ba0by2idu3namex3narepublic11d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0cast4mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dabur3d1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0ardian6cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2tura4vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9dnavy5lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0a1b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp2w2ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4finity6ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",p2="ελ1υ2бг1ел3дети4ею2католик6ом3мкд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",vr=(n,e)=>{for(const t in e)n[t]=e[t];return n},ga="numeric",ya="ascii",va="alpha",qo="asciinumeric",ei="alphanumeric",ba="domain",Nd="emoji",h2="scheme",m2="slashscheme",Rd="whitespace";function g2(n,e){return n in e||(e[n]=[]),e[n]}function Yn(n,e,t){e[ga]&&(e[qo]=!0,e[ei]=!0),e[ya]&&(e[qo]=!0,e[va]=!0),e[qo]&&(e[ei]=!0),e[va]&&(e[ei]=!0),e[ei]&&(e[ba]=!0),e[Nd]&&(e[ba]=!0);for(const r in e){const o=g2(r,t);o.indexOf(n)<0&&o.push(n)}}function y2(n,e){const t={};for(const r in e)e[r].indexOf(n)>=0&&(t[r]=!0);return t}function gt(n){n===void 0&&(n=null),this.j={},this.jr=[],this.jd=null,this.t=n}gt.groups={},gt.prototype={accepts(){return!!this.t},go(n){const e=this,t=e.j[n];if(t)return t;for(let r=0;r<e.jr.length;r++){const o=e.jr[r][0],i=e.jr[r][1];if(i&&o.test(n))return i}return e.jd},has(n,e){return e===void 0&&(e=!1),e?n in this.j:!!this.go(n)},ta(n,e,t,r){for(let o=0;o<n.length;o++)this.tt(n[o],e,t,r)},tr(n,e,t,r){r=r||gt.groups;let o;return e&&e.j?o=e:(o=new gt(e),t&&r&&Yn(e,t,r)),this.jr.push([n,o]),o},ts(n,e,t,r){let o=this;const i=n.length;if(!i)return o;for(let s=0;s<i-1;s++)o=o.tt(n[s]);return o.tt(n[i-1],e,t,r)},tt(n,e,t,r){r=r||gt.groups;const o=this;if(e&&e.j)return o.j[n]=e,e;const i=e;let s,l=o.go(n);if(l?(s=new gt,vr(s.j,l.j),s.jr.push.apply(s.jr,l.jr),s.jd=l.jd,s.t=l.t):s=new gt,i){if(r)if(s.t&&typeof s.t=="string"){const a=vr(y2(s.t,r),t);Yn(i,a,r)}else t&&Yn(i,t,r);s.t=i}return o.j[n]=s,s}};const Oe=(n,e,t,r,o)=>n.ta(e,t,r,o),It=(n,e,t,r,o)=>n.tr(e,t,r,o),Dd=(n,e,t,r,o)=>n.ts(e,t,r,o),ue=(n,e,t,r,o)=>n.tt(e,t,r,o),ln="WORD",xa="UWORD",qr="LOCALHOST",Sa="TLD",Ea="UTLD",ti="SCHEME",br="SLASH_SCHEME",Ca="NUM",Ld="WS",ka="NL",eo="OPENBRACE",to="CLOSEBRACE",ni="OPENBRACKET",ri="CLOSEBRACKET",oi="OPENPAREN",ii="CLOSEPAREN",si="OPENANGLEBRACKET",ai="CLOSEANGLEBRACKET",li="FULLWIDTHLEFTPAREN",ci="FULLWIDTHRIGHTPAREN",ui="LEFTCORNERBRACKET",di="RIGHTCORNERBRACKET",fi="LEFTWHITECORNERBRACKET",pi="RIGHTWHITECORNERBRACKET",hi="FULLWIDTHLESSTHAN",mi="FULLWIDTHGREATERTHAN",gi="AMPERSAND",yi="APOSTROPHE",vi="ASTERISK",Tn="AT",bi="BACKSLASH",xi="BACKTICK",Si="CARET",An="COLON",wa="COMMA",Ei="DOLLAR",Qt="DOT",Ci="EQUALS",Ta="EXCLAMATION",_t="HYPHEN",ki="PERCENT",wi="PIPE",Ti="PLUS",Ai="POUND",Oi="QUERY",Aa="QUOTE",Oa="SEMI",qt="SLASH",no="TILDE",Mi="UNDERSCORE",Pd="EMOJI",Ii="SYM";var Bd=Object.freeze({__proto__:null,WORD:ln,UWORD:xa,LOCALHOST:qr,TLD:Sa,UTLD:Ea,SCHEME:ti,SLASH_SCHEME:br,NUM:Ca,WS:Ld,NL:ka,OPENBRACE:eo,CLOSEBRACE:to,OPENBRACKET:ni,CLOSEBRACKET:ri,OPENPAREN:oi,CLOSEPAREN:ii,OPENANGLEBRACKET:si,CLOSEANGLEBRACKET:ai,FULLWIDTHLEFTPAREN:li,FULLWIDTHRIGHTPAREN:ci,LEFTCORNERBRACKET:ui,RIGHTCORNERBRACKET:di,LEFTWHITECORNERBRACKET:fi,RIGHTWHITECORNERBRACKET:pi,FULLWIDTHLESSTHAN:hi,FULLWIDTHGREATERTHAN:mi,AMPERSAND:gi,APOSTROPHE:yi,ASTERISK:vi,AT:Tn,BACKSLASH:bi,BACKTICK:xi,CARET:Si,COLON:An,COMMA:wa,DOLLAR:Ei,DOT:Qt,EQUALS:Ci,EXCLAMATION:Ta,HYPHEN:_t,PERCENT:ki,PIPE:wi,PLUS:Ti,POUND:Ai,QUERY:Oi,QUOTE:Aa,SEMI:Oa,SLASH:qt,TILDE:no,UNDERSCORE:Mi,EMOJI:Pd,SYM:Ii});const xr=/[a-z]/,Ma=/\p{L}/u,Ia=/\p{Emoji}/u,Na=/\d/,Fd=/\s/,Vd=`
|
|
123
|
-
`,
|
|
122
|
+
`,"2) content: () => element.cloneNode(true)"].join(" "))}var l=o.reduce(function(a,c){var u=c&&y2(c,r);return u&&a.push(u),a},[]);return _r(n)?l[0]:l}yr.defaultProps=St,yr.setDefaultProps=p2,yr.currentInput=Zt,Object.assign({},Zu,{effect:function(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow)}}),yr.setDefaultProps({render:Ld});class v2{constructor({editor:e,element:t,view:r,tippyOptions:o={},updateDelay:i=250,shouldShow:s}){this.preventHide=!1,this.shouldShow=({view:l,state:a,from:c,to:u})=>{const{doc:d,selection:f}=a,{empty:h}=f,p=!d.textBetween(c,u).length&&Xs(a.selection),g=this.element.contains(document.activeElement);return!(!(l.hasFocus()||g)||h||p||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:l})=>{var a;if(this.preventHide){this.preventHide=!1;return}l!=null&&l.relatedTarget&&(!((a=this.element.parentNode)===null||a===void 0)&&a.contains(l.relatedTarget))||this.hide()},this.tippyBlurHandler=l=>{this.blurHandler({event:l})},this.handleDebouncedUpdate=(l,a)=>{const c=!(a!=null&&a.selection.eq(l.state.selection)),u=!(a!=null&&a.doc.eq(l.state.doc));!c&&!u||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(l,c,u,a)},this.updateDelay))},this.updateHandler=(l,a,c,u)=>{var d,f,h;const{state:p,composing:g}=l,{selection:y}=p;if(g||!a&&!c)return;this.createTooltip();const{ranges:k}=y,C=Math.min(...k.map(w=>w.$from.pos)),b=Math.max(...k.map(w=>w.$to.pos));if(!((d=this.shouldShow)===null||d===void 0?void 0:d.call(this,{editor:this.editor,view:l,state:p,oldState:u,from:C,to:b}))){this.hide();return}(f=this.tippy)===null||f===void 0||f.setProps({getReferenceClientRect:((h=this.tippyOptions)===null||h===void 0?void 0:h.getReferenceClientRect)||(()=>{if(gy(p.selection)){let w=l.nodeDOM(C);const F=w.dataset.nodeViewWrapper?w:w.querySelector("[data-node-view-wrapper]");if(F&&(w=F.firstChild),w)return w.getBoundingClientRect()}return Ku(l,C,b)})}),this.show()},this.editor=e,this.element=t,this.view=r,this.updateDelay=i,s&&(this.shouldShow=s),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=o,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:e}=this.editor.options,t=!!e.parentElement;this.tippy||!t||(this.tippy=yr(e,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"top",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(e,t){const{state:r}=e,o=r.selection.$from.pos!==r.selection.$to.pos;if(this.updateDelay>0&&o){this.handleDebouncedUpdate(e,t);return}const i=!(t!=null&&t.selection.eq(e.state.selection)),s=!(t!=null&&t.doc.eq(e.state.doc));this.updateHandler(e,i,s,t)}show(){var e;(e=this.tippy)===null||e===void 0||e.show()}hide(){var e;(e=this.tippy)===null||e===void 0||e.hide()}destroy(){var e,t;!((e=this.tippy)===null||e===void 0)&&e.popper.firstChild&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),(t=this.tippy)===null||t===void 0||t.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const Pd=n=>new ft({key:typeof n.pluginKey=="string"?new Ft(n.pluginKey):n.pluginKey,view:e=>new v2({view:e,...n})});Tt.create({name:"bubbleMenu",addOptions(){return{element:null,tippyOptions:{},pluginKey:"bubbleMenu",updateDelay:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[Pd({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,updateDelay:this.options.updateDelay,shouldShow:this.options.shouldShow})]:[]}});class b2{constructor({editor:e,element:t,view:r,tippyOptions:o={},shouldShow:i}){this.preventHide=!1,this.shouldShow=({view:s,state:l})=>{const{selection:a}=l,{$anchor:c,empty:u}=a,d=c.depth===1,f=c.parent.isTextblock&&!c.parent.type.spec.code&&!c.parent.textContent;return!(!s.hasFocus()||!u||!d||!f||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:s})=>{var l;if(this.preventHide){this.preventHide=!1;return}s!=null&&s.relatedTarget&&(!((l=this.element.parentNode)===null||l===void 0)&&l.contains(s.relatedTarget))||this.hide()},this.tippyBlurHandler=s=>{this.blurHandler({event:s})},this.editor=e,this.element=t,this.view=r,i&&(this.shouldShow=i),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=o,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:e}=this.editor.options,t=!!e.parentElement;this.tippy||!t||(this.tippy=yr(e,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"right",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(e,t){var r,o,i;const{state:s}=e,{doc:l,selection:a}=s,{from:c,to:u}=a;if(t&&t.doc.eq(l)&&t.selection.eq(a))return;if(this.createTooltip(),!((r=this.shouldShow)===null||r===void 0?void 0:r.call(this,{editor:this.editor,view:e,state:s,oldState:t}))){this.hide();return}(o=this.tippy)===null||o===void 0||o.setProps({getReferenceClientRect:((i=this.tippyOptions)===null||i===void 0?void 0:i.getReferenceClientRect)||(()=>Ku(e,c,u))}),this.show()}show(){var e;(e=this.tippy)===null||e===void 0||e.show()}hide(){var e;(e=this.tippy)===null||e===void 0||e.hide()}destroy(){var e,t;!((e=this.tippy)===null||e===void 0)&&e.popper.firstChild&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),(t=this.tippy)===null||t===void 0||t.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const Bd=n=>new ft({key:typeof n.pluginKey=="string"?new Ft(n.pluginKey):n.pluginKey,view:e=>new b2({view:e,...n})});Tt.create({name:"floatingMenu",addOptions(){return{element:null,tippyOptions:{},pluginKey:"floatingMenu",shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[Bd({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow})]:[]}}),m.defineComponent({name:"BubbleMenu",props:{pluginKey:{type:[String,Object],default:"bubbleMenu"},editor:{type:Object,required:!0},updateDelay:{type:Number,default:void 0},tippyOptions:{type:Object,default:()=>({})},shouldShow:{type:Function,default:null}},setup(n,{slots:e}){const t=m.ref(null);return m.onMounted(()=>{const{updateDelay:r,editor:o,pluginKey:i,shouldShow:s,tippyOptions:l}=n;o.registerPlugin(Pd({updateDelay:r,editor:o,element:t.value,pluginKey:i,shouldShow:s,tippyOptions:l}))}),m.onBeforeUnmount(()=>{const{pluginKey:r,editor:o}=n;o.unregisterPlugin(r)}),()=>{var r;return m.h("div",{ref:t},(r=e.default)===null||r===void 0?void 0:r.call(e))}}});function Fd(n){return m.customRef((e,t)=>({get(){return e(),n},set(r){n=r,requestAnimationFrame(()=>{requestAnimationFrame(()=>{t()})})}}))}class x2 extends Py{constructor(e={}){return super(e),this.vueRenderers=m.reactive(new Map),this.contentComponent=null,this.reactiveState=Fd(this.view.state),this.reactiveExtensionStorage=Fd(this.extensionStorage),this.on("transaction",()=>{this.reactiveState.value=this.view.state,this.reactiveExtensionStorage.value=this.extensionStorage}),m.markRaw(this)}get state(){return this.reactiveState?this.reactiveState.value:this.view.state}get storage(){return this.reactiveExtensionStorage?this.reactiveExtensionStorage.value:super.storage}registerPlugin(e,t){super.registerPlugin(e,t),this.reactiveState.value=this.view.state}unregisterPlugin(e){super.unregisterPlugin(e),this.reactiveState.value=this.view.state}}const S2=m.defineComponent({name:"EditorContent",props:{editor:{default:null,type:Object}},setup(n){const e=m.ref(),t=m.getCurrentInstance();return m.watchEffect(()=>{const r=n.editor;r&&r.options.element&&e.value&&m.nextTick(()=>{if(!e.value||!r.options.element.firstChild)return;const o=m.unref(e.value);e.value.append(...r.options.element.childNodes),r.contentComponent=t.ctx._,r.setOptions({element:o}),r.createNodeViews()})}),m.onBeforeUnmount(()=>{const r=n.editor;if(!r||(r.isDestroyed||r.view.setProps({nodeViews:{}}),r.contentComponent=null,!r.options.element.firstChild))return;const o=document.createElement("div");o.append(...r.options.element.childNodes),r.setOptions({element:o})}),{rootEl:e}},render(){const n=[];return this.editor&&this.editor.vueRenderers.forEach(e=>{const t=m.h(m.Teleport,{to:e.teleportElement,key:e.id},m.h(e.component,{ref:e.id,...e.props}));n.push(t)}),m.h("div",{ref:e=>{this.rootEl=e}},...n)}});m.defineComponent({name:"FloatingMenu",props:{pluginKey:{type:null,default:"floatingMenu"},editor:{type:Object,required:!0},tippyOptions:{type:Object,default:()=>({})},shouldShow:{type:Function,default:null}},setup(n,{slots:e}){const t=m.ref(null);return m.onMounted(()=>{const{pluginKey:r,editor:o,tippyOptions:i,shouldShow:s}=n;o.registerPlugin(Bd({pluginKey:r,editor:o,element:t.value,tippyOptions:i,shouldShow:s}))}),m.onBeforeUnmount(()=>{const{pluginKey:r,editor:o}=n;o.unregisterPlugin(r)}),()=>{var r;return m.h("div",{ref:t},(r=e.default)===null||r===void 0?void 0:r.call(e))}}}),m.defineComponent({name:"NodeViewContent",props:{as:{type:String,default:"div"}},render(){return m.h(this.as,{style:{whiteSpace:"pre-wrap"},"data-node-view-content":""})}}),m.defineComponent({name:"NodeViewWrapper",props:{as:{type:String,default:"div"}},inject:["onDragStart","decorationClasses"],render(){var n,e;return m.h(this.as,{class:this.decorationClasses,style:{whiteSpace:"normal"},"data-node-view-wrapper":"",onDragstart:this.onDragStart},(e=(n=this.$slots).default)===null||e===void 0?void 0:e.call(n))}});const E2=(n={})=>{const e=m.shallowRef();return m.onMounted(()=>{e.value=new x2(n)}),m.onBeforeUnmount(()=>{var t;(t=e.value)===null||t===void 0||t.destroy()}),e},k2=At.create({name:"doc",topNode:!0,content:"block+"}),C2=At.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:n}){return["p",ct(this.options.HTMLAttributes,n),0]},addCommands(){return{setParagraph:()=>({commands:n})=>n.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),w2=At.create({name:"text",group:"inline"}),T2="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4vianca6w0s2x0a2z0ure5ba0by2idu3namex3narepublic11d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0cast4mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dabur3d1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0ardian6cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2tura4vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9dnavy5lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0a1b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp2w2ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4finity6ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",A2="ελ1υ2бг1ел3дети4ею2католик6ом3мкд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",vr=(n,e)=>{for(const t in e)n[t]=e[t];return n},ba="numeric",xa="ascii",Sa="alpha",ei="asciinumeric",ti="alphanumeric",Ea="domain",Vd="emoji",O2="scheme",M2="slashscheme",zd="whitespace";function I2(n,e){return n in e||(e[n]=[]),e[n]}function Yn(n,e,t){e[ba]&&(e[ei]=!0,e[ti]=!0),e[xa]&&(e[ei]=!0,e[Sa]=!0),e[ei]&&(e[ti]=!0),e[Sa]&&(e[ti]=!0),e[ti]&&(e[Ea]=!0),e[Vd]&&(e[Ea]=!0);for(const r in e){const o=I2(r,t);o.indexOf(n)<0&&o.push(n)}}function N2(n,e){const t={};for(const r in e)e[r].indexOf(n)>=0&&(t[r]=!0);return t}function gt(n){n===void 0&&(n=null),this.j={},this.jr=[],this.jd=null,this.t=n}gt.groups={},gt.prototype={accepts(){return!!this.t},go(n){const e=this,t=e.j[n];if(t)return t;for(let r=0;r<e.jr.length;r++){const o=e.jr[r][0],i=e.jr[r][1];if(i&&o.test(n))return i}return e.jd},has(n,e){return e===void 0&&(e=!1),e?n in this.j:!!this.go(n)},ta(n,e,t,r){for(let o=0;o<n.length;o++)this.tt(n[o],e,t,r)},tr(n,e,t,r){r=r||gt.groups;let o;return e&&e.j?o=e:(o=new gt(e),t&&r&&Yn(e,t,r)),this.jr.push([n,o]),o},ts(n,e,t,r){let o=this;const i=n.length;if(!i)return o;for(let s=0;s<i-1;s++)o=o.tt(n[s]);return o.tt(n[i-1],e,t,r)},tt(n,e,t,r){r=r||gt.groups;const o=this;if(e&&e.j)return o.j[n]=e,e;const i=e;let s,l=o.go(n);if(l?(s=new gt,vr(s.j,l.j),s.jr.push.apply(s.jr,l.jr),s.jd=l.jd,s.t=l.t):s=new gt,i){if(r)if(s.t&&typeof s.t=="string"){const a=vr(N2(s.t,r),t);Yn(i,a,r)}else t&&Yn(i,t,r);s.t=i}return o.j[n]=s,s}};const Oe=(n,e,t,r,o)=>n.ta(e,t,r,o),It=(n,e,t,r,o)=>n.tr(e,t,r,o),$d=(n,e,t,r,o)=>n.ts(e,t,r,o),ue=(n,e,t,r,o)=>n.tt(e,t,r,o),ln="WORD",ka="UWORD",eo="LOCALHOST",Ca="TLD",wa="UTLD",ni="SCHEME",br="SLASH_SCHEME",Ta="NUM",Ud="WS",Aa="NL",to="OPENBRACE",no="CLOSEBRACE",ri="OPENBRACKET",oi="CLOSEBRACKET",ii="OPENPAREN",si="CLOSEPAREN",ai="OPENANGLEBRACKET",li="CLOSEANGLEBRACKET",ci="FULLWIDTHLEFTPAREN",ui="FULLWIDTHRIGHTPAREN",di="LEFTCORNERBRACKET",fi="RIGHTCORNERBRACKET",pi="LEFTWHITECORNERBRACKET",hi="RIGHTWHITECORNERBRACKET",mi="FULLWIDTHLESSTHAN",gi="FULLWIDTHGREATERTHAN",yi="AMPERSAND",vi="APOSTROPHE",bi="ASTERISK",Tn="AT",xi="BACKSLASH",Si="BACKTICK",Ei="CARET",An="COLON",Oa="COMMA",ki="DOLLAR",Qt="DOT",Ci="EQUALS",Ma="EXCLAMATION",_t="HYPHEN",wi="PERCENT",Ti="PIPE",Ai="PLUS",Oi="POUND",Mi="QUERY",Ia="QUOTE",Na="SEMI",qt="SLASH",ro="TILDE",Ii="UNDERSCORE",Hd="EMOJI",Ni="SYM";var jd=Object.freeze({__proto__:null,WORD:ln,UWORD:ka,LOCALHOST:eo,TLD:Ca,UTLD:wa,SCHEME:ni,SLASH_SCHEME:br,NUM:Ta,WS:Ud,NL:Aa,OPENBRACE:to,CLOSEBRACE:no,OPENBRACKET:ri,CLOSEBRACKET:oi,OPENPAREN:ii,CLOSEPAREN:si,OPENANGLEBRACKET:ai,CLOSEANGLEBRACKET:li,FULLWIDTHLEFTPAREN:ci,FULLWIDTHRIGHTPAREN:ui,LEFTCORNERBRACKET:di,RIGHTCORNERBRACKET:fi,LEFTWHITECORNERBRACKET:pi,RIGHTWHITECORNERBRACKET:hi,FULLWIDTHLESSTHAN:mi,FULLWIDTHGREATERTHAN:gi,AMPERSAND:yi,APOSTROPHE:vi,ASTERISK:bi,AT:Tn,BACKSLASH:xi,BACKTICK:Si,CARET:Ei,COLON:An,COMMA:Oa,DOLLAR:ki,DOT:Qt,EQUALS:Ci,EXCLAMATION:Ma,HYPHEN:_t,PERCENT:wi,PIPE:Ti,PLUS:Ai,POUND:Oi,QUERY:Mi,QUOTE:Ia,SEMI:Na,SLASH:qt,TILDE:ro,UNDERSCORE:Ii,EMOJI:Hd,SYM:Ni});const xr=/[a-z]/,Ra=/\p{L}/u,Da=/\p{Emoji}/u,La=/\d/,Wd=/\s/,Kd=`
|
|
123
|
+
`,R2="️",D2="";let Ri=null,Di=null;function L2(n){n===void 0&&(n=[]);const e={};gt.groups=e;const t=new gt;Ri==null&&(Ri=Gd(T2)),Di==null&&(Di=Gd(A2)),ue(t,"'",vi),ue(t,"{",to),ue(t,"}",no),ue(t,"[",ri),ue(t,"]",oi),ue(t,"(",ii),ue(t,")",si),ue(t,"<",ai),ue(t,">",li),ue(t,"(",ci),ue(t,")",ui),ue(t,"「",di),ue(t,"」",fi),ue(t,"『",pi),ue(t,"』",hi),ue(t,"<",mi),ue(t,">",gi),ue(t,"&",yi),ue(t,"*",bi),ue(t,"@",Tn),ue(t,"`",Si),ue(t,"^",Ei),ue(t,":",An),ue(t,",",Oa),ue(t,"$",ki),ue(t,".",Qt),ue(t,"=",Ci),ue(t,"!",Ma),ue(t,"-",_t),ue(t,"%",wi),ue(t,"|",Ti),ue(t,"+",Ai),ue(t,"#",Oi),ue(t,"?",Mi),ue(t,'"',Ia),ue(t,"/",qt),ue(t,";",Na),ue(t,"~",ro),ue(t,"_",Ii),ue(t,"\\",xi);const r=It(t,La,Ta,{[ba]:!0});It(r,La,r);const o=It(t,xr,ln,{[xa]:!0});It(o,xr,o);const i=It(t,Ra,ka,{[Sa]:!0});It(i,xr),It(i,Ra,i);const s=It(t,Wd,Ud,{[zd]:!0});ue(t,Kd,Aa,{[zd]:!0}),ue(s,Kd),It(s,Wd,s);const l=It(t,Da,Hd,{[Vd]:!0});It(l,Da,l),ue(l,R2,l);const a=ue(l,D2);It(a,Da,l);const c=[[xr,o]],u=[[xr,null],[Ra,i]];for(let d=0;d<Ri.length;d++)On(t,Ri[d],Ca,ln,c);for(let d=0;d<Di.length;d++)On(t,Di[d],wa,ka,u);Yn(Ca,{tld:!0,ascii:!0},e),Yn(wa,{utld:!0,alpha:!0},e),On(t,"file",ni,ln,c),On(t,"mailto",ni,ln,c),On(t,"http",br,ln,c),On(t,"https",br,ln,c),On(t,"ftp",br,ln,c),On(t,"ftps",br,ln,c),Yn(ni,{scheme:!0,ascii:!0},e),Yn(br,{slashscheme:!0,ascii:!0},e),n=n.sort((d,f)=>d[0]>f[0]?1:-1);for(let d=0;d<n.length;d++){const f=n[d][0],p=n[d][1]?{[O2]:!0}:{[M2]:!0};f.indexOf("-")>=0?p[Ea]=!0:xr.test(f)?La.test(f)?p[ei]=!0:p[xa]=!0:p[ba]=!0,$d(t,f,f,p)}return $d(t,"localhost",eo,{ascii:!0}),t.jd=new gt(Ni),{start:t,tokens:vr({groups:e},jd)}}function P2(n,e){const t=B2(e.replace(/[A-Z]/g,l=>l.toLowerCase())),r=t.length,o=[];let i=0,s=0;for(;s<r;){let l=n,a=null,c=0,u=null,d=-1,f=-1;for(;s<r&&(a=l.go(t[s]));)l=a,l.accepts()?(d=0,f=0,u=l):d>=0&&(d+=t[s].length,f++),c+=t[s].length,i+=t[s].length,s++;i-=d,s-=f,c-=d,o.push({t:u.t,v:e.slice(i-c,i),s:i-c,e:i})}return o}function B2(n){const e=[],t=n.length;let r=0;for(;r<t;){let o=n.charCodeAt(r),i,s=o<55296||o>56319||r+1===t||(i=n.charCodeAt(r+1))<56320||i>57343?n[r]:n.slice(r,r+2);e.push(s),r+=s.length}return e}function On(n,e,t,r,o){let i;const s=e.length;for(let l=0;l<s-1;l++){const a=e[l];n.j[a]?i=n.j[a]:(i=new gt(r),i.jr=o.slice(),n.j[a]=i),n=i}return i=new gt(t),i.jr=o.slice(),n.j[e[s-1]]=i,i}function Gd(n){const e=[],t=[];let r=0,o="0123456789";for(;r<n.length;){let i=0;for(;o.indexOf(n[r+i])>=0;)i++;if(i>0){e.push(t.join(""));for(let s=parseInt(n.substring(r,r+i),10);s>0;s--)t.pop();r+=i}else t.push(n[r]),r++}return e}const oo={defaultProtocol:"http",events:null,format:Jd,formatHref:Jd,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function Pa(n,e){e===void 0&&(e=null);let t=vr({},oo);n&&(t=vr(t,n instanceof Pa?n.o:n));const r=t.ignoreTags,o=[];for(let i=0;i<r.length;i++)o.push(r[i].toUpperCase());this.o=t,e&&(this.defaultRender=e),this.ignoreTags=o}Pa.prototype={o:oo,ignoreTags:[],defaultRender(n){return n},check(n){return this.get("validate",n.toString(),n)},get(n,e,t){const r=e!=null;let o=this.o[n];return o&&(typeof o=="object"?(o=t.t in o?o[t.t]:oo[n],typeof o=="function"&&r&&(o=o(e,t))):typeof o=="function"&&r&&(o=o(e,t.t,t)),o)},getObj(n,e,t){let r=this.o[n];return typeof r=="function"&&e!=null&&(r=r(e,t.t,t)),r},render(n){const e=n.render(this);return(this.get("render",null,n)||this.defaultRender)(e,n.t,n)}};function Jd(n){return n}function Yd(n,e){this.t="token",this.v=n,this.tk=e}Yd.prototype={isLink:!1,toString(){return this.v},toHref(n){return this.toString()},toFormattedString(n){const e=this.toString(),t=n.get("truncate",e,this),r=n.get("format",e,this);return t&&r.length>t?r.substring(0,t)+"…":r},toFormattedHref(n){return n.get("formatHref",this.toHref(n.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(n){return n===void 0&&(n=oo.defaultProtocol),{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(n),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(n){return{type:this.t,value:this.toFormattedString(n),isLink:this.isLink,href:this.toFormattedHref(n),start:this.startIndex(),end:this.endIndex()}},validate(n){return n.get("validate",this.toString(),this)},render(n){const e=this,t=this.toHref(n.get("defaultProtocol")),r=n.get("formatHref",t,this),o=n.get("tagName",t,e),i=this.toFormattedString(n),s={},l=n.get("className",t,e),a=n.get("target",t,e),c=n.get("rel",t,e),u=n.getObj("attributes",t,e),d=n.getObj("events",t,e);return s.href=r,l&&(s.class=l),a&&(s.target=a),c&&(s.rel=c),u&&vr(s,u),{tagName:o,attributes:s,content:i,eventListeners:d}}};function Li(n,e){class t extends Yd{constructor(o,i){super(o,i),this.t=n}}for(const r in e)t.prototype[r]=e[r];return t.t=n,t}const Xd=Li("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),Zd=Li("text"),F2=Li("nl"),Pi=Li("url",{isLink:!0,toHref(n){return n===void 0&&(n=oo.defaultProtocol),this.hasProtocol()?this.v:`${n}://${this.v}`},hasProtocol(){const n=this.tk;return n.length>=2&&n[0].t!==eo&&n[1].t===An}}),Nt=n=>new gt(n);function V2(n){let{groups:e}=n;const t=e.domain.concat([yi,bi,Tn,xi,Si,Ei,ki,Ci,_t,Ta,wi,Ti,Ai,Oi,qt,Ni,ro,Ii]),r=[vi,An,Oa,Qt,Ma,Mi,Ia,Na,ai,li,to,no,oi,ri,ii,si,ci,ui,di,fi,pi,hi,mi,gi],o=[yi,vi,bi,xi,Si,Ei,ki,Ci,_t,to,no,wi,Ti,Ai,Oi,Mi,qt,Ni,ro,Ii],i=Nt(),s=ue(i,ro);Oe(s,o,s),Oe(s,e.domain,s);const l=Nt(),a=Nt(),c=Nt();Oe(i,e.domain,l),Oe(i,e.scheme,a),Oe(i,e.slashscheme,c),Oe(l,o,s),Oe(l,e.domain,l);const u=ue(l,Tn);ue(s,Tn,u),ue(a,Tn,u),ue(c,Tn,u);const d=ue(s,Qt);Oe(d,o,s),Oe(d,e.domain,s);const f=Nt();Oe(u,e.domain,f),Oe(f,e.domain,f);const h=ue(f,Qt);Oe(h,e.domain,f);const p=Nt(Xd);Oe(h,e.tld,p),Oe(h,e.utld,p),ue(u,eo,p);const g=ue(f,_t);Oe(g,e.domain,f),Oe(p,e.domain,f),ue(p,Qt,h),ue(p,_t,g);const y=ue(p,An);Oe(y,e.numeric,Xd);const S=ue(l,_t),k=ue(l,Qt);Oe(S,e.domain,l),Oe(k,o,s),Oe(k,e.domain,l);const C=Nt(Pi);Oe(k,e.tld,C),Oe(k,e.utld,C),Oe(C,e.domain,l),Oe(C,o,s),ue(C,Qt,k),ue(C,_t,S),ue(C,Tn,u);const b=ue(C,An),R=Nt(Pi);Oe(b,e.numeric,R);const w=Nt(Pi),F=Nt();Oe(w,t,w),Oe(w,r,F),Oe(F,t,w),Oe(F,r,F),ue(C,qt,w),ue(R,qt,w);const z=ue(a,An),$=ue(c,An),V=ue($,qt),B=ue(V,qt);Oe(a,e.domain,l),ue(a,Qt,k),ue(a,_t,S),Oe(c,e.domain,l),ue(c,Qt,k),ue(c,_t,S),Oe(z,e.domain,w),ue(z,qt,w),Oe(B,e.domain,w),Oe(B,t,w),ue(B,qt,w);const P=[[to,no],[ri,oi],[ii,si],[ai,li],[ci,ui],[di,fi],[pi,hi],[mi,gi]];for(let H=0;H<P.length;H++){const[Y,Z]=P[H],Q=ue(w,Y);ue(F,Y,Q),ue(Q,Z,w);const re=Nt(Pi);Oe(Q,t,re);const W=Nt();Oe(Q,r),Oe(re,t,re),Oe(re,r,W),Oe(W,t,re),Oe(W,r,W),ue(re,Z,w),ue(W,Z,w)}return ue(i,eo,C),ue(i,Aa,F2),{start:i,tokens:jd}}function z2(n,e,t){let r=t.length,o=0,i=[],s=[];for(;o<r;){let l=n,a=null,c=null,u=0,d=null,f=-1;for(;o<r&&!(a=l.go(t[o].t));)s.push(t[o++]);for(;o<r&&(c=a||l.go(t[o].t));)a=null,l=c,l.accepts()?(f=0,d=l):f>=0&&f++,o++,u++;if(f<0)o-=u,o<r&&(s.push(t[o]),o++);else{s.length>0&&(i.push(Ba(Zd,e,s)),s=[]),o-=f,u-=f;const h=d.t,p=t.slice(o-u,o);i.push(Ba(h,e,p))}}return s.length>0&&i.push(Ba(Zd,e,s)),i}function Ba(n,e,t){const r=t[0].s,o=t[t.length-1].e,i=e.slice(r,o);return new n(i,t)}const $2=typeof console<"u"&&console&&console.warn||(()=>{}),U2="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",Ve={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function H2(){gt.groups={},Ve.scanner=null,Ve.parser=null,Ve.tokenQueue=[],Ve.pluginQueue=[],Ve.customSchemes=[],Ve.initialized=!1}function Qd(n,e){if(e===void 0&&(e=!1),Ve.initialized&&$2(`linkifyjs: already initialized - will not register custom scheme "${n}" ${U2}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(n))throw new Error(`linkifyjs: incorrect scheme format.
|
|
124
124
|
1. Must only contain digits, lowercase ASCII letters or "-"
|
|
125
125
|
2. Cannot start or end with "-"
|
|
126
|
-
3. "-" cannot repeat`);Ve.customSchemes.push([n,e])}function M2(){Ve.scanner=x2(Ve.customSchemes);for(let n=0;n<Ve.tokenQueue.length;n++)Ve.tokenQueue[n][1]({scanner:Ve.scanner});Ve.parser=k2(Ve.scanner.tokens);for(let n=0;n<Ve.pluginQueue.length;n++)Ve.pluginQueue[n][1]({scanner:Ve.scanner,parser:Ve.parser});Ve.initialized=!0}function I2(n){return Ve.initialized||M2(),w2(Ve.parser.start,n,S2(Ve.scanner.start,n))}function La(n,e,t){if(e===void 0&&(e=null),t===void 0&&(t=null),e&&typeof e=="object"){if(t)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);t=e,e=null}const r=new Ra(t),o=I2(n),i=[];for(let s=0;s<o.length;s++){const l=o[s];l.isLink&&(!e||l.t===e)&&r.check(l)&&i.push(l.toFormattedObject(r))}return i}function N2(n){return new ft({key:new Ft("autolink"),appendTransaction:(e,t,r)=>{const o=e.some(c=>c.docChanged)&&!t.doc.eq(r.doc),i=e.some(c=>c.getMeta("preventAutolink"));if(!o||i)return;const{tr:s}=r,l=W0(t.doc,[...e]);if(q0(l).forEach(({newRange:c})=>{const u=G0(r.doc,c,h=>h.isTextblock);let d,f;if(u.length>1?(d=u[0],f=r.doc.textBetween(d.pos,d.pos+d.node.nodeSize,void 0," ")):u.length&&r.doc.textBetween(c.from,c.to," "," ").endsWith(" ")&&(d=u[0],f=r.doc.textBetween(d.pos,c.to,void 0," ")),d&&f){const h=f.split(" ").filter(y=>y!=="");if(h.length<=0)return!1;const p=h[h.length-1],g=d.pos+f.lastIndexOf(p);if(!p)return!1;La(p).filter(y=>y.isLink).map(y=>({...y,from:g+y.start+1,to:g+y.end+1})).filter(y=>r.schema.marks.code?!r.doc.rangeHasMark(y.from,y.to,r.schema.marks.code):!0).filter(y=>n.validate?n.validate(y.value):!0).forEach(y=>{Xs(y.from,y.to,r.doc).some(S=>S.mark.type===n.type)||s.addMark(y.from,y.to,n.type.create({href:y.href}))})}}),!!s.steps.length)return s}})}function R2(n){return new ft({key:new Ft("handleClickLink"),props:{handleClick:(e,t,r)=>{var o,i;if(r.button!==0||r.target.nodeName!=="A")return!1;const l=Bu(e.state,n.type.name),a=r.target,c=(o=a==null?void 0:a.href)!==null&&o!==void 0?o:l.href,u=(i=a==null?void 0:a.target)!==null&&i!==void 0?i:l.target;return a&&c?(e.editable&&window.open(c,u),!0):!1}}})}function D2(n){return new ft({key:new Ft("handlePasteLink"),props:{handlePaste:(e,t,r)=>{var o;const{state:i}=e,{selection:s}=i,{empty:l}=s;if(l)return!1;let a="";r.content.forEach(p=>{a+=p.textContent});const c=La(a).find(p=>p.isLink&&p.value===a);if(!a||!c)return!1;const u=(o=t.clipboardData)===null||o===void 0?void 0:o.getData("text/html"),d=/href="([^"]*)"/,f=u==null?void 0:u.match(d),h=f?f[1]:c.href;return n.editor.commands.setMark(n.type,{href:h}),!0}}})}const L2=Yt.create({name:"link",priority:1e3,keepOnSplit:!1,onCreate(){this.options.protocols.forEach(n=>{if(typeof n=="string"){Wd(n);return}Wd(n.scheme,n.optionalSlashes)})},onDestroy(){O2()},inclusive(){return this.options.autolink},addOptions(){return{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(){return[{tag:'a[href]:not([href *= "javascript:" i])'}]},renderHTML({HTMLAttributes:n}){return["a",ct(this.options.HTMLAttributes,n),0]},addCommands(){return{setLink:n=>({chain:e})=>e().setMark(this.name,n).setMeta("preventAutolink",!0).run(),toggleLink:n=>({chain:e})=>e().toggleMark(this.name,n,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run(),unsetLink:()=>({chain:n})=>n().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[Ur({find:n=>La(n).filter(e=>this.options.validate?this.options.validate(e.value):!0).filter(e=>e.isLink).map(e=>({text:e.value,index:e.start,data:e})),type:this.type,getAttributes:(n,e)=>{var t,r;const o=(t=e==null?void 0:e.clipboardData)===null||t===void 0?void 0:t.getData("text/html"),i=/href="([^"]*)"/,s=o==null?void 0:o.match(i);return s?{href:s[1]}:{href:(r=n.data)===null||r===void 0?void 0:r.href}}})]},addProseMirrorPlugins(){const n=[];return this.options.autolink&&n.push(N2({type:this.type,validate:this.options.validate})),this.options.openOnClick&&n.push(R2({type:this.type})),this.options.linkOnPaste&&n.push(D2({editor:this.editor,type:this.type})),n}}).extend({addAttributes(){var n;return{...(n=this.parent)==null?void 0:n.call(this),title:{default:null,parseHTML:e=>e.getAttribute("title"),renderHTML:e=>({title:e.title})}}}}),P2=Tt.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new ft({key:new Ft("placeholder"),props:{decorations:({doc:n,selection:e})=>{const t=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=e,o=[];if(!t)return null;const i=n.type.createAndFill(),s=(i==null?void 0:i.sameMarkup(n))&&i.content.findDiffStart(n.content)===null;return n.descendants((l,a)=>{const c=r>=a&&r<=a+l.nodeSize,u=!l.isLeaf&&!l.childCount;if((c||!this.options.showOnlyCurrent)&&u){const d=[this.options.emptyNodeClass];s&&d.push(this.options.emptyEditorClass);const f=wt.node(a,a+l.nodeSize,{class:d.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:l,pos:a,hasAnchor:c}):this.options.placeholder});o.push(f)}return this.options.includeChildren}),We.create(n,o)}}})]}}),B2=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))$/,F2=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))/g,V2=/(?:^|\s)((?:__)((?:[^__]+))(?:__))$/,z2=/(?:^|\s)((?:__)((?:[^__]+))(?:__))/g,$2=Yt.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:n=>n.style.fontWeight!=="normal"&&null},{style:"font-weight",getAttrs:n=>/^(bold(er)?|[5-9]\d{2,})$/.test(n)&&null}]},renderHTML({HTMLAttributes:n}){return["strong",ct(this.options.HTMLAttributes,n),0]},addCommands(){return{setBold:()=>({commands:n})=>n.setMark(this.name),toggleBold:()=>({commands:n})=>n.toggleMark(this.name),unsetBold:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[Wo({find:B2,type:this.type}),Wo({find:V2,type:this.type})]},addPasteRules(){return[Ur({find:F2,type:this.type}),Ur({find:z2,type:this.type})]}}),H2=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))$/,U2=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))/g,j2=/(?:^|\s)((?:_)((?:[^_]+))(?:_))$/,W2=/(?:^|\s)((?:_)((?:[^_]+))(?:_))/g,K2=Yt.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:n=>n.style.fontStyle!=="normal"&&null},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:n}){return["em",ct(this.options.HTMLAttributes,n),0]},addCommands(){return{setItalic:()=>({commands:n})=>n.setMark(this.name),toggleItalic:()=>({commands:n})=>n.toggleMark(this.name),unsetItalic:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Wo({find:H2,type:this.type}),Wo({find:j2,type:this.type})]},addPasteRules(){return[Ur({find:U2,type:this.type}),Ur({find:W2,type:this.type})]}}),G2=Yt.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:n=>n.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["u",ct(this.options.HTMLAttributes,n),0]},addCommands(){return{setUnderline:()=>({commands:n})=>n.setMark(this.name),toggleUnderline:()=>({commands:n})=>n.toggleMark(this.name),unsetUnderline:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),J2=At.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:n}){return["li",ct(this.options.HTMLAttributes,n),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)}}}),Y2=At.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:n}){return["li",ct(this.options.HTMLAttributes,n),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)}}}),Kd=Yt.create({name:"textStyle",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:n=>n.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["span",ct(this.options.HTMLAttributes,n),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:n,commands:e})=>{const t=Uo(n,this.type);return Object.entries(t).some(([,o])=>!!o)?!0:e.unsetMark(this.name)}}}}),Gd=/^\s*([-+*])\s$/,X2=At.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:n}){return["ul",ct(this.options.HTMLAttributes,n),0]},addCommands(){return{toggleBulletList:()=>({commands:n,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(Y2.name,this.editor.getAttributes(Kd.name)).run():n.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let n=Ko({find:Gd,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(n=Ko({find:Gd,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(Kd.name),editor:this.editor})),[n]}}),Z2=At.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:n}){return["li",ct(this.options.HTMLAttributes,n),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)}}}),Jd=Yt.create({name:"textStyle",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:n=>n.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["span",ct(this.options.HTMLAttributes,n),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:n,commands:e})=>{const t=Uo(n,this.type);return Object.entries(t).some(([,o])=>!!o)?!0:e.unsetMark(this.name)}}}}),Yd=/^(\d+)\.\s$/,Q2=At.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:n=>n.hasAttribute("start")?parseInt(n.getAttribute("start")||"",10):1}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:n}){const{start:e,...t}=n;return e===1?["ol",ct(this.options.HTMLAttributes,t),0]:["ol",ct(this.options.HTMLAttributes,n),0]},addCommands(){return{toggleOrderedList:()=>({commands:n,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(Z2.name,this.editor.getAttributes(Jd.name)).run():n.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let n=Ko({find:Yd,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(n=Ko({find:Yd,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(Jd.name)}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1],editor:this.editor})),[n]}}),_2=At.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:n}){return["br",ct(this.options.HTMLAttributes,n)]},renderText(){return`
|
|
127
|
-
`},addCommands(){return{setHardBreak:()=>({commands:n,chain:e,state:t,editor:r})=>n.first([()=>n.exitCode(),()=>n.command(()=>{const{selection:o,storedMarks:i}=t;if(o.$from.parent.type.spec.isolating)return!1;const{keepMarks:s}=this.options,{splittableMarks:l}=r.extensionManager,a=i||o.$to.parentOffset&&o.$from.marks();return e().insertContent({type:this.name}).command(({tr:c,dispatch:u})=>{if(u&&a&&s){const d=a.filter(f=>l.includes(f.type.name));c.ensureMarks(d)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),Pa={BASIC:"basic",FULL:"full"},q2={class:"bd-markdown-editor__menu-bottom"},e5={key:0,class:"vr"},t5={key:4,class:"vr"},n5={key:7,class:"vr"},Xd=m.defineComponent({__name:"BDMarkdownEditor",props:{placeholder:{default:"Typ een bericht"},errorText:{default:"er is iets fout gegaan"},state:{type:Boolean,default:void 0},variant:{default:Pa.BASIC},modelValue:{}},emits:["update:modelValue","upload"],setup(n,{emit:e}){const t=n,r=()=>{e("upload")},o=Nn(t,"modelValue",e),i=[c2,u2,d2,P2.configure({placeholder:t.placeholder}),_2];t.variant===Pa.FULL&&i.push($2,K2,G2,J2,X2,Q2,L2.configure({openOnClick:!1,validate:h=>/^https?:\/\//.test(h)}));const s=l2({content:o.value,extensions:i,onUpdate:({editor:h})=>{const{view:p,state:g}=h,{from:y,to:S}=p.state.selection;if(g.doc.textBetween(y-1,S,"")==" "&&h.getAttributes("link").href!=null&&h.chain().setTextSelection({from:y-1,to:S}).toggleLink({href:h.getAttributes("link").href}).setTextSelection({from:S,to:S}).run(),h.getText().trim()===""){e("update:modelValue","");return}e("update:modelValue",h.getHTML())}});m.watch(()=>t.modelValue,h=>{s.value.getHTML()!==h&&s.value.commands.setContent(h,!0,{preserveWhitespace:"full"})});const l=m.computed(()=>t.state?"is-invalid":null),a=m.computed(()=>f("bold")),c=m.computed(()=>f("italic")),u=m.computed(()=>f("underline"));m.computed(()=>f("bulletList")),m.computed(()=>f("orderedList"));const d=m.computed(()=>t.variant===Pa.FULL),f=h=>s.value&&s.value.isActive(h)?"active":null;return(h,p)=>(m.openBlock(),m.createElementBlock(m.Fragment,null,[m.createElementVNode("div",{class:m.normalizeClass(["bd-markdown-editor",l.value])},[m.createVNode(m.unref(a2),{editor:m.unref(s)},null,8,["editor"]),m.renderSlot(h.$slots,"default"),m.createElementVNode("div",q2,[m.createVNode(Ut,{variant:"light",type:"button",onClick:r},{default:m.withCtx(()=>[m.createVNode(m.unref(Er))]),_:1}),d.value?(m.openBlock(),m.createElementBlock("div",e5)):m.createCommentVNode("",!0),d.value?(m.openBlock(),m.createBlock(Ut,{key:1,variant:"light",type:"button",class:m.normalizeClass(a.value),onClick:p[0]||(p[0]=g=>m.unref(s).chain().focus().toggleBold().run())},{default:m.withCtx(()=>[m.createVNode(m.unref(Ui))]),_:1},8,["class"])):m.createCommentVNode("",!0),d.value?(m.openBlock(),m.createBlock(Ut,{key:2,variant:"light",type:"button",class:m.normalizeClass(c.value),onClick:p[1]||(p[1]=g=>m.unref(s).chain().focus().toggleItalic().run())},{default:m.withCtx(()=>[m.createVNode(m.unref(Hi))]),_:1},8,["class"])):m.createCommentVNode("",!0),d.value?(m.openBlock(),m.createBlock(Ut,{key:3,variant:"light",type:"button",class:m.normalizeClass(u.value),onClick:p[2]||(p[2]=g=>m.unref(s).chain().focus().toggleUnderline().run())},{default:m.withCtx(()=>[m.createVNode(m.unref(ji))]),_:1},8,["class"])):m.createCommentVNode("",!0),d.value?(m.openBlock(),m.createElementBlock("div",t5)):m.createCommentVNode("",!0),d.value?(m.openBlock(),m.createBlock(Ut,{key:5,variant:"light",type:"button",class:"IsUnderlineActive",onClick:p[3]||(p[3]=g=>m.unref(s).chain().focus().toggleUnderline().run())},{default:m.withCtx(()=>[m.createVNode(m.unref(Wi))]),_:1})):m.createCommentVNode("",!0),d.value?(m.openBlock(),m.createBlock(Ut,{key:6,variant:"light",type:"button",class:"IsBulletListActive",onClick:p[4]||(p[4]=g=>m.unref(s).chain().focus().toggleBulletList().run())},{default:m.withCtx(()=>[m.createVNode(m.unref(Ki))]),_:1})):m.createCommentVNode("",!0),d.value?(m.openBlock(),m.createElementBlock("div",n5)):m.createCommentVNode("",!0),d.value?(m.openBlock(),m.createBlock(Ut,{key:8,variant:"light",type:"button",class:"IsOrderedListActive",onClick:p[5]||(p[5]=g=>m.unref(s).chain().focus().toggleOrderedList().run())},{default:m.withCtx(()=>[m.createVNode(m.unref(Gi))]),_:1})):m.createCommentVNode("",!0)])],2),m.createVNode(m.unref(fo),{text:t.errorText,state:t.state},null,8,["text","state"])],64))}}),r5={class:"bd-user"},o5={class:"bd-user__information"},i5={class:"text-break"},s5={class:"overflow-x-hidden"},Zd=m.defineComponent({__name:"BDUser",props:{name:{default:""},img:{default:void 0},details:{default:void 0},hideImage:{type:Boolean,default:!1}},setup(n){const e=n,t=m.computed(()=>{var r;return typeof e.details=="string"?e.details:(r=e.details)==null?void 0:r.join(" • ")});return(r,o)=>(m.openBlock(),m.createElementBlock("div",r5,[e.hideImage?m.createCommentVNode("",!0):(m.openBlock(),m.createBlock(Ji,m.mergeProps({key:0},e.img,{size:"sm"}),null,16)),m.createElementVNode("div",o5,[m.createElementVNode("header",null,[m.createElementVNode("h5",i5,m.toDisplayString(e.name),1),m.renderSlot(r.$slots,"header-extra")]),m.createElementVNode("span",s5,m.toDisplayString(t.value),1)])]))}}),a5={class:"bd-dropdown dropdown"},Qd=m.defineComponent({__name:"BDDropdown",props:{size:{default:ot.MD},variant:{default:lo.PRIMARY},right:{type:Boolean,default:void 0},noFlip:{type:Boolean,default:void 0},toggleTag:{default:"button"},toggleClass:{},actionToggle:{type:Boolean,default:void 0},text:{default:""},offset:{default:void 0}},setup(n){const e=n,{uniqueIdentifier:t}=Cr(),r=`__BD__DROPDOWN__${t.value}`,o=m.computed(()=>({class:{btn:e.toggleTag==="button",[`btn-${e.variant}`]:e.toggleTag==="button"&&e.variant,[`btn-${e.size}`]:e.toggleTag==="button"&&e.size,[`${e.toggleClass}`]:e.toggleClass!==void 0,"dropdown-toggle-action":e.actionToggle},"data-bs-display":e.noFlip?"static":null,"data-bs-offset":e.offset?e.offset:null,id:r})),i=m.computed(()=>({"dropdown-menu-end":e.right,"dropdown-menu-action":e.actionToggle})),s=m.computed(()=>({"aria-labelledby":r}));return(l,a)=>(m.openBlock(),m.createElementBlock("div",a5,[(m.openBlock(),m.createBlock(m.resolveDynamicComponent(e.toggleTag),m.mergeProps({class:"dropdown-toggle",target:"_self",role:"button","data-bs-toggle":"dropdown"},o.value),{default:m.withCtx(()=>[m.createElementVNode("span",null,m.toDisplayString(e.text),1)]),_:1},16)),m.createElementVNode("ul",m.mergeProps({class:["dropdown-menu",i.value]},s.value),[m.renderSlot(l.$slots,"default")],16)]))}}),l5={class:"modal bd-modal modal-lg",tabindex:"-1"},c5={class:"modal-dialog"},u5={class:"modal-content"},d5={class:"modal-header"},f5={class:"modal-title fw-light"},p5={class:"modal-body"},h5={key:0,class:"modal-footer"},m5=["disabled"],_d=m.defineComponent({__name:"BDModal",props:{title:{default:""},submitButtonTitle:{default:"Opslaan"},closeButtonTitle:{default:"Annuleren"},hideFooterCancelButton:{type:Boolean,default:!1},hideFooterSubmitButton:{type:Boolean,default:!1},hideFooter:{type:Boolean,default:!1},disableSubmitButton:{type:Boolean,default:!1}},emits:["submit","cancel"],setup(n,{emit:e}){const t=n,r=()=>{e("submit")},o=()=>{e("cancel")};return(i,s)=>(m.openBlock(),m.createElementBlock("div",l5,[m.createElementVNode("div",c5,[m.createElementVNode("div",u5,[m.createElementVNode("div",d5,[m.createElementVNode("h2",f5,m.toDisplayString(t.title),1),m.renderSlot(i.$slots,"modal-header-space-between"),m.createElementVNode("button",{type:"button",class:"btn-close w-auto","data-bs-dismiss":"modal","aria-label":"Sluiten",onClick:o},[m.createTextVNode("Sluiten "),m.createVNode(m.unref($i),{class:"bg-primary"})])]),m.createElementVNode("div",p5,[m.renderSlot(i.$slots,"default")]),i.hideFooter?m.createCommentVNode("",!0):(m.openBlock(),m.createElementBlock("div",h5,[t.hideFooterSubmitButton?m.createCommentVNode("",!0):(m.openBlock(),m.createElementBlock("button",{key:0,type:"button",class:"btn btn-primary",disabled:t.disableSubmitButton,onClick:r},m.toDisplayString(t.submitButtonTitle),9,m5)),t.hideFooterCancelButton?m.createCommentVNode("",!0):(m.openBlock(),m.createElementBlock("button",{key:1,type:"button",class:"btn btn-link","data-bs-dismiss":"modal",onClick:o,"aria-label":"Annuleren"},m.toDisplayString(t.closeButtonTitle),1))]))])])]))}}),g5={PRIMARY:"primary",SECONDARY:"secondary",COLLEAGUE:"colleague",DANGER:"danger",OUT_PRIMARY:"outline-primary",OUT_PRIMARY_DARK:"outline-primary-dark",OUT_TERTIARY:"outline-tertiary",OUT_LINK:"link",LIGHT:"light",DARK:"dark"},Ut=m.defineComponent({__name:"BDButton",props:{size:{default:ot.MD},variant:{default:g5.PRIMARY},blockElement:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},to:{},target:{},text:{},rel:{}},emits:["click"],setup(n,{emit:e}){const t=n,r=m.computed(()=>({btn:!0,[`btn-${t.variant}`]:t.variant,[`btn-${t.size}`]:!0,"d-grid":t.blockElement&&typeof t.to=="string",[`${t.class}`]:t.class,disabled:t.disabled})),o=m.computed(()=>t.to?ao:"button"),i=m.computed(()=>{const l={};return t.to?(l.to=t.to,l.role="button"):l.type="submit",l}),s=()=>{e("click")};return(l,a)=>(m.openBlock(),m.createBlock(m.resolveDynamicComponent(o.value),m.mergeProps({class:["bd-btn",r.value]},i.value,{onClick:s}),{default:m.withCtx(()=>[m.renderSlot(l.$slots,"default",{},()=>[m.createTextVNode(m.toDisplayString(t.text),1)])]),_:3},16,["class"]))}}),y5={install:n=>{n.component("BDCol",Ha),n.component("BDContainer",Ua),n.component("BRow",ja),n.component("BDButton",Ut),n.component("BDLogo",Ga),n.component("BDLink",ao),n.component("BDDropdownItem",dl),n.component("BDDropdown",Qd),n.component("BDAlert",Ya),n.component("BDProfileImage",Ji),n.component("BDZoomslider",Qa),n.component("BDCard",Xi),n.component("BDCollapsableCard",el),n.component("BDFormInput",tl),n.component("BDInputGroup",nl),n.component("BDFormInvalidFeedback",fo),n.component("BDBadge",rl),n.component("BDForm",ol),n.component("BDPagination",il),n.component("BDDropzone",hl),n.component("BDMarkdownEditor",Xd),n.component("BDModal",_d),n.component("BDFormSelect",sl),n.component("BDUser",Zd),n.component("IconAttachment",Er),n.component("IconBold",Ui),n.component("IconBulletList",Wi),n.component("IconCaretDown",Ka),n.component("IconCaretLeft",zi),n.component("IconCaretRight",Vi),n.component("IconCheck",oo),n.component("IconClose",$i),n.component("IconError",io),n.component("IconFile",Fi),n.component("IconHyperlink",Gi),n.component("IconInfo",so),n.component("IconOrderedList",Ki),n.component("IconItalic",Hi),n.component("IconRemove",Bi),n.component("IconUnderline",ji),n.component("IconCalendar",Wa),n.component("BDArticle",ll),n.component("BDFormCheckbox",al),n.component("BDToast",ul)}};ve.BDAlert=Ya,ve.BDArticle=ll,ve.BDBadge=rl,ve.BDButton=Ut,ve.BDCard=Xi,ve.BDCol=Ha,ve.BDCollapsableCard=el,ve.BDContainer=Ua,ve.BDDropdown=Qd,ve.BDDropdownItem=dl,ve.BDDropzone=hl,ve.BDForm=ol,ve.BDFormCheckbox=al,ve.BDFormInput=tl,ve.BDFormInvalidFeedback=fo,ve.BDFormSelect=sl,ve.BDInputGroup=nl,ve.BDLink=ao,ve.BDLogo=Ga,ve.BDMarkdownEditor=Xd,ve.BDModal=_d,ve.BDPagination=il,ve.BDProfileImage=Ji,ve.BDRow=ja,ve.BDToast=ul,ve.BDUser=Zd,ve.BDZoomslider=Qa,ve.IconAttachment=Er,ve.IconBold=Ui,ve.IconBulletList=Wi,ve.IconCalendar=Wa,ve.IconCaretLeft=zi,ve.IconCaretRight=Vi,ve.IconCheck=oo,ve.IconClose=$i,ve.IconError=io,ve.IconFile=Fi,ve.IconHyperlink=Gi,ve.IconInfo=so,ve.IconItalic=Hi,ve.IconOrderedList=Ki,ve.IconRemove=Bi,ve.IconUnderline=ji,ve.default=y5,Object.defineProperties(ve,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
126
|
+
3. "-" cannot repeat`);Ve.customSchemes.push([n,e])}function j2(){Ve.scanner=L2(Ve.customSchemes);for(let n=0;n<Ve.tokenQueue.length;n++)Ve.tokenQueue[n][1]({scanner:Ve.scanner});Ve.parser=V2(Ve.scanner.tokens);for(let n=0;n<Ve.pluginQueue.length;n++)Ve.pluginQueue[n][1]({scanner:Ve.scanner,parser:Ve.parser});Ve.initialized=!0}function W2(n){return Ve.initialized||j2(),z2(Ve.parser.start,n,P2(Ve.scanner.start,n))}function Fa(n,e,t){if(e===void 0&&(e=null),t===void 0&&(t=null),e&&typeof e=="object"){if(t)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);t=e,e=null}const r=new Pa(t),o=W2(n),i=[];for(let s=0;s<o.length;s++){const l=o[s];l.isLink&&(!e||l.t===e)&&r.check(l)&&i.push(l.toFormattedObject(r))}return i}function K2(n){return new ft({key:new Ft("autolink"),appendTransaction:(e,t,r)=>{const o=e.some(c=>c.docChanged)&&!t.doc.eq(r.doc),i=e.some(c=>c.getMeta("preventAutolink"));if(!o||i)return;const{tr:s}=r,l=oy(t.doc,[...e]);if(py(l).forEach(({newRange:c})=>{const u=sy(r.doc,c,h=>h.isTextblock);let d,f;if(u.length>1?(d=u[0],f=r.doc.textBetween(d.pos,d.pos+d.node.nodeSize,void 0," ")):u.length&&r.doc.textBetween(c.from,c.to," "," ").endsWith(" ")&&(d=u[0],f=r.doc.textBetween(d.pos,c.to,void 0," ")),d&&f){const h=f.split(" ").filter(y=>y!=="");if(h.length<=0)return!1;const p=h[h.length-1],g=d.pos+f.lastIndexOf(p);if(!p)return!1;Fa(p).filter(y=>y.isLink).map(y=>({...y,from:g+y.start+1,to:g+y.end+1})).filter(y=>r.schema.marks.code?!r.doc.rangeHasMark(y.from,y.to,r.schema.marks.code):!0).filter(y=>n.validate?n.validate(y.value):!0).forEach(y=>{_s(y.from,y.to,r.doc).some(S=>S.mark.type===n.type)||s.addMark(y.from,y.to,n.type.create({href:y.href}))})}}),!!s.steps.length)return s}})}function G2(n){return new ft({key:new Ft("handleClickLink"),props:{handleClick:(e,t,r)=>{var o,i;if(r.button!==0||r.target.nodeName!=="A")return!1;const l=ju(e.state,n.type.name),a=r.target,c=(o=a==null?void 0:a.href)!==null&&o!==void 0?o:l.href,u=(i=a==null?void 0:a.target)!==null&&i!==void 0?i:l.target;return a&&c?(e.editable&&window.open(c,u),!0):!1}}})}function J2(n){return new ft({key:new Ft("handlePasteLink"),props:{handlePaste:(e,t,r)=>{var o;const{state:i}=e,{selection:s}=i,{empty:l}=s;if(l)return!1;let a="";r.content.forEach(p=>{a+=p.textContent});const c=Fa(a).find(p=>p.isLink&&p.value===a);if(!a||!c)return!1;const u=(o=t.clipboardData)===null||o===void 0?void 0:o.getData("text/html"),d=/href="([^"]*)"/,f=u==null?void 0:u.match(d),h=f?f[1]:c.href;return n.editor.commands.setMark(n.type,{href:h}),!0}}})}const Y2=Yt.create({name:"link",priority:1e3,keepOnSplit:!1,onCreate(){this.options.protocols.forEach(n=>{if(typeof n=="string"){Qd(n);return}Qd(n.scheme,n.optionalSlashes)})},onDestroy(){H2()},inclusive(){return this.options.autolink},addOptions(){return{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(){return[{tag:'a[href]:not([href *= "javascript:" i])'}]},renderHTML({HTMLAttributes:n}){return["a",ct(this.options.HTMLAttributes,n),0]},addCommands(){return{setLink:n=>({chain:e})=>e().setMark(this.name,n).setMeta("preventAutolink",!0).run(),toggleLink:n=>({chain:e})=>e().toggleMark(this.name,n,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run(),unsetLink:()=>({chain:n})=>n().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[jr({find:n=>Fa(n).filter(e=>this.options.validate?this.options.validate(e.value):!0).filter(e=>e.isLink).map(e=>({text:e.value,index:e.start,data:e})),type:this.type,getAttributes:(n,e)=>{var t,r;const o=(t=e==null?void 0:e.clipboardData)===null||t===void 0?void 0:t.getData("text/html"),i=/href="([^"]*)"/,s=o==null?void 0:o.match(i);return s?{href:s[1]}:{href:(r=n.data)===null||r===void 0?void 0:r.href}}})]},addProseMirrorPlugins(){const n=[];return this.options.autolink&&n.push(K2({type:this.type,validate:this.options.validate})),this.options.openOnClick&&n.push(G2({type:this.type})),this.options.linkOnPaste&&n.push(J2({editor:this.editor,type:this.type})),n}}).extend({addAttributes(){var n;return{...(n=this.parent)==null?void 0:n.call(this),title:{default:null,parseHTML:e=>e.getAttribute("title"),renderHTML:e=>({title:e.title})}}}}),X2=Tt.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new ft({key:new Ft("placeholder"),props:{decorations:({doc:n,selection:e})=>{const t=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=e,o=[];if(!t)return null;const i=n.type.createAndFill(),s=(i==null?void 0:i.sameMarkup(n))&&i.content.findDiffStart(n.content)===null;return n.descendants((l,a)=>{const c=r>=a&&r<=a+l.nodeSize,u=!l.isLeaf&&!l.childCount;if((c||!this.options.showOnlyCurrent)&&u){const d=[this.options.emptyNodeClass];s&&d.push(this.options.emptyEditorClass);const f=wt.node(a,a+l.nodeSize,{class:d.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:l,pos:a,hasAnchor:c}):this.options.placeholder});o.push(f)}return this.options.includeChildren}),We.create(n,o)}}})]}}),Z2=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))$/,Q2=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))/g,_2=/(?:^|\s)((?:__)((?:[^__]+))(?:__))$/,q2=/(?:^|\s)((?:__)((?:[^__]+))(?:__))/g,e5=Yt.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:n=>n.style.fontWeight!=="normal"&&null},{style:"font-weight",getAttrs:n=>/^(bold(er)?|[5-9]\d{2,})$/.test(n)&&null}]},renderHTML({HTMLAttributes:n}){return["strong",ct(this.options.HTMLAttributes,n),0]},addCommands(){return{setBold:()=>({commands:n})=>n.setMark(this.name),toggleBold:()=>({commands:n})=>n.toggleMark(this.name),unsetBold:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[Ko({find:Z2,type:this.type}),Ko({find:_2,type:this.type})]},addPasteRules(){return[jr({find:Q2,type:this.type}),jr({find:q2,type:this.type})]}}),t5=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))$/,n5=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))/g,r5=/(?:^|\s)((?:_)((?:[^_]+))(?:_))$/,o5=/(?:^|\s)((?:_)((?:[^_]+))(?:_))/g,i5=Yt.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:n=>n.style.fontStyle!=="normal"&&null},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:n}){return["em",ct(this.options.HTMLAttributes,n),0]},addCommands(){return{setItalic:()=>({commands:n})=>n.setMark(this.name),toggleItalic:()=>({commands:n})=>n.toggleMark(this.name),unsetItalic:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Ko({find:t5,type:this.type}),Ko({find:r5,type:this.type})]},addPasteRules(){return[jr({find:n5,type:this.type}),jr({find:o5,type:this.type})]}}),s5=Yt.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:n=>n.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["u",ct(this.options.HTMLAttributes,n),0]},addCommands(){return{setUnderline:()=>({commands:n})=>n.setMark(this.name),toggleUnderline:()=>({commands:n})=>n.toggleMark(this.name),unsetUnderline:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),a5=At.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:n}){return["li",ct(this.options.HTMLAttributes,n),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)}}}),l5=At.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:n}){return["li",ct(this.options.HTMLAttributes,n),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)}}}),_d=Yt.create({name:"textStyle",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:n=>n.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["span",ct(this.options.HTMLAttributes,n),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:n,commands:e})=>{const t=jo(n,this.type);return Object.entries(t).some(([,o])=>!!o)?!0:e.unsetMark(this.name)}}}}),qd=/^\s*([-+*])\s$/,c5=At.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:n}){return["ul",ct(this.options.HTMLAttributes,n),0]},addCommands(){return{toggleBulletList:()=>({commands:n,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(l5.name,this.editor.getAttributes(_d.name)).run():n.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let n=Go({find:qd,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(n=Go({find:qd,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(_d.name),editor:this.editor})),[n]}}),u5=At.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:n}){return["li",ct(this.options.HTMLAttributes,n),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)}}}),ef=Yt.create({name:"textStyle",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:n=>n.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["span",ct(this.options.HTMLAttributes,n),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:n,commands:e})=>{const t=jo(n,this.type);return Object.entries(t).some(([,o])=>!!o)?!0:e.unsetMark(this.name)}}}}),tf=/^(\d+)\.\s$/,d5=At.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:n=>n.hasAttribute("start")?parseInt(n.getAttribute("start")||"",10):1}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:n}){const{start:e,...t}=n;return e===1?["ol",ct(this.options.HTMLAttributes,t),0]:["ol",ct(this.options.HTMLAttributes,n),0]},addCommands(){return{toggleOrderedList:()=>({commands:n,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(u5.name,this.editor.getAttributes(ef.name)).run():n.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let n=Go({find:tf,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(n=Go({find:tf,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(ef.name)}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1],editor:this.editor})),[n]}}),f5=At.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:n}){return["br",ct(this.options.HTMLAttributes,n)]},renderText(){return`
|
|
127
|
+
`},addCommands(){return{setHardBreak:()=>({commands:n,chain:e,state:t,editor:r})=>n.first([()=>n.exitCode(),()=>n.command(()=>{const{selection:o,storedMarks:i}=t;if(o.$from.parent.type.spec.isolating)return!1;const{keepMarks:s}=this.options,{splittableMarks:l}=r.extensionManager,a=i||o.$to.parentOffset&&o.$from.marks();return e().insertContent({type:this.name}).command(({tr:c,dispatch:u})=>{if(u&&a&&s){const d=a.filter(f=>l.includes(f.type.name));c.ensureMarks(d)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),Va={BASIC:"basic",FULL:"full"},p5={class:"bd-markdown-editor__menu-bottom"},h5={key:0,class:"vr"},m5={key:4,class:"vr"},g5={key:7,class:"vr"},nf=m.defineComponent({__name:"BDMarkdownEditor",props:{placeholder:{default:"Typ een bericht"},errorText:{default:"er is iets fout gegaan"},state:{type:Boolean,default:void 0},variant:{default:Va.BASIC},modelValue:{}},emits:["update:modelValue","upload"],setup(n,{emit:e}){const t=n,r=()=>{e("upload")},o=Nn(t,"modelValue",e),i=[k2,C2,w2,X2.configure({placeholder:t.placeholder}),f5];t.variant===Va.FULL&&i.push(e5,i5,s5,a5,c5,d5,Y2.configure({openOnClick:!1,validate:h=>/^https?:\/\//.test(h)}));const s=E2({content:o.value,extensions:i,onUpdate:({editor:h})=>{const{view:p,state:g}=h,{from:y,to:S}=p.state.selection;if(g.doc.textBetween(y-1,S,"")==" "&&h.getAttributes("link").href!=null&&h.chain().setTextSelection({from:y-1,to:S}).toggleLink({href:h.getAttributes("link").href}).setTextSelection({from:S,to:S}).run(),h.getText().trim()===""){e("update:modelValue","");return}e("update:modelValue",h.getHTML())}});m.watch(()=>t.modelValue,h=>{s.value.getHTML()!==h&&s.value.commands.setContent(h,!0,{preserveWhitespace:"full"})});const l=m.computed(()=>t.state?"is-invalid":null),a=m.computed(()=>f("bold")),c=m.computed(()=>f("italic")),u=m.computed(()=>f("underline"));m.computed(()=>f("bulletList")),m.computed(()=>f("orderedList"));const d=m.computed(()=>t.variant===Va.FULL),f=h=>s.value&&s.value.isActive(h)?"active":null;return(h,p)=>(m.openBlock(),m.createElementBlock(m.Fragment,null,[m.createElementVNode("div",{class:m.normalizeClass(["bd-markdown-editor",l.value])},[m.createVNode(m.unref(S2),{editor:m.unref(s)},null,8,["editor"]),m.renderSlot(h.$slots,"default"),m.createElementVNode("div",p5,[m.createVNode(Ht,{variant:"light",type:"button",onClick:r},{default:m.withCtx(()=>[m.createVNode(m.unref(Er))]),_:1}),d.value?(m.openBlock(),m.createElementBlock("div",h5)):m.createCommentVNode("",!0),d.value?(m.openBlock(),m.createBlock(Ht,{key:1,variant:"light",type:"button",class:m.normalizeClass(a.value),onClick:p[0]||(p[0]=g=>m.unref(s).chain().focus().toggleBold().run())},{default:m.withCtx(()=>[m.createVNode(m.unref(ji))]),_:1},8,["class"])):m.createCommentVNode("",!0),d.value?(m.openBlock(),m.createBlock(Ht,{key:2,variant:"light",type:"button",class:m.normalizeClass(c.value),onClick:p[1]||(p[1]=g=>m.unref(s).chain().focus().toggleItalic().run())},{default:m.withCtx(()=>[m.createVNode(m.unref(Hi))]),_:1},8,["class"])):m.createCommentVNode("",!0),d.value?(m.openBlock(),m.createBlock(Ht,{key:3,variant:"light",type:"button",class:m.normalizeClass(u.value),onClick:p[2]||(p[2]=g=>m.unref(s).chain().focus().toggleUnderline().run())},{default:m.withCtx(()=>[m.createVNode(m.unref(Wi))]),_:1},8,["class"])):m.createCommentVNode("",!0),d.value?(m.openBlock(),m.createElementBlock("div",m5)):m.createCommentVNode("",!0),d.value?(m.openBlock(),m.createBlock(Ht,{key:5,variant:"light",type:"button",class:"IsUnderlineActive",onClick:p[3]||(p[3]=g=>m.unref(s).chain().focus().toggleUnderline().run())},{default:m.withCtx(()=>[m.createVNode(m.unref(Ki))]),_:1})):m.createCommentVNode("",!0),d.value?(m.openBlock(),m.createBlock(Ht,{key:6,variant:"light",type:"button",class:"IsBulletListActive",onClick:p[4]||(p[4]=g=>m.unref(s).chain().focus().toggleBulletList().run())},{default:m.withCtx(()=>[m.createVNode(m.unref(Gi))]),_:1})):m.createCommentVNode("",!0),d.value?(m.openBlock(),m.createElementBlock("div",g5)):m.createCommentVNode("",!0),d.value?(m.openBlock(),m.createBlock(Ht,{key:8,variant:"light",type:"button",class:"IsOrderedListActive",onClick:p[5]||(p[5]=g=>m.unref(s).chain().focus().toggleOrderedList().run())},{default:m.withCtx(()=>[m.createVNode(m.unref(Ji))]),_:1})):m.createCommentVNode("",!0)])],2),m.createVNode(m.unref(po),{text:t.errorText,state:t.state},null,8,["text","state"])],64))}}),y5={class:"bd-user"},v5={class:"bd-user__information"},b5={class:"text-break"},x5={class:"overflow-x-hidden"},rf=m.defineComponent({__name:"BDUser",props:{name:{default:""},img:{default:void 0},details:{default:void 0},hideImage:{type:Boolean,default:!1}},setup(n){const e=n,t=m.computed(()=>{var r;return typeof e.details=="string"?e.details:(r=e.details)==null?void 0:r.join(" • ")});return(r,o)=>(m.openBlock(),m.createElementBlock("div",y5,[e.hideImage?m.createCommentVNode("",!0):(m.openBlock(),m.createBlock(Yi,m.mergeProps({key:0},e.img,{size:"sm"}),null,16)),m.createElementVNode("div",v5,[m.createElementVNode("header",null,[m.createElementVNode("h5",b5,m.toDisplayString(e.name),1),m.renderSlot(r.$slots,"header-extra")]),m.createElementVNode("span",x5,m.toDisplayString(t.value),1)])]))}}),S5={class:"bd-dropdown dropdown"},of=m.defineComponent({__name:"BDDropdown",props:{size:{default:ot.MD},variant:{default:co.PRIMARY},right:{type:Boolean,default:void 0},noFlip:{type:Boolean,default:void 0},toggleTag:{default:"button"},toggleClass:{},actionToggle:{type:Boolean,default:void 0},text:{default:""},offset:{default:void 0}},setup(n){const e=n,{uniqueIdentifier:t}=kr(),r=`__BD__DROPDOWN__${t.value}`,o=m.computed(()=>({class:{btn:e.toggleTag==="button",[`btn-${e.variant}`]:e.toggleTag==="button"&&e.variant,[`btn-${e.size}`]:e.toggleTag==="button"&&e.size,[`${e.toggleClass}`]:e.toggleClass!==void 0,"dropdown-toggle-action":e.actionToggle},"data-bs-display":e.noFlip?"static":null,"data-bs-offset":e.offset?e.offset:null,id:r})),i=m.computed(()=>({"dropdown-menu-end":e.right,"dropdown-menu-action":e.actionToggle})),s=m.computed(()=>({"aria-labelledby":r}));return(l,a)=>(m.openBlock(),m.createElementBlock("div",S5,[(m.openBlock(),m.createBlock(m.resolveDynamicComponent(e.toggleTag),m.mergeProps({class:"dropdown-toggle",target:"_self",role:"button","data-bs-toggle":"dropdown"},o.value),{default:m.withCtx(()=>[m.createElementVNode("span",null,m.toDisplayString(e.text),1)]),_:1},16)),m.createElementVNode("ul",m.mergeProps({class:["dropdown-menu",i.value]},s.value),[m.renderSlot(l.$slots,"default")],16)]))}}),E5={class:"modal bd-modal modal-lg",tabindex:"-1"},k5={class:"modal-dialog"},C5={class:"modal-content"},w5={class:"modal-header"},T5={class:"modal-title fw-light"},A5={class:"modal-body"},O5={key:0,class:"modal-footer"},M5=["disabled"],sf=m.defineComponent({__name:"BDModal",props:{title:{default:""},submitButtonTitle:{default:"Opslaan"},closeButtonTitle:{default:"Annuleren"},hideFooterCancelButton:{type:Boolean,default:!1},hideFooterSubmitButton:{type:Boolean,default:!1},hideFooter:{type:Boolean,default:!1},disableSubmitButton:{type:Boolean,default:!1}},emits:["submit","cancel"],setup(n,{emit:e}){const t=n,r=()=>{e("submit")},o=()=>{e("cancel")};return(i,s)=>(m.openBlock(),m.createElementBlock("div",E5,[m.createElementVNode("div",k5,[m.createElementVNode("div",C5,[m.createElementVNode("div",w5,[m.createElementVNode("h2",T5,m.toDisplayString(t.title),1),m.renderSlot(i.$slots,"modal-header-space-between"),m.createElementVNode("button",{type:"button",class:"btn-close w-auto","data-bs-dismiss":"modal","aria-label":"Sluiten",onClick:o},[m.createTextVNode("Sluiten "),m.createVNode(m.unref(Ui),{class:"bg-primary"})])]),m.createElementVNode("div",A5,[m.renderSlot(i.$slots,"default")]),i.hideFooter?m.createCommentVNode("",!0):(m.openBlock(),m.createElementBlock("div",O5,[t.hideFooterSubmitButton?m.createCommentVNode("",!0):(m.openBlock(),m.createElementBlock("button",{key:0,type:"button",class:"btn btn-primary",disabled:t.disableSubmitButton,onClick:r},m.toDisplayString(t.submitButtonTitle),9,M5)),t.hideFooterCancelButton?m.createCommentVNode("",!0):(m.openBlock(),m.createElementBlock("button",{key:1,type:"button",class:"btn btn-link","data-bs-dismiss":"modal",onClick:o,"aria-label":"Annuleren"},m.toDisplayString(t.closeButtonTitle),1))]))])])]))}}),I5={PRIMARY:"primary",SECONDARY:"secondary",COLLEAGUE:"colleague",DANGER:"danger",OUT_PRIMARY:"outline-primary",OUT_PRIMARY_DARK:"outline-primary-dark",OUT_TERTIARY:"outline-tertiary",OUT_LINK:"link",LIGHT:"light",DARK:"dark"},Ht=m.defineComponent({__name:"BDButton",props:{size:{default:ot.MD},variant:{default:I5.PRIMARY},blockElement:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},to:{},target:{},text:{},rel:{}},emits:["click"],setup(n,{emit:e}){const t=n,r=m.computed(()=>({btn:!0,[`btn-${t.variant}`]:t.variant,[`btn-${t.size}`]:!0,"d-grid":t.blockElement&&typeof t.to=="string",[`${t.class}`]:t.class,disabled:t.disabled})),o=m.computed(()=>t.to?lo:"button"),i=m.computed(()=>{const l={};return t.to?(l.to=t.to,l.role="button"):l.type="submit",l}),s=()=>{e("click")};return(l,a)=>(m.openBlock(),m.createBlock(m.resolveDynamicComponent(o.value),m.mergeProps({class:["bd-btn",r.value]},i.value,{onClick:s}),{default:m.withCtx(()=>[m.renderSlot(l.$slots,"default",{},()=>[m.createTextVNode(m.toDisplayString(t.text),1)])]),_:3},16,["class"]))}}),N5={install:n=>{n.component("BDCol",Wa),n.component("BDContainer",Ka),n.component("BRow",Ga),n.component("BDButton",Ht),n.component("BDLogo",Xa),n.component("BDLink",lo),n.component("BDDropdownItem",vl),n.component("BDDropdown",of),n.component("BDAlert",Qa),n.component("BDProfileImage",Yi),n.component("BDZoomslider",el),n.component("BDCard",Zi),n.component("BDCollapsableCard",rl),n.component("BDFormInput",ll),n.component("BDInputGroup",cl),n.component("BDFormInvalidFeedback",po),n.component("BDBadge",ul),n.component("BDForm",dl),n.component("BDPagination",fl),n.component("BDDropzone",Sl),n.component("BDMarkdownEditor",nf),n.component("BDModal",sf),n.component("BDFormSelect",pl),n.component("BDUser",rf),n.component("IconAttachment",Er),n.component("IconBold",ji),n.component("IconBulletList",Ki),n.component("IconCaretDown",Ya),n.component("IconCaretLeft",$i),n.component("IconCaretRight",zi),n.component("IconCheck",io),n.component("IconClose",Ui),n.component("IconError",so),n.component("IconFile",Vi),n.component("IconHyperlink",Ji),n.component("IconInfo",ao),n.component("IconOrderedList",Gi),n.component("IconItalic",Hi),n.component("IconRemove",Fi),n.component("IconUnderline",Wi),n.component("IconCalendar",Ja),n.component("BDArticle",ml),n.component("BDFormCheckbox",hl),n.component("BDToast",yl)}};ve.BDAlert=Qa,ve.BDArticle=ml,ve.BDBadge=ul,ve.BDButton=Ht,ve.BDCard=Zi,ve.BDCol=Wa,ve.BDCollapsableCard=rl,ve.BDContainer=Ka,ve.BDDropdown=of,ve.BDDropdownItem=vl,ve.BDDropzone=Sl,ve.BDForm=dl,ve.BDFormCheckbox=hl,ve.BDFormInput=ll,ve.BDFormInvalidFeedback=po,ve.BDFormSelect=pl,ve.BDInputGroup=cl,ve.BDLink=lo,ve.BDLogo=Xa,ve.BDMarkdownEditor=nf,ve.BDModal=sf,ve.BDPagination=fl,ve.BDProfileImage=Yi,ve.BDRow=Ga,ve.BDToast=yl,ve.BDUser=rf,ve.BDZoomslider=el,ve.IconAttachment=Er,ve.IconBold=ji,ve.IconBulletList=Ki,ve.IconCalendar=Ja,ve.IconCaretLeft=$i,ve.IconCaretRight=zi,ve.IconCheck=io,ve.IconClose=Ui,ve.IconError=so,ve.IconFile=Vi,ve.IconHyperlink=Ji,ve.IconInfo=ao,ve.IconItalic=Hi,ve.IconOrderedList=Gi,ve.IconRemove=Fi,ve.IconUnderline=Wi,ve.default=N5,Object.defineProperties(ve,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|