@beterdichtbij/component-library 0.27.3 → 0.27.5
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.
|
@@ -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 b=!0,N=!1,I;return{s:function(){w=x[Symbol.iterator]()},n:function(){var L=w.next();return b=L.done,L},e:function(L){N=!0,I=L},f:function(){try{!b&&w.return!=null&&w.return()}finally{if(N)throw I}}}}function y(x,M){if(x){if(typeof x=="string")return C(x,M);var w=Object.prototype.toString.call(x).slice(8,-1);if(w==="Object"&&x.constructor&&(w=x.constructor.name),w==="Map"||w==="Set")return Array.from(x);if(w==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(w))return C(x,M)}}function C(x,M){(M==null||M>x.length)&&(M=x.length);for(var w=0,O=new Array(M);w<M;w++)O[w]=x[w];return O}var S={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,w,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,w){return w()},chunksUploaded:function(M,w){w()},fallback:function(){var M;this.element.className="".concat(this.element.className," dz-browser-not-supported");var w=g(this.element.getElementsByTagName("div"),!0),O;try{for(w.s();!(O=w.n()).done;){var v=O.value;if(/(^| )dz-message($| )/.test(v.className)){M=v,v.className="dz-message";break}}}catch(N){w.e(N)}finally{w.f()}M||(M=j.createElement('<div class="dz-message"><span></span></div>'),this.element.appendChild(M));var b=M.getElementsByTagName("span")[0];return b&&(b.textContent!=null?b.textContent=this.options.dictFallbackMessage:b.innerText!=null&&(b.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(M,w,O,v){var b={srcX:0,srcY:0,srcWidth:M.width,srcHeight:M.height},N=M.width/M.height;w==null&&O==null?(w=b.srcWidth,O=b.srcHeight):w==null?w=O*N:O==null&&(O=w/N),w=Math.min(w,b.srcWidth),O=Math.min(O,b.srcHeight);var I=w/O;if(b.srcWidth>w||b.srcHeight>O)if(v==="crop")N>I?(b.srcHeight=M.height,b.srcWidth=b.srcHeight*I):(b.srcWidth=M.width,b.srcHeight=b.srcWidth/I);else if(v==="contain")N>I?O=w/N:w=O*N;else throw new Error("Unknown resizeMethod '".concat(v,"'"));return b.srcX=(M.width-b.srcWidth)/2,b.srcY=(M.height-b.srcHeight)/2,b.trgWidth=w,b.trgHeight=O,b},transformFile:function(M,w){return(this.options.resizeWidth||this.options.resizeHeight)&&M.type.match(/image.*/)?this.resizeImage(M,this.options.resizeWidth,this.options.resizeHeight,this.options.resizeMethod,w):w(M)},previewTemplate:m,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 w=this;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer&&!this.options.disablePreviews){M.previewElement=j.createElement(this.options.previewTemplate.trim()),M.previewTemplate=M.previewElement,this.previewsContainer.appendChild(M.previewElement);var O=g(M.previewElement.querySelectorAll("[data-dz-name]"),!0),v;try{for(O.s();!(v=O.n()).done;){var b=v.value;b.textContent=M.name}}catch(U){O.e(U)}finally{O.f()}var N=g(M.previewElement.querySelectorAll("[data-dz-size]"),!0),I;try{for(N.s();!(I=N.n()).done;)b=I.value,b.innerHTML=this.filesize(M.size)}catch(U){N.e(U)}finally{N.f()}this.options.addRemoveLinks&&(M._removeLink=j.createElement('<a class="dz-remove" href="javascript:undefined;" data-dz-remove>'.concat(this.options.dictRemoveFile,"</a>")),M.previewElement.appendChild(M._removeLink));var D=function(K){return K.preventDefault(),K.stopPropagation(),M.status===j.UPLOADING?j.confirm(w.options.dictCancelUploadConfirmation,function(){return w.removeFile(M)}):w.options.dictRemoveFileConfirmation?j.confirm(w.options.dictRemoveFileConfirmation,function(){return w.removeFile(M)}):w.removeFile(M)},L=g(M.previewElement.querySelectorAll("[data-dz-remove]"),!0),z;try{for(L.s();!(z=L.n()).done;){var W=z.value;W.addEventListener("click",D)}}catch(U){L.e(U)}finally{L.f()}}},removedfile:function(M){return M.previewElement!=null&&M.previewElement.parentNode!=null&&M.previewElement.parentNode.removeChild(M.previewElement),this._updateMaxFilesReachedClass()},thumbnail:function(M,w){if(M.previewElement){M.previewElement.classList.remove("dz-file-preview");var O=g(M.previewElement.querySelectorAll("[data-dz-thumbnail]"),!0),v;try{for(O.s();!(v=O.n()).done;){var b=v.value;b.alt=M.name,b.src=w}}catch(N){O.e(N)}finally{O.f()}return setTimeout(function(){return M.previewElement.classList.add("dz-image-preview")},1)}},error:function(M,w){if(M.previewElement){M.previewElement.classList.add("dz-error"),typeof w!="string"&&w.error&&(w=w.error);var O=g(M.previewElement.querySelectorAll("[data-dz-errormessage]"),!0),v;try{for(O.s();!(v=O.n()).done;){var b=v.value;b.textContent=w}}catch(N){O.e(N)}finally{O.f()}}},errormultiple:function(){},processing:function(M){if(M.previewElement&&(M.previewElement.classList.add("dz-processing"),M._removeLink))return M._removeLink.innerHTML=this.options.dictCancelUpload},processingmultiple:function(){},uploadprogress:function(M,w,O){if(M.previewElement){var v=g(M.previewElement.querySelectorAll("[data-dz-uploadprogress]"),!0),b;try{for(v.s();!(b=v.n()).done;){var N=b.value;N.nodeName==="PROGRESS"?N.value=w:N.style.width="".concat(w,"%")}}catch(I){v.e(I)}finally{v.f()}}},totaluploadprogress:function(){},sending:function(){},sendingmultiple:function(){},success:function(M){if(M.previewElement)return M.previewElement.classList.add("dz-success")},successmultiple:function(){},canceled:function(M){return this.emit("error",M,this.options.dictUploadCanceled)},canceledmultiple:function(){},complete:function(M){if(M._removeLink&&(M._removeLink.innerHTML=this.options.dictRemoveFile),M.previewElement)return M.previewElement.classList.add("dz-complete")},completemultiple:function(){},maxfilesexceeded:function(){},maxfilesreached:function(){},queuecomplete:function(){},addedfiles:function(){}},k=S;function E(x){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?E=function(w){return typeof w}:E=function(w){return w&&typeof Symbol=="function"&&w.constructor===Symbol&&w!==Symbol.prototype?"symbol":typeof w},E(x)}function _(x,M){var w;if(typeof Symbol>"u"||x[Symbol.iterator]==null){if(Array.isArray(x)||(w=T(x))||M&&x&&typeof x.length=="number"){w&&(x=w);var O=0,v=function(){};return{s:v,n:function(){return O>=x.length?{done:!0}:{done:!1,value:x[O++]}},e:function(L){throw L},f:v}}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 b=!0,N=!1,I;return{s:function(){w=x[Symbol.iterator]()},n:function(){var L=w.next();return b=L.done,L},e:function(L){N=!0,I=L},f:function(){try{!b&&w.return!=null&&w.return()}finally{if(N)throw I}}}}function T(x,M){if(x){if(typeof x=="string")return P(x,M);var w=Object.prototype.toString.call(x).slice(8,-1);if(w==="Object"&&x.constructor&&(w=x.constructor.name),w==="Map"||w==="Set")return Array.from(x);if(w==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(w))return P(x,M)}}function P(x,M){(M==null||M>x.length)&&(M=x.length);for(var w=0,O=new Array(M);w<M;w++)O[w]=x[w];return O}function F(x,M){if(!(x instanceof M))throw new TypeError("Cannot call a class as a function")}function V(x,M){for(var w=0;w<M.length;w++){var O=M[w];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(x,O.key,O)}}function $(x,M,w){return M&&V(x.prototype,M),w&&V(x,w),x}function B(x,M){if(typeof M!="function"&&M!==null)throw new TypeError("Super expression must either be null or a function");x.prototype=Object.create(M&&M.prototype,{constructor:{value:x,writable:!0,configurable:!0}}),M&&R(x,M)}function R(x,M){return R=Object.setPrototypeOf||function(O,v){return O.__proto__=v,O},R(x,M)}function H(x){var M=X();return function(){var O=oe(x),v;if(M){var b=oe(this).constructor;v=Reflect.construct(O,arguments,b)}else v=O.apply(this,arguments);return Y(this,v)}}function Y(x,M){return M&&(E(M)==="object"||typeof M=="function")?M:Z(x)}function Z(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}function X(){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 oe(x){return oe=Object.setPrototypeOf?Object.getPrototypeOf:function(w){return w.__proto__||Object.getPrototypeOf(w)},oe(x)}var j=function(x){B(w,x);var M=H(w);function w(O,v){var b;F(this,w),b=M.call(this);var N,I;if(b.element=O,b.version=w.version,b.clickableElements=[],b.listeners=[],b.files=[],typeof b.element=="string"&&(b.element=document.querySelector(b.element)),!b.element||b.element.nodeType==null)throw new Error("Invalid dropzone element.");if(b.element.dropzone)throw new Error("Dropzone already attached.");w.instances.push(Z(b)),b.element.dropzone=Z(b);var D=(I=w.optionsForElement(b.element))!=null?I:{};if(b.options=w.extend({},k,D,v??{}),b.options.previewTemplate=b.options.previewTemplate.replace(/\n*/g,""),b.options.forceFallback||!w.isBrowserSupported())return Y(b,b.options.fallback.call(Z(b)));if(b.options.url==null&&(b.options.url=b.element.getAttribute("action")),!b.options.url)throw new Error("No URL provided.");if(b.options.acceptedFiles&&b.options.acceptedMimeTypes)throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");if(b.options.uploadMultiple&&b.options.chunking)throw new Error("You cannot set both: uploadMultiple and chunking.");return b.options.acceptedMimeTypes&&(b.options.acceptedFiles=b.options.acceptedMimeTypes,delete b.options.acceptedMimeTypes),b.options.renameFilename!=null&&(b.options.renameFile=function(L){return b.options.renameFilename.call(Z(b),L.name,L)}),typeof b.options.method=="string"&&(b.options.method=b.options.method.toUpperCase()),(N=b.getExistingFallback())&&N.parentNode&&N.parentNode.removeChild(N),b.options.previewsContainer!==!1&&(b.options.previewsContainer?b.previewsContainer=w.getElement(b.options.previewsContainer,"previewsContainer"):b.previewsContainer=b.element),b.options.clickable&&(b.options.clickable===!0?b.clickableElements=[b.element]:b.clickableElements=w.getElements(b.options.clickable,"clickable")),b.init(),b}return $(w,[{key:"getAcceptedFiles",value:function(){return this.files.filter(function(v){return v.accepted}).map(function(v){return v})}},{key:"getRejectedFiles",value:function(){return this.files.filter(function(v){return!v.accepted}).map(function(v){return v})}},{key:"getFilesWithStatus",value:function(v){return this.files.filter(function(b){return b.status===v}).map(function(b){return b})}},{key:"getQueuedFiles",value:function(){return this.getFilesWithStatus(w.QUEUED)}},{key:"getUploadingFiles",value:function(){return this.getFilesWithStatus(w.UPLOADING)}},{key:"getAddedFiles",value:function(){return this.getFilesWithStatus(w.ADDED)}},{key:"getActiveFiles",value:function(){return this.files.filter(function(v){return v.status===w.UPLOADING||v.status===w.QUEUED}).map(function(v){return v})}},{key:"init",value:function(){var v=this;if(this.element.tagName==="form"&&this.element.setAttribute("enctype","multipart/form-data"),this.element.classList.contains("dropzone")&&!this.element.querySelector(".dz-message")&&this.element.appendChild(w.createElement('<div class="dz-default dz-message"><button class="dz-button" type="button">'.concat(this.options.dictDefaultMessage,"</button></div>"))),this.clickableElements.length){var b=function W(){v.hiddenFileInput&&v.hiddenFileInput.parentNode.removeChild(v.hiddenFileInput),v.hiddenFileInput=document.createElement("input"),v.hiddenFileInput.setAttribute("type","file"),(v.options.maxFiles===null||v.options.maxFiles>1)&&v.hiddenFileInput.setAttribute("multiple","multiple"),v.hiddenFileInput.className="dz-hidden-input",v.options.acceptedFiles!==null&&v.hiddenFileInput.setAttribute("accept",v.options.acceptedFiles),v.options.capture!==null&&v.hiddenFileInput.setAttribute("capture",v.options.capture),v.hiddenFileInput.setAttribute("tabindex","-1"),v.hiddenFileInput.style.visibility="hidden",v.hiddenFileInput.style.position="absolute",v.hiddenFileInput.style.top="0",v.hiddenFileInput.style.left="0",v.hiddenFileInput.style.height="0",v.hiddenFileInput.style.width="0",w.getElement(v.options.hiddenInputContainer,"hiddenInputContainer").appendChild(v.hiddenFileInput),v.hiddenFileInput.addEventListener("change",function(){var U=v.hiddenFileInput.files;if(U.length){var K=_(U,!0),G;try{for(K.s();!(G=K.n()).done;){var q=G.value;v.addFile(q)}}catch(ue){K.e(ue)}finally{K.f()}}v.emit("addedfiles",U),W()})};b()}this.URL=window.URL!==null?window.URL:window.webkitURL;var N=_(this.events,!0),I;try{for(N.s();!(I=N.n()).done;){var D=I.value;this.on(D,this.options[D])}}catch(W){N.e(W)}finally{N.f()}this.on("uploadprogress",function(){return v.updateTotalUploadProgress()}),this.on("removedfile",function(){return v.updateTotalUploadProgress()}),this.on("canceled",function(W){return v.emit("complete",W)}),this.on("complete",function(W){if(v.getAddedFiles().length===0&&v.getUploadingFiles().length===0&&v.getQueuedFiles().length===0)return setTimeout(function(){return v.emit("queuecomplete")},0)});var L=function(U){if(U.dataTransfer.types){for(var K=0;K<U.dataTransfer.types.length;K++)if(U.dataTransfer.types[K]==="Files")return!0}return!1},z=function(U){if(L(U))return U.stopPropagation(),U.preventDefault?U.preventDefault():U.returnValue=!1};return this.listeners=[{element:this.element,events:{dragstart:function(U){return v.emit("dragstart",U)},dragenter:function(U){return z(U),v.emit("dragenter",U)},dragover:function(U){var K;try{K=U.dataTransfer.effectAllowed}catch{}return U.dataTransfer.dropEffect=K==="move"||K==="linkMove"?"move":"copy",z(U),v.emit("dragover",U)},dragleave:function(U){return v.emit("dragleave",U)},drop:function(U){return z(U),v.drop(U)},dragend:function(U){return v.emit("dragend",U)}}}],this.clickableElements.forEach(function(W){return v.listeners.push({element:W,events:{click:function(K){return(W!==v.element||K.target===v.element||w.elementInside(K.target,v.element.querySelector(".dz-message")))&&v.hiddenFileInput.click(),!0}}})}),this.enable(),this.options.init.call(this)}},{key:"destroy",value:function(){return this.disable(),this.removeAllFiles(!0),this.hiddenFileInput!=null&&this.hiddenFileInput.parentNode&&(this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=null),delete this.element.dropzone,w.instances.splice(w.instances.indexOf(this),1)}},{key:"updateTotalUploadProgress",value:function(){var v,b=0,N=0,I=this.getActiveFiles();if(I.length){var D=_(this.getActiveFiles(),!0),L;try{for(D.s();!(L=D.n()).done;){var z=L.value;b+=z.upload.bytesSent,N+=z.upload.total}}catch(W){D.e(W)}finally{D.f()}v=100*b/N}else v=100;return this.emit("totaluploadprogress",v,N,b)}},{key:"_getParamName",value:function(v){return typeof this.options.paramName=="function"?this.options.paramName(v):"".concat(this.options.paramName).concat(this.options.uploadMultiple?"[".concat(v,"]"):"")}},{key:"_renameFile",value:function(v){return typeof this.options.renameFile!="function"?v.name:this.options.renameFile(v)}},{key:"getFallbackForm",value:function(){var v,b;if(v=this.getExistingFallback())return v;var N='<div class="dz-fallback">';this.options.dictFallbackText&&(N+="<p>".concat(this.options.dictFallbackText,"</p>")),N+='<input type="file" name="'.concat(this._getParamName(0),'" ').concat(this.options.uploadMultiple?'multiple="multiple"':void 0,' /><input type="submit" value="Upload!"></div>');var I=w.createElement(N);return this.element.tagName!=="FORM"?(b=w.createElement('<form action="'.concat(this.options.url,'" enctype="multipart/form-data" method="').concat(this.options.method,'"></form>')),b.appendChild(I)):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),b??I}},{key:"getExistingFallback",value:function(){for(var v=function(z){var W=_(z,!0),U;try{for(W.s();!(U=W.n()).done;){var K=U.value;if(/(^| )fallback($| )/.test(K.className))return K}}catch(G){W.e(G)}finally{W.f()}},b=0,N=["div","form"];b<N.length;b++){var I=N[b],D;if(D=v(this.element.getElementsByTagName(I)))return D}}},{key:"setupEventListeners",value:function(){return this.listeners.map(function(v){return function(){var b=[];for(var N in v.events){var I=v.events[N];b.push(v.element.addEventListener(N,I,!1))}return b}()})}},{key:"removeEventListeners",value:function(){return this.listeners.map(function(v){return function(){var b=[];for(var N in v.events){var I=v.events[N];b.push(v.element.removeEventListener(N,I,!1))}return b}()})}},{key:"disable",value:function(){var v=this;return this.clickableElements.forEach(function(b){return b.classList.remove("dz-clickable")}),this.removeEventListeners(),this.disabled=!0,this.files.map(function(b){return v.cancelUpload(b)})}},{key:"enable",value:function(){return delete this.disabled,this.clickableElements.forEach(function(v){return v.classList.add("dz-clickable")}),this.setupEventListeners()}},{key:"filesize",value:function(v){var b=0,N="b";if(v>0){for(var I=["tb","gb","mb","kb","b"],D=0;D<I.length;D++){var L=I[D],z=Math.pow(this.options.filesizeBase,4-D)/10;if(v>=z){b=v/Math.pow(this.options.filesizeBase,4-D),N=L;break}}b=Math.round(10*b)/10}return"<strong>".concat(b,"</strong> ").concat(this.options.dictFileSizeUnits[N])}},{key:"_updateMaxFilesReachedClass",value:function(){return this.options.maxFiles!=null&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")}},{key:"drop",value:function(v){if(v.dataTransfer){this.emit("drop",v);for(var b=[],N=0;N<v.dataTransfer.files.length;N++)b[N]=v.dataTransfer.files[N];if(b.length){var I=v.dataTransfer.items;I&&I.length&&I[0].webkitGetAsEntry!=null?this._addFilesFromItems(I):this.handleFiles(b)}this.emit("addedfiles",b)}}},{key:"paste",value:function(v){if(Ae(v!=null?v.clipboardData:void 0,function(N){return N.items})!=null){this.emit("paste",v);var b=v.clipboardData.items;if(b.length)return this._addFilesFromItems(b)}}},{key:"handleFiles",value:function(v){var b=_(v,!0),N;try{for(b.s();!(N=b.n()).done;){var I=N.value;this.addFile(I)}}catch(D){b.e(D)}finally{b.f()}}},{key:"_addFilesFromItems",value:function(v){var b=this;return function(){var N=[],I=_(v,!0),D;try{for(I.s();!(D=I.n()).done;){var L=D.value,z;L.webkitGetAsEntry!=null&&(z=L.webkitGetAsEntry())?z.isFile?N.push(b.addFile(L.getAsFile())):z.isDirectory?N.push(b._addFilesFromDirectory(z,z.name)):N.push(void 0):L.getAsFile!=null&&(L.kind==null||L.kind==="file")?N.push(b.addFile(L.getAsFile())):N.push(void 0)}}catch(W){I.e(W)}finally{I.f()}return N}()}},{key:"_addFilesFromDirectory",value:function(v,b){var N=this,I=v.createReader(),D=function(W){return Me(console,"log",function(U){return U.log(W)})},L=function z(){return I.readEntries(function(W){if(W.length>0){var U=_(W,!0),K;try{for(U.s();!(K=U.n()).done;){var G=K.value;G.isFile?G.file(function(q){if(!(N.options.ignoreHiddenFiles&&q.name.substring(0,1)==="."))return q.fullPath="".concat(b,"/").concat(q.name),N.addFile(q)}):G.isDirectory&&N._addFilesFromDirectory(G,"".concat(b,"/").concat(G.name))}}catch(q){U.e(q)}finally{U.f()}z()}return null},D)};return L()}},{key:"accept",value:function(v,b){this.options.maxFilesize&&v.size>this.options.maxFilesize*1024*1024?b(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(v.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):w.isValidFile(v,this.options.acceptedFiles)?this.options.maxFiles!=null&&this.getAcceptedFiles().length>=this.options.maxFiles?(b(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",v)):this.options.accept.call(this,v,b):b(this.options.dictInvalidFileType)}},{key:"addFile",value:function(v){var b=this;v.upload={uuid:w.uuidv4(),progress:0,total:v.size,bytesSent:0,filename:this._renameFile(v)},this.files.push(v),v.status=w.ADDED,this.emit("addedfile",v),this._enqueueThumbnail(v),this.accept(v,function(N){N?(v.accepted=!1,b._errorProcessing([v],N)):(v.accepted=!0,b.options.autoQueue&&b.enqueueFile(v)),b._updateMaxFilesReachedClass()})}},{key:"enqueueFiles",value:function(v){var b=_(v,!0),N;try{for(b.s();!(N=b.n()).done;){var I=N.value;this.enqueueFile(I)}}catch(D){b.e(D)}finally{b.f()}return null}},{key:"enqueueFile",value:function(v){var b=this;if(v.status===w.ADDED&&v.accepted===!0){if(v.status=w.QUEUED,this.options.autoProcessQueue)return setTimeout(function(){return b.processQueue()},0)}else throw new Error("This file can't be queued because it has already been processed or was rejected.")}},{key:"_enqueueThumbnail",value:function(v){var b=this;if(this.options.createImageThumbnails&&v.type.match(/image.*/)&&v.size<=this.options.maxThumbnailFilesize*1024*1024)return this._thumbnailQueue.push(v),setTimeout(function(){return b._processThumbnailQueue()},0)}},{key:"_processThumbnailQueue",value:function(){var v=this;if(!(this._processingThumbnail||this._thumbnailQueue.length===0)){this._processingThumbnail=!0;var b=this._thumbnailQueue.shift();return this.createThumbnail(b,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,!0,function(N){return v.emit("thumbnail",b,N),v._processingThumbnail=!1,v._processThumbnailQueue()})}}},{key:"removeFile",value:function(v){if(v.status===w.UPLOADING&&this.cancelUpload(v),this.files=ce(this.files,v),this.emit("removedfile",v),this.files.length===0)return this.emit("reset")}},{key:"removeAllFiles",value:function(v){v==null&&(v=!1);var b=_(this.files.slice(),!0),N;try{for(b.s();!(N=b.n()).done;){var I=N.value;(I.status!==w.UPLOADING||v)&&this.removeFile(I)}}catch(D){b.e(D)}finally{b.f()}return null}},{key:"resizeImage",value:function(v,b,N,I,D){var L=this;return this.createThumbnail(v,b,N,I,!0,function(z,W){if(W==null)return D(v);var U=L.options.resizeMimeType;U==null&&(U=v.type);var K=W.toDataURL(U,L.options.resizeQuality);return(U==="image/jpeg"||U==="image/jpg")&&(K=Ce.restore(v.dataURL,K)),D(w.dataURItoBlob(K))})}},{key:"createThumbnail",value:function(v,b,N,I,D,L){var z=this,W=new FileReader;W.onload=function(){if(v.dataURL=W.result,v.type==="image/svg+xml"){L!=null&&L(W.result);return}z.createThumbnailFromUrl(v,b,N,I,D,L)},W.readAsDataURL(v)}},{key:"displayExistingFile",value:function(v,b,N,I){var D=this,L=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;if(this.emit("addedfile",v),this.emit("complete",v),!L)this.emit("thumbnail",v,b),N&&N();else{var z=function(U){D.emit("thumbnail",v,U),N&&N()};v.dataURL=b,this.createThumbnailFromUrl(v,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,this.options.fixOrientation,z,I)}}},{key:"createThumbnailFromUrl",value:function(v,b,N,I,D,L,z){var W=this,U=document.createElement("img");return z&&(U.crossOrigin=z),D=getComputedStyle(document.body).imageOrientation=="from-image"?!1:D,U.onload=function(){var K=function(q){return q(1)};return typeof EXIF<"u"&&EXIF!==null&&D&&(K=function(q){return EXIF.getData(U,function(){return q(EXIF.getTag(this,"Orientation"))})}),K(function(G){v.width=U.width,v.height=U.height;var q=W.options.resize.call(W,v,b,N,I),ue=document.createElement("canvas"),ye=ue.getContext("2d");switch(ue.width=q.trgWidth,ue.height=q.trgHeight,G>4&&(ue.width=q.trgHeight,ue.height=q.trgWidth),G){case 2:ye.translate(ue.width,0),ye.scale(-1,1);break;case 3:ye.translate(ue.width,ue.height),ye.rotate(Math.PI);break;case 4:ye.translate(0,ue.height),ye.scale(1,-1);break;case 5:ye.rotate(.5*Math.PI),ye.scale(1,-1);break;case 6:ye.rotate(.5*Math.PI),ye.translate(0,-ue.width);break;case 7:ye.rotate(.5*Math.PI),ye.translate(ue.height,-ue.width),ye.scale(-1,1);break;case 8:ye.rotate(-.5*Math.PI),ye.translate(-ue.height,0);break}ke(ye,U,q.srcX!=null?q.srcX:0,q.srcY!=null?q.srcY:0,q.srcWidth,q.srcHeight,q.trgX!=null?q.trgX:0,q.trgY!=null?q.trgY:0,q.trgWidth,q.trgHeight);var Ie=ue.toDataURL("image/png");if(L!=null)return L(Ie,ue)})},L!=null&&(U.onerror=L),U.src=v.dataURL}},{key:"processQueue",value:function(){var v=this.options.parallelUploads,b=this.getUploadingFiles().length,N=b;if(!(b>=v)){var I=this.getQueuedFiles();if(I.length>0){if(this.options.uploadMultiple)return this.processFiles(I.slice(0,v-b));for(;N<v;){if(!I.length)return;this.processFile(I.shift()),N++}}}}},{key:"processFile",value:function(v){return this.processFiles([v])}},{key:"processFiles",value:function(v){var b=_(v,!0),N;try{for(b.s();!(N=b.n()).done;){var I=N.value;I.processing=!0,I.status=w.UPLOADING,this.emit("processing",I)}}catch(D){b.e(D)}finally{b.f()}return this.options.uploadMultiple&&this.emit("processingmultiple",v),this.uploadFiles(v)}},{key:"_getFilesWithXhr",value:function(v){return this.files.filter(function(b){return b.xhr===v}).map(function(b){return b})}},{key:"cancelUpload",value:function(v){if(v.status===w.UPLOADING){var b=this._getFilesWithXhr(v.xhr),N=_(b,!0),I;try{for(N.s();!(I=N.n()).done;){var D=I.value;D.status=w.CANCELED}}catch(U){N.e(U)}finally{N.f()}typeof v.xhr<"u"&&v.xhr.abort();var L=_(b,!0),z;try{for(L.s();!(z=L.n()).done;){var W=z.value;this.emit("canceled",W)}}catch(U){L.e(U)}finally{L.f()}this.options.uploadMultiple&&this.emit("canceledmultiple",b)}else(v.status===w.ADDED||v.status===w.QUEUED)&&(v.status=w.CANCELED,this.emit("canceled",v),this.options.uploadMultiple&&this.emit("canceledmultiple",[v]));if(this.options.autoProcessQueue)return this.processQueue()}},{key:"resolveOption",value:function(v){if(typeof v=="function"){for(var b=arguments.length,N=new Array(b>1?b-1:0),I=1;I<b;I++)N[I-1]=arguments[I];return v.apply(this,N)}return v}},{key:"uploadFile",value:function(v){return this.uploadFiles([v])}},{key:"uploadFiles",value:function(v){var b=this;this._transformFiles(v,function(N){if(b.options.chunking){var I=N[0];v[0].upload.chunked=b.options.chunking&&(b.options.forceChunking||I.size>b.options.chunkSize),v[0].upload.totalChunkCount=Math.ceil(I.size/b.options.chunkSize)}if(v[0].upload.chunked){var D=v[0],L=N[0];D.upload.chunks=[];var z=function(){for(var q=0;D.upload.chunks[q]!==void 0;)q++;if(!(q>=D.upload.totalChunkCount)){var ue=q*b.options.chunkSize,ye=Math.min(ue+b.options.chunkSize,L.size),Ie={name:b._getParamName(0),data:L.webkitSlice?L.webkitSlice(ue,ye):L.slice(ue,ye),filename:D.upload.filename,chunkIndex:q};D.upload.chunks[q]={file:D,index:q,dataBlock:Ie,status:w.UPLOADING,progress:0,retries:0},b._uploadData(v,[Ie])}};if(D.upload.finishedChunkUpload=function(G,q){var ue=!0;G.status=w.SUCCESS,G.dataBlock=null,G.xhr=null;for(var ye=0;ye<D.upload.totalChunkCount;ye++){if(D.upload.chunks[ye]===void 0)return z();D.upload.chunks[ye].status!==w.SUCCESS&&(ue=!1)}ue&&b.options.chunksUploaded(D,function(){b._finished(v,q,null)})},b.options.parallelChunkUploads)for(var W=0;W<D.upload.totalChunkCount;W++)z();else z()}else{for(var U=[],K=0;K<v.length;K++)U[K]={name:b._getParamName(K),data:N[K],filename:v[K].upload.filename};b._uploadData(v,U)}})}},{key:"_getChunk",value:function(v,b){for(var N=0;N<v.upload.totalChunkCount;N++)if(v.upload.chunks[N]!==void 0&&v.upload.chunks[N].xhr===b)return v.upload.chunks[N]}},{key:"_uploadData",value:function(v,b){var N=this,I=new XMLHttpRequest,D=_(v,!0),L;try{for(D.s();!(L=D.n()).done;){var z=L.value;z.xhr=I}}catch(le){D.e(le)}finally{D.f()}v[0].upload.chunked&&(v[0].upload.chunks[b[0].chunkIndex].xhr=I);var W=this.resolveOption(this.options.method,v),U=this.resolveOption(this.options.url,v);I.open(W,U,!0);var K=this.resolveOption(this.options.timeout,v);K&&(I.timeout=this.resolveOption(this.options.timeout,v)),I.withCredentials=!!this.options.withCredentials,I.onload=function(le){N._finishedUploading(v,I,le)},I.ontimeout=function(){N._handleUploadError(v,I,"Request timedout after ".concat(N.options.timeout/1e3," seconds"))},I.onerror=function(){N._handleUploadError(v,I)};var G=I.upload!=null?I.upload:I;G.onprogress=function(le){return N._updateFilesUploadProgress(v,I,le)};var q={Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"};this.options.headers&&w.extend(q,this.options.headers);for(var ue in q){var ye=q[ue];ye&&I.setRequestHeader(ue,ye)}var Ie=new FormData;if(this.options.params){var Ve=this.options.params;typeof Ve=="function"&&(Ve=Ve.call(this,v,I,v[0].upload.chunked?this._getChunk(v[0],I):null));for(var Fe in Ve){var De=Ve[Fe];if(Array.isArray(De))for(var Ye=0;Ye<De.length;Ye++)Ie.append(Fe,De[Ye]);else Ie.append(Fe,De)}}var Ct=_(v,!0),it;try{for(Ct.s();!(it=Ct.n()).done;){var Kn=it.value;this.emit("sending",Kn,I,Ie)}}catch(le){Ct.e(le)}finally{Ct.f()}this.options.uploadMultiple&&this.emit("sendingmultiple",v,I,Ie),this._addFormElementData(Ie);for(var J=0;J<b.length;J++){var ae=b[J];Ie.append(ae.name,ae.data,ae.filename)}this.submitRequest(I,Ie,v)}},{key:"_transformFiles",value:function(v,b){for(var N=this,I=[],D=0,L=function(U){N.options.transformFile.call(N,v[U],function(K){I[U]=K,++D===v.length&&b(I)})},z=0;z<v.length;z++)L(z)}},{key:"_addFormElementData",value:function(v){if(this.element.tagName==="FORM"){var b=_(this.element.querySelectorAll("input, textarea, select, button"),!0),N;try{for(b.s();!(N=b.n()).done;){var I=N.value,D=I.getAttribute("name"),L=I.getAttribute("type");if(L&&(L=L.toLowerCase()),!(typeof D>"u"||D===null))if(I.tagName==="SELECT"&&I.hasAttribute("multiple")){var z=_(I.options,!0),W;try{for(z.s();!(W=z.n()).done;){var U=W.value;U.selected&&v.append(D,U.value)}}catch(K){z.e(K)}finally{z.f()}}else(!L||L!=="checkbox"&&L!=="radio"||I.checked)&&v.append(D,I.value)}}catch(K){b.e(K)}finally{b.f()}}}},{key:"_updateFilesUploadProgress",value:function(v,b,N){if(v[0].upload.chunked){var z=v[0],W=this._getChunk(z,b);N?(W.progress=100*N.loaded/N.total,W.total=N.total,W.bytesSent=N.loaded):(W.progress=100,W.bytesSent=W.total),z.upload.progress=0,z.upload.total=0,z.upload.bytesSent=0;for(var U=0;U<z.upload.totalChunkCount;U++)z.upload.chunks[U]&&typeof z.upload.chunks[U].progress<"u"&&(z.upload.progress+=z.upload.chunks[U].progress,z.upload.total+=z.upload.chunks[U].total,z.upload.bytesSent+=z.upload.chunks[U].bytesSent);z.upload.progress=z.upload.progress/z.upload.totalChunkCount,this.emit("uploadprogress",z,z.upload.progress,z.upload.bytesSent)}else{var I=_(v,!0),D;try{for(I.s();!(D=I.n()).done;){var L=D.value;L.upload.total&&L.upload.bytesSent&&L.upload.bytesSent==L.upload.total||(N?(L.upload.progress=100*N.loaded/N.total,L.upload.total=N.total,L.upload.bytesSent=N.loaded):(L.upload.progress=100,L.upload.bytesSent=L.upload.total),this.emit("uploadprogress",L,L.upload.progress,L.upload.bytesSent))}}catch(K){I.e(K)}finally{I.f()}}}},{key:"_finishedUploading",value:function(v,b,N){var I;if(v[0].status!==w.CANCELED&&b.readyState===4){if(b.responseType!=="arraybuffer"&&b.responseType!=="blob"&&(I=b.responseText,b.getResponseHeader("content-type")&&~b.getResponseHeader("content-type").indexOf("application/json")))try{I=JSON.parse(I)}catch(D){N=D,I="Invalid JSON response from server."}this._updateFilesUploadProgress(v,b),200<=b.status&&b.status<300?v[0].upload.chunked?v[0].upload.finishedChunkUpload(this._getChunk(v[0],b),I):this._finished(v,I,N):this._handleUploadError(v,b,I)}}},{key:"_handleUploadError",value:function(v,b,N){if(v[0].status!==w.CANCELED){if(v[0].upload.chunked&&this.options.retryChunks){var I=this._getChunk(v[0],b);if(I.retries++<this.options.retryChunksLimit){this._uploadData(v,[I.dataBlock]);return}else console.warn("Retried this chunk too often. Giving up.")}this._errorProcessing(v,N||this.options.dictResponseError.replace("{{statusCode}}",b.status),b)}}},{key:"submitRequest",value:function(v,b,N){if(v.readyState!=1){console.warn("Cannot send this request because the XMLHttpRequest.readyState is not OPENED.");return}v.send(b)}},{key:"_finished",value:function(v,b,N){var I=_(v,!0),D;try{for(I.s();!(D=I.n()).done;){var L=D.value;L.status=w.SUCCESS,this.emit("success",L,b,N),this.emit("complete",L)}}catch(z){I.e(z)}finally{I.f()}if(this.options.uploadMultiple&&(this.emit("successmultiple",v,b,N),this.emit("completemultiple",v)),this.options.autoProcessQueue)return this.processQueue()}},{key:"_errorProcessing",value:function(v,b,N){var I=_(v,!0),D;try{for(I.s();!(D=I.n()).done;){var L=D.value;L.status=w.ERROR,this.emit("error",L,b,N),this.emit("complete",L)}}catch(z){I.e(z)}finally{I.f()}if(this.options.uploadMultiple&&(this.emit("errormultiple",v,b,N),this.emit("completemultiple",v)),this.options.autoProcessQueue)return this.processQueue()}}],[{key:"initClass",value:function(){this.prototype.Emitter=h,this.prototype.events=["drop","dragstart","dragend","dragenter","dragover","dragleave","addedfile","addedfiles","removedfile","thumbnail","error","errormultiple","processing","processingmultiple","uploadprogress","totaluploadprogress","sending","sendingmultiple","success","successmultiple","canceled","canceledmultiple","complete","completemultiple","reset","maxfilesexceeded","maxfilesreached","queuecomplete"],this.prototype._thumbnailQueue=[],this.prototype._processingThumbnail=!1}},{key:"extend",value:function(v){for(var b=arguments.length,N=new Array(b>1?b-1:0),I=1;I<b;I++)N[I-1]=arguments[I];for(var D=0,L=N;D<L.length;D++){var z=L[D];for(var W in z){var U=z[W];v[W]=U}}return v}},{key:"uuidv4",value:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(v){var b=Math.random()*16|0,N=v==="x"?b:b&3|8;return N.toString(16)})}}]),w}(h);j.initClass(),j.version="5.9.3",j.options={},j.optionsForElement=function(x){if(x.getAttribute("id"))return j.options[he(x.getAttribute("id"))]},j.instances=[],j.forElement=function(x){if(typeof x=="string"&&(x=document.querySelector(x)),(x!=null?x.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 x.dropzone},j.autoDiscover=!0,j.discover=function(){var x;if(document.querySelectorAll)x=document.querySelectorAll(".dropzone");else{x=[];var M=function(O){return function(){var v=[],b=_(O,!0),N;try{for(b.s();!(N=b.n()).done;){var I=N.value;/(^| )dropzone($| )/.test(I.className)?v.push(x.push(I)):v.push(void 0)}}catch(D){b.e(D)}finally{b.f()}return v}()};M(document.getElementsByTagName("div")),M(document.getElementsByTagName("form"))}return function(){var w=[],O=_(x,!0),v;try{for(O.s();!(v=O.n()).done;){var b=v.value;j.optionsForElement(b)!==!1?w.push(new j(b)):w.push(void 0)}}catch(N){O.e(N)}finally{O.f()}return w}()},j.blockedBrowsers=[/opera.*(Macintosh|Windows Phone).*version\/12/i],j.isBrowserSupported=function(){var x=!0;if(window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if(!("classList"in document.createElement("a")))x=!1;else{j.blacklistedBrowsers!==void 0&&(j.blockedBrowsers=j.blacklistedBrowsers);var M=_(j.blockedBrowsers,!0),w;try{for(M.s();!(w=M.n()).done;){var O=w.value;if(O.test(navigator.userAgent)){x=!1;continue}}}catch(v){M.e(v)}finally{M.f()}}else x=!1;return x},j.dataURItoBlob=function(x){for(var M=atob(x.split(",")[1]),w=x.split(",")[0].split(":")[1].split(";")[0],O=new ArrayBuffer(M.length),v=new Uint8Array(O),b=0,N=M.length,I=0<=N;I?b<=N:b>=N;I?b++:b--)v[b]=M.charCodeAt(b);return new Blob([O],{type:w})};var ce=function(M,w){return M.filter(function(O){return O!==w}).map(function(O){return O})},he=function(M){return M.replace(/[\-_](\w)/g,function(w){return w.charAt(1).toUpperCase()})};j.createElement=function(x){var M=document.createElement("div");return M.innerHTML=x,M.childNodes[0]},j.elementInside=function(x,M){if(x===M)return!0;for(;x=x.parentNode;)if(x===M)return!0;return!1},j.getElement=function(x,M){var w;if(typeof x=="string"?w=document.querySelector(x):x.nodeType!=null&&(w=x),w==null)throw new Error("Invalid `".concat(M,"` option provided. Please provide a CSS selector or a plain HTML element."));return w},j.getElements=function(x,M){var w,O;if(x instanceof Array){O=[];try{var v=_(x,!0),b;try{for(v.s();!(b=v.n()).done;)w=b.value,O.push(this.getElement(w,M))}catch(D){v.e(D)}finally{v.f()}}catch{O=null}}else if(typeof x=="string"){O=[];var N=_(document.querySelectorAll(x),!0),I;try{for(N.s();!(I=N.n()).done;)w=I.value,O.push(w)}catch(D){N.e(D)}finally{N.f()}}else x.nodeType!=null&&(O=[x]);if(O==null||!O.length)throw new Error("Invalid `".concat(M,"` option provided. Please provide a CSS selector, a plain HTML element or a list of those."));return O},j.confirm=function(x,M,w){if(window.confirm(x))return M();if(w!=null)return w()},j.isValidFile=function(x,M){if(!M)return!0;M=M.split(",");var w=x.type,O=w.replace(/\/.*$/,""),v=_(M,!0),b;try{for(v.s();!(b=v.n()).done;){var N=b.value;if(N=N.trim(),N.charAt(0)==="."){if(x.name.toLowerCase().indexOf(N.toLowerCase(),x.name.length-N.length)!==-1)return!0}else if(/\/\*$/.test(N)){if(O===N.replace(/\/.*$/,""))return!0}else if(w===N)return!0}}catch(I){v.e(I)}finally{v.f()}return!1},typeof jQuery<"u"&&jQuery!==null&&(jQuery.fn.dropzone=function(x){return this.each(function(){return new j(this,x)})}),j.ADDED="added",j.QUEUED="queued",j.ACCEPTED=j.QUEUED,j.UPLOADING="uploading",j.PROCESSING=j.UPLOADING,j.CANCELED="canceled",j.ERROR="error",j.SUCCESS="success";var be=function(M){M.naturalWidth;var w=M.naturalHeight,O=document.createElement("canvas");O.width=1,O.height=w;var v=O.getContext("2d");v.drawImage(M,0,0);for(var b=v.getImageData(1,0,1,w),N=b.data,I=0,D=w,L=w;L>I;){var z=N[(L-1)*4+3];z===0?D=L:I=L,L=D+I>>1}var W=L/w;return W===0?1:W},ke=function(M,w,O,v,b,N,I,D,L,z){var W=be(w);return M.drawImage(w,O,v,b,N,I,D,L,z/W)},Ce=function(){function x(){F(this,x)}return $(x,null,[{key:"initClass",value:function(){this.KEY_STR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}},{key:"encode64",value:function(w){for(var O="",v=void 0,b=void 0,N="",I=void 0,D=void 0,L=void 0,z="",W=0;v=w[W++],b=w[W++],N=w[W++],I=v>>2,D=(v&3)<<4|b>>4,L=(b&15)<<2|N>>6,z=N&63,isNaN(b)?L=z=64:isNaN(N)&&(z=64),O=O+this.KEY_STR.charAt(I)+this.KEY_STR.charAt(D)+this.KEY_STR.charAt(L)+this.KEY_STR.charAt(z),v=b=N="",I=D=L=z="",W<w.length;);return O}},{key:"restore",value:function(w,O){if(!w.match("data:image/jpeg;base64,"))return O;var v=this.decode64(w.replace("data:image/jpeg;base64,","")),b=this.slice2Segments(v),N=this.exifManipulation(O,b);return"data:image/jpeg;base64,".concat(this.encode64(N))}},{key:"exifManipulation",value:function(w,O){var v=this.getExifArray(O),b=this.insertExif(w,v),N=new Uint8Array(b);return N}},{key:"getExifArray",value:function(w){for(var O=void 0,v=0;v<w.length;){if(O=w[v],O[0]===255&O[1]===225)return O;v++}return[]}},{key:"insertExif",value:function(w,O){var v=w.replace("data:image/jpeg;base64,",""),b=this.decode64(v),N=b.indexOf(255,3),I=b.slice(0,N),D=b.slice(N),L=I;return L=L.concat(O),L=L.concat(D),L}},{key:"slice2Segments",value:function(w){for(var O=0,v=[];;){var b;if(w[O]===255&w[O+1]===218)break;if(w[O]===255&w[O+1]===216)O+=2;else{b=w[O+2]*256+w[O+3];var N=O+b+2,I=w.slice(O,N);v.push(I),O=N}if(O>w.length)break}return v}},{key:"decode64",value:function(w){var O=void 0,v=void 0,b="",N=void 0,I=void 0,D=void 0,L="",z=0,W=[],U=/[^A-Za-z0-9\+\/\=]/g;for(U.exec(w)&&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.`),w=w.replace(/[^A-Za-z0-9\+\/\=]/g,"");N=this.KEY_STR.indexOf(w.charAt(z++)),I=this.KEY_STR.indexOf(w.charAt(z++)),D=this.KEY_STR.indexOf(w.charAt(z++)),L=this.KEY_STR.indexOf(w.charAt(z++)),O=N<<2|I>>4,v=(I&15)<<4|D>>2,b=(D&3)<<6|L,W.push(O),D!==64&&W.push(v),L!==64&&W.push(b),O=v=b="",N=I=D=L="",z<w.length;);return W}}]),x}();Ce.initClass();var Oe=function(M,w){var O=!1,v=!0,b=M.document,N=b.documentElement,I=b.addEventListener?"addEventListener":"attachEvent",D=b.addEventListener?"removeEventListener":"detachEvent",L=b.addEventListener?"":"on",z=function U(K){if(!(K.type==="readystatechange"&&b.readyState!=="complete")&&((K.type==="load"?M:b)[D](L+K.type,U,!1),!O&&(O=!0)))return w.call(M,K.type||K)},W=function U(){try{N.doScroll("left")}catch{setTimeout(U,50);return}return z("poll")};if(b.readyState!=="complete"){if(b.createEventObject&&N.doScroll){try{v=!M.frameElement}catch{}v&&W()}return b[I](L+"DOMContentLoaded",z,!1),b[I](L+"readystatechange",z,!1),M[I](L+"load",z,!1)}};j._autoDiscoverFunction=function(){if(j.autoDiscover)return j.discover()},Oe(window,j._autoDiscoverFunction);function Ae(x,M){return typeof x<"u"&&x!==null?M(x):void 0}function Me(x,M,w){if(typeof x<"u"&&x!==null&&typeof x[M]=="function")return w(x,M)}window.Dropzone=j;var ve=j}(),i}()})})(Cu);var f2=Cu.exports;const Su=d2(f2),h2={class:"fallback"},p2=f.createElementVNode("input",{id:"file",type:"file",name:"file",multiple:""},null,-1),m2={for:"file"},g2={class:"dz-message","data-dz-message":""},y2={id:"bd-dropzone-theme",style:{display:"none"}},v2={class:"dz-preview dz-file-preview"},E2={class:"dz-details"},b2=f.createElementVNode("img",{"data-dz-thumbnail":"",class:"dz-image"},null,-1),C2=f.createElementVNode("div",{class:"dz-filename"},[f.createElementVNode("small",{"data-dz-name":""})],-1),S2=f.createElementVNode("div",{class:"dz-progress"},[f.createElementVNode("div",{class:"spinner-border text-primary spinner-border-sm",role:"status"},[f.createElementVNode("span",{class:"visually-hidden"},"Loading...")])],-1),w2={class:"dz-success-mark"},k2={class:"dz-error-message text-danger"},T2=f.createElementVNode("small",{"data-dz-errormessage":""},null,-1),wu=f.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=f.computed(()=>({variant:ni.PRIMARY,size:st.SM})),o=Jn(t,"modelValue",e);let i=null;Su.autoDiscover=!1,f.watch(()=>t.modelValue,()=>{s()}),f.onMounted(()=>{document.getElementById("dropzone")&&l()});const s=()=>{i&&(i.destroy(),l())},l=()=>{var p;i=new Su("#dropzone",{url:t.url,method:"post",acceptedFiles:t.acceptedFiles,addRemoveLinks:!1,maxFilesize:10,maxFiles:t.multiple?3:1,headers:{RequestVerificationToken:t.token},dictResponseError:t.errorMessage,dictFileTooBig:t.fileSizeExceededMessage,previewTemplate:(p=document.querySelector("#bd-dropzone-theme"))==null?void 0:p.innerHTML}),i.on("error",c),i.on("success",a),i.on("removedfile",d)},a=function(p,m){var g;o.value.push({UUID:(g=p.upload)==null?void 0:g.uuid,CorrelationId:m.CorrelationId,Naam:m.Naam}),u(p)},c=function(p){u(p)},u=function(p){const m=p.name;if(!(m.endsWith(".png")||m.endsWith(".jpg")||m.endsWith(".jpeg")||m.endsWith(".gif"))){const g=p.previewElement.getElementsByClassName("icon-file"),y=p.previewElement.getElementsByClassName("dz-image");g[0].classList.remove("d-none"),y[0].classList.add("d-none")}},d=function(p){const m=o.value.findIndex(g=>{var y,C;return((y=g.upload)==null?void 0:y.uuid)===((C=p.upload)==null?void 0:C.uuid)});m!==-1&&o.value.splice(m,1)},h=f.computed(()=>t.tag??"form");return(p,m)=>(f.openBlock(),f.createElementBlock(f.Fragment,null,[(f.openBlock(),f.createBlock(f.resolveDynamicComponent(h.value),{id:"dropzone",class:"dropzone bd-dropzone",enctype:"multipart/form-data"},{default:f.withCtx(()=>[f.createElementVNode("div",h2,[p2,f.createTextVNode(" test "),f.createElementVNode("label",m2,[f.createVNode(f.unref(Yn)),f.createTextVNode(" "+f.toDisplayString(t.buttonText),1)])]),f.createElementVNode("div",g2,[f.createVNode(f.unref(pt),f.normalizeProps(f.guardReactiveProps(r.value)),{default:f.withCtx(()=>[f.createVNode(f.unref(Yn)),f.createTextVNode(" "+f.toDisplayString(t.buttonText),1)]),_:1},16)])]),_:1})),f.createElementVNode("div",y2,[f.createElementVNode("div",v2,[f.createElementVNode("div",E2,[b2,f.createVNode(f.unref(ia),{"data-dz-thumbnail":"",class:"d-none"}),C2,f.createVNode(f.unref(pt),{class:"dz-remove",alt:"Click me to remove the file.","data-dz-remove":""},{default:f.withCtx(()=>[f.createVNode(f.unref(ao))]),_:1})]),S2,f.createElementVNode("div",w2,[f.createVNode(f.unref(so))]),f.createElementVNode("div",k2,[f.createVNode(f.unref(qo)),T2])])])],64))}});function Qe(n){this.content=n}Qe.prototype={constructor:Qe,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 Qe(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 Qe(t)},addToStart:function(n,e){return new Qe([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new Qe(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 Qe(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=Qe.from(n),n.size?new Qe(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=Qe.from(n),n.size?new Qe(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=Qe.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}},Qe.from=function(n){if(n instanceof Qe)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new Qe(e)};function ku(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=ku(o.content,i.content,t+1);if(s!=null)return s}t+=o.nodeSize}}function Tu(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=Tu(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 ku(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return Tu(this,e,t,r)}findIndex(e,t=-1){if(e==0)return ai(0,e);if(e==this.size)return ai(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?ai(r+1,s):ai(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 Ea={index:0,offset:0};function ai(n,e){return Ea.index=n,Ea.offset=e,Ea}function li(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(!li(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!li(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let Pe=class $c{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&&li(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 $c.none;if(e instanceof $c)return[e];let t=e.slice();return t.sort((r,o)=>r.type.rank-o.type.rank),t}};Pe.none=[];class ci extends Error{}class pe{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=xu(this.content,e+this.openStart,t);return r&&new pe(r,this.openStart,this.openEnd)}removeBetween(e,t){return new pe(Au(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 pe.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 pe(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 pe(e,r,o)}}pe.empty=new pe(ie.empty,0,0);function Au(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(Au(i.content,e-o-1,t-o-1)))}function xu(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=xu(s.content,e-i-1,t);return l&&n.replaceChild(o,s.copy(l))}function A2(n,e,t){if(t.openStart>n.depth)throw new ci("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new ci("Inconsistent open depths");return Ou(n,e,t,0)}function Ou(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=Ou(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 Qn(s,l.cut(0,n.parentOffset).append(t.content).append(l.cut(e.parentOffset)))}else{let{start:s,end:l}=x2(t,n);return Qn(i,Nu(n,s,l,e,r))}else return Qn(i,ui(n,e,r))}function Mu(n,e){if(!e.type.compatibleContent(n.type))throw new ci("Cannot join "+e.type.name+" onto "+n.type.name)}function ba(n,e,t){let r=n.node(t);return Mu(r,e.node(t)),r}function Xn(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 fo(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&&(Xn(n.nodeAfter,r),i++));for(let l=i;l<s;l++)Xn(o.child(l),r);e&&e.depth==t&&e.textOffset&&Xn(e.nodeBefore,r)}function Qn(n,e){return n.type.checkContent(e),n.copy(e)}function Nu(n,e,t,r,o){let i=n.depth>o&&ba(n,e,o+1),s=r.depth>o&&ba(t,r,o+1),l=[];return fo(null,n,o,l),i&&s&&e.index(o)==t.index(o)?(Mu(i,s),Xn(Qn(i,Nu(n,e,t,r,o+1)),l)):(i&&Xn(Qn(i,ui(n,e,o+1)),l),fo(e,t,o,l),s&&Xn(Qn(s,ui(t,r,o+1)),l)),fo(r,null,o,l),new ie(l)}function ui(n,e,t){let r=[];if(fo(null,n,t,r),n.depth>t){let o=ba(n,e,t+1);Xn(Qn(o,ui(n,e,t+1)),r)}return fo(e,null,t,r),new ie(r)}function x2(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 ho{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 Pe.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 di(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 ho(t,r,i)}static resolveCached(e,t){for(let o=0;o<Ca.length;o++){let i=Ca[o];if(i.pos==t&&i.doc==e)return i}let r=Ca[Sa]=ho.resolve(e,t);return Sa=(Sa+1)%O2,r}}let Ca=[],Sa=0,O2=12;class di{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 M2=Object.create(null);let qn=class Fc{constructor(e,t,r,o=Pe.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&&li(this.attrs,t||e.defaultAttrs||M2)&&Pe.sameSet(this.marks,r||Pe.none)}copy(e=null){return e==this.content?this:new Fc(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Fc(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 pe.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 pe(c,o.depth-s,i.depth-s)}replace(e,t,r){return A2(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 ho.resolveCached(this,e)}resolveNoCache(e){return ho.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()+")"),Iu(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=Pe.none;for(let t=0;t<this.marks.length;t++)e=this.marks[t].addToSet(e);if(!Pe.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r=null;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let o=ie.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,o,r)}};qn.prototype.text=void 0;class fi extends qn{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):Iu(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 fi(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new fi(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 Iu(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class er{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new N2(e,t);if(r.next==null)return er.empty;let o=_u(r);r.next&&r.err("Unexpected trailing text");let i=P2(B2(o));return $2(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 h=i(d,l.concat(u));if(h)return h}}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.`),w=w.replace(/[^A-Za-z0-9\+\/\=]/g,"");N=this.KEY_STR.indexOf(w.charAt(z++)),I=this.KEY_STR.indexOf(w.charAt(z++)),D=this.KEY_STR.indexOf(w.charAt(z++)),L=this.KEY_STR.indexOf(w.charAt(z++)),O=N<<2|I>>4,v=(I&15)<<4|D>>2,b=(D&3)<<6|L,W.push(O),D!==64&&W.push(v),L!==64&&W.push(b),O=v=b="",N=I=D=L="",z<w.length;);return W}}]),x}();Ce.initClass();var Oe=function(M,w){var O=!1,v=!0,b=M.document,N=b.documentElement,I=b.addEventListener?"addEventListener":"attachEvent",D=b.addEventListener?"removeEventListener":"detachEvent",L=b.addEventListener?"":"on",z=function U(K){if(!(K.type==="readystatechange"&&b.readyState!=="complete")&&((K.type==="load"?M:b)[D](L+K.type,U,!1),!O&&(O=!0)))return w.call(M,K.type||K)},W=function U(){try{N.doScroll("left")}catch{setTimeout(U,50);return}return z("poll")};if(b.readyState!=="complete"){if(b.createEventObject&&N.doScroll){try{v=!M.frameElement}catch{}v&&W()}return b[I](L+"DOMContentLoaded",z,!1),b[I](L+"readystatechange",z,!1),M[I](L+"load",z,!1)}};j._autoDiscoverFunction=function(){if(j.autoDiscover)return j.discover()},Oe(window,j._autoDiscoverFunction);function Ae(x,M){return typeof x<"u"&&x!==null?M(x):void 0}function Me(x,M,w){if(typeof x<"u"&&x!==null&&typeof x[M]=="function")return w(x,M)}window.Dropzone=j;var ve=j}(),i}()})})(Cu);var f2=Cu.exports;const Su=d2(f2),h2={class:"fallback"},p2=f.createElementVNode("input",{id:"file",type:"file",name:"file",multiple:""},null,-1),m2={for:"file"},g2={class:"dz-message","data-dz-message":""},y2={id:"bd-dropzone-theme",style:{display:"none"}},v2={class:"dz-preview dz-file-preview"},E2={class:"dz-details"},b2=f.createElementVNode("img",{"data-dz-thumbnail":"",class:"dz-image"},null,-1),C2=f.createElementVNode("div",{class:"dz-filename"},[f.createElementVNode("small",{"data-dz-name":""})],-1),S2=f.createElementVNode("div",{class:"dz-progress"},[f.createElementVNode("div",{class:"spinner-border text-primary spinner-border-sm",role:"status"},[f.createElementVNode("span",{class:"visually-hidden"},"Loading...")])],-1),w2={class:"dz-success-mark"},k2={class:"dz-error-message text-danger"},T2=f.createElementVNode("small",{"data-dz-errormessage":""},null,-1),wu=f.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=f.computed(()=>({variant:ni.PRIMARY,size:st.SM})),o=Jn(t,"modelValue",e);let i=null;Su.autoDiscover=!1,f.watch(()=>t.modelValue,()=>{s()}),f.onMounted(()=>{document.getElementById("dropzone")&&l()});const s=()=>{i&&(i.destroy(),l())},l=()=>{var p;i=new Su("#dropzone",{url:t.url,method:"post",acceptedFiles:t.acceptedFiles,addRemoveLinks:!1,maxFilesize:10,maxFiles:t.multiple?3:1,headers:{RequestVerificationToken:t.token},dictResponseError:t.errorMessage,dictFileTooBig:t.fileSizeExceededMessage,previewTemplate:(p=document.querySelector("#bd-dropzone-theme"))==null?void 0:p.innerHTML}),i.on("error",c),i.on("success",a),i.on("removedfile",d)},a=function(p,m){var g;o.value.push({UUID:(g=p.upload)==null?void 0:g.uuid,CorrelationId:m.CorrelationId,Naam:m.Naam}),u(p)},c=function(p){u(p)},u=function(p){const m=p.name;if(!(m.endsWith(".png")||m.endsWith(".jpg")||m.endsWith(".jpeg")||m.endsWith(".gif"))){const g=p.previewElement.getElementsByClassName("icon-file"),y=p.previewElement.getElementsByClassName("dz-image");g[0].classList.remove("d-none"),y[0].classList.add("d-none")}},d=function(p){const m=o.value.findIndex(g=>{var y;return(g==null?void 0:g.UUID)===((y=p.upload)==null?void 0:y.uuid)});m!==-1&&o.value.splice(m,1)},h=f.computed(()=>t.tag??"form");return(p,m)=>(f.openBlock(),f.createElementBlock(f.Fragment,null,[(f.openBlock(),f.createBlock(f.resolveDynamicComponent(h.value),{id:"dropzone",class:"dropzone bd-dropzone",enctype:"multipart/form-data"},{default:f.withCtx(()=>[f.createElementVNode("div",h2,[p2,f.createTextVNode(" test "),f.createElementVNode("label",m2,[f.createVNode(f.unref(Yn)),f.createTextVNode(" "+f.toDisplayString(t.buttonText),1)])]),f.createElementVNode("div",g2,[f.createVNode(f.unref(pt),f.normalizeProps(f.guardReactiveProps(r.value)),{default:f.withCtx(()=>[f.createVNode(f.unref(Yn)),f.createTextVNode(" "+f.toDisplayString(t.buttonText),1)]),_:1},16)])]),_:1})),f.createElementVNode("div",y2,[f.createElementVNode("div",v2,[f.createElementVNode("div",E2,[b2,f.createVNode(f.unref(ia),{"data-dz-thumbnail":"",class:"d-none"}),C2,f.createVNode(f.unref(pt),{class:"dz-remove",alt:"Click me to remove the file.","data-dz-remove":""},{default:f.withCtx(()=>[f.createVNode(f.unref(ao))]),_:1})]),S2,f.createElementVNode("div",w2,[f.createVNode(f.unref(so))]),f.createElementVNode("div",k2,[f.createVNode(f.unref(qo)),T2])])])],64))}});function Qe(n){this.content=n}Qe.prototype={constructor:Qe,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 Qe(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 Qe(t)},addToStart:function(n,e){return new Qe([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new Qe(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 Qe(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=Qe.from(n),n.size?new Qe(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=Qe.from(n),n.size?new Qe(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=Qe.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}},Qe.from=function(n){if(n instanceof Qe)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new Qe(e)};function ku(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=ku(o.content,i.content,t+1);if(s!=null)return s}t+=o.nodeSize}}function Tu(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=Tu(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 ku(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return Tu(this,e,t,r)}findIndex(e,t=-1){if(e==0)return ai(0,e);if(e==this.size)return ai(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?ai(r+1,s):ai(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 Ea={index:0,offset:0};function ai(n,e){return Ea.index=n,Ea.offset=e,Ea}function li(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(!li(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!li(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let Pe=class $c{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&&li(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 $c.none;if(e instanceof $c)return[e];let t=e.slice();return t.sort((r,o)=>r.type.rank-o.type.rank),t}};Pe.none=[];class ci extends Error{}class pe{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=xu(this.content,e+this.openStart,t);return r&&new pe(r,this.openStart,this.openEnd)}removeBetween(e,t){return new pe(Au(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 pe.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 pe(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 pe(e,r,o)}}pe.empty=new pe(ie.empty,0,0);function Au(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(Au(i.content,e-o-1,t-o-1)))}function xu(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=xu(s.content,e-i-1,t);return l&&n.replaceChild(o,s.copy(l))}function A2(n,e,t){if(t.openStart>n.depth)throw new ci("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new ci("Inconsistent open depths");return Ou(n,e,t,0)}function Ou(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=Ou(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 Qn(s,l.cut(0,n.parentOffset).append(t.content).append(l.cut(e.parentOffset)))}else{let{start:s,end:l}=x2(t,n);return Qn(i,Nu(n,s,l,e,r))}else return Qn(i,ui(n,e,r))}function Mu(n,e){if(!e.type.compatibleContent(n.type))throw new ci("Cannot join "+e.type.name+" onto "+n.type.name)}function ba(n,e,t){let r=n.node(t);return Mu(r,e.node(t)),r}function Xn(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 fo(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&&(Xn(n.nodeAfter,r),i++));for(let l=i;l<s;l++)Xn(o.child(l),r);e&&e.depth==t&&e.textOffset&&Xn(e.nodeBefore,r)}function Qn(n,e){return n.type.checkContent(e),n.copy(e)}function Nu(n,e,t,r,o){let i=n.depth>o&&ba(n,e,o+1),s=r.depth>o&&ba(t,r,o+1),l=[];return fo(null,n,o,l),i&&s&&e.index(o)==t.index(o)?(Mu(i,s),Xn(Qn(i,Nu(n,e,t,r,o+1)),l)):(i&&Xn(Qn(i,ui(n,e,o+1)),l),fo(e,t,o,l),s&&Xn(Qn(s,ui(t,r,o+1)),l)),fo(r,null,o,l),new ie(l)}function ui(n,e,t){let r=[];if(fo(null,n,t,r),n.depth>t){let o=ba(n,e,t+1);Xn(Qn(o,ui(n,e,t+1)),r)}return fo(e,null,t,r),new ie(r)}function x2(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 ho{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 Pe.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 di(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 ho(t,r,i)}static resolveCached(e,t){for(let o=0;o<Ca.length;o++){let i=Ca[o];if(i.pos==t&&i.doc==e)return i}let r=Ca[Sa]=ho.resolve(e,t);return Sa=(Sa+1)%O2,r}}let Ca=[],Sa=0,O2=12;class di{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 M2=Object.create(null);let qn=class Fc{constructor(e,t,r,o=Pe.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&&li(this.attrs,t||e.defaultAttrs||M2)&&Pe.sameSet(this.marks,r||Pe.none)}copy(e=null){return e==this.content?this:new Fc(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Fc(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 pe.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 pe(c,o.depth-s,i.depth-s)}replace(e,t,r){return A2(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 ho.resolveCached(this,e)}resolveNoCache(e){return ho.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()+")"),Iu(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=Pe.none;for(let t=0;t<this.marks.length;t++)e=this.marks[t].addToSet(e);if(!Pe.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r=null;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let o=ie.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,o,r)}};qn.prototype.text=void 0;class fi extends qn{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):Iu(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 fi(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new fi(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 Iu(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class er{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new N2(e,t);if(r.next==null)return er.empty;let o=_u(r);r.next&&r.err("Unexpected trailing text");let i=P2(B2(o));return $2(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 h=i(d,l.concat(u));if(h)return h}}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
|
`)}}er.empty=new er(!0);class N2{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 _u(n){let e=[];do e.push(I2(n));while(n.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function I2(n){let e=[];do e.push(_2(n));while(n.next&&n.next!=")"&&n.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function _2(n){let e=R2(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=D2(n,e);else break;return e}function Du(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let e=Number(n.next);return n.pos++,e}function D2(n,e){let t=Du(n),r=t;return n.eat(",")&&(n.next!="}"?r=Du(n):r=-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:t,max:r,expr:e}}function L2(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 R2(n){if(n.eat("(")){let e=_u(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=L2(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 B2(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 Lu(n,e){return e-n}function Ru(n,e){let t=[];return r(e),t.sort(Lu);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 P2(n){let e=Object.create(null);return t(Ru(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]);Ru(n,a).forEach(u=>{c||o.push([l,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let i=e[r.join(",")]=new er(r.indexOf(n.length-1)>-1);for(let s=0;s<o.length;s++){let l=o[s][1].sort(Lu);i.next.push({type:o[s][0],next:e[l.join(",")]||t(l)})}return i}}function $2(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 Bu(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 Pu(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 $u(n){let e=Object.create(null);if(n)for(let t in n)e[t]=new F2(n[t]);return e}let Fu=class Um{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=$u(r.attrs),this.defaultAttrs=Bu(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==er.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:Pu(this.attrs,e)}create(e=null,t,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new qn(this,this.computeAttrs(e),ie.from(t),Pe.setFrom(r))}createChecked(e=null,t,r){return t=ie.from(t),this.checkContent(t),new qn(this,this.computeAttrs(e),t,Pe.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 qn(this,e,t.append(i),Pe.setFrom(r)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let t;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?t&&t.push(e[r]):t||(t=e.slice(0,r));return t?t.length?t:Pe.none:e}static compile(e,t){let r=Object.create(null);e.forEach((i,s)=>r[i]=new Um(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 F2{constructor(e){this.hasDefault=Object.prototype.hasOwnProperty.call(e,"default"),this.default=e.default}get isRequired(){return!this.hasDefault}}class hi{constructor(e,t,r,o){this.name=e,this.rank=t,this.schema=r,this.spec=o,this.attrs=$u(o.attrs),this.excluded=null;let i=Bu(this.attrs);this.instance=i?new Pe(this,i):null}create(e=null){return!e&&this.instance?this.instance:new Pe(this,Pu(this.attrs,e))}static compile(e,t){let r=Object.create(null),o=0;return e.forEach((i,s)=>r[i]=new hi(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 V2{constructor(e){this.cached=Object.create(null);let t=this.spec={};for(let o in e)t[o]=e[o];t.nodes=Qe.from(e.nodes),t.marks=Qe.from(e.marks||{}),this.nodes=Fu.compile(this.spec.nodes,this),this.marks=hi.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]=er.parse(s,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.markSet=l=="_"?null:l?Vu(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==""?[]:Vu(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 Fu){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 fi(r,r.defaultAttrs,e,Pe.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeFromJSON(e){return qn.fromJSON(this,e)}markFromJSON(e){return Pe.fromJSON(this,e)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function Vu(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 wr{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 ju(this,t,!1);return r.addAll(e,t.from,t.to),r.finish()}parseSlice(e,t={}){let r=new ju(this,t,!0);return r.addAll(e,t.from,t.to),pe.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(U2(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=Wu(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=Wu(s)),s.node||s.ignore||s.mark||(s.node=o)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new wr(e,wr.schemaRules(e)))}}const zu={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},z2={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Hu={ol:!0,ul:!0},pi=1,mi=2,po=4;function Uu(n,e,t){return e!=null?(e?pi:0)|(e==="full"?mi:0):n&&n.whitespace=="pre"?pi|mi:t&~po}class gi{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=Pe.none,this.stashMarks=[],this.match=s||(l&po?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&pi)){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):W2(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&&!zu.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class ju{constructor(e,t,r){this.parser=e,this.options=t,this.isOpen=r,this.open=0;let o=t.topNode,i,s=Uu(null,t.preserveWhitespace,0)|(r?po:0);o?i=new gi(o.type,o.attrs,Pe.none,Pe.none,!0,t.topMatch||o.type.contentMatch,s):r?i=new gi(null,null,Pe.none,Pe.none,!0,null,s):i=new gi(e.schema.topNodeType,null,Pe.none,Pe.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(j2(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&mi||r.inlineContext(e)||/[^ \t\r\n\u000c]/.test(t)){if(r.options&pi)r.options&mi?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;Hu.hasOwnProperty(r)&&this.parser.normalizeLists&&H2(e);let i=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(o=this.parser.matchTag(e,this,t));if(i?i.ignore:z2.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(zu.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=Pe.none,r=Pe.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=Uu(e,o,i.options);i.options&po&&i.content.length==0&&(s|=po),this.nodes.push(new gi(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=K2(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 H2(n){for(let e=n.firstChild,t=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&Hu.hasOwnProperty(r)&&t?(t.appendChild(e),e=t):r=="li"?t=e:r&&(t=null)}}function U2(n,e){return(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,e)}function j2(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 Wu(n){let e={};for(let t in n)e[t]=n[t];return e}function W2(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 K2(n,e){for(let t=0;t<e.length;t++)if(n.eq(e[t]))return e[t]}class Jt{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},r){r||(r=wa(t).createDocumentFragment());let o=r,i=[];return e.forEach(s=>{if(i.length||s.marks.length){let l=0,a=0;for(;l<i.length&&a<s.marks.length;){let c=s.marks[a];if(!this.marks[c.type.name]){a++;continue}if(!c.eq(i[l][0])||c.type.spec.spanning===!1)break;l++,a++}for(;l<i.length;)o=i.pop()[1];for(;a<s.marks.length;){let c=s.marks[a++],u=this.serializeMark(c,s.isInline,t);u&&(i.push([c,o]),o.appendChild(u.dom),o=u.contentDOM||u.dom)}}o.appendChild(this.serializeNodeInner(s,t))}),r}serializeNodeInner(e,t){let{dom:r,contentDOM:o}=Jt.renderSpec(wa(t),this.nodes[e.type.name](e));if(o){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,o)}return r}serializeNode(e,t={}){let r=this.serializeNodeInner(e,t);for(let o=e.marks.length-1;o>=0;o--){let i=this.serializeMark(e.marks[o],e.isInline,t);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(e,t,r={}){let o=this.marks[e.type.name];return o&&Jt.renderSpec(wa(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:h,contentDOM:p}=Jt.renderSpec(e,d,r);if(l.appendChild(h),p){if(s)throw new RangeError("Multiple content holes");s=p}}}return{dom:l,contentDOM:s}}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Jt(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=Ku(e.nodes);return t.text||(t.text=r=>r.text),t}static marksFromSchema(e){return Ku(e.marks)}}function Ku(n){let e={};for(let t in n){let r=n[t].spec.toDOM;r&&(e[t]=r)}return e}function wa(n){return n.document||window.document}const Gu=65535,Yu=Math.pow(2,16);function G2(n,e){return n+e*Yu}function Ju(n){return n&Gu}function Y2(n){return(n-(n&Gu))/Yu}const Zu=1,Xu=2,yi=4,Qu=8;class ka{constructor(e,t,r){this.pos=e,this.delInfo=t,this.recover=r}get deleted(){return(this.delInfo&Qu)>0}get deletedBefore(){return(this.delInfo&(Zu|yi))>0}get deletedAfter(){return(this.delInfo&(Xu|yi))>0}get deletedAcross(){return(this.delInfo&yi)>0}}class St{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&St.empty)return St.empty}recover(e){let t=0,r=Ju(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+Y2(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 h=c?e==a?-1:e==d?1:t:t,p=a+o+(h<0?0:u);if(r)return p;let m=e==(t<0?a:d)?null:G2(l/3,e-a),g=e==a?Xu:e==d?Zu:yi;return(t<0?e!=a:e!=d)&&(g|=Qu),new ka(p,g,m)}o+=u-c}return r?e+o:new ka(e+o,0,null)}touches(e,t){let r=0,o=Ju(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 St(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?St.empty:new St(e<0?[0,-e,0]:[0,0,e])}}St.empty=new St([]);class mo{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 mo(this.maps,this.mirror,e,t)}copy(){return new mo(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 mo;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 ka(e,o,null)}}const Ta=Object.create(null);class nt{getMap(){return St.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=Ta[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 Ta)throw new RangeError("Duplicate use of step JSON ID "+e);return Ta[e]=t,t.prototype.jsonID=e,t}}class We{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new We(e,null)}static fail(e){return new We(null,e)}static fromReplace(e,t,r,o){try{return We.ok(e.replace(t,r,o))}catch(i){if(i instanceof ci)return We.fail(i.message);throw i}}}function Aa(n,e,t){let r=[];for(let o=0;o<n.childCount;o++){let i=n.child(o);i.content.size&&(i=i.copy(Aa(i.content,e,i))),i.isInline&&(i=e(i,t,o)),r.push(i)}return ie.fromArray(r)}class Sn 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 pe(Aa(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 We.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 Sn(t.pos,r.pos,this.mark)}merge(e){return e instanceof Sn&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Sn(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 Sn(t.from,t.to,e.markFromJSON(t.mark))}}nt.jsonID("addMark",Sn);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 pe(Aa(t.content,o=>o.mark(this.mark.removeFromSet(o.marks)),e),t.openStart,t.openEnd);return We.fromReplace(e,this.from,this.to,r)}invert(){return new Sn(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 wn extends nt{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return We.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return We.fromReplace(e,this.pos,this.pos+1,new pe(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 wn(this.pos,t.marks[o]);return new wn(this.pos,this.mark)}}return new kr(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new wn(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 wn(t.pos,e.markFromJSON(t.mark))}}nt.jsonID("addNodeMark",wn);class kr extends nt{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return We.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return We.fromReplace(e,this.pos,this.pos+1,new pe(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 wn(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new kr(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 kr(t.pos,e.markFromJSON(t.mark))}}nt.jsonID("removeNodeMark",kr);class qe 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&&xa(e,this.from,this.to)?We.fail("Structure replace would overwrite content"):We.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new St([this.from,this.to-this.from,this.slice.size])}invert(e){return new qe(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deletedAcross&&r.deletedAcross?null:new qe(t.pos,Math.max(t.pos,r.pos),this.slice)}merge(e){if(!(e instanceof qe)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let t=this.slice.size+e.slice.size==0?pe.empty:new pe(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new qe(this.from,this.to+(e.to-e.from),t,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let t=this.slice.size+e.slice.size==0?pe.empty:new pe(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new qe(e.from,this.to,t,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new qe(t.from,t.to,pe.fromJSON(e,t.slice),!!t.structure)}}nt.jsonID("replace",qe);class Je extends nt{constructor(e,t,r,o,i,s,l=!1){super(),this.from=e,this.to=t,this.gapFrom=r,this.gapTo=o,this.slice=i,this.insert=s,this.structure=l}apply(e){if(this.structure&&(xa(e,this.from,this.gapFrom)||xa(e,this.gapTo,this.to)))return We.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return We.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,t.content);return r?We.fromReplace(e,this.from,this.to,r):We.fail("Content does not fit in gap")}getMap(){return new St([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new Je(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),o=e.map(this.gapFrom,-1),i=e.map(this.gapTo,1);return t.deletedAcross&&r.deletedAcross||o<t.pos||i>r.pos?null:new Je(t.pos,r.pos,o,i,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Je(t.from,t.to,t.gapFrom,t.gapTo,pe.fromJSON(e,t.slice),t.insert,!!t.structure)}}nt.jsonID("replaceAround",Je);function xa(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 J2(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 h=Math.max(c,e),p=Math.min(c+a.nodeSize,t),m=r.addToSet(d);for(let g=0;g<d.length;g++)d[g].isInSet(m)||(s&&s.to==h&&s.mark.eq(d[g])?s.to=p:o.push(s=new Zt(h,p,d[g])));l&&l.to==h?l.to=p:i.push(l=new Sn(h,p,r))}}),o.forEach(a=>n.step(a)),i.forEach(a=>n.step(a))}function Z2(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 hi){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],h;for(let p=0;p<o.length;p++){let m=o[p];m.step==i-1&&d.eq(o[p].style)&&(h=m)}h?(h.to=c,h.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 X2(n,e,t,r=t.contentMatch){let o=n.doc.nodeAt(e),i=[],s=e+1;for(let l=0;l<o.childCount;l++){let a=o.child(l),c=s+a.nodeSize,u=r.matchType(a.type);if(!u)i.push(new qe(s,c,pe.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,h=/\r?\n|\r/g,p;for(;d=h.exec(a.text);)p||(p=new pe(ie.from(t.schema.text(" ",t.allowedMarks(a.marks))),0,0)),i.push(new qe(s+d.index,s+d.index+d[0].length,p))}}s=c}if(!r.validEnd){let l=r.fillBefore(ie.empty,!0);n.replace(s,s,new pe(l,0,0))}for(let l=i.length-1;l>=0;l--)n.step(i[l])}function Q2(n,e,t){return(e==0||n.canReplace(e,n.childCount))&&(t==n.childCount||n.canReplace(0,t))}function Tr(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||!Q2(o,i,s))break}return null}function q2(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 m=i,g=!1;m>t;m--)g||r.index(m)>0?(g=!0,u=ie.from(r.node(m).copy(u)),d++):a--;let h=ie.empty,p=0;for(let m=i,g=!1;m>t;m--)g||o.after(m+1)<o.end(m)?(g=!0,h=ie.from(o.node(m).copy(h)),p++):c++;n.step(new Je(a,c,s,l,new pe(u.append(h),d,p),u.size-d,!0))}function Oa(n,e,t=null,r=n){let o=ey(n,e),i=o&&ty(r,e);return i?o.map(qu).concat({type:e,attrs:t}).concat(i.map(qu)):null}function qu(n){return{type:n,attrs:null}}function ey(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 ty(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 ny(n,e,t){let r=ie.empty;for(let s=t.length-1;s>=0;s--){if(r.size){let l=t[s].type.contentMatch.matchFragment(r);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=ie.from(t[s].type.create(t[s].attrs,r))}let o=e.start,i=e.end;n.step(new Je(o,i,o,i,new pe(r,0,0),t.length,!0))}function ry(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)&&oy(n.doc,n.mapping.slice(i).map(l),r)){n.clearIncompatible(n.mapping.slice(i).map(l,1),r);let a=n.mapping.slice(i),c=a.map(l,1),u=a.map(l+s.nodeSize,1);return n.step(new Je(c,u,c+1,u-1,new pe(ie.from(r.create(o,null,s.marks)),0,0),1,!0)),!1}})}function oy(n,e,t){let r=n.resolve(e),o=r.index();return r.parent.canReplaceWith(o,o+1,t)}function iy(n,e,t,r,o){let i=n.doc.nodeAt(e);if(!i)throw new RangeError("No node at given position");t||(t=i.type);let s=t.create(r,null,o||i.marks);if(i.isLeaf)return n.replaceWith(e,e+i.nodeSize,s);if(!t.validContent(i.content))throw new RangeError("Invalid content for node type "+t.name);n.step(new Je(e,e+i.nodeSize,e+1,e+i.nodeSize-1,new pe(ie.from(s),0,0),1,!0))}function Ar(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),h=o.index(c);if(d.type.spec.isolating)return!1;let p=d.content.cutByIndex(h,d.childCount),m=r&&r[u+1];m&&(p=p.replaceChild(0,m.type.create(m.attrs)));let g=r&&r[u]||d;if(!d.canReplace(h+1,d.childCount)||!g.type.validContent(p))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 sy(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 qe(e,e,new pe(i.append(s),t,t),!0))}function kn(n,e){let t=n.resolve(e),r=t.index();return ed(t.nodeBefore,t.nodeAfter)&&t.parent.canReplace(r,r+1)}function ed(n,e){return!!(n&&e&&!n.isLeaf&&n.canAppend(e))}function vi(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&&ed(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 ay(n,e,t){let r=new qe(e-t,e+t,pe.empty,!0);n.step(r)}function ly(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 cy(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 Ma(n,e,t=e,r=pe.empty){if(e==t&&!r.size)return null;let o=n.resolve(e),i=n.resolve(t);return td(o,i,r)?new qe(e,t,r):new uy(o,i,r).fit()}function td(n,e,t){return!t.openStart&&!t.openEnd&&n.start()==e.start()&&n.parent.canReplace(n.index(),e.index(),t.content)}class uy{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 pe(i,s,l);return e>-1?new Je(r.pos,e,this.$to.pos,this.$to.end(),a,t):a.size||r.pos!=this.$to.pos?new qe(r.pos,o.pos,a):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,r=0,o=this.unplaced.openEnd;r<e;r++){let i=t.firstChild;if(t.childCount>1&&(o=0),i.type.spec.isolating&&o<=r){e=r;break}t=i.content}for(let t=1;t<=2;t++)for(let r=t==1?e:this.unplaced.openStart;r>=0;r--){let o,i=null;r?(i=Na(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=Na(e,t);return!o.childCount||o.firstChild.isLeaf?!1:(this.unplaced=new pe(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=Na(e,t);if(o.childCount<=1&&t>0){let i=e.size-t<=t+o.size;this.unplaced=new pe(go(e,t-1,1),t-1,i?t-1:r)}else this.unplaced=new pe(go(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:h}=this.frontier[t];if(o){for(let g=0;g<o.childCount;g++)u.push(o.child(g));d=d.matchFragment(o)}let p=l.size+e-(s.content.size-s.openEnd);for(;c<l.childCount;){let g=l.child(c),y=d.matchType(g.type);if(!y)break;c++,(c>1||a==0||g.content.size)&&(d=y,u.push(nd(g.mark(h.allowedMarks(g.marks)),c==1?a:0,c==l.childCount?p:-1)))}let m=c==l.childCount;m||(p=-1),this.placed=yo(this.placed,t,ie.from(u)),this.frontier[t].match=d,m&&p<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let g=0,y=l;g<p;g++){let C=y.lastChild;this.frontier.push({type:C.type,match:C.contentMatchAt(C.childCount)}),y=C.content}this.unplaced=m?e==0?pe.empty:new pe(go(s.content,e-1,1),e-1,p<0?s.openEnd:e-1):new pe(go(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||!Ia(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=Ia(e,t,o,r,i);if(s){for(let l=t-1;l>=0;l--){let{match:a,type:c}=this.frontier[l],u=Ia(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=yo(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=yo(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=yo(this.placed,this.frontier.length,t))}}function go(n,e,t){return e==0?n.cutByIndex(t,n.childCount):n.replaceChild(0,n.firstChild.copy(go(n.firstChild.content,e-1,t)))}function yo(n,e,t){return e==0?n.append(t):n.replaceChild(n.childCount-1,n.lastChild.copy(yo(n.lastChild.content,e-1,t)))}function Na(n,e){for(let t=0;t<e;t++)n=n.firstChild.content;return n}function nd(n,e,t){if(e<=0)return n;let r=n.content;return e>1&&(r=r.replaceChild(0,nd(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 Ia(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&&!dy(t,i.content,s)?l:null}function dy(n,e,t){for(let r=t;r<e.childCount;r++)if(!n.allowsMarks(e.child(r).marks))return!0;return!1}function fy(n){return n.spec.defining||n.spec.definingForContent}function hy(n,e,t,r){if(!r.size)return n.deleteRange(e,t);let o=n.doc.resolve(e),i=n.doc.resolve(t);if(td(o,i,r))return n.step(new qe(e,t,r));let s=od(o,n.doc.resolve(t));s[s.length-1]==0&&s.pop();let l=-(o.depth+1);s.unshift(l);for(let h=o.depth,p=o.pos-1;h>0;h--,p--){let m=o.node(h).type.spec;if(m.defining||m.definingAsContext||m.isolating)break;s.indexOf(h)>-1?l=h:o.before(h)==p&&s.splice(1,0,-h)}let a=s.indexOf(l),c=[],u=r.openStart;for(let h=r.content,p=0;;p++){let m=h.firstChild;if(c.push(m),p==r.openStart)break;h=m.content}for(let h=u-1;h>=0;h--){let p=c[h],m=fy(p.type);if(m&&!p.sameMarkup(o.node(Math.abs(l)-1)))u=h;else if(m||!p.type.isTextblock)break}for(let h=r.openStart;h>=0;h--){let p=(h+u+1)%(r.openStart+1),m=c[p];if(m)for(let g=0;g<s.length;g++){let y=s[(g+a)%s.length],C=!0;y<0&&(C=!1,y=-y);let S=o.node(y-1),k=o.index(y-1);if(S.canReplaceWith(k,k,m.type,m.marks))return n.replace(o.before(y),C?i.after(y):t,new pe(rd(r.content,0,r.openStart,p),p,r.openEnd))}}let d=n.steps.length;for(let h=s.length-1;h>=0&&(n.replace(e,t,r),!(n.steps.length>d));h--){let p=s[h];p<0||(e=o.before(p),t=i.after(p))}}function rd(n,e,t,r,o){if(e<t){let i=n.firstChild;n=n.replaceChild(0,i.copy(rd(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 py(n,e,t,r){if(!r.isInline&&e==t&&n.doc.resolve(e).parent.content.size){let o=ly(n.doc,e,r.type);o!=null&&(e=t=o)}n.replaceRange(e,t,new pe(ie.from(r),0,0))}function my(n,e,t){let r=n.doc.resolve(e),o=n.doc.resolve(t),i=od(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 od(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 xr 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 We.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 We.fromReplace(e,this.pos,this.pos+1,new pe(ie.from(o),0,t.isLeaf?0:1))}getMap(){return St.empty}invert(e){return new xr(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 xr(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 xr(t.pos,t.attr,t.value)}}nt.jsonID("attr",xr);class vo 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 We.ok(r)}getMap(){return St.empty}invert(e){return new vo(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 vo(t.attr,t.value)}}nt.jsonID("docAttr",vo);let Or=class extends Error{};Or=function n(e){let t=Error.call(this,e);return t.__proto__=n.prototype,t},Or.prototype=Object.create(Error.prototype),Or.prototype.constructor=Or,Or.prototype.name="TransformError";class id{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new mo}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new Or(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=pe.empty){let o=Ma(this.doc,e,t,r);return o&&this.step(o),this}replaceWith(e,t,r){return this.replace(e,t,new pe(ie.from(r),0,0))}delete(e,t){return this.replace(e,t,pe.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,r){return hy(this,e,t,r),this}replaceRangeWith(e,t,r){return py(this,e,t,r),this}deleteRange(e,t){return my(this,e,t),this}lift(e,t){return q2(this,e,t),this}join(e,t=1){return ay(this,e,t),this}wrap(e,t){return ny(this,e,t),this}setBlockType(e,t=e,r,o=null){return ry(this,e,t,r,o),this}setNodeMarkup(e,t,r=null,o){return iy(this,e,t,r,o),this}setNodeAttribute(e,t,r){return this.step(new xr(e,t,r)),this}setDocAttribute(e,t){return this.step(new vo(e,t)),this}addNodeMark(e,t){return this.step(new wn(e,t)),this}removeNodeMark(e,t){if(!(t instanceof Pe)){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(t=t.isInSet(r.marks),!t)return this}return this.step(new kr(e,t)),this}split(e,t=1,r){return sy(this,e,t,r),this}addMark(e,t,r){return J2(this,e,t,r),this}removeMark(e,t,r){return Z2(this,e,t,r),this}clearIncompatible(e,t,r){return X2(this,e,t,r),this}}const _a=Object.create(null);class Le{constructor(e,t,r){this.$anchor=e,this.$head=t,this.ranges=r||[new gy(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=pe.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?pe.empty:t),l==0&&ld(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),ld(e,r,t.isInline?-1:1))}}static findFrom(e,t,r=!1){let o=e.parent.inlineContent?new Re(e):Mr(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?Mr(e.node(0),e.node(i),e.before(i+1),e.index(i),t,r):Mr(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 Ht(e.node(0))}static atStart(e){return Mr(e,e,0,0,1)||new Ht(e)}static atEnd(e){return Mr(e,e,e.content.size,e.childCount,-1)||new Ht(e)}static fromJSON(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=_a[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 _a)throw new RangeError("Duplicate use of selection JSON ID "+e);return _a[e]=t,t.prototype.jsonID=e,t}getBookmark(){return Re.between(this.$anchor,this.$head).getBookmark()}}Le.prototype.visible=!0;class gy{constructor(e,t){this.$from=e,this.$to=t}}let sd=!1;function ad(n){!sd&&!n.parent.inlineContent&&(sd=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+n.parent.type.name+")"))}class Re extends Le{constructor(e,t=e){ad(e),ad(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 Le.near(r);let o=e.resolve(t.map(this.anchor));return new Re(o.parent.inlineContent?o:r,r)}replace(e,t=pe.empty){if(super.replace(e,t),t==pe.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=Le.findFrom(t,r,!0)||Le.findFrom(t,-r,!0);if(i)t=i.$head;else return Le.near(t,r)}return e.parent.inlineContent||(o==0?e=t:(e=(Le.findFrom(e,-r,!0)||Le.findFrom(e,r,!0)).$anchor,e.pos<t.pos!=o<0&&(e=t))),new Re(e,t)}}Le.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 we extends Le{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?Le.near(i):new we(i)}content(){return new pe(ie.from(this.node),0,0)}eq(e){return e instanceof we&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new Da(this.anchor)}static fromJSON(e,t){if(typeof t.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new we(e.resolve(t.anchor))}static create(e,t){return new we(e.resolve(t))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}we.prototype.visible=!1,Le.jsonID("node",we);class Da{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:r}=e.mapResult(this.anchor);return t?new Ei(r,r):new Da(r)}resolve(e){let t=e.resolve(this.anchor),r=t.nodeAfter;return r&&we.isSelectable(r)?new we(t):Le.near(t)}}class Ht extends Le{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=pe.empty){if(t==pe.empty){e.delete(0,e.doc.content.size);let r=Le.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new Ht(e)}map(e){return new Ht(e)}eq(e){return e instanceof Ht}getBookmark(){return yy}}Le.jsonID("all",Ht);const yy={map(){return this},resolve(n){return new Ht(n)}};function Mr(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&&we.isSelectable(l))return we.create(n,t-(o<0?l.nodeSize:0))}else{let a=Mr(n,l,t+o,o<0?l.childCount:0,o,i);if(a)return a}t+=l.nodeSize*o}return null}function ld(n,e,t){let r=n.steps.length-1;if(r<e)return;let o=n.steps[r];if(!(o instanceof qe||o instanceof Je))return;let i=n.mapping.maps[r],s;i.forEach((l,a,c,u)=>{s==null&&(s=u)}),n.setSelection(Le.near(n.doc.resolve(s),t))}const cd=1,bi=2,ud=4;class vy extends id{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|cd)&~bi,this.storedMarks=null,this}get selectionSet(){return(this.updated&cd)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=bi,this}ensureMarks(e){return Pe.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&bi)>0}addStep(e,t){super.addStep(e,t),this.updated=this.updated&~bi,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let r=this.selection;return t&&(e=e.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||Pe.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,r){let 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(Le.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|=ud,this}get scrolledIntoView(){return(this.updated&ud)>0}}function dd(n,e){return!e||!n?n:n.bind(e)}class Eo{constructor(e,t,r){this.name=e,this.init=dd(t.init,r),this.apply=dd(t.apply,r)}}const Ey=[new Eo("doc",{init(n){return n.doc||n.schema.topNodeType.createAndFill()},apply(n){return n.doc}}),new Eo("selection",{init(n,e){return n.selection||Le.atStart(e.doc)},apply(n){return n.selection}}),new Eo("storedMarks",{init(n){return n.storedMarks||null},apply(n,e,t,r){return r.selection.$cursor?n.storedMarks:null}}),new Eo("scrollToSelection",{init(){return 0},apply(n,e){return n.scrolledIntoView?e+1:e}})];class La{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=Ey.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 Eo(r.key,r.spec.state,r))})}}class Nr{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=t){let 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 Nr(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 vy(this)}static create(e){let t=new La(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new Nr(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 La(this.schema,e.plugins),r=t.fields,o=new Nr(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 La(e.schema,e.plugins),i=new Nr(o);return o.fields.forEach(s=>{if(s.name=="doc")i.doc=qn.fromJSON(e.schema,t.doc);else if(s.name=="selection")i.selection=Le.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 fd(n,e,t){for(let r in n){let o=n[r];o instanceof Function?o=o.bind(e):r=="handleDOMEvents"&&(o=fd(o,e,{})),t[r]=o}return t}class yt{constructor(e){this.spec=e,this.props={},e.props&&fd(e.props,this,this.props),this.key=e.key?e.key.key:hd("plugin")}getState(e){return e[this.key]}}const Ra=Object.create(null);function hd(n){return n in Ra?n+"$"+ ++Ra[n]:(Ra[n]=0,n+"$")}class Ut{constructor(e="key"){this.key=hd(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const at=function(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e},bo=function(n){let e=n.assignedSlot||n.parentNode;return e&&e.nodeType==11?e.host:e};let pd=null;const un=function(n,e,t){let r=pd||(pd=document.createRange());return r.setEnd(n,t??n.nodeValue.length),r.setStart(n,e||0),r},tr=function(n,e,t,r){return t&&(md(n,e,t,r,-1)||md(n,e,t,r,1))},by=/^(img|br|input|textarea|hr)$/i;function md(n,e,t,r,o){for(;;){if(n==t&&e==r)return!0;if(e==(o<0?0:Xt(n))){let i=n.parentNode;if(!i||i.nodeType!=1||Ba(n)||by.test(n.nodeName)||n.contentEditable=="false")return!1;e=at(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?Xt(n):0}else return!1}}function Xt(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function Cy(n,e,t){for(let r=e==0,o=e==Xt(n);r||o;){if(n==t)return!0;let i=at(n);if(n=n.parentNode,!n)return!1;r=r&&i==0,o=o&&i==Xt(n)}}function Ba(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&&tr(n.focusNode,n.focusOffset,n.anchorNode,n.anchorOffset)};function nr(n,e){let t=document.createEvent("Event");return t.initEvent("keydown",!0,!0),t.keyCode=n,t.key=t.code=e,t}function Sy(n){let e=n.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function wy(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,gd=typeof document<"u"?document:null,Tn=Qt&&Qt.userAgent||"",Pa=/Edge\/(\d+)/.exec(Tn),yd=/MSIE \d/.exec(Tn),$a=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Tn),vt=!!(yd||$a||Pa),An=yd?document.documentMode:$a?+$a[1]:Pa?+Pa[1]:0,jt=!vt&&/gecko\/(\d+)/i.test(Tn);jt&&+(/Firefox\/(\d+)/.exec(Tn)||[0,0])[1];const Fa=!vt&&/Chrome\/(\d+)/.exec(Tn),rt=!!Fa,ky=Fa?+Fa[1]:0,lt=!vt&&!!Qt&&/Apple Computer/.test(Qt.vendor),Ir=lt&&(/Mobile\/\w+/.test(Tn)||!!Qt&&Qt.maxTouchPoints>2),Mt=Ir||(Qt?/Mac/.test(Qt.platform):!1),Ty=Qt?/Win/.test(Qt.platform):!1,Wt=/Android \d/.test(Tn),Co=!!gd&&"webkitFontSmoothing"in gd.documentElement.style,Ay=Co?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function xy(n){return{left:0,right:n.documentElement.clientWidth,top:0,bottom:n.documentElement.clientHeight}}function dn(n,e){return typeof n=="number"?n:n[e]}function Oy(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 vd(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=bo(s)){if(s.nodeType!=1)continue;let l=s,a=l==i.body,c=a?xy(i):Oy(l),u=0,d=0;if(e.top<c.top+dn(r,"top")?d=-(c.top-e.top+dn(o,"top")):e.bottom>c.bottom-dn(r,"bottom")&&(d=e.bottom-e.top>c.bottom-c.top?e.top+dn(o,"top")-c.top:e.bottom-c.bottom+dn(o,"bottom")),e.left<c.left+dn(r,"left")?u=-(c.left-e.left+dn(o,"left")):e.right>c.right-dn(r,"right")&&(u=e.right-c.right+dn(o,"right")),u||d)if(a)i.defaultView.scrollBy(u,d);else{let h=l.scrollLeft,p=l.scrollTop;d&&(l.scrollTop+=d),u&&(l.scrollLeft+=u);let m=l.scrollLeft-h,g=l.scrollTop-p;e={left:e.left-m,top:e.top-g,right:e.right-m,bottom:e.bottom-g}}if(a||/^(fixed|sticky)$/.test(getComputedStyle(s).position))break}}function My(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:Ed(n.dom)}}function Ed(n){let e=[],t=n.ownerDocument;for(let r=n;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),n!=t);r=bo(r));return e}function Ny({refDOM:n,refTop:e,stack:t}){let r=n?n.getBoundingClientRect().top:0;bd(t,r==0?0:r-e)}function bd(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 _r=null;function Iy(n){if(n.setActive)return n.setActive();if(_r)return n.focus(_r);let e=Ed(n);n.focus(_r==null?{get preventScroll(){return _r={preventScroll:!0},!0}}:void 0),_r||(_r=!1,bd(e,0))}function Cd(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 h;if(u.nodeType==1)h=u.getClientRects();else if(u.nodeType==3)h=un(u).getClientRects();else continue;for(let p=0;p<h.length;p++){let m=h[p];if(m.top<=s&&m.bottom>=l){s=Math.max(m.bottom,s),l=Math.min(m.top,l);let g=m.left>e.left?m.left-e.left:m.right<e.left?e.left-m.right:0;if(g<r){t=u,r=g,o=g&&t.nodeType==3?{left:m.right<e.left?m.right:m.left,top:e.top}:e,u.nodeType==1&&g&&(i=d+(e.left>=(m.left+m.right)/2?1:0));continue}}else m.top>e.top&&!a&&m.left<=e.left&&m.right>=e.left&&(a=u,c={left:Math.max(m.left,Math.min(m.right,e.left)),top:m.top});!t&&(e.left>=m.right&&e.top>=m.top||e.left>=m.left&&e.top>=m.bottom)&&(i=d+1)}}return!t&&a&&(t=a,o=c,r=0),t&&t.nodeType==3?_y(t,o):!t||r&&t.nodeType==1?{node:n,offset:i}:Cd(t,o)}function _y(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=xn(r,1);if(i.top!=i.bottom&&Va(e,i))return{node:n,offset:o+(e.left>=(i.left+i.right)/2?1:0)}}return{node:n,offset:0}}function Va(n,e){return n.left>=e.left-1&&n.left<=e.right+1&&n.top>=e.top-1&&n.top<=e.bottom+1}function Dy(n,e){let t=n.parentNode;return t&&/^li$/i.test(t.nodeName)&&e.left<n.getBoundingClientRect().left?t:n}function Ly(n,e,t){let{node:r,offset:o}=Cd(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 Ry(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 Sd(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(Va(e,c))return Sd(s,e,c)}}if((i=(i+1)%r)==o)break}return n}function By(n,e){let t=n.dom.ownerDocument,r,o=0,i=wy(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(!Va(e,c)||(s=Sd(n.dom,e,c),!s))return null}if(lt)for(let c=s;r&&c;c=bo(c))c.draggable&&(r=void 0);if(s=Dy(s,e),r){if(jt&&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;Co&&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=Ry(n,r,o,e))}l==null&&(l=Ly(n,s,e));let a=n.docView.nearestDesc(s,!0);return{pos:l,inside:a?a.posAtStart-a.border:-1}}function wd(n){return n.top<n.bottom||n.left<n.right}function xn(n,e){let t=n.getClientRects();if(t.length){let r=t[e<0?0:t.length-1];if(wd(r))return r}return Array.prototype.find.call(t,wd)||n.getBoundingClientRect()}const Py=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function kd(n,e,t){let{node:r,offset:o,atom:i}=n.docView.domFromPos(e,t<0?-1:1),s=Co||jt;if(r.nodeType==3)if(s&&(Py.test(r.nodeValue)||(t<0?!o:o==r.nodeValue.length))){let a=xn(un(r,o,o),t);if(jt&&o&&/\s/.test(r.nodeValue[o-1])&&o<r.nodeValue.length){let c=xn(un(r,o-1,o-1),-1);if(c.top==a.top){let u=xn(un(r,o,o+1),-1);if(u.top!=a.top)return So(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++,So(xn(un(r,a,c),u),u<0)}if(!n.state.doc.resolve(e-(i||0)).parent.inlineContent){if(i==null&&o&&(t<0||o==Xt(r))){let a=r.childNodes[o-1];if(a.nodeType==1)return za(a.getBoundingClientRect(),!1)}if(i==null&&o<Xt(r)){let a=r.childNodes[o];if(a.nodeType==1)return za(a.getBoundingClientRect(),!0)}return za(r.getBoundingClientRect(),t>=0)}if(i==null&&o&&(t<0||o==Xt(r))){let a=r.childNodes[o-1],c=a.nodeType==3?un(a,Xt(a)-(s?0:1)):a.nodeType==1&&(a.nodeName!="BR"||!a.nextSibling)?a:null;if(c)return So(xn(c,1),!1)}if(i==null&&o<Xt(r)){let a=r.childNodes[o];for(;a.pmViewDesc&&a.pmViewDesc.ignoreForCoords;)a=a.nextSibling;let c=a?a.nodeType==3?un(a,0,s?0:1):a.nodeType==1?a:null:null;if(c)return So(xn(c,-1),!0)}return So(xn(r.nodeType==3?un(r):r,-t),t>=0)}function So(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 za(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 Td(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 $y(n,e,t){let r=e.selection,o=t=="up"?r.$from:r.$to;return Td(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=kd(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=un(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 Fy=/[\u0590-\u08ac]/;function Vy(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!Fy.test(r.parent.textContent)||!l.modify?t=="left"||t=="backward"?i:s:Td(n,e,()=>{let{focusNode:a,focusOffset:c,anchorNode:u,anchorOffset:d}=n.domSelectionRange(),h=l.caretBidiLevel;l.modify("move",t,"character");let p=r.depth?n.docView.domAfterPos(r.before()):n.dom,{focusNode:m,focusOffset:g}=n.domSelectionRange(),y=m&&!p.contains(m.nodeType==1?m:m.parentNode)||a==m&&c==g;try{l.collapse(u,d),a&&(a!=u||c!=d)&&l.extend&&l.extend(a,c)}catch{}return h!=null&&(l.caretBidiLevel=h),y})}let Ad=null,xd=null,Od=!1;function zy(n,e,t){return Ad==e&&xd==t?Od:(Ad=e,xd=t,Od=t=="up"||t=="down"?$y(n,e,t):Vy(n,e,t))}const Nt=0,Md=1,rr=2,qt=3;class wo{constructor(e,t,r,o){this.parent=e,this.children=t,this.dom=r,this.contentDOM=o,this.dirty=Nt,r.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,r){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;t<this.children.length;t++)e+=this.children[t].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let t=0,r=this.posAtStart;;t++){let o=this.children[t];if(o==e)return r;r+=o.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,t,r){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(r<0){let i,s;if(e==this.contentDOM)i=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.previousSibling}for(;i&&!((s=i.pmViewDesc)&&s.parent==this);)i=i.previousSibling;return i?this.posBeforeChild(s)+s.size:this.posAtStart}else{let i,s;if(e==this.contentDOM)i=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.nextSibling}for(;i&&!((s=i.pmViewDesc)&&s.parent==this);)i=i.nextSibling;return i?this.posBeforeChild(s):this.posAtEnd}let o;if(e==this.dom&&this.contentDOM)o=t>at(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 _d){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 Nd&&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?at(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?at(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 h=this.children[d-1];if(h.size&&h.dom.parentNode==this.contentDOM&&!h.emptyChildAt(1)){o=at(h.dom)+1;break}e-=h.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=at(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 h=0,p=0;h<this.children.length;h++){let m=this.children[h],g=p+m.size;if(i>p&&s<g)return m.setSelection(e-p-m.border,t-p-m.border,r,o);p=g}let l=this.domFromPos(e,e?-1:1),a=t==e?l:this.domFromPos(t,t?-1:1),c=r.getSelection(),u=!1;if((jt||lt)&&e==t){let{node:h,offset:p}=l;if(h.nodeType==3){if(u=!!(p&&h.nodeValue[p-1]==`
|
|
@@ -128,4 +128,4 @@ img.ProseMirror-separator {
|
|
|
128
128
|
* Bootstrap v5.3.0 (https://getbootstrap.com/)
|
|
129
129
|
* Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
|
130
130
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
131
|
-
*/const Vn=new Map,fc={set(n,e,t){Vn.has(n)||Vn.set(n,new Map);const r=Vn.get(n);if(!r.has(e)&&r.size!==0){console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(r.keys())[0]}.`);return}r.set(e,t)},get(n,e){return Vn.has(n)&&Vn.get(n).get(e)||null},remove(n,e){if(!Vn.has(n))return;const t=Vn.get(n);t.delete(e),t.size===0&&Vn.delete(n)}},x8=1e6,O8=1e3,hc="transitionend",Tp=n=>(n&&window.CSS&&window.CSS.escape&&(n=n.replace(/#([^\s"#']+)/g,(e,t)=>`#${CSS.escape(t)}`)),n),M8=n=>n==null?`${n}`:Object.prototype.toString.call(n).match(/\s([a-z]+)/i)[1].toLowerCase(),N8=n=>{do n+=Math.floor(Math.random()*x8);while(document.getElementById(n));return n},I8=n=>{if(!n)return 0;let{transitionDuration:e,transitionDelay:t}=window.getComputedStyle(n);const r=Number.parseFloat(e),o=Number.parseFloat(t);return!r&&!o?0:(e=e.split(",")[0],t=t.split(",")[0],(Number.parseFloat(e)+Number.parseFloat(t))*O8)},Ap=n=>{n.dispatchEvent(new Event(hc))},yn=n=>!n||typeof n!="object"?!1:(typeof n.jquery<"u"&&(n=n[0]),typeof n.nodeType<"u"),zn=n=>yn(n)?n.jquery?n[0]:n:typeof n=="string"&&n.length>0?document.querySelector(Tp(n)):null,Xr=n=>{if(!yn(n)||n.getClientRects().length===0)return!1;const e=getComputedStyle(n).getPropertyValue("visibility")==="visible",t=n.closest("details:not([open])");if(!t)return e;if(t!==n){const r=n.closest("summary");if(r&&r.parentNode!==t||r===null)return!1}return e},Hn=n=>!n||n.nodeType!==Node.ELEMENT_NODE||n.classList.contains("disabled")?!0:typeof n.disabled<"u"?n.disabled:n.hasAttribute("disabled")&&n.getAttribute("disabled")!=="false",xp=n=>{if(!document.documentElement.attachShadow)return null;if(typeof n.getRootNode=="function"){const e=n.getRootNode();return e instanceof ShadowRoot?e:null}return n instanceof ShadowRoot?n:n.parentNode?xp(n.parentNode):null},Ps=()=>{},Uo=n=>{n.offsetHeight},Op=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,pc=[],_8=n=>{document.readyState==="loading"?(pc.length||document.addEventListener("DOMContentLoaded",()=>{for(const e of pc)e()}),pc.push(n)):n()},Rt=()=>document.documentElement.dir==="rtl",Bt=n=>{_8(()=>{const e=Op();if(e){const t=n.NAME,r=e.fn[t];e.fn[t]=n.jQueryInterface,e.fn[t].Constructor=n,e.fn[t].noConflict=()=>(e.fn[t]=r,n.jQueryInterface)}})},bt=(n,e=[],t=n)=>typeof n=="function"?n(...e):t,Mp=(n,e,t=!0)=>{if(!t){bt(n);return}const r=5,o=I8(e)+r;let i=!1;const s=({target:l})=>{l===e&&(i=!0,e.removeEventListener(hc,s),bt(n))};e.addEventListener(hc,s),setTimeout(()=>{i||Ap(e)},o)},mc=(n,e,t,r)=>{const o=n.length;let i=n.indexOf(e);return i===-1?!t&&r?n[o-1]:n[0]:(i+=t?1:-1,r&&(i=(i+o)%o),n[Math.max(0,Math.min(i,o-1))])},D8=/[^.]*(?=\..*)\.|.*/,L8=/\..*/,R8=/::\d+$/,gc={};let Np=1;const Ip={mouseenter:"mouseover",mouseleave:"mouseout"},B8=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function _p(n,e){return e&&`${e}::${Np++}`||n.uidEvent||Np++}function Dp(n){const e=_p(n);return n.uidEvent=e,gc[e]=gc[e]||{},gc[e]}function P8(n,e){return function t(r){return vc(r,{delegateTarget:n}),t.oneOff&&ne.off(n,r.type,e),e.apply(n,[r])}}function $8(n,e,t){return function r(o){const i=n.querySelectorAll(e);for(let{target:s}=o;s&&s!==this;s=s.parentNode)for(const l of i)if(l===s)return vc(o,{delegateTarget:s}),r.oneOff&&ne.off(n,o.type,e,t),t.apply(s,[o])}}function Lp(n,e,t=null){return Object.values(n).find(r=>r.callable===e&&r.delegationSelector===t)}function Rp(n,e,t){const r=typeof e=="string",o=r?t:e||t;let i=Pp(n);return B8.has(i)||(i=n),[r,o,i]}function Bp(n,e,t,r,o){if(typeof e!="string"||!n)return;let[i,s,l]=Rp(e,t,r);e in Ip&&(s=(m=>function(g){if(!g.relatedTarget||g.relatedTarget!==g.delegateTarget&&!g.delegateTarget.contains(g.relatedTarget))return m.call(this,g)})(s));const a=Dp(n),c=a[l]||(a[l]={}),u=Lp(c,s,i?t:null);if(u){u.oneOff=u.oneOff&&o;return}const d=_p(s,e.replace(D8,"")),h=i?$8(n,t,s):P8(n,s);h.delegationSelector=i?t:null,h.callable=s,h.oneOff=o,h.uidEvent=d,c[d]=h,n.addEventListener(l,h,i)}function yc(n,e,t,r,o){const i=Lp(e[t],r,o);i&&(n.removeEventListener(t,i,!!o),delete e[t][i.uidEvent])}function F8(n,e,t,r){const o=e[t]||{};for(const[i,s]of Object.entries(o))i.includes(r)&&yc(n,e,t,s.callable,s.delegationSelector)}function Pp(n){return n=n.replace(L8,""),Ip[n]||n}const ne={on(n,e,t,r){Bp(n,e,t,r,!1)},one(n,e,t,r){Bp(n,e,t,r,!0)},off(n,e,t,r){if(typeof e!="string"||!n)return;const[o,i,s]=Rp(e,t,r),l=s!==e,a=Dp(n),c=a[s]||{},u=e.startsWith(".");if(typeof i<"u"){if(!Object.keys(c).length)return;yc(n,a,s,i,o?t:null);return}if(u)for(const d of Object.keys(a))F8(n,a,d,e.slice(1));for(const[d,h]of Object.entries(c)){const p=d.replace(R8,"");(!l||e.includes(p))&&yc(n,a,s,h.callable,h.delegationSelector)}},trigger(n,e,t){if(typeof e!="string"||!n)return null;const r=Op(),o=Pp(e),i=e!==o;let s=null,l=!0,a=!0,c=!1;i&&r&&(s=r.Event(e,t),r(n).trigger(s),l=!s.isPropagationStopped(),a=!s.isImmediatePropagationStopped(),c=s.isDefaultPrevented());const u=vc(new Event(e,{bubbles:l,cancelable:!0}),t);return c&&u.preventDefault(),a&&n.dispatchEvent(u),u.defaultPrevented&&s&&s.preventDefault(),u}};function vc(n,e={}){for(const[t,r]of Object.entries(e))try{n[t]=r}catch{Object.defineProperty(n,t,{configurable:!0,get(){return r}})}return n}function $p(n){if(n==="true")return!0;if(n==="false")return!1;if(n===Number(n).toString())return Number(n);if(n===""||n==="null")return null;if(typeof n!="string")return n;try{return JSON.parse(decodeURIComponent(n))}catch{return n}}function Ec(n){return n.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}const vn={setDataAttribute(n,e,t){n.setAttribute(`data-bs-${Ec(e)}`,t)},removeDataAttribute(n,e){n.removeAttribute(`data-bs-${Ec(e)}`)},getDataAttributes(n){if(!n)return{};const e={},t=Object.keys(n.dataset).filter(r=>r.startsWith("bs")&&!r.startsWith("bsConfig"));for(const r of t){let o=r.replace(/^bs/,"");o=o.charAt(0).toLowerCase()+o.slice(1,o.length),e[o]=$p(n.dataset[r])}return e},getDataAttribute(n,e){return $p(n.getAttribute(`data-bs-${Ec(e)}`))}};class jo{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(e){return e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e}_mergeConfigObj(e,t){const r=yn(t)?vn.getDataAttribute(t,"config"):{};return{...this.constructor.Default,...typeof r=="object"?r:{},...yn(t)?vn.getDataAttributes(t):{},...typeof e=="object"?e:{}}}_typeCheckConfig(e,t=this.constructor.DefaultType){for(const[r,o]of Object.entries(t)){const i=e[r],s=yn(i)?"element":M8(i);if(!new RegExp(o).test(s))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${r}" provided type "${s}" but expected type "${o}".`)}}}const V8="5.3.0";class Yt extends jo{constructor(e,t){super(),e=zn(e),e&&(this._element=e,this._config=this._getConfig(t),fc.set(this._element,this.constructor.DATA_KEY,this))}dispose(){fc.remove(this._element,this.constructor.DATA_KEY),ne.off(this._element,this.constructor.EVENT_KEY);for(const e of Object.getOwnPropertyNames(this))this[e]=null}_queueCallback(e,t,r=!0){Mp(e,t,r)}_getConfig(e){return e=this._mergeConfigObj(e,this._element),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}static getInstance(e){return fc.get(zn(e),this.DATA_KEY)}static getOrCreateInstance(e,t={}){return this.getInstance(e)||new this(e,typeof t=="object"?t:null)}static get VERSION(){return V8}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(e){return`${e}${this.EVENT_KEY}`}}const bc=n=>{let e=n.getAttribute("data-bs-target");if(!e||e==="#"){let t=n.getAttribute("href");if(!t||!t.includes("#")&&!t.startsWith("."))return null;t.includes("#")&&!t.startsWith("#")&&(t=`#${t.split("#")[1]}`),e=t&&t!=="#"?t.trim():null}return Tp(e)},Ee={find(n,e=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(e,n))},findOne(n,e=document.documentElement){return Element.prototype.querySelector.call(e,n)},children(n,e){return[].concat(...n.children).filter(t=>t.matches(e))},parents(n,e){const t=[];let r=n.parentNode.closest(e);for(;r;)t.push(r),r=r.parentNode.closest(e);return t},prev(n,e){let t=n.previousElementSibling;for(;t;){if(t.matches(e))return[t];t=t.previousElementSibling}return[]},next(n,e){let t=n.nextElementSibling;for(;t;){if(t.matches(e))return[t];t=t.nextElementSibling}return[]},focusableChildren(n){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(t=>`${t}:not([tabindex^="-"])`).join(",");return this.find(e,n).filter(t=>!Hn(t)&&Xr(t))},getSelectorFromElement(n){const e=bc(n);return e&&Ee.findOne(e)?e:null},getElementFromSelector(n){const e=bc(n);return e?Ee.findOne(e):null},getMultipleElementsFromSelector(n){const e=bc(n);return e?Ee.find(e):[]}},$s=(n,e="hide")=>{const t=`click.dismiss${n.EVENT_KEY}`,r=n.NAME;ne.on(document,t,`[data-bs-dismiss="${r}"]`,function(o){if(["A","AREA"].includes(this.tagName)&&o.preventDefault(),Hn(this))return;const i=Ee.getElementFromSelector(this)||this.closest(`.${r}`);n.getOrCreateInstance(i)[e]()})},z8="alert",Fp=".bs.alert",H8=`close${Fp}`,U8=`closed${Fp}`,j8="fade",W8="show";class Fs extends Yt{static get NAME(){return z8}close(){if(ne.trigger(this._element,H8).defaultPrevented)return;this._element.classList.remove(W8);const t=this._element.classList.contains(j8);this._queueCallback(()=>this._destroyElement(),this._element,t)}_destroyElement(){this._element.remove(),ne.trigger(this._element,U8),this.dispose()}static jQueryInterface(e){return this.each(function(){const t=Fs.getOrCreateInstance(this);if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e](this)}})}}$s(Fs,"close"),Bt(Fs);const K8="button",G8=".bs.button",Y8=".data-api",J8="active",Vp='[data-bs-toggle="button"]',Z8=`click${G8}${Y8}`;class Vs extends Yt{static get NAME(){return K8}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(J8))}static jQueryInterface(e){return this.each(function(){const t=Vs.getOrCreateInstance(this);e==="toggle"&&t[e]()})}}ne.on(document,Z8,Vp,n=>{n.preventDefault();const e=n.target.closest(Vp);Vs.getOrCreateInstance(e).toggle()}),Bt(Vs);const X8="swipe",Qr=".bs.swipe",Q8=`touchstart${Qr}`,q8=`touchmove${Qr}`,e4=`touchend${Qr}`,t4=`pointerdown${Qr}`,n4=`pointerup${Qr}`,r4="touch",o4="pen",i4="pointer-event",s4=40,a4={endCallback:null,leftCallback:null,rightCallback:null},l4={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class zs extends jo{constructor(e,t){super(),this._element=e,!(!e||!zs.isSupported())&&(this._config=this._getConfig(t),this._deltaX=0,this._supportPointerEvents=!!window.PointerEvent,this._initEvents())}static get Default(){return a4}static get DefaultType(){return l4}static get NAME(){return X8}dispose(){ne.off(this._element,Qr)}_start(e){if(!this._supportPointerEvents){this._deltaX=e.touches[0].clientX;return}this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX)}_end(e){this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX-this._deltaX),this._handleSwipe(),bt(this._config.endCallback)}_move(e){this._deltaX=e.touches&&e.touches.length>1?0:e.touches[0].clientX-this._deltaX}_handleSwipe(){const e=Math.abs(this._deltaX);if(e<=s4)return;const t=e/this._deltaX;this._deltaX=0,t&&bt(t>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(ne.on(this._element,t4,e=>this._start(e)),ne.on(this._element,n4,e=>this._end(e)),this._element.classList.add(i4)):(ne.on(this._element,Q8,e=>this._start(e)),ne.on(this._element,q8,e=>this._move(e)),ne.on(this._element,e4,e=>this._end(e)))}_eventIsPointerPenTouch(e){return this._supportPointerEvents&&(e.pointerType===o4||e.pointerType===r4)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const c4="carousel",Un=".bs.carousel",zp=".data-api",u4="ArrowLeft",d4="ArrowRight",f4=500,Wo="next",qr="prev",eo="left",Hs="right",h4=`slide${Un}`,Cc=`slid${Un}`,p4=`keydown${Un}`,m4=`mouseenter${Un}`,g4=`mouseleave${Un}`,y4=`dragstart${Un}`,v4=`load${Un}${zp}`,E4=`click${Un}${zp}`,Hp="carousel",Us="active",b4="slide",C4="carousel-item-end",S4="carousel-item-start",w4="carousel-item-next",k4="carousel-item-prev",Up=".active",jp=".carousel-item",T4=Up+jp,A4=".carousel-item img",x4=".carousel-indicators",O4="[data-bs-slide], [data-bs-slide-to]",M4='[data-bs-ride="carousel"]',N4={[u4]:Hs,[d4]:eo},I4={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},_4={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Ko extends Yt{constructor(e,t){super(e,t),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=Ee.findOne(x4,this._element),this._addEventListeners(),this._config.ride===Hp&&this.cycle()}static get Default(){return I4}static get DefaultType(){return _4}static get NAME(){return c4}next(){this._slide(Wo)}nextWhenVisible(){!document.hidden&&Xr(this._element)&&this.next()}prev(){this._slide(qr)}pause(){this._isSliding&&Ap(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){if(this._config.ride){if(this._isSliding){ne.one(this._element,Cc,()=>this.cycle());return}this.cycle()}}to(e){const t=this._getItems();if(e>t.length-1||e<0)return;if(this._isSliding){ne.one(this._element,Cc,()=>this.to(e));return}const r=this._getItemIndex(this._getActive());if(r===e)return;const o=e>r?Wo:qr;this._slide(o,t[e])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(e){return e.defaultInterval=e.interval,e}_addEventListeners(){this._config.keyboard&&ne.on(this._element,p4,e=>this._keydown(e)),this._config.pause==="hover"&&(ne.on(this._element,m4,()=>this.pause()),ne.on(this._element,g4,()=>this._maybeEnableCycle())),this._config.touch&&zs.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const r of Ee.find(A4,this._element))ne.on(r,y4,o=>o.preventDefault());const t={leftCallback:()=>this._slide(this._directionToOrder(eo)),rightCallback:()=>this._slide(this._directionToOrder(Hs)),endCallback:()=>{this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),f4+this._config.interval))}};this._swipeHelper=new zs(this._element,t)}_keydown(e){if(/input|textarea/i.test(e.target.tagName))return;const t=N4[e.key];t&&(e.preventDefault(),this._slide(this._directionToOrder(t)))}_getItemIndex(e){return this._getItems().indexOf(e)}_setActiveIndicatorElement(e){if(!this._indicatorsElement)return;const t=Ee.findOne(Up,this._indicatorsElement);t.classList.remove(Us),t.removeAttribute("aria-current");const r=Ee.findOne(`[data-bs-slide-to="${e}"]`,this._indicatorsElement);r&&(r.classList.add(Us),r.setAttribute("aria-current","true"))}_updateInterval(){const e=this._activeElement||this._getActive();if(!e)return;const t=Number.parseInt(e.getAttribute("data-bs-interval"),10);this._config.interval=t||this._config.defaultInterval}_slide(e,t=null){if(this._isSliding)return;const r=this._getActive(),o=e===Wo,i=t||mc(this._getItems(),r,o,this._config.wrap);if(i===r)return;const s=this._getItemIndex(i),l=p=>ne.trigger(this._element,p,{relatedTarget:i,direction:this._orderToDirection(e),from:this._getItemIndex(r),to:s});if(l(h4).defaultPrevented||!r||!i)return;const c=!!this._interval;this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(s),this._activeElement=i;const u=o?S4:C4,d=o?w4:k4;i.classList.add(d),Uo(i),r.classList.add(u),i.classList.add(u);const h=()=>{i.classList.remove(u,d),i.classList.add(Us),r.classList.remove(Us,d,u),this._isSliding=!1,l(Cc)};this._queueCallback(h,r,this._isAnimated()),c&&this.cycle()}_isAnimated(){return this._element.classList.contains(b4)}_getActive(){return Ee.findOne(T4,this._element)}_getItems(){return Ee.find(jp,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(e){return Rt()?e===eo?qr:Wo:e===eo?Wo:qr}_orderToDirection(e){return Rt()?e===qr?eo:Hs:e===qr?Hs:eo}static jQueryInterface(e){return this.each(function(){const t=Ko.getOrCreateInstance(this,e);if(typeof e=="number"){t.to(e);return}if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e]()}})}}ne.on(document,E4,O4,function(n){const e=Ee.getElementFromSelector(this);if(!e||!e.classList.contains(Hp))return;n.preventDefault();const t=Ko.getOrCreateInstance(e),r=this.getAttribute("data-bs-slide-to");if(r){t.to(r),t._maybeEnableCycle();return}if(vn.getDataAttribute(this,"slide")==="next"){t.next(),t._maybeEnableCycle();return}t.prev(),t._maybeEnableCycle()}),ne.on(window,v4,()=>{const n=Ee.find(M4);for(const e of n)Ko.getOrCreateInstance(e)}),Bt(Ko);const D4="collapse",Go=".bs.collapse",L4=".data-api",R4=`show${Go}`,B4=`shown${Go}`,P4=`hide${Go}`,$4=`hidden${Go}`,F4=`click${Go}${L4}`,Sc="show",to="collapse",js="collapsing",V4="collapsed",z4=`:scope .${to} .${to}`,H4="collapse-horizontal",U4="width",j4="height",W4=".collapse.show, .collapse.collapsing",wc='[data-bs-toggle="collapse"]',K4={parent:null,toggle:!0},G4={parent:"(null|element)",toggle:"boolean"};class Yo extends Yt{constructor(e,t){super(e,t),this._isTransitioning=!1,this._triggerArray=[];const r=Ee.find(wc);for(const o of r){const i=Ee.getSelectorFromElement(o),s=Ee.find(i).filter(l=>l===this._element);i!==null&&s.length&&this._triggerArray.push(o)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return K4}static get DefaultType(){return G4}static get NAME(){return D4}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let e=[];if(this._config.parent&&(e=this._getFirstLevelChildren(W4).filter(l=>l!==this._element).map(l=>Yo.getOrCreateInstance(l,{toggle:!1}))),e.length&&e[0]._isTransitioning||ne.trigger(this._element,R4).defaultPrevented)return;for(const l of e)l.hide();const r=this._getDimension();this._element.classList.remove(to),this._element.classList.add(js),this._element.style[r]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const o=()=>{this._isTransitioning=!1,this._element.classList.remove(js),this._element.classList.add(to,Sc),this._element.style[r]="",ne.trigger(this._element,B4)},s=`scroll${r[0].toUpperCase()+r.slice(1)}`;this._queueCallback(o,this._element,!0),this._element.style[r]=`${this._element[s]}px`}hide(){if(this._isTransitioning||!this._isShown()||ne.trigger(this._element,P4).defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,Uo(this._element),this._element.classList.add(js),this._element.classList.remove(to,Sc);for(const o of this._triggerArray){const i=Ee.getElementFromSelector(o);i&&!this._isShown(i)&&this._addAriaAndCollapsedClass([o],!1)}this._isTransitioning=!0;const r=()=>{this._isTransitioning=!1,this._element.classList.remove(js),this._element.classList.add(to),ne.trigger(this._element,$4)};this._element.style[t]="",this._queueCallback(r,this._element,!0)}_isShown(e=this._element){return e.classList.contains(Sc)}_configAfterMerge(e){return e.toggle=!!e.toggle,e.parent=zn(e.parent),e}_getDimension(){return this._element.classList.contains(H4)?U4:j4}_initializeChildren(){if(!this._config.parent)return;const e=this._getFirstLevelChildren(wc);for(const t of e){const r=Ee.getElementFromSelector(t);r&&this._addAriaAndCollapsedClass([t],this._isShown(r))}}_getFirstLevelChildren(e){const t=Ee.find(z4,this._config.parent);return Ee.find(e,this._config.parent).filter(r=>!t.includes(r))}_addAriaAndCollapsedClass(e,t){if(e.length)for(const r of e)r.classList.toggle(V4,!t),r.setAttribute("aria-expanded",t)}static jQueryInterface(e){const t={};return typeof e=="string"&&/show|hide/.test(e)&&(t.toggle=!1),this.each(function(){const r=Yo.getOrCreateInstance(this,t);if(typeof e=="string"){if(typeof r[e]>"u")throw new TypeError(`No method named "${e}"`);r[e]()}})}}ne.on(document,F4,wc,function(n){(n.target.tagName==="A"||n.delegateTarget&&n.delegateTarget.tagName==="A")&&n.preventDefault();for(const e of Ee.getMultipleElementsFromSelector(this))Yo.getOrCreateInstance(e,{toggle:!1}).toggle()}),Bt(Yo);const Wp="dropdown",pr=".bs.dropdown",kc=".data-api",Y4="Escape",Kp="Tab",J4="ArrowUp",Gp="ArrowDown",Z4=2,X4=`hide${pr}`,Q4=`hidden${pr}`,q4=`show${pr}`,eC=`shown${pr}`,Yp=`click${pr}${kc}`,Jp=`keydown${pr}${kc}`,tC=`keyup${pr}${kc}`,no="show",nC="dropup",rC="dropend",oC="dropstart",iC="dropup-center",sC="dropdown-center",mr='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',aC=`${mr}.${no}`,Ws=".dropdown-menu",lC=".navbar",cC=".navbar-nav",uC=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",dC=Rt()?"top-end":"top-start",fC=Rt()?"top-start":"top-end",hC=Rt()?"bottom-end":"bottom-start",pC=Rt()?"bottom-start":"bottom-end",mC=Rt()?"left-start":"right-start",gC=Rt()?"right-start":"left-start",yC="top",vC="bottom",EC={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},bC={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class an extends Yt{constructor(e,t){super(e,t),this._popper=null,this._parent=this._element.parentNode,this._menu=Ee.next(this._element,Ws)[0]||Ee.prev(this._element,Ws)[0]||Ee.findOne(Ws,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return EC}static get DefaultType(){return bC}static get NAME(){return Wp}toggle(){return this._isShown()?this.hide():this.show()}show(){if(Hn(this._element)||this._isShown())return;const e={relatedTarget:this._element};if(!ne.trigger(this._element,q4,e).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(cC))for(const r of[].concat(...document.body.children))ne.on(r,"mouseover",Ps);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(no),this._element.classList.add(no),ne.trigger(this._element,eC,e)}}hide(){if(Hn(this._element)||!this._isShown())return;const e={relatedTarget:this._element};this._completeHide(e)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(e){if(!ne.trigger(this._element,X4,e).defaultPrevented){if("ontouchstart"in document.documentElement)for(const r of[].concat(...document.body.children))ne.off(r,"mouseover",Ps);this._popper&&this._popper.destroy(),this._menu.classList.remove(no),this._element.classList.remove(no),this._element.setAttribute("aria-expanded","false"),vn.removeDataAttribute(this._menu,"popper"),ne.trigger(this._element,Q4,e)}}_getConfig(e){if(e=super._getConfig(e),typeof e.reference=="object"&&!yn(e.reference)&&typeof e.reference.getBoundingClientRect!="function")throw new TypeError(`${Wp.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return e}_createPopper(){if(typeof Mh>"u")throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let e=this._element;this._config.reference==="parent"?e=this._parent:yn(this._config.reference)?e=zn(this._config.reference):typeof this._config.reference=="object"&&(e=this._config.reference);const t=this._getPopperConfig();this._popper=Gi(e,this._menu,t)}_isShown(){return this._menu.classList.contains(no)}_getPlacement(){const e=this._parent;if(e.classList.contains(rC))return mC;if(e.classList.contains(oC))return gC;if(e.classList.contains(iC))return yC;if(e.classList.contains(sC))return vC;const t=getComputedStyle(this._menu).getPropertyValue("--bs-position").trim()==="end";return e.classList.contains(nC)?t?fC:dC:t?pC:hC}_detectNavbar(){return this._element.closest(lC)!==null}_getOffset(){const{offset:e}=this._config;return typeof e=="string"?e.split(",").map(t=>Number.parseInt(t,10)):typeof e=="function"?t=>e(t,this._element):e}_getPopperConfig(){const e={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||this._config.display==="static")&&(vn.setDataAttribute(this._menu,"popper","static"),e.modifiers=[{name:"applyStyles",enabled:!1}]),{...e,...bt(this._config.popperConfig,[e])}}_selectMenuItem({key:e,target:t}){const r=Ee.find(uC,this._menu).filter(o=>Xr(o));r.length&&mc(r,t,e===Gp,!r.includes(t)).focus()}static jQueryInterface(e){return this.each(function(){const t=an.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof t[e]>"u")throw new TypeError(`No method named "${e}"`);t[e]()}})}static clearMenus(e){if(e.button===Z4||e.type==="keyup"&&e.key!==Kp)return;const t=Ee.find(aC);for(const r of t){const o=an.getInstance(r);if(!o||o._config.autoClose===!1)continue;const i=e.composedPath(),s=i.includes(o._menu);if(i.includes(o._element)||o._config.autoClose==="inside"&&!s||o._config.autoClose==="outside"&&s||o._menu.contains(e.target)&&(e.type==="keyup"&&e.key===Kp||/input|select|option|textarea|form/i.test(e.target.tagName)))continue;const l={relatedTarget:o._element};e.type==="click"&&(l.clickEvent=e),o._completeHide(l)}}static dataApiKeydownHandler(e){const t=/input|textarea/i.test(e.target.tagName),r=e.key===Y4,o=[J4,Gp].includes(e.key);if(!o&&!r||t&&!r)return;e.preventDefault();const i=this.matches(mr)?this:Ee.prev(this,mr)[0]||Ee.next(this,mr)[0]||Ee.findOne(mr,e.delegateTarget.parentNode),s=an.getOrCreateInstance(i);if(o){e.stopPropagation(),s.show(),s._selectMenuItem(e);return}s._isShown()&&(e.stopPropagation(),s.hide(),i.focus())}}ne.on(document,Jp,mr,an.dataApiKeydownHandler),ne.on(document,Jp,Ws,an.dataApiKeydownHandler),ne.on(document,Yp,an.clearMenus),ne.on(document,tC,an.clearMenus),ne.on(document,Yp,mr,function(n){n.preventDefault(),an.getOrCreateInstance(this).toggle()}),Bt(an);const Zp="backdrop",CC="fade",Xp="show",Qp=`mousedown.bs.${Zp}`,SC={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},wC={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class qp extends jo{constructor(e){super(),this._config=this._getConfig(e),this._isAppended=!1,this._element=null}static get Default(){return SC}static get DefaultType(){return wC}static get NAME(){return Zp}show(e){if(!this._config.isVisible){bt(e);return}this._append();const t=this._getElement();this._config.isAnimated&&Uo(t),t.classList.add(Xp),this._emulateAnimation(()=>{bt(e)})}hide(e){if(!this._config.isVisible){bt(e);return}this._getElement().classList.remove(Xp),this._emulateAnimation(()=>{this.dispose(),bt(e)})}dispose(){this._isAppended&&(ne.off(this._element,Qp),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const e=document.createElement("div");e.className=this._config.className,this._config.isAnimated&&e.classList.add(CC),this._element=e}return this._element}_configAfterMerge(e){return e.rootElement=zn(e.rootElement),e}_append(){if(this._isAppended)return;const e=this._getElement();this._config.rootElement.append(e),ne.on(e,Qp,()=>{bt(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(e){Mp(e,this._getElement(),this._config.isAnimated)}}const kC="focustrap",Ks=".bs.focustrap",TC=`focusin${Ks}`,AC=`keydown.tab${Ks}`,xC="Tab",OC="forward",em="backward",MC={autofocus:!0,trapElement:null},NC={autofocus:"boolean",trapElement:"element"};class tm extends jo{constructor(e){super(),this._config=this._getConfig(e),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return MC}static get DefaultType(){return NC}static get NAME(){return kC}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),ne.off(document,Ks),ne.on(document,TC,e=>this._handleFocusin(e)),ne.on(document,AC,e=>this._handleKeydown(e)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,ne.off(document,Ks))}_handleFocusin(e){const{trapElement:t}=this._config;if(e.target===document||e.target===t||t.contains(e.target))return;const r=Ee.focusableChildren(t);r.length===0?t.focus():this._lastTabNavDirection===em?r[r.length-1].focus():r[0].focus()}_handleKeydown(e){e.key===xC&&(this._lastTabNavDirection=e.shiftKey?em:OC)}}const nm=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",rm=".sticky-top",Gs="padding-right",om="margin-right";class Tc{constructor(){this._element=document.body}getWidth(){const e=document.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}hide(){const e=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,Gs,t=>t+e),this._setElementAttributes(nm,Gs,t=>t+e),this._setElementAttributes(rm,om,t=>t-e)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,Gs),this._resetElementAttributes(nm,Gs),this._resetElementAttributes(rm,om)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(e,t,r){const o=this.getWidth(),i=s=>{if(s!==this._element&&window.innerWidth>s.clientWidth+o)return;this._saveInitialAttribute(s,t);const l=window.getComputedStyle(s).getPropertyValue(t);s.style.setProperty(t,`${r(Number.parseFloat(l))}px`)};this._applyManipulationCallback(e,i)}_saveInitialAttribute(e,t){const r=e.style.getPropertyValue(t);r&&vn.setDataAttribute(e,t,r)}_resetElementAttributes(e,t){const r=o=>{const i=vn.getDataAttribute(o,t);if(i===null){o.style.removeProperty(t);return}vn.removeDataAttribute(o,t),o.style.setProperty(t,i)};this._applyManipulationCallback(e,r)}_applyManipulationCallback(e,t){if(yn(e)){t(e);return}for(const r of Ee.find(e,this._element))t(r)}}const IC="modal",Pt=".bs.modal",_C=".data-api",DC="Escape",LC=`hide${Pt}`,RC=`hidePrevented${Pt}`,im=`hidden${Pt}`,sm=`show${Pt}`,BC=`shown${Pt}`,PC=`resize${Pt}`,$C=`click.dismiss${Pt}`,FC=`mousedown.dismiss${Pt}`,VC=`keydown.dismiss${Pt}`,zC=`click${Pt}${_C}`,am="modal-open",HC="fade",lm="show",Ac="modal-static",UC=".modal.show",jC=".modal-dialog",WC=".modal-body",KC='[data-bs-toggle="modal"]',GC={backdrop:!0,focus:!0,keyboard:!0},YC={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class gr extends Yt{constructor(e,t){super(e,t),this._dialog=Ee.findOne(jC,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new Tc,this._addEventListeners()}static get Default(){return GC}static get DefaultType(){return YC}static get NAME(){return IC}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){this._isShown||this._isTransitioning||ne.trigger(this._element,sm,{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(am),this._adjustDialog(),this._backdrop.show(()=>this._showElement(e)))}hide(){!this._isShown||this._isTransitioning||ne.trigger(this._element,LC).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(lm),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated()))}dispose(){ne.off(window,Pt),ne.off(this._dialog,Pt),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new qp({isVisible:!!this._config.backdrop,isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new tm({trapElement:this._element})}_showElement(e){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const t=Ee.findOne(WC,this._dialog);t&&(t.scrollTop=0),Uo(this._element),this._element.classList.add(lm);const r=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,ne.trigger(this._element,BC,{relatedTarget:e})};this._queueCallback(r,this._dialog,this._isAnimated())}_addEventListeners(){ne.on(this._element,VC,e=>{if(e.key===DC){if(this._config.keyboard){this.hide();return}this._triggerBackdropTransition()}}),ne.on(window,PC,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),ne.on(this._element,FC,e=>{ne.one(this._element,$C,t=>{if(!(this._element!==e.target||this._element!==t.target)){if(this._config.backdrop==="static"){this._triggerBackdropTransition();return}this._config.backdrop&&this.hide()}})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(am),this._resetAdjustments(),this._scrollBar.reset(),ne.trigger(this._element,im)})}_isAnimated(){return this._element.classList.contains(HC)}_triggerBackdropTransition(){if(ne.trigger(this._element,RC).defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight,r=this._element.style.overflowY;r==="hidden"||this._element.classList.contains(Ac)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add(Ac),this._queueCallback(()=>{this._element.classList.remove(Ac),this._queueCallback(()=>{this._element.style.overflowY=r},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._scrollBar.getWidth(),r=t>0;if(r&&!e){const o=Rt()?"paddingLeft":"paddingRight";this._element.style[o]=`${t}px`}if(!r&&e){const o=Rt()?"paddingRight":"paddingLeft";this._element.style[o]=`${t}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(e,t){return this.each(function(){const r=gr.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof r[e]>"u")throw new TypeError(`No method named "${e}"`);r[e](t)}})}}ne.on(document,zC,KC,function(n){const e=Ee.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&n.preventDefault(),ne.one(e,sm,o=>{o.defaultPrevented||ne.one(e,im,()=>{Xr(this)&&this.focus()})});const t=Ee.findOne(UC);t&&gr.getInstance(t).hide(),gr.getOrCreateInstance(e).toggle(this)}),$s(gr),Bt(gr);const JC="offcanvas",En=".bs.offcanvas",cm=".data-api",ZC=`load${En}${cm}`,XC="Escape",um="show",dm="showing",fm="hiding",QC="offcanvas-backdrop",hm=".offcanvas.show",qC=`show${En}`,eS=`shown${En}`,tS=`hide${En}`,pm=`hidePrevented${En}`,mm=`hidden${En}`,nS=`resize${En}`,rS=`click${En}${cm}`,oS=`keydown.dismiss${En}`,iS='[data-bs-toggle="offcanvas"]',sS={backdrop:!0,keyboard:!0,scroll:!1},aS={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class jn extends Yt{constructor(e,t){super(e,t),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return sS}static get DefaultType(){return aS}static get NAME(){return JC}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){if(this._isShown||ne.trigger(this._element,qC,{relatedTarget:e}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||new Tc().hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(dm);const r=()=>{(!this._config.scroll||this._config.backdrop)&&this._focustrap.activate(),this._element.classList.add(um),this._element.classList.remove(dm),ne.trigger(this._element,eS,{relatedTarget:e})};this._queueCallback(r,this._element,!0)}hide(){if(!this._isShown||ne.trigger(this._element,tS).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(fm),this._backdrop.hide();const t=()=>{this._element.classList.remove(um,fm),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||new Tc().reset(),ne.trigger(this._element,mm)};this._queueCallback(t,this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const e=()=>{if(this._config.backdrop==="static"){ne.trigger(this._element,pm);return}this.hide()},t=!!this._config.backdrop;return new qp({className:QC,isVisible:t,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:t?e:null})}_initializeFocusTrap(){return new tm({trapElement:this._element})}_addEventListeners(){ne.on(this._element,oS,e=>{if(e.key===XC){if(this._config.keyboard){this.hide();return}ne.trigger(this._element,pm)}})}static jQueryInterface(e){return this.each(function(){const t=jn.getOrCreateInstance(this,e);if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e](this)}})}}ne.on(document,rS,iS,function(n){const e=Ee.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&n.preventDefault(),Hn(this))return;ne.one(e,mm,()=>{Xr(this)&&this.focus()});const t=Ee.findOne(hm);t&&t!==e&&jn.getInstance(t).hide(),jn.getOrCreateInstance(e).toggle(this)}),ne.on(window,ZC,()=>{for(const n of Ee.find(hm))jn.getOrCreateInstance(n).show()}),ne.on(window,nS,()=>{for(const n of Ee.find("[aria-modal][class*=show][class*=offcanvas-]"))getComputedStyle(n).position!=="fixed"&&jn.getOrCreateInstance(n).hide()}),$s(jn),Bt(jn);const gm={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},lS=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),cS=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,uS=(n,e)=>{const t=n.nodeName.toLowerCase();return e.includes(t)?lS.has(t)?!!cS.test(n.nodeValue):!0:e.filter(r=>r instanceof RegExp).some(r=>r.test(t))};function dS(n,e,t){if(!n.length)return n;if(t&&typeof t=="function")return t(n);const o=new window.DOMParser().parseFromString(n,"text/html"),i=[].concat(...o.body.querySelectorAll("*"));for(const s of i){const l=s.nodeName.toLowerCase();if(!Object.keys(e).includes(l)){s.remove();continue}const a=[].concat(...s.attributes),c=[].concat(e["*"]||[],e[l]||[]);for(const u of a)uS(u,c)||s.removeAttribute(u.nodeName)}return o.body.innerHTML}const fS="TemplateFactory",hS={allowList:gm,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"<div></div>"},pS={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},mS={entry:"(string|element|function|null)",selector:"(string|element)"};class gS extends jo{constructor(e){super(),this._config=this._getConfig(e)}static get Default(){return hS}static get DefaultType(){return pS}static get NAME(){return fS}getContent(){return Object.values(this._config.content).map(e=>this._resolvePossibleFunction(e)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(e){return this._checkContent(e),this._config.content={...this._config.content,...e},this}toHtml(){const e=document.createElement("div");e.innerHTML=this._maybeSanitize(this._config.template);for(const[o,i]of Object.entries(this._config.content))this._setContent(e,i,o);const t=e.children[0],r=this._resolvePossibleFunction(this._config.extraClass);return r&&t.classList.add(...r.split(" ")),t}_typeCheckConfig(e){super._typeCheckConfig(e),this._checkContent(e.content)}_checkContent(e){for(const[t,r]of Object.entries(e))super._typeCheckConfig({selector:t,entry:r},mS)}_setContent(e,t,r){const o=Ee.findOne(r,e);if(o){if(t=this._resolvePossibleFunction(t),!t){o.remove();return}if(yn(t)){this._putElementInTemplate(zn(t),o);return}if(this._config.html){o.innerHTML=this._maybeSanitize(t);return}o.textContent=t}}_maybeSanitize(e){return this._config.sanitize?dS(e,this._config.allowList,this._config.sanitizeFn):e}_resolvePossibleFunction(e){return bt(e,[this])}_putElementInTemplate(e,t){if(this._config.html){t.innerHTML="",t.append(e);return}t.textContent=e.textContent}}const yS="tooltip",vS=new Set(["sanitize","allowList","sanitizeFn"]),xc="fade",ES="modal",Ys="show",bS=".tooltip-inner",ym=`.${ES}`,vm="hide.bs.modal",Jo="hover",Oc="focus",CS="click",SS="manual",wS="hide",kS="hidden",TS="show",AS="shown",xS="inserted",OS="click",MS="focusin",NS="focusout",IS="mouseenter",_S="mouseleave",DS={AUTO:"auto",TOP:"top",RIGHT:Rt()?"left":"right",BOTTOM:"bottom",LEFT:Rt()?"right":"left"},LS={allowList:gm,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',title:"",trigger:"hover focus"},RS={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class yr extends Yt{constructor(e,t){if(typeof Mh>"u")throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(e,t),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return LS}static get DefaultType(){return RS}static get NAME(){return yS}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){if(this._isEnabled){if(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()){this._leave();return}this._enter()}}dispose(){clearTimeout(this._timeout),ne.off(this._element.closest(ym),vm,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if(this._element.style.display==="none")throw new Error("Please use show on visible elements");if(!(this._isWithContent()&&this._isEnabled))return;const e=ne.trigger(this._element,this.constructor.eventName(TS)),r=(xp(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(e.defaultPrevented||!r)return;this._disposePopper();const o=this._getTipElement();this._element.setAttribute("aria-describedby",o.getAttribute("id"));const{container:i}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(i.append(o),ne.trigger(this._element,this.constructor.eventName(xS))),this._popper=this._createPopper(o),o.classList.add(Ys),"ontouchstart"in document.documentElement)for(const l of[].concat(...document.body.children))ne.on(l,"mouseover",Ps);const s=()=>{ne.trigger(this._element,this.constructor.eventName(AS)),this._isHovered===!1&&this._leave(),this._isHovered=!1};this._queueCallback(s,this.tip,this._isAnimated())}hide(){if(!this._isShown()||ne.trigger(this._element,this.constructor.eventName(wS)).defaultPrevented)return;if(this._getTipElement().classList.remove(Ys),"ontouchstart"in document.documentElement)for(const o of[].concat(...document.body.children))ne.off(o,"mouseover",Ps);this._activeTrigger[CS]=!1,this._activeTrigger[Oc]=!1,this._activeTrigger[Jo]=!1,this._isHovered=null;const r=()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),ne.trigger(this._element,this.constructor.eventName(kS)))};this._queueCallback(r,this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return!!this._getTitle()}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(e){const t=this._getTemplateFactory(e).toHtml();if(!t)return null;t.classList.remove(xc,Ys),t.classList.add(`bs-${this.constructor.NAME}-auto`);const r=N8(this.constructor.NAME).toString();return t.setAttribute("id",r),this._isAnimated()&&t.classList.add(xc),t}setContent(e){this._newContent=e,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(e){return this._templateFactory?this._templateFactory.changeContent(e):this._templateFactory=new gS({...this._config,content:e,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[bS]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(e){return this.constructor.getOrCreateInstance(e.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(xc)}_isShown(){return this.tip&&this.tip.classList.contains(Ys)}_createPopper(e){const t=bt(this._config.placement,[this,e,this._element]),r=DS[t.toUpperCase()];return Gi(this._element,e,this._getPopperConfig(r))}_getOffset(){const{offset:e}=this._config;return typeof e=="string"?e.split(",").map(t=>Number.parseInt(t,10)):typeof e=="function"?t=>e(t,this._element):e}_resolvePossibleFunction(e){return bt(e,[this._element])}_getPopperConfig(e){const t={placement:e,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:r=>{this._getTipElement().setAttribute("data-popper-placement",r.state.placement)}}]};return{...t,...bt(this._config.popperConfig,[t])}}_setListeners(){const e=this._config.trigger.split(" ");for(const t of e)if(t==="click")ne.on(this._element,this.constructor.eventName(OS),this._config.selector,r=>{this._initializeOnDelegatedTarget(r).toggle()});else if(t!==SS){const r=t===Jo?this.constructor.eventName(IS):this.constructor.eventName(MS),o=t===Jo?this.constructor.eventName(_S):this.constructor.eventName(NS);ne.on(this._element,r,this._config.selector,i=>{const s=this._initializeOnDelegatedTarget(i);s._activeTrigger[i.type==="focusin"?Oc:Jo]=!0,s._enter()}),ne.on(this._element,o,this._config.selector,i=>{const s=this._initializeOnDelegatedTarget(i);s._activeTrigger[i.type==="focusout"?Oc:Jo]=s._element.contains(i.relatedTarget),s._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},ne.on(this._element.closest(ym),vm,this._hideModalHandler)}_fixTitle(){const e=this._element.getAttribute("title");e&&(!this._element.getAttribute("aria-label")&&!this._element.textContent.trim()&&this._element.setAttribute("aria-label",e),this._element.setAttribute("data-bs-original-title",e),this._element.removeAttribute("title"))}_enter(){if(this._isShown()||this._isHovered){this._isHovered=!0;return}this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show)}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(e,t){clearTimeout(this._timeout),this._timeout=setTimeout(e,t)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(e){const t=vn.getDataAttributes(this._element);for(const r of Object.keys(t))vS.has(r)&&delete t[r];return e={...t,...typeof e=="object"&&e?e:{}},e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e.container=e.container===!1?document.body:zn(e.container),typeof e.delay=="number"&&(e.delay={show:e.delay,hide:e.delay}),typeof e.title=="number"&&(e.title=e.title.toString()),typeof e.content=="number"&&(e.content=e.content.toString()),e}_getDelegateConfig(){const e={};for(const[t,r]of Object.entries(this._config))this.constructor.Default[t]!==r&&(e[t]=r);return e.selector=!1,e.trigger="manual",e}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(e){return this.each(function(){const t=yr.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof t[e]>"u")throw new TypeError(`No method named "${e}"`);t[e]()}})}}Bt(yr);const BS="popover",PS=".popover-header",$S=".popover-body",FS={...yr.Default,content:"",offset:[0,8],placement:"right",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>',trigger:"click"},VS={...yr.DefaultType,content:"(null|string|element|function)"};class Mc extends yr{static get Default(){return FS}static get DefaultType(){return VS}static get NAME(){return BS}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[PS]:this._getTitle(),[$S]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(e){return this.each(function(){const t=Mc.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof t[e]>"u")throw new TypeError(`No method named "${e}"`);t[e]()}})}}Bt(Mc);const zS="scrollspy",Nc=".bs.scrollspy",HS=".data-api",US=`activate${Nc}`,Em=`click${Nc}`,jS=`load${Nc}${HS}`,WS="dropdown-item",ro="active",KS='[data-bs-spy="scroll"]',Ic="[href]",GS=".nav, .list-group",bm=".nav-link",YS=`${bm}, .nav-item > ${bm}, .list-group-item`,JS=".dropdown",ZS=".dropdown-toggle",XS={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},QS={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Js extends Yt{constructor(e,t){super(e,t),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement=getComputedStyle(this._element).overflowY==="visible"?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return XS}static get DefaultType(){return QS}static get NAME(){return zS}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const e of this._observableSections.values())this._observer.observe(e)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(e){return e.target=zn(e.target)||document.body,e.rootMargin=e.offset?`${e.offset}px 0px -30%`:e.rootMargin,typeof e.threshold=="string"&&(e.threshold=e.threshold.split(",").map(t=>Number.parseFloat(t))),e}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(ne.off(this._config.target,Em),ne.on(this._config.target,Em,Ic,e=>{const t=this._observableSections.get(e.target.hash);if(t){e.preventDefault();const r=this._rootElement||window,o=t.offsetTop-this._element.offsetTop;if(r.scrollTo){r.scrollTo({top:o,behavior:"smooth"});return}r.scrollTop=o}}))}_getNewObserver(){const e={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(t=>this._observerCallback(t),e)}_observerCallback(e){const t=s=>this._targetLinks.get(`#${s.target.id}`),r=s=>{this._previousScrollData.visibleEntryTop=s.target.offsetTop,this._process(t(s))},o=(this._rootElement||document.documentElement).scrollTop,i=o>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=o;for(const s of e){if(!s.isIntersecting){this._activeTarget=null,this._clearActiveClass(t(s));continue}const l=s.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(i&&l){if(r(s),!o)return;continue}!i&&!l&&r(s)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const e=Ee.find(Ic,this._config.target);for(const t of e){if(!t.hash||Hn(t))continue;const r=Ee.findOne(decodeURI(t.hash),this._element);Xr(r)&&(this._targetLinks.set(decodeURI(t.hash),t),this._observableSections.set(t.hash,r))}}_process(e){this._activeTarget!==e&&(this._clearActiveClass(this._config.target),this._activeTarget=e,e.classList.add(ro),this._activateParents(e),ne.trigger(this._element,US,{relatedTarget:e}))}_activateParents(e){if(e.classList.contains(WS)){Ee.findOne(ZS,e.closest(JS)).classList.add(ro);return}for(const t of Ee.parents(e,GS))for(const r of Ee.prev(t,YS))r.classList.add(ro)}_clearActiveClass(e){e.classList.remove(ro);const t=Ee.find(`${Ic}.${ro}`,e);for(const r of t)r.classList.remove(ro)}static jQueryInterface(e){return this.each(function(){const t=Js.getOrCreateInstance(this,e);if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e]()}})}}ne.on(window,jS,()=>{for(const n of Ee.find(KS))Js.getOrCreateInstance(n)}),Bt(Js);const qS="tab",vr=".bs.tab",e6=`hide${vr}`,t6=`hidden${vr}`,n6=`show${vr}`,r6=`shown${vr}`,o6=`click${vr}`,i6=`keydown${vr}`,s6=`load${vr}`,a6="ArrowLeft",Cm="ArrowRight",l6="ArrowUp",Sm="ArrowDown",Er="active",wm="fade",_c="show",c6="dropdown",u6=".dropdown-toggle",d6=".dropdown-menu",Dc=":not(.dropdown-toggle)",f6='.list-group, .nav, [role="tablist"]',h6=".nav-item, .list-group-item",p6=`.nav-link${Dc}, .list-group-item${Dc}, [role="tab"]${Dc}`,km='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',Lc=`${p6}, ${km}`,m6=`.${Er}[data-bs-toggle="tab"], .${Er}[data-bs-toggle="pill"], .${Er}[data-bs-toggle="list"]`;class oo extends Yt{constructor(e){super(e),this._parent=this._element.closest(f6),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),ne.on(this._element,i6,t=>this._keydown(t)))}static get NAME(){return qS}show(){const e=this._element;if(this._elemIsActive(e))return;const t=this._getActiveElem(),r=t?ne.trigger(t,e6,{relatedTarget:e}):null;ne.trigger(e,n6,{relatedTarget:t}).defaultPrevented||r&&r.defaultPrevented||(this._deactivate(t,e),this._activate(e,t))}_activate(e,t){if(!e)return;e.classList.add(Er),this._activate(Ee.getElementFromSelector(e));const r=()=>{if(e.getAttribute("role")!=="tab"){e.classList.add(_c);return}e.removeAttribute("tabindex"),e.setAttribute("aria-selected",!0),this._toggleDropDown(e,!0),ne.trigger(e,r6,{relatedTarget:t})};this._queueCallback(r,e,e.classList.contains(wm))}_deactivate(e,t){if(!e)return;e.classList.remove(Er),e.blur(),this._deactivate(Ee.getElementFromSelector(e));const r=()=>{if(e.getAttribute("role")!=="tab"){e.classList.remove(_c);return}e.setAttribute("aria-selected",!1),e.setAttribute("tabindex","-1"),this._toggleDropDown(e,!1),ne.trigger(e,t6,{relatedTarget:t})};this._queueCallback(r,e,e.classList.contains(wm))}_keydown(e){if(![a6,Cm,l6,Sm].includes(e.key))return;e.stopPropagation(),e.preventDefault();const t=[Cm,Sm].includes(e.key),r=mc(this._getChildren().filter(o=>!Hn(o)),e.target,t,!0);r&&(r.focus({preventScroll:!0}),oo.getOrCreateInstance(r).show())}_getChildren(){return Ee.find(Lc,this._parent)}_getActiveElem(){return this._getChildren().find(e=>this._elemIsActive(e))||null}_setInitialAttributes(e,t){this._setAttributeIfNotExists(e,"role","tablist");for(const r of t)this._setInitialAttributesOnChild(r)}_setInitialAttributesOnChild(e){e=this._getInnerElement(e);const t=this._elemIsActive(e),r=this._getOuterElement(e);e.setAttribute("aria-selected",t),r!==e&&this._setAttributeIfNotExists(r,"role","presentation"),t||e.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(e,"role","tab"),this._setInitialAttributesOnTargetPanel(e)}_setInitialAttributesOnTargetPanel(e){const t=Ee.getElementFromSelector(e);t&&(this._setAttributeIfNotExists(t,"role","tabpanel"),e.id&&this._setAttributeIfNotExists(t,"aria-labelledby",`${e.id}`))}_toggleDropDown(e,t){const r=this._getOuterElement(e);if(!r.classList.contains(c6))return;const o=(i,s)=>{const l=Ee.findOne(i,r);l&&l.classList.toggle(s,t)};o(u6,Er),o(d6,_c),r.setAttribute("aria-expanded",t)}_setAttributeIfNotExists(e,t,r){e.hasAttribute(t)||e.setAttribute(t,r)}_elemIsActive(e){return e.classList.contains(Er)}_getInnerElement(e){return e.matches(Lc)?e:Ee.findOne(Lc,e)}_getOuterElement(e){return e.closest(h6)||e}static jQueryInterface(e){return this.each(function(){const t=oo.getOrCreateInstance(this);if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e]()}})}}ne.on(document,o6,km,function(n){["A","AREA"].includes(this.tagName)&&n.preventDefault(),!Hn(this)&&oo.getOrCreateInstance(this).show()}),ne.on(window,s6,()=>{for(const n of Ee.find(m6))oo.getOrCreateInstance(n)}),Bt(oo);const g6="toast",Wn=".bs.toast",y6=`mouseover${Wn}`,v6=`mouseout${Wn}`,E6=`focusin${Wn}`,b6=`focusout${Wn}`,C6=`hide${Wn}`,S6=`hidden${Wn}`,w6=`show${Wn}`,k6=`shown${Wn}`,T6="fade",Tm="hide",Zs="show",Xs="showing",A6={animation:"boolean",autohide:"boolean",delay:"number"},x6={animation:!0,autohide:!0,delay:5e3};class Zo extends Yt{constructor(e,t){super(e,t),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return x6}static get DefaultType(){return A6}static get NAME(){return g6}show(){if(ne.trigger(this._element,w6).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(T6);const t=()=>{this._element.classList.remove(Xs),ne.trigger(this._element,k6),this._maybeScheduleHide()};this._element.classList.remove(Tm),Uo(this._element),this._element.classList.add(Zs,Xs),this._queueCallback(t,this._element,this._config.animation)}hide(){if(!this.isShown()||ne.trigger(this._element,C6).defaultPrevented)return;const t=()=>{this._element.classList.add(Tm),this._element.classList.remove(Xs,Zs),ne.trigger(this._element,S6)};this._element.classList.add(Xs),this._queueCallback(t,this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(Zs),super.dispose()}isShown(){return this._element.classList.contains(Zs)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(e,t){switch(e.type){case"mouseover":case"mouseout":{this._hasMouseInteraction=t;break}case"focusin":case"focusout":{this._hasKeyboardInteraction=t;break}}if(t){this._clearTimeout();return}const r=e.relatedTarget;this._element===r||this._element.contains(r)||this._maybeScheduleHide()}_setListeners(){ne.on(this._element,y6,e=>this._onInteraction(e,!0)),ne.on(this._element,v6,e=>this._onInteraction(e,!1)),ne.on(this._element,E6,e=>this._onInteraction(e,!0)),ne.on(this._element,b6,e=>this._onInteraction(e,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(e){return this.each(function(){const t=Zo.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof t[e]>"u")throw new TypeError(`No method named "${e}"`);t[e](this)}})}}$s(Zo),Bt(Zo);const O6=n=>{const e=f.ref(null);return{showModal:()=>{const o=document.getElementById(n);o instanceof HTMLElement?(e.value||(e.value=new gr(o,{})),e.value.show()):console.error(`Modal '${n}' niet gevonden.`)},closeModal:()=>{e.value&&e.value.hide()}}};function Am(n=void 0){const e=l=>i("Succesvol",l,Sr.SUCCESS),t=l=>i("Waarschuwing",l,Sr.WARNING),r=l=>i("Informatie",l,Sr.INFO),o=l=>i("Mislukt",l,Sr.DANGER);function i(l,a,c){const u=`toast-${au()}`,d={id:u,variant:c,title:l,text:a},h=document.querySelector(".toast-container");if(!h){console.error("There was no element with class 'toast-container' found, which is required for useToaster.");return}const p=f.h(va,d),g=f.createApp({render:()=>p}).mount(document.createElement("div"));h.appendChild(g.$el);const y=document.querySelector(`#${u}`);y&&(Zo.getOrCreateInstance(y,n).show(),s(y))}function s(l){function a(d,h){d.forEach(p=>{if(p.attributeName!="class")return;const m=p.target;if(m.classList.contains("hide")){m.remove(),h.disconnect();return}})}const c=new MutationObserver(a),u={attributes:!0};c.observe(l,u)}return{showSuccessToast:e,showInformationToast:r,showWarningToast:t,showDangerToast:o}}const M6=n=>Array.isArray(n)&&n.length>0,{showDangerToast:N6}=Am();function I6(n){const e=f.ref(null),t=(a,c="serverErrors")=>{var d;let u=[];if(Array.isArray((d=a==null?void 0:a.response)==null?void 0:d.data)?u=a.response.data.filter(h=>Bs(h.ErrorMessage)&&h.ErrorMessage!==uc):a.response.data.ErrorMessage?u=[a.response.data.ErrorMessage]:u=null,Bs(c))e.value=u;else if(Array.isArray(c)){let h=e.value;for(let p=0;p<c.length;p++)p===c.length-1?h[c[p]]=u:h=h[c[p]]}r(a),s(e)},r=a=>{const u=new URL(a.request.responseURL).pathname;if(u in n.error){const d=n.error[u];d&&N6(d)}},o=f.ref(null),i=f.ref(""),s=a=>{M6(a.value)?o.value=a.value.map(c=>Bs(c)?c:c.ErrorMessage):Bs(a.value)&&(i.value=a.value)};function l(){e.value=null,o.value=null,i.value=uc}return{serverErrors:e,errorMessages:o,errorMessageText:i,MapErrors:s,MapServerErrors:t,ResetServerErrors:l}}const xm={mounted:n=>{new yr(n)}},_6={PRIMARY:"primary",SECONDARY:"secondary",COLLEAGUE:"colleague",DANGER:"danger",OUT_PRIMARY:"outline-primary",OUT_PRIMARY_DARK:"outline-primary-dark",OUT_TERTIARY:"outline-tertiary",OUT_LINK:"link",LIGHT:"light",DARK:"dark",REMOVE:"remove"},pt=f.defineComponent({__name:"BDButton",props:{size:{default:st.MD},variant:{default:_6.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=f.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=f.computed(()=>t.to?Cr:"button"),i=f.computed(()=>{const l={};return t.to?(l.to=t.to,l.role="button"):l.type="submit",l}),s=l=>{e("click",l)};return(l,a)=>(f.openBlock(),f.createBlock(f.resolveDynamicComponent(o.value),f.mergeProps({class:["bd-btn",r.value]},i.value,{onClick:s}),{default:f.withCtx(()=>[f.renderSlot(l.$slots,"default",{},()=>[f.createTextVNode(f.toDisplayString(t.text),1)])]),_:3},16,["class"]))}}),D6={install:n=>{n.component("BDCol",zc),n.component("BDContainer",Hc),n.component("BDRow",Uc),n.component("BDButton",pt),n.component("BDLogo",ha),n.component("BDLink",Cr),n.component("BDDropdownItem",si),n.component("BDDropdown",dc),n.component("BDAlert",tu),n.component("BDProfileImage",lo),n.component("BDZoomslider",ou),n.component("BDCard",ma),n.component("BDCollapsableCard",lu),n.component("BDFormInput",hu),n.component("BDInputGroup",pu),n.component("BDFormInvalidFeedback",ii),n.component("BDBadge",mu),n.component("BDForm",gu),n.component("BDPagination",yu),n.component("BDDropzone",wu),n.component("BDMarkdownEditor",Ep),n.component("BDModal",kp),n.component("BDFormSelect",vu),n.component("BDUser",bp),n.component("BDArticle",bu),n.component("BDFormCheckbox",Eu),n.component("BDToast",va),n.component("BDAttachmentPreviewList",Ds),n.component("BDImageAttachmentPreviewList",Ls),n.component("BDHeader",wp),n.component("BDMobileMenu",cc),n.component("BDChatCloud",Cp),n.component("BDTable",Sp),n.component("IconAcademy",jc),n.component("IconArrowDown",Wc),n.component("IconArrowUp",Kc),n.component("IconAttachment",Yn),n.component("IconBold",qs),n.component("IconBulletList",ea),n.component("IconCalendar",ta),n.component("IconCalendar",ta),n.component("IconCardView",Gc),n.component("IconCaretDown",na),n.component("IconCaretLeft",ra),n.component("IconCaretRight",oa),n.component("IconCheck",so),n.component("IconClose",Xo),n.component("IconDownloadImage",Qo),n.component("IconDownloadImage",Qo),n.component("IconEdit",Yc),n.component("IconError",qo),n.component("IconEyeShow",Jc),n.component("IconEyeSlash",Zc),n.component("IconFile",ia),n.component("IconHyperlink",sa),n.component("IconInfo",ei),n.component("IconItalic",aa),n.component("IconListView",Xc),n.component("IconMenu",ti),n.component("IconMenu",ti),n.component("IconOrderedList",la),n.component("IconRemove",ao),n.component("IconSort",Qc),n.component("IconSortAsc",ca),n.component("IconSortDesc",ua),n.component("IconSortNone",da),n.component("IconTriangleExclamation",qc),n.component("IconUnderline",fa),n.directive("vBDTooltip",xm)}};fe.BDAlert=tu,fe.BDArticle=bu,fe.BDAttachmentPreviewList=Ds,fe.BDBadge=mu,fe.BDButton=pt,fe.BDCard=ma,fe.BDChatCloud=Cp,fe.BDCol=zc,fe.BDCollapsableCard=lu,fe.BDContainer=Hc,fe.BDDropdown=dc,fe.BDDropdownItem=si,fe.BDDropzone=wu,fe.BDForm=gu,fe.BDFormCheckbox=Eu,fe.BDFormInput=hu,fe.BDFormInvalidFeedback=ii,fe.BDFormSelect=vu,fe.BDHeader=wp,fe.BDImageAttachmentPreviewList=Ls,fe.BDInputGroup=pu,fe.BDLink=Cr,fe.BDLogo=ha,fe.BDMarkdownEditor=Ep,fe.BDMobileMenu=cc,fe.BDModal=kp,fe.BDPagination=yu,fe.BDProfileImage=lo,fe.BDRow=Uc,fe.BDTable=Sp,fe.BDToast=va,fe.BDUser=bp,fe.BDZoomslider=ou,fe.IconAcademy=jc,fe.IconArrowDown=Wc,fe.IconArrowUp=Kc,fe.IconAttachment=Yn,fe.IconBold=qs,fe.IconBulletList=ea,fe.IconCalendar=ta,fe.IconCardView=Gc,fe.IconCaretDown=na,fe.IconCaretLeft=ra,fe.IconCaretRight=oa,fe.IconCheck=so,fe.IconClose=Xo,fe.IconDownloadImage=Qo,fe.IconEdit=Yc,fe.IconError=qo,fe.IconEyeShow=Jc,fe.IconEyeSlash=Zc,fe.IconFile=ia,fe.IconHyperlink=sa,fe.IconInfo=ei,fe.IconItalic=aa,fe.IconListView=Xc,fe.IconMenu=ti,fe.IconOrderedList=la,fe.IconRemove=ao,fe.IconSort=Qc,fe.IconSortAsc=ca,fe.IconSortDesc=ua,fe.IconSortNone=da,fe.IconTriangleExclamation=qc,fe.IconUnderline=fa,fe.default=D6,fe.useModal=O6,fe.useServerErrors=I6,fe.useToaster=Am,fe.vBdTooltip=xm,Object.defineProperties(fe,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
131
|
+
*/const Vn=new Map,fc={set(n,e,t){Vn.has(n)||Vn.set(n,new Map);const r=Vn.get(n);if(!r.has(e)&&r.size!==0){console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(r.keys())[0]}.`);return}r.set(e,t)},get(n,e){return Vn.has(n)&&Vn.get(n).get(e)||null},remove(n,e){if(!Vn.has(n))return;const t=Vn.get(n);t.delete(e),t.size===0&&Vn.delete(n)}},x8=1e6,O8=1e3,hc="transitionend",Tp=n=>(n&&window.CSS&&window.CSS.escape&&(n=n.replace(/#([^\s"#']+)/g,(e,t)=>`#${CSS.escape(t)}`)),n),M8=n=>n==null?`${n}`:Object.prototype.toString.call(n).match(/\s([a-z]+)/i)[1].toLowerCase(),N8=n=>{do n+=Math.floor(Math.random()*x8);while(document.getElementById(n));return n},I8=n=>{if(!n)return 0;let{transitionDuration:e,transitionDelay:t}=window.getComputedStyle(n);const r=Number.parseFloat(e),o=Number.parseFloat(t);return!r&&!o?0:(e=e.split(",")[0],t=t.split(",")[0],(Number.parseFloat(e)+Number.parseFloat(t))*O8)},Ap=n=>{n.dispatchEvent(new Event(hc))},yn=n=>!n||typeof n!="object"?!1:(typeof n.jquery<"u"&&(n=n[0]),typeof n.nodeType<"u"),zn=n=>yn(n)?n.jquery?n[0]:n:typeof n=="string"&&n.length>0?document.querySelector(Tp(n)):null,Xr=n=>{if(!yn(n)||n.getClientRects().length===0)return!1;const e=getComputedStyle(n).getPropertyValue("visibility")==="visible",t=n.closest("details:not([open])");if(!t)return e;if(t!==n){const r=n.closest("summary");if(r&&r.parentNode!==t||r===null)return!1}return e},Hn=n=>!n||n.nodeType!==Node.ELEMENT_NODE||n.classList.contains("disabled")?!0:typeof n.disabled<"u"?n.disabled:n.hasAttribute("disabled")&&n.getAttribute("disabled")!=="false",xp=n=>{if(!document.documentElement.attachShadow)return null;if(typeof n.getRootNode=="function"){const e=n.getRootNode();return e instanceof ShadowRoot?e:null}return n instanceof ShadowRoot?n:n.parentNode?xp(n.parentNode):null},Ps=()=>{},Uo=n=>{n.offsetHeight},Op=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,pc=[],_8=n=>{document.readyState==="loading"?(pc.length||document.addEventListener("DOMContentLoaded",()=>{for(const e of pc)e()}),pc.push(n)):n()},Rt=()=>document.documentElement.dir==="rtl",Bt=n=>{_8(()=>{const e=Op();if(e){const t=n.NAME,r=e.fn[t];e.fn[t]=n.jQueryInterface,e.fn[t].Constructor=n,e.fn[t].noConflict=()=>(e.fn[t]=r,n.jQueryInterface)}})},bt=(n,e=[],t=n)=>typeof n=="function"?n(...e):t,Mp=(n,e,t=!0)=>{if(!t){bt(n);return}const r=5,o=I8(e)+r;let i=!1;const s=({target:l})=>{l===e&&(i=!0,e.removeEventListener(hc,s),bt(n))};e.addEventListener(hc,s),setTimeout(()=>{i||Ap(e)},o)},mc=(n,e,t,r)=>{const o=n.length;let i=n.indexOf(e);return i===-1?!t&&r?n[o-1]:n[0]:(i+=t?1:-1,r&&(i=(i+o)%o),n[Math.max(0,Math.min(i,o-1))])},D8=/[^.]*(?=\..*)\.|.*/,L8=/\..*/,R8=/::\d+$/,gc={};let Np=1;const Ip={mouseenter:"mouseover",mouseleave:"mouseout"},B8=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function _p(n,e){return e&&`${e}::${Np++}`||n.uidEvent||Np++}function Dp(n){const e=_p(n);return n.uidEvent=e,gc[e]=gc[e]||{},gc[e]}function P8(n,e){return function t(r){return vc(r,{delegateTarget:n}),t.oneOff&&ne.off(n,r.type,e),e.apply(n,[r])}}function $8(n,e,t){return function r(o){const i=n.querySelectorAll(e);for(let{target:s}=o;s&&s!==this;s=s.parentNode)for(const l of i)if(l===s)return vc(o,{delegateTarget:s}),r.oneOff&&ne.off(n,o.type,e,t),t.apply(s,[o])}}function Lp(n,e,t=null){return Object.values(n).find(r=>r.callable===e&&r.delegationSelector===t)}function Rp(n,e,t){const r=typeof e=="string",o=r?t:e||t;let i=Pp(n);return B8.has(i)||(i=n),[r,o,i]}function Bp(n,e,t,r,o){if(typeof e!="string"||!n)return;let[i,s,l]=Rp(e,t,r);e in Ip&&(s=(m=>function(g){if(!g.relatedTarget||g.relatedTarget!==g.delegateTarget&&!g.delegateTarget.contains(g.relatedTarget))return m.call(this,g)})(s));const a=Dp(n),c=a[l]||(a[l]={}),u=Lp(c,s,i?t:null);if(u){u.oneOff=u.oneOff&&o;return}const d=_p(s,e.replace(D8,"")),h=i?$8(n,t,s):P8(n,s);h.delegationSelector=i?t:null,h.callable=s,h.oneOff=o,h.uidEvent=d,c[d]=h,n.addEventListener(l,h,i)}function yc(n,e,t,r,o){const i=Lp(e[t],r,o);i&&(n.removeEventListener(t,i,!!o),delete e[t][i.uidEvent])}function F8(n,e,t,r){const o=e[t]||{};for(const[i,s]of Object.entries(o))i.includes(r)&&yc(n,e,t,s.callable,s.delegationSelector)}function Pp(n){return n=n.replace(L8,""),Ip[n]||n}const ne={on(n,e,t,r){Bp(n,e,t,r,!1)},one(n,e,t,r){Bp(n,e,t,r,!0)},off(n,e,t,r){if(typeof e!="string"||!n)return;const[o,i,s]=Rp(e,t,r),l=s!==e,a=Dp(n),c=a[s]||{},u=e.startsWith(".");if(typeof i<"u"){if(!Object.keys(c).length)return;yc(n,a,s,i,o?t:null);return}if(u)for(const d of Object.keys(a))F8(n,a,d,e.slice(1));for(const[d,h]of Object.entries(c)){const p=d.replace(R8,"");(!l||e.includes(p))&&yc(n,a,s,h.callable,h.delegationSelector)}},trigger(n,e,t){if(typeof e!="string"||!n)return null;const r=Op(),o=Pp(e),i=e!==o;let s=null,l=!0,a=!0,c=!1;i&&r&&(s=r.Event(e,t),r(n).trigger(s),l=!s.isPropagationStopped(),a=!s.isImmediatePropagationStopped(),c=s.isDefaultPrevented());const u=vc(new Event(e,{bubbles:l,cancelable:!0}),t);return c&&u.preventDefault(),a&&n.dispatchEvent(u),u.defaultPrevented&&s&&s.preventDefault(),u}};function vc(n,e={}){for(const[t,r]of Object.entries(e))try{n[t]=r}catch{Object.defineProperty(n,t,{configurable:!0,get(){return r}})}return n}function $p(n){if(n==="true")return!0;if(n==="false")return!1;if(n===Number(n).toString())return Number(n);if(n===""||n==="null")return null;if(typeof n!="string")return n;try{return JSON.parse(decodeURIComponent(n))}catch{return n}}function Ec(n){return n.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}const vn={setDataAttribute(n,e,t){n.setAttribute(`data-bs-${Ec(e)}`,t)},removeDataAttribute(n,e){n.removeAttribute(`data-bs-${Ec(e)}`)},getDataAttributes(n){if(!n)return{};const e={},t=Object.keys(n.dataset).filter(r=>r.startsWith("bs")&&!r.startsWith("bsConfig"));for(const r of t){let o=r.replace(/^bs/,"");o=o.charAt(0).toLowerCase()+o.slice(1,o.length),e[o]=$p(n.dataset[r])}return e},getDataAttribute(n,e){return $p(n.getAttribute(`data-bs-${Ec(e)}`))}};class jo{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(e){return e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e}_mergeConfigObj(e,t){const r=yn(t)?vn.getDataAttribute(t,"config"):{};return{...this.constructor.Default,...typeof r=="object"?r:{},...yn(t)?vn.getDataAttributes(t):{},...typeof e=="object"?e:{}}}_typeCheckConfig(e,t=this.constructor.DefaultType){for(const[r,o]of Object.entries(t)){const i=e[r],s=yn(i)?"element":M8(i);if(!new RegExp(o).test(s))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${r}" provided type "${s}" but expected type "${o}".`)}}}const V8="5.3.0";class Yt extends jo{constructor(e,t){super(),e=zn(e),e&&(this._element=e,this._config=this._getConfig(t),fc.set(this._element,this.constructor.DATA_KEY,this))}dispose(){fc.remove(this._element,this.constructor.DATA_KEY),ne.off(this._element,this.constructor.EVENT_KEY);for(const e of Object.getOwnPropertyNames(this))this[e]=null}_queueCallback(e,t,r=!0){Mp(e,t,r)}_getConfig(e){return e=this._mergeConfigObj(e,this._element),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}static getInstance(e){return fc.get(zn(e),this.DATA_KEY)}static getOrCreateInstance(e,t={}){return this.getInstance(e)||new this(e,typeof t=="object"?t:null)}static get VERSION(){return V8}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(e){return`${e}${this.EVENT_KEY}`}}const bc=n=>{let e=n.getAttribute("data-bs-target");if(!e||e==="#"){let t=n.getAttribute("href");if(!t||!t.includes("#")&&!t.startsWith("."))return null;t.includes("#")&&!t.startsWith("#")&&(t=`#${t.split("#")[1]}`),e=t&&t!=="#"?t.trim():null}return Tp(e)},Ee={find(n,e=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(e,n))},findOne(n,e=document.documentElement){return Element.prototype.querySelector.call(e,n)},children(n,e){return[].concat(...n.children).filter(t=>t.matches(e))},parents(n,e){const t=[];let r=n.parentNode.closest(e);for(;r;)t.push(r),r=r.parentNode.closest(e);return t},prev(n,e){let t=n.previousElementSibling;for(;t;){if(t.matches(e))return[t];t=t.previousElementSibling}return[]},next(n,e){let t=n.nextElementSibling;for(;t;){if(t.matches(e))return[t];t=t.nextElementSibling}return[]},focusableChildren(n){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(t=>`${t}:not([tabindex^="-"])`).join(",");return this.find(e,n).filter(t=>!Hn(t)&&Xr(t))},getSelectorFromElement(n){const e=bc(n);return e&&Ee.findOne(e)?e:null},getElementFromSelector(n){const e=bc(n);return e?Ee.findOne(e):null},getMultipleElementsFromSelector(n){const e=bc(n);return e?Ee.find(e):[]}},$s=(n,e="hide")=>{const t=`click.dismiss${n.EVENT_KEY}`,r=n.NAME;ne.on(document,t,`[data-bs-dismiss="${r}"]`,function(o){if(["A","AREA"].includes(this.tagName)&&o.preventDefault(),Hn(this))return;const i=Ee.getElementFromSelector(this)||this.closest(`.${r}`);n.getOrCreateInstance(i)[e]()})},z8="alert",Fp=".bs.alert",H8=`close${Fp}`,U8=`closed${Fp}`,j8="fade",W8="show";class Fs extends Yt{static get NAME(){return z8}close(){if(ne.trigger(this._element,H8).defaultPrevented)return;this._element.classList.remove(W8);const t=this._element.classList.contains(j8);this._queueCallback(()=>this._destroyElement(),this._element,t)}_destroyElement(){this._element.remove(),ne.trigger(this._element,U8),this.dispose()}static jQueryInterface(e){return this.each(function(){const t=Fs.getOrCreateInstance(this);if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e](this)}})}}$s(Fs,"close"),Bt(Fs);const K8="button",G8=".bs.button",Y8=".data-api",J8="active",Vp='[data-bs-toggle="button"]',Z8=`click${G8}${Y8}`;class Vs extends Yt{static get NAME(){return K8}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(J8))}static jQueryInterface(e){return this.each(function(){const t=Vs.getOrCreateInstance(this);e==="toggle"&&t[e]()})}}ne.on(document,Z8,Vp,n=>{n.preventDefault();const e=n.target.closest(Vp);Vs.getOrCreateInstance(e).toggle()}),Bt(Vs);const X8="swipe",Qr=".bs.swipe",Q8=`touchstart${Qr}`,q8=`touchmove${Qr}`,e4=`touchend${Qr}`,t4=`pointerdown${Qr}`,n4=`pointerup${Qr}`,r4="touch",o4="pen",i4="pointer-event",s4=40,a4={endCallback:null,leftCallback:null,rightCallback:null},l4={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class zs extends jo{constructor(e,t){super(),this._element=e,!(!e||!zs.isSupported())&&(this._config=this._getConfig(t),this._deltaX=0,this._supportPointerEvents=!!window.PointerEvent,this._initEvents())}static get Default(){return a4}static get DefaultType(){return l4}static get NAME(){return X8}dispose(){ne.off(this._element,Qr)}_start(e){if(!this._supportPointerEvents){this._deltaX=e.touches[0].clientX;return}this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX)}_end(e){this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX-this._deltaX),this._handleSwipe(),bt(this._config.endCallback)}_move(e){this._deltaX=e.touches&&e.touches.length>1?0:e.touches[0].clientX-this._deltaX}_handleSwipe(){const e=Math.abs(this._deltaX);if(e<=s4)return;const t=e/this._deltaX;this._deltaX=0,t&&bt(t>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(ne.on(this._element,t4,e=>this._start(e)),ne.on(this._element,n4,e=>this._end(e)),this._element.classList.add(i4)):(ne.on(this._element,Q8,e=>this._start(e)),ne.on(this._element,q8,e=>this._move(e)),ne.on(this._element,e4,e=>this._end(e)))}_eventIsPointerPenTouch(e){return this._supportPointerEvents&&(e.pointerType===o4||e.pointerType===r4)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const c4="carousel",Un=".bs.carousel",zp=".data-api",u4="ArrowLeft",d4="ArrowRight",f4=500,Wo="next",qr="prev",eo="left",Hs="right",h4=`slide${Un}`,Cc=`slid${Un}`,p4=`keydown${Un}`,m4=`mouseenter${Un}`,g4=`mouseleave${Un}`,y4=`dragstart${Un}`,v4=`load${Un}${zp}`,E4=`click${Un}${zp}`,Hp="carousel",Us="active",b4="slide",C4="carousel-item-end",S4="carousel-item-start",w4="carousel-item-next",k4="carousel-item-prev",Up=".active",jp=".carousel-item",T4=Up+jp,A4=".carousel-item img",x4=".carousel-indicators",O4="[data-bs-slide], [data-bs-slide-to]",M4='[data-bs-ride="carousel"]',N4={[u4]:Hs,[d4]:eo},I4={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},_4={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Ko extends Yt{constructor(e,t){super(e,t),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=Ee.findOne(x4,this._element),this._addEventListeners(),this._config.ride===Hp&&this.cycle()}static get Default(){return I4}static get DefaultType(){return _4}static get NAME(){return c4}next(){this._slide(Wo)}nextWhenVisible(){!document.hidden&&Xr(this._element)&&this.next()}prev(){this._slide(qr)}pause(){this._isSliding&&Ap(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){if(this._config.ride){if(this._isSliding){ne.one(this._element,Cc,()=>this.cycle());return}this.cycle()}}to(e){const t=this._getItems();if(e>t.length-1||e<0)return;if(this._isSliding){ne.one(this._element,Cc,()=>this.to(e));return}const r=this._getItemIndex(this._getActive());if(r===e)return;const o=e>r?Wo:qr;this._slide(o,t[e])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(e){return e.defaultInterval=e.interval,e}_addEventListeners(){this._config.keyboard&&ne.on(this._element,p4,e=>this._keydown(e)),this._config.pause==="hover"&&(ne.on(this._element,m4,()=>this.pause()),ne.on(this._element,g4,()=>this._maybeEnableCycle())),this._config.touch&&zs.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const r of Ee.find(A4,this._element))ne.on(r,y4,o=>o.preventDefault());const t={leftCallback:()=>this._slide(this._directionToOrder(eo)),rightCallback:()=>this._slide(this._directionToOrder(Hs)),endCallback:()=>{this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),f4+this._config.interval))}};this._swipeHelper=new zs(this._element,t)}_keydown(e){if(/input|textarea/i.test(e.target.tagName))return;const t=N4[e.key];t&&(e.preventDefault(),this._slide(this._directionToOrder(t)))}_getItemIndex(e){return this._getItems().indexOf(e)}_setActiveIndicatorElement(e){if(!this._indicatorsElement)return;const t=Ee.findOne(Up,this._indicatorsElement);t.classList.remove(Us),t.removeAttribute("aria-current");const r=Ee.findOne(`[data-bs-slide-to="${e}"]`,this._indicatorsElement);r&&(r.classList.add(Us),r.setAttribute("aria-current","true"))}_updateInterval(){const e=this._activeElement||this._getActive();if(!e)return;const t=Number.parseInt(e.getAttribute("data-bs-interval"),10);this._config.interval=t||this._config.defaultInterval}_slide(e,t=null){if(this._isSliding)return;const r=this._getActive(),o=e===Wo,i=t||mc(this._getItems(),r,o,this._config.wrap);if(i===r)return;const s=this._getItemIndex(i),l=p=>ne.trigger(this._element,p,{relatedTarget:i,direction:this._orderToDirection(e),from:this._getItemIndex(r),to:s});if(l(h4).defaultPrevented||!r||!i)return;const c=!!this._interval;this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(s),this._activeElement=i;const u=o?S4:C4,d=o?w4:k4;i.classList.add(d),Uo(i),r.classList.add(u),i.classList.add(u);const h=()=>{i.classList.remove(u,d),i.classList.add(Us),r.classList.remove(Us,d,u),this._isSliding=!1,l(Cc)};this._queueCallback(h,r,this._isAnimated()),c&&this.cycle()}_isAnimated(){return this._element.classList.contains(b4)}_getActive(){return Ee.findOne(T4,this._element)}_getItems(){return Ee.find(jp,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(e){return Rt()?e===eo?qr:Wo:e===eo?Wo:qr}_orderToDirection(e){return Rt()?e===qr?eo:Hs:e===qr?Hs:eo}static jQueryInterface(e){return this.each(function(){const t=Ko.getOrCreateInstance(this,e);if(typeof e=="number"){t.to(e);return}if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e]()}})}}ne.on(document,E4,O4,function(n){const e=Ee.getElementFromSelector(this);if(!e||!e.classList.contains(Hp))return;n.preventDefault();const t=Ko.getOrCreateInstance(e),r=this.getAttribute("data-bs-slide-to");if(r){t.to(r),t._maybeEnableCycle();return}if(vn.getDataAttribute(this,"slide")==="next"){t.next(),t._maybeEnableCycle();return}t.prev(),t._maybeEnableCycle()}),ne.on(window,v4,()=>{const n=Ee.find(M4);for(const e of n)Ko.getOrCreateInstance(e)}),Bt(Ko);const D4="collapse",Go=".bs.collapse",L4=".data-api",R4=`show${Go}`,B4=`shown${Go}`,P4=`hide${Go}`,$4=`hidden${Go}`,F4=`click${Go}${L4}`,Sc="show",to="collapse",js="collapsing",V4="collapsed",z4=`:scope .${to} .${to}`,H4="collapse-horizontal",U4="width",j4="height",W4=".collapse.show, .collapse.collapsing",wc='[data-bs-toggle="collapse"]',K4={parent:null,toggle:!0},G4={parent:"(null|element)",toggle:"boolean"};class Yo extends Yt{constructor(e,t){super(e,t),this._isTransitioning=!1,this._triggerArray=[];const r=Ee.find(wc);for(const o of r){const i=Ee.getSelectorFromElement(o),s=Ee.find(i).filter(l=>l===this._element);i!==null&&s.length&&this._triggerArray.push(o)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return K4}static get DefaultType(){return G4}static get NAME(){return D4}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let e=[];if(this._config.parent&&(e=this._getFirstLevelChildren(W4).filter(l=>l!==this._element).map(l=>Yo.getOrCreateInstance(l,{toggle:!1}))),e.length&&e[0]._isTransitioning||ne.trigger(this._element,R4).defaultPrevented)return;for(const l of e)l.hide();const r=this._getDimension();this._element.classList.remove(to),this._element.classList.add(js),this._element.style[r]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const o=()=>{this._isTransitioning=!1,this._element.classList.remove(js),this._element.classList.add(to,Sc),this._element.style[r]="",ne.trigger(this._element,B4)},s=`scroll${r[0].toUpperCase()+r.slice(1)}`;this._queueCallback(o,this._element,!0),this._element.style[r]=`${this._element[s]}px`}hide(){if(this._isTransitioning||!this._isShown()||ne.trigger(this._element,P4).defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,Uo(this._element),this._element.classList.add(js),this._element.classList.remove(to,Sc);for(const o of this._triggerArray){const i=Ee.getElementFromSelector(o);i&&!this._isShown(i)&&this._addAriaAndCollapsedClass([o],!1)}this._isTransitioning=!0;const r=()=>{this._isTransitioning=!1,this._element.classList.remove(js),this._element.classList.add(to),ne.trigger(this._element,$4)};this._element.style[t]="",this._queueCallback(r,this._element,!0)}_isShown(e=this._element){return e.classList.contains(Sc)}_configAfterMerge(e){return e.toggle=!!e.toggle,e.parent=zn(e.parent),e}_getDimension(){return this._element.classList.contains(H4)?U4:j4}_initializeChildren(){if(!this._config.parent)return;const e=this._getFirstLevelChildren(wc);for(const t of e){const r=Ee.getElementFromSelector(t);r&&this._addAriaAndCollapsedClass([t],this._isShown(r))}}_getFirstLevelChildren(e){const t=Ee.find(z4,this._config.parent);return Ee.find(e,this._config.parent).filter(r=>!t.includes(r))}_addAriaAndCollapsedClass(e,t){if(e.length)for(const r of e)r.classList.toggle(V4,!t),r.setAttribute("aria-expanded",t)}static jQueryInterface(e){const t={};return typeof e=="string"&&/show|hide/.test(e)&&(t.toggle=!1),this.each(function(){const r=Yo.getOrCreateInstance(this,t);if(typeof e=="string"){if(typeof r[e]>"u")throw new TypeError(`No method named "${e}"`);r[e]()}})}}ne.on(document,F4,wc,function(n){(n.target.tagName==="A"||n.delegateTarget&&n.delegateTarget.tagName==="A")&&n.preventDefault();for(const e of Ee.getMultipleElementsFromSelector(this))Yo.getOrCreateInstance(e,{toggle:!1}).toggle()}),Bt(Yo);const Wp="dropdown",pr=".bs.dropdown",kc=".data-api",Y4="Escape",Kp="Tab",J4="ArrowUp",Gp="ArrowDown",Z4=2,X4=`hide${pr}`,Q4=`hidden${pr}`,q4=`show${pr}`,eC=`shown${pr}`,Yp=`click${pr}${kc}`,Jp=`keydown${pr}${kc}`,tC=`keyup${pr}${kc}`,no="show",nC="dropup",rC="dropend",oC="dropstart",iC="dropup-center",sC="dropdown-center",mr='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',aC=`${mr}.${no}`,Ws=".dropdown-menu",lC=".navbar",cC=".navbar-nav",uC=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",dC=Rt()?"top-end":"top-start",fC=Rt()?"top-start":"top-end",hC=Rt()?"bottom-end":"bottom-start",pC=Rt()?"bottom-start":"bottom-end",mC=Rt()?"left-start":"right-start",gC=Rt()?"right-start":"left-start",yC="top",vC="bottom",EC={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},bC={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class an extends Yt{constructor(e,t){super(e,t),this._popper=null,this._parent=this._element.parentNode,this._menu=Ee.next(this._element,Ws)[0]||Ee.prev(this._element,Ws)[0]||Ee.findOne(Ws,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return EC}static get DefaultType(){return bC}static get NAME(){return Wp}toggle(){return this._isShown()?this.hide():this.show()}show(){if(Hn(this._element)||this._isShown())return;const e={relatedTarget:this._element};if(!ne.trigger(this._element,q4,e).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(cC))for(const r of[].concat(...document.body.children))ne.on(r,"mouseover",Ps);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(no),this._element.classList.add(no),ne.trigger(this._element,eC,e)}}hide(){if(Hn(this._element)||!this._isShown())return;const e={relatedTarget:this._element};this._completeHide(e)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(e){if(!ne.trigger(this._element,X4,e).defaultPrevented){if("ontouchstart"in document.documentElement)for(const r of[].concat(...document.body.children))ne.off(r,"mouseover",Ps);this._popper&&this._popper.destroy(),this._menu.classList.remove(no),this._element.classList.remove(no),this._element.setAttribute("aria-expanded","false"),vn.removeDataAttribute(this._menu,"popper"),ne.trigger(this._element,Q4,e)}}_getConfig(e){if(e=super._getConfig(e),typeof e.reference=="object"&&!yn(e.reference)&&typeof e.reference.getBoundingClientRect!="function")throw new TypeError(`${Wp.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return e}_createPopper(){if(typeof Mh>"u")throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let e=this._element;this._config.reference==="parent"?e=this._parent:yn(this._config.reference)?e=zn(this._config.reference):typeof this._config.reference=="object"&&(e=this._config.reference);const t=this._getPopperConfig();this._popper=Gi(e,this._menu,t)}_isShown(){return this._menu.classList.contains(no)}_getPlacement(){const e=this._parent;if(e.classList.contains(rC))return mC;if(e.classList.contains(oC))return gC;if(e.classList.contains(iC))return yC;if(e.classList.contains(sC))return vC;const t=getComputedStyle(this._menu).getPropertyValue("--bs-position").trim()==="end";return e.classList.contains(nC)?t?fC:dC:t?pC:hC}_detectNavbar(){return this._element.closest(lC)!==null}_getOffset(){const{offset:e}=this._config;return typeof e=="string"?e.split(",").map(t=>Number.parseInt(t,10)):typeof e=="function"?t=>e(t,this._element):e}_getPopperConfig(){const e={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||this._config.display==="static")&&(vn.setDataAttribute(this._menu,"popper","static"),e.modifiers=[{name:"applyStyles",enabled:!1}]),{...e,...bt(this._config.popperConfig,[e])}}_selectMenuItem({key:e,target:t}){const r=Ee.find(uC,this._menu).filter(o=>Xr(o));r.length&&mc(r,t,e===Gp,!r.includes(t)).focus()}static jQueryInterface(e){return this.each(function(){const t=an.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof t[e]>"u")throw new TypeError(`No method named "${e}"`);t[e]()}})}static clearMenus(e){if(e.button===Z4||e.type==="keyup"&&e.key!==Kp)return;const t=Ee.find(aC);for(const r of t){const o=an.getInstance(r);if(!o||o._config.autoClose===!1)continue;const i=e.composedPath(),s=i.includes(o._menu);if(i.includes(o._element)||o._config.autoClose==="inside"&&!s||o._config.autoClose==="outside"&&s||o._menu.contains(e.target)&&(e.type==="keyup"&&e.key===Kp||/input|select|option|textarea|form/i.test(e.target.tagName)))continue;const l={relatedTarget:o._element};e.type==="click"&&(l.clickEvent=e),o._completeHide(l)}}static dataApiKeydownHandler(e){const t=/input|textarea/i.test(e.target.tagName),r=e.key===Y4,o=[J4,Gp].includes(e.key);if(!o&&!r||t&&!r)return;e.preventDefault();const i=this.matches(mr)?this:Ee.prev(this,mr)[0]||Ee.next(this,mr)[0]||Ee.findOne(mr,e.delegateTarget.parentNode),s=an.getOrCreateInstance(i);if(o){e.stopPropagation(),s.show(),s._selectMenuItem(e);return}s._isShown()&&(e.stopPropagation(),s.hide(),i.focus())}}ne.on(document,Jp,mr,an.dataApiKeydownHandler),ne.on(document,Jp,Ws,an.dataApiKeydownHandler),ne.on(document,Yp,an.clearMenus),ne.on(document,tC,an.clearMenus),ne.on(document,Yp,mr,function(n){n.preventDefault(),an.getOrCreateInstance(this).toggle()}),Bt(an);const Zp="backdrop",CC="fade",Xp="show",Qp=`mousedown.bs.${Zp}`,SC={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},wC={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class qp extends jo{constructor(e){super(),this._config=this._getConfig(e),this._isAppended=!1,this._element=null}static get Default(){return SC}static get DefaultType(){return wC}static get NAME(){return Zp}show(e){if(!this._config.isVisible){bt(e);return}this._append();const t=this._getElement();this._config.isAnimated&&Uo(t),t.classList.add(Xp),this._emulateAnimation(()=>{bt(e)})}hide(e){if(!this._config.isVisible){bt(e);return}this._getElement().classList.remove(Xp),this._emulateAnimation(()=>{this.dispose(),bt(e)})}dispose(){this._isAppended&&(ne.off(this._element,Qp),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const e=document.createElement("div");e.className=this._config.className,this._config.isAnimated&&e.classList.add(CC),this._element=e}return this._element}_configAfterMerge(e){return e.rootElement=zn(e.rootElement),e}_append(){if(this._isAppended)return;const e=this._getElement();this._config.rootElement.append(e),ne.on(e,Qp,()=>{bt(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(e){Mp(e,this._getElement(),this._config.isAnimated)}}const kC="focustrap",Ks=".bs.focustrap",TC=`focusin${Ks}`,AC=`keydown.tab${Ks}`,xC="Tab",OC="forward",em="backward",MC={autofocus:!0,trapElement:null},NC={autofocus:"boolean",trapElement:"element"};class tm extends jo{constructor(e){super(),this._config=this._getConfig(e),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return MC}static get DefaultType(){return NC}static get NAME(){return kC}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),ne.off(document,Ks),ne.on(document,TC,e=>this._handleFocusin(e)),ne.on(document,AC,e=>this._handleKeydown(e)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,ne.off(document,Ks))}_handleFocusin(e){const{trapElement:t}=this._config;if(e.target===document||e.target===t||t.contains(e.target))return;const r=Ee.focusableChildren(t);r.length===0?t.focus():this._lastTabNavDirection===em?r[r.length-1].focus():r[0].focus()}_handleKeydown(e){e.key===xC&&(this._lastTabNavDirection=e.shiftKey?em:OC)}}const nm=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",rm=".sticky-top",Gs="padding-right",om="margin-right";class Tc{constructor(){this._element=document.body}getWidth(){const e=document.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}hide(){const e=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,Gs,t=>t+e),this._setElementAttributes(nm,Gs,t=>t+e),this._setElementAttributes(rm,om,t=>t-e)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,Gs),this._resetElementAttributes(nm,Gs),this._resetElementAttributes(rm,om)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(e,t,r){const o=this.getWidth(),i=s=>{if(s!==this._element&&window.innerWidth>s.clientWidth+o)return;this._saveInitialAttribute(s,t);const l=window.getComputedStyle(s).getPropertyValue(t);s.style.setProperty(t,`${r(Number.parseFloat(l))}px`)};this._applyManipulationCallback(e,i)}_saveInitialAttribute(e,t){const r=e.style.getPropertyValue(t);r&&vn.setDataAttribute(e,t,r)}_resetElementAttributes(e,t){const r=o=>{const i=vn.getDataAttribute(o,t);if(i===null){o.style.removeProperty(t);return}vn.removeDataAttribute(o,t),o.style.setProperty(t,i)};this._applyManipulationCallback(e,r)}_applyManipulationCallback(e,t){if(yn(e)){t(e);return}for(const r of Ee.find(e,this._element))t(r)}}const IC="modal",Pt=".bs.modal",_C=".data-api",DC="Escape",LC=`hide${Pt}`,RC=`hidePrevented${Pt}`,im=`hidden${Pt}`,sm=`show${Pt}`,BC=`shown${Pt}`,PC=`resize${Pt}`,$C=`click.dismiss${Pt}`,FC=`mousedown.dismiss${Pt}`,VC=`keydown.dismiss${Pt}`,zC=`click${Pt}${_C}`,am="modal-open",HC="fade",lm="show",Ac="modal-static",UC=".modal.show",jC=".modal-dialog",WC=".modal-body",KC='[data-bs-toggle="modal"]',GC={backdrop:!0,focus:!0,keyboard:!0},YC={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class gr extends Yt{constructor(e,t){super(e,t),this._dialog=Ee.findOne(jC,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new Tc,this._addEventListeners()}static get Default(){return GC}static get DefaultType(){return YC}static get NAME(){return IC}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){this._isShown||this._isTransitioning||ne.trigger(this._element,sm,{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(am),this._adjustDialog(),this._backdrop.show(()=>this._showElement(e)))}hide(){!this._isShown||this._isTransitioning||ne.trigger(this._element,LC).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(lm),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated()))}dispose(){ne.off(window,Pt),ne.off(this._dialog,Pt),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new qp({isVisible:!!this._config.backdrop,isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new tm({trapElement:this._element})}_showElement(e){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const t=Ee.findOne(WC,this._dialog);t&&(t.scrollTop=0),Uo(this._element),this._element.classList.add(lm);const r=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,ne.trigger(this._element,BC,{relatedTarget:e})};this._queueCallback(r,this._dialog,this._isAnimated())}_addEventListeners(){ne.on(this._element,VC,e=>{if(e.key===DC){if(this._config.keyboard){this.hide();return}this._triggerBackdropTransition()}}),ne.on(window,PC,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),ne.on(this._element,FC,e=>{ne.one(this._element,$C,t=>{if(!(this._element!==e.target||this._element!==t.target)){if(this._config.backdrop==="static"){this._triggerBackdropTransition();return}this._config.backdrop&&this.hide()}})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(am),this._resetAdjustments(),this._scrollBar.reset(),ne.trigger(this._element,im)})}_isAnimated(){return this._element.classList.contains(HC)}_triggerBackdropTransition(){if(ne.trigger(this._element,RC).defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight,r=this._element.style.overflowY;r==="hidden"||this._element.classList.contains(Ac)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add(Ac),this._queueCallback(()=>{this._element.classList.remove(Ac),this._queueCallback(()=>{this._element.style.overflowY=r},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._scrollBar.getWidth(),r=t>0;if(r&&!e){const o=Rt()?"paddingLeft":"paddingRight";this._element.style[o]=`${t}px`}if(!r&&e){const o=Rt()?"paddingRight":"paddingLeft";this._element.style[o]=`${t}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(e,t){return this.each(function(){const r=gr.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof r[e]>"u")throw new TypeError(`No method named "${e}"`);r[e](t)}})}}ne.on(document,zC,KC,function(n){const e=Ee.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&n.preventDefault(),ne.one(e,sm,o=>{o.defaultPrevented||ne.one(e,im,()=>{Xr(this)&&this.focus()})});const t=Ee.findOne(UC);t&&gr.getInstance(t).hide(),gr.getOrCreateInstance(e).toggle(this)}),$s(gr),Bt(gr);const JC="offcanvas",En=".bs.offcanvas",cm=".data-api",ZC=`load${En}${cm}`,XC="Escape",um="show",dm="showing",fm="hiding",QC="offcanvas-backdrop",hm=".offcanvas.show",qC=`show${En}`,eS=`shown${En}`,tS=`hide${En}`,pm=`hidePrevented${En}`,mm=`hidden${En}`,nS=`resize${En}`,rS=`click${En}${cm}`,oS=`keydown.dismiss${En}`,iS='[data-bs-toggle="offcanvas"]',sS={backdrop:!0,keyboard:!0,scroll:!1},aS={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class jn extends Yt{constructor(e,t){super(e,t),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return sS}static get DefaultType(){return aS}static get NAME(){return JC}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){if(this._isShown||ne.trigger(this._element,qC,{relatedTarget:e}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||new Tc().hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(dm);const r=()=>{(!this._config.scroll||this._config.backdrop)&&this._focustrap.activate(),this._element.classList.add(um),this._element.classList.remove(dm),ne.trigger(this._element,eS,{relatedTarget:e})};this._queueCallback(r,this._element,!0)}hide(){if(!this._isShown||ne.trigger(this._element,tS).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(fm),this._backdrop.hide();const t=()=>{this._element.classList.remove(um,fm),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||new Tc().reset(),ne.trigger(this._element,mm)};this._queueCallback(t,this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const e=()=>{if(this._config.backdrop==="static"){ne.trigger(this._element,pm);return}this.hide()},t=!!this._config.backdrop;return new qp({className:QC,isVisible:t,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:t?e:null})}_initializeFocusTrap(){return new tm({trapElement:this._element})}_addEventListeners(){ne.on(this._element,oS,e=>{if(e.key===XC){if(this._config.keyboard){this.hide();return}ne.trigger(this._element,pm)}})}static jQueryInterface(e){return this.each(function(){const t=jn.getOrCreateInstance(this,e);if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e](this)}})}}ne.on(document,rS,iS,function(n){const e=Ee.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&n.preventDefault(),Hn(this))return;ne.one(e,mm,()=>{Xr(this)&&this.focus()});const t=Ee.findOne(hm);t&&t!==e&&jn.getInstance(t).hide(),jn.getOrCreateInstance(e).toggle(this)}),ne.on(window,ZC,()=>{for(const n of Ee.find(hm))jn.getOrCreateInstance(n).show()}),ne.on(window,nS,()=>{for(const n of Ee.find("[aria-modal][class*=show][class*=offcanvas-]"))getComputedStyle(n).position!=="fixed"&&jn.getOrCreateInstance(n).hide()}),$s(jn),Bt(jn);const gm={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},lS=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),cS=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,uS=(n,e)=>{const t=n.nodeName.toLowerCase();return e.includes(t)?lS.has(t)?!!cS.test(n.nodeValue):!0:e.filter(r=>r instanceof RegExp).some(r=>r.test(t))};function dS(n,e,t){if(!n.length)return n;if(t&&typeof t=="function")return t(n);const o=new window.DOMParser().parseFromString(n,"text/html"),i=[].concat(...o.body.querySelectorAll("*"));for(const s of i){const l=s.nodeName.toLowerCase();if(!Object.keys(e).includes(l)){s.remove();continue}const a=[].concat(...s.attributes),c=[].concat(e["*"]||[],e[l]||[]);for(const u of a)uS(u,c)||s.removeAttribute(u.nodeName)}return o.body.innerHTML}const fS="TemplateFactory",hS={allowList:gm,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"<div></div>"},pS={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},mS={entry:"(string|element|function|null)",selector:"(string|element)"};class gS extends jo{constructor(e){super(),this._config=this._getConfig(e)}static get Default(){return hS}static get DefaultType(){return pS}static get NAME(){return fS}getContent(){return Object.values(this._config.content).map(e=>this._resolvePossibleFunction(e)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(e){return this._checkContent(e),this._config.content={...this._config.content,...e},this}toHtml(){const e=document.createElement("div");e.innerHTML=this._maybeSanitize(this._config.template);for(const[o,i]of Object.entries(this._config.content))this._setContent(e,i,o);const t=e.children[0],r=this._resolvePossibleFunction(this._config.extraClass);return r&&t.classList.add(...r.split(" ")),t}_typeCheckConfig(e){super._typeCheckConfig(e),this._checkContent(e.content)}_checkContent(e){for(const[t,r]of Object.entries(e))super._typeCheckConfig({selector:t,entry:r},mS)}_setContent(e,t,r){const o=Ee.findOne(r,e);if(o){if(t=this._resolvePossibleFunction(t),!t){o.remove();return}if(yn(t)){this._putElementInTemplate(zn(t),o);return}if(this._config.html){o.innerHTML=this._maybeSanitize(t);return}o.textContent=t}}_maybeSanitize(e){return this._config.sanitize?dS(e,this._config.allowList,this._config.sanitizeFn):e}_resolvePossibleFunction(e){return bt(e,[this])}_putElementInTemplate(e,t){if(this._config.html){t.innerHTML="",t.append(e);return}t.textContent=e.textContent}}const yS="tooltip",vS=new Set(["sanitize","allowList","sanitizeFn"]),xc="fade",ES="modal",Ys="show",bS=".tooltip-inner",ym=`.${ES}`,vm="hide.bs.modal",Jo="hover",Oc="focus",CS="click",SS="manual",wS="hide",kS="hidden",TS="show",AS="shown",xS="inserted",OS="click",MS="focusin",NS="focusout",IS="mouseenter",_S="mouseleave",DS={AUTO:"auto",TOP:"top",RIGHT:Rt()?"left":"right",BOTTOM:"bottom",LEFT:Rt()?"right":"left"},LS={allowList:gm,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',title:"",trigger:"hover focus"},RS={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class yr extends Yt{constructor(e,t){if(typeof Mh>"u")throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(e,t),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return LS}static get DefaultType(){return RS}static get NAME(){return yS}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){if(this._isEnabled){if(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()){this._leave();return}this._enter()}}dispose(){clearTimeout(this._timeout),ne.off(this._element.closest(ym),vm,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if(this._element.style.display==="none")throw new Error("Please use show on visible elements");if(!(this._isWithContent()&&this._isEnabled))return;const e=ne.trigger(this._element,this.constructor.eventName(TS)),r=(xp(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(e.defaultPrevented||!r)return;this._disposePopper();const o=this._getTipElement();this._element.setAttribute("aria-describedby",o.getAttribute("id"));const{container:i}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(i.append(o),ne.trigger(this._element,this.constructor.eventName(xS))),this._popper=this._createPopper(o),o.classList.add(Ys),"ontouchstart"in document.documentElement)for(const l of[].concat(...document.body.children))ne.on(l,"mouseover",Ps);const s=()=>{ne.trigger(this._element,this.constructor.eventName(AS)),this._isHovered===!1&&this._leave(),this._isHovered=!1};this._queueCallback(s,this.tip,this._isAnimated())}hide(){if(!this._isShown()||ne.trigger(this._element,this.constructor.eventName(wS)).defaultPrevented)return;if(this._getTipElement().classList.remove(Ys),"ontouchstart"in document.documentElement)for(const o of[].concat(...document.body.children))ne.off(o,"mouseover",Ps);this._activeTrigger[CS]=!1,this._activeTrigger[Oc]=!1,this._activeTrigger[Jo]=!1,this._isHovered=null;const r=()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),ne.trigger(this._element,this.constructor.eventName(kS)))};this._queueCallback(r,this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return!!this._getTitle()}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(e){const t=this._getTemplateFactory(e).toHtml();if(!t)return null;t.classList.remove(xc,Ys),t.classList.add(`bs-${this.constructor.NAME}-auto`);const r=N8(this.constructor.NAME).toString();return t.setAttribute("id",r),this._isAnimated()&&t.classList.add(xc),t}setContent(e){this._newContent=e,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(e){return this._templateFactory?this._templateFactory.changeContent(e):this._templateFactory=new gS({...this._config,content:e,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[bS]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(e){return this.constructor.getOrCreateInstance(e.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(xc)}_isShown(){return this.tip&&this.tip.classList.contains(Ys)}_createPopper(e){const t=bt(this._config.placement,[this,e,this._element]),r=DS[t.toUpperCase()];return Gi(this._element,e,this._getPopperConfig(r))}_getOffset(){const{offset:e}=this._config;return typeof e=="string"?e.split(",").map(t=>Number.parseInt(t,10)):typeof e=="function"?t=>e(t,this._element):e}_resolvePossibleFunction(e){return bt(e,[this._element])}_getPopperConfig(e){const t={placement:e,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:r=>{this._getTipElement().setAttribute("data-popper-placement",r.state.placement)}}]};return{...t,...bt(this._config.popperConfig,[t])}}_setListeners(){const e=this._config.trigger.split(" ");for(const t of e)if(t==="click")ne.on(this._element,this.constructor.eventName(OS),this._config.selector,r=>{this._initializeOnDelegatedTarget(r).toggle()});else if(t!==SS){const r=t===Jo?this.constructor.eventName(IS):this.constructor.eventName(MS),o=t===Jo?this.constructor.eventName(_S):this.constructor.eventName(NS);ne.on(this._element,r,this._config.selector,i=>{const s=this._initializeOnDelegatedTarget(i);s._activeTrigger[i.type==="focusin"?Oc:Jo]=!0,s._enter()}),ne.on(this._element,o,this._config.selector,i=>{const s=this._initializeOnDelegatedTarget(i);s._activeTrigger[i.type==="focusout"?Oc:Jo]=s._element.contains(i.relatedTarget),s._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},ne.on(this._element.closest(ym),vm,this._hideModalHandler)}_fixTitle(){const e=this._element.getAttribute("title");e&&(!this._element.getAttribute("aria-label")&&!this._element.textContent.trim()&&this._element.setAttribute("aria-label",e),this._element.setAttribute("data-bs-original-title",e),this._element.removeAttribute("title"))}_enter(){if(this._isShown()||this._isHovered){this._isHovered=!0;return}this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show)}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(e,t){clearTimeout(this._timeout),this._timeout=setTimeout(e,t)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(e){const t=vn.getDataAttributes(this._element);for(const r of Object.keys(t))vS.has(r)&&delete t[r];return e={...t,...typeof e=="object"&&e?e:{}},e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e.container=e.container===!1?document.body:zn(e.container),typeof e.delay=="number"&&(e.delay={show:e.delay,hide:e.delay}),typeof e.title=="number"&&(e.title=e.title.toString()),typeof e.content=="number"&&(e.content=e.content.toString()),e}_getDelegateConfig(){const e={};for(const[t,r]of Object.entries(this._config))this.constructor.Default[t]!==r&&(e[t]=r);return e.selector=!1,e.trigger="manual",e}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(e){return this.each(function(){const t=yr.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof t[e]>"u")throw new TypeError(`No method named "${e}"`);t[e]()}})}}Bt(yr);const BS="popover",PS=".popover-header",$S=".popover-body",FS={...yr.Default,content:"",offset:[0,8],placement:"right",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>',trigger:"click"},VS={...yr.DefaultType,content:"(null|string|element|function)"};class Mc extends yr{static get Default(){return FS}static get DefaultType(){return VS}static get NAME(){return BS}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[PS]:this._getTitle(),[$S]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(e){return this.each(function(){const t=Mc.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof t[e]>"u")throw new TypeError(`No method named "${e}"`);t[e]()}})}}Bt(Mc);const zS="scrollspy",Nc=".bs.scrollspy",HS=".data-api",US=`activate${Nc}`,Em=`click${Nc}`,jS=`load${Nc}${HS}`,WS="dropdown-item",ro="active",KS='[data-bs-spy="scroll"]',Ic="[href]",GS=".nav, .list-group",bm=".nav-link",YS=`${bm}, .nav-item > ${bm}, .list-group-item`,JS=".dropdown",ZS=".dropdown-toggle",XS={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},QS={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Js extends Yt{constructor(e,t){super(e,t),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement=getComputedStyle(this._element).overflowY==="visible"?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return XS}static get DefaultType(){return QS}static get NAME(){return zS}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const e of this._observableSections.values())this._observer.observe(e)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(e){return e.target=zn(e.target)||document.body,e.rootMargin=e.offset?`${e.offset}px 0px -30%`:e.rootMargin,typeof e.threshold=="string"&&(e.threshold=e.threshold.split(",").map(t=>Number.parseFloat(t))),e}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(ne.off(this._config.target,Em),ne.on(this._config.target,Em,Ic,e=>{const t=this._observableSections.get(e.target.hash);if(t){e.preventDefault();const r=this._rootElement||window,o=t.offsetTop-this._element.offsetTop;if(r.scrollTo){r.scrollTo({top:o,behavior:"smooth"});return}r.scrollTop=o}}))}_getNewObserver(){const e={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(t=>this._observerCallback(t),e)}_observerCallback(e){const t=s=>this._targetLinks.get(`#${s.target.id}`),r=s=>{this._previousScrollData.visibleEntryTop=s.target.offsetTop,this._process(t(s))},o=(this._rootElement||document.documentElement).scrollTop,i=o>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=o;for(const s of e){if(!s.isIntersecting){this._activeTarget=null,this._clearActiveClass(t(s));continue}const l=s.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(i&&l){if(r(s),!o)return;continue}!i&&!l&&r(s)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const e=Ee.find(Ic,this._config.target);for(const t of e){if(!t.hash||Hn(t))continue;const r=Ee.findOne(decodeURI(t.hash),this._element);Xr(r)&&(this._targetLinks.set(decodeURI(t.hash),t),this._observableSections.set(t.hash,r))}}_process(e){this._activeTarget!==e&&(this._clearActiveClass(this._config.target),this._activeTarget=e,e.classList.add(ro),this._activateParents(e),ne.trigger(this._element,US,{relatedTarget:e}))}_activateParents(e){if(e.classList.contains(WS)){Ee.findOne(ZS,e.closest(JS)).classList.add(ro);return}for(const t of Ee.parents(e,GS))for(const r of Ee.prev(t,YS))r.classList.add(ro)}_clearActiveClass(e){e.classList.remove(ro);const t=Ee.find(`${Ic}.${ro}`,e);for(const r of t)r.classList.remove(ro)}static jQueryInterface(e){return this.each(function(){const t=Js.getOrCreateInstance(this,e);if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e]()}})}}ne.on(window,jS,()=>{for(const n of Ee.find(KS))Js.getOrCreateInstance(n)}),Bt(Js);const qS="tab",vr=".bs.tab",e6=`hide${vr}`,t6=`hidden${vr}`,n6=`show${vr}`,r6=`shown${vr}`,o6=`click${vr}`,i6=`keydown${vr}`,s6=`load${vr}`,a6="ArrowLeft",Cm="ArrowRight",l6="ArrowUp",Sm="ArrowDown",Er="active",wm="fade",_c="show",c6="dropdown",u6=".dropdown-toggle",d6=".dropdown-menu",Dc=":not(.dropdown-toggle)",f6='.list-group, .nav, [role="tablist"]',h6=".nav-item, .list-group-item",p6=`.nav-link${Dc}, .list-group-item${Dc}, [role="tab"]${Dc}`,km='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',Lc=`${p6}, ${km}`,m6=`.${Er}[data-bs-toggle="tab"], .${Er}[data-bs-toggle="pill"], .${Er}[data-bs-toggle="list"]`;class oo extends Yt{constructor(e){super(e),this._parent=this._element.closest(f6),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),ne.on(this._element,i6,t=>this._keydown(t)))}static get NAME(){return qS}show(){const e=this._element;if(this._elemIsActive(e))return;const t=this._getActiveElem(),r=t?ne.trigger(t,e6,{relatedTarget:e}):null;ne.trigger(e,n6,{relatedTarget:t}).defaultPrevented||r&&r.defaultPrevented||(this._deactivate(t,e),this._activate(e,t))}_activate(e,t){if(!e)return;e.classList.add(Er),this._activate(Ee.getElementFromSelector(e));const r=()=>{if(e.getAttribute("role")!=="tab"){e.classList.add(_c);return}e.removeAttribute("tabindex"),e.setAttribute("aria-selected",!0),this._toggleDropDown(e,!0),ne.trigger(e,r6,{relatedTarget:t})};this._queueCallback(r,e,e.classList.contains(wm))}_deactivate(e,t){if(!e)return;e.classList.remove(Er),e.blur(),this._deactivate(Ee.getElementFromSelector(e));const r=()=>{if(e.getAttribute("role")!=="tab"){e.classList.remove(_c);return}e.setAttribute("aria-selected",!1),e.setAttribute("tabindex","-1"),this._toggleDropDown(e,!1),ne.trigger(e,t6,{relatedTarget:t})};this._queueCallback(r,e,e.classList.contains(wm))}_keydown(e){if(![a6,Cm,l6,Sm].includes(e.key))return;e.stopPropagation(),e.preventDefault();const t=[Cm,Sm].includes(e.key),r=mc(this._getChildren().filter(o=>!Hn(o)),e.target,t,!0);r&&(r.focus({preventScroll:!0}),oo.getOrCreateInstance(r).show())}_getChildren(){return Ee.find(Lc,this._parent)}_getActiveElem(){return this._getChildren().find(e=>this._elemIsActive(e))||null}_setInitialAttributes(e,t){this._setAttributeIfNotExists(e,"role","tablist");for(const r of t)this._setInitialAttributesOnChild(r)}_setInitialAttributesOnChild(e){e=this._getInnerElement(e);const t=this._elemIsActive(e),r=this._getOuterElement(e);e.setAttribute("aria-selected",t),r!==e&&this._setAttributeIfNotExists(r,"role","presentation"),t||e.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(e,"role","tab"),this._setInitialAttributesOnTargetPanel(e)}_setInitialAttributesOnTargetPanel(e){const t=Ee.getElementFromSelector(e);t&&(this._setAttributeIfNotExists(t,"role","tabpanel"),e.id&&this._setAttributeIfNotExists(t,"aria-labelledby",`${e.id}`))}_toggleDropDown(e,t){const r=this._getOuterElement(e);if(!r.classList.contains(c6))return;const o=(i,s)=>{const l=Ee.findOne(i,r);l&&l.classList.toggle(s,t)};o(u6,Er),o(d6,_c),r.setAttribute("aria-expanded",t)}_setAttributeIfNotExists(e,t,r){e.hasAttribute(t)||e.setAttribute(t,r)}_elemIsActive(e){return e.classList.contains(Er)}_getInnerElement(e){return e.matches(Lc)?e:Ee.findOne(Lc,e)}_getOuterElement(e){return e.closest(h6)||e}static jQueryInterface(e){return this.each(function(){const t=oo.getOrCreateInstance(this);if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e]()}})}}ne.on(document,o6,km,function(n){["A","AREA"].includes(this.tagName)&&n.preventDefault(),!Hn(this)&&oo.getOrCreateInstance(this).show()}),ne.on(window,s6,()=>{for(const n of Ee.find(m6))oo.getOrCreateInstance(n)}),Bt(oo);const g6="toast",Wn=".bs.toast",y6=`mouseover${Wn}`,v6=`mouseout${Wn}`,E6=`focusin${Wn}`,b6=`focusout${Wn}`,C6=`hide${Wn}`,S6=`hidden${Wn}`,w6=`show${Wn}`,k6=`shown${Wn}`,T6="fade",Tm="hide",Zs="show",Xs="showing",A6={animation:"boolean",autohide:"boolean",delay:"number"},x6={animation:!0,autohide:!0,delay:5e3};class Zo extends Yt{constructor(e,t){super(e,t),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return x6}static get DefaultType(){return A6}static get NAME(){return g6}show(){if(ne.trigger(this._element,w6).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(T6);const t=()=>{this._element.classList.remove(Xs),ne.trigger(this._element,k6),this._maybeScheduleHide()};this._element.classList.remove(Tm),Uo(this._element),this._element.classList.add(Zs,Xs),this._queueCallback(t,this._element,this._config.animation)}hide(){if(!this.isShown()||ne.trigger(this._element,C6).defaultPrevented)return;const t=()=>{this._element.classList.add(Tm),this._element.classList.remove(Xs,Zs),ne.trigger(this._element,S6)};this._element.classList.add(Xs),this._queueCallback(t,this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(Zs),super.dispose()}isShown(){return this._element.classList.contains(Zs)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(e,t){switch(e.type){case"mouseover":case"mouseout":{this._hasMouseInteraction=t;break}case"focusin":case"focusout":{this._hasKeyboardInteraction=t;break}}if(t){this._clearTimeout();return}const r=e.relatedTarget;this._element===r||this._element.contains(r)||this._maybeScheduleHide()}_setListeners(){ne.on(this._element,y6,e=>this._onInteraction(e,!0)),ne.on(this._element,v6,e=>this._onInteraction(e,!1)),ne.on(this._element,E6,e=>this._onInteraction(e,!0)),ne.on(this._element,b6,e=>this._onInteraction(e,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(e){return this.each(function(){const t=Zo.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof t[e]>"u")throw new TypeError(`No method named "${e}"`);t[e](this)}})}}$s(Zo),Bt(Zo);const O6=n=>{const e=f.ref(null);return{showModal:()=>{const o=document.getElementById(n);o instanceof HTMLElement?(e.value=gr.getOrCreateInstance(o),e.value.show()):console.error(`Modal '${n}' niet gevonden.`)},closeModal:()=>{e.value&&e.value.hide()}}};function Am(n=void 0){const e=l=>i("Succesvol",l,Sr.SUCCESS),t=l=>i("Waarschuwing",l,Sr.WARNING),r=l=>i("Informatie",l,Sr.INFO),o=l=>i("Mislukt",l,Sr.DANGER);function i(l,a,c){const u=`toast-${au()}`,d={id:u,variant:c,title:l,text:a},h=document.querySelector(".toast-container");if(!h){console.error("There was no element with class 'toast-container' found, which is required for useToaster.");return}const p=f.h(va,d),g=f.createApp({render:()=>p}).mount(document.createElement("div"));h.appendChild(g.$el);const y=document.querySelector(`#${u}`);y&&(Zo.getOrCreateInstance(y,n).show(),s(y))}function s(l){function a(d,h){d.forEach(p=>{if(p.attributeName!="class")return;const m=p.target;if(m.classList.contains("hide")){m.remove(),h.disconnect();return}})}const c=new MutationObserver(a),u={attributes:!0};c.observe(l,u)}return{showSuccessToast:e,showInformationToast:r,showWarningToast:t,showDangerToast:o}}const M6=n=>Array.isArray(n)&&n.length>0,{showDangerToast:N6}=Am();function I6(n){const e=f.ref(null),t=(a,c="serverErrors")=>{var d;let u=[];if(Array.isArray((d=a==null?void 0:a.response)==null?void 0:d.data)?u=a.response.data.filter(h=>Bs(h.ErrorMessage)&&h.ErrorMessage!==uc):a.response.data.ErrorMessage?u=[a.response.data.ErrorMessage]:u=null,Bs(c))e.value=u;else if(Array.isArray(c)){let h=e.value;for(let p=0;p<c.length;p++)p===c.length-1?h[c[p]]=u:h=h[c[p]]}r(a),s(e)},r=a=>{const u=new URL(a.request.responseURL).pathname;if(u in n.error){const d=n.error[u];d&&N6(d)}},o=f.ref(null),i=f.ref(""),s=a=>{M6(a.value)?o.value=a.value.map(c=>Bs(c)?c:c.ErrorMessage):Bs(a.value)&&(i.value=a.value)};function l(){e.value=null,o.value=null,i.value=uc}return{serverErrors:e,errorMessages:o,errorMessageText:i,MapErrors:s,MapServerErrors:t,ResetServerErrors:l}}const xm={mounted:n=>{new yr(n)}},_6={PRIMARY:"primary",SECONDARY:"secondary",COLLEAGUE:"colleague",DANGER:"danger",OUT_PRIMARY:"outline-primary",OUT_PRIMARY_DARK:"outline-primary-dark",OUT_TERTIARY:"outline-tertiary",OUT_LINK:"link",LIGHT:"light",DARK:"dark",REMOVE:"remove"},pt=f.defineComponent({__name:"BDButton",props:{size:{default:st.MD},variant:{default:_6.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=f.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=f.computed(()=>t.to?Cr:"button"),i=f.computed(()=>{const l={};return t.to?(l.to=t.to,l.role="button"):l.type="submit",l}),s=l=>{e("click",l)};return(l,a)=>(f.openBlock(),f.createBlock(f.resolveDynamicComponent(o.value),f.mergeProps({class:["bd-btn",r.value]},i.value,{onClick:s}),{default:f.withCtx(()=>[f.renderSlot(l.$slots,"default",{},()=>[f.createTextVNode(f.toDisplayString(t.text),1)])]),_:3},16,["class"]))}}),D6={install:n=>{n.component("BDCol",zc),n.component("BDContainer",Hc),n.component("BDRow",Uc),n.component("BDButton",pt),n.component("BDLogo",ha),n.component("BDLink",Cr),n.component("BDDropdownItem",si),n.component("BDDropdown",dc),n.component("BDAlert",tu),n.component("BDProfileImage",lo),n.component("BDZoomslider",ou),n.component("BDCard",ma),n.component("BDCollapsableCard",lu),n.component("BDFormInput",hu),n.component("BDInputGroup",pu),n.component("BDFormInvalidFeedback",ii),n.component("BDBadge",mu),n.component("BDForm",gu),n.component("BDPagination",yu),n.component("BDDropzone",wu),n.component("BDMarkdownEditor",Ep),n.component("BDModal",kp),n.component("BDFormSelect",vu),n.component("BDUser",bp),n.component("BDArticle",bu),n.component("BDFormCheckbox",Eu),n.component("BDToast",va),n.component("BDAttachmentPreviewList",Ds),n.component("BDImageAttachmentPreviewList",Ls),n.component("BDHeader",wp),n.component("BDMobileMenu",cc),n.component("BDChatCloud",Cp),n.component("BDTable",Sp),n.component("IconAcademy",jc),n.component("IconArrowDown",Wc),n.component("IconArrowUp",Kc),n.component("IconAttachment",Yn),n.component("IconBold",qs),n.component("IconBulletList",ea),n.component("IconCalendar",ta),n.component("IconCalendar",ta),n.component("IconCardView",Gc),n.component("IconCaretDown",na),n.component("IconCaretLeft",ra),n.component("IconCaretRight",oa),n.component("IconCheck",so),n.component("IconClose",Xo),n.component("IconDownloadImage",Qo),n.component("IconDownloadImage",Qo),n.component("IconEdit",Yc),n.component("IconError",qo),n.component("IconEyeShow",Jc),n.component("IconEyeSlash",Zc),n.component("IconFile",ia),n.component("IconHyperlink",sa),n.component("IconInfo",ei),n.component("IconItalic",aa),n.component("IconListView",Xc),n.component("IconMenu",ti),n.component("IconMenu",ti),n.component("IconOrderedList",la),n.component("IconRemove",ao),n.component("IconSort",Qc),n.component("IconSortAsc",ca),n.component("IconSortDesc",ua),n.component("IconSortNone",da),n.component("IconTriangleExclamation",qc),n.component("IconUnderline",fa),n.directive("vBDTooltip",xm)}};fe.BDAlert=tu,fe.BDArticle=bu,fe.BDAttachmentPreviewList=Ds,fe.BDBadge=mu,fe.BDButton=pt,fe.BDCard=ma,fe.BDChatCloud=Cp,fe.BDCol=zc,fe.BDCollapsableCard=lu,fe.BDContainer=Hc,fe.BDDropdown=dc,fe.BDDropdownItem=si,fe.BDDropzone=wu,fe.BDForm=gu,fe.BDFormCheckbox=Eu,fe.BDFormInput=hu,fe.BDFormInvalidFeedback=ii,fe.BDFormSelect=vu,fe.BDHeader=wp,fe.BDImageAttachmentPreviewList=Ls,fe.BDInputGroup=pu,fe.BDLink=Cr,fe.BDLogo=ha,fe.BDMarkdownEditor=Ep,fe.BDMobileMenu=cc,fe.BDModal=kp,fe.BDPagination=yu,fe.BDProfileImage=lo,fe.BDRow=Uc,fe.BDTable=Sp,fe.BDToast=va,fe.BDUser=bp,fe.BDZoomslider=ou,fe.IconAcademy=jc,fe.IconArrowDown=Wc,fe.IconArrowUp=Kc,fe.IconAttachment=Yn,fe.IconBold=qs,fe.IconBulletList=ea,fe.IconCalendar=ta,fe.IconCardView=Gc,fe.IconCaretDown=na,fe.IconCaretLeft=ra,fe.IconCaretRight=oa,fe.IconCheck=so,fe.IconClose=Xo,fe.IconDownloadImage=Qo,fe.IconEdit=Yc,fe.IconError=qo,fe.IconEyeShow=Jc,fe.IconEyeSlash=Zc,fe.IconFile=ia,fe.IconHyperlink=sa,fe.IconInfo=ei,fe.IconItalic=aa,fe.IconListView=Xc,fe.IconMenu=ti,fe.IconOrderedList=la,fe.IconRemove=ao,fe.IconSort=Qc,fe.IconSortAsc=ca,fe.IconSortDesc=ua,fe.IconSortNone=da,fe.IconTriangleExclamation=qc,fe.IconUnderline=fa,fe.default=D6,fe.useModal=O6,fe.useServerErrors=I6,fe.useToaster=Am,fe.vBdTooltip=xm,Object.defineProperties(fe,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|