UNPKG

@wangeditor/basic-modules

Version:
15 lines (13 loc) 120 kB
import{i18nAddResources as t,DomEditor as e,t as n,genModalInputElems as r,genModalButtonElems as o}from"@wangeditor/core";import{jsx as i,h as u}from"snabbdom";import{Text as a,Editor as c,Element as l,Node as s,Transforms as f,Range as p,Point as d}from"slate";import h,{css as v,append as g,prepend as y,addClass as m,removeClass as b,hasClass as w,on as x,off as S,focus as k,attr as E,removeAttr as T,hide as M,show as H,parents as O,dataset as I,val as N,text as L,html as z,children as j,remove as A,find as P,width as V,height as C,filter as D,empty as B}from"dom7";import{nanoid as R}from"nanoid";import F from"lodash.throttle";t("en",{common:{ok:"OK",delete:"Delete",enter:"Enter"},blockQuote:{title:"Quote"},codeBlock:{title:"Code block"},color:{color:"Font color",bgColor:"Back color",default:"Default color",clear:"Clear back color"},divider:{title:"Divider"},emotion:{title:"Emotion"},fontSize:{title:"Font size",default:"Default"},fontFamily:{title:"Font family",default:"Default"},fullScreen:{title:"Full screen"},header:{title:"Header",text:"Text"},image:{netImage:"Net image",delete:"Delete image",edit:"Edit image",viewLink:"View link",src:"Image src",desc:"Description",link:"Image link"},indent:{decrease:"Decrease",increase:"Increase"},justify:{left:"Left",right:"Right",center:"Center",justify:"Justify"},lineHeight:{title:"Line height",default:"Default"},link:{insert:"Insert link",text:"Link text",url:"Link source",unLink:"Unlink",edit:"Edit link",view:"View link"},textStyle:{bold:"Bold",clear:"Clear styles",code:"Inline code",italic:"Italic",sub:"Sub",sup:"Sup",through:"Through",underline:"Underline"},undo:{undo:"undo",redo:"Redo"},todo:{todo:"Todo"}}),t("zh-CN",{common:{ok:"确定",delete:"删除",enter:"回车"},blockQuote:{title:"引用"},codeBlock:{title:"代码块"},color:{color:"文字颜色",bgColor:"背景色",default:"默认颜色",clear:"清除背景色"},divider:{title:"分割线"},emotion:{title:"表情"},fontSize:{title:"字号",default:"默认字号"},fontFamily:{title:"字体",default:"默认字体"},fullScreen:{title:"全屏"},header:{title:"标题",text:"正文"},image:{netImage:"网络图片",delete:"删除图片",edit:"编辑图片",viewLink:"查看链接",src:"图片地址",desc:"图片描述",link:"图片链接"},indent:{decrease:"减少缩进",increase:"增加缩进"},justify:{left:"左对齐",right:"右对齐",center:"居中对齐",justify:"两端对齐"},lineHeight:{title:"行高",default:"默认行高"},link:{insert:"插入链接",text:"链接文本",url:"链接地址",unLink:"取消链接",edit:"修改链接",view:"查看链接"},textStyle:{bold:"粗体",clear:"清除格式",code:"行内代码",italic:"斜体",sub:"下标",sup:"上标",through:"删除线",underline:"下划线"},undo:{undo:"撤销",redo:"重做"},todo:{todo:"待办"}});var _={type:"paragraph",renderElem:function(t,e,n){return i("p",null,e)}};var $={type:"paragraph",elemToHtml:function(t,e){return""===e?"<p><br></p>":"<p>"+e+"</p>"}},q="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function W(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function G(t){var e={exports:{}};return t(e,e.exports),e.exports}var U,X,Y=function(t){return t&&t.Math==Math&&t},J=Y("object"==typeof globalThis&&globalThis)||Y("object"==typeof window&&window)||Y("object"==typeof self&&self)||Y("object"==typeof q&&q)||function(){return this}()||Function("return this")(),K=function(t){try{return!!t()}catch(t){return!0}},Q=!K((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),Z=Function.prototype.call,tt=Z.bind?Z.bind(Z):function(){return Z.apply(Z,arguments)},et={}.propertyIsEnumerable,nt=Object.getOwnPropertyDescriptor,rt=nt&&!et.call({1:2},1)?function(t){var e=nt(this,t);return!!e&&e.enumerable}:et,ot={f:rt},it=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},ut=Function.prototype,at=ut.bind,ct=ut.call,lt=at&&at.bind(ct),st=at?function(t){return t&&lt(ct,t)}:function(t){return t&&function(){return ct.apply(t,arguments)}},ft=st({}.toString),pt=st("".slice),dt=function(t){return pt(ft(t),8,-1)},ht=J.Object,vt=st("".split),gt=K((function(){return!ht("z").propertyIsEnumerable(0)}))?function(t){return"String"==dt(t)?vt(t,""):ht(t)}:ht,yt=J.TypeError,mt=function(t){if(null==t)throw yt("Can't call method on "+t);return t},bt=function(t){return gt(mt(t))},wt=function(t){return"function"==typeof t},xt=function(t){return"object"==typeof t?null!==t:wt(t)},St=function(t){return wt(t)?t:void 0},kt=function(t,e){return arguments.length<2?St(J[t]):J[t]&&J[t][e]},Et=st({}.isPrototypeOf),Tt=kt("navigator","userAgent")||"",Mt=J.process,Ht=J.Deno,Ot=Mt&&Mt.versions||Ht&&Ht.version,It=Ot&&Ot.v8;It&&(X=(U=It.split("."))[0]>0&&U[0]<4?1:+(U[0]+U[1])),!X&&Tt&&(!(U=Tt.match(/Edge\/(\d+)/))||U[1]>=74)&&(U=Tt.match(/Chrome\/(\d+)/))&&(X=+U[1]);var Nt=X,Lt=!!Object.getOwnPropertySymbols&&!K((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&Nt&&Nt<41})),zt=Lt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,jt=J.Object,At=zt?function(t){return"symbol"==typeof t}:function(t){var e=kt("Symbol");return wt(e)&&Et(e.prototype,jt(t))},Pt=J.String,Vt=function(t){try{return Pt(t)}catch(t){return"Object"}},Ct=J.TypeError,Dt=function(t){if(wt(t))return t;throw Ct(Vt(t)+" is not a function")},Bt=function(t,e){var n=t[e];return null==n?void 0:Dt(n)},Rt=J.TypeError,Ft=Object.defineProperty,_t=function(t,e){try{Ft(J,t,{value:e,configurable:!0,writable:!0})}catch(n){J[t]=e}return e},$t=J["__core-js_shared__"]||_t("__core-js_shared__",{}),qt=G((function(t){(t.exports=function(t,e){return $t[t]||($t[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.19.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),Wt=J.Object,Gt=function(t){return Wt(mt(t))},Ut=st({}.hasOwnProperty),Xt=Object.hasOwn||function(t,e){return Ut(Gt(t),e)},Yt=0,Jt=Math.random(),Kt=st(1..toString),Qt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+Kt(++Yt+Jt,36)},Zt=qt("wks"),te=J.Symbol,ee=te&&te.for,ne=zt?te:te&&te.withoutSetter||Qt,re=function(t){if(!Xt(Zt,t)||!Lt&&"string"!=typeof Zt[t]){var e="Symbol."+t;Lt&&Xt(te,t)?Zt[t]=te[t]:Zt[t]=zt&&ee?ee(e):ne(e)}return Zt[t]},oe=J.TypeError,ie=re("toPrimitive"),ue=function(t,e){if(!xt(t)||At(t))return t;var n,r=Bt(t,ie);if(r){if(void 0===e&&(e="default"),n=tt(r,t,e),!xt(n)||At(n))return n;throw oe("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var n,r;if("string"===e&&wt(n=t.toString)&&!xt(r=tt(n,t)))return r;if(wt(n=t.valueOf)&&!xt(r=tt(n,t)))return r;if("string"!==e&&wt(n=t.toString)&&!xt(r=tt(n,t)))return r;throw Rt("Can't convert object to primitive value")}(t,e)},ae=function(t){var e=ue(t,"string");return At(e)?e:e+""},ce=J.document,le=xt(ce)&&xt(ce.createElement),se=function(t){return le?ce.createElement(t):{}},fe=!Q&&!K((function(){return 7!=Object.defineProperty(se("div"),"a",{get:function(){return 7}}).a})),pe=Object.getOwnPropertyDescriptor,de={f:Q?pe:function(t,e){if(t=bt(t),e=ae(e),fe)try{return pe(t,e)}catch(t){}if(Xt(t,e))return it(!tt(ot.f,t,e),t[e])}},he=J.String,ve=J.TypeError,ge=function(t){if(xt(t))return t;throw ve(he(t)+" is not an object")},ye=J.TypeError,me=Object.defineProperty,be={f:Q?me:function(t,e,n){if(ge(t),e=ae(e),ge(n),fe)try{return me(t,e,n)}catch(t){}if("get"in n||"set"in n)throw ye("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},we=Q?function(t,e,n){return be.f(t,e,it(1,n))}:function(t,e,n){return t[e]=n,t},xe=st(Function.toString);wt($t.inspectSource)||($t.inspectSource=function(t){return xe(t)});var Se,ke,Ee,Te=$t.inspectSource,Me=J.WeakMap,He=wt(Me)&&/native code/.test(Te(Me)),Oe=qt("keys"),Ie=function(t){return Oe[t]||(Oe[t]=Qt(t))},Ne={},Le=J.TypeError,ze=J.WeakMap;if(He||$t.state){var je=$t.state||($t.state=new ze),Ae=st(je.get),Pe=st(je.has),Ve=st(je.set);Se=function(t,e){if(Pe(je,t))throw new Le("Object already initialized");return e.facade=t,Ve(je,t,e),e},ke=function(t){return Ae(je,t)||{}},Ee=function(t){return Pe(je,t)}}else{var Ce=Ie("state");Ne[Ce]=!0,Se=function(t,e){if(Xt(t,Ce))throw new Le("Object already initialized");return e.facade=t,we(t,Ce,e),e},ke=function(t){return Xt(t,Ce)?t[Ce]:{}},Ee=function(t){return Xt(t,Ce)}}var De={set:Se,get:ke,has:Ee,enforce:function(t){return Ee(t)?ke(t):Se(t,{})},getterFor:function(t){return function(e){var n;if(!xt(e)||(n=ke(e)).type!==t)throw Le("Incompatible receiver, "+t+" required");return n}}},Be=Function.prototype,Re=Q&&Object.getOwnPropertyDescriptor,Fe=Xt(Be,"name"),_e={EXISTS:Fe,PROPER:Fe&&"something"===function(){}.name,CONFIGURABLE:Fe&&(!Q||Q&&Re(Be,"name").configurable)},$e=G((function(t){var e=_e.CONFIGURABLE,n=De.get,r=De.enforce,o=String(String).split("String");(t.exports=function(t,n,i,u){var a,c=!!u&&!!u.unsafe,l=!!u&&!!u.enumerable,s=!!u&&!!u.noTargetGet,f=u&&void 0!==u.name?u.name:n;wt(i)&&("Symbol("===String(f).slice(0,7)&&(f="["+String(f).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!Xt(i,"name")||e&&i.name!==f)&&we(i,"name",f),(a=r(i)).source||(a.source=o.join("string"==typeof f?f:""))),t!==J?(c?!s&&t[n]&&(l=!0):delete t[n],l?t[n]=i:we(t,n,i)):l?t[n]=i:_t(n,i)})(Function.prototype,"toString",(function(){return wt(this)&&n(this).source||Te(this)}))})),qe=Math.ceil,We=Math.floor,Ge=function(t){var e=+t;return e!=e||0===e?0:(e>0?We:qe)(e)},Ue=Math.max,Xe=Math.min,Ye=function(t,e){var n=Ge(t);return n<0?Ue(n+e,0):Xe(n,e)},Je=Math.min,Ke=function(t){return t>0?Je(Ge(t),9007199254740991):0},Qe=function(t){return Ke(t.length)},Ze=function(t){return function(e,n,r){var o,i=bt(e),u=Qe(i),a=Ye(r,u);if(t&&n!=n){for(;u>a;)if((o=i[a++])!=o)return!0}else for(;u>a;a++)if((t||a in i)&&i[a]===n)return t||a||0;return!t&&-1}},tn={includes:Ze(!0),indexOf:Ze(!1)},en=tn.indexOf,nn=st([].push),rn=function(t,e){var n,r=bt(t),o=0,i=[];for(n in r)!Xt(Ne,n)&&Xt(r,n)&&nn(i,n);for(;e.length>o;)Xt(r,n=e[o++])&&(~en(i,n)||nn(i,n));return i},on=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],un=on.concat("length","prototype"),an={f:Object.getOwnPropertyNames||function(t){return rn(t,un)}},cn={f:Object.getOwnPropertySymbols},ln=st([].concat),sn=kt("Reflect","ownKeys")||function(t){var e=an.f(ge(t)),n=cn.f;return n?ln(e,n(t)):e},fn=function(t,e){for(var n=sn(e),r=be.f,o=de.f,i=0;i<n.length;i++){var u=n[i];Xt(t,u)||r(t,u,o(e,u))}},pn=/#|\.prototype\./,dn=function(t,e){var n=vn[hn(t)];return n==yn||n!=gn&&(wt(e)?K(e):!!e)},hn=dn.normalize=function(t){return String(t).replace(pn,".").toLowerCase()},vn=dn.data={},gn=dn.NATIVE="N",yn=dn.POLYFILL="P",mn=dn,bn=de.f,wn=function(t,e){var n,r,o,i,u,a=t.target,c=t.global,l=t.stat;if(n=c?J:l?J[a]||_t(a,{}):(J[a]||{}).prototype)for(r in e){if(i=e[r],o=t.noTargetGet?(u=bn(n,r))&&u.value:n[r],!mn(c?r:a+(l?".":"#")+r,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;fn(i,o)}(t.sham||o&&o.sham)&&we(i,"sham",!0),$e(n,r,i,t)}},xn=st(st.bind),Sn=Array.isArray||function(t){return"Array"==dt(t)},kn={};kn[re("toStringTag")]="z";var En="[object z]"===String(kn),Tn=re("toStringTag"),Mn=J.Object,Hn="Arguments"==dt(function(){return arguments}()),On=En?dt:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Mn(t),Tn))?n:Hn?dt(e):"Object"==(r=dt(e))&&wt(e.callee)?"Arguments":r},In=function(){},Nn=[],Ln=kt("Reflect","construct"),zn=/^\s*(?:class|function)\b/,jn=st(zn.exec),An=!zn.exec(In),Pn=function(t){if(!wt(t))return!1;try{return Ln(In,Nn,t),!0}catch(t){return!1}},Vn=!Ln||K((function(){var t;return Pn(Pn.call)||!Pn(Object)||!Pn((function(){t=!0}))||t}))?function(t){if(!wt(t))return!1;switch(On(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return An||!!jn(zn,Te(t))}:Pn,Cn=re("species"),Dn=J.Array,Bn=function(t,e){return new(function(t){var e;return Sn(t)&&(e=t.constructor,(Vn(e)&&(e===Dn||Sn(e.prototype))||xt(e)&&null===(e=e[Cn]))&&(e=void 0)),void 0===e?Dn:e}(t))(0===e?0:e)},Rn=st([].push),Fn=function(t){var e=1==t,n=2==t,r=3==t,o=4==t,i=6==t,u=7==t,a=5==t||i;return function(c,l,s,f){for(var p,d,h=Gt(c),v=gt(h),g=function(t,e){return Dt(t),void 0===e?t:xn?xn(t,e):function(){return t.apply(e,arguments)}}(l,s),y=Qe(v),m=0,b=f||Bn,w=e?b(c,y):n||u?b(c,0):void 0;y>m;m++)if((a||m in v)&&(d=g(p=v[m],m,h),t))if(e)w[m]=d;else if(d)switch(t){case 3:return!0;case 5:return p;case 6:return m;case 2:Rn(w,p)}else switch(t){case 4:return!1;case 7:Rn(w,p)}return i?-1:r||o?o:w}},_n={forEach:Fn(0),map:Fn(1),filter:Fn(2),some:Fn(3),every:Fn(4),find:Fn(5),findIndex:Fn(6),filterReject:Fn(7)},$n=re("species"),qn=function(t){return Nt>=51||!K((function(){var e=[];return(e.constructor={})[$n]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},Wn=_n.filter;wn({target:"Array",proto:!0,forced:!qn("filter")},{filter:function(t){return Wn(this,t,arguments.length>1?arguments[1]:void 0)}});var Gn=En?{}.toString:function(){return"[object "+On(this)+"]"};En||$e(Object.prototype,"toString",Gn,{unsafe:!0});var Un,Xn=J.String,Yn=function(t){if("Symbol"===On(t))throw TypeError("Cannot convert a Symbol value to a string");return Xn(t)},Jn=function(){var t=ge(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e},Kn=J.RegExp,Qn=K((function(){var t=Kn("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),Zn=Qn||K((function(){return!Kn("a","y").sticky})),tr={BROKEN_CARET:Qn||K((function(){var t=Kn("^r","gy");return t.lastIndex=2,null!=t.exec("str")})),MISSED_STICKY:Zn,UNSUPPORTED_Y:Qn},er=Object.keys||function(t){return rn(t,on)},nr=Q?Object.defineProperties:function(t,e){ge(t);for(var n,r=bt(e),o=er(e),i=o.length,u=0;i>u;)be.f(t,n=o[u++],r[n]);return t},rr=kt("document","documentElement"),or=Ie("IE_PROTO"),ir=function(){},ur=function(t){return"<script>"+t+"<\/script>"},ar=function(t){t.write(ur("")),t.close();var e=t.parentWindow.Object;return t=null,e},cr=function(){try{Un=new ActiveXObject("htmlfile")}catch(t){}var t,e;cr="undefined"!=typeof document?document.domain&&Un?ar(Un):((e=se("iframe")).style.display="none",rr.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(ur("document.F=Object")),t.close(),t.F):ar(Un);for(var n=on.length;n--;)delete cr.prototype[on[n]];return cr()};Ne[or]=!0;var lr,sr,fr=Object.create||function(t,e){var n;return null!==t?(ir.prototype=ge(t),n=new ir,ir.prototype=null,n[or]=t):n=cr(),void 0===e?n:nr(n,e)},pr=J.RegExp,dr=K((function(){var t=pr(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)})),hr=J.RegExp,vr=K((function(){var t=hr("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})),gr=De.get,yr=qt("native-string-replace",String.prototype.replace),mr=RegExp.prototype.exec,br=mr,wr=st("".charAt),xr=st("".indexOf),Sr=st("".replace),kr=st("".slice),Er=(sr=/b*/g,tt(mr,lr=/a/,"a"),tt(mr,sr,"a"),0!==lr.lastIndex||0!==sr.lastIndex),Tr=tr.BROKEN_CARET,Mr=void 0!==/()??/.exec("")[1];(Er||Mr||Tr||dr||vr)&&(br=function(t){var e,n,r,o,i,u,a,c=this,l=gr(c),s=Yn(t),f=l.raw;if(f)return f.lastIndex=c.lastIndex,e=tt(br,f,s),c.lastIndex=f.lastIndex,e;var p=l.groups,d=Tr&&c.sticky,h=tt(Jn,c),v=c.source,g=0,y=s;if(d&&(h=Sr(h,"y",""),-1===xr(h,"g")&&(h+="g"),y=kr(s,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==wr(s,c.lastIndex-1))&&(v="(?: "+v+")",y=" "+y,g++),n=new RegExp("^(?:"+v+")",h)),Mr&&(n=new RegExp("^"+v+"$(?!\\s)",h)),Er&&(r=c.lastIndex),o=tt(mr,d?n:c,y),d?o?(o.input=kr(o.input,g),o[0]=kr(o[0],g),o.index=c.lastIndex,c.lastIndex+=o[0].length):c.lastIndex=0:Er&&o&&(c.lastIndex=c.global?o.index+o[0].length:r),Mr&&o&&o.length>1&&tt(yr,o[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)})),o&&p)for(o.groups=u=fr(null),i=0;i<p.length;i++)u[(a=p[i])[0]]=o[a[1]];return o});var Hr=br;wn({target:"RegExp",proto:!0,forced:/./.exec!==Hr},{exec:Hr});var Or=Function.prototype,Ir=Or.apply,Nr=Or.bind,Lr=Or.call,zr="object"==typeof Reflect&&Reflect.apply||(Nr?Lr.bind(Ir):function(){return Lr.apply(Ir,arguments)}),jr=re("species"),Ar=RegExp.prototype,Pr=function(t,e,n,r){var o=re(t),i=!K((function(){var e={};return e[o]=function(){return 7},7!=""[t](e)})),u=i&&!K((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[jr]=function(){return n},n.flags="",n[o]=/./[o]),n.exec=function(){return e=!0,null},n[o](""),!e}));if(!i||!u||n){var a=st(/./[o]),c=e(o,""[t],(function(t,e,n,r,o){var u=st(t),c=e.exec;return c===Hr||c===Ar.exec?i&&!o?{done:!0,value:a(e,n,r)}:{done:!0,value:u(n,e,r)}:{done:!1}}));$e(String.prototype,t,c[0]),$e(Ar,o,c[1])}r&&we(Ar[o],"sham",!0)},Vr=st("".charAt),Cr=st("".charCodeAt),Dr=st("".slice),Br=function(t){return function(e,n){var r,o,i=Yn(mt(e)),u=Ge(n),a=i.length;return u<0||u>=a?t?"":void 0:(r=Cr(i,u))<55296||r>56319||u+1===a||(o=Cr(i,u+1))<56320||o>57343?t?Vr(i,u):r:t?Dr(i,u,u+2):o-56320+(r-55296<<10)+65536}},Rr={codeAt:Br(!1),charAt:Br(!0)}.charAt,Fr=function(t,e,n){return e+(n?Rr(t,e).length:1)},_r=Math.floor,$r=st("".charAt),qr=st("".replace),Wr=st("".slice),Gr=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Ur=/\$([$&'`]|\d{1,2})/g,Xr=function(t,e,n,r,o,i){var u=n+t.length,a=r.length,c=Ur;return void 0!==o&&(o=Gt(o),c=Gr),qr(i,c,(function(i,c){var l;switch($r(c,0)){case"$":return"$";case"&":return t;case"`":return Wr(e,0,n);case"'":return Wr(e,u);case"<":l=o[Wr(c,1,-1)];break;default:var s=+c;if(0===s)return i;if(s>a){var f=_r(s/10);return 0===f?i:f<=a?void 0===r[f-1]?$r(c,1):r[f-1]+$r(c,1):i}l=r[s-1]}return void 0===l?"":l}))},Yr=J.TypeError,Jr=function(t,e){var n=t.exec;if(wt(n)){var r=tt(n,t,e);return null!==r&&ge(r),r}if("RegExp"===dt(t))return tt(Hr,t,e);throw Yr("RegExp#exec called on incompatible receiver")},Kr=re("replace"),Qr=Math.max,Zr=Math.min,to=st([].concat),eo=st([].push),no=st("".indexOf),ro=st("".slice),oo="$0"==="a".replace(/./,"$0"),io=!!/./[Kr]&&""===/./[Kr]("a","$0");Pr("replace",(function(t,e,n){var r=io?"$":"$0";return[function(t,n){var r=mt(this),o=null==t?void 0:Bt(t,Kr);return o?tt(o,t,r,n):tt(e,Yn(r),t,n)},function(t,o){var i=ge(this),u=Yn(t);if("string"==typeof o&&-1===no(o,r)&&-1===no(o,"$<")){var a=n(e,i,u,o);if(a.done)return a.value}var c=wt(o);c||(o=Yn(o));var l=i.global;if(l){var s=i.unicode;i.lastIndex=0}for(var f=[];;){var p=Jr(i,u);if(null===p)break;if(eo(f,p),!l)break;""===Yn(p[0])&&(i.lastIndex=Fr(u,Ke(i.lastIndex),s))}for(var d,h="",v=0,g=0;g<f.length;g++){for(var y=Yn((p=f[g])[0]),m=Qr(Zr(Ge(p.index),u.length),0),b=[],w=1;w<p.length;w++)eo(b,void 0===(d=p[w])?d:String(d));var x=p.groups;if(c){var S=to([y],b,m,u);void 0!==x&&eo(S,x);var k=Yn(zr(o,void 0,S))}else k=Xr(y,u,m,b,x,o);m>=v&&(h+=ro(u,v,m)+k,v=m+y.length)}return h+ro(u,v)}]}),!!K((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!oo||io);var uo=re("unscopables"),ao=Array.prototype;null==ao[uo]&&be.f(ao,uo,{configurable:!0,value:fr(null)});var co=function(t){ao[uo][t]=!0},lo=_n.find,so=!0;"find"in[]&&Array(1).find((function(){so=!1})),wn({target:"Array",proto:!0,forced:so},{find:function(t){return lo(this,t,arguments.length>1?arguments[1]:void 0)}}),co("find");var fo=re("match"),po=function(t){var e;return xt(t)&&(void 0!==(e=t[fo])?!!e:"RegExp"==dt(t))},ho=J.TypeError,vo=re("species"),go=function(t,e){var n,r=ge(t).constructor;return void 0===r||null==(n=ge(r)[vo])?e:function(t){if(Vn(t))return t;throw ho(Vt(t)+" is not a constructor")}(n)},yo=function(t,e,n){var r=ae(e);r in t?be.f(t,r,it(0,n)):t[r]=n},mo=J.Array,bo=Math.max,wo=function(t,e,n){for(var r=Qe(t),o=Ye(e,r),i=Ye(void 0===n?r:n,r),u=mo(bo(i-o,0)),a=0;o<i;o++,a++)yo(u,a,t[o]);return u.length=a,u},xo=tr.UNSUPPORTED_Y,So=Math.min,ko=[].push,Eo=st(/./.exec),To=st(ko),Mo=st("".slice);Pr("split",(function(t,e,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,n){var r=Yn(mt(this)),o=void 0===n?4294967295:n>>>0;if(0===o)return[];if(void 0===t)return[r];if(!po(t))return tt(e,r,t,o);for(var i,u,a,c=[],l=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),s=0,f=new RegExp(t.source,l+"g");(i=tt(Hr,f,r))&&!((u=f.lastIndex)>s&&(To(c,Mo(r,s,i.index)),i.length>1&&i.index<r.length&&zr(ko,c,wo(i,1)),a=i[0].length,s=u,c.length>=o));)f.lastIndex===i.index&&f.lastIndex++;return s===r.length?!a&&Eo(f,"")||To(c,""):To(c,Mo(r,s)),c.length>o?wo(c,0,o):c}:"0".split(void 0,0).length?function(t,n){return void 0===t&&0===n?[]:tt(e,this,t,n)}:e,[function(e,n){var o=mt(this),i=null==e?void 0:Bt(e,t);return i?tt(i,e,o,n):tt(r,Yn(o),e,n)},function(t,o){var i=ge(this),u=Yn(t),a=n(r,i,u,o,r!==e);if(a.done)return a.value;var c=go(i,RegExp),l=i.unicode,s=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(xo?"g":"y"),f=new c(xo?"^(?:"+i.source+")":i,s),p=void 0===o?4294967295:o>>>0;if(0===p)return[];if(0===u.length)return null===Jr(f,u)?[u]:[];for(var d=0,h=0,v=[];h<u.length;){f.lastIndex=xo?0:h;var g,y=Jr(f,xo?Mo(u,h):u);if(null===y||(g=So(Ke(f.lastIndex+(xo?h:0)),u.length))===d)h=Fr(u,h,l);else{if(To(v,Mo(u,d,h)),v.length===p)return v;for(var m=1;m<=y.length-1;m++)if(To(v,y[m]),v.length===p)return v;h=d=g}}return To(v,Mo(u,d)),v}]}),!!K((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),xo);var Ho,Oo="\t\n\v\f\r                 \u2028\u2029\ufeff",Io=st("".replace),No="["+Oo+"]",Lo=RegExp("^"+No+No+"*"),zo=RegExp(No+No+"*$"),jo=function(t){return function(e){var n=Yn(mt(e));return 1&t&&(n=Io(n,Lo,"")),2&t&&(n=Io(n,zo,"")),n}},Ao={start:jo(1),end:jo(2),trim:jo(3)},Po=_e.PROPER,Vo=Ao.trim;function Co(t){return 0===h("<div>"+t+"</div>").children().filter((function(t){return"BR"!==t.tagName})).length}function Do(t){return 0===t.length?"":t[0].outerHTML}function Bo(t){return t.length?t[0].tagName.toLowerCase():""}function Ro(t,e){for(var n="",r=(t.attr("style")||"").split(";"),o=r.length,i=0;i<o;i++){var u=r[i];if(u){var a=u.split(":");a[0].trim()===e&&(n=a[1].trim())}}return n}wn({target:"String",proto:!0,forced:(Ho="trim",K((function(){return!!Oo[Ho]()||"​…᠎"!=="​…᠎"[Ho]()||Po&&Oo[Ho].name!==Ho})))},{trim:function(){return Vo(this)}}),wn({global:!0},{globalThis:J}),v&&(h.fn.css=v),g&&(h.fn.append=g),y&&(h.fn.prepend=y),m&&(h.fn.addClass=m),b&&(h.fn.removeClass=b),w&&(h.fn.hasClass=w),x&&(h.fn.on=x),S&&(h.fn.off=S),k&&(h.fn.focus=k),E&&(h.fn.attr=E),T&&(h.fn.removeAttr=T),M&&(h.fn.hide=M),H&&(h.fn.show=H),O&&(h.fn.parents=O),I&&(h.fn.dataset=I),N&&(h.fn.val=N),L&&(h.fn.text=L),z&&(h.fn.html=z),j&&(h.fn.children=j),A&&(h.fn.remove=A),P&&(h.fn.find=P),V&&(h.fn.width=V),C&&(h.fn.height=C),D&&(h.fn.filter=D),B&&(h.fn.empty=B);var Fo={selector:"p:not([data-w-e-type])",parseElemHtml:function(t,e,n){var r=h(t);return 0===(e=e.filter((function(t){return!!a.isText(t)||!!n.isInline(t)}))).length&&(e=[{text:r.text().replace(/\s+/gm," ")}]),{type:"paragraph",children:e}}},_o=function(t,e){return _o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},_o(t,e)}; /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */function $o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}_o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var qo=function(){return qo=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},qo.apply(this,arguments)};function Wo(t,e,n,r){return new(n||(n=Promise))((function(o,i){function u(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(u,a)}c((r=r.apply(t,e||[])).next())}))}function Go(t,e){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=e.call(t,u)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}function Uo(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Xo(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)u.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return u}function Yo(t){var e=Xo(c.nodes(t,{match:function(e){return t.children[0]===e},mode:"highest"}),1),n=e[0];if(null==n)return!1;var r=n[0];if(!l.isElement(r))return!1;if("paragraph"===r.type)return!1;if(""!==s.string(r))return!1;var o=r.children,i=void 0===o?[]:o;return!!a.isText(i[0])&&(f.setNodes(t,{type:"paragraph"}),!0)}var Jo={renderElems:[_],elemsToHtml:[$],parseElemsHtml:[Fo],editorPlugin:function(t){var e=t.deleteBackward,n=t.deleteForward;t.insertText,t.insertBreak;var r=t;return r.deleteBackward=function(t){Yo(r)||e(t)},r.deleteForward=function(t){Yo(r)||n(t)},r}},Ko=/"/g,Qo=st("".replace),Zo=function(t,e,n,r){var o=Yn(mt(t)),i="<"+e;return""!==n&&(i+=" "+n+'="'+Qo(Yn(r),Ko,"&quot;")+'"'),i+">"+o+"</"+e+">"},ti=function(t){return K((function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}))};function ei(t,e){var n=e,r=t,o=r.bold,i=r.italic,u=r.underline;return o&&(n="<strong>"+n+"</strong>"),r.code&&(n="<code>"+n+"</code>"),i&&(n="<em>"+n+"</em>"),u&&(n="<u>"+n+"</u>"),r.through&&(n="<s>"+n+"</s>"),r.sub&&(n="<sub>"+n+"</sub>"),r.sup&&(n="<sup>"+n+"</sup>"),n}function ni(t,e){return 0!==t.length&&(!!t[0].matches(e)||t.find(e).length>0)}wn({target:"String",proto:!0,forced:ti("bold")},{bold:function(){return Zo(this,"b","","")}}),wn({target:"String",proto:!0,forced:ti("italics")},{italics:function(){return Zo(this,"i","","")}}),wn({target:"String",proto:!0,forced:ti("sub")},{sub:function(){return Zo(this,"sub","","")}}),wn({target:"String",proto:!0,forced:ti("sup")},{sup:function(){return Zo(this,"sup","","")}});var ri={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},oi=se("span").classList,ii=oi&&oi.constructor&&oi.constructor.prototype,ui=ii===Object.prototype?void 0:ii,ai=function(t,e){var n=[][t];return!!n&&K((function(){n.call(null,e||function(){throw 1},1)}))},ci=_n.forEach,li=ai("forEach")?[].forEach:function(t){return ci(this,t,arguments.length>1?arguments[1]:void 0)},si=function(t){if(t&&t.forEach!==li)try{we(t,"forEach",li)}catch(e){t.forEach=li}};for(var fi in ri)ri[fi]&&si(J[fi]&&J[fi].prototype);function pi(t,n){return null==t.selection||!!Xo(c.nodes(t,{match:function(n){return"pre"===e.getNodeType(n)||!!c.isVoid(t,n)},universal:!0}),1)[0]}function di(t,e){Object.keys(e).forEach((function(e){"text"!==e&&c.removeMark(t,e)}))}si(ui),wn({target:"Object",stat:!0,forced:K((function(){er(1)}))},{keys:function(t){return er(Gt(t))}});var hi=function(){function t(){this.marksNeedToRemove=[],this.tag="button"}return t.prototype.getValue=function(t){var e=this.mark,n=c.marks(t);return n?n[e]:!!Xo(c.nodes(t,{match:function(t){return!0===t[e]}}),1)[0]},t.prototype.isActive=function(t){return!!this.getValue(t)},t.prototype.isDisabled=function(t){return pi(t,this.mark)},t.prototype.exec=function(t,e){var n=this.mark,r=this.marksNeedToRemove;e?t.removeMark(n):(t.addMark(n,!0),r&&r.forEach((function(e){return t.removeMark(e)})))},t}(),vi='<svg viewBox="0 0 1024 1024"><path d="M707.872 484.64A254.88 254.88 0 0 0 768 320c0-141.152-114.848-256-256-256H192v896h384c141.152 0 256-114.848 256-256a256.096 256.096 0 0 0-124.128-219.36zM384 192h101.504c55.968 0 101.504 57.408 101.504 128s-45.536 128-101.504 128H384V192z m159.008 640H384v-256h159.008c58.464 0 106.016 57.408 106.016 128s-47.552 128-106.016 128z"></path></svg>',gi='<svg viewBox="0 0 1024 1024"><path d="M704 64l128 0 0 416c0 159.072-143.264 288-320 288s-320-128.928-320-288l0-416 128 0 0 416c0 40.16 18.24 78.688 51.36 108.512 36.896 33.216 86.848 51.488 140.64 51.488s103.744-18.304 140.64-51.488c33.12-29.792 51.36-68.352 51.36-108.512l0-416zM192 832l640 0 0 128-640 0z"></path></svg>',yi='<svg viewBox="0 0 1024 1024"><path d="M896 64v64h-128L448 896h128v64H128v-64h128L576 128h-128V64z"></path></svg>',mi='<svg viewBox="0 0 1024 1024"><path d="M1024 512v64h-234.496c27.52 38.496 42.496 82.688 42.496 128 0 70.88-36.672 139.04-100.576 186.976C672.064 935.488 594.144 960 512 960s-160.064-24.512-219.424-69.024C228.64 843.04 192 774.88 192 704h128c0 69.376 87.936 128 192 128s192-58.624 192-128-87.936-128-192-128H0v-64h299.52a385.984 385.984 0 0 1-6.944-5.024C228.64 459.04 192 390.88 192 320s36.672-139.04 100.576-186.976C351.936 88.512 429.856 64 512 64s160.064 24.512 219.424 69.024C795.328 180.96 832 249.12 832 320h-128c0-69.376-87.936-128-192-128s-192 58.624-192 128 87.936 128 192 128c78.976 0 154.048 22.688 212.48 64H1024z"></path></svg>',bi='<svg viewBox="0 0 1024 1024"><path d="M576 736l96 96 320-320L672 192l-96 96 224 224zM448 288l-96-96L32 512l320 320 96-96-224-224z"></path></svg>',wi='<svg viewBox="0 0 1024 1024"><path d="M864 0a160 160 0 0 1 128 256l-64 64-224-224 64-64c26.752-20.096 59.968-32 96-32zM64 736l-64 288 288-64 592-592-224-224L64 736z m651.584-372.416l-448 448-55.168-55.168 448-448 55.168 55.168z"></path></svg>',xi='<svg viewBox="0 0 1024 1024"><path d="M924.402464 1023.068211H0.679665V99.345412h461.861399v98.909208H99.596867v725.896389h725.896389V561.206811h98.909208z" p-id="10909"></path><path d="M930.805104 22.977336l69.965436 69.965436-453.492405 453.492404-69.965435-69.901489z" p-id="10910"></path><path d="M1022.464381 304.030081h-98.917201V99.345412H709.230573V0.428211h313.233808z"></path></svg>',Si='<svg viewBox="0 0 1024 1024"><path d="M64 864h896v96H64zM360.58 576h302.85l81.53 224h102.16L579.24 64H444.77L176.89 800h102.16l81.53-224zM512 159.96L628.49 480H395.52L512 159.96z"></path></svg>',ki='<svg viewBox="0 0 1024 1024"><path d="M510.030769 315.076923l84.676923 196.923077h-177.230769l76.8-196.923077h15.753846zM945.230769 157.538462v708.923076c0 43.323077-35.446154 78.769231-78.769231 78.769231H157.538462c-43.323077 0-78.769231-35.446154-78.769231-78.769231V157.538462c0-43.323077 35.446154-78.769231 78.769231-78.769231h708.923076c43.323077 0 78.769231 35.446154 78.769231 78.769231z m-108.307692 643.938461L600.615385 216.615385c-5.907692-11.815385-15.753846-19.692308-29.538462-19.692308h-139.815385c-11.815385 0-23.630769 7.876923-27.56923 19.692308l-216.615385 584.861538c-3.938462 11.815385 3.938462 25.6 17.723077 25.6h80.738462c11.815385 0 23.630769-9.846154 27.56923-21.661538l63.015385-175.261539h263.876923l68.923077 175.261539c3.938462 11.815385 15.753846 21.661538 27.569231 21.661538h80.738461c13.784615 0 23.630769-13.784615 19.692308-25.6z"></path></svg>',Ei='<svg viewBox="0 0 1024 1024"><path d="M64 512h384v128h-128V1024h-128V640h-128z m896-256H708.2496v768h-136.4992V256H320V128h640z"></path></svg>',Ti='<svg viewBox="0 0 1024 1024"><path d="M956.788364 152.110545h-24.110546l23.924364 9.029819 0.186182 121.018181h-65.070546l-86.574545-130.048H566.551273v650.14691l130.048 64.977454v65.163636h-390.050909v-65.163636l129.954909-64.977454V152.110545H198.283636L111.429818 282.065455H46.545455V69.259636C46.545455 33.792 82.664727 22.062545 98.955636 22.062545h812.683637c23.738182 0 45.056 15.173818 45.056 41.053091V169.425455v-17.221819z"></path></svg>',Mi='<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m384 192h640v128H384z m0 192h640v128H384z m0 192h640v128H384zM0 832h1024v128H0z m256-512v384l-256-192z"></path></svg>',Hi='<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m384 192h640v128H384z m0 192h640v128H384z m0 192h640v128H384zM0 832h1024v128H0z m0-128V320l256 192z"></path></svg>',Oi='<svg viewBox="0 0 1024 1024"><path d="M768 793.6v102.4H51.2v-102.4h716.8z m204.8-230.4v102.4H51.2v-102.4h921.6z m-204.8-230.4v102.4H51.2v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>',Ii='<svg viewBox="0 0 1024 1024"><path d="M972.8 793.6v102.4H256v-102.4h716.8z m0-230.4v102.4H51.2v-102.4h921.6z m0-230.4v102.4H256v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>',Ni='<svg viewBox="0 0 1024 1024"><path d="M870.4 793.6v102.4H153.6v-102.4h716.8z m102.4-230.4v102.4H51.2v-102.4h921.6z m-102.4-230.4v102.4H153.6v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>',Li='<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z"></path></svg>',zi='<svg viewBox="0 0 1024 1024"><path d="M768 206.016v50.016h128v64h-192V174.016l128-60V64h-128V0h192v146.016zM676 256h-136L352 444 164 256H28l256 256-256 256h136L352 580 540 768h136l-256-256z"></path></svg>',ji='<svg viewBox="0 0 1024 1024"><path d="M768 910.016v50.016h128v64h-192v-146.016l128-60V768h-128v-64h192v146.016zM676 256h-136L352 444 164 256H28l256 256-256 256h136L352 580 540 768h136l-256-256z"></path></svg>',Ai=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mark="bold",e.title=n("textStyle.bold"),e.iconSvg=vi,e.hotkey="mod+b",e}return $o(e,t),e}(hi),Pi=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mark="code",e.title=n("textStyle.code"),e.iconSvg=bi,e.hotkey="mod+e",e}return $o(e,t),e}(hi),Vi=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mark="italic",e.title=n("textStyle.italic"),e.iconSvg=yi,e.hotkey="mod+i",e}return $o(e,t),e}(hi),Ci=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mark="through",e.title=n("textStyle.through"),e.iconSvg=mi,e.hotkey="mod+shift+x",e}return $o(e,t),e}(hi),Di=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mark="underline",e.title=n("textStyle.underline"),e.iconSvg=gi,e.hotkey="mod+u",e}return $o(e,t),e}(hi),Bi=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mark="sub",e.marksNeedToRemove=["sup"],e.title=n("textStyle.sub"),e.iconSvg=ji,e.hotkey="",e}return $o(e,t),e}(hi),Ri=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.mark="sup",e.marksNeedToRemove=["sub"],e.title=n("textStyle.sup"),e.iconSvg=zi,e.hotkey="",e}return $o(e,t),e}(hi),Fi=function(){function t(){this.title=n("textStyle.clear"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M969.382408 288.738615l-319.401123-270.852152a67.074236 67.074236 0 0 0-96.459139 5.74922l-505.931379 574.922021a68.35184 68.35184 0 0 0-17.886463 47.910169 74.101061 74.101061 0 0 0 24.274486 47.910168l156.50655 132.232065h373.060512L975.131628 383.281347a67.074236 67.074236 0 0 0-5.74922-96.459139z m-440.134747 433.746725H264.144729l-90.071117-78.572676c-5.74922-5.74922-12.137243-12.137243-12.137243-17.886463a36.411728 36.411728 0 0 1 5.749221-24.274485l210.804741-240.828447 265.102932 228.691204z m-439.495945 180.781036h843.218964a60.047411 60.047411 0 1 1 0 120.733624H89.751716a60.047411 60.047411 0 1 1 0-120.733624z m0 0"></path></svg>',this.tag="button"}return t.prototype.getValue=function(t){return""},t.prototype.isActive=function(t){return!1},t.prototype.isDisabled=function(t){return pi(t)},t.prototype.exec=function(t,e){var n,r,o=c.nodes(t,{match:function(t){return a.isText(t)},universal:!0});try{for(var i=Uo(o),u=i.next();!u.done;u=i.next()){di(t,u.value[0])}}catch(t){n={error:t}}finally{try{u&&!u.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},t}(),_i={renderStyle:function(t,e){var n=t,r=n.bold,o=n.italic,u=n.underline,a=n.code,c=n.through,l=n.sub,s=n.sup,f=e;return r&&(f=i("strong",null,f)),a&&(f=i("code",null,f)),o&&(f=i("em",null,f)),u&&(f=i("u",null,f)),c&&(f=i("s",null,f)),l&&(f=i("sub",null,f)),s&&(f=i("sup",null,f)),f},menus:[{key:"bold",factory:function(){return new Ai}},{key:"underline",factory:function(){return new Di}},{key:"italic",factory:function(){return new Vi}},{key:"through",factory:function(){return new Ci}},{key:"code",factory:function(){return new Pi}},{key:"sub",factory:function(){return new Bi}},{key:"sup",factory:function(){return new Ri}},{key:"clearStyle",factory:function(){return new Fi}}],styleToHtml:function(t,e){if(!a.isText(t))return e;if(Co(e))return ei(t,e);var n=h(e);if("br"===Bo(n))return ei(t,"<br>");var r=n.html();return r=ei(t,r),n.html(r),Do(n)},parseStyleHtml:function(t,e,n){var r=h(t);if(!a.isText(e))return e;var o=e;return ni(r,"b,strong")&&(o.bold=!0),ni(r,"i,em")&&(o.italic=!0),ni(r,"u")&&(o.underline=!0),ni(r,"s,strike")&&(o.through=!0),ni(r,"sub")&&(o.sub=!0),ni(r,"sup")&&(o.sup=!0),ni(r,"code")&&(o.code=!0),o}};function $i(t){return function(e,n,r){return i("h"+t,null,n)}}var qi={type:"header1",renderElem:$i(1)},Wi={type:"header2",renderElem:$i(2)},Gi={type:"header3",renderElem:$i(3)},Ui={type:"header4",renderElem:$i(4)},Xi={type:"header5",renderElem:$i(5)},Yi=_e.PROPER,Ji=RegExp.prototype,Ki=Ji.toString,Qi=st(Jn),Zi=K((function(){return"/a/b"!=Ki.call({source:"a",flags:"b"})})),tu=Yi&&"toString"!=Ki.name;(Zi||tu)&&$e(RegExp.prototype,"toString",(function(){var t=ge(this),e=Yn(t.source),n=t.flags;return"/"+e+"/"+Yn(void 0===n&&Et(Ji,t)&&!("flags"in Ji)?Qi(t):n)}),{unsafe:!0});var eu,nu=J.TypeError,ru=function(t){if(po(t))throw nu("The method doesn't accept regular expressions");return t},ou=re("match"),iu=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[ou]=!1,"/./"[t](e)}catch(t){}}return!1},uu=de.f,au=st("".startsWith),cu=st("".slice),lu=Math.min,su=iu("startsWith");function fu(t){var n=Xo(c.nodes(t,{match:function(t){return e.getNodeType(t).startsWith("header")},universal:!0}),1),r=n[0];if(null==r)return"paragraph";var o=Xo(r,1)[0];return e.getNodeType(o)}function pu(t){return null==t.selection||!Xo(c.nodes(t,{match:function(t){var n=e.getNodeType(t);return"paragraph"===n||!!n.startsWith("header")},universal:!0,mode:"highest"}),1)[0]}function du(t,e){e&&f.setNodes(t,{type:e})}wn({target:"String",proto:!0,forced:!!(su||(eu=uu(String.prototype,"startsWith"),!eu||eu.writable))&&!su},{startsWith:function(t){var e=Yn(mt(this));ru(t);var n=Ke(lu(arguments.length>1?arguments[1]:void 0,e.length)),r=Yn(t);return au?au(e,r,n):cu(e,n,n+r.length)===r}});var hu=function(){function t(){this.title=n("header.title"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M960 960c-51.2 0-102.4-3.2-153.6-3.2-51.2 0-99.2 3.2-150.4 3.2-19.2 0-28.8-22.4-28.8-38.4 0-51.2 57.6-28.8 86.4-48 19.2-12.8 19.2-60.8 19.2-80v-224-19.2c-9.6-3.2-19.2-3.2-28.8-3.2H320c-9.6 0-19.2 0-28.8 3.2V780.8c0 22.4 0 80 22.4 92.8 28.8 19.2 96-6.4 96 44.8 0 16-9.6 41.6-28.8 41.6-54.4 0-105.6-3.2-160-3.2-48 0-96 3.2-147.2 3.2-19.2 0-28.8-22.4-28.8-38.4 0-51.2 51.2-28.8 80-48 19.2-12.8 19.2-60.8 19.2-83.2V294.4c0-28.8 3.2-115.2-22.4-131.2-25.6-16-86.4 9.6-86.4-41.6 0-16 6.4-41.6 28.8-41.6 51.2 0 105.6 3.2 156.8 3.2 48 0 96-3.2 144-3.2 19.2 0 28.8 22.4 28.8 41.6 0 48-57.6 25.6-83.2 41.6-19.2 12.8-19.2 73.6-19.2 92.8v201.6c6.4 3.2 16 3.2 22.4 3.2h400c6.4 0 12.8 0 22.4-3.2V256c0-22.4 0-80-19.2-92.8-28.8-16-86.4 6.4-86.4-41.6 0-16 9.6-41.6 28.8-41.6 51.2 0 99.2 3.2 150.4 3.2 48 0 99.2-3.2 147.2-3.2 19.2 0 28.8 22.4 28.8 41.6 0 51.2-57.6 25.6-86.4 41.6-19.2 12.8-19.2 70.4-19.2 92.8v537.6c0 19.2 0 67.2 19.2 80 28.8 19.2 89.6-6.4 89.6 44.8 0 19.2-6.4 41.6-28.8 41.6z"></path></svg>',this.tag="select",this.width=60}return t.prototype.getOptions=function(t){var e=[{value:"header1",text:"H1",styleForRenderMenuList:{"font-size":"32px","font-weight":"bold"}},{value:"header2",text:"H2",styleForRenderMenuList:{"font-size":"24px","font-weight":"bold"}},{value:"header3",text:"H3",styleForRenderMenuList:{"font-size":"18px","font-weight":"bold"}},{value:"header4",text:"H4",styleForRenderMenuList:{"font-size":"16px","font-weight":"bold"}},{value:"header5",text:"H5",styleForRenderMenuList:{"font-size":"13px","font-weight":"bold"}},{value:"paragraph",text:n("header.text")}],r=this.getValue(t).toString();return e.forEach((function(t){t.value===r?t.selected=!0:delete t.selected})),e},t.prototype.isActive=function(t){return!1},t.prototype.getValue=function(t){return fu(t)},t.prototype.isDisabled=function(t){return pu(t)},t.prototype.exec=function(t,e){du(t,e.toString())},t}(),vu=function(){function t(){this.tag="button"}return t.prototype.getValue=function(t){return fu(t)},t.prototype.isActive=function(t){return this.getValue(t)===this.type},t.prototype.isDisabled=function(t){return pu(t)},t.prototype.exec=function(t,e){var n=this.type;du(t,e===n?"paragraph":n)},t}(),gu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.title="H1",e.type="header1",e}return $o(e,t),e}(vu),yu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.title="H2",e.type="header2",e}return $o(e,t),e}(vu),mu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.title="H3",e.type="header3",e}return $o(e,t),e}(vu),bu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.title="H4",e.type="header4",e}return $o(e,t),e}(vu),wu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.title="H5",e.type="header5",e}return $o(e,t),e}(vu),xu={key:"headerSelect",factory:function(){return new hu}},Su={key:"header1",factory:function(){return new gu}},ku={key:"header2",factory:function(){return new yu}},Eu={key:"header3",factory:function(){return new mu}},Tu={key:"header4",factory:function(){return new bu}},Mu={key:"header5",factory:function(){return new wu}};function Hu(t){return function(e,n){return"<h"+t+">"+n+"</h"+t+">"}}function Ou(t){return function(e,n,r){var o=h(e);return 0===(n=n.filter((function(t){return!!a.isText(t)||!!r.isInline(t)}))).length&&(n=[{text:o.text().replace(/\s+/gm," ")}]),{type:"header"+t,children:n}}}var Iu={renderElems:[qi,Wi,Gi,Ui,Xi],elemsToHtml:[{type:"header1",elemToHtml:Hu(1)},{type:"header2",elemToHtml:Hu(2)},{type:"header3",elemToHtml:Hu(3)},{type:"header4",elemToHtml:Hu(4)},{type:"header5",elemToHtml:Hu(5)}],parseElemsHtml:[{selector:"h1:not([data-w-e-type])",parseElemHtml:Ou(1)},{selector:"h2:not([data-w-e-type])",parseElemHtml:Ou(2)},{selector:"h3:not([data-w-e-type])",parseElemHtml:Ou(3)},{selector:"h4:not([data-w-e-type])",parseElemHtml:Ou(4)},{selector:"h5:not([data-w-e-type])",parseElemHtml:Ou(5)}],menus:[xu,Su,ku,Eu,Tu,Mu],editorPlugin:function(t){var n=t.insertBreak;t.insertNode;var r=t;return r.insertBreak=function(){var o=Xo(c.nodes(r,{match:function(t){return e.getNodeType(t).startsWith("header")},universal:!0}),1)[0];if(o)if(e.isSelectionAtLineEnd(t,o[1])){f.insertNodes(r,{type:"paragraph",children:[{text:""}]},{mode:"highest"})}else n();else n()},r}},Nu=Object.assign,Lu=Object.defineProperty,zu=st([].concat),ju=!Nu||K((function(){if(Q&&1!==Nu({b:1},Nu(Lu({},"a",{enumerable:!0,get:function(){Lu(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach((function(t){e[t]=t})),7!=Nu({},t)[n]||er(Nu({},e)).join("")!=r}))?function(t,e){for(var n=Gt(t),r=arguments.length,o=1,i=cn.f,u=ot.f;r>o;)for(var a,c=gt(arguments[o++]),l=i?zu(er(c),i(c)):er(c),s=l.length,f=0;s>f;)a=l[f++],Q&&!tt(u,c,a)||(n[a]=c[a]);return n}:Nu;function Au(t,e){null==t.data&&(t.data={});var n=t.data;null==n.style&&(n.style={}),Object.assign(n.style,e)}wn({target:"Object",stat:!0,forced:Object.assign!==ju},{assign:ju});var Pu={selector:"font",preParseHtml:function(t){var e=h(t);if("font"!==Bo(e))return t;var n=e.attr("color")||"";return n&&(e.removeAttr("color"),e.css("color",n)),e[0]}};var Vu=function(){function t(){this.tag="button",this.showDropPanel=!0,this.$content=null}return t.prototype.exec=function(t,e){},t.prototype.getValue=function(t){var e=this.mark,n=c.marks(t);return n&&n[e]?n[e]:""},t.prototype.isActive=function(t){return!!this.getValue(t)},t.prototype.isDisabled=function(t){return null==t.selection||!!Xo(c.nodes(t,{match:function(n){return"pre"===e.getNodeType(n)||!!c.isVoid(t,n)},universal:!0}),1)[0]},t.prototype.getPanelContentElem=function(t){var e=this.mark;if(null==this.$content){var r=h('<ul class="w-e-panel-content-color"></ul>');r.on("click","li",(function(n){var r=n.target;if(null!=r&&(n.preventDefault(),null!=t.selection)){var o=h(r).attr("data-value");"0"===o?c.removeMark(t,e):c.addMark(t,e,o)}})),this.$content=r}var o=this.$content;if(null==o)return document.createElement("ul");o.empty();var i=this.getValue(t),u=t.getMenuConfig(e).colors;(void 0===u?[]:u).forEach((function(t){var e=h('<div class="color-block" data-value="'+t+'"></div>');e.css("background-color",t);var n=h('<li data-value="'+t+'"></li>');i===t&&n.addClass("active"),n.append(e),o.append(n)}));var a="";"color"===e&&(a=n("color.default")),"bgColor"===e&&(a=n("color.clear"));var l=h('\n <li data-value="0" class="clear">\n <svg viewBox="0 0 1024 1024"><path d="M236.8 128L896 787.2V128H236.8z m614.4 704L192 172.8V832h659.2zM192 64h704c38.4 0 64 25.6 64 64v704c0 38.4-25.6 64-64 64H192c-38.4 0-64-25.6-64-64V128c0-38.4 25.6-64 64-64z"></path></svg>\n '+a+"\n </li>\n ");return o.prepend(l),o[0]},t}(),Cu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.title=n("color.color"),e.iconSvg=Si,e.mark="color",e}return $o(e,t),e}(Vu),Du=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.title=n("color.bgColor"),e.iconSvg=ki,e.mark="bgColor",e}return $o(e,t),e}(Vu),Bu=["rgb(0, 0, 0)","rgb(38, 38, 38)","rgb(89, 89, 89)","rgb(140, 140, 140)","rgb(191, 191, 191)","rgb(217, 217, 217)","rgb(233, 233, 233)","rgb(245, 245, 245)","rgb(250, 250, 250)","rgb(255, 255, 255)","rgb(225, 60, 57)","rgb(231, 95, 51)","rgb(235, 144, 58)","rgb(245, 219, 77)","rgb(114, 192, 64)","rgb(89, 191, 192)","rgb(66, 144, 247)","rgb(54, 88, 226)","rgb(106, 57, 201)","rgb(216, 68, 147)","rgb(251, 233, 230)","rgb(252, 237, 225)","rgb(252, 239, 212)","rgb(252, 251, 207)","rgb(231, 246, 213)","rgb(218, 244, 240)","rgb(217, 237, 250)","rgb(224, 232, 250)","rgb(237, 225, 248)","rgb(246, 226, 234)","rgb(255, 163, 158)","rgb(255, 187, 150)","rgb(255, 213, 145)","rgb(255, 251, 143)","rgb(183, 235, 143)","rgb(135, 232, 222)","rgb(145, 213, 255)","rgb(173, 198, 255)","rgb(211, 173, 247)","rgb(255, 173, 210)","rgb(255, 77, 79)","rgb(255, 122, 69)","rgb(255, 169, 64)","rgb(255, 236, 61)","rgb(115, 209, 61)","rgb(54, 207, 201)","rgb(64, 169, 255)","rgb(89, 126, 247)","rgb(146, 84, 222)","rgb(247, 89, 171)","rgb(207, 19, 34)","rgb(212, 56, 13)","rgb(212, 107, 8)","rgb(212, 177, 6)","rgb(56, 158, 13)","rgb(8, 151, 156)","rgb(9, 109, 217)","rgb(29, 57, 196)","rgb(83, 29, 171)","rgb(196, 29, 127)","rgb(130, 0, 20)","rgb(135, 20, 0)","rgb(135, 56, 0)","rgb(97, 71, 0)","rgb(19, 82, 0)","rgb(0, 71, 79)","rgb(0, 58, 140)","rgb(6, 17, 120)","rgb(34, 7, 94)","rgb(120, 6, 80)"];var Ru={renderStyle:function(t,e){var n=t,r=n.color,o=n.bgColor,i=e;return r&&Au(i,{color:r}),o&&Au(i,{backgroundColor:o}),i},styleToHtml:function(t,e){if(!a.isText(t))return e;var n,r=t,o=r.color,i=r.bgColor;return o||i?((Co(e)||"span"!==Bo(n=h(e)))&&(n=h("<span>"+e+"</span>")),o&&n.css("color",o),i&&n.css("background-color",i),Do(n)):e},preParseHtml:[Pu],parseStyleHtml:function(t,e,n){var r=h(t);if(!a.isText(e))return e;var o=e,i=Ro(r,"color");i&&(o.color=i);var u=Ro(r,"background-color");return u||(u=Ro(r,"background")),u&&(o.bgColor=u),o},menus:[{key:"color",factory:function(){return new Cu},config:{colors:Bu}},{key:"bgColor",factory:function(){return new Du},config:{colors:Bu}}]},Fu=function(t){if("string"!=typeof t)return!1;var e=t.match(_u);if(!e)return!1;var n=e[1];if(!n)return!1;if($u.test(n)||qu.test(n))return!0;return!1},_u=/^(?:\w+:)?\/\/(\S+)$/,$u=/^localhost[\:?\d]*(?:[^\:?\d]\S*)?$/,qu=/^[^\s\.]+\.\S{2,}$/;var Wu=tn.includes;function Gu(t){retu