@wangeditor-next/list-module 1.1.9 → 1.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/list-module/src/module/custom-types.d.ts +1 -1
- package/dist/list-module/src/module/menu/BaseMenu.d.ts +2 -2
- package/dist/list-module/src/module/parse-elem-html.d.ts +2 -2
- package/dist/list-module/src/module/render-elem.d.ts +1 -1
- package/dist/list-module/src/utils/dom.d.ts +2 -2
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{i18nAddResources as t,DomEditor as e,t as r}from"@wangeditor-next/core";import{Text as n,Path as o,Editor as i,Transforms as u,Range as a}from"slate";import{jsx as c}from"snabbdom";import f,{append as l,attr as s,parent as d}from"dom7";t("en",{listModule:{unOrderedList:"Unordered list",orderedList:"Ordered list"}}),t("zh-CN",{listModule:{unOrderedList:"无序列表",orderedList:"有序列表"}});var v=function(t){try{return!!t()}catch(t){return!0}},p=!v((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),y=Function.prototype,h=y.call,g=p&&y.bind.bind(h,h),b=p?g:function(t){return function(){return h.apply(t,arguments)}},m=b({}.toString),w=b("".slice),O=function(t){return w(m(t),8,-1)},S=Object,x=b("".split),E=v((function(){return!S("z").propertyIsEnumerable(0)}))?function(t){return"String"===O(t)?x(t,""):S(t)}:S,j=function(t){return null==t},T=TypeError,A=function(t){if(j(t))throw new T("Can't call method on "+t);return t},I=function(t){return E(A(t))},P="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function L(t){var e={exports:{}};return t(e,e.exports),e.exports}var R,k,N=function(t){return t&&t.Math===Math&&t},z=N("object"==typeof globalThis&&globalThis)||N("object"==typeof window&&window)||N("object"==typeof self&&self)||N("object"==typeof P&&P)||N("object"==typeof P&&P)||function(){return this}()||Function("return this")(),M=Object.defineProperty,_=function(t,e){try{M(z,t,{value:e,configurable:!0,writable:!0})}catch(r){z[t]=e}return e},C=L((function(t){var e="__core-js_shared__",r=t.exports=z[e]||_(e,{});(r.versions||(r.versions=[])).push({version:"3.38.1",mode:"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"})})),F=function(t,e){return C[t]||(C[t]=e||{})},D=Object,B=function(t){return D(A(t))},H=b({}.hasOwnProperty),$=Object.hasOwn||function(t,e){return H(B(t),e)},G=0,V=Math.random(),W=b(1..toString),U=function(t){return"Symbol("+(void 0===t?"":t)+")_"+W(++G+V,36)},K=z.navigator,Y=K&&K.userAgent,X=Y?String(Y):"",q=z.process,J=z.Deno,Q=q&&q.versions||J&&J.version,Z=Q&&Q.v8;Z&&(k=(R=Z.split("."))[0]>0&&R[0]<4?1:+(R[0]+R[1])),!k&&X&&(!(R=X.match(/Edge\/(\d+)/))||R[1]>=74)&&(R=X.match(/Chrome\/(\d+)/))&&(k=+R[1]);var tt,et=k,rt=z.String,nt=!!Object.getOwnPropertySymbols&&!v((function(){var t=Symbol("symbol detection");return!rt(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&et&&et<41})),ot=nt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,it=z.Symbol,ut=F("wks"),at=ot?it.for||it:it&&it.withoutSetter||U,ct=function(t){return $(ut,t)||(ut[t]=nt&&$(it,t)?it[t]:at("Symbol."+t)),ut[t]},ft="object"==typeof document&&document.all,lt=void 0===ft&&void 0!==ft?function(t){return"function"==typeof t||t===ft}:function(t){return"function"==typeof t},st=function(t){return"object"==typeof t?null!==t:lt(t)},dt=String,vt=TypeError,pt=function(t){if(st(t))return t;throw new vt(dt(t)+" is not an object")},yt=!v((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),ht=yt&&v((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),gt=z.document,bt=st(gt)&&st(gt.createElement),mt=function(t){return bt?gt.createElement(t):{}},wt=!yt&&!v((function(){return 7!==Object.defineProperty(mt("div"),"a",{get:function(){return 7}}).a})),Ot=Function.prototype.call,St=p?Ot.bind(Ot):function(){return Ot.apply(Ot,arguments)},xt=function(t,e){return arguments.length<2?(r=z[t],lt(r)?r:void 0):z[t]&&z[t][e];var r},Et=b({}.isPrototypeOf),jt=Object,Tt=ot?function(t){return"symbol"==typeof t}:function(t){var e=xt("Symbol");return lt(e)&&Et(e.prototype,jt(t))},At=String,It=function(t){try{return At(t)}catch(t){return"Object"}},Pt=TypeError,Lt=function(t){if(lt(t))return t;throw new Pt(It(t)+" is not a function")},Rt=function(t,e){var r=t[e];return j(r)?void 0:Lt(r)},kt=TypeError,Nt=TypeError,zt=ct("toPrimitive"),Mt=function(t,e){if(!st(t)||Tt(t))return t;var r,n=Rt(t,zt);if(n){if(void 0===e&&(e="default"),r=St(n,t,e),!st(r)||Tt(r))return r;throw new Nt("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var r,n;if("string"===e&<(r=t.toString)&&!st(n=St(r,t)))return n;if(lt(r=t.valueOf)&&!st(n=St(r,t)))return n;if("string"!==e&<(r=t.toString)&&!st(n=St(r,t)))return n;throw new kt("Can't convert object to primitive value")}(t,e)},_t=function(t){var e=Mt(t,"string");return Tt(e)?e:e+""},Ct=TypeError,Ft=Object.defineProperty,Dt=Object.getOwnPropertyDescriptor,Bt="enumerable",Ht="configurable",$t="writable",Gt={f:yt?ht?function(t,e,r){if(pt(t),e=_t(e),pt(r),"function"==typeof t&&"prototype"===e&&"value"in r&&$t in r&&!r[$t]){var n=Dt(t,e);n&&n[$t]&&(t[e]=r.value,r={configurable:Ht in r?r[Ht]:n[Ht],enumerable:Bt in r?r[Bt]:n[Bt],writable:!1})}return Ft(t,e,r)}:Ft:function(t,e,r){if(pt(t),e=_t(e),pt(r),wt)try{return Ft(t,e,r)}catch(t){}if("get"in r||"set"in r)throw new Ct("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},Vt=Math.ceil,Wt=Math.floor,Ut=Math.trunc||function(t){var e=+t;return(e>0?Wt:Vt)(e)},Kt=function(t){var e=+t;return e!=e||0===e?0:Ut(e)},Yt=Math.max,Xt=Math.min,qt=Math.min,Jt=function(t){var e=Kt(t);return e>0?qt(e,9007199254740991):0},Qt=function(t){return Jt(t.length)},Zt=function(t){return function(e,r,n){var o=I(e),i=Qt(o);if(0===i)return!t&&-1;var u,a=function(t,e){var r=Kt(t);return r<0?Yt(r+e,0):Xt(r,e)}(n,i);if(t&&r!=r){for(;i>a;)if((u=o[a++])!=u)return!0}else for(;i>a;a++)if((t||a in o)&&o[a]===r)return t||a||0;return!t&&-1}},te={includes:Zt(!0),indexOf:Zt(!1)},ee={},re=te.indexOf,ne=b([].push),oe=function(t,e){var r,n=I(t),o=0,i=[];for(r in n)!$(ee,r)&&$(n,r)&&ne(i,r);for(;e.length>o;)$(n,r=e[o++])&&(~re(i,r)||ne(i,r));return i},ie=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ue=Object.keys||function(t){return oe(t,ie)},ae=yt&&!ht?Object.defineProperties:function(t,e){pt(t);for(var r,n=I(e),o=ue(e),i=o.length,u=0;i>u;)Gt.f(t,r=o[u++],n[r]);return t},ce={f:ae},fe=xt("document","documentElement"),le=F("keys"),se=function(t){return le[t]||(le[t]=U(t))},de="prototype",ve="script",pe=se("IE_PROTO"),ye=function(){},he=function(t){return"<"+ve+">"+t+"</"+ve+">"},ge=function(t){t.write(he("")),t.close();var e=t.parentWindow.Object;return t=null,e},be=function(){try{tt=new ActiveXObject("htmlfile")}catch(t){}var t,e,r;be="undefined"!=typeof document?document.domain&&tt?ge(tt):(e=mt("iframe"),r="java"+ve+":",e.style.display="none",fe.appendChild(e),e.src=String(r),(t=e.contentWindow.document).open(),t.write(he("document.F=Object")),t.close(),t.F):ge(tt);for(var n=ie.length;n--;)delete be[de][ie[n]];return be()};ee[pe]=!0;var me=Object.create||function(t,e){var r;return null!==t?(ye[de]=pt(t),r=new ye,ye[de]=null,r[pe]=t):r=be(),void 0===e?r:ce.f(r,e)},we=Gt.f,Oe=ct("unscopables"),Se=Array.prototype;void 0===Se[Oe]&&we(Se,Oe,{configurable:!0,value:me(null)});var xe,Ee,je,Te=function(t){Se[Oe][t]=!0},Ae={},Ie=z.WeakMap,Pe=lt(Ie)&&/native code/.test(String(Ie)),Le=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},Re=yt?function(t,e,r){return Gt.f(t,e,Le(1,r))}:function(t,e,r){return t[e]=r,t},ke="Object already initialized",Ne=z.TypeError,ze=z.WeakMap;if(Pe||C.state){var Me=C.state||(C.state=new ze);Me.get=Me.get,Me.has=Me.has,Me.set=Me.set,xe=function(t,e){if(Me.has(t))throw new Ne(ke);return e.facade=t,Me.set(t,e),e},Ee=function(t){return Me.get(t)||{}},je=function(t){return Me.has(t)}}else{var _e=se("state");ee[_e]=!0,xe=function(t,e){if($(t,_e))throw new Ne(ke);return e.facade=t,Re(t,_e,e),e},Ee=function(t){return $(t,_e)?t[_e]:{}},je=function(t){return $(t,_e)}}var Ce={set:xe,get:Ee,has:je,enforce:function(t){return je(t)?Ee(t):xe(t,{})},getterFor:function(t){return function(e){var r;if(!st(e)||(r=Ee(e)).type!==t)throw new Ne("Incompatible receiver, "+t+" required");return r}}},Fe={}.propertyIsEnumerable,De=Object.getOwnPropertyDescriptor,Be={f:De&&!Fe.call({1:2},1)?function(t){var e=De(this,t);return!!e&&e.enumerable}:Fe},He=Object.getOwnPropertyDescriptor,$e={f:yt?He:function(t,e){if(t=I(t),e=_t(e),wt)try{return He(t,e)}catch(t){}if($(t,e))return Le(!St(Be.f,t,e),t[e])}},Ge=Function.prototype,Ve=yt&&Object.getOwnPropertyDescriptor,We=$(Ge,"name"),Ue={EXISTS:We,PROPER:We&&"something"===function(){}.name,CONFIGURABLE:We&&(!yt||yt&&Ve(Ge,"name").configurable)},Ke=b(Function.toString);lt(C.inspectSource)||(C.inspectSource=function(t){return Ke(t)});var Ye,Xe,qe,Je=C.inspectSource,Qe=L((function(t){var e=Ue.CONFIGURABLE,r=Ce.enforce,n=Ce.get,o=String,i=Object.defineProperty,u=b("".slice),a=b("".replace),c=b([].join),f=yt&&!v((function(){return 8!==i((function(){}),"length",{value:8}).length})),l=String(String).split("String"),s=t.exports=function(t,n,s){"Symbol("===u(o(n),0,7)&&(n="["+a(o(n),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),s&&s.getter&&(n="get "+n),s&&s.setter&&(n="set "+n),(!$(t,"name")||e&&t.name!==n)&&(yt?i(t,"name",{value:n,configurable:!0}):t.name=n),f&&s&&$(s,"arity")&&t.length!==s.arity&&i(t,"length",{value:s.arity});try{s&&$(s,"constructor")&&s.constructor?yt&&i(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var d=r(t);return $(d,"source")||(d.source=c(l,"string"==typeof n?n:"")),t};Function.prototype.toString=s((function(){return lt(this)&&n(this).source||Je(this)}),"toString")})),Ze=function(t,e,r,n){n||(n={});var o=n.enumerable,i=void 0!==n.name?n.name:e;if(lt(r)&&Qe(r,i,n),n.global)o?t[e]=r:_(e,r);else{try{n.unsafe?t[e]&&(o=!0):delete t[e]}catch(t){}o?t[e]=r:Gt.f(t,e,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return t},tr=ie.concat("length","prototype"),er={f:Object.getOwnPropertyNames||function(t){return oe(t,tr)}},rr={f:Object.getOwnPropertySymbols},nr=b([].concat),or=xt("Reflect","ownKeys")||function(t){var e=er.f(pt(t)),r=rr.f;return r?nr(e,r(t)):e},ir=function(t,e,r){for(var n=or(e),o=Gt.f,i=$e.f,u=0;u<n.length;u++){var a=n[u];$(t,a)||r&&$(r,a)||o(t,a,i(e,a))}},ur=/#|\.prototype\./,ar=function(t,e){var r=fr[cr(t)];return r===sr||r!==lr&&(lt(e)?v(e):!!e)},cr=ar.normalize=function(t){return String(t).replace(ur,".").toLowerCase()},fr=ar.data={},lr=ar.NATIVE="N",sr=ar.POLYFILL="P",dr=ar,vr=$e.f,pr=function(t,e){var r,n,o,i,u,a=t.target,c=t.global,f=t.stat;if(r=c?z:f?z[a]||_(a,{}):z[a]&&z[a].prototype)for(n in e){if(i=e[n],o=t.dontCallGetSet?(u=vr(r,n))&&u.value:r[n],!dr(c?n:a+(f?".":"#")+n,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;ir(i,o)}(t.sham||o&&o.sham)&&Re(i,"sham",!0),Ze(r,n,i,t)}},yr=!v((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),hr=se("IE_PROTO"),gr=Object,br=gr.prototype,mr=yr?gr.getPrototypeOf:function(t){var e=B(t);if($(e,hr))return e[hr];var r=e.constructor;return lt(r)&&e instanceof r?r.prototype:e instanceof gr?br:null},wr=ct("iterator"),Or=!1;[].keys&&("next"in(qe=[].keys())?(Xe=mr(mr(qe)))!==Object.prototype&&(Ye=Xe):Or=!0);var Sr=!st(Ye)||v((function(){var t={};return Ye[wr].call(t)!==t}));Sr&&(Ye={}),lt(Ye[wr])||Ze(Ye,wr,(function(){return this}));var xr={IteratorPrototype:Ye,BUGGY_SAFARI_ITERATORS:Or},Er=Gt.f,jr=ct("toStringTag"),Tr=function(t,e,r){t&&!r&&(t=t.prototype),t&&!$(t,jr)&&Er(t,jr,{configurable:!0,value:e})},Ar=xr.IteratorPrototype,Ir=function(){return this},Pr=String,Lr=TypeError,Rr=function(t){if(function(t){return st(t)||null===t}(t))return t;throw new Lr("Can't set "+Pr(t)+" as a prototype")},kr=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=function(t,e,r){try{return b(Lt(Object.getOwnPropertyDescriptor(t,e)[r]))}catch(t){}}(Object.prototype,"__proto__","set"))(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return A(r),Rr(n),st(r)?(e?t(r,n):r.__proto__=n,r):r}}():void 0),Nr=Ue.PROPER,zr=Ue.CONFIGURABLE,Mr=xr.IteratorPrototype,_r=xr.BUGGY_SAFARI_ITERATORS,Cr=ct("iterator"),Fr="keys",Dr="values",Br="entries",Hr=function(){return this},$r=function(t,e,r,n,o,i,u){!function(t,e,r,n){var o=e+" Iterator";t.prototype=me(Ar,{next:Le(+!n,r)}),Tr(t,o,!1),Ae[o]=Ir}(r,e,n);var a,c,f,l=function(t){if(t===o&&y)return y;if(!_r&&t&&t in v)return v[t];switch(t){case Fr:case Dr:case Br:return function(){return new r(this,t)}}return function(){return new r(this)}},s=e+" Iterator",d=!1,v=t.prototype,p=v[Cr]||v["@@iterator"]||o&&v[o],y=!_r&&p||l(o),h="Array"===e&&v.entries||p;if(h&&(a=mr(h.call(new t)))!==Object.prototype&&a.next&&(mr(a)!==Mr&&(kr?kr(a,Mr):lt(a[Cr])||Ze(a,Cr,Hr)),Tr(a,s,!0)),Nr&&o===Dr&&p&&p.name!==Dr&&(zr?Re(v,"name",Dr):(d=!0,y=function(){return St(p,this)})),o)if(c={values:l(Dr),keys:i?y:l(Fr),entries:l(Br)},u)for(f in c)(_r||d||!(f in v))&&Ze(v,f,c[f]);else pr({target:e,proto:!0,forced:_r||d},c);return v[Cr]!==y&&Ze(v,Cr,y,{name:o}),Ae[e]=y,c},Gr=function(t,e){return{value:t,done:e}},Vr=Gt.f,Wr="Array Iterator",Ur=Ce.set,Kr=Ce.getterFor(Wr),Yr=$r(Array,"Array",(function(t,e){Ur(this,{type:Wr,target:I(t),index:0,kind:e})}),(function(){var t=Kr(this),e=t.target,r=t.index++;if(!e||r>=e.length)return t.target=null,Gr(void 0,!0);switch(t.kind){case"keys":return Gr(r,!1);case"values":return Gr(e[r],!1)}return Gr([r,e[r]],!1)}),"values"),Xr=Ae.Arguments=Ae.Array;if(Te("keys"),Te("values"),Te("entries"),yt&&"values"!==Xr.name)try{Vr(Xr,"name",{value:"values"})}catch(t){}var qr={};qr[ct("toStringTag")]="z";var Jr="[object z]"===String(qr),Qr=ct("toStringTag"),Zr=Object,tn="Arguments"===O(function(){return arguments}()),en=Jr?O:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=Zr(t),Qr))?r:tn?O(e):"Object"===(n=O(e))&<(e.callee)?"Arguments":n},rn=Jr?{}.toString:function(){return"[object "+en(this)+"]"};Jr||Ze(Object.prototype,"toString",rn,{unsafe:!0});var nn=String,on=function(t){if("Symbol"===en(t))throw new TypeError("Cannot convert a Symbol value to a string");return nn(t)},un=b("".charAt),an=b("".charCodeAt),cn=b("".slice),fn=function(t){return function(e,r){var n,o,i=on(A(e)),u=Kt(r),a=i.length;return u<0||u>=a?t?"":void 0:(n=an(i,u))<55296||n>56319||u+1===a||(o=an(i,u+1))<56320||o>57343?t?un(i,u):n:t?cn(i,u,u+2):o-56320+(n-55296<<10)+65536}},ln={codeAt:fn(!1),charAt:fn(!0)},sn=ln.charAt,dn="String Iterator",vn=Ce.set,pn=Ce.getterFor(dn);$r(String,"String",(function(t){vn(this,{type:dn,string:on(t),index:0})}),(function(){var t,e=pn(this),r=e.string,n=e.index;return n>=r.length?Gr(void 0,!0):(t=sn(r,n),e.index+=t.length,Gr(t,!1))}));var yn=!v((function(){return Object.isExtensible(Object.preventExtensions({}))})),hn=function(t,e,r){for(var n in e)Ze(t,n,e[n],r);return t},gn=b([].slice),bn=er.f,mn="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],wn={f:function(t){return mn&&"Window"===O(t)?function(t){try{return bn(t)}catch(t){return gn(mn)}}(t):bn(I(t))}},On=v((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}})),Sn=Object.isExtensible,xn=v((function(){Sn(1)}))||On?function(t){return!!st(t)&&((!On||"ArrayBuffer"!==O(t))&&(!Sn||Sn(t)))}:Sn,En=L((function(t){var e=Gt.f,r=!1,n=U("meta"),o=0,i=function(t){e(t,n,{value:{objectID:"O"+o++,weakData:{}}})},u=t.exports={enable:function(){u.enable=function(){},r=!0;var t=er.f,e=b([].splice),o={};o[n]=1,t(o).length&&(er.f=function(r){for(var o=t(r),i=0,u=o.length;i<u;i++)if(o[i]===n){e(o,i,1);break}return o},pr({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:wn.f}))},fastKey:function(t,e){if(!st(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!$(t,n)){if(!xn(t))return"F";if(!e)return"E";i(t)}return t[n].objectID},getWeakData:function(t,e){if(!$(t,n)){if(!xn(t))return!0;if(!e)return!1;i(t)}return t[n].weakData},onFreeze:function(t){return yn&&r&&xn(t)&&!$(t,n)&&i(t),t}};ee[n]=!0})),jn=function(t){if("Function"===O(t))return b(t)},Tn=jn(jn.bind),An=function(t,e){return Lt(t),void 0===e?t:p?Tn(t,e):function(){return t.apply(e,arguments)}},In=ct("iterator"),Pn=Array.prototype,Ln=ct("iterator"),Rn=function(t){if(!j(t))return Rt(t,Ln)||Rt(t,"@@iterator")||Ae[en(t)]},kn=TypeError,Nn=function(t,e,r){var n,o;pt(t);try{if(!(n=Rt(t,"return"))){if("throw"===e)throw r;return r}n=St(n,t)}catch(t){o=!0,n=t}if("throw"===e)throw r;if(o)throw n;return pt(n),r},zn=TypeError,Mn=function(t,e){this.stopped=t,this.result=e},_n=Mn.prototype,Cn=function(t,e,r){var n,o,i,u,a,c,f,l,s=r&&r.that,d=!(!r||!r.AS_ENTRIES),v=!(!r||!r.IS_RECORD),p=!(!r||!r.IS_ITERATOR),y=!(!r||!r.INTERRUPTED),h=An(e,s),g=function(t){return n&&Nn(n,"normal",t),new Mn(!0,t)},b=function(t){return d?(pt(t),y?h(t[0],t[1],g):h(t[0],t[1])):y?h(t,g):h(t)};if(v)n=t.iterator;else if(p)n=t;else{if(!(o=Rn(t)))throw new zn(It(t)+" is not iterable");if(void 0!==(l=o)&&(Ae.Array===l||Pn[In]===l)){for(i=0,u=Qt(t);u>i;i++)if((a=b(t[i]))&&Et(_n,a))return a;return new Mn(!1)}n=function(t,e){var r=arguments.length<2?Rn(t):e;if(Lt(r))return pt(St(r,t));throw new kn(It(t)+" is not iterable")}(t,o)}for(c=v?t.next:n.next;!(f=St(c,n)).done;){try{a=b(f.value)}catch(t){Nn(n,"throw",t)}if("object"==typeof a&&a&&Et(_n,a))return a}return new Mn(!1)},Fn=TypeError,Dn=function(t,e){if(Et(e,t))return t;throw new Fn("Incorrect invocation")},Bn=ct("iterator"),Hn=!1;try{var $n=0,Gn={next:function(){return{done:!!$n++}},return:function(){Hn=!0}};Gn[Bn]=function(){return this},Array.from(Gn,(function(){throw 2}))}catch(t){}var Vn=Array.isArray||function(t){return"Array"===O(t)},Wn=function(){},Un=xt("Reflect","construct"),Kn=/^\s*(?:class|function)\b/,Yn=b(Kn.exec),Xn=!Kn.test(Wn),qn=function(t){if(!lt(t))return!1;try{return Un(Wn,[],t),!0}catch(t){return!1}},Jn=function(t){if(!lt(t))return!1;switch(en(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Xn||!!Yn(Kn,Je(t))}catch(t){return!0}};Jn.sham=!0;var Qn=!Un||v((function(){var t;return qn(qn.call)||!qn(Object)||!qn((function(){t=!0}))||t}))?Jn:qn,Zn=ct("species"),to=Array,eo=function(t,e){return new(function(t){var e;return Vn(t)&&(e=t.constructor,(Qn(e)&&(e===to||Vn(e.prototype))||st(e)&&null===(e=e[Zn]))&&(e=void 0)),void 0===e?to:e}(t))(0===e?0:e)},ro=b([].push),no=function(t){var e=1===t,r=2===t,n=3===t,o=4===t,i=6===t,u=7===t,a=5===t||i;return function(c,f,l,s){for(var d,v,p=B(c),y=E(p),h=Qt(y),g=An(f,l),b=0,m=s||eo,w=e?m(c,h):r||u?m(c,0):void 0;h>b;b++)if((a||b in y)&&(v=g(d=y[b],b,p),t))if(e)w[b]=v;else if(v)switch(t){case 3:return!0;case 5:return d;case 6:return b;case 2:ro(w,d)}else switch(t){case 4:return!1;case 7:ro(w,d)}return i?-1:n||o?o:w}},oo={forEach:no(0),map:no(1),filter:no(2),some:no(3),every:no(4),find:no(5),findIndex:no(6),filterReject:no(7)},io=En.getWeakData,uo=Ce.set,ao=Ce.getterFor,co=oo.find,fo=oo.findIndex,lo=b([].splice),so=0,vo=function(t){return t.frozen||(t.frozen=new po)},po=function(){this.entries=[]},yo=function(t,e){return co(t.entries,(function(t){return t[0]===e}))};po.prototype={get:function(t){var e=yo(this,t);if(e)return e[1]},has:function(t){return!!yo(this,t)},set:function(t,e){var r=yo(this,t);r?r[1]=e:this.entries.push([t,e])},delete:function(t){var e=fo(this.entries,(function(e){return e[0]===t}));return~e&&lo(this.entries,e,1),!!~e}};var ho,go={getConstructor:function(t,e,r,n){var o=t((function(t,o){Dn(t,i),uo(t,{type:e,id:so++,frozen:null}),j(o)||Cn(o,t[n],{that:t,AS_ENTRIES:r})})),i=o.prototype,u=ao(e),a=function(t,e,r){var n=u(t),o=io(pt(e),!0);return!0===o?vo(n).set(e,r):o[n.id]=r,t};return hn(i,{delete:function(t){var e=u(this);if(!st(t))return!1;var r=io(t);return!0===r?vo(e).delete(t):r&&$(r,e.id)&&delete r[e.id]},has:function(t){var e=u(this);if(!st(t))return!1;var r=io(t);return!0===r?vo(e).has(t):r&&$(r,e.id)}}),hn(i,r?{get:function(t){var e=u(this);if(st(t)){var r=io(t);if(!0===r)return vo(e).get(t);if(r)return r[e.id]}},set:function(t,e){return a(this,t,e)}}:{add:function(t){return a(this,t,!0)}}),o}},bo=Ce.enforce,mo=Object,wo=Array.isArray,Oo=mo.isExtensible,So=mo.isFrozen,xo=mo.isSealed,Eo=mo.freeze,jo=mo.seal,To=!z.ActiveXObject&&"ActiveXObject"in z,Ao=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},Io=function(t,e,r){var n=-1!==t.indexOf("Map"),o=-1!==t.indexOf("Weak"),i=n?"set":"add",u=z[t],a=u&&u.prototype,c=u,f={},l=function(t){var e=b(a[t]);Ze(a,t,"add"===t?function(t){return e(this,0===t?0:t),this}:"delete"===t?function(t){return!(o&&!st(t))&&e(this,0===t?0:t)}:"get"===t?function(t){return o&&!st(t)?void 0:e(this,0===t?0:t)}:"has"===t?function(t){return!(o&&!st(t))&&e(this,0===t?0:t)}:function(t,r){return e(this,0===t?0:t,r),this})};if(dr(t,!lt(u)||!(o||a.forEach&&!v((function(){(new u).entries().next()})))))c=r.getConstructor(e,t,n,i),En.enable();else if(dr(t,!0)){var s=new c,d=s[i](o?{}:-0,1)!==s,p=v((function(){s.has(1)})),y=function(t,e){try{if(!e&&!Hn)return!1}catch(t){return!1}var r=!1;try{var n={};n[Bn]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch(t){}return r}((function(t){new u(t)})),h=!o&&v((function(){for(var t=new u,e=5;e--;)t[i](e,e);return!t.has(-0)}));y||((c=e((function(t,e){Dn(t,a);var r=function(t,e,r){var n,o;return kr&<(n=e.constructor)&&n!==r&&st(o=n.prototype)&&o!==r.prototype&&kr(t,o),t}(new u,t,c);return j(e)||Cn(e,r[i],{that:r,AS_ENTRIES:n}),r}))).prototype=a,a.constructor=c),(p||h)&&(l("delete"),l("has"),n&&l("get")),(h||d)&&l(i),o&&a.clear&&delete a.clear}return f[t]=c,pr({global:!0,constructor:!0,forced:c!==u},f),Tr(c,t),o||r.setStrong(c,t,n),c}("WeakMap",Ao,go),Po=Io.prototype,Lo=b(Po.set);if(Pe)if(To){ho=go.getConstructor(Ao,"WeakMap",!0),En.enable();var Ro=b(Po.delete),ko=b(Po.has),No=b(Po.get);hn(Po,{delete:function(t){if(st(t)&&!Oo(t)){var e=bo(this);return e.frozen||(e.frozen=new ho),Ro(this,t)||e.frozen.delete(t)}return Ro(this,t)},has:function(t){if(st(t)&&!Oo(t)){var e=bo(this);return e.frozen||(e.frozen=new ho),ko(this,t)||e.frozen.has(t)}return ko(this,t)},get:function(t){if(st(t)&&!Oo(t)){var e=bo(this);return e.frozen||(e.frozen=new ho),ko(this,t)?No(this,t):e.frozen.get(t)}return No(this,t)},set:function(t,e){if(st(t)&&!Oo(t)){var r=bo(this);r.frozen||(r.frozen=new ho),ko(this,t)?Lo(this,t,e):r.frozen.set(t,e)}else Lo(this,t,e);return this}})}else yn&&v((function(){var t=Eo([]);return Lo(new Io,t,1),!So(t)}))&&hn(Po,{set:function(t,e){var r;return wo(t)&&(So(t)?r=Eo:xo(t)&&(r=jo)),Lo(this,t,e),r&&r(t),this}});var zo={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Mo=mt("span").classList,_o=Mo&&Mo.constructor&&Mo.constructor.prototype,Co=_o===Object.prototype?void 0:_o,Fo=ct("iterator"),Do=Yr.values,Bo=function(t,e){if(t){if(t[Fo]!==Do)try{Re(t,Fo,Do)}catch(e){t[Fo]=Do}if(Tr(t,e,!0),zo[e])for(var r in Yr)if(t[r]!==Yr[r])try{Re(t,r,Yr[r])}catch(e){t[r]=Yr[r]}}};for(var Ho in zo)Bo(z[Ho]&&z[Ho].prototype,Ho);Bo(Co,"DOMTokenList");var $o=new WeakMap;function Go(t){var e,r=t.children||[],o=r.length;if(0===o)return"";for(var i=0;i<o&&!e;i++){var u=r[i];n.isText(u)&&(e=u)}return null==e?"":e.color||""}var Vo={type:"list-item",renderElem:function(t,r,n){$o.set(t,n);var u=t,a=u.level,f=void 0===a?0:a,l=u.ordered,s={margin:"5px 0 5px "+20*f+"px"},d="";if(void 0!==l&&l){var v=function(t,r){var n=r,u=n.type,a=n.level,c=void 0===a?0:a,f=n.ordered,l=void 0!==f&&f,s=1,d=r,v=e.findPath(t,d);if(0===v[0])return 1;for(;v[0]>0;){var p=o.previous(v),y=i.node(t,p);if(null==y)break;var h=y[0],g=h.level,b=void 0===g?0:g,m=h.type,w=h.ordered;if(m!==u)break;if(b<c)break;if(b===c){if(w!==l)break;s++}d=h,v=p}return s}(n,t);d=v+"."}else d=function(t){void 0===t&&(t=0);var e="";switch(t){case 0:e="•";break;case 1:e="◦";break;default:e="▪"}return e}(f);var p=Go(t);return c("div",{style:s},c("span",{contentEditable:!1,style:{marginRight:"0.5em",color:p},"data-w-e-reserve":!0},d),c("span",null,r))}},Wo=function(t,e){return Wo=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},Wo(t,e)};function Uo(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}Wo(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}function Ko(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Yo(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u}function Xo(t,r,n){for(var u=r.type,a=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r}(r,["type"]),c=void 0!==n?n:a.level||0,f=e.findPath(t,r),l=f;;){if(0===l.length||0===f[f.length-1])return null;l=o.previous(l);var s=i.node(t,l);if(!s)return null;var d=Yo(s,1)[0],v=d.level,p=void 0===v?0:v;if(e.getNodeType(d)!==u)return null;if(p===c)return d}}function qo(t,e,r){var n=Xo(t,e,r);return!!n&&n.ordered===e.ordered}function Jo(t){return i.nodes(t,{at:t.selection||void 0,match:function(r){return 1===e.findPath(t,r).length}})}"function"==typeof SuppressedError&&SuppressedError;var Qo=te.includes,Zo=v((function(){return!Array(1).includes()}));pr({target:"Array",proto:!0,forced:Zo},{includes:function(t){return Qo(this,t,arguments.length>1?arguments[1]:void 0)}}),Te("includes");var ti,ei,ri=function(){var t=pt(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e},ni=z.RegExp,oi=v((function(){var t=ni("a","y");return t.lastIndex=2,null!==t.exec("abcd")})),ii=oi||v((function(){return!ni("a","y").sticky})),ui={BROKEN_CARET:oi||v((function(){var t=ni("^r","gy");return t.lastIndex=2,null!==t.exec("str")})),MISSED_STICKY:ii,UNSUPPORTED_Y:oi},ai=z.RegExp,ci=v((function(){var t=ai(".","s");return!(t.dotAll&&t.test("\n")&&"s"===t.flags)})),fi=z.RegExp,li=v((function(){var t=fi("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})),si=Ce.get,di=F("native-string-replace",String.prototype.replace),vi=RegExp.prototype.exec,pi=vi,yi=b("".charAt),hi=b("".indexOf),gi=b("".replace),bi=b("".slice),mi=(ei=/b*/g,St(vi,ti=/a/,"a"),St(vi,ei,"a"),0!==ti.lastIndex||0!==ei.lastIndex),wi=ui.BROKEN_CARET,Oi=void 0!==/()??/.exec("")[1];(mi||Oi||wi||ci||li)&&(pi=function(t){var e,r,n,o,i,u,a,c=this,f=si(c),l=on(t),s=f.raw;if(s)return s.lastIndex=c.lastIndex,e=St(pi,s,l),c.lastIndex=s.lastIndex,e;var d=f.groups,v=wi&&c.sticky,p=St(ri,c),y=c.source,h=0,g=l;if(v&&(p=gi(p,"y",""),-1===hi(p,"g")&&(p+="g"),g=bi(l,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==yi(l,c.lastIndex-1))&&(y="(?: "+y+")",g=" "+g,h++),r=new RegExp("^(?:"+y+")",p)),Oi&&(r=new RegExp("^"+y+"$(?!\\s)",p)),mi&&(n=c.lastIndex),o=St(vi,v?r:c,g),v?o?(o.input=bi(o.input,h),o[0]=bi(o[0],h),o.index=c.lastIndex,c.lastIndex+=o[0].length):c.lastIndex=0:mi&&o&&(c.lastIndex=c.global?o.index+o[0].length:n),Oi&&o&&o.length>1&&St(di,o[0],r,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)})),o&&d)for(o.groups=u=me(null),i=0;i<d.length;i++)u[(a=d[i])[0]]=o[a[1]];return o});var Si=pi;pr({target:"RegExp",proto:!0,forced:/./.exec!==Si},{exec:Si});var xi=function(){function t(){this.type="list-item",this.tag="button"}return t.prototype.getListNode=function(t){var r=this.type;return e.getSelectedNodeByType(t,r)},t.prototype.getValue=function(t){return""},t.prototype.isActive=function(t){var e=this.getListNode(t);if(null==e)return!1;var r=e.ordered;return(void 0!==r&&r)===this.ordered},t.prototype.isDisabled=function(t){return null==t.selection||!!e.getSelectedElems(t).some((function(e){if(i.isVoid(t,e)&&i.isBlock(t,e))return!0;var r=e.type;return!!["pre","code","table"].includes(r)||void 0}))},t.prototype.exec=function(t,e){this.isActive(t)?u.setNodes(t,{type:"paragraph",ordered:void 0,level:void 0}):u.setNodes(t,{type:"list-item",ordered:this.ordered,indent:void 0})},t}(),Ei=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.ordered=!1,e.title=r("listModule.unOrderedList"),e.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M384 64h640v128H384V64z m0 384h640v128H384v-128z m0 384h640v128H384v-128zM0 128a128 128 0 1 1 256 0 128 128 0 0 1-256 0z m0 384a128 128 0 1 1 256 0 128 128 0 0 1-256 0z m0 384a128 128 0 1 1 256 0 128 128 0 0 1-256 0z"></path></svg>',e}return Uo(e,t),e}(xi),ji=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.ordered=!0,e.title=r("listModule.orderedList"),e.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M384 832h640v128H384z m0-384h640v128H384z m0-384h640v128H384zM192 0v256H128V64H64V0zM128 526.016v50.016h128v64H64v-146.016l128-60V384H64v-64h192v146.016zM256 704v320H64v-64h128v-64H64v-64h128v-64H64v-64z"></path></svg>',e}return Uo(e,t),e}(xi),Ti={key:"bulletedList",factory:function(){return new Ei}},Ai={key:"numberedList",factory:function(){return new ji}};var Ii=[];var Pi,Li={type:"list-item",elemToHtml:function(t,r){var n="",u="",a=t.ordered,c=void 0!==a&&a?"ol":"ul",f=function(t){var r=$o.get(t);if(null==r)return 0;var n=t,u=n.type,a=n.ordered,c=void 0!==a&&a,f=n.level,l=void 0===f?0:f,s=e.findPath(r,t);if(0===s[0])return l+1;var d=o.previous(s),v=i.node(r,d);if(!v)return 0;var p=Yo(v,1)[0];if(e.getNodeType(p)!==u)return l+1;var y=p,h=y.ordered,g=void 0!==h&&h,b=y.level,m=void 0===b?0:b;return m<l?l-m:m>l?qo(r,t)?0:1:m===l?g===c?0:1:0}(t);if(f>0)for(var l=0;l<f;l++)n+="<"+c+">",Ii.push(c);var s=function(t){var r=$o.get(t);if(null==r)return 0;var n=t,u=n.type,a=n.ordered,c=void 0!==a&&a,f=n.level,l=void 0===f?0:f,s=e.findPath(r,t);if(s[0]===r.children.length-1)return l+1;var d=o.next(s),v=i.node(r,d);if(!v)return 0;var p=Yo(v,1)[0];if(e.getNodeType(p)!==u)return l+1;var y=p,h=y.ordered,g=void 0!==h&&h,b=y.level,m=void 0===b?0:b;return m<l?qo(r,p)?l-m:l-m+1:m>l?0:m===l?g===c?0:1:0}(t);if(s>0)for(l=0;l<s;l++){u+="</"+Ii.pop()+">"}var d=Go(t);return{html:"<li"+(d?' style="color:'+d+'"':"")+">"+r+"</li>",prefix:n,suffix:u}}},Ri=ct("species"),ki=oo.filter,Ni=(Pi="filter",et>=51||!v((function(){var t=[];return(t.constructor={})[Ri]=function(){return{foo:1}},1!==t[Pi](Boolean).foo})));pr({target:"Array",proto:!0,forced:!Ni},{filter:function(t){return ki(this,t,arguments.length>1?arguments[1]:void 0)}});var zi=TypeError,Mi=function(t){if(t>9007199254740991)throw zi("Maximum allowed index exceeded");return t},_i=function(t,e,r,n,o,i,u,a){for(var c,f,l=o,s=0,d=!!u&&An(u,a);s<n;)s in r&&(c=d?d(r[s],s,e):r[s],i>0&&Vn(c)?(f=Qt(c),l=_i(t,e,c,f,l,i-1)-1):(Mi(l+1),t[l]=c),l++),s++;return l},Ci=_i;pr({target:"Array",proto:!0},{flat:function(){var t=arguments.length?arguments[0]:void 0,e=B(this),r=Qt(e),n=eo(e,0);return n.length=Ci(n,e,e,r,0,void 0===t?1:Kt(t)),n}}),Te("flat");var Fi=Function.prototype,Di=Fi.apply,Bi=Fi.call,Hi="object"==typeof Reflect&&Reflect.apply||(p?Bi.bind(Di):function(){return Bi.apply(Di,arguments)}),$i=ct("species"),Gi=RegExp.prototype,Vi=ln.charAt,Wi=function(t,e,r){return e+(r?Vi(t,e).length:1)},Ui=Math.floor,Ki=b("".charAt),Yi=b("".replace),Xi=b("".slice),qi=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Ji=/\$([$&'`]|\d{1,2})/g,Qi=function(t,e,r,n,o,i){var u=r+t.length,a=n.length,c=Ji;return void 0!==o&&(o=B(o),c=qi),Yi(i,c,(function(i,c){var f;switch(Ki(c,0)){case"$":return"$";case"&":return t;case"`":return Xi(e,0,r);case"'":return Xi(e,u);case"<":f=o[Xi(c,1,-1)];break;default:var l=+c;if(0===l)return i;if(l>a){var s=Ui(l/10);return 0===s?i:s<=a?void 0===n[s-1]?Ki(c,1):n[s-1]+Ki(c,1):i}f=n[l-1]}return void 0===f?"":f}))},Zi=TypeError,tu=function(t,e){var r=t.exec;if(lt(r)){var n=St(r,t,e);return null!==n&&pt(n),n}if("RegExp"===O(t))return St(Si,t,e);throw new Zi("RegExp#exec called on incompatible receiver")},eu=ct("replace"),ru=Math.max,nu=Math.min,ou=b([].concat),iu=b([].push),uu=b("".indexOf),au=b("".slice),cu="$0"==="a".replace(/./,"$0"),fu=!!/./[eu]&&""===/./[eu]("a","$0");function lu(t){return t.length?t[0].tagName.toLowerCase():""}!function(t,e,r,n){var o=ct(t),i=!v((function(){var e={};return e[o]=function(){return 7},7!==""[t](e)})),u=i&&!v((function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[$i]=function(){return r},r.flags="",r[o]=/./[o]),r.exec=function(){return e=!0,null},r[o](""),!e}));if(!i||!u||r){var a=/./[o],c=e(o,""[t],(function(t,e,r,n,o){var u=e.exec;return u===Si||u===Gi.exec?i&&!o?{done:!0,value:St(a,e,r,n)}:{done:!0,value:St(t,r,e,n)}:{done:!1}}));Ze(String.prototype,t,c[0]),Ze(Gi,o,c[1])}n&&Re(Gi[o],"sham",!0)}("replace",(function(t,e,r){var n=fu?"$":"$0";return[function(t,r){var n=A(this),o=j(t)?void 0:Rt(t,eu);return o?St(o,t,n,r):St(e,on(n),t,r)},function(t,o){var i=pt(this),u=on(t);if("string"==typeof o&&-1===uu(o,n)&&-1===uu(o,"$<")){var a=r(e,i,u,o);if(a.done)return a.value}var c=lt(o);c||(o=on(o));var f,l=i.global;l&&(f=i.unicode,i.lastIndex=0);for(var s,d=[];null!==(s=tu(i,u))&&(iu(d,s),l);){""===on(s[0])&&(i.lastIndex=Wi(u,Jt(i.lastIndex),f))}for(var v,p="",y=0,h=0;h<d.length;h++){for(var g,b=on((s=d[h])[0]),m=ru(nu(Kt(s.index),u.length),0),w=[],O=1;O<s.length;O++)iu(w,void 0===(v=s[O])?v:String(v));var S=s.groups;if(c){var x=ou([b],w,m,u);void 0!==S&&iu(x,S),g=on(Hi(o,void 0,x))}else g=Qi(b,u,m,w,S,o);m>=y&&(p+=au(u,y,m)+g,y=m+b.length)}return p+au(u,y)}]}),!!v((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!cu||fu),pr({global:!0,forced:z.globalThis!==z},{globalThis:z}),l&&(f.fn.append=l),s&&(f.fn.attr=s),d&&(f.fn.parent=d);var su={renderElems:[Vo],editorPlugin:function(t){var r=t.deleteBackward,n=t.handleTab,o=t.normalizeNode,c=t.insertBreak,f=t;return f.insertBreak=function(){var r=Yo(i.nodes(t,{match:function(t){return e.checkNodeType(t,"list-item")},universal:!0}),1)[0];return r?""!==r[0].children[0].text?c():void u.setNodes(f,{type:"paragraph",ordered:void 0,level:void 0}):c()},f.deleteBackward=function(n){var o=f.selection;if(null!=o)if(a.isExpanded(o))r(n);else{var i=e.getSelectedNodeByType(f,"list-item");if(null!=i)if(0!==o.focus.offset)r(n);else{var c=i,l=c.level,s=void 0===l?0:l,d=c.ordered,v=void 0!==d&&d;if(s>0){var p=Xo(t,i,s-1);p&&p.ordered!==v?u.setNodes(f,{level:s-1,ordered:!v}):u.setNodes(f,{level:s-1})}else u.setNodes(f,{type:"paragraph",ordered:void 0,level:void 0})}else r(n)}else r(n)},f.handleTab=function(){var t,r,o,i,c=f.selection;if(null!=c){if(a.isCollapsed(c)){var l=e.getSelectedNodeByType(f,"list-item");if(null==l)return void n();if(0===c.focus.offset){var s=l.level,d=void 0===s?0:s;return void u.setNodes(f,{level:d+1})}}if(a.isExpanded(c)){var v=0,p=!1;try{for(var y=Ko(Jo(f)),h=y.next();!h.done;h=y.next()){var g=Yo(h.value,1)[0];"list-item"===e.getNodeType(g)?v++:p=!0}}catch(e){t={error:e}}finally{try{h&&!h.done&&(r=y.return)&&r.call(y)}finally{if(t)throw t.error}}if(p||v<=1)return void n();try{for(var b=Ko(Jo(f)),m=b.next();!m.done;m=b.next()){var w=Yo(m.value,2),O=(g=w[0],w[1]),S=g.level;d=void 0===S?0:S;u.setNodes(f,{level:d+1},{at:O})}}catch(t){o={error:t}}finally{try{m&&!m.done&&(i=b.return)&&i.call(b)}finally{if(o)throw o.error}}}else n()}else n()},f.normalizeNode=function(t){var r=Yo(t,2),n=r[0],i=r[1],a=e.getNodeType(n);return"bulleted-list"!==a&&"numbered-list"!==a||u.unwrapNodes(f,{at:i}),o([n,i])},f},menus:[Ti,Ai],elemsToHtml:[Li],parseElemsHtml:[{selector:"ul:not([data-w-e-type]),ol:not([data-w-e-type])",parseElemHtml:function(t,e,r){return e.flat(1/0)}},{selector:"li:not([data-w-e-type])",parseElemHtml:function(t,e,r){var o=f(t);0===(e=e.filter((function(t){return!!n.isText(t)||!!r.isInline(t)}))).length&&(e=[{text:o.text().replace(/\s+/gm," ")}]);var i=function(t){return"ol"===lu(t.parent())}(o),u=function(t){for(var e=0,r=t.parent(),n=lu(r);"ul"===n||"ol"===n;)n=lu(r=r.parent()),e++;return e-1}(o);return{type:"list-item",ordered:i,level:u,children:e}}}]};export{su as default};
|
|
1
|
+
import{i18nAddResources as t,DomEditor as e,t as r}from"@wangeditor-next/core";import{Text as n,Path as o,Editor as i,Transforms as u,Range as a}from"slate";import c,{append as f,attr as l,parent as s}from"dom7";import{jsx as d}from"snabbdom";t("en",{listModule:{unOrderedList:"Unordered list",orderedList:"Ordered list"}}),t("zh-CN",{listModule:{unOrderedList:"无序列表",orderedList:"有序列表"}});var v="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function p(t){var e={exports:{}};return t(e,e.exports),e.exports}var y,h,g=function(t){return t&&t.Math===Math&&t},b=g("object"==typeof globalThis&&globalThis)||g("object"==typeof window&&window)||g("object"==typeof self&&self)||g("object"==typeof v&&v)||g("object"==typeof v&&v)||function(){return this}()||Function("return this")(),m=function(t){try{return!!t()}catch(t){return!0}},w=!m((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),O=!m((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),S=Function.prototype.call,x=O?S.bind(S):function(){return S.apply(S,arguments)},E={}.propertyIsEnumerable,j=Object.getOwnPropertyDescriptor,T={f:j&&!E.call({1:2},1)?function(t){var e=j(this,t);return!!e&&e.enumerable}:E},A=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},I=Function.prototype,P=I.call,L=O&&I.bind.bind(P,P),R=O?L:function(t){return function(){return P.apply(t,arguments)}},k=R({}.toString),N=R("".slice),z=function(t){return N(k(t),8,-1)},M=Object,_=R("".split),C=m((function(){return!M("z").propertyIsEnumerable(0)}))?function(t){return"String"===z(t)?_(t,""):M(t)}:M,F=function(t){return null==t},D=TypeError,B=function(t){if(F(t))throw new D("Can't call method on "+t);return t},H=function(t){return C(B(t))},$="object"==typeof document&&document.all,G=void 0===$&&void 0!==$?function(t){return"function"==typeof t||t===$}:function(t){return"function"==typeof t},V=function(t){return"object"==typeof t?null!==t:G(t)},W=function(t,e){return arguments.length<2?(r=b[t],G(r)?r:void 0):b[t]&&b[t][e];var r},U=R({}.isPrototypeOf),K=b.navigator,Y=K&&K.userAgent,X=Y?String(Y):"",q=b.process,J=b.Deno,Q=q&&q.versions||J&&J.version,Z=Q&&Q.v8;Z&&(h=(y=Z.split("."))[0]>0&&y[0]<4?1:+(y[0]+y[1])),!h&&X&&(!(y=X.match(/Edge\/(\d+)/))||y[1]>=74)&&(y=X.match(/Chrome\/(\d+)/))&&(h=+y[1]);var tt=h,et=b.String,rt=!!Object.getOwnPropertySymbols&&!m((function(){var t=Symbol("symbol detection");return!et(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&tt&&tt<41})),nt=rt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,ot=Object,it=nt?function(t){return"symbol"==typeof t}:function(t){var e=W("Symbol");return G(e)&&U(e.prototype,ot(t))},ut=String,at=function(t){try{return ut(t)}catch(t){return"Object"}},ct=TypeError,ft=function(t){if(G(t))return t;throw new ct(at(t)+" is not a function")},lt=function(t,e){var r=t[e];return F(r)?void 0:ft(r)},st=TypeError,dt=Object.defineProperty,vt=function(t,e){try{dt(b,t,{value:e,configurable:!0,writable:!0})}catch(r){b[t]=e}return e},pt=p((function(t){var e="__core-js_shared__",r=t.exports=b[e]||vt(e,{});(r.versions||(r.versions=[])).push({version:"3.38.1",mode:"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"})})),yt=function(t,e){return pt[t]||(pt[t]=e||{})},ht=Object,gt=function(t){return ht(B(t))},bt=R({}.hasOwnProperty),mt=Object.hasOwn||function(t,e){return bt(gt(t),e)},wt=0,Ot=Math.random(),St=R(1..toString),xt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+St(++wt+Ot,36)},Et=b.Symbol,jt=yt("wks"),Tt=nt?Et.for||Et:Et&&Et.withoutSetter||xt,At=function(t){return mt(jt,t)||(jt[t]=rt&&mt(Et,t)?Et[t]:Tt("Symbol."+t)),jt[t]},It=TypeError,Pt=At("toPrimitive"),Lt=function(t,e){if(!V(t)||it(t))return t;var r,n=lt(t,Pt);if(n){if(void 0===e&&(e="default"),r=x(n,t,e),!V(r)||it(r))return r;throw new It("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var r,n;if("string"===e&&G(r=t.toString)&&!V(n=x(r,t)))return n;if(G(r=t.valueOf)&&!V(n=x(r,t)))return n;if("string"!==e&&G(r=t.toString)&&!V(n=x(r,t)))return n;throw new st("Can't convert object to primitive value")}(t,e)},Rt=function(t){var e=Lt(t,"string");return it(e)?e:e+""},kt=b.document,Nt=V(kt)&&V(kt.createElement),zt=function(t){return Nt?kt.createElement(t):{}},Mt=!w&&!m((function(){return 7!==Object.defineProperty(zt("div"),"a",{get:function(){return 7}}).a})),_t=Object.getOwnPropertyDescriptor,Ct={f:w?_t:function(t,e){if(t=H(t),e=Rt(e),Mt)try{return _t(t,e)}catch(t){}if(mt(t,e))return A(!x(T.f,t,e),t[e])}},Ft=w&&m((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Dt=String,Bt=TypeError,Ht=function(t){if(V(t))return t;throw new Bt(Dt(t)+" is not an object")},$t=TypeError,Gt=Object.defineProperty,Vt=Object.getOwnPropertyDescriptor,Wt="enumerable",Ut="configurable",Kt="writable",Yt={f:w?Ft?function(t,e,r){if(Ht(t),e=Rt(e),Ht(r),"function"==typeof t&&"prototype"===e&&"value"in r&&Kt in r&&!r[Kt]){var n=Vt(t,e);n&&n[Kt]&&(t[e]=r.value,r={configurable:Ut in r?r[Ut]:n[Ut],enumerable:Wt in r?r[Wt]:n[Wt],writable:!1})}return Gt(t,e,r)}:Gt:function(t,e,r){if(Ht(t),e=Rt(e),Ht(r),Mt)try{return Gt(t,e,r)}catch(t){}if("get"in r||"set"in r)throw new $t("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},Xt=w?function(t,e,r){return Yt.f(t,e,A(1,r))}:function(t,e,r){return t[e]=r,t},qt=Function.prototype,Jt=w&&Object.getOwnPropertyDescriptor,Qt=mt(qt,"name"),Zt={EXISTS:Qt,PROPER:Qt&&"something"===function(){}.name,CONFIGURABLE:Qt&&(!w||w&&Jt(qt,"name").configurable)},te=R(Function.toString);G(pt.inspectSource)||(pt.inspectSource=function(t){return te(t)});var ee,re,ne,oe=pt.inspectSource,ie=b.WeakMap,ue=G(ie)&&/native code/.test(String(ie)),ae=yt("keys"),ce=function(t){return ae[t]||(ae[t]=xt(t))},fe={},le="Object already initialized",se=b.TypeError,de=b.WeakMap;if(ue||pt.state){var ve=pt.state||(pt.state=new de);ve.get=ve.get,ve.has=ve.has,ve.set=ve.set,ee=function(t,e){if(ve.has(t))throw new se(le);return e.facade=t,ve.set(t,e),e},re=function(t){return ve.get(t)||{}},ne=function(t){return ve.has(t)}}else{var pe=ce("state");fe[pe]=!0,ee=function(t,e){if(mt(t,pe))throw new se(le);return e.facade=t,Xt(t,pe,e),e},re=function(t){return mt(t,pe)?t[pe]:{}},ne=function(t){return mt(t,pe)}}var ye={set:ee,get:re,has:ne,enforce:function(t){return ne(t)?re(t):ee(t,{})},getterFor:function(t){return function(e){var r;if(!V(e)||(r=re(e)).type!==t)throw new se("Incompatible receiver, "+t+" required");return r}}},he=p((function(t){var e=Zt.CONFIGURABLE,r=ye.enforce,n=ye.get,o=String,i=Object.defineProperty,u=R("".slice),a=R("".replace),c=R([].join),f=w&&!m((function(){return 8!==i((function(){}),"length",{value:8}).length})),l=String(String).split("String"),s=t.exports=function(t,n,s){"Symbol("===u(o(n),0,7)&&(n="["+a(o(n),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),s&&s.getter&&(n="get "+n),s&&s.setter&&(n="set "+n),(!mt(t,"name")||e&&t.name!==n)&&(w?i(t,"name",{value:n,configurable:!0}):t.name=n),f&&s&&mt(s,"arity")&&t.length!==s.arity&&i(t,"length",{value:s.arity});try{s&&mt(s,"constructor")&&s.constructor?w&&i(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var d=r(t);return mt(d,"source")||(d.source=c(l,"string"==typeof n?n:"")),t};Function.prototype.toString=s((function(){return G(this)&&n(this).source||oe(this)}),"toString")})),ge=function(t,e,r,n){n||(n={});var o=n.enumerable,i=void 0!==n.name?n.name:e;if(G(r)&&he(r,i,n),n.global)o?t[e]=r:vt(e,r);else{try{n.unsafe?t[e]&&(o=!0):delete t[e]}catch(t){}o?t[e]=r:Yt.f(t,e,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return t},be=Math.ceil,me=Math.floor,we=Math.trunc||function(t){var e=+t;return(e>0?me:be)(e)},Oe=function(t){var e=+t;return e!=e||0===e?0:we(e)},Se=Math.max,xe=Math.min,Ee=Math.min,je=function(t){var e=Oe(t);return e>0?Ee(e,9007199254740991):0},Te=function(t){return je(t.length)},Ae=function(t){return function(e,r,n){var o=H(e),i=Te(o);if(0===i)return!t&&-1;var u,a=function(t,e){var r=Oe(t);return r<0?Se(r+e,0):xe(r,e)}(n,i);if(t&&r!=r){for(;i>a;)if((u=o[a++])!=u)return!0}else for(;i>a;a++)if((t||a in o)&&o[a]===r)return t||a||0;return!t&&-1}},Ie={includes:Ae(!0),indexOf:Ae(!1)},Pe=Ie.indexOf,Le=R([].push),Re=function(t,e){var r,n=H(t),o=0,i=[];for(r in n)!mt(fe,r)&&mt(n,r)&&Le(i,r);for(;e.length>o;)mt(n,r=e[o++])&&(~Pe(i,r)||Le(i,r));return i},ke=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Ne=ke.concat("length","prototype"),ze={f:Object.getOwnPropertyNames||function(t){return Re(t,Ne)}},Me={f:Object.getOwnPropertySymbols},_e=R([].concat),Ce=W("Reflect","ownKeys")||function(t){var e=ze.f(Ht(t)),r=Me.f;return r?_e(e,r(t)):e},Fe=function(t,e,r){for(var n=Ce(e),o=Yt.f,i=Ct.f,u=0;u<n.length;u++){var a=n[u];mt(t,a)||r&&mt(r,a)||o(t,a,i(e,a))}},De=/#|\.prototype\./,Be=function(t,e){var r=$e[He(t)];return r===Ve||r!==Ge&&(G(e)?m(e):!!e)},He=Be.normalize=function(t){return String(t).replace(De,".").toLowerCase()},$e=Be.data={},Ge=Be.NATIVE="N",Ve=Be.POLYFILL="P",We=Be,Ue=Ct.f,Ke=function(t,e){var r,n,o,i,u,a=t.target,c=t.global,f=t.stat;if(r=c?b:f?b[a]||vt(a,{}):b[a]&&b[a].prototype)for(n in e){if(i=e[n],o=t.dontCallGetSet?(u=Ue(r,n))&&u.value:r[n],!We(c?n:a+(f?".":"#")+n,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;Fe(i,o)}(t.sham||o&&o.sham)&&Xt(i,"sham",!0),ge(r,n,i,t)}},Ye=Array.isArray||function(t){return"Array"===z(t)},Xe=TypeError,qe=function(t){if(t>9007199254740991)throw Xe("Maximum allowed index exceeded");return t},Je=function(t,e,r){w?Yt.f(t,e,A(0,r)):t[e]=r},Qe={};Qe[At("toStringTag")]="z";var Ze="[object z]"===String(Qe),tr=At("toStringTag"),er=Object,rr="Arguments"===z(function(){return arguments}()),nr=Ze?z:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=er(t),tr))?r:rr?z(e):"Object"===(n=z(e))&&G(e.callee)?"Arguments":n},or=function(){},ir=W("Reflect","construct"),ur=/^\s*(?:class|function)\b/,ar=R(ur.exec),cr=!ur.test(or),fr=function(t){if(!G(t))return!1;try{return ir(or,[],t),!0}catch(t){return!1}},lr=function(t){if(!G(t))return!1;switch(nr(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return cr||!!ar(ur,oe(t))}catch(t){return!0}};lr.sham=!0;var sr=!ir||m((function(){var t;return fr(fr.call)||!fr(Object)||!fr((function(){t=!0}))||t}))?lr:fr,dr=At("species"),vr=Array,pr=function(t,e){return new(function(t){var e;return Ye(t)&&(e=t.constructor,(sr(e)&&(e===vr||Ye(e.prototype))||V(e)&&null===(e=e[dr]))&&(e=void 0)),void 0===e?vr:e}(t))(0===e?0:e)},yr=At("species"),hr=function(t){return tt>=51||!m((function(){var e=[];return(e.constructor={})[yr]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},gr=At("isConcatSpreadable"),br=tt>=51||!m((function(){var t=[];return t[gr]=!1,t.concat()[0]!==t})),mr=function(t){if(!V(t))return!1;var e=t[gr];return void 0!==e?!!e:Ye(t)},wr=!br||!hr("concat");Ke({target:"Array",proto:!0,arity:1,forced:wr},{concat:function(t){var e,r,n,o,i,u=gt(this),a=pr(u,0),c=0;for(e=-1,n=arguments.length;e<n;e++)if(mr(i=-1===e?u:arguments[e]))for(o=Te(i),qe(c+o),r=0;r<o;r++,c++)r in i&&Je(a,c,i[r]);else qe(c+1),Je(a,c++,i);return a.length=c,a}});var Or=function(t,e){return Or=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},Or(t,e)};function Sr(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}Or(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}function xr(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Er(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u}"function"==typeof SuppressedError&&SuppressedError;var jr,Tr=Object.keys||function(t){return Re(t,ke)},Ar=w&&!Ft?Object.defineProperties:function(t,e){Ht(t);for(var r,n=H(e),o=Tr(e),i=o.length,u=0;i>u;)Yt.f(t,r=o[u++],n[r]);return t},Ir={f:Ar},Pr=W("document","documentElement"),Lr="prototype",Rr="script",kr=ce("IE_PROTO"),Nr=function(){},zr=function(t){return"<"+Rr+">"+t+"</"+Rr+">"},Mr=function(t){t.write(zr("")),t.close();var e=t.parentWindow.Object;return t=null,e},_r=function(){try{jr=new ActiveXObject("htmlfile")}catch(t){}var t,e,r;_r="undefined"!=typeof document?document.domain&&jr?Mr(jr):(e=zt("iframe"),r="java"+Rr+":",e.style.display="none",Pr.appendChild(e),e.src=String(r),(t=e.contentWindow.document).open(),t.write(zr("document.F=Object")),t.close(),t.F):Mr(jr);for(var n=ke.length;n--;)delete _r[Lr][ke[n]];return _r()};fe[kr]=!0;var Cr=Object.create||function(t,e){var r;return null!==t?(Nr[Lr]=Ht(t),r=new Nr,Nr[Lr]=null,r[kr]=t):r=_r(),void 0===e?r:Ir.f(r,e)},Fr=Yt.f,Dr=At("unscopables"),Br=Array.prototype;void 0===Br[Dr]&&Fr(Br,Dr,{configurable:!0,value:Cr(null)});var Hr,$r,Gr,Vr=function(t){Br[Dr][t]=!0},Wr={},Ur=!m((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),Kr=ce("IE_PROTO"),Yr=Object,Xr=Yr.prototype,qr=Ur?Yr.getPrototypeOf:function(t){var e=gt(t);if(mt(e,Kr))return e[Kr];var r=e.constructor;return G(r)&&e instanceof r?r.prototype:e instanceof Yr?Xr:null},Jr=At("iterator"),Qr=!1;[].keys&&("next"in(Gr=[].keys())?($r=qr(qr(Gr)))!==Object.prototype&&(Hr=$r):Qr=!0);var Zr=!V(Hr)||m((function(){var t={};return Hr[Jr].call(t)!==t}));Zr&&(Hr={}),G(Hr[Jr])||ge(Hr,Jr,(function(){return this}));var tn={IteratorPrototype:Hr,BUGGY_SAFARI_ITERATORS:Qr},en=Yt.f,rn=At("toStringTag"),nn=function(t,e,r){t&&!r&&(t=t.prototype),t&&!mt(t,rn)&&en(t,rn,{configurable:!0,value:e})},on=tn.IteratorPrototype,un=function(){return this},an=String,cn=TypeError,fn=function(t){if(function(t){return V(t)||null===t}(t))return t;throw new cn("Can't set "+an(t)+" as a prototype")},ln=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=function(t,e,r){try{return R(ft(Object.getOwnPropertyDescriptor(t,e)[r]))}catch(t){}}(Object.prototype,"__proto__","set"))(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return B(r),fn(n),V(r)?(e?t(r,n):r.__proto__=n,r):r}}():void 0),sn=Zt.PROPER,dn=Zt.CONFIGURABLE,vn=tn.IteratorPrototype,pn=tn.BUGGY_SAFARI_ITERATORS,yn=At("iterator"),hn="keys",gn="values",bn="entries",mn=function(){return this},wn=function(t,e,r,n,o,i,u){!function(t,e,r,n){var o=e+" Iterator";t.prototype=Cr(on,{next:A(+!n,r)}),nn(t,o,!1),Wr[o]=un}(r,e,n);var a,c,f,l=function(t){if(t===o&&y)return y;if(!pn&&t&&t in v)return v[t];switch(t){case hn:case gn:case bn:return function(){return new r(this,t)}}return function(){return new r(this)}},s=e+" Iterator",d=!1,v=t.prototype,p=v[yn]||v["@@iterator"]||o&&v[o],y=!pn&&p||l(o),h="Array"===e&&v.entries||p;if(h&&(a=qr(h.call(new t)))!==Object.prototype&&a.next&&(qr(a)!==vn&&(ln?ln(a,vn):G(a[yn])||ge(a,yn,mn)),nn(a,s,!0)),sn&&o===gn&&p&&p.name!==gn&&(dn?Xt(v,"name",gn):(d=!0,y=function(){return x(p,this)})),o)if(c={values:l(gn),keys:i?y:l(hn),entries:l(bn)},u)for(f in c)(pn||d||!(f in v))&&ge(v,f,c[f]);else Ke({target:e,proto:!0,forced:pn||d},c);return v[yn]!==y&&ge(v,yn,y,{name:o}),Wr[e]=y,c},On=function(t,e){return{value:t,done:e}},Sn=Yt.f,xn="Array Iterator",En=ye.set,jn=ye.getterFor(xn),Tn=wn(Array,"Array",(function(t,e){En(this,{type:xn,target:H(t),index:0,kind:e})}),(function(){var t=jn(this),e=t.target,r=t.index++;if(!e||r>=e.length)return t.target=null,On(void 0,!0);switch(t.kind){case"keys":return On(r,!1);case"values":return On(e[r],!1)}return On([r,e[r]],!1)}),"values"),An=Wr.Arguments=Wr.Array;if(Vr("keys"),Vr("values"),Vr("entries"),w&&"values"!==An.name)try{Sn(An,"name",{value:"values"})}catch(t){}var In=Ze?{}.toString:function(){return"[object "+nr(this)+"]"};Ze||ge(Object.prototype,"toString",In,{unsafe:!0});var Pn=String,Ln=function(t){if("Symbol"===nr(t))throw new TypeError("Cannot convert a Symbol value to a string");return Pn(t)},Rn=R("".charAt),kn=R("".charCodeAt),Nn=R("".slice),zn=function(t){return function(e,r){var n,o,i=Ln(B(e)),u=Oe(r),a=i.length;return u<0||u>=a?t?"":void 0:(n=kn(i,u))<55296||n>56319||u+1===a||(o=kn(i,u+1))<56320||o>57343?t?Rn(i,u):n:t?Nn(i,u,u+2):o-56320+(n-55296<<10)+65536}},Mn={codeAt:zn(!1),charAt:zn(!0)},_n=Mn.charAt,Cn="String Iterator",Fn=ye.set,Dn=ye.getterFor(Cn);wn(String,"String",(function(t){Fn(this,{type:Cn,string:Ln(t),index:0})}),(function(){var t,e=Dn(this),r=e.string,n=e.index;return n>=r.length?On(void 0,!0):(t=_n(r,n),e.index+=t.length,On(t,!1))}));var Bn=!m((function(){return Object.isExtensible(Object.preventExtensions({}))})),Hn=function(t,e,r){for(var n in e)ge(t,n,e[n],r);return t},$n=R([].slice),Gn=ze.f,Vn="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Wn={f:function(t){return Vn&&"Window"===z(t)?function(t){try{return Gn(t)}catch(t){return $n(Vn)}}(t):Gn(H(t))}},Un=m((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}})),Kn=Object.isExtensible,Yn=m((function(){Kn(1)}))||Un?function(t){return!!V(t)&&((!Un||"ArrayBuffer"!==z(t))&&(!Kn||Kn(t)))}:Kn,Xn=p((function(t){var e=Yt.f,r=!1,n=xt("meta"),o=0,i=function(t){e(t,n,{value:{objectID:"O"+o++,weakData:{}}})},u=t.exports={enable:function(){u.enable=function(){},r=!0;var t=ze.f,e=R([].splice),o={};o[n]=1,t(o).length&&(ze.f=function(r){for(var o=t(r),i=0,u=o.length;i<u;i++)if(o[i]===n){e(o,i,1);break}return o},Ke({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Wn.f}))},fastKey:function(t,e){if(!V(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!mt(t,n)){if(!Yn(t))return"F";if(!e)return"E";i(t)}return t[n].objectID},getWeakData:function(t,e){if(!mt(t,n)){if(!Yn(t))return!0;if(!e)return!1;i(t)}return t[n].weakData},onFreeze:function(t){return Bn&&r&&Yn(t)&&!mt(t,n)&&i(t),t}};fe[n]=!0})),qn=function(t){if("Function"===z(t))return R(t)},Jn=qn(qn.bind),Qn=function(t,e){return ft(t),void 0===e?t:O?Jn(t,e):function(){return t.apply(e,arguments)}},Zn=At("iterator"),to=Array.prototype,eo=At("iterator"),ro=function(t){if(!F(t))return lt(t,eo)||lt(t,"@@iterator")||Wr[nr(t)]},no=TypeError,oo=function(t,e,r){var n,o;Ht(t);try{if(!(n=lt(t,"return"))){if("throw"===e)throw r;return r}n=x(n,t)}catch(t){o=!0,n=t}if("throw"===e)throw r;if(o)throw n;return Ht(n),r},io=TypeError,uo=function(t,e){this.stopped=t,this.result=e},ao=uo.prototype,co=function(t,e,r){var n,o,i,u,a,c,f,l,s=r&&r.that,d=!(!r||!r.AS_ENTRIES),v=!(!r||!r.IS_RECORD),p=!(!r||!r.IS_ITERATOR),y=!(!r||!r.INTERRUPTED),h=Qn(e,s),g=function(t){return n&&oo(n,"normal",t),new uo(!0,t)},b=function(t){return d?(Ht(t),y?h(t[0],t[1],g):h(t[0],t[1])):y?h(t,g):h(t)};if(v)n=t.iterator;else if(p)n=t;else{if(!(o=ro(t)))throw new io(at(t)+" is not iterable");if(void 0!==(l=o)&&(Wr.Array===l||to[Zn]===l)){for(i=0,u=Te(t);u>i;i++)if((a=b(t[i]))&&U(ao,a))return a;return new uo(!1)}n=function(t,e){var r=arguments.length<2?ro(t):e;if(ft(r))return Ht(x(r,t));throw new no(at(t)+" is not iterable")}(t,o)}for(c=v?t.next:n.next;!(f=x(c,n)).done;){try{a=b(f.value)}catch(t){oo(n,"throw",t)}if("object"==typeof a&&a&&U(ao,a))return a}return new uo(!1)},fo=TypeError,lo=function(t,e){if(U(e,t))return t;throw new fo("Incorrect invocation")},so=At("iterator"),vo=!1;try{var po=0,yo={next:function(){return{done:!!po++}},return:function(){vo=!0}};yo[so]=function(){return this},Array.from(yo,(function(){throw 2}))}catch(t){}var ho=R([].push),go=function(t){var e=1===t,r=2===t,n=3===t,o=4===t,i=6===t,u=7===t,a=5===t||i;return function(c,f,l,s){for(var d,v,p=gt(c),y=C(p),h=Te(y),g=Qn(f,l),b=0,m=s||pr,w=e?m(c,h):r||u?m(c,0):void 0;h>b;b++)if((a||b in y)&&(v=g(d=y[b],b,p),t))if(e)w[b]=v;else if(v)switch(t){case 3:return!0;case 5:return d;case 6:return b;case 2:ho(w,d)}else switch(t){case 4:return!1;case 7:ho(w,d)}return i?-1:n||o?o:w}},bo={forEach:go(0),map:go(1),filter:go(2),some:go(3),every:go(4),find:go(5),findIndex:go(6),filterReject:go(7)},mo=Xn.getWeakData,wo=ye.set,Oo=ye.getterFor,So=bo.find,xo=bo.findIndex,Eo=R([].splice),jo=0,To=function(t){return t.frozen||(t.frozen=new Ao)},Ao=function(){this.entries=[]},Io=function(t,e){return So(t.entries,(function(t){return t[0]===e}))};Ao.prototype={get:function(t){var e=Io(this,t);if(e)return e[1]},has:function(t){return!!Io(this,t)},set:function(t,e){var r=Io(this,t);r?r[1]=e:this.entries.push([t,e])},delete:function(t){var e=xo(this.entries,(function(e){return e[0]===t}));return~e&&Eo(this.entries,e,1),!!~e}};var Po,Lo={getConstructor:function(t,e,r,n){var o=t((function(t,o){lo(t,i),wo(t,{type:e,id:jo++,frozen:null}),F(o)||co(o,t[n],{that:t,AS_ENTRIES:r})})),i=o.prototype,u=Oo(e),a=function(t,e,r){var n=u(t),o=mo(Ht(e),!0);return!0===o?To(n).set(e,r):o[n.id]=r,t};return Hn(i,{delete:function(t){var e=u(this);if(!V(t))return!1;var r=mo(t);return!0===r?To(e).delete(t):r&&mt(r,e.id)&&delete r[e.id]},has:function(t){var e=u(this);if(!V(t))return!1;var r=mo(t);return!0===r?To(e).has(t):r&&mt(r,e.id)}}),Hn(i,r?{get:function(t){var e=u(this);if(V(t)){var r=mo(t);if(!0===r)return To(e).get(t);if(r)return r[e.id]}},set:function(t,e){return a(this,t,e)}}:{add:function(t){return a(this,t,!0)}}),o}},Ro=ye.enforce,ko=Object,No=Array.isArray,zo=ko.isExtensible,Mo=ko.isFrozen,_o=ko.isSealed,Co=ko.freeze,Fo=ko.seal,Do=!b.ActiveXObject&&"ActiveXObject"in b,Bo=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},Ho=function(t,e,r){var n=-1!==t.indexOf("Map"),o=-1!==t.indexOf("Weak"),i=n?"set":"add",u=b[t],a=u&&u.prototype,c=u,f={},l=function(t){var e=R(a[t]);ge(a,t,"add"===t?function(t){return e(this,0===t?0:t),this}:"delete"===t?function(t){return!(o&&!V(t))&&e(this,0===t?0:t)}:"get"===t?function(t){return o&&!V(t)?void 0:e(this,0===t?0:t)}:"has"===t?function(t){return!(o&&!V(t))&&e(this,0===t?0:t)}:function(t,r){return e(this,0===t?0:t,r),this})};if(We(t,!G(u)||!(o||a.forEach&&!m((function(){(new u).entries().next()})))))c=r.getConstructor(e,t,n,i),Xn.enable();else if(We(t,!0)){var s=new c,d=s[i](o?{}:-0,1)!==s,v=m((function(){s.has(1)})),p=function(t,e){try{if(!e&&!vo)return!1}catch(t){return!1}var r=!1;try{var n={};n[so]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch(t){}return r}((function(t){new u(t)})),y=!o&&m((function(){for(var t=new u,e=5;e--;)t[i](e,e);return!t.has(-0)}));p||((c=e((function(t,e){lo(t,a);var r=function(t,e,r){var n,o;return ln&&G(n=e.constructor)&&n!==r&&V(o=n.prototype)&&o!==r.prototype&&ln(t,o),t}(new u,t,c);return F(e)||co(e,r[i],{that:r,AS_ENTRIES:n}),r}))).prototype=a,a.constructor=c),(v||y)&&(l("delete"),l("has"),n&&l("get")),(y||d)&&l(i),o&&a.clear&&delete a.clear}return f[t]=c,Ke({global:!0,constructor:!0,forced:c!==u},f),nn(c,t),o||r.setStrong(c,t,n),c}("WeakMap",Bo,Lo),$o=Ho.prototype,Go=R($o.set);if(ue)if(Do){Po=Lo.getConstructor(Bo,"WeakMap",!0),Xn.enable();var Vo=R($o.delete),Wo=R($o.has),Uo=R($o.get);Hn($o,{delete:function(t){if(V(t)&&!zo(t)){var e=Ro(this);return e.frozen||(e.frozen=new Po),Vo(this,t)||e.frozen.delete(t)}return Vo(this,t)},has:function(t){if(V(t)&&!zo(t)){var e=Ro(this);return e.frozen||(e.frozen=new Po),Wo(this,t)||e.frozen.has(t)}return Wo(this,t)},get:function(t){if(V(t)&&!zo(t)){var e=Ro(this);return e.frozen||(e.frozen=new Po),Wo(this,t)?Uo(this,t):e.frozen.get(t)}return Uo(this,t)},set:function(t,e){if(V(t)&&!zo(t)){var r=Ro(this);r.frozen||(r.frozen=new Po),Wo(this,t)?Go(this,t,e):r.frozen.set(t,e)}else Go(this,t,e);return this}})}else Bn&&m((function(){var t=Co([]);return Go(new Ho,t,1),!Mo(t)}))&&Hn($o,{set:function(t,e){var r;return No(t)&&(Mo(t)?r=Co:_o(t)&&(r=Fo)),Go(this,t,e),r&&r(t),this}});var Ko={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Yo=zt("span").classList,Xo=Yo&&Yo.constructor&&Yo.constructor.prototype,qo=Xo===Object.prototype?void 0:Xo,Jo=At("iterator"),Qo=Tn.values,Zo=function(t,e){if(t){if(t[Jo]!==Qo)try{Xt(t,Jo,Qo)}catch(e){t[Jo]=Qo}if(nn(t,e,!0),Ko[e])for(var r in Tn)if(t[r]!==Tn[r])try{Xt(t,r,Tn[r])}catch(e){t[r]=Tn[r]}}};for(var ti in Ko)Zo(b[ti]&&b[ti].prototype,ti);Zo(qo,"DOMTokenList");var ei=new WeakMap;function ri(t){var e,r=t.children||[],o=r.length;if(0===o)return"";for(var i=0;i<o&&!e;i+=1){var u=r[i];n.isText(u)&&(e=u)}return null==e?"":e.color||""}function ni(t,r,n){for(var u=r.type,a=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r}(r,["type"]),c=void 0!==n?n:a.level||0,f=e.findPath(t,r),l=f;;){if(0===l.length||0===f[f.length-1])return null;l=o.previous(l);var s=i.node(t,l);if(!s)return null;var d=Er(s,1)[0],v=d.level,p=void 0===v?0:v;if(e.getNodeType(d)!==u)return null;if(p===c)return d}}function oi(t,e,r){var n=ni(t,e,r);return!!n&&n.ordered===e.ordered}var ii=[];var ui={type:"list-item",elemToHtml:function(t,r){var n="",u="",a=t.ordered,c=void 0!==a&&a?"ol":"ul",f=function(t){var r=ei.get(t);if(null==r)return 0;var n=t,u=n.type,a=n.ordered,c=void 0!==a&&a,f=n.level,l=void 0===f?0:f,s=e.findPath(r,t);if(0===s[0])return l+1;var d=o.previous(s),v=i.node(r,d);if(!v)return 0;var p=Er(v,1)[0];if(e.getNodeType(p)!==u)return l+1;var y=p,h=y.ordered,g=void 0!==h&&h,b=y.level,m=void 0===b?0:b;return m<l?l-m:m>l?oi(r,t)?0:1:m===l?g===c?0:1:0}(t);if(f>0)for(var l=0;l<f;l+=1)n+="<".concat(c,">"),ii.push(c);var s=function(t){var r=ei.get(t);if(null==r)return 0;var n=t,u=n.type,a=n.ordered,c=void 0!==a&&a,f=n.level,l=void 0===f?0:f,s=e.findPath(r,t);if(s[0]===r.children.length-1)return l+1;var d=o.next(s),v=i.node(r,d);if(!v)return 0;var p=Er(v,1)[0];if(e.getNodeType(p)!==u)return l+1;var y=p,h=y.ordered,g=void 0!==h&&h,b=y.level,m=void 0===b?0:b;return m<l?oi(r,p)?l-m:l-m+1:m>l?0:m===l?g===c?0:1:0}(t);if(s>0)for(l=0;l<s;l+=1){var d=ii.pop();u+="</".concat(d,">")}var v=ri(t),p=v?' style="color:'.concat(v,'"'):"";return{html:"<li".concat(p,">").concat(r,"</li>"),prefix:n,suffix:u}}},ai=Ie.includes,ci=m((function(){return!Array(1).includes()}));Ke({target:"Array",proto:!0,forced:ci},{includes:function(t){return ai(this,t,arguments.length>1?arguments[1]:void 0)}}),Vr("includes");var fi,li,si=function(){var t=Ht(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e},di=b.RegExp,vi=m((function(){var t=di("a","y");return t.lastIndex=2,null!==t.exec("abcd")})),pi=vi||m((function(){return!di("a","y").sticky})),yi={BROKEN_CARET:vi||m((function(){var t=di("^r","gy");return t.lastIndex=2,null!==t.exec("str")})),MISSED_STICKY:pi,UNSUPPORTED_Y:vi},hi=b.RegExp,gi=m((function(){var t=hi(".","s");return!(t.dotAll&&t.test("\n")&&"s"===t.flags)})),bi=b.RegExp,mi=m((function(){var t=bi("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})),wi=ye.get,Oi=yt("native-string-replace",String.prototype.replace),Si=RegExp.prototype.exec,xi=Si,Ei=R("".charAt),ji=R("".indexOf),Ti=R("".replace),Ai=R("".slice),Ii=(li=/b*/g,x(Si,fi=/a/,"a"),x(Si,li,"a"),0!==fi.lastIndex||0!==li.lastIndex),Pi=yi.BROKEN_CARET,Li=void 0!==/()??/.exec("")[1];(Ii||Li||Pi||gi||mi)&&(xi=function(t){var e,r,n,o,i,u,a,c=this,f=wi(c),l=Ln(t),s=f.raw;if(s)return s.lastIndex=c.lastIndex,e=x(xi,s,l),c.lastIndex=s.lastIndex,e;var d=f.groups,v=Pi&&c.sticky,p=x(si,c),y=c.source,h=0,g=l;if(v&&(p=Ti(p,"y",""),-1===ji(p,"g")&&(p+="g"),g=Ai(l,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==Ei(l,c.lastIndex-1))&&(y="(?: "+y+")",g=" "+g,h++),r=new RegExp("^(?:"+y+")",p)),Li&&(r=new RegExp("^"+y+"$(?!\\s)",p)),Ii&&(n=c.lastIndex),o=x(Si,v?r:c,g),v?o?(o.input=Ai(o.input,h),o[0]=Ai(o[0],h),o.index=c.lastIndex,c.lastIndex+=o[0].length):c.lastIndex=0:Ii&&o&&(c.lastIndex=c.global?o.index+o[0].length:n),Li&&o&&o.length>1&&x(Oi,o[0],r,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)})),o&&d)for(o.groups=u=Cr(null),i=0;i<d.length;i++)u[(a=d[i])[0]]=o[a[1]];return o});var Ri=xi;Ke({target:"RegExp",proto:!0,forced:/./.exec!==Ri},{exec:Ri});var ki=function(){function t(){this.type="list-item",this.tag="button"}return t.prototype.getListNode=function(t){var r=this.type;return e.getSelectedNodeByType(t,r)},t.prototype.getValue=function(t){return""},t.prototype.isActive=function(t){var e=this.getListNode(t);if(null==e)return!1;var r=e.ordered;return(void 0!==r&&r)===this.ordered},t.prototype.isDisabled=function(t){return null==t.selection||!!e.getSelectedElems(t).some((function(e){if(i.isVoid(t,e)&&i.isBlock(t,e))return!0;var r=e.type;return!!["pre","code","table"].includes(r)}))},t.prototype.exec=function(t,e){this.isActive(t)?u.setNodes(t,{type:"paragraph",ordered:void 0,level:void 0}):u.setNodes(t,{type:"list-item",ordered:this.ordered,indent:void 0})},t}(),Ni=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.ordered=!1,e.title=r("listModule.unOrderedList"),e.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M384 64h640v128H384V64z m0 384h640v128H384v-128z m0 384h640v128H384v-128zM0 128a128 128 0 1 1 256 0 128 128 0 0 1-256 0z m0 384a128 128 0 1 1 256 0 128 128 0 0 1-256 0z m0 384a128 128 0 1 1 256 0 128 128 0 0 1-256 0z"></path></svg>',e}return Sr(e,t),e}(ki),zi=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.ordered=!0,e.title=r("listModule.orderedList"),e.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M384 832h640v128H384z m0-384h640v128H384z m0-384h640v128H384zM192 0v256H128V64H64V0zM128 526.016v50.016h128v64H64v-146.016l128-60V384H64v-64h192v146.016zM256 704v320H64v-64h128v-64H64v-64h128v-64H64v-64z"></path></svg>',e}return Sr(e,t),e}(ki),Mi={key:"bulletedList",factory:function(){return new Ni}},_i={key:"numberedList",factory:function(){return new zi}},Ci=bo.filter,Fi=hr("filter");Ke({target:"Array",proto:!0,forced:!Fi},{filter:function(t){return Ci(this,t,arguments.length>1?arguments[1]:void 0)}});var Di=function(t,e,r,n,o,i,u,a){for(var c,f,l=o,s=0,d=!!u&&Qn(u,a);s<n;)s in r&&(c=d?d(r[s],s,e):r[s],i>0&&Ye(c)?(f=Te(c),l=Di(t,e,c,f,l,i-1)-1):(qe(l+1),t[l]=c),l++),s++;return l},Bi=Di;Ke({target:"Array",proto:!0},{flat:function(){var t=arguments.length?arguments[0]:void 0,e=gt(this),r=Te(e),n=pr(e,0);return n.length=Bi(n,e,e,r,0,void 0===t?1:Oe(t)),n}}),Vr("flat");var Hi=Function.prototype,$i=Hi.apply,Gi=Hi.call,Vi="object"==typeof Reflect&&Reflect.apply||(O?Gi.bind($i):function(){return Gi.apply($i,arguments)}),Wi=At("species"),Ui=RegExp.prototype,Ki=Mn.charAt,Yi=function(t,e,r){return e+(r?Ki(t,e).length:1)},Xi=Math.floor,qi=R("".charAt),Ji=R("".replace),Qi=R("".slice),Zi=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,tu=/\$([$&'`]|\d{1,2})/g,eu=function(t,e,r,n,o,i){var u=r+t.length,a=n.length,c=tu;return void 0!==o&&(o=gt(o),c=Zi),Ji(i,c,(function(i,c){var f;switch(qi(c,0)){case"$":return"$";case"&":return t;case"`":return Qi(e,0,r);case"'":return Qi(e,u);case"<":f=o[Qi(c,1,-1)];break;default:var l=+c;if(0===l)return i;if(l>a){var s=Xi(l/10);return 0===s?i:s<=a?void 0===n[s-1]?qi(c,1):n[s-1]+qi(c,1):i}f=n[l-1]}return void 0===f?"":f}))},ru=TypeError,nu=function(t,e){var r=t.exec;if(G(r)){var n=x(r,t,e);return null!==n&&Ht(n),n}if("RegExp"===z(t))return x(Ri,t,e);throw new ru("RegExp#exec called on incompatible receiver")},ou=At("replace"),iu=Math.max,uu=Math.min,au=R([].concat),cu=R([].push),fu=R("".indexOf),lu=R("".slice),su="$0"==="a".replace(/./,"$0"),du=!!/./[ou]&&""===/./[ou]("a","$0");function vu(t){return t.length?t[0].tagName.toLowerCase():""}function pu(t){return i.nodes(t,{at:t.selection||void 0,match:function(r){return 1===e.findPath(t,r).length}})}!function(t,e,r,n){var o=At(t),i=!m((function(){var e={};return e[o]=function(){return 7},7!==""[t](e)})),u=i&&!m((function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[Wi]=function(){return r},r.flags="",r[o]=/./[o]),r.exec=function(){return e=!0,null},r[o](""),!e}));if(!i||!u||r){var a=/./[o],c=e(o,""[t],(function(t,e,r,n,o){var u=e.exec;return u===Ri||u===Ui.exec?i&&!o?{done:!0,value:x(a,e,r,n)}:{done:!0,value:x(t,r,e,n)}:{done:!1}}));ge(String.prototype,t,c[0]),ge(Ui,o,c[1])}n&&Xt(Ui[o],"sham",!0)}("replace",(function(t,e,r){var n=du?"$":"$0";return[function(t,r){var n=B(this),o=F(t)?void 0:lt(t,ou);return o?x(o,t,n,r):x(e,Ln(n),t,r)},function(t,o){var i=Ht(this),u=Ln(t);if("string"==typeof o&&-1===fu(o,n)&&-1===fu(o,"$<")){var a=r(e,i,u,o);if(a.done)return a.value}var c=G(o);c||(o=Ln(o));var f,l=i.global;l&&(f=i.unicode,i.lastIndex=0);for(var s,d=[];null!==(s=nu(i,u))&&(cu(d,s),l);){""===Ln(s[0])&&(i.lastIndex=Yi(u,je(i.lastIndex),f))}for(var v,p="",y=0,h=0;h<d.length;h++){for(var g,b=Ln((s=d[h])[0]),m=iu(uu(Oe(s.index),u.length),0),w=[],O=1;O<s.length;O++)cu(w,void 0===(v=s[O])?v:String(v));var S=s.groups;if(c){var x=au([b],w,m,u);void 0!==S&&cu(x,S),g=Ln(Vi(o,void 0,x))}else g=eu(b,u,m,w,S,o);m>=y&&(p+=lu(u,y,m)+g,y=m+b.length)}return p+lu(u,y)}]}),!!m((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!su||du),Ke({global:!0,forced:b.globalThis!==b},{globalThis:b}),f&&(c.fn.append=f),l&&(c.fn.attr=l),s&&(c.fn.parent=s);var yu={renderElems:[{type:"list-item",renderElem:function(t,r,n){ei.set(t,n);var u=t,a=u.level,c=void 0===a?0:a,f=u.ordered,l=void 0!==f&&f,s={margin:"5px 0 5px ".concat(20*c,"px")},v="";if(l){var p=function(t,r){var n=r,u=n.type,a=n.level,c=void 0===a?0:a,f=n.ordered,l=void 0!==f&&f,s=1,d=r,v=e.findPath(t,d);if(0===v[0])return 1;for(;v[0]>0;){var p=o.previous(v),y=i.node(t,p);if(null==y)break;var h=y[0],g=h.level,b=void 0===g?0:g,m=h.type,w=h.ordered;if(m!==u)break;if(b<c)break;if(b===c){if(w!==l)break;s+=1}d=h,v=p}return s}(n,t);v="".concat(p,".")}else v=function(t){void 0===t&&(t=0);var e="";switch(t){case 0:e="•";break;case 1:e="◦";break;default:e="▪"}return e}(c);var y=ri(t);return d("div",{style:s},d("span",{contentEditable:!1,style:{marginRight:"0.5em",color:y},"data-w-e-reserve":!0},v),d("span",null,r))}}],editorPlugin:function(t){var r=t.deleteBackward,n=t.handleTab,o=t.normalizeNode,c=t.insertBreak,f=t;return f.insertBreak=function(){var r=Er(i.nodes(t,{match:function(t){return e.checkNodeType(t,"list-item")},universal:!0}),1)[0];return r?""!==r[0].children[0].text?c():void u.setNodes(f,{type:"paragraph",ordered:void 0,level:void 0}):c()},f.deleteBackward=function(n){var o=f.selection;if(null!=o)if(a.isExpanded(o))r(n);else{var i=e.getSelectedNodeByType(f,"list-item");if(null!=i)if(0!==o.focus.offset)r(n);else{var c=i,l=c.level,s=void 0===l?0:l,d=c.ordered,v=void 0!==d&&d;if(s>0){var p=ni(t,i,s-1);p&&p.ordered!==v?u.setNodes(f,{level:s-1,ordered:!v}):u.setNodes(f,{level:s-1})}else u.setNodes(f,{type:"paragraph",ordered:void 0,level:void 0})}else r(n)}else r(n)},f.handleTab=function(){var t,r,o,i,c=f.selection;if(null!=c){if(a.isCollapsed(c)){var l=e.getSelectedNodeByType(f,"list-item");if(null==l)return void n();if(0===c.focus.offset){var s=l.level,d=void 0===s?0:s;return void u.setNodes(f,{level:d+1})}}if(a.isExpanded(c)){var v=0,p=!1;try{for(var y=xr(pu(f)),h=y.next();!h.done;h=y.next()){var g=Er(h.value,1)[0];"list-item"===e.getNodeType(g)?v+=1:p=!0}}catch(e){t={error:e}}finally{try{h&&!h.done&&(r=y.return)&&r.call(y)}finally{if(t)throw t.error}}if(p||v<=1)return void n();try{for(var b=xr(pu(f)),m=b.next();!m.done;m=b.next()){var w=Er(m.value,2),O=(g=w[0],w[1]),S=g.level;d=void 0===S?0:S;u.setNodes(f,{level:d+1},{at:O})}}catch(t){o={error:t}}finally{try{m&&!m.done&&(i=b.return)&&i.call(b)}finally{if(o)throw o.error}}}else n()}else n()},f.normalizeNode=function(t){var r=Er(t,2),n=r[0],i=r[1],a=e.getNodeType(n);return"bulleted-list"!==a&&"numbered-list"!==a||u.unwrapNodes(f,{at:i}),o([n,i])},f},menus:[Mi,_i],elemsToHtml:[ui],parseElemsHtml:[{selector:"ul:not([data-w-e-type]),ol:not([data-w-e-type])",parseElemHtml:function(t,e,r){return e.flat(1/0)}},{selector:"li:not([data-w-e-type])",parseElemHtml:function(t,e,r){var o=c(t);0===(e=e.filter((function(t){return!!n.isText(t)||!!r.isInline(t)}))).length&&(e=[{text:o.text().replace(/\s+/gm," ")}]);var i=function(t){return"ol"===vu(t.parent())}(o),u=function(t){for(var e=0,r=t.parent(),n=vu(r);"ul"===n||"ol"===n;)n=vu(r=r.parent()),e+=1;return e-1}(o);return{type:"list-item",ordered:i,level:u,children:e}}}]};export{yu as default};
|
|
2
2
|
//# sourceMappingURL=index.esm.js.map
|