@beterdichtbij/component-library 0.17.0 → 0.18.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.
Files changed (28) hide show
  1. package/dist/bd-component-lib.cjs.js +64 -32
  2. package/dist/bd-component-lib.es.js +8022 -9558
  3. package/dist/bd-component-lib.umd.js +64 -32
  4. package/dist/components/atoms/icons/IconDownloadImage.vue.d.ts +2 -0
  5. package/dist/components/atoms/icons/IconDownloadImage.vue.d.ts.map +1 -0
  6. package/dist/components/atoms/icons/IconMenu.vue.d.ts +2 -0
  7. package/dist/components/atoms/icons/IconMenu.vue.d.ts.map +1 -0
  8. package/dist/components/atoms/icons/index.d.ts +3 -1
  9. package/dist/components/molecules/BDAttachmentPreviewList/BDAttachmentPreviewList.vue.d.ts +42 -0
  10. package/dist/components/molecules/BDAttachmentPreviewList/BDAttachmentPreviewList.vue.d.ts.map +1 -0
  11. package/dist/components/molecules/BDImageAttachmentPreviewList/BDImageAttachmentPreviewList.vue.d.ts +54 -0
  12. package/dist/components/molecules/BDImageAttachmentPreviewList/BDImageAttachmentPreviewList.vue.d.ts.map +1 -0
  13. package/dist/components/molecules/BDMarkdownEditor/BDMarkdownEditor.vue.d.ts +13 -1
  14. package/dist/composables/useToaster.d.ts +1 -1
  15. package/dist/index.d.ts +4 -2
  16. package/dist/interfaces/BDAttachment.d.ts +7 -0
  17. package/dist/interfaces/BDAttachmentPreviewListProps.d.ts +6 -0
  18. package/dist/interfaces/BDImageAttachmentPreviewListProps.d.ts +4 -0
  19. package/dist/interfaces/BDMarkdownEditorProps.d.ts +2 -0
  20. package/dist/scss/_attachments.scss +107 -0
  21. package/dist/scss/_button.scss +31 -15
  22. package/dist/scss/_icons.scss +5 -0
  23. package/dist/scss/base/variables.scss +14 -0
  24. package/dist/scss/component-library-styling.scss +2 -1
  25. package/dist/types/ApiAttachment.d.ts +15 -0
  26. package/dist/types/ButtonColorVariants.d.ts +1 -0
  27. package/dist/utils/attachment.d.ts +25 -0
  28. package/package.json +3 -3
@@ -1,25 +1,25 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const m=require("vue"),nf=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,i)=>(m.openBlock(),m.createElementBlock("div",{class:m.normalizeClass(t.value)},[m.renderSlot(r.$slots,"default")],2))}}),rf=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,i)=>(m.openBlock(),m.createElementBlock("div",{class:m.normalizeClass(t.value)},[m.renderSlot(r.$slots,"default")],2))}}),of=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))}}),at={XS:"xs",SM:"sm",MD:"md",LG:"lg"},Xe=(n,e)=>{const t=n.__vccOpts||n;for(const[r,i]of e)t[r]=i;return t},gm={},vm={class:"icon icon-check",xmlns:"http://www.w3.org/2000/svg",width:"18",height:"13",viewBox:"0 0 18 13"},ym=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),bm=[ym];function Em(n,e){return m.openBlock(),m.createElementBlock("svg",vm,bm)}const ms=Xe(gm,[["render",Em]]),Sm={},Cm={class:"icon icon-error",xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18"},Tm=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),xm=[Tm];function Am(n,e){return m.openBlock(),m.createElementBlock("svg",Cm,xm)}const gs=Xe(Sm,[["render",Am]]),wm={},km={class:"icon icon-attachment",width:"17",height:"18",viewBox:"0 0 17 18",xmlns:"http://www.w3.org/2000/svg"},Om=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),Mm=[Om];function Nm(n,e){return m.openBlock(),m.createElementBlock("svg",km,Mm)}const Si=Xe(wm,[["render",Nm]]),Im={},Dm={class:"icon icon-calendar",xmlns:"http://www.w3.org/2000/svg",width:"17",height:"18",viewBox:"0 0 17 18"},Rm=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),Lm=[Rm];function _m(n,e){return m.openBlock(),m.createElementBlock("svg",Dm,Lm)}const sf=Xe(Im,[["render",_m]]),Pm={},Bm={class:"icon icon-info",xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18"},Fm=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),$m=[Fm];function Vm(n,e){return m.openBlock(),m.createElementBlock("svg",Bm,$m)}const vs=Xe(Pm,[["render",Vm]]),zm={},Hm={class:"icon icon-remove",width:"11",height:"11",viewBox:"0 0 11 11",xmlns:"http://www.w3.org/2000/svg"},Um=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),jm=[Um];function Wm(n,e){return m.openBlock(),m.createElementBlock("svg",Hm,jm)}const El=Xe(zm,[["render",Wm]]),Km={},Gm={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"},Ym=m.createElementVNode("title",null,"common-file-empty",-1),Jm=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
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const p=require("vue"),Eu=p.defineComponent({__name:"BDCol",props:{class:{},cols:{},xs:{},sm:{},md:{},lg:{},xxl:{},orderClass:{},offsetClass:{}},setup(n){const e=n,t=p.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)=>(p.openBlock(),p.createElementBlock("div",{class:p.normalizeClass(t.value)},[p.renderSlot(r.$slots,"default")],2))}}),Su=p.defineComponent({__name:"BDContainer",props:{class:{default:""},fluid:{type:Boolean,default:!1}},setup(n){const e=n,t=p.computed(()=>({container:!e.fluid,"container-fluid":e.fluid===!0,[`container-${e.fluid}`]:e.fluid&&e.fluid!==!0,[e.class]:!0}));return(r,o)=>(p.openBlock(),p.createElementBlock("div",{class:p.normalizeClass(t.value)},[p.renderSlot(r.$slots,"default")],2))}}),ku=p.defineComponent({__name:"BDRow",props:{class:{}},setup(n){return(e,t)=>(p.openBlock(),p.createElementBlock("div",{class:p.normalizeClass(["row",e.class])},[p.renderSlot(e.$slots,"default")],2))}}),it={XS:"xs",SM:"sm",MD:"md",LG:"lg"},je=(n,e)=>{const t=n.__vccOpts||n;for(const[r,o]of e)t[r]=o;return t},Zf={},_f={class:"icon icon-check",xmlns:"http://www.w3.org/2000/svg",width:"18",height:"13",viewBox:"0 0 18 13"},qf=p.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),ep=[qf];function tp(n,e){return p.openBlock(),p.createElementBlock("svg",_f,ep)}const Ei=je(Zf,[["render",tp]]),np={},rp={class:"icon icon-error",xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18"},op=p.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),ip=[op];function sp(n,e){return p.openBlock(),p.createElementBlock("svg",rp,ip)}const Si=je(np,[["render",sp]]),ap={},lp={class:"icon icon-attachment",width:"17",height:"18",viewBox:"0 0 17 18",xmlns:"http://www.w3.org/2000/svg"},cp=p.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),up=[cp];function dp(n,e){return p.openBlock(),p.createElementBlock("svg",lp,up)}const Kn=je(ap,[["render",dp]]),fp={},pp={class:"icon icon-calendar",xmlns:"http://www.w3.org/2000/svg",width:"17",height:"18",viewBox:"0 0 17 18"},hp=p.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),mp=[hp];function gp(n,e){return p.openBlock(),p.createElementBlock("svg",pp,mp)}const Cu=je(fp,[["render",gp]]),vp={},yp={class:"icon icon-info",xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18"},bp=p.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),xp=[bp];function Ep(n,e){return p.openBlock(),p.createElementBlock("svg",yp,xp)}const ki=je(vp,[["render",Ep]]),Sp={},kp={class:"icon icon-remove",width:"11",height:"11",viewBox:"0 0 11 11",xmlns:"http://www.w3.org/2000/svg"},Cp=p.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),wp=[Cp];function Tp(n,e){return p.openBlock(),p.createElementBlock("svg",kp,wp)}const no=je(Sp,[["render",Tp]]),Ap={},Op={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"},Mp=p.createElementVNode("title",null,"common-file-empty",-1),Ip=p.createElementVNode("g",null,[p.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),Xm=[Ym,Jm];function Qm(n,e){return m.openBlock(),m.createElementBlock("svg",Gm,Xm)}const Sl=Xe(Km,[["render",Qm]]),Zm={},qm={xmlns:"http://www.w3.org/2000/svg",width:"18",height:"10"},eg=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),tg=[eg];function ng(n,e){return m.openBlock(),m.createElementBlock("svg",qm,tg)}const af=Xe(Zm,[["render",ng]]),rg={},ig={class:"icon icon-caret-right",xmlns:"http://www.w3.org/2000/svg",width:"7",height:"11",viewBox:"0 0 7 11"},og=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),sg=[og];function ag(n,e){return m.openBlock(),m.createElementBlock("svg",ig,sg)}const Cl=Xe(rg,[["render",ag]]),lg={},cg={class:"icon icon-caret-left",xmlns:"http://www.w3.org/2000/svg",width:"6",height:"10",viewBox:"0 0 6 10"},ug=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),dg=[ug];function fg(n,e){return m.openBlock(),m.createElementBlock("svg",cg,dg)}const Tl=Xe(lg,[["render",fg]]),hg={},pg={class:"icon icon-close",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"-4 -4 22 22"},mg=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),gg=[mg];function vg(n,e){return m.openBlock(),m.createElementBlock("svg",pg,gg)}const xl=Xe(hg,[["render",vg]]),yg={},bg={width:"12",height:"14",viewBox:"0 0 12 14",xmlns:"http://www.w3.org/2000/svg",class:"icon icon-italic"},Eg=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),Sg=[Eg];function Cg(n,e){return m.openBlock(),m.createElementBlock("svg",bg,Sg)}const Al=Xe(yg,[["render",Cg]]),Tg={},xg={width:"11",height:"13",viewBox:"0 0 11 13",xmlns:"http://www.w3.org/2000/svg",class:"icon icon-bold"},Ag=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),wg=[Ag];function kg(n,e){return m.openBlock(),m.createElementBlock("svg",xg,wg)}const wl=Xe(Tg,[["render",kg]]),Og={},Mg={width:"14",height:"16",viewBox:"0 0 14 16",xmlns:"http://www.w3.org/2000/svg",class:"icon icon-underline"},Ng=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),Ig=[Ng];function Dg(n,e){return m.openBlock(),m.createElementBlock("svg",Mg,Ig)}const kl=Xe(Og,[["render",Dg]]),Rg={},Lg={width:"16",height:"14",viewBox:"0 0 16 14",xmlns:"http://www.w3.org/2000/svg",class:"icon icon-bullet-list"},_g=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),Pg=[_g];function Bg(n,e){return m.openBlock(),m.createElementBlock("svg",Lg,Pg)}const Ol=Xe(Rg,[["render",Bg]]),Fg={},$g={width:"17",height:"15",viewBox:"0 0 17 15",xmlns:"http://www.w3.org/2000/svg",class:"icon icon-ordered-list"},Vg=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),zg=[Vg];function Hg(n,e){return m.openBlock(),m.createElementBlock("svg",$g,zg)}const Ml=Xe(Fg,[["render",Hg]]),Ug={},jg={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"},Wg=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),Kg=[Wg];function Gg(n,e){return m.openBlock(),m.createElementBlock("svg",jg,Kg)}const Nl=Xe(Ug,[["render",Gg]]),Yg={},Jg=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),Xg=[Jg];function Qg(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"}),Xg,16)}const lf=Xe(Yg,[["render",Qg]]),$c=/^https:/i,ys=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"&&$c.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"&&$c.test(e.to)){const{to:i,target:o,rel:s}=e;return{href:i,target:o,rel:s}}else{const{to:i}=e;return{to:i}}});return(i,o)=>(m.openBlock(),m.createBlock(m.resolveDynamicComponent(t.value),m.mergeProps({class:"bd-link"},r.value),{default:m.withCtx(()=>[m.renderSlot(i.$slots,"default",{},()=>[m.createTextVNode(m.toDisplayString(e.text),1)])]),_:3},16))}}),bs={PRIMARY:"primary",SECONDARY:"secondary",DANGER:"danger",WARNING:"warning",INFO:"info",SUCCESS:"success",LIGHT:"light"},Zg={key:0,class:"b-d-alert-title"},cf=m.defineComponent({__name:"BDAlert",props:{variant:{default:bs.PRIMARY},title:{default:""}},setup(n){const e=n,t=m.computed(()=>["alert",`alert-${e.variant}`]);return(r,i)=>(m.openBlock(),m.createElementBlock("div",{class:m.normalizeClass(t.value),role:"alert"},[r.title?(m.openBlock(),m.createElementBlock("div",Zg,[m.createVNode(m.unref(vs)),m.createElementVNode("span",null,[m.createElementVNode("strong",null,m.toDisplayString(e.title),1)])])):m.createCommentVNode("",!0),m.renderSlot(r.$slots,"default")],2))}}),qg=["src","alt"],ev=["textContent"],Il=m.defineComponent({__name:"BDProfileImage",props:{showFooter:{type:Boolean,default:!1},size:{default:at.LG},linkText:{default:""},src:{default:""},alt:{default:""}},emits:["click"],setup(n,{emit:e}){const t=()=>{e("click")};return(r,i)=>(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,qg),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,ev)):m.createCommentVNode("",!0)],2))}});function tv(n){return m.getCurrentScope()?(m.onScopeDispose(n),!0):!1}function go(n){return typeof n=="function"?n():m.unref(n)}const nv=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const rv=n=>typeof n<"u",iv=Object.prototype.toString,ov=n=>iv.call(n)==="[object Object]",Pa=()=>{};function sv(n,e){function t(...r){return new Promise((i,o)=>{Promise.resolve(n(()=>e.apply(this,r),{fn:e,thisArg:this,args:r})).then(i).catch(o)})}return t}function av(n,e={}){let t,r,i=Pa;const o=l=>{clearTimeout(l),i(),i=Pa};return l=>{const a=go(n),c=go(e.maxWait);return t&&o(t),a<=0||c!==void 0&&c<=0?(r&&(o(r),r=null),Promise.resolve(l())):new Promise((u,d)=>{i=e.rejectOnCancel?d:u,c&&!r&&(r=setTimeout(()=>{t&&o(t),r=null,u(l())},c)),t=setTimeout(()=>{r&&o(r),r=null,u(l())},a)})}}function lv(n,e=200,t={}){return sv(av(e,t),n)}function uf(n){var e;const t=go(n);return(e=t==null?void 0:t.$el)!=null?e:t}const cv=nv?window:void 0;function Vc(...n){let e,t,r,i;if(typeof n[0]=="string"||Array.isArray(n[0])?([t,r,i]=n,e=cv):[e,t,r,i]=n,!e)return Pa;Array.isArray(t)||(t=[t]),Array.isArray(r)||(r=[r]);const o=[],s=()=>{o.forEach(u=>u()),o.length=0},l=(u,d,f,p)=>(u.addEventListener(d,f,p),()=>u.removeEventListener(d,f,p)),a=m.watch(()=>[uf(e),go(i)],([u,d])=>{if(s(),!u)return;const f=ov(d)?{...d}:d;o.push(...t.flatMap(p=>r.map(h=>l(u,p,h,f))))},{immediate:!0,flush:"post"}),c=()=>{a(),s()};return tv(c),c}function uv(n){return JSON.parse(JSON.stringify(n))}function dv(n,e={}){const{initialValue:t=!1,focusVisible:r=!1}=e,i=m.ref(!1),o=m.computed(()=>uf(n));Vc(o,"focus",l=>{var a,c;(!r||(c=(a=l.target).matches)!=null&&c.call(a,":focus-visible"))&&(i.value=!0)}),Vc(o,"blur",()=>i.value=!1);const s=m.computed({get:()=>i.value,set(l){var a,c;!l&&i.value?(a=o.value)==null||a.blur():l&&!i.value&&((c=o.value)==null||c.focus())}});return m.watch(o,()=>{s.value=t},{immediate:!0,flush:"post"}),{focused:s}}function pr(n,e,t,r={}){var i,o,s;const{clone:l=!1,passive:a=!1,eventName:c,deep:u=!1,defaultValue:d,shouldEmit:f}=r,p=m.getCurrentInstance(),h=t||(p==null?void 0:p.emit)||((i=p==null?void 0:p.$emit)==null?void 0:i.bind(p))||((s=(o=p==null?void 0:p.proxy)==null?void 0:o.$emit)==null?void 0:s.bind(p==null?void 0:p.proxy));let g=c;e||(e="modelValue"),g=g||`update:${e.toString()}`;const v=x=>l?typeof l=="function"?l(x):uv(x):x,S=()=>rv(n[e])?v(n[e]):d,T=x=>{f?f(x)&&h(g,x):h(g,x)};if(a){const x=S(),b=m.ref(x);let D=!1;return m.watch(()=>n[e],A=>{D||(D=!0,b.value=v(A),m.nextTick(()=>D=!1))}),m.watch(b,A=>{!D&&(A!==n[e]||u)&&T(A)},{deep:u}),b}else return m.computed({get(){return S()},set(x){T(x)}})}const fv={class:"bd-zoom-slider d-flex"},hv=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),pv=[hv],mv=["max"],gv=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),vv=[gv],df=m.defineComponent({__name:"BDZoomslider",props:{modelValue:{},maxValue:{default:5}},emits:["update:modelValue"],setup(n,{emit:e}){const t=n,r=pr(t,"modelValue",e);function i(){r.value!==0&&r.value--}function o(){r.value<t.maxValue&&r.value++}return(s,l)=>(m.openBlock(),m.createElementBlock("div",fv,[(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:i},pv)),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,mv),[[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:o},vv))]))}});var Qn=256,ff=[],zc=256,Ki;for(;Qn--;)ff[Qn]=(Qn+256).toString(16).substring(1);function hf(n){var e=0,t=n||11;if(!Ki||Qn+t>zc*2)for(Ki="",Qn=0;e<zc;e++)Ki+=ff[Math.random()*256|0];return Ki.substring(Qn,Qn+++t)}function _i(){return{uniqueIdentifier:m.ref(hf())}}const yv=["id"],bv={key:0},Dl=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}=_i(),r=t.value,i=m.computed(()=>({"bd-card card":!0,[`${e.class}`]:e.class,"no-body":e.noBody})),o=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(i.value)},[!l.noHeader||l.noBody?(m.openBlock(),m.createElementBlock("div",{key:0,class:m.normalizeClass(o.value)},[m.renderSlot(l.$slots,"header",{},()=>[l.title?(m.openBlock(),m.createElementBlock("h2",bv,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,yv))}}),Ev={key:0},Sv={class:"bd-collapsable-card__actions"},Cv=["data-bs-target"],pf=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}=_i(),r=t.value,i=m.computed(()=>`bd-collapsable-card__collapse-${r}`),o=m.computed(()=>({"d-block":[at.SM,at.MD].includes(e.showOn.toLowerCase()),"d-md-none":e.showOn.toLowerCase()==at.SM,"d-lg-none":e.showOn.toLowerCase()==at.MD})),s=m.computed(()=>{let a={"round-corners-sm":e.showOn.toLowerCase()==at.SM,"round-corners-md":e.showOn.toLowerCase()==at.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,[`${i.value}`]:!0,"display-none":!e.visible||e.disabled,"open-collapse-lg":e.visible&&[at.SM,at.MD].includes(e.showOn.toLowerCase()),"open-collapse-md":e.showOn.toLowerCase()==at.SM&&e.visible};return Object.keys(a).filter(c=>a[c]).join(" ")});return(a,c)=>(m.openBlock(),m.createBlock(Dl,{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",Ev,m.toDisplayString(a.title),1)):m.createCommentVNode("",!0),m.createElementVNode("div",Sv,[m.renderSlot(a.$slots,"action"),!a.disabled&&a.visible?(m.openBlock(),m.createElementBlock("button",{key:0,class:m.normalizeClass(["btn btn-white btn-caret",o.value]),type:"button","data-bs-toggle":"collapse","data-bs-target":`.${i.value}`,"aria-expanded":"true"},[m.createVNode(m.unref(af))],10,Cv)):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 Tv=Object.defineProperty,xv=(n,e,t)=>e in n?Tv(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ci=(n,e,t)=>(xv(n,typeof e!="symbol"?e+"":e,t),t);const Hc={"#":{pattern:/[0-9]/},"@":{pattern:/[a-zA-Z]/},"*":{pattern:/[a-zA-Z0-9]/}};class Uc{constructor(e={}){ci(this,"opts",{}),ci(this,"memo",new Map);const t={...e};if(t.tokens!=null){t.tokens=t.tokensReplace?{...t.tokens}:{...Hc,...t.tokens};for(const r of Object.values(t.tokens))typeof r.pattern=="string"&&(r.pattern=new RegExp(r.pattern))}else t.tokens=Hc;Array.isArray(t.mask)&&(t.mask.length>1?t.mask=[...t.mask].sort((r,i)=>r.length-i.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(i=>r>=i.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(i=>this.process(e,i,!1).length>=r.length)??""}escapeMask(e){const t=[],r=[];return e.split("").forEach((i,o)=>{i==="!"&&e[o-1]!=="!"?r.push(o-r.length):t.push(i)}),{mask:t.join(""),escaped:r}}process(e,t,r=!0){if(t==null)return e;const i=`value=${e},mask=${t},masked=${r?1:0}`;if(this.memo.has(i))return this.memo.get(i);const{mask:o,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:o.length-1,f=this.isReversed()?()=>v>-1&&S>-1:()=>v<o.length&&S<e.length,p=x=>!this.isReversed()&&x<=d||this.isReversed()&&x>=d;let h,g=-1,v=this.isReversed()?o.length-1:0,S=this.isReversed()?e.length-1:0,T=!1;for(;f();){const x=o.charAt(v),b=a[x],D=(b==null?void 0:b.transform)!=null?b.transform(e.charAt(S)):e.charAt(S);if(!s.includes(v)&&b!=null?(D.match(b.pattern)!=null?(l[u](D),b.repeated?(g===-1?g=v:v===d&&v!==g&&(v=g-c),d===g&&(v-=c)):b.multiple&&(T=!0,v-=c),v+=c):b.multiple?T&&(v+=c,S-=c,T=!1):D===h?h=void 0:b.optional&&(v+=c,S-=c),S+=c):(r&&!this.isEager()&&l[u](x),D===x&&!this.isEager()?S+=c:h=x,this.isEager()||(v+=c)),this.isEager())for(;p(v)&&(a[o.charAt(v)]==null||s.includes(v));)r?l[u](o.charAt(v)):o.charAt(v)===e.charAt(S)&&(S+=c),v+=c}return this.memo.set(i,l.join("")),this.memo.get(i)}}const mf=n=>JSON.parse(n.replaceAll("'",'"')),jc=(n,e={})=>{const t={...e};return n.dataset.maska!=null&&n.dataset.maska!==""&&(t.mask=Av(n.dataset.maska)),n.dataset.maskaEager!=null&&(t.eager=Ws(n.dataset.maskaEager)),n.dataset.maskaReversed!=null&&(t.reversed=Ws(n.dataset.maskaReversed)),n.dataset.maskaTokensReplace!=null&&(t.tokensReplace=Ws(n.dataset.maskaTokensReplace)),n.dataset.maskaTokens!=null&&(t.tokens=wv(n.dataset.maskaTokens)),t},Ws=n=>n!==""?!!JSON.parse(n):!0,Av=n=>n.startsWith("[")&&n.endsWith("]")?mf(n):n,wv=n=>{if(n.startsWith("{")&&n.endsWith("}"))return mf(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 kv{constructor(e,t={}){ci(this,"items",new Map),ci(this,"beforeinputEvent",r=>{const i=r.target,o=this.items.get(i);o.isEager()&&"inputType"in r&&r.inputType.startsWith("delete")&&o.unmasked(i.value).length<=1&&this.setMaskedValue(i,"")}),ci(this,"inputEvent",r=>{if(r instanceof CustomEvent&&r.type==="input"&&r.detail!=null&&typeof r.detail=="object"&&"masked"in r.detail)return;const i=r.target,o=this.items.get(i),s=i.value,l=i.selectionStart,a=i.selectionEnd;let c=s;if(o.isEager()){const u=o.masked(s),d=o.unmasked(s);d===""&&"data"in r&&r.data!=null?c=r.data:d!==o.unmasked(u)&&(c=d)}if(this.setMaskedValue(i,c),"inputType"in r&&(r.inputType.startsWith("delete")||l!=null&&l<s.length))try{i.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),i=new Uc(jc(e,this.getMaskOpts(t)));return JSON.stringify(r.opts)!==JSON.stringify(i.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:i,...o}=e;return o}init(e,t){for(const r of e){const i=new Uc(jc(r,t));this.items.set(r,i),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 i=r.masked(t),o=r.unmasked(r.isEager()?i:t),s=r.completed(t),l={masked:i,unmasked:o,completed:s};t=i,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 Ba=new WeakMap,Ov=n=>{setTimeout(()=>{var e;((e=Ba.get(n))==null?void 0:e.needUpdateValue(n))===!0&&n.dispatchEvent(new CustomEvent("input"))})},Mv=(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;Ov(t);const i=Ba.get(t);if(i!=null){if(!i.needUpdateOptions(t,r))return;i.destroy()}if(e.value!=null){const o=e.value,s=l=>{o.masked=l.masked,o.unmasked=l.unmasked,o.completed=l.completed};r.onMaska=r.onMaska==null?s:Array.isArray(r.onMaska)?[...r.onMaska,s]:[r.onMaska,s]}Ba.set(t,new kv(t,r))},Nv=["value","type"],gf=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:at.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}=_i(),i=pr(t,"modelValue",e),o=`__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=lv(f=>{i.value=f.target.value},t.delayTimeMs);return(f,p)=>(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:o,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:p[0]||(p[0]=(...h)=>m.unref(d)&&m.unref(d)(...h)),onClick:p[1]||(p[1]=h=>f.$emit("click")),onBlur:p[2]||(p[2]=h=>f.$emit("blur")),onKeydown:p[3]||(p[3]=m.withKeys(h=>f.$emit("enter"),["enter"]))}),null,16,Nv),[[m.unref(Mv)]]),m.renderSlot(f.$slots,"default")],2),m.createVNode(m.unref(Es),{text:f.invalidFeedbackText,class:m.normalizeClass(f.invalidFeedbackClass),state:f.state,id:a},null,8,["text","class","state"])],2))}}),Iv=["for"],vf=m.defineComponent({__name:"BDInputGroup",props:{label:{default:void 0},labelForId:{default:void 0}},setup(n){const e=n,t=m.useAttrs();return(r,i)=>(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,Iv)):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))}}),Dv={class:"invalid-feedback bd-invalid-feedback"},Es=m.defineComponent({__name:"BDFormInvalidFeedback",props:{state:{type:[Boolean,null],default:null},text:{default:""}},setup(n){return(e,t)=>(m.openBlock(),m.createElementBlock("div",Dv,[m.createVNode(m.unref(gs)),m.createTextVNode(" "+m.toDisplayString(e.text),1)]))}}),yf=m.defineComponent({__name:"BDBadge",props:{variant:{default:bs.PRIMARY}},setup(n){const e=n,t=m.computed(()=>["badge","bd-badge",`text-bg-${e.variant}`]);return(r,i)=>(m.openBlock(),m.createElementBlock("span",{role:"status",class:m.normalizeClass(t.value)},[m.renderSlot(r.$slots,"default")],2))}}),Rv=["onSubmit","onReset"],bf=m.defineComponent({__name:"BDForm",emits:["submit","reset"],setup(n,{emit:e}){function t(){e("submit")}function r(){e("reset")}return(i,o)=>(m.openBlock(),m.createElementBlock("form",{onSubmit:m.withModifiers(t,["prevent"]),onReset:m.withModifiers(r,["prevent"])},[m.renderSlot(i.$slots,"default")],40,Rv))}}),Lv={"aria-label":"Page navigation",class:"bd-pagination"},_v={class:"page-item"},Pv=["data-page"],Bv=["data-page"],Fv={class:"page-item"},$v=["data-page"],Ef=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=pr(t,"modelValue",e),i=m.ref(Math.ceil(t.totalRows/t.rowsPerPage)),o=m.ref([]);m.watch([()=>t.totalRows,()=>t.rowsPerPage],()=>{i.value=Math.ceil(t.totalRows/t.rowsPerPage),o.value=a()}),m.onMounted(()=>{o.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)),o.value=a(),e("click",r.value)},a=()=>{const c=[],u=i.value,d=7;if(u<=d)for(let f=1;f<=u;f++)c.push(f);else{const p=Math.floor((d-3)/2);if(r.value<=p+2){for(let h=1;h<=p+3;h++)c.push(h);c.push("..."),c.push(u)}else if(r.value>=u-p-1){c.push(1),c.push("...");for(let h=u-p-3;h<=u;h++)c.push(h)}else{c.push(1),c.push("...");for(let h=r.value-1;h<=r.value+1;h++)c.push(h);c.push("..."),c.push(u)}}return c};return(c,u)=>(m.openBlock(),m.createElementBlock("div",Lv,[m.createElementVNode("ul",{class:m.normalizeClass(["pagination",s.value])},[m.withDirectives(m.createElementVNode("li",_v,[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(Tl))],8,Pv)],512),[[m.vShow,m.unref(r)>1]]),(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(o.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,Bv)],2))),128)),m.withDirectives(m.createElementVNode("li",Fv,[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(Cl))],8,$v)],512),[[m.vShow,m.unref(r)<i.value]])],2)]))}}),Vv=["disabled"],zv=["value"],Sf=m.defineComponent({__name:"BDFormSelect",props:{size:{default:at.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=pr(t,"modelValue",e),i=m.ref(null),{focused:o}=dv(i,{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&&(o.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:i,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,zv))),128))])],42,Vv)),[[m.vModelSelect,m.unref(r)]])}}),Hv=["value","true-value","false-value","data-checked"],Cf=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}=_i(),i=pr(t,"modelValue",e),o=`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(i)?i.value=f:null),class:m.normalizeClass(l.value),type:"checkbox",value:u.value,"true-value":u.value,"false-value":u.uncheckedValue,id:o,onChange:c,onInput:a,"data-checked":m.unref(i)===u.value},null,42,Hv),[[m.vModelCheckbox,m.unref(i)]]),m.createElementVNode("label",{class:"form-check-label",for:o},[m.renderSlot(u.$slots,"default")]),m.renderSlot(u.$slots,"last")],2))}}),Uv={key:0,class:"bd-article__body"},jv={key:1},Tf=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=i=>e("click",{event:i,identifier:t.identifier});return(i,o)=>(m.openBlock(),m.createElementBlock("article",{class:"bd-article",onClick:r},[m.createElementVNode("header",null,[m.renderSlot(i.$slots,"header",{},()=>[m.createElementVNode("h5",null,m.toDisplayString(t.title),1)])]),t.hideBody?m.createCommentVNode("",!0):(m.openBlock(),m.createElementBlock("div",Uv,[m.renderSlot(i.$slots,"default",{},()=>[m.createTextVNode(m.toDisplayString(t.text),1)])])),t.hideFooter?m.createCommentVNode("",!0):(m.openBlock(),m.createElementBlock("footer",jv,[m.renderSlot(i.$slots,"footer")]))]))}}),Ir={DANGER:"danger",WARNING:"warning",INFO:"info",SUCCESS:"success"},Wv=["id"],Kv={class:"toast-header"},Gv=m.createElementVNode("button",{type:"button",class:"btn-close","data-bs-dismiss":"toast","aria-label":"Close"},null,-1),Yv={class:"toast-body"},Rl=m.defineComponent({__name:"BDToast",props:{id:{},show:{type:Boolean,default:!1},variant:{default:Ir.INFO},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!==Ir.SUCCESS);return(i,o)=>(m.openBlock(),m.createElementBlock("div",{class:m.normalizeClass(["toast bd-toast",t.value]),role:"alert","aria-live":"assertive","aria-atomic":"true",key:e.id,id:e.id},[m.createElementVNode("div",Kv,[r.value?(m.openBlock(),m.createBlock(m.unref(vs),{key:0})):(m.openBlock(),m.createBlock(m.unref(ms),{key:1})),m.createElementVNode("h5",null,m.toDisplayString(e.title),1),Gv]),m.createElementVNode("div",Yv,[m.createElementVNode("span",null,m.toDisplayString(e.text),1)])],10,Wv))}}),xf=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(i,o)=>(m.openBlock(),m.createElementBlock("li",m.mergeProps({class:"bd-dropdown-item"},i.$attrs),[m.createVNode(ys,m.mergeProps({class:"dropdown-item",onClick:r},t),{default:m.withCtx(()=>[m.renderSlot(i.$slots,"default",{},()=>[m.createTextVNode(m.toDisplayString(t.text),1)])]),_:3},16)],16))}});function Jv(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Af={exports:{}};(function(n,e){(function(r,i){n.exports=i()})(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"),p=Array.prototype;p[f]==null&&d.f(p,f,{configurable:!0,value:u(null)}),s.exports=function(h){p[f][h]=!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),p=a(6656),h=a(648),g=a(8880),v=a(1320),S=a(3070).f,T=a(9518),x=a(7674),b=a(5112),D=a(9711),A=d.Int8Array,B=A&&A.prototype,$=d.Uint8ClampedArray,V=$&&$.prototype,F=A&&T(A),P=B&&T(B),_=Object.prototype,H=_.isPrototypeOf,Y=b("toStringTag"),X=D("TYPED_ARRAY_TAG"),Q=c&&!!x&&h(d.opera)!=="Opera",ie=!1,j,ce={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},fe={BigInt64Array:8,BigUint64Array:8},be=function(k){if(!f(k))return!1;var M=h(k);return M==="DataView"||p(ce,M)||p(fe,M)},Te=function(ve){if(!f(ve))return!1;var k=h(ve);return p(ce,k)||p(fe,k)},Ee=function(ve){if(Te(ve))return ve;throw TypeError("Target is not a typed array")},ke=function(ve){if(x){if(H.call(F,ve))return ve}else for(var k in ce)if(p(ce,j)){var M=d[k];if(M&&(ve===M||H.call(M,ve)))return ve}throw TypeError("Target is not a typed array constructor")},Ae=function(ve,k,M){if(u){if(M)for(var C in ce){var O=d[C];O&&p(O.prototype,ve)&&delete O.prototype[ve]}(!P[ve]||M)&&v(P,ve,M?k:Q&&B[ve]||k)}},Oe=function(ve,k,M){var C,O;if(u){if(x){if(M)for(C in ce)O=d[C],O&&p(O,ve)&&delete O[ve];if(!F[ve]||M)try{return v(F,ve,M?k:Q&&A[ve]||k)}catch{}else return}for(C in ce)O=d[C],O&&(!O[ve]||M)&&v(O,ve,k)}};for(j in ce)d[j]||(Q=!1);if((!Q||typeof F!="function"||F===Function.prototype)&&(F=function(){throw TypeError("Incorrect invocation")},Q))for(j in ce)d[j]&&x(d[j],F);if((!Q||!P||P===_)&&(P=F.prototype,Q))for(j in ce)d[j]&&x(d[j].prototype,P);if(Q&&T(V)!==P&&x(V,P),u&&!p(P,Y)){ie=!0,S(P,Y,{get:function(){return f(this)?this[X]:void 0}});for(j in ce)d[j]&&g(d[j],X,j)}s.exports={NATIVE_ARRAY_BUFFER_VIEWS:Q,TYPED_ARRAY_TAG:ie&&X,aTypedArray:Ee,aTypedArrayConstructor:ke,exportTypedArrayMethod:Ae,exportTypedArrayStaticMethod:Oe,isView:be,isTypedArray:Te,TypedArray:F,TypedArrayPrototype:P}},3331:function(s,l,a){var c=a(7854),u=a(9781),d=a(4019),f=a(8880),p=a(2248),h=a(7293),g=a(5787),v=a(9958),S=a(7466),T=a(7067),x=a(1179),b=a(9518),D=a(7674),A=a(8006).f,B=a(3070).f,$=a(1285),V=a(8003),F=a(9909),P=F.get,_=F.set,H="ArrayBuffer",Y="DataView",X="prototype",Q="Wrong length",ie="Wrong index",j=c[H],ce=j,fe=c[Y],be=fe&&fe[X],Te=Object.prototype,Ee=c.RangeError,ke=x.pack,Ae=x.unpack,Oe=function(K){return[K&255]},ve=function(K){return[K&255,K>>8&255]},k=function(K){return[K&255,K>>8&255,K>>16&255,K>>24&255]},M=function(K){return K[3]<<24|K[2]<<16|K[1]<<8|K[0]},C=function(K){return ke(K,23,4)},O=function(K){return ke(K,52,8)},y=function(K,G){B(K[X],G,{get:function(){return P(this)[G]}})},E=function(K,G,q,ue){var ge=T(q),Ne=P(K);if(ge+G>Ne.byteLength)throw Ee(ie);var Fe=P(Ne.buffer).bytes,Be=ge+Ne.byteOffset,Ie=Fe.slice(Be,Be+G);return ue?Ie:Ie.reverse()},N=function(K,G,q,ue,ge,Ne){var Fe=T(q),Be=P(K);if(Fe+G>Be.byteLength)throw Ee(ie);for(var Ie=P(Be.buffer).bytes,We=Fe+Be.byteOffset,mt=ue(+ge),tt=0;tt<G;tt++)Ie[We+tt]=mt[Ne?tt:G-tt-1]};if(!d)ce=function(G){g(this,ce,H);var q=T(G);_(this,{bytes:$.call(new Array(q),0),byteLength:q}),u||(this.byteLength=q)},fe=function(G,q,ue){g(this,fe,Y),g(G,ce,Y);var ge=P(G).byteLength,Ne=v(q);if(Ne<0||Ne>ge)throw Ee("Wrong offset");if(ue=ue===void 0?ge-Ne:S(ue),Ne+ue>ge)throw Ee(Q);_(this,{buffer:G,byteLength:ue,byteOffset:Ne}),u||(this.buffer=G,this.byteLength=ue,this.byteOffset=Ne)},u&&(y(ce,"byteLength"),y(fe,"buffer"),y(fe,"byteLength"),y(fe,"byteOffset")),p(fe[X],{getInt8:function(G){return E(this,1,G)[0]<<24>>24},getUint8:function(G){return E(this,1,G)[0]},getInt16:function(G){var q=E(this,2,G,arguments.length>1?arguments[1]:void 0);return(q[1]<<8|q[0])<<16>>16},getUint16:function(G){var q=E(this,2,G,arguments.length>1?arguments[1]:void 0);return q[1]<<8|q[0]},getInt32:function(G){return M(E(this,4,G,arguments.length>1?arguments[1]:void 0))},getUint32:function(G){return M(E(this,4,G,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(G){return Ae(E(this,4,G,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(G){return Ae(E(this,8,G,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(G,q){N(this,1,G,Oe,q)},setUint8:function(G,q){N(this,1,G,Oe,q)},setInt16:function(G,q){N(this,2,G,ve,q,arguments.length>2?arguments[2]:void 0)},setUint16:function(G,q){N(this,2,G,ve,q,arguments.length>2?arguments[2]:void 0)},setInt32:function(G,q){N(this,4,G,k,q,arguments.length>2?arguments[2]:void 0)},setUint32:function(G,q){N(this,4,G,k,q,arguments.length>2?arguments[2]:void 0)},setFloat32:function(G,q){N(this,4,G,C,q,arguments.length>2?arguments[2]:void 0)},setFloat64:function(G,q){N(this,8,G,O,q,arguments.length>2?arguments[2]:void 0)}});else{if(!h(function(){j(1)})||!h(function(){new j(-1)})||h(function(){return new j,new j(1.5),new j(NaN),j.name!=H})){ce=function(G){return g(this,ce),new j(T(G))};for(var I=ce[X]=j[X],R=A(j),L=0,z;R.length>L;)(z=R[L++])in ce||f(ce,z,j[z]);I.constructor=ce}D&&b(be)!==Te&&D(be,Te);var W=new fe(new ce(2)),U=be.setInt8;W.setInt8(0,2147483648),W.setInt8(1,2147483649),(W.getInt8(0)||!W.getInt8(1))&&p(be,{setInt8:function(G,q){U.call(this,G,q<<24>>24)},setUint8:function(G,q){U.call(this,G,q<<24>>24)}},{unsafe:!0})}V(ce,H),V(fe,Y),s.exports={ArrayBuffer:ce,DataView:fe}},1048:function(s,l,a){var c=a(7908),u=a(1400),d=a(7466),f=Math.min;s.exports=[].copyWithin||function(h,g){var v=c(this),S=d(v.length),T=u(h,S),x=u(g,S),b=arguments.length>2?arguments[2]:void 0,D=f((b===void 0?S:u(b,S))-x,S-T),A=1;for(x<T&&T<x+D&&(A=-1,x+=D-1,T+=D-1);D-- >0;)x in v?v[T]=v[x]:delete v[T],T+=A,x+=A;return v}},1285:function(s,l,a){var c=a(7908),u=a(1400),d=a(7466);s.exports=function(p){for(var h=c(this),g=d(h.length),v=arguments.length,S=u(v>1?arguments[1]:void 0,g),T=v>2?arguments[2]:void 0,x=T===void 0?g:u(T,g);x>S;)h[S++]=p;return h}},8533:function(s,l,a){var c=a(2092).forEach,u=a(9341),d=u("forEach");s.exports=d?[].forEach:function(p){return c(this,p,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),p=a(7466),h=a(6135),g=a(1246);s.exports=function(S){var T=u(S),x=typeof this=="function"?this:Array,b=arguments.length,D=b>1?arguments[1]:void 0,A=D!==void 0,B=g(T),$=0,V,F,P,_,H,Y;if(A&&(D=c(D,b>2?arguments[2]:void 0,2)),B!=null&&!(x==Array&&f(B)))for(_=B.call(T),H=_.next,F=new x;!(P=H.call(_)).done;$++)Y=A?d(_,D,[P.value,$],!0):P.value,h(F,$,Y);else for(V=p(T.length),F=new x(V);V>$;$++)Y=A?D(T[$],$):T[$],h(F,$,Y);return F.length=$,F}},1318:function(s,l,a){var c=a(5656),u=a(7466),d=a(1400),f=function(p){return function(h,g,v){var S=c(h),T=u(S.length),x=d(v,T),b;if(p&&g!=g){for(;T>x;)if(b=S[x++],b!=b)return!0}else for(;T>x;x++)if((p||x in S)&&S[x]===g)return p||x||0;return!p&&-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),p=a(5417),h=[].push,g=function(v){var S=v==1,T=v==2,x=v==3,b=v==4,D=v==6,A=v==7,B=v==5||D;return function($,V,F,P){for(var _=d($),H=u(_),Y=c(V,F,3),X=f(H.length),Q=0,ie=P||p,j=S?ie($,X):T||A?ie($,0):void 0,ce,fe;X>Q;Q++)if((B||Q in H)&&(ce=H[Q],fe=Y(ce,Q,_),v))if(S)j[Q]=fe;else if(fe)switch(v){case 3:return!0;case 5:return ce;case 6:return Q;case 2:h.call(j,ce)}else switch(v){case 4:return!1;case 7:h.call(j,ce)}return D?-1:x||b?b:j}};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),p=Math.min,h=[].lastIndexOf,g=!!h&&1/[1].lastIndexOf(1,-0)<0,v=f("lastIndexOf"),S=g||!v;s.exports=S?function(x){if(g)return h.apply(this,arguments)||0;var b=c(this),D=d(b.length),A=D-1;for(arguments.length>1&&(A=p(A,u(arguments[1]))),A<0&&(A=D+A);A>=0;A--)if(A in b&&b[A]===x)return A||0;return-1}:h},1194:function(s,l,a){var c=a(7293),u=a(5112),d=a(7392),f=u("species");s.exports=function(p){return d>=51||!c(function(){var h=[],g=h.constructor={};return g[f]=function(){return{foo:1}},h[p](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),p=function(h){return function(g,v,S,T){c(v);var x=u(g),b=d(x),D=f(x.length),A=h?D-1:0,B=h?-1:1;if(S<2)for(;;){if(A in b){T=b[A],A+=B;break}if(A+=B,h?A<0:D<=A)throw TypeError("Reduce of empty array with no initial value")}for(;h?A>=0:D>A;A+=B)A in b&&(T=v(T,b[A],A,x));return T}};s.exports={left:p(!1),right:p(!0)}},5417:function(s,l,a){var c=a(111),u=a(3157),d=a(5112),f=d("species");s.exports=function(p,h){var g;return u(p)&&(g=p.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)(h===0?0:h)}},3411:function(s,l,a){var c=a(9670),u=a(9212);s.exports=function(d,f,p,h){try{return h?f(c(p)[0],p[1]):f(p)}catch(g){throw u(d),g}}},7072:function(s,l,a){var c=a(5112),u=c("iterator"),d=!1;try{var f=0,p={next:function(){return{done:!!f++}},return:function(){d=!0}};p[u]=function(){return this},Array.from(p,function(){throw 2})}catch{}s.exports=function(h,g){if(!g&&!d)return!1;var v=!1;try{var S={};S[u]=function(){return{next:function(){return{done:v=!0}}}},h(S)}catch{}return v}},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"),p=u(function(){return arguments}())=="Arguments",h=function(g,v){try{return g[v]}catch{}};s.exports=c?u:function(g){var v,S,T;return g===void 0?"Undefined":g===null?"Null":typeof(S=h(v=Object(g),f))=="string"?S:p?u(v):(T=u(v))=="Object"&&typeof v.callee=="function"?"Arguments":T}},9920:function(s,l,a){var c=a(6656),u=a(3887),d=a(1236),f=a(3070);s.exports=function(p,h){for(var g=u(h),v=f.f,S=d.f,T=0;T<g.length;T++){var x=g[T];c(p,x)||v(p,x,S(h,x))}}},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),p=a(7497),h=function(){return this};s.exports=function(g,v,S){var T=v+" Iterator";return g.prototype=u(c,{next:d(1,S)}),f(g,T,!1,!0),p[T]=h,g}},8880:function(s,l,a){var c=a(9781),u=a(3070),d=a(9114);s.exports=c?function(f,p,h){return u.f(f,p,d(1,h))}:function(f,p,h){return f[p]=h,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,p,h){var g=c(p);g in f?u.f(f,g,d(0,h)):f[g]=h}},654:function(s,l,a){var c=a(2109),u=a(4994),d=a(9518),f=a(7674),p=a(8003),h=a(8880),g=a(1320),v=a(5112),S=a(1913),T=a(7497),x=a(3383),b=x.IteratorPrototype,D=x.BUGGY_SAFARI_ITERATORS,A=v("iterator"),B="keys",$="values",V="entries",F=function(){return this};s.exports=function(P,_,H,Y,X,Q,ie){u(H,_,Y);var j=function(k){if(k===X&&Ee)return Ee;if(!D&&k in be)return be[k];switch(k){case B:return function(){return new H(this,k)};case $:return function(){return new H(this,k)};case V:return function(){return new H(this,k)}}return function(){return new H(this)}},ce=_+" Iterator",fe=!1,be=P.prototype,Te=be[A]||be["@@iterator"]||X&&be[X],Ee=!D&&Te||j(X),ke=_=="Array"&&be.entries||Te,Ae,Oe,ve;if(ke&&(Ae=d(ke.call(new P)),b!==Object.prototype&&Ae.next&&(!S&&d(Ae)!==b&&(f?f(Ae,b):typeof Ae[A]!="function"&&h(Ae,A,F)),p(Ae,ce,!0,!0),S&&(T[ce]=F))),X==$&&Te&&Te.name!==$&&(fe=!0,Ee=function(){return Te.call(this)}),(!S||ie)&&be[A]!==Ee&&h(be,A,Ee),T[_]=Ee,X)if(Oe={values:j($),keys:Q?Ee:j(B),entries:j(V)},ie)for(ve in Oe)(D||fe||!(ve in be))&&g(be,ve,Oe[ve]);else c({target:_,proto:!0,forced:D||fe},Oe);return Oe}},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(p){return f?d.createElement(p):{}}},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,p=f&&f.v8,h,g;p?(h=p.split("."),g=h[0]+h[1]):u&&(h=u.match(/Edge\/(\d+)/),(!h||h[1]>=74)&&(h=u.match(/Chrome\/(\d+)/),h&&(g=h[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),p=a(3505),h=a(9920),g=a(4705);s.exports=function(v,S){var T=v.target,x=v.global,b=v.stat,D,A,B,$,V,F;if(x?A=c:b?A=c[T]||p(T,{}):A=(c[T]||{}).prototype,A)for(B in S){if(V=S[B],v.noTargetGet?(F=u(A,B),$=F&&F.value):$=A[B],D=g(x?B:T+(b?".":"#")+B,v.forced),!D&&$!==void 0){if(typeof V==typeof $)continue;h(V,$)}(v.sham||$&&$.sham)&&d(V,"sham",!0),f(A,B,V,v)}}},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),p=a(8880),h=d("species"),g=!u(function(){var b=/./;return b.exec=function(){var D=[];return D.groups={a:"7"},D},"".replace(b,"$<a>")!=="7"}),v=function(){return"a".replace(/./,"$0")==="$0"}(),S=d("replace"),T=function(){return/./[S]?/./[S]("a","$0")==="":!1}(),x=!u(function(){var b=/(?:)/,D=b.exec;b.exec=function(){return D.apply(this,arguments)};var A="ab".split(b);return A.length!==2||A[0]!=="a"||A[1]!=="b"});s.exports=function(b,D,A,B){var $=d(b),V=!u(function(){var X={};return X[$]=function(){return 7},""[b](X)!=7}),F=V&&!u(function(){var X=!1,Q=/a/;return b==="split"&&(Q={},Q.constructor={},Q.constructor[h]=function(){return Q},Q.flags="",Q[$]=/./[$]),Q.exec=function(){return X=!0,null},Q[$](""),!X});if(!V||!F||b==="replace"&&!(g&&v&&!T)||b==="split"&&!x){var P=/./[$],_=A($,""[b],function(X,Q,ie,j,ce){return Q.exec===f?V&&!ce?{done:!0,value:P.call(Q,ie,j)}:{done:!0,value:X.call(ie,Q,j)}:{done:!1}},{REPLACE_KEEPS_$0:v,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:T}),H=_[0],Y=_[1];c(String.prototype,b,H),c(RegExp.prototype,$,D==2?function(X,Q){return Y.call(X,this,Q)}:function(X){return Y.call(X,this)})}B&&p(RegExp.prototype[$],"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(p){return u.call(d,p)};case 2:return function(p,h){return u.call(d,p,h)};case 3:return function(p,h,g){return u.call(d,p,h,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,p){return arguments.length<2?d(c[f])||d(u[f]):c[f]&&c[f][p]||u[f]&&u[f][p]}},1246:function(s,l,a){var c=a(648),u=a(7497),d=a(5112),f=d("iterator");s.exports=function(p){if(p!=null)return p[f]||p["@@iterator"]||u[c(p)]}},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,p=/\$([$&'`]|\d\d?)/g;s.exports=function(h,g,v,S,T,x){var b=v+h.length,D=S.length,A=p;return T!==void 0&&(T=c(T),A=f),d.call(x,A,function(B,$){var V;switch($.charAt(0)){case"$":return"$";case"&":return h;case"`":return g.slice(0,v);case"'":return g.slice(b);case"<":V=T[$.slice(1,-1)];break;default:var F=+$;if(F===0)return B;if(F>D){var P=u(F/10);return P===0?B:P<=D?S[P-1]===void 0?$.charAt(1):S[P-1]+$.charAt(1):B}V=S[F-1]}return V===void 0?"":V})}},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(h,g,v){var S=new Array(v),T=v*8-g-1,x=(1<<T)-1,b=x>>1,D=g===23?a(2,-24)-a(2,-77):0,A=h<0||h===0&&1/h<0?1:0,B=0,$,V,F;for(h=l(h),h!=h||h===1/0?(V=h!=h?1:0,$=x):($=c(u(h)/d),h*(F=a(2,-$))<1&&($--,F*=2),$+b>=1?h+=D/F:h+=D*a(2,1-b),h*F>=2&&($++,F/=2),$+b>=x?(V=0,$=x):$+b>=1?(V=(h*F-1)*a(2,g),$=$+b):(V=h*a(2,b-1)*a(2,g),$=0));g>=8;S[B++]=V&255,V/=256,g-=8);for($=$<<g|V,T+=g;T>0;S[B++]=$&255,$/=256,T-=8);return S[--B]|=A*128,S},p=function(h,g){var v=h.length,S=v*8-g-1,T=(1<<S)-1,x=T>>1,b=S-7,D=v-1,A=h[D--],B=A&127,$;for(A>>=7;b>0;B=B*256+h[D],D--,b-=8);for($=B&(1<<-b)-1,B>>=-b,b+=g;b>0;$=$*256+h[D],D--,b-=8);if(B===0)B=1-x;else{if(B===T)return $?NaN:A?-1/0:1/0;$=$+a(2,g),B=B-x}return(A?-1:1)*$*a(2,B-g)};s.exports={pack:f,unpack:p}},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,p){var h,g;return u&&typeof(h=f.constructor)=="function"&&h!==p&&c(g=h.prototype)&&g!==p.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),p=a(6656),h=a(5465),g=a(6200),v=a(3501),S=u.WeakMap,T,x,b,D=function(_){return b(_)?x(_):T(_,{})},A=function(_){return function(H){var Y;if(!d(H)||(Y=x(H)).type!==_)throw TypeError("Incompatible receiver, "+_+" required");return Y}};if(c){var B=h.state||(h.state=new S),$=B.get,V=B.has,F=B.set;T=function(_,H){return H.facade=_,F.call(B,_,H),H},x=function(_){return $.call(B,_)||{}},b=function(_){return V.call(B,_)}}else{var P=g("state");v[P]=!0,T=function(_,H){return H.facade=_,f(_,P,H),H},x=function(_){return p(_,P)?_[P]:{}},b=function(_){return p(_,P)}}s.exports={set:T,get:x,has:b,enforce:D,getterFor:A}},7659:function(s,l,a){var c=a(5112),u=a(7497),d=c("iterator"),f=Array.prototype;s.exports=function(p){return p!==void 0&&(u.Array===p||f[d]===p)}},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(v,S){var T=p[f(v)];return T==g?!0:T==h?!1:typeof S=="function"?c(S):!!S},f=d.normalize=function(v){return String(v).replace(u,".").toLowerCase()},p=d.data={},h=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(p){var h;return c(p)&&((h=p[f])!==void 0?!!h:u(p)=="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),p=a(5112),h=a(1913),g=p("iterator"),v=!1,S=function(){return this},T,x,b;[].keys&&(b=[].keys(),"next"in b?(x=u(u(b)),x!==Object.prototype&&(T=x)):v=!0);var D=T==null||c(function(){var A={};return T[g].call(A)!==A});D&&(T={}),(!h||D)&&!f(T,g)&&d(T,g,S),s.exports={IteratorPrototype:T,BUGGY_SAFARI_ITERATORS:v}},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 p=new URL("b?a=1&b=2&c=3","http://a"),h=p.searchParams,g="";return p.pathname="c%20d",h.forEach(function(v,S){h.delete("b"),g+=S+v}),d&&!p.toJSON||!h.sort||p.href!=="http://a/c%20d?a=1&c=3"||h.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!h[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),p=a(5296),h=a(7908),g=a(8361),v=Object.assign,S=Object.defineProperty;s.exports=!v||u(function(){if(c&&v({b:1},v(S({},"a",{enumerable:!0,get:function(){S(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var T={},x={},b=Symbol(),D="abcdefghijklmnopqrst";return T[b]=7,D.split("").forEach(function(A){x[A]=A}),v({},T)[b]!=7||d(v({},x)).join("")!=D})?function(x,b){for(var D=h(x),A=arguments.length,B=1,$=f.f,V=p.f;A>B;)for(var F=g(arguments[B++]),P=$?d(F).concat($(F)):d(F),_=P.length,H=0,Y;_>H;)Y=P[H++],(!c||V.call(F,Y))&&(D[Y]=F[Y]);return D}:v},30:function(s,l,a){var c=a(9670),u=a(6048),d=a(748),f=a(3501),p=a(490),h=a(317),g=a(6200),v=">",S="<",T="prototype",x="script",b=g("IE_PROTO"),D=function(){},A=function(P){return S+x+v+P+S+"/"+x+v},B=function(P){P.write(A("")),P.close();var _=P.parentWindow.Object;return P=null,_},$=function(){var P=h("iframe"),_="java"+x+":",H;return P.style.display="none",p.appendChild(P),P.src=String(_),H=P.contentWindow.document,H.open(),H.write(A("document.F=Object")),H.close(),H.F},V,F=function(){try{V=document.domain&&new ActiveXObject("htmlfile")}catch{}F=V?B(V):$();for(var P=d.length;P--;)delete F[T][d[P]];return F()};f[b]=!0,s.exports=Object.create||function(_,H){var Y;return _!==null?(D[T]=c(_),Y=new D,D[T]=null,Y[b]=_):Y=F(),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(h,g){d(h);for(var v=f(g),S=v.length,T=0,x;S>T;)u.f(h,x=v[T++],g[x]);return h}},3070:function(s,l,a){var c=a(9781),u=a(4664),d=a(9670),f=a(7593),p=Object.defineProperty;l.f=c?p:function(g,v,S){if(d(g),v=f(v,!0),d(S),u)try{return p(g,v,S)}catch{}if("get"in S||"set"in S)throw TypeError("Accessors not supported");return"value"in S&&(g[v]=S.value),g}},1236:function(s,l,a){var c=a(9781),u=a(5296),d=a(9114),f=a(5656),p=a(7593),h=a(6656),g=a(4664),v=Object.getOwnPropertyDescriptor;l.f=c?v:function(T,x){if(T=f(T),x=p(x,!0),g)try{return v(T,x)}catch{}if(h(T,x))return d(!u.f.call(T,x),T[x])}},8006:function(s,l,a){var c=a(6324),u=a(748),d=u.concat("length","prototype");l.f=Object.getOwnPropertyNames||function(p){return c(p,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),p=d("IE_PROTO"),h=Object.prototype;s.exports=f?Object.getPrototypeOf:function(g){return g=u(g),c(g,p)?g[p]:typeof g.constructor=="function"&&g instanceof g.constructor?g.constructor.prototype:g instanceof Object?h:null}},6324:function(s,l,a){var c=a(6656),u=a(5656),d=a(1318).indexOf,f=a(3501);s.exports=function(p,h){var g=u(p),v=0,S=[],T;for(T in g)!c(f,T)&&c(g,T)&&S.push(T);for(;h.length>v;)c(g,T=h[v++])&&(~d(S,T)||S.push(T));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 p=c(this,f);return!!p&&p.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={},p;try{p=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,p.call(f,[]),d=f instanceof Array}catch{}return function(g,v){return c(g),u(v),d?p.call(g,v):g.__proto__=v,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(h){var g=u.f(f(h)),v=d.f;return v?g.concat(v(h)):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 p in d)c(u,p,d[p],f);return u}},1320:function(s,l,a){var c=a(7854),u=a(8880),d=a(6656),f=a(3505),p=a(2788),h=a(9909),g=h.get,v=h.enforce,S=String(String).split("String");(s.exports=function(T,x,b,D){var A=D?!!D.unsafe:!1,B=D?!!D.enumerable:!1,$=D?!!D.noTargetGet:!1,V;if(typeof b=="function"&&(typeof x=="string"&&!d(b,"name")&&u(b,"name",x),V=v(b),V.source||(V.source=S.join(typeof x=="string"?x:""))),T===c){B?T[x]=b:f(x,b);return}else A?!$&&T[x]&&(B=!0):delete T[x];B?T[x]=b:u(T,x,b)})(Function.prototype,"toString",function(){return typeof this=="function"&&g(this).source||p(this)})},7651:function(s,l,a){var c=a(4326),u=a(2261);s.exports=function(d,f){var p=d.exec;if(typeof p=="function"){var h=p.call(d,f);if(typeof h!="object")throw TypeError("RegExp exec method returned something other than an Object or null");return h}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,p=d,h=function(){var T=/a/,x=/b*/g;return d.call(T,"a"),d.call(x,"a"),T.lastIndex!==0||x.lastIndex!==0}(),g=u.UNSUPPORTED_Y||u.BROKEN_CARET,v=/()??/.exec("")[1]!==void 0,S=h||v||g;S&&(p=function(x){var b=this,D,A,B,$,V=g&&b.sticky,F=c.call(b),P=b.source,_=0,H=x;return V&&(F=F.replace("y",""),F.indexOf("g")===-1&&(F+="g"),H=String(x).slice(b.lastIndex),b.lastIndex>0&&(!b.multiline||b.multiline&&x[b.lastIndex-1]!==`
5
- `)&&(P="(?: "+P+")",H=" "+H,_++),A=new RegExp("^(?:"+P+")",F)),v&&(A=new RegExp("^"+P+"$(?!\\s)",F)),h&&(D=b.lastIndex),B=d.call(V?A:b,H),V?B?(B.input=B.input.slice(_),B[0]=B[0].slice(_),B.index=b.lastIndex,b.lastIndex+=B[0].length):b.lastIndex=0:h&&B&&(b.lastIndex=b.global?B.index+B[0].length:D),v&&B&&B.length>1&&f.call(B[0],A,function(){for($=1;$<arguments.length-2;$++)arguments[$]===void 0&&(B[$]=void 0)}),B}),s.exports=p},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),p=d("species");s.exports=function(h){var g=c(h),v=u.f;f&&g&&!g[p]&&v(g,p,{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(p,h,g){p&&!u(p=g?p:p.prototype,f)&&c(p,f,{configurable:!0,value:h})}},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(p,h){var g=c(p).constructor,v;return g===void 0||(v=c(g)[f])==null?h:u(v)}},8710:function(s,l,a){var c=a(9958),u=a(4488),d=function(f){return function(p,h){var g=String(u(p)),v=c(h),S=g.length,T,x;return v<0||v>=S?f?"":void 0:(T=g.charCodeAt(v),T<55296||T>56319||v+1===S||(x=g.charCodeAt(v+1))<56320||x>57343?f?g.charAt(v):T:f?g.slice(v,v+2):(T-55296<<10)+(x-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,p=72,h=128,g="-",v=/[^\0-\u007E]/,S=/[.\u3002\uFF0E\uFF61]/g,T="Overflow: input needs wider integers to process",x=a-c,b=Math.floor,D=String.fromCharCode,A=function(F){for(var P=[],_=0,H=F.length;_<H;){var Y=F.charCodeAt(_++);if(Y>=55296&&Y<=56319&&_<H){var X=F.charCodeAt(_++);(X&64512)==56320?P.push(((Y&1023)<<10)+(X&1023)+65536):(P.push(Y),_--)}else P.push(Y)}return P},B=function(F){return F+22+75*(F<26)},$=function(F,P,_){var H=0;for(F=_?b(F/f):F>>1,F+=b(F/P);F>x*u>>1;H+=a)F=b(F/x);return b(H+(x+1)*F/(F+d))},V=function(F){var P=[];F=A(F);var _=F.length,H=h,Y=0,X=p,Q,ie;for(Q=0;Q<F.length;Q++)ie=F[Q],ie<128&&P.push(D(ie));var j=P.length,ce=j;for(j&&P.push(g);ce<_;){var fe=l;for(Q=0;Q<F.length;Q++)ie=F[Q],ie>=H&&ie<fe&&(fe=ie);var be=ce+1;if(fe-H>b((l-Y)/be))throw RangeError(T);for(Y+=(fe-H)*be,H=fe,Q=0;Q<F.length;Q++){if(ie=F[Q],ie<H&&++Y>l)throw RangeError(T);if(ie==H){for(var Te=Y,Ee=a;;Ee+=a){var ke=Ee<=X?c:Ee>=X+u?u:Ee-X;if(Te<ke)break;var Ae=Te-ke,Oe=a-ke;P.push(D(B(ke+Ae%Oe))),Te=b(Ae/Oe)}P.push(D(B(Te))),X=$(Y,be,ce==j),Y=0,++ce}}++Y,++H}return P.join("")};s.exports=function(F){var P=[],_=F.toLowerCase().replace(S,".").split("."),H,Y;for(H=0;H<_.length;H++)Y=_[H],P.push(v.test(Y)?"xn--"+V(Y):Y);return P.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+"*"),p=RegExp(d+d+"*$"),h=function(g){return function(v){var S=String(c(v));return g&1&&(S=S.replace(f,"")),g&2&&(S=S.replace(p,"")),S}};s.exports={start:h(1),end:h(2),trim:h(3)}},1400:function(s,l,a){var c=a(9958),u=Math.max,d=Math.min;s.exports=function(f,p){var h=c(f);return h<0?u(h+p,0):d(h,p)}},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),p=u(f);if(f!==p)throw RangeError("Wrong length or index");return p}},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,p;if(d&&typeof(f=u.toString)=="function"&&!c(p=f.call(u))||typeof(f=u.valueOf)=="function"&&!c(p=f.call(u))||!d&&typeof(f=u.toString)=="function"&&!c(p=f.call(u)))return p;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),p=a(260),h=a(3331),g=a(5787),v=a(9114),S=a(8880),T=a(7466),x=a(7067),b=a(4590),D=a(7593),A=a(6656),B=a(648),$=a(111),V=a(30),F=a(7674),P=a(8006).f,_=a(7321),H=a(2092).forEach,Y=a(6340),X=a(3070),Q=a(1236),ie=a(9909),j=a(9587),ce=ie.get,fe=ie.set,be=X.f,Te=Q.f,Ee=Math.round,ke=u.RangeError,Ae=h.ArrayBuffer,Oe=h.DataView,ve=p.NATIVE_ARRAY_BUFFER_VIEWS,k=p.TYPED_ARRAY_TAG,M=p.TypedArray,C=p.TypedArrayPrototype,O=p.aTypedArrayConstructor,y=p.isTypedArray,E="BYTES_PER_ELEMENT",N="Wrong length",I=function(K,G){for(var q=0,ue=G.length,ge=new(O(K))(ue);ue>q;)ge[q]=G[q++];return ge},R=function(K,G){be(K,G,{get:function(){return ce(this)[G]}})},L=function(K){var G;return K instanceof Ae||(G=B(K))=="ArrayBuffer"||G=="SharedArrayBuffer"},z=function(K,G){return y(K)&&typeof G!="symbol"&&G in K&&String(+G)==String(G)},W=function(G,q){return z(G,q=D(q,!0))?v(2,G[q]):Te(G,q)},U=function(G,q,ue){return z(G,q=D(q,!0))&&$(ue)&&A(ue,"value")&&!A(ue,"get")&&!A(ue,"set")&&!ue.configurable&&(!A(ue,"writable")||ue.writable)&&(!A(ue,"enumerable")||ue.enumerable)?(G[q]=ue.value,G):be(G,q,ue)};d?(ve||(Q.f=W,X.f=U,R(C,"buffer"),R(C,"byteOffset"),R(C,"byteLength"),R(C,"length")),c({target:"Object",stat:!0,forced:!ve},{getOwnPropertyDescriptor:W,defineProperty:U}),s.exports=function(K,G,q){var ue=K.match(/\d+$/)[0]/8,ge=K+(q?"Clamped":"")+"Array",Ne="get"+K,Fe="set"+K,Be=u[ge],Ie=Be,We=Ie&&Ie.prototype,mt={},tt=function(ae,le){var Se=ce(ae);return Se.view[Ne](le*ue+Se.byteOffset,!0)},Sn=function(ae,le,Se){var xe=ce(ae);q&&(Se=(Se=Ee(Se))<0?0:Se>255?255:Se&255),xe.view[Fe](le*ue+xe.byteOffset,Se,!0)},J=function(ae,le){be(ae,le,{get:function(){return tt(this,le)},set:function(Se){return Sn(this,le,Se)},enumerable:!0})};ve?f&&(Ie=G(function(ae,le,Se,xe){return g(ae,Ie,ge),j(function(){return $(le)?L(le)?xe!==void 0?new Be(le,b(Se,ue),xe):Se!==void 0?new Be(le,b(Se,ue)):new Be(le):y(le)?I(Ie,le):_.call(Ie,le):new Be(x(le))}(),ae,Ie)}),F&&F(Ie,M),H(P(Be),function(ae){ae in Ie||S(Ie,ae,Be[ae])}),Ie.prototype=We):(Ie=G(function(ae,le,Se,xe){g(ae,Ie,ge);var $e=0,He=0,ot,st,Qe;if(!$(le))Qe=x(le),st=Qe*ue,ot=new Ae(st);else if(L(le)){ot=le,He=b(Se,ue);var Yt=le.byteLength;if(xe===void 0){if(Yt%ue||(st=Yt-He,st<0))throw ke(N)}else if(st=T(xe)*ue,st+He>Yt)throw ke(N);Qe=st/ue}else return y(le)?I(Ie,le):_.call(Ie,le);for(fe(ae,{buffer:ot,byteOffset:He,byteLength:st,length:Qe,view:new Oe(ot)});$e<Qe;)J(ae,$e++)}),F&&F(Ie,M),We=Ie.prototype=V(C)),We.constructor!==Ie&&S(We,"constructor",Ie),k&&S(We,k,ge),mt[ge]=Ie,c({global:!0,forced:Ie!=Be,sham:!ve},mt),E in Ie||S(Ie,E,ue),E in We||S(We,E,ue),Y(ge)}):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,p=c.ArrayBuffer,h=c.Int8Array;s.exports=!f||!u(function(){h(1)})||!u(function(){new h(-1)})||!d(function(g){new h,new h(null),new h(1.5),new h(g)},!0)||u(function(){return new h(new p(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 p=u(d,d.constructor),h=0,g=f.length,v=new(c(p))(g);g>h;)v[h]=f[h++];return v}},7321:function(s,l,a){var c=a(7908),u=a(7466),d=a(1246),f=a(7659),p=a(9974),h=a(260).aTypedArrayConstructor;s.exports=function(v){var S=c(v),T=arguments.length,x=T>1?arguments[1]:void 0,b=x!==void 0,D=d(S),A,B,$,V,F,P;if(D!=null&&!f(D))for(F=D.call(S),P=F.next,S=[];!(V=P.call(F)).done;)S.push(V.value);for(b&&T>2&&(x=p(x,arguments[2],2)),B=u(S.length),$=new(h(this))(B),A=0;B>A;A++)$[A]=b?x(S[A],A):S[A];return $}},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),p=a(133),h=a(3307),g=u("wks"),v=c.Symbol,S=h?v:v&&v.withoutSetter||f;s.exports=function(T){return d(g,T)||(p&&d(v,T)?g[T]=v[T]:g[T]=S("Symbol."+T)),g[T]}},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),p="ArrayBuffer",h=d[p],g=u[p];c({global:!0,forced:g!==h},{ArrayBuffer:h}),f(p)},2222:function(s,l,a){var c=a(2109),u=a(7293),d=a(3157),f=a(111),p=a(7908),h=a(7466),g=a(6135),v=a(5417),S=a(1194),T=a(5112),x=a(7392),b=T("isConcatSpreadable"),D=9007199254740991,A="Maximum allowed index exceeded",B=x>=51||!u(function(){var P=[];return P[b]=!1,P.concat()[0]!==P}),$=S("concat"),V=function(P){if(!f(P))return!1;var _=P[b];return _!==void 0?!!_:d(P)},F=!B||!$;c({target:"Array",proto:!0,forced:F},{concat:function(_){var H=p(this),Y=v(H,0),X=0,Q,ie,j,ce,fe;for(Q=-1,j=arguments.length;Q<j;Q++)if(fe=Q===-1?H:arguments[Q],V(fe)){if(ce=h(fe.length),X+ce>D)throw TypeError(A);for(ie=0;ie<ce;ie++,X++)ie in fe&&g(Y,X,fe[ie])}else{if(X>=D)throw TypeError(A);g(Y,X++,fe)}return Y.length=X,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(h){return u(this,h,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,p=!!f&&1/[1].indexOf(1,-0)<0,h=d("indexOf");c({target:"Array",proto:!0,forced:p||!h},{indexOf:function(v){return p?f.apply(this,arguments)||0:u(this,v,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),p=a(654),h="Array Iterator",g=f.set,v=f.getterFor(h);s.exports=p(Array,"Array",function(S,T){g(this,{type:h,target:c(S),index:0,kind:T})},function(){var S=v(this),T=S.target,x=S.kind,b=S.index++;return!T||b>=T.length?(S.target=void 0,{value:void 0,done:!0}):x=="keys"?{value:b,done:!1}:x=="values"?{value:T[b],done:!1}:{value:[b,T[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(h){return u(this,h,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),p=a(7466),h=a(5656),g=a(6135),v=a(5112),S=a(1194),T=S("slice"),x=v("species"),b=[].slice,D=Math.max;c({target:"Array",proto:!0,forced:!T},{slice:function(B,$){var V=h(this),F=p(V.length),P=f(B,F),_=f($===void 0?F:$,F),H,Y,X;if(d(V)&&(H=V.constructor,typeof H=="function"&&(H===Array||d(H.prototype))?H=void 0:u(H)&&(H=H[x],H===null&&(H=void 0)),H===Array||H===void 0))return b.call(V,P,_);for(Y=new(H===void 0?Array:H)(D(_-P,0)),X=0;P<_;P++,X++)P in V&&g(Y,X,V[P]);return Y.length=X,Y}})},561:function(s,l,a){var c=a(2109),u=a(1400),d=a(9958),f=a(7466),p=a(7908),h=a(5417),g=a(6135),v=a(1194),S=v("splice"),T=Math.max,x=Math.min,b=9007199254740991,D="Maximum allowed length exceeded";c({target:"Array",proto:!0,forced:!S},{splice:function(B,$){var V=p(this),F=f(V.length),P=u(B,F),_=arguments.length,H,Y,X,Q,ie,j;if(_===0?H=Y=0:_===1?(H=0,Y=F-P):(H=_-2,Y=x(T(d($),0),F-P)),F+H-Y>b)throw TypeError(D);for(X=h(V,Y),Q=0;Q<Y;Q++)ie=P+Q,ie in V&&g(X,Q,V[ie]);if(X.length=Y,H<Y){for(Q=P;Q<F-Y;Q++)ie=Q+Y,j=Q+H,ie in V?V[j]=V[ie]:delete V[j];for(Q=F;Q>F-Y+H;Q--)delete V[Q-1]}else if(H>Y)for(Q=F-Y;Q>P;Q--)ie=Q+Y-1,j=Q+H-1,ie in V?V[j]=V[ie]:delete V[j];for(Q=0;Q<H;Q++)V[Q+P]=arguments[Q+2];return V.length=F-Y+H,X}})},8309:function(s,l,a){var c=a(9781),u=a(3070).f,d=Function.prototype,f=d.toString,p=/^\s*function ([^ (]*)/,h="name";c&&!(h in d)&&u(d,h,{configurable:!0,get:function(){try{return f.call(this).match(p)[1]}catch{return""}}})},489:function(s,l,a){var c=a(2109),u=a(7293),d=a(7908),f=a(9518),p=a(8544),h=u(function(){f(1)});c({target:"Object",stat:!0,forced:h,sham:!p},{getPrototypeOf:function(v){return f(d(v))}})},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),p="toString",h=RegExp.prototype,g=h[p],v=d(function(){return g.call({source:"a",flags:"b"})!="/a/b"}),S=g.name!=p;(v||S)&&c(RegExp.prototype,p,function(){var x=u(this),b=String(x.source),D=x.flags,A=String(D===void 0&&x instanceof RegExp&&!("flags"in h)?f.call(x):D);return"/"+b+"/"+A},{unsafe:!0})},8783:function(s,l,a){var c=a(8710).charAt,u=a(9909),d=a(654),f="String Iterator",p=u.set,h=u.getterFor(f);d(String,"String",function(g){p(this,{type:f,string:String(g),index:0})},function(){var v=h(this),S=v.string,T=v.index,x;return T>=S.length?{value:void 0,done:!0}:(x=c(S,T),v.index+=x.length,{value:x,done:!1})})},4723:function(s,l,a){var c=a(7007),u=a(9670),d=a(7466),f=a(4488),p=a(1530),h=a(7651);c("match",1,function(g,v,S){return[function(x){var b=f(this),D=x==null?void 0:x[g];return D!==void 0?D.call(x,b):new RegExp(x)[g](String(b))},function(T){var x=S(v,T,this);if(x.done)return x.value;var b=u(T),D=String(this);if(!b.global)return h(b,D);var A=b.unicode;b.lastIndex=0;for(var B=[],$=0,V;(V=h(b,D))!==null;){var F=String(V[0]);B[$]=F,F===""&&(b.lastIndex=p(D,d(b.lastIndex),A)),$++}return $===0?null:B}]})},5306:function(s,l,a){var c=a(7007),u=a(9670),d=a(7466),f=a(9958),p=a(4488),h=a(1530),g=a(647),v=a(7651),S=Math.max,T=Math.min,x=function(b){return b===void 0?b:String(b)};c("replace",2,function(b,D,A,B){var $=B.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,V=B.REPLACE_KEEPS_$0,F=$?"$":"$0";return[function(_,H){var Y=p(this),X=_==null?void 0:_[b];return X!==void 0?X.call(_,Y,H):D.call(String(Y),_,H)},function(P,_){if(!$&&V||typeof _=="string"&&_.indexOf(F)===-1){var H=A(D,P,this,_);if(H.done)return H.value}var Y=u(P),X=String(this),Q=typeof _=="function";Q||(_=String(_));var ie=Y.global;if(ie){var j=Y.unicode;Y.lastIndex=0}for(var ce=[];;){var fe=v(Y,X);if(fe===null||(ce.push(fe),!ie))break;var be=String(fe[0]);be===""&&(Y.lastIndex=h(X,d(Y.lastIndex),j))}for(var Te="",Ee=0,ke=0;ke<ce.length;ke++){fe=ce[ke];for(var Ae=String(fe[0]),Oe=S(T(f(fe.index),X.length),0),ve=[],k=1;k<fe.length;k++)ve.push(x(fe[k]));var M=fe.groups;if(Q){var C=[Ae].concat(ve,Oe,X);M!==void 0&&C.push(M);var O=String(_.apply(void 0,C))}else O=g(Ae,X,Oe,ve,M,_);Oe>=Ee&&(Te+=X.slice(Ee,Oe)+O,Ee=Oe+Ae.length)}return Te+X.slice(Ee)}]})},3123:function(s,l,a){var c=a(7007),u=a(7850),d=a(9670),f=a(4488),p=a(6707),h=a(1530),g=a(7466),v=a(7651),S=a(2261),T=a(7293),x=[].push,b=Math.min,D=4294967295,A=!T(function(){return!RegExp(D,"y")});c("split",2,function(B,$,V){var F;return"abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?F=function(P,_){var H=String(f(this)),Y=_===void 0?D:_>>>0;if(Y===0)return[];if(P===void 0)return[H];if(!u(P))return $.call(H,P,Y);for(var X=[],Q=(P.ignoreCase?"i":"")+(P.multiline?"m":"")+(P.unicode?"u":"")+(P.sticky?"y":""),ie=0,j=new RegExp(P.source,Q+"g"),ce,fe,be;(ce=S.call(j,H))&&(fe=j.lastIndex,!(fe>ie&&(X.push(H.slice(ie,ce.index)),ce.length>1&&ce.index<H.length&&x.apply(X,ce.slice(1)),be=ce[0].length,ie=fe,X.length>=Y)));)j.lastIndex===ce.index&&j.lastIndex++;return ie===H.length?(be||!j.test(""))&&X.push(""):X.push(H.slice(ie)),X.length>Y?X.slice(0,Y):X}:"0".split(void 0,0).length?F=function(P,_){return P===void 0&&_===0?[]:$.call(this,P,_)}:F=$,[function(_,H){var Y=f(this),X=_==null?void 0:_[B];return X!==void 0?X.call(_,Y,H):F.call(String(Y),_,H)},function(P,_){var H=V(F,P,this,_,F!==$);if(H.done)return H.value;var Y=d(P),X=String(this),Q=p(Y,RegExp),ie=Y.unicode,j=(Y.ignoreCase?"i":"")+(Y.multiline?"m":"")+(Y.unicode?"u":"")+(A?"y":"g"),ce=new Q(A?Y:"^(?:"+Y.source+")",j),fe=_===void 0?D:_>>>0;if(fe===0)return[];if(X.length===0)return v(ce,X)===null?[X]:[];for(var be=0,Te=0,Ee=[];Te<X.length;){ce.lastIndex=A?Te:0;var ke=v(ce,A?X:X.slice(Te)),Ae;if(ke===null||(Ae=b(g(ce.lastIndex+(A?0:Te)),X.length))===be)Te=h(X,Te,ie);else{if(Ee.push(X.slice(be,Te)),Ee.length===fe)return Ee;for(var Oe=1;Oe<=ke.length-1;Oe++)if(Ee.push(ke[Oe]),Ee.length===fe)return Ee;Te=be=Ae}}return Ee.push(X.slice(be)),Ee}]},!A)},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(h,g){return u.call(d(this),h,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(h){return u(d(this),h,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(h){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,p=c.exportTypedArrayMethod;p("filter",function(g){var v=u(f(this),g,arguments.length>1?arguments[1]:void 0);return d(this,v)})},7174:function(s,l,a){var c=a(260),u=a(2092).findIndex,d=c.aTypedArray,f=c.exportTypedArrayMethod;f("findIndex",function(h){return u(d(this),h,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(h){return u(d(this),h,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(h){u(d(this),h,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(h){return u(d(this),h,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(h){return u(d(this),h,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),p=f("iterator"),h=c.Uint8Array,g=d.values,v=d.keys,S=d.entries,T=u.aTypedArray,x=u.exportTypedArrayMethod,b=h&&h.prototype[p],D=!!b&&(b.name=="values"||b.name==null),A=function(){return g.call(T(this))};x("entries",function(){return S.call(T(this))}),x("keys",function(){return v.call(T(this))}),x("values",A,!D),x(p,A,!D)},8867:function(s,l,a){var c=a(260),u=c.aTypedArray,d=c.exportTypedArrayMethod,f=[].join;d("join",function(h){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(h){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,p=c.aTypedArrayConstructor,h=c.exportTypedArrayMethod;h("map",function(v){return u(f(this),v,arguments.length>1?arguments[1]:void 0,function(S,T){return new(p(d(S,S.constructor)))(T)})})},4483:function(s,l,a){var c=a(260),u=a(3671).right,d=c.aTypedArray,f=c.exportTypedArrayMethod;f("reduceRight",function(h){return u(d(this),h,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(h){return u(d(this),h,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 h=this,g=u(h).length,v=f(g/2),S=0,T;S<v;)T=h[S],h[S++]=h[--g],h[g]=T;return h})},3462:function(s,l,a){var c=a(260),u=a(7466),d=a(4590),f=a(7908),p=a(7293),h=c.aTypedArray,g=c.exportTypedArrayMethod,v=p(function(){new Int8Array(1).set({})});g("set",function(T){h(this);var x=d(arguments.length>1?arguments[1]:void 0,1),b=this.length,D=f(T),A=u(D.length),B=0;if(A+x>b)throw RangeError("Wrong length");for(;B<A;)this[x+B]=D[B++]},v)},678:function(s,l,a){var c=a(260),u=a(6707),d=a(7293),f=c.aTypedArray,p=c.aTypedArrayConstructor,h=c.exportTypedArrayMethod,g=[].slice,v=d(function(){new Int8Array(1).slice()});h("slice",function(T,x){for(var b=g.call(f(this),T,x),D=u(this,this.constructor),A=0,B=b.length,$=new(p(D))(B);B>A;)$[A]=b[A++];return $},v)},7462:function(s,l,a){var c=a(260),u=a(2092).some,d=c.aTypedArray,f=c.exportTypedArrayMethod;f("some",function(h){return u(d(this),h,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(h){return f.call(u(this),h)})},5021:function(s,l,a){var c=a(260),u=a(7466),d=a(1400),f=a(6707),p=c.aTypedArray,h=c.exportTypedArrayMethod;h("subarray",function(v,S){var T=p(this),x=T.length,b=d(v,x);return new(f(T,T.constructor))(T.buffer,T.byteOffset+b*T.BYTES_PER_ELEMENT,u((S===void 0?x:d(S,x))-b))})},2974:function(s,l,a){var c=a(7854),u=a(260),d=a(7293),f=c.Int8Array,p=u.aTypedArray,h=u.exportTypedArrayMethod,g=[].toLocaleString,v=[].slice,S=!!f&&d(function(){g.call(new f(1))}),T=d(function(){return[1,2].toLocaleString()!=new f([1,2]).toLocaleString()})||!d(function(){f.prototype.toLocaleString.call([1,2])});h("toLocaleString",function(){return g.apply(S?v.call(p(this)):p(this),arguments)},T)},5016:function(s,l,a){var c=a(260).exportTypedArrayMethod,u=a(7293),d=a(7854),f=d.Uint8Array,p=f&&f.prototype||{},h=[].toString,g=[].join;u(function(){h.call({})})&&(h=function(){return g.call(this)});var v=p.toString!=h;c("toString",h,v)},2472:function(s,l,a){var c=a(9843);c("Uint8",function(u){return function(f,p,h){return u(this,f,p,h)}})},4747:function(s,l,a){var c=a(7854),u=a(8324),d=a(8533),f=a(8880);for(var p in u){var h=c[p],g=h&&h.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),p=a(5112),h=p("iterator"),g=p("toStringTag"),v=d.values;for(var S in u){var T=c[S],x=T&&T.prototype;if(x){if(x[h]!==v)try{f(x,h,v)}catch{x[h]=v}if(x[g]||f(x,g,S),u[S]){for(var b in d)if(x[b]!==d[b])try{f(x,b,d[b])}catch{x[b]=d[b]}}}}},1637:function(s,l,a){a(6992);var c=a(2109),u=a(5005),d=a(590),f=a(1320),p=a(2248),h=a(8003),g=a(4994),v=a(9909),S=a(5787),T=a(6656),x=a(9974),b=a(648),D=a(9670),A=a(111),B=a(30),$=a(9114),V=a(8554),F=a(1246),P=a(5112),_=u("fetch"),H=u("Headers"),Y=P("iterator"),X="URLSearchParams",Q=X+"Iterator",ie=v.set,j=v.getterFor(X),ce=v.getterFor(Q),fe=/\+/g,be=Array(4),Te=function(I){return be[I-1]||(be[I-1]=RegExp("((?:%[\\da-f]{2}){"+I+"})","gi"))},Ee=function(I){try{return decodeURIComponent(I)}catch{return I}},ke=function(I){var R=I.replace(fe," "),L=4;try{return decodeURIComponent(R)}catch{for(;L;)R=R.replace(Te(L--),Ee);return R}},Ae=/[!'()~]|%20/g,Oe={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},ve=function(I){return Oe[I]},k=function(I){return encodeURIComponent(I).replace(Ae,ve)},M=function(I,R){if(R)for(var L=R.split("&"),z=0,W,U;z<L.length;)W=L[z++],W.length&&(U=W.split("="),I.push({key:ke(U.shift()),value:ke(U.join("="))}))},C=function(I){this.entries.length=0,M(this.entries,I)},O=function(I,R){if(I<R)throw TypeError("Not enough arguments")},y=g(function(R,L){ie(this,{type:Q,iterator:V(j(R).entries),kind:L})},"Iterator",function(){var R=ce(this),L=R.kind,z=R.iterator.next(),W=z.value;return z.done||(z.value=L==="keys"?W.key:L==="values"?W.value:[W.key,W.value]),z}),E=function(){S(this,E,X);var R=arguments.length>0?arguments[0]:void 0,L=this,z=[],W,U,K,G,q,ue,ge,Ne,Fe;if(ie(L,{type:X,entries:z,updateURL:function(){},updateSearchParams:C}),R!==void 0)if(A(R))if(W=F(R),typeof W=="function")for(U=W.call(R),K=U.next;!(G=K.call(U)).done;){if(q=V(D(G.value)),ue=q.next,(ge=ue.call(q)).done||(Ne=ue.call(q)).done||!ue.call(q).done)throw TypeError("Expected sequence with length 2");z.push({key:ge.value+"",value:Ne.value+""})}else for(Fe in R)T(R,Fe)&&z.push({key:Fe,value:R[Fe]+""});else M(z,typeof R=="string"?R.charAt(0)==="?"?R.slice(1):R:R+"")},N=E.prototype;p(N,{append:function(R,L){O(arguments.length,2);var z=j(this);z.entries.push({key:R+"",value:L+""}),z.updateURL()},delete:function(I){O(arguments.length,1);for(var R=j(this),L=R.entries,z=I+"",W=0;W<L.length;)L[W].key===z?L.splice(W,1):W++;R.updateURL()},get:function(R){O(arguments.length,1);for(var L=j(this).entries,z=R+"",W=0;W<L.length;W++)if(L[W].key===z)return L[W].value;return null},getAll:function(R){O(arguments.length,1);for(var L=j(this).entries,z=R+"",W=[],U=0;U<L.length;U++)L[U].key===z&&W.push(L[U].value);return W},has:function(R){O(arguments.length,1);for(var L=j(this).entries,z=R+"",W=0;W<L.length;)if(L[W++].key===z)return!0;return!1},set:function(R,L){O(arguments.length,1);for(var z=j(this),W=z.entries,U=!1,K=R+"",G=L+"",q=0,ue;q<W.length;q++)ue=W[q],ue.key===K&&(U?W.splice(q--,1):(U=!0,ue.value=G));U||W.push({key:K,value:G}),z.updateURL()},sort:function(){var R=j(this),L=R.entries,z=L.slice(),W,U,K;for(L.length=0,K=0;K<z.length;K++){for(W=z[K],U=0;U<K;U++)if(L[U].key>W.key){L.splice(U,0,W);break}U===K&&L.push(W)}R.updateURL()},forEach:function(R){for(var L=j(this).entries,z=x(R,arguments.length>1?arguments[1]:void 0,3),W=0,U;W<L.length;)U=L[W++],z(U.value,U.key,this)},keys:function(){return new y(this,"keys")},values:function(){return new y(this,"values")},entries:function(){return new y(this,"entries")}},{enumerable:!0}),f(N,Y,N.entries),f(N,"toString",function(){for(var R=j(this).entries,L=[],z=0,W;z<R.length;)W=R[z++],L.push(k(W.key)+"="+k(W.value));return L.join("&")},{enumerable:!0}),h(E,X),c({global:!0,forced:!d},{URLSearchParams:E}),!d&&typeof _=="function"&&typeof H=="function"&&c({global:!0,enumerable:!0,forced:!0},{fetch:function(R){var L=[R],z,W,U;return arguments.length>1&&(z=arguments[1],A(z)&&(W=z.body,b(W)===X&&(U=z.headers?new H(z.headers):new H,U.has("content-type")||U.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),z=B(z,{body:$(0,String(W)),headers:$(0,U)}))),L.push(z)),_.apply(this,L)}}),s.exports={URLSearchParams:E,getState:j}},285:function(s,l,a){a(8783);var c=a(2109),u=a(9781),d=a(590),f=a(7854),p=a(6048),h=a(1320),g=a(5787),v=a(6656),S=a(1574),T=a(8457),x=a(8710).codeAt,b=a(3197),D=a(8003),A=a(1637),B=a(9909),$=f.URL,V=A.URLSearchParams,F=A.getState,P=B.set,_=B.getterFor("URL"),H=Math.floor,Y=Math.pow,X="Invalid authority",Q="Invalid scheme",ie="Invalid host",j="Invalid port",ce=/[A-Za-z]/,fe=/[\d+-.A-Za-z]/,be=/\d/,Te=/^(0x|0X)/,Ee=/^[0-7]+$/,ke=/^\d+$/,Ae=/^[\dA-Fa-f]+$/,Oe=/[\u0000\t\u000A\u000D #%/:?@[\\]]/,ve=/[\u0000\t\u000A\u000D #/:?@[\\]]/,k=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,M=/[\t\u000A\u000D]/g,C,O=function(w,ee){var Z,te,oe;if(ee.charAt(0)=="["){if(ee.charAt(ee.length-1)!="]"||(Z=E(ee.slice(1,-1)),!Z))return ie;w.host=Z}else if(G(w)){if(ee=b(ee),Oe.test(ee)||(Z=y(ee),Z===null))return ie;w.host=Z}else{if(ve.test(ee))return ie;for(Z="",te=T(ee),oe=0;oe<te.length;oe++)Z+=U(te[oe],R);w.host=Z}},y=function(w){var ee=w.split("."),Z,te,oe,we,pe,_e,ze;if(ee.length&&ee[ee.length-1]==""&&ee.pop(),Z=ee.length,Z>4)return w;for(te=[],oe=0;oe<Z;oe++){if(we=ee[oe],we=="")return w;if(pe=10,we.length>1&&we.charAt(0)=="0"&&(pe=Te.test(we)?16:8,we=we.slice(pe==8?1:2)),we==="")_e=0;else{if(!(pe==10?ke:pe==8?Ee:Ae).test(we))return w;_e=parseInt(we,pe)}te.push(_e)}for(oe=0;oe<Z;oe++)if(_e=te[oe],oe==Z-1){if(_e>=Y(256,5-Z))return null}else if(_e>255)return null;for(ze=te.pop(),oe=0;oe<te.length;oe++)ze+=te[oe]*Y(256,3-oe);return ze},E=function(w){var ee=[0,0,0,0,0,0,0,0],Z=0,te=null,oe=0,we,pe,_e,ze,Ue,Nt,re,Ge=function(){return w.charAt(oe)};if(Ge()==":"){if(w.charAt(1)!=":")return;oe+=2,Z++,te=Z}for(;Ge();){if(Z==8)return;if(Ge()==":"){if(te!==null)return;oe++,Z++,te=Z;continue}for(we=pe=0;pe<4&&Ae.test(Ge());)we=we*16+parseInt(Ge(),16),oe++,pe++;if(Ge()=="."){if(pe==0||(oe-=pe,Z>6))return;for(_e=0;Ge();){if(ze=null,_e>0)if(Ge()=="."&&_e<4)oe++;else return;if(!be.test(Ge()))return;for(;be.test(Ge());){if(Ue=parseInt(Ge(),10),ze===null)ze=Ue;else{if(ze==0)return;ze=ze*10+Ue}if(ze>255)return;oe++}ee[Z]=ee[Z]*256+ze,_e++,(_e==2||_e==4)&&Z++}if(_e!=4)return;break}else if(Ge()==":"){if(oe++,!Ge())return}else if(Ge())return;ee[Z++]=we}if(te!==null)for(Nt=Z-te,Z=7;Z!=0&&Nt>0;)re=ee[Z],ee[Z--]=ee[te+Nt-1],ee[te+--Nt]=re;else if(Z!=8)return;return ee},N=function(w){for(var ee=null,Z=1,te=null,oe=0,we=0;we<8;we++)w[we]!==0?(oe>Z&&(ee=te,Z=oe),te=null,oe=0):(te===null&&(te=we),++oe);return oe>Z&&(ee=te,Z=oe),ee},I=function(w){var ee,Z,te,oe;if(typeof w=="number"){for(ee=[],Z=0;Z<4;Z++)ee.unshift(w%256),w=H(w/256);return ee.join(".")}else if(typeof w=="object"){for(ee="",te=N(w),Z=0;Z<8;Z++)oe&&w[Z]===0||(oe&&(oe=!1),te===Z?(ee+=Z?":":"::",oe=!0):(ee+=w[Z].toString(16),Z<7&&(ee+=":")));return"["+ee+"]"}return w},R={},L=S({},R,{" ":1,'"':1,"<":1,">":1,"`":1}),z=S({},L,{"#":1,"?":1,"{":1,"}":1}),W=S({},z,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),U=function(w,ee){var Z=x(w,0);return Z>32&&Z<127&&!v(ee,w)?w:encodeURIComponent(w)},K={ftp:21,file:null,http:80,https:443,ws:80,wss:443},G=function(w){return v(K,w.scheme)},q=function(w){return w.username!=""||w.password!=""},ue=function(w){return!w.host||w.cannotBeABaseURL||w.scheme=="file"},ge=function(w,ee){var Z;return w.length==2&&ce.test(w.charAt(0))&&((Z=w.charAt(1))==":"||!ee&&Z=="|")},Ne=function(w){var ee;return w.length>1&&ge(w.slice(0,2))&&(w.length==2||(ee=w.charAt(2))==="/"||ee==="\\"||ee==="?"||ee==="#")},Fe=function(w){var ee=w.path,Z=ee.length;Z&&(w.scheme!="file"||Z!=1||!ge(ee[0],!0))&&ee.pop()},Be=function(w){return w==="."||w.toLowerCase()==="%2e"},Ie=function(w){return w=w.toLowerCase(),w===".."||w==="%2e."||w===".%2e"||w==="%2e%2e"},We={},mt={},tt={},Sn={},J={},ae={},le={},Se={},xe={},$e={},He={},ot={},st={},Qe={},Yt={},Cn={},Et={},kt={},vr={},Ot={},cn={},Jt=function(w,ee,Z,te){var oe=Z||We,we=0,pe="",_e=!1,ze=!1,Ue=!1,Nt,re,Ge,un;for(Z||(w.scheme="",w.username="",w.password="",w.host=null,w.port=null,w.path=[],w.query=null,w.fragment=null,w.cannotBeABaseURL=!1,ee=ee.replace(k,"")),ee=ee.replace(M,""),Nt=T(ee);we<=Nt.length;){switch(re=Nt[we],oe){case We:if(re&&ce.test(re))pe+=re.toLowerCase(),oe=mt;else{if(Z)return Q;oe=tt;continue}break;case mt:if(re&&(fe.test(re)||re=="+"||re=="-"||re=="."))pe+=re.toLowerCase();else if(re==":"){if(Z&&(G(w)!=v(K,pe)||pe=="file"&&(q(w)||w.port!==null)||w.scheme=="file"&&!w.host))return;if(w.scheme=pe,Z){G(w)&&K[w.scheme]==w.port&&(w.port=null);return}pe="",w.scheme=="file"?oe=Qe:G(w)&&te&&te.scheme==w.scheme?oe=Sn:G(w)?oe=Se:Nt[we+1]=="/"?(oe=J,we++):(w.cannotBeABaseURL=!0,w.path.push(""),oe=vr)}else{if(Z)return Q;pe="",oe=tt,we=0;continue}break;case tt:if(!te||te.cannotBeABaseURL&&re!="#")return Q;if(te.cannotBeABaseURL&&re=="#"){w.scheme=te.scheme,w.path=te.path.slice(),w.query=te.query,w.fragment="",w.cannotBeABaseURL=!0,oe=cn;break}oe=te.scheme=="file"?Qe:ae;continue;case Sn:if(re=="/"&&Nt[we+1]=="/")oe=xe,we++;else{oe=ae;continue}break;case J:if(re=="/"){oe=$e;break}else{oe=kt;continue}case ae:if(w.scheme=te.scheme,re==C)w.username=te.username,w.password=te.password,w.host=te.host,w.port=te.port,w.path=te.path.slice(),w.query=te.query;else if(re=="/"||re=="\\"&&G(w))oe=le;else if(re=="?")w.username=te.username,w.password=te.password,w.host=te.host,w.port=te.port,w.path=te.path.slice(),w.query="",oe=Ot;else if(re=="#")w.username=te.username,w.password=te.password,w.host=te.host,w.port=te.port,w.path=te.path.slice(),w.query=te.query,w.fragment="",oe=cn;else{w.username=te.username,w.password=te.password,w.host=te.host,w.port=te.port,w.path=te.path.slice(),w.path.pop(),oe=kt;continue}break;case le:if(G(w)&&(re=="/"||re=="\\"))oe=xe;else if(re=="/")oe=$e;else{w.username=te.username,w.password=te.password,w.host=te.host,w.port=te.port,oe=kt;continue}break;case Se:if(oe=xe,re!="/"||pe.charAt(we+1)!="/")continue;we++;break;case xe:if(re!="/"&&re!="\\"){oe=$e;continue}break;case $e:if(re=="@"){_e&&(pe="%40"+pe),_e=!0,Ge=T(pe);for(var Us=0;Us<Ge.length;Us++){var Bc=Ge[Us];if(Bc==":"&&!Ue){Ue=!0;continue}var Fc=U(Bc,W);Ue?w.password+=Fc:w.username+=Fc}pe=""}else if(re==C||re=="/"||re=="?"||re=="#"||re=="\\"&&G(w)){if(_e&&pe=="")return X;we-=T(pe).length+1,pe="",oe=He}else pe+=re;break;case He:case ot:if(Z&&w.scheme=="file"){oe=Cn;continue}else if(re==":"&&!ze){if(pe=="")return ie;if(un=O(w,pe),un)return un;if(pe="",oe=st,Z==ot)return}else if(re==C||re=="/"||re=="?"||re=="#"||re=="\\"&&G(w)){if(G(w)&&pe=="")return ie;if(Z&&pe==""&&(q(w)||w.port!==null))return;if(un=O(w,pe),un)return un;if(pe="",oe=Et,Z)return;continue}else re=="["?ze=!0:re=="]"&&(ze=!1),pe+=re;break;case st:if(be.test(re))pe+=re;else if(re==C||re=="/"||re=="?"||re=="#"||re=="\\"&&G(w)||Z){if(pe!=""){var js=parseInt(pe,10);if(js>65535)return j;w.port=G(w)&&js===K[w.scheme]?null:js,pe=""}if(Z)return;oe=Et;continue}else return j;break;case Qe:if(w.scheme="file",re=="/"||re=="\\")oe=Yt;else if(te&&te.scheme=="file")if(re==C)w.host=te.host,w.path=te.path.slice(),w.query=te.query;else if(re=="?")w.host=te.host,w.path=te.path.slice(),w.query="",oe=Ot;else if(re=="#")w.host=te.host,w.path=te.path.slice(),w.query=te.query,w.fragment="",oe=cn;else{Ne(Nt.slice(we).join(""))||(w.host=te.host,w.path=te.path.slice(),Fe(w)),oe=kt;continue}else{oe=kt;continue}break;case Yt:if(re=="/"||re=="\\"){oe=Cn;break}te&&te.scheme=="file"&&!Ne(Nt.slice(we).join(""))&&(ge(te.path[0],!0)?w.path.push(te.path[0]):w.host=te.host),oe=kt;continue;case Cn:if(re==C||re=="/"||re=="\\"||re=="?"||re=="#"){if(!Z&&ge(pe))oe=kt;else if(pe==""){if(w.host="",Z)return;oe=Et}else{if(un=O(w,pe),un)return un;if(w.host=="localhost"&&(w.host=""),Z)return;pe="",oe=Et}continue}else pe+=re;break;case Et:if(G(w)){if(oe=kt,re!="/"&&re!="\\")continue}else if(!Z&&re=="?")w.query="",oe=Ot;else if(!Z&&re=="#")w.fragment="",oe=cn;else if(re!=C&&(oe=kt,re!="/"))continue;break;case kt:if(re==C||re=="/"||re=="\\"&&G(w)||!Z&&(re=="?"||re=="#")){if(Ie(pe)?(Fe(w),re!="/"&&!(re=="\\"&&G(w))&&w.path.push("")):Be(pe)?re!="/"&&!(re=="\\"&&G(w))&&w.path.push(""):(w.scheme=="file"&&!w.path.length&&ge(pe)&&(w.host&&(w.host=""),pe=pe.charAt(0)+":"),w.path.push(pe)),pe="",w.scheme=="file"&&(re==C||re=="?"||re=="#"))for(;w.path.length>1&&w.path[0]==="";)w.path.shift();re=="?"?(w.query="",oe=Ot):re=="#"&&(w.fragment="",oe=cn)}else pe+=U(re,z);break;case vr:re=="?"?(w.query="",oe=Ot):re=="#"?(w.fragment="",oe=cn):re!=C&&(w.path[0]+=U(re,R));break;case Ot:!Z&&re=="#"?(w.fragment="",oe=cn):re!=C&&(re=="'"&&G(w)?w.query+="%27":re=="#"?w.query+="%23":w.query+=U(re,R));break;case cn:re!=C&&(w.fragment+=U(re,L));break}we++}},Gn=function(ee){var Z=g(this,Gn,"URL"),te=arguments.length>1?arguments[1]:void 0,oe=String(ee),we=P(Z,{type:"URL"}),pe,_e;if(te!==void 0){if(te instanceof Gn)pe=_(te);else if(_e=Jt(pe={},String(te)),_e)throw TypeError(_e)}if(_e=Jt(we,oe,null,pe),_e)throw TypeError(_e);var ze=we.searchParams=new V,Ue=F(ze);Ue.updateSearchParams(we.query),Ue.updateURL=function(){we.query=String(ze)||null},u||(Z.href=Wi.call(Z),Z.origin=xc.call(Z),Z.protocol=Ac.call(Z),Z.username=wc.call(Z),Z.password=kc.call(Z),Z.host=Oc.call(Z),Z.hostname=Mc.call(Z),Z.port=Nc.call(Z),Z.pathname=Ic.call(Z),Z.search=Dc.call(Z),Z.searchParams=Rc.call(Z),Z.hash=Lc.call(Z))},Hs=Gn.prototype,Wi=function(){var w=_(this),ee=w.scheme,Z=w.username,te=w.password,oe=w.host,we=w.port,pe=w.path,_e=w.query,ze=w.fragment,Ue=ee+":";return oe!==null?(Ue+="//",q(w)&&(Ue+=Z+(te?":"+te:"")+"@"),Ue+=I(oe),we!==null&&(Ue+=":"+we)):ee=="file"&&(Ue+="//"),Ue+=w.cannotBeABaseURL?pe[0]:pe.length?"/"+pe.join("/"):"",_e!==null&&(Ue+="?"+_e),ze!==null&&(Ue+="#"+ze),Ue},xc=function(){var w=_(this),ee=w.scheme,Z=w.port;if(ee=="blob")try{return new URL(ee.path[0]).origin}catch{return"null"}return ee=="file"||!G(w)?"null":ee+"://"+I(w.host)+(Z!==null?":"+Z:"")},Ac=function(){return _(this).scheme+":"},wc=function(){return _(this).username},kc=function(){return _(this).password},Oc=function(){var w=_(this),ee=w.host,Z=w.port;return ee===null?"":Z===null?I(ee):I(ee)+":"+Z},Mc=function(){var w=_(this).host;return w===null?"":I(w)},Nc=function(){var w=_(this).port;return w===null?"":String(w)},Ic=function(){var w=_(this),ee=w.path;return w.cannotBeABaseURL?ee[0]:ee.length?"/"+ee.join("/"):""},Dc=function(){var w=_(this).query;return w?"?"+w:""},Rc=function(){return _(this).searchParams},Lc=function(){var w=_(this).fragment;return w?"#"+w:""},Mt=function(w,ee){return{get:w,set:ee,configurable:!0,enumerable:!0}};if(u&&p(Hs,{href:Mt(Wi,function(w){var ee=_(this),Z=String(w),te=Jt(ee,Z);if(te)throw TypeError(te);F(ee.searchParams).updateSearchParams(ee.query)}),origin:Mt(xc),protocol:Mt(Ac,function(w){var ee=_(this);Jt(ee,String(w)+":",We)}),username:Mt(wc,function(w){var ee=_(this),Z=T(String(w));if(!ue(ee)){ee.username="";for(var te=0;te<Z.length;te++)ee.username+=U(Z[te],W)}}),password:Mt(kc,function(w){var ee=_(this),Z=T(String(w));if(!ue(ee)){ee.password="";for(var te=0;te<Z.length;te++)ee.password+=U(Z[te],W)}}),host:Mt(Oc,function(w){var ee=_(this);ee.cannotBeABaseURL||Jt(ee,String(w),He)}),hostname:Mt(Mc,function(w){var ee=_(this);ee.cannotBeABaseURL||Jt(ee,String(w),ot)}),port:Mt(Nc,function(w){var ee=_(this);ue(ee)||(w=String(w),w==""?ee.port=null:Jt(ee,w,st))}),pathname:Mt(Ic,function(w){var ee=_(this);ee.cannotBeABaseURL||(ee.path=[],Jt(ee,w+"",Et))}),search:Mt(Dc,function(w){var ee=_(this);w=String(w),w==""?ee.query=null:(w.charAt(0)=="?"&&(w=w.slice(1)),ee.query="",Jt(ee,w,Ot)),F(ee.searchParams).updateSearchParams(ee.query)}),searchParams:Mt(Rc),hash:Mt(Lc,function(w){var ee=_(this);if(w=String(w),w==""){ee.fragment=null;return}w.charAt(0)=="#"&&(w=w.slice(1)),ee.fragment="",Jt(ee,w,cn)})}),h(Hs,"toJSON",function(){return Wi.call(this)},{enumerable:!0}),h(Hs,"toString",function(){return Wi.call(this)},{enumerable:!0}),$){var _c=$.createObjectURL,Pc=$.revokeObjectURL;_c&&h(Gn,"createObjectURL",function(ee){return _c.apply($,arguments)}),Pc&&h(Gn,"revokeObjectURL",function(ee){return Pc.apply($,arguments)})}D(Gn,"URL"),c({global:!0,forced:!d,sham:!u},{URL:Gn})}},r={};function i(s){if(r[s])return r[s].exports;var l=r[s]={exports:{}};return t[s](l,l.exports,i),l.exports}(function(){i.d=function(s,l){for(var a in l)i.o(l,a)&&!i.o(s,a)&&Object.defineProperty(s,a,{enumerable:!0,get:l[a]})}})(),function(){i.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}()}(),function(){i.o=function(s,l){return Object.prototype.hasOwnProperty.call(s,l)}}(),function(){i.r=function(s){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})}}();var o={};return function(){i.r(o),i.d(o,{Dropzone:function(){return j},default:function(){return ve}}),i(2222),i(7327),i(2772),i(6992),i(1249),i(7042),i(561),i(8264),i(8309),i(489),i(1539),i(4916),i(9714),i(8783),i(4723),i(5306),i(3123),i(3210),i(2472),i(2990),i(8927),i(3105),i(5035),i(4345),i(7174),i(2846),i(4731),i(7209),i(6319),i(8867),i(7789),i(3739),i(9368),i(4483),i(2056),i(3462),i(678),i(7462),i(3824),i(5021),i(2974),i(5016),i(4747),i(3948),i(285);function s(k,M){var C;if(typeof Symbol>"u"||k[Symbol.iterator]==null){if(Array.isArray(k)||(C=l(k))||M&&k&&typeof k.length=="number"){C&&(k=C);var O=0,y=function(){};return{s:y,n:function(){return O>=k.length?{done:!0}:{done:!1,value:k[O++]}},e:function(L){throw L},f:y}}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 E=!0,N=!1,I;return{s:function(){C=k[Symbol.iterator]()},n:function(){var L=C.next();return E=L.done,L},e:function(L){N=!0,I=L},f:function(){try{!E&&C.return!=null&&C.return()}finally{if(N)throw I}}}}function l(k,M){if(k){if(typeof k=="string")return a(k,M);var C=Object.prototype.toString.call(k).slice(8,-1);if(C==="Object"&&k.constructor&&(C=k.constructor.name),C==="Map"||C==="Set")return Array.from(k);if(C==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(C))return a(k,M)}}function a(k,M){(M==null||M>k.length)&&(M=k.length);for(var C=0,O=new Array(M);C<M;C++)O[C]=k[C];return O}function c(k,M){if(!(k instanceof M))throw new TypeError("Cannot call a class as a function")}function u(k,M){for(var C=0;C<M.length;C++){var O=M[C];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(k,O.key,O)}}function d(k,M,C){return M&&u(k.prototype,M),C&&u(k,C),k}var f=function(){function k(){c(this,k)}return d(k,[{key:"on",value:function(C,O){return this._callbacks=this._callbacks||{},this._callbacks[C]||(this._callbacks[C]=[]),this._callbacks[C].push(O),this}},{key:"emit",value:function(C){this._callbacks=this._callbacks||{};for(var O=this._callbacks[C],y=arguments.length,E=new Array(y>1?y-1:0),N=1;N<y;N++)E[N-1]=arguments[N];if(O){var I=s(O,!0),R;try{for(I.s();!(R=I.n()).done;){var L=R.value;L.apply(this,E)}}catch(z){I.e(z)}finally{I.f()}}return this.element&&this.element.dispatchEvent(this.makeEvent("dropzone:"+C,{args:E})),this}},{key:"makeEvent",value:function(C,O){var y={bubbles:!0,cancelable:!0,detail:O};if(typeof window.CustomEvent=="function")return new CustomEvent(C,y);var E=document.createEvent("CustomEvent");return E.initCustomEvent(C,y.bubbles,y.cancelable,y.detail),E}},{key:"off",value:function(C,O){if(!this._callbacks||arguments.length===0)return this._callbacks={},this;var y=this._callbacks[C];if(!y)return this;if(arguments.length===1)return delete this._callbacks[C],this;for(var E=0;E<y.length;E++){var N=y[E];if(N===O){y.splice(E,1);break}}return this}}]),k}(),p='<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> ',h=p;function g(k,M){var C;if(typeof Symbol>"u"||k[Symbol.iterator]==null){if(Array.isArray(k)||(C=v(k))||M&&k&&typeof k.length=="number"){C&&(k=C);var O=0,y=function(){};return{s:y,n:function(){return O>=k.length?{done:!0}:{done:!1,value:k[O++]}},e:function(L){throw L},f:y}}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 E=!0,N=!1,I;return{s:function(){C=k[Symbol.iterator]()},n:function(){var L=C.next();return E=L.done,L},e:function(L){N=!0,I=L},f:function(){try{!E&&C.return!=null&&C.return()}finally{if(N)throw I}}}}function v(k,M){if(k){if(typeof k=="string")return S(k,M);var C=Object.prototype.toString.call(k).slice(8,-1);if(C==="Object"&&k.constructor&&(C=k.constructor.name),C==="Map"||C==="Set")return Array.from(k);if(C==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(C))return S(k,M)}}function S(k,M){(M==null||M>k.length)&&(M=k.length);for(var C=0,O=new Array(M);C<M;C++)O[C]=k[C];return O}var T={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,C,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,C){return C()},chunksUploaded:function(M,C){C()},fallback:function(){var M;this.element.className="".concat(this.element.className," dz-browser-not-supported");var C=g(this.element.getElementsByTagName("div"),!0),O;try{for(C.s();!(O=C.n()).done;){var y=O.value;if(/(^| )dz-message($| )/.test(y.className)){M=y,y.className="dz-message";break}}}catch(N){C.e(N)}finally{C.f()}M||(M=j.createElement('<div class="dz-message"><span></span></div>'),this.element.appendChild(M));var E=M.getElementsByTagName("span")[0];return E&&(E.textContent!=null?E.textContent=this.options.dictFallbackMessage:E.innerText!=null&&(E.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(M,C,O,y){var E={srcX:0,srcY:0,srcWidth:M.width,srcHeight:M.height},N=M.width/M.height;C==null&&O==null?(C=E.srcWidth,O=E.srcHeight):C==null?C=O*N:O==null&&(O=C/N),C=Math.min(C,E.srcWidth),O=Math.min(O,E.srcHeight);var I=C/O;if(E.srcWidth>C||E.srcHeight>O)if(y==="crop")N>I?(E.srcHeight=M.height,E.srcWidth=E.srcHeight*I):(E.srcWidth=M.width,E.srcHeight=E.srcWidth/I);else if(y==="contain")N>I?O=C/N:C=O*N;else throw new Error("Unknown resizeMethod '".concat(y,"'"));return E.srcX=(M.width-E.srcWidth)/2,E.srcY=(M.height-E.srcHeight)/2,E.trgWidth=C,E.trgHeight=O,E},transformFile:function(M,C){return(this.options.resizeWidth||this.options.resizeHeight)&&M.type.match(/image.*/)?this.resizeImage(M,this.options.resizeWidth,this.options.resizeHeight,this.options.resizeMethod,C):C(M)},previewTemplate:h,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 C=this;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer&&!this.options.disablePreviews){M.previewElement=j.createElement(this.options.previewTemplate.trim()),M.previewTemplate=M.previewElement,this.previewsContainer.appendChild(M.previewElement);var O=g(M.previewElement.querySelectorAll("[data-dz-name]"),!0),y;try{for(O.s();!(y=O.n()).done;){var E=y.value;E.textContent=M.name}}catch(U){O.e(U)}finally{O.f()}var N=g(M.previewElement.querySelectorAll("[data-dz-size]"),!0),I;try{for(N.s();!(I=N.n()).done;)E=I.value,E.innerHTML=this.filesize(M.size)}catch(U){N.e(U)}finally{N.f()}this.options.addRemoveLinks&&(M._removeLink=j.createElement('<a class="dz-remove" href="javascript:undefined;" data-dz-remove>'.concat(this.options.dictRemoveFile,"</a>")),M.previewElement.appendChild(M._removeLink));var R=function(K){return K.preventDefault(),K.stopPropagation(),M.status===j.UPLOADING?j.confirm(C.options.dictCancelUploadConfirmation,function(){return C.removeFile(M)}):C.options.dictRemoveFileConfirmation?j.confirm(C.options.dictRemoveFileConfirmation,function(){return C.removeFile(M)}):C.removeFile(M)},L=g(M.previewElement.querySelectorAll("[data-dz-remove]"),!0),z;try{for(L.s();!(z=L.n()).done;){var W=z.value;W.addEventListener("click",R)}}catch(U){L.e(U)}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,C){if(M.previewElement){M.previewElement.classList.remove("dz-file-preview");var O=g(M.previewElement.querySelectorAll("[data-dz-thumbnail]"),!0),y;try{for(O.s();!(y=O.n()).done;){var E=y.value;E.alt=M.name,E.src=C}}catch(N){O.e(N)}finally{O.f()}return setTimeout(function(){return M.previewElement.classList.add("dz-image-preview")},1)}},error:function(M,C){if(M.previewElement){M.previewElement.classList.add("dz-error"),typeof C!="string"&&C.error&&(C=C.error);var O=g(M.previewElement.querySelectorAll("[data-dz-errormessage]"),!0),y;try{for(O.s();!(y=O.n()).done;){var E=y.value;E.textContent=C}}catch(N){O.e(N)}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,C,O){if(M.previewElement){var y=g(M.previewElement.querySelectorAll("[data-dz-uploadprogress]"),!0),E;try{for(y.s();!(E=y.n()).done;){var N=E.value;N.nodeName==="PROGRESS"?N.value=C:N.style.width="".concat(C,"%")}}catch(I){y.e(I)}finally{y.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(){}},x=T;function b(k){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?b=function(C){return typeof C}:b=function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C},b(k)}function D(k,M){var C;if(typeof Symbol>"u"||k[Symbol.iterator]==null){if(Array.isArray(k)||(C=A(k))||M&&k&&typeof k.length=="number"){C&&(k=C);var O=0,y=function(){};return{s:y,n:function(){return O>=k.length?{done:!0}:{done:!1,value:k[O++]}},e:function(L){throw L},f:y}}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 E=!0,N=!1,I;return{s:function(){C=k[Symbol.iterator]()},n:function(){var L=C.next();return E=L.done,L},e:function(L){N=!0,I=L},f:function(){try{!E&&C.return!=null&&C.return()}finally{if(N)throw I}}}}function A(k,M){if(k){if(typeof k=="string")return B(k,M);var C=Object.prototype.toString.call(k).slice(8,-1);if(C==="Object"&&k.constructor&&(C=k.constructor.name),C==="Map"||C==="Set")return Array.from(k);if(C==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(C))return B(k,M)}}function B(k,M){(M==null||M>k.length)&&(M=k.length);for(var C=0,O=new Array(M);C<M;C++)O[C]=k[C];return O}function $(k,M){if(!(k instanceof M))throw new TypeError("Cannot call a class as a function")}function V(k,M){for(var C=0;C<M.length;C++){var O=M[C];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(k,O.key,O)}}function F(k,M,C){return M&&V(k.prototype,M),C&&V(k,C),k}function P(k,M){if(typeof M!="function"&&M!==null)throw new TypeError("Super expression must either be null or a function");k.prototype=Object.create(M&&M.prototype,{constructor:{value:k,writable:!0,configurable:!0}}),M&&_(k,M)}function _(k,M){return _=Object.setPrototypeOf||function(O,y){return O.__proto__=y,O},_(k,M)}function H(k){var M=Q();return function(){var O=ie(k),y;if(M){var E=ie(this).constructor;y=Reflect.construct(O,arguments,E)}else y=O.apply(this,arguments);return Y(this,y)}}function Y(k,M){return M&&(b(M)==="object"||typeof M=="function")?M:X(k)}function X(k){if(k===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k}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 ie(k){return ie=Object.setPrototypeOf?Object.getPrototypeOf:function(C){return C.__proto__||Object.getPrototypeOf(C)},ie(k)}var j=function(k){P(C,k);var M=H(C);function C(O,y){var E;$(this,C),E=M.call(this);var N,I;if(E.element=O,E.version=C.version,E.clickableElements=[],E.listeners=[],E.files=[],typeof E.element=="string"&&(E.element=document.querySelector(E.element)),!E.element||E.element.nodeType==null)throw new Error("Invalid dropzone element.");if(E.element.dropzone)throw new Error("Dropzone already attached.");C.instances.push(X(E)),E.element.dropzone=X(E);var R=(I=C.optionsForElement(E.element))!=null?I:{};if(E.options=C.extend({},x,R,y??{}),E.options.previewTemplate=E.options.previewTemplate.replace(/\n*/g,""),E.options.forceFallback||!C.isBrowserSupported())return Y(E,E.options.fallback.call(X(E)));if(E.options.url==null&&(E.options.url=E.element.getAttribute("action")),!E.options.url)throw new Error("No URL provided.");if(E.options.acceptedFiles&&E.options.acceptedMimeTypes)throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");if(E.options.uploadMultiple&&E.options.chunking)throw new Error("You cannot set both: uploadMultiple and chunking.");return E.options.acceptedMimeTypes&&(E.options.acceptedFiles=E.options.acceptedMimeTypes,delete E.options.acceptedMimeTypes),E.options.renameFilename!=null&&(E.options.renameFile=function(L){return E.options.renameFilename.call(X(E),L.name,L)}),typeof E.options.method=="string"&&(E.options.method=E.options.method.toUpperCase()),(N=E.getExistingFallback())&&N.parentNode&&N.parentNode.removeChild(N),E.options.previewsContainer!==!1&&(E.options.previewsContainer?E.previewsContainer=C.getElement(E.options.previewsContainer,"previewsContainer"):E.previewsContainer=E.element),E.options.clickable&&(E.options.clickable===!0?E.clickableElements=[E.element]:E.clickableElements=C.getElements(E.options.clickable,"clickable")),E.init(),E}return F(C,[{key:"getAcceptedFiles",value:function(){return this.files.filter(function(y){return y.accepted}).map(function(y){return y})}},{key:"getRejectedFiles",value:function(){return this.files.filter(function(y){return!y.accepted}).map(function(y){return y})}},{key:"getFilesWithStatus",value:function(y){return this.files.filter(function(E){return E.status===y}).map(function(E){return E})}},{key:"getQueuedFiles",value:function(){return this.getFilesWithStatus(C.QUEUED)}},{key:"getUploadingFiles",value:function(){return this.getFilesWithStatus(C.UPLOADING)}},{key:"getAddedFiles",value:function(){return this.getFilesWithStatus(C.ADDED)}},{key:"getActiveFiles",value:function(){return this.files.filter(function(y){return y.status===C.UPLOADING||y.status===C.QUEUED}).map(function(y){return y})}},{key:"init",value:function(){var y=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(C.createElement('<div class="dz-default dz-message"><button class="dz-button" type="button">'.concat(this.options.dictDefaultMessage,"</button></div>"))),this.clickableElements.length){var E=function W(){y.hiddenFileInput&&y.hiddenFileInput.parentNode.removeChild(y.hiddenFileInput),y.hiddenFileInput=document.createElement("input"),y.hiddenFileInput.setAttribute("type","file"),(y.options.maxFiles===null||y.options.maxFiles>1)&&y.hiddenFileInput.setAttribute("multiple","multiple"),y.hiddenFileInput.className="dz-hidden-input",y.options.acceptedFiles!==null&&y.hiddenFileInput.setAttribute("accept",y.options.acceptedFiles),y.options.capture!==null&&y.hiddenFileInput.setAttribute("capture",y.options.capture),y.hiddenFileInput.setAttribute("tabindex","-1"),y.hiddenFileInput.style.visibility="hidden",y.hiddenFileInput.style.position="absolute",y.hiddenFileInput.style.top="0",y.hiddenFileInput.style.left="0",y.hiddenFileInput.style.height="0",y.hiddenFileInput.style.width="0",C.getElement(y.options.hiddenInputContainer,"hiddenInputContainer").appendChild(y.hiddenFileInput),y.hiddenFileInput.addEventListener("change",function(){var U=y.hiddenFileInput.files;if(U.length){var K=D(U,!0),G;try{for(K.s();!(G=K.n()).done;){var q=G.value;y.addFile(q)}}catch(ue){K.e(ue)}finally{K.f()}}y.emit("addedfiles",U),W()})};E()}this.URL=window.URL!==null?window.URL:window.webkitURL;var N=D(this.events,!0),I;try{for(N.s();!(I=N.n()).done;){var R=I.value;this.on(R,this.options[R])}}catch(W){N.e(W)}finally{N.f()}this.on("uploadprogress",function(){return y.updateTotalUploadProgress()}),this.on("removedfile",function(){return y.updateTotalUploadProgress()}),this.on("canceled",function(W){return y.emit("complete",W)}),this.on("complete",function(W){if(y.getAddedFiles().length===0&&y.getUploadingFiles().length===0&&y.getQueuedFiles().length===0)return setTimeout(function(){return y.emit("queuecomplete")},0)});var L=function(U){if(U.dataTransfer.types){for(var K=0;K<U.dataTransfer.types.length;K++)if(U.dataTransfer.types[K]==="Files")return!0}return!1},z=function(U){if(L(U))return U.stopPropagation(),U.preventDefault?U.preventDefault():U.returnValue=!1};return this.listeners=[{element:this.element,events:{dragstart:function(U){return y.emit("dragstart",U)},dragenter:function(U){return z(U),y.emit("dragenter",U)},dragover:function(U){var K;try{K=U.dataTransfer.effectAllowed}catch{}return U.dataTransfer.dropEffect=K==="move"||K==="linkMove"?"move":"copy",z(U),y.emit("dragover",U)},dragleave:function(U){return y.emit("dragleave",U)},drop:function(U){return z(U),y.drop(U)},dragend:function(U){return y.emit("dragend",U)}}}],this.clickableElements.forEach(function(W){return y.listeners.push({element:W,events:{click:function(K){return(W!==y.element||K.target===y.element||C.elementInside(K.target,y.element.querySelector(".dz-message")))&&y.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,C.instances.splice(C.instances.indexOf(this),1)}},{key:"updateTotalUploadProgress",value:function(){var y,E=0,N=0,I=this.getActiveFiles();if(I.length){var R=D(this.getActiveFiles(),!0),L;try{for(R.s();!(L=R.n()).done;){var z=L.value;E+=z.upload.bytesSent,N+=z.upload.total}}catch(W){R.e(W)}finally{R.f()}y=100*E/N}else y=100;return this.emit("totaluploadprogress",y,N,E)}},{key:"_getParamName",value:function(y){return typeof this.options.paramName=="function"?this.options.paramName(y):"".concat(this.options.paramName).concat(this.options.uploadMultiple?"[".concat(y,"]"):"")}},{key:"_renameFile",value:function(y){return typeof this.options.renameFile!="function"?y.name:this.options.renameFile(y)}},{key:"getFallbackForm",value:function(){var y,E;if(y=this.getExistingFallback())return y;var N='<div class="dz-fallback">';this.options.dictFallbackText&&(N+="<p>".concat(this.options.dictFallbackText,"</p>")),N+='<input type="file" name="'.concat(this._getParamName(0),'" ').concat(this.options.uploadMultiple?'multiple="multiple"':void 0,' /><input type="submit" value="Upload!"></div>');var I=C.createElement(N);return this.element.tagName!=="FORM"?(E=C.createElement('<form action="'.concat(this.options.url,'" enctype="multipart/form-data" method="').concat(this.options.method,'"></form>')),E.appendChild(I)):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),E??I}},{key:"getExistingFallback",value:function(){for(var y=function(z){var W=D(z,!0),U;try{for(W.s();!(U=W.n()).done;){var K=U.value;if(/(^| )fallback($| )/.test(K.className))return K}}catch(G){W.e(G)}finally{W.f()}},E=0,N=["div","form"];E<N.length;E++){var I=N[E],R;if(R=y(this.element.getElementsByTagName(I)))return R}}},{key:"setupEventListeners",value:function(){return this.listeners.map(function(y){return function(){var E=[];for(var N in y.events){var I=y.events[N];E.push(y.element.addEventListener(N,I,!1))}return E}()})}},{key:"removeEventListeners",value:function(){return this.listeners.map(function(y){return function(){var E=[];for(var N in y.events){var I=y.events[N];E.push(y.element.removeEventListener(N,I,!1))}return E}()})}},{key:"disable",value:function(){var y=this;return this.clickableElements.forEach(function(E){return E.classList.remove("dz-clickable")}),this.removeEventListeners(),this.disabled=!0,this.files.map(function(E){return y.cancelUpload(E)})}},{key:"enable",value:function(){return delete this.disabled,this.clickableElements.forEach(function(y){return y.classList.add("dz-clickable")}),this.setupEventListeners()}},{key:"filesize",value:function(y){var E=0,N="b";if(y>0){for(var I=["tb","gb","mb","kb","b"],R=0;R<I.length;R++){var L=I[R],z=Math.pow(this.options.filesizeBase,4-R)/10;if(y>=z){E=y/Math.pow(this.options.filesizeBase,4-R),N=L;break}}E=Math.round(10*E)/10}return"<strong>".concat(E,"</strong> ").concat(this.options.dictFileSizeUnits[N])}},{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(y){if(y.dataTransfer){this.emit("drop",y);for(var E=[],N=0;N<y.dataTransfer.files.length;N++)E[N]=y.dataTransfer.files[N];if(E.length){var I=y.dataTransfer.items;I&&I.length&&I[0].webkitGetAsEntry!=null?this._addFilesFromItems(I):this.handleFiles(E)}this.emit("addedfiles",E)}}},{key:"paste",value:function(y){if(Ae(y!=null?y.clipboardData:void 0,function(N){return N.items})!=null){this.emit("paste",y);var E=y.clipboardData.items;if(E.length)return this._addFilesFromItems(E)}}},{key:"handleFiles",value:function(y){var E=D(y,!0),N;try{for(E.s();!(N=E.n()).done;){var I=N.value;this.addFile(I)}}catch(R){E.e(R)}finally{E.f()}}},{key:"_addFilesFromItems",value:function(y){var E=this;return function(){var N=[],I=D(y,!0),R;try{for(I.s();!(R=I.n()).done;){var L=R.value,z;L.webkitGetAsEntry!=null&&(z=L.webkitGetAsEntry())?z.isFile?N.push(E.addFile(L.getAsFile())):z.isDirectory?N.push(E._addFilesFromDirectory(z,z.name)):N.push(void 0):L.getAsFile!=null&&(L.kind==null||L.kind==="file")?N.push(E.addFile(L.getAsFile())):N.push(void 0)}}catch(W){I.e(W)}finally{I.f()}return N}()}},{key:"_addFilesFromDirectory",value:function(y,E){var N=this,I=y.createReader(),R=function(W){return Oe(console,"log",function(U){return U.log(W)})},L=function z(){return I.readEntries(function(W){if(W.length>0){var U=D(W,!0),K;try{for(U.s();!(K=U.n()).done;){var G=K.value;G.isFile?G.file(function(q){if(!(N.options.ignoreHiddenFiles&&q.name.substring(0,1)==="."))return q.fullPath="".concat(E,"/").concat(q.name),N.addFile(q)}):G.isDirectory&&N._addFilesFromDirectory(G,"".concat(E,"/").concat(G.name))}}catch(q){U.e(q)}finally{U.f()}z()}return null},R)};return L()}},{key:"accept",value:function(y,E){this.options.maxFilesize&&y.size>this.options.maxFilesize*1024*1024?E(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(y.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):C.isValidFile(y,this.options.acceptedFiles)?this.options.maxFiles!=null&&this.getAcceptedFiles().length>=this.options.maxFiles?(E(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",y)):this.options.accept.call(this,y,E):E(this.options.dictInvalidFileType)}},{key:"addFile",value:function(y){var E=this;y.upload={uuid:C.uuidv4(),progress:0,total:y.size,bytesSent:0,filename:this._renameFile(y)},this.files.push(y),y.status=C.ADDED,this.emit("addedfile",y),this._enqueueThumbnail(y),this.accept(y,function(N){N?(y.accepted=!1,E._errorProcessing([y],N)):(y.accepted=!0,E.options.autoQueue&&E.enqueueFile(y)),E._updateMaxFilesReachedClass()})}},{key:"enqueueFiles",value:function(y){var E=D(y,!0),N;try{for(E.s();!(N=E.n()).done;){var I=N.value;this.enqueueFile(I)}}catch(R){E.e(R)}finally{E.f()}return null}},{key:"enqueueFile",value:function(y){var E=this;if(y.status===C.ADDED&&y.accepted===!0){if(y.status=C.QUEUED,this.options.autoProcessQueue)return setTimeout(function(){return E.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(y){var E=this;if(this.options.createImageThumbnails&&y.type.match(/image.*/)&&y.size<=this.options.maxThumbnailFilesize*1024*1024)return this._thumbnailQueue.push(y),setTimeout(function(){return E._processThumbnailQueue()},0)}},{key:"_processThumbnailQueue",value:function(){var y=this;if(!(this._processingThumbnail||this._thumbnailQueue.length===0)){this._processingThumbnail=!0;var E=this._thumbnailQueue.shift();return this.createThumbnail(E,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,!0,function(N){return y.emit("thumbnail",E,N),y._processingThumbnail=!1,y._processThumbnailQueue()})}}},{key:"removeFile",value:function(y){if(y.status===C.UPLOADING&&this.cancelUpload(y),this.files=ce(this.files,y),this.emit("removedfile",y),this.files.length===0)return this.emit("reset")}},{key:"removeAllFiles",value:function(y){y==null&&(y=!1);var E=D(this.files.slice(),!0),N;try{for(E.s();!(N=E.n()).done;){var I=N.value;(I.status!==C.UPLOADING||y)&&this.removeFile(I)}}catch(R){E.e(R)}finally{E.f()}return null}},{key:"resizeImage",value:function(y,E,N,I,R){var L=this;return this.createThumbnail(y,E,N,I,!0,function(z,W){if(W==null)return R(y);var U=L.options.resizeMimeType;U==null&&(U=y.type);var K=W.toDataURL(U,L.options.resizeQuality);return(U==="image/jpeg"||U==="image/jpg")&&(K=Ee.restore(y.dataURL,K)),R(C.dataURItoBlob(K))})}},{key:"createThumbnail",value:function(y,E,N,I,R,L){var z=this,W=new FileReader;W.onload=function(){if(y.dataURL=W.result,y.type==="image/svg+xml"){L!=null&&L(W.result);return}z.createThumbnailFromUrl(y,E,N,I,R,L)},W.readAsDataURL(y)}},{key:"displayExistingFile",value:function(y,E,N,I){var R=this,L=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;if(this.emit("addedfile",y),this.emit("complete",y),!L)this.emit("thumbnail",y,E),N&&N();else{var z=function(U){R.emit("thumbnail",y,U),N&&N()};y.dataURL=E,this.createThumbnailFromUrl(y,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,this.options.fixOrientation,z,I)}}},{key:"createThumbnailFromUrl",value:function(y,E,N,I,R,L,z){var W=this,U=document.createElement("img");return z&&(U.crossOrigin=z),R=getComputedStyle(document.body).imageOrientation=="from-image"?!1:R,U.onload=function(){var K=function(q){return q(1)};return typeof EXIF<"u"&&EXIF!==null&&R&&(K=function(q){return EXIF.getData(U,function(){return q(EXIF.getTag(this,"Orientation"))})}),K(function(G){y.width=U.width,y.height=U.height;var q=W.options.resize.call(W,y,E,N,I),ue=document.createElement("canvas"),ge=ue.getContext("2d");switch(ue.width=q.trgWidth,ue.height=q.trgHeight,G>4&&(ue.width=q.trgHeight,ue.height=q.trgWidth),G){case 2:ge.translate(ue.width,0),ge.scale(-1,1);break;case 3:ge.translate(ue.width,ue.height),ge.rotate(Math.PI);break;case 4:ge.translate(0,ue.height),ge.scale(1,-1);break;case 5:ge.rotate(.5*Math.PI),ge.scale(1,-1);break;case 6:ge.rotate(.5*Math.PI),ge.translate(0,-ue.width);break;case 7:ge.rotate(.5*Math.PI),ge.translate(ue.height,-ue.width),ge.scale(-1,1);break;case 8:ge.rotate(-.5*Math.PI),ge.translate(-ue.height,0);break}Te(ge,U,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 Ne=ue.toDataURL("image/png");if(L!=null)return L(Ne,ue)})},L!=null&&(U.onerror=L),U.src=y.dataURL}},{key:"processQueue",value:function(){var y=this.options.parallelUploads,E=this.getUploadingFiles().length,N=E;if(!(E>=y)){var I=this.getQueuedFiles();if(I.length>0){if(this.options.uploadMultiple)return this.processFiles(I.slice(0,y-E));for(;N<y;){if(!I.length)return;this.processFile(I.shift()),N++}}}}},{key:"processFile",value:function(y){return this.processFiles([y])}},{key:"processFiles",value:function(y){var E=D(y,!0),N;try{for(E.s();!(N=E.n()).done;){var I=N.value;I.processing=!0,I.status=C.UPLOADING,this.emit("processing",I)}}catch(R){E.e(R)}finally{E.f()}return this.options.uploadMultiple&&this.emit("processingmultiple",y),this.uploadFiles(y)}},{key:"_getFilesWithXhr",value:function(y){return this.files.filter(function(E){return E.xhr===y}).map(function(E){return E})}},{key:"cancelUpload",value:function(y){if(y.status===C.UPLOADING){var E=this._getFilesWithXhr(y.xhr),N=D(E,!0),I;try{for(N.s();!(I=N.n()).done;){var R=I.value;R.status=C.CANCELED}}catch(U){N.e(U)}finally{N.f()}typeof y.xhr<"u"&&y.xhr.abort();var L=D(E,!0),z;try{for(L.s();!(z=L.n()).done;){var W=z.value;this.emit("canceled",W)}}catch(U){L.e(U)}finally{L.f()}this.options.uploadMultiple&&this.emit("canceledmultiple",E)}else(y.status===C.ADDED||y.status===C.QUEUED)&&(y.status=C.CANCELED,this.emit("canceled",y),this.options.uploadMultiple&&this.emit("canceledmultiple",[y]));if(this.options.autoProcessQueue)return this.processQueue()}},{key:"resolveOption",value:function(y){if(typeof y=="function"){for(var E=arguments.length,N=new Array(E>1?E-1:0),I=1;I<E;I++)N[I-1]=arguments[I];return y.apply(this,N)}return y}},{key:"uploadFile",value:function(y){return this.uploadFiles([y])}},{key:"uploadFiles",value:function(y){var E=this;this._transformFiles(y,function(N){if(E.options.chunking){var I=N[0];y[0].upload.chunked=E.options.chunking&&(E.options.forceChunking||I.size>E.options.chunkSize),y[0].upload.totalChunkCount=Math.ceil(I.size/E.options.chunkSize)}if(y[0].upload.chunked){var R=y[0],L=N[0];R.upload.chunks=[];var z=function(){for(var q=0;R.upload.chunks[q]!==void 0;)q++;if(!(q>=R.upload.totalChunkCount)){var ue=q*E.options.chunkSize,ge=Math.min(ue+E.options.chunkSize,L.size),Ne={name:E._getParamName(0),data:L.webkitSlice?L.webkitSlice(ue,ge):L.slice(ue,ge),filename:R.upload.filename,chunkIndex:q};R.upload.chunks[q]={file:R,index:q,dataBlock:Ne,status:C.UPLOADING,progress:0,retries:0},E._uploadData(y,[Ne])}};if(R.upload.finishedChunkUpload=function(G,q){var ue=!0;G.status=C.SUCCESS,G.dataBlock=null,G.xhr=null;for(var ge=0;ge<R.upload.totalChunkCount;ge++){if(R.upload.chunks[ge]===void 0)return z();R.upload.chunks[ge].status!==C.SUCCESS&&(ue=!1)}ue&&E.options.chunksUploaded(R,function(){E._finished(y,q,null)})},E.options.parallelChunkUploads)for(var W=0;W<R.upload.totalChunkCount;W++)z();else z()}else{for(var U=[],K=0;K<y.length;K++)U[K]={name:E._getParamName(K),data:N[K],filename:y[K].upload.filename};E._uploadData(y,U)}})}},{key:"_getChunk",value:function(y,E){for(var N=0;N<y.upload.totalChunkCount;N++)if(y.upload.chunks[N]!==void 0&&y.upload.chunks[N].xhr===E)return y.upload.chunks[N]}},{key:"_uploadData",value:function(y,E){var N=this,I=new XMLHttpRequest,R=D(y,!0),L;try{for(R.s();!(L=R.n()).done;){var z=L.value;z.xhr=I}}catch(le){R.e(le)}finally{R.f()}y[0].upload.chunked&&(y[0].upload.chunks[E[0].chunkIndex].xhr=I);var W=this.resolveOption(this.options.method,y),U=this.resolveOption(this.options.url,y);I.open(W,U,!0);var K=this.resolveOption(this.options.timeout,y);K&&(I.timeout=this.resolveOption(this.options.timeout,y)),I.withCredentials=!!this.options.withCredentials,I.onload=function(le){N._finishedUploading(y,I,le)},I.ontimeout=function(){N._handleUploadError(y,I,"Request timedout after ".concat(N.options.timeout/1e3," seconds"))},I.onerror=function(){N._handleUploadError(y,I)};var G=I.upload!=null?I.upload:I;G.onprogress=function(le){return N._updateFilesUploadProgress(y,I,le)};var q={Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"};this.options.headers&&C.extend(q,this.options.headers);for(var ue in q){var ge=q[ue];ge&&I.setRequestHeader(ue,ge)}var Ne=new FormData;if(this.options.params){var Fe=this.options.params;typeof Fe=="function"&&(Fe=Fe.call(this,y,I,y[0].upload.chunked?this._getChunk(y[0],I):null));for(var Be in Fe){var Ie=Fe[Be];if(Array.isArray(Ie))for(var We=0;We<Ie.length;We++)Ne.append(Be,Ie[We]);else Ne.append(Be,Ie)}}var mt=D(y,!0),tt;try{for(mt.s();!(tt=mt.n()).done;){var Sn=tt.value;this.emit("sending",Sn,I,Ne)}}catch(le){mt.e(le)}finally{mt.f()}this.options.uploadMultiple&&this.emit("sendingmultiple",y,I,Ne),this._addFormElementData(Ne);for(var J=0;J<E.length;J++){var ae=E[J];Ne.append(ae.name,ae.data,ae.filename)}this.submitRequest(I,Ne,y)}},{key:"_transformFiles",value:function(y,E){for(var N=this,I=[],R=0,L=function(U){N.options.transformFile.call(N,y[U],function(K){I[U]=K,++R===y.length&&E(I)})},z=0;z<y.length;z++)L(z)}},{key:"_addFormElementData",value:function(y){if(this.element.tagName==="FORM"){var E=D(this.element.querySelectorAll("input, textarea, select, button"),!0),N;try{for(E.s();!(N=E.n()).done;){var I=N.value,R=I.getAttribute("name"),L=I.getAttribute("type");if(L&&(L=L.toLowerCase()),!(typeof R>"u"||R===null))if(I.tagName==="SELECT"&&I.hasAttribute("multiple")){var z=D(I.options,!0),W;try{for(z.s();!(W=z.n()).done;){var U=W.value;U.selected&&y.append(R,U.value)}}catch(K){z.e(K)}finally{z.f()}}else(!L||L!=="checkbox"&&L!=="radio"||I.checked)&&y.append(R,I.value)}}catch(K){E.e(K)}finally{E.f()}}}},{key:"_updateFilesUploadProgress",value:function(y,E,N){if(y[0].upload.chunked){var z=y[0],W=this._getChunk(z,E);N?(W.progress=100*N.loaded/N.total,W.total=N.total,W.bytesSent=N.loaded):(W.progress=100,W.bytesSent=W.total),z.upload.progress=0,z.upload.total=0,z.upload.bytesSent=0;for(var U=0;U<z.upload.totalChunkCount;U++)z.upload.chunks[U]&&typeof z.upload.chunks[U].progress<"u"&&(z.upload.progress+=z.upload.chunks[U].progress,z.upload.total+=z.upload.chunks[U].total,z.upload.bytesSent+=z.upload.chunks[U].bytesSent);z.upload.progress=z.upload.progress/z.upload.totalChunkCount,this.emit("uploadprogress",z,z.upload.progress,z.upload.bytesSent)}else{var I=D(y,!0),R;try{for(I.s();!(R=I.n()).done;){var L=R.value;L.upload.total&&L.upload.bytesSent&&L.upload.bytesSent==L.upload.total||(N?(L.upload.progress=100*N.loaded/N.total,L.upload.total=N.total,L.upload.bytesSent=N.loaded):(L.upload.progress=100,L.upload.bytesSent=L.upload.total),this.emit("uploadprogress",L,L.upload.progress,L.upload.bytesSent))}}catch(K){I.e(K)}finally{I.f()}}}},{key:"_finishedUploading",value:function(y,E,N){var I;if(y[0].status!==C.CANCELED&&E.readyState===4){if(E.responseType!=="arraybuffer"&&E.responseType!=="blob"&&(I=E.responseText,E.getResponseHeader("content-type")&&~E.getResponseHeader("content-type").indexOf("application/json")))try{I=JSON.parse(I)}catch(R){N=R,I="Invalid JSON response from server."}this._updateFilesUploadProgress(y,E),200<=E.status&&E.status<300?y[0].upload.chunked?y[0].upload.finishedChunkUpload(this._getChunk(y[0],E),I):this._finished(y,I,N):this._handleUploadError(y,E,I)}}},{key:"_handleUploadError",value:function(y,E,N){if(y[0].status!==C.CANCELED){if(y[0].upload.chunked&&this.options.retryChunks){var I=this._getChunk(y[0],E);if(I.retries++<this.options.retryChunksLimit){this._uploadData(y,[I.dataBlock]);return}else console.warn("Retried this chunk too often. Giving up.")}this._errorProcessing(y,N||this.options.dictResponseError.replace("{{statusCode}}",E.status),E)}}},{key:"submitRequest",value:function(y,E,N){if(y.readyState!=1){console.warn("Cannot send this request because the XMLHttpRequest.readyState is not OPENED.");return}y.send(E)}},{key:"_finished",value:function(y,E,N){var I=D(y,!0),R;try{for(I.s();!(R=I.n()).done;){var L=R.value;L.status=C.SUCCESS,this.emit("success",L,E,N),this.emit("complete",L)}}catch(z){I.e(z)}finally{I.f()}if(this.options.uploadMultiple&&(this.emit("successmultiple",y,E,N),this.emit("completemultiple",y)),this.options.autoProcessQueue)return this.processQueue()}},{key:"_errorProcessing",value:function(y,E,N){var I=D(y,!0),R;try{for(I.s();!(R=I.n()).done;){var L=R.value;L.status=C.ERROR,this.emit("error",L,E,N),this.emit("complete",L)}}catch(z){I.e(z)}finally{I.f()}if(this.options.uploadMultiple&&(this.emit("errormultiple",y,E,N),this.emit("completemultiple",y)),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(y){for(var E=arguments.length,N=new Array(E>1?E-1:0),I=1;I<E;I++)N[I-1]=arguments[I];for(var R=0,L=N;R<L.length;R++){var z=L[R];for(var W in z){var U=z[W];y[W]=U}}return y}},{key:"uuidv4",value:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(y){var E=Math.random()*16|0,N=y==="x"?E:E&3|8;return N.toString(16)})}}]),C}(f);j.initClass(),j.version="5.9.3",j.options={},j.optionsForElement=function(k){if(k.getAttribute("id"))return j.options[fe(k.getAttribute("id"))]},j.instances=[],j.forElement=function(k){if(typeof k=="string"&&(k=document.querySelector(k)),(k!=null?k.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 k.dropzone},j.autoDiscover=!0,j.discover=function(){var k;if(document.querySelectorAll)k=document.querySelectorAll(".dropzone");else{k=[];var M=function(O){return function(){var y=[],E=D(O,!0),N;try{for(E.s();!(N=E.n()).done;){var I=N.value;/(^| )dropzone($| )/.test(I.className)?y.push(k.push(I)):y.push(void 0)}}catch(R){E.e(R)}finally{E.f()}return y}()};M(document.getElementsByTagName("div")),M(document.getElementsByTagName("form"))}return function(){var C=[],O=D(k,!0),y;try{for(O.s();!(y=O.n()).done;){var E=y.value;j.optionsForElement(E)!==!1?C.push(new j(E)):C.push(void 0)}}catch(N){O.e(N)}finally{O.f()}return C}()},j.blockedBrowsers=[/opera.*(Macintosh|Windows Phone).*version\/12/i],j.isBrowserSupported=function(){var k=!0;if(window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if(!("classList"in document.createElement("a")))k=!1;else{j.blacklistedBrowsers!==void 0&&(j.blockedBrowsers=j.blacklistedBrowsers);var M=D(j.blockedBrowsers,!0),C;try{for(M.s();!(C=M.n()).done;){var O=C.value;if(O.test(navigator.userAgent)){k=!1;continue}}}catch(y){M.e(y)}finally{M.f()}}else k=!1;return k},j.dataURItoBlob=function(k){for(var M=atob(k.split(",")[1]),C=k.split(",")[0].split(":")[1].split(";")[0],O=new ArrayBuffer(M.length),y=new Uint8Array(O),E=0,N=M.length,I=0<=N;I?E<=N:E>=N;I?E++:E--)y[E]=M.charCodeAt(E);return new Blob([O],{type:C})};var ce=function(M,C){return M.filter(function(O){return O!==C}).map(function(O){return O})},fe=function(M){return M.replace(/[\-_](\w)/g,function(C){return C.charAt(1).toUpperCase()})};j.createElement=function(k){var M=document.createElement("div");return M.innerHTML=k,M.childNodes[0]},j.elementInside=function(k,M){if(k===M)return!0;for(;k=k.parentNode;)if(k===M)return!0;return!1},j.getElement=function(k,M){var C;if(typeof k=="string"?C=document.querySelector(k):k.nodeType!=null&&(C=k),C==null)throw new Error("Invalid `".concat(M,"` option provided. Please provide a CSS selector or a plain HTML element."));return C},j.getElements=function(k,M){var C,O;if(k instanceof Array){O=[];try{var y=D(k,!0),E;try{for(y.s();!(E=y.n()).done;)C=E.value,O.push(this.getElement(C,M))}catch(R){y.e(R)}finally{y.f()}}catch{O=null}}else if(typeof k=="string"){O=[];var N=D(document.querySelectorAll(k),!0),I;try{for(N.s();!(I=N.n()).done;)C=I.value,O.push(C)}catch(R){N.e(R)}finally{N.f()}}else k.nodeType!=null&&(O=[k]);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},j.confirm=function(k,M,C){if(window.confirm(k))return M();if(C!=null)return C()},j.isValidFile=function(k,M){if(!M)return!0;M=M.split(",");var C=k.type,O=C.replace(/\/.*$/,""),y=D(M,!0),E;try{for(y.s();!(E=y.n()).done;){var N=E.value;if(N=N.trim(),N.charAt(0)==="."){if(k.name.toLowerCase().indexOf(N.toLowerCase(),k.name.length-N.length)!==-1)return!0}else if(/\/\*$/.test(N)){if(O===N.replace(/\/.*$/,""))return!0}else if(C===N)return!0}}catch(I){y.e(I)}finally{y.f()}return!1},typeof jQuery<"u"&&jQuery!==null&&(jQuery.fn.dropzone=function(k){return this.each(function(){return new j(this,k)})}),j.ADDED="added",j.QUEUED="queued",j.ACCEPTED=j.QUEUED,j.UPLOADING="uploading",j.PROCESSING=j.UPLOADING,j.CANCELED="canceled",j.ERROR="error",j.SUCCESS="success";var be=function(M){M.naturalWidth;var C=M.naturalHeight,O=document.createElement("canvas");O.width=1,O.height=C;var y=O.getContext("2d");y.drawImage(M,0,0);for(var E=y.getImageData(1,0,1,C),N=E.data,I=0,R=C,L=C;L>I;){var z=N[(L-1)*4+3];z===0?R=L:I=L,L=R+I>>1}var W=L/C;return W===0?1:W},Te=function(M,C,O,y,E,N,I,R,L,z){var W=be(C);return M.drawImage(C,O,y,E,N,I,R,L,z/W)},Ee=function(){function k(){$(this,k)}return F(k,null,[{key:"initClass",value:function(){this.KEY_STR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}},{key:"encode64",value:function(C){for(var O="",y=void 0,E=void 0,N="",I=void 0,R=void 0,L=void 0,z="",W=0;y=C[W++],E=C[W++],N=C[W++],I=y>>2,R=(y&3)<<4|E>>4,L=(E&15)<<2|N>>6,z=N&63,isNaN(E)?L=z=64:isNaN(N)&&(z=64),O=O+this.KEY_STR.charAt(I)+this.KEY_STR.charAt(R)+this.KEY_STR.charAt(L)+this.KEY_STR.charAt(z),y=E=N="",I=R=L=z="",W<C.length;);return O}},{key:"restore",value:function(C,O){if(!C.match("data:image/jpeg;base64,"))return O;var y=this.decode64(C.replace("data:image/jpeg;base64,","")),E=this.slice2Segments(y),N=this.exifManipulation(O,E);return"data:image/jpeg;base64,".concat(this.encode64(N))}},{key:"exifManipulation",value:function(C,O){var y=this.getExifArray(O),E=this.insertExif(C,y),N=new Uint8Array(E);return N}},{key:"getExifArray",value:function(C){for(var O=void 0,y=0;y<C.length;){if(O=C[y],O[0]===255&O[1]===225)return O;y++}return[]}},{key:"insertExif",value:function(C,O){var y=C.replace("data:image/jpeg;base64,",""),E=this.decode64(y),N=E.indexOf(255,3),I=E.slice(0,N),R=E.slice(N),L=I;return L=L.concat(O),L=L.concat(R),L}},{key:"slice2Segments",value:function(C){for(var O=0,y=[];;){var E;if(C[O]===255&C[O+1]===218)break;if(C[O]===255&C[O+1]===216)O+=2;else{E=C[O+2]*256+C[O+3];var N=O+E+2,I=C.slice(O,N);y.push(I),O=N}if(O>C.length)break}return y}},{key:"decode64",value:function(C){var O=void 0,y=void 0,E="",N=void 0,I=void 0,R=void 0,L="",z=0,W=[],U=/[^A-Za-z0-9\+\/\=]/g;for(U.exec(C)&&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),Np=[Mp,Ip];function Dp(n,e){return p.openBlock(),p.createElementBlock("svg",Op,Np)}const ca=je(Ap,[["render",Dp]]),Rp={},Lp={xmlns:"http://www.w3.org/2000/svg",width:"18",height:"10"},Bp=p.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),Pp=[Bp];function Fp(n,e){return p.openBlock(),p.createElementBlock("svg",Lp,Pp)}const wu=je(Rp,[["render",Fp]]),Vp={},$p={class:"icon icon-caret-right",xmlns:"http://www.w3.org/2000/svg",width:"7",height:"11",viewBox:"0 0 7 11"},zp=p.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),Up=[zp];function Hp(n,e){return p.openBlock(),p.createElementBlock("svg",$p,Up)}const ua=je(Vp,[["render",Hp]]),jp={},Wp={class:"icon icon-caret-left",xmlns:"http://www.w3.org/2000/svg",width:"6",height:"10",viewBox:"0 0 6 10"},Kp=p.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),Gp=[Kp];function Jp(n,e){return p.openBlock(),p.createElementBlock("svg",Wp,Gp)}const da=je(jp,[["render",Jp]]),Yp={},Qp={class:"icon icon-close",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"-4 -4 22 22"},Xp=p.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),Zp=[Xp];function _p(n,e){return p.openBlock(),p.createElementBlock("svg",Qp,Zp)}const fa=je(Yp,[["render",_p]]),qp={},eh={width:"12",height:"14",viewBox:"0 0 12 14",xmlns:"http://www.w3.org/2000/svg",class:"icon icon-italic"},th=p.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),nh=[th];function rh(n,e){return p.openBlock(),p.createElementBlock("svg",eh,nh)}const pa=je(qp,[["render",rh]]),oh={},ih={width:"11",height:"13",viewBox:"0 0 11 13",xmlns:"http://www.w3.org/2000/svg",class:"icon icon-bold"},sh=p.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),ah=[sh];function lh(n,e){return p.openBlock(),p.createElementBlock("svg",ih,ah)}const ha=je(oh,[["render",lh]]),ch={},uh={width:"14",height:"16",viewBox:"0 0 14 16",xmlns:"http://www.w3.org/2000/svg",class:"icon icon-underline"},dh=p.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),fh=[dh];function ph(n,e){return p.openBlock(),p.createElementBlock("svg",uh,fh)}const ma=je(ch,[["render",ph]]),hh={},mh={width:"16",height:"14",viewBox:"0 0 16 14",xmlns:"http://www.w3.org/2000/svg",class:"icon icon-bullet-list"},gh=p.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),vh=[gh];function yh(n,e){return p.openBlock(),p.createElementBlock("svg",mh,vh)}const ga=je(hh,[["render",yh]]),bh={},xh={width:"17",height:"15",viewBox:"0 0 17 15",xmlns:"http://www.w3.org/2000/svg",class:"icon icon-ordered-list"},Eh=p.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),Sh=[Eh];function kh(n,e){return p.openBlock(),p.createElementBlock("svg",xh,Sh)}const va=je(bh,[["render",kh]]),Ch={},wh={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"},Th=p.createElementVNode("g",{transform:"matrix(0.8333333333333334,0,0,0.8333333333333334,0,0)"},[p.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"}),p.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),Ah=[Th];function Oh(n,e){return p.openBlock(),p.createElementBlock("svg",wh,Ah)}const ya=je(Ch,[["render",Oh]]),Mh={},Ih={viewBox:"0 0 20 20",height:"20",width:"20",xmlns:"http://www.w3.org/2000/svg",class:"icon icon-download-link"},Nh=p.createStaticVNode('<g transform="matrix(0.8333333333333334,0,0,0.8333333333333334,0,0)"><path d="M11.250 17.250 A6.000 6.000 0 1 0 23.250 17.250 A6.000 6.000 0 1 0 11.250 17.250 Z" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M17.25 14.25L17.25 20.25" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M17.25 20.25L15 18" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M17.25 20.25L19.5 18" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M8.25,20.25h-6a1.5,1.5,0,0,1-1.5-1.5V2.25A1.5,1.5,0,0,1,2.25.75H12.879a1.5,1.5,0,0,1,1.06.439l2.872,2.872a1.5,1.5,0,0,1,.439,1.06V8.25" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M5.25,5.625A.375.375,0,1,1,4.875,6a.375.375,0,0,1,.375-.375" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M12.085,9.586,11.25,8.25a.749.749,0,0,0-1.238-.014l-2,2.851L6.78,10.1a.75.75,0,0,0-1.093.169L3.75,14.25h4.5" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path></g>',1),Dh=[Nh];function Rh(n,e){return p.openBlock(),p.createElementBlock("svg",Ih,Dh)}const Tu=je(Mh,[["render",Rh]]),Lh={},Bh={class:"icon icon-menu",xmlns:"http://www.w3.org/2000/svg",width:"19",height:"12",viewBox:"0 0 19 12"},Ph=p.createElementVNode("path",{d:"M1.386 2a1 1 0 1 1 0-2H18a1 1 0 0 1 0 2H1.386zm0 5a1 1 0 1 1 0-2H18a1 1 0 0 1 0 2H1.386zm0 5a1 1 0 0 1 0-2H18a1 1 0 0 1 0 2H1.386z"},null,-1),Fh=[Ph];function Vh(n,e){return p.openBlock(),p.createElementBlock("svg",Bh,Fh)}const Au=je(Lh,[["render",Vh]]),$h={},zh=p.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),Uh=[zh];function Hh(n,e){return p.openBlock(),p.createElementBlock("svg",p.mergeProps({class:"bd-logo"},n.$attrs,{version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}),Uh,16)}const Ou=je($h,[["render",Hh]]),xl=/^https:/i,Ci=p.defineComponent({__name:"BDLink",props:{to:{default:""},target:{default:"_blank"},text:{default:void 0},rel:{default:"noopener noreferrer"}},setup(n){const e=n,t=p.computed(()=>typeof e.to=="string"&&xl.test(e.to)?"a":typeof e.to!="string"&&typeof p.resolveComponent("router-link")!="string"?"router-link":"div"),r=p.computed(()=>{if(typeof e.to=="string"&&xl.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)=>(p.openBlock(),p.createBlock(p.resolveDynamicComponent(t.value),p.mergeProps({class:"bd-link"},r.value),{default:p.withCtx(()=>[p.renderSlot(o.$slots,"default",{},()=>[p.createTextVNode(p.toDisplayString(e.text),1)])]),_:3},16))}}),wi={PRIMARY:"primary",SECONDARY:"secondary",DANGER:"danger",WARNING:"warning",INFO:"info",SUCCESS:"success",LIGHT:"light"},jh={key:0,class:"b-d-alert-title"},Mu=p.defineComponent({__name:"BDAlert",props:{variant:{default:wi.PRIMARY},title:{default:""}},setup(n){const e=n,t=p.computed(()=>["alert",`alert-${e.variant}`]);return(r,o)=>(p.openBlock(),p.createElementBlock("div",{class:p.normalizeClass(t.value),role:"alert"},[r.title?(p.openBlock(),p.createElementBlock("div",jh,[p.createVNode(p.unref(ki)),p.createElementVNode("span",null,[p.createElementVNode("strong",null,p.toDisplayString(e.title),1)])])):p.createCommentVNode("",!0),p.renderSlot(r.$slots,"default")],2))}}),Wh=["src","alt"],Kh=["textContent"],ba=p.defineComponent({__name:"BDProfileImage",props:{showFooter:{type:Boolean,default:!1},size:{default:it.LG},linkText:{default:""},src:{default:""},alt:{default:""}},emits:["click"],setup(n,{emit:e}){const t=()=>{e("click")};return(r,o)=>(p.openBlock(),p.createElementBlock("div",{class:p.normalizeClass(["bd-profile-picture rounded-circle",r.size])},[p.createElementVNode("img",{src:r.src,alt:r.alt,class:"position-absolute top-0 start-0"},null,8,Wh),r.showFooter?(p.openBlock(),p.createElementBlock("a",{key:0,class:"bd-profile-picture__footer position-absolute bottom-0 start-0",onClick:t,textContent:p.toDisplayString(r.linkText)},null,8,Kh)):p.createCommentVNode("",!0)],2))}});function Gh(n){return p.getCurrentScope()?(p.onScopeDispose(n),!0):!1}function Ao(n){return typeof n=="function"?n():p.unref(n)}const Jh=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Yh=n=>typeof n<"u",Qh=Object.prototype.toString,Xh=n=>Qh.call(n)==="[object Object]",Ms=()=>{};function Zh(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 _h(n,e={}){let t,r,o=Ms;const i=l=>{clearTimeout(l),o(),o=Ms};return l=>{const a=Ao(n),c=Ao(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 qh(n,e=200,t={}){return Zh(_h(e,t),n)}function Iu(n){var e;const t=Ao(n);return(e=t==null?void 0:t.$el)!=null?e:t}const em=Jh?window:void 0;function El(...n){let e,t,r,o;if(typeof n[0]=="string"||Array.isArray(n[0])?([t,r,o]=n,e=em):[e,t,r,o]=n,!e)return Ms;Array.isArray(t)||(t=[t]),Array.isArray(r)||(r=[r]);const i=[],s=()=>{i.forEach(u=>u()),i.length=0},l=(u,d,f,m)=>(u.addEventListener(d,f,m),()=>u.removeEventListener(d,f,m)),a=p.watch(()=>[Iu(e),Ao(o)],([u,d])=>{if(s(),!u)return;const f=Xh(d)?{...d}:d;i.push(...t.flatMap(m=>r.map(h=>l(u,m,h,f))))},{immediate:!0,flush:"post"}),c=()=>{a(),s()};return Gh(c),c}function tm(n){return JSON.parse(JSON.stringify(n))}function nm(n,e={}){const{initialValue:t=!1,focusVisible:r=!1}=e,o=p.ref(!1),i=p.computed(()=>Iu(n));El(i,"focus",l=>{var a,c;(!r||(c=(a=l.target).matches)!=null&&c.call(a,":focus-visible"))&&(o.value=!0)}),El(i,"blur",()=>o.value=!1);const s=p.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 p.watch(i,()=>{s.value=t},{immediate:!0,flush:"post"}),{focused:s}}function Xn(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,m=p.getCurrentInstance(),h=t||(m==null?void 0:m.emit)||((o=m==null?void 0:m.$emit)==null?void 0:o.bind(m))||((s=(i=m==null?void 0:m.proxy)==null?void 0:i.$emit)==null?void 0:s.bind(m==null?void 0:m.proxy));let g=c;e||(e="modelValue"),g=g||`update:${e.toString()}`;const v=w=>l?typeof l=="function"?l(w):tm(w):w,E=()=>Yh(n[e])?v(n[e]):d,k=w=>{f?f(w)&&h(g,w):h(g,w)};if(a){const w=E(),y=p.ref(w);let R=!1;return p.watch(()=>n[e],S=>{R||(R=!0,y.value=v(S),p.nextTick(()=>R=!1))}),p.watch(y,S=>{!R&&(S!==n[e]||u)&&k(S)},{deep:u}),y}else return p.computed({get(){return E()},set(w){k(w)}})}const rm={class:"bd-zoom-slider d-flex"},om=p.createElementVNode("g",{transform:"matrix(0.8333333333333334,0,0,0.8333333333333334,0,0)"},[p.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),im=[om],sm=["max"],am=p.createElementVNode("g",{transform:"matrix(0.8333333333333334,0,0,0.8333333333333334,0,0)"},[p.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),lm=[am],Nu=p.defineComponent({__name:"BDZoomslider",props:{modelValue:{},maxValue:{default:5}},emits:["update:modelValue"],setup(n,{emit:e}){const t=n,r=Xn(t,"modelValue",e);function o(){r.value!==0&&r.value--}function i(){r.value<t.maxValue&&r.value++}return(s,l)=>(p.openBlock(),p.createElementBlock("div",rm,[(p.openBlock(),p.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},im)),p.withDirectives(p.createElementVNode("input",{type:"range","onUpdate:modelValue":l[0]||(l[0]=a=>p.isRef(r)?r.value=a:null),min:"0",max:s.maxValue,class:"bd-zoom-slider-input"},null,8,sm),[[p.vModelText,p.unref(r)]]),(p.openBlock(),p.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},lm))]))}});var Bn=256,Du=[],Sl=256,co;for(;Bn--;)Du[Bn]=(Bn+256).toString(16).substring(1);function Ru(n){var e=0,t=n||11;if(!co||Bn+t>Sl*2)for(co="",Bn=0;e<Sl;e++)co+=Du[Math.random()*256|0];return co.substring(Bn,Bn+++t)}function ro(){return{uniqueIdentifier:p.ref(Ru())}}const cm=["id"],um={key:0},xa=p.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}=ro(),r=t.value,o=p.computed(()=>({"bd-card card":!0,[`${e.class}`]:e.class,"no-body":e.noBody})),i=p.computed(()=>({"card-header":!0,"no-title":!e.title,[`${e.headerClass}`]:e.headerClass,[`${e.headerVariant}`]:e.headerVariant})),s=p.computed(()=>({"card-body":!0,[`${e.bodyClass}`]:e.bodyClass}));return(l,a)=>(p.openBlock(),p.createElementBlock("div",{id:p.unref(r),class:p.normalizeClass(o.value)},[!l.noHeader||l.noBody?(p.openBlock(),p.createElementBlock("div",{key:0,class:p.normalizeClass(i.value)},[p.renderSlot(l.$slots,"header",{},()=>[l.title?(p.openBlock(),p.createElementBlock("h2",um,p.toDisplayString(l.title),1)):p.createCommentVNode("",!0)])],2)):p.createCommentVNode("",!0),l.noBody?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("div",{key:1,class:p.normalizeClass(s.value)},[p.renderSlot(l.$slots,"body")],2))],10,cm))}}),dm={key:0},fm={class:"bd-collapsable-card__actions"},pm=["data-bs-target"],Lu=p.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}=ro(),r=t.value,o=p.computed(()=>`bd-collapsable-card__collapse-${r}`),i=p.computed(()=>({"d-block":[it.SM,it.MD].includes(e.showOn.toLowerCase()),"d-md-none":e.showOn.toLowerCase()==it.SM,"d-lg-none":e.showOn.toLowerCase()==it.MD})),s=p.computed(()=>{let a={"round-corners-sm":e.showOn.toLowerCase()==it.SM,"round-corners-md":e.showOn.toLowerCase()==it.MD,"is-disabled":e.disabled,"round-corners":!e.visible};return Object.keys(a).filter(c=>a[c]).join(" ")}),l=p.computed(()=>{let a={collapse:!0,show:!0,"collapsable-body":!0,[`${o.value}`]:!0,"display-none":!e.visible||e.disabled,"open-collapse-lg":e.visible&&[it.SM,it.MD].includes(e.showOn.toLowerCase()),"open-collapse-md":e.showOn.toLowerCase()==it.SM&&e.visible};return Object.keys(a).filter(c=>a[c]).join(" ")});return(a,c)=>(p.openBlock(),p.createBlock(xa,{class:"bd-collapsable-card",title:a.title,"header-class":s.value,"body-class":l.value},{header:p.withCtx(()=>[a.title?(p.openBlock(),p.createElementBlock("h2",dm,p.toDisplayString(a.title),1)):p.createCommentVNode("",!0),p.createElementVNode("div",fm,[p.renderSlot(a.$slots,"action"),!a.disabled&&a.visible?(p.openBlock(),p.createElementBlock("button",{key:0,class:p.normalizeClass(["btn btn-white btn-caret",i.value]),type:"button","data-bs-toggle":"collapse","data-bs-target":`.${o.value}`,"aria-expanded":"true"},[p.createVNode(p.unref(wu))],10,pm)):p.createCommentVNode("",!0)])]),body:p.withCtx(()=>[p.renderSlot(a.$slots,"body")]),_:3},8,["title","header-class","body-class"]))}});/*! maska v2.1.11 | (c) Alexander Shabunevich | Released under the MIT license */var hm=Object.defineProperty,mm=(n,e,t)=>e in n?hm(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ir=(n,e,t)=>(mm(n,typeof e!="symbol"?e+"":e,t),t);const kl={"#":{pattern:/[0-9]/},"@":{pattern:/[a-zA-Z]/},"*":{pattern:/[a-zA-Z0-9]/}};class Cl{constructor(e={}){Ir(this,"opts",{}),Ir(this,"memo",new Map);const t={...e};if(t.tokens!=null){t.tokens=t.tokensReplace?{...t.tokens}:{...kl,...t.tokens};for(const r of Object.values(t.tokens))typeof r.pattern=="string"&&(r.pattern=new RegExp(r.pattern))}else t.tokens=kl;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()?()=>v>-1&&E>-1:()=>v<i.length&&E<e.length,m=w=>!this.isReversed()&&w<=d||this.isReversed()&&w>=d;let h,g=-1,v=this.isReversed()?i.length-1:0,E=this.isReversed()?e.length-1:0,k=!1;for(;f();){const w=i.charAt(v),y=a[w],R=(y==null?void 0:y.transform)!=null?y.transform(e.charAt(E)):e.charAt(E);if(!s.includes(v)&&y!=null?(R.match(y.pattern)!=null?(l[u](R),y.repeated?(g===-1?g=v:v===d&&v!==g&&(v=g-c),d===g&&(v-=c)):y.multiple&&(k=!0,v-=c),v+=c):y.multiple?k&&(v+=c,E-=c,k=!1):R===h?h=void 0:y.optional&&(v+=c,E-=c),E+=c):(r&&!this.isEager()&&l[u](w),R===w&&!this.isEager()?E+=c:h=w,this.isEager()||(v+=c)),this.isEager())for(;m(v)&&(a[i.charAt(v)]==null||s.includes(v));)r?l[u](i.charAt(v)):i.charAt(v)===e.charAt(E)&&(E+=c),v+=c}return this.memo.set(o,l.join("")),this.memo.get(o)}}const Bu=n=>JSON.parse(n.replaceAll("'",'"')),wl=(n,e={})=>{const t={...e};return n.dataset.maska!=null&&n.dataset.maska!==""&&(t.mask=gm(n.dataset.maska)),n.dataset.maskaEager!=null&&(t.eager=Ki(n.dataset.maskaEager)),n.dataset.maskaReversed!=null&&(t.reversed=Ki(n.dataset.maskaReversed)),n.dataset.maskaTokensReplace!=null&&(t.tokensReplace=Ki(n.dataset.maskaTokensReplace)),n.dataset.maskaTokens!=null&&(t.tokens=vm(n.dataset.maskaTokens)),t},Ki=n=>n!==""?!!JSON.parse(n):!0,gm=n=>n.startsWith("[")&&n.endsWith("]")?Bu(n):n,vm=n=>{if(n.startsWith("{")&&n.endsWith("}"))return Bu(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 ym{constructor(e,t={}){Ir(this,"items",new Map),Ir(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,"")}),Ir(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 Cl(wl(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 Cl(wl(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 Is=new WeakMap,bm=n=>{setTimeout(()=>{var e;((e=Is.get(n))==null?void 0:e.needUpdateValue(n))===!0&&n.dispatchEvent(new CustomEvent("input"))})},xm=(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;bm(t);const o=Is.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]}Is.set(t,new ym(t,r))},Em=["value","type"],Pu=p.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:it.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}=ro(),o=Xn(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=p.computed(()=>({[`${t.inputClass}`]:t.inputClass,"is-invalid":t.state===!1,"is-valid":t.state===!0,[`form-control-${t.size}`]:t.size})),u=p.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=qh(f=>{o.value=f.target.value},t.delayTimeMs);return(f,m)=>(p.openBlock(),p.createElementBlock("div",{class:p.normalizeClass(["bd-form-input",f.formGroupClass]),id:s},[p.renderSlot(f.$slots,"label",{},()=>[f.label?(p.openBlock(),p.createElementBlock("label",{key:0,for:l,id:i,class:p.normalizeClass(["form-label",f.labelClass])},p.toDisplayString(f.label),3)):p.createCommentVNode("",!0)]),p.createElementVNode("div",{class:p.normalizeClass(f.formFieldClass)},[p.withDirectives(p.createElementVNode("input",p.mergeProps({value:f.modelValue,type:f.type,id:l,class:["form-control",c.value]},u.value,{onInput:m[0]||(m[0]=(...h)=>p.unref(d)&&p.unref(d)(...h)),onClick:m[1]||(m[1]=h=>f.$emit("click")),onBlur:m[2]||(m[2]=h=>f.$emit("blur")),onKeydown:m[3]||(m[3]=p.withKeys(h=>f.$emit("enter"),["enter"]))}),null,16,Em),[[p.unref(xm)]]),p.renderSlot(f.$slots,"default")],2),p.createVNode(p.unref(Ti),{text:f.invalidFeedbackText,class:p.normalizeClass(f.invalidFeedbackClass),state:f.state,id:a},null,8,["text","class","state"])],2))}}),Sm=["for"],Fu=p.defineComponent({__name:"BDInputGroup",props:{label:{default:void 0},labelForId:{default:void 0}},setup(n){const e=n,t=p.useAttrs();return(r,o)=>(p.openBlock(),p.createElementBlock(p.Fragment,null,[e.label?(p.openBlock(),p.createElementBlock("label",{key:0,for:e.labelForId,class:"form-label"},p.toDisplayString(e.label),9,Sm)):p.createCommentVNode("",!0),p.createElementVNode("div",{class:p.normalizeClass(["input-group bd-input-group",p.unref(t).class])},[p.renderSlot(r.$slots,"default")],2)],64))}}),km={class:"invalid-feedback bd-invalid-feedback"},Ti=p.defineComponent({__name:"BDFormInvalidFeedback",props:{state:{type:[Boolean,null],default:null},text:{default:""}},setup(n){return(e,t)=>(p.openBlock(),p.createElementBlock("div",km,[p.createVNode(p.unref(Si)),p.createTextVNode(" "+p.toDisplayString(e.text),1)]))}}),Vu=p.defineComponent({__name:"BDBadge",props:{variant:{default:wi.PRIMARY}},setup(n){const e=n,t=p.computed(()=>["badge","bd-badge",`text-bg-${e.variant}`]);return(r,o)=>(p.openBlock(),p.createElementBlock("span",{role:"status",class:p.normalizeClass(t.value)},[p.renderSlot(r.$slots,"default")],2))}}),Cm=["onSubmit","onReset"],$u=p.defineComponent({__name:"BDForm",emits:["submit","reset"],setup(n,{emit:e}){function t(){e("submit")}function r(){e("reset")}return(o,i)=>(p.openBlock(),p.createElementBlock("form",{onSubmit:p.withModifiers(t,["prevent"]),onReset:p.withModifiers(r,["prevent"])},[p.renderSlot(o.$slots,"default")],40,Cm))}}),wm={"aria-label":"Page navigation",class:"bd-pagination"},Tm={class:"page-item"},Am=["data-page"],Om=["data-page"],Mm={class:"page-item"},Im=["data-page"],zu=p.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=Xn(t,"modelValue",e),o=p.ref(Math.ceil(t.totalRows/t.rowsPerPage)),i=p.ref([]);p.watch([()=>t.totalRows,()=>t.rowsPerPage],()=>{o.value=Math.ceil(t.totalRows/t.rowsPerPage),i.value=a()}),p.onMounted(()=>{i.value=a()});const s=p.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 m=Math.floor((d-3)/2);if(r.value<=m+2){for(let h=1;h<=m+3;h++)c.push(h);c.push("..."),c.push(u)}else if(r.value>=u-m-1){c.push(1),c.push("...");for(let h=u-m-3;h<=u;h++)c.push(h)}else{c.push(1),c.push("...");for(let h=r.value-1;h<=r.value+1;h++)c.push(h);c.push("..."),c.push(u)}}return c};return(c,u)=>(p.openBlock(),p.createElementBlock("div",wm,[p.createElementVNode("ul",{class:p.normalizeClass(["pagination",s.value])},[p.withDirectives(p.createElementVNode("li",Tm,[p.createElementVNode("a",{class:"page-link d-flex justify-content-center align-items-center","aria-label":"Previous",onClick:l,"data-page":p.unref(r)-1},[p.createVNode(p.unref(da))],8,Am)],512),[[p.vShow,p.unref(r)>1]]),(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(i.value,d=>(p.openBlock(),p.createElementBlock("li",{class:p.normalizeClass(["page-item",{active:p.unref(r)===d,disabled:typeof d=="string"}]),key:d},[p.createElementVNode("a",{class:"page-link d-flex justify-content-center align-items-center",onClick:l,"data-page":d},p.toDisplayString(d),9,Om)],2))),128)),p.withDirectives(p.createElementVNode("li",Mm,[p.createElementVNode("a",{class:"page-link d-flex justify-content-center align-items-center","aria-label":"Next",onClick:l,"data-page":p.unref(r)+1},[p.createVNode(p.unref(ua))],8,Im)],512),[[p.vShow,p.unref(r)<o.value]])],2)]))}}),Nm=["disabled"],Dm=["value"],Uu=p.defineComponent({__name:"BDFormSelect",props:{size:{default:it.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=Xn(t,"modelValue",e),o=p.ref(null),{focused:i}=nm(o,{initialValue:t.autofocus}),s=p.computed(()=>({"form-select":!0,"bd-form-select":!0,"is-invalid":t.state===!1,[`form-select-${t.size}`]:["xs","sm","lg"].includes(t.size)}));p.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)=>p.withDirectives((p.openBlock(),p.createElementBlock("select",{class:p.normalizeClass(s.value),"onUpdate:modelValue":u[0]||(u[0]=d=>p.isRef(r)?r.value=d:null),disabled:t.disabled,ref_key:"input",ref:o,onInput:l,onChange:a},[p.renderSlot(c.$slots,"first",{},()=>[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(t.options,d=>(p.openBlock(),p.createElementBlock("option",{value:d.value,key:d.value},p.toDisplayString(d.text),9,Dm))),128))])],42,Nm)),[[p.vModelSelect,p.unref(r)]])}}),Rm=["value","true-value","false-value","data-checked"],Hu=p.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}=ro(),o=Xn(t,"modelValue",e),i=`form-check-input-${r.value}`,s=p.computed(()=>["form-check","bd-form-checkbox"]),l=p.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)=>(p.openBlock(),p.createElementBlock("div",{class:p.normalizeClass(s.value)},[p.withDirectives(p.createElementVNode("input",{"onUpdate:modelValue":d[0]||(d[0]=f=>p.isRef(o)?o.value=f:null),class:p.normalizeClass(l.value),type:"checkbox",value:u.value,"true-value":u.value,"false-value":u.uncheckedValue,id:i,onChange:c,onInput:a,"data-checked":p.unref(o)===u.value},null,42,Rm),[[p.vModelCheckbox,p.unref(o)]]),p.createElementVNode("label",{class:"form-check-label",for:i},[p.renderSlot(u.$slots,"default")]),p.renderSlot(u.$slots,"last")],2))}}),Lm={key:0,class:"bd-article__body"},Bm={key:1},ju=p.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)=>(p.openBlock(),p.createElementBlock("article",{class:"bd-article",onClick:r},[p.createElementVNode("header",null,[p.renderSlot(o.$slots,"header",{},()=>[p.createElementVNode("h5",null,p.toDisplayString(t.title),1)])]),t.hideBody?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("div",Lm,[p.renderSlot(o.$slots,"default",{},()=>[p.createTextVNode(p.toDisplayString(t.text),1)])])),t.hideFooter?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("footer",Bm,[p.renderSlot(o.$slots,"footer")]))]))}}),sr={DANGER:"danger",WARNING:"warning",INFO:"info",SUCCESS:"success"},Pm=["id"],Fm={class:"toast-header"},Vm=p.createElementVNode("button",{type:"button",class:"btn-close","data-bs-dismiss":"toast","aria-label":"Close"},null,-1),$m={class:"toast-body"},Ea=p.defineComponent({__name:"BDToast",props:{id:{},show:{type:Boolean,default:!1},variant:{default:sr.INFO},title:{default:""},text:{default:""}},setup(n){const e=n,t=p.computed(()=>({show:e.show,[`bd-toast-${e.variant}`]:!0})),r=p.computed(()=>e.variant!==sr.SUCCESS);return(o,i)=>(p.openBlock(),p.createElementBlock("div",{class:p.normalizeClass(["toast bd-toast",t.value]),role:"alert","aria-live":"assertive","aria-atomic":"true",key:e.id,id:e.id},[p.createElementVNode("div",Fm,[r.value?(p.openBlock(),p.createBlock(p.unref(ki),{key:0})):(p.openBlock(),p.createBlock(p.unref(Ei),{key:1})),p.createElementVNode("h5",null,p.toDisplayString(e.title),1),Vm]),p.createElementVNode("div",$m,[p.createElementVNode("span",null,p.toDisplayString(e.text),1)])],10,Pm))}}),Wu=p.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)=>(p.openBlock(),p.createElementBlock("li",p.mergeProps({class:"bd-dropdown-item"},o.$attrs),[p.createVNode(Ci,p.mergeProps({class:"dropdown-item",onClick:r},t),{default:p.withCtx(()=>[p.renderSlot(o.$slots,"default",{},()=>[p.createTextVNode(p.toDisplayString(t.text),1)])]),_:3},16)],16))}});var cn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ku(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Gu={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"),m=Array.prototype;m[f]==null&&d.f(m,f,{configurable:!0,value:u(null)}),s.exports=function(h){m[f][h]=!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),m=a(6656),h=a(648),g=a(8880),v=a(1320),E=a(3070).f,k=a(9518),w=a(7674),y=a(5112),R=a(9711),S=d.Int8Array,B=S&&S.prototype,$=d.Uint8ClampedArray,F=$&&$.prototype,T=S&&k(S),P=B&&k(B),L=Object.prototype,U=L.isPrototypeOf,K=y("toStringTag"),Y=R("TYPED_ARRAY_TAG"),Q=c&&!!w&&h(d.opera)!=="Opera",te=!1,H,se={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},de={BigInt64Array:8,BigUint64Array:8},ge=function(O){if(!f(O))return!1;var I=h(O);return I==="DataView"||m(se,I)||m(de,I)},Ee=function(ve){if(!f(ve))return!1;var O=h(ve);return m(se,O)||m(de,O)},ye=function(ve){if(Ee(ve))return ve;throw TypeError("Target is not a typed array")},we=function(ve){if(w){if(U.call(T,ve))return ve}else for(var O in se)if(m(se,H)){var I=d[O];if(I&&(ve===I||U.call(I,ve)))return ve}throw TypeError("Target is not a typed array constructor")},ke=function(ve,O,I){if(u){if(I)for(var C in se){var M=d[C];M&&m(M.prototype,ve)&&delete M.prototype[ve]}(!P[ve]||I)&&v(P,ve,I?O:Q&&B[ve]||O)}},Te=function(ve,O,I){var C,M;if(u){if(w){if(I)for(C in se)M=d[C],M&&m(M,ve)&&delete M[ve];if(!T[ve]||I)try{return v(T,ve,I?O:Q&&S[ve]||O)}catch{}else return}for(C in se)M=d[C],M&&(!M[ve]||I)&&v(M,ve,O)}};for(H in se)d[H]||(Q=!1);if((!Q||typeof T!="function"||T===Function.prototype)&&(T=function(){throw TypeError("Incorrect invocation")},Q))for(H in se)d[H]&&w(d[H],T);if((!Q||!P||P===L)&&(P=T.prototype,Q))for(H in se)d[H]&&w(d[H].prototype,P);if(Q&&k(F)!==P&&w(F,P),u&&!m(P,K)){te=!0,E(P,K,{get:function(){return f(this)?this[Y]:void 0}});for(H in se)d[H]&&g(d[H],Y,H)}s.exports={NATIVE_ARRAY_BUFFER_VIEWS:Q,TYPED_ARRAY_TAG:te&&Y,aTypedArray:ye,aTypedArrayConstructor:we,exportTypedArrayMethod:ke,exportTypedArrayStaticMethod:Te,isView:ge,isTypedArray:Ee,TypedArray:T,TypedArrayPrototype:P}},3331:function(s,l,a){var c=a(7854),u=a(9781),d=a(4019),f=a(8880),m=a(2248),h=a(7293),g=a(5787),v=a(9958),E=a(7466),k=a(7067),w=a(1179),y=a(9518),R=a(7674),S=a(8006).f,B=a(3070).f,$=a(1285),F=a(8003),T=a(9909),P=T.get,L=T.set,U="ArrayBuffer",K="DataView",Y="prototype",Q="Wrong length",te="Wrong index",H=c[U],se=H,de=c[K],ge=de&&de[Y],Ee=Object.prototype,ye=c.RangeError,we=w.pack,ke=w.unpack,Te=function(J){return[J&255]},ve=function(J){return[J&255,J>>8&255]},O=function(J){return[J&255,J>>8&255,J>>16&255,J>>24&255]},I=function(J){return J[3]<<24|J[2]<<16|J[1]<<8|J[0]},C=function(J){return we(J,23,4)},M=function(J){return we(J,52,8)},b=function(J,X){B(J[Y],X,{get:function(){return P(this)[X]}})},x=function(J,X,q,ce){var me=k(q),Oe=P(J);if(me+X>Oe.byteLength)throw ye(te);var Pe=P(Oe.buffer).bytes,Be=me+Oe.byteOffset,Me=Pe.slice(Be,Be+X);return ce?Me:Me.reverse()},N=function(J,X,q,ce,me,Oe){var Pe=k(q),Be=P(J);if(Pe+X>Be.byteLength)throw ye(te);for(var Me=P(Be.buffer).bytes,We=Pe+Be.byteOffset,dt=ce(+me),qe=0;qe<X;qe++)Me[We+qe]=dt[Oe?qe:X-qe-1]};if(!d)se=function(X){g(this,se,U);var q=k(X);L(this,{bytes:$.call(new Array(q),0),byteLength:q}),u||(this.byteLength=q)},de=function(X,q,ce){g(this,de,K),g(X,se,K);var me=P(X).byteLength,Oe=v(q);if(Oe<0||Oe>me)throw ye("Wrong offset");if(ce=ce===void 0?me-Oe:E(ce),Oe+ce>me)throw ye(Q);L(this,{buffer:X,byteLength:ce,byteOffset:Oe}),u||(this.buffer=X,this.byteLength=ce,this.byteOffset=Oe)},u&&(b(se,"byteLength"),b(de,"buffer"),b(de,"byteLength"),b(de,"byteOffset")),m(de[Y],{getInt8:function(X){return x(this,1,X)[0]<<24>>24},getUint8:function(X){return x(this,1,X)[0]},getInt16:function(X){var q=x(this,2,X,arguments.length>1?arguments[1]:void 0);return(q[1]<<8|q[0])<<16>>16},getUint16:function(X){var q=x(this,2,X,arguments.length>1?arguments[1]:void 0);return q[1]<<8|q[0]},getInt32:function(X){return I(x(this,4,X,arguments.length>1?arguments[1]:void 0))},getUint32:function(X){return I(x(this,4,X,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(X){return ke(x(this,4,X,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(X){return ke(x(this,8,X,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(X,q){N(this,1,X,Te,q)},setUint8:function(X,q){N(this,1,X,Te,q)},setInt16:function(X,q){N(this,2,X,ve,q,arguments.length>2?arguments[2]:void 0)},setUint16:function(X,q){N(this,2,X,ve,q,arguments.length>2?arguments[2]:void 0)},setInt32:function(X,q){N(this,4,X,O,q,arguments.length>2?arguments[2]:void 0)},setUint32:function(X,q){N(this,4,X,O,q,arguments.length>2?arguments[2]:void 0)},setFloat32:function(X,q){N(this,4,X,C,q,arguments.length>2?arguments[2]:void 0)},setFloat64:function(X,q){N(this,8,X,M,q,arguments.length>2?arguments[2]:void 0)}});else{if(!h(function(){H(1)})||!h(function(){new H(-1)})||h(function(){return new H,new H(1.5),new H(NaN),H.name!=U})){se=function(X){return g(this,se),new H(k(X))};for(var D=se[Y]=H[Y],V=S(H),z=0,j;V.length>z;)(j=V[z++])in se||f(se,j,H[j]);D.constructor=se}R&&y(ge)!==Ee&&R(ge,Ee);var G=new de(new se(2)),W=ge.setInt8;G.setInt8(0,2147483648),G.setInt8(1,2147483649),(G.getInt8(0)||!G.getInt8(1))&&m(ge,{setInt8:function(X,q){W.call(this,X,q<<24>>24)},setUint8:function(X,q){W.call(this,X,q<<24>>24)}},{unsafe:!0})}F(se,U),F(de,K),s.exports={ArrayBuffer:se,DataView:de}},1048:function(s,l,a){var c=a(7908),u=a(1400),d=a(7466),f=Math.min;s.exports=[].copyWithin||function(h,g){var v=c(this),E=d(v.length),k=u(h,E),w=u(g,E),y=arguments.length>2?arguments[2]:void 0,R=f((y===void 0?E:u(y,E))-w,E-k),S=1;for(w<k&&k<w+R&&(S=-1,w+=R-1,k+=R-1);R-- >0;)w in v?v[k]=v[w]:delete v[k],k+=S,w+=S;return v}},1285:function(s,l,a){var c=a(7908),u=a(1400),d=a(7466);s.exports=function(m){for(var h=c(this),g=d(h.length),v=arguments.length,E=u(v>1?arguments[1]:void 0,g),k=v>2?arguments[2]:void 0,w=k===void 0?g:u(k,g);w>E;)h[E++]=m;return h}},8533:function(s,l,a){var c=a(2092).forEach,u=a(9341),d=u("forEach");s.exports=d?[].forEach:function(m){return c(this,m,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),m=a(7466),h=a(6135),g=a(1246);s.exports=function(E){var k=u(E),w=typeof this=="function"?this:Array,y=arguments.length,R=y>1?arguments[1]:void 0,S=R!==void 0,B=g(k),$=0,F,T,P,L,U,K;if(S&&(R=c(R,y>2?arguments[2]:void 0,2)),B!=null&&!(w==Array&&f(B)))for(L=B.call(k),U=L.next,T=new w;!(P=U.call(L)).done;$++)K=S?d(L,R,[P.value,$],!0):P.value,h(T,$,K);else for(F=m(k.length),T=new w(F);F>$;$++)K=S?R(k[$],$):k[$],h(T,$,K);return T.length=$,T}},1318:function(s,l,a){var c=a(5656),u=a(7466),d=a(1400),f=function(m){return function(h,g,v){var E=c(h),k=u(E.length),w=d(v,k),y;if(m&&g!=g){for(;k>w;)if(y=E[w++],y!=y)return!0}else for(;k>w;w++)if((m||w in E)&&E[w]===g)return m||w||0;return!m&&-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),m=a(5417),h=[].push,g=function(v){var E=v==1,k=v==2,w=v==3,y=v==4,R=v==6,S=v==7,B=v==5||R;return function($,F,T,P){for(var L=d($),U=u(L),K=c(F,T,3),Y=f(U.length),Q=0,te=P||m,H=E?te($,Y):k||S?te($,0):void 0,se,de;Y>Q;Q++)if((B||Q in U)&&(se=U[Q],de=K(se,Q,L),v))if(E)H[Q]=de;else if(de)switch(v){case 3:return!0;case 5:return se;case 6:return Q;case 2:h.call(H,se)}else switch(v){case 4:return!1;case 7:h.call(H,se)}return R?-1:w||y?y:H}};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),m=Math.min,h=[].lastIndexOf,g=!!h&&1/[1].lastIndexOf(1,-0)<0,v=f("lastIndexOf"),E=g||!v;s.exports=E?function(w){if(g)return h.apply(this,arguments)||0;var y=c(this),R=d(y.length),S=R-1;for(arguments.length>1&&(S=m(S,u(arguments[1]))),S<0&&(S=R+S);S>=0;S--)if(S in y&&y[S]===w)return S||0;return-1}:h},1194:function(s,l,a){var c=a(7293),u=a(5112),d=a(7392),f=u("species");s.exports=function(m){return d>=51||!c(function(){var h=[],g=h.constructor={};return g[f]=function(){return{foo:1}},h[m](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),m=function(h){return function(g,v,E,k){c(v);var w=u(g),y=d(w),R=f(w.length),S=h?R-1:0,B=h?-1:1;if(E<2)for(;;){if(S in y){k=y[S],S+=B;break}if(S+=B,h?S<0:R<=S)throw TypeError("Reduce of empty array with no initial value")}for(;h?S>=0:R>S;S+=B)S in y&&(k=v(k,y[S],S,w));return k}};s.exports={left:m(!1),right:m(!0)}},5417:function(s,l,a){var c=a(111),u=a(3157),d=a(5112),f=d("species");s.exports=function(m,h){var g;return u(m)&&(g=m.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)(h===0?0:h)}},3411:function(s,l,a){var c=a(9670),u=a(9212);s.exports=function(d,f,m,h){try{return h?f(c(m)[0],m[1]):f(m)}catch(g){throw u(d),g}}},7072:function(s,l,a){var c=a(5112),u=c("iterator"),d=!1;try{var f=0,m={next:function(){return{done:!!f++}},return:function(){d=!0}};m[u]=function(){return this},Array.from(m,function(){throw 2})}catch{}s.exports=function(h,g){if(!g&&!d)return!1;var v=!1;try{var E={};E[u]=function(){return{next:function(){return{done:v=!0}}}},h(E)}catch{}return v}},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"),m=u(function(){return arguments}())=="Arguments",h=function(g,v){try{return g[v]}catch{}};s.exports=c?u:function(g){var v,E,k;return g===void 0?"Undefined":g===null?"Null":typeof(E=h(v=Object(g),f))=="string"?E:m?u(v):(k=u(v))=="Object"&&typeof v.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(m,h){for(var g=u(h),v=f.f,E=d.f,k=0;k<g.length;k++){var w=g[k];c(m,w)||v(m,w,E(h,w))}}},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),m=a(7497),h=function(){return this};s.exports=function(g,v,E){var k=v+" Iterator";return g.prototype=u(c,{next:d(1,E)}),f(g,k,!1,!0),m[k]=h,g}},8880:function(s,l,a){var c=a(9781),u=a(3070),d=a(9114);s.exports=c?function(f,m,h){return u.f(f,m,d(1,h))}:function(f,m,h){return f[m]=h,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,m,h){var g=c(m);g in f?u.f(f,g,d(0,h)):f[g]=h}},654:function(s,l,a){var c=a(2109),u=a(4994),d=a(9518),f=a(7674),m=a(8003),h=a(8880),g=a(1320),v=a(5112),E=a(1913),k=a(7497),w=a(3383),y=w.IteratorPrototype,R=w.BUGGY_SAFARI_ITERATORS,S=v("iterator"),B="keys",$="values",F="entries",T=function(){return this};s.exports=function(P,L,U,K,Y,Q,te){u(U,L,K);var H=function(O){if(O===Y&&ye)return ye;if(!R&&O in ge)return ge[O];switch(O){case B:return function(){return new U(this,O)};case $:return function(){return new U(this,O)};case F:return function(){return new U(this,O)}}return function(){return new U(this)}},se=L+" Iterator",de=!1,ge=P.prototype,Ee=ge[S]||ge["@@iterator"]||Y&&ge[Y],ye=!R&&Ee||H(Y),we=L=="Array"&&ge.entries||Ee,ke,Te,ve;if(we&&(ke=d(we.call(new P)),y!==Object.prototype&&ke.next&&(!E&&d(ke)!==y&&(f?f(ke,y):typeof ke[S]!="function"&&h(ke,S,T)),m(ke,se,!0,!0),E&&(k[se]=T))),Y==$&&Ee&&Ee.name!==$&&(de=!0,ye=function(){return Ee.call(this)}),(!E||te)&&ge[S]!==ye&&h(ge,S,ye),k[L]=ye,Y)if(Te={values:H($),keys:Q?ye:H(B),entries:H(F)},te)for(ve in Te)(R||de||!(ve in ge))&&g(ge,ve,Te[ve]);else c({target:L,proto:!0,forced:R||de},Te);return Te}},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(m){return f?d.createElement(m):{}}},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,m=f&&f.v8,h,g;m?(h=m.split("."),g=h[0]+h[1]):u&&(h=u.match(/Edge\/(\d+)/),(!h||h[1]>=74)&&(h=u.match(/Chrome\/(\d+)/),h&&(g=h[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),m=a(3505),h=a(9920),g=a(4705);s.exports=function(v,E){var k=v.target,w=v.global,y=v.stat,R,S,B,$,F,T;if(w?S=c:y?S=c[k]||m(k,{}):S=(c[k]||{}).prototype,S)for(B in E){if(F=E[B],v.noTargetGet?(T=u(S,B),$=T&&T.value):$=S[B],R=g(w?B:k+(y?".":"#")+B,v.forced),!R&&$!==void 0){if(typeof F==typeof $)continue;h(F,$)}(v.sham||$&&$.sham)&&d(F,"sham",!0),f(S,B,F,v)}}},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),m=a(8880),h=d("species"),g=!u(function(){var y=/./;return y.exec=function(){var R=[];return R.groups={a:"7"},R},"".replace(y,"$<a>")!=="7"}),v=function(){return"a".replace(/./,"$0")==="$0"}(),E=d("replace"),k=function(){return/./[E]?/./[E]("a","$0")==="":!1}(),w=!u(function(){var y=/(?:)/,R=y.exec;y.exec=function(){return R.apply(this,arguments)};var S="ab".split(y);return S.length!==2||S[0]!=="a"||S[1]!=="b"});s.exports=function(y,R,S,B){var $=d(y),F=!u(function(){var Y={};return Y[$]=function(){return 7},""[y](Y)!=7}),T=F&&!u(function(){var Y=!1,Q=/a/;return y==="split"&&(Q={},Q.constructor={},Q.constructor[h]=function(){return Q},Q.flags="",Q[$]=/./[$]),Q.exec=function(){return Y=!0,null},Q[$](""),!Y});if(!F||!T||y==="replace"&&!(g&&v&&!k)||y==="split"&&!w){var P=/./[$],L=S($,""[y],function(Y,Q,te,H,se){return Q.exec===f?F&&!se?{done:!0,value:P.call(Q,te,H)}:{done:!0,value:Y.call(te,Q,H)}:{done:!1}},{REPLACE_KEEPS_$0:v,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:k}),U=L[0],K=L[1];c(String.prototype,y,U),c(RegExp.prototype,$,R==2?function(Y,Q){return K.call(Y,this,Q)}:function(Y){return K.call(Y,this)})}B&&m(RegExp.prototype[$],"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(m){return u.call(d,m)};case 2:return function(m,h){return u.call(d,m,h)};case 3:return function(m,h,g){return u.call(d,m,h,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,m){return arguments.length<2?d(c[f])||d(u[f]):c[f]&&c[f][m]||u[f]&&u[f][m]}},1246:function(s,l,a){var c=a(648),u=a(7497),d=a(5112),f=d("iterator");s.exports=function(m){if(m!=null)return m[f]||m["@@iterator"]||u[c(m)]}},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,m=/\$([$&'`]|\d\d?)/g;s.exports=function(h,g,v,E,k,w){var y=v+h.length,R=E.length,S=m;return k!==void 0&&(k=c(k),S=f),d.call(w,S,function(B,$){var F;switch($.charAt(0)){case"$":return"$";case"&":return h;case"`":return g.slice(0,v);case"'":return g.slice(y);case"<":F=k[$.slice(1,-1)];break;default:var T=+$;if(T===0)return B;if(T>R){var P=u(T/10);return P===0?B:P<=R?E[P-1]===void 0?$.charAt(1):E[P-1]+$.charAt(1):B}F=E[T-1]}return F===void 0?"":F})}},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(h,g,v){var E=new Array(v),k=v*8-g-1,w=(1<<k)-1,y=w>>1,R=g===23?a(2,-24)-a(2,-77):0,S=h<0||h===0&&1/h<0?1:0,B=0,$,F,T;for(h=l(h),h!=h||h===1/0?(F=h!=h?1:0,$=w):($=c(u(h)/d),h*(T=a(2,-$))<1&&($--,T*=2),$+y>=1?h+=R/T:h+=R*a(2,1-y),h*T>=2&&($++,T/=2),$+y>=w?(F=0,$=w):$+y>=1?(F=(h*T-1)*a(2,g),$=$+y):(F=h*a(2,y-1)*a(2,g),$=0));g>=8;E[B++]=F&255,F/=256,g-=8);for($=$<<g|F,k+=g;k>0;E[B++]=$&255,$/=256,k-=8);return E[--B]|=S*128,E},m=function(h,g){var v=h.length,E=v*8-g-1,k=(1<<E)-1,w=k>>1,y=E-7,R=v-1,S=h[R--],B=S&127,$;for(S>>=7;y>0;B=B*256+h[R],R--,y-=8);for($=B&(1<<-y)-1,B>>=-y,y+=g;y>0;$=$*256+h[R],R--,y-=8);if(B===0)B=1-w;else{if(B===k)return $?NaN:S?-1/0:1/0;$=$+a(2,g),B=B-w}return(S?-1:1)*$*a(2,B-g)};s.exports={pack:f,unpack:m}},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,m){var h,g;return u&&typeof(h=f.constructor)=="function"&&h!==m&&c(g=h.prototype)&&g!==m.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),m=a(6656),h=a(5465),g=a(6200),v=a(3501),E=u.WeakMap,k,w,y,R=function(L){return y(L)?w(L):k(L,{})},S=function(L){return function(U){var K;if(!d(U)||(K=w(U)).type!==L)throw TypeError("Incompatible receiver, "+L+" required");return K}};if(c){var B=h.state||(h.state=new E),$=B.get,F=B.has,T=B.set;k=function(L,U){return U.facade=L,T.call(B,L,U),U},w=function(L){return $.call(B,L)||{}},y=function(L){return F.call(B,L)}}else{var P=g("state");v[P]=!0,k=function(L,U){return U.facade=L,f(L,P,U),U},w=function(L){return m(L,P)?L[P]:{}},y=function(L){return m(L,P)}}s.exports={set:k,get:w,has:y,enforce:R,getterFor:S}},7659:function(s,l,a){var c=a(5112),u=a(7497),d=c("iterator"),f=Array.prototype;s.exports=function(m){return m!==void 0&&(u.Array===m||f[d]===m)}},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(v,E){var k=m[f(v)];return k==g?!0:k==h?!1:typeof E=="function"?c(E):!!E},f=d.normalize=function(v){return String(v).replace(u,".").toLowerCase()},m=d.data={},h=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(m){var h;return c(m)&&((h=m[f])!==void 0?!!h:u(m)=="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),m=a(5112),h=a(1913),g=m("iterator"),v=!1,E=function(){return this},k,w,y;[].keys&&(y=[].keys(),"next"in y?(w=u(u(y)),w!==Object.prototype&&(k=w)):v=!0);var R=k==null||c(function(){var S={};return k[g].call(S)!==S});R&&(k={}),(!h||R)&&!f(k,g)&&d(k,g,E),s.exports={IteratorPrototype:k,BUGGY_SAFARI_ITERATORS:v}},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 m=new URL("b?a=1&b=2&c=3","http://a"),h=m.searchParams,g="";return m.pathname="c%20d",h.forEach(function(v,E){h.delete("b"),g+=E+v}),d&&!m.toJSON||!h.sort||m.href!=="http://a/c%20d?a=1&c=3"||h.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!h[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),m=a(5296),h=a(7908),g=a(8361),v=Object.assign,E=Object.defineProperty;s.exports=!v||u(function(){if(c&&v({b:1},v(E({},"a",{enumerable:!0,get:function(){E(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var k={},w={},y=Symbol(),R="abcdefghijklmnopqrst";return k[y]=7,R.split("").forEach(function(S){w[S]=S}),v({},k)[y]!=7||d(v({},w)).join("")!=R})?function(w,y){for(var R=h(w),S=arguments.length,B=1,$=f.f,F=m.f;S>B;)for(var T=g(arguments[B++]),P=$?d(T).concat($(T)):d(T),L=P.length,U=0,K;L>U;)K=P[U++],(!c||F.call(T,K))&&(R[K]=T[K]);return R}:v},30:function(s,l,a){var c=a(9670),u=a(6048),d=a(748),f=a(3501),m=a(490),h=a(317),g=a(6200),v=">",E="<",k="prototype",w="script",y=g("IE_PROTO"),R=function(){},S=function(P){return E+w+v+P+E+"/"+w+v},B=function(P){P.write(S("")),P.close();var L=P.parentWindow.Object;return P=null,L},$=function(){var P=h("iframe"),L="java"+w+":",U;return P.style.display="none",m.appendChild(P),P.src=String(L),U=P.contentWindow.document,U.open(),U.write(S("document.F=Object")),U.close(),U.F},F,T=function(){try{F=document.domain&&new ActiveXObject("htmlfile")}catch{}T=F?B(F):$();for(var P=d.length;P--;)delete T[k][d[P]];return T()};f[y]=!0,s.exports=Object.create||function(L,U){var K;return L!==null?(R[k]=c(L),K=new R,R[k]=null,K[y]=L):K=T(),U===void 0?K:u(K,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(h,g){d(h);for(var v=f(g),E=v.length,k=0,w;E>k;)u.f(h,w=v[k++],g[w]);return h}},3070:function(s,l,a){var c=a(9781),u=a(4664),d=a(9670),f=a(7593),m=Object.defineProperty;l.f=c?m:function(g,v,E){if(d(g),v=f(v,!0),d(E),u)try{return m(g,v,E)}catch{}if("get"in E||"set"in E)throw TypeError("Accessors not supported");return"value"in E&&(g[v]=E.value),g}},1236:function(s,l,a){var c=a(9781),u=a(5296),d=a(9114),f=a(5656),m=a(7593),h=a(6656),g=a(4664),v=Object.getOwnPropertyDescriptor;l.f=c?v:function(k,w){if(k=f(k),w=m(w,!0),g)try{return v(k,w)}catch{}if(h(k,w))return d(!u.f.call(k,w),k[w])}},8006:function(s,l,a){var c=a(6324),u=a(748),d=u.concat("length","prototype");l.f=Object.getOwnPropertyNames||function(m){return c(m,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),m=d("IE_PROTO"),h=Object.prototype;s.exports=f?Object.getPrototypeOf:function(g){return g=u(g),c(g,m)?g[m]:typeof g.constructor=="function"&&g instanceof g.constructor?g.constructor.prototype:g instanceof Object?h:null}},6324:function(s,l,a){var c=a(6656),u=a(5656),d=a(1318).indexOf,f=a(3501);s.exports=function(m,h){var g=u(m),v=0,E=[],k;for(k in g)!c(f,k)&&c(g,k)&&E.push(k);for(;h.length>v;)c(g,k=h[v++])&&(~d(E,k)||E.push(k));return E}},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 m=c(this,f);return!!m&&m.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={},m;try{m=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,m.call(f,[]),d=f instanceof Array}catch{}return function(g,v){return c(g),u(v),d?m.call(g,v):g.__proto__=v,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(h){var g=u.f(f(h)),v=d.f;return v?g.concat(v(h)):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 m in d)c(u,m,d[m],f);return u}},1320:function(s,l,a){var c=a(7854),u=a(8880),d=a(6656),f=a(3505),m=a(2788),h=a(9909),g=h.get,v=h.enforce,E=String(String).split("String");(s.exports=function(k,w,y,R){var S=R?!!R.unsafe:!1,B=R?!!R.enumerable:!1,$=R?!!R.noTargetGet:!1,F;if(typeof y=="function"&&(typeof w=="string"&&!d(y,"name")&&u(y,"name",w),F=v(y),F.source||(F.source=E.join(typeof w=="string"?w:""))),k===c){B?k[w]=y:f(w,y);return}else S?!$&&k[w]&&(B=!0):delete k[w];B?k[w]=y:u(k,w,y)})(Function.prototype,"toString",function(){return typeof this=="function"&&g(this).source||m(this)})},7651:function(s,l,a){var c=a(4326),u=a(2261);s.exports=function(d,f){var m=d.exec;if(typeof m=="function"){var h=m.call(d,f);if(typeof h!="object")throw TypeError("RegExp exec method returned something other than an Object or null");return h}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,m=d,h=function(){var k=/a/,w=/b*/g;return d.call(k,"a"),d.call(w,"a"),k.lastIndex!==0||w.lastIndex!==0}(),g=u.UNSUPPORTED_Y||u.BROKEN_CARET,v=/()??/.exec("")[1]!==void 0,E=h||v||g;E&&(m=function(w){var y=this,R,S,B,$,F=g&&y.sticky,T=c.call(y),P=y.source,L=0,U=w;return F&&(T=T.replace("y",""),T.indexOf("g")===-1&&(T+="g"),U=String(w).slice(y.lastIndex),y.lastIndex>0&&(!y.multiline||y.multiline&&w[y.lastIndex-1]!==`
5
+ `)&&(P="(?: "+P+")",U=" "+U,L++),S=new RegExp("^(?:"+P+")",T)),v&&(S=new RegExp("^"+P+"$(?!\\s)",T)),h&&(R=y.lastIndex),B=d.call(F?S:y,U),F?B?(B.input=B.input.slice(L),B[0]=B[0].slice(L),B.index=y.lastIndex,y.lastIndex+=B[0].length):y.lastIndex=0:h&&B&&(y.lastIndex=y.global?B.index+B[0].length:R),v&&B&&B.length>1&&f.call(B[0],S,function(){for($=1;$<arguments.length-2;$++)arguments[$]===void 0&&(B[$]=void 0)}),B}),s.exports=m},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),m=d("species");s.exports=function(h){var g=c(h),v=u.f;f&&g&&!g[m]&&v(g,m,{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(m,h,g){m&&!u(m=g?m:m.prototype,f)&&c(m,f,{configurable:!0,value:h})}},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(m,h){var g=c(m).constructor,v;return g===void 0||(v=c(g)[f])==null?h:u(v)}},8710:function(s,l,a){var c=a(9958),u=a(4488),d=function(f){return function(m,h){var g=String(u(m)),v=c(h),E=g.length,k,w;return v<0||v>=E?f?"":void 0:(k=g.charCodeAt(v),k<55296||k>56319||v+1===E||(w=g.charCodeAt(v+1))<56320||w>57343?f?g.charAt(v):k:f?g.slice(v,v+2):(k-55296<<10)+(w-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,m=72,h=128,g="-",v=/[^\0-\u007E]/,E=/[.\u3002\uFF0E\uFF61]/g,k="Overflow: input needs wider integers to process",w=a-c,y=Math.floor,R=String.fromCharCode,S=function(T){for(var P=[],L=0,U=T.length;L<U;){var K=T.charCodeAt(L++);if(K>=55296&&K<=56319&&L<U){var Y=T.charCodeAt(L++);(Y&64512)==56320?P.push(((K&1023)<<10)+(Y&1023)+65536):(P.push(K),L--)}else P.push(K)}return P},B=function(T){return T+22+75*(T<26)},$=function(T,P,L){var U=0;for(T=L?y(T/f):T>>1,T+=y(T/P);T>w*u>>1;U+=a)T=y(T/w);return y(U+(w+1)*T/(T+d))},F=function(T){var P=[];T=S(T);var L=T.length,U=h,K=0,Y=m,Q,te;for(Q=0;Q<T.length;Q++)te=T[Q],te<128&&P.push(R(te));var H=P.length,se=H;for(H&&P.push(g);se<L;){var de=l;for(Q=0;Q<T.length;Q++)te=T[Q],te>=U&&te<de&&(de=te);var ge=se+1;if(de-U>y((l-K)/ge))throw RangeError(k);for(K+=(de-U)*ge,U=de,Q=0;Q<T.length;Q++){if(te=T[Q],te<U&&++K>l)throw RangeError(k);if(te==U){for(var Ee=K,ye=a;;ye+=a){var we=ye<=Y?c:ye>=Y+u?u:ye-Y;if(Ee<we)break;var ke=Ee-we,Te=a-we;P.push(R(B(we+ke%Te))),Ee=y(ke/Te)}P.push(R(B(Ee))),Y=$(K,ge,se==H),K=0,++se}}++K,++U}return P.join("")};s.exports=function(T){var P=[],L=T.toLowerCase().replace(E,".").split("."),U,K;for(U=0;U<L.length;U++)K=L[U],P.push(v.test(K)?"xn--"+F(K):K);return P.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+"*"),m=RegExp(d+d+"*$"),h=function(g){return function(v){var E=String(c(v));return g&1&&(E=E.replace(f,"")),g&2&&(E=E.replace(m,"")),E}};s.exports={start:h(1),end:h(2),trim:h(3)}},1400:function(s,l,a){var c=a(9958),u=Math.max,d=Math.min;s.exports=function(f,m){var h=c(f);return h<0?u(h+m,0):d(h,m)}},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),m=u(f);if(f!==m)throw RangeError("Wrong length or index");return m}},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,m;if(d&&typeof(f=u.toString)=="function"&&!c(m=f.call(u))||typeof(f=u.valueOf)=="function"&&!c(m=f.call(u))||!d&&typeof(f=u.toString)=="function"&&!c(m=f.call(u)))return m;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),m=a(260),h=a(3331),g=a(5787),v=a(9114),E=a(8880),k=a(7466),w=a(7067),y=a(4590),R=a(7593),S=a(6656),B=a(648),$=a(111),F=a(30),T=a(7674),P=a(8006).f,L=a(7321),U=a(2092).forEach,K=a(6340),Y=a(3070),Q=a(1236),te=a(9909),H=a(9587),se=te.get,de=te.set,ge=Y.f,Ee=Q.f,ye=Math.round,we=u.RangeError,ke=h.ArrayBuffer,Te=h.DataView,ve=m.NATIVE_ARRAY_BUFFER_VIEWS,O=m.TYPED_ARRAY_TAG,I=m.TypedArray,C=m.TypedArrayPrototype,M=m.aTypedArrayConstructor,b=m.isTypedArray,x="BYTES_PER_ELEMENT",N="Wrong length",D=function(J,X){for(var q=0,ce=X.length,me=new(M(J))(ce);ce>q;)me[q]=X[q++];return me},V=function(J,X){ge(J,X,{get:function(){return se(this)[X]}})},z=function(J){var X;return J instanceof ke||(X=B(J))=="ArrayBuffer"||X=="SharedArrayBuffer"},j=function(J,X){return b(J)&&typeof X!="symbol"&&X in J&&String(+X)==String(X)},G=function(X,q){return j(X,q=R(q,!0))?v(2,X[q]):Ee(X,q)},W=function(X,q,ce){return j(X,q=R(q,!0))&&$(ce)&&S(ce,"value")&&!S(ce,"get")&&!S(ce,"set")&&!ce.configurable&&(!S(ce,"writable")||ce.writable)&&(!S(ce,"enumerable")||ce.enumerable)?(X[q]=ce.value,X):ge(X,q,ce)};d?(ve||(Q.f=G,Y.f=W,V(C,"buffer"),V(C,"byteOffset"),V(C,"byteLength"),V(C,"length")),c({target:"Object",stat:!0,forced:!ve},{getOwnPropertyDescriptor:G,defineProperty:W}),s.exports=function(J,X,q){var ce=J.match(/\d+$/)[0]/8,me=J+(q?"Clamped":"")+"Array",Oe="get"+J,Pe="set"+J,Be=u[me],Me=Be,We=Me&&Me.prototype,dt={},qe=function(ae,le){var be=se(ae);return be.view[Oe](le*ce+be.byteOffset,!0)},dn=function(ae,le,be){var Se=se(ae);q&&(be=(be=ye(be))<0?0:be>255?255:be&255),Se.view[Pe](le*ce+Se.byteOffset,be,!0)},Z=function(ae,le){ge(ae,le,{get:function(){return qe(this,le)},set:function(be){return dn(this,le,be)},enumerable:!0})};ve?f&&(Me=X(function(ae,le,be,Se){return g(ae,Me,me),H(function(){return $(le)?z(le)?Se!==void 0?new Be(le,y(be,ce),Se):be!==void 0?new Be(le,y(be,ce)):new Be(le):b(le)?D(Me,le):L.call(Me,le):new Be(w(le))}(),ae,Me)}),T&&T(Me,I),U(P(Be),function(ae){ae in Me||E(Me,ae,Be[ae])}),Me.prototype=We):(Me=X(function(ae,le,be,Se){g(ae,Me,me);var Fe=0,ze=0,rt,ot,Qe;if(!$(le))Qe=w(le),ot=Qe*ce,rt=new ke(ot);else if(z(le)){rt=le,ze=y(be,ce);var Ut=le.byteLength;if(Se===void 0){if(Ut%ce||(ot=Ut-ze,ot<0))throw we(N)}else if(ot=k(Se)*ce,ot+ze>Ut)throw we(N);Qe=ot/ce}else return b(le)?D(Me,le):L.call(Me,le);for(de(ae,{buffer:rt,byteOffset:ze,byteLength:ot,length:Qe,view:new Te(rt)});Fe<Qe;)Z(ae,Fe++)}),T&&T(Me,I),We=Me.prototype=F(C)),We.constructor!==Me&&E(We,"constructor",Me),O&&E(We,O,me),dt[me]=Me,c({global:!0,forced:Me!=Be,sham:!ve},dt),x in Me||E(Me,x,ce),x in We||E(We,x,ce),K(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,m=c.ArrayBuffer,h=c.Int8Array;s.exports=!f||!u(function(){h(1)})||!u(function(){new h(-1)})||!d(function(g){new h,new h(null),new h(1.5),new h(g)},!0)||u(function(){return new h(new m(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 m=u(d,d.constructor),h=0,g=f.length,v=new(c(m))(g);g>h;)v[h]=f[h++];return v}},7321:function(s,l,a){var c=a(7908),u=a(7466),d=a(1246),f=a(7659),m=a(9974),h=a(260).aTypedArrayConstructor;s.exports=function(v){var E=c(v),k=arguments.length,w=k>1?arguments[1]:void 0,y=w!==void 0,R=d(E),S,B,$,F,T,P;if(R!=null&&!f(R))for(T=R.call(E),P=T.next,E=[];!(F=P.call(T)).done;)E.push(F.value);for(y&&k>2&&(w=m(w,arguments[2],2)),B=u(E.length),$=new(h(this))(B),S=0;B>S;S++)$[S]=y?w(E[S],S):E[S];return $}},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),m=a(133),h=a(3307),g=u("wks"),v=c.Symbol,E=h?v:v&&v.withoutSetter||f;s.exports=function(k){return d(g,k)||(m&&d(v,k)?g[k]=v[k]:g[k]=E("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),m="ArrayBuffer",h=d[m],g=u[m];c({global:!0,forced:g!==h},{ArrayBuffer:h}),f(m)},2222:function(s,l,a){var c=a(2109),u=a(7293),d=a(3157),f=a(111),m=a(7908),h=a(7466),g=a(6135),v=a(5417),E=a(1194),k=a(5112),w=a(7392),y=k("isConcatSpreadable"),R=9007199254740991,S="Maximum allowed index exceeded",B=w>=51||!u(function(){var P=[];return P[y]=!1,P.concat()[0]!==P}),$=E("concat"),F=function(P){if(!f(P))return!1;var L=P[y];return L!==void 0?!!L:d(P)},T=!B||!$;c({target:"Array",proto:!0,forced:T},{concat:function(L){var U=m(this),K=v(U,0),Y=0,Q,te,H,se,de;for(Q=-1,H=arguments.length;Q<H;Q++)if(de=Q===-1?U:arguments[Q],F(de)){if(se=h(de.length),Y+se>R)throw TypeError(S);for(te=0;te<se;te++,Y++)te in de&&g(K,Y,de[te])}else{if(Y>=R)throw TypeError(S);g(K,Y++,de)}return K.length=Y,K}})},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(h){return u(this,h,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,m=!!f&&1/[1].indexOf(1,-0)<0,h=d("indexOf");c({target:"Array",proto:!0,forced:m||!h},{indexOf:function(v){return m?f.apply(this,arguments)||0:u(this,v,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),m=a(654),h="Array Iterator",g=f.set,v=f.getterFor(h);s.exports=m(Array,"Array",function(E,k){g(this,{type:h,target:c(E),index:0,kind:k})},function(){var E=v(this),k=E.target,w=E.kind,y=E.index++;return!k||y>=k.length?(E.target=void 0,{value:void 0,done:!0}):w=="keys"?{value:y,done:!1}:w=="values"?{value:k[y],done:!1}:{value:[y,k[y]],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(h){return u(this,h,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),m=a(7466),h=a(5656),g=a(6135),v=a(5112),E=a(1194),k=E("slice"),w=v("species"),y=[].slice,R=Math.max;c({target:"Array",proto:!0,forced:!k},{slice:function(B,$){var F=h(this),T=m(F.length),P=f(B,T),L=f($===void 0?T:$,T),U,K,Y;if(d(F)&&(U=F.constructor,typeof U=="function"&&(U===Array||d(U.prototype))?U=void 0:u(U)&&(U=U[w],U===null&&(U=void 0)),U===Array||U===void 0))return y.call(F,P,L);for(K=new(U===void 0?Array:U)(R(L-P,0)),Y=0;P<L;P++,Y++)P in F&&g(K,Y,F[P]);return K.length=Y,K}})},561:function(s,l,a){var c=a(2109),u=a(1400),d=a(9958),f=a(7466),m=a(7908),h=a(5417),g=a(6135),v=a(1194),E=v("splice"),k=Math.max,w=Math.min,y=9007199254740991,R="Maximum allowed length exceeded";c({target:"Array",proto:!0,forced:!E},{splice:function(B,$){var F=m(this),T=f(F.length),P=u(B,T),L=arguments.length,U,K,Y,Q,te,H;if(L===0?U=K=0:L===1?(U=0,K=T-P):(U=L-2,K=w(k(d($),0),T-P)),T+U-K>y)throw TypeError(R);for(Y=h(F,K),Q=0;Q<K;Q++)te=P+Q,te in F&&g(Y,Q,F[te]);if(Y.length=K,U<K){for(Q=P;Q<T-K;Q++)te=Q+K,H=Q+U,te in F?F[H]=F[te]:delete F[H];for(Q=T;Q>T-K+U;Q--)delete F[Q-1]}else if(U>K)for(Q=T-K;Q>P;Q--)te=Q+K-1,H=Q+U-1,te in F?F[H]=F[te]:delete F[H];for(Q=0;Q<U;Q++)F[Q+P]=arguments[Q+2];return F.length=T-K+U,Y}})},8309:function(s,l,a){var c=a(9781),u=a(3070).f,d=Function.prototype,f=d.toString,m=/^\s*function ([^ (]*)/,h="name";c&&!(h in d)&&u(d,h,{configurable:!0,get:function(){try{return f.call(this).match(m)[1]}catch{return""}}})},489:function(s,l,a){var c=a(2109),u=a(7293),d=a(7908),f=a(9518),m=a(8544),h=u(function(){f(1)});c({target:"Object",stat:!0,forced:h,sham:!m},{getPrototypeOf:function(v){return f(d(v))}})},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),m="toString",h=RegExp.prototype,g=h[m],v=d(function(){return g.call({source:"a",flags:"b"})!="/a/b"}),E=g.name!=m;(v||E)&&c(RegExp.prototype,m,function(){var w=u(this),y=String(w.source),R=w.flags,S=String(R===void 0&&w instanceof RegExp&&!("flags"in h)?f.call(w):R);return"/"+y+"/"+S},{unsafe:!0})},8783:function(s,l,a){var c=a(8710).charAt,u=a(9909),d=a(654),f="String Iterator",m=u.set,h=u.getterFor(f);d(String,"String",function(g){m(this,{type:f,string:String(g),index:0})},function(){var v=h(this),E=v.string,k=v.index,w;return k>=E.length?{value:void 0,done:!0}:(w=c(E,k),v.index+=w.length,{value:w,done:!1})})},4723:function(s,l,a){var c=a(7007),u=a(9670),d=a(7466),f=a(4488),m=a(1530),h=a(7651);c("match",1,function(g,v,E){return[function(w){var y=f(this),R=w==null?void 0:w[g];return R!==void 0?R.call(w,y):new RegExp(w)[g](String(y))},function(k){var w=E(v,k,this);if(w.done)return w.value;var y=u(k),R=String(this);if(!y.global)return h(y,R);var S=y.unicode;y.lastIndex=0;for(var B=[],$=0,F;(F=h(y,R))!==null;){var T=String(F[0]);B[$]=T,T===""&&(y.lastIndex=m(R,d(y.lastIndex),S)),$++}return $===0?null:B}]})},5306:function(s,l,a){var c=a(7007),u=a(9670),d=a(7466),f=a(9958),m=a(4488),h=a(1530),g=a(647),v=a(7651),E=Math.max,k=Math.min,w=function(y){return y===void 0?y:String(y)};c("replace",2,function(y,R,S,B){var $=B.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,F=B.REPLACE_KEEPS_$0,T=$?"$":"$0";return[function(L,U){var K=m(this),Y=L==null?void 0:L[y];return Y!==void 0?Y.call(L,K,U):R.call(String(K),L,U)},function(P,L){if(!$&&F||typeof L=="string"&&L.indexOf(T)===-1){var U=S(R,P,this,L);if(U.done)return U.value}var K=u(P),Y=String(this),Q=typeof L=="function";Q||(L=String(L));var te=K.global;if(te){var H=K.unicode;K.lastIndex=0}for(var se=[];;){var de=v(K,Y);if(de===null||(se.push(de),!te))break;var ge=String(de[0]);ge===""&&(K.lastIndex=h(Y,d(K.lastIndex),H))}for(var Ee="",ye=0,we=0;we<se.length;we++){de=se[we];for(var ke=String(de[0]),Te=E(k(f(de.index),Y.length),0),ve=[],O=1;O<de.length;O++)ve.push(w(de[O]));var I=de.groups;if(Q){var C=[ke].concat(ve,Te,Y);I!==void 0&&C.push(I);var M=String(L.apply(void 0,C))}else M=g(ke,Y,Te,ve,I,L);Te>=ye&&(Ee+=Y.slice(ye,Te)+M,ye=Te+ke.length)}return Ee+Y.slice(ye)}]})},3123:function(s,l,a){var c=a(7007),u=a(7850),d=a(9670),f=a(4488),m=a(6707),h=a(1530),g=a(7466),v=a(7651),E=a(2261),k=a(7293),w=[].push,y=Math.min,R=4294967295,S=!k(function(){return!RegExp(R,"y")});c("split",2,function(B,$,F){var T;return"abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?T=function(P,L){var U=String(f(this)),K=L===void 0?R:L>>>0;if(K===0)return[];if(P===void 0)return[U];if(!u(P))return $.call(U,P,K);for(var Y=[],Q=(P.ignoreCase?"i":"")+(P.multiline?"m":"")+(P.unicode?"u":"")+(P.sticky?"y":""),te=0,H=new RegExp(P.source,Q+"g"),se,de,ge;(se=E.call(H,U))&&(de=H.lastIndex,!(de>te&&(Y.push(U.slice(te,se.index)),se.length>1&&se.index<U.length&&w.apply(Y,se.slice(1)),ge=se[0].length,te=de,Y.length>=K)));)H.lastIndex===se.index&&H.lastIndex++;return te===U.length?(ge||!H.test(""))&&Y.push(""):Y.push(U.slice(te)),Y.length>K?Y.slice(0,K):Y}:"0".split(void 0,0).length?T=function(P,L){return P===void 0&&L===0?[]:$.call(this,P,L)}:T=$,[function(L,U){var K=f(this),Y=L==null?void 0:L[B];return Y!==void 0?Y.call(L,K,U):T.call(String(K),L,U)},function(P,L){var U=F(T,P,this,L,T!==$);if(U.done)return U.value;var K=d(P),Y=String(this),Q=m(K,RegExp),te=K.unicode,H=(K.ignoreCase?"i":"")+(K.multiline?"m":"")+(K.unicode?"u":"")+(S?"y":"g"),se=new Q(S?K:"^(?:"+K.source+")",H),de=L===void 0?R:L>>>0;if(de===0)return[];if(Y.length===0)return v(se,Y)===null?[Y]:[];for(var ge=0,Ee=0,ye=[];Ee<Y.length;){se.lastIndex=S?Ee:0;var we=v(se,S?Y:Y.slice(Ee)),ke;if(we===null||(ke=y(g(se.lastIndex+(S?0:Ee)),Y.length))===ge)Ee=h(Y,Ee,te);else{if(ye.push(Y.slice(ge,Ee)),ye.length===de)return ye;for(var Te=1;Te<=we.length-1;Te++)if(ye.push(we[Te]),ye.length===de)return ye;Ee=ge=ke}}return ye.push(Y.slice(ge)),ye}]},!S)},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(h,g){return u.call(d(this),h,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(h){return u(d(this),h,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(h){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,m=c.exportTypedArrayMethod;m("filter",function(g){var v=u(f(this),g,arguments.length>1?arguments[1]:void 0);return d(this,v)})},7174:function(s,l,a){var c=a(260),u=a(2092).findIndex,d=c.aTypedArray,f=c.exportTypedArrayMethod;f("findIndex",function(h){return u(d(this),h,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(h){return u(d(this),h,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(h){u(d(this),h,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(h){return u(d(this),h,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(h){return u(d(this),h,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),m=f("iterator"),h=c.Uint8Array,g=d.values,v=d.keys,E=d.entries,k=u.aTypedArray,w=u.exportTypedArrayMethod,y=h&&h.prototype[m],R=!!y&&(y.name=="values"||y.name==null),S=function(){return g.call(k(this))};w("entries",function(){return E.call(k(this))}),w("keys",function(){return v.call(k(this))}),w("values",S,!R),w(m,S,!R)},8867:function(s,l,a){var c=a(260),u=c.aTypedArray,d=c.exportTypedArrayMethod,f=[].join;d("join",function(h){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(h){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,m=c.aTypedArrayConstructor,h=c.exportTypedArrayMethod;h("map",function(v){return u(f(this),v,arguments.length>1?arguments[1]:void 0,function(E,k){return new(m(d(E,E.constructor)))(k)})})},4483:function(s,l,a){var c=a(260),u=a(3671).right,d=c.aTypedArray,f=c.exportTypedArrayMethod;f("reduceRight",function(h){return u(d(this),h,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(h){return u(d(this),h,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 h=this,g=u(h).length,v=f(g/2),E=0,k;E<v;)k=h[E],h[E++]=h[--g],h[g]=k;return h})},3462:function(s,l,a){var c=a(260),u=a(7466),d=a(4590),f=a(7908),m=a(7293),h=c.aTypedArray,g=c.exportTypedArrayMethod,v=m(function(){new Int8Array(1).set({})});g("set",function(k){h(this);var w=d(arguments.length>1?arguments[1]:void 0,1),y=this.length,R=f(k),S=u(R.length),B=0;if(S+w>y)throw RangeError("Wrong length");for(;B<S;)this[w+B]=R[B++]},v)},678:function(s,l,a){var c=a(260),u=a(6707),d=a(7293),f=c.aTypedArray,m=c.aTypedArrayConstructor,h=c.exportTypedArrayMethod,g=[].slice,v=d(function(){new Int8Array(1).slice()});h("slice",function(k,w){for(var y=g.call(f(this),k,w),R=u(this,this.constructor),S=0,B=y.length,$=new(m(R))(B);B>S;)$[S]=y[S++];return $},v)},7462:function(s,l,a){var c=a(260),u=a(2092).some,d=c.aTypedArray,f=c.exportTypedArrayMethod;f("some",function(h){return u(d(this),h,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(h){return f.call(u(this),h)})},5021:function(s,l,a){var c=a(260),u=a(7466),d=a(1400),f=a(6707),m=c.aTypedArray,h=c.exportTypedArrayMethod;h("subarray",function(v,E){var k=m(this),w=k.length,y=d(v,w);return new(f(k,k.constructor))(k.buffer,k.byteOffset+y*k.BYTES_PER_ELEMENT,u((E===void 0?w:d(E,w))-y))})},2974:function(s,l,a){var c=a(7854),u=a(260),d=a(7293),f=c.Int8Array,m=u.aTypedArray,h=u.exportTypedArrayMethod,g=[].toLocaleString,v=[].slice,E=!!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])});h("toLocaleString",function(){return g.apply(E?v.call(m(this)):m(this),arguments)},k)},5016:function(s,l,a){var c=a(260).exportTypedArrayMethod,u=a(7293),d=a(7854),f=d.Uint8Array,m=f&&f.prototype||{},h=[].toString,g=[].join;u(function(){h.call({})})&&(h=function(){return g.call(this)});var v=m.toString!=h;c("toString",h,v)},2472:function(s,l,a){var c=a(9843);c("Uint8",function(u){return function(f,m,h){return u(this,f,m,h)}})},4747:function(s,l,a){var c=a(7854),u=a(8324),d=a(8533),f=a(8880);for(var m in u){var h=c[m],g=h&&h.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),m=a(5112),h=m("iterator"),g=m("toStringTag"),v=d.values;for(var E in u){var k=c[E],w=k&&k.prototype;if(w){if(w[h]!==v)try{f(w,h,v)}catch{w[h]=v}if(w[g]||f(w,g,E),u[E]){for(var y in d)if(w[y]!==d[y])try{f(w,y,d[y])}catch{w[y]=d[y]}}}}},1637:function(s,l,a){a(6992);var c=a(2109),u=a(5005),d=a(590),f=a(1320),m=a(2248),h=a(8003),g=a(4994),v=a(9909),E=a(5787),k=a(6656),w=a(9974),y=a(648),R=a(9670),S=a(111),B=a(30),$=a(9114),F=a(8554),T=a(1246),P=a(5112),L=u("fetch"),U=u("Headers"),K=P("iterator"),Y="URLSearchParams",Q=Y+"Iterator",te=v.set,H=v.getterFor(Y),se=v.getterFor(Q),de=/\+/g,ge=Array(4),Ee=function(D){return ge[D-1]||(ge[D-1]=RegExp("((?:%[\\da-f]{2}){"+D+"})","gi"))},ye=function(D){try{return decodeURIComponent(D)}catch{return D}},we=function(D){var V=D.replace(de," "),z=4;try{return decodeURIComponent(V)}catch{for(;z;)V=V.replace(Ee(z--),ye);return V}},ke=/[!'()~]|%20/g,Te={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},ve=function(D){return Te[D]},O=function(D){return encodeURIComponent(D).replace(ke,ve)},I=function(D,V){if(V)for(var z=V.split("&"),j=0,G,W;j<z.length;)G=z[j++],G.length&&(W=G.split("="),D.push({key:we(W.shift()),value:we(W.join("="))}))},C=function(D){this.entries.length=0,I(this.entries,D)},M=function(D,V){if(D<V)throw TypeError("Not enough arguments")},b=g(function(V,z){te(this,{type:Q,iterator:F(H(V).entries),kind:z})},"Iterator",function(){var V=se(this),z=V.kind,j=V.iterator.next(),G=j.value;return j.done||(j.value=z==="keys"?G.key:z==="values"?G.value:[G.key,G.value]),j}),x=function(){E(this,x,Y);var V=arguments.length>0?arguments[0]:void 0,z=this,j=[],G,W,J,X,q,ce,me,Oe,Pe;if(te(z,{type:Y,entries:j,updateURL:function(){},updateSearchParams:C}),V!==void 0)if(S(V))if(G=T(V),typeof G=="function")for(W=G.call(V),J=W.next;!(X=J.call(W)).done;){if(q=F(R(X.value)),ce=q.next,(me=ce.call(q)).done||(Oe=ce.call(q)).done||!ce.call(q).done)throw TypeError("Expected sequence with length 2");j.push({key:me.value+"",value:Oe.value+""})}else for(Pe in V)k(V,Pe)&&j.push({key:Pe,value:V[Pe]+""});else I(j,typeof V=="string"?V.charAt(0)==="?"?V.slice(1):V:V+"")},N=x.prototype;m(N,{append:function(V,z){M(arguments.length,2);var j=H(this);j.entries.push({key:V+"",value:z+""}),j.updateURL()},delete:function(D){M(arguments.length,1);for(var V=H(this),z=V.entries,j=D+"",G=0;G<z.length;)z[G].key===j?z.splice(G,1):G++;V.updateURL()},get:function(V){M(arguments.length,1);for(var z=H(this).entries,j=V+"",G=0;G<z.length;G++)if(z[G].key===j)return z[G].value;return null},getAll:function(V){M(arguments.length,1);for(var z=H(this).entries,j=V+"",G=[],W=0;W<z.length;W++)z[W].key===j&&G.push(z[W].value);return G},has:function(V){M(arguments.length,1);for(var z=H(this).entries,j=V+"",G=0;G<z.length;)if(z[G++].key===j)return!0;return!1},set:function(V,z){M(arguments.length,1);for(var j=H(this),G=j.entries,W=!1,J=V+"",X=z+"",q=0,ce;q<G.length;q++)ce=G[q],ce.key===J&&(W?G.splice(q--,1):(W=!0,ce.value=X));W||G.push({key:J,value:X}),j.updateURL()},sort:function(){var V=H(this),z=V.entries,j=z.slice(),G,W,J;for(z.length=0,J=0;J<j.length;J++){for(G=j[J],W=0;W<J;W++)if(z[W].key>G.key){z.splice(W,0,G);break}W===J&&z.push(G)}V.updateURL()},forEach:function(V){for(var z=H(this).entries,j=w(V,arguments.length>1?arguments[1]:void 0,3),G=0,W;G<z.length;)W=z[G++],j(W.value,W.key,this)},keys:function(){return new b(this,"keys")},values:function(){return new b(this,"values")},entries:function(){return new b(this,"entries")}},{enumerable:!0}),f(N,K,N.entries),f(N,"toString",function(){for(var V=H(this).entries,z=[],j=0,G;j<V.length;)G=V[j++],z.push(O(G.key)+"="+O(G.value));return z.join("&")},{enumerable:!0}),h(x,Y),c({global:!0,forced:!d},{URLSearchParams:x}),!d&&typeof L=="function"&&typeof U=="function"&&c({global:!0,enumerable:!0,forced:!0},{fetch:function(V){var z=[V],j,G,W;return arguments.length>1&&(j=arguments[1],S(j)&&(G=j.body,y(G)===Y&&(W=j.headers?new U(j.headers):new U,W.has("content-type")||W.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),j=B(j,{body:$(0,String(G)),headers:$(0,W)}))),z.push(j)),L.apply(this,z)}}),s.exports={URLSearchParams:x,getState:H}},285:function(s,l,a){a(8783);var c=a(2109),u=a(9781),d=a(590),f=a(7854),m=a(6048),h=a(1320),g=a(5787),v=a(6656),E=a(1574),k=a(8457),w=a(8710).codeAt,y=a(3197),R=a(8003),S=a(1637),B=a(9909),$=f.URL,F=S.URLSearchParams,T=S.getState,P=B.set,L=B.getterFor("URL"),U=Math.floor,K=Math.pow,Y="Invalid authority",Q="Invalid scheme",te="Invalid host",H="Invalid port",se=/[A-Za-z]/,de=/[\d+-.A-Za-z]/,ge=/\d/,Ee=/^(0x|0X)/,ye=/^[0-7]+$/,we=/^\d+$/,ke=/^[\dA-Fa-f]+$/,Te=/[\u0000\t\u000A\u000D #%/:?@[\\]]/,ve=/[\u0000\t\u000A\u000D #/:?@[\\]]/,O=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,I=/[\t\u000A\u000D]/g,C,M=function(A,ee){var _,ne,oe;if(ee.charAt(0)=="["){if(ee.charAt(ee.length-1)!="]"||(_=x(ee.slice(1,-1)),!_))return te;A.host=_}else if(X(A)){if(ee=y(ee),Te.test(ee)||(_=b(ee),_===null))return te;A.host=_}else{if(ve.test(ee))return te;for(_="",ne=k(ee),oe=0;oe<ne.length;oe++)_+=W(ne[oe],V);A.host=_}},b=function(A){var ee=A.split("."),_,ne,oe,Ce,pe,Re,$e;if(ee.length&&ee[ee.length-1]==""&&ee.pop(),_=ee.length,_>4)return A;for(ne=[],oe=0;oe<_;oe++){if(Ce=ee[oe],Ce=="")return A;if(pe=10,Ce.length>1&&Ce.charAt(0)=="0"&&(pe=Ee.test(Ce)?16:8,Ce=Ce.slice(pe==8?1:2)),Ce==="")Re=0;else{if(!(pe==10?we:pe==8?ye:ke).test(Ce))return A;Re=parseInt(Ce,pe)}ne.push(Re)}for(oe=0;oe<_;oe++)if(Re=ne[oe],oe==_-1){if(Re>=K(256,5-_))return null}else if(Re>255)return null;for($e=ne.pop(),oe=0;oe<ne.length;oe++)$e+=ne[oe]*K(256,3-oe);return $e},x=function(A){var ee=[0,0,0,0,0,0,0,0],_=0,ne=null,oe=0,Ce,pe,Re,$e,Ue,Tt,re,Ge=function(){return A.charAt(oe)};if(Ge()==":"){if(A.charAt(1)!=":")return;oe+=2,_++,ne=_}for(;Ge();){if(_==8)return;if(Ge()==":"){if(ne!==null)return;oe++,_++,ne=_;continue}for(Ce=pe=0;pe<4&&ke.test(Ge());)Ce=Ce*16+parseInt(Ge(),16),oe++,pe++;if(Ge()=="."){if(pe==0||(oe-=pe,_>6))return;for(Re=0;Ge();){if($e=null,Re>0)if(Ge()=="."&&Re<4)oe++;else return;if(!ge.test(Ge()))return;for(;ge.test(Ge());){if(Ue=parseInt(Ge(),10),$e===null)$e=Ue;else{if($e==0)return;$e=$e*10+Ue}if($e>255)return;oe++}ee[_]=ee[_]*256+$e,Re++,(Re==2||Re==4)&&_++}if(Re!=4)return;break}else if(Ge()==":"){if(oe++,!Ge())return}else if(Ge())return;ee[_++]=Ce}if(ne!==null)for(Tt=_-ne,_=7;_!=0&&Tt>0;)re=ee[_],ee[_--]=ee[ne+Tt-1],ee[ne+--Tt]=re;else if(_!=8)return;return ee},N=function(A){for(var ee=null,_=1,ne=null,oe=0,Ce=0;Ce<8;Ce++)A[Ce]!==0?(oe>_&&(ee=ne,_=oe),ne=null,oe=0):(ne===null&&(ne=Ce),++oe);return oe>_&&(ee=ne,_=oe),ee},D=function(A){var ee,_,ne,oe;if(typeof A=="number"){for(ee=[],_=0;_<4;_++)ee.unshift(A%256),A=U(A/256);return ee.join(".")}else if(typeof A=="object"){for(ee="",ne=N(A),_=0;_<8;_++)oe&&A[_]===0||(oe&&(oe=!1),ne===_?(ee+=_?":":"::",oe=!0):(ee+=A[_].toString(16),_<7&&(ee+=":")));return"["+ee+"]"}return A},V={},z=E({},V,{" ":1,'"':1,"<":1,">":1,"`":1}),j=E({},z,{"#":1,"?":1,"{":1,"}":1}),G=E({},j,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),W=function(A,ee){var _=w(A,0);return _>32&&_<127&&!v(ee,A)?A:encodeURIComponent(A)},J={ftp:21,file:null,http:80,https:443,ws:80,wss:443},X=function(A){return v(J,A.scheme)},q=function(A){return A.username!=""||A.password!=""},ce=function(A){return!A.host||A.cannotBeABaseURL||A.scheme=="file"},me=function(A,ee){var _;return A.length==2&&se.test(A.charAt(0))&&((_=A.charAt(1))==":"||!ee&&_=="|")},Oe=function(A){var ee;return A.length>1&&me(A.slice(0,2))&&(A.length==2||(ee=A.charAt(2))==="/"||ee==="\\"||ee==="?"||ee==="#")},Pe=function(A){var ee=A.path,_=ee.length;_&&(A.scheme!="file"||_!=1||!me(ee[0],!0))&&ee.pop()},Be=function(A){return A==="."||A.toLowerCase()==="%2e"},Me=function(A){return A=A.toLowerCase(),A===".."||A==="%2e."||A===".%2e"||A==="%2e%2e"},We={},dt={},qe={},dn={},Z={},ae={},le={},be={},Se={},Fe={},ze={},rt={},ot={},Qe={},Ut={},fn={},vt={},kt={},Zn={},Ct={},en={},Ht=function(A,ee,_,ne){var oe=_||We,Ce=0,pe="",Re=!1,$e=!1,Ue=!1,Tt,re,Ge,tn;for(_||(A.scheme="",A.username="",A.password="",A.host=null,A.port=null,A.path=[],A.query=null,A.fragment=null,A.cannotBeABaseURL=!1,ee=ee.replace(O,"")),ee=ee.replace(I,""),Tt=k(ee);Ce<=Tt.length;){switch(re=Tt[Ce],oe){case We:if(re&&se.test(re))pe+=re.toLowerCase(),oe=dt;else{if(_)return Q;oe=qe;continue}break;case dt:if(re&&(de.test(re)||re=="+"||re=="-"||re=="."))pe+=re.toLowerCase();else if(re==":"){if(_&&(X(A)!=v(J,pe)||pe=="file"&&(q(A)||A.port!==null)||A.scheme=="file"&&!A.host))return;if(A.scheme=pe,_){X(A)&&J[A.scheme]==A.port&&(A.port=null);return}pe="",A.scheme=="file"?oe=Qe:X(A)&&ne&&ne.scheme==A.scheme?oe=dn:X(A)?oe=be:Tt[Ce+1]=="/"?(oe=Z,Ce++):(A.cannotBeABaseURL=!0,A.path.push(""),oe=Zn)}else{if(_)return Q;pe="",oe=qe,Ce=0;continue}break;case qe:if(!ne||ne.cannotBeABaseURL&&re!="#")return Q;if(ne.cannotBeABaseURL&&re=="#"){A.scheme=ne.scheme,A.path=ne.path.slice(),A.query=ne.query,A.fragment="",A.cannotBeABaseURL=!0,oe=en;break}oe=ne.scheme=="file"?Qe:ae;continue;case dn:if(re=="/"&&Tt[Ce+1]=="/")oe=Se,Ce++;else{oe=ae;continue}break;case Z:if(re=="/"){oe=Fe;break}else{oe=kt;continue}case ae:if(A.scheme=ne.scheme,re==C)A.username=ne.username,A.password=ne.password,A.host=ne.host,A.port=ne.port,A.path=ne.path.slice(),A.query=ne.query;else if(re=="/"||re=="\\"&&X(A))oe=le;else if(re=="?")A.username=ne.username,A.password=ne.password,A.host=ne.host,A.port=ne.port,A.path=ne.path.slice(),A.query="",oe=Ct;else if(re=="#")A.username=ne.username,A.password=ne.password,A.host=ne.host,A.port=ne.port,A.path=ne.path.slice(),A.query=ne.query,A.fragment="",oe=en;else{A.username=ne.username,A.password=ne.password,A.host=ne.host,A.port=ne.port,A.path=ne.path.slice(),A.path.pop(),oe=kt;continue}break;case le:if(X(A)&&(re=="/"||re=="\\"))oe=Se;else if(re=="/")oe=Fe;else{A.username=ne.username,A.password=ne.password,A.host=ne.host,A.port=ne.port,oe=kt;continue}break;case be:if(oe=Se,re!="/"||pe.charAt(Ce+1)!="/")continue;Ce++;break;case Se:if(re!="/"&&re!="\\"){oe=Fe;continue}break;case Fe:if(re=="@"){Re&&(pe="%40"+pe),Re=!0,Ge=k(pe);for(var ji=0;ji<Ge.length;ji++){var yl=Ge[ji];if(yl==":"&&!Ue){Ue=!0;continue}var bl=W(yl,G);Ue?A.password+=bl:A.username+=bl}pe=""}else if(re==C||re=="/"||re=="?"||re=="#"||re=="\\"&&X(A)){if(Re&&pe=="")return Y;Ce-=k(pe).length+1,pe="",oe=ze}else pe+=re;break;case ze:case rt:if(_&&A.scheme=="file"){oe=fn;continue}else if(re==":"&&!$e){if(pe=="")return te;if(tn=M(A,pe),tn)return tn;if(pe="",oe=ot,_==rt)return}else if(re==C||re=="/"||re=="?"||re=="#"||re=="\\"&&X(A)){if(X(A)&&pe=="")return te;if(_&&pe==""&&(q(A)||A.port!==null))return;if(tn=M(A,pe),tn)return tn;if(pe="",oe=vt,_)return;continue}else re=="["?$e=!0:re=="]"&&($e=!1),pe+=re;break;case ot:if(ge.test(re))pe+=re;else if(re==C||re=="/"||re=="?"||re=="#"||re=="\\"&&X(A)||_){if(pe!=""){var Wi=parseInt(pe,10);if(Wi>65535)return H;A.port=X(A)&&Wi===J[A.scheme]?null:Wi,pe=""}if(_)return;oe=vt;continue}else return H;break;case Qe:if(A.scheme="file",re=="/"||re=="\\")oe=Ut;else if(ne&&ne.scheme=="file")if(re==C)A.host=ne.host,A.path=ne.path.slice(),A.query=ne.query;else if(re=="?")A.host=ne.host,A.path=ne.path.slice(),A.query="",oe=Ct;else if(re=="#")A.host=ne.host,A.path=ne.path.slice(),A.query=ne.query,A.fragment="",oe=en;else{Oe(Tt.slice(Ce).join(""))||(A.host=ne.host,A.path=ne.path.slice(),Pe(A)),oe=kt;continue}else{oe=kt;continue}break;case Ut:if(re=="/"||re=="\\"){oe=fn;break}ne&&ne.scheme=="file"&&!Oe(Tt.slice(Ce).join(""))&&(me(ne.path[0],!0)?A.path.push(ne.path[0]):A.host=ne.host),oe=kt;continue;case fn:if(re==C||re=="/"||re=="\\"||re=="?"||re=="#"){if(!_&&me(pe))oe=kt;else if(pe==""){if(A.host="",_)return;oe=vt}else{if(tn=M(A,pe),tn)return tn;if(A.host=="localhost"&&(A.host=""),_)return;pe="",oe=vt}continue}else pe+=re;break;case vt:if(X(A)){if(oe=kt,re!="/"&&re!="\\")continue}else if(!_&&re=="?")A.query="",oe=Ct;else if(!_&&re=="#")A.fragment="",oe=en;else if(re!=C&&(oe=kt,re!="/"))continue;break;case kt:if(re==C||re=="/"||re=="\\"&&X(A)||!_&&(re=="?"||re=="#")){if(Me(pe)?(Pe(A),re!="/"&&!(re=="\\"&&X(A))&&A.path.push("")):Be(pe)?re!="/"&&!(re=="\\"&&X(A))&&A.path.push(""):(A.scheme=="file"&&!A.path.length&&me(pe)&&(A.host&&(A.host=""),pe=pe.charAt(0)+":"),A.path.push(pe)),pe="",A.scheme=="file"&&(re==C||re=="?"||re=="#"))for(;A.path.length>1&&A.path[0]==="";)A.path.shift();re=="?"?(A.query="",oe=Ct):re=="#"&&(A.fragment="",oe=en)}else pe+=W(re,j);break;case Zn:re=="?"?(A.query="",oe=Ct):re=="#"?(A.fragment="",oe=en):re!=C&&(A.path[0]+=W(re,V));break;case Ct:!_&&re=="#"?(A.fragment="",oe=en):re!=C&&(re=="'"&&X(A)?A.query+="%27":re=="#"?A.query+="%23":A.query+=W(re,V));break;case en:re!=C&&(A.fragment+=W(re,z));break}Ce++}},Nn=function(ee){var _=g(this,Nn,"URL"),ne=arguments.length>1?arguments[1]:void 0,oe=String(ee),Ce=P(_,{type:"URL"}),pe,Re;if(ne!==void 0){if(ne instanceof Nn)pe=L(ne);else if(Re=Ht(pe={},String(ne)),Re)throw TypeError(Re)}if(Re=Ht(Ce,oe,null,pe),Re)throw TypeError(Re);var $e=Ce.searchParams=new F,Ue=T($e);Ue.updateSearchParams(Ce.query),Ue.updateURL=function(){Ce.query=String($e)||null},u||(_.href=lo.call(_),_.origin=il.call(_),_.protocol=sl.call(_),_.username=al.call(_),_.password=ll.call(_),_.host=cl.call(_),_.hostname=ul.call(_),_.port=dl.call(_),_.pathname=fl.call(_),_.search=pl.call(_),_.searchParams=hl.call(_),_.hash=ml.call(_))},Hi=Nn.prototype,lo=function(){var A=L(this),ee=A.scheme,_=A.username,ne=A.password,oe=A.host,Ce=A.port,pe=A.path,Re=A.query,$e=A.fragment,Ue=ee+":";return oe!==null?(Ue+="//",q(A)&&(Ue+=_+(ne?":"+ne:"")+"@"),Ue+=D(oe),Ce!==null&&(Ue+=":"+Ce)):ee=="file"&&(Ue+="//"),Ue+=A.cannotBeABaseURL?pe[0]:pe.length?"/"+pe.join("/"):"",Re!==null&&(Ue+="?"+Re),$e!==null&&(Ue+="#"+$e),Ue},il=function(){var A=L(this),ee=A.scheme,_=A.port;if(ee=="blob")try{return new URL(ee.path[0]).origin}catch{return"null"}return ee=="file"||!X(A)?"null":ee+"://"+D(A.host)+(_!==null?":"+_:"")},sl=function(){return L(this).scheme+":"},al=function(){return L(this).username},ll=function(){return L(this).password},cl=function(){var A=L(this),ee=A.host,_=A.port;return ee===null?"":_===null?D(ee):D(ee)+":"+_},ul=function(){var A=L(this).host;return A===null?"":D(A)},dl=function(){var A=L(this).port;return A===null?"":String(A)},fl=function(){var A=L(this),ee=A.path;return A.cannotBeABaseURL?ee[0]:ee.length?"/"+ee.join("/"):""},pl=function(){var A=L(this).query;return A?"?"+A:""},hl=function(){return L(this).searchParams},ml=function(){var A=L(this).fragment;return A?"#"+A:""},wt=function(A,ee){return{get:A,set:ee,configurable:!0,enumerable:!0}};if(u&&m(Hi,{href:wt(lo,function(A){var ee=L(this),_=String(A),ne=Ht(ee,_);if(ne)throw TypeError(ne);T(ee.searchParams).updateSearchParams(ee.query)}),origin:wt(il),protocol:wt(sl,function(A){var ee=L(this);Ht(ee,String(A)+":",We)}),username:wt(al,function(A){var ee=L(this),_=k(String(A));if(!ce(ee)){ee.username="";for(var ne=0;ne<_.length;ne++)ee.username+=W(_[ne],G)}}),password:wt(ll,function(A){var ee=L(this),_=k(String(A));if(!ce(ee)){ee.password="";for(var ne=0;ne<_.length;ne++)ee.password+=W(_[ne],G)}}),host:wt(cl,function(A){var ee=L(this);ee.cannotBeABaseURL||Ht(ee,String(A),ze)}),hostname:wt(ul,function(A){var ee=L(this);ee.cannotBeABaseURL||Ht(ee,String(A),rt)}),port:wt(dl,function(A){var ee=L(this);ce(ee)||(A=String(A),A==""?ee.port=null:Ht(ee,A,ot))}),pathname:wt(fl,function(A){var ee=L(this);ee.cannotBeABaseURL||(ee.path=[],Ht(ee,A+"",vt))}),search:wt(pl,function(A){var ee=L(this);A=String(A),A==""?ee.query=null:(A.charAt(0)=="?"&&(A=A.slice(1)),ee.query="",Ht(ee,A,Ct)),T(ee.searchParams).updateSearchParams(ee.query)}),searchParams:wt(hl),hash:wt(ml,function(A){var ee=L(this);if(A=String(A),A==""){ee.fragment=null;return}A.charAt(0)=="#"&&(A=A.slice(1)),ee.fragment="",Ht(ee,A,en)})}),h(Hi,"toJSON",function(){return lo.call(this)},{enumerable:!0}),h(Hi,"toString",function(){return lo.call(this)},{enumerable:!0}),$){var gl=$.createObjectURL,vl=$.revokeObjectURL;gl&&h(Nn,"createObjectURL",function(ee){return gl.apply($,arguments)}),vl&&h(Nn,"revokeObjectURL",function(ee){return vl.apply($,arguments)})}R(Nn,"URL"),c({global:!0,forced:!d,sham:!u},{URL:Nn})}},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 H},default:function(){return ve}}),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(O,I){var C;if(typeof Symbol>"u"||O[Symbol.iterator]==null){if(Array.isArray(O)||(C=l(O))||I&&O&&typeof O.length=="number"){C&&(O=C);var M=0,b=function(){};return{s:b,n:function(){return M>=O.length?{done:!0}:{done:!1,value:O[M++]}},e:function(z){throw z},f:b}}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,N=!1,D;return{s:function(){C=O[Symbol.iterator]()},n:function(){var z=C.next();return x=z.done,z},e:function(z){N=!0,D=z},f:function(){try{!x&&C.return!=null&&C.return()}finally{if(N)throw D}}}}function l(O,I){if(O){if(typeof O=="string")return a(O,I);var C=Object.prototype.toString.call(O).slice(8,-1);if(C==="Object"&&O.constructor&&(C=O.constructor.name),C==="Map"||C==="Set")return Array.from(O);if(C==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(C))return a(O,I)}}function a(O,I){(I==null||I>O.length)&&(I=O.length);for(var C=0,M=new Array(I);C<I;C++)M[C]=O[C];return M}function c(O,I){if(!(O instanceof I))throw new TypeError("Cannot call a class as a function")}function u(O,I){for(var C=0;C<I.length;C++){var M=I[C];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(O,M.key,M)}}function d(O,I,C){return I&&u(O.prototype,I),C&&u(O,C),O}var f=function(){function O(){c(this,O)}return d(O,[{key:"on",value:function(C,M){return this._callbacks=this._callbacks||{},this._callbacks[C]||(this._callbacks[C]=[]),this._callbacks[C].push(M),this}},{key:"emit",value:function(C){this._callbacks=this._callbacks||{};for(var M=this._callbacks[C],b=arguments.length,x=new Array(b>1?b-1:0),N=1;N<b;N++)x[N-1]=arguments[N];if(M){var D=s(M,!0),V;try{for(D.s();!(V=D.n()).done;){var z=V.value;z.apply(this,x)}}catch(j){D.e(j)}finally{D.f()}}return this.element&&this.element.dispatchEvent(this.makeEvent("dropzone:"+C,{args:x})),this}},{key:"makeEvent",value:function(C,M){var b={bubbles:!0,cancelable:!0,detail:M};if(typeof window.CustomEvent=="function")return new CustomEvent(C,b);var x=document.createEvent("CustomEvent");return x.initCustomEvent(C,b.bubbles,b.cancelable,b.detail),x}},{key:"off",value:function(C,M){if(!this._callbacks||arguments.length===0)return this._callbacks={},this;var b=this._callbacks[C];if(!b)return this;if(arguments.length===1)return delete this._callbacks[C],this;for(var x=0;x<b.length;x++){var N=b[x];if(N===M){b.splice(x,1);break}}return this}}]),O}(),m='<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> ',h=m;function g(O,I){var C;if(typeof Symbol>"u"||O[Symbol.iterator]==null){if(Array.isArray(O)||(C=v(O))||I&&O&&typeof O.length=="number"){C&&(O=C);var M=0,b=function(){};return{s:b,n:function(){return M>=O.length?{done:!0}:{done:!1,value:O[M++]}},e:function(z){throw z},f:b}}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,N=!1,D;return{s:function(){C=O[Symbol.iterator]()},n:function(){var z=C.next();return x=z.done,z},e:function(z){N=!0,D=z},f:function(){try{!x&&C.return!=null&&C.return()}finally{if(N)throw D}}}}function v(O,I){if(O){if(typeof O=="string")return E(O,I);var C=Object.prototype.toString.call(O).slice(8,-1);if(C==="Object"&&O.constructor&&(C=O.constructor.name),C==="Map"||C==="Set")return Array.from(O);if(C==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(C))return E(O,I)}}function E(O,I){(I==null||I>O.length)&&(I=O.length);for(var C=0,M=new Array(I);C<I;C++)M[C]=O[C];return M}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(I,C,M){if(M)return{dzuuid:M.file.upload.uuid,dzchunkindex:M.index,dztotalfilesize:M.file.size,dzchunksize:this.options.chunkSize,dztotalchunkcount:M.file.upload.totalChunkCount,dzchunkbyteoffset:M.index*this.options.chunkSize}},accept:function(I,C){return C()},chunksUploaded:function(I,C){C()},fallback:function(){var I;this.element.className="".concat(this.element.className," dz-browser-not-supported");var C=g(this.element.getElementsByTagName("div"),!0),M;try{for(C.s();!(M=C.n()).done;){var b=M.value;if(/(^| )dz-message($| )/.test(b.className)){I=b,b.className="dz-message";break}}}catch(N){C.e(N)}finally{C.f()}I||(I=H.createElement('<div class="dz-message"><span></span></div>'),this.element.appendChild(I));var x=I.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(I,C,M,b){var x={srcX:0,srcY:0,srcWidth:I.width,srcHeight:I.height},N=I.width/I.height;C==null&&M==null?(C=x.srcWidth,M=x.srcHeight):C==null?C=M*N:M==null&&(M=C/N),C=Math.min(C,x.srcWidth),M=Math.min(M,x.srcHeight);var D=C/M;if(x.srcWidth>C||x.srcHeight>M)if(b==="crop")N>D?(x.srcHeight=I.height,x.srcWidth=x.srcHeight*D):(x.srcWidth=I.width,x.srcHeight=x.srcWidth/D);else if(b==="contain")N>D?M=C/N:C=M*N;else throw new Error("Unknown resizeMethod '".concat(b,"'"));return x.srcX=(I.width-x.srcWidth)/2,x.srcY=(I.height-x.srcHeight)/2,x.trgWidth=C,x.trgHeight=M,x},transformFile:function(I,C){return(this.options.resizeWidth||this.options.resizeHeight)&&I.type.match(/image.*/)?this.resizeImage(I,this.options.resizeWidth,this.options.resizeHeight,this.options.resizeMethod,C):C(I)},previewTemplate:h,drop:function(I){return this.element.classList.remove("dz-drag-hover")},dragstart:function(I){},dragend:function(I){return this.element.classList.remove("dz-drag-hover")},dragenter:function(I){return this.element.classList.add("dz-drag-hover")},dragover:function(I){return this.element.classList.add("dz-drag-hover")},dragleave:function(I){return this.element.classList.remove("dz-drag-hover")},paste:function(I){},reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(I){var C=this;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer&&!this.options.disablePreviews){I.previewElement=H.createElement(this.options.previewTemplate.trim()),I.previewTemplate=I.previewElement,this.previewsContainer.appendChild(I.previewElement);var M=g(I.previewElement.querySelectorAll("[data-dz-name]"),!0),b;try{for(M.s();!(b=M.n()).done;){var x=b.value;x.textContent=I.name}}catch(W){M.e(W)}finally{M.f()}var N=g(I.previewElement.querySelectorAll("[data-dz-size]"),!0),D;try{for(N.s();!(D=N.n()).done;)x=D.value,x.innerHTML=this.filesize(I.size)}catch(W){N.e(W)}finally{N.f()}this.options.addRemoveLinks&&(I._removeLink=H.createElement('<a class="dz-remove" href="javascript:undefined;" data-dz-remove>'.concat(this.options.dictRemoveFile,"</a>")),I.previewElement.appendChild(I._removeLink));var V=function(J){return J.preventDefault(),J.stopPropagation(),I.status===H.UPLOADING?H.confirm(C.options.dictCancelUploadConfirmation,function(){return C.removeFile(I)}):C.options.dictRemoveFileConfirmation?H.confirm(C.options.dictRemoveFileConfirmation,function(){return C.removeFile(I)}):C.removeFile(I)},z=g(I.previewElement.querySelectorAll("[data-dz-remove]"),!0),j;try{for(z.s();!(j=z.n()).done;){var G=j.value;G.addEventListener("click",V)}}catch(W){z.e(W)}finally{z.f()}}},removedfile:function(I){return I.previewElement!=null&&I.previewElement.parentNode!=null&&I.previewElement.parentNode.removeChild(I.previewElement),this._updateMaxFilesReachedClass()},thumbnail:function(I,C){if(I.previewElement){I.previewElement.classList.remove("dz-file-preview");var M=g(I.previewElement.querySelectorAll("[data-dz-thumbnail]"),!0),b;try{for(M.s();!(b=M.n()).done;){var x=b.value;x.alt=I.name,x.src=C}}catch(N){M.e(N)}finally{M.f()}return setTimeout(function(){return I.previewElement.classList.add("dz-image-preview")},1)}},error:function(I,C){if(I.previewElement){I.previewElement.classList.add("dz-error"),typeof C!="string"&&C.error&&(C=C.error);var M=g(I.previewElement.querySelectorAll("[data-dz-errormessage]"),!0),b;try{for(M.s();!(b=M.n()).done;){var x=b.value;x.textContent=C}}catch(N){M.e(N)}finally{M.f()}}},errormultiple:function(){},processing:function(I){if(I.previewElement&&(I.previewElement.classList.add("dz-processing"),I._removeLink))return I._removeLink.innerHTML=this.options.dictCancelUpload},processingmultiple:function(){},uploadprogress:function(I,C,M){if(I.previewElement){var b=g(I.previewElement.querySelectorAll("[data-dz-uploadprogress]"),!0),x;try{for(b.s();!(x=b.n()).done;){var N=x.value;N.nodeName==="PROGRESS"?N.value=C:N.style.width="".concat(C,"%")}}catch(D){b.e(D)}finally{b.f()}}},totaluploadprogress:function(){},sending:function(){},sendingmultiple:function(){},success:function(I){if(I.previewElement)return I.previewElement.classList.add("dz-success")},successmultiple:function(){},canceled:function(I){return this.emit("error",I,this.options.dictUploadCanceled)},canceledmultiple:function(){},complete:function(I){if(I._removeLink&&(I._removeLink.innerHTML=this.options.dictRemoveFile),I.previewElement)return I.previewElement.classList.add("dz-complete")},completemultiple:function(){},maxfilesexceeded:function(){},maxfilesreached:function(){},queuecomplete:function(){},addedfiles:function(){}},w=k;function y(O){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?y=function(C){return typeof C}:y=function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C},y(O)}function R(O,I){var C;if(typeof Symbol>"u"||O[Symbol.iterator]==null){if(Array.isArray(O)||(C=S(O))||I&&O&&typeof O.length=="number"){C&&(O=C);var M=0,b=function(){};return{s:b,n:function(){return M>=O.length?{done:!0}:{done:!1,value:O[M++]}},e:function(z){throw z},f:b}}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,N=!1,D;return{s:function(){C=O[Symbol.iterator]()},n:function(){var z=C.next();return x=z.done,z},e:function(z){N=!0,D=z},f:function(){try{!x&&C.return!=null&&C.return()}finally{if(N)throw D}}}}function S(O,I){if(O){if(typeof O=="string")return B(O,I);var C=Object.prototype.toString.call(O).slice(8,-1);if(C==="Object"&&O.constructor&&(C=O.constructor.name),C==="Map"||C==="Set")return Array.from(O);if(C==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(C))return B(O,I)}}function B(O,I){(I==null||I>O.length)&&(I=O.length);for(var C=0,M=new Array(I);C<I;C++)M[C]=O[C];return M}function $(O,I){if(!(O instanceof I))throw new TypeError("Cannot call a class as a function")}function F(O,I){for(var C=0;C<I.length;C++){var M=I[C];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(O,M.key,M)}}function T(O,I,C){return I&&F(O.prototype,I),C&&F(O,C),O}function P(O,I){if(typeof I!="function"&&I!==null)throw new TypeError("Super expression must either be null or a function");O.prototype=Object.create(I&&I.prototype,{constructor:{value:O,writable:!0,configurable:!0}}),I&&L(O,I)}function L(O,I){return L=Object.setPrototypeOf||function(M,b){return M.__proto__=b,M},L(O,I)}function U(O){var I=Q();return function(){var M=te(O),b;if(I){var x=te(this).constructor;b=Reflect.construct(M,arguments,x)}else b=M.apply(this,arguments);return K(this,b)}}function K(O,I){return I&&(y(I)==="object"||typeof I=="function")?I:Y(O)}function Y(O){if(O===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O}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 te(O){return te=Object.setPrototypeOf?Object.getPrototypeOf:function(C){return C.__proto__||Object.getPrototypeOf(C)},te(O)}var H=function(O){P(C,O);var I=U(C);function C(M,b){var x;$(this,C),x=I.call(this);var N,D;if(x.element=M,x.version=C.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.");C.instances.push(Y(x)),x.element.dropzone=Y(x);var V=(D=C.optionsForElement(x.element))!=null?D:{};if(x.options=C.extend({},w,V,b??{}),x.options.previewTemplate=x.options.previewTemplate.replace(/\n*/g,""),x.options.forceFallback||!C.isBrowserSupported())return K(x,x.options.fallback.call(Y(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(z){return x.options.renameFilename.call(Y(x),z.name,z)}),typeof x.options.method=="string"&&(x.options.method=x.options.method.toUpperCase()),(N=x.getExistingFallback())&&N.parentNode&&N.parentNode.removeChild(N),x.options.previewsContainer!==!1&&(x.options.previewsContainer?x.previewsContainer=C.getElement(x.options.previewsContainer,"previewsContainer"):x.previewsContainer=x.element),x.options.clickable&&(x.options.clickable===!0?x.clickableElements=[x.element]:x.clickableElements=C.getElements(x.options.clickable,"clickable")),x.init(),x}return T(C,[{key:"getAcceptedFiles",value:function(){return this.files.filter(function(b){return b.accepted}).map(function(b){return b})}},{key:"getRejectedFiles",value:function(){return this.files.filter(function(b){return!b.accepted}).map(function(b){return b})}},{key:"getFilesWithStatus",value:function(b){return this.files.filter(function(x){return x.status===b}).map(function(x){return x})}},{key:"getQueuedFiles",value:function(){return this.getFilesWithStatus(C.QUEUED)}},{key:"getUploadingFiles",value:function(){return this.getFilesWithStatus(C.UPLOADING)}},{key:"getAddedFiles",value:function(){return this.getFilesWithStatus(C.ADDED)}},{key:"getActiveFiles",value:function(){return this.files.filter(function(b){return b.status===C.UPLOADING||b.status===C.QUEUED}).map(function(b){return b})}},{key:"init",value:function(){var b=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(C.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 G(){b.hiddenFileInput&&b.hiddenFileInput.parentNode.removeChild(b.hiddenFileInput),b.hiddenFileInput=document.createElement("input"),b.hiddenFileInput.setAttribute("type","file"),(b.options.maxFiles===null||b.options.maxFiles>1)&&b.hiddenFileInput.setAttribute("multiple","multiple"),b.hiddenFileInput.className="dz-hidden-input",b.options.acceptedFiles!==null&&b.hiddenFileInput.setAttribute("accept",b.options.acceptedFiles),b.options.capture!==null&&b.hiddenFileInput.setAttribute("capture",b.options.capture),b.hiddenFileInput.setAttribute("tabindex","-1"),b.hiddenFileInput.style.visibility="hidden",b.hiddenFileInput.style.position="absolute",b.hiddenFileInput.style.top="0",b.hiddenFileInput.style.left="0",b.hiddenFileInput.style.height="0",b.hiddenFileInput.style.width="0",C.getElement(b.options.hiddenInputContainer,"hiddenInputContainer").appendChild(b.hiddenFileInput),b.hiddenFileInput.addEventListener("change",function(){var W=b.hiddenFileInput.files;if(W.length){var J=R(W,!0),X;try{for(J.s();!(X=J.n()).done;){var q=X.value;b.addFile(q)}}catch(ce){J.e(ce)}finally{J.f()}}b.emit("addedfiles",W),G()})};x()}this.URL=window.URL!==null?window.URL:window.webkitURL;var N=R(this.events,!0),D;try{for(N.s();!(D=N.n()).done;){var V=D.value;this.on(V,this.options[V])}}catch(G){N.e(G)}finally{N.f()}this.on("uploadprogress",function(){return b.updateTotalUploadProgress()}),this.on("removedfile",function(){return b.updateTotalUploadProgress()}),this.on("canceled",function(G){return b.emit("complete",G)}),this.on("complete",function(G){if(b.getAddedFiles().length===0&&b.getUploadingFiles().length===0&&b.getQueuedFiles().length===0)return setTimeout(function(){return b.emit("queuecomplete")},0)});var z=function(W){if(W.dataTransfer.types){for(var J=0;J<W.dataTransfer.types.length;J++)if(W.dataTransfer.types[J]==="Files")return!0}return!1},j=function(W){if(z(W))return W.stopPropagation(),W.preventDefault?W.preventDefault():W.returnValue=!1};return this.listeners=[{element:this.element,events:{dragstart:function(W){return b.emit("dragstart",W)},dragenter:function(W){return j(W),b.emit("dragenter",W)},dragover:function(W){var J;try{J=W.dataTransfer.effectAllowed}catch{}return W.dataTransfer.dropEffect=J==="move"||J==="linkMove"?"move":"copy",j(W),b.emit("dragover",W)},dragleave:function(W){return b.emit("dragleave",W)},drop:function(W){return j(W),b.drop(W)},dragend:function(W){return b.emit("dragend",W)}}}],this.clickableElements.forEach(function(G){return b.listeners.push({element:G,events:{click:function(J){return(G!==b.element||J.target===b.element||C.elementInside(J.target,b.element.querySelector(".dz-message")))&&b.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,C.instances.splice(C.instances.indexOf(this),1)}},{key:"updateTotalUploadProgress",value:function(){var b,x=0,N=0,D=this.getActiveFiles();if(D.length){var V=R(this.getActiveFiles(),!0),z;try{for(V.s();!(z=V.n()).done;){var j=z.value;x+=j.upload.bytesSent,N+=j.upload.total}}catch(G){V.e(G)}finally{V.f()}b=100*x/N}else b=100;return this.emit("totaluploadprogress",b,N,x)}},{key:"_getParamName",value:function(b){return typeof this.options.paramName=="function"?this.options.paramName(b):"".concat(this.options.paramName).concat(this.options.uploadMultiple?"[".concat(b,"]"):"")}},{key:"_renameFile",value:function(b){return typeof this.options.renameFile!="function"?b.name:this.options.renameFile(b)}},{key:"getFallbackForm",value:function(){var b,x;if(b=this.getExistingFallback())return b;var N='<div class="dz-fallback">';this.options.dictFallbackText&&(N+="<p>".concat(this.options.dictFallbackText,"</p>")),N+='<input type="file" name="'.concat(this._getParamName(0),'" ').concat(this.options.uploadMultiple?'multiple="multiple"':void 0,' /><input type="submit" value="Upload!"></div>');var D=C.createElement(N);return this.element.tagName!=="FORM"?(x=C.createElement('<form action="'.concat(this.options.url,'" enctype="multipart/form-data" method="').concat(this.options.method,'"></form>')),x.appendChild(D)):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),x??D}},{key:"getExistingFallback",value:function(){for(var b=function(j){var G=R(j,!0),W;try{for(G.s();!(W=G.n()).done;){var J=W.value;if(/(^| )fallback($| )/.test(J.className))return J}}catch(X){G.e(X)}finally{G.f()}},x=0,N=["div","form"];x<N.length;x++){var D=N[x],V;if(V=b(this.element.getElementsByTagName(D)))return V}}},{key:"setupEventListeners",value:function(){return this.listeners.map(function(b){return function(){var x=[];for(var N in b.events){var D=b.events[N];x.push(b.element.addEventListener(N,D,!1))}return x}()})}},{key:"removeEventListeners",value:function(){return this.listeners.map(function(b){return function(){var x=[];for(var N in b.events){var D=b.events[N];x.push(b.element.removeEventListener(N,D,!1))}return x}()})}},{key:"disable",value:function(){var b=this;return this.clickableElements.forEach(function(x){return x.classList.remove("dz-clickable")}),this.removeEventListeners(),this.disabled=!0,this.files.map(function(x){return b.cancelUpload(x)})}},{key:"enable",value:function(){return delete this.disabled,this.clickableElements.forEach(function(b){return b.classList.add("dz-clickable")}),this.setupEventListeners()}},{key:"filesize",value:function(b){var x=0,N="b";if(b>0){for(var D=["tb","gb","mb","kb","b"],V=0;V<D.length;V++){var z=D[V],j=Math.pow(this.options.filesizeBase,4-V)/10;if(b>=j){x=b/Math.pow(this.options.filesizeBase,4-V),N=z;break}}x=Math.round(10*x)/10}return"<strong>".concat(x,"</strong> ").concat(this.options.dictFileSizeUnits[N])}},{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(b){if(b.dataTransfer){this.emit("drop",b);for(var x=[],N=0;N<b.dataTransfer.files.length;N++)x[N]=b.dataTransfer.files[N];if(x.length){var D=b.dataTransfer.items;D&&D.length&&D[0].webkitGetAsEntry!=null?this._addFilesFromItems(D):this.handleFiles(x)}this.emit("addedfiles",x)}}},{key:"paste",value:function(b){if(ke(b!=null?b.clipboardData:void 0,function(N){return N.items})!=null){this.emit("paste",b);var x=b.clipboardData.items;if(x.length)return this._addFilesFromItems(x)}}},{key:"handleFiles",value:function(b){var x=R(b,!0),N;try{for(x.s();!(N=x.n()).done;){var D=N.value;this.addFile(D)}}catch(V){x.e(V)}finally{x.f()}}},{key:"_addFilesFromItems",value:function(b){var x=this;return function(){var N=[],D=R(b,!0),V;try{for(D.s();!(V=D.n()).done;){var z=V.value,j;z.webkitGetAsEntry!=null&&(j=z.webkitGetAsEntry())?j.isFile?N.push(x.addFile(z.getAsFile())):j.isDirectory?N.push(x._addFilesFromDirectory(j,j.name)):N.push(void 0):z.getAsFile!=null&&(z.kind==null||z.kind==="file")?N.push(x.addFile(z.getAsFile())):N.push(void 0)}}catch(G){D.e(G)}finally{D.f()}return N}()}},{key:"_addFilesFromDirectory",value:function(b,x){var N=this,D=b.createReader(),V=function(G){return Te(console,"log",function(W){return W.log(G)})},z=function j(){return D.readEntries(function(G){if(G.length>0){var W=R(G,!0),J;try{for(W.s();!(J=W.n()).done;){var X=J.value;X.isFile?X.file(function(q){if(!(N.options.ignoreHiddenFiles&&q.name.substring(0,1)==="."))return q.fullPath="".concat(x,"/").concat(q.name),N.addFile(q)}):X.isDirectory&&N._addFilesFromDirectory(X,"".concat(x,"/").concat(X.name))}}catch(q){W.e(q)}finally{W.f()}j()}return null},V)};return z()}},{key:"accept",value:function(b,x){this.options.maxFilesize&&b.size>this.options.maxFilesize*1024*1024?x(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(b.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):C.isValidFile(b,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",b)):this.options.accept.call(this,b,x):x(this.options.dictInvalidFileType)}},{key:"addFile",value:function(b){var x=this;b.upload={uuid:C.uuidv4(),progress:0,total:b.size,bytesSent:0,filename:this._renameFile(b)},this.files.push(b),b.status=C.ADDED,this.emit("addedfile",b),this._enqueueThumbnail(b),this.accept(b,function(N){N?(b.accepted=!1,x._errorProcessing([b],N)):(b.accepted=!0,x.options.autoQueue&&x.enqueueFile(b)),x._updateMaxFilesReachedClass()})}},{key:"enqueueFiles",value:function(b){var x=R(b,!0),N;try{for(x.s();!(N=x.n()).done;){var D=N.value;this.enqueueFile(D)}}catch(V){x.e(V)}finally{x.f()}return null}},{key:"enqueueFile",value:function(b){var x=this;if(b.status===C.ADDED&&b.accepted===!0){if(b.status=C.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(b){var x=this;if(this.options.createImageThumbnails&&b.type.match(/image.*/)&&b.size<=this.options.maxThumbnailFilesize*1024*1024)return this._thumbnailQueue.push(b),setTimeout(function(){return x._processThumbnailQueue()},0)}},{key:"_processThumbnailQueue",value:function(){var b=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(N){return b.emit("thumbnail",x,N),b._processingThumbnail=!1,b._processThumbnailQueue()})}}},{key:"removeFile",value:function(b){if(b.status===C.UPLOADING&&this.cancelUpload(b),this.files=se(this.files,b),this.emit("removedfile",b),this.files.length===0)return this.emit("reset")}},{key:"removeAllFiles",value:function(b){b==null&&(b=!1);var x=R(this.files.slice(),!0),N;try{for(x.s();!(N=x.n()).done;){var D=N.value;(D.status!==C.UPLOADING||b)&&this.removeFile(D)}}catch(V){x.e(V)}finally{x.f()}return null}},{key:"resizeImage",value:function(b,x,N,D,V){var z=this;return this.createThumbnail(b,x,N,D,!0,function(j,G){if(G==null)return V(b);var W=z.options.resizeMimeType;W==null&&(W=b.type);var J=G.toDataURL(W,z.options.resizeQuality);return(W==="image/jpeg"||W==="image/jpg")&&(J=ye.restore(b.dataURL,J)),V(C.dataURItoBlob(J))})}},{key:"createThumbnail",value:function(b,x,N,D,V,z){var j=this,G=new FileReader;G.onload=function(){if(b.dataURL=G.result,b.type==="image/svg+xml"){z!=null&&z(G.result);return}j.createThumbnailFromUrl(b,x,N,D,V,z)},G.readAsDataURL(b)}},{key:"displayExistingFile",value:function(b,x,N,D){var V=this,z=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;if(this.emit("addedfile",b),this.emit("complete",b),!z)this.emit("thumbnail",b,x),N&&N();else{var j=function(W){V.emit("thumbnail",b,W),N&&N()};b.dataURL=x,this.createThumbnailFromUrl(b,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,this.options.fixOrientation,j,D)}}},{key:"createThumbnailFromUrl",value:function(b,x,N,D,V,z,j){var G=this,W=document.createElement("img");return j&&(W.crossOrigin=j),V=getComputedStyle(document.body).imageOrientation=="from-image"?!1:V,W.onload=function(){var J=function(q){return q(1)};return typeof EXIF<"u"&&EXIF!==null&&V&&(J=function(q){return EXIF.getData(W,function(){return q(EXIF.getTag(this,"Orientation"))})}),J(function(X){b.width=W.width,b.height=W.height;var q=G.options.resize.call(G,b,x,N,D),ce=document.createElement("canvas"),me=ce.getContext("2d");switch(ce.width=q.trgWidth,ce.height=q.trgHeight,X>4&&(ce.width=q.trgHeight,ce.height=q.trgWidth),X){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,W,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 Oe=ce.toDataURL("image/png");if(z!=null)return z(Oe,ce)})},z!=null&&(W.onerror=z),W.src=b.dataURL}},{key:"processQueue",value:function(){var b=this.options.parallelUploads,x=this.getUploadingFiles().length,N=x;if(!(x>=b)){var D=this.getQueuedFiles();if(D.length>0){if(this.options.uploadMultiple)return this.processFiles(D.slice(0,b-x));for(;N<b;){if(!D.length)return;this.processFile(D.shift()),N++}}}}},{key:"processFile",value:function(b){return this.processFiles([b])}},{key:"processFiles",value:function(b){var x=R(b,!0),N;try{for(x.s();!(N=x.n()).done;){var D=N.value;D.processing=!0,D.status=C.UPLOADING,this.emit("processing",D)}}catch(V){x.e(V)}finally{x.f()}return this.options.uploadMultiple&&this.emit("processingmultiple",b),this.uploadFiles(b)}},{key:"_getFilesWithXhr",value:function(b){return this.files.filter(function(x){return x.xhr===b}).map(function(x){return x})}},{key:"cancelUpload",value:function(b){if(b.status===C.UPLOADING){var x=this._getFilesWithXhr(b.xhr),N=R(x,!0),D;try{for(N.s();!(D=N.n()).done;){var V=D.value;V.status=C.CANCELED}}catch(W){N.e(W)}finally{N.f()}typeof b.xhr<"u"&&b.xhr.abort();var z=R(x,!0),j;try{for(z.s();!(j=z.n()).done;){var G=j.value;this.emit("canceled",G)}}catch(W){z.e(W)}finally{z.f()}this.options.uploadMultiple&&this.emit("canceledmultiple",x)}else(b.status===C.ADDED||b.status===C.QUEUED)&&(b.status=C.CANCELED,this.emit("canceled",b),this.options.uploadMultiple&&this.emit("canceledmultiple",[b]));if(this.options.autoProcessQueue)return this.processQueue()}},{key:"resolveOption",value:function(b){if(typeof b=="function"){for(var x=arguments.length,N=new Array(x>1?x-1:0),D=1;D<x;D++)N[D-1]=arguments[D];return b.apply(this,N)}return b}},{key:"uploadFile",value:function(b){return this.uploadFiles([b])}},{key:"uploadFiles",value:function(b){var x=this;this._transformFiles(b,function(N){if(x.options.chunking){var D=N[0];b[0].upload.chunked=x.options.chunking&&(x.options.forceChunking||D.size>x.options.chunkSize),b[0].upload.totalChunkCount=Math.ceil(D.size/x.options.chunkSize)}if(b[0].upload.chunked){var V=b[0],z=N[0];V.upload.chunks=[];var j=function(){for(var q=0;V.upload.chunks[q]!==void 0;)q++;if(!(q>=V.upload.totalChunkCount)){var ce=q*x.options.chunkSize,me=Math.min(ce+x.options.chunkSize,z.size),Oe={name:x._getParamName(0),data:z.webkitSlice?z.webkitSlice(ce,me):z.slice(ce,me),filename:V.upload.filename,chunkIndex:q};V.upload.chunks[q]={file:V,index:q,dataBlock:Oe,status:C.UPLOADING,progress:0,retries:0},x._uploadData(b,[Oe])}};if(V.upload.finishedChunkUpload=function(X,q){var ce=!0;X.status=C.SUCCESS,X.dataBlock=null,X.xhr=null;for(var me=0;me<V.upload.totalChunkCount;me++){if(V.upload.chunks[me]===void 0)return j();V.upload.chunks[me].status!==C.SUCCESS&&(ce=!1)}ce&&x.options.chunksUploaded(V,function(){x._finished(b,q,null)})},x.options.parallelChunkUploads)for(var G=0;G<V.upload.totalChunkCount;G++)j();else j()}else{for(var W=[],J=0;J<b.length;J++)W[J]={name:x._getParamName(J),data:N[J],filename:b[J].upload.filename};x._uploadData(b,W)}})}},{key:"_getChunk",value:function(b,x){for(var N=0;N<b.upload.totalChunkCount;N++)if(b.upload.chunks[N]!==void 0&&b.upload.chunks[N].xhr===x)return b.upload.chunks[N]}},{key:"_uploadData",value:function(b,x){var N=this,D=new XMLHttpRequest,V=R(b,!0),z;try{for(V.s();!(z=V.n()).done;){var j=z.value;j.xhr=D}}catch(le){V.e(le)}finally{V.f()}b[0].upload.chunked&&(b[0].upload.chunks[x[0].chunkIndex].xhr=D);var G=this.resolveOption(this.options.method,b),W=this.resolveOption(this.options.url,b);D.open(G,W,!0);var J=this.resolveOption(this.options.timeout,b);J&&(D.timeout=this.resolveOption(this.options.timeout,b)),D.withCredentials=!!this.options.withCredentials,D.onload=function(le){N._finishedUploading(b,D,le)},D.ontimeout=function(){N._handleUploadError(b,D,"Request timedout after ".concat(N.options.timeout/1e3," seconds"))},D.onerror=function(){N._handleUploadError(b,D)};var X=D.upload!=null?D.upload:D;X.onprogress=function(le){return N._updateFilesUploadProgress(b,D,le)};var q={Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"};this.options.headers&&C.extend(q,this.options.headers);for(var ce in q){var me=q[ce];me&&D.setRequestHeader(ce,me)}var Oe=new FormData;if(this.options.params){var Pe=this.options.params;typeof Pe=="function"&&(Pe=Pe.call(this,b,D,b[0].upload.chunked?this._getChunk(b[0],D):null));for(var Be in Pe){var Me=Pe[Be];if(Array.isArray(Me))for(var We=0;We<Me.length;We++)Oe.append(Be,Me[We]);else Oe.append(Be,Me)}}var dt=R(b,!0),qe;try{for(dt.s();!(qe=dt.n()).done;){var dn=qe.value;this.emit("sending",dn,D,Oe)}}catch(le){dt.e(le)}finally{dt.f()}this.options.uploadMultiple&&this.emit("sendingmultiple",b,D,Oe),this._addFormElementData(Oe);for(var Z=0;Z<x.length;Z++){var ae=x[Z];Oe.append(ae.name,ae.data,ae.filename)}this.submitRequest(D,Oe,b)}},{key:"_transformFiles",value:function(b,x){for(var N=this,D=[],V=0,z=function(W){N.options.transformFile.call(N,b[W],function(J){D[W]=J,++V===b.length&&x(D)})},j=0;j<b.length;j++)z(j)}},{key:"_addFormElementData",value:function(b){if(this.element.tagName==="FORM"){var x=R(this.element.querySelectorAll("input, textarea, select, button"),!0),N;try{for(x.s();!(N=x.n()).done;){var D=N.value,V=D.getAttribute("name"),z=D.getAttribute("type");if(z&&(z=z.toLowerCase()),!(typeof V>"u"||V===null))if(D.tagName==="SELECT"&&D.hasAttribute("multiple")){var j=R(D.options,!0),G;try{for(j.s();!(G=j.n()).done;){var W=G.value;W.selected&&b.append(V,W.value)}}catch(J){j.e(J)}finally{j.f()}}else(!z||z!=="checkbox"&&z!=="radio"||D.checked)&&b.append(V,D.value)}}catch(J){x.e(J)}finally{x.f()}}}},{key:"_updateFilesUploadProgress",value:function(b,x,N){if(b[0].upload.chunked){var j=b[0],G=this._getChunk(j,x);N?(G.progress=100*N.loaded/N.total,G.total=N.total,G.bytesSent=N.loaded):(G.progress=100,G.bytesSent=G.total),j.upload.progress=0,j.upload.total=0,j.upload.bytesSent=0;for(var W=0;W<j.upload.totalChunkCount;W++)j.upload.chunks[W]&&typeof j.upload.chunks[W].progress<"u"&&(j.upload.progress+=j.upload.chunks[W].progress,j.upload.total+=j.upload.chunks[W].total,j.upload.bytesSent+=j.upload.chunks[W].bytesSent);j.upload.progress=j.upload.progress/j.upload.totalChunkCount,this.emit("uploadprogress",j,j.upload.progress,j.upload.bytesSent)}else{var D=R(b,!0),V;try{for(D.s();!(V=D.n()).done;){var z=V.value;z.upload.total&&z.upload.bytesSent&&z.upload.bytesSent==z.upload.total||(N?(z.upload.progress=100*N.loaded/N.total,z.upload.total=N.total,z.upload.bytesSent=N.loaded):(z.upload.progress=100,z.upload.bytesSent=z.upload.total),this.emit("uploadprogress",z,z.upload.progress,z.upload.bytesSent))}}catch(J){D.e(J)}finally{D.f()}}}},{key:"_finishedUploading",value:function(b,x,N){var D;if(b[0].status!==C.CANCELED&&x.readyState===4){if(x.responseType!=="arraybuffer"&&x.responseType!=="blob"&&(D=x.responseText,x.getResponseHeader("content-type")&&~x.getResponseHeader("content-type").indexOf("application/json")))try{D=JSON.parse(D)}catch(V){N=V,D="Invalid JSON response from server."}this._updateFilesUploadProgress(b,x),200<=x.status&&x.status<300?b[0].upload.chunked?b[0].upload.finishedChunkUpload(this._getChunk(b[0],x),D):this._finished(b,D,N):this._handleUploadError(b,x,D)}}},{key:"_handleUploadError",value:function(b,x,N){if(b[0].status!==C.CANCELED){if(b[0].upload.chunked&&this.options.retryChunks){var D=this._getChunk(b[0],x);if(D.retries++<this.options.retryChunksLimit){this._uploadData(b,[D.dataBlock]);return}else console.warn("Retried this chunk too often. Giving up.")}this._errorProcessing(b,N||this.options.dictResponseError.replace("{{statusCode}}",x.status),x)}}},{key:"submitRequest",value:function(b,x,N){if(b.readyState!=1){console.warn("Cannot send this request because the XMLHttpRequest.readyState is not OPENED.");return}b.send(x)}},{key:"_finished",value:function(b,x,N){var D=R(b,!0),V;try{for(D.s();!(V=D.n()).done;){var z=V.value;z.status=C.SUCCESS,this.emit("success",z,x,N),this.emit("complete",z)}}catch(j){D.e(j)}finally{D.f()}if(this.options.uploadMultiple&&(this.emit("successmultiple",b,x,N),this.emit("completemultiple",b)),this.options.autoProcessQueue)return this.processQueue()}},{key:"_errorProcessing",value:function(b,x,N){var D=R(b,!0),V;try{for(D.s();!(V=D.n()).done;){var z=V.value;z.status=C.ERROR,this.emit("error",z,x,N),this.emit("complete",z)}}catch(j){D.e(j)}finally{D.f()}if(this.options.uploadMultiple&&(this.emit("errormultiple",b,x,N),this.emit("completemultiple",b)),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(b){for(var x=arguments.length,N=new Array(x>1?x-1:0),D=1;D<x;D++)N[D-1]=arguments[D];for(var V=0,z=N;V<z.length;V++){var j=z[V];for(var G in j){var W=j[G];b[G]=W}}return b}},{key:"uuidv4",value:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(b){var x=Math.random()*16|0,N=b==="x"?x:x&3|8;return N.toString(16)})}}]),C}(f);H.initClass(),H.version="5.9.3",H.options={},H.optionsForElement=function(O){if(O.getAttribute("id"))return H.options[de(O.getAttribute("id"))]},H.instances=[],H.forElement=function(O){if(typeof O=="string"&&(O=document.querySelector(O)),(O!=null?O.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 O.dropzone},H.autoDiscover=!0,H.discover=function(){var O;if(document.querySelectorAll)O=document.querySelectorAll(".dropzone");else{O=[];var I=function(M){return function(){var b=[],x=R(M,!0),N;try{for(x.s();!(N=x.n()).done;){var D=N.value;/(^| )dropzone($| )/.test(D.className)?b.push(O.push(D)):b.push(void 0)}}catch(V){x.e(V)}finally{x.f()}return b}()};I(document.getElementsByTagName("div")),I(document.getElementsByTagName("form"))}return function(){var C=[],M=R(O,!0),b;try{for(M.s();!(b=M.n()).done;){var x=b.value;H.optionsForElement(x)!==!1?C.push(new H(x)):C.push(void 0)}}catch(N){M.e(N)}finally{M.f()}return C}()},H.blockedBrowsers=[/opera.*(Macintosh|Windows Phone).*version\/12/i],H.isBrowserSupported=function(){var O=!0;if(window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if(!("classList"in document.createElement("a")))O=!1;else{H.blacklistedBrowsers!==void 0&&(H.blockedBrowsers=H.blacklistedBrowsers);var I=R(H.blockedBrowsers,!0),C;try{for(I.s();!(C=I.n()).done;){var M=C.value;if(M.test(navigator.userAgent)){O=!1;continue}}}catch(b){I.e(b)}finally{I.f()}}else O=!1;return O},H.dataURItoBlob=function(O){for(var I=atob(O.split(",")[1]),C=O.split(",")[0].split(":")[1].split(";")[0],M=new ArrayBuffer(I.length),b=new Uint8Array(M),x=0,N=I.length,D=0<=N;D?x<=N:x>=N;D?x++:x--)b[x]=I.charCodeAt(x);return new Blob([M],{type:C})};var se=function(I,C){return I.filter(function(M){return M!==C}).map(function(M){return M})},de=function(I){return I.replace(/[\-_](\w)/g,function(C){return C.charAt(1).toUpperCase()})};H.createElement=function(O){var I=document.createElement("div");return I.innerHTML=O,I.childNodes[0]},H.elementInside=function(O,I){if(O===I)return!0;for(;O=O.parentNode;)if(O===I)return!0;return!1},H.getElement=function(O,I){var C;if(typeof O=="string"?C=document.querySelector(O):O.nodeType!=null&&(C=O),C==null)throw new Error("Invalid `".concat(I,"` option provided. Please provide a CSS selector or a plain HTML element."));return C},H.getElements=function(O,I){var C,M;if(O instanceof Array){M=[];try{var b=R(O,!0),x;try{for(b.s();!(x=b.n()).done;)C=x.value,M.push(this.getElement(C,I))}catch(V){b.e(V)}finally{b.f()}}catch{M=null}}else if(typeof O=="string"){M=[];var N=R(document.querySelectorAll(O),!0),D;try{for(N.s();!(D=N.n()).done;)C=D.value,M.push(C)}catch(V){N.e(V)}finally{N.f()}}else O.nodeType!=null&&(M=[O]);if(M==null||!M.length)throw new Error("Invalid `".concat(I,"` option provided. Please provide a CSS selector, a plain HTML element or a list of those."));return M},H.confirm=function(O,I,C){if(window.confirm(O))return I();if(C!=null)return C()},H.isValidFile=function(O,I){if(!I)return!0;I=I.split(",");var C=O.type,M=C.replace(/\/.*$/,""),b=R(I,!0),x;try{for(b.s();!(x=b.n()).done;){var N=x.value;if(N=N.trim(),N.charAt(0)==="."){if(O.name.toLowerCase().indexOf(N.toLowerCase(),O.name.length-N.length)!==-1)return!0}else if(/\/\*$/.test(N)){if(M===N.replace(/\/.*$/,""))return!0}else if(C===N)return!0}}catch(D){b.e(D)}finally{b.f()}return!1},typeof jQuery<"u"&&jQuery!==null&&(jQuery.fn.dropzone=function(O){return this.each(function(){return new H(this,O)})}),H.ADDED="added",H.QUEUED="queued",H.ACCEPTED=H.QUEUED,H.UPLOADING="uploading",H.PROCESSING=H.UPLOADING,H.CANCELED="canceled",H.ERROR="error",H.SUCCESS="success";var ge=function(I){I.naturalWidth;var C=I.naturalHeight,M=document.createElement("canvas");M.width=1,M.height=C;var b=M.getContext("2d");b.drawImage(I,0,0);for(var x=b.getImageData(1,0,1,C),N=x.data,D=0,V=C,z=C;z>D;){var j=N[(z-1)*4+3];j===0?V=z:D=z,z=V+D>>1}var G=z/C;return G===0?1:G},Ee=function(I,C,M,b,x,N,D,V,z,j){var G=ge(C);return I.drawImage(C,M,b,x,N,D,V,z,j/G)},ye=function(){function O(){$(this,O)}return T(O,null,[{key:"initClass",value:function(){this.KEY_STR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}},{key:"encode64",value:function(C){for(var M="",b=void 0,x=void 0,N="",D=void 0,V=void 0,z=void 0,j="",G=0;b=C[G++],x=C[G++],N=C[G++],D=b>>2,V=(b&3)<<4|x>>4,z=(x&15)<<2|N>>6,j=N&63,isNaN(x)?z=j=64:isNaN(N)&&(j=64),M=M+this.KEY_STR.charAt(D)+this.KEY_STR.charAt(V)+this.KEY_STR.charAt(z)+this.KEY_STR.charAt(j),b=x=N="",D=V=z=j="",G<C.length;);return M}},{key:"restore",value:function(C,M){if(!C.match("data:image/jpeg;base64,"))return M;var b=this.decode64(C.replace("data:image/jpeg;base64,","")),x=this.slice2Segments(b),N=this.exifManipulation(M,x);return"data:image/jpeg;base64,".concat(this.encode64(N))}},{key:"exifManipulation",value:function(C,M){var b=this.getExifArray(M),x=this.insertExif(C,b),N=new Uint8Array(x);return N}},{key:"getExifArray",value:function(C){for(var M=void 0,b=0;b<C.length;){if(M=C[b],M[0]===255&M[1]===225)return M;b++}return[]}},{key:"insertExif",value:function(C,M){var b=C.replace("data:image/jpeg;base64,",""),x=this.decode64(b),N=x.indexOf(255,3),D=x.slice(0,N),V=x.slice(N),z=D;return z=z.concat(M),z=z.concat(V),z}},{key:"slice2Segments",value:function(C){for(var M=0,b=[];;){var x;if(C[M]===255&C[M+1]===218)break;if(C[M]===255&C[M+1]===216)M+=2;else{x=C[M+2]*256+C[M+3];var N=M+x+2,D=C.slice(M,N);b.push(D),M=N}if(M>C.length)break}return b}},{key:"decode64",value:function(C){var M=void 0,b=void 0,x="",N=void 0,D=void 0,V=void 0,z="",j=0,G=[],W=/[^A-Za-z0-9\+\/\=]/g;for(W.exec(C)&&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.`),C=C.replace(/[^A-Za-z0-9\+\/\=]/g,"");N=this.KEY_STR.indexOf(C.charAt(z++)),I=this.KEY_STR.indexOf(C.charAt(z++)),R=this.KEY_STR.indexOf(C.charAt(z++)),L=this.KEY_STR.indexOf(C.charAt(z++)),O=N<<2|I>>4,y=(I&15)<<4|R>>2,E=(R&3)<<6|L,W.push(O),R!==64&&W.push(y),L!==64&&W.push(E),O=y=E="",N=I=R=L="",z<C.length;);return W}}]),k}();Ee.initClass();var ke=function(M,C){var O=!1,y=!0,E=M.document,N=E.documentElement,I=E.addEventListener?"addEventListener":"attachEvent",R=E.addEventListener?"removeEventListener":"detachEvent",L=E.addEventListener?"":"on",z=function U(K){if(!(K.type==="readystatechange"&&E.readyState!=="complete")&&((K.type==="load"?M:E)[R](L+K.type,U,!1),!O&&(O=!0)))return C.call(M,K.type||K)},W=function U(){try{N.doScroll("left")}catch{setTimeout(U,50);return}return z("poll")};if(E.readyState!=="complete"){if(E.createEventObject&&N.doScroll){try{y=!M.frameElement}catch{}y&&W()}return E[I](L+"DOMContentLoaded",z,!1),E[I](L+"readystatechange",z,!1),M[I](L+"load",z,!1)}};j._autoDiscoverFunction=function(){if(j.autoDiscover)return j.discover()},ke(window,j._autoDiscoverFunction);function Ae(k,M){return typeof k<"u"&&k!==null?M(k):void 0}function Oe(k,M,C){if(typeof k<"u"&&k!==null&&typeof k[M]=="function")return C(k,M)}window.Dropzone=j;var ve=j}(),o}()})})(Af);var Xv=Af.exports;const Wc=Jv(Xv),Qv={class:"fallback"},Zv=m.createElementVNode("input",{id:"file",type:"file",name:"file",multiple:""},null,-1),qv={for:"file"},e1={class:"dz-message","data-dz-message":""},t1={id:"bd-dropzone-theme",style:{display:"none"}},n1={class:"dz-preview dz-file-preview"},r1={class:"dz-details"},i1=m.createElementVNode("img",{"data-dz-thumbnail":"",class:"dz-image"},null,-1),o1=m.createElementVNode("div",{class:"dz-filename"},[m.createElementVNode("small",{"data-dz-name":""})],-1),s1=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),a1={class:"dz-success-mark"},l1={class:"dz-error-message text-danger"},c1=m.createElementVNode("small",{"data-dz-errormessage":""},null,-1),wf=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:bs.PRIMARY,size:at.SM})),i=pr(t,"modelValue",e);let o=null;Wc.autoDiscover=!1,m.watch(()=>t.modelValue,()=>{s()}),m.onMounted(()=>{document.getElementById("dropzone")&&l()});const s=()=>{o&&(o.destroy(),l())},l=()=>{var p;o=new Wc("#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:(p=document.querySelector("#bd-dropzone-theme"))==null?void 0:p.innerHTML}),o.on("error",c),o.on("success",a),o.on("removedfile",d)},a=function(p,h){var g;i.value.push({UUID:(g=p.upload)==null?void 0:g.uuid,CorrelationId:h.CorrelationId,Naam:h.Naam}),u(p)},c=function(p){u(p)},u=function(p){const h=p.name;if(!(h.endsWith(".png")||h.endsWith(".jpg")||h.endsWith(".jpeg")||h.endsWith(".gif"))){const g=p.previewElement.getElementsByClassName("icon-file"),v=p.previewElement.getElementsByClassName("dz-image");g[0].classList.remove("d-none"),v[0].classList.add("d-none")}},d=function(p){const h=i.value.findIndex(g=>{var v,S;return((v=g.upload)==null?void 0:v.uuid)===((S=p.upload)==null?void 0:S.uuid)});h!==-1&&i.value.splice(h,1)},f=m.computed(()=>t.tag??"form");return(p,h)=>(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",Qv,[Zv,m.createTextVNode(" test "),m.createElementVNode("label",qv,[m.createVNode(m.unref(Si)),m.createTextVNode(" "+m.toDisplayString(t.buttonText),1)])]),m.createElementVNode("div",e1,[m.createVNode(m.unref(Vt),m.normalizeProps(m.guardReactiveProps(r.value)),{default:m.withCtx(()=>[m.createVNode(m.unref(Si)),m.createTextVNode(" "+m.toDisplayString(t.buttonText),1)]),_:1},16)])]),_:1})),m.createElementVNode("div",t1,[m.createElementVNode("div",n1,[m.createElementVNode("div",r1,[i1,m.createVNode(m.unref(Sl),{"data-dz-thumbnail":"",class:"d-none"}),o1,m.createVNode(m.unref(Vt),{class:"dz-remove",alt:"Click me to remove the file.","data-dz-remove":""},{default:m.withCtx(()=>[m.createVNode(m.unref(El))]),_:1})]),s1,m.createElementVNode("div",a1,[m.createVNode(m.unref(ms))]),m.createElementVNode("div",l1,[m.createVNode(m.unref(gs)),c1])])])],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,i=r.find(n),o=r.content.slice();return i==-1?o.push(t||n,e):(o[i+1]=e,t&&(o[i]=t)),new Ze(o)},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),i=r.content.slice(),o=r.find(n);return i.splice(o==-1?i.length:o,0,e,t),new Ze(i)},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 kf(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let i=n.child(r),o=e.child(r);if(i==o){t+=i.nodeSize;continue}if(!i.sameMarkup(o))return t;if(i.isText&&i.text!=o.text){for(let s=0;i.text[s]==o.text[s];s++)t++;return t}if(i.content.size||o.content.size){let s=kf(i.content,o.content,t+1);if(s!=null)return s}t+=i.nodeSize}}function Of(n,e,t,r){for(let i=n.childCount,o=e.childCount;;){if(i==0||o==0)return i==o?null:{a:t,b:r};let s=n.child(--i),l=e.child(--o),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=Of(s.content,l.content,t-1,r-1);if(c)return c}t-=a,r-=a}}class se{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,i=0,o){for(let s=0,l=0;l<t;s++){let a=this.content[s],c=l+a.nodeSize;if(c>e&&r(a,i+l,o||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,i+u)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,i){let o="",s=!0;return this.nodesBetween(e,t,(l,a)=>{l.isText?(o+=l.text.slice(Math.max(e,a)-a,t-a),s=!r):l.isLeaf?(i?o+=typeof i=="function"?i(l):i:l.type.spec.leafText&&(o+=l.type.spec.leafText(l)),s=!r):!s&&l.isBlock&&(o+=r,s=!0)},0),o}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,i=this.content.slice(),o=0;for(t.isText&&t.sameMarkup(r)&&(i[i.length-1]=t.withText(t.text+r.text),o=1);o<e.content.length;o++)i.push(e.content[o]);return new se(i,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],i=0;if(t>e)for(let o=0,s=0;s<t;o++){let l=this.content[o],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),i+=l.nodeSize),s=a}return new se(r,i)}cutByIndex(e,t){return e==t?se.empty:e==0&&t==this.content.length?this:new se(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let i=this.content.slice(),o=this.size+t.nodeSize-r.nodeSize;return i[e]=t,new se(i,o)}addToStart(e){return new se([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new se(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 i=this.content[t];e(i,r,t),r+=i.nodeSize}}findDiffStart(e,t=0){return kf(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return Of(this,e,t,r)}findIndex(e,t=-1){if(e==0)return Gi(0,e);if(e==this.size)return Gi(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let r=0,i=0;;r++){let o=this.child(r),s=i+o.nodeSize;if(s>=e)return s==e||t>0?Gi(r+1,s):Gi(r,i);i=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 se.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new se(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return se.empty;let t,r=0;for(let i=0;i<e.length;i++){let o=e[i];r+=o.nodeSize,i&&o.isText&&e[i-1].sameMarkup(o)?(t||(t=e.slice(0,i)),t[t.length-1]=o.withText(t[t.length-1].text+o.text)):t&&t.push(o)}return new se(t||e,r)}static from(e){if(!e)return se.empty;if(e instanceof se)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new se([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}se.empty=new se([],0);const Ks={index:0,offset:0};function Gi(n,e){return Ks.index=n,Ks.offset=e,Ks}function vo(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(!vo(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!vo(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let Pe=class Fa{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let i=0;i<e.length;i++){let o=e[i];if(this.eq(o))return e;if(this.type.excludes(o.type))t||(t=e.slice(0,i));else{if(o.type.excludes(this.type))return e;!r&&o.type.rank>this.type.rank&&(t||(t=e.slice(0,i)),t.push(this),r=!0),t&&t.push(o)}}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&&vo(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 Fa.none;if(e instanceof Fa)return[e];let t=e.slice();return t.sort((r,i)=>r.type.rank-i.type.rank),t}};Pe.none=[];class yo extends Error{}class he{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=Nf(this.content,e+this.openStart,t);return r&&new he(r,this.openStart,this.openEnd)}removeBetween(e,t){return new he(Mf(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 he.empty;let r=t.openStart||0,i=t.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new he(se.fromJSON(e,t.content),r,i)}static maxOpen(e,t=!0){let r=0,i=0;for(let o=e.firstChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.firstChild)r++;for(let o=e.lastChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.lastChild)i++;return new he(e,r,i)}}he.empty=new he(se.empty,0,0);function Mf(n,e,t){let{index:r,offset:i}=n.findIndex(e),o=n.maybeChild(r),{index:s,offset:l}=n.findIndex(t);if(i==e||o.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,o.copy(Mf(o.content,e-i-1,t-i-1)))}function Nf(n,e,t,r){let{index:i,offset:o}=n.findIndex(e),s=n.maybeChild(i);if(o==e||s.isText)return r&&!r.canReplace(i,i,t)?null:n.cut(0,e).append(t).append(n.cut(e));let l=Nf(s.content,e-o-1,t);return l&&n.replaceChild(i,s.copy(l))}function u1(n,e,t){if(t.openStart>n.depth)throw new yo("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new yo("Inconsistent open depths");return If(n,e,t,0)}function If(n,e,t,r){let i=n.index(r),o=n.node(r);if(i==e.index(r)&&r<n.depth-t.openStart){let s=If(n,e,t,r+1);return o.copy(o.content.replaceChild(i,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 ir(s,l.cut(0,n.parentOffset).append(t.content).append(l.cut(e.parentOffset)))}else{let{start:s,end:l}=d1(t,n);return ir(o,Rf(n,s,l,e,r))}else return ir(o,bo(n,e,r))}function Df(n,e){if(!e.type.compatibleContent(n.type))throw new yo("Cannot join "+e.type.name+" onto "+n.type.name)}function $a(n,e,t){let r=n.node(t);return Df(r,e.node(t)),r}function rr(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 ui(n,e,t,r){let i=(e||n).node(t),o=0,s=e?e.index(t):i.childCount;n&&(o=n.index(t),n.depth>t?o++:n.textOffset&&(rr(n.nodeAfter,r),o++));for(let l=o;l<s;l++)rr(i.child(l),r);e&&e.depth==t&&e.textOffset&&rr(e.nodeBefore,r)}function ir(n,e){return n.type.checkContent(e),n.copy(e)}function Rf(n,e,t,r,i){let o=n.depth>i&&$a(n,e,i+1),s=r.depth>i&&$a(t,r,i+1),l=[];return ui(null,n,i,l),o&&s&&e.index(i)==t.index(i)?(Df(o,s),rr(ir(o,Rf(n,e,t,r,i+1)),l)):(o&&rr(ir(o,bo(n,e,i+1)),l),ui(e,t,i,l),s&&rr(ir(s,bo(t,r,i+1)),l)),ui(r,null,i,l),new se(l)}function bo(n,e,t){let r=[];if(ui(null,n,t,r),n.depth>t){let i=$a(n,e,t+1);rr(ir(i,bo(n,e,t+1)),r)}return ui(e,null,t,r),new se(r)}function d1(n,e){let t=e.depth-n.openStart,i=e.node(t).copy(n.content);for(let o=t-1;o>=0;o--)i=e.node(o).copy(se.from(i));return{start:i.resolveNoCache(n.openStart+t),end:i.resolveNoCache(i.content.size-n.openEnd-t)}}class Ci{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],i=e.child(t);return r?e.child(t).cut(r):i}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],i=t==0?0:this.path[t*3-1]+1;for(let o=0;o<e;o++)i+=r.child(o).nodeSize;return i}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return Pe.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),i=e.maybeChild(t);if(!r){let l=r;r=i,i=l}let o=r.marks;for(var s=0;s<o.length;s++)o[s].type.spec.inclusive===!1&&(!i||!o[s].isInSet(i.marks))&&(o=o[s--].removeFromSet(o));return o}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,i=e.parent.maybeChild(e.index());for(var o=0;o<r.length;o++)r[o].type.spec.inclusive===!1&&(!i||!r[o].isInSet(i.marks))&&(r=r[o--].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 Eo(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=[],i=0,o=t;for(let s=e;;){let{index:l,offset:a}=s.content.findIndex(o),c=o-a;if(r.push(s,l,i+a),!c||(s=s.child(l),s.isText))break;o=c-1,i+=a+1}return new Ci(t,r,o)}static resolveCached(e,t){for(let i=0;i<Gs.length;i++){let o=Gs[i];if(o.pos==t&&o.doc==e)return o}let r=Gs[Ys]=Ci.resolve(e,t);return Ys=(Ys+1)%f1,r}}let Gs=[],Ys=0,f1=12;class Eo{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 h1=Object.create(null);let or=class Va{constructor(e,t,r,i=Pe.none){this.type=e,this.attrs=t,this.marks=i,this.content=r||se.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,i=0){this.content.nodesBetween(e,t,r,i,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,i){return this.content.textBetween(e,t,r,i)}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&&vo(this.attrs,t||e.defaultAttrs||h1)&&Pe.sameSet(this.marks,r||Pe.none)}copy(e=null){return e==this.content?this:new Va(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Va(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 he.empty;let i=this.resolve(e),o=this.resolve(t),s=r?0:i.sharedDepth(t),l=i.start(s),c=i.node(s).content.cut(i.pos-l,o.pos-l);return new he(c,i.depth-s,o.depth-s)}replace(e,t,r){return u1(this.resolve(e),this.resolve(t),r)}nodeAt(e){for(let t=this;;){let{index:r,offset:i}=t.content.findIndex(e);if(t=t.maybeChild(r),!t)return null;if(i==e||t.isText)return t;e-=i+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 i=this.content.child(t-1);return{node:i,index:t-1,offset:r-i.nodeSize}}resolve(e){return Ci.resolveCached(this,e)}resolveNoCache(e){return Ci.resolve(this,e)}rangeHasMark(e,t,r){let i=!1;return t>e&&this.nodesBetween(e,t,o=>(r.isInSet(o.marks)&&(i=!0),!i)),i}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()+")"),Lf(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=se.empty,i=0,o=r.childCount){let s=this.contentMatchAt(e).matchFragment(r,i,o),l=s&&s.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let a=i;a<o;a++)if(!this.type.allowsMarks(r.child(a).marks))return!1;return!0}canReplaceWith(e,t,r,i){if(i&&!this.type.allowsMarks(i))return!1;let o=this.contentMatchAt(e).matchType(r),s=o&&o.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=Pe.none;for(let t=0;t<this.marks.length;t++)e=this.marks[t].addToSet(e);if(!Pe.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 i=se.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,i,r)}};or.prototype.text=void 0;class So extends or{constructor(e,t,r,i){if(super(e,t,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Lf(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 So(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new So(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 Lf(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class cr{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new p1(e,t);if(r.next==null)return cr.empty;let i=_f(r);r.next&&r.err("Unexpected trailing text");let o=S1(E1(i));return C1(o,r),o}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 i=this;for(let o=t;i&&o<r;o++)i=i.matchType(e.child(o).type);return i}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 i=[this];function o(s,l){let a=s.matchFragment(e,r);if(a&&(!t||a.validEnd))return se.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())&&i.indexOf(d)==-1){i.push(d);let f=o(d,l.concat(u));if(f)return f}}return null}return o(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 i=r.shift(),o=i.match;if(o.matchType(e)){let s=[];for(let l=i;l.type;l=l.via)s.push(l.type);return s.reverse()}for(let s=0;s<o.next.length;s++){let{type:l,next:a}=o.next[s];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in t)&&(!i.type||a.validEnd)&&(r.push({match:l.contentMatch,type:l,via:i}),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 i=0;i<r.next.length;i++)e.indexOf(r.next[i].next)==-1&&t(r.next[i].next)}return t(this),e.map((r,i)=>{let o=i+(r.validEnd?"*":" ")+" ";for(let s=0;s<r.next.length;s++)o+=(s?", ":"")+r.next[s].type.name+"->"+e.indexOf(r.next[s].next);return o}).join(`
12
- `)}}cr.empty=new cr(!0);class p1{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 _f(n){let e=[];do e.push(m1(n));while(n.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function m1(n){let e=[];do e.push(g1(n));while(n.next&&n.next!=")"&&n.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function g1(n){let e=b1(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=v1(n,e);else break;return e}function Kc(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let e=Number(n.next);return n.pos++,e}function v1(n,e){let t=Kc(n),r=t;return n.eat(",")&&(n.next!="}"?r=Kc(n):r=-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:t,max:r,expr:e}}function y1(n,e){let t=n.nodeTypes,r=t[e];if(r)return[r];let i=[];for(let o in t){let s=t[o];s.groups.indexOf(e)>-1&&i.push(s)}return i.length==0&&n.err("No node type or group '"+e+"' found"),i}function b1(n){if(n.eat("(")){let e=_f(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=y1(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 E1(n){let e=[[]];return i(o(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 i(s,l){s.forEach(a=>a.to=l)}function o(s,l){if(s.type=="choice")return s.exprs.reduce((a,c)=>a.concat(o(c,l)),[]);if(s.type=="seq")for(let a=0;;a++){let c=o(s.exprs[a],l);if(a==s.exprs.length-1)return c;i(c,l=t())}else if(s.type=="star"){let a=t();return r(l,a),i(o(s.expr,a),a),[r(a)]}else if(s.type=="plus"){let a=t();return i(o(s.expr,l),a),i(o(s.expr,a),a),[r(a)]}else{if(s.type=="opt")return[r(l)].concat(o(s.expr,l));if(s.type=="range"){let a=l;for(let c=0;c<s.min;c++){let u=t();i(o(s.expr,a),u),a=u}if(s.max==-1)i(o(s.expr,a),a);else for(let c=s.min;c<s.max;c++){let u=t();r(a,u),i(o(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 Pf(n,e){return e-n}function Gc(n,e){let t=[];return r(e),t.sort(Pf);function r(i){let o=n[i];if(o.length==1&&!o[0].term)return r(o[0].to);t.push(i);for(let s=0;s<o.length;s++){let{term:l,to:a}=o[s];!l&&t.indexOf(a)==-1&&r(a)}}}function S1(n){let e=Object.create(null);return t(Gc(n,0));function t(r){let i=[];r.forEach(s=>{n[s].forEach(({term:l,to:a})=>{if(!l)return;let c;for(let u=0;u<i.length;u++)i[u][0]==l&&(c=i[u][1]);Gc(n,a).forEach(u=>{c||i.push([l,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let o=e[r.join(",")]=new cr(r.indexOf(n.length-1)>-1);for(let s=0;s<i.length;s++){let l=i[s][1].sort(Pf);o.next.push({type:i[s][0],next:e[l.join(",")]||t(l)})}return o}}function C1(n,e){for(let t=0,r=[n];t<r.length;t++){let i=r[t],o=!i.validEnd,s=[];for(let l=0;l<i.next.length;l++){let{type:a,next:c}=i.next[l];s.push(a.name),o&&!(a.isText||a.hasRequiredAttrs())&&(o=!1),r.indexOf(c)==-1&&r.push(c)}o&&e.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function Bf(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 Ff(n,e){let t=Object.create(null);for(let r in n){let i=e&&e[r];if(i===void 0){let o=n[r];if(o.hasDefault)i=o.default;else throw new RangeError("No value supplied for attribute "+r)}t[r]=i}return t}function $f(n){let e=Object.create(null);if(n)for(let t in n)e[t]=new T1(n[t]);return e}let Yc=class Vf{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=$f(r.attrs),this.defaultAttrs=Bf(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==cr.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:Ff(this.attrs,e)}create(e=null,t,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new or(this,this.computeAttrs(e),se.from(t),Pe.setFrom(r))}createChecked(e=null,t,r){return t=se.from(t),this.checkContent(t),new or(this,this.computeAttrs(e),t,Pe.setFrom(r))}createAndFill(e=null,t,r){if(e=this.computeAttrs(e),t=se.from(t),t.size){let s=this.contentMatch.fillBefore(t);if(!s)return null;t=s.append(t)}let i=this.contentMatch.matchFragment(t),o=i&&i.fillBefore(se.empty,!0);return o?new or(this,e,t.append(o),Pe.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:Pe.none:e}static compile(e,t){let r=Object.create(null);e.forEach((o,s)=>r[o]=new Vf(o,t,s));let i=t.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let o in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};class T1{constructor(e){this.hasDefault=Object.prototype.hasOwnProperty.call(e,"default"),this.default=e.default}get isRequired(){return!this.hasDefault}}class Ss{constructor(e,t,r,i){this.name=e,this.rank=t,this.schema=r,this.spec=i,this.attrs=$f(i.attrs),this.excluded=null;let o=Bf(this.attrs);this.instance=o?new Pe(this,o):null}create(e=null){return!e&&this.instance?this.instance:new Pe(this,Ff(this.attrs,e))}static compile(e,t){let r=Object.create(null),i=0;return e.forEach((o,s)=>r[o]=new Ss(o,i++,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 x1{constructor(e){this.cached=Object.create(null);let t=this.spec={};for(let i in e)t[i]=e[i];t.nodes=Ze.from(e.nodes),t.marks=Ze.from(e.marks||{}),this.nodes=Yc.compile(this.spec.nodes,this),this.marks=Ss.compile(this.spec.marks,this);let r=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let o=this.nodes[i],s=o.spec.content||"",l=o.spec.marks;o.contentMatch=r[s]||(r[s]=cr.parse(s,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.markSet=l=="_"?null:l?Jc(this,l.split(" ")):l==""||!o.inlineContent?[]:null}for(let i in this.marks){let o=this.marks[i],s=o.spec.excludes;o.excluded=s==null?[o]:s==""?[]:Jc(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,i){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof Yc){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,i)}text(e,t){let r=this.nodes.text;return new So(r,r.defaultAttrs,e,Pe.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeFromJSON(e){return or.fromJSON(this,e)}markFromJSON(e){return Pe.fromJSON(this,e)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function Jc(n,e){let t=[];for(let r=0;r<e.length;r++){let i=e[r],o=n.marks[i],s=o;if(o)t.push(o);else for(let l in n.marks){let a=n.marks[l];(i=="_"||a.spec.group&&a.spec.group.split(" ").indexOf(i)>-1)&&t.push(s=a)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return t}class Fr{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 i=e.nodes[r.node];return i.contentMatch.matchType(i)})}parse(e,t={}){let r=new Qc(this,t,!1);return r.addAll(e,t.from,t.to),r.finish()}parseSlice(e,t={}){let r=new Qc(this,t,!0);return r.addAll(e,t.from,t.to),he.maxOpen(r.finish())}matchTag(e,t,r){for(let i=r?this.tags.indexOf(r)+1:0;i<this.tags.length;i++){let o=this.tags[i];if(k1(e,o.tag)&&(o.namespace===void 0||e.namespaceURI==o.namespace)&&(!o.context||t.matchesContext(o.context))){if(o.getAttrs){let s=o.getAttrs(e);if(s===!1)continue;o.attrs=s||void 0}return o}}}matchStyle(e,t,r,i){for(let o=i?this.styles.indexOf(i)+1:0;o<this.styles.length;o++){let s=this.styles[o],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(i){let o=i.priority==null?50:i.priority,s=0;for(;s<t.length;s++){let l=t[s];if((l.priority==null?50:l.priority)<o)break}t.splice(s,0,i)}for(let i in e.marks){let o=e.marks[i].spec.parseDOM;o&&o.forEach(s=>{r(s=Zc(s)),s.mark||s.ignore||s.clearMark||(s.mark=i)})}for(let i in e.nodes){let o=e.nodes[i].spec.parseDOM;o&&o.forEach(s=>{r(s=Zc(s)),s.node||s.ignore||s.mark||(s.node=i)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Fr(e,Fr.schemaRules(e)))}}const zf={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},A1={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Hf={ol:!0,ul:!0},Co=1,To=2,di=4;function Xc(n,e,t){return e!=null?(e?Co:0)|(e==="full"?To:0):n&&n.whitespace=="pre"?Co|To:t&~di}class Yi{constructor(e,t,r,i,o,s,l){this.type=e,this.attrs=t,this.marks=r,this.pendingMarks=i,this.solid=o,this.options=l,this.content=[],this.activeMarks=Pe.none,this.stashMarks=[],this.match=s||(l&di?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(se.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let r=this.type.contentMatch,i;return(i=r.findWrapping(e.type))?(this.match=r,i):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Co)){let r=this.content[this.content.length-1],i;if(r&&r.isText&&(i=/[ \t\r\n\u000c]+$/.exec(r.text))){let o=r;r.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=o.withText(o.text.slice(0,o.text.length-i[0].length))}}let t=se.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(se.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 i=r[t];(this.type?this.type.allowsMarkType(i.type):M1(i.type,e))&&!i.isInSet(this.activeMarks)&&(this.activeMarks=i.addToSet(this.activeMarks),this.pendingMarks=i.removeFromSet(this.pendingMarks))}}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!zf.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class Qc{constructor(e,t,r){this.parser=e,this.options=t,this.isOpen=r,this.open=0;let i=t.topNode,o,s=Xc(null,t.preserveWhitespace,0)|(r?di:0);i?o=new Yi(i.type,i.attrs,Pe.none,Pe.none,!0,t.topMatch||i.type.contentMatch,s):r?o=new Yi(null,null,Pe.none,Pe.none,!0,null,s):o=new Yi(e.schema.topNodeType,null,Pe.none,Pe.none,!0,null,s),this.nodes=[o],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 i=this.readStyles(O1(r));if(!i)return;let[o,s]=i,l=this.top;for(let a=0;a<s.length;a++)this.removePendingMark(s[a],l);for(let a=0;a<o.length;a++)this.addPendingMark(o[a]);t();for(let a=0;a<o.length;a++)this.removePendingMark(o[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&To||r.inlineContext(e)||/[^ \t\r\n\u000c]/.test(t)){if(r.options&Co)r.options&To?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 i=r.content[r.content.length-1],o=e.previousSibling;(!i||o&&o.nodeName=="BR"||i.isText&&/[ \t\r\n\u000c]$/.test(i.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(),i;Hf.hasOwnProperty(r)&&this.parser.normalizeLists&&w1(e);let o=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(i=this.parser.matchTag(e,this,t));if(o?o.ignore:A1.hasOwnProperty(r))this.findInside(e),this.ignoreFallback(e);else if(!o||o.skip||o.closeParent){o&&o.closeParent?this.open=Math.max(0,this.open-1):o&&o.skip.nodeType&&(e=o.skip);let s,l=this.top,a=this.needsBlock;if(zf.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}o&&o.skip?this.addAll(e):this.withStyleRules(e,()=>this.addAll(e)),s&&this.sync(l),this.needsBlock=a}else this.withStyleRules(e,()=>{this.addElementByRule(e,o,o.consuming===!1?i: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=Pe.none,r=Pe.none;for(let i=0;i<e.length;i+=2)for(let o=void 0;;){let s=this.parser.matchStyle(e[i],e[i+1],this,o);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)o=s;else break}return[t,r]}addElementByRule(e,t,r){let i,o,s;t.node?(o=this.parser.schema.nodes[t.node],o.isLeaf?this.insertNode(o.create(t.attrs))||this.leafFallback(e):i=this.enter(o,t.attrs||null,t.preserveWhitespace)):(s=this.parser.schema.marks[t.mark].create(t.attrs),this.addPendingMark(s));let l=this.top;if(o&&o.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)}i&&this.sync(l)&&this.open--,s&&this.removePendingMark(s,l)}addAll(e,t,r){let i=t||0;for(let o=t?e.childNodes[t]:e.firstChild,s=r==null?null:e.childNodes[r];o!=s;o=o.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(o);this.findAtPoint(e,i)}findPlace(e){let t,r;for(let i=this.open;i>=0;i--){let o=this.nodes[i],s=o.findWrapping(e);if(s&&(!t||t.length>s.length)&&(t=s,r=o,!s.length)||o.solid)break}if(!t)return!1;this.sync(r);for(let i=0;i<t.length;i++)this.enterInner(t[i],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 i=0;i<e.marks.length;i++)(!t.type||t.type.allowsMarkType(e.marks[i].type))&&(r=e.marks[i].addToSet(r));return t.content.push(e.mark(r)),!0}return!1}enter(e,t,r){let i=this.findPlace(e.create(t));return i&&this.enterInner(e,t,!0,r),i}enterInner(e,t=null,r=!1,i){this.closeExtra();let o=this.top;o.applyPending(e),o.match=o.match&&o.match.matchType(e);let s=Xc(e,i,o.options);o.options&di&&o.content.length==0&&(s|=di),this.nodes.push(new Yi(e,t,o.activeMarks,o.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 i=r.length-1;i>=0;i--)e+=r[i].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 i=0;i<this.find.length;i++)this.find[i].pos==null&&e.nodeType==1&&e.contains(this.find[i].node)&&t.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].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,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),o=-(r?r.depth+1:0)+(i?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>=o;a--)if(s(l-1,a))return!0;return!1}else{let u=a>0||a==0&&i?this.nodes[a].type:r&&a>=o?r.node(a-o).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=N1(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 i=this.nodes[r];if(i.pendingMarks.lastIndexOf(e)>-1)i.pendingMarks=e.removeFromSet(i.pendingMarks);else{i.activeMarks=e.removeFromSet(i.activeMarks);let s=i.popFromStashMark(e);s&&i.type&&i.type.allowsMarkType(s.type)&&(i.activeMarks=s.addToSet(i.activeMarks))}if(i==t)break}}}function w1(n){for(let e=n.firstChild,t=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&Hf.hasOwnProperty(r)&&t?(t.appendChild(e),e=t):r=="li"?t=e:r&&(t=null)}}function k1(n,e){return(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,e)}function O1(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 Zc(n){let e={};for(let t in n)e[t]=n[t];return e}function M1(n,e){let t=e.schema.nodes;for(let r in t){let i=t[r];if(!i.allowsMarkType(n))continue;let o=[],s=l=>{o.push(l);for(let a=0;a<l.edgeCount;a++){let{type:c,next:u}=l.edge(a);if(c==e||o.indexOf(u)<0&&s(u))return!0}};if(s(i.contentMatch))return!0}}function N1(n,e){for(let t=0;t<e.length;t++)if(n.eq(e[t]))return e[t]}class tn{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},r){r||(r=Js(t).createDocumentFragment());let i=r,o=[];return e.forEach(s=>{if(o.length||s.marks.length){let l=0,a=0;for(;l<o.length&&a<s.marks.length;){let c=s.marks[a];if(!this.marks[c.type.name]){a++;continue}if(!c.eq(o[l][0])||c.type.spec.spanning===!1)break;l++,a++}for(;l<o.length;)i=o.pop()[1];for(;a<s.marks.length;){let c=s.marks[a++],u=this.serializeMark(c,s.isInline,t);u&&(o.push([c,i]),i.appendChild(u.dom),i=u.contentDOM||u.dom)}}i.appendChild(this.serializeNodeInner(s,t))}),r}serializeNodeInner(e,t){let{dom:r,contentDOM:i}=tn.renderSpec(Js(t),this.nodes[e.type.name](e));if(i){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,i)}return r}serializeNode(e,t={}){let r=this.serializeNodeInner(e,t);for(let i=e.marks.length-1;i>=0;i--){let o=this.serializeMark(e.marks[i],e.isInline,t);o&&((o.contentDOM||o.dom).appendChild(r),r=o.dom)}return r}serializeMark(e,t,r={}){let i=this.marks[e.type.name];return i&&tn.renderSpec(Js(r),i(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 i=t[0],o=i.indexOf(" ");o>0&&(r=i.slice(0,o),i=i.slice(o+1));let s,l=r?e.createElementNS(r,i):e.createElement(i),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:p}=tn.renderSpec(e,d,r);if(l.appendChild(f),p){if(s)throw new RangeError("Multiple content holes");s=p}}}return{dom:l,contentDOM:s}}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new tn(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=qc(e.nodes);return t.text||(t.text=r=>r.text),t}static marksFromSchema(e){return qc(e.marks)}}function qc(n){let e={};for(let t in n){let r=n[t].spec.toDOM;r&&(e[t]=r)}return e}function Js(n){return n.document||window.document}const Uf=65535,jf=Math.pow(2,16);function I1(n,e){return n+e*jf}function eu(n){return n&Uf}function D1(n){return(n-(n&Uf))/jf}const Wf=1,Kf=2,lo=4,Gf=8;class za{constructor(e,t,r){this.pos=e,this.delInfo=t,this.recover=r}get deleted(){return(this.delInfo&Gf)>0}get deletedBefore(){return(this.delInfo&(Wf|lo))>0}get deletedAfter(){return(this.delInfo&(Kf|lo))>0}get deletedAcross(){return(this.delInfo&lo)>0}}class St{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&St.empty)return St.empty}recover(e){let t=0,r=eu(e);if(!this.inverted)for(let i=0;i<r;i++)t+=this.ranges[i*3+2]-this.ranges[i*3+1];return this.ranges[r*3]+t+D1(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 i=0,o=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?i:0);if(a>e)break;let c=this.ranges[l+o],u=this.ranges[l+s],d=a+c;if(e<=d){let f=c?e==a?-1:e==d?1:t:t,p=a+i+(f<0?0:u);if(r)return p;let h=e==(t<0?a:d)?null:I1(l/3,e-a),g=e==a?Kf:e==d?Wf:lo;return(t<0?e!=a:e!=d)&&(g|=Gf),new za(p,g,h)}i+=u-c}return r?e+i:new za(e+i,0,null)}touches(e,t){let r=0,i=eu(t),o=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+o],u=a+c;if(e<=u&&l==i*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 i=0,o=0;i<this.ranges.length;i+=3){let s=this.ranges[i],l=s-(this.inverted?o:0),a=s+(this.inverted?0:o),c=this.ranges[i+t],u=this.ranges[i+r];e(l,l+c,a,a+u),o+=u-c}}invert(){return new St(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?St.empty:new St(e<0?[0,-e,0]:[0,0,e])}}St.empty=new St([]);class fi{constructor(e=[],t,r=0,i=e.length){this.maps=e,this.mirror=t,this.from=r,this.to=i}slice(e=0,t=this.maps.length){return new fi(this.maps,this.mirror,e,t)}copy(){return new fi(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 i=e.getMirror(t);this.appendMap(e.maps[t],i!=null&&i<t?r+i: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 i=e.getMirror(t);this.appendMap(e.maps[t].invert(),i!=null&&i>t?r-i-1:void 0)}}invert(){let e=new fi;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 i=0;for(let o=this.from;o<this.to;o++){let s=this.maps[o],l=s.mapResult(e,t);if(l.recover!=null){let a=this.getMirror(o);if(a!=null&&a>o&&a<this.to){o=a,e=this.maps[a].recover(l.recover);continue}}i|=l.delInfo,e=l.pos}return r?e:new za(e,i,null)}}const Xs=Object.create(null);class it{getMap(){return St.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=Xs[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 Xs)throw new RangeError("Duplicate use of step JSON ID "+e);return Xs[e]=t,t.prototype.jsonID=e,t}}class je{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new je(e,null)}static fail(e){return new je(null,e)}static fromReplace(e,t,r,i){try{return je.ok(e.replace(t,r,i))}catch(o){if(o instanceof yo)return je.fail(o.message);throw o}}}function Ll(n,e,t){let r=[];for(let i=0;i<n.childCount;i++){let o=n.child(i);o.content.size&&(o=o.copy(Ll(o.content,e,o))),o.isInline&&(o=e(o,t,i)),r.push(o)}return se.fromArray(r)}class In extends it{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),i=r.node(r.sharedDepth(this.to)),o=new he(Ll(t.content,(s,l)=>!s.isAtom||!l.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),i),t.openStart,t.openEnd);return je.fromReplace(e,this.from,this.to,o)}invert(){return new nn(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 In(t.pos,r.pos,this.mark)}merge(e){return e instanceof In&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new In(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 In(t.from,t.to,e.markFromJSON(t.mark))}}it.jsonID("addMark",In);class nn extends it{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 he(Ll(t.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),t.openStart,t.openEnd);return je.fromReplace(e,this.from,this.to,r)}invert(){return new In(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 nn(t.pos,r.pos,this.mark)}merge(e){return e instanceof nn&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new nn(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 nn(t.from,t.to,e.markFromJSON(t.mark))}}it.jsonID("removeMark",nn);class Dn extends it{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return je.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return je.fromReplace(e,this.pos,this.pos+1,new he(se.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 i=0;i<t.marks.length;i++)if(!t.marks[i].isInSet(r))return new Dn(this.pos,t.marks[i]);return new Dn(this.pos,this.mark)}}return new $r(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Dn(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 Dn(t.pos,e.markFromJSON(t.mark))}}it.jsonID("addNodeMark",Dn);class $r extends it{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return je.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return je.fromReplace(e,this.pos,this.pos+1,new he(se.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new Dn(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new $r(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 $r(t.pos,e.markFromJSON(t.mark))}}it.jsonID("removeNodeMark",$r);class qe extends it{constructor(e,t,r,i=!1){super(),this.from=e,this.to=t,this.slice=r,this.structure=i}apply(e){return this.structure&&Ha(e,this.from,this.to)?je.fail("Structure replace would overwrite content"):je.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new St([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?he.empty:new he(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?he.empty:new he(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,he.fromJSON(e,t.slice),!!t.structure)}}it.jsonID("replace",qe);class Ye extends it{constructor(e,t,r,i,o,s,l=!1){super(),this.from=e,this.to=t,this.gapFrom=r,this.gapTo=i,this.slice=o,this.insert=s,this.structure=l}apply(e){if(this.structure&&(Ha(e,this.from,this.gapFrom)||Ha(e,this.gapTo,this.to)))return je.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return je.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,t.content);return r?je.fromReplace(e,this.from,this.to,r):je.fail("Content does not fit in gap")}getMap(){return new St([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 Ye(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),i=e.map(this.gapFrom,-1),o=e.map(this.gapTo,1);return t.deletedAcross&&r.deletedAcross||i<t.pos||o>r.pos?null:new Ye(t.pos,r.pos,i,o,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 Ye(t.from,t.to,t.gapFrom,t.gapTo,he.fromJSON(e,t.slice),t.insert,!!t.structure)}}it.jsonID("replaceAround",Ye);function Ha(n,e,t){let r=n.resolve(e),i=t-e,o=r.depth;for(;i>0&&o>0&&r.indexAfter(o)==r.node(o).childCount;)o--,i--;if(i>0){let s=r.node(o).maybeChild(r.indexAfter(o));for(;i>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,i--}}return!1}function R1(n,e,t,r){let i=[],o=[],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),p=Math.min(c+a.nodeSize,t),h=r.addToSet(d);for(let g=0;g<d.length;g++)d[g].isInSet(h)||(s&&s.to==f&&s.mark.eq(d[g])?s.to=p:i.push(s=new nn(f,p,d[g])));l&&l.to==f?l.to=p:o.push(l=new In(f,p,r))}}),i.forEach(a=>n.step(a)),o.forEach(a=>n.step(a))}function L1(n,e,t,r){let i=[],o=0;n.doc.nodesBetween(e,t,(s,l)=>{if(!s.isInline)return;o++;let a=null;if(r instanceof Ss){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 p=0;p<i.length;p++){let h=i[p];h.step==o-1&&d.eq(i[p].style)&&(f=h)}f?(f.to=c,f.step=o):i.push({style:d,from:Math.max(l,e),to:c,step:o})}}}),i.forEach(s=>n.step(new nn(s.from,s.to,s.style)))}function _1(n,e,t,r=t.contentMatch){let i=n.doc.nodeAt(e),o=[],s=e+1;for(let l=0;l<i.childCount;l++){let a=i.child(l),c=s+a.nodeSize,u=r.matchType(a.type);if(!u)o.push(new qe(s,c,he.empty));else{r=u;for(let d=0;d<a.marks.length;d++)t.allowsMarkType(a.marks[d].type)||n.step(new nn(s,c,a.marks[d]));if(a.isText&&!t.spec.code){let d,f=/\r?\n|\r/g,p;for(;d=f.exec(a.text);)p||(p=new he(se.from(t.schema.text(" ",t.allowedMarks(a.marks))),0,0)),o.push(new qe(s+d.index,s+d.index+d[0].length,p))}}s=c}if(!r.validEnd){let l=r.fillBefore(se.empty,!0);n.replace(s,s,new he(l,0,0))}for(let l=o.length-1;l>=0;l--)n.step(o[l])}function P1(n,e,t){return(e==0||n.canReplace(e,n.childCount))&&(t==n.childCount||n.canReplace(0,t))}function Qr(n){let t=n.parent.content.cutByIndex(n.startIndex,n.endIndex);for(let r=n.depth;;--r){let i=n.$from.node(r),o=n.$from.index(r),s=n.$to.indexAfter(r);if(r<n.depth&&i.canReplace(o,s,t))return r;if(r==0||i.type.spec.isolating||!P1(i,o,s))break}return null}function B1(n,e,t){let{$from:r,$to:i,depth:o}=e,s=r.before(o+1),l=i.after(o+1),a=s,c=l,u=se.empty,d=0;for(let h=o,g=!1;h>t;h--)g||r.index(h)>0?(g=!0,u=se.from(r.node(h).copy(u)),d++):a--;let f=se.empty,p=0;for(let h=o,g=!1;h>t;h--)g||i.after(h+1)<i.end(h)?(g=!0,f=se.from(i.node(h).copy(f)),p++):c++;n.step(new Ye(a,c,s,l,new he(u.append(f),d,p),u.size-d,!0))}function _l(n,e,t=null,r=n){let i=F1(n,e),o=i&&$1(r,e);return o?i.map(tu).concat({type:e,attrs:t}).concat(o.map(tu)):null}function tu(n){return{type:n,attrs:null}}function F1(n,e){let{parent:t,startIndex:r,endIndex:i}=n,o=t.contentMatchAt(r).findWrapping(e);if(!o)return null;let s=o.length?o[0]:e;return t.canReplaceWith(r,i,s)?o:null}function $1(n,e){let{parent:t,startIndex:r,endIndex:i}=n,o=t.child(r),s=e.contentMatch.findWrapping(o.type);if(!s)return null;let a=(s.length?s[s.length-1]:e).contentMatch;for(let c=r;a&&c<i;c++)a=a.matchType(t.child(c).type);return!a||!a.validEnd?null:s}function V1(n,e,t){let r=se.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=se.from(t[s].type.create(t[s].attrs,r))}let i=e.start,o=e.end;n.step(new Ye(i,o,i,o,new he(r,0,0),t.length,!0))}function z1(n,e,t,r,i){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let o=n.steps.length;n.doc.nodesBetween(e,t,(s,l)=>{if(s.isTextblock&&!s.hasMarkup(r,i)&&H1(n.doc,n.mapping.slice(o).map(l),r)){n.clearIncompatible(n.mapping.slice(o).map(l,1),r);let a=n.mapping.slice(o),c=a.map(l,1),u=a.map(l+s.nodeSize,1);return n.step(new Ye(c,u,c+1,u-1,new he(se.from(r.create(i,null,s.marks)),0,0),1,!0)),!1}})}function H1(n,e,t){let r=n.resolve(e),i=r.index();return r.parent.canReplaceWith(i,i+1,t)}function U1(n,e,t,r,i){let o=n.doc.nodeAt(e);if(!o)throw new RangeError("No node at given position");t||(t=o.type);let s=t.create(r,null,i||o.marks);if(o.isLeaf)return n.replaceWith(e,e+o.nodeSize,s);if(!t.validContent(o.content))throw new RangeError("Invalid content for node type "+t.name);n.step(new Ye(e,e+o.nodeSize,e+1,e+o.nodeSize-1,new he(se.from(s),0,0),1,!0))}function _r(n,e,t=1,r){let i=n.resolve(e),o=i.depth-t,s=r&&r[r.length-1]||i.parent;if(o<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!s.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let c=i.depth-1,u=t-2;c>o;c--,u--){let d=i.node(c),f=i.index(c);if(d.type.spec.isolating)return!1;let p=d.content.cutByIndex(f,d.childCount),h=r&&r[u+1];h&&(p=p.replaceChild(0,h.type.create(h.attrs)));let g=r&&r[u]||d;if(!d.canReplace(f+1,d.childCount)||!g.type.validContent(p))return!1}let l=i.indexAfter(o),a=r&&r[0];return i.node(o).canReplaceWith(l,l,a?a.type:i.node(o+1).type)}function j1(n,e,t=1,r){let i=n.doc.resolve(e),o=se.empty,s=se.empty;for(let l=i.depth,a=i.depth-t,c=t-1;l>a;l--,c--){o=se.from(i.node(l).copy(o));let u=r&&r[c];s=se.from(u?u.type.create(u.attrs,s):i.node(l).copy(s))}n.step(new qe(e,e,new he(o.append(s),t,t),!0))}function zn(n,e){let t=n.resolve(e),r=t.index();return Yf(t.nodeBefore,t.nodeAfter)&&t.parent.canReplace(r,r+1)}function Yf(n,e){return!!(n&&e&&!n.isLeaf&&n.canAppend(e))}function Cs(n,e,t=-1){let r=n.resolve(e);for(let i=r.depth;;i--){let o,s,l=r.index(i);if(i==r.depth?(o=r.nodeBefore,s=r.nodeAfter):t>0?(o=r.node(i+1),l++,s=r.node(i).maybeChild(l)):(o=r.node(i).maybeChild(l-1),s=r.node(i+1)),o&&!o.isTextblock&&Yf(o,s)&&r.node(i).canReplace(l,l+1))return e;if(i==0)break;e=t<0?r.before(i):r.after(i)}}function W1(n,e,t){let r=new qe(e-t,e+t,he.empty,!0);n.step(r)}function K1(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 i=r.depth-1;i>=0;i--){let o=r.index(i);if(r.node(i).canReplaceWith(o,o,t))return r.before(i+1);if(o>0)return null}if(r.parentOffset==r.parent.content.size)for(let i=r.depth-1;i>=0;i--){let o=r.indexAfter(i);if(r.node(i).canReplaceWith(o,o,t))return r.after(i+1);if(o<r.node(i).childCount)return null}return null}function G1(n,e,t){let r=n.resolve(e);if(!t.content.size)return e;let i=t.content;for(let o=0;o<t.openStart;o++)i=i.firstChild.content;for(let o=1;o<=(t.openStart==0&&t.size?2:1);o++)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(o==1)u=c.canReplace(a,a,i);else{let d=c.contentMatchAt(a).findWrapping(i.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 Pl(n,e,t=e,r=he.empty){if(e==t&&!r.size)return null;let i=n.resolve(e),o=n.resolve(t);return Jf(i,o,r)?new qe(e,t,r):new Y1(i,o,r).fit()}function Jf(n,e,t){return!t.openStart&&!t.openEnd&&n.start()==e.start()&&n.parent.canReplace(n.index(),e.index(),t.content)}class Y1{constructor(e,t,r){this.$from=e,this.$to=t,this.unplaced=r,this.frontier=[],this.placed=se.empty;for(let i=0;i<=e.depth;i++){let o=e.node(i);this.frontier.push({type:o.type,match:o.contentMatchAt(e.indexAfter(i))})}for(let i=e.depth;i>0;i--)this.placed=se.from(e.node(i).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,i=this.close(e<0?this.$to:r.doc.resolve(e));if(!i)return null;let o=this.placed,s=r.depth,l=i.depth;for(;s&&l&&o.childCount==1;)o=o.firstChild.content,s--,l--;let a=new he(o,s,l);return e>-1?new Ye(r.pos,e,this.$to.pos,this.$to.end(),a,t):a.size||r.pos!=this.$to.pos?new qe(r.pos,i.pos,a):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,r=0,i=this.unplaced.openEnd;r<e;r++){let o=t.firstChild;if(t.childCount>1&&(i=0),o.type.spec.isolating&&i<=r){e=r;break}t=o.content}for(let t=1;t<=2;t++)for(let r=t==1?e:this.unplaced.openStart;r>=0;r--){let i,o=null;r?(o=Qs(this.unplaced.content,r-1).firstChild,i=o.content):i=this.unplaced.content;let s=i.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(se.from(s),!1)):o&&a.compatibleContent(o.type)))return{sliceDepth:r,frontierDepth:l,parent:o,inject:d};if(t==2&&s&&(u=c.findWrapping(s.type)))return{sliceDepth:r,frontierDepth:l,parent:o,wrap:u};if(o&&c.matchType(o.type))break}}}openMore(){let{content:e,openStart:t,openEnd:r}=this.unplaced,i=Qs(e,t);return!i.childCount||i.firstChild.isLeaf?!1:(this.unplaced=new he(e,t+1,Math.max(r,i.size+t>=e.size-r?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:r}=this.unplaced,i=Qs(e,t);if(i.childCount<=1&&t>0){let o=e.size-t<=t+i.size;this.unplaced=new he(si(e,t-1,1),t-1,o?t-1:r)}else this.unplaced=new he(si(e,t,1),t,r)}placeNodes({sliceDepth:e,frontierDepth:t,parent:r,inject:i,wrap:o}){for(;this.depth>t;)this.closeFrontierNode();if(o)for(let g=0;g<o.length;g++)this.openFrontierNode(o[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(i){for(let g=0;g<i.childCount;g++)u.push(i.child(g));d=d.matchFragment(i)}let p=l.size+e-(s.content.size-s.openEnd);for(;c<l.childCount;){let g=l.child(c),v=d.matchType(g.type);if(!v)break;c++,(c>1||a==0||g.content.size)&&(d=v,u.push(Xf(g.mark(f.allowedMarks(g.marks)),c==1?a:0,c==l.childCount?p:-1)))}let h=c==l.childCount;h||(p=-1),this.placed=ai(this.placed,t,se.from(u)),this.frontier[t].match=d,h&&p<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let g=0,v=l;g<p;g++){let S=v.lastChild;this.frontier.push({type:S.type,match:S.contentMatchAt(S.childCount)}),v=S.content}this.unplaced=h?e==0?he.empty:new he(si(s.content,e-1,1),e-1,p<0?s.openEnd:e-1):new he(si(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||!Zs(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,i=this.$to.after(r);for(;r>1&&i==this.$to.end(--r);)++i;return i}findCloseLevel(e){e:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:r,type:i}=this.frontier[t],o=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),s=Zs(e,t,i,r,o);if(s){for(let l=t-1;l>=0;l--){let{match:a,type:c}=this.frontier[l],u=Zs(e,l,c,a,!0);if(!u||u.childCount)continue e}return{depth:t,fit:s,move:o?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=ai(this.placed,t.depth,t.fit)),e=t.move;for(let r=t.depth+1;r<=e.depth;r++){let i=e.node(r),o=i.type.contentMatch.fillBefore(i.content,!0,e.index(r));this.openFrontierNode(i.type,i.attrs,o)}return e}openFrontierNode(e,t=null,r){let i=this.frontier[this.depth];i.match=i.match.matchType(e),this.placed=ai(this.placed,this.depth,se.from(e.create(t,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(se.empty,!0);t.childCount&&(this.placed=ai(this.placed,this.frontier.length,t))}}function si(n,e,t){return e==0?n.cutByIndex(t,n.childCount):n.replaceChild(0,n.firstChild.copy(si(n.firstChild.content,e-1,t)))}function ai(n,e,t){return e==0?n.append(t):n.replaceChild(n.childCount-1,n.lastChild.copy(ai(n.lastChild.content,e-1,t)))}function Qs(n,e){for(let t=0;t<e;t++)n=n.firstChild.content;return n}function Xf(n,e,t){if(e<=0)return n;let r=n.content;return e>1&&(r=r.replaceChild(0,Xf(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(se.empty,!0)))),n.copy(r)}function Zs(n,e,t,r,i){let o=n.node(e),s=i?n.indexAfter(e):n.index(e);if(s==o.childCount&&!t.compatibleContent(o.type))return null;let l=r.fillBefore(o.content,!0,s);return l&&!J1(t,o.content,s)?l:null}function J1(n,e,t){for(let r=t;r<e.childCount;r++)if(!n.allowsMarks(e.child(r).marks))return!0;return!1}function X1(n){return n.spec.defining||n.spec.definingForContent}function Q1(n,e,t,r){if(!r.size)return n.deleteRange(e,t);let i=n.doc.resolve(e),o=n.doc.resolve(t);if(Jf(i,o,r))return n.step(new qe(e,t,r));let s=Zf(i,n.doc.resolve(t));s[s.length-1]==0&&s.pop();let l=-(i.depth+1);s.unshift(l);for(let f=i.depth,p=i.pos-1;f>0;f--,p--){let h=i.node(f).type.spec;if(h.defining||h.definingAsContext||h.isolating)break;s.indexOf(f)>-1?l=f:i.before(f)==p&&s.splice(1,0,-f)}let a=s.indexOf(l),c=[],u=r.openStart;for(let f=r.content,p=0;;p++){let h=f.firstChild;if(c.push(h),p==r.openStart)break;f=h.content}for(let f=u-1;f>=0;f--){let p=c[f],h=X1(p.type);if(h&&!p.sameMarkup(i.node(Math.abs(l)-1)))u=f;else if(h||!p.type.isTextblock)break}for(let f=r.openStart;f>=0;f--){let p=(f+u+1)%(r.openStart+1),h=c[p];if(h)for(let g=0;g<s.length;g++){let v=s[(g+a)%s.length],S=!0;v<0&&(S=!1,v=-v);let T=i.node(v-1),x=i.index(v-1);if(T.canReplaceWith(x,x,h.type,h.marks))return n.replace(i.before(v),S?o.after(v):t,new he(Qf(r.content,0,r.openStart,p),p,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 p=s[f];p<0||(e=i.before(p),t=o.after(p))}}function Qf(n,e,t,r,i){if(e<t){let o=n.firstChild;n=n.replaceChild(0,o.copy(Qf(o.content,e+1,t,r,o)))}if(e>r){let o=i.contentMatchAt(0),s=o.fillBefore(n).append(n);n=s.append(o.matchFragment(s).fillBefore(se.empty,!0))}return n}function Z1(n,e,t,r){if(!r.isInline&&e==t&&n.doc.resolve(e).parent.content.size){let i=K1(n.doc,e,r.type);i!=null&&(e=t=i)}n.replaceRange(e,t,new he(se.from(r),0,0))}function q1(n,e,t){let r=n.doc.resolve(e),i=n.doc.resolve(t),o=Zf(r,i);for(let s=0;s<o.length;s++){let l=o[s],a=s==o.length-1;if(a&&l==0||r.node(l).type.contentMatch.validEnd)return n.delete(r.start(l),i.end(l));if(l>0&&(a||r.node(l-1).canReplace(r.index(l-1),i.indexAfter(l-1))))return n.delete(r.before(l),i.after(l))}for(let s=1;s<=r.depth&&s<=i.depth;s++)if(e-r.start(s)==r.depth-s&&t>r.end(s)&&i.end(s)-t!=i.depth-s)return n.delete(r.before(s),t);n.delete(e,t)}function Zf(n,e){let t=[],r=Math.min(n.depth,e.depth);for(let i=r;i>=0;i--){let o=n.start(i);if(o<n.pos-(n.depth-i)||e.end(i)>e.pos+(e.depth-i)||n.node(i).type.spec.isolating||e.node(i).type.spec.isolating)break;(o==e.start(i)||i==n.depth&&i==e.depth&&n.parent.inlineContent&&e.parent.inlineContent&&i&&e.start(i-1)==o-1)&&t.push(i)}return t}class Pr extends it{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 je.fail("No node at attribute step's position");let r=Object.create(null);for(let o in t.attrs)r[o]=t.attrs[o];r[this.attr]=this.value;let i=t.type.create(r,null,t.marks);return je.fromReplace(e,this.pos,this.pos+1,new he(se.from(i),0,t.isLeaf?0:1))}getMap(){return St.empty}invert(e){return new Pr(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 Pr(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 Pr(t.pos,t.attr,t.value)}}it.jsonID("attr",Pr);class Ti extends it{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let i in e.attrs)t[i]=e.attrs[i];t[this.attr]=this.value;let r=e.type.create(t,e.content,e.marks);return je.ok(r)}getMap(){return St.empty}invert(e){return new Ti(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 Ti(t.attr,t.value)}}it.jsonID("docAttr",Ti);let Vr=class extends Error{};Vr=function n(e){let t=Error.call(this,e);return t.__proto__=n.prototype,t};Vr.prototype=Object.create(Error.prototype);Vr.prototype.constructor=Vr;Vr.prototype.name="TransformError";class qf{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new fi}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new Vr(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=he.empty){let i=Pl(this.doc,e,t,r);return i&&this.step(i),this}replaceWith(e,t,r){return this.replace(e,t,new he(se.from(r),0,0))}delete(e,t){return this.replace(e,t,he.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,r){return Q1(this,e,t,r),this}replaceRangeWith(e,t,r){return Z1(this,e,t,r),this}deleteRange(e,t){return q1(this,e,t),this}lift(e,t){return B1(this,e,t),this}join(e,t=1){return W1(this,e,t),this}wrap(e,t){return V1(this,e,t),this}setBlockType(e,t=e,r,i=null){return z1(this,e,t,r,i),this}setNodeMarkup(e,t,r=null,i){return U1(this,e,t,r,i),this}setNodeAttribute(e,t,r){return this.step(new Pr(e,t,r)),this}setDocAttribute(e,t){return this.step(new Ti(e,t)),this}addNodeMark(e,t){return this.step(new Dn(e,t)),this}removeNodeMark(e,t){if(!(t instanceof Pe)){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 $r(e,t)),this}split(e,t=1,r){return j1(this,e,t,r),this}addMark(e,t,r){return R1(this,e,t,r),this}removeMark(e,t,r){return L1(this,e,t,r),this}clearIncompatible(e,t,r){return _1(this,e,t,r),this}}const qs=Object.create(null);class Re{constructor(e,t,r){this.$anchor=e,this.$head=t,this.ranges=r||[new e0(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=he.empty){let r=t.content.lastChild,i=null;for(let l=0;l<t.openEnd;l++)i=r,r=r.lastChild;let o=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(o);e.replaceRange(u.map(a.pos),u.map(c.pos),l?he.empty:t),l==0&&iu(e,o,(r?r.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(e,t){let r=e.steps.length,i=this.ranges;for(let o=0;o<i.length;o++){let{$from:s,$to:l}=i[o],a=e.mapping.slice(r),c=a.map(s.pos),u=a.map(l.pos);o?e.deleteRange(c,u):(e.replaceRangeWith(c,u,t),iu(e,r,t.isInline?-1:1))}}static findFrom(e,t,r=!1){let i=e.parent.inlineContent?new Le(e):xr(e.node(0),e.parent,e.pos,e.index(),t,r);if(i)return i;for(let o=e.depth-1;o>=0;o--){let s=t<0?xr(e.node(0),e.node(o),e.before(o+1),e.index(o),t,r):xr(e.node(0),e.node(o),e.after(o+1),e.index(o)+1,t,r);if(s)return s}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new Ht(e.node(0))}static atStart(e){return xr(e,e,0,0,1)||new Ht(e)}static atEnd(e){return xr(e,e,e.content.size,e.childCount,-1)||new Ht(e)}static fromJSON(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=qs[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 qs)throw new RangeError("Duplicate use of selection JSON ID "+e);return qs[e]=t,t.prototype.jsonID=e,t}getBookmark(){return Le.between(this.$anchor,this.$head).getBookmark()}}Re.prototype.visible=!0;class e0{constructor(e,t){this.$from=e,this.$to=t}}let nu=!1;function ru(n){!nu&&!n.parent.inlineContent&&(nu=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+n.parent.type.name+")"))}class Le extends Re{constructor(e,t=e){ru(e),ru(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 i=e.resolve(t.map(this.anchor));return new Le(i.parent.inlineContent?i:r,r)}replace(e,t=he.empty){if(super.replace(e,t),t==he.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof Le&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new Ts(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 Le(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,r=t){let i=e.resolve(t);return new this(i,r==t?i:e.resolve(r))}static between(e,t,r){let i=e.pos-t.pos;if((!r||i)&&(r=i>=0?1:-1),!t.parent.inlineContent){let o=Re.findFrom(t,r,!0)||Re.findFrom(t,-r,!0);if(o)t=o.$head;else return Re.near(t,r)}return e.parent.inlineContent||(i==0?e=t:(e=(Re.findFrom(e,-r,!0)||Re.findFrom(e,r,!0)).$anchor,e.pos<t.pos!=i<0&&(e=t))),new Le(e,t)}}Re.jsonID("text",Le);class Ts{constructor(e,t){this.anchor=e,this.head=t}map(e){return new Ts(e.map(this.anchor),e.map(this.head))}resolve(e){return Le.between(e.resolve(this.anchor),e.resolve(this.head))}}class Ce 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:i}=t.mapResult(this.anchor),o=e.resolve(i);return r?Re.near(o):new Ce(o)}content(){return new he(se.from(this.node),0,0)}eq(e){return e instanceof Ce&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new Bl(this.anchor)}static fromJSON(e,t){if(typeof t.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new Ce(e.resolve(t.anchor))}static create(e,t){return new Ce(e.resolve(t))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}Ce.prototype.visible=!1;Re.jsonID("node",Ce);class Bl{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:r}=e.mapResult(this.anchor);return t?new Ts(r,r):new Bl(r)}resolve(e){let t=e.resolve(this.anchor),r=t.nodeAfter;return r&&Ce.isSelectable(r)?new Ce(t):Re.near(t)}}class Ht extends Re{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=he.empty){if(t==he.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 Ht(e)}map(e){return new Ht(e)}eq(e){return e instanceof Ht}getBookmark(){return t0}}Re.jsonID("all",Ht);const t0={map(){return this},resolve(n){return new Ht(n)}};function xr(n,e,t,r,i,o=!1){if(e.inlineContent)return Le.create(n,t);for(let s=r-(i>0?0:1);i>0?s<e.childCount:s>=0;s+=i){let l=e.child(s);if(l.isAtom){if(!o&&Ce.isSelectable(l))return Ce.create(n,t-(i<0?l.nodeSize:0))}else{let a=xr(n,l,t+i,i<0?l.childCount:0,i,o);if(a)return a}t+=l.nodeSize*i}return null}function iu(n,e,t){let r=n.steps.length-1;if(r<e)return;let i=n.steps[r];if(!(i instanceof qe||i instanceof Ye))return;let o=n.mapping.maps[r],s;o.forEach((l,a,c,u)=>{s==null&&(s=u)}),n.setSelection(Re.near(n.doc.resolve(s),t))}const ou=1,Ji=2,su=4;class n0 extends qf{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|ou)&~Ji,this.storedMarks=null,this}get selectionSet(){return(this.updated&ou)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=Ji,this}ensureMarks(e){return Pe.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&Ji)>0}addStep(e,t){super.addStep(e,t),this.updated=this.updated&~Ji,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)||Pe.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,r){let i=this.doc.type.schema;if(t==null)return e?this.replaceSelectionWith(i.text(e),!0):this.deleteSelection();{if(r==null&&(r=t),r=r??t,!e)return this.deleteRange(t,r);let o=this.storedMarks;if(!o){let s=this.doc.resolve(t);o=r==t?s.marks():s.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(t,r,i.text(e,o)),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|=su,this}get scrolledIntoView(){return(this.updated&su)>0}}function au(n,e){return!e||!n?n:n.bind(e)}class li{constructor(e,t,r){this.name=e,this.init=au(t.init,r),this.apply=au(t.apply,r)}}const r0=[new li("doc",{init(n){return n.doc||n.schema.topNodeType.createAndFill()},apply(n){return n.doc}}),new li("selection",{init(n,e){return n.selection||Re.atStart(e.doc)},apply(n){return n.selection}}),new li("storedMarks",{init(n){return n.storedMarks||null},apply(n,e,t,r){return r.selection.$cursor?n.storedMarks:null}}),new li("scrollToSelection",{init(){return 0},apply(n,e){return n.scrolledIntoView?e+1:e}})];class ea{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=r0.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 li(r.key,r.spec.state,r))})}}class Dr{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 i=this.config.plugins[r];if(i.spec.filterTransaction&&!i.spec.filterTransaction.call(i,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let t=[e],r=this.applyInner(e),i=null;for(;;){let o=!1;for(let s=0;s<this.config.plugins.length;s++){let l=this.config.plugins[s];if(l.spec.appendTransaction){let a=i?i[s].n:0,c=i?i[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),!i){i=[];for(let d=0;d<this.config.plugins.length;d++)i.push(d<s?{state:r,n:t.length}:{state:this,n:0})}t.push(u),r=r.applyInner(u),o=!0}i&&(i[s]={state:r,n:t.length})}}if(!o)return{state:r,transactions:t}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let t=new Dr(this.config),r=this.config.fields;for(let i=0;i<r.length;i++){let o=r[i];t[o.name]=o.apply(e,this[o.name],this,t)}return t}get tr(){return new n0(this)}static create(e){let t=new ea(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new Dr(t);for(let i=0;i<t.fields.length;i++)r[t.fields[i].name]=t.fields[i].init(e,r);return r}reconfigure(e){let t=new ea(this.schema,e.plugins),r=t.fields,i=new Dr(t);for(let o=0;o<r.length;o++){let s=r[o].name;i[s]=this.hasOwnProperty(s)?this[s]:r[o].init(e,i)}return i}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 i=e[r],o=i.spec.state;o&&o.toJSON&&(t[r]=o.toJSON.call(i,this[i.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 i=new ea(e.schema,e.plugins),o=new Dr(i);return i.fields.forEach(s=>{if(s.name=="doc")o.doc=or.fromJSON(e.schema,t.doc);else if(s.name=="selection")o.selection=Re.fromJSON(o.doc,t.selection);else if(s.name=="storedMarks")t.storedMarks&&(o.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)){o[s.name]=c.fromJSON.call(a,e,t[l],o);return}}o[s.name]=s.init(e,o)}}),o}}function eh(n,e,t){for(let r in n){let i=n[r];i instanceof Function?i=i.bind(e):r=="handleDOMEvents"&&(i=eh(i,e,{})),t[r]=i}return t}class bt{constructor(e){this.spec=e,this.props={},e.props&&eh(e.props,this,this.props),this.key=e.key?e.key.key:th("plugin")}getState(e){return e[this.key]}}const ta=Object.create(null);function th(n){return n in ta?n+"$"+ ++ta[n]:(ta[n]=0,n+"$")}class Kt{constructor(e="key"){this.key=th(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const lt=function(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e},xi=function(n){let e=n.assignedSlot||n.parentNode;return e&&e.nodeType==11?e.host:e};let lu=null;const hn=function(n,e,t){let r=lu||(lu=document.createRange());return r.setEnd(n,t??n.nodeValue.length),r.setStart(n,e||0),r},ur=function(n,e,t,r){return t&&(cu(n,e,t,r,-1)||cu(n,e,t,r,1))},i0=/^(img|br|input|textarea|hr)$/i;function cu(n,e,t,r,i){for(;;){if(n==t&&e==r)return!0;if(e==(i<0?0:en(n))){let o=n.parentNode;if(!o||o.nodeType!=1||Fl(n)||i0.test(n.nodeName)||n.contentEditable=="false")return!1;e=lt(n)+(i<0?0:1),n=o}else if(n.nodeType==1){if(n=n.childNodes[e+(i<0?-1:0)],n.contentEditable=="false")return!1;e=i<0?en(n):0}else return!1}}function en(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function o0(n,e,t){for(let r=e==0,i=e==en(n);r||i;){if(n==t)return!0;let o=lt(n);if(n=n.parentNode,!n)return!1;r=r&&o==0,i=i&&o==en(n)}}function Fl(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 xs=function(n){return n.focusNode&&ur(n.focusNode,n.focusOffset,n.anchorNode,n.anchorOffset)};function Xn(n,e){let t=document.createEvent("Event");return t.initEvent("keydown",!0,!0),t.keyCode=n,t.key=t.code=e,t}function s0(n){let e=n.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function a0(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 on=typeof navigator<"u"?navigator:null,uu=typeof document<"u"?document:null,Hn=on&&on.userAgent||"",Ua=/Edge\/(\d+)/.exec(Hn),nh=/MSIE \d/.exec(Hn),ja=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Hn),yt=!!(nh||ja||Ua),Ln=nh?document.documentMode:ja?+ja[1]:Ua?+Ua[1]:0,jt=!yt&&/gecko\/(\d+)/i.test(Hn);jt&&+(/Firefox\/(\d+)/.exec(Hn)||[0,0])[1];const Wa=!yt&&/Chrome\/(\d+)/.exec(Hn),rt=!!Wa,l0=Wa?+Wa[1]:0,dt=!yt&&!!on&&/Apple Computer/.test(on.vendor),zr=dt&&(/Mobile\/\w+/.test(Hn)||!!on&&on.maxTouchPoints>2),Rt=zr||(on?/Mac/.test(on.platform):!1),c0=on?/Win/.test(on.platform):!1,zt=/Android \d/.test(Hn),Pi=!!uu&&"webkitFontSmoothing"in uu.documentElement.style,u0=Pi?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function d0(n){return{left:0,right:n.documentElement.clientWidth,top:0,bottom:n.documentElement.clientHeight}}function dn(n,e){return typeof n=="number"?n:n[e]}function f0(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 du(n,e,t){let r=n.someProp("scrollThreshold")||0,i=n.someProp("scrollMargin")||5,o=n.dom.ownerDocument;for(let s=t||n.dom;s;s=xi(s)){if(s.nodeType!=1)continue;let l=s,a=l==o.body,c=a?d0(o):f0(l),u=0,d=0;if(e.top<c.top+dn(r,"top")?d=-(c.top-e.top+dn(i,"top")):e.bottom>c.bottom-dn(r,"bottom")&&(d=e.bottom-e.top>c.bottom-c.top?e.top+dn(i,"top")-c.top:e.bottom-c.bottom+dn(i,"bottom")),e.left<c.left+dn(r,"left")?u=-(c.left-e.left+dn(i,"left")):e.right>c.right-dn(r,"right")&&(u=e.right-c.right+dn(i,"right")),u||d)if(a)o.defaultView.scrollBy(u,d);else{let f=l.scrollLeft,p=l.scrollTop;d&&(l.scrollTop+=d),u&&(l.scrollLeft+=u);let h=l.scrollLeft-f,g=l.scrollTop-p;e={left:e.left-h,top:e.top-g,right:e.right-h,bottom:e.bottom-g}}if(a||/^(fixed|sticky)$/.test(getComputedStyle(s).position))break}}function h0(n){let e=n.dom.getBoundingClientRect(),t=Math.max(0,e.top),r,i;for(let o=(e.left+e.right)/2,s=t+1;s<Math.min(innerHeight,e.bottom);s+=5){let l=n.root.elementFromPoint(o,s);if(!l||l==n.dom||!n.dom.contains(l))continue;let a=l.getBoundingClientRect();if(a.top>=t-20){r=l,i=a.top;break}}return{refDOM:r,refTop:i,stack:rh(n.dom)}}function rh(n){let e=[],t=n.ownerDocument;for(let r=n;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),n!=t);r=xi(r));return e}function p0({refDOM:n,refTop:e,stack:t}){let r=n?n.getBoundingClientRect().top:0;ih(t,r==0?0:r-e)}function ih(n,e){for(let t=0;t<n.length;t++){let{dom:r,top:i,left:o}=n[t];r.scrollTop!=i+e&&(r.scrollTop=i+e),r.scrollLeft!=o&&(r.scrollLeft=o)}}let yr=null;function m0(n){if(n.setActive)return n.setActive();if(yr)return n.focus(yr);let e=rh(n);n.focus(yr==null?{get preventScroll(){return yr={preventScroll:!0},!0}}:void 0),yr||(yr=!1,ih(e,0))}function oh(n,e){let t,r=2e8,i,o=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=hn(u).getClientRects();else continue;for(let p=0;p<f.length;p++){let h=f[p];if(h.top<=s&&h.bottom>=l){s=Math.max(h.bottom,s),l=Math.min(h.top,l);let g=h.left>e.left?h.left-e.left:h.right<e.left?e.left-h.right:0;if(g<r){t=u,r=g,i=g&&t.nodeType==3?{left:h.right<e.left?h.right:h.left,top:e.top}:e,u.nodeType==1&&g&&(o=d+(e.left>=(h.left+h.right)/2?1:0));continue}}else h.top>e.top&&!a&&h.left<=e.left&&h.right>=e.left&&(a=u,c={left:Math.max(h.left,Math.min(h.right,e.left)),top:h.top});!t&&(e.left>=h.right&&e.top>=h.top||e.left>=h.left&&e.top>=h.bottom)&&(o=d+1)}}return!t&&a&&(t=a,i=c,r=0),t&&t.nodeType==3?g0(t,i):!t||r&&t.nodeType==1?{node:n,offset:o}:oh(t,i)}function g0(n,e){let t=n.nodeValue.length,r=document.createRange();for(let i=0;i<t;i++){r.setEnd(n,i+1),r.setStart(n,i);let o=wn(r,1);if(o.top!=o.bottom&&$l(e,o))return{node:n,offset:i+(e.left>=(o.left+o.right)/2?1:0)}}return{node:n,offset:0}}function $l(n,e){return n.left>=e.left-1&&n.left<=e.right+1&&n.top>=e.top-1&&n.top<=e.bottom+1}function v0(n,e){let t=n.parentNode;return t&&/^li$/i.test(t.nodeName)&&e.left<n.getBoundingClientRect().left?t:n}function y0(n,e,t){let{node:r,offset:i}=oh(e,t),o=-1;if(r.nodeType==1&&!r.firstChild){let s=r.getBoundingClientRect();o=s.left!=s.right&&t.left>(s.left+s.right)/2?1:-1}return n.docView.posFromDOM(r,i,o)}function b0(n,e,t,r){let i=-1;for(let o=e,s=!1;o!=n.dom;){let l=n.docView.nearestDesc(o,!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?i=l.posBefore:(a.right<r.left||a.bottom<r.top)&&(i=l.posAfter)),!l.contentDOM&&i<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}o=l.dom.parentNode}return i>-1?i:n.docView.posFromDOM(e,t,-1)}function sh(n,e,t){let r=n.childNodes.length;if(r&&t.top<t.bottom)for(let i=Math.max(0,Math.min(r-1,Math.floor(r*(e.top-t.top)/(t.bottom-t.top))-2)),o=i;;){let s=n.childNodes[o];if(s.nodeType==1){let l=s.getClientRects();for(let a=0;a<l.length;a++){let c=l[a];if($l(e,c))return sh(s,e,c)}}if((o=(o+1)%r)==i)break}return n}function E0(n,e){let t=n.dom.ownerDocument,r,i=0,o=a0(t,e.left,e.top);o&&({node:r,offset:i}=o);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(!$l(e,c)||(s=sh(n.dom,e,c),!s))return null}if(dt)for(let c=s;r&&c;c=xi(c))c.draggable&&(r=void 0);if(s=v0(s,e),r){if(jt&&r.nodeType==1&&(i=Math.min(i,r.childNodes.length),i<r.childNodes.length)){let u=r.childNodes[i],d;u.nodeName=="IMG"&&(d=u.getBoundingClientRect()).right<=e.left&&d.bottom>e.top&&i++}let c;Pi&&i&&r.nodeType==1&&(c=r.childNodes[i-1]).nodeType==1&&c.contentEditable=="false"&&c.getBoundingClientRect().top>=e.top&&i--,r==n.dom&&i==r.childNodes.length-1&&r.lastChild.nodeType==1&&e.top>r.lastChild.getBoundingClientRect().bottom?l=n.state.doc.content.size:(i==0||r.nodeType!=1||r.childNodes[i-1].nodeName!="BR")&&(l=b0(n,r,i,e))}l==null&&(l=y0(n,s,e));let a=n.docView.nearestDesc(s,!0);return{pos:l,inside:a?a.posAtStart-a.border:-1}}function fu(n){return n.top<n.bottom||n.left<n.right}function wn(n,e){let t=n.getClientRects();if(t.length){let r=t[e<0?0:t.length-1];if(fu(r))return r}return Array.prototype.find.call(t,fu)||n.getBoundingClientRect()}const S0=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function ah(n,e,t){let{node:r,offset:i,atom:o}=n.docView.domFromPos(e,t<0?-1:1),s=Pi||jt;if(r.nodeType==3)if(s&&(S0.test(r.nodeValue)||(t<0?!i:i==r.nodeValue.length))){let a=wn(hn(r,i,i),t);if(jt&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let c=wn(hn(r,i-1,i-1),-1);if(c.top==a.top){let u=wn(hn(r,i,i+1),-1);if(u.top!=a.top)return ri(u,u.left<c.left)}}return a}else{let a=i,c=i,u=t<0?1:-1;return t<0&&!i?(c++,u=-1):t>=0&&i==r.nodeValue.length?(a--,u=1):t<0?a--:c++,ri(wn(hn(r,a,c),u),u<0)}if(!n.state.doc.resolve(e-(o||0)).parent.inlineContent){if(o==null&&i&&(t<0||i==en(r))){let a=r.childNodes[i-1];if(a.nodeType==1)return na(a.getBoundingClientRect(),!1)}if(o==null&&i<en(r)){let a=r.childNodes[i];if(a.nodeType==1)return na(a.getBoundingClientRect(),!0)}return na(r.getBoundingClientRect(),t>=0)}if(o==null&&i&&(t<0||i==en(r))){let a=r.childNodes[i-1],c=a.nodeType==3?hn(a,en(a)-(s?0:1)):a.nodeType==1&&(a.nodeName!="BR"||!a.nextSibling)?a:null;if(c)return ri(wn(c,1),!1)}if(o==null&&i<en(r)){let a=r.childNodes[i];for(;a.pmViewDesc&&a.pmViewDesc.ignoreForCoords;)a=a.nextSibling;let c=a?a.nodeType==3?hn(a,0,s?0:1):a.nodeType==1?a:null:null;if(c)return ri(wn(c,-1),!0)}return ri(wn(r.nodeType==3?hn(r):r,-t),t>=0)}function ri(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 na(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 lh(n,e,t){let r=n.state,i=n.root.activeElement;r!=e&&n.updateState(e),i!=n.dom&&n.focus();try{return t()}finally{r!=e&&n.updateState(r),i!=n.dom&&i&&i.focus()}}function C0(n,e,t){let r=e.selection,i=t=="up"?r.$from:r.$to;return lh(n,e,()=>{let{node:o}=n.docView.domFromPos(i.pos,t=="up"?-1:1);for(;;){let l=n.docView.nearestDesc(o,!0);if(!l)break;if(l.node.isBlock){o=l.contentDOM||l.dom;break}o=l.dom.parentNode}let s=ah(n,i.pos,1);for(let l=o.firstChild;l;l=l.nextSibling){let a;if(l.nodeType==1)a=l.getClientRects();else if(l.nodeType==3)a=hn(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 T0=/[\u0590-\u08ac]/;function x0(n,e,t){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let i=r.parentOffset,o=!i,s=i==r.parent.content.size,l=n.domSelection();return!T0.test(r.parent.textContent)||!l.modify?t=="left"||t=="backward"?o:s:lh(n,e,()=>{let{focusNode:a,focusOffset:c,anchorNode:u,anchorOffset:d}=n.domSelectionRange(),f=l.caretBidiLevel;l.modify("move",t,"character");let p=r.depth?n.docView.domAfterPos(r.before()):n.dom,{focusNode:h,focusOffset:g}=n.domSelectionRange(),v=h&&!p.contains(h.nodeType==1?h:h.parentNode)||a==h&&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),v})}let hu=null,pu=null,mu=!1;function A0(n,e,t){return hu==e&&pu==t?mu:(hu=e,pu=t,mu=t=="up"||t=="down"?C0(n,e,t):x0(n,e,t))}const _t=0,gu=1,Zn=2,sn=3;class Bi{constructor(e,t,r,i){this.parent=e,this.children=t,this.dom=r,this.contentDOM=i,this.dirty=_t,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 i=this.children[t];if(i==e)return r;r+=i.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 o,s;if(e==this.contentDOM)o=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;o=e.previousSibling}for(;o&&!((s=o.pmViewDesc)&&s.parent==this);)o=o.previousSibling;return o?this.posBeforeChild(s)+s.size:this.posAtStart}else{let o,s;if(e==this.contentDOM)o=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;o=e.nextSibling}for(;o&&!((s=o.pmViewDesc)&&s.parent==this);)o=o.nextSibling;return o?this.posBeforeChild(s):this.posAtEnd}let i;if(e==this.dom&&this.contentDOM)i=t>lt(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))i=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(t==0)for(let o=e;;o=o.parentNode){if(o==this.dom){i=!1;break}if(o.previousSibling)break}if(i==null&&t==e.childNodes.length)for(let o=e;;o=o.parentNode){if(o==this.dom){i=!0;break}if(o.nextSibling)break}}return i??r>0?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let r=!0,i=e;i;i=i.parentNode){let o=this.getDesc(i),s;if(o&&(!t||o.node))if(r&&(s=o.nodeDOM)&&!(s.nodeType==1?s.contains(e.nodeType==1?e:e.parentNode):s==e))r=!1;else return o}}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 i=e;i;i=i.parentNode){let o=this.getDesc(i);if(o)return o.localPosFromDOM(e,t,r)}return-1}descAt(e){for(let t=0,r=0;t<this.children.length;t++){let i=this.children[t],o=r+i.size;if(r==e&&o!=r){for(;!i.border&&i.children.length;)i=i.children[0];return i}if(e<o)return i.descAt(e-r-i.border);r=o}}domFromPos(e,t){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let r=0,i=0;for(let o=0;r<this.children.length;r++){let s=this.children[r],l=o+s.size;if(l>e||s instanceof uh){i=e-o;break}o=l}if(i)return this.children[r].domFromPos(i-this.children[r].border,t);for(let o;r&&!(o=this.children[r-1]).size&&o instanceof ch&&o.side>=0;r--);if(t<=0){let o,s=!0;for(;o=r?this.children[r-1]:null,!(!o||o.dom.parentNode==this.contentDOM);r--,s=!1);return o&&t&&s&&!o.border&&!o.domAtom?o.domFromPos(o.size,t):{node:this.contentDOM,offset:o?lt(o.dom)+1:0}}else{let o,s=!0;for(;o=r<this.children.length?this.children[r]:null,!(!o||o.dom.parentNode==this.contentDOM);r++,s=!1);return o&&s&&!o.border&&!o.domAtom?o.domFromPos(0,t):{node:this.contentDOM,offset:o?lt(o.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 i=-1,o=-1;for(let s=r,l=0;;l++){let a=this.children[l],c=s+a.size;if(i==-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)){i=lt(f.dom)+1;break}e-=f.size}i==-1&&(i=0)}if(i>-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)){o=lt(d.dom);break}t+=d.size}o==-1&&(o=this.contentDOM.childNodes.length);break}s=c}return{node:this.contentDOM,from:e,to:t,fromOffset:i,toOffset:o}}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,i=!1){let o=Math.min(e,t),s=Math.max(e,t);for(let f=0,p=0;f<this.children.length;f++){let h=this.children[f],g=p+h.size;if(o>p&&s<g)return h.setSelection(e-p-h.border,t-p-h.border,r,i);p=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((jt||dt)&&e==t){let{node:f,offset:p}=l;if(f.nodeType==3){if(u=!!(p&&f.nodeValue[p-1]==`
15
- `),u&&p==f.nodeValue.length)for(let h=f,g;h;h=h.parentNode){if(g=h.nextSibling){g.nodeName=="BR"&&(l=a={node:g.parentNode,offset:lt(g)+1});break}let v=h.pmViewDesc;if(v&&v.node&&v.node.isBlock)break}}else{let h=f.childNodes[p-1];u=h&&(h.nodeName=="BR"||h.contentEditable=="false")}}if(jt&&c.focusNode&&c.focusNode!=a.node&&c.focusNode.nodeType==1){let f=c.focusNode.childNodes[c.focusOffset];f&&f.contentEditable=="false"&&(i=!0)}if(!(i||u&&dt)&&ur(l.node,l.offset,c.anchorNode,c.anchorOffset)&&ur(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 p=l;l=a,a=p}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,i=0;i<this.children.length;i++){let o=this.children[i],s=r+o.size;if(r==s?e<=s&&t>=r:e<s&&t>r){let l=r+o.border,a=s-o.border;if(e>=l&&t<=a){this.dirty=e==r||t==s?Zn:gu,e==l&&t==a&&(o.contentLost||o.dom.parentNode!=this.contentDOM)?o.dirty=sn:o.markDirty(e-l,t-l);return}else o.dirty=o.dom==o.contentDOM&&o.dom.parentNode==this.contentDOM&&!o.children.length?Zn:sn}r=s}this.dirty=Zn}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let r=e==1?Zn:gu;t.dirty<r&&(t.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}}class ch extends Bi{constructor(e,t,r,i){let o,s=t.type.toDOM;if(typeof s=="function"&&(s=s(r,()=>{if(!o)return i;if(o.parent)return o.parent.posBeforeChild(o)})),!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,o=this}matchesWidget(e){return this.dirty==_t&&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 w0 extends Bi{constructor(e,t,r,i){super(e,[],t,null),this.textDOM=r,this.text=i}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 dr extends Bi{constructor(e,t,r,i){super(e,[],r,i),this.mark=t}static create(e,t,r,i){let o=i.nodeViews[t.type.name],s=o&&o(t,i,r);return(!s||!s.dom)&&(s=tn.renderSpec(document,t.type.spec.toDOM(t,r))),new dr(e,t,s.dom,s.contentDOM||s.dom)}parseRule(){return this.dirty&sn||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=sn&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),this.dirty!=_t){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=_t}}slice(e,t,r){let i=dr.create(this.parent,this.mark,!0,r),o=this.children,s=this.size;t<s&&(o=Ya(o,t,s,r)),e>0&&(o=Ya(o,0,e,r));for(let l=0;l<o.length;l++)o[l].parent=i;return i.children=o,i}}class _n extends Bi{constructor(e,t,r,i,o,s,l,a,c){super(e,[],o,s),this.node=t,this.outerDeco=r,this.innerDeco=i,this.nodeDOM=l}static create(e,t,r,i,o,s){let l=o.nodeViews[t.type.name],a,c=l&&l(t,o,()=>{if(!a)return s;if(a.parent)return a.parent.posBeforeChild(a)},r,i),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}=tn.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=hh(u,r,t),c?a=new k0(e,t,r,i,u,d||null,f,c,o,s+1):t.isText?new As(e,t,r,i,u,f,o):new _n(e,t,r,i,u,d||null,f,o,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=()=>se.empty)}return e}matchesNode(e,t,r){return this.dirty==_t&&e.eq(this.node)&&Ga(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,i=t,o=e.composing?this.localCompositionInfo(e,t):null,s=o&&o.pos>-1?o:null,l=o&&o.pos<0,a=new M0(this,s&&s.node,e);D0(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?Pe.none:this.node.child(u).marks,r,e),a.placeWidget(c,e,i)},(c,u,d,f)=>{a.syncToMarks(c.marks,r,e);let p;a.findNodeMatch(c,u,d,f)||l&&e.state.selection.from>i&&e.state.selection.to<i+c.nodeSize&&(p=a.findIndexWithChild(o.node))>-1&&a.updateNodeAt(c,u,d,p,e)||a.updateNextNode(c,u,d,e,f,i)||a.addNode(c,u,d,e,i),i+=c.nodeSize}),a.syncToMarks([],r,e),this.node.isTextblock&&a.addTextblockHacks(),a.destroyRest(),(a.changed||this.dirty==Zn)&&(s&&this.protectLocalComposition(e,s),dh(this.contentDOM,this.children,e),zr&&R0(this.dom))}localCompositionInfo(e,t){let{from:r,to:i}=e.state.selection;if(!(e.state.selection instanceof Le)||r<t||i>t+this.node.content.size)return null;let o=e.domSelectionRange(),s=L0(o.focusNode,o.focusOffset);if(!s||!this.dom.contains(s.parentNode))return null;if(this.node.inlineContent){let l=s.nodeValue,a=_0(this.node.content,l,r-t,i-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:i}){if(this.getDesc(t))return;let o=t;for(;o.parentNode!=this.contentDOM;o=o.parentNode){for(;o.previousSibling;)o.parentNode.removeChild(o.previousSibling);for(;o.nextSibling;)o.parentNode.removeChild(o.nextSibling);o.pmViewDesc&&(o.pmViewDesc=void 0)}let s=new w0(this,o,t,i);e.input.compositionNodes.push(s),this.children=Ya(this.children,r,r+i.length,e,s)}update(e,t,r,i){return this.dirty==sn||!e.sameMarkup(this.node)?!1:(this.updateInner(e,t,r,i),!0)}updateInner(e,t,r,i){this.updateOuterDeco(t),this.node=e,this.innerDeco=r,this.contentDOM&&this.updateChildren(i,this.posAtStart),this.dirty=_t}updateOuterDeco(e){if(Ga(e,this.outerDeco))return;let t=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=fh(this.dom,this.nodeDOM,Ka(this.outerDeco,this.node,t),Ka(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 vu(n,e,t,r,i){hh(r,e,n);let o=new _n(void 0,n,e,t,r,r,r,i,0);return o.contentDOM&&o.updateChildren(i,0),o}class As extends _n{constructor(e,t,r,i,o,s,l){super(e,t,r,i,o,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,i){return this.dirty==sn||this.dirty!=_t&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(t),(this.dirty!=_t||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,i.trackWrites==this.nodeDOM&&(i.trackWrites=null)),this.node=e,this.dirty=_t,!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 i=this.node.cut(e,t),o=document.createTextNode(i.text);return new As(this.parent,i,this.outerDeco,this.innerDeco,o,o,r)}markDirty(e,t){super.markDirty(e,t),this.dom!=this.nodeDOM&&(e==0||t==this.nodeDOM.nodeValue.length)&&(this.dirty=sn)}get domAtom(){return!1}}class uh extends Bi{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==_t&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class k0 extends _n{constructor(e,t,r,i,o,s,l,a,c,u){super(e,t,r,i,o,s,l,c,u),this.spec=a}update(e,t,r,i){if(this.dirty==sn)return!1;if(this.spec.update){let o=this.spec.update(e,t,r);return o&&this.updateInner(e,t,r,i),o}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,t,r,i)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,r,i){this.spec.setSelection?this.spec.setSelection(e,t,r):super.setSelection(e,t,r,i)}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 dh(n,e,t){let r=n.firstChild,i=!1;for(let o=0;o<e.length;o++){let s=e[o],l=s.dom;if(l.parentNode==n){for(;l!=r;)r=yu(r),i=!0;r=r.nextSibling}else i=!0,n.insertBefore(l,r);if(s instanceof dr){let a=r?r.previousSibling:n.lastChild;dh(s.contentDOM,s.children,t),r=a?a.nextSibling:n.firstChild}}for(;r;)r=yu(r),i=!0;i&&t.trackWrites==n&&(t.trackWrites=null)}const hi=function(n){n&&(this.nodeName=n)};hi.prototype=Object.create(null);const qn=[new hi];function Ka(n,e,t){if(n.length==0)return qn;let r=t?qn[0]:new hi,i=[r];for(let o=0;o<n.length;o++){let s=n[o].type.attrs;if(s){s.nodeName&&i.push(r=new hi(s.nodeName));for(let l in s){let a=s[l];a!=null&&(t&&i.length==1&&i.push(r=new hi(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 i}function fh(n,e,t,r){if(t==qn&&r==qn)return e;let i=e;for(let o=0;o<r.length;o++){let s=r[o],l=t[o];if(o){let a;l&&l.nodeName==s.nodeName&&i!=n&&(a=i.parentNode)&&a.nodeName.toLowerCase()==s.nodeName||(a=document.createElement(s.nodeName),a.pmIsDeco=!0,a.appendChild(i),l=qn[0]),i=a}O0(i,l||qn[0],s)}return i}function O0(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):[],i=t.class?t.class.split(" ").filter(Boolean):[];for(let o=0;o<r.length;o++)i.indexOf(r[o])==-1&&n.classList.remove(r[o]);for(let o=0;o<i.length;o++)r.indexOf(i[o])==-1&&n.classList.add(i[o]);n.classList.length==0&&n.removeAttribute("class")}if(e.style!=t.style){if(e.style){let r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,i;for(;i=r.exec(e.style);)n.style.removeProperty(i[1])}t.style&&(n.style.cssText+=t.style)}}function hh(n,e,t){return fh(n,n,qn,Ka(e,t,n.nodeType!=1))}function Ga(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 yu(n){let e=n.nextSibling;return n.parentNode.removeChild(n),e}class M0{constructor(e,t,r){this.lock=t,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=N0(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 i=0,o=this.stack.length>>1,s=Math.min(o,e.length);for(;i<s&&(i==o-1?this.top:this.stack[i+1<<1]).matchesMark(e[i])&&e[i].type.spec.spanning!==!1;)i++;for(;i<o;)this.destroyRest(),this.top.dirty=_t,this.index=this.stack.pop(),this.top=this.stack.pop(),o--;for(;o<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[o])&&!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=dr.create(this.top,e[o],t,r);this.top.children.splice(this.index,0,a),this.top=a,this.changed=!0}this.index=0,o++}}findNodeMatch(e,t,r,i){let o=-1,s;if(i>=this.preMatch.index&&(s=this.preMatch.matches[i-this.preMatch.index]).parent==this.top&&s.matchesNode(e,t,r))o=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)){o=l;break}}return o<0?!1:(this.destroyBetween(this.index,o),this.index++,!0)}updateNodeAt(e,t,r,i,o){let s=this.top.children[i];return s.dirty==sn&&s.dom==s.contentDOM&&(s.dirty=Zn),s.update(e,t,r,o)?(this.destroyBetween(this.index,i),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 i=this.index;i<this.top.children.length;i++)if(this.top.children[i]==r)return i}return-1}e=t}}updateNextNode(e,t,r,i,o,s){for(let l=this.index;l<this.top.children.length;l++){let a=this.top.children[l];if(a instanceof _n){let c=this.preMatch.matched.get(a);if(c!=null&&c!=o)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!=sn&&Ga(t,a.outerDeco));if(!f&&a.update(e,t,r,i))return this.destroyBetween(this.index,l),a.dom!=u&&(this.changed=!0),this.index++,!0;if(!f&&(d=this.recreateWrapper(a,e,t,r,i,s)))return this.top.children[this.index]=d,d.contentDOM&&(d.dirty=Zn,d.updateChildren(i,s+1),d.dirty=_t),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,t,r,i,o,s){if(e.dirty||t.isAtom||!e.children.length||!e.node.content.eq(t.content))return null;let l=_n.create(this.top,t,r,i,o,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,i,o){let s=_n.create(this.top,e,t,r,i,o);s.contentDOM&&s.updateChildren(i,o+1),this.top.children.splice(this.index++,0,s),this.changed=!0}placeWidget(e,t,r){let i=this.index<this.top.children.length?this.top.children[this.index]:null;if(i&&i.matchesWidget(e)&&(e==i.widget||!i.widget.type.toDOM.parentNode))this.index++;else{let o=new ch(this.top,e,t,r);this.top.children.splice(this.index++,0,o),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],t=this.top;for(;e instanceof dr;)t=e,e=t.children[t.children.length-1];(!e||!(e instanceof As)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((dt||rt)&&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 i=new uh(this.top,[],r,null);t!=this.top?t.children.push(i):t.children.splice(this.index++,0,i),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function N0(n,e){let t=e,r=t.children.length,i=n.childCount,o=new Map,s=[];e:for(;i>0;){let l;for(;;)if(r){let c=t.children[r-1];if(c instanceof dr)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(i-1))break;--i,o.set(l,i),s.push(l)}}return{index:i,matched:o,matches:s.reverse()}}function I0(n,e){return n.type.side-e.type.side}function D0(n,e,t,r){let i=e.locals(n),o=0;if(i.length==0){for(let c=0;c<n.childCount;c++){let u=n.child(c);r(u,i,e.forChild(o,u),c),o+=u.nodeSize}return}let s=0,l=[],a=null;for(let c=0;;){let u,d;for(;s<i.length&&i[s].to==o;){let v=i[s++];v.widget&&(u?(d||(d=[u])).push(v):u=v)}if(u)if(d){d.sort(I0);for(let v=0;v<d.length;v++)t(d[v],c,!!a)}else t(u,c,!!a);let f,p;if(a)p=-1,f=a,a=null;else if(c<n.childCount)p=c,f=n.child(c++);else break;for(let v=0;v<l.length;v++)l[v].to<=o&&l.splice(v--,1);for(;s<i.length&&i[s].from<=o&&i[s].to>o;)l.push(i[s++]);let h=o+f.nodeSize;if(f.isText){let v=h;s<i.length&&i[s].from<v&&(v=i[s].from);for(let S=0;S<l.length;S++)l[S].to<v&&(v=l[S].to);v<h&&(a=f.cut(v-o),f=f.cut(0,v-o),h=v,p=-1)}let g=f.isInline&&!f.isLeaf?l.filter(v=>!v.inline):l.slice();r(f,g,e.forChild(o,f),p),o=h}}function R0(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 L0(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=en(n)}else if(n.nodeType==1&&e<n.childNodes.length)n=n.childNodes[e],e=0;else return null}}function _0(n,e,t,r){for(let i=0,o=0;i<n.childCount&&o<=r;){let s=n.child(i++),l=o;if(o+=s.nodeSize,!s.isText)continue;let a=s.text;for(;i<n.childCount;){let c=n.child(i++);if(o+=c.nodeSize,!c.isText)break;a+=c.text}if(o>=t){if(o>=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 Ya(n,e,t,r,i){let o=[];for(let s=0,l=0;s<n.length;s++){let a=n[s],c=l,u=l+=a.size;c>=t||u<=e?o.push(a):(c<e&&o.push(a.slice(0,e-c,r)),i&&(o.push(i),i=void 0),u>t&&o.push(a.slice(t-c,a.size,r)))}return o}function Vl(n,e=null){let t=n.domSelectionRange(),r=n.state.doc;if(!t.focusNode)return null;let i=n.docView.nearestDesc(t.focusNode),o=i&&i.size==0,s=n.docView.posFromDOM(t.focusNode,t.focusOffset,1);if(s<0)return null;let l=r.resolve(s),a,c;if(xs(t)){for(a=l;i&&!i.node;)i=i.parent;let u=i.node;if(i&&u.isAtom&&Ce.isSelectable(u)&&i.parent&&!(u.isInline&&o0(t.focusNode,t.focusOffset,i.dom))){let d=i.posBefore;c=new Ce(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&&!o?1:-1;c=zl(n,a,l,u)}return c}function ph(n){return n.editable?n.hasFocus():gh(n)&&document.activeElement&&document.activeElement.contains(n.dom)}function gn(n,e=!1){let t=n.state.selection;if(mh(n,t),!!ph(n)){if(!e&&n.input.mouseDown&&n.input.mouseDown.allowDefault&&rt){let r=n.domSelectionRange(),i=n.domObserver.currentSelection;if(r.anchorNode&&i.anchorNode&&ur(r.anchorNode,r.anchorOffset,i.anchorNode,i.anchorOffset)){n.input.mouseDown.delayedSelectionSync=!0,n.domObserver.setCurSelection();return}}if(n.domObserver.disconnectSelection(),n.cursorWrapper)B0(n);else{let{anchor:r,head:i}=t,o,s;bu&&!(t instanceof Le)&&(t.$from.parent.inlineContent||(o=Eu(n,t.from)),!t.empty&&!t.$from.parent.inlineContent&&(s=Eu(n,t.to))),n.docView.setSelection(r,i,n.root,e),bu&&(o&&Su(o),s&&Su(s)),t.visible?n.dom.classList.remove("ProseMirror-hideselection"):(n.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&P0(n))}n.domObserver.setCurSelection(),n.domObserver.connectSelection()}}const bu=dt||rt&&l0<63;function Eu(n,e){let{node:t,offset:r}=n.docView.domFromPos(e,0),i=r<t.childNodes.length?t.childNodes[r]:null,o=r?t.childNodes[r-1]:null;if(dt&&i&&i.contentEditable=="false")return ra(i);if((!i||i.contentEditable=="false")&&(!o||o.contentEditable=="false")){if(i)return ra(i);if(o)return ra(o)}}function ra(n){return n.contentEditable="true",dt&&n.draggable&&(n.draggable=!1,n.wasDraggable=!0),n}function Su(n){n.contentEditable="false",n.wasDraggable&&(n.draggable=!0,n.wasDraggable=null)}function P0(n){let e=n.dom.ownerDocument;e.removeEventListener("selectionchange",n.input.hideSelectionGuard);let t=n.domSelectionRange(),r=t.anchorNode,i=t.anchorOffset;e.addEventListener("selectionchange",n.input.hideSelectionGuard=()=>{(t.anchorNode!=r||t.anchorOffset!=i)&&(e.removeEventListener("selectionchange",n.input.hideSelectionGuard),setTimeout(()=>{(!ph(n)||n.state.selection.visible)&&n.dom.classList.remove("ProseMirror-hideselection")},20))})}function B0(n){let e=n.domSelection(),t=document.createRange(),r=n.cursorWrapper.dom,i=r.nodeName=="IMG";i?t.setEnd(r.parentNode,lt(r)+1):t.setEnd(r,0),t.collapse(!1),e.removeAllRanges(),e.addRange(t),!i&&!n.state.selection.visible&&yt&&Ln<=11&&(r.disabled=!0,r.disabled=!1)}function mh(n,e){if(e instanceof Ce){let t=n.docView.descAt(e.from);t!=n.lastSelectedViewDesc&&(Cu(n),t&&t.selectNode(),n.lastSelectedViewDesc=t)}else Cu(n)}function Cu(n){n.lastSelectedViewDesc&&(n.lastSelectedViewDesc.parent&&n.lastSelectedViewDesc.deselectNode(),n.lastSelectedViewDesc=void 0)}function zl(n,e,t,r){return n.someProp("createSelectionBetween",i=>i(n,e,t))||Le.between(e,t,r)}function Tu(n){return n.editable&&!n.hasFocus()?!1:gh(n)}function gh(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 F0(n){let e=n.docView.domFromPos(n.state.selection.anchor,0),t=n.domSelectionRange();return ur(e.node,e.offset,t.anchorNode,t.anchorOffset)}function Ja(n,e){let{$anchor:t,$head:r}=n.selection,i=e>0?t.max(r):t.min(r),o=i.parent.inlineContent?i.depth?n.doc.resolve(e>0?i.after():i.before()):null:i;return o&&Re.findFrom(o,e)}function kn(n,e){return n.dispatch(n.state.tr.setSelection(e).scrollIntoView()),!0}function xu(n,e,t){let r=n.state.selection;if(r instanceof Le)if(t.indexOf("s")>-1){let{$head:i}=r,o=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter;if(!o||o.isText||!o.isLeaf)return!1;let s=n.state.doc.resolve(i.pos+o.nodeSize*(e<0?-1:1));return kn(n,new Le(r.$anchor,s))}else if(r.empty){if(n.endOfTextblock(e>0?"forward":"backward")){let i=Ja(n.state,e);return i&&i instanceof Ce?kn(n,i):!1}else if(!(Rt&&t.indexOf("m")>-1)){let i=r.$head,o=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter,s;if(!o||o.isText)return!1;let l=e<0?i.pos-o.nodeSize:i.pos;return o.isAtom||(s=n.docView.descAt(l))&&!s.contentDOM?Ce.isSelectable(o)?kn(n,new Ce(e<0?n.state.doc.resolve(i.pos-o.nodeSize):i)):Pi?kn(n,new Le(n.state.doc.resolve(e<0?l:l+o.nodeSize))):!1:!1}}else return!1;else{if(r instanceof Ce&&r.node.isInline)return kn(n,new Le(e>0?r.$to:r.$from));{let i=Ja(n.state,e);return i?kn(n,i):!1}}}function xo(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function pi(n,e){let t=n.pmViewDesc;return t&&t.size==0&&(e<0||n.nextSibling||n.nodeName!="BR")}function br(n,e){return e<0?$0(n):V0(n)}function $0(n){let e=n.domSelectionRange(),t=e.focusNode,r=e.focusOffset;if(!t)return;let i,o,s=!1;for(jt&&t.nodeType==1&&r<xo(t)&&pi(t.childNodes[r],-1)&&(s=!0);;)if(r>0){if(t.nodeType!=1)break;{let l=t.childNodes[r-1];if(pi(l,-1))i=t,o=--r;else if(l.nodeType==3)t=l,r=t.nodeValue.length;else break}}else{if(vh(t))break;{let l=t.previousSibling;for(;l&&pi(l,-1);)i=t.parentNode,o=lt(l),l=l.previousSibling;if(l)t=l,r=xo(t);else{if(t=t.parentNode,t==n.dom)break;r=0}}}s?Xa(n,t,r):i&&Xa(n,i,o)}function V0(n){let e=n.domSelectionRange(),t=e.focusNode,r=e.focusOffset;if(!t)return;let i=xo(t),o,s;for(;;)if(r<i){if(t.nodeType!=1)break;let l=t.childNodes[r];if(pi(l,1))o=t,s=++r;else break}else{if(vh(t))break;{let l=t.nextSibling;for(;l&&pi(l,1);)o=l.parentNode,s=lt(l)+1,l=l.nextSibling;if(l)t=l,r=0,i=xo(t);else{if(t=t.parentNode,t==n.dom)break;r=i=0}}}o&&Xa(n,o,s)}function vh(n){let e=n.pmViewDesc;return e&&e.node&&e.node.isBlock}function z0(n,e){for(;n&&e==n.childNodes.length&&!Fl(n);)e=lt(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 H0(n,e){for(;n&&!e&&!Fl(n);)e=lt(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 Xa(n,e,t){if(e.nodeType!=3){let o,s;(s=z0(e,t))?(e=s,t=0):(o=H0(e,t))&&(e=o,t=o.nodeValue.length)}let r=n.domSelection();if(xs(r)){let o=document.createRange();o.setEnd(e,t),o.setStart(e,t),r.removeAllRanges(),r.addRange(o)}else r.extend&&r.extend(e,t);n.domObserver.setCurSelection();let{state:i}=n;setTimeout(()=>{n.state==i&&gn(n)},50)}function Au(n,e){let t=n.state.doc.resolve(e);if(!(rt||c0)&&t.parent.inlineContent){let i=n.coordsAtPos(e);if(e>t.start()){let o=n.coordsAtPos(e-1),s=(o.top+o.bottom)/2;if(s>i.top&&s<i.bottom&&Math.abs(o.left-i.left)>1)return o.left<i.left?"ltr":"rtl"}if(e<t.end()){let o=n.coordsAtPos(e+1),s=(o.top+o.bottom)/2;if(s>i.top&&s<i.bottom&&Math.abs(o.left-i.left)>1)return o.left>i.left?"ltr":"rtl"}}return getComputedStyle(n.dom).direction=="rtl"?"rtl":"ltr"}function wu(n,e,t){let r=n.state.selection;if(r instanceof Le&&!r.empty||t.indexOf("s")>-1||Rt&&t.indexOf("m")>-1)return!1;let{$from:i,$to:o}=r;if(!i.parent.inlineContent||n.endOfTextblock(e<0?"up":"down")){let s=Ja(n.state,e);if(s&&s instanceof Ce)return kn(n,s)}if(!i.parent.inlineContent){let s=e<0?i:o,l=r instanceof Ht?Re.near(s,e):Re.findFrom(s,e);return l?kn(n,l):!1}return!1}function ku(n,e){if(!(n.state.selection instanceof Le))return!0;let{$head:t,$anchor:r,empty:i}=n.state.selection;if(!t.sameParent(r))return!0;if(!i)return!1;if(n.endOfTextblock(e>0?"forward":"backward"))return!0;let o=!t.textOffset&&(e<0?t.nodeBefore:t.nodeAfter);if(o&&!o.isText){let s=n.state.tr;return e<0?s.delete(t.pos-o.nodeSize,t.pos):s.delete(t.pos,t.pos+o.nodeSize),n.dispatch(s),!0}return!1}function Ou(n,e,t){n.domObserver.stop(),e.contentEditable=t,n.domObserver.start()}function U0(n){if(!dt||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;Ou(n,r,"true"),setTimeout(()=>Ou(n,r,"false"),20)}return!1}function j0(n){let e="";return n.ctrlKey&&(e+="c"),n.metaKey&&(e+="m"),n.altKey&&(e+="a"),n.shiftKey&&(e+="s"),e}function W0(n,e){let t=e.keyCode,r=j0(e);if(t==8||Rt&&t==72&&r=="c")return ku(n,-1)||br(n,-1);if(t==46&&!e.shiftKey||Rt&&t==68&&r=="c")return ku(n,1)||br(n,1);if(t==13||t==27)return!0;if(t==37||Rt&&t==66&&r=="c"){let i=t==37?Au(n,n.state.selection.from)=="ltr"?-1:1:-1;return xu(n,i,r)||br(n,i)}else if(t==39||Rt&&t==70&&r=="c"){let i=t==39?Au(n,n.state.selection.from)=="ltr"?1:-1:1;return xu(n,i,r)||br(n,i)}else{if(t==38||Rt&&t==80&&r=="c")return wu(n,-1,r)||br(n,-1);if(t==40||Rt&&t==78&&r=="c")return U0(n)||wu(n,1,r)||br(n,1);if(r==(Rt?"m":"c")&&(t==66||t==73||t==89||t==90))return!0}return!1}function yh(n,e){n.someProp("transformCopied",p=>{e=p(e,n)});let t=[],{content:r,openStart:i,openEnd:o}=e;for(;i>1&&o>1&&r.childCount==1&&r.firstChild.childCount==1;){i--,o--;let p=r.firstChild;t.push(p.type.name,p.attrs!=p.type.defaultAttrs?p.attrs:null),r=p.content}let s=n.someProp("clipboardSerializer")||tn.fromSchema(n.state.schema),l=xh(),a=l.createElement("div");a.appendChild(s.serializeFragment(r,{document:l}));let c=a.firstChild,u,d=0;for(;c&&c.nodeType==1&&(u=Th[c.nodeName.toLowerCase()]);){for(let p=u.length-1;p>=0;p--){let h=l.createElement(u[p]);for(;a.firstChild;)h.appendChild(a.firstChild);a.appendChild(h),d++}c=a.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${i} ${o}${d?` -${d}`:""} ${JSON.stringify(t)}`);let f=n.someProp("clipboardTextSerializer",p=>p(e,n))||e.content.textBetween(0,e.content.size,`
16
-
17
- `);return{dom:a,text:f}}function bh(n,e,t,r,i){let o=i.parent.type.spec.code,s,l;if(!t&&!e)return null;let a=e&&(r||o||!t);if(a){if(n.someProp("transformPastedText",f=>{e=f(e,o||r,n)}),o)return e?new he(se.from(n.state.schema.text(e.replace(/\r\n?/g,`
18
- `))),0,0):he.empty;let d=n.someProp("clipboardTextParser",f=>f(e,i,r,n));if(d)l=d;else{let f=i.marks(),{schema:p}=n.state,h=tn.fromSchema(p);s=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(g=>{let v=s.appendChild(document.createElement("p"));g&&v.appendChild(h.serializeNode(p.text(g,f)))})}}else n.someProp("transformPastedHTML",d=>{t=d(t,n)}),s=Y0(t),Pi&&J0(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")||Fr.fromSchema(n.state.schema)).parseSlice(s,{preserveWhitespace:!!(a||u),context:i,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!K0.test(f.parentNode.nodeName)?{ignore:!0}:null}})),u)l=X0(Mu(l,+u[1],+u[2]),u[4]);else if(l=he.maxOpen(G0(l.content,i),!0),l.openStart||l.openEnd){let d=0,f=0;for(let p=l.content.firstChild;d<l.openStart&&!p.type.spec.isolating;d++,p=p.firstChild);for(let p=l.content.lastChild;f<l.openEnd&&!p.type.spec.isolating;f++,p=p.lastChild);l=Mu(l,d,f)}return n.someProp("transformPasted",d=>{l=d(l,n)}),l}const K0=/^(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 G0(n,e){if(n.childCount<2)return n;for(let t=e.depth;t>=0;t--){let i=e.node(t).contentMatchAt(e.index(t)),o,s=[];if(n.forEach(l=>{if(!s)return;let a=i.findWrapping(l.type),c;if(!a)return s=null;if(c=s.length&&o.length&&Sh(a,o,l,s[s.length-1],0))s[s.length-1]=c;else{s.length&&(s[s.length-1]=Ch(s[s.length-1],o.length));let u=Eh(l,a);s.push(u),i=i.matchType(u.type),o=a}}),s)return se.from(s)}return n}function Eh(n,e,t=0){for(let r=e.length-1;r>=t;r--)n=e[r].create(null,se.from(n));return n}function Sh(n,e,t,r,i){if(i<n.length&&i<e.length&&n[i]==e[i]){let o=Sh(n,e,t,r.lastChild,i+1);if(o)return r.copy(r.content.replaceChild(r.childCount-1,o));if(r.contentMatchAt(r.childCount).matchType(i==n.length-1?t.type:n[i+1]))return r.copy(r.content.append(se.from(Eh(t,n,i+1))))}}function Ch(n,e){if(e==0)return n;let t=n.content.replaceChild(n.childCount-1,Ch(n.lastChild,e-1)),r=n.contentMatchAt(n.childCount).fillBefore(se.empty,!0);return n.copy(t.append(r))}function Qa(n,e,t,r,i,o){let s=e<0?n.firstChild:n.lastChild,l=s.content;return n.childCount>1&&(o=0),i<r-1&&(l=Qa(l,e,t,r,i+1,o)),i>=t&&(l=e<0?s.contentMatchAt(0).fillBefore(l,o<=i).append(l):l.append(s.contentMatchAt(s.childCount).fillBefore(se.empty,!0))),n.replaceChild(e<0?0:n.childCount-1,s.copy(l))}function Mu(n,e,t){return e<n.openStart&&(n=new he(Qa(n.content,-1,e,n.openStart,0,n.openEnd),e,n.openEnd)),t<n.openEnd&&(n=new he(Qa(n.content,1,t,n.openEnd,0,0),n.openStart,t)),n}const Th={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 xh(){return Nu||(Nu=document.implementation.createHTMLDocument("title"))}function Y0(n){let e=/^(\s*<meta [^>]*>)*/.exec(n);e&&(n=n.slice(e[0].length));let t=xh().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(n),i;if((i=r&&Th[r[1].toLowerCase()])&&(n=i.map(o=>"<"+o+">").join("")+n+i.map(o=>"</"+o+">").reverse().join("")),t.innerHTML=n,i)for(let o=0;o<i.length;o++)t=t.querySelector(i[o])||t;return t}function J0(n){let e=n.querySelectorAll(rt?"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 X0(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:i,openStart:o,openEnd:s}=n;for(let l=r.length-2;l>=0;l-=2){let a=t.nodes[r[l]];if(!a||a.hasRequiredAttrs())break;i=se.from(a.create(r[l+1],i)),o++,s++}return new he(i,o,s)}const ft={},ht={},Q0={touchstart:!0,touchmove:!0};class Z0{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 q0(n){for(let e in ft){let t=ft[e];n.dom.addEventListener(e,n.input.eventHandlers[e]=r=>{ty(n,r)&&!Hl(n,r)&&(n.editable||!(r.type in ht))&&t(n,r)},Q0[e]?{passive:!0}:void 0)}dt&&n.dom.addEventListener("input",()=>null),Za(n)}function Rn(n,e){n.input.lastSelectionOrigin=e,n.input.lastSelectionTime=Date.now()}function ey(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 Za(n){n.someProp("handleDOMEvents",e=>{for(let t in e)n.input.eventHandlers[t]||n.dom.addEventListener(t,n.input.eventHandlers[t]=r=>Hl(n,r))})}function Hl(n,e){return n.someProp("handleDOMEvents",t=>{let r=t[e.type];return r?r(n,e)||e.defaultPrevented:!1})}function ty(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 ny(n,e){!Hl(n,e)&&ft[e.type]&&(n.editable||!(e.type in ht))&&ft[e.type](n,e)}ht.keydown=(n,e)=>{let t=e;if(n.input.shiftKey=t.keyCode==16||t.shiftKey,!wh(n,t)&&(n.input.lastKeyCode=t.keyCode,n.input.lastKeyCodeTime=Date.now(),!(zt&&rt&&t.keyCode==13)))if(t.keyCode!=229&&n.domObserver.forceFlush(),zr&&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",i=>i(n,Xn(13,"Enter"))),n.input.lastIOSEnter=0)},200)}else n.someProp("handleKeyDown",r=>r(n,t))||W0(n,t)?t.preventDefault():Rn(n,"key")};ht.keyup=(n,e)=>{e.keyCode==16&&(n.input.shiftKey=!1)};ht.keypress=(n,e)=>{let t=e;if(wh(n,t)||!t.charCode||t.ctrlKey&&!t.altKey||Rt&&t.metaKey)return;if(n.someProp("handleKeyPress",i=>i(n,t))){t.preventDefault();return}let r=n.state.selection;if(!(r instanceof Le)||!r.$from.sameParent(r.$to)){let i=String.fromCharCode(t.charCode);!/[\r\n]/.test(i)&&!n.someProp("handleTextInput",o=>o(n,r.$from.pos,r.$to.pos,i))&&n.dispatch(n.state.tr.insertText(i).scrollIntoView()),t.preventDefault()}};function ws(n){return{left:n.clientX,top:n.clientY}}function ry(n,e){let t=e.x-n.clientX,r=e.y-n.clientY;return t*t+r*r<100}function Ul(n,e,t,r,i){if(r==-1)return!1;let o=n.state.doc.resolve(r);for(let s=o.depth+1;s>0;s--)if(n.someProp(e,l=>s>o.depth?l(n,t,o.nodeAfter,o.before(s),i,!0):l(n,t,o.node(s),o.before(s),i,!1)))return!0;return!1}function Br(n,e,t){n.focused||n.focus();let r=n.state.tr.setSelection(e);t=="pointer"&&r.setMeta("pointer",!0),n.dispatch(r)}function iy(n,e){if(e==-1)return!1;let t=n.state.doc.resolve(e),r=t.nodeAfter;return r&&r.isAtom&&Ce.isSelectable(r)?(Br(n,new Ce(t),"pointer"),!0):!1}function oy(n,e){if(e==-1)return!1;let t=n.state.selection,r,i;t instanceof Ce&&(r=t.node);let o=n.state.doc.resolve(e);for(let s=o.depth+1;s>0;s--){let l=s>o.depth?o.nodeAfter:o.node(s);if(Ce.isSelectable(l)){r&&t.$from.depth>0&&s>=t.$from.depth&&o.before(t.$from.depth+1)==t.$from.pos?i=o.before(t.$from.depth):i=o.before(s);break}}return i!=null?(Br(n,Ce.create(n.state.doc,i),"pointer"),!0):!1}function sy(n,e,t,r,i){return Ul(n,"handleClickOn",e,t,r)||n.someProp("handleClick",o=>o(n,e,r))||(i?oy(n,t):iy(n,t))}function ay(n,e,t,r){return Ul(n,"handleDoubleClickOn",e,t,r)||n.someProp("handleDoubleClick",i=>i(n,e,r))}function ly(n,e,t,r){return Ul(n,"handleTripleClickOn",e,t,r)||n.someProp("handleTripleClick",i=>i(n,e,r))||cy(n,t,r)}function cy(n,e,t){if(t.button!=0)return!1;let r=n.state.doc;if(e==-1)return r.inlineContent?(Br(n,Le.create(r,0,r.content.size),"pointer"),!0):!1;let i=r.resolve(e);for(let o=i.depth+1;o>0;o--){let s=o>i.depth?i.nodeAfter:i.node(o),l=i.before(o);if(s.inlineContent)Br(n,Le.create(r,l+1,l+1+s.content.size),"pointer");else if(Ce.isSelectable(s))Br(n,Ce.create(r,l),"pointer");else continue;return!0}}function jl(n){return Ao(n)}const Ah=Rt?"metaKey":"ctrlKey";ft.mousedown=(n,e)=>{let t=e;n.input.shiftKey=t.shiftKey;let r=jl(n),i=Date.now(),o="singleClick";i-n.input.lastClick.time<500&&ry(t,n.input.lastClick)&&!t[Ah]&&(n.input.lastClick.type=="singleClick"?o="doubleClick":n.input.lastClick.type=="doubleClick"&&(o="tripleClick")),n.input.lastClick={time:i,x:t.clientX,y:t.clientY,type:o};let s=n.posAtCoords(ws(t));s&&(o=="singleClick"?(n.input.mouseDown&&n.input.mouseDown.done(),n.input.mouseDown=new uy(n,s,t,!!r)):(o=="doubleClick"?ay:ly)(n,s.pos,s.inside,t)?t.preventDefault():Rn(n,"pointer"))};class uy{constructor(e,t,r,i){this.view=e,this.pos=t,this.event=r,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!r[Ah],this.allowDefault=r.shiftKey;let o,s;if(t.inside>-1)o=e.state.doc.nodeAt(t.inside),s=t.inside;else{let u=e.state.doc.resolve(t.pos);o=u.parent,s=u.depth?u.before():0}const l=i?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&&o.type.spec.draggable&&o.type.spec.selectable!==!1||c instanceof Ce&&c.from<=s&&c.to>s)&&(this.mightDrag={node:o,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&jt&&!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)),Rn(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(()=>gn(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(ws(e))),this.updateAllowDefault(e),this.allowDefault||!t?Rn(this.view,"pointer"):sy(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||dt&&this.mightDrag&&!this.mightDrag.node.isAtom||rt&&!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)?(Br(this.view,Re.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):Rn(this.view,"pointer")}move(e){this.updateAllowDefault(e),Rn(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)}}ft.touchstart=n=>{n.input.lastTouch=Date.now(),jl(n),Rn(n,"pointer")};ft.touchmove=n=>{n.input.lastTouch=Date.now(),Rn(n,"pointer")};ft.contextmenu=n=>jl(n);function wh(n,e){return n.composing?!0:dt&&Math.abs(e.timeStamp-n.input.compositionEndedAt)<500?(n.input.compositionEndedAt=-2e8,!0):!1}const dy=zt?5e3:-1;ht.compositionstart=ht.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(),Ao(n,!0),n.markCursor=null;else if(Ao(n),jt&&e.selection.empty&&t.parentOffset&&!t.textOffset&&t.nodeBefore.marks.length){let r=n.domSelectionRange();for(let i=r.focusNode,o=r.focusOffset;i&&i.nodeType==1&&o!=0;){let s=o<0?i.lastChild:i.childNodes[o-1];if(!s)break;if(s.nodeType==3){n.domSelection().collapse(s,s.nodeValue.length);break}else i=s,o=-1}}n.input.composing=!0}kh(n,dy)};ht.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++,kh(n,20))};function kh(n,e){clearTimeout(n.input.composingTimeout),e>-1&&(n.input.composingTimeout=setTimeout(()=>Ao(n),e))}function Oh(n){for(n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=fy());n.input.compositionNodes.length>0;)n.input.compositionNodes.pop().markParentsDirty()}function fy(){let n=document.createEvent("Event");return n.initEvent("event",!0,!0),n.timeStamp}function Ao(n,e=!1){if(!(zt&&n.domObserver.flushingSoon>=0)){if(n.domObserver.forceFlush(),Oh(n),e||n.docView&&n.docView.dirty){let t=Vl(n);return t&&!t.eq(n.state.selection)?n.dispatch(n.state.tr.setSelection(t)):n.updateState(n.state),!0}return!1}}function hy(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(),i=document.createRange();i.selectNodeContents(e),n.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout(()=>{t.parentNode&&t.parentNode.removeChild(t),n.focus()},50)}const Ai=yt&&Ln<15||zr&&u0<604;ft.copy=ht.cut=(n,e)=>{let t=e,r=n.state.selection,i=t.type=="cut";if(r.empty)return;let o=Ai?null:t.clipboardData,s=r.content(),{dom:l,text:a}=yh(n,s);o?(t.preventDefault(),o.clearData(),o.setData("text/html",l.innerHTML),o.setData("text/plain",a)):hy(n,l),i&&n.dispatch(n.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function py(n){return n.openStart==0&&n.openEnd==0&&n.content.childCount==1?n.content.firstChild:null}function my(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 i=n.input.shiftKey&&n.input.lastKeyCode!=45;setTimeout(()=>{n.focus(),r.parentNode&&r.parentNode.removeChild(r),t?wi(n,r.value,null,i,e):wi(n,r.textContent,r.innerHTML,i,e)},50)}function wi(n,e,t,r,i){let o=bh(n,e,t,r,n.state.selection.$from);if(n.someProp("handlePaste",a=>a(n,i,o||he.empty)))return!0;if(!o)return!1;let s=py(o),l=s?n.state.tr.replaceSelectionWith(s,r):n.state.tr.replaceSelection(o);return n.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function Mh(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," "):""}ht.paste=(n,e)=>{let t=e;if(n.composing&&!zt)return;let r=Ai?null:t.clipboardData,i=n.input.shiftKey&&n.input.lastKeyCode!=45;r&&wi(n,Mh(r),r.getData("text/html"),i,t)?t.preventDefault():my(n,t)};class Nh{constructor(e,t,r){this.slice=e,this.move=t,this.node=r}}const Ih=Rt?"altKey":"ctrlKey";ft.dragstart=(n,e)=>{let t=e,r=n.input.mouseDown;if(r&&r.done(),!t.dataTransfer)return;let i=n.state.selection,o=i.empty?null:n.posAtCoords(ws(t)),s;if(!(o&&o.pos>=i.from&&o.pos<=(i instanceof Ce?i.to-1:i.to))){if(r&&r.mightDrag)s=Ce.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=Ce.create(n.state.doc,u.posBefore))}}let l=(s||n.state.selection).content(),{dom:a,text:c}=yh(n,l);t.dataTransfer.clearData(),t.dataTransfer.setData(Ai?"Text":"text/html",a.innerHTML),t.dataTransfer.effectAllowed="copyMove",Ai||t.dataTransfer.setData("text/plain",c),n.dragging=new Nh(l,!t[Ih],s)};ft.dragend=n=>{let e=n.dragging;window.setTimeout(()=>{n.dragging==e&&(n.dragging=null)},50)};ht.dragover=ht.dragenter=(n,e)=>e.preventDefault();ht.drop=(n,e)=>{let t=e,r=n.dragging;if(n.dragging=null,!t.dataTransfer)return;let i=n.posAtCoords(ws(t));if(!i)return;let o=n.state.doc.resolve(i.pos),s=r&&r.slice;s?n.someProp("transformPasted",h=>{s=h(s,n)}):s=bh(n,Mh(t.dataTransfer),Ai?null:t.dataTransfer.getData("text/html"),!1,o);let l=!!(r&&!t[Ih]);if(n.someProp("handleDrop",h=>h(n,t,s||he.empty,l))){t.preventDefault();return}if(!s)return;t.preventDefault();let a=s?G1(n.state.doc,o.pos,s):o.pos;a==null&&(a=o.pos);let c=n.state.tr;if(l){let{node:h}=r;h?h.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 p=c.doc.resolve(u);if(d&&Ce.isSelectable(s.content.firstChild)&&p.nodeAfter&&p.nodeAfter.sameMarkup(s.content.firstChild))c.setSelection(new Ce(p));else{let h=c.mapping.map(a);c.mapping.maps[c.mapping.maps.length-1].forEach((g,v,S,T)=>h=T),c.setSelection(zl(n,p,c.doc.resolve(h)))}n.focus(),n.dispatch(c.setMeta("uiEvent","drop"))};ft.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())&&gn(n)},20))};ft.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)};ft.beforeinput=(n,e)=>{if(rt&&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",o=>o(n,Xn(8,"Backspace")))))return;let{$cursor:i}=n.state.selection;i&&i.pos>0&&n.dispatch(n.state.tr.delete(i.pos-1,i.pos).scrollIntoView())},50)}};for(let n in ht)ft[n]=ht[n];function ki(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 wo{constructor(e,t){this.toDOM=e,this.spec=t||sr,this.side=this.spec.side||0}map(e,t,r,i){let{pos:o,deleted:s}=e.mapResult(t.from+i,this.side<0?-1:1);return s?null:new Lt(o-r,o-r,this)}valid(){return!0}eq(e){return this==e||e instanceof wo&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&ki(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class Pn{constructor(e,t){this.attrs=e,this.spec=t||sr}map(e,t,r,i){let o=e.map(t.from+i,this.spec.inclusiveStart?-1:1)-r,s=e.map(t.to+i,this.spec.inclusiveEnd?1:-1)-r;return o>=s?null:new Lt(o,s,this)}valid(e,t){return t.from<t.to}eq(e){return this==e||e instanceof Pn&&ki(this.attrs,e.attrs)&&ki(this.spec,e.spec)}static is(e){return e.type instanceof Pn}destroy(){}}class Wl{constructor(e,t){this.attrs=e,this.spec=t||sr}map(e,t,r,i){let o=e.mapResult(t.from+i,1);if(o.deleted)return null;let s=e.mapResult(t.to+i,-1);return s.deleted||s.pos<=o.pos?null:new Lt(o.pos-r,s.pos-r,this)}valid(e,t){let{index:r,offset:i}=e.content.findIndex(t.from),o;return i==t.from&&!(o=e.child(r)).isText&&i+o.nodeSize==t.to}eq(e){return this==e||e instanceof Wl&&ki(this.attrs,e.attrs)&&ki(this.spec,e.spec)}destroy(){}}class Lt{constructor(e,t,r){this.from=e,this.to=t,this.type=r}copy(e,t){return new Lt(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 Lt(e,e,new wo(t,r))}static inline(e,t,r,i){return new Lt(e,t,new Pn(r,i))}static node(e,t,r,i){return new Lt(e,t,new Wl(r,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof Pn}get widget(){return this.type instanceof wo}}const Ar=[],sr={};class Ke{constructor(e,t){this.local=e.length?e:Ar,this.children=t.length?t:Ar}static create(e,t){return t.length?ko(t,e,0,sr):nt}find(e,t,r){let i=[];return this.findInner(e??0,t??1e9,i,0,r),i}findInner(e,t,r,i,o){for(let s=0;s<this.local.length;s++){let l=this.local[s];l.from<=t&&l.to>=e&&(!o||o(l.spec))&&r.push(l.copy(l.from+i,l.to+i))}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,i+l,o)}}map(e,t,r){return this==nt||e.maps.length==0?this:this.mapInner(e,t,0,0,r||sr)}mapInner(e,t,r,i,o){let s;for(let l=0;l<this.local.length;l++){let a=this.local[l].map(e,r,i);a&&a.type.valid(t,a)?(s||(s=[])).push(a):o.onRemove&&o.onRemove(this.local[l].spec)}return this.children.length?gy(this.children,s||[],e,t,r,i,o):s?new Ke(s.sort(ar),Ar):nt}add(e,t){return t.length?this==nt?Ke.create(e,t):this.addInner(e,t,0):this}addInner(e,t,r){let i,o=0;e.forEach((l,a)=>{let c=a+r,u;if(u=Rh(t,l,c)){for(i||(i=this.children.slice());o<i.length&&i[o]<a;)o+=3;i[o]==a?i[o+2]=i[o+2].addInner(l,u,c+1):i.splice(o,0,a,a+l.nodeSize,ko(u,l,c+1,sr)),o+=3}});let s=Dh(o?Lh(t):t,-r);for(let l=0;l<s.length;l++)s[l].type.valid(e,s[l])||s.splice(l--,1);return new Ke(s.length?this.local.concat(s).sort(ar):this.local,i||this.children)}remove(e){return e.length==0||this==nt?this:this.removeInner(e,0)}removeInner(e,t){let r=this.children,i=this.local;for(let o=0;o<r.length;o+=3){let s,l=r[o]+t,a=r[o+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[o+2].removeInner(s,l+1);c!=nt?r[o+2]=c:(r.splice(o,3),o-=3)}if(i.length){for(let o=0,s;o<e.length;o++)if(s=e[o])for(let l=0;l<i.length;l++)i[l].eq(s,t)&&(i==this.local&&(i=this.local.slice()),i.splice(l--,1))}return r==this.children&&i==this.local?this:i.length||r.length?new Ke(i,r):nt}forChild(e,t){if(this==nt)return this;if(t.isLeaf)return Ke.empty;let r,i;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 o=e+1,s=o+t.content.size;for(let l=0;l<this.local.length;l++){let a=this.local[l];if(a.from<s&&a.to>o&&a.type instanceof Pn){let c=Math.max(o,a.from)-o,u=Math.min(s,a.to)-o;c<u&&(i||(i=[])).push(a.copy(c,u))}}if(i){let l=new Ke(i.sort(ar),Ar);return r?new Mn([l,r]):l}return r||nt}eq(e){if(this==e)return!0;if(!(e instanceof Ke)||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 Kl(this.localsInner(e))}localsInner(e){if(this==nt)return Ar;if(e.inlineContent||!this.local.some(Pn.is))return this.local;let t=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof Pn||t.push(this.local[r]);return t}}Ke.empty=new Ke([],[]);Ke.removeOverlap=Kl;const nt=Ke.empty;class Mn{constructor(e){this.members=e}map(e,t){const r=this.members.map(i=>i.map(e,t,sr));return Mn.from(r)}forChild(e,t){if(t.isLeaf)return Ke.empty;let r=[];for(let i=0;i<this.members.length;i++){let o=this.members[i].forChild(e,t);o!=nt&&(o instanceof Mn?r=r.concat(o.members):r.push(o))}return Mn.from(r)}eq(e){if(!(e instanceof Mn)||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 i=0;i<this.members.length;i++){let o=this.members[i].localsInner(e);if(o.length)if(!t)t=o;else{r&&(t=t.slice(),r=!1);for(let s=0;s<o.length;s++)t.push(o[s])}}return t?Kl(r?t:t.sort(ar)):Ar}static from(e){switch(e.length){case 0:return nt;case 1:return e[0];default:return new Mn(e.every(t=>t instanceof Ke)?e:e.reduce((t,r)=>t.concat(r instanceof Ke?r:r.members),[]))}}}function gy(n,e,t,r,i,o,s){let l=n.slice();for(let c=0,u=o;c<t.maps.length;c++){let d=0;t.maps[c].forEach((f,p,h,g)=>{let v=g-h-(p-f);for(let S=0;S<l.length;S+=3){let T=l[S+1];if(T<0||f>T+u-d)continue;let x=l[S]+u-d;p>=x?l[S+1]=f<=x?-2:-1:h>=i&&v&&(l[S]+=v,l[S+1]+=v)}d+=v}),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]+o),d=u-i;if(d<0||d>=r.content.size){a=!0;continue}let f=t.map(n[c+1]+o,-1),p=f-i,{index:h,offset:g}=r.content.findIndex(d),v=r.maybeChild(h);if(v&&g==d&&g+v.nodeSize==p){let S=l[c+2].mapInner(t,v,u+1,n[c]+o+1,s);S!=nt?(l[c]=d,l[c+1]=p,l[c+2]=S):(l[c+1]=-2,a=!0)}else a=!0}if(a){let c=vy(l,n,e,t,i,o,s),u=ko(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 p=u.children[d];for(;f<l.length&&l[f]<p;)f+=3;l.splice(f,0,u.children[d],u.children[d+1],u.children[d+2])}}return new Ke(e.sort(ar),l)}function Dh(n,e){if(!e||!n.length)return n;let t=[];for(let r=0;r<n.length;r++){let i=n[r];t.push(new Lt(i.from+e,i.to+e,i.type))}return t}function vy(n,e,t,r,i,o,s){function l(a,c){for(let u=0;u<a.local.length;u++){let d=a.local[u].map(r,i,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]+o+1);return t}function Rh(n,e,t){if(e.isLeaf)return null;let r=t+e.nodeSize,i=null;for(let o=0,s;o<n.length;o++)(s=n[o])&&s.from>t&&s.to<r&&((i||(i=[])).push(s),n[o]=null);return i}function Lh(n){let e=[];for(let t=0;t<n.length;t++)n[t]!=null&&e.push(n[t]);return e}function ko(n,e,t,r){let i=[],o=!1;e.forEach((l,a)=>{let c=Rh(n,l,a+t);if(c){o=!0;let u=ko(c,l,t+a+1,r);u!=nt&&i.push(a,a+l.nodeSize,u)}});let s=Dh(o?Lh(n):n,-t).sort(ar);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||i.length?new Ke(s,i):nt}function ar(n,e){return n.from-e.from||n.to-e.to}function Kl(n){let e=n;for(let t=0;t<e.length-1;t++){let r=e[t];if(r.from!=r.to)for(let i=t+1;i<e.length;i++){let o=e[i];if(o.from==r.from){o.to!=r.to&&(e==n&&(e=n.slice()),e[i]=o.copy(o.from,r.to),Iu(e,i+1,o.copy(r.to,o.to)));continue}else{o.from<r.to&&(e==n&&(e=n.slice()),e[t]=r.copy(r.from,o.from),Iu(e,i,r.copy(o.from,r.to)));break}}}return e}function Iu(n,e,t){for(;e<n.length&&ar(t,n[e])>0;)e++;n.splice(e,0,t)}function ia(n){let e=[];return n.someProp("decorations",t=>{let r=t(n.state);r&&r!=nt&&e.push(r)}),n.cursorWrapper&&e.push(Ke.create(n.state.doc,[n.cursorWrapper.deco])),Mn.from(e)}const yy={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},by=yt&&Ln<=11;class Ey{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 Sy{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new Ey,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let i=0;i<r.length;i++)this.queue.push(r[i]);yt&&Ln<=11&&r.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),by&&(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,yy)),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(Tu(this.view)){if(this.suppressingSelectionUpdates)return gn(this.view);if(yt&&Ln<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&ur(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 o=e.focusNode;o;o=xi(o))t.add(o);for(let o=e.anchorNode;o;o=xi(o))if(t.has(o)){r=o;break}let i=r&&this.view.docView.nearestDesc(r);if(i&&i.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(),i=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&Tu(e)&&!this.ignoreSelectionChange(r),o=-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&&(o=o<0?d.from:Math.min(d.from,o),s=s<0?d.to:Math.max(d.to,s),d.typeOver&&(l=!0))}if(jt&&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;o<0&&i&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&xs(r)&&(c=Vl(e))&&c.eq(Re.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,gn(e),this.currentSelection.set(r),e.scrollToSelection()):(o>-1||i)&&(o>-1&&(e.docView.markDirty(o,s),Cy(e)),this.handleDOMChange(o,s,l,a),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||gn(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 i=e.previousSibling,o=e.nextSibling;if(yt&&Ln<=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)&&(i=d),(!f||Array.prototype.indexOf.call(e.addedNodes,f)<0)&&(o=f)}let s=i&&i.parentNode==e.target?lt(i)+1:0,l=r.localPosFromDOM(e.target,s,-1),a=o&&o.parentNode==e.target?lt(o):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 Du=new WeakMap,Ru=!1;function Cy(n){if(!Du.has(n)&&(Du.set(n,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(n.dom).whiteSpace)!==-1)){if(n.requiresGeckoHackNode=jt,Ru)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."),Ru=!0}}function Ty(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,i=e.startOffset,o=e.endContainer,s=e.endOffset,l=n.domAtPos(n.state.selection.anchor);return ur(l.node,l.offset,o,s)&&([r,i,o,s]=[o,s,r,i]),{anchorNode:r,anchorOffset:i,focusNode:o,focusOffset:s}}function xy(n,e,t){let{node:r,fromOffset:i,toOffset:o,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}],xs(a)||c.push({node:a.focusNode,offset:a.focusOffset})),rt&&n.input.lastKeyCode===8)for(let v=o;v>i;v--){let S=r.childNodes[v-1],T=S.pmViewDesc;if(S.nodeName=="BR"&&!T){o=v;break}if(!T||T.size)break}let d=n.state.doc,f=n.someProp("domParser")||Fr.fromSchema(n.state.schema),p=d.resolve(s),h=null,g=f.parse(r,{topNode:p.parent,topMatch:p.parent.contentMatchAt(p.index()),topOpen:!0,from:i,to:o,preserveWhitespace:p.parent.type.whitespace=="pre"?"full":!0,findPositions:c,ruleFromNode:Ay,context:p});if(c&&c[0].pos!=null){let v=c[0].pos,S=c[1]&&c[1].pos;S==null&&(S=v),h={anchor:v+s,head:S+s}}return{doc:g,sel:h,from:s,to:l}}function Ay(n){let e=n.pmViewDesc;if(e)return e.parseRule();if(n.nodeName=="BR"&&n.parentNode){if(dt&&/^(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||dt&&/^(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 wy=/^(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 ky(n,e,t,r,i){let o=n.input.compositionPendingChanges||(n.composing?n.input.compositionID:0);if(n.input.compositionPendingChanges=0,e<0){let V=n.input.lastSelectionTime>Date.now()-50?n.input.lastSelectionOrigin:null,F=Vl(n,V);if(F&&!n.state.selection.eq(F)){if(rt&&zt&&n.input.lastKeyCode===13&&Date.now()-100<n.input.lastKeyCodeTime&&n.someProp("handleKeyDown",_=>_(n,Xn(13,"Enter"))))return;let P=n.state.tr.setSelection(F);V=="pointer"?P.setMeta("pointer",!0):V=="key"&&P.scrollIntoView(),o&&P.setMeta("composition",o),n.dispatch(P)}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=xy(n,e,t),u=n.state.doc,d=u.slice(c.from,c.to),f,p;n.input.lastKeyCode===8&&Date.now()-100<n.input.lastKeyCodeTime?(f=n.state.selection.to,p="end"):(f=n.state.selection.from,p="start"),n.input.lastKeyCode=null;let h=Ny(d.content,c.doc.content,c.from,f,p);if((zr&&n.input.lastIOSEnter>Date.now()-225||zt)&&i.some(V=>V.nodeType==1&&!wy.test(V.nodeName))&&(!h||h.endA>=h.endB)&&n.someProp("handleKeyDown",V=>V(n,Xn(13,"Enter")))){n.input.lastIOSEnter=0;return}if(!h)if(r&&a instanceof Le&&!a.empty&&a.$head.sameParent(a.$anchor)&&!n.composing&&!(c.sel&&c.sel.anchor!=c.sel.head))h={start:a.from,endA:a.to,endB:a.to};else{if(c.sel){let V=Lu(n,n.state.doc,c.sel);if(V&&!V.eq(n.state.selection)){let F=n.state.tr.setSelection(V);o&&F.setMeta("composition",o),n.dispatch(F)}}return}if(rt&&n.cursorWrapper&&c.sel&&c.sel.anchor==n.cursorWrapper.deco.from&&c.sel.head==c.sel.anchor){let V=h.endB-h.start;c.sel={anchor:c.sel.anchor+V,head:c.sel.anchor+V}}n.input.domChangeCount++,n.state.selection.from<n.state.selection.to&&h.start==h.endB&&n.state.selection instanceof Le&&(h.start>n.state.selection.from&&h.start<=n.state.selection.from+2&&n.state.selection.from>=c.from?h.start=n.state.selection.from:h.endA<n.state.selection.to&&h.endA>=n.state.selection.to-2&&n.state.selection.to<=c.to&&(h.endB+=n.state.selection.to-h.endA,h.endA=n.state.selection.to)),yt&&Ln<=11&&h.endB==h.start+1&&h.endA==h.start&&h.start>c.from&&c.doc.textBetween(h.start-c.from-1,h.start-c.from+1)=="  "&&(h.start--,h.endA--,h.endB--);let g=c.doc.resolveNoCache(h.start-c.from),v=c.doc.resolveNoCache(h.endB-c.from),S=u.resolve(h.start),T=g.sameParent(v)&&g.parent.inlineContent&&S.end()>=h.endA,x;if((zr&&n.input.lastIOSEnter>Date.now()-225&&(!T||i.some(V=>V.nodeName=="DIV"||V.nodeName=="P"))||!T&&g.pos<c.doc.content.size&&!g.sameParent(v)&&(x=Re.findFrom(c.doc.resolve(g.pos+1),1,!0))&&x.head==v.pos)&&n.someProp("handleKeyDown",V=>V(n,Xn(13,"Enter")))){n.input.lastIOSEnter=0;return}if(n.state.selection.anchor>h.start&&My(u,h.start,h.endA,g,v)&&n.someProp("handleKeyDown",V=>V(n,Xn(8,"Backspace")))){zt&&rt&&n.domObserver.suppressSelectionUpdates();return}rt&&zt&&h.endB==h.start&&(n.input.lastAndroidDelete=Date.now()),zt&&!T&&g.start()!=v.start()&&v.parentOffset==0&&g.depth==v.depth&&c.sel&&c.sel.anchor==c.sel.head&&c.sel.head==h.endA&&(h.endB-=2,v=c.doc.resolveNoCache(h.endB-c.from),setTimeout(()=>{n.someProp("handleKeyDown",function(V){return V(n,Xn(13,"Enter"))})},20));let b=h.start,D=h.endA,A,B,$;if(T){if(g.pos==v.pos)yt&&Ln<=11&&g.parentOffset==0&&(n.domObserver.suppressSelectionUpdates(),setTimeout(()=>gn(n),20)),A=n.state.tr.delete(b,D),B=u.resolve(h.start).marksAcross(u.resolve(h.endA));else if(h.endA==h.endB&&($=Oy(g.parent.content.cut(g.parentOffset,v.parentOffset),S.parent.content.cut(S.parentOffset,h.endA-S.start()))))A=n.state.tr,$.type=="add"?A.addMark(b,D,$.mark):A.removeMark(b,D,$.mark);else if(g.parent.child(g.index()).isText&&g.index()==v.index()-(v.textOffset?0:1)){let V=g.parent.textBetween(g.parentOffset,v.parentOffset);if(n.someProp("handleTextInput",F=>F(n,b,D,V)))return;A=n.state.tr.insertText(V,b,D)}}if(A||(A=n.state.tr.replace(b,D,c.doc.slice(h.start-c.from,h.endB-c.from))),c.sel){let V=Lu(n,A.doc,c.sel);V&&!(rt&&zt&&n.composing&&V.empty&&(h.start!=h.endB||n.input.lastAndroidDelete<Date.now()-100)&&(V.head==b||V.head==A.mapping.map(D)-1)||yt&&V.empty&&V.head==b)&&A.setSelection(V)}B&&A.ensureMarks(B),o&&A.setMeta("composition",o),n.dispatch(A.scrollIntoView())}function Lu(n,e,t){return Math.max(t.anchor,t.head)>e.content.size?null:zl(n,e.resolve(t.anchor),e.resolve(t.head))}function Oy(n,e){let t=n.firstChild.marks,r=e.firstChild.marks,i=t,o=r,s,l,a;for(let u=0;u<r.length;u++)i=r[u].removeFromSet(i);for(let u=0;u<t.length;u++)o=t[u].removeFromSet(o);if(i.length==1&&o.length==0)l=i[0],s="add",a=u=>u.mark(l.addToSet(u.marks));else if(i.length==0&&o.length==1)l=o[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(se.from(c).eq(n))return{mark:l,type:s}}function My(n,e,t,r,i){if(!r.parent.isTextblock||t-e<=i.pos-r.pos||oa(r,!0,!1)<i.pos)return!1;let o=n.resolve(e);if(o.parentOffset<o.parent.content.size||!o.parent.isTextblock)return!1;let s=n.resolve(oa(o,!0,!0));return!s.parent.isTextblock||s.pos>t||oa(s,!0,!1)<t?!1:r.parent.content.cut(r.parentOffset).eq(s.parent.content)}function oa(n,e,t){let r=n.depth,i=e?n.end():n.pos;for(;r>0&&(e||n.indexAfter(r)==n.node(r).childCount);)r--,i++,e=!1;if(t){let o=n.node(r).maybeChild(n.indexAfter(r));for(;o&&!o.isLeaf;)o=o.firstChild,i++}return i}function Ny(n,e,t,r,i){let o=n.findDiffStart(e,t);if(o==null)return null;let{a:s,b:l}=n.findDiffEnd(e,t+n.size,t+e.size);if(i=="end"){let a=Math.max(0,o-Math.min(s,l));r-=s+a-o}if(s<o&&n.size<e.size){let a=r<=o&&r>=s?o-r:0;o-=a,o&&o<e.size&&_u(e.textBetween(o-1,o+1))&&(o+=a?1:-1),l=o+(l-s),s=o}else if(l<o){let a=r<=o&&r>=l?o-r:0;o-=a,o&&o<n.size&&_u(n.textBetween(o-1,o+1))&&(o+=a?1:-1),s=o+(s-l),l=o}return{start:o,endA:s,endB:l}}function _u(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 Iy{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 Z0,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(Vu),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=Fu(this),Bu(this),this.nodeViews=$u(this),this.docView=vu(this.state.doc,Pu(this),ia(this),this.dom,this),this.domObserver=new Sy(this,(r,i,o,s)=>ky(this,r,i,o,s)),this.domObserver.start(),q0(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&&Za(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(Vu),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 i=this.state,o=!1,s=!1;e.storedMarks&&this.composing&&(Oh(this),s=!0),this.state=e;let l=i.plugins!=e.plugins||this._props.plugins!=t.plugins;if(l||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let p=$u(this);Ry(p,this.nodeViews)&&(this.nodeViews=p,o=!0)}(l||t.handleDOMEvents!=this._props.handleDOMEvents)&&Za(this),this.editable=Fu(this),Bu(this);let a=ia(this),c=Pu(this),u=i.plugins!=e.plugins&&!i.doc.eq(e.doc)?"reset":e.scrollToSelection>i.scrollToSelection?"to selection":"preserve",d=o||!this.docView.matchesNode(e.doc,c,a);(d||!e.selection.eq(i.selection))&&(s=!0);let f=u=="preserve"&&s&&this.dom.style.overflowAnchor==null&&h0(this);if(s){this.domObserver.stop();let p=d&&(yt||rt)&&!this.composing&&!i.selection.empty&&!e.selection.empty&&Dy(i.selection,e.selection);if(d){let h=rt?this.trackWrites=this.domSelectionRange().focusNode:null;(o||!this.docView.update(e.doc,c,a,this))&&(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=vu(e.doc,c,a,this.dom,this)),h&&!this.trackWrites&&(p=!0)}p||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&F0(this))?gn(this,p):(mh(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(i),!((r=this.dragging)===null||r===void 0)&&r.node&&!i.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,i),u=="reset"?this.dom.scrollTop=0:u=="to selection"?this.scrollToSelection():f&&p0(f)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!this.someProp("handleScrollToSelection",t=>t(this)))if(this.state.selection instanceof Ce){let t=this.docView.domAfterPos(this.state.selection.from);t.nodeType==1&&du(this,t.getBoundingClientRect(),e)}else du(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,i=-1;if(this.state.doc.nodeAt(r.from)==r.node)i=r.from;else{let o=r.from+(this.state.doc.content.size-t.doc.content.size);(o>0&&this.state.doc.nodeAt(o))==r.node&&(i=o)}this.dragging=new Nh(e.slice,e.move,i<0?void 0:Ce.create(this.state.doc,i))}someProp(e,t){let r=this._props&&this._props[e],i;if(r!=null&&(i=t?t(r):r))return i;for(let s=0;s<this.directPlugins.length;s++){let l=this.directPlugins[s].props[e];if(l!=null&&(i=t?t(l):l))return i}let o=this.state.plugins;if(o)for(let s=0;s<o.length;s++){let l=o[s].props[e];if(l!=null&&(i=t?t(l):l))return i}}hasFocus(){if(yt){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&&m0(this.dom),gn(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 E0(this,e)}coordsAtPos(e,t=1){return ah(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 i=this.docView.posFromDOM(e,t,r);if(i==null)throw new RangeError("DOM position not inside the editor");return i}endOfTextblock(e,t){return A0(this,t||this.state,e)}pasteHTML(e,t){return wi(this,"",e,!1,t||new ClipboardEvent("paste"))}pasteText(e,t){return wi(this,e,null,!0,t||new ClipboardEvent("paste"))}destroy(){this.docView&&(ey(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],ia(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 ny(this,e)}dispatch(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))}domSelectionRange(){return dt&&this.root.nodeType===11&&s0(this.dom.ownerDocument)==this.dom?Ty(this):this.domSelection()}domSelection(){return this.root.getSelection()}}function Pu(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"),[Lt.node(0,n.state.doc.content.size,e)]}function Bu(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:Lt.widget(n.state.selection.head,e,{raw:!0,marks:n.markCursor})}}else n.cursorWrapper=null}function Fu(n){return!n.someProp("editable",e=>e(n.state)===!1)}function Dy(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 $u(n){let e=Object.create(null);function t(r){for(let i in r)Object.prototype.hasOwnProperty.call(e,i)||(e[i]=r[i])}return n.someProp("nodeViews",t),n.someProp("markViews",t),e}function Ry(n,e){let t=0,r=0;for(let i in n){if(n[i]!=e[i])return!0;t++}for(let i in e)r++;return t!=r}function Vu(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")}var Bn={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:"'"},Oo={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Ly=typeof navigator<"u"&&/Mac/.test(navigator.platform),_y=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var et=0;et<10;et++)Bn[48+et]=Bn[96+et]=String(et);for(var et=1;et<=24;et++)Bn[et+111]="F"+et;for(var et=65;et<=90;et++)Bn[et]=String.fromCharCode(et+32),Oo[et]=String.fromCharCode(et);for(var sa in Bn)Oo.hasOwnProperty(sa)||(Oo[sa]=Bn[sa]);function Py(n){var e=Ly&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||_y&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?Oo:Bn)[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 By=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function Fy(n){let e=n.split(/-(?!$)/),t=e[e.length-1];t=="Space"&&(t=" ");let r,i,o,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))i=!0;else if(/^s(hift)?$/i.test(a))o=!0;else if(/^mod$/i.test(a))By?s=!0:i=!0;else throw new Error("Unrecognized modifier name: "+a)}return r&&(t="Alt-"+t),i&&(t="Ctrl-"+t),s&&(t="Meta-"+t),o&&(t="Shift-"+t),t}function $y(n){let e=Object.create(null);for(let t in n)e[Fy(t)]=n[t];return e}function aa(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 Vy(n){return new bt({props:{handleKeyDown:zy(n)}})}function zy(n){let e=$y(n);return function(t,r){let i=Py(r),o,s=e[aa(i,r)];if(s&&s(t.state,t.dispatch,t))return!0;if(i.length==1&&i!=" "){if(r.shiftKey){let l=e[aa(i,r,!1)];if(l&&l(t.state,t.dispatch,t))return!0}if((r.shiftKey||r.altKey||r.metaKey||i.charCodeAt(0)>127)&&(o=Bn[r.keyCode])&&o!=i){let l=e[aa(o,r)];if(l&&l(t.state,t.dispatch,t))return!0}}return!1}}const Hy=(n,e)=>n.selection.empty?!1:(e&&e(n.tr.deleteSelection().scrollIntoView()),!0);function Uy(n,e){let{$cursor:t}=n.selection;return!t||(e?!e.endOfTextblock("backward",n):t.parentOffset>0)?null:t}const jy=(n,e,t)=>{let r=Uy(n,t);if(!r)return!1;let i=_h(r);if(!i){let s=r.blockRange(),l=s&&Qr(s);return l==null?!1:(e&&e(n.tr.lift(s,l).scrollIntoView()),!0)}let o=i.nodeBefore;if(!o.type.spec.isolating&&Fh(n,i,e))return!0;if(r.parent.content.size==0&&(Hr(o,"end")||Ce.isSelectable(o))){let s=Pl(n.doc,r.before(),r.after(),he.empty);if(s&&s.slice.size<s.to-s.from){if(e){let l=n.tr.step(s);l.setSelection(Hr(o,"end")?Re.findFrom(l.doc.resolve(l.mapping.map(i.pos,-1)),-1):Ce.create(l.doc,i.pos-o.nodeSize)),e(l.scrollIntoView())}return!0}}return o.isAtom&&i.depth==r.depth-1?(e&&e(n.tr.delete(i.pos-o.nodeSize,i.pos).scrollIntoView()),!0):!1};function Hr(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 Wy=(n,e,t)=>{let{$head:r,empty:i}=n.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(t?!t.endOfTextblock("backward",n):r.parentOffset>0)return!1;o=_h(r)}let s=o&&o.nodeBefore;return!s||!Ce.isSelectable(s)?!1:(e&&e(n.tr.setSelection(Ce.create(n.doc,o.pos-s.nodeSize)).scrollIntoView()),!0)};function _h(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 Ky(n,e){let{$cursor:t}=n.selection;return!t||(e?!e.endOfTextblock("forward",n):t.parentOffset<t.parent.content.size)?null:t}const Gy=(n,e,t)=>{let r=Ky(n,t);if(!r)return!1;let i=Ph(r);if(!i)return!1;let o=i.nodeAfter;if(Fh(n,i,e))return!0;if(r.parent.content.size==0&&(Hr(o,"start")||Ce.isSelectable(o))){let s=Pl(n.doc,r.before(),r.after(),he.empty);if(s&&s.slice.size<s.to-s.from){if(e){let l=n.tr.step(s);l.setSelection(Hr(o,"start")?Re.findFrom(l.doc.resolve(l.mapping.map(i.pos)),1):Ce.create(l.doc,l.mapping.map(i.pos))),e(l.scrollIntoView())}return!0}}return o.isAtom&&i.depth==r.depth-1?(e&&e(n.tr.delete(i.pos,i.pos+o.nodeSize).scrollIntoView()),!0):!1},Yy=(n,e,t)=>{let{$head:r,empty:i}=n.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(t?!t.endOfTextblock("forward",n):r.parentOffset<r.parent.content.size)return!1;o=Ph(r)}let s=o&&o.nodeAfter;return!s||!Ce.isSelectable(s)?!1:(e&&e(n.tr.setSelection(Ce.create(n.doc,o.pos)).scrollIntoView()),!0)};function Ph(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 Jy=(n,e)=>{let t=n.selection,r=t instanceof Ce,i;if(r){if(t.node.isTextblock||!zn(n.doc,t.from))return!1;i=t.from}else if(i=Cs(n.doc,t.from,-1),i==null)return!1;if(e){let o=n.tr.join(i);r&&o.setSelection(Ce.create(o.doc,i-n.doc.resolve(i).nodeBefore.nodeSize)),e(o.scrollIntoView())}return!0},Xy=(n,e)=>{let t=n.selection,r;if(t instanceof Ce){if(t.node.isTextblock||!zn(n.doc,t.to))return!1;r=t.to}else if(r=Cs(n.doc,t.to,1),r==null)return!1;return e&&e(n.tr.join(r).scrollIntoView()),!0},Qy=(n,e)=>{let{$from:t,$to:r}=n.selection,i=t.blockRange(r),o=i&&Qr(i);return o==null?!1:(e&&e(n.tr.lift(i,o).scrollIntoView()),!0)},Zy=(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 Bh(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 qy=(n,e)=>{let{$head:t,$anchor:r}=n.selection;if(!t.parent.type.spec.code||!t.sameParent(r))return!1;let i=t.node(-1),o=t.indexAfter(-1),s=Bh(i.contentMatchAt(o));if(!s||!i.canReplaceWith(o,o,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},eb=(n,e)=>{let t=n.selection,{$from:r,$to:i}=t;if(t instanceof Ht||r.parent.inlineContent||i.parent.inlineContent)return!1;let o=Bh(i.parent.contentMatchAt(i.indexAfter()));if(!o||!o.isTextblock)return!1;if(e){let s=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,l=n.tr.insert(s,o.createAndFill());l.setSelection(Le.create(l.doc,s+1)),e(l.scrollIntoView())}return!0},tb=(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 o=t.before();if(_r(n.doc,o))return e&&e(n.tr.split(o).scrollIntoView()),!0}let r=t.blockRange(),i=r&&Qr(r);return i==null?!1:(e&&e(n.tr.lift(r,i).scrollIntoView()),!0)},nb=(n,e)=>{let{$from:t,to:r}=n.selection,i,o=t.sharedDepth(r);return o==0?!1:(i=t.before(o),e&&e(n.tr.setSelection(Ce.create(n.doc,i))),!0)};function rb(n,e,t){let r=e.nodeBefore,i=e.nodeAfter,o=e.index();return!r||!i||!r.type.compatibleContent(i.type)?!1:!r.content.size&&e.parent.canReplace(o-1,o)?(t&&t(n.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(o,o+1)||!(i.isTextblock||zn(n.doc,e.pos))?!1:(t&&t(n.tr.clearIncompatible(e.pos,r.type,r.contentMatchAt(r.childCount)).join(e.pos).scrollIntoView()),!0)}function Fh(n,e,t){let r=e.nodeBefore,i=e.nodeAfter,o,s;if(r.type.spec.isolating||i.type.spec.isolating)return!1;if(rb(n,e,t))return!0;let l=e.parent.canReplace(e.index(),e.index()+1);if(l&&(o=(s=r.contentMatchAt(r.childCount)).findWrapping(i.type))&&s.matchType(o[0]||i.type).validEnd){if(t){let d=e.pos+i.nodeSize,f=se.empty;for(let g=o.length-1;g>=0;g--)f=se.from(o[g].create(null,f));f=se.from(r.copy(f));let p=n.tr.step(new Ye(e.pos-1,d,e.pos,d,new he(f,1,0),o.length,!0)),h=d+2*o.length;zn(p.doc,h)&&p.join(h),t(p.scrollIntoView())}return!0}let a=Re.findFrom(e,1),c=a&&a.$from.blockRange(a.$to),u=c&&Qr(c);if(u!=null&&u>=e.depth)return t&&t(n.tr.lift(c,u).scrollIntoView()),!0;if(l&&Hr(i,"start",!0)&&Hr(r,"end")){let d=r,f=[];for(;f.push(d),!d.isTextblock;)d=d.lastChild;let p=i,h=1;for(;!p.isTextblock;p=p.firstChild)h++;if(d.canReplace(d.childCount,d.childCount,p.content)){if(t){let g=se.empty;for(let S=f.length-1;S>=0;S--)g=se.from(f[S].copy(g));let v=n.tr.step(new Ye(e.pos-f.length,e.pos+i.nodeSize,e.pos+h,e.pos+i.nodeSize-h,new he(g,f.length,0),0,!0));t(v.scrollIntoView())}return!0}}return!1}function $h(n){return function(e,t){let r=e.selection,i=n<0?r.$from:r.$to,o=i.depth;for(;i.node(o).isInline;){if(!o)return!1;o--}return i.node(o).isTextblock?(t&&t(e.tr.setSelection(Le.create(e.doc,n<0?i.start(o):i.end(o)))),!0):!1}}const ib=$h(-1),ob=$h(1);function sb(n,e=null){return function(t,r){let{$from:i,$to:o}=t.selection,s=i.blockRange(o),l=s&&_l(s,n,e);return l?(r&&r(t.tr.wrap(s,l).scrollIntoView()),!0):!1}}function zu(n,e=null){return function(t,r){let i=!1;for(let o=0;o<t.selection.ranges.length&&!i;o++){let{$from:{pos:s},$to:{pos:l}}=t.selection.ranges[o];t.doc.nodesBetween(s,l,(a,c)=>{if(i)return!1;if(!(!a.isTextblock||a.hasMarkup(n,e)))if(a.type==n)i=!0;else{let u=t.doc.resolve(c),d=u.index();i=u.parent.canReplaceWith(d,d+1,n)}})}if(!i)return!1;if(r){let o=t.tr;for(let s=0;s<t.selection.ranges.length;s++){let{$from:{pos:l},$to:{pos:a}}=t.selection.ranges[s];o.setBlockType(l,a,n,e)}r(o.scrollIntoView())}return!0}}typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function ab(n,e=null){return function(t,r){let{$from:i,$to:o}=t.selection,s=i.blockRange(o),l=!1,a=s;if(!s)return!1;if(s.depth>=2&&i.node(s.depth-1).type.compatibleContent(n)&&s.startIndex==0){if(i.index(s.depth-1)==0)return!1;let u=t.doc.resolve(s.start-2);a=new Eo(u,u,s.depth),s.endIndex<s.parent.childCount&&(s=new Eo(i,t.doc.resolve(o.end(s.depth)),s.depth)),l=!0}let c=_l(a,n,e,s);return c?(r&&r(lb(t.tr,s,c,l,n).scrollIntoView()),!0):!1}}function lb(n,e,t,r,i){let o=se.empty;for(let u=t.length-1;u>=0;u--)o=se.from(t[u].type.create(t[u].attrs,o));n.step(new Ye(e.start-(r?2:0),e.end,e.start,e.end,new he(o,0,0),t.length,!0));let s=0;for(let u=0;u<t.length;u++)t[u].type==i&&(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&&_r(n.doc,a,l)&&(n.split(a,l),a+=2*l),a+=c.child(u).nodeSize;return n}function cb(n){return function(e,t){let{$from:r,$to:i}=e.selection,o=r.blockRange(i,s=>s.childCount>0&&s.firstChild.type==n);return o?t?r.node(o.depth-1).type==n?ub(e,t,n,o):db(e,t,o):!0:!1}}function ub(n,e,t,r){let i=n.tr,o=r.end,s=r.$to.end(r.depth);o<s&&(i.step(new Ye(o-1,s,o,s,new he(se.from(t.create(null,r.parent.copy())),1,0),1,!0)),r=new Eo(i.doc.resolve(r.$from.pos),i.doc.resolve(s),r.depth));const l=Qr(r);if(l==null)return!1;i.lift(r,l);let a=i.mapping.map(o,-1)-1;return zn(i.doc,a)&&i.join(a),e(i.scrollIntoView()),!0}function db(n,e,t){let r=n.tr,i=t.parent;for(let p=t.end,h=t.endIndex-1,g=t.startIndex;h>g;h--)p-=i.child(h).nodeSize,r.delete(p-1,p+1);let o=r.doc.resolve(t.start),s=o.nodeAfter;if(r.mapping.map(t.end)!=t.start+o.nodeAfter.nodeSize)return!1;let l=t.startIndex==0,a=t.endIndex==i.childCount,c=o.node(-1),u=o.index(-1);if(!c.canReplace(u+(l?0:1),u+1,s.content.append(a?se.empty:se.from(i))))return!1;let d=o.pos,f=d+s.nodeSize;return r.step(new Ye(d-(l?1:0),f+(a?1:0),d+1,f-1,new he((l?se.empty:se.from(i.copy(se.empty))).append(a?se.empty:se.from(i.copy(se.empty))),l?0:1,a?0:1),l?0:1)),e(r.scrollIntoView()),!0}function fb(n){return function(e,t){let{$from:r,$to:i}=e.selection,o=r.blockRange(i,c=>c.childCount>0&&c.firstChild.type==n);if(!o)return!1;let s=o.startIndex;if(s==0)return!1;let l=o.parent,a=l.child(s-1);if(a.type!=n)return!1;if(t){let c=a.lastChild&&a.lastChild.type==l.type,u=se.from(c?n.create():null),d=new he(se.from(n.create(null,se.from(l.type.create(null,u)))),c?3:1,0),f=o.start,p=o.end;t(e.tr.step(new Ye(f-(c?3:1),p,f,p,d,1,!0)).scrollIntoView())}return!0}}function ks(n){const{state:e,transaction:t}=n;let{selection:r}=t,{doc:i}=t,{storedMarks:o}=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 o},get selection(){return r},get doc(){return i},get tr(){return r=t.selection,i=t.doc,o=t.storedMarks,t}}}class Os{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:i}=t,{tr:o}=r,s=this.buildProps(o);return Object.fromEntries(Object.entries(e).map(([l,a])=>[l,(...u)=>{const d=a(...u)(s);return!o.getMeta("preventDispatch")&&!this.hasCustomState&&i.dispatch(o),d}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){const{rawCommands:r,editor:i,state:o}=this,{view:s}=i,l=[],a=!!e,c=e||o.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,p])=>[f,(...g)=>{const v=this.buildProps(c,t),S=p(...g)(v);return l.push(S),d}])),run:u};return d}createCan(e){const{rawCommands:t,state:r}=this,i=!1,o=e||r.tr,s=this.buildProps(o,i);return{...Object.fromEntries(Object.entries(t).map(([a,c])=>[a,(...u)=>c(...u)({...s,dispatch:void 0})])),chain:()=>this.createChain(o,i)}}buildProps(e,t=!0){const{rawCommands:r,editor:i,state:o}=this,{view:s}=i,l={tr:e,editor:i,view:s,state:ks({state:o,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 hb{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(i=>i.apply(this,t)),this}off(e,t){const r=this.callbacks[e];return r&&(t?this.callbacks[e]=r.filter(i=>i!==t):delete this.callbacks[e]),this}removeAllListeners(){this.callbacks={}}}function me(n,e,t){return n.config[e]===void 0&&n.parent?me(n.parent,e,t):typeof n.config[e]=="function"?n.config[e].bind({...t,parent:n.parent?me(n.parent,e,t):null}):n.config[e]}function Ms(n){const e=n.filter(i=>i.type==="extension"),t=n.filter(i=>i.type==="node"),r=n.filter(i=>i.type==="mark");return{baseExtensions:e,nodeExtensions:t,markExtensions:r}}function Vh(n){const e=[],{nodeExtensions:t,markExtensions:r}=Ms(n),i=[...t,...r],o={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=me(s,"addGlobalAttributes",l);if(!a)return;a().forEach(u=>{u.types.forEach(d=>{Object.entries(u.attributes).forEach(([f,p])=>{e.push({type:d,name:f,attribute:{...o,...p}})})})})}),i.forEach(s=>{const l={name:s.name,options:s.options,storage:s.storage},a=me(s,"addAttributes",l);if(!a)return;const c=a();Object.entries(c).forEach(([u,d])=>{const f={...o,...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 Je(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 pt(...n){return n.filter(e=>!!e).reduce((e,t)=>{const r={...e};return Object.entries(t).forEach(([i,o])=>{if(!r[i]){r[i]=o;return}if(i==="class"){const l=o?o.split(" "):[],a=r[i]?r[i].split(" "):[],c=l.filter(u=>!a.includes(u));r[i]=[...a,...c].join(" ")}else i==="style"?r[i]=[r[i],o].join("; "):r[i]=o}),r},{})}function qa(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)=>pt(t,r),{})}function zh(n){return typeof n=="function"}function De(n,e=void 0,...t){return zh(n)?e?n.bind(e)(...t):n(...t):n}function pb(n={}){return Object.keys(n).length===0&&n.constructor===Object}function mb(n){return typeof n!="string"?n:n.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(n):n==="true"?!0:n==="false"?!1:n}function Hu(n,e){return n.style?n:{...n,getAttrs:t=>{const r=n.getAttrs?n.getAttrs(t):n.attrs;if(r===!1)return!1;const i=e.reduce((o,s)=>{const l=s.attribute.parseHTML?s.attribute.parseHTML(t):mb(t.getAttribute(s.name));return l==null?o:{...o,[s.name]:l}},{});return{...r,...i}}}}function Uu(n){return Object.fromEntries(Object.entries(n).filter(([e,t])=>e==="attrs"&&pb(t)?!1:t!=null))}function gb(n,e){var t;const r=Vh(n),{nodeExtensions:i,markExtensions:o}=Ms(n),s=(t=i.find(c=>me(c,"topNode")))===null||t===void 0?void 0:t.name,l=Object.fromEntries(i.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,T)=>{const x=me(T,"extendNodeSchema",d);return{...S,...x?x(c):{}}},{}),p=Uu({...f,content:De(me(c,"content",d)),marks:De(me(c,"marks",d)),group:De(me(c,"group",d)),inline:De(me(c,"inline",d)),atom:De(me(c,"atom",d)),selectable:De(me(c,"selectable",d)),draggable:De(me(c,"draggable",d)),code:De(me(c,"code",d)),defining:De(me(c,"defining",d)),isolating:De(me(c,"isolating",d)),attrs:Object.fromEntries(u.map(S=>{var T;return[S.name,{default:(T=S==null?void 0:S.attribute)===null||T===void 0?void 0:T.default}]}))}),h=De(me(c,"parseHTML",d));h&&(p.parseDOM=h.map(S=>Hu(S,u)));const g=me(c,"renderHTML",d);g&&(p.toDOM=S=>g({node:S,HTMLAttributes:qa(S,u)}));const v=me(c,"renderText",d);return v&&(p.toText=v),[c.name,p]})),a=Object.fromEntries(o.map(c=>{const u=r.filter(v=>v.type===c.name),d={name:c.name,options:c.options,storage:c.storage,editor:e},f=n.reduce((v,S)=>{const T=me(S,"extendMarkSchema",d);return{...v,...T?T(c):{}}},{}),p=Uu({...f,inclusive:De(me(c,"inclusive",d)),excludes:De(me(c,"excludes",d)),group:De(me(c,"group",d)),spanning:De(me(c,"spanning",d)),code:De(me(c,"code",d)),attrs:Object.fromEntries(u.map(v=>{var S;return[v.name,{default:(S=v==null?void 0:v.attribute)===null||S===void 0?void 0:S.default}]}))}),h=De(me(c,"parseHTML",d));h&&(p.parseDOM=h.map(v=>Hu(v,u)));const g=me(c,"renderHTML",d);return g&&(p.toDOM=v=>g({mark:v,HTMLAttributes:qa(v,u)})),[c.name,p]}));return new x1({topNode:s,nodes:l,marks:a})}function la(n,e){return e.nodes[n]||e.marks[n]||null}function ju(n,e){return Array.isArray(e)?e.some(t=>(typeof t=="string"?t:t.name)===n.name):e}const vb=(n,e=500)=>{let t="";const r=n.parentOffset;return n.parent.nodesBetween(Math.max(0,r-e),r,(i,o,s,l)=>{var a,c;const u=((c=(a=i.type.spec).toText)===null||c===void 0?void 0:c.call(a,{node:i,pos:o,parent:s,index:l}))||i.textContent||"%leaf%";t+=u.slice(0,Math.max(0,r-o))}),t};function Gl(n){return Object.prototype.toString.call(n)==="[object RegExp]"}class Hh{constructor(e){this.find=e.find,this.handler=e.handler}}const yb=(n,e)=>{if(Gl(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 ca(n){var e;const{editor:t,from:r,to:i,text:o,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=vb(c)+o;return s.forEach(f=>{if(u)return;const p=yb(d,f.find);if(!p)return;const h=a.state.tr,g=ks({state:a.state,transaction:h}),v={from:r-(p[0].length-o.length),to:i},{commands:S,chain:T,can:x}=new Os({editor:t,state:g});f.handler({state:g,range:v,match:p,commands:S,chain:T,can:x})===null||!h.steps.length||(h.setMeta(l,{transform:h,from:r,to:i,text:o}),a.dispatch(h),u=!0)}),u}function bb(n){const{editor:e,rules:t}=n,r=new bt({state:{init(){return null},apply(i,o){const s=i.getMeta(r);return s||(i.selectionSet||i.docChanged?null:o)}},props:{handleTextInput(i,o,s,l){return ca({editor:e,from:o,to:s,text:l,rules:t,plugin:r})},handleDOMEvents:{compositionend:i=>(setTimeout(()=>{const{$cursor:o}=i.state.selection;o&&ca({editor:e,from:o.pos,to:o.pos,text:"",rules:t,plugin:r})}),!1)},handleKeyDown(i,o){if(o.key!=="Enter")return!1;const{$cursor:s}=i.state.selection;return s?ca({editor:e,from:s.pos,to:s.pos,text:`
20
- `,rules:t,plugin:r}):!1}},isInputRules:!0});return r}function Eb(n){return typeof n=="number"}class Sb{constructor(e){this.find=e.find,this.handler=e.handler}}const Cb=(n,e)=>{if(Gl(e))return[...n.matchAll(e)];const t=e(n);return t?t.map(r=>{const i=[r.text];return i.index=r.index,i.input=n,i.data=r.data,r.replaceWith&&(r.text.includes(r.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),i.push(r.replaceWith)),i}):[]};function Tb(n){const{editor:e,state:t,from:r,to:i,rule:o,pasteEvent:s,dropEvent:l}=n,{commands:a,chain:c,can:u}=new Os({editor:e,state:t}),d=[];return t.doc.nodesBetween(r,i,(p,h)=>{if(!p.isTextblock||p.type.spec.code)return;const g=Math.max(r,h),v=Math.min(i,h+p.content.size),S=p.textBetween(g-h,v-h,void 0,"");Cb(S,o.find).forEach(x=>{if(x.index===void 0)return;const b=g+x.index+1,D=b+x[0].length,A={from:t.tr.mapping.map(b),to:t.tr.mapping.map(D)},B=o.handler({state:t,range:A,match:x,commands:a,chain:c,can:u,pasteEvent:s,dropEvent:l});d.push(B)})}),d.every(p=>p!==null)}function xb(n){const{editor:e,rules:t}=n;let r=null,i=!1,o=!1,s=new ClipboardEvent("paste"),l=new DragEvent("drop");return t.map(c=>new bt({view(u){const d=f=>{var p;r=!((p=u.dom.parentElement)===null||p===void 0)&&p.contains(f.target)?u.dom.parentElement:null};return window.addEventListener("dragstart",d),{destroy(){window.removeEventListener("dragstart",d)}}},props:{handleDOMEvents:{drop:(u,d)=>(o=r===u.dom.parentElement,l=d,!1),paste:(u,d)=>{var f;const p=(f=d.clipboardData)===null||f===void 0?void 0:f.getData("text/html");return s=d,i=!!(p!=null&&p.includes("data-pm-slice")),!1}}},appendTransaction:(u,d,f)=>{const p=u[0],h=p.getMeta("uiEvent")==="paste"&&!i,g=p.getMeta("uiEvent")==="drop"&&!o;if(!h&&!g)return;const v=d.doc.content.findDiffStart(f.doc.content),S=d.doc.content.findDiffEnd(f.doc.content);if(!Eb(v)||!S||v===S.b)return;const T=f.tr,x=ks({state:f,transaction:T});if(!(!Tb({editor:e,state:x,from:Math.max(v-1,0),to:S.b-1,rule:c,pasteEvent:s,dropEvent:l})||!T.steps.length))return l=new DragEvent("drop"),s=new ClipboardEvent("paste"),T}}))}function Ab(n){const e=n.filter((t,r)=>n.indexOf(t)!==r);return[...new Set(e)]}class Rr{constructor(e,t){this.splittableMarks=[],this.editor=t,this.extensions=Rr.resolve(e),this.schema=gb(this.extensions,t),this.extensions.forEach(r=>{var i;this.editor.extensionStorage[r.name]=r.storage;const o={name:r.name,options:r.options,storage:r.storage,editor:this.editor,type:la(r.name,this.schema)};r.type==="mark"&&(!((i=De(me(r,"keepOnSplit",o)))!==null&&i!==void 0)||i)&&this.splittableMarks.push(r.name);const s=me(r,"onBeforeCreate",o);s&&this.editor.on("beforeCreate",s);const l=me(r,"onCreate",o);l&&this.editor.on("create",l);const a=me(r,"onUpdate",o);a&&this.editor.on("update",a);const c=me(r,"onSelectionUpdate",o);c&&this.editor.on("selectionUpdate",c);const u=me(r,"onTransaction",o);u&&this.editor.on("transaction",u);const d=me(r,"onFocus",o);d&&this.editor.on("focus",d);const f=me(r,"onBlur",o);f&&this.editor.on("blur",f);const p=me(r,"onDestroy",o);p&&this.editor.on("destroy",p)})}static resolve(e){const t=Rr.sort(Rr.flatten(e)),r=Ab(t.map(i=>i.name));return r.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${r.map(i=>`'${i}'`).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},i=me(t,"addExtensions",r);return i?[t,...this.flatten(i())]:t}).flat(10)}static sort(e){return e.sort((r,i)=>{const o=me(r,"priority")||100,s=me(i,"priority")||100;return o>s?-1:o<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:la(t.name,this.schema)},i=me(t,"addCommands",r);return i?{...e,...i()}:e},{})}get plugins(){const{editor:e}=this,t=Rr.sort([...this.extensions].reverse()),r=[],i=[],o=t.map(s=>{const l={name:s.name,options:s.options,storage:s.storage,editor:e,type:la(s.name,this.schema)},a=[],c=me(s,"addKeyboardShortcuts",l);let u={};if(s.type==="mark"&&s.config.exitable&&(u.ArrowRight=()=>an.handleExit({editor:e,mark:s})),c){const g=Object.fromEntries(Object.entries(c()).map(([v,S])=>[v,()=>S({editor:e})]));u={...u,...g}}const d=Vy(u);a.push(d);const f=me(s,"addInputRules",l);ju(s,e.options.enableInputRules)&&f&&r.push(...f());const p=me(s,"addPasteRules",l);ju(s,e.options.enablePasteRules)&&p&&i.push(...p());const h=me(s,"addProseMirrorPlugins",l);if(h){const g=h();a.push(...g)}return a}).flat();return[bb({editor:e,rules:r}),...xb({editor:e,rules:i}),...o]}get attributes(){return Vh(this.extensions)}get nodeViews(){const{editor:e}=this,{nodeExtensions:t}=Ms(this.extensions);return Object.fromEntries(t.filter(r=>!!me(r,"addNodeView")).map(r=>{const i=this.attributes.filter(a=>a.type===r.name),o={name:r.name,options:r.options,storage:r.storage,editor:e,type:Je(r.name,this.schema)},s=me(r,"addNodeView",o);if(!s)return[];const l=(a,c,u,d)=>{const f=qa(a,i);return s()({editor:e,node:a,getPos:u,decorations:d,HTMLAttributes:f,extension:r})};return[r.name,l]}))}}function wb(n){return Object.prototype.toString.call(n).slice(8,-1)}function ua(n){return wb(n)!=="Object"?!1:n.constructor===Object&&Object.getPrototypeOf(n)===Object.prototype}function Ns(n,e){const t={...n};return ua(n)&&ua(e)&&Object.keys(e).forEach(r=>{ua(e[r])?r in n?t[r]=Ns(n[r],e[r]):Object.assign(t,{[r]:e[r]}):Object.assign(t,{[r]:e[r]})}),t}class Pt{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=De(me(this,"addOptions",{name:this.name}))),this.storage=De(me(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new Pt(e)}configure(e={}){const t=this.extend();return t.options=Ns(this.options,e),t.storage=De(me(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){const t=new Pt(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=De(me(t,"addOptions",{name:t.name})),t.storage=De(me(t,"addStorage",{name:t.name,options:t.options})),t}}function Uh(n,e,t){const{from:r,to:i}=e,{blockSeparator:o=`
21
-
22
- `,textSerializers:s={}}=t||{};let l="",a=!0;return n.nodesBetween(r,i,(c,u,d,f)=>{var p;const h=s==null?void 0:s[c.type.name];h?(c.isBlock&&!a&&(l+=o,a=!0),d&&(l+=h({node:c,pos:u,parent:d,index:f,range:e}))):c.isText?(l+=(p=c==null?void 0:c.text)===null||p===void 0?void 0:p.slice(Math.max(r,u)-u,i-u),a=!1):c.isBlock&&!a&&(l+=o,a=!0)}),l}function jh(n){return Object.fromEntries(Object.entries(n.nodes).filter(([,e])=>e.spec.toText).map(([e,t])=>[e,t.spec.toText]))}const kb=Pt.create({name:"clipboardTextSerializer",addProseMirrorPlugins(){return[new bt({key:new Kt("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:n}=this,{state:e,schema:t}=n,{doc:r,selection:i}=e,{ranges:o}=i,s=Math.min(...o.map(u=>u.$from.pos)),l=Math.max(...o.map(u=>u.$to.pos)),a=jh(t);return Uh(r,{from:s,to:l},{textSerializers:a})}}})]}}),Ob=()=>({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),Mb=(n=!1)=>({commands:e})=>e.setContent("",n),Nb=()=>({state:n,tr:e,dispatch:t})=>{const{selection:r}=e,{ranges:i}=r;return t&&i.forEach(({$from:o,$to:s})=>{n.doc.nodesBetween(o.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)),p=d.blockRange(f);if(!p)return;const h=Qr(p);if(l.type.isTextblock){const{defaultType:g}=d.parent.contentMatchAt(d.index());e.setNodeMarkup(p.start,g)}(h||h===0)&&e.lift(p,h)})}),!0},Ib=n=>e=>n(e),Db=()=>({state:n,dispatch:e})=>eb(n,e),Rb=(n,e)=>({editor:t,tr:r})=>{const{state:i}=t,o=i.doc.slice(n.from,n.to);r.deleteRange(n.from,n.to);const s=r.mapping.map(e);return r.insert(s,o.content),r.setSelection(new Le(r.doc.resolve(s-1))),!0},Lb=()=>({tr:n,dispatch:e})=>{const{selection:t}=n,r=t.$anchor.node();if(r.content.size>0)return!1;const i=n.selection.$anchor;for(let o=i.depth;o>0;o-=1)if(i.node(o).type===r.type){if(e){const l=i.before(o),a=i.after(o);n.delete(l,a).scrollIntoView()}return!0}return!1},_b=n=>({tr:e,state:t,dispatch:r})=>{const i=Je(n,t.schema),o=e.selection.$anchor;for(let s=o.depth;s>0;s-=1)if(o.node(s).type===i){if(r){const a=o.before(s),c=o.after(s);e.delete(a,c).scrollIntoView()}return!0}return!1},Pb=n=>({tr:e,dispatch:t})=>{const{from:r,to:i}=n;return t&&e.delete(r,i),!0},Bb=()=>({state:n,dispatch:e})=>Hy(n,e),Fb=()=>({commands:n})=>n.keyboardShortcut("Enter"),$b=()=>({state:n,dispatch:e})=>qy(n,e);function Mo(n,e,t={strict:!0}){const r=Object.keys(e);return r.length?r.every(i=>t.strict?e[i]===n[i]:Gl(e[i])?e[i].test(n[i]):e[i]===n[i]):!0}function el(n,e,t={}){return n.find(r=>r.type===e&&Mo(r.attrs,t))}function Vb(n,e,t={}){return!!el(n,e,t)}function Yl(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 i=el([...r.node.marks],e,t);if(!i)return;let o=r.index,s=n.start()+r.offset,l=o+1,a=s+r.node.nodeSize;for(el([...r.node.marks],e,t);o>0&&i.isInSet(n.parent.child(o-1).marks);)o-=1,s-=n.parent.child(o).nodeSize;for(;l<n.parent.childCount&&Vb([...n.parent.child(l).marks],e,t);)a+=n.parent.child(l).nodeSize,l+=1;return{from:s,to:a}}function Un(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 zb=(n,e={})=>({tr:t,state:r,dispatch:i})=>{const o=Un(n,r.schema),{doc:s,selection:l}=t,{$from:a,from:c,to:u}=l;if(i){const d=Yl(a,o,e);if(d&&d.from<=c&&d.to>=u){const f=Le.create(s,d.from,d.to);t.setSelection(f)}}return!0},Hb=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 Jl(n){return n instanceof Le}function mn(n=0,e=0,t=0){return Math.min(Math.max(n,e),t)}function Wh(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 i=t.from,o=r.to;return e==="all"?Le.create(n,mn(0,i,o),mn(n.content.size,i,o)):Le.create(n,mn(e,i,o),mn(e,i,o))}function Xl(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}const Ub=(n=null,e={})=>({editor:t,view:r,tr:i,dispatch:o})=>{e={scrollIntoView:!0,...e};const s=()=>{Xl()&&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(o&&n===null&&!Jl(t.state.selection))return s(),!0;const l=Wh(i.doc,n)||t.state.selection,a=t.state.selection.eq(l);return o&&(a||i.setSelection(l),a&&i.storedMarks&&i.setStoredMarks(i.storedMarks),s()),!0},jb=(n,e)=>t=>n.every((r,i)=>e(r,{...t,index:i})),Wb=(n,e)=>({tr:t,commands:r})=>r.insertContentAt({from:t.selection.from,to:t.selection.to},n,e);function Wu(n){const e=`<body>${n}</body>`;return new window.DOMParser().parseFromString(e,"text/html").body}function No(n,e,t){if(t={slice:!0,parseOptions:{},...t},typeof n=="object"&&n!==null)try{return Array.isArray(n)&&n.length>0?se.fromArray(n.map(r=>e.nodeFromJSON(r))):e.nodeFromJSON(n)}catch(r){return console.warn("[tiptap warn]: Invalid content.","Passed value:",n,"Error:",r),No("",e,t)}if(typeof n=="string"){const r=Fr.fromSchema(e);return t.slice?r.parseSlice(Wu(n),t.parseOptions).content:r.parse(Wu(n),t.parseOptions)}return No("",e,t)}function Kb(n,e,t){const r=n.steps.length-1;if(r<e)return;const i=n.steps[r];if(!(i instanceof qe||i instanceof Ye))return;const o=n.mapping.maps[r];let s=0;o.forEach((l,a,c,u)=>{s===0&&(s=u)}),n.setSelection(Re.near(n.doc.resolve(s),t))}const Gb=n=>n.toString().startsWith("<"),Yb=(n,e,t)=>({tr:r,dispatch:i,editor:o})=>{if(i){t={parseOptions:{},updateSelection:!0,...t};const s=No(e,o.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((Gb(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&&Kb(r,r.steps.length-1,-1)}return!0},Jb=()=>({state:n,dispatch:e})=>Jy(n,e),Xb=()=>({state:n,dispatch:e})=>Xy(n,e),Qb=()=>({state:n,dispatch:e})=>jy(n,e),Zb=()=>({state:n,dispatch:e})=>Gy(n,e),qb=()=>({tr:n,state:e,dispatch:t})=>{try{const r=Cs(e.doc,e.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},eE=()=>({state:n,dispatch:e,tr:t})=>{try{const r=Cs(n.doc,n.selection.$from.pos,1);return r==null?!1:(t.join(r,2),e&&e(t),!0)}catch{return!1}};function Kh(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function tE(n){const e=n.split(/-(?!$)/);let t=e[e.length-1];t==="Space"&&(t=" ");let r,i,o,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))i=!0;else if(/^s(hift)?$/i.test(a))o=!0;else if(/^mod$/i.test(a))Xl()||Kh()?s=!0:i=!0;else throw new Error(`Unrecognized modifier name: ${a}`)}return r&&(t=`Alt-${t}`),i&&(t=`Ctrl-${t}`),s&&(t=`Meta-${t}`),o&&(t=`Shift-${t}`),t}const nE=n=>({editor:e,view:t,tr:r,dispatch:i})=>{const o=tE(n).split(/-(?!$)/),s=o.find(c=>!["Alt","Ctrl","Meta","Shift"].includes(c)),l=new KeyboardEvent("keydown",{key:s==="Space"?" ":s,altKey:o.includes("Alt"),ctrlKey:o.includes("Ctrl"),metaKey:o.includes("Meta"),shiftKey:o.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&&i&&r.maybeStep(u)}),!0};function Oi(n,e,t={}){const{from:r,to:i,empty:o}=n.selection,s=e?Je(e,n.schema):null,l=[];n.doc.nodesBetween(r,i,(d,f)=>{if(d.isText)return;const p=Math.max(r,f),h=Math.min(i,f+d.nodeSize);l.push({node:d,from:p,to:h})});const a=i-r,c=l.filter(d=>s?s.name===d.node.type.name:!0).filter(d=>Mo(d.node.attrs,t,{strict:!1}));return o?!!c.length:c.reduce((d,f)=>d+f.to-f.from,0)>=a}const rE=(n,e={})=>({state:t,dispatch:r})=>{const i=Je(n,t.schema);return Oi(t,i,e)?Qy(t,r):!1},iE=()=>({state:n,dispatch:e})=>tb(n,e),oE=n=>({state:e,dispatch:t})=>{const r=Je(n,e.schema);return cb(r)(e,t)},sE=()=>({state:n,dispatch:e})=>Zy(n,e);function Is(n,e){return e.nodes[n]?"node":e.marks[n]?"mark":null}function Ku(n,e){const t=typeof e=="string"?[e]:e;return Object.keys(n).reduce((r,i)=>(t.includes(i)||(r[i]=n[i]),r),{})}const aE=(n,e)=>({tr:t,state:r,dispatch:i})=>{let o=null,s=null;const l=Is(typeof n=="string"?n:n.name,r.schema);return l?(l==="node"&&(o=Je(n,r.schema)),l==="mark"&&(s=Un(n,r.schema)),i&&t.selection.ranges.forEach(a=>{r.doc.nodesBetween(a.$from.pos,a.$to.pos,(c,u)=>{o&&o===c.type&&t.setNodeMarkup(u,void 0,Ku(c.attrs,e)),s&&c.marks.length&&c.marks.forEach(d=>{s===d.type&&t.addMark(u,u+c.nodeSize,s.create(Ku(d.attrs,e)))})})}),!0):!1},lE=()=>({tr:n,dispatch:e})=>(e&&n.scrollIntoView(),!0),cE=()=>({tr:n,commands:e})=>e.setTextSelection({from:0,to:n.doc.content.size}),uE=()=>({state:n,dispatch:e})=>Wy(n,e),dE=()=>({state:n,dispatch:e})=>Yy(n,e),fE=()=>({state:n,dispatch:e})=>nb(n,e),hE=()=>({state:n,dispatch:e})=>ob(n,e),pE=()=>({state:n,dispatch:e})=>ib(n,e);function Gh(n,e,t={}){return No(n,e,{slice:!1,parseOptions:t})}const mE=(n,e=!1,t={})=>({tr:r,editor:i,dispatch:o})=>{const{doc:s}=r,l=Gh(n,i.schema,t);return o&&r.replaceWith(0,s.content.size,l).setMeta("preventUpdate",!e),!0};function Ds(n,e){const t=Un(e,n.schema),{from:r,to:i,empty:o}=n.selection,s=[];o?(n.storedMarks&&s.push(...n.storedMarks),s.push(...n.selection.$head.marks())):n.doc.nodesBetween(r,i,a=>{s.push(...a.marks)});const l=s.find(a=>a.type.name===t.name);return l?{...l.attrs}:{}}function gE(n,e){const t=new qf(n);return e.forEach(r=>{r.steps.forEach(i=>{t.step(i)})}),t}function vE(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 yE(n,e,t){const r=[];return n.nodesBetween(e.from,e.to,(i,o)=>{t(i)&&r.push({node:i,pos:o})}),r}function bE(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 Ql(n){return e=>bE(e.$from,n)}function EE(n,e){const t=tn.fromSchema(e).serializeFragment(n),i=document.implementation.createHTMLDocument().createElement("div");return i.appendChild(t),i.innerHTML}function SE(n,e){const t={from:0,to:n.content.size};return Uh(n,t,e)}function CE(n,e){const t=Je(e,n.schema),{from:r,to:i}=n.selection,o=[];n.doc.nodesBetween(r,i,l=>{o.push(l)});const s=o.reverse().find(l=>l.type.name===t.name);return s?{...s.attrs}:{}}function Yh(n,e){const t=Is(typeof e=="string"?e:e.name,n.schema);return t==="node"?CE(n,e):t==="mark"?Ds(n,e):{}}function TE(n,e=JSON.stringify){const t={};return n.filter(r=>{const i=e(r);return Object.prototype.hasOwnProperty.call(t,i)?!1:t[i]=!0})}function xE(n){const e=TE(n);return e.length===1?e:e.filter((t,r)=>!e.filter((o,s)=>s!==r).some(o=>t.oldRange.from>=o.oldRange.from&&t.oldRange.to<=o.oldRange.to&&t.newRange.from>=o.newRange.from&&t.newRange.to<=o.newRange.to))}function AE(n){const{mapping:e,steps:t}=n,r=[];return e.maps.forEach((i,o)=>{const s=[];if(i.ranges.length)i.forEach((l,a)=>{s.push({from:l,to:a})});else{const{from:l,to:a}=t[o];if(l===void 0||a===void 0)return;s.push({from:l,to:a})}s.forEach(({from:l,to:a})=>{const c=e.slice(o).map(l,-1),u=e.slice(o).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}})})}),xE(r)}function Zl(n,e,t){const r=[];return n===e?t.resolve(n).marks().forEach(i=>{const o=t.resolve(n-1),s=Yl(o,i.type);s&&r.push({mark:i,...s})}):t.nodesBetween(n,e,(i,o)=>{r.push(...i.marks.map(s=>({from:o,to:o+i.nodeSize,mark:s})))}),r}function co(n,e,t){return Object.fromEntries(Object.entries(t).filter(([r])=>{const i=n.find(o=>o.type===e&&o.name===r);return i?i.attribute.keepOnSplit:!1}))}function tl(n,e,t={}){const{empty:r,ranges:i}=n.selection,o=e?Un(e,n.schema):null;if(r)return!!(n.storedMarks||n.selection.$from.marks()).filter(d=>o?o.name===d.type.name:!0).find(d=>Mo(d.attrs,t,{strict:!1}));let s=0;const l=[];if(i.forEach(({$from:d,$to:f})=>{const p=d.pos,h=f.pos;n.doc.nodesBetween(p,h,(g,v)=>{if(!g.isText&&!g.marks.length)return;const S=Math.max(p,v),T=Math.min(h,v+g.nodeSize),x=T-S;s+=x,l.push(...g.marks.map(b=>({mark:b,from:S,to:T})))})}),s===0)return!1;const a=l.filter(d=>o?o.name===d.mark.type.name:!0).filter(d=>Mo(d.mark.attrs,t,{strict:!1})).reduce((d,f)=>d+f.to-f.from,0),c=l.filter(d=>o?d.mark.type!==o&&d.mark.type.excludes(o):!0).reduce((d,f)=>d+f.to-f.from,0);return(a>0?a+c:a)>=s}function wE(n,e,t={}){if(!e)return Oi(n,null,t)||tl(n,null,t);const r=Is(e,n.schema);return r==="node"?Oi(n,e,t):r==="mark"?tl(n,e,t):!1}function Gu(n,e){const{nodeExtensions:t}=Ms(e),r=t.find(s=>s.name===n);if(!r)return!1;const i={name:r.name,options:r.options,storage:r.storage},o=De(me(r,"group",i));return typeof o!="string"?!1:o.split(" ").includes("list")}function kE(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 OE(n){return n instanceof Ce}function Jh(n,e,t){const i=n.state.doc.content.size,o=mn(e,0,i),s=mn(t,0,i),l=n.coordsAtPos(o),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),p=f-d,h=u-c,S={top:c,bottom:u,left:d,right:f,width:p,height:h,x:d,y:c};return{...S,toJSON:()=>S}}function ME(n,e,t){var r;const{selection:i}=e;let o=null;if(Jl(i)&&(o=i.$cursor),o){const l=(r=n.storedMarks)!==null&&r!==void 0?r:o.marks();return!!t.isInSet(l)||!l.some(a=>a.type.excludes(t))}const{ranges:s}=i;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 p=!f||f.type.allowsMarkType(t),h=!!t.isInSet(u.marks)||!u.marks.some(g=>g.type.excludes(t));c=p&&h}return!c}),c})}const NE=(n,e={})=>({tr:t,state:r,dispatch:i})=>{const{selection:o}=t,{empty:s,ranges:l}=o,a=Un(n,r.schema);if(i)if(s){const c=Ds(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,p)=>{const h=Math.max(p,u),g=Math.min(p+f.nodeSize,d);f.marks.find(S=>S.type===a)?f.marks.forEach(S=>{a===S.type&&t.addMark(h,g,a.create({...S.attrs,...e}))}):t.addMark(h,g,a.create(e))})});return ME(r,t,a)},IE=(n,e)=>({tr:t})=>(t.setMeta(n,e),!0),DE=(n,e={})=>({state:t,dispatch:r,chain:i})=>{const o=Je(n,t.schema);return o.isTextblock?i().command(({commands:s})=>zu(o,e)(t)?!0:s.clearNodes()).command(({state:s})=>zu(o,e)(s,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},RE=n=>({tr:e,dispatch:t})=>{if(t){const{doc:r}=e,i=mn(n,0,r.content.size),o=Ce.create(r,i);e.setSelection(o)}return!0},LE=n=>({tr:e,dispatch:t})=>{if(t){const{doc:r}=e,{from:i,to:o}=typeof n=="number"?{from:n,to:n}:n,s=Le.atStart(r).from,l=Le.atEnd(r).to,a=mn(i,s,l),c=mn(o,s,l),u=Le.create(r,a,c);e.setSelection(u)}return!0},_E=n=>({state:e,dispatch:t})=>{const r=Je(n,e.schema);return fb(r)(e,t)};function Yu(n,e){const t=n.storedMarks||n.selection.$to.parentOffset&&n.selection.$from.marks();if(t){const r=t.filter(i=>e==null?void 0:e.includes(i.type.name));n.tr.ensureMarks(r)}}const PE=({keepMarks:n=!0}={})=>({tr:e,state:t,dispatch:r,editor:i})=>{const{selection:o,doc:s}=e,{$from:l,$to:a}=o,c=i.extensionManager.attributes,u=co(c,l.node().type.name,l.node().attrs);if(o instanceof Ce&&o.node.isBlock)return!l.parentOffset||!_r(s,l.pos)?!1:(r&&(n&&Yu(t,i.extensionManager.splittableMarks),e.split(l.pos).scrollIntoView()),!0);if(!l.parent.isBlock)return!1;if(r){const d=a.parentOffset===a.parent.content.size;o instanceof Le&&e.deleteSelection();const f=l.depth===0?void 0:vE(l.node(-1).contentMatchAt(l.indexAfter(-1)));let p=d&&f?[{type:f,attrs:u}]:void 0,h=_r(e.doc,e.mapping.map(l.pos),1,p);if(!p&&!h&&_r(e.doc,e.mapping.map(l.pos),1,f?[{type:f}]:void 0)&&(h=!0,p=f?[{type:f,attrs:u}]:void 0),h&&(e.split(e.mapping.map(l.pos),1,p),f&&!d&&!l.parentOffset&&l.parent.type!==f)){const g=e.mapping.map(l.before()),v=e.doc.resolve(g);l.node(-1).canReplaceWith(v.index(),v.index()+1,f)&&e.setNodeMarkup(e.mapping.map(l.before()),f)}n&&Yu(t,i.extensionManager.splittableMarks),e.scrollIntoView()}return!0},BE=n=>({tr:e,state:t,dispatch:r,editor:i})=>{var o;const s=Je(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=i.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 v=se.empty;const S=l.index(-1)?1:l.index(-2)?2:3;for(let B=l.depth-S;B>=l.depth-3;B-=1)v=se.from(l.node(B).copy(v));const T=l.indexAfter(-1)<l.node(-2).childCount?1:l.indexAfter(-2)<l.node(-3).childCount?2:3,x=co(d,l.node().type.name,l.node().attrs),b=((o=s.contentMatch.defaultType)===null||o===void 0?void 0:o.createAndFill(x))||void 0;v=v.append(se.from(s.createAndFill(null,b)||void 0));const D=l.before(l.depth-(S-1));e.replace(D,l.after(-T),new he(v,4-S,0));let A=-1;e.doc.nodesBetween(D,e.doc.content.size,(B,$)=>{if(A>-1)return!1;B.isTextblock&&B.content.size===0&&(A=$+1)}),A>-1&&e.setSelection(Le.near(e.doc.resolve(A))),e.scrollIntoView()}return!0}const f=a.pos===l.end()?u.contentMatchAt(0).defaultType:null,p=co(d,u.type.name,u.attrs),h=co(d,l.node().type.name,l.node().attrs);e.delete(l.pos,a.pos);const g=f?[{type:s,attrs:p},{type:f,attrs:h}]:[{type:s,attrs:p}];if(!_r(e.doc,l.pos,2))return!1;if(r){const{selection:v,storedMarks:S}=t,{splittableMarks:T}=i.extensionManager,x=S||v.$to.parentOffset&&v.$from.marks();if(e.split(l.pos,2,g).scrollIntoView(),!x||!r)return!0;const b=x.filter(D=>T.includes(D.type.name));e.ensureMarks(b)}return!0},da=(n,e)=>{const t=Ql(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 i=n.doc.nodeAt(r);return t.node.type===(i==null?void 0:i.type)&&zn(n.doc,t.pos)&&n.join(t.pos),!0},fa=(n,e)=>{const t=Ql(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 i=n.doc.nodeAt(r);return t.node.type===(i==null?void 0:i.type)&&zn(n.doc,r)&&n.join(r),!0},FE=(n,e,t,r={})=>({editor:i,tr:o,state:s,dispatch:l,chain:a,commands:c,can:u})=>{const{extensions:d,splittableMarks:f}=i.extensionManager,p=Je(n,s.schema),h=Je(e,s.schema),{selection:g,storedMarks:v}=s,{$from:S,$to:T}=g,x=S.blockRange(T),b=v||g.$to.parentOffset&&g.$from.marks();if(!x)return!1;const D=Ql(A=>Gu(A.type.name,d))(g);if(x.depth>=1&&D&&x.depth-D.depth<=1){if(D.node.type===p)return c.liftListItem(h);if(Gu(D.node.type.name,d)&&p.validContent(D.node.content)&&l)return a().command(()=>(o.setNodeMarkup(D.pos,p),!0)).command(()=>da(o,p)).command(()=>fa(o,p)).run()}return!t||!b||!l?a().command(()=>u().wrapInList(p,r)?!0:c.clearNodes()).wrapInList(p,r).command(()=>da(o,p)).command(()=>fa(o,p)).run():a().command(()=>{const A=u().wrapInList(p,r),B=b.filter($=>f.includes($.type.name));return o.ensureMarks(B),A?!0:c.clearNodes()}).wrapInList(p,r).command(()=>da(o,p)).command(()=>fa(o,p)).run()},$E=(n,e={},t={})=>({state:r,commands:i})=>{const{extendEmptyMarkRange:o=!1}=t,s=Un(n,r.schema);return tl(r,s,e)?i.unsetMark(s,{extendEmptyMarkRange:o}):i.setMark(s,e)},VE=(n,e,t={})=>({state:r,commands:i})=>{const o=Je(n,r.schema),s=Je(e,r.schema);return Oi(r,o,t)?i.setNode(s):i.setNode(o,t)},zE=(n,e={})=>({state:t,commands:r})=>{const i=Je(n,t.schema);return Oi(t,i,e)?r.lift(i):r.wrapIn(i,e)},HE=()=>({state:n,dispatch:e})=>{const t=n.plugins;for(let r=0;r<t.length;r+=1){const i=t[r];let o;if(i.spec.isInputRules&&(o=i.getState(n))){if(e){const s=n.tr,l=o.transform;for(let a=l.steps.length-1;a>=0;a-=1)s.step(l.steps[a].invert(l.docs[a]));if(o.text){const a=s.doc.resolve(o.from).marks();s.replaceWith(o.from,o.to,n.schema.text(o.text,a))}else s.delete(o.from,o.to)}return!0}}return!1},UE=()=>({tr:n,dispatch:e})=>{const{selection:t}=n,{empty:r,ranges:i}=t;return r||e&&i.forEach(o=>{n.removeMark(o.$from.pos,o.$to.pos)}),!0},jE=(n,e={})=>({tr:t,state:r,dispatch:i})=>{var o;const{extendEmptyMarkRange:s=!1}=e,{selection:l}=t,a=Un(n,r.schema),{$from:c,empty:u,ranges:d}=l;if(!i)return!0;if(u&&s){let{from:f,to:p}=l;const h=(o=c.marks().find(v=>v.type===a))===null||o===void 0?void 0:o.attrs,g=Yl(c,a,h);g&&(f=g.from,p=g.to),t.removeMark(f,p,a)}else d.forEach(f=>{t.removeMark(f.$from.pos,f.$to.pos,a)});return t.removeStoredMark(a),!0},WE=(n,e={})=>({tr:t,state:r,dispatch:i})=>{let o=null,s=null;const l=Is(typeof n=="string"?n:n.name,r.schema);return l?(l==="node"&&(o=Je(n,r.schema)),l==="mark"&&(s=Un(n,r.schema)),i&&t.selection.ranges.forEach(a=>{const c=a.$from.pos,u=a.$to.pos;r.doc.nodesBetween(c,u,(d,f)=>{o&&o===d.type&&t.setNodeMarkup(f,void 0,{...d.attrs,...e}),s&&d.marks.length&&d.marks.forEach(p=>{if(s===p.type){const h=Math.max(f,c),g=Math.min(f+d.nodeSize,u);t.addMark(h,g,s.create({...p.attrs,...e}))}})})}),!0):!1},KE=(n,e={})=>({state:t,dispatch:r})=>{const i=Je(n,t.schema);return sb(i,e)(t,r)},GE=(n,e={})=>({state:t,dispatch:r})=>{const i=Je(n,t.schema);return ab(i,e)(t,r)};var YE=Object.freeze({__proto__:null,blur:Ob,clearContent:Mb,clearNodes:Nb,command:Ib,createParagraphNear:Db,cut:Rb,deleteCurrentNode:Lb,deleteNode:_b,deleteRange:Pb,deleteSelection:Bb,enter:Fb,exitCode:$b,extendMarkRange:zb,first:Hb,focus:Ub,forEach:jb,insertContent:Wb,insertContentAt:Yb,joinUp:Jb,joinDown:Xb,joinBackward:Qb,joinForward:Zb,joinItemBackward:qb,joinItemForward:eE,keyboardShortcut:nE,lift:rE,liftEmptyBlock:iE,liftListItem:oE,newlineInCode:sE,resetAttributes:aE,scrollIntoView:lE,selectAll:cE,selectNodeBackward:uE,selectNodeForward:dE,selectParentNode:fE,selectTextblockEnd:hE,selectTextblockStart:pE,setContent:mE,setMark:NE,setMeta:IE,setNode:DE,setNodeSelection:RE,setTextSelection:LE,sinkListItem:_E,splitBlock:PE,splitListItem:BE,toggleList:FE,toggleMark:$E,toggleNode:VE,toggleWrap:zE,undoInputRule:HE,unsetAllMarks:UE,unsetMark:jE,updateAttributes:WE,wrapIn:KE,wrapInList:GE});const JE=Pt.create({name:"commands",addCommands(){return{...YE}}}),XE=Pt.create({name:"editable",addProseMirrorPlugins(){return[new bt({key:new Kt("editable"),props:{editable:()=>this.editor.options.editable}})]}}),QE=Pt.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:n}=this;return[new bt({key:new Kt("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}}}})]}}),ZE=Pt.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:p}=d,h=d.parent.isTextblock?l.doc.resolve(f-1):d,g=h.parent.type.spec.isolating,v=d.pos-d.parentOffset,S=g&&h.parent.childCount===1?v===d.pos:Re.atStart(c).from===f;return!u||!S||!p.type.isTextblock||p.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()},i={...r},o={...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 Xl()||Kh()?o:i},addProseMirrorPlugins(){return[new bt({key:new Kt("clearDocument"),appendTransaction:(n,e,t)=>{if(!(n.some(h=>h.docChanged)&&!e.doc.eq(t.doc)))return;const{empty:i,from:o,to:s}=e.selection,l=Re.atStart(e.doc).from,a=Re.atEnd(e.doc).to;if(i||!(o===l&&s===a)||!(t.doc.textBetween(0,t.doc.content.size," "," ").length===0))return;const d=t.tr,f=ks({state:t,transaction:d}),{commands:p}=new Os({editor:this.editor,state:f});if(p.clearNodes(),!!d.steps.length)return d}})]}}),qE=Pt.create({name:"tabindex",addProseMirrorPlugins(){return[new bt({key:new Kt("tabindex"),props:{attributes:this.editor.isEditable?{tabindex:"0"}:{}}})]}});var e2=Object.freeze({__proto__:null,ClipboardTextSerializer:kb,Commands:JE,Editable:XE,FocusEvents:QE,Keymap:ZE,Tabindex:qE});const t2=`.ProseMirror {
11
+ Expect errors in decoding.`),C=C.replace(/[^A-Za-z0-9\+\/\=]/g,"");N=this.KEY_STR.indexOf(C.charAt(j++)),D=this.KEY_STR.indexOf(C.charAt(j++)),V=this.KEY_STR.indexOf(C.charAt(j++)),z=this.KEY_STR.indexOf(C.charAt(j++)),M=N<<2|D>>4,b=(D&15)<<4|V>>2,x=(V&3)<<6|z,G.push(M),V!==64&&G.push(b),z!==64&&G.push(x),M=b=x="",N=D=V=z="",j<C.length;);return G}}]),O}();ye.initClass();var we=function(I,C){var M=!1,b=!0,x=I.document,N=x.documentElement,D=x.addEventListener?"addEventListener":"attachEvent",V=x.addEventListener?"removeEventListener":"detachEvent",z=x.addEventListener?"":"on",j=function W(J){if(!(J.type==="readystatechange"&&x.readyState!=="complete")&&((J.type==="load"?I:x)[V](z+J.type,W,!1),!M&&(M=!0)))return C.call(I,J.type||J)},G=function W(){try{N.doScroll("left")}catch{setTimeout(W,50);return}return j("poll")};if(x.readyState!=="complete"){if(x.createEventObject&&N.doScroll){try{b=!I.frameElement}catch{}b&&G()}return x[D](z+"DOMContentLoaded",j,!1),x[D](z+"readystatechange",j,!1),I[D](z+"load",j,!1)}};H._autoDiscoverFunction=function(){if(H.autoDiscover)return H.discover()},we(window,H._autoDiscoverFunction);function ke(O,I){return typeof O<"u"&&O!==null?I(O):void 0}function Te(O,I,C){if(typeof O<"u"&&O!==null&&typeof O[I]=="function")return C(O,I)}window.Dropzone=H;var ve=H}(),i}()})})(Gu);var zm=Gu.exports;const Tl=Ku(zm),Um={class:"fallback"},Hm=p.createElementVNode("input",{id:"file",type:"file",name:"file",multiple:""},null,-1),jm={for:"file"},Wm={class:"dz-message","data-dz-message":""},Km={id:"bd-dropzone-theme",style:{display:"none"}},Gm={class:"dz-preview dz-file-preview"},Jm={class:"dz-details"},Ym=p.createElementVNode("img",{"data-dz-thumbnail":"",class:"dz-image"},null,-1),Qm=p.createElementVNode("div",{class:"dz-filename"},[p.createElementVNode("small",{"data-dz-name":""})],-1),Xm=p.createElementVNode("div",{class:"dz-progress"},[p.createElementVNode("div",{class:"spinner-border text-primary spinner-border-sm",role:"status"},[p.createElementVNode("span",{class:"visually-hidden"},"Loading...")])],-1),Zm={class:"dz-success-mark"},_m={class:"dz-error-message text-danger"},qm=p.createElementVNode("small",{"data-dz-errormessage":""},null,-1),Ju=p.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=p.computed(()=>({variant:wi.PRIMARY,size:it.SM})),o=Xn(t,"modelValue",e);let i=null;Tl.autoDiscover=!1,p.watch(()=>t.modelValue,()=>{s()}),p.onMounted(()=>{document.getElementById("dropzone")&&l()});const s=()=>{i&&(i.destroy(),l())},l=()=>{var m;i=new Tl("#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:(m=document.querySelector("#bd-dropzone-theme"))==null?void 0:m.innerHTML}),i.on("error",c),i.on("success",a),i.on("removedfile",d)},a=function(m,h){var g;o.value.push({UUID:(g=m.upload)==null?void 0:g.uuid,CorrelationId:h.CorrelationId,Naam:h.Naam}),u(m)},c=function(m){u(m)},u=function(m){const h=m.name;if(!(h.endsWith(".png")||h.endsWith(".jpg")||h.endsWith(".jpeg")||h.endsWith(".gif"))){const g=m.previewElement.getElementsByClassName("icon-file"),v=m.previewElement.getElementsByClassName("dz-image");g[0].classList.remove("d-none"),v[0].classList.add("d-none")}},d=function(m){const h=o.value.findIndex(g=>{var v,E;return((v=g.upload)==null?void 0:v.uuid)===((E=m.upload)==null?void 0:E.uuid)});h!==-1&&o.value.splice(h,1)},f=p.computed(()=>t.tag??"form");return(m,h)=>(p.openBlock(),p.createElementBlock(p.Fragment,null,[(p.openBlock(),p.createBlock(p.resolveDynamicComponent(f.value),{id:"dropzone",class:"dropzone bd-dropzone",enctype:"multipart/form-data"},{default:p.withCtx(()=>[p.createElementVNode("div",Um,[Hm,p.createTextVNode(" test "),p.createElementVNode("label",jm,[p.createVNode(p.unref(Kn)),p.createTextVNode(" "+p.toDisplayString(t.buttonText),1)])]),p.createElementVNode("div",Wm,[p.createVNode(p.unref(yt),p.normalizeProps(p.guardReactiveProps(r.value)),{default:p.withCtx(()=>[p.createVNode(p.unref(Kn)),p.createTextVNode(" "+p.toDisplayString(t.buttonText),1)]),_:1},16)])]),_:1})),p.createElementVNode("div",Km,[p.createElementVNode("div",Gm,[p.createElementVNode("div",Jm,[Ym,p.createVNode(p.unref(ca),{"data-dz-thumbnail":"",class:"d-none"}),Qm,p.createVNode(p.unref(yt),{class:"dz-remove",alt:"Click me to remove the file.","data-dz-remove":""},{default:p.withCtx(()=>[p.createVNode(p.unref(no))]),_:1})]),Xm,p.createElementVNode("div",Zm,[p.createVNode(p.unref(Ei))]),p.createElementVNode("div",_m,[p.createVNode(p.unref(Si)),qm])])])],64))}});function Xe(n){this.content=n}Xe.prototype={constructor:Xe,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 Xe(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 Xe(t)},addToStart:function(n,e){return new Xe([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new Xe(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 Xe(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=Xe.from(n),n.size?new Xe(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=Xe.from(n),n.size?new Xe(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=Xe.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}};Xe.from=function(n){if(n instanceof Xe)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new Xe(e)};function Yu(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=Yu(o.content,i.content,t+1);if(s!=null)return s}t+=o.nodeSize}}function Qu(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=Qu(s.content,l.content,t-1,r-1);if(c)return c}t-=a,r-=a}}class ie{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 ie(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 ie(r,o)}cutByIndex(e,t){return e==t?ie.empty:e==0&&t==this.content.length?this:new ie(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 ie(o,i)}addToStart(e){return new ie([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new ie(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 Yu(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return Qu(this,e,t,r)}findIndex(e,t=-1){if(e==0)return uo(0,e);if(e==this.size)return uo(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?uo(r+1,s):uo(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 ie.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new ie(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return ie.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 ie(t||e,r)}static from(e){if(!e)return ie.empty;if(e instanceof ie)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new ie([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}ie.empty=new ie([],0);const Gi={index:0,offset:0};function uo(n,e){return Gi.index=n,Gi.offset=e,Gi}function Oo(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(!Oo(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!Oo(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let Le=class Ns{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&&Oo(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 Ns.none;if(e instanceof Ns)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=Zu(this.content,e+this.openStart,t);return r&&new fe(r,this.openStart,this.openEnd)}removeBetween(e,t){return new fe(Xu(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(ie.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(ie.empty,0,0);function Xu(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(Xu(i.content,e-o-1,t-o-1)))}function Zu(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=Zu(s.content,e-i-1,t);return l&&n.replaceChild(o,s.copy(l))}function eg(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 _u(n,e,t,0)}function _u(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=_u(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 zn(s,l.cut(0,n.parentOffset).append(t.content).append(l.cut(e.parentOffset)))}else{let{start:s,end:l}=tg(t,n);return zn(i,ed(n,s,l,e,r))}else return zn(i,Io(n,e,r))}function qu(n,e){if(!e.type.compatibleContent(n.type))throw new Mo("Cannot join "+e.type.name+" onto "+n.type.name)}function Ds(n,e,t){let r=n.node(t);return qu(r,e.node(t)),r}function $n(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 Nr(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&&($n(n.nodeAfter,r),i++));for(let l=i;l<s;l++)$n(o.child(l),r);e&&e.depth==t&&e.textOffset&&$n(e.nodeBefore,r)}function zn(n,e){return n.type.checkContent(e),n.copy(e)}function ed(n,e,t,r,o){let i=n.depth>o&&Ds(n,e,o+1),s=r.depth>o&&Ds(t,r,o+1),l=[];return Nr(null,n,o,l),i&&s&&e.index(o)==t.index(o)?(qu(i,s),$n(zn(i,ed(n,e,t,r,o+1)),l)):(i&&$n(zn(i,Io(n,e,o+1)),l),Nr(e,t,o,l),s&&$n(zn(s,Io(t,r,o+1)),l)),Nr(r,null,o,l),new ie(l)}function Io(n,e,t){let r=[];if(Nr(null,n,t,r),n.depth>t){let o=Ds(n,e,t+1);$n(zn(o,Io(n,e,t+1)),r)}return Nr(e,null,t,r),new ie(r)}function tg(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(ie.from(o));return{start:o.resolveNoCache(n.openStart+t),end:o.resolveNoCache(o.content.size-n.openEnd-t)}}class Hr{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 No(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 Hr(t,r,i)}static resolveCached(e,t){for(let o=0;o<Ji.length;o++){let i=Ji[o];if(i.pos==t&&i.doc==e)return i}let r=Ji[Yi]=Hr.resolve(e,t);return Yi=(Yi+1)%ng,r}}let Ji=[],Yi=0,ng=12;class No{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 rg=Object.create(null);let Un=class Rs{constructor(e,t,r,o=Le.none){this.type=e,this.attrs=t,this.marks=o,this.content=r||ie.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&&Oo(this.attrs,t||e.defaultAttrs||rg)&&Le.sameSet(this.marks,r||Le.none)}copy(e=null){return e==this.content?this:new Rs(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Rs(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 eg(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 Hr.resolveCached(this,e)}resolveNoCache(e){return Hr.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()+")"),td(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=ie.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=ie.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,o,r)}};Un.prototype.text=void 0;class Do extends Un{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):td(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 Do(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Do(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 td(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class Gn{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new og(e,t);if(r.next==null)return Gn.empty;let o=nd(r);r.next&&r.err("Unexpected trailing text");let i=dg(ug(o));return fg(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 ie.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
+ `)}}Gn.empty=new Gn(!0);class og{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 nd(n){let e=[];do e.push(ig(n));while(n.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function ig(n){let e=[];do e.push(sg(n));while(n.next&&n.next!=")"&&n.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function sg(n){let e=cg(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=ag(n,e);else break;return e}function Al(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let e=Number(n.next);return n.pos++,e}function ag(n,e){let t=Al(n),r=t;return n.eat(",")&&(n.next!="}"?r=Al(n):r=-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:t,max:r,expr:e}}function lg(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 cg(n){if(n.eat("(")){let e=nd(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=lg(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 ug(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 rd(n,e){return e-n}function Ol(n,e){let t=[];return r(e),t.sort(rd);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 dg(n){let e=Object.create(null);return t(Ol(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]);Ol(n,a).forEach(u=>{c||o.push([l,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let i=e[r.join(",")]=new Gn(r.indexOf(n.length-1)>-1);for(let s=0;s<o.length;s++){let l=o[s][1].sort(rd);i.next.push({type:o[s][0],next:e[l.join(",")]||t(l)})}return i}}function fg(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 od(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 id(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 sd(n){let e=Object.create(null);if(n)for(let t in n)e[t]=new pg(n[t]);return e}let Ml=class ad{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=sd(r.attrs),this.defaultAttrs=od(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==Gn.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:id(this.attrs,e)}create(e=null,t,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Un(this,this.computeAttrs(e),ie.from(t),Le.setFrom(r))}createChecked(e=null,t,r){return t=ie.from(t),this.checkContent(t),new Un(this,this.computeAttrs(e),t,Le.setFrom(r))}createAndFill(e=null,t,r){if(e=this.computeAttrs(e),t=ie.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(ie.empty,!0);return i?new Un(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 ad(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 pg{constructor(e){this.hasDefault=Object.prototype.hasOwnProperty.call(e,"default"),this.default=e.default}get isRequired(){return!this.hasDefault}}class Ai{constructor(e,t,r,o){this.name=e,this.rank=t,this.schema=r,this.spec=o,this.attrs=sd(o.attrs),this.excluded=null;let i=od(this.attrs);this.instance=i?new Le(this,i):null}create(e=null){return!e&&this.instance?this.instance:new Le(this,id(this.attrs,e))}static compile(e,t){let r=Object.create(null),o=0;return e.forEach((i,s)=>r[i]=new Ai(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 hg{constructor(e){this.cached=Object.create(null);let t=this.spec={};for(let o in e)t[o]=e[o];t.nodes=Xe.from(e.nodes),t.marks=Xe.from(e.marks||{}),this.nodes=Ml.compile(this.spec.nodes,this),this.marks=Ai.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]=Gn.parse(s,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.markSet=l=="_"?null:l?Il(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==""?[]:Il(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 Ml){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 Do(r,r.defaultAttrs,e,Le.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeFromJSON(e){return Un.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 Il(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 fr{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 Dl(this,t,!1);return r.addAll(e,t.from,t.to),r.finish()}parseSlice(e,t={}){let r=new Dl(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(vg(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=Rl(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=Rl(s)),s.node||s.ignore||s.mark||(s.node=o)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new fr(e,fr.schemaRules(e)))}}const ld={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},mg={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},cd={ol:!0,ul:!0},Ro=1,Lo=2,Dr=4;function Nl(n,e,t){return e!=null?(e?Ro:0)|(e==="full"?Lo:0):n&&n.whitespace=="pre"?Ro|Lo:t&~Dr}class fo{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&Dr?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(ie.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&Ro)){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=ie.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(ie.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):bg(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&&!ld.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class Dl{constructor(e,t,r){this.parser=e,this.options=t,this.isOpen=r,this.open=0;let o=t.topNode,i,s=Nl(null,t.preserveWhitespace,0)|(r?Dr:0);o?i=new fo(o.type,o.attrs,Le.none,Le.none,!0,t.topMatch||o.type.contentMatch,s):r?i=new fo(null,null,Le.none,Le.none,!0,null,s):i=new fo(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(yg(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&Lo||r.inlineContext(e)||/[^ \t\r\n\u000c]/.test(t)){if(r.options&Ro)r.options&Lo?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;cd.hasOwnProperty(r)&&this.parser.normalizeLists&&gg(e);let i=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(o=this.parser.matchTag(e,this,t));if(i?i.ignore:mg.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(ld.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=Nl(e,o,i.options);i.options&Dr&&i.content.length==0&&(s|=Dr),this.nodes.push(new fo(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=xg(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 gg(n){for(let e=n.firstChild,t=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&cd.hasOwnProperty(r)&&t?(t.appendChild(e),e=t):r=="li"?t=e:r&&(t=null)}}function vg(n,e){return(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,e)}function yg(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 Rl(n){let e={};for(let t in n)e[t]=n[t];return e}function bg(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 xg(n,e){for(let t=0;t<e.length;t++)if(n.eq(e[t]))return e[t]}class Yt{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},r){r||(r=Qi(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}=Yt.renderSpec(Qi(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&&Yt.renderSpec(Qi(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:m}=Yt.renderSpec(e,d,r);if(l.appendChild(f),m){if(s)throw new RangeError("Multiple content holes");s=m}}}return{dom:l,contentDOM:s}}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Yt(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=Ll(e.nodes);return t.text||(t.text=r=>r.text),t}static marksFromSchema(e){return Ll(e.marks)}}function Ll(n){let e={};for(let t in n){let r=n[t].spec.toDOM;r&&(e[t]=r)}return e}function Qi(n){return n.document||window.document}const ud=65535,dd=Math.pow(2,16);function Eg(n,e){return n+e*dd}function Bl(n){return n&ud}function Sg(n){return(n-(n&ud))/dd}const fd=1,pd=2,So=4,hd=8;class Ls{constructor(e,t,r){this.pos=e,this.delInfo=t,this.recover=r}get deleted(){return(this.delInfo&hd)>0}get deletedBefore(){return(this.delInfo&(fd|So))>0}get deletedAfter(){return(this.delInfo&(pd|So))>0}get deletedAcross(){return(this.delInfo&So)>0}}class bt{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&bt.empty)return bt.empty}recover(e){let t=0,r=Bl(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+Sg(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,m=a+o+(f<0?0:u);if(r)return m;let h=e==(t<0?a:d)?null:Eg(l/3,e-a),g=e==a?pd:e==d?fd:So;return(t<0?e!=a:e!=d)&&(g|=hd),new Ls(m,g,h)}o+=u-c}return r?e+o:new Ls(e+o,0,null)}touches(e,t){let r=0,o=Bl(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 bt(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?bt.empty:new bt(e<0?[0,-e,0]:[0,0,e])}}bt.empty=new bt([]);class Rr{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 Rr(this.maps,this.mirror,e,t)}copy(){return new Rr(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 Rr;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 Ls(e,o,null)}}const Xi=Object.create(null);class nt{getMap(){return bt.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=Xi[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 Xi)throw new RangeError("Duplicate use of step JSON ID "+e);return Xi[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 Mo)return He.fail(i.message);throw i}}}function Sa(n,e,t){let r=[];for(let o=0;o<n.childCount;o++){let i=n.child(o);i.content.size&&(i=i.copy(Sa(i.content,e,i))),i.isInline&&(i=e(i,t,o)),r.push(i)}return ie.fromArray(r)}class xn extends nt{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(Sa(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 Qt(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 xn(t.pos,r.pos,this.mark)}merge(e){return e instanceof xn&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new xn(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 xn(t.from,t.to,e.markFromJSON(t.mark))}}nt.jsonID("addMark",xn);class Qt extends nt{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(Sa(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 xn(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 Qt(t.pos,r.pos,this.mark)}merge(e){return e instanceof Qt&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Qt(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 Qt(t.from,t.to,e.markFromJSON(t.mark))}}nt.jsonID("removeMark",Qt);class En extends nt{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(ie.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 En(this.pos,t.marks[o]);return new En(this.pos,this.mark)}}return new pr(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new En(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 En(t.pos,e.markFromJSON(t.mark))}}nt.jsonID("addNodeMark",En);class pr extends nt{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(ie.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new En(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new pr(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 pr(t.pos,e.markFromJSON(t.mark))}}nt.jsonID("removeNodeMark",pr);class Ze extends nt{constructor(e,t,r,o=!1){super(),this.from=e,this.to=t,this.slice=r,this.structure=o}apply(e){return this.structure&&Bs(e,this.from,this.to)?He.fail("Structure replace would overwrite content"):He.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new bt([this.from,this.to-this.from,this.slice.size])}invert(e){return new Ze(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 Ze(t.pos,Math.max(t.pos,r.pos),this.slice)}merge(e){if(!(e instanceof Ze)||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 Ze(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 Ze(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 Ze(t.from,t.to,fe.fromJSON(e,t.slice),!!t.structure)}}nt.jsonID("replace",Ze);class Je extends nt{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&&(Bs(e,this.from,this.gapFrom)||Bs(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 bt([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)}}nt.jsonID("replaceAround",Je);function Bs(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 kg(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),m=Math.min(c+a.nodeSize,t),h=r.addToSet(d);for(let g=0;g<d.length;g++)d[g].isInSet(h)||(s&&s.to==f&&s.mark.eq(d[g])?s.to=m:o.push(s=new Qt(f,m,d[g])));l&&l.to==f?l.to=m:i.push(l=new xn(f,m,r))}}),o.forEach(a=>n.step(a)),i.forEach(a=>n.step(a))}function Cg(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 Ai){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 m=0;m<o.length;m++){let h=o[m];h.step==i-1&&d.eq(o[m].style)&&(f=h)}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 Qt(s.from,s.to,s.style)))}function wg(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 Ze(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 Qt(s,c,a.marks[d]));if(a.isText&&!t.spec.code){let d,f=/\r?\n|\r/g,m;for(;d=f.exec(a.text);)m||(m=new fe(ie.from(t.schema.text(" ",t.allowedMarks(a.marks))),0,0)),i.push(new Ze(s+d.index,s+d.index+d[0].length,m))}}s=c}if(!r.validEnd){let l=r.fillBefore(ie.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 Tg(n,e,t){return(e==0||n.canReplace(e,n.childCount))&&(t==n.childCount||n.canReplace(0,t))}function Sr(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||!Tg(o,i,s))break}return null}function Ag(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=ie.empty,d=0;for(let h=i,g=!1;h>t;h--)g||r.index(h)>0?(g=!0,u=ie.from(r.node(h).copy(u)),d++):a--;let f=ie.empty,m=0;for(let h=i,g=!1;h>t;h--)g||o.after(h+1)<o.end(h)?(g=!0,f=ie.from(o.node(h).copy(f)),m++):c++;n.step(new Je(a,c,s,l,new fe(u.append(f),d,m),u.size-d,!0))}function ka(n,e,t=null,r=n){let o=Og(n,e),i=o&&Mg(r,e);return i?o.map(Pl).concat({type:e,attrs:t}).concat(i.map(Pl)):null}function Pl(n){return{type:n,attrs:null}}function Og(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 Mg(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 Ig(n,e,t){let r=ie.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=ie.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 Ng(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)&&Dg(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(ie.from(r.create(o,null,s.marks)),0,0),1,!0)),!1}})}function Dg(n,e,t){let r=n.resolve(e),o=r.index();return r.parent.canReplaceWith(o,o+1,t)}function Rg(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(ie.from(s),0,0),1,!0))}function cr(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 m=d.content.cutByIndex(f,d.childCount),h=r&&r[u+1];h&&(m=m.replaceChild(0,h.type.create(h.attrs)));let g=r&&r[u]||d;if(!d.canReplace(f+1,d.childCount)||!g.type.validContent(m))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 Lg(n,e,t=1,r){let o=n.doc.resolve(e),i=ie.empty,s=ie.empty;for(let l=o.depth,a=o.depth-t,c=t-1;l>a;l--,c--){i=ie.from(o.node(l).copy(i));let u=r&&r[c];s=ie.from(u?u.type.create(u.attrs,s):o.node(l).copy(s))}n.step(new Ze(e,e,new fe(i.append(s),t,t),!0))}function An(n,e){let t=n.resolve(e),r=t.index();return md(t.nodeBefore,t.nodeAfter)&&t.parent.canReplace(r,r+1)}function md(n,e){return!!(n&&e&&!n.isLeaf&&n.canAppend(e))}function Oi(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&&md(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 Bg(n,e,t){let r=new Ze(e-t,e+t,fe.empty,!0);n.step(r)}function Pg(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 Fg(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 Ca(n,e,t=e,r=fe.empty){if(e==t&&!r.size)return null;let o=n.resolve(e),i=n.resolve(t);return gd(o,i,r)?new Ze(e,t,r):new Vg(o,i,r).fit()}function gd(n,e,t){return!t.openStart&&!t.openEnd&&n.start()==e.start()&&n.parent.canReplace(n.index(),e.index(),t.content)}class Vg{constructor(e,t,r){this.$from=e,this.$to=t,this.unplaced=r,this.frontier=[],this.placed=ie.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=ie.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 Ze(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=Zi(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(ie.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=Zi(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=Zi(e,t);if(o.childCount<=1&&t>0){let i=e.size-t<=t+o.size;this.unplaced=new fe(Ar(e,t-1,1),t-1,i?t-1:r)}else this.unplaced=new fe(Ar(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 m=l.size+e-(s.content.size-s.openEnd);for(;c<l.childCount;){let g=l.child(c),v=d.matchType(g.type);if(!v)break;c++,(c>1||a==0||g.content.size)&&(d=v,u.push(vd(g.mark(f.allowedMarks(g.marks)),c==1?a:0,c==l.childCount?m:-1)))}let h=c==l.childCount;h||(m=-1),this.placed=Or(this.placed,t,ie.from(u)),this.frontier[t].match=d,h&&m<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let g=0,v=l;g<m;g++){let E=v.lastChild;this.frontier.push({type:E.type,match:E.contentMatchAt(E.childCount)}),v=E.content}this.unplaced=h?e==0?fe.empty:new fe(Ar(s.content,e-1,1),e-1,m<0?s.openEnd:e-1):new fe(Ar(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||!_i(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=_i(e,t,o,r,i);if(s){for(let l=t-1;l>=0;l--){let{match:a,type:c}=this.frontier[l],u=_i(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=Or(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=Or(this.placed,this.depth,ie.from(e.create(t,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(ie.empty,!0);t.childCount&&(this.placed=Or(this.placed,this.frontier.length,t))}}function Ar(n,e,t){return e==0?n.cutByIndex(t,n.childCount):n.replaceChild(0,n.firstChild.copy(Ar(n.firstChild.content,e-1,t)))}function Or(n,e,t){return e==0?n.append(t):n.replaceChild(n.childCount-1,n.lastChild.copy(Or(n.lastChild.content,e-1,t)))}function Zi(n,e){for(let t=0;t<e;t++)n=n.firstChild.content;return n}function vd(n,e,t){if(e<=0)return n;let r=n.content;return e>1&&(r=r.replaceChild(0,vd(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(ie.empty,!0)))),n.copy(r)}function _i(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&&!$g(t,i.content,s)?l:null}function $g(n,e,t){for(let r=t;r<e.childCount;r++)if(!n.allowsMarks(e.child(r).marks))return!0;return!1}function zg(n){return n.spec.defining||n.spec.definingForContent}function Ug(n,e,t,r){if(!r.size)return n.deleteRange(e,t);let o=n.doc.resolve(e),i=n.doc.resolve(t);if(gd(o,i,r))return n.step(new Ze(e,t,r));let s=bd(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,m=o.pos-1;f>0;f--,m--){let h=o.node(f).type.spec;if(h.defining||h.definingAsContext||h.isolating)break;s.indexOf(f)>-1?l=f:o.before(f)==m&&s.splice(1,0,-f)}let a=s.indexOf(l),c=[],u=r.openStart;for(let f=r.content,m=0;;m++){let h=f.firstChild;if(c.push(h),m==r.openStart)break;f=h.content}for(let f=u-1;f>=0;f--){let m=c[f],h=zg(m.type);if(h&&!m.sameMarkup(o.node(Math.abs(l)-1)))u=f;else if(h||!m.type.isTextblock)break}for(let f=r.openStart;f>=0;f--){let m=(f+u+1)%(r.openStart+1),h=c[m];if(h)for(let g=0;g<s.length;g++){let v=s[(g+a)%s.length],E=!0;v<0&&(E=!1,v=-v);let k=o.node(v-1),w=o.index(v-1);if(k.canReplaceWith(w,w,h.type,h.marks))return n.replace(o.before(v),E?i.after(v):t,new fe(yd(r.content,0,r.openStart,m),m,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 m=s[f];m<0||(e=o.before(m),t=i.after(m))}}function yd(n,e,t,r,o){if(e<t){let i=n.firstChild;n=n.replaceChild(0,i.copy(yd(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(ie.empty,!0))}return n}function Hg(n,e,t,r){if(!r.isInline&&e==t&&n.doc.resolve(e).parent.content.size){let o=Pg(n.doc,e,r.type);o!=null&&(e=t=o)}n.replaceRange(e,t,new fe(ie.from(r),0,0))}function jg(n,e,t){let r=n.doc.resolve(e),o=n.doc.resolve(t),i=bd(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 bd(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 ur extends nt{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(ie.from(o),0,t.isLeaf?0:1))}getMap(){return bt.empty}invert(e){return new ur(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 ur(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 ur(t.pos,t.attr,t.value)}}nt.jsonID("attr",ur);class jr extends nt{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 bt.empty}invert(e){return new jr(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 jr(t.attr,t.value)}}nt.jsonID("docAttr",jr);let hr=class extends Error{};hr=function n(e){let t=Error.call(this,e);return t.__proto__=n.prototype,t};hr.prototype=Object.create(Error.prototype);hr.prototype.constructor=hr;hr.prototype.name="TransformError";class xd{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Rr}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new hr(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=Ca(this.doc,e,t,r);return o&&this.step(o),this}replaceWith(e,t,r){return this.replace(e,t,new fe(ie.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 Ug(this,e,t,r),this}replaceRangeWith(e,t,r){return Hg(this,e,t,r),this}deleteRange(e,t){return jg(this,e,t),this}lift(e,t){return Ag(this,e,t),this}join(e,t=1){return Bg(this,e,t),this}wrap(e,t){return Ig(this,e,t),this}setBlockType(e,t=e,r,o=null){return Ng(this,e,t,r,o),this}setNodeMarkup(e,t,r=null,o){return Rg(this,e,t,r,o),this}setNodeAttribute(e,t,r){return this.step(new ur(e,t,r)),this}setDocAttribute(e,t){return this.step(new jr(e,t)),this}addNodeMark(e,t){return this.step(new En(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 pr(e,t)),this}split(e,t=1,r){return Lg(this,e,t,r),this}addMark(e,t,r){return kg(this,e,t,r),this}removeMark(e,t,r){return Cg(this,e,t,r),this}clearIncompatible(e,t,r){return wg(this,e,t,r),this}}const qi=Object.create(null);class Ne{constructor(e,t,r){this.$anchor=e,this.$head=t,this.ranges=r||[new Wg(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&&$l(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),$l(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 Pt(e.node(0))}static atStart(e){return nr(e,e,0,0,1)||new Pt(e)}static atEnd(e){return nr(e,e,e.content.size,e.childCount,-1)||new Pt(e)}static fromJSON(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=qi[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 qi)throw new RangeError("Duplicate use of selection JSON ID "+e);return qi[e]=t,t.prototype.jsonID=e,t}getBookmark(){return De.between(this.$anchor,this.$head).getBookmark()}}Ne.prototype.visible=!0;class Wg{constructor(e,t){this.$from=e,this.$to=t}}let Fl=!1;function Vl(n){!Fl&&!n.parent.inlineContent&&(Fl=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+n.parent.type.name+")"))}class De extends Ne{constructor(e,t=e){Vl(e),Vl(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 Ne.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 Mi(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=Ne.findFrom(t,r,!0)||Ne.findFrom(t,-r,!0);if(i)t=i.$head;else return Ne.near(t,r)}return e.parent.inlineContent||(o==0?e=t:(e=(Ne.findFrom(e,-r,!0)||Ne.findFrom(e,r,!0)).$anchor,e.pos<t.pos!=o<0&&(e=t))),new De(e,t)}}Ne.jsonID("text",De);class Mi{constructor(e,t){this.anchor=e,this.head=t}map(e){return new Mi(e.map(this.anchor),e.map(this.head))}resolve(e){return De.between(e.resolve(this.anchor),e.resolve(this.head))}}class xe extends Ne{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?Ne.near(i):new xe(i)}content(){return new fe(ie.from(this.node),0,0)}eq(e){return e instanceof xe&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new wa(this.anchor)}static fromJSON(e,t){if(typeof t.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new xe(e.resolve(t.anchor))}static create(e,t){return new xe(e.resolve(t))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}xe.prototype.visible=!1;Ne.jsonID("node",xe);class wa{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:r}=e.mapResult(this.anchor);return t?new Mi(r,r):new wa(r)}resolve(e){let t=e.resolve(this.anchor),r=t.nodeAfter;return r&&xe.isSelectable(r)?new xe(t):Ne.near(t)}}class Pt extends Ne{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=Ne.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new Pt(e)}map(e){return new Pt(e)}eq(e){return e instanceof Pt}getBookmark(){return Kg}}Ne.jsonID("all",Pt);const Kg={map(){return this},resolve(n){return new Pt(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&&xe.isSelectable(l))return xe.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 $l(n,e,t){let r=n.steps.length-1;if(r<e)return;let o=n.steps[r];if(!(o instanceof Ze||o instanceof Je))return;let i=n.mapping.maps[r],s;i.forEach((l,a,c,u)=>{s==null&&(s=u)}),n.setSelection(Ne.near(n.doc.resolve(s),t))}const zl=1,po=2,Ul=4;class Gg extends xd{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|zl)&~po,this.storedMarks=null,this}get selectionSet(){return(this.updated&zl)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=po,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&po)>0}addStep(e,t){super.addStep(e,t),this.updated=this.updated&~po,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(Ne.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|=Ul,this}get scrolledIntoView(){return(this.updated&Ul)>0}}function Hl(n,e){return!e||!n?n:n.bind(e)}class Mr{constructor(e,t,r){this.name=e,this.init=Hl(t.init,r),this.apply=Hl(t.apply,r)}}const Jg=[new Mr("doc",{init(n){return n.doc||n.schema.topNodeType.createAndFill()},apply(n){return n.doc}}),new Mr("selection",{init(n,e){return n.selection||Ne.atStart(e.doc)},apply(n){return n.selection}}),new Mr("storedMarks",{init(n){return n.storedMarks||null},apply(n,e,t,r){return r.selection.$cursor?n.storedMarks:null}}),new Mr("scrollToSelection",{init(){return 0},apply(n,e){return n.scrolledIntoView?e+1:e}})];class es{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=Jg.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 Mr(r.key,r.spec.state,r))})}}class ar{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 ar(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 Gg(this)}static create(e){let t=new es(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new ar(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 es(this.schema,e.plugins),r=t.fields,o=new ar(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 es(e.schema,e.plugins),i=new ar(o);return o.fields.forEach(s=>{if(s.name=="doc")i.doc=Un.fromJSON(e.schema,t.doc);else if(s.name=="selection")i.selection=Ne.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 Ed(n,e,t){for(let r in n){let o=n[r];o instanceof Function?o=o.bind(e):r=="handleDOMEvents"&&(o=Ed(o,e,{})),t[r]=o}return t}class gt{constructor(e){this.spec=e,this.props={},e.props&&Ed(e.props,this,this.props),this.key=e.key?e.key.key:Sd("plugin")}getState(e){return e[this.key]}}const ts=Object.create(null);function Sd(n){return n in ts?n+"$"+ ++ts[n]:(ts[n]=0,n+"$")}class zt{constructor(e="key"){this.key=Sd(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const st=function(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e},Wr=function(n){let e=n.assignedSlot||n.parentNode;return e&&e.nodeType==11?e.host:e};let jl=null;const on=function(n,e,t){let r=jl||(jl=document.createRange());return r.setEnd(n,t??n.nodeValue.length),r.setStart(n,e||0),r},Jn=function(n,e,t,r){return t&&(Wl(n,e,t,r,-1)||Wl(n,e,t,r,1))},Yg=/^(img|br|input|textarea|hr)$/i;function Wl(n,e,t,r,o){for(;;){if(n==t&&e==r)return!0;if(e==(o<0?0:Jt(n))){let i=n.parentNode;if(!i||i.nodeType!=1||Ta(n)||Yg.test(n.nodeName)||n.contentEditable=="false")return!1;e=st(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?Jt(n):0}else return!1}}function Jt(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function Qg(n,e,t){for(let r=e==0,o=e==Jt(n);r||o;){if(n==t)return!0;let i=st(n);if(n=n.parentNode,!n)return!1;r=r&&i==0,o=o&&i==Jt(n)}}function Ta(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 Ii=function(n){return n.focusNode&&Jn(n.focusNode,n.focusOffset,n.anchorNode,n.anchorOffset)};function Ln(n,e){let t=document.createEvent("Event");return t.initEvent("keydown",!0,!0),t.keyCode=n,t.key=t.code=e,t}function Xg(n){let e=n.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function Zg(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 Xt=typeof navigator<"u"?navigator:null,Kl=typeof document<"u"?document:null,On=Xt&&Xt.userAgent||"",Ps=/Edge\/(\d+)/.exec(On),kd=/MSIE \d/.exec(On),Fs=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(On),pt=!!(kd||Fs||Ps),kn=kd?document.documentMode:Fs?+Fs[1]:Ps?+Ps[1]:0,Vt=!pt&&/gecko\/(\d+)/i.test(On);Vt&&+(/Firefox\/(\d+)/.exec(On)||[0,0])[1];const Vs=!pt&&/Chrome\/(\d+)/.exec(On),tt=!!Vs,_g=Vs?+Vs[1]:0,at=!pt&&!!Xt&&/Apple Computer/.test(Xt.vendor),mr=at&&(/Mobile\/\w+/.test(On)||!!Xt&&Xt.maxTouchPoints>2),Mt=mr||(Xt?/Mac/.test(Xt.platform):!1),qg=Xt?/Win/.test(Xt.platform):!1,Bt=/Android \d/.test(On),oo=!!Kl&&"webkitFontSmoothing"in Kl.documentElement.style,e1=oo?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function t1(n){return{left:0,right:n.documentElement.clientWidth,top:0,bottom:n.documentElement.clientHeight}}function nn(n,e){return typeof n=="number"?n:n[e]}function n1(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 Gl(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=Wr(s)){if(s.nodeType!=1)continue;let l=s,a=l==i.body,c=a?t1(i):n1(l),u=0,d=0;if(e.top<c.top+nn(r,"top")?d=-(c.top-e.top+nn(o,"top")):e.bottom>c.bottom-nn(r,"bottom")&&(d=e.bottom-e.top>c.bottom-c.top?e.top+nn(o,"top")-c.top:e.bottom-c.bottom+nn(o,"bottom")),e.left<c.left+nn(r,"left")?u=-(c.left-e.left+nn(o,"left")):e.right>c.right-nn(r,"right")&&(u=e.right-c.right+nn(o,"right")),u||d)if(a)i.defaultView.scrollBy(u,d);else{let f=l.scrollLeft,m=l.scrollTop;d&&(l.scrollTop+=d),u&&(l.scrollLeft+=u);let h=l.scrollLeft-f,g=l.scrollTop-m;e={left:e.left-h,top:e.top-g,right:e.right-h,bottom:e.bottom-g}}if(a||/^(fixed|sticky)$/.test(getComputedStyle(s).position))break}}function r1(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:Cd(n.dom)}}function Cd(n){let e=[],t=n.ownerDocument;for(let r=n;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),n!=t);r=Wr(r));return e}function o1({refDOM:n,refTop:e,stack:t}){let r=n?n.getBoundingClientRect().top:0;wd(t,r==0?0:r-e)}function wd(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 _n=null;function i1(n){if(n.setActive)return n.setActive();if(_n)return n.focus(_n);let e=Cd(n);n.focus(_n==null?{get preventScroll(){return _n={preventScroll:!0},!0}}:void 0),_n||(_n=!1,wd(e,0))}function Td(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=on(u).getClientRects();else continue;for(let m=0;m<f.length;m++){let h=f[m];if(h.top<=s&&h.bottom>=l){s=Math.max(h.bottom,s),l=Math.min(h.top,l);let g=h.left>e.left?h.left-e.left:h.right<e.left?e.left-h.right:0;if(g<r){t=u,r=g,o=g&&t.nodeType==3?{left:h.right<e.left?h.right:h.left,top:e.top}:e,u.nodeType==1&&g&&(i=d+(e.left>=(h.left+h.right)/2?1:0));continue}}else h.top>e.top&&!a&&h.left<=e.left&&h.right>=e.left&&(a=u,c={left:Math.max(h.left,Math.min(h.right,e.left)),top:h.top});!t&&(e.left>=h.right&&e.top>=h.top||e.left>=h.left&&e.top>=h.bottom)&&(i=d+1)}}return!t&&a&&(t=a,o=c,r=0),t&&t.nodeType==3?s1(t,o):!t||r&&t.nodeType==1?{node:n,offset:i}:Td(t,o)}function s1(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=mn(r,1);if(i.top!=i.bottom&&Aa(e,i))return{node:n,offset:o+(e.left>=(i.left+i.right)/2?1:0)}}return{node:n,offset:0}}function Aa(n,e){return n.left>=e.left-1&&n.left<=e.right+1&&n.top>=e.top-1&&n.top<=e.bottom+1}function a1(n,e){let t=n.parentNode;return t&&/^li$/i.test(t.nodeName)&&e.left<n.getBoundingClientRect().left?t:n}function l1(n,e,t){let{node:r,offset:o}=Td(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 c1(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 Ad(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(Aa(e,c))return Ad(s,e,c)}}if((i=(i+1)%r)==o)break}return n}function u1(n,e){let t=n.dom.ownerDocument,r,o=0,i=Zg(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(!Aa(e,c)||(s=Ad(n.dom,e,c),!s))return null}if(at)for(let c=s;r&&c;c=Wr(c))c.draggable&&(r=void 0);if(s=a1(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;oo&&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=c1(n,r,o,e))}l==null&&(l=l1(n,s,e));let a=n.docView.nearestDesc(s,!0);return{pos:l,inside:a?a.posAtStart-a.border:-1}}function Jl(n){return n.top<n.bottom||n.left<n.right}function mn(n,e){let t=n.getClientRects();if(t.length){let r=t[e<0?0:t.length-1];if(Jl(r))return r}return Array.prototype.find.call(t,Jl)||n.getBoundingClientRect()}const d1=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Od(n,e,t){let{node:r,offset:o,atom:i}=n.docView.domFromPos(e,t<0?-1:1),s=oo||Vt;if(r.nodeType==3)if(s&&(d1.test(r.nodeValue)||(t<0?!o:o==r.nodeValue.length))){let a=mn(on(r,o,o),t);if(Vt&&o&&/\s/.test(r.nodeValue[o-1])&&o<r.nodeValue.length){let c=mn(on(r,o-1,o-1),-1);if(c.top==a.top){let u=mn(on(r,o,o+1),-1);if(u.top!=a.top)return wr(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++,wr(mn(on(r,a,c),u),u<0)}if(!n.state.doc.resolve(e-(i||0)).parent.inlineContent){if(i==null&&o&&(t<0||o==Jt(r))){let a=r.childNodes[o-1];if(a.nodeType==1)return ns(a.getBoundingClientRect(),!1)}if(i==null&&o<Jt(r)){let a=r.childNodes[o];if(a.nodeType==1)return ns(a.getBoundingClientRect(),!0)}return ns(r.getBoundingClientRect(),t>=0)}if(i==null&&o&&(t<0||o==Jt(r))){let a=r.childNodes[o-1],c=a.nodeType==3?on(a,Jt(a)-(s?0:1)):a.nodeType==1&&(a.nodeName!="BR"||!a.nextSibling)?a:null;if(c)return wr(mn(c,1),!1)}if(i==null&&o<Jt(r)){let a=r.childNodes[o];for(;a.pmViewDesc&&a.pmViewDesc.ignoreForCoords;)a=a.nextSibling;let c=a?a.nodeType==3?on(a,0,s?0:1):a.nodeType==1?a:null:null;if(c)return wr(mn(c,-1),!0)}return wr(mn(r.nodeType==3?on(r):r,-t),t>=0)}function wr(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 ns(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 Md(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 f1(n,e,t){let r=e.selection,o=t=="up"?r.$from:r.$to;return Md(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=Od(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=on(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 p1=/[\u0590-\u08ac]/;function h1(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!p1.test(r.parent.textContent)||!l.modify?t=="left"||t=="backward"?i:s:Md(n,e,()=>{let{focusNode:a,focusOffset:c,anchorNode:u,anchorOffset:d}=n.domSelectionRange(),f=l.caretBidiLevel;l.modify("move",t,"character");let m=r.depth?n.docView.domAfterPos(r.before()):n.dom,{focusNode:h,focusOffset:g}=n.domSelectionRange(),v=h&&!m.contains(h.nodeType==1?h:h.parentNode)||a==h&&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),v})}let Yl=null,Ql=null,Xl=!1;function m1(n,e,t){return Yl==e&&Ql==t?Xl:(Yl=e,Ql=t,Xl=t=="up"||t=="down"?f1(n,e,t):h1(n,e,t))}const Nt=0,Zl=1,Pn=2,Zt=3;class io{constructor(e,t,r,o){this.parent=e,this.children=t,this.dom=r,this.contentDOM=o,this.dirty=Nt,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>st(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 Nd){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 Id&&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?st(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?st(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=st(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=st(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,m=0;f<this.children.length;f++){let h=this.children[f],g=m+h.size;if(i>m&&s<g)return h.setSelection(e-m-h.border,t-m-h.border,r,o);m=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||at)&&e==t){let{node:f,offset:m}=l;if(f.nodeType==3){if(u=!!(m&&f.nodeValue[m-1]==`
15
+ `),u&&m==f.nodeValue.length)for(let h=f,g;h;h=h.parentNode){if(g=h.nextSibling){g.nodeName=="BR"&&(l=a={node:g.parentNode,offset:st(g)+1});break}let v=h.pmViewDesc;if(v&&v.node&&v.node.isBlock)break}}else{let h=f.childNodes[m-1];u=h&&(h.nodeName=="BR"||h.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&&at)&&Jn(l.node,l.offset,c.anchorNode,c.anchorOffset)&&Jn(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 m=l;l=a,a=m}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?Pn:Zl,e==l&&t==a&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=Zt:i.markDirty(e-l,t-l);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?Pn:Zt}r=s}this.dirty=Pn}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let r=e==1?Pn:Zl;t.dirty<r&&(t.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}}class Id extends io{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==Nt&&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 g1 extends io{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 Yn extends io{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=Yt.renderSpec(document,t.type.spec.toDOM(t,r))),new Yn(e,t,s.dom,s.contentDOM||s.dom)}parseRule(){return this.dirty&Zt||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=Zt&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),this.dirty!=Nt){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=Nt}}slice(e,t,r){let o=Yn.create(this.parent,this.mark,!0,r),i=this.children,s=this.size;t<s&&(i=Us(i,t,s,r)),e>0&&(i=Us(i,0,e,r));for(let l=0;l<i.length;l++)i[l].parent=o;return o.children=i,o}}class Cn extends io{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}=Yt.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=Ld(u,r,t),c?a=new v1(e,t,r,o,u,d||null,f,c,i,s+1):t.isText?new Ni(e,t,r,o,u,f,i):new Cn(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=()=>ie.empty)}return e}matchesNode(e,t,r){return this.dirty==Nt&&e.eq(this.node)&&zs(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 b1(this,s&&s.node,e);S1(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 m;a.findNodeMatch(c,u,d,f)||l&&e.state.selection.from>o&&e.state.selection.to<o+c.nodeSize&&(m=a.findIndexWithChild(i.node))>-1&&a.updateNodeAt(c,u,d,m,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==Pn)&&(s&&this.protectLocalComposition(e,s),Dd(this.contentDOM,this.children,e),mr&&k1(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=C1(i.focusNode,i.focusOffset);if(!s||!this.dom.contains(s.parentNode))return null;if(this.node.inlineContent){let l=s.nodeValue,a=w1(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 g1(this,i,t,o);e.input.compositionNodes.push(s),this.children=Us(this.children,r,r+o.length,e,s)}update(e,t,r,o){return this.dirty==Zt||!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=Nt}updateOuterDeco(e){if(zs(e,this.outerDeco))return;let t=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=Rd(this.dom,this.nodeDOM,$s(this.outerDeco,this.node,t),$s(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 _l(n,e,t,r,o){Ld(r,e,n);let i=new Cn(void 0,n,e,t,r,r,r,o,0);return i.contentDOM&&i.updateChildren(o,0),i}class Ni extends Cn{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==Zt||this.dirty!=Nt&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(t),(this.dirty!=Nt||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=Nt,!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 Ni(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=Zt)}get domAtom(){return!1}}class Nd extends io{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==Nt&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class v1 extends Cn{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==Zt)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 Dd(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=ql(r),o=!0;r=r.nextSibling}else o=!0,n.insertBefore(l,r);if(s instanceof Yn){let a=r?r.previousSibling:n.lastChild;Dd(s.contentDOM,s.children,t),r=a?a.nextSibling:n.firstChild}}for(;r;)r=ql(r),o=!0;o&&t.trackWrites==n&&(t.trackWrites=null)}const Lr=function(n){n&&(this.nodeName=n)};Lr.prototype=Object.create(null);const Fn=[new Lr];function $s(n,e,t){if(n.length==0)return Fn;let r=t?Fn[0]:new Lr,o=[r];for(let i=0;i<n.length;i++){let s=n[i].type.attrs;if(s){s.nodeName&&o.push(r=new Lr(s.nodeName));for(let l in s){let a=s[l];a!=null&&(t&&o.length==1&&o.push(r=new Lr(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 Rd(n,e,t,r){if(t==Fn&&r==Fn)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=Fn[0]),o=a}y1(o,l||Fn[0],s)}return o}function y1(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 Ld(n,e,t){return Rd(n,n,Fn,$s(e,t,n.nodeType!=1))}function zs(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 ql(n){let e=n.nextSibling;return n.parentNode.removeChild(n),e}class b1{constructor(e,t,r){this.lock=t,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=x1(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=Nt,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=Yn.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==Zt&&s.dom==s.contentDOM&&(s.dirty=Pn),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 Cn){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!=Zt&&zs(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=Pn,d.updateChildren(o,s+1),d.dirty=Nt),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=Cn.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=Cn.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 Id(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 Yn;)t=e,e=t.children[t.children.length-1];(!e||!(e instanceof Ni)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((at||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 Nd(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 x1(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 Yn)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 E1(n,e){return n.type.side-e.type.side}function S1(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 v=o[s++];v.widget&&(u?(d||(d=[u])).push(v):u=v)}if(u)if(d){d.sort(E1);for(let v=0;v<d.length;v++)t(d[v],c,!!a)}else t(u,c,!!a);let f,m;if(a)m=-1,f=a,a=null;else if(c<n.childCount)m=c,f=n.child(c++);else break;for(let v=0;v<l.length;v++)l[v].to<=i&&l.splice(v--,1);for(;s<o.length&&o[s].from<=i&&o[s].to>i;)l.push(o[s++]);let h=i+f.nodeSize;if(f.isText){let v=h;s<o.length&&o[s].from<v&&(v=o[s].from);for(let E=0;E<l.length;E++)l[E].to<v&&(v=l[E].to);v<h&&(a=f.cut(v-i),f=f.cut(0,v-i),h=v,m=-1)}let g=f.isInline&&!f.isLeaf?l.filter(v=>!v.inline):l.slice();r(f,g,e.forChild(i,f),m),i=h}}function k1(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 C1(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=Jt(n)}else if(n.nodeType==1&&e<n.childNodes.length)n=n.childNodes[e],e=0;else return null}}function w1(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 Us(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 Oa(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(Ii(t)){for(a=l;o&&!o.node;)o=o.parent;let u=o.node;if(o&&u.isAtom&&xe.isSelectable(u)&&o.parent&&!(u.isInline&&Qg(t.focusNode,t.focusOffset,o.dom))){let d=o.posBefore;c=new xe(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=Ma(n,a,l,u)}return c}function Bd(n){return n.editable?n.hasFocus():Fd(n)&&document.activeElement&&document.activeElement.contains(n.dom)}function ln(n,e=!1){let t=n.state.selection;if(Pd(n,t),!!Bd(n)){if(!e&&n.input.mouseDown&&n.input.mouseDown.allowDefault&&tt){let r=n.domSelectionRange(),o=n.domObserver.currentSelection;if(r.anchorNode&&o.anchorNode&&Jn(r.anchorNode,r.anchorOffset,o.anchorNode,o.anchorOffset)){n.input.mouseDown.delayedSelectionSync=!0,n.domObserver.setCurSelection();return}}if(n.domObserver.disconnectSelection(),n.cursorWrapper)A1(n);else{let{anchor:r,head:o}=t,i,s;ec&&!(t instanceof De)&&(t.$from.parent.inlineContent||(i=tc(n,t.from)),!t.empty&&!t.$from.parent.inlineContent&&(s=tc(n,t.to))),n.docView.setSelection(r,o,n.root,e),ec&&(i&&nc(i),s&&nc(s)),t.visible?n.dom.classList.remove("ProseMirror-hideselection"):(n.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&T1(n))}n.domObserver.setCurSelection(),n.domObserver.connectSelection()}}const ec=at||tt&&_g<63;function tc(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(at&&o&&o.contentEditable=="false")return rs(o);if((!o||o.contentEditable=="false")&&(!i||i.contentEditable=="false")){if(o)return rs(o);if(i)return rs(i)}}function rs(n){return n.contentEditable="true",at&&n.draggable&&(n.draggable=!1,n.wasDraggable=!0),n}function nc(n){n.contentEditable="false",n.wasDraggable&&(n.draggable=!0,n.wasDraggable=null)}function T1(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(()=>{(!Bd(n)||n.state.selection.visible)&&n.dom.classList.remove("ProseMirror-hideselection")},20))})}function A1(n){let e=n.domSelection(),t=document.createRange(),r=n.cursorWrapper.dom,o=r.nodeName=="IMG";o?t.setEnd(r.parentNode,st(r)+1):t.setEnd(r,0),t.collapse(!1),e.removeAllRanges(),e.addRange(t),!o&&!n.state.selection.visible&&pt&&kn<=11&&(r.disabled=!0,r.disabled=!1)}function Pd(n,e){if(e instanceof xe){let t=n.docView.descAt(e.from);t!=n.lastSelectedViewDesc&&(rc(n),t&&t.selectNode(),n.lastSelectedViewDesc=t)}else rc(n)}function rc(n){n.lastSelectedViewDesc&&(n.lastSelectedViewDesc.parent&&n.lastSelectedViewDesc.deselectNode(),n.lastSelectedViewDesc=void 0)}function Ma(n,e,t,r){return n.someProp("createSelectionBetween",o=>o(n,e,t))||De.between(e,t,r)}function oc(n){return n.editable&&!n.hasFocus()?!1:Fd(n)}function Fd(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 O1(n){let e=n.docView.domFromPos(n.state.selection.anchor,0),t=n.domSelectionRange();return Jn(e.node,e.offset,t.anchorNode,t.anchorOffset)}function Hs(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&&Ne.findFrom(i,e)}function gn(n,e){return n.dispatch(n.state.tr.setSelection(e).scrollIntoView()),!0}function ic(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 gn(n,new De(r.$anchor,s))}else if(r.empty){if(n.endOfTextblock(e>0?"forward":"backward")){let o=Hs(n.state,e);return o&&o instanceof xe?gn(n,o):!1}else if(!(Mt&&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?xe.isSelectable(i)?gn(n,new xe(e<0?n.state.doc.resolve(o.pos-i.nodeSize):o)):oo?gn(n,new De(n.state.doc.resolve(e<0?l:l+i.nodeSize))):!1:!1}}else return!1;else{if(r instanceof xe&&r.node.isInline)return gn(n,new De(e>0?r.$to:r.$from));{let o=Hs(n.state,e);return o?gn(n,o):!1}}}function Bo(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function Br(n,e){let t=n.pmViewDesc;return t&&t.size==0&&(e<0||n.nextSibling||n.nodeName!="BR")}function qn(n,e){return e<0?M1(n):I1(n)}function M1(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<Bo(t)&&Br(t.childNodes[r],-1)&&(s=!0);;)if(r>0){if(t.nodeType!=1)break;{let l=t.childNodes[r-1];if(Br(l,-1))o=t,i=--r;else if(l.nodeType==3)t=l,r=t.nodeValue.length;else break}}else{if(Vd(t))break;{let l=t.previousSibling;for(;l&&Br(l,-1);)o=t.parentNode,i=st(l),l=l.previousSibling;if(l)t=l,r=Bo(t);else{if(t=t.parentNode,t==n.dom)break;r=0}}}s?js(n,t,r):o&&js(n,o,i)}function I1(n){let e=n.domSelectionRange(),t=e.focusNode,r=e.focusOffset;if(!t)return;let o=Bo(t),i,s;for(;;)if(r<o){if(t.nodeType!=1)break;let l=t.childNodes[r];if(Br(l,1))i=t,s=++r;else break}else{if(Vd(t))break;{let l=t.nextSibling;for(;l&&Br(l,1);)i=l.parentNode,s=st(l)+1,l=l.nextSibling;if(l)t=l,r=0,o=Bo(t);else{if(t=t.parentNode,t==n.dom)break;r=o=0}}}i&&js(n,i,s)}function Vd(n){let e=n.pmViewDesc;return e&&e.node&&e.node.isBlock}function N1(n,e){for(;n&&e==n.childNodes.length&&!Ta(n);)e=st(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 D1(n,e){for(;n&&!e&&!Ta(n);)e=st(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 js(n,e,t){if(e.nodeType!=3){let i,s;(s=N1(e,t))?(e=s,t=0):(i=D1(e,t))&&(e=i,t=i.nodeValue.length)}let r=n.domSelection();if(Ii(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&&ln(n)},50)}function sc(n,e){let t=n.state.doc.resolve(e);if(!(tt||qg)&&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 ac(n,e,t){let r=n.state.selection;if(r instanceof De&&!r.empty||t.indexOf("s")>-1||Mt&&t.indexOf("m")>-1)return!1;let{$from:o,$to:i}=r;if(!o.parent.inlineContent||n.endOfTextblock(e<0?"up":"down")){let s=Hs(n.state,e);if(s&&s instanceof xe)return gn(n,s)}if(!o.parent.inlineContent){let s=e<0?o:i,l=r instanceof Pt?Ne.near(s,e):Ne.findFrom(s,e);return l?gn(n,l):!1}return!1}function lc(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 cc(n,e,t){n.domObserver.stop(),e.contentEditable=t,n.domObserver.start()}function R1(n){if(!at||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;cc(n,r,"true"),setTimeout(()=>cc(n,r,"false"),20)}return!1}function L1(n){let e="";return n.ctrlKey&&(e+="c"),n.metaKey&&(e+="m"),n.altKey&&(e+="a"),n.shiftKey&&(e+="s"),e}function B1(n,e){let t=e.keyCode,r=L1(e);if(t==8||Mt&&t==72&&r=="c")return lc(n,-1)||qn(n,-1);if(t==46&&!e.shiftKey||Mt&&t==68&&r=="c")return lc(n,1)||qn(n,1);if(t==13||t==27)return!0;if(t==37||Mt&&t==66&&r=="c"){let o=t==37?sc(n,n.state.selection.from)=="ltr"?-1:1:-1;return ic(n,o,r)||qn(n,o)}else if(t==39||Mt&&t==70&&r=="c"){let o=t==39?sc(n,n.state.selection.from)=="ltr"?1:-1:1;return ic(n,o,r)||qn(n,o)}else{if(t==38||Mt&&t==80&&r=="c")return ac(n,-1,r)||qn(n,-1);if(t==40||Mt&&t==78&&r=="c")return R1(n)||ac(n,1,r)||qn(n,1);if(r==(Mt?"m":"c")&&(t==66||t==73||t==89||t==90))return!0}return!1}function $d(n,e){n.someProp("transformCopied",m=>{e=m(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 m=r.firstChild;t.push(m.type.name,m.attrs!=m.type.defaultAttrs?m.attrs:null),r=m.content}let s=n.someProp("clipboardSerializer")||Yt.fromSchema(n.state.schema),l=Kd(),a=l.createElement("div");a.appendChild(s.serializeFragment(r,{document:l}));let c=a.firstChild,u,d=0;for(;c&&c.nodeType==1&&(u=Wd[c.nodeName.toLowerCase()]);){for(let m=u.length-1;m>=0;m--){let h=l.createElement(u[m]);for(;a.firstChild;)h.appendChild(a.firstChild);a.appendChild(h),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",m=>m(e,n))||e.content.textBetween(0,e.content.size,`
16
+
17
+ `);return{dom:a,text:f}}function zd(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(ie.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:m}=n.state,h=Yt.fromSchema(m);s=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(g=>{let v=s.appendChild(document.createElement("p"));g&&v.appendChild(h.serializeNode(m.text(g,f)))})}}else n.someProp("transformPastedHTML",d=>{t=d(t,n)}),s=V1(t),oo&&$1(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")||fr.fromSchema(n.state.schema)).parseSlice(s,{preserveWhitespace:!!(a||u),context:o,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!P1.test(f.parentNode.nodeName)?{ignore:!0}:null}})),u)l=z1(uc(l,+u[1],+u[2]),u[4]);else if(l=fe.maxOpen(F1(l.content,o),!0),l.openStart||l.openEnd){let d=0,f=0;for(let m=l.content.firstChild;d<l.openStart&&!m.type.spec.isolating;d++,m=m.firstChild);for(let m=l.content.lastChild;f<l.openEnd&&!m.type.spec.isolating;f++,m=m.lastChild);l=uc(l,d,f)}return n.someProp("transformPasted",d=>{l=d(l,n)}),l}const P1=/^(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 F1(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&&Hd(a,i,l,s[s.length-1],0))s[s.length-1]=c;else{s.length&&(s[s.length-1]=jd(s[s.length-1],i.length));let u=Ud(l,a);s.push(u),o=o.matchType(u.type),i=a}}),s)return ie.from(s)}return n}function Ud(n,e,t=0){for(let r=e.length-1;r>=t;r--)n=e[r].create(null,ie.from(n));return n}function Hd(n,e,t,r,o){if(o<n.length&&o<e.length&&n[o]==e[o]){let i=Hd(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(ie.from(Ud(t,n,o+1))))}}function jd(n,e){if(e==0)return n;let t=n.content.replaceChild(n.childCount-1,jd(n.lastChild,e-1)),r=n.contentMatchAt(n.childCount).fillBefore(ie.empty,!0);return n.copy(t.append(r))}function Ws(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=Ws(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(ie.empty,!0))),n.replaceChild(e<0?0:n.childCount-1,s.copy(l))}function uc(n,e,t){return e<n.openStart&&(n=new fe(Ws(n.content,-1,e,n.openStart,0,n.openEnd),e,n.openEnd)),t<n.openEnd&&(n=new fe(Ws(n.content,1,t,n.openEnd,0,0),n.openStart,t)),n}const Wd={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 dc=null;function Kd(){return dc||(dc=document.implementation.createHTMLDocument("title"))}function V1(n){let e=/^(\s*<meta [^>]*>)*/.exec(n);e&&(n=n.slice(e[0].length));let t=Kd().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(n),o;if((o=r&&Wd[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 $1(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 z1(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=ie.from(a.create(r[l+1],o)),i++,s++}return new fe(o,i,s)}const lt={},ct={},U1={touchstart:!0,touchmove:!0};class H1{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 j1(n){for(let e in lt){let t=lt[e];n.dom.addEventListener(e,n.input.eventHandlers[e]=r=>{K1(n,r)&&!Ia(n,r)&&(n.editable||!(r.type in ct))&&t(n,r)},U1[e]?{passive:!0}:void 0)}at&&n.dom.addEventListener("input",()=>null),Ks(n)}function Sn(n,e){n.input.lastSelectionOrigin=e,n.input.lastSelectionTime=Date.now()}function W1(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 Ks(n){n.someProp("handleDOMEvents",e=>{for(let t in e)n.input.eventHandlers[t]||n.dom.addEventListener(t,n.input.eventHandlers[t]=r=>Ia(n,r))})}function Ia(n,e){return n.someProp("handleDOMEvents",t=>{let r=t[e.type];return r?r(n,e)||e.defaultPrevented:!1})}function K1(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 G1(n,e){!Ia(n,e)&&lt[e.type]&&(n.editable||!(e.type in ct))&&lt[e.type](n,e)}ct.keydown=(n,e)=>{let t=e;if(n.input.shiftKey=t.keyCode==16||t.shiftKey,!Jd(n,t)&&(n.input.lastKeyCode=t.keyCode,n.input.lastKeyCodeTime=Date.now(),!(Bt&&tt&&t.keyCode==13)))if(t.keyCode!=229&&n.domObserver.forceFlush(),mr&&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,Ln(13,"Enter"))),n.input.lastIOSEnter=0)},200)}else n.someProp("handleKeyDown",r=>r(n,t))||B1(n,t)?t.preventDefault():Sn(n,"key")};ct.keyup=(n,e)=>{e.keyCode==16&&(n.input.shiftKey=!1)};ct.keypress=(n,e)=>{let t=e;if(Jd(n,t)||!t.charCode||t.ctrlKey&&!t.altKey||Mt&&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 Di(n){return{left:n.clientX,top:n.clientY}}function J1(n,e){let t=e.x-n.clientX,r=e.y-n.clientY;return t*t+r*r<100}function Na(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 dr(n,e,t){n.focused||n.focus();let r=n.state.tr.setSelection(e);t=="pointer"&&r.setMeta("pointer",!0),n.dispatch(r)}function Y1(n,e){if(e==-1)return!1;let t=n.state.doc.resolve(e),r=t.nodeAfter;return r&&r.isAtom&&xe.isSelectable(r)?(dr(n,new xe(t),"pointer"),!0):!1}function Q1(n,e){if(e==-1)return!1;let t=n.state.selection,r,o;t instanceof xe&&(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(xe.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?(dr(n,xe.create(n.state.doc,o),"pointer"),!0):!1}function X1(n,e,t,r,o){return Na(n,"handleClickOn",e,t,r)||n.someProp("handleClick",i=>i(n,e,r))||(o?Q1(n,t):Y1(n,t))}function Z1(n,e,t,r){return Na(n,"handleDoubleClickOn",e,t,r)||n.someProp("handleDoubleClick",o=>o(n,e,r))}function _1(n,e,t,r){return Na(n,"handleTripleClickOn",e,t,r)||n.someProp("handleTripleClick",o=>o(n,e,r))||q1(n,t,r)}function q1(n,e,t){if(t.button!=0)return!1;let r=n.state.doc;if(e==-1)return r.inlineContent?(dr(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)dr(n,De.create(r,l+1,l+1+s.content.size),"pointer");else if(xe.isSelectable(s))dr(n,xe.create(r,l),"pointer");else continue;return!0}}function Da(n){return Po(n)}const Gd=Mt?"metaKey":"ctrlKey";lt.mousedown=(n,e)=>{let t=e;n.input.shiftKey=t.shiftKey;let r=Da(n),o=Date.now(),i="singleClick";o-n.input.lastClick.time<500&&J1(t,n.input.lastClick)&&!t[Gd]&&(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(Di(t));s&&(i=="singleClick"?(n.input.mouseDown&&n.input.mouseDown.done(),n.input.mouseDown=new e0(n,s,t,!!r)):(i=="doubleClick"?Z1:_1)(n,s.pos,s.inside,t)?t.preventDefault():Sn(n,"pointer"))};class e0{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[Gd],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 xe&&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)),Sn(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(()=>ln(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(Di(e))),this.updateAllowDefault(e),this.allowDefault||!t?Sn(this.view,"pointer"):X1(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||at&&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)?(dr(this.view,Ne.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):Sn(this.view,"pointer")}move(e){this.updateAllowDefault(e),Sn(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)}}lt.touchstart=n=>{n.input.lastTouch=Date.now(),Da(n),Sn(n,"pointer")};lt.touchmove=n=>{n.input.lastTouch=Date.now(),Sn(n,"pointer")};lt.contextmenu=n=>Da(n);function Jd(n,e){return n.composing?!0:at&&Math.abs(e.timeStamp-n.input.compositionEndedAt)<500?(n.input.compositionEndedAt=-2e8,!0):!1}const t0=Bt?5e3:-1;ct.compositionstart=ct.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(),Po(n,!0),n.markCursor=null;else if(Po(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}Yd(n,t0)};ct.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++,Yd(n,20))};function Yd(n,e){clearTimeout(n.input.composingTimeout),e>-1&&(n.input.composingTimeout=setTimeout(()=>Po(n),e))}function Qd(n){for(n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=n0());n.input.compositionNodes.length>0;)n.input.compositionNodes.pop().markParentsDirty()}function n0(){let n=document.createEvent("Event");return n.initEvent("event",!0,!0),n.timeStamp}function Po(n,e=!1){if(!(Bt&&n.domObserver.flushingSoon>=0)){if(n.domObserver.forceFlush(),Qd(n),e||n.docView&&n.docView.dirty){let t=Oa(n);return t&&!t.eq(n.state.selection)?n.dispatch(n.state.tr.setSelection(t)):n.updateState(n.state),!0}return!1}}function r0(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 Kr=pt&&kn<15||mr&&e1<604;lt.copy=ct.cut=(n,e)=>{let t=e,r=n.state.selection,o=t.type=="cut";if(r.empty)return;let i=Kr?null:t.clipboardData,s=r.content(),{dom:l,text:a}=$d(n,s);i?(t.preventDefault(),i.clearData(),i.setData("text/html",l.innerHTML),i.setData("text/plain",a)):r0(n,l),o&&n.dispatch(n.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function o0(n){return n.openStart==0&&n.openEnd==0&&n.content.childCount==1?n.content.firstChild:null}function i0(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?Gr(n,r.value,null,o,e):Gr(n,r.textContent,r.innerHTML,o,e)},50)}function Gr(n,e,t,r,o){let i=zd(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=o0(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 Xd(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," "):""}ct.paste=(n,e)=>{let t=e;if(n.composing&&!Bt)return;let r=Kr?null:t.clipboardData,o=n.input.shiftKey&&n.input.lastKeyCode!=45;r&&Gr(n,Xd(r),r.getData("text/html"),o,t)?t.preventDefault():i0(n,t)};class Zd{constructor(e,t,r){this.slice=e,this.move=t,this.node=r}}const _d=Mt?"altKey":"ctrlKey";lt.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(Di(t)),s;if(!(i&&i.pos>=o.from&&i.pos<=(o instanceof xe?o.to-1:o.to))){if(r&&r.mightDrag)s=xe.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=xe.create(n.state.doc,u.posBefore))}}let l=(s||n.state.selection).content(),{dom:a,text:c}=$d(n,l);t.dataTransfer.clearData(),t.dataTransfer.setData(Kr?"Text":"text/html",a.innerHTML),t.dataTransfer.effectAllowed="copyMove",Kr||t.dataTransfer.setData("text/plain",c),n.dragging=new Zd(l,!t[_d],s)};lt.dragend=n=>{let e=n.dragging;window.setTimeout(()=>{n.dragging==e&&(n.dragging=null)},50)};ct.dragover=ct.dragenter=(n,e)=>e.preventDefault();ct.drop=(n,e)=>{let t=e,r=n.dragging;if(n.dragging=null,!t.dataTransfer)return;let o=n.posAtCoords(Di(t));if(!o)return;let i=n.state.doc.resolve(o.pos),s=r&&r.slice;s?n.someProp("transformPasted",h=>{s=h(s,n)}):s=zd(n,Xd(t.dataTransfer),Kr?null:t.dataTransfer.getData("text/html"),!1,i);let l=!!(r&&!t[_d]);if(n.someProp("handleDrop",h=>h(n,t,s||fe.empty,l))){t.preventDefault();return}if(!s)return;t.preventDefault();let a=s?Fg(n.state.doc,i.pos,s):i.pos;a==null&&(a=i.pos);let c=n.state.tr;if(l){let{node:h}=r;h?h.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 m=c.doc.resolve(u);if(d&&xe.isSelectable(s.content.firstChild)&&m.nodeAfter&&m.nodeAfter.sameMarkup(s.content.firstChild))c.setSelection(new xe(m));else{let h=c.mapping.map(a);c.mapping.maps[c.mapping.maps.length-1].forEach((g,v,E,k)=>h=k),c.setSelection(Ma(n,m,c.doc.resolve(h)))}n.focus(),n.dispatch(c.setMeta("uiEvent","drop"))};lt.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())&&ln(n)},20))};lt.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)};lt.beforeinput=(n,e)=>{if(tt&&Bt&&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,Ln(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 ct)lt[n]=ct[n];function Jr(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 Fo{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 It(i-r,i-r,this)}valid(){return!0}eq(e){return this==e||e instanceof Fo&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Jr(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class wn{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 It(i,s,this)}valid(e,t){return t.from<t.to}eq(e){return this==e||e instanceof wn&&Jr(this.attrs,e.attrs)&&Jr(this.spec,e.spec)}static is(e){return e.type instanceof wn}destroy(){}}class Ra{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 It(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 Ra&&Jr(this.attrs,e.attrs)&&Jr(this.spec,e.spec)}destroy(){}}class It{constructor(e,t,r){this.from=e,this.to=t,this.type=r}copy(e,t){return new It(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 It(e,e,new Fo(t,r))}static inline(e,t,r,o){return new It(e,t,new wn(r,o))}static node(e,t,r,o){return new It(e,t,new Ra(r,o))}get spec(){return this.type.spec}get inline(){return this.type instanceof wn}get widget(){return this.type instanceof Fo}}const rr=[],Hn={};class Ke{constructor(e,t){this.local=e.length?e:rr,this.children=t.length?t:rr}static create(e,t){return t.length?Vo(t,e,0,Hn):et}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==et||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?s0(this.children,s||[],e,t,r,o,i):s?new Ke(s.sort(jn),rr):et}add(e,t){return t.length?this==et?Ke.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=ef(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,Vo(u,l,c+1,Hn)),i+=3}});let s=qd(i?tf(t):t,-r);for(let l=0;l<s.length;l++)s[l].type.valid(e,s[l])||s.splice(l--,1);return new Ke(s.length?this.local.concat(s).sort(jn):this.local,o||this.children)}remove(e){return e.length==0||this==et?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!=et?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 Ke(o,r):et}forChild(e,t){if(this==et)return this;if(t.isLeaf)return Ke.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 wn){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 Ke(o.sort(jn),rr);return r?new yn([l,r]):l}return r||et}eq(e){if(this==e)return!0;if(!(e instanceof Ke)||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 La(this.localsInner(e))}localsInner(e){if(this==et)return rr;if(e.inlineContent||!this.local.some(wn.is))return this.local;let t=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof wn||t.push(this.local[r]);return t}}Ke.empty=new Ke([],[]);Ke.removeOverlap=La;const et=Ke.empty;class yn{constructor(e){this.members=e}map(e,t){const r=this.members.map(o=>o.map(e,t,Hn));return yn.from(r)}forChild(e,t){if(t.isLeaf)return Ke.empty;let r=[];for(let o=0;o<this.members.length;o++){let i=this.members[o].forChild(e,t);i!=et&&(i instanceof yn?r=r.concat(i.members):r.push(i))}return yn.from(r)}eq(e){if(!(e instanceof yn)||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?La(r?t:t.sort(jn)):rr}static from(e){switch(e.length){case 0:return et;case 1:return e[0];default:return new yn(e.every(t=>t instanceof Ke)?e:e.reduce((t,r)=>t.concat(r instanceof Ke?r:r.members),[]))}}}function s0(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,m,h,g)=>{let v=g-h-(m-f);for(let E=0;E<l.length;E+=3){let k=l[E+1];if(k<0||f>k+u-d)continue;let w=l[E]+u-d;m>=w?l[E+1]=f<=w?-2:-1:h>=o&&v&&(l[E]+=v,l[E+1]+=v)}d+=v}),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),m=f-o,{index:h,offset:g}=r.content.findIndex(d),v=r.maybeChild(h);if(v&&g==d&&g+v.nodeSize==m){let E=l[c+2].mapInner(t,v,u+1,n[c]+i+1,s);E!=et?(l[c]=d,l[c+1]=m,l[c+2]=E):(l[c+1]=-2,a=!0)}else a=!0}if(a){let c=a0(l,n,e,t,o,i,s),u=Vo(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 m=u.children[d];for(;f<l.length&&l[f]<m;)f+=3;l.splice(f,0,u.children[d],u.children[d+1],u.children[d+2])}}return new Ke(e.sort(jn),l)}function qd(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 It(o.from+e,o.to+e,o.type))}return t}function a0(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 ef(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 tf(n){let e=[];for(let t=0;t<n.length;t++)n[t]!=null&&e.push(n[t]);return e}function Vo(n,e,t,r){let o=[],i=!1;e.forEach((l,a)=>{let c=ef(n,l,a+t);if(c){i=!0;let u=Vo(c,l,t+a+1,r);u!=et&&o.push(a,a+l.nodeSize,u)}});let s=qd(i?tf(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 Ke(s,o):et}function jn(n,e){return n.from-e.from||n.to-e.to}function La(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),fc(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),fc(e,o,r.copy(i.from,r.to)));break}}}return e}function fc(n,e,t){for(;e<n.length&&jn(t,n[e])>0;)e++;n.splice(e,0,t)}function is(n){let e=[];return n.someProp("decorations",t=>{let r=t(n.state);r&&r!=et&&e.push(r)}),n.cursorWrapper&&e.push(Ke.create(n.state.doc,[n.cursorWrapper.deco])),yn.from(e)}const l0={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},c0=pt&&kn<=11;class u0{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 d0{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new u0,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&&kn<=11&&r.some(o=>o.type=="childList"&&o.removedNodes.length||o.type=="characterData"&&o.oldValue.length>o.target.nodeValue.length)?this.flushSoon():this.flush()}),c0&&(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,l0)),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(oc(this.view)){if(this.suppressingSelectionUpdates)return ln(this.view);if(pt&&kn<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&Jn(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=Wr(i))t.add(i);for(let i=e.anchorNode;i;i=Wr(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)&&oc(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&&Ii(r)&&(c=Oa(e))&&c.eq(Ne.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,ln(e),this.currentSelection.set(r),e.scrollToSelection()):(i>-1||o)&&(i>-1&&(e.docView.markDirty(i,s),f0(e)),this.handleDOMChange(i,s,l,a),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||ln(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&&kn<=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?st(o)+1:0,l=r.localPosFromDOM(e.target,s,-1),a=i&&i.parentNode==e.target?st(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 pc=new WeakMap,hc=!1;function f0(n){if(!pc.has(n)&&(pc.set(n,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(n.dom).whiteSpace)!==-1)){if(n.requiresGeckoHackNode=Vt,hc)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."),hc=!0}}function p0(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 Jn(l.node,l.offset,i,s)&&([r,o,i,s]=[i,s,r,o]),{anchorNode:r,anchorOffset:o,focusNode:i,focusOffset:s}}function h0(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}],Ii(a)||c.push({node:a.focusNode,offset:a.focusOffset})),tt&&n.input.lastKeyCode===8)for(let v=i;v>o;v--){let E=r.childNodes[v-1],k=E.pmViewDesc;if(E.nodeName=="BR"&&!k){i=v;break}if(!k||k.size)break}let d=n.state.doc,f=n.someProp("domParser")||fr.fromSchema(n.state.schema),m=d.resolve(s),h=null,g=f.parse(r,{topNode:m.parent,topMatch:m.parent.contentMatchAt(m.index()),topOpen:!0,from:o,to:i,preserveWhitespace:m.parent.type.whitespace=="pre"?"full":!0,findPositions:c,ruleFromNode:m0,context:m});if(c&&c[0].pos!=null){let v=c[0].pos,E=c[1]&&c[1].pos;E==null&&(E=v),h={anchor:v+s,head:E+s}}return{doc:g,sel:h,from:s,to:l}}function m0(n){let e=n.pmViewDesc;if(e)return e.parseRule();if(n.nodeName=="BR"&&n.parentNode){if(at&&/^(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||at&&/^(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 g0=/^(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 v0(n,e,t,r,o){let i=n.input.compositionPendingChanges||(n.composing?n.input.compositionID:0);if(n.input.compositionPendingChanges=0,e<0){let F=n.input.lastSelectionTime>Date.now()-50?n.input.lastSelectionOrigin:null,T=Oa(n,F);if(T&&!n.state.selection.eq(T)){if(tt&&Bt&&n.input.lastKeyCode===13&&Date.now()-100<n.input.lastKeyCodeTime&&n.someProp("handleKeyDown",L=>L(n,Ln(13,"Enter"))))return;let P=n.state.tr.setSelection(T);F=="pointer"?P.setMeta("pointer",!0):F=="key"&&P.scrollIntoView(),i&&P.setMeta("composition",i),n.dispatch(P)}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=h0(n,e,t),u=n.state.doc,d=u.slice(c.from,c.to),f,m;n.input.lastKeyCode===8&&Date.now()-100<n.input.lastKeyCodeTime?(f=n.state.selection.to,m="end"):(f=n.state.selection.from,m="start"),n.input.lastKeyCode=null;let h=x0(d.content,c.doc.content,c.from,f,m);if((mr&&n.input.lastIOSEnter>Date.now()-225||Bt)&&o.some(F=>F.nodeType==1&&!g0.test(F.nodeName))&&(!h||h.endA>=h.endB)&&n.someProp("handleKeyDown",F=>F(n,Ln(13,"Enter")))){n.input.lastIOSEnter=0;return}if(!h)if(r&&a instanceof De&&!a.empty&&a.$head.sameParent(a.$anchor)&&!n.composing&&!(c.sel&&c.sel.anchor!=c.sel.head))h={start:a.from,endA:a.to,endB:a.to};else{if(c.sel){let F=mc(n,n.state.doc,c.sel);if(F&&!F.eq(n.state.selection)){let T=n.state.tr.setSelection(F);i&&T.setMeta("composition",i),n.dispatch(T)}}return}if(tt&&n.cursorWrapper&&c.sel&&c.sel.anchor==n.cursorWrapper.deco.from&&c.sel.head==c.sel.anchor){let F=h.endB-h.start;c.sel={anchor:c.sel.anchor+F,head:c.sel.anchor+F}}n.input.domChangeCount++,n.state.selection.from<n.state.selection.to&&h.start==h.endB&&n.state.selection instanceof De&&(h.start>n.state.selection.from&&h.start<=n.state.selection.from+2&&n.state.selection.from>=c.from?h.start=n.state.selection.from:h.endA<n.state.selection.to&&h.endA>=n.state.selection.to-2&&n.state.selection.to<=c.to&&(h.endB+=n.state.selection.to-h.endA,h.endA=n.state.selection.to)),pt&&kn<=11&&h.endB==h.start+1&&h.endA==h.start&&h.start>c.from&&c.doc.textBetween(h.start-c.from-1,h.start-c.from+1)=="  "&&(h.start--,h.endA--,h.endB--);let g=c.doc.resolveNoCache(h.start-c.from),v=c.doc.resolveNoCache(h.endB-c.from),E=u.resolve(h.start),k=g.sameParent(v)&&g.parent.inlineContent&&E.end()>=h.endA,w;if((mr&&n.input.lastIOSEnter>Date.now()-225&&(!k||o.some(F=>F.nodeName=="DIV"||F.nodeName=="P"))||!k&&g.pos<c.doc.content.size&&!g.sameParent(v)&&(w=Ne.findFrom(c.doc.resolve(g.pos+1),1,!0))&&w.head==v.pos)&&n.someProp("handleKeyDown",F=>F(n,Ln(13,"Enter")))){n.input.lastIOSEnter=0;return}if(n.state.selection.anchor>h.start&&b0(u,h.start,h.endA,g,v)&&n.someProp("handleKeyDown",F=>F(n,Ln(8,"Backspace")))){Bt&&tt&&n.domObserver.suppressSelectionUpdates();return}tt&&Bt&&h.endB==h.start&&(n.input.lastAndroidDelete=Date.now()),Bt&&!k&&g.start()!=v.start()&&v.parentOffset==0&&g.depth==v.depth&&c.sel&&c.sel.anchor==c.sel.head&&c.sel.head==h.endA&&(h.endB-=2,v=c.doc.resolveNoCache(h.endB-c.from),setTimeout(()=>{n.someProp("handleKeyDown",function(F){return F(n,Ln(13,"Enter"))})},20));let y=h.start,R=h.endA,S,B,$;if(k){if(g.pos==v.pos)pt&&kn<=11&&g.parentOffset==0&&(n.domObserver.suppressSelectionUpdates(),setTimeout(()=>ln(n),20)),S=n.state.tr.delete(y,R),B=u.resolve(h.start).marksAcross(u.resolve(h.endA));else if(h.endA==h.endB&&($=y0(g.parent.content.cut(g.parentOffset,v.parentOffset),E.parent.content.cut(E.parentOffset,h.endA-E.start()))))S=n.state.tr,$.type=="add"?S.addMark(y,R,$.mark):S.removeMark(y,R,$.mark);else if(g.parent.child(g.index()).isText&&g.index()==v.index()-(v.textOffset?0:1)){let F=g.parent.textBetween(g.parentOffset,v.parentOffset);if(n.someProp("handleTextInput",T=>T(n,y,R,F)))return;S=n.state.tr.insertText(F,y,R)}}if(S||(S=n.state.tr.replace(y,R,c.doc.slice(h.start-c.from,h.endB-c.from))),c.sel){let F=mc(n,S.doc,c.sel);F&&!(tt&&Bt&&n.composing&&F.empty&&(h.start!=h.endB||n.input.lastAndroidDelete<Date.now()-100)&&(F.head==y||F.head==S.mapping.map(R)-1)||pt&&F.empty&&F.head==y)&&S.setSelection(F)}B&&S.ensureMarks(B),i&&S.setMeta("composition",i),n.dispatch(S.scrollIntoView())}function mc(n,e,t){return Math.max(t.anchor,t.head)>e.content.size?null:Ma(n,e.resolve(t.anchor),e.resolve(t.head))}function y0(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(ie.from(c).eq(n))return{mark:l,type:s}}function b0(n,e,t,r,o){if(!r.parent.isTextblock||t-e<=o.pos-r.pos||ss(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(ss(i,!0,!0));return!s.parent.isTextblock||s.pos>t||ss(s,!0,!1)<t?!1:r.parent.content.cut(r.parentOffset).eq(s.parent.content)}function ss(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 x0(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&&gc(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&&gc(n.textBetween(i-1,i+1))&&(i+=a?1:-1),s=i+(s-l),l=i}return{start:i,endA:s,endB:l}}function gc(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 E0{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 H1,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(Ec),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=bc(this),yc(this),this.nodeViews=xc(this),this.docView=_l(this.state.doc,vc(this),is(this),this.dom,this),this.domObserver=new d0(this,(r,o,i,s)=>v0(this,r,o,i,s)),this.domObserver.start(),j1(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&&Ks(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(Ec),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&&(Qd(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 m=xc(this);k0(m,this.nodeViews)&&(this.nodeViews=m,i=!0)}(l||t.handleDOMEvents!=this._props.handleDOMEvents)&&Ks(this),this.editable=bc(this),yc(this);let a=is(this),c=vc(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&&r1(this);if(s){this.domObserver.stop();let m=d&&(pt||tt)&&!this.composing&&!o.selection.empty&&!e.selection.empty&&S0(o.selection,e.selection);if(d){let h=tt?this.trackWrites=this.domSelectionRange().focusNode:null;(i||!this.docView.update(e.doc,c,a,this))&&(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=_l(e.doc,c,a,this.dom,this)),h&&!this.trackWrites&&(m=!0)}m||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&O1(this))?ln(this,m):(Pd(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&&o1(f)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!this.someProp("handleScrollToSelection",t=>t(this)))if(this.state.selection instanceof xe){let t=this.docView.domAfterPos(this.state.selection.from);t.nodeType==1&&Gl(this,t.getBoundingClientRect(),e)}else Gl(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 Zd(e.slice,e.move,o<0?void 0:xe.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&&i1(this.dom),ln(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 u1(this,e)}coordsAtPos(e,t=1){return Od(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 m1(this,t||this.state,e)}pasteHTML(e,t){return Gr(this,"",e,!1,t||new ClipboardEvent("paste"))}pasteText(e,t){return Gr(this,e,null,!0,t||new ClipboardEvent("paste"))}destroy(){this.docView&&(W1(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],is(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 G1(this,e)}dispatch(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))}domSelectionRange(){return at&&this.root.nodeType===11&&Xg(this.dom.ownerDocument)==this.dom?p0(this):this.domSelection()}domSelection(){return this.root.getSelection()}}function vc(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"),[It.node(0,n.state.doc.content.size,e)]}function yc(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:It.widget(n.state.selection.head,e,{raw:!0,marks:n.markCursor})}}else n.cursorWrapper=null}function bc(n){return!n.someProp("editable",e=>e(n.state)===!1)}function S0(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 xc(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 k0(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 Ec(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")}var Tn={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:"'"},$o={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},C0=typeof navigator<"u"&&/Mac/.test(navigator.platform),w0=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var _e=0;_e<10;_e++)Tn[48+_e]=Tn[96+_e]=String(_e);for(var _e=1;_e<=24;_e++)Tn[_e+111]="F"+_e;for(var _e=65;_e<=90;_e++)Tn[_e]=String.fromCharCode(_e+32),$o[_e]=String.fromCharCode(_e);for(var as in Tn)$o.hasOwnProperty(as)||($o[as]=Tn[as]);function T0(n){var e=C0&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||w0&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?$o:Tn)[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 A0=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function O0(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))A0?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 M0(n){let e=Object.create(null);for(let t in n)e[O0(t)]=n[t];return e}function ls(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 I0(n){return new gt({props:{handleKeyDown:N0(n)}})}function N0(n){let e=M0(n);return function(t,r){let o=T0(r),i,s=e[ls(o,r)];if(s&&s(t.state,t.dispatch,t))return!0;if(o.length==1&&o!=" "){if(r.shiftKey){let l=e[ls(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=Tn[r.keyCode])&&i!=o){let l=e[ls(i,r)];if(l&&l(t.state,t.dispatch,t))return!0}}return!1}}const D0=(n,e)=>n.selection.empty?!1:(e&&e(n.tr.deleteSelection().scrollIntoView()),!0);function R0(n,e){let{$cursor:t}=n.selection;return!t||(e?!e.endOfTextblock("backward",n):t.parentOffset>0)?null:t}const L0=(n,e,t)=>{let r=R0(n,t);if(!r)return!1;let o=nf(r);if(!o){let s=r.blockRange(),l=s&&Sr(s);return l==null?!1:(e&&e(n.tr.lift(s,l).scrollIntoView()),!0)}let i=o.nodeBefore;if(!i.type.spec.isolating&&sf(n,o,e))return!0;if(r.parent.content.size==0&&(gr(i,"end")||xe.isSelectable(i))){let s=Ca(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(gr(i,"end")?Ne.findFrom(l.doc.resolve(l.mapping.map(o.pos,-1)),-1):xe.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 gr(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 B0=(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=nf(r)}let s=i&&i.nodeBefore;return!s||!xe.isSelectable(s)?!1:(e&&e(n.tr.setSelection(xe.create(n.doc,i.pos-s.nodeSize)).scrollIntoView()),!0)};function nf(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 P0(n,e){let{$cursor:t}=n.selection;return!t||(e?!e.endOfTextblock("forward",n):t.parentOffset<t.parent.content.size)?null:t}const F0=(n,e,t)=>{let r=P0(n,t);if(!r)return!1;let o=rf(r);if(!o)return!1;let i=o.nodeAfter;if(sf(n,o,e))return!0;if(r.parent.content.size==0&&(gr(i,"start")||xe.isSelectable(i))){let s=Ca(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(gr(i,"start")?Ne.findFrom(l.doc.resolve(l.mapping.map(o.pos)),1):xe.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},V0=(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=rf(r)}let s=i&&i.nodeAfter;return!s||!xe.isSelectable(s)?!1:(e&&e(n.tr.setSelection(xe.create(n.doc,i.pos)).scrollIntoView()),!0)};function rf(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 $0=(n,e)=>{let t=n.selection,r=t instanceof xe,o;if(r){if(t.node.isTextblock||!An(n.doc,t.from))return!1;o=t.from}else if(o=Oi(n.doc,t.from,-1),o==null)return!1;if(e){let i=n.tr.join(o);r&&i.setSelection(xe.create(i.doc,o-n.doc.resolve(o).nodeBefore.nodeSize)),e(i.scrollIntoView())}return!0},z0=(n,e)=>{let t=n.selection,r;if(t instanceof xe){if(t.node.isTextblock||!An(n.doc,t.to))return!1;r=t.to}else if(r=Oi(n.doc,t.to,1),r==null)return!1;return e&&e(n.tr.join(r).scrollIntoView()),!0},U0=(n,e)=>{let{$from:t,$to:r}=n.selection,o=t.blockRange(r),i=o&&Sr(o);return i==null?!1:(e&&e(n.tr.lift(o,i).scrollIntoView()),!0)},H0=(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 of(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 j0=(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=of(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(Ne.near(a.doc.resolve(l),1)),e(a.scrollIntoView())}return!0},W0=(n,e)=>{let t=n.selection,{$from:r,$to:o}=t;if(t instanceof Pt||r.parent.inlineContent||o.parent.inlineContent)return!1;let i=of(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},K0=(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(cr(n.doc,i))return e&&e(n.tr.split(i).scrollIntoView()),!0}let r=t.blockRange(),o=r&&Sr(r);return o==null?!1:(e&&e(n.tr.lift(r,o).scrollIntoView()),!0)},G0=(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(xe.create(n.doc,o))),!0)};function J0(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||An(n.doc,e.pos))?!1:(t&&t(n.tr.clearIncompatible(e.pos,r.type,r.contentMatchAt(r.childCount)).join(e.pos).scrollIntoView()),!0)}function sf(n,e,t){let r=e.nodeBefore,o=e.nodeAfter,i,s;if(r.type.spec.isolating||o.type.spec.isolating)return!1;if(J0(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=ie.empty;for(let g=i.length-1;g>=0;g--)f=ie.from(i[g].create(null,f));f=ie.from(r.copy(f));let m=n.tr.step(new Je(e.pos-1,d,e.pos,d,new fe(f,1,0),i.length,!0)),h=d+2*i.length;An(m.doc,h)&&m.join(h),t(m.scrollIntoView())}return!0}let a=Ne.findFrom(e,1),c=a&&a.$from.blockRange(a.$to),u=c&&Sr(c);if(u!=null&&u>=e.depth)return t&&t(n.tr.lift(c,u).scrollIntoView()),!0;if(l&&gr(o,"start",!0)&&gr(r,"end")){let d=r,f=[];for(;f.push(d),!d.isTextblock;)d=d.lastChild;let m=o,h=1;for(;!m.isTextblock;m=m.firstChild)h++;if(d.canReplace(d.childCount,d.childCount,m.content)){if(t){let g=ie.empty;for(let E=f.length-1;E>=0;E--)g=ie.from(f[E].copy(g));let v=n.tr.step(new Je(e.pos-f.length,e.pos+o.nodeSize,e.pos+h,e.pos+o.nodeSize-h,new fe(g,f.length,0),0,!0));t(v.scrollIntoView())}return!0}}return!1}function af(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 Y0=af(-1),Q0=af(1);function X0(n,e=null){return function(t,r){let{$from:o,$to:i}=t.selection,s=o.blockRange(i),l=s&&ka(s,n,e);return l?(r&&r(t.tr.wrap(s,l).scrollIntoView()),!0):!1}}function Sc(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 Z0(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 No(u,u,s.depth),s.endIndex<s.parent.childCount&&(s=new No(o,t.doc.resolve(i.end(s.depth)),s.depth)),l=!0}let c=ka(a,n,e,s);return c?(r&&r(_0(t.tr,s,c,l,n).scrollIntoView()),!0):!1}}function _0(n,e,t,r,o){let i=ie.empty;for(let u=t.length-1;u>=0;u--)i=ie.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&&cr(n.doc,a,l)&&(n.split(a,l),a+=2*l),a+=c.child(u).nodeSize;return n}function q0(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?ev(e,t,n,i):tv(e,t,i):!0:!1}}function ev(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(ie.from(t.create(null,r.parent.copy())),1,0),1,!0)),r=new No(o.doc.resolve(r.$from.pos),o.doc.resolve(s),r.depth));const l=Sr(r);if(l==null)return!1;o.lift(r,l);let a=o.mapping.map(i,-1)-1;return An(o.doc,a)&&o.join(a),e(o.scrollIntoView()),!0}function tv(n,e,t){let r=n.tr,o=t.parent;for(let m=t.end,h=t.endIndex-1,g=t.startIndex;h>g;h--)m-=o.child(h).nodeSize,r.delete(m-1,m+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?ie.empty:ie.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?ie.empty:ie.from(o.copy(ie.empty))).append(a?ie.empty:ie.from(o.copy(ie.empty))),l?0:1,a?0:1),l?0:1)),e(r.scrollIntoView()),!0}function nv(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=ie.from(c?n.create():null),d=new fe(ie.from(n.create(null,ie.from(l.type.create(null,u)))),c?3:1,0),f=i.start,m=i.end;t(e.tr.step(new Je(f-(c?3:1),m,f,m,d,1,!0)).scrollIntoView())}return!0}}function Ri(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 Li{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,m])=>[f,(...g)=>{const v=this.buildProps(c,t),E=m(...g)(v);return l.push(E),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:Ri({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 rv{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 he(n,e,t){return n.config[e]===void 0&&n.parent?he(n.parent,e,t):typeof n.config[e]=="function"?n.config[e].bind({...t,parent:n.parent?he(n.parent,e,t):null}):n.config[e]}function Bi(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 lf(n){const e=[],{nodeExtensions:t,markExtensions:r}=Bi(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=he(s,"addGlobalAttributes",l);if(!a)return;a().forEach(u=>{u.types.forEach(d=>{Object.entries(u.attributes).forEach(([f,m])=>{e.push({type:d,name:f,attribute:{...i,...m}})})})})}),o.forEach(s=>{const l={name:s.name,options:s.options,storage:s.storage},a=he(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 ut(...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 Gs(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)=>ut(t,r),{})}function cf(n){return typeof n=="function"}function Ie(n,e=void 0,...t){return cf(n)?e?n.bind(e)(...t):n(...t):n}function ov(n={}){return Object.keys(n).length===0&&n.constructor===Object}function iv(n){return typeof n!="string"?n:n.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(n):n==="true"?!0:n==="false"?!1:n}function kc(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):iv(t.getAttribute(s.name));return l==null?i:{...i,[s.name]:l}},{});return{...r,...o}}}}function Cc(n){return Object.fromEntries(Object.entries(n).filter(([e,t])=>e==="attrs"&&ov(t)?!1:t!=null))}function sv(n,e){var t;const r=lf(n),{nodeExtensions:o,markExtensions:i}=Bi(n),s=(t=o.find(c=>he(c,"topNode")))===null||t===void 0?void 0:t.name,l=Object.fromEntries(o.map(c=>{const u=r.filter(E=>E.type===c.name),d={name:c.name,options:c.options,storage:c.storage,editor:e},f=n.reduce((E,k)=>{const w=he(k,"extendNodeSchema",d);return{...E,...w?w(c):{}}},{}),m=Cc({...f,content:Ie(he(c,"content",d)),marks:Ie(he(c,"marks",d)),group:Ie(he(c,"group",d)),inline:Ie(he(c,"inline",d)),atom:Ie(he(c,"atom",d)),selectable:Ie(he(c,"selectable",d)),draggable:Ie(he(c,"draggable",d)),code:Ie(he(c,"code",d)),defining:Ie(he(c,"defining",d)),isolating:Ie(he(c,"isolating",d)),attrs:Object.fromEntries(u.map(E=>{var k;return[E.name,{default:(k=E==null?void 0:E.attribute)===null||k===void 0?void 0:k.default}]}))}),h=Ie(he(c,"parseHTML",d));h&&(m.parseDOM=h.map(E=>kc(E,u)));const g=he(c,"renderHTML",d);g&&(m.toDOM=E=>g({node:E,HTMLAttributes:Gs(E,u)}));const v=he(c,"renderText",d);return v&&(m.toText=v),[c.name,m]})),a=Object.fromEntries(i.map(c=>{const u=r.filter(v=>v.type===c.name),d={name:c.name,options:c.options,storage:c.storage,editor:e},f=n.reduce((v,E)=>{const k=he(E,"extendMarkSchema",d);return{...v,...k?k(c):{}}},{}),m=Cc({...f,inclusive:Ie(he(c,"inclusive",d)),excludes:Ie(he(c,"excludes",d)),group:Ie(he(c,"group",d)),spanning:Ie(he(c,"spanning",d)),code:Ie(he(c,"code",d)),attrs:Object.fromEntries(u.map(v=>{var E;return[v.name,{default:(E=v==null?void 0:v.attribute)===null||E===void 0?void 0:E.default}]}))}),h=Ie(he(c,"parseHTML",d));h&&(m.parseDOM=h.map(v=>kc(v,u)));const g=he(c,"renderHTML",d);return g&&(m.toDOM=v=>g({mark:v,HTMLAttributes:Gs(v,u)})),[c.name,m]}));return new hg({topNode:s,nodes:l,marks:a})}function cs(n,e){return e.nodes[n]||e.marks[n]||null}function wc(n,e){return Array.isArray(e)?e.some(t=>(typeof t=="string"?t:t.name)===n.name):e}const av=(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 Ba(n){return Object.prototype.toString.call(n)==="[object RegExp]"}class uf{constructor(e){this.find=e.find,this.handler=e.handler}}const lv=(n,e)=>{if(Ba(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=av(c)+i;return s.forEach(f=>{if(u)return;const m=lv(d,f.find);if(!m)return;const h=a.state.tr,g=Ri({state:a.state,transaction:h}),v={from:r-(m[0].length-i.length),to:o},{commands:E,chain:k,can:w}=new Li({editor:t,state:g});f.handler({state:g,range:v,match:m,commands:E,chain:k,can:w})===null||!h.steps.length||(h.setMeta(l,{transform:h,from:r,to:o,text:i}),a.dispatch(h),u=!0)}),u}function cv(n){const{editor:e,rules:t}=n,r=new gt({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 uv(n){return typeof n=="number"}class dv{constructor(e){this.find=e.find,this.handler=e.handler}}const fv=(n,e)=>{if(Ba(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 pv(n){const{editor:e,state:t,from:r,to:o,rule:i,pasteEvent:s,dropEvent:l}=n,{commands:a,chain:c,can:u}=new Li({editor:e,state:t}),d=[];return t.doc.nodesBetween(r,o,(m,h)=>{if(!m.isTextblock||m.type.spec.code)return;const g=Math.max(r,h),v=Math.min(o,h+m.content.size),E=m.textBetween(g-h,v-h,void 0,"");fv(E,i.find).forEach(w=>{if(w.index===void 0)return;const y=g+w.index+1,R=y+w[0].length,S={from:t.tr.mapping.map(y),to:t.tr.mapping.map(R)},B=i.handler({state:t,range:S,match:w,commands:a,chain:c,can:u,pasteEvent:s,dropEvent:l});d.push(B)})}),d.every(m=>m!==null)}function hv(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 gt({view(u){const d=f=>{var m;r=!((m=u.dom.parentElement)===null||m===void 0)&&m.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 m=(f=d.clipboardData)===null||f===void 0?void 0:f.getData("text/html");return s=d,o=!!(m!=null&&m.includes("data-pm-slice")),!1}}},appendTransaction:(u,d,f)=>{const m=u[0],h=m.getMeta("uiEvent")==="paste"&&!o,g=m.getMeta("uiEvent")==="drop"&&!i;if(!h&&!g)return;const v=d.doc.content.findDiffStart(f.doc.content),E=d.doc.content.findDiffEnd(f.doc.content);if(!uv(v)||!E||v===E.b)return;const k=f.tr,w=Ri({state:f,transaction:k});if(!(!pv({editor:e,state:w,from:Math.max(v-1,0),to:E.b-1,rule:c,pasteEvent:s,dropEvent:l})||!k.steps.length))return l=new DragEvent("drop"),s=new ClipboardEvent("paste"),k}}))}function mv(n){const e=n.filter((t,r)=>n.indexOf(t)!==r);return[...new Set(e)]}class lr{constructor(e,t){this.splittableMarks=[],this.editor=t,this.extensions=lr.resolve(e),this.schema=sv(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:cs(r.name,this.schema)};r.type==="mark"&&(!((o=Ie(he(r,"keepOnSplit",i)))!==null&&o!==void 0)||o)&&this.splittableMarks.push(r.name);const s=he(r,"onBeforeCreate",i);s&&this.editor.on("beforeCreate",s);const l=he(r,"onCreate",i);l&&this.editor.on("create",l);const a=he(r,"onUpdate",i);a&&this.editor.on("update",a);const c=he(r,"onSelectionUpdate",i);c&&this.editor.on("selectionUpdate",c);const u=he(r,"onTransaction",i);u&&this.editor.on("transaction",u);const d=he(r,"onFocus",i);d&&this.editor.on("focus",d);const f=he(r,"onBlur",i);f&&this.editor.on("blur",f);const m=he(r,"onDestroy",i);m&&this.editor.on("destroy",m)})}static resolve(e){const t=lr.sort(lr.flatten(e)),r=mv(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=he(t,"addExtensions",r);return o?[t,...this.flatten(o())]:t}).flat(10)}static sort(e){return e.sort((r,o)=>{const i=he(r,"priority")||100,s=he(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:cs(t.name,this.schema)},o=he(t,"addCommands",r);return o?{...e,...o()}:e},{})}get plugins(){const{editor:e}=this,t=lr.sort([...this.extensions].reverse()),r=[],o=[],i=t.map(s=>{const l={name:s.name,options:s.options,storage:s.storage,editor:e,type:cs(s.name,this.schema)},a=[],c=he(s,"addKeyboardShortcuts",l);let u={};if(s.type==="mark"&&s.config.exitable&&(u.ArrowRight=()=>_t.handleExit({editor:e,mark:s})),c){const g=Object.fromEntries(Object.entries(c()).map(([v,E])=>[v,()=>E({editor:e})]));u={...u,...g}}const d=I0(u);a.push(d);const f=he(s,"addInputRules",l);wc(s,e.options.enableInputRules)&&f&&r.push(...f());const m=he(s,"addPasteRules",l);wc(s,e.options.enablePasteRules)&&m&&o.push(...m());const h=he(s,"addProseMirrorPlugins",l);if(h){const g=h();a.push(...g)}return a}).flat();return[cv({editor:e,rules:r}),...hv({editor:e,rules:o}),...i]}get attributes(){return lf(this.extensions)}get nodeViews(){const{editor:e}=this,{nodeExtensions:t}=Bi(this.extensions);return Object.fromEntries(t.filter(r=>!!he(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=he(r,"addNodeView",i);if(!s)return[];const l=(a,c,u,d)=>{const f=Gs(a,o);return s()({editor:e,node:a,getPos:u,decorations:d,HTMLAttributes:f,extension:r})};return[r.name,l]}))}}function gv(n){return Object.prototype.toString.call(n).slice(8,-1)}function ds(n){return gv(n)!=="Object"?!1:n.constructor===Object&&Object.getPrototypeOf(n)===Object.prototype}function Pi(n,e){const t={...n};return ds(n)&&ds(e)&&Object.keys(e).forEach(r=>{ds(e[r])?r in n?t[r]=Pi(n[r],e[r]):Object.assign(t,{[r]:e[r]}):Object.assign(t,{[r]:e[r]})}),t}class Dt{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(he(this,"addOptions",{name:this.name}))),this.storage=Ie(he(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new Dt(e)}configure(e={}){const t=this.extend();return t.options=Pi(this.options,e),t.storage=Ie(he(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){const t=new Dt(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(he(t,"addOptions",{name:t.name})),t.storage=Ie(he(t,"addStorage",{name:t.name,options:t.options})),t}}function df(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 m;const h=s==null?void 0:s[c.type.name];h?(c.isBlock&&!a&&(l+=i,a=!0),d&&(l+=h({node:c,pos:u,parent:d,index:f,range:e}))):c.isText?(l+=(m=c==null?void 0:c.text)===null||m===void 0?void 0:m.slice(Math.max(r,u)-u,o-u),a=!1):c.isBlock&&!a&&(l+=i,a=!0)}),l}function ff(n){return Object.fromEntries(Object.entries(n.nodes).filter(([,e])=>e.spec.toText).map(([e,t])=>[e,t.spec.toText]))}const vv=Dt.create({name:"clipboardTextSerializer",addProseMirrorPlugins(){return[new gt({key:new zt("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=ff(t);return df(r,{from:s,to:l},{textSerializers:a})}}})]}}),yv=()=>({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),bv=(n=!1)=>({commands:e})=>e.setContent("",n),xv=()=>({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)),m=d.blockRange(f);if(!m)return;const h=Sr(m);if(l.type.isTextblock){const{defaultType:g}=d.parent.contentMatchAt(d.index());e.setNodeMarkup(m.start,g)}(h||h===0)&&e.lift(m,h)})}),!0},Ev=n=>e=>n(e),Sv=()=>({state:n,dispatch:e})=>W0(n,e),kv=(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},Cv=()=>({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},wv=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},Tv=n=>({tr:e,dispatch:t})=>{const{from:r,to:o}=n;return t&&e.delete(r,o),!0},Av=()=>({state:n,dispatch:e})=>D0(n,e),Ov=()=>({commands:n})=>n.keyboardShortcut("Enter"),Mv=()=>({state:n,dispatch:e})=>j0(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]:Ba(e[o])?e[o].test(n[o]):e[o]===n[o]):!0}function Js(n,e,t={}){return n.find(r=>r.type===e&&zo(r.attrs,t))}function Iv(n,e,t={}){return!!Js(n,e,t)}function Pa(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&&Iv([...n.parent.child(l).marks],e,t);)a+=n.parent.child(l).nodeSize,l+=1;return{from:s,to:a}}function Mn(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 Nv=(n,e={})=>({tr:t,state:r,dispatch:o})=>{const i=Mn(n,r.schema),{doc:s,selection:l}=t,{$from:a,from:c,to:u}=l;if(o){const d=Pa(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},Dv=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 Fa(n){return n instanceof De}function an(n=0,e=0,t=0){return Math.min(Math.max(n,e),t)}function pf(n,e=null){if(!e)return null;const t=Ne.atStart(n),r=Ne.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,an(0,o,i),an(n.content.size,o,i)):De.create(n,an(e,o,i),an(e,o,i))}function Va(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}const Rv=(n=null,e={})=>({editor:t,view:r,tr:o,dispatch:i})=>{e={scrollIntoView:!0,...e};const s=()=>{Va()&&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&&!Fa(t.state.selection))return s(),!0;const l=pf(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},Lv=(n,e)=>t=>n.every((r,o)=>e(r,{...t,index:o})),Bv=(n,e)=>({tr:t,commands:r})=>r.insertContentAt({from:t.selection.from,to:t.selection.to},n,e);function Tc(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?ie.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=fr.fromSchema(e);return t.slice?r.parseSlice(Tc(n),t.parseOptions).content:r.parse(Tc(n),t.parseOptions)}return Uo("",e,t)}function Pv(n,e,t){const r=n.steps.length-1;if(r<e)return;const o=n.steps[r];if(!(o instanceof Ze||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(Ne.near(n.doc.resolve(s),t))}const Fv=n=>n.toString().startsWith("<"),Vv=(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((Fv(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&&Pv(r,r.steps.length-1,-1)}return!0},$v=()=>({state:n,dispatch:e})=>$0(n,e),zv=()=>({state:n,dispatch:e})=>z0(n,e),Uv=()=>({state:n,dispatch:e})=>L0(n,e),Hv=()=>({state:n,dispatch:e})=>F0(n,e),jv=()=>({tr:n,state:e,dispatch:t})=>{try{const r=Oi(e.doc,e.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},Wv=()=>({state:n,dispatch:e,tr:t})=>{try{const r=Oi(n.doc,n.selection.$from.pos,1);return r==null?!1:(t.join(r,2),e&&e(t),!0)}catch{return!1}};function hf(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function Kv(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))Va()||hf()?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 Gv=n=>({editor:e,view:t,tr:r,dispatch:o})=>{const i=Kv(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 Yr(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 m=Math.max(r,f),h=Math.min(o,f+d.nodeSize);l.push({node:d,from:m,to:h})});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 Jv=(n,e={})=>({state:t,dispatch:r})=>{const o=Ye(n,t.schema);return Yr(t,o,e)?U0(t,r):!1},Yv=()=>({state:n,dispatch:e})=>K0(n,e),Qv=n=>({state:e,dispatch:t})=>{const r=Ye(n,e.schema);return q0(r)(e,t)},Xv=()=>({state:n,dispatch:e})=>H0(n,e);function Fi(n,e){return e.nodes[n]?"node":e.marks[n]?"mark":null}function Ac(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 Zv=(n,e)=>({tr:t,state:r,dispatch:o})=>{let i=null,s=null;const l=Fi(typeof n=="string"?n:n.name,r.schema);return l?(l==="node"&&(i=Ye(n,r.schema)),l==="mark"&&(s=Mn(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,Ac(c.attrs,e)),s&&c.marks.length&&c.marks.forEach(d=>{s===d.type&&t.addMark(u,u+c.nodeSize,s.create(Ac(d.attrs,e)))})})}),!0):!1},_v=()=>({tr:n,dispatch:e})=>(e&&n.scrollIntoView(),!0),qv=()=>({tr:n,commands:e})=>e.setTextSelection({from:0,to:n.doc.content.size}),ey=()=>({state:n,dispatch:e})=>B0(n,e),ty=()=>({state:n,dispatch:e})=>V0(n,e),ny=()=>({state:n,dispatch:e})=>G0(n,e),ry=()=>({state:n,dispatch:e})=>Q0(n,e),oy=()=>({state:n,dispatch:e})=>Y0(n,e);function mf(n,e,t={}){return Uo(n,e,{slice:!1,parseOptions:t})}const iy=(n,e=!1,t={})=>({tr:r,editor:o,dispatch:i})=>{const{doc:s}=r,l=mf(n,o.schema,t);return i&&r.replaceWith(0,s.content.size,l).setMeta("preventUpdate",!e),!0};function Vi(n,e){const t=Mn(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 sy(n,e){const t=new xd(n);return e.forEach(r=>{r.steps.forEach(o=>{t.step(o)})}),t}function ay(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 ly(n,e,t){const r=[];return n.nodesBetween(e.from,e.to,(o,i)=>{t(o)&&r.push({node:o,pos:i})}),r}function cy(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 $a(n){return e=>cy(e.$from,n)}function uy(n,e){const t=Yt.fromSchema(e).serializeFragment(n),o=document.implementation.createHTMLDocument().createElement("div");return o.appendChild(t),o.innerHTML}function dy(n,e){const t={from:0,to:n.content.size};return df(n,t,e)}function fy(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 gf(n,e){const t=Fi(typeof e=="string"?e:e.name,n.schema);return t==="node"?fy(n,e):t==="mark"?Vi(n,e):{}}function py(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 hy(n){const e=py(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 my(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}})})}),hy(r)}function za(n,e,t){const r=[];return n===e?t.resolve(n).marks().forEach(o=>{const i=t.resolve(n-1),s=Pa(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 ko(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 Ys(n,e,t={}){const{empty:r,ranges:o}=n.selection,i=e?Mn(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 m=d.pos,h=f.pos;n.doc.nodesBetween(m,h,(g,v)=>{if(!g.isText&&!g.marks.length)return;const E=Math.max(m,v),k=Math.min(h,v+g.nodeSize),w=k-E;s+=w,l.push(...g.marks.map(y=>({mark:y,from:E,to:k})))})}),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 gy(n,e,t={}){if(!e)return Yr(n,null,t)||Ys(n,null,t);const r=Fi(e,n.schema);return r==="node"?Yr(n,e,t):r==="mark"?Ys(n,e,t):!1}function Oc(n,e){const{nodeExtensions:t}=Bi(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(he(r,"group",o));return typeof i!="string"?!1:i.split(" ").includes("list")}function vy(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 yy(n){return n instanceof xe}function vf(n,e,t){const o=n.state.doc.content.size,i=an(e,0,o),s=an(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),m=f-d,h=u-c,E={top:c,bottom:u,left:d,right:f,width:m,height:h,x:d,y:c};return{...E,toJSON:()=>E}}function by(n,e,t){var r;const{selection:o}=e;let i=null;if(Fa(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 m=!f||f.type.allowsMarkType(t),h=!!t.isInSet(u.marks)||!u.marks.some(g=>g.type.excludes(t));c=m&&h}return!c}),c})}const xy=(n,e={})=>({tr:t,state:r,dispatch:o})=>{const{selection:i}=t,{empty:s,ranges:l}=i,a=Mn(n,r.schema);if(o)if(s){const c=Vi(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,m)=>{const h=Math.max(m,u),g=Math.min(m+f.nodeSize,d);f.marks.find(E=>E.type===a)?f.marks.forEach(E=>{a===E.type&&t.addMark(h,g,a.create({...E.attrs,...e}))}):t.addMark(h,g,a.create(e))})});return by(r,t,a)},Ey=(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})=>Sc(i,e)(t)?!0:s.clearNodes()).command(({state:s})=>Sc(i,e)(s,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},ky=n=>({tr:e,dispatch:t})=>{if(t){const{doc:r}=e,o=an(n,0,r.content.size),i=xe.create(r,o);e.setSelection(i)}return!0},Cy=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=an(o,s,l),c=an(i,s,l),u=De.create(r,a,c);e.setSelection(u)}return!0},wy=n=>({state:e,dispatch:t})=>{const r=Ye(n,e.schema);return nv(r)(e,t)};function Mc(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 Ty=({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=ko(c,l.node().type.name,l.node().attrs);if(i instanceof xe&&i.node.isBlock)return!l.parentOffset||!cr(s,l.pos)?!1:(r&&(n&&Mc(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:ay(l.node(-1).contentMatchAt(l.indexAfter(-1)));let m=d&&f?[{type:f,attrs:u}]:void 0,h=cr(e.doc,e.mapping.map(l.pos),1,m);if(!m&&!h&&cr(e.doc,e.mapping.map(l.pos),1,f?[{type:f}]:void 0)&&(h=!0,m=f?[{type:f,attrs:u}]:void 0),h&&(e.split(e.mapping.map(l.pos),1,m),f&&!d&&!l.parentOffset&&l.parent.type!==f)){const g=e.mapping.map(l.before()),v=e.doc.resolve(g);l.node(-1).canReplaceWith(v.index(),v.index()+1,f)&&e.setNodeMarkup(e.mapping.map(l.before()),f)}n&&Mc(t,o.extensionManager.splittableMarks),e.scrollIntoView()}return!0},Ay=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 v=ie.empty;const E=l.index(-1)?1:l.index(-2)?2:3;for(let B=l.depth-E;B>=l.depth-3;B-=1)v=ie.from(l.node(B).copy(v));const k=l.indexAfter(-1)<l.node(-2).childCount?1:l.indexAfter(-2)<l.node(-3).childCount?2:3,w=ko(d,l.node().type.name,l.node().attrs),y=((i=s.contentMatch.defaultType)===null||i===void 0?void 0:i.createAndFill(w))||void 0;v=v.append(ie.from(s.createAndFill(null,y)||void 0));const R=l.before(l.depth-(E-1));e.replace(R,l.after(-k),new fe(v,4-E,0));let S=-1;e.doc.nodesBetween(R,e.doc.content.size,(B,$)=>{if(S>-1)return!1;B.isTextblock&&B.content.size===0&&(S=$+1)}),S>-1&&e.setSelection(De.near(e.doc.resolve(S))),e.scrollIntoView()}return!0}const f=a.pos===l.end()?u.contentMatchAt(0).defaultType:null,m=ko(d,u.type.name,u.attrs),h=ko(d,l.node().type.name,l.node().attrs);e.delete(l.pos,a.pos);const g=f?[{type:s,attrs:m},{type:f,attrs:h}]:[{type:s,attrs:m}];if(!cr(e.doc,l.pos,2))return!1;if(r){const{selection:v,storedMarks:E}=t,{splittableMarks:k}=o.extensionManager,w=E||v.$to.parentOffset&&v.$from.marks();if(e.split(l.pos,2,g).scrollIntoView(),!w||!r)return!0;const y=w.filter(R=>k.includes(R.type.name));e.ensureMarks(y)}return!0},fs=(n,e)=>{const t=$a(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)&&An(n.doc,t.pos)&&n.join(t.pos),!0},ps=(n,e)=>{const t=$a(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)&&An(n.doc,r)&&n.join(r),!0},Oy=(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,m=Ye(n,s.schema),h=Ye(e,s.schema),{selection:g,storedMarks:v}=s,{$from:E,$to:k}=g,w=E.blockRange(k),y=v||g.$to.parentOffset&&g.$from.marks();if(!w)return!1;const R=$a(S=>Oc(S.type.name,d))(g);if(w.depth>=1&&R&&w.depth-R.depth<=1){if(R.node.type===m)return c.liftListItem(h);if(Oc(R.node.type.name,d)&&m.validContent(R.node.content)&&l)return a().command(()=>(i.setNodeMarkup(R.pos,m),!0)).command(()=>fs(i,m)).command(()=>ps(i,m)).run()}return!t||!y||!l?a().command(()=>u().wrapInList(m,r)?!0:c.clearNodes()).wrapInList(m,r).command(()=>fs(i,m)).command(()=>ps(i,m)).run():a().command(()=>{const S=u().wrapInList(m,r),B=y.filter($=>f.includes($.type.name));return i.ensureMarks(B),S?!0:c.clearNodes()}).wrapInList(m,r).command(()=>fs(i,m)).command(()=>ps(i,m)).run()},My=(n,e={},t={})=>({state:r,commands:o})=>{const{extendEmptyMarkRange:i=!1}=t,s=Mn(n,r.schema);return Ys(r,s,e)?o.unsetMark(s,{extendEmptyMarkRange:i}):o.setMark(s,e)},Iy=(n,e,t={})=>({state:r,commands:o})=>{const i=Ye(n,r.schema),s=Ye(e,r.schema);return Yr(r,i,t)?o.setNode(s):o.setNode(i,t)},Ny=(n,e={})=>({state:t,commands:r})=>{const o=Ye(n,t.schema);return Yr(t,o,e)?r.lift(o):r.wrapIn(o,e)},Dy=()=>({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},Ry=()=>({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},Ly=(n,e={})=>({tr:t,state:r,dispatch:o})=>{var i;const{extendEmptyMarkRange:s=!1}=e,{selection:l}=t,a=Mn(n,r.schema),{$from:c,empty:u,ranges:d}=l;if(!o)return!0;if(u&&s){let{from:f,to:m}=l;const h=(i=c.marks().find(v=>v.type===a))===null||i===void 0?void 0:i.attrs,g=Pa(c,a,h);g&&(f=g.from,m=g.to),t.removeMark(f,m,a)}else d.forEach(f=>{t.removeMark(f.$from.pos,f.$to.pos,a)});return t.removeStoredMark(a),!0},By=(n,e={})=>({tr:t,state:r,dispatch:o})=>{let i=null,s=null;const l=Fi(typeof n=="string"?n:n.name,r.schema);return l?(l==="node"&&(i=Ye(n,r.schema)),l==="mark"&&(s=Mn(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(m=>{if(s===m.type){const h=Math.max(f,c),g=Math.min(f+d.nodeSize,u);t.addMark(h,g,s.create({...m.attrs,...e}))}})})}),!0):!1},Py=(n,e={})=>({state:t,dispatch:r})=>{const o=Ye(n,t.schema);return X0(o,e)(t,r)},Fy=(n,e={})=>({state:t,dispatch:r})=>{const o=Ye(n,t.schema);return Z0(o,e)(t,r)};var Vy=Object.freeze({__proto__:null,blur:yv,clearContent:bv,clearNodes:xv,command:Ev,createParagraphNear:Sv,cut:kv,deleteCurrentNode:Cv,deleteNode:wv,deleteRange:Tv,deleteSelection:Av,enter:Ov,exitCode:Mv,extendMarkRange:Nv,first:Dv,focus:Rv,forEach:Lv,insertContent:Bv,insertContentAt:Vv,joinUp:$v,joinDown:zv,joinBackward:Uv,joinForward:Hv,joinItemBackward:jv,joinItemForward:Wv,keyboardShortcut:Gv,lift:Jv,liftEmptyBlock:Yv,liftListItem:Qv,newlineInCode:Xv,resetAttributes:Zv,scrollIntoView:_v,selectAll:qv,selectNodeBackward:ey,selectNodeForward:ty,selectParentNode:ny,selectTextblockEnd:ry,selectTextblockStart:oy,setContent:iy,setMark:xy,setMeta:Ey,setNode:Sy,setNodeSelection:ky,setTextSelection:Cy,sinkListItem:wy,splitBlock:Ty,splitListItem:Ay,toggleList:Oy,toggleMark:My,toggleNode:Iy,toggleWrap:Ny,undoInputRule:Dy,unsetAllMarks:Ry,unsetMark:Ly,updateAttributes:By,wrapIn:Py,wrapInList:Fy});const $y=Dt.create({name:"commands",addCommands(){return{...Vy}}}),zy=Dt.create({name:"editable",addProseMirrorPlugins(){return[new gt({key:new zt("editable"),props:{editable:()=>this.editor.options.editable}})]}}),Uy=Dt.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:n}=this;return[new gt({key:new zt("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}}}})]}}),Hy=Dt.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:m}=d,h=d.parent.isTextblock?l.doc.resolve(f-1):d,g=h.parent.type.spec.isolating,v=d.pos-d.parentOffset,E=g&&h.parent.childCount===1?v===d.pos:Ne.atStart(c).from===f;return!u||!E||!m.type.isTextblock||m.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 Va()||hf()?i:o},addProseMirrorPlugins(){return[new gt({key:new zt("clearDocument"),appendTransaction:(n,e,t)=>{if(!(n.some(h=>h.docChanged)&&!e.doc.eq(t.doc)))return;const{empty:o,from:i,to:s}=e.selection,l=Ne.atStart(e.doc).from,a=Ne.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=Ri({state:t,transaction:d}),{commands:m}=new Li({editor:this.editor,state:f});if(m.clearNodes(),!!d.steps.length)return d}})]}}),jy=Dt.create({name:"tabindex",addProseMirrorPlugins(){return[new gt({key:new zt("tabindex"),props:{attributes:this.editor.isEditable?{tabindex:"0"}:{}}})]}});var Wy=Object.freeze({__proto__:null,ClipboardTextSerializer:vv,Commands:$y,Editable:zy,FocusEvents:Uy,Keymap:Hy,Tabindex:jy});const Ky=`.ProseMirror {
23
23
  position: relative;
24
24
  }
25
25
 
@@ -93,39 +93,71 @@ img.ProseMirror-separator {
93
93
 
94
94
  .tippy-box[data-animation=fade][data-state=hidden] {
95
95
  opacity: 0
96
- }`;function n2(n,e,t){const r=document.querySelector(`style[data-tiptap-style${t?`-${t}`:""}]`);if(r!==null)return r;const i=document.createElement("style");return e&&i.setAttribute("nonce",e),i.setAttribute(`data-tiptap-style${t?`-${t}`:""}`,""),i.innerHTML=n,document.getElementsByTagName("head")[0].appendChild(i),i}let r2=class extends hb{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=n2(t2,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=zh(t)?t(e,[...this.state.plugins]):[...this.state.plugins,e],i=this.state.reconfigure({plugins:r});this.view.updateState(i)}unregisterPlugin(e){if(this.isDestroyed)return;const t=typeof e=="string"?`${e}$`:e.key,r=this.state.reconfigure({plugins:this.state.plugins.filter(i=>!i.key.startsWith(t))});this.view.updateState(r)}createExtensionManager(){const t=[...this.options.enableCoreExtensions?Object.values(e2):[],...this.options.extensions].filter(r=>["extension","node","mark"].includes(r==null?void 0:r.type));this.extensionManager=new Rr(t,this)}createCommandManager(){this.commandManager=new Os({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){const e=Gh(this.options.content,this.schema,this.options.parseOptions),t=Wh(e,this.options.autofocus);this.view=new Iy(this.options.element,{...this.options.editorProps,dispatchTransaction:this.dispatchTransaction.bind(this),state:Dr.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 i=this.view.dom;i.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 i=e.getMeta("focus"),o=e.getMeta("blur");i&&this.emit("focus",{editor:this,event:i.event,transaction:e}),o&&this.emit("blur",{editor:this,event:o.event,transaction:e}),!(!e.docChanged||e.getMeta("preventUpdate"))&&this.emit("update",{editor:this,transaction:e})}getAttributes(e){return Yh(this.state,e)}isActive(e,t){const r=typeof e=="string"?e:null,i=typeof e=="string"?t:e;return wE(this.state,r,i)}getJSON(){return this.state.doc.toJSON()}getHTML(){return EE(this.state.doc.content,this.schema)}getText(e){const{blockSeparator:t=`
96
+ }`;function Gy(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 Jy=class extends rv{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=Gy(Ky,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=cf(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(Wy):[],...this.options.extensions].filter(r=>["extension","node","mark"].includes(r==null?void 0:r.type));this.extensionManager=new lr(t,this)}createCommandManager(){this.commandManager=new Li({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){const e=mf(this.options.content,this.schema,this.options.parseOptions),t=pf(e,this.options.autofocus);this.view=new E0(this.options.element,{...this.options.editorProps,dispatchTransaction:this.dispatchTransaction.bind(this),state:ar.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 gf(this.state,e)}isActive(e,t){const r=typeof e=="string"?e:null,o=typeof e=="string"?t:e;return gy(this.state,r,o)}getJSON(){return this.state.doc.toJSON()}getHTML(){return uy(this.state.doc.content,this.schema)}getText(e){const{blockSeparator:t=`
97
97
 
98
- `,textSerializers:r={}}=e||{};return SE(this.state.doc,{blockSeparator:t,textSerializers:{...jh(this.schema),...r}})}get isEmpty(){return kE(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 Io(n){return new Hh({find:n.find,handler:({state:e,range:t,match:r})=>{const i=De(n.getAttributes,void 0,r);if(i===!1||i===null)return null;const{tr:o}=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(Zl(t.from,t.to,e.doc).filter(p=>p.mark.type.excluded.find(g=>g===n.type&&g!==p.mark.type)).filter(p=>p.to>c).length)return null;u<t.to&&o.delete(u,t.to),c>t.from&&o.delete(t.from+a,c);const f=t.from+a+s.length;o.addMark(t.from+a,f,n.type.create(i||{})),o.removeStoredMark(n.type)}}})}function Do(n){return new Hh({find:n.find,handler:({state:e,range:t,match:r,chain:i})=>{const o=De(n.getAttributes,void 0,r)||{},s=e.tr.delete(t.from,t.to),a=s.doc.resolve(t.from).blockRange(),c=a&&_l(a,n.type,o);if(!c)return null;if(s.wrap(a,c),n.keepMarks&&n.editor){const{selection:d,storedMarks:f}=e,{splittableMarks:p}=n.editor.extensionManager,h=f||d.$to.parentOffset&&d.$from.marks();if(h){const g=h.filter(v=>p.includes(v.type.name));s.ensureMarks(g)}}if(n.keepAttributes){const d=n.type.name==="bulletList"||n.type.name==="orderedList"?"listItem":"taskList";i().updateAttributes(d,o).run()}const u=s.doc.resolve(t.from-1).nodeBefore;u&&u.type===n.type&&zn(s.doc,t.from-1)&&(!n.joinPredicate||n.joinPredicate(r,u))&&s.join(t.from-1)}})}class an{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=De(me(this,"addOptions",{name:this.name}))),this.storage=De(me(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new an(e)}configure(e={}){const t=this.extend();return t.options=Ns(this.options,e),t.storage=De(me(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){const t=new an(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=De(me(t,"addOptions",{name:t.name})),t.storage=De(me(t,"addStorage",{name:t.name,options:t.options})),t}static handleExit({editor:e,mark:t}){const{tr:r}=e.state,i=e.state.selection.$from;if(i.pos===i.end()){const s=i.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(" ",i.pos),e.view.dispatch(r),!0}return!1}}let bn=class nl{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=De(me(this,"addOptions",{name:this.name}))),this.storage=De(me(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new nl(e)}configure(e={}){const t=this.extend();return t.options=Ns(this.options,e),t.storage=De(me(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){const t=new nl(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=De(me(t,"addOptions",{name:t.name})),t.storage=De(me(t,"addStorage",{name:t.name,options:t.options})),t}};function Mi(n){return new Sb({find:n.find,handler:({state:e,range:t,match:r,pasteEvent:i})=>{const o=De(n.getAttributes,void 0,r,i);if(o===!1||o===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(Zl(t.from,t.to,e.doc).filter(h=>h.mark.type.excluded.find(v=>v===n.type&&v!==h.mark.type)).filter(h=>h.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(o||{})),s.removeStoredMark(n.type)}}})}var ct="top",xt="bottom",At="right",ut="left",Fi="auto",Zr=[ct,xt,At,ut],fr="start",Ur="end",Xh="clippingParents",ql="viewport",wr="popper",Qh="reference",rl=Zr.reduce(function(n,e){return n.concat([e+"-"+fr,e+"-"+Ur])},[]),ec=[].concat(Zr,[Fi]).reduce(function(n,e){return n.concat([e,e+"-"+fr,e+"-"+Ur])},[]),Zh="beforeRead",qh="read",ep="afterRead",tp="beforeMain",np="main",rp="afterMain",ip="beforeWrite",op="write",sp="afterWrite",Ro=[Zh,qh,ep,tp,np,rp,ip,op,sp];function ln(n){return n?(n.nodeName||"").toLowerCase():null}function wt(n){if(n==null)return window;if(n.toString()!=="[object Window]"){var e=n.ownerDocument;return e&&e.defaultView||window}return n}function hr(n){var e=wt(n).Element;return n instanceof e||n instanceof Element}function Tt(n){var e=wt(n).HTMLElement;return n instanceof e||n instanceof HTMLElement}function tc(n){if(typeof ShadowRoot>"u")return!1;var e=wt(n).ShadowRoot;return n instanceof e||n instanceof ShadowRoot}function i2(n){var e=n.state;Object.keys(e.elements).forEach(function(t){var r=e.styles[t]||{},i=e.attributes[t]||{},o=e.elements[t];!Tt(o)||!ln(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(s){var l=i[s];l===!1?o.removeAttribute(s):o.setAttribute(s,l===!0?"":l)}))})}function o2(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 i=e.elements[r],o=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},{});!Tt(i)||!ln(i)||(Object.assign(i.style,l),Object.keys(o).forEach(function(a){i.removeAttribute(a)}))})}}const Rs={name:"applyStyles",enabled:!0,phase:"write",fn:i2,effect:o2,requires:["computeStyles"]};function Ut(n){return n.split("-")[0]}var lr=Math.max,Lo=Math.min,jr=Math.round;function il(){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 ap(){return!/^((?!chrome|android).)*safari/i.test(il())}function Wr(n,e,t){e===void 0&&(e=!1),t===void 0&&(t=!1);var r=n.getBoundingClientRect(),i=1,o=1;e&&Tt(n)&&(i=n.offsetWidth>0&&jr(r.width)/n.offsetWidth||1,o=n.offsetHeight>0&&jr(r.height)/n.offsetHeight||1);var s=hr(n)?wt(n):window,l=s.visualViewport,a=!ap()&&t,c=(r.left+(a&&l?l.offsetLeft:0))/i,u=(r.top+(a&&l?l.offsetTop:0))/o,d=r.width/i,f=r.height/o;return{width:d,height:f,top:u,right:c+d,bottom:u+f,left:c,x:c,y:u}}function nc(n){var e=Wr(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 lp(n,e){var t=e.getRootNode&&e.getRootNode();if(n.contains(e))return!0;if(t&&tc(t)){var r=e;do{if(r&&n.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Wt(n){return wt(n).getComputedStyle(n)}function s2(n){return["table","td","th"].indexOf(ln(n))>=0}function jn(n){return((hr(n)?n.ownerDocument:n.document)||window.document).documentElement}function Ls(n){return ln(n)==="html"?n:n.assignedSlot||n.parentNode||(tc(n)?n.host:null)||jn(n)}function Ju(n){return!Tt(n)||Wt(n).position==="fixed"?null:n.offsetParent}function a2(n){var e=/firefox/i.test(il()),t=/Trident/i.test(il());if(t&&Tt(n)){var r=Wt(n);if(r.position==="fixed")return null}var i=Ls(n);for(tc(i)&&(i=i.host);Tt(i)&&["html","body"].indexOf(ln(i))<0;){var o=Wt(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||e&&o.willChange==="filter"||e&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function $i(n){for(var e=wt(n),t=Ju(n);t&&s2(t)&&Wt(t).position==="static";)t=Ju(t);return t&&(ln(t)==="html"||ln(t)==="body"&&Wt(t).position==="static")?e:t||a2(n)||e}function rc(n){return["top","bottom"].indexOf(n)>=0?"x":"y"}function mi(n,e,t){return lr(n,Lo(e,t))}function l2(n,e,t){var r=mi(n,e,t);return r>t?t:r}function cp(){return{top:0,right:0,bottom:0,left:0}}function up(n){return Object.assign({},cp(),n)}function dp(n,e){return e.reduce(function(t,r){return t[r]=n,t},{})}var c2=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,up(typeof e!="number"?e:dp(e,Zr))};function u2(n){var e,t=n.state,r=n.name,i=n.options,o=t.elements.arrow,s=t.modifiersData.popperOffsets,l=Ut(t.placement),a=rc(l),c=[ut,At].indexOf(l)>=0,u=c?"height":"width";if(!(!o||!s)){var d=c2(i.padding,t),f=nc(o),p=a==="y"?ct:ut,h=a==="y"?xt:At,g=t.rects.reference[u]+t.rects.reference[a]-s[a]-t.rects.popper[u],v=s[a]-t.rects.reference[a],S=$i(o),T=S?a==="y"?S.clientHeight||0:S.clientWidth||0:0,x=g/2-v/2,b=d[p],D=T-f[u]-d[h],A=T/2-f[u]/2+x,B=mi(b,A,D),$=a;t.modifiersData[r]=(e={},e[$]=B,e.centerOffset=B-A,e)}}function d2(n){var e=n.state,t=n.options,r=t.element,i=r===void 0?"[data-popper-arrow]":r;if(i!=null&&!(typeof i=="string"&&(i=e.elements.popper.querySelector(i),!i))){if(process.env.NODE_ENV!=="production"&&(Tt(i)||console.error(['Popper: "arrow" element must be an HTMLElement (not an SVGElement).',"To use an SVG arrow, wrap it in an HTMLElement that will be used as","the arrow."].join(" "))),!lp(e.elements.popper,i)){process.env.NODE_ENV!=="production"&&console.error(['Popper: "arrow" modifier\'s `element` must be a child of the popper',"element."].join(" "));return}e.elements.arrow=i}}const fp={name:"arrow",enabled:!0,phase:"main",fn:u2,effect:d2,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Kr(n){return n.split("-")[1]}var f2={top:"auto",right:"auto",bottom:"auto",left:"auto"};function h2(n,e){var t=n.x,r=n.y,i=e.devicePixelRatio||1;return{x:jr(t*i)/i||0,y:jr(r*i)/i||0}}function Xu(n){var e,t=n.popper,r=n.popperRect,i=n.placement,o=n.variation,s=n.offsets,l=n.position,a=n.gpuAcceleration,c=n.adaptive,u=n.roundOffsets,d=n.isFixed,f=s.x,p=f===void 0?0:f,h=s.y,g=h===void 0?0:h,v=typeof u=="function"?u({x:p,y:g}):{x:p,y:g};p=v.x,g=v.y;var S=s.hasOwnProperty("x"),T=s.hasOwnProperty("y"),x=ut,b=ct,D=window;if(c){var A=$i(t),B="clientHeight",$="clientWidth";if(A===wt(t)&&(A=jn(t),Wt(A).position!=="static"&&l==="absolute"&&(B="scrollHeight",$="scrollWidth")),A=A,i===ct||(i===ut||i===At)&&o===Ur){b=xt;var V=d&&A===D&&D.visualViewport?D.visualViewport.height:A[B];g-=V-r.height,g*=a?1:-1}if(i===ut||(i===ct||i===xt)&&o===Ur){x=At;var F=d&&A===D&&D.visualViewport?D.visualViewport.width:A[$];p-=F-r.width,p*=a?1:-1}}var P=Object.assign({position:l},c&&f2),_=u===!0?h2({x:p,y:g},wt(t)):{x:p,y:g};if(p=_.x,g=_.y,a){var H;return Object.assign({},P,(H={},H[b]=T?"0":"",H[x]=S?"0":"",H.transform=(D.devicePixelRatio||1)<=1?"translate("+p+"px, "+g+"px)":"translate3d("+p+"px, "+g+"px, 0)",H))}return Object.assign({},P,(e={},e[b]=T?g+"px":"",e[x]=S?p+"px":"",e.transform="",e))}function p2(n){var e=n.state,t=n.options,r=t.gpuAcceleration,i=r===void 0?!0:r,o=t.adaptive,s=o===void 0?!0:o,l=t.roundOffsets,a=l===void 0?!0:l;if(process.env.NODE_ENV!=="production"){var c=Wt(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 dy(this.state.doc,{blockSeparator:t,textSerializers:{...ff(this.schema),...r}})}get isEmpty(){return vy(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 Ho(n){return new uf({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(za(t.from,t.to,e.doc).filter(m=>m.mark.type.excluded.find(g=>g===n.type&&g!==m.mark.type)).filter(m=>m.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 jo(n){return new uf({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&&ka(a,n.type,i);if(!c)return null;if(s.wrap(a,c),n.keepMarks&&n.editor){const{selection:d,storedMarks:f}=e,{splittableMarks:m}=n.editor.extensionManager,h=f||d.$to.parentOffset&&d.$from.marks();if(h){const g=h.filter(v=>m.includes(v.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&&An(s.doc,t.from-1)&&(!n.joinPredicate||n.joinPredicate(r,u))&&s.join(t.from-1)}})}class _t{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(he(this,"addOptions",{name:this.name}))),this.storage=Ie(he(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new _t(e)}configure(e={}){const t=this.extend();return t.options=Pi(this.options,e),t.storage=Ie(he(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){const t=new _t(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(he(t,"addOptions",{name:t.name})),t.storage=Ie(he(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}}let un=class Qs{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(he(this,"addOptions",{name:this.name}))),this.storage=Ie(he(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new Qs(e)}configure(e={}){const t=this.extend();return t.options=Pi(this.options,e),t.storage=Ie(he(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){const t=new Qs(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(he(t,"addOptions",{name:t.name})),t.storage=Ie(he(t,"addStorage",{name:t.name,options:t.options})),t}};function Qr(n){return new dv({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(za(t.from,t.to,e.doc).filter(h=>h.mark.type.excluded.find(v=>v===n.type&&v!==h.mark.type)).filter(h=>h.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",Rt="bottom",Lt="right",mt="left",$i="auto",so=[ht,Rt,Lt,mt],vr="start",Xr="end",Yy="clippingParents",yf="viewport",Tr="popper",Qy="reference",Ic=so.reduce(function(n,e){return n.concat([e+"-"+vr,e+"-"+Xr])},[]),bf=[].concat(so,[$i]).reduce(function(n,e){return n.concat([e,e+"-"+vr,e+"-"+Xr])},[]),Xy="beforeRead",Zy="read",_y="afterRead",qy="beforeMain",e2="main",t2="afterMain",n2="beforeWrite",r2="write",o2="afterWrite",Xs=[Xy,Zy,_y,qy,e2,t2,n2,r2,o2];function qt(n){return n?(n.nodeName||"").toLowerCase():null}function St(n){if(n==null)return window;if(n.toString()!=="[object Window]"){var e=n.ownerDocument;return e&&e.defaultView||window}return n}function Qn(n){var e=St(n).Element;return n instanceof e||n instanceof Element}function Et(n){var e=St(n).HTMLElement;return n instanceof e||n instanceof HTMLElement}function Ua(n){if(typeof ShadowRoot>"u")return!1;var e=St(n).ShadowRoot;return n instanceof e||n instanceof ShadowRoot}function i2(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];!Et(i)||!qt(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 s2(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},{});!Et(o)||!qt(o)||(Object.assign(o.style,l),Object.keys(i).forEach(function(a){o.removeAttribute(a)}))})}}const xf={name:"applyStyles",enabled:!0,phase:"write",fn:i2,effect:s2,requires:["computeStyles"]};function Ft(n){return n.split("-")[0]}var Wn=Math.max,Wo=Math.min,yr=Math.round;function Zs(){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 Ef(){return!/^((?!chrome|android).)*safari/i.test(Zs())}function br(n,e,t){e===void 0&&(e=!1),t===void 0&&(t=!1);var r=n.getBoundingClientRect(),o=1,i=1;e&&Et(n)&&(o=n.offsetWidth>0&&yr(r.width)/n.offsetWidth||1,i=n.offsetHeight>0&&yr(r.height)/n.offsetHeight||1);var s=Qn(n)?St(n):window,l=s.visualViewport,a=!Ef()&&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 Ha(n){var e=br(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 Sf(n,e){var t=e.getRootNode&&e.getRootNode();if(n.contains(e))return!0;if(t&&Ua(t)){var r=e;do{if(r&&n.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function $t(n){return St(n).getComputedStyle(n)}function a2(n){return["table","td","th"].indexOf(qt(n))>=0}function In(n){return((Qn(n)?n.ownerDocument:n.document)||window.document).documentElement}function zi(n){return qt(n)==="html"?n:n.assignedSlot||n.parentNode||(Ua(n)?n.host:null)||In(n)}function Nc(n){return!Et(n)||$t(n).position==="fixed"?null:n.offsetParent}function l2(n){var e=/firefox/i.test(Zs()),t=/Trident/i.test(Zs());if(t&&Et(n)){var r=$t(n);if(r.position==="fixed")return null}var o=zi(n);for(Ua(o)&&(o=o.host);Et(o)&&["html","body"].indexOf(qt(o))<0;){var i=$t(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 ao(n){for(var e=St(n),t=Nc(n);t&&a2(t)&&$t(t).position==="static";)t=Nc(t);return t&&(qt(t)==="html"||qt(t)==="body"&&$t(t).position==="static")?e:t||l2(n)||e}function ja(n){return["top","bottom"].indexOf(n)>=0?"x":"y"}function Pr(n,e,t){return Wn(n,Wo(e,t))}function c2(n,e,t){var r=Pr(n,e,t);return r>t?t:r}function kf(){return{top:0,right:0,bottom:0,left:0}}function Cf(n){return Object.assign({},kf(),n)}function wf(n,e){return e.reduce(function(t,r){return t[r]=n,t},{})}var u2=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,Cf(typeof e!="number"?e:wf(e,so))};function d2(n){var e,t=n.state,r=n.name,o=n.options,i=t.elements.arrow,s=t.modifiersData.popperOffsets,l=Ft(t.placement),a=ja(l),c=[mt,Lt].indexOf(l)>=0,u=c?"height":"width";if(!(!i||!s)){var d=u2(o.padding,t),f=Ha(i),m=a==="y"?ht:mt,h=a==="y"?Rt:Lt,g=t.rects.reference[u]+t.rects.reference[a]-s[a]-t.rects.popper[u],v=s[a]-t.rects.reference[a],E=ao(i),k=E?a==="y"?E.clientHeight||0:E.clientWidth||0:0,w=g/2-v/2,y=d[m],R=k-f[u]-d[h],S=k/2-f[u]/2+w,B=Pr(y,S,R),$=a;t.modifiersData[r]=(e={},e[$]=B,e.centerOffset=B-S,e)}}function f2(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"&&(Et(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(" "))),!Sf(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 p2={name:"arrow",enabled:!0,phase:"main",fn:d2,effect:f2,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function xr(n){return n.split("-")[1]}var h2={top:"auto",right:"auto",bottom:"auto",left:"auto"};function m2(n,e){var t=n.x,r=n.y,o=e.devicePixelRatio||1;return{x:yr(t*o)/o||0,y:yr(r*o)/o||0}}function Dc(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,m=f===void 0?0:f,h=s.y,g=h===void 0?0:h,v=typeof u=="function"?u({x:m,y:g}):{x:m,y:g};m=v.x,g=v.y;var E=s.hasOwnProperty("x"),k=s.hasOwnProperty("y"),w=mt,y=ht,R=window;if(c){var S=ao(t),B="clientHeight",$="clientWidth";if(S===St(t)&&(S=In(t),$t(S).position!=="static"&&l==="absolute"&&(B="scrollHeight",$="scrollWidth")),S=S,o===ht||(o===mt||o===Lt)&&i===Xr){y=Rt;var F=d&&S===R&&R.visualViewport?R.visualViewport.height:S[B];g-=F-r.height,g*=a?1:-1}if(o===mt||(o===ht||o===Rt)&&i===Xr){w=Lt;var T=d&&S===R&&R.visualViewport?R.visualViewport.width:S[$];m-=T-r.width,m*=a?1:-1}}var P=Object.assign({position:l},c&&h2),L=u===!0?m2({x:m,y:g},St(t)):{x:m,y:g};if(m=L.x,g=L.y,a){var U;return Object.assign({},P,(U={},U[y]=k?"0":"",U[w]=E?"0":"",U.transform=(R.devicePixelRatio||1)<=1?"translate("+m+"px, "+g+"px)":"translate3d("+m+"px, "+g+"px, 0)",U))}return Object.assign({},P,(e={},e[y]=k?g+"px":"",e[w]=E?m+"px":"",e.transform="",e))}function g2(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=$t(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:Ut(e.placement),variation:Kr(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,Xu(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,Xu(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 ic={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:p2,data:{}};var Xi={passive:!0};function m2(n){var e=n.state,t=n.instance,r=n.options,i=r.scroll,o=i===void 0?!0:i,s=r.resize,l=s===void 0?!0:s,a=wt(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach(function(u){u.addEventListener("scroll",t.update,Xi)}),l&&a.addEventListener("resize",t.update,Xi),function(){o&&c.forEach(function(u){u.removeEventListener("scroll",t.update,Xi)}),l&&a.removeEventListener("resize",t.update,Xi)}}const oc={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:m2,data:{}};var g2={left:"right",right:"left",bottom:"top",top:"bottom"};function uo(n){return n.replace(/left|right|bottom|top/g,function(e){return g2[e]})}var v2={start:"end",end:"start"};function Qu(n){return n.replace(/start|end/g,function(e){return v2[e]})}function sc(n){var e=wt(n),t=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:t,scrollTop:r}}function ac(n){return Wr(jn(n)).left+sc(n).scrollLeft}function y2(n,e){var t=wt(n),r=jn(n),i=t.visualViewport,o=r.clientWidth,s=r.clientHeight,l=0,a=0;if(i){o=i.width,s=i.height;var c=ap();(c||!c&&e==="fixed")&&(l=i.offsetLeft,a=i.offsetTop)}return{width:o,height:s,x:l+ac(n),y:a}}function b2(n){var e,t=jn(n),r=sc(n),i=(e=n.ownerDocument)==null?void 0:e.body,o=lr(t.scrollWidth,t.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=lr(t.scrollHeight,t.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),l=-r.scrollLeft+ac(n),a=-r.scrollTop;return Wt(i||t).direction==="rtl"&&(l+=lr(t.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:l,y:a}}function lc(n){var e=Wt(n),t=e.overflow,r=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(t+i+r)}function hp(n){return["html","body","#document"].indexOf(ln(n))>=0?n.ownerDocument.body:Tt(n)&&lc(n)?n:hp(Ls(n))}function gi(n,e){var t;e===void 0&&(e=[]);var r=hp(n),i=r===((t=n.ownerDocument)==null?void 0:t.body),o=wt(r),s=i?[o].concat(o.visualViewport||[],lc(r)?r:[]):r,l=e.concat(s);return i?l:l.concat(gi(Ls(s)))}function ol(n){return Object.assign({},n,{left:n.x,top:n.y,right:n.x+n.width,bottom:n.y+n.height})}function E2(n,e){var t=Wr(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 Zu(n,e,t){return e===ql?ol(y2(n,t)):hr(e)?E2(e,t):ol(b2(jn(n)))}function S2(n){var e=gi(Ls(n)),t=["absolute","fixed"].indexOf(Wt(n).position)>=0,r=t&&Tt(n)?$i(n):n;return hr(r)?e.filter(function(i){return hr(i)&&lp(i,r)&&ln(i)!=="body"}):[]}function C2(n,e,t,r){var i=e==="clippingParents"?S2(n):[].concat(e),o=[].concat(i,[t]),s=o[0],l=o.reduce(function(a,c){var u=Zu(n,c,r);return a.top=lr(u.top,a.top),a.right=Lo(u.right,a.right),a.bottom=Lo(u.bottom,a.bottom),a.left=lr(u.left,a.left),a},Zu(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 pp(n){var e=n.reference,t=n.element,r=n.placement,i=r?Ut(r):null,o=r?Kr(r):null,s=e.x+e.width/2-t.width/2,l=e.y+e.height/2-t.height/2,a;switch(i){case ct:a={x:s,y:e.y-t.height};break;case xt:a={x:s,y:e.y+e.height};break;case At:a={x:e.x+e.width,y:l};break;case ut:a={x:e.x-t.width,y:l};break;default:a={x:e.x,y:e.y}}var c=i?rc(i):null;if(c!=null){var u=c==="y"?"height":"width";switch(o){case fr:a[c]=a[c]-(e[u]/2-t[u]/2);break;case Ur:a[c]=a[c]+(e[u]/2-t[u]/2);break}}return a}function Gr(n,e){e===void 0&&(e={});var t=e,r=t.placement,i=r===void 0?n.placement:r,o=t.strategy,s=o===void 0?n.strategy:o,l=t.boundary,a=l===void 0?Xh:l,c=t.rootBoundary,u=c===void 0?ql:c,d=t.elementContext,f=d===void 0?wr:d,p=t.altBoundary,h=p===void 0?!1:p,g=t.padding,v=g===void 0?0:g,S=up(typeof v!="number"?v:dp(v,Zr)),T=f===wr?Qh:wr,x=n.rects.popper,b=n.elements[h?T:f],D=C2(hr(b)?b:b.contextElement||jn(n.elements.popper),a,u,s),A=Wr(n.elements.reference),B=pp({reference:A,element:x,strategy:"absolute",placement:i}),$=ol(Object.assign({},x,B)),V=f===wr?$:A,F={top:D.top-V.top+S.top,bottom:V.bottom-D.bottom+S.bottom,left:D.left-V.left+S.left,right:V.right-D.right+S.right},P=n.modifiersData.offset;if(f===wr&&P){var _=P[i];Object.keys(F).forEach(function(H){var Y=[At,xt].indexOf(H)>=0?1:-1,X=[ct,xt].indexOf(H)>=0?"y":"x";F[H]+=_[X]*Y})}return F}function T2(n,e){e===void 0&&(e={});var t=e,r=t.placement,i=t.boundary,o=t.rootBoundary,s=t.padding,l=t.flipVariations,a=t.allowedAutoPlacements,c=a===void 0?ec:a,u=Kr(r),d=u?l?rl:rl.filter(function(h){return Kr(h)===u}):Zr,f=d.filter(function(h){return c.indexOf(h)>=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 p=f.reduce(function(h,g){return h[g]=Gr(n,{placement:g,boundary:i,rootBoundary:o,padding:s})[Ut(g)],h},{});return Object.keys(p).sort(function(h,g){return p[h]-p[g]})}function x2(n){if(Ut(n)===Fi)return[];var e=uo(n);return[Qu(n),e,Qu(e)]}function A2(n){var e=n.state,t=n.options,r=n.name;if(!e.modifiersData[r]._skip){for(var i=t.mainAxis,o=i===void 0?!0:i,s=t.altAxis,l=s===void 0?!0:s,a=t.fallbackPlacements,c=t.padding,u=t.boundary,d=t.rootBoundary,f=t.altBoundary,p=t.flipVariations,h=p===void 0?!0:p,g=t.allowedAutoPlacements,v=e.options.placement,S=Ut(v),T=S===v,x=a||(T||!h?[uo(v)]:x2(v)),b=[v].concat(x).reduce(function(ke,Ae){return ke.concat(Ut(Ae)===Fi?T2(e,{placement:Ae,boundary:u,rootBoundary:d,padding:c,flipVariations:h,allowedAutoPlacements:g}):Ae)},[]),D=e.rects.reference,A=e.rects.popper,B=new Map,$=!0,V=b[0],F=0;F<b.length;F++){var P=b[F],_=Ut(P),H=Kr(P)===fr,Y=[ct,xt].indexOf(_)>=0,X=Y?"width":"height",Q=Gr(e,{placement:P,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),ie=Y?H?At:ut:H?xt:ct;D[X]>A[X]&&(ie=uo(ie));var j=uo(ie),ce=[];if(o&&ce.push(Q[_]<=0),l&&ce.push(Q[ie]<=0,Q[j]<=0),ce.every(function(ke){return ke})){V=P,$=!1;break}B.set(P,ce)}if($)for(var fe=h?3:1,be=function(Ae){var Oe=b.find(function(ve){var k=B.get(ve);if(k)return k.slice(0,Ae).every(function(M){return M})});if(Oe)return V=Oe,"break"},Te=fe;Te>0;Te--){var Ee=be(Te);if(Ee==="break")break}e.placement!==V&&(e.modifiersData[r]._skip=!0,e.placement=V,e.reset=!0)}}const mp={name:"flip",enabled:!0,phase:"main",fn:A2,requiresIfExists:["offset"],data:{_skip:!1}};function qu(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 ed(n){return[ct,At,xt,ut].some(function(e){return n[e]>=0})}function w2(n){var e=n.state,t=n.name,r=e.rects.reference,i=e.rects.popper,o=e.modifiersData.preventOverflow,s=Gr(e,{elementContext:"reference"}),l=Gr(e,{altBoundary:!0}),a=qu(s,r),c=qu(l,i,o),u=ed(a),d=ed(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 gp={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:w2};function k2(n,e,t){var r=Ut(n),i=[ut,ct].indexOf(r)>=0?-1:1,o=typeof t=="function"?t(Object.assign({},e,{placement:n})):t,s=o[0],l=o[1];return s=s||0,l=(l||0)*i,[ut,At].indexOf(r)>=0?{x:l,y:s}:{x:s,y:l}}function O2(n){var e=n.state,t=n.options,r=n.name,i=t.offset,o=i===void 0?[0,0]:i,s=ec.reduce(function(u,d){return u[d]=k2(d,e.rects,o),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 vp={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:O2};function M2(n){var e=n.state,t=n.name;e.modifiersData[t]=pp({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const cc={name:"popperOffsets",enabled:!0,phase:"read",fn:M2,data:{}};function N2(n){return n==="x"?"y":"x"}function I2(n){var e=n.state,t=n.options,r=n.name,i=t.mainAxis,o=i===void 0?!0:i,s=t.altAxis,l=s===void 0?!1:s,a=t.boundary,c=t.rootBoundary,u=t.altBoundary,d=t.padding,f=t.tether,p=f===void 0?!0:f,h=t.tetherOffset,g=h===void 0?0:h,v=Gr(e,{boundary:a,rootBoundary:c,padding:d,altBoundary:u}),S=Ut(e.placement),T=Kr(e.placement),x=!T,b=rc(S),D=N2(b),A=e.modifiersData.popperOffsets,B=e.rects.reference,$=e.rects.popper,V=typeof g=="function"?g(Object.assign({},e.rects,{placement:e.placement})):g,F=typeof V=="number"?{mainAxis:V,altAxis:V}:Object.assign({mainAxis:0,altAxis:0},V),P=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,_={x:0,y:0};if(A){if(o){var H,Y=b==="y"?ct:ut,X=b==="y"?xt:At,Q=b==="y"?"height":"width",ie=A[b],j=ie+v[Y],ce=ie-v[X],fe=p?-$[Q]/2:0,be=T===fr?B[Q]:$[Q],Te=T===fr?-$[Q]:-B[Q],Ee=e.elements.arrow,ke=p&&Ee?nc(Ee):{width:0,height:0},Ae=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:cp(),Oe=Ae[Y],ve=Ae[X],k=mi(0,B[Q],ke[Q]),M=x?B[Q]/2-fe-k-Oe-F.mainAxis:be-k-Oe-F.mainAxis,C=x?-B[Q]/2+fe+k+ve+F.mainAxis:Te+k+ve+F.mainAxis,O=e.elements.arrow&&$i(e.elements.arrow),y=O?b==="y"?O.clientTop||0:O.clientLeft||0:0,E=(H=P==null?void 0:P[b])!=null?H:0,N=ie+M-E-y,I=ie+C-E,R=mi(p?Lo(j,N):j,ie,p?lr(ce,I):ce);A[b]=R,_[b]=R-ie}if(l){var L,z=b==="x"?ct:ut,W=b==="x"?xt:At,U=A[D],K=D==="y"?"height":"width",G=U+v[z],q=U-v[W],ue=[ct,ut].indexOf(S)!==-1,ge=(L=P==null?void 0:P[D])!=null?L:0,Ne=ue?G:U-B[K]-$[K]-ge+F.altAxis,Fe=ue?U+B[K]+$[K]-ge-F.altAxis:q,Be=p&&ue?l2(Ne,U,Fe):mi(p?Ne:G,U,p?Fe:q);A[D]=Be,_[D]=Be-U}e.modifiersData[r]=_}}const yp={name:"preventOverflow",enabled:!0,phase:"main",fn:I2,requiresIfExists:["offset"]};function D2(n){return{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}}function R2(n){return n===wt(n)||!Tt(n)?sc(n):D2(n)}function L2(n){var e=n.getBoundingClientRect(),t=jr(e.width)/n.offsetWidth||1,r=jr(e.height)/n.offsetHeight||1;return t!==1||r!==1}function _2(n,e,t){t===void 0&&(t=!1);var r=Tt(e),i=Tt(e)&&L2(e),o=jn(e),s=Wr(n,i,t),l={scrollLeft:0,scrollTop:0},a={x:0,y:0};return(r||!r&&!t)&&((ln(e)!=="body"||lc(o))&&(l=R2(e)),Tt(e)?(a=Wr(e,!0),a.x+=e.clientLeft,a.y+=e.clientTop):o&&(a.x=ac(o))),{x:s.left+l.scrollLeft-a.x,y:s.top+l.scrollTop-a.y,width:s.width,height:s.height}}function P2(n){var e=new Map,t=new Set,r=[];n.forEach(function(o){e.set(o.name,o)});function i(o){t.add(o.name);var s=[].concat(o.requires||[],o.requiresIfExists||[]);s.forEach(function(l){if(!t.has(l)){var a=e.get(l);a&&i(a)}}),r.push(o)}return n.forEach(function(o){t.has(o.name)||i(o)}),r}function B2(n){var e=P2(n);return Ro.reduce(function(t,r){return t.concat(e.filter(function(i){return i.phase===r}))},[])}function F2(n){var e;return function(){return e||(e=new Promise(function(t){Promise.resolve().then(function(){e=void 0,t(n())})})),e}}function Tn(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(i,o){return i.replace(/%s/,o)},n)}var Yn='Popper: modifier "%s" provided an invalid %s property, expected %s but got %s',$2='Popper: modifier "%s" requires "%s", but "%s" modifier is not available',td=["name","enabled","phase","fn","effect","requires","options"];function V2(n){n.forEach(function(e){[].concat(Object.keys(e),td).filter(function(t,r,i){return i.indexOf(t)===r}).forEach(function(t){switch(t){case"name":typeof e.name!="string"&&console.error(Tn(Yn,String(e.name),'"name"','"string"','"'+String(e.name)+'"'));break;case"enabled":typeof e.enabled!="boolean"&&console.error(Tn(Yn,e.name,'"enabled"','"boolean"','"'+String(e.enabled)+'"'));break;case"phase":Ro.indexOf(e.phase)<0&&console.error(Tn(Yn,e.name,'"phase"',"either "+Ro.join(", "),'"'+String(e.phase)+'"'));break;case"fn":typeof e.fn!="function"&&console.error(Tn(Yn,e.name,'"fn"','"function"','"'+String(e.fn)+'"'));break;case"effect":e.effect!=null&&typeof e.effect!="function"&&console.error(Tn(Yn,e.name,'"effect"','"function"','"'+String(e.fn)+'"'));break;case"requires":e.requires!=null&&!Array.isArray(e.requires)&&console.error(Tn(Yn,e.name,'"requires"','"array"','"'+String(e.requires)+'"'));break;case"requiresIfExists":Array.isArray(e.requiresIfExists)||console.error(Tn(Yn,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 '+td.map(function(r){return'"'+r+'"'}).join(", ")+'; but "'+t+'" was provided.')}e.requires&&e.requires.forEach(function(r){n.find(function(i){return i.name===r})==null&&console.error(Tn($2,String(e.name),r,r))})})})}function z2(n,e){var t=new Set;return n.filter(function(r){var i=e(r);if(!t.has(i))return t.add(i),!0})}function H2(n){var e=n.reduce(function(t,r){var i=t[r.name];return t[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,t},{});return Object.keys(e).map(function(t){return e[t]})}var nd="Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.",U2="Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.",rd={placement:"bottom",modifiers:[],strategy:"absolute"};function id(){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 _s(n){n===void 0&&(n={});var e=n,t=e.defaultModifiers,r=t===void 0?[]:t,i=e.defaultOptions,o=i===void 0?rd:i;return function(l,a,c){c===void 0&&(c=o);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},rd,o),modifiersData:{},elements:{reference:l,popper:a},attributes:{},styles:{}},d=[],f=!1,p={state:u,setOptions:function(S){var T=typeof S=="function"?S(u.options):S;g(),u.options=Object.assign({},o,u.options,T),u.scrollParents={reference:hr(l)?gi(l):l.contextElement?gi(l.contextElement):[],popper:gi(a)};var x=B2(H2([].concat(r,u.options.modifiers)));if(u.orderedModifiers=x.filter(function(P){return P.enabled}),process.env.NODE_ENV!=="production"){var b=z2([].concat(x,u.options.modifiers),function(P){var _=P.name;return _});if(V2(b),Ut(u.options.placement)===Fi){var D=u.orderedModifiers.find(function(P){var _=P.name;return _==="flip"});D||console.error(['Popper: "auto" placements require the "flip" modifier be',"present and enabled to work."].join(" "))}var A=Wt(a),B=A.marginTop,$=A.marginRight,V=A.marginBottom,F=A.marginLeft;[B,$,V,F].some(function(P){return parseFloat(P)})&&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 h(),p.update()},forceUpdate:function(){if(!f){var S=u.elements,T=S.reference,x=S.popper;if(!id(T,x)){process.env.NODE_ENV!=="production"&&console.error(nd);return}u.rects={reference:_2(T,$i(x),u.options.strategy==="fixed"),popper:nc(x)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(P){return u.modifiersData[P.name]=Object.assign({},P.data)});for(var b=0,D=0;D<u.orderedModifiers.length;D++){if(process.env.NODE_ENV!=="production"&&(b+=1,b>100)){console.error(U2);break}if(u.reset===!0){u.reset=!1,D=-1;continue}var A=u.orderedModifiers[D],B=A.fn,$=A.options,V=$===void 0?{}:$,F=A.name;typeof B=="function"&&(u=B({state:u,options:V,name:F,instance:p})||u)}}},update:F2(function(){return new Promise(function(v){p.forceUpdate(),v(u)})}),destroy:function(){g(),f=!0}};if(!id(l,a))return process.env.NODE_ENV!=="production"&&console.error(nd),p;p.setOptions(c).then(function(v){!f&&c.onFirstUpdate&&c.onFirstUpdate(v)});function h(){u.orderedModifiers.forEach(function(v){var S=v.name,T=v.options,x=T===void 0?{}:T,b=v.effect;if(typeof b=="function"){var D=b({state:u,name:S,instance:p,options:x}),A=function(){};d.push(D||A)}})}function g(){d.forEach(function(v){return v()}),d=[]}return p}}var j2=_s(),W2=[oc,cc,ic,Rs],K2=_s({defaultModifiers:W2}),G2=[oc,cc,ic,Rs,vp,mp,yp,fp,gp],Ps=_s({defaultModifiers:G2});const bp=Object.freeze(Object.defineProperty({__proto__:null,afterMain:rp,afterRead:ep,afterWrite:sp,applyStyles:Rs,arrow:fp,auto:Fi,basePlacements:Zr,beforeMain:tp,beforeRead:Zh,beforeWrite:ip,bottom:xt,clippingParents:Xh,computeStyles:ic,createPopper:Ps,createPopperBase:j2,createPopperLite:K2,detectOverflow:Gr,end:Ur,eventListeners:oc,flip:mp,hide:gp,left:ut,main:np,modifierPhases:Ro,offset:vp,placements:ec,popper:wr,popperGenerator:_s,popperOffsets:cc,preventOverflow:yp,read:qh,reference:Qh,right:At,start:fr,top:ct,variationPlacements:rl,viewport:ql,write:op},Symbol.toStringTag,{value:"Module"}));var Y2="tippy-box",Ep="tippy-content",J2="tippy-backdrop",Sp="tippy-arrow",Cp="tippy-svg-arrow",Jn={passive:!0,capture:!0},Tp=function(){return document.body};function X2(n,e){return{}.hasOwnProperty.call(n,e)}function ha(n,e,t){if(Array.isArray(n)){var r=n[e];return r??(Array.isArray(t)?t[e]:t)}return n}function uc(n,e){var t={}.toString.call(n);return t.indexOf("[object")===0&&t.indexOf(e+"]")>-1}function xp(n,e){return typeof n=="function"?n.apply(void 0,e):n}function od(n,e){if(e===0)return n;var t;return function(r){clearTimeout(t),t=setTimeout(function(){n(r)},e)}}function Q2(n,e){var t=Object.assign({},n);return e.forEach(function(r){delete t[r]}),t}function Z2(n){return n.split(/\s+/).filter(Boolean)}function kr(n){return[].concat(n)}function sd(n,e){n.indexOf(e)===-1&&n.push(e)}function q2(n){return n.filter(function(e,t){return n.indexOf(e)===t})}function eS(n){return n.split("-")[0]}function _o(n){return[].slice.call(n)}function ad(n){return Object.keys(n).reduce(function(e,t){return n[t]!==void 0&&(e[t]=n[t]),e},{})}function vi(){return document.createElement("div")}function Ni(n){return["Element","Fragment"].some(function(e){return uc(n,e)})}function tS(n){return uc(n,"NodeList")}function nS(n){return uc(n,"MouseEvent")}function rS(n){return!!(n&&n._tippy&&n._tippy.reference===n)}function iS(n){return Ni(n)?[n]:tS(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 ld(n,e){n.forEach(function(t){t&&t.setAttribute("data-state",e)})}function oS(n){var e,t=kr(n),r=t[0];return r!=null&&(e=r.ownerDocument)!=null&&e.body?r.ownerDocument:document}function sS(n,e){var t=e.clientX,r=e.clientY;return n.every(function(i){var o=i.popperRect,s=i.popperState,l=i.props,a=l.interactiveBorder,c=eS(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,p=c==="right"?u.left.x:0,h=c==="left"?u.right.x:0,g=o.top-r+d>a,v=r-o.bottom-f>a,S=o.left-t+p>a,T=t-o.right-h>a;return g||v||S||T})}function ma(n,e,t){var r=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(i){n[r](i,t)})}function cd(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 qt={isTouch:!1},ud=0;function aS(){qt.isTouch||(qt.isTouch=!0,window.performance&&document.addEventListener("mousemove",Ap))}function Ap(){var n=performance.now();n-ud<20&&(qt.isTouch=!1,document.removeEventListener("mousemove",Ap)),ud=n}function lS(){var n=document.activeElement;if(rS(n)){var e=n._tippy;n.blur&&!e.state.isVisible&&n.blur()}}function cS(){document.addEventListener("touchstart",aS,Jn),window.addEventListener("blur",lS)}var uS=typeof window<"u"&&typeof document<"u",dS=uS?!!window.msCrypto:!1;function Er(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 dd(n){var e=/[ \t]{2,}/g,t=/^[ \t]*/gm;return n.replace(e," ").replace(t,"").trim()}function fS(n){return dd(`
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:Ft(e.placement),variation:xr(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,Dc(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,Dc(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 v2={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:g2,data:{}};var ho={passive:!0};function y2(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=St(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return i&&c.forEach(function(u){u.addEventListener("scroll",t.update,ho)}),l&&a.addEventListener("resize",t.update,ho),function(){i&&c.forEach(function(u){u.removeEventListener("scroll",t.update,ho)}),l&&a.removeEventListener("resize",t.update,ho)}}const b2={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:y2,data:{}};var x2={left:"right",right:"left",bottom:"top",top:"bottom"};function Co(n){return n.replace(/left|right|bottom|top/g,function(e){return x2[e]})}var E2={start:"end",end:"start"};function Rc(n){return n.replace(/start|end/g,function(e){return E2[e]})}function Wa(n){var e=St(n),t=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:t,scrollTop:r}}function Ka(n){return br(In(n)).left+Wa(n).scrollLeft}function S2(n,e){var t=St(n),r=In(n),o=t.visualViewport,i=r.clientWidth,s=r.clientHeight,l=0,a=0;if(o){i=o.width,s=o.height;var c=Ef();(c||!c&&e==="fixed")&&(l=o.offsetLeft,a=o.offsetTop)}return{width:i,height:s,x:l+Ka(n),y:a}}function k2(n){var e,t=In(n),r=Wa(n),o=(e=n.ownerDocument)==null?void 0:e.body,i=Wn(t.scrollWidth,t.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=Wn(t.scrollHeight,t.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),l=-r.scrollLeft+Ka(n),a=-r.scrollTop;return $t(o||t).direction==="rtl"&&(l+=Wn(t.clientWidth,o?o.clientWidth:0)-i),{width:i,height:s,x:l,y:a}}function Ga(n){var e=$t(n),t=e.overflow,r=e.overflowX,o=e.overflowY;return/auto|scroll|overlay|hidden/.test(t+o+r)}function Tf(n){return["html","body","#document"].indexOf(qt(n))>=0?n.ownerDocument.body:Et(n)&&Ga(n)?n:Tf(zi(n))}function Fr(n,e){var t;e===void 0&&(e=[]);var r=Tf(n),o=r===((t=n.ownerDocument)==null?void 0:t.body),i=St(r),s=o?[i].concat(i.visualViewport||[],Ga(r)?r:[]):r,l=e.concat(s);return o?l:l.concat(Fr(zi(s)))}function _s(n){return Object.assign({},n,{left:n.x,top:n.y,right:n.x+n.width,bottom:n.y+n.height})}function C2(n,e){var t=br(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 Lc(n,e,t){return e===yf?_s(S2(n,t)):Qn(e)?C2(e,t):_s(k2(In(n)))}function w2(n){var e=Fr(zi(n)),t=["absolute","fixed"].indexOf($t(n).position)>=0,r=t&&Et(n)?ao(n):n;return Qn(r)?e.filter(function(o){return Qn(o)&&Sf(o,r)&&qt(o)!=="body"}):[]}function T2(n,e,t,r){var o=e==="clippingParents"?w2(n):[].concat(e),i=[].concat(o,[t]),s=i[0],l=i.reduce(function(a,c){var u=Lc(n,c,r);return a.top=Wn(u.top,a.top),a.right=Wo(u.right,a.right),a.bottom=Wo(u.bottom,a.bottom),a.left=Wn(u.left,a.left),a},Lc(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 Af(n){var e=n.reference,t=n.element,r=n.placement,o=r?Ft(r):null,i=r?xr(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 Rt:a={x:s,y:e.y+e.height};break;case Lt: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?ja(o):null;if(c!=null){var u=c==="y"?"height":"width";switch(i){case vr:a[c]=a[c]-(e[u]/2-t[u]/2);break;case Xr: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?Yy:l,c=t.rootBoundary,u=c===void 0?yf:c,d=t.elementContext,f=d===void 0?Tr:d,m=t.altBoundary,h=m===void 0?!1:m,g=t.padding,v=g===void 0?0:g,E=Cf(typeof v!="number"?v:wf(v,so)),k=f===Tr?Qy:Tr,w=n.rects.popper,y=n.elements[h?k:f],R=T2(Qn(y)?y:y.contextElement||In(n.elements.popper),a,u,s),S=br(n.elements.reference),B=Af({reference:S,element:w,strategy:"absolute",placement:o}),$=_s(Object.assign({},w,B)),F=f===Tr?$:S,T={top:R.top-F.top+E.top,bottom:F.bottom-R.bottom+E.bottom,left:R.left-F.left+E.left,right:F.right-R.right+E.right},P=n.modifiersData.offset;if(f===Tr&&P){var L=P[o];Object.keys(T).forEach(function(U){var K=[Lt,Rt].indexOf(U)>=0?1:-1,Y=[ht,Rt].indexOf(U)>=0?"y":"x";T[U]+=L[Y]*K})}return T}function A2(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?bf:a,u=xr(r),d=u?l?Ic:Ic.filter(function(h){return xr(h)===u}):so,f=d.filter(function(h){return c.indexOf(h)>=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 m=f.reduce(function(h,g){return h[g]=Zr(n,{placement:g,boundary:o,rootBoundary:i,padding:s})[Ft(g)],h},{});return Object.keys(m).sort(function(h,g){return m[h]-m[g]})}function O2(n){if(Ft(n)===$i)return[];var e=Co(n);return[Rc(n),e,Rc(e)]}function M2(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,m=t.flipVariations,h=m===void 0?!0:m,g=t.allowedAutoPlacements,v=e.options.placement,E=Ft(v),k=E===v,w=a||(k||!h?[Co(v)]:O2(v)),y=[v].concat(w).reduce(function(we,ke){return we.concat(Ft(ke)===$i?A2(e,{placement:ke,boundary:u,rootBoundary:d,padding:c,flipVariations:h,allowedAutoPlacements:g}):ke)},[]),R=e.rects.reference,S=e.rects.popper,B=new Map,$=!0,F=y[0],T=0;T<y.length;T++){var P=y[T],L=Ft(P),U=xr(P)===vr,K=[ht,Rt].indexOf(L)>=0,Y=K?"width":"height",Q=Zr(e,{placement:P,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),te=K?U?Lt:mt:U?Rt:ht;R[Y]>S[Y]&&(te=Co(te));var H=Co(te),se=[];if(i&&se.push(Q[L]<=0),l&&se.push(Q[te]<=0,Q[H]<=0),se.every(function(we){return we})){F=P,$=!1;break}B.set(P,se)}if($)for(var de=h?3:1,ge=function(ke){var Te=y.find(function(ve){var O=B.get(ve);if(O)return O.slice(0,ke).every(function(I){return I})});if(Te)return F=Te,"break"},Ee=de;Ee>0;Ee--){var ye=ge(Ee);if(ye==="break")break}e.placement!==F&&(e.modifiersData[r]._skip=!0,e.placement=F,e.reset=!0)}}const I2={name:"flip",enabled:!0,phase:"main",fn:M2,requiresIfExists:["offset"],data:{_skip:!1}};function Bc(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 Pc(n){return[ht,Lt,Rt,mt].some(function(e){return n[e]>=0})}function N2(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=Bc(s,r),c=Bc(l,o,i),u=Pc(a),d=Pc(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 D2={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:N2};function R2(n,e,t){var r=Ft(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,Lt].indexOf(r)>=0?{x:l,y:s}:{x:s,y:l}}function L2(n){var e=n.state,t=n.options,r=n.name,o=t.offset,i=o===void 0?[0,0]:o,s=bf.reduce(function(u,d){return u[d]=R2(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 B2={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:L2};function P2(n){var e=n.state,t=n.name;e.modifiersData[t]=Af({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const F2={name:"popperOffsets",enabled:!0,phase:"read",fn:P2,data:{}};function V2(n){return n==="x"?"y":"x"}function $2(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,m=f===void 0?!0:f,h=t.tetherOffset,g=h===void 0?0:h,v=Zr(e,{boundary:a,rootBoundary:c,padding:d,altBoundary:u}),E=Ft(e.placement),k=xr(e.placement),w=!k,y=ja(E),R=V2(y),S=e.modifiersData.popperOffsets,B=e.rects.reference,$=e.rects.popper,F=typeof g=="function"?g(Object.assign({},e.rects,{placement:e.placement})):g,T=typeof F=="number"?{mainAxis:F,altAxis:F}:Object.assign({mainAxis:0,altAxis:0},F),P=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,L={x:0,y:0};if(S){if(i){var U,K=y==="y"?ht:mt,Y=y==="y"?Rt:Lt,Q=y==="y"?"height":"width",te=S[y],H=te+v[K],se=te-v[Y],de=m?-$[Q]/2:0,ge=k===vr?B[Q]:$[Q],Ee=k===vr?-$[Q]:-B[Q],ye=e.elements.arrow,we=m&&ye?Ha(ye):{width:0,height:0},ke=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:kf(),Te=ke[K],ve=ke[Y],O=Pr(0,B[Q],we[Q]),I=w?B[Q]/2-de-O-Te-T.mainAxis:ge-O-Te-T.mainAxis,C=w?-B[Q]/2+de+O+ve+T.mainAxis:Ee+O+ve+T.mainAxis,M=e.elements.arrow&&ao(e.elements.arrow),b=M?y==="y"?M.clientTop||0:M.clientLeft||0:0,x=(U=P==null?void 0:P[y])!=null?U:0,N=te+I-x-b,D=te+C-x,V=Pr(m?Wo(H,N):H,te,m?Wn(se,D):se);S[y]=V,L[y]=V-te}if(l){var z,j=y==="x"?ht:mt,G=y==="x"?Rt:Lt,W=S[R],J=R==="y"?"height":"width",X=W+v[j],q=W-v[G],ce=[ht,mt].indexOf(E)!==-1,me=(z=P==null?void 0:P[R])!=null?z:0,Oe=ce?X:W-B[J]-$[J]-me+T.altAxis,Pe=ce?W+B[J]+$[J]-me-T.altAxis:q,Be=m&&ce?c2(Oe,W,Pe):Pr(m?Oe:X,W,m?Pe:q);S[R]=Be,L[R]=Be-W}e.modifiersData[r]=L}}const z2={name:"preventOverflow",enabled:!0,phase:"main",fn:$2,requiresIfExists:["offset"]};function U2(n){return{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}}function H2(n){return n===St(n)||!Et(n)?Wa(n):U2(n)}function j2(n){var e=n.getBoundingClientRect(),t=yr(e.width)/n.offsetWidth||1,r=yr(e.height)/n.offsetHeight||1;return t!==1||r!==1}function W2(n,e,t){t===void 0&&(t=!1);var r=Et(e),o=Et(e)&&j2(e),i=In(e),s=br(n,o,t),l={scrollLeft:0,scrollTop:0},a={x:0,y:0};return(r||!r&&!t)&&((qt(e)!=="body"||Ga(i))&&(l=H2(e)),Et(e)?(a=br(e,!0),a.x+=e.clientLeft,a.y+=e.clientTop):i&&(a.x=Ka(i))),{x:s.left+l.scrollLeft-a.x,y:s.top+l.scrollTop-a.y,width:s.width,height:s.height}}function K2(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 G2(n){var e=K2(n);return Xs.reduce(function(t,r){return t.concat(e.filter(function(o){return o.phase===r}))},[])}function J2(n){var e;return function(){return e||(e=new Promise(function(t){Promise.resolve().then(function(){e=void 0,t(n())})})),e}}function pn(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 Dn='Popper: modifier "%s" provided an invalid %s property, expected %s but got %s',Y2='Popper: modifier "%s" requires "%s", but "%s" modifier is not available',Fc=["name","enabled","phase","fn","effect","requires","options"];function Q2(n){n.forEach(function(e){[].concat(Object.keys(e),Fc).filter(function(t,r,o){return o.indexOf(t)===r}).forEach(function(t){switch(t){case"name":typeof e.name!="string"&&console.error(pn(Dn,String(e.name),'"name"','"string"','"'+String(e.name)+'"'));break;case"enabled":typeof e.enabled!="boolean"&&console.error(pn(Dn,e.name,'"enabled"','"boolean"','"'+String(e.enabled)+'"'));break;case"phase":Xs.indexOf(e.phase)<0&&console.error(pn(Dn,e.name,'"phase"',"either "+Xs.join(", "),'"'+String(e.phase)+'"'));break;case"fn":typeof e.fn!="function"&&console.error(pn(Dn,e.name,'"fn"','"function"','"'+String(e.fn)+'"'));break;case"effect":e.effect!=null&&typeof e.effect!="function"&&console.error(pn(Dn,e.name,'"effect"','"function"','"'+String(e.fn)+'"'));break;case"requires":e.requires!=null&&!Array.isArray(e.requires)&&console.error(pn(Dn,e.name,'"requires"','"array"','"'+String(e.requires)+'"'));break;case"requiresIfExists":Array.isArray(e.requiresIfExists)||console.error(pn(Dn,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 '+Fc.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(pn(Y2,String(e.name),r,r))})})})}function X2(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 Z2(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 Vc="Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.",_2="Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.",$c={placement:"bottom",modifiers:[],strategy:"absolute"};function zc(){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 q2(n){n===void 0&&(n={});var e=n,t=e.defaultModifiers,r=t===void 0?[]:t,o=e.defaultOptions,i=o===void 0?$c:o;return function(l,a,c){c===void 0&&(c=i);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},$c,i),modifiersData:{},elements:{reference:l,popper:a},attributes:{},styles:{}},d=[],f=!1,m={state:u,setOptions:function(E){var k=typeof E=="function"?E(u.options):E;g(),u.options=Object.assign({},i,u.options,k),u.scrollParents={reference:Qn(l)?Fr(l):l.contextElement?Fr(l.contextElement):[],popper:Fr(a)};var w=G2(Z2([].concat(r,u.options.modifiers)));if(u.orderedModifiers=w.filter(function(P){return P.enabled}),process.env.NODE_ENV!=="production"){var y=X2([].concat(w,u.options.modifiers),function(P){var L=P.name;return L});if(Q2(y),Ft(u.options.placement)===$i){var R=u.orderedModifiers.find(function(P){var L=P.name;return L==="flip"});R||console.error(['Popper: "auto" placements require the "flip" modifier be',"present and enabled to work."].join(" "))}var S=$t(a),B=S.marginTop,$=S.marginRight,F=S.marginBottom,T=S.marginLeft;[B,$,F,T].some(function(P){return parseFloat(P)})&&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 h(),m.update()},forceUpdate:function(){if(!f){var E=u.elements,k=E.reference,w=E.popper;if(!zc(k,w)){process.env.NODE_ENV!=="production"&&console.error(Vc);return}u.rects={reference:W2(k,ao(w),u.options.strategy==="fixed"),popper:Ha(w)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(P){return u.modifiersData[P.name]=Object.assign({},P.data)});for(var y=0,R=0;R<u.orderedModifiers.length;R++){if(process.env.NODE_ENV!=="production"&&(y+=1,y>100)){console.error(_2);break}if(u.reset===!0){u.reset=!1,R=-1;continue}var S=u.orderedModifiers[R],B=S.fn,$=S.options,F=$===void 0?{}:$,T=S.name;typeof B=="function"&&(u=B({state:u,options:F,name:T,instance:m})||u)}}},update:J2(function(){return new Promise(function(v){m.forceUpdate(),v(u)})}),destroy:function(){g(),f=!0}};if(!zc(l,a))return process.env.NODE_ENV!=="production"&&console.error(Vc),m;m.setOptions(c).then(function(v){!f&&c.onFirstUpdate&&c.onFirstUpdate(v)});function h(){u.orderedModifiers.forEach(function(v){var E=v.name,k=v.options,w=k===void 0?{}:k,y=v.effect;if(typeof y=="function"){var R=y({state:u,name:E,instance:m,options:w}),S=function(){};d.push(R||S)}})}function g(){d.forEach(function(v){return v()}),d=[]}return m}}var eb=[b2,F2,v2,xf,B2,I2,z2,p2,D2],tb=q2({defaultModifiers:eb}),nb="tippy-box",Of="tippy-content",rb="tippy-backdrop",Mf="tippy-arrow",If="tippy-svg-arrow",Rn={passive:!0,capture:!0},Nf=function(){return document.body};function ob(n,e){return{}.hasOwnProperty.call(n,e)}function hs(n,e,t){if(Array.isArray(n)){var r=n[e];return r??(Array.isArray(t)?t[e]:t)}return n}function Ja(n,e){var t={}.toString.call(n);return t.indexOf("[object")===0&&t.indexOf(e+"]")>-1}function Df(n,e){return typeof n=="function"?n.apply(void 0,e):n}function Uc(n,e){if(e===0)return n;var t;return function(r){clearTimeout(t),t=setTimeout(function(){n(r)},e)}}function ib(n,e){var t=Object.assign({},n);return e.forEach(function(r){delete t[r]}),t}function sb(n){return n.split(/\s+/).filter(Boolean)}function or(n){return[].concat(n)}function Hc(n,e){n.indexOf(e)===-1&&n.push(e)}function ab(n){return n.filter(function(e,t){return n.indexOf(e)===t})}function lb(n){return n.split("-")[0]}function Ko(n){return[].slice.call(n)}function jc(n){return Object.keys(n).reduce(function(e,t){return n[t]!==void 0&&(e[t]=n[t]),e},{})}function Vr(){return document.createElement("div")}function _r(n){return["Element","Fragment"].some(function(e){return Ja(n,e)})}function cb(n){return Ja(n,"NodeList")}function ub(n){return Ja(n,"MouseEvent")}function db(n){return!!(n&&n._tippy&&n._tippy.reference===n)}function fb(n){return _r(n)?[n]:cb(n)?Ko(n):Array.isArray(n)?n:Ko(document.querySelectorAll(n))}function ms(n,e){n.forEach(function(t){t&&(t.style.transitionDuration=e+"ms")})}function Wc(n,e){n.forEach(function(t){t&&t.setAttribute("data-state",e)})}function pb(n){var e,t=or(n),r=t[0];return r!=null&&(e=r.ownerDocument)!=null&&e.body?r.ownerDocument:document}function hb(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=lb(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,m=c==="right"?u.left.x:0,h=c==="left"?u.right.x:0,g=i.top-r+d>a,v=r-i.bottom-f>a,E=i.left-t+m>a,k=t-i.right-h>a;return g||v||E||k})}function gs(n,e,t){var r=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(o){n[r](o,t)})}function Kc(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 Gt={isTouch:!1},Gc=0;function mb(){Gt.isTouch||(Gt.isTouch=!0,window.performance&&document.addEventListener("mousemove",Rf))}function Rf(){var n=performance.now();n-Gc<20&&(Gt.isTouch=!1,document.removeEventListener("mousemove",Rf)),Gc=n}function gb(){var n=document.activeElement;if(db(n)){var e=n._tippy;n.blur&&!e.state.isVisible&&n.blur()}}function vb(){document.addEventListener("touchstart",mb,Rn),window.addEventListener("blur",gb)}var yb=typeof window<"u"&&typeof document<"u",bb=yb?!!window.msCrypto:!1;function er(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 Jc(n){var e=/[ \t]{2,}/g,t=/^[ \t]*/gm;return n.replace(e," ").replace(t,"").trim()}function xb(n){return Jc(`
103
103
  %ctippy.js
104
104
 
105
- %c`+dd(n)+`
105
+ %c`+Jc(n)+`
106
106
 
107
107
  %c👷‍ This is a development-only message. It will be removed in production.
108
- `)}function wp(n){return[fS(n),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}var Ii;process.env.NODE_ENV!=="production"&&hS();function hS(){Ii=new Set}function pn(n,e){if(n&&!Ii.has(e)){var t;Ii.add(e),(t=console).warn.apply(t,wp(e))}}function sl(n,e){if(n&&!Ii.has(e)){var t;Ii.add(e),(t=console).error.apply(t,wp(e))}}function pS(n){var e=!n,t=Object.prototype.toString.call(n)==="[object Object]"&&!n.addEventListener;sl(e,["tippy() was passed","`"+String(n)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),sl(t,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}var kp={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},mS={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},Ct=Object.assign({appendTo:Tp,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},kp,mS),gS=Object.keys(Ct),vS=function(e){process.env.NODE_ENV!=="production"&&Mp(e,[]);var t=Object.keys(e);t.forEach(function(r){Ct[r]=e[r]})};function Op(n){var e=n.plugins||[],t=e.reduce(function(r,i){var o=i.name,s=i.defaultValue;if(o){var l;r[o]=n[o]!==void 0?n[o]:(l=Ct[o])!=null?l:s}return r},{});return Object.assign({},n,t)}function yS(n,e){var t=e?Object.keys(Op(Object.assign({},Ct,{plugins:e}))):gS,r=t.reduce(function(i,o){var s=(n.getAttribute("data-tippy-"+o)||"").trim();if(!s)return i;if(o==="content")i[o]=s;else try{i[o]=JSON.parse(s)}catch{i[o]=s}return i},{});return r}function fd(n,e){var t=Object.assign({},e,{content:xp(e.content,[n])},e.ignoreAttributes?{}:yS(n,e.plugins));return t.aria=Object.assign({},Ct.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 Mp(n,e){n===void 0&&(n={}),e===void 0&&(e=[]);var t=Object.keys(n);t.forEach(function(r){var i=Q2(Ct,Object.keys(kp)),o=!X2(i,r);o&&(o=e.filter(function(s){return s.name===r}).length===0),pn(o,["`"+r+"`","is not a valid prop. You may have spelled it incorrectly, or if it's","a plugin, forgot to pass it in an array as props.plugins.",`
108
+ `)}function Lf(n){return[xb(n),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}var qr;process.env.NODE_ENV!=="production"&&Eb();function Eb(){qr=new Set}function sn(n,e){if(n&&!qr.has(e)){var t;qr.add(e),(t=console).warn.apply(t,Lf(e))}}function qs(n,e){if(n&&!qr.has(e)){var t;qr.add(e),(t=console).error.apply(t,Lf(e))}}function Sb(n){var e=!n,t=Object.prototype.toString.call(n)==="[object Object]"&&!n.addEventListener;qs(e,["tippy() was passed","`"+String(n)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),qs(t,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}var Bf={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},kb={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},xt=Object.assign({appendTo:Nf,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},Bf,kb),Cb=Object.keys(xt),wb=function(e){process.env.NODE_ENV!=="production"&&Ff(e,[]);var t=Object.keys(e);t.forEach(function(r){xt[r]=e[r]})};function Pf(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=xt[i])!=null?l:s}return r},{});return Object.assign({},n,t)}function Tb(n,e){var t=e?Object.keys(Pf(Object.assign({},xt,{plugins:e}))):Cb,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 Yc(n,e){var t=Object.assign({},e,{content:Df(e.content,[n])},e.ignoreAttributes?{}:Tb(n,e.plugins));return t.aria=Object.assign({},xt.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 Ff(n,e){n===void 0&&(n={}),e===void 0&&(e=[]);var t=Object.keys(n);t.forEach(function(r){var o=ib(xt,Object.keys(Bf)),i=!ob(o,r);i&&(i=e.filter(function(s){return s.name===r}).length===0),sn(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 bS=function(){return"innerHTML"};function al(n,e){n[bS()]=e}function hd(n){var e=vi();return n===!0?e.className=Sp:(e.className=Cp,Ni(n)?e.appendChild(n):al(e,n)),e}function pd(n,e){Ni(e.content)?(al(n,""),n.appendChild(e.content)):typeof e.content!="function"&&(e.allowHTML?al(n,e.content):n.textContent=e.content)}function ll(n){var e=n.firstElementChild,t=_o(e.children);return{box:e,content:t.find(function(r){return r.classList.contains(Ep)}),arrow:t.find(function(r){return r.classList.contains(Sp)||r.classList.contains(Cp)}),backdrop:t.find(function(r){return r.classList.contains(J2)})}}function Np(n){var e=vi(),t=vi();t.className=Y2,t.setAttribute("data-state","hidden"),t.setAttribute("tabindex","-1");var r=vi();r.className=Ep,r.setAttribute("data-state","hidden"),pd(r,n.props),e.appendChild(t),t.appendChild(r),i(n.props,n.props);function i(o,s){var l=ll(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"),(o.content!==s.content||o.allowHTML!==s.allowHTML)&&pd(c,n.props),s.arrow?u?o.arrow!==s.arrow&&(a.removeChild(u),a.appendChild(hd(s.arrow))):a.appendChild(hd(s.arrow)):u&&a.removeChild(u)}return{popper:e,onUpdate:i}}Np.$$tippy=!0;var ES=1,Qi=[],ga=[];function SS(n,e){var t=fd(n,Object.assign({},Ct,Op(ad(e)))),r,i,o,s=!1,l=!1,a=!1,c=!1,u,d,f,p=[],h=od(N,t.interactiveDebounce),g,v=ES++,S=null,T=q2(t.plugins),x={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},b={id:v,reference:n,popper:vi(),popperInstance:S,props:t,state:x,plugins:T,clearDelayTimeouts:Ne,setProps:Fe,setContent:Be,show:Ie,hide:We,hideWithInteractivity:mt,enable:ue,disable:ge,unmount:tt,destroy:Sn};if(!t.render)return process.env.NODE_ENV!=="production"&&sl(!0,"render() function has not been supplied."),b;var D=t.render(b),A=D.popper,B=D.onUpdate;A.setAttribute("data-tippy-root",""),A.id="tippy-"+b.id,b.popper=A,n._tippy=b,A._tippy=b;var $=T.map(function(J){return J.fn(b)}),V=n.hasAttribute("aria-expanded");return O(),fe(),ie(),j("onCreate",[b]),t.showOnCreate&&G(),A.addEventListener("mouseenter",function(){b.props.interactive&&b.state.isVisible&&b.clearDelayTimeouts()}),A.addEventListener("mouseleave",function(){b.props.interactive&&b.props.trigger.indexOf("mouseenter")>=0&&Y().addEventListener("mousemove",h)}),b;function F(){var J=b.props.touch;return Array.isArray(J)?J:[J,0]}function P(){return F()[0]==="hold"}function _(){var J;return!!((J=b.props.render)!=null&&J.$$tippy)}function H(){return g||n}function Y(){var J=H().parentNode;return J?oS(J):document}function X(){return ll(A)}function Q(J){return b.state.isMounted&&!b.state.isVisible||qt.isTouch||u&&u.type==="focus"?0:ha(b.props.delay,J?0:1,Ct.delay)}function ie(J){J===void 0&&(J=!1),A.style.pointerEvents=b.props.interactive&&!J?"":"none",A.style.zIndex=""+b.props.zIndex}function j(J,ae,le){if(le===void 0&&(le=!0),$.forEach(function(xe){xe[J]&&xe[J].apply(xe,ae)}),le){var Se;(Se=b.props)[J].apply(Se,ae)}}function ce(){var J=b.props.aria;if(J.content){var ae="aria-"+J.content,le=A.id,Se=kr(b.props.triggerTarget||n);Se.forEach(function(xe){var $e=xe.getAttribute(ae);if(b.state.isVisible)xe.setAttribute(ae,$e?$e+" "+le:le);else{var He=$e&&$e.replace(le,"").trim();He?xe.setAttribute(ae,He):xe.removeAttribute(ae)}})}}function fe(){if(!(V||!b.props.aria.expanded)){var J=kr(b.props.triggerTarget||n);J.forEach(function(ae){b.props.interactive?ae.setAttribute("aria-expanded",b.state.isVisible&&ae===H()?"true":"false"):ae.removeAttribute("aria-expanded")})}}function be(){Y().removeEventListener("mousemove",h),Qi=Qi.filter(function(J){return J!==h})}function Te(J){if(!(qt.isTouch&&(a||J.type==="mousedown"))){var ae=J.composedPath&&J.composedPath()[0]||J.target;if(!(b.props.interactive&&cd(A,ae))){if(kr(b.props.triggerTarget||n).some(function(le){return cd(le,ae)})){if(qt.isTouch||b.state.isVisible&&b.props.trigger.indexOf("click")>=0)return}else j("onClickOutside",[b,J]);b.props.hideOnClick===!0&&(b.clearDelayTimeouts(),b.hide(),l=!0,setTimeout(function(){l=!1}),b.state.isMounted||Oe())}}}function Ee(){a=!0}function ke(){a=!1}function Ae(){var J=Y();J.addEventListener("mousedown",Te,!0),J.addEventListener("touchend",Te,Jn),J.addEventListener("touchstart",ke,Jn),J.addEventListener("touchmove",Ee,Jn)}function Oe(){var J=Y();J.removeEventListener("mousedown",Te,!0),J.removeEventListener("touchend",Te,Jn),J.removeEventListener("touchstart",ke,Jn),J.removeEventListener("touchmove",Ee,Jn)}function ve(J,ae){M(J,function(){!b.state.isVisible&&A.parentNode&&A.parentNode.contains(A)&&ae()})}function k(J,ae){M(J,ae)}function M(J,ae){var le=X().box;function Se(xe){xe.target===le&&(ma(le,"remove",Se),ae())}if(J===0)return ae();ma(le,"remove",d),ma(le,"add",Se),d=Se}function C(J,ae,le){le===void 0&&(le=!1);var Se=kr(b.props.triggerTarget||n);Se.forEach(function(xe){xe.addEventListener(J,ae,le),p.push({node:xe,eventType:J,handler:ae,options:le})})}function O(){P()&&(C("touchstart",E,{passive:!0}),C("touchend",I,{passive:!0})),Z2(b.props.trigger).forEach(function(J){if(J!=="manual")switch(C(J,E),J){case"mouseenter":C("mouseleave",I);break;case"focus":C(dS?"focusout":"blur",R);break;case"focusin":C("focusout",R);break}})}function y(){p.forEach(function(J){var ae=J.node,le=J.eventType,Se=J.handler,xe=J.options;ae.removeEventListener(le,Se,xe)}),p=[]}function E(J){var ae,le=!1;if(!(!b.state.isEnabled||L(J)||l)){var Se=((ae=u)==null?void 0:ae.type)==="focus";u=J,g=J.currentTarget,fe(),!b.state.isVisible&&nS(J)&&Qi.forEach(function(xe){return xe(J)}),J.type==="click"&&(b.props.trigger.indexOf("mouseenter")<0||s)&&b.props.hideOnClick!==!1&&b.state.isVisible?le=!0:G(J),J.type==="click"&&(s=!le),le&&!Se&&q(J)}}function N(J){var ae=J.target,le=H().contains(ae)||A.contains(ae);if(!(J.type==="mousemove"&&le)){var Se=K().concat(A).map(function(xe){var $e,He=xe._tippy,ot=($e=He.popperInstance)==null?void 0:$e.state;return ot?{popperRect:xe.getBoundingClientRect(),popperState:ot,props:t}:null}).filter(Boolean);sS(Se,J)&&(be(),q(J))}}function I(J){var ae=L(J)||b.props.trigger.indexOf("click")>=0&&s;if(!ae){if(b.props.interactive){b.hideWithInteractivity(J);return}q(J)}}function R(J){b.props.trigger.indexOf("focusin")<0&&J.target!==H()||b.props.interactive&&J.relatedTarget&&A.contains(J.relatedTarget)||q(J)}function L(J){return qt.isTouch?P()!==J.type.indexOf("touch")>=0:!1}function z(){W();var J=b.props,ae=J.popperOptions,le=J.placement,Se=J.offset,xe=J.getReferenceClientRect,$e=J.moveTransition,He=_()?ll(A).arrow:null,ot=xe?{getBoundingClientRect:xe,contextElement:xe.contextElement||H()}:n,st={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(Cn){var Et=Cn.state;if(_()){var kt=X(),vr=kt.box;["placement","reference-hidden","escaped"].forEach(function(Ot){Ot==="placement"?vr.setAttribute("data-placement",Et.placement):Et.attributes.popper["data-popper-"+Ot]?vr.setAttribute("data-"+Ot,""):vr.removeAttribute("data-"+Ot)}),Et.attributes.popper={}}}},Qe=[{name:"offset",options:{offset:Se}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!$e}},st];_()&&He&&Qe.push({name:"arrow",options:{element:He,padding:3}}),Qe.push.apply(Qe,(ae==null?void 0:ae.modifiers)||[]),b.popperInstance=Ps(ot,A,Object.assign({},ae,{placement:le,onFirstUpdate:f,modifiers:Qe}))}function W(){b.popperInstance&&(b.popperInstance.destroy(),b.popperInstance=null)}function U(){var J=b.props.appendTo,ae,le=H();b.props.interactive&&J===Tp||J==="parent"?ae=le.parentNode:ae=xp(J,[le]),ae.contains(A)||ae.appendChild(A),b.state.isMounted=!0,z(),process.env.NODE_ENV!=="production"&&pn(b.props.interactive&&J===Ct.appendTo&&le.nextElementSibling!==A,["Interactive tippy element may not be accessible via keyboard","navigation because it is not directly after the reference element","in the DOM source order.",`
111
+ `,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var Ab=function(){return"innerHTML"};function ea(n,e){n[Ab()]=e}function Qc(n){var e=Vr();return n===!0?e.className=Mf:(e.className=If,_r(n)?e.appendChild(n):ea(e,n)),e}function Xc(n,e){_r(e.content)?(ea(n,""),n.appendChild(e.content)):typeof e.content!="function"&&(e.allowHTML?ea(n,e.content):n.textContent=e.content)}function ta(n){var e=n.firstElementChild,t=Ko(e.children);return{box:e,content:t.find(function(r){return r.classList.contains(Of)}),arrow:t.find(function(r){return r.classList.contains(Mf)||r.classList.contains(If)}),backdrop:t.find(function(r){return r.classList.contains(rb)})}}function Vf(n){var e=Vr(),t=Vr();t.className=nb,t.setAttribute("data-state","hidden"),t.setAttribute("tabindex","-1");var r=Vr();r.className=Of,r.setAttribute("data-state","hidden"),Xc(r,n.props),e.appendChild(t),t.appendChild(r),o(n.props,n.props);function o(i,s){var l=ta(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)&&Xc(c,n.props),s.arrow?u?i.arrow!==s.arrow&&(a.removeChild(u),a.appendChild(Qc(s.arrow))):a.appendChild(Qc(s.arrow)):u&&a.removeChild(u)}return{popper:e,onUpdate:o}}Vf.$$tippy=!0;var Ob=1,mo=[],vs=[];function Mb(n,e){var t=Yc(n,Object.assign({},xt,Pf(jc(e)))),r,o,i,s=!1,l=!1,a=!1,c=!1,u,d,f,m=[],h=Uc(N,t.interactiveDebounce),g,v=Ob++,E=null,k=ab(t.plugins),w={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},y={id:v,reference:n,popper:Vr(),popperInstance:E,props:t,state:w,plugins:k,clearDelayTimeouts:Oe,setProps:Pe,setContent:Be,show:Me,hide:We,hideWithInteractivity:dt,enable:ce,disable:me,unmount:qe,destroy:dn};if(!t.render)return process.env.NODE_ENV!=="production"&&qs(!0,"render() function has not been supplied."),y;var R=t.render(y),S=R.popper,B=R.onUpdate;S.setAttribute("data-tippy-root",""),S.id="tippy-"+y.id,y.popper=S,n._tippy=y,S._tippy=y;var $=k.map(function(Z){return Z.fn(y)}),F=n.hasAttribute("aria-expanded");return M(),de(),te(),H("onCreate",[y]),t.showOnCreate&&X(),S.addEventListener("mouseenter",function(){y.props.interactive&&y.state.isVisible&&y.clearDelayTimeouts()}),S.addEventListener("mouseleave",function(){y.props.interactive&&y.props.trigger.indexOf("mouseenter")>=0&&K().addEventListener("mousemove",h)}),y;function T(){var Z=y.props.touch;return Array.isArray(Z)?Z:[Z,0]}function P(){return T()[0]==="hold"}function L(){var Z;return!!((Z=y.props.render)!=null&&Z.$$tippy)}function U(){return g||n}function K(){var Z=U().parentNode;return Z?pb(Z):document}function Y(){return ta(S)}function Q(Z){return y.state.isMounted&&!y.state.isVisible||Gt.isTouch||u&&u.type==="focus"?0:hs(y.props.delay,Z?0:1,xt.delay)}function te(Z){Z===void 0&&(Z=!1),S.style.pointerEvents=y.props.interactive&&!Z?"":"none",S.style.zIndex=""+y.props.zIndex}function H(Z,ae,le){if(le===void 0&&(le=!0),$.forEach(function(Se){Se[Z]&&Se[Z].apply(Se,ae)}),le){var be;(be=y.props)[Z].apply(be,ae)}}function se(){var Z=y.props.aria;if(Z.content){var ae="aria-"+Z.content,le=S.id,be=or(y.props.triggerTarget||n);be.forEach(function(Se){var Fe=Se.getAttribute(ae);if(y.state.isVisible)Se.setAttribute(ae,Fe?Fe+" "+le:le);else{var ze=Fe&&Fe.replace(le,"").trim();ze?Se.setAttribute(ae,ze):Se.removeAttribute(ae)}})}}function de(){if(!(F||!y.props.aria.expanded)){var Z=or(y.props.triggerTarget||n);Z.forEach(function(ae){y.props.interactive?ae.setAttribute("aria-expanded",y.state.isVisible&&ae===U()?"true":"false"):ae.removeAttribute("aria-expanded")})}}function ge(){K().removeEventListener("mousemove",h),mo=mo.filter(function(Z){return Z!==h})}function Ee(Z){if(!(Gt.isTouch&&(a||Z.type==="mousedown"))){var ae=Z.composedPath&&Z.composedPath()[0]||Z.target;if(!(y.props.interactive&&Kc(S,ae))){if(or(y.props.triggerTarget||n).some(function(le){return Kc(le,ae)})){if(Gt.isTouch||y.state.isVisible&&y.props.trigger.indexOf("click")>=0)return}else H("onClickOutside",[y,Z]);y.props.hideOnClick===!0&&(y.clearDelayTimeouts(),y.hide(),l=!0,setTimeout(function(){l=!1}),y.state.isMounted||Te())}}}function ye(){a=!0}function we(){a=!1}function ke(){var Z=K();Z.addEventListener("mousedown",Ee,!0),Z.addEventListener("touchend",Ee,Rn),Z.addEventListener("touchstart",we,Rn),Z.addEventListener("touchmove",ye,Rn)}function Te(){var Z=K();Z.removeEventListener("mousedown",Ee,!0),Z.removeEventListener("touchend",Ee,Rn),Z.removeEventListener("touchstart",we,Rn),Z.removeEventListener("touchmove",ye,Rn)}function ve(Z,ae){I(Z,function(){!y.state.isVisible&&S.parentNode&&S.parentNode.contains(S)&&ae()})}function O(Z,ae){I(Z,ae)}function I(Z,ae){var le=Y().box;function be(Se){Se.target===le&&(gs(le,"remove",be),ae())}if(Z===0)return ae();gs(le,"remove",d),gs(le,"add",be),d=be}function C(Z,ae,le){le===void 0&&(le=!1);var be=or(y.props.triggerTarget||n);be.forEach(function(Se){Se.addEventListener(Z,ae,le),m.push({node:Se,eventType:Z,handler:ae,options:le})})}function M(){P()&&(C("touchstart",x,{passive:!0}),C("touchend",D,{passive:!0})),sb(y.props.trigger).forEach(function(Z){if(Z!=="manual")switch(C(Z,x),Z){case"mouseenter":C("mouseleave",D);break;case"focus":C(bb?"focusout":"blur",V);break;case"focusin":C("focusout",V);break}})}function b(){m.forEach(function(Z){var ae=Z.node,le=Z.eventType,be=Z.handler,Se=Z.options;ae.removeEventListener(le,be,Se)}),m=[]}function x(Z){var ae,le=!1;if(!(!y.state.isEnabled||z(Z)||l)){var be=((ae=u)==null?void 0:ae.type)==="focus";u=Z,g=Z.currentTarget,de(),!y.state.isVisible&&ub(Z)&&mo.forEach(function(Se){return Se(Z)}),Z.type==="click"&&(y.props.trigger.indexOf("mouseenter")<0||s)&&y.props.hideOnClick!==!1&&y.state.isVisible?le=!0:X(Z),Z.type==="click"&&(s=!le),le&&!be&&q(Z)}}function N(Z){var ae=Z.target,le=U().contains(ae)||S.contains(ae);if(!(Z.type==="mousemove"&&le)){var be=J().concat(S).map(function(Se){var Fe,ze=Se._tippy,rt=(Fe=ze.popperInstance)==null?void 0:Fe.state;return rt?{popperRect:Se.getBoundingClientRect(),popperState:rt,props:t}:null}).filter(Boolean);hb(be,Z)&&(ge(),q(Z))}}function D(Z){var ae=z(Z)||y.props.trigger.indexOf("click")>=0&&s;if(!ae){if(y.props.interactive){y.hideWithInteractivity(Z);return}q(Z)}}function V(Z){y.props.trigger.indexOf("focusin")<0&&Z.target!==U()||y.props.interactive&&Z.relatedTarget&&S.contains(Z.relatedTarget)||q(Z)}function z(Z){return Gt.isTouch?P()!==Z.type.indexOf("touch")>=0:!1}function j(){G();var Z=y.props,ae=Z.popperOptions,le=Z.placement,be=Z.offset,Se=Z.getReferenceClientRect,Fe=Z.moveTransition,ze=L()?ta(S).arrow:null,rt=Se?{getBoundingClientRect:Se,contextElement:Se.contextElement||U()}:n,ot={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(fn){var vt=fn.state;if(L()){var kt=Y(),Zn=kt.box;["placement","reference-hidden","escaped"].forEach(function(Ct){Ct==="placement"?Zn.setAttribute("data-placement",vt.placement):vt.attributes.popper["data-popper-"+Ct]?Zn.setAttribute("data-"+Ct,""):Zn.removeAttribute("data-"+Ct)}),vt.attributes.popper={}}}},Qe=[{name:"offset",options:{offset:be}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!Fe}},ot];L()&&ze&&Qe.push({name:"arrow",options:{element:ze,padding:3}}),Qe.push.apply(Qe,(ae==null?void 0:ae.modifiers)||[]),y.popperInstance=tb(rt,S,Object.assign({},ae,{placement:le,onFirstUpdate:f,modifiers:Qe}))}function G(){y.popperInstance&&(y.popperInstance.destroy(),y.popperInstance=null)}function W(){var Z=y.props.appendTo,ae,le=U();y.props.interactive&&Z===Nf||Z==="parent"?ae=le.parentNode:ae=Df(Z,[le]),ae.contains(S)||ae.appendChild(S),y.state.isMounted=!0,j(),process.env.NODE_ENV!=="production"&&sn(y.props.interactive&&Z===xt.appendTo&&le.nextElementSibling!==S,["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 K(){return _o(A.querySelectorAll("[data-tippy-root]"))}function G(J){b.clearDelayTimeouts(),J&&j("onTrigger",[b,J]),Ae();var ae=Q(!0),le=F(),Se=le[0],xe=le[1];qt.isTouch&&Se==="hold"&&xe&&(ae=xe),ae?r=setTimeout(function(){b.show()},ae):b.show()}function q(J){if(b.clearDelayTimeouts(),j("onUntrigger",[b,J]),!b.state.isVisible){Oe();return}if(!(b.props.trigger.indexOf("mouseenter")>=0&&b.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(J.type)>=0&&s)){var ae=Q(!1);ae?i=setTimeout(function(){b.state.isVisible&&b.hide()},ae):o=requestAnimationFrame(function(){b.hide()})}}function ue(){b.state.isEnabled=!0}function ge(){b.hide(),b.state.isEnabled=!1}function Ne(){clearTimeout(r),clearTimeout(i),cancelAnimationFrame(o)}function Fe(J){if(process.env.NODE_ENV!=="production"&&pn(b.state.isDestroyed,Er("setProps")),!b.state.isDestroyed){j("onBeforeUpdate",[b,J]),y();var ae=b.props,le=fd(n,Object.assign({},ae,ad(J),{ignoreAttributes:!0}));b.props=le,O(),ae.interactiveDebounce!==le.interactiveDebounce&&(be(),h=od(N,le.interactiveDebounce)),ae.triggerTarget&&!le.triggerTarget?kr(ae.triggerTarget).forEach(function(Se){Se.removeAttribute("aria-expanded")}):le.triggerTarget&&n.removeAttribute("aria-expanded"),fe(),ie(),B&&B(ae,le),b.popperInstance&&(z(),K().forEach(function(Se){requestAnimationFrame(Se._tippy.popperInstance.forceUpdate)})),j("onAfterUpdate",[b,J])}}function Be(J){b.setProps({content:J})}function Ie(){process.env.NODE_ENV!=="production"&&pn(b.state.isDestroyed,Er("show"));var J=b.state.isVisible,ae=b.state.isDestroyed,le=!b.state.isEnabled,Se=qt.isTouch&&!b.props.touch,xe=ha(b.props.duration,0,Ct.duration);if(!(J||ae||le||Se)&&!H().hasAttribute("disabled")&&(j("onShow",[b],!1),b.props.onShow(b)!==!1)){if(b.state.isVisible=!0,_()&&(A.style.visibility="visible"),ie(),Ae(),b.state.isMounted||(A.style.transition="none"),_()){var $e=X(),He=$e.box,ot=$e.content;pa([He,ot],0)}f=function(){var Qe;if(!(!b.state.isVisible||c)){if(c=!0,A.offsetHeight,A.style.transition=b.props.moveTransition,_()&&b.props.animation){var Yt=X(),Cn=Yt.box,Et=Yt.content;pa([Cn,Et],xe),ld([Cn,Et],"visible")}ce(),fe(),sd(ga,b),(Qe=b.popperInstance)==null||Qe.forceUpdate(),j("onMount",[b]),b.props.animation&&_()&&k(xe,function(){b.state.isShown=!0,j("onShown",[b])})}},U()}}function We(){process.env.NODE_ENV!=="production"&&pn(b.state.isDestroyed,Er("hide"));var J=!b.state.isVisible,ae=b.state.isDestroyed,le=!b.state.isEnabled,Se=ha(b.props.duration,1,Ct.duration);if(!(J||ae||le)&&(j("onHide",[b],!1),b.props.onHide(b)!==!1)){if(b.state.isVisible=!1,b.state.isShown=!1,c=!1,s=!1,_()&&(A.style.visibility="hidden"),be(),Oe(),ie(!0),_()){var xe=X(),$e=xe.box,He=xe.content;b.props.animation&&(pa([$e,He],Se),ld([$e,He],"hidden"))}ce(),fe(),b.props.animation?_()&&ve(Se,b.unmount):b.unmount()}}function mt(J){process.env.NODE_ENV!=="production"&&pn(b.state.isDestroyed,Er("hideWithInteractivity")),Y().addEventListener("mousemove",h),sd(Qi,h),h(J)}function tt(){process.env.NODE_ENV!=="production"&&pn(b.state.isDestroyed,Er("unmount")),b.state.isVisible&&b.hide(),b.state.isMounted&&(W(),K().forEach(function(J){J._tippy.unmount()}),A.parentNode&&A.parentNode.removeChild(A),ga=ga.filter(function(J){return J!==b}),b.state.isMounted=!1,j("onHidden",[b]))}function Sn(){process.env.NODE_ENV!=="production"&&pn(b.state.isDestroyed,Er("destroy")),!b.state.isDestroyed&&(b.clearDelayTimeouts(),b.unmount(),y(),delete n._tippy,b.state.isDestroyed=!0,j("onDestroy",[b]))}}function qr(n,e){e===void 0&&(e={});var t=Ct.plugins.concat(e.plugins||[]);process.env.NODE_ENV!=="production"&&(pS(n),Mp(e,t)),cS();var r=Object.assign({},e,{plugins:t}),i=iS(n);if(process.env.NODE_ENV!=="production"){var o=Ni(r.content),s=i.length>1;pn(o&&s,["tippy() was passed an Element as the `content` prop, but more than","one tippy instance was created by this invocation. This means the","content element will only be appended to the last tippy instance.",`
117
+ `,"See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "))}function J(){return Ko(S.querySelectorAll("[data-tippy-root]"))}function X(Z){y.clearDelayTimeouts(),Z&&H("onTrigger",[y,Z]),ke();var ae=Q(!0),le=T(),be=le[0],Se=le[1];Gt.isTouch&&be==="hold"&&Se&&(ae=Se),ae?r=setTimeout(function(){y.show()},ae):y.show()}function q(Z){if(y.clearDelayTimeouts(),H("onUntrigger",[y,Z]),!y.state.isVisible){Te();return}if(!(y.props.trigger.indexOf("mouseenter")>=0&&y.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(Z.type)>=0&&s)){var ae=Q(!1);ae?o=setTimeout(function(){y.state.isVisible&&y.hide()},ae):i=requestAnimationFrame(function(){y.hide()})}}function ce(){y.state.isEnabled=!0}function me(){y.hide(),y.state.isEnabled=!1}function Oe(){clearTimeout(r),clearTimeout(o),cancelAnimationFrame(i)}function Pe(Z){if(process.env.NODE_ENV!=="production"&&sn(y.state.isDestroyed,er("setProps")),!y.state.isDestroyed){H("onBeforeUpdate",[y,Z]),b();var ae=y.props,le=Yc(n,Object.assign({},ae,jc(Z),{ignoreAttributes:!0}));y.props=le,M(),ae.interactiveDebounce!==le.interactiveDebounce&&(ge(),h=Uc(N,le.interactiveDebounce)),ae.triggerTarget&&!le.triggerTarget?or(ae.triggerTarget).forEach(function(be){be.removeAttribute("aria-expanded")}):le.triggerTarget&&n.removeAttribute("aria-expanded"),de(),te(),B&&B(ae,le),y.popperInstance&&(j(),J().forEach(function(be){requestAnimationFrame(be._tippy.popperInstance.forceUpdate)})),H("onAfterUpdate",[y,Z])}}function Be(Z){y.setProps({content:Z})}function Me(){process.env.NODE_ENV!=="production"&&sn(y.state.isDestroyed,er("show"));var Z=y.state.isVisible,ae=y.state.isDestroyed,le=!y.state.isEnabled,be=Gt.isTouch&&!y.props.touch,Se=hs(y.props.duration,0,xt.duration);if(!(Z||ae||le||be)&&!U().hasAttribute("disabled")&&(H("onShow",[y],!1),y.props.onShow(y)!==!1)){if(y.state.isVisible=!0,L()&&(S.style.visibility="visible"),te(),ke(),y.state.isMounted||(S.style.transition="none"),L()){var Fe=Y(),ze=Fe.box,rt=Fe.content;ms([ze,rt],0)}f=function(){var Qe;if(!(!y.state.isVisible||c)){if(c=!0,S.offsetHeight,S.style.transition=y.props.moveTransition,L()&&y.props.animation){var Ut=Y(),fn=Ut.box,vt=Ut.content;ms([fn,vt],Se),Wc([fn,vt],"visible")}se(),de(),Hc(vs,y),(Qe=y.popperInstance)==null||Qe.forceUpdate(),H("onMount",[y]),y.props.animation&&L()&&O(Se,function(){y.state.isShown=!0,H("onShown",[y])})}},W()}}function We(){process.env.NODE_ENV!=="production"&&sn(y.state.isDestroyed,er("hide"));var Z=!y.state.isVisible,ae=y.state.isDestroyed,le=!y.state.isEnabled,be=hs(y.props.duration,1,xt.duration);if(!(Z||ae||le)&&(H("onHide",[y],!1),y.props.onHide(y)!==!1)){if(y.state.isVisible=!1,y.state.isShown=!1,c=!1,s=!1,L()&&(S.style.visibility="hidden"),ge(),Te(),te(!0),L()){var Se=Y(),Fe=Se.box,ze=Se.content;y.props.animation&&(ms([Fe,ze],be),Wc([Fe,ze],"hidden"))}se(),de(),y.props.animation?L()&&ve(be,y.unmount):y.unmount()}}function dt(Z){process.env.NODE_ENV!=="production"&&sn(y.state.isDestroyed,er("hideWithInteractivity")),K().addEventListener("mousemove",h),Hc(mo,h),h(Z)}function qe(){process.env.NODE_ENV!=="production"&&sn(y.state.isDestroyed,er("unmount")),y.state.isVisible&&y.hide(),y.state.isMounted&&(G(),J().forEach(function(Z){Z._tippy.unmount()}),S.parentNode&&S.parentNode.removeChild(S),vs=vs.filter(function(Z){return Z!==y}),y.state.isMounted=!1,H("onHidden",[y]))}function dn(){process.env.NODE_ENV!=="production"&&sn(y.state.isDestroyed,er("destroy")),!y.state.isDestroyed&&(y.clearDelayTimeouts(),y.unmount(),b(),delete n._tippy,y.state.isDestroyed=!0,H("onDestroy",[y]))}}function kr(n,e){e===void 0&&(e={});var t=xt.plugins.concat(e.plugins||[]);process.env.NODE_ENV!=="production"&&(Sb(n),Ff(e,t)),vb();var r=Object.assign({},e,{plugins:t}),o=fb(n);if(process.env.NODE_ENV!=="production"){var i=_r(r.content),s=o.length>1;sn(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=i.reduce(function(a,c){var u=c&&SS(c,r);return u&&a.push(u),a},[]);return Ni(n)?l[0]:l}qr.defaultProps=Ct;qr.setDefaultProps=vS;qr.currentInput=qt;Object.assign({},Rs,{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)}});qr.setDefaultProps({render:Np});class CS{constructor({editor:e,element:t,view:r,tippyOptions:i={},updateDelay:o=250,shouldShow:s}){this.preventHide=!1,this.shouldShow=({view:l,state:a,from:c,to:u})=>{const{doc:d,selection:f}=a,{empty:p}=f,h=!d.textBetween(c,u).length&&Jl(a.selection),g=this.element.contains(document.activeElement);return!(!(l.hasFocus()||g)||p||h||!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,p;const{state:h,composing:g}=l,{selection:v}=h;if(g||!a&&!c)return;this.createTooltip();const{ranges:T}=v,x=Math.min(...T.map(A=>A.$from.pos)),b=Math.max(...T.map(A=>A.$to.pos));if(!((d=this.shouldShow)===null||d===void 0?void 0:d.call(this,{editor:this.editor,view:l,state:h,oldState:u,from:x,to:b}))){this.hide();return}(f=this.tippy)===null||f===void 0||f.setProps({getReferenceClientRect:((p=this.tippyOptions)===null||p===void 0?void 0:p.getReferenceClientRect)||(()=>{if(OE(h.selection)){let A=l.nodeDOM(x);const B=A.dataset.nodeViewWrapper?A:A.querySelector("[data-node-view-wrapper]");if(B&&(A=B.firstChild),A)return A.getBoundingClientRect()}return Jh(l,x,b)})}),this.show()},this.editor=e,this.element=t,this.view=r,this.updateDelay=o,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=i,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:e}=this.editor.options,t=!!e.parentElement;this.tippy||!t||(this.tippy=qr(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,i=r.selection.$from.pos!==r.selection.$to.pos;if(this.updateDelay>0&&i){this.handleDebouncedUpdate(e,t);return}const o=!(t!=null&&t.selection.eq(e.state.selection)),s=!(t!=null&&t.doc.eq(e.state.doc));this.updateHandler(e,o,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 Ip=n=>new bt({key:typeof n.pluginKey=="string"?new Kt(n.pluginKey):n.pluginKey,view:e=>new CS({view:e,...n})});Pt.create({name:"bubbleMenu",addOptions(){return{element:null,tippyOptions:{},pluginKey:"bubbleMenu",updateDelay:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[Ip({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,updateDelay:this.options.updateDelay,shouldShow:this.options.shouldShow})]:[]}});class TS{constructor({editor:e,element:t,view:r,tippyOptions:i={},shouldShow:o}){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,o&&(this.shouldShow=o),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=i,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:e}=this.editor.options,t=!!e.parentElement;this.tippy||!t||(this.tippy=qr(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,i,o;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}(i=this.tippy)===null||i===void 0||i.setProps({getReferenceClientRect:((o=this.tippyOptions)===null||o===void 0?void 0:o.getReferenceClientRect)||(()=>Jh(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 Dp=n=>new bt({key:typeof n.pluginKey=="string"?new Kt(n.pluginKey):n.pluginKey,view:e=>new TS({view:e,...n})});Pt.create({name:"floatingMenu",addOptions(){return{element:null,tippyOptions:{},pluginKey:"floatingMenu",shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[Dp({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:i,pluginKey:o,shouldShow:s,tippyOptions:l}=n;i.registerPlugin(Ip({updateDelay:r,editor:i,element:t.value,pluginKey:o,shouldShow:s,tippyOptions:l}))}),m.onBeforeUnmount(()=>{const{pluginKey:r,editor:i}=n;i.unregisterPlugin(r)}),()=>{var r;return m.h("div",{ref:t},(r=e.default)===null||r===void 0?void 0:r.call(e))}}});function md(n){return m.customRef((e,t)=>({get(){return e(),n},set(r){n=r,requestAnimationFrame(()=>{requestAnimationFrame(()=>{t()})})}}))}class xS extends r2{constructor(e={}){return super(e),this.vueRenderers=m.reactive(new Map),this.contentComponent=null,this.reactiveState=md(this.view.state),this.reactiveExtensionStorage=md(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 AS=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 i=m.unref(e.value);e.value.append(...r.options.element.childNodes),r.contentComponent=t.ctx._,r.setOptions({element:i}),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 i=document.createElement("div");i.append(...r.options.element.childNodes),r.setOptions({element:i})}),{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:i,tippyOptions:o,shouldShow:s}=n;i.registerPlugin(Dp({pluginKey:r,editor:i,element:t.value,tippyOptions:o,shouldShow:s}))}),m.onBeforeUnmount(()=>{const{pluginKey:r,editor:i}=n;i.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 wS=(n={})=>{const e=m.shallowRef();return m.onMounted(()=>{e.value=new xS(n)}),m.onBeforeUnmount(()=>{var t;(t=e.value)===null||t===void 0||t.destroy()}),e},kS=bn.create({name:"doc",topNode:!0,content:"block+"}),OS=bn.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:n}){return["p",pt(this.options.HTMLAttributes,n),0]},addCommands(){return{setParagraph:()=>({commands:n})=>n.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),MS=bn.create({name:"text",group:"inline"}),NS="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4vianca6w0s2x0a2z0ure5ba0by2idu3namex3narepublic11d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0cast4mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dabur3d1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0ardian6cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2tura4vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9dnavy5lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0a1b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp2w2ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4finity6ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",IS="ελ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",Yr=(n,e)=>{for(const t in e)n[t]=e[t];return n},cl="numeric",ul="ascii",dl="alpha",fo="asciinumeric",Zi="alphanumeric",fl="domain",Rp="emoji",DS="scheme",RS="slashscheme",gd="whitespace";function LS(n,e){return n in e||(e[n]=[]),e[n]}function er(n,e,t){e[cl]&&(e[fo]=!0,e[Zi]=!0),e[ul]&&(e[fo]=!0,e[dl]=!0),e[fo]&&(e[Zi]=!0),e[dl]&&(e[Zi]=!0),e[Zi]&&(e[fl]=!0),e[Rp]&&(e[fl]=!0);for(const r in e){const i=LS(r,t);i.indexOf(n)<0&&i.push(n)}}function _S(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 i=e.jr[r][0],o=e.jr[r][1];if(o&&i.test(n))return o}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 i=0;i<n.length;i++)this.tt(n[i],e,t,r)},tr(n,e,t,r){r=r||gt.groups;let i;return e&&e.j?i=e:(i=new gt(e),t&&r&&er(e,t,r)),this.jr.push([n,i]),i},ts(n,e,t,r){let i=this;const o=n.length;if(!o)return i;for(let s=0;s<o-1;s++)i=i.tt(n[s]);return i.tt(n[o-1],e,t,r)},tt(n,e,t,r){r=r||gt.groups;const i=this;if(e&&e.j)return i.j[n]=e,e;const o=e;let s,l=i.go(n);if(l?(s=new gt,Yr(s.j,l.j),s.jr.push.apply(s.jr,l.jr),s.jd=l.jd,s.t=l.t):s=new gt,o){if(r)if(s.t&&typeof s.t=="string"){const a=Yr(_S(s.t,r),t);er(o,a,r)}else t&&er(o,t,r);s.t=o}return i.j[n]=s,s}};const Me=(n,e,t,r,i)=>n.ta(e,t,r,i),It=(n,e,t,r,i)=>n.tr(e,t,r,i),vd=(n,e,t,r,i)=>n.ts(e,t,r,i),de=(n,e,t,r,i)=>n.tt(e,t,r,i),fn="WORD",hl="UWORD",Di="LOCALHOST",pl="TLD",ml="UTLD",ho="SCHEME",Or="SLASH_SCHEME",dc="NUM",Lp="WS",fc="NL",yi="OPENBRACE",bi="CLOSEBRACE",Po="OPENBRACKET",Bo="CLOSEBRACKET",Fo="OPENPAREN",$o="CLOSEPAREN",Vo="OPENANGLEBRACKET",zo="CLOSEANGLEBRACKET",Ho="FULLWIDTHLEFTPAREN",Uo="FULLWIDTHRIGHTPAREN",jo="LEFTCORNERBRACKET",Wo="RIGHTCORNERBRACKET",Ko="LEFTWHITECORNERBRACKET",Go="RIGHTWHITECORNERBRACKET",Yo="FULLWIDTHLESSTHAN",Jo="FULLWIDTHGREATERTHAN",Xo="AMPERSAND",Qo="APOSTROPHE",Zo="ASTERISK",On="AT",qo="BACKSLASH",es="BACKTICK",ts="CARET",Nn="COLON",hc="COMMA",ns="DOLLAR",Xt="DOT",rs="EQUALS",pc="EXCLAMATION",Qt="HYPHEN",is="PERCENT",ss="PIPE",as="PLUS",ls="POUND",cs="QUERY",mc="QUOTE",gc="SEMI",Zt="SLASH",Ei="TILDE",us="UNDERSCORE",_p="EMOJI",ds="SYM";var Pp=Object.freeze({__proto__:null,WORD:fn,UWORD:hl,LOCALHOST:Di,TLD:pl,UTLD:ml,SCHEME:ho,SLASH_SCHEME:Or,NUM:dc,WS:Lp,NL:fc,OPENBRACE:yi,CLOSEBRACE:bi,OPENBRACKET:Po,CLOSEBRACKET:Bo,OPENPAREN:Fo,CLOSEPAREN:$o,OPENANGLEBRACKET:Vo,CLOSEANGLEBRACKET:zo,FULLWIDTHLEFTPAREN:Ho,FULLWIDTHRIGHTPAREN:Uo,LEFTCORNERBRACKET:jo,RIGHTCORNERBRACKET:Wo,LEFTWHITECORNERBRACKET:Ko,RIGHTWHITECORNERBRACKET:Go,FULLWIDTHLESSTHAN:Yo,FULLWIDTHGREATERTHAN:Jo,AMPERSAND:Xo,APOSTROPHE:Qo,ASTERISK:Zo,AT:On,BACKSLASH:qo,BACKTICK:es,CARET:ts,COLON:Nn,COMMA:hc,DOLLAR:ns,DOT:Xt,EQUALS:rs,EXCLAMATION:pc,HYPHEN:Qt,PERCENT:is,PIPE:ss,PLUS:as,POUND:ls,QUERY:cs,QUOTE:mc,SEMI:gc,SLASH:Zt,TILDE:Ei,UNDERSCORE:us,EMOJI:_p,SYM:ds});const Sr=/[a-z]/,va=/\p{L}/u,ya=/\p{Emoji}/u,ba=/\d/,yd=/\s/,bd=`
123
- `,PS="️",BS="‍";let qi=null,eo=null;function FS(n){n===void 0&&(n=[]);const e={};gt.groups=e;const t=new gt;qi==null&&(qi=Ed(NS)),eo==null&&(eo=Ed(IS)),de(t,"'",Qo),de(t,"{",yi),de(t,"}",bi),de(t,"[",Po),de(t,"]",Bo),de(t,"(",Fo),de(t,")",$o),de(t,"<",Vo),de(t,">",zo),de(t,"(",Ho),de(t,")",Uo),de(t,"「",jo),de(t,"」",Wo),de(t,"『",Ko),de(t,"』",Go),de(t,"<",Yo),de(t,">",Jo),de(t,"&",Xo),de(t,"*",Zo),de(t,"@",On),de(t,"`",es),de(t,"^",ts),de(t,":",Nn),de(t,",",hc),de(t,"$",ns),de(t,".",Xt),de(t,"=",rs),de(t,"!",pc),de(t,"-",Qt),de(t,"%",is),de(t,"|",ss),de(t,"+",as),de(t,"#",ls),de(t,"?",cs),de(t,'"',mc),de(t,"/",Zt),de(t,";",gc),de(t,"~",Ei),de(t,"_",us),de(t,"\\",qo);const r=It(t,ba,dc,{[cl]:!0});It(r,ba,r);const i=It(t,Sr,fn,{[ul]:!0});It(i,Sr,i);const o=It(t,va,hl,{[dl]:!0});It(o,Sr),It(o,va,o);const s=It(t,yd,Lp,{[gd]:!0});de(t,bd,fc,{[gd]:!0}),de(s,bd),It(s,yd,s);const l=It(t,ya,_p,{[Rp]:!0});It(l,ya,l),de(l,PS,l);const a=de(l,BS);It(a,ya,l);const c=[[Sr,i]],u=[[Sr,null],[va,o]];for(let d=0;d<qi.length;d++)xn(t,qi[d],pl,fn,c);for(let d=0;d<eo.length;d++)xn(t,eo[d],ml,hl,u);er(pl,{tld:!0,ascii:!0},e),er(ml,{utld:!0,alpha:!0},e),xn(t,"file",ho,fn,c),xn(t,"mailto",ho,fn,c),xn(t,"http",Or,fn,c),xn(t,"https",Or,fn,c),xn(t,"ftp",Or,fn,c),xn(t,"ftps",Or,fn,c),er(ho,{scheme:!0,ascii:!0},e),er(Or,{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],h=n[d][1]?{[DS]:!0}:{[RS]:!0};f.indexOf("-")>=0?h[fl]=!0:Sr.test(f)?ba.test(f)?h[fo]=!0:h[ul]=!0:h[cl]=!0,vd(t,f,f,h)}return vd(t,"localhost",Di,{ascii:!0}),t.jd=new gt(ds),{start:t,tokens:Yr({groups:e},Pp)}}function $S(n,e){const t=VS(e.replace(/[A-Z]/g,l=>l.toLowerCase())),r=t.length,i=[];let o=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,o+=t[s].length,s++;o-=d,s-=f,c-=d,i.push({t:u.t,v:e.slice(o-c,o),s:o-c,e:o})}return i}function VS(n){const e=[],t=n.length;let r=0;for(;r<t;){let i=n.charCodeAt(r),o,s=i<55296||i>56319||r+1===t||(o=n.charCodeAt(r+1))<56320||o>57343?n[r]:n.slice(r,r+2);e.push(s),r+=s.length}return e}function xn(n,e,t,r,i){let o;const s=e.length;for(let l=0;l<s-1;l++){const a=e[l];n.j[a]?o=n.j[a]:(o=new gt(r),o.jr=i.slice(),n.j[a]=o),n=o}return o=new gt(t),o.jr=i.slice(),n.j[e[s-1]]=o,o}function Ed(n){const e=[],t=[];let r=0,i="0123456789";for(;r<n.length;){let o=0;for(;i.indexOf(n[r+o])>=0;)o++;if(o>0){e.push(t.join(""));for(let s=parseInt(n.substring(r,r+o),10);s>0;s--)t.pop();r+=o}else t.push(n[r]),r++}return e}const Ri={defaultProtocol:"http",events:null,format:Sd,formatHref:Sd,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function vc(n,e){e===void 0&&(e=null);let t=Yr({},Ri);n&&(t=Yr(t,n instanceof vc?n.o:n));const r=t.ignoreTags,i=[];for(let o=0;o<r.length;o++)i.push(r[o].toUpperCase());this.o=t,e&&(this.defaultRender=e),this.ignoreTags=i}vc.prototype={o:Ri,ignoreTags:[],defaultRender(n){return n},check(n){return this.get("validate",n.toString(),n)},get(n,e,t){const r=e!=null;let i=this.o[n];return i&&(typeof i=="object"?(i=t.t in i?i[t.t]:Ri[n],typeof i=="function"&&r&&(i=i(e,t))):typeof i=="function"&&r&&(i=i(e,t.t,t)),i)},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 Sd(n){return n}function Bp(n,e){this.t="token",this.v=n,this.tk=e}Bp.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=Ri.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),i=n.get("tagName",t,e),o=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&&Yr(s,u),{tagName:i,attributes:s,content:o,eventListeners:d}}};function Bs(n,e){class t extends Bp{constructor(i,o){super(i,o),this.t=n}}for(const r in e)t.prototype[r]=e[r];return t.t=n,t}const Cd=Bs("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),Td=Bs("text"),zS=Bs("nl"),to=Bs("url",{isLink:!0,toHref(n){return n===void 0&&(n=Ri.defaultProtocol),this.hasProtocol()?this.v:`${n}://${this.v}`},hasProtocol(){const n=this.tk;return n.length>=2&&n[0].t!==Di&&n[1].t===Nn}}),Dt=n=>new gt(n);function HS(n){let{groups:e}=n;const t=e.domain.concat([Xo,Zo,On,qo,es,ts,ns,rs,Qt,dc,is,ss,as,ls,Zt,ds,Ei,us]),r=[Qo,Nn,hc,Xt,pc,cs,mc,gc,Vo,zo,yi,bi,Bo,Po,Fo,$o,Ho,Uo,jo,Wo,Ko,Go,Yo,Jo],i=[Xo,Qo,Zo,qo,es,ts,ns,rs,Qt,yi,bi,is,ss,as,ls,cs,Zt,ds,Ei,us],o=Dt(),s=de(o,Ei);Me(s,i,s),Me(s,e.domain,s);const l=Dt(),a=Dt(),c=Dt();Me(o,e.domain,l),Me(o,e.scheme,a),Me(o,e.slashscheme,c),Me(l,i,s),Me(l,e.domain,l);const u=de(l,On);de(s,On,u),de(a,On,u),de(c,On,u);const d=de(s,Xt);Me(d,i,s),Me(d,e.domain,s);const f=Dt();Me(u,e.domain,f),Me(f,e.domain,f);const p=de(f,Xt);Me(p,e.domain,f);const h=Dt(Cd);Me(p,e.tld,h),Me(p,e.utld,h),de(u,Di,h);const g=de(f,Qt);Me(g,e.domain,f),Me(h,e.domain,f),de(h,Xt,p),de(h,Qt,g);const v=de(h,Nn);Me(v,e.numeric,Cd);const S=de(l,Qt),T=de(l,Xt);Me(S,e.domain,l),Me(T,i,s),Me(T,e.domain,l);const x=Dt(to);Me(T,e.tld,x),Me(T,e.utld,x),Me(x,e.domain,l),Me(x,i,s),de(x,Xt,T),de(x,Qt,S),de(x,On,u);const b=de(x,Nn),D=Dt(to);Me(b,e.numeric,D);const A=Dt(to),B=Dt();Me(A,t,A),Me(A,r,B),Me(B,t,A),Me(B,r,B),de(x,Zt,A),de(D,Zt,A);const $=de(a,Nn),V=de(c,Nn),F=de(V,Zt),P=de(F,Zt);Me(a,e.domain,l),de(a,Xt,T),de(a,Qt,S),Me(c,e.domain,l),de(c,Xt,T),de(c,Qt,S),Me($,e.domain,A),de($,Zt,A),Me(P,e.domain,A),Me(P,t,A),de(P,Zt,A);const _=[[yi,bi],[Po,Bo],[Fo,$o],[Vo,zo],[Ho,Uo],[jo,Wo],[Ko,Go],[Yo,Jo]];for(let H=0;H<_.length;H++){const[Y,X]=_[H],Q=de(A,Y);de(B,Y,Q),de(Q,X,A);const ie=Dt(to);Me(Q,t,ie);const j=Dt();Me(Q,r),Me(ie,t,ie),Me(ie,r,j),Me(j,t,ie),Me(j,r,j),de(ie,X,A),de(j,X,A)}return de(o,Di,x),de(o,fc,zS),{start:o,tokens:Pp}}function US(n,e,t){let r=t.length,i=0,o=[],s=[];for(;i<r;){let l=n,a=null,c=null,u=0,d=null,f=-1;for(;i<r&&!(a=l.go(t[i].t));)s.push(t[i++]);for(;i<r&&(c=a||l.go(t[i].t));)a=null,l=c,l.accepts()?(f=0,d=l):f>=0&&f++,i++,u++;if(f<0)i-=u,i<r&&(s.push(t[i]),i++);else{s.length>0&&(o.push(Ea(Td,e,s)),s=[]),i-=f,u-=f;const p=d.t,h=t.slice(i-u,i);o.push(Ea(p,e,h))}}return s.length>0&&o.push(Ea(Td,e,s)),o}function Ea(n,e,t){const r=t[0].s,i=t[t.length-1].e,o=e.slice(r,i);return new n(o,t)}const jS=typeof console<"u"&&console&&console.warn||(()=>{}),WS="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 KS(){gt.groups={},Ve.scanner=null,Ve.parser=null,Ve.tokenQueue=[],Ve.pluginQueue=[],Ve.customSchemes=[],Ve.initialized=!1}function xd(n,e){if(e===void 0&&(e=!1),Ve.initialized&&jS(`linkifyjs: already initialized - will not register custom scheme "${n}" ${WS}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(n))throw new Error(`linkifyjs: incorrect scheme format.
122
+ `,"2) content: () => element.cloneNode(true)"].join(" "))}var l=o.reduce(function(a,c){var u=c&&Mb(c,r);return u&&a.push(u),a},[]);return _r(n)?l[0]:l}kr.defaultProps=xt;kr.setDefaultProps=wb;kr.currentInput=Gt;Object.assign({},xf,{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)}});kr.setDefaultProps({render:Vf});class Ib{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:m}=f,h=!d.textBetween(c,u).length&&Fa(a.selection),g=this.element.contains(document.activeElement);return!(!(l.hasFocus()||g)||m||h||!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,m;const{state:h,composing:g}=l,{selection:v}=h;if(g||!a&&!c)return;this.createTooltip();const{ranges:k}=v,w=Math.min(...k.map(S=>S.$from.pos)),y=Math.max(...k.map(S=>S.$to.pos));if(!((d=this.shouldShow)===null||d===void 0?void 0:d.call(this,{editor:this.editor,view:l,state:h,oldState:u,from:w,to:y}))){this.hide();return}(f=this.tippy)===null||f===void 0||f.setProps({getReferenceClientRect:((m=this.tippyOptions)===null||m===void 0?void 0:m.getReferenceClientRect)||(()=>{if(yy(h.selection)){let S=l.nodeDOM(w);const B=S.dataset.nodeViewWrapper?S:S.querySelector("[data-node-view-wrapper]");if(B&&(S=B.firstChild),S)return S.getBoundingClientRect()}return vf(l,w,y)})}),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=kr(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 $f=n=>new gt({key:typeof n.pluginKey=="string"?new zt(n.pluginKey):n.pluginKey,view:e=>new Ib({view:e,...n})});Dt.create({name:"bubbleMenu",addOptions(){return{element:null,tippyOptions:{},pluginKey:"bubbleMenu",updateDelay:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[$f({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,updateDelay:this.options.updateDelay,shouldShow:this.options.shouldShow})]:[]}});class Nb{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=kr(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)||(()=>vf(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 zf=n=>new gt({key:typeof n.pluginKey=="string"?new zt(n.pluginKey):n.pluginKey,view:e=>new Nb({view:e,...n})});Dt.create({name:"floatingMenu",addOptions(){return{element:null,tippyOptions:{},pluginKey:"floatingMenu",shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[zf({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow})]:[]}});p.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=p.ref(null);return p.onMounted(()=>{const{updateDelay:r,editor:o,pluginKey:i,shouldShow:s,tippyOptions:l}=n;o.registerPlugin($f({updateDelay:r,editor:o,element:t.value,pluginKey:i,shouldShow:s,tippyOptions:l}))}),p.onBeforeUnmount(()=>{const{pluginKey:r,editor:o}=n;o.unregisterPlugin(r)}),()=>{var r;return p.h("div",{ref:t},(r=e.default)===null||r===void 0?void 0:r.call(e))}}});function Zc(n){return p.customRef((e,t)=>({get(){return e(),n},set(r){n=r,requestAnimationFrame(()=>{requestAnimationFrame(()=>{t()})})}}))}class Db extends Jy{constructor(e={}){return super(e),this.vueRenderers=p.reactive(new Map),this.contentComponent=null,this.reactiveState=Zc(this.view.state),this.reactiveExtensionStorage=Zc(this.extensionStorage),this.on("transaction",()=>{this.reactiveState.value=this.view.state,this.reactiveExtensionStorage.value=this.extensionStorage}),p.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 Rb=p.defineComponent({name:"EditorContent",props:{editor:{default:null,type:Object}},setup(n){const e=p.ref(),t=p.getCurrentInstance();return p.watchEffect(()=>{const r=n.editor;r&&r.options.element&&e.value&&p.nextTick(()=>{if(!e.value||!r.options.element.firstChild)return;const o=p.unref(e.value);e.value.append(...r.options.element.childNodes),r.contentComponent=t.ctx._,r.setOptions({element:o}),r.createNodeViews()})}),p.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=p.h(p.Teleport,{to:e.teleportElement,key:e.id},p.h(e.component,{ref:e.id,...e.props}));n.push(t)}),p.h("div",{ref:e=>{this.rootEl=e}},...n)}});p.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=p.ref(null);return p.onMounted(()=>{const{pluginKey:r,editor:o,tippyOptions:i,shouldShow:s}=n;o.registerPlugin(zf({pluginKey:r,editor:o,element:t.value,tippyOptions:i,shouldShow:s}))}),p.onBeforeUnmount(()=>{const{pluginKey:r,editor:o}=n;o.unregisterPlugin(r)}),()=>{var r;return p.h("div",{ref:t},(r=e.default)===null||r===void 0?void 0:r.call(e))}}});p.defineComponent({name:"NodeViewContent",props:{as:{type:String,default:"div"}},render(){return p.h(this.as,{style:{whiteSpace:"pre-wrap"},"data-node-view-content":""})}});p.defineComponent({name:"NodeViewWrapper",props:{as:{type:String,default:"div"}},inject:["onDragStart","decorationClasses"],render(){var n,e;return p.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 Lb=(n={})=>{const e=p.shallowRef();return p.onMounted(()=>{e.value=new Db(n)}),p.onBeforeUnmount(()=>{var t;(t=e.value)===null||t===void 0||t.destroy()}),e},Bb=un.create({name:"doc",topNode:!0,content:"block+"}),Pb=un.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:n}){return["p",ut(this.options.HTMLAttributes,n),0]},addCommands(){return{setParagraph:()=>({commands:n})=>n.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),Fb=un.create({name:"text",group:"inline"}),Vb="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4vianca6w0s2x0a2z0ure5ba0by2idu3namex3narepublic11d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0cast4mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dabur3d1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0ardian6cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2tura4vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9dnavy5lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0a1b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp2w2ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4finity6ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",$b="ελ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",Er=(n,e)=>{for(const t in e)n[t]=e[t];return n},na="numeric",ra="ascii",oa="alpha",wo="asciinumeric",go="alphanumeric",ia="domain",Uf="emoji",zb="scheme",Ub="slashscheme",_c="whitespace";function Hb(n,e){return n in e||(e[n]=[]),e[n]}function Vn(n,e,t){e[na]&&(e[wo]=!0,e[go]=!0),e[ra]&&(e[wo]=!0,e[oa]=!0),e[wo]&&(e[go]=!0),e[oa]&&(e[go]=!0),e[go]&&(e[ia]=!0),e[Uf]&&(e[ia]=!0);for(const r in e){const o=Hb(r,t);o.indexOf(n)<0&&o.push(n)}}function jb(n,e){const t={};for(const r in e)e[r].indexOf(n)>=0&&(t[r]=!0);return t}function ft(n){n===void 0&&(n=null),this.j={},this.jr=[],this.jd=null,this.t=n}ft.groups={};ft.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||ft.groups;let o;return e&&e.j?o=e:(o=new ft(e),t&&r&&Vn(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||ft.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 ft,Er(s.j,l.j),s.jr.push.apply(s.jr,l.jr),s.jd=l.jd,s.t=l.t):s=new ft,i){if(r)if(s.t&&typeof s.t=="string"){const a=Er(jb(s.t,r),t);Vn(i,a,r)}else t&&Vn(i,t,r);s.t=i}return o.j[n]=s,s}};const Ae=(n,e,t,r,o)=>n.ta(e,t,r,o),At=(n,e,t,r,o)=>n.tr(e,t,r,o),qc=(n,e,t,r,o)=>n.ts(e,t,r,o),ue=(n,e,t,r,o)=>n.tt(e,t,r,o),rn="WORD",sa="UWORD",eo="LOCALHOST",aa="TLD",la="UTLD",To="SCHEME",ir="SLASH_SCHEME",Ya="NUM",Hf="WS",Qa="NL",$r="OPENBRACE",zr="CLOSEBRACE",Go="OPENBRACKET",Jo="CLOSEBRACKET",Yo="OPENPAREN",Qo="CLOSEPAREN",Xo="OPENANGLEBRACKET",Zo="CLOSEANGLEBRACKET",_o="FULLWIDTHLEFTPAREN",qo="FULLWIDTHRIGHTPAREN",ei="LEFTCORNERBRACKET",ti="RIGHTCORNERBRACKET",ni="LEFTWHITECORNERBRACKET",ri="RIGHTWHITECORNERBRACKET",oi="FULLWIDTHLESSTHAN",ii="FULLWIDTHGREATERTHAN",si="AMPERSAND",ai="APOSTROPHE",li="ASTERISK",vn="AT",ci="BACKSLASH",ui="BACKTICK",di="CARET",bn="COLON",Xa="COMMA",fi="DOLLAR",jt="DOT",pi="EQUALS",Za="EXCLAMATION",Wt="HYPHEN",hi="PERCENT",mi="PIPE",gi="PLUS",vi="POUND",yi="QUERY",_a="QUOTE",qa="SEMI",Kt="SLASH",Ur="TILDE",bi="UNDERSCORE",jf="EMOJI",xi="SYM";var Wf=Object.freeze({__proto__:null,WORD:rn,UWORD:sa,LOCALHOST:eo,TLD:aa,UTLD:la,SCHEME:To,SLASH_SCHEME:ir,NUM:Ya,WS:Hf,NL:Qa,OPENBRACE:$r,CLOSEBRACE:zr,OPENBRACKET:Go,CLOSEBRACKET:Jo,OPENPAREN:Yo,CLOSEPAREN:Qo,OPENANGLEBRACKET:Xo,CLOSEANGLEBRACKET:Zo,FULLWIDTHLEFTPAREN:_o,FULLWIDTHRIGHTPAREN:qo,LEFTCORNERBRACKET:ei,RIGHTCORNERBRACKET:ti,LEFTWHITECORNERBRACKET:ni,RIGHTWHITECORNERBRACKET:ri,FULLWIDTHLESSTHAN:oi,FULLWIDTHGREATERTHAN:ii,AMPERSAND:si,APOSTROPHE:ai,ASTERISK:li,AT:vn,BACKSLASH:ci,BACKTICK:ui,CARET:di,COLON:bn,COMMA:Xa,DOLLAR:fi,DOT:jt,EQUALS:pi,EXCLAMATION:Za,HYPHEN:Wt,PERCENT:hi,PIPE:mi,PLUS:gi,POUND:vi,QUERY:yi,QUOTE:_a,SEMI:qa,SLASH:Kt,TILDE:Ur,UNDERSCORE:bi,EMOJI:jf,SYM:xi});const tr=/[a-z]/,ys=/\p{L}/u,bs=/\p{Emoji}/u,xs=/\d/,eu=/\s/,tu=`
123
+ `,Wb="️",Kb="‍";let vo=null,yo=null;function Gb(n){n===void 0&&(n=[]);const e={};ft.groups=e;const t=new ft;vo==null&&(vo=nu(Vb)),yo==null&&(yo=nu($b)),ue(t,"'",ai),ue(t,"{",$r),ue(t,"}",zr),ue(t,"[",Go),ue(t,"]",Jo),ue(t,"(",Yo),ue(t,")",Qo),ue(t,"<",Xo),ue(t,">",Zo),ue(t,"(",_o),ue(t,")",qo),ue(t,"「",ei),ue(t,"」",ti),ue(t,"『",ni),ue(t,"』",ri),ue(t,"<",oi),ue(t,">",ii),ue(t,"&",si),ue(t,"*",li),ue(t,"@",vn),ue(t,"`",ui),ue(t,"^",di),ue(t,":",bn),ue(t,",",Xa),ue(t,"$",fi),ue(t,".",jt),ue(t,"=",pi),ue(t,"!",Za),ue(t,"-",Wt),ue(t,"%",hi),ue(t,"|",mi),ue(t,"+",gi),ue(t,"#",vi),ue(t,"?",yi),ue(t,'"',_a),ue(t,"/",Kt),ue(t,";",qa),ue(t,"~",Ur),ue(t,"_",bi),ue(t,"\\",ci);const r=At(t,xs,Ya,{[na]:!0});At(r,xs,r);const o=At(t,tr,rn,{[ra]:!0});At(o,tr,o);const i=At(t,ys,sa,{[oa]:!0});At(i,tr),At(i,ys,i);const s=At(t,eu,Hf,{[_c]:!0});ue(t,tu,Qa,{[_c]:!0}),ue(s,tu),At(s,eu,s);const l=At(t,bs,jf,{[Uf]:!0});At(l,bs,l),ue(l,Wb,l);const a=ue(l,Kb);At(a,bs,l);const c=[[tr,o]],u=[[tr,null],[ys,i]];for(let d=0;d<vo.length;d++)hn(t,vo[d],aa,rn,c);for(let d=0;d<yo.length;d++)hn(t,yo[d],la,sa,u);Vn(aa,{tld:!0,ascii:!0},e),Vn(la,{utld:!0,alpha:!0},e),hn(t,"file",To,rn,c),hn(t,"mailto",To,rn,c),hn(t,"http",ir,rn,c),hn(t,"https",ir,rn,c),hn(t,"ftp",ir,rn,c),hn(t,"ftps",ir,rn,c),Vn(To,{scheme:!0,ascii:!0},e),Vn(ir,{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],h=n[d][1]?{[zb]:!0}:{[Ub]:!0};f.indexOf("-")>=0?h[ia]=!0:tr.test(f)?xs.test(f)?h[wo]=!0:h[ra]=!0:h[na]=!0,qc(t,f,f,h)}return qc(t,"localhost",eo,{ascii:!0}),t.jd=new ft(xi),{start:t,tokens:Er({groups:e},Wf)}}function Jb(n,e){const t=Yb(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 Yb(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 hn(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 ft(r),i.jr=o.slice(),n.j[a]=i),n=i}return i=new ft(t),i.jr=o.slice(),n.j[e[s-1]]=i,i}function nu(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 to={defaultProtocol:"http",events:null,format:ru,formatHref:ru,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function el(n,e){e===void 0&&(e=null);let t=Er({},to);n&&(t=Er(t,n instanceof el?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}el.prototype={o:to,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]:to[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 ru(n){return n}function Kf(n,e){this.t="token",this.v=n,this.tk=e}Kf.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=to.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&&Er(s,u),{tagName:o,attributes:s,content:i,eventListeners:d}}};function Ui(n,e){class t extends Kf{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 ou=Ui("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),iu=Ui("text"),Qb=Ui("nl"),bo=Ui("url",{isLink:!0,toHref(n){return n===void 0&&(n=to.defaultProtocol),this.hasProtocol()?this.v:`${n}://${this.v}`},hasProtocol(){const n=this.tk;return n.length>=2&&n[0].t!==eo&&n[1].t===bn}}),Ot=n=>new ft(n);function Xb(n){let{groups:e}=n;const t=e.domain.concat([si,li,vn,ci,ui,di,fi,pi,Wt,Ya,hi,mi,gi,vi,Kt,xi,Ur,bi]),r=[ai,bn,Xa,jt,Za,yi,_a,qa,Xo,Zo,$r,zr,Jo,Go,Yo,Qo,_o,qo,ei,ti,ni,ri,oi,ii],o=[si,ai,li,ci,ui,di,fi,pi,Wt,$r,zr,hi,mi,gi,vi,yi,Kt,xi,Ur,bi],i=Ot(),s=ue(i,Ur);Ae(s,o,s),Ae(s,e.domain,s);const l=Ot(),a=Ot(),c=Ot();Ae(i,e.domain,l),Ae(i,e.scheme,a),Ae(i,e.slashscheme,c),Ae(l,o,s),Ae(l,e.domain,l);const u=ue(l,vn);ue(s,vn,u),ue(a,vn,u),ue(c,vn,u);const d=ue(s,jt);Ae(d,o,s),Ae(d,e.domain,s);const f=Ot();Ae(u,e.domain,f),Ae(f,e.domain,f);const m=ue(f,jt);Ae(m,e.domain,f);const h=Ot(ou);Ae(m,e.tld,h),Ae(m,e.utld,h),ue(u,eo,h);const g=ue(f,Wt);Ae(g,e.domain,f),Ae(h,e.domain,f),ue(h,jt,m),ue(h,Wt,g);const v=ue(h,bn);Ae(v,e.numeric,ou);const E=ue(l,Wt),k=ue(l,jt);Ae(E,e.domain,l),Ae(k,o,s),Ae(k,e.domain,l);const w=Ot(bo);Ae(k,e.tld,w),Ae(k,e.utld,w),Ae(w,e.domain,l),Ae(w,o,s),ue(w,jt,k),ue(w,Wt,E),ue(w,vn,u);const y=ue(w,bn),R=Ot(bo);Ae(y,e.numeric,R);const S=Ot(bo),B=Ot();Ae(S,t,S),Ae(S,r,B),Ae(B,t,S),Ae(B,r,B),ue(w,Kt,S),ue(R,Kt,S);const $=ue(a,bn),F=ue(c,bn),T=ue(F,Kt),P=ue(T,Kt);Ae(a,e.domain,l),ue(a,jt,k),ue(a,Wt,E),Ae(c,e.domain,l),ue(c,jt,k),ue(c,Wt,E),Ae($,e.domain,S),ue($,Kt,S),Ae(P,e.domain,S),Ae(P,t,S),ue(P,Kt,S);const L=[[$r,zr],[Go,Jo],[Yo,Qo],[Xo,Zo],[_o,qo],[ei,ti],[ni,ri],[oi,ii]];for(let U=0;U<L.length;U++){const[K,Y]=L[U],Q=ue(S,K);ue(B,K,Q),ue(Q,Y,S);const te=Ot(bo);Ae(Q,t,te);const H=Ot();Ae(Q,r),Ae(te,t,te),Ae(te,r,H),Ae(H,t,te),Ae(H,r,H),ue(te,Y,S),ue(H,Y,S)}return ue(i,eo,w),ue(i,Qa,Qb),{start:i,tokens:Wf}}function Zb(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(Es(iu,e,s)),s=[]),o-=f,u-=f;const m=d.t,h=t.slice(o-u,o);i.push(Es(m,e,h))}}return s.length>0&&i.push(Es(iu,e,s)),i}function Es(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 _b=typeof console<"u"&&console&&console.warn||(()=>{}),qb="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 e5(){ft.groups={},Ve.scanner=null,Ve.parser=null,Ve.tokenQueue=[],Ve.pluginQueue=[],Ve.customSchemes=[],Ve.initialized=!1}function su(n,e){if(e===void 0&&(e=!1),Ve.initialized&&_b(`linkifyjs: already initialized - will not register custom scheme "${n}" ${qb}`),!/^[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 GS(){Ve.scanner=FS(Ve.customSchemes);for(let n=0;n<Ve.tokenQueue.length;n++)Ve.tokenQueue[n][1]({scanner:Ve.scanner});Ve.parser=HS(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 YS(n){return Ve.initialized||GS(),US(Ve.parser.start,n,$S(Ve.scanner.start,n))}function yc(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 vc(t),i=YS(n),o=[];for(let s=0;s<i.length;s++){const l=i[s];l.isLink&&(!e||l.t===e)&&r.check(l)&&o.push(l.toFormattedObject(r))}return o}function JS(n){return new bt({key:new Kt("autolink"),appendTransaction:(e,t,r)=>{const i=e.some(c=>c.docChanged)&&!t.doc.eq(r.doc),o=e.some(c=>c.getMeta("preventAutolink"));if(!i||o)return;const{tr:s}=r,l=gE(t.doc,[...e]);if(AE(l).forEach(({newRange:c})=>{const u=yE(r.doc,c,p=>p.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 p=f.split(" ").filter(v=>v!=="");if(p.length<=0)return!1;const h=p[p.length-1],g=d.pos+f.lastIndexOf(h);if(!h)return!1;yc(h).filter(v=>v.isLink).map(v=>({...v,from:g+v.start+1,to:g+v.end+1})).filter(v=>r.schema.marks.code?!r.doc.rangeHasMark(v.from,v.to,r.schema.marks.code):!0).filter(v=>n.validate?n.validate(v.value):!0).forEach(v=>{Zl(v.from,v.to,r.doc).some(S=>S.mark.type===n.type)||s.addMark(v.from,v.to,n.type.create({href:v.href}))})}}),!!s.steps.length)return s}})}function XS(n){return new bt({key:new Kt("handleClickLink"),props:{handleClick:(e,t,r)=>{var i,o;if(r.button!==0||r.target.nodeName!=="A")return!1;const l=Yh(e.state,n.type.name),a=r.target,c=(i=a==null?void 0:a.href)!==null&&i!==void 0?i:l.href,u=(o=a==null?void 0:a.target)!==null&&o!==void 0?o:l.target;return a&&c?(e.editable&&window.open(c,u),!0):!1}}})}function QS(n){return new bt({key:new Kt("handlePasteLink"),props:{handlePaste:(e,t,r)=>{var i;const{state:o}=e,{selection:s}=o,{empty:l}=s;if(l)return!1;let a="";r.content.forEach(h=>{a+=h.textContent});const c=yc(a).find(h=>h.isLink&&h.value===a);if(!a||!c)return!1;const u=(i=t.clipboardData)===null||i===void 0?void 0:i.getData("text/html"),d=/href="([^"]*)"/,f=u==null?void 0:u.match(d),p=f?f[1]:c.href;return n.editor.commands.setMark(n.type,{href:p}),!0}}})}const ZS=an.create({name:"link",priority:1e3,keepOnSplit:!1,onCreate(){this.options.protocols.forEach(n=>{if(typeof n=="string"){xd(n);return}xd(n.scheme,n.optionalSlashes)})},onDestroy(){KS()},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",pt(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[Mi({find:n=>yc(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 i=(t=e==null?void 0:e.clipboardData)===null||t===void 0?void 0:t.getData("text/html"),o=/href="([^"]*)"/,s=i==null?void 0:i.match(o);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(JS({type:this.type,validate:this.options.validate})),this.options.openOnClick&&n.push(XS({type:this.type})),this.options.linkOnPaste&&n.push(QS({editor:this.editor,type:this.type})),n}}),qS=ZS.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})}}}}),e5=Pt.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new bt({key:new Kt("placeholder"),props:{decorations:({doc:n,selection:e})=>{const t=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=e,i=[];if(!t)return null;const o=n.type.createAndFill(),s=(o==null?void 0:o.sameMarkup(n))&&o.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=Lt.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});i.push(f)}return this.options.includeChildren}),Ke.create(n,i)}}})]}}),t5=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))$/,n5=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))/g,r5=/(?:^|\s)((?:__)((?:[^__]+))(?:__))$/,i5=/(?:^|\s)((?:__)((?:[^__]+))(?:__))/g,o5=an.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",pt(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[Io({find:t5,type:this.type}),Io({find:r5,type:this.type})]},addPasteRules(){return[Mi({find:n5,type:this.type}),Mi({find:i5,type:this.type})]}}),s5=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))$/,a5=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))/g,l5=/(?:^|\s)((?:_)((?:[^_]+))(?:_))$/,c5=/(?:^|\s)((?:_)((?:[^_]+))(?:_))/g,u5=an.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",pt(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[Io({find:s5,type:this.type}),Io({find:l5,type:this.type})]},addPasteRules(){return[Mi({find:a5,type:this.type}),Mi({find:c5,type:this.type})]}}),d5=an.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",pt(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()}}}),f5=bn.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:n}){return["li",pt(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)}}}),h5=bn.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:n}){return["li",pt(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)}}}),Ad=an.create({name:"textStyle",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:n=>n.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["span",pt(this.options.HTMLAttributes,n),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:n,commands:e})=>{const t=Ds(n,this.type);return Object.entries(t).some(([,i])=>!!i)?!0:e.unsetMark(this.name)}}}}),wd=/^\s*([-+*])\s$/,p5=bn.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",pt(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(h5.name,this.editor.getAttributes(Ad.name)).run():n.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let n=Do({find:wd,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(n=Do({find:wd,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(Ad.name),editor:this.editor})),[n]}}),m5=bn.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:n}){return["li",pt(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=an.create({name:"textStyle",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:n=>n.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["span",pt(this.options.HTMLAttributes,n),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:n,commands:e})=>{const t=Ds(n,this.type);return Object.entries(t).some(([,i])=>!!i)?!0:e.unsetMark(this.name)}}}}),Od=/^(\d+)\.\s$/,g5=bn.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",pt(this.options.HTMLAttributes,t),0]:["ol",pt(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(m5.name,this.editor.getAttributes(kd.name)).run():n.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let n=Do({find:Od,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=Do({find:Od,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(kd.name)}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1],editor:this.editor})),[n]}}),v5=bn.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:n}){return["br",pt(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:i,storedMarks:o}=t;if(i.$from.parent.type.spec.isolating)return!1;const{keepMarks:s}=this.options,{splittableMarks:l}=r.extensionManager,a=o||i.$to.parentOffset&&i.$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()}}}),Sa={BASIC:"basic",FULL:"full"},y5={class:"bd-markdown-editor__menu-bottom"},b5={key:0,class:"vr"},E5={key:4,class:"vr"},S5={key:7,class:"vr"},Fp=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:Sa.BASIC},modelValue:{}},emits:["update:modelValue","upload"],setup(n,{emit:e}){const t=n,r=()=>{e("upload")},i=pr(t,"modelValue",e),o=[kS,OS,MS,e5.configure({placeholder:t.placeholder}),v5];t.variant===Sa.FULL&&o.push(o5,u5,d5,f5,p5,g5,qS.configure({openOnClick:!1,validate:p=>/^https?:\/\//.test(p)}));const s=wS({content:i.value,extensions:o,onUpdate:({editor:p})=>{const{view:h,state:g}=p,{from:v,to:S}=h.state.selection;if(g.doc.textBetween(v-1,S,"")==" "&&p.getAttributes("link").href!=null&&p.chain().setTextSelection({from:v-1,to:S}).toggleLink({href:p.getAttributes("link").href}).setTextSelection({from:S,to:S}).run(),p.getText().trim()===""){e("update:modelValue","");return}e("update:modelValue",p.getHTML())}});m.watch(()=>t.modelValue,p=>{s.value.getHTML()!==p&&s.value.commands.setContent(p,!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===Sa.FULL),f=p=>s.value&&s.value.isActive(p)?"active":null;return(p,h)=>(m.openBlock(),m.createElementBlock(m.Fragment,null,[m.createElementVNode("div",{class:m.normalizeClass(["bd-markdown-editor",l.value])},[m.createVNode(m.unref(AS),{editor:m.unref(s)},null,8,["editor"]),m.renderSlot(p.$slots,"default"),m.createElementVNode("div",y5,[m.createVNode(Vt,{variant:"light",type:"button",onClick:r},{default:m.withCtx(()=>[m.createVNode(m.unref(Si))]),_:1}),d.value?(m.openBlock(),m.createElementBlock("div",b5)):m.createCommentVNode("",!0),d.value?(m.openBlock(),m.createBlock(Vt,{key:1,variant:"light",type:"button",class:m.normalizeClass(a.value),onClick:h[0]||(h[0]=g=>m.unref(s).chain().focus().toggleBold().run())},{default:m.withCtx(()=>[m.createVNode(m.unref(wl))]),_:1},8,["class"])):m.createCommentVNode("",!0),d.value?(m.openBlock(),m.createBlock(Vt,{key:2,variant:"light",type:"button",class:m.normalizeClass(c.value),onClick:h[1]||(h[1]=g=>m.unref(s).chain().focus().toggleItalic().run())},{default:m.withCtx(()=>[m.createVNode(m.unref(Al))]),_:1},8,["class"])):m.createCommentVNode("",!0),d.value?(m.openBlock(),m.createBlock(Vt,{key:3,variant:"light",type:"button",class:m.normalizeClass(u.value),onClick:h[2]||(h[2]=g=>m.unref(s).chain().focus().toggleUnderline().run())},{default:m.withCtx(()=>[m.createVNode(m.unref(kl))]),_:1},8,["class"])):m.createCommentVNode("",!0),d.value?(m.openBlock(),m.createElementBlock("div",E5)):m.createCommentVNode("",!0),d.value?(m.openBlock(),m.createBlock(Vt,{key:5,variant:"light",type:"button",class:"IsUnderlineActive",onClick:h[3]||(h[3]=g=>m.unref(s).chain().focus().toggleUnderline().run())},{default:m.withCtx(()=>[m.createVNode(m.unref(Ol))]),_:1})):m.createCommentVNode("",!0),d.value?(m.openBlock(),m.createBlock(Vt,{key:6,variant:"light",type:"button",class:"IsBulletListActive",onClick:h[4]||(h[4]=g=>m.unref(s).chain().focus().toggleBulletList().run())},{default:m.withCtx(()=>[m.createVNode(m.unref(Ml))]),_:1})):m.createCommentVNode("",!0),d.value?(m.openBlock(),m.createElementBlock("div",S5)):m.createCommentVNode("",!0),d.value?(m.openBlock(),m.createBlock(Vt,{key:8,variant:"light",type:"button",class:"IsOrderedListActive",onClick:h[5]||(h[5]=g=>m.unref(s).chain().focus().toggleOrderedList().run())},{default:m.withCtx(()=>[m.createVNode(m.unref(Nl))]),_:1})):m.createCommentVNode("",!0)])],2),m.createVNode(m.unref(Es),{text:t.errorText,state:t.state},null,8,["text","state"])],64))}}),C5={class:"bd-user"},T5={class:"bd-user__information"},x5={class:"text-break"},A5={class:"overflow-x-hidden"},$p=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,i)=>(m.openBlock(),m.createElementBlock("div",C5,[e.hideImage?m.createCommentVNode("",!0):(m.openBlock(),m.createBlock(Il,m.mergeProps({key:0},e.img,{size:"sm"}),null,16)),m.createElementVNode("div",T5,[m.createElementVNode("header",null,[m.createElementVNode("h5",x5,m.toDisplayString(e.name),1),m.renderSlot(r.$slots,"header-extra")]),m.createElementVNode("span",A5,m.toDisplayString(t.value),1)])]))}}),w5={class:"bd-dropdown dropdown"},Vp=m.defineComponent({__name:"BDDropdown",props:{size:{default:at.MD},variant:{default:bs.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}=_i(),r=`__BD__DROPDOWN__${t.value}`,i=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})),o=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",w5,[(m.openBlock(),m.createBlock(m.resolveDynamicComponent(e.toggleTag),m.mergeProps({class:"dropdown-toggle",target:"_self",role:"button","data-bs-toggle":"dropdown"},i.value),{default:m.withCtx(()=>[m.createElementVNode("span",null,m.toDisplayString(e.text),1)]),_:1},16)),m.createElementVNode("ul",m.mergeProps({class:["dropdown-menu",o.value]},s.value),[m.renderSlot(l.$slots,"default")],16)]))}}),k5={class:"modal bd-modal modal-lg",tabindex:"-1"},O5={class:"modal-dialog"},M5={class:"modal-content"},N5={class:"modal-header"},I5={class:"modal-title fw-light"},D5={class:"modal-body"},R5={key:0,class:"modal-footer"},L5=["disabled"],zp=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")},i=()=>{e("cancel")};return(o,s)=>(m.openBlock(),m.createElementBlock("div",k5,[m.createElementVNode("div",O5,[m.createElementVNode("div",M5,[m.createElementVNode("div",N5,[m.createElementVNode("h2",I5,m.toDisplayString(t.title),1),m.renderSlot(o.$slots,"modal-header-space-between"),m.createElementVNode("button",{type:"button",class:"btn-close w-auto","data-bs-dismiss":"modal","aria-label":"Sluiten",onClick:i},[m.createTextVNode("Sluiten "),m.createVNode(m.unref(xl),{class:"bg-primary"})])]),m.createElementVNode("div",D5,[m.renderSlot(o.$slots,"default")]),o.hideFooter?m.createCommentVNode("",!0):(m.openBlock(),m.createElementBlock("div",R5,[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,L5)),t.hideFooterCancelButton?m.createCommentVNode("",!0):(m.openBlock(),m.createElementBlock("button",{key:1,type:"button",class:"btn btn-link","data-bs-dismiss":"modal",onClick:i,"aria-label":"Annuleren"},m.toDisplayString(t.closeButtonTitle),1))]))])])]))}});/*!
128
- * Bootstrap v5.3.0 (https://getbootstrap.com/)
126
+ 3. "-" cannot repeat`);Ve.customSchemes.push([n,e])}function t5(){Ve.scanner=Gb(Ve.customSchemes);for(let n=0;n<Ve.tokenQueue.length;n++)Ve.tokenQueue[n][1]({scanner:Ve.scanner});Ve.parser=Xb(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 n5(n){return Ve.initialized||t5(),Zb(Ve.parser.start,n,Jb(Ve.scanner.start,n))}function tl(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 el(t),o=n5(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 r5(n){return new gt({key:new zt("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=sy(t.doc,[...e]);if(my(l).forEach(({newRange:c})=>{const u=ly(r.doc,c,m=>m.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 m=f.split(" ").filter(v=>v!=="");if(m.length<=0)return!1;const h=m[m.length-1],g=d.pos+f.lastIndexOf(h);if(!h)return!1;tl(h).filter(v=>v.isLink).map(v=>({...v,from:g+v.start+1,to:g+v.end+1})).filter(v=>r.schema.marks.code?!r.doc.rangeHasMark(v.from,v.to,r.schema.marks.code):!0).filter(v=>n.validate?n.validate(v.value):!0).forEach(v=>{za(v.from,v.to,r.doc).some(E=>E.mark.type===n.type)||s.addMark(v.from,v.to,n.type.create({href:v.href}))})}}),!!s.steps.length)return s}})}function o5(n){return new gt({key:new zt("handleClickLink"),props:{handleClick:(e,t,r)=>{var o,i;if(r.button!==0||r.target.nodeName!=="A")return!1;const l=gf(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 i5(n){return new gt({key:new zt("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(h=>{a+=h.textContent});const c=tl(a).find(h=>h.isLink&&h.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),m=f?f[1]:c.href;return n.editor.commands.setMark(n.type,{href:m}),!0}}})}const s5=_t.create({name:"link",priority:1e3,keepOnSplit:!1,onCreate(){this.options.protocols.forEach(n=>{if(typeof n=="string"){su(n);return}su(n.scheme,n.optionalSlashes)})},onDestroy(){e5()},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",ut(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[Qr({find:n=>tl(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(r5({type:this.type,validate:this.options.validate})),this.options.openOnClick&&n.push(o5({type:this.type})),this.options.linkOnPaste&&n.push(i5({editor:this.editor,type:this.type})),n}}),a5=s5.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})}}}}),l5=Dt.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new gt({key:new zt("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=It.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}),Ke.create(n,o)}}})]}}),c5=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))$/,u5=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))/g,d5=/(?:^|\s)((?:__)((?:[^__]+))(?:__))$/,f5=/(?:^|\s)((?:__)((?:[^__]+))(?:__))/g,p5=_t.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",ut(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[Ho({find:c5,type:this.type}),Ho({find:d5,type:this.type})]},addPasteRules(){return[Qr({find:u5,type:this.type}),Qr({find:f5,type:this.type})]}}),h5=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))$/,m5=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))/g,g5=/(?:^|\s)((?:_)((?:[^_]+))(?:_))$/,v5=/(?:^|\s)((?:_)((?:[^_]+))(?:_))/g,y5=_t.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",ut(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[Ho({find:h5,type:this.type}),Ho({find:g5,type:this.type})]},addPasteRules(){return[Qr({find:m5,type:this.type}),Qr({find:v5,type:this.type})]}}),b5=_t.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",ut(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()}}}),x5=un.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:n}){return["li",ut(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)}}}),E5=un.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:n}){return["li",ut(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)}}}),au=_t.create({name:"textStyle",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:n=>n.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["span",ut(this.options.HTMLAttributes,n),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:n,commands:e})=>{const t=Vi(n,this.type);return Object.entries(t).some(([,o])=>!!o)?!0:e.unsetMark(this.name)}}}}),lu=/^\s*([-+*])\s$/,S5=un.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",ut(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(E5.name,this.editor.getAttributes(au.name)).run():n.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let n=jo({find:lu,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(n=jo({find:lu,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(au.name),editor:this.editor})),[n]}}),k5=un.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:n}){return["li",ut(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)}}}),cu=_t.create({name:"textStyle",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:n=>n.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["span",ut(this.options.HTMLAttributes,n),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:n,commands:e})=>{const t=Vi(n,this.type);return Object.entries(t).some(([,o])=>!!o)?!0:e.unsetMark(this.name)}}}}),uu=/^(\d+)\.\s$/,C5=un.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",ut(this.options.HTMLAttributes,t),0]:["ol",ut(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(k5.name,this.editor.getAttributes(cu.name)).run():n.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let n=jo({find:uu,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=jo({find:uu,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(cu.name)}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1],editor:this.editor})),[n]}}),w5=un.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:n}){return["br",ut(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()}}}),Ss={BASIC:"basic",FULL:"full"},T5={class:"attachment-list"},A5={class:"attachment-link"},O5={key:1,class:"attachment-no-download"},M5=["href"],nl=p.defineComponent({__name:"BDAttachmentPreviewList",props:{files:{default:[]},showDelete:{type:Boolean,default:!1},noDownload:{type:Boolean,default:!1}},emits:["delete"],setup(n,{emit:e}){const t=r=>{e("delete",r)};return(r,o)=>(p.openBlock(),p.createElementBlock("ul",T5,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(r.files,i=>(p.openBlock(),p.createElementBlock("li",{class:"attachment-list__item",key:i.CorrelationId},[p.createElementVNode("div",A5,[r.showDelete?(p.openBlock(),p.createBlock(yt,{key:0,variant:"remove",onClick:s=>t(i),"aria-label":"verwijder"},{default:p.withCtx(()=>[p.createVNode(p.unref(no))]),_:2},1032,["onClick"])):p.createCommentVNode("",!0),r.noDownload?(p.openBlock(),p.createElementBlock("div",O5,[p.createVNode(p.unref(Kn)),p.createTextVNode(" "+p.toDisplayString(i.Naam.trim()),1)])):(p.openBlock(),p.createElementBlock("a",{key:2,href:i.downloadUrl},[p.createVNode(p.unref(Kn)),p.createTextVNode(" "+p.toDisplayString(i.Naam.trim()),1)],8,M5))])]))),128))]))}}),I5={class:"attachment-list"},N5={class:"attachment"},D5=["onClick"],R5=["src","alt"],L5=["onClick"],B5=["href"],P5={class:"btn btn-light download-button-image"},F5=["src","alt"],rl=p.defineComponent({__name:"BDImageAttachmentPreviewList",props:{fastDownload:{type:Boolean,default:!1},files:{default:void 0},showDelete:{type:Boolean,default:!1},noDownload:{type:Boolean,default:!1}},emits:["delete","show"],setup(n,{emit:e}){const t=n,r=i=>{e("delete",i)},o=(i,s)=>{i.target&&i.target.className==="img-preview"&&e("show",s)};return(i,s)=>(p.openBlock(),p.createElementBlock("ul",I5,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(i.files,l=>(p.openBlock(),p.createElementBlock("li",{class:"attachment-list__item",key:l.CorrelationId},[p.createElementVNode("div",N5,[i.showDelete?(p.openBlock(),p.createBlock(yt,{key:0,variant:"remove",onClick:a=>r(l),"aria-label":"verwijder"},{default:p.withCtx(()=>[p.createVNode(p.unref(no))]),_:2},1032,["onClick"])):p.createCommentVNode("",!0),t.noDownload?(p.openBlock(),p.createElementBlock("div",{key:1,onClick:a=>o(a,l)},[p.createElementVNode("img",{src:l.previewUrl,class:"img-preview",alt:l.altName,loading:"lazy"},null,8,R5)],8,D5)):(p.openBlock(),p.createElementBlock("div",{key:2,onClick:a=>o(a,l)},[t.fastDownload?(p.openBlock(),p.createElementBlock("a",{key:0,href:l.downloadUrl,class:"download-link"},[p.createElementVNode("button",P5,[p.createVNode(p.unref(Tu))])],8,B5)):p.createCommentVNode("",!0),p.createElementVNode("img",{src:l.previewUrl,alt:l.altName,class:"img-preview",loading:"lazy"},null,8,F5)],8,L5))])]))),128))]))}}),du=n=>n.Naam.toLowerCase().endsWith(".png")||n.Naam.toLowerCase().endsWith(".jpg")||n.Naam.toLowerCase().endsWith(".jpeg")||n.Naam.toLowerCase().endsWith(".gif"),V5=n=>n.DownloadUrl?n.DownloadUrl:n.identifier?`/Collega/api/Conversation/GetConversationAttachment?conversationId=${n.conversationId}&fileMetadataId=${n.identifier}`:n.url?n.url:n.Id?"/Portaal/DownloadBerichtBijlage/"+n.Id:n.FileId?`/Portaal/DownloadStandardMessageAttachment/${n.StandardAttachmentId}/${n.FileId}`:"/Portaal/DownloadBerichtStagingBijlage/"+n.CorrelationId,$5=n=>n.ThumbnailUrl?n.ThumbnailUrl:n.identifier?`/Collega/api/Conversation/GetConversationAttachmentThumbnail?conversationId=${n.conversationId}&fileMetadataId=${n.identifier}`:n.url?n.url:n.Id?"/Portaal/DownloadBerichtBijlageThumbnail/"+n.Id:n.StandardAttachmentId||n.standardAttachmentId?`/Portaal/DownloadStandardMessageAttachmentThumbnail/${n.StandardAttachmentId}/${n.FileId}`:"/Portaal/DownloadBerichtStagingBijlageThumbnail/"+n.CorrelationId,z5=n=>n.identifier?`/Collega/api/Conversation/GetConversationAttachment?conversationId=${n.conversationId}&fileMetadataId=${n.identifier}`:null,U5=(n,e)=>e?du(n):!du(n),fu=(n,e)=>n.filter(o=>U5(o,e)).map(o=>({downloadUrl:V5(o),previewUrl:$5(o),fullImageUrl:z5(o),altName:`${o.Naam}`,...o})),H5={class:"bd-markdown-editor__menu-bottom"},j5={key:0,class:"vr"},W5={key:4,class:"vr"},K5={key:7,class:"vr"},Gf=p.defineComponent({__name:"BDMarkdownEditor",props:{placeholder:{default:"Typ een bericht"},errorText:{default:"er is iets fout gegaan"},state:{type:Boolean,default:void 0},variant:{default:Ss.BASIC},files:{default:void 0},modelValue:{}},emits:["update:modelValue","upload","action"],setup(n,{emit:e}){const t=n,r=()=>{e("upload")},o=Xn(t,"modelValue",e),i=[Bb,Pb,Fb,l5.configure({placeholder:t.placeholder}),w5];t.variant===Ss.FULL&&i.push(p5,y5,b5,x5,S5,C5,a5.configure({openOnClick:!1,validate:E=>/^https?:\/\//.test(E)}));const s=Lb({content:o.value,extensions:i,onUpdate:({editor:E})=>{const{view:k,state:w}=E,{from:y,to:R}=k.state.selection;if(w.doc.textBetween(y-1,R,"")==" "&&E.getAttributes("link").href!=null&&E.chain().setTextSelection({from:y-1,to:R}).toggleLink({href:E.getAttributes("link").href}).setTextSelection({from:R,to:R}).run(),E.getText().trim()===""){e("update:modelValue","");return}e("update:modelValue",E.getHTML())}});p.watch(()=>t.modelValue,E=>{s.value.getHTML()!==E&&s.value.commands.setContent(E,!0,{preserveWhitespace:"full"})});const l=p.computed(()=>t.state?"is-invalid":null),a=p.computed(()=>f("bold")),c=p.computed(()=>f("italic")),u=p.computed(()=>f("underline"));p.computed(()=>f("bulletList")),p.computed(()=>f("orderedList"));const d=p.computed(()=>t.variant===Ss.FULL),f=E=>s.value&&s.value.isActive(E)?"active":null,m=p.computed(()=>t.files&&t.files.length>0?fu(t.files,!1):null),h=p.computed(()=>t.files&&t.files.length>0?fu(t.files,!0):null),g=E=>{e("action",{name:"delete-attachment",obj:E})},v=E=>{e("action",{name:"image-attachment",obj:E})};return(E,k)=>(p.openBlock(),p.createElementBlock(p.Fragment,null,[p.createElementVNode("div",{class:p.normalizeClass(["bd-markdown-editor",l.value])},[p.createVNode(p.unref(Rb),{editor:p.unref(s)},null,8,["editor"]),p.renderSlot(E.$slots,"default"),m.value?(p.openBlock(),p.createBlock(nl,{key:0,files:m.value,"no-download":!0,"show-delete":!0,onDelete:g},null,8,["files"])):p.createCommentVNode("",!0),h.value?(p.openBlock(),p.createBlock(rl,{key:1,files:h.value,"no-download":!0,"show-delete":!0,onDelete:g,onShow:v},null,8,["files"])):p.createCommentVNode("",!0),p.createElementVNode("div",H5,[p.createVNode(yt,{variant:"light",type:"button",onClick:r},{default:p.withCtx(()=>[p.createVNode(p.unref(Kn))]),_:1}),d.value?(p.openBlock(),p.createElementBlock("div",j5)):p.createCommentVNode("",!0),d.value?(p.openBlock(),p.createBlock(yt,{key:1,variant:"light",type:"button",class:p.normalizeClass(a.value),onClick:k[0]||(k[0]=w=>p.unref(s).chain().focus().toggleBold().run())},{default:p.withCtx(()=>[p.createVNode(p.unref(ha))]),_:1},8,["class"])):p.createCommentVNode("",!0),d.value?(p.openBlock(),p.createBlock(yt,{key:2,variant:"light",type:"button",class:p.normalizeClass(c.value),onClick:k[1]||(k[1]=w=>p.unref(s).chain().focus().toggleItalic().run())},{default:p.withCtx(()=>[p.createVNode(p.unref(pa))]),_:1},8,["class"])):p.createCommentVNode("",!0),d.value?(p.openBlock(),p.createBlock(yt,{key:3,variant:"light",type:"button",class:p.normalizeClass(u.value),onClick:k[2]||(k[2]=w=>p.unref(s).chain().focus().toggleUnderline().run())},{default:p.withCtx(()=>[p.createVNode(p.unref(ma))]),_:1},8,["class"])):p.createCommentVNode("",!0),d.value?(p.openBlock(),p.createElementBlock("div",W5)):p.createCommentVNode("",!0),d.value?(p.openBlock(),p.createBlock(yt,{key:5,variant:"light",type:"button",class:"IsUnderlineActive",onClick:k[3]||(k[3]=w=>p.unref(s).chain().focus().toggleUnderline().run())},{default:p.withCtx(()=>[p.createVNode(p.unref(ga))]),_:1})):p.createCommentVNode("",!0),d.value?(p.openBlock(),p.createBlock(yt,{key:6,variant:"light",type:"button",class:"IsBulletListActive",onClick:k[4]||(k[4]=w=>p.unref(s).chain().focus().toggleBulletList().run())},{default:p.withCtx(()=>[p.createVNode(p.unref(va))]),_:1})):p.createCommentVNode("",!0),d.value?(p.openBlock(),p.createElementBlock("div",K5)):p.createCommentVNode("",!0),d.value?(p.openBlock(),p.createBlock(yt,{key:8,variant:"light",type:"button",class:"IsOrderedListActive",onClick:k[5]||(k[5]=w=>p.unref(s).chain().focus().toggleOrderedList().run())},{default:p.withCtx(()=>[p.createVNode(p.unref(ya))]),_:1})):p.createCommentVNode("",!0)])],2),p.createVNode(p.unref(Ti),{text:t.errorText,state:t.state},null,8,["text","state"])],64))}}),G5={class:"bd-user"},J5={class:"bd-user__information"},Y5={class:"text-break"},Q5={class:"overflow-x-hidden"},Jf=p.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=p.computed(()=>{var r;return typeof e.details=="string"?e.details:(r=e.details)==null?void 0:r.join(" • ")});return(r,o)=>(p.openBlock(),p.createElementBlock("div",G5,[e.hideImage?p.createCommentVNode("",!0):(p.openBlock(),p.createBlock(ba,p.mergeProps({key:0},e.img,{size:"sm"}),null,16)),p.createElementVNode("div",J5,[p.createElementVNode("header",null,[p.createElementVNode("h5",Y5,p.toDisplayString(e.name),1),p.renderSlot(r.$slots,"header-extra")]),p.createElementVNode("span",Q5,p.toDisplayString(t.value),1)])]))}}),X5={class:"bd-dropdown dropdown"},Yf=p.defineComponent({__name:"BDDropdown",props:{size:{default:it.MD},variant:{default:wi.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}=ro(),r=`__BD__DROPDOWN__${t.value}`,o=p.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=p.computed(()=>({"dropdown-menu-end":e.right,"dropdown-menu-action":e.actionToggle})),s=p.computed(()=>({"aria-labelledby":r}));return(l,a)=>(p.openBlock(),p.createElementBlock("div",X5,[(p.openBlock(),p.createBlock(p.resolveDynamicComponent(e.toggleTag),p.mergeProps({class:"dropdown-toggle",target:"_self",role:"button","data-bs-toggle":"dropdown"},o.value),{default:p.withCtx(()=>[p.createElementVNode("span",null,p.toDisplayString(e.text),1)]),_:1},16)),p.createElementVNode("ul",p.mergeProps({class:["dropdown-menu",i.value]},s.value),[p.renderSlot(l.$slots,"default")],16)]))}}),Z5={class:"modal bd-modal modal-lg",tabindex:"-1"},_5={class:"modal-dialog"},q5={class:"modal-content"},e3={class:"modal-header"},t3={class:"modal-title fw-light"},n3={class:"modal-body"},r3={key:0,class:"modal-footer"},o3=["disabled"],Qf=p.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)=>(p.openBlock(),p.createElementBlock("div",Z5,[p.createElementVNode("div",_5,[p.createElementVNode("div",q5,[p.createElementVNode("div",e3,[p.createElementVNode("h2",t3,p.toDisplayString(t.title),1),p.renderSlot(i.$slots,"modal-header-space-between"),p.createElementVNode("button",{type:"button",class:"btn-close w-auto","data-bs-dismiss":"modal","aria-label":"Sluiten",onClick:o},[p.createTextVNode("Sluiten "),p.createVNode(p.unref(fa),{class:"bg-primary"})])]),p.createElementVNode("div",n3,[p.renderSlot(i.$slots,"default")]),i.hideFooter?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("div",r3,[t.hideFooterSubmitButton?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("button",{key:0,type:"button",class:"btn btn-primary",disabled:t.disableSubmitButton,onClick:r},p.toDisplayString(t.submitButtonTitle),9,o3)),t.hideFooterCancelButton?p.createCommentVNode("",!0):(p.openBlock(),p.createElementBlock("button",{key:1,type:"button",class:"btn btn-link","data-bs-dismiss":"modal",onClick:o,"aria-label":"Annuleren"},p.toDisplayString(t.closeButtonTitle),1))]))])])]))}});var Xf={exports:{}},ks={exports:{}},Cs={exports:{}};/*!
128
+ * Bootstrap data.js v5.3.0 (https://getbootstrap.com/)
129
129
  * Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
130
130
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
131
- */const An=new Map,Ca={set(n,e,t){An.has(n)||An.set(n,new Map);const r=An.get(n);if(!r.has(e)&&r.size!==0){console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(r.keys())[0]}.`);return}r.set(e,t)},get(n,e){return An.has(n)&&An.get(n).get(e)||null},remove(n,e){if(!An.has(n))return;const t=An.get(n);t.delete(e),t.size===0&&An.delete(n)}},_5=1e6,P5=1e3,gl="transitionend",Hp=n=>(n&&window.CSS&&window.CSS.escape&&(n=n.replace(/#([^\s"#']+)/g,(e,t)=>`#${CSS.escape(t)}`)),n),B5=n=>n==null?`${n}`:Object.prototype.toString.call(n).match(/\s([a-z]+)/i)[1].toLowerCase(),F5=n=>{do n+=Math.floor(Math.random()*_5);while(document.getElementById(n));return n},$5=n=>{if(!n)return 0;let{transitionDuration:e,transitionDelay:t}=window.getComputedStyle(n);const r=Number.parseFloat(e),i=Number.parseFloat(t);return!r&&!i?0:(e=e.split(",")[0],t=t.split(",")[0],(Number.parseFloat(e)+Number.parseFloat(t))*P5)},Up=n=>{n.dispatchEvent(new Event(gl))},vn=n=>!n||typeof n!="object"?!1:(typeof n.jquery<"u"&&(n=n[0]),typeof n.nodeType<"u"),Fn=n=>vn(n)?n.jquery?n[0]:n:typeof n=="string"&&n.length>0?document.querySelector(Hp(n)):null,ei=n=>{if(!vn(n)||n.getClientRects().length===0)return!1;const e=getComputedStyle(n).getPropertyValue("visibility")==="visible",t=n.closest("details:not([open])");if(!t)return e;if(t!==n){const r=n.closest("summary");if(r&&r.parentNode!==t||r===null)return!1}return e},$n=n=>!n||n.nodeType!==Node.ELEMENT_NODE||n.classList.contains("disabled")?!0:typeof n.disabled<"u"?n.disabled:n.hasAttribute("disabled")&&n.getAttribute("disabled")!=="false",jp=n=>{if(!document.documentElement.attachShadow)return null;if(typeof n.getRootNode=="function"){const e=n.getRootNode();return e instanceof ShadowRoot?e:null}return n instanceof ShadowRoot?n:n.parentNode?jp(n.parentNode):null},fs=()=>{},Vi=n=>{n.offsetHeight},Wp=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,Ta=[],V5=n=>{document.readyState==="loading"?(Ta.length||document.addEventListener("DOMContentLoaded",()=>{for(const e of Ta)e()}),Ta.push(n)):n()},Bt=()=>document.documentElement.dir==="rtl",$t=n=>{V5(()=>{const e=Wp();if(e){const t=n.NAME,r=e.fn[t];e.fn[t]=n.jQueryInterface,e.fn[t].Constructor=n,e.fn[t].noConflict=()=>(e.fn[t]=r,n.jQueryInterface)}})},vt=(n,e=[],t=n)=>typeof n=="function"?n(...e):t,Kp=(n,e,t=!0)=>{if(!t){vt(n);return}const r=5,i=$5(e)+r;let o=!1;const s=({target:l})=>{l===e&&(o=!0,e.removeEventListener(gl,s),vt(n))};e.addEventListener(gl,s),setTimeout(()=>{o||Up(e)},i)},bc=(n,e,t,r)=>{const i=n.length;let o=n.indexOf(e);return o===-1?!t&&r?n[i-1]:n[0]:(o+=t?1:-1,r&&(o=(o+i)%i),n[Math.max(0,Math.min(o,i-1))])},z5=/[^.]*(?=\..*)\.|.*/,H5=/\..*/,U5=/::\d+$/,xa={};let Md=1;const Gp={mouseenter:"mouseover",mouseleave:"mouseout"},j5=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function Yp(n,e){return e&&`${e}::${Md++}`||n.uidEvent||Md++}function Jp(n){const e=Yp(n);return n.uidEvent=e,xa[e]=xa[e]||{},xa[e]}function W5(n,e){return function t(r){return Ec(r,{delegateTarget:n}),t.oneOff&&ne.off(n,r.type,e),e.apply(n,[r])}}function K5(n,e,t){return function r(i){const o=n.querySelectorAll(e);for(let{target:s}=i;s&&s!==this;s=s.parentNode)for(const l of o)if(l===s)return Ec(i,{delegateTarget:s}),r.oneOff&&ne.off(n,i.type,e,t),t.apply(s,[i])}}function Xp(n,e,t=null){return Object.values(n).find(r=>r.callable===e&&r.delegationSelector===t)}function Qp(n,e,t){const r=typeof e=="string",i=r?t:e||t;let o=Zp(n);return j5.has(o)||(o=n),[r,i,o]}function Nd(n,e,t,r,i){if(typeof e!="string"||!n)return;let[o,s,l]=Qp(e,t,r);e in Gp&&(s=(h=>function(g){if(!g.relatedTarget||g.relatedTarget!==g.delegateTarget&&!g.delegateTarget.contains(g.relatedTarget))return h.call(this,g)})(s));const a=Jp(n),c=a[l]||(a[l]={}),u=Xp(c,s,o?t:null);if(u){u.oneOff=u.oneOff&&i;return}const d=Yp(s,e.replace(z5,"")),f=o?K5(n,t,s):W5(n,s);f.delegationSelector=o?t:null,f.callable=s,f.oneOff=i,f.uidEvent=d,c[d]=f,n.addEventListener(l,f,o)}function vl(n,e,t,r,i){const o=Xp(e[t],r,i);o&&(n.removeEventListener(t,o,!!i),delete e[t][o.uidEvent])}function G5(n,e,t,r){const i=e[t]||{};for(const[o,s]of Object.entries(i))o.includes(r)&&vl(n,e,t,s.callable,s.delegationSelector)}function Zp(n){return n=n.replace(H5,""),Gp[n]||n}const ne={on(n,e,t,r){Nd(n,e,t,r,!1)},one(n,e,t,r){Nd(n,e,t,r,!0)},off(n,e,t,r){if(typeof e!="string"||!n)return;const[i,o,s]=Qp(e,t,r),l=s!==e,a=Jp(n),c=a[s]||{},u=e.startsWith(".");if(typeof o<"u"){if(!Object.keys(c).length)return;vl(n,a,s,o,i?t:null);return}if(u)for(const d of Object.keys(a))G5(n,a,d,e.slice(1));for(const[d,f]of Object.entries(c)){const p=d.replace(U5,"");(!l||e.includes(p))&&vl(n,a,s,f.callable,f.delegationSelector)}},trigger(n,e,t){if(typeof e!="string"||!n)return null;const r=Wp(),i=Zp(e),o=e!==i;let s=null,l=!0,a=!0,c=!1;o&&r&&(s=r.Event(e,t),r(n).trigger(s),l=!s.isPropagationStopped(),a=!s.isImmediatePropagationStopped(),c=s.isDefaultPrevented());const u=Ec(new Event(e,{bubbles:l,cancelable:!0}),t);return c&&u.preventDefault(),a&&n.dispatchEvent(u),u.defaultPrevented&&s&&s.preventDefault(),u}};function Ec(n,e={}){for(const[t,r]of Object.entries(e))try{n[t]=r}catch{Object.defineProperty(n,t,{configurable:!0,get(){return r}})}return n}function Id(n){if(n==="true")return!0;if(n==="false")return!1;if(n===Number(n).toString())return Number(n);if(n===""||n==="null")return null;if(typeof n!="string")return n;try{return JSON.parse(decodeURIComponent(n))}catch{return n}}function Aa(n){return n.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}const yn={setDataAttribute(n,e,t){n.setAttribute(`data-bs-${Aa(e)}`,t)},removeDataAttribute(n,e){n.removeAttribute(`data-bs-${Aa(e)}`)},getDataAttributes(n){if(!n)return{};const e={},t=Object.keys(n.dataset).filter(r=>r.startsWith("bs")&&!r.startsWith("bsConfig"));for(const r of t){let i=r.replace(/^bs/,"");i=i.charAt(0).toLowerCase()+i.slice(1,i.length),e[i]=Id(n.dataset[r])}return e},getDataAttribute(n,e){return Id(n.getAttribute(`data-bs-${Aa(e)}`))}};class zi{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(e){return e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e}_mergeConfigObj(e,t){const r=vn(t)?yn.getDataAttribute(t,"config"):{};return{...this.constructor.Default,...typeof r=="object"?r:{},...vn(t)?yn.getDataAttributes(t):{},...typeof e=="object"?e:{}}}_typeCheckConfig(e,t=this.constructor.DefaultType){for(const[r,i]of Object.entries(t)){const o=e[r],s=vn(o)?"element":B5(o);if(!new RegExp(i).test(s))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${r}" provided type "${s}" but expected type "${i}".`)}}}const Y5="5.3.0";class Gt extends zi{constructor(e,t){super(),e=Fn(e),e&&(this._element=e,this._config=this._getConfig(t),Ca.set(this._element,this.constructor.DATA_KEY,this))}dispose(){Ca.remove(this._element,this.constructor.DATA_KEY),ne.off(this._element,this.constructor.EVENT_KEY);for(const e of Object.getOwnPropertyNames(this))this[e]=null}_queueCallback(e,t,r=!0){Kp(e,t,r)}_getConfig(e){return e=this._mergeConfigObj(e,this._element),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}static getInstance(e){return Ca.get(Fn(e),this.DATA_KEY)}static getOrCreateInstance(e,t={}){return this.getInstance(e)||new this(e,typeof t=="object"?t:null)}static get VERSION(){return Y5}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(e){return`${e}${this.EVENT_KEY}`}}const wa=n=>{let e=n.getAttribute("data-bs-target");if(!e||e==="#"){let t=n.getAttribute("href");if(!t||!t.includes("#")&&!t.startsWith("."))return null;t.includes("#")&&!t.startsWith("#")&&(t=`#${t.split("#")[1]}`),e=t&&t!=="#"?t.trim():null}return Hp(e)},ye={find(n,e=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(e,n))},findOne(n,e=document.documentElement){return Element.prototype.querySelector.call(e,n)},children(n,e){return[].concat(...n.children).filter(t=>t.matches(e))},parents(n,e){const t=[];let r=n.parentNode.closest(e);for(;r;)t.push(r),r=r.parentNode.closest(e);return t},prev(n,e){let t=n.previousElementSibling;for(;t;){if(t.matches(e))return[t];t=t.previousElementSibling}return[]},next(n,e){let t=n.nextElementSibling;for(;t;){if(t.matches(e))return[t];t=t.nextElementSibling}return[]},focusableChildren(n){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(t=>`${t}:not([tabindex^="-"])`).join(",");return this.find(e,n).filter(t=>!$n(t)&&ei(t))},getSelectorFromElement(n){const e=wa(n);return e&&ye.findOne(e)?e:null},getElementFromSelector(n){const e=wa(n);return e?ye.findOne(e):null},getMultipleElementsFromSelector(n){const e=wa(n);return e?ye.find(e):[]}},Fs=(n,e="hide")=>{const t=`click.dismiss${n.EVENT_KEY}`,r=n.NAME;ne.on(document,t,`[data-bs-dismiss="${r}"]`,function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),$n(this))return;const o=ye.getElementFromSelector(this)||this.closest(`.${r}`);n.getOrCreateInstance(o)[e]()})},J5="alert",X5="bs.alert",qp=`.${X5}`,Q5=`close${qp}`,Z5=`closed${qp}`,q5="fade",e3="show";class $s extends Gt{static get NAME(){return J5}close(){if(ne.trigger(this._element,Q5).defaultPrevented)return;this._element.classList.remove(e3);const t=this._element.classList.contains(q5);this._queueCallback(()=>this._destroyElement(),this._element,t)}_destroyElement(){this._element.remove(),ne.trigger(this._element,Z5),this.dispose()}static jQueryInterface(e){return this.each(function(){const t=$s.getOrCreateInstance(this);if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e](this)}})}}Fs($s,"close");$t($s);const t3="button",n3="bs.button",r3=`.${n3}`,i3=".data-api",o3="active",Dd='[data-bs-toggle="button"]',s3=`click${r3}${i3}`;class Vs extends Gt{static get NAME(){return t3}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(o3))}static jQueryInterface(e){return this.each(function(){const t=Vs.getOrCreateInstance(this);e==="toggle"&&t[e]()})}}ne.on(document,s3,Dd,n=>{n.preventDefault();const e=n.target.closest(Dd);Vs.getOrCreateInstance(e).toggle()});$t(Vs);const a3="swipe",ti=".bs.swipe",l3=`touchstart${ti}`,c3=`touchmove${ti}`,u3=`touchend${ti}`,d3=`pointerdown${ti}`,f3=`pointerup${ti}`,h3="touch",p3="pen",m3="pointer-event",g3=40,v3={endCallback:null,leftCallback:null,rightCallback:null},y3={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class hs extends zi{constructor(e,t){super(),this._element=e,!(!e||!hs.isSupported())&&(this._config=this._getConfig(t),this._deltaX=0,this._supportPointerEvents=!!window.PointerEvent,this._initEvents())}static get Default(){return v3}static get DefaultType(){return y3}static get NAME(){return a3}dispose(){ne.off(this._element,ti)}_start(e){if(!this._supportPointerEvents){this._deltaX=e.touches[0].clientX;return}this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX)}_end(e){this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX-this._deltaX),this._handleSwipe(),vt(this._config.endCallback)}_move(e){this._deltaX=e.touches&&e.touches.length>1?0:e.touches[0].clientX-this._deltaX}_handleSwipe(){const e=Math.abs(this._deltaX);if(e<=g3)return;const t=e/this._deltaX;this._deltaX=0,t&&vt(t>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(ne.on(this._element,d3,e=>this._start(e)),ne.on(this._element,f3,e=>this._end(e)),this._element.classList.add(m3)):(ne.on(this._element,l3,e=>this._start(e)),ne.on(this._element,c3,e=>this._move(e)),ne.on(this._element,u3,e=>this._end(e)))}_eventIsPointerPenTouch(e){return this._supportPointerEvents&&(e.pointerType===p3||e.pointerType===h3)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const b3="carousel",E3="bs.carousel",Wn=`.${E3}`,em=".data-api",S3="ArrowLeft",C3="ArrowRight",T3=500,ii="next",Cr="prev",Mr="left",po="right",x3=`slide${Wn}`,ka=`slid${Wn}`,A3=`keydown${Wn}`,w3=`mouseenter${Wn}`,k3=`mouseleave${Wn}`,O3=`dragstart${Wn}`,M3=`load${Wn}${em}`,N3=`click${Wn}${em}`,tm="carousel",no="active",I3="slide",D3="carousel-item-end",R3="carousel-item-start",L3="carousel-item-next",_3="carousel-item-prev",nm=".active",rm=".carousel-item",P3=nm+rm,B3=".carousel-item img",F3=".carousel-indicators",$3="[data-bs-slide], [data-bs-slide-to]",V3='[data-bs-ride="carousel"]',z3={[S3]:po,[C3]:Mr},H3={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},U3={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Hi extends Gt{constructor(e,t){super(e,t),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=ye.findOne(F3,this._element),this._addEventListeners(),this._config.ride===tm&&this.cycle()}static get Default(){return H3}static get DefaultType(){return U3}static get NAME(){return b3}next(){this._slide(ii)}nextWhenVisible(){!document.hidden&&ei(this._element)&&this.next()}prev(){this._slide(Cr)}pause(){this._isSliding&&Up(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){if(this._config.ride){if(this._isSliding){ne.one(this._element,ka,()=>this.cycle());return}this.cycle()}}to(e){const t=this._getItems();if(e>t.length-1||e<0)return;if(this._isSliding){ne.one(this._element,ka,()=>this.to(e));return}const r=this._getItemIndex(this._getActive());if(r===e)return;const i=e>r?ii:Cr;this._slide(i,t[e])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(e){return e.defaultInterval=e.interval,e}_addEventListeners(){this._config.keyboard&&ne.on(this._element,A3,e=>this._keydown(e)),this._config.pause==="hover"&&(ne.on(this._element,w3,()=>this.pause()),ne.on(this._element,k3,()=>this._maybeEnableCycle())),this._config.touch&&hs.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const r of ye.find(B3,this._element))ne.on(r,O3,i=>i.preventDefault());const t={leftCallback:()=>this._slide(this._directionToOrder(Mr)),rightCallback:()=>this._slide(this._directionToOrder(po)),endCallback:()=>{this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),T3+this._config.interval))}};this._swipeHelper=new hs(this._element,t)}_keydown(e){if(/input|textarea/i.test(e.target.tagName))return;const t=z3[e.key];t&&(e.preventDefault(),this._slide(this._directionToOrder(t)))}_getItemIndex(e){return this._getItems().indexOf(e)}_setActiveIndicatorElement(e){if(!this._indicatorsElement)return;const t=ye.findOne(nm,this._indicatorsElement);t.classList.remove(no),t.removeAttribute("aria-current");const r=ye.findOne(`[data-bs-slide-to="${e}"]`,this._indicatorsElement);r&&(r.classList.add(no),r.setAttribute("aria-current","true"))}_updateInterval(){const e=this._activeElement||this._getActive();if(!e)return;const t=Number.parseInt(e.getAttribute("data-bs-interval"),10);this._config.interval=t||this._config.defaultInterval}_slide(e,t=null){if(this._isSliding)return;const r=this._getActive(),i=e===ii,o=t||bc(this._getItems(),r,i,this._config.wrap);if(o===r)return;const s=this._getItemIndex(o),l=p=>ne.trigger(this._element,p,{relatedTarget:o,direction:this._orderToDirection(e),from:this._getItemIndex(r),to:s});if(l(x3).defaultPrevented||!r||!o)return;const c=!!this._interval;this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(s),this._activeElement=o;const u=i?R3:D3,d=i?L3:_3;o.classList.add(d),Vi(o),r.classList.add(u),o.classList.add(u);const f=()=>{o.classList.remove(u,d),o.classList.add(no),r.classList.remove(no,d,u),this._isSliding=!1,l(ka)};this._queueCallback(f,r,this._isAnimated()),c&&this.cycle()}_isAnimated(){return this._element.classList.contains(I3)}_getActive(){return ye.findOne(P3,this._element)}_getItems(){return ye.find(rm,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(e){return Bt()?e===Mr?Cr:ii:e===Mr?ii:Cr}_orderToDirection(e){return Bt()?e===Cr?Mr:po:e===Cr?po:Mr}static jQueryInterface(e){return this.each(function(){const t=Hi.getOrCreateInstance(this,e);if(typeof e=="number"){t.to(e);return}if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e]()}})}}ne.on(document,N3,$3,function(n){const e=ye.getElementFromSelector(this);if(!e||!e.classList.contains(tm))return;n.preventDefault();const t=Hi.getOrCreateInstance(e),r=this.getAttribute("data-bs-slide-to");if(r){t.to(r),t._maybeEnableCycle();return}if(yn.getDataAttribute(this,"slide")==="next"){t.next(),t._maybeEnableCycle();return}t.prev(),t._maybeEnableCycle()});ne.on(window,M3,()=>{const n=ye.find(V3);for(const e of n)Hi.getOrCreateInstance(e)});$t(Hi);const j3="collapse",W3="bs.collapse",Ui=`.${W3}`,K3=".data-api",G3=`show${Ui}`,Y3=`shown${Ui}`,J3=`hide${Ui}`,X3=`hidden${Ui}`,Q3=`click${Ui}${K3}`,Oa="show",Lr="collapse",ro="collapsing",Z3="collapsed",q3=`:scope .${Lr} .${Lr}`,eC="collapse-horizontal",tC="width",nC="height",rC=".collapse.show, .collapse.collapsing",yl='[data-bs-toggle="collapse"]',iC={parent:null,toggle:!0},oC={parent:"(null|element)",toggle:"boolean"};class Li extends Gt{constructor(e,t){super(e,t),this._isTransitioning=!1,this._triggerArray=[];const r=ye.find(yl);for(const i of r){const o=ye.getSelectorFromElement(i),s=ye.find(o).filter(l=>l===this._element);o!==null&&s.length&&this._triggerArray.push(i)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return iC}static get DefaultType(){return oC}static get NAME(){return j3}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let e=[];if(this._config.parent&&(e=this._getFirstLevelChildren(rC).filter(l=>l!==this._element).map(l=>Li.getOrCreateInstance(l,{toggle:!1}))),e.length&&e[0]._isTransitioning||ne.trigger(this._element,G3).defaultPrevented)return;for(const l of e)l.hide();const r=this._getDimension();this._element.classList.remove(Lr),this._element.classList.add(ro),this._element.style[r]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const i=()=>{this._isTransitioning=!1,this._element.classList.remove(ro),this._element.classList.add(Lr,Oa),this._element.style[r]="",ne.trigger(this._element,Y3)},s=`scroll${r[0].toUpperCase()+r.slice(1)}`;this._queueCallback(i,this._element,!0),this._element.style[r]=`${this._element[s]}px`}hide(){if(this._isTransitioning||!this._isShown()||ne.trigger(this._element,J3).defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,Vi(this._element),this._element.classList.add(ro),this._element.classList.remove(Lr,Oa);for(const i of this._triggerArray){const o=ye.getElementFromSelector(i);o&&!this._isShown(o)&&this._addAriaAndCollapsedClass([i],!1)}this._isTransitioning=!0;const r=()=>{this._isTransitioning=!1,this._element.classList.remove(ro),this._element.classList.add(Lr),ne.trigger(this._element,X3)};this._element.style[t]="",this._queueCallback(r,this._element,!0)}_isShown(e=this._element){return e.classList.contains(Oa)}_configAfterMerge(e){return e.toggle=!!e.toggle,e.parent=Fn(e.parent),e}_getDimension(){return this._element.classList.contains(eC)?tC:nC}_initializeChildren(){if(!this._config.parent)return;const e=this._getFirstLevelChildren(yl);for(const t of e){const r=ye.getElementFromSelector(t);r&&this._addAriaAndCollapsedClass([t],this._isShown(r))}}_getFirstLevelChildren(e){const t=ye.find(q3,this._config.parent);return ye.find(e,this._config.parent).filter(r=>!t.includes(r))}_addAriaAndCollapsedClass(e,t){if(e.length)for(const r of e)r.classList.toggle(Z3,!t),r.setAttribute("aria-expanded",t)}static jQueryInterface(e){const t={};return typeof e=="string"&&/show|hide/.test(e)&&(t.toggle=!1),this.each(function(){const r=Li.getOrCreateInstance(this,t);if(typeof e=="string"){if(typeof r[e]>"u")throw new TypeError(`No method named "${e}"`);r[e]()}})}}ne.on(document,Q3,yl,function(n){(n.target.tagName==="A"||n.delegateTarget&&n.delegateTarget.tagName==="A")&&n.preventDefault();for(const e of ye.getMultipleElementsFromSelector(this))Li.getOrCreateInstance(e,{toggle:!1}).toggle()});$t(Li);const Rd="dropdown",sC="bs.dropdown",mr=`.${sC}`,Sc=".data-api",aC="Escape",Ld="Tab",lC="ArrowUp",_d="ArrowDown",cC=2,uC=`hide${mr}`,dC=`hidden${mr}`,fC=`show${mr}`,hC=`shown${mr}`,im=`click${mr}${Sc}`,om=`keydown${mr}${Sc}`,pC=`keyup${mr}${Sc}`,Nr="show",mC="dropup",gC="dropend",vC="dropstart",yC="dropup-center",bC="dropdown-center",tr='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',EC=`${tr}.${Nr}`,mo=".dropdown-menu",SC=".navbar",CC=".navbar-nav",TC=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",xC=Bt()?"top-end":"top-start",AC=Bt()?"top-start":"top-end",wC=Bt()?"bottom-end":"bottom-start",kC=Bt()?"bottom-start":"bottom-end",OC=Bt()?"left-start":"right-start",MC=Bt()?"right-start":"left-start",NC="top",IC="bottom",DC={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},RC={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class rn extends Gt{constructor(e,t){super(e,t),this._popper=null,this._parent=this._element.parentNode,this._menu=ye.next(this._element,mo)[0]||ye.prev(this._element,mo)[0]||ye.findOne(mo,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return DC}static get DefaultType(){return RC}static get NAME(){return Rd}toggle(){return this._isShown()?this.hide():this.show()}show(){if($n(this._element)||this._isShown())return;const e={relatedTarget:this._element};if(!ne.trigger(this._element,fC,e).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(CC))for(const r of[].concat(...document.body.children))ne.on(r,"mouseover",fs);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Nr),this._element.classList.add(Nr),ne.trigger(this._element,hC,e)}}hide(){if($n(this._element)||!this._isShown())return;const e={relatedTarget:this._element};this._completeHide(e)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(e){if(!ne.trigger(this._element,uC,e).defaultPrevented){if("ontouchstart"in document.documentElement)for(const r of[].concat(...document.body.children))ne.off(r,"mouseover",fs);this._popper&&this._popper.destroy(),this._menu.classList.remove(Nr),this._element.classList.remove(Nr),this._element.setAttribute("aria-expanded","false"),yn.removeDataAttribute(this._menu,"popper"),ne.trigger(this._element,dC,e)}}_getConfig(e){if(e=super._getConfig(e),typeof e.reference=="object"&&!vn(e.reference)&&typeof e.reference.getBoundingClientRect!="function")throw new TypeError(`${Rd.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return e}_createPopper(){if(typeof bp>"u")throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let e=this._element;this._config.reference==="parent"?e=this._parent:vn(this._config.reference)?e=Fn(this._config.reference):typeof this._config.reference=="object"&&(e=this._config.reference);const t=this._getPopperConfig();this._popper=Ps(e,this._menu,t)}_isShown(){return this._menu.classList.contains(Nr)}_getPlacement(){const e=this._parent;if(e.classList.contains(gC))return OC;if(e.classList.contains(vC))return MC;if(e.classList.contains(yC))return NC;if(e.classList.contains(bC))return IC;const t=getComputedStyle(this._menu).getPropertyValue("--bs-position").trim()==="end";return e.classList.contains(mC)?t?AC:xC:t?kC:wC}_detectNavbar(){return this._element.closest(SC)!==null}_getOffset(){const{offset:e}=this._config;return typeof e=="string"?e.split(",").map(t=>Number.parseInt(t,10)):typeof e=="function"?t=>e(t,this._element):e}_getPopperConfig(){const e={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||this._config.display==="static")&&(yn.setDataAttribute(this._menu,"popper","static"),e.modifiers=[{name:"applyStyles",enabled:!1}]),{...e,...vt(this._config.popperConfig,[e])}}_selectMenuItem({key:e,target:t}){const r=ye.find(TC,this._menu).filter(i=>ei(i));r.length&&bc(r,t,e===_d,!r.includes(t)).focus()}static jQueryInterface(e){return this.each(function(){const t=rn.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof t[e]>"u")throw new TypeError(`No method named "${e}"`);t[e]()}})}static clearMenus(e){if(e.button===cC||e.type==="keyup"&&e.key!==Ld)return;const t=ye.find(EC);for(const r of t){const i=rn.getInstance(r);if(!i||i._config.autoClose===!1)continue;const o=e.composedPath(),s=o.includes(i._menu);if(o.includes(i._element)||i._config.autoClose==="inside"&&!s||i._config.autoClose==="outside"&&s||i._menu.contains(e.target)&&(e.type==="keyup"&&e.key===Ld||/input|select|option|textarea|form/i.test(e.target.tagName)))continue;const l={relatedTarget:i._element};e.type==="click"&&(l.clickEvent=e),i._completeHide(l)}}static dataApiKeydownHandler(e){const t=/input|textarea/i.test(e.target.tagName),r=e.key===aC,i=[lC,_d].includes(e.key);if(!i&&!r||t&&!r)return;e.preventDefault();const o=this.matches(tr)?this:ye.prev(this,tr)[0]||ye.next(this,tr)[0]||ye.findOne(tr,e.delegateTarget.parentNode),s=rn.getOrCreateInstance(o);if(i){e.stopPropagation(),s.show(),s._selectMenuItem(e);return}s._isShown()&&(e.stopPropagation(),s.hide(),o.focus())}}ne.on(document,om,tr,rn.dataApiKeydownHandler);ne.on(document,om,mo,rn.dataApiKeydownHandler);ne.on(document,im,rn.clearMenus);ne.on(document,pC,rn.clearMenus);ne.on(document,im,tr,function(n){n.preventDefault(),rn.getOrCreateInstance(this).toggle()});$t(rn);const sm="backdrop",LC="fade",Pd="show",Bd=`mousedown.bs.${sm}`,_C={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},PC={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class am extends zi{constructor(e){super(),this._config=this._getConfig(e),this._isAppended=!1,this._element=null}static get Default(){return _C}static get DefaultType(){return PC}static get NAME(){return sm}show(e){if(!this._config.isVisible){vt(e);return}this._append();const t=this._getElement();this._config.isAnimated&&Vi(t),t.classList.add(Pd),this._emulateAnimation(()=>{vt(e)})}hide(e){if(!this._config.isVisible){vt(e);return}this._getElement().classList.remove(Pd),this._emulateAnimation(()=>{this.dispose(),vt(e)})}dispose(){this._isAppended&&(ne.off(this._element,Bd),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const e=document.createElement("div");e.className=this._config.className,this._config.isAnimated&&e.classList.add(LC),this._element=e}return this._element}_configAfterMerge(e){return e.rootElement=Fn(e.rootElement),e}_append(){if(this._isAppended)return;const e=this._getElement();this._config.rootElement.append(e),ne.on(e,Bd,()=>{vt(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(e){Kp(e,this._getElement(),this._config.isAnimated)}}const BC="focustrap",FC="bs.focustrap",ps=`.${FC}`,$C=`focusin${ps}`,VC=`keydown.tab${ps}`,zC="Tab",HC="forward",Fd="backward",UC={autofocus:!0,trapElement:null},jC={autofocus:"boolean",trapElement:"element"};class lm extends zi{constructor(e){super(),this._config=this._getConfig(e),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return UC}static get DefaultType(){return jC}static get NAME(){return BC}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),ne.off(document,ps),ne.on(document,$C,e=>this._handleFocusin(e)),ne.on(document,VC,e=>this._handleKeydown(e)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,ne.off(document,ps))}_handleFocusin(e){const{trapElement:t}=this._config;if(e.target===document||e.target===t||t.contains(e.target))return;const r=ye.focusableChildren(t);r.length===0?t.focus():this._lastTabNavDirection===Fd?r[r.length-1].focus():r[0].focus()}_handleKeydown(e){e.key===zC&&(this._lastTabNavDirection=e.shiftKey?Fd:HC)}}const $d=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",Vd=".sticky-top",io="padding-right",zd="margin-right";class bl{constructor(){this._element=document.body}getWidth(){const e=document.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}hide(){const e=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,io,t=>t+e),this._setElementAttributes($d,io,t=>t+e),this._setElementAttributes(Vd,zd,t=>t-e)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,io),this._resetElementAttributes($d,io),this._resetElementAttributes(Vd,zd)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(e,t,r){const i=this.getWidth(),o=s=>{if(s!==this._element&&window.innerWidth>s.clientWidth+i)return;this._saveInitialAttribute(s,t);const l=window.getComputedStyle(s).getPropertyValue(t);s.style.setProperty(t,`${r(Number.parseFloat(l))}px`)};this._applyManipulationCallback(e,o)}_saveInitialAttribute(e,t){const r=e.style.getPropertyValue(t);r&&yn.setDataAttribute(e,t,r)}_resetElementAttributes(e,t){const r=i=>{const o=yn.getDataAttribute(i,t);if(o===null){i.style.removeProperty(t);return}yn.removeDataAttribute(i,t),i.style.setProperty(t,o)};this._applyManipulationCallback(e,r)}_applyManipulationCallback(e,t){if(vn(e)){t(e);return}for(const r of ye.find(e,this._element))t(r)}}const WC="modal",KC="bs.modal",Ft=`.${KC}`,GC=".data-api",YC="Escape",JC=`hide${Ft}`,XC=`hidePrevented${Ft}`,cm=`hidden${Ft}`,um=`show${Ft}`,QC=`shown${Ft}`,ZC=`resize${Ft}`,qC=`click.dismiss${Ft}`,eT=`mousedown.dismiss${Ft}`,tT=`keydown.dismiss${Ft}`,nT=`click${Ft}${GC}`,Hd="modal-open",rT="fade",Ud="show",Ma="modal-static",iT=".modal.show",oT=".modal-dialog",sT=".modal-body",aT='[data-bs-toggle="modal"]',lT={backdrop:!0,focus:!0,keyboard:!0},cT={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class Jr extends Gt{constructor(e,t){super(e,t),this._dialog=ye.findOne(oT,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new bl,this._addEventListeners()}static get Default(){return lT}static get DefaultType(){return cT}static get NAME(){return WC}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){this._isShown||this._isTransitioning||ne.trigger(this._element,um,{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(Hd),this._adjustDialog(),this._backdrop.show(()=>this._showElement(e)))}hide(){!this._isShown||this._isTransitioning||ne.trigger(this._element,JC).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(Ud),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated()))}dispose(){ne.off(window,Ft),ne.off(this._dialog,Ft),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new am({isVisible:!!this._config.backdrop,isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new lm({trapElement:this._element})}_showElement(e){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const t=ye.findOne(sT,this._dialog);t&&(t.scrollTop=0),Vi(this._element),this._element.classList.add(Ud);const r=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,ne.trigger(this._element,QC,{relatedTarget:e})};this._queueCallback(r,this._dialog,this._isAnimated())}_addEventListeners(){ne.on(this._element,tT,e=>{if(e.key===YC){if(this._config.keyboard){this.hide();return}this._triggerBackdropTransition()}}),ne.on(window,ZC,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),ne.on(this._element,eT,e=>{ne.one(this._element,qC,t=>{if(!(this._element!==e.target||this._element!==t.target)){if(this._config.backdrop==="static"){this._triggerBackdropTransition();return}this._config.backdrop&&this.hide()}})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(Hd),this._resetAdjustments(),this._scrollBar.reset(),ne.trigger(this._element,cm)})}_isAnimated(){return this._element.classList.contains(rT)}_triggerBackdropTransition(){if(ne.trigger(this._element,XC).defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight,r=this._element.style.overflowY;r==="hidden"||this._element.classList.contains(Ma)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add(Ma),this._queueCallback(()=>{this._element.classList.remove(Ma),this._queueCallback(()=>{this._element.style.overflowY=r},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._scrollBar.getWidth(),r=t>0;if(r&&!e){const i=Bt()?"paddingLeft":"paddingRight";this._element.style[i]=`${t}px`}if(!r&&e){const i=Bt()?"paddingRight":"paddingLeft";this._element.style[i]=`${t}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(e,t){return this.each(function(){const r=Jr.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof r[e]>"u")throw new TypeError(`No method named "${e}"`);r[e](t)}})}}ne.on(document,nT,aT,function(n){const e=ye.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&n.preventDefault(),ne.one(e,um,i=>{i.defaultPrevented||ne.one(e,cm,()=>{ei(this)&&this.focus()})});const t=ye.findOne(iT);t&&Jr.getInstance(t).hide(),Jr.getOrCreateInstance(e).toggle(this)});Fs(Jr);$t(Jr);const uT="offcanvas",dT="bs.offcanvas",En=`.${dT}`,dm=".data-api",fT=`load${En}${dm}`,hT="Escape",jd="show",Wd="showing",Kd="hiding",pT="offcanvas-backdrop",fm=".offcanvas.show",mT=`show${En}`,gT=`shown${En}`,vT=`hide${En}`,Gd=`hidePrevented${En}`,hm=`hidden${En}`,yT=`resize${En}`,bT=`click${En}${dm}`,ET=`keydown.dismiss${En}`,ST='[data-bs-toggle="offcanvas"]',CT={backdrop:!0,keyboard:!0,scroll:!1},TT={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class Vn extends Gt{constructor(e,t){super(e,t),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return CT}static get DefaultType(){return TT}static get NAME(){return uT}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){if(this._isShown||ne.trigger(this._element,mT,{relatedTarget:e}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||new bl().hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(Wd);const r=()=>{(!this._config.scroll||this._config.backdrop)&&this._focustrap.activate(),this._element.classList.add(jd),this._element.classList.remove(Wd),ne.trigger(this._element,gT,{relatedTarget:e})};this._queueCallback(r,this._element,!0)}hide(){if(!this._isShown||ne.trigger(this._element,vT).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(Kd),this._backdrop.hide();const t=()=>{this._element.classList.remove(jd,Kd),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||new bl().reset(),ne.trigger(this._element,hm)};this._queueCallback(t,this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const e=()=>{if(this._config.backdrop==="static"){ne.trigger(this._element,Gd);return}this.hide()},t=!!this._config.backdrop;return new am({className:pT,isVisible:t,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:t?e:null})}_initializeFocusTrap(){return new lm({trapElement:this._element})}_addEventListeners(){ne.on(this._element,ET,e=>{if(e.key===hT){if(this._config.keyboard){this.hide();return}ne.trigger(this._element,Gd)}})}static jQueryInterface(e){return this.each(function(){const t=Vn.getOrCreateInstance(this,e);if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e](this)}})}}ne.on(document,bT,ST,function(n){const e=ye.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&n.preventDefault(),$n(this))return;ne.one(e,hm,()=>{ei(this)&&this.focus()});const t=ye.findOne(fm);t&&t!==e&&Vn.getInstance(t).hide(),Vn.getOrCreateInstance(e).toggle(this)});ne.on(window,fT,()=>{for(const n of ye.find(fm))Vn.getOrCreateInstance(n).show()});ne.on(window,yT,()=>{for(const n of ye.find("[aria-modal][class*=show][class*=offcanvas-]"))getComputedStyle(n).position!=="fixed"&&Vn.getOrCreateInstance(n).hide()});Fs(Vn);$t(Vn);const xT=/^aria-[\w-]*$/i,pm={"*":["class","dir","id","lang","role",xT],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},AT=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),wT=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,kT=(n,e)=>{const t=n.nodeName.toLowerCase();return e.includes(t)?AT.has(t)?!!wT.test(n.nodeValue):!0:e.filter(r=>r instanceof RegExp).some(r=>r.test(t))};function OT(n,e,t){if(!n.length)return n;if(t&&typeof t=="function")return t(n);const i=new window.DOMParser().parseFromString(n,"text/html"),o=[].concat(...i.body.querySelectorAll("*"));for(const s of o){const l=s.nodeName.toLowerCase();if(!Object.keys(e).includes(l)){s.remove();continue}const a=[].concat(...s.attributes),c=[].concat(e["*"]||[],e[l]||[]);for(const u of a)kT(u,c)||s.removeAttribute(u.nodeName)}return i.body.innerHTML}const MT="TemplateFactory",NT={allowList:pm,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"<div></div>"},IT={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},DT={entry:"(string|element|function|null)",selector:"(string|element)"};class RT extends zi{constructor(e){super(),this._config=this._getConfig(e)}static get Default(){return NT}static get DefaultType(){return IT}static get NAME(){return MT}getContent(){return Object.values(this._config.content).map(e=>this._resolvePossibleFunction(e)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(e){return this._checkContent(e),this._config.content={...this._config.content,...e},this}toHtml(){const e=document.createElement("div");e.innerHTML=this._maybeSanitize(this._config.template);for(const[i,o]of Object.entries(this._config.content))this._setContent(e,o,i);const t=e.children[0],r=this._resolvePossibleFunction(this._config.extraClass);return r&&t.classList.add(...r.split(" ")),t}_typeCheckConfig(e){super._typeCheckConfig(e),this._checkContent(e.content)}_checkContent(e){for(const[t,r]of Object.entries(e))super._typeCheckConfig({selector:t,entry:r},DT)}_setContent(e,t,r){const i=ye.findOne(r,e);if(i){if(t=this._resolvePossibleFunction(t),!t){i.remove();return}if(vn(t)){this._putElementInTemplate(Fn(t),i);return}if(this._config.html){i.innerHTML=this._maybeSanitize(t);return}i.textContent=t}}_maybeSanitize(e){return this._config.sanitize?OT(e,this._config.allowList,this._config.sanitizeFn):e}_resolvePossibleFunction(e){return vt(e,[this])}_putElementInTemplate(e,t){if(this._config.html){t.innerHTML="",t.append(e);return}t.textContent=e.textContent}}const LT="tooltip",_T=new Set(["sanitize","allowList","sanitizeFn"]),Na="fade",PT="modal",oo="show",BT=".tooltip-inner",Yd=`.${PT}`,Jd="hide.bs.modal",oi="hover",Ia="focus",FT="click",$T="manual",VT="hide",zT="hidden",HT="show",UT="shown",jT="inserted",WT="click",KT="focusin",GT="focusout",YT="mouseenter",JT="mouseleave",XT={AUTO:"auto",TOP:"top",RIGHT:Bt()?"left":"right",BOTTOM:"bottom",LEFT:Bt()?"right":"left"},QT={allowList:pm,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',title:"",trigger:"hover focus"},ZT={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class ni extends Gt{constructor(e,t){if(typeof bp>"u")throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(e,t),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return QT}static get DefaultType(){return ZT}static get NAME(){return LT}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){if(this._isEnabled){if(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()){this._leave();return}this._enter()}}dispose(){clearTimeout(this._timeout),ne.off(this._element.closest(Yd),Jd,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if(this._element.style.display==="none")throw new Error("Please use show on visible elements");if(!(this._isWithContent()&&this._isEnabled))return;const e=ne.trigger(this._element,this.constructor.eventName(HT)),r=(jp(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(e.defaultPrevented||!r)return;this._disposePopper();const i=this._getTipElement();this._element.setAttribute("aria-describedby",i.getAttribute("id"));const{container:o}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(o.append(i),ne.trigger(this._element,this.constructor.eventName(jT))),this._popper=this._createPopper(i),i.classList.add(oo),"ontouchstart"in document.documentElement)for(const l of[].concat(...document.body.children))ne.on(l,"mouseover",fs);const s=()=>{ne.trigger(this._element,this.constructor.eventName(UT)),this._isHovered===!1&&this._leave(),this._isHovered=!1};this._queueCallback(s,this.tip,this._isAnimated())}hide(){if(!this._isShown()||ne.trigger(this._element,this.constructor.eventName(VT)).defaultPrevented)return;if(this._getTipElement().classList.remove(oo),"ontouchstart"in document.documentElement)for(const i of[].concat(...document.body.children))ne.off(i,"mouseover",fs);this._activeTrigger[FT]=!1,this._activeTrigger[Ia]=!1,this._activeTrigger[oi]=!1,this._isHovered=null;const r=()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),ne.trigger(this._element,this.constructor.eventName(zT)))};this._queueCallback(r,this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return!!this._getTitle()}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(e){const t=this._getTemplateFactory(e).toHtml();if(!t)return null;t.classList.remove(Na,oo),t.classList.add(`bs-${this.constructor.NAME}-auto`);const r=F5(this.constructor.NAME).toString();return t.setAttribute("id",r),this._isAnimated()&&t.classList.add(Na),t}setContent(e){this._newContent=e,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(e){return this._templateFactory?this._templateFactory.changeContent(e):this._templateFactory=new RT({...this._config,content:e,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[BT]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(e){return this.constructor.getOrCreateInstance(e.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(Na)}_isShown(){return this.tip&&this.tip.classList.contains(oo)}_createPopper(e){const t=vt(this._config.placement,[this,e,this._element]),r=XT[t.toUpperCase()];return Ps(this._element,e,this._getPopperConfig(r))}_getOffset(){const{offset:e}=this._config;return typeof e=="string"?e.split(",").map(t=>Number.parseInt(t,10)):typeof e=="function"?t=>e(t,this._element):e}_resolvePossibleFunction(e){return vt(e,[this._element])}_getPopperConfig(e){const t={placement:e,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:r=>{this._getTipElement().setAttribute("data-popper-placement",r.state.placement)}}]};return{...t,...vt(this._config.popperConfig,[t])}}_setListeners(){const e=this._config.trigger.split(" ");for(const t of e)if(t==="click")ne.on(this._element,this.constructor.eventName(WT),this._config.selector,r=>{this._initializeOnDelegatedTarget(r).toggle()});else if(t!==$T){const r=t===oi?this.constructor.eventName(YT):this.constructor.eventName(KT),i=t===oi?this.constructor.eventName(JT):this.constructor.eventName(GT);ne.on(this._element,r,this._config.selector,o=>{const s=this._initializeOnDelegatedTarget(o);s._activeTrigger[o.type==="focusin"?Ia:oi]=!0,s._enter()}),ne.on(this._element,i,this._config.selector,o=>{const s=this._initializeOnDelegatedTarget(o);s._activeTrigger[o.type==="focusout"?Ia:oi]=s._element.contains(o.relatedTarget),s._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},ne.on(this._element.closest(Yd),Jd,this._hideModalHandler)}_fixTitle(){const e=this._element.getAttribute("title");e&&(!this._element.getAttribute("aria-label")&&!this._element.textContent.trim()&&this._element.setAttribute("aria-label",e),this._element.setAttribute("data-bs-original-title",e),this._element.removeAttribute("title"))}_enter(){if(this._isShown()||this._isHovered){this._isHovered=!0;return}this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show)}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(e,t){clearTimeout(this._timeout),this._timeout=setTimeout(e,t)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(e){const t=yn.getDataAttributes(this._element);for(const r of Object.keys(t))_T.has(r)&&delete t[r];return e={...t,...typeof e=="object"&&e?e:{}},e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e.container=e.container===!1?document.body:Fn(e.container),typeof e.delay=="number"&&(e.delay={show:e.delay,hide:e.delay}),typeof e.title=="number"&&(e.title=e.title.toString()),typeof e.content=="number"&&(e.content=e.content.toString()),e}_getDelegateConfig(){const e={};for(const[t,r]of Object.entries(this._config))this.constructor.Default[t]!==r&&(e[t]=r);return e.selector=!1,e.trigger="manual",e}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(e){return this.each(function(){const t=ni.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof t[e]>"u")throw new TypeError(`No method named "${e}"`);t[e]()}})}}$t(ni);const qT="popover",ex=".popover-header",tx=".popover-body",nx={...ni.Default,content:"",offset:[0,8],placement:"right",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>',trigger:"click"},rx={...ni.DefaultType,content:"(null|string|element|function)"};class Cc extends ni{static get Default(){return nx}static get DefaultType(){return rx}static get NAME(){return qT}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[ex]:this._getTitle(),[tx]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(e){return this.each(function(){const t=Cc.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof t[e]>"u")throw new TypeError(`No method named "${e}"`);t[e]()}})}}$t(Cc);const ix="scrollspy",ox="bs.scrollspy",Tc=`.${ox}`,sx=".data-api",ax=`activate${Tc}`,Xd=`click${Tc}`,lx=`load${Tc}${sx}`,cx="dropdown-item",Tr="active",ux='[data-bs-spy="scroll"]',Da="[href]",dx=".nav, .list-group",Qd=".nav-link",fx=".nav-item",hx=".list-group-item",px=`${Qd}, ${fx} > ${Qd}, ${hx}`,mx=".dropdown",gx=".dropdown-toggle",vx={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},yx={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class zs extends Gt{constructor(e,t){super(e,t),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement=getComputedStyle(this._element).overflowY==="visible"?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return vx}static get DefaultType(){return yx}static get NAME(){return ix}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const e of this._observableSections.values())this._observer.observe(e)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(e){return e.target=Fn(e.target)||document.body,e.rootMargin=e.offset?`${e.offset}px 0px -30%`:e.rootMargin,typeof e.threshold=="string"&&(e.threshold=e.threshold.split(",").map(t=>Number.parseFloat(t))),e}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(ne.off(this._config.target,Xd),ne.on(this._config.target,Xd,Da,e=>{const t=this._observableSections.get(e.target.hash);if(t){e.preventDefault();const r=this._rootElement||window,i=t.offsetTop-this._element.offsetTop;if(r.scrollTo){r.scrollTo({top:i,behavior:"smooth"});return}r.scrollTop=i}}))}_getNewObserver(){const e={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(t=>this._observerCallback(t),e)}_observerCallback(e){const t=s=>this._targetLinks.get(`#${s.target.id}`),r=s=>{this._previousScrollData.visibleEntryTop=s.target.offsetTop,this._process(t(s))},i=(this._rootElement||document.documentElement).scrollTop,o=i>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=i;for(const s of e){if(!s.isIntersecting){this._activeTarget=null,this._clearActiveClass(t(s));continue}const l=s.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(o&&l){if(r(s),!i)return;continue}!o&&!l&&r(s)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const e=ye.find(Da,this._config.target);for(const t of e){if(!t.hash||$n(t))continue;const r=ye.findOne(decodeURI(t.hash),this._element);ei(r)&&(this._targetLinks.set(decodeURI(t.hash),t),this._observableSections.set(t.hash,r))}}_process(e){this._activeTarget!==e&&(this._clearActiveClass(this._config.target),this._activeTarget=e,e.classList.add(Tr),this._activateParents(e),ne.trigger(this._element,ax,{relatedTarget:e}))}_activateParents(e){if(e.classList.contains(cx)){ye.findOne(gx,e.closest(mx)).classList.add(Tr);return}for(const t of ye.parents(e,dx))for(const r of ye.prev(t,px))r.classList.add(Tr)}_clearActiveClass(e){e.classList.remove(Tr);const t=ye.find(`${Da}.${Tr}`,e);for(const r of t)r.classList.remove(Tr)}static jQueryInterface(e){return this.each(function(){const t=zs.getOrCreateInstance(this,e);if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e]()}})}}ne.on(window,lx,()=>{for(const n of ye.find(ux))zs.getOrCreateInstance(n)});$t(zs);const bx="tab",Ex="bs.tab",gr=`.${Ex}`,Sx=`hide${gr}`,Cx=`hidden${gr}`,Tx=`show${gr}`,xx=`shown${gr}`,Ax=`click${gr}`,wx=`keydown${gr}`,kx=`load${gr}`,Ox="ArrowLeft",Zd="ArrowRight",Mx="ArrowUp",qd="ArrowDown",nr="active",ef="fade",Ra="show",Nx="dropdown",Ix=".dropdown-toggle",Dx=".dropdown-menu",La=":not(.dropdown-toggle)",Rx='.list-group, .nav, [role="tablist"]',Lx=".nav-item, .list-group-item",_x=`.nav-link${La}, .list-group-item${La}, [role="tab"]${La}`,mm='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',_a=`${_x}, ${mm}`,Px=`.${nr}[data-bs-toggle="tab"], .${nr}[data-bs-toggle="pill"], .${nr}[data-bs-toggle="list"]`;class Xr extends Gt{constructor(e){super(e),this._parent=this._element.closest(Rx),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),ne.on(this._element,wx,t=>this._keydown(t)))}static get NAME(){return bx}show(){const e=this._element;if(this._elemIsActive(e))return;const t=this._getActiveElem(),r=t?ne.trigger(t,Sx,{relatedTarget:e}):null;ne.trigger(e,Tx,{relatedTarget:t}).defaultPrevented||r&&r.defaultPrevented||(this._deactivate(t,e),this._activate(e,t))}_activate(e,t){if(!e)return;e.classList.add(nr),this._activate(ye.getElementFromSelector(e));const r=()=>{if(e.getAttribute("role")!=="tab"){e.classList.add(Ra);return}e.removeAttribute("tabindex"),e.setAttribute("aria-selected",!0),this._toggleDropDown(e,!0),ne.trigger(e,xx,{relatedTarget:t})};this._queueCallback(r,e,e.classList.contains(ef))}_deactivate(e,t){if(!e)return;e.classList.remove(nr),e.blur(),this._deactivate(ye.getElementFromSelector(e));const r=()=>{if(e.getAttribute("role")!=="tab"){e.classList.remove(Ra);return}e.setAttribute("aria-selected",!1),e.setAttribute("tabindex","-1"),this._toggleDropDown(e,!1),ne.trigger(e,Cx,{relatedTarget:t})};this._queueCallback(r,e,e.classList.contains(ef))}_keydown(e){if(![Ox,Zd,Mx,qd].includes(e.key))return;e.stopPropagation(),e.preventDefault();const t=[Zd,qd].includes(e.key),r=bc(this._getChildren().filter(i=>!$n(i)),e.target,t,!0);r&&(r.focus({preventScroll:!0}),Xr.getOrCreateInstance(r).show())}_getChildren(){return ye.find(_a,this._parent)}_getActiveElem(){return this._getChildren().find(e=>this._elemIsActive(e))||null}_setInitialAttributes(e,t){this._setAttributeIfNotExists(e,"role","tablist");for(const r of t)this._setInitialAttributesOnChild(r)}_setInitialAttributesOnChild(e){e=this._getInnerElement(e);const t=this._elemIsActive(e),r=this._getOuterElement(e);e.setAttribute("aria-selected",t),r!==e&&this._setAttributeIfNotExists(r,"role","presentation"),t||e.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(e,"role","tab"),this._setInitialAttributesOnTargetPanel(e)}_setInitialAttributesOnTargetPanel(e){const t=ye.getElementFromSelector(e);t&&(this._setAttributeIfNotExists(t,"role","tabpanel"),e.id&&this._setAttributeIfNotExists(t,"aria-labelledby",`${e.id}`))}_toggleDropDown(e,t){const r=this._getOuterElement(e);if(!r.classList.contains(Nx))return;const i=(o,s)=>{const l=ye.findOne(o,r);l&&l.classList.toggle(s,t)};i(Ix,nr),i(Dx,Ra),r.setAttribute("aria-expanded",t)}_setAttributeIfNotExists(e,t,r){e.hasAttribute(t)||e.setAttribute(t,r)}_elemIsActive(e){return e.classList.contains(nr)}_getInnerElement(e){return e.matches(_a)?e:ye.findOne(_a,e)}_getOuterElement(e){return e.closest(Lx)||e}static jQueryInterface(e){return this.each(function(){const t=Xr.getOrCreateInstance(this);if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e]()}})}}ne.on(document,Ax,mm,function(n){["A","AREA"].includes(this.tagName)&&n.preventDefault(),!$n(this)&&Xr.getOrCreateInstance(this).show()});ne.on(window,kx,()=>{for(const n of ye.find(Px))Xr.getOrCreateInstance(n)});$t(Xr);const Bx="toast",Fx="bs.toast",Kn=`.${Fx}`,$x=`mouseover${Kn}`,Vx=`mouseout${Kn}`,zx=`focusin${Kn}`,Hx=`focusout${Kn}`,Ux=`hide${Kn}`,jx=`hidden${Kn}`,Wx=`show${Kn}`,Kx=`shown${Kn}`,Gx="fade",tf="hide",so="show",ao="showing",Yx={animation:"boolean",autohide:"boolean",delay:"number"},Jx={animation:!0,autohide:!0,delay:5e3};class ji extends Gt{constructor(e,t){super(e,t),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return Jx}static get DefaultType(){return Yx}static get NAME(){return Bx}show(){if(ne.trigger(this._element,Wx).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(Gx);const t=()=>{this._element.classList.remove(ao),ne.trigger(this._element,Kx),this._maybeScheduleHide()};this._element.classList.remove(tf),Vi(this._element),this._element.classList.add(so,ao),this._queueCallback(t,this._element,this._config.animation)}hide(){if(!this.isShown()||ne.trigger(this._element,Ux).defaultPrevented)return;const t=()=>{this._element.classList.add(tf),this._element.classList.remove(ao,so),ne.trigger(this._element,jx)};this._element.classList.add(ao),this._queueCallback(t,this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(so),super.dispose()}isShown(){return this._element.classList.contains(so)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(e,t){switch(e.type){case"mouseover":case"mouseout":{this._hasMouseInteraction=t;break}case"focusin":case"focusout":{this._hasKeyboardInteraction=t;break}}if(t){this._clearTimeout();return}const r=e.relatedTarget;this._element===r||this._element.contains(r)||this._maybeScheduleHide()}_setListeners(){ne.on(this._element,$x,e=>this._onInteraction(e,!0)),ne.on(this._element,Vx,e=>this._onInteraction(e,!1)),ne.on(this._element,zx,e=>this._onInteraction(e,!0)),ne.on(this._element,Hx,e=>this._onInteraction(e,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(e){return this.each(function(){const t=ji.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof t[e]>"u")throw new TypeError(`No method named "${e}"`);t[e](this)}})}}Fs(ji);$t(ji);function Xx(n=void 0){const e=l=>o("Succesvol",l,Ir.SUCCESS),t=l=>o("Waarschuwing",l,Ir.WARNING),r=l=>o("Informatie",l,Ir.INFO),i=l=>o("Mislukt",l,Ir.DANGER);function o(l,a,c){const u=`toast-${hf()}`,d={id:u,show:!0,variant:c,title:l,text:a},f=document.querySelector(".toast-container"),p=m.h(Rl,d),g=m.createApp({render:()=>p}).mount(document.createElement("div"));f.appendChild(g.$el);const v=document.querySelector(`#${u}`),S=ji.getOrCreateInstance(v,n);S&&(S.show(),s(v))}function s(l){function a(d,f){d.forEach(p=>{if(p.attributeName!="class")return;const h=p.target;if(h.classList.contains("hide")){h.remove(),f.disconnect();return}})}const c=new MutationObserver(a),u={attributes:!0};c.observe(l,u)}return{showSuccessToast:e,showInformationToast:r,showWarningToast:t,showDangerToast:i}}const Qx={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"},Vt=m.defineComponent({__name:"BDButton",props:{size:{default:at.MD},variant:{default:Qx.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})),i=m.computed(()=>t.to?ys:"button"),o=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(i.value),m.mergeProps({class:["bd-btn",r.value]},o.value,{onClick:s}),{default:m.withCtx(()=>[m.renderSlot(l.$slots,"default",{},()=>[m.createTextVNode(m.toDisplayString(t.text),1)])]),_:3},16,["class"]))}}),Zx={install:n=>{n.component("BDCol",nf),n.component("BDContainer",rf),n.component("BRow",of),n.component("BDButton",Vt),n.component("BDLogo",lf),n.component("BDLink",ys),n.component("BDDropdownItem",xf),n.component("BDDropdown",Vp),n.component("BDAlert",cf),n.component("BDProfileImage",Il),n.component("BDZoomslider",df),n.component("BDCard",Dl),n.component("BDCollapsableCard",pf),n.component("BDFormInput",gf),n.component("BDInputGroup",vf),n.component("BDFormInvalidFeedback",Es),n.component("BDBadge",yf),n.component("BDForm",bf),n.component("BDPagination",Ef),n.component("BDDropzone",wf),n.component("BDMarkdownEditor",Fp),n.component("BDModal",zp),n.component("BDFormSelect",Sf),n.component("BDUser",$p),n.component("IconAttachment",Si),n.component("IconBold",wl),n.component("IconBulletList",Ol),n.component("IconCaretDown",af),n.component("IconCaretLeft",Tl),n.component("IconCaretRight",Cl),n.component("IconCheck",ms),n.component("IconClose",xl),n.component("IconError",gs),n.component("IconFile",Sl),n.component("IconHyperlink",Nl),n.component("IconInfo",vs),n.component("IconOrderedList",Ml),n.component("IconItalic",Al),n.component("IconRemove",El),n.component("IconUnderline",kl),n.component("IconCalendar",sf),n.component("BDArticle",Tf),n.component("BDFormCheckbox",Cf),n.component("BDToast",Rl)}};exports.BDAlert=cf;exports.BDArticle=Tf;exports.BDBadge=yf;exports.BDButton=Vt;exports.BDCard=Dl;exports.BDCol=nf;exports.BDCollapsableCard=pf;exports.BDContainer=rf;exports.BDDropdown=Vp;exports.BDDropdownItem=xf;exports.BDDropzone=wf;exports.BDForm=bf;exports.BDFormCheckbox=Cf;exports.BDFormInput=gf;exports.BDFormInvalidFeedback=Es;exports.BDFormSelect=Sf;exports.BDInputGroup=vf;exports.BDLink=ys;exports.BDLogo=lf;exports.BDMarkdownEditor=Fp;exports.BDModal=zp;exports.BDPagination=Ef;exports.BDProfileImage=Il;exports.BDRow=of;exports.BDToast=Rl;exports.BDUser=$p;exports.BDZoomslider=df;exports.IconAttachment=Si;exports.IconBold=wl;exports.IconBulletList=Ol;exports.IconCalendar=sf;exports.IconCaretLeft=Tl;exports.IconCaretRight=Cl;exports.IconCheck=ms;exports.IconClose=xl;exports.IconError=gs;exports.IconFile=Sl;exports.IconHyperlink=Nl;exports.IconInfo=vs;exports.IconItalic=Al;exports.IconOrderedList=Ml;exports.IconRemove=El;exports.IconUnderline=kl;exports.default=Zx;exports.useToaster=Xx;
131
+ */var pu;function i3(){return pu||(pu=1,function(n,e){(function(t,r){n.exports=r()})(cn,function(){const t=new Map;return{set(o,i,s){t.has(o)||t.set(o,new Map);const l=t.get(o);if(!l.has(i)&&l.size!==0){console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(l.keys())[0]}.`);return}l.set(i,s)},get(o,i){return t.has(o)&&t.get(o).get(i)||null},remove(o,i){if(!t.has(o))return;const s=t.get(o);s.delete(i),s.size===0&&t.delete(o)}}})}(Cs)),Cs.exports}var ws={exports:{}},xo={exports:{}};/*!
132
+ * Bootstrap index.js v5.3.0 (https://getbootstrap.com/)
133
+ * Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
134
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
135
+ */var hu;function Cr(){return hu||(hu=1,function(n,e){(function(t,r){r(e)})(cn,function(t){const i="transitionend",s=T=>(T&&window.CSS&&window.CSS.escape&&(T=T.replace(/#([^\s"#']+)/g,(P,L)=>`#${CSS.escape(L)}`)),T),l=T=>T==null?`${T}`:Object.prototype.toString.call(T).match(/\s([a-z]+)/i)[1].toLowerCase(),a=T=>{do T+=Math.floor(Math.random()*1e6);while(document.getElementById(T));return T},c=T=>{if(!T)return 0;let{transitionDuration:P,transitionDelay:L}=window.getComputedStyle(T);const U=Number.parseFloat(P),K=Number.parseFloat(L);return!U&&!K?0:(P=P.split(",")[0],L=L.split(",")[0],(Number.parseFloat(P)+Number.parseFloat(L))*1e3)},u=T=>{T.dispatchEvent(new Event(i))},d=T=>!T||typeof T!="object"?!1:(typeof T.jquery<"u"&&(T=T[0]),typeof T.nodeType<"u"),f=T=>d(T)?T.jquery?T[0]:T:typeof T=="string"&&T.length>0?document.querySelector(s(T)):null,m=T=>{if(!d(T)||T.getClientRects().length===0)return!1;const P=getComputedStyle(T).getPropertyValue("visibility")==="visible",L=T.closest("details:not([open])");if(!L)return P;if(L!==T){const U=T.closest("summary");if(U&&U.parentNode!==L||U===null)return!1}return P},h=T=>!T||T.nodeType!==Node.ELEMENT_NODE||T.classList.contains("disabled")?!0:typeof T.disabled<"u"?T.disabled:T.hasAttribute("disabled")&&T.getAttribute("disabled")!=="false",g=T=>{if(!document.documentElement.attachShadow)return null;if(typeof T.getRootNode=="function"){const P=T.getRootNode();return P instanceof ShadowRoot?P:null}return T instanceof ShadowRoot?T:T.parentNode?g(T.parentNode):null},v=()=>{},E=T=>{T.offsetHeight},k=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,w=[],y=T=>{document.readyState==="loading"?(w.length||document.addEventListener("DOMContentLoaded",()=>{for(const P of w)P()}),w.push(T)):T()},R=()=>document.documentElement.dir==="rtl",S=T=>{y(()=>{const P=k();if(P){const L=T.NAME,U=P.fn[L];P.fn[L]=T.jQueryInterface,P.fn[L].Constructor=T,P.fn[L].noConflict=()=>(P.fn[L]=U,T.jQueryInterface)}})},B=(T,P=[],L=T)=>typeof T=="function"?T(...P):L,$=(T,P,L=!0)=>{if(!L){B(T);return}const U=5,K=c(P)+U;let Y=!1;const Q=({target:te})=>{te===P&&(Y=!0,P.removeEventListener(i,Q),B(T))};P.addEventListener(i,Q),setTimeout(()=>{Y||u(P)},K)},F=(T,P,L,U)=>{const K=T.length;let Y=T.indexOf(P);return Y===-1?!L&&U?T[K-1]:T[0]:(Y+=L?1:-1,U&&(Y=(Y+K)%K),T[Math.max(0,Math.min(Y,K-1))])};t.defineJQueryPlugin=S,t.execute=B,t.executeAfterTransition=$,t.findShadowRoot=g,t.getElement=f,t.getNextActiveElement=F,t.getTransitionDurationFromElement=c,t.getUID=a,t.getjQuery=k,t.isDisabled=h,t.isElement=d,t.isRTL=R,t.isVisible=m,t.noop=v,t.onDOMContentLoaded=y,t.parseSelector=s,t.reflow=E,t.toType=l,t.triggerTransitionEnd=u,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})})}(xo,xo.exports)),xo.exports}/*!
136
+ * Bootstrap event-handler.js v5.3.0 (https://getbootstrap.com/)
137
+ * Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
138
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
139
+ */var mu;function ol(){return mu||(mu=1,function(n,e){(function(t,r){n.exports=r(Cr())})(cn,function(t){const r=/[^.]*(?=\..*)\.|.*/,o=/\..*/,i=/::\d+$/,s={};let l=1;const a={mouseenter:"mouseover",mouseleave:"mouseout"},c=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function u(S,B){return B&&`${B}::${l++}`||S.uidEvent||l++}function d(S){const B=u(S);return S.uidEvent=B,s[B]=s[B]||{},s[B]}function f(S,B){return function $(F){return R(F,{delegateTarget:S}),$.oneOff&&y.off(S,F.type,B),B.apply(S,[F])}}function m(S,B,$){return function F(T){const P=S.querySelectorAll(B);for(let{target:L}=T;L&&L!==this;L=L.parentNode)for(const U of P)if(U===L)return R(T,{delegateTarget:L}),F.oneOff&&y.off(S,T.type,B,$),$.apply(L,[T])}}function h(S,B,$=null){return Object.values(S).find(F=>F.callable===B&&F.delegationSelector===$)}function g(S,B,$){const F=typeof B=="string",T=F?$:B||$;let P=w(S);return c.has(P)||(P=S),[F,T,P]}function v(S,B,$,F,T){if(typeof B!="string"||!S)return;let[P,L,U]=g(B,$,F);B in a&&(L=(de=>function(ge){if(!ge.relatedTarget||ge.relatedTarget!==ge.delegateTarget&&!ge.delegateTarget.contains(ge.relatedTarget))return de.call(this,ge)})(L));const K=d(S),Y=K[U]||(K[U]={}),Q=h(Y,L,P?$:null);if(Q){Q.oneOff=Q.oneOff&&T;return}const te=u(L,B.replace(r,"")),H=P?m(S,$,L):f(S,L);H.delegationSelector=P?$:null,H.callable=L,H.oneOff=T,H.uidEvent=te,Y[te]=H,S.addEventListener(U,H,P)}function E(S,B,$,F,T){const P=h(B[$],F,T);P&&(S.removeEventListener($,P,!!T),delete B[$][P.uidEvent])}function k(S,B,$,F){const T=B[$]||{};for(const[P,L]of Object.entries(T))P.includes(F)&&E(S,B,$,L.callable,L.delegationSelector)}function w(S){return S=S.replace(o,""),a[S]||S}const y={on(S,B,$,F){v(S,B,$,F,!1)},one(S,B,$,F){v(S,B,$,F,!0)},off(S,B,$,F){if(typeof B!="string"||!S)return;const[T,P,L]=g(B,$,F),U=L!==B,K=d(S),Y=K[L]||{},Q=B.startsWith(".");if(typeof P<"u"){if(!Object.keys(Y).length)return;E(S,K,L,P,T?$:null);return}if(Q)for(const te of Object.keys(K))k(S,K,te,B.slice(1));for(const[te,H]of Object.entries(Y)){const se=te.replace(i,"");(!U||B.includes(se))&&E(S,K,L,H.callable,H.delegationSelector)}},trigger(S,B,$){if(typeof B!="string"||!S)return null;const F=t.getjQuery(),T=w(B),P=B!==T;let L=null,U=!0,K=!0,Y=!1;P&&F&&(L=F.Event(B,$),F(S).trigger(L),U=!L.isPropagationStopped(),K=!L.isImmediatePropagationStopped(),Y=L.isDefaultPrevented());const Q=R(new Event(B,{bubbles:U,cancelable:!0}),$);return Y&&Q.preventDefault(),K&&S.dispatchEvent(Q),Q.defaultPrevented&&L&&L.preventDefault(),Q}};function R(S,B={}){for(const[$,F]of Object.entries(B))try{S[$]=F}catch{Object.defineProperty(S,$,{configurable:!0,get(){return F}})}return S}return y})}(ws)),ws.exports}var Ts={exports:{}},As={exports:{}};/*!
140
+ * Bootstrap manipulator.js v5.3.0 (https://getbootstrap.com/)
141
+ * Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
142
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
143
+ */var gu;function s3(){return gu||(gu=1,function(n,e){(function(t,r){n.exports=r()})(cn,function(){function t(i){if(i==="true")return!0;if(i==="false")return!1;if(i===Number(i).toString())return Number(i);if(i===""||i==="null")return null;if(typeof i!="string")return i;try{return JSON.parse(decodeURIComponent(i))}catch{return i}}function r(i){return i.replace(/[A-Z]/g,s=>`-${s.toLowerCase()}`)}return{setDataAttribute(i,s,l){i.setAttribute(`data-bs-${r(s)}`,l)},removeDataAttribute(i,s){i.removeAttribute(`data-bs-${r(s)}`)},getDataAttributes(i){if(!i)return{};const s={},l=Object.keys(i.dataset).filter(a=>a.startsWith("bs")&&!a.startsWith("bsConfig"));for(const a of l){let c=a.replace(/^bs/,"");c=c.charAt(0).toLowerCase()+c.slice(1,c.length),s[c]=t(i.dataset[a])}return s},getDataAttribute(i,s){return t(i.getAttribute(`data-bs-${r(s)}`))}}})}(As)),As.exports}/*!
144
+ * Bootstrap config.js v5.3.0 (https://getbootstrap.com/)
145
+ * Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
146
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
147
+ */var vu;function a3(){return vu||(vu=1,function(n,e){(function(t,r){n.exports=r(s3(),Cr())})(cn,function(t,r){class o{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(s){return s=this._mergeConfigObj(s),s=this._configAfterMerge(s),this._typeCheckConfig(s),s}_configAfterMerge(s){return s}_mergeConfigObj(s,l){const a=r.isElement(l)?t.getDataAttribute(l,"config"):{};return{...this.constructor.Default,...typeof a=="object"?a:{},...r.isElement(l)?t.getDataAttributes(l):{},...typeof s=="object"?s:{}}}_typeCheckConfig(s,l=this.constructor.DefaultType){for(const[a,c]of Object.entries(l)){const u=s[a],d=r.isElement(u)?"element":r.toType(u);if(!new RegExp(c).test(d))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${a}" provided type "${d}" but expected type "${c}".`)}}}return o})}(Ts)),Ts.exports}/*!
148
+ * Bootstrap base-component.js v5.3.0 (https://getbootstrap.com/)
149
+ * Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
150
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
151
+ */var yu;function l3(){return yu||(yu=1,function(n,e){(function(t,r){n.exports=r(i3(),ol(),a3(),Cr())})(cn,function(t,r,o,i){const s="5.3.0";class l extends o{constructor(c,u){super(),c=i.getElement(c),c&&(this._element=c,this._config=this._getConfig(u),t.set(this._element,this.constructor.DATA_KEY,this))}dispose(){t.remove(this._element,this.constructor.DATA_KEY),r.off(this._element,this.constructor.EVENT_KEY);for(const c of Object.getOwnPropertyNames(this))this[c]=null}_queueCallback(c,u,d=!0){i.executeAfterTransition(c,u,d)}_getConfig(c){return c=this._mergeConfigObj(c,this._element),c=this._configAfterMerge(c),this._typeCheckConfig(c),c}static getInstance(c){return t.get(i.getElement(c),this.DATA_KEY)}static getOrCreateInstance(c,u={}){return this.getInstance(c)||new this(c,typeof u=="object"?u:null)}static get VERSION(){return s}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(c){return`${c}${this.EVENT_KEY}`}}return l})}(ks)),ks.exports}var Eo={exports:{}},Os={exports:{}};/*!
152
+ * Bootstrap selector-engine.js v5.3.0 (https://getbootstrap.com/)
153
+ * Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
154
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
155
+ */var bu;function c3(){return bu||(bu=1,function(n,e){(function(t,r){n.exports=r(Cr())})(cn,function(t){const r=i=>{let s=i.getAttribute("data-bs-target");if(!s||s==="#"){let l=i.getAttribute("href");if(!l||!l.includes("#")&&!l.startsWith("."))return null;l.includes("#")&&!l.startsWith("#")&&(l=`#${l.split("#")[1]}`),s=l&&l!=="#"?l.trim():null}return t.parseSelector(s)},o={find(i,s=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(s,i))},findOne(i,s=document.documentElement){return Element.prototype.querySelector.call(s,i)},children(i,s){return[].concat(...i.children).filter(l=>l.matches(s))},parents(i,s){const l=[];let a=i.parentNode.closest(s);for(;a;)l.push(a),a=a.parentNode.closest(s);return l},prev(i,s){let l=i.previousElementSibling;for(;l;){if(l.matches(s))return[l];l=l.previousElementSibling}return[]},next(i,s){let l=i.nextElementSibling;for(;l;){if(l.matches(s))return[l];l=l.nextElementSibling}return[]},focusableChildren(i){const s=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(l=>`${l}:not([tabindex^="-"])`).join(",");return this.find(s,i).filter(l=>!t.isDisabled(l)&&t.isVisible(l))},getSelectorFromElement(i){const s=r(i);return s&&o.findOne(s)?s:null},getElementFromSelector(i){const s=r(i);return s?o.findOne(s):null},getMultipleElementsFromSelector(i){const s=r(i);return s?o.find(s):[]}};return o})}(Os)),Os.exports}/*!
156
+ * Bootstrap component-functions.js v5.3.0 (https://getbootstrap.com/)
157
+ * Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
158
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
159
+ */var xu;function u3(){return xu||(xu=1,function(n,e){(function(t,r){r(e,ol(),c3(),Cr())})(cn,function(t,r,o,i){const s=(l,a="hide")=>{const c=`click.dismiss${l.EVENT_KEY}`,u=l.NAME;r.on(document,c,`[data-bs-dismiss="${u}"]`,function(d){if(["A","AREA"].includes(this.tagName)&&d.preventDefault(),i.isDisabled(this))return;const f=o.getElementFromSelector(this)||this.closest(`.${u}`);l.getOrCreateInstance(f)[a]()})};t.enableDismissTrigger=s,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})})}(Eo,Eo.exports)),Eo.exports}/*!
160
+ * Bootstrap toast.js v5.3.0 (https://getbootstrap.com/)
161
+ * Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
162
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
163
+ */(function(n,e){(function(t,r){n.exports=r(l3(),ol(),u3(),Cr())})(cn,function(t,r,o,i){const s="toast",a=".bs.toast",c=`mouseover${a}`,u=`mouseout${a}`,d=`focusin${a}`,f=`focusout${a}`,m=`hide${a}`,h=`hidden${a}`,g=`show${a}`,v=`shown${a}`,E="fade",k="hide",w="show",y="showing",R={animation:"boolean",autohide:"boolean",delay:"number"},S={animation:!0,autohide:!0,delay:5e3};class B extends t{constructor(F,T){super(F,T),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return S}static get DefaultType(){return R}static get NAME(){return s}show(){if(r.trigger(this._element,g).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(E);const T=()=>{this._element.classList.remove(y),r.trigger(this._element,v),this._maybeScheduleHide()};this._element.classList.remove(k),i.reflow(this._element),this._element.classList.add(w,y),this._queueCallback(T,this._element,this._config.animation)}hide(){if(!this.isShown()||r.trigger(this._element,m).defaultPrevented)return;const T=()=>{this._element.classList.add(k),this._element.classList.remove(y,w),r.trigger(this._element,h)};this._element.classList.add(y),this._queueCallback(T,this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(w),super.dispose()}isShown(){return this._element.classList.contains(w)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(F,T){switch(F.type){case"mouseover":case"mouseout":{this._hasMouseInteraction=T;break}case"focusin":case"focusout":{this._hasKeyboardInteraction=T;break}}if(T){this._clearTimeout();return}const P=F.relatedTarget;this._element===P||this._element.contains(P)||this._maybeScheduleHide()}_setListeners(){r.on(this._element,c,F=>this._onInteraction(F,!0)),r.on(this._element,u,F=>this._onInteraction(F,!1)),r.on(this._element,d,F=>this._onInteraction(F,!0)),r.on(this._element,f,F=>this._onInteraction(F,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(F){return this.each(function(){const T=B.getOrCreateInstance(this,F);if(typeof F=="string"){if(typeof T[F]>"u")throw new TypeError(`No method named "${F}"`);T[F](this)}})}}return o.enableDismissTrigger(B),i.defineJQueryPlugin(B),B})})(Xf);var d3=Xf.exports;const f3=Ku(d3);function p3(n=void 0){const e=l=>i("Succesvol",l,sr.SUCCESS),t=l=>i("Waarschuwing",l,sr.WARNING),r=l=>i("Informatie",l,sr.INFO),o=l=>i("Mislukt",l,sr.DANGER);function i(l,a,c){const u=`toast-${Ru()}`,d={id:u,show:!0,variant:c,title:l,text:a},f=document.querySelector(".toast-container"),m=p.h(Ea,d),g=p.createApp({render:()=>m}).mount(document.createElement("div"));f.appendChild(g.$el);const v=document.querySelector(`#${u}`),E=f3.getOrCreateInstance(v,n);E&&(E.show(),s(v))}function s(l){function a(d,f){d.forEach(m=>{if(m.attributeName!="class")return;const h=m.target;if(h.classList.contains("hide")){h.remove(),f.disconnect();return}})}const c=new MutationObserver(a),u={attributes:!0};c.observe(l,u)}return{showSuccessToast:e,showInformationToast:r,showWarningToast:t,showDangerToast:o}}const h3={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",REMOVE:"remove"},yt=p.defineComponent({__name:"BDButton",props:{size:{default:it.MD},variant:{default:h3.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=p.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=p.computed(()=>t.to?Ci:"button"),i=p.computed(()=>{const l={};return t.to?(l.to=t.to,l.role="button"):l.type="submit",l}),s=()=>{e("click")};return(l,a)=>(p.openBlock(),p.createBlock(p.resolveDynamicComponent(o.value),p.mergeProps({class:["bd-btn",r.value]},i.value,{onClick:s}),{default:p.withCtx(()=>[p.renderSlot(l.$slots,"default",{},()=>[p.createTextVNode(p.toDisplayString(t.text),1)])]),_:3},16,["class"]))}}),m3={install:n=>{n.component("BDCol",Eu),n.component("BDContainer",Su),n.component("BRow",ku),n.component("BDButton",yt),n.component("BDLogo",Ou),n.component("BDLink",Ci),n.component("BDDropdownItem",Wu),n.component("BDDropdown",Yf),n.component("BDAlert",Mu),n.component("BDProfileImage",ba),n.component("BDZoomslider",Nu),n.component("BDCard",xa),n.component("BDCollapsableCard",Lu),n.component("BDFormInput",Pu),n.component("BDInputGroup",Fu),n.component("BDFormInvalidFeedback",Ti),n.component("BDBadge",Vu),n.component("BDForm",$u),n.component("BDPagination",zu),n.component("BDDropzone",Ju),n.component("BDMarkdownEditor",Gf),n.component("BDModal",Qf),n.component("BDFormSelect",Uu),n.component("BDUser",Jf),n.component("IconAttachment",Kn),n.component("IconBold",ha),n.component("IconBulletList",ga),n.component("IconCaretDown",wu),n.component("IconCaretLeft",da),n.component("IconCaretRight",ua),n.component("IconCheck",Ei),n.component("IconClose",fa),n.component("IconError",Si),n.component("IconFile",ca),n.component("IconHyperlink",ya),n.component("IconInfo",ki),n.component("IconOrderedList",va),n.component("IconItalic",pa),n.component("IconRemove",no),n.component("IconUnderline",ma),n.component("IconCalendar",Cu),n.component("BDArticle",ju),n.component("BDFormCheckbox",Hu),n.component("BDToast",Ea),n.component("BDAttachmentPreviewList",nl),n.component("IconDownloadImage",Tu),n.component("BDImageAttachmentPreviewList",rl),n.component("IconMenu",Au)}};exports.BDAlert=Mu;exports.BDArticle=ju;exports.BDAttachmentPreviewList=nl;exports.BDBadge=Vu;exports.BDButton=yt;exports.BDCard=xa;exports.BDCol=Eu;exports.BDCollapsableCard=Lu;exports.BDContainer=Su;exports.BDDropdown=Yf;exports.BDDropdownItem=Wu;exports.BDDropzone=Ju;exports.BDForm=$u;exports.BDFormCheckbox=Hu;exports.BDFormInput=Pu;exports.BDFormInvalidFeedback=Ti;exports.BDFormSelect=Uu;exports.BDImageAttachmentPreviewList=rl;exports.BDInputGroup=Fu;exports.BDLink=Ci;exports.BDLogo=Ou;exports.BDMarkdownEditor=Gf;exports.BDModal=Qf;exports.BDPagination=zu;exports.BDProfileImage=ba;exports.BDRow=ku;exports.BDToast=Ea;exports.BDUser=Jf;exports.BDZoomslider=Nu;exports.IconAttachment=Kn;exports.IconBold=ha;exports.IconBulletList=ga;exports.IconCalendar=Cu;exports.IconCaretLeft=da;exports.IconCaretRight=ua;exports.IconCheck=Ei;exports.IconClose=fa;exports.IconError=Si;exports.IconFile=ca;exports.IconHyperlink=ya;exports.IconInfo=ki;exports.IconItalic=pa;exports.IconMenu=Au;exports.IconOrderedList=va;exports.IconRemove=no;exports.IconUnderline=ma;exports.default=m3;exports.useToaster=p3;