You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
41 KiB
18 lines
41 KiB
|
2 years ago
|
import{i18nAddResources as t,DomEditor as e,t as n}from"@wangeditor/core";import{Editor as r,Transforms as o,Path as i,Node as a,Point as l,Range as u,Text as c,Element as s}from"slate";import{jsx as f}from"snabbdom";import d from"lodash.throttle";import p,{append as v,on as h,focus as g,attr as y,val as b,html as m,dataset as w,addClass as S,removeClass as x,children as T,each as E,find as N}from"dom7";import"nanoid";import M from"lodash.isequal";t("en",{tableModule:{deleteCol:"Delete column",deleteRow:"Delete row",deleteTable:"Delete table",widthAuto:"Width auto",insertCol:"Insert column",insertRow:"Insert row",insertTable:"Insert table",header:"Header"}}),t("zh-CN",{tableModule:{deleteCol:"删除列",deleteRow:"删除行",deleteTable:"删除表格",widthAuto:"宽度自适应",insertCol:"插入列",insertRow:"插入行",insertTable:"插入表格",header:"表头"}});var O="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function H(t){var e={exports:{}};return t(e,e.exports),e.exports}var P,V,z=function(t){return t&&t.Math==Math&&t},L=z("object"==typeof globalThis&&globalThis)||z("object"==typeof window&&window)||z("object"==typeof self&&self)||z("object"==typeof O&&O)||function(){return this}()||Function("return this")(),R=function(t){try{return!!t()}catch(t){return!0}},A=!R((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),C=Function.prototype.call,I=C.bind?C.bind(C):function(){return C.apply(C,arguments)},j={}.propertyIsEnumerable,D=Object.getOwnPropertyDescriptor,k={f:D&&!j.call({1:2},1)?function(t){var e=D(this,t);return!!e&&e.enumerable}:j},B=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},F=Function.prototype,$=F.bind,_=F.call,G=$&&$.bind(_),q=$?function(t){return t&&G(_,t)}:function(t){return t&&function(){return _.apply(t,arguments)}},U=q({}.toString),W=q("".slice),X=function(t){return W(U(t),8,-1)},Y=L.Object,K=q("".split),J=R((function(){return!Y("z").propertyIsEnumerable(0)}))?function(t){return"String"==X(t)?K(t,""):Y(t)}:Y,Q=L.TypeError,Z=function(t){if(null==t)throw Q("Can't call method on "+t);return t},tt=function(t){return J(Z(t))},et=function(t){return"function"==typeof t},nt=function(t){return"object"==typeof t?null!==t:et(t)},rt=function(t){return et(t)?t:void 0},ot=function(t,e){return arguments.length<2?rt(L[t]):L[t]&&L[t][e]},it=q({}.isPrototypeOf),at=ot("navigator","userAgent")||"",lt=L.process,ut=L.Deno,ct=lt&<.versions||ut&&ut.version,st=ct&&ct.v8;st&&(V=(P=st.split("."))[0]>0&&P[0]<4?1:+(P[0]+P[1])),!V&&at&&(!(P=at.match(/Edge\/(\d+)/))||P[1]>=74)&&(P=at.match(/Chrome\/(\d+)/))&&(V=+P[1]);var ft=V,dt=!!Object.getOwnPropertySymbols&&!R((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&ft&&ft<41})),pt=dt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,vt=L.Object,ht=pt?function(t){return"symbol"==typeof t}:function(t){var e=ot("Symbol");return et(e)&&it(e.prototype,vt(t))},gt=L.String,yt=function(t){try{return gt(t)}catch(t){return"Object"}},bt=L.TypeError,mt=function(t){if(et(t))return t;throw bt(yt(t)+" is not a function")},wt=function(t,e){var n=t[e];return null==n?void 0:mt(n)},St=L.TypeError,xt=Object.defineProperty,Tt=function(t,e){try{xt(L,t,{value:e,configurable:!0,writable:!0})}catch(n){L[t]=e}return e},Et=L["__core-js_shared__"]||Tt("__core-js_shared__",{}),Nt=H((function(t){(t.exports=function(t,e){return Et[t]||(Et[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.19.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),Mt=L.Object,Ot=function(t){return Mt(Z(t))},Ht=q({}.hasOwnProperty),Pt=Object.hasOwn||function(t,e){return Ht(Ot(t),e)},Vt=0,zt=Math.random(),Lt=q(1..toString),Rt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+Lt(++Vt+zt,36)},At=Nt("wks"),Ct=L.Symbol,It=Ct&&Ct.for,jt=pt?Ct:Ct&&Ct.withoutSetter||Rt,Dt=function(t){if(!Pt(At,t)||!dt&&"string"!=typeof At[t]){var e="Symbol."+t;dt&&Pt(Ct,t)?At[t]=Ct[t]:At[t]=pt&&It?It(e):jt(e)}return At[t]},kt=L
|
||
|
|
/*! *****************************************************************************
|
||
|
|
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(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.")}(a),c=u.next();!c.done;c=u.next()){c.value;l=!0}}catch(t){o={error:t}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(o)throw o.error}}return l}Ze({target:"Array",proto:!0,forced:!or},{slice:function(t,e){var n,r,o,i=tt(this),a=Re(i),l=Ve(t,a),u=Ve(void 0===e?a:e,a);if(qn(i)&&(n=i.constructor,(Zn(n)&&(n===ar||qn(n.prototype))||nt(n)&&null===(n=n[ir]))&&(n=void 0),n===ar||void 0===n))return rr(i,l,u);for(r=new(void 0===n?ar:n)(lr(u-l,0)),o=0;l<u;l++,o++)l in i&&tr(r,o,i[l]);return r.length=o,r}});var fr=q(q.bind),dr=Dt("species"),pr=L.Array,vr=function(t,e){return new(function(t){var e;return qn(t)&&(e=t.constructor,(Zn(e)&&(e===pr||qn(e.prototype))||nt(e)&&null===(e=e[dr]))&&(e=void 0)),void 0===e?pr:e}(t))(0===e?0:e)},hr=q([].push),gr=function(t){var e=1==t,n=2==t,r=3==t,o=4==t,i=6==t,a=7==t,l=5==t||i;return function(u,c,s,f){for(var d,p,v=Ot(u),h=J(v),g=function(t,e){return mt(t),void 0===e?t:fr?fr(t,e):function(){return t.apply(e,arguments)}}(c,s),y=Re(h),b=0,m=f||vr,w=e?m(u,y):n||a?m(u,0):void 0;y>b;b++)if((l||b in h)&&(p=g(d=h[b],b,v),t))if(e)w[b]=p;else if(p)switch(t){case 3:return!0;case 5:return d;case 6:return b;case 2:hr(w,d)}else switch(t){case 4:return!1;case 7:hr(w,d)}return i?-1:r||o?o:w}},yr={forEach:gr(0),map:gr(1),filter:gr(2),some:gr(3),every:gr(4),find:gr(5),findIndex:gr(6),filterReject:gr(7)},br=yr.map;Ze({target:"Array",proto:!0,forced:!nr("map")},{map:function(t){return br(this,t,arguments.length>1?arguments[1]:void 0)}});var mr=nn?{}.toString:function(){return"[object "+ln(this)+"]"};function wr(t){var e=t.children||[];return 0===e.length?[]:(e[0]||{}).children||[]}function Sr(t){return wr(t).every((function(t){return!!t.isHeader}))}nn||Ee(Object.prototype,"toString",mr,{unsafe:!0});var xr=Te.PROPER,Tr=RegExp.prototype,Er=Tr.toString,Nr=q(pn),Mr=R((function(){return"/a/b"!=Er.call({source:"a",flags:"b"})})),Or=xr&&"toString"!=Er.name;(Mr||Or)&&Ee(RegExp.prototype,"toString",(function(){var t=Jt(this),e=cn(t.source),n=t.flags;return"/"+e+"/"+cn(void 0===n&&it(Tr,t)&&!("flags"in Tr)?Nr(t):n)}),{unsafe:!0});var Hr=Dt("unscopables"),Pr=Array.prototype;null==Pr[Hr]&&te.f(Pr,Hr,{configurable:!0,value:Hn(null)});var Vr,zr=yr.find,Lr=!0;"find"in[]&&Array(1).find((function(){Lr=!1})),Ze({target:"Array",proto:!0,forced:Lr},{find:function(t){return zr(this,t,arguments.length>1?arguments[1]:void 0)}}),Vr="find",Pr[Hr][Vr]=!0;var Rr=Function.prototype,Ar=Rr.apply,Cr=Rr.bind,Ir=Rr.call,jr="object"==typeof Reflect&&Reflect.apply||(Cr?Ir.bind(Ar):function(){return Ir.apply(Ar,arguments)}),Dr=Dt("species"),kr=RegExp.prototype,Br=function(t,e,n,r){var o=Dt(t),i=!R((function(){var e={};return e[o]=function(){return 7},7!=""[t](e)})),a=i&&!R((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[Dr]=function(){return n},n.flags="",n[o]=/./[o]),n.exec=function(){return e=!0,null},n[o](""),!e}));if(!i||!a||n){var l=q(/./[o]),u=e(o,""[t],(function(t,e,n,r,o){var a=q(t),u=e.exec;return u===Gn||u===kr.exec?i&&!o?{done:!0,value:l(e,n,r)}:{done:!0,value:a(n,e,r)}:{done:!1}}));Ee(String.prototype,t,u[0]),Ee(kr,o,u[1])}r&&ee(kr[o],"sham",!0)},Fr=Dt("match"),$r=L.TypeError,_r=Dt("species"),Gr=function(t,e){var n,r=Jt(t).constructor;return void 0===r||null==(n=Jt(r)[_r])?e:function(t){if(Zn(t))return t;throw $r(yt(t)+" is not a constructor")}(n)},qr=q("".charAt),Ur=q("".charCodeAt),Wr=q("".slice),Xr=function(t){return function(e,n){var r,o,i=cn(Z(e)),a=Oe(n),l=i.length;return a<0||a>=l?t?"":void 0:(r=Ur(i,a))<55296||r>56319||a+1===l||(o=Ur(i,a+1))<56320||o>57343?t?qr(i,a):r:t?Wr(i,a,a+2):o-56320+(r-55296<<10)+65536}},Yr={codeAt:Xr(!1),charAt:Xr(!0)}.charAt,Kr=function(t,e,n){return e+(n?Yr(t,e).length:1)},Jr=L.Array,Qr=Math.max,Zr=function(t,e,n){for(var r=Re(t),o=Ve(e,r),i=Ve(void 0===n?r:n,r),a=J
|
||
|
|
//# sourceMappingURL=index.esm.js.map
|