@abi-software/simulationvuer 3.0.0 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -70201,7 +70201,7 @@ function Sbe(e, t, r, n, i, o) {
70201
70201
  [d, e.showUserMessage]
70202
70202
  ]);
70203
70203
  }
70204
- const Abe = /* @__PURE__ */ Z3(ibe, [["render", Sbe], ["__scopeId", "data-v-71aac8bb"]]);
70204
+ const Abe = /* @__PURE__ */ Z3(ibe, [["render", Sbe], ["__scopeId", "data-v-a62decd1"]]);
70205
70205
  export {
70206
70206
  Abe as SimulationVuer
70207
70207
  };
@@ -5174,7 +5174,7 @@ The action could not be handled.`,life:Bv})}}const b=Me.ref(!0);Be==null||Be.onE
5174
5174
  `+(ne===Fl.IRRETRIEVABLE_FILE?"The file could not be retrieved.":"Only CellML files, SED-ML files, and COMBINE archives are supported."),life:Bv}),Be==null||Be.fileIssue(ee)):(ue=s.value)==null||ue.openFile(Q),yp(ee)&&C()}).catch(Q=>{yp(ee)&&C(),t.omex!==void 0?Me.nextTick().then(()=>{l.value.push({type:kt.ERROR,description:Nv(Q instanceof Error?Q.message:String(Q))})}):h.add({severity:"error",group:n.value,summary:"Opening a file",detail:`${ee}
5175
5175
 
5176
5176
  ${Nv(Q instanceof Error?Q.message:String(Q))}`,life:Bv}),Be==null||Be.fileIssue(ee)})}function $(J){const ee=J.target.files;if(ee!==null)for(const U of Array.from(ee))X(U)}const j=Me.ref(0);function L(){!b.value||t.omex!==void 0||(j.value+=1)}function ae(J){var U;if(j.value===0)return;j.value=0;const ee=(U=J.dataTransfer)==null?void 0:U.files;if(ee!==void 0)for(const K of Array.from(ee))X(K)}function se(){j.value!==0&&(j.value-=1)}Be==null||Be.onOpen(J=>{X(J)});function ie(){var J;t.omex===void 0&&((J=o.value)==null||J.click())}const V=Me.ref(!1);Be==null||Be.onOpenRemote(()=>{V.value=!0});function G(){t.omex===void 0&&(V.value=!0)}function O(J){X(J)}Be==null||Be.onOpenSampleLorenz(()=>{te()});function te(){t.omex===void 0&&X("https://github.com/opencor/webapp/raw/refs/heads/main/tests/models/lorenz.omex")}Be==null||Be.onOpenSampleInteractiveLorenz(()=>{oe()});function oe(){t.omex===void 0&&X("https://github.com/opencor/webapp/raw/refs/heads/main/tests/models/ui/lorenz.omex")}Be==null||Be.onClose(()=>{fe()});function fe(){var J;t.omex===void 0&&((J=s.value)==null||J.closeCurrentFile())}Be==null||Be.onCloseAll(()=>{de()});function de(){var J;t.omex===void 0&&((J=s.value)==null||J.closeAllFiles())}const ve=Me.ref(!1);Be==null||Be.onResetAll(()=>{ve.value=!0});function Ie(){Be==null||Be.resetAll()}Be==null||Be.onSelect(J=>{var ee;(ee=s.value)==null||ee.selectFile(J)});const $e=Me.ref(""),Te=Me.ref(0),Le=Me.ref(0),Z=Me.ref(0);return Me.onMounted(()=>{var Fe;const J=(Fe=r.value)==null?void 0:Fe.$el,ee=J.parentElement,U=ee==null?void 0:ee.parentElement,K=U==null?void 0:U.parentElement,Q=K==null?void 0:K.parentElement;$e.value=(ee==null?void 0:ee.tagName)==="DIV"&&ee.id==="app"&&(U==null?void 0:U.tagName)==="BODY"&&(K==null?void 0:K.tagName)==="HTML"&&Q===null?"opencor-application":"opencor-component",n.value=`opencorToast${String(m==null?void 0:m.uid)}`,i.value=`opencorMainMenu${String(m==null?void 0:m.uid)}`,setTimeout(()=>{u()},Qo);let ne;setTimeout(()=>{ne=Wv(i.value)},Qo),setTimeout(()=>{const be=document.getElementById(n.value);be!==null&&J.appendChild(be)},Qo),window.addEventListener("resize",ue),Me.onUnmounted(()=>{window.removeEventListener("resize",ue)});function ue(){const be=window.getComputedStyle(J);Te.value=parseFloat(be.width),Le.value=parseFloat(be.height),Z.value=Le.value-Mi(i.value)}const pe=new ResizeObserver(()=>{setTimeout(()=>{ue()},Qo)});let ge=Mi(i.value);const we=new MutationObserver(()=>{const be=Mi(i.value);be!==ge&&(ge=be,ue())});pe.observe(J),we.observe(document.documentElement,{attributes:!0,attributeFilter:["style"]}),Me.onUnmounted(()=>{pe.disconnect(),we.disconnect(),ne==null||ne.disconnect()})}),t.omex!==void 0?Me.watch(g,J=>{J&&t.omex!==void 0&&X(t.omex)}):Me.onMounted(()=>{setTimeout(()=>{Be!==void 0?Be.checkForUpdates(!0):Me.watch(g,J=>{if(J){const ee=ule("action","");window.location.search!==""?(ee.value=window.location.search.substring(1),window.location.search=""):ee.value!==""&&setTimeout(()=>{v(ee.value.slice(tae.length)),ee.value=""},Qo)}})},Qo)}),Me.watch(f,J=>{J||setTimeout(()=>{var K;const ee=(K=r.value)==null?void 0:K.$el,U=ee.querySelector(".p-blockui-mask");U!==null&&U.parentElement===ee&&ee.removeChild(U)},Qo)}),(J,ee)=>{const U=nB,K=xE,Q=rme,ne=e0,ue=Ope,pe=Hpe,ge=xpe,we=dse,Fe=Jae,be=_ae,qe=Fae,Xe=Xie,Ze=Jie,Bt=Kie,_=Vie,re=C5;return a.openBlock(),a.createBlock(re,{ref_key:"blockUi",ref:r,blocked:a.unref(f),class:a.normalizeClass(["overflow-hidden",a.unref($e)]),onClick:u,onFocus:u,onFocusin:u,onKeydown:u,onMousedown:u},{default:a.withCtx(()=>[a.createVNode(U,{id:a.unref(n),group:a.unref(n),"pt:root:style":{position:"absolute"},class:a.normalizeClass(a.unref(d)?"visible":"invisible")},null,8,["id","group","class"]),a.withDirectives(a.createVNode(K,null,null,512),[[a.vShow,(a.unref(y)||a.unref(x))&&J.omex!==void 0]]),a.withDirectives(a.createVNode(Q,{message:"Loading OpenCOR..."},null,512),[[a.vShow,a.unref(y)]]),a.withDirectives(a.createVNode(Q,{message:"Loading model..."},null,512),[[a.vShow,a.unref(x)]]),a.unref(l).length!==0?(a.openBlock(),a.createBlock(ne,{key:0,class:"h-full",issues:a.unref(l),width:a.unref(Te),height:a.unref(Le)},null,8,["issues","width","height"])):(a.openBlock(),a.createElementBlock("div",{key:1,onDragenter:L,class:"h-full",onDragover:ee[8]||(ee[8]=a.withModifiers(()=>{},["prevent"])),onDrop:a.withModifiers(ae,["prevent"]),onDragleave:se},[a.createElementVNode("input",{ref_key:"files",ref:o,type:"file",multiple:"",style:{display:"none"},onChange:$},null,544),a.withDirectives(a.createVNode(ue,null,null,512),[[a.vShow,a.unref(j)>0]]),a.unref(Be)===void 0&&J.omex===void 0?(a.openBlock(),a.createBlock(pe,{key:0,id:a.unref(i),isActive:a.unref(d),uiEnabled:a.unref(p),hasFiles:a.unref(w),onAbout:q,onOpen:ie,onOpenRemote:G,onOpenSampleLorenz:te,onOpenSampleInteractiveLorenz:oe,onClose:fe,onCloseAll:de,onSettings:W},null,8,["id","isActive","uiEnabled","hasFiles"])):a.createCommentVNode("",!0),a.createVNode(ge,{ref_key:"contents",ref:s,isActive:a.unref(d),uiEnabled:a.unref(p),simulationOnly:J.omex!==void 0,width:a.unref(Te),height:a.unref(Z)},null,8,["isActive","uiEnabled","simulationOnly","width","height"]),a.createVNode(we,{visible:a.unref(V),"onUpdate:visible":ee[0]||(ee[0]=ce=>a.isRef(V)?V.value=ce:null),onOpenRemote:O,onClose:ee[1]||(ee[1]=ce=>V.value=!1)},null,8,["visible"]),a.createVNode(Fe,{visible:a.unref(z),"onUpdate:visible":ee[2]||(ee[2]=ce=>a.isRef(z)?z.value=ce:null),onClose:ee[3]||(ee[3]=ce=>z.value=!1)},null,8,["visible"]),a.createVNode(be,{visible:a.unref(ve),"onUpdate:visible":ee[4]||(ee[4]=ce=>a.isRef(ve)?ve.value=ce:null),onResetAll:Ie,onClose:ee[5]||(ee[5]=ce=>ve.value=!1)},null,8,["visible"]),a.createVNode(qe,{visible:a.unref(P),"onUpdate:visible":ee[6]||(ee[6]=ce=>a.isRef(P)?P.value=ce:null),onClose:ee[7]||(ee[7]=ce=>P.value=!1)},null,8,["visible"])],32)),a.createVNode(Xe,{visible:a.unref(E),"onUpdate:visible":ee[9]||(ee[9]=ce=>a.isRef(E)?E.value=ce:null),title:a.unref(B),issue:a.unref(N),onClose:D},null,8,["visible","title","issue"]),a.createVNode(Ze,{visible:a.unref(k),"onUpdate:visible":ee[10]||(ee[10]=ce=>a.isRef(k)?k.value=ce:null),version:a.unref(T),onDownloadAndInstall:F,onClose:ee[11]||(ee[11]=ce=>k.value=!1)},null,8,["visible","version"]),a.createVNode(Bt,{visible:a.unref(M),"onUpdate:visible":ee[12]||(ee[12]=ce=>a.isRef(M)?M.value=ce:null),percent:a.unref(R)},null,8,["visible","percent"]),a.createVNode(_,{visible:a.unref(A),"onUpdate:visible":ee[13]||(ee[13]=ce=>a.isRef(A)?A.value=ce:null),onClose:ee[14]||(ee[14]=ce=>A.value=!1)},null,8,["visible"])]),_:1},8,["blocked","class"])}}}),s2e=Rl(a2e,[["__scopeId","data-v-afe123b3"]]),Pp="https://models.physiomeproject.org/",l2e=Fg(C4,{}),ka=Object.freeze({DATASET_ID:"dataset_id",DATASET_URL:"dataset_url",PMR_PATH:"pmr_path",RAW_COMBINE_ARCHIVE:"raw_combine_archive"}),u2e={name:"SimulationVuer",components:{PlotVuer:Ms.PlotVuer,SimulationVuerInput:B4,ElButton:fw,ElDivider:hw,ElLoading:W_,OpenCOR:s2e},props:{apiLocation:{required:!0,type:String},id:{required:!0,type:[Number,String,Uint8Array]}},data:function(){let e;if(typeof this.id=="number"?e=ka.DATASET_ID:this.id instanceof Uint8Array?e=ka.RAW_COMBINE_ARCHIVE:this.id.startsWith("https://")?e=ka.DATASET_URL:e=ka.PMR_PATH,e===ka.DATASET_ID){const t=new XMLHttpRequest;t.open("GET",this.apiLocation+"/sim/dataset/"+this.id),t.onreadystatechange=()=>{if(t.readyState===4&&t.status===200){const r=JSON.parse(t.responseText);this.name=r.name,this.uuid=r.study!==void 0?r.study.uuid:void 0}},t.send()}return{errorMessage:"",fileManager:void 0,hasFinalisedUi:!1,hasValidSimulationUiInfo:!1,idType:e,instance:void 0,isMounted:!1,isSimulationValid:!0,layout:[],libopencor:void 0,libopencorSet:!1,model:void 0,name:null,opencorBasedSimulation:!0,opencorOmexFile:null,output:void 0,perfectScollbarOptions:{suppressScrollX:!0},showUserMessage:!1,simulationResults:{},simulationResultsId:{},simulationUiInfo:{},solver:void 0,userMessage:"",ui:null,uuid:null}},methods:{plotMetadata(e){return{version:"1.1.0",type:"plot",attrs:{style:"timeseries",layout:this.layout[e]}}},manageFile(e,t){let r=this.fileManager.file(e);r===null&&(r=new this.libopencor.File(e));const n=this.libopencor._malloc(t.length);return new Uint8Array(this.libopencor.HEAPU8.buffer,n,t.length).set(t),r.setContents(n,t.length),this.libopencor._free(n),r},runSimulation(){if(this.instance===void 0){const i=new this.libopencor.SedDocument(this.fileManager.file(Pp+this.id));this.model=a.markRaw(i.model()),this.instance=a.markRaw(i.instantiate()),i.delete()}this.model.removeAllChanges();for(const[i,o]of Object.entries(this.parametersData())){const s=i.split("/");this.model.addChange(new this.libopencor.SedChangeAttribute(s[0],s[1],o.toString()))}this.instance.run();const e={},t=this.instance.task(0);let r=!0,n;for(const i of this.outputData()){if(n=!1,i===t.voiName&&(e[i]=t.voiAsArray,n=!0),e[i]===void 0){for(let o=0;o<t.stateCount;++o)if(i===t.stateName(o)){e[i]=t.stateAsArray(o),n=!0;break}}if(e[i]===void 0){for(let o=0;o<t.rateCount;++o)if(i===t.rateName(o)){e[i]=t.rateAsArray(o),n=!0;break}}if(e[i]===void 0){for(let o=0;o<t.constantCount;++o)if(i===t.constantName(o)){e[i]=t.constantAsArray(o),n=!0;break}}if(e[i]===void 0){for(let o=0;o<t.computedConstantCount;++o)if(i===t.computedConstantName(o)){e[i]=t.computedConstantAsArray(o),n=!0;break}}if(e[i]===void 0){for(let o=0;o<t.algebraicCount;++o)if(i===t.algebraicName(o)){e[i]=t.algebraicAsArray(o),n=!0;break}}n||(console.warn("SIMULATION: output '"+i+"' could not be found."),r=!1)}r?this.processSimulationResults(e):(this.hasValidSimulationUiInfo=!1,this.errorMessage="some outputs could not be found"),this.showUserMessage=!1},buildSimulationUi(e){if(this.simulationUiInfo=e,this.hasValidSimulationUiInfo=one(this.simulationUiInfo,this.libopencor===void 0),!this.hasValidSimulationUiInfo){this.errorMessage="the simulation.json file is malformed";return}if(this.libopencor===void 0){if(this.simulationUiInfo.simulation.solvers.forEach(r=>{(r.if===void 0||Ig(this,r.if))&&(this.solver=r)}),this.solver===void 0){this.hasValidSimulationUiInfo=!1,this.errorMessage="no solver name and/or solver version specified";return}this.opencorBasedSimulation=this.solver.name===S4}this.simulationUiInfo.output.data.forEach(r=>{this.simulationResultsId[r.id]=r.name});let t=-1;this.simulationUiInfo.output.plots.forEach(r=>{++t,this.layout[t]={paper_bgcolor:"rgba(0, 0, 0, 0)",plot_bgcolor:"rgba(0, 0, 0, 0)",autosize:!0,margin:{t:25,l:55,r:25,b:30,pad:4},loading:!1,options:{responsive:!0,scrollZoom:!0},dragmode:"pan",xaxis:{title:{text:r.xAxisTitle,font:{size:10}}},yaxis:{title:{text:r.yAxisTitle,font:{size:10}}}}}),this.$nextTick(()=>{E4(this)})},extractAndBuildSimulationUi(e,t){this.libopencor=a.markRaw(e),this.libopencorSet=!0,this.fileManager=a.markRaw(this.libopencor.FileManager.instance());const r=this.manageFile(Pp+this.id,t);if(r.type.value!==e.File.Type.COMBINE_ARCHIVE.value)this.showUserMessage=!1;else{const n=new TextDecoder,i=r.childFileFromFileName("simulation.json");if(i===null)this.errorMessage="no simulation JSON file could be found",this.showUserMessage=!1;else{const o=JSON.parse(n.decode(i.contents()));this.showUserMessage=!1,this.$nextTick(()=>{this.buildSimulationUi(o)})}}},runOnOsparc(){window.open(`https://osparc.io/study/${this.uuid}`,"_blank")},viewDataset(){window.open(`https://sparc.science/datasets/${this.id}?type=dataset`,"_blank")},viewWorkspace(){const e=Pp+this.id;window.open(e.substring(0,e.lastIndexOf("/")),"_blank")},parametersData(){const e={};return this.simulationUiInfo.parameters.forEach(t=>{e[t.name]=Ig(this,t.value)}),e},outputData(){return this.output===void 0&&this.simulationUiInfo.output.data!==void 0&&(this.output=[],this.simulationUiInfo.output.data.forEach(e=>{this.output.push(e.name)})),this.output},retrieveRequest(){const e={solver:this.solver};if(this.opencorBasedSimulation){e.opencor={model_url:this.simulationUiInfo.simulation.opencor.resource,json_config:{}},this.simulationUiInfo.simulation.opencor.endingPoint!==void 0&&this.simulationUiInfo.simulation.opencor.pointInterval!==void 0&&(e.opencor.json_config.simulation={"Ending point":this.simulationUiInfo.simulation.opencor.endingPoint,"Point interval":this.simulationUiInfo.simulation.opencor.pointInterval}),e.opencor.json_config.parameters=this.parametersData();const t=this.outputData();t!==void 0&&(e.opencor.json_config.output=t)}else e.osparc={},e.osparc.job_inputs=this.parametersData();return e},processSimulationResults(e){if(typeof e=="string"){const n=/[ \t]+/g,i=e.trim().split(`
5177
- `),o=i[0].trim().split(n).length;e={};for(let l=0;l<o;++l)e[l]=[];let s=-1;i.forEach(l=>{++s;let c=-1;l.trim().split(n).forEach(d=>{e[++c][s]=Number(d)})})}const t=new l2e.parser;Object.keys(this.simulationResultsId).forEach(n=>{t.set(n,e[this.simulationResultsId[n]])});let r=-1;this.simulationUiInfo.output.plots.forEach(n=>{this.simulationResults[++r]=[{x:t.evaluate(n.xValue),y:t.evaluate(n.yValue),type:"scatter"}]})},showHttpIssue(e){this.isSimulationValid=!1,this.showUserMessage=!1,this.errorMessage=e.statusText.toLowerCase()+" (<a href='https://httpstatuses.com/"+e.status+"/' target='_blank'>"+e.status+"</a>)"},checkSimulation(e){const t=new XMLHttpRequest;t.open("POST",this.apiLocation+"/check_simulation"),t.setRequestHeader("Content-type","application/json"),t.onreadystatechange=()=>{if(t.readyState===4)if(t.status===200){let r=JSON.parse(t.responseText);if(this.isSimulationValid=r.status==="ok",this.isSimulationValid)if(r.results!==void 0)this.showUserMessage=!1,this.processSimulationResults(r.results);else{let n=this;setTimeout(function(){n.checkSimulation(e)},1e3)}else this.showUserMessage=!1,this.errorMessage=r.description}else this.showHttpIssue(t)},t.send(JSON.stringify(e))},startSimulation(){this.userMessage="Loading simulation results...",this.showUserMessage=!0,this.$nextTick(()=>{this.simulationResults={};const e=new XMLHttpRequest;e.open("POST",this.apiLocation+"/start_simulation"),e.setRequestHeader("Content-type","application/json"),e.onreadystatechange=()=>{if(e.readyState===4)if(e.status===200){let t=JSON.parse(e.responseText);this.isSimulationValid=t.status==="ok",this.isSimulationValid?this.checkSimulation(t.data):(this.showUserMessage=!1,this.errorMessage=t.description)}else this.showHttpIssue(e)},e.send(JSON.stringify(this.retrieveRequest()))})}},created:function(){this.idType===ka.DATASET_ID?(this.userMessage="Retrieving UI information...",this.showUserMessage=!0,this.$nextTick(()=>{const e=new XMLHttpRequest;e.open("GET",this.apiLocation+"/simulation_ui_file/"+this.id),e.onreadystatechange=()=>{e.readyState===4&&(this.showUserMessage=!1,e.status===200?this.$nextTick(()=>{this.buildSimulationUi(JSON.parse(e.responseText))}):this.errorMessage="the simulation dataset could not be retrieved")},e.send()})):this.idType===ka.DATASET_URL?this.opencorOmexFile=this.id:this.idType===ka.PMR_PATH?this.opencorOmexFile=Pp+this.id:(this.userMessage="Retrieving COMBINE archive...",this.showUserMessage=!0,this.$nextTick(()=>{kA().then(e=>{this.extractAndBuildSimulationUi(e,this.id)})}))},mounted:function(){this.isMounted=!0,E4(this)}},c2e=["element-loading-text"],d2e={key:0,class:"container"},f2e={key:0,class:"default error"},p2e={key:1,class:"main"},m2e={key:0,class:"default name"},h2e={class:"input scrollbar"},g2e={class:"buttons-container"},v2e={key:0,class:"primary-button"},b2e={key:1,class:"secondary-button"},y2e={key:2,class:"secondary-button"},w2e={key:3,class:"secondary-button"},x2e={key:4,class:"default note"},C2e={class:"main-right",ref:"output"},S2e={class:"main-right"},k2e={class:"default error"},E2e=["innerHTML"],N2e={key:1,class:"opencor"};function B2e(e,t,r,n,i,o){const s=hw,l=B4,c=fw,u=a.resolveComponent("PlotVuer"),d=a.resolveComponent("OpenCOR"),f=kh;return a.withDirectives((a.openBlock(),a.createElementBlock("div",{class:"simulation-vuer","element-loading-text":e.userMessage},[e.opencorOmexFile===null?(a.openBlock(),a.createElementBlock("div",d2e,[!e.hasValidSimulationUiInfo&&!e.showUserMessage?(a.openBlock(),a.createElementBlock("p",f2e,[t[4]||(t[4]=a.createElementVNode("span",{class:"error"},"Error:",-1)),a.createTextVNode(" "+a.toDisplayString(e.errorMessage)+".",1)])):a.createCommentVNode("",!0),e.hasValidSimulationUiInfo?(a.openBlock(),a.createElementBlock("div",p2e,[a.createElementVNode("div",{class:a.normalizeClass(["main-left",{"with-buttons":!e.libopencorSet||e.uuid}])},[e.libopencorSet?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("p",m2e,a.toDisplayString(e.name),1)),e.libopencorSet?a.createCommentVNode("",!0):(a.openBlock(),a.createBlock(s,{key:1})),t[9]||(t[9]=a.createElementVNode("p",{class:"default input-parameters"},"Input parameters",-1)),a.createElementVNode("div",h2e,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.simulationUiInfo.input,(p,m)=>(a.openBlock(),a.createBlock(l,{ref_for:!0,ref:"simInput",defaultValue:p.defaultValue,key:`input-${m}`,name:p.name,maximumValue:p.maximumValue,minimumValue:p.minimumValue,possibleValues:p.possibleValues,stepValue:p.stepValue},null,8,["defaultValue","name","maximumValue","minimumValue","possibleValues","stepValue"]))),128))]),a.createElementVNode("div",g2e,[e.libopencorSet?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",v2e,[a.createVNode(c,{type:"primary",size:"small",onClick:t[0]||(t[0]=p=>o.startSimulation())},{default:a.withCtx(()=>[...t[5]||(t[5]=[a.createTextVNode("Run Simulation",-1)])]),_:1})])),e.uuid?(a.openBlock(),a.createElementBlock("div",b2e,[a.createVNode(c,{size:"small",onClick:t[1]||(t[1]=p=>o.runOnOsparc())},{default:a.withCtx(()=>[...t[6]||(t[6]=[a.createTextVNode("Run on oSPARC",-1)])]),_:1})])):a.createCommentVNode("",!0),e.libopencorSet?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",y2e,[a.createVNode(c,{size:"small",onClick:t[2]||(t[2]=p=>o.viewDataset())},{default:a.withCtx(()=>[...t[7]||(t[7]=[a.createTextVNode("View Dataset",-1)])]),_:1})])),e.libopencorSet&&e.idType==="pmr_path"?(a.openBlock(),a.createElementBlock("div",w2e,[a.createVNode(c,{size:"small",onClick:t[3]||(t[3]=p=>o.viewWorkspace())},{default:a.withCtx(()=>[...t[8]||(t[8]=[a.createTextVNode("View Workspace",-1)])]),_:1})])):a.createCommentVNode("",!0),e.uuid?(a.openBlock(),a.createElementBlock("p",x2e,"Additional parameters are available on oSPARC")):a.createCommentVNode("",!0)])],2),a.withDirectives(a.createElementVNode("div",C2e,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.simulationUiInfo.output.plots,(p,m)=>(a.openBlock(),a.createBlock(u,{key:`output-${m}`,metadata:o.plotMetadata(m),"data-source":{data:e.simulationResults[m]},plotLayout:e.layout[m],plotType:"plotly-only",selectorUi:!1},null,8,["metadata","data-source","plotLayout"]))),128))],512),[[a.vShow,e.isSimulationValid]]),a.withDirectives(a.createElementVNode("div",S2e,[a.createElementVNode("p",k2e,[t[10]||(t[10]=a.createElementVNode("span",{class:"error"},"Error:",-1)),t[11]||(t[11]=a.createTextVNode()),a.createElementVNode("span",{innerHTML:e.errorMessage},null,8,E2e),t[12]||(t[12]=a.createTextVNode(".",-1))])],512),[[a.vShow,!e.isSimulationValid]])])):a.createCommentVNode("",!0)])):(a.openBlock(),a.createElementBlock("div",N2e,[a.createVNode(d,{omex:e.opencorOmexFile,theme:"light"},null,8,["omex"])]))],8,c2e)),[[f,e.showUserMessage]])}const A2e=N4(u2e,[["render",B2e],["__scopeId","data-v-71aac8bb"]]);var Ea=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function dB(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var fB=typeof global=="object"&&global&&global.Object===Object&&global,D2e=typeof self=="object"&&self&&self.Object===Object&&self,Wo=fB||D2e||Function("return this")(),Na=Wo.Symbol,pB=Object.prototype,M2e=pB.hasOwnProperty,T2e=pB.toString,Vc=Na?Na.toStringTag:void 0;function F2e(e){var t=M2e.call(e,Vc),r=e[Vc];try{e[Vc]=void 0;var n=!0}catch{}var i=T2e.call(e);return n&&(t?e[Vc]=r:delete e[Vc]),i}var I2e=Object.prototype,_2e=I2e.toString;function $2e(e){return _2e.call(e)}var R2e="[object Null]",P2e="[object Undefined]",mB=Na?Na.toStringTag:void 0;function Ll(e){return e==null?e===void 0?P2e:R2e:mB&&mB in Object(e)?F2e(e):$2e(e)}function Ti(e){return e!=null&&typeof e=="object"}var vs=Array.isArray;function Ba(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function hB(e){return e}var L2e="[object AsyncFunction]",z2e="[object Function]",U2e="[object GeneratorFunction]",q2e="[object Proxy]";function y0(e){if(!Ba(e))return!1;var t=Ll(e);return t==z2e||t==U2e||t==L2e||t==q2e}var w0=Wo["__core-js_shared__"],gB=function(){var e=/[^.]+$/.exec(w0&&w0.keys&&w0.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function V2e(e){return!!gB&&gB in e}var j2e=Function.prototype,Q2e=j2e.toString;function bs(e){if(e!=null){try{return Q2e.call(e)}catch{}try{return e+""}catch{}}return""}var H2e=/[\\^$.*+?()[\]{}|]/g,W2e=/^\[object .+?Constructor\]$/,Z2e=Function.prototype,G2e=Object.prototype,K2e=Z2e.toString,Y2e=G2e.hasOwnProperty,J2e=RegExp("^"+K2e.call(Y2e).replace(H2e,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function O2e(e){if(!Ba(e)||V2e(e))return!1;var t=y0(e)?J2e:W2e;return t.test(bs(e))}function X2e(e,t){return e==null?void 0:e[t]}function ys(e,t){var r=X2e(e,t);return O2e(r)?r:void 0}var x0=ys(Wo,"WeakMap"),vB=Object.create,eCe=function(){function e(){}return function(t){if(!Ba(t))return{};if(vB)return vB(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function tCe(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function rCe(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var nCe=800,oCe=16,iCe=Date.now;function aCe(e){var t=0,r=0;return function(){var n=iCe(),i=oCe-(n-r);if(r=n,i>0){if(++t>=nCe)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function sCe(e){return function(){return e}}var Lp=function(){try{var e=ys(Object,"defineProperty");return e({},"",{}),e}catch{}}(),lCe=Lp?function(e,t){return Lp(e,"toString",{configurable:!0,enumerable:!1,value:sCe(t),writable:!0})}:hB,uCe=aCe(lCe);function cCe(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}var dCe=9007199254740991,fCe=/^(?:0|[1-9]\d*)$/;function bB(e,t){var r=typeof e;return t=t??dCe,!!t&&(r=="number"||r!="symbol"&&fCe.test(e))&&e>-1&&e%1==0&&e<t}function C0(e,t,r){t=="__proto__"&&Lp?Lp(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function jc(e,t){return e===t||e!==e&&t!==t}var pCe=Object.prototype,mCe=pCe.hasOwnProperty;function yB(e,t,r){var n=e[t];(!(mCe.call(e,t)&&jc(n,r))||r===void 0&&!(t in e))&&C0(e,t,r)}function hCe(e,t,r,n){var i=!r;r||(r={});for(var o=-1,s=t.length;++o<s;){var l=t[o],c=void 0;c===void 0&&(c=e[l]),i?C0(r,l,c):yB(r,l,c)}return r}var wB=Math.max;function gCe(e,t,r){return t=wB(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,o=wB(n.length-t,0),s=Array(o);++i<o;)s[i]=n[t+i];i=-1;for(var l=Array(t+1);++i<t;)l[i]=n[i];return l[t]=r(s),tCe(e,this,l)}}function vCe(e,t){return uCe(gCe(e,t,hB),e+"")}var bCe=9007199254740991;function xB(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=bCe}function zp(e){return e!=null&&xB(e.length)&&!y0(e)}function yCe(e,t,r){if(!Ba(r))return!1;var n=typeof t;return(n=="number"?zp(r)&&bB(t,r.length):n=="string"&&t in r)?jc(r[t],e):!1}function wCe(e){return vCe(function(t,r){var n=-1,i=r.length,o=i>1?r[i-1]:void 0,s=i>2?r[2]:void 0;for(o=e.length>3&&typeof o=="function"?(i--,o):void 0,s&&yCe(r[0],r[1],s)&&(o=i<3?void 0:o,i=1),t=Object(t);++n<i;){var l=r[n];l&&e(t,l,n,o)}return t})}var xCe=Object.prototype;function S0(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||xCe;return e===r}function CCe(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var SCe="[object Arguments]";function CB(e){return Ti(e)&&Ll(e)==SCe}var SB=Object.prototype,kCe=SB.hasOwnProperty,ECe=SB.propertyIsEnumerable,k0=CB(function(){return arguments}())?CB:function(e){return Ti(e)&&kCe.call(e,"callee")&&!ECe.call(e,"callee")};function NCe(){return!1}var kB=typeof xt=="object"&&xt&&!xt.nodeType&&xt,EB=kB&&typeof module=="object"&&module&&!module.nodeType&&module,BCe=EB&&EB.exports===kB,NB=BCe?Wo.Buffer:void 0,ACe=NB?NB.isBuffer:void 0,Qc=ACe||NCe,DCe="[object Arguments]",MCe="[object Array]",TCe="[object Boolean]",FCe="[object Date]",ICe="[object Error]",_Ce="[object Function]",$Ce="[object Map]",RCe="[object Number]",PCe="[object Object]",LCe="[object RegExp]",zCe="[object Set]",UCe="[object String]",qCe="[object WeakMap]",VCe="[object ArrayBuffer]",jCe="[object DataView]",QCe="[object Float32Array]",HCe="[object Float64Array]",WCe="[object Int8Array]",ZCe="[object Int16Array]",GCe="[object Int32Array]",KCe="[object Uint8Array]",YCe="[object Uint8ClampedArray]",JCe="[object Uint16Array]",OCe="[object Uint32Array]",Xt={};Xt[QCe]=Xt[HCe]=Xt[WCe]=Xt[ZCe]=Xt[GCe]=Xt[KCe]=Xt[YCe]=Xt[JCe]=Xt[OCe]=!0,Xt[DCe]=Xt[MCe]=Xt[VCe]=Xt[TCe]=Xt[jCe]=Xt[FCe]=Xt[ICe]=Xt[_Ce]=Xt[$Ce]=Xt[RCe]=Xt[PCe]=Xt[LCe]=Xt[zCe]=Xt[UCe]=Xt[qCe]=!1;function XCe(e){return Ti(e)&&xB(e.length)&&!!Xt[Ll(e)]}function E0(e){return function(t){return e(t)}}var BB=typeof xt=="object"&&xt&&!xt.nodeType&&xt,Hc=BB&&typeof module=="object"&&module&&!module.nodeType&&module,eSe=Hc&&Hc.exports===BB,N0=eSe&&fB.process,zl=function(){try{var e=Hc&&Hc.require&&Hc.require("util").types;return e||N0&&N0.binding&&N0.binding("util")}catch{}}(),AB=zl&&zl.isTypedArray,B0=AB?E0(AB):XCe,tSe=Object.prototype,rSe=tSe.hasOwnProperty;function DB(e,t){var r=vs(e),n=!r&&k0(e),i=!r&&!n&&Qc(e),o=!r&&!n&&!i&&B0(e),s=r||n||i||o,l=s?CCe(e.length,String):[],c=l.length;for(var u in e)(t||rSe.call(e,u))&&!(s&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||bB(u,c)))&&l.push(u);return l}function MB(e,t){return function(r){return e(t(r))}}var nSe=MB(Object.keys,Object),oSe=Object.prototype,iSe=oSe.hasOwnProperty;function aSe(e){if(!S0(e))return nSe(e);var t=[];for(var r in Object(e))iSe.call(e,r)&&r!="constructor"&&t.push(r);return t}function sSe(e){return zp(e)?DB(e):aSe(e)}function lSe(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var uSe=Object.prototype,cSe=uSe.hasOwnProperty;function dSe(e){if(!Ba(e))return lSe(e);var t=S0(e),r=[];for(var n in e)n=="constructor"&&(t||!cSe.call(e,n))||r.push(n);return r}function TB(e){return zp(e)?DB(e,!0):dSe(e)}var Wc=ys(Object,"create");function fSe(){this.__data__=Wc?Wc(null):{},this.size=0}function pSe(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var mSe="__lodash_hash_undefined__",hSe=Object.prototype,gSe=hSe.hasOwnProperty;function vSe(e){var t=this.__data__;if(Wc){var r=t[e];return r===mSe?void 0:r}return gSe.call(t,e)?t[e]:void 0}var bSe=Object.prototype,ySe=bSe.hasOwnProperty;function wSe(e){var t=this.__data__;return Wc?t[e]!==void 0:ySe.call(t,e)}var xSe="__lodash_hash_undefined__";function CSe(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Wc&&t===void 0?xSe:t,this}function ws(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ws.prototype.clear=fSe,ws.prototype.delete=pSe,ws.prototype.get=vSe,ws.prototype.has=wSe,ws.prototype.set=CSe;function SSe(){this.__data__=[],this.size=0}function Up(e,t){for(var r=e.length;r--;)if(jc(e[r][0],t))return r;return-1}var kSe=Array.prototype,ESe=kSe.splice;function NSe(e){var t=this.__data__,r=Up(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():ESe.call(t,r,1),--this.size,!0}function BSe(e){var t=this.__data__,r=Up(t,e);return r<0?void 0:t[r][1]}function ASe(e){return Up(this.__data__,e)>-1}function DSe(e,t){var r=this.__data__,n=Up(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function Fi(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Fi.prototype.clear=SSe,Fi.prototype.delete=NSe,Fi.prototype.get=BSe,Fi.prototype.has=ASe,Fi.prototype.set=DSe;var Zc=ys(Wo,"Map");function MSe(){this.size=0,this.__data__={hash:new ws,map:new(Zc||Fi),string:new ws}}function TSe(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function qp(e,t){var r=e.__data__;return TSe(t)?r[typeof t=="string"?"string":"hash"]:r.map}function FSe(e){var t=qp(this,e).delete(e);return this.size-=t?1:0,t}function ISe(e){return qp(this,e).get(e)}function _Se(e){return qp(this,e).has(e)}function $Se(e,t){var r=qp(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function xs(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}xs.prototype.clear=MSe,xs.prototype.delete=FSe,xs.prototype.get=ISe,xs.prototype.has=_Se,xs.prototype.set=$Se;function RSe(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var FB=MB(Object.getPrototypeOf,Object),PSe="[object Object]",LSe=Function.prototype,zSe=Object.prototype,IB=LSe.toString,USe=zSe.hasOwnProperty,qSe=IB.call(Object);function VSe(e){if(!Ti(e)||Ll(e)!=PSe)return!1;var t=FB(e);if(t===null)return!0;var r=USe.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&IB.call(r)==qSe}function jSe(){this.__data__=new Fi,this.size=0}function QSe(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function HSe(e){return this.__data__.get(e)}function WSe(e){return this.__data__.has(e)}var ZSe=200;function GSe(e,t){var r=this.__data__;if(r instanceof Fi){var n=r.__data__;if(!Zc||n.length<ZSe-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new xs(n)}return r.set(e,t),this.size=r.size,this}function Zo(e){var t=this.__data__=new Fi(e);this.size=t.size}Zo.prototype.clear=jSe,Zo.prototype.delete=QSe,Zo.prototype.get=HSe,Zo.prototype.has=WSe,Zo.prototype.set=GSe;var _B=typeof xt=="object"&&xt&&!xt.nodeType&&xt,$B=_B&&typeof module=="object"&&module&&!module.nodeType&&module,KSe=$B&&$B.exports===_B,RB=KSe?Wo.Buffer:void 0,PB=RB?RB.allocUnsafe:void 0;function LB(e,t){if(t)return e.slice();var r=e.length,n=PB?PB(r):new e.constructor(r);return e.copy(n),n}function YSe(e,t){for(var r=-1,n=e==null?0:e.length,i=0,o=[];++r<n;){var s=e[r];t(s,r,e)&&(o[i++]=s)}return o}function JSe(){return[]}var OSe=Object.prototype,XSe=OSe.propertyIsEnumerable,zB=Object.getOwnPropertySymbols,eke=zB?function(e){return e==null?[]:(e=Object(e),YSe(zB(e),function(t){return XSe.call(e,t)}))}:JSe;function tke(e,t,r){var n=t(e);return vs(e)?n:RSe(n,r(e))}function A0(e){return tke(e,sSe,eke)}var D0=ys(Wo,"DataView"),M0=ys(Wo,"Promise"),T0=ys(Wo,"Set"),UB="[object Map]",rke="[object Object]",qB="[object Promise]",VB="[object Set]",jB="[object WeakMap]",QB="[object DataView]",nke=bs(D0),oke=bs(Zc),ike=bs(M0),ake=bs(T0),ske=bs(x0),go=Ll;(D0&&go(new D0(new ArrayBuffer(1)))!=QB||Zc&&go(new Zc)!=UB||M0&&go(M0.resolve())!=qB||T0&&go(new T0)!=VB||x0&&go(new x0)!=jB)&&(go=function(e){var t=Ll(e),r=t==rke?e.constructor:void 0,n=r?bs(r):"";if(n)switch(n){case nke:return QB;case oke:return UB;case ike:return qB;case ake:return VB;case ske:return jB}return t});var lke=Object.prototype,uke=lke.hasOwnProperty;function cke(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&uke.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var Vp=Wo.Uint8Array;function F0(e){var t=new e.constructor(e.byteLength);return new Vp(t).set(new Vp(e)),t}function dke(e,t){var r=F0(e.buffer);return new e.constructor(r,e.byteOffset,e.byteLength)}var fke=/\w*$/;function pke(e){var t=new e.constructor(e.source,fke.exec(e));return t.lastIndex=e.lastIndex,t}var HB=Na?Na.prototype:void 0,WB=HB?HB.valueOf:void 0;function mke(e){return WB?Object(WB.call(e)):{}}function ZB(e,t){var r=t?F0(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var hke="[object Boolean]",gke="[object Date]",vke="[object Map]",bke="[object Number]",yke="[object RegExp]",wke="[object Set]",xke="[object String]",Cke="[object Symbol]",Ske="[object ArrayBuffer]",kke="[object DataView]",Eke="[object Float32Array]",Nke="[object Float64Array]",Bke="[object Int8Array]",Ake="[object Int16Array]",Dke="[object Int32Array]",Mke="[object Uint8Array]",Tke="[object Uint8ClampedArray]",Fke="[object Uint16Array]",Ike="[object Uint32Array]";function _ke(e,t,r){var n=e.constructor;switch(t){case Ske:return F0(e);case hke:case gke:return new n(+e);case kke:return dke(e);case Eke:case Nke:case Bke:case Ake:case Dke:case Mke:case Tke:case Fke:case Ike:return ZB(e,r);case vke:return new n;case bke:case xke:return new n(e);case yke:return pke(e);case wke:return new n;case Cke:return mke(e)}}function GB(e){return typeof e.constructor=="function"&&!S0(e)?eCe(FB(e)):{}}var $ke="[object Map]";function Rke(e){return Ti(e)&&go(e)==$ke}var KB=zl&&zl.isMap,Pke=KB?E0(KB):Rke,Lke="[object Set]";function zke(e){return Ti(e)&&go(e)==Lke}var YB=zl&&zl.isSet,Uke=YB?E0(YB):zke,qke=1,JB="[object Arguments]",Vke="[object Array]",jke="[object Boolean]",Qke="[object Date]",Hke="[object Error]",OB="[object Function]",Wke="[object GeneratorFunction]",Zke="[object Map]",Gke="[object Number]",XB="[object Object]",Kke="[object RegExp]",Yke="[object Set]",Jke="[object String]",Oke="[object Symbol]",Xke="[object WeakMap]",e3e="[object ArrayBuffer]",t3e="[object DataView]",r3e="[object Float32Array]",n3e="[object Float64Array]",o3e="[object Int8Array]",i3e="[object Int16Array]",a3e="[object Int32Array]",s3e="[object Uint8Array]",l3e="[object Uint8ClampedArray]",u3e="[object Uint16Array]",c3e="[object Uint32Array]",Wt={};Wt[JB]=Wt[Vke]=Wt[e3e]=Wt[t3e]=Wt[jke]=Wt[Qke]=Wt[r3e]=Wt[n3e]=Wt[o3e]=Wt[i3e]=Wt[a3e]=Wt[Zke]=Wt[Gke]=Wt[XB]=Wt[Kke]=Wt[Yke]=Wt[Jke]=Wt[Oke]=Wt[s3e]=Wt[l3e]=Wt[u3e]=Wt[c3e]=!0,Wt[Hke]=Wt[OB]=Wt[Xke]=!1;function jp(e,t,r,n,i,o){var s,l=t&qke;if(s!==void 0)return s;if(!Ba(e))return e;var c=vs(e);if(c)s=cke(e);else{var u=go(e),d=u==OB||u==Wke;if(Qc(e))return LB(e,l);if(u==XB||u==JB||d&&!i)s=d?{}:GB(e);else{if(!Wt[u])return i?e:{};s=_ke(e,u,l)}}o||(o=new Zo);var f=o.get(e);if(f)return f;o.set(e,s),Uke(e)?e.forEach(function(h){s.add(jp(h,t,r,h,e,o))}):Pke(e)&&e.forEach(function(h,g){s.set(g,jp(h,t,r,g,e,o))});var p=A0,m=c?void 0:p(e);return cCe(m||e,function(h,g){m&&(g=h,h=e[g]),yB(s,g,jp(h,t,r,g,e,o))}),s}var d3e=1,f3e=4;function Ul(e){return jp(e,d3e|f3e)}var p3e="__lodash_hash_undefined__";function m3e(e){return this.__data__.set(e,p3e),this}function h3e(e){return this.__data__.has(e)}function Qp(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new xs;++t<r;)this.add(e[t])}Qp.prototype.add=Qp.prototype.push=m3e,Qp.prototype.has=h3e;function g3e(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function v3e(e,t){return e.has(t)}var b3e=1,y3e=2;function e6(e,t,r,n,i,o){var s=r&b3e,l=e.length,c=t.length;if(l!=c&&!(s&&c>l))return!1;var u=o.get(e),d=o.get(t);if(u&&d)return u==t&&d==e;var f=-1,p=!0,m=r&y3e?new Qp:void 0;for(o.set(e,t),o.set(t,e);++f<l;){var h=e[f],g=t[f];if(n)var v=s?n(g,h,f,t,e,o):n(h,g,f,e,t,o);if(v!==void 0){if(v)continue;p=!1;break}if(m){if(!g3e(t,function(b,w){if(!v3e(m,w)&&(h===b||i(h,b,r,n,o)))return m.push(w)})){p=!1;break}}else if(!(h===g||i(h,g,r,n,o))){p=!1;break}}return o.delete(e),o.delete(t),p}function w3e(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}function x3e(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var C3e=1,S3e=2,k3e="[object Boolean]",E3e="[object Date]",N3e="[object Error]",B3e="[object Map]",A3e="[object Number]",D3e="[object RegExp]",M3e="[object Set]",T3e="[object String]",F3e="[object Symbol]",I3e="[object ArrayBuffer]",_3e="[object DataView]",t6=Na?Na.prototype:void 0,I0=t6?t6.valueOf:void 0;function $3e(e,t,r,n,i,o,s){switch(r){case _3e:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case I3e:return!(e.byteLength!=t.byteLength||!o(new Vp(e),new Vp(t)));case k3e:case E3e:case A3e:return jc(+e,+t);case N3e:return e.name==t.name&&e.message==t.message;case D3e:case T3e:return e==t+"";case B3e:var l=w3e;case M3e:var c=n&C3e;if(l||(l=x3e),e.size!=t.size&&!c)return!1;var u=s.get(e);if(u)return u==t;n|=S3e,s.set(e,t);var d=e6(l(e),l(t),n,i,o,s);return s.delete(e),d;case F3e:if(I0)return I0.call(e)==I0.call(t)}return!1}var R3e=1,P3e=Object.prototype,L3e=P3e.hasOwnProperty;function z3e(e,t,r,n,i,o){var s=r&R3e,l=A0(e),c=l.length,u=A0(t),d=u.length;if(c!=d&&!s)return!1;for(var f=c;f--;){var p=l[f];if(!(s?p in t:L3e.call(t,p)))return!1}var m=o.get(e),h=o.get(t);if(m&&h)return m==t&&h==e;var g=!0;o.set(e,t),o.set(t,e);for(var v=s;++f<c;){p=l[f];var b=e[p],w=t[p];if(n)var y=s?n(w,b,p,t,e,o):n(b,w,p,e,t,o);if(!(y===void 0?b===w||i(b,w,r,n,o):y)){g=!1;break}v||(v=p=="constructor")}if(g&&!v){var x=e.constructor,S=t.constructor;x!=S&&"constructor"in e&&"constructor"in t&&!(typeof x=="function"&&x instanceof x&&typeof S=="function"&&S instanceof S)&&(g=!1)}return o.delete(e),o.delete(t),g}var U3e=1,r6="[object Arguments]",n6="[object Array]",Hp="[object Object]",q3e=Object.prototype,o6=q3e.hasOwnProperty;function V3e(e,t,r,n,i,o){var s=vs(e),l=vs(t),c=s?n6:go(e),u=l?n6:go(t);c=c==r6?Hp:c,u=u==r6?Hp:u;var d=c==Hp,f=u==Hp,p=c==u;if(p&&Qc(e)){if(!Qc(t))return!1;s=!0,d=!1}if(p&&!d)return o||(o=new Zo),s||B0(e)?e6(e,t,r,n,i,o):$3e(e,t,c,r,n,i,o);if(!(r&U3e)){var m=d&&o6.call(e,"__wrapped__"),h=f&&o6.call(t,"__wrapped__");if(m||h){var g=m?e.value():e,v=h?t.value():t;return o||(o=new Zo),i(g,v,r,n,o)}}return p?(o||(o=new Zo),z3e(e,t,r,n,i,o)):!1}function i6(e,t,r,n,i){return e===t?!0:e==null||t==null||!Ti(e)&&!Ti(t)?e!==e&&t!==t:V3e(e,t,r,n,i6,i)}function j3e(e){return function(t,r,n){for(var i=-1,o=Object(t),s=n(t),l=s.length;l--;){var c=s[++i];if(r(o[c],c,o)===!1)break}return t}}var Q3e=j3e();function _0(e,t,r){(r!==void 0&&!jc(e[t],r)||r===void 0&&!(t in e))&&C0(e,t,r)}function H3e(e){return Ti(e)&&zp(e)}function $0(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function W3e(e){return hCe(e,TB(e))}function Z3e(e,t,r,n,i,o,s){var l=$0(e,r),c=$0(t,r),u=s.get(c);if(u){_0(e,r,u);return}var d=o?o(l,c,r+"",e,t,s):void 0,f=d===void 0;if(f){var p=vs(c),m=!p&&Qc(c),h=!p&&!m&&B0(c);d=c,p||m||h?vs(l)?d=l:H3e(l)?d=rCe(l):m?(f=!1,d=LB(c,!0)):h?(f=!1,d=ZB(c,!0)):d=[]:VSe(c)||k0(c)?(d=l,k0(l)?d=W3e(l):(!Ba(l)||y0(l))&&(d=GB(c))):f=!1}f&&(s.set(c,d),i(d,c,n,o,s),s.delete(c)),_0(e,r,d)}function a6(e,t,r,n,i){e!==t&&Q3e(t,function(o,s){if(i||(i=new Zo),Ba(o))Z3e(e,t,s,r,a6,n,i);else{var l=n?n($0(e,s),o,s+"",e,t,i):void 0;l===void 0&&(l=o),_0(e,s,l)}},TB)}function R0(e,t){return i6(e,t)}var Aa=wCe(function(e,t,r){a6(e,t,r)}),We=(e=>(e[e.TYPE=3]="TYPE",e[e.LEVEL=12]="LEVEL",e[e.ATTRIBUTE=13]="ATTRIBUTE",e[e.BLOT=14]="BLOT",e[e.INLINE=7]="INLINE",e[e.BLOCK=11]="BLOCK",e[e.BLOCK_BLOT=10]="BLOCK_BLOT",e[e.INLINE_BLOT=6]="INLINE_BLOT",e[e.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",e[e.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",e[e.ANY=15]="ANY",e))(We||{});class Go{constructor(t,r,n={}){this.attrName=t,this.keyName=r;const i=We.TYPE&We.ATTRIBUTE;this.scope=n.scope!=null?n.scope&We.LEVEL|i:We.ATTRIBUTE,n.whitelist!=null&&(this.whitelist=n.whitelist)}static keys(t){return Array.from(t.attributes).map(r=>r.name)}add(t,r){return this.canAdd(t,r)?(t.setAttribute(this.keyName,r),!0):!1}canAdd(t,r){return this.whitelist==null?!0:typeof r=="string"?this.whitelist.indexOf(r.replace(/["']/g,""))>-1:this.whitelist.indexOf(r)>-1}remove(t){t.removeAttribute(this.keyName)}value(t){const r=t.getAttribute(this.keyName);return this.canAdd(t,r)&&r?r:""}}class ql extends Error{constructor(t){t="[Parchment] "+t,super(t),this.message=t,this.name=this.constructor.name}}const s6=class Lb{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(t,r=!1){if(t==null)return null;if(this.blots.has(t))return this.blots.get(t)||null;if(r){let n=null;try{n=t.parentNode}catch{return null}return this.find(n,r)}return null}create(t,r,n){const i=this.query(r);if(i==null)throw new ql(`Unable to create ${r} blot`);const o=i,s=r instanceof Node||r.nodeType===Node.TEXT_NODE?r:o.create(n),l=new o(t,s,n);return Lb.blots.set(l.domNode,l),l}find(t,r=!1){return Lb.find(t,r)}query(t,r=We.ANY){let n;return typeof t=="string"?n=this.types[t]||this.attributes[t]:t instanceof Text||t.nodeType===Node.TEXT_NODE?n=this.types.text:typeof t=="number"?t&We.LEVEL&We.BLOCK?n=this.types.block:t&We.LEVEL&We.INLINE&&(n=this.types.inline):t instanceof Element&&((t.getAttribute("class")||"").split(/\s+/).some(i=>(n=this.classes[i],!!n)),n=n||this.tags[t.tagName]),n==null?null:"scope"in n&&r&We.LEVEL&n.scope&&r&We.TYPE&n.scope?n:null}register(...t){return t.map(r=>{const n="blotName"in r,i="attrName"in r;if(!n&&!i)throw new ql("Invalid definition");if(n&&r.blotName==="abstract")throw new ql("Cannot register abstract class");const o=n?r.blotName:i?r.attrName:void 0;return this.types[o]=r,i?typeof r.keyName=="string"&&(this.attributes[r.keyName]=r):n&&(r.className&&(this.classes[r.className]=r),r.tagName&&(Array.isArray(r.tagName)?r.tagName=r.tagName.map(s=>s.toUpperCase()):r.tagName=r.tagName.toUpperCase(),(Array.isArray(r.tagName)?r.tagName:[r.tagName]).forEach(s=>{(this.tags[s]==null||r.className==null)&&(this.tags[s]=r)}))),r})}};s6.blots=new WeakMap;let Vl=s6;function l6(e,t){return(e.getAttribute("class")||"").split(/\s+/).filter(r=>r.indexOf(`${t}-`)===0)}class G3e extends Go{static keys(t){return(t.getAttribute("class")||"").split(/\s+/).map(r=>r.split("-").slice(0,-1).join("-"))}add(t,r){return this.canAdd(t,r)?(this.remove(t),t.classList.add(`${this.keyName}-${r}`),!0):!1}remove(t){l6(t,this.keyName).forEach(r=>{t.classList.remove(r)}),t.classList.length===0&&t.removeAttribute("class")}value(t){const r=(l6(t,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(t,r)?r:""}}const vo=G3e;function P0(e){const t=e.split("-"),r=t.slice(1).map(n=>n[0].toUpperCase()+n.slice(1)).join("");return t[0]+r}class K3e extends Go{static keys(t){return(t.getAttribute("style")||"").split(";").map(r=>r.split(":")[0].trim())}add(t,r){return this.canAdd(t,r)?(t.style[P0(this.keyName)]=r,!0):!1}remove(t){t.style[P0(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")}value(t){const r=t.style[P0(this.keyName)];return this.canAdd(t,r)?r:""}}const Da=K3e;class Y3e{constructor(t){this.attributes={},this.domNode=t,this.build()}attribute(t,r){r?t.add(this.domNode,r)&&(t.value(this.domNode)!=null?this.attributes[t.attrName]=t:delete this.attributes[t.attrName]):(t.remove(this.domNode),delete this.attributes[t.attrName])}build(){this.attributes={};const t=Vl.find(this.domNode);if(t==null)return;const r=Go.keys(this.domNode),n=vo.keys(this.domNode),i=Da.keys(this.domNode);r.concat(n).concat(i).forEach(o=>{const s=t.scroll.query(o,We.ATTRIBUTE);s instanceof Go&&(this.attributes[s.attrName]=s)})}copy(t){Object.keys(this.attributes).forEach(r=>{const n=this.attributes[r].value(this.domNode);t.format(r,n)})}move(t){this.copy(t),Object.keys(this.attributes).forEach(r=>{this.attributes[r].remove(this.domNode)}),this.attributes={}}values(){return Object.keys(this.attributes).reduce((t,r)=>(t[r]=this.attributes[r].value(this.domNode),t),{})}}const Wp=Y3e,u6=class{constructor(e,t){this.scroll=e,this.domNode=t,Vl.blots.set(t,this),this.prev=null,this.next=null}static create(e){if(this.tagName==null)throw new ql("Blot definition missing tagName");let t,r;return Array.isArray(this.tagName)?(typeof e=="string"?(r=e.toUpperCase(),parseInt(r,10).toString()===r&&(r=parseInt(r,10))):typeof e=="number"&&(r=e),typeof r=="number"?t=document.createElement(this.tagName[r-1]):r&&this.tagName.indexOf(r)>-1?t=document.createElement(r):t=document.createElement(this.tagName[0])):t=document.createElement(this.tagName),this.className&&t.classList.add(this.className),t}get statics(){return this.constructor}attach(){}clone(){const e=this.domNode.cloneNode(!1);return this.scroll.create(e)}detach(){this.parent!=null&&this.parent.removeChild(this),Vl.blots.delete(this.domNode)}deleteAt(e,t){this.isolate(e,t).remove()}formatAt(e,t,r,n){const i=this.isolate(e,t);if(this.scroll.query(r,We.BLOT)!=null&&n)i.wrap(r,n);else if(this.scroll.query(r,We.ATTRIBUTE)!=null){const o=this.scroll.create(this.statics.scope);i.wrap(o),o.format(r,n)}}insertAt(e,t,r){const n=r==null?this.scroll.create("text",t):this.scroll.create(t,r),i=this.split(e);this.parent.insertBefore(n,i||void 0)}isolate(e,t){const r=this.split(e);if(r==null)throw new Error("Attempt to isolate at end");return r.split(t),r}length(){return 1}offset(e=this.parent){return this.parent==null||this===e?0:this.parent.children.offset(this)+this.parent.offset(e)}optimize(e){this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)&&this.wrap(this.statics.requiredContainer.blotName)}remove(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()}replaceWith(e,t){const r=typeof e=="string"?this.scroll.create(e,t):e;return this.parent!=null&&(this.parent.insertBefore(r,this.next||void 0),this.remove()),r}split(e,t){return e===0?this:this.next}update(e,t){}wrap(e,t){const r=typeof e=="string"?this.scroll.create(e,t):e;if(this.parent!=null&&this.parent.insertBefore(r,this.next||void 0),typeof r.appendChild!="function")throw new ql(`Cannot wrap ${e}`);return r.appendChild(this),r}};u6.blotName="abstract";let c6=u6;const d6=class extends c6{static value(e){return!0}index(e,t){return this.domNode===e||this.domNode.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(t,1):-1}position(e,t){let r=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return e>0&&(r+=1),[this.parent.domNode,r]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}};d6.scope=We.INLINE_BLOT;const jr=d6;class J3e{constructor(){this.head=null,this.tail=null,this.length=0}append(...t){if(this.insertBefore(t[0],null),t.length>1){const r=t.slice(1);this.append(...r)}}at(t){const r=this.iterator();let n=r();for(;n&&t>0;)t-=1,n=r();return n}contains(t){const r=this.iterator();let n=r();for(;n;){if(n===t)return!0;n=r()}return!1}indexOf(t){const r=this.iterator();let n=r(),i=0;for(;n;){if(n===t)return i;i+=1,n=r()}return-1}insertBefore(t,r){t!=null&&(this.remove(t),t.next=r,r!=null?(t.prev=r.prev,r.prev!=null&&(r.prev.next=t),r.prev=t,r===this.head&&(this.head=t)):this.tail!=null?(this.tail.next=t,t.prev=this.tail,this.tail=t):(t.prev=null,this.head=this.tail=t),this.length+=1)}offset(t){let r=0,n=this.head;for(;n!=null;){if(n===t)return r;r+=n.length(),n=n.next}return-1}remove(t){this.contains(t)&&(t.prev!=null&&(t.prev.next=t.next),t.next!=null&&(t.next.prev=t.prev),t===this.head&&(this.head=t.next),t===this.tail&&(this.tail=t.prev),this.length-=1)}iterator(t=this.head){return()=>{const r=t;return t!=null&&(t=t.next),r}}find(t,r=!1){const n=this.iterator();let i=n();for(;i;){const o=i.length();if(t<o||r&&t===o&&(i.next==null||i.next.length()!==0))return[i,t];t-=o,i=n()}return[null,0]}forEach(t){const r=this.iterator();let n=r();for(;n;)t(n),n=r()}forEachAt(t,r,n){if(r<=0)return;const[i,o]=this.find(t);let s=t-o;const l=this.iterator(i);let c=l();for(;c&&s<t+r;){const u=c.length();t>s?n(c,t-s,Math.min(r,s+u-t)):n(c,0,Math.min(u,t+r-s)),s+=u,c=l()}}map(t){return this.reduce((r,n)=>(r.push(t(n)),r),[])}reduce(t,r){const n=this.iterator();let i=n();for(;i;)r=t(r,i),i=n();return r}}function f6(e,t){const r=t.find(e);if(r)return r;try{return t.create(e)}catch{const n=t.create(We.INLINE);return Array.from(e.childNodes).forEach(i=>{n.domNode.appendChild(i)}),e.parentNode&&e.parentNode.replaceChild(n.domNode,e),n.attach(),n}}const p6=class qa extends c6{constructor(t,r){super(t,r),this.uiNode=null,this.build()}appendChild(t){this.insertBefore(t)}attach(){super.attach(),this.children.forEach(t=>{t.attach()})}attachUI(t){this.uiNode!=null&&this.uiNode.remove(),this.uiNode=t,qa.uiClass&&this.uiNode.classList.add(qa.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new J3e,Array.from(this.domNode.childNodes).filter(t=>t!==this.uiNode).reverse().forEach(t=>{try{const r=f6(t,this.scroll);this.insertBefore(r,this.children.head||void 0)}catch(r){if(r instanceof ql)return;throw r}})}deleteAt(t,r){if(t===0&&r===this.length())return this.remove();this.children.forEachAt(t,r,(n,i,o)=>{n.deleteAt(i,o)})}descendant(t,r=0){const[n,i]=this.children.find(r);return t.blotName==null&&t(n)||t.blotName!=null&&n instanceof t?[n,i]:n instanceof qa?n.descendant(t,i):[null,-1]}descendants(t,r=0,n=Number.MAX_VALUE){let i=[],o=n;return this.children.forEachAt(r,n,(s,l,c)=>{(t.blotName==null&&t(s)||t.blotName!=null&&s instanceof t)&&i.push(s),s instanceof qa&&(i=i.concat(s.descendants(t,l,o))),o-=c}),i}detach(){this.children.forEach(t=>{t.detach()}),super.detach()}enforceAllowedChildren(){let t=!1;this.children.forEach(r=>{t||this.statics.allowedChildren.some(n=>r instanceof n)||(r.statics.scope===We.BLOCK_BLOT?(r.next!=null&&this.splitAfter(r),r.prev!=null&&this.splitAfter(r.prev),r.parent.unwrap(),t=!0):r instanceof qa?r.unwrap():r.remove())})}formatAt(t,r,n,i){this.children.forEachAt(t,r,(o,s,l)=>{o.formatAt(s,l,n,i)})}insertAt(t,r,n){const[i,o]=this.children.find(t);if(i)i.insertAt(o,r,n);else{const s=n==null?this.scroll.create("text",r):this.scroll.create(r,n);this.appendChild(s)}}insertBefore(t,r){t.parent!=null&&t.parent.children.remove(t);let n=null;this.children.insertBefore(t,r||null),t.parent=this,r!=null&&(n=r.domNode),(this.domNode.parentNode!==t.domNode||this.domNode.nextSibling!==n)&&this.domNode.insertBefore(t.domNode,n),t.attach()}length(){return this.children.reduce((t,r)=>t+r.length(),0)}moveChildren(t,r){this.children.forEach(n=>{t.insertBefore(n,r)})}optimize(t){if(super.optimize(t),this.enforceAllowedChildren(),this.uiNode!=null&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),this.children.length===0)if(this.statics.defaultChild!=null){const r=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(r)}else this.remove()}path(t,r=!1){const[n,i]=this.children.find(t,r),o=[[this,t]];return n instanceof qa?o.concat(n.path(i,r)):(n!=null&&o.push([n,i]),o)}removeChild(t){this.children.remove(t)}replaceWith(t,r){const n=typeof t=="string"?this.scroll.create(t,r):t;return n instanceof qa&&this.moveChildren(n),super.replaceWith(n)}split(t,r=!1){if(!r){if(t===0)return this;if(t===this.length())return this.next}const n=this.clone();return this.parent&&this.parent.insertBefore(n,this.next||void 0),this.children.forEachAt(t,this.length(),(i,o,s)=>{const l=i.split(o,r);l!=null&&n.appendChild(l)}),n}splitAfter(t){const r=this.clone();for(;t.next!=null;)r.appendChild(t.next);return this.parent&&this.parent.insertBefore(r,this.next||void 0),r}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()}update(t,r){const n=[],i=[];t.forEach(o=>{o.target===this.domNode&&o.type==="childList"&&(n.push(...o.addedNodes),i.push(...o.removedNodes))}),i.forEach(o=>{if(o.parentNode!=null&&o.tagName!=="IFRAME"&&document.body.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;const s=this.scroll.find(o);s!=null&&(s.domNode.parentNode==null||s.domNode.parentNode===this.domNode)&&s.detach()}),n.filter(o=>o.parentNode===this.domNode&&o!==this.uiNode).sort((o,s)=>o===s?0:o.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1).forEach(o=>{let s=null;o.nextSibling!=null&&(s=this.scroll.find(o.nextSibling));const l=f6(o,this.scroll);(l.next!==s||l.next==null)&&(l.parent!=null&&l.parent.removeChild(this),this.insertBefore(l,s||void 0))}),this.enforceAllowedChildren()}};p6.uiClass="";const bo=p6;function O3e(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}const jl=class tu extends bo{static create(t){return super.create(t)}static formats(t,r){const n=r.query(tu.blotName);if(!(n!=null&&t.tagName===n.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return t.tagName.toLowerCase()}}constructor(t,r){super(t,r),this.attributes=new Wp(this.domNode)}format(t,r){if(t===this.statics.blotName&&!r)this.children.forEach(n=>{n instanceof tu||(n=n.wrap(tu.blotName,!0)),this.attributes.copy(n)}),this.unwrap();else{const n=this.scroll.query(t,We.INLINE);if(n==null)return;n instanceof Go?this.attributes.attribute(n,r):r&&(t!==this.statics.blotName||this.formats()[t]!==r)&&this.replaceWith(t,r)}}formats(){const t=this.attributes.values(),r=this.statics.formats(this.domNode,this.scroll);return r!=null&&(t[this.statics.blotName]=r),t}formatAt(t,r,n,i){this.formats()[n]!=null||this.scroll.query(n,We.ATTRIBUTE)?this.isolate(t,r).format(n,i):super.formatAt(t,r,n,i)}optimize(t){super.optimize(t);const r=this.formats();if(Object.keys(r).length===0)return this.unwrap();const n=this.next;n instanceof tu&&n.prev===this&&O3e(r,n.formats())&&(n.moveChildren(this),n.remove())}replaceWith(t,r){const n=super.replaceWith(t,r);return this.attributes.copy(n),n}update(t,r){super.update(t,r),t.some(n=>n.target===this.domNode&&n.type==="attributes")&&this.attributes.build()}wrap(t,r){const n=super.wrap(t,r);return n instanceof tu&&this.attributes.move(n),n}};jl.allowedChildren=[jl,jr],jl.blotName="inline",jl.scope=We.INLINE_BLOT,jl.tagName="SPAN";const L0=jl,Ql=class zb extends bo{static create(t){return super.create(t)}static formats(t,r){const n=r.query(zb.blotName);if(!(n!=null&&t.tagName===n.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return t.tagName.toLowerCase()}}constructor(t,r){super(t,r),this.attributes=new Wp(this.domNode)}format(t,r){const n=this.scroll.query(t,We.BLOCK);n!=null&&(n instanceof Go?this.attributes.attribute(n,r):t===this.statics.blotName&&!r?this.replaceWith(zb.blotName):r&&(t!==this.statics.blotName||this.formats()[t]!==r)&&this.replaceWith(t,r))}formats(){const t=this.attributes.values(),r=this.statics.formats(this.domNode,this.scroll);return r!=null&&(t[this.statics.blotName]=r),t}formatAt(t,r,n,i){this.scroll.query(n,We.BLOCK)!=null?this.format(n,i):super.formatAt(t,r,n,i)}insertAt(t,r,n){if(n==null||this.scroll.query(r,We.INLINE)!=null)super.insertAt(t,r,n);else{const i=this.split(t);if(i!=null){const o=this.scroll.create(r,n);i.parent.insertBefore(o,i)}else throw new Error("Attempt to insertAt after block boundaries")}}replaceWith(t,r){const n=super.replaceWith(t,r);return this.attributes.copy(n),n}update(t,r){super.update(t,r),t.some(n=>n.target===this.domNode&&n.type==="attributes")&&this.attributes.build()}};Ql.blotName="block",Ql.scope=We.BLOCK_BLOT,Ql.tagName="P",Ql.allowedChildren=[L0,Ql,jr];const Gc=Ql,z0=class extends bo{checkMerge(){return this.next!==null&&this.next.statics.blotName===this.statics.blotName}deleteAt(e,t){super.deleteAt(e,t),this.enforceAllowedChildren()}formatAt(e,t,r,n){super.formatAt(e,t,r,n),this.enforceAllowedChildren()}insertAt(e,t,r){super.insertAt(e,t,r),this.enforceAllowedChildren()}optimize(e){super.optimize(e),this.children.length>0&&this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};z0.blotName="container",z0.scope=We.BLOCK_BLOT;const Zp=z0;class X3e extends jr{static formats(t,r){}format(t,r){super.formatAt(0,this.length(),t,r)}formatAt(t,r,n,i){t===0&&r===this.length()?this.format(n,i):super.formatAt(t,r,n,i)}formats(){return this.statics.formats(this.domNode,this.scroll)}}const An=X3e,e4e={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},t4e=100,Hl=class extends bo{constructor(e,t){super(null,t),this.registry=e,this.scroll=this,this.build(),this.observer=new MutationObserver(r=>{this.update(r)}),this.observer.observe(this.domNode,e4e),this.attach()}create(e,t){return this.registry.create(this,e,t)}find(e,t=!1){const r=this.registry.find(e,t);return r?r.scroll===this?r:t?this.find(r.scroll.domNode.parentNode,!0):null:null}query(e,t=We.ANY){return this.registry.query(e,t)}register(...e){return this.registry.register(...e)}build(){this.scroll!=null&&super.build()}detach(){super.detach(),this.observer.disconnect()}deleteAt(e,t){this.update(),e===0&&t===this.length()?this.children.forEach(r=>{r.remove()}):super.deleteAt(e,t)}formatAt(e,t,r,n){this.update(),super.formatAt(e,t,r,n)}insertAt(e,t,r){this.update(),super.insertAt(e,t,r)}optimize(e=[],t={}){super.optimize(t);const r=t.mutationsMap||new WeakMap;let n=Array.from(this.observer.takeRecords());for(;n.length>0;)e.push(n.pop());const i=(l,c=!0)=>{l==null||l===this||l.domNode.parentNode!=null&&(r.has(l.domNode)||r.set(l.domNode,[]),c&&i(l.parent))},o=l=>{r.has(l.domNode)&&(l instanceof bo&&l.children.forEach(o),r.delete(l.domNode),l.optimize(t))};let s=e;for(let l=0;s.length>0;l+=1){if(l>=t4e)throw new Error("[Parchment] Maximum optimize iterations reached");for(s.forEach(c=>{const u=this.find(c.target,!0);u!=null&&(u.domNode===c.target&&(c.type==="childList"?(i(this.find(c.previousSibling,!1)),Array.from(c.addedNodes).forEach(d=>{const f=this.find(d,!1);i(f,!1),f instanceof bo&&f.children.forEach(p=>{i(p,!1)})})):c.type==="attributes"&&i(u.prev)),i(u))}),this.children.forEach(o),s=Array.from(this.observer.takeRecords()),n=s.slice();n.length>0;)e.push(n.pop())}}update(e,t={}){e=e||this.observer.takeRecords();const r=new WeakMap;e.map(n=>{const i=this.find(n.target,!0);return i==null?null:r.has(i.domNode)?(r.get(i.domNode).push(n),null):(r.set(i.domNode,[n]),i)}).forEach(n=>{n!=null&&n!==this&&r.has(n.domNode)&&n.update(r.get(n.domNode)||[],t)}),t.mutationsMap=r,r.has(this.domNode)&&super.update(r.get(this.domNode),t),this.optimize(e,t)}};Hl.blotName="scroll",Hl.defaultChild=Gc,Hl.allowedChildren=[Gc,Zp],Hl.scope=We.BLOCK_BLOT,Hl.tagName="DIV";const U0=Hl,q0=class SA extends jr{static create(t){return document.createTextNode(t)}static value(t){return t.data}constructor(t,r){super(t,r),this.text=this.statics.value(this.domNode)}deleteAt(t,r){this.domNode.data=this.text=this.text.slice(0,t)+this.text.slice(t+r)}index(t,r){return this.domNode===t?r:-1}insertAt(t,r,n){n==null?(this.text=this.text.slice(0,t)+r+this.text.slice(t),this.domNode.data=this.text):super.insertAt(t,r,n)}length(){return this.text.length}optimize(t){super.optimize(t),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof SA&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())}position(t,r=!1){return[this.domNode,t]}split(t,r=!1){if(!r){if(t===0)return this;if(t===this.length())return this.next}const n=this.scroll.create(this.domNode.splitText(t));return this.parent.insertBefore(n,this.next||void 0),this.text=this.statics.value(this.domNode),n}update(t,r){t.some(n=>n.type==="characterData"&&n.target===this.domNode)&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};q0.blotName="text",q0.scope=We.INLINE_BLOT;const Gp=q0,m6=Object.freeze(Object.defineProperty({__proto__:null,Attributor:Go,AttributorStore:Wp,BlockBlot:Gc,ClassAttributor:vo,ContainerBlot:Zp,EmbedBlot:An,InlineBlot:L0,LeafBlot:jr,ParentBlot:bo,Registry:Vl,Scope:We,ScrollBlot:U0,StyleAttributor:Da,TextBlot:Gp},Symbol.toStringTag,{value:"Module"}));var V0={exports:{}},j0,h6;function r4e(){if(h6)return j0;h6=1;var e=-1,t=1,r=0;function n(k,M,T,R,F){if(k===M)return k?[[r,k]]:[];if(T!=null){var A=N(k,M,T);if(A)return A}var P=l(k,M),q=k.substring(0,P);k=k.substring(P),M=M.substring(P),P=u(k,M);var z=k.substring(k.length-P);k=k.substring(0,k.length-P),M=M.substring(0,M.length-P);var W=i(k,M);return q&&W.unshift([r,q]),z&&W.push([r,z]),w(W,F),R&&f(W),W}function i(k,M){var T;if(!k)return[[t,M]];if(!M)return[[e,k]];var R=k.length>M.length?k:M,F=k.length>M.length?M:k,A=R.indexOf(F);if(A!==-1)return T=[[t,R.substring(0,A)],[r,F],[t,R.substring(A+F.length)]],k.length>M.length&&(T[0][0]=T[2][0]=e),T;if(F.length===1)return[[e,k],[t,M]];var P=d(k,M);if(P){var q=P[0],z=P[1],W=P[2],X=P[3],$=P[4],j=n(q,W),L=n(z,X);return j.concat([[r,$]],L)}return o(k,M)}function o(k,M){for(var T=k.length,R=M.length,F=Math.ceil((T+R)/2),A=F,P=2*F,q=new Array(P),z=new Array(P),W=0;W<P;W++)q[W]=-1,z[W]=-1;q[A+1]=0,z[A+1]=0;for(var X=T-R,$=X%2!==0,j=0,L=0,ae=0,se=0,ie=0;ie<F;ie++){for(var V=-ie+j;V<=ie-L;V+=2){var G=A+V,O;V===-ie||V!==ie&&q[G-1]<q[G+1]?O=q[G+1]:O=q[G-1]+1;for(var te=O-V;O<T&&te<R&&k.charAt(O)===M.charAt(te);)O++,te++;if(q[G]=O,O>T)L+=2;else if(te>R)j+=2;else if($){var oe=A+X-V;if(oe>=0&&oe<P&&z[oe]!==-1){var fe=T-z[oe];if(O>=fe)return s(k,M,O,te)}}}for(var de=-ie+ae;de<=ie-se;de+=2){var oe=A+de,fe;de===-ie||de!==ie&&z[oe-1]<z[oe+1]?fe=z[oe+1]:fe=z[oe-1]+1;for(var ve=fe-de;fe<T&&ve<R&&k.charAt(T-fe-1)===M.charAt(R-ve-1);)fe++,ve++;if(z[oe]=fe,fe>T)se+=2;else if(ve>R)ae+=2;else if(!$){var G=A+X-de;if(G>=0&&G<P&&q[G]!==-1){var O=q[G],te=A+O-G;if(fe=T-fe,O>=fe)return s(k,M,O,te)}}}}return[[e,k],[t,M]]}function s(k,M,T,R){var F=k.substring(0,T),A=M.substring(0,R),P=k.substring(T),q=M.substring(R),z=n(F,A),W=n(P,q);return z.concat(W)}function l(k,M){if(!k||!M||k.charAt(0)!==M.charAt(0))return 0;for(var T=0,R=Math.min(k.length,M.length),F=R,A=0;T<F;)k.substring(A,F)==M.substring(A,F)?(T=F,A=T):R=F,F=Math.floor((R-T)/2+T);return y(k.charCodeAt(F-1))&&F--,F}function c(k,M){var T=k.length,R=M.length;if(T==0||R==0)return 0;T>R?k=k.substring(T-R):T<R&&(M=M.substring(0,T));var F=Math.min(T,R);if(k==M)return F;for(var A=0,P=1;;){var q=k.substring(F-P),z=M.indexOf(q);if(z==-1)return A;P+=z,(z==0||k.substring(F-P)==M.substring(0,P))&&(A=P,P++)}}function u(k,M){if(!k||!M||k.slice(-1)!==M.slice(-1))return 0;for(var T=0,R=Math.min(k.length,M.length),F=R,A=0;T<F;)k.substring(k.length-F,k.length-A)==M.substring(M.length-F,M.length-A)?(T=F,A=T):R=F,F=Math.floor((R-T)/2+T);return x(k.charCodeAt(k.length-F))&&F--,F}function d(k,M){var T=k.length>M.length?k:M,R=k.length>M.length?M:k;if(T.length<4||R.length*2<T.length)return null;function F(L,ae,se){for(var ie=L.substring(se,se+Math.floor(L.length/4)),V=-1,G="",O,te,oe,fe;(V=ae.indexOf(ie,V+1))!==-1;){var de=l(L.substring(se),ae.substring(V)),ve=u(L.substring(0,se),ae.substring(0,V));G.length<ve+de&&(G=ae.substring(V-ve,V)+ae.substring(V,V+de),O=L.substring(0,se-ve),te=L.substring(se+de),oe=ae.substring(0,V-ve),fe=ae.substring(V+de))}return G.length*2>=L.length?[O,te,oe,fe,G]:null}var A=F(T,R,Math.ceil(T.length/4)),P=F(T,R,Math.ceil(T.length/2)),q;if(!A&&!P)return null;P?A?q=A[4].length>P[4].length?A:P:q=P:q=A;var z,W,X,$;k.length>M.length?(z=q[0],W=q[1],X=q[2],$=q[3]):(X=q[0],$=q[1],z=q[2],W=q[3]);var j=q[4];return[z,W,X,$,j]}function f(k){for(var M=!1,T=[],R=0,F=null,A=0,P=0,q=0,z=0,W=0;A<k.length;)k[A][0]==r?(T[R++]=A,P=z,q=W,z=0,W=0,F=k[A][1]):(k[A][0]==t?z+=k[A][1].length:W+=k[A][1].length,F&&F.length<=Math.max(P,q)&&F.length<=Math.max(z,W)&&(k.splice(T[R-1],0,[e,F]),k[T[R-1]+1][0]=t,R--,R--,A=R>0?T[R-1]:-1,P=0,q=0,z=0,W=0,F=null,M=!0)),A++;for(M&&w(k),b(k),A=1;A<k.length;){if(k[A-1][0]==e&&k[A][0]==t){var X=k[A-1][1],$=k[A][1],j=c(X,$),L=c($,X);j>=L?(j>=X.length/2||j>=$.length/2)&&(k.splice(A,0,[r,$.substring(0,j)]),k[A-1][1]=X.substring(0,X.length-j),k[A+1][1]=$.substring(j),A++):(L>=X.length/2||L>=$.length/2)&&(k.splice(A,0,[r,X.substring(0,L)]),k[A-1][0]=t,k[A-1][1]=$.substring(0,$.length-L),k[A+1][0]=e,k[A+1][1]=X.substring(L),A++),A++}A++}}var p=/[^a-zA-Z0-9]/,m=/\s/,h=/[\r\n]/,g=/\n\r?\n$/,v=/^\r?\n\r?\n/;function b(k){function M(L,ae){if(!L||!ae)return 6;var se=L.charAt(L.length-1),ie=ae.charAt(0),V=se.match(p),G=ie.match(p),O=V&&se.match(m),te=G&&ie.match(m),oe=O&&se.match(h),fe=te&&ie.match(h),de=oe&&L.match(g),ve=fe&&ae.match(v);return de||ve?5:oe||fe?4:V&&!O&&te?3:O||te?2:V||G?1:0}for(var T=1;T<k.length-1;){if(k[T-1][0]==r&&k[T+1][0]==r){var R=k[T-1][1],F=k[T][1],A=k[T+1][1],P=u(R,F);if(P){var q=F.substring(F.length-P);R=R.substring(0,R.length-P),F=q+F.substring(0,F.length-P),A=q+A}for(var z=R,W=F,X=A,$=M(R,F)+M(F,A);F.charAt(0)===A.charAt(0);){R+=F.charAt(0),F=F.substring(1)+A.charAt(0),A=A.substring(1);var j=M(R,F)+M(F,A);j>=$&&($=j,z=R,W=F,X=A)}k[T-1][1]!=z&&(z?k[T-1][1]=z:(k.splice(T-1,1),T--),k[T][1]=W,X?k[T+1][1]=X:(k.splice(T+1,1),T--))}T++}}function w(k,M){k.push([r,""]);for(var T=0,R=0,F=0,A="",P="",q;T<k.length;){if(T<k.length-1&&!k[T][1]){k.splice(T,1);continue}switch(k[T][0]){case t:F++,P+=k[T][1],T++;break;case e:R++,A+=k[T][1],T++;break;case r:var z=T-F-R-1;if(M){if(z>=0&&C(k[z][1])){var W=k[z][1].slice(-1);if(k[z][1]=k[z][1].slice(0,-1),A=W+A,P=W+P,!k[z][1]){k.splice(z,1),T--;var X=z-1;k[X]&&k[X][0]===t&&(F++,P=k[X][1]+P,X--),k[X]&&k[X][0]===e&&(R++,A=k[X][1]+A,X--),z=X}}if(S(k[T][1])){var W=k[T][1].charAt(0);k[T][1]=k[T][1].slice(1),A+=W,P+=W}}if(T<k.length-1&&!k[T][1]){k.splice(T,1);break}if(A.length>0||P.length>0){A.length>0&&P.length>0&&(q=l(P,A),q!==0&&(z>=0?k[z][1]+=P.substring(0,q):(k.splice(0,0,[r,P.substring(0,q)]),T++),P=P.substring(q),A=A.substring(q)),q=u(P,A),q!==0&&(k[T][1]=P.substring(P.length-q)+k[T][1],P=P.substring(0,P.length-q),A=A.substring(0,A.length-q)));var $=F+R;A.length===0&&P.length===0?(k.splice(T-$,$),T=T-$):A.length===0?(k.splice(T-$,$,[t,P]),T=T-$+1):P.length===0?(k.splice(T-$,$,[e,A]),T=T-$+1):(k.splice(T-$,$,[e,A],[t,P]),T=T-$+2)}T!==0&&k[T-1][0]===r?(k[T-1][1]+=k[T][1],k.splice(T,1)):T++,F=0,R=0,A="",P="";break}}k[k.length-1][1]===""&&k.pop();var j=!1;for(T=1;T<k.length-1;)k[T-1][0]===r&&k[T+1][0]===r&&(k[T][1].substring(k[T][1].length-k[T-1][1].length)===k[T-1][1]?(k[T][1]=k[T-1][1]+k[T][1].substring(0,k[T][1].length-k[T-1][1].length),k[T+1][1]=k[T-1][1]+k[T+1][1],k.splice(T-1,1),j=!0):k[T][1].substring(0,k[T+1][1].length)==k[T+1][1]&&(k[T-1][1]+=k[T+1][1],k[T][1]=k[T][1].substring(k[T+1][1].length)+k[T+1][1],k.splice(T+1,1),j=!0)),T++;j&&w(k,M)}function y(k){return k>=55296&&k<=56319}function x(k){return k>=56320&&k<=57343}function S(k){return x(k.charCodeAt(0))}function C(k){return y(k.charCodeAt(k.length-1))}function E(k){for(var M=[],T=0;T<k.length;T++)k[T][1].length>0&&M.push(k[T]);return M}function B(k,M,T,R){return C(k)||S(R)?null:E([[r,k],[e,M],[t,T],[r,R]])}function N(k,M,T){var R=typeof T=="number"?{index:T,length:0}:T.oldRange,F=typeof T=="number"?null:T.newRange,A=k.length,P=M.length;if(R.length===0&&(F===null||F.length===0)){var q=R.index,z=k.slice(0,q),W=k.slice(q),X=F?F.index:null;e:{var $=q+P-A;if(X!==null&&X!==$||$<0||$>P)break e;var j=M.slice(0,$),L=M.slice($);if(L!==W)break e;var ae=Math.min(q,$),se=z.slice(0,ae),ie=j.slice(0,ae);if(se!==ie)break e;var V=z.slice(ae),G=j.slice(ae);return B(se,V,G,W)}e:{if(X!==null&&X!==q)break e;var O=q,j=M.slice(0,O),L=M.slice(O);if(j!==z)break e;var te=Math.min(A-O,P-O),oe=W.slice(W.length-te),fe=L.slice(L.length-te);if(oe!==fe)break e;var V=W.slice(0,W.length-te),G=L.slice(0,L.length-te);return B(z,V,G,oe)}}if(R.length>0&&F&&F.length===0)e:{var se=k.slice(0,R.index),oe=k.slice(R.index+R.length),ae=se.length,te=oe.length;if(P<ae+te)break e;var ie=M.slice(0,ae),fe=M.slice(P-te);if(se!==ie||oe!==fe)break e;var V=k.slice(ae,A-te),G=M.slice(ae,P-te);return B(se,V,G,oe)}return null}function D(k,M,T,R){return n(k,M,T,R,!0)}return D.INSERT=t,D.DELETE=e,D.EQUAL=r,j0=D,j0}var Kp={exports:{}};Kp.exports;var g6;function v6(){return g6||(g6=1,function(e,t){var r=200,n="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",s="[object Array]",l="[object Boolean]",c="[object Date]",u="[object Error]",d="[object Function]",f="[object GeneratorFunction]",p="[object Map]",m="[object Number]",h="[object Object]",g="[object Promise]",v="[object RegExp]",b="[object Set]",w="[object String]",y="[object Symbol]",x="[object WeakMap]",S="[object ArrayBuffer]",C="[object DataView]",E="[object Float32Array]",B="[object Float64Array]",N="[object Int8Array]",D="[object Int16Array]",k="[object Int32Array]",M="[object Uint8Array]",T="[object Uint8ClampedArray]",R="[object Uint16Array]",F="[object Uint32Array]",A=/[\\^$.*+?()[\]{}|]/g,P=/\w*$/,q=/^\[object .+?Constructor\]$/,z=/^(?:0|[1-9]\d*)$/,W={};W[o]=W[s]=W[S]=W[C]=W[l]=W[c]=W[E]=W[B]=W[N]=W[D]=W[k]=W[p]=W[m]=W[h]=W[v]=W[b]=W[w]=W[y]=W[M]=W[T]=W[R]=W[F]=!0,W[u]=W[d]=W[x]=!1;var X=typeof Ea=="object"&&Ea&&Ea.Object===Object&&Ea,$=typeof self=="object"&&self&&self.Object===Object&&self,j=X||$||Function("return this")(),L=t&&!t.nodeType&&t,ae=L&&!0&&e&&!e.nodeType&&e,se=ae&&ae.exports===L;function ie(I,Y){return I.set(Y[0],Y[1]),I}function V(I,Y){return I.add(Y),I}function G(I,Y){for(var le=-1,ye=I?I.length:0;++le<ye&&Y(I[le],le,I)!==!1;);return I}function O(I,Y){for(var le=-1,ye=Y.length,ht=I.length;++le<ye;)I[ht+le]=Y[le];return I}function te(I,Y,le,ye){for(var ht=-1,Oe=I?I.length:0;++ht<Oe;)le=Y(le,I[ht],ht,I);return le}function oe(I,Y){for(var le=-1,ye=Array(I);++le<I;)ye[le]=Y(le);return ye}function fe(I,Y){return I==null?void 0:I[Y]}function de(I){var Y=!1;if(I!=null&&typeof I.toString!="function")try{Y=!!(I+"")}catch{}return Y}function ve(I){var Y=-1,le=Array(I.size);return I.forEach(function(ye,ht){le[++Y]=[ht,ye]}),le}function Ie(I,Y){return function(le){return I(Y(le))}}function $e(I){var Y=-1,le=Array(I.size);return I.forEach(function(ye){le[++Y]=ye}),le}var Te=Array.prototype,Le=Function.prototype,Z=Object.prototype,J=j["__core-js_shared__"],ee=function(){var I=/[^.]+$/.exec(J&&J.keys&&J.keys.IE_PROTO||"");return I?"Symbol(src)_1."+I:""}(),U=Le.toString,K=Z.hasOwnProperty,Q=Z.toString,ne=RegExp("^"+U.call(K).replace(A,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ue=se?j.Buffer:void 0,pe=j.Symbol,ge=j.Uint8Array,we=Ie(Object.getPrototypeOf,Object),Fe=Object.create,be=Z.propertyIsEnumerable,qe=Te.splice,Xe=Object.getOwnPropertySymbols,Ze=ue?ue.isBuffer:void 0,Bt=Ie(Object.keys,Object),_=Eo(j,"DataView"),re=Eo(j,"Map"),ce=Eo(j,"Promise"),Se=Eo(j,"Set"),je=Eo(j,"WeakMap"),He=Eo(Object,"create"),Zt=nn(_),Dn=nn(re),Pi=nn(ce),Oo=nn(Se),Li=nn(je),bn=pe?pe.prototype:void 0,$a=bn?bn.valueOf:void 0;function Mn(I){var Y=-1,le=I?I.length:0;for(this.clear();++Y<le;){var ye=I[Y];this.set(ye[0],ye[1])}}function Es(){this.__data__=He?He(null):{}}function Ra(I){return this.has(I)&&delete this.__data__[I]}function Ns(I){var Y=this.__data__;if(He){var le=Y[I];return le===n?void 0:le}return K.call(Y,I)?Y[I]:void 0}function Pa(I){var Y=this.__data__;return He?Y[I]!==void 0:K.call(Y,I)}function zi(I,Y){var le=this.__data__;return le[I]=He&&Y===void 0?n:Y,this}Mn.prototype.clear=Es,Mn.prototype.delete=Ra,Mn.prototype.get=Ns,Mn.prototype.has=Pa,Mn.prototype.set=zi;function ur(I){var Y=-1,le=I?I.length:0;for(this.clear();++Y<le;){var ye=I[Y];this.set(ye[0],ye[1])}}function he(){this.__data__=[]}function Re(I){var Y=this.__data__,le=za(Y,I);if(le<0)return!1;var ye=Y.length-1;return le==ye?Y.pop():qe.call(Y,le,1),!0}function mt(I){var Y=this.__data__,le=za(Y,I);return le<0?void 0:Y[le][1]}function It(I){return za(this.__data__,I)>-1}function yn(I,Y){var le=this.__data__,ye=za(le,I);return ye<0?le.push([I,Y]):le[ye][1]=Y,this}ur.prototype.clear=he,ur.prototype.delete=Re,ur.prototype.get=mt,ur.prototype.has=It,ur.prototype.set=yn;function er(I){var Y=-1,le=I?I.length:0;for(this.clear();++Y<le;){var ye=I[Y];this.set(ye[0],ye[1])}}function Xo(){this.__data__={hash:new Mn,map:new(re||ur),string:new Mn}}function Tn(I){return As(this,I).delete(I)}function Hr(I){return As(this,I).get(I)}function La(I){return As(this,I).has(I)}function sd(I,Y){return As(this,I).set(I,Y),this}er.prototype.clear=Xo,er.prototype.delete=Tn,er.prototype.get=Hr,er.prototype.has=La,er.prototype.set=sd;function Wr(I){this.__data__=new ur(I)}function ld(){this.__data__=new ur}function Ui(I){return this.__data__.delete(I)}function Dt(I){return this.__data__.get(I)}function Nr(I){return this.__data__.has(I)}function ud(I,Y){var le=this.__data__;if(le instanceof ur){var ye=le.__data__;if(!re||ye.length<r-1)return ye.push([I,Y]),this;le=this.__data__=new er(ye)}return le.set(I,Y),this}Wr.prototype.clear=ld,Wr.prototype.delete=Ui,Wr.prototype.get=Dt,Wr.prototype.has=Nr,Wr.prototype.set=ud;function ko(I,Y){var le=pd(I)||Xl(I)?oe(I.length,String):[],ye=le.length,ht=!!ye;for(var Oe in I)K.call(I,Oe)&&!(ht&&(Oe=="length"||Fb(Oe,ye)))&&le.push(Oe);return le}function ei(I,Y,le){var ye=I[Y];(!(K.call(I,Y)&&mm(ye,le))||le===void 0&&!(Y in I))&&(I[Y]=le)}function za(I,Y){for(var le=I.length;le--;)if(mm(I[le][0],Y))return le;return-1}function ti(I,Y){return I&&fd(Y,hd(Y),I)}function cd(I,Y,le,ye,ht,Oe,_t){var Mt;if(ye&&(Mt=Oe?ye(I,ht,Oe,_t):ye(I)),Mt!==void 0)return Mt;if(!ni(I))return I;var pr=pd(I);if(pr){if(Mt=Mb(I),!Y)return Bb(I,Mt)}else{var Lt=Vi(I),Zr=Lt==d||Lt==f;if(hm(I))return Ol(I,Y);if(Lt==h||Lt==o||Zr&&!Oe){if(de(I))return Oe?I:{};if(Mt=ri(Zr?{}:I),!Y)return Ab(I,ti(Mt,I))}else{if(!W[Lt])return Oe?I:{};Mt=Tb(I,Lt,cd,Y)}}_t||(_t=new Wr);var wn=_t.get(I);if(wn)return wn;if(_t.set(I,Mt),!pr)var br=le?Db(I):hd(I);return G(br||I,function(Gr,$r){br&&($r=Gr,Gr=I[$r]),ei(Mt,$r,cd(Gr,Y,le,ye,$r,I,_t))}),Mt}function yb(I){return ni(I)?Fe(I):{}}function wb(I,Y,le){var ye=Y(I);return pd(I)?ye:O(ye,le(I))}function xb(I){return Q.call(I)}function Cb(I){if(!ni(I)||_b(I))return!1;var Y=md(I)||de(I)?ne:q;return Y.test(nn(I))}function Sb(I){if(!fm(I))return Bt(I);var Y=[];for(var le in Object(I))K.call(I,le)&&le!="constructor"&&Y.push(le);return Y}function Ol(I,Y){if(Y)return I.slice();var le=new I.constructor(I.length);return I.copy(le),le}function dd(I){var Y=new I.constructor(I.byteLength);return new ge(Y).set(new ge(I)),Y}function Bs(I,Y){var le=Y?dd(I.buffer):I.buffer;return new I.constructor(le,I.byteOffset,I.byteLength)}function cm(I,Y,le){var ye=Y?le(ve(I),!0):ve(I);return te(ye,ie,new I.constructor)}function dm(I){var Y=new I.constructor(I.source,P.exec(I));return Y.lastIndex=I.lastIndex,Y}function kb(I,Y,le){var ye=Y?le($e(I),!0):$e(I);return te(ye,V,new I.constructor)}function Eb(I){return $a?Object($a.call(I)):{}}function Nb(I,Y){var le=Y?dd(I.buffer):I.buffer;return new I.constructor(le,I.byteOffset,I.length)}function Bb(I,Y){var le=-1,ye=I.length;for(Y||(Y=Array(ye));++le<ye;)Y[le]=I[le];return Y}function fd(I,Y,le,ye){le||(le={});for(var ht=-1,Oe=Y.length;++ht<Oe;){var _t=Y[ht],Mt=void 0;ei(le,_t,Mt===void 0?I[_t]:Mt)}return le}function Ab(I,Y){return fd(I,qi(I),Y)}function Db(I){return wb(I,hd,qi)}function As(I,Y){var le=I.__data__;return Ib(Y)?le[typeof Y=="string"?"string":"hash"]:le.map}function Eo(I,Y){var le=fe(I,Y);return Cb(le)?le:void 0}var qi=Xe?Ie(Xe,Object):Rb,Vi=xb;(_&&Vi(new _(new ArrayBuffer(1)))!=C||re&&Vi(new re)!=p||ce&&Vi(ce.resolve())!=g||Se&&Vi(new Se)!=b||je&&Vi(new je)!=x)&&(Vi=function(I){var Y=Q.call(I),le=Y==h?I.constructor:void 0,ye=le?nn(le):void 0;if(ye)switch(ye){case Zt:return C;case Dn:return p;case Pi:return g;case Oo:return b;case Li:return x}return Y});function Mb(I){var Y=I.length,le=I.constructor(Y);return Y&&typeof I[0]=="string"&&K.call(I,"index")&&(le.index=I.index,le.input=I.input),le}function ri(I){return typeof I.constructor=="function"&&!fm(I)?yb(we(I)):{}}function Tb(I,Y,le,ye){var ht=I.constructor;switch(Y){case S:return dd(I);case l:case c:return new ht(+I);case C:return Bs(I,ye);case E:case B:case N:case D:case k:case M:case T:case R:case F:return Nb(I,ye);case p:return cm(I,ye,le);case m:case w:return new ht(I);case v:return dm(I);case b:return kb(I,ye,le);case y:return Eb(I)}}function Fb(I,Y){return Y=Y??i,!!Y&&(typeof I=="number"||z.test(I))&&I>-1&&I%1==0&&I<Y}function Ib(I){var Y=typeof I;return Y=="string"||Y=="number"||Y=="symbol"||Y=="boolean"?I!=="__proto__":I===null}function _b(I){return!!ee&&ee in I}function fm(I){var Y=I&&I.constructor,le=typeof Y=="function"&&Y.prototype||Z;return I===le}function nn(I){if(I!=null){try{return U.call(I)}catch{}try{return I+""}catch{}}return""}function pm(I){return cd(I,!0,!0)}function mm(I,Y){return I===Y||I!==I&&Y!==Y}function Xl(I){return $b(I)&&K.call(I,"callee")&&(!be.call(I,"callee")||Q.call(I)==o)}var pd=Array.isArray;function eu(I){return I!=null&&gm(I.length)&&!md(I)}function $b(I){return vm(I)&&eu(I)}var hm=Ze||Pb;function md(I){var Y=ni(I)?Q.call(I):"";return Y==d||Y==f}function gm(I){return typeof I=="number"&&I>-1&&I%1==0&&I<=i}function ni(I){var Y=typeof I;return!!I&&(Y=="object"||Y=="function")}function vm(I){return!!I&&typeof I=="object"}function hd(I){return eu(I)?ko(I):Sb(I)}function Rb(){return[]}function Pb(){return!1}e.exports=pm}(Kp,Kp.exports)),Kp.exports}var Yp={exports:{}};Yp.exports;var b6;function y6(){return b6||(b6=1,function(e,t){var r=200,n="__lodash_hash_undefined__",i=1,o=2,s=9007199254740991,l="[object Arguments]",c="[object Array]",u="[object AsyncFunction]",d="[object Boolean]",f="[object Date]",p="[object Error]",m="[object Function]",h="[object GeneratorFunction]",g="[object Map]",v="[object Number]",b="[object Null]",w="[object Object]",y="[object Promise]",x="[object Proxy]",S="[object RegExp]",C="[object Set]",E="[object String]",B="[object Symbol]",N="[object Undefined]",D="[object WeakMap]",k="[object ArrayBuffer]",M="[object DataView]",T="[object Float32Array]",R="[object Float64Array]",F="[object Int8Array]",A="[object Int16Array]",P="[object Int32Array]",q="[object Uint8Array]",z="[object Uint8ClampedArray]",W="[object Uint16Array]",X="[object Uint32Array]",$=/[\\^$.*+?()[\]{}|]/g,j=/^\[object .+?Constructor\]$/,L=/^(?:0|[1-9]\d*)$/,ae={};ae[T]=ae[R]=ae[F]=ae[A]=ae[P]=ae[q]=ae[z]=ae[W]=ae[X]=!0,ae[l]=ae[c]=ae[k]=ae[d]=ae[M]=ae[f]=ae[p]=ae[m]=ae[g]=ae[v]=ae[w]=ae[S]=ae[C]=ae[E]=ae[D]=!1;var se=typeof Ea=="object"&&Ea&&Ea.Object===Object&&Ea,ie=typeof self=="object"&&self&&self.Object===Object&&self,V=se||ie||Function("return this")(),G=t&&!t.nodeType&&t,O=G&&!0&&e&&!e.nodeType&&e,te=O&&O.exports===G,oe=te&&se.process,fe=function(){try{return oe&&oe.binding&&oe.binding("util")}catch{}}(),de=fe&&fe.isTypedArray;function ve(I,Y){for(var le=-1,ye=I==null?0:I.length,ht=0,Oe=[];++le<ye;){var _t=I[le];Y(_t,le,I)&&(Oe[ht++]=_t)}return Oe}function Ie(I,Y){for(var le=-1,ye=Y.length,ht=I.length;++le<ye;)I[ht+le]=Y[le];return I}function $e(I,Y){for(var le=-1,ye=I==null?0:I.length;++le<ye;)if(Y(I[le],le,I))return!0;return!1}function Te(I,Y){for(var le=-1,ye=Array(I);++le<I;)ye[le]=Y(le);return ye}function Le(I){return function(Y){return I(Y)}}function Z(I,Y){return I.has(Y)}function J(I,Y){return I==null?void 0:I[Y]}function ee(I){var Y=-1,le=Array(I.size);return I.forEach(function(ye,ht){le[++Y]=[ht,ye]}),le}function U(I,Y){return function(le){return I(Y(le))}}function K(I){var Y=-1,le=Array(I.size);return I.forEach(function(ye){le[++Y]=ye}),le}var Q=Array.prototype,ne=Function.prototype,ue=Object.prototype,pe=V["__core-js_shared__"],ge=ne.toString,we=ue.hasOwnProperty,Fe=function(){var I=/[^.]+$/.exec(pe&&pe.keys&&pe.keys.IE_PROTO||"");return I?"Symbol(src)_1."+I:""}(),be=ue.toString,qe=RegExp("^"+ge.call(we).replace($,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Xe=te?V.Buffer:void 0,Ze=V.Symbol,Bt=V.Uint8Array,_=ue.propertyIsEnumerable,re=Q.splice,ce=Ze?Ze.toStringTag:void 0,Se=Object.getOwnPropertySymbols,je=Xe?Xe.isBuffer:void 0,He=U(Object.keys,Object),Zt=qi(V,"DataView"),Dn=qi(V,"Map"),Pi=qi(V,"Promise"),Oo=qi(V,"Set"),Li=qi(V,"WeakMap"),bn=qi(Object,"create"),$a=nn(Zt),Mn=nn(Dn),Es=nn(Pi),Ra=nn(Oo),Ns=nn(Li),Pa=Ze?Ze.prototype:void 0,zi=Pa?Pa.valueOf:void 0;function ur(I){var Y=-1,le=I==null?0:I.length;for(this.clear();++Y<le;){var ye=I[Y];this.set(ye[0],ye[1])}}function he(){this.__data__=bn?bn(null):{},this.size=0}function Re(I){var Y=this.has(I)&&delete this.__data__[I];return this.size-=Y?1:0,Y}function mt(I){var Y=this.__data__;if(bn){var le=Y[I];return le===n?void 0:le}return we.call(Y,I)?Y[I]:void 0}function It(I){var Y=this.__data__;return bn?Y[I]!==void 0:we.call(Y,I)}function yn(I,Y){var le=this.__data__;return this.size+=this.has(I)?0:1,le[I]=bn&&Y===void 0?n:Y,this}ur.prototype.clear=he,ur.prototype.delete=Re,ur.prototype.get=mt,ur.prototype.has=It,ur.prototype.set=yn;function er(I){var Y=-1,le=I==null?0:I.length;for(this.clear();++Y<le;){var ye=I[Y];this.set(ye[0],ye[1])}}function Xo(){this.__data__=[],this.size=0}function Tn(I){var Y=this.__data__,le=Ol(Y,I);if(le<0)return!1;var ye=Y.length-1;return le==ye?Y.pop():re.call(Y,le,1),--this.size,!0}function Hr(I){var Y=this.__data__,le=Ol(Y,I);return le<0?void 0:Y[le][1]}function La(I){return Ol(this.__data__,I)>-1}function sd(I,Y){var le=this.__data__,ye=Ol(le,I);return ye<0?(++this.size,le.push([I,Y])):le[ye][1]=Y,this}er.prototype.clear=Xo,er.prototype.delete=Tn,er.prototype.get=Hr,er.prototype.has=La,er.prototype.set=sd;function Wr(I){var Y=-1,le=I==null?0:I.length;for(this.clear();++Y<le;){var ye=I[Y];this.set(ye[0],ye[1])}}function ld(){this.size=0,this.__data__={hash:new ur,map:new(Dn||er),string:new ur}}function Ui(I){var Y=Eo(this,I).delete(I);return this.size-=Y?1:0,Y}function Dt(I){return Eo(this,I).get(I)}function Nr(I){return Eo(this,I).has(I)}function ud(I,Y){var le=Eo(this,I),ye=le.size;return le.set(I,Y),this.size+=le.size==ye?0:1,this}Wr.prototype.clear=ld,Wr.prototype.delete=Ui,Wr.prototype.get=Dt,Wr.prototype.has=Nr,Wr.prototype.set=ud;function ko(I){var Y=-1,le=I==null?0:I.length;for(this.__data__=new Wr;++Y<le;)this.add(I[Y])}function ei(I){return this.__data__.set(I,n),this}function za(I){return this.__data__.has(I)}ko.prototype.add=ko.prototype.push=ei,ko.prototype.has=za;function ti(I){var Y=this.__data__=new er(I);this.size=Y.size}function cd(){this.__data__=new er,this.size=0}function yb(I){var Y=this.__data__,le=Y.delete(I);return this.size=Y.size,le}function wb(I){return this.__data__.get(I)}function xb(I){return this.__data__.has(I)}function Cb(I,Y){var le=this.__data__;if(le instanceof er){var ye=le.__data__;if(!Dn||ye.length<r-1)return ye.push([I,Y]),this.size=++le.size,this;le=this.__data__=new Wr(ye)}return le.set(I,Y),this.size=le.size,this}ti.prototype.clear=cd,ti.prototype.delete=yb,ti.prototype.get=wb,ti.prototype.has=xb,ti.prototype.set=Cb;function Sb(I,Y){var le=Xl(I),ye=!le&&mm(I),ht=!le&&!ye&&eu(I),Oe=!le&&!ye&&!ht&&vm(I),_t=le||ye||ht||Oe,Mt=_t?Te(I.length,String):[],pr=Mt.length;for(var Lt in I)we.call(I,Lt)&&!(_t&&(Lt=="length"||ht&&(Lt=="offset"||Lt=="parent")||Oe&&(Lt=="buffer"||Lt=="byteLength"||Lt=="byteOffset")||Tb(Lt,pr)))&&Mt.push(Lt);return Mt}function Ol(I,Y){for(var le=I.length;le--;)if(pm(I[le][0],Y))return le;return-1}function dd(I,Y,le){var ye=Y(I);return Xl(I)?ye:Ie(ye,le(I))}function Bs(I){return I==null?I===void 0?N:b:ce&&ce in Object(I)?Vi(I):fm(I)}function cm(I){return ni(I)&&Bs(I)==l}function dm(I,Y,le,ye,ht){return I===Y?!0:I==null||Y==null||!ni(I)&&!ni(Y)?I!==I&&Y!==Y:kb(I,Y,le,ye,dm,ht)}function kb(I,Y,le,ye,ht,Oe){var _t=Xl(I),Mt=Xl(Y),pr=_t?c:ri(I),Lt=Mt?c:ri(Y);pr=pr==l?w:pr,Lt=Lt==l?w:Lt;var Zr=pr==w,wn=Lt==w,br=pr==Lt;if(br&&eu(I)){if(!eu(Y))return!1;_t=!0,Zr=!1}if(br&&!Zr)return Oe||(Oe=new ti),_t||vm(I)?fd(I,Y,le,ye,ht,Oe):Ab(I,Y,pr,le,ye,ht,Oe);if(!(le&i)){var Gr=Zr&&we.call(I,"__wrapped__"),$r=wn&&we.call(Y,"__wrapped__");if(Gr||$r){var Ua=Gr?I.value():I,ji=$r?Y.value():Y;return Oe||(Oe=new ti),ht(Ua,ji,le,ye,Oe)}}return br?(Oe||(Oe=new ti),Db(I,Y,le,ye,ht,Oe)):!1}function Eb(I){if(!gm(I)||Ib(I))return!1;var Y=hm(I)?qe:j;return Y.test(nn(I))}function Nb(I){return ni(I)&&md(I.length)&&!!ae[Bs(I)]}function Bb(I){if(!_b(I))return He(I);var Y=[];for(var le in Object(I))we.call(I,le)&&le!="constructor"&&Y.push(le);return Y}function fd(I,Y,le,ye,ht,Oe){var _t=le&i,Mt=I.length,pr=Y.length;if(Mt!=pr&&!(_t&&pr>Mt))return!1;var Lt=Oe.get(I);if(Lt&&Oe.get(Y))return Lt==Y;var Zr=-1,wn=!0,br=le&o?new ko:void 0;for(Oe.set(I,Y),Oe.set(Y,I);++Zr<Mt;){var Gr=I[Zr],$r=Y[Zr];if(ye)var Ua=_t?ye($r,Gr,Zr,Y,I,Oe):ye(Gr,$r,Zr,I,Y,Oe);if(Ua!==void 0){if(Ua)continue;wn=!1;break}if(br){if(!$e(Y,function(ji,Ds){if(!Z(br,Ds)&&(Gr===ji||ht(Gr,ji,le,ye,Oe)))return br.push(Ds)})){wn=!1;break}}else if(!(Gr===$r||ht(Gr,$r,le,ye,Oe))){wn=!1;break}}return Oe.delete(I),Oe.delete(Y),wn}function Ab(I,Y,le,ye,ht,Oe,_t){switch(le){case M:if(I.byteLength!=Y.byteLength||I.byteOffset!=Y.byteOffset)return!1;I=I.buffer,Y=Y.buffer;case k:return!(I.byteLength!=Y.byteLength||!Oe(new Bt(I),new Bt(Y)));case d:case f:case v:return pm(+I,+Y);case p:return I.name==Y.name&&I.message==Y.message;case S:case E:return I==Y+"";case g:var Mt=ee;case C:var pr=ye&i;if(Mt||(Mt=K),I.size!=Y.size&&!pr)return!1;var Lt=_t.get(I);if(Lt)return Lt==Y;ye|=o,_t.set(I,Y);var Zr=fd(Mt(I),Mt(Y),ye,ht,Oe,_t);return _t.delete(I),Zr;case B:if(zi)return zi.call(I)==zi.call(Y)}return!1}function Db(I,Y,le,ye,ht,Oe){var _t=le&i,Mt=As(I),pr=Mt.length,Lt=As(Y),Zr=Lt.length;if(pr!=Zr&&!_t)return!1;for(var wn=pr;wn--;){var br=Mt[wn];if(!(_t?br in Y:we.call(Y,br)))return!1}var Gr=Oe.get(I);if(Gr&&Oe.get(Y))return Gr==Y;var $r=!0;Oe.set(I,Y),Oe.set(Y,I);for(var Ua=_t;++wn<pr;){br=Mt[wn];var ji=I[br],Ds=Y[br];if(ye)var CA=_t?ye(Ds,ji,br,Y,I,Oe):ye(ji,Ds,br,I,Y,Oe);if(!(CA===void 0?ji===Ds||ht(ji,Ds,le,ye,Oe):CA)){$r=!1;break}Ua||(Ua=br=="constructor")}if($r&&!Ua){var bm=I.constructor,ym=Y.constructor;bm!=ym&&"constructor"in I&&"constructor"in Y&&!(typeof bm=="function"&&bm instanceof bm&&typeof ym=="function"&&ym instanceof ym)&&($r=!1)}return Oe.delete(I),Oe.delete(Y),$r}function As(I){return dd(I,hd,Mb)}function Eo(I,Y){var le=I.__data__;return Fb(Y)?le[typeof Y=="string"?"string":"hash"]:le.map}function qi(I,Y){var le=J(I,Y);return Eb(le)?le:void 0}function Vi(I){var Y=we.call(I,ce),le=I[ce];try{I[ce]=void 0;var ye=!0}catch{}var ht=be.call(I);return ye&&(Y?I[ce]=le:delete I[ce]),ht}var Mb=Se?function(I){return I==null?[]:(I=Object(I),ve(Se(I),function(Y){return _.call(I,Y)}))}:Rb,ri=Bs;(Zt&&ri(new Zt(new ArrayBuffer(1)))!=M||Dn&&ri(new Dn)!=g||Pi&&ri(Pi.resolve())!=y||Oo&&ri(new Oo)!=C||Li&&ri(new Li)!=D)&&(ri=function(I){var Y=Bs(I),le=Y==w?I.constructor:void 0,ye=le?nn(le):"";if(ye)switch(ye){case $a:return M;case Mn:return g;case Es:return y;case Ra:return C;case Ns:return D}return Y});function Tb(I,Y){return Y=Y??s,!!Y&&(typeof I=="number"||L.test(I))&&I>-1&&I%1==0&&I<Y}function Fb(I){var Y=typeof I;return Y=="string"||Y=="number"||Y=="symbol"||Y=="boolean"?I!=="__proto__":I===null}function Ib(I){return!!Fe&&Fe in I}function _b(I){var Y=I&&I.constructor,le=typeof Y=="function"&&Y.prototype||ue;return I===le}function fm(I){return be.call(I)}function nn(I){if(I!=null){try{return ge.call(I)}catch{}try{return I+""}catch{}}return""}function pm(I,Y){return I===Y||I!==I&&Y!==Y}var mm=cm(function(){return arguments}())?cm:function(I){return ni(I)&&we.call(I,"callee")&&!_.call(I,"callee")},Xl=Array.isArray;function pd(I){return I!=null&&md(I.length)&&!hm(I)}var eu=je||Pb;function $b(I,Y){return dm(I,Y)}function hm(I){if(!gm(I))return!1;var Y=Bs(I);return Y==m||Y==h||Y==u||Y==x}function md(I){return typeof I=="number"&&I>-1&&I%1==0&&I<=s}function gm(I){var Y=typeof I;return I!=null&&(Y=="object"||Y=="function")}function ni(I){return I!=null&&typeof I=="object"}var vm=de?Le(de):Nb;function hd(I){return pd(I)?Sb(I):Bb(I)}function Rb(){return[]}function Pb(){return!1}e.exports=$b}(Yp,Yp.exports)),Yp.exports}var Jp={},w6;function n4e(){if(w6)return Jp;w6=1,Object.defineProperty(Jp,"__esModule",{value:!0});const e=v6(),t=y6();var r;return function(n){function i(c={},u={},d=!1){typeof c!="object"&&(c={}),typeof u!="object"&&(u={});let f=e(u);d||(f=Object.keys(f).reduce((p,m)=>(f[m]!=null&&(p[m]=f[m]),p),{}));for(const p in c)c[p]!==void 0&&u[p]===void 0&&(f[p]=c[p]);return Object.keys(f).length>0?f:void 0}n.compose=i;function o(c={},u={}){typeof c!="object"&&(c={}),typeof u!="object"&&(u={});const d=Object.keys(c).concat(Object.keys(u)).reduce((f,p)=>(t(c[p],u[p])||(f[p]=u[p]===void 0?null:u[p]),f),{});return Object.keys(d).length>0?d:void 0}n.diff=o;function s(c={},u={}){c=c||{};const d=Object.keys(u).reduce((f,p)=>(u[p]!==c[p]&&c[p]!==void 0&&(f[p]=u[p]),f),{});return Object.keys(c).reduce((f,p)=>(c[p]!==u[p]&&u[p]===void 0&&(f[p]=null),f),d)}n.invert=s;function l(c,u,d=!1){if(typeof c!="object")return u;if(typeof u!="object")return;if(!d)return u;const f=Object.keys(u).reduce((p,m)=>(c[m]===void 0&&(p[m]=u[m]),p),{});return Object.keys(f).length>0?f:void 0}n.transform=l}(r||(r={})),Jp.default=r,Jp}var Op={},x6;function C6(){if(x6)return Op;x6=1,Object.defineProperty(Op,"__esModule",{value:!0});var e;return function(t){function r(n){return typeof n.delete=="number"?n.delete:typeof n.retain=="number"?n.retain:typeof n.retain=="object"&&n.retain!==null?1:typeof n.insert=="string"?n.insert.length:1}t.length=r}(e||(e={})),Op.default=e,Op}var Xp={},S6;function o4e(){if(S6)return Xp;S6=1,Object.defineProperty(Xp,"__esModule",{value:!0});const e=C6();class t{constructor(n){this.ops=n,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(n){n||(n=1/0);const i=this.ops[this.index];if(i){const o=this.offset,s=e.default.length(i);if(n>=s-o?(n=s-o,this.index+=1,this.offset=0):this.offset+=n,typeof i.delete=="number")return{delete:n};{const l={};return i.attributes&&(l.attributes=i.attributes),typeof i.retain=="number"?l.retain=n:typeof i.retain=="object"&&i.retain!==null?l.retain=i.retain:typeof i.insert=="string"?l.insert=i.insert.substr(o,n):l.insert=i.insert,l}}else return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?e.default.length(this.ops[this.index])-this.offset:1/0}peekType(){const n=this.ops[this.index];return n?typeof n.delete=="number"?"delete":typeof n.retain=="number"||typeof n.retain=="object"&&n.retain!==null?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);{const n=this.offset,i=this.index,o=this.next(),s=this.ops.slice(this.index);return this.offset=n,this.index=i,[o].concat(s)}}else return[]}}return Xp.default=t,Xp}var k6;function i4e(){return k6||(k6=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeMap=t.OpIterator=t.Op=void 0;const r=r4e(),n=v6(),i=y6(),o=n4e();t.AttributeMap=o.default;const s=C6();t.Op=s.default;const l=o4e();t.OpIterator=l.default;const c="\0",u=(f,p)=>{if(typeof f!="object"||f===null)throw new Error(`cannot retain a ${typeof f}`);if(typeof p!="object"||p===null)throw new Error(`cannot retain a ${typeof p}`);const m=Object.keys(f)[0];if(!m||m!==Object.keys(p)[0])throw new Error(`embed types not matched: ${m} != ${Object.keys(p)[0]}`);return[m,f[m],p[m]]};class d{constructor(p){Array.isArray(p)?this.ops=p:p!=null&&Array.isArray(p.ops)?this.ops=p.ops:this.ops=[]}static registerEmbed(p,m){this.handlers[p]=m}static unregisterEmbed(p){delete this.handlers[p]}static getHandler(p){const m=this.handlers[p];if(!m)throw new Error(`no handlers for embed type "${p}"`);return m}insert(p,m){const h={};return typeof p=="string"&&p.length===0?this:(h.insert=p,m!=null&&typeof m=="object"&&Object.keys(m).length>0&&(h.attributes=m),this.push(h))}delete(p){return p<=0?this:this.push({delete:p})}retain(p,m){if(typeof p=="number"&&p<=0)return this;const h={retain:p};return m!=null&&typeof m=="object"&&Object.keys(m).length>0&&(h.attributes=m),this.push(h)}push(p){let m=this.ops.length,h=this.ops[m-1];if(p=n(p),typeof h=="object"){if(typeof p.delete=="number"&&typeof h.delete=="number")return this.ops[m-1]={delete:h.delete+p.delete},this;if(typeof h.delete=="number"&&p.insert!=null&&(m-=1,h=this.ops[m-1],typeof h!="object"))return this.ops.unshift(p),this;if(i(p.attributes,h.attributes)){if(typeof p.insert=="string"&&typeof h.insert=="string")return this.ops[m-1]={insert:h.insert+p.insert},typeof p.attributes=="object"&&(this.ops[m-1].attributes=p.attributes),this;if(typeof p.retain=="number"&&typeof h.retain=="number")return this.ops[m-1]={retain:h.retain+p.retain},typeof p.attributes=="object"&&(this.ops[m-1].attributes=p.attributes),this}}return m===this.ops.length?this.ops.push(p):this.ops.splice(m,0,p),this}chop(){const p=this.ops[this.ops.length-1];return p&&typeof p.retain=="number"&&!p.attributes&&this.ops.pop(),this}filter(p){return this.ops.filter(p)}forEach(p){this.ops.forEach(p)}map(p){return this.ops.map(p)}partition(p){const m=[],h=[];return this.forEach(g=>{(p(g)?m:h).push(g)}),[m,h]}reduce(p,m){return this.ops.reduce(p,m)}changeLength(){return this.reduce((p,m)=>m.insert?p+s.default.length(m):m.delete?p-m.delete:p,0)}length(){return this.reduce((p,m)=>p+s.default.length(m),0)}slice(p=0,m=1/0){const h=[],g=new l.default(this.ops);let v=0;for(;v<m&&g.hasNext();){let b;v<p?b=g.next(p-v):(b=g.next(m-v),h.push(b)),v+=s.default.length(b)}return new d(h)}compose(p){const m=new l.default(this.ops),h=new l.default(p.ops),g=[],v=h.peek();if(v!=null&&typeof v.retain=="number"&&v.attributes==null){let w=v.retain;for(;m.peekType()==="insert"&&m.peekLength()<=w;)w-=m.peekLength(),g.push(m.next());v.retain-w>0&&h.next(v.retain-w)}const b=new d(g);for(;m.hasNext()||h.hasNext();)if(h.peekType()==="insert")b.push(h.next());else if(m.peekType()==="delete")b.push(m.next());else{const w=Math.min(m.peekLength(),h.peekLength()),y=m.next(w),x=h.next(w);if(x.retain){const S={};if(typeof y.retain=="number")S.retain=typeof x.retain=="number"?w:x.retain;else if(typeof x.retain=="number")y.retain==null?S.insert=y.insert:S.retain=y.retain;else{const E=y.retain==null?"insert":"retain",[B,N,D]=u(y[E],x.retain),k=d.getHandler(B);S[E]={[B]:k.compose(N,D,E==="retain")}}const C=o.default.compose(y.attributes,x.attributes,typeof y.retain=="number");if(C&&(S.attributes=C),b.push(S),!h.hasNext()&&i(b.ops[b.ops.length-1],S)){const E=new d(m.rest());return b.concat(E).chop()}}else typeof x.delete=="number"&&(typeof y.retain=="number"||typeof y.retain=="object"&&y.retain!==null)&&b.push(x)}return b.chop()}concat(p){const m=new d(this.ops.slice());return p.ops.length>0&&(m.push(p.ops[0]),m.ops=m.ops.concat(p.ops.slice(1))),m}diff(p,m){if(this.ops===p.ops)return new d;const h=[this,p].map(y=>y.map(x=>{if(x.insert!=null)return typeof x.insert=="string"?x.insert:c;const S=y===p?"on":"with";throw new Error("diff() called "+S+" non-document")}).join("")),g=new d,v=r(h[0],h[1],m,!0),b=new l.default(this.ops),w=new l.default(p.ops);return v.forEach(y=>{let x=y[1].length;for(;x>0;){let S=0;switch(y[0]){case r.INSERT:S=Math.min(w.peekLength(),x),g.push(w.next(S));break;case r.DELETE:S=Math.min(x,b.peekLength()),b.next(S),g.delete(S);break;case r.EQUAL:S=Math.min(b.peekLength(),w.peekLength(),x);const C=b.next(S),E=w.next(S);i(C.insert,E.insert)?g.retain(S,o.default.diff(C.attributes,E.attributes)):g.push(E).delete(S);break}x-=S}}),g.chop()}eachLine(p,m=`
5177
+ `),o=i[0].trim().split(n).length;e={};for(let l=0;l<o;++l)e[l]=[];let s=-1;i.forEach(l=>{++s;let c=-1;l.trim().split(n).forEach(d=>{e[++c][s]=Number(d)})})}const t=new l2e.parser;Object.keys(this.simulationResultsId).forEach(n=>{t.set(n,e[this.simulationResultsId[n]])});let r=-1;this.simulationUiInfo.output.plots.forEach(n=>{this.simulationResults[++r]=[{x:t.evaluate(n.xValue),y:t.evaluate(n.yValue),type:"scatter"}]})},showHttpIssue(e){this.isSimulationValid=!1,this.showUserMessage=!1,this.errorMessage=e.statusText.toLowerCase()+" (<a href='https://httpstatuses.com/"+e.status+"/' target='_blank'>"+e.status+"</a>)"},checkSimulation(e){const t=new XMLHttpRequest;t.open("POST",this.apiLocation+"/check_simulation"),t.setRequestHeader("Content-type","application/json"),t.onreadystatechange=()=>{if(t.readyState===4)if(t.status===200){let r=JSON.parse(t.responseText);if(this.isSimulationValid=r.status==="ok",this.isSimulationValid)if(r.results!==void 0)this.showUserMessage=!1,this.processSimulationResults(r.results);else{let n=this;setTimeout(function(){n.checkSimulation(e)},1e3)}else this.showUserMessage=!1,this.errorMessage=r.description}else this.showHttpIssue(t)},t.send(JSON.stringify(e))},startSimulation(){this.userMessage="Loading simulation results...",this.showUserMessage=!0,this.$nextTick(()=>{this.simulationResults={};const e=new XMLHttpRequest;e.open("POST",this.apiLocation+"/start_simulation"),e.setRequestHeader("Content-type","application/json"),e.onreadystatechange=()=>{if(e.readyState===4)if(e.status===200){let t=JSON.parse(e.responseText);this.isSimulationValid=t.status==="ok",this.isSimulationValid?this.checkSimulation(t.data):(this.showUserMessage=!1,this.errorMessage=t.description)}else this.showHttpIssue(e)},e.send(JSON.stringify(this.retrieveRequest()))})}},created:function(){this.idType===ka.DATASET_ID?(this.userMessage="Retrieving UI information...",this.showUserMessage=!0,this.$nextTick(()=>{const e=new XMLHttpRequest;e.open("GET",this.apiLocation+"/simulation_ui_file/"+this.id),e.onreadystatechange=()=>{e.readyState===4&&(this.showUserMessage=!1,e.status===200?this.$nextTick(()=>{this.buildSimulationUi(JSON.parse(e.responseText))}):this.errorMessage="the simulation dataset could not be retrieved")},e.send()})):this.idType===ka.DATASET_URL?this.opencorOmexFile=this.id:this.idType===ka.PMR_PATH?this.opencorOmexFile=Pp+this.id:(this.userMessage="Retrieving COMBINE archive...",this.showUserMessage=!0,this.$nextTick(()=>{kA().then(e=>{this.extractAndBuildSimulationUi(e,this.id)})}))},mounted:function(){this.isMounted=!0,E4(this)}},c2e=["element-loading-text"],d2e={key:0,class:"container"},f2e={key:0,class:"default error"},p2e={key:1,class:"main"},m2e={key:0,class:"default name"},h2e={class:"input scrollbar"},g2e={class:"buttons-container"},v2e={key:0,class:"primary-button"},b2e={key:1,class:"secondary-button"},y2e={key:2,class:"secondary-button"},w2e={key:3,class:"secondary-button"},x2e={key:4,class:"default note"},C2e={class:"main-right",ref:"output"},S2e={class:"main-right"},k2e={class:"default error"},E2e=["innerHTML"],N2e={key:1,class:"opencor"};function B2e(e,t,r,n,i,o){const s=hw,l=B4,c=fw,u=a.resolveComponent("PlotVuer"),d=a.resolveComponent("OpenCOR"),f=kh;return a.withDirectives((a.openBlock(),a.createElementBlock("div",{class:"simulation-vuer","element-loading-text":e.userMessage},[e.opencorOmexFile===null?(a.openBlock(),a.createElementBlock("div",d2e,[!e.hasValidSimulationUiInfo&&!e.showUserMessage?(a.openBlock(),a.createElementBlock("p",f2e,[t[4]||(t[4]=a.createElementVNode("span",{class:"error"},"Error:",-1)),a.createTextVNode(" "+a.toDisplayString(e.errorMessage)+".",1)])):a.createCommentVNode("",!0),e.hasValidSimulationUiInfo?(a.openBlock(),a.createElementBlock("div",p2e,[a.createElementVNode("div",{class:a.normalizeClass(["main-left",{"with-buttons":!e.libopencorSet||e.uuid}])},[e.libopencorSet?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("p",m2e,a.toDisplayString(e.name),1)),e.libopencorSet?a.createCommentVNode("",!0):(a.openBlock(),a.createBlock(s,{key:1})),t[9]||(t[9]=a.createElementVNode("p",{class:"default input-parameters"},"Input parameters",-1)),a.createElementVNode("div",h2e,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.simulationUiInfo.input,(p,m)=>(a.openBlock(),a.createBlock(l,{ref_for:!0,ref:"simInput",defaultValue:p.defaultValue,key:`input-${m}`,name:p.name,maximumValue:p.maximumValue,minimumValue:p.minimumValue,possibleValues:p.possibleValues,stepValue:p.stepValue},null,8,["defaultValue","name","maximumValue","minimumValue","possibleValues","stepValue"]))),128))]),a.createElementVNode("div",g2e,[e.libopencorSet?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",v2e,[a.createVNode(c,{type:"primary",size:"small",onClick:t[0]||(t[0]=p=>o.startSimulation())},{default:a.withCtx(()=>[...t[5]||(t[5]=[a.createTextVNode("Run Simulation",-1)])]),_:1})])),e.uuid?(a.openBlock(),a.createElementBlock("div",b2e,[a.createVNode(c,{size:"small",onClick:t[1]||(t[1]=p=>o.runOnOsparc())},{default:a.withCtx(()=>[...t[6]||(t[6]=[a.createTextVNode("Run on oSPARC",-1)])]),_:1})])):a.createCommentVNode("",!0),e.libopencorSet?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",y2e,[a.createVNode(c,{size:"small",onClick:t[2]||(t[2]=p=>o.viewDataset())},{default:a.withCtx(()=>[...t[7]||(t[7]=[a.createTextVNode("View Dataset",-1)])]),_:1})])),e.libopencorSet&&e.idType==="pmr_path"?(a.openBlock(),a.createElementBlock("div",w2e,[a.createVNode(c,{size:"small",onClick:t[3]||(t[3]=p=>o.viewWorkspace())},{default:a.withCtx(()=>[...t[8]||(t[8]=[a.createTextVNode("View Workspace",-1)])]),_:1})])):a.createCommentVNode("",!0),e.uuid?(a.openBlock(),a.createElementBlock("p",x2e,"Additional parameters are available on oSPARC")):a.createCommentVNode("",!0)])],2),a.withDirectives(a.createElementVNode("div",C2e,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.simulationUiInfo.output.plots,(p,m)=>(a.openBlock(),a.createBlock(u,{key:`output-${m}`,metadata:o.plotMetadata(m),"data-source":{data:e.simulationResults[m]},plotLayout:e.layout[m],plotType:"plotly-only",selectorUi:!1},null,8,["metadata","data-source","plotLayout"]))),128))],512),[[a.vShow,e.isSimulationValid]]),a.withDirectives(a.createElementVNode("div",S2e,[a.createElementVNode("p",k2e,[t[10]||(t[10]=a.createElementVNode("span",{class:"error"},"Error:",-1)),t[11]||(t[11]=a.createTextVNode()),a.createElementVNode("span",{innerHTML:e.errorMessage},null,8,E2e),t[12]||(t[12]=a.createTextVNode(".",-1))])],512),[[a.vShow,!e.isSimulationValid]])])):a.createCommentVNode("",!0)])):(a.openBlock(),a.createElementBlock("div",N2e,[a.createVNode(d,{omex:e.opencorOmexFile,theme:"light"},null,8,["omex"])]))],8,c2e)),[[f,e.showUserMessage]])}const A2e=N4(u2e,[["render",B2e],["__scopeId","data-v-a62decd1"]]);var Ea=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function dB(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var fB=typeof global=="object"&&global&&global.Object===Object&&global,D2e=typeof self=="object"&&self&&self.Object===Object&&self,Wo=fB||D2e||Function("return this")(),Na=Wo.Symbol,pB=Object.prototype,M2e=pB.hasOwnProperty,T2e=pB.toString,Vc=Na?Na.toStringTag:void 0;function F2e(e){var t=M2e.call(e,Vc),r=e[Vc];try{e[Vc]=void 0;var n=!0}catch{}var i=T2e.call(e);return n&&(t?e[Vc]=r:delete e[Vc]),i}var I2e=Object.prototype,_2e=I2e.toString;function $2e(e){return _2e.call(e)}var R2e="[object Null]",P2e="[object Undefined]",mB=Na?Na.toStringTag:void 0;function Ll(e){return e==null?e===void 0?P2e:R2e:mB&&mB in Object(e)?F2e(e):$2e(e)}function Ti(e){return e!=null&&typeof e=="object"}var vs=Array.isArray;function Ba(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function hB(e){return e}var L2e="[object AsyncFunction]",z2e="[object Function]",U2e="[object GeneratorFunction]",q2e="[object Proxy]";function y0(e){if(!Ba(e))return!1;var t=Ll(e);return t==z2e||t==U2e||t==L2e||t==q2e}var w0=Wo["__core-js_shared__"],gB=function(){var e=/[^.]+$/.exec(w0&&w0.keys&&w0.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function V2e(e){return!!gB&&gB in e}var j2e=Function.prototype,Q2e=j2e.toString;function bs(e){if(e!=null){try{return Q2e.call(e)}catch{}try{return e+""}catch{}}return""}var H2e=/[\\^$.*+?()[\]{}|]/g,W2e=/^\[object .+?Constructor\]$/,Z2e=Function.prototype,G2e=Object.prototype,K2e=Z2e.toString,Y2e=G2e.hasOwnProperty,J2e=RegExp("^"+K2e.call(Y2e).replace(H2e,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function O2e(e){if(!Ba(e)||V2e(e))return!1;var t=y0(e)?J2e:W2e;return t.test(bs(e))}function X2e(e,t){return e==null?void 0:e[t]}function ys(e,t){var r=X2e(e,t);return O2e(r)?r:void 0}var x0=ys(Wo,"WeakMap"),vB=Object.create,eCe=function(){function e(){}return function(t){if(!Ba(t))return{};if(vB)return vB(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function tCe(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function rCe(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var nCe=800,oCe=16,iCe=Date.now;function aCe(e){var t=0,r=0;return function(){var n=iCe(),i=oCe-(n-r);if(r=n,i>0){if(++t>=nCe)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function sCe(e){return function(){return e}}var Lp=function(){try{var e=ys(Object,"defineProperty");return e({},"",{}),e}catch{}}(),lCe=Lp?function(e,t){return Lp(e,"toString",{configurable:!0,enumerable:!1,value:sCe(t),writable:!0})}:hB,uCe=aCe(lCe);function cCe(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}var dCe=9007199254740991,fCe=/^(?:0|[1-9]\d*)$/;function bB(e,t){var r=typeof e;return t=t??dCe,!!t&&(r=="number"||r!="symbol"&&fCe.test(e))&&e>-1&&e%1==0&&e<t}function C0(e,t,r){t=="__proto__"&&Lp?Lp(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function jc(e,t){return e===t||e!==e&&t!==t}var pCe=Object.prototype,mCe=pCe.hasOwnProperty;function yB(e,t,r){var n=e[t];(!(mCe.call(e,t)&&jc(n,r))||r===void 0&&!(t in e))&&C0(e,t,r)}function hCe(e,t,r,n){var i=!r;r||(r={});for(var o=-1,s=t.length;++o<s;){var l=t[o],c=void 0;c===void 0&&(c=e[l]),i?C0(r,l,c):yB(r,l,c)}return r}var wB=Math.max;function gCe(e,t,r){return t=wB(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,o=wB(n.length-t,0),s=Array(o);++i<o;)s[i]=n[t+i];i=-1;for(var l=Array(t+1);++i<t;)l[i]=n[i];return l[t]=r(s),tCe(e,this,l)}}function vCe(e,t){return uCe(gCe(e,t,hB),e+"")}var bCe=9007199254740991;function xB(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=bCe}function zp(e){return e!=null&&xB(e.length)&&!y0(e)}function yCe(e,t,r){if(!Ba(r))return!1;var n=typeof t;return(n=="number"?zp(r)&&bB(t,r.length):n=="string"&&t in r)?jc(r[t],e):!1}function wCe(e){return vCe(function(t,r){var n=-1,i=r.length,o=i>1?r[i-1]:void 0,s=i>2?r[2]:void 0;for(o=e.length>3&&typeof o=="function"?(i--,o):void 0,s&&yCe(r[0],r[1],s)&&(o=i<3?void 0:o,i=1),t=Object(t);++n<i;){var l=r[n];l&&e(t,l,n,o)}return t})}var xCe=Object.prototype;function S0(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||xCe;return e===r}function CCe(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var SCe="[object Arguments]";function CB(e){return Ti(e)&&Ll(e)==SCe}var SB=Object.prototype,kCe=SB.hasOwnProperty,ECe=SB.propertyIsEnumerable,k0=CB(function(){return arguments}())?CB:function(e){return Ti(e)&&kCe.call(e,"callee")&&!ECe.call(e,"callee")};function NCe(){return!1}var kB=typeof xt=="object"&&xt&&!xt.nodeType&&xt,EB=kB&&typeof module=="object"&&module&&!module.nodeType&&module,BCe=EB&&EB.exports===kB,NB=BCe?Wo.Buffer:void 0,ACe=NB?NB.isBuffer:void 0,Qc=ACe||NCe,DCe="[object Arguments]",MCe="[object Array]",TCe="[object Boolean]",FCe="[object Date]",ICe="[object Error]",_Ce="[object Function]",$Ce="[object Map]",RCe="[object Number]",PCe="[object Object]",LCe="[object RegExp]",zCe="[object Set]",UCe="[object String]",qCe="[object WeakMap]",VCe="[object ArrayBuffer]",jCe="[object DataView]",QCe="[object Float32Array]",HCe="[object Float64Array]",WCe="[object Int8Array]",ZCe="[object Int16Array]",GCe="[object Int32Array]",KCe="[object Uint8Array]",YCe="[object Uint8ClampedArray]",JCe="[object Uint16Array]",OCe="[object Uint32Array]",Xt={};Xt[QCe]=Xt[HCe]=Xt[WCe]=Xt[ZCe]=Xt[GCe]=Xt[KCe]=Xt[YCe]=Xt[JCe]=Xt[OCe]=!0,Xt[DCe]=Xt[MCe]=Xt[VCe]=Xt[TCe]=Xt[jCe]=Xt[FCe]=Xt[ICe]=Xt[_Ce]=Xt[$Ce]=Xt[RCe]=Xt[PCe]=Xt[LCe]=Xt[zCe]=Xt[UCe]=Xt[qCe]=!1;function XCe(e){return Ti(e)&&xB(e.length)&&!!Xt[Ll(e)]}function E0(e){return function(t){return e(t)}}var BB=typeof xt=="object"&&xt&&!xt.nodeType&&xt,Hc=BB&&typeof module=="object"&&module&&!module.nodeType&&module,eSe=Hc&&Hc.exports===BB,N0=eSe&&fB.process,zl=function(){try{var e=Hc&&Hc.require&&Hc.require("util").types;return e||N0&&N0.binding&&N0.binding("util")}catch{}}(),AB=zl&&zl.isTypedArray,B0=AB?E0(AB):XCe,tSe=Object.prototype,rSe=tSe.hasOwnProperty;function DB(e,t){var r=vs(e),n=!r&&k0(e),i=!r&&!n&&Qc(e),o=!r&&!n&&!i&&B0(e),s=r||n||i||o,l=s?CCe(e.length,String):[],c=l.length;for(var u in e)(t||rSe.call(e,u))&&!(s&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||bB(u,c)))&&l.push(u);return l}function MB(e,t){return function(r){return e(t(r))}}var nSe=MB(Object.keys,Object),oSe=Object.prototype,iSe=oSe.hasOwnProperty;function aSe(e){if(!S0(e))return nSe(e);var t=[];for(var r in Object(e))iSe.call(e,r)&&r!="constructor"&&t.push(r);return t}function sSe(e){return zp(e)?DB(e):aSe(e)}function lSe(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var uSe=Object.prototype,cSe=uSe.hasOwnProperty;function dSe(e){if(!Ba(e))return lSe(e);var t=S0(e),r=[];for(var n in e)n=="constructor"&&(t||!cSe.call(e,n))||r.push(n);return r}function TB(e){return zp(e)?DB(e,!0):dSe(e)}var Wc=ys(Object,"create");function fSe(){this.__data__=Wc?Wc(null):{},this.size=0}function pSe(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var mSe="__lodash_hash_undefined__",hSe=Object.prototype,gSe=hSe.hasOwnProperty;function vSe(e){var t=this.__data__;if(Wc){var r=t[e];return r===mSe?void 0:r}return gSe.call(t,e)?t[e]:void 0}var bSe=Object.prototype,ySe=bSe.hasOwnProperty;function wSe(e){var t=this.__data__;return Wc?t[e]!==void 0:ySe.call(t,e)}var xSe="__lodash_hash_undefined__";function CSe(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Wc&&t===void 0?xSe:t,this}function ws(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ws.prototype.clear=fSe,ws.prototype.delete=pSe,ws.prototype.get=vSe,ws.prototype.has=wSe,ws.prototype.set=CSe;function SSe(){this.__data__=[],this.size=0}function Up(e,t){for(var r=e.length;r--;)if(jc(e[r][0],t))return r;return-1}var kSe=Array.prototype,ESe=kSe.splice;function NSe(e){var t=this.__data__,r=Up(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():ESe.call(t,r,1),--this.size,!0}function BSe(e){var t=this.__data__,r=Up(t,e);return r<0?void 0:t[r][1]}function ASe(e){return Up(this.__data__,e)>-1}function DSe(e,t){var r=this.__data__,n=Up(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function Fi(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Fi.prototype.clear=SSe,Fi.prototype.delete=NSe,Fi.prototype.get=BSe,Fi.prototype.has=ASe,Fi.prototype.set=DSe;var Zc=ys(Wo,"Map");function MSe(){this.size=0,this.__data__={hash:new ws,map:new(Zc||Fi),string:new ws}}function TSe(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function qp(e,t){var r=e.__data__;return TSe(t)?r[typeof t=="string"?"string":"hash"]:r.map}function FSe(e){var t=qp(this,e).delete(e);return this.size-=t?1:0,t}function ISe(e){return qp(this,e).get(e)}function _Se(e){return qp(this,e).has(e)}function $Se(e,t){var r=qp(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function xs(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}xs.prototype.clear=MSe,xs.prototype.delete=FSe,xs.prototype.get=ISe,xs.prototype.has=_Se,xs.prototype.set=$Se;function RSe(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var FB=MB(Object.getPrototypeOf,Object),PSe="[object Object]",LSe=Function.prototype,zSe=Object.prototype,IB=LSe.toString,USe=zSe.hasOwnProperty,qSe=IB.call(Object);function VSe(e){if(!Ti(e)||Ll(e)!=PSe)return!1;var t=FB(e);if(t===null)return!0;var r=USe.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&IB.call(r)==qSe}function jSe(){this.__data__=new Fi,this.size=0}function QSe(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function HSe(e){return this.__data__.get(e)}function WSe(e){return this.__data__.has(e)}var ZSe=200;function GSe(e,t){var r=this.__data__;if(r instanceof Fi){var n=r.__data__;if(!Zc||n.length<ZSe-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new xs(n)}return r.set(e,t),this.size=r.size,this}function Zo(e){var t=this.__data__=new Fi(e);this.size=t.size}Zo.prototype.clear=jSe,Zo.prototype.delete=QSe,Zo.prototype.get=HSe,Zo.prototype.has=WSe,Zo.prototype.set=GSe;var _B=typeof xt=="object"&&xt&&!xt.nodeType&&xt,$B=_B&&typeof module=="object"&&module&&!module.nodeType&&module,KSe=$B&&$B.exports===_B,RB=KSe?Wo.Buffer:void 0,PB=RB?RB.allocUnsafe:void 0;function LB(e,t){if(t)return e.slice();var r=e.length,n=PB?PB(r):new e.constructor(r);return e.copy(n),n}function YSe(e,t){for(var r=-1,n=e==null?0:e.length,i=0,o=[];++r<n;){var s=e[r];t(s,r,e)&&(o[i++]=s)}return o}function JSe(){return[]}var OSe=Object.prototype,XSe=OSe.propertyIsEnumerable,zB=Object.getOwnPropertySymbols,eke=zB?function(e){return e==null?[]:(e=Object(e),YSe(zB(e),function(t){return XSe.call(e,t)}))}:JSe;function tke(e,t,r){var n=t(e);return vs(e)?n:RSe(n,r(e))}function A0(e){return tke(e,sSe,eke)}var D0=ys(Wo,"DataView"),M0=ys(Wo,"Promise"),T0=ys(Wo,"Set"),UB="[object Map]",rke="[object Object]",qB="[object Promise]",VB="[object Set]",jB="[object WeakMap]",QB="[object DataView]",nke=bs(D0),oke=bs(Zc),ike=bs(M0),ake=bs(T0),ske=bs(x0),go=Ll;(D0&&go(new D0(new ArrayBuffer(1)))!=QB||Zc&&go(new Zc)!=UB||M0&&go(M0.resolve())!=qB||T0&&go(new T0)!=VB||x0&&go(new x0)!=jB)&&(go=function(e){var t=Ll(e),r=t==rke?e.constructor:void 0,n=r?bs(r):"";if(n)switch(n){case nke:return QB;case oke:return UB;case ike:return qB;case ake:return VB;case ske:return jB}return t});var lke=Object.prototype,uke=lke.hasOwnProperty;function cke(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&uke.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var Vp=Wo.Uint8Array;function F0(e){var t=new e.constructor(e.byteLength);return new Vp(t).set(new Vp(e)),t}function dke(e,t){var r=F0(e.buffer);return new e.constructor(r,e.byteOffset,e.byteLength)}var fke=/\w*$/;function pke(e){var t=new e.constructor(e.source,fke.exec(e));return t.lastIndex=e.lastIndex,t}var HB=Na?Na.prototype:void 0,WB=HB?HB.valueOf:void 0;function mke(e){return WB?Object(WB.call(e)):{}}function ZB(e,t){var r=t?F0(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var hke="[object Boolean]",gke="[object Date]",vke="[object Map]",bke="[object Number]",yke="[object RegExp]",wke="[object Set]",xke="[object String]",Cke="[object Symbol]",Ske="[object ArrayBuffer]",kke="[object DataView]",Eke="[object Float32Array]",Nke="[object Float64Array]",Bke="[object Int8Array]",Ake="[object Int16Array]",Dke="[object Int32Array]",Mke="[object Uint8Array]",Tke="[object Uint8ClampedArray]",Fke="[object Uint16Array]",Ike="[object Uint32Array]";function _ke(e,t,r){var n=e.constructor;switch(t){case Ske:return F0(e);case hke:case gke:return new n(+e);case kke:return dke(e);case Eke:case Nke:case Bke:case Ake:case Dke:case Mke:case Tke:case Fke:case Ike:return ZB(e,r);case vke:return new n;case bke:case xke:return new n(e);case yke:return pke(e);case wke:return new n;case Cke:return mke(e)}}function GB(e){return typeof e.constructor=="function"&&!S0(e)?eCe(FB(e)):{}}var $ke="[object Map]";function Rke(e){return Ti(e)&&go(e)==$ke}var KB=zl&&zl.isMap,Pke=KB?E0(KB):Rke,Lke="[object Set]";function zke(e){return Ti(e)&&go(e)==Lke}var YB=zl&&zl.isSet,Uke=YB?E0(YB):zke,qke=1,JB="[object Arguments]",Vke="[object Array]",jke="[object Boolean]",Qke="[object Date]",Hke="[object Error]",OB="[object Function]",Wke="[object GeneratorFunction]",Zke="[object Map]",Gke="[object Number]",XB="[object Object]",Kke="[object RegExp]",Yke="[object Set]",Jke="[object String]",Oke="[object Symbol]",Xke="[object WeakMap]",e3e="[object ArrayBuffer]",t3e="[object DataView]",r3e="[object Float32Array]",n3e="[object Float64Array]",o3e="[object Int8Array]",i3e="[object Int16Array]",a3e="[object Int32Array]",s3e="[object Uint8Array]",l3e="[object Uint8ClampedArray]",u3e="[object Uint16Array]",c3e="[object Uint32Array]",Wt={};Wt[JB]=Wt[Vke]=Wt[e3e]=Wt[t3e]=Wt[jke]=Wt[Qke]=Wt[r3e]=Wt[n3e]=Wt[o3e]=Wt[i3e]=Wt[a3e]=Wt[Zke]=Wt[Gke]=Wt[XB]=Wt[Kke]=Wt[Yke]=Wt[Jke]=Wt[Oke]=Wt[s3e]=Wt[l3e]=Wt[u3e]=Wt[c3e]=!0,Wt[Hke]=Wt[OB]=Wt[Xke]=!1;function jp(e,t,r,n,i,o){var s,l=t&qke;if(s!==void 0)return s;if(!Ba(e))return e;var c=vs(e);if(c)s=cke(e);else{var u=go(e),d=u==OB||u==Wke;if(Qc(e))return LB(e,l);if(u==XB||u==JB||d&&!i)s=d?{}:GB(e);else{if(!Wt[u])return i?e:{};s=_ke(e,u,l)}}o||(o=new Zo);var f=o.get(e);if(f)return f;o.set(e,s),Uke(e)?e.forEach(function(h){s.add(jp(h,t,r,h,e,o))}):Pke(e)&&e.forEach(function(h,g){s.set(g,jp(h,t,r,g,e,o))});var p=A0,m=c?void 0:p(e);return cCe(m||e,function(h,g){m&&(g=h,h=e[g]),yB(s,g,jp(h,t,r,g,e,o))}),s}var d3e=1,f3e=4;function Ul(e){return jp(e,d3e|f3e)}var p3e="__lodash_hash_undefined__";function m3e(e){return this.__data__.set(e,p3e),this}function h3e(e){return this.__data__.has(e)}function Qp(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new xs;++t<r;)this.add(e[t])}Qp.prototype.add=Qp.prototype.push=m3e,Qp.prototype.has=h3e;function g3e(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function v3e(e,t){return e.has(t)}var b3e=1,y3e=2;function e6(e,t,r,n,i,o){var s=r&b3e,l=e.length,c=t.length;if(l!=c&&!(s&&c>l))return!1;var u=o.get(e),d=o.get(t);if(u&&d)return u==t&&d==e;var f=-1,p=!0,m=r&y3e?new Qp:void 0;for(o.set(e,t),o.set(t,e);++f<l;){var h=e[f],g=t[f];if(n)var v=s?n(g,h,f,t,e,o):n(h,g,f,e,t,o);if(v!==void 0){if(v)continue;p=!1;break}if(m){if(!g3e(t,function(b,w){if(!v3e(m,w)&&(h===b||i(h,b,r,n,o)))return m.push(w)})){p=!1;break}}else if(!(h===g||i(h,g,r,n,o))){p=!1;break}}return o.delete(e),o.delete(t),p}function w3e(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}function x3e(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var C3e=1,S3e=2,k3e="[object Boolean]",E3e="[object Date]",N3e="[object Error]",B3e="[object Map]",A3e="[object Number]",D3e="[object RegExp]",M3e="[object Set]",T3e="[object String]",F3e="[object Symbol]",I3e="[object ArrayBuffer]",_3e="[object DataView]",t6=Na?Na.prototype:void 0,I0=t6?t6.valueOf:void 0;function $3e(e,t,r,n,i,o,s){switch(r){case _3e:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case I3e:return!(e.byteLength!=t.byteLength||!o(new Vp(e),new Vp(t)));case k3e:case E3e:case A3e:return jc(+e,+t);case N3e:return e.name==t.name&&e.message==t.message;case D3e:case T3e:return e==t+"";case B3e:var l=w3e;case M3e:var c=n&C3e;if(l||(l=x3e),e.size!=t.size&&!c)return!1;var u=s.get(e);if(u)return u==t;n|=S3e,s.set(e,t);var d=e6(l(e),l(t),n,i,o,s);return s.delete(e),d;case F3e:if(I0)return I0.call(e)==I0.call(t)}return!1}var R3e=1,P3e=Object.prototype,L3e=P3e.hasOwnProperty;function z3e(e,t,r,n,i,o){var s=r&R3e,l=A0(e),c=l.length,u=A0(t),d=u.length;if(c!=d&&!s)return!1;for(var f=c;f--;){var p=l[f];if(!(s?p in t:L3e.call(t,p)))return!1}var m=o.get(e),h=o.get(t);if(m&&h)return m==t&&h==e;var g=!0;o.set(e,t),o.set(t,e);for(var v=s;++f<c;){p=l[f];var b=e[p],w=t[p];if(n)var y=s?n(w,b,p,t,e,o):n(b,w,p,e,t,o);if(!(y===void 0?b===w||i(b,w,r,n,o):y)){g=!1;break}v||(v=p=="constructor")}if(g&&!v){var x=e.constructor,S=t.constructor;x!=S&&"constructor"in e&&"constructor"in t&&!(typeof x=="function"&&x instanceof x&&typeof S=="function"&&S instanceof S)&&(g=!1)}return o.delete(e),o.delete(t),g}var U3e=1,r6="[object Arguments]",n6="[object Array]",Hp="[object Object]",q3e=Object.prototype,o6=q3e.hasOwnProperty;function V3e(e,t,r,n,i,o){var s=vs(e),l=vs(t),c=s?n6:go(e),u=l?n6:go(t);c=c==r6?Hp:c,u=u==r6?Hp:u;var d=c==Hp,f=u==Hp,p=c==u;if(p&&Qc(e)){if(!Qc(t))return!1;s=!0,d=!1}if(p&&!d)return o||(o=new Zo),s||B0(e)?e6(e,t,r,n,i,o):$3e(e,t,c,r,n,i,o);if(!(r&U3e)){var m=d&&o6.call(e,"__wrapped__"),h=f&&o6.call(t,"__wrapped__");if(m||h){var g=m?e.value():e,v=h?t.value():t;return o||(o=new Zo),i(g,v,r,n,o)}}return p?(o||(o=new Zo),z3e(e,t,r,n,i,o)):!1}function i6(e,t,r,n,i){return e===t?!0:e==null||t==null||!Ti(e)&&!Ti(t)?e!==e&&t!==t:V3e(e,t,r,n,i6,i)}function j3e(e){return function(t,r,n){for(var i=-1,o=Object(t),s=n(t),l=s.length;l--;){var c=s[++i];if(r(o[c],c,o)===!1)break}return t}}var Q3e=j3e();function _0(e,t,r){(r!==void 0&&!jc(e[t],r)||r===void 0&&!(t in e))&&C0(e,t,r)}function H3e(e){return Ti(e)&&zp(e)}function $0(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function W3e(e){return hCe(e,TB(e))}function Z3e(e,t,r,n,i,o,s){var l=$0(e,r),c=$0(t,r),u=s.get(c);if(u){_0(e,r,u);return}var d=o?o(l,c,r+"",e,t,s):void 0,f=d===void 0;if(f){var p=vs(c),m=!p&&Qc(c),h=!p&&!m&&B0(c);d=c,p||m||h?vs(l)?d=l:H3e(l)?d=rCe(l):m?(f=!1,d=LB(c,!0)):h?(f=!1,d=ZB(c,!0)):d=[]:VSe(c)||k0(c)?(d=l,k0(l)?d=W3e(l):(!Ba(l)||y0(l))&&(d=GB(c))):f=!1}f&&(s.set(c,d),i(d,c,n,o,s),s.delete(c)),_0(e,r,d)}function a6(e,t,r,n,i){e!==t&&Q3e(t,function(o,s){if(i||(i=new Zo),Ba(o))Z3e(e,t,s,r,a6,n,i);else{var l=n?n($0(e,s),o,s+"",e,t,i):void 0;l===void 0&&(l=o),_0(e,s,l)}},TB)}function R0(e,t){return i6(e,t)}var Aa=wCe(function(e,t,r){a6(e,t,r)}),We=(e=>(e[e.TYPE=3]="TYPE",e[e.LEVEL=12]="LEVEL",e[e.ATTRIBUTE=13]="ATTRIBUTE",e[e.BLOT=14]="BLOT",e[e.INLINE=7]="INLINE",e[e.BLOCK=11]="BLOCK",e[e.BLOCK_BLOT=10]="BLOCK_BLOT",e[e.INLINE_BLOT=6]="INLINE_BLOT",e[e.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",e[e.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",e[e.ANY=15]="ANY",e))(We||{});class Go{constructor(t,r,n={}){this.attrName=t,this.keyName=r;const i=We.TYPE&We.ATTRIBUTE;this.scope=n.scope!=null?n.scope&We.LEVEL|i:We.ATTRIBUTE,n.whitelist!=null&&(this.whitelist=n.whitelist)}static keys(t){return Array.from(t.attributes).map(r=>r.name)}add(t,r){return this.canAdd(t,r)?(t.setAttribute(this.keyName,r),!0):!1}canAdd(t,r){return this.whitelist==null?!0:typeof r=="string"?this.whitelist.indexOf(r.replace(/["']/g,""))>-1:this.whitelist.indexOf(r)>-1}remove(t){t.removeAttribute(this.keyName)}value(t){const r=t.getAttribute(this.keyName);return this.canAdd(t,r)&&r?r:""}}class ql extends Error{constructor(t){t="[Parchment] "+t,super(t),this.message=t,this.name=this.constructor.name}}const s6=class Lb{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(t,r=!1){if(t==null)return null;if(this.blots.has(t))return this.blots.get(t)||null;if(r){let n=null;try{n=t.parentNode}catch{return null}return this.find(n,r)}return null}create(t,r,n){const i=this.query(r);if(i==null)throw new ql(`Unable to create ${r} blot`);const o=i,s=r instanceof Node||r.nodeType===Node.TEXT_NODE?r:o.create(n),l=new o(t,s,n);return Lb.blots.set(l.domNode,l),l}find(t,r=!1){return Lb.find(t,r)}query(t,r=We.ANY){let n;return typeof t=="string"?n=this.types[t]||this.attributes[t]:t instanceof Text||t.nodeType===Node.TEXT_NODE?n=this.types.text:typeof t=="number"?t&We.LEVEL&We.BLOCK?n=this.types.block:t&We.LEVEL&We.INLINE&&(n=this.types.inline):t instanceof Element&&((t.getAttribute("class")||"").split(/\s+/).some(i=>(n=this.classes[i],!!n)),n=n||this.tags[t.tagName]),n==null?null:"scope"in n&&r&We.LEVEL&n.scope&&r&We.TYPE&n.scope?n:null}register(...t){return t.map(r=>{const n="blotName"in r,i="attrName"in r;if(!n&&!i)throw new ql("Invalid definition");if(n&&r.blotName==="abstract")throw new ql("Cannot register abstract class");const o=n?r.blotName:i?r.attrName:void 0;return this.types[o]=r,i?typeof r.keyName=="string"&&(this.attributes[r.keyName]=r):n&&(r.className&&(this.classes[r.className]=r),r.tagName&&(Array.isArray(r.tagName)?r.tagName=r.tagName.map(s=>s.toUpperCase()):r.tagName=r.tagName.toUpperCase(),(Array.isArray(r.tagName)?r.tagName:[r.tagName]).forEach(s=>{(this.tags[s]==null||r.className==null)&&(this.tags[s]=r)}))),r})}};s6.blots=new WeakMap;let Vl=s6;function l6(e,t){return(e.getAttribute("class")||"").split(/\s+/).filter(r=>r.indexOf(`${t}-`)===0)}class G3e extends Go{static keys(t){return(t.getAttribute("class")||"").split(/\s+/).map(r=>r.split("-").slice(0,-1).join("-"))}add(t,r){return this.canAdd(t,r)?(this.remove(t),t.classList.add(`${this.keyName}-${r}`),!0):!1}remove(t){l6(t,this.keyName).forEach(r=>{t.classList.remove(r)}),t.classList.length===0&&t.removeAttribute("class")}value(t){const r=(l6(t,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(t,r)?r:""}}const vo=G3e;function P0(e){const t=e.split("-"),r=t.slice(1).map(n=>n[0].toUpperCase()+n.slice(1)).join("");return t[0]+r}class K3e extends Go{static keys(t){return(t.getAttribute("style")||"").split(";").map(r=>r.split(":")[0].trim())}add(t,r){return this.canAdd(t,r)?(t.style[P0(this.keyName)]=r,!0):!1}remove(t){t.style[P0(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")}value(t){const r=t.style[P0(this.keyName)];return this.canAdd(t,r)?r:""}}const Da=K3e;class Y3e{constructor(t){this.attributes={},this.domNode=t,this.build()}attribute(t,r){r?t.add(this.domNode,r)&&(t.value(this.domNode)!=null?this.attributes[t.attrName]=t:delete this.attributes[t.attrName]):(t.remove(this.domNode),delete this.attributes[t.attrName])}build(){this.attributes={};const t=Vl.find(this.domNode);if(t==null)return;const r=Go.keys(this.domNode),n=vo.keys(this.domNode),i=Da.keys(this.domNode);r.concat(n).concat(i).forEach(o=>{const s=t.scroll.query(o,We.ATTRIBUTE);s instanceof Go&&(this.attributes[s.attrName]=s)})}copy(t){Object.keys(this.attributes).forEach(r=>{const n=this.attributes[r].value(this.domNode);t.format(r,n)})}move(t){this.copy(t),Object.keys(this.attributes).forEach(r=>{this.attributes[r].remove(this.domNode)}),this.attributes={}}values(){return Object.keys(this.attributes).reduce((t,r)=>(t[r]=this.attributes[r].value(this.domNode),t),{})}}const Wp=Y3e,u6=class{constructor(e,t){this.scroll=e,this.domNode=t,Vl.blots.set(t,this),this.prev=null,this.next=null}static create(e){if(this.tagName==null)throw new ql("Blot definition missing tagName");let t,r;return Array.isArray(this.tagName)?(typeof e=="string"?(r=e.toUpperCase(),parseInt(r,10).toString()===r&&(r=parseInt(r,10))):typeof e=="number"&&(r=e),typeof r=="number"?t=document.createElement(this.tagName[r-1]):r&&this.tagName.indexOf(r)>-1?t=document.createElement(r):t=document.createElement(this.tagName[0])):t=document.createElement(this.tagName),this.className&&t.classList.add(this.className),t}get statics(){return this.constructor}attach(){}clone(){const e=this.domNode.cloneNode(!1);return this.scroll.create(e)}detach(){this.parent!=null&&this.parent.removeChild(this),Vl.blots.delete(this.domNode)}deleteAt(e,t){this.isolate(e,t).remove()}formatAt(e,t,r,n){const i=this.isolate(e,t);if(this.scroll.query(r,We.BLOT)!=null&&n)i.wrap(r,n);else if(this.scroll.query(r,We.ATTRIBUTE)!=null){const o=this.scroll.create(this.statics.scope);i.wrap(o),o.format(r,n)}}insertAt(e,t,r){const n=r==null?this.scroll.create("text",t):this.scroll.create(t,r),i=this.split(e);this.parent.insertBefore(n,i||void 0)}isolate(e,t){const r=this.split(e);if(r==null)throw new Error("Attempt to isolate at end");return r.split(t),r}length(){return 1}offset(e=this.parent){return this.parent==null||this===e?0:this.parent.children.offset(this)+this.parent.offset(e)}optimize(e){this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)&&this.wrap(this.statics.requiredContainer.blotName)}remove(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()}replaceWith(e,t){const r=typeof e=="string"?this.scroll.create(e,t):e;return this.parent!=null&&(this.parent.insertBefore(r,this.next||void 0),this.remove()),r}split(e,t){return e===0?this:this.next}update(e,t){}wrap(e,t){const r=typeof e=="string"?this.scroll.create(e,t):e;if(this.parent!=null&&this.parent.insertBefore(r,this.next||void 0),typeof r.appendChild!="function")throw new ql(`Cannot wrap ${e}`);return r.appendChild(this),r}};u6.blotName="abstract";let c6=u6;const d6=class extends c6{static value(e){return!0}index(e,t){return this.domNode===e||this.domNode.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(t,1):-1}position(e,t){let r=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return e>0&&(r+=1),[this.parent.domNode,r]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}};d6.scope=We.INLINE_BLOT;const jr=d6;class J3e{constructor(){this.head=null,this.tail=null,this.length=0}append(...t){if(this.insertBefore(t[0],null),t.length>1){const r=t.slice(1);this.append(...r)}}at(t){const r=this.iterator();let n=r();for(;n&&t>0;)t-=1,n=r();return n}contains(t){const r=this.iterator();let n=r();for(;n;){if(n===t)return!0;n=r()}return!1}indexOf(t){const r=this.iterator();let n=r(),i=0;for(;n;){if(n===t)return i;i+=1,n=r()}return-1}insertBefore(t,r){t!=null&&(this.remove(t),t.next=r,r!=null?(t.prev=r.prev,r.prev!=null&&(r.prev.next=t),r.prev=t,r===this.head&&(this.head=t)):this.tail!=null?(this.tail.next=t,t.prev=this.tail,this.tail=t):(t.prev=null,this.head=this.tail=t),this.length+=1)}offset(t){let r=0,n=this.head;for(;n!=null;){if(n===t)return r;r+=n.length(),n=n.next}return-1}remove(t){this.contains(t)&&(t.prev!=null&&(t.prev.next=t.next),t.next!=null&&(t.next.prev=t.prev),t===this.head&&(this.head=t.next),t===this.tail&&(this.tail=t.prev),this.length-=1)}iterator(t=this.head){return()=>{const r=t;return t!=null&&(t=t.next),r}}find(t,r=!1){const n=this.iterator();let i=n();for(;i;){const o=i.length();if(t<o||r&&t===o&&(i.next==null||i.next.length()!==0))return[i,t];t-=o,i=n()}return[null,0]}forEach(t){const r=this.iterator();let n=r();for(;n;)t(n),n=r()}forEachAt(t,r,n){if(r<=0)return;const[i,o]=this.find(t);let s=t-o;const l=this.iterator(i);let c=l();for(;c&&s<t+r;){const u=c.length();t>s?n(c,t-s,Math.min(r,s+u-t)):n(c,0,Math.min(u,t+r-s)),s+=u,c=l()}}map(t){return this.reduce((r,n)=>(r.push(t(n)),r),[])}reduce(t,r){const n=this.iterator();let i=n();for(;i;)r=t(r,i),i=n();return r}}function f6(e,t){const r=t.find(e);if(r)return r;try{return t.create(e)}catch{const n=t.create(We.INLINE);return Array.from(e.childNodes).forEach(i=>{n.domNode.appendChild(i)}),e.parentNode&&e.parentNode.replaceChild(n.domNode,e),n.attach(),n}}const p6=class qa extends c6{constructor(t,r){super(t,r),this.uiNode=null,this.build()}appendChild(t){this.insertBefore(t)}attach(){super.attach(),this.children.forEach(t=>{t.attach()})}attachUI(t){this.uiNode!=null&&this.uiNode.remove(),this.uiNode=t,qa.uiClass&&this.uiNode.classList.add(qa.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new J3e,Array.from(this.domNode.childNodes).filter(t=>t!==this.uiNode).reverse().forEach(t=>{try{const r=f6(t,this.scroll);this.insertBefore(r,this.children.head||void 0)}catch(r){if(r instanceof ql)return;throw r}})}deleteAt(t,r){if(t===0&&r===this.length())return this.remove();this.children.forEachAt(t,r,(n,i,o)=>{n.deleteAt(i,o)})}descendant(t,r=0){const[n,i]=this.children.find(r);return t.blotName==null&&t(n)||t.blotName!=null&&n instanceof t?[n,i]:n instanceof qa?n.descendant(t,i):[null,-1]}descendants(t,r=0,n=Number.MAX_VALUE){let i=[],o=n;return this.children.forEachAt(r,n,(s,l,c)=>{(t.blotName==null&&t(s)||t.blotName!=null&&s instanceof t)&&i.push(s),s instanceof qa&&(i=i.concat(s.descendants(t,l,o))),o-=c}),i}detach(){this.children.forEach(t=>{t.detach()}),super.detach()}enforceAllowedChildren(){let t=!1;this.children.forEach(r=>{t||this.statics.allowedChildren.some(n=>r instanceof n)||(r.statics.scope===We.BLOCK_BLOT?(r.next!=null&&this.splitAfter(r),r.prev!=null&&this.splitAfter(r.prev),r.parent.unwrap(),t=!0):r instanceof qa?r.unwrap():r.remove())})}formatAt(t,r,n,i){this.children.forEachAt(t,r,(o,s,l)=>{o.formatAt(s,l,n,i)})}insertAt(t,r,n){const[i,o]=this.children.find(t);if(i)i.insertAt(o,r,n);else{const s=n==null?this.scroll.create("text",r):this.scroll.create(r,n);this.appendChild(s)}}insertBefore(t,r){t.parent!=null&&t.parent.children.remove(t);let n=null;this.children.insertBefore(t,r||null),t.parent=this,r!=null&&(n=r.domNode),(this.domNode.parentNode!==t.domNode||this.domNode.nextSibling!==n)&&this.domNode.insertBefore(t.domNode,n),t.attach()}length(){return this.children.reduce((t,r)=>t+r.length(),0)}moveChildren(t,r){this.children.forEach(n=>{t.insertBefore(n,r)})}optimize(t){if(super.optimize(t),this.enforceAllowedChildren(),this.uiNode!=null&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),this.children.length===0)if(this.statics.defaultChild!=null){const r=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(r)}else this.remove()}path(t,r=!1){const[n,i]=this.children.find(t,r),o=[[this,t]];return n instanceof qa?o.concat(n.path(i,r)):(n!=null&&o.push([n,i]),o)}removeChild(t){this.children.remove(t)}replaceWith(t,r){const n=typeof t=="string"?this.scroll.create(t,r):t;return n instanceof qa&&this.moveChildren(n),super.replaceWith(n)}split(t,r=!1){if(!r){if(t===0)return this;if(t===this.length())return this.next}const n=this.clone();return this.parent&&this.parent.insertBefore(n,this.next||void 0),this.children.forEachAt(t,this.length(),(i,o,s)=>{const l=i.split(o,r);l!=null&&n.appendChild(l)}),n}splitAfter(t){const r=this.clone();for(;t.next!=null;)r.appendChild(t.next);return this.parent&&this.parent.insertBefore(r,this.next||void 0),r}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()}update(t,r){const n=[],i=[];t.forEach(o=>{o.target===this.domNode&&o.type==="childList"&&(n.push(...o.addedNodes),i.push(...o.removedNodes))}),i.forEach(o=>{if(o.parentNode!=null&&o.tagName!=="IFRAME"&&document.body.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;const s=this.scroll.find(o);s!=null&&(s.domNode.parentNode==null||s.domNode.parentNode===this.domNode)&&s.detach()}),n.filter(o=>o.parentNode===this.domNode&&o!==this.uiNode).sort((o,s)=>o===s?0:o.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1).forEach(o=>{let s=null;o.nextSibling!=null&&(s=this.scroll.find(o.nextSibling));const l=f6(o,this.scroll);(l.next!==s||l.next==null)&&(l.parent!=null&&l.parent.removeChild(this),this.insertBefore(l,s||void 0))}),this.enforceAllowedChildren()}};p6.uiClass="";const bo=p6;function O3e(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}const jl=class tu extends bo{static create(t){return super.create(t)}static formats(t,r){const n=r.query(tu.blotName);if(!(n!=null&&t.tagName===n.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return t.tagName.toLowerCase()}}constructor(t,r){super(t,r),this.attributes=new Wp(this.domNode)}format(t,r){if(t===this.statics.blotName&&!r)this.children.forEach(n=>{n instanceof tu||(n=n.wrap(tu.blotName,!0)),this.attributes.copy(n)}),this.unwrap();else{const n=this.scroll.query(t,We.INLINE);if(n==null)return;n instanceof Go?this.attributes.attribute(n,r):r&&(t!==this.statics.blotName||this.formats()[t]!==r)&&this.replaceWith(t,r)}}formats(){const t=this.attributes.values(),r=this.statics.formats(this.domNode,this.scroll);return r!=null&&(t[this.statics.blotName]=r),t}formatAt(t,r,n,i){this.formats()[n]!=null||this.scroll.query(n,We.ATTRIBUTE)?this.isolate(t,r).format(n,i):super.formatAt(t,r,n,i)}optimize(t){super.optimize(t);const r=this.formats();if(Object.keys(r).length===0)return this.unwrap();const n=this.next;n instanceof tu&&n.prev===this&&O3e(r,n.formats())&&(n.moveChildren(this),n.remove())}replaceWith(t,r){const n=super.replaceWith(t,r);return this.attributes.copy(n),n}update(t,r){super.update(t,r),t.some(n=>n.target===this.domNode&&n.type==="attributes")&&this.attributes.build()}wrap(t,r){const n=super.wrap(t,r);return n instanceof tu&&this.attributes.move(n),n}};jl.allowedChildren=[jl,jr],jl.blotName="inline",jl.scope=We.INLINE_BLOT,jl.tagName="SPAN";const L0=jl,Ql=class zb extends bo{static create(t){return super.create(t)}static formats(t,r){const n=r.query(zb.blotName);if(!(n!=null&&t.tagName===n.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return t.tagName.toLowerCase()}}constructor(t,r){super(t,r),this.attributes=new Wp(this.domNode)}format(t,r){const n=this.scroll.query(t,We.BLOCK);n!=null&&(n instanceof Go?this.attributes.attribute(n,r):t===this.statics.blotName&&!r?this.replaceWith(zb.blotName):r&&(t!==this.statics.blotName||this.formats()[t]!==r)&&this.replaceWith(t,r))}formats(){const t=this.attributes.values(),r=this.statics.formats(this.domNode,this.scroll);return r!=null&&(t[this.statics.blotName]=r),t}formatAt(t,r,n,i){this.scroll.query(n,We.BLOCK)!=null?this.format(n,i):super.formatAt(t,r,n,i)}insertAt(t,r,n){if(n==null||this.scroll.query(r,We.INLINE)!=null)super.insertAt(t,r,n);else{const i=this.split(t);if(i!=null){const o=this.scroll.create(r,n);i.parent.insertBefore(o,i)}else throw new Error("Attempt to insertAt after block boundaries")}}replaceWith(t,r){const n=super.replaceWith(t,r);return this.attributes.copy(n),n}update(t,r){super.update(t,r),t.some(n=>n.target===this.domNode&&n.type==="attributes")&&this.attributes.build()}};Ql.blotName="block",Ql.scope=We.BLOCK_BLOT,Ql.tagName="P",Ql.allowedChildren=[L0,Ql,jr];const Gc=Ql,z0=class extends bo{checkMerge(){return this.next!==null&&this.next.statics.blotName===this.statics.blotName}deleteAt(e,t){super.deleteAt(e,t),this.enforceAllowedChildren()}formatAt(e,t,r,n){super.formatAt(e,t,r,n),this.enforceAllowedChildren()}insertAt(e,t,r){super.insertAt(e,t,r),this.enforceAllowedChildren()}optimize(e){super.optimize(e),this.children.length>0&&this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};z0.blotName="container",z0.scope=We.BLOCK_BLOT;const Zp=z0;class X3e extends jr{static formats(t,r){}format(t,r){super.formatAt(0,this.length(),t,r)}formatAt(t,r,n,i){t===0&&r===this.length()?this.format(n,i):super.formatAt(t,r,n,i)}formats(){return this.statics.formats(this.domNode,this.scroll)}}const An=X3e,e4e={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},t4e=100,Hl=class extends bo{constructor(e,t){super(null,t),this.registry=e,this.scroll=this,this.build(),this.observer=new MutationObserver(r=>{this.update(r)}),this.observer.observe(this.domNode,e4e),this.attach()}create(e,t){return this.registry.create(this,e,t)}find(e,t=!1){const r=this.registry.find(e,t);return r?r.scroll===this?r:t?this.find(r.scroll.domNode.parentNode,!0):null:null}query(e,t=We.ANY){return this.registry.query(e,t)}register(...e){return this.registry.register(...e)}build(){this.scroll!=null&&super.build()}detach(){super.detach(),this.observer.disconnect()}deleteAt(e,t){this.update(),e===0&&t===this.length()?this.children.forEach(r=>{r.remove()}):super.deleteAt(e,t)}formatAt(e,t,r,n){this.update(),super.formatAt(e,t,r,n)}insertAt(e,t,r){this.update(),super.insertAt(e,t,r)}optimize(e=[],t={}){super.optimize(t);const r=t.mutationsMap||new WeakMap;let n=Array.from(this.observer.takeRecords());for(;n.length>0;)e.push(n.pop());const i=(l,c=!0)=>{l==null||l===this||l.domNode.parentNode!=null&&(r.has(l.domNode)||r.set(l.domNode,[]),c&&i(l.parent))},o=l=>{r.has(l.domNode)&&(l instanceof bo&&l.children.forEach(o),r.delete(l.domNode),l.optimize(t))};let s=e;for(let l=0;s.length>0;l+=1){if(l>=t4e)throw new Error("[Parchment] Maximum optimize iterations reached");for(s.forEach(c=>{const u=this.find(c.target,!0);u!=null&&(u.domNode===c.target&&(c.type==="childList"?(i(this.find(c.previousSibling,!1)),Array.from(c.addedNodes).forEach(d=>{const f=this.find(d,!1);i(f,!1),f instanceof bo&&f.children.forEach(p=>{i(p,!1)})})):c.type==="attributes"&&i(u.prev)),i(u))}),this.children.forEach(o),s=Array.from(this.observer.takeRecords()),n=s.slice();n.length>0;)e.push(n.pop())}}update(e,t={}){e=e||this.observer.takeRecords();const r=new WeakMap;e.map(n=>{const i=this.find(n.target,!0);return i==null?null:r.has(i.domNode)?(r.get(i.domNode).push(n),null):(r.set(i.domNode,[n]),i)}).forEach(n=>{n!=null&&n!==this&&r.has(n.domNode)&&n.update(r.get(n.domNode)||[],t)}),t.mutationsMap=r,r.has(this.domNode)&&super.update(r.get(this.domNode),t),this.optimize(e,t)}};Hl.blotName="scroll",Hl.defaultChild=Gc,Hl.allowedChildren=[Gc,Zp],Hl.scope=We.BLOCK_BLOT,Hl.tagName="DIV";const U0=Hl,q0=class SA extends jr{static create(t){return document.createTextNode(t)}static value(t){return t.data}constructor(t,r){super(t,r),this.text=this.statics.value(this.domNode)}deleteAt(t,r){this.domNode.data=this.text=this.text.slice(0,t)+this.text.slice(t+r)}index(t,r){return this.domNode===t?r:-1}insertAt(t,r,n){n==null?(this.text=this.text.slice(0,t)+r+this.text.slice(t),this.domNode.data=this.text):super.insertAt(t,r,n)}length(){return this.text.length}optimize(t){super.optimize(t),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof SA&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())}position(t,r=!1){return[this.domNode,t]}split(t,r=!1){if(!r){if(t===0)return this;if(t===this.length())return this.next}const n=this.scroll.create(this.domNode.splitText(t));return this.parent.insertBefore(n,this.next||void 0),this.text=this.statics.value(this.domNode),n}update(t,r){t.some(n=>n.type==="characterData"&&n.target===this.domNode)&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};q0.blotName="text",q0.scope=We.INLINE_BLOT;const Gp=q0,m6=Object.freeze(Object.defineProperty({__proto__:null,Attributor:Go,AttributorStore:Wp,BlockBlot:Gc,ClassAttributor:vo,ContainerBlot:Zp,EmbedBlot:An,InlineBlot:L0,LeafBlot:jr,ParentBlot:bo,Registry:Vl,Scope:We,ScrollBlot:U0,StyleAttributor:Da,TextBlot:Gp},Symbol.toStringTag,{value:"Module"}));var V0={exports:{}},j0,h6;function r4e(){if(h6)return j0;h6=1;var e=-1,t=1,r=0;function n(k,M,T,R,F){if(k===M)return k?[[r,k]]:[];if(T!=null){var A=N(k,M,T);if(A)return A}var P=l(k,M),q=k.substring(0,P);k=k.substring(P),M=M.substring(P),P=u(k,M);var z=k.substring(k.length-P);k=k.substring(0,k.length-P),M=M.substring(0,M.length-P);var W=i(k,M);return q&&W.unshift([r,q]),z&&W.push([r,z]),w(W,F),R&&f(W),W}function i(k,M){var T;if(!k)return[[t,M]];if(!M)return[[e,k]];var R=k.length>M.length?k:M,F=k.length>M.length?M:k,A=R.indexOf(F);if(A!==-1)return T=[[t,R.substring(0,A)],[r,F],[t,R.substring(A+F.length)]],k.length>M.length&&(T[0][0]=T[2][0]=e),T;if(F.length===1)return[[e,k],[t,M]];var P=d(k,M);if(P){var q=P[0],z=P[1],W=P[2],X=P[3],$=P[4],j=n(q,W),L=n(z,X);return j.concat([[r,$]],L)}return o(k,M)}function o(k,M){for(var T=k.length,R=M.length,F=Math.ceil((T+R)/2),A=F,P=2*F,q=new Array(P),z=new Array(P),W=0;W<P;W++)q[W]=-1,z[W]=-1;q[A+1]=0,z[A+1]=0;for(var X=T-R,$=X%2!==0,j=0,L=0,ae=0,se=0,ie=0;ie<F;ie++){for(var V=-ie+j;V<=ie-L;V+=2){var G=A+V,O;V===-ie||V!==ie&&q[G-1]<q[G+1]?O=q[G+1]:O=q[G-1]+1;for(var te=O-V;O<T&&te<R&&k.charAt(O)===M.charAt(te);)O++,te++;if(q[G]=O,O>T)L+=2;else if(te>R)j+=2;else if($){var oe=A+X-V;if(oe>=0&&oe<P&&z[oe]!==-1){var fe=T-z[oe];if(O>=fe)return s(k,M,O,te)}}}for(var de=-ie+ae;de<=ie-se;de+=2){var oe=A+de,fe;de===-ie||de!==ie&&z[oe-1]<z[oe+1]?fe=z[oe+1]:fe=z[oe-1]+1;for(var ve=fe-de;fe<T&&ve<R&&k.charAt(T-fe-1)===M.charAt(R-ve-1);)fe++,ve++;if(z[oe]=fe,fe>T)se+=2;else if(ve>R)ae+=2;else if(!$){var G=A+X-de;if(G>=0&&G<P&&q[G]!==-1){var O=q[G],te=A+O-G;if(fe=T-fe,O>=fe)return s(k,M,O,te)}}}}return[[e,k],[t,M]]}function s(k,M,T,R){var F=k.substring(0,T),A=M.substring(0,R),P=k.substring(T),q=M.substring(R),z=n(F,A),W=n(P,q);return z.concat(W)}function l(k,M){if(!k||!M||k.charAt(0)!==M.charAt(0))return 0;for(var T=0,R=Math.min(k.length,M.length),F=R,A=0;T<F;)k.substring(A,F)==M.substring(A,F)?(T=F,A=T):R=F,F=Math.floor((R-T)/2+T);return y(k.charCodeAt(F-1))&&F--,F}function c(k,M){var T=k.length,R=M.length;if(T==0||R==0)return 0;T>R?k=k.substring(T-R):T<R&&(M=M.substring(0,T));var F=Math.min(T,R);if(k==M)return F;for(var A=0,P=1;;){var q=k.substring(F-P),z=M.indexOf(q);if(z==-1)return A;P+=z,(z==0||k.substring(F-P)==M.substring(0,P))&&(A=P,P++)}}function u(k,M){if(!k||!M||k.slice(-1)!==M.slice(-1))return 0;for(var T=0,R=Math.min(k.length,M.length),F=R,A=0;T<F;)k.substring(k.length-F,k.length-A)==M.substring(M.length-F,M.length-A)?(T=F,A=T):R=F,F=Math.floor((R-T)/2+T);return x(k.charCodeAt(k.length-F))&&F--,F}function d(k,M){var T=k.length>M.length?k:M,R=k.length>M.length?M:k;if(T.length<4||R.length*2<T.length)return null;function F(L,ae,se){for(var ie=L.substring(se,se+Math.floor(L.length/4)),V=-1,G="",O,te,oe,fe;(V=ae.indexOf(ie,V+1))!==-1;){var de=l(L.substring(se),ae.substring(V)),ve=u(L.substring(0,se),ae.substring(0,V));G.length<ve+de&&(G=ae.substring(V-ve,V)+ae.substring(V,V+de),O=L.substring(0,se-ve),te=L.substring(se+de),oe=ae.substring(0,V-ve),fe=ae.substring(V+de))}return G.length*2>=L.length?[O,te,oe,fe,G]:null}var A=F(T,R,Math.ceil(T.length/4)),P=F(T,R,Math.ceil(T.length/2)),q;if(!A&&!P)return null;P?A?q=A[4].length>P[4].length?A:P:q=P:q=A;var z,W,X,$;k.length>M.length?(z=q[0],W=q[1],X=q[2],$=q[3]):(X=q[0],$=q[1],z=q[2],W=q[3]);var j=q[4];return[z,W,X,$,j]}function f(k){for(var M=!1,T=[],R=0,F=null,A=0,P=0,q=0,z=0,W=0;A<k.length;)k[A][0]==r?(T[R++]=A,P=z,q=W,z=0,W=0,F=k[A][1]):(k[A][0]==t?z+=k[A][1].length:W+=k[A][1].length,F&&F.length<=Math.max(P,q)&&F.length<=Math.max(z,W)&&(k.splice(T[R-1],0,[e,F]),k[T[R-1]+1][0]=t,R--,R--,A=R>0?T[R-1]:-1,P=0,q=0,z=0,W=0,F=null,M=!0)),A++;for(M&&w(k),b(k),A=1;A<k.length;){if(k[A-1][0]==e&&k[A][0]==t){var X=k[A-1][1],$=k[A][1],j=c(X,$),L=c($,X);j>=L?(j>=X.length/2||j>=$.length/2)&&(k.splice(A,0,[r,$.substring(0,j)]),k[A-1][1]=X.substring(0,X.length-j),k[A+1][1]=$.substring(j),A++):(L>=X.length/2||L>=$.length/2)&&(k.splice(A,0,[r,X.substring(0,L)]),k[A-1][0]=t,k[A-1][1]=$.substring(0,$.length-L),k[A+1][0]=e,k[A+1][1]=X.substring(L),A++),A++}A++}}var p=/[^a-zA-Z0-9]/,m=/\s/,h=/[\r\n]/,g=/\n\r?\n$/,v=/^\r?\n\r?\n/;function b(k){function M(L,ae){if(!L||!ae)return 6;var se=L.charAt(L.length-1),ie=ae.charAt(0),V=se.match(p),G=ie.match(p),O=V&&se.match(m),te=G&&ie.match(m),oe=O&&se.match(h),fe=te&&ie.match(h),de=oe&&L.match(g),ve=fe&&ae.match(v);return de||ve?5:oe||fe?4:V&&!O&&te?3:O||te?2:V||G?1:0}for(var T=1;T<k.length-1;){if(k[T-1][0]==r&&k[T+1][0]==r){var R=k[T-1][1],F=k[T][1],A=k[T+1][1],P=u(R,F);if(P){var q=F.substring(F.length-P);R=R.substring(0,R.length-P),F=q+F.substring(0,F.length-P),A=q+A}for(var z=R,W=F,X=A,$=M(R,F)+M(F,A);F.charAt(0)===A.charAt(0);){R+=F.charAt(0),F=F.substring(1)+A.charAt(0),A=A.substring(1);var j=M(R,F)+M(F,A);j>=$&&($=j,z=R,W=F,X=A)}k[T-1][1]!=z&&(z?k[T-1][1]=z:(k.splice(T-1,1),T--),k[T][1]=W,X?k[T+1][1]=X:(k.splice(T+1,1),T--))}T++}}function w(k,M){k.push([r,""]);for(var T=0,R=0,F=0,A="",P="",q;T<k.length;){if(T<k.length-1&&!k[T][1]){k.splice(T,1);continue}switch(k[T][0]){case t:F++,P+=k[T][1],T++;break;case e:R++,A+=k[T][1],T++;break;case r:var z=T-F-R-1;if(M){if(z>=0&&C(k[z][1])){var W=k[z][1].slice(-1);if(k[z][1]=k[z][1].slice(0,-1),A=W+A,P=W+P,!k[z][1]){k.splice(z,1),T--;var X=z-1;k[X]&&k[X][0]===t&&(F++,P=k[X][1]+P,X--),k[X]&&k[X][0]===e&&(R++,A=k[X][1]+A,X--),z=X}}if(S(k[T][1])){var W=k[T][1].charAt(0);k[T][1]=k[T][1].slice(1),A+=W,P+=W}}if(T<k.length-1&&!k[T][1]){k.splice(T,1);break}if(A.length>0||P.length>0){A.length>0&&P.length>0&&(q=l(P,A),q!==0&&(z>=0?k[z][1]+=P.substring(0,q):(k.splice(0,0,[r,P.substring(0,q)]),T++),P=P.substring(q),A=A.substring(q)),q=u(P,A),q!==0&&(k[T][1]=P.substring(P.length-q)+k[T][1],P=P.substring(0,P.length-q),A=A.substring(0,A.length-q)));var $=F+R;A.length===0&&P.length===0?(k.splice(T-$,$),T=T-$):A.length===0?(k.splice(T-$,$,[t,P]),T=T-$+1):P.length===0?(k.splice(T-$,$,[e,A]),T=T-$+1):(k.splice(T-$,$,[e,A],[t,P]),T=T-$+2)}T!==0&&k[T-1][0]===r?(k[T-1][1]+=k[T][1],k.splice(T,1)):T++,F=0,R=0,A="",P="";break}}k[k.length-1][1]===""&&k.pop();var j=!1;for(T=1;T<k.length-1;)k[T-1][0]===r&&k[T+1][0]===r&&(k[T][1].substring(k[T][1].length-k[T-1][1].length)===k[T-1][1]?(k[T][1]=k[T-1][1]+k[T][1].substring(0,k[T][1].length-k[T-1][1].length),k[T+1][1]=k[T-1][1]+k[T+1][1],k.splice(T-1,1),j=!0):k[T][1].substring(0,k[T+1][1].length)==k[T+1][1]&&(k[T-1][1]+=k[T+1][1],k[T][1]=k[T][1].substring(k[T+1][1].length)+k[T+1][1],k.splice(T+1,1),j=!0)),T++;j&&w(k,M)}function y(k){return k>=55296&&k<=56319}function x(k){return k>=56320&&k<=57343}function S(k){return x(k.charCodeAt(0))}function C(k){return y(k.charCodeAt(k.length-1))}function E(k){for(var M=[],T=0;T<k.length;T++)k[T][1].length>0&&M.push(k[T]);return M}function B(k,M,T,R){return C(k)||S(R)?null:E([[r,k],[e,M],[t,T],[r,R]])}function N(k,M,T){var R=typeof T=="number"?{index:T,length:0}:T.oldRange,F=typeof T=="number"?null:T.newRange,A=k.length,P=M.length;if(R.length===0&&(F===null||F.length===0)){var q=R.index,z=k.slice(0,q),W=k.slice(q),X=F?F.index:null;e:{var $=q+P-A;if(X!==null&&X!==$||$<0||$>P)break e;var j=M.slice(0,$),L=M.slice($);if(L!==W)break e;var ae=Math.min(q,$),se=z.slice(0,ae),ie=j.slice(0,ae);if(se!==ie)break e;var V=z.slice(ae),G=j.slice(ae);return B(se,V,G,W)}e:{if(X!==null&&X!==q)break e;var O=q,j=M.slice(0,O),L=M.slice(O);if(j!==z)break e;var te=Math.min(A-O,P-O),oe=W.slice(W.length-te),fe=L.slice(L.length-te);if(oe!==fe)break e;var V=W.slice(0,W.length-te),G=L.slice(0,L.length-te);return B(z,V,G,oe)}}if(R.length>0&&F&&F.length===0)e:{var se=k.slice(0,R.index),oe=k.slice(R.index+R.length),ae=se.length,te=oe.length;if(P<ae+te)break e;var ie=M.slice(0,ae),fe=M.slice(P-te);if(se!==ie||oe!==fe)break e;var V=k.slice(ae,A-te),G=M.slice(ae,P-te);return B(se,V,G,oe)}return null}function D(k,M,T,R){return n(k,M,T,R,!0)}return D.INSERT=t,D.DELETE=e,D.EQUAL=r,j0=D,j0}var Kp={exports:{}};Kp.exports;var g6;function v6(){return g6||(g6=1,function(e,t){var r=200,n="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",s="[object Array]",l="[object Boolean]",c="[object Date]",u="[object Error]",d="[object Function]",f="[object GeneratorFunction]",p="[object Map]",m="[object Number]",h="[object Object]",g="[object Promise]",v="[object RegExp]",b="[object Set]",w="[object String]",y="[object Symbol]",x="[object WeakMap]",S="[object ArrayBuffer]",C="[object DataView]",E="[object Float32Array]",B="[object Float64Array]",N="[object Int8Array]",D="[object Int16Array]",k="[object Int32Array]",M="[object Uint8Array]",T="[object Uint8ClampedArray]",R="[object Uint16Array]",F="[object Uint32Array]",A=/[\\^$.*+?()[\]{}|]/g,P=/\w*$/,q=/^\[object .+?Constructor\]$/,z=/^(?:0|[1-9]\d*)$/,W={};W[o]=W[s]=W[S]=W[C]=W[l]=W[c]=W[E]=W[B]=W[N]=W[D]=W[k]=W[p]=W[m]=W[h]=W[v]=W[b]=W[w]=W[y]=W[M]=W[T]=W[R]=W[F]=!0,W[u]=W[d]=W[x]=!1;var X=typeof Ea=="object"&&Ea&&Ea.Object===Object&&Ea,$=typeof self=="object"&&self&&self.Object===Object&&self,j=X||$||Function("return this")(),L=t&&!t.nodeType&&t,ae=L&&!0&&e&&!e.nodeType&&e,se=ae&&ae.exports===L;function ie(I,Y){return I.set(Y[0],Y[1]),I}function V(I,Y){return I.add(Y),I}function G(I,Y){for(var le=-1,ye=I?I.length:0;++le<ye&&Y(I[le],le,I)!==!1;);return I}function O(I,Y){for(var le=-1,ye=Y.length,ht=I.length;++le<ye;)I[ht+le]=Y[le];return I}function te(I,Y,le,ye){for(var ht=-1,Oe=I?I.length:0;++ht<Oe;)le=Y(le,I[ht],ht,I);return le}function oe(I,Y){for(var le=-1,ye=Array(I);++le<I;)ye[le]=Y(le);return ye}function fe(I,Y){return I==null?void 0:I[Y]}function de(I){var Y=!1;if(I!=null&&typeof I.toString!="function")try{Y=!!(I+"")}catch{}return Y}function ve(I){var Y=-1,le=Array(I.size);return I.forEach(function(ye,ht){le[++Y]=[ht,ye]}),le}function Ie(I,Y){return function(le){return I(Y(le))}}function $e(I){var Y=-1,le=Array(I.size);return I.forEach(function(ye){le[++Y]=ye}),le}var Te=Array.prototype,Le=Function.prototype,Z=Object.prototype,J=j["__core-js_shared__"],ee=function(){var I=/[^.]+$/.exec(J&&J.keys&&J.keys.IE_PROTO||"");return I?"Symbol(src)_1."+I:""}(),U=Le.toString,K=Z.hasOwnProperty,Q=Z.toString,ne=RegExp("^"+U.call(K).replace(A,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ue=se?j.Buffer:void 0,pe=j.Symbol,ge=j.Uint8Array,we=Ie(Object.getPrototypeOf,Object),Fe=Object.create,be=Z.propertyIsEnumerable,qe=Te.splice,Xe=Object.getOwnPropertySymbols,Ze=ue?ue.isBuffer:void 0,Bt=Ie(Object.keys,Object),_=Eo(j,"DataView"),re=Eo(j,"Map"),ce=Eo(j,"Promise"),Se=Eo(j,"Set"),je=Eo(j,"WeakMap"),He=Eo(Object,"create"),Zt=nn(_),Dn=nn(re),Pi=nn(ce),Oo=nn(Se),Li=nn(je),bn=pe?pe.prototype:void 0,$a=bn?bn.valueOf:void 0;function Mn(I){var Y=-1,le=I?I.length:0;for(this.clear();++Y<le;){var ye=I[Y];this.set(ye[0],ye[1])}}function Es(){this.__data__=He?He(null):{}}function Ra(I){return this.has(I)&&delete this.__data__[I]}function Ns(I){var Y=this.__data__;if(He){var le=Y[I];return le===n?void 0:le}return K.call(Y,I)?Y[I]:void 0}function Pa(I){var Y=this.__data__;return He?Y[I]!==void 0:K.call(Y,I)}function zi(I,Y){var le=this.__data__;return le[I]=He&&Y===void 0?n:Y,this}Mn.prototype.clear=Es,Mn.prototype.delete=Ra,Mn.prototype.get=Ns,Mn.prototype.has=Pa,Mn.prototype.set=zi;function ur(I){var Y=-1,le=I?I.length:0;for(this.clear();++Y<le;){var ye=I[Y];this.set(ye[0],ye[1])}}function he(){this.__data__=[]}function Re(I){var Y=this.__data__,le=za(Y,I);if(le<0)return!1;var ye=Y.length-1;return le==ye?Y.pop():qe.call(Y,le,1),!0}function mt(I){var Y=this.__data__,le=za(Y,I);return le<0?void 0:Y[le][1]}function It(I){return za(this.__data__,I)>-1}function yn(I,Y){var le=this.__data__,ye=za(le,I);return ye<0?le.push([I,Y]):le[ye][1]=Y,this}ur.prototype.clear=he,ur.prototype.delete=Re,ur.prototype.get=mt,ur.prototype.has=It,ur.prototype.set=yn;function er(I){var Y=-1,le=I?I.length:0;for(this.clear();++Y<le;){var ye=I[Y];this.set(ye[0],ye[1])}}function Xo(){this.__data__={hash:new Mn,map:new(re||ur),string:new Mn}}function Tn(I){return As(this,I).delete(I)}function Hr(I){return As(this,I).get(I)}function La(I){return As(this,I).has(I)}function sd(I,Y){return As(this,I).set(I,Y),this}er.prototype.clear=Xo,er.prototype.delete=Tn,er.prototype.get=Hr,er.prototype.has=La,er.prototype.set=sd;function Wr(I){this.__data__=new ur(I)}function ld(){this.__data__=new ur}function Ui(I){return this.__data__.delete(I)}function Dt(I){return this.__data__.get(I)}function Nr(I){return this.__data__.has(I)}function ud(I,Y){var le=this.__data__;if(le instanceof ur){var ye=le.__data__;if(!re||ye.length<r-1)return ye.push([I,Y]),this;le=this.__data__=new er(ye)}return le.set(I,Y),this}Wr.prototype.clear=ld,Wr.prototype.delete=Ui,Wr.prototype.get=Dt,Wr.prototype.has=Nr,Wr.prototype.set=ud;function ko(I,Y){var le=pd(I)||Xl(I)?oe(I.length,String):[],ye=le.length,ht=!!ye;for(var Oe in I)K.call(I,Oe)&&!(ht&&(Oe=="length"||Fb(Oe,ye)))&&le.push(Oe);return le}function ei(I,Y,le){var ye=I[Y];(!(K.call(I,Y)&&mm(ye,le))||le===void 0&&!(Y in I))&&(I[Y]=le)}function za(I,Y){for(var le=I.length;le--;)if(mm(I[le][0],Y))return le;return-1}function ti(I,Y){return I&&fd(Y,hd(Y),I)}function cd(I,Y,le,ye,ht,Oe,_t){var Mt;if(ye&&(Mt=Oe?ye(I,ht,Oe,_t):ye(I)),Mt!==void 0)return Mt;if(!ni(I))return I;var pr=pd(I);if(pr){if(Mt=Mb(I),!Y)return Bb(I,Mt)}else{var Lt=Vi(I),Zr=Lt==d||Lt==f;if(hm(I))return Ol(I,Y);if(Lt==h||Lt==o||Zr&&!Oe){if(de(I))return Oe?I:{};if(Mt=ri(Zr?{}:I),!Y)return Ab(I,ti(Mt,I))}else{if(!W[Lt])return Oe?I:{};Mt=Tb(I,Lt,cd,Y)}}_t||(_t=new Wr);var wn=_t.get(I);if(wn)return wn;if(_t.set(I,Mt),!pr)var br=le?Db(I):hd(I);return G(br||I,function(Gr,$r){br&&($r=Gr,Gr=I[$r]),ei(Mt,$r,cd(Gr,Y,le,ye,$r,I,_t))}),Mt}function yb(I){return ni(I)?Fe(I):{}}function wb(I,Y,le){var ye=Y(I);return pd(I)?ye:O(ye,le(I))}function xb(I){return Q.call(I)}function Cb(I){if(!ni(I)||_b(I))return!1;var Y=md(I)||de(I)?ne:q;return Y.test(nn(I))}function Sb(I){if(!fm(I))return Bt(I);var Y=[];for(var le in Object(I))K.call(I,le)&&le!="constructor"&&Y.push(le);return Y}function Ol(I,Y){if(Y)return I.slice();var le=new I.constructor(I.length);return I.copy(le),le}function dd(I){var Y=new I.constructor(I.byteLength);return new ge(Y).set(new ge(I)),Y}function Bs(I,Y){var le=Y?dd(I.buffer):I.buffer;return new I.constructor(le,I.byteOffset,I.byteLength)}function cm(I,Y,le){var ye=Y?le(ve(I),!0):ve(I);return te(ye,ie,new I.constructor)}function dm(I){var Y=new I.constructor(I.source,P.exec(I));return Y.lastIndex=I.lastIndex,Y}function kb(I,Y,le){var ye=Y?le($e(I),!0):$e(I);return te(ye,V,new I.constructor)}function Eb(I){return $a?Object($a.call(I)):{}}function Nb(I,Y){var le=Y?dd(I.buffer):I.buffer;return new I.constructor(le,I.byteOffset,I.length)}function Bb(I,Y){var le=-1,ye=I.length;for(Y||(Y=Array(ye));++le<ye;)Y[le]=I[le];return Y}function fd(I,Y,le,ye){le||(le={});for(var ht=-1,Oe=Y.length;++ht<Oe;){var _t=Y[ht],Mt=void 0;ei(le,_t,Mt===void 0?I[_t]:Mt)}return le}function Ab(I,Y){return fd(I,qi(I),Y)}function Db(I){return wb(I,hd,qi)}function As(I,Y){var le=I.__data__;return Ib(Y)?le[typeof Y=="string"?"string":"hash"]:le.map}function Eo(I,Y){var le=fe(I,Y);return Cb(le)?le:void 0}var qi=Xe?Ie(Xe,Object):Rb,Vi=xb;(_&&Vi(new _(new ArrayBuffer(1)))!=C||re&&Vi(new re)!=p||ce&&Vi(ce.resolve())!=g||Se&&Vi(new Se)!=b||je&&Vi(new je)!=x)&&(Vi=function(I){var Y=Q.call(I),le=Y==h?I.constructor:void 0,ye=le?nn(le):void 0;if(ye)switch(ye){case Zt:return C;case Dn:return p;case Pi:return g;case Oo:return b;case Li:return x}return Y});function Mb(I){var Y=I.length,le=I.constructor(Y);return Y&&typeof I[0]=="string"&&K.call(I,"index")&&(le.index=I.index,le.input=I.input),le}function ri(I){return typeof I.constructor=="function"&&!fm(I)?yb(we(I)):{}}function Tb(I,Y,le,ye){var ht=I.constructor;switch(Y){case S:return dd(I);case l:case c:return new ht(+I);case C:return Bs(I,ye);case E:case B:case N:case D:case k:case M:case T:case R:case F:return Nb(I,ye);case p:return cm(I,ye,le);case m:case w:return new ht(I);case v:return dm(I);case b:return kb(I,ye,le);case y:return Eb(I)}}function Fb(I,Y){return Y=Y??i,!!Y&&(typeof I=="number"||z.test(I))&&I>-1&&I%1==0&&I<Y}function Ib(I){var Y=typeof I;return Y=="string"||Y=="number"||Y=="symbol"||Y=="boolean"?I!=="__proto__":I===null}function _b(I){return!!ee&&ee in I}function fm(I){var Y=I&&I.constructor,le=typeof Y=="function"&&Y.prototype||Z;return I===le}function nn(I){if(I!=null){try{return U.call(I)}catch{}try{return I+""}catch{}}return""}function pm(I){return cd(I,!0,!0)}function mm(I,Y){return I===Y||I!==I&&Y!==Y}function Xl(I){return $b(I)&&K.call(I,"callee")&&(!be.call(I,"callee")||Q.call(I)==o)}var pd=Array.isArray;function eu(I){return I!=null&&gm(I.length)&&!md(I)}function $b(I){return vm(I)&&eu(I)}var hm=Ze||Pb;function md(I){var Y=ni(I)?Q.call(I):"";return Y==d||Y==f}function gm(I){return typeof I=="number"&&I>-1&&I%1==0&&I<=i}function ni(I){var Y=typeof I;return!!I&&(Y=="object"||Y=="function")}function vm(I){return!!I&&typeof I=="object"}function hd(I){return eu(I)?ko(I):Sb(I)}function Rb(){return[]}function Pb(){return!1}e.exports=pm}(Kp,Kp.exports)),Kp.exports}var Yp={exports:{}};Yp.exports;var b6;function y6(){return b6||(b6=1,function(e,t){var r=200,n="__lodash_hash_undefined__",i=1,o=2,s=9007199254740991,l="[object Arguments]",c="[object Array]",u="[object AsyncFunction]",d="[object Boolean]",f="[object Date]",p="[object Error]",m="[object Function]",h="[object GeneratorFunction]",g="[object Map]",v="[object Number]",b="[object Null]",w="[object Object]",y="[object Promise]",x="[object Proxy]",S="[object RegExp]",C="[object Set]",E="[object String]",B="[object Symbol]",N="[object Undefined]",D="[object WeakMap]",k="[object ArrayBuffer]",M="[object DataView]",T="[object Float32Array]",R="[object Float64Array]",F="[object Int8Array]",A="[object Int16Array]",P="[object Int32Array]",q="[object Uint8Array]",z="[object Uint8ClampedArray]",W="[object Uint16Array]",X="[object Uint32Array]",$=/[\\^$.*+?()[\]{}|]/g,j=/^\[object .+?Constructor\]$/,L=/^(?:0|[1-9]\d*)$/,ae={};ae[T]=ae[R]=ae[F]=ae[A]=ae[P]=ae[q]=ae[z]=ae[W]=ae[X]=!0,ae[l]=ae[c]=ae[k]=ae[d]=ae[M]=ae[f]=ae[p]=ae[m]=ae[g]=ae[v]=ae[w]=ae[S]=ae[C]=ae[E]=ae[D]=!1;var se=typeof Ea=="object"&&Ea&&Ea.Object===Object&&Ea,ie=typeof self=="object"&&self&&self.Object===Object&&self,V=se||ie||Function("return this")(),G=t&&!t.nodeType&&t,O=G&&!0&&e&&!e.nodeType&&e,te=O&&O.exports===G,oe=te&&se.process,fe=function(){try{return oe&&oe.binding&&oe.binding("util")}catch{}}(),de=fe&&fe.isTypedArray;function ve(I,Y){for(var le=-1,ye=I==null?0:I.length,ht=0,Oe=[];++le<ye;){var _t=I[le];Y(_t,le,I)&&(Oe[ht++]=_t)}return Oe}function Ie(I,Y){for(var le=-1,ye=Y.length,ht=I.length;++le<ye;)I[ht+le]=Y[le];return I}function $e(I,Y){for(var le=-1,ye=I==null?0:I.length;++le<ye;)if(Y(I[le],le,I))return!0;return!1}function Te(I,Y){for(var le=-1,ye=Array(I);++le<I;)ye[le]=Y(le);return ye}function Le(I){return function(Y){return I(Y)}}function Z(I,Y){return I.has(Y)}function J(I,Y){return I==null?void 0:I[Y]}function ee(I){var Y=-1,le=Array(I.size);return I.forEach(function(ye,ht){le[++Y]=[ht,ye]}),le}function U(I,Y){return function(le){return I(Y(le))}}function K(I){var Y=-1,le=Array(I.size);return I.forEach(function(ye){le[++Y]=ye}),le}var Q=Array.prototype,ne=Function.prototype,ue=Object.prototype,pe=V["__core-js_shared__"],ge=ne.toString,we=ue.hasOwnProperty,Fe=function(){var I=/[^.]+$/.exec(pe&&pe.keys&&pe.keys.IE_PROTO||"");return I?"Symbol(src)_1."+I:""}(),be=ue.toString,qe=RegExp("^"+ge.call(we).replace($,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Xe=te?V.Buffer:void 0,Ze=V.Symbol,Bt=V.Uint8Array,_=ue.propertyIsEnumerable,re=Q.splice,ce=Ze?Ze.toStringTag:void 0,Se=Object.getOwnPropertySymbols,je=Xe?Xe.isBuffer:void 0,He=U(Object.keys,Object),Zt=qi(V,"DataView"),Dn=qi(V,"Map"),Pi=qi(V,"Promise"),Oo=qi(V,"Set"),Li=qi(V,"WeakMap"),bn=qi(Object,"create"),$a=nn(Zt),Mn=nn(Dn),Es=nn(Pi),Ra=nn(Oo),Ns=nn(Li),Pa=Ze?Ze.prototype:void 0,zi=Pa?Pa.valueOf:void 0;function ur(I){var Y=-1,le=I==null?0:I.length;for(this.clear();++Y<le;){var ye=I[Y];this.set(ye[0],ye[1])}}function he(){this.__data__=bn?bn(null):{},this.size=0}function Re(I){var Y=this.has(I)&&delete this.__data__[I];return this.size-=Y?1:0,Y}function mt(I){var Y=this.__data__;if(bn){var le=Y[I];return le===n?void 0:le}return we.call(Y,I)?Y[I]:void 0}function It(I){var Y=this.__data__;return bn?Y[I]!==void 0:we.call(Y,I)}function yn(I,Y){var le=this.__data__;return this.size+=this.has(I)?0:1,le[I]=bn&&Y===void 0?n:Y,this}ur.prototype.clear=he,ur.prototype.delete=Re,ur.prototype.get=mt,ur.prototype.has=It,ur.prototype.set=yn;function er(I){var Y=-1,le=I==null?0:I.length;for(this.clear();++Y<le;){var ye=I[Y];this.set(ye[0],ye[1])}}function Xo(){this.__data__=[],this.size=0}function Tn(I){var Y=this.__data__,le=Ol(Y,I);if(le<0)return!1;var ye=Y.length-1;return le==ye?Y.pop():re.call(Y,le,1),--this.size,!0}function Hr(I){var Y=this.__data__,le=Ol(Y,I);return le<0?void 0:Y[le][1]}function La(I){return Ol(this.__data__,I)>-1}function sd(I,Y){var le=this.__data__,ye=Ol(le,I);return ye<0?(++this.size,le.push([I,Y])):le[ye][1]=Y,this}er.prototype.clear=Xo,er.prototype.delete=Tn,er.prototype.get=Hr,er.prototype.has=La,er.prototype.set=sd;function Wr(I){var Y=-1,le=I==null?0:I.length;for(this.clear();++Y<le;){var ye=I[Y];this.set(ye[0],ye[1])}}function ld(){this.size=0,this.__data__={hash:new ur,map:new(Dn||er),string:new ur}}function Ui(I){var Y=Eo(this,I).delete(I);return this.size-=Y?1:0,Y}function Dt(I){return Eo(this,I).get(I)}function Nr(I){return Eo(this,I).has(I)}function ud(I,Y){var le=Eo(this,I),ye=le.size;return le.set(I,Y),this.size+=le.size==ye?0:1,this}Wr.prototype.clear=ld,Wr.prototype.delete=Ui,Wr.prototype.get=Dt,Wr.prototype.has=Nr,Wr.prototype.set=ud;function ko(I){var Y=-1,le=I==null?0:I.length;for(this.__data__=new Wr;++Y<le;)this.add(I[Y])}function ei(I){return this.__data__.set(I,n),this}function za(I){return this.__data__.has(I)}ko.prototype.add=ko.prototype.push=ei,ko.prototype.has=za;function ti(I){var Y=this.__data__=new er(I);this.size=Y.size}function cd(){this.__data__=new er,this.size=0}function yb(I){var Y=this.__data__,le=Y.delete(I);return this.size=Y.size,le}function wb(I){return this.__data__.get(I)}function xb(I){return this.__data__.has(I)}function Cb(I,Y){var le=this.__data__;if(le instanceof er){var ye=le.__data__;if(!Dn||ye.length<r-1)return ye.push([I,Y]),this.size=++le.size,this;le=this.__data__=new Wr(ye)}return le.set(I,Y),this.size=le.size,this}ti.prototype.clear=cd,ti.prototype.delete=yb,ti.prototype.get=wb,ti.prototype.has=xb,ti.prototype.set=Cb;function Sb(I,Y){var le=Xl(I),ye=!le&&mm(I),ht=!le&&!ye&&eu(I),Oe=!le&&!ye&&!ht&&vm(I),_t=le||ye||ht||Oe,Mt=_t?Te(I.length,String):[],pr=Mt.length;for(var Lt in I)we.call(I,Lt)&&!(_t&&(Lt=="length"||ht&&(Lt=="offset"||Lt=="parent")||Oe&&(Lt=="buffer"||Lt=="byteLength"||Lt=="byteOffset")||Tb(Lt,pr)))&&Mt.push(Lt);return Mt}function Ol(I,Y){for(var le=I.length;le--;)if(pm(I[le][0],Y))return le;return-1}function dd(I,Y,le){var ye=Y(I);return Xl(I)?ye:Ie(ye,le(I))}function Bs(I){return I==null?I===void 0?N:b:ce&&ce in Object(I)?Vi(I):fm(I)}function cm(I){return ni(I)&&Bs(I)==l}function dm(I,Y,le,ye,ht){return I===Y?!0:I==null||Y==null||!ni(I)&&!ni(Y)?I!==I&&Y!==Y:kb(I,Y,le,ye,dm,ht)}function kb(I,Y,le,ye,ht,Oe){var _t=Xl(I),Mt=Xl(Y),pr=_t?c:ri(I),Lt=Mt?c:ri(Y);pr=pr==l?w:pr,Lt=Lt==l?w:Lt;var Zr=pr==w,wn=Lt==w,br=pr==Lt;if(br&&eu(I)){if(!eu(Y))return!1;_t=!0,Zr=!1}if(br&&!Zr)return Oe||(Oe=new ti),_t||vm(I)?fd(I,Y,le,ye,ht,Oe):Ab(I,Y,pr,le,ye,ht,Oe);if(!(le&i)){var Gr=Zr&&we.call(I,"__wrapped__"),$r=wn&&we.call(Y,"__wrapped__");if(Gr||$r){var Ua=Gr?I.value():I,ji=$r?Y.value():Y;return Oe||(Oe=new ti),ht(Ua,ji,le,ye,Oe)}}return br?(Oe||(Oe=new ti),Db(I,Y,le,ye,ht,Oe)):!1}function Eb(I){if(!gm(I)||Ib(I))return!1;var Y=hm(I)?qe:j;return Y.test(nn(I))}function Nb(I){return ni(I)&&md(I.length)&&!!ae[Bs(I)]}function Bb(I){if(!_b(I))return He(I);var Y=[];for(var le in Object(I))we.call(I,le)&&le!="constructor"&&Y.push(le);return Y}function fd(I,Y,le,ye,ht,Oe){var _t=le&i,Mt=I.length,pr=Y.length;if(Mt!=pr&&!(_t&&pr>Mt))return!1;var Lt=Oe.get(I);if(Lt&&Oe.get(Y))return Lt==Y;var Zr=-1,wn=!0,br=le&o?new ko:void 0;for(Oe.set(I,Y),Oe.set(Y,I);++Zr<Mt;){var Gr=I[Zr],$r=Y[Zr];if(ye)var Ua=_t?ye($r,Gr,Zr,Y,I,Oe):ye(Gr,$r,Zr,I,Y,Oe);if(Ua!==void 0){if(Ua)continue;wn=!1;break}if(br){if(!$e(Y,function(ji,Ds){if(!Z(br,Ds)&&(Gr===ji||ht(Gr,ji,le,ye,Oe)))return br.push(Ds)})){wn=!1;break}}else if(!(Gr===$r||ht(Gr,$r,le,ye,Oe))){wn=!1;break}}return Oe.delete(I),Oe.delete(Y),wn}function Ab(I,Y,le,ye,ht,Oe,_t){switch(le){case M:if(I.byteLength!=Y.byteLength||I.byteOffset!=Y.byteOffset)return!1;I=I.buffer,Y=Y.buffer;case k:return!(I.byteLength!=Y.byteLength||!Oe(new Bt(I),new Bt(Y)));case d:case f:case v:return pm(+I,+Y);case p:return I.name==Y.name&&I.message==Y.message;case S:case E:return I==Y+"";case g:var Mt=ee;case C:var pr=ye&i;if(Mt||(Mt=K),I.size!=Y.size&&!pr)return!1;var Lt=_t.get(I);if(Lt)return Lt==Y;ye|=o,_t.set(I,Y);var Zr=fd(Mt(I),Mt(Y),ye,ht,Oe,_t);return _t.delete(I),Zr;case B:if(zi)return zi.call(I)==zi.call(Y)}return!1}function Db(I,Y,le,ye,ht,Oe){var _t=le&i,Mt=As(I),pr=Mt.length,Lt=As(Y),Zr=Lt.length;if(pr!=Zr&&!_t)return!1;for(var wn=pr;wn--;){var br=Mt[wn];if(!(_t?br in Y:we.call(Y,br)))return!1}var Gr=Oe.get(I);if(Gr&&Oe.get(Y))return Gr==Y;var $r=!0;Oe.set(I,Y),Oe.set(Y,I);for(var Ua=_t;++wn<pr;){br=Mt[wn];var ji=I[br],Ds=Y[br];if(ye)var CA=_t?ye(Ds,ji,br,Y,I,Oe):ye(ji,Ds,br,I,Y,Oe);if(!(CA===void 0?ji===Ds||ht(ji,Ds,le,ye,Oe):CA)){$r=!1;break}Ua||(Ua=br=="constructor")}if($r&&!Ua){var bm=I.constructor,ym=Y.constructor;bm!=ym&&"constructor"in I&&"constructor"in Y&&!(typeof bm=="function"&&bm instanceof bm&&typeof ym=="function"&&ym instanceof ym)&&($r=!1)}return Oe.delete(I),Oe.delete(Y),$r}function As(I){return dd(I,hd,Mb)}function Eo(I,Y){var le=I.__data__;return Fb(Y)?le[typeof Y=="string"?"string":"hash"]:le.map}function qi(I,Y){var le=J(I,Y);return Eb(le)?le:void 0}function Vi(I){var Y=we.call(I,ce),le=I[ce];try{I[ce]=void 0;var ye=!0}catch{}var ht=be.call(I);return ye&&(Y?I[ce]=le:delete I[ce]),ht}var Mb=Se?function(I){return I==null?[]:(I=Object(I),ve(Se(I),function(Y){return _.call(I,Y)}))}:Rb,ri=Bs;(Zt&&ri(new Zt(new ArrayBuffer(1)))!=M||Dn&&ri(new Dn)!=g||Pi&&ri(Pi.resolve())!=y||Oo&&ri(new Oo)!=C||Li&&ri(new Li)!=D)&&(ri=function(I){var Y=Bs(I),le=Y==w?I.constructor:void 0,ye=le?nn(le):"";if(ye)switch(ye){case $a:return M;case Mn:return g;case Es:return y;case Ra:return C;case Ns:return D}return Y});function Tb(I,Y){return Y=Y??s,!!Y&&(typeof I=="number"||L.test(I))&&I>-1&&I%1==0&&I<Y}function Fb(I){var Y=typeof I;return Y=="string"||Y=="number"||Y=="symbol"||Y=="boolean"?I!=="__proto__":I===null}function Ib(I){return!!Fe&&Fe in I}function _b(I){var Y=I&&I.constructor,le=typeof Y=="function"&&Y.prototype||ue;return I===le}function fm(I){return be.call(I)}function nn(I){if(I!=null){try{return ge.call(I)}catch{}try{return I+""}catch{}}return""}function pm(I,Y){return I===Y||I!==I&&Y!==Y}var mm=cm(function(){return arguments}())?cm:function(I){return ni(I)&&we.call(I,"callee")&&!_.call(I,"callee")},Xl=Array.isArray;function pd(I){return I!=null&&md(I.length)&&!hm(I)}var eu=je||Pb;function $b(I,Y){return dm(I,Y)}function hm(I){if(!gm(I))return!1;var Y=Bs(I);return Y==m||Y==h||Y==u||Y==x}function md(I){return typeof I=="number"&&I>-1&&I%1==0&&I<=s}function gm(I){var Y=typeof I;return I!=null&&(Y=="object"||Y=="function")}function ni(I){return I!=null&&typeof I=="object"}var vm=de?Le(de):Nb;function hd(I){return pd(I)?Sb(I):Bb(I)}function Rb(){return[]}function Pb(){return!1}e.exports=$b}(Yp,Yp.exports)),Yp.exports}var Jp={},w6;function n4e(){if(w6)return Jp;w6=1,Object.defineProperty(Jp,"__esModule",{value:!0});const e=v6(),t=y6();var r;return function(n){function i(c={},u={},d=!1){typeof c!="object"&&(c={}),typeof u!="object"&&(u={});let f=e(u);d||(f=Object.keys(f).reduce((p,m)=>(f[m]!=null&&(p[m]=f[m]),p),{}));for(const p in c)c[p]!==void 0&&u[p]===void 0&&(f[p]=c[p]);return Object.keys(f).length>0?f:void 0}n.compose=i;function o(c={},u={}){typeof c!="object"&&(c={}),typeof u!="object"&&(u={});const d=Object.keys(c).concat(Object.keys(u)).reduce((f,p)=>(t(c[p],u[p])||(f[p]=u[p]===void 0?null:u[p]),f),{});return Object.keys(d).length>0?d:void 0}n.diff=o;function s(c={},u={}){c=c||{};const d=Object.keys(u).reduce((f,p)=>(u[p]!==c[p]&&c[p]!==void 0&&(f[p]=u[p]),f),{});return Object.keys(c).reduce((f,p)=>(c[p]!==u[p]&&u[p]===void 0&&(f[p]=null),f),d)}n.invert=s;function l(c,u,d=!1){if(typeof c!="object")return u;if(typeof u!="object")return;if(!d)return u;const f=Object.keys(u).reduce((p,m)=>(c[m]===void 0&&(p[m]=u[m]),p),{});return Object.keys(f).length>0?f:void 0}n.transform=l}(r||(r={})),Jp.default=r,Jp}var Op={},x6;function C6(){if(x6)return Op;x6=1,Object.defineProperty(Op,"__esModule",{value:!0});var e;return function(t){function r(n){return typeof n.delete=="number"?n.delete:typeof n.retain=="number"?n.retain:typeof n.retain=="object"&&n.retain!==null?1:typeof n.insert=="string"?n.insert.length:1}t.length=r}(e||(e={})),Op.default=e,Op}var Xp={},S6;function o4e(){if(S6)return Xp;S6=1,Object.defineProperty(Xp,"__esModule",{value:!0});const e=C6();class t{constructor(n){this.ops=n,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(n){n||(n=1/0);const i=this.ops[this.index];if(i){const o=this.offset,s=e.default.length(i);if(n>=s-o?(n=s-o,this.index+=1,this.offset=0):this.offset+=n,typeof i.delete=="number")return{delete:n};{const l={};return i.attributes&&(l.attributes=i.attributes),typeof i.retain=="number"?l.retain=n:typeof i.retain=="object"&&i.retain!==null?l.retain=i.retain:typeof i.insert=="string"?l.insert=i.insert.substr(o,n):l.insert=i.insert,l}}else return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?e.default.length(this.ops[this.index])-this.offset:1/0}peekType(){const n=this.ops[this.index];return n?typeof n.delete=="number"?"delete":typeof n.retain=="number"||typeof n.retain=="object"&&n.retain!==null?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);{const n=this.offset,i=this.index,o=this.next(),s=this.ops.slice(this.index);return this.offset=n,this.index=i,[o].concat(s)}}else return[]}}return Xp.default=t,Xp}var k6;function i4e(){return k6||(k6=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeMap=t.OpIterator=t.Op=void 0;const r=r4e(),n=v6(),i=y6(),o=n4e();t.AttributeMap=o.default;const s=C6();t.Op=s.default;const l=o4e();t.OpIterator=l.default;const c="\0",u=(f,p)=>{if(typeof f!="object"||f===null)throw new Error(`cannot retain a ${typeof f}`);if(typeof p!="object"||p===null)throw new Error(`cannot retain a ${typeof p}`);const m=Object.keys(f)[0];if(!m||m!==Object.keys(p)[0])throw new Error(`embed types not matched: ${m} != ${Object.keys(p)[0]}`);return[m,f[m],p[m]]};class d{constructor(p){Array.isArray(p)?this.ops=p:p!=null&&Array.isArray(p.ops)?this.ops=p.ops:this.ops=[]}static registerEmbed(p,m){this.handlers[p]=m}static unregisterEmbed(p){delete this.handlers[p]}static getHandler(p){const m=this.handlers[p];if(!m)throw new Error(`no handlers for embed type "${p}"`);return m}insert(p,m){const h={};return typeof p=="string"&&p.length===0?this:(h.insert=p,m!=null&&typeof m=="object"&&Object.keys(m).length>0&&(h.attributes=m),this.push(h))}delete(p){return p<=0?this:this.push({delete:p})}retain(p,m){if(typeof p=="number"&&p<=0)return this;const h={retain:p};return m!=null&&typeof m=="object"&&Object.keys(m).length>0&&(h.attributes=m),this.push(h)}push(p){let m=this.ops.length,h=this.ops[m-1];if(p=n(p),typeof h=="object"){if(typeof p.delete=="number"&&typeof h.delete=="number")return this.ops[m-1]={delete:h.delete+p.delete},this;if(typeof h.delete=="number"&&p.insert!=null&&(m-=1,h=this.ops[m-1],typeof h!="object"))return this.ops.unshift(p),this;if(i(p.attributes,h.attributes)){if(typeof p.insert=="string"&&typeof h.insert=="string")return this.ops[m-1]={insert:h.insert+p.insert},typeof p.attributes=="object"&&(this.ops[m-1].attributes=p.attributes),this;if(typeof p.retain=="number"&&typeof h.retain=="number")return this.ops[m-1]={retain:h.retain+p.retain},typeof p.attributes=="object"&&(this.ops[m-1].attributes=p.attributes),this}}return m===this.ops.length?this.ops.push(p):this.ops.splice(m,0,p),this}chop(){const p=this.ops[this.ops.length-1];return p&&typeof p.retain=="number"&&!p.attributes&&this.ops.pop(),this}filter(p){return this.ops.filter(p)}forEach(p){this.ops.forEach(p)}map(p){return this.ops.map(p)}partition(p){const m=[],h=[];return this.forEach(g=>{(p(g)?m:h).push(g)}),[m,h]}reduce(p,m){return this.ops.reduce(p,m)}changeLength(){return this.reduce((p,m)=>m.insert?p+s.default.length(m):m.delete?p-m.delete:p,0)}length(){return this.reduce((p,m)=>p+s.default.length(m),0)}slice(p=0,m=1/0){const h=[],g=new l.default(this.ops);let v=0;for(;v<m&&g.hasNext();){let b;v<p?b=g.next(p-v):(b=g.next(m-v),h.push(b)),v+=s.default.length(b)}return new d(h)}compose(p){const m=new l.default(this.ops),h=new l.default(p.ops),g=[],v=h.peek();if(v!=null&&typeof v.retain=="number"&&v.attributes==null){let w=v.retain;for(;m.peekType()==="insert"&&m.peekLength()<=w;)w-=m.peekLength(),g.push(m.next());v.retain-w>0&&h.next(v.retain-w)}const b=new d(g);for(;m.hasNext()||h.hasNext();)if(h.peekType()==="insert")b.push(h.next());else if(m.peekType()==="delete")b.push(m.next());else{const w=Math.min(m.peekLength(),h.peekLength()),y=m.next(w),x=h.next(w);if(x.retain){const S={};if(typeof y.retain=="number")S.retain=typeof x.retain=="number"?w:x.retain;else if(typeof x.retain=="number")y.retain==null?S.insert=y.insert:S.retain=y.retain;else{const E=y.retain==null?"insert":"retain",[B,N,D]=u(y[E],x.retain),k=d.getHandler(B);S[E]={[B]:k.compose(N,D,E==="retain")}}const C=o.default.compose(y.attributes,x.attributes,typeof y.retain=="number");if(C&&(S.attributes=C),b.push(S),!h.hasNext()&&i(b.ops[b.ops.length-1],S)){const E=new d(m.rest());return b.concat(E).chop()}}else typeof x.delete=="number"&&(typeof y.retain=="number"||typeof y.retain=="object"&&y.retain!==null)&&b.push(x)}return b.chop()}concat(p){const m=new d(this.ops.slice());return p.ops.length>0&&(m.push(p.ops[0]),m.ops=m.ops.concat(p.ops.slice(1))),m}diff(p,m){if(this.ops===p.ops)return new d;const h=[this,p].map(y=>y.map(x=>{if(x.insert!=null)return typeof x.insert=="string"?x.insert:c;const S=y===p?"on":"with";throw new Error("diff() called "+S+" non-document")}).join("")),g=new d,v=r(h[0],h[1],m,!0),b=new l.default(this.ops),w=new l.default(p.ops);return v.forEach(y=>{let x=y[1].length;for(;x>0;){let S=0;switch(y[0]){case r.INSERT:S=Math.min(w.peekLength(),x),g.push(w.next(S));break;case r.DELETE:S=Math.min(x,b.peekLength()),b.next(S),g.delete(S);break;case r.EQUAL:S=Math.min(b.peekLength(),w.peekLength(),x);const C=b.next(S),E=w.next(S);i(C.insert,E.insert)?g.retain(S,o.default.diff(C.attributes,E.attributes)):g.push(E).delete(S);break}x-=S}}),g.chop()}eachLine(p,m=`
5178
5178
  `){const h=new l.default(this.ops);let g=new d,v=0;for(;h.hasNext();){if(h.peekType()!=="insert")return;const b=h.peek(),w=s.default.length(b)-h.peekLength(),y=typeof b.insert=="string"?b.insert.indexOf(m,w)-w:-1;if(y<0)g.push(h.next());else if(y>0)g.push(h.next(y));else{if(p(g,h.next(1).attributes||{},v)===!1)return;v+=1,g=new d}}g.length()>0&&p(g,{},v)}invert(p){const m=new d;return this.reduce((h,g)=>{if(g.insert)m.delete(s.default.length(g));else{if(typeof g.retain=="number"&&g.attributes==null)return m.retain(g.retain),h+g.retain;if(g.delete||typeof g.retain=="number"){const v=g.delete||g.retain;return p.slice(h,h+v).forEach(b=>{g.delete?m.push(b):g.retain&&g.attributes&&m.retain(s.default.length(b),o.default.invert(g.attributes,b.attributes))}),h+v}else if(typeof g.retain=="object"&&g.retain!==null){const v=p.slice(h,h+1),b=new l.default(v.ops).next(),[w,y,x]=u(g.retain,b.insert),S=d.getHandler(w);return m.retain({[w]:S.invert(y,x)},o.default.invert(g.attributes,b.attributes)),h+1}}return h},0),m.chop()}transform(p,m=!1){if(m=!!m,typeof p=="number")return this.transformPosition(p,m);const h=p,g=new l.default(this.ops),v=new l.default(h.ops),b=new d;for(;g.hasNext()||v.hasNext();)if(g.peekType()==="insert"&&(m||v.peekType()!=="insert"))b.retain(s.default.length(g.next()));else if(v.peekType()==="insert")b.push(v.next());else{const w=Math.min(g.peekLength(),v.peekLength()),y=g.next(w),x=v.next(w);if(y.delete)continue;if(x.delete)b.push(x);else{const S=y.retain,C=x.retain;let E=typeof C=="object"&&C!==null?C:w;if(typeof S=="object"&&S!==null&&typeof C=="object"&&C!==null){const B=Object.keys(S)[0];if(B===Object.keys(C)[0]){const N=d.getHandler(B);N&&(E={[B]:N.transform(S[B],C[B],m)})}}b.retain(E,o.default.transform(y.attributes,x.attributes,m))}}return b.chop()}transformPosition(p,m=!1){m=!!m;const h=new l.default(this.ops);let g=0;for(;h.hasNext()&&g<=p;){const v=h.peekLength(),b=h.peekType();if(h.next(),b==="delete"){p-=Math.min(v,p-g);continue}else b==="insert"&&(g<p||!m)&&(p+=v);g+=v}return p}}d.Op=s.default,d.OpIterator=l.default,d.AttributeMap=o.default,d.handlers={},t.default=d,e.exports=d,e.exports.default=d}(V0,V0.exports)),V0.exports}var rn=i4e();const Qe=dB(rn);class yo extends An{static value(){}optimize(){(this.prev||this.next)&&this.remove()}length(){return 0}value(){return""}}yo.blotName="break",yo.tagName="BR";let wo=class extends Gp{};const a4e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function em(e){return e.replace(/[&<>"']/g,t=>a4e[t])}const Jo=class Jo extends L0{static compare(t,r){const n=Jo.order.indexOf(t),i=Jo.order.indexOf(r);return n>=0||i>=0?n-i:t===r?0:t<r?-1:1}formatAt(t,r,n,i){if(Jo.compare(this.statics.blotName,n)<0&&this.scroll.query(n,We.BLOT)){const o=this.isolate(t,r);i&&o.wrap(n,i)}else super.formatAt(t,r,n,i)}optimize(t){if(super.optimize(t),this.parent instanceof Jo&&Jo.compare(this.statics.blotName,this.parent.statics.blotName)>0){const r=this.parent.isolate(this.offset(),this.length());this.moveChildren(r),r.wrap(this)}}};_e(Jo,"allowedChildren",[Jo,yo,An,wo]),_e(Jo,"order",["cursor","inline","link","underline","strike","italic","bold","script","code"]);let Ko=Jo;const E6=1;class _r extends Gc{constructor(){super(...arguments);_e(this,"cache",{})}delta(){return this.cache.delta==null&&(this.cache.delta=N6(this)),this.cache.delta}deleteAt(r,n){super.deleteAt(r,n),this.cache={}}formatAt(r,n,i,o){n<=0||(this.scroll.query(i,We.BLOCK)?r+n===this.length()&&this.format(i,o):super.formatAt(r,Math.min(n,this.length()-r-1),i,o),this.cache={})}insertAt(r,n,i){if(i!=null){super.insertAt(r,n,i),this.cache={};return}if(n.length===0)return;const o=n.split(`
5179
5179
  `),s=o.shift();s.length>0&&(r<this.length()-1||this.children.tail==null?super.insertAt(Math.min(r,this.length()-1),s):this.children.tail.insertAt(this.children.tail.length(),s),this.cache={});let l=this;o.reduce((c,u)=>(l=l.split(c,!0),l.insertAt(0,u),u.length),r+s.length)}insertBefore(r,n){const{head:i}=this.children;super.insertBefore(r,n),i instanceof yo&&i.remove(),this.cache={}}length(){return this.cache.length==null&&(this.cache.length=super.length()+E6),this.cache.length}moveChildren(r,n){super.moveChildren(r,n),this.cache={}}optimize(r){super.optimize(r),this.cache={}}path(r){return super.path(r,!0)}removeChild(r){super.removeChild(r),this.cache={}}split(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(n&&(r===0||r>=this.length()-E6)){const o=this.clone();return r===0?(this.parent.insertBefore(o,this),this):(this.parent.insertBefore(o,this.next),o)}const i=super.split(r,n);return this.cache={},i}}_r.blotName="block",_r.tagName="P",_r.defaultChild=yo,_r.allowedChildren=[yo,Ko,An,wo];class Zn extends An{attach(){super.attach(),this.attributes=new Wp(this.domNode)}delta(){return new Qe().insert(this.value(),{...this.formats(),...this.attributes.values()})}format(t,r){const n=this.scroll.query(t,We.BLOCK_ATTRIBUTE);n!=null&&this.attributes.attribute(n,r)}formatAt(t,r,n,i){this.format(n,i)}insertAt(t,r,n){if(n!=null){super.insertAt(t,r,n);return}const i=r.split(`
5180
5180
  `),o=i.pop(),s=i.map(c=>{const u=this.scroll.create(_r.blotName);return u.insertAt(0,c),u}),l=this.split(t);s.forEach(c=>{this.parent.insertBefore(c,l)}),o&&this.parent.insertBefore(this.scroll.create("text",o),l)}}Zn.scope=We.BLOCK_BLOT;function N6(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return e.descendants(jr).reduce((r,n)=>n.length()===0?r:r.insert(n.value(),Gn(n,{},t)),new Qe).insert(`