@beterdichtbij/component-library 0.12.0 → 0.13.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 +2 -2
- package/dist/bd-component-lib.es.js +665 -646
- package/dist/bd-component-lib.umd.js +2 -2
- package/dist/components/molecules/BDDropzone/BDDropzone.vue.d.ts +17 -6
- package/dist/components/molecules/BDMarkdownEditor/BDMarkdownEditor.vue.d.ts +2 -1
- package/dist/interfaces/BDDropzoneProps.d.ts +7 -2
- package/package.json +1 -1
|
@@ -8,7 +8,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
8
8
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var x=!0,I=!1,N;return{s:function(){E=A[Symbol.iterator]()},n:function(){var L=E.next();return x=L.done,L},e:function(L){I=!0,N=L},f:function(){try{!x&&E.return!=null&&E.return()}finally{if(I)throw N}}}}function 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=g(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(I){E.e(I)}finally{E.f()}M||(M=W.createElement('<div class="dz-message"><span></span></div>'),this.element.appendChild(M));var x=M.getElementsByTagName("span")[0];return x&&(x.textContent!=null?x.textContent=this.options.dictFallbackMessage:x.innerText!=null&&(x.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(M,E,O,y){var x={srcX:0,srcY:0,srcWidth:M.width,srcHeight:M.height},I=M.width/M.height;E==null&&O==null?(E=x.srcWidth,O=x.srcHeight):E==null?E=O*I:O==null&&(O=E/I),E=Math.min(E,x.srcWidth),O=Math.min(O,x.srcHeight);var N=E/O;if(x.srcWidth>E||x.srcHeight>O)if(y==="crop")I>N?(x.srcHeight=M.height,x.srcWidth=x.srcHeight*N):(x.srcWidth=M.width,x.srcHeight=x.srcWidth/N);else if(y==="contain")I>N?O=E/I:E=O*I;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=g(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 I=g(M.previewElement.querySelectorAll("[data-dz-size]"),!0),N;try{for(I.s();!(N=I.n()).done;)x=N.value,x.innerHTML=this.filesize(M.size)}catch(j){I.e(j)}finally{I.f()}this.options.addRemoveLinks&&(M._removeLink=W.createElement('<a class="dz-remove" href="javascript:undefined;" data-dz-remove>'.concat(this.options.dictRemoveFile,"</a>")),M.previewElement.appendChild(M._removeLink));var D=function(G){return G.preventDefault(),G.stopPropagation(),M.status===W.UPLOADING?W.confirm(E.options.dictCancelUploadConfirmation,function(){return E.removeFile(M)}):E.options.dictRemoveFileConfirmation?W.confirm(E.options.dictRemoveFileConfirmation,function(){return E.removeFile(M)}):E.removeFile(M)},L=g(M.previewElement.querySelectorAll("[data-dz-remove]"),!0),U;try{for(L.s();!(U=L.n()).done;){var K=U.value;K.addEventListener("click",D)}}catch(j){L.e(j)}finally{L.f()}}},removedfile:function(M){return M.previewElement!=null&&M.previewElement.parentNode!=null&&M.previewElement.parentNode.removeChild(M.previewElement),this._updateMaxFilesReachedClass()},thumbnail:function(M,E){if(M.previewElement){M.previewElement.classList.remove("dz-file-preview");var O=g(M.previewElement.querySelectorAll("[data-dz-thumbnail]"),!0),y;try{for(O.s();!(y=O.n()).done;){var x=y.value;x.alt=M.name,x.src=E}}catch(I){O.e(I)}finally{O.f()}return setTimeout(function(){return M.previewElement.classList.add("dz-image-preview")},1)}},error:function(M,E){if(M.previewElement){M.previewElement.classList.add("dz-error"),typeof E!="string"&&E.error&&(E=E.error);var O=g(M.previewElement.querySelectorAll("[data-dz-errormessage]"),!0),y;try{for(O.s();!(y=O.n()).done;){var x=y.value;x.textContent=E}}catch(I){O.e(I)}finally{O.f()}}},errormultiple:function(){},processing:function(M){if(M.previewElement&&(M.previewElement.classList.add("dz-processing"),M._removeLink))return M._removeLink.innerHTML=this.options.dictCancelUpload},processingmultiple:function(){},uploadprogress:function(M,E,O){if(M.previewElement){var y=g(M.previewElement.querySelectorAll("[data-dz-uploadprogress]"),!0),x;try{for(y.s();!(x=y.n()).done;){var I=x.value;I.nodeName==="PROGRESS"?I.value=E:I.style.width="".concat(E,"%")}}catch(N){y.e(N)}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
9
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var x=!0,I=!1,N;return{s:function(){E=A[Symbol.iterator]()},n:function(){var L=E.next();return x=L.done,L},e:function(L){I=!0,N=L},f:function(){try{!x&&E.return!=null&&E.return()}finally{if(I)throw N}}}}function w(A,M){if(A){if(typeof A=="string")return F(A,M);var E=Object.prototype.toString.call(A).slice(8,-1);if(E==="Object"&&A.constructor&&(E=A.constructor.name),E==="Map"||E==="Set")return Array.from(A);if(E==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(E))return F(A,M)}}function F(A,M){(M==null||M>A.length)&&(M=A.length);for(var E=0,O=new Array(M);E<M;E++)O[E]=A[E];return O}function 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 B(A,M){if(typeof M!="function"&&M!==null)throw new TypeError("Super expression must either be null or a function");A.prototype=Object.create(M&&M.prototype,{constructor:{value:A,writable:!0,configurable:!0}}),M&&P(A,M)}function P(A,M){return P=Object.setPrototypeOf||function(O,y){return O.__proto__=y,O},P(A,M)}function H(A){var M=Q();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:Z(A)}function Z(A){if(A===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A}function Q(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function re(A){return re=Object.setPrototypeOf?Object.getPrototypeOf:function(E){return E.__proto__||Object.getPrototypeOf(E)},re(A)}var W=function(A){B(E,A);var M=H(E);function E(O,y){var x;V(this,E),x=M.call(this);var I,N;if(x.element=O,x.version=E.version,x.clickableElements=[],x.listeners=[],x.files=[],typeof x.element=="string"&&(x.element=document.querySelector(x.element)),!x.element||x.element.nodeType==null)throw new Error("Invalid dropzone element.");if(x.element.dropzone)throw new Error("Dropzone already attached.");E.instances.push(Z(x)),x.element.dropzone=Z(x);var D=(N=E.optionsForElement(x.element))!=null?N:{};if(x.options=E.extend({},k,D,y??{}),x.options.previewTemplate=x.options.previewTemplate.replace(/\n*/g,""),x.options.forceFallback||!E.isBrowserSupported())return Y(x,x.options.fallback.call(Z(x)));if(x.options.url==null&&(x.options.url=x.element.getAttribute("action")),!x.options.url)throw new Error("No URL provided.");if(x.options.acceptedFiles&&x.options.acceptedMimeTypes)throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");if(x.options.uploadMultiple&&x.options.chunking)throw new Error("You cannot set both: uploadMultiple and chunking.");return x.options.acceptedMimeTypes&&(x.options.acceptedFiles=x.options.acceptedMimeTypes,delete x.options.acceptedMimeTypes),x.options.renameFilename!=null&&(x.options.renameFile=function(L){return x.options.renameFilename.call(Z(x),L.name,L)}),typeof x.options.method=="string"&&(x.options.method=x.options.method.toUpperCase()),(I=x.getExistingFallback())&&I.parentNode&&I.parentNode.removeChild(I),x.options.previewsContainer!==!1&&(x.options.previewsContainer?x.previewsContainer=E.getElement(x.options.previewsContainer,"previewsContainer"):x.previewsContainer=x.element),x.options.clickable&&(x.options.clickable===!0?x.clickableElements=[x.element]:x.clickableElements=E.getElements(x.options.clickable,"clickable")),x.init(),x}return 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 I=R(this.events,!0),N;try{for(I.s();!(N=I.n()).done;){var D=N.value;this.on(D,this.options[D])}}catch(K){I.e(K)}finally{I.f()}this.on("uploadprogress",function(){return 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},U=function(j){if(L(j))return j.stopPropagation(),j.preventDefault?j.preventDefault():j.returnValue=!1};return this.listeners=[{element:this.element,events:{dragstart:function(j){return y.emit("dragstart",j)},dragenter:function(j){return U(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",U(j),y.emit("dragover",j)},dragleave:function(j){return y.emit("dragleave",j)},drop:function(j){return U(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,I=0,N=this.getActiveFiles();if(N.length){var D=R(this.getActiveFiles(),!0),L;try{for(D.s();!(L=D.n()).done;){var U=L.value;x+=U.upload.bytesSent,I+=U.upload.total}}catch(K){D.e(K)}finally{D.f()}y=100*x/I}else y=100;return this.emit("totaluploadprogress",y,I,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 I='<div class="dz-fallback">';this.options.dictFallbackText&&(I+="<p>".concat(this.options.dictFallbackText,"</p>")),I+='<input type="file" name="'.concat(this._getParamName(0),'" ').concat(this.options.uploadMultiple?'multiple="multiple"':void 0,' /><input type="submit" value="Upload!"></div>');var N=E.createElement(I);return this.element.tagName!=="FORM"?(x=E.createElement('<form action="'.concat(this.options.url,'" enctype="multipart/form-data" method="').concat(this.options.method,'"></form>')),x.appendChild(N)):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),x??N}},{key:"getExistingFallback",value:function(){for(var y=function(U){var K=R(U,!0),j;try{for(K.s();!(j=K.n()).done;){var G=j.value;if(/(^| )fallback($| )/.test(G.className))return G}}catch(J){K.e(J)}finally{K.f()}},x=0,I=["div","form"];x<I.length;x++){var N=I[x],D;if(D=y(this.element.getElementsByTagName(N)))return D}}},{key:"setupEventListeners",value:function(){return this.listeners.map(function(y){return function(){var x=[];for(var I in y.events){var N=y.events[I];x.push(y.element.addEventListener(I,N,!1))}return x}()})}},{key:"removeEventListeners",value:function(){return this.listeners.map(function(y){return function(){var x=[];for(var I in y.events){var N=y.events[I];x.push(y.element.removeEventListener(I,N,!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,I="b";if(y>0){for(var N=["tb","gb","mb","kb","b"],D=0;D<N.length;D++){var L=N[D],U=Math.pow(this.options.filesizeBase,4-D)/10;if(y>=U){x=y/Math.pow(this.options.filesizeBase,4-D),I=L;break}}x=Math.round(10*x)/10}return"<strong>".concat(x,"</strong> ").concat(this.options.dictFileSizeUnits[I])}},{key:"_updateMaxFilesReachedClass",value:function(){return this.options.maxFiles!=null&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")}},{key:"drop",value:function(y){if(y.dataTransfer){this.emit("drop",y);for(var x=[],I=0;I<y.dataTransfer.files.length;I++)x[I]=y.dataTransfer.files[I];if(x.length){var N=y.dataTransfer.items;N&&N.length&&N[0].webkitGetAsEntry!=null?this._addFilesFromItems(N):this.handleFiles(x)}this.emit("addedfiles",x)}}},{key:"paste",value:function(y){if(Ce(y!=null?y.clipboardData:void 0,function(I){return I.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),I;try{for(x.s();!(I=x.n()).done;){var N=I.value;this.addFile(N)}}catch(D){x.e(D)}finally{x.f()}}},{key:"_addFilesFromItems",value:function(y){var x=this;return function(){var I=[],N=R(y,!0),D;try{for(N.s();!(D=N.n()).done;){var L=D.value,U;L.webkitGetAsEntry!=null&&(U=L.webkitGetAsEntry())?U.isFile?I.push(x.addFile(L.getAsFile())):U.isDirectory?I.push(x._addFilesFromDirectory(U,U.name)):I.push(void 0):L.getAsFile!=null&&(L.kind==null||L.kind==="file")?I.push(x.addFile(L.getAsFile())):I.push(void 0)}}catch(K){N.e(K)}finally{N.f()}return I}()}},{key:"_addFilesFromDirectory",value:function(y,x){var I=this,N=y.createReader(),D=function(K){return Te(console,"log",function(j){return j.log(K)})},L=function U(){return N.readEntries(function(K){if(K.length>0){var j=R(K,!0),G;try{for(j.s();!(G=j.n()).done;){var J=G.value;J.isFile?J.file(function(_){if(!(I.options.ignoreHiddenFiles&&_.name.substring(0,1)==="."))return _.fullPath="".concat(x,"/").concat(_.name),I.addFile(_)}):J.isDirectory&&I._addFilesFromDirectory(J,"".concat(x,"/").concat(J.name))}}catch(_){j.e(_)}finally{j.f()}U()}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(I){I?(y.accepted=!1,x._errorProcessing([y],I)):(y.accepted=!0,x.options.autoQueue&&x.enqueueFile(y)),x._updateMaxFilesReachedClass()})}},{key:"enqueueFiles",value:function(y){var x=R(y,!0),I;try{for(x.s();!(I=x.n()).done;){var N=I.value;this.enqueueFile(N)}}catch(D){x.e(D)}finally{x.f()}return null}},{key:"enqueueFile",value:function(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(I){return y.emit("thumbnail",x,I),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),I;try{for(x.s();!(I=x.n()).done;){var N=I.value;(N.status!==E.UPLOADING||y)&&this.removeFile(N)}}catch(D){x.e(D)}finally{x.f()}return null}},{key:"resizeImage",value:function(y,x,I,N,D){var L=this;return this.createThumbnail(y,x,I,N,!0,function(U,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,I,N,D,L){var U=this,K=new FileReader;K.onload=function(){if(y.dataURL=K.result,y.type==="image/svg+xml"){L!=null&&L(K.result);return}U.createThumbnailFromUrl(y,x,I,N,D,L)},K.readAsDataURL(y)}},{key:"displayExistingFile",value:function(y,x,I,N){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),I&&I();else{var U=function(j){D.emit("thumbnail",y,j),I&&I()};y.dataURL=x,this.createThumbnailFromUrl(y,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,this.options.fixOrientation,U,N)}}},{key:"createThumbnailFromUrl",value:function(y,x,I,N,D,L,U){var K=this,j=document.createElement("img");return U&&(j.crossOrigin=U),D=getComputedStyle(document.body).imageOrientation=="from-image"?!1:D,j.onload=function(){var G=function(_){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,I,N),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,I=x;if(!(x>=y)){var N=this.getQueuedFiles();if(N.length>0){if(this.options.uploadMultiple)return this.processFiles(N.slice(0,y-x));for(;I<y;){if(!N.length)return;this.processFile(N.shift()),I++}}}}},{key:"processFile",value:function(y){return this.processFiles([y])}},{key:"processFiles",value:function(y){var x=R(y,!0),I;try{for(x.s();!(I=x.n()).done;){var N=I.value;N.processing=!0,N.status=E.UPLOADING,this.emit("processing",N)}}catch(D){x.e(D)}finally{x.f()}return this.options.uploadMultiple&&this.emit("processingmultiple",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),I=R(x,!0),N;try{for(I.s();!(N=I.n()).done;){var D=N.value;D.status=E.CANCELED}}catch(j){I.e(j)}finally{I.f()}typeof y.xhr<"u"&&y.xhr.abort();var L=R(x,!0),U;try{for(L.s();!(U=L.n()).done;){var K=U.value;this.emit("canceled",K)}}catch(j){L.e(j)}finally{L.f()}this.options.uploadMultiple&&this.emit("canceledmultiple",x)}else(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,I=new Array(x>1?x-1:0),N=1;N<x;N++)I[N-1]=arguments[N];return y.apply(this,I)}return y}},{key:"uploadFile",value:function(y){return this.uploadFiles([y])}},{key:"uploadFiles",value:function(y){var x=this;this._transformFiles(y,function(I){if(x.options.chunking){var N=I[0];y[0].upload.chunked=x.options.chunking&&(x.options.forceChunking||N.size>x.options.chunkSize),y[0].upload.totalChunkCount=Math.ceil(N.size/x.options.chunkSize)}if(y[0].upload.chunked){var D=y[0],L=I[0];D.upload.chunks=[];var U=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 U();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++)U();else U()}else{for(var j=[],G=0;G<y.length;G++)j[G]={name:x._getParamName(G),data:I[G],filename:y[G].upload.filename};x._uploadData(y,j)}})}},{key:"_getChunk",value:function(y,x){for(var I=0;I<y.upload.totalChunkCount;I++)if(y.upload.chunks[I]!==void 0&&y.upload.chunks[I].xhr===x)return y.upload.chunks[I]}},{key:"_uploadData",value:function(y,x){var I=this,N=new XMLHttpRequest,D=R(y,!0),L;try{for(D.s();!(L=D.n()).done;){var U=L.value;U.xhr=N}}catch(ae){D.e(ae)}finally{D.f()}y[0].upload.chunked&&(y[0].upload.chunks[x[0].chunkIndex].xhr=N);var K=this.resolveOption(this.options.method,y),j=this.resolveOption(this.options.url,y);N.open(K,j,!0);var G=this.resolveOption(this.options.timeout,y);G&&(N.timeout=this.resolveOption(this.options.timeout,y)),N.withCredentials=!!this.options.withCredentials,N.onload=function(ae){I._finishedUploading(y,N,ae)},N.ontimeout=function(){I._handleUploadError(y,N,"Request timedout after ".concat(I.options.timeout/1e3," seconds"))},N.onerror=function(){I._handleUploadError(y,N)};var J=N.upload!=null?N.upload:N;J.onprogress=function(ae){return I._updateFilesUploadProgress(y,N,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&&N.setRequestHeader(ce,me)}var Oe=new FormData;if(this.options.params){var Be=this.options.params;typeof Be=="function"&&(Be=Be.call(this,y,N,y[0].upload.chunked?this._getChunk(y[0],N):null));for(var Pe in Be){var Me=Be[Pe];if(Array.isArray(Me))for(var je=0;je<Me.length;je++)Oe.append(Pe,Me[je]);else Oe.append(Pe,Me)}}var dt=R(y,!0),_e;try{for(dt.s();!(_e=dt.n()).done;){var un=_e.value;this.emit("sending",un,N,Oe)}}catch(ae){dt.e(ae)}finally{dt.f()}this.options.uploadMultiple&&this.emit("sendingmultiple",y,N,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(N,Oe,y)}},{key:"_transformFiles",value:function(y,x){for(var I=this,N=[],D=0,L=function(j){I.options.transformFile.call(I,y[j],function(G){N[j]=G,++D===y.length&&x(N)})},U=0;U<y.length;U++)L(U)}},{key:"_addFormElementData",value:function(y){if(this.element.tagName==="FORM"){var x=R(this.element.querySelectorAll("input, textarea, select, button"),!0),I;try{for(x.s();!(I=x.n()).done;){var N=I.value,D=N.getAttribute("name"),L=N.getAttribute("type");if(L&&(L=L.toLowerCase()),!(typeof D>"u"||D===null))if(N.tagName==="SELECT"&&N.hasAttribute("multiple")){var U=R(N.options,!0),K;try{for(U.s();!(K=U.n()).done;){var j=K.value;j.selected&&y.append(D,j.value)}}catch(G){U.e(G)}finally{U.f()}}else(!L||L!=="checkbox"&&L!=="radio"||N.checked)&&y.append(D,N.value)}}catch(G){x.e(G)}finally{x.f()}}}},{key:"_updateFilesUploadProgress",value:function(y,x,I){if(y[0].upload.chunked){var U=y[0],K=this._getChunk(U,x);I?(K.progress=100*I.loaded/I.total,K.total=I.total,K.bytesSent=I.loaded):(K.progress=100,K.bytesSent=K.total),U.upload.progress=0,U.upload.total=0,U.upload.bytesSent=0;for(var j=0;j<U.upload.totalChunkCount;j++)U.upload.chunks[j]&&typeof U.upload.chunks[j].progress<"u"&&(U.upload.progress+=U.upload.chunks[j].progress,U.upload.total+=U.upload.chunks[j].total,U.upload.bytesSent+=U.upload.chunks[j].bytesSent);U.upload.progress=U.upload.progress/U.upload.totalChunkCount,this.emit("uploadprogress",U,U.upload.progress,U.upload.bytesSent)}else{var N=R(y,!0),D;try{for(N.s();!(D=N.n()).done;){var L=D.value;L.upload.total&&L.upload.bytesSent&&L.upload.bytesSent==L.upload.total||(I?(L.upload.progress=100*I.loaded/I.total,L.upload.total=I.total,L.upload.bytesSent=I.loaded):(L.upload.progress=100,L.upload.bytesSent=L.upload.total),this.emit("uploadprogress",L,L.upload.progress,L.upload.bytesSent))}}catch(G){N.e(G)}finally{N.f()}}}},{key:"_finishedUploading",value:function(y,x,I){var N;if(y[0].status!==E.CANCELED&&x.readyState===4){if(x.responseType!=="arraybuffer"&&x.responseType!=="blob"&&(N=x.responseText,x.getResponseHeader("content-type")&&~x.getResponseHeader("content-type").indexOf("application/json")))try{N=JSON.parse(N)}catch(D){I=D,N="Invalid JSON response from server."}this._updateFilesUploadProgress(y,x),200<=x.status&&x.status<300?y[0].upload.chunked?y[0].upload.finishedChunkUpload(this._getChunk(y[0],x),N):this._finished(y,N,I):this._handleUploadError(y,x,N)}}},{key:"_handleUploadError",value:function(y,x,I){if(y[0].status!==E.CANCELED){if(y[0].upload.chunked&&this.options.retryChunks){var N=this._getChunk(y[0],x);if(N.retries++<this.options.retryChunksLimit){this._uploadData(y,[N.dataBlock]);return}else console.warn("Retried this chunk too often. Giving up.")}this._errorProcessing(y,I||this.options.dictResponseError.replace("{{statusCode}}",x.status),x)}}},{key:"submitRequest",value:function(y,x,I){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,I){var N=R(y,!0),D;try{for(N.s();!(D=N.n()).done;){var L=D.value;L.status=E.SUCCESS,this.emit("success",L,x,I),this.emit("complete",L)}}catch(U){N.e(U)}finally{N.f()}if(this.options.uploadMultiple&&(this.emit("successmultiple",y,x,I),this.emit("completemultiple",y)),this.options.autoProcessQueue)return this.processQueue()}},{key:"_errorProcessing",value:function(y,x,I){var N=R(y,!0),D;try{for(N.s();!(D=N.n()).done;){var L=D.value;L.status=E.ERROR,this.emit("error",L,x,I),this.emit("complete",L)}}catch(U){N.e(U)}finally{N.f()}if(this.options.uploadMultiple&&(this.emit("errormultiple",y,x,I),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,I=new Array(x>1?x-1:0),N=1;N<x;N++)I[N-1]=arguments[N];for(var D=0,L=I;D<L.length;D++){var U=L[D];for(var K in U){var j=U[K];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,I=y==="x"?x:x&3|8;return I.toString(16)})}}]),E}(f);W.initClass(),W.version="5.9.3",W.options={},W.optionsForElement=function(A){if(A.getAttribute("id"))return W.options[de(A.getAttribute("id"))]},W.instances=[],W.forElement=function(A){if(typeof A=="string"&&(A=document.querySelector(A)),(A!=null?A.dropzone:void 0)==null)throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");return A.dropzone},W.autoDiscover=!0,W.discover=function(){var A;if(document.querySelectorAll)A=document.querySelectorAll(".dropzone");else{A=[];var M=function(O){return function(){var y=[],x=R(O,!0),I;try{for(x.s();!(I=x.n()).done;){var N=I.value;/(^| )dropzone($| )/.test(N.className)?y.push(A.push(N)):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(I){O.e(I)}finally{O.f()}return E}()},W.blockedBrowsers=[/opera.*(Macintosh|Windows Phone).*version\/12/i],W.isBrowserSupported=function(){var A=!0;if(window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if(!("classList"in document.createElement("a")))A=!1;else{W.blacklistedBrowsers!==void 0&&(W.blockedBrowsers=W.blacklistedBrowsers);var M=R(W.blockedBrowsers,!0),E;try{for(M.s();!(E=M.n()).done;){var O=E.value;if(O.test(navigator.userAgent)){A=!1;continue}}}catch(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,I=M.length,N=0<=I;N?x<=I:x>=I;N?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 I=R(document.querySelectorAll(A),!0),N;try{for(I.s();!(N=I.n()).done;)E=N.value,O.push(E)}catch(D){I.e(D)}finally{I.f()}}else A.nodeType!=null&&(O=[A]);if(O==null||!O.length)throw new Error("Invalid `".concat(M,"` option provided. Please provide a CSS selector, a plain HTML element or a list of those."));return O},W.confirm=function(A,M,E){if(window.confirm(A))return M();if(E!=null)return E()},W.isValidFile=function(A,M){if(!M)return!0;M=M.split(",");var E=A.type,O=E.replace(/\/.*$/,""),y=R(M,!0),x;try{for(y.s();!(x=y.n()).done;){var I=x.value;if(I=I.trim(),I.charAt(0)==="."){if(A.name.toLowerCase().indexOf(I.toLowerCase(),A.name.length-I.length)!==-1)return!0}else if(/\/\*$/.test(I)){if(O===I.replace(/\/.*$/,""))return!0}else if(E===I)return!0}}catch(N){y.e(N)}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),I=x.data,N=0,D=E,L=E;L>N;){var U=I[(L-1)*4+3];U===0?D=L:N=L,L=D+N>>1}var K=L/E;return K===0?1:K},Se=function(M,E,O,y,x,I,N,D,L,U){var K=ve(E);return M.drawImage(E,O,y,x,I,N,D,L,U/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,I="",N=void 0,D=void 0,L=void 0,U="",K=0;y=E[K++],x=E[K++],I=E[K++],N=y>>2,D=(y&3)<<4|x>>4,L=(x&15)<<2|I>>6,U=I&63,isNaN(x)?L=U=64:isNaN(I)&&(U=64),O=O+this.KEY_STR.charAt(N)+this.KEY_STR.charAt(D)+this.KEY_STR.charAt(L)+this.KEY_STR.charAt(U),y=x=I="",N=D=L=U="",K<E.length;);return O}},{key:"restore",value:function(E,O){if(!E.match("data:image/jpeg;base64,"))return O;var y=this.decode64(E.replace("data:image/jpeg;base64,","")),x=this.slice2Segments(y),I=this.exifManipulation(O,x);return"data:image/jpeg;base64,".concat(this.encode64(I))}},{key:"exifManipulation",value:function(E,O){var y=this.getExifArray(O),x=this.insertExif(E,y),I=new Uint8Array(x);return I}},{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),I=x.indexOf(255,3),N=x.slice(0,I),D=x.slice(I),L=N;return L=L.concat(O),L=L.concat(D),L}},{key:"slice2Segments",value:function(E){for(var O=0,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 I=O+x+2,N=E.slice(O,I);y.push(N),O=I}if(O>E.length)break}return y}},{key:"decode64",value:function(E){var O=void 0,y=void 0,x="",I=void 0,N=void 0,D=void 0,L="",U=0,K=[],j=/[^A-Za-z0-9\+\/\=]/g;for(j.exec(E)&&console.warn(`There were invalid base64 characters in the input text.
|
|
10
10
|
Valid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='
|
|
11
|
-
Expect errors in decoding.`),E=E.replace(/[^A-Za-z0-9\+\/\=]/g,"");I=this.KEY_STR.indexOf(E.charAt(U++)),N=this.KEY_STR.indexOf(E.charAt(U++)),D=this.KEY_STR.indexOf(E.charAt(U++)),L=this.KEY_STR.indexOf(E.charAt(U++)),O=I<<2|N>>4,y=(N&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="",I=N=D=L="",U<E.length;);return K}}]),A}();ye.initClass();var we=function(M,E){var O=!1,y=!0,x=M.document,I=x.documentElement,N=x.addEventListener?"addEventListener":"attachEvent",D=x.addEventListener?"removeEventListener":"detachEvent",L=x.addEventListener?"":"on",U=function j(G){if(!(G.type==="readystatechange"&&x.readyState!=="complete")&&((G.type==="load"?M:x)[D](L+G.type,j,!1),!O&&(O=!0)))return E.call(M,G.type||G)},K=function j(){try{I.doScroll("left")}catch{setTimeout(j,50);return}return U("poll")};if(x.readyState!=="complete"){if(x.createEventObject&&I.doScroll){try{y=!M.frameElement}catch{}y&&K()}return x[N](L+"DOMContentLoaded",U,!1),x[N](L+"readystatechange",U,!1),M[N](L+"load",U,!1)}};W._autoDiscoverFunction=function(){if(W.autoDiscover)return W.discover()},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}(),i}()})})(uu);var Vh=uu.exports;const il=zh(Vh),$h={class:"fallback"},Uh=m.createElementVNode("input",{id:"file",type:"file",name:"file",multiple:""},null,-1),Hh={for:"file"},jh={class:"dz-message","data-dz-message":""},Wh={id:"bd-dropzone-theme",style:{display:"none"}},Kh={class:"dz-preview dz-file-preview"},Gh={class:"dz-details"},Jh=m.createElementVNode("img",{"data-dz-thumbnail":"",class:"dz-image"},null,-1),Yh=m.createElementVNode("div",{class:"dz-filename"},[m.createElementVNode("small",{"data-dz-name":""})],-1),Xh=m.createElementVNode("div",{class:"dz-progress"},[m.createElementVNode("div",{class:"spinner-border text-primary spinner-border-sm",role:"status"},[m.createElementVNode("span",{class:"visually-hidden"},"Loading...")])],-1),Zh={class:"dz-success-mark"},Qh={class:"dz-error-message text-danger"},qh=m.createElementVNode("small",{"data-dz-errormessage":""},null,-1),du=m.defineComponent({__name:"BDDropzone",props:{modelValue:{default:[]},buttonText:{default:void 0},multiple:{type:Boolean,default:!1},errorMessage:{default:void 0},fileSizeExceededMessage:{default:void 0},acceptedFiles:{default:".jpg"},url:{default:""},tag:{default:"form"}},emits:["update:modelValue"],setup(n,{emit:e}){const t=n,r=m.computed(()=>({variant:vi.PRIMARY,size:it.SM})),o=Yn(t,"modelValue",e);let i=null;il.autoDiscover=!1,m.onMounted(()=>{var d;document.getElementById("dropzone")&&(i=new il("#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}),i.on("error",l),i.on("success",s),i.on("removedfile",c))});const s=function(d){o.value.push(d),a(d)},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=o.value.findIndex(h=>{var p,g;return((p=h.upload)==null?void 0:p.uuid)===((g=d.upload)==null?void 0:g.uuid)});f!==-1&&o.value.splice(f,1)},u=m.computed(()=>t.tag??"form");return(d,f)=>(m.openBlock(),m.createElementBlock(m.Fragment,null,[(m.openBlock(),m.createBlock(m.resolveDynamicComponent(u.value),{id:"dropzone",class:"dropzone bd-dropzone",enctype:"multipart/form-data"},{default:m.withCtx(()=>[m.createElementVNode("div",$h,[Uh,m.createTextVNode(" test "),m.createElementVNode("label",Hh,[m.createVNode(m.unref(Fr)),m.createTextVNode(" "+m.toDisplayString(t.buttonText),1)])]),m.createElementVNode("div",jh,[m.createVNode(m.unref(Pt),m.normalizeProps(m.guardReactiveProps(r.value)),{default:m.withCtx(()=>[m.createVNode(m.unref(Fr)),m.createTextVNode(" "+m.toDisplayString(t.buttonText),1)]),_:1},16)])]),_:1})),m.createElementVNode("div",Wh,[m.createElementVNode("div",Kh,[m.createElementVNode("div",Gh,[Jh,m.createVNode(m.unref(Ys),{"data-dz-thumbnail":"",class:"d-none"}),Yh,m.createVNode(m.unref(Pt),{class:"dz-remove",alt:"Click me to remove the file.","data-dz-remove":""},{default:m.withCtx(()=>[m.createVNode(m.unref(Js))]),_:1})]),Xh,m.createElementVNode("div",Zh,[m.createVNode(m.unref(pi))]),m.createElementVNode("div",Qh,[m.createVNode(m.unref(hi)),qh])])])],64))}});function Xe(n){this.content=n}Xe.prototype={constructor:Xe,find:function(n){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===n)return e;return-1},get:function(n){var e=this.find(n);return e==-1?void 0:this.content[e+1]},update:function(n,e,t){var r=t&&t!=n?this.remove(t):this,o=r.find(n),i=r.content.slice();return o==-1?i.push(t||n,e):(i[o+1]=e,t&&(i[o]=t)),new Xe(i)},remove:function(n){var e=this.find(n);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new Xe(t)},addToStart:function(n,e){return new Xe([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new Xe(t)},addBefore:function(n,e,t){var r=this.remove(e),o=r.content.slice(),i=r.find(n);return o.splice(i==-1?o.length:i,0,e,t),new Xe(o)},forEach:function(n){for(var e=0;e<this.content.length;e+=2)n(this.content[e],this.content[e+1])},prepend:function(n){return n=Xe.from(n),n.size?new Xe(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=Xe.from(n),n.size?new Xe(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=Xe.from(n);for(var t=0;t<n.content.length;t+=2)e=e.remove(n.content[t]);return e},toObject:function(){var n={};return this.forEach(function(e,t){n[e]=t}),n},get size(){return this.content.length>>1}};Xe.from=function(n){if(n instanceof Xe)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new Xe(e)};function fu(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let o=n.child(r),i=e.child(r);if(o==i){t+=o.nodeSize;continue}if(!o.sameMarkup(i))return t;if(o.isText&&o.text!=i.text){for(let s=0;o.text[s]==i.text[s];s++)t++;return t}if(o.content.size||i.content.size){let s=fu(o.content,i.content,t+1);if(s!=null)return s}t+=o.nodeSize}}function pu(n,e,t,r){for(let o=n.childCount,i=e.childCount;;){if(o==0||i==0)return o==i?null:{a:t,b:r};let s=n.child(--o),l=e.child(--i),a=s.nodeSize;if(s==l){t-=a,r-=a;continue}if(!s.sameMarkup(l))return{a:t,b:r};if(s.isText&&s.text!=l.text){let c=0,u=Math.min(s.text.length,l.text.length);for(;c<u&&s.text[s.text.length-c-1]==l.text[l.text.length-c-1];)c++,t--,r--;return{a:t,b:r}}if(s.content.size||l.content.size){let c=pu(s.content,l.content,t-1,r-1);if(c)return c}t-=a,r-=a}}class ie{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,t,r,o=0,i){for(let s=0,l=0;l<t;s++){let a=this.content[s],c=l+a.nodeSize;if(c>e&&r(a,o+l,i||null,s)!==!1&&a.content.size){let u=l+1;a.nodesBetween(Math.max(0,e-u),Math.min(a.content.size,t-u),r,o+u)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,o){let i="",s=!0;return this.nodesBetween(e,t,(l,a)=>{l.isText?(i+=l.text.slice(Math.max(e,a)-a,t-a),s=!r):l.isLeaf?(o?i+=typeof o=="function"?o(l):o:l.type.spec.leafText&&(i+=l.type.spec.leafText(l)),s=!r):!s&&l.isBlock&&(i+=r,s=!0)},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,o=this.content.slice(),i=0;for(t.isText&&t.sameMarkup(r)&&(o[o.length-1]=t.withText(t.text+r.text),i=1);i<e.content.length;i++)o.push(e.content[i]);return new ie(o,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],o=0;if(t>e)for(let i=0,s=0;s<t;i++){let l=this.content[i],a=s+l.nodeSize;a>e&&((s<e||a>t)&&(l.isText?l=l.cut(Math.max(0,e-s),Math.min(l.text.length,t-s)):l=l.cut(Math.max(0,e-s-1),Math.min(l.content.size,t-s-1))),r.push(l),o+=l.nodeSize),s=a}return new ie(r,o)}cutByIndex(e,t){return e==t?ie.empty:e==0&&t==this.content.length?this:new ie(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let o=this.content.slice(),i=this.size+t.nodeSize-r.nodeSize;return o[e]=t,new ie(o,i)}addToStart(e){return new ie([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new ie(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,r=0;t<this.content.length;t++){let o=this.content[t];e(o,r,t),r+=o.nodeSize}}findDiffStart(e,t=0){return fu(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return pu(this,e,t,r)}findIndex(e,t=-1){if(e==0)return oo(0,e);if(e==this.size)return oo(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let r=0,o=0;;r++){let i=this.child(r),s=o+i.nodeSize;if(s>=e)return s==e||t>0?oo(r+1,s):oo(r,o);o=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return ie.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new ie(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return ie.empty;let t,r=0;for(let o=0;o<e.length;o++){let i=e[o];r+=i.nodeSize,o&&i.isText&&e[o-1].sameMarkup(i)?(t||(t=e.slice(0,o)),t[t.length-1]=i.withText(t[t.length-1].text+i.text)):t&&t.push(i)}return new ie(t||e,r)}static from(e){if(!e)return ie.empty;if(e instanceof ie)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new ie([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}ie.empty=new ie([],0);const zi={index:0,offset:0};function oo(n,e){return zi.index=n,zi.offset=e,zi}function xo(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(!xo(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!xo(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let Le=class gs{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let o=0;o<e.length;o++){let i=e[o];if(this.eq(i))return e;if(this.type.excludes(i.type))t||(t=e.slice(0,o));else{if(i.type.excludes(this.type))return e;!r&&i.type.rank>this.type.rank&&(t||(t=e.slice(0,o)),t.push(this),r=!0),t&&t.push(i)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&xo(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 gs.none;if(e instanceof gs)return[e];let t=e.slice();return t.sort((r,o)=>r.type.rank-o.type.rank),t}};Le.none=[];class So 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=mu(this.content,e+this.openStart,t);return r&&new fe(r,this.openStart,this.openEnd)}removeBetween(e,t){return new fe(hu(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return fe.empty;let r=t.openStart||0,o=t.openEnd||0;if(typeof r!="number"||typeof o!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new fe(ie.fromJSON(e,t.content),r,o)}static maxOpen(e,t=!0){let r=0,o=0;for(let i=e.firstChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.lastChild)o++;return new fe(e,r,o)}}fe.empty=new fe(ie.empty,0,0);function hu(n,e,t){let{index:r,offset:o}=n.findIndex(e),i=n.maybeChild(r),{index:s,offset:l}=n.findIndex(t);if(o==e||i.isText){if(l!=t&&!n.child(s).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=s)throw new RangeError("Removing non-flat range");return n.replaceChild(r,i.copy(hu(i.content,e-o-1,t-o-1)))}function mu(n,e,t,r){let{index:o,offset:i}=n.findIndex(e),s=n.maybeChild(o);if(i==e||s.isText)return r&&!r.canReplace(o,o,t)?null:n.cut(0,e).append(t).append(n.cut(e));let l=mu(s.content,e-i-1,t);return l&&n.replaceChild(o,s.copy(l))}function _h(n,e,t){if(t.openStart>n.depth)throw new So("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new So("Inconsistent open depths");return gu(n,e,t,0)}function gu(n,e,t,r){let o=n.index(r),i=n.node(r);if(o==e.index(r)&&r<n.depth-t.openStart){let s=gu(n,e,t,r+1);return i.copy(i.content.replaceChild(o,s))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&n.depth==r&&e.depth==r){let s=n.parent,l=s.content;return Vn(s,l.cut(0,n.parentOffset).append(t.content).append(l.cut(e.parentOffset)))}else{let{start:s,end:l}=em(t,n);return Vn(i,yu(n,s,l,e,r))}else return Vn(i,Eo(n,e,r))}function vu(n,e){if(!e.type.compatibleContent(n.type))throw new So("Cannot join "+e.type.name+" onto "+n.type.name)}function vs(n,e,t){let r=n.node(t);return vu(r,e.node(t)),r}function zn(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 Tr(n,e,t,r){let o=(e||n).node(t),i=0,s=e?e.index(t):o.childCount;n&&(i=n.index(t),n.depth>t?i++:n.textOffset&&(zn(n.nodeAfter,r),i++));for(let l=i;l<s;l++)zn(o.child(l),r);e&&e.depth==t&&e.textOffset&&zn(e.nodeBefore,r)}function Vn(n,e){return n.type.checkContent(e),n.copy(e)}function yu(n,e,t,r,o){let i=n.depth>o&&vs(n,e,o+1),s=r.depth>o&&vs(t,r,o+1),l=[];return Tr(null,n,o,l),i&&s&&e.index(o)==t.index(o)?(vu(i,s),zn(Vn(i,yu(n,e,t,r,o+1)),l)):(i&&zn(Vn(i,Eo(n,e,o+1)),l),Tr(e,t,o,l),s&&zn(Vn(s,Eo(t,r,o+1)),l)),Tr(r,null,o,l),new ie(l)}function Eo(n,e,t){let r=[];if(Tr(null,n,t,r),n.depth>t){let o=vs(n,e,t+1);zn(Vn(o,Eo(n,e,t+1)),r)}return Tr(e,null,t,r),new ie(r)}function em(n,e){let t=e.depth-n.openStart,o=e.node(t).copy(n.content);for(let i=t-1;i>=0;i--)o=e.node(i).copy(ie.from(o));return{start:o.resolveNoCache(n.openStart+t),end:o.resolveNoCache(o.content.size-n.openEnd-t)}}class zr{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],o=e.child(t);return r?e.child(t).cut(r):o}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],o=t==0?0:this.path[t*3-1]+1;for(let i=0;i<e;i++)o+=r.child(i).nodeSize;return o}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return Le.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),o=e.maybeChild(t);if(!r){let l=r;r=o,o=l}let i=r.marks;for(var s=0;s<i.length;s++)i[s].type.spec.inclusive===!1&&(!o||!i[s].isInSet(o.marks))&&(i=i[s--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,o=e.parent.maybeChild(e.index());for(var i=0;i<r.length;i++)r[i].type.spec.inclusive===!1&&(!o||!r[i].isInSet(o.marks))&&(r=r[i--].removeFromSet(r));return r}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new Co(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],o=0,i=t;for(let s=e;;){let{index:l,offset:a}=s.content.findIndex(i),c=i-a;if(r.push(s,l,o+a),!c||(s=s.child(l),s.isText))break;i=c-1,o+=a+1}return new zr(t,r,i)}static resolveCached(e,t){for(let o=0;o<Vi.length;o++){let i=Vi[o];if(i.pos==t&&i.doc==e)return i}let r=Vi[$i]=zr.resolve(e,t);return $i=($i+1)%tm,r}}let Vi=[],$i=0,tm=12;class Co{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 nm=Object.create(null);let $n=class ys{constructor(e,t,r,o=Le.none){this.type=e,this.attrs=t,this.marks=o,this.content=r||ie.empty}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,r,o=0){this.content.nodesBetween(e,t,r,o,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,r,o){return this.content.textBetween(e,t,r,o)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,r){return this.type==e&&xo(this.attrs,t||e.defaultAttrs||nm)&&Le.sameSet(this.marks,r||Le.none)}copy(e=null){return e==this.content?this:new ys(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new ys(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,r=!1){if(e==t)return fe.empty;let o=this.resolve(e),i=this.resolve(t),s=r?0:o.sharedDepth(t),l=o.start(s),c=o.node(s).content.cut(o.pos-l,i.pos-l);return new fe(c,o.depth-s,i.depth-s)}replace(e,t,r){return _h(this.resolve(e),this.resolve(t),r)}nodeAt(e){for(let t=this;;){let{index:r,offset:o}=t.content.findIndex(e);if(t=t.maybeChild(r),!t)return null;if(o==e||t.isText)return t;e-=o+1}}childAfter(e){let{index:t,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(t),index:t,offset:r};let o=this.content.child(t-1);return{node:o,index:t-1,offset:r-o.nodeSize}}resolve(e){return zr.resolveCached(this,e)}resolveNoCache(e){return zr.resolve(this,e)}rangeHasMark(e,t,r){let o=!1;return t>e&&this.nodesBetween(e,t,i=>(r.isInSet(i.marks)&&(o=!0),!o)),o}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),bu(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=ie.empty,o=0,i=r.childCount){let s=this.contentMatchAt(e).matchFragment(r,o,i),l=s&&s.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let a=o;a<i;a++)if(!this.type.allowsMarks(r.child(a).marks))return!1;return!0}canReplaceWith(e,t,r,o){if(o&&!this.type.allowsMarks(o))return!1;let i=this.contentMatchAt(e).matchType(r),s=i&&i.matchFragment(this.content,t);return s?s.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content);let e=Le.none;for(let t=0;t<this.marks.length;t++)e=this.marks[t].addToSet(e);if(!Le.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r=null;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let o=ie.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,o,r)}};$n.prototype.text=void 0;class ko extends $n{constructor(e,t,r,o){if(super(e,t,null,o),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):bu(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 ko(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new ko(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 bu(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class Wn{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new rm(e,t);if(r.next==null)return Wn.empty;let o=xu(r);r.next&&r.err("Unexpected trailing text");let i=um(cm(o));return dm(i,r),i}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,r=e.childCount){let o=this;for(let i=t;o&&i<r;i++)o=o.matchType(e.child(i).type);return o}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let r=0;r<e.next.length;r++)if(this.next[t].type==e.next[r].type)return!0;return!1}fillBefore(e,t=!1,r=0){let o=[this];function i(s,l){let a=s.matchFragment(e,r);if(a&&(!t||a.validEnd))return ie.from(l.map(c=>c.createAndFill()));for(let c=0;c<s.next.length;c++){let{type:u,next:d}=s.next[c];if(!(u.isText||u.hasRequiredAttrs())&&o.indexOf(d)==-1){o.push(d);let f=i(d,l.concat(u));if(f)return f}}return null}return i(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let o=r.shift(),i=o.match;if(i.matchType(e)){let s=[];for(let l=o;l.type;l=l.via)s.push(l.type);return s.reverse()}for(let s=0;s<i.next.length;s++){let{type:l,next:a}=i.next[s];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in t)&&(!o.type||a.validEnd)&&(r.push({match:l.contentMatch,type:l,via:o}),t[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let o=0;o<r.next.length;o++)e.indexOf(r.next[o].next)==-1&&t(r.next[o].next)}return t(this),e.map((r,o)=>{let i=o+(r.validEnd?"*":" ")+" ";for(let s=0;s<r.next.length;s++)i+=(s?", ":"")+r.next[s].type.name+"->"+e.indexOf(r.next[s].next);return i}).join(`
|
|
11
|
+
Expect errors in decoding.`),E=E.replace(/[^A-Za-z0-9\+\/\=]/g,"");I=this.KEY_STR.indexOf(E.charAt(U++)),N=this.KEY_STR.indexOf(E.charAt(U++)),D=this.KEY_STR.indexOf(E.charAt(U++)),L=this.KEY_STR.indexOf(E.charAt(U++)),O=I<<2|N>>4,y=(N&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="",I=N=D=L="",U<E.length;);return K}}]),A}();ye.initClass();var we=function(M,E){var O=!1,y=!0,x=M.document,I=x.documentElement,N=x.addEventListener?"addEventListener":"attachEvent",D=x.addEventListener?"removeEventListener":"detachEvent",L=x.addEventListener?"":"on",U=function j(G){if(!(G.type==="readystatechange"&&x.readyState!=="complete")&&((G.type==="load"?M:x)[D](L+G.type,j,!1),!O&&(O=!0)))return E.call(M,G.type||G)},K=function j(){try{I.doScroll("left")}catch{setTimeout(j,50);return}return U("poll")};if(x.readyState!=="complete"){if(x.createEventObject&&I.doScroll){try{y=!M.frameElement}catch{}y&&K()}return x[N](L+"DOMContentLoaded",U,!1),x[N](L+"readystatechange",U,!1),M[N](L+"load",U,!1)}};W._autoDiscoverFunction=function(){if(W.autoDiscover)return W.discover()},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}(),i}()})})(uu);var Vh=uu.exports;const il=zh(Vh),$h={class:"fallback"},Uh=m.createElementVNode("input",{id:"file",type:"file",name:"file",multiple:""},null,-1),Hh={for:"file"},jh={class:"dz-message","data-dz-message":""},Wh={id:"bd-dropzone-theme",style:{display:"none"}},Kh={class:"dz-preview dz-file-preview"},Gh={class:"dz-details"},Jh=m.createElementVNode("img",{"data-dz-thumbnail":"",class:"dz-image"},null,-1),Yh=m.createElementVNode("div",{class:"dz-filename"},[m.createElementVNode("small",{"data-dz-name":""})],-1),Xh=m.createElementVNode("div",{class:"dz-progress"},[m.createElementVNode("div",{class:"spinner-border text-primary spinner-border-sm",role:"status"},[m.createElementVNode("span",{class:"visually-hidden"},"Loading...")])],-1),Zh={class:"dz-success-mark"},Qh={class:"dz-error-message text-danger"},qh=m.createElementVNode("small",{"data-dz-errormessage":""},null,-1),du=m.defineComponent({__name:"BDDropzone",props:{modelValue:{default:[]},buttonText:{default:void 0},multiple:{type:Boolean,default:!1},errorMessage:{default:void 0},fileSizeExceededMessage:{default:void 0},acceptedFiles:{default:".jpg"},url:{default:""},tag:{default:"form"},token:{default:""}},emits:["update:modelValue"],setup(n,{emit:e}){const t=n,r=m.computed(()=>({variant:vi.PRIMARY,size:it.SM})),o=Yn(t,"modelValue",e);let i=null;il.autoDiscover=!1,m.watch(()=>t.modelValue,()=>{s()}),m.onMounted(()=>{document.getElementById("dropzone")&&l()});const s=()=>{i&&(i.destroy(),l())},l=()=>{var h;i=new il("#dropzone",{url:t.url,method:"post",acceptedFiles:t.acceptedFiles,addRemoveLinks:!1,maxFilesize:10,maxFiles:t.multiple?void 0:1,headers:{RequestVerificationToken:t.token},dictResponseError:t.errorMessage,dictFileTooBig:t.fileSizeExceededMessage,previewTemplate:(h=document.querySelector("#bd-dropzone-theme"))==null?void 0:h.innerHTML}),i.on("error",c),i.on("success",a),i.on("removedfile",d)},a=function(h,p){var g;o.value.push({UUID:(g=h.upload)==null?void 0:g.uuid,CorrelationId:p.CorrelationId,Naam:p.Naam}),u(h)},c=function(h){u(h)},u=function(h){const p=h.name;if(!(p.endsWith(".png")||p.endsWith(".jpg")||p.endsWith(".jpeg")||p.endsWith(".gif"))){const g=h.previewElement.getElementsByClassName("icon-file"),v=h.previewElement.getElementsByClassName("dz-image");g[0].classList.remove("d-none"),v[0].classList.add("d-none")}},d=function(h){const p=o.value.findIndex(g=>{var v,S;return((v=g.upload)==null?void 0:v.uuid)===((S=h.upload)==null?void 0:S.uuid)});p!==-1&&o.value.splice(p,1)},f=m.computed(()=>t.tag??"form");return(h,p)=>(m.openBlock(),m.createElementBlock(m.Fragment,null,[(m.openBlock(),m.createBlock(m.resolveDynamicComponent(f.value),{id:"dropzone",class:"dropzone bd-dropzone",enctype:"multipart/form-data"},{default:m.withCtx(()=>[m.createElementVNode("div",$h,[Uh,m.createTextVNode(" test "),m.createElementVNode("label",Hh,[m.createVNode(m.unref(Fr)),m.createTextVNode(" "+m.toDisplayString(t.buttonText),1)])]),m.createElementVNode("div",jh,[m.createVNode(m.unref(Pt),m.normalizeProps(m.guardReactiveProps(r.value)),{default:m.withCtx(()=>[m.createVNode(m.unref(Fr)),m.createTextVNode(" "+m.toDisplayString(t.buttonText),1)]),_:1},16)])]),_:1})),m.createElementVNode("div",Wh,[m.createElementVNode("div",Kh,[m.createElementVNode("div",Gh,[Jh,m.createVNode(m.unref(Ys),{"data-dz-thumbnail":"",class:"d-none"}),Yh,m.createVNode(m.unref(Pt),{class:"dz-remove",alt:"Click me to remove the file.","data-dz-remove":""},{default:m.withCtx(()=>[m.createVNode(m.unref(Js))]),_:1})]),Xh,m.createElementVNode("div",Zh,[m.createVNode(m.unref(pi))]),m.createElementVNode("div",Qh,[m.createVNode(m.unref(hi)),qh])])])],64))}});function Xe(n){this.content=n}Xe.prototype={constructor:Xe,find:function(n){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===n)return e;return-1},get:function(n){var e=this.find(n);return e==-1?void 0:this.content[e+1]},update:function(n,e,t){var r=t&&t!=n?this.remove(t):this,o=r.find(n),i=r.content.slice();return o==-1?i.push(t||n,e):(i[o+1]=e,t&&(i[o]=t)),new Xe(i)},remove:function(n){var e=this.find(n);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new Xe(t)},addToStart:function(n,e){return new Xe([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new Xe(t)},addBefore:function(n,e,t){var r=this.remove(e),o=r.content.slice(),i=r.find(n);return o.splice(i==-1?o.length:i,0,e,t),new Xe(o)},forEach:function(n){for(var e=0;e<this.content.length;e+=2)n(this.content[e],this.content[e+1])},prepend:function(n){return n=Xe.from(n),n.size?new Xe(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=Xe.from(n),n.size?new Xe(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=Xe.from(n);for(var t=0;t<n.content.length;t+=2)e=e.remove(n.content[t]);return e},toObject:function(){var n={};return this.forEach(function(e,t){n[e]=t}),n},get size(){return this.content.length>>1}};Xe.from=function(n){if(n instanceof Xe)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new Xe(e)};function fu(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let o=n.child(r),i=e.child(r);if(o==i){t+=o.nodeSize;continue}if(!o.sameMarkup(i))return t;if(o.isText&&o.text!=i.text){for(let s=0;o.text[s]==i.text[s];s++)t++;return t}if(o.content.size||i.content.size){let s=fu(o.content,i.content,t+1);if(s!=null)return s}t+=o.nodeSize}}function pu(n,e,t,r){for(let o=n.childCount,i=e.childCount;;){if(o==0||i==0)return o==i?null:{a:t,b:r};let s=n.child(--o),l=e.child(--i),a=s.nodeSize;if(s==l){t-=a,r-=a;continue}if(!s.sameMarkup(l))return{a:t,b:r};if(s.isText&&s.text!=l.text){let c=0,u=Math.min(s.text.length,l.text.length);for(;c<u&&s.text[s.text.length-c-1]==l.text[l.text.length-c-1];)c++,t--,r--;return{a:t,b:r}}if(s.content.size||l.content.size){let c=pu(s.content,l.content,t-1,r-1);if(c)return c}t-=a,r-=a}}class ie{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,t,r,o=0,i){for(let s=0,l=0;l<t;s++){let a=this.content[s],c=l+a.nodeSize;if(c>e&&r(a,o+l,i||null,s)!==!1&&a.content.size){let u=l+1;a.nodesBetween(Math.max(0,e-u),Math.min(a.content.size,t-u),r,o+u)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,o){let i="",s=!0;return this.nodesBetween(e,t,(l,a)=>{l.isText?(i+=l.text.slice(Math.max(e,a)-a,t-a),s=!r):l.isLeaf?(o?i+=typeof o=="function"?o(l):o:l.type.spec.leafText&&(i+=l.type.spec.leafText(l)),s=!r):!s&&l.isBlock&&(i+=r,s=!0)},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,o=this.content.slice(),i=0;for(t.isText&&t.sameMarkup(r)&&(o[o.length-1]=t.withText(t.text+r.text),i=1);i<e.content.length;i++)o.push(e.content[i]);return new ie(o,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],o=0;if(t>e)for(let i=0,s=0;s<t;i++){let l=this.content[i],a=s+l.nodeSize;a>e&&((s<e||a>t)&&(l.isText?l=l.cut(Math.max(0,e-s),Math.min(l.text.length,t-s)):l=l.cut(Math.max(0,e-s-1),Math.min(l.content.size,t-s-1))),r.push(l),o+=l.nodeSize),s=a}return new ie(r,o)}cutByIndex(e,t){return e==t?ie.empty:e==0&&t==this.content.length?this:new ie(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let o=this.content.slice(),i=this.size+t.nodeSize-r.nodeSize;return o[e]=t,new ie(o,i)}addToStart(e){return new ie([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new ie(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,r=0;t<this.content.length;t++){let o=this.content[t];e(o,r,t),r+=o.nodeSize}}findDiffStart(e,t=0){return fu(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return pu(this,e,t,r)}findIndex(e,t=-1){if(e==0)return oo(0,e);if(e==this.size)return oo(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let r=0,o=0;;r++){let i=this.child(r),s=o+i.nodeSize;if(s>=e)return s==e||t>0?oo(r+1,s):oo(r,o);o=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return ie.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new ie(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return ie.empty;let t,r=0;for(let o=0;o<e.length;o++){let i=e[o];r+=i.nodeSize,o&&i.isText&&e[o-1].sameMarkup(i)?(t||(t=e.slice(0,o)),t[t.length-1]=i.withText(t[t.length-1].text+i.text)):t&&t.push(i)}return new ie(t||e,r)}static from(e){if(!e)return ie.empty;if(e instanceof ie)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new ie([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}ie.empty=new ie([],0);const zi={index:0,offset:0};function oo(n,e){return zi.index=n,zi.offset=e,zi}function xo(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(!xo(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!xo(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let Le=class gs{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let o=0;o<e.length;o++){let i=e[o];if(this.eq(i))return e;if(this.type.excludes(i.type))t||(t=e.slice(0,o));else{if(i.type.excludes(this.type))return e;!r&&i.type.rank>this.type.rank&&(t||(t=e.slice(0,o)),t.push(this),r=!0),t&&t.push(i)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&xo(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 gs.none;if(e instanceof gs)return[e];let t=e.slice();return t.sort((r,o)=>r.type.rank-o.type.rank),t}};Le.none=[];class So 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=mu(this.content,e+this.openStart,t);return r&&new fe(r,this.openStart,this.openEnd)}removeBetween(e,t){return new fe(hu(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return fe.empty;let r=t.openStart||0,o=t.openEnd||0;if(typeof r!="number"||typeof o!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new fe(ie.fromJSON(e,t.content),r,o)}static maxOpen(e,t=!0){let r=0,o=0;for(let i=e.firstChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.lastChild)o++;return new fe(e,r,o)}}fe.empty=new fe(ie.empty,0,0);function hu(n,e,t){let{index:r,offset:o}=n.findIndex(e),i=n.maybeChild(r),{index:s,offset:l}=n.findIndex(t);if(o==e||i.isText){if(l!=t&&!n.child(s).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=s)throw new RangeError("Removing non-flat range");return n.replaceChild(r,i.copy(hu(i.content,e-o-1,t-o-1)))}function mu(n,e,t,r){let{index:o,offset:i}=n.findIndex(e),s=n.maybeChild(o);if(i==e||s.isText)return r&&!r.canReplace(o,o,t)?null:n.cut(0,e).append(t).append(n.cut(e));let l=mu(s.content,e-i-1,t);return l&&n.replaceChild(o,s.copy(l))}function _h(n,e,t){if(t.openStart>n.depth)throw new So("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new So("Inconsistent open depths");return gu(n,e,t,0)}function gu(n,e,t,r){let o=n.index(r),i=n.node(r);if(o==e.index(r)&&r<n.depth-t.openStart){let s=gu(n,e,t,r+1);return i.copy(i.content.replaceChild(o,s))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&n.depth==r&&e.depth==r){let s=n.parent,l=s.content;return Vn(s,l.cut(0,n.parentOffset).append(t.content).append(l.cut(e.parentOffset)))}else{let{start:s,end:l}=em(t,n);return Vn(i,yu(n,s,l,e,r))}else return Vn(i,Eo(n,e,r))}function vu(n,e){if(!e.type.compatibleContent(n.type))throw new So("Cannot join "+e.type.name+" onto "+n.type.name)}function vs(n,e,t){let r=n.node(t);return vu(r,e.node(t)),r}function zn(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 Tr(n,e,t,r){let o=(e||n).node(t),i=0,s=e?e.index(t):o.childCount;n&&(i=n.index(t),n.depth>t?i++:n.textOffset&&(zn(n.nodeAfter,r),i++));for(let l=i;l<s;l++)zn(o.child(l),r);e&&e.depth==t&&e.textOffset&&zn(e.nodeBefore,r)}function Vn(n,e){return n.type.checkContent(e),n.copy(e)}function yu(n,e,t,r,o){let i=n.depth>o&&vs(n,e,o+1),s=r.depth>o&&vs(t,r,o+1),l=[];return Tr(null,n,o,l),i&&s&&e.index(o)==t.index(o)?(vu(i,s),zn(Vn(i,yu(n,e,t,r,o+1)),l)):(i&&zn(Vn(i,Eo(n,e,o+1)),l),Tr(e,t,o,l),s&&zn(Vn(s,Eo(t,r,o+1)),l)),Tr(r,null,o,l),new ie(l)}function Eo(n,e,t){let r=[];if(Tr(null,n,t,r),n.depth>t){let o=vs(n,e,t+1);zn(Vn(o,Eo(n,e,t+1)),r)}return Tr(e,null,t,r),new ie(r)}function em(n,e){let t=e.depth-n.openStart,o=e.node(t).copy(n.content);for(let i=t-1;i>=0;i--)o=e.node(i).copy(ie.from(o));return{start:o.resolveNoCache(n.openStart+t),end:o.resolveNoCache(o.content.size-n.openEnd-t)}}class zr{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],o=e.child(t);return r?e.child(t).cut(r):o}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],o=t==0?0:this.path[t*3-1]+1;for(let i=0;i<e;i++)o+=r.child(i).nodeSize;return o}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return Le.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),o=e.maybeChild(t);if(!r){let l=r;r=o,o=l}let i=r.marks;for(var s=0;s<i.length;s++)i[s].type.spec.inclusive===!1&&(!o||!i[s].isInSet(o.marks))&&(i=i[s--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,o=e.parent.maybeChild(e.index());for(var i=0;i<r.length;i++)r[i].type.spec.inclusive===!1&&(!o||!r[i].isInSet(o.marks))&&(r=r[i--].removeFromSet(r));return r}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new Co(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],o=0,i=t;for(let s=e;;){let{index:l,offset:a}=s.content.findIndex(i),c=i-a;if(r.push(s,l,o+a),!c||(s=s.child(l),s.isText))break;i=c-1,o+=a+1}return new zr(t,r,i)}static resolveCached(e,t){for(let o=0;o<Vi.length;o++){let i=Vi[o];if(i.pos==t&&i.doc==e)return i}let r=Vi[$i]=zr.resolve(e,t);return $i=($i+1)%tm,r}}let Vi=[],$i=0,tm=12;class Co{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 nm=Object.create(null);let $n=class ys{constructor(e,t,r,o=Le.none){this.type=e,this.attrs=t,this.marks=o,this.content=r||ie.empty}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,r,o=0){this.content.nodesBetween(e,t,r,o,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,r,o){return this.content.textBetween(e,t,r,o)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,r){return this.type==e&&xo(this.attrs,t||e.defaultAttrs||nm)&&Le.sameSet(this.marks,r||Le.none)}copy(e=null){return e==this.content?this:new ys(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new ys(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,r=!1){if(e==t)return fe.empty;let o=this.resolve(e),i=this.resolve(t),s=r?0:o.sharedDepth(t),l=o.start(s),c=o.node(s).content.cut(o.pos-l,i.pos-l);return new fe(c,o.depth-s,i.depth-s)}replace(e,t,r){return _h(this.resolve(e),this.resolve(t),r)}nodeAt(e){for(let t=this;;){let{index:r,offset:o}=t.content.findIndex(e);if(t=t.maybeChild(r),!t)return null;if(o==e||t.isText)return t;e-=o+1}}childAfter(e){let{index:t,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(t),index:t,offset:r};let o=this.content.child(t-1);return{node:o,index:t-1,offset:r-o.nodeSize}}resolve(e){return zr.resolveCached(this,e)}resolveNoCache(e){return zr.resolve(this,e)}rangeHasMark(e,t,r){let o=!1;return t>e&&this.nodesBetween(e,t,i=>(r.isInSet(i.marks)&&(o=!0),!o)),o}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),bu(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=ie.empty,o=0,i=r.childCount){let s=this.contentMatchAt(e).matchFragment(r,o,i),l=s&&s.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let a=o;a<i;a++)if(!this.type.allowsMarks(r.child(a).marks))return!1;return!0}canReplaceWith(e,t,r,o){if(o&&!this.type.allowsMarks(o))return!1;let i=this.contentMatchAt(e).matchType(r),s=i&&i.matchFragment(this.content,t);return s?s.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content);let e=Le.none;for(let t=0;t<this.marks.length;t++)e=this.marks[t].addToSet(e);if(!Le.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r=null;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let o=ie.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,o,r)}};$n.prototype.text=void 0;class ko extends $n{constructor(e,t,r,o){if(super(e,t,null,o),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):bu(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 ko(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new ko(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 bu(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class Wn{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new rm(e,t);if(r.next==null)return Wn.empty;let o=xu(r);r.next&&r.err("Unexpected trailing text");let i=um(cm(o));return dm(i,r),i}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,r=e.childCount){let o=this;for(let i=t;o&&i<r;i++)o=o.matchType(e.child(i).type);return o}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let r=0;r<e.next.length;r++)if(this.next[t].type==e.next[r].type)return!0;return!1}fillBefore(e,t=!1,r=0){let o=[this];function i(s,l){let a=s.matchFragment(e,r);if(a&&(!t||a.validEnd))return ie.from(l.map(c=>c.createAndFill()));for(let c=0;c<s.next.length;c++){let{type:u,next:d}=s.next[c];if(!(u.isText||u.hasRequiredAttrs())&&o.indexOf(d)==-1){o.push(d);let f=i(d,l.concat(u));if(f)return f}}return null}return i(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let o=r.shift(),i=o.match;if(i.matchType(e)){let s=[];for(let l=o;l.type;l=l.via)s.push(l.type);return s.reverse()}for(let s=0;s<i.next.length;s++){let{type:l,next:a}=i.next[s];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in t)&&(!o.type||a.validEnd)&&(r.push({match:l.contentMatch,type:l,via:o}),t[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let o=0;o<r.next.length;o++)e.indexOf(r.next[o].next)==-1&&t(r.next[o].next)}return t(this),e.map((r,o)=>{let i=o+(r.validEnd?"*":" ")+" ";for(let s=0;s<r.next.length;s++)i+=(s?", ":"")+r.next[s].type.name+"->"+e.indexOf(r.next[s].next);return i}).join(`
|
|
12
12
|
`)}}Wn.empty=new Wn(!0);class rm{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 xu(n){let e=[];do e.push(om(n));while(n.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function om(n){let e=[];do e.push(im(n));while(n.next&&n.next!=")"&&n.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function im(n){let e=lm(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=sm(n,e);else break;return e}function sl(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let e=Number(n.next);return n.pos++,e}function sm(n,e){let t=sl(n),r=t;return n.eat(",")&&(n.next!="}"?r=sl(n):r=-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:t,max:r,expr:e}}function am(n,e){let t=n.nodeTypes,r=t[e];if(r)return[r];let o=[];for(let i in t){let s=t[i];s.groups.indexOf(e)>-1&&o.push(s)}return o.length==0&&n.err("No node type or group '"+e+"' found"),o}function lm(n){if(n.eat("(")){let e=xu(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=am(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 cm(n){let e=[[]];return o(i(n,0),t()),e;function t(){return e.push([])-1}function r(s,l,a){let c={term:a,to:l};return e[s].push(c),c}function o(s,l){s.forEach(a=>a.to=l)}function i(s,l){if(s.type=="choice")return s.exprs.reduce((a,c)=>a.concat(i(c,l)),[]);if(s.type=="seq")for(let a=0;;a++){let c=i(s.exprs[a],l);if(a==s.exprs.length-1)return c;o(c,l=t())}else if(s.type=="star"){let a=t();return r(l,a),o(i(s.expr,a),a),[r(a)]}else if(s.type=="plus"){let a=t();return o(i(s.expr,l),a),o(i(s.expr,a),a),[r(a)]}else{if(s.type=="opt")return[r(l)].concat(i(s.expr,l));if(s.type=="range"){let a=l;for(let c=0;c<s.min;c++){let u=t();o(i(s.expr,a),u),a=u}if(s.max==-1)o(i(s.expr,a),a);else for(let c=s.min;c<s.max;c++){let u=t();r(a,u),o(i(s.expr,a),u),a=u}return[r(a)]}else{if(s.type=="name")return[r(l,void 0,s.value)];throw new Error("Unknown expr type")}}}}function Su(n,e){return e-n}function al(n,e){let t=[];return r(e),t.sort(Su);function r(o){let i=n[o];if(i.length==1&&!i[0].term)return r(i[0].to);t.push(o);for(let s=0;s<i.length;s++){let{term:l,to:a}=i[s];!l&&t.indexOf(a)==-1&&r(a)}}}function um(n){let e=Object.create(null);return t(al(n,0));function t(r){let o=[];r.forEach(s=>{n[s].forEach(({term:l,to:a})=>{if(!l)return;let c;for(let u=0;u<o.length;u++)o[u][0]==l&&(c=o[u][1]);al(n,a).forEach(u=>{c||o.push([l,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let i=e[r.join(",")]=new Wn(r.indexOf(n.length-1)>-1);for(let s=0;s<o.length;s++){let l=o[s][1].sort(Su);i.next.push({type:o[s][0],next:e[l.join(",")]||t(l)})}return i}}function dm(n,e){for(let t=0,r=[n];t<r.length;t++){let o=r[t],i=!o.validEnd,s=[];for(let l=0;l<o.next.length;l++){let{type:a,next:c}=o.next[l];s.push(a.name),i&&!(a.isText||a.hasRequiredAttrs())&&(i=!1),r.indexOf(c)==-1&&r.push(c)}i&&e.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function Eu(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 Cu(n,e){let t=Object.create(null);for(let r in n){let o=e&&e[r];if(o===void 0){let i=n[r];if(i.hasDefault)o=i.default;else throw new RangeError("No value supplied for attribute "+r)}t[r]=o}return t}function ku(n){let e=Object.create(null);if(n)for(let t in n)e[t]=new fm(n[t]);return e}let ll=class wu{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=ku(r.attrs),this.defaultAttrs=Eu(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==Wn.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:Cu(this.attrs,e)}create(e=null,t,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new $n(this,this.computeAttrs(e),ie.from(t),Le.setFrom(r))}createChecked(e=null,t,r){return t=ie.from(t),this.checkContent(t),new $n(this,this.computeAttrs(e),t,Le.setFrom(r))}createAndFill(e=null,t,r){if(e=this.computeAttrs(e),t=ie.from(t),t.size){let s=this.contentMatch.fillBefore(t);if(!s)return null;t=s.append(t)}let o=this.contentMatch.matchFragment(t),i=o&&o.fillBefore(ie.empty,!0);return i?new $n(this,e,t.append(i),Le.setFrom(r)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let t;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?t&&t.push(e[r]):t||(t=e.slice(0,r));return t?t.length?t:Le.none:e}static compile(e,t){let r=Object.create(null);e.forEach((i,s)=>r[i]=new wu(i,t,s));let o=t.spec.topNode||"doc";if(!r[o])throw new RangeError("Schema is missing its top node type ('"+o+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};class fm{constructor(e){this.hasDefault=Object.prototype.hasOwnProperty.call(e,"default"),this.default=e.default}get isRequired(){return!this.hasDefault}}class xi{constructor(e,t,r,o){this.name=e,this.rank=t,this.schema=r,this.spec=o,this.attrs=ku(o.attrs),this.excluded=null;let i=Eu(this.attrs);this.instance=i?new Le(this,i):null}create(e=null){return!e&&this.instance?this.instance:new Le(this,Cu(this.attrs,e))}static compile(e,t){let r=Object.create(null),o=0;return e.forEach((i,s)=>r[i]=new xi(i,o++,t,s)),r}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}excludes(e){return this.excluded.indexOf(e)>-1}}class pm{constructor(e){this.cached=Object.create(null);let t=this.spec={};for(let o in e)t[o]=e[o];t.nodes=Xe.from(e.nodes),t.marks=Xe.from(e.marks||{}),this.nodes=ll.compile(this.spec.nodes,this),this.marks=xi.compile(this.spec.marks,this);let r=Object.create(null);for(let o in this.nodes){if(o in this.marks)throw new RangeError(o+" can not be both a node and a mark");let i=this.nodes[o],s=i.spec.content||"",l=i.spec.marks;i.contentMatch=r[s]||(r[s]=Wn.parse(s,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.markSet=l=="_"?null:l?cl(this,l.split(" ")):l==""||!i.inlineContent?[]:null}for(let o in this.marks){let i=this.marks[o],s=i.spec.excludes;i.excluded=s==null?[i]:s==""?[]:cl(this,s.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,r,o){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof ll){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(t,r,o)}text(e,t){let r=this.nodes.text;return new ko(r,r.defaultAttrs,e,Le.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeFromJSON(e){return $n.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 cl(n,e){let t=[];for(let r=0;r<e.length;r++){let o=e[r],i=n.marks[o],s=i;if(i)t.push(i);else for(let l in n.marks){let a=n.marks[l];(o=="_"||a.spec.group&&a.spec.group.split(" ").indexOf(o)>-1)&&t.push(s=a)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return t}class cr{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[],t.forEach(r=>{r.tag?this.tags.push(r):r.style&&this.styles.push(r)}),this.normalizeLists=!this.tags.some(r=>{if(!/^(ul|ol)\b/.test(r.tag)||!r.node)return!1;let o=e.nodes[r.node];return o.contentMatch.matchType(o)})}parse(e,t={}){let r=new dl(this,t,!1);return r.addAll(e,t.from,t.to),r.finish()}parseSlice(e,t={}){let r=new dl(this,t,!0);return r.addAll(e,t.from,t.to),fe.maxOpen(r.finish())}matchTag(e,t,r){for(let o=r?this.tags.indexOf(r)+1:0;o<this.tags.length;o++){let i=this.tags[o];if(gm(e,i.tag)&&(i.namespace===void 0||e.namespaceURI==i.namespace)&&(!i.context||t.matchesContext(i.context))){if(i.getAttrs){let s=i.getAttrs(e);if(s===!1)continue;i.attrs=s||void 0}return i}}}matchStyle(e,t,r,o){for(let i=o?this.styles.indexOf(o)+1:0;i<this.styles.length;i++){let s=this.styles[i],l=s.style;if(!(l.indexOf(e)!=0||s.context&&!r.matchesContext(s.context)||l.length>e.length&&(l.charCodeAt(e.length)!=61||l.slice(e.length+1)!=t))){if(s.getAttrs){let a=s.getAttrs(t);if(a===!1)continue;s.attrs=a||void 0}return s}}}static schemaRules(e){let t=[];function r(o){let i=o.priority==null?50:o.priority,s=0;for(;s<t.length;s++){let l=t[s];if((l.priority==null?50:l.priority)<i)break}t.splice(s,0,o)}for(let o in e.marks){let i=e.marks[o].spec.parseDOM;i&&i.forEach(s=>{r(s=fl(s)),s.mark||s.ignore||s.clearMark||(s.mark=o)})}for(let o in e.nodes){let i=e.nodes[o].spec.parseDOM;i&&i.forEach(s=>{r(s=fl(s)),s.node||s.ignore||s.mark||(s.node=o)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new cr(e,cr.schemaRules(e)))}}const Tu={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},hm={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Au={ol:!0,ul:!0},wo=1,To=2,Ar=4;function ul(n,e,t){return e!=null?(e?wo:0)|(e==="full"?To:0):n&&n.whitespace=="pre"?wo|To:t&~Ar}class io{constructor(e,t,r,o,i,s,l){this.type=e,this.attrs=t,this.marks=r,this.pendingMarks=o,this.solid=i,this.options=l,this.content=[],this.activeMarks=Le.none,this.stashMarks=[],this.match=s||(l&Ar?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(ie.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let r=this.type.contentMatch,o;return(o=r.findWrapping(e.type))?(this.match=r,o):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&wo)){let r=this.content[this.content.length-1],o;if(r&&r.isText&&(o=/[ \t\r\n\u000c]+$/.exec(r.text))){let i=r;r.text.length==o[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-o[0].length))}}let t=ie.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(ie.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}popFromStashMark(e){for(let t=this.stashMarks.length-1;t>=0;t--)if(e.eq(this.stashMarks[t]))return this.stashMarks.splice(t,1)[0]}applyPending(e){for(let t=0,r=this.pendingMarks;t<r.length;t++){let o=r[t];(this.type?this.type.allowsMarkType(o.type):ym(o.type,e))&&!o.isInSet(this.activeMarks)&&(this.activeMarks=o.addToSet(this.activeMarks),this.pendingMarks=o.removeFromSet(this.pendingMarks))}}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!Tu.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class dl{constructor(e,t,r){this.parser=e,this.options=t,this.isOpen=r,this.open=0;let o=t.topNode,i,s=ul(null,t.preserveWhitespace,0)|(r?Ar:0);o?i=new io(o.type,o.attrs,Le.none,Le.none,!0,t.topMatch||o.type.contentMatch,s):r?i=new io(null,null,Le.none,Le.none,!0,null,s):i=new io(e.schema.topNodeType,null,Le.none,Le.none,!0,null,s),this.nodes=[i],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e){e.nodeType==3?this.addTextNode(e):e.nodeType==1&&this.addElement(e)}withStyleRules(e,t){let r=e.getAttribute("style");if(!r)return t();let o=this.readStyles(vm(r));if(!o)return;let[i,s]=o,l=this.top;for(let a=0;a<s.length;a++)this.removePendingMark(s[a],l);for(let a=0;a<i.length;a++)this.addPendingMark(i[a]);t();for(let a=0;a<i.length;a++)this.removePendingMark(i[a],l);for(let a=0;a<s.length;a++)this.addPendingMark(s[a])}addTextNode(e){let t=e.nodeValue,r=this.top;if(r.options&To||r.inlineContext(e)||/[^ \t\r\n\u000c]/.test(t)){if(r.options&wo)r.options&To?t=t.replace(/\r\n?/g,`
|
|
13
13
|
`):t=t.replace(/\r?\n|\r/g," ");else if(t=t.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(t)&&this.open==this.nodes.length-1){let o=r.content[r.content.length-1],i=e.previousSibling;(!o||i&&i.nodeName=="BR"||o.isText&&/[ \t\r\n\u000c]$/.test(o.text))&&(t=t.slice(1))}t&&this.insertNode(this.parser.schema.text(t)),this.findInText(e)}else this.findInside(e)}addElement(e,t){let r=e.nodeName.toLowerCase(),o;Au.hasOwnProperty(r)&&this.parser.normalizeLists&&mm(e);let i=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(o=this.parser.matchTag(e,this,t));if(i?i.ignore:hm.hasOwnProperty(r))this.findInside(e),this.ignoreFallback(e);else if(!i||i.skip||i.closeParent){i&&i.closeParent?this.open=Math.max(0,this.open-1):i&&i.skip.nodeType&&(e=i.skip);let s,l=this.top,a=this.needsBlock;if(Tu.hasOwnProperty(r))l.content.length&&l.content[0].isInline&&this.open&&(this.open--,l=this.top),s=!0,l.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e);return}i&&i.skip?this.addAll(e):this.withStyleRules(e,()=>this.addAll(e)),s&&this.sync(l),this.needsBlock=a}else this.withStyleRules(e,()=>{this.addElementByRule(e,i,i.consuming===!1?o:void 0)})}leafFallback(e){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
|
|
14
14
|
`))}ignoreFallback(e){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"))}readStyles(e){let t=Le.none,r=Le.none;for(let o=0;o<e.length;o+=2)for(let i=void 0;;){let s=this.parser.matchStyle(e[o],e[o+1],this,i);if(!s)break;if(s.ignore)return null;if(s.clearMark?this.top.pendingMarks.concat(this.top.activeMarks).forEach(l=>{s.clearMark(l)&&(r=l.addToSet(r))}):t=this.parser.schema.marks[s.mark].create(s.attrs).addToSet(t),s.consuming===!1)i=s;else break}return[t,r]}addElementByRule(e,t,r){let o,i,s;t.node?(i=this.parser.schema.nodes[t.node],i.isLeaf?this.insertNode(i.create(t.attrs))||this.leafFallback(e):o=this.enter(i,t.attrs||null,t.preserveWhitespace)):(s=this.parser.schema.marks[t.mark].create(t.attrs),this.addPendingMark(s));let l=this.top;if(i&&i.isLeaf)this.findInside(e);else if(r)this.addElement(e,r);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(a=>this.insertNode(a));else{let a=e;typeof t.contentElement=="string"?a=e.querySelector(t.contentElement):typeof t.contentElement=="function"?a=t.contentElement(e):t.contentElement&&(a=t.contentElement),this.findAround(e,a,!0),this.addAll(a)}o&&this.sync(l)&&this.open--,s&&this.removePendingMark(s,l)}addAll(e,t,r){let o=t||0;for(let i=t?e.childNodes[t]:e.firstChild,s=r==null?null:e.childNodes[r];i!=s;i=i.nextSibling,++o)this.findAtPoint(e,o),this.addDOM(i);this.findAtPoint(e,o)}findPlace(e){let t,r;for(let o=this.open;o>=0;o--){let i=this.nodes[o],s=i.findWrapping(e);if(s&&(!t||t.length>s.length)&&(t=s,r=i,!s.length)||i.solid)break}if(!t)return!1;this.sync(r);for(let o=0;o<t.length;o++)this.enterInner(t[o],null,!1);return!0}insertNode(e){if(e.isInline&&this.needsBlock&&!this.top.type){let t=this.textblockFromContext();t&&this.enterInner(t)}if(this.findPlace(e)){this.closeExtra();let t=this.top;t.applyPending(e.type),t.match&&(t.match=t.match.matchType(e.type));let r=t.activeMarks;for(let o=0;o<e.marks.length;o++)(!t.type||t.type.allowsMarkType(e.marks[o].type))&&(r=e.marks[o].addToSet(r));return t.content.push(e.mark(r)),!0}return!1}enter(e,t,r){let o=this.findPlace(e.create(t));return o&&this.enterInner(e,t,!0,r),o}enterInner(e,t=null,r=!1,o){this.closeExtra();let i=this.top;i.applyPending(e),i.match=i.match&&i.match.matchType(e);let s=ul(e,o,i.options);i.options&Ar&&i.content.length==0&&(s|=Ar),this.nodes.push(new io(e,t,i.activeMarks,i.pendingMarks,r,null,s)),this.open++}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(e){for(let t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let r=this.nodes[t].content;for(let o=r.length-1;o>=0;o--)e+=r[o].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==t&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].pos==null&&e.nodeType==1&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,r){if(e!=t&&this.find)for(let o=0;o<this.find.length;o++)this.find[o].pos==null&&e.nodeType==1&&e.contains(this.find[o].node)&&t.compareDocumentPosition(this.find[o].node)&(r?2:4)&&(this.find[o].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),r=this.options.context,o=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(o?0:1),s=(l,a)=>{for(;l>=0;l--){let c=t[l];if(c==""){if(l==t.length-1||l==0)continue;for(;a>=i;a--)if(s(l-1,a))return!0;return!1}else{let u=a>0||a==0&&o?this.nodes[a].type:r&&a>=i?r.node(a-i).type:null;if(!u||u.name!=c&&u.groups.indexOf(c)==-1)return!1;a--}}return!0};return s(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let r=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let t in this.parser.schema.nodes){let r=this.parser.schema.nodes[t];if(r.isTextblock&&r.defaultAttrs)return r}}addPendingMark(e){let t=bm(e,this.top.pendingMarks);t&&this.top.stashMarks.push(t),this.top.pendingMarks=e.addToSet(this.top.pendingMarks)}removePendingMark(e,t){for(let r=this.open;r>=0;r--){let o=this.nodes[r];if(o.pendingMarks.lastIndexOf(e)>-1)o.pendingMarks=e.removeFromSet(o.pendingMarks);else{o.activeMarks=e.removeFromSet(o.activeMarks);let s=o.popFromStashMark(e);s&&o.type&&o.type.allowsMarkType(s.type)&&(o.activeMarks=s.addToSet(o.activeMarks))}if(o==t)break}}}function mm(n){for(let e=n.firstChild,t=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&Au.hasOwnProperty(r)&&t?(t.appendChild(e),e=t):r=="li"?t=e:r&&(t=null)}}function gm(n,e){return(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,e)}function vm(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 fl(n){let e={};for(let t in n)e[t]=n[t];return e}function ym(n,e){let t=e.schema.nodes;for(let r in t){let o=t[r];if(!o.allowsMarkType(n))continue;let i=[],s=l=>{i.push(l);for(let a=0;a<l.edgeCount;a++){let{type:c,next:u}=l.edge(a);if(c==e||i.indexOf(u)<0&&s(u))return!0}};if(s(o.contentMatch))return!0}}function bm(n,e){for(let t=0;t<e.length;t++)if(n.eq(e[t]))return e[t]}class Xt{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},r){r||(r=Ui(t).createDocumentFragment());let o=r,i=[];return e.forEach(s=>{if(i.length||s.marks.length){let l=0,a=0;for(;l<i.length&&a<s.marks.length;){let c=s.marks[a];if(!this.marks[c.type.name]){a++;continue}if(!c.eq(i[l][0])||c.type.spec.spanning===!1)break;l++,a++}for(;l<i.length;)o=i.pop()[1];for(;a<s.marks.length;){let c=s.marks[a++],u=this.serializeMark(c,s.isInline,t);u&&(i.push([c,o]),o.appendChild(u.dom),o=u.contentDOM||u.dom)}}o.appendChild(this.serializeNodeInner(s,t))}),r}serializeNodeInner(e,t){let{dom:r,contentDOM:o}=Xt.renderSpec(Ui(t),this.nodes[e.type.name](e));if(o){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,o)}return r}serializeNode(e,t={}){let r=this.serializeNodeInner(e,t);for(let o=e.marks.length-1;o>=0;o--){let i=this.serializeMark(e.marks[o],e.isInline,t);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(e,t,r={}){let o=this.marks[e.type.name];return o&&Xt.renderSpec(Ui(r),o(e,t))}static renderSpec(e,t,r=null){if(typeof t=="string")return{dom:e.createTextNode(t)};if(t.nodeType!=null)return{dom:t};if(t.dom&&t.dom.nodeType!=null)return t;let o=t[0],i=o.indexOf(" ");i>0&&(r=o.slice(0,i),o=o.slice(i+1));let s,l=r?e.createElementNS(r,o):e.createElement(o),a=t[1],c=1;if(a&&typeof a=="object"&&a.nodeType==null&&!Array.isArray(a)){c=2;for(let u in a)if(a[u]!=null){let d=u.indexOf(" ");d>0?l.setAttributeNS(u.slice(0,d),u.slice(d+1),a[u]):l.setAttribute(u,a[u])}}for(let u=c;u<t.length;u++){let d=t[u];if(d===0){if(u<t.length-1||u>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:f,contentDOM:h}=Xt.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 Xt(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=pl(e.nodes);return t.text||(t.text=r=>r.text),t}static marksFromSchema(e){return pl(e.marks)}}function pl(n){let e={};for(let t in n){let r=n[t].spec.toDOM;r&&(e[t]=r)}return e}function Ui(n){return n.document||window.document}const Ou=65535,Mu=Math.pow(2,16);function xm(n,e){return n+e*Mu}function hl(n){return n&Ou}function Sm(n){return(n-(n&Ou))/Mu}const Iu=1,Nu=2,ho=4,Ru=8;class bs{constructor(e,t,r){this.pos=e,this.delInfo=t,this.recover=r}get deleted(){return(this.delInfo&Ru)>0}get deletedBefore(){return(this.delInfo&(Iu|ho))>0}get deletedAfter(){return(this.delInfo&(Nu|ho))>0}get deletedAcross(){return(this.delInfo&ho)>0}}class yt{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&yt.empty)return yt.empty}recover(e){let t=0,r=hl(e);if(!this.inverted)for(let o=0;o<r;o++)t+=this.ranges[o*3+2]-this.ranges[o*3+1];return this.ranges[r*3]+t+Sm(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,r){let o=0,i=this.inverted?2:1,s=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?o:0);if(a>e)break;let c=this.ranges[l+i],u=this.ranges[l+s],d=a+c;if(e<=d){let f=c?e==a?-1:e==d?1:t:t,h=a+o+(f<0?0:u);if(r)return h;let p=e==(t<0?a:d)?null:xm(l/3,e-a),g=e==a?Nu:e==d?Iu:ho;return(t<0?e!=a:e!=d)&&(g|=Ru),new bs(h,g,p)}o+=u-c}return r?e+o:new bs(e+o,0,null)}touches(e,t){let r=0,o=hl(t),i=this.inverted?2:1,s=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?r:0);if(a>e)break;let c=this.ranges[l+i],u=a+c;if(e<=u&&l==o*3)return!0;r+=this.ranges[l+s]-c}return!1}forEach(e){let t=this.inverted?2:1,r=this.inverted?1:2;for(let o=0,i=0;o<this.ranges.length;o+=3){let s=this.ranges[o],l=s-(this.inverted?i:0),a=s+(this.inverted?0:i),c=this.ranges[o+t],u=this.ranges[o+r];e(l,l+c,a,a+u),i+=u-c}}invert(){return new yt(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?yt.empty:new yt(e<0?[0,-e,0]:[0,0,e])}}yt.empty=new yt([]);class Or{constructor(e=[],t,r=0,o=e.length){this.maps=e,this.mirror=t,this.from=r,this.to=o}slice(e=0,t=this.maps.length){return new Or(this.maps,this.mirror,e,t)}copy(){return new Or(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(e,t){this.to=this.maps.push(e),t!=null&&this.setMirror(this.maps.length-1,t)}appendMapping(e){for(let t=0,r=this.maps.length;t<e.maps.length;t++){let o=e.getMirror(t);this.appendMap(e.maps[t],o!=null&&o<t?r+o:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,r=this.maps.length+e.maps.length;t>=0;t--){let o=e.getMirror(t);this.appendMap(e.maps[t].invert(),o!=null&&o>t?r-o-1:void 0)}}invert(){let e=new Or;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let r=this.from;r<this.to;r++)e=this.maps[r].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,r){let o=0;for(let i=this.from;i<this.to;i++){let s=this.maps[i],l=s.mapResult(e,t);if(l.recover!=null){let a=this.getMirror(i);if(a!=null&&a>i&&a<this.to){i=a,e=this.maps[a].recover(l.recover);continue}}o|=l.delInfo,e=l.pos}return r?e:new bs(e,o,null)}}const Hi=Object.create(null);class nt{getMap(){return yt.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=Hi[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 Hi)throw new RangeError("Duplicate use of step JSON ID "+e);return Hi[e]=t,t.prototype.jsonID=e,t}}class He{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new He(e,null)}static fail(e){return new He(null,e)}static fromReplace(e,t,r,o){try{return He.ok(e.replace(t,r,o))}catch(i){if(i instanceof So)return He.fail(i.message);throw i}}}function sa(n,e,t){let r=[];for(let o=0;o<n.childCount;o++){let i=n.child(o);i.content.size&&(i=i.copy(sa(i.content,e,i))),i.isInline&&(i=e(i,t,o)),r.push(i)}return ie.fromArray(r)}class bn extends nt{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=e.resolve(this.from),o=r.node(r.sharedDepth(this.to)),i=new fe(sa(t.content,(s,l)=>!s.isAtom||!l.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),o),t.openStart,t.openEnd);return He.fromReplace(e,this.from,this.to,i)}invert(){return new Zt(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 bn(t.pos,r.pos,this.mark)}merge(e){return e instanceof bn&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new bn(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 bn(t.from,t.to,e.markFromJSON(t.mark))}}nt.jsonID("addMark",bn);class Zt extends nt{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=new fe(sa(t.content,o=>o.mark(this.mark.removeFromSet(o.marks)),e),t.openStart,t.openEnd);return He.fromReplace(e,this.from,this.to,r)}invert(){return new bn(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 Zt(t.pos,r.pos,this.mark)}merge(e){return e instanceof Zt&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Zt(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 Zt(t.from,t.to,e.markFromJSON(t.mark))}}nt.jsonID("removeMark",Zt);class xn extends nt{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return He.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return He.fromReplace(e,this.pos,this.pos+1,new fe(ie.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let r=this.mark.addToSet(t.marks);if(r.length==t.marks.length){for(let o=0;o<t.marks.length;o++)if(!t.marks[o].isInSet(r))return new xn(this.pos,t.marks[o]);return new xn(this.pos,this.mark)}}return new ur(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new xn(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 xn(t.pos,e.markFromJSON(t.mark))}}nt.jsonID("addNodeMark",xn);class ur extends nt{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return He.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return He.fromReplace(e,this.pos,this.pos+1,new fe(ie.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new xn(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new ur(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 ur(t.pos,e.markFromJSON(t.mark))}}nt.jsonID("removeNodeMark",ur);class Ze extends nt{constructor(e,t,r,o=!1){super(),this.from=e,this.to=t,this.slice=r,this.structure=o}apply(e){return this.structure&&xs(e,this.from,this.to)?He.fail("Structure replace would overwrite content"):He.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new yt([this.from,this.to-this.from,this.slice.size])}invert(e){return new Ze(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deletedAcross&&r.deletedAcross?null:new Ze(t.pos,Math.max(t.pos,r.pos),this.slice)}merge(e){if(!(e instanceof Ze)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let t=this.slice.size+e.slice.size==0?fe.empty:new fe(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new Ze(this.from,this.to+(e.to-e.from),t,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let t=this.slice.size+e.slice.size==0?fe.empty:new fe(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new Ze(e.from,this.to,t,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new Ze(t.from,t.to,fe.fromJSON(e,t.slice),!!t.structure)}}nt.jsonID("replace",Ze);class Ge extends nt{constructor(e,t,r,o,i,s,l=!1){super(),this.from=e,this.to=t,this.gapFrom=r,this.gapTo=o,this.slice=i,this.insert=s,this.structure=l}apply(e){if(this.structure&&(xs(e,this.from,this.gapFrom)||xs(e,this.gapTo,this.to)))return He.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return He.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,t.content);return r?He.fromReplace(e,this.from,this.to,r):He.fail("Content does not fit in gap")}getMap(){return new yt([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),o=e.map(this.gapFrom,-1),i=e.map(this.gapTo,1);return t.deletedAcross&&r.deletedAcross||o<t.pos||i>r.pos?null:new Ge(t.pos,r.pos,o,i,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Ge(t.from,t.to,t.gapFrom,t.gapTo,fe.fromJSON(e,t.slice),t.insert,!!t.structure)}}nt.jsonID("replaceAround",Ge);function xs(n,e,t){let r=n.resolve(e),o=t-e,i=r.depth;for(;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0){let s=r.node(i).maybeChild(r.indexAfter(i));for(;o>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,o--}}return!1}function Em(n,e,t,r){let o=[],i=[],s,l;n.doc.nodesBetween(e,t,(a,c,u)=>{if(!a.isInline)return;let d=a.marks;if(!r.isInSet(d)&&u.type.allowsMarkType(r.type)){let f=Math.max(c,e),h=Math.min(c+a.nodeSize,t),p=r.addToSet(d);for(let g=0;g<d.length;g++)d[g].isInSet(p)||(s&&s.to==f&&s.mark.eq(d[g])?s.to=h:o.push(s=new Zt(f,h,d[g])));l&&l.to==f?l.to=h:i.push(l=new bn(f,h,r))}}),o.forEach(a=>n.step(a)),i.forEach(a=>n.step(a))}function Cm(n,e,t,r){let o=[],i=0;n.doc.nodesBetween(e,t,(s,l)=>{if(!s.isInline)return;i++;let a=null;if(r instanceof xi){let c=s.marks,u;for(;u=r.isInSet(c);)(a||(a=[])).push(u),c=u.removeFromSet(c)}else r?r.isInSet(s.marks)&&(a=[r]):a=s.marks;if(a&&a.length){let c=Math.min(l+s.nodeSize,t);for(let u=0;u<a.length;u++){let d=a[u],f;for(let h=0;h<o.length;h++){let p=o[h];p.step==i-1&&d.eq(o[h].style)&&(f=p)}f?(f.to=c,f.step=i):o.push({style:d,from:Math.max(l,e),to:c,step:i})}}}),o.forEach(s=>n.step(new Zt(s.from,s.to,s.style)))}function km(n,e,t,r=t.contentMatch){let o=n.doc.nodeAt(e),i=[],s=e+1;for(let l=0;l<o.childCount;l++){let a=o.child(l),c=s+a.nodeSize,u=r.matchType(a.type);if(!u)i.push(new Ze(s,c,fe.empty));else{r=u;for(let d=0;d<a.marks.length;d++)t.allowsMarkType(a.marks[d].type)||n.step(new Zt(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(ie.from(t.schema.text(" ",t.allowedMarks(a.marks))),0,0)),i.push(new Ze(s+d.index,s+d.index+d[0].length,h))}}s=c}if(!r.validEnd){let l=r.fillBefore(ie.empty,!0);n.replace(s,s,new fe(l,0,0))}for(let l=i.length-1;l>=0;l--)n.step(i[l])}function wm(n,e,t){return(e==0||n.canReplace(e,n.childCount))&&(t==n.childCount||n.canReplace(0,t))}function br(n){let t=n.parent.content.cutByIndex(n.startIndex,n.endIndex);for(let r=n.depth;;--r){let o=n.$from.node(r),i=n.$from.index(r),s=n.$to.indexAfter(r);if(r<n.depth&&o.canReplace(i,s,t))return r;if(r==0||o.type.spec.isolating||!wm(o,i,s))break}return null}function Tm(n,e,t){let{$from:r,$to:o,depth:i}=e,s=r.before(i+1),l=o.after(i+1),a=s,c=l,u=ie.empty,d=0;for(let p=i,g=!1;p>t;p--)g||r.index(p)>0?(g=!0,u=ie.from(r.node(p).copy(u)),d++):a--;let f=ie.empty,h=0;for(let p=i,g=!1;p>t;p--)g||o.after(p+1)<o.end(p)?(g=!0,f=ie.from(o.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 aa(n,e,t=null,r=n){let o=Am(n,e),i=o&&Om(r,e);return i?o.map(ml).concat({type:e,attrs:t}).concat(i.map(ml)):null}function ml(n){return{type:n,attrs:null}}function Am(n,e){let{parent:t,startIndex:r,endIndex:o}=n,i=t.contentMatchAt(r).findWrapping(e);if(!i)return null;let s=i.length?i[0]:e;return t.canReplaceWith(r,o,s)?i:null}function Om(n,e){let{parent:t,startIndex:r,endIndex:o}=n,i=t.child(r),s=e.contentMatch.findWrapping(i.type);if(!s)return null;let a=(s.length?s[s.length-1]:e).contentMatch;for(let c=r;a&&c<o;c++)a=a.matchType(t.child(c).type);return!a||!a.validEnd?null:s}function Mm(n,e,t){let r=ie.empty;for(let s=t.length-1;s>=0;s--){if(r.size){let l=t[s].type.contentMatch.matchFragment(r);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=ie.from(t[s].type.create(t[s].attrs,r))}let o=e.start,i=e.end;n.step(new Ge(o,i,o,i,new fe(r,0,0),t.length,!0))}function Im(n,e,t,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=n.steps.length;n.doc.nodesBetween(e,t,(s,l)=>{if(s.isTextblock&&!s.hasMarkup(r,o)&&Nm(n.doc,n.mapping.slice(i).map(l),r)){n.clearIncompatible(n.mapping.slice(i).map(l,1),r);let a=n.mapping.slice(i),c=a.map(l,1),u=a.map(l+s.nodeSize,1);return n.step(new Ge(c,u,c+1,u-1,new fe(ie.from(r.create(o,null,s.marks)),0,0),1,!0)),!1}})}function Nm(n,e,t){let r=n.resolve(e),o=r.index();return r.parent.canReplaceWith(o,o+1,t)}function Rm(n,e,t,r,o){let i=n.doc.nodeAt(e);if(!i)throw new RangeError("No node at given position");t||(t=i.type);let s=t.create(r,null,o||i.marks);if(i.isLeaf)return n.replaceWith(e,e+i.nodeSize,s);if(!t.validContent(i.content))throw new RangeError("Invalid content for node type "+t.name);n.step(new Ge(e,e+i.nodeSize,e+1,e+i.nodeSize-1,new fe(ie.from(s),0,0),1,!0))}function sr(n,e,t=1,r){let o=n.resolve(e),i=o.depth-t,s=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!s.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let c=o.depth-1,u=t-2;c>i;c--,u--){let d=o.node(c),f=o.index(c);if(d.type.spec.isolating)return!1;let h=d.content.cutByIndex(f,d.childCount),p=r&&r[u+1];p&&(h=h.replaceChild(0,p.type.create(p.attrs)));let g=r&&r[u]||d;if(!d.canReplace(f+1,d.childCount)||!g.type.validContent(h))return!1}let l=o.indexAfter(i),a=r&&r[0];return o.node(i).canReplaceWith(l,l,a?a.type:o.node(i+1).type)}function Dm(n,e,t=1,r){let o=n.doc.resolve(e),i=ie.empty,s=ie.empty;for(let l=o.depth,a=o.depth-t,c=t-1;l>a;l--,c--){i=ie.from(o.node(l).copy(i));let u=r&&r[c];s=ie.from(u?u.type.create(u.attrs,s):o.node(l).copy(s))}n.step(new Ze(e,e,new fe(i.append(s),t,t),!0))}function Tn(n,e){let t=n.resolve(e),r=t.index();return Du(t.nodeBefore,t.nodeAfter)&&t.parent.canReplace(r,r+1)}function Du(n,e){return!!(n&&e&&!n.isLeaf&&n.canAppend(e))}function Si(n,e,t=-1){let r=n.resolve(e);for(let o=r.depth;;o--){let i,s,l=r.index(o);if(o==r.depth?(i=r.nodeBefore,s=r.nodeAfter):t>0?(i=r.node(o+1),l++,s=r.node(o).maybeChild(l)):(i=r.node(o).maybeChild(l-1),s=r.node(o+1)),i&&!i.isTextblock&&Du(i,s)&&r.node(o).canReplace(l,l+1))return e;if(o==0)break;e=t<0?r.before(o):r.after(o)}}function Lm(n,e,t){let r=new Ze(e-t,e+t,fe.empty,!0);n.step(r)}function Pm(n,e,t){let r=n.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),t))return e;if(r.parentOffset==0)for(let o=r.depth-1;o>=0;o--){let i=r.index(o);if(r.node(o).canReplaceWith(i,i,t))return r.before(o+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(let o=r.depth-1;o>=0;o--){let i=r.indexAfter(o);if(r.node(o).canReplaceWith(i,i,t))return r.after(o+1);if(i<r.node(o).childCount)return null}return null}function Bm(n,e,t){let r=n.resolve(e);if(!t.content.size)return e;let o=t.content;for(let i=0;i<t.openStart;i++)o=o.firstChild.content;for(let i=1;i<=(t.openStart==0&&t.size?2:1);i++)for(let s=r.depth;s>=0;s--){let l=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,a=r.index(s)+(l>0?1:0),c=r.node(s),u=!1;if(i==1)u=c.canReplace(a,a,o);else{let d=c.contentMatchAt(a).findWrapping(o.firstChild.type);u=d&&c.canReplaceWith(a,a,d[0])}if(u)return l==0?r.pos:l<0?r.before(s+1):r.after(s+1)}return null}function la(n,e,t=e,r=fe.empty){if(e==t&&!r.size)return null;let o=n.resolve(e),i=n.resolve(t);return Lu(o,i,r)?new Ze(e,t,r):new Fm(o,i,r).fit()}function Lu(n,e,t){return!t.openStart&&!t.openEnd&&n.start()==e.start()&&n.parent.canReplace(n.index(),e.index(),t.content)}class Fm{constructor(e,t,r){this.$from=e,this.$to=t,this.unplaced=r,this.frontier=[],this.placed=ie.empty;for(let o=0;o<=e.depth;o++){let i=e.node(o);this.frontier.push({type:i.type,match:i.contentMatchAt(e.indexAfter(o))})}for(let o=e.depth;o>0;o--)this.placed=ie.from(e.node(o).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(e<0?this.$to:r.doc.resolve(e));if(!o)return null;let i=this.placed,s=r.depth,l=o.depth;for(;s&&l&&i.childCount==1;)i=i.firstChild.content,s--,l--;let a=new fe(i,s,l);return e>-1?new Ge(r.pos,e,this.$to.pos,this.$to.end(),a,t):a.size||r.pos!=this.$to.pos?new Ze(r.pos,o.pos,a):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,r=0,o=this.unplaced.openEnd;r<e;r++){let i=t.firstChild;if(t.childCount>1&&(o=0),i.type.spec.isolating&&o<=r){e=r;break}t=i.content}for(let t=1;t<=2;t++)for(let r=t==1?e:this.unplaced.openStart;r>=0;r--){let o,i=null;r?(i=ji(this.unplaced.content,r-1).firstChild,o=i.content):o=this.unplaced.content;let s=o.firstChild;for(let l=this.depth;l>=0;l--){let{type:a,match:c}=this.frontier[l],u,d=null;if(t==1&&(s?c.matchType(s.type)||(d=c.fillBefore(ie.from(s),!1)):i&&a.compatibleContent(i.type)))return{sliceDepth:r,frontierDepth:l,parent:i,inject:d};if(t==2&&s&&(u=c.findWrapping(s.type)))return{sliceDepth:r,frontierDepth:l,parent:i,wrap:u};if(i&&c.matchType(i.type))break}}}openMore(){let{content:e,openStart:t,openEnd:r}=this.unplaced,o=ji(e,t);return!o.childCount||o.firstChild.isLeaf?!1:(this.unplaced=new fe(e,t+1,Math.max(r,o.size+t>=e.size-r?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:r}=this.unplaced,o=ji(e,t);if(o.childCount<=1&&t>0){let i=e.size-t<=t+o.size;this.unplaced=new fe(Cr(e,t-1,1),t-1,i?t-1:r)}else this.unplaced=new fe(Cr(e,t,1),t,r)}placeNodes({sliceDepth:e,frontierDepth:t,parent:r,inject:o,wrap:i}){for(;this.depth>t;)this.closeFrontierNode();if(i)for(let g=0;g<i.length;g++)this.openFrontierNode(i[g]);let s=this.unplaced,l=r?r.content:s.content,a=s.openStart-e,c=0,u=[],{match:d,type:f}=this.frontier[t];if(o){for(let g=0;g<o.childCount;g++)u.push(o.child(g));d=d.matchFragment(o)}let h=l.size+e-(s.content.size-s.openEnd);for(;c<l.childCount;){let g=l.child(c),v=d.matchType(g.type);if(!v)break;c++,(c>1||a==0||g.content.size)&&(d=v,u.push(Pu(g.mark(f.allowedMarks(g.marks)),c==1?a:0,c==l.childCount?h:-1)))}let p=c==l.childCount;p||(h=-1),this.placed=kr(this.placed,t,ie.from(u)),this.frontier[t].match=d,p&&h<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let g=0,v=l;g<h;g++){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(Cr(s.content,e-1,1),e-1,h<0?s.openEnd:e-1):new fe(Cr(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||!Wi(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return-1;let{depth:r}=this.$to,o=this.$to.after(r);for(;r>1&&o==this.$to.end(--r);)++o;return o}findCloseLevel(e){e:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:r,type:o}=this.frontier[t],i=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),s=Wi(e,t,o,r,i);if(s){for(let l=t-1;l>=0;l--){let{match:a,type:c}=this.frontier[l],u=Wi(e,l,c,a,!0);if(!u||u.childCount)continue e}return{depth:t,fit:s,move:i?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=kr(this.placed,t.depth,t.fit)),e=t.move;for(let r=t.depth+1;r<=e.depth;r++){let o=e.node(r),i=o.type.contentMatch.fillBefore(o.content,!0,e.index(r));this.openFrontierNode(o.type,o.attrs,i)}return e}openFrontierNode(e,t=null,r){let o=this.frontier[this.depth];o.match=o.match.matchType(e),this.placed=kr(this.placed,this.depth,ie.from(e.create(t,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(ie.empty,!0);t.childCount&&(this.placed=kr(this.placed,this.frontier.length,t))}}function Cr(n,e,t){return e==0?n.cutByIndex(t,n.childCount):n.replaceChild(0,n.firstChild.copy(Cr(n.firstChild.content,e-1,t)))}function kr(n,e,t){return e==0?n.append(t):n.replaceChild(n.childCount-1,n.lastChild.copy(kr(n.lastChild.content,e-1,t)))}function ji(n,e){for(let t=0;t<e;t++)n=n.firstChild.content;return n}function Pu(n,e,t){if(e<=0)return n;let r=n.content;return e>1&&(r=r.replaceChild(0,Pu(r.firstChild,e-1,r.childCount==1?t-1:0))),e>0&&(r=n.type.contentMatch.fillBefore(r).append(r),t<=0&&(r=r.append(n.type.contentMatch.matchFragment(r).fillBefore(ie.empty,!0)))),n.copy(r)}function Wi(n,e,t,r,o){let i=n.node(e),s=o?n.indexAfter(e):n.index(e);if(s==i.childCount&&!t.compatibleContent(i.type))return null;let l=r.fillBefore(i.content,!0,s);return l&&!zm(t,i.content,s)?l:null}function zm(n,e,t){for(let r=t;r<e.childCount;r++)if(!n.allowsMarks(e.child(r).marks))return!0;return!1}function Vm(n){return n.spec.defining||n.spec.definingForContent}function $m(n,e,t,r){if(!r.size)return n.deleteRange(e,t);let o=n.doc.resolve(e),i=n.doc.resolve(t);if(Lu(o,i,r))return n.step(new Ze(e,t,r));let s=Fu(o,n.doc.resolve(t));s[s.length-1]==0&&s.pop();let l=-(o.depth+1);s.unshift(l);for(let f=o.depth,h=o.pos-1;f>0;f--,h--){let p=o.node(f).type.spec;if(p.defining||p.definingAsContext||p.isolating)break;s.indexOf(f)>-1?l=f:o.before(f)==h&&s.splice(1,0,-f)}let a=s.indexOf(l),c=[],u=r.openStart;for(let f=r.content,h=0;;h++){let p=f.firstChild;if(c.push(p),h==r.openStart)break;f=p.content}for(let f=u-1;f>=0;f--){let h=c[f],p=Vm(h.type);if(p&&!h.sameMarkup(o.node(Math.abs(l)-1)))u=f;else if(p||!h.type.isTextblock)break}for(let f=r.openStart;f>=0;f--){let h=(f+u+1)%(r.openStart+1),p=c[h];if(p)for(let g=0;g<s.length;g++){let v=s[(g+a)%s.length],S=!0;v<0&&(S=!1,v=-v);let C=o.node(v-1),k=o.index(v-1);if(C.canReplaceWith(k,k,p.type,p.marks))return n.replace(o.before(v),S?i.after(v):t,new fe(Bu(r.content,0,r.openStart,h),h,r.openEnd))}}let d=n.steps.length;for(let f=s.length-1;f>=0&&(n.replace(e,t,r),!(n.steps.length>d));f--){let h=s[f];h<0||(e=o.before(h),t=i.after(h))}}function Bu(n,e,t,r,o){if(e<t){let i=n.firstChild;n=n.replaceChild(0,i.copy(Bu(i.content,e+1,t,r,i)))}if(e>r){let i=o.contentMatchAt(0),s=i.fillBefore(n).append(n);n=s.append(i.matchFragment(s).fillBefore(ie.empty,!0))}return n}function Um(n,e,t,r){if(!r.isInline&&e==t&&n.doc.resolve(e).parent.content.size){let o=Pm(n.doc,e,r.type);o!=null&&(e=t=o)}n.replaceRange(e,t,new fe(ie.from(r),0,0))}function Hm(n,e,t){let r=n.doc.resolve(e),o=n.doc.resolve(t),i=Fu(r,o);for(let s=0;s<i.length;s++){let l=i[s],a=s==i.length-1;if(a&&l==0||r.node(l).type.contentMatch.validEnd)return n.delete(r.start(l),o.end(l));if(l>0&&(a||r.node(l-1).canReplace(r.index(l-1),o.indexAfter(l-1))))return n.delete(r.before(l),o.after(l))}for(let s=1;s<=r.depth&&s<=o.depth;s++)if(e-r.start(s)==r.depth-s&&t>r.end(s)&&o.end(s)-t!=o.depth-s)return n.delete(r.before(s),t);n.delete(e,t)}function Fu(n,e){let t=[],r=Math.min(n.depth,e.depth);for(let o=r;o>=0;o--){let i=n.start(o);if(i<n.pos-(n.depth-o)||e.end(o)>e.pos+(e.depth-o)||n.node(o).type.spec.isolating||e.node(o).type.spec.isolating)break;(i==e.start(o)||o==n.depth&&o==e.depth&&n.parent.inlineContent&&e.parent.inlineContent&&o&&e.start(o-1)==i-1)&&t.push(o)}return t}class ar extends nt{constructor(e,t,r){super(),this.pos=e,this.attr=t,this.value=r}apply(e){let t=e.nodeAt(this.pos);if(!t)return He.fail("No node at attribute step's position");let r=Object.create(null);for(let i in t.attrs)r[i]=t.attrs[i];r[this.attr]=this.value;let o=t.type.create(r,null,t.marks);return He.fromReplace(e,this.pos,this.pos+1,new fe(ie.from(o),0,t.isLeaf?0:1))}getMap(){return yt.empty}invert(e){return new ar(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 ar(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 ar(t.pos,t.attr,t.value)}}nt.jsonID("attr",ar);class Vr extends nt{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let o in e.attrs)t[o]=e.attrs[o];t[this.attr]=this.value;let r=e.type.create(t,e.content,e.marks);return He.ok(r)}getMap(){return yt.empty}invert(e){return new Vr(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 Vr(t.attr,t.value)}}nt.jsonID("docAttr",Vr);let dr=class extends Error{};dr=function n(e){let t=Error.call(this,e);return t.__proto__=n.prototype,t};dr.prototype=Object.create(Error.prototype);dr.prototype.constructor=dr;dr.prototype.name="TransformError";class zu{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Or}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new dr(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,r=fe.empty){let o=la(this.doc,e,t,r);return o&&this.step(o),this}replaceWith(e,t,r){return this.replace(e,t,new fe(ie.from(r),0,0))}delete(e,t){return this.replace(e,t,fe.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,r){return $m(this,e,t,r),this}replaceRangeWith(e,t,r){return Um(this,e,t,r),this}deleteRange(e,t){return Hm(this,e,t),this}lift(e,t){return Tm(this,e,t),this}join(e,t=1){return Lm(this,e,t),this}wrap(e,t){return Mm(this,e,t),this}setBlockType(e,t=e,r,o=null){return Im(this,e,t,r,o),this}setNodeMarkup(e,t,r=null,o){return Rm(this,e,t,r,o),this}setNodeAttribute(e,t,r){return this.step(new ar(e,t,r)),this}setDocAttribute(e,t){return this.step(new Vr(e,t)),this}addNodeMark(e,t){return this.step(new xn(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 ur(e,t)),this}split(e,t=1,r){return Dm(this,e,t,r),this}addMark(e,t,r){return Em(this,e,t,r),this}removeMark(e,t,r){return Cm(this,e,t,r),this}clearIncompatible(e,t,r){return km(this,e,t,r),this}}const Ki=Object.create(null);class Ne{constructor(e,t,r){this.$anchor=e,this.$head=t,this.ranges=r||[new jm(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=fe.empty){let r=t.content.lastChild,o=null;for(let l=0;l<t.openEnd;l++)o=r,r=r.lastChild;let i=e.steps.length,s=this.ranges;for(let l=0;l<s.length;l++){let{$from:a,$to:c}=s[l],u=e.mapping.slice(i);e.replaceRange(u.map(a.pos),u.map(c.pos),l?fe.empty:t),l==0&&yl(e,i,(r?r.isInline:o&&o.isTextblock)?-1:1)}}replaceWith(e,t){let r=e.steps.length,o=this.ranges;for(let i=0;i<o.length;i++){let{$from:s,$to:l}=o[i],a=e.mapping.slice(r),c=a.map(s.pos),u=a.map(l.pos);i?e.deleteRange(c,u):(e.replaceRangeWith(c,u,t),yl(e,r,t.isInline?-1:1))}}static findFrom(e,t,r=!1){let o=e.parent.inlineContent?new Re(e):er(e.node(0),e.parent,e.pos,e.index(),t,r);if(o)return o;for(let i=e.depth-1;i>=0;i--){let s=t<0?er(e.node(0),e.node(i),e.before(i+1),e.index(i),t,r):er(e.node(0),e.node(i),e.after(i+1),e.index(i)+1,t,r);if(s)return s}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new Ft(e.node(0))}static atStart(e){return er(e,e,0,0,1)||new Ft(e)}static atEnd(e){return er(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=Ki[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 Ki)throw new RangeError("Duplicate use of selection JSON ID "+e);return Ki[e]=t,t.prototype.jsonID=e,t}getBookmark(){return Re.between(this.$anchor,this.$head).getBookmark()}}Ne.prototype.visible=!0;class jm{constructor(e,t){this.$from=e,this.$to=t}}let gl=!1;function vl(n){!gl&&!n.parent.inlineContent&&(gl=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+n.parent.type.name+")"))}class Re extends Ne{constructor(e,t=e){vl(e),vl(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let r=e.resolve(t.map(this.head));if(!r.parent.inlineContent)return Ne.near(r);let o=e.resolve(t.map(this.anchor));return new Re(o.parent.inlineContent?o:r,r)}replace(e,t=fe.empty){if(super.replace(e,t),t==fe.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof Re&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new Ei(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 o=e.resolve(t);return new this(o,r==t?o:e.resolve(r))}static between(e,t,r){let o=e.pos-t.pos;if((!r||o)&&(r=o>=0?1:-1),!t.parent.inlineContent){let i=Ne.findFrom(t,r,!0)||Ne.findFrom(t,-r,!0);if(i)t=i.$head;else return Ne.near(t,r)}return e.parent.inlineContent||(o==0?e=t:(e=(Ne.findFrom(e,-r,!0)||Ne.findFrom(e,r,!0)).$anchor,e.pos<t.pos!=o<0&&(e=t))),new Re(e,t)}}Ne.jsonID("text",Re);class Ei{constructor(e,t){this.anchor=e,this.head=t}map(e){return new Ei(e.map(this.anchor),e.map(this.head))}resolve(e){return Re.between(e.resolve(this.anchor),e.resolve(this.head))}}class xe extends Ne{constructor(e){let t=e.nodeAfter,r=e.node(0).resolve(e.pos+t.nodeSize);super(e,r),this.node=t}map(e,t){let{deleted:r,pos:o}=t.mapResult(this.anchor),i=e.resolve(o);return r?Ne.near(i):new xe(i)}content(){return new fe(ie.from(this.node),0,0)}eq(e){return e instanceof xe&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new ca(this.anchor)}static fromJSON(e,t){if(typeof t.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new xe(e.resolve(t.anchor))}static create(e,t){return new xe(e.resolve(t))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}xe.prototype.visible=!1;Ne.jsonID("node",xe);class ca{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:r}=e.mapResult(this.anchor);return t?new Ei(r,r):new ca(r)}resolve(e){let t=e.resolve(this.anchor),r=t.nodeAfter;return r&&xe.isSelectable(r)?new xe(t):Ne.near(t)}}class Ft extends Ne{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=fe.empty){if(t==fe.empty){e.delete(0,e.doc.content.size);let r=Ne.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new Ft(e)}map(e){return new Ft(e)}eq(e){return e instanceof Ft}getBookmark(){return Wm}}Ne.jsonID("all",Ft);const Wm={map(){return this},resolve(n){return new Ft(n)}};function er(n,e,t,r,o,i=!1){if(e.inlineContent)return Re.create(n,t);for(let s=r-(o>0?0:1);o>0?s<e.childCount:s>=0;s+=o){let l=e.child(s);if(l.isAtom){if(!i&&xe.isSelectable(l))return xe.create(n,t-(o<0?l.nodeSize:0))}else{let a=er(n,l,t+o,o<0?l.childCount:0,o,i);if(a)return a}t+=l.nodeSize*o}return null}function yl(n,e,t){let r=n.steps.length-1;if(r<e)return;let o=n.steps[r];if(!(o instanceof Ze||o instanceof Ge))return;let i=n.mapping.maps[r],s;i.forEach((l,a,c,u)=>{s==null&&(s=u)}),n.setSelection(Ne.near(n.doc.resolve(s),t))}const bl=1,so=2,xl=4;class Km extends zu{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|bl)&~so,this.storedMarks=null,this}get selectionSet(){return(this.updated&bl)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=so,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&so)>0}addStep(e,t){super.addStep(e,t),this.updated=this.updated&~so,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let r=this.selection;return t&&(e=e.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||Le.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,r){let o=this.doc.type.schema;if(t==null)return e?this.replaceSelectionWith(o.text(e),!0):this.deleteSelection();{if(r==null&&(r=t),r=r??t,!e)return this.deleteRange(t,r);let i=this.storedMarks;if(!i){let s=this.doc.resolve(t);i=r==t?s.marks():s.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(t,r,o.text(e,i)),this.selection.empty||this.setSelection(Ne.near(this.selection.$to)),this}}setMeta(e,t){return this.meta[typeof e=="string"?e:e.key]=t,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=xl,this}get scrolledIntoView(){return(this.updated&xl)>0}}function Sl(n,e){return!e||!n?n:n.bind(e)}class wr{constructor(e,t,r){this.name=e,this.init=Sl(t.init,r),this.apply=Sl(t.apply,r)}}const Gm=[new wr("doc",{init(n){return n.doc||n.schema.topNodeType.createAndFill()},apply(n){return n.doc}}),new wr("selection",{init(n,e){return n.selection||Ne.atStart(e.doc)},apply(n){return n.selection}}),new wr("storedMarks",{init(n){return n.storedMarks||null},apply(n,e,t,r){return r.selection.$cursor?n.storedMarks:null}}),new wr("scrollToSelection",{init(){return 0},apply(n,e){return n.scrolledIntoView?e+1:e}})];class Gi{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=Gm.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 wr(r.key,r.spec.state,r))})}}class or{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=t){let o=this.config.plugins[r];if(o.spec.filterTransaction&&!o.spec.filterTransaction.call(o,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let t=[e],r=this.applyInner(e),o=null;for(;;){let i=!1;for(let s=0;s<this.config.plugins.length;s++){let l=this.config.plugins[s];if(l.spec.appendTransaction){let a=o?o[s].n:0,c=o?o[s].state:this,u=a<t.length&&l.spec.appendTransaction.call(l,a?t.slice(a):t,c,r);if(u&&r.filterTransaction(u,s)){if(u.setMeta("appendedTransaction",e),!o){o=[];for(let d=0;d<this.config.plugins.length;d++)o.push(d<s?{state:r,n:t.length}:{state:this,n:0})}t.push(u),r=r.applyInner(u),i=!0}o&&(o[s]={state:r,n:t.length})}}if(!i)return{state:r,transactions:t}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let t=new or(this.config),r=this.config.fields;for(let o=0;o<r.length;o++){let i=r[o];t[i.name]=i.apply(e,this[i.name],this,t)}return t}get tr(){return new Km(this)}static create(e){let t=new Gi(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new or(t);for(let o=0;o<t.fields.length;o++)r[t.fields[o].name]=t.fields[o].init(e,r);return r}reconfigure(e){let t=new Gi(this.schema,e.plugins),r=t.fields,o=new or(t);for(let i=0;i<r.length;i++){let s=r[i].name;o[s]=this.hasOwnProperty(s)?this[s]:r[i].init(e,o)}return o}toJSON(e){let t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map(r=>r.toJSON())),e&&typeof e=="object")for(let r in e){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let o=e[r],i=o.spec.state;i&&i.toJSON&&(t[r]=i.toJSON.call(o,this[o.key]))}return t}static fromJSON(e,t,r){if(!t)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let o=new Gi(e.schema,e.plugins),i=new or(o);return o.fields.forEach(s=>{if(s.name=="doc")i.doc=$n.fromJSON(e.schema,t.doc);else if(s.name=="selection")i.selection=Ne.fromJSON(i.doc,t.selection);else if(s.name=="storedMarks")t.storedMarks&&(i.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let l in r){let a=r[l],c=a.spec.state;if(a.key==s.name&&c&&c.fromJSON&&Object.prototype.hasOwnProperty.call(t,l)){i[s.name]=c.fromJSON.call(a,e,t[l],i);return}}i[s.name]=s.init(e,i)}}),i}}function Vu(n,e,t){for(let r in n){let o=n[r];o instanceof Function?o=o.bind(e):r=="handleDOMEvents"&&(o=Vu(o,e,{})),t[r]=o}return t}class gt{constructor(e){this.spec=e,this.props={},e.props&&Vu(e.props,this,this.props),this.key=e.key?e.key.key:$u("plugin")}getState(e){return e[this.key]}}const Ji=Object.create(null);function $u(n){return n in Ji?n+"$"+ ++Ji[n]:(Ji[n]=0,n+"$")}class Ut{constructor(e="key"){this.key=$u(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const st=function(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e},$r=function(n){let e=n.assignedSlot||n.parentNode;return e&&e.nodeType==11?e.host:e};let El=null;const sn=function(n,e,t){let r=El||(El=document.createRange());return r.setEnd(n,t??n.nodeValue.length),r.setStart(n,e||0),r},Kn=function(n,e,t,r){return t&&(Cl(n,e,t,r,-1)||Cl(n,e,t,r,1))},Jm=/^(img|br|input|textarea|hr)$/i;function Cl(n,e,t,r,o){for(;;){if(n==t&&e==r)return!0;if(e==(o<0?0:Yt(n))){let i=n.parentNode;if(!i||i.nodeType!=1||ua(n)||Jm.test(n.nodeName)||n.contentEditable=="false")return!1;e=st(n)+(o<0?0:1),n=i}else if(n.nodeType==1){if(n=n.childNodes[e+(o<0?-1:0)],n.contentEditable=="false")return!1;e=o<0?Yt(n):0}else return!1}}function Yt(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function Ym(n,e,t){for(let r=e==0,o=e==Yt(n);r||o;){if(n==t)return!0;let i=st(n);if(n=n.parentNode,!n)return!1;r=r&&i==0,o=o&&i==Yt(n)}}function ua(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 Ci=function(n){return n.focusNode&&Kn(n.focusNode,n.focusOffset,n.anchorNode,n.anchorOffset)};function Dn(n,e){let t=document.createEvent("Event");return t.initEvent("keydown",!0,!0),t.keyCode=n,t.key=t.code=e,t}function Xm(n){let e=n.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function Zm(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,kl=typeof document<"u"?document:null,An=Qt&&Qt.userAgent||"",Ss=/Edge\/(\d+)/.exec(An),Uu=/MSIE \d/.exec(An),Es=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(An),pt=!!(Uu||Es||Ss),En=Uu?document.documentMode:Es?+Es[1]:Ss?+Ss[1]:0,Vt=!pt&&/gecko\/(\d+)/i.test(An);Vt&&+(/Firefox\/(\d+)/.exec(An)||[0,0])[1];const Cs=!pt&&/Chrome\/(\d+)/.exec(An),tt=!!Cs,Qm=Cs?+Cs[1]:0,at=!pt&&!!Qt&&/Apple Computer/.test(Qt.vendor),fr=at&&(/Mobile\/\w+/.test(An)||!!Qt&&Qt.maxTouchPoints>2),Ot=fr||(Qt?/Mac/.test(Qt.platform):!1),qm=Qt?/Win/.test(Qt.platform):!1,Bt=/Android \d/.test(An),qr=!!kl&&"webkitFontSmoothing"in kl.documentElement.style,_m=qr?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function eg(n){return{left:0,right:n.documentElement.clientWidth,top:0,bottom:n.documentElement.clientHeight}}function rn(n,e){return typeof n=="number"?n:n[e]}function tg(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 wl(n,e,t){let r=n.someProp("scrollThreshold")||0,o=n.someProp("scrollMargin")||5,i=n.dom.ownerDocument;for(let s=t||n.dom;s;s=$r(s)){if(s.nodeType!=1)continue;let l=s,a=l==i.body,c=a?eg(i):tg(l),u=0,d=0;if(e.top<c.top+rn(r,"top")?d=-(c.top-e.top+rn(o,"top")):e.bottom>c.bottom-rn(r,"bottom")&&(d=e.bottom-e.top>c.bottom-c.top?e.top+rn(o,"top")-c.top:e.bottom-c.bottom+rn(o,"bottom")),e.left<c.left+rn(r,"left")?u=-(c.left-e.left+rn(o,"left")):e.right>c.right-rn(r,"right")&&(u=e.right-c.right+rn(o,"right")),u||d)if(a)i.defaultView.scrollBy(u,d);else{let f=l.scrollLeft,h=l.scrollTop;d&&(l.scrollTop+=d),u&&(l.scrollLeft+=u);let p=l.scrollLeft-f,g=l.scrollTop-h;e={left:e.left-p,top:e.top-g,right:e.right-p,bottom:e.bottom-g}}if(a||/^(fixed|sticky)$/.test(getComputedStyle(s).position))break}}function ng(n){let e=n.dom.getBoundingClientRect(),t=Math.max(0,e.top),r,o;for(let i=(e.left+e.right)/2,s=t+1;s<Math.min(innerHeight,e.bottom);s+=5){let l=n.root.elementFromPoint(i,s);if(!l||l==n.dom||!n.dom.contains(l))continue;let a=l.getBoundingClientRect();if(a.top>=t-20){r=l,o=a.top;break}}return{refDOM:r,refTop:o,stack:Hu(n.dom)}}function Hu(n){let e=[],t=n.ownerDocument;for(let r=n;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),n!=t);r=$r(r));return e}function rg({refDOM:n,refTop:e,stack:t}){let r=n?n.getBoundingClientRect().top:0;ju(t,r==0?0:r-e)}function ju(n,e){for(let t=0;t<n.length;t++){let{dom:r,top:o,left:i}=n[t];r.scrollTop!=o+e&&(r.scrollTop=o+e),r.scrollLeft!=i&&(r.scrollLeft=i)}}let Zn=null;function og(n){if(n.setActive)return n.setActive();if(Zn)return n.focus(Zn);let e=Hu(n);n.focus(Zn==null?{get preventScroll(){return Zn={preventScroll:!0},!0}}:void 0),Zn||(Zn=!1,ju(e,0))}function Wu(n,e){let t,r=2e8,o,i=0,s=e.top,l=e.top,a,c;for(let u=n.firstChild,d=0;u;u=u.nextSibling,d++){let f;if(u.nodeType==1)f=u.getClientRects();else if(u.nodeType==3)f=sn(u).getClientRects();else continue;for(let h=0;h<f.length;h++){let p=f[h];if(p.top<=s&&p.bottom>=l){s=Math.max(p.bottom,s),l=Math.min(p.top,l);let g=p.left>e.left?p.left-e.left:p.right<e.left?e.left-p.right:0;if(g<r){t=u,r=g,o=g&&t.nodeType==3?{left:p.right<e.left?p.right:p.left,top:e.top}:e,u.nodeType==1&&g&&(i=d+(e.left>=(p.left+p.right)/2?1:0));continue}}else p.top>e.top&&!a&&p.left<=e.left&&p.right>=e.left&&(a=u,c={left:Math.max(p.left,Math.min(p.right,e.left)),top:p.top});!t&&(e.left>=p.right&&e.top>=p.top||e.left>=p.left&&e.top>=p.bottom)&&(i=d+1)}}return!t&&a&&(t=a,o=c,r=0),t&&t.nodeType==3?ig(t,o):!t||r&&t.nodeType==1?{node:n,offset:i}:Wu(t,o)}function ig(n,e){let t=n.nodeValue.length,r=document.createRange();for(let o=0;o<t;o++){r.setEnd(n,o+1),r.setStart(n,o);let i=hn(r,1);if(i.top!=i.bottom&&da(e,i))return{node:n,offset:o+(e.left>=(i.left+i.right)/2?1:0)}}return{node:n,offset:0}}function da(n,e){return n.left>=e.left-1&&n.left<=e.right+1&&n.top>=e.top-1&&n.top<=e.bottom+1}function sg(n,e){let t=n.parentNode;return t&&/^li$/i.test(t.nodeName)&&e.left<n.getBoundingClientRect().left?t:n}function ag(n,e,t){let{node:r,offset:o}=Wu(e,t),i=-1;if(r.nodeType==1&&!r.firstChild){let s=r.getBoundingClientRect();i=s.left!=s.right&&t.left>(s.left+s.right)/2?1:-1}return n.docView.posFromDOM(r,o,i)}function lg(n,e,t,r){let o=-1;for(let i=e,s=!1;i!=n.dom;){let l=n.docView.nearestDesc(i,!0);if(!l)return null;if(l.dom.nodeType==1&&(l.node.isBlock&&l.parent&&!s||!l.contentDOM)){let a=l.dom.getBoundingClientRect();if(l.node.isBlock&&l.parent&&!s&&(s=!0,a.left>r.left||a.top>r.top?o=l.posBefore:(a.right<r.left||a.bottom<r.top)&&(o=l.posAfter)),!l.contentDOM&&o<0&&!l.node.isText)return(l.node.isBlock?r.top<(a.top+a.bottom)/2:r.left<(a.left+a.right)/2)?l.posBefore:l.posAfter}i=l.dom.parentNode}return o>-1?o:n.docView.posFromDOM(e,t,-1)}function Ku(n,e,t){let r=n.childNodes.length;if(r&&t.top<t.bottom)for(let o=Math.max(0,Math.min(r-1,Math.floor(r*(e.top-t.top)/(t.bottom-t.top))-2)),i=o;;){let s=n.childNodes[i];if(s.nodeType==1){let l=s.getClientRects();for(let a=0;a<l.length;a++){let c=l[a];if(da(e,c))return Ku(s,e,c)}}if((i=(i+1)%r)==o)break}return n}function cg(n,e){let t=n.dom.ownerDocument,r,o=0,i=Zm(t,e.left,e.top);i&&({node:r,offset:o}=i);let s=(n.root.elementFromPoint?n.root:t).elementFromPoint(e.left,e.top),l;if(!s||!n.dom.contains(s.nodeType!=1?s.parentNode:s)){let c=n.dom.getBoundingClientRect();if(!da(e,c)||(s=Ku(n.dom,e,c),!s))return null}if(at)for(let c=s;r&&c;c=$r(c))c.draggable&&(r=void 0);if(s=sg(s,e),r){if(Vt&&r.nodeType==1&&(o=Math.min(o,r.childNodes.length),o<r.childNodes.length)){let u=r.childNodes[o],d;u.nodeName=="IMG"&&(d=u.getBoundingClientRect()).right<=e.left&&d.bottom>e.top&&o++}let c;qr&&o&&r.nodeType==1&&(c=r.childNodes[o-1]).nodeType==1&&c.contentEditable=="false"&&c.getBoundingClientRect().top>=e.top&&o--,r==n.dom&&o==r.childNodes.length-1&&r.lastChild.nodeType==1&&e.top>r.lastChild.getBoundingClientRect().bottom?l=n.state.doc.content.size:(o==0||r.nodeType!=1||r.childNodes[o-1].nodeName!="BR")&&(l=lg(n,r,o,e))}l==null&&(l=ag(n,s,e));let a=n.docView.nearestDesc(s,!0);return{pos:l,inside:a?a.posAtStart-a.border:-1}}function Tl(n){return n.top<n.bottom||n.left<n.right}function hn(n,e){let t=n.getClientRects();if(t.length){let r=t[e<0?0:t.length-1];if(Tl(r))return r}return Array.prototype.find.call(t,Tl)||n.getBoundingClientRect()}const ug=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Gu(n,e,t){let{node:r,offset:o,atom:i}=n.docView.domFromPos(e,t<0?-1:1),s=qr||Vt;if(r.nodeType==3)if(s&&(ug.test(r.nodeValue)||(t<0?!o:o==r.nodeValue.length))){let a=hn(sn(r,o,o),t);if(Vt&&o&&/\s/.test(r.nodeValue[o-1])&&o<r.nodeValue.length){let c=hn(sn(r,o-1,o-1),-1);if(c.top==a.top){let u=hn(sn(r,o,o+1),-1);if(u.top!=a.top)return Sr(u,u.left<c.left)}}return a}else{let a=o,c=o,u=t<0?1:-1;return t<0&&!o?(c++,u=-1):t>=0&&o==r.nodeValue.length?(a--,u=1):t<0?a--:c++,Sr(hn(sn(r,a,c),u),u<0)}if(!n.state.doc.resolve(e-(i||0)).parent.inlineContent){if(i==null&&o&&(t<0||o==Yt(r))){let a=r.childNodes[o-1];if(a.nodeType==1)return Yi(a.getBoundingClientRect(),!1)}if(i==null&&o<Yt(r)){let a=r.childNodes[o];if(a.nodeType==1)return Yi(a.getBoundingClientRect(),!0)}return Yi(r.getBoundingClientRect(),t>=0)}if(i==null&&o&&(t<0||o==Yt(r))){let a=r.childNodes[o-1],c=a.nodeType==3?sn(a,Yt(a)-(s?0:1)):a.nodeType==1&&(a.nodeName!="BR"||!a.nextSibling)?a:null;if(c)return Sr(hn(c,1),!1)}if(i==null&&o<Yt(r)){let a=r.childNodes[o];for(;a.pmViewDesc&&a.pmViewDesc.ignoreForCoords;)a=a.nextSibling;let c=a?a.nodeType==3?sn(a,0,s?0:1):a.nodeType==1?a:null:null;if(c)return Sr(hn(c,-1),!0)}return Sr(hn(r.nodeType==3?sn(r):r,-t),t>=0)}function Sr(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 Yi(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 Ju(n,e,t){let r=n.state,o=n.root.activeElement;r!=e&&n.updateState(e),o!=n.dom&&n.focus();try{return t()}finally{r!=e&&n.updateState(r),o!=n.dom&&o&&o.focus()}}function dg(n,e,t){let r=e.selection,o=t=="up"?r.$from:r.$to;return Ju(n,e,()=>{let{node:i}=n.docView.domFromPos(o.pos,t=="up"?-1:1);for(;;){let l=n.docView.nearestDesc(i,!0);if(!l)break;if(l.node.isBlock){i=l.contentDOM||l.dom;break}i=l.dom.parentNode}let s=Gu(n,o.pos,1);for(let l=i.firstChild;l;l=l.nextSibling){let a;if(l.nodeType==1)a=l.getClientRects();else if(l.nodeType==3)a=sn(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 fg=/[\u0590-\u08ac]/;function pg(n,e,t){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let o=r.parentOffset,i=!o,s=o==r.parent.content.size,l=n.domSelection();return!fg.test(r.parent.textContent)||!l.modify?t=="left"||t=="backward"?i:s:Ju(n,e,()=>{let{focusNode:a,focusOffset:c,anchorNode:u,anchorOffset:d}=n.domSelectionRange(),f=l.caretBidiLevel;l.modify("move",t,"character");let h=r.depth?n.docView.domAfterPos(r.before()):n.dom,{focusNode:p,focusOffset:g}=n.domSelectionRange(),v=p&&!h.contains(p.nodeType==1?p:p.parentNode)||a==p&&c==g;try{l.collapse(u,d),a&&(a!=u||c!=d)&&l.extend&&l.extend(a,c)}catch{}return f!=null&&(l.caretBidiLevel=f),v})}let Al=null,Ol=null,Ml=!1;function hg(n,e,t){return Al==e&&Ol==t?Ml:(Al=e,Ol=t,Ml=t=="up"||t=="down"?dg(n,e,t):pg(n,e,t))}const It=0,Il=1,Pn=2,qt=3;class _r{constructor(e,t,r,o){this.parent=e,this.children=t,this.dom=r,this.contentDOM=o,this.dirty=It,r.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,r){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;t<this.children.length;t++)e+=this.children[t].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let t=0,r=this.posAtStart;;t++){let o=this.children[t];if(o==e)return r;r+=o.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,t,r){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(r<0){let i,s;if(e==this.contentDOM)i=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.previousSibling}for(;i&&!((s=i.pmViewDesc)&&s.parent==this);)i=i.previousSibling;return i?this.posBeforeChild(s)+s.size:this.posAtStart}else{let i,s;if(e==this.contentDOM)i=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.nextSibling}for(;i&&!((s=i.pmViewDesc)&&s.parent==this);)i=i.nextSibling;return i?this.posBeforeChild(s):this.posAtEnd}let o;if(e==this.dom&&this.contentDOM)o=t>st(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))o=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(t==0)for(let i=e;;i=i.parentNode){if(i==this.dom){o=!1;break}if(i.previousSibling)break}if(o==null&&t==e.childNodes.length)for(let i=e;;i=i.parentNode){if(i==this.dom){o=!0;break}if(i.nextSibling)break}}return o??r>0?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let r=!0,o=e;o;o=o.parentNode){let i=this.getDesc(o),s;if(i&&(!t||i.node))if(r&&(s=i.nodeDOM)&&!(s.nodeType==1?s.contains(e.nodeType==1?e:e.parentNode):s==e))r=!1;else return i}}getDesc(e){let t=e.pmViewDesc;for(let r=t;r;r=r.parent)if(r==this)return t}posFromDOM(e,t,r){for(let o=e;o;o=o.parentNode){let i=this.getDesc(o);if(i)return i.localPosFromDOM(e,t,r)}return-1}descAt(e){for(let t=0,r=0;t<this.children.length;t++){let o=this.children[t],i=r+o.size;if(r==e&&i!=r){for(;!o.border&&o.children.length;)o=o.children[0];return o}if(e<i)return o.descAt(e-r-o.border);r=i}}domFromPos(e,t){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let r=0,o=0;for(let i=0;r<this.children.length;r++){let s=this.children[r],l=i+s.size;if(l>e||s instanceof Xu){o=e-i;break}i=l}if(o)return this.children[r].domFromPos(o-this.children[r].border,t);for(let i;r&&!(i=this.children[r-1]).size&&i instanceof Yu&&i.side>=0;r--);if(t<=0){let i,s=!0;for(;i=r?this.children[r-1]:null,!(!i||i.dom.parentNode==this.contentDOM);r--,s=!1);return i&&t&&s&&!i.border&&!i.domAtom?i.domFromPos(i.size,t):{node:this.contentDOM,offset:i?st(i.dom)+1:0}}else{let i,s=!0;for(;i=r<this.children.length?this.children[r]:null,!(!i||i.dom.parentNode==this.contentDOM);r++,s=!1);return i&&s&&!i.border&&!i.domAtom?i.domFromPos(0,t):{node:this.contentDOM,offset:i?st(i.dom):this.contentDOM.childNodes.length}}}parseRange(e,t,r=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let o=-1,i=-1;for(let s=r,l=0;;l++){let a=this.children[l],c=s+a.size;if(o==-1&&e<=c){let u=s+a.border;if(e>=u&&t<=c-a.border&&a.node&&a.contentDOM&&this.contentDOM.contains(a.contentDOM))return a.parseRange(e,t,u);e=s;for(let d=l;d>0;d--){let f=this.children[d-1];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(1)){o=st(f.dom)+1;break}e-=f.size}o==-1&&(o=0)}if(o>-1&&(c>t||l==this.children.length-1)){t=c;for(let u=l+1;u<this.children.length;u++){let d=this.children[u];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(-1)){i=st(d.dom);break}t+=d.size}i==-1&&(i=this.contentDOM.childNodes.length);break}s=c}return{node:this.contentDOM,from:e,to:t,fromOffset:o,toOffset:i}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let t=this.children[e<0?0:this.children.length-1];return t.size==0||t.emptyChildAt(e)}domAfterPos(e){let{node:t,offset:r}=this.domFromPos(e,0);if(t.nodeType!=1||r==t.childNodes.length)throw new RangeError("No node after pos "+e);return t.childNodes[r]}setSelection(e,t,r,o=!1){let i=Math.min(e,t),s=Math.max(e,t);for(let f=0,h=0;f<this.children.length;f++){let p=this.children[f],g=h+p.size;if(i>h&&s<g)return p.setSelection(e-h-p.border,t-h-p.border,r,o);h=g}let l=this.domFromPos(e,e?-1:1),a=t==e?l:this.domFromPos(t,t?-1:1),c=r.getSelection(),u=!1;if((Vt||at)&&e==t){let{node:f,offset:h}=l;if(f.nodeType==3){if(u=!!(h&&f.nodeValue[h-1]==`
|
|
@@ -124,4 +124,4 @@ img.ProseMirror-separator {
|
|
|
124
124
|
1. Must only contain digits, lowercase ASCII letters or "-"
|
|
125
125
|
2. Cannot start or end with "-"
|
|
126
126
|
3. "-" cannot repeat`);ze.customSchemes.push([n,e])}function eb(){ze.scanner=K2(ze.customSchemes);for(let n=0;n<ze.tokenQueue.length;n++)ze.tokenQueue[n][1]({scanner:ze.scanner});ze.parser=X2(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 tb(n){return ze.initialized||eb(),Z2(ze.parser.start,n,G2(ze.scanner.start,n))}function Va(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 za(t),o=tb(n),i=[];for(let s=0;s<o.length;s++){const l=o[s];l.isLink&&(!e||l.t===e)&&r.check(l)&&i.push(l.toFormattedObject(r))}return i}function nb(n){return new gt({key:new Ut("autolink"),appendTransaction:(e,t,r)=>{const o=e.some(c=>c.docChanged)&&!t.doc.eq(r.doc),i=e.some(c=>c.getMeta("preventAutolink"));if(!o||i)return;const{tr:s}=r,l=iv(t.doc,[...e]);if(hv(l).forEach(({newRange:c})=>{const u=av(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],g=d.pos+f.lastIndexOf(p);if(!p)return!1;Va(p).filter(v=>v.isLink).map(v=>({...v,from:g+v.start+1,to:g+v.end+1})).filter(v=>r.schema.marks.code?!r.doc.rangeHasMark(v.from,v.to,r.schema.marks.code):!0).filter(v=>n.validate?n.validate(v.value):!0).forEach(v=>{ka(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 rb(n){return new gt({key:new Ut("handleClickLink"),props:{handleClick:(e,t,r)=>{var o,i;if(r.button!==0||r.target.nodeName!=="A")return!1;const l=Dd(e.state,n.type.name),a=r.target,c=(o=a==null?void 0:a.href)!==null&&o!==void 0?o:l.href,u=(i=a==null?void 0:a.target)!==null&&i!==void 0?i:l.target;return a&&c?(e.editable&&window.open(c,u),!0):!1}}})}function ob(n){return new gt({key:new Ut("handlePasteLink"),props:{handlePaste:(e,t,r)=>{var o;const{state:i}=e,{selection:s}=i,{empty:l}=s;if(l)return!1;let a="";r.content.forEach(p=>{a+=p.textContent});const c=Va(a).find(p=>p.isLink&&p.value===a);if(!a||!c)return!1;const u=(o=t.clipboardData)===null||o===void 0?void 0:o.getData("text/html"),d=/href="([^"]*)"/,f=u==null?void 0:u.match(d),h=f?f[1]:c.href;return n.editor.commands.setMark(n.type,{href:h}),!0}}})}const ib=_t.create({name:"link",priority:1e3,keepOnSplit:!1,onCreate(){this.options.protocols.forEach(n=>{if(typeof n=="string"){Vc(n);return}Vc(n.scheme,n.optionalSlashes)})},onDestroy(){_2()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:void 0}},addAttributes(){return{href:{default:null},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:'a[href]:not([href *= "javascript:" i])'}]},renderHTML({HTMLAttributes:n}){return["a",ut(this.options.HTMLAttributes,n),0]},addCommands(){return{setLink:n=>({chain:e})=>e().setMark(this.name,n).setMeta("preventAutolink",!0).run(),toggleLink:n=>({chain:e})=>e().toggleMark(this.name,n,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run(),unsetLink:()=>({chain:n})=>n().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[Kr({find:n=>Va(n).filter(e=>this.options.validate?this.options.validate(e.value):!0).filter(e=>e.isLink).map(e=>({text:e.value,index:e.start,data:e})),type:this.type,getAttributes:(n,e)=>{var t,r;const o=(t=e==null?void 0:e.clipboardData)===null||t===void 0?void 0:t.getData("text/html"),i=/href="([^"]*)"/,s=o==null?void 0:o.match(i);return s?{href:s[1]}:{href:(r=n.data)===null||r===void 0?void 0:r.href}}})]},addProseMirrorPlugins(){const n=[];return this.options.autolink&&n.push(nb({type:this.type,validate:this.options.validate})),this.options.openOnClick&&n.push(rb({type:this.type})),this.options.linkOnPaste&&n.push(ob({editor:this.editor,type:this.type})),n}}),sb=ib.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})}}}}),ab=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 gt({key:new Ut("placeholder"),props:{decorations:({doc:n,selection:e})=>{const t=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=e,o=[];if(!t)return null;const i=n.type.createAndFill(),s=(i==null?void 0:i.sameMarkup(n))&&i.content.findDiffStart(n.content)===null;return n.descendants((l,a)=>{const c=r>=a&&r<=a+l.nodeSize,u=!l.isLeaf&&!l.childCount;if((c||!this.options.showOnlyCurrent)&&u){const d=[this.options.emptyNodeClass];s&&d.push(this.options.emptyEditorClass);const f=Mt.node(a,a+l.nodeSize,{class:d.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:l,pos:a,hasAnchor:c}):this.options.placeholder});o.push(f)}return this.options.includeChildren}),We.create(n,o)}}})]}}),lb=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))$/,cb=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))/g,ub=/(?:^|\s)((?:__)((?:[^__]+))(?:__))$/,db=/(?:^|\s)((?:__)((?:[^__]+))(?:__))/g,fb=_t.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:n=>n.style.fontWeight!=="normal"&&null},{style:"font-weight",getAttrs:n=>/^(bold(er)?|[5-9]\d{2,})$/.test(n)&&null}]},renderHTML({HTMLAttributes:n}){return["strong",ut(this.options.HTMLAttributes,n),0]},addCommands(){return{setBold:()=>({commands:n})=>n.setMark(this.name),toggleBold:()=>({commands:n})=>n.toggleMark(this.name),unsetBold:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[Lo({find:lb,type:this.type}),Lo({find:ub,type:this.type})]},addPasteRules(){return[Kr({find:cb,type:this.type}),Kr({find:db,type:this.type})]}}),pb=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))$/,hb=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))/g,mb=/(?:^|\s)((?:_)((?:[^_]+))(?:_))$/,gb=/(?:^|\s)((?:_)((?:[^_]+))(?:_))/g,vb=_t.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:n=>n.style.fontStyle!=="normal"&&null},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:n}){return["em",ut(this.options.HTMLAttributes,n),0]},addCommands(){return{setItalic:()=>({commands:n})=>n.setMark(this.name),toggleItalic:()=>({commands:n})=>n.toggleMark(this.name),unsetItalic:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Lo({find:pb,type:this.type}),Lo({find:mb,type:this.type})]},addPasteRules(){return[Kr({find:hb,type:this.type}),Kr({find:gb,type:this.type})]}}),yb=_t.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:n=>n.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["u",ut(this.options.HTMLAttributes,n),0]},addCommands(){return{setUnderline:()=>({commands:n})=>n.setMark(this.name),toggleUnderline:()=>({commands:n})=>n.toggleMark(this.name),unsetUnderline:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),bb=Rt.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:n}){return["li",ut(this.options.HTMLAttributes,n),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),xb=Rt.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:n}){return["li",ut(this.options.HTMLAttributes,n),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),$c=_t.create({name:"textStyle",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:n=>n.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["span",ut(this.options.HTMLAttributes,n),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:n,commands:e})=>{const t=Ni(n,this.type);return Object.entries(t).some(([,o])=>!!o)?!0:e.unsetMark(this.name)}}}}),Uc=/^\s*([-+*])\s$/,Sb=Rt.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:n}){return["ul",ut(this.options.HTMLAttributes,n),0]},addCommands(){return{toggleBulletList:()=>({commands:n,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(xb.name,this.editor.getAttributes($c.name)).run():n.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let n=Po({find:Uc,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(n=Po({find:Uc,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes($c.name),editor:this.editor})),[n]}}),Eb=Rt.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:n}){return["li",ut(this.options.HTMLAttributes,n),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),Hc=_t.create({name:"textStyle",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:n=>n.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["span",ut(this.options.HTMLAttributes,n),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:n,commands:e})=>{const t=Ni(n,this.type);return Object.entries(t).some(([,o])=>!!o)?!0:e.unsetMark(this.name)}}}}),jc=/^(\d+)\.\s$/,Cb=Rt.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:n=>n.hasAttribute("start")?parseInt(n.getAttribute("start")||"",10):1}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:n}){const{start:e,...t}=n;return e===1?["ol",ut(this.options.HTMLAttributes,t),0]:["ol",ut(this.options.HTMLAttributes,n),0]},addCommands(){return{toggleOrderedList:()=>({commands:n,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(Eb.name,this.editor.getAttributes(Hc.name)).run():n.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let n=Po({find:jc,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=Po({find:jc,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(Hc.name)}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1],editor:this.editor})),[n]}}),kb=Rt.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:n}){return["br",ut(this.options.HTMLAttributes,n)]},renderText(){return`
|
|
127
|
-
`},addCommands(){return{setHardBreak:()=>({commands:n,chain:e,state:t,editor:r})=>n.first([()=>n.exitCode(),()=>n.command(()=>{const{selection:o,storedMarks:i}=t;if(o.$from.parent.type.spec.isolating)return!1;const{keepMarks:s}=this.options,{splittableMarks:l}=r.extensionManager,a=i||o.$to.parentOffset&&o.$from.marks();return e().insertContent({type:this.name}).command(({tr:c,dispatch:u})=>{if(u&&a&&s){const d=a.filter(f=>l.includes(f.type.name));c.ensureMarks(d)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),hs={BASIC:"basic",FULL:"full"},wb={class:"bd-markdown-editor__menu-bottom"},Tb={key:0,class:"vr"},Ab={key:4,class:"vr"},Ob={key:7,class:"vr"},uf=m.defineComponent({__name:"BDMarkdownEditor",props:{placeholder:{default:"Typ een bericht"},errorText:{default:"er is iets fout gegaan"},state:{type:Boolean,default:void 0},variant:{default:hs.BASIC},modelValue:{}},emits:["update:modelValue"],setup(n,{emit:e}){const t=n,r=Yn(t,"modelValue",e),o=[L2,P2,B2,ab.configure({placeholder:t.placeholder}),kb];t.variant===hs.FULL&&o.push(fb,vb,yb,bb,Sb,Cb,sb.configure({openOnClick:!1,validate:f=>/^https?:\/\//.test(f)}));const i=D2({content:r.value,extensions:o,onUpdate:({editor:f})=>{const{view:h,state:p}=f,{from:g,to:v}=h.state.selection;if(p.doc.textBetween(g-1,v,"")==" "&&f.getAttributes("link").href!=null&&f.chain().setTextSelection({from:g-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())}});m.watch(()=>t.modelValue,f=>{i.value.getHTML()!==f&&i.value.commands.setContent(f,!0,{preserveWhitespace:"full"})});const s=m.computed(()=>t.state?"is-invalid":null),l=m.computed(()=>d("bold")),a=m.computed(()=>d("italic")),c=m.computed(()=>d("underline"));m.computed(()=>d("bulletList")),m.computed(()=>d("orderedList"));const u=m.computed(()=>t.variant===hs.FULL),d=f=>i.value&&i.value.isActive(f)?"active":null;return(f,h)=>(m.openBlock(),m.createElementBlock(m.Fragment,null,[m.createElementVNode("div",{class:m.normalizeClass(["bd-markdown-editor",s.value])},[m.createVNode(m.unref(R2),{editor:m.unref(i)},null,8,["editor"]),m.createElementVNode("div",wb,[m.createVNode(Pt,{variant:"light",type:"button"},{default:m.withCtx(()=>[m.createVNode(m.unref(Fr))]),_:1}),u.value?(m.openBlock(),m.createElementBlock("div",Tb)):m.createCommentVNode("",!0),u.value?(m.openBlock(),m.createBlock(Pt,{key:1,variant:"light",type:"button",class:m.normalizeClass(l.value),onClick:h[0]||(h[0]=p=>m.unref(i).chain().focus().toggleBold().run())},{default:m.withCtx(()=>[m.createVNode(m.unref(_s))]),_:1},8,["class"])):m.createCommentVNode("",!0),u.value?(m.openBlock(),m.createBlock(Pt,{key:2,variant:"light",type:"button",class:m.normalizeClass(a.value),onClick:h[1]||(h[1]=p=>m.unref(i).chain().focus().toggleItalic().run())},{default:m.withCtx(()=>[m.createVNode(m.unref(qs))]),_:1},8,["class"])):m.createCommentVNode("",!0),u.value?(m.openBlock(),m.createBlock(Pt,{key:3,variant:"light",type:"button",class:m.normalizeClass(c.value),onClick:h[2]||(h[2]=p=>m.unref(i).chain().focus().toggleUnderline().run())},{default:m.withCtx(()=>[m.createVNode(m.unref(ea))]),_:1},8,["class"])):m.createCommentVNode("",!0),u.value?(m.openBlock(),m.createElementBlock("div",Ab)):m.createCommentVNode("",!0),u.value?(m.openBlock(),m.createBlock(Pt,{key:5,variant:"light",type:"button",class:"IsUnderlineActive",onClick:h[3]||(h[3]=p=>m.unref(i).chain().focus().toggleUnderline().run())},{default:m.withCtx(()=>[m.createVNode(m.unref(ta))]),_:1})):m.createCommentVNode("",!0),u.value?(m.openBlock(),m.createBlock(Pt,{key:6,variant:"light",type:"button",class:"IsBulletListActive",onClick:h[4]||(h[4]=p=>m.unref(i).chain().focus().toggleBulletList().run())},{default:m.withCtx(()=>[m.createVNode(m.unref(na))]),_:1})):m.createCommentVNode("",!0),u.value?(m.openBlock(),m.createElementBlock("div",Ob)):m.createCommentVNode("",!0),u.value?(m.openBlock(),m.createBlock(Pt,{key:8,variant:"light",type:"button",class:"IsOrderedListActive",onClick:h[5]||(h[5]=p=>m.unref(i).chain().focus().toggleOrderedList().run())},{default:m.withCtx(()=>[m.createVNode(m.unref(ra))]),_:1})):m.createCommentVNode("",!0)])],2),m.createVNode(m.unref(bi),{text:t.errorText,state:t.state},null,8,["text","state"])],64))}}),Mb={class:"bd-user"},Ib={class:"bd-user__information"},Nb={class:"text-break"},Rb={class:"overflow-x-hidden"},df=m.defineComponent({__name:"BDUser",props:{name:{default:""},img:{default:{src:"",alt:""}},details:{default:void 0},hideImage:{type:Boolean,default:!1}},setup(n){const e=n,t=m.computed(()=>{var r;return typeof e.details=="string"?e.details:(r=e.details)==null?void 0:r.join(" • ")});return(r,o)=>(m.openBlock(),m.createElementBlock("div",Mb,[e.hideImage?m.createCommentVNode("",!0):(m.openBlock(),m.createBlock(oa,m.mergeProps({key:0},e.img,{size:"sm"}),null,16)),m.createElementVNode("div",Ib,[m.createElementVNode("h5",Nb,m.toDisplayString(e.name),1),m.createElementVNode("span",Rb,m.toDisplayString(t.value),1)])]))}}),Db={class:"bd-dropdown dropdown"},ff=m.defineComponent({__name:"BDDropdown",props:{size:{default:it.MD},variant:{default:vi.PRIMARY},right:{type:Boolean,default:void 0},noFlip:{type:Boolean,default:void 0},toggleTag:{default:"button"},toggleClass:{},actionToggle:{type:Boolean,default:void 0},text:{default:""},offset:{default:void 0}},setup(n){const e=n,{uniqueIdentifier:t}=yi(),r=`__BD__DROPDOWN__${t.value}`,o=m.computed(()=>({class:{btn:e.toggleTag==="button",[`btn-${e.variant}`]:e.toggleTag==="button"&&e.variant,[`btn-${e.size}`]:e.toggleTag==="button"&&e.size,[`${e.toggleClass}`]:e.toggleClass!==void 0,"dropdown-toggle-action":e.actionToggle},"data-bs-display":e.noFlip?"static":null,"data-bs-offset":e.offset?e.offset:null,id:r})),i=m.computed(()=>({"dropdown-menu-end":e.right,"dropdown-menu-action":e.actionToggle})),s=m.computed(()=>({"aria-labelledby":r}));return(l,a)=>(m.openBlock(),m.createElementBlock("div",Db,[(m.openBlock(),m.createBlock(m.resolveDynamicComponent(e.toggleTag),m.mergeProps({class:"dropdown-toggle",target:"_self",role:"button","data-bs-toggle":"dropdown"},o.value),{default:m.withCtx(()=>[m.createElementVNode("span",null,m.toDisplayString(e.text),1)]),_:1},16)),m.createElementVNode("ul",m.mergeProps({class:["dropdown-menu",i.value]},s.value),[m.renderSlot(l.$slots,"default")],16)]))}}),Lb={class:"modal bd-modal modal-lg",tabindex:"-1"},Pb={class:"modal-dialog"},Bb={class:"modal-content"},Fb={class:"modal-header"},zb={class:"modal-title fw-light"},Vb={class:"modal-body"},$b={class:"modal-footer"},pf=m.defineComponent({__name:"BDModal",props:{title:{default:""},submitButtonTitle:{default:"Opslaan"},closeButtonTitle:{default:"Annuleren"},hideFooterCancelButton:{type:Boolean,default:!1}},emits:["submit","cancel"],setup(n,{emit:e}){const t=n,r=()=>{e("submit")},o=()=>{e("cancel")};return(i,s)=>(m.openBlock(),m.createElementBlock("div",Lb,[m.createElementVNode("div",Pb,[m.createElementVNode("div",Bb,[m.createElementVNode("div",Fb,[m.createElementVNode("h2",zb,m.toDisplayString(t.title),1),m.createElementVNode("button",{type:"button",class:"btn-close w-auto","data-bs-dismiss":"modal","aria-label":"Sluiten",onClick:o},[m.createTextVNode("Sluiten "),m.createVNode(m.unref(Qs),{class:"bg-primary"})])]),m.createElementVNode("div",Vb,[m.renderSlot(i.$slots,"default")]),m.createElementVNode("div",$b,[m.createElementVNode("button",{type:"button",class:"btn btn-primary",onClick:r},m.toDisplayString(t.submitButtonTitle),1),t.hideFooterCancelButton?m.createCommentVNode("",!0):(m.openBlock(),m.createElementBlock("button",{key:0,type:"button",class:"btn btn-link","data-bs-dismiss":"modal",onClick:o,"aria-label":"Annuleren"},m.toDisplayString(t.closeButtonTitle),1))])])])]))}}),Ub={PRIMARY:"primary",SECONDARY:"secondary",COLLEAGUE:"colleague",DANGER:"danger",OUT_PRIMARY:"outline-primary",OUT_PRIMARY_DARK:"outline-primary-dark",OUT_TERTIARY:"outline-tertiary",OUT_LINK:"link",LIGHT:"light",DARK:"dark"},Pt=m.defineComponent({__name:"BDButton",props:{size:{default:it.MD},variant:{default:Ub.PRIMARY},blockElement:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},to:{},target:{},text:{},rel:{}},emits:["click"],setup(n,{emit:e}){const t=n,r=m.computed(()=>({btn:!0,[`btn-${t.variant}`]:t.variant,[`btn-${t.size}`]:!0,"d-grid":t.blockElement&&typeof t.to=="string",[`${t.class}`]:t.class,disabled:t.disabled})),o=m.computed(()=>t.to?gi:"button"),i=m.computed(()=>{const l={};return t.to?(l.to=t.to,l.role="button"):l.type="submit",l}),s=()=>{e("click")};return(l,a)=>(m.openBlock(),m.createBlock(m.resolveDynamicComponent(o.value),m.mergeProps({class:["bd-btn",r.value]},i.value,{onClick:s}),{default:m.withCtx(()=>[m.renderSlot(l.$slots,"default",{},()=>[m.createTextVNode(m.toDisplayString(t.text),1)])]),_:3},16,["class"]))}}),Hb={install:n=>{n.component("BDCol",Wc),n.component("BDContainer",Kc),n.component("BRow",Gc),n.component("BDButton",Pt),n.component("BDLogo",Yc),n.component("BDLink",gi),n.component("BDDropdownItem",cu),n.component("BDDropdown",ff),n.component("BDAlert",Xc),n.component("BDProfileImage",oa),n.component("BDZoomslider",Qc),n.component("BDCard",ia),n.component("BDCollapsableCard",_c),n.component("BDFormInput",eu),n.component("BDInputGroup",tu),n.component("BDFormInvalidFeedback",bi),n.component("BDBadge",nu),n.component("BDForm",ru),n.component("BDPagination",ou),n.component("BDDropzone",du),n.component("BDMarkdownEditor",uf),n.component("BDModal",pf),n.component("BDFormSelect",iu),n.component("BDUser",df),n.component("IconAttachment",Fr),n.component("IconBold",_s),n.component("IconBulletList",ta),n.component("IconCaretDown",Jc),n.component("IconCaretLeft",Zs),n.component("IconCaretRight",Xs),n.component("IconCheck",pi),n.component("IconClose",Qs),n.component("IconError",hi),n.component("IconFile",Ys),n.component("IconHyperlink",ra),n.component("IconInfo",mi),n.component("IconOrderedList",na),n.component("IconItalic",qs),n.component("IconRemove",Js),n.component("IconUnderline",ea),n.component("BDArticle",au),n.component("BDFormCheckbox",su),n.component("BDToast",lu)}};exports.BDAlert=Xc;exports.BDArticle=au;exports.BDBadge=nu;exports.BDButton=Pt;exports.BDCard=ia;exports.BDCol=Wc;exports.BDCollapsableCard=_c;exports.BDContainer=Kc;exports.BDDropdown=ff;exports.BDDropdownItem=cu;exports.BDDropzone=du;exports.BDForm=ru;exports.BDFormCheckbox=su;exports.BDFormInput=eu;exports.BDFormInvalidFeedback=bi;exports.BDFormSelect=iu;exports.BDInputGroup=tu;exports.BDLink=gi;exports.BDLogo=Yc;exports.BDMarkdownEditor=uf;exports.BDModal=pf;exports.BDPagination=ou;exports.BDProfileImage=oa;exports.BDRow=Gc;exports.BDToast=lu;exports.BDUser=df;exports.BDZoomslider=Qc;exports.IconAttachment=Fr;exports.IconBold=_s;exports.IconBulletList=ta;exports.IconCaretLeft=Zs;exports.IconCaretRight=Xs;exports.IconCheck=pi;exports.IconClose=Qs;exports.IconError=hi;exports.IconFile=Ys;exports.IconHyperlink=ra;exports.IconInfo=mi;exports.IconItalic=qs;exports.IconOrderedList=na;exports.IconRemove=Js;exports.IconUnderline=ea;exports.default=Hb;
|
|
127
|
+
`},addCommands(){return{setHardBreak:()=>({commands:n,chain:e,state:t,editor:r})=>n.first([()=>n.exitCode(),()=>n.command(()=>{const{selection:o,storedMarks:i}=t;if(o.$from.parent.type.spec.isolating)return!1;const{keepMarks:s}=this.options,{splittableMarks:l}=r.extensionManager,a=i||o.$to.parentOffset&&o.$from.marks();return e().insertContent({type:this.name}).command(({tr:c,dispatch:u})=>{if(u&&a&&s){const d=a.filter(f=>l.includes(f.type.name));c.ensureMarks(d)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),hs={BASIC:"basic",FULL:"full"},wb={class:"bd-markdown-editor__menu-bottom"},Tb={key:0,class:"vr"},Ab={key:4,class:"vr"},Ob={key:7,class:"vr"},uf=m.defineComponent({__name:"BDMarkdownEditor",props:{placeholder:{default:"Typ een bericht"},errorText:{default:"er is iets fout gegaan"},state:{type:Boolean,default:void 0},variant:{default:hs.BASIC},modelValue:{}},emits:["update:modelValue","upload"],setup(n,{emit:e}){const t=n,r=()=>{e("upload")},o=Yn(t,"modelValue",e),i=[L2,P2,B2,ab.configure({placeholder:t.placeholder}),kb];t.variant===hs.FULL&&i.push(fb,vb,yb,bb,Sb,Cb,sb.configure({openOnClick:!1,validate:h=>/^https?:\/\//.test(h)}));const s=D2({content:o.value,extensions:i,onUpdate:({editor:h})=>{const{view:p,state:g}=h,{from:v,to:S}=p.state.selection;if(g.doc.textBetween(v-1,S,"")==" "&&h.getAttributes("link").href!=null&&h.chain().setTextSelection({from:v-1,to:S}).toggleLink({href:h.getAttributes("link").href}).setTextSelection({from:S,to:S}).run(),h.getText().trim()===""){e("update:modelValue","");return}e("update:modelValue",h.getHTML())}});m.watch(()=>t.modelValue,h=>{s.value.getHTML()!==h&&s.value.commands.setContent(h,!0,{preserveWhitespace:"full"})});const l=m.computed(()=>t.state?"is-invalid":null),a=m.computed(()=>f("bold")),c=m.computed(()=>f("italic")),u=m.computed(()=>f("underline"));m.computed(()=>f("bulletList")),m.computed(()=>f("orderedList"));const d=m.computed(()=>t.variant===hs.FULL),f=h=>s.value&&s.value.isActive(h)?"active":null;return(h,p)=>(m.openBlock(),m.createElementBlock(m.Fragment,null,[m.createElementVNode("div",{class:m.normalizeClass(["bd-markdown-editor",l.value])},[m.createVNode(m.unref(R2),{editor:m.unref(s)},null,8,["editor"]),m.renderSlot(h.$slots,"default"),m.createElementVNode("div",wb,[m.createVNode(Pt,{variant:"light",type:"button",onClick:r},{default:m.withCtx(()=>[m.createVNode(m.unref(Fr))]),_:1}),d.value?(m.openBlock(),m.createElementBlock("div",Tb)):m.createCommentVNode("",!0),d.value?(m.openBlock(),m.createBlock(Pt,{key:1,variant:"light",type:"button",class:m.normalizeClass(a.value),onClick:p[0]||(p[0]=g=>m.unref(s).chain().focus().toggleBold().run())},{default:m.withCtx(()=>[m.createVNode(m.unref(_s))]),_:1},8,["class"])):m.createCommentVNode("",!0),d.value?(m.openBlock(),m.createBlock(Pt,{key:2,variant:"light",type:"button",class:m.normalizeClass(c.value),onClick:p[1]||(p[1]=g=>m.unref(s).chain().focus().toggleItalic().run())},{default:m.withCtx(()=>[m.createVNode(m.unref(qs))]),_:1},8,["class"])):m.createCommentVNode("",!0),d.value?(m.openBlock(),m.createBlock(Pt,{key:3,variant:"light",type:"button",class:m.normalizeClass(u.value),onClick:p[2]||(p[2]=g=>m.unref(s).chain().focus().toggleUnderline().run())},{default:m.withCtx(()=>[m.createVNode(m.unref(ea))]),_:1},8,["class"])):m.createCommentVNode("",!0),d.value?(m.openBlock(),m.createElementBlock("div",Ab)):m.createCommentVNode("",!0),d.value?(m.openBlock(),m.createBlock(Pt,{key:5,variant:"light",type:"button",class:"IsUnderlineActive",onClick:p[3]||(p[3]=g=>m.unref(s).chain().focus().toggleUnderline().run())},{default:m.withCtx(()=>[m.createVNode(m.unref(ta))]),_:1})):m.createCommentVNode("",!0),d.value?(m.openBlock(),m.createBlock(Pt,{key:6,variant:"light",type:"button",class:"IsBulletListActive",onClick:p[4]||(p[4]=g=>m.unref(s).chain().focus().toggleBulletList().run())},{default:m.withCtx(()=>[m.createVNode(m.unref(na))]),_:1})):m.createCommentVNode("",!0),d.value?(m.openBlock(),m.createElementBlock("div",Ob)):m.createCommentVNode("",!0),d.value?(m.openBlock(),m.createBlock(Pt,{key:8,variant:"light",type:"button",class:"IsOrderedListActive",onClick:p[5]||(p[5]=g=>m.unref(s).chain().focus().toggleOrderedList().run())},{default:m.withCtx(()=>[m.createVNode(m.unref(ra))]),_:1})):m.createCommentVNode("",!0)])],2),m.createVNode(m.unref(bi),{text:t.errorText,state:t.state},null,8,["text","state"])],64))}}),Mb={class:"bd-user"},Ib={class:"bd-user__information"},Nb={class:"text-break"},Rb={class:"overflow-x-hidden"},df=m.defineComponent({__name:"BDUser",props:{name:{default:""},img:{default:{src:"",alt:""}},details:{default:void 0},hideImage:{type:Boolean,default:!1}},setup(n){const e=n,t=m.computed(()=>{var r;return typeof e.details=="string"?e.details:(r=e.details)==null?void 0:r.join(" • ")});return(r,o)=>(m.openBlock(),m.createElementBlock("div",Mb,[e.hideImage?m.createCommentVNode("",!0):(m.openBlock(),m.createBlock(oa,m.mergeProps({key:0},e.img,{size:"sm"}),null,16)),m.createElementVNode("div",Ib,[m.createElementVNode("h5",Nb,m.toDisplayString(e.name),1),m.createElementVNode("span",Rb,m.toDisplayString(t.value),1)])]))}}),Db={class:"bd-dropdown dropdown"},ff=m.defineComponent({__name:"BDDropdown",props:{size:{default:it.MD},variant:{default:vi.PRIMARY},right:{type:Boolean,default:void 0},noFlip:{type:Boolean,default:void 0},toggleTag:{default:"button"},toggleClass:{},actionToggle:{type:Boolean,default:void 0},text:{default:""},offset:{default:void 0}},setup(n){const e=n,{uniqueIdentifier:t}=yi(),r=`__BD__DROPDOWN__${t.value}`,o=m.computed(()=>({class:{btn:e.toggleTag==="button",[`btn-${e.variant}`]:e.toggleTag==="button"&&e.variant,[`btn-${e.size}`]:e.toggleTag==="button"&&e.size,[`${e.toggleClass}`]:e.toggleClass!==void 0,"dropdown-toggle-action":e.actionToggle},"data-bs-display":e.noFlip?"static":null,"data-bs-offset":e.offset?e.offset:null,id:r})),i=m.computed(()=>({"dropdown-menu-end":e.right,"dropdown-menu-action":e.actionToggle})),s=m.computed(()=>({"aria-labelledby":r}));return(l,a)=>(m.openBlock(),m.createElementBlock("div",Db,[(m.openBlock(),m.createBlock(m.resolveDynamicComponent(e.toggleTag),m.mergeProps({class:"dropdown-toggle",target:"_self",role:"button","data-bs-toggle":"dropdown"},o.value),{default:m.withCtx(()=>[m.createElementVNode("span",null,m.toDisplayString(e.text),1)]),_:1},16)),m.createElementVNode("ul",m.mergeProps({class:["dropdown-menu",i.value]},s.value),[m.renderSlot(l.$slots,"default")],16)]))}}),Lb={class:"modal bd-modal modal-lg",tabindex:"-1"},Pb={class:"modal-dialog"},Bb={class:"modal-content"},Fb={class:"modal-header"},zb={class:"modal-title fw-light"},Vb={class:"modal-body"},$b={class:"modal-footer"},pf=m.defineComponent({__name:"BDModal",props:{title:{default:""},submitButtonTitle:{default:"Opslaan"},closeButtonTitle:{default:"Annuleren"},hideFooterCancelButton:{type:Boolean,default:!1}},emits:["submit","cancel"],setup(n,{emit:e}){const t=n,r=()=>{e("submit")},o=()=>{e("cancel")};return(i,s)=>(m.openBlock(),m.createElementBlock("div",Lb,[m.createElementVNode("div",Pb,[m.createElementVNode("div",Bb,[m.createElementVNode("div",Fb,[m.createElementVNode("h2",zb,m.toDisplayString(t.title),1),m.createElementVNode("button",{type:"button",class:"btn-close w-auto","data-bs-dismiss":"modal","aria-label":"Sluiten",onClick:o},[m.createTextVNode("Sluiten "),m.createVNode(m.unref(Qs),{class:"bg-primary"})])]),m.createElementVNode("div",Vb,[m.renderSlot(i.$slots,"default")]),m.createElementVNode("div",$b,[m.createElementVNode("button",{type:"button",class:"btn btn-primary",onClick:r},m.toDisplayString(t.submitButtonTitle),1),t.hideFooterCancelButton?m.createCommentVNode("",!0):(m.openBlock(),m.createElementBlock("button",{key:0,type:"button",class:"btn btn-link","data-bs-dismiss":"modal",onClick:o,"aria-label":"Annuleren"},m.toDisplayString(t.closeButtonTitle),1))])])])]))}}),Ub={PRIMARY:"primary",SECONDARY:"secondary",COLLEAGUE:"colleague",DANGER:"danger",OUT_PRIMARY:"outline-primary",OUT_PRIMARY_DARK:"outline-primary-dark",OUT_TERTIARY:"outline-tertiary",OUT_LINK:"link",LIGHT:"light",DARK:"dark"},Pt=m.defineComponent({__name:"BDButton",props:{size:{default:it.MD},variant:{default:Ub.PRIMARY},blockElement:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},to:{},target:{},text:{},rel:{}},emits:["click"],setup(n,{emit:e}){const t=n,r=m.computed(()=>({btn:!0,[`btn-${t.variant}`]:t.variant,[`btn-${t.size}`]:!0,"d-grid":t.blockElement&&typeof t.to=="string",[`${t.class}`]:t.class,disabled:t.disabled})),o=m.computed(()=>t.to?gi:"button"),i=m.computed(()=>{const l={};return t.to?(l.to=t.to,l.role="button"):l.type="submit",l}),s=()=>{e("click")};return(l,a)=>(m.openBlock(),m.createBlock(m.resolveDynamicComponent(o.value),m.mergeProps({class:["bd-btn",r.value]},i.value,{onClick:s}),{default:m.withCtx(()=>[m.renderSlot(l.$slots,"default",{},()=>[m.createTextVNode(m.toDisplayString(t.text),1)])]),_:3},16,["class"]))}}),Hb={install:n=>{n.component("BDCol",Wc),n.component("BDContainer",Kc),n.component("BRow",Gc),n.component("BDButton",Pt),n.component("BDLogo",Yc),n.component("BDLink",gi),n.component("BDDropdownItem",cu),n.component("BDDropdown",ff),n.component("BDAlert",Xc),n.component("BDProfileImage",oa),n.component("BDZoomslider",Qc),n.component("BDCard",ia),n.component("BDCollapsableCard",_c),n.component("BDFormInput",eu),n.component("BDInputGroup",tu),n.component("BDFormInvalidFeedback",bi),n.component("BDBadge",nu),n.component("BDForm",ru),n.component("BDPagination",ou),n.component("BDDropzone",du),n.component("BDMarkdownEditor",uf),n.component("BDModal",pf),n.component("BDFormSelect",iu),n.component("BDUser",df),n.component("IconAttachment",Fr),n.component("IconBold",_s),n.component("IconBulletList",ta),n.component("IconCaretDown",Jc),n.component("IconCaretLeft",Zs),n.component("IconCaretRight",Xs),n.component("IconCheck",pi),n.component("IconClose",Qs),n.component("IconError",hi),n.component("IconFile",Ys),n.component("IconHyperlink",ra),n.component("IconInfo",mi),n.component("IconOrderedList",na),n.component("IconItalic",qs),n.component("IconRemove",Js),n.component("IconUnderline",ea),n.component("BDArticle",au),n.component("BDFormCheckbox",su),n.component("BDToast",lu)}};exports.BDAlert=Xc;exports.BDArticle=au;exports.BDBadge=nu;exports.BDButton=Pt;exports.BDCard=ia;exports.BDCol=Wc;exports.BDCollapsableCard=_c;exports.BDContainer=Kc;exports.BDDropdown=ff;exports.BDDropdownItem=cu;exports.BDDropzone=du;exports.BDForm=ru;exports.BDFormCheckbox=su;exports.BDFormInput=eu;exports.BDFormInvalidFeedback=bi;exports.BDFormSelect=iu;exports.BDInputGroup=tu;exports.BDLink=gi;exports.BDLogo=Yc;exports.BDMarkdownEditor=uf;exports.BDModal=pf;exports.BDPagination=ou;exports.BDProfileImage=oa;exports.BDRow=Gc;exports.BDToast=lu;exports.BDUser=df;exports.BDZoomslider=Qc;exports.IconAttachment=Fr;exports.IconBold=_s;exports.IconBulletList=ta;exports.IconCaretLeft=Zs;exports.IconCaretRight=Xs;exports.IconCheck=pi;exports.IconClose=Qs;exports.IconError=hi;exports.IconFile=Ys;exports.IconHyperlink=ra;exports.IconInfo=mi;exports.IconItalic=qs;exports.IconOrderedList=na;exports.IconRemove=Js;exports.IconUnderline=ea;exports.default=Hb;
|