cft-builder 0.2.220 → 0.2.222

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.
@@ -1,4 +1,4 @@
1
- import { D as s, C as o, E as a, F as d, R as i, T as u, A as B, z as l, B as m } from "./main-DiXiJyyF.js";
1
+ import { D as s, C as o, E as a, F as d, R as i, T as u, A as B, z as l, B as m } from "./main-p8eEu1u7.js";
2
2
  export {
3
3
  s as BuilderItems,
4
4
  o as BuilderItemsRender,
@@ -4368,7 +4368,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
4368
4368
  stroke: #ffa700;
4369
4369
  }
4370
4370
  }
4371
- `,uSe={spinner:function(e){var n=e.props;return{animationDuration:n.animationDuration}}},N5=Bn.extend({defaultProps:{__TYPE:"ProgressSpinner",id:null,style:null,className:null,strokeWidth:"2",fill:"none",animationDuration:"2s",children:void 0},css:{classes:lSe,styles:cSe,inlineStyles:uSe}}),p$=b.memo(b.forwardRef(function(t,e){var n=Yn(),r=b.useContext(ar),i=N5.getProps(t,r),a=b.useRef(null),s=N5.setMetaData({props:i}),l=s.ptm,c=s.cx,u=s.sx,d=s.isUnstyled;li(N5.css.styles,d,{name:"progressspinner"}),b.useImperativeHandle(e,function(){return{props:i,getElement:function(){return a.current}}});var f=n({id:i.id,ref:a,style:i.style,className:ft(i.className,c("root")),role:"progressbar","aria-busy":!0},N5.getOtherProps(i),l("root")),h=n({className:c("spinner"),viewBox:"25 25 50 50",style:u("spinner")},l("spinner")),p=n({className:c("circle"),cx:"50",cy:"50",r:"20",fill:i.fill,strokeWidth:i.strokeWidth,strokeMiterlimit:"10"},l("circle"));return b.createElement("div",f,b.createElement("svg",h,b.createElement("circle",p)))}));p$.displayName="ProgressSpinner";const dSe=()=>{const{renderType:t,componentList:e,sectionsList:n,exam:r}=Yt(),{userSelectedLanguage:i,formBuilderFormLayout:a}=on(),s=4,l=0,c=1,u=2,d=5,f=()=>{const $=t;let le=0;return $===Yd?le=s:$===om?le=d:$===sm||$===I9||$===X1?le=u:$===P0||$===Jh?le=c:$===M0&&(le=l),le},h=F.useRef(),p=r!=null&&r.getPaginatedAssessmentQuestionBankList?r==null?void 0:r.getPaginatedAssessmentQuestionBankList:()=>{},v=r!=null&&r.getPaginatedAssessmentQuestionBankListFromStore?r==null?void 0:r.getPaginatedAssessmentQuestionBankListFromStore:[],m=r!=null&&r.updateQuestionBankStates?r==null?void 0:r.updateQuestionBankStates:()=>{},A=r!=null&&r.assessmentSearchFilterCourseCategoryId?r==null?void 0:r.assessmentSearchFilterCourseCategoryId:null,w=r!=null&&r.assessmentSearchFilterCourseSubjectId?r==null?void 0:r.assessmentSearchFilterCourseSubjectId:null,C=r!=null&&r.AssessmentQuestionBankLoading?r==null?void 0:r.AssessmentQuestionBankLoading:!1,x=r!=null&&r.AssessmentQuestionBankPaginator?r==null?void 0:r.AssessmentQuestionBankPaginator:()=>o.jsx(o.Fragment,{});r!=null&&r.courseCategoryList&&(r==null||r.courseCategoryList);const T=r!=null&&r.getCourseCategoryList?r==null?void 0:r.getCourseCategoryList:()=>{};r!=null&&r.subjectList&&(r==null||r.subjectList);const S=r!=null&&r.getSubjectList?r==null?void 0:r.getSubjectList:()=>{},[E,I]=F.useState([]),[P,N]=F.useState("");F.useEffect(()=>(t===Yd&&(T(),S()),()=>{}),[t]);const k=F.useCallback(()=>{const $=v.map(le=>{var ue;const G=JSON.parse(le.question_meta_data),W=JSON.parse(le.meta_data);return{label:(ue=G==null?void 0:G.questionText)==null?void 0:ue[i==null?void 0:i.type],icon:"pi pi-fw pi-trash",element:"radio",schema:{uuid:tt(),componentType:"question",questionText:G==null?void 0:G.questionText,questionTextImage:W==null?void 0:W.questionImage,answerInputType:G!=null&&G.answerInputType?G==null?void 0:G.answerInputType:"radio",answerOptions:G==null?void 0:G.answerOptions,isHidden:!1,subject_title:le==null?void 0:le.subject_title,course_category_title:le==null?void 0:le.course_category_title,subject_id:le==null?void 0:le.subject_id,course_category_id:le==null?void 0:le.course_category_id,created_by_id:null,date_created:le==null?void 0:le.created_at},subject_title:le==null?void 0:le.subject_title,course_category_title:le==null?void 0:le.course_category_title,uuid:tt(),type:er,componentType:"question"}});I($)},[v,i==null?void 0:i.type]);F.useEffect(()=>{k()},[]);const M=()=>{h.current&&h.current};F.useEffect(()=>(t===Yd&&p(),()=>{}),[t,A,w]);const z=()=>{m({filter:P,page:1,per_page:10,sort:"created_at|desc"})},[O,H]=F.useState(f());return F.useEffect(()=>{H(f())},[t]),o.jsx(o.Fragment,{children:o.jsxs(rs,{activeIndex:O,onTabChange:$=>H($.index),scrollable:!0,children:[t===M0&&o.jsx(wr,{header:"Survey",children:ZG.map(($,le)=>o.jsx(ci,{header:$==null?void 0:$.label,toggleable:!0,style:{marginBottom:10},children:o.jsx("div",{className:"grid scroll-height-300",children:$==null?void 0:$.items.map((G,W)=>o.jsx("div",{className:"xl:col-6 lg:col-12 md:col-12 sm:col-12",children:o.jsx(Ed,{data:G},G.uuid)},"form_elements_"+W))})},`pannel-tab-${le}`))}),(t===P0||t===Jh)&&o.jsx(wr,{header:"Form",children:o.jsx("div",{className:"scroll-height-300",children:QG.map(($,le)=>o.jsx(ci,{header:$==null?void 0:$.label,toggleable:!0,style:{marginBottom:10},children:o.jsx("div",{className:"grid",children:$==null?void 0:$.items.map((G,W)=>o.jsx("div",{className:"xl:col-6 lg:col-12 md:col-12 sm:col-12",children:o.jsx(Ed,{data:G},G.uuid)},"form_elements_"+W))})},`pannel-tab-${le}`))})}),(t===sm||t===I9||t===X1)&&o.jsx(wr,{header:"Layout",children:o.jsx("div",{className:"scroll-height-300",children:WH.map(($,le)=>o.jsx(ci,{header:$==null?void 0:$.label,toggleable:!0,style:{marginBottom:10},children:o.jsx("div",{className:"grid",children:$==null?void 0:$.items.map((G,W)=>o.jsx("div",{className:"col-6",children:o.jsx(Ed,{data:G},G.uuid)},"form_elements_"+W))})},`pannel-tab-${le}`))})}),(t===M0||t===P0||t===Jh)&&o.jsx(wr,{header:"Layout",children:o.jsx("div",{className:"scroll-height-300",children:JG.map(($,le)=>o.jsx(ci,{header:$==null?void 0:$.label,toggleable:!0,style:{marginBottom:10},children:o.jsx("div",{className:"grid",children:$==null?void 0:$.items.map((G,W)=>o.jsx("div",{className:"col-6",children:o.jsx(Ed,{data:G},G.uuid)},"form_elements_"+W))})},`pannel-tab-${le}`))})}),t===Yd&&o.jsx(wr,{header:"Question bank",children:o.jsxs("div",{className:"grid scroll-height-300",children:[o.jsx("div",{className:"col-12",children:GH.map(($,le)=>o.jsx("div",{className:"grid",children:$==null?void 0:$.items.map((G,W)=>{const ue=It.cloneDeep(G);return o.jsx("div",{className:"col-6",children:o.jsx(Ed,{data:ue},G.uuid)},"form_elements_"+W)})},`new-quiz-${le}`))}),o.jsx("div",{className:"col-12 ",children:o.jsxs("div",{className:"p-inputgroup",children:[o.jsx(Sn,{placeholder:"Keyword",onChange:$=>{N($.target.value),$.target.value||(m({filter:"",page:1,per_page:10,sort:"created_at|desc"}),p())},onKeyDown:$=>$.key==="Enter"?z():null}),o.jsx(Ft,{icon:"pi pi-search",className:"p-button-info",onClick:()=>z()})]})}),C?o.jsx(p$,{}):o.jsx("div",{className:"scroll-height-500 w-full",children:E.map(($,le)=>{var G,W,ue,q,J;return o.jsx("div",{onScroll:M,ref:h,className:"col-12 ",children:o.jsx(Ed,{tags:[{severity:"success",label:$==null?void 0:$.subject_title},{severity:"info",label:$==null?void 0:$.course_category_title}],showIcon:(J=(q=(ue=(W=(G=a[0])==null?void 0:G.children[0])==null?void 0:W.children[0])==null?void 0:ue.children[0])==null?void 0:q.children)==null?void 0:J.some(te=>{var R,Y,X;return((R=te==null?void 0:te.questionText)==null?void 0:R[i.type])===((X=(Y=$==null?void 0:$.schema)==null?void 0:Y.questionText)==null?void 0:X[i.type])}),data:$},le)},"question_elements_"+le)})}),o.jsx(x,{})]})}),t===om&&o.jsx(wr,{header:"Training",children:o.jsx("div",{className:"scroll-height-300",children:eW.map(($,le)=>o.jsx(ci,{header:$==null?void 0:$.label,toggleable:!0,style:{marginBottom:10},children:o.jsx("div",{className:"grid",children:$==null?void 0:$.items.map((G,W)=>o.jsx("div",{className:"col-6",children:o.jsx(Ed,{data:G},G.uuid)},"form_elements_"+W))})},`pannel-tab-${le}`))})}),(t===M0||t===P0||t===Jh)&&o.jsxs(wr,{header:"Custom",children:[o.jsx("h6",{children:"Custom Sections"}),o.jsx("div",{className:"grid",children:(n==null?void 0:n.length)>0&&n.map(($,le)=>o.jsx("div",{className:"col-6",children:o.jsx(Ed,{data:{label:$==null?void 0:$.builder_element_title,element:"reusable_builder_section",schema:$==null?void 0:$.reusable_template_schema,uuid:tt(),type:ra}},$.uuid)},"reusable_elements_"+le))}),o.jsx("h6",{children:"Custom Matrix"}),o.jsx("div",{className:"grid",children:(e==null?void 0:e.length)>0&&e.map(($,le)=>o.jsx("div",{className:"col-6",children:o.jsx(Ed,{data:{label:$==null?void 0:$.custom_component_title,element:"custom_component",schema:JSON.parse($==null?void 0:$.custom_component_schema),uuid:tt(),type:er}},$.uuid)},"custom_component"+le))})]})]})})};function g$(t){return t}function fSe(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}var hSe=800,pSe=16,gSe=Date.now;function mSe(t){var e=0,n=0;return function(){var r=gSe(),i=pSe-(r-n);if(n=r,i>0){if(++e>=hSe)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function vSe(t){return function(){return t}}var bSe=I3?function(t,e){return I3(t,"toString",{configurable:!0,enumerable:!1,value:vSe(e),writable:!0})}:g$,ySe=mSe(bSe),m$=Math.max;function ASe(t,e,n){return e=m$(e===void 0?t.length-1:e,0),function(){for(var r=arguments,i=-1,a=m$(r.length-e,0),s=Array(a);++i<a;)s[i]=r[e+i];i=-1;for(var l=Array(e+1);++i<e;)l[i]=r[i];return l[e]=n(s),fSe(t,this,l)}}function wSe(t,e){return ySe(ASe(t,e,g$),t+"")}function SSe(t,e,n){if(!Jd(n))return!1;var r=typeof e;return(r=="number"?_3(n)&&GD(e,n.length):r=="string"&&e in n)?Rp(n[e],t):!1}function CSe(t){return wSe(function(e,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(a=t.length>3&&typeof a=="function"?(i--,a):void 0,s&&SSe(n[0],n[1],s)&&(a=i<3?void 0:a,i=1),e=Object(e);++r<i;){var l=n[r];l&&t(e,l,r,a)}return e})}var xSe="__lodash_hash_undefined__";function TSe(t){return this.__data__.set(t,xSe),this}function ESe(t){return this.__data__.has(t)}function O5(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new Zu;++e<n;)this.add(t[e])}O5.prototype.add=O5.prototype.push=TSe,O5.prototype.has=ESe;function ISe(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function _Se(t,e){return t.has(e)}var DSe=1,NSe=2;function v$(t,e,n,r,i,a){var s=n&DSe,l=t.length,c=e.length;if(l!=c&&!(s&&c>l))return!1;var u=a.get(t),d=a.get(e);if(u&&d)return u==e&&d==t;var f=-1,h=!0,p=n&NSe?new O5:void 0;for(a.set(t,e),a.set(e,t);++f<l;){var v=t[f],m=e[f];if(r)var A=s?r(m,v,f,e,t,a):r(v,m,f,t,e,a);if(A!==void 0){if(A)continue;h=!1;break}if(p){if(!ISe(e,function(w,C){if(!_Se(p,C)&&(v===w||i(v,w,n,r,a)))return p.push(C)})){h=!1;break}}else if(!(v===m||i(v,m,n,r,a))){h=!1;break}}return a.delete(t),a.delete(e),h}function OSe(t){var e=-1,n=Array(t.size);return t.forEach(function(r,i){n[++e]=[i,r]}),n}function FSe(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n}var kSe=1,PSe=2,MSe="[object Boolean]",LSe="[object Date]",BSe="[object Error]",VSe="[object Map]",qSe="[object Number]",USe="[object RegExp]",$Se="[object Set]",jSe="[object String]",zSe="[object Symbol]",HSe="[object ArrayBuffer]",YSe="[object DataView]",b$=au?au.prototype:void 0,Jw=b$?b$.valueOf:void 0;function KSe(t,e,n,r,i,a,s){switch(n){case YSe:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case HSe:return!(t.byteLength!=e.byteLength||!a(new D3(t),new D3(e)));case MSe:case LSe:case qSe:return Rp(+t,+e);case BSe:return t.name==e.name&&t.message==e.message;case USe:case jSe:return t==e+"";case VSe:var l=OSe;case $Se:var c=r&kSe;if(l||(l=FSe),t.size!=e.size&&!c)return!1;var u=s.get(t);if(u)return u==e;r|=PSe,s.set(t,e);var d=v$(l(t),l(e),r,i,a,s);return s.delete(t),d;case zSe:if(Jw)return Jw.call(t)==Jw.call(e)}return!1}var XSe=1,RSe=Object.prototype,GSe=RSe.hasOwnProperty;function WSe(t,e,n,r,i,a){var s=n&XSe,l=S7(t),c=l.length,u=S7(e),d=u.length;if(c!=d&&!s)return!1;for(var f=c;f--;){var h=l[f];if(!(s?h in e:GSe.call(e,h)))return!1}var p=a.get(t),v=a.get(e);if(p&&v)return p==e&&v==t;var m=!0;a.set(t,e),a.set(e,t);for(var A=s;++f<c;){h=l[f];var w=t[h],C=e[h];if(r)var x=s?r(C,w,h,e,t,a):r(w,C,h,t,e,a);if(!(x===void 0?w===C||i(w,C,n,r,a):x)){m=!1;break}A||(A=h=="constructor")}if(m&&!A){var T=t.constructor,S=e.constructor;T!=S&&"constructor"in t&&"constructor"in e&&!(typeof T=="function"&&T instanceof T&&typeof S=="function"&&S instanceof S)&&(m=!1)}return a.delete(t),a.delete(e),m}var QSe=1,y$="[object Arguments]",A$="[object Array]",F5="[object Object]",JSe=Object.prototype,w$=JSe.hasOwnProperty;function ZSe(t,e,n,r,i,a){var s=ed(t),l=ed(e),c=s?A$:xc(t),u=l?A$:xc(e);c=c==y$?F5:c,u=u==y$?F5:u;var d=c==F5,f=u==F5,h=c==u;if(h&&Jp(t)){if(!Jp(e))return!1;s=!0,d=!1}if(h&&!d)return a||(a=new ou),s||v7(t)?v$(t,e,n,r,i,a):KSe(t,e,c,n,r,i,a);if(!(n&QSe)){var p=d&&w$.call(t,"__wrapped__"),v=f&&w$.call(e,"__wrapped__");if(p||v){var m=p?t.value():t,A=v?e.value():e;return a||(a=new ou),i(m,A,n,r,a)}}return h?(a||(a=new ou),WSe(t,e,n,r,i,a)):!1}function S$(t,e,n,r,i){return t===e?!0:t==null||e==null||!su(t)&&!su(e)?t!==t&&e!==e:ZSe(t,e,n,r,S$,i)}function eCe(t){return function(e,n,r){for(var i=-1,a=Object(e),s=r(e),l=s.length;l--;){var c=s[++i];if(n(a[c],c,a)===!1)break}return e}}var tCe=eCe();function Zw(t,e,n){(n!==void 0&&!Rp(t[e],n)||n===void 0&&!(e in t))&&h7(t,e,n)}function nCe(t){return su(t)&&_3(t)}function eS(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function rCe(t){return Qp(t,e2(t))}function iCe(t,e,n,r,i,a,s){var l=eS(t,n),c=eS(e,n),u=s.get(c);if(u){Zw(t,n,u);return}var d=a?a(l,c,n+"",t,e,s):void 0,f=d===void 0;if(f){var h=ed(c),p=!h&&Jp(c),v=!h&&!p&&v7(c);d=c,h||p||v?ed(l)?d=l:nCe(l)?d=A7(l):p?(f=!1,d=iN(c,!0)):v?(f=!1,d=vN(c,!0)):d=[]:u7(c)||p7(c)?(d=l,p7(l)?d=rCe(l):(!Jd(l)||d7(l))&&(d=yN(c))):f=!1}f&&(s.set(c,d),i(d,c,r,a,s),s.delete(c)),Zw(t,n,d)}function C$(t,e,n,r,i){t!==e&&tCe(e,function(a,s){if(i||(i=new ou),Jd(a))iCe(t,e,s,n,C$,r,i);else{var l=r?r(eS(t,s),a,s+"",t,e,i):void 0;l===void 0&&(l=a),Zw(t,s,l)}},e2)}function tS(t,e){return S$(t,e)}var b0=CSe(function(t,e,n){C$(t,e,n)}),ur=(t=>(t[t.TYPE=3]="TYPE",t[t.LEVEL=12]="LEVEL",t[t.ATTRIBUTE=13]="ATTRIBUTE",t[t.BLOT=14]="BLOT",t[t.INLINE=7]="INLINE",t[t.BLOCK=11]="BLOCK",t[t.BLOCK_BLOT=10]="BLOCK_BLOT",t[t.INLINE_BLOT=6]="INLINE_BLOT",t[t.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",t[t.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",t[t.ANY=15]="ANY",t))(ur||{});class Ou{constructor(e,n,r={}){this.attrName=e,this.keyName=n;const i=ur.TYPE&ur.ATTRIBUTE;this.scope=r.scope!=null?r.scope&ur.LEVEL|i:ur.ATTRIBUTE,r.whitelist!=null&&(this.whitelist=r.whitelist)}static keys(e){return Array.from(e.attributes).map(n=>n.name)}add(e,n){return this.canAdd(e,n)?(e.setAttribute(this.keyName,n),!0):!1}canAdd(e,n){return this.whitelist==null?!0:typeof n=="string"?this.whitelist.indexOf(n.replace(/["']/g,""))>-1:this.whitelist.indexOf(n)>-1}remove(e){e.removeAttribute(this.keyName)}value(e){const n=e.getAttribute(this.keyName);return this.canAdd(e,n)&&n?n:""}}class kh extends Error{constructor(e){e="[Parchment] "+e,super(e),this.message=e,this.name=this.constructor.name}}const x$=class BC{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(e,n=!1){if(e==null)return null;if(this.blots.has(e))return this.blots.get(e)||null;if(n){let r=null;try{r=e.parentNode}catch{return null}return this.find(r,n)}return null}create(e,n,r){const i=this.query(n);if(i==null)throw new kh(`Unable to create ${n} blot`);const a=i,s=n instanceof Node||n.nodeType===Node.TEXT_NODE?n:a.create(r),l=new a(e,s,r);return BC.blots.set(l.domNode,l),l}find(e,n=!1){return BC.find(e,n)}query(e,n=ur.ANY){let r;return typeof e=="string"?r=this.types[e]||this.attributes[e]:e instanceof Text||e.nodeType===Node.TEXT_NODE?r=this.types.text:typeof e=="number"?e&ur.LEVEL&ur.BLOCK?r=this.types.block:e&ur.LEVEL&ur.INLINE&&(r=this.types.inline):e instanceof Element&&((e.getAttribute("class")||"").split(/\s+/).some(i=>(r=this.classes[i],!!r)),r=r||this.tags[e.tagName]),r==null?null:"scope"in r&&n&ur.LEVEL&r.scope&&n&ur.TYPE&r.scope?r:null}register(...e){return e.map(n=>{const r="blotName"in n,i="attrName"in n;if(!r&&!i)throw new kh("Invalid definition");if(r&&n.blotName==="abstract")throw new kh("Cannot register abstract class");const a=r?n.blotName:i?n.attrName:void 0;return this.types[a]=n,i?typeof n.keyName=="string"&&(this.attributes[n.keyName]=n):r&&(n.className&&(this.classes[n.className]=n),n.tagName&&(Array.isArray(n.tagName)?n.tagName=n.tagName.map(s=>s.toUpperCase()):n.tagName=n.tagName.toUpperCase(),(Array.isArray(n.tagName)?n.tagName:[n.tagName]).forEach(s=>{(this.tags[s]==null||n.className==null)&&(this.tags[s]=n)}))),n})}};x$.blots=new WeakMap;let Ph=x$;function T$(t,e){return(t.getAttribute("class")||"").split(/\s+/).filter(n=>n.indexOf(`${e}-`)===0)}class aCe extends Ou{static keys(e){return(e.getAttribute("class")||"").split(/\s+/).map(n=>n.split("-").slice(0,-1).join("-"))}add(e,n){return this.canAdd(e,n)?(this.remove(e),e.classList.add(`${this.keyName}-${n}`),!0):!1}remove(e){T$(e,this.keyName).forEach(n=>{e.classList.remove(n)}),e.classList.length===0&&e.removeAttribute("class")}value(e){const n=(T$(e,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(e,n)?n:""}}const qc=aCe;function nS(t){const e=t.split("-"),n=e.slice(1).map(r=>r[0].toUpperCase()+r.slice(1)).join("");return e[0]+n}class sCe extends Ou{static keys(e){return(e.getAttribute("style")||"").split(";").map(n=>n.split(":")[0].trim())}add(e,n){return this.canAdd(e,n)?(e.style[nS(this.keyName)]=n,!0):!1}remove(e){e.style[nS(this.keyName)]="",e.getAttribute("style")||e.removeAttribute("style")}value(e){const n=e.style[nS(this.keyName)];return this.canAdd(e,n)?n:""}}const y0=sCe;class oCe{constructor(e){this.attributes={},this.domNode=e,this.build()}attribute(e,n){n?e.add(this.domNode,n)&&(e.value(this.domNode)!=null?this.attributes[e.attrName]=e:delete this.attributes[e.attrName]):(e.remove(this.domNode),delete this.attributes[e.attrName])}build(){this.attributes={};const e=Ph.find(this.domNode);if(e==null)return;const n=Ou.keys(this.domNode),r=qc.keys(this.domNode),i=y0.keys(this.domNode);n.concat(r).concat(i).forEach(a=>{const s=e.scroll.query(a,ur.ATTRIBUTE);s instanceof Ou&&(this.attributes[s.attrName]=s)})}copy(e){Object.keys(this.attributes).forEach(n=>{const r=this.attributes[n].value(this.domNode);e.format(n,r)})}move(e){this.copy(e),Object.keys(this.attributes).forEach(n=>{this.attributes[n].remove(this.domNode)}),this.attributes={}}values(){return Object.keys(this.attributes).reduce((e,n)=>(e[n]=this.attributes[n].value(this.domNode),e),{})}}const k5=oCe,E$=class{constructor(e,n){this.scroll=e,this.domNode=n,Ph.blots.set(n,this),this.prev=null,this.next=null}static create(e){if(this.tagName==null)throw new kh("Blot definition missing tagName");let n,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"?n=document.createElement(this.tagName[r-1]):r&&this.tagName.indexOf(r)>-1?n=document.createElement(r):n=document.createElement(this.tagName[0])):n=document.createElement(this.tagName),this.className&&n.classList.add(this.className),n}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),Ph.blots.delete(this.domNode)}deleteAt(e,n){this.isolate(e,n).remove()}formatAt(e,n,r,i){const a=this.isolate(e,n);if(this.scroll.query(r,ur.BLOT)!=null&&i)a.wrap(r,i);else if(this.scroll.query(r,ur.ATTRIBUTE)!=null){const s=this.scroll.create(this.statics.scope);a.wrap(s),s.format(r,i)}}insertAt(e,n,r){const i=r==null?this.scroll.create("text",n):this.scroll.create(n,r),a=this.split(e);this.parent.insertBefore(i,a||void 0)}isolate(e,n){const r=this.split(e);if(r==null)throw new Error("Attempt to isolate at end");return r.split(n),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,n){const r=typeof e=="string"?this.scroll.create(e,n):e;return this.parent!=null&&(this.parent.insertBefore(r,this.next||void 0),this.remove()),r}split(e,n){return e===0?this:this.next}update(e,n){}wrap(e,n){const r=typeof e=="string"?this.scroll.create(e,n):e;if(this.parent!=null&&this.parent.insertBefore(r,this.next||void 0),typeof r.appendChild!="function")throw new kh(`Cannot wrap ${e}`);return r.appendChild(this),r}};E$.blotName="abstract";let I$=E$;const _$=class extends I${static value(e){return!0}index(e,n){return this.domNode===e||this.domNode.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(n,1):-1}position(e,n){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}}};_$.scope=ur.INLINE_BLOT;const mo=_$;class lCe{constructor(){this.head=null,this.tail=null,this.length=0}append(...e){if(this.insertBefore(e[0],null),e.length>1){const n=e.slice(1);this.append(...n)}}at(e){const n=this.iterator();let r=n();for(;r&&e>0;)e-=1,r=n();return r}contains(e){const n=this.iterator();let r=n();for(;r;){if(r===e)return!0;r=n()}return!1}indexOf(e){const n=this.iterator();let r=n(),i=0;for(;r;){if(r===e)return i;i+=1,r=n()}return-1}insertBefore(e,n){e!=null&&(this.remove(e),e.next=n,n!=null?(e.prev=n.prev,n.prev!=null&&(n.prev.next=e),n.prev=e,n===this.head&&(this.head=e)):this.tail!=null?(this.tail.next=e,e.prev=this.tail,this.tail=e):(e.prev=null,this.head=this.tail=e),this.length+=1)}offset(e){let n=0,r=this.head;for(;r!=null;){if(r===e)return n;n+=r.length(),r=r.next}return-1}remove(e){this.contains(e)&&(e.prev!=null&&(e.prev.next=e.next),e.next!=null&&(e.next.prev=e.prev),e===this.head&&(this.head=e.next),e===this.tail&&(this.tail=e.prev),this.length-=1)}iterator(e=this.head){return()=>{const n=e;return e!=null&&(e=e.next),n}}find(e,n=!1){const r=this.iterator();let i=r();for(;i;){const a=i.length();if(e<a||n&&e===a&&(i.next==null||i.next.length()!==0))return[i,e];e-=a,i=r()}return[null,0]}forEach(e){const n=this.iterator();let r=n();for(;r;)e(r),r=n()}forEachAt(e,n,r){if(n<=0)return;const[i,a]=this.find(e);let s=e-a;const l=this.iterator(i);let c=l();for(;c&&s<e+n;){const u=c.length();e>s?r(c,e-s,Math.min(n,s+u-e)):r(c,0,Math.min(u,e+n-s)),s+=u,c=l()}}map(e){return this.reduce((n,r)=>(n.push(e(r)),n),[])}reduce(e,n){const r=this.iterator();let i=r();for(;i;)n=e(n,i),i=r();return n}}function D$(t,e){const n=e.find(t);if(n)return n;try{return e.create(t)}catch{const r=e.create(ur.INLINE);return Array.from(t.childNodes).forEach(i=>{r.domNode.appendChild(i)}),t.parentNode&&t.parentNode.replaceChild(r.domNode,t),r.attach(),r}}const N$=class F0 extends I${constructor(e,n){super(e,n),this.uiNode=null,this.build()}appendChild(e){this.insertBefore(e)}attach(){super.attach(),this.children.forEach(e=>{e.attach()})}attachUI(e){this.uiNode!=null&&this.uiNode.remove(),this.uiNode=e,F0.uiClass&&this.uiNode.classList.add(F0.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new lCe,Array.from(this.domNode.childNodes).filter(e=>e!==this.uiNode).reverse().forEach(e=>{try{const n=D$(e,this.scroll);this.insertBefore(n,this.children.head||void 0)}catch(n){if(n instanceof kh)return;throw n}})}deleteAt(e,n){if(e===0&&n===this.length())return this.remove();this.children.forEachAt(e,n,(r,i,a)=>{r.deleteAt(i,a)})}descendant(e,n=0){const[r,i]=this.children.find(n);return e.blotName==null&&e(r)||e.blotName!=null&&r instanceof e?[r,i]:r instanceof F0?r.descendant(e,i):[null,-1]}descendants(e,n=0,r=Number.MAX_VALUE){let i=[],a=r;return this.children.forEachAt(n,r,(s,l,c)=>{(e.blotName==null&&e(s)||e.blotName!=null&&s instanceof e)&&i.push(s),s instanceof F0&&(i=i.concat(s.descendants(e,l,a))),a-=c}),i}detach(){this.children.forEach(e=>{e.detach()}),super.detach()}enforceAllowedChildren(){let e=!1;this.children.forEach(n=>{e||this.statics.allowedChildren.some(r=>n instanceof r)||(n.statics.scope===ur.BLOCK_BLOT?(n.next!=null&&this.splitAfter(n),n.prev!=null&&this.splitAfter(n.prev),n.parent.unwrap(),e=!0):n instanceof F0?n.unwrap():n.remove())})}formatAt(e,n,r,i){this.children.forEachAt(e,n,(a,s,l)=>{a.formatAt(s,l,r,i)})}insertAt(e,n,r){const[i,a]=this.children.find(e);if(i)i.insertAt(a,n,r);else{const s=r==null?this.scroll.create("text",n):this.scroll.create(n,r);this.appendChild(s)}}insertBefore(e,n){e.parent!=null&&e.parent.children.remove(e);let r=null;this.children.insertBefore(e,n||null),e.parent=this,n!=null&&(r=n.domNode),(this.domNode.parentNode!==e.domNode||this.domNode.nextSibling!==r)&&this.domNode.insertBefore(e.domNode,r),e.attach()}length(){return this.children.reduce((e,n)=>e+n.length(),0)}moveChildren(e,n){this.children.forEach(r=>{e.insertBefore(r,n)})}optimize(e){if(super.optimize(e),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 n=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(n)}else this.remove()}path(e,n=!1){const[r,i]=this.children.find(e,n),a=[[this,e]];return r instanceof F0?a.concat(r.path(i,n)):(r!=null&&a.push([r,i]),a)}removeChild(e){this.children.remove(e)}replaceWith(e,n){const r=typeof e=="string"?this.scroll.create(e,n):e;return r instanceof F0&&this.moveChildren(r),super.replaceWith(r)}split(e,n=!1){if(!n){if(e===0)return this;if(e===this.length())return this.next}const r=this.clone();return this.parent&&this.parent.insertBefore(r,this.next||void 0),this.children.forEachAt(e,this.length(),(i,a,s)=>{const l=i.split(a,n);l!=null&&r.appendChild(l)}),r}splitAfter(e){const n=this.clone();for(;e.next!=null;)n.appendChild(e.next);return this.parent&&this.parent.insertBefore(n,this.next||void 0),n}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()}update(e,n){const r=[],i=[];e.forEach(a=>{a.target===this.domNode&&a.type==="childList"&&(r.push(...a.addedNodes),i.push(...a.removedNodes))}),i.forEach(a=>{if(a.parentNode!=null&&a.tagName!=="IFRAME"&&document.body.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;const s=this.scroll.find(a);s!=null&&(s.domNode.parentNode==null||s.domNode.parentNode===this.domNode)&&s.detach()}),r.filter(a=>a.parentNode===this.domNode&&a!==this.uiNode).sort((a,s)=>a===s?0:a.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1).forEach(a=>{let s=null;a.nextSibling!=null&&(s=this.scroll.find(a.nextSibling));const l=D$(a,this.scroll);(l.next!==s||l.next==null)&&(l.parent!=null&&l.parent.removeChild(this),this.insertBefore(l,s||void 0))}),this.enforceAllowedChildren()}};N$.uiClass="";const Uc=N$;function cCe(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(t[n]!==e[n])return!1;return!0}const Mh=class Qh extends Uc{static create(e){return super.create(e)}static formats(e,n){const r=n.query(Qh.blotName);if(!(r!=null&&e.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return e.tagName.toLowerCase()}}constructor(e,n){super(e,n),this.attributes=new k5(this.domNode)}format(e,n){if(e===this.statics.blotName&&!n)this.children.forEach(r=>{r instanceof Qh||(r=r.wrap(Qh.blotName,!0)),this.attributes.copy(r)}),this.unwrap();else{const r=this.scroll.query(e,ur.INLINE);if(r==null)return;r instanceof Ou?this.attributes.attribute(r,n):n&&(e!==this.statics.blotName||this.formats()[e]!==n)&&this.replaceWith(e,n)}}formats(){const e=this.attributes.values(),n=this.statics.formats(this.domNode,this.scroll);return n!=null&&(e[this.statics.blotName]=n),e}formatAt(e,n,r,i){this.formats()[r]!=null||this.scroll.query(r,ur.ATTRIBUTE)?this.isolate(e,n).format(r,i):super.formatAt(e,n,r,i)}optimize(e){super.optimize(e);const n=this.formats();if(Object.keys(n).length===0)return this.unwrap();const r=this.next;r instanceof Qh&&r.prev===this&&cCe(n,r.formats())&&(r.moveChildren(this),r.remove())}replaceWith(e,n){const r=super.replaceWith(e,n);return this.attributes.copy(r),r}update(e,n){super.update(e,n),e.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}wrap(e,n){const r=super.wrap(e,n);return r instanceof Qh&&this.attributes.move(r),r}};Mh.allowedChildren=[Mh,mo],Mh.blotName="inline",Mh.scope=ur.INLINE_BLOT,Mh.tagName="SPAN";const rS=Mh,Lh=class VC extends Uc{static create(e){return super.create(e)}static formats(e,n){const r=n.query(VC.blotName);if(!(r!=null&&e.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return e.tagName.toLowerCase()}}constructor(e,n){super(e,n),this.attributes=new k5(this.domNode)}format(e,n){const r=this.scroll.query(e,ur.BLOCK);r!=null&&(r instanceof Ou?this.attributes.attribute(r,n):e===this.statics.blotName&&!n?this.replaceWith(VC.blotName):n&&(e!==this.statics.blotName||this.formats()[e]!==n)&&this.replaceWith(e,n))}formats(){const e=this.attributes.values(),n=this.statics.formats(this.domNode,this.scroll);return n!=null&&(e[this.statics.blotName]=n),e}formatAt(e,n,r,i){this.scroll.query(r,ur.BLOCK)!=null?this.format(r,i):super.formatAt(e,n,r,i)}insertAt(e,n,r){if(r==null||this.scroll.query(n,ur.INLINE)!=null)super.insertAt(e,n,r);else{const i=this.split(e);if(i!=null){const a=this.scroll.create(n,r);i.parent.insertBefore(a,i)}else throw new Error("Attempt to insertAt after block boundaries")}}replaceWith(e,n){const r=super.replaceWith(e,n);return this.attributes.copy(r),r}update(e,n){super.update(e,n),e.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}};Lh.blotName="block",Lh.scope=ur.BLOCK_BLOT,Lh.tagName="P",Lh.allowedChildren=[rS,Lh,mo];const Ig=Lh,iS=class extends Uc{checkMerge(){return this.next!==null&&this.next.statics.blotName===this.statics.blotName}deleteAt(e,n){super.deleteAt(e,n),this.enforceAllowedChildren()}formatAt(e,n,r,i){super.formatAt(e,n,r,i),this.enforceAllowedChildren()}insertAt(e,n,r){super.insertAt(e,n,r),this.enforceAllowedChildren()}optimize(e){super.optimize(e),this.children.length>0&&this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};iS.blotName="container",iS.scope=ur.BLOCK_BLOT;const P5=iS;class uCe extends mo{static formats(e,n){}format(e,n){super.formatAt(0,this.length(),e,n)}formatAt(e,n,r,i){e===0&&n===this.length()?this.format(r,i):super.formatAt(e,n,r,i)}formats(){return this.statics.formats(this.domNode,this.scroll)}}const _l=uCe,dCe={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},fCe=100,Bh=class extends Uc{constructor(e,n){super(null,n),this.registry=e,this.scroll=this,this.build(),this.observer=new MutationObserver(r=>{this.update(r)}),this.observer.observe(this.domNode,dCe),this.attach()}create(e,n){return this.registry.create(this,e,n)}find(e,n=!1){const r=this.registry.find(e,n);return r?r.scroll===this?r:n?this.find(r.scroll.domNode.parentNode,!0):null:null}query(e,n=ur.ANY){return this.registry.query(e,n)}register(...e){return this.registry.register(...e)}build(){this.scroll!=null&&super.build()}detach(){super.detach(),this.observer.disconnect()}deleteAt(e,n){this.update(),e===0&&n===this.length()?this.children.forEach(r=>{r.remove()}):super.deleteAt(e,n)}formatAt(e,n,r,i){this.update(),super.formatAt(e,n,r,i)}insertAt(e,n,r){this.update(),super.insertAt(e,n,r)}optimize(e=[],n={}){super.optimize(n);const r=n.mutationsMap||new WeakMap;let i=Array.from(this.observer.takeRecords());for(;i.length>0;)e.push(i.pop());const a=(c,u=!0)=>{c==null||c===this||c.domNode.parentNode!=null&&(r.has(c.domNode)||r.set(c.domNode,[]),u&&a(c.parent))},s=c=>{r.has(c.domNode)&&(c instanceof Uc&&c.children.forEach(s),r.delete(c.domNode),c.optimize(n))};let l=e;for(let c=0;l.length>0;c+=1){if(c>=fCe)throw new Error("[Parchment] Maximum optimize iterations reached");for(l.forEach(u=>{const d=this.find(u.target,!0);d!=null&&(d.domNode===u.target&&(u.type==="childList"?(a(this.find(u.previousSibling,!1)),Array.from(u.addedNodes).forEach(f=>{const h=this.find(f,!1);a(h,!1),h instanceof Uc&&h.children.forEach(p=>{a(p,!1)})})):u.type==="attributes"&&a(d.prev)),a(d))}),this.children.forEach(s),l=Array.from(this.observer.takeRecords()),i=l.slice();i.length>0;)e.push(i.pop())}}update(e,n={}){e=e||this.observer.takeRecords();const r=new WeakMap;e.map(i=>{const a=this.find(i.target,!0);return a==null?null:r.has(a.domNode)?(r.get(a.domNode).push(i),null):(r.set(a.domNode,[i]),a)}).forEach(i=>{i!=null&&i!==this&&r.has(i.domNode)&&i.update(r.get(i.domNode)||[],n)}),n.mutationsMap=r,r.has(this.domNode)&&super.update(r.get(this.domNode),n),this.optimize(e,n)}};Bh.blotName="scroll",Bh.defaultChild=Ig,Bh.allowedChildren=[Ig,P5],Bh.scope=ur.BLOCK_BLOT,Bh.tagName="DIV";const aS=Bh,sS=class wH extends mo{static create(e){return document.createTextNode(e)}static value(e){return e.data}constructor(e,n){super(e,n),this.text=this.statics.value(this.domNode)}deleteAt(e,n){this.domNode.data=this.text=this.text.slice(0,e)+this.text.slice(e+n)}index(e,n){return this.domNode===e?n:-1}insertAt(e,n,r){r==null?(this.text=this.text.slice(0,e)+n+this.text.slice(e),this.domNode.data=this.text):super.insertAt(e,n,r)}length(){return this.text.length}optimize(e){super.optimize(e),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof wH&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())}position(e,n=!1){return[this.domNode,e]}split(e,n=!1){if(!n){if(e===0)return this;if(e===this.length())return this.next}const r=this.scroll.create(this.domNode.splitText(e));return this.parent.insertBefore(r,this.next||void 0),this.text=this.statics.value(this.domNode),r}update(e,n){e.some(r=>r.type==="characterData"&&r.target===this.domNode)&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};sS.blotName="text",sS.scope=ur.INLINE_BLOT;const M5=sS,O$=Object.freeze(Object.defineProperty({__proto__:null,Attributor:Ou,AttributorStore:k5,BlockBlot:Ig,ClassAttributor:qc,ContainerBlot:P5,EmbedBlot:_l,InlineBlot:rS,LeafBlot:mo,ParentBlot:Uc,Registry:Ph,Scope:ur,ScrollBlot:aS,StyleAttributor:y0,TextBlot:M5},Symbol.toStringTag,{value:"Module"}));var oS={exports:{}},Dl=-1,Lo=1,Is=0;function _g(t,e,n,r,i){if(t===e)return t?[[Is,t]]:[];if(n!=null){var a=wCe(t,e,n);if(a)return a}var s=lS(t,e),l=t.substring(0,s);t=t.substring(s),e=e.substring(s),s=L5(t,e);var c=t.substring(t.length-s);t=t.substring(0,t.length-s),e=e.substring(0,e.length-s);var u=hCe(t,e);return l&&u.unshift([Is,l]),c&&u.push([Is,c]),cS(u,i),r&&mCe(u),u}function hCe(t,e){var n;if(!t)return[[Lo,e]];if(!e)return[[Dl,t]];var r=t.length>e.length?t:e,i=t.length>e.length?e:t,a=r.indexOf(i);if(a!==-1)return n=[[Lo,r.substring(0,a)],[Is,i],[Lo,r.substring(a+i.length)]],t.length>e.length&&(n[0][0]=n[2][0]=Dl),n;if(i.length===1)return[[Dl,t],[Lo,e]];var s=gCe(t,e);if(s){var l=s[0],c=s[1],u=s[2],d=s[3],f=s[4],h=_g(l,u),p=_g(c,d);return h.concat([[Is,f]],p)}return pCe(t,e)}function pCe(t,e){for(var n=t.length,r=e.length,i=Math.ceil((n+r)/2),a=i,s=2*i,l=new Array(s),c=new Array(s),u=0;u<s;u++)l[u]=-1,c[u]=-1;l[a+1]=0,c[a+1]=0;for(var d=n-r,f=d%2!==0,h=0,p=0,v=0,m=0,A=0;A<i;A++){for(var w=-A+h;w<=A-p;w+=2){var C=a+w,x;w===-A||w!==A&&l[C-1]<l[C+1]?x=l[C+1]:x=l[C-1]+1;for(var T=x-w;x<n&&T<r&&t.charAt(x)===e.charAt(T);)x++,T++;if(l[C]=x,x>n)p+=2;else if(T>r)h+=2;else if(f){var S=a+d-w;if(S>=0&&S<s&&c[S]!==-1){var E=n-c[S];if(x>=E)return F$(t,e,x,T)}}}for(var I=-A+v;I<=A-m;I+=2){var S=a+I,E;I===-A||I!==A&&c[S-1]<c[S+1]?E=c[S+1]:E=c[S-1]+1;for(var P=E-I;E<n&&P<r&&t.charAt(n-E-1)===e.charAt(r-P-1);)E++,P++;if(c[S]=E,E>n)m+=2;else if(P>r)v+=2;else if(!f){var C=a+d-I;if(C>=0&&C<s&&l[C]!==-1){var x=l[C],T=a+x-C;if(E=n-E,x>=E)return F$(t,e,x,T)}}}}return[[Dl,t],[Lo,e]]}function F$(t,e,n,r){var i=t.substring(0,n),a=e.substring(0,r),s=t.substring(n),l=e.substring(r),c=_g(i,a),u=_g(s,l);return c.concat(u)}function lS(t,e){if(!t||!e||t.charAt(0)!==e.charAt(0))return 0;for(var n=0,r=Math.min(t.length,e.length),i=r,a=0;n<i;)t.substring(a,i)==e.substring(a,i)?(n=i,a=n):r=i,i=Math.floor((r-n)/2+n);return B$(t.charCodeAt(i-1))&&i--,i}function k$(t,e){var n=t.length,r=e.length;if(n==0||r==0)return 0;n>r?t=t.substring(n-r):n<r&&(e=e.substring(0,n));var i=Math.min(n,r);if(t==e)return i;for(var a=0,s=1;;){var l=t.substring(i-s),c=e.indexOf(l);if(c==-1)return a;s+=c,(c==0||t.substring(i-s)==e.substring(0,s))&&(a=s,s++)}}function L5(t,e){if(!t||!e||t.slice(-1)!==e.slice(-1))return 0;for(var n=0,r=Math.min(t.length,e.length),i=r,a=0;n<i;)t.substring(t.length-i,t.length-a)==e.substring(e.length-i,e.length-a)?(n=i,a=n):r=i,i=Math.floor((r-n)/2+n);return V$(t.charCodeAt(t.length-i))&&i--,i}function gCe(t,e){var n=t.length>e.length?t:e,r=t.length>e.length?e:t;if(n.length<4||r.length*2<n.length)return null;function i(p,v,m){for(var A=p.substring(m,m+Math.floor(p.length/4)),w=-1,C="",x,T,S,E;(w=v.indexOf(A,w+1))!==-1;){var I=lS(p.substring(m),v.substring(w)),P=L5(p.substring(0,m),v.substring(0,w));C.length<P+I&&(C=v.substring(w-P,w)+v.substring(w,w+I),x=p.substring(0,m-P),T=p.substring(m+I),S=v.substring(0,w-P),E=v.substring(w+I))}return C.length*2>=p.length?[x,T,S,E,C]:null}var a=i(n,r,Math.ceil(n.length/4)),s=i(n,r,Math.ceil(n.length/2)),l;if(!a&&!s)return null;s?a?l=a[4].length>s[4].length?a:s:l=s:l=a;var c,u,d,f;t.length>e.length?(c=l[0],u=l[1],d=l[2],f=l[3]):(d=l[0],f=l[1],c=l[2],u=l[3]);var h=l[4];return[c,u,d,f,h]}function mCe(t){for(var e=!1,n=[],r=0,i=null,a=0,s=0,l=0,c=0,u=0;a<t.length;)t[a][0]==Is?(n[r++]=a,s=c,l=u,c=0,u=0,i=t[a][1]):(t[a][0]==Lo?c+=t[a][1].length:u+=t[a][1].length,i&&i.length<=Math.max(s,l)&&i.length<=Math.max(c,u)&&(t.splice(n[r-1],0,[Dl,i]),t[n[r-1]+1][0]=Lo,r--,r--,a=r>0?n[r-1]:-1,s=0,l=0,c=0,u=0,i=null,e=!0)),a++;for(e&&cS(t),yCe(t),a=1;a<t.length;){if(t[a-1][0]==Dl&&t[a][0]==Lo){var d=t[a-1][1],f=t[a][1],h=k$(d,f),p=k$(f,d);h>=p?(h>=d.length/2||h>=f.length/2)&&(t.splice(a,0,[Is,f.substring(0,h)]),t[a-1][1]=d.substring(0,d.length-h),t[a+1][1]=f.substring(h),a++):(p>=d.length/2||p>=f.length/2)&&(t.splice(a,0,[Is,d.substring(0,p)]),t[a-1][0]=Lo,t[a-1][1]=f.substring(0,f.length-p),t[a+1][0]=Dl,t[a+1][1]=d.substring(p),a++),a++}a++}}var P$=/[^a-zA-Z0-9]/,M$=/\s/,L$=/[\r\n]/,vCe=/\n\r?\n$/,bCe=/^\r?\n\r?\n/;function yCe(t){function e(p,v){if(!p||!v)return 6;var m=p.charAt(p.length-1),A=v.charAt(0),w=m.match(P$),C=A.match(P$),x=w&&m.match(M$),T=C&&A.match(M$),S=x&&m.match(L$),E=T&&A.match(L$),I=S&&p.match(vCe),P=E&&v.match(bCe);return I||P?5:S||E?4:w&&!x&&T?3:x||T?2:w||C?1:0}for(var n=1;n<t.length-1;){if(t[n-1][0]==Is&&t[n+1][0]==Is){var r=t[n-1][1],i=t[n][1],a=t[n+1][1],s=L5(r,i);if(s){var l=i.substring(i.length-s);r=r.substring(0,r.length-s),i=l+i.substring(0,i.length-s),a=l+a}for(var c=r,u=i,d=a,f=e(r,i)+e(i,a);i.charAt(0)===a.charAt(0);){r+=i.charAt(0),i=i.substring(1)+a.charAt(0),a=a.substring(1);var h=e(r,i)+e(i,a);h>=f&&(f=h,c=r,u=i,d=a)}t[n-1][1]!=c&&(c?t[n-1][1]=c:(t.splice(n-1,1),n--),t[n][1]=u,d?t[n+1][1]=d:(t.splice(n+1,1),n--))}n++}}function cS(t,e){t.push([Is,""]);for(var n=0,r=0,i=0,a="",s="",l;n<t.length;){if(n<t.length-1&&!t[n][1]){t.splice(n,1);continue}switch(t[n][0]){case Lo:i++,s+=t[n][1],n++;break;case Dl:r++,a+=t[n][1],n++;break;case Is:var c=n-i-r-1;if(e){if(c>=0&&U$(t[c][1])){var u=t[c][1].slice(-1);if(t[c][1]=t[c][1].slice(0,-1),a=u+a,s=u+s,!t[c][1]){t.splice(c,1),n--;var d=c-1;t[d]&&t[d][0]===Lo&&(i++,s=t[d][1]+s,d--),t[d]&&t[d][0]===Dl&&(r++,a=t[d][1]+a,d--),c=d}}if(q$(t[n][1])){var u=t[n][1].charAt(0);t[n][1]=t[n][1].slice(1),a+=u,s+=u}}if(n<t.length-1&&!t[n][1]){t.splice(n,1);break}if(a.length>0||s.length>0){a.length>0&&s.length>0&&(l=lS(s,a),l!==0&&(c>=0?t[c][1]+=s.substring(0,l):(t.splice(0,0,[Is,s.substring(0,l)]),n++),s=s.substring(l),a=a.substring(l)),l=L5(s,a),l!==0&&(t[n][1]=s.substring(s.length-l)+t[n][1],s=s.substring(0,s.length-l),a=a.substring(0,a.length-l)));var f=i+r;a.length===0&&s.length===0?(t.splice(n-f,f),n=n-f):a.length===0?(t.splice(n-f,f,[Lo,s]),n=n-f+1):s.length===0?(t.splice(n-f,f,[Dl,a]),n=n-f+1):(t.splice(n-f,f,[Dl,a],[Lo,s]),n=n-f+2)}n!==0&&t[n-1][0]===Is?(t[n-1][1]+=t[n][1],t.splice(n,1)):n++,i=0,r=0,a="",s="";break}}t[t.length-1][1]===""&&t.pop();var h=!1;for(n=1;n<t.length-1;)t[n-1][0]===Is&&t[n+1][0]===Is&&(t[n][1].substring(t[n][1].length-t[n-1][1].length)===t[n-1][1]?(t[n][1]=t[n-1][1]+t[n][1].substring(0,t[n][1].length-t[n-1][1].length),t[n+1][1]=t[n-1][1]+t[n+1][1],t.splice(n-1,1),h=!0):t[n][1].substring(0,t[n+1][1].length)==t[n+1][1]&&(t[n-1][1]+=t[n+1][1],t[n][1]=t[n][1].substring(t[n+1][1].length)+t[n+1][1],t.splice(n+1,1),h=!0)),n++;h&&cS(t,e)}function B$(t){return t>=55296&&t<=56319}function V$(t){return t>=56320&&t<=57343}function q$(t){return V$(t.charCodeAt(0))}function U$(t){return B$(t.charCodeAt(t.length-1))}function ACe(t){for(var e=[],n=0;n<t.length;n++)t[n][1].length>0&&e.push(t[n]);return e}function uS(t,e,n,r){return U$(t)||q$(r)?null:ACe([[Is,t],[Dl,e],[Lo,n],[Is,r]])}function wCe(t,e,n){var r=typeof n=="number"?{index:n,length:0}:n.oldRange,i=typeof n=="number"?null:n.newRange,a=t.length,s=e.length;if(r.length===0&&(i===null||i.length===0)){var l=r.index,c=t.slice(0,l),u=t.slice(l),d=i?i.index:null;e:{var f=l+s-a;if(d!==null&&d!==f||f<0||f>s)break e;var h=e.slice(0,f),p=e.slice(f);if(p!==u)break e;var v=Math.min(l,f),m=c.slice(0,v),A=h.slice(0,v);if(m!==A)break e;var w=c.slice(v),C=h.slice(v);return uS(m,w,C,u)}e:{if(d!==null&&d!==l)break e;var x=l,h=e.slice(0,x),p=e.slice(x);if(h!==c)break e;var T=Math.min(a-x,s-x),S=u.slice(u.length-T),E=p.slice(p.length-T);if(S!==E)break e;var w=u.slice(0,u.length-T),C=p.slice(0,p.length-T);return uS(c,w,C,S)}}if(r.length>0&&i&&i.length===0)e:{var m=t.slice(0,r.index),S=t.slice(r.index+r.length),v=m.length,T=S.length;if(s<v+T)break e;var A=e.slice(0,v),E=e.slice(s-T);if(m!==A||S!==E)break e;var w=t.slice(v,a-T),C=e.slice(v,s-T);return uS(m,w,C,S)}return null}function B5(t,e,n,r){return _g(t,e,n,r,!0)}B5.INSERT=Lo,B5.DELETE=Dl,B5.EQUAL=Is;var SCe=B5,V5={exports:{}};V5.exports,function(t,e){var n=200,r="__lodash_hash_undefined__",i=9007199254740991,a="[object Arguments]",s="[object Array]",l="[object Boolean]",c="[object Date]",u="[object Error]",d="[object Function]",f="[object GeneratorFunction]",h="[object Map]",p="[object Number]",v="[object Object]",m="[object Promise]",A="[object RegExp]",w="[object Set]",C="[object String]",x="[object Symbol]",T="[object WeakMap]",S="[object ArrayBuffer]",E="[object DataView]",I="[object Float32Array]",P="[object Float64Array]",N="[object Int8Array]",k="[object Int16Array]",M="[object Int32Array]",z="[object Uint8Array]",O="[object Uint8ClampedArray]",H="[object Uint16Array]",$="[object Uint32Array]",le=/[\\^$.*+?()[\]{}|]/g,G=/\w*$/,W=/^\[object .+?Constructor\]$/,ue=/^(?:0|[1-9]\d*)$/,q={};q[a]=q[s]=q[S]=q[E]=q[l]=q[c]=q[I]=q[P]=q[N]=q[k]=q[M]=q[h]=q[p]=q[v]=q[A]=q[w]=q[C]=q[x]=q[z]=q[O]=q[H]=q[$]=!0,q[u]=q[d]=q[T]=!1;var J=typeof Oi=="object"&&Oi&&Oi.Object===Object&&Oi,te=typeof self=="object"&&self&&self.Object===Object&&self,R=J||te||Function("return this")(),Y=e&&!e.nodeType&&e,X=Y&&!0&&t&&!t.nodeType&&t,fe=X&&X.exports===Y;function me(ie,Me){return ie.set(Me[0],Me[1]),ie}function Ae(ie,Me){return ie.add(Me),ie}function be(ie,Me){for(var rt=-1,Vt=ie?ie.length:0;++rt<Vt&&Me(ie[rt],rt,ie)!==!1;);return ie}function oe(ie,Me){for(var rt=-1,Vt=Me.length,Tr=ie.length;++rt<Vt;)ie[Tr+rt]=Me[rt];return ie}function re(ie,Me,rt,Vt){for(var Tr=-1,ir=ie?ie.length:0;++Tr<ir;)rt=Me(rt,ie[Tr],Tr,ie);return rt}function B(ie,Me){for(var rt=-1,Vt=Array(ie);++rt<ie;)Vt[rt]=Me(rt);return Vt}function ne(ie,Me){return ie==null?void 0:ie[Me]}function se(ie){var Me=!1;if(ie!=null&&typeof ie.toString!="function")try{Me=!!(ie+"")}catch{}return Me}function pe(ie){var Me=-1,rt=Array(ie.size);return ie.forEach(function(Vt,Tr){rt[++Me]=[Tr,Vt]}),rt}function Ne(ie,Me){return function(rt){return ie(Me(rt))}}function we(ie){var Me=-1,rt=Array(ie.size);return ie.forEach(function(Vt){rt[++Me]=Vt}),rt}var ve=Array.prototype,ce=Function.prototype,Te=Object.prototype,Ee=R["__core-js_shared__"],K=function(){var ie=/[^.]+$/.exec(Ee&&Ee.keys&&Ee.keys.IE_PROTO||"");return ie?"Symbol(src)_1."+ie:""}(),Ce=ce.toString,ye=Te.hasOwnProperty,ge=Te.toString,he=RegExp("^"+Ce.call(ye).replace(le,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),_e=fe?R.Buffer:void 0,Le=R.Symbol,Ve=R.Uint8Array,Ze=Ne(Object.getPrototypeOf,Object),st=Object.create,ct=Te.propertyIsEnumerable,At=ve.splice,$t=Object.getOwnPropertySymbols,gn=_e?_e.isBuffer:void 0,kt=Ne(Object.keys,Object),mn=xi(R,"DataView"),Un=xi(R,"Map"),xt=xi(R,"Promise"),je=xi(R,"Set"),He=xi(R,"WeakMap"),it=xi(Object,"create"),an=Vr(mn),jt=Vr(Un),Xt=Vr(xt),Wt=Vr(je),ht=Vr(He),qe=Le?Le.prototype:void 0,nt=qe?qe.valueOf:void 0;function Dt(ie){var Me=-1,rt=ie?ie.length:0;for(this.clear();++Me<rt;){var Vt=ie[Me];this.set(Vt[0],Vt[1])}}function Bt(){this.__data__=it?it(null):{}}function _n(ie){return this.has(ie)&&delete this.__data__[ie]}function Gn(ie){var Me=this.__data__;if(it){var rt=Me[ie];return rt===r?void 0:rt}return ye.call(Me,ie)?Me[ie]:void 0}function lr(ie){var Me=this.__data__;return it?Me[ie]!==void 0:ye.call(Me,ie)}function Wn(ie,Me){var rt=this.__data__;return rt[ie]=it&&Me===void 0?r:Me,this}Dt.prototype.clear=Bt,Dt.prototype.delete=_n,Dt.prototype.get=Gn,Dt.prototype.has=lr,Dt.prototype.set=Wn;function vr(ie){var Me=-1,rt=ie?ie.length:0;for(this.clear();++Me<rt;){var Vt=ie[Me];this.set(Vt[0],Vt[1])}}function Nr(){this.__data__=[]}function An(ie){var Me=this.__data__,rt=ae(Me,ie);if(rt<0)return!1;var Vt=Me.length-1;return rt==Vt?Me.pop():At.call(Me,rt,1),!0}function ot(ie){var Me=this.__data__,rt=ae(Me,ie);return rt<0?void 0:Me[rt][1]}function ut(ie){return ae(this.__data__,ie)>-1}function bt(ie,Me){var rt=this.__data__,Vt=ae(rt,ie);return Vt<0?rt.push([ie,Me]):rt[Vt][1]=Me,this}vr.prototype.clear=Nr,vr.prototype.delete=An,vr.prototype.get=ot,vr.prototype.has=ut,vr.prototype.set=bt;function Nt(ie){var Me=-1,rt=ie?ie.length:0;for(this.clear();++Me<rt;){var Vt=ie[Me];this.set(Vt[0],Vt[1])}}function wn(){this.__data__={hash:new Dt,map:new(Un||vr),string:new Dt}}function Nn(ie){return Ui(this,ie).delete(ie)}function Et(ie){return Ui(this,ie).get(ie)}function Fe(ie){return Ui(this,ie).has(ie)}function We(ie,Me){return Ui(this,ie).set(ie,Me),this}Nt.prototype.clear=wn,Nt.prototype.delete=Nn,Nt.prototype.get=Et,Nt.prototype.has=Fe,Nt.prototype.set=We;function yt(ie){this.__data__=new vr(ie)}function zt(){this.__data__=new vr}function Gt(ie){return this.__data__.delete(ie)}function tn(ie){return this.__data__.get(ie)}function Cn(ie){return this.__data__.has(ie)}function Pn(ie,Me){var rt=this.__data__;if(rt instanceof vr){var Vt=rt.__data__;if(!Un||Vt.length<n-1)return Vt.push([ie,Me]),this;rt=this.__data__=new Nt(Vt)}return rt.set(ie,Me),this}yt.prototype.clear=zt,yt.prototype.delete=Gt,yt.prototype.get=tn,yt.prototype.has=Cn,yt.prototype.set=Pn;function jn(ie,Me){var rt=Tt(ie)||Ye(ie)?B(ie.length,String):[],Vt=rt.length,Tr=!!Vt;for(var ir in ie)ye.call(ie,ir)&&!(Tr&&(ir=="length"||$n(ir,Vt)))&&rt.push(ir);return rt}function at(ie,Me,rt){var Vt=ie[Me];(!(ye.call(ie,Me)&&yn(Vt,rt))||rt===void 0&&!(Me in ie))&&(ie[Me]=rt)}function ae(ie,Me){for(var rt=ie.length;rt--;)if(yn(ie[rt][0],Me))return rt;return-1}function Pe(ie,Me){return ie&&ui(Me,bo(Me),ie)}function Ge(ie,Me,rt,Vt,Tr,ir,Rr){var Or;if(Vt&&(Or=ir?Vt(ie,Tr,ir,Rr):Vt(ie)),Or!==void 0)return Or;if(!fa(ie))return ie;var Cr=Tt(ie);if(Cr){if(Or=hn(ie),!Me)return ai(ie,Or)}else{var Gr=zi(ie),Ti=Gr==d||Gr==f;if(br(ie))return zn(ie,Me);if(Gr==v||Gr==a||Ti&&!ir){if(se(ie))return ir?ie:{};if(Or=$e(Ti?{}:ie),!Me)return ki(ie,Pe(Or,ie))}else{if(!q[Gr])return ir?ie:{};Or=Rt(ie,Gr,Ge,Me)}}Rr||(Rr=new yt);var Ga=Rr.get(ie);if(Ga)return Ga;if(Rr.set(ie,Or),!Cr)var Hi=rt?tr(ie):bo(ie);return be(Hi||ie,function(gi,wa){Hi&&(wa=gi,gi=ie[wa]),at(Or,wa,Ge(gi,Me,rt,Vt,wa,ie,Rr))}),Or}function dt(ie){return fa(ie)?st(ie):{}}function Ct(ie,Me,rt){var Vt=Me(ie);return Tt(ie)?Vt:oe(Vt,rt(ie))}function Qt(ie){return ge.call(ie)}function Dn(ie){if(!fa(ie)||kr(ie))return!1;var Me=Pr(ie)||se(ie)?he:W;return Me.test(Vr(ie))}function Fn(ie){if(!Ra(ie))return kt(ie);var Me=[];for(var rt in Object(ie))ye.call(ie,rt)&&rt!="constructor"&&Me.push(rt);return Me}function zn(ie,Me){if(Me)return ie.slice();var rt=new ie.constructor(ie.length);return ie.copy(rt),rt}function Mr(ie){var Me=new ie.constructor(ie.byteLength);return new Ve(Me).set(new Ve(ie)),Me}function Kr(ie,Me){var rt=Me?Mr(ie.buffer):ie.buffer;return new ie.constructor(rt,ie.byteOffset,ie.byteLength)}function Vn(ie,Me,rt){var Vt=Me?rt(pe(ie),!0):pe(ie);return re(Vt,me,new ie.constructor)}function On(ie){var Me=new ie.constructor(ie.source,G.exec(ie));return Me.lastIndex=ie.lastIndex,Me}function sr(ie,Me,rt){var Vt=Me?rt(we(ie),!0):we(ie);return re(Vt,Ae,new ie.constructor)}function Br(ie){return nt?Object(nt.call(ie)):{}}function pi(ie,Me){var rt=Me?Mr(ie.buffer):ie.buffer;return new ie.constructor(rt,ie.byteOffset,ie.length)}function ai(ie,Me){var rt=-1,Vt=ie.length;for(Me||(Me=Array(Vt));++rt<Vt;)Me[rt]=ie[rt];return Me}function ui(ie,Me,rt,Vt){rt||(rt={});for(var Tr=-1,ir=Me.length;++Tr<ir;){var Rr=Me[Tr],Or=void 0;at(rt,Rr,Or===void 0?ie[Rr]:Or)}return rt}function ki(ie,Me){return ui(ie,wi(ie),Me)}function tr(ie){return Ct(ie,bo,wi)}function Ui(ie,Me){var rt=ie.__data__;return jr(Me)?rt[typeof Me=="string"?"string":"hash"]:rt.map}function xi(ie,Me){var rt=ne(ie,Me);return Dn(rt)?rt:void 0}var wi=$t?Ne($t,Object):Xr,zi=Qt;(mn&&zi(new mn(new ArrayBuffer(1)))!=E||Un&&zi(new Un)!=h||xt&&zi(xt.resolve())!=m||je&&zi(new je)!=w||He&&zi(new He)!=T)&&(zi=function(ie){var Me=ge.call(ie),rt=Me==v?ie.constructor:void 0,Vt=rt?Vr(rt):void 0;if(Vt)switch(Vt){case an:return E;case jt:return h;case Xt:return m;case Wt:return w;case ht:return T}return Me});function hn(ie){var Me=ie.length,rt=ie.constructor(Me);return Me&&typeof ie[0]=="string"&&ye.call(ie,"index")&&(rt.index=ie.index,rt.input=ie.input),rt}function $e(ie){return typeof ie.constructor=="function"&&!Ra(ie)?dt(Ze(ie)):{}}function Rt(ie,Me,rt,Vt){var Tr=ie.constructor;switch(Me){case S:return Mr(ie);case l:case c:return new Tr(+ie);case E:return Kr(ie,Vt);case I:case P:case N:case k:case M:case z:case O:case H:case $:return pi(ie,Vt);case h:return Vn(ie,Vt,rt);case p:case C:return new Tr(ie);case A:return On(ie);case w:return sr(ie,Vt,rt);case x:return Br(ie)}}function $n(ie,Me){return Me=Me??i,!!Me&&(typeof ie=="number"||ue.test(ie))&&ie>-1&&ie%1==0&&ie<Me}function jr(ie){var Me=typeof ie;return Me=="string"||Me=="number"||Me=="symbol"||Me=="boolean"?ie!=="__proto__":ie===null}function kr(ie){return!!K&&K in ie}function Ra(ie){var Me=ie&&ie.constructor,rt=typeof Me=="function"&&Me.prototype||Te;return ie===rt}function Vr(ie){if(ie!=null){try{return Ce.call(ie)}catch{}try{return ie+""}catch{}}return""}function _s(ie){return Ge(ie,!0,!0)}function yn(ie,Me){return ie===Me||ie!==ie&&Me!==Me}function Ye(ie){return Jn(ie)&&ye.call(ie,"callee")&&(!ct.call(ie,"callee")||ge.call(ie)==a)}var Tt=Array.isArray;function Zt(ie){return ie!=null&&la(ie.length)&&!Pr(ie)}function Jn(ie){return Us(ie)&&Zt(ie)}var br=gn||di;function Pr(ie){var Me=fa(ie)?ge.call(ie):"";return Me==d||Me==f}function la(ie){return typeof ie=="number"&&ie>-1&&ie%1==0&&ie<=i}function fa(ie){var Me=typeof ie;return!!ie&&(Me=="object"||Me=="function")}function Us(ie){return!!ie&&typeof ie=="object"}function bo(ie){return Zt(ie)?jn(ie):Fn(ie)}function Xr(){return[]}function di(){return!1}t.exports=_s}(V5,V5.exports);var $$=V5.exports,q5={exports:{}};q5.exports,function(t,e){var n=200,r="__lodash_hash_undefined__",i=1,a=2,s=9007199254740991,l="[object Arguments]",c="[object Array]",u="[object AsyncFunction]",d="[object Boolean]",f="[object Date]",h="[object Error]",p="[object Function]",v="[object GeneratorFunction]",m="[object Map]",A="[object Number]",w="[object Null]",C="[object Object]",x="[object Promise]",T="[object Proxy]",S="[object RegExp]",E="[object Set]",I="[object String]",P="[object Symbol]",N="[object Undefined]",k="[object WeakMap]",M="[object ArrayBuffer]",z="[object DataView]",O="[object Float32Array]",H="[object Float64Array]",$="[object Int8Array]",le="[object Int16Array]",G="[object Int32Array]",W="[object Uint8Array]",ue="[object Uint8ClampedArray]",q="[object Uint16Array]",J="[object Uint32Array]",te=/[\\^$.*+?()[\]{}|]/g,R=/^\[object .+?Constructor\]$/,Y=/^(?:0|[1-9]\d*)$/,X={};X[O]=X[H]=X[$]=X[le]=X[G]=X[W]=X[ue]=X[q]=X[J]=!0,X[l]=X[c]=X[M]=X[d]=X[z]=X[f]=X[h]=X[p]=X[m]=X[A]=X[C]=X[S]=X[E]=X[I]=X[k]=!1;var fe=typeof Oi=="object"&&Oi&&Oi.Object===Object&&Oi,me=typeof self=="object"&&self&&self.Object===Object&&self,Ae=fe||me||Function("return this")(),be=e&&!e.nodeType&&e,oe=be&&!0&&t&&!t.nodeType&&t,re=oe&&oe.exports===be,B=re&&fe.process,ne=function(){try{return B&&B.binding&&B.binding("util")}catch{}}(),se=ne&&ne.isTypedArray;function pe(ie,Me){for(var rt=-1,Vt=ie==null?0:ie.length,Tr=0,ir=[];++rt<Vt;){var Rr=ie[rt];Me(Rr,rt,ie)&&(ir[Tr++]=Rr)}return ir}function Ne(ie,Me){for(var rt=-1,Vt=Me.length,Tr=ie.length;++rt<Vt;)ie[Tr+rt]=Me[rt];return ie}function we(ie,Me){for(var rt=-1,Vt=ie==null?0:ie.length;++rt<Vt;)if(Me(ie[rt],rt,ie))return!0;return!1}function ve(ie,Me){for(var rt=-1,Vt=Array(ie);++rt<ie;)Vt[rt]=Me(rt);return Vt}function ce(ie){return function(Me){return ie(Me)}}function Te(ie,Me){return ie.has(Me)}function Ee(ie,Me){return ie==null?void 0:ie[Me]}function K(ie){var Me=-1,rt=Array(ie.size);return ie.forEach(function(Vt,Tr){rt[++Me]=[Tr,Vt]}),rt}function Ce(ie,Me){return function(rt){return ie(Me(rt))}}function ye(ie){var Me=-1,rt=Array(ie.size);return ie.forEach(function(Vt){rt[++Me]=Vt}),rt}var ge=Array.prototype,he=Function.prototype,_e=Object.prototype,Le=Ae["__core-js_shared__"],Ve=he.toString,Ze=_e.hasOwnProperty,st=function(){var ie=/[^.]+$/.exec(Le&&Le.keys&&Le.keys.IE_PROTO||"");return ie?"Symbol(src)_1."+ie:""}(),ct=_e.toString,At=RegExp("^"+Ve.call(Ze).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$t=re?Ae.Buffer:void 0,gn=Ae.Symbol,kt=Ae.Uint8Array,mn=_e.propertyIsEnumerable,Un=ge.splice,xt=gn?gn.toStringTag:void 0,je=Object.getOwnPropertySymbols,He=$t?$t.isBuffer:void 0,it=Ce(Object.keys,Object),an=wi(Ae,"DataView"),jt=wi(Ae,"Map"),Xt=wi(Ae,"Promise"),Wt=wi(Ae,"Set"),ht=wi(Ae,"WeakMap"),qe=wi(Object,"create"),nt=Vr(an),Dt=Vr(jt),Bt=Vr(Xt),_n=Vr(Wt),Gn=Vr(ht),lr=gn?gn.prototype:void 0,Wn=lr?lr.valueOf:void 0;function vr(ie){var Me=-1,rt=ie==null?0:ie.length;for(this.clear();++Me<rt;){var Vt=ie[Me];this.set(Vt[0],Vt[1])}}function Nr(){this.__data__=qe?qe(null):{},this.size=0}function An(ie){var Me=this.has(ie)&&delete this.__data__[ie];return this.size-=Me?1:0,Me}function ot(ie){var Me=this.__data__;if(qe){var rt=Me[ie];return rt===r?void 0:rt}return Ze.call(Me,ie)?Me[ie]:void 0}function ut(ie){var Me=this.__data__;return qe?Me[ie]!==void 0:Ze.call(Me,ie)}function bt(ie,Me){var rt=this.__data__;return this.size+=this.has(ie)?0:1,rt[ie]=qe&&Me===void 0?r:Me,this}vr.prototype.clear=Nr,vr.prototype.delete=An,vr.prototype.get=ot,vr.prototype.has=ut,vr.prototype.set=bt;function Nt(ie){var Me=-1,rt=ie==null?0:ie.length;for(this.clear();++Me<rt;){var Vt=ie[Me];this.set(Vt[0],Vt[1])}}function wn(){this.__data__=[],this.size=0}function Nn(ie){var Me=this.__data__,rt=zn(Me,ie);if(rt<0)return!1;var Vt=Me.length-1;return rt==Vt?Me.pop():Un.call(Me,rt,1),--this.size,!0}function Et(ie){var Me=this.__data__,rt=zn(Me,ie);return rt<0?void 0:Me[rt][1]}function Fe(ie){return zn(this.__data__,ie)>-1}function We(ie,Me){var rt=this.__data__,Vt=zn(rt,ie);return Vt<0?(++this.size,rt.push([ie,Me])):rt[Vt][1]=Me,this}Nt.prototype.clear=wn,Nt.prototype.delete=Nn,Nt.prototype.get=Et,Nt.prototype.has=Fe,Nt.prototype.set=We;function yt(ie){var Me=-1,rt=ie==null?0:ie.length;for(this.clear();++Me<rt;){var Vt=ie[Me];this.set(Vt[0],Vt[1])}}function zt(){this.size=0,this.__data__={hash:new vr,map:new(jt||Nt),string:new vr}}function Gt(ie){var Me=xi(this,ie).delete(ie);return this.size-=Me?1:0,Me}function tn(ie){return xi(this,ie).get(ie)}function Cn(ie){return xi(this,ie).has(ie)}function Pn(ie,Me){var rt=xi(this,ie),Vt=rt.size;return rt.set(ie,Me),this.size+=rt.size==Vt?0:1,this}yt.prototype.clear=zt,yt.prototype.delete=Gt,yt.prototype.get=tn,yt.prototype.has=Cn,yt.prototype.set=Pn;function jn(ie){var Me=-1,rt=ie==null?0:ie.length;for(this.__data__=new yt;++Me<rt;)this.add(ie[Me])}function at(ie){return this.__data__.set(ie,r),this}function ae(ie){return this.__data__.has(ie)}jn.prototype.add=jn.prototype.push=at,jn.prototype.has=ae;function Pe(ie){var Me=this.__data__=new Nt(ie);this.size=Me.size}function Ge(){this.__data__=new Nt,this.size=0}function dt(ie){var Me=this.__data__,rt=Me.delete(ie);return this.size=Me.size,rt}function Ct(ie){return this.__data__.get(ie)}function Qt(ie){return this.__data__.has(ie)}function Dn(ie,Me){var rt=this.__data__;if(rt instanceof Nt){var Vt=rt.__data__;if(!jt||Vt.length<n-1)return Vt.push([ie,Me]),this.size=++rt.size,this;rt=this.__data__=new yt(Vt)}return rt.set(ie,Me),this.size=rt.size,this}Pe.prototype.clear=Ge,Pe.prototype.delete=dt,Pe.prototype.get=Ct,Pe.prototype.has=Qt,Pe.prototype.set=Dn;function Fn(ie,Me){var rt=Ye(ie),Vt=!rt&&yn(ie),Tr=!rt&&!Vt&&Zt(ie),ir=!rt&&!Vt&&!Tr&&Us(ie),Rr=rt||Vt||Tr||ir,Or=Rr?ve(ie.length,String):[],Cr=Or.length;for(var Gr in ie)Ze.call(ie,Gr)&&!(Rr&&(Gr=="length"||Tr&&(Gr=="offset"||Gr=="parent")||ir&&(Gr=="buffer"||Gr=="byteLength"||Gr=="byteOffset")||Rt(Gr,Cr)))&&Or.push(Gr);return Or}function zn(ie,Me){for(var rt=ie.length;rt--;)if(_s(ie[rt][0],Me))return rt;return-1}function Mr(ie,Me,rt){var Vt=Me(ie);return Ye(ie)?Vt:Ne(Vt,rt(ie))}function Kr(ie){return ie==null?ie===void 0?N:w:xt&&xt in Object(ie)?zi(ie):Ra(ie)}function Vn(ie){return fa(ie)&&Kr(ie)==l}function On(ie,Me,rt,Vt,Tr){return ie===Me?!0:ie==null||Me==null||!fa(ie)&&!fa(Me)?ie!==ie&&Me!==Me:sr(ie,Me,rt,Vt,On,Tr)}function sr(ie,Me,rt,Vt,Tr,ir){var Rr=Ye(ie),Or=Ye(Me),Cr=Rr?c:$e(ie),Gr=Or?c:$e(Me);Cr=Cr==l?C:Cr,Gr=Gr==l?C:Gr;var Ti=Cr==C,Ga=Gr==C,Hi=Cr==Gr;if(Hi&&Zt(ie)){if(!Zt(Me))return!1;Rr=!0,Ti=!1}if(Hi&&!Ti)return ir||(ir=new Pe),Rr||Us(ie)?ui(ie,Me,rt,Vt,Tr,ir):ki(ie,Me,Cr,rt,Vt,Tr,ir);if(!(rt&i)){var gi=Ti&&Ze.call(ie,"__wrapped__"),wa=Ga&&Ze.call(Me,"__wrapped__");if(gi||wa){var as=gi?ie.value():ie,Sa=wa?Me.value():Me;return ir||(ir=new Pe),Tr(as,Sa,rt,Vt,ir)}}return Hi?(ir||(ir=new Pe),tr(ie,Me,rt,Vt,Tr,ir)):!1}function Br(ie){if(!la(ie)||jr(ie))return!1;var Me=br(ie)?At:R;return Me.test(Vr(ie))}function pi(ie){return fa(ie)&&Pr(ie.length)&&!!X[Kr(ie)]}function ai(ie){if(!kr(ie))return it(ie);var Me=[];for(var rt in Object(ie))Ze.call(ie,rt)&&rt!="constructor"&&Me.push(rt);return Me}function ui(ie,Me,rt,Vt,Tr,ir){var Rr=rt&i,Or=ie.length,Cr=Me.length;if(Or!=Cr&&!(Rr&&Cr>Or))return!1;var Gr=ir.get(ie);if(Gr&&ir.get(Me))return Gr==Me;var Ti=-1,Ga=!0,Hi=rt&a?new jn:void 0;for(ir.set(ie,Me),ir.set(Me,ie);++Ti<Or;){var gi=ie[Ti],wa=Me[Ti];if(Vt)var as=Rr?Vt(wa,gi,Ti,Me,ie,ir):Vt(gi,wa,Ti,ie,Me,ir);if(as!==void 0){if(as)continue;Ga=!1;break}if(Hi){if(!we(Me,function(Sa,$i){if(!Te(Hi,$i)&&(gi===Sa||Tr(gi,Sa,rt,Vt,ir)))return Hi.push($i)})){Ga=!1;break}}else if(!(gi===wa||Tr(gi,wa,rt,Vt,ir))){Ga=!1;break}}return ir.delete(ie),ir.delete(Me),Ga}function ki(ie,Me,rt,Vt,Tr,ir,Rr){switch(rt){case z:if(ie.byteLength!=Me.byteLength||ie.byteOffset!=Me.byteOffset)return!1;ie=ie.buffer,Me=Me.buffer;case M:return!(ie.byteLength!=Me.byteLength||!ir(new kt(ie),new kt(Me)));case d:case f:case A:return _s(+ie,+Me);case h:return ie.name==Me.name&&ie.message==Me.message;case S:case I:return ie==Me+"";case m:var Or=K;case E:var Cr=Vt&i;if(Or||(Or=ye),ie.size!=Me.size&&!Cr)return!1;var Gr=Rr.get(ie);if(Gr)return Gr==Me;Vt|=a,Rr.set(ie,Me);var Ti=ui(Or(ie),Or(Me),Vt,Tr,ir,Rr);return Rr.delete(ie),Ti;case P:if(Wn)return Wn.call(ie)==Wn.call(Me)}return!1}function tr(ie,Me,rt,Vt,Tr,ir){var Rr=rt&i,Or=Ui(ie),Cr=Or.length,Gr=Ui(Me),Ti=Gr.length;if(Cr!=Ti&&!Rr)return!1;for(var Ga=Cr;Ga--;){var Hi=Or[Ga];if(!(Rr?Hi in Me:Ze.call(Me,Hi)))return!1}var gi=ir.get(ie);if(gi&&ir.get(Me))return gi==Me;var wa=!0;ir.set(ie,Me),ir.set(Me,ie);for(var as=Rr;++Ga<Cr;){Hi=Or[Ga];var Sa=ie[Hi],$i=Me[Hi];if(Vt)var Oa=Rr?Vt($i,Sa,Hi,Me,ie,ir):Vt(Sa,$i,Hi,ie,Me,ir);if(!(Oa===void 0?Sa===$i||Tr(Sa,$i,rt,Vt,ir):Oa)){wa=!1;break}as||(as=Hi=="constructor")}if(wa&&!as){var ja=ie.constructor,mi=Me.constructor;ja!=mi&&"constructor"in ie&&"constructor"in Me&&!(typeof ja=="function"&&ja instanceof ja&&typeof mi=="function"&&mi instanceof mi)&&(wa=!1)}return ir.delete(ie),ir.delete(Me),wa}function Ui(ie){return Mr(ie,bo,hn)}function xi(ie,Me){var rt=ie.__data__;return $n(Me)?rt[typeof Me=="string"?"string":"hash"]:rt.map}function wi(ie,Me){var rt=Ee(ie,Me);return Br(rt)?rt:void 0}function zi(ie){var Me=Ze.call(ie,xt),rt=ie[xt];try{ie[xt]=void 0;var Vt=!0}catch{}var Tr=ct.call(ie);return Vt&&(Me?ie[xt]=rt:delete ie[xt]),Tr}var hn=je?function(ie){return ie==null?[]:(ie=Object(ie),pe(je(ie),function(Me){return mn.call(ie,Me)}))}:Xr,$e=Kr;(an&&$e(new an(new ArrayBuffer(1)))!=z||jt&&$e(new jt)!=m||Xt&&$e(Xt.resolve())!=x||Wt&&$e(new Wt)!=E||ht&&$e(new ht)!=k)&&($e=function(ie){var Me=Kr(ie),rt=Me==C?ie.constructor:void 0,Vt=rt?Vr(rt):"";if(Vt)switch(Vt){case nt:return z;case Dt:return m;case Bt:return x;case _n:return E;case Gn:return k}return Me});function Rt(ie,Me){return Me=Me??s,!!Me&&(typeof ie=="number"||Y.test(ie))&&ie>-1&&ie%1==0&&ie<Me}function $n(ie){var Me=typeof ie;return Me=="string"||Me=="number"||Me=="symbol"||Me=="boolean"?ie!=="__proto__":ie===null}function jr(ie){return!!st&&st in ie}function kr(ie){var Me=ie&&ie.constructor,rt=typeof Me=="function"&&Me.prototype||_e;return ie===rt}function Ra(ie){return ct.call(ie)}function Vr(ie){if(ie!=null){try{return Ve.call(ie)}catch{}try{return ie+""}catch{}}return""}function _s(ie,Me){return ie===Me||ie!==ie&&Me!==Me}var yn=Vn(function(){return arguments}())?Vn:function(ie){return fa(ie)&&Ze.call(ie,"callee")&&!mn.call(ie,"callee")},Ye=Array.isArray;function Tt(ie){return ie!=null&&Pr(ie.length)&&!br(ie)}var Zt=He||di;function Jn(ie,Me){return On(ie,Me)}function br(ie){if(!la(ie))return!1;var Me=Kr(ie);return Me==p||Me==v||Me==u||Me==T}function Pr(ie){return typeof ie=="number"&&ie>-1&&ie%1==0&&ie<=s}function la(ie){var Me=typeof ie;return ie!=null&&(Me=="object"||Me=="function")}function fa(ie){return ie!=null&&typeof ie=="object"}var Us=se?ce(se):pi;function bo(ie){return Tt(ie)?Fn(ie):ai(ie)}function Xr(){return[]}function di(){return!1}t.exports=Jn}(q5,q5.exports);var j$=q5.exports,dS={};Object.defineProperty(dS,"__esModule",{value:!0});const CCe=$$,xCe=j$;var fS;(function(t){function e(a={},s={},l=!1){typeof a!="object"&&(a={}),typeof s!="object"&&(s={});let c=CCe(s);l||(c=Object.keys(c).reduce((u,d)=>(c[d]!=null&&(u[d]=c[d]),u),{}));for(const u in a)a[u]!==void 0&&s[u]===void 0&&(c[u]=a[u]);return Object.keys(c).length>0?c:void 0}t.compose=e;function n(a={},s={}){typeof a!="object"&&(a={}),typeof s!="object"&&(s={});const l=Object.keys(a).concat(Object.keys(s)).reduce((c,u)=>(xCe(a[u],s[u])||(c[u]=s[u]===void 0?null:s[u]),c),{});return Object.keys(l).length>0?l:void 0}t.diff=n;function r(a={},s={}){a=a||{};const l=Object.keys(s).reduce((c,u)=>(s[u]!==a[u]&&a[u]!==void 0&&(c[u]=s[u]),c),{});return Object.keys(a).reduce((c,u)=>(a[u]!==s[u]&&s[u]===void 0&&(c[u]=null),c),l)}t.invert=r;function i(a,s,l=!1){if(typeof a!="object")return s;if(typeof s!="object")return;if(!l)return s;const c=Object.keys(s).reduce((u,d)=>(a[d]===void 0&&(u[d]=s[d]),u),{});return Object.keys(c).length>0?c:void 0}t.transform=i})(fS||(fS={})),dS.default=fS;var U5={};Object.defineProperty(U5,"__esModule",{value:!0});var hS;(function(t){function e(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=e})(hS||(hS={})),U5.default=hS;var pS={};Object.defineProperty(pS,"__esModule",{value:!0});const z$=U5;class TCe{constructor(e){this.ops=e,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(e){e||(e=1/0);const n=this.ops[this.index];if(n){const r=this.offset,i=z$.default.length(n);if(e>=i-r?(e=i-r,this.index+=1,this.offset=0):this.offset+=e,typeof n.delete=="number")return{delete:e};{const a={};return n.attributes&&(a.attributes=n.attributes),typeof n.retain=="number"?a.retain=e:typeof n.retain=="object"&&n.retain!==null?a.retain=n.retain:typeof n.insert=="string"?a.insert=n.insert.substr(r,e):a.insert=n.insert,a}}else return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?z$.default.length(this.ops[this.index])-this.offset:1/0}peekType(){const e=this.ops[this.index];return e?typeof e.delete=="number"?"delete":typeof e.retain=="number"||typeof e.retain=="object"&&e.retain!==null?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);{const e=this.offset,n=this.index,r=this.next(),i=this.ops.slice(this.index);return this.offset=e,this.index=n,[r].concat(i)}}else return[]}}pS.default=TCe,function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.AttributeMap=e.OpIterator=e.Op=void 0;const n=SCe,r=$$,i=j$,a=dS;e.AttributeMap=a.default;const s=U5;e.Op=s.default;const l=pS;e.OpIterator=l.default;const c="\0",u=(f,h)=>{if(typeof f!="object"||f===null)throw new Error(`cannot retain a ${typeof f}`);if(typeof h!="object"||h===null)throw new Error(`cannot retain a ${typeof h}`);const p=Object.keys(f)[0];if(!p||p!==Object.keys(h)[0])throw new Error(`embed types not matched: ${p} != ${Object.keys(h)[0]}`);return[p,f[p],h[p]]};class d{constructor(h){Array.isArray(h)?this.ops=h:h!=null&&Array.isArray(h.ops)?this.ops=h.ops:this.ops=[]}static registerEmbed(h,p){this.handlers[h]=p}static unregisterEmbed(h){delete this.handlers[h]}static getHandler(h){const p=this.handlers[h];if(!p)throw new Error(`no handlers for embed type "${h}"`);return p}insert(h,p){const v={};return typeof h=="string"&&h.length===0?this:(v.insert=h,p!=null&&typeof p=="object"&&Object.keys(p).length>0&&(v.attributes=p),this.push(v))}delete(h){return h<=0?this:this.push({delete:h})}retain(h,p){if(typeof h=="number"&&h<=0)return this;const v={retain:h};return p!=null&&typeof p=="object"&&Object.keys(p).length>0&&(v.attributes=p),this.push(v)}push(h){let p=this.ops.length,v=this.ops[p-1];if(h=r(h),typeof v=="object"){if(typeof h.delete=="number"&&typeof v.delete=="number")return this.ops[p-1]={delete:v.delete+h.delete},this;if(typeof v.delete=="number"&&h.insert!=null&&(p-=1,v=this.ops[p-1],typeof v!="object"))return this.ops.unshift(h),this;if(i(h.attributes,v.attributes)){if(typeof h.insert=="string"&&typeof v.insert=="string")return this.ops[p-1]={insert:v.insert+h.insert},typeof h.attributes=="object"&&(this.ops[p-1].attributes=h.attributes),this;if(typeof h.retain=="number"&&typeof v.retain=="number")return this.ops[p-1]={retain:v.retain+h.retain},typeof h.attributes=="object"&&(this.ops[p-1].attributes=h.attributes),this}}return p===this.ops.length?this.ops.push(h):this.ops.splice(p,0,h),this}chop(){const h=this.ops[this.ops.length-1];return h&&typeof h.retain=="number"&&!h.attributes&&this.ops.pop(),this}filter(h){return this.ops.filter(h)}forEach(h){this.ops.forEach(h)}map(h){return this.ops.map(h)}partition(h){const p=[],v=[];return this.forEach(m=>{(h(m)?p:v).push(m)}),[p,v]}reduce(h,p){return this.ops.reduce(h,p)}changeLength(){return this.reduce((h,p)=>p.insert?h+s.default.length(p):p.delete?h-p.delete:h,0)}length(){return this.reduce((h,p)=>h+s.default.length(p),0)}slice(h=0,p=1/0){const v=[],m=new l.default(this.ops);let A=0;for(;A<p&&m.hasNext();){let w;A<h?w=m.next(h-A):(w=m.next(p-A),v.push(w)),A+=s.default.length(w)}return new d(v)}compose(h){const p=new l.default(this.ops),v=new l.default(h.ops),m=[],A=v.peek();if(A!=null&&typeof A.retain=="number"&&A.attributes==null){let C=A.retain;for(;p.peekType()==="insert"&&p.peekLength()<=C;)C-=p.peekLength(),m.push(p.next());A.retain-C>0&&v.next(A.retain-C)}const w=new d(m);for(;p.hasNext()||v.hasNext();)if(v.peekType()==="insert")w.push(v.next());else if(p.peekType()==="delete")w.push(p.next());else{const C=Math.min(p.peekLength(),v.peekLength()),x=p.next(C),T=v.next(C);if(T.retain){const S={};if(typeof x.retain=="number")S.retain=typeof T.retain=="number"?C:T.retain;else if(typeof T.retain=="number")x.retain==null?S.insert=x.insert:S.retain=x.retain;else{const I=x.retain==null?"insert":"retain",[P,N,k]=u(x[I],T.retain),M=d.getHandler(P);S[I]={[P]:M.compose(N,k,I==="retain")}}const E=a.default.compose(x.attributes,T.attributes,typeof x.retain=="number");if(E&&(S.attributes=E),w.push(S),!v.hasNext()&&i(w.ops[w.ops.length-1],S)){const I=new d(p.rest());return w.concat(I).chop()}}else typeof T.delete=="number"&&(typeof x.retain=="number"||typeof x.retain=="object"&&x.retain!==null)&&w.push(T)}return w.chop()}concat(h){const p=new d(this.ops.slice());return h.ops.length>0&&(p.push(h.ops[0]),p.ops=p.ops.concat(h.ops.slice(1))),p}diff(h,p){if(this.ops===h.ops)return new d;const v=[this,h].map(x=>x.map(T=>{if(T.insert!=null)return typeof T.insert=="string"?T.insert:c;const S=x===h?"on":"with";throw new Error("diff() called "+S+" non-document")}).join("")),m=new d,A=n(v[0],v[1],p,!0),w=new l.default(this.ops),C=new l.default(h.ops);return A.forEach(x=>{let T=x[1].length;for(;T>0;){let S=0;switch(x[0]){case n.INSERT:S=Math.min(C.peekLength(),T),m.push(C.next(S));break;case n.DELETE:S=Math.min(T,w.peekLength()),w.next(S),m.delete(S);break;case n.EQUAL:S=Math.min(w.peekLength(),C.peekLength(),T);const E=w.next(S),I=C.next(S);i(E.insert,I.insert)?m.retain(S,a.default.diff(E.attributes,I.attributes)):m.push(I).delete(S);break}T-=S}}),m.chop()}eachLine(h,p=`
4371
+ `,uSe={spinner:function(e){var n=e.props;return{animationDuration:n.animationDuration}}},N5=Bn.extend({defaultProps:{__TYPE:"ProgressSpinner",id:null,style:null,className:null,strokeWidth:"2",fill:"none",animationDuration:"2s",children:void 0},css:{classes:lSe,styles:cSe,inlineStyles:uSe}}),p$=b.memo(b.forwardRef(function(t,e){var n=Yn(),r=b.useContext(ar),i=N5.getProps(t,r),a=b.useRef(null),s=N5.setMetaData({props:i}),l=s.ptm,c=s.cx,u=s.sx,d=s.isUnstyled;li(N5.css.styles,d,{name:"progressspinner"}),b.useImperativeHandle(e,function(){return{props:i,getElement:function(){return a.current}}});var f=n({id:i.id,ref:a,style:i.style,className:ft(i.className,c("root")),role:"progressbar","aria-busy":!0},N5.getOtherProps(i),l("root")),h=n({className:c("spinner"),viewBox:"25 25 50 50",style:u("spinner")},l("spinner")),p=n({className:c("circle"),cx:"50",cy:"50",r:"20",fill:i.fill,strokeWidth:i.strokeWidth,strokeMiterlimit:"10"},l("circle"));return b.createElement("div",f,b.createElement("svg",h,b.createElement("circle",p)))}));p$.displayName="ProgressSpinner";const dSe=()=>{const{renderType:t,componentList:e,sectionsList:n,exam:r}=Yt(),{userSelectedLanguage:i,formBuilderFormLayout:a}=on(),s=4,l=0,c=1,u=2,d=5,f=()=>{const $=t;let le=0;return $===Yd?le=s:$===om?le=d:$===sm||$===I9||$===X1?le=u:$===P0||$===Jh?le=c:$===M0&&(le=l),le},h=F.useRef(),p=r!=null&&r.getPaginatedAssessmentQuestionBankList?r==null?void 0:r.getPaginatedAssessmentQuestionBankList:()=>{},v=r!=null&&r.getPaginatedAssessmentQuestionBankListFromStore?r==null?void 0:r.getPaginatedAssessmentQuestionBankListFromStore:[],m=r!=null&&r.updateQuestionBankStates?r==null?void 0:r.updateQuestionBankStates:()=>{},A=r!=null&&r.assessmentSearchFilterCourseCategoryId?r==null?void 0:r.assessmentSearchFilterCourseCategoryId:null,w=r!=null&&r.assessmentSearchFilterCourseSubjectId?r==null?void 0:r.assessmentSearchFilterCourseSubjectId:null,C=r!=null&&r.AssessmentQuestionBankLoading?r==null?void 0:r.AssessmentQuestionBankLoading:!1,x=r!=null&&r.AssessmentQuestionBankPaginator?r==null?void 0:r.AssessmentQuestionBankPaginator:()=>o.jsx(o.Fragment,{});r!=null&&r.courseCategoryList&&(r==null||r.courseCategoryList);const T=r!=null&&r.getCourseCategoryList?r==null?void 0:r.getCourseCategoryList:()=>{};r!=null&&r.subjectList&&(r==null||r.subjectList);const S=r!=null&&r.getSubjectList?r==null?void 0:r.getSubjectList:()=>{},[E,I]=F.useState([]),[P,N]=F.useState("");F.useEffect(()=>(t===Yd&&(T(),S()),()=>{}),[t]),console.log("getPaginatedAssessmentQuestionBankListFromStore",v);const k=F.useCallback(()=>{const $=v.map(le=>{var ue;const G=JSON.parse(le.question_meta_data),W=JSON.parse(le.meta_data);return{label:(ue=G==null?void 0:G.questionText)==null?void 0:ue[i==null?void 0:i.type],icon:"pi pi-fw pi-trash",element:"radio",schema:{uuid:tt(),componentType:"question",questionText:G==null?void 0:G.questionText,questionTextImage:W==null?void 0:W.questionImage,answerInputType:G!=null&&G.answerInputType?G==null?void 0:G.answerInputType:"radio",answerOptions:G==null?void 0:G.answerOptions,isHidden:!1,subject_title:le==null?void 0:le.subject_title,course_category_title:le==null?void 0:le.course_category_title,subject_id:le==null?void 0:le.subject_id,course_category_id:le==null?void 0:le.course_category_id,created_by_id:null,date_created:le==null?void 0:le.created_at},subject_title:le==null?void 0:le.subject_title,course_category_title:le==null?void 0:le.course_category_title,uuid:tt(),type:er,componentType:"question"}});I($)},[v,i==null?void 0:i.type]);F.useEffect(()=>{k()},[]);const M=()=>{h.current&&h.current};F.useEffect(()=>(t===Yd&&p(),()=>{}),[t,A,w]);const z=()=>{m({filter:P,page:1,per_page:10,sort:"created_at|desc"})},[O,H]=F.useState(f());return F.useEffect(()=>{H(f())},[t]),o.jsx(o.Fragment,{children:o.jsxs(rs,{activeIndex:O,onTabChange:$=>H($.index),scrollable:!0,children:[t===M0&&o.jsx(wr,{header:"Survey",children:ZG.map(($,le)=>o.jsx(ci,{header:$==null?void 0:$.label,toggleable:!0,style:{marginBottom:10},children:o.jsx("div",{className:"grid scroll-height-300",children:$==null?void 0:$.items.map((G,W)=>o.jsx("div",{className:"xl:col-6 lg:col-12 md:col-12 sm:col-12",children:o.jsx(Ed,{data:G},G.uuid)},"form_elements_"+W))})},`pannel-tab-${le}`))}),(t===P0||t===Jh)&&o.jsx(wr,{header:"Form",children:o.jsx("div",{className:"scroll-height-300",children:QG.map(($,le)=>o.jsx(ci,{header:$==null?void 0:$.label,toggleable:!0,style:{marginBottom:10},children:o.jsx("div",{className:"grid",children:$==null?void 0:$.items.map((G,W)=>o.jsx("div",{className:"xl:col-6 lg:col-12 md:col-12 sm:col-12",children:o.jsx(Ed,{data:G},G.uuid)},"form_elements_"+W))})},`pannel-tab-${le}`))})}),(t===sm||t===I9||t===X1)&&o.jsx(wr,{header:"Layout",children:o.jsx("div",{className:"scroll-height-300",children:WH.map(($,le)=>o.jsx(ci,{header:$==null?void 0:$.label,toggleable:!0,style:{marginBottom:10},children:o.jsx("div",{className:"grid",children:$==null?void 0:$.items.map((G,W)=>o.jsx("div",{className:"col-6",children:o.jsx(Ed,{data:G},G.uuid)},"form_elements_"+W))})},`pannel-tab-${le}`))})}),(t===M0||t===P0||t===Jh)&&o.jsx(wr,{header:"Layout",children:o.jsx("div",{className:"scroll-height-300",children:JG.map(($,le)=>o.jsx(ci,{header:$==null?void 0:$.label,toggleable:!0,style:{marginBottom:10},children:o.jsx("div",{className:"grid",children:$==null?void 0:$.items.map((G,W)=>o.jsx("div",{className:"col-6",children:o.jsx(Ed,{data:G},G.uuid)},"form_elements_"+W))})},`pannel-tab-${le}`))})}),t===Yd&&o.jsx(wr,{header:"Question bank",children:o.jsxs("div",{className:"grid scroll-height-300",children:[o.jsx("div",{className:"col-12",children:GH.map(($,le)=>o.jsx("div",{className:"grid",children:$==null?void 0:$.items.map((G,W)=>{const ue=It.cloneDeep(G);return o.jsx("div",{className:"col-6",children:o.jsx(Ed,{data:ue},G.uuid)},"form_elements_"+W)})},`new-quiz-${le}`))}),o.jsx("div",{className:"col-12 ",children:o.jsxs("div",{className:"p-inputgroup",children:[o.jsx(Sn,{placeholder:"Keyword",onChange:$=>{N($.target.value),$.target.value||(m({filter:"",page:1,per_page:10,sort:"created_at|desc"}),p())},onKeyDown:$=>$.key==="Enter"?z():null}),o.jsx(Ft,{icon:"pi pi-search",className:"p-button-info",onClick:()=>z()})]})}),C?o.jsx(p$,{}):o.jsx("div",{className:"scroll-height-500 w-full",children:E.map(($,le)=>{var G,W,ue,q,J;return o.jsx("div",{onScroll:M,ref:h,className:"col-12 ",children:o.jsx(Ed,{tags:[{severity:"success",label:$==null?void 0:$.subject_title},{severity:"info",label:$==null?void 0:$.course_category_title}],showIcon:(J=(q=(ue=(W=(G=a[0])==null?void 0:G.children[0])==null?void 0:W.children[0])==null?void 0:ue.children[0])==null?void 0:q.children)==null?void 0:J.some(te=>{var R,Y,X;return((R=te==null?void 0:te.questionText)==null?void 0:R[i.type])===((X=(Y=$==null?void 0:$.schema)==null?void 0:Y.questionText)==null?void 0:X[i.type])}),data:$},le)},"question_elements_"+le)})}),o.jsx(x,{})]})}),t===om&&o.jsx(wr,{header:"Training",children:o.jsx("div",{className:"scroll-height-300",children:eW.map(($,le)=>o.jsx(ci,{header:$==null?void 0:$.label,toggleable:!0,style:{marginBottom:10},children:o.jsx("div",{className:"grid",children:$==null?void 0:$.items.map((G,W)=>o.jsx("div",{className:"col-6",children:o.jsx(Ed,{data:G},G.uuid)},"form_elements_"+W))})},`pannel-tab-${le}`))})}),(t===M0||t===P0||t===Jh)&&o.jsxs(wr,{header:"Custom",children:[o.jsx("h6",{children:"Custom Sections"}),o.jsx("div",{className:"grid",children:(n==null?void 0:n.length)>0&&n.map(($,le)=>o.jsx("div",{className:"col-6",children:o.jsx(Ed,{data:{label:$==null?void 0:$.builder_element_title,element:"reusable_builder_section",schema:$==null?void 0:$.reusable_template_schema,uuid:tt(),type:ra}},$.uuid)},"reusable_elements_"+le))}),o.jsx("h6",{children:"Custom Matrix"}),o.jsx("div",{className:"grid",children:(e==null?void 0:e.length)>0&&e.map(($,le)=>o.jsx("div",{className:"col-6",children:o.jsx(Ed,{data:{label:$==null?void 0:$.custom_component_title,element:"custom_component",schema:JSON.parse($==null?void 0:$.custom_component_schema),uuid:tt(),type:er}},$.uuid)},"custom_component"+le))})]})]})})};function g$(t){return t}function fSe(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}var hSe=800,pSe=16,gSe=Date.now;function mSe(t){var e=0,n=0;return function(){var r=gSe(),i=pSe-(r-n);if(n=r,i>0){if(++e>=hSe)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function vSe(t){return function(){return t}}var bSe=I3?function(t,e){return I3(t,"toString",{configurable:!0,enumerable:!1,value:vSe(e),writable:!0})}:g$,ySe=mSe(bSe),m$=Math.max;function ASe(t,e,n){return e=m$(e===void 0?t.length-1:e,0),function(){for(var r=arguments,i=-1,a=m$(r.length-e,0),s=Array(a);++i<a;)s[i]=r[e+i];i=-1;for(var l=Array(e+1);++i<e;)l[i]=r[i];return l[e]=n(s),fSe(t,this,l)}}function wSe(t,e){return ySe(ASe(t,e,g$),t+"")}function SSe(t,e,n){if(!Jd(n))return!1;var r=typeof e;return(r=="number"?_3(n)&&GD(e,n.length):r=="string"&&e in n)?Rp(n[e],t):!1}function CSe(t){return wSe(function(e,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(a=t.length>3&&typeof a=="function"?(i--,a):void 0,s&&SSe(n[0],n[1],s)&&(a=i<3?void 0:a,i=1),e=Object(e);++r<i;){var l=n[r];l&&t(e,l,r,a)}return e})}var xSe="__lodash_hash_undefined__";function TSe(t){return this.__data__.set(t,xSe),this}function ESe(t){return this.__data__.has(t)}function O5(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new Zu;++e<n;)this.add(t[e])}O5.prototype.add=O5.prototype.push=TSe,O5.prototype.has=ESe;function ISe(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function _Se(t,e){return t.has(e)}var DSe=1,NSe=2;function v$(t,e,n,r,i,a){var s=n&DSe,l=t.length,c=e.length;if(l!=c&&!(s&&c>l))return!1;var u=a.get(t),d=a.get(e);if(u&&d)return u==e&&d==t;var f=-1,h=!0,p=n&NSe?new O5:void 0;for(a.set(t,e),a.set(e,t);++f<l;){var v=t[f],m=e[f];if(r)var A=s?r(m,v,f,e,t,a):r(v,m,f,t,e,a);if(A!==void 0){if(A)continue;h=!1;break}if(p){if(!ISe(e,function(w,C){if(!_Se(p,C)&&(v===w||i(v,w,n,r,a)))return p.push(C)})){h=!1;break}}else if(!(v===m||i(v,m,n,r,a))){h=!1;break}}return a.delete(t),a.delete(e),h}function OSe(t){var e=-1,n=Array(t.size);return t.forEach(function(r,i){n[++e]=[i,r]}),n}function FSe(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n}var kSe=1,PSe=2,MSe="[object Boolean]",LSe="[object Date]",BSe="[object Error]",VSe="[object Map]",qSe="[object Number]",USe="[object RegExp]",$Se="[object Set]",jSe="[object String]",zSe="[object Symbol]",HSe="[object ArrayBuffer]",YSe="[object DataView]",b$=au?au.prototype:void 0,Jw=b$?b$.valueOf:void 0;function KSe(t,e,n,r,i,a,s){switch(n){case YSe:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case HSe:return!(t.byteLength!=e.byteLength||!a(new D3(t),new D3(e)));case MSe:case LSe:case qSe:return Rp(+t,+e);case BSe:return t.name==e.name&&t.message==e.message;case USe:case jSe:return t==e+"";case VSe:var l=OSe;case $Se:var c=r&kSe;if(l||(l=FSe),t.size!=e.size&&!c)return!1;var u=s.get(t);if(u)return u==e;r|=PSe,s.set(t,e);var d=v$(l(t),l(e),r,i,a,s);return s.delete(t),d;case zSe:if(Jw)return Jw.call(t)==Jw.call(e)}return!1}var XSe=1,RSe=Object.prototype,GSe=RSe.hasOwnProperty;function WSe(t,e,n,r,i,a){var s=n&XSe,l=S7(t),c=l.length,u=S7(e),d=u.length;if(c!=d&&!s)return!1;for(var f=c;f--;){var h=l[f];if(!(s?h in e:GSe.call(e,h)))return!1}var p=a.get(t),v=a.get(e);if(p&&v)return p==e&&v==t;var m=!0;a.set(t,e),a.set(e,t);for(var A=s;++f<c;){h=l[f];var w=t[h],C=e[h];if(r)var x=s?r(C,w,h,e,t,a):r(w,C,h,t,e,a);if(!(x===void 0?w===C||i(w,C,n,r,a):x)){m=!1;break}A||(A=h=="constructor")}if(m&&!A){var T=t.constructor,S=e.constructor;T!=S&&"constructor"in t&&"constructor"in e&&!(typeof T=="function"&&T instanceof T&&typeof S=="function"&&S instanceof S)&&(m=!1)}return a.delete(t),a.delete(e),m}var QSe=1,y$="[object Arguments]",A$="[object Array]",F5="[object Object]",JSe=Object.prototype,w$=JSe.hasOwnProperty;function ZSe(t,e,n,r,i,a){var s=ed(t),l=ed(e),c=s?A$:xc(t),u=l?A$:xc(e);c=c==y$?F5:c,u=u==y$?F5:u;var d=c==F5,f=u==F5,h=c==u;if(h&&Jp(t)){if(!Jp(e))return!1;s=!0,d=!1}if(h&&!d)return a||(a=new ou),s||v7(t)?v$(t,e,n,r,i,a):KSe(t,e,c,n,r,i,a);if(!(n&QSe)){var p=d&&w$.call(t,"__wrapped__"),v=f&&w$.call(e,"__wrapped__");if(p||v){var m=p?t.value():t,A=v?e.value():e;return a||(a=new ou),i(m,A,n,r,a)}}return h?(a||(a=new ou),WSe(t,e,n,r,i,a)):!1}function S$(t,e,n,r,i){return t===e?!0:t==null||e==null||!su(t)&&!su(e)?t!==t&&e!==e:ZSe(t,e,n,r,S$,i)}function eCe(t){return function(e,n,r){for(var i=-1,a=Object(e),s=r(e),l=s.length;l--;){var c=s[++i];if(n(a[c],c,a)===!1)break}return e}}var tCe=eCe();function Zw(t,e,n){(n!==void 0&&!Rp(t[e],n)||n===void 0&&!(e in t))&&h7(t,e,n)}function nCe(t){return su(t)&&_3(t)}function eS(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function rCe(t){return Qp(t,e2(t))}function iCe(t,e,n,r,i,a,s){var l=eS(t,n),c=eS(e,n),u=s.get(c);if(u){Zw(t,n,u);return}var d=a?a(l,c,n+"",t,e,s):void 0,f=d===void 0;if(f){var h=ed(c),p=!h&&Jp(c),v=!h&&!p&&v7(c);d=c,h||p||v?ed(l)?d=l:nCe(l)?d=A7(l):p?(f=!1,d=iN(c,!0)):v?(f=!1,d=vN(c,!0)):d=[]:u7(c)||p7(c)?(d=l,p7(l)?d=rCe(l):(!Jd(l)||d7(l))&&(d=yN(c))):f=!1}f&&(s.set(c,d),i(d,c,r,a,s),s.delete(c)),Zw(t,n,d)}function C$(t,e,n,r,i){t!==e&&tCe(e,function(a,s){if(i||(i=new ou),Jd(a))iCe(t,e,s,n,C$,r,i);else{var l=r?r(eS(t,s),a,s+"",t,e,i):void 0;l===void 0&&(l=a),Zw(t,s,l)}},e2)}function tS(t,e){return S$(t,e)}var b0=CSe(function(t,e,n){C$(t,e,n)}),ur=(t=>(t[t.TYPE=3]="TYPE",t[t.LEVEL=12]="LEVEL",t[t.ATTRIBUTE=13]="ATTRIBUTE",t[t.BLOT=14]="BLOT",t[t.INLINE=7]="INLINE",t[t.BLOCK=11]="BLOCK",t[t.BLOCK_BLOT=10]="BLOCK_BLOT",t[t.INLINE_BLOT=6]="INLINE_BLOT",t[t.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",t[t.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",t[t.ANY=15]="ANY",t))(ur||{});class Ou{constructor(e,n,r={}){this.attrName=e,this.keyName=n;const i=ur.TYPE&ur.ATTRIBUTE;this.scope=r.scope!=null?r.scope&ur.LEVEL|i:ur.ATTRIBUTE,r.whitelist!=null&&(this.whitelist=r.whitelist)}static keys(e){return Array.from(e.attributes).map(n=>n.name)}add(e,n){return this.canAdd(e,n)?(e.setAttribute(this.keyName,n),!0):!1}canAdd(e,n){return this.whitelist==null?!0:typeof n=="string"?this.whitelist.indexOf(n.replace(/["']/g,""))>-1:this.whitelist.indexOf(n)>-1}remove(e){e.removeAttribute(this.keyName)}value(e){const n=e.getAttribute(this.keyName);return this.canAdd(e,n)&&n?n:""}}class kh extends Error{constructor(e){e="[Parchment] "+e,super(e),this.message=e,this.name=this.constructor.name}}const x$=class BC{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(e,n=!1){if(e==null)return null;if(this.blots.has(e))return this.blots.get(e)||null;if(n){let r=null;try{r=e.parentNode}catch{return null}return this.find(r,n)}return null}create(e,n,r){const i=this.query(n);if(i==null)throw new kh(`Unable to create ${n} blot`);const a=i,s=n instanceof Node||n.nodeType===Node.TEXT_NODE?n:a.create(r),l=new a(e,s,r);return BC.blots.set(l.domNode,l),l}find(e,n=!1){return BC.find(e,n)}query(e,n=ur.ANY){let r;return typeof e=="string"?r=this.types[e]||this.attributes[e]:e instanceof Text||e.nodeType===Node.TEXT_NODE?r=this.types.text:typeof e=="number"?e&ur.LEVEL&ur.BLOCK?r=this.types.block:e&ur.LEVEL&ur.INLINE&&(r=this.types.inline):e instanceof Element&&((e.getAttribute("class")||"").split(/\s+/).some(i=>(r=this.classes[i],!!r)),r=r||this.tags[e.tagName]),r==null?null:"scope"in r&&n&ur.LEVEL&r.scope&&n&ur.TYPE&r.scope?r:null}register(...e){return e.map(n=>{const r="blotName"in n,i="attrName"in n;if(!r&&!i)throw new kh("Invalid definition");if(r&&n.blotName==="abstract")throw new kh("Cannot register abstract class");const a=r?n.blotName:i?n.attrName:void 0;return this.types[a]=n,i?typeof n.keyName=="string"&&(this.attributes[n.keyName]=n):r&&(n.className&&(this.classes[n.className]=n),n.tagName&&(Array.isArray(n.tagName)?n.tagName=n.tagName.map(s=>s.toUpperCase()):n.tagName=n.tagName.toUpperCase(),(Array.isArray(n.tagName)?n.tagName:[n.tagName]).forEach(s=>{(this.tags[s]==null||n.className==null)&&(this.tags[s]=n)}))),n})}};x$.blots=new WeakMap;let Ph=x$;function T$(t,e){return(t.getAttribute("class")||"").split(/\s+/).filter(n=>n.indexOf(`${e}-`)===0)}class aCe extends Ou{static keys(e){return(e.getAttribute("class")||"").split(/\s+/).map(n=>n.split("-").slice(0,-1).join("-"))}add(e,n){return this.canAdd(e,n)?(this.remove(e),e.classList.add(`${this.keyName}-${n}`),!0):!1}remove(e){T$(e,this.keyName).forEach(n=>{e.classList.remove(n)}),e.classList.length===0&&e.removeAttribute("class")}value(e){const n=(T$(e,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(e,n)?n:""}}const qc=aCe;function nS(t){const e=t.split("-"),n=e.slice(1).map(r=>r[0].toUpperCase()+r.slice(1)).join("");return e[0]+n}class sCe extends Ou{static keys(e){return(e.getAttribute("style")||"").split(";").map(n=>n.split(":")[0].trim())}add(e,n){return this.canAdd(e,n)?(e.style[nS(this.keyName)]=n,!0):!1}remove(e){e.style[nS(this.keyName)]="",e.getAttribute("style")||e.removeAttribute("style")}value(e){const n=e.style[nS(this.keyName)];return this.canAdd(e,n)?n:""}}const y0=sCe;class oCe{constructor(e){this.attributes={},this.domNode=e,this.build()}attribute(e,n){n?e.add(this.domNode,n)&&(e.value(this.domNode)!=null?this.attributes[e.attrName]=e:delete this.attributes[e.attrName]):(e.remove(this.domNode),delete this.attributes[e.attrName])}build(){this.attributes={};const e=Ph.find(this.domNode);if(e==null)return;const n=Ou.keys(this.domNode),r=qc.keys(this.domNode),i=y0.keys(this.domNode);n.concat(r).concat(i).forEach(a=>{const s=e.scroll.query(a,ur.ATTRIBUTE);s instanceof Ou&&(this.attributes[s.attrName]=s)})}copy(e){Object.keys(this.attributes).forEach(n=>{const r=this.attributes[n].value(this.domNode);e.format(n,r)})}move(e){this.copy(e),Object.keys(this.attributes).forEach(n=>{this.attributes[n].remove(this.domNode)}),this.attributes={}}values(){return Object.keys(this.attributes).reduce((e,n)=>(e[n]=this.attributes[n].value(this.domNode),e),{})}}const k5=oCe,E$=class{constructor(e,n){this.scroll=e,this.domNode=n,Ph.blots.set(n,this),this.prev=null,this.next=null}static create(e){if(this.tagName==null)throw new kh("Blot definition missing tagName");let n,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"?n=document.createElement(this.tagName[r-1]):r&&this.tagName.indexOf(r)>-1?n=document.createElement(r):n=document.createElement(this.tagName[0])):n=document.createElement(this.tagName),this.className&&n.classList.add(this.className),n}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),Ph.blots.delete(this.domNode)}deleteAt(e,n){this.isolate(e,n).remove()}formatAt(e,n,r,i){const a=this.isolate(e,n);if(this.scroll.query(r,ur.BLOT)!=null&&i)a.wrap(r,i);else if(this.scroll.query(r,ur.ATTRIBUTE)!=null){const s=this.scroll.create(this.statics.scope);a.wrap(s),s.format(r,i)}}insertAt(e,n,r){const i=r==null?this.scroll.create("text",n):this.scroll.create(n,r),a=this.split(e);this.parent.insertBefore(i,a||void 0)}isolate(e,n){const r=this.split(e);if(r==null)throw new Error("Attempt to isolate at end");return r.split(n),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,n){const r=typeof e=="string"?this.scroll.create(e,n):e;return this.parent!=null&&(this.parent.insertBefore(r,this.next||void 0),this.remove()),r}split(e,n){return e===0?this:this.next}update(e,n){}wrap(e,n){const r=typeof e=="string"?this.scroll.create(e,n):e;if(this.parent!=null&&this.parent.insertBefore(r,this.next||void 0),typeof r.appendChild!="function")throw new kh(`Cannot wrap ${e}`);return r.appendChild(this),r}};E$.blotName="abstract";let I$=E$;const _$=class extends I${static value(e){return!0}index(e,n){return this.domNode===e||this.domNode.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(n,1):-1}position(e,n){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}}};_$.scope=ur.INLINE_BLOT;const mo=_$;class lCe{constructor(){this.head=null,this.tail=null,this.length=0}append(...e){if(this.insertBefore(e[0],null),e.length>1){const n=e.slice(1);this.append(...n)}}at(e){const n=this.iterator();let r=n();for(;r&&e>0;)e-=1,r=n();return r}contains(e){const n=this.iterator();let r=n();for(;r;){if(r===e)return!0;r=n()}return!1}indexOf(e){const n=this.iterator();let r=n(),i=0;for(;r;){if(r===e)return i;i+=1,r=n()}return-1}insertBefore(e,n){e!=null&&(this.remove(e),e.next=n,n!=null?(e.prev=n.prev,n.prev!=null&&(n.prev.next=e),n.prev=e,n===this.head&&(this.head=e)):this.tail!=null?(this.tail.next=e,e.prev=this.tail,this.tail=e):(e.prev=null,this.head=this.tail=e),this.length+=1)}offset(e){let n=0,r=this.head;for(;r!=null;){if(r===e)return n;n+=r.length(),r=r.next}return-1}remove(e){this.contains(e)&&(e.prev!=null&&(e.prev.next=e.next),e.next!=null&&(e.next.prev=e.prev),e===this.head&&(this.head=e.next),e===this.tail&&(this.tail=e.prev),this.length-=1)}iterator(e=this.head){return()=>{const n=e;return e!=null&&(e=e.next),n}}find(e,n=!1){const r=this.iterator();let i=r();for(;i;){const a=i.length();if(e<a||n&&e===a&&(i.next==null||i.next.length()!==0))return[i,e];e-=a,i=r()}return[null,0]}forEach(e){const n=this.iterator();let r=n();for(;r;)e(r),r=n()}forEachAt(e,n,r){if(n<=0)return;const[i,a]=this.find(e);let s=e-a;const l=this.iterator(i);let c=l();for(;c&&s<e+n;){const u=c.length();e>s?r(c,e-s,Math.min(n,s+u-e)):r(c,0,Math.min(u,e+n-s)),s+=u,c=l()}}map(e){return this.reduce((n,r)=>(n.push(e(r)),n),[])}reduce(e,n){const r=this.iterator();let i=r();for(;i;)n=e(n,i),i=r();return n}}function D$(t,e){const n=e.find(t);if(n)return n;try{return e.create(t)}catch{const r=e.create(ur.INLINE);return Array.from(t.childNodes).forEach(i=>{r.domNode.appendChild(i)}),t.parentNode&&t.parentNode.replaceChild(r.domNode,t),r.attach(),r}}const N$=class F0 extends I${constructor(e,n){super(e,n),this.uiNode=null,this.build()}appendChild(e){this.insertBefore(e)}attach(){super.attach(),this.children.forEach(e=>{e.attach()})}attachUI(e){this.uiNode!=null&&this.uiNode.remove(),this.uiNode=e,F0.uiClass&&this.uiNode.classList.add(F0.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new lCe,Array.from(this.domNode.childNodes).filter(e=>e!==this.uiNode).reverse().forEach(e=>{try{const n=D$(e,this.scroll);this.insertBefore(n,this.children.head||void 0)}catch(n){if(n instanceof kh)return;throw n}})}deleteAt(e,n){if(e===0&&n===this.length())return this.remove();this.children.forEachAt(e,n,(r,i,a)=>{r.deleteAt(i,a)})}descendant(e,n=0){const[r,i]=this.children.find(n);return e.blotName==null&&e(r)||e.blotName!=null&&r instanceof e?[r,i]:r instanceof F0?r.descendant(e,i):[null,-1]}descendants(e,n=0,r=Number.MAX_VALUE){let i=[],a=r;return this.children.forEachAt(n,r,(s,l,c)=>{(e.blotName==null&&e(s)||e.blotName!=null&&s instanceof e)&&i.push(s),s instanceof F0&&(i=i.concat(s.descendants(e,l,a))),a-=c}),i}detach(){this.children.forEach(e=>{e.detach()}),super.detach()}enforceAllowedChildren(){let e=!1;this.children.forEach(n=>{e||this.statics.allowedChildren.some(r=>n instanceof r)||(n.statics.scope===ur.BLOCK_BLOT?(n.next!=null&&this.splitAfter(n),n.prev!=null&&this.splitAfter(n.prev),n.parent.unwrap(),e=!0):n instanceof F0?n.unwrap():n.remove())})}formatAt(e,n,r,i){this.children.forEachAt(e,n,(a,s,l)=>{a.formatAt(s,l,r,i)})}insertAt(e,n,r){const[i,a]=this.children.find(e);if(i)i.insertAt(a,n,r);else{const s=r==null?this.scroll.create("text",n):this.scroll.create(n,r);this.appendChild(s)}}insertBefore(e,n){e.parent!=null&&e.parent.children.remove(e);let r=null;this.children.insertBefore(e,n||null),e.parent=this,n!=null&&(r=n.domNode),(this.domNode.parentNode!==e.domNode||this.domNode.nextSibling!==r)&&this.domNode.insertBefore(e.domNode,r),e.attach()}length(){return this.children.reduce((e,n)=>e+n.length(),0)}moveChildren(e,n){this.children.forEach(r=>{e.insertBefore(r,n)})}optimize(e){if(super.optimize(e),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 n=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(n)}else this.remove()}path(e,n=!1){const[r,i]=this.children.find(e,n),a=[[this,e]];return r instanceof F0?a.concat(r.path(i,n)):(r!=null&&a.push([r,i]),a)}removeChild(e){this.children.remove(e)}replaceWith(e,n){const r=typeof e=="string"?this.scroll.create(e,n):e;return r instanceof F0&&this.moveChildren(r),super.replaceWith(r)}split(e,n=!1){if(!n){if(e===0)return this;if(e===this.length())return this.next}const r=this.clone();return this.parent&&this.parent.insertBefore(r,this.next||void 0),this.children.forEachAt(e,this.length(),(i,a,s)=>{const l=i.split(a,n);l!=null&&r.appendChild(l)}),r}splitAfter(e){const n=this.clone();for(;e.next!=null;)n.appendChild(e.next);return this.parent&&this.parent.insertBefore(n,this.next||void 0),n}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()}update(e,n){const r=[],i=[];e.forEach(a=>{a.target===this.domNode&&a.type==="childList"&&(r.push(...a.addedNodes),i.push(...a.removedNodes))}),i.forEach(a=>{if(a.parentNode!=null&&a.tagName!=="IFRAME"&&document.body.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;const s=this.scroll.find(a);s!=null&&(s.domNode.parentNode==null||s.domNode.parentNode===this.domNode)&&s.detach()}),r.filter(a=>a.parentNode===this.domNode&&a!==this.uiNode).sort((a,s)=>a===s?0:a.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1).forEach(a=>{let s=null;a.nextSibling!=null&&(s=this.scroll.find(a.nextSibling));const l=D$(a,this.scroll);(l.next!==s||l.next==null)&&(l.parent!=null&&l.parent.removeChild(this),this.insertBefore(l,s||void 0))}),this.enforceAllowedChildren()}};N$.uiClass="";const Uc=N$;function cCe(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(t[n]!==e[n])return!1;return!0}const Mh=class Qh extends Uc{static create(e){return super.create(e)}static formats(e,n){const r=n.query(Qh.blotName);if(!(r!=null&&e.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return e.tagName.toLowerCase()}}constructor(e,n){super(e,n),this.attributes=new k5(this.domNode)}format(e,n){if(e===this.statics.blotName&&!n)this.children.forEach(r=>{r instanceof Qh||(r=r.wrap(Qh.blotName,!0)),this.attributes.copy(r)}),this.unwrap();else{const r=this.scroll.query(e,ur.INLINE);if(r==null)return;r instanceof Ou?this.attributes.attribute(r,n):n&&(e!==this.statics.blotName||this.formats()[e]!==n)&&this.replaceWith(e,n)}}formats(){const e=this.attributes.values(),n=this.statics.formats(this.domNode,this.scroll);return n!=null&&(e[this.statics.blotName]=n),e}formatAt(e,n,r,i){this.formats()[r]!=null||this.scroll.query(r,ur.ATTRIBUTE)?this.isolate(e,n).format(r,i):super.formatAt(e,n,r,i)}optimize(e){super.optimize(e);const n=this.formats();if(Object.keys(n).length===0)return this.unwrap();const r=this.next;r instanceof Qh&&r.prev===this&&cCe(n,r.formats())&&(r.moveChildren(this),r.remove())}replaceWith(e,n){const r=super.replaceWith(e,n);return this.attributes.copy(r),r}update(e,n){super.update(e,n),e.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}wrap(e,n){const r=super.wrap(e,n);return r instanceof Qh&&this.attributes.move(r),r}};Mh.allowedChildren=[Mh,mo],Mh.blotName="inline",Mh.scope=ur.INLINE_BLOT,Mh.tagName="SPAN";const rS=Mh,Lh=class VC extends Uc{static create(e){return super.create(e)}static formats(e,n){const r=n.query(VC.blotName);if(!(r!=null&&e.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return e.tagName.toLowerCase()}}constructor(e,n){super(e,n),this.attributes=new k5(this.domNode)}format(e,n){const r=this.scroll.query(e,ur.BLOCK);r!=null&&(r instanceof Ou?this.attributes.attribute(r,n):e===this.statics.blotName&&!n?this.replaceWith(VC.blotName):n&&(e!==this.statics.blotName||this.formats()[e]!==n)&&this.replaceWith(e,n))}formats(){const e=this.attributes.values(),n=this.statics.formats(this.domNode,this.scroll);return n!=null&&(e[this.statics.blotName]=n),e}formatAt(e,n,r,i){this.scroll.query(r,ur.BLOCK)!=null?this.format(r,i):super.formatAt(e,n,r,i)}insertAt(e,n,r){if(r==null||this.scroll.query(n,ur.INLINE)!=null)super.insertAt(e,n,r);else{const i=this.split(e);if(i!=null){const a=this.scroll.create(n,r);i.parent.insertBefore(a,i)}else throw new Error("Attempt to insertAt after block boundaries")}}replaceWith(e,n){const r=super.replaceWith(e,n);return this.attributes.copy(r),r}update(e,n){super.update(e,n),e.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}};Lh.blotName="block",Lh.scope=ur.BLOCK_BLOT,Lh.tagName="P",Lh.allowedChildren=[rS,Lh,mo];const Ig=Lh,iS=class extends Uc{checkMerge(){return this.next!==null&&this.next.statics.blotName===this.statics.blotName}deleteAt(e,n){super.deleteAt(e,n),this.enforceAllowedChildren()}formatAt(e,n,r,i){super.formatAt(e,n,r,i),this.enforceAllowedChildren()}insertAt(e,n,r){super.insertAt(e,n,r),this.enforceAllowedChildren()}optimize(e){super.optimize(e),this.children.length>0&&this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};iS.blotName="container",iS.scope=ur.BLOCK_BLOT;const P5=iS;class uCe extends mo{static formats(e,n){}format(e,n){super.formatAt(0,this.length(),e,n)}formatAt(e,n,r,i){e===0&&n===this.length()?this.format(r,i):super.formatAt(e,n,r,i)}formats(){return this.statics.formats(this.domNode,this.scroll)}}const _l=uCe,dCe={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},fCe=100,Bh=class extends Uc{constructor(e,n){super(null,n),this.registry=e,this.scroll=this,this.build(),this.observer=new MutationObserver(r=>{this.update(r)}),this.observer.observe(this.domNode,dCe),this.attach()}create(e,n){return this.registry.create(this,e,n)}find(e,n=!1){const r=this.registry.find(e,n);return r?r.scroll===this?r:n?this.find(r.scroll.domNode.parentNode,!0):null:null}query(e,n=ur.ANY){return this.registry.query(e,n)}register(...e){return this.registry.register(...e)}build(){this.scroll!=null&&super.build()}detach(){super.detach(),this.observer.disconnect()}deleteAt(e,n){this.update(),e===0&&n===this.length()?this.children.forEach(r=>{r.remove()}):super.deleteAt(e,n)}formatAt(e,n,r,i){this.update(),super.formatAt(e,n,r,i)}insertAt(e,n,r){this.update(),super.insertAt(e,n,r)}optimize(e=[],n={}){super.optimize(n);const r=n.mutationsMap||new WeakMap;let i=Array.from(this.observer.takeRecords());for(;i.length>0;)e.push(i.pop());const a=(c,u=!0)=>{c==null||c===this||c.domNode.parentNode!=null&&(r.has(c.domNode)||r.set(c.domNode,[]),u&&a(c.parent))},s=c=>{r.has(c.domNode)&&(c instanceof Uc&&c.children.forEach(s),r.delete(c.domNode),c.optimize(n))};let l=e;for(let c=0;l.length>0;c+=1){if(c>=fCe)throw new Error("[Parchment] Maximum optimize iterations reached");for(l.forEach(u=>{const d=this.find(u.target,!0);d!=null&&(d.domNode===u.target&&(u.type==="childList"?(a(this.find(u.previousSibling,!1)),Array.from(u.addedNodes).forEach(f=>{const h=this.find(f,!1);a(h,!1),h instanceof Uc&&h.children.forEach(p=>{a(p,!1)})})):u.type==="attributes"&&a(d.prev)),a(d))}),this.children.forEach(s),l=Array.from(this.observer.takeRecords()),i=l.slice();i.length>0;)e.push(i.pop())}}update(e,n={}){e=e||this.observer.takeRecords();const r=new WeakMap;e.map(i=>{const a=this.find(i.target,!0);return a==null?null:r.has(a.domNode)?(r.get(a.domNode).push(i),null):(r.set(a.domNode,[i]),a)}).forEach(i=>{i!=null&&i!==this&&r.has(i.domNode)&&i.update(r.get(i.domNode)||[],n)}),n.mutationsMap=r,r.has(this.domNode)&&super.update(r.get(this.domNode),n),this.optimize(e,n)}};Bh.blotName="scroll",Bh.defaultChild=Ig,Bh.allowedChildren=[Ig,P5],Bh.scope=ur.BLOCK_BLOT,Bh.tagName="DIV";const aS=Bh,sS=class wH extends mo{static create(e){return document.createTextNode(e)}static value(e){return e.data}constructor(e,n){super(e,n),this.text=this.statics.value(this.domNode)}deleteAt(e,n){this.domNode.data=this.text=this.text.slice(0,e)+this.text.slice(e+n)}index(e,n){return this.domNode===e?n:-1}insertAt(e,n,r){r==null?(this.text=this.text.slice(0,e)+n+this.text.slice(e),this.domNode.data=this.text):super.insertAt(e,n,r)}length(){return this.text.length}optimize(e){super.optimize(e),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof wH&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())}position(e,n=!1){return[this.domNode,e]}split(e,n=!1){if(!n){if(e===0)return this;if(e===this.length())return this.next}const r=this.scroll.create(this.domNode.splitText(e));return this.parent.insertBefore(r,this.next||void 0),this.text=this.statics.value(this.domNode),r}update(e,n){e.some(r=>r.type==="characterData"&&r.target===this.domNode)&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};sS.blotName="text",sS.scope=ur.INLINE_BLOT;const M5=sS,O$=Object.freeze(Object.defineProperty({__proto__:null,Attributor:Ou,AttributorStore:k5,BlockBlot:Ig,ClassAttributor:qc,ContainerBlot:P5,EmbedBlot:_l,InlineBlot:rS,LeafBlot:mo,ParentBlot:Uc,Registry:Ph,Scope:ur,ScrollBlot:aS,StyleAttributor:y0,TextBlot:M5},Symbol.toStringTag,{value:"Module"}));var oS={exports:{}},Dl=-1,Lo=1,Is=0;function _g(t,e,n,r,i){if(t===e)return t?[[Is,t]]:[];if(n!=null){var a=wCe(t,e,n);if(a)return a}var s=lS(t,e),l=t.substring(0,s);t=t.substring(s),e=e.substring(s),s=L5(t,e);var c=t.substring(t.length-s);t=t.substring(0,t.length-s),e=e.substring(0,e.length-s);var u=hCe(t,e);return l&&u.unshift([Is,l]),c&&u.push([Is,c]),cS(u,i),r&&mCe(u),u}function hCe(t,e){var n;if(!t)return[[Lo,e]];if(!e)return[[Dl,t]];var r=t.length>e.length?t:e,i=t.length>e.length?e:t,a=r.indexOf(i);if(a!==-1)return n=[[Lo,r.substring(0,a)],[Is,i],[Lo,r.substring(a+i.length)]],t.length>e.length&&(n[0][0]=n[2][0]=Dl),n;if(i.length===1)return[[Dl,t],[Lo,e]];var s=gCe(t,e);if(s){var l=s[0],c=s[1],u=s[2],d=s[3],f=s[4],h=_g(l,u),p=_g(c,d);return h.concat([[Is,f]],p)}return pCe(t,e)}function pCe(t,e){for(var n=t.length,r=e.length,i=Math.ceil((n+r)/2),a=i,s=2*i,l=new Array(s),c=new Array(s),u=0;u<s;u++)l[u]=-1,c[u]=-1;l[a+1]=0,c[a+1]=0;for(var d=n-r,f=d%2!==0,h=0,p=0,v=0,m=0,A=0;A<i;A++){for(var w=-A+h;w<=A-p;w+=2){var C=a+w,x;w===-A||w!==A&&l[C-1]<l[C+1]?x=l[C+1]:x=l[C-1]+1;for(var T=x-w;x<n&&T<r&&t.charAt(x)===e.charAt(T);)x++,T++;if(l[C]=x,x>n)p+=2;else if(T>r)h+=2;else if(f){var S=a+d-w;if(S>=0&&S<s&&c[S]!==-1){var E=n-c[S];if(x>=E)return F$(t,e,x,T)}}}for(var I=-A+v;I<=A-m;I+=2){var S=a+I,E;I===-A||I!==A&&c[S-1]<c[S+1]?E=c[S+1]:E=c[S-1]+1;for(var P=E-I;E<n&&P<r&&t.charAt(n-E-1)===e.charAt(r-P-1);)E++,P++;if(c[S]=E,E>n)m+=2;else if(P>r)v+=2;else if(!f){var C=a+d-I;if(C>=0&&C<s&&l[C]!==-1){var x=l[C],T=a+x-C;if(E=n-E,x>=E)return F$(t,e,x,T)}}}}return[[Dl,t],[Lo,e]]}function F$(t,e,n,r){var i=t.substring(0,n),a=e.substring(0,r),s=t.substring(n),l=e.substring(r),c=_g(i,a),u=_g(s,l);return c.concat(u)}function lS(t,e){if(!t||!e||t.charAt(0)!==e.charAt(0))return 0;for(var n=0,r=Math.min(t.length,e.length),i=r,a=0;n<i;)t.substring(a,i)==e.substring(a,i)?(n=i,a=n):r=i,i=Math.floor((r-n)/2+n);return B$(t.charCodeAt(i-1))&&i--,i}function k$(t,e){var n=t.length,r=e.length;if(n==0||r==0)return 0;n>r?t=t.substring(n-r):n<r&&(e=e.substring(0,n));var i=Math.min(n,r);if(t==e)return i;for(var a=0,s=1;;){var l=t.substring(i-s),c=e.indexOf(l);if(c==-1)return a;s+=c,(c==0||t.substring(i-s)==e.substring(0,s))&&(a=s,s++)}}function L5(t,e){if(!t||!e||t.slice(-1)!==e.slice(-1))return 0;for(var n=0,r=Math.min(t.length,e.length),i=r,a=0;n<i;)t.substring(t.length-i,t.length-a)==e.substring(e.length-i,e.length-a)?(n=i,a=n):r=i,i=Math.floor((r-n)/2+n);return V$(t.charCodeAt(t.length-i))&&i--,i}function gCe(t,e){var n=t.length>e.length?t:e,r=t.length>e.length?e:t;if(n.length<4||r.length*2<n.length)return null;function i(p,v,m){for(var A=p.substring(m,m+Math.floor(p.length/4)),w=-1,C="",x,T,S,E;(w=v.indexOf(A,w+1))!==-1;){var I=lS(p.substring(m),v.substring(w)),P=L5(p.substring(0,m),v.substring(0,w));C.length<P+I&&(C=v.substring(w-P,w)+v.substring(w,w+I),x=p.substring(0,m-P),T=p.substring(m+I),S=v.substring(0,w-P),E=v.substring(w+I))}return C.length*2>=p.length?[x,T,S,E,C]:null}var a=i(n,r,Math.ceil(n.length/4)),s=i(n,r,Math.ceil(n.length/2)),l;if(!a&&!s)return null;s?a?l=a[4].length>s[4].length?a:s:l=s:l=a;var c,u,d,f;t.length>e.length?(c=l[0],u=l[1],d=l[2],f=l[3]):(d=l[0],f=l[1],c=l[2],u=l[3]);var h=l[4];return[c,u,d,f,h]}function mCe(t){for(var e=!1,n=[],r=0,i=null,a=0,s=0,l=0,c=0,u=0;a<t.length;)t[a][0]==Is?(n[r++]=a,s=c,l=u,c=0,u=0,i=t[a][1]):(t[a][0]==Lo?c+=t[a][1].length:u+=t[a][1].length,i&&i.length<=Math.max(s,l)&&i.length<=Math.max(c,u)&&(t.splice(n[r-1],0,[Dl,i]),t[n[r-1]+1][0]=Lo,r--,r--,a=r>0?n[r-1]:-1,s=0,l=0,c=0,u=0,i=null,e=!0)),a++;for(e&&cS(t),yCe(t),a=1;a<t.length;){if(t[a-1][0]==Dl&&t[a][0]==Lo){var d=t[a-1][1],f=t[a][1],h=k$(d,f),p=k$(f,d);h>=p?(h>=d.length/2||h>=f.length/2)&&(t.splice(a,0,[Is,f.substring(0,h)]),t[a-1][1]=d.substring(0,d.length-h),t[a+1][1]=f.substring(h),a++):(p>=d.length/2||p>=f.length/2)&&(t.splice(a,0,[Is,d.substring(0,p)]),t[a-1][0]=Lo,t[a-1][1]=f.substring(0,f.length-p),t[a+1][0]=Dl,t[a+1][1]=d.substring(p),a++),a++}a++}}var P$=/[^a-zA-Z0-9]/,M$=/\s/,L$=/[\r\n]/,vCe=/\n\r?\n$/,bCe=/^\r?\n\r?\n/;function yCe(t){function e(p,v){if(!p||!v)return 6;var m=p.charAt(p.length-1),A=v.charAt(0),w=m.match(P$),C=A.match(P$),x=w&&m.match(M$),T=C&&A.match(M$),S=x&&m.match(L$),E=T&&A.match(L$),I=S&&p.match(vCe),P=E&&v.match(bCe);return I||P?5:S||E?4:w&&!x&&T?3:x||T?2:w||C?1:0}for(var n=1;n<t.length-1;){if(t[n-1][0]==Is&&t[n+1][0]==Is){var r=t[n-1][1],i=t[n][1],a=t[n+1][1],s=L5(r,i);if(s){var l=i.substring(i.length-s);r=r.substring(0,r.length-s),i=l+i.substring(0,i.length-s),a=l+a}for(var c=r,u=i,d=a,f=e(r,i)+e(i,a);i.charAt(0)===a.charAt(0);){r+=i.charAt(0),i=i.substring(1)+a.charAt(0),a=a.substring(1);var h=e(r,i)+e(i,a);h>=f&&(f=h,c=r,u=i,d=a)}t[n-1][1]!=c&&(c?t[n-1][1]=c:(t.splice(n-1,1),n--),t[n][1]=u,d?t[n+1][1]=d:(t.splice(n+1,1),n--))}n++}}function cS(t,e){t.push([Is,""]);for(var n=0,r=0,i=0,a="",s="",l;n<t.length;){if(n<t.length-1&&!t[n][1]){t.splice(n,1);continue}switch(t[n][0]){case Lo:i++,s+=t[n][1],n++;break;case Dl:r++,a+=t[n][1],n++;break;case Is:var c=n-i-r-1;if(e){if(c>=0&&U$(t[c][1])){var u=t[c][1].slice(-1);if(t[c][1]=t[c][1].slice(0,-1),a=u+a,s=u+s,!t[c][1]){t.splice(c,1),n--;var d=c-1;t[d]&&t[d][0]===Lo&&(i++,s=t[d][1]+s,d--),t[d]&&t[d][0]===Dl&&(r++,a=t[d][1]+a,d--),c=d}}if(q$(t[n][1])){var u=t[n][1].charAt(0);t[n][1]=t[n][1].slice(1),a+=u,s+=u}}if(n<t.length-1&&!t[n][1]){t.splice(n,1);break}if(a.length>0||s.length>0){a.length>0&&s.length>0&&(l=lS(s,a),l!==0&&(c>=0?t[c][1]+=s.substring(0,l):(t.splice(0,0,[Is,s.substring(0,l)]),n++),s=s.substring(l),a=a.substring(l)),l=L5(s,a),l!==0&&(t[n][1]=s.substring(s.length-l)+t[n][1],s=s.substring(0,s.length-l),a=a.substring(0,a.length-l)));var f=i+r;a.length===0&&s.length===0?(t.splice(n-f,f),n=n-f):a.length===0?(t.splice(n-f,f,[Lo,s]),n=n-f+1):s.length===0?(t.splice(n-f,f,[Dl,a]),n=n-f+1):(t.splice(n-f,f,[Dl,a],[Lo,s]),n=n-f+2)}n!==0&&t[n-1][0]===Is?(t[n-1][1]+=t[n][1],t.splice(n,1)):n++,i=0,r=0,a="",s="";break}}t[t.length-1][1]===""&&t.pop();var h=!1;for(n=1;n<t.length-1;)t[n-1][0]===Is&&t[n+1][0]===Is&&(t[n][1].substring(t[n][1].length-t[n-1][1].length)===t[n-1][1]?(t[n][1]=t[n-1][1]+t[n][1].substring(0,t[n][1].length-t[n-1][1].length),t[n+1][1]=t[n-1][1]+t[n+1][1],t.splice(n-1,1),h=!0):t[n][1].substring(0,t[n+1][1].length)==t[n+1][1]&&(t[n-1][1]+=t[n+1][1],t[n][1]=t[n][1].substring(t[n+1][1].length)+t[n+1][1],t.splice(n+1,1),h=!0)),n++;h&&cS(t,e)}function B$(t){return t>=55296&&t<=56319}function V$(t){return t>=56320&&t<=57343}function q$(t){return V$(t.charCodeAt(0))}function U$(t){return B$(t.charCodeAt(t.length-1))}function ACe(t){for(var e=[],n=0;n<t.length;n++)t[n][1].length>0&&e.push(t[n]);return e}function uS(t,e,n,r){return U$(t)||q$(r)?null:ACe([[Is,t],[Dl,e],[Lo,n],[Is,r]])}function wCe(t,e,n){var r=typeof n=="number"?{index:n,length:0}:n.oldRange,i=typeof n=="number"?null:n.newRange,a=t.length,s=e.length;if(r.length===0&&(i===null||i.length===0)){var l=r.index,c=t.slice(0,l),u=t.slice(l),d=i?i.index:null;e:{var f=l+s-a;if(d!==null&&d!==f||f<0||f>s)break e;var h=e.slice(0,f),p=e.slice(f);if(p!==u)break e;var v=Math.min(l,f),m=c.slice(0,v),A=h.slice(0,v);if(m!==A)break e;var w=c.slice(v),C=h.slice(v);return uS(m,w,C,u)}e:{if(d!==null&&d!==l)break e;var x=l,h=e.slice(0,x),p=e.slice(x);if(h!==c)break e;var T=Math.min(a-x,s-x),S=u.slice(u.length-T),E=p.slice(p.length-T);if(S!==E)break e;var w=u.slice(0,u.length-T),C=p.slice(0,p.length-T);return uS(c,w,C,S)}}if(r.length>0&&i&&i.length===0)e:{var m=t.slice(0,r.index),S=t.slice(r.index+r.length),v=m.length,T=S.length;if(s<v+T)break e;var A=e.slice(0,v),E=e.slice(s-T);if(m!==A||S!==E)break e;var w=t.slice(v,a-T),C=e.slice(v,s-T);return uS(m,w,C,S)}return null}function B5(t,e,n,r){return _g(t,e,n,r,!0)}B5.INSERT=Lo,B5.DELETE=Dl,B5.EQUAL=Is;var SCe=B5,V5={exports:{}};V5.exports,function(t,e){var n=200,r="__lodash_hash_undefined__",i=9007199254740991,a="[object Arguments]",s="[object Array]",l="[object Boolean]",c="[object Date]",u="[object Error]",d="[object Function]",f="[object GeneratorFunction]",h="[object Map]",p="[object Number]",v="[object Object]",m="[object Promise]",A="[object RegExp]",w="[object Set]",C="[object String]",x="[object Symbol]",T="[object WeakMap]",S="[object ArrayBuffer]",E="[object DataView]",I="[object Float32Array]",P="[object Float64Array]",N="[object Int8Array]",k="[object Int16Array]",M="[object Int32Array]",z="[object Uint8Array]",O="[object Uint8ClampedArray]",H="[object Uint16Array]",$="[object Uint32Array]",le=/[\\^$.*+?()[\]{}|]/g,G=/\w*$/,W=/^\[object .+?Constructor\]$/,ue=/^(?:0|[1-9]\d*)$/,q={};q[a]=q[s]=q[S]=q[E]=q[l]=q[c]=q[I]=q[P]=q[N]=q[k]=q[M]=q[h]=q[p]=q[v]=q[A]=q[w]=q[C]=q[x]=q[z]=q[O]=q[H]=q[$]=!0,q[u]=q[d]=q[T]=!1;var J=typeof Oi=="object"&&Oi&&Oi.Object===Object&&Oi,te=typeof self=="object"&&self&&self.Object===Object&&self,R=J||te||Function("return this")(),Y=e&&!e.nodeType&&e,X=Y&&!0&&t&&!t.nodeType&&t,fe=X&&X.exports===Y;function me(ie,Me){return ie.set(Me[0],Me[1]),ie}function Ae(ie,Me){return ie.add(Me),ie}function be(ie,Me){for(var rt=-1,Vt=ie?ie.length:0;++rt<Vt&&Me(ie[rt],rt,ie)!==!1;);return ie}function oe(ie,Me){for(var rt=-1,Vt=Me.length,Tr=ie.length;++rt<Vt;)ie[Tr+rt]=Me[rt];return ie}function re(ie,Me,rt,Vt){for(var Tr=-1,ir=ie?ie.length:0;++Tr<ir;)rt=Me(rt,ie[Tr],Tr,ie);return rt}function B(ie,Me){for(var rt=-1,Vt=Array(ie);++rt<ie;)Vt[rt]=Me(rt);return Vt}function ne(ie,Me){return ie==null?void 0:ie[Me]}function se(ie){var Me=!1;if(ie!=null&&typeof ie.toString!="function")try{Me=!!(ie+"")}catch{}return Me}function pe(ie){var Me=-1,rt=Array(ie.size);return ie.forEach(function(Vt,Tr){rt[++Me]=[Tr,Vt]}),rt}function Ne(ie,Me){return function(rt){return ie(Me(rt))}}function we(ie){var Me=-1,rt=Array(ie.size);return ie.forEach(function(Vt){rt[++Me]=Vt}),rt}var ve=Array.prototype,ce=Function.prototype,Te=Object.prototype,Ee=R["__core-js_shared__"],K=function(){var ie=/[^.]+$/.exec(Ee&&Ee.keys&&Ee.keys.IE_PROTO||"");return ie?"Symbol(src)_1."+ie:""}(),Ce=ce.toString,ye=Te.hasOwnProperty,ge=Te.toString,he=RegExp("^"+Ce.call(ye).replace(le,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),_e=fe?R.Buffer:void 0,Le=R.Symbol,Ve=R.Uint8Array,Ze=Ne(Object.getPrototypeOf,Object),st=Object.create,ct=Te.propertyIsEnumerable,At=ve.splice,$t=Object.getOwnPropertySymbols,gn=_e?_e.isBuffer:void 0,kt=Ne(Object.keys,Object),mn=xi(R,"DataView"),Un=xi(R,"Map"),xt=xi(R,"Promise"),je=xi(R,"Set"),He=xi(R,"WeakMap"),it=xi(Object,"create"),an=Vr(mn),jt=Vr(Un),Xt=Vr(xt),Wt=Vr(je),ht=Vr(He),qe=Le?Le.prototype:void 0,nt=qe?qe.valueOf:void 0;function Dt(ie){var Me=-1,rt=ie?ie.length:0;for(this.clear();++Me<rt;){var Vt=ie[Me];this.set(Vt[0],Vt[1])}}function Bt(){this.__data__=it?it(null):{}}function _n(ie){return this.has(ie)&&delete this.__data__[ie]}function Gn(ie){var Me=this.__data__;if(it){var rt=Me[ie];return rt===r?void 0:rt}return ye.call(Me,ie)?Me[ie]:void 0}function lr(ie){var Me=this.__data__;return it?Me[ie]!==void 0:ye.call(Me,ie)}function Wn(ie,Me){var rt=this.__data__;return rt[ie]=it&&Me===void 0?r:Me,this}Dt.prototype.clear=Bt,Dt.prototype.delete=_n,Dt.prototype.get=Gn,Dt.prototype.has=lr,Dt.prototype.set=Wn;function vr(ie){var Me=-1,rt=ie?ie.length:0;for(this.clear();++Me<rt;){var Vt=ie[Me];this.set(Vt[0],Vt[1])}}function Nr(){this.__data__=[]}function An(ie){var Me=this.__data__,rt=ae(Me,ie);if(rt<0)return!1;var Vt=Me.length-1;return rt==Vt?Me.pop():At.call(Me,rt,1),!0}function ot(ie){var Me=this.__data__,rt=ae(Me,ie);return rt<0?void 0:Me[rt][1]}function ut(ie){return ae(this.__data__,ie)>-1}function bt(ie,Me){var rt=this.__data__,Vt=ae(rt,ie);return Vt<0?rt.push([ie,Me]):rt[Vt][1]=Me,this}vr.prototype.clear=Nr,vr.prototype.delete=An,vr.prototype.get=ot,vr.prototype.has=ut,vr.prototype.set=bt;function Nt(ie){var Me=-1,rt=ie?ie.length:0;for(this.clear();++Me<rt;){var Vt=ie[Me];this.set(Vt[0],Vt[1])}}function wn(){this.__data__={hash:new Dt,map:new(Un||vr),string:new Dt}}function Nn(ie){return Ui(this,ie).delete(ie)}function Et(ie){return Ui(this,ie).get(ie)}function Fe(ie){return Ui(this,ie).has(ie)}function We(ie,Me){return Ui(this,ie).set(ie,Me),this}Nt.prototype.clear=wn,Nt.prototype.delete=Nn,Nt.prototype.get=Et,Nt.prototype.has=Fe,Nt.prototype.set=We;function yt(ie){this.__data__=new vr(ie)}function zt(){this.__data__=new vr}function Gt(ie){return this.__data__.delete(ie)}function tn(ie){return this.__data__.get(ie)}function Cn(ie){return this.__data__.has(ie)}function Pn(ie,Me){var rt=this.__data__;if(rt instanceof vr){var Vt=rt.__data__;if(!Un||Vt.length<n-1)return Vt.push([ie,Me]),this;rt=this.__data__=new Nt(Vt)}return rt.set(ie,Me),this}yt.prototype.clear=zt,yt.prototype.delete=Gt,yt.prototype.get=tn,yt.prototype.has=Cn,yt.prototype.set=Pn;function jn(ie,Me){var rt=Tt(ie)||Ye(ie)?B(ie.length,String):[],Vt=rt.length,Tr=!!Vt;for(var ir in ie)ye.call(ie,ir)&&!(Tr&&(ir=="length"||$n(ir,Vt)))&&rt.push(ir);return rt}function at(ie,Me,rt){var Vt=ie[Me];(!(ye.call(ie,Me)&&yn(Vt,rt))||rt===void 0&&!(Me in ie))&&(ie[Me]=rt)}function ae(ie,Me){for(var rt=ie.length;rt--;)if(yn(ie[rt][0],Me))return rt;return-1}function Pe(ie,Me){return ie&&ui(Me,bo(Me),ie)}function Ge(ie,Me,rt,Vt,Tr,ir,Rr){var Or;if(Vt&&(Or=ir?Vt(ie,Tr,ir,Rr):Vt(ie)),Or!==void 0)return Or;if(!fa(ie))return ie;var Cr=Tt(ie);if(Cr){if(Or=hn(ie),!Me)return ai(ie,Or)}else{var Gr=zi(ie),Ti=Gr==d||Gr==f;if(br(ie))return zn(ie,Me);if(Gr==v||Gr==a||Ti&&!ir){if(se(ie))return ir?ie:{};if(Or=$e(Ti?{}:ie),!Me)return ki(ie,Pe(Or,ie))}else{if(!q[Gr])return ir?ie:{};Or=Rt(ie,Gr,Ge,Me)}}Rr||(Rr=new yt);var Ga=Rr.get(ie);if(Ga)return Ga;if(Rr.set(ie,Or),!Cr)var Hi=rt?tr(ie):bo(ie);return be(Hi||ie,function(gi,wa){Hi&&(wa=gi,gi=ie[wa]),at(Or,wa,Ge(gi,Me,rt,Vt,wa,ie,Rr))}),Or}function dt(ie){return fa(ie)?st(ie):{}}function Ct(ie,Me,rt){var Vt=Me(ie);return Tt(ie)?Vt:oe(Vt,rt(ie))}function Qt(ie){return ge.call(ie)}function Dn(ie){if(!fa(ie)||kr(ie))return!1;var Me=Pr(ie)||se(ie)?he:W;return Me.test(Vr(ie))}function Fn(ie){if(!Ra(ie))return kt(ie);var Me=[];for(var rt in Object(ie))ye.call(ie,rt)&&rt!="constructor"&&Me.push(rt);return Me}function zn(ie,Me){if(Me)return ie.slice();var rt=new ie.constructor(ie.length);return ie.copy(rt),rt}function Mr(ie){var Me=new ie.constructor(ie.byteLength);return new Ve(Me).set(new Ve(ie)),Me}function Kr(ie,Me){var rt=Me?Mr(ie.buffer):ie.buffer;return new ie.constructor(rt,ie.byteOffset,ie.byteLength)}function Vn(ie,Me,rt){var Vt=Me?rt(pe(ie),!0):pe(ie);return re(Vt,me,new ie.constructor)}function On(ie){var Me=new ie.constructor(ie.source,G.exec(ie));return Me.lastIndex=ie.lastIndex,Me}function sr(ie,Me,rt){var Vt=Me?rt(we(ie),!0):we(ie);return re(Vt,Ae,new ie.constructor)}function Br(ie){return nt?Object(nt.call(ie)):{}}function pi(ie,Me){var rt=Me?Mr(ie.buffer):ie.buffer;return new ie.constructor(rt,ie.byteOffset,ie.length)}function ai(ie,Me){var rt=-1,Vt=ie.length;for(Me||(Me=Array(Vt));++rt<Vt;)Me[rt]=ie[rt];return Me}function ui(ie,Me,rt,Vt){rt||(rt={});for(var Tr=-1,ir=Me.length;++Tr<ir;){var Rr=Me[Tr],Or=void 0;at(rt,Rr,Or===void 0?ie[Rr]:Or)}return rt}function ki(ie,Me){return ui(ie,wi(ie),Me)}function tr(ie){return Ct(ie,bo,wi)}function Ui(ie,Me){var rt=ie.__data__;return jr(Me)?rt[typeof Me=="string"?"string":"hash"]:rt.map}function xi(ie,Me){var rt=ne(ie,Me);return Dn(rt)?rt:void 0}var wi=$t?Ne($t,Object):Xr,zi=Qt;(mn&&zi(new mn(new ArrayBuffer(1)))!=E||Un&&zi(new Un)!=h||xt&&zi(xt.resolve())!=m||je&&zi(new je)!=w||He&&zi(new He)!=T)&&(zi=function(ie){var Me=ge.call(ie),rt=Me==v?ie.constructor:void 0,Vt=rt?Vr(rt):void 0;if(Vt)switch(Vt){case an:return E;case jt:return h;case Xt:return m;case Wt:return w;case ht:return T}return Me});function hn(ie){var Me=ie.length,rt=ie.constructor(Me);return Me&&typeof ie[0]=="string"&&ye.call(ie,"index")&&(rt.index=ie.index,rt.input=ie.input),rt}function $e(ie){return typeof ie.constructor=="function"&&!Ra(ie)?dt(Ze(ie)):{}}function Rt(ie,Me,rt,Vt){var Tr=ie.constructor;switch(Me){case S:return Mr(ie);case l:case c:return new Tr(+ie);case E:return Kr(ie,Vt);case I:case P:case N:case k:case M:case z:case O:case H:case $:return pi(ie,Vt);case h:return Vn(ie,Vt,rt);case p:case C:return new Tr(ie);case A:return On(ie);case w:return sr(ie,Vt,rt);case x:return Br(ie)}}function $n(ie,Me){return Me=Me??i,!!Me&&(typeof ie=="number"||ue.test(ie))&&ie>-1&&ie%1==0&&ie<Me}function jr(ie){var Me=typeof ie;return Me=="string"||Me=="number"||Me=="symbol"||Me=="boolean"?ie!=="__proto__":ie===null}function kr(ie){return!!K&&K in ie}function Ra(ie){var Me=ie&&ie.constructor,rt=typeof Me=="function"&&Me.prototype||Te;return ie===rt}function Vr(ie){if(ie!=null){try{return Ce.call(ie)}catch{}try{return ie+""}catch{}}return""}function _s(ie){return Ge(ie,!0,!0)}function yn(ie,Me){return ie===Me||ie!==ie&&Me!==Me}function Ye(ie){return Jn(ie)&&ye.call(ie,"callee")&&(!ct.call(ie,"callee")||ge.call(ie)==a)}var Tt=Array.isArray;function Zt(ie){return ie!=null&&la(ie.length)&&!Pr(ie)}function Jn(ie){return Us(ie)&&Zt(ie)}var br=gn||di;function Pr(ie){var Me=fa(ie)?ge.call(ie):"";return Me==d||Me==f}function la(ie){return typeof ie=="number"&&ie>-1&&ie%1==0&&ie<=i}function fa(ie){var Me=typeof ie;return!!ie&&(Me=="object"||Me=="function")}function Us(ie){return!!ie&&typeof ie=="object"}function bo(ie){return Zt(ie)?jn(ie):Fn(ie)}function Xr(){return[]}function di(){return!1}t.exports=_s}(V5,V5.exports);var $$=V5.exports,q5={exports:{}};q5.exports,function(t,e){var n=200,r="__lodash_hash_undefined__",i=1,a=2,s=9007199254740991,l="[object Arguments]",c="[object Array]",u="[object AsyncFunction]",d="[object Boolean]",f="[object Date]",h="[object Error]",p="[object Function]",v="[object GeneratorFunction]",m="[object Map]",A="[object Number]",w="[object Null]",C="[object Object]",x="[object Promise]",T="[object Proxy]",S="[object RegExp]",E="[object Set]",I="[object String]",P="[object Symbol]",N="[object Undefined]",k="[object WeakMap]",M="[object ArrayBuffer]",z="[object DataView]",O="[object Float32Array]",H="[object Float64Array]",$="[object Int8Array]",le="[object Int16Array]",G="[object Int32Array]",W="[object Uint8Array]",ue="[object Uint8ClampedArray]",q="[object Uint16Array]",J="[object Uint32Array]",te=/[\\^$.*+?()[\]{}|]/g,R=/^\[object .+?Constructor\]$/,Y=/^(?:0|[1-9]\d*)$/,X={};X[O]=X[H]=X[$]=X[le]=X[G]=X[W]=X[ue]=X[q]=X[J]=!0,X[l]=X[c]=X[M]=X[d]=X[z]=X[f]=X[h]=X[p]=X[m]=X[A]=X[C]=X[S]=X[E]=X[I]=X[k]=!1;var fe=typeof Oi=="object"&&Oi&&Oi.Object===Object&&Oi,me=typeof self=="object"&&self&&self.Object===Object&&self,Ae=fe||me||Function("return this")(),be=e&&!e.nodeType&&e,oe=be&&!0&&t&&!t.nodeType&&t,re=oe&&oe.exports===be,B=re&&fe.process,ne=function(){try{return B&&B.binding&&B.binding("util")}catch{}}(),se=ne&&ne.isTypedArray;function pe(ie,Me){for(var rt=-1,Vt=ie==null?0:ie.length,Tr=0,ir=[];++rt<Vt;){var Rr=ie[rt];Me(Rr,rt,ie)&&(ir[Tr++]=Rr)}return ir}function Ne(ie,Me){for(var rt=-1,Vt=Me.length,Tr=ie.length;++rt<Vt;)ie[Tr+rt]=Me[rt];return ie}function we(ie,Me){for(var rt=-1,Vt=ie==null?0:ie.length;++rt<Vt;)if(Me(ie[rt],rt,ie))return!0;return!1}function ve(ie,Me){for(var rt=-1,Vt=Array(ie);++rt<ie;)Vt[rt]=Me(rt);return Vt}function ce(ie){return function(Me){return ie(Me)}}function Te(ie,Me){return ie.has(Me)}function Ee(ie,Me){return ie==null?void 0:ie[Me]}function K(ie){var Me=-1,rt=Array(ie.size);return ie.forEach(function(Vt,Tr){rt[++Me]=[Tr,Vt]}),rt}function Ce(ie,Me){return function(rt){return ie(Me(rt))}}function ye(ie){var Me=-1,rt=Array(ie.size);return ie.forEach(function(Vt){rt[++Me]=Vt}),rt}var ge=Array.prototype,he=Function.prototype,_e=Object.prototype,Le=Ae["__core-js_shared__"],Ve=he.toString,Ze=_e.hasOwnProperty,st=function(){var ie=/[^.]+$/.exec(Le&&Le.keys&&Le.keys.IE_PROTO||"");return ie?"Symbol(src)_1."+ie:""}(),ct=_e.toString,At=RegExp("^"+Ve.call(Ze).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$t=re?Ae.Buffer:void 0,gn=Ae.Symbol,kt=Ae.Uint8Array,mn=_e.propertyIsEnumerable,Un=ge.splice,xt=gn?gn.toStringTag:void 0,je=Object.getOwnPropertySymbols,He=$t?$t.isBuffer:void 0,it=Ce(Object.keys,Object),an=wi(Ae,"DataView"),jt=wi(Ae,"Map"),Xt=wi(Ae,"Promise"),Wt=wi(Ae,"Set"),ht=wi(Ae,"WeakMap"),qe=wi(Object,"create"),nt=Vr(an),Dt=Vr(jt),Bt=Vr(Xt),_n=Vr(Wt),Gn=Vr(ht),lr=gn?gn.prototype:void 0,Wn=lr?lr.valueOf:void 0;function vr(ie){var Me=-1,rt=ie==null?0:ie.length;for(this.clear();++Me<rt;){var Vt=ie[Me];this.set(Vt[0],Vt[1])}}function Nr(){this.__data__=qe?qe(null):{},this.size=0}function An(ie){var Me=this.has(ie)&&delete this.__data__[ie];return this.size-=Me?1:0,Me}function ot(ie){var Me=this.__data__;if(qe){var rt=Me[ie];return rt===r?void 0:rt}return Ze.call(Me,ie)?Me[ie]:void 0}function ut(ie){var Me=this.__data__;return qe?Me[ie]!==void 0:Ze.call(Me,ie)}function bt(ie,Me){var rt=this.__data__;return this.size+=this.has(ie)?0:1,rt[ie]=qe&&Me===void 0?r:Me,this}vr.prototype.clear=Nr,vr.prototype.delete=An,vr.prototype.get=ot,vr.prototype.has=ut,vr.prototype.set=bt;function Nt(ie){var Me=-1,rt=ie==null?0:ie.length;for(this.clear();++Me<rt;){var Vt=ie[Me];this.set(Vt[0],Vt[1])}}function wn(){this.__data__=[],this.size=0}function Nn(ie){var Me=this.__data__,rt=zn(Me,ie);if(rt<0)return!1;var Vt=Me.length-1;return rt==Vt?Me.pop():Un.call(Me,rt,1),--this.size,!0}function Et(ie){var Me=this.__data__,rt=zn(Me,ie);return rt<0?void 0:Me[rt][1]}function Fe(ie){return zn(this.__data__,ie)>-1}function We(ie,Me){var rt=this.__data__,Vt=zn(rt,ie);return Vt<0?(++this.size,rt.push([ie,Me])):rt[Vt][1]=Me,this}Nt.prototype.clear=wn,Nt.prototype.delete=Nn,Nt.prototype.get=Et,Nt.prototype.has=Fe,Nt.prototype.set=We;function yt(ie){var Me=-1,rt=ie==null?0:ie.length;for(this.clear();++Me<rt;){var Vt=ie[Me];this.set(Vt[0],Vt[1])}}function zt(){this.size=0,this.__data__={hash:new vr,map:new(jt||Nt),string:new vr}}function Gt(ie){var Me=xi(this,ie).delete(ie);return this.size-=Me?1:0,Me}function tn(ie){return xi(this,ie).get(ie)}function Cn(ie){return xi(this,ie).has(ie)}function Pn(ie,Me){var rt=xi(this,ie),Vt=rt.size;return rt.set(ie,Me),this.size+=rt.size==Vt?0:1,this}yt.prototype.clear=zt,yt.prototype.delete=Gt,yt.prototype.get=tn,yt.prototype.has=Cn,yt.prototype.set=Pn;function jn(ie){var Me=-1,rt=ie==null?0:ie.length;for(this.__data__=new yt;++Me<rt;)this.add(ie[Me])}function at(ie){return this.__data__.set(ie,r),this}function ae(ie){return this.__data__.has(ie)}jn.prototype.add=jn.prototype.push=at,jn.prototype.has=ae;function Pe(ie){var Me=this.__data__=new Nt(ie);this.size=Me.size}function Ge(){this.__data__=new Nt,this.size=0}function dt(ie){var Me=this.__data__,rt=Me.delete(ie);return this.size=Me.size,rt}function Ct(ie){return this.__data__.get(ie)}function Qt(ie){return this.__data__.has(ie)}function Dn(ie,Me){var rt=this.__data__;if(rt instanceof Nt){var Vt=rt.__data__;if(!jt||Vt.length<n-1)return Vt.push([ie,Me]),this.size=++rt.size,this;rt=this.__data__=new yt(Vt)}return rt.set(ie,Me),this.size=rt.size,this}Pe.prototype.clear=Ge,Pe.prototype.delete=dt,Pe.prototype.get=Ct,Pe.prototype.has=Qt,Pe.prototype.set=Dn;function Fn(ie,Me){var rt=Ye(ie),Vt=!rt&&yn(ie),Tr=!rt&&!Vt&&Zt(ie),ir=!rt&&!Vt&&!Tr&&Us(ie),Rr=rt||Vt||Tr||ir,Or=Rr?ve(ie.length,String):[],Cr=Or.length;for(var Gr in ie)Ze.call(ie,Gr)&&!(Rr&&(Gr=="length"||Tr&&(Gr=="offset"||Gr=="parent")||ir&&(Gr=="buffer"||Gr=="byteLength"||Gr=="byteOffset")||Rt(Gr,Cr)))&&Or.push(Gr);return Or}function zn(ie,Me){for(var rt=ie.length;rt--;)if(_s(ie[rt][0],Me))return rt;return-1}function Mr(ie,Me,rt){var Vt=Me(ie);return Ye(ie)?Vt:Ne(Vt,rt(ie))}function Kr(ie){return ie==null?ie===void 0?N:w:xt&&xt in Object(ie)?zi(ie):Ra(ie)}function Vn(ie){return fa(ie)&&Kr(ie)==l}function On(ie,Me,rt,Vt,Tr){return ie===Me?!0:ie==null||Me==null||!fa(ie)&&!fa(Me)?ie!==ie&&Me!==Me:sr(ie,Me,rt,Vt,On,Tr)}function sr(ie,Me,rt,Vt,Tr,ir){var Rr=Ye(ie),Or=Ye(Me),Cr=Rr?c:$e(ie),Gr=Or?c:$e(Me);Cr=Cr==l?C:Cr,Gr=Gr==l?C:Gr;var Ti=Cr==C,Ga=Gr==C,Hi=Cr==Gr;if(Hi&&Zt(ie)){if(!Zt(Me))return!1;Rr=!0,Ti=!1}if(Hi&&!Ti)return ir||(ir=new Pe),Rr||Us(ie)?ui(ie,Me,rt,Vt,Tr,ir):ki(ie,Me,Cr,rt,Vt,Tr,ir);if(!(rt&i)){var gi=Ti&&Ze.call(ie,"__wrapped__"),wa=Ga&&Ze.call(Me,"__wrapped__");if(gi||wa){var as=gi?ie.value():ie,Sa=wa?Me.value():Me;return ir||(ir=new Pe),Tr(as,Sa,rt,Vt,ir)}}return Hi?(ir||(ir=new Pe),tr(ie,Me,rt,Vt,Tr,ir)):!1}function Br(ie){if(!la(ie)||jr(ie))return!1;var Me=br(ie)?At:R;return Me.test(Vr(ie))}function pi(ie){return fa(ie)&&Pr(ie.length)&&!!X[Kr(ie)]}function ai(ie){if(!kr(ie))return it(ie);var Me=[];for(var rt in Object(ie))Ze.call(ie,rt)&&rt!="constructor"&&Me.push(rt);return Me}function ui(ie,Me,rt,Vt,Tr,ir){var Rr=rt&i,Or=ie.length,Cr=Me.length;if(Or!=Cr&&!(Rr&&Cr>Or))return!1;var Gr=ir.get(ie);if(Gr&&ir.get(Me))return Gr==Me;var Ti=-1,Ga=!0,Hi=rt&a?new jn:void 0;for(ir.set(ie,Me),ir.set(Me,ie);++Ti<Or;){var gi=ie[Ti],wa=Me[Ti];if(Vt)var as=Rr?Vt(wa,gi,Ti,Me,ie,ir):Vt(gi,wa,Ti,ie,Me,ir);if(as!==void 0){if(as)continue;Ga=!1;break}if(Hi){if(!we(Me,function(Sa,$i){if(!Te(Hi,$i)&&(gi===Sa||Tr(gi,Sa,rt,Vt,ir)))return Hi.push($i)})){Ga=!1;break}}else if(!(gi===wa||Tr(gi,wa,rt,Vt,ir))){Ga=!1;break}}return ir.delete(ie),ir.delete(Me),Ga}function ki(ie,Me,rt,Vt,Tr,ir,Rr){switch(rt){case z:if(ie.byteLength!=Me.byteLength||ie.byteOffset!=Me.byteOffset)return!1;ie=ie.buffer,Me=Me.buffer;case M:return!(ie.byteLength!=Me.byteLength||!ir(new kt(ie),new kt(Me)));case d:case f:case A:return _s(+ie,+Me);case h:return ie.name==Me.name&&ie.message==Me.message;case S:case I:return ie==Me+"";case m:var Or=K;case E:var Cr=Vt&i;if(Or||(Or=ye),ie.size!=Me.size&&!Cr)return!1;var Gr=Rr.get(ie);if(Gr)return Gr==Me;Vt|=a,Rr.set(ie,Me);var Ti=ui(Or(ie),Or(Me),Vt,Tr,ir,Rr);return Rr.delete(ie),Ti;case P:if(Wn)return Wn.call(ie)==Wn.call(Me)}return!1}function tr(ie,Me,rt,Vt,Tr,ir){var Rr=rt&i,Or=Ui(ie),Cr=Or.length,Gr=Ui(Me),Ti=Gr.length;if(Cr!=Ti&&!Rr)return!1;for(var Ga=Cr;Ga--;){var Hi=Or[Ga];if(!(Rr?Hi in Me:Ze.call(Me,Hi)))return!1}var gi=ir.get(ie);if(gi&&ir.get(Me))return gi==Me;var wa=!0;ir.set(ie,Me),ir.set(Me,ie);for(var as=Rr;++Ga<Cr;){Hi=Or[Ga];var Sa=ie[Hi],$i=Me[Hi];if(Vt)var Oa=Rr?Vt($i,Sa,Hi,Me,ie,ir):Vt(Sa,$i,Hi,ie,Me,ir);if(!(Oa===void 0?Sa===$i||Tr(Sa,$i,rt,Vt,ir):Oa)){wa=!1;break}as||(as=Hi=="constructor")}if(wa&&!as){var ja=ie.constructor,mi=Me.constructor;ja!=mi&&"constructor"in ie&&"constructor"in Me&&!(typeof ja=="function"&&ja instanceof ja&&typeof mi=="function"&&mi instanceof mi)&&(wa=!1)}return ir.delete(ie),ir.delete(Me),wa}function Ui(ie){return Mr(ie,bo,hn)}function xi(ie,Me){var rt=ie.__data__;return $n(Me)?rt[typeof Me=="string"?"string":"hash"]:rt.map}function wi(ie,Me){var rt=Ee(ie,Me);return Br(rt)?rt:void 0}function zi(ie){var Me=Ze.call(ie,xt),rt=ie[xt];try{ie[xt]=void 0;var Vt=!0}catch{}var Tr=ct.call(ie);return Vt&&(Me?ie[xt]=rt:delete ie[xt]),Tr}var hn=je?function(ie){return ie==null?[]:(ie=Object(ie),pe(je(ie),function(Me){return mn.call(ie,Me)}))}:Xr,$e=Kr;(an&&$e(new an(new ArrayBuffer(1)))!=z||jt&&$e(new jt)!=m||Xt&&$e(Xt.resolve())!=x||Wt&&$e(new Wt)!=E||ht&&$e(new ht)!=k)&&($e=function(ie){var Me=Kr(ie),rt=Me==C?ie.constructor:void 0,Vt=rt?Vr(rt):"";if(Vt)switch(Vt){case nt:return z;case Dt:return m;case Bt:return x;case _n:return E;case Gn:return k}return Me});function Rt(ie,Me){return Me=Me??s,!!Me&&(typeof ie=="number"||Y.test(ie))&&ie>-1&&ie%1==0&&ie<Me}function $n(ie){var Me=typeof ie;return Me=="string"||Me=="number"||Me=="symbol"||Me=="boolean"?ie!=="__proto__":ie===null}function jr(ie){return!!st&&st in ie}function kr(ie){var Me=ie&&ie.constructor,rt=typeof Me=="function"&&Me.prototype||_e;return ie===rt}function Ra(ie){return ct.call(ie)}function Vr(ie){if(ie!=null){try{return Ve.call(ie)}catch{}try{return ie+""}catch{}}return""}function _s(ie,Me){return ie===Me||ie!==ie&&Me!==Me}var yn=Vn(function(){return arguments}())?Vn:function(ie){return fa(ie)&&Ze.call(ie,"callee")&&!mn.call(ie,"callee")},Ye=Array.isArray;function Tt(ie){return ie!=null&&Pr(ie.length)&&!br(ie)}var Zt=He||di;function Jn(ie,Me){return On(ie,Me)}function br(ie){if(!la(ie))return!1;var Me=Kr(ie);return Me==p||Me==v||Me==u||Me==T}function Pr(ie){return typeof ie=="number"&&ie>-1&&ie%1==0&&ie<=s}function la(ie){var Me=typeof ie;return ie!=null&&(Me=="object"||Me=="function")}function fa(ie){return ie!=null&&typeof ie=="object"}var Us=se?ce(se):pi;function bo(ie){return Tt(ie)?Fn(ie):ai(ie)}function Xr(){return[]}function di(){return!1}t.exports=Jn}(q5,q5.exports);var j$=q5.exports,dS={};Object.defineProperty(dS,"__esModule",{value:!0});const CCe=$$,xCe=j$;var fS;(function(t){function e(a={},s={},l=!1){typeof a!="object"&&(a={}),typeof s!="object"&&(s={});let c=CCe(s);l||(c=Object.keys(c).reduce((u,d)=>(c[d]!=null&&(u[d]=c[d]),u),{}));for(const u in a)a[u]!==void 0&&s[u]===void 0&&(c[u]=a[u]);return Object.keys(c).length>0?c:void 0}t.compose=e;function n(a={},s={}){typeof a!="object"&&(a={}),typeof s!="object"&&(s={});const l=Object.keys(a).concat(Object.keys(s)).reduce((c,u)=>(xCe(a[u],s[u])||(c[u]=s[u]===void 0?null:s[u]),c),{});return Object.keys(l).length>0?l:void 0}t.diff=n;function r(a={},s={}){a=a||{};const l=Object.keys(s).reduce((c,u)=>(s[u]!==a[u]&&a[u]!==void 0&&(c[u]=s[u]),c),{});return Object.keys(a).reduce((c,u)=>(a[u]!==s[u]&&s[u]===void 0&&(c[u]=null),c),l)}t.invert=r;function i(a,s,l=!1){if(typeof a!="object")return s;if(typeof s!="object")return;if(!l)return s;const c=Object.keys(s).reduce((u,d)=>(a[d]===void 0&&(u[d]=s[d]),u),{});return Object.keys(c).length>0?c:void 0}t.transform=i})(fS||(fS={})),dS.default=fS;var U5={};Object.defineProperty(U5,"__esModule",{value:!0});var hS;(function(t){function e(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=e})(hS||(hS={})),U5.default=hS;var pS={};Object.defineProperty(pS,"__esModule",{value:!0});const z$=U5;class TCe{constructor(e){this.ops=e,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(e){e||(e=1/0);const n=this.ops[this.index];if(n){const r=this.offset,i=z$.default.length(n);if(e>=i-r?(e=i-r,this.index+=1,this.offset=0):this.offset+=e,typeof n.delete=="number")return{delete:e};{const a={};return n.attributes&&(a.attributes=n.attributes),typeof n.retain=="number"?a.retain=e:typeof n.retain=="object"&&n.retain!==null?a.retain=n.retain:typeof n.insert=="string"?a.insert=n.insert.substr(r,e):a.insert=n.insert,a}}else return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?z$.default.length(this.ops[this.index])-this.offset:1/0}peekType(){const e=this.ops[this.index];return e?typeof e.delete=="number"?"delete":typeof e.retain=="number"||typeof e.retain=="object"&&e.retain!==null?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);{const e=this.offset,n=this.index,r=this.next(),i=this.ops.slice(this.index);return this.offset=e,this.index=n,[r].concat(i)}}else return[]}}pS.default=TCe,function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.AttributeMap=e.OpIterator=e.Op=void 0;const n=SCe,r=$$,i=j$,a=dS;e.AttributeMap=a.default;const s=U5;e.Op=s.default;const l=pS;e.OpIterator=l.default;const c="\0",u=(f,h)=>{if(typeof f!="object"||f===null)throw new Error(`cannot retain a ${typeof f}`);if(typeof h!="object"||h===null)throw new Error(`cannot retain a ${typeof h}`);const p=Object.keys(f)[0];if(!p||p!==Object.keys(h)[0])throw new Error(`embed types not matched: ${p} != ${Object.keys(h)[0]}`);return[p,f[p],h[p]]};class d{constructor(h){Array.isArray(h)?this.ops=h:h!=null&&Array.isArray(h.ops)?this.ops=h.ops:this.ops=[]}static registerEmbed(h,p){this.handlers[h]=p}static unregisterEmbed(h){delete this.handlers[h]}static getHandler(h){const p=this.handlers[h];if(!p)throw new Error(`no handlers for embed type "${h}"`);return p}insert(h,p){const v={};return typeof h=="string"&&h.length===0?this:(v.insert=h,p!=null&&typeof p=="object"&&Object.keys(p).length>0&&(v.attributes=p),this.push(v))}delete(h){return h<=0?this:this.push({delete:h})}retain(h,p){if(typeof h=="number"&&h<=0)return this;const v={retain:h};return p!=null&&typeof p=="object"&&Object.keys(p).length>0&&(v.attributes=p),this.push(v)}push(h){let p=this.ops.length,v=this.ops[p-1];if(h=r(h),typeof v=="object"){if(typeof h.delete=="number"&&typeof v.delete=="number")return this.ops[p-1]={delete:v.delete+h.delete},this;if(typeof v.delete=="number"&&h.insert!=null&&(p-=1,v=this.ops[p-1],typeof v!="object"))return this.ops.unshift(h),this;if(i(h.attributes,v.attributes)){if(typeof h.insert=="string"&&typeof v.insert=="string")return this.ops[p-1]={insert:v.insert+h.insert},typeof h.attributes=="object"&&(this.ops[p-1].attributes=h.attributes),this;if(typeof h.retain=="number"&&typeof v.retain=="number")return this.ops[p-1]={retain:v.retain+h.retain},typeof h.attributes=="object"&&(this.ops[p-1].attributes=h.attributes),this}}return p===this.ops.length?this.ops.push(h):this.ops.splice(p,0,h),this}chop(){const h=this.ops[this.ops.length-1];return h&&typeof h.retain=="number"&&!h.attributes&&this.ops.pop(),this}filter(h){return this.ops.filter(h)}forEach(h){this.ops.forEach(h)}map(h){return this.ops.map(h)}partition(h){const p=[],v=[];return this.forEach(m=>{(h(m)?p:v).push(m)}),[p,v]}reduce(h,p){return this.ops.reduce(h,p)}changeLength(){return this.reduce((h,p)=>p.insert?h+s.default.length(p):p.delete?h-p.delete:h,0)}length(){return this.reduce((h,p)=>h+s.default.length(p),0)}slice(h=0,p=1/0){const v=[],m=new l.default(this.ops);let A=0;for(;A<p&&m.hasNext();){let w;A<h?w=m.next(h-A):(w=m.next(p-A),v.push(w)),A+=s.default.length(w)}return new d(v)}compose(h){const p=new l.default(this.ops),v=new l.default(h.ops),m=[],A=v.peek();if(A!=null&&typeof A.retain=="number"&&A.attributes==null){let C=A.retain;for(;p.peekType()==="insert"&&p.peekLength()<=C;)C-=p.peekLength(),m.push(p.next());A.retain-C>0&&v.next(A.retain-C)}const w=new d(m);for(;p.hasNext()||v.hasNext();)if(v.peekType()==="insert")w.push(v.next());else if(p.peekType()==="delete")w.push(p.next());else{const C=Math.min(p.peekLength(),v.peekLength()),x=p.next(C),T=v.next(C);if(T.retain){const S={};if(typeof x.retain=="number")S.retain=typeof T.retain=="number"?C:T.retain;else if(typeof T.retain=="number")x.retain==null?S.insert=x.insert:S.retain=x.retain;else{const I=x.retain==null?"insert":"retain",[P,N,k]=u(x[I],T.retain),M=d.getHandler(P);S[I]={[P]:M.compose(N,k,I==="retain")}}const E=a.default.compose(x.attributes,T.attributes,typeof x.retain=="number");if(E&&(S.attributes=E),w.push(S),!v.hasNext()&&i(w.ops[w.ops.length-1],S)){const I=new d(p.rest());return w.concat(I).chop()}}else typeof T.delete=="number"&&(typeof x.retain=="number"||typeof x.retain=="object"&&x.retain!==null)&&w.push(T)}return w.chop()}concat(h){const p=new d(this.ops.slice());return h.ops.length>0&&(p.push(h.ops[0]),p.ops=p.ops.concat(h.ops.slice(1))),p}diff(h,p){if(this.ops===h.ops)return new d;const v=[this,h].map(x=>x.map(T=>{if(T.insert!=null)return typeof T.insert=="string"?T.insert:c;const S=x===h?"on":"with";throw new Error("diff() called "+S+" non-document")}).join("")),m=new d,A=n(v[0],v[1],p,!0),w=new l.default(this.ops),C=new l.default(h.ops);return A.forEach(x=>{let T=x[1].length;for(;T>0;){let S=0;switch(x[0]){case n.INSERT:S=Math.min(C.peekLength(),T),m.push(C.next(S));break;case n.DELETE:S=Math.min(T,w.peekLength()),w.next(S),m.delete(S);break;case n.EQUAL:S=Math.min(w.peekLength(),C.peekLength(),T);const E=w.next(S),I=C.next(S);i(E.insert,I.insert)?m.retain(S,a.default.diff(E.attributes,I.attributes)):m.push(I).delete(S);break}T-=S}}),m.chop()}eachLine(h,p=`
4372
4372
  `){const v=new l.default(this.ops);let m=new d,A=0;for(;v.hasNext();){if(v.peekType()!=="insert")return;const w=v.peek(),C=s.default.length(w)-v.peekLength(),x=typeof w.insert=="string"?w.insert.indexOf(p,C)-C:-1;if(x<0)m.push(v.next());else if(x>0)m.push(v.next(x));else{if(h(m,v.next(1).attributes||{},A)===!1)return;A+=1,m=new d}}m.length()>0&&h(m,{},A)}invert(h){const p=new d;return this.reduce((v,m)=>{if(m.insert)p.delete(s.default.length(m));else{if(typeof m.retain=="number"&&m.attributes==null)return p.retain(m.retain),v+m.retain;if(m.delete||typeof m.retain=="number"){const A=m.delete||m.retain;return h.slice(v,v+A).forEach(C=>{m.delete?p.push(C):m.retain&&m.attributes&&p.retain(s.default.length(C),a.default.invert(m.attributes,C.attributes))}),v+A}else if(typeof m.retain=="object"&&m.retain!==null){const A=h.slice(v,v+1),w=new l.default(A.ops).next(),[C,x,T]=u(m.retain,w.insert),S=d.getHandler(C);return p.retain({[C]:S.invert(x,T)},a.default.invert(m.attributes,w.attributes)),v+1}}return v},0),p.chop()}transform(h,p=!1){if(p=!!p,typeof h=="number")return this.transformPosition(h,p);const v=h,m=new l.default(this.ops),A=new l.default(v.ops),w=new d;for(;m.hasNext()||A.hasNext();)if(m.peekType()==="insert"&&(p||A.peekType()!=="insert"))w.retain(s.default.length(m.next()));else if(A.peekType()==="insert")w.push(A.next());else{const C=Math.min(m.peekLength(),A.peekLength()),x=m.next(C),T=A.next(C);if(x.delete)continue;if(T.delete)w.push(T);else{const S=x.retain,E=T.retain;let I=typeof E=="object"&&E!==null?E:C;if(typeof S=="object"&&S!==null&&typeof E=="object"&&E!==null){const P=Object.keys(S)[0];if(P===Object.keys(E)[0]){const N=d.getHandler(P);N&&(I={[P]:N.transform(S[P],E[P],p)})}}w.retain(I,a.default.transform(x.attributes,T.attributes,p))}}return w.chop()}transformPosition(h,p=!1){p=!!p;const v=new l.default(this.ops);let m=0;for(;v.hasNext()&&m<=h;){const A=v.peekLength(),w=v.peekType();if(v.next(),w==="delete"){h-=Math.min(A,h-m);continue}else w==="insert"&&(m<h||!p)&&(h+=A);m+=A}return h}}d.Op=s.default,d.OpIterator=l.default,d.AttributeMap=a.default,d.handlers={},e.default=d,t.exports=d,t.exports.default=d}(oS,oS.exports);var tc=oS.exports;const or=Os(tc);class $c extends _l{static value(){}optimize(){(this.prev||this.next)&&this.remove()}length(){return 0}value(){return""}}$c.blotName="break",$c.tagName="BR";let jc=class extends M5{};function $5(t){return t.replace(/[&<>"']/g,e=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[e])}const Pu=class Pu extends rS{static compare(e,n){const r=Pu.order.indexOf(e),i=Pu.order.indexOf(n);return r>=0||i>=0?r-i:e===n?0:e<n?-1:1}formatAt(e,n,r,i){if(Pu.compare(this.statics.blotName,r)<0&&this.scroll.query(r,ur.BLOT)){const a=this.isolate(e,n);i&&a.wrap(r,i)}else super.formatAt(e,n,r,i)}optimize(e){if(super.optimize(e),this.parent instanceof Pu&&Pu.compare(this.statics.blotName,this.parent.statics.blotName)>0){const n=this.parent.isolate(this.offset(),this.length());this.moveChildren(n),n.wrap(this)}}};Xn(Pu,"allowedChildren",[Pu,$c,_l,jc]),Xn(Pu,"order",["cursor","inline","link","underline","strike","italic","bold","script","code"]);let Fu=Pu;const H$=1;class Qs extends Ig{constructor(){super(...arguments);Xn(this,"cache",{})}delta(){return this.cache.delta==null&&(this.cache.delta=Y$(this)),this.cache.delta}deleteAt(n,r){super.deleteAt(n,r),this.cache={}}formatAt(n,r,i,a){r<=0||(this.scroll.query(i,ur.BLOCK)?n+r===this.length()&&this.format(i,a):super.formatAt(n,Math.min(r,this.length()-n-1),i,a),this.cache={})}insertAt(n,r,i){if(i!=null){super.insertAt(n,r,i),this.cache={};return}if(r.length===0)return;const a=r.split(`
4373
4373
  `),s=a.shift();s.length>0&&(n<this.length()-1||this.children.tail==null?super.insertAt(Math.min(n,this.length()-1),s):this.children.tail.insertAt(this.children.tail.length(),s),this.cache={});let l=this;a.reduce((c,u)=>(l=l.split(c,!0),l.insertAt(0,u),u.length),n+s.length)}insertBefore(n,r){const{head:i}=this.children;super.insertBefore(n,r),i instanceof $c&&i.remove(),this.cache={}}length(){return this.cache.length==null&&(this.cache.length=super.length()+H$),this.cache.length}moveChildren(n,r){super.moveChildren(n,r),this.cache={}}optimize(n){super.optimize(n),this.cache={}}path(n){return super.path(n,!0)}removeChild(n){super.removeChild(n),this.cache={}}split(n){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(r&&(n===0||n>=this.length()-H$)){const a=this.clone();return n===0?(this.parent.insertBefore(a,this),this):(this.parent.insertBefore(a,this.next),a)}const i=super.split(n,r);return this.cache={},i}}Qs.blotName="block",Qs.tagName="P",Qs.defaultChild=$c,Qs.allowedChildren=[$c,Fu,_l,jc];class nc extends _l{attach(){super.attach(),this.attributes=new k5(this.domNode)}delta(){return new or().insert(this.value(),{...this.formats(),...this.attributes.values()})}format(e,n){const r=this.scroll.query(e,ur.BLOCK_ATTRIBUTE);r!=null&&this.attributes.attribute(r,n)}formatAt(e,n,r,i){this.format(r,i)}insertAt(e,n,r){if(r!=null){super.insertAt(e,n,r);return}const i=n.split(`
4374
4374
  `),a=i.pop(),s=i.map(c=>{const u=this.scroll.create(Qs.blotName);return u.insertAt(0,c),u}),l=this.split(e);s.forEach(c=>{this.parent.insertBefore(c,l)}),a&&this.parent.insertBefore(this.scroll.create("text",a),l)}}nc.scope=ur.BLOCK_BLOT;function Y$(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return t.descendants(mo).reduce((n,r)=>r.length()===0?n:n.insert(r.value(),rc(r,{},e)),new or).insert(`
@@ -61255,7 +61255,7 @@ var G0e = function() {
61255
61255
  theme: i.theme,
61256
61256
  formats: i.formats
61257
61257
  };
61258
- G0e ? A(new Quill(d.current, M)) : import("./quill-KMO50zLg.js").then(function(q) {
61258
+ G0e ? A(new Quill(d.current, M)) : import("./quill-CJ_y9WwE.js").then(function(q) {
61259
61259
  if (q && Te.isExist(d.current)) {
61260
61260
  var N;
61261
61261
  q.default ? N = new q.default(d.current, M) : N = new q(d.current, M), A(N);
@@ -129511,7 +129511,7 @@ const OSe = () => {
129511
129511
  const A = r != null && r.getSubjectList ? r == null ? void 0 : r.getSubjectList : () => {
129512
129512
  }, [E, D] = Pe([]), [P, F] = Pe("");
129513
129513
  hn(() => (t === _d && (T(), A()), () => {
129514
- }), [t]);
129514
+ }), [t]), console.log("getPaginatedAssessmentQuestionBankListFromStore", y);
129515
129515
  const k = Dr(() => {
129516
129516
  const $ = y.map(
129517
129517
  (oe) => {
@@ -1,7 +1,7 @@
1
1
  var Bl = Object.defineProperty;
2
2
  var Ml = (n, t, e) => t in n ? Bl(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
3
3
  var T = (n, t, e) => Ml(n, typeof t != "symbol" ? t + "" : t, e);
4
- import { d as ti, i as Rr, a as Hi, b as Dl, e as Br, M as Ul, S as ei, U as si, g as ni, c as ri, f as fr, h as zs, j as $i, k as Vs, l as dr, m as Pl, n as jl, o as Fi, p as Hl, q as $l, r as Fl, s as zl, t as ii, u as Kl, v as Gl, w as Ft, x as zi, y as xe } from "./main-DiXiJyyF.js";
4
+ import { d as ti, i as Rr, a as Hi, b as Dl, e as Br, M as Ul, S as ei, U as si, g as ni, c as ri, f as fr, h as zs, j as $i, k as Vs, l as dr, m as Pl, n as jl, o as Fi, p as Hl, q as $l, r as Fl, s as zl, t as ii, u as Kl, v as Gl, w as Ft, x as zi, y as xe } from "./main-p8eEu1u7.js";
5
5
  function Ki(n) {
6
6
  return n;
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cft-builder",
3
- "version": "0.2.220",
3
+ "version": "0.2.222",
4
4
  "type": "module",
5
5
  "types": "dist/types/index",
6
6
  "files": [