@beterdichtbij/component-library 0.1.10 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bd-component-lib.cjs.js +127 -1
- package/dist/bd-component-lib.css +3 -4
- package/dist/bd-component-lib.es.js +22036 -297
- package/dist/bd-component-lib.umd.js +131 -6
- package/dist/components/atoms/BDAlert/BDAlert.vue.d.ts +1 -1
- package/dist/components/atoms/BDBadge/BDBadge.vue.d.ts +18 -0
- package/dist/components/atoms/BDBadge/BDBadge.vue.d.ts.map +1 -0
- package/dist/components/atoms/BDButton/BDButton.vue.d.ts +76 -18
- package/dist/components/atoms/BDForm/BDForm.vue.d.ts +23 -0
- package/dist/components/atoms/BDForm/BDForm.vue.d.ts.map +1 -0
- package/dist/components/atoms/BDFormInput/BDFormInput.vue.d.ts +157 -0
- package/dist/components/atoms/BDFormInput/BDFormInput.vue.d.ts.map +1 -0
- package/dist/components/atoms/BDFormInvalidFeedback/BDFormInvalidFeedback.vue.d.ts +29 -0
- package/dist/components/atoms/BDFormInvalidFeedback/BDFormInvalidFeedback.vue.d.ts.map +1 -0
- package/dist/components/atoms/BDInputGroup/BDInputGroup.vue.d.ts +2 -0
- package/dist/components/atoms/BDInputGroup/BDInputGroup.vue.d.ts.map +1 -0
- package/dist/components/atoms/BDPagination/BDPagination.vue.d.ts +63 -0
- package/dist/components/atoms/BDPagination/BDPagination.vue.d.ts.map +1 -0
- package/dist/components/atoms/icons/IconBold.vue.d.ts +2 -0
- package/dist/components/atoms/icons/IconBold.vue.d.ts.map +1 -0
- package/dist/components/atoms/icons/IconBulletList.vue.d.ts +2 -0
- package/dist/components/atoms/icons/IconBulletList.vue.d.ts.map +1 -0
- package/dist/components/atoms/icons/IconClose.vue.d.ts +2 -0
- package/dist/components/atoms/icons/IconClose.vue.d.ts.map +1 -0
- package/dist/components/atoms/icons/IconHyperlink.vue.d.ts +2 -0
- package/dist/components/atoms/icons/IconHyperlink.vue.d.ts.map +1 -0
- package/dist/components/atoms/icons/IconItalic.vue.d.ts +2 -0
- package/dist/components/atoms/icons/IconItalic.vue.d.ts.map +1 -0
- package/dist/components/atoms/icons/IconOrderedList.vue.d.ts +2 -0
- package/dist/components/atoms/icons/IconOrderedList.vue.d.ts.map +1 -0
- package/dist/components/atoms/icons/IconUnderline.vue.d.ts +2 -0
- package/dist/components/atoms/icons/IconUnderline.vue.d.ts.map +1 -0
- package/dist/components/atoms/icons/index.d.ts +8 -1
- package/dist/components/molecules/BDDropzone/BDDropzone.vue.d.ts +72 -0
- package/dist/components/molecules/BDDropzone/BDDropzone.vue.d.ts.map +1 -0
- package/dist/components/molecules/BDMarkdownEditor/BDMarkdownEditor.vue.d.ts +52 -0
- package/dist/components/molecules/BDMarkdownEditor/BDMarkdownEditor.vue.d.ts.map +1 -0
- package/dist/components/organisms/BDDropdown/BDDropdown.vue.d.ts +1 -1
- package/dist/components/organisms/BDModal/BDModal.vue.d.ts +36 -0
- package/dist/components/organisms/BDModal/BDModal.vue.d.ts.map +1 -0
- package/dist/composables/uniqueIdentifier.d.ts +3 -0
- package/dist/enums/tiptapVariants.d.ts +4 -0
- package/dist/enums/variants.d.ts +12 -0
- package/dist/index.d.ts +20 -0
- package/dist/types/BDButton.d.ts +8 -0
- package/dist/types/BDDropzone.d.ts +11 -0
- package/dist/types/BDFormInput.d.ts +18 -0
- package/dist/types/BDMarkdownEditor.d.ts +8 -0
- package/dist/types/BDModal.d.ts +5 -0
- package/dist/types/ModelValue.d.ts +3 -0
- package/dist/utils/tiptap/ExtendedLink.d.ts +2 -0
- package/package.json +19 -3
|
@@ -1 +1,127 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");var u=(o=>(o.XS="xs",o.SM="sm",o.MD="md",o.LG="lg",o))(u||{}),p=(o=>(o.PRIMARY="primary",o.SECONDARY="secondary",o.DANGER="danger",o.WARNING="warning",o.INFO="info",o.SUCCESS="success",o))(p||{});const v=e.defineComponent({__name:"BDButton",props:{text:String,size:{type:String,default:u.MD,validator:o=>Object.values(u).includes(o)},variant:{type:String,default:p.PRIMARY,validator:o=>Object.values(p).includes(o)}},emits:["click"],setup(o,{emit:t}){const l=o,n=e.computed(()=>["btn",`btn-${l.size}`,`btn-${l.variant}`]),r=()=>{t("click")};return(a,i)=>(e.openBlock(),e.createElementBlock("button",e.mergeProps({class:["bd-btn",n.value]},a.$attrs,{onClick:r}),[e.renderSlot(a.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(l.text),1)])],16))}}),L=(o,t)=>{const l=o.__vccOpts||o;for(const[n,r]of t)l[n]=r;return l},E={},V=e.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),N=[V];function F(o,t){return e.openBlock(),e.createElementBlock("svg",e.mergeProps({class:"bd-logo"},o.$attrs,{version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}),N,16)}const h=L(E,[["render",F]]),_=/^https:/i,m=e.defineComponent({__name:"BDLink",props:{to:{},target:{default:"_blank"},text:{},rel:{default:"noopener noreferrer"},class:{}},setup(o){const t=o,l=e.computed(()=>typeof t.to=="string"&&_.test(t.to)?"a":typeof t.to!="string"&&typeof e.resolveComponent("router-link")!="string"?"router-link":"div"),n=e.useAttrs(),r=e.computed(()=>{if(typeof t.to=="string"&&_.test(t.to)){const{to:a,target:i,rel:s,class:c}=t;return{href:a,target:i,rel:s,class:c,...n}}else{const{to:a,class:i}=t;return{to:a,class:i,...n}}});return(a,i)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.value),e.mergeProps({class:"bd-link"},r.value),{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.text),1)])]),_:3},16))}}),z={},Z={class:"icon icon-info",xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18"},I=e.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),S=[I];function P(o,t){return e.openBlock(),e.createElementBlock("svg",Z,S)}const j=L(z,[["render",P]]),H={key:0,class:"b-d-alert-title"},y=e.defineComponent({__name:"BDAlert",props:{class:{default:""},title:{default:""},variant:{default:p.PRIMARY}},setup(o){const t=o,l=e.computed(()=>["alert",`alert-${t.variant}`,t.class]);return(n,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(l.value),role:"alert"},[n.title?(e.openBlock(),e.createElementBlock("div",H,[e.createVNode(e.unref(j)),e.createElementVNode("span",null,[e.createElementVNode("strong",null,e.toDisplayString(t.title),1)])])):e.createCommentVNode("",!0),e.renderSlot(n.$slots,"default")],2))}}),G={class:"bd-zoom-slider d-flex"},q=e.createElementVNode("g",{transform:"matrix(0.8333333333333334,0,0,0.8333333333333334,0,0)"},[e.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),Y=[q],U=["max"],X=e.createElementVNode("g",{transform:"matrix(0.8333333333333334,0,0,0.8333333333333334,0,0)"},[e.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),W=[X],w=e.defineComponent({__name:"BDZoomslider",props:{class:{default:""},value:{default:0},maxValue:{default:5}},emits:["change"],setup(o,{emit:t}){const l=o,n=e.ref(0);e.watch(()=>l.value,s=>{n.value=s}),e.onMounted(()=>{n.value=l.value});function r(){n.value!==0&&(n.value--,t("change",n.value))}function a(){n.value<l.maxValue&&(n.value++,t("change",n.value))}function i(){t("change",n.value)}return(s,c)=>(e.openBlock(),e.createElementBlock("div",G,[(e.openBlock(),e.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:r},Y)),e.withDirectives(e.createElementVNode("input",{type:"range","onUpdate:modelValue":c[0]||(c[0]=f=>n.value=f),min:"0",max:s.maxValue,class:"bd-zoom-slider-input",onChange:i},null,40,U),[[e.vModelText,n.value]]),(e.openBlock(),e.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:a},W))]))}}),O=["src","alt"],R=["textContent"],b=e.defineComponent({__name:"BDProfileImage",props:{showFooter:{type:Boolean,default:!1},size:{default:u.LG},linkText:{default:""},src:{default:""},alt:{default:""}},emits:["click"],setup(o,{emit:t}){const l=()=>{t("click")};return(n,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["bd-profile-picture rounded-circle",n.size])},[e.createElementVNode("img",{src:n.src,alt:n.alt,class:"position-absolute top-0 start-0"},null,8,O),n.showFooter?(e.openBlock(),e.createElementBlock("a",{key:0,class:"bd-profile-picture__footer position-absolute bottom-0 start-0",onClick:l,textContent:e.toDisplayString(n.linkText)},null,8,R)):e.createCommentVNode("",!0)],2))}}),g=e.defineComponent({__name:"BDDropdownItem",props:{to:{},target:{},text:{},rel:{},class:{}},emits:["click"],setup(o,{emit:t}){const l=o,n=()=>{t("click")};return(r,a)=>(e.openBlock(),e.createElementBlock("li",e.mergeProps({class:"bd-dropdown-item"},r.$attrs),[e.createVNode(m,e.mergeProps({class:"dropdown-item",onClick:n},l),{default:e.withCtx(()=>[e.renderSlot(r.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(l.text),1)])]),_:3},16)],16))}});var d=256,D=[],B=256,C;for(;d--;)D[d]=(d+256).toString(16).substring(1);function A(o){var t=0,l=o||11;if(!C||d+l>B*2)for(C="",d=0;t<B;t++)C+=D[Math.random()*256|0];return C.substring(d,d+++l)}function $(){return{uniqueIdentifier:e.ref(A())}}const J={class:"bd-dropdown dropdown"},k=e.defineComponent({__name:"BDDropdown",props:{right:{type:Boolean},noFlip:{type:Boolean},toggleTag:{default:"button"},text:{},variant:{default:p.PRIMARY},size:{default:u.MD},offset:{}},setup(o){const t=o,{uniqueIdentifier:l}=$(),n=`__BD__DROPDOWN__${l.value}`,r=e.ref(!1),a=e.computed(()=>({class:{btn:t.toggleTag==="button",[`btn-${t.variant}`]:t.toggleTag==="button"&&t.variant,[`btn-${t.size}`]:t.toggleTag==="button"&&t.size},"data-bs-display":t.noFlip?"static":null,"data-bs-offset":t.offset?t.offset:null,"aria-expanded":r.value,id:n})),i=e.computed(()=>({show:r.value,"dropdown-menu-end":t.right})),s=e.computed(()=>({"aria-labelledby":n})),c=()=>{r.value=!r.value};return(f,n1)=>(e.openBlock(),e.createElementBlock("div",J,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.toggleTag),e.mergeProps({class:"dropdown-toggle",target:"_self",role:"button","data-bs-toggle":"dropdown"},a.value,{onClick:c}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.text),1)]),_:1},16)),e.createElementVNode("ul",e.mergeProps({class:["dropdown-menu",i.value]},s.value),[e.renderSlot(f.$slots,"default")],16)]))}}),K={class:"navbar navbar-expand-lg bg-white fixed-top bd-header"},Q={class:"navbar-nav d-none d-lg-flex navbar-nav--primary"},T={class:"ms-auto"},M=e.defineComponent({__name:"BDHeader",props:{logoLink:{},menuItems:{},dropdownTitle:{},dropdownOptions:{}},setup(o){const t=o;return(l,n)=>(e.openBlock(),e.createElementBlock("nav",K,[t.logoLink?(e.openBlock(),e.createBlock(m,e.mergeProps({key:0,class:"navbar-brand ms-2"},t.logoLink),{default:e.withCtx(()=>[e.createVNode(h,{width:"351px",height:"61px",viewBox:"0 0 351 61",class:"d-inline-block"})]),_:1},16)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"default",{},()=>[e.createElementVNode("ul",Q,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.menuItems,(r,a)=>(e.openBlock(),e.createElementBlock("li",{class:"nav-item",key:a},[e.createVNode(m,e.normalizeProps(e.guardReactiveProps(r)),null,16)]))),128))])]),e.createElementVNode("div",T,[e.createVNode(k,{text:t.dropdownTitle},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dropdownOptions,(r,a)=>(e.openBlock(),e.createBlock(g,e.mergeProps({key:a},r),null,16))),128))]),_:1},8,["text"])])]))}}),e1=["id"],t1={key:0},x=e.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(o){const t=o,{uniqueIdentifier:l}=$(),n=l.value,r=e.computed(()=>({"bd-card card":!0,[`${t.class}`]:t.class,"no-body":t.noBody})),a=e.computed(()=>({"card-header":!0,"no-title":!t.title,[`${t.headerClass}`]:t.headerClass,[`${t.headerVariant}`]:t.headerVariant})),i=e.computed(()=>({"card-body":!0,[`${t.bodyClass}`]:t.bodyClass}));return(s,c)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(n),class:e.normalizeClass(r.value)},[!s.noHeader||s.noBody?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(a.value)},[e.renderSlot(s.$slots,"header",{},()=>[s.title?(e.openBlock(),e.createElementBlock("h2",t1,e.toDisplayString(s.title),1)):e.createCommentVNode("",!0)])],2)):e.createCommentVNode("",!0),s.noBody?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(i.value)},[e.renderSlot(s.$slots,"body")],2))],10,e1))}});const o1={install:o=>{o.component("BDButton",v),o.component("BDLogo",h),o.component("BDLink",m),o.component("BDDropdownItem",g),o.component("BDDropdown",k),o.component("BDHeader",M),o.component("BDAlert",y),o.component("BDProfileImage",b),o.component("BDZoomslider",w),o.component("BDCard",x)}};exports.BDAlert=y;exports.BDButton=v;exports.BDCard=x;exports.BDDropdown=k;exports.BDDropdownItem=g;exports.BDHeader=M;exports.BDLink=m;exports.BDLogo=h;exports.BDProfileImage=b;exports.BDZoomslider=w;exports.default=o1;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const g=require("vue");var Qr=(n=>(n.XS="xs",n.SM="sm",n.MD="md",n.LG="lg",n))(Qr||{}),Zr=(n=>(n.PRIMARY="primary",n.SECONDARY="secondary",n.DANGER="danger",n.WARNING="warning",n.INFO="info",n.SUCCESS="success",n))(Zr||{});const qe=(n,e)=>{const t=n.__vccOpts||n;for(const[r,i]of e)t[r]=i;return t},Rd={},Dd=g.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),Ld=[Dd];function Pd(n,e){return g.openBlock(),g.createElementBlock("svg",g.mergeProps({class:"bd-logo"},n.$attrs,{version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}),Ld,16)}const Vs=qe(Rd,[["render",Pd]]),Va=/^https:/i,ar=g.defineComponent({__name:"BDLink",props:{to:{},target:{default:"_blank"},text:{},rel:{default:"noopener noreferrer"},class:{}},setup(n){const e=n,t=g.computed(()=>typeof e.to=="string"&&Va.test(e.to)?"a":typeof e.to!="string"&&typeof g.resolveComponent("router-link")!="string"?"router-link":"div"),r=g.useAttrs(),i=g.computed(()=>{if(typeof e.to=="string"&&Va.test(e.to)){const{to:o,target:s,rel:l,class:a}=e;return{href:o,target:s,rel:l,class:a,...r}}else{const{to:o,class:s}=e;return{to:o,class:s,...r}}});return(o,s)=>(g.openBlock(),g.createBlock(g.resolveDynamicComponent(t.value),g.mergeProps({class:"bd-link"},i.value),{default:g.withCtx(()=>[g.renderSlot(o.$slots,"default",{},()=>[g.createTextVNode(g.toDisplayString(e.text),1)])]),_:3},16))}}),Fd={},Bd={class:"icon icon-check",xmlns:"http://www.w3.org/2000/svg",width:"18",height:"13",viewBox:"0 0 18 13"},zd=g.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),Vd=[zd];function $d(n,e){return g.openBlock(),g.createElementBlock("svg",Bd,Vd)}const Hd=qe(Fd,[["render",$d]]),Ud={},jd={class:"icon icon-error",xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18"},Wd=g.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),Kd=[Wd];function Gd(n,e){return g.openBlock(),g.createElementBlock("svg",jd,Kd)}const Tc=qe(Ud,[["render",Gd]]),Jd={},Yd={class:"icon icon-attachment",width:"17",height:"18",viewBox:"0 0 17 18",xmlns:"http://www.w3.org/2000/svg"},Xd=g.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),Qd=[Xd];function Zd(n,e){return g.openBlock(),g.createElementBlock("svg",Yd,Qd)}const as=qe(Jd,[["render",Zd]]),qd={},_d={class:"icon icon-info",xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18"},ef=g.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),tf=[ef];function nf(n,e){return g.openBlock(),g.createElementBlock("svg",_d,tf)}const rf=qe(qd,[["render",nf]]),of={},sf={class:"icon icon-remove",width:"11",height:"11",viewBox:"0 0 11 11",xmlns:"http://www.w3.org/2000/svg"},af=g.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),lf=[af];function cf(n,e){return g.openBlock(),g.createElementBlock("svg",sf,lf)}const uf=qe(of,[["render",cf]]),df={},ff={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"},pf=g.createElementVNode("title",null,"common-file-empty",-1),hf=g.createElementVNode("g",null,[g.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
|
+
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
|
+
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),mf=[pf,hf];function gf(n,e){return g.openBlock(),g.createElementBlock("svg",ff,mf)}const vf=qe(df,[["render",gf]]),yf={},bf={class:"icon icon-caret-right",xmlns:"http://www.w3.org/2000/svg",width:"7",height:"11",viewBox:"0 0 7 11"},xf=g.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),Sf=[xf];function Ef(n,e){return g.openBlock(),g.createElementBlock("svg",bf,Sf)}const Cf=qe(yf,[["render",Ef]]),kf={},wf={class:"icon icon-caret-left",xmlns:"http://www.w3.org/2000/svg",width:"6",height:"10",viewBox:"0 0 6 10"},Tf=g.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),Af=[Tf];function Of(n,e){return g.openBlock(),g.createElementBlock("svg",wf,Af)}const Mf=qe(kf,[["render",Of]]),Nf={},If={class:"icon icon-close",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"-4 -4 22 22"},Rf=g.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),Df=[Rf];function Lf(n,e){return g.openBlock(),g.createElementBlock("svg",If,Df)}const Pf=qe(Nf,[["render",Lf]]),Ff={},Bf={width:"12",height:"14",viewBox:"0 0 12 14",xmlns:"http://www.w3.org/2000/svg",class:"icon icon-italic"},zf=g.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),Vf=[zf];function $f(n,e){return g.openBlock(),g.createElementBlock("svg",Bf,Vf)}const Hf=qe(Ff,[["render",$f]]),Uf={},jf={width:"11",height:"13",viewBox:"0 0 11 13",xmlns:"http://www.w3.org/2000/svg",class:"icon icon-bold"},Wf=g.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),Kf=[Wf];function Gf(n,e){return g.openBlock(),g.createElementBlock("svg",jf,Kf)}const Jf=qe(Uf,[["render",Gf]]),Yf={},Xf={width:"14",height:"16",viewBox:"0 0 14 16",xmlns:"http://www.w3.org/2000/svg",class:"icon icon-underline"},Qf=g.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),Zf=[Qf];function qf(n,e){return g.openBlock(),g.createElementBlock("svg",Xf,Zf)}const _f=qe(Yf,[["render",qf]]),ep={},tp={width:"16",height:"14",viewBox:"0 0 16 14",xmlns:"http://www.w3.org/2000/svg",class:"icon icon-bullet-list"},np=g.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),rp=[np];function ip(n,e){return g.openBlock(),g.createElementBlock("svg",tp,rp)}const op=qe(ep,[["render",ip]]),sp={},ap={width:"17",height:"15",viewBox:"0 0 17 15",xmlns:"http://www.w3.org/2000/svg",class:"icon icon-ordered-list"},lp=g.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),cp=[lp];function up(n,e){return g.openBlock(),g.createElementBlock("svg",ap,cp)}const dp=qe(sp,[["render",up]]),fp={},pp={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"},hp=g.createElementVNode("g",{transform:"matrix(0.8333333333333334,0,0,0.8333333333333334,0,0)"},[g.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"}),g.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),mp=[hp];function gp(n,e){return g.openBlock(),g.createElementBlock("svg",pp,mp)}const vp=qe(fp,[["render",gp]]),yp={key:0,class:"b-d-alert-title"},Ac=g.defineComponent({__name:"BDAlert",props:{class:{default:""},title:{default:""},variant:{default:Zr.PRIMARY}},setup(n){const e=n,t=g.computed(()=>["alert",`alert-${e.variant}`,e.class]);return(r,i)=>(g.openBlock(),g.createElementBlock("div",{class:g.normalizeClass(t.value),role:"alert"},[r.title?(g.openBlock(),g.createElementBlock("div",yp,[g.createVNode(g.unref(rf)),g.createElementVNode("span",null,[g.createElementVNode("strong",null,g.toDisplayString(e.title),1)])])):g.createCommentVNode("",!0),g.renderSlot(r.$slots,"default")],2))}}),bp=["src","alt"],xp=["textContent"],Oc=g.defineComponent({__name:"BDProfileImage",props:{showFooter:{type:Boolean,default:!1},size:{default:Qr.LG},linkText:{default:""},src:{default:""},alt:{default:""}},emits:["click"],setup(n,{emit:e}){const t=()=>{e("click")};return(r,i)=>(g.openBlock(),g.createElementBlock("div",{class:g.normalizeClass(["bd-profile-picture rounded-circle",r.size])},[g.createElementVNode("img",{src:r.src,alt:r.alt,class:"position-absolute top-0 start-0"},null,8,bp),r.showFooter?(g.openBlock(),g.createElementBlock("a",{key:0,class:"bd-profile-picture__footer position-absolute bottom-0 start-0",onClick:t,textContent:g.toDisplayString(r.linkText)},null,8,xp)):g.createCommentVNode("",!0)],2))}}),Sp={class:"bd-zoom-slider d-flex"},Ep=g.createElementVNode("g",{transform:"matrix(0.8333333333333334,0,0,0.8333333333333334,0,0)"},[g.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),Cp=[Ep],kp=["max"],wp=g.createElementVNode("g",{transform:"matrix(0.8333333333333334,0,0,0.8333333333333334,0,0)"},[g.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),Tp=[wp],Mc=g.defineComponent({__name:"BDZoomslider",props:{class:{default:""},value:{default:0},maxValue:{default:5}},emits:["change"],setup(n,{emit:e}){const t=n,r=g.ref(0);g.watch(()=>t.value,l=>{r.value=l}),g.onMounted(()=>{r.value=t.value});function i(){r.value!==0&&(r.value--,e("change",r.value))}function o(){r.value<t.maxValue&&(r.value++,e("change",r.value))}function s(){e("change",r.value)}return(l,a)=>(g.openBlock(),g.createElementBlock("div",Sp,[(g.openBlock(),g.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},Cp)),g.withDirectives(g.createElementVNode("input",{type:"range","onUpdate:modelValue":a[0]||(a[0]=c=>r.value=c),min:"0",max:l.maxValue,class:"bd-zoom-slider-input",onChange:s},null,40,kp),[[g.vModelText,r.value]]),(g.openBlock(),g.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},Tp))]))}});var Dn=256,Nc=[],$a=256,ri;for(;Dn--;)Nc[Dn]=(Dn+256).toString(16).substring(1);function Ap(n){var e=0,t=n||11;if(!ri||Dn+t>$a*2)for(ri="",Dn=0;e<$a;e++)ri+=Nc[Math.random()*256|0];return ri.substring(Dn,Dn+++t)}function $s(){return{uniqueIdentifier:g.ref(Ap())}}const Op=["id"],Mp={key:0},Ic=g.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}=$s(),r=t.value,i=g.computed(()=>({"bd-card card":!0,[`${e.class}`]:e.class,"no-body":e.noBody})),o=g.computed(()=>({"card-header":!0,"no-title":!e.title,[`${e.headerClass}`]:e.headerClass,[`${e.headerVariant}`]:e.headerVariant})),s=g.computed(()=>({"card-body":!0,[`${e.bodyClass}`]:e.bodyClass}));return(l,a)=>(g.openBlock(),g.createElementBlock("div",{id:g.unref(r),class:g.normalizeClass(i.value)},[!l.noHeader||l.noBody?(g.openBlock(),g.createElementBlock("div",{key:0,class:g.normalizeClass(o.value)},[g.renderSlot(l.$slots,"header",{},()=>[l.title?(g.openBlock(),g.createElementBlock("h2",Mp,g.toDisplayString(l.title),1)):g.createCommentVNode("",!0)])],2)):g.createCommentVNode("",!0),l.noBody?g.createCommentVNode("",!0):(g.openBlock(),g.createElementBlock("div",{key:1,class:g.normalizeClass(s.value)},[g.renderSlot(l.$slots,"body")],2))],10,Op))}}),Np=["value","type"],Ip=g.defineComponent({__name:"BDFormInput",props:{modelValue:{default:""},formGroupClass:{},type:{default:"text"},label:{},labelClass:{},formFieldClass:{},inputClass:{},placeholder:{},state:{type:[Boolean,null],default:null},readonly:{type:[Boolean,null],default:null},disabled:{type:[Boolean,null],default:null},autofocus:{type:[Boolean,null]},size:{},tabindex:{default:null},invalidFeedbackClass:{},invalidFeedbackText:{}},emits:["update:modelValue","click","blur","enter"],setup(n){const e=n,{uniqueIdentifier:t}=$s(),r=`__BD__FORM__LABEL__${t.value}`,i=`__BD__FORM__GROUP__${t.value}`,o=`form-input-${e.label?e.label.replace(/ /g,"-").toLowerCase():t.value}`,s=`validationFeedback${e.label?e.label.replace(/ /g,""):t.value}`,l=g.computed(()=>({[`${e.inputClass}`]:e.inputClass,"is-invalid":e.state===!1,"is-valid":e.state===!0,[`form-control-${e.size}`]:e.size})),a=g.computed(()=>({placeholder:e.placeholder?e.placeholder:null,readonly:e.readonly===!0,disabled:e.disabled===!0,autofocus:e.autofocus===!0,tabindex:e.tabindex?e.tabindex:null,"aria-describedby":e.state===!1?s:null}));return(c,u)=>(g.openBlock(),g.createElementBlock("div",{class:g.normalizeClass(["bd-form-input",c.formGroupClass]),id:i},[c.label?(g.openBlock(),g.createElementBlock("label",{key:0,for:o,id:r,class:g.normalizeClass(["form-label",c.labelClass])},g.toDisplayString(c.label),3)):g.createCommentVNode("",!0),g.createElementVNode("div",{class:g.normalizeClass(c.formFieldClass)},[g.createElementVNode("input",g.mergeProps({value:c.modelValue,type:c.type,id:o,class:["form-control",l.value]},a.value,{onInput:u[0]||(u[0]=d=>c.$emit("update:modelValue",d.target.value)),onClick:u[1]||(u[1]=d=>c.$emit("click")),onBlur:u[2]||(u[2]=d=>c.$emit("blur")),onKeydown:u[3]||(u[3]=g.withKeys(d=>c.$emit("enter"),["enter"]))}),null,16,Np),g.renderSlot(c.$slots,"default"),g.createVNode(g.unref(Hs),{text:c.invalidFeedbackText,class:g.normalizeClass(c.invalidFeedbackClass),state:c.state,id:s},null,8,["text","class","state"])],2)],2))}}),Rp={},Dp={class:"input-group bd-input-group"};function Lp(n,e){return g.openBlock(),g.createElementBlock("div",Dp,[g.renderSlot(n.$slots,"default")])}const Pp=qe(Rp,[["render",Lp]]),Hs=g.defineComponent({__name:"BDFormInvalidFeedback",props:{state:{type:[Boolean,null]},text:{},id:{}},setup(n){const e=n,t=g.computed(()=>{if(e.state===!1&&e.id)return{id:e.id}});return(r,i)=>(g.openBlock(),g.createElementBlock("div",g.mergeProps({class:"invalid-feedback bd-invalid-feedback"},t.value),[g.createVNode(g.unref(Tc)),g.createTextVNode(" "+g.toDisplayString(r.text),1)],16))}}),Fp=g.defineComponent({__name:"BDBadge",props:{variant:{default:Zr.PRIMARY}},setup(n){const e=n,t=g.computed(()=>["badge","bd-badge",`text-bg-${e.variant}`]);return(r,i)=>(g.openBlock(),g.createElementBlock("span",{role:"status",class:g.normalizeClass(t.value)},[g.renderSlot(r.$slots,"default")],2))}}),Bp=["id","onSubmit"],zp=g.defineComponent({__name:"BDForm",props:{class:{},id:{}},emits:["submit"],setup(n,{emit:e}){function t(){e("submit")}return(r,i)=>(g.openBlock(),g.createElementBlock("form",{id:r.id,class:g.normalizeClass(r.class),onSubmit:g.withModifiers(t,["prevent"])},[g.renderSlot(r.$slots,"default")],42,Bp))}}),Vp={"aria-label":"Page navigation",class:"bd-pagination"},$p={class:"page-item"},Hp=["data-page"],Up=["data-page"],jp={class:"page-item"},Wp=["data-page"],Kp=g.defineComponent({__name:"BDPagination",props:{class:{default:""},modelValue:{default:1},totalRows:{default:1},rowsPerPage:{default:10},isPatient:{type:Boolean,default:!0}},emits:["click"],setup(n,{emit:e}){const t=n,r=g.ref(t.modelValue),i=g.ref(Math.ceil(t.totalRows/t.rowsPerPage)),o=g.ref([]);g.watch([()=>t.totalRows,()=>t.rowsPerPage],()=>{i.value=Math.ceil(t.totalRows/t.rowsPerPage),o.value=a()}),g.onMounted(()=>{o.value=a()});const s=g.computed(()=>({[`${t.class}`]:t.class,colleague:!t.isPatient})),l=c=>{const u=c.target.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 h=Math.floor((d-3)/2);if(r.value<=h+2){for(let p=1;p<=h+3;p++)c.push(p);c.push("..."),c.push(u)}else if(r.value>=u-h-1){c.push(1),c.push("...");for(let p=u-h-3;p<=u;p++)c.push(p)}else{c.push(1),c.push("...");for(let p=r.value-1;p<=r.value+1;p++)c.push(p);c.push("..."),c.push(u)}}return c};return(c,u)=>(g.openBlock(),g.createElementBlock("div",Vp,[g.createElementVNode("ul",{class:g.normalizeClass(["pagination",s.value])},[g.withDirectives(g.createElementVNode("li",$p,[g.createElementVNode("a",{class:"page-link d-flex justify-content-center align-items-center","aria-label":"Previous",onClick:l,"data-page":r.value-1},[g.createVNode(g.unref(Mf))],8,Hp)],512),[[g.vShow,r.value>1]]),(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(o.value,d=>(g.openBlock(),g.createElementBlock("li",{class:g.normalizeClass(["page-item",{active:r.value===d,disabled:typeof d=="string"}]),key:d},[g.createElementVNode("a",{class:"page-link d-flex justify-content-center align-items-center",onClick:l,"data-page":d},g.toDisplayString(d),9,Up)],2))),128)),g.withDirectives(g.createElementVNode("li",jp,[g.createElementVNode("a",{class:"page-link d-flex justify-content-center align-items-center","aria-label":"Next",onClick:l,"data-page":r.value+1},[g.createVNode(g.unref(Cf))],8,Wp)],512),[[g.vShow,r.value<i.value]])],2)]))}}),Us=g.defineComponent({__name:"BDDropdownItem",props:{to:{},target:{},text:{},rel:{},class:{}},emits:["click"],setup(n,{emit:e}){const t=n,r=()=>{e("click")};return(i,o)=>(g.openBlock(),g.createElementBlock("li",g.mergeProps({class:"bd-dropdown-item"},i.$attrs),[g.createVNode(ar,g.mergeProps({class:"dropdown-item",onClick:r},t),{default:g.withCtx(()=>[g.renderSlot(i.$slots,"default",{},()=>[g.createTextVNode(g.toDisplayString(t.text),1)])]),_:3},16)],16))}});function Gp(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Rc={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"),h=Array.prototype;h[f]==null&&d.f(h,f,{configurable:!0,value:u(null)}),s.exports=function(p){h[f][p]=!0}},1530:function(s,l,a){var c=a(8710).charAt;s.exports=function(u,d,f){return d+(f?c(u,d).length:1)}},5787:function(s){s.exports=function(l,a,c){if(!(l instanceof a))throw TypeError("Incorrect "+(c?c+" ":"")+"invocation");return l}},9670:function(s,l,a){var c=a(111);s.exports=function(u){if(!c(u))throw TypeError(String(u)+" is not an object");return u}},4019:function(s){s.exports=typeof ArrayBuffer<"u"&&typeof DataView<"u"},260:function(s,l,a){var c=a(4019),u=a(9781),d=a(7854),f=a(111),h=a(6656),p=a(648),m=a(8880),v=a(1320),S=a(3070).f,C=a(9518),k=a(7674),b=a(5112),R=a(9711),w=d.Int8Array,B=w&&w.prototype,V=d.Uint8ClampedArray,$=V&&V.prototype,z=w&&C(w),F=B&&C(B),P=Object.prototype,U=P.isPrototypeOf,Y=b("toStringTag"),Q=R("TYPED_ARRAY_TAG"),Z=c&&!!k&&p(d.opera)!=="Opera",re=!1,W,le={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},de={BigInt64Array:8,BigUint64Array:8},ve=function(A){if(!f(A))return!1;var M=p(A);return M==="DataView"||h(le,M)||h(de,M)},Se=function(ge){if(!f(ge))return!1;var A=p(ge);return h(le,A)||h(de,A)},ye=function(ge){if(Se(ge))return ge;throw TypeError("Target is not a typed array")},we=function(ge){if(k){if(U.call(z,ge))return ge}else for(var A in le)if(h(le,W)){var M=d[A];if(M&&(ge===M||U.call(M,ge)))return ge}throw TypeError("Target is not a typed array constructor")},Ce=function(ge,A,M){if(u){if(M)for(var E in le){var O=d[E];O&&h(O.prototype,ge)&&delete O.prototype[ge]}(!F[ge]||M)&&v(F,ge,M?A:Z&&B[ge]||A)}},Te=function(ge,A,M){var E,O;if(u){if(k){if(M)for(E in le)O=d[E],O&&h(O,ge)&&delete O[ge];if(!z[ge]||M)try{return v(z,ge,M?A:Z&&w[ge]||A)}catch{}else return}for(E in le)O=d[E],O&&(!O[ge]||M)&&v(O,ge,A)}};for(W in le)d[W]||(Z=!1);if((!Z||typeof z!="function"||z===Function.prototype)&&(z=function(){throw TypeError("Incorrect invocation")},Z))for(W in le)d[W]&&k(d[W],z);if((!Z||!F||F===P)&&(F=z.prototype,Z))for(W in le)d[W]&&k(d[W].prototype,F);if(Z&&C($)!==F&&k($,F),u&&!h(F,Y)){re=!0,S(F,Y,{get:function(){return f(this)?this[Q]:void 0}});for(W in le)d[W]&&m(d[W],Q,W)}s.exports={NATIVE_ARRAY_BUFFER_VIEWS:Z,TYPED_ARRAY_TAG:re&&Q,aTypedArray:ye,aTypedArrayConstructor:we,exportTypedArrayMethod:Ce,exportTypedArrayStaticMethod:Te,isView:ve,isTypedArray:Se,TypedArray:z,TypedArrayPrototype:F}},3331:function(s,l,a){var c=a(7854),u=a(9781),d=a(4019),f=a(8880),h=a(2248),p=a(7293),m=a(5787),v=a(9958),S=a(7466),C=a(7067),k=a(1179),b=a(9518),R=a(7674),w=a(8006).f,B=a(3070).f,V=a(1285),$=a(8003),z=a(9909),F=z.get,P=z.set,U="ArrayBuffer",Y="DataView",Q="prototype",Z="Wrong length",re="Wrong index",W=c[U],le=W,de=c[Y],ve=de&&de[Q],Se=Object.prototype,ye=c.RangeError,we=k.pack,Ce=k.unpack,Te=function(G){return[G&255]},ge=function(G){return[G&255,G>>8&255]},A=function(G){return[G&255,G>>8&255,G>>16&255,G>>24&255]},M=function(G){return G[3]<<24|G[2]<<16|G[1]<<8|G[0]},E=function(G){return we(G,23,4)},O=function(G){return we(G,52,8)},y=function(G,J){B(G[Q],J,{get:function(){return F(this)[J]}})},x=function(G,J,_,ce){var me=C(_),Oe=F(G);if(me+J>Oe.byteLength)throw ye(re);var Fe=F(Oe.buffer).bytes,Pe=me+Oe.byteOffset,Me=Fe.slice(Pe,Pe+J);return ce?Me:Me.reverse()},N=function(G,J,_,ce,me,Oe){var Fe=C(_),Pe=F(G);if(Fe+J>Pe.byteLength)throw ye(re);for(var Me=F(Pe.buffer).bytes,je=Fe+Pe.byteOffset,ut=ce(+me),_e=0;_e<J;_e++)Me[je+_e]=ut[Oe?_e:J-_e-1]};if(!d)le=function(J){m(this,le,U);var _=C(J);P(this,{bytes:V.call(new Array(_),0),byteLength:_}),u||(this.byteLength=_)},de=function(J,_,ce){m(this,de,Y),m(J,le,Y);var me=F(J).byteLength,Oe=v(_);if(Oe<0||Oe>me)throw ye("Wrong offset");if(ce=ce===void 0?me-Oe:S(ce),Oe+ce>me)throw ye(Z);P(this,{buffer:J,byteLength:ce,byteOffset:Oe}),u||(this.buffer=J,this.byteLength=ce,this.byteOffset=Oe)},u&&(y(le,"byteLength"),y(de,"buffer"),y(de,"byteLength"),y(de,"byteOffset")),h(de[Q],{getInt8:function(J){return x(this,1,J)[0]<<24>>24},getUint8:function(J){return x(this,1,J)[0]},getInt16:function(J){var _=x(this,2,J,arguments.length>1?arguments[1]:void 0);return(_[1]<<8|_[0])<<16>>16},getUint16:function(J){var _=x(this,2,J,arguments.length>1?arguments[1]:void 0);return _[1]<<8|_[0]},getInt32:function(J){return M(x(this,4,J,arguments.length>1?arguments[1]:void 0))},getUint32:function(J){return M(x(this,4,J,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(J){return Ce(x(this,4,J,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(J){return Ce(x(this,8,J,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(J,_){N(this,1,J,Te,_)},setUint8:function(J,_){N(this,1,J,Te,_)},setInt16:function(J,_){N(this,2,J,ge,_,arguments.length>2?arguments[2]:void 0)},setUint16:function(J,_){N(this,2,J,ge,_,arguments.length>2?arguments[2]:void 0)},setInt32:function(J,_){N(this,4,J,A,_,arguments.length>2?arguments[2]:void 0)},setUint32:function(J,_){N(this,4,J,A,_,arguments.length>2?arguments[2]:void 0)},setFloat32:function(J,_){N(this,4,J,E,_,arguments.length>2?arguments[2]:void 0)},setFloat64:function(J,_){N(this,8,J,O,_,arguments.length>2?arguments[2]:void 0)}});else{if(!p(function(){W(1)})||!p(function(){new W(-1)})||p(function(){return new W,new W(1.5),new W(NaN),W.name!=U})){le=function(J){return m(this,le),new W(C(J))};for(var I=le[Q]=W[Q],D=w(W),L=0,H;D.length>L;)(H=D[L++])in le||f(le,H,W[H]);I.constructor=le}R&&b(ve)!==Se&&R(ve,Se);var K=new de(new le(2)),j=ve.setInt8;K.setInt8(0,2147483648),K.setInt8(1,2147483649),(K.getInt8(0)||!K.getInt8(1))&&h(ve,{setInt8:function(J,_){j.call(this,J,_<<24>>24)},setUint8:function(J,_){j.call(this,J,_<<24>>24)}},{unsafe:!0})}$(le,U),$(de,Y),s.exports={ArrayBuffer:le,DataView:de}},1048:function(s,l,a){var c=a(7908),u=a(1400),d=a(7466),f=Math.min;s.exports=[].copyWithin||function(p,m){var v=c(this),S=d(v.length),C=u(p,S),k=u(m,S),b=arguments.length>2?arguments[2]:void 0,R=f((b===void 0?S:u(b,S))-k,S-C),w=1;for(k<C&&C<k+R&&(w=-1,k+=R-1,C+=R-1);R-- >0;)k in v?v[C]=v[k]:delete v[C],C+=w,k+=w;return v}},1285:function(s,l,a){var c=a(7908),u=a(1400),d=a(7466);s.exports=function(h){for(var p=c(this),m=d(p.length),v=arguments.length,S=u(v>1?arguments[1]:void 0,m),C=v>2?arguments[2]:void 0,k=C===void 0?m:u(C,m);k>S;)p[S++]=h;return p}},8533:function(s,l,a){var c=a(2092).forEach,u=a(9341),d=u("forEach");s.exports=d?[].forEach:function(h){return c(this,h,arguments.length>1?arguments[1]:void 0)}},8457:function(s,l,a){var c=a(9974),u=a(7908),d=a(3411),f=a(7659),h=a(7466),p=a(6135),m=a(1246);s.exports=function(S){var C=u(S),k=typeof this=="function"?this:Array,b=arguments.length,R=b>1?arguments[1]:void 0,w=R!==void 0,B=m(C),V=0,$,z,F,P,U,Y;if(w&&(R=c(R,b>2?arguments[2]:void 0,2)),B!=null&&!(k==Array&&f(B)))for(P=B.call(C),U=P.next,z=new k;!(F=U.call(P)).done;V++)Y=w?d(P,R,[F.value,V],!0):F.value,p(z,V,Y);else for($=h(C.length),z=new k($);$>V;V++)Y=w?R(C[V],V):C[V],p(z,V,Y);return z.length=V,z}},1318:function(s,l,a){var c=a(5656),u=a(7466),d=a(1400),f=function(h){return function(p,m,v){var S=c(p),C=u(S.length),k=d(v,C),b;if(h&&m!=m){for(;C>k;)if(b=S[k++],b!=b)return!0}else for(;C>k;k++)if((h||k in S)&&S[k]===m)return h||k||0;return!h&&-1}};s.exports={includes:f(!0),indexOf:f(!1)}},2092:function(s,l,a){var c=a(9974),u=a(8361),d=a(7908),f=a(7466),h=a(5417),p=[].push,m=function(v){var S=v==1,C=v==2,k=v==3,b=v==4,R=v==6,w=v==7,B=v==5||R;return function(V,$,z,F){for(var P=d(V),U=u(P),Y=c($,z,3),Q=f(U.length),Z=0,re=F||h,W=S?re(V,Q):C||w?re(V,0):void 0,le,de;Q>Z;Z++)if((B||Z in U)&&(le=U[Z],de=Y(le,Z,P),v))if(S)W[Z]=de;else if(de)switch(v){case 3:return!0;case 5:return le;case 6:return Z;case 2:p.call(W,le)}else switch(v){case 4:return!1;case 7:p.call(W,le)}return R?-1:k||b?b:W}};s.exports={forEach:m(0),map:m(1),filter:m(2),some:m(3),every:m(4),find:m(5),findIndex:m(6),filterOut:m(7)}},6583:function(s,l,a){var c=a(5656),u=a(9958),d=a(7466),f=a(9341),h=Math.min,p=[].lastIndexOf,m=!!p&&1/[1].lastIndexOf(1,-0)<0,v=f("lastIndexOf"),S=m||!v;s.exports=S?function(k){if(m)return p.apply(this,arguments)||0;var b=c(this),R=d(b.length),w=R-1;for(arguments.length>1&&(w=h(w,u(arguments[1]))),w<0&&(w=R+w);w>=0;w--)if(w in b&&b[w]===k)return w||0;return-1}:p},1194:function(s,l,a){var c=a(7293),u=a(5112),d=a(7392),f=u("species");s.exports=function(h){return d>=51||!c(function(){var p=[],m=p.constructor={};return m[f]=function(){return{foo:1}},p[h](Boolean).foo!==1})}},9341:function(s,l,a){var c=a(7293);s.exports=function(u,d){var f=[][u];return!!f&&c(function(){f.call(null,d||function(){throw 1},1)})}},3671:function(s,l,a){var c=a(3099),u=a(7908),d=a(8361),f=a(7466),h=function(p){return function(m,v,S,C){c(v);var k=u(m),b=d(k),R=f(k.length),w=p?R-1:0,B=p?-1:1;if(S<2)for(;;){if(w in b){C=b[w],w+=B;break}if(w+=B,p?w<0:R<=w)throw TypeError("Reduce of empty array with no initial value")}for(;p?w>=0:R>w;w+=B)w in b&&(C=v(C,b[w],w,k));return C}};s.exports={left:h(!1),right:h(!0)}},5417:function(s,l,a){var c=a(111),u=a(3157),d=a(5112),f=d("species");s.exports=function(h,p){var m;return u(h)&&(m=h.constructor,typeof m=="function"&&(m===Array||u(m.prototype))?m=void 0:c(m)&&(m=m[f],m===null&&(m=void 0))),new(m===void 0?Array:m)(p===0?0:p)}},3411:function(s,l,a){var c=a(9670),u=a(9212);s.exports=function(d,f,h,p){try{return p?f(c(h)[0],h[1]):f(h)}catch(m){throw u(d),m}}},7072:function(s,l,a){var c=a(5112),u=c("iterator"),d=!1;try{var f=0,h={next:function(){return{done:!!f++}},return:function(){d=!0}};h[u]=function(){return this},Array.from(h,function(){throw 2})}catch{}s.exports=function(p,m){if(!m&&!d)return!1;var v=!1;try{var S={};S[u]=function(){return{next:function(){return{done:v=!0}}}},p(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"),h=u(function(){return arguments}())=="Arguments",p=function(m,v){try{return m[v]}catch{}};s.exports=c?u:function(m){var v,S,C;return m===void 0?"Undefined":m===null?"Null":typeof(S=p(v=Object(m),f))=="string"?S:h?u(v):(C=u(v))=="Object"&&typeof v.callee=="function"?"Arguments":C}},9920:function(s,l,a){var c=a(6656),u=a(3887),d=a(1236),f=a(3070);s.exports=function(h,p){for(var m=u(p),v=f.f,S=d.f,C=0;C<m.length;C++){var k=m[C];c(h,k)||v(h,k,S(p,k))}}},8544:function(s,l,a){var c=a(7293);s.exports=!c(function(){function u(){}return u.prototype.constructor=null,Object.getPrototypeOf(new u)!==u.prototype})},4994:function(s,l,a){var c=a(3383).IteratorPrototype,u=a(30),d=a(9114),f=a(8003),h=a(7497),p=function(){return this};s.exports=function(m,v,S){var C=v+" Iterator";return m.prototype=u(c,{next:d(1,S)}),f(m,C,!1,!0),h[C]=p,m}},8880:function(s,l,a){var c=a(9781),u=a(3070),d=a(9114);s.exports=c?function(f,h,p){return u.f(f,h,d(1,p))}:function(f,h,p){return f[h]=p,f}},9114:function(s){s.exports=function(l,a){return{enumerable:!(l&1),configurable:!(l&2),writable:!(l&4),value:a}}},6135:function(s,l,a){var c=a(7593),u=a(3070),d=a(9114);s.exports=function(f,h,p){var m=c(h);m in f?u.f(f,m,d(0,p)):f[m]=p}},654:function(s,l,a){var c=a(2109),u=a(4994),d=a(9518),f=a(7674),h=a(8003),p=a(8880),m=a(1320),v=a(5112),S=a(1913),C=a(7497),k=a(3383),b=k.IteratorPrototype,R=k.BUGGY_SAFARI_ITERATORS,w=v("iterator"),B="keys",V="values",$="entries",z=function(){return this};s.exports=function(F,P,U,Y,Q,Z,re){u(U,P,Y);var W=function(A){if(A===Q&&ye)return ye;if(!R&&A in ve)return ve[A];switch(A){case B:return function(){return new U(this,A)};case V:return function(){return new U(this,A)};case $:return function(){return new U(this,A)}}return function(){return new U(this)}},le=P+" Iterator",de=!1,ve=F.prototype,Se=ve[w]||ve["@@iterator"]||Q&&ve[Q],ye=!R&&Se||W(Q),we=P=="Array"&&ve.entries||Se,Ce,Te,ge;if(we&&(Ce=d(we.call(new F)),b!==Object.prototype&&Ce.next&&(!S&&d(Ce)!==b&&(f?f(Ce,b):typeof Ce[w]!="function"&&p(Ce,w,z)),h(Ce,le,!0,!0),S&&(C[le]=z))),Q==V&&Se&&Se.name!==V&&(de=!0,ye=function(){return Se.call(this)}),(!S||re)&&ve[w]!==ye&&p(ve,w,ye),C[P]=ye,Q)if(Te={values:W(V),keys:Z?ye:W(B),entries:W($)},re)for(ge in Te)(R||de||!(ge in ve))&&m(ve,ge,Te[ge]);else c({target:P,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(h){return f?d.createElement(h):{}}},8324:function(s){s.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},8113:function(s,l,a){var c=a(5005);s.exports=c("navigator","userAgent")||""},7392:function(s,l,a){var c=a(7854),u=a(8113),d=c.process,f=d&&d.versions,h=f&&f.v8,p,m;h?(p=h.split("."),m=p[0]+p[1]):u&&(p=u.match(/Edge\/(\d+)/),(!p||p[1]>=74)&&(p=u.match(/Chrome\/(\d+)/),p&&(m=p[1]))),s.exports=m&&+m},748:function(s){s.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:function(s,l,a){var c=a(7854),u=a(1236).f,d=a(8880),f=a(1320),h=a(3505),p=a(9920),m=a(4705);s.exports=function(v,S){var C=v.target,k=v.global,b=v.stat,R,w,B,V,$,z;if(k?w=c:b?w=c[C]||h(C,{}):w=(c[C]||{}).prototype,w)for(B in S){if($=S[B],v.noTargetGet?(z=u(w,B),V=z&&z.value):V=w[B],R=m(k?B:C+(b?".":"#")+B,v.forced),!R&&V!==void 0){if(typeof $==typeof V)continue;p($,V)}(v.sham||V&&V.sham)&&d($,"sham",!0),f(w,B,$,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),h=a(8880),p=d("species"),m=!u(function(){var b=/./;return b.exec=function(){var R=[];return R.groups={a:"7"},R},"".replace(b,"$<a>")!=="7"}),v=function(){return"a".replace(/./,"$0")==="$0"}(),S=d("replace"),C=function(){return/./[S]?/./[S]("a","$0")==="":!1}(),k=!u(function(){var b=/(?:)/,R=b.exec;b.exec=function(){return R.apply(this,arguments)};var w="ab".split(b);return w.length!==2||w[0]!=="a"||w[1]!=="b"});s.exports=function(b,R,w,B){var V=d(b),$=!u(function(){var Q={};return Q[V]=function(){return 7},""[b](Q)!=7}),z=$&&!u(function(){var Q=!1,Z=/a/;return b==="split"&&(Z={},Z.constructor={},Z.constructor[p]=function(){return Z},Z.flags="",Z[V]=/./[V]),Z.exec=function(){return Q=!0,null},Z[V](""),!Q});if(!$||!z||b==="replace"&&!(m&&v&&!C)||b==="split"&&!k){var F=/./[V],P=w(V,""[b],function(Q,Z,re,W,le){return Z.exec===f?$&&!le?{done:!0,value:F.call(Z,re,W)}:{done:!0,value:Q.call(re,Z,W)}:{done:!1}},{REPLACE_KEEPS_$0:v,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:C}),U=P[0],Y=P[1];c(String.prototype,b,U),c(RegExp.prototype,V,R==2?function(Q,Z){return Y.call(Q,this,Z)}:function(Q){return Y.call(Q,this)})}B&&h(RegExp.prototype[V],"sham",!0)}},9974:function(s,l,a){var c=a(3099);s.exports=function(u,d,f){if(c(u),d===void 0)return u;switch(f){case 0:return function(){return u.call(d)};case 1:return function(h){return u.call(d,h)};case 2:return function(h,p){return u.call(d,h,p)};case 3:return function(h,p,m){return u.call(d,h,p,m)}}return function(){return u.apply(d,arguments)}}},5005:function(s,l,a){var c=a(857),u=a(7854),d=function(f){return typeof f=="function"?f:void 0};s.exports=function(f,h){return arguments.length<2?d(c[f])||d(u[f]):c[f]&&c[f][h]||u[f]&&u[f][h]}},1246:function(s,l,a){var c=a(648),u=a(7497),d=a(5112),f=d("iterator");s.exports=function(h){if(h!=null)return h[f]||h["@@iterator"]||u[c(h)]}},8554:function(s,l,a){var c=a(9670),u=a(1246);s.exports=function(d){var f=u(d);if(typeof f!="function")throw TypeError(String(d)+" is not iterable");return c(f.call(d))}},647:function(s,l,a){var c=a(7908),u=Math.floor,d="".replace,f=/\$([$&'`]|\d\d?|<[^>]*>)/g,h=/\$([$&'`]|\d\d?)/g;s.exports=function(p,m,v,S,C,k){var b=v+p.length,R=S.length,w=h;return C!==void 0&&(C=c(C),w=f),d.call(k,w,function(B,V){var $;switch(V.charAt(0)){case"$":return"$";case"&":return p;case"`":return m.slice(0,v);case"'":return m.slice(b);case"<":$=C[V.slice(1,-1)];break;default:var z=+V;if(z===0)return B;if(z>R){var F=u(z/10);return F===0?B:F<=R?S[F-1]===void 0?V.charAt(1):S[F-1]+V.charAt(1):B}$=S[z-1]}return $===void 0?"":$})}},7854:function(s,l,a){var c=function(u){return u&&u.Math==Math&&u};s.exports=c(typeof globalThis=="object"&&globalThis)||c(typeof window=="object"&&window)||c(typeof self=="object"&&self)||c(typeof a.g=="object"&&a.g)||function(){return this}()||Function("return this")()},6656:function(s){var l={}.hasOwnProperty;s.exports=function(a,c){return l.call(a,c)}},3501:function(s){s.exports={}},490:function(s,l,a){var c=a(5005);s.exports=c("document","documentElement")},4664:function(s,l,a){var c=a(9781),u=a(7293),d=a(317);s.exports=!c&&!u(function(){return Object.defineProperty(d("div"),"a",{get:function(){return 7}}).a!=7})},1179:function(s){var l=Math.abs,a=Math.pow,c=Math.floor,u=Math.log,d=Math.LN2,f=function(p,m,v){var S=new Array(v),C=v*8-m-1,k=(1<<C)-1,b=k>>1,R=m===23?a(2,-24)-a(2,-77):0,w=p<0||p===0&&1/p<0?1:0,B=0,V,$,z;for(p=l(p),p!=p||p===1/0?($=p!=p?1:0,V=k):(V=c(u(p)/d),p*(z=a(2,-V))<1&&(V--,z*=2),V+b>=1?p+=R/z:p+=R*a(2,1-b),p*z>=2&&(V++,z/=2),V+b>=k?($=0,V=k):V+b>=1?($=(p*z-1)*a(2,m),V=V+b):($=p*a(2,b-1)*a(2,m),V=0));m>=8;S[B++]=$&255,$/=256,m-=8);for(V=V<<m|$,C+=m;C>0;S[B++]=V&255,V/=256,C-=8);return S[--B]|=w*128,S},h=function(p,m){var v=p.length,S=v*8-m-1,C=(1<<S)-1,k=C>>1,b=S-7,R=v-1,w=p[R--],B=w&127,V;for(w>>=7;b>0;B=B*256+p[R],R--,b-=8);for(V=B&(1<<-b)-1,B>>=-b,b+=m;b>0;V=V*256+p[R],R--,b-=8);if(B===0)B=1-k;else{if(B===C)return V?NaN:w?-1/0:1/0;V=V+a(2,m),B=B-k}return(w?-1:1)*V*a(2,B-m)};s.exports={pack:f,unpack:h}},8361:function(s,l,a){var c=a(7293),u=a(4326),d="".split;s.exports=c(function(){return!Object("z").propertyIsEnumerable(0)})?function(f){return u(f)=="String"?d.call(f,""):Object(f)}:Object},9587:function(s,l,a){var c=a(111),u=a(7674);s.exports=function(d,f,h){var p,m;return u&&typeof(p=f.constructor)=="function"&&p!==h&&c(m=p.prototype)&&m!==h.prototype&&u(d,m),d}},2788:function(s,l,a){var c=a(5465),u=Function.toString;typeof c.inspectSource!="function"&&(c.inspectSource=function(d){return u.call(d)}),s.exports=c.inspectSource},9909:function(s,l,a){var c=a(8536),u=a(7854),d=a(111),f=a(8880),h=a(6656),p=a(5465),m=a(6200),v=a(3501),S=u.WeakMap,C,k,b,R=function(P){return b(P)?k(P):C(P,{})},w=function(P){return function(U){var Y;if(!d(U)||(Y=k(U)).type!==P)throw TypeError("Incompatible receiver, "+P+" required");return Y}};if(c){var B=p.state||(p.state=new S),V=B.get,$=B.has,z=B.set;C=function(P,U){return U.facade=P,z.call(B,P,U),U},k=function(P){return V.call(B,P)||{}},b=function(P){return $.call(B,P)}}else{var F=m("state");v[F]=!0,C=function(P,U){return U.facade=P,f(P,F,U),U},k=function(P){return h(P,F)?P[F]:{}},b=function(P){return h(P,F)}}s.exports={set:C,get:k,has:b,enforce:R,getterFor:w}},7659:function(s,l,a){var c=a(5112),u=a(7497),d=c("iterator"),f=Array.prototype;s.exports=function(h){return h!==void 0&&(u.Array===h||f[d]===h)}},3157:function(s,l,a){var c=a(4326);s.exports=Array.isArray||function(d){return c(d)=="Array"}},4705:function(s,l,a){var c=a(7293),u=/#|\.prototype\./,d=function(v,S){var C=h[f(v)];return C==m?!0:C==p?!1:typeof S=="function"?c(S):!!S},f=d.normalize=function(v){return String(v).replace(u,".").toLowerCase()},h=d.data={},p=d.NATIVE="N",m=d.POLYFILL="P";s.exports=d},111:function(s){s.exports=function(l){return typeof l=="object"?l!==null:typeof l=="function"}},1913:function(s){s.exports=!1},7850:function(s,l,a){var c=a(111),u=a(4326),d=a(5112),f=d("match");s.exports=function(h){var p;return c(h)&&((p=h[f])!==void 0?!!p:u(h)=="RegExp")}},9212:function(s,l,a){var c=a(9670);s.exports=function(u){var d=u.return;if(d!==void 0)return c(d.call(u)).value}},3383:function(s,l,a){var c=a(7293),u=a(9518),d=a(8880),f=a(6656),h=a(5112),p=a(1913),m=h("iterator"),v=!1,S=function(){return this},C,k,b;[].keys&&(b=[].keys(),"next"in b?(k=u(u(b)),k!==Object.prototype&&(C=k)):v=!0);var R=C==null||c(function(){var w={};return C[m].call(w)!==w});R&&(C={}),(!p||R)&&!f(C,m)&&d(C,m,S),s.exports={IteratorPrototype:C,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 h=new URL("b?a=1&b=2&c=3","http://a"),p=h.searchParams,m="";return h.pathname="c%20d",p.forEach(function(v,S){p.delete("b"),m+=S+v}),d&&!h.toJSON||!p.sort||h.href!=="http://a/c%20d?a=1&c=3"||p.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!p[f]||new URL("https://a@b").username!=="a"||new URLSearchParams(new URLSearchParams("a=b")).get("a")!=="b"||new URL("http://тест").host!=="xn--e1aybc"||new URL("http://a#б").hash!=="#%D0%B1"||m!=="a1c3"||new URL("http://x",void 0).host!=="x"})},8536:function(s,l,a){var c=a(7854),u=a(2788),d=c.WeakMap;s.exports=typeof d=="function"&&/native code/.test(u(d))},1574:function(s,l,a){var c=a(9781),u=a(7293),d=a(1956),f=a(5181),h=a(5296),p=a(7908),m=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 C={},k={},b=Symbol(),R="abcdefghijklmnopqrst";return C[b]=7,R.split("").forEach(function(w){k[w]=w}),v({},C)[b]!=7||d(v({},k)).join("")!=R})?function(k,b){for(var R=p(k),w=arguments.length,B=1,V=f.f,$=h.f;w>B;)for(var z=m(arguments[B++]),F=V?d(z).concat(V(z)):d(z),P=F.length,U=0,Y;P>U;)Y=F[U++],(!c||$.call(z,Y))&&(R[Y]=z[Y]);return R}:v},30:function(s,l,a){var c=a(9670),u=a(6048),d=a(748),f=a(3501),h=a(490),p=a(317),m=a(6200),v=">",S="<",C="prototype",k="script",b=m("IE_PROTO"),R=function(){},w=function(F){return S+k+v+F+S+"/"+k+v},B=function(F){F.write(w("")),F.close();var P=F.parentWindow.Object;return F=null,P},V=function(){var F=p("iframe"),P="java"+k+":",U;return F.style.display="none",h.appendChild(F),F.src=String(P),U=F.contentWindow.document,U.open(),U.write(w("document.F=Object")),U.close(),U.F},$,z=function(){try{$=document.domain&&new ActiveXObject("htmlfile")}catch{}z=$?B($):V();for(var F=d.length;F--;)delete z[C][d[F]];return z()};f[b]=!0,s.exports=Object.create||function(P,U){var Y;return P!==null?(R[C]=c(P),Y=new R,R[C]=null,Y[b]=P):Y=z(),U===void 0?Y:u(Y,U)}},6048:function(s,l,a){var c=a(9781),u=a(3070),d=a(9670),f=a(1956);s.exports=c?Object.defineProperties:function(p,m){d(p);for(var v=f(m),S=v.length,C=0,k;S>C;)u.f(p,k=v[C++],m[k]);return p}},3070:function(s,l,a){var c=a(9781),u=a(4664),d=a(9670),f=a(7593),h=Object.defineProperty;l.f=c?h:function(m,v,S){if(d(m),v=f(v,!0),d(S),u)try{return h(m,v,S)}catch{}if("get"in S||"set"in S)throw TypeError("Accessors not supported");return"value"in S&&(m[v]=S.value),m}},1236:function(s,l,a){var c=a(9781),u=a(5296),d=a(9114),f=a(5656),h=a(7593),p=a(6656),m=a(4664),v=Object.getOwnPropertyDescriptor;l.f=c?v:function(C,k){if(C=f(C),k=h(k,!0),m)try{return v(C,k)}catch{}if(p(C,k))return d(!u.f.call(C,k),C[k])}},8006:function(s,l,a){var c=a(6324),u=a(748),d=u.concat("length","prototype");l.f=Object.getOwnPropertyNames||function(h){return c(h,d)}},5181:function(s,l){l.f=Object.getOwnPropertySymbols},9518:function(s,l,a){var c=a(6656),u=a(7908),d=a(6200),f=a(8544),h=d("IE_PROTO"),p=Object.prototype;s.exports=f?Object.getPrototypeOf:function(m){return m=u(m),c(m,h)?m[h]:typeof m.constructor=="function"&&m instanceof m.constructor?m.constructor.prototype:m instanceof Object?p:null}},6324:function(s,l,a){var c=a(6656),u=a(5656),d=a(1318).indexOf,f=a(3501);s.exports=function(h,p){var m=u(h),v=0,S=[],C;for(C in m)!c(f,C)&&c(m,C)&&S.push(C);for(;p.length>v;)c(m,C=p[v++])&&(~d(S,C)||S.push(C));return S}},1956:function(s,l,a){var c=a(6324),u=a(748);s.exports=Object.keys||function(f){return c(f,u)}},5296:function(s,l){var a={}.propertyIsEnumerable,c=Object.getOwnPropertyDescriptor,u=c&&!a.call({1:2},1);l.f=u?function(f){var h=c(this,f);return!!h&&h.enumerable}:a},7674:function(s,l,a){var c=a(9670),u=a(6077);s.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var d=!1,f={},h;try{h=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,h.call(f,[]),d=f instanceof Array}catch{}return function(m,v){return c(m),u(v),d?h.call(m,v):m.__proto__=v,m}}():void 0)},288:function(s,l,a){var c=a(1694),u=a(648);s.exports=c?{}.toString:function(){return"[object "+u(this)+"]"}},3887:function(s,l,a){var c=a(5005),u=a(8006),d=a(5181),f=a(9670);s.exports=c("Reflect","ownKeys")||function(p){var m=u.f(f(p)),v=d.f;return v?m.concat(v(p)):m}},857:function(s,l,a){var c=a(7854);s.exports=c},2248:function(s,l,a){var c=a(1320);s.exports=function(u,d,f){for(var h in d)c(u,h,d[h],f);return u}},1320:function(s,l,a){var c=a(7854),u=a(8880),d=a(6656),f=a(3505),h=a(2788),p=a(9909),m=p.get,v=p.enforce,S=String(String).split("String");(s.exports=function(C,k,b,R){var w=R?!!R.unsafe:!1,B=R?!!R.enumerable:!1,V=R?!!R.noTargetGet:!1,$;if(typeof b=="function"&&(typeof k=="string"&&!d(b,"name")&&u(b,"name",k),$=v(b),$.source||($.source=S.join(typeof k=="string"?k:""))),C===c){B?C[k]=b:f(k,b);return}else w?!V&&C[k]&&(B=!0):delete C[k];B?C[k]=b:u(C,k,b)})(Function.prototype,"toString",function(){return typeof this=="function"&&m(this).source||h(this)})},7651:function(s,l,a){var c=a(4326),u=a(2261);s.exports=function(d,f){var h=d.exec;if(typeof h=="function"){var p=h.call(d,f);if(typeof p!="object")throw TypeError("RegExp exec method returned something other than an Object or null");return p}if(c(d)!=="RegExp")throw TypeError("RegExp#exec called on incompatible receiver");return u.call(d,f)}},2261:function(s,l,a){var c=a(7066),u=a(2999),d=RegExp.prototype.exec,f=String.prototype.replace,h=d,p=function(){var C=/a/,k=/b*/g;return d.call(C,"a"),d.call(k,"a"),C.lastIndex!==0||k.lastIndex!==0}(),m=u.UNSUPPORTED_Y||u.BROKEN_CARET,v=/()??/.exec("")[1]!==void 0,S=p||v||m;S&&(h=function(k){var b=this,R,w,B,V,$=m&&b.sticky,z=c.call(b),F=b.source,P=0,U=k;return $&&(z=z.replace("y",""),z.indexOf("g")===-1&&(z+="g"),U=String(k).slice(b.lastIndex),b.lastIndex>0&&(!b.multiline||b.multiline&&k[b.lastIndex-1]!==`
|
|
5
|
+
`)&&(F="(?: "+F+")",U=" "+U,P++),w=new RegExp("^(?:"+F+")",z)),v&&(w=new RegExp("^"+F+"$(?!\\s)",z)),p&&(R=b.lastIndex),B=d.call($?w:b,U),$?B?(B.input=B.input.slice(P),B[0]=B[0].slice(P),B.index=b.lastIndex,b.lastIndex+=B[0].length):b.lastIndex=0:p&&B&&(b.lastIndex=b.global?B.index+B[0].length:R),v&&B&&B.length>1&&f.call(B[0],w,function(){for(V=1;V<arguments.length-2;V++)arguments[V]===void 0&&(B[V]=void 0)}),B}),s.exports=h},7066:function(s,l,a){var c=a(9670);s.exports=function(){var u=c(this),d="";return u.global&&(d+="g"),u.ignoreCase&&(d+="i"),u.multiline&&(d+="m"),u.dotAll&&(d+="s"),u.unicode&&(d+="u"),u.sticky&&(d+="y"),d}},2999:function(s,l,a){var c=a(7293);function u(d,f){return RegExp(d,f)}l.UNSUPPORTED_Y=c(function(){var d=u("a","y");return d.lastIndex=2,d.exec("abcd")!=null}),l.BROKEN_CARET=c(function(){var d=u("^r","gy");return d.lastIndex=2,d.exec("str")!=null})},4488:function(s){s.exports=function(l){if(l==null)throw TypeError("Can't call method on "+l);return l}},3505:function(s,l,a){var c=a(7854),u=a(8880);s.exports=function(d,f){try{u(c,d,f)}catch{c[d]=f}return f}},6340:function(s,l,a){var c=a(5005),u=a(3070),d=a(5112),f=a(9781),h=d("species");s.exports=function(p){var m=c(p),v=u.f;f&&m&&!m[h]&&v(m,h,{configurable:!0,get:function(){return this}})}},8003:function(s,l,a){var c=a(3070).f,u=a(6656),d=a(5112),f=d("toStringTag");s.exports=function(h,p,m){h&&!u(h=m?h:h.prototype,f)&&c(h,f,{configurable:!0,value:p})}},6200:function(s,l,a){var c=a(2309),u=a(9711),d=c("keys");s.exports=function(f){return d[f]||(d[f]=u(f))}},5465:function(s,l,a){var c=a(7854),u=a(3505),d="__core-js_shared__",f=c[d]||u(d,{});s.exports=f},2309:function(s,l,a){var c=a(1913),u=a(5465);(s.exports=function(d,f){return u[d]||(u[d]=f!==void 0?f:{})})("versions",[]).push({version:"3.9.0",mode:c?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},6707:function(s,l,a){var c=a(9670),u=a(3099),d=a(5112),f=d("species");s.exports=function(h,p){var m=c(h).constructor,v;return m===void 0||(v=c(m)[f])==null?p:u(v)}},8710:function(s,l,a){var c=a(9958),u=a(4488),d=function(f){return function(h,p){var m=String(u(h)),v=c(p),S=m.length,C,k;return v<0||v>=S?f?"":void 0:(C=m.charCodeAt(v),C<55296||C>56319||v+1===S||(k=m.charCodeAt(v+1))<56320||k>57343?f?m.charAt(v):C:f?m.slice(v,v+2):(C-55296<<10)+(k-56320)+65536)}};s.exports={codeAt:d(!1),charAt:d(!0)}},3197:function(s){var l=2147483647,a=36,c=1,u=26,d=38,f=700,h=72,p=128,m="-",v=/[^\0-\u007E]/,S=/[.\u3002\uFF0E\uFF61]/g,C="Overflow: input needs wider integers to process",k=a-c,b=Math.floor,R=String.fromCharCode,w=function(z){for(var F=[],P=0,U=z.length;P<U;){var Y=z.charCodeAt(P++);if(Y>=55296&&Y<=56319&&P<U){var Q=z.charCodeAt(P++);(Q&64512)==56320?F.push(((Y&1023)<<10)+(Q&1023)+65536):(F.push(Y),P--)}else F.push(Y)}return F},B=function(z){return z+22+75*(z<26)},V=function(z,F,P){var U=0;for(z=P?b(z/f):z>>1,z+=b(z/F);z>k*u>>1;U+=a)z=b(z/k);return b(U+(k+1)*z/(z+d))},$=function(z){var F=[];z=w(z);var P=z.length,U=p,Y=0,Q=h,Z,re;for(Z=0;Z<z.length;Z++)re=z[Z],re<128&&F.push(R(re));var W=F.length,le=W;for(W&&F.push(m);le<P;){var de=l;for(Z=0;Z<z.length;Z++)re=z[Z],re>=U&&re<de&&(de=re);var ve=le+1;if(de-U>b((l-Y)/ve))throw RangeError(C);for(Y+=(de-U)*ve,U=de,Z=0;Z<z.length;Z++){if(re=z[Z],re<U&&++Y>l)throw RangeError(C);if(re==U){for(var Se=Y,ye=a;;ye+=a){var we=ye<=Q?c:ye>=Q+u?u:ye-Q;if(Se<we)break;var Ce=Se-we,Te=a-we;F.push(R(B(we+Ce%Te))),Se=b(Ce/Te)}F.push(R(B(Se))),Q=V(Y,ve,le==W),Y=0,++le}}++Y,++U}return F.join("")};s.exports=function(z){var F=[],P=z.toLowerCase().replace(S,".").split("."),U,Y;for(U=0;U<P.length;U++)Y=P[U],F.push(v.test(Y)?"xn--"+$(Y):Y);return F.join(".")}},6091:function(s,l,a){var c=a(7293),u=a(1361),d="
";s.exports=function(f){return c(function(){return!!u[f]()||d[f]()!=d||u[f].name!==f})}},3111:function(s,l,a){var c=a(4488),u=a(1361),d="["+u+"]",f=RegExp("^"+d+d+"*"),h=RegExp(d+d+"*$"),p=function(m){return function(v){var S=String(c(v));return m&1&&(S=S.replace(f,"")),m&2&&(S=S.replace(h,"")),S}};s.exports={start:p(1),end:p(2),trim:p(3)}},1400:function(s,l,a){var c=a(9958),u=Math.max,d=Math.min;s.exports=function(f,h){var p=c(f);return p<0?u(p+h,0):d(p,h)}},7067:function(s,l,a){var c=a(9958),u=a(7466);s.exports=function(d){if(d===void 0)return 0;var f=c(d),h=u(f);if(f!==h)throw RangeError("Wrong length or index");return h}},5656:function(s,l,a){var c=a(8361),u=a(4488);s.exports=function(d){return c(u(d))}},9958:function(s){var l=Math.ceil,a=Math.floor;s.exports=function(c){return isNaN(c=+c)?0:(c>0?a:l)(c)}},7466:function(s,l,a){var c=a(9958),u=Math.min;s.exports=function(d){return d>0?u(c(d),9007199254740991):0}},7908:function(s,l,a){var c=a(4488);s.exports=function(u){return Object(c(u))}},4590:function(s,l,a){var c=a(3002);s.exports=function(u,d){var f=c(u);if(f%d)throw RangeError("Wrong offset");return f}},3002:function(s,l,a){var c=a(9958);s.exports=function(u){var d=c(u);if(d<0)throw RangeError("The argument can't be less than 0");return d}},7593:function(s,l,a){var c=a(111);s.exports=function(u,d){if(!c(u))return u;var f,h;if(d&&typeof(f=u.toString)=="function"&&!c(h=f.call(u))||typeof(f=u.valueOf)=="function"&&!c(h=f.call(u))||!d&&typeof(f=u.toString)=="function"&&!c(h=f.call(u)))return h;throw TypeError("Can't convert object to primitive value")}},1694:function(s,l,a){var c=a(5112),u=c("toStringTag"),d={};d[u]="z",s.exports=String(d)==="[object z]"},9843:function(s,l,a){var c=a(2109),u=a(7854),d=a(9781),f=a(3832),h=a(260),p=a(3331),m=a(5787),v=a(9114),S=a(8880),C=a(7466),k=a(7067),b=a(4590),R=a(7593),w=a(6656),B=a(648),V=a(111),$=a(30),z=a(7674),F=a(8006).f,P=a(7321),U=a(2092).forEach,Y=a(6340),Q=a(3070),Z=a(1236),re=a(9909),W=a(9587),le=re.get,de=re.set,ve=Q.f,Se=Z.f,ye=Math.round,we=u.RangeError,Ce=p.ArrayBuffer,Te=p.DataView,ge=h.NATIVE_ARRAY_BUFFER_VIEWS,A=h.TYPED_ARRAY_TAG,M=h.TypedArray,E=h.TypedArrayPrototype,O=h.aTypedArrayConstructor,y=h.isTypedArray,x="BYTES_PER_ELEMENT",N="Wrong length",I=function(G,J){for(var _=0,ce=J.length,me=new(O(G))(ce);ce>_;)me[_]=J[_++];return me},D=function(G,J){ve(G,J,{get:function(){return le(this)[J]}})},L=function(G){var J;return G instanceof Ce||(J=B(G))=="ArrayBuffer"||J=="SharedArrayBuffer"},H=function(G,J){return y(G)&&typeof J!="symbol"&&J in G&&String(+J)==String(J)},K=function(J,_){return H(J,_=R(_,!0))?v(2,J[_]):Se(J,_)},j=function(J,_,ce){return H(J,_=R(_,!0))&&V(ce)&&w(ce,"value")&&!w(ce,"get")&&!w(ce,"set")&&!ce.configurable&&(!w(ce,"writable")||ce.writable)&&(!w(ce,"enumerable")||ce.enumerable)?(J[_]=ce.value,J):ve(J,_,ce)};d?(ge||(Z.f=K,Q.f=j,D(E,"buffer"),D(E,"byteOffset"),D(E,"byteLength"),D(E,"length")),c({target:"Object",stat:!0,forced:!ge},{getOwnPropertyDescriptor:K,defineProperty:j}),s.exports=function(G,J,_){var ce=G.match(/\d+$/)[0]/8,me=G+(_?"Clamped":"")+"Array",Oe="get"+G,Fe="set"+G,Pe=u[me],Me=Pe,je=Me&&Me.prototype,ut={},_e=function(se,ae){var be=le(se);return be.view[Oe](ae*ce+be.byteOffset,!0)},cn=function(se,ae,be){var Ee=le(se);_&&(be=(be=ye(be))<0?0:be>255?255:be&255),Ee.view[Fe](ae*ce+Ee.byteOffset,be,!0)},X=function(se,ae){ve(se,ae,{get:function(){return _e(this,ae)},set:function(be){return cn(this,ae,be)},enumerable:!0})};ge?f&&(Me=J(function(se,ae,be,Ee){return m(se,Me,me),W(function(){return V(ae)?L(ae)?Ee!==void 0?new Pe(ae,b(be,ce),Ee):be!==void 0?new Pe(ae,b(be,ce)):new Pe(ae):y(ae)?I(Me,ae):P.call(Me,ae):new Pe(k(ae))}(),se,Me)}),z&&z(Me,M),U(F(Pe),function(se){se in Me||S(Me,se,Pe[se])}),Me.prototype=je):(Me=J(function(se,ae,be,Ee){m(se,Me,me);var Be=0,$e=0,rt,it,Ye;if(!V(ae))Ye=k(ae),it=Ye*ce,rt=new Ce(it);else if(L(ae)){rt=ae,$e=b(be,ce);var Ht=ae.byteLength;if(Ee===void 0){if(Ht%ce||(it=Ht-$e,it<0))throw we(N)}else if(it=C(Ee)*ce,it+$e>Ht)throw we(N);Ye=it/ce}else return y(ae)?I(Me,ae):P.call(Me,ae);for(de(se,{buffer:rt,byteOffset:$e,byteLength:it,length:Ye,view:new Te(rt)});Be<Ye;)X(se,Be++)}),z&&z(Me,M),je=Me.prototype=$(E)),je.constructor!==Me&&S(je,"constructor",Me),A&&S(je,A,me),ut[me]=Me,c({global:!0,forced:Me!=Pe,sham:!ge},ut),x in Me||S(Me,x,ce),x in je||S(je,x,ce),Y(me)}):s.exports=function(){}},3832:function(s,l,a){var c=a(7854),u=a(7293),d=a(7072),f=a(260).NATIVE_ARRAY_BUFFER_VIEWS,h=c.ArrayBuffer,p=c.Int8Array;s.exports=!f||!u(function(){p(1)})||!u(function(){new p(-1)})||!d(function(m){new p,new p(null),new p(1.5),new p(m)},!0)||u(function(){return new p(new h(2),1,void 0).length!==1})},3074:function(s,l,a){var c=a(260).aTypedArrayConstructor,u=a(6707);s.exports=function(d,f){for(var h=u(d,d.constructor),p=0,m=f.length,v=new(c(h))(m);m>p;)v[p]=f[p++];return v}},7321:function(s,l,a){var c=a(7908),u=a(7466),d=a(1246),f=a(7659),h=a(9974),p=a(260).aTypedArrayConstructor;s.exports=function(v){var S=c(v),C=arguments.length,k=C>1?arguments[1]:void 0,b=k!==void 0,R=d(S),w,B,V,$,z,F;if(R!=null&&!f(R))for(z=R.call(S),F=z.next,S=[];!($=F.call(z)).done;)S.push($.value);for(b&&C>2&&(k=h(k,arguments[2],2)),B=u(S.length),V=new(p(this))(B),w=0;B>w;w++)V[w]=b?k(S[w],w):S[w];return V}},9711:function(s){var l=0,a=Math.random();s.exports=function(c){return"Symbol("+String(c===void 0?"":c)+")_"+(++l+a).toString(36)}},3307:function(s,l,a){var c=a(133);s.exports=c&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},5112:function(s,l,a){var c=a(7854),u=a(2309),d=a(6656),f=a(9711),h=a(133),p=a(3307),m=u("wks"),v=c.Symbol,S=p?v:v&&v.withoutSetter||f;s.exports=function(C){return d(m,C)||(h&&d(v,C)?m[C]=v[C]:m[C]=S("Symbol."+C)),m[C]}},1361:function(s){s.exports=`
|
|
6
|
+
\v\f\r \u2028\u2029\uFEFF`},8264:function(s,l,a){var c=a(2109),u=a(7854),d=a(3331),f=a(6340),h="ArrayBuffer",p=d[h],m=u[h];c({global:!0,forced:m!==p},{ArrayBuffer:p}),f(h)},2222:function(s,l,a){var c=a(2109),u=a(7293),d=a(3157),f=a(111),h=a(7908),p=a(7466),m=a(6135),v=a(5417),S=a(1194),C=a(5112),k=a(7392),b=C("isConcatSpreadable"),R=9007199254740991,w="Maximum allowed index exceeded",B=k>=51||!u(function(){var F=[];return F[b]=!1,F.concat()[0]!==F}),V=S("concat"),$=function(F){if(!f(F))return!1;var P=F[b];return P!==void 0?!!P:d(F)},z=!B||!V;c({target:"Array",proto:!0,forced:z},{concat:function(P){var U=h(this),Y=v(U,0),Q=0,Z,re,W,le,de;for(Z=-1,W=arguments.length;Z<W;Z++)if(de=Z===-1?U:arguments[Z],$(de)){if(le=p(de.length),Q+le>R)throw TypeError(w);for(re=0;re<le;re++,Q++)re in de&&m(Y,Q,de[re])}else{if(Q>=R)throw TypeError(w);m(Y,Q++,de)}return Y.length=Q,Y}})},7327:function(s,l,a){var c=a(2109),u=a(2092).filter,d=a(1194),f=d("filter");c({target:"Array",proto:!0,forced:!f},{filter:function(p){return u(this,p,arguments.length>1?arguments[1]:void 0)}})},2772:function(s,l,a){var c=a(2109),u=a(1318).indexOf,d=a(9341),f=[].indexOf,h=!!f&&1/[1].indexOf(1,-0)<0,p=d("indexOf");c({target:"Array",proto:!0,forced:h||!p},{indexOf:function(v){return h?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),h=a(654),p="Array Iterator",m=f.set,v=f.getterFor(p);s.exports=h(Array,"Array",function(S,C){m(this,{type:p,target:c(S),index:0,kind:C})},function(){var S=v(this),C=S.target,k=S.kind,b=S.index++;return!C||b>=C.length?(S.target=void 0,{value:void 0,done:!0}):k=="keys"?{value:b,done:!1}:k=="values"?{value:C[b],done:!1}:{value:[b,C[b]],done:!1}},"values"),d.Arguments=d.Array,u("keys"),u("values"),u("entries")},1249:function(s,l,a){var c=a(2109),u=a(2092).map,d=a(1194),f=d("map");c({target:"Array",proto:!0,forced:!f},{map:function(p){return u(this,p,arguments.length>1?arguments[1]:void 0)}})},7042:function(s,l,a){var c=a(2109),u=a(111),d=a(3157),f=a(1400),h=a(7466),p=a(5656),m=a(6135),v=a(5112),S=a(1194),C=S("slice"),k=v("species"),b=[].slice,R=Math.max;c({target:"Array",proto:!0,forced:!C},{slice:function(B,V){var $=p(this),z=h($.length),F=f(B,z),P=f(V===void 0?z:V,z),U,Y,Q;if(d($)&&(U=$.constructor,typeof U=="function"&&(U===Array||d(U.prototype))?U=void 0:u(U)&&(U=U[k],U===null&&(U=void 0)),U===Array||U===void 0))return b.call($,F,P);for(Y=new(U===void 0?Array:U)(R(P-F,0)),Q=0;F<P;F++,Q++)F in $&&m(Y,Q,$[F]);return Y.length=Q,Y}})},561:function(s,l,a){var c=a(2109),u=a(1400),d=a(9958),f=a(7466),h=a(7908),p=a(5417),m=a(6135),v=a(1194),S=v("splice"),C=Math.max,k=Math.min,b=9007199254740991,R="Maximum allowed length exceeded";c({target:"Array",proto:!0,forced:!S},{splice:function(B,V){var $=h(this),z=f($.length),F=u(B,z),P=arguments.length,U,Y,Q,Z,re,W;if(P===0?U=Y=0:P===1?(U=0,Y=z-F):(U=P-2,Y=k(C(d(V),0),z-F)),z+U-Y>b)throw TypeError(R);for(Q=p($,Y),Z=0;Z<Y;Z++)re=F+Z,re in $&&m(Q,Z,$[re]);if(Q.length=Y,U<Y){for(Z=F;Z<z-Y;Z++)re=Z+Y,W=Z+U,re in $?$[W]=$[re]:delete $[W];for(Z=z;Z>z-Y+U;Z--)delete $[Z-1]}else if(U>Y)for(Z=z-Y;Z>F;Z--)re=Z+Y-1,W=Z+U-1,re in $?$[W]=$[re]:delete $[W];for(Z=0;Z<U;Z++)$[Z+F]=arguments[Z+2];return $.length=z-Y+U,Q}})},8309:function(s,l,a){var c=a(9781),u=a(3070).f,d=Function.prototype,f=d.toString,h=/^\s*function ([^ (]*)/,p="name";c&&!(p in d)&&u(d,p,{configurable:!0,get:function(){try{return f.call(this).match(h)[1]}catch{return""}}})},489:function(s,l,a){var c=a(2109),u=a(7293),d=a(7908),f=a(9518),h=a(8544),p=u(function(){f(1)});c({target:"Object",stat:!0,forced:p,sham:!h},{getPrototypeOf:function(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),h="toString",p=RegExp.prototype,m=p[h],v=d(function(){return m.call({source:"a",flags:"b"})!="/a/b"}),S=m.name!=h;(v||S)&&c(RegExp.prototype,h,function(){var k=u(this),b=String(k.source),R=k.flags,w=String(R===void 0&&k instanceof RegExp&&!("flags"in p)?f.call(k):R);return"/"+b+"/"+w},{unsafe:!0})},8783:function(s,l,a){var c=a(8710).charAt,u=a(9909),d=a(654),f="String Iterator",h=u.set,p=u.getterFor(f);d(String,"String",function(m){h(this,{type:f,string:String(m),index:0})},function(){var v=p(this),S=v.string,C=v.index,k;return C>=S.length?{value:void 0,done:!0}:(k=c(S,C),v.index+=k.length,{value:k,done:!1})})},4723:function(s,l,a){var c=a(7007),u=a(9670),d=a(7466),f=a(4488),h=a(1530),p=a(7651);c("match",1,function(m,v,S){return[function(k){var b=f(this),R=k==null?void 0:k[m];return R!==void 0?R.call(k,b):new RegExp(k)[m](String(b))},function(C){var k=S(v,C,this);if(k.done)return k.value;var b=u(C),R=String(this);if(!b.global)return p(b,R);var w=b.unicode;b.lastIndex=0;for(var B=[],V=0,$;($=p(b,R))!==null;){var z=String($[0]);B[V]=z,z===""&&(b.lastIndex=h(R,d(b.lastIndex),w)),V++}return V===0?null:B}]})},5306:function(s,l,a){var c=a(7007),u=a(9670),d=a(7466),f=a(9958),h=a(4488),p=a(1530),m=a(647),v=a(7651),S=Math.max,C=Math.min,k=function(b){return b===void 0?b:String(b)};c("replace",2,function(b,R,w,B){var V=B.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,$=B.REPLACE_KEEPS_$0,z=V?"$":"$0";return[function(P,U){var Y=h(this),Q=P==null?void 0:P[b];return Q!==void 0?Q.call(P,Y,U):R.call(String(Y),P,U)},function(F,P){if(!V&&$||typeof P=="string"&&P.indexOf(z)===-1){var U=w(R,F,this,P);if(U.done)return U.value}var Y=u(F),Q=String(this),Z=typeof P=="function";Z||(P=String(P));var re=Y.global;if(re){var W=Y.unicode;Y.lastIndex=0}for(var le=[];;){var de=v(Y,Q);if(de===null||(le.push(de),!re))break;var ve=String(de[0]);ve===""&&(Y.lastIndex=p(Q,d(Y.lastIndex),W))}for(var Se="",ye=0,we=0;we<le.length;we++){de=le[we];for(var Ce=String(de[0]),Te=S(C(f(de.index),Q.length),0),ge=[],A=1;A<de.length;A++)ge.push(k(de[A]));var M=de.groups;if(Z){var E=[Ce].concat(ge,Te,Q);M!==void 0&&E.push(M);var O=String(P.apply(void 0,E))}else O=m(Ce,Q,Te,ge,M,P);Te>=ye&&(Se+=Q.slice(ye,Te)+O,ye=Te+Ce.length)}return Se+Q.slice(ye)}]})},3123:function(s,l,a){var c=a(7007),u=a(7850),d=a(9670),f=a(4488),h=a(6707),p=a(1530),m=a(7466),v=a(7651),S=a(2261),C=a(7293),k=[].push,b=Math.min,R=4294967295,w=!C(function(){return!RegExp(R,"y")});c("split",2,function(B,V,$){var z;return"abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?z=function(F,P){var U=String(f(this)),Y=P===void 0?R:P>>>0;if(Y===0)return[];if(F===void 0)return[U];if(!u(F))return V.call(U,F,Y);for(var Q=[],Z=(F.ignoreCase?"i":"")+(F.multiline?"m":"")+(F.unicode?"u":"")+(F.sticky?"y":""),re=0,W=new RegExp(F.source,Z+"g"),le,de,ve;(le=S.call(W,U))&&(de=W.lastIndex,!(de>re&&(Q.push(U.slice(re,le.index)),le.length>1&&le.index<U.length&&k.apply(Q,le.slice(1)),ve=le[0].length,re=de,Q.length>=Y)));)W.lastIndex===le.index&&W.lastIndex++;return re===U.length?(ve||!W.test(""))&&Q.push(""):Q.push(U.slice(re)),Q.length>Y?Q.slice(0,Y):Q}:"0".split(void 0,0).length?z=function(F,P){return F===void 0&&P===0?[]:V.call(this,F,P)}:z=V,[function(P,U){var Y=f(this),Q=P==null?void 0:P[B];return Q!==void 0?Q.call(P,Y,U):z.call(String(Y),P,U)},function(F,P){var U=$(z,F,this,P,z!==V);if(U.done)return U.value;var Y=d(F),Q=String(this),Z=h(Y,RegExp),re=Y.unicode,W=(Y.ignoreCase?"i":"")+(Y.multiline?"m":"")+(Y.unicode?"u":"")+(w?"y":"g"),le=new Z(w?Y:"^(?:"+Y.source+")",W),de=P===void 0?R:P>>>0;if(de===0)return[];if(Q.length===0)return v(le,Q)===null?[Q]:[];for(var ve=0,Se=0,ye=[];Se<Q.length;){le.lastIndex=w?Se:0;var we=v(le,w?Q:Q.slice(Se)),Ce;if(we===null||(Ce=b(m(le.lastIndex+(w?0:Se)),Q.length))===ve)Se=p(Q,Se,re);else{if(ye.push(Q.slice(ve,Se)),ye.length===de)return ye;for(var Te=1;Te<=we.length-1;Te++)if(ye.push(we[Te]),ye.length===de)return ye;Se=ve=Ce}}return ye.push(Q.slice(ve)),ye}]},!w)},3210:function(s,l,a){var c=a(2109),u=a(3111).trim,d=a(6091);c({target:"String",proto:!0,forced:d("trim")},{trim:function(){return u(this)}})},2990:function(s,l,a){var c=a(260),u=a(1048),d=c.aTypedArray,f=c.exportTypedArrayMethod;f("copyWithin",function(p,m){return u.call(d(this),p,m,arguments.length>2?arguments[2]:void 0)})},8927:function(s,l,a){var c=a(260),u=a(2092).every,d=c.aTypedArray,f=c.exportTypedArrayMethod;f("every",function(p){return u(d(this),p,arguments.length>1?arguments[1]:void 0)})},3105:function(s,l,a){var c=a(260),u=a(1285),d=c.aTypedArray,f=c.exportTypedArrayMethod;f("fill",function(p){return u.apply(d(this),arguments)})},5035:function(s,l,a){var c=a(260),u=a(2092).filter,d=a(3074),f=c.aTypedArray,h=c.exportTypedArrayMethod;h("filter",function(m){var v=u(f(this),m,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(p){return u(d(this),p,arguments.length>1?arguments[1]:void 0)})},4345:function(s,l,a){var c=a(260),u=a(2092).find,d=c.aTypedArray,f=c.exportTypedArrayMethod;f("find",function(p){return u(d(this),p,arguments.length>1?arguments[1]:void 0)})},2846:function(s,l,a){var c=a(260),u=a(2092).forEach,d=c.aTypedArray,f=c.exportTypedArrayMethod;f("forEach",function(p){u(d(this),p,arguments.length>1?arguments[1]:void 0)})},4731:function(s,l,a){var c=a(260),u=a(1318).includes,d=c.aTypedArray,f=c.exportTypedArrayMethod;f("includes",function(p){return u(d(this),p,arguments.length>1?arguments[1]:void 0)})},7209:function(s,l,a){var c=a(260),u=a(1318).indexOf,d=c.aTypedArray,f=c.exportTypedArrayMethod;f("indexOf",function(p){return u(d(this),p,arguments.length>1?arguments[1]:void 0)})},6319:function(s,l,a){var c=a(7854),u=a(260),d=a(6992),f=a(5112),h=f("iterator"),p=c.Uint8Array,m=d.values,v=d.keys,S=d.entries,C=u.aTypedArray,k=u.exportTypedArrayMethod,b=p&&p.prototype[h],R=!!b&&(b.name=="values"||b.name==null),w=function(){return m.call(C(this))};k("entries",function(){return S.call(C(this))}),k("keys",function(){return v.call(C(this))}),k("values",w,!R),k(h,w,!R)},8867:function(s,l,a){var c=a(260),u=c.aTypedArray,d=c.exportTypedArrayMethod,f=[].join;d("join",function(p){return f.apply(u(this),arguments)})},7789:function(s,l,a){var c=a(260),u=a(6583),d=c.aTypedArray,f=c.exportTypedArrayMethod;f("lastIndexOf",function(p){return u.apply(d(this),arguments)})},3739:function(s,l,a){var c=a(260),u=a(2092).map,d=a(6707),f=c.aTypedArray,h=c.aTypedArrayConstructor,p=c.exportTypedArrayMethod;p("map",function(v){return u(f(this),v,arguments.length>1?arguments[1]:void 0,function(S,C){return new(h(d(S,S.constructor)))(C)})})},4483:function(s,l,a){var c=a(260),u=a(3671).right,d=c.aTypedArray,f=c.exportTypedArrayMethod;f("reduceRight",function(p){return u(d(this),p,arguments.length,arguments.length>1?arguments[1]:void 0)})},9368:function(s,l,a){var c=a(260),u=a(3671).left,d=c.aTypedArray,f=c.exportTypedArrayMethod;f("reduce",function(p){return u(d(this),p,arguments.length,arguments.length>1?arguments[1]:void 0)})},2056:function(s,l,a){var c=a(260),u=c.aTypedArray,d=c.exportTypedArrayMethod,f=Math.floor;d("reverse",function(){for(var p=this,m=u(p).length,v=f(m/2),S=0,C;S<v;)C=p[S],p[S++]=p[--m],p[m]=C;return p})},3462:function(s,l,a){var c=a(260),u=a(7466),d=a(4590),f=a(7908),h=a(7293),p=c.aTypedArray,m=c.exportTypedArrayMethod,v=h(function(){new Int8Array(1).set({})});m("set",function(C){p(this);var k=d(arguments.length>1?arguments[1]:void 0,1),b=this.length,R=f(C),w=u(R.length),B=0;if(w+k>b)throw RangeError("Wrong length");for(;B<w;)this[k+B]=R[B++]},v)},678:function(s,l,a){var c=a(260),u=a(6707),d=a(7293),f=c.aTypedArray,h=c.aTypedArrayConstructor,p=c.exportTypedArrayMethod,m=[].slice,v=d(function(){new Int8Array(1).slice()});p("slice",function(C,k){for(var b=m.call(f(this),C,k),R=u(this,this.constructor),w=0,B=b.length,V=new(h(R))(B);B>w;)V[w]=b[w++];return V},v)},7462:function(s,l,a){var c=a(260),u=a(2092).some,d=c.aTypedArray,f=c.exportTypedArrayMethod;f("some",function(p){return u(d(this),p,arguments.length>1?arguments[1]:void 0)})},3824:function(s,l,a){var c=a(260),u=c.aTypedArray,d=c.exportTypedArrayMethod,f=[].sort;d("sort",function(p){return f.call(u(this),p)})},5021:function(s,l,a){var c=a(260),u=a(7466),d=a(1400),f=a(6707),h=c.aTypedArray,p=c.exportTypedArrayMethod;p("subarray",function(v,S){var C=h(this),k=C.length,b=d(v,k);return new(f(C,C.constructor))(C.buffer,C.byteOffset+b*C.BYTES_PER_ELEMENT,u((S===void 0?k:d(S,k))-b))})},2974:function(s,l,a){var c=a(7854),u=a(260),d=a(7293),f=c.Int8Array,h=u.aTypedArray,p=u.exportTypedArrayMethod,m=[].toLocaleString,v=[].slice,S=!!f&&d(function(){m.call(new f(1))}),C=d(function(){return[1,2].toLocaleString()!=new f([1,2]).toLocaleString()})||!d(function(){f.prototype.toLocaleString.call([1,2])});p("toLocaleString",function(){return m.apply(S?v.call(h(this)):h(this),arguments)},C)},5016:function(s,l,a){var c=a(260).exportTypedArrayMethod,u=a(7293),d=a(7854),f=d.Uint8Array,h=f&&f.prototype||{},p=[].toString,m=[].join;u(function(){p.call({})})&&(p=function(){return m.call(this)});var v=h.toString!=p;c("toString",p,v)},2472:function(s,l,a){var c=a(9843);c("Uint8",function(u){return function(f,h,p){return u(this,f,h,p)}})},4747:function(s,l,a){var c=a(7854),u=a(8324),d=a(8533),f=a(8880);for(var h in u){var p=c[h],m=p&&p.prototype;if(m&&m.forEach!==d)try{f(m,"forEach",d)}catch{m.forEach=d}}},3948:function(s,l,a){var c=a(7854),u=a(8324),d=a(6992),f=a(8880),h=a(5112),p=h("iterator"),m=h("toStringTag"),v=d.values;for(var S in u){var C=c[S],k=C&&C.prototype;if(k){if(k[p]!==v)try{f(k,p,v)}catch{k[p]=v}if(k[m]||f(k,m,S),u[S]){for(var b in d)if(k[b]!==d[b])try{f(k,b,d[b])}catch{k[b]=d[b]}}}}},1637:function(s,l,a){a(6992);var c=a(2109),u=a(5005),d=a(590),f=a(1320),h=a(2248),p=a(8003),m=a(4994),v=a(9909),S=a(5787),C=a(6656),k=a(9974),b=a(648),R=a(9670),w=a(111),B=a(30),V=a(9114),$=a(8554),z=a(1246),F=a(5112),P=u("fetch"),U=u("Headers"),Y=F("iterator"),Q="URLSearchParams",Z=Q+"Iterator",re=v.set,W=v.getterFor(Q),le=v.getterFor(Z),de=/\+/g,ve=Array(4),Se=function(I){return ve[I-1]||(ve[I-1]=RegExp("((?:%[\\da-f]{2}){"+I+"})","gi"))},ye=function(I){try{return decodeURIComponent(I)}catch{return I}},we=function(I){var D=I.replace(de," "),L=4;try{return decodeURIComponent(D)}catch{for(;L;)D=D.replace(Se(L--),ye);return D}},Ce=/[!'()~]|%20/g,Te={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},ge=function(I){return Te[I]},A=function(I){return encodeURIComponent(I).replace(Ce,ge)},M=function(I,D){if(D)for(var L=D.split("&"),H=0,K,j;H<L.length;)K=L[H++],K.length&&(j=K.split("="),I.push({key:we(j.shift()),value:we(j.join("="))}))},E=function(I){this.entries.length=0,M(this.entries,I)},O=function(I,D){if(I<D)throw TypeError("Not enough arguments")},y=m(function(D,L){re(this,{type:Z,iterator:$(W(D).entries),kind:L})},"Iterator",function(){var D=le(this),L=D.kind,H=D.iterator.next(),K=H.value;return H.done||(H.value=L==="keys"?K.key:L==="values"?K.value:[K.key,K.value]),H}),x=function(){S(this,x,Q);var D=arguments.length>0?arguments[0]:void 0,L=this,H=[],K,j,G,J,_,ce,me,Oe,Fe;if(re(L,{type:Q,entries:H,updateURL:function(){},updateSearchParams:E}),D!==void 0)if(w(D))if(K=z(D),typeof K=="function")for(j=K.call(D),G=j.next;!(J=G.call(j)).done;){if(_=$(R(J.value)),ce=_.next,(me=ce.call(_)).done||(Oe=ce.call(_)).done||!ce.call(_).done)throw TypeError("Expected sequence with length 2");H.push({key:me.value+"",value:Oe.value+""})}else for(Fe in D)C(D,Fe)&&H.push({key:Fe,value:D[Fe]+""});else M(H,typeof D=="string"?D.charAt(0)==="?"?D.slice(1):D:D+"")},N=x.prototype;h(N,{append:function(D,L){O(arguments.length,2);var H=W(this);H.entries.push({key:D+"",value:L+""}),H.updateURL()},delete:function(I){O(arguments.length,1);for(var D=W(this),L=D.entries,H=I+"",K=0;K<L.length;)L[K].key===H?L.splice(K,1):K++;D.updateURL()},get:function(D){O(arguments.length,1);for(var L=W(this).entries,H=D+"",K=0;K<L.length;K++)if(L[K].key===H)return L[K].value;return null},getAll:function(D){O(arguments.length,1);for(var L=W(this).entries,H=D+"",K=[],j=0;j<L.length;j++)L[j].key===H&&K.push(L[j].value);return K},has:function(D){O(arguments.length,1);for(var L=W(this).entries,H=D+"",K=0;K<L.length;)if(L[K++].key===H)return!0;return!1},set:function(D,L){O(arguments.length,1);for(var H=W(this),K=H.entries,j=!1,G=D+"",J=L+"",_=0,ce;_<K.length;_++)ce=K[_],ce.key===G&&(j?K.splice(_--,1):(j=!0,ce.value=J));j||K.push({key:G,value:J}),H.updateURL()},sort:function(){var D=W(this),L=D.entries,H=L.slice(),K,j,G;for(L.length=0,G=0;G<H.length;G++){for(K=H[G],j=0;j<G;j++)if(L[j].key>K.key){L.splice(j,0,K);break}j===G&&L.push(K)}D.updateURL()},forEach:function(D){for(var L=W(this).entries,H=k(D,arguments.length>1?arguments[1]:void 0,3),K=0,j;K<L.length;)j=L[K++],H(j.value,j.key,this)},keys:function(){return new 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 D=W(this).entries,L=[],H=0,K;H<D.length;)K=D[H++],L.push(A(K.key)+"="+A(K.value));return L.join("&")},{enumerable:!0}),p(x,Q),c({global:!0,forced:!d},{URLSearchParams:x}),!d&&typeof P=="function"&&typeof U=="function"&&c({global:!0,enumerable:!0,forced:!0},{fetch:function(D){var L=[D],H,K,j;return arguments.length>1&&(H=arguments[1],w(H)&&(K=H.body,b(K)===Q&&(j=H.headers?new U(H.headers):new U,j.has("content-type")||j.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),H=B(H,{body:V(0,String(K)),headers:V(0,j)}))),L.push(H)),P.apply(this,L)}}),s.exports={URLSearchParams:x,getState:W}},285:function(s,l,a){a(8783);var c=a(2109),u=a(9781),d=a(590),f=a(7854),h=a(6048),p=a(1320),m=a(5787),v=a(6656),S=a(1574),C=a(8457),k=a(8710).codeAt,b=a(3197),R=a(8003),w=a(1637),B=a(9909),V=f.URL,$=w.URLSearchParams,z=w.getState,F=B.set,P=B.getterFor("URL"),U=Math.floor,Y=Math.pow,Q="Invalid authority",Z="Invalid scheme",re="Invalid host",W="Invalid port",le=/[A-Za-z]/,de=/[\d+-.A-Za-z]/,ve=/\d/,Se=/^(0x|0X)/,ye=/^[0-7]+$/,we=/^\d+$/,Ce=/^[\dA-Fa-f]+$/,Te=/[\u0000\t\u000A\u000D #%/:?@[\\]]/,ge=/[\u0000\t\u000A\u000D #/:?@[\\]]/,A=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,M=/[\t\u000A\u000D]/g,E,O=function(T,ee){var q,te,ie;if(ee.charAt(0)=="["){if(ee.charAt(ee.length-1)!="]"||(q=x(ee.slice(1,-1)),!q))return re;T.host=q}else if(J(T)){if(ee=b(ee),Te.test(ee)||(q=y(ee),q===null))return re;T.host=q}else{if(ge.test(ee))return re;for(q="",te=C(ee),ie=0;ie<te.length;ie++)q+=j(te[ie],D);T.host=q}},y=function(T){var ee=T.split("."),q,te,ie,ke,pe,De,Ve;if(ee.length&&ee[ee.length-1]==""&&ee.pop(),q=ee.length,q>4)return T;for(te=[],ie=0;ie<q;ie++){if(ke=ee[ie],ke=="")return T;if(pe=10,ke.length>1&&ke.charAt(0)=="0"&&(pe=Se.test(ke)?16:8,ke=ke.slice(pe==8?1:2)),ke==="")De=0;else{if(!(pe==10?we:pe==8?ye:Ce).test(ke))return T;De=parseInt(ke,pe)}te.push(De)}for(ie=0;ie<q;ie++)if(De=te[ie],ie==q-1){if(De>=Y(256,5-q))return null}else if(De>255)return null;for(Ve=te.pop(),ie=0;ie<te.length;ie++)Ve+=te[ie]*Y(256,3-ie);return Ve},x=function(T){var ee=[0,0,0,0,0,0,0,0],q=0,te=null,ie=0,ke,pe,De,Ve,He,kt,ne,Ke=function(){return T.charAt(ie)};if(Ke()==":"){if(T.charAt(1)!=":")return;ie+=2,q++,te=q}for(;Ke();){if(q==8)return;if(Ke()==":"){if(te!==null)return;ie++,q++,te=q;continue}for(ke=pe=0;pe<4&&Ce.test(Ke());)ke=ke*16+parseInt(Ke(),16),ie++,pe++;if(Ke()=="."){if(pe==0||(ie-=pe,q>6))return;for(De=0;Ke();){if(Ve=null,De>0)if(Ke()=="."&&De<4)ie++;else return;if(!ve.test(Ke()))return;for(;ve.test(Ke());){if(He=parseInt(Ke(),10),Ve===null)Ve=He;else{if(Ve==0)return;Ve=Ve*10+He}if(Ve>255)return;ie++}ee[q]=ee[q]*256+Ve,De++,(De==2||De==4)&&q++}if(De!=4)return;break}else if(Ke()==":"){if(ie++,!Ke())return}else if(Ke())return;ee[q++]=ke}if(te!==null)for(kt=q-te,q=7;q!=0&&kt>0;)ne=ee[q],ee[q--]=ee[te+kt-1],ee[te+--kt]=ne;else if(q!=8)return;return ee},N=function(T){for(var ee=null,q=1,te=null,ie=0,ke=0;ke<8;ke++)T[ke]!==0?(ie>q&&(ee=te,q=ie),te=null,ie=0):(te===null&&(te=ke),++ie);return ie>q&&(ee=te,q=ie),ee},I=function(T){var ee,q,te,ie;if(typeof T=="number"){for(ee=[],q=0;q<4;q++)ee.unshift(T%256),T=U(T/256);return ee.join(".")}else if(typeof T=="object"){for(ee="",te=N(T),q=0;q<8;q++)ie&&T[q]===0||(ie&&(ie=!1),te===q?(ee+=q?":":"::",ie=!0):(ee+=T[q].toString(16),q<7&&(ee+=":")));return"["+ee+"]"}return T},D={},L=S({},D,{" ":1,'"':1,"<":1,">":1,"`":1}),H=S({},L,{"#":1,"?":1,"{":1,"}":1}),K=S({},H,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),j=function(T,ee){var q=k(T,0);return q>32&&q<127&&!v(ee,T)?T:encodeURIComponent(T)},G={ftp:21,file:null,http:80,https:443,ws:80,wss:443},J=function(T){return v(G,T.scheme)},_=function(T){return T.username!=""||T.password!=""},ce=function(T){return!T.host||T.cannotBeABaseURL||T.scheme=="file"},me=function(T,ee){var q;return T.length==2&&le.test(T.charAt(0))&&((q=T.charAt(1))==":"||!ee&&q=="|")},Oe=function(T){var ee;return T.length>1&&me(T.slice(0,2))&&(T.length==2||(ee=T.charAt(2))==="/"||ee==="\\"||ee==="?"||ee==="#")},Fe=function(T){var ee=T.path,q=ee.length;q&&(T.scheme!="file"||q!=1||!me(ee[0],!0))&&ee.pop()},Pe=function(T){return T==="."||T.toLowerCase()==="%2e"},Me=function(T){return T=T.toLowerCase(),T===".."||T==="%2e."||T===".%2e"||T==="%2e%2e"},je={},ut={},_e={},cn={},X={},se={},ae={},be={},Ee={},Be={},$e={},rt={},it={},Ye={},Ht={},un={},gt={},St={},Jn={},Et={},en={},Ut=function(T,ee,q,te){var ie=q||je,ke=0,pe="",De=!1,Ve=!1,He=!1,kt,ne,Ke,tn;for(q||(T.scheme="",T.username="",T.password="",T.host=null,T.port=null,T.path=[],T.query=null,T.fragment=null,T.cannotBeABaseURL=!1,ee=ee.replace(A,"")),ee=ee.replace(M,""),kt=C(ee);ke<=kt.length;){switch(ne=kt[ke],ie){case je:if(ne&&le.test(ne))pe+=ne.toLowerCase(),ie=ut;else{if(q)return Z;ie=_e;continue}break;case ut:if(ne&&(de.test(ne)||ne=="+"||ne=="-"||ne=="."))pe+=ne.toLowerCase();else if(ne==":"){if(q&&(J(T)!=v(G,pe)||pe=="file"&&(_(T)||T.port!==null)||T.scheme=="file"&&!T.host))return;if(T.scheme=pe,q){J(T)&&G[T.scheme]==T.port&&(T.port=null);return}pe="",T.scheme=="file"?ie=Ye:J(T)&&te&&te.scheme==T.scheme?ie=cn:J(T)?ie=be:kt[ke+1]=="/"?(ie=X,ke++):(T.cannotBeABaseURL=!0,T.path.push(""),ie=Jn)}else{if(q)return Z;pe="",ie=_e,ke=0;continue}break;case _e:if(!te||te.cannotBeABaseURL&&ne!="#")return Z;if(te.cannotBeABaseURL&&ne=="#"){T.scheme=te.scheme,T.path=te.path.slice(),T.query=te.query,T.fragment="",T.cannotBeABaseURL=!0,ie=en;break}ie=te.scheme=="file"?Ye:se;continue;case cn:if(ne=="/"&&kt[ke+1]=="/")ie=Ee,ke++;else{ie=se;continue}break;case X:if(ne=="/"){ie=Be;break}else{ie=St;continue}case se:if(T.scheme=te.scheme,ne==E)T.username=te.username,T.password=te.password,T.host=te.host,T.port=te.port,T.path=te.path.slice(),T.query=te.query;else if(ne=="/"||ne=="\\"&&J(T))ie=ae;else if(ne=="?")T.username=te.username,T.password=te.password,T.host=te.host,T.port=te.port,T.path=te.path.slice(),T.query="",ie=Et;else if(ne=="#")T.username=te.username,T.password=te.password,T.host=te.host,T.port=te.port,T.path=te.path.slice(),T.query=te.query,T.fragment="",ie=en;else{T.username=te.username,T.password=te.password,T.host=te.host,T.port=te.port,T.path=te.path.slice(),T.path.pop(),ie=St;continue}break;case ae:if(J(T)&&(ne=="/"||ne=="\\"))ie=Ee;else if(ne=="/")ie=Be;else{T.username=te.username,T.password=te.password,T.host=te.host,T.port=te.port,ie=St;continue}break;case be:if(ie=Ee,ne!="/"||pe.charAt(ke+1)!="/")continue;ke++;break;case Ee:if(ne!="/"&&ne!="\\"){ie=Be;continue}break;case Be:if(ne=="@"){De&&(pe="%40"+pe),De=!0,Ke=C(pe);for(var Mo=0;Mo<Ke.length;Mo++){var Ba=Ke[Mo];if(Ba==":"&&!He){He=!0;continue}var za=j(Ba,K);He?T.password+=za:T.username+=za}pe=""}else if(ne==E||ne=="/"||ne=="?"||ne=="#"||ne=="\\"&&J(T)){if(De&&pe=="")return Q;ke-=C(pe).length+1,pe="",ie=$e}else pe+=ne;break;case $e:case rt:if(q&&T.scheme=="file"){ie=un;continue}else if(ne==":"&&!Ve){if(pe=="")return re;if(tn=O(T,pe),tn)return tn;if(pe="",ie=it,q==rt)return}else if(ne==E||ne=="/"||ne=="?"||ne=="#"||ne=="\\"&&J(T)){if(J(T)&&pe=="")return re;if(q&&pe==""&&(_(T)||T.port!==null))return;if(tn=O(T,pe),tn)return tn;if(pe="",ie=gt,q)return;continue}else ne=="["?Ve=!0:ne=="]"&&(Ve=!1),pe+=ne;break;case it:if(ve.test(ne))pe+=ne;else if(ne==E||ne=="/"||ne=="?"||ne=="#"||ne=="\\"&&J(T)||q){if(pe!=""){var No=parseInt(pe,10);if(No>65535)return W;T.port=J(T)&&No===G[T.scheme]?null:No,pe=""}if(q)return;ie=gt;continue}else return W;break;case Ye:if(T.scheme="file",ne=="/"||ne=="\\")ie=Ht;else if(te&&te.scheme=="file")if(ne==E)T.host=te.host,T.path=te.path.slice(),T.query=te.query;else if(ne=="?")T.host=te.host,T.path=te.path.slice(),T.query="",ie=Et;else if(ne=="#")T.host=te.host,T.path=te.path.slice(),T.query=te.query,T.fragment="",ie=en;else{Oe(kt.slice(ke).join(""))||(T.host=te.host,T.path=te.path.slice(),Fe(T)),ie=St;continue}else{ie=St;continue}break;case Ht:if(ne=="/"||ne=="\\"){ie=un;break}te&&te.scheme=="file"&&!Oe(kt.slice(ke).join(""))&&(me(te.path[0],!0)?T.path.push(te.path[0]):T.host=te.host),ie=St;continue;case un:if(ne==E||ne=="/"||ne=="\\"||ne=="?"||ne=="#"){if(!q&&me(pe))ie=St;else if(pe==""){if(T.host="",q)return;ie=gt}else{if(tn=O(T,pe),tn)return tn;if(T.host=="localhost"&&(T.host=""),q)return;pe="",ie=gt}continue}else pe+=ne;break;case gt:if(J(T)){if(ie=St,ne!="/"&&ne!="\\")continue}else if(!q&&ne=="?")T.query="",ie=Et;else if(!q&&ne=="#")T.fragment="",ie=en;else if(ne!=E&&(ie=St,ne!="/"))continue;break;case St:if(ne==E||ne=="/"||ne=="\\"&&J(T)||!q&&(ne=="?"||ne=="#")){if(Me(pe)?(Fe(T),ne!="/"&&!(ne=="\\"&&J(T))&&T.path.push("")):Pe(pe)?ne!="/"&&!(ne=="\\"&&J(T))&&T.path.push(""):(T.scheme=="file"&&!T.path.length&&me(pe)&&(T.host&&(T.host=""),pe=pe.charAt(0)+":"),T.path.push(pe)),pe="",T.scheme=="file"&&(ne==E||ne=="?"||ne=="#"))for(;T.path.length>1&&T.path[0]==="";)T.path.shift();ne=="?"?(T.query="",ie=Et):ne=="#"&&(T.fragment="",ie=en)}else pe+=j(ne,H);break;case Jn:ne=="?"?(T.query="",ie=Et):ne=="#"?(T.fragment="",ie=en):ne!=E&&(T.path[0]+=j(ne,D));break;case Et:!q&&ne=="#"?(T.fragment="",ie=en):ne!=E&&(ne=="'"&&J(T)?T.query+="%27":ne=="#"?T.query+="%23":T.query+=j(ne,D));break;case en:ne!=E&&(T.fragment+=j(ne,L));break}ke++}},Mn=function(ee){var q=m(this,Mn,"URL"),te=arguments.length>1?arguments[1]:void 0,ie=String(ee),ke=F(q,{type:"URL"}),pe,De;if(te!==void 0){if(te instanceof Mn)pe=P(te);else if(De=Ut(pe={},String(te)),De)throw TypeError(De)}if(De=Ut(ke,ie,null,pe),De)throw TypeError(De);var Ve=ke.searchParams=new $,He=z(Ve);He.updateSearchParams(ke.query),He.updateURL=function(){ke.query=String(Ve)||null},u||(q.href=ni.call(q),q.origin=ka.call(q),q.protocol=wa.call(q),q.username=Ta.call(q),q.password=Aa.call(q),q.host=Oa.call(q),q.hostname=Ma.call(q),q.port=Na.call(q),q.pathname=Ia.call(q),q.search=Ra.call(q),q.searchParams=Da.call(q),q.hash=La.call(q))},Oo=Mn.prototype,ni=function(){var T=P(this),ee=T.scheme,q=T.username,te=T.password,ie=T.host,ke=T.port,pe=T.path,De=T.query,Ve=T.fragment,He=ee+":";return ie!==null?(He+="//",_(T)&&(He+=q+(te?":"+te:"")+"@"),He+=I(ie),ke!==null&&(He+=":"+ke)):ee=="file"&&(He+="//"),He+=T.cannotBeABaseURL?pe[0]:pe.length?"/"+pe.join("/"):"",De!==null&&(He+="?"+De),Ve!==null&&(He+="#"+Ve),He},ka=function(){var T=P(this),ee=T.scheme,q=T.port;if(ee=="blob")try{return new URL(ee.path[0]).origin}catch{return"null"}return ee=="file"||!J(T)?"null":ee+"://"+I(T.host)+(q!==null?":"+q:"")},wa=function(){return P(this).scheme+":"},Ta=function(){return P(this).username},Aa=function(){return P(this).password},Oa=function(){var T=P(this),ee=T.host,q=T.port;return ee===null?"":q===null?I(ee):I(ee)+":"+q},Ma=function(){var T=P(this).host;return T===null?"":I(T)},Na=function(){var T=P(this).port;return T===null?"":String(T)},Ia=function(){var T=P(this),ee=T.path;return T.cannotBeABaseURL?ee[0]:ee.length?"/"+ee.join("/"):""},Ra=function(){var T=P(this).query;return T?"?"+T:""},Da=function(){return P(this).searchParams},La=function(){var T=P(this).fragment;return T?"#"+T:""},Ct=function(T,ee){return{get:T,set:ee,configurable:!0,enumerable:!0}};if(u&&h(Oo,{href:Ct(ni,function(T){var ee=P(this),q=String(T),te=Ut(ee,q);if(te)throw TypeError(te);z(ee.searchParams).updateSearchParams(ee.query)}),origin:Ct(ka),protocol:Ct(wa,function(T){var ee=P(this);Ut(ee,String(T)+":",je)}),username:Ct(Ta,function(T){var ee=P(this),q=C(String(T));if(!ce(ee)){ee.username="";for(var te=0;te<q.length;te++)ee.username+=j(q[te],K)}}),password:Ct(Aa,function(T){var ee=P(this),q=C(String(T));if(!ce(ee)){ee.password="";for(var te=0;te<q.length;te++)ee.password+=j(q[te],K)}}),host:Ct(Oa,function(T){var ee=P(this);ee.cannotBeABaseURL||Ut(ee,String(T),$e)}),hostname:Ct(Ma,function(T){var ee=P(this);ee.cannotBeABaseURL||Ut(ee,String(T),rt)}),port:Ct(Na,function(T){var ee=P(this);ce(ee)||(T=String(T),T==""?ee.port=null:Ut(ee,T,it))}),pathname:Ct(Ia,function(T){var ee=P(this);ee.cannotBeABaseURL||(ee.path=[],Ut(ee,T+"",gt))}),search:Ct(Ra,function(T){var ee=P(this);T=String(T),T==""?ee.query=null:(T.charAt(0)=="?"&&(T=T.slice(1)),ee.query="",Ut(ee,T,Et)),z(ee.searchParams).updateSearchParams(ee.query)}),searchParams:Ct(Da),hash:Ct(La,function(T){var ee=P(this);if(T=String(T),T==""){ee.fragment=null;return}T.charAt(0)=="#"&&(T=T.slice(1)),ee.fragment="",Ut(ee,T,en)})}),p(Oo,"toJSON",function(){return ni.call(this)},{enumerable:!0}),p(Oo,"toString",function(){return ni.call(this)},{enumerable:!0}),V){var Pa=V.createObjectURL,Fa=V.revokeObjectURL;Pa&&p(Mn,"createObjectURL",function(ee){return Pa.apply(V,arguments)}),Fa&&p(Mn,"revokeObjectURL",function(ee){return Fa.apply(V,arguments)})}R(Mn,"URL"),c({global:!0,forced:!d,sham:!u},{URL:Mn})}},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 W},default:function(){return ge}}),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(A,M){var E;if(typeof Symbol>"u"||A[Symbol.iterator]==null){if(Array.isArray(A)||(E=l(A))||M&&A&&typeof A.length=="number"){E&&(A=E);var O=0,y=function(){};return{s:y,n:function(){return O>=A.length?{done:!0}:{done:!1,value:A[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 x=!0,N=!1,I;return{s:function(){E=A[Symbol.iterator]()},n:function(){var L=E.next();return x=L.done,L},e:function(L){N=!0,I=L},f:function(){try{!x&&E.return!=null&&E.return()}finally{if(N)throw I}}}}function l(A,M){if(A){if(typeof A=="string")return a(A,M);var E=Object.prototype.toString.call(A).slice(8,-1);if(E==="Object"&&A.constructor&&(E=A.constructor.name),E==="Map"||E==="Set")return Array.from(A);if(E==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(E))return a(A,M)}}function a(A,M){(M==null||M>A.length)&&(M=A.length);for(var E=0,O=new Array(M);E<M;E++)O[E]=A[E];return O}function c(A,M){if(!(A instanceof M))throw new TypeError("Cannot call a class as a function")}function u(A,M){for(var E=0;E<M.length;E++){var O=M[E];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(A,O.key,O)}}function d(A,M,E){return M&&u(A.prototype,M),E&&u(A,E),A}var f=function(){function A(){c(this,A)}return d(A,[{key:"on",value:function(E,O){return this._callbacks=this._callbacks||{},this._callbacks[E]||(this._callbacks[E]=[]),this._callbacks[E].push(O),this}},{key:"emit",value:function(E){this._callbacks=this._callbacks||{};for(var O=this._callbacks[E],y=arguments.length,x=new Array(y>1?y-1:0),N=1;N<y;N++)x[N-1]=arguments[N];if(O){var I=s(O,!0),D;try{for(I.s();!(D=I.n()).done;){var L=D.value;L.apply(this,x)}}catch(H){I.e(H)}finally{I.f()}}return this.element&&this.element.dispatchEvent(this.makeEvent("dropzone:"+E,{args:x})),this}},{key:"makeEvent",value:function(E,O){var y={bubbles:!0,cancelable:!0,detail:O};if(typeof window.CustomEvent=="function")return new CustomEvent(E,y);var x=document.createEvent("CustomEvent");return x.initCustomEvent(E,y.bubbles,y.cancelable,y.detail),x}},{key:"off",value:function(E,O){if(!this._callbacks||arguments.length===0)return this._callbacks={},this;var y=this._callbacks[E];if(!y)return this;if(arguments.length===1)return delete this._callbacks[E],this;for(var x=0;x<y.length;x++){var N=y[x];if(N===O){y.splice(x,1);break}}return this}}]),A}(),h='<div class="dz-preview dz-file-preview"> <div class="dz-image"><img data-dz-thumbnail/></div> <div class="dz-details"> <div class="dz-size"><span data-dz-size></span></div> <div class="dz-filename"><span data-dz-name></span></div> </div> <div class="dz-progress"> <span class="dz-upload" data-dz-uploadprogress></span> </div> <div class="dz-error-message"><span data-dz-errormessage></span></div> <div class="dz-success-mark"> <svg width="54px" height="54px" viewBox="0 0 54 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>Check</title> <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <path d="M23.5,31.8431458 L17.5852419,25.9283877 C16.0248253,24.3679711 13.4910294,24.366835 11.9289322,25.9289322 C10.3700136,27.4878508 10.3665912,30.0234455 11.9283877,31.5852419 L20.4147581,40.0716123 C20.5133999,40.1702541 20.6159315,40.2626649 20.7218615,40.3488435 C22.2835669,41.8725651 24.794234,41.8626202 26.3461564,40.3106978 L43.3106978,23.3461564 C44.8771021,21.7797521 44.8758057,19.2483887 43.3137085,17.6862915 C41.7547899,16.1273729 39.2176035,16.1255422 37.6538436,17.6893022 L23.5,31.8431458 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z" stroke-opacity="0.198794158" stroke="#747474" fill-opacity="0.816519475" fill="#FFFFFF"></path> </g> </svg> </div> <div class="dz-error-mark"> <svg width="54px" height="54px" viewBox="0 0 54 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>Error</title> <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <g stroke="#747474" stroke-opacity="0.198794158" fill="#FFFFFF" fill-opacity="0.816519475"> <path d="M32.6568542,29 L38.3106978,23.3461564 C39.8771021,21.7797521 39.8758057,19.2483887 38.3137085,17.6862915 C36.7547899,16.1273729 34.2176035,16.1255422 32.6538436,17.6893022 L27,23.3431458 L21.3461564,17.6893022 C19.7823965,16.1255422 17.2452101,16.1273729 15.6862915,17.6862915 C14.1241943,19.2483887 14.1228979,21.7797521 15.6893022,23.3461564 L21.3431458,29 L15.6893022,34.6538436 C14.1228979,36.2202479 14.1241943,38.7516113 15.6862915,40.3137085 C17.2452101,41.8726271 19.7823965,41.8744578 21.3461564,40.3106978 L27,34.6568542 L32.6538436,40.3106978 C34.2176035,41.8744578 36.7547899,41.8726271 38.3137085,40.3137085 C39.8758057,38.7516113 39.8771021,36.2202479 38.3106978,34.6538436 L32.6568542,29 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z"></path> </g> </g> </svg> </div> </div> ',p=h;function m(A,M){var E;if(typeof Symbol>"u"||A[Symbol.iterator]==null){if(Array.isArray(A)||(E=v(A))||M&&A&&typeof A.length=="number"){E&&(A=E);var O=0,y=function(){};return{s:y,n:function(){return O>=A.length?{done:!0}:{done:!1,value:A[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 x=!0,N=!1,I;return{s:function(){E=A[Symbol.iterator]()},n:function(){var L=E.next();return x=L.done,L},e:function(L){N=!0,I=L},f:function(){try{!x&&E.return!=null&&E.return()}finally{if(N)throw I}}}}function v(A,M){if(A){if(typeof A=="string")return S(A,M);var E=Object.prototype.toString.call(A).slice(8,-1);if(E==="Object"&&A.constructor&&(E=A.constructor.name),E==="Map"||E==="Set")return Array.from(A);if(E==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(E))return S(A,M)}}function S(A,M){(M==null||M>A.length)&&(M=A.length);for(var E=0,O=new Array(M);E<M;E++)O[E]=A[E];return O}var C={url:null,method:"post",withCredentials:!1,timeout:null,parallelUploads:2,uploadMultiple:!1,chunking:!1,forceChunking:!1,chunkSize:2e6,parallelChunkUploads:!1,retryChunks:!1,retryChunksLimit:3,maxFilesize:256,paramName:"file",createImageThumbnails:!0,maxThumbnailFilesize:10,thumbnailWidth:120,thumbnailHeight:120,thumbnailMethod:"crop",resizeWidth:null,resizeHeight:null,resizeMimeType:null,resizeQuality:.8,resizeMethod:"contain",filesizeBase:1e3,maxFiles:null,headers:null,clickable:!0,ignoreHiddenFiles:!0,acceptedFiles:null,acceptedMimeTypes:null,autoProcessQueue:!0,autoQueue:!0,addRemoveLinks:!1,previewsContainer:null,disablePreviews:!1,hiddenInputContainer:"body",capture:null,renameFilename:null,renameFile:null,forceFallback:!1,dictDefaultMessage:"Drop files here to upload",dictFallbackMessage:"Your browser does not support drag'n'drop file uploads.",dictFallbackText:"Please use the fallback form below to upload your files like in the olden days.",dictFileTooBig:"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",dictInvalidFileType:"You can't upload files of this type.",dictResponseError:"Server responded with {{statusCode}} code.",dictCancelUpload:"Cancel upload",dictUploadCanceled:"Upload canceled.",dictCancelUploadConfirmation:"Are you sure you want to cancel this upload?",dictRemoveFile:"Remove file",dictRemoveFileConfirmation:null,dictMaxFilesExceeded:"You can not upload any more files.",dictFileSizeUnits:{tb:"TB",gb:"GB",mb:"MB",kb:"KB",b:"b"},init:function(){},params:function(M,E,O){if(O)return{dzuuid:O.file.upload.uuid,dzchunkindex:O.index,dztotalfilesize:O.file.size,dzchunksize:this.options.chunkSize,dztotalchunkcount:O.file.upload.totalChunkCount,dzchunkbyteoffset:O.index*this.options.chunkSize}},accept:function(M,E){return E()},chunksUploaded:function(M,E){E()},fallback:function(){var M;this.element.className="".concat(this.element.className," dz-browser-not-supported");var E=m(this.element.getElementsByTagName("div"),!0),O;try{for(E.s();!(O=E.n()).done;){var y=O.value;if(/(^| )dz-message($| )/.test(y.className)){M=y,y.className="dz-message";break}}}catch(N){E.e(N)}finally{E.f()}M||(M=W.createElement('<div class="dz-message"><span></span></div>'),this.element.appendChild(M));var x=M.getElementsByTagName("span")[0];return x&&(x.textContent!=null?x.textContent=this.options.dictFallbackMessage:x.innerText!=null&&(x.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(M,E,O,y){var x={srcX:0,srcY:0,srcWidth:M.width,srcHeight:M.height},N=M.width/M.height;E==null&&O==null?(E=x.srcWidth,O=x.srcHeight):E==null?E=O*N:O==null&&(O=E/N),E=Math.min(E,x.srcWidth),O=Math.min(O,x.srcHeight);var I=E/O;if(x.srcWidth>E||x.srcHeight>O)if(y==="crop")N>I?(x.srcHeight=M.height,x.srcWidth=x.srcHeight*I):(x.srcWidth=M.width,x.srcHeight=x.srcWidth/I);else if(y==="contain")N>I?O=E/N:E=O*N;else throw new Error("Unknown resizeMethod '".concat(y,"'"));return x.srcX=(M.width-x.srcWidth)/2,x.srcY=(M.height-x.srcHeight)/2,x.trgWidth=E,x.trgHeight=O,x},transformFile:function(M,E){return(this.options.resizeWidth||this.options.resizeHeight)&&M.type.match(/image.*/)?this.resizeImage(M,this.options.resizeWidth,this.options.resizeHeight,this.options.resizeMethod,E):E(M)},previewTemplate:p,drop:function(M){return this.element.classList.remove("dz-drag-hover")},dragstart:function(M){},dragend:function(M){return this.element.classList.remove("dz-drag-hover")},dragenter:function(M){return this.element.classList.add("dz-drag-hover")},dragover:function(M){return this.element.classList.add("dz-drag-hover")},dragleave:function(M){return this.element.classList.remove("dz-drag-hover")},paste:function(M){},reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(M){var E=this;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer&&!this.options.disablePreviews){M.previewElement=W.createElement(this.options.previewTemplate.trim()),M.previewTemplate=M.previewElement,this.previewsContainer.appendChild(M.previewElement);var O=m(M.previewElement.querySelectorAll("[data-dz-name]"),!0),y;try{for(O.s();!(y=O.n()).done;){var x=y.value;x.textContent=M.name}}catch(j){O.e(j)}finally{O.f()}var N=m(M.previewElement.querySelectorAll("[data-dz-size]"),!0),I;try{for(N.s();!(I=N.n()).done;)x=I.value,x.innerHTML=this.filesize(M.size)}catch(j){N.e(j)}finally{N.f()}this.options.addRemoveLinks&&(M._removeLink=W.createElement('<a class="dz-remove" href="javascript:undefined;" data-dz-remove>'.concat(this.options.dictRemoveFile,"</a>")),M.previewElement.appendChild(M._removeLink));var D=function(G){return G.preventDefault(),G.stopPropagation(),M.status===W.UPLOADING?W.confirm(E.options.dictCancelUploadConfirmation,function(){return E.removeFile(M)}):E.options.dictRemoveFileConfirmation?W.confirm(E.options.dictRemoveFileConfirmation,function(){return E.removeFile(M)}):E.removeFile(M)},L=m(M.previewElement.querySelectorAll("[data-dz-remove]"),!0),H;try{for(L.s();!(H=L.n()).done;){var K=H.value;K.addEventListener("click",D)}}catch(j){L.e(j)}finally{L.f()}}},removedfile:function(M){return M.previewElement!=null&&M.previewElement.parentNode!=null&&M.previewElement.parentNode.removeChild(M.previewElement),this._updateMaxFilesReachedClass()},thumbnail:function(M,E){if(M.previewElement){M.previewElement.classList.remove("dz-file-preview");var O=m(M.previewElement.querySelectorAll("[data-dz-thumbnail]"),!0),y;try{for(O.s();!(y=O.n()).done;){var x=y.value;x.alt=M.name,x.src=E}}catch(N){O.e(N)}finally{O.f()}return setTimeout(function(){return M.previewElement.classList.add("dz-image-preview")},1)}},error:function(M,E){if(M.previewElement){M.previewElement.classList.add("dz-error"),typeof E!="string"&&E.error&&(E=E.error);var O=m(M.previewElement.querySelectorAll("[data-dz-errormessage]"),!0),y;try{for(O.s();!(y=O.n()).done;){var x=y.value;x.textContent=E}}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,E,O){if(M.previewElement){var y=m(M.previewElement.querySelectorAll("[data-dz-uploadprogress]"),!0),x;try{for(y.s();!(x=y.n()).done;){var N=x.value;N.nodeName==="PROGRESS"?N.value=E:N.style.width="".concat(E,"%")}}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(){}},k=C;function b(A){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?b=function(E){return typeof E}:b=function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},b(A)}function R(A,M){var E;if(typeof Symbol>"u"||A[Symbol.iterator]==null){if(Array.isArray(A)||(E=w(A))||M&&A&&typeof A.length=="number"){E&&(A=E);var O=0,y=function(){};return{s:y,n:function(){return O>=A.length?{done:!0}:{done:!1,value:A[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 x=!0,N=!1,I;return{s:function(){E=A[Symbol.iterator]()},n:function(){var L=E.next();return x=L.done,L},e:function(L){N=!0,I=L},f:function(){try{!x&&E.return!=null&&E.return()}finally{if(N)throw I}}}}function w(A,M){if(A){if(typeof A=="string")return B(A,M);var E=Object.prototype.toString.call(A).slice(8,-1);if(E==="Object"&&A.constructor&&(E=A.constructor.name),E==="Map"||E==="Set")return Array.from(A);if(E==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(E))return B(A,M)}}function B(A,M){(M==null||M>A.length)&&(M=A.length);for(var E=0,O=new Array(M);E<M;E++)O[E]=A[E];return O}function V(A,M){if(!(A instanceof M))throw new TypeError("Cannot call a class as a function")}function $(A,M){for(var E=0;E<M.length;E++){var O=M[E];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(A,O.key,O)}}function z(A,M,E){return M&&$(A.prototype,M),E&&$(A,E),A}function F(A,M){if(typeof M!="function"&&M!==null)throw new TypeError("Super expression must either be null or a function");A.prototype=Object.create(M&&M.prototype,{constructor:{value:A,writable:!0,configurable:!0}}),M&&P(A,M)}function P(A,M){return P=Object.setPrototypeOf||function(O,y){return O.__proto__=y,O},P(A,M)}function U(A){var M=Z();return function(){var O=re(A),y;if(M){var x=re(this).constructor;y=Reflect.construct(O,arguments,x)}else y=O.apply(this,arguments);return Y(this,y)}}function Y(A,M){return M&&(b(M)==="object"||typeof M=="function")?M:Q(A)}function Q(A){if(A===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A}function Z(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function re(A){return re=Object.setPrototypeOf?Object.getPrototypeOf:function(E){return E.__proto__||Object.getPrototypeOf(E)},re(A)}var W=function(A){F(E,A);var M=U(E);function E(O,y){var x;V(this,E),x=M.call(this);var N,I;if(x.element=O,x.version=E.version,x.clickableElements=[],x.listeners=[],x.files=[],typeof x.element=="string"&&(x.element=document.querySelector(x.element)),!x.element||x.element.nodeType==null)throw new Error("Invalid dropzone element.");if(x.element.dropzone)throw new Error("Dropzone already attached.");E.instances.push(Q(x)),x.element.dropzone=Q(x);var D=(I=E.optionsForElement(x.element))!=null?I:{};if(x.options=E.extend({},k,D,y??{}),x.options.previewTemplate=x.options.previewTemplate.replace(/\n*/g,""),x.options.forceFallback||!E.isBrowserSupported())return Y(x,x.options.fallback.call(Q(x)));if(x.options.url==null&&(x.options.url=x.element.getAttribute("action")),!x.options.url)throw new Error("No URL provided.");if(x.options.acceptedFiles&&x.options.acceptedMimeTypes)throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");if(x.options.uploadMultiple&&x.options.chunking)throw new Error("You cannot set both: uploadMultiple and chunking.");return x.options.acceptedMimeTypes&&(x.options.acceptedFiles=x.options.acceptedMimeTypes,delete x.options.acceptedMimeTypes),x.options.renameFilename!=null&&(x.options.renameFile=function(L){return x.options.renameFilename.call(Q(x),L.name,L)}),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=E.getElement(x.options.previewsContainer,"previewsContainer"):x.previewsContainer=x.element),x.options.clickable&&(x.options.clickable===!0?x.clickableElements=[x.element]:x.clickableElements=E.getElements(x.options.clickable,"clickable")),x.init(),x}return z(E,[{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(x){return x.status===y}).map(function(x){return x})}},{key:"getQueuedFiles",value:function(){return this.getFilesWithStatus(E.QUEUED)}},{key:"getUploadingFiles",value:function(){return this.getFilesWithStatus(E.UPLOADING)}},{key:"getAddedFiles",value:function(){return this.getFilesWithStatus(E.ADDED)}},{key:"getActiveFiles",value:function(){return this.files.filter(function(y){return y.status===E.UPLOADING||y.status===E.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(E.createElement('<div class="dz-default dz-message"><button class="dz-button" type="button">'.concat(this.options.dictDefaultMessage,"</button></div>"))),this.clickableElements.length){var x=function K(){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",E.getElement(y.options.hiddenInputContainer,"hiddenInputContainer").appendChild(y.hiddenFileInput),y.hiddenFileInput.addEventListener("change",function(){var j=y.hiddenFileInput.files;if(j.length){var G=R(j,!0),J;try{for(G.s();!(J=G.n()).done;){var _=J.value;y.addFile(_)}}catch(ce){G.e(ce)}finally{G.f()}}y.emit("addedfiles",j),K()})};x()}this.URL=window.URL!==null?window.URL:window.webkitURL;var N=R(this.events,!0),I;try{for(N.s();!(I=N.n()).done;){var D=I.value;this.on(D,this.options[D])}}catch(K){N.e(K)}finally{N.f()}this.on("uploadprogress",function(){return y.updateTotalUploadProgress()}),this.on("removedfile",function(){return y.updateTotalUploadProgress()}),this.on("canceled",function(K){return y.emit("complete",K)}),this.on("complete",function(K){if(y.getAddedFiles().length===0&&y.getUploadingFiles().length===0&&y.getQueuedFiles().length===0)return setTimeout(function(){return y.emit("queuecomplete")},0)});var L=function(j){if(j.dataTransfer.types){for(var G=0;G<j.dataTransfer.types.length;G++)if(j.dataTransfer.types[G]==="Files")return!0}return!1},H=function(j){if(L(j))return j.stopPropagation(),j.preventDefault?j.preventDefault():j.returnValue=!1};return this.listeners=[{element:this.element,events:{dragstart:function(j){return y.emit("dragstart",j)},dragenter:function(j){return H(j),y.emit("dragenter",j)},dragover:function(j){var G;try{G=j.dataTransfer.effectAllowed}catch{}return j.dataTransfer.dropEffect=G==="move"||G==="linkMove"?"move":"copy",H(j),y.emit("dragover",j)},dragleave:function(j){return y.emit("dragleave",j)},drop:function(j){return H(j),y.drop(j)},dragend:function(j){return y.emit("dragend",j)}}}],this.clickableElements.forEach(function(K){return y.listeners.push({element:K,events:{click:function(G){return(K!==y.element||G.target===y.element||E.elementInside(G.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,E.instances.splice(E.instances.indexOf(this),1)}},{key:"updateTotalUploadProgress",value:function(){var y,x=0,N=0,I=this.getActiveFiles();if(I.length){var D=R(this.getActiveFiles(),!0),L;try{for(D.s();!(L=D.n()).done;){var H=L.value;x+=H.upload.bytesSent,N+=H.upload.total}}catch(K){D.e(K)}finally{D.f()}y=100*x/N}else y=100;return this.emit("totaluploadprogress",y,N,x)}},{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,x;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=E.createElement(N);return this.element.tagName!=="FORM"?(x=E.createElement('<form action="'.concat(this.options.url,'" enctype="multipart/form-data" method="').concat(this.options.method,'"></form>')),x.appendChild(I)):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),x??I}},{key:"getExistingFallback",value:function(){for(var y=function(H){var K=R(H,!0),j;try{for(K.s();!(j=K.n()).done;){var G=j.value;if(/(^| )fallback($| )/.test(G.className))return G}}catch(J){K.e(J)}finally{K.f()}},x=0,N=["div","form"];x<N.length;x++){var I=N[x],D;if(D=y(this.element.getElementsByTagName(I)))return D}}},{key:"setupEventListeners",value:function(){return this.listeners.map(function(y){return function(){var x=[];for(var N in y.events){var I=y.events[N];x.push(y.element.addEventListener(N,I,!1))}return x}()})}},{key:"removeEventListeners",value:function(){return this.listeners.map(function(y){return function(){var x=[];for(var N in y.events){var I=y.events[N];x.push(y.element.removeEventListener(N,I,!1))}return x}()})}},{key:"disable",value:function(){var y=this;return this.clickableElements.forEach(function(x){return x.classList.remove("dz-clickable")}),this.removeEventListeners(),this.disabled=!0,this.files.map(function(x){return y.cancelUpload(x)})}},{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 x=0,N="b";if(y>0){for(var I=["tb","gb","mb","kb","b"],D=0;D<I.length;D++){var L=I[D],H=Math.pow(this.options.filesizeBase,4-D)/10;if(y>=H){x=y/Math.pow(this.options.filesizeBase,4-D),N=L;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(y){if(y.dataTransfer){this.emit("drop",y);for(var x=[],N=0;N<y.dataTransfer.files.length;N++)x[N]=y.dataTransfer.files[N];if(x.length){var I=y.dataTransfer.items;I&&I.length&&I[0].webkitGetAsEntry!=null?this._addFilesFromItems(I):this.handleFiles(x)}this.emit("addedfiles",x)}}},{key:"paste",value:function(y){if(Ce(y!=null?y.clipboardData:void 0,function(N){return N.items})!=null){this.emit("paste",y);var x=y.clipboardData.items;if(x.length)return this._addFilesFromItems(x)}}},{key:"handleFiles",value:function(y){var x=R(y,!0),N;try{for(x.s();!(N=x.n()).done;){var I=N.value;this.addFile(I)}}catch(D){x.e(D)}finally{x.f()}}},{key:"_addFilesFromItems",value:function(y){var x=this;return function(){var N=[],I=R(y,!0),D;try{for(I.s();!(D=I.n()).done;){var L=D.value,H;L.webkitGetAsEntry!=null&&(H=L.webkitGetAsEntry())?H.isFile?N.push(x.addFile(L.getAsFile())):H.isDirectory?N.push(x._addFilesFromDirectory(H,H.name)):N.push(void 0):L.getAsFile!=null&&(L.kind==null||L.kind==="file")?N.push(x.addFile(L.getAsFile())):N.push(void 0)}}catch(K){I.e(K)}finally{I.f()}return N}()}},{key:"_addFilesFromDirectory",value:function(y,x){var N=this,I=y.createReader(),D=function(K){return Te(console,"log",function(j){return j.log(K)})},L=function H(){return I.readEntries(function(K){if(K.length>0){var j=R(K,!0),G;try{for(j.s();!(G=j.n()).done;){var J=G.value;J.isFile?J.file(function(_){if(!(N.options.ignoreHiddenFiles&&_.name.substring(0,1)==="."))return _.fullPath="".concat(x,"/").concat(_.name),N.addFile(_)}):J.isDirectory&&N._addFilesFromDirectory(J,"".concat(x,"/").concat(J.name))}}catch(_){j.e(_)}finally{j.f()}H()}return null},D)};return L()}},{key:"accept",value:function(y,x){this.options.maxFilesize&&y.size>this.options.maxFilesize*1024*1024?x(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(y.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):E.isValidFile(y,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",y)):this.options.accept.call(this,y,x):x(this.options.dictInvalidFileType)}},{key:"addFile",value:function(y){var x=this;y.upload={uuid:E.uuidv4(),progress:0,total:y.size,bytesSent:0,filename:this._renameFile(y)},this.files.push(y),y.status=E.ADDED,this.emit("addedfile",y),this._enqueueThumbnail(y),this.accept(y,function(N){N?(y.accepted=!1,x._errorProcessing([y],N)):(y.accepted=!0,x.options.autoQueue&&x.enqueueFile(y)),x._updateMaxFilesReachedClass()})}},{key:"enqueueFiles",value:function(y){var x=R(y,!0),N;try{for(x.s();!(N=x.n()).done;){var I=N.value;this.enqueueFile(I)}}catch(D){x.e(D)}finally{x.f()}return null}},{key:"enqueueFile",value:function(y){var x=this;if(y.status===E.ADDED&&y.accepted===!0){if(y.status=E.QUEUED,this.options.autoProcessQueue)return setTimeout(function(){return x.processQueue()},0)}else throw new Error("This file can't be queued because it has already been processed or was rejected.")}},{key:"_enqueueThumbnail",value:function(y){var x=this;if(this.options.createImageThumbnails&&y.type.match(/image.*/)&&y.size<=this.options.maxThumbnailFilesize*1024*1024)return this._thumbnailQueue.push(y),setTimeout(function(){return x._processThumbnailQueue()},0)}},{key:"_processThumbnailQueue",value:function(){var y=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 y.emit("thumbnail",x,N),y._processingThumbnail=!1,y._processThumbnailQueue()})}}},{key:"removeFile",value:function(y){if(y.status===E.UPLOADING&&this.cancelUpload(y),this.files=le(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 x=R(this.files.slice(),!0),N;try{for(x.s();!(N=x.n()).done;){var I=N.value;(I.status!==E.UPLOADING||y)&&this.removeFile(I)}}catch(D){x.e(D)}finally{x.f()}return null}},{key:"resizeImage",value:function(y,x,N,I,D){var L=this;return this.createThumbnail(y,x,N,I,!0,function(H,K){if(K==null)return D(y);var j=L.options.resizeMimeType;j==null&&(j=y.type);var G=K.toDataURL(j,L.options.resizeQuality);return(j==="image/jpeg"||j==="image/jpg")&&(G=ye.restore(y.dataURL,G)),D(E.dataURItoBlob(G))})}},{key:"createThumbnail",value:function(y,x,N,I,D,L){var H=this,K=new FileReader;K.onload=function(){if(y.dataURL=K.result,y.type==="image/svg+xml"){L!=null&&L(K.result);return}H.createThumbnailFromUrl(y,x,N,I,D,L)},K.readAsDataURL(y)}},{key:"displayExistingFile",value:function(y,x,N,I){var D=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,x),N&&N();else{var H=function(j){D.emit("thumbnail",y,j),N&&N()};y.dataURL=x,this.createThumbnailFromUrl(y,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,this.options.fixOrientation,H,I)}}},{key:"createThumbnailFromUrl",value:function(y,x,N,I,D,L,H){var K=this,j=document.createElement("img");return H&&(j.crossOrigin=H),D=getComputedStyle(document.body).imageOrientation=="from-image"?!1:D,j.onload=function(){var G=function(_){return _(1)};return typeof EXIF<"u"&&EXIF!==null&&D&&(G=function(_){return EXIF.getData(j,function(){return _(EXIF.getTag(this,"Orientation"))})}),G(function(J){y.width=j.width,y.height=j.height;var _=K.options.resize.call(K,y,x,N,I),ce=document.createElement("canvas"),me=ce.getContext("2d");switch(ce.width=_.trgWidth,ce.height=_.trgHeight,J>4&&(ce.width=_.trgHeight,ce.height=_.trgWidth),J){case 2:me.translate(ce.width,0),me.scale(-1,1);break;case 3:me.translate(ce.width,ce.height),me.rotate(Math.PI);break;case 4:me.translate(0,ce.height),me.scale(1,-1);break;case 5:me.rotate(.5*Math.PI),me.scale(1,-1);break;case 6:me.rotate(.5*Math.PI),me.translate(0,-ce.width);break;case 7:me.rotate(.5*Math.PI),me.translate(ce.height,-ce.width),me.scale(-1,1);break;case 8:me.rotate(-.5*Math.PI),me.translate(-ce.height,0);break}Se(me,j,_.srcX!=null?_.srcX:0,_.srcY!=null?_.srcY:0,_.srcWidth,_.srcHeight,_.trgX!=null?_.trgX:0,_.trgY!=null?_.trgY:0,_.trgWidth,_.trgHeight);var Oe=ce.toDataURL("image/png");if(L!=null)return L(Oe,ce)})},L!=null&&(j.onerror=L),j.src=y.dataURL}},{key:"processQueue",value:function(){var y=this.options.parallelUploads,x=this.getUploadingFiles().length,N=x;if(!(x>=y)){var I=this.getQueuedFiles();if(I.length>0){if(this.options.uploadMultiple)return this.processFiles(I.slice(0,y-x));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 x=R(y,!0),N;try{for(x.s();!(N=x.n()).done;){var I=N.value;I.processing=!0,I.status=E.UPLOADING,this.emit("processing",I)}}catch(D){x.e(D)}finally{x.f()}return this.options.uploadMultiple&&this.emit("processingmultiple",y),this.uploadFiles(y)}},{key:"_getFilesWithXhr",value:function(y){return this.files.filter(function(x){return x.xhr===y}).map(function(x){return x})}},{key:"cancelUpload",value:function(y){if(y.status===E.UPLOADING){var x=this._getFilesWithXhr(y.xhr),N=R(x,!0),I;try{for(N.s();!(I=N.n()).done;){var D=I.value;D.status=E.CANCELED}}catch(j){N.e(j)}finally{N.f()}typeof y.xhr<"u"&&y.xhr.abort();var L=R(x,!0),H;try{for(L.s();!(H=L.n()).done;){var K=H.value;this.emit("canceled",K)}}catch(j){L.e(j)}finally{L.f()}this.options.uploadMultiple&&this.emit("canceledmultiple",x)}else(y.status===E.ADDED||y.status===E.QUEUED)&&(y.status=E.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 x=arguments.length,N=new Array(x>1?x-1:0),I=1;I<x;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 x=this;this._transformFiles(y,function(N){if(x.options.chunking){var I=N[0];y[0].upload.chunked=x.options.chunking&&(x.options.forceChunking||I.size>x.options.chunkSize),y[0].upload.totalChunkCount=Math.ceil(I.size/x.options.chunkSize)}if(y[0].upload.chunked){var D=y[0],L=N[0];D.upload.chunks=[];var H=function(){for(var _=0;D.upload.chunks[_]!==void 0;)_++;if(!(_>=D.upload.totalChunkCount)){var ce=_*x.options.chunkSize,me=Math.min(ce+x.options.chunkSize,L.size),Oe={name:x._getParamName(0),data:L.webkitSlice?L.webkitSlice(ce,me):L.slice(ce,me),filename:D.upload.filename,chunkIndex:_};D.upload.chunks[_]={file:D,index:_,dataBlock:Oe,status:E.UPLOADING,progress:0,retries:0},x._uploadData(y,[Oe])}};if(D.upload.finishedChunkUpload=function(J,_){var ce=!0;J.status=E.SUCCESS,J.dataBlock=null,J.xhr=null;for(var me=0;me<D.upload.totalChunkCount;me++){if(D.upload.chunks[me]===void 0)return H();D.upload.chunks[me].status!==E.SUCCESS&&(ce=!1)}ce&&x.options.chunksUploaded(D,function(){x._finished(y,_,null)})},x.options.parallelChunkUploads)for(var K=0;K<D.upload.totalChunkCount;K++)H();else H()}else{for(var j=[],G=0;G<y.length;G++)j[G]={name:x._getParamName(G),data:N[G],filename:y[G].upload.filename};x._uploadData(y,j)}})}},{key:"_getChunk",value:function(y,x){for(var N=0;N<y.upload.totalChunkCount;N++)if(y.upload.chunks[N]!==void 0&&y.upload.chunks[N].xhr===x)return y.upload.chunks[N]}},{key:"_uploadData",value:function(y,x){var N=this,I=new XMLHttpRequest,D=R(y,!0),L;try{for(D.s();!(L=D.n()).done;){var H=L.value;H.xhr=I}}catch(ae){D.e(ae)}finally{D.f()}y[0].upload.chunked&&(y[0].upload.chunks[x[0].chunkIndex].xhr=I);var K=this.resolveOption(this.options.method,y),j=this.resolveOption(this.options.url,y);I.open(K,j,!0);var G=this.resolveOption(this.options.timeout,y);G&&(I.timeout=this.resolveOption(this.options.timeout,y)),I.withCredentials=!!this.options.withCredentials,I.onload=function(ae){N._finishedUploading(y,I,ae)},I.ontimeout=function(){N._handleUploadError(y,I,"Request timedout after ".concat(N.options.timeout/1e3," seconds"))},I.onerror=function(){N._handleUploadError(y,I)};var J=I.upload!=null?I.upload:I;J.onprogress=function(ae){return N._updateFilesUploadProgress(y,I,ae)};var _={Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"};this.options.headers&&E.extend(_,this.options.headers);for(var ce in _){var me=_[ce];me&&I.setRequestHeader(ce,me)}var Oe=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 Pe in Fe){var Me=Fe[Pe];if(Array.isArray(Me))for(var je=0;je<Me.length;je++)Oe.append(Pe,Me[je]);else Oe.append(Pe,Me)}}var ut=R(y,!0),_e;try{for(ut.s();!(_e=ut.n()).done;){var cn=_e.value;this.emit("sending",cn,I,Oe)}}catch(ae){ut.e(ae)}finally{ut.f()}this.options.uploadMultiple&&this.emit("sendingmultiple",y,I,Oe),this._addFormElementData(Oe);for(var X=0;X<x.length;X++){var se=x[X];Oe.append(se.name,se.data,se.filename)}this.submitRequest(I,Oe,y)}},{key:"_transformFiles",value:function(y,x){for(var N=this,I=[],D=0,L=function(j){N.options.transformFile.call(N,y[j],function(G){I[j]=G,++D===y.length&&x(I)})},H=0;H<y.length;H++)L(H)}},{key:"_addFormElementData",value:function(y){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 I=N.value,D=I.getAttribute("name"),L=I.getAttribute("type");if(L&&(L=L.toLowerCase()),!(typeof D>"u"||D===null))if(I.tagName==="SELECT"&&I.hasAttribute("multiple")){var H=R(I.options,!0),K;try{for(H.s();!(K=H.n()).done;){var j=K.value;j.selected&&y.append(D,j.value)}}catch(G){H.e(G)}finally{H.f()}}else(!L||L!=="checkbox"&&L!=="radio"||I.checked)&&y.append(D,I.value)}}catch(G){x.e(G)}finally{x.f()}}}},{key:"_updateFilesUploadProgress",value:function(y,x,N){if(y[0].upload.chunked){var H=y[0],K=this._getChunk(H,x);N?(K.progress=100*N.loaded/N.total,K.total=N.total,K.bytesSent=N.loaded):(K.progress=100,K.bytesSent=K.total),H.upload.progress=0,H.upload.total=0,H.upload.bytesSent=0;for(var j=0;j<H.upload.totalChunkCount;j++)H.upload.chunks[j]&&typeof H.upload.chunks[j].progress<"u"&&(H.upload.progress+=H.upload.chunks[j].progress,H.upload.total+=H.upload.chunks[j].total,H.upload.bytesSent+=H.upload.chunks[j].bytesSent);H.upload.progress=H.upload.progress/H.upload.totalChunkCount,this.emit("uploadprogress",H,H.upload.progress,H.upload.bytesSent)}else{var I=R(y,!0),D;try{for(I.s();!(D=I.n()).done;){var L=D.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(G){I.e(G)}finally{I.f()}}}},{key:"_finishedUploading",value:function(y,x,N){var I;if(y[0].status!==E.CANCELED&&x.readyState===4){if(x.responseType!=="arraybuffer"&&x.responseType!=="blob"&&(I=x.responseText,x.getResponseHeader("content-type")&&~x.getResponseHeader("content-type").indexOf("application/json")))try{I=JSON.parse(I)}catch(D){N=D,I="Invalid JSON response from server."}this._updateFilesUploadProgress(y,x),200<=x.status&&x.status<300?y[0].upload.chunked?y[0].upload.finishedChunkUpload(this._getChunk(y[0],x),I):this._finished(y,I,N):this._handleUploadError(y,x,I)}}},{key:"_handleUploadError",value:function(y,x,N){if(y[0].status!==E.CANCELED){if(y[0].upload.chunked&&this.options.retryChunks){var I=this._getChunk(y[0],x);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}}",x.status),x)}}},{key:"submitRequest",value:function(y,x,N){if(y.readyState!=1){console.warn("Cannot send this request because the XMLHttpRequest.readyState is not OPENED.");return}y.send(x)}},{key:"_finished",value:function(y,x,N){var I=R(y,!0),D;try{for(I.s();!(D=I.n()).done;){var L=D.value;L.status=E.SUCCESS,this.emit("success",L,x,N),this.emit("complete",L)}}catch(H){I.e(H)}finally{I.f()}if(this.options.uploadMultiple&&(this.emit("successmultiple",y,x,N),this.emit("completemultiple",y)),this.options.autoProcessQueue)return this.processQueue()}},{key:"_errorProcessing",value:function(y,x,N){var I=R(y,!0),D;try{for(I.s();!(D=I.n()).done;){var L=D.value;L.status=E.ERROR,this.emit("error",L,x,N),this.emit("complete",L)}}catch(H){I.e(H)}finally{I.f()}if(this.options.uploadMultiple&&(this.emit("errormultiple",y,x,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 x=arguments.length,N=new Array(x>1?x-1:0),I=1;I<x;I++)N[I-1]=arguments[I];for(var D=0,L=N;D<L.length;D++){var H=L[D];for(var K in H){var j=H[K];y[K]=j}}return y}},{key:"uuidv4",value:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(y){var x=Math.random()*16|0,N=y==="x"?x:x&3|8;return N.toString(16)})}}]),E}(f);W.initClass(),W.version="5.9.3",W.options={},W.optionsForElement=function(A){if(A.getAttribute("id"))return W.options[de(A.getAttribute("id"))]},W.instances=[],W.forElement=function(A){if(typeof A=="string"&&(A=document.querySelector(A)),(A!=null?A.dropzone:void 0)==null)throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");return A.dropzone},W.autoDiscover=!0,W.discover=function(){var A;if(document.querySelectorAll)A=document.querySelectorAll(".dropzone");else{A=[];var M=function(O){return function(){var y=[],x=R(O,!0),N;try{for(x.s();!(N=x.n()).done;){var I=N.value;/(^| )dropzone($| )/.test(I.className)?y.push(A.push(I)):y.push(void 0)}}catch(D){x.e(D)}finally{x.f()}return y}()};M(document.getElementsByTagName("div")),M(document.getElementsByTagName("form"))}return function(){var E=[],O=R(A,!0),y;try{for(O.s();!(y=O.n()).done;){var x=y.value;W.optionsForElement(x)!==!1?E.push(new W(x)):E.push(void 0)}}catch(N){O.e(N)}finally{O.f()}return E}()},W.blockedBrowsers=[/opera.*(Macintosh|Windows Phone).*version\/12/i],W.isBrowserSupported=function(){var A=!0;if(window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if(!("classList"in document.createElement("a")))A=!1;else{W.blacklistedBrowsers!==void 0&&(W.blockedBrowsers=W.blacklistedBrowsers);var M=R(W.blockedBrowsers,!0),E;try{for(M.s();!(E=M.n()).done;){var O=E.value;if(O.test(navigator.userAgent)){A=!1;continue}}}catch(y){M.e(y)}finally{M.f()}}else A=!1;return A},W.dataURItoBlob=function(A){for(var M=atob(A.split(",")[1]),E=A.split(",")[0].split(":")[1].split(";")[0],O=new ArrayBuffer(M.length),y=new Uint8Array(O),x=0,N=M.length,I=0<=N;I?x<=N:x>=N;I?x++:x--)y[x]=M.charCodeAt(x);return new Blob([O],{type:E})};var le=function(M,E){return M.filter(function(O){return O!==E}).map(function(O){return O})},de=function(M){return M.replace(/[\-_](\w)/g,function(E){return E.charAt(1).toUpperCase()})};W.createElement=function(A){var M=document.createElement("div");return M.innerHTML=A,M.childNodes[0]},W.elementInside=function(A,M){if(A===M)return!0;for(;A=A.parentNode;)if(A===M)return!0;return!1},W.getElement=function(A,M){var E;if(typeof A=="string"?E=document.querySelector(A):A.nodeType!=null&&(E=A),E==null)throw new Error("Invalid `".concat(M,"` option provided. Please provide a CSS selector or a plain HTML element."));return E},W.getElements=function(A,M){var E,O;if(A instanceof Array){O=[];try{var y=R(A,!0),x;try{for(y.s();!(x=y.n()).done;)E=x.value,O.push(this.getElement(E,M))}catch(D){y.e(D)}finally{y.f()}}catch{O=null}}else if(typeof A=="string"){O=[];var N=R(document.querySelectorAll(A),!0),I;try{for(N.s();!(I=N.n()).done;)E=I.value,O.push(E)}catch(D){N.e(D)}finally{N.f()}}else A.nodeType!=null&&(O=[A]);if(O==null||!O.length)throw new Error("Invalid `".concat(M,"` option provided. Please provide a CSS selector, a plain HTML element or a list of those."));return O},W.confirm=function(A,M,E){if(window.confirm(A))return M();if(E!=null)return E()},W.isValidFile=function(A,M){if(!M)return!0;M=M.split(",");var E=A.type,O=E.replace(/\/.*$/,""),y=R(M,!0),x;try{for(y.s();!(x=y.n()).done;){var N=x.value;if(N=N.trim(),N.charAt(0)==="."){if(A.name.toLowerCase().indexOf(N.toLowerCase(),A.name.length-N.length)!==-1)return!0}else if(/\/\*$/.test(N)){if(O===N.replace(/\/.*$/,""))return!0}else if(E===N)return!0}}catch(I){y.e(I)}finally{y.f()}return!1},typeof jQuery<"u"&&jQuery!==null&&(jQuery.fn.dropzone=function(A){return this.each(function(){return new W(this,A)})}),W.ADDED="added",W.QUEUED="queued",W.ACCEPTED=W.QUEUED,W.UPLOADING="uploading",W.PROCESSING=W.UPLOADING,W.CANCELED="canceled",W.ERROR="error",W.SUCCESS="success";var ve=function(M){M.naturalWidth;var E=M.naturalHeight,O=document.createElement("canvas");O.width=1,O.height=E;var y=O.getContext("2d");y.drawImage(M,0,0);for(var x=y.getImageData(1,0,1,E),N=x.data,I=0,D=E,L=E;L>I;){var H=N[(L-1)*4+3];H===0?D=L:I=L,L=D+I>>1}var K=L/E;return K===0?1:K},Se=function(M,E,O,y,x,N,I,D,L,H){var K=ve(E);return M.drawImage(E,O,y,x,N,I,D,L,H/K)},ye=function(){function A(){V(this,A)}return z(A,null,[{key:"initClass",value:function(){this.KEY_STR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}},{key:"encode64",value:function(E){for(var O="",y=void 0,x=void 0,N="",I=void 0,D=void 0,L=void 0,H="",K=0;y=E[K++],x=E[K++],N=E[K++],I=y>>2,D=(y&3)<<4|x>>4,L=(x&15)<<2|N>>6,H=N&63,isNaN(x)?L=H=64:isNaN(N)&&(H=64),O=O+this.KEY_STR.charAt(I)+this.KEY_STR.charAt(D)+this.KEY_STR.charAt(L)+this.KEY_STR.charAt(H),y=x=N="",I=D=L=H="",K<E.length;);return O}},{key:"restore",value:function(E,O){if(!E.match("data:image/jpeg;base64,"))return O;var y=this.decode64(E.replace("data:image/jpeg;base64,","")),x=this.slice2Segments(y),N=this.exifManipulation(O,x);return"data:image/jpeg;base64,".concat(this.encode64(N))}},{key:"exifManipulation",value:function(E,O){var y=this.getExifArray(O),x=this.insertExif(E,y),N=new Uint8Array(x);return N}},{key:"getExifArray",value:function(E){for(var O=void 0,y=0;y<E.length;){if(O=E[y],O[0]===255&O[1]===225)return O;y++}return[]}},{key:"insertExif",value:function(E,O){var y=E.replace("data:image/jpeg;base64,",""),x=this.decode64(y),N=x.indexOf(255,3),I=x.slice(0,N),D=x.slice(N),L=I;return L=L.concat(O),L=L.concat(D),L}},{key:"slice2Segments",value:function(E){for(var O=0,y=[];;){var x;if(E[O]===255&E[O+1]===218)break;if(E[O]===255&E[O+1]===216)O+=2;else{x=E[O+2]*256+E[O+3];var N=O+x+2,I=E.slice(O,N);y.push(I),O=N}if(O>E.length)break}return y}},{key:"decode64",value:function(E){var O=void 0,y=void 0,x="",N=void 0,I=void 0,D=void 0,L="",H=0,K=[],j=/[^A-Za-z0-9\+\/\=]/g;for(j.exec(E)&&console.warn(`There were invalid base64 characters in the input text.
|
|
10
|
+
Valid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='
|
|
11
|
+
Expect errors in decoding.`),E=E.replace(/[^A-Za-z0-9\+\/\=]/g,"");N=this.KEY_STR.indexOf(E.charAt(H++)),I=this.KEY_STR.indexOf(E.charAt(H++)),D=this.KEY_STR.indexOf(E.charAt(H++)),L=this.KEY_STR.indexOf(E.charAt(H++)),O=N<<2|I>>4,y=(I&15)<<4|D>>2,x=(D&3)<<6|L,K.push(O),D!==64&&K.push(y),L!==64&&K.push(x),O=y=x="",N=I=D=L="",H<E.length;);return K}}]),A}();ye.initClass();var we=function(M,E){var O=!1,y=!0,x=M.document,N=x.documentElement,I=x.addEventListener?"addEventListener":"attachEvent",D=x.addEventListener?"removeEventListener":"detachEvent",L=x.addEventListener?"":"on",H=function j(G){if(!(G.type==="readystatechange"&&x.readyState!=="complete")&&((G.type==="load"?M:x)[D](L+G.type,j,!1),!O&&(O=!0)))return E.call(M,G.type||G)},K=function j(){try{N.doScroll("left")}catch{setTimeout(j,50);return}return H("poll")};if(x.readyState!=="complete"){if(x.createEventObject&&N.doScroll){try{y=!M.frameElement}catch{}y&&K()}return x[I](L+"DOMContentLoaded",H,!1),x[I](L+"readystatechange",H,!1),M[I](L+"load",H,!1)}};W._autoDiscoverFunction=function(){if(W.autoDiscover)return W.discover()},we(window,W._autoDiscoverFunction);function Ce(A,M){return typeof A<"u"&&A!==null?M(A):void 0}function Te(A,M,E){if(typeof A<"u"&&A!==null&&typeof A[M]=="function")return E(A,M)}window.Dropzone=W;var ge=W}(),o}()})})(Rc);var Jp=Rc.exports;const Ha=Gp(Jp),Yp={class:"fallback"},Xp=g.createElementVNode("input",{id:"file",type:"file",name:"file",multiple:""},null,-1),Qp={for:"file"},Zp={class:"dz-message","data-dz-message":""},qp={id:"bd-dropzone-theme",style:{display:"none"}},_p={class:"dz-preview dz-file-preview"},eh={class:"dz-details"},th=g.createElementVNode("img",{"data-dz-thumbnail":"",class:"dz-image"},null,-1),nh=g.createElementVNode("div",{class:"dz-filename"},[g.createElementVNode("small",{"data-dz-name":""})],-1),rh=g.createElementVNode("div",{class:"dz-progress"},[g.createElementVNode("div",{class:"spinner-border text-primary spinner-border-sm",role:"status"},[g.createElementVNode("span",{class:"visually-hidden"},"Loading...")])],-1),ih={class:"dz-success-mark"},oh={class:"dz-error-message text-danger"},sh=g.createElementVNode("small",{"data-dz-errormessage":""},null,-1),ah={name:"BDDropzone"},lh=g.defineComponent({...ah,props:{modelValue:{},buttonText:{},multiple:{type:Boolean},errorMessage:{},fileSizeExceededMessage:{},acceptedFiles:{},url:{},tag:{}},emits:["update:modelValue"],setup(n,{emit:e}){const t=n,r=g.computed(()=>({variant:Zr.PRIMARY,size:Qr.SM})),i=g.ref(t.modelValue);let o=null;Ha.autoDiscover=!1,g.onMounted(()=>{var d;document.getElementById("dropzone")&&(o=new Ha("#dropzone",{url:t.url,method:"post",acceptedFiles:t.acceptedFiles,addRemoveLinks:!1,maxFilesize:10,maxFiles:t.multiple?void 0:1,dictResponseError:t.errorMessage,dictFileTooBig:t.fileSizeExceededMessage,previewTemplate:(d=document.querySelector("#bd-dropzone-theme"))==null?void 0:d.innerHTML}),o.on("error",l),o.on("success",s),o.on("removedfile",c))});const s=function(d){i.value.push(d),a(d),e("update:modelValue",i.value)},l=function(d){a(d)},a=function(d){const f=d.name;if(!(f.endsWith(".png")||f.endsWith(".jpg")||f.endsWith(".jpeg")||f.endsWith(".gif"))){const h=d.previewElement.getElementsByClassName("icon-file"),p=d.previewElement.getElementsByClassName("dz-image");h[0].classList.remove("d-none"),p[0].classList.add("d-none")}},c=function(d){const f=i.value.findIndex(h=>{var p,m;return((p=h.upload)==null?void 0:p.uuid)===((m=d.upload)==null?void 0:m.uuid)});f!==-1&&i.value.splice(f,1),e("update:modelValue",i.value)},u=g.computed(()=>t.tag??"form");return(d,f)=>(g.openBlock(),g.createElementBlock(g.Fragment,null,[(g.openBlock(),g.createBlock(g.resolveDynamicComponent(u.value),{id:"dropzone",class:"dropzone bd-dropzone",enctype:"multipart/form-data"},{default:g.withCtx(()=>[g.createElementVNode("div",Yp,[Xp,g.createTextVNode(" test "),g.createElementVNode("label",Qp,[g.createVNode(g.unref(as)),g.createTextVNode(" "+g.toDisplayString(t.buttonText),1)])]),g.createElementVNode("div",Zp,[g.createVNode(g.unref(Lt),g.normalizeProps(g.guardReactiveProps(r.value)),{default:g.withCtx(()=>[g.createVNode(g.unref(as)),g.createTextVNode(" "+g.toDisplayString(t.buttonText),1)]),_:1},16)])]),_:1})),g.createElementVNode("div",qp,[g.createElementVNode("div",_p,[g.createElementVNode("div",eh,[th,g.createVNode(g.unref(vf),{"data-dz-thumbnail":"",class:"d-none"}),nh,g.createVNode(g.unref(Lt),{class:"dz-remove",alt:"Click me to remove the file.","data-dz-remove":""},{default:g.withCtx(()=>[g.createVNode(g.unref(uf))]),_:1})]),rh,g.createElementVNode("div",ih,[g.createVNode(g.unref(Hd))]),g.createElementVNode("div",oh,[g.createVNode(g.unref(Tc)),sh])])])],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,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 Xe(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 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),i=r.content.slice(),o=r.find(n);return i.splice(o==-1?i.length:o,0,e,t),new Xe(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=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 Dc(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=Dc(i.content,o.content,t+1);if(s!=null)return s}t+=i.nodeSize}}function Lc(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=Lc(s.content,l.content,t-1,r-1);if(c)return c}t-=a,r-=a}}class oe{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,t,r,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 oe(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 oe(r,i)}cutByIndex(e,t){return e==t?oe.empty:e==0&&t==this.content.length?this:new oe(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let i=this.content.slice(),o=this.size+t.nodeSize-r.nodeSize;return i[e]=t,new oe(i,o)}addToStart(e){return new oe([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new oe(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,r=0;t<this.content.length;t++){let i=this.content[t];e(i,r,t),r+=i.nodeSize}}findDiffStart(e,t=0){return Dc(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return Lc(this,e,t,r)}findIndex(e,t=-1){if(e==0)return ii(0,e);if(e==this.size)return ii(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?ii(r+1,s):ii(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 oe.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new oe(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return oe.empty;let t,r=0;for(let 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 oe(t||e,r)}static from(e){if(!e)return oe.empty;if(e instanceof oe)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new oe([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}oe.empty=new oe([],0);const Io={index:0,offset:0};function ii(n,e){return Io.index=n,Io.offset=e,Io}function bi(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(!bi(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!bi(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let Le=class ls{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&&bi(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 ls.none;if(e instanceof ls)return[e];let t=e.slice();return t.sort((r,i)=>r.type.rank-i.type.rank),t}};Le.none=[];class xi 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=Fc(this.content,e+this.openStart,t);return r&&new fe(r,this.openStart,this.openEnd)}removeBetween(e,t){return new fe(Pc(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,i=t.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new fe(oe.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 fe(e,r,i)}}fe.empty=new fe(oe.empty,0,0);function Pc(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(Pc(o.content,e-i-1,t-i-1)))}function Fc(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=Fc(s.content,e-o-1,t);return l&&n.replaceChild(i,s.copy(l))}function ch(n,e,t){if(t.openStart>n.depth)throw new xi("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new xi("Inconsistent open depths");return Bc(n,e,t,0)}function Bc(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=Bc(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 zn(s,l.cut(0,n.parentOffset).append(t.content).append(l.cut(e.parentOffset)))}else{let{start:s,end:l}=uh(t,n);return zn(o,Vc(n,s,l,e,r))}else return zn(o,Si(n,e,r))}function zc(n,e){if(!e.type.compatibleContent(n.type))throw new xi("Cannot join "+e.type.name+" onto "+n.type.name)}function cs(n,e,t){let r=n.node(t);return zc(r,e.node(t)),r}function Bn(n,e){let t=e.length-1;t>=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function wr(n,e,t,r){let 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&&(Bn(n.nodeAfter,r),o++));for(let l=o;l<s;l++)Bn(i.child(l),r);e&&e.depth==t&&e.textOffset&&Bn(e.nodeBefore,r)}function zn(n,e){return n.type.checkContent(e),n.copy(e)}function Vc(n,e,t,r,i){let o=n.depth>i&&cs(n,e,i+1),s=r.depth>i&&cs(t,r,i+1),l=[];return wr(null,n,i,l),o&&s&&e.index(i)==t.index(i)?(zc(o,s),Bn(zn(o,Vc(n,e,t,r,i+1)),l)):(o&&Bn(zn(o,Si(n,e,i+1)),l),wr(e,t,i,l),s&&Bn(zn(s,Si(t,r,i+1)),l)),wr(r,null,i,l),new oe(l)}function Si(n,e,t){let r=[];if(wr(null,n,t,r),n.depth>t){let i=cs(n,e,t+1);Bn(zn(i,Si(n,e,t+1)),r)}return wr(e,null,t,r),new oe(r)}function uh(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(oe.from(i));return{start:i.resolveNoCache(n.openStart+t),end:i.resolveNoCache(i.content.size-n.openEnd-t)}}class Fr{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 Le.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 Ei(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 Fr(t,r,o)}static resolveCached(e,t){for(let i=0;i<Ro.length;i++){let o=Ro[i];if(o.pos==t&&o.doc==e)return o}let r=Ro[Do]=Fr.resolve(e,t);return Do=(Do+1)%dh,r}}let Ro=[],Do=0,dh=12;class Ei{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 fh=Object.create(null);let Vn=class us{constructor(e,t,r,i=Le.none){this.type=e,this.attrs=t,this.marks=i,this.content=r||oe.empty}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,r,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&&bi(this.attrs,t||e.defaultAttrs||fh)&&Le.sameSet(this.marks,r||Le.none)}copy(e=null){return e==this.content?this:new us(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new us(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 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 fe(c,i.depth-s,o.depth-s)}replace(e,t,r){return ch(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 Fr.resolveCached(this,e)}resolveNoCache(e){return Fr.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()+")"),$c(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=oe.empty,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=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 i=oe.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,i,r)}};Vn.prototype.text=void 0;class Ci extends Vn{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):$c(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 Ci(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Ci(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 $c(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class jn{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new ph(e,t);if(r.next==null)return jn.empty;let i=Hc(r);r.next&&r.err("Unexpected trailing text");let o=xh(bh(i));return Sh(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 oe.from(l.map(c=>c.createAndFill()));for(let c=0;c<s.next.length;c++){let{type:u,next:d}=s.next[c];if(!(u.isText||u.hasRequiredAttrs())&&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
|
+
`)}}jn.empty=new jn(!0);class ph{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 Hc(n){let e=[];do e.push(hh(n));while(n.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function hh(n){let e=[];do e.push(mh(n));while(n.next&&n.next!=")"&&n.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function mh(n){let e=yh(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=gh(n,e);else break;return e}function Ua(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let e=Number(n.next);return n.pos++,e}function gh(n,e){let t=Ua(n),r=t;return n.eat(",")&&(n.next!="}"?r=Ua(n):r=-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:t,max:r,expr:e}}function vh(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 yh(n){if(n.eat("(")){let e=Hc(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=vh(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 bh(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 Uc(n,e){return e-n}function ja(n,e){let t=[];return r(e),t.sort(Uc);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 xh(n){let e=Object.create(null);return t(ja(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]);ja(n,a).forEach(u=>{c||i.push([l,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let o=e[r.join(",")]=new jn(r.indexOf(n.length-1)>-1);for(let s=0;s<i.length;s++){let l=i[s][1].sort(Uc);o.next.push({type:i[s][0],next:e[l.join(",")]||t(l)})}return o}}function Sh(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 jc(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 Wc(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 Kc(n){let e=Object.create(null);if(n)for(let t in n)e[t]=new Eh(n[t]);return e}let Wa=class Gc{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=Kc(r.attrs),this.defaultAttrs=jc(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==jn.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:Wc(this.attrs,e)}create(e=null,t,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Vn(this,this.computeAttrs(e),oe.from(t),Le.setFrom(r))}createChecked(e=null,t,r){return t=oe.from(t),this.checkContent(t),new Vn(this,this.computeAttrs(e),t,Le.setFrom(r))}createAndFill(e=null,t,r){if(e=this.computeAttrs(e),t=oe.from(t),t.size){let s=this.contentMatch.fillBefore(t);if(!s)return null;t=s.append(t)}let i=this.contentMatch.matchFragment(t),o=i&&i.fillBefore(oe.empty,!0);return o?new Vn(this,e,t.append(o),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((o,s)=>r[o]=new Gc(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 Eh{constructor(e){this.hasDefault=Object.prototype.hasOwnProperty.call(e,"default"),this.default=e.default}get isRequired(){return!this.hasDefault}}class po{constructor(e,t,r,i){this.name=e,this.rank=t,this.schema=r,this.spec=i,this.attrs=Kc(i.attrs),this.excluded=null;let o=jc(this.attrs);this.instance=o?new Le(this,o):null}create(e=null){return!e&&this.instance?this.instance:new Le(this,Wc(this.attrs,e))}static compile(e,t){let r=Object.create(null),i=0;return e.forEach((o,s)=>r[o]=new po(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 Ch{constructor(e){this.cached=Object.create(null);let t=this.spec={};for(let i in e)t[i]=e[i];t.nodes=Xe.from(e.nodes),t.marks=Xe.from(e.marks||{}),this.nodes=Wa.compile(this.spec.nodes,this),this.marks=po.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]=jn.parse(s,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.markSet=l=="_"?null:l?Ka(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==""?[]:Ka(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 Wa){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 Ci(r,r.defaultAttrs,e,Le.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeFromJSON(e){return Vn.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 Ka(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 lr{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 Ja(this,t,!1);return r.addAll(e,t.from,t.to),r.finish()}parseSlice(e,t={}){let r=new Ja(this,t,!0);return r.addAll(e,t.from,t.to),fe.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(Th(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=Ya(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=Ya(s)),s.node||s.ignore||s.mark||(s.node=i)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new lr(e,lr.schemaRules(e)))}}const Jc={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},kh={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Yc={ol:!0,ul:!0},ki=1,wi=2,Tr=4;function Ga(n,e,t){return e!=null?(e?ki:0)|(e==="full"?wi:0):n&&n.whitespace=="pre"?ki|wi:t&~Tr}class oi{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=Le.none,this.stashMarks=[],this.match=s||(l&Tr?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(oe.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let r=this.type.contentMatch,i;return(i=r.findWrapping(e.type))?(this.match=r,i):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&ki)){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=oe.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(oe.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}popFromStashMark(e){for(let t=this.stashMarks.length-1;t>=0;t--)if(e.eq(this.stashMarks[t]))return this.stashMarks.splice(t,1)[0]}applyPending(e){for(let t=0,r=this.pendingMarks;t<r.length;t++){let i=r[t];(this.type?this.type.allowsMarkType(i.type):Oh(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&&!Jc.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class Ja{constructor(e,t,r){this.parser=e,this.options=t,this.isOpen=r,this.open=0;let i=t.topNode,o,s=Ga(null,t.preserveWhitespace,0)|(r?Tr:0);i?o=new oi(i.type,i.attrs,Le.none,Le.none,!0,t.topMatch||i.type.contentMatch,s):r?o=new oi(null,null,Le.none,Le.none,!0,null,s):o=new oi(e.schema.topNodeType,null,Le.none,Le.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(Ah(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&wi||r.inlineContext(e)||/[^ \t\r\n\u000c]/.test(t)){if(r.options&ki)r.options&wi?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;Yc.hasOwnProperty(r)&&this.parser.normalizeLists&&wh(e);let o=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(i=this.parser.matchTag(e,this,t));if(o?o.ignore:kh.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(Jc.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=Le.none,r=Le.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=Ga(e,i,o.options);o.options&Tr&&o.content.length==0&&(s|=Tr),this.nodes.push(new oi(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=Mh(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 wh(n){for(let e=n.firstChild,t=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&Yc.hasOwnProperty(r)&&t?(t.appendChild(e),e=t):r=="li"?t=e:r&&(t=null)}}function Th(n,e){return(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,e)}function Ah(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 Ya(n){let e={};for(let t in n)e[t]=n[t];return e}function Oh(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 Mh(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=Lo(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}=Yt.renderSpec(Lo(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&&Yt.renderSpec(Lo(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:h}=Yt.renderSpec(e,d,r);if(l.appendChild(f),h){if(s)throw new RangeError("Multiple content holes");s=h}}}return{dom:l,contentDOM:s}}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Yt(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=Xa(e.nodes);return t.text||(t.text=r=>r.text),t}static marksFromSchema(e){return Xa(e.marks)}}function Xa(n){let e={};for(let t in n){let r=n[t].spec.toDOM;r&&(e[t]=r)}return e}function Lo(n){return n.document||window.document}const Xc=65535,Qc=Math.pow(2,16);function Nh(n,e){return n+e*Qc}function Qa(n){return n&Xc}function Ih(n){return(n-(n&Xc))/Qc}const Zc=1,qc=2,pi=4,_c=8;class ds{constructor(e,t,r){this.pos=e,this.delInfo=t,this.recover=r}get deleted(){return(this.delInfo&_c)>0}get deletedBefore(){return(this.delInfo&(Zc|pi))>0}get deletedAfter(){return(this.delInfo&(qc|pi))>0}get deletedAcross(){return(this.delInfo&pi)>0}}class vt{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&vt.empty)return vt.empty}recover(e){let t=0,r=Qa(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+Ih(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,h=a+i+(f<0?0:u);if(r)return h;let p=e==(t<0?a:d)?null:Nh(l/3,e-a),m=e==a?qc:e==d?Zc:pi;return(t<0?e!=a:e!=d)&&(m|=_c),new ds(h,m,p)}i+=u-c}return r?e+i:new ds(e+i,0,null)}touches(e,t){let r=0,i=Qa(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 vt(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?vt.empty:new vt(e<0?[0,-e,0]:[0,0,e])}}vt.empty=new vt([]);class Ar{constructor(e=[],t,r=0,i=e.length){this.maps=e,this.mirror=t,this.from=r,this.to=i}slice(e=0,t=this.maps.length){return new Ar(this.maps,this.mirror,e,t)}copy(){return new Ar(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(e,t){this.to=this.maps.push(e),t!=null&&this.setMirror(this.maps.length-1,t)}appendMapping(e){for(let t=0,r=this.maps.length;t<e.maps.length;t++){let 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 Ar;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let r=this.from;r<this.to;r++)e=this.maps[r].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,r){let 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 ds(e,i,null)}}const Po=Object.create(null);class nt{getMap(){return vt.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=Po[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 Po)throw new RangeError("Duplicate use of step JSON ID "+e);return Po[e]=t,t.prototype.jsonID=e,t}}class Ue{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new Ue(e,null)}static fail(e){return new Ue(null,e)}static fromReplace(e,t,r,i){try{return Ue.ok(e.replace(t,r,i))}catch(o){if(o instanceof xi)return Ue.fail(o.message);throw o}}}function js(n,e,t){let r=[];for(let i=0;i<n.childCount;i++){let o=n.child(i);o.content.size&&(o=o.copy(js(o.content,e,o))),o.isInline&&(o=e(o,t,i)),r.push(o)}return oe.fromArray(r)}class yn 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),i=r.node(r.sharedDepth(this.to)),o=new fe(js(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 Ue.fromReplace(e,this.from,this.to,o)}invert(){return new Xt(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 yn(t.pos,r.pos,this.mark)}merge(e){return e instanceof yn&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new yn(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 yn(t.from,t.to,e.markFromJSON(t.mark))}}nt.jsonID("addMark",yn);class Xt 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(js(t.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),t.openStart,t.openEnd);return Ue.fromReplace(e,this.from,this.to,r)}invert(){return new yn(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 Xt(t.pos,r.pos,this.mark)}merge(e){return e instanceof Xt&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Xt(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 Xt(t.from,t.to,e.markFromJSON(t.mark))}}nt.jsonID("removeMark",Xt);class bn extends nt{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return Ue.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return Ue.fromReplace(e,this.pos,this.pos+1,new fe(oe.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let r=this.mark.addToSet(t.marks);if(r.length==t.marks.length){for(let i=0;i<t.marks.length;i++)if(!t.marks[i].isInSet(r))return new bn(this.pos,t.marks[i]);return new bn(this.pos,this.mark)}}return new cr(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new bn(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 bn(t.pos,e.markFromJSON(t.mark))}}nt.jsonID("addNodeMark",bn);class cr extends nt{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return Ue.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return Ue.fromReplace(e,this.pos,this.pos+1,new fe(oe.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new bn(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new cr(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 cr(t.pos,e.markFromJSON(t.mark))}}nt.jsonID("removeNodeMark",cr);class Qe extends nt{constructor(e,t,r,i=!1){super(),this.from=e,this.to=t,this.slice=r,this.structure=i}apply(e){return this.structure&&fs(e,this.from,this.to)?Ue.fail("Structure replace would overwrite content"):Ue.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new vt([this.from,this.to-this.from,this.slice.size])}invert(e){return new Qe(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deletedAcross&&r.deletedAcross?null:new Qe(t.pos,Math.max(t.pos,r.pos),this.slice)}merge(e){if(!(e instanceof Qe)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let t=this.slice.size+e.slice.size==0?fe.empty:new fe(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new Qe(this.from,this.to+(e.to-e.from),t,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let t=this.slice.size+e.slice.size==0?fe.empty:new fe(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new Qe(e.from,this.to,t,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new Qe(t.from,t.to,fe.fromJSON(e,t.slice),!!t.structure)}}nt.jsonID("replace",Qe);class Ge extends nt{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&&(fs(e,this.from,this.gapFrom)||fs(e,this.gapTo,this.to)))return Ue.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return Ue.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,t.content);return r?Ue.fromReplace(e,this.from,this.to,r):Ue.fail("Content does not fit in gap")}getMap(){return new vt([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new Ge(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 Ge(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 Ge(t.from,t.to,t.gapFrom,t.gapTo,fe.fromJSON(e,t.slice),t.insert,!!t.structure)}}nt.jsonID("replaceAround",Ge);function fs(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 Rh(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),h=Math.min(c+a.nodeSize,t),p=r.addToSet(d);for(let m=0;m<d.length;m++)d[m].isInSet(p)||(s&&s.to==f&&s.mark.eq(d[m])?s.to=h:i.push(s=new Xt(f,h,d[m])));l&&l.to==f?l.to=h:o.push(l=new yn(f,h,r))}}),i.forEach(a=>n.step(a)),o.forEach(a=>n.step(a))}function Dh(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 po){let c=s.marks,u;for(;u=r.isInSet(c);)(a||(a=[])).push(u),c=u.removeFromSet(c)}else r?r.isInSet(s.marks)&&(a=[r]):a=s.marks;if(a&&a.length){let c=Math.min(l+s.nodeSize,t);for(let u=0;u<a.length;u++){let d=a[u],f;for(let h=0;h<i.length;h++){let p=i[h];p.step==o-1&&d.eq(i[h].style)&&(f=p)}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 Xt(s.from,s.to,s.style)))}function Lh(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,fe.empty));else{r=u;for(let d=0;d<a.marks.length;d++)t.allowsMarkType(a.marks[d].type)||n.step(new Xt(s,c,a.marks[d]));if(a.isText&&!t.spec.code){let d,f=/\r?\n|\r/g,h;for(;d=f.exec(a.text);)h||(h=new fe(oe.from(t.schema.text(" ",t.allowedMarks(a.marks))),0,0)),o.push(new Qe(s+d.index,s+d.index+d[0].length,h))}}s=c}if(!r.validEnd){let l=r.fillBefore(oe.empty,!0);n.replace(s,s,new fe(l,0,0))}for(let l=o.length-1;l>=0;l--)n.step(o[l])}function Ph(n,e,t){return(e==0||n.canReplace(e,n.childCount))&&(t==n.childCount||n.canReplace(0,t))}function yr(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||!Ph(i,o,s))break}return null}function Fh(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=oe.empty,d=0;for(let p=o,m=!1;p>t;p--)m||r.index(p)>0?(m=!0,u=oe.from(r.node(p).copy(u)),d++):a--;let f=oe.empty,h=0;for(let p=o,m=!1;p>t;p--)m||i.after(p+1)<i.end(p)?(m=!0,f=oe.from(i.node(p).copy(f)),h++):c++;n.step(new Ge(a,c,s,l,new fe(u.append(f),d,h),u.size-d,!0))}function Ws(n,e,t=null,r=n){let i=Bh(n,e),o=i&&zh(r,e);return o?i.map(Za).concat({type:e,attrs:t}).concat(o.map(Za)):null}function Za(n){return{type:n,attrs:null}}function Bh(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 zh(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 Vh(n,e,t){let r=oe.empty;for(let s=t.length-1;s>=0;s--){if(r.size){let l=t[s].type.contentMatch.matchFragment(r);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=oe.from(t[s].type.create(t[s].attrs,r))}let i=e.start,o=e.end;n.step(new Ge(i,o,i,o,new fe(r,0,0),t.length,!0))}function $h(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)&&Hh(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 Ge(c,u,c+1,u-1,new fe(oe.from(r.create(i,null,s.marks)),0,0),1,!0)),!1}})}function Hh(n,e,t){let r=n.resolve(e),i=r.index();return r.parent.canReplaceWith(i,i+1,t)}function Uh(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 Ge(e,e+o.nodeSize,e+1,e+o.nodeSize-1,new fe(oe.from(s),0,0),1,!0))}function ir(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 h=d.content.cutByIndex(f,d.childCount),p=r&&r[u+1];p&&(h=h.replaceChild(0,p.type.create(p.attrs)));let m=r&&r[u]||d;if(!d.canReplace(f+1,d.childCount)||!m.type.validContent(h))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 jh(n,e,t=1,r){let i=n.doc.resolve(e),o=oe.empty,s=oe.empty;for(let l=i.depth,a=i.depth-t,c=t-1;l>a;l--,c--){o=oe.from(i.node(l).copy(o));let u=r&&r[c];s=oe.from(u?u.type.create(u.attrs,s):i.node(l).copy(s))}n.step(new Qe(e,e,new fe(o.append(s),t,t),!0))}function wn(n,e){let t=n.resolve(e),r=t.index();return eu(t.nodeBefore,t.nodeAfter)&&t.parent.canReplace(r,r+1)}function eu(n,e){return!!(n&&e&&!n.isLeaf&&n.canAppend(e))}function ho(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&&eu(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 Wh(n,e,t){let r=new Qe(e-t,e+t,fe.empty,!0);n.step(r)}function Kh(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 Gh(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 Ks(n,e,t=e,r=fe.empty){if(e==t&&!r.size)return null;let i=n.resolve(e),o=n.resolve(t);return tu(i,o,r)?new Qe(e,t,r):new Jh(i,o,r).fit()}function tu(n,e,t){return!t.openStart&&!t.openEnd&&n.start()==e.start()&&n.parent.canReplace(n.index(),e.index(),t.content)}class Jh{constructor(e,t,r){this.$from=e,this.$to=t,this.unplaced=r,this.frontier=[],this.placed=oe.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=oe.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 fe(o,s,l);return e>-1?new Ge(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=Fo(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(oe.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=Fo(e,t);return!i.childCount||i.firstChild.isLeaf?!1:(this.unplaced=new fe(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=Fo(e,t);if(i.childCount<=1&&t>0){let o=e.size-t<=t+i.size;this.unplaced=new fe(Er(e,t-1,1),t-1,o?t-1:r)}else this.unplaced=new fe(Er(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 m=0;m<o.length;m++)this.openFrontierNode(o[m]);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 m=0;m<i.childCount;m++)u.push(i.child(m));d=d.matchFragment(i)}let h=l.size+e-(s.content.size-s.openEnd);for(;c<l.childCount;){let m=l.child(c),v=d.matchType(m.type);if(!v)break;c++,(c>1||a==0||m.content.size)&&(d=v,u.push(nu(m.mark(f.allowedMarks(m.marks)),c==1?a:0,c==l.childCount?h:-1)))}let p=c==l.childCount;p||(h=-1),this.placed=Cr(this.placed,t,oe.from(u)),this.frontier[t].match=d,p&&h<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,v=l;m<h;m++){let S=v.lastChild;this.frontier.push({type:S.type,match:S.contentMatchAt(S.childCount)}),v=S.content}this.unplaced=p?e==0?fe.empty:new fe(Er(s.content,e-1,1),e-1,h<0?s.openEnd:e-1):new fe(Er(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||!Bo(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=Bo(e,t,i,r,o);if(s){for(let l=t-1;l>=0;l--){let{match:a,type:c}=this.frontier[l],u=Bo(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=Cr(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=Cr(this.placed,this.depth,oe.from(e.create(t,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(oe.empty,!0);t.childCount&&(this.placed=Cr(this.placed,this.frontier.length,t))}}function Er(n,e,t){return e==0?n.cutByIndex(t,n.childCount):n.replaceChild(0,n.firstChild.copy(Er(n.firstChild.content,e-1,t)))}function Cr(n,e,t){return e==0?n.append(t):n.replaceChild(n.childCount-1,n.lastChild.copy(Cr(n.lastChild.content,e-1,t)))}function Fo(n,e){for(let t=0;t<e;t++)n=n.firstChild.content;return n}function nu(n,e,t){if(e<=0)return n;let r=n.content;return e>1&&(r=r.replaceChild(0,nu(r.firstChild,e-1,r.childCount==1?t-1:0))),e>0&&(r=n.type.contentMatch.fillBefore(r).append(r),t<=0&&(r=r.append(n.type.contentMatch.matchFragment(r).fillBefore(oe.empty,!0)))),n.copy(r)}function Bo(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&&!Yh(t,o.content,s)?l:null}function Yh(n,e,t){for(let r=t;r<e.childCount;r++)if(!n.allowsMarks(e.child(r).marks))return!0;return!1}function Xh(n){return n.spec.defining||n.spec.definingForContent}function Qh(n,e,t,r){if(!r.size)return n.deleteRange(e,t);let i=n.doc.resolve(e),o=n.doc.resolve(t);if(tu(i,o,r))return n.step(new Qe(e,t,r));let s=iu(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,h=i.pos-1;f>0;f--,h--){let p=i.node(f).type.spec;if(p.defining||p.definingAsContext||p.isolating)break;s.indexOf(f)>-1?l=f:i.before(f)==h&&s.splice(1,0,-f)}let a=s.indexOf(l),c=[],u=r.openStart;for(let f=r.content,h=0;;h++){let p=f.firstChild;if(c.push(p),h==r.openStart)break;f=p.content}for(let f=u-1;f>=0;f--){let h=c[f],p=Xh(h.type);if(p&&!h.sameMarkup(i.node(Math.abs(l)-1)))u=f;else if(p||!h.type.isTextblock)break}for(let f=r.openStart;f>=0;f--){let h=(f+u+1)%(r.openStart+1),p=c[h];if(p)for(let m=0;m<s.length;m++){let v=s[(m+a)%s.length],S=!0;v<0&&(S=!1,v=-v);let C=i.node(v-1),k=i.index(v-1);if(C.canReplaceWith(k,k,p.type,p.marks))return n.replace(i.before(v),S?o.after(v):t,new fe(ru(r.content,0,r.openStart,h),h,r.openEnd))}}let d=n.steps.length;for(let f=s.length-1;f>=0&&(n.replace(e,t,r),!(n.steps.length>d));f--){let h=s[f];h<0||(e=i.before(h),t=o.after(h))}}function ru(n,e,t,r,i){if(e<t){let o=n.firstChild;n=n.replaceChild(0,o.copy(ru(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(oe.empty,!0))}return n}function Zh(n,e,t,r){if(!r.isInline&&e==t&&n.doc.resolve(e).parent.content.size){let i=Kh(n.doc,e,r.type);i!=null&&(e=t=i)}n.replaceRange(e,t,new fe(oe.from(r),0,0))}function qh(n,e,t){let r=n.doc.resolve(e),i=n.doc.resolve(t),o=iu(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 iu(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 or 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 Ue.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 Ue.fromReplace(e,this.pos,this.pos+1,new fe(oe.from(i),0,t.isLeaf?0:1))}getMap(){return vt.empty}invert(e){return new or(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 or(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 or(t.pos,t.attr,t.value)}}nt.jsonID("attr",or);class Br extends nt{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 Ue.ok(r)}getMap(){return vt.empty}invert(e){return new Br(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 Br(t.attr,t.value)}}nt.jsonID("docAttr",Br);let ur=class extends Error{};ur=function n(e){let t=Error.call(this,e);return t.__proto__=n.prototype,t};ur.prototype=Object.create(Error.prototype);ur.prototype.constructor=ur;ur.prototype.name="TransformError";class ou{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Ar}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new ur(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 i=Ks(this.doc,e,t,r);return i&&this.step(i),this}replaceWith(e,t,r){return this.replace(e,t,new fe(oe.from(r),0,0))}delete(e,t){return this.replace(e,t,fe.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,r){return Qh(this,e,t,r),this}replaceRangeWith(e,t,r){return Zh(this,e,t,r),this}deleteRange(e,t){return qh(this,e,t),this}lift(e,t){return Fh(this,e,t),this}join(e,t=1){return Wh(this,e,t),this}wrap(e,t){return Vh(this,e,t),this}setBlockType(e,t=e,r,i=null){return $h(this,e,t,r,i),this}setNodeMarkup(e,t,r=null,i){return Uh(this,e,t,r,i),this}setNodeAttribute(e,t,r){return this.step(new or(e,t,r)),this}setDocAttribute(e,t){return this.step(new Br(e,t)),this}addNodeMark(e,t){return this.step(new bn(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 cr(e,t)),this}split(e,t=1,r){return jh(this,e,t,r),this}addMark(e,t,r){return Rh(this,e,t,r),this}removeMark(e,t,r){return Dh(this,e,t,r),this}clearIncompatible(e,t,r){return Lh(this,e,t,r),this}}const zo=Object.create(null);class Ie{constructor(e,t,r){this.$anchor=e,this.$head=t,this.ranges=r||[new _h(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,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?fe.empty:t),l==0&&el(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),el(e,r,t.isInline?-1:1))}}static findFrom(e,t,r=!1){let i=e.parent.inlineContent?new Re(e):qn(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?qn(e.node(0),e.node(o),e.before(o+1),e.index(o),t,r):qn(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 Ft(e.node(0))}static atStart(e){return qn(e,e,0,0,1)||new Ft(e)}static atEnd(e){return qn(e,e,e.content.size,e.childCount,-1)||new Ft(e)}static fromJSON(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=zo[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 zo)throw new RangeError("Duplicate use of selection JSON ID "+e);return zo[e]=t,t.prototype.jsonID=e,t}getBookmark(){return Re.between(this.$anchor,this.$head).getBookmark()}}Ie.prototype.visible=!0;class _h{constructor(e,t){this.$from=e,this.$to=t}}let qa=!1;function _a(n){!qa&&!n.parent.inlineContent&&(qa=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+n.parent.type.name+")"))}class Re extends Ie{constructor(e,t=e){_a(e),_a(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 Ie.near(r);let i=e.resolve(t.map(this.anchor));return new Re(i.parent.inlineContent?i: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 Re&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new mo(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 Re(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=Ie.findFrom(t,r,!0)||Ie.findFrom(t,-r,!0);if(o)t=o.$head;else return Ie.near(t,r)}return e.parent.inlineContent||(i==0?e=t:(e=(Ie.findFrom(e,-r,!0)||Ie.findFrom(e,r,!0)).$anchor,e.pos<t.pos!=i<0&&(e=t))),new Re(e,t)}}Ie.jsonID("text",Re);class mo{constructor(e,t){this.anchor=e,this.head=t}map(e){return new mo(e.map(this.anchor),e.map(this.head))}resolve(e){return Re.between(e.resolve(this.anchor),e.resolve(this.head))}}class xe extends Ie{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?Ie.near(o):new xe(o)}content(){return new fe(oe.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 Gs(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;Ie.jsonID("node",xe);class Gs{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:r}=e.mapResult(this.anchor);return t?new mo(r,r):new Gs(r)}resolve(e){let t=e.resolve(this.anchor),r=t.nodeAfter;return r&&xe.isSelectable(r)?new xe(t):Ie.near(t)}}class Ft extends Ie{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=Ie.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new Ft(e)}map(e){return new Ft(e)}eq(e){return e instanceof Ft}getBookmark(){return em}}Ie.jsonID("all",Ft);const em={map(){return this},resolve(n){return new Ft(n)}};function qn(n,e,t,r,i,o=!1){if(e.inlineContent)return Re.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&&xe.isSelectable(l))return xe.create(n,t-(i<0?l.nodeSize:0))}else{let a=qn(n,l,t+i,i<0?l.childCount:0,i,o);if(a)return a}t+=l.nodeSize*i}return null}function el(n,e,t){let r=n.steps.length-1;if(r<e)return;let i=n.steps[r];if(!(i instanceof Qe||i instanceof Ge))return;let o=n.mapping.maps[r],s;o.forEach((l,a,c,u)=>{s==null&&(s=u)}),n.setSelection(Ie.near(n.doc.resolve(s),t))}const tl=1,si=2,nl=4;class tm extends ou{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|tl)&~si,this.storedMarks=null,this}get selectionSet(){return(this.updated&tl)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=si,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&si)>0}addStep(e,t){super.addStep(e,t),this.updated=this.updated&~si,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 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(Ie.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|=nl,this}get scrolledIntoView(){return(this.updated&nl)>0}}function rl(n,e){return!e||!n?n:n.bind(e)}class kr{constructor(e,t,r){this.name=e,this.init=rl(t.init,r),this.apply=rl(t.apply,r)}}const nm=[new kr("doc",{init(n){return n.doc||n.schema.topNodeType.createAndFill()},apply(n){return n.doc}}),new kr("selection",{init(n,e){return n.selection||Ie.atStart(e.doc)},apply(n){return n.selection}}),new kr("storedMarks",{init(n){return n.storedMarks||null},apply(n,e,t,r){return r.selection.$cursor?n.storedMarks:null}}),new kr("scrollToSelection",{init(){return 0},apply(n,e){return n.scrolledIntoView?e+1:e}})];class Vo{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=nm.slice(),t&&t.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new kr(r.key,r.spec.state,r))})}}class nr{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 nr(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 tm(this)}static create(e){let t=new Vo(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new nr(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 Vo(this.schema,e.plugins),r=t.fields,i=new nr(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 Vo(e.schema,e.plugins),o=new nr(i);return i.fields.forEach(s=>{if(s.name=="doc")o.doc=Vn.fromJSON(e.schema,t.doc);else if(s.name=="selection")o.selection=Ie.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 su(n,e,t){for(let r in n){let i=n[r];i instanceof Function?i=i.bind(e):r=="handleDOMEvents"&&(i=su(i,e,{})),t[r]=i}return t}class mt{constructor(e){this.spec=e,this.props={},e.props&&su(e.props,this,this.props),this.key=e.key?e.key.key:au("plugin")}getState(e){return e[this.key]}}const $o=Object.create(null);function au(n){return n in $o?n+"$"+ ++$o[n]:($o[n]=0,n+"$")}class $t{constructor(e="key"){this.key=au(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const ot=function(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e},zr=function(n){let e=n.assignedSlot||n.parentNode;return e&&e.nodeType==11?e.host:e};let il=null;const on=function(n,e,t){let r=il||(il=document.createRange());return r.setEnd(n,t??n.nodeValue.length),r.setStart(n,e||0),r},Wn=function(n,e,t,r){return t&&(ol(n,e,t,r,-1)||ol(n,e,t,r,1))},rm=/^(img|br|input|textarea|hr)$/i;function ol(n,e,t,r,i){for(;;){if(n==t&&e==r)return!0;if(e==(i<0?0:Jt(n))){let o=n.parentNode;if(!o||o.nodeType!=1||Js(n)||rm.test(n.nodeName)||n.contentEditable=="false")return!1;e=ot(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?Jt(n):0}else return!1}}function Jt(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function im(n,e,t){for(let r=e==0,i=e==Jt(n);r||i;){if(n==t)return!0;let o=ot(n);if(n=n.parentNode,!n)return!1;r=r&&o==0,i=i&&o==Jt(n)}}function Js(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 go=function(n){return n.focusNode&&Wn(n.focusNode,n.focusOffset,n.anchorNode,n.anchorOffset)};function Rn(n,e){let t=document.createEvent("Event");return t.initEvent("keydown",!0,!0),t.keyCode=n,t.key=t.code=e,t}function om(n){let e=n.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function sm(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 Qt=typeof navigator<"u"?navigator:null,sl=typeof document<"u"?document:null,Tn=Qt&&Qt.userAgent||"",ps=/Edge\/(\d+)/.exec(Tn),lu=/MSIE \d/.exec(Tn),hs=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Tn),ft=!!(lu||hs||ps),Sn=lu?document.documentMode:hs?+hs[1]:ps?+ps[1]:0,zt=!ft&&/gecko\/(\d+)/i.test(Tn);zt&&+(/Firefox\/(\d+)/.exec(Tn)||[0,0])[1];const ms=!ft&&/Chrome\/(\d+)/.exec(Tn),tt=!!ms,am=ms?+ms[1]:0,st=!ft&&!!Qt&&/Apple Computer/.test(Qt.vendor),dr=st&&(/Mobile\/\w+/.test(Tn)||!!Qt&&Qt.maxTouchPoints>2),At=dr||(Qt?/Mac/.test(Qt.platform):!1),lm=Qt?/Win/.test(Qt.platform):!1,Pt=/Android \d/.test(Tn),qr=!!sl&&"webkitFontSmoothing"in sl.documentElement.style,cm=qr?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function um(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 dm(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 al(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=zr(s)){if(s.nodeType!=1)continue;let l=s,a=l==o.body,c=a?um(o):dm(l),u=0,d=0;if(e.top<c.top+nn(r,"top")?d=-(c.top-e.top+nn(i,"top")):e.bottom>c.bottom-nn(r,"bottom")&&(d=e.bottom-e.top>c.bottom-c.top?e.top+nn(i,"top")-c.top:e.bottom-c.bottom+nn(i,"bottom")),e.left<c.left+nn(r,"left")?u=-(c.left-e.left+nn(i,"left")):e.right>c.right-nn(r,"right")&&(u=e.right-c.right+nn(i,"right")),u||d)if(a)o.defaultView.scrollBy(u,d);else{let f=l.scrollLeft,h=l.scrollTop;d&&(l.scrollTop+=d),u&&(l.scrollLeft+=u);let p=l.scrollLeft-f,m=l.scrollTop-h;e={left:e.left-p,top:e.top-m,right:e.right-p,bottom:e.bottom-m}}if(a||/^(fixed|sticky)$/.test(getComputedStyle(s).position))break}}function fm(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:cu(n.dom)}}function cu(n){let e=[],t=n.ownerDocument;for(let r=n;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),n!=t);r=zr(r));return e}function pm({refDOM:n,refTop:e,stack:t}){let r=n?n.getBoundingClientRect().top:0;uu(t,r==0?0:r-e)}function uu(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 Yn=null;function hm(n){if(n.setActive)return n.setActive();if(Yn)return n.focus(Yn);let e=cu(n);n.focus(Yn==null?{get preventScroll(){return Yn={preventScroll:!0},!0}}:void 0),Yn||(Yn=!1,uu(e,0))}function du(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=on(u).getClientRects();else continue;for(let h=0;h<f.length;h++){let p=f[h];if(p.top<=s&&p.bottom>=l){s=Math.max(p.bottom,s),l=Math.min(p.top,l);let m=p.left>e.left?p.left-e.left:p.right<e.left?e.left-p.right:0;if(m<r){t=u,r=m,i=m&&t.nodeType==3?{left:p.right<e.left?p.right:p.left,top:e.top}:e,u.nodeType==1&&m&&(o=d+(e.left>=(p.left+p.right)/2?1:0));continue}}else p.top>e.top&&!a&&p.left<=e.left&&p.right>=e.left&&(a=u,c={left:Math.max(p.left,Math.min(p.right,e.left)),top:p.top});!t&&(e.left>=p.right&&e.top>=p.top||e.left>=p.left&&e.top>=p.bottom)&&(o=d+1)}}return!t&&a&&(t=a,i=c,r=0),t&&t.nodeType==3?mm(t,i):!t||r&&t.nodeType==1?{node:n,offset:o}:du(t,i)}function mm(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=pn(r,1);if(o.top!=o.bottom&&Ys(e,o))return{node:n,offset:i+(e.left>=(o.left+o.right)/2?1:0)}}return{node:n,offset:0}}function Ys(n,e){return n.left>=e.left-1&&n.left<=e.right+1&&n.top>=e.top-1&&n.top<=e.bottom+1}function gm(n,e){let t=n.parentNode;return t&&/^li$/i.test(t.nodeName)&&e.left<n.getBoundingClientRect().left?t:n}function vm(n,e,t){let{node:r,offset:i}=du(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 ym(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 fu(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(Ys(e,c))return fu(s,e,c)}}if((o=(o+1)%r)==i)break}return n}function bm(n,e){let t=n.dom.ownerDocument,r,i=0,o=sm(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(!Ys(e,c)||(s=fu(n.dom,e,c),!s))return null}if(st)for(let c=s;r&&c;c=zr(c))c.draggable&&(r=void 0);if(s=gm(s,e),r){if(zt&&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;qr&&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=ym(n,r,i,e))}l==null&&(l=vm(n,s,e));let a=n.docView.nearestDesc(s,!0);return{pos:l,inside:a?a.posAtStart-a.border:-1}}function ll(n){return n.top<n.bottom||n.left<n.right}function pn(n,e){let t=n.getClientRects();if(t.length){let r=t[e<0?0:t.length-1];if(ll(r))return r}return Array.prototype.find.call(t,ll)||n.getBoundingClientRect()}const xm=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function pu(n,e,t){let{node:r,offset:i,atom:o}=n.docView.domFromPos(e,t<0?-1:1),s=qr||zt;if(r.nodeType==3)if(s&&(xm.test(r.nodeValue)||(t<0?!i:i==r.nodeValue.length))){let a=pn(on(r,i,i),t);if(zt&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let c=pn(on(r,i-1,i-1),-1);if(c.top==a.top){let u=pn(on(r,i,i+1),-1);if(u.top!=a.top)return xr(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++,xr(pn(on(r,a,c),u),u<0)}if(!n.state.doc.resolve(e-(o||0)).parent.inlineContent){if(o==null&&i&&(t<0||i==Jt(r))){let a=r.childNodes[i-1];if(a.nodeType==1)return Ho(a.getBoundingClientRect(),!1)}if(o==null&&i<Jt(r)){let a=r.childNodes[i];if(a.nodeType==1)return Ho(a.getBoundingClientRect(),!0)}return Ho(r.getBoundingClientRect(),t>=0)}if(o==null&&i&&(t<0||i==Jt(r))){let a=r.childNodes[i-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 xr(pn(c,1),!1)}if(o==null&&i<Jt(r)){let a=r.childNodes[i];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 xr(pn(c,-1),!0)}return xr(pn(r.nodeType==3?on(r):r,-t),t>=0)}function xr(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 Ho(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 hu(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 Sm(n,e,t){let r=e.selection,i=t=="up"?r.$from:r.$to;return hu(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=pu(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=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 Em=/[\u0590-\u08ac]/;function Cm(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!Em.test(r.parent.textContent)||!l.modify?t=="left"||t=="backward"?o:s:hu(n,e,()=>{let{focusNode:a,focusOffset:c,anchorNode:u,anchorOffset:d}=n.domSelectionRange(),f=l.caretBidiLevel;l.modify("move",t,"character");let h=r.depth?n.docView.domAfterPos(r.before()):n.dom,{focusNode:p,focusOffset:m}=n.domSelectionRange(),v=p&&!h.contains(p.nodeType==1?p:p.parentNode)||a==p&&c==m;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 cl=null,ul=null,dl=!1;function km(n,e,t){return cl==e&&ul==t?dl:(cl=e,ul=t,dl=t=="up"||t=="down"?Sm(n,e,t):Cm(n,e,t))}const Mt=0,fl=1,Ln=2,Zt=3;class _r{constructor(e,t,r,i){this.parent=e,this.children=t,this.dom=r,this.contentDOM=i,this.dirty=Mt,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>ot(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 gu){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 mu&&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?ot(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?ot(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=ot(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=ot(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,h=0;f<this.children.length;f++){let p=this.children[f],m=h+p.size;if(o>h&&s<m)return p.setSelection(e-h-p.border,t-h-p.border,r,i);h=m}let l=this.domFromPos(e,e?-1:1),a=t==e?l:this.domFromPos(t,t?-1:1),c=r.getSelection(),u=!1;if((zt||st)&&e==t){let{node:f,offset:h}=l;if(f.nodeType==3){if(u=!!(h&&f.nodeValue[h-1]==`
|
|
15
|
+
`),u&&h==f.nodeValue.length)for(let p=f,m;p;p=p.parentNode){if(m=p.nextSibling){m.nodeName=="BR"&&(l=a={node:m.parentNode,offset:ot(m)+1});break}let v=p.pmViewDesc;if(v&&v.node&&v.node.isBlock)break}}else{let p=f.childNodes[h-1];u=p&&(p.nodeName=="BR"||p.contentEditable=="false")}}if(zt&&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&&st)&&Wn(l.node,l.offset,c.anchorNode,c.anchorOffset)&&Wn(a.node,a.offset,c.focusNode,c.focusOffset))return;let d=!1;if((c.extend||e==t)&&!u){c.collapse(l.node,l.offset);try{e!=t&&c.extend(a.node,a.offset),d=!0}catch{}}if(!d){if(e>t){let h=l;l=a,a=h}let f=document.createRange();f.setEnd(a.node,a.offset),f.setStart(l.node,l.offset),c.removeAllRanges(),c.addRange(f)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let r=0,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?Ln:fl,e==l&&t==a&&(o.contentLost||o.dom.parentNode!=this.contentDOM)?o.dirty=Zt:o.markDirty(e-l,t-l);return}else o.dirty=o.dom==o.contentDOM&&o.dom.parentNode==this.contentDOM&&!o.children.length?Ln:Zt}r=s}this.dirty=Ln}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let r=e==1?Ln:fl;t.dirty<r&&(t.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}}class mu extends _r{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==Mt&&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 wm extends _r{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 Kn extends _r{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=Yt.renderSpec(document,t.type.spec.toDOM(t,r))),new Kn(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!=Mt){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=Mt}}slice(e,t,r){let i=Kn.create(this.parent,this.mark,!0,r),o=this.children,s=this.size;t<s&&(o=ys(o,t,s,r)),e>0&&(o=ys(o,0,e,r));for(let l=0;l<o.length;l++)o[l].parent=i;return i.children=o,i}}class En extends _r{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}=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=bu(u,r,t),c?a=new Tm(e,t,r,i,u,d||null,f,c,o,s+1):t.isText?new vo(e,t,r,i,u,f,o):new En(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=()=>oe.empty)}return e}matchesNode(e,t,r){return this.dirty==Mt&&e.eq(this.node)&&vs(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 Om(this,s&&s.node,e);Im(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,i)},(c,u,d,f)=>{a.syncToMarks(c.marks,r,e);let h;a.findNodeMatch(c,u,d,f)||l&&e.state.selection.from>i&&e.state.selection.to<i+c.nodeSize&&(h=a.findIndexWithChild(o.node))>-1&&a.updateNodeAt(c,u,d,h,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==Ln)&&(s&&this.protectLocalComposition(e,s),vu(this.contentDOM,this.children,e),dr&&Rm(this.dom))}localCompositionInfo(e,t){let{from:r,to:i}=e.state.selection;if(!(e.state.selection instanceof Re)||r<t||i>t+this.node.content.size)return null;let o=e.domSelectionRange(),s=Dm(o.focusNode,o.focusOffset);if(!s||!this.dom.contains(s.parentNode))return null;if(this.node.inlineContent){let l=s.nodeValue,a=Lm(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 wm(this,o,t,i);e.input.compositionNodes.push(s),this.children=ys(this.children,r,r+i.length,e,s)}update(e,t,r,i){return this.dirty==Zt||!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=Mt}updateOuterDeco(e){if(vs(e,this.outerDeco))return;let t=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=yu(this.dom,this.nodeDOM,gs(this.outerDeco,this.node,t),gs(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 pl(n,e,t,r,i){bu(r,e,n);let o=new En(void 0,n,e,t,r,r,r,i,0);return o.contentDOM&&o.updateChildren(i,0),o}class vo extends En{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==Zt||this.dirty!=Mt&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(t),(this.dirty!=Mt||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=Mt,!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 vo(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=Zt)}get domAtom(){return!1}}class gu extends _r{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==Mt&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class Tm extends En{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==Zt)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 vu(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=hl(r),i=!0;r=r.nextSibling}else i=!0,n.insertBefore(l,r);if(s instanceof Kn){let a=r?r.previousSibling:n.lastChild;vu(s.contentDOM,s.children,t),r=a?a.nextSibling:n.firstChild}}for(;r;)r=hl(r),i=!0;i&&t.trackWrites==n&&(t.trackWrites=null)}const Or=function(n){n&&(this.nodeName=n)};Or.prototype=Object.create(null);const Pn=[new Or];function gs(n,e,t){if(n.length==0)return Pn;let r=t?Pn[0]:new Or,i=[r];for(let o=0;o<n.length;o++){let s=n[o].type.attrs;if(s){s.nodeName&&i.push(r=new Or(s.nodeName));for(let l in s){let a=s[l];a!=null&&(t&&i.length==1&&i.push(r=new Or(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 yu(n,e,t,r){if(t==Pn&&r==Pn)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=Pn[0]),i=a}Am(i,l||Pn[0],s)}return i}function Am(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 bu(n,e,t){return yu(n,n,Pn,gs(e,t,n.nodeType!=1))}function vs(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 hl(n){let e=n.nextSibling;return n.parentNode.removeChild(n),e}class Om{constructor(e,t,r){this.lock=t,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=Mm(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=Mt,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=Kn.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==Zt&&s.dom==s.contentDOM&&(s.dirty=Ln),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 En){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!=Zt&&vs(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=Ln,d.updateChildren(i,s+1),d.dirty=Mt),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=En.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=En.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 mu(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 Kn;)t=e,e=t.children[t.children.length-1];(!e||!(e instanceof vo)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((st||tt)&&e&&e.dom.contentEditable=="false"&&this.addHackNode("IMG",t),this.addHackNode("BR",this.top))}addHackNode(e,t){if(t==this.top&&this.index<t.children.length&&t.children[this.index].matchesHack(e))this.index++;else{let r=document.createElement(e);e=="IMG"&&(r.className="ProseMirror-separator",r.alt=""),e=="BR"&&(r.className="ProseMirror-trailingBreak");let i=new gu(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 Mm(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 Kn)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 Nm(n,e){return n.type.side-e.type.side}function Im(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(Nm);for(let v=0;v<d.length;v++)t(d[v],c,!!a)}else t(u,c,!!a);let f,h;if(a)h=-1,f=a,a=null;else if(c<n.childCount)h=c,f=n.child(c++);else break;for(let 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 p=o+f.nodeSize;if(f.isText){let v=p;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<p&&(a=f.cut(v-o),f=f.cut(0,v-o),p=v,h=-1)}let m=f.isInline&&!f.isLeaf?l.filter(v=>!v.inline):l.slice();r(f,m,e.forChild(o,f),h),o=p}}function Rm(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 Dm(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 Lm(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 ys(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 Xs(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(go(t)){for(a=l;i&&!i.node;)i=i.parent;let u=i.node;if(i&&u.isAtom&&xe.isSelectable(u)&&i.parent&&!(u.isInline&&im(t.focusNode,t.focusOffset,i.dom))){let d=i.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&&!o?1:-1;c=Qs(n,a,l,u)}return c}function xu(n){return n.editable?n.hasFocus():Eu(n)&&document.activeElement&&document.activeElement.contains(n.dom)}function ln(n,e=!1){let t=n.state.selection;if(Su(n,t),!!xu(n)){if(!e&&n.input.mouseDown&&n.input.mouseDown.allowDefault&&tt){let r=n.domSelectionRange(),i=n.domObserver.currentSelection;if(r.anchorNode&&i.anchorNode&&Wn(r.anchorNode,r.anchorOffset,i.anchorNode,i.anchorOffset)){n.input.mouseDown.delayedSelectionSync=!0,n.domObserver.setCurSelection();return}}if(n.domObserver.disconnectSelection(),n.cursorWrapper)Fm(n);else{let{anchor:r,head:i}=t,o,s;ml&&!(t instanceof Re)&&(t.$from.parent.inlineContent||(o=gl(n,t.from)),!t.empty&&!t.$from.parent.inlineContent&&(s=gl(n,t.to))),n.docView.setSelection(r,i,n.root,e),ml&&(o&&vl(o),s&&vl(s)),t.visible?n.dom.classList.remove("ProseMirror-hideselection"):(n.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&Pm(n))}n.domObserver.setCurSelection(),n.domObserver.connectSelection()}}const ml=st||tt&&am<63;function gl(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(st&&i&&i.contentEditable=="false")return Uo(i);if((!i||i.contentEditable=="false")&&(!o||o.contentEditable=="false")){if(i)return Uo(i);if(o)return Uo(o)}}function Uo(n){return n.contentEditable="true",st&&n.draggable&&(n.draggable=!1,n.wasDraggable=!0),n}function vl(n){n.contentEditable="false",n.wasDraggable&&(n.draggable=!0,n.wasDraggable=null)}function Pm(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(()=>{(!xu(n)||n.state.selection.visible)&&n.dom.classList.remove("ProseMirror-hideselection")},20))})}function Fm(n){let e=n.domSelection(),t=document.createRange(),r=n.cursorWrapper.dom,i=r.nodeName=="IMG";i?t.setEnd(r.parentNode,ot(r)+1):t.setEnd(r,0),t.collapse(!1),e.removeAllRanges(),e.addRange(t),!i&&!n.state.selection.visible&&ft&&Sn<=11&&(r.disabled=!0,r.disabled=!1)}function Su(n,e){if(e instanceof xe){let t=n.docView.descAt(e.from);t!=n.lastSelectedViewDesc&&(yl(n),t&&t.selectNode(),n.lastSelectedViewDesc=t)}else yl(n)}function yl(n){n.lastSelectedViewDesc&&(n.lastSelectedViewDesc.parent&&n.lastSelectedViewDesc.deselectNode(),n.lastSelectedViewDesc=void 0)}function Qs(n,e,t,r){return n.someProp("createSelectionBetween",i=>i(n,e,t))||Re.between(e,t,r)}function bl(n){return n.editable&&!n.hasFocus()?!1:Eu(n)}function Eu(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 Bm(n){let e=n.docView.domFromPos(n.state.selection.anchor,0),t=n.domSelectionRange();return Wn(e.node,e.offset,t.anchorNode,t.anchorOffset)}function bs(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&&Ie.findFrom(o,e)}function hn(n,e){return n.dispatch(n.state.tr.setSelection(e).scrollIntoView()),!0}function xl(n,e,t){let r=n.state.selection;if(r instanceof Re)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 hn(n,new Re(r.$anchor,s))}else if(r.empty){if(n.endOfTextblock(e>0?"forward":"backward")){let i=bs(n.state,e);return i&&i instanceof xe?hn(n,i):!1}else if(!(At&&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?xe.isSelectable(o)?hn(n,new xe(e<0?n.state.doc.resolve(i.pos-o.nodeSize):i)):qr?hn(n,new Re(n.state.doc.resolve(e<0?l:l+o.nodeSize))):!1:!1}}else return!1;else{if(r instanceof xe&&r.node.isInline)return hn(n,new Re(e>0?r.$to:r.$from));{let i=bs(n.state,e);return i?hn(n,i):!1}}}function Ti(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function Mr(n,e){let t=n.pmViewDesc;return t&&t.size==0&&(e<0||n.nextSibling||n.nodeName!="BR")}function Xn(n,e){return e<0?zm(n):Vm(n)}function zm(n){let e=n.domSelectionRange(),t=e.focusNode,r=e.focusOffset;if(!t)return;let i,o,s=!1;for(zt&&t.nodeType==1&&r<Ti(t)&&Mr(t.childNodes[r],-1)&&(s=!0);;)if(r>0){if(t.nodeType!=1)break;{let l=t.childNodes[r-1];if(Mr(l,-1))i=t,o=--r;else if(l.nodeType==3)t=l,r=t.nodeValue.length;else break}}else{if(Cu(t))break;{let l=t.previousSibling;for(;l&&Mr(l,-1);)i=t.parentNode,o=ot(l),l=l.previousSibling;if(l)t=l,r=Ti(t);else{if(t=t.parentNode,t==n.dom)break;r=0}}}s?xs(n,t,r):i&&xs(n,i,o)}function Vm(n){let e=n.domSelectionRange(),t=e.focusNode,r=e.focusOffset;if(!t)return;let i=Ti(t),o,s;for(;;)if(r<i){if(t.nodeType!=1)break;let l=t.childNodes[r];if(Mr(l,1))o=t,s=++r;else break}else{if(Cu(t))break;{let l=t.nextSibling;for(;l&&Mr(l,1);)o=l.parentNode,s=ot(l)+1,l=l.nextSibling;if(l)t=l,r=0,i=Ti(t);else{if(t=t.parentNode,t==n.dom)break;r=i=0}}}o&&xs(n,o,s)}function Cu(n){let e=n.pmViewDesc;return e&&e.node&&e.node.isBlock}function $m(n,e){for(;n&&e==n.childNodes.length&&!Js(n);)e=ot(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 Hm(n,e){for(;n&&!e&&!Js(n);)e=ot(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 xs(n,e,t){if(e.nodeType!=3){let o,s;(s=$m(e,t))?(e=s,t=0):(o=Hm(e,t))&&(e=o,t=o.nodeValue.length)}let r=n.domSelection();if(go(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&&ln(n)},50)}function Sl(n,e){let t=n.state.doc.resolve(e);if(!(tt||lm)&&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 El(n,e,t){let r=n.state.selection;if(r instanceof Re&&!r.empty||t.indexOf("s")>-1||At&&t.indexOf("m")>-1)return!1;let{$from:i,$to:o}=r;if(!i.parent.inlineContent||n.endOfTextblock(e<0?"up":"down")){let s=bs(n.state,e);if(s&&s instanceof xe)return hn(n,s)}if(!i.parent.inlineContent){let s=e<0?i:o,l=r instanceof Ft?Ie.near(s,e):Ie.findFrom(s,e);return l?hn(n,l):!1}return!1}function Cl(n,e){if(!(n.state.selection instanceof Re))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 kl(n,e,t){n.domObserver.stop(),e.contentEditable=t,n.domObserver.start()}function Um(n){if(!st||n.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:t}=n.domSelectionRange();if(e&&e.nodeType==1&&t==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let r=e.firstChild;kl(n,r,"true"),setTimeout(()=>kl(n,r,"false"),20)}return!1}function jm(n){let e="";return n.ctrlKey&&(e+="c"),n.metaKey&&(e+="m"),n.altKey&&(e+="a"),n.shiftKey&&(e+="s"),e}function Wm(n,e){let t=e.keyCode,r=jm(e);if(t==8||At&&t==72&&r=="c")return Cl(n,-1)||Xn(n,-1);if(t==46&&!e.shiftKey||At&&t==68&&r=="c")return Cl(n,1)||Xn(n,1);if(t==13||t==27)return!0;if(t==37||At&&t==66&&r=="c"){let i=t==37?Sl(n,n.state.selection.from)=="ltr"?-1:1:-1;return xl(n,i,r)||Xn(n,i)}else if(t==39||At&&t==70&&r=="c"){let i=t==39?Sl(n,n.state.selection.from)=="ltr"?1:-1:1;return xl(n,i,r)||Xn(n,i)}else{if(t==38||At&&t==80&&r=="c")return El(n,-1,r)||Xn(n,-1);if(t==40||At&&t==78&&r=="c")return Um(n)||El(n,1,r)||Xn(n,1);if(r==(At?"m":"c")&&(t==66||t==73||t==89||t==90))return!0}return!1}function ku(n,e){n.someProp("transformCopied",h=>{e=h(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 h=r.firstChild;t.push(h.type.name,h.attrs!=h.type.defaultAttrs?h.attrs:null),r=h.content}let s=n.someProp("clipboardSerializer")||Yt.fromSchema(n.state.schema),l=Nu(),a=l.createElement("div");a.appendChild(s.serializeFragment(r,{document:l}));let c=a.firstChild,u,d=0;for(;c&&c.nodeType==1&&(u=Mu[c.nodeName.toLowerCase()]);){for(let h=u.length-1;h>=0;h--){let p=l.createElement(u[h]);for(;a.firstChild;)p.appendChild(a.firstChild);a.appendChild(p),d++}c=a.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${i} ${o}${d?` -${d}`:""} ${JSON.stringify(t)}`);let f=n.someProp("clipboardTextSerializer",h=>h(e,n))||e.content.textBetween(0,e.content.size,`
|
|
16
|
+
|
|
17
|
+
`);return{dom:a,text:f}}function wu(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 fe(oe.from(n.state.schema.text(e.replace(/\r\n?/g,`
|
|
18
|
+
`))),0,0):fe.empty;let d=n.someProp("clipboardTextParser",f=>f(e,i,r,n));if(d)l=d;else{let f=i.marks(),{schema:h}=n.state,p=Yt.fromSchema(h);s=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(m=>{let v=s.appendChild(document.createElement("p"));m&&v.appendChild(p.serializeNode(h.text(m,f)))})}}else n.someProp("transformPastedHTML",d=>{t=d(t,n)}),s=Jm(t),qr&&Ym(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")||lr.fromSchema(n.state.schema)).parseSlice(s,{preserveWhitespace:!!(a||u),context:i,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!Km.test(f.parentNode.nodeName)?{ignore:!0}:null}})),u)l=Xm(wl(l,+u[1],+u[2]),u[4]);else if(l=fe.maxOpen(Gm(l.content,i),!0),l.openStart||l.openEnd){let d=0,f=0;for(let h=l.content.firstChild;d<l.openStart&&!h.type.spec.isolating;d++,h=h.firstChild);for(let h=l.content.lastChild;f<l.openEnd&&!h.type.spec.isolating;f++,h=h.lastChild);l=wl(l,d,f)}return n.someProp("transformPasted",d=>{l=d(l,n)}),l}const Km=/^(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 Gm(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&&Au(a,o,l,s[s.length-1],0))s[s.length-1]=c;else{s.length&&(s[s.length-1]=Ou(s[s.length-1],o.length));let u=Tu(l,a);s.push(u),i=i.matchType(u.type),o=a}}),s)return oe.from(s)}return n}function Tu(n,e,t=0){for(let r=e.length-1;r>=t;r--)n=e[r].create(null,oe.from(n));return n}function Au(n,e,t,r,i){if(i<n.length&&i<e.length&&n[i]==e[i]){let o=Au(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(oe.from(Tu(t,n,i+1))))}}function Ou(n,e){if(e==0)return n;let t=n.content.replaceChild(n.childCount-1,Ou(n.lastChild,e-1)),r=n.contentMatchAt(n.childCount).fillBefore(oe.empty,!0);return n.copy(t.append(r))}function Ss(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=Ss(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(oe.empty,!0))),n.replaceChild(e<0?0:n.childCount-1,s.copy(l))}function wl(n,e,t){return e<n.openStart&&(n=new fe(Ss(n.content,-1,e,n.openStart,0,n.openEnd),e,n.openEnd)),t<n.openEnd&&(n=new fe(Ss(n.content,1,t,n.openEnd,0,0),n.openStart,t)),n}const Mu={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 Tl=null;function Nu(){return Tl||(Tl=document.implementation.createHTMLDocument("title"))}function Jm(n){let e=/^(\s*<meta [^>]*>)*/.exec(n);e&&(n=n.slice(e[0].length));let t=Nu().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(n),i;if((i=r&&Mu[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 Ym(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 Xm(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=oe.from(a.create(r[l+1],i)),o++,s++}return new fe(i,o,s)}const at={},lt={},Qm={touchstart:!0,touchmove:!0};class Zm{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 qm(n){for(let e in at){let t=at[e];n.dom.addEventListener(e,n.input.eventHandlers[e]=r=>{eg(n,r)&&!Zs(n,r)&&(n.editable||!(r.type in lt))&&t(n,r)},Qm[e]?{passive:!0}:void 0)}st&&n.dom.addEventListener("input",()=>null),Es(n)}function xn(n,e){n.input.lastSelectionOrigin=e,n.input.lastSelectionTime=Date.now()}function _m(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 Es(n){n.someProp("handleDOMEvents",e=>{for(let t in e)n.input.eventHandlers[t]||n.dom.addEventListener(t,n.input.eventHandlers[t]=r=>Zs(n,r))})}function Zs(n,e){return n.someProp("handleDOMEvents",t=>{let r=t[e.type];return r?r(n,e)||e.defaultPrevented:!1})}function eg(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 tg(n,e){!Zs(n,e)&&at[e.type]&&(n.editable||!(e.type in lt))&&at[e.type](n,e)}lt.keydown=(n,e)=>{let t=e;if(n.input.shiftKey=t.keyCode==16||t.shiftKey,!Ru(n,t)&&(n.input.lastKeyCode=t.keyCode,n.input.lastKeyCodeTime=Date.now(),!(Pt&&tt&&t.keyCode==13)))if(t.keyCode!=229&&n.domObserver.forceFlush(),dr&&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,Rn(13,"Enter"))),n.input.lastIOSEnter=0)},200)}else n.someProp("handleKeyDown",r=>r(n,t))||Wm(n,t)?t.preventDefault():xn(n,"key")};lt.keyup=(n,e)=>{e.keyCode==16&&(n.input.shiftKey=!1)};lt.keypress=(n,e)=>{let t=e;if(Ru(n,t)||!t.charCode||t.ctrlKey&&!t.altKey||At&&t.metaKey)return;if(n.someProp("handleKeyPress",i=>i(n,t))){t.preventDefault();return}let r=n.state.selection;if(!(r instanceof Re)||!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 yo(n){return{left:n.clientX,top:n.clientY}}function ng(n,e){let t=e.x-n.clientX,r=e.y-n.clientY;return t*t+r*r<100}function qs(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 sr(n,e,t){n.focused||n.focus();let r=n.state.tr.setSelection(e);t=="pointer"&&r.setMeta("pointer",!0),n.dispatch(r)}function rg(n,e){if(e==-1)return!1;let t=n.state.doc.resolve(e),r=t.nodeAfter;return r&&r.isAtom&&xe.isSelectable(r)?(sr(n,new xe(t),"pointer"),!0):!1}function ig(n,e){if(e==-1)return!1;let t=n.state.selection,r,i;t instanceof xe&&(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(xe.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?(sr(n,xe.create(n.state.doc,i),"pointer"),!0):!1}function og(n,e,t,r,i){return qs(n,"handleClickOn",e,t,r)||n.someProp("handleClick",o=>o(n,e,r))||(i?ig(n,t):rg(n,t))}function sg(n,e,t,r){return qs(n,"handleDoubleClickOn",e,t,r)||n.someProp("handleDoubleClick",i=>i(n,e,r))}function ag(n,e,t,r){return qs(n,"handleTripleClickOn",e,t,r)||n.someProp("handleTripleClick",i=>i(n,e,r))||lg(n,t,r)}function lg(n,e,t){if(t.button!=0)return!1;let r=n.state.doc;if(e==-1)return r.inlineContent?(sr(n,Re.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)sr(n,Re.create(r,l+1,l+1+s.content.size),"pointer");else if(xe.isSelectable(s))sr(n,xe.create(r,l),"pointer");else continue;return!0}}function _s(n){return Ai(n)}const Iu=At?"metaKey":"ctrlKey";at.mousedown=(n,e)=>{let t=e;n.input.shiftKey=t.shiftKey;let r=_s(n),i=Date.now(),o="singleClick";i-n.input.lastClick.time<500&&ng(t,n.input.lastClick)&&!t[Iu]&&(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(yo(t));s&&(o=="singleClick"?(n.input.mouseDown&&n.input.mouseDown.done(),n.input.mouseDown=new cg(n,s,t,!!r)):(o=="doubleClick"?sg:ag)(n,s.pos,s.inside,t)?t.preventDefault():xn(n,"pointer"))};class cg{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[Iu],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 xe&&c.from<=s&&c.to>s)&&(this.mightDrag={node:o,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&zt&&!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)),xn(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(yo(e))),this.updateAllowDefault(e),this.allowDefault||!t?xn(this.view,"pointer"):og(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||st&&this.mightDrag&&!this.mightDrag.node.isAtom||tt&&!this.view.state.selection.visible&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(sr(this.view,Ie.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):xn(this.view,"pointer")}move(e){this.updateAllowDefault(e),xn(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}at.touchstart=n=>{n.input.lastTouch=Date.now(),_s(n),xn(n,"pointer")};at.touchmove=n=>{n.input.lastTouch=Date.now(),xn(n,"pointer")};at.contextmenu=n=>_s(n);function Ru(n,e){return n.composing?!0:st&&Math.abs(e.timeStamp-n.input.compositionEndedAt)<500?(n.input.compositionEndedAt=-2e8,!0):!1}const ug=Pt?5e3:-1;lt.compositionstart=lt.compositionupdate=n=>{if(!n.composing){n.domObserver.flush();let{state:e}=n,t=e.selection.$from;if(e.selection.empty&&(e.storedMarks||!t.textOffset&&t.parentOffset&&t.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)))n.markCursor=n.state.storedMarks||t.marks(),Ai(n,!0),n.markCursor=null;else if(Ai(n),zt&&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}Du(n,ug)};lt.compositionend=(n,e)=>{n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=e.timeStamp,n.input.compositionPendingChanges=n.domObserver.pendingRecords().length?n.input.compositionID:0,n.input.compositionPendingChanges&&Promise.resolve().then(()=>n.domObserver.flush()),n.input.compositionID++,Du(n,20))};function Du(n,e){clearTimeout(n.input.composingTimeout),e>-1&&(n.input.composingTimeout=setTimeout(()=>Ai(n),e))}function Lu(n){for(n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=dg());n.input.compositionNodes.length>0;)n.input.compositionNodes.pop().markParentsDirty()}function dg(){let n=document.createEvent("Event");return n.initEvent("event",!0,!0),n.timeStamp}function Ai(n,e=!1){if(!(Pt&&n.domObserver.flushingSoon>=0)){if(n.domObserver.forceFlush(),Lu(n),e||n.docView&&n.docView.dirty){let t=Xs(n);return t&&!t.eq(n.state.selection)?n.dispatch(n.state.tr.setSelection(t)):n.updateState(n.state),!0}return!1}}function fg(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 Vr=ft&&Sn<15||dr&&cm<604;at.copy=lt.cut=(n,e)=>{let t=e,r=n.state.selection,i=t.type=="cut";if(r.empty)return;let o=Vr?null:t.clipboardData,s=r.content(),{dom:l,text:a}=ku(n,s);o?(t.preventDefault(),o.clearData(),o.setData("text/html",l.innerHTML),o.setData("text/plain",a)):fg(n,l),i&&n.dispatch(n.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function pg(n){return n.openStart==0&&n.openEnd==0&&n.content.childCount==1?n.content.firstChild:null}function hg(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?$r(n,r.value,null,i,e):$r(n,r.textContent,r.innerHTML,i,e)},50)}function $r(n,e,t,r,i){let o=wu(n,e,t,r,n.state.selection.$from);if(n.someProp("handlePaste",a=>a(n,i,o||fe.empty)))return!0;if(!o)return!1;let s=pg(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 Pu(n){let e=n.getData("text/plain")||n.getData("Text");if(e)return e;let t=n.getData("text/uri-list");return t?t.replace(/\r?\n/g," "):""}lt.paste=(n,e)=>{let t=e;if(n.composing&&!Pt)return;let r=Vr?null:t.clipboardData,i=n.input.shiftKey&&n.input.lastKeyCode!=45;r&&$r(n,Pu(r),r.getData("text/html"),i,t)?t.preventDefault():hg(n,t)};class Fu{constructor(e,t,r){this.slice=e,this.move=t,this.node=r}}const Bu=At?"altKey":"ctrlKey";at.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(yo(t)),s;if(!(o&&o.pos>=i.from&&o.pos<=(i instanceof xe?i.to-1:i.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}=ku(n,l);t.dataTransfer.clearData(),t.dataTransfer.setData(Vr?"Text":"text/html",a.innerHTML),t.dataTransfer.effectAllowed="copyMove",Vr||t.dataTransfer.setData("text/plain",c),n.dragging=new Fu(l,!t[Bu],s)};at.dragend=n=>{let e=n.dragging;window.setTimeout(()=>{n.dragging==e&&(n.dragging=null)},50)};lt.dragover=lt.dragenter=(n,e)=>e.preventDefault();lt.drop=(n,e)=>{let t=e,r=n.dragging;if(n.dragging=null,!t.dataTransfer)return;let i=n.posAtCoords(yo(t));if(!i)return;let o=n.state.doc.resolve(i.pos),s=r&&r.slice;s?n.someProp("transformPasted",p=>{s=p(s,n)}):s=wu(n,Pu(t.dataTransfer),Vr?null:t.dataTransfer.getData("text/html"),!1,o);let l=!!(r&&!t[Bu]);if(n.someProp("handleDrop",p=>p(n,t,s||fe.empty,l))){t.preventDefault();return}if(!s)return;t.preventDefault();let a=s?Gh(n.state.doc,o.pos,s):o.pos;a==null&&(a=o.pos);let c=n.state.tr;if(l){let{node:p}=r;p?p.replace(c):c.deleteSelection()}let u=c.mapping.map(a),d=s.openStart==0&&s.openEnd==0&&s.content.childCount==1,f=c.doc;if(d?c.replaceRangeWith(u,u,s.content.firstChild):c.replaceRange(u,u,s),c.doc.eq(f))return;let h=c.doc.resolve(u);if(d&&xe.isSelectable(s.content.firstChild)&&h.nodeAfter&&h.nodeAfter.sameMarkup(s.content.firstChild))c.setSelection(new xe(h));else{let p=c.mapping.map(a);c.mapping.maps[c.mapping.maps.length-1].forEach((m,v,S,C)=>p=C),c.setSelection(Qs(n,h,c.doc.resolve(p)))}n.focus(),n.dispatch(c.setMeta("uiEvent","drop"))};at.focus=n=>{n.input.lastFocus=Date.now(),n.focused||(n.domObserver.stop(),n.dom.classList.add("ProseMirror-focused"),n.domObserver.start(),n.focused=!0,setTimeout(()=>{n.docView&&n.hasFocus()&&!n.domObserver.currentSelection.eq(n.domSelectionRange())&&ln(n)},20))};at.blur=(n,e)=>{let t=e;n.focused&&(n.domObserver.stop(),n.dom.classList.remove("ProseMirror-focused"),n.domObserver.start(),t.relatedTarget&&n.dom.contains(t.relatedTarget)&&n.domObserver.currentSelection.clear(),n.focused=!1)};at.beforeinput=(n,e)=>{if(tt&&Pt&&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,Rn(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 lt)at[n]=lt[n];function Hr(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 Oi{constructor(e,t){this.toDOM=e,this.spec=t||$n,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 Ot(o-r,o-r,this)}valid(){return!0}eq(e){return this==e||e instanceof Oi&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Hr(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class Cn{constructor(e,t){this.attrs=e,this.spec=t||$n}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 Ot(o,s,this)}valid(e,t){return t.from<t.to}eq(e){return this==e||e instanceof Cn&&Hr(this.attrs,e.attrs)&&Hr(this.spec,e.spec)}static is(e){return e.type instanceof Cn}destroy(){}}class ea{constructor(e,t){this.attrs=e,this.spec=t||$n}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 Ot(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 ea&&Hr(this.attrs,e.attrs)&&Hr(this.spec,e.spec)}destroy(){}}class Ot{constructor(e,t,r){this.from=e,this.to=t,this.type=r}copy(e,t){return new Ot(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 Ot(e,e,new Oi(t,r))}static inline(e,t,r,i){return new Ot(e,t,new Cn(r,i))}static node(e,t,r,i){return new Ot(e,t,new ea(r,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof Cn}get widget(){return this.type instanceof Oi}}const _n=[],$n={};class We{constructor(e,t){this.local=e.length?e:_n,this.children=t.length?t:_n}static create(e,t){return t.length?Mi(t,e,0,$n):et}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==et||e.maps.length==0?this:this.mapInner(e,t,0,0,r||$n)}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?mg(this.children,s||[],e,t,r,i,o):s?new We(s.sort(Hn),_n):et}add(e,t){return t.length?this==et?We.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=Vu(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,Mi(u,l,c+1,$n)),o+=3}});let s=zu(o?$u(t):t,-r);for(let l=0;l<s.length;l++)s[l].type.valid(e,s[l])||s.splice(l--,1);return new We(s.length?this.local.concat(s).sort(Hn):this.local,i||this.children)}remove(e){return e.length==0||this==et?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!=et?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 We(i,r):et}forChild(e,t){if(this==et)return this;if(t.isLeaf)return We.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 Cn){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 We(i.sort(Hn),_n);return r?new gn([l,r]):l}return r||et}eq(e){if(this==e)return!0;if(!(e instanceof We)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let t=0;t<this.local.length;t++)if(!this.local[t].eq(e.local[t]))return!1;for(let t=0;t<this.children.length;t+=3)if(this.children[t]!=e.children[t]||this.children[t+1]!=e.children[t+1]||!this.children[t+2].eq(e.children[t+2]))return!1;return!0}locals(e){return ta(this.localsInner(e))}localsInner(e){if(this==et)return _n;if(e.inlineContent||!this.local.some(Cn.is))return this.local;let t=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof Cn||t.push(this.local[r]);return t}}We.empty=new We([],[]);We.removeOverlap=ta;const et=We.empty;class gn{constructor(e){this.members=e}map(e,t){const r=this.members.map(i=>i.map(e,t,$n));return gn.from(r)}forChild(e,t){if(t.isLeaf)return We.empty;let r=[];for(let i=0;i<this.members.length;i++){let o=this.members[i].forChild(e,t);o!=et&&(o instanceof gn?r=r.concat(o.members):r.push(o))}return gn.from(r)}eq(e){if(!(e instanceof gn)||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?ta(r?t:t.sort(Hn)):_n}static from(e){switch(e.length){case 0:return et;case 1:return e[0];default:return new gn(e.every(t=>t instanceof We)?e:e.reduce((t,r)=>t.concat(r instanceof We?r:r.members),[]))}}}function mg(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,h,p,m)=>{let v=m-p-(h-f);for(let S=0;S<l.length;S+=3){let C=l[S+1];if(C<0||f>C+u-d)continue;let k=l[S]+u-d;h>=k?l[S+1]=f<=k?-2:-1:p>=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),h=f-i,{index:p,offset:m}=r.content.findIndex(d),v=r.maybeChild(p);if(v&&m==d&&m+v.nodeSize==h){let S=l[c+2].mapInner(t,v,u+1,n[c]+o+1,s);S!=et?(l[c]=d,l[c+1]=h,l[c+2]=S):(l[c+1]=-2,a=!0)}else a=!0}if(a){let c=gg(l,n,e,t,i,o,s),u=Mi(c,r,0,s);e=u.local;for(let d=0;d<l.length;d+=3)l[d+1]<0&&(l.splice(d,3),d-=3);for(let d=0,f=0;d<u.children.length;d+=3){let h=u.children[d];for(;f<l.length&&l[f]<h;)f+=3;l.splice(f,0,u.children[d],u.children[d+1],u.children[d+2])}}return new We(e.sort(Hn),l)}function zu(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 Ot(i.from+e,i.to+e,i.type))}return t}function gg(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 Vu(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 $u(n){let e=[];for(let t=0;t<n.length;t++)n[t]!=null&&e.push(n[t]);return e}function Mi(n,e,t,r){let i=[],o=!1;e.forEach((l,a)=>{let c=Vu(n,l,a+t);if(c){o=!0;let u=Mi(c,l,t+a+1,r);u!=et&&i.push(a,a+l.nodeSize,u)}});let s=zu(o?$u(n):n,-t).sort(Hn);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 We(s,i):et}function Hn(n,e){return n.from-e.from||n.to-e.to}function ta(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),Al(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),Al(e,i,r.copy(o.from,r.to)));break}}}return e}function Al(n,e,t){for(;e<n.length&&Hn(t,n[e])>0;)e++;n.splice(e,0,t)}function jo(n){let e=[];return n.someProp("decorations",t=>{let r=t(n.state);r&&r!=et&&e.push(r)}),n.cursorWrapper&&e.push(We.create(n.state.doc,[n.cursorWrapper.deco])),gn.from(e)}const vg={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},yg=ft&&Sn<=11;class bg{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class xg{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new bg,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]);ft&&Sn<=11&&r.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),yg&&(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,vg)),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(bl(this.view)){if(this.suppressingSelectionUpdates)return ln(this.view);if(ft&&Sn<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&Wn(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=zr(o))t.add(o);for(let o=e.anchorNode;o;o=zr(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)&&bl(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(zt&&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&&go(r)&&(c=Xs(e))&&c.eq(Ie.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,ln(e),this.currentSelection.set(r),e.scrollToSelection()):(o>-1||i)&&(o>-1&&(e.docView.markDirty(o,s),Sg(e)),this.handleDOMChange(o,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 i=e.previousSibling,o=e.nextSibling;if(ft&&Sn<=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?ot(i)+1:0,l=r.localPosFromDOM(e.target,s,-1),a=o&&o.parentNode==e.target?ot(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 Ol=new WeakMap,Ml=!1;function Sg(n){if(!Ol.has(n)&&(Ol.set(n,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(n.dom).whiteSpace)!==-1)){if(n.requiresGeckoHackNode=zt,Ml)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."),Ml=!0}}function Eg(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 Wn(l.node,l.offset,o,s)&&([r,i,o,s]=[o,s,r,i]),{anchorNode:r,anchorOffset:i,focusNode:o,focusOffset:s}}function Cg(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}],go(a)||c.push({node:a.focusNode,offset:a.focusOffset})),tt&&n.input.lastKeyCode===8)for(let v=o;v>i;v--){let S=r.childNodes[v-1],C=S.pmViewDesc;if(S.nodeName=="BR"&&!C){o=v;break}if(!C||C.size)break}let d=n.state.doc,f=n.someProp("domParser")||lr.fromSchema(n.state.schema),h=d.resolve(s),p=null,m=f.parse(r,{topNode:h.parent,topMatch:h.parent.contentMatchAt(h.index()),topOpen:!0,from:i,to:o,preserveWhitespace:h.parent.type.whitespace=="pre"?"full":!0,findPositions:c,ruleFromNode:kg,context:h});if(c&&c[0].pos!=null){let v=c[0].pos,S=c[1]&&c[1].pos;S==null&&(S=v),p={anchor:v+s,head:S+s}}return{doc:m,sel:p,from:s,to:l}}function kg(n){let e=n.pmViewDesc;if(e)return e.parseRule();if(n.nodeName=="BR"&&n.parentNode){if(st&&/^(ul|ol)$/i.test(n.parentNode.nodeName)){let t=document.createElement("div");return t.appendChild(document.createElement("li")),{skip:t}}else if(n.parentNode.lastChild==n||st&&/^(tr|table)$/i.test(n.parentNode.nodeName))return{ignore:!0}}else if(n.nodeName=="IMG"&&n.getAttribute("mark-placeholder"))return{ignore:!0};return null}const wg=/^(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 Tg(n,e,t,r,i){let o=n.input.compositionPendingChanges||(n.composing?n.input.compositionID:0);if(n.input.compositionPendingChanges=0,e<0){let $=n.input.lastSelectionTime>Date.now()-50?n.input.lastSelectionOrigin:null,z=Xs(n,$);if(z&&!n.state.selection.eq(z)){if(tt&&Pt&&n.input.lastKeyCode===13&&Date.now()-100<n.input.lastKeyCodeTime&&n.someProp("handleKeyDown",P=>P(n,Rn(13,"Enter"))))return;let F=n.state.tr.setSelection(z);$=="pointer"?F.setMeta("pointer",!0):$=="key"&&F.scrollIntoView(),o&&F.setMeta("composition",o),n.dispatch(F)}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=Cg(n,e,t),u=n.state.doc,d=u.slice(c.from,c.to),f,h;n.input.lastKeyCode===8&&Date.now()-100<n.input.lastKeyCodeTime?(f=n.state.selection.to,h="end"):(f=n.state.selection.from,h="start"),n.input.lastKeyCode=null;let p=Mg(d.content,c.doc.content,c.from,f,h);if((dr&&n.input.lastIOSEnter>Date.now()-225||Pt)&&i.some($=>$.nodeType==1&&!wg.test($.nodeName))&&(!p||p.endA>=p.endB)&&n.someProp("handleKeyDown",$=>$(n,Rn(13,"Enter")))){n.input.lastIOSEnter=0;return}if(!p)if(r&&a instanceof Re&&!a.empty&&a.$head.sameParent(a.$anchor)&&!n.composing&&!(c.sel&&c.sel.anchor!=c.sel.head))p={start:a.from,endA:a.to,endB:a.to};else{if(c.sel){let $=Nl(n,n.state.doc,c.sel);if($&&!$.eq(n.state.selection)){let z=n.state.tr.setSelection($);o&&z.setMeta("composition",o),n.dispatch(z)}}return}if(tt&&n.cursorWrapper&&c.sel&&c.sel.anchor==n.cursorWrapper.deco.from&&c.sel.head==c.sel.anchor){let $=p.endB-p.start;c.sel={anchor:c.sel.anchor+$,head:c.sel.anchor+$}}n.input.domChangeCount++,n.state.selection.from<n.state.selection.to&&p.start==p.endB&&n.state.selection instanceof Re&&(p.start>n.state.selection.from&&p.start<=n.state.selection.from+2&&n.state.selection.from>=c.from?p.start=n.state.selection.from:p.endA<n.state.selection.to&&p.endA>=n.state.selection.to-2&&n.state.selection.to<=c.to&&(p.endB+=n.state.selection.to-p.endA,p.endA=n.state.selection.to)),ft&&Sn<=11&&p.endB==p.start+1&&p.endA==p.start&&p.start>c.from&&c.doc.textBetween(p.start-c.from-1,p.start-c.from+1)==" "&&(p.start--,p.endA--,p.endB--);let m=c.doc.resolveNoCache(p.start-c.from),v=c.doc.resolveNoCache(p.endB-c.from),S=u.resolve(p.start),C=m.sameParent(v)&&m.parent.inlineContent&&S.end()>=p.endA,k;if((dr&&n.input.lastIOSEnter>Date.now()-225&&(!C||i.some($=>$.nodeName=="DIV"||$.nodeName=="P"))||!C&&m.pos<c.doc.content.size&&!m.sameParent(v)&&(k=Ie.findFrom(c.doc.resolve(m.pos+1),1,!0))&&k.head==v.pos)&&n.someProp("handleKeyDown",$=>$(n,Rn(13,"Enter")))){n.input.lastIOSEnter=0;return}if(n.state.selection.anchor>p.start&&Og(u,p.start,p.endA,m,v)&&n.someProp("handleKeyDown",$=>$(n,Rn(8,"Backspace")))){Pt&&tt&&n.domObserver.suppressSelectionUpdates();return}tt&&Pt&&p.endB==p.start&&(n.input.lastAndroidDelete=Date.now()),Pt&&!C&&m.start()!=v.start()&&v.parentOffset==0&&m.depth==v.depth&&c.sel&&c.sel.anchor==c.sel.head&&c.sel.head==p.endA&&(p.endB-=2,v=c.doc.resolveNoCache(p.endB-c.from),setTimeout(()=>{n.someProp("handleKeyDown",function($){return $(n,Rn(13,"Enter"))})},20));let b=p.start,R=p.endA,w,B,V;if(C){if(m.pos==v.pos)ft&&Sn<=11&&m.parentOffset==0&&(n.domObserver.suppressSelectionUpdates(),setTimeout(()=>ln(n),20)),w=n.state.tr.delete(b,R),B=u.resolve(p.start).marksAcross(u.resolve(p.endA));else if(p.endA==p.endB&&(V=Ag(m.parent.content.cut(m.parentOffset,v.parentOffset),S.parent.content.cut(S.parentOffset,p.endA-S.start()))))w=n.state.tr,V.type=="add"?w.addMark(b,R,V.mark):w.removeMark(b,R,V.mark);else if(m.parent.child(m.index()).isText&&m.index()==v.index()-(v.textOffset?0:1)){let $=m.parent.textBetween(m.parentOffset,v.parentOffset);if(n.someProp("handleTextInput",z=>z(n,b,R,$)))return;w=n.state.tr.insertText($,b,R)}}if(w||(w=n.state.tr.replace(b,R,c.doc.slice(p.start-c.from,p.endB-c.from))),c.sel){let $=Nl(n,w.doc,c.sel);$&&!(tt&&Pt&&n.composing&&$.empty&&(p.start!=p.endB||n.input.lastAndroidDelete<Date.now()-100)&&($.head==b||$.head==w.mapping.map(R)-1)||ft&&$.empty&&$.head==b)&&w.setSelection($)}B&&w.ensureMarks(B),o&&w.setMeta("composition",o),n.dispatch(w.scrollIntoView())}function Nl(n,e,t){return Math.max(t.anchor,t.head)>e.content.size?null:Qs(n,e.resolve(t.anchor),e.resolve(t.head))}function Ag(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(oe.from(c).eq(n))return{mark:l,type:s}}function Og(n,e,t,r,i){if(!r.parent.isTextblock||t-e<=i.pos-r.pos||Wo(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(Wo(o,!0,!0));return!s.parent.isTextblock||s.pos>t||Wo(s,!0,!1)<t?!1:r.parent.content.cut(r.parentOffset).eq(s.parent.content)}function Wo(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 Mg(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&&Il(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&&Il(n.textBetween(o-1,o+1))&&(o+=a?1:-1),s=o+(s-l),l=o}return{start:o,endA:s,endB:l}}function Il(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 Ng{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 Zm,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(Fl),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=Ll(this),Dl(this),this.nodeViews=Pl(this),this.docView=pl(this.state.doc,Rl(this),jo(this),this.dom,this),this.domObserver=new xg(this,(r,i,o,s)=>Tg(this,r,i,o,s)),this.domObserver.start(),qm(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&&Es(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(Fl),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&&(Lu(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 h=Pl(this);Rg(h,this.nodeViews)&&(this.nodeViews=h,o=!0)}(l||t.handleDOMEvents!=this._props.handleDOMEvents)&&Es(this),this.editable=Ll(this),Dl(this);let a=jo(this),c=Rl(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&&fm(this);if(s){this.domObserver.stop();let h=d&&(ft||tt)&&!this.composing&&!i.selection.empty&&!e.selection.empty&&Ig(i.selection,e.selection);if(d){let p=tt?this.trackWrites=this.domSelectionRange().focusNode:null;(o||!this.docView.update(e.doc,c,a,this))&&(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=pl(e.doc,c,a,this.dom,this)),p&&!this.trackWrites&&(h=!0)}h||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&Bm(this))?ln(this,h):(Su(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&&pm(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&&al(this,t.getBoundingClientRect(),e)}else al(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 Fu(e.slice,e.move,i<0?void 0:xe.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(ft){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&&hm(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 bm(this,e)}coordsAtPos(e,t=1){return pu(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 km(this,t||this.state,e)}pasteHTML(e,t){return $r(this,"",e,!1,t||new ClipboardEvent("paste"))}pasteText(e,t){return $r(this,e,null,!0,t||new ClipboardEvent("paste"))}destroy(){this.docView&&(_m(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],jo(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 tg(this,e)}dispatch(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))}domSelectionRange(){return st&&this.root.nodeType===11&&om(this.dom.ownerDocument)==this.dom?Eg(this):this.domSelection()}domSelection(){return this.root.getSelection()}}function Rl(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"),[Ot.node(0,n.state.doc.content.size,e)]}function Dl(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:Ot.widget(n.state.selection.head,e,{raw:!0,marks:n.markCursor})}}else n.cursorWrapper=null}function Ll(n){return!n.someProp("editable",e=>e(n.state)===!1)}function Ig(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 Pl(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 Rg(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 Fl(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 kn={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:"'"},Ni={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Dg=typeof navigator<"u"&&/Mac/.test(navigator.platform),Lg=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Ze=0;Ze<10;Ze++)kn[48+Ze]=kn[96+Ze]=String(Ze);for(var Ze=1;Ze<=24;Ze++)kn[Ze+111]="F"+Ze;for(var Ze=65;Ze<=90;Ze++)kn[Ze]=String.fromCharCode(Ze+32),Ni[Ze]=String.fromCharCode(Ze);for(var Ko in kn)Ni.hasOwnProperty(Ko)||(Ni[Ko]=kn[Ko]);function Pg(n){var e=Dg&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||Lg&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?Ni:kn)[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 Fg=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function Bg(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))Fg?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 zg(n){let e=Object.create(null);for(let t in n)e[Bg(t)]=n[t];return e}function Go(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 Vg(n){return new mt({props:{handleKeyDown:$g(n)}})}function $g(n){let e=zg(n);return function(t,r){let i=Pg(r),o,s=e[Go(i,r)];if(s&&s(t.state,t.dispatch,t))return!0;if(i.length==1&&i!=" "){if(r.shiftKey){let l=e[Go(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=kn[r.keyCode])&&o!=i){let l=e[Go(o,r)];if(l&&l(t.state,t.dispatch,t))return!0}}return!1}}const Hg=(n,e)=>n.selection.empty?!1:(e&&e(n.tr.deleteSelection().scrollIntoView()),!0);function Ug(n,e){let{$cursor:t}=n.selection;return!t||(e?!e.endOfTextblock("backward",n):t.parentOffset>0)?null:t}const jg=(n,e,t)=>{let r=Ug(n,t);if(!r)return!1;let i=Hu(r);if(!i){let s=r.blockRange(),l=s&&yr(s);return l==null?!1:(e&&e(n.tr.lift(s,l).scrollIntoView()),!0)}let o=i.nodeBefore;if(!o.type.spec.isolating&&Wu(n,i,e))return!0;if(r.parent.content.size==0&&(fr(o,"end")||xe.isSelectable(o))){let s=Ks(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(fr(o,"end")?Ie.findFrom(l.doc.resolve(l.mapping.map(i.pos,-1)),-1):xe.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 fr(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 Wg=(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=Hu(r)}let s=o&&o.nodeBefore;return!s||!xe.isSelectable(s)?!1:(e&&e(n.tr.setSelection(xe.create(n.doc,o.pos-s.nodeSize)).scrollIntoView()),!0)};function Hu(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 Kg(n,e){let{$cursor:t}=n.selection;return!t||(e?!e.endOfTextblock("forward",n):t.parentOffset<t.parent.content.size)?null:t}const Gg=(n,e,t)=>{let r=Kg(n,t);if(!r)return!1;let i=Uu(r);if(!i)return!1;let o=i.nodeAfter;if(Wu(n,i,e))return!0;if(r.parent.content.size==0&&(fr(o,"start")||xe.isSelectable(o))){let s=Ks(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(fr(o,"start")?Ie.findFrom(l.doc.resolve(l.mapping.map(i.pos)),1):xe.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},Jg=(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=Uu(r)}let s=o&&o.nodeAfter;return!s||!xe.isSelectable(s)?!1:(e&&e(n.tr.setSelection(xe.create(n.doc,o.pos)).scrollIntoView()),!0)};function Uu(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 Yg=(n,e)=>{let t=n.selection,r=t instanceof xe,i;if(r){if(t.node.isTextblock||!wn(n.doc,t.from))return!1;i=t.from}else if(i=ho(n.doc,t.from,-1),i==null)return!1;if(e){let o=n.tr.join(i);r&&o.setSelection(xe.create(o.doc,i-n.doc.resolve(i).nodeBefore.nodeSize)),e(o.scrollIntoView())}return!0},Xg=(n,e)=>{let t=n.selection,r;if(t instanceof xe){if(t.node.isTextblock||!wn(n.doc,t.to))return!1;r=t.to}else if(r=ho(n.doc,t.to,1),r==null)return!1;return e&&e(n.tr.join(r).scrollIntoView()),!0},Qg=(n,e)=>{let{$from:t,$to:r}=n.selection,i=t.blockRange(r),o=i&&yr(i);return o==null?!1:(e&&e(n.tr.lift(i,o).scrollIntoView()),!0)},Zg=(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 ju(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 qg=(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=ju(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(Ie.near(a.doc.resolve(l),1)),e(a.scrollIntoView())}return!0},_g=(n,e)=>{let t=n.selection,{$from:r,$to:i}=t;if(t instanceof Ft||r.parent.inlineContent||i.parent.inlineContent)return!1;let o=ju(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(Re.create(l.doc,s+1)),e(l.scrollIntoView())}return!0},e1=(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(ir(n.doc,o))return e&&e(n.tr.split(o).scrollIntoView()),!0}let r=t.blockRange(),i=r&&yr(r);return i==null?!1:(e&&e(n.tr.lift(r,i).scrollIntoView()),!0)},t1=(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(xe.create(n.doc,i))),!0)};function n1(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||wn(n.doc,e.pos))?!1:(t&&t(n.tr.clearIncompatible(e.pos,r.type,r.contentMatchAt(r.childCount)).join(e.pos).scrollIntoView()),!0)}function Wu(n,e,t){let r=e.nodeBefore,i=e.nodeAfter,o,s;if(r.type.spec.isolating||i.type.spec.isolating)return!1;if(n1(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=oe.empty;for(let m=o.length-1;m>=0;m--)f=oe.from(o[m].create(null,f));f=oe.from(r.copy(f));let h=n.tr.step(new Ge(e.pos-1,d,e.pos,d,new fe(f,1,0),o.length,!0)),p=d+2*o.length;wn(h.doc,p)&&h.join(p),t(h.scrollIntoView())}return!0}let a=Ie.findFrom(e,1),c=a&&a.$from.blockRange(a.$to),u=c&&yr(c);if(u!=null&&u>=e.depth)return t&&t(n.tr.lift(c,u).scrollIntoView()),!0;if(l&&fr(i,"start",!0)&&fr(r,"end")){let d=r,f=[];for(;f.push(d),!d.isTextblock;)d=d.lastChild;let h=i,p=1;for(;!h.isTextblock;h=h.firstChild)p++;if(d.canReplace(d.childCount,d.childCount,h.content)){if(t){let m=oe.empty;for(let S=f.length-1;S>=0;S--)m=oe.from(f[S].copy(m));let v=n.tr.step(new Ge(e.pos-f.length,e.pos+i.nodeSize,e.pos+p,e.pos+i.nodeSize-p,new fe(m,f.length,0),0,!0));t(v.scrollIntoView())}return!0}}return!1}function Ku(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(Re.create(e.doc,n<0?i.start(o):i.end(o)))),!0):!1}}const r1=Ku(-1),i1=Ku(1);function o1(n,e=null){return function(t,r){let{$from:i,$to:o}=t.selection,s=i.blockRange(o),l=s&&Ws(s,n,e);return l?(r&&r(t.tr.wrap(s,l).scrollIntoView()),!0):!1}}function Bl(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 s1(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 Ei(u,u,s.depth),s.endIndex<s.parent.childCount&&(s=new Ei(i,t.doc.resolve(o.end(s.depth)),s.depth)),l=!0}let c=Ws(a,n,e,s);return c?(r&&r(a1(t.tr,s,c,l,n).scrollIntoView()),!0):!1}}function a1(n,e,t,r,i){let o=oe.empty;for(let u=t.length-1;u>=0;u--)o=oe.from(t[u].type.create(t[u].attrs,o));n.step(new Ge(e.start-(r?2:0),e.end,e.start,e.end,new fe(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&&ir(n.doc,a,l)&&(n.split(a,l),a+=2*l),a+=c.child(u).nodeSize;return n}function l1(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?c1(e,t,n,o):u1(e,t,o):!0:!1}}function c1(n,e,t,r){let i=n.tr,o=r.end,s=r.$to.end(r.depth);o<s&&(i.step(new Ge(o-1,s,o,s,new fe(oe.from(t.create(null,r.parent.copy())),1,0),1,!0)),r=new Ei(i.doc.resolve(r.$from.pos),i.doc.resolve(s),r.depth));const l=yr(r);if(l==null)return!1;i.lift(r,l);let a=i.mapping.map(o,-1)-1;return wn(i.doc,a)&&i.join(a),e(i.scrollIntoView()),!0}function u1(n,e,t){let r=n.tr,i=t.parent;for(let h=t.end,p=t.endIndex-1,m=t.startIndex;p>m;p--)h-=i.child(p).nodeSize,r.delete(h-1,h+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?oe.empty:oe.from(i))))return!1;let d=o.pos,f=d+s.nodeSize;return r.step(new Ge(d-(l?1:0),f+(a?1:0),d+1,f-1,new fe((l?oe.empty:oe.from(i.copy(oe.empty))).append(a?oe.empty:oe.from(i.copy(oe.empty))),l?0:1,a?0:1),l?0:1)),e(r.scrollIntoView()),!0}function d1(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=oe.from(c?n.create():null),d=new fe(oe.from(n.create(null,oe.from(l.type.create(null,u)))),c?3:1,0),f=o.start,h=o.end;t(e.tr.step(new Ge(f-(c?3:1),h,f,h,d,1,!0)).scrollIntoView())}return!0}}function bo(n){const{state:e,transaction:t}=n;let{selection:r}=t,{doc: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 xo{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,h])=>[f,(...m)=>{const v=this.buildProps(c,t),S=h(...m)(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:bo({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 f1{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 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 So(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 Gu(n){const e=[],{nodeExtensions:t,markExtensions:r}=So(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=he(s,"addGlobalAttributes",l);if(!a)return;a().forEach(u=>{u.types.forEach(d=>{Object.entries(u.attributes).forEach(([f,h])=>{e.push({type:d,name:f,attribute:{...o,...h}})})})})}),i.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={...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 ct(...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 Cs(n,e){return e.filter(t=>t.attribute.rendered).map(t=>t.attribute.renderHTML?t.attribute.renderHTML(n.attrs)||{}:{[t.name]:n.attrs[t.name]}).reduce((t,r)=>ct(t,r),{})}function Ju(n){return typeof n=="function"}function Ne(n,e=void 0,...t){return Ju(n)?e?n.bind(e)(...t):n(...t):n}function p1(n={}){return Object.keys(n).length===0&&n.constructor===Object}function h1(n){return typeof n!="string"?n:n.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(n):n==="true"?!0:n==="false"?!1:n}function zl(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):h1(t.getAttribute(s.name));return l==null?o:{...o,[s.name]:l}},{});return{...r,...i}}}}function Vl(n){return Object.fromEntries(Object.entries(n).filter(([e,t])=>e==="attrs"&&p1(t)?!1:t!=null))}function m1(n,e){var t;const r=Gu(n),{nodeExtensions:i,markExtensions:o}=So(n),s=(t=i.find(c=>he(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,C)=>{const k=he(C,"extendNodeSchema",d);return{...S,...k?k(c):{}}},{}),h=Vl({...f,content:Ne(he(c,"content",d)),marks:Ne(he(c,"marks",d)),group:Ne(he(c,"group",d)),inline:Ne(he(c,"inline",d)),atom:Ne(he(c,"atom",d)),selectable:Ne(he(c,"selectable",d)),draggable:Ne(he(c,"draggable",d)),code:Ne(he(c,"code",d)),defining:Ne(he(c,"defining",d)),isolating:Ne(he(c,"isolating",d)),attrs:Object.fromEntries(u.map(S=>{var C;return[S.name,{default:(C=S==null?void 0:S.attribute)===null||C===void 0?void 0:C.default}]}))}),p=Ne(he(c,"parseHTML",d));p&&(h.parseDOM=p.map(S=>zl(S,u)));const m=he(c,"renderHTML",d);m&&(h.toDOM=S=>m({node:S,HTMLAttributes:Cs(S,u)}));const v=he(c,"renderText",d);return v&&(h.toText=v),[c.name,h]})),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 C=he(S,"extendMarkSchema",d);return{...v,...C?C(c):{}}},{}),h=Vl({...f,inclusive:Ne(he(c,"inclusive",d)),excludes:Ne(he(c,"excludes",d)),group:Ne(he(c,"group",d)),spanning:Ne(he(c,"spanning",d)),code:Ne(he(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}]}))}),p=Ne(he(c,"parseHTML",d));p&&(h.parseDOM=p.map(v=>zl(v,u)));const m=he(c,"renderHTML",d);return m&&(h.toDOM=v=>m({mark:v,HTMLAttributes:Cs(v,u)})),[c.name,h]}));return new Ch({topNode:s,nodes:l,marks:a})}function Jo(n,e){return e.nodes[n]||e.marks[n]||null}function $l(n,e){return Array.isArray(e)?e.some(t=>(typeof t=="string"?t:t.name)===n.name):e}const g1=(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 na(n){return Object.prototype.toString.call(n)==="[object RegExp]"}class Yu{constructor(e){this.find=e.find,this.handler=e.handler}}const v1=(n,e)=>{if(na(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 Yo(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=g1(c)+o;return s.forEach(f=>{if(u)return;const h=v1(d,f.find);if(!h)return;const p=a.state.tr,m=bo({state:a.state,transaction:p}),v={from:r-(h[0].length-o.length),to:i},{commands:S,chain:C,can:k}=new xo({editor:t,state:m});f.handler({state:m,range:v,match:h,commands:S,chain:C,can:k})===null||!p.steps.length||(p.setMeta(l,{transform:p,from:r,to:i,text:o}),a.dispatch(p),u=!0)}),u}function y1(n){const{editor:e,rules:t}=n,r=new mt({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 Yo({editor:e,from:o,to:s,text:l,rules:t,plugin:r})},handleDOMEvents:{compositionend:i=>(setTimeout(()=>{const{$cursor:o}=i.state.selection;o&&Yo({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?Yo({editor:e,from:s.pos,to:s.pos,text:`
|
|
20
|
+
`,rules:t,plugin:r}):!1}},isInputRules:!0});return r}function b1(n){return typeof n=="number"}class x1{constructor(e){this.find=e.find,this.handler=e.handler}}const S1=(n,e)=>{if(na(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 E1(n){const{editor:e,state:t,from:r,to:i,rule:o,pasteEvent:s,dropEvent:l}=n,{commands:a,chain:c,can:u}=new xo({editor:e,state:t}),d=[];return t.doc.nodesBetween(r,i,(h,p)=>{if(!h.isTextblock||h.type.spec.code)return;const m=Math.max(r,p),v=Math.min(i,p+h.content.size),S=h.textBetween(m-p,v-p,void 0,"");S1(S,o.find).forEach(k=>{if(k.index===void 0)return;const b=m+k.index+1,R=b+k[0].length,w={from:t.tr.mapping.map(b),to:t.tr.mapping.map(R)},B=o.handler({state:t,range:w,match:k,commands:a,chain:c,can:u,pasteEvent:s,dropEvent:l});d.push(B)})}),d.every(h=>h!==null)}function C1(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 mt({view(u){const d=f=>{var h;r=!((h=u.dom.parentElement)===null||h===void 0)&&h.contains(f.target)?u.dom.parentElement:null};return window.addEventListener("dragstart",d),{destroy(){window.removeEventListener("dragstart",d)}}},props:{handleDOMEvents:{drop:(u,d)=>(o=r===u.dom.parentElement,l=d,!1),paste:(u,d)=>{var f;const h=(f=d.clipboardData)===null||f===void 0?void 0:f.getData("text/html");return s=d,i=!!(h!=null&&h.includes("data-pm-slice")),!1}}},appendTransaction:(u,d,f)=>{const h=u[0],p=h.getMeta("uiEvent")==="paste"&&!i,m=h.getMeta("uiEvent")==="drop"&&!o;if(!p&&!m)return;const v=d.doc.content.findDiffStart(f.doc.content),S=d.doc.content.findDiffEnd(f.doc.content);if(!b1(v)||!S||v===S.b)return;const C=f.tr,k=bo({state:f,transaction:C});if(!(!E1({editor:e,state:k,from:Math.max(v-1,0),to:S.b-1,rule:c,pasteEvent:s,dropEvent:l})||!C.steps.length))return l=new DragEvent("drop"),s=new ClipboardEvent("paste"),C}}))}function k1(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=m1(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:Jo(r.name,this.schema)};r.type==="mark"&&(!((i=Ne(he(r,"keepOnSplit",o)))!==null&&i!==void 0)||i)&&this.splittableMarks.push(r.name);const s=he(r,"onBeforeCreate",o);s&&this.editor.on("beforeCreate",s);const l=he(r,"onCreate",o);l&&this.editor.on("create",l);const a=he(r,"onUpdate",o);a&&this.editor.on("update",a);const c=he(r,"onSelectionUpdate",o);c&&this.editor.on("selectionUpdate",c);const u=he(r,"onTransaction",o);u&&this.editor.on("transaction",u);const d=he(r,"onFocus",o);d&&this.editor.on("focus",d);const f=he(r,"onBlur",o);f&&this.editor.on("blur",f);const h=he(r,"onDestroy",o);h&&this.editor.on("destroy",h)})}static resolve(e){const t=rr.sort(rr.flatten(e)),r=k1(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=he(t,"addExtensions",r);return i?[t,...this.flatten(i())]:t}).flat(10)}static sort(e){return e.sort((r,i)=>{const o=he(r,"priority")||100,s=he(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:Jo(t.name,this.schema)},i=he(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:Jo(s.name,this.schema)},a=[],c=he(s,"addKeyboardShortcuts",l);let u={};if(s.type==="mark"&&s.config.exitable&&(u.ArrowRight=()=>qt.handleExit({editor:e,mark:s})),c){const m=Object.fromEntries(Object.entries(c()).map(([v,S])=>[v,()=>S({editor:e})]));u={...u,...m}}const d=Vg(u);a.push(d);const f=he(s,"addInputRules",l);$l(s,e.options.enableInputRules)&&f&&r.push(...f());const h=he(s,"addPasteRules",l);$l(s,e.options.enablePasteRules)&&h&&i.push(...h());const p=he(s,"addProseMirrorPlugins",l);if(p){const m=p();a.push(...m)}return a}).flat();return[y1({editor:e,rules:r}),...C1({editor:e,rules:i}),...o]}get attributes(){return Gu(this.extensions)}get nodeViews(){const{editor:e}=this,{nodeExtensions:t}=So(this.extensions);return Object.fromEntries(t.filter(r=>!!he(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=he(r,"addNodeView",o);if(!s)return[];const l=(a,c,u,d)=>{const f=Cs(a,i);return s()({editor:e,node:a,getPos:u,decorations:d,HTMLAttributes:f,extension:r})};return[r.name,l]}))}}function w1(n){return Object.prototype.toString.call(n).slice(8,-1)}function Xo(n){return w1(n)!=="Object"?!1:n.constructor===Object&&Object.getPrototypeOf(n)===Object.prototype}function Eo(n,e){const t={...n};return Xo(n)&&Xo(e)&&Object.keys(e).forEach(r=>{Xo(e[r])?r in n?t[r]=Eo(n[r],e[r]):Object.assign(t,{[r]:e[r]}):Object.assign(t,{[r]:e[r]})}),t}class Nt{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=Ne(he(this,"addOptions",{name:this.name}))),this.storage=Ne(he(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new Nt(e)}configure(e={}){const t=this.extend();return t.options=Eo(this.options,e),t.storage=Ne(he(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){const t=new Nt(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=Ne(he(t,"addOptions",{name:t.name})),t.storage=Ne(he(t,"addStorage",{name:t.name,options:t.options})),t}}function Xu(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 h;const p=s==null?void 0:s[c.type.name];p?(c.isBlock&&!a&&(l+=o,a=!0),d&&(l+=p({node:c,pos:u,parent:d,index:f,range:e}))):c.isText?(l+=(h=c==null?void 0:c.text)===null||h===void 0?void 0:h.slice(Math.max(r,u)-u,i-u),a=!1):c.isBlock&&!a&&(l+=o,a=!0)}),l}function Qu(n){return Object.fromEntries(Object.entries(n.nodes).filter(([,e])=>e.spec.toText).map(([e,t])=>[e,t.spec.toText]))}const T1=Nt.create({name:"clipboardTextSerializer",addProseMirrorPlugins(){return[new mt({key:new $t("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=Qu(t);return Xu(r,{from:s,to:l},{textSerializers:a})}}})]}}),A1=()=>({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),O1=(n=!1)=>({commands:e})=>e.setContent("",n),M1=()=>({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)),h=d.blockRange(f);if(!h)return;const p=yr(h);if(l.type.isTextblock){const{defaultType:m}=d.parent.contentMatchAt(d.index());e.setNodeMarkup(h.start,m)}(p||p===0)&&e.lift(h,p)})}),!0},N1=n=>e=>n(e),I1=()=>({state:n,dispatch:e})=>_g(n,e),R1=(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 Re(r.doc.resolve(s-1))),!0},D1=()=>({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},L1=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},P1=n=>({tr:e,dispatch:t})=>{const{from:r,to:i}=n;return t&&e.delete(r,i),!0},F1=()=>({state:n,dispatch:e})=>Hg(n,e),B1=()=>({commands:n})=>n.keyboardShortcut("Enter"),z1=()=>({state:n,dispatch:e})=>qg(n,e);function Ii(n,e,t={strict:!0}){const r=Object.keys(e);return r.length?r.every(i=>t.strict?e[i]===n[i]:na(e[i])?e[i].test(n[i]):e[i]===n[i]):!0}function ks(n,e,t={}){return n.find(r=>r.type===e&&Ii(r.attrs,t))}function V1(n,e,t={}){return!!ks(n,e,t)}function ra(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=ks([...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(ks([...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&&V1([...n.parent.child(l).marks],e,t);)a+=n.parent.child(l).nodeSize,l+=1;return{from:s,to:a}}function An(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 $1=(n,e={})=>({tr:t,state:r,dispatch:i})=>{const o=An(n,r.schema),{doc:s,selection:l}=t,{$from:a,from:c,to:u}=l;if(i){const d=ra(a,o,e);if(d&&d.from<=c&&d.to>=u){const f=Re.create(s,d.from,d.to);t.setSelection(f)}}return!0},H1=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 ia(n){return n instanceof Re}function an(n=0,e=0,t=0){return Math.min(Math.max(n,e),t)}function Zu(n,e=null){if(!e)return null;const t=Ie.atStart(n),r=Ie.atEnd(n);if(e==="start"||e===!0)return t;if(e==="end")return r;const i=t.from,o=r.to;return e==="all"?Re.create(n,an(0,i,o),an(n.content.size,i,o)):Re.create(n,an(e,i,o),an(e,i,o))}function oa(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}const U1=(n=null,e={})=>({editor:t,view:r,tr:i,dispatch:o})=>{e={scrollIntoView:!0,...e};const s=()=>{oa()&&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&&!ia(t.state.selection))return s(),!0;const l=Zu(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},j1=(n,e)=>t=>n.every((r,i)=>e(r,{...t,index:i})),W1=(n,e)=>({tr:t,commands:r})=>r.insertContentAt({from:t.selection.from,to:t.selection.to},n,e);function Hl(n){const e=`<body>${n}</body>`;return new window.DOMParser().parseFromString(e,"text/html").body}function Ri(n,e,t){if(t={slice:!0,parseOptions:{},...t},typeof n=="object"&&n!==null)try{return Array.isArray(n)&&n.length>0?oe.fromArray(n.map(r=>e.nodeFromJSON(r))):e.nodeFromJSON(n)}catch(r){return console.warn("[tiptap warn]: Invalid content.","Passed value:",n,"Error:",r),Ri("",e,t)}if(typeof n=="string"){const r=lr.fromSchema(e);return t.slice?r.parseSlice(Hl(n),t.parseOptions).content:r.parse(Hl(n),t.parseOptions)}return Ri("",e,t)}function K1(n,e,t){const r=n.steps.length-1;if(r<e)return;const i=n.steps[r];if(!(i instanceof Qe||i instanceof Ge))return;const o=n.mapping.maps[r];let s=0;o.forEach((l,a,c,u)=>{s===0&&(s=u)}),n.setSelection(Ie.near(n.doc.resolve(s),t))}const G1=n=>n.toString().startsWith("<"),J1=(n,e,t)=>({tr:r,dispatch:i,editor:o})=>{if(i){t={parseOptions:{},updateSelection:!0,...t};const s=Ri(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((G1(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&&K1(r,r.steps.length-1,-1)}return!0},Y1=()=>({state:n,dispatch:e})=>Yg(n,e),X1=()=>({state:n,dispatch:e})=>Xg(n,e),Q1=()=>({state:n,dispatch:e})=>jg(n,e),Z1=()=>({state:n,dispatch:e})=>Gg(n,e),q1=()=>({tr:n,state:e,dispatch:t})=>{try{const r=ho(e.doc,e.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},_1=()=>({state:n,dispatch:e,tr:t})=>{try{const r=ho(n.doc,n.selection.$from.pos,1);return r==null?!1:(t.join(r,2),e&&e(t),!0)}catch{return!1}};function qu(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function e0(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))oa()||qu()?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 t0=n=>({editor:e,view:t,tr:r,dispatch:i})=>{const o=e0(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 Ur(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 h=Math.max(r,f),p=Math.min(i,f+d.nodeSize);l.push({node:d,from:h,to:p})});const a=i-r,c=l.filter(d=>s?s.name===d.node.type.name:!0).filter(d=>Ii(d.node.attrs,t,{strict:!1}));return o?!!c.length:c.reduce((d,f)=>d+f.to-f.from,0)>=a}const n0=(n,e={})=>({state:t,dispatch:r})=>{const i=Je(n,t.schema);return Ur(t,i,e)?Qg(t,r):!1},r0=()=>({state:n,dispatch:e})=>e1(n,e),i0=n=>({state:e,dispatch:t})=>{const r=Je(n,e.schema);return l1(r)(e,t)},o0=()=>({state:n,dispatch:e})=>Zg(n,e);function Co(n,e){return e.nodes[n]?"node":e.marks[n]?"mark":null}function Ul(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 s0=(n,e)=>({tr:t,state:r,dispatch:i})=>{let o=null,s=null;const l=Co(typeof n=="string"?n:n.name,r.schema);return l?(l==="node"&&(o=Je(n,r.schema)),l==="mark"&&(s=An(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,Ul(c.attrs,e)),s&&c.marks.length&&c.marks.forEach(d=>{s===d.type&&t.addMark(u,u+c.nodeSize,s.create(Ul(d.attrs,e)))})})}),!0):!1},a0=()=>({tr:n,dispatch:e})=>(e&&n.scrollIntoView(),!0),l0=()=>({tr:n,commands:e})=>e.setTextSelection({from:0,to:n.doc.content.size}),c0=()=>({state:n,dispatch:e})=>Wg(n,e),u0=()=>({state:n,dispatch:e})=>Jg(n,e),d0=()=>({state:n,dispatch:e})=>t1(n,e),f0=()=>({state:n,dispatch:e})=>i1(n,e),p0=()=>({state:n,dispatch:e})=>r1(n,e);function _u(n,e,t={}){return Ri(n,e,{slice:!1,parseOptions:t})}const h0=(n,e=!1,t={})=>({tr:r,editor:i,dispatch:o})=>{const{doc:s}=r,l=_u(n,i.schema,t);return o&&r.replaceWith(0,s.content.size,l).setMeta("preventUpdate",!e),!0};function ko(n,e){const t=An(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 m0(n,e){const t=new ou(n);return e.forEach(r=>{r.steps.forEach(i=>{t.step(i)})}),t}function g0(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 v0(n,e,t){const r=[];return n.nodesBetween(e.from,e.to,(i,o)=>{t(i)&&r.push({node:i,pos:o})}),r}function y0(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 sa(n){return e=>y0(e.$from,n)}function b0(n,e){const t=Yt.fromSchema(e).serializeFragment(n),i=document.implementation.createHTMLDocument().createElement("div");return i.appendChild(t),i.innerHTML}function x0(n,e){const t={from:0,to:n.content.size};return Xu(n,t,e)}function S0(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 ed(n,e){const t=Co(typeof e=="string"?e:e.name,n.schema);return t==="node"?S0(n,e):t==="mark"?ko(n,e):{}}function E0(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 C0(n){const e=E0(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 k0(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}})})}),C0(r)}function aa(n,e,t){const r=[];return n===e?t.resolve(n).marks().forEach(i=>{const o=t.resolve(n-1),s=ra(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 hi(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 ws(n,e,t={}){const{empty:r,ranges:i}=n.selection,o=e?An(e,n.schema):null;if(r)return!!(n.storedMarks||n.selection.$from.marks()).filter(d=>o?o.name===d.type.name:!0).find(d=>Ii(d.attrs,t,{strict:!1}));let s=0;const l=[];if(i.forEach(({$from:d,$to:f})=>{const h=d.pos,p=f.pos;n.doc.nodesBetween(h,p,(m,v)=>{if(!m.isText&&!m.marks.length)return;const S=Math.max(h,v),C=Math.min(p,v+m.nodeSize),k=C-S;s+=k,l.push(...m.marks.map(b=>({mark:b,from:S,to:C})))})}),s===0)return!1;const a=l.filter(d=>o?o.name===d.mark.type.name:!0).filter(d=>Ii(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 w0(n,e,t={}){if(!e)return Ur(n,null,t)||ws(n,null,t);const r=Co(e,n.schema);return r==="node"?Ur(n,e,t):r==="mark"?ws(n,e,t):!1}function jl(n,e){const{nodeExtensions:t}=So(e),r=t.find(s=>s.name===n);if(!r)return!1;const i={name:r.name,options:r.options,storage:r.storage},o=Ne(he(r,"group",i));return typeof o!="string"?!1:o.split(" ").includes("list")}function T0(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 A0(n){return n instanceof xe}function td(n,e,t){const i=n.state.doc.content.size,o=an(e,0,i),s=an(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),h=f-d,p=u-c,S={top:c,bottom:u,left:d,right:f,width:h,height:p,x:d,y:c};return{...S,toJSON:()=>S}}function O0(n,e,t){var r;const{selection:i}=e;let o=null;if(ia(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 h=!f||f.type.allowsMarkType(t),p=!!t.isInSet(u.marks)||!u.marks.some(m=>m.type.excludes(t));c=h&&p}return!c}),c})}const M0=(n,e={})=>({tr:t,state:r,dispatch:i})=>{const{selection:o}=t,{empty:s,ranges:l}=o,a=An(n,r.schema);if(i)if(s){const c=ko(r,a);t.addStoredMark(a.create({...c,...e}))}else l.forEach(c=>{const u=c.$from.pos,d=c.$to.pos;r.doc.nodesBetween(u,d,(f,h)=>{const p=Math.max(h,u),m=Math.min(h+f.nodeSize,d);f.marks.find(S=>S.type===a)?f.marks.forEach(S=>{a===S.type&&t.addMark(p,m,a.create({...S.attrs,...e}))}):t.addMark(p,m,a.create(e))})});return O0(r,t,a)},N0=(n,e)=>({tr:t})=>(t.setMeta(n,e),!0),I0=(n,e={})=>({state:t,dispatch:r,chain:i})=>{const o=Je(n,t.schema);return o.isTextblock?i().command(({commands:s})=>Bl(o,e)(t)?!0:s.clearNodes()).command(({state:s})=>Bl(o,e)(s,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},R0=n=>({tr:e,dispatch:t})=>{if(t){const{doc:r}=e,i=an(n,0,r.content.size),o=xe.create(r,i);e.setSelection(o)}return!0},D0=n=>({tr:e,dispatch:t})=>{if(t){const{doc:r}=e,{from:i,to:o}=typeof n=="number"?{from:n,to:n}:n,s=Re.atStart(r).from,l=Re.atEnd(r).to,a=an(i,s,l),c=an(o,s,l),u=Re.create(r,a,c);e.setSelection(u)}return!0},L0=n=>({state:e,dispatch:t})=>{const r=Je(n,e.schema);return d1(r)(e,t)};function Wl(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 P0=({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=hi(c,l.node().type.name,l.node().attrs);if(o instanceof xe&&o.node.isBlock)return!l.parentOffset||!ir(s,l.pos)?!1:(r&&(n&&Wl(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 Re&&e.deleteSelection();const f=l.depth===0?void 0:g0(l.node(-1).contentMatchAt(l.indexAfter(-1)));let h=d&&f?[{type:f,attrs:u}]:void 0,p=ir(e.doc,e.mapping.map(l.pos),1,h);if(!h&&!p&&ir(e.doc,e.mapping.map(l.pos),1,f?[{type:f}]:void 0)&&(p=!0,h=f?[{type:f,attrs:u}]:void 0),p&&(e.split(e.mapping.map(l.pos),1,h),f&&!d&&!l.parentOffset&&l.parent.type!==f)){const m=e.mapping.map(l.before()),v=e.doc.resolve(m);l.node(-1).canReplaceWith(v.index(),v.index()+1,f)&&e.setNodeMarkup(e.mapping.map(l.before()),f)}n&&Wl(t,i.extensionManager.splittableMarks),e.scrollIntoView()}return!0},F0=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=oe.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=oe.from(l.node(B).copy(v));const C=l.indexAfter(-1)<l.node(-2).childCount?1:l.indexAfter(-2)<l.node(-3).childCount?2:3,k=hi(d,l.node().type.name,l.node().attrs),b=((o=s.contentMatch.defaultType)===null||o===void 0?void 0:o.createAndFill(k))||void 0;v=v.append(oe.from(s.createAndFill(null,b)||void 0));const R=l.before(l.depth-(S-1));e.replace(R,l.after(-C),new fe(v,4-S,0));let w=-1;e.doc.nodesBetween(R,e.doc.content.size,(B,V)=>{if(w>-1)return!1;B.isTextblock&&B.content.size===0&&(w=V+1)}),w>-1&&e.setSelection(Re.near(e.doc.resolve(w))),e.scrollIntoView()}return!0}const f=a.pos===l.end()?u.contentMatchAt(0).defaultType:null,h=hi(d,u.type.name,u.attrs),p=hi(d,l.node().type.name,l.node().attrs);e.delete(l.pos,a.pos);const m=f?[{type:s,attrs:h},{type:f,attrs:p}]:[{type:s,attrs:h}];if(!ir(e.doc,l.pos,2))return!1;if(r){const{selection:v,storedMarks:S}=t,{splittableMarks:C}=i.extensionManager,k=S||v.$to.parentOffset&&v.$from.marks();if(e.split(l.pos,2,m).scrollIntoView(),!k||!r)return!0;const b=k.filter(R=>C.includes(R.type.name));e.ensureMarks(b)}return!0},Qo=(n,e)=>{const t=sa(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)&&wn(n.doc,t.pos)&&n.join(t.pos),!0},Zo=(n,e)=>{const t=sa(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)&&wn(n.doc,r)&&n.join(r),!0},B0=(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,h=Je(n,s.schema),p=Je(e,s.schema),{selection:m,storedMarks:v}=s,{$from:S,$to:C}=m,k=S.blockRange(C),b=v||m.$to.parentOffset&&m.$from.marks();if(!k)return!1;const R=sa(w=>jl(w.type.name,d))(m);if(k.depth>=1&&R&&k.depth-R.depth<=1){if(R.node.type===h)return c.liftListItem(p);if(jl(R.node.type.name,d)&&h.validContent(R.node.content)&&l)return a().command(()=>(o.setNodeMarkup(R.pos,h),!0)).command(()=>Qo(o,h)).command(()=>Zo(o,h)).run()}return!t||!b||!l?a().command(()=>u().wrapInList(h,r)?!0:c.clearNodes()).wrapInList(h,r).command(()=>Qo(o,h)).command(()=>Zo(o,h)).run():a().command(()=>{const w=u().wrapInList(h,r),B=b.filter(V=>f.includes(V.type.name));return o.ensureMarks(B),w?!0:c.clearNodes()}).wrapInList(h,r).command(()=>Qo(o,h)).command(()=>Zo(o,h)).run()},z0=(n,e={},t={})=>({state:r,commands:i})=>{const{extendEmptyMarkRange:o=!1}=t,s=An(n,r.schema);return ws(r,s,e)?i.unsetMark(s,{extendEmptyMarkRange:o}):i.setMark(s,e)},V0=(n,e,t={})=>({state:r,commands:i})=>{const o=Je(n,r.schema),s=Je(e,r.schema);return Ur(r,o,t)?i.setNode(s):i.setNode(o,t)},$0=(n,e={})=>({state:t,commands:r})=>{const i=Je(n,t.schema);return Ur(t,i,e)?r.lift(i):r.wrapIn(i,e)},H0=()=>({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},U0=()=>({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},j0=(n,e={})=>({tr:t,state:r,dispatch:i})=>{var o;const{extendEmptyMarkRange:s=!1}=e,{selection:l}=t,a=An(n,r.schema),{$from:c,empty:u,ranges:d}=l;if(!i)return!0;if(u&&s){let{from:f,to:h}=l;const p=(o=c.marks().find(v=>v.type===a))===null||o===void 0?void 0:o.attrs,m=ra(c,a,p);m&&(f=m.from,h=m.to),t.removeMark(f,h,a)}else d.forEach(f=>{t.removeMark(f.$from.pos,f.$to.pos,a)});return t.removeStoredMark(a),!0},W0=(n,e={})=>({tr:t,state:r,dispatch:i})=>{let o=null,s=null;const l=Co(typeof n=="string"?n:n.name,r.schema);return l?(l==="node"&&(o=Je(n,r.schema)),l==="mark"&&(s=An(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(h=>{if(s===h.type){const p=Math.max(f,c),m=Math.min(f+d.nodeSize,u);t.addMark(p,m,s.create({...h.attrs,...e}))}})})}),!0):!1},K0=(n,e={})=>({state:t,dispatch:r})=>{const i=Je(n,t.schema);return o1(i,e)(t,r)},G0=(n,e={})=>({state:t,dispatch:r})=>{const i=Je(n,t.schema);return s1(i,e)(t,r)};var J0=Object.freeze({__proto__:null,blur:A1,clearContent:O1,clearNodes:M1,command:N1,createParagraphNear:I1,cut:R1,deleteCurrentNode:D1,deleteNode:L1,deleteRange:P1,deleteSelection:F1,enter:B1,exitCode:z1,extendMarkRange:$1,first:H1,focus:U1,forEach:j1,insertContent:W1,insertContentAt:J1,joinUp:Y1,joinDown:X1,joinBackward:Q1,joinForward:Z1,joinItemBackward:q1,joinItemForward:_1,keyboardShortcut:t0,lift:n0,liftEmptyBlock:r0,liftListItem:i0,newlineInCode:o0,resetAttributes:s0,scrollIntoView:a0,selectAll:l0,selectNodeBackward:c0,selectNodeForward:u0,selectParentNode:d0,selectTextblockEnd:f0,selectTextblockStart:p0,setContent:h0,setMark:M0,setMeta:N0,setNode:I0,setNodeSelection:R0,setTextSelection:D0,sinkListItem:L0,splitBlock:P0,splitListItem:F0,toggleList:B0,toggleMark:z0,toggleNode:V0,toggleWrap:$0,undoInputRule:H0,unsetAllMarks:U0,unsetMark:j0,updateAttributes:W0,wrapIn:K0,wrapInList:G0});const Y0=Nt.create({name:"commands",addCommands(){return{...J0}}}),X0=Nt.create({name:"editable",addProseMirrorPlugins(){return[new mt({key:new $t("editable"),props:{editable:()=>this.editor.options.editable}})]}}),Q0=Nt.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:n}=this;return[new mt({key:new $t("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}}}})]}}),Z0=Nt.create({name:"keymap",addKeyboardShortcuts(){const n=()=>this.editor.commands.first(({commands:s})=>[()=>s.undoInputRule(),()=>s.command(({tr:l})=>{const{selection:a,doc:c}=l,{empty:u,$anchor:d}=a,{pos:f,parent:h}=d,p=d.parent.isTextblock?l.doc.resolve(f-1):d,m=p.parent.type.spec.isolating,v=d.pos-d.parentOffset,S=m&&p.parent.childCount===1?v===d.pos:Ie.atStart(c).from===f;return!u||!S||!h.type.isTextblock||h.textContent.length?!1:s.clearNodes()}),()=>s.deleteSelection(),()=>s.joinBackward(),()=>s.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:s})=>[()=>s.deleteSelection(),()=>s.deleteCurrentNode(),()=>s.joinForward(),()=>s.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:s})=>[()=>s.newlineInCode(),()=>s.createParagraphNear(),()=>s.liftEmptyBlock(),()=>s.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:n,"Mod-Backspace":n,"Shift-Backspace":n,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},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 oa()||qu()?o:i},addProseMirrorPlugins(){return[new mt({key:new $t("clearDocument"),appendTransaction:(n,e,t)=>{if(!(n.some(p=>p.docChanged)&&!e.doc.eq(t.doc)))return;const{empty:i,from:o,to:s}=e.selection,l=Ie.atStart(e.doc).from,a=Ie.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=bo({state:t,transaction:d}),{commands:h}=new xo({editor:this.editor,state:f});if(h.clearNodes(),!!d.steps.length)return d}})]}}),q0=Nt.create({name:"tabindex",addProseMirrorPlugins(){return[new mt({key:new $t("tabindex"),props:{attributes:this.editor.isEditable?{tabindex:"0"}:{}}})]}});var _0=Object.freeze({__proto__:null,ClipboardTextSerializer:T1,Commands:Y0,Editable:X0,FocusEvents:Q0,Keymap:Z0,Tabindex:q0});const ev=`.ProseMirror {
|
|
23
|
+
position: relative;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.ProseMirror {
|
|
27
|
+
word-wrap: break-word;
|
|
28
|
+
white-space: pre-wrap;
|
|
29
|
+
white-space: break-spaces;
|
|
30
|
+
-webkit-font-variant-ligatures: none;
|
|
31
|
+
font-variant-ligatures: none;
|
|
32
|
+
font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.ProseMirror [contenteditable="false"] {
|
|
36
|
+
white-space: normal;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.ProseMirror [contenteditable="false"] [contenteditable="true"] {
|
|
40
|
+
white-space: pre-wrap;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.ProseMirror pre {
|
|
44
|
+
white-space: pre-wrap;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
img.ProseMirror-separator {
|
|
48
|
+
display: inline !important;
|
|
49
|
+
border: none !important;
|
|
50
|
+
margin: 0 !important;
|
|
51
|
+
width: 1px !important;
|
|
52
|
+
height: 1px !important;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.ProseMirror-gapcursor {
|
|
56
|
+
display: none;
|
|
57
|
+
pointer-events: none;
|
|
58
|
+
position: absolute;
|
|
59
|
+
margin: 0;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.ProseMirror-gapcursor:after {
|
|
63
|
+
content: "";
|
|
64
|
+
display: block;
|
|
65
|
+
position: absolute;
|
|
66
|
+
top: -2px;
|
|
67
|
+
width: 20px;
|
|
68
|
+
border-top: 1px solid black;
|
|
69
|
+
animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
@keyframes ProseMirror-cursor-blink {
|
|
73
|
+
to {
|
|
74
|
+
visibility: hidden;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.ProseMirror-hideselection *::selection {
|
|
79
|
+
background: transparent;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.ProseMirror-hideselection *::-moz-selection {
|
|
83
|
+
background: transparent;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.ProseMirror-hideselection * {
|
|
87
|
+
caret-color: transparent;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.ProseMirror-focused .ProseMirror-gapcursor {
|
|
91
|
+
display: block;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.tippy-box[data-animation=fade][data-state=hidden] {
|
|
95
|
+
opacity: 0
|
|
96
|
+
}`;function tv(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 nv=class extends f1{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=tv(ev,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=Ju(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(_0):[],...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 xo({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){const e=_u(this.options.content,this.schema,this.options.parseOptions),t=Zu(e,this.options.autofocus);this.view=new Ng(this.options.element,{...this.options.editorProps,dispatchTransaction:this.dispatchTransaction.bind(this),state:nr.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 ed(this.state,e)}isActive(e,t){const r=typeof e=="string"?e:null,i=typeof e=="string"?t:e;return w0(this.state,r,i)}getJSON(){return this.state.doc.toJSON()}getHTML(){return b0(this.state.doc.content,this.schema)}getText(e){const{blockSeparator:t=`
|
|
97
|
+
|
|
98
|
+
`,textSerializers:r={}}=e||{};return x0(this.state.doc,{blockSeparator:t,textSerializers:{...Qu(this.schema),...r}})}get isEmpty(){return T0(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 Di(n){return new Yu({find:n.find,handler:({state:e,range:t,match:r})=>{const i=Ne(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(aa(t.from,t.to,e.doc).filter(h=>h.mark.type.excluded.find(m=>m===n.type&&m!==h.mark.type)).filter(h=>h.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 Li(n){return new Yu({find:n.find,handler:({state:e,range:t,match:r,chain:i})=>{const o=Ne(n.getAttributes,void 0,r)||{},s=e.tr.delete(t.from,t.to),a=s.doc.resolve(t.from).blockRange(),c=a&&Ws(a,n.type,o);if(!c)return null;if(s.wrap(a,c),n.keepMarks&&n.editor){const{selection:d,storedMarks:f}=e,{splittableMarks:h}=n.editor.extensionManager,p=f||d.$to.parentOffset&&d.$from.marks();if(p){const m=p.filter(v=>h.includes(v.type.name));s.ensureMarks(m)}}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&&wn(s.doc,t.from-1)&&(!n.joinPredicate||n.joinPredicate(r,u))&&s.join(t.from-1)}})}class qt{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=Ne(he(this,"addOptions",{name:this.name}))),this.storage=Ne(he(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new qt(e)}configure(e={}){const t=this.extend();return t.options=Eo(this.options,e),t.storage=Ne(he(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){const t=new qt(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=Ne(he(t,"addOptions",{name:t.name})),t.storage=Ne(he(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}}class It{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=Ne(he(this,"addOptions",{name:this.name}))),this.storage=Ne(he(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new It(e)}configure(e={}){const t=this.extend();return t.options=Eo(this.options,e),t.storage=Ne(he(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){const t=new It(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=Ne(he(t,"addOptions",{name:t.name})),t.storage=Ne(he(t,"addStorage",{name:t.name,options:t.options})),t}}function jr(n){return new x1({find:n.find,handler:({state:e,range:t,match:r,pasteEvent:i})=>{const o=Ne(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(aa(t.from,t.to,e.doc).filter(p=>p.mark.type.excluded.find(v=>v===n.type&&v!==p.mark.type)).filter(p=>p.to>d).length)return null;f<t.to&&s.delete(f,t.to),d>t.from&&s.delete(t.from+u,d),c=t.from+u+l.length,s.addMark(t.from+u,c,n.type.create(o||{})),s.removeStoredMark(n.type)}}})}var pt="top",Rt="bottom",Dt="right",ht="left",wo="auto",ei=[pt,Rt,Dt,ht],pr="start",Wr="end",rv="clippingParents",nd="viewport",Sr="popper",iv="reference",Kl=ei.reduce(function(n,e){return n.concat([e+"-"+pr,e+"-"+Wr])},[]),rd=[].concat(ei,[wo]).reduce(function(n,e){return n.concat([e,e+"-"+pr,e+"-"+Wr])},[]),ov="beforeRead",sv="read",av="afterRead",lv="beforeMain",cv="main",uv="afterMain",dv="beforeWrite",fv="write",pv="afterWrite",Ts=[ov,sv,av,lv,cv,uv,dv,fv,pv];function _t(n){return n?(n.nodeName||"").toLowerCase():null}function xt(n){if(n==null)return window;if(n.toString()!=="[object Window]"){var e=n.ownerDocument;return e&&e.defaultView||window}return n}function Gn(n){var e=xt(n).Element;return n instanceof e||n instanceof Element}function bt(n){var e=xt(n).HTMLElement;return n instanceof e||n instanceof HTMLElement}function la(n){if(typeof ShadowRoot>"u")return!1;var e=xt(n).ShadowRoot;return n instanceof e||n instanceof ShadowRoot}function hv(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];!bt(o)||!_t(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 mv(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},{});!bt(i)||!_t(i)||(Object.assign(i.style,l),Object.keys(o).forEach(function(a){i.removeAttribute(a)}))})}}const id={name:"applyStyles",enabled:!0,phase:"write",fn:hv,effect:mv,requires:["computeStyles"]};function Bt(n){return n.split("-")[0]}var Un=Math.max,Pi=Math.min,hr=Math.round;function As(){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 od(){return!/^((?!chrome|android).)*safari/i.test(As())}function mr(n,e,t){e===void 0&&(e=!1),t===void 0&&(t=!1);var r=n.getBoundingClientRect(),i=1,o=1;e&&bt(n)&&(i=n.offsetWidth>0&&hr(r.width)/n.offsetWidth||1,o=n.offsetHeight>0&&hr(r.height)/n.offsetHeight||1);var s=Gn(n)?xt(n):window,l=s.visualViewport,a=!od()&&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 ca(n){var e=mr(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 sd(n,e){var t=e.getRootNode&&e.getRootNode();if(n.contains(e))return!0;if(t&&la(t)){var r=e;do{if(r&&n.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Vt(n){return xt(n).getComputedStyle(n)}function gv(n){return["table","td","th"].indexOf(_t(n))>=0}function On(n){return((Gn(n)?n.ownerDocument:n.document)||window.document).documentElement}function To(n){return _t(n)==="html"?n:n.assignedSlot||n.parentNode||(la(n)?n.host:null)||On(n)}function Gl(n){return!bt(n)||Vt(n).position==="fixed"?null:n.offsetParent}function vv(n){var e=/firefox/i.test(As()),t=/Trident/i.test(As());if(t&&bt(n)){var r=Vt(n);if(r.position==="fixed")return null}var i=To(n);for(la(i)&&(i=i.host);bt(i)&&["html","body"].indexOf(_t(i))<0;){var o=Vt(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 ti(n){for(var e=xt(n),t=Gl(n);t&&gv(t)&&Vt(t).position==="static";)t=Gl(t);return t&&(_t(t)==="html"||_t(t)==="body"&&Vt(t).position==="static")?e:t||vv(n)||e}function ua(n){return["top","bottom"].indexOf(n)>=0?"x":"y"}function Nr(n,e,t){return Un(n,Pi(e,t))}function yv(n,e,t){var r=Nr(n,e,t);return r>t?t:r}function ad(){return{top:0,right:0,bottom:0,left:0}}function ld(n){return Object.assign({},ad(),n)}function cd(n,e){return e.reduce(function(t,r){return t[r]=n,t},{})}var bv=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,ld(typeof e!="number"?e:cd(e,ei))};function xv(n){var e,t=n.state,r=n.name,i=n.options,o=t.elements.arrow,s=t.modifiersData.popperOffsets,l=Bt(t.placement),a=ua(l),c=[ht,Dt].indexOf(l)>=0,u=c?"height":"width";if(!(!o||!s)){var d=bv(i.padding,t),f=ca(o),h=a==="y"?pt:ht,p=a==="y"?Rt:Dt,m=t.rects.reference[u]+t.rects.reference[a]-s[a]-t.rects.popper[u],v=s[a]-t.rects.reference[a],S=ti(o),C=S?a==="y"?S.clientHeight||0:S.clientWidth||0:0,k=m/2-v/2,b=d[h],R=C-f[u]-d[p],w=C/2-f[u]/2+k,B=Nr(b,w,R),V=a;t.modifiersData[r]=(e={},e[V]=B,e.centerOffset=B-w,e)}}function Sv(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"&&(bt(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(" "))),!sd(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 Ev={name:"arrow",enabled:!0,phase:"main",fn:xv,effect:Sv,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function gr(n){return n.split("-")[1]}var Cv={top:"auto",right:"auto",bottom:"auto",left:"auto"};function kv(n,e){var t=n.x,r=n.y,i=e.devicePixelRatio||1;return{x:hr(t*i)/i||0,y:hr(r*i)/i||0}}function Jl(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,h=f===void 0?0:f,p=s.y,m=p===void 0?0:p,v=typeof u=="function"?u({x:h,y:m}):{x:h,y:m};h=v.x,m=v.y;var S=s.hasOwnProperty("x"),C=s.hasOwnProperty("y"),k=ht,b=pt,R=window;if(c){var w=ti(t),B="clientHeight",V="clientWidth";if(w===xt(t)&&(w=On(t),Vt(w).position!=="static"&&l==="absolute"&&(B="scrollHeight",V="scrollWidth")),w=w,i===pt||(i===ht||i===Dt)&&o===Wr){b=Rt;var $=d&&w===R&&R.visualViewport?R.visualViewport.height:w[B];m-=$-r.height,m*=a?1:-1}if(i===ht||(i===pt||i===Rt)&&o===Wr){k=Dt;var z=d&&w===R&&R.visualViewport?R.visualViewport.width:w[V];h-=z-r.width,h*=a?1:-1}}var F=Object.assign({position:l},c&&Cv),P=u===!0?kv({x:h,y:m},xt(t)):{x:h,y:m};if(h=P.x,m=P.y,a){var U;return Object.assign({},F,(U={},U[b]=C?"0":"",U[k]=S?"0":"",U.transform=(R.devicePixelRatio||1)<=1?"translate("+h+"px, "+m+"px)":"translate3d("+h+"px, "+m+"px, 0)",U))}return Object.assign({},F,(e={},e[b]=C?m+"px":"",e[k]=S?h+"px":"",e.transform="",e))}function wv(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=Vt(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
|
+
|
|
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
|
+
|
|
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:Bt(e.placement),variation:gr(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,Jl(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,Jl(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 Tv={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:wv,data:{}};var ai={passive:!0};function Av(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=xt(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach(function(u){u.addEventListener("scroll",t.update,ai)}),l&&a.addEventListener("resize",t.update,ai),function(){o&&c.forEach(function(u){u.removeEventListener("scroll",t.update,ai)}),l&&a.removeEventListener("resize",t.update,ai)}}const Ov={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Av,data:{}};var Mv={left:"right",right:"left",bottom:"top",top:"bottom"};function mi(n){return n.replace(/left|right|bottom|top/g,function(e){return Mv[e]})}var Nv={start:"end",end:"start"};function Yl(n){return n.replace(/start|end/g,function(e){return Nv[e]})}function da(n){var e=xt(n),t=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:t,scrollTop:r}}function fa(n){return mr(On(n)).left+da(n).scrollLeft}function Iv(n,e){var t=xt(n),r=On(n),i=t.visualViewport,o=r.clientWidth,s=r.clientHeight,l=0,a=0;if(i){o=i.width,s=i.height;var c=od();(c||!c&&e==="fixed")&&(l=i.offsetLeft,a=i.offsetTop)}return{width:o,height:s,x:l+fa(n),y:a}}function Rv(n){var e,t=On(n),r=da(n),i=(e=n.ownerDocument)==null?void 0:e.body,o=Un(t.scrollWidth,t.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=Un(t.scrollHeight,t.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),l=-r.scrollLeft+fa(n),a=-r.scrollTop;return Vt(i||t).direction==="rtl"&&(l+=Un(t.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:l,y:a}}function pa(n){var e=Vt(n),t=e.overflow,r=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(t+i+r)}function ud(n){return["html","body","#document"].indexOf(_t(n))>=0?n.ownerDocument.body:bt(n)&&pa(n)?n:ud(To(n))}function Ir(n,e){var t;e===void 0&&(e=[]);var r=ud(n),i=r===((t=n.ownerDocument)==null?void 0:t.body),o=xt(r),s=i?[o].concat(o.visualViewport||[],pa(r)?r:[]):r,l=e.concat(s);return i?l:l.concat(Ir(To(s)))}function Os(n){return Object.assign({},n,{left:n.x,top:n.y,right:n.x+n.width,bottom:n.y+n.height})}function Dv(n,e){var t=mr(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 Xl(n,e,t){return e===nd?Os(Iv(n,t)):Gn(e)?Dv(e,t):Os(Rv(On(n)))}function Lv(n){var e=Ir(To(n)),t=["absolute","fixed"].indexOf(Vt(n).position)>=0,r=t&&bt(n)?ti(n):n;return Gn(r)?e.filter(function(i){return Gn(i)&&sd(i,r)&&_t(i)!=="body"}):[]}function Pv(n,e,t,r){var i=e==="clippingParents"?Lv(n):[].concat(e),o=[].concat(i,[t]),s=o[0],l=o.reduce(function(a,c){var u=Xl(n,c,r);return a.top=Un(u.top,a.top),a.right=Pi(u.right,a.right),a.bottom=Pi(u.bottom,a.bottom),a.left=Un(u.left,a.left),a},Xl(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 dd(n){var e=n.reference,t=n.element,r=n.placement,i=r?Bt(r):null,o=r?gr(r):null,s=e.x+e.width/2-t.width/2,l=e.y+e.height/2-t.height/2,a;switch(i){case pt:a={x:s,y:e.y-t.height};break;case Rt:a={x:s,y:e.y+e.height};break;case Dt:a={x:e.x+e.width,y:l};break;case ht:a={x:e.x-t.width,y:l};break;default:a={x:e.x,y:e.y}}var c=i?ua(i):null;if(c!=null){var u=c==="y"?"height":"width";switch(o){case pr:a[c]=a[c]-(e[u]/2-t[u]/2);break;case Wr:a[c]=a[c]+(e[u]/2-t[u]/2);break}}return a}function Kr(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?rv:l,c=t.rootBoundary,u=c===void 0?nd:c,d=t.elementContext,f=d===void 0?Sr:d,h=t.altBoundary,p=h===void 0?!1:h,m=t.padding,v=m===void 0?0:m,S=ld(typeof v!="number"?v:cd(v,ei)),C=f===Sr?iv:Sr,k=n.rects.popper,b=n.elements[p?C:f],R=Pv(Gn(b)?b:b.contextElement||On(n.elements.popper),a,u,s),w=mr(n.elements.reference),B=dd({reference:w,element:k,strategy:"absolute",placement:i}),V=Os(Object.assign({},k,B)),$=f===Sr?V:w,z={top:R.top-$.top+S.top,bottom:$.bottom-R.bottom+S.bottom,left:R.left-$.left+S.left,right:$.right-R.right+S.right},F=n.modifiersData.offset;if(f===Sr&&F){var P=F[i];Object.keys(z).forEach(function(U){var Y=[Dt,Rt].indexOf(U)>=0?1:-1,Q=[pt,Rt].indexOf(U)>=0?"y":"x";z[U]+=P[Q]*Y})}return z}function Fv(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?rd:a,u=gr(r),d=u?l?Kl:Kl.filter(function(p){return gr(p)===u}):ei,f=d.filter(function(p){return c.indexOf(p)>=0});f.length===0&&(f=d,process.env.NODE_ENV!=="production"&&console.error(["Popper: The `allowedAutoPlacements` option did not allow any","placements. Ensure the `placement` option matches the variation","of the allowed placements.",'For example, "auto" cannot be used to allow "bottom-start".','Use "auto-start" instead.'].join(" ")));var h=f.reduce(function(p,m){return p[m]=Kr(n,{placement:m,boundary:i,rootBoundary:o,padding:s})[Bt(m)],p},{});return Object.keys(h).sort(function(p,m){return h[p]-h[m]})}function Bv(n){if(Bt(n)===wo)return[];var e=mi(n);return[Yl(n),e,Yl(e)]}function zv(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,h=t.flipVariations,p=h===void 0?!0:h,m=t.allowedAutoPlacements,v=e.options.placement,S=Bt(v),C=S===v,k=a||(C||!p?[mi(v)]:Bv(v)),b=[v].concat(k).reduce(function(we,Ce){return we.concat(Bt(Ce)===wo?Fv(e,{placement:Ce,boundary:u,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:m}):Ce)},[]),R=e.rects.reference,w=e.rects.popper,B=new Map,V=!0,$=b[0],z=0;z<b.length;z++){var F=b[z],P=Bt(F),U=gr(F)===pr,Y=[pt,Rt].indexOf(P)>=0,Q=Y?"width":"height",Z=Kr(e,{placement:F,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),re=Y?U?Dt:ht:U?Rt:pt;R[Q]>w[Q]&&(re=mi(re));var W=mi(re),le=[];if(o&&le.push(Z[P]<=0),l&&le.push(Z[re]<=0,Z[W]<=0),le.every(function(we){return we})){$=F,V=!1;break}B.set(F,le)}if(V)for(var de=p?3:1,ve=function(Ce){var Te=b.find(function(ge){var A=B.get(ge);if(A)return A.slice(0,Ce).every(function(M){return M})});if(Te)return $=Te,"break"},Se=de;Se>0;Se--){var ye=ve(Se);if(ye==="break")break}e.placement!==$&&(e.modifiersData[r]._skip=!0,e.placement=$,e.reset=!0)}}const Vv={name:"flip",enabled:!0,phase:"main",fn:zv,requiresIfExists:["offset"],data:{_skip:!1}};function Ql(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 Zl(n){return[pt,Dt,Rt,ht].some(function(e){return n[e]>=0})}function $v(n){var e=n.state,t=n.name,r=e.rects.reference,i=e.rects.popper,o=e.modifiersData.preventOverflow,s=Kr(e,{elementContext:"reference"}),l=Kr(e,{altBoundary:!0}),a=Ql(s,r),c=Ql(l,i,o),u=Zl(a),d=Zl(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 Hv={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:$v};function Uv(n,e,t){var r=Bt(n),i=[ht,pt].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,[ht,Dt].indexOf(r)>=0?{x:l,y:s}:{x:s,y:l}}function jv(n){var e=n.state,t=n.options,r=n.name,i=t.offset,o=i===void 0?[0,0]:i,s=rd.reduce(function(u,d){return u[d]=Uv(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 Wv={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:jv};function Kv(n){var e=n.state,t=n.name;e.modifiersData[t]=dd({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const Gv={name:"popperOffsets",enabled:!0,phase:"read",fn:Kv,data:{}};function Jv(n){return n==="x"?"y":"x"}function Yv(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,h=f===void 0?!0:f,p=t.tetherOffset,m=p===void 0?0:p,v=Kr(e,{boundary:a,rootBoundary:c,padding:d,altBoundary:u}),S=Bt(e.placement),C=gr(e.placement),k=!C,b=ua(S),R=Jv(b),w=e.modifiersData.popperOffsets,B=e.rects.reference,V=e.rects.popper,$=typeof m=="function"?m(Object.assign({},e.rects,{placement:e.placement})):m,z=typeof $=="number"?{mainAxis:$,altAxis:$}:Object.assign({mainAxis:0,altAxis:0},$),F=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,P={x:0,y:0};if(w){if(o){var U,Y=b==="y"?pt:ht,Q=b==="y"?Rt:Dt,Z=b==="y"?"height":"width",re=w[b],W=re+v[Y],le=re-v[Q],de=h?-V[Z]/2:0,ve=C===pr?B[Z]:V[Z],Se=C===pr?-V[Z]:-B[Z],ye=e.elements.arrow,we=h&&ye?ca(ye):{width:0,height:0},Ce=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:ad(),Te=Ce[Y],ge=Ce[Q],A=Nr(0,B[Z],we[Z]),M=k?B[Z]/2-de-A-Te-z.mainAxis:ve-A-Te-z.mainAxis,E=k?-B[Z]/2+de+A+ge+z.mainAxis:Se+A+ge+z.mainAxis,O=e.elements.arrow&&ti(e.elements.arrow),y=O?b==="y"?O.clientTop||0:O.clientLeft||0:0,x=(U=F==null?void 0:F[b])!=null?U:0,N=re+M-x-y,I=re+E-x,D=Nr(h?Pi(W,N):W,re,h?Un(le,I):le);w[b]=D,P[b]=D-re}if(l){var L,H=b==="x"?pt:ht,K=b==="x"?Rt:Dt,j=w[R],G=R==="y"?"height":"width",J=j+v[H],_=j-v[K],ce=[pt,ht].indexOf(S)!==-1,me=(L=F==null?void 0:F[R])!=null?L:0,Oe=ce?J:j-B[G]-V[G]-me+z.altAxis,Fe=ce?j+B[G]+V[G]-me-z.altAxis:_,Pe=h&&ce?yv(Oe,j,Fe):Nr(h?Oe:J,j,h?Fe:_);w[R]=Pe,P[R]=Pe-j}e.modifiersData[r]=P}}const Xv={name:"preventOverflow",enabled:!0,phase:"main",fn:Yv,requiresIfExists:["offset"]};function Qv(n){return{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}}function Zv(n){return n===xt(n)||!bt(n)?da(n):Qv(n)}function qv(n){var e=n.getBoundingClientRect(),t=hr(e.width)/n.offsetWidth||1,r=hr(e.height)/n.offsetHeight||1;return t!==1||r!==1}function _v(n,e,t){t===void 0&&(t=!1);var r=bt(e),i=bt(e)&&qv(e),o=On(e),s=mr(n,i,t),l={scrollLeft:0,scrollTop:0},a={x:0,y:0};return(r||!r&&!t)&&((_t(e)!=="body"||pa(o))&&(l=Zv(e)),bt(e)?(a=mr(e,!0),a.x+=e.clientLeft,a.y+=e.clientTop):o&&(a.x=fa(o))),{x:s.left+l.scrollLeft-a.x,y:s.top+l.scrollTop-a.y,width:s.width,height:s.height}}function ey(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 ty(n){var e=ey(n);return Ts.reduce(function(t,r){return t.concat(e.filter(function(i){return i.phase===r}))},[])}function ny(n){var e;return function(){return e||(e=new Promise(function(t){Promise.resolve().then(function(){e=void 0,t(n())})})),e}}function dn(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 Nn='Popper: modifier "%s" provided an invalid %s property, expected %s but got %s',ry='Popper: modifier "%s" requires "%s", but "%s" modifier is not available',ql=["name","enabled","phase","fn","effect","requires","options"];function iy(n){n.forEach(function(e){[].concat(Object.keys(e),ql).filter(function(t,r,i){return i.indexOf(t)===r}).forEach(function(t){switch(t){case"name":typeof e.name!="string"&&console.error(dn(Nn,String(e.name),'"name"','"string"','"'+String(e.name)+'"'));break;case"enabled":typeof e.enabled!="boolean"&&console.error(dn(Nn,e.name,'"enabled"','"boolean"','"'+String(e.enabled)+'"'));break;case"phase":Ts.indexOf(e.phase)<0&&console.error(dn(Nn,e.name,'"phase"',"either "+Ts.join(", "),'"'+String(e.phase)+'"'));break;case"fn":typeof e.fn!="function"&&console.error(dn(Nn,e.name,'"fn"','"function"','"'+String(e.fn)+'"'));break;case"effect":e.effect!=null&&typeof e.effect!="function"&&console.error(dn(Nn,e.name,'"effect"','"function"','"'+String(e.fn)+'"'));break;case"requires":e.requires!=null&&!Array.isArray(e.requires)&&console.error(dn(Nn,e.name,'"requires"','"array"','"'+String(e.requires)+'"'));break;case"requiresIfExists":Array.isArray(e.requiresIfExists)||console.error(dn(Nn,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 '+ql.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(dn(ry,String(e.name),r,r))})})})}function oy(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 sy(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 _l="Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.",ay="Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.",ec={placement:"bottom",modifiers:[],strategy:"absolute"};function tc(){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 ly(n){n===void 0&&(n={});var e=n,t=e.defaultModifiers,r=t===void 0?[]:t,i=e.defaultOptions,o=i===void 0?ec:i;return function(l,a,c){c===void 0&&(c=o);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},ec,o),modifiersData:{},elements:{reference:l,popper:a},attributes:{},styles:{}},d=[],f=!1,h={state:u,setOptions:function(S){var C=typeof S=="function"?S(u.options):S;m(),u.options=Object.assign({},o,u.options,C),u.scrollParents={reference:Gn(l)?Ir(l):l.contextElement?Ir(l.contextElement):[],popper:Ir(a)};var k=ty(sy([].concat(r,u.options.modifiers)));if(u.orderedModifiers=k.filter(function(F){return F.enabled}),process.env.NODE_ENV!=="production"){var b=oy([].concat(k,u.options.modifiers),function(F){var P=F.name;return P});if(iy(b),Bt(u.options.placement)===wo){var R=u.orderedModifiers.find(function(F){var P=F.name;return P==="flip"});R||console.error(['Popper: "auto" placements require the "flip" modifier be',"present and enabled to work."].join(" "))}var w=Vt(a),B=w.marginTop,V=w.marginRight,$=w.marginBottom,z=w.marginLeft;[B,V,$,z].some(function(F){return parseFloat(F)})&&console.warn(['Popper: CSS "margin" styles cannot be used to apply padding',"between the popper and its reference element or boundary.","To replicate margin, use the `offset` modifier, as well as","the `padding` option in the `preventOverflow` and `flip`","modifiers."].join(" "))}return p(),h.update()},forceUpdate:function(){if(!f){var S=u.elements,C=S.reference,k=S.popper;if(!tc(C,k)){process.env.NODE_ENV!=="production"&&console.error(_l);return}u.rects={reference:_v(C,ti(k),u.options.strategy==="fixed"),popper:ca(k)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(F){return u.modifiersData[F.name]=Object.assign({},F.data)});for(var b=0,R=0;R<u.orderedModifiers.length;R++){if(process.env.NODE_ENV!=="production"&&(b+=1,b>100)){console.error(ay);break}if(u.reset===!0){u.reset=!1,R=-1;continue}var w=u.orderedModifiers[R],B=w.fn,V=w.options,$=V===void 0?{}:V,z=w.name;typeof B=="function"&&(u=B({state:u,options:$,name:z,instance:h})||u)}}},update:ny(function(){return new Promise(function(v){h.forceUpdate(),v(u)})}),destroy:function(){m(),f=!0}};if(!tc(l,a))return process.env.NODE_ENV!=="production"&&console.error(_l),h;h.setOptions(c).then(function(v){!f&&c.onFirstUpdate&&c.onFirstUpdate(v)});function p(){u.orderedModifiers.forEach(function(v){var S=v.name,C=v.options,k=C===void 0?{}:C,b=v.effect;if(typeof b=="function"){var R=b({state:u,name:S,instance:h,options:k}),w=function(){};d.push(R||w)}})}function m(){d.forEach(function(v){return v()}),d=[]}return h}}var cy=[Ov,Gv,Tv,id,Wv,Vv,Xv,Ev,Hv],uy=ly({defaultModifiers:cy}),dy="tippy-box",fd="tippy-content",fy="tippy-backdrop",pd="tippy-arrow",hd="tippy-svg-arrow",In={passive:!0,capture:!0},md=function(){return document.body};function py(n,e){return{}.hasOwnProperty.call(n,e)}function qo(n,e,t){if(Array.isArray(n)){var r=n[e];return r??(Array.isArray(t)?t[e]:t)}return n}function ha(n,e){var t={}.toString.call(n);return t.indexOf("[object")===0&&t.indexOf(e+"]")>-1}function gd(n,e){return typeof n=="function"?n.apply(void 0,e):n}function nc(n,e){if(e===0)return n;var t;return function(r){clearTimeout(t),t=setTimeout(function(){n(r)},e)}}function hy(n,e){var t=Object.assign({},n);return e.forEach(function(r){delete t[r]}),t}function my(n){return n.split(/\s+/).filter(Boolean)}function er(n){return[].concat(n)}function rc(n,e){n.indexOf(e)===-1&&n.push(e)}function gy(n){return n.filter(function(e,t){return n.indexOf(e)===t})}function vy(n){return n.split("-")[0]}function Fi(n){return[].slice.call(n)}function ic(n){return Object.keys(n).reduce(function(e,t){return n[t]!==void 0&&(e[t]=n[t]),e},{})}function Rr(){return document.createElement("div")}function Gr(n){return["Element","Fragment"].some(function(e){return ha(n,e)})}function yy(n){return ha(n,"NodeList")}function by(n){return ha(n,"MouseEvent")}function xy(n){return!!(n&&n._tippy&&n._tippy.reference===n)}function Sy(n){return Gr(n)?[n]:yy(n)?Fi(n):Array.isArray(n)?n:Fi(document.querySelectorAll(n))}function _o(n,e){n.forEach(function(t){t&&(t.style.transitionDuration=e+"ms")})}function oc(n,e){n.forEach(function(t){t&&t.setAttribute("data-state",e)})}function Ey(n){var e,t=er(n),r=t[0];return r!=null&&(e=r.ownerDocument)!=null&&e.body?r.ownerDocument:document}function Cy(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=vy(s.placement),u=s.modifiersData.offset;if(!u)return!0;var d=c==="bottom"?u.top.y:0,f=c==="top"?u.bottom.y:0,h=c==="right"?u.left.x:0,p=c==="left"?u.right.x:0,m=o.top-r+d>a,v=r-o.bottom-f>a,S=o.left-t+h>a,C=t-o.right-p>a;return m||v||S||C})}function es(n,e,t){var r=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(i){n[r](i,t)})}function sc(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},ac=0;function ky(){Gt.isTouch||(Gt.isTouch=!0,window.performance&&document.addEventListener("mousemove",vd))}function vd(){var n=performance.now();n-ac<20&&(Gt.isTouch=!1,document.removeEventListener("mousemove",vd)),ac=n}function wy(){var n=document.activeElement;if(xy(n)){var e=n._tippy;n.blur&&!e.state.isVisible&&n.blur()}}function Ty(){document.addEventListener("touchstart",ky,In),window.addEventListener("blur",wy)}var Ay=typeof window<"u"&&typeof document<"u",Oy=Ay?!!window.msCrypto:!1;function Qn(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 lc(n){var e=/[ \t]{2,}/g,t=/^[ \t]*/gm;return n.replace(e," ").replace(t,"").trim()}function My(n){return lc(`
|
|
103
|
+
%ctippy.js
|
|
104
|
+
|
|
105
|
+
%c`+lc(n)+`
|
|
106
|
+
|
|
107
|
+
%c👷 This is a development-only message. It will be removed in production.
|
|
108
|
+
`)}function yd(n){return[My(n),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}var Jr;process.env.NODE_ENV!=="production"&&Ny();function Ny(){Jr=new Set}function sn(n,e){if(n&&!Jr.has(e)){var t;Jr.add(e),(t=console).warn.apply(t,yd(e))}}function Ms(n,e){if(n&&!Jr.has(e)){var t;Jr.add(e),(t=console).error.apply(t,yd(e))}}function Iy(n){var e=!n,t=Object.prototype.toString.call(n)==="[object Object]"&&!n.addEventListener;Ms(e,["tippy() was passed","`"+String(n)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),Ms(t,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}var bd={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Ry={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},yt=Object.assign({appendTo:md,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},bd,Ry),Dy=Object.keys(yt),Ly=function(e){process.env.NODE_ENV!=="production"&&Sd(e,[]);var t=Object.keys(e);t.forEach(function(r){yt[r]=e[r]})};function xd(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=yt[o])!=null?l:s}return r},{});return Object.assign({},n,t)}function Py(n,e){var t=e?Object.keys(xd(Object.assign({},yt,{plugins:e}))):Dy,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 cc(n,e){var t=Object.assign({},e,{content:gd(e.content,[n])},e.ignoreAttributes?{}:Py(n,e.plugins));return t.aria=Object.assign({},yt.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 Sd(n,e){n===void 0&&(n={}),e===void 0&&(e=[]);var t=Object.keys(n);t.forEach(function(r){var i=hy(yt,Object.keys(bd)),o=!py(i,r);o&&(o=e.filter(function(s){return s.name===r}).length===0),sn(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.",`
|
|
109
|
+
|
|
110
|
+
`,`All props: https://atomiks.github.io/tippyjs/v6/all-props/
|
|
111
|
+
`,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var Fy=function(){return"innerHTML"};function Ns(n,e){n[Fy()]=e}function uc(n){var e=Rr();return n===!0?e.className=pd:(e.className=hd,Gr(n)?e.appendChild(n):Ns(e,n)),e}function dc(n,e){Gr(e.content)?(Ns(n,""),n.appendChild(e.content)):typeof e.content!="function"&&(e.allowHTML?Ns(n,e.content):n.textContent=e.content)}function Is(n){var e=n.firstElementChild,t=Fi(e.children);return{box:e,content:t.find(function(r){return r.classList.contains(fd)}),arrow:t.find(function(r){return r.classList.contains(pd)||r.classList.contains(hd)}),backdrop:t.find(function(r){return r.classList.contains(fy)})}}function Ed(n){var e=Rr(),t=Rr();t.className=dy,t.setAttribute("data-state","hidden"),t.setAttribute("tabindex","-1");var r=Rr();r.className=fd,r.setAttribute("data-state","hidden"),dc(r,n.props),e.appendChild(t),t.appendChild(r),i(n.props,n.props);function i(o,s){var l=Is(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)&&dc(c,n.props),s.arrow?u?o.arrow!==s.arrow&&(a.removeChild(u),a.appendChild(uc(s.arrow))):a.appendChild(uc(s.arrow)):u&&a.removeChild(u)}return{popper:e,onUpdate:i}}Ed.$$tippy=!0;var By=1,li=[],ts=[];function zy(n,e){var t=cc(n,Object.assign({},yt,xd(ic(e)))),r,i,o,s=!1,l=!1,a=!1,c=!1,u,d,f,h=[],p=nc(N,t.interactiveDebounce),m,v=By++,S=null,C=gy(t.plugins),k={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},b={id:v,reference:n,popper:Rr(),popperInstance:S,props:t,state:k,plugins:C,clearDelayTimeouts:Oe,setProps:Fe,setContent:Pe,show:Me,hide:je,hideWithInteractivity:ut,enable:ce,disable:me,unmount:_e,destroy:cn};if(!t.render)return process.env.NODE_ENV!=="production"&&Ms(!0,"render() function has not been supplied."),b;var R=t.render(b),w=R.popper,B=R.onUpdate;w.setAttribute("data-tippy-root",""),w.id="tippy-"+b.id,b.popper=w,n._tippy=b,w._tippy=b;var V=C.map(function(X){return X.fn(b)}),$=n.hasAttribute("aria-expanded");return O(),de(),re(),W("onCreate",[b]),t.showOnCreate&&J(),w.addEventListener("mouseenter",function(){b.props.interactive&&b.state.isVisible&&b.clearDelayTimeouts()}),w.addEventListener("mouseleave",function(){b.props.interactive&&b.props.trigger.indexOf("mouseenter")>=0&&Y().addEventListener("mousemove",p)}),b;function z(){var X=b.props.touch;return Array.isArray(X)?X:[X,0]}function F(){return z()[0]==="hold"}function P(){var X;return!!((X=b.props.render)!=null&&X.$$tippy)}function U(){return m||n}function Y(){var X=U().parentNode;return X?Ey(X):document}function Q(){return Is(w)}function Z(X){return b.state.isMounted&&!b.state.isVisible||Gt.isTouch||u&&u.type==="focus"?0:qo(b.props.delay,X?0:1,yt.delay)}function re(X){X===void 0&&(X=!1),w.style.pointerEvents=b.props.interactive&&!X?"":"none",w.style.zIndex=""+b.props.zIndex}function W(X,se,ae){if(ae===void 0&&(ae=!0),V.forEach(function(Ee){Ee[X]&&Ee[X].apply(Ee,se)}),ae){var be;(be=b.props)[X].apply(be,se)}}function le(){var X=b.props.aria;if(X.content){var se="aria-"+X.content,ae=w.id,be=er(b.props.triggerTarget||n);be.forEach(function(Ee){var Be=Ee.getAttribute(se);if(b.state.isVisible)Ee.setAttribute(se,Be?Be+" "+ae:ae);else{var $e=Be&&Be.replace(ae,"").trim();$e?Ee.setAttribute(se,$e):Ee.removeAttribute(se)}})}}function de(){if(!($||!b.props.aria.expanded)){var X=er(b.props.triggerTarget||n);X.forEach(function(se){b.props.interactive?se.setAttribute("aria-expanded",b.state.isVisible&&se===U()?"true":"false"):se.removeAttribute("aria-expanded")})}}function ve(){Y().removeEventListener("mousemove",p),li=li.filter(function(X){return X!==p})}function Se(X){if(!(Gt.isTouch&&(a||X.type==="mousedown"))){var se=X.composedPath&&X.composedPath()[0]||X.target;if(!(b.props.interactive&&sc(w,se))){if(er(b.props.triggerTarget||n).some(function(ae){return sc(ae,se)})){if(Gt.isTouch||b.state.isVisible&&b.props.trigger.indexOf("click")>=0)return}else W("onClickOutside",[b,X]);b.props.hideOnClick===!0&&(b.clearDelayTimeouts(),b.hide(),l=!0,setTimeout(function(){l=!1}),b.state.isMounted||Te())}}}function ye(){a=!0}function we(){a=!1}function Ce(){var X=Y();X.addEventListener("mousedown",Se,!0),X.addEventListener("touchend",Se,In),X.addEventListener("touchstart",we,In),X.addEventListener("touchmove",ye,In)}function Te(){var X=Y();X.removeEventListener("mousedown",Se,!0),X.removeEventListener("touchend",Se,In),X.removeEventListener("touchstart",we,In),X.removeEventListener("touchmove",ye,In)}function ge(X,se){M(X,function(){!b.state.isVisible&&w.parentNode&&w.parentNode.contains(w)&&se()})}function A(X,se){M(X,se)}function M(X,se){var ae=Q().box;function be(Ee){Ee.target===ae&&(es(ae,"remove",be),se())}if(X===0)return se();es(ae,"remove",d),es(ae,"add",be),d=be}function E(X,se,ae){ae===void 0&&(ae=!1);var be=er(b.props.triggerTarget||n);be.forEach(function(Ee){Ee.addEventListener(X,se,ae),h.push({node:Ee,eventType:X,handler:se,options:ae})})}function O(){F()&&(E("touchstart",x,{passive:!0}),E("touchend",I,{passive:!0})),my(b.props.trigger).forEach(function(X){if(X!=="manual")switch(E(X,x),X){case"mouseenter":E("mouseleave",I);break;case"focus":E(Oy?"focusout":"blur",D);break;case"focusin":E("focusout",D);break}})}function y(){h.forEach(function(X){var se=X.node,ae=X.eventType,be=X.handler,Ee=X.options;se.removeEventListener(ae,be,Ee)}),h=[]}function x(X){var se,ae=!1;if(!(!b.state.isEnabled||L(X)||l)){var be=((se=u)==null?void 0:se.type)==="focus";u=X,m=X.currentTarget,de(),!b.state.isVisible&&by(X)&&li.forEach(function(Ee){return Ee(X)}),X.type==="click"&&(b.props.trigger.indexOf("mouseenter")<0||s)&&b.props.hideOnClick!==!1&&b.state.isVisible?ae=!0:J(X),X.type==="click"&&(s=!ae),ae&&!be&&_(X)}}function N(X){var se=X.target,ae=U().contains(se)||w.contains(se);if(!(X.type==="mousemove"&&ae)){var be=G().concat(w).map(function(Ee){var Be,$e=Ee._tippy,rt=(Be=$e.popperInstance)==null?void 0:Be.state;return rt?{popperRect:Ee.getBoundingClientRect(),popperState:rt,props:t}:null}).filter(Boolean);Cy(be,X)&&(ve(),_(X))}}function I(X){var se=L(X)||b.props.trigger.indexOf("click")>=0&&s;if(!se){if(b.props.interactive){b.hideWithInteractivity(X);return}_(X)}}function D(X){b.props.trigger.indexOf("focusin")<0&&X.target!==U()||b.props.interactive&&X.relatedTarget&&w.contains(X.relatedTarget)||_(X)}function L(X){return Gt.isTouch?F()!==X.type.indexOf("touch")>=0:!1}function H(){K();var X=b.props,se=X.popperOptions,ae=X.placement,be=X.offset,Ee=X.getReferenceClientRect,Be=X.moveTransition,$e=P()?Is(w).arrow:null,rt=Ee?{getBoundingClientRect:Ee,contextElement:Ee.contextElement||U()}:n,it={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(un){var gt=un.state;if(P()){var St=Q(),Jn=St.box;["placement","reference-hidden","escaped"].forEach(function(Et){Et==="placement"?Jn.setAttribute("data-placement",gt.placement):gt.attributes.popper["data-popper-"+Et]?Jn.setAttribute("data-"+Et,""):Jn.removeAttribute("data-"+Et)}),gt.attributes.popper={}}}},Ye=[{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:!Be}},it];P()&&$e&&Ye.push({name:"arrow",options:{element:$e,padding:3}}),Ye.push.apply(Ye,(se==null?void 0:se.modifiers)||[]),b.popperInstance=uy(rt,w,Object.assign({},se,{placement:ae,onFirstUpdate:f,modifiers:Ye}))}function K(){b.popperInstance&&(b.popperInstance.destroy(),b.popperInstance=null)}function j(){var X=b.props.appendTo,se,ae=U();b.props.interactive&&X===md||X==="parent"?se=ae.parentNode:se=gd(X,[ae]),se.contains(w)||se.appendChild(w),b.state.isMounted=!0,H(),process.env.NODE_ENV!=="production"&&sn(b.props.interactive&&X===yt.appendTo&&ae.nextElementSibling!==w,["Interactive tippy element may not be accessible via keyboard","navigation because it is not directly after the reference element","in the DOM source order.",`
|
|
112
|
+
|
|
113
|
+
`,"Using a wrapper <div> or <span> tag around the reference element","solves this by creating a new parentNode context.",`
|
|
114
|
+
|
|
115
|
+
`,"Specifying `appendTo: document.body` silences this warning, but it","assumes you are using a focus management solution to handle","keyboard navigation.",`
|
|
116
|
+
|
|
117
|
+
`,"See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "))}function G(){return Fi(w.querySelectorAll("[data-tippy-root]"))}function J(X){b.clearDelayTimeouts(),X&&W("onTrigger",[b,X]),Ce();var se=Z(!0),ae=z(),be=ae[0],Ee=ae[1];Gt.isTouch&&be==="hold"&&Ee&&(se=Ee),se?r=setTimeout(function(){b.show()},se):b.show()}function _(X){if(b.clearDelayTimeouts(),W("onUntrigger",[b,X]),!b.state.isVisible){Te();return}if(!(b.props.trigger.indexOf("mouseenter")>=0&&b.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(X.type)>=0&&s)){var se=Z(!1);se?i=setTimeout(function(){b.state.isVisible&&b.hide()},se):o=requestAnimationFrame(function(){b.hide()})}}function ce(){b.state.isEnabled=!0}function me(){b.hide(),b.state.isEnabled=!1}function Oe(){clearTimeout(r),clearTimeout(i),cancelAnimationFrame(o)}function Fe(X){if(process.env.NODE_ENV!=="production"&&sn(b.state.isDestroyed,Qn("setProps")),!b.state.isDestroyed){W("onBeforeUpdate",[b,X]),y();var se=b.props,ae=cc(n,Object.assign({},se,ic(X),{ignoreAttributes:!0}));b.props=ae,O(),se.interactiveDebounce!==ae.interactiveDebounce&&(ve(),p=nc(N,ae.interactiveDebounce)),se.triggerTarget&&!ae.triggerTarget?er(se.triggerTarget).forEach(function(be){be.removeAttribute("aria-expanded")}):ae.triggerTarget&&n.removeAttribute("aria-expanded"),de(),re(),B&&B(se,ae),b.popperInstance&&(H(),G().forEach(function(be){requestAnimationFrame(be._tippy.popperInstance.forceUpdate)})),W("onAfterUpdate",[b,X])}}function Pe(X){b.setProps({content:X})}function Me(){process.env.NODE_ENV!=="production"&&sn(b.state.isDestroyed,Qn("show"));var X=b.state.isVisible,se=b.state.isDestroyed,ae=!b.state.isEnabled,be=Gt.isTouch&&!b.props.touch,Ee=qo(b.props.duration,0,yt.duration);if(!(X||se||ae||be)&&!U().hasAttribute("disabled")&&(W("onShow",[b],!1),b.props.onShow(b)!==!1)){if(b.state.isVisible=!0,P()&&(w.style.visibility="visible"),re(),Ce(),b.state.isMounted||(w.style.transition="none"),P()){var Be=Q(),$e=Be.box,rt=Be.content;_o([$e,rt],0)}f=function(){var Ye;if(!(!b.state.isVisible||c)){if(c=!0,w.offsetHeight,w.style.transition=b.props.moveTransition,P()&&b.props.animation){var Ht=Q(),un=Ht.box,gt=Ht.content;_o([un,gt],Ee),oc([un,gt],"visible")}le(),de(),rc(ts,b),(Ye=b.popperInstance)==null||Ye.forceUpdate(),W("onMount",[b]),b.props.animation&&P()&&A(Ee,function(){b.state.isShown=!0,W("onShown",[b])})}},j()}}function je(){process.env.NODE_ENV!=="production"&&sn(b.state.isDestroyed,Qn("hide"));var X=!b.state.isVisible,se=b.state.isDestroyed,ae=!b.state.isEnabled,be=qo(b.props.duration,1,yt.duration);if(!(X||se||ae)&&(W("onHide",[b],!1),b.props.onHide(b)!==!1)){if(b.state.isVisible=!1,b.state.isShown=!1,c=!1,s=!1,P()&&(w.style.visibility="hidden"),ve(),Te(),re(!0),P()){var Ee=Q(),Be=Ee.box,$e=Ee.content;b.props.animation&&(_o([Be,$e],be),oc([Be,$e],"hidden"))}le(),de(),b.props.animation?P()&&ge(be,b.unmount):b.unmount()}}function ut(X){process.env.NODE_ENV!=="production"&&sn(b.state.isDestroyed,Qn("hideWithInteractivity")),Y().addEventListener("mousemove",p),rc(li,p),p(X)}function _e(){process.env.NODE_ENV!=="production"&&sn(b.state.isDestroyed,Qn("unmount")),b.state.isVisible&&b.hide(),b.state.isMounted&&(K(),G().forEach(function(X){X._tippy.unmount()}),w.parentNode&&w.parentNode.removeChild(w),ts=ts.filter(function(X){return X!==b}),b.state.isMounted=!1,W("onHidden",[b]))}function cn(){process.env.NODE_ENV!=="production"&&sn(b.state.isDestroyed,Qn("destroy")),!b.state.isDestroyed&&(b.clearDelayTimeouts(),b.unmount(),y(),delete n._tippy,b.state.isDestroyed=!0,W("onDestroy",[b]))}}function br(n,e){e===void 0&&(e={});var t=yt.plugins.concat(e.plugins||[]);process.env.NODE_ENV!=="production"&&(Iy(n),Sd(e,t)),Ty();var r=Object.assign({},e,{plugins:t}),i=Sy(n);if(process.env.NODE_ENV!=="production"){var o=Gr(r.content),s=i.length>1;sn(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.",`
|
|
118
|
+
|
|
119
|
+
`,"Instead, pass the .innerHTML of the element, or use a function that","returns a cloned version of the element instead.",`
|
|
120
|
+
|
|
121
|
+
`,`1) content: element.innerHTML
|
|
122
|
+
`,"2) content: () => element.cloneNode(true)"].join(" "))}var l=i.reduce(function(a,c){var u=c&&zy(c,r);return u&&a.push(u),a},[]);return Gr(n)?l[0]:l}br.defaultProps=yt;br.setDefaultProps=Ly;br.currentInput=Gt;Object.assign({},id,{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)}});br.setDefaultProps({render:Ed});class Vy{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:h}=f,p=!d.textBetween(c,u).length&&ia(a.selection),m=this.element.contains(document.activeElement);return!(!(l.hasFocus()||m)||h||p||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:l})=>{var a;if(this.preventHide){this.preventHide=!1;return}l!=null&&l.relatedTarget&&(!((a=this.element.parentNode)===null||a===void 0)&&a.contains(l.relatedTarget))||this.hide()},this.tippyBlurHandler=l=>{this.blurHandler({event:l})},this.handleDebouncedUpdate=(l,a)=>{const c=!(a!=null&&a.selection.eq(l.state.selection)),u=!(a!=null&&a.doc.eq(l.state.doc));!c&&!u||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(l,c,u,a)},this.updateDelay))},this.updateHandler=(l,a,c,u)=>{var d,f,h;const{state:p,composing:m}=l,{selection:v}=p;if(m||!a&&!c)return;this.createTooltip();const{ranges:C}=v,k=Math.min(...C.map(w=>w.$from.pos)),b=Math.max(...C.map(w=>w.$to.pos));if(!((d=this.shouldShow)===null||d===void 0?void 0:d.call(this,{editor:this.editor,view:l,state:p,oldState:u,from:k,to:b}))){this.hide();return}(f=this.tippy)===null||f===void 0||f.setProps({getReferenceClientRect:((h=this.tippyOptions)===null||h===void 0?void 0:h.getReferenceClientRect)||(()=>{if(A0(p.selection)){let w=l.nodeDOM(k);const B=w.dataset.nodeViewWrapper?w:w.querySelector("[data-node-view-wrapper]");if(B&&(w=B.firstChild),w)return w.getBoundingClientRect()}return td(l,k,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=br(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 Cd=n=>new mt({key:typeof n.pluginKey=="string"?new $t(n.pluginKey):n.pluginKey,view:e=>new Vy({view:e,...n})});Nt.create({name:"bubbleMenu",addOptions(){return{element:null,tippyOptions:{},pluginKey:"bubbleMenu",updateDelay:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[Cd({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,updateDelay:this.options.updateDelay,shouldShow:this.options.shouldShow})]:[]}});class $y{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=br(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)||(()=>td(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 kd=n=>new mt({key:typeof n.pluginKey=="string"?new $t(n.pluginKey):n.pluginKey,view:e=>new $y({view:e,...n})});Nt.create({name:"floatingMenu",addOptions(){return{element:null,tippyOptions:{},pluginKey:"floatingMenu",shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[kd({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow})]:[]}});g.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=g.ref(null);return g.onMounted(()=>{const{updateDelay:r,editor:i,pluginKey:o,shouldShow:s,tippyOptions:l}=n;i.registerPlugin(Cd({updateDelay:r,editor:i,element:t.value,pluginKey:o,shouldShow:s,tippyOptions:l}))}),g.onBeforeUnmount(()=>{const{pluginKey:r,editor:i}=n;i.unregisterPlugin(r)}),()=>{var r;return g.h("div",{ref:t},(r=e.default)===null||r===void 0?void 0:r.call(e))}}});function fc(n){return g.customRef((e,t)=>({get(){return e(),n},set(r){n=r,requestAnimationFrame(()=>{requestAnimationFrame(()=>{t()})})}}))}class Hy extends nv{constructor(e={}){return super(e),this.vueRenderers=g.reactive(new Map),this.contentComponent=null,this.reactiveState=fc(this.view.state),this.reactiveExtensionStorage=fc(this.extensionStorage),this.on("transaction",()=>{this.reactiveState.value=this.view.state,this.reactiveExtensionStorage.value=this.extensionStorage}),g.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 Uy=g.defineComponent({name:"EditorContent",props:{editor:{default:null,type:Object}},setup(n){const e=g.ref(),t=g.getCurrentInstance();return g.watchEffect(()=>{const r=n.editor;r&&r.options.element&&e.value&&g.nextTick(()=>{if(!e.value||!r.options.element.firstChild)return;const i=g.unref(e.value);e.value.append(...r.options.element.childNodes),r.contentComponent=t.ctx._,r.setOptions({element:i}),r.createNodeViews()})}),g.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=g.h(g.Teleport,{to:e.teleportElement,key:e.id},g.h(e.component,{ref:e.id,...e.props}));n.push(t)}),g.h("div",{ref:e=>{this.rootEl=e}},...n)}});g.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=g.ref(null);return g.onMounted(()=>{const{pluginKey:r,editor:i,tippyOptions:o,shouldShow:s}=n;i.registerPlugin(kd({pluginKey:r,editor:i,element:t.value,tippyOptions:o,shouldShow:s}))}),g.onBeforeUnmount(()=>{const{pluginKey:r,editor:i}=n;i.unregisterPlugin(r)}),()=>{var r;return g.h("div",{ref:t},(r=e.default)===null||r===void 0?void 0:r.call(e))}}});g.defineComponent({name:"NodeViewContent",props:{as:{type:String,default:"div"}},render(){return g.h(this.as,{style:{whiteSpace:"pre-wrap"},"data-node-view-content":""})}});g.defineComponent({name:"NodeViewWrapper",props:{as:{type:String,default:"div"}},inject:["onDragStart","decorationClasses"],render(){var n,e;return g.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 jy=(n={})=>{const e=g.shallowRef();return g.onMounted(()=>{e.value=new Hy(n)}),g.onBeforeUnmount(()=>{var t;(t=e.value)===null||t===void 0||t.destroy()}),e},Wy=It.create({name:"doc",topNode:!0,content:"block+"}),Ky=It.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:n}){return["p",ct(this.options.HTMLAttributes,n),0]},addCommands(){return{setParagraph:()=>({commands:n})=>n.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),Gy=It.create({name:"text",group:"inline"}),Jy="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4vianca6w0s2x0a2z0ure5ba0by2idu3namex3narepublic11d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0cast4mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dabur3d1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0ardian6cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2tura4vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9dnavy5lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0a1b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp2w2ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4finity6ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",Yy="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",vr=(n,e)=>{for(const t in e)n[t]=e[t];return n},Rs="numeric",Ds="ascii",Ls="alpha",gi="asciinumeric",ci="alphanumeric",Ps="domain",wd="emoji",Xy="scheme",Qy="slashscheme",pc="whitespace";function Zy(n,e){return n in e||(e[n]=[]),e[n]}function Fn(n,e,t){e[Rs]&&(e[gi]=!0,e[ci]=!0),e[Ds]&&(e[gi]=!0,e[Ls]=!0),e[gi]&&(e[ci]=!0),e[Ls]&&(e[ci]=!0),e[ci]&&(e[Ps]=!0),e[wd]&&(e[Ps]=!0);for(const r in e){const i=Zy(r,t);i.indexOf(n)<0&&i.push(n)}}function qy(n,e){const t={};for(const r in e)e[r].indexOf(n)>=0&&(t[r]=!0);return t}function dt(n){n===void 0&&(n=null),this.j={},this.jr=[],this.jd=null,this.t=n}dt.groups={};dt.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||dt.groups;let i;return e&&e.j?i=e:(i=new dt(e),t&&r&&Fn(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||dt.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 dt,vr(s.j,l.j),s.jr.push.apply(s.jr,l.jr),s.jd=l.jd,s.t=l.t):s=new dt,o){if(r)if(s.t&&typeof s.t=="string"){const a=vr(qy(s.t,r),t);Fn(o,a,r)}else t&&Fn(o,t,r);s.t=o}return i.j[n]=s,s}};const Ae=(n,e,t,r,i)=>n.ta(e,t,r,i),wt=(n,e,t,r,i)=>n.tr(e,t,r,i),hc=(n,e,t,r,i)=>n.ts(e,t,r,i),ue=(n,e,t,r,i)=>n.tt(e,t,r,i),rn="WORD",Fs="UWORD",Yr="LOCALHOST",Bs="TLD",zs="UTLD",vi="SCHEME",tr="SLASH_SCHEME",ma="NUM",Td="WS",ga="NL",Dr="OPENBRACE",Lr="CLOSEBRACE",Bi="OPENBRACKET",zi="CLOSEBRACKET",Vi="OPENPAREN",$i="CLOSEPAREN",Hi="OPENANGLEBRACKET",Ui="CLOSEANGLEBRACKET",ji="FULLWIDTHLEFTPAREN",Wi="FULLWIDTHRIGHTPAREN",Ki="LEFTCORNERBRACKET",Gi="RIGHTCORNERBRACKET",Ji="LEFTWHITECORNERBRACKET",Yi="RIGHTWHITECORNERBRACKET",Xi="FULLWIDTHLESSTHAN",Qi="FULLWIDTHGREATERTHAN",Zi="AMPERSAND",qi="APOSTROPHE",_i="ASTERISK",mn="AT",eo="BACKSLASH",to="BACKTICK",no="CARET",vn="COLON",va="COMMA",ro="DOLLAR",jt="DOT",io="EQUALS",ya="EXCLAMATION",Wt="HYPHEN",oo="PERCENT",so="PIPE",ao="PLUS",lo="POUND",co="QUERY",ba="QUOTE",xa="SEMI",Kt="SLASH",Pr="TILDE",uo="UNDERSCORE",Ad="EMOJI",fo="SYM";var Od=Object.freeze({__proto__:null,WORD:rn,UWORD:Fs,LOCALHOST:Yr,TLD:Bs,UTLD:zs,SCHEME:vi,SLASH_SCHEME:tr,NUM:ma,WS:Td,NL:ga,OPENBRACE:Dr,CLOSEBRACE:Lr,OPENBRACKET:Bi,CLOSEBRACKET:zi,OPENPAREN:Vi,CLOSEPAREN:$i,OPENANGLEBRACKET:Hi,CLOSEANGLEBRACKET:Ui,FULLWIDTHLEFTPAREN:ji,FULLWIDTHRIGHTPAREN:Wi,LEFTCORNERBRACKET:Ki,RIGHTCORNERBRACKET:Gi,LEFTWHITECORNERBRACKET:Ji,RIGHTWHITECORNERBRACKET:Yi,FULLWIDTHLESSTHAN:Xi,FULLWIDTHGREATERTHAN:Qi,AMPERSAND:Zi,APOSTROPHE:qi,ASTERISK:_i,AT:mn,BACKSLASH:eo,BACKTICK:to,CARET:no,COLON:vn,COMMA:va,DOLLAR:ro,DOT:jt,EQUALS:io,EXCLAMATION:ya,HYPHEN:Wt,PERCENT:oo,PIPE:so,PLUS:ao,POUND:lo,QUERY:co,QUOTE:ba,SEMI:xa,SLASH:Kt,TILDE:Pr,UNDERSCORE:uo,EMOJI:Ad,SYM:fo});const Zn=/[a-z]/,ns=/\p{L}/u,rs=/\p{Emoji}/u,is=/\d/,mc=/\s/,gc=`
|
|
123
|
+
`,_y="️",e2="";let ui=null,di=null;function t2(n){n===void 0&&(n=[]);const e={};dt.groups=e;const t=new dt;ui==null&&(ui=vc(Jy)),di==null&&(di=vc(Yy)),ue(t,"'",qi),ue(t,"{",Dr),ue(t,"}",Lr),ue(t,"[",Bi),ue(t,"]",zi),ue(t,"(",Vi),ue(t,")",$i),ue(t,"<",Hi),ue(t,">",Ui),ue(t,"(",ji),ue(t,")",Wi),ue(t,"「",Ki),ue(t,"」",Gi),ue(t,"『",Ji),ue(t,"』",Yi),ue(t,"<",Xi),ue(t,">",Qi),ue(t,"&",Zi),ue(t,"*",_i),ue(t,"@",mn),ue(t,"`",to),ue(t,"^",no),ue(t,":",vn),ue(t,",",va),ue(t,"$",ro),ue(t,".",jt),ue(t,"=",io),ue(t,"!",ya),ue(t,"-",Wt),ue(t,"%",oo),ue(t,"|",so),ue(t,"+",ao),ue(t,"#",lo),ue(t,"?",co),ue(t,'"',ba),ue(t,"/",Kt),ue(t,";",xa),ue(t,"~",Pr),ue(t,"_",uo),ue(t,"\\",eo);const r=wt(t,is,ma,{[Rs]:!0});wt(r,is,r);const i=wt(t,Zn,rn,{[Ds]:!0});wt(i,Zn,i);const o=wt(t,ns,Fs,{[Ls]:!0});wt(o,Zn),wt(o,ns,o);const s=wt(t,mc,Td,{[pc]:!0});ue(t,gc,ga,{[pc]:!0}),ue(s,gc),wt(s,mc,s);const l=wt(t,rs,Ad,{[wd]:!0});wt(l,rs,l),ue(l,_y,l);const a=ue(l,e2);wt(a,rs,l);const c=[[Zn,i]],u=[[Zn,null],[ns,o]];for(let d=0;d<ui.length;d++)fn(t,ui[d],Bs,rn,c);for(let d=0;d<di.length;d++)fn(t,di[d],zs,Fs,u);Fn(Bs,{tld:!0,ascii:!0},e),Fn(zs,{utld:!0,alpha:!0},e),fn(t,"file",vi,rn,c),fn(t,"mailto",vi,rn,c),fn(t,"http",tr,rn,c),fn(t,"https",tr,rn,c),fn(t,"ftp",tr,rn,c),fn(t,"ftps",tr,rn,c),Fn(vi,{scheme:!0,ascii:!0},e),Fn(tr,{slashscheme:!0,ascii:!0},e),n=n.sort((d,f)=>d[0]>f[0]?1:-1);for(let d=0;d<n.length;d++){const f=n[d][0],p=n[d][1]?{[Xy]:!0}:{[Qy]:!0};f.indexOf("-")>=0?p[Ps]=!0:Zn.test(f)?is.test(f)?p[gi]=!0:p[Ds]=!0:p[Rs]=!0,hc(t,f,f,p)}return hc(t,"localhost",Yr,{ascii:!0}),t.jd=new dt(fo),{start:t,tokens:vr({groups:e},Od)}}function n2(n,e){const t=r2(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 r2(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 fn(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 dt(r),o.jr=i.slice(),n.j[a]=o),n=o}return o=new dt(t),o.jr=i.slice(),n.j[e[s-1]]=o,o}function vc(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 Xr={defaultProtocol:"http",events:null,format:yc,formatHref:yc,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function Sa(n,e){e===void 0&&(e=null);let t=vr({},Xr);n&&(t=vr(t,n instanceof Sa?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}Sa.prototype={o:Xr,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]:Xr[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 yc(n){return n}function Md(n,e){this.t="token",this.v=n,this.tk=e}Md.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=Xr.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&&vr(s,u),{tagName:i,attributes:s,content:o,eventListeners:d}}};function Ao(n,e){class t extends Md{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 bc=Ao("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),xc=Ao("text"),i2=Ao("nl"),fi=Ao("url",{isLink:!0,toHref(n){return n===void 0&&(n=Xr.defaultProtocol),this.hasProtocol()?this.v:`${n}://${this.v}`},hasProtocol(){const n=this.tk;return n.length>=2&&n[0].t!==Yr&&n[1].t===vn}}),Tt=n=>new dt(n);function o2(n){let{groups:e}=n;const t=e.domain.concat([Zi,_i,mn,eo,to,no,ro,io,Wt,ma,oo,so,ao,lo,Kt,fo,Pr,uo]),r=[qi,vn,va,jt,ya,co,ba,xa,Hi,Ui,Dr,Lr,zi,Bi,Vi,$i,ji,Wi,Ki,Gi,Ji,Yi,Xi,Qi],i=[Zi,qi,_i,eo,to,no,ro,io,Wt,Dr,Lr,oo,so,ao,lo,co,Kt,fo,Pr,uo],o=Tt(),s=ue(o,Pr);Ae(s,i,s),Ae(s,e.domain,s);const l=Tt(),a=Tt(),c=Tt();Ae(o,e.domain,l),Ae(o,e.scheme,a),Ae(o,e.slashscheme,c),Ae(l,i,s),Ae(l,e.domain,l);const u=ue(l,mn);ue(s,mn,u),ue(a,mn,u),ue(c,mn,u);const d=ue(s,jt);Ae(d,i,s),Ae(d,e.domain,s);const f=Tt();Ae(u,e.domain,f),Ae(f,e.domain,f);const h=ue(f,jt);Ae(h,e.domain,f);const p=Tt(bc);Ae(h,e.tld,p),Ae(h,e.utld,p),ue(u,Yr,p);const m=ue(f,Wt);Ae(m,e.domain,f),Ae(p,e.domain,f),ue(p,jt,h),ue(p,Wt,m);const v=ue(p,vn);Ae(v,e.numeric,bc);const S=ue(l,Wt),C=ue(l,jt);Ae(S,e.domain,l),Ae(C,i,s),Ae(C,e.domain,l);const k=Tt(fi);Ae(C,e.tld,k),Ae(C,e.utld,k),Ae(k,e.domain,l),Ae(k,i,s),ue(k,jt,C),ue(k,Wt,S),ue(k,mn,u);const b=ue(k,vn),R=Tt(fi);Ae(b,e.numeric,R);const w=Tt(fi),B=Tt();Ae(w,t,w),Ae(w,r,B),Ae(B,t,w),Ae(B,r,B),ue(k,Kt,w),ue(R,Kt,w);const V=ue(a,vn),$=ue(c,vn),z=ue($,Kt),F=ue(z,Kt);Ae(a,e.domain,l),ue(a,jt,C),ue(a,Wt,S),Ae(c,e.domain,l),ue(c,jt,C),ue(c,Wt,S),Ae(V,e.domain,w),ue(V,Kt,w),Ae(F,e.domain,w),Ae(F,t,w),ue(F,Kt,w);const P=[[Dr,Lr],[Bi,zi],[Vi,$i],[Hi,Ui],[ji,Wi],[Ki,Gi],[Ji,Yi],[Xi,Qi]];for(let U=0;U<P.length;U++){const[Y,Q]=P[U],Z=ue(w,Y);ue(B,Y,Z),ue(Z,Q,w);const re=Tt(fi);Ae(Z,t,re);const W=Tt();Ae(Z,r),Ae(re,t,re),Ae(re,r,W),Ae(W,t,re),Ae(W,r,W),ue(re,Q,w),ue(W,Q,w)}return ue(o,Yr,k),ue(o,ga,i2),{start:o,tokens:Od}}function s2(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(ss(xc,e,s)),s=[]),i-=f,u-=f;const h=d.t,p=t.slice(i-u,i);o.push(ss(h,e,p))}}return s.length>0&&o.push(ss(xc,e,s)),o}function ss(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 a2=typeof console<"u"&&console&&console.warn||(()=>{}),l2="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",ze={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function c2(){dt.groups={},ze.scanner=null,ze.parser=null,ze.tokenQueue=[],ze.pluginQueue=[],ze.customSchemes=[],ze.initialized=!1}function Sc(n,e){if(e===void 0&&(e=!1),ze.initialized&&a2(`linkifyjs: already initialized - will not register custom scheme "${n}" ${l2}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(n))throw new Error(`linkifyjs: incorrect scheme format.
|
|
124
|
+
1. Must only contain digits, lowercase ASCII letters or "-"
|
|
125
|
+
2. Cannot start or end with "-"
|
|
126
|
+
3. "-" cannot repeat`);ze.customSchemes.push([n,e])}function u2(){ze.scanner=t2(ze.customSchemes);for(let n=0;n<ze.tokenQueue.length;n++)ze.tokenQueue[n][1]({scanner:ze.scanner});ze.parser=o2(ze.scanner.tokens);for(let n=0;n<ze.pluginQueue.length;n++)ze.pluginQueue[n][1]({scanner:ze.scanner,parser:ze.parser});ze.initialized=!0}function d2(n){return ze.initialized||u2(),s2(ze.parser.start,n,n2(ze.scanner.start,n))}function Ea(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 Sa(t),i=d2(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 f2(n){return new mt({key:new $t("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=m0(t.doc,[...e]);if(k0(l).forEach(({newRange:c})=>{const u=v0(r.doc,c,h=>h.isTextblock);let d,f;if(u.length>1?(d=u[0],f=r.doc.textBetween(d.pos,d.pos+d.node.nodeSize,void 0," ")):u.length&&r.doc.textBetween(c.from,c.to," "," ").endsWith(" ")&&(d=u[0],f=r.doc.textBetween(d.pos,c.to,void 0," ")),d&&f){const h=f.split(" ").filter(v=>v!=="");if(h.length<=0)return!1;const p=h[h.length-1],m=d.pos+f.lastIndexOf(p);if(!p)return!1;Ea(p).filter(v=>v.isLink).map(v=>({...v,from:m+v.start+1,to:m+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=>{aa(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 p2(n){return new mt({key:new $t("handleClickLink"),props:{handleClick:(e,t,r)=>{var i,o;if(r.button!==0||r.target.nodeName!=="A")return!1;const l=ed(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 h2(n){return new mt({key:new $t("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(p=>{a+=p.textContent});const c=Ea(a).find(p=>p.isLink&&p.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),h=f?f[1]:c.href;return n.editor.commands.setMark(n.type,{href:h}),!0}}})}const m2=qt.create({name:"link",priority:1e3,keepOnSplit:!1,onCreate(){this.options.protocols.forEach(n=>{if(typeof n=="string"){Sc(n);return}Sc(n.scheme,n.optionalSlashes)})},onDestroy(){c2()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:void 0}},addAttributes(){return{href:{default:null},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:'a[href]:not([href *= "javascript:" i])'}]},renderHTML({HTMLAttributes:n}){return["a",ct(this.options.HTMLAttributes,n),0]},addCommands(){return{setLink:n=>({chain:e})=>e().setMark(this.name,n).setMeta("preventAutolink",!0).run(),toggleLink:n=>({chain:e})=>e().toggleMark(this.name,n,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run(),unsetLink:()=>({chain:n})=>n().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[jr({find:n=>Ea(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(f2({type:this.type,validate:this.options.validate})),this.options.openOnClick&&n.push(p2({type:this.type})),this.options.linkOnPaste&&n.push(h2({editor:this.editor,type:this.type})),n}}),g2=m2.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})}}}}),v2=Nt.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new mt({key:new $t("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=Ot.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}),We.create(n,i)}}})]}}),y2=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))$/,b2=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))/g,x2=/(?:^|\s)((?:__)((?:[^__]+))(?:__))$/,S2=/(?:^|\s)((?:__)((?:[^__]+))(?:__))/g,E2=qt.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:n=>n.style.fontWeight!=="normal"&&null},{style:"font-weight",getAttrs:n=>/^(bold(er)?|[5-9]\d{2,})$/.test(n)&&null}]},renderHTML({HTMLAttributes:n}){return["strong",ct(this.options.HTMLAttributes,n),0]},addCommands(){return{setBold:()=>({commands:n})=>n.setMark(this.name),toggleBold:()=>({commands:n})=>n.toggleMark(this.name),unsetBold:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[Di({find:y2,type:this.type}),Di({find:x2,type:this.type})]},addPasteRules(){return[jr({find:b2,type:this.type}),jr({find:S2,type:this.type})]}}),C2=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))$/,k2=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))/g,w2=/(?:^|\s)((?:_)((?:[^_]+))(?:_))$/,T2=/(?:^|\s)((?:_)((?:[^_]+))(?:_))/g,A2=qt.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:n=>n.style.fontStyle!=="normal"&&null},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:n}){return["em",ct(this.options.HTMLAttributes,n),0]},addCommands(){return{setItalic:()=>({commands:n})=>n.setMark(this.name),toggleItalic:()=>({commands:n})=>n.toggleMark(this.name),unsetItalic:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Di({find:C2,type:this.type}),Di({find:w2,type:this.type})]},addPasteRules(){return[jr({find:k2,type:this.type}),jr({find:T2,type:this.type})]}}),O2=qt.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:n=>n.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["u",ct(this.options.HTMLAttributes,n),0]},addCommands(){return{setUnderline:()=>({commands:n})=>n.setMark(this.name),toggleUnderline:()=>({commands:n})=>n.toggleMark(this.name),unsetUnderline:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),M2=It.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:n}){return["li",ct(this.options.HTMLAttributes,n),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),N2=It.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:n}){return["li",ct(this.options.HTMLAttributes,n),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),Ec=qt.create({name:"textStyle",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:n=>n.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["span",ct(this.options.HTMLAttributes,n),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:n,commands:e})=>{const t=ko(n,this.type);return Object.entries(t).some(([,i])=>!!i)?!0:e.unsetMark(this.name)}}}}),Cc=/^\s*([-+*])\s$/,I2=It.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:n}){return["ul",ct(this.options.HTMLAttributes,n),0]},addCommands(){return{toggleBulletList:()=>({commands:n,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(N2.name,this.editor.getAttributes(Ec.name)).run():n.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let n=Li({find:Cc,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(n=Li({find:Cc,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(Ec.name),editor:this.editor})),[n]}}),R2=It.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:n}){return["li",ct(this.options.HTMLAttributes,n),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),kc=qt.create({name:"textStyle",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:n=>n.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["span",ct(this.options.HTMLAttributes,n),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:n,commands:e})=>{const t=ko(n,this.type);return Object.entries(t).some(([,i])=>!!i)?!0:e.unsetMark(this.name)}}}}),wc=/^(\d+)\.\s$/,D2=It.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:n=>n.hasAttribute("start")?parseInt(n.getAttribute("start")||"",10):1}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:n}){const{start:e,...t}=n;return e===1?["ol",ct(this.options.HTMLAttributes,t),0]:["ol",ct(this.options.HTMLAttributes,n),0]},addCommands(){return{toggleOrderedList:()=>({commands:n,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(R2.name,this.editor.getAttributes(kc.name)).run():n.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let n=Li({find:wc,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=Li({find:wc,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(kc.name)}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1],editor:this.editor})),[n]}}),L2=It.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:n}){return["br",ct(this.options.HTMLAttributes,n)]},renderText(){return`
|
|
127
|
+
`},addCommands(){return{setHardBreak:()=>({commands:n,chain:e,state:t,editor:r})=>n.first([()=>n.exitCode(),()=>n.command(()=>{const{selection: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()}}});typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const P2=n=>typeof n<"u";function F2(n){return JSON.parse(JSON.stringify(n))}function B2(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,h=g.getCurrentInstance(),p=t||(h==null?void 0:h.emit)||((i=h==null?void 0:h.$emit)==null?void 0:i.bind(h))||((s=(o=h==null?void 0:h.proxy)==null?void 0:o.$emit)==null?void 0:s.bind(h==null?void 0:h.proxy));let m=c;e||(e="modelValue"),m=m||`update:${e.toString()}`;const v=k=>l?typeof l=="function"?l(k):F2(k):k,S=()=>P2(n[e])?v(n[e]):d,C=k=>{f?f(k)&&p(m,k):p(m,k)};if(a){const k=S(),b=g.ref(k);let R=!1;return g.watch(()=>n[e],w=>{R||(R=!0,b.value=v(w),g.nextTick(()=>R=!1))}),g.watch(b,w=>{!R&&(w!==n[e]||u)&&C(w)},{deep:u}),b}else return g.computed({get(){return S()},set(k){C(k)}})}var yi=(n=>(n.BASIC="basic",n.FULL="full",n))(yi||{});const z2={class:"bd-markdown-editor__menu-bottom"},V2={key:0,class:"vr"},$2={key:4,class:"vr"},H2={key:7,class:"vr"},U2=g.defineComponent({__name:"BDMarkdownEditor",props:{placeholder:{},errorText:{},state:{type:Boolean},variant:{default:yi.BASIC},modelValue:{}},emits:["update:modelValue"],setup(n,{emit:e}){const t=n,r=B2(t,"modelValue",e),i=[Wy,Ky,Gy,v2.configure({placeholder:t.placeholder}),L2];t.variant===yi.FULL&&i.push(E2,A2,O2,M2,I2,D2,g2.configure({openOnClick:!1,validate:f=>/^https?:\/\//.test(f)}));const o=jy({content:r.value,extensions:i,onUpdate:({editor:f})=>{const{view:h,state:p}=f,{from:m,to:v}=h.state.selection;if(p.doc.textBetween(m-1,v,"")==" "&&f.getAttributes("link").href!=null&&f.chain().setTextSelection({from:m-1,to:v}).toggleLink({href:f.getAttributes("link").href}).setTextSelection({from:v,to:v}).run(),f.getText().trim()===""){e("update:modelValue","");return}e("update:modelValue",f.getHTML())}});g.watch(()=>t.modelValue,f=>{o.value.getHTML()!==f&&o.value.commands.setContent(f,!0,{preserveWhitespace:"full"})});const s=g.computed(()=>t.state?"is-invalid":null),l=g.computed(()=>d("bold")),a=g.computed(()=>d("italic")),c=g.computed(()=>d("underline"));g.computed(()=>d("bulletList")),g.computed(()=>d("orderedList"));const u=g.computed(()=>t.variant===yi.FULL),d=f=>o.value&&o.value.isActive(f)?"active":null;return(f,h)=>(g.openBlock(),g.createElementBlock(g.Fragment,null,[g.createElementVNode("div",{class:g.normalizeClass(["bd-markdown-editor",s.value])},[g.createVNode(g.unref(Uy),{editor:g.unref(o)},null,8,["editor"]),g.createElementVNode("div",z2,[g.createVNode(Lt,{variant:"light",type:"button"},{default:g.withCtx(()=>[g.createVNode(g.unref(as))]),_:1}),u.value?(g.openBlock(),g.createElementBlock("div",V2)):g.createCommentVNode("",!0),u.value?(g.openBlock(),g.createBlock(Lt,{key:1,variant:"light",type:"button",class:g.normalizeClass(l.value),onClick:h[0]||(h[0]=p=>g.unref(o).chain().focus().toggleBold().run())},{default:g.withCtx(()=>[g.createVNode(g.unref(Jf))]),_:1},8,["class"])):g.createCommentVNode("",!0),u.value?(g.openBlock(),g.createBlock(Lt,{key:2,variant:"light",type:"button",class:g.normalizeClass(a.value),onClick:h[1]||(h[1]=p=>g.unref(o).chain().focus().toggleItalic().run())},{default:g.withCtx(()=>[g.createVNode(g.unref(Hf))]),_:1},8,["class"])):g.createCommentVNode("",!0),u.value?(g.openBlock(),g.createBlock(Lt,{key:3,variant:"light",type:"button",class:g.normalizeClass(c.value),onClick:h[2]||(h[2]=p=>g.unref(o).chain().focus().toggleUnderline().run())},{default:g.withCtx(()=>[g.createVNode(g.unref(_f))]),_:1},8,["class"])):g.createCommentVNode("",!0),u.value?(g.openBlock(),g.createElementBlock("div",$2)):g.createCommentVNode("",!0),u.value?(g.openBlock(),g.createBlock(Lt,{key:5,variant:"light",type:"button",class:"IsUnderlineActive",onClick:h[3]||(h[3]=p=>g.unref(o).chain().focus().toggleUnderline().run())},{default:g.withCtx(()=>[g.createVNode(g.unref(op))]),_:1})):g.createCommentVNode("",!0),u.value?(g.openBlock(),g.createBlock(Lt,{key:6,variant:"light",type:"button",class:"IsBulletListActive",onClick:h[4]||(h[4]=p=>g.unref(o).chain().focus().toggleBulletList().run())},{default:g.withCtx(()=>[g.createVNode(g.unref(dp))]),_:1})):g.createCommentVNode("",!0),u.value?(g.openBlock(),g.createElementBlock("div",H2)):g.createCommentVNode("",!0),u.value?(g.openBlock(),g.createBlock(Lt,{key:8,variant:"light",type:"button",class:"IsOrderedListActive",onClick:h[5]||(h[5]=p=>g.unref(o).chain().focus().toggleOrderedList().run())},{default:g.withCtx(()=>[g.createVNode(g.unref(vp))]),_:1})):g.createCommentVNode("",!0)])],2),g.createVNode(g.unref(Hs),{text:t.errorText,state:t.state},null,8,["text","state"])],64))}}),j2={class:"bd-dropdown dropdown"},Ca=g.defineComponent({__name:"BDDropdown",props:{right:{type:Boolean},noFlip:{type:Boolean},toggleTag:{default:"button"},text:{},variant:{default:Zr.PRIMARY},size:{default:Qr.MD},offset:{}},setup(n){const e=n,{uniqueIdentifier:t}=$s(),r=`__BD__DROPDOWN__${t.value}`,i=g.ref(!1),o=g.computed(()=>({class:{btn:e.toggleTag==="button",[`btn-${e.variant}`]:e.toggleTag==="button"&&e.variant,[`btn-${e.size}`]:e.toggleTag==="button"&&e.size},"data-bs-display":e.noFlip?"static":null,"data-bs-offset":e.offset?e.offset:null,"aria-expanded":i.value,id:r})),s=g.computed(()=>({show:i.value,"dropdown-menu-end":e.right})),l=g.computed(()=>({"aria-labelledby":r})),a=()=>{i.value=!i.value};return(c,u)=>(g.openBlock(),g.createElementBlock("div",j2,[(g.openBlock(),g.createBlock(g.resolveDynamicComponent(e.toggleTag),g.mergeProps({class:"dropdown-toggle",target:"_self",role:"button","data-bs-toggle":"dropdown"},o.value,{onClick:a}),{default:g.withCtx(()=>[g.createTextVNode(g.toDisplayString(e.text),1)]),_:1},16)),g.createElementVNode("ul",g.mergeProps({class:["dropdown-menu",s.value]},l.value),[g.renderSlot(c.$slots,"default")],16)]))}}),W2={class:"navbar navbar-expand-lg bg-white fixed-top bd-header"},K2={class:"navbar-nav d-none d-lg-flex navbar-nav--primary"},G2={class:"ms-auto"},Nd=g.defineComponent({__name:"BDHeader",props:{logoLink:{},menuItems:{},dropdownTitle:{},dropdownOptions:{}},setup(n){const e=n;return(t,r)=>(g.openBlock(),g.createElementBlock("nav",W2,[e.logoLink?(g.openBlock(),g.createBlock(ar,g.mergeProps({key:0,class:"navbar-brand ms-2"},e.logoLink),{default:g.withCtx(()=>[g.createVNode(Vs,{width:"351px",height:"61px",viewBox:"0 0 351 61",class:"d-inline-block"})]),_:1},16)):g.createCommentVNode("",!0),g.renderSlot(t.$slots,"default",{},()=>[g.createElementVNode("ul",K2,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(e.menuItems,(i,o)=>(g.openBlock(),g.createElementBlock("li",{class:"nav-item",key:o},[g.createVNode(ar,g.normalizeProps(g.guardReactiveProps(i)),null,16)]))),128))])]),g.createElementVNode("div",G2,[g.createVNode(Ca,{text:e.dropdownTitle},{default:g.withCtx(()=>[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(e.dropdownOptions,(i,o)=>(g.openBlock(),g.createBlock(Us,g.mergeProps({key:o},i),null,16))),128))]),_:1},8,["text"])])]))}}),J2={class:"modal bd-modal modal-lg",tabindex:"-1"},Y2={class:"modal-dialog"},X2={class:"modal-content"},Q2={class:"modal-header"},Z2={class:"modal-title fw-light"},q2={class:"modal-body"},_2={class:"modal-footer"},e5=g.defineComponent({__name:"BDModal",props:{title:{},submitButtonTitle:{default:"Opslaan"},hideFooterCancelButton:{type:Boolean}},emits:["submit","cancel"],setup(n,{emit:e}){const t=n,r=()=>{e("submit")},i=()=>{e("cancel")};return(o,s)=>(g.openBlock(),g.createElementBlock("div",J2,[g.createElementVNode("div",Y2,[g.createElementVNode("div",X2,[g.createElementVNode("div",Q2,[g.createElementVNode("h2",Z2,g.toDisplayString(t.title),1),g.createElementVNode("button",{type:"button",class:"btn-close w-auto","data-bs-dismiss":"modal","aria-label":"Sluiten",onClick:i},[g.createTextVNode("Sluiten "),g.createVNode(g.unref(Pf),{class:"bg-primary"})])]),g.createElementVNode("div",q2,[g.renderSlot(o.$slots,"default")]),g.createElementVNode("div",_2,[g.createElementVNode("button",{type:"button",class:"btn btn-primary",onClick:r},g.toDisplayString(t.submitButtonTitle),1),t.hideFooterCancelButton?g.createCommentVNode("",!0):(g.openBlock(),g.createElementBlock("button",{key:0,type:"button",class:"btn btn-link","data-bs-dismiss":"modal",onClick:i,"aria-label":"Annuleren"},"Annuleren"))])])])]))}});var Id=(n=>(n.PRIMARY="primary",n.SECONDARY="secondary",n.COLLEAGUE="colleague",n.DANGER="danger",n.OUT_PRIMARY="outline-primary",n.OUT_PRIMARY_DARK="outline-primary-dark",n.OUT_TERTIARY="outline-tertiary",n.OUT_LINK="link",n.LIGHT="light",n.DARK="dark",n))(Id||{});const Lt=g.defineComponent({__name:"BDButton",props:{variant:{default:Id.PRIMARY},blockElement:{type:Boolean},disabled:{type:Boolean,default:!1},size:{default:Qr.MD},to:{},target:{},text:{},rel:{},class:{}},emits:["click"],setup(n,{emit:e}){const t=n,r=g.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=g.computed(()=>t.to?ar:"button"),o=g.computed(()=>{const l={};return t.to?(l.to=t.to,l.role="button"):l.type="submit",l}),s=()=>{e("click")};return(l,a)=>(g.openBlock(),g.createBlock(g.resolveDynamicComponent(i.value),g.mergeProps({class:["bd-btn",r.value]},o.value,{onClick:s}),{default:g.withCtx(()=>[g.renderSlot(l.$slots,"default",{},()=>[g.createTextVNode(g.toDisplayString(t.text),1)])]),_:3},16,["class"]))}});const t5={install:n=>{n.component("BDButton",Lt),n.component("BDLogo",Vs),n.component("BDLink",ar),n.component("BDDropdownItem",Us),n.component("BDDropdown",Ca),n.component("BDHeader",Nd),n.component("BDAlert",Ac),n.component("BDProfileImage",Oc),n.component("BDZoomslider",Mc),n.component("BDCard",Ic),n.component("BDFormInput",Ip),n.component("BDInputGroup",Pp),n.component("BDFormInvalidFeedback",Hs),n.component("BDBadge",Fp),n.component("BDForm",zp),n.component("BDPagination",Kp),n.component("BDDropzone",lh),n.component("BDMarkdownEditor",U2),n.component("BDModal",e5)}};exports.BDAlert=Ac;exports.BDButton=Lt;exports.BDCard=Ic;exports.BDDropdown=Ca;exports.BDDropdownItem=Us;exports.BDHeader=Nd;exports.BDLink=ar;exports.BDLogo=Vs;exports.BDProfileImage=Oc;exports.BDZoomslider=Mc;exports.default=t5;
|